0byt3m1n1
Path:
C:
/
Program Files
/
Microsoft VS Code
/
resources
/
app
/
out
/
vs
/
workbench
/
[
Home
]
File: workbench.desktop.main.js
/*!-------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. *--------------------------------------------------------*/(function(){var ae=["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/platform/actions/common/actions","vs/base/common/arrays","vs/platform/registry/common/platform","vs/base/common/resources","vs/platform/files/common/files","vs/editor/common/core/range","vs/base/common/errors","vs/base/common/network","vs/platform/storage/common/storage","vs/workbench/services/editor/common/editorService","vs/platform/log/common/log","vs/platform/notification/common/notification","vs/platform/telemetry/common/telemetry","vs/base/common/strings","vs/base/common/codicons","vs/css!vs/workbench/workbench.desktop.main","vs/platform/commands/common/commands","vs/base/common/cancellation","vs/platform/theme/common/colorRegistry","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/workbench/services/extensions/common/extensions","vs/editor/browser/editorExtensions","vs/platform/opener/common/opener","vs/editor/common/languages/language","vs/workbench/common/editor","vs/workbench/common/contributions","vs/workbench/common/views","vs/platform/product/common/productService","vs/platform/dialogs/common/dialogs","vs/platform/quickinput/common/quickInput","vs/platform/label/common/label","vs/editor/common/core/position","vs/workbench/services/environment/common/environmentService","vs/base/common/objects","vs/base/common/path","vs/editor/common/services/model","vs/platform/configuration/common/configurationRegistry","vs/base/common/buffer","vs/platform/uriIdentity/common/uriIdentity","vs/workbench/services/editor/common/editorGroupsService","vs/editor/common/editorContextKeys","vs/base/common/map","vs/editor/common/services/languageFeatures","vs/editor/common/services/resolverService","vs/platform/theme/common/iconRegistry","vs/workbench/contrib/notebook/common/notebookCommon","vs/base/common/color","vs/platform/progress/common/progress","vs/workbench/api/common/extHost.protocol","vs/base/common/severity","vs/workbench/services/lifecycle/common/lifecycle","vs/platform/action/common/actionCommonCategories","vs/workbench/common/contextkeys","vs/base/common/uuid","vs/platform/theme/common/styler","vs/workbench/services/host/browser/host","vs/editor/browser/services/codeEditorService","vs/platform/list/browser/listService","vs/workbench/services/extensions/common/extHostCustomers","vs/workbench/services/textfile/common/textfiles","vs/base/browser/ui/actionbar/actionbar","vs/workbench/common/theme","vs/platform/environment/common/environment","vs/platform/extensionManagement/common/extensionManagement","vs/workbench/services/layout/browser/layoutService","vs/platform/actions/browser/menuEntryActionViewItem","vs/editor/common/core/selection","vs/base/browser/browser","vs/workbench/contrib/debug/common/debug","vs/base/common/iterator","vs/platform/native/electron-sandbox/native","vs/base/browser/keyboardEvent","vs/workbench/services/panecomposite/browser/panecomposite","vs/editor/common/languages","vs/platform/clipboard/common/clipboardService","vs/editor/common/model/textModel","vs/platform/userDataSync/common/userDataSync","vs/base/common/filters","vs/platform/instantiation/common/descriptors","vs/platform/keybinding/common/keybindingsRegistry","vs/base/common/keyCodes","vs/platform/extensionManagement/common/extensionManagementUtil","vs/workbench/contrib/notebook/browser/notebookBrowser","vs/platform/ipc/electron-sandbox/services","vs/platform/userDataProfile/common/userDataProfile","vs/workbench/services/remote/common/remoteAgentService","vs/editor/browser/editorBrowser","vs/workbench/services/preferences/common/preferences","vs/workbench/services/path/common/pathService","vs/base/common/hash","vs/workbench/contrib/terminal/browser/terminal","vs/base/browser/ui/aria/aria","vs/platform/accessibility/common/accessibility","vs/base/common/decorators","vs/base/common/htmlContent","vs/editor/common/services/textResourceConfiguration","vs/platform/extensions/common/extensions","vs/editor/common/model","vs/base/common/errorMessage","vs/platform/workspace/common/workspaceTrust","vs/workbench/contrib/extensions/common/extensions","vs/workbench/services/extensionManagement/common/extensionManagement","vs/base/browser/fastDomNode","vs/editor/common/languages/languageConfigurationRegistry","vs/base/common/json","vs/platform/markers/common/markers","vs/editor/common/languages/modesRegistry","vs/platform/theme/common/theme","vs/workbench/contrib/terminal/common/terminal","vs/workbench/services/environment/electron-sandbox/environmentService","vs/workbench/browser/parts/views/viewPane","vs/base/common/labels","vs/workbench/services/extensions/common/extensionsRegistry","vs/workbench/services/output/common/output","vs/base/browser/touch","vs/editor/common/config/editorOptions","vs/workbench/services/userDataProfile/common/userDataProfile","vs/workbench/services/workingCopy/common/workingCopyService","vs/base/browser/ui/actionbar/actionViewItems","vs/editor/common/core/editOperation","vs/base/browser/mouseEvent","vs/base/browser/ui/widget","vs/platform/contextkey/common/contextkeys","vs/workbench/contrib/notebook/common/notebookService","vs/base/browser/ui/iconLabel/iconLabels","vs/base/common/glob","vs/editor/browser/services/bulkEditService","vs/base/common/stopwatch","vs/base/browser/ui/scrollbar/scrollableElement","vs/platform/remote/common/remoteAuthorityResolver","vs/workbench/services/statusbar/browser/statusbar","vs/workbench/contrib/files/common/files","vs/platform/instantiation/common/serviceCollection","vs/workbench/contrib/notebook/common/notebookContextKeys","vs/workbench/browser/editor","vs/base/common/functional","vs/platform/jsonschemas/common/jsonContributionRegistry","vs/platform/undoRedo/common/undoRedo","vs/workbench/services/filesConfiguration/common/filesConfigurationService","vs/base/common/linkedList","vs/base/common/observable","vs/base/common/mime","vs/platform/editor/common/editor","vs/workbench/contrib/notebook/common/notebookExecutionStateService","vs/workbench/browser/parts/views/viewPaneContainer","vs/base/common/extpath","vs/base/common/marshalling","vs/base/parts/sandbox/electron-sandbox/globals","vs/editor/common/core/editorColorRegistry","vs/editor/contrib/snippet/browser/snippetController2","vs/workbench/services/editor/common/editorResolverService","vs/workbench/services/workingCopy/common/workingCopyBackup","vs/base/common/assert","vs/platform/request/common/request","vs/editor/browser/widget/codeEditorWidget","vs/editor/contrib/peekView/browser/peekView","vs/workbench/contrib/notebook/browser/view/cellPart","vs/workbench/services/configuration/common/configuration","vs/workbench/common/editor/sideBySideEditorInput","vs/workbench/contrib/notebook/browser/controller/coreActions","vs/workbench/services/hover/browser/hover","vs/editor/browser/view/viewPart","vs/base/browser/dnd","vs/base/browser/ui/button/button","vs/base/parts/ipc/common/ipc","vs/editor/contrib/markdownRenderer/browser/markdownRenderer","vs/platform/terminal/common/terminal","vs/workbench/common/editor/editorInput","vs/workbench/common/memento","vs/workbench/browser/parts/editor/editorPane","vs/workbench/contrib/terminal/common/terminalContextKey","vs/workbench/services/activity/common/activity","vs/workbench/services/history/common/history","vs/workbench/contrib/debug/common/debugModel","vs/workbench/services/themes/common/workbenchThemeService","vs/base/common/numbers","vs/base/browser/event","vs/base/browser/ui/list/listWidget","vs/base/browser/ui/toggle/toggle","vs/platform/layout/browser/layoutService","vs/editor/common/services/getIconClasses","vs/platform/workspaces/common/workspaces","vs/workbench/contrib/debug/browser/debugIcons","vs/workbench/contrib/webview/browser/webview","vs/workbench/services/search/common/search","vs/workbench/browser/parts/editor/editorCommands","vs/workbench/browser/dnd","vs/base/common/lazy","vs/editor/contrib/snippet/browser/snippetParser","vs/base/common/date","vs/base/common/process","vs/base/common/iconLabels","vs/base/browser/ui/inputbox/inputBox","vs/editor/common/services/editorWorker","vs/platform/telemetry/common/telemetryUtils","vs/workbench/common/configuration","vs/workbench/contrib/notebook/browser/notebookIcons","vs/workbench/contrib/scm/common/scm","vs/workbench/services/configurationResolver/common/configurationResolver","vs/workbench/browser/labels","vs/base/common/stream","vs/base/common/ternarySearchTree","vs/base/browser/ui/splitview/splitview","vs/platform/quickinput/common/quickAccess","vs/platform/remote/common/remoteHosts","vs/editor/contrib/suggest/browser/suggest","vs/platform/tunnel/common/tunnel","vs/editor/browser/widget/embeddedCodeEditorWidget","vs/platform/workspace/common/virtualWorkspace","vs/workbench/contrib/notebook/common/notebookKernelService","vs/workbench/contrib/testing/common/testId","vs/workbench/common/editor/diffEditorInput","vs/workbench/contrib/files/browser/files","vs/workbench/services/workingCopy/common/workingCopyFileService","vs/workbench/services/extensions/common/extensionManifestPropertiesService","vs/base/common/keybindings","vs/editor/browser/config/domFontInfo","vs/editor/contrib/codeAction/common/types","vs/base/browser/canIUse","vs/base/browser/markdownRenderer","vs/base/browser/ui/iconLabel/iconLabel","vs/editor/common/cursorCommon","vs/base/common/performance","vs/editor/common/services/languageFeatureDebounce","vs/platform/window/common/window","vs/editor/contrib/suggest/browser/suggestController","vs/platform/actions/browser/toolbar","vs/workbench/contrib/debug/common/debugUtils","vs/workbench/contrib/testing/common/testResultService","vs/workbench/services/environment/browser/environmentService","vs/workbench/contrib/debug/browser/debugCommands","vs/base/browser/ui/highlightedlabel/highlightedLabel","vs/editor/common/core/cursorColumns","vs/platform/quickinput/browser/pickerQuickAccess","vs/platform/dnd/browser/dnd","vs/platform/opener/browser/link","vs/workbench/common/editor/editorModel","vs/workbench/contrib/logs/common/logConstants","vs/workbench/contrib/mergeEditor/browser/utils","vs/workbench/contrib/notebook/common/notebookEditorInput","vs/workbench/contrib/testing/common/testTypes","vs/workbench/services/authentication/common/authentication","vs/workbench/common/editor/textResourceEditorInput","vs/workbench/services/workingCopy/common/workingCopyEditorService","vs/base/browser/ui/toolbar/toolbar","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/length","vs/platform/history/browser/contextScopedHistoryWidget","vs/editor/contrib/editorState/browser/editorState","vs/workbench/contrib/notebook/browser/services/notebookEditorService","vs/workbench/contrib/notebook/common/notebookRange","vs/workbench/contrib/preferences/common/preferences","vs/workbench/contrib/tasks/common/taskService","vs/workbench/contrib/testing/common/testProfileService","vs/workbench/services/configuration/common/jsonEditing","vs/workbench/services/editor/common/editorGroupColumn","vs/workbench/services/extensionRecommendations/common/extensionRecommendations","vs/workbench/contrib/comments/browser/commentService","vs/workbench/services/userDataSync/common/userDataSync","vs/base/browser/ui/countBadge/countBadge","vs/base/browser/ui/sash/sash","vs/base/browser/ui/dropdown/dropdownActionViewItem","vs/editor/common/core/stringBuilder","vs/editor/common/viewModel","vs/editor/common/config/fontInfo","vs/platform/update/common/update","vs/workbench/contrib/audioCues/browser/audioCueService","vs/workbench/contrib/extensions/browser/extensionRecommendations","vs/workbench/contrib/mergeEditor/browser/model/lineRange","vs/workbench/contrib/notebook/browser/notebookEditorExtensions","vs/workbench/contrib/snippets/browser/snippets","vs/workbench/contrib/terminal/common/terminalColorRegistry","vs/workbench/contrib/terminal/browser/terminalIcon","vs/workbench/contrib/testing/common/testService","vs/workbench/services/decorations/common/decorations","vs/workbench/contrib/tasks/common/tasks","vs/workbench/services/languageDetection/common/languageDetectionWorkerService","vs/workbench/services/remote/common/remoteExplorerService","vs/workbench/services/workspaces/common/workspaceEditing","vs/base/browser/ui/tree/tree","vs/base/common/collections","vs/editor/common/core/wordHelper","vs/editor/common/languages/languageConfiguration","vs/editor/common/tokens/lineTokens","vs/editor/contrib/hover/browser/hoverTypes","vs/base/browser/ui/progressbar/progressbar","vs/base/common/comparers","vs/base/browser/ui/tree/abstractTree","vs/base/common/semver/semver","vs/platform/product/common/product","vs/platform/extensionResourceLoader/common/extensionResourceLoader","vs/editor/contrib/codeAction/browser/codeAction","vs/editor/contrib/find/browser/findModel","vs/workbench/browser/parts/editor/editor","vs/workbench/contrib/files/browser/fileConstants","vs/workbench/contrib/testing/browser/icons","vs/workbench/contrib/testing/common/storedValue","vs/workbench/contrib/testing/common/testingContextKeys","vs/workbench/contrib/webviewPanel/browser/webviewEditorInput","vs/workbench/services/assignment/common/assignmentService","vs/workbench/contrib/tasks/common/problemMatcher","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/editor/common/encodedTokenAttributes","vs/editor/common/textModelEvents","vs/base/common/keybindingLabels","vs/base/browser/ui/list/listView","vs/editor/common/languages/textToHtmlTokenizer","vs/platform/credentials/common/credentials","vs/editor/common/config/editorConfigurationSchema","vs/editor/browser/coreCommands","vs/editor/contrib/contextmenu/browser/contextmenu","vs/editor/contrib/message/browser/messageController","vs/platform/extensionManagement/common/extensionStorage","vs/workbench/browser/quickaccess","vs/workbench/contrib/codeEditor/browser/menuPreventer","vs/workbench/contrib/extensions/browser/extensionsIcons","vs/workbench/contrib/markers/common/markers","vs/workbench/contrib/preferences/browser/preferencesIcons","vs/workbench/contrib/search/common/constants","vs/workbench/contrib/searchEditor/browser/constants","vs/workbench/contrib/terminal/browser/links/terminalLinkHelpers","vs/workbench/contrib/terminal/common/environmentVariable","vs/workbench/contrib/terminal/common/terminalStrings","vs/workbench/contrib/testing/common/configuration","vs/workbench/contrib/testing/common/testingStates","vs/workbench/browser/codeeditor","vs/workbench/services/extensions/common/proxyIdentifier","vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService","vs/workbench/services/search/common/queryBuilder","vs/workbench/contrib/search/common/searchModel","vs/workbench/services/timer/browser/timerService","vs/workbench/services/workingCopy/common/workingCopy","vs/workbench/contrib/search/browser/searchActions","vs/base/common/idGenerator","vs/base/common/marked/marked","vs/base/common/dataTransfer","vs/editor/common/core/characterClassifier","vs/editor/common/core/eolCounter","vs/editor/common/commands/replaceCommand","vs/editor/common/editorCommon","vs/editor/common/languages/supports","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/smallImmutableSet","vs/editor/common/model/prefixSumComputer","vs/editor/browser/view/dynamicViewOverlay","vs/base/browser/formattedTextRenderer","vs/base/browser/ui/keybindingLabel/keybindingLabel","vs/base/browser/ui/iconLabel/iconLabelHover","vs/editor/common/model/textModelSearch","vs/platform/externalServices/common/serviceMachineId","vs/platform/history/browser/historyWidgetKeybindingHint","vs/platform/download/common/download","vs/platform/languagePacks/common/languagePacks","vs/editor/contrib/documentSymbols/browser/outlineModel","vs/editor/common/services/languagesAssociations","vs/editor/browser/widget/diffEditorWidget","vs/platform/userDataSync/common/abstractSynchronizer","vs/workbench/common/editor/editorOptions","vs/workbench/browser/part","vs/workbench/contrib/codeEditor/browser/selectionClipboard","vs/workbench/contrib/files/common/explorerModel","vs/workbench/contrib/mergeEditor/browser/model/mapping","vs/workbench/contrib/notebook/browser/diff/notebookDiffEditorBrowser","vs/workbench/contrib/notebook/common/notebookCellStatusBarService","vs/workbench/contrib/bulkEdit/browser/bulkCellEdits","vs/workbench/contrib/search/browser/searchIcons","vs/workbench/contrib/testing/common/observableValue","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/services/authentication/browser/authenticationService","vs/workbench/contrib/debug/browser/baseDebugView","vs/workbench/services/untitled/common/untitledTextEditorInput","vs/workbench/services/userDataProfile/common/userDataProfileStorageRegistry","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/history","vs/base/common/observableImpl/logging","vs/css!vs/workbench/contrib/scm/browser/media/scm","vs/editor/browser/view/renderingContext","vs/editor/common/core/wordCharacterClassifier","vs/editor/common/languages/supports/tokenization","vs/editor/common/viewEventHandler","vs/editor/contrib/folding/browser/foldingRanges","vs/base/common/jsonErrorMessages","vs/base/common/diff/diff","vs/base/browser/globalPointerMoveMonitor","vs/base/browser/ui/iconLabel/simpleIconLabel","vs/base/common/fuzzyScorer","vs/base/browser/ui/selectBox/selectBox","vs/base/common/worker/simpleWorker","vs/base/parts/ipc/common/ipc.net","vs/editor/common/viewLayout/lineDecorations","vs/editor/browser/config/fontMeasurements","vs/editor/common/model/editStack","vs/editor/common/viewLayout/viewLineRenderer","vs/editor/contrib/gotoSymbol/browser/referencesModel","vs/platform/files/browser/webFileSystemAccess","vs/platform/debug/common/extensionHostDebug","vs/platform/extensionRecommendations/common/extensionRecommendations","vs/platform/configuration/common/configurationModels","vs/editor/browser/editorDom","vs/editor/contrib/format/browser/format","vs/platform/severityIcon/common/severityIcon","vs/platform/theme/common/tokenClassificationRegistry","vs/editor/contrib/find/browser/findState","vs/platform/url/common/url","vs/platform/userDataSync/common/ignoredExtensions","vs/platform/userDataSync/common/settingsMerge","vs/editor/contrib/find/browser/findController","vs/editor/contrib/hover/browser/hover","vs/platform/actions/browser/dropdownWithPrimaryActionViewItem","vs/platform/userDataSync/common/userDataSyncStoreService","vs/workbench/common/notifications","vs/workbench/contrib/debug/common/disassemblyViewInput","vs/workbench/contrib/markers/browser/messages","vs/workbench/contrib/mergeEditor/common/mergeEditor","vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView","vs/workbench/contrib/notebook/common/notebookEditorModelResolverService","vs/workbench/contrib/notebook/common/notebookExecutionService","vs/workbench/contrib/notebook/common/notebookOptions","vs/workbench/contrib/preferences/common/settingsEditorColorRegistry","vs/workbench/contrib/search/common/replace","vs/workbench/contrib/terminal/browser/terminalIcons","vs/workbench/contrib/terminal/browser/terminalUri","vs/workbench/contrib/terminal/common/environmentVariableShared","vs/workbench/contrib/testing/browser/explorerProjections/index","vs/workbench/contrib/testing/common/testResult","vs/workbench/contrib/timeline/common/timeline","vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig","vs/workbench/services/extensions/common/extensionDevOptions","vs/workbench/api/browser/mainThreadWebviews","vs/workbench/contrib/notebook/browser/viewModel/markupCellViewModel","vs/workbench/contrib/terminal/browser/terminalEditorInput","vs/workbench/services/preferences/common/preferencesModels","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/mergeEditor/browser/mergeEditorInput","vs/workbench/contrib/snippets/browser/tabCompletion","vs/workbench/contrib/codeEditor/browser/simpleEditorOptions","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/uint","vs/base/browser/ui/codicons/codiconStyles","vs/css!vs/base/parts/quickinput/browser/media/quickInput","vs/css!vs/workbench/contrib/searchEditor/browser/media/searchEditor","vs/editor/browser/stableEditorScroll","vs/editor/common/core/textModelDefaults","vs/editor/common/diff/algorithms/diffAlgorithm","vs/base/common/scrollable","vs/base/browser/ui/tree/objectTreeModel","vs/base/browser/ui/findinput/findInput","vs/base/browser/ui/tree/asyncDataTree","vs/editor/browser/config/tabFocus","vs/editor/common/config/editorZoom","vs/editor/common/cursor/cursorWordOperations","vs/editor/common/languageFeatureRegistry","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/ast","vs/editor/contrib/gotoSymbol/browser/link/clickLinkGesture","vs/editor/contrib/inlineCompletions/browser/ghostText","vs/editor/common/services/markerDecorations","vs/platform/keybinding/common/resolvedKeybindingItem","vs/platform/log/common/logIpc","vs/platform/markers/common/markerService","vs/platform/policy/common/policy","vs/platform/profiling/common/profiling","vs/editor/browser/dnd","vs/platform/extensionManagement/common/extensionsProfileScannerService","vs/platform/sign/common/sign","vs/platform/terminal/common/terminalEnvironment","vs/platform/terminal/common/terminalStrings","vs/editor/contrib/clipboard/browser/clipboard","vs/platform/terminal/common/terminalProfiles","vs/editor/contrib/find/browser/findWidget","vs/editor/contrib/folding/browser/folding","vs/editor/contrib/zoneWidget/browser/zoneWidget","vs/platform/userDataSync/common/content","vs/platform/userDataSync/common/userDataSyncAccount","vs/editor/contrib/codelens/browser/codelensController","vs/workbench/browser/parts/editor/breadcrumbs","vs/workbench/browser/parts/notifications/notificationsCommands","vs/workbench/browser/style","vs/workbench/contrib/comments/browser/commentColors","vs/workbench/contrib/comments/browser/commentsTreeViewer","vs/workbench/contrib/debug/browser/debugColors","vs/workbench/contrib/editSessions/common/editSessions","vs/workbench/contrib/extensions/common/extensionsInput","vs/workbench/contrib/extensions/common/runtimeExtensionsInput","vs/workbench/contrib/externalUriOpener/common/configuration","vs/workbench/contrib/localization/common/locale","vs/workbench/contrib/markers/browser/markersModel","vs/workbench/contrib/mergeEditor/browser/view/colors","vs/workbench/contrib/notebook/browser/notebookViewEvents","vs/workbench/contrib/notebook/common/model/notebookCellTextModel","vs/workbench/api/browser/mainThreadNotebookDto","vs/workbench/contrib/notebook/browser/controller/cellOperations","vs/workbench/contrib/notebook/browser/diff/diffElementViewModel","vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions","vs/workbench/contrib/tags/common/workspaceTags","vs/workbench/contrib/testing/common/testExplorerFilterState","vs/workbench/contrib/testing/common/testingPeekOpener","vs/workbench/services/banner/browser/bannerService","vs/workbench/contrib/debug/common/debugSource","vs/workbench/services/environment/electron-sandbox/shellEnvironmentService","vs/workbench/services/extensions/common/extensionHostProtocol","vs/workbench/services/integrity/common/integrity","vs/workbench/services/issue/common/issue","vs/workbench/services/languageStatus/common/languageStatusService","vs/workbench/contrib/webviewPanel/browser/webviewEditor","vs/workbench/contrib/codeEditor/browser/toggleWordWrap","vs/workbench/contrib/notebook/browser/viewModel/codeCellViewModel","vs/workbench/contrib/logs/common/logLevelService","vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService","vs/workbench/contrib/quickaccess/browser/commandsQuickAccess","vs/workbench/contrib/debug/browser/breakpointsView","vs/workbench/contrib/experiments/common/experimentService","vs/workbench/contrib/searchEditor/browser/searchEditorSerialization","vs/workbench/services/title/common/titleService","vs/workbench/contrib/notebook/browser/notebookEditorWidget","vs/workbench/services/views/browser/treeViewsService","vs/workbench/browser/parts/editor/textEditor","vs/workbench/contrib/mergeEditor/browser/view/mergeEditor","vs/workbench/browser/actions/layoutActions","vs/workbench/browser/parts/views/treeView","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/observableImpl/base","vs/editor/common/diff/linesDiffComputer","vs/editor/common/model/utils","vs/editor/common/textModelGuides","vs/editor/browser/viewParts/glyphMargin/glyphMargin","vs/editor/common/viewEvents","vs/editor/contrib/inlineCompletions/browser/consts","vs/editor/contrib/inlineCompletions/browser/utils","vs/base/common/cache","vs/base/browser/hash","vs/base/browser/ui/tree/indexTreeModel","vs/base/browser/ui/scrollbar/scrollbarArrow","vs/base/browser/ui/hover/hoverWidget","vs/base/browser/ui/grid/grid","vs/base/browser/ui/menu/menu","vs/base/browser/ui/tree/objectTree","vs/base/browser/defaultWorkerFactory","vs/base/parts/ipc/electron-sandbox/ipc.mp","vs/base/parts/storage/common/storage","vs/editor/browser/controller/textAreaInput","vs/editor/common/core/indentation","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/bracketPairsTextModelPart/bracketPairsTree/tokenizer","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer","vs/editor/common/languages/nullTokenize","vs/editor/common/viewModelEventDispatcher","vs/editor/contrib/inlayHints/browser/inlayHints","vs/editor/contrib/inlineCompletions/browser/inlineCompletionToGhostText","vs/platform/action/common/action","vs/editor/contrib/parameterHints/browser/provideSignatureHelp","vs/platform/diagnostics/common/diagnostics","vs/platform/files/common/watcher","vs/platform/issue/electron-sandbox/issue","vs/platform/keybinding/common/baseResolvedKeybinding","vs/platform/keyboardLayout/common/keyboardLayout","vs/editor/browser/services/editorWorkerService","vs/editor/common/languages/autoIndent","vs/editor/common/languages/enterAction","vs/editor/common/commands/shiftCommand","vs/editor/common/cursor/cursorTypeOperations","vs/platform/remote/common/remoteAgentConnection","vs/platform/terminal/common/capabilities/terminalCapabilityStore","vs/platform/terminal/electron-sandbox/terminal","vs/editor/contrib/symbolIcons/browser/symbolIcons","vs/editor/contrib/gotoSymbol/browser/goToSymbol","vs/editor/contrib/hover/browser/markdownHoverParticipant","vs/platform/terminal/common/terminalPlatformConfiguration","vs/editor/common/services/modelService","vs/editor/contrib/colorPicker/browser/colorDetector","vs/platform/workspace/common/editSessions","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/platform/extensionManagement/common/extensionEnablementService","vs/platform/userDataSync/common/userDataSyncMachines","vs/workbench/browser/actions","vs/workbench/browser/parts/views/viewFilter","vs/workbench/common/editor/binaryEditorModel","vs/workbench/common/component","vs/workbench/browser/parts/notifications/notificationsActions","vs/workbench/common/webview","vs/workbench/contrib/callHierarchy/common/callHierarchy","vs/workbench/contrib/comments/common/commentContextKeys","vs/workbench/contrib/debug/browser/callStackEditorContribution","vs/workbench/contrib/extensions/common/extensionQuery","vs/workbench/contrib/interactive/browser/interactiveDocumentService","vs/workbench/contrib/localHistory/browser/localHistory","vs/workbench/contrib/markdown/browser/markdownDocumentRenderer","vs/workbench/contrib/markers/browser/markersFilterOptions","vs/workbench/contrib/markers/browser/markersViewActions","vs/workbench/contrib/mergeEditor/browser/model/editing","vs/workbench/contrib/mergeEditor/browser/view/editorGutter","vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView","vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview","vs/workbench/contrib/notebook/common/notebookRendererMessagingService","vs/workbench/contrib/interactive/browser/interactiveEditorInput","vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget","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/terminalStatusList","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/webview/browser/webviewWindowDragMonitor","vs/workbench/contrib/webviewView/browser/webviewViewService","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput","vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughInput","vs/workbench/services/editor/browser/editorDropService","vs/workbench/browser/parts/editor/editorQuickAccess","vs/workbench/browser/parts/editor/sideBySideEditor","vs/workbench/common/editor/editorGroupModel","vs/workbench/contrib/notebook/browser/notebookEditor","vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions","vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets","vs/workbench/contrib/terminal/browser/terminalMenus","vs/workbench/services/editor/common/editorGroupFinder","vs/workbench/contrib/terminal/common/terminalExtensionPoints","vs/workbench/api/browser/mainThreadBulkEdits","vs/workbench/services/files/common/files","vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor","vs/workbench/common/actions","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/services/preferences/common/preferencesEditorInput","vs/workbench/services/progress/browser/progressIndicator","vs/workbench/contrib/terminal/common/history","vs/workbench/services/extensions/common/workspaceContains","vs/workbench/contrib/debug/browser/variablesView","vs/workbench/contrib/debug/browser/debugActionViewItems","vs/workbench/contrib/debug/browser/debugToolBar","vs/workbench/contrib/scm/browser/dirtydiffDecorator","vs/workbench/contrib/url/browser/trustedDomains","vs/workbench/services/themes/common/colorThemeSchema","vs/workbench/services/themes/common/productIconThemeSchema","vs/workbench/contrib/preferences/browser/settingsTreeModels","vs/workbench/contrib/codeEditor/browser/suggestEnabledInput/suggestEnabledInput","vs/workbench/contrib/comments/browser/simpleCommentEditor","vs/workbench/contrib/comments/browser/commentReply","vs/workbench/browser/parts/editor/binaryEditor","vs/workbench/browser/parts/editor/textCodeEditor","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/panel/panelPart","vs/workbench/contrib/extensions/browser/extensionsList","vs/base/browser/ui/scrollbar/scrollbarState","vs/base/common/observableImpl/autorun","vs/base/common/observableImpl/derived","vs/base/common/parsers","vs/base/common/ports","vs/base/parts/request/common/request","vs/css!vs/base/browser/ui/actionbar/actionbar","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/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/migrateOptions","vs/editor/browser/view/viewUserInputEvents","vs/editor/browser/viewParts/minimap/minimapCharSheet","vs/editor/common/core/rgba","vs/editor/common/languages/linkComputer","vs/editor/common/model/intervalTree","vs/editor/common/model/textModelPart","vs/editor/common/modelLineProjectionData","vs/editor/common/standalone/standaloneEnums","vs/editor/common/tokens/contiguousTokensEditing","vs/editor/common/tokens/contiguousMultilineTokensBuilder","vs/editor/browser/viewParts/margin/margin","vs/editor/common/viewModel/overviewZoneManager","vs/editor/contrib/comment/browser/blockCommentCommand","vs/editor/contrib/folding/browser/syntaxRangeProvider","vs/editor/contrib/format/browser/formattingEdit","vs/editor/contrib/indentation/browser/indentUtils","vs/editor/contrib/smartSelect/browser/bracketSelections","vs/editor/contrib/suggest/browser/wordDistance","vs/base/common/processes","vs/base/common/observableValue","vs/base/common/paging","vs/base/common/search","vs/base/common/console","vs/base/browser/dompurify/dompurify","vs/base/browser/ui/contextview/contextview","vs/base/browser/ui/resizable/resizable","vs/base/browser/ui/scrollbar/abstractScrollbar","vs/base/browser/ui/list/listPaging","vs/base/browser/ui/grid/gridview","vs/base/browser/ui/splitview/paneview","vs/base/browser/ui/table/tableWidget","vs/base/browser/ui/findinput/findInputToggles","vs/base/browser/ui/tree/dataTree","vs/base/browser/ui/dialog/dialog","vs/base/common/uriIpc","vs/base/parts/ipc/common/ipc.mp","vs/base/parts/quickinput/browser/quickInputUtils","vs/base/parts/quickinput/common/quickInput","vs/editor/browser/config/elementSizeObserver","vs/editor/browser/controller/textAreaState","vs/editor/browser/widget/diffNavigator","vs/editor/common/commands/trimTrailingWhitespaceCommand","vs/editor/common/core/textChange","vs/editor/common/cursor/cursorAtomicMoveOperations","vs/editor/common/diff/smartLinesDiffComputer","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/beforeEditPositionMapper","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/parser","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/brackets","vs/editor/common/model/guidesTextModelPart","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeBase","vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBufferBuilder","vs/editor/common/services/semanticTokensDto","vs/editor/common/services/unicodeTextModelHighlighter","vs/editor/common/viewModel/minimapTokensColorTracker","vs/editor/contrib/find/browser/replacePattern","vs/editor/contrib/hover/browser/hoverOperation","vs/editor/contrib/suggest/browser/completionModel","vs/editor/common/viewModel/viewModelDecorations","vs/platform/environment/common/environmentService","vs/platform/extensionManagement/common/configRemotes","vs/platform/extensionManagement/common/extensionNls","vs/platform/extensions/common/extensionValidator","vs/editor/browser/widget/workerBasedDocumentDiffProvider","vs/platform/checksum/common/checksumService","vs/editor/common/services/getSemanticTokens","vs/editor/contrib/codelens/browser/codelens","vs/editor/contrib/colorPicker/browser/color","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/instantiation/common/instantiationService","vs/platform/layout/browser/zIndexRegistry","vs/editor/contrib/gotoError/browser/markerNavigationService","vs/platform/menubar/electron-sandbox/menubar","vs/editor/browser/services/webWorker","vs/editor/common/cursor/cursor","vs/editor/contrib/suggest/browser/suggestWidgetDetails","vs/platform/configuration/common/configurations","vs/platform/quickinput/browser/helpQuickAccess","vs/platform/remote/common/sharedProcessTunnelService","vs/platform/remoteTunnel/common/remoteTunnel","vs/platform/telemetry/common/commonProperties","vs/platform/profiling/electron-sandbox/profileAnalysisWorkerService","vs/editor/browser/viewParts/lines/viewLine","vs/editor/browser/controller/mouseTarget","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/codeAction/browser/codeActionWidget","vs/editor/contrib/hover/browser/getHover","vs/editor/contrib/indentation/browser/indentation","vs/editor/contrib/linesOperations/browser/linesOperations","vs/editor/contrib/codeAction/browser/codeActionCommands","vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode","vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators","vs/editor/contrib/wordOperations/browser/wordOperations","vs/platform/quickinput/browser/quickPickPin","vs/editor/contrib/dnd/browser/dnd","vs/editor/contrib/find/browser/findDecorations","vs/editor/contrib/links/browser/links","vs/platform/userDataSync/common/userDataSyncIpc","vs/platform/window/electron-sandbox/window","vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution","vs/editor/contrib/snippet/browser/snippetVariables","vs/editor/contrib/snippet/browser/snippetSession","vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel","vs/platform/extensionManagement/common/extensionsScannerService","vs/editor/contrib/multicursor/browser/multicursor","vs/editor/contrib/suggest/browser/suggestMemory","vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition","vs/editor/contrib/inlayHints/browser/inlayHintsLocations","vs/platform/quickinput/browser/commandsQuickAccess","vs/platform/userDataSync/common/userDataSyncProfilesStorageService","vs/platform/userDataSync/common/extensionsSync","vs/platform/userDataSync/common/globalStateSync","vs/workbench/api/common/shared/dataTransferCache","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/commentFormActions","vs/workbench/contrib/comments/browser/commentGlyphWidget","vs/workbench/contrib/comments/browser/comments","vs/workbench/contrib/comments/browser/commentsFilterOptions","vs/workbench/contrib/comments/common/commentModel","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/mergeEditor/browser/model/rangeUtils","vs/workbench/contrib/mergeEditor/browser/model/modifiedBaseRange","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/notebookProvider","vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/notebookVisibleCellObserver","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/scm/browser/scmViewService","vs/workbench/contrib/search/browser/patternInputWidget","vs/workbench/contrib/snippets/browser/snippetPicker","vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet","vs/workbench/contrib/snippets/browser/snippetCompletionProvider","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/terminalQuickFixBuiltinActions","vs/workbench/contrib/terminal/browser/terminalTooltip","vs/workbench/contrib/terminal/common/environmentVariableCollection","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/update/common/update","vs/workbench/contrib/url/common/urlGlob","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/contrib/debug/common/debugContentProvider","vs/workbench/contrib/notebook/browser/contrib/navigation/arrow","vs/workbench/contrib/notebook/browser/controller/foldingController","vs/workbench/contrib/search/browser/symbolsQuickAccess","vs/workbench/contrib/terminal/browser/terminalQuickAccess","vs/workbench/services/encryption/common/encryptionService","vs/workbench/contrib/webview/browser/webviewElement","vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions","vs/workbench/services/extensions/common/extensionHostEnv","vs/workbench/api/common/extHostTypeConverters","vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor","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/taskQuickPick","vs/workbench/contrib/tasks/browser/tasksQuickAccess","vs/workbench/contrib/tasks/common/taskConfiguration","vs/workbench/contrib/tasks/browser/terminalTaskSystem","vs/workbench/services/actions/common/menusExtensionPoint","vs/workbench/api/browser/mainThreadEditor","vs/workbench/services/extensions/electron-sandbox/extensionHostProfiler","vs/workbench/contrib/terminal/browser/xterm/decorationStyles","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/common/notebookDiffEditorInput","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/contrib/output/common/outputChannelModelService","vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost","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/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/tags/electron-sandbox/workspaceTags","vs/workbench/contrib/tasks/browser/abstractTaskService","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/contrib/preferences/browser/settingsTree","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/notebookDiffEditor","vs/workbench/contrib/userDataProfile/browser/userDataProfileActions","vs/workbench/services/keybinding/common/keybindingEditing","vs/workbench/services/userData/browser/userDataInit","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/api/browser/mainThreadEditors","vs/workbench/browser/parts/editor/editorPlaceholder","vs/workbench/browser/parts/editor/binaryDiffEditor","vs/workbench/browser/parts/editor/editorStatus","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/electron-sandbox/window","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/common/observableImpl/utils","vs/base/browser/ui/list/rangeMap","vs/base/common/skipList","vs/base/parts/contextmenu/common/contextmenu","vs/base/parts/ipc/common/ipc.electron","vs/base/parts/request/browser/request","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/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/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/blockDecorations/blockDecorations","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/codeActionWidget","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/stickyScroll/browser/stickyScroll","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/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/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/mergeEditor/browser/view/media/mergeEditor","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/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/charWidthReader","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/algorithms/joinSequenceDiffs","vs/editor/common/diff/algorithms/myersDiffAlgorithm","vs/editor/common/diff/algorithms/utils","vs/editor/common/diff/algorithms/dynamicProgrammingDiffing","vs/editor/common/diff/standardLinesDiffComputer","vs/editor/common/editorAction","vs/editor/common/editorTheme","vs/editor/common/languages/supports/characterPair","vs/editor/common/languages/supports/indentRules","vs/editor/common/languages/supports/inplaceReplaceSupport","vs/editor/common/model/indentationGuesser","vs/editor/common/model/pieceTreeTextBuffer/rbTreeBase","vs/editor/common/textModelBracketPairs","vs/editor/common/tokens/contiguousMultilineTokens","vs/editor/common/tokens/contiguousTokensStore","vs/editor/common/tokens/sparseMultilineTokens","vs/editor/common/tokens/sparseTokensStore","vs/editor/browser/viewParts/blockDecorations/blockDecorations","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/linePart","vs/editor/common/viewLayout/viewLinesViewportData","vs/editor/browser/viewParts/overviewRuler/overviewRuler","vs/editor/common/viewModel/viewContext","vs/editor/contrib/caretOperations/browser/moveCaretCommand","vs/editor/contrib/dnd/browser/dragAndDropCommand","vs/editor/contrib/find/browser/replaceAllCommand","vs/editor/contrib/folding/browser/indentRangeProvider","vs/editor/contrib/inPlaceReplace/browser/inPlaceReplaceCommand","vs/editor/contrib/linesOperations/browser/copyLinesCommand","vs/editor/contrib/linesOperations/browser/sortLinesCommand","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/button/button","vs/nls!vs/base/browser/ui/dialog/dialog","vs/nls!vs/base/browser/ui/dropdown/dropdownActionViewItem","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/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/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/common/platform","vs/base/browser/ui/tree/treeDefaults","vs/base/common/sequence","vs/base/browser/ui/dropdown/dropdown","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/browser/ui/breadcrumbs/breadcrumbsWidget","vs/base/browser/ui/centered/centeredViewLayout","vs/base/browser/ui/selectBox/selectBoxCustom","vs/base/browser/ui/menu/menubar","vs/base/browser/ui/findinput/replaceInput","vs/base/common/resourceTree","vs/base/parts/ipc/node/ipc.net","vs/base/parts/quickinput/browser/quickInputBox","vs/base/parts/contextmenu/electron-sandbox/contextmenu","vs/base/parts/ipc/electron-sandbox/ipc.electron","vs/editor/browser/viewParts/contentWidgets/contentWidgets","vs/editor/browser/view/domLineBreaksComputer","vs/editor/browser/view/viewOverlays","vs/editor/common/cursor/cursorColumnSelection","vs/editor/common/cursor/oneCursor","vs/editor/common/cursor/cursorCollection","vs/editor/common/diff/linesDiffComputers","vs/editor/common/languageSelector","vs/editor/common/languages/supports/languageBracketsConfiguration","vs/editor/common/languages/supports/onEnter","vs/editor/common/languages/supports/electricCharacter","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/concat23Trees","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/nodeReader","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsTree/bracketPairsTree","vs/editor/common/model/bracketPairsTextModelPart/bracketPairsImpl","vs/editor/common/model/bracketPairsTextModelPart/fixBrackets","vs/editor/common/model/mirrorTextModel","vs/editor/common/tokenizationRegistry","vs/editor/common/model/textModelTokens","vs/editor/common/model/tokenizationTextModelPart","vs/editor/common/services/editorBaseApi","vs/editor/common/services/editorSimpleWorker","vs/editor/common/viewLayout/linesLayout","vs/editor/common/viewModel/modelLineProjection","vs/editor/common/viewModel/monospaceLineBreaksComputer","vs/editor/common/viewLayout/viewLayout","vs/editor/contrib/colorPicker/browser/colorPickerModel","vs/editor/contrib/comment/browser/lineCommentCommand","vs/editor/contrib/folding/browser/foldingModel","vs/editor/contrib/folding/browser/hiddenRangeModel","vs/editor/contrib/smartSelect/browser/wordSelections","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/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/common/viewLayout/viewLineRenderer","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/codeAction","vs/nls!vs/editor/contrib/codeAction/browser/codeActionCommands","vs/nls!vs/editor/contrib/codeAction/browser/codeActionContributions","vs/nls!vs/editor/contrib/codeAction/browser/codeActionWidget","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/copyPaste/browser/copyPasteContribution","vs/nls!vs/editor/contrib/copyPaste/browser/copyPasteController","vs/nls!vs/editor/contrib/cursorUndo/browser/cursorUndo","vs/nls!vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution","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/readOnlyMessage/browser/contribution","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/stickyScroll/browser/stickyScrollActions","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/action/common/actionCommonCategories","vs/nls!vs/platform/actions/browser/menuEntryActionViewItem","vs/nls!vs/platform/actions/browser/toolbar","vs/nls!vs/platform/actions/common/menuResetAction","vs/nls!vs/platform/actions/common/menuService","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/dnd/browser/dnd","vs/nls!vs/platform/extensionManagement/common/extensionManagement","vs/nls!vs/platform/extensionManagement/common/extensionManagementCLI","vs/nls!vs/platform/extensionManagement/common/extensionNls","vs/nls!vs/platform/extensionManagement/common/extensionsScannerService","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/languagePacks/common/languagePacks","vs/nls!vs/platform/languagePacks/common/localizedStrings","vs/nls!vs/platform/list/browser/listService","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/quickinput/browser/quickPickPin","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/terminal/common/terminalProfiles","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/userDataProfile/common/userDataProfile","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/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/editorDropTarget","vs/nls!vs/workbench/browser/parts/editor/editorGroupView","vs/nls!vs/workbench/browser/parts/editor/editorPanes","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/textCodeEditor","vs/nls!vs/workbench/browser/parts/editor/textDiffEditor","vs/nls!vs/workbench/browser/parts/editor/textEditor","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/statusbarModel","vs/nls!vs/workbench/browser/parts/statusbar/statusbarPart","vs/nls!vs/workbench/browser/parts/titlebar/commandCenterControl","vs/nls!vs/workbench/browser/parts/titlebar/menubarControl","vs/nls!vs/workbench/browser/parts/titlebar/titlebarPart","vs/nls!vs/workbench/browser/parts/titlebar/windowTitle","vs/nls!vs/workbench/browser/parts/views/checkbox","vs/nls!vs/workbench/browser/parts/views/treeView","vs/nls!vs/workbench/browser/parts/views/viewFilter","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/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/commentsViewActions","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/baseDebugView","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/debugConsoleQuickAccess","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/debugSessionPicker","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/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/loadedScriptsPicker","vs/nls!vs/workbench/contrib/debug/common/replModel","vs/nls!vs/workbench/contrib/deprecatedExtensionMigrator/browser/deprecatedExtensionMigrator.contribution","vs/nls!vs/workbench/contrib/editSessions/browser/editSessions.contribution","vs/nls!vs/workbench/contrib/editSessions/browser/editSessionsStorageService","vs/nls!vs/workbench/contrib/editSessions/browser/editSessionsViews","vs/nls!vs/workbench/contrib/editSessions/common/editSessions","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/reportExtensionIssueAction","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/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/folding/browser/folding.contribution","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/languageDetection/browser/languageDetection.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/localization/browser/localizationsActions","vs/nls!vs/workbench/contrib/localization/electron-sandbox/localeService","vs/nls!vs/workbench/contrib/localization/electron-sandbox/localization.contribution","vs/nls!vs/workbench/contrib/localization/electron-sandbox/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/logs.contribution","vs/nls!vs/workbench/contrib/logs/electron-sandbox/logsActions","vs/nls!vs/workbench/contrib/markers/browser/markers.contribution","vs/nls!vs/workbench/contrib/markers/browser/markersFileDecorations","vs/nls!vs/workbench/contrib/markers/browser/markersTable","vs/nls!vs/workbench/contrib/markers/browser/markersTreeViewer","vs/nls!vs/workbench/contrib/markers/browser/markersView","vs/nls!vs/workbench/contrib/markers/browser/messages","vs/nls!vs/workbench/contrib/mergeEditor/browser/commands/commands","vs/nls!vs/workbench/contrib/mergeEditor/browser/commands/devCommands","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeEditorInput","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel","vs/nls!vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/colors","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/conflictActions","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/mergeEditor","vs/nls!vs/workbench/contrib/mergeEditor/browser/view/viewModel","vs/nls!vs/workbench/contrib/mergeEditor/common/mergeEditor","vs/nls!vs/workbench/contrib/mergeEditor/electron-sandbox/devCommands","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/notebookFind","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/nls!vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget","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/contrib/troubleshoot/layout","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/notebookDiffEditor","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/notebookExtensionPoint","vs/nls!vs/workbench/contrib/notebook/browser/notebookIcons","vs/nls!vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl","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/markupCell","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/performance.contribution","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/settingsEditorSettingIndicators","vs/nls!vs/workbench/contrib/preferences/browser/settingsLayout","vs/nls!vs/workbench/contrib/preferences/browser/settingsSearchMenu","vs/nls!vs/workbench/contrib/preferences/browser/settingsTree","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/remoteTunnel/electron-sandbox/remoteTunnel.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/commands/abstractSnippetsActions","vs/nls!vs/workbench/contrib/snippets/browser/commands/configureSnippets","vs/nls!vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets","vs/nls!vs/workbench/contrib/snippets/browser/commands/insertSnippet","vs/nls!vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet","vs/nls!vs/workbench/contrib/snippets/browser/snippetCodeActionProvider","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/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/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/terminalMainContribution","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/terminalQuickFixBuiltinActions","vs/nls!vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick","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/decorationStyles","vs/nls!vs/workbench/contrib/terminal/browser/xterm/quickFixAddon","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/userDataProfile/browser/userDataProfile","vs/nls!vs/workbench/contrib/userDataProfile/browser/userDataProfileActions","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSync.contribution","vs/nls!vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView","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/webviewEditor","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/desktop.main","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/configurationEditing","vs/nls!vs/workbench/services/configuration/common/jsonEditingService","vs/nls!vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService","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/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/extensionsRegistry","vs/nls!vs/workbench/services/extensions/common/extensionsUtil","vs/nls!vs/workbench/services/extensions/common/remoteExtensionHost","vs/nls!vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner","vs/nls!vs/workbench/services/extensions/electron-sandbox/electronExtensionService","vs/nls!vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost","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/textFileEditorModel","vs/nls!vs/workbench/services/textfile/common/textFileEditorModelManager","vs/nls!vs/workbench/services/textfile/common/textFileSaveParticipant","vs/nls!vs/workbench/services/textfile/electron-sandbox/nativeTextFileService","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/userDataProfile/browser/userDataProfileManagement","vs/nls!vs/workbench/services/userDataProfile/common/userDataProfile","vs/nls!vs/workbench/services/userDataProfile/common/userDataProfileImportExportService","vs/nls!vs/workbench/services/userDataProfile/common/userDataProfileService","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/views/common/viewContainerModel","vs/nls!vs/workbench/services/workingCopy/common/fileWorkingCopyManager","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopy","vs/nls!vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager","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/workingCopyBackupService","vs/nls!vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker","vs/nls!vs/workbench/services/workingCopy/electron-sandbox/workingCopyHistoryService","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/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/parameterHints/browser/parameterHintsModel","vs/editor/contrib/suggest/browser/suggestAlternatives","vs/editor/contrib/suggest/browser/wordContextKey","vs/editor/browser/config/editorConfiguration","vs/platform/files/browser/htmlFileSystemProvider","vs/platform/files/common/io","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/languagePacks/common/localizedStrings","vs/platform/driver/browser/driver","vs/platform/driver/electron-sandbox/driver","vs/platform/accessibility/browser/accessibilityService","vs/platform/contextview/browser/contextViewService","vs/platform/lifecycle/common/lifecycle","vs/platform/files/common/diskFileSystemProvider","vs/platform/files/common/fileService","vs/platform/native/electron-sandbox/nativeHostService","vs/editor/browser/services/openerService","vs/editor/contrib/documentSymbols/browser/documentSymbols","vs/platform/policy/common/policyIpc","vs/platform/profiling/common/profilingTelemetrySpec","vs/platform/profiling/electron-sandbox/profilingService","vs/editor/common/services/languagesRegistry","vs/editor/common/services/languageService","vs/editor/contrib/linesOperations/browser/moveLinesCommand","vs/editor/contrib/hover/browser/marginHover","vs/platform/quickinput/browser/quickAccess","vs/platform/remote/browser/browserSocketFactory","vs/platform/extensionManagement/common/extensionManagementCLI","vs/platform/extensionManagement/common/unsupportedExtensionsMigration","vs/platform/remote/electron-sandbox/remoteAuthorityResolverService","vs/platform/remote/electron-sandbox/sharedProcessTunnelService","vs/platform/remoteTunnel/electron-sandbox/remoteTunnelService","vs/platform/request/browser/requestService","vs/platform/download/common/downloadService","vs/platform/extensionManagement/common/extensionTipsService","vs/platform/sharedProcess/common/sharedProcessWorkerService","vs/platform/storage/common/storageIpc","vs/platform/telemetry/common/errorTelemetry","vs/platform/telemetry/browser/errorTelemetry","vs/platform/contextkey/browser/contextKeyService","vs/platform/telemetry/common/telemetryIpc","vs/platform/assignment/common/assignmentService","vs/platform/externalServices/common/marketplace","vs/platform/telemetry/common/telemetryService","vs/platform/telemetry/electron-sandbox/customEndpointTelemetryService","vs/platform/terminal/common/capabilities/bufferMarkCapability","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/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/services/abstractCodeEditorService","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/codeActionKeybindingResolver","vs/editor/contrib/codeAction/browser/codeActionModel","vs/editor/contrib/copyPaste/browser/copyPasteController","vs/editor/contrib/copyPaste/browser/copyPasteContribution","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/longLinesHelper/browser/longLinesHelper","vs/editor/contrib/codeAction/browser/codeActionUi","vs/editor/contrib/codeAction/browser/codeActionContributions","vs/editor/contrib/readOnlyMessage/browser/contribution","vs/editor/contrib/rename/browser/rename","vs/editor/contrib/smartSelect/browser/smartSelect","vs/editor/contrib/stickyScroll/browser/stickyScrollActions","vs/editor/contrib/tokenization/browser/tokenization","vs/editor/contrib/wordPartOperations/browser/wordPartOperations","vs/platform/actions/common/menuResetAction","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/colorPicker/browser/colorHoverParticipant","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/stickyScroll/browser/stickyScrollProvider","vs/editor/contrib/viewportSemanticTokens/browser/viewportSemanticTokens","vs/editor/contrib/wordHighlighter/browser/wordHighlighter","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/userDataSyncLog","vs/platform/webview/common/mimeTypes","vs/platform/webview/common/webviewPortMapping","vs/editor/contrib/suggest/browser/suggestModel","vs/platform/extensionManagement/electron-sandbox/extensionsScannerService","vs/editor/contrib/codelens/browser/codeLensCache","vs/editor/contrib/suggest/browser/suggestInlineCompletions","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/inlayHintsHover","vs/editor/contrib/inlayHints/browser/inlayHintsContribution","vs/editor/contrib/stickyScroll/browser/stickyScrollWidget","vs/editor/contrib/stickyScroll/browser/stickyScrollController","vs/editor/contrib/stickyScroll/browser/stickyScrollContribution","vs/editor/contrib/suggest/browser/suggestWidgetStatus","vs/editor/contrib/suggest/browser/suggestWidget","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/platform/actions/common/menuService","vs/platform/actions/common/actions.contribution","vs/platform/contextview/browser/contextMenuService","vs/platform/extensionManagement/common/extensionGalleryService","vs/platform/extensionResourceLoader/electron-sandbox/extensionResourceLoaderService","vs/editor/contrib/quickAccess/browser/commandsQuickAccess","vs/platform/storage/electron-sandbox/storageService","vs/platform/userDataProfile/electron-sandbox/userDataProfile","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/userDataSyncServiceIpc","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/helpActions","vs/workbench/browser/actions/listCommands","vs/workbench/browser/parts/dialogs/dialogHandler","vs/workbench/browser/parts/notifications/notificationsAlerts","vs/workbench/browser/parts/views/checkbox","vs/workbench/browser/actions/quickAccessActions","vs/workbench/common/dialogs","vs/workbench/browser/parts/notifications/notificationsViewer","vs/workbench/browser/parts/titlebar/commandCenterControl","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/editorSettingsMigration","vs/workbench/contrib/codeEditor/browser/largeFileOptimizations","vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree","vs/workbench/contrib/codeEditor/browser/toggleColumnSelection","vs/workbench/contrib/codeEditor/browser/toggleMinimap","vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter","vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace","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/commentThreadRangeDecorator","vs/workbench/contrib/comments/browser/reactionsAction","vs/workbench/contrib/customEditor/common/customEditorModelManager","vs/workbench/contrib/debug/common/abstractDebugAdapter","vs/workbench/contrib/debug/common/breakpoints","vs/workbench/contrib/audioCues/browser/audioCueDebuggerContribution","vs/workbench/contrib/debug/browser/debugMemory","vs/workbench/contrib/debug/browser/debugProgress","vs/workbench/contrib/debug/browser/debugSessionPicker","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/editSessions/browser/editSessionsFileSystemProvider","vs/workbench/contrib/editSessions/common/editSessionsLogService","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/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/localization/browser/localizationsActions","vs/workbench/contrib/localization/electron-sandbox/minimalTranslations","vs/workbench/contrib/markers/browser/markersTable","vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController","vs/workbench/contrib/mergeEditor/browser/telemetry","vs/workbench/contrib/mergeEditor/browser/model/diffComputer","vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs","vs/workbench/contrib/mergeEditor/browser/model/mergeEditorModel","vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView","vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView","vs/workbench/contrib/mergeEditor/browser/view/fixedZoneWidget","vs/workbench/contrib/mergeEditor/browser/view/conflictActions","vs/workbench/contrib/mergeEditor/browser/view/lineAlignment","vs/workbench/contrib/mergeEditor/browser/view/scrollSynchronizer","vs/workbench/contrib/mergeEditor/browser/view/viewModel","vs/workbench/contrib/mergeEditor/browser/view/viewZones","vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView","vs/workbench/contrib/notebook/browser/contrib/find/findFilters","vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget","vs/workbench/contrib/notebook/browser/diff/notebookDiffOverviewRuler","vs/workbench/contrib/notebook/browser/notebookLogger","vs/workbench/contrib/notebook/browser/services/notebookCellStatusBarServiceImpl","vs/workbench/contrib/notebook/browser/view/cellParts/cellDecorations","vs/workbench/contrib/notebook/browser/view/cellParts/cellDragRenderer","vs/workbench/contrib/notebook/browser/view/cellParts/cellFocus","vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellInput","vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars","vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads","vs/workbench/contrib/notebook/browser/view/renderers/webviewThemeMapping","vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions","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/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/cellExecution","vs/workbench/contrib/notebook/browser/view/cellParts/cellProgressBar","vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon","vs/workbench/contrib/notebook/common/notebookKeymapService","vs/workbench/contrib/notebook/common/notebookOutputRenderer","vs/workbench/contrib/notebook/common/notebookPerformance","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/services/notebookExecutionStateServiceImpl","vs/workbench/contrib/notebook/browser/services/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/preferences/browser/settingsSearchMenu","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/common/scmService","vs/workbench/contrib/search/common/cacheState","vs/workbench/contrib/snippets/browser/commands/insertSnippet","vs/workbench/contrib/tags/common/javaWorkspaceTags","vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations","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/terminalEscapeSequences","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/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/markNavigationAddon","vs/workbench/contrib/terminal/common/terminalConfiguration","vs/workbench/contrib/terminal/browser/terminalFindWidget","vs/workbench/contrib/terminal/electron-sandbox/localPty","vs/workbench/contrib/testing/common/testCoverage","vs/workbench/contrib/testing/common/testExclusions","vs/workbench/contrib/testing/browser/explorerProjections/nodeHelper","vs/workbench/contrib/testing/common/mainThreadTestCollection","vs/workbench/contrib/testing/common/testItemCollection","vs/workbench/api/common/extHostTestingPrivateApi","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/overlayWebview","vs/workbench/contrib/webview/browser/webviewFindWidget","vs/workbench/contrib/webview/electron-sandbox/webviewCommands","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/actions/windowActions","vs/workbench/electron-sandbox/parts/dialogs/dialogHandler","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/configurationResolver/browser/baseConfigurationResolverService","vs/workbench/services/contextmenu/electron-sandbox/contextmenuService","vs/workbench/services/credentials/electron-sandbox/credentialsService","vs/workbench/services/decorations/browser/decorationsService","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/diffEditorHelper","vs/workbench/contrib/codeEditor/browser/inspectKeybindings","vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess","vs/workbench/contrib/debug/common/loadedScriptsPicker","vs/workbench/contrib/markers/browser/markersTreeViewer","vs/workbench/contrib/notebook/browser/contrib/find/notebookFind","vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout","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/services/notebookExecutionServiceImpl","vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint","vs/workbench/contrib/notebook/browser/view/cellParts/markupCell","vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar","vs/workbench/contrib/snippets/browser/snippetCodeActionProvider","vs/workbench/contrib/terminal/common/remoteTerminalChannel","vs/workbench/contrib/testing/browser/testingOutputPeek","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/browser/parts/titlebar/windowTitle","vs/workbench/contrib/url/browser/externalUriResolver","vs/workbench/contrib/debug/common/debugger","vs/workbench/contrib/webview/electron-sandbox/webviewElement","vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough","vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough","vs/workbench/electron-sandbox/actions/developerActions","vs/workbench/services/dialogs/common/dialogService","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/extensions/common/extensionDescriptionRegistry","vs/workbench/services/extensions/common/extensionStorageMigration","vs/workbench/api/common/extHostTypes","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/services/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/notebookExtensionPoint","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/runAutomaticTasks","vs/workbench/contrib/terminal/common/terminalExtensionPoints.contribution","vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint","vs/workbench/services/extensions/common/extensionsUtil","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/mainThreadLocalization","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/services/extensions/common/remoteConsoleUtil","vs/workbench/api/browser/mainThreadConsole","vs/workbench/services/extensions/common/rpcProtocol","vs/workbench/services/extensions/common/extensionHostManager","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/contrib/terminal/electron-sandbox/terminalRemote","vs/workbench/api/browser/mainThreadWindow","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/host/electron-sandbox/nativeHostService","vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators","vs/workbench/contrib/terminal/browser/widgets/environmentVariableInfoWidget","vs/workbench/contrib/terminal/browser/widgets/terminalHoverWidget","vs/workbench/contrib/terminal/browser/xterm/quickFixAddon","vs/workbench/services/hover/browser/hoverWidget","vs/workbench/services/hover/browser/hoverService","vs/workbench/contrib/extensions/common/reportExtensionIssueAction","vs/workbench/contrib/issue/electron-sandbox/issueActions","vs/workbench/contrib/issue/electron-sandbox/issue.contribution","vs/workbench/services/keybinding/common/keybindingIO","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/controller/editActions","vs/workbench/contrib/notebook/browser/services/notebookServiceImpl","vs/workbench/services/languageDetection/browser/languageDetectionWorkerServiceImpl","vs/workbench/api/browser/mainThreadLanguages","vs/workbench/browser/parts/banner/bannerPart","vs/workbench/browser/parts/notifications/notificationsCenter","vs/workbench/contrib/terminal/browser/terminalEditor","vs/workbench/contrib/webviewPanel/browser/webviewCommands","vs/workbench/browser/parts/notifications/notificationsToasts","vs/workbench/browser/actions/textInputActions","vs/workbench/browser/workbench.contribution","vs/workbench/contrib/bracketPairColorizer2Telemetry/browser/bracketPairColorizer2Telemetry.contribution","vs/workbench/contrib/codeActions/browser/codeActions.contribution","vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier","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/deprecatedExtensionMigrator/browser/deprecatedExtensionMigrator.contribution","vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution","vs/workbench/contrib/folding/browser/folding.contribution","vs/workbench/contrib/format/browser/formatActionsMultiple","vs/workbench/contrib/list/browser/list.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/gettingStarted/notebookGettingStarted","vs/workbench/contrib/notebook/browser/contrib/marker/markerProvider","vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile","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/browser/xterm/decorationAddon","vs/workbench/contrib/terminal/browser/xterm/xtermTerminal","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/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/integrity/electron-sandbox/integrityService","vs/workbench/services/lifecycle/common/lifecycleService","vs/workbench/services/lifecycle/electron-sandbox/lifecycleService","vs/workbench/services/localization/electron-sandbox/languagePackService","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/keybindings/browser/keybindings.contribution","vs/workbench/api/browser/mainThreadLogService","vs/workbench/contrib/logs/common/logsActions","vs/workbench/contrib/logs/common/logs.contribution","vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard","vs/workbench/contrib/output/browser/outputLinkProvider","vs/workbench/contrib/output/common/outputChannelModel","vs/workbench/contrib/output/browser/outputServices","vs/workbench/contrib/terminal/browser/terminalMainContribution","vs/workbench/services/extensions/browser/webWorkerExtensionHost","vs/workbench/services/extensions/common/remoteExtensionHost","vs/workbench/services/extensions/electron-sandbox/nativeLocalProcessExtensionHost","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/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/quickaccess/browser/quickAccess.contribution","vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.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/preferencesSearch","vs/workbench/contrib/comments/browser/commentsViewActions","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/logs/electron-sandbox/logLevelService","vs/workbench/contrib/logs/electron-sandbox/logs.contribution","vs/workbench/contrib/remote/common/remote.contribution","vs/workbench/contrib/terminal/browser/remoteTerminalBackend","vs/workbench/contrib/terminal/browser/terminalProfileResolverService","vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick","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/editSessions/browser/editSessionsStorageService","vs/workbench/contrib/debug/browser/exceptionWidget","vs/workbench/contrib/terminal/browser/terminalProcessManager","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/ignoreFile","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/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/languageDetection/browser/languageDetection.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/storage/electron-sandbox/storageService","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/disassemblyView","vs/workbench/contrib/debug/common/debugStorage","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/debugConsoleQuickAccess","vs/workbench/contrib/debug/browser/debugQuickAccess","vs/workbench/contrib/debug/browser/debugTaskRunner","vs/workbench/contrib/debug/browser/debugService","vs/workbench/contrib/debug/browser/callStackView","vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution","vs/workbench/contrib/localization/electron-sandbox/localeService","vs/workbench/contrib/localization/electron-sandbox/localization.contribution","vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel","vs/workbench/contrib/mergeEditor/browser/mergeEditorSerializer","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/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/terminal/browser/terminalTabsList","vs/workbench/contrib/terminal/browser/terminalTabbedView","vs/workbench/contrib/url/browser/trustedDomainsFileSystemProvider","vs/workbench/contrib/url/browser/trustedDomainsValidator","vs/workbench/contrib/url/browser/url.contribution","vs/workbench/contrib/workspaces/browser/workspaces.contribution","vs/workbench/services/configuration/common/jsonEditingService","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/themes/browser/themes.test.contribution","vs/workbench/contrib/webview/browser/themeing","vs/workbench/contrib/webview/browser/webviewService","vs/workbench/contrib/webview/electron-sandbox/webviewService","vs/workbench/contrib/webview/electron-sandbox/webview.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/extensions/electron-sandbox/extensionsAutoProfiler","vs/workbench/contrib/performance/browser/performance.contribution","vs/workbench/contrib/performance/electron-sandbox/rendererAutoProfiler","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/services/update/electron-sandbox/updateService","vs/workbench/services/url/electron-sandbox/urlService","vs/workbench/services/userDataProfile/common/extensionsProfile","vs/workbench/contrib/preferences/browser/keybindingsEditorContribution","vs/workbench/contrib/preferences/browser/preferencesRenderers","vs/workbench/contrib/preferences/browser/preferencesEditor","vs/workbench/contrib/preferences/browser/tocTree","vs/workbench/contrib/snippets/browser/commands/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/notebookDiffList","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/services/notebookEditorServiceImpl","vs/workbench/contrib/snippets/browser/snippets.contribution","vs/workbench/contrib/telemetry/browser/telemetry.contribution","vs/workbench/contrib/testing/browser/testingExplorerFilter","vs/workbench/contrib/testing/browser/testingExplorerView","vs/workbench/contrib/userDataProfile/browser/userDataProfile","vs/workbench/contrib/userDataProfile/browser/userDataProfile.contribution","vs/workbench/services/configuration/common/configurationEditing","vs/workbench/services/configuration/browser/configurationService","vs/workbench/services/extensionManagement/electron-sandbox/nativeExtensionManagementService","vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner","vs/workbench/services/keybinding/browser/keybindingService","vs/workbench/contrib/preferences/browser/keybindingsEditor","vs/workbench/services/userDataProfile/browser/userDataProfileManagement","vs/workbench/services/userDataProfile/common/settingsProfile","vs/workbench/services/userDataProfile/common/userDataProfileService","vs/workbench/browser/parts/statusbar/statusbarModel","vs/workbench/services/userDataProfile/common/globalStateProfile","vs/workbench/services/userDataProfile/common/userDataProfileImportExportService","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/editorPanes","vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint","vs/workbench/contrib/codeEditor/browser/codeEditor.contribution","vs/workbench/contrib/files/browser/editors/binaryFileEditor","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/mergeEditor/browser/commands/commands","vs/workbench/contrib/mergeEditor/browser/commands/devCommands","vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution","vs/workbench/contrib/mergeEditor/electron-sandbox/devCommands","vs/workbench/contrib/mergeEditor/electron-sandbox/mergeEditor.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/mainThreadDocumentsAndEditors","vs/workbench/api/browser/mainThreadFileSystemEventService","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/services/workspaces/common/editSessionIdentityService","vs/workbench/api/browser/mainThreadWorkspace","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/editSessions/browser/editSessionsViews","vs/workbench/contrib/editSessions/browser/editSessions.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/testing/browser/testingViewPaneContainer","vs/workbench/contrib/testing/browser/testing.contribution","vs/workbench/contrib/timeline/browser/timeline.contribution","vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView","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/desktop.contribution","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/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/extensions/electron-sandbox/electronExtensionService","vs/workbench/services/extensions/electron-sandbox/sandboxExtensionService","vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService","vs/workbench/services/workspaces/electron-sandbox/workspacesService","vs/workbench/workbench.common.main","vs/base/common/stripComments","vs/workbench/workbench.desktop.main"],le=function(J){for(var e=[],t=0,p=J.length;t<p;t++)e[t]=ae[J[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 jc(J){if(Array.isArray(J)){for(var e=0,t=Array(J.length);e<J.length;e++)t[e]=J[e];return t}else return Array.from(J)}var Yc=Object.hasOwnProperty,Po=Object.setPrototypeOf,Xc=Object.isFrozen,Qc=Object.getPrototypeOf,Jc=Object.getOwnPropertyDescriptor,oi=Object.freeze,Ii=Object.seal,Zc=Object.create,Oo=typeof Reflect<"u"&&Reflect,Xn=Oo.apply,Kr=Oo.construct;Xn||(Xn=function(e,t,p){return e.apply(t,p)}),oi||(oi=function(e){return e}),Ii||(Ii=function(e){return e}),Kr||(Kr=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(jc(t))))});var ed=fi(Array.prototype.forEach),No=fi(Array.prototype.pop),Tn=fi(Array.prototype.push),Gi=fi(String.prototype.toLowerCase),xo=fi(String.prototype.match),Pi=fi(String.prototype.replace),td=fi(String.prototype.indexOf),id=fi(String.prototype.trim),Di=fi(RegExp.prototype.test),Fo=nd(TypeError);function fi(J){return function(e){for(var t=arguments.length,p=Array(t>1?t-1:0),R=1;R<t;R++)p[R-1]=arguments[R];return Xn(J,e,p)}}function nd(J){return function(){for(var e=arguments.length,t=Array(e),p=0;p<e;p++)t[p]=arguments[p];return Kr(J,t)}}function Kt(J,e){Po&&Po(J,null);for(var t=e.length;t--;){var p=e[t];if(typeof p=="string"){var R=Gi(p);R!==p&&(Xc(e)||(e[t]=R),p=R)}J[p]=!0}return J}function $i(J){var e=Zc(null),t=void 0;for(t in J)Xn(Yc,J,[t])&&(e[t]=J[t]);return e}function Qn(J,e){for(;J!==null;){var t=Jc(J,e);if(t){if(t.get)return fi(t.get);if(typeof t.value=="function")return fi(t.value)}J=Qc(J)}function p(R){return console.warn("fallback value for",R),null}return p}var Bo=oi(["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"]),Gr=oi(["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"]),$r=oi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rd=oi(["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"]),qr=oi(["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"]),sd=oi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vo=oi(["#text"]),Wo=oi(["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"]),jr=oi(["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"]),zo=oi(["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"]),Jn=oi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),od=Ii(/\{\{[\s\S]*|[\s\S]*\}\}/gm),ad=Ii(/<%[\s\S]*|[\s\S]*%>/gm),ld=Ii(/^data-[\-\w.\u00B7-\uFFFF]/),cd=Ii(/^aria-[\-\w]+$/),dd=Ii(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ud=Ii(/^(?:\w+script|data):/i),hd=Ii(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(J){return typeof J}:function(J){return J&&typeof Symbol=="function"&&J.constructor===Symbol&&J!==Symbol.prototype?"symbol":typeof J};function vi(J){if(Array.isArray(J)){for(var e=0,t=Array(J.length);e<J.length;e++)t[e]=J[e];return t}else return Array.from(J)}var gd=function(){return typeof window>"u"?null:window},fd=function(e,t){if((typeof e>"u"?"undefined":kn(e))!=="object"||typeof e.createPolicy!="function")return null;var p=null,R="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(R)&&(p=t.currentScript.getAttribute(R));var A="dompurify"+(p?"#"+p:"");try{return e.createPolicy(A,{createHTML:function(E){return E}})}catch{return console.warn("TrustedTypes policy "+A+" could not be created."),null}};function Uo(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gd(),e=function(je){return Uo(je)};if(e.version="2.3.1",e.removed=[],!J||!J.document||J.document.nodeType!==9)return e.isSupported=!1,e;var t=J.document,p=J.document,R=J.DocumentFragment,A=J.HTMLTemplateElement,k=J.Node,E=J.Element,I=J.NodeFilter,b=J.NamedNodeMap,S=b===void 0?J.NamedNodeMap||J.MozNamedAttrMap:b,C=J.Text,r=J.Comment,u=J.DOMParser,i=J.trustedTypes,f=E.prototype,c=Qn(f,"cloneNode"),l=Qn(f,"nextSibling"),s=Qn(f,"childNodes"),d=Qn(f,"parentNode");if(typeof A=="function"){var n=p.createElement("template");n.content&&n.content.ownerDocument&&(p=n.content.ownerDocument)}var a=fd(i,t),o=a&&re?a.createHTML(""):"",g=p,h=g.implementation,v=g.createNodeIterator,m=g.createDocumentFragment,w=g.getElementsByTagName,D=t.importNode,y={};try{y=$i(p).documentMode?p.documentMode:{}}catch{}var T={};e.isSupported=typeof d=="function"&&h&&typeof h.createHTMLDocument<"u"&&y!==9;var _=od,L=ad,M=ld,O=cd,N=ud,P=hd,B=dd,V=null,z=Kt({},[].concat(vi(Bo),vi(Gr),vi($r),vi(qr),vi(Vo))),x=null,H=Kt({},[].concat(vi(Wo),vi(jr),vi(zo),vi(Jn))),W=null,U=null,$=!0,q=!0,X=!1,G=!1,Q=!1,j=!1,K=!1,Y=!1,ee=!1,ie=!0,re=!1,oe=!0,se=!0,te=!1,Z={},ne=null,ce=Kt({},["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"]),de=null,he=Kt({},["audio","video","img","source","image","track"]),pe=null,me=Kt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Se="http://www.w3.org/1998/Math/MathML",Ie="http://www.w3.org/2000/svg",ve="http://www.w3.org/1999/xhtml",be=ve,ge=!1,ue=null,Ce=p.createElement("form"),De=function(je){ue&&ue===je||((!je||(typeof je>"u"?"undefined":kn(je))!=="object")&&(je={}),je=$i(je),V="ALLOWED_TAGS"in je?Kt({},je.ALLOWED_TAGS):z,x="ALLOWED_ATTR"in je?Kt({},je.ALLOWED_ATTR):H,pe="ADD_URI_SAFE_ATTR"in je?Kt($i(me),je.ADD_URI_SAFE_ATTR):me,de="ADD_DATA_URI_TAGS"in je?Kt($i(he),je.ADD_DATA_URI_TAGS):he,ne="FORBID_CONTENTS"in je?Kt({},je.FORBID_CONTENTS):ce,W="FORBID_TAGS"in je?Kt({},je.FORBID_TAGS):{},U="FORBID_ATTR"in je?Kt({},je.FORBID_ATTR):{},Z="USE_PROFILES"in je?je.USE_PROFILES:!1,$=je.ALLOW_ARIA_ATTR!==!1,q=je.ALLOW_DATA_ATTR!==!1,X=je.ALLOW_UNKNOWN_PROTOCOLS||!1,G=je.SAFE_FOR_TEMPLATES||!1,Q=je.WHOLE_DOCUMENT||!1,Y=je.RETURN_DOM||!1,ee=je.RETURN_DOM_FRAGMENT||!1,ie=je.RETURN_DOM_IMPORT!==!1,re=je.RETURN_TRUSTED_TYPE||!1,K=je.FORCE_BODY||!1,oe=je.SANITIZE_DOM!==!1,se=je.KEEP_CONTENT!==!1,te=je.IN_PLACE||!1,B=je.ALLOWED_URI_REGEXP||B,be=je.NAMESPACE||ve,G&&(q=!1),ee&&(Y=!0),Z&&(V=Kt({},[].concat(vi(Vo))),x=[],Z.html===!0&&(Kt(V,Bo),Kt(x,Wo)),Z.svg===!0&&(Kt(V,Gr),Kt(x,jr),Kt(x,Jn)),Z.svgFilters===!0&&(Kt(V,$r),Kt(x,jr),Kt(x,Jn)),Z.mathMl===!0&&(Kt(V,qr),Kt(x,zo),Kt(x,Jn))),je.ADD_TAGS&&(V===z&&(V=$i(V)),Kt(V,je.ADD_TAGS)),je.ADD_ATTR&&(x===H&&(x=$i(x)),Kt(x,je.ADD_ATTR)),je.ADD_URI_SAFE_ATTR&&Kt(pe,je.ADD_URI_SAFE_ATTR),je.FORBID_CONTENTS&&(ne===ce&&(ne=$i(ne)),Kt(ne,je.FORBID_CONTENTS)),se&&(V["#text"]=!0),Q&&Kt(V,["html","head","body"]),V.table&&(Kt(V,["tbody"]),delete W.tbody),oi&&oi(je),ue=je)},Ae=Kt({},["mi","mo","mn","ms","mtext"]),Pe=Kt({},["foreignobject","desc","title","annotation-xml"]),fe=Kt({},Gr);Kt(fe,$r),Kt(fe,rd);var ye=Kt({},qr);Kt(ye,sd);var ke=function(je){var Ue=d(je);(!Ue||!Ue.tagName)&&(Ue={namespaceURI:ve,tagName:"template"});var Fe=Gi(je.tagName),He=Gi(Ue.tagName);if(je.namespaceURI===Ie)return Ue.namespaceURI===ve?Fe==="svg":Ue.namespaceURI===Se?Fe==="svg"&&(He==="annotation-xml"||Ae[He]):Boolean(fe[Fe]);if(je.namespaceURI===Se)return Ue.namespaceURI===ve?Fe==="math":Ue.namespaceURI===Ie?Fe==="math"&&Pe[He]:Boolean(ye[Fe]);if(je.namespaceURI===ve){if(Ue.namespaceURI===Ie&&!Pe[He]||Ue.namespaceURI===Se&&!Ae[He])return!1;var Be=Kt({},["title","style","font","a","script"]);return!ye[Fe]&&(Be[Fe]||!fe[Fe])}return!1},Ee=function(je){Tn(e.removed,{element:je});try{je.parentNode.removeChild(je)}catch{try{je.outerHTML=o}catch{je.remove()}}},Te=function(je,Ue){try{Tn(e.removed,{attribute:Ue.getAttributeNode(je),from:Ue})}catch{Tn(e.removed,{attribute:null,from:Ue})}if(Ue.removeAttribute(je),je==="is"&&!x[je])if(Y||ee)try{Ee(Ue)}catch{}else try{Ue.setAttribute(je,"")}catch{}},_e=function(je){var Ue=void 0,Fe=void 0;if(K)je="<remove></remove>"+je;else{var He=xo(je,/^[\r\n\t ]+/);Fe=He&&He[0]}var Be=a?a.createHTML(je):je;if(be===ve)try{Ue=new u().parseFromString(Be,"text/html")}catch{}if(!Ue||!Ue.documentElement){Ue=h.createDocument(be,"template",null);try{Ue.documentElement.innerHTML=ge?"":Be}catch{}}var ze=Ue.body||Ue.documentElement;return je&&Fe&&ze.insertBefore(p.createTextNode(Fe),ze.childNodes[0]||null),be===ve?w.call(Ue,Q?"html":"body")[0]:Q?Ue.documentElement:ze},Re=function(je){return v.call(je.ownerDocument||je,je,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,null,!1)},Le=function(je){return je instanceof C||je instanceof r?!1:typeof je.nodeName!="string"||typeof je.textContent!="string"||typeof je.removeChild!="function"||!(je.attributes instanceof S)||typeof je.removeAttribute!="function"||typeof je.setAttribute!="function"||typeof je.namespaceURI!="string"||typeof je.insertBefore!="function"},Me=function(je){return(typeof k>"u"?"undefined":kn(k))==="object"?je instanceof k:je&&(typeof je>"u"?"undefined":kn(je))==="object"&&typeof je.nodeType=="number"&&typeof je.nodeName=="string"},Oe=function(je,Ue,Fe){!T[je]||ed(T[je],function(He){He.call(e,Ue,Fe,ue)})},Ke=function(je){var Ue=void 0;if(Oe("beforeSanitizeElements",je,null),Le(je)||xo(je.nodeName,/[\u0080-\uFFFF]/))return Ee(je),!0;var Fe=Gi(je.nodeName);if(Oe("uponSanitizeElement",je,{tagName:Fe,allowedTags:V}),!Me(je.firstElementChild)&&(!Me(je.content)||!Me(je.content.firstElementChild))&&Di(/<[/\w]/g,je.innerHTML)&&Di(/<[/\w]/g,je.textContent)||Fe==="select"&&Di(/<template/i,je.innerHTML))return Ee(je),!0;if(!V[Fe]||W[Fe]){if(se&&!ne[Fe]){var He=d(je)||je.parentNode,Be=s(je)||je.childNodes;if(Be&&He)for(var ze=Be.length,nt=ze-1;nt>=0;--nt)He.insertBefore(c(Be[nt],!0),l(je))}return Ee(je),!0}return je instanceof E&&!ke(je)||(Fe==="noscript"||Fe==="noembed")&&Di(/<\/no(script|embed)/i,je.innerHTML)?(Ee(je),!0):(G&&je.nodeType===3&&(Ue=je.textContent,Ue=Pi(Ue,_," "),Ue=Pi(Ue,L," "),je.textContent!==Ue&&(Tn(e.removed,{element:je.cloneNode()}),je.textContent=Ue)),Oe("afterSanitizeElements",je,null),!1)},We=function(je,Ue,Fe){if(oe&&(Ue==="id"||Ue==="name")&&(Fe in p||Fe in Ce))return!1;if(!(q&&!U[Ue]&&Di(M,Ue))){if(!($&&Di(O,Ue))){if(!x[Ue]||U[Ue])return!1;if(!pe[Ue]){if(!Di(B,Pi(Fe,P,""))){if(!((Ue==="src"||Ue==="xlink:href"||Ue==="href")&&je!=="script"&&td(Fe,"data:")===0&&de[je])){if(!(X&&!Di(N,Pi(Fe,P,"")))){if(Fe)return!1}}}}}}return!0},Xe=function(je){var Ue=void 0,Fe=void 0,He=void 0,Be=void 0;Oe("beforeSanitizeAttributes",je,null);var ze=je.attributes;if(!!ze){var nt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:x};for(Be=ze.length;Be--;){Ue=ze[Be];var ut=Ue,ot=ut.name,at=ut.namespaceURI;if(Fe=id(Ue.value),He=Gi(ot),nt.attrName=He,nt.attrValue=Fe,nt.keepAttr=!0,nt.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",je,nt),Fe=nt.attrValue,!nt.forceKeepAttr&&(Te(ot,je),!!nt.keepAttr)){if(Di(/\/>/i,Fe)){Te(ot,je);continue}G&&(Fe=Pi(Fe,_," "),Fe=Pi(Fe,L," "));var wt=je.nodeName.toLowerCase();if(!!We(wt,He,Fe))try{at?je.setAttributeNS(at,ot,Fe):je.setAttribute(ot,Fe),No(e.removed)}catch{}}}Oe("afterSanitizeAttributes",je,null)}},Je=function rt(je){var Ue=void 0,Fe=Re(je);for(Oe("beforeSanitizeShadowDOM",je,null);Ue=Fe.nextNode();)Oe("uponSanitizeShadowNode",Ue,null),!Ke(Ue)&&(Ue.content instanceof R&&rt(Ue.content),Xe(Ue));Oe("afterSanitizeShadowDOM",je,null)};return e.sanitize=function(rt,je){var Ue=void 0,Fe=void 0,He=void 0,Be=void 0,ze=void 0;if(ge=!rt,ge&&(rt="<!-->"),typeof rt!="string"&&!Me(rt)){if(typeof rt.toString!="function")throw Fo("toString is not a function");if(rt=rt.toString(),typeof rt!="string")throw Fo("dirty is not a string, aborting")}if(!e.isSupported){if(kn(J.toStaticHTML)==="object"||typeof J.toStaticHTML=="function"){if(typeof rt=="string")return J.toStaticHTML(rt);if(Me(rt))return J.toStaticHTML(rt.outerHTML)}return rt}if(j||De(je),e.removed=[],typeof rt=="string"&&(te=!1),!te)if(rt instanceof k)Ue=_e("<!---->"),Fe=Ue.ownerDocument.importNode(rt,!0),Fe.nodeType===1&&Fe.nodeName==="BODY"||Fe.nodeName==="HTML"?Ue=Fe:Ue.appendChild(Fe);else{if(!Y&&!G&&!Q&&rt.indexOf("<")===-1)return a&&re?a.createHTML(rt):rt;if(Ue=_e(rt),!Ue)return Y?null:o}Ue&&K&&Ee(Ue.firstChild);for(var nt=Re(te?rt:Ue);He=nt.nextNode();)He.nodeType===3&&He===Be||Ke(He)||(He.content instanceof R&&Je(He.content),Xe(He),Be=He);if(Be=null,te)return rt;if(Y){if(ee)for(ze=m.call(Ue.ownerDocument);Ue.firstChild;)ze.appendChild(Ue.firstChild);else ze=Ue;return ie&&(ze=D.call(t,ze,!0)),ze}var ut=Q?Ue.outerHTML:Ue.innerHTML;return G&&(ut=Pi(ut,_," "),ut=Pi(ut,L," ")),a&&re?a.createHTML(ut):ut},e.setConfig=function(rt){De(rt),j=!0},e.clearConfig=function(){ue=null,j=!1},e.isValidAttribute=function(rt,je,Ue){ue||De({});var Fe=Gi(rt),He=Gi(je);return We(Fe,He,Ue)},e.addHook=function(rt,je){typeof je=="function"&&(T[rt]=T[rt]||[],Tn(T[rt],je))},e.removeHook=function(rt){T[rt]&&No(T[rt])},e.removeHooks=function(rt){T[rt]&&(T[rt]=[])},e.removeAllHooks=function(){T={}},e}var pd=Uo();define("vs/base/browser/dompurify/dompurify",function(){return pd}),define(ae[121],le([1,0]),function(J,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._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",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 E=p(k);this._maxWidth!==E&&(this._maxWidth=E,this.domNode.style.maxWidth=this._maxWidth)}setWidth(k){const E=p(k);this._width!==E&&(this._width=E,this.domNode.style.width=this._width)}setHeight(k){const E=p(k);this._height!==E&&(this._height=E,this.domNode.style.height=this._height)}setTop(k){const E=p(k);this._top!==E&&(this._top=E,this.domNode.style.top=this._top)}setLeft(k){const E=p(k);this._left!==E&&(this._left=E,this.domNode.style.left=this._left)}setBottom(k){const E=p(k);this._bottom!==E&&(this._bottom=E,this.domNode.style.bottom=this._bottom)}setRight(k){const E=p(k);this._right!==E&&(this._right=E,this.domNode.style.right=this._right)}setPaddingTop(k){const E=p(k);this._paddingTop!==E&&(this._paddingTop=E,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(k){const E=p(k);this._paddingLeft!==E&&(this._paddingLeft=E,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(k){const E=p(k);this._paddingBottom!==E&&(this._paddingBottom=E,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(k){const E=p(k);this._paddingRight!==E&&(this._paddingRight=E,this.domNode.style.paddingRight=this._paddingRight)}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 E=p(k);this._fontSize!==E&&(this._fontSize=E,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 E=p(k);this._lineHeight!==E&&(this._lineHeight=E,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(k){const E=p(k);this._letterSpacing!==E&&(this._letterSpacing=E,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(k){this._className!==k&&(this._className=k,this.domNode.className=this._className)}toggleClassName(k,E){this.domNode.classList.toggle(k,E),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,E){this.domNode.setAttribute(k,E)}removeAttribute(k){this.domNode.removeAttribute(k)}appendChild(k){this.domNode.appendChild(k.domNode)}removeChild(k){this.domNode.removeChild(k.domNode)}}e.FastDomNode=t;function p(A){return typeof A=="number"?`${A}px`:A}function R(A){return new t(A)}e.createFastDomNode=R}),define(ae[1020],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let t=!1,p=null;function R(k){if(!k.parent||k.parent===k)return null;try{const E=k.location,I=k.parent.location;if(E.origin!=="null"&&I.origin!=="null"&&E.origin!==I.origin)return t=!0,null}catch{return t=!0,null}return k.parent}class A{static getSameOriginWindowChain(){if(!p){p=[];let E=window,I;do I=R(E),I?p.push({window:E,iframeElement:E.frameElement||null}):p.push({window:E,iframeElement:null}),E=I;while(E)}return p.slice(0)}static hasDifferentOriginAncestor(){return p||this.getSameOriginWindowChain(),t}static getPositionOfChildWindowRelativeToAncestorWindow(E,I){if(!I||E===I)return{top:0,left:0};let b=0,S=0;const C=this.getSameOriginWindowChain();for(const r of C){if(b+=r.window.scrollY,S+=r.window.scrollX,r.window===I||!r.iframeElement)break;const u=r.iframeElement.getBoundingClientRect();b+=u.top,S+=u.left}return{top:b,left:S}}}e.IframeUtils=A}),define(ae[476],le([1,0]),function(J,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 p extends Error{constructor(k,E){super(`ListError [${k}] ${E}`)}}e.ListError=p;class R{constructor(){this.cache=new WeakMap}getHeight(k){return this.cache.get(k)??this.estimateHeight(k)}setDynamicHeight(k,E){E>0&&this.cache.set(k,E)}}e.CachedListVirtualDelegate=R}),define(ae[1021],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class t{constructor(R){this.spliceables=R}splice(R,A,k){this.spliceables.forEach(E=>E.splice(R,A,k))}}e.CombinedSpliceable=t}),define(ae[706],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const t=20;class p{constructor(A,k,E,I,b,S){this._scrollbarSize=Math.round(k),this._oppositeScrollbarSize=Math.round(E),this._arrowSize=Math.round(A),this._visibleSize=I,this._scrollSize=b,this._scrollPosition=S,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new p(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,E,I,b){const S=Math.max(0,E-A),C=Math.max(0,S-2*k),r=I>0&&I>E;if(!r)return{computedAvailableSize:Math.round(S),computedIsNeeded:r,computedSliderSize:Math.round(C),computedSliderRatio:0,computedSliderPosition:0};const u=Math.round(Math.max(t,Math.floor(E*C/I))),i=(C-u)/(I-E),f=b*i;return{computedAvailableSize:Math.round(S),computedIsNeeded:r,computedSliderSize:Math.round(u),computedSliderRatio:i,computedSliderPosition:Math.round(f)}}_refreshComputedValues(){const A=p._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 E=this._scrollPosition;return k<this._computedSliderPosition?E-=this._visibleSize:E+=this._visibleSize,E}getDesiredScrollPositionFromDelta(A){if(!this._computedIsNeeded)return 0;const k=this._computedSliderPosition+A;return Math.round(k/this._computedSliderRatio)}}e.ScrollbarState=p}),define(ae[297],le([1,0]),function(J,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(E){E[E.Hidden=0]="Hidden",E[E.Visible=1]="Visible",E[E.Recurse=2]="Recurse"})(t=e.TreeVisibility||(e.TreeVisibility={}));var p;(function(E){E[E.Unknown=0]="Unknown",E[E.Twistie=1]="Twistie",E[E.Element=2]="Element",E[E.Filter=3]="Filter"})(p=e.TreeMouseEventTarget||(e.TreeMouseEventTarget={}));var R;(function(E){E[E.Down=0]="Down",E[E.Up=1]="Up"})(R=e.TreeDragOverBubble||(e.TreeDragOverBubble={})),e.TreeDragOverReactions={acceptBubbleUp(){return{accept:!0,bubble:1}},acceptBubbleDown(E=!1){return{accept:!0,bubble:0,autoExpand:E}},acceptCopyBubbleUp(){return{accept:!0,bubble:1,effect:0}},acceptCopyBubbleDown(E=!1){return{accept:!0,bubble:0,effect:0,autoExpand:E}}};class A extends Error{constructor(I,b){super(`TreeError [${I}] ${b}`)}}e.TreeError=A;class k{constructor(I){this.fn=I,this._map=new WeakMap}map(I){let b=this._map.get(I);return b||(b=this.fn(I),this._map.set(I,b)),b}}e.WeakMapper=k}),define(ae[1022],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoaderStats=void 0;class t{static get(){const R=new Map,A=new Map,k=new Map,E=new Map;function I(u,i){u.has(i.detail)||u.set(i.detail,-i.timestamp)}function b(u,i){const f=u.get(i.detail);!f||f>=0||u.set(i.detail,f+i.timestamp)}const S=J.getStats().slice(0).sort((u,i)=>u.timestamp-i.timestamp);for(const u of S)switch(u.type){case 10:I(R,u);break;case 11:case 12:b(R,u);break;case 21:I(A,u);break;case 22:b(A,u);break;case 33:I(k,u);break;case 34:b(k,u);break;case 31:I(E,u);break;case 32:b(E,u);break}let C=0;k.forEach(u=>C+=u);function r(u){const i=[];return u.forEach((f,c)=>i.push([c,f])),i}return{amdLoad:r(R),amdInvoke:r(A),nodeRequire:r(k),nodeEval:r(E),nodeRequireTotal:C}}static toMarkdownTable(R,A){let k="";const E=[];return R.forEach((I,b)=>{E[b]=I.length}),A.forEach(I=>{I.forEach((b,S)=>{typeof b>"u"&&(b=I[S]="-");const C=b.toString().length;E[S]=Math.max(C,E[S])})}),R.forEach((I,b)=>{k+=`| ${I+" ".repeat(E[b]-I.toString().length)} `}),k+=`| `,R.forEach((I,b)=>{k+=`| ${"-".repeat(E[b])} `}),k+=`| `,A.forEach(I=>{I.forEach((b,S)=>{typeof b<"u"&&(k+=`| ${b+" ".repeat(E[S]-b.toString().length)} `)}),k+=`| `}),k}}e.LoaderStats=t}),define(ae[29],le([1,0]),function(J,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,(E,I)=>` ${I} `).trim():""}e.getCodiconAriaLabel=t;class p{constructor(E,I,b){this.id=E,this.definition=I,this.description=b,p._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 p._allCodicons}}e.Codicon=p,p._allCodicons=[],p.add=new p("add",{fontCharacter:"\\ea60"}),p.plus=new p("plus",p.add.definition),p.gistNew=new p("gist-new",p.add.definition),p.repoCreate=new p("repo-create",p.add.definition),p.lightbulb=new p("lightbulb",{fontCharacter:"\\ea61"}),p.lightBulb=new p("light-bulb",{fontCharacter:"\\ea61"}),p.repo=new p("repo",{fontCharacter:"\\ea62"}),p.repoDelete=new p("repo-delete",{fontCharacter:"\\ea62"}),p.gistFork=new p("gist-fork",{fontCharacter:"\\ea63"}),p.repoForked=new p("repo-forked",{fontCharacter:"\\ea63"}),p.gitPullRequest=new p("git-pull-request",{fontCharacter:"\\ea64"}),p.gitPullRequestAbandoned=new p("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),p.recordKeys=new p("record-keys",{fontCharacter:"\\ea65"}),p.keyboard=new p("keyboard",{fontCharacter:"\\ea65"}),p.tag=new p("tag",{fontCharacter:"\\ea66"}),p.tagAdd=new p("tag-add",{fontCharacter:"\\ea66"}),p.tagRemove=new p("tag-remove",{fontCharacter:"\\ea66"}),p.person=new p("person",{fontCharacter:"\\ea67"}),p.personFollow=new p("person-follow",{fontCharacter:"\\ea67"}),p.personOutline=new p("person-outline",{fontCharacter:"\\ea67"}),p.personFilled=new p("person-filled",{fontCharacter:"\\ea67"}),p.gitBranch=new p("git-branch",{fontCharacter:"\\ea68"}),p.gitBranchCreate=new p("git-branch-create",{fontCharacter:"\\ea68"}),p.gitBranchDelete=new p("git-branch-delete",{fontCharacter:"\\ea68"}),p.sourceControl=new p("source-control",{fontCharacter:"\\ea68"}),p.mirror=new p("mirror",{fontCharacter:"\\ea69"}),p.mirrorPublic=new p("mirror-public",{fontCharacter:"\\ea69"}),p.star=new p("star",{fontCharacter:"\\ea6a"}),p.starAdd=new p("star-add",{fontCharacter:"\\ea6a"}),p.starDelete=new p("star-delete",{fontCharacter:"\\ea6a"}),p.starEmpty=new p("star-empty",{fontCharacter:"\\ea6a"}),p.comment=new p("comment",{fontCharacter:"\\ea6b"}),p.commentAdd=new p("comment-add",{fontCharacter:"\\ea6b"}),p.alert=new p("alert",{fontCharacter:"\\ea6c"}),p.warning=new p("warning",{fontCharacter:"\\ea6c"}),p.search=new p("search",{fontCharacter:"\\ea6d"}),p.searchSave=new p("search-save",{fontCharacter:"\\ea6d"}),p.logOut=new p("log-out",{fontCharacter:"\\ea6e"}),p.signOut=new p("sign-out",{fontCharacter:"\\ea6e"}),p.logIn=new p("log-in",{fontCharacter:"\\ea6f"}),p.signIn=new p("sign-in",{fontCharacter:"\\ea6f"}),p.eye=new p("eye",{fontCharacter:"\\ea70"}),p.eyeUnwatch=new p("eye-unwatch",{fontCharacter:"\\ea70"}),p.eyeWatch=new p("eye-watch",{fontCharacter:"\\ea70"}),p.circleFilled=new p("circle-filled",{fontCharacter:"\\ea71"}),p.primitiveDot=new p("primitive-dot",p.circleFilled.definition),p.closeDirty=new p("close-dirty",p.circleFilled.definition),p.debugBreakpoint=new p("debug-breakpoint",p.circleFilled.definition),p.debugBreakpointDisabled=new p("debug-breakpoint-disabled",p.circleFilled.definition),p.debugHint=new p("debug-hint",p.circleFilled.definition),p.primitiveSquare=new p("primitive-square",{fontCharacter:"\\ea72"}),p.edit=new p("edit",{fontCharacter:"\\ea73"}),p.pencil=new p("pencil",{fontCharacter:"\\ea73"}),p.info=new p("info",{fontCharacter:"\\ea74"}),p.issueOpened=new p("issue-opened",{fontCharacter:"\\ea74"}),p.gistPrivate=new p("gist-private",{fontCharacter:"\\ea75"}),p.gitForkPrivate=new p("git-fork-private",{fontCharacter:"\\ea75"}),p.lock=new p("lock",{fontCharacter:"\\ea75"}),p.mirrorPrivate=new p("mirror-private",{fontCharacter:"\\ea75"}),p.close=new p("close",{fontCharacter:"\\ea76"}),p.removeClose=new p("remove-close",{fontCharacter:"\\ea76"}),p.x=new p("x",{fontCharacter:"\\ea76"}),p.repoSync=new p("repo-sync",{fontCharacter:"\\ea77"}),p.sync=new p("sync",{fontCharacter:"\\ea77"}),p.clone=new p("clone",{fontCharacter:"\\ea78"}),p.desktopDownload=new p("desktop-download",{fontCharacter:"\\ea78"}),p.beaker=new p("beaker",{fontCharacter:"\\ea79"}),p.microscope=new p("microscope",{fontCharacter:"\\ea79"}),p.vm=new p("vm",{fontCharacter:"\\ea7a"}),p.deviceDesktop=new p("device-desktop",{fontCharacter:"\\ea7a"}),p.file=new p("file",{fontCharacter:"\\ea7b"}),p.fileText=new p("file-text",{fontCharacter:"\\ea7b"}),p.more=new p("more",{fontCharacter:"\\ea7c"}),p.ellipsis=new p("ellipsis",{fontCharacter:"\\ea7c"}),p.kebabHorizontal=new p("kebab-horizontal",{fontCharacter:"\\ea7c"}),p.mailReply=new p("mail-reply",{fontCharacter:"\\ea7d"}),p.reply=new p("reply",{fontCharacter:"\\ea7d"}),p.organization=new p("organization",{fontCharacter:"\\ea7e"}),p.organizationFilled=new p("organization-filled",{fontCharacter:"\\ea7e"}),p.organizationOutline=new p("organization-outline",{fontCharacter:"\\ea7e"}),p.newFile=new p("new-file",{fontCharacter:"\\ea7f"}),p.fileAdd=new p("file-add",{fontCharacter:"\\ea7f"}),p.newFolder=new p("new-folder",{fontCharacter:"\\ea80"}),p.fileDirectoryCreate=new p("file-directory-create",{fontCharacter:"\\ea80"}),p.trash=new p("trash",{fontCharacter:"\\ea81"}),p.trashcan=new p("trashcan",{fontCharacter:"\\ea81"}),p.history=new p("history",{fontCharacter:"\\ea82"}),p.clock=new p("clock",{fontCharacter:"\\ea82"}),p.folder=new p("folder",{fontCharacter:"\\ea83"}),p.fileDirectory=new p("file-directory",{fontCharacter:"\\ea83"}),p.symbolFolder=new p("symbol-folder",{fontCharacter:"\\ea83"}),p.logoGithub=new p("logo-github",{fontCharacter:"\\ea84"}),p.markGithub=new p("mark-github",{fontCharacter:"\\ea84"}),p.github=new p("github",{fontCharacter:"\\ea84"}),p.terminal=new p("terminal",{fontCharacter:"\\ea85"}),p.console=new p("console",{fontCharacter:"\\ea85"}),p.repl=new p("repl",{fontCharacter:"\\ea85"}),p.zap=new p("zap",{fontCharacter:"\\ea86"}),p.symbolEvent=new p("symbol-event",{fontCharacter:"\\ea86"}),p.error=new p("error",{fontCharacter:"\\ea87"}),p.stop=new p("stop",{fontCharacter:"\\ea87"}),p.variable=new p("variable",{fontCharacter:"\\ea88"}),p.symbolVariable=new p("symbol-variable",{fontCharacter:"\\ea88"}),p.array=new p("array",{fontCharacter:"\\ea8a"}),p.symbolArray=new p("symbol-array",{fontCharacter:"\\ea8a"}),p.symbolModule=new p("symbol-module",{fontCharacter:"\\ea8b"}),p.symbolPackage=new p("symbol-package",{fontCharacter:"\\ea8b"}),p.symbolNamespace=new p("symbol-namespace",{fontCharacter:"\\ea8b"}),p.symbolObject=new p("symbol-object",{fontCharacter:"\\ea8b"}),p.symbolMethod=new p("symbol-method",{fontCharacter:"\\ea8c"}),p.symbolFunction=new p("symbol-function",{fontCharacter:"\\ea8c"}),p.symbolConstructor=new p("symbol-constructor",{fontCharacter:"\\ea8c"}),p.symbolBoolean=new p("symbol-boolean",{fontCharacter:"\\ea8f"}),p.symbolNull=new p("symbol-null",{fontCharacter:"\\ea8f"}),p.symbolNumeric=new p("symbol-numeric",{fontCharacter:"\\ea90"}),p.symbolNumber=new p("symbol-number",{fontCharacter:"\\ea90"}),p.symbolStructure=new p("symbol-structure",{fontCharacter:"\\ea91"}),p.symbolStruct=new p("symbol-struct",{fontCharacter:"\\ea91"}),p.symbolParameter=new p("symbol-parameter",{fontCharacter:"\\ea92"}),p.symbolTypeParameter=new p("symbol-type-parameter",{fontCharacter:"\\ea92"}),p.symbolKey=new p("symbol-key",{fontCharacter:"\\ea93"}),p.symbolText=new p("symbol-text",{fontCharacter:"\\ea93"}),p.symbolReference=new p("symbol-reference",{fontCharacter:"\\ea94"}),p.goToFile=new p("go-to-file",{fontCharacter:"\\ea94"}),p.symbolEnum=new p("symbol-enum",{fontCharacter:"\\ea95"}),p.symbolValue=new p("symbol-value",{fontCharacter:"\\ea95"}),p.symbolRuler=new p("symbol-ruler",{fontCharacter:"\\ea96"}),p.symbolUnit=new p("symbol-unit",{fontCharacter:"\\ea96"}),p.activateBreakpoints=new p("activate-breakpoints",{fontCharacter:"\\ea97"}),p.archive=new p("archive",{fontCharacter:"\\ea98"}),p.arrowBoth=new p("arrow-both",{fontCharacter:"\\ea99"}),p.arrowDown=new p("arrow-down",{fontCharacter:"\\ea9a"}),p.arrowLeft=new p("arrow-left",{fontCharacter:"\\ea9b"}),p.arrowRight=new p("arrow-right",{fontCharacter:"\\ea9c"}),p.arrowSmallDown=new p("arrow-small-down",{fontCharacter:"\\ea9d"}),p.arrowSmallLeft=new p("arrow-small-left",{fontCharacter:"\\ea9e"}),p.arrowSmallRight=new p("arrow-small-right",{fontCharacter:"\\ea9f"}),p.arrowSmallUp=new p("arrow-small-up",{fontCharacter:"\\eaa0"}),p.arrowUp=new p("arrow-up",{fontCharacter:"\\eaa1"}),p.bell=new p("bell",{fontCharacter:"\\eaa2"}),p.bold=new p("bold",{fontCharacter:"\\eaa3"}),p.book=new p("book",{fontCharacter:"\\eaa4"}),p.bookmark=new p("bookmark",{fontCharacter:"\\eaa5"}),p.debugBreakpointConditionalUnverified=new p("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),p.debugBreakpointConditional=new p("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),p.debugBreakpointConditionalDisabled=new p("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),p.debugBreakpointDataUnverified=new p("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),p.debugBreakpointData=new p("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),p.debugBreakpointDataDisabled=new p("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),p.debugBreakpointLogUnverified=new p("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),p.debugBreakpointLog=new p("debug-breakpoint-log",{fontCharacter:"\\eaab"}),p.debugBreakpointLogDisabled=new p("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),p.briefcase=new p("briefcase",{fontCharacter:"\\eaac"}),p.broadcast=new p("broadcast",{fontCharacter:"\\eaad"}),p.browser=new p("browser",{fontCharacter:"\\eaae"}),p.bug=new p("bug",{fontCharacter:"\\eaaf"}),p.calendar=new p("calendar",{fontCharacter:"\\eab0"}),p.caseSensitive=new p("case-sensitive",{fontCharacter:"\\eab1"}),p.check=new p("check",{fontCharacter:"\\eab2"}),p.checklist=new p("checklist",{fontCharacter:"\\eab3"}),p.chevronDown=new p("chevron-down",{fontCharacter:"\\eab4"}),p.dropDownButton=new p("drop-down-button",p.chevronDown.definition),p.chevronLeft=new p("chevron-left",{fontCharacter:"\\eab5"}),p.chevronRight=new p("chevron-right",{fontCharacter:"\\eab6"}),p.chevronUp=new p("chevron-up",{fontCharacter:"\\eab7"}),p.chromeClose=new p("chrome-close",{fontCharacter:"\\eab8"}),p.chromeMaximize=new p("chrome-maximize",{fontCharacter:"\\eab9"}),p.chromeMinimize=new p("chrome-minimize",{fontCharacter:"\\eaba"}),p.chromeRestore=new p("chrome-restore",{fontCharacter:"\\eabb"}),p.circle=new p("circle",{fontCharacter:"\\eabc"}),p.circleOutline=new p("circle-outline",p.circle.definition),p.debugBreakpointUnverified=new p("debug-breakpoint-unverified",p.circle.definition),p.circleSlash=new p("circle-slash",{fontCharacter:"\\eabd"}),p.circuitBoard=new p("circuit-board",{fontCharacter:"\\eabe"}),p.clearAll=new p("clear-all",{fontCharacter:"\\eabf"}),p.clippy=new p("clippy",{fontCharacter:"\\eac0"}),p.closeAll=new p("close-all",{fontCharacter:"\\eac1"}),p.cloudDownload=new p("cloud-download",{fontCharacter:"\\eac2"}),p.cloudUpload=new p("cloud-upload",{fontCharacter:"\\eac3"}),p.code=new p("code",{fontCharacter:"\\eac4"}),p.collapseAll=new p("collapse-all",{fontCharacter:"\\eac5"}),p.colorMode=new p("color-mode",{fontCharacter:"\\eac6"}),p.commentDiscussion=new p("comment-discussion",{fontCharacter:"\\eac7"}),p.compareChanges=new p("compare-changes",{fontCharacter:"\\eafd"}),p.creditCard=new p("credit-card",{fontCharacter:"\\eac9"}),p.dash=new p("dash",{fontCharacter:"\\eacc"}),p.dashboard=new p("dashboard",{fontCharacter:"\\eacd"}),p.database=new p("database",{fontCharacter:"\\eace"}),p.debugContinue=new p("debug-continue",{fontCharacter:"\\eacf"}),p.debugDisconnect=new p("debug-disconnect",{fontCharacter:"\\ead0"}),p.debugPause=new p("debug-pause",{fontCharacter:"\\ead1"}),p.debugRestart=new p("debug-restart",{fontCharacter:"\\ead2"}),p.debugStart=new p("debug-start",{fontCharacter:"\\ead3"}),p.debugStepInto=new p("debug-step-into",{fontCharacter:"\\ead4"}),p.debugStepOut=new p("debug-step-out",{fontCharacter:"\\ead5"}),p.debugStepOver=new p("debug-step-over",{fontCharacter:"\\ead6"}),p.debugStop=new p("debug-stop",{fontCharacter:"\\ead7"}),p.debug=new p("debug",{fontCharacter:"\\ead8"}),p.deviceCameraVideo=new p("device-camera-video",{fontCharacter:"\\ead9"}),p.deviceCamera=new p("device-camera",{fontCharacter:"\\eada"}),p.deviceMobile=new p("device-mobile",{fontCharacter:"\\eadb"}),p.diffAdded=new p("diff-added",{fontCharacter:"\\eadc"}),p.diffIgnored=new p("diff-ignored",{fontCharacter:"\\eadd"}),p.diffModified=new p("diff-modified",{fontCharacter:"\\eade"}),p.diffRemoved=new p("diff-removed",{fontCharacter:"\\eadf"}),p.diffRenamed=new p("diff-renamed",{fontCharacter:"\\eae0"}),p.diff=new p("diff",{fontCharacter:"\\eae1"}),p.discard=new p("discard",{fontCharacter:"\\eae2"}),p.editorLayout=new p("editor-layout",{fontCharacter:"\\eae3"}),p.emptyWindow=new p("empty-window",{fontCharacter:"\\eae4"}),p.exclude=new p("exclude",{fontCharacter:"\\eae5"}),p.extensions=new p("extensions",{fontCharacter:"\\eae6"}),p.eyeClosed=new p("eye-closed",{fontCharacter:"\\eae7"}),p.fileBinary=new p("file-binary",{fontCharacter:"\\eae8"}),p.fileCode=new p("file-code",{fontCharacter:"\\eae9"}),p.fileMedia=new p("file-media",{fontCharacter:"\\eaea"}),p.filePdf=new p("file-pdf",{fontCharacter:"\\eaeb"}),p.fileSubmodule=new p("file-submodule",{fontCharacter:"\\eaec"}),p.fileSymlinkDirectory=new p("file-symlink-directory",{fontCharacter:"\\eaed"}),p.fileSymlinkFile=new p("file-symlink-file",{fontCharacter:"\\eaee"}),p.fileZip=new p("file-zip",{fontCharacter:"\\eaef"}),p.files=new p("files",{fontCharacter:"\\eaf0"}),p.filter=new p("filter",{fontCharacter:"\\eaf1"}),p.flame=new p("flame",{fontCharacter:"\\eaf2"}),p.foldDown=new p("fold-down",{fontCharacter:"\\eaf3"}),p.foldUp=new p("fold-up",{fontCharacter:"\\eaf4"}),p.fold=new p("fold",{fontCharacter:"\\eaf5"}),p.folderActive=new p("folder-active",{fontCharacter:"\\eaf6"}),p.folderOpened=new p("folder-opened",{fontCharacter:"\\eaf7"}),p.gear=new p("gear",{fontCharacter:"\\eaf8"}),p.gift=new p("gift",{fontCharacter:"\\eaf9"}),p.gistSecret=new p("gist-secret",{fontCharacter:"\\eafa"}),p.gist=new p("gist",{fontCharacter:"\\eafb"}),p.gitCommit=new p("git-commit",{fontCharacter:"\\eafc"}),p.gitCompare=new p("git-compare",{fontCharacter:"\\eafd"}),p.gitMerge=new p("git-merge",{fontCharacter:"\\eafe"}),p.githubAction=new p("github-action",{fontCharacter:"\\eaff"}),p.githubAlt=new p("github-alt",{fontCharacter:"\\eb00"}),p.globe=new p("globe",{fontCharacter:"\\eb01"}),p.grabber=new p("grabber",{fontCharacter:"\\eb02"}),p.graph=new p("graph",{fontCharacter:"\\eb03"}),p.gripper=new p("gripper",{fontCharacter:"\\eb04"}),p.heart=new p("heart",{fontCharacter:"\\eb05"}),p.home=new p("home",{fontCharacter:"\\eb06"}),p.horizontalRule=new p("horizontal-rule",{fontCharacter:"\\eb07"}),p.hubot=new p("hubot",{fontCharacter:"\\eb08"}),p.inbox=new p("inbox",{fontCharacter:"\\eb09"}),p.issueClosed=new p("issue-closed",{fontCharacter:"\\eba4"}),p.issueReopened=new p("issue-reopened",{fontCharacter:"\\eb0b"}),p.issues=new p("issues",{fontCharacter:"\\eb0c"}),p.italic=new p("italic",{fontCharacter:"\\eb0d"}),p.jersey=new p("jersey",{fontCharacter:"\\eb0e"}),p.json=new p("json",{fontCharacter:"\\eb0f"}),p.kebabVertical=new p("kebab-vertical",{fontCharacter:"\\eb10"}),p.key=new p("key",{fontCharacter:"\\eb11"}),p.law=new p("law",{fontCharacter:"\\eb12"}),p.lightbulbAutofix=new p("lightbulb-autofix",{fontCharacter:"\\eb13"}),p.linkExternal=new p("link-external",{fontCharacter:"\\eb14"}),p.link=new p("link",{fontCharacter:"\\eb15"}),p.listOrdered=new p("list-ordered",{fontCharacter:"\\eb16"}),p.listUnordered=new p("list-unordered",{fontCharacter:"\\eb17"}),p.liveShare=new p("live-share",{fontCharacter:"\\eb18"}),p.loading=new p("loading",{fontCharacter:"\\eb19"}),p.location=new p("location",{fontCharacter:"\\eb1a"}),p.mailRead=new p("mail-read",{fontCharacter:"\\eb1b"}),p.mail=new p("mail",{fontCharacter:"\\eb1c"}),p.markdown=new p("markdown",{fontCharacter:"\\eb1d"}),p.megaphone=new p("megaphone",{fontCharacter:"\\eb1e"}),p.mention=new p("mention",{fontCharacter:"\\eb1f"}),p.milestone=new p("milestone",{fontCharacter:"\\eb20"}),p.mortarBoard=new p("mortar-board",{fontCharacter:"\\eb21"}),p.move=new p("move",{fontCharacter:"\\eb22"}),p.multipleWindows=new p("multiple-windows",{fontCharacter:"\\eb23"}),p.mute=new p("mute",{fontCharacter:"\\eb24"}),p.noNewline=new p("no-newline",{fontCharacter:"\\eb25"}),p.note=new p("note",{fontCharacter:"\\eb26"}),p.octoface=new p("octoface",{fontCharacter:"\\eb27"}),p.openPreview=new p("open-preview",{fontCharacter:"\\eb28"}),p.package_=new p("package",{fontCharacter:"\\eb29"}),p.paintcan=new p("paintcan",{fontCharacter:"\\eb2a"}),p.pin=new p("pin",{fontCharacter:"\\eb2b"}),p.play=new p("play",{fontCharacter:"\\eb2c"}),p.run=new p("run",{fontCharacter:"\\eb2c"}),p.plug=new p("plug",{fontCharacter:"\\eb2d"}),p.preserveCase=new p("preserve-case",{fontCharacter:"\\eb2e"}),p.preview=new p("preview",{fontCharacter:"\\eb2f"}),p.project=new p("project",{fontCharacter:"\\eb30"}),p.pulse=new p("pulse",{fontCharacter:"\\eb31"}),p.question=new p("question",{fontCharacter:"\\eb32"}),p.quote=new p("quote",{fontCharacter:"\\eb33"}),p.radioTower=new p("radio-tower",{fontCharacter:"\\eb34"}),p.reactions=new p("reactions",{fontCharacter:"\\eb35"}),p.references=new p("references",{fontCharacter:"\\eb36"}),p.refresh=new p("refresh",{fontCharacter:"\\eb37"}),p.regex=new p("regex",{fontCharacter:"\\eb38"}),p.remoteExplorer=new p("remote-explorer",{fontCharacter:"\\eb39"}),p.remote=new p("remote",{fontCharacter:"\\eb3a"}),p.remove=new p("remove",{fontCharacter:"\\eb3b"}),p.replaceAll=new p("replace-all",{fontCharacter:"\\eb3c"}),p.replace=new p("replace",{fontCharacter:"\\eb3d"}),p.repoClone=new p("repo-clone",{fontCharacter:"\\eb3e"}),p.repoForcePush=new p("repo-force-push",{fontCharacter:"\\eb3f"}),p.repoPull=new p("repo-pull",{fontCharacter:"\\eb40"}),p.repoPush=new p("repo-push",{fontCharacter:"\\eb41"}),p.report=new p("report",{fontCharacter:"\\eb42"}),p.requestChanges=new p("request-changes",{fontCharacter:"\\eb43"}),p.rocket=new p("rocket",{fontCharacter:"\\eb44"}),p.rootFolderOpened=new p("root-folder-opened",{fontCharacter:"\\eb45"}),p.rootFolder=new p("root-folder",{fontCharacter:"\\eb46"}),p.rss=new p("rss",{fontCharacter:"\\eb47"}),p.ruby=new p("ruby",{fontCharacter:"\\eb48"}),p.saveAll=new p("save-all",{fontCharacter:"\\eb49"}),p.saveAs=new p("save-as",{fontCharacter:"\\eb4a"}),p.save=new p("save",{fontCharacter:"\\eb4b"}),p.screenFull=new p("screen-full",{fontCharacter:"\\eb4c"}),p.screenNormal=new p("screen-normal",{fontCharacter:"\\eb4d"}),p.searchStop=new p("search-stop",{fontCharacter:"\\eb4e"}),p.server=new p("server",{fontCharacter:"\\eb50"}),p.settingsGear=new p("settings-gear",{fontCharacter:"\\eb51"}),p.settings=new p("settings",{fontCharacter:"\\eb52"}),p.shield=new p("shield",{fontCharacter:"\\eb53"}),p.smiley=new p("smiley",{fontCharacter:"\\eb54"}),p.sortPrecedence=new p("sort-precedence",{fontCharacter:"\\eb55"}),p.splitHorizontal=new p("split-horizontal",{fontCharacter:"\\eb56"}),p.splitVertical=new p("split-vertical",{fontCharacter:"\\eb57"}),p.squirrel=new p("squirrel",{fontCharacter:"\\eb58"}),p.starFull=new p("star-full",{fontCharacter:"\\eb59"}),p.starHalf=new p("star-half",{fontCharacter:"\\eb5a"}),p.symbolClass=new p("symbol-class",{fontCharacter:"\\eb5b"}),p.symbolColor=new p("symbol-color",{fontCharacter:"\\eb5c"}),p.symbolCustomColor=new p("symbol-customcolor",{fontCharacter:"\\eb5c"}),p.symbolConstant=new p("symbol-constant",{fontCharacter:"\\eb5d"}),p.symbolEnumMember=new p("symbol-enum-member",{fontCharacter:"\\eb5e"}),p.symbolField=new p("symbol-field",{fontCharacter:"\\eb5f"}),p.symbolFile=new p("symbol-file",{fontCharacter:"\\eb60"}),p.symbolInterface=new p("symbol-interface",{fontCharacter:"\\eb61"}),p.symbolKeyword=new p("symbol-keyword",{fontCharacter:"\\eb62"}),p.symbolMisc=new p("symbol-misc",{fontCharacter:"\\eb63"}),p.symbolOperator=new p("symbol-operator",{fontCharacter:"\\eb64"}),p.symbolProperty=new p("symbol-property",{fontCharacter:"\\eb65"}),p.wrench=new p("wrench",{fontCharacter:"\\eb65"}),p.wrenchSubaction=new p("wrench-subaction",{fontCharacter:"\\eb65"}),p.symbolSnippet=new p("symbol-snippet",{fontCharacter:"\\eb66"}),p.tasklist=new p("tasklist",{fontCharacter:"\\eb67"}),p.telescope=new p("telescope",{fontCharacter:"\\eb68"}),p.textSize=new p("text-size",{fontCharacter:"\\eb69"}),p.threeBars=new p("three-bars",{fontCharacter:"\\eb6a"}),p.thumbsdown=new p("thumbsdown",{fontCharacter:"\\eb6b"}),p.thumbsup=new p("thumbsup",{fontCharacter:"\\eb6c"}),p.tools=new p("tools",{fontCharacter:"\\eb6d"}),p.triangleDown=new p("triangle-down",{fontCharacter:"\\eb6e"}),p.triangleLeft=new p("triangle-left",{fontCharacter:"\\eb6f"}),p.triangleRight=new p("triangle-right",{fontCharacter:"\\eb70"}),p.triangleUp=new p("triangle-up",{fontCharacter:"\\eb71"}),p.twitter=new p("twitter",{fontCharacter:"\\eb72"}),p.unfold=new p("unfold",{fontCharacter:"\\eb73"}),p.unlock=new p("unlock",{fontCharacter:"\\eb74"}),p.unmute=new p("unmute",{fontCharacter:"\\eb75"}),p.unverified=new p("unverified",{fontCharacter:"\\eb76"}),p.verified=new p("verified",{fontCharacter:"\\eb77"}),p.versions=new p("versions",{fontCharacter:"\\eb78"}),p.vmActive=new p("vm-active",{fontCharacter:"\\eb79"}),p.vmOutline=new p("vm-outline",{fontCharacter:"\\eb7a"}),p.vmRunning=new p("vm-running",{fontCharacter:"\\eb7b"}),p.watch=new p("watch",{fontCharacter:"\\eb7c"}),p.whitespace=new p("whitespace",{fontCharacter:"\\eb7d"}),p.wholeWord=new p("whole-word",{fontCharacter:"\\eb7e"}),p.window=new p("window",{fontCharacter:"\\eb7f"}),p.wordWrap=new p("word-wrap",{fontCharacter:"\\eb80"}),p.zoomIn=new p("zoom-in",{fontCharacter:"\\eb81"}),p.zoomOut=new p("zoom-out",{fontCharacter:"\\eb82"}),p.listFilter=new p("list-filter",{fontCharacter:"\\eb83"}),p.listFlat=new p("list-flat",{fontCharacter:"\\eb84"}),p.listSelection=new p("list-selection",{fontCharacter:"\\eb85"}),p.selection=new p("selection",{fontCharacter:"\\eb85"}),p.listTree=new p("list-tree",{fontCharacter:"\\eb86"}),p.debugBreakpointFunctionUnverified=new p("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),p.debugBreakpointFunction=new p("debug-breakpoint-function",{fontCharacter:"\\eb88"}),p.debugBreakpointFunctionDisabled=new p("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),p.debugStackframeActive=new p("debug-stackframe-active",{fontCharacter:"\\eb89"}),p.circleSmallFilled=new p("circle-small-filled",{fontCharacter:"\\eb8a"}),p.debugStackframeDot=new p("debug-stackframe-dot",p.circleSmallFilled.definition),p.debugStackframe=new p("debug-stackframe",{fontCharacter:"\\eb8b"}),p.debugStackframeFocused=new p("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),p.debugBreakpointUnsupported=new p("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),p.symbolString=new p("symbol-string",{fontCharacter:"\\eb8d"}),p.debugReverseContinue=new p("debug-reverse-continue",{fontCharacter:"\\eb8e"}),p.debugStepBack=new p("debug-step-back",{fontCharacter:"\\eb8f"}),p.debugRestartFrame=new p("debug-restart-frame",{fontCharacter:"\\eb90"}),p.callIncoming=new p("call-incoming",{fontCharacter:"\\eb92"}),p.callOutgoing=new p("call-outgoing",{fontCharacter:"\\eb93"}),p.menu=new p("menu",{fontCharacter:"\\eb94"}),p.expandAll=new p("expand-all",{fontCharacter:"\\eb95"}),p.feedback=new p("feedback",{fontCharacter:"\\eb96"}),p.groupByRefType=new p("group-by-ref-type",{fontCharacter:"\\eb97"}),p.ungroupByRefType=new p("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),p.account=new p("account",{fontCharacter:"\\eb99"}),p.bellDot=new p("bell-dot",{fontCharacter:"\\eb9a"}),p.debugConsole=new p("debug-console",{fontCharacter:"\\eb9b"}),p.library=new p("library",{fontCharacter:"\\eb9c"}),p.output=new p("output",{fontCharacter:"\\eb9d"}),p.runAll=new p("run-all",{fontCharacter:"\\eb9e"}),p.syncIgnored=new p("sync-ignored",{fontCharacter:"\\eb9f"}),p.pinned=new p("pinned",{fontCharacter:"\\eba0"}),p.githubInverted=new p("github-inverted",{fontCharacter:"\\eba1"}),p.debugAlt=new p("debug-alt",{fontCharacter:"\\eb91"}),p.serverProcess=new p("server-process",{fontCharacter:"\\eba2"}),p.serverEnvironment=new p("server-environment",{fontCharacter:"\\eba3"}),p.pass=new p("pass",{fontCharacter:"\\eba4"}),p.stopCircle=new p("stop-circle",{fontCharacter:"\\eba5"}),p.playCircle=new p("play-circle",{fontCharacter:"\\eba6"}),p.record=new p("record",{fontCharacter:"\\eba7"}),p.debugAltSmall=new p("debug-alt-small",{fontCharacter:"\\eba8"}),p.vmConnect=new p("vm-connect",{fontCharacter:"\\eba9"}),p.cloud=new p("cloud",{fontCharacter:"\\ebaa"}),p.merge=new p("merge",{fontCharacter:"\\ebab"}),p.exportIcon=new p("export",{fontCharacter:"\\ebac"}),p.graphLeft=new p("graph-left",{fontCharacter:"\\ebad"}),p.magnet=new p("magnet",{fontCharacter:"\\ebae"}),p.notebook=new p("notebook",{fontCharacter:"\\ebaf"}),p.redo=new p("redo",{fontCharacter:"\\ebb0"}),p.checkAll=new p("check-all",{fontCharacter:"\\ebb1"}),p.pinnedDirty=new p("pinned-dirty",{fontCharacter:"\\ebb2"}),p.passFilled=new p("pass-filled",{fontCharacter:"\\ebb3"}),p.circleLargeFilled=new p("circle-large-filled",{fontCharacter:"\\ebb4"}),p.circleLarge=new p("circle-large",{fontCharacter:"\\ebb5"}),p.circleLargeOutline=new p("circle-large-outline",p.circleLarge.definition),p.combine=new p("combine",{fontCharacter:"\\ebb6"}),p.gather=new p("gather",{fontCharacter:"\\ebb6"}),p.table=new p("table",{fontCharacter:"\\ebb7"}),p.variableGroup=new p("variable-group",{fontCharacter:"\\ebb8"}),p.typeHierarchy=new p("type-hierarchy",{fontCharacter:"\\ebb9"}),p.typeHierarchySub=new p("type-hierarchy-sub",{fontCharacter:"\\ebba"}),p.typeHierarchySuper=new p("type-hierarchy-super",{fontCharacter:"\\ebbb"}),p.gitPullRequestCreate=new p("git-pull-request-create",{fontCharacter:"\\ebbc"}),p.runAbove=new p("run-above",{fontCharacter:"\\ebbd"}),p.runBelow=new p("run-below",{fontCharacter:"\\ebbe"}),p.notebookTemplate=new p("notebook-template",{fontCharacter:"\\ebbf"}),p.debugRerun=new p("debug-rerun",{fontCharacter:"\\ebc0"}),p.workspaceTrusted=new p("workspace-trusted",{fontCharacter:"\\ebc1"}),p.workspaceUntrusted=new p("workspace-untrusted",{fontCharacter:"\\ebc2"}),p.workspaceUnspecified=new p("workspace-unspecified",{fontCharacter:"\\ebc3"}),p.terminalCmd=new p("terminal-cmd",{fontCharacter:"\\ebc4"}),p.terminalDebian=new p("terminal-debian",{fontCharacter:"\\ebc5"}),p.terminalLinux=new p("terminal-linux",{fontCharacter:"\\ebc6"}),p.terminalPowershell=new p("terminal-powershell",{fontCharacter:"\\ebc7"}),p.terminalTmux=new p("terminal-tmux",{fontCharacter:"\\ebc8"}),p.terminalUbuntu=new p("terminal-ubuntu",{fontCharacter:"\\ebc9"}),p.terminalBash=new p("terminal-bash",{fontCharacter:"\\ebca"}),p.arrowSwap=new p("arrow-swap",{fontCharacter:"\\ebcb"}),p.copy=new p("copy",{fontCharacter:"\\ebcc"}),p.personAdd=new p("person-add",{fontCharacter:"\\ebcd"}),p.filterFilled=new p("filter-filled",{fontCharacter:"\\ebce"}),p.wand=new p("wand",{fontCharacter:"\\ebcf"}),p.debugLineByLine=new p("debug-line-by-line",{fontCharacter:"\\ebd0"}),p.inspect=new p("inspect",{fontCharacter:"\\ebd1"}),p.layers=new p("layers",{fontCharacter:"\\ebd2"}),p.layersDot=new p("layers-dot",{fontCharacter:"\\ebd3"}),p.layersActive=new p("layers-active",{fontCharacter:"\\ebd4"}),p.compass=new p("compass",{fontCharacter:"\\ebd5"}),p.compassDot=new p("compass-dot",{fontCharacter:"\\ebd6"}),p.compassActive=new p("compass-active",{fontCharacter:"\\ebd7"}),p.azure=new p("azure",{fontCharacter:"\\ebd8"}),p.issueDraft=new p("issue-draft",{fontCharacter:"\\ebd9"}),p.gitPullRequestClosed=new p("git-pull-request-closed",{fontCharacter:"\\ebda"}),p.gitPullRequestDraft=new p("git-pull-request-draft",{fontCharacter:"\\ebdb"}),p.debugAll=new p("debug-all",{fontCharacter:"\\ebdc"}),p.debugCoverage=new p("debug-coverage",{fontCharacter:"\\ebdd"}),p.runErrors=new p("run-errors",{fontCharacter:"\\ebde"}),p.folderLibrary=new p("folder-library",{fontCharacter:"\\ebdf"}),p.debugContinueSmall=new p("debug-continue-small",{fontCharacter:"\\ebe0"}),p.beakerStop=new p("beaker-stop",{fontCharacter:"\\ebe1"}),p.graphLine=new p("graph-line",{fontCharacter:"\\ebe2"}),p.graphScatter=new p("graph-scatter",{fontCharacter:"\\ebe3"}),p.pieChart=new p("pie-chart",{fontCharacter:"\\ebe4"}),p.bracket=new p("bracket",p.json.definition),p.bracketDot=new p("bracket-dot",{fontCharacter:"\\ebe5"}),p.bracketError=new p("bracket-error",{fontCharacter:"\\ebe6"}),p.lockSmall=new p("lock-small",{fontCharacter:"\\ebe7"}),p.azureDevops=new p("azure-devops",{fontCharacter:"\\ebe8"}),p.verifiedFilled=new p("verified-filled",{fontCharacter:"\\ebe9"}),p.newLine=new p("newline",{fontCharacter:"\\ebea"}),p.layout=new p("layout",{fontCharacter:"\\ebeb"}),p.layoutActivitybarLeft=new p("layout-activitybar-left",{fontCharacter:"\\ebec"}),p.layoutActivitybarRight=new p("layout-activitybar-right",{fontCharacter:"\\ebed"}),p.layoutPanelLeft=new p("layout-panel-left",{fontCharacter:"\\ebee"}),p.layoutPanelCenter=new p("layout-panel-center",{fontCharacter:"\\ebef"}),p.layoutPanelJustify=new p("layout-panel-justify",{fontCharacter:"\\ebf0"}),p.layoutPanelRight=new p("layout-panel-right",{fontCharacter:"\\ebf1"}),p.layoutPanel=new p("layout-panel",{fontCharacter:"\\ebf2"}),p.layoutSidebarLeft=new p("layout-sidebar-left",{fontCharacter:"\\ebf3"}),p.layoutSidebarRight=new p("layout-sidebar-right",{fontCharacter:"\\ebf4"}),p.layoutStatusbar=new p("layout-statusbar",{fontCharacter:"\\ebf5"}),p.layoutMenubar=new p("layout-menubar",{fontCharacter:"\\ebf6"}),p.layoutCentered=new p("layout-centered",{fontCharacter:"\\ebf7"}),p.layoutSidebarRightOff=new p("layout-sidebar-right-off",{fontCharacter:"\\ec00"}),p.layoutPanelOff=new p("layout-panel-off",{fontCharacter:"\\ec01"}),p.layoutSidebarLeftOff=new p("layout-sidebar-left-off",{fontCharacter:"\\ec02"}),p.target=new p("target",{fontCharacter:"\\ebf8"}),p.indent=new p("indent",{fontCharacter:"\\ebf9"}),p.recordSmall=new p("record-small",{fontCharacter:"\\ebfa"}),p.errorSmall=new p("error-small",{fontCharacter:"\\ebfb"}),p.arrowCircleDown=new p("arrow-circle-down",{fontCharacter:"\\ebfc"}),p.arrowCircleLeft=new p("arrow-circle-left",{fontCharacter:"\\ebfd"}),p.arrowCircleRight=new p("arrow-circle-right",{fontCharacter:"\\ebfe"}),p.arrowCircleUp=new p("arrow-circle-up",{fontCharacter:"\\ebff"}),p.heartFilled=new p("heart-filled",{fontCharacter:"\\ec04"}),p.map=new p("map",{fontCharacter:"\\ec05"}),p.mapFilled=new p("map-filled",{fontCharacter:"\\ec06"}),p.circleSmall=new p("circle-small",{fontCharacter:"\\ec07"}),p.bellSlash=new p("bell-slash",{fontCharacter:"\\ec08"}),p.bellSlashDot=new p("bell-slash-dot",{fontCharacter:"\\ec09"}),p.commentUnresolved=new p("comment-unresolved",{fontCharacter:"\\ec0a"}),p.gitPullRequestGoToChanges=new p("git-pull-request-go-to-changes",{fontCharacter:"\\ec0b"}),p.gitPullRequestNewChanges=new p("git-pull-request-new-changes",{fontCharacter:"\\ec0c"}),p.searchFuzzy=new p("search-fuzzy",{fontCharacter:"\\ec0d"}),p.dialogError=new p("dialog-error",p.error.definition),p.dialogWarning=new p("dialog-warning",p.warning.definition),p.dialogInfo=new p("dialog-info",p.info.definition),p.dialogClose=new p("dialog-close",p.close.definition),p.treeItemExpanded=new p("tree-item-expanded",p.chevronDown.definition),p.treeFilterOnTypeOn=new p("tree-filter-on-type-on",p.listFilter.definition),p.treeFilterOnTypeOff=new p("tree-filter-on-type-off",p.listSelection.definition),p.treeFilterClear=new p("tree-filter-clear",p.close.definition),p.treeItemLoading=new p("tree-item-loading",p.loading.definition),p.menuSelection=new p("menu-selection",p.check.definition),p.menuSubmenu=new p("menu-submenu",p.chevronRight.definition),p.menuBarMore=new p("menubar-more",p.more.definition),p.scrollbarButtonLeft=new p("scrollbar-button-left",p.triangleLeft.definition),p.scrollbarButtonRight=new p("scrollbar-button-right",p.triangleRight.definition),p.scrollbarButtonUp=new p("scrollbar-button-up",p.triangleUp.definition),p.scrollbarButtonDown=new p("scrollbar-button-down",p.triangleDown.definition),p.toolBarMore=new p("toolbar-more",p.more.definition),p.quickInputBack=new p("quick-input-back",p.arrowLeft.definition);function R(k,E){const I=["codicon","codicon-"+k];return E&&I.push("codicon-modifier-"+E),I}e.getClassNamesArray=R;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 E=new RegExp(`^(${k.iconNameExpression})(${k.iconModifierExpression})?$`);function I(C){if(C instanceof p)return["codicon","codicon-"+C.id];const r=E.exec(C.id);if(!r)return I(p.error);const[,u,i]=r,f=["codicon","codicon-"+u];return i&&f.push("codicon-modifier-"+i.substr(1)),f}k.asClassNameArray=I;function b(C){return I(C).join(" ")}k.asClassName=b;function S(C){return"."+I(C).join(".")}k.asCSSSelector=S})(A=e.CSSIcon||(e.CSSIcon={}))}),define(ae[298],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetMap=e.diffMaps=e.diffSets=e.groupBy=void 0;function t(k,E){const I=Object.create(null);for(const b of k){const S=E(b);let C=I[S];C||(C=I[S]=[]),C.push(b)}return I}e.groupBy=t;function p(k,E){const I=[],b=[];for(const S of k)E.has(S)||I.push(S);for(const S of E)k.has(S)||b.push(S);return{removed:I,added:b}}e.diffSets=p;function R(k,E){const I=[],b=[];for(const[S,C]of k)E.has(S)||I.push(C);for(const[S,C]of E)k.has(S)||b.push(C);return{removed:I,added:b}}e.diffMaps=R;class A{constructor(){this.map=new Map}add(E,I){let b=this.map.get(E);b||(b=new Set,this.map.set(E,b)),b.add(I)}delete(E,I){const b=this.map.get(E);!b||(b.delete(I),b.size===0&&this.map.delete(E))}forEach(E,I){const b=this.map.get(E);!b||b.forEach(I)}}e.SetMap=A}),define(ae[65],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function t(E,I){const b=Math.pow(10,I);return Math.round(E*b)/b}class p{constructor(I,b,S,C=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,I))|0,this.g=Math.min(255,Math.max(0,b))|0,this.b=Math.min(255,Math.max(0,S))|0,this.a=t(Math.max(Math.min(1,C),0),3)}static equals(I,b){return I.r===b.r&&I.g===b.g&&I.b===b.b&&I.a===b.a}}e.RGBA=p;class R{constructor(I,b,S,C){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,I),0)|0,this.s=t(Math.max(Math.min(1,b),0),3),this.l=t(Math.max(Math.min(1,S),0),3),this.a=t(Math.max(Math.min(1,C),0),3)}static equals(I,b){return I.h===b.h&&I.s===b.s&&I.l===b.l&&I.a===b.a}static fromRGBA(I){const b=I.r/255,S=I.g/255,C=I.b/255,r=I.a,u=Math.max(b,S,C),i=Math.min(b,S,C);let f=0,c=0;const l=(i+u)/2,s=u-i;if(s>0){switch(c=Math.min(l<=.5?s/(2*l):s/(2-2*l),1),u){case b:f=(S-C)/s+(S<C?6:0);break;case S:f=(C-b)/s+2;break;case C:f=(b-S)/s+4;break}f*=60,f=Math.round(f)}return new R(f,c,l,r)}static _hue2rgb(I,b,S){return S<0&&(S+=1),S>1&&(S-=1),S<1/6?I+(b-I)*6*S:S<1/2?b:S<2/3?I+(b-I)*(2/3-S)*6:I}static toRGBA(I){const b=I.h/360,{s:S,l:C,a:r}=I;let u,i,f;if(S===0)u=i=f=C;else{const c=C<.5?C*(1+S):C+S-C*S,l=2*C-c;u=R._hue2rgb(l,c,b+1/3),i=R._hue2rgb(l,c,b),f=R._hue2rgb(l,c,b-1/3)}return new p(Math.round(u*255),Math.round(i*255),Math.round(f*255),r)}}e.HSLA=R;class A{constructor(I,b,S,C){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,I),0)|0,this.s=t(Math.max(Math.min(1,b),0),3),this.v=t(Math.max(Math.min(1,S),0),3),this.a=t(Math.max(Math.min(1,C),0),3)}static equals(I,b){return I.h===b.h&&I.s===b.s&&I.v===b.v&&I.a===b.a}static fromRGBA(I){const b=I.r/255,S=I.g/255,C=I.b/255,r=Math.max(b,S,C),u=Math.min(b,S,C),i=r-u,f=r===0?0:i/r;let c;return i===0?c=0:r===b?c=((S-C)/i%6+6)%6:r===S?c=(C-b)/i+2:c=(b-S)/i+4,new A(Math.round(c*60),f,r,I.a)}static toRGBA(I){const{h:b,s:S,v:C,a:r}=I,u=C*S,i=u*(1-Math.abs(b/60%2-1)),f=C-u;let[c,l,s]=[0,0,0];return b<60?(c=u,l=i):b<120?(c=i,l=u):b<180?(l=u,s=i):b<240?(l=i,s=u):b<300?(c=i,s=u):b<=360&&(c=u,s=i),c=Math.round((c+f)*255),l=Math.round((l+f)*255),s=Math.round((s+f)*255),new p(c,l,s,r)}}e.HSVA=A;class k{static fromHex(I){return k.Format.CSS.parseHex(I)||k.red}static equals(I,b){return!I&&!b?!0:!I||!b?!1:I.equals(b)}get hsla(){return this._hsla?this._hsla:R.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:A.fromRGBA(this.rgba)}constructor(I){if(I)if(I instanceof p)this.rgba=I;else if(I instanceof R)this._hsla=I,this.rgba=R.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")}equals(I){return!!I&&p.equals(this.rgba,I.rgba)&&R.equals(this.hsla,I.hsla)&&A.equals(this.hsva,I.hsva)}getRelativeLuminance(){const I=k._relativeLuminanceForComponent(this.rgba.r),b=k._relativeLuminanceForComponent(this.rgba.g),S=k._relativeLuminanceForComponent(this.rgba.b),C=.2126*I+.7152*b+.0722*S;return t(C,4)}static _relativeLuminanceForComponent(I){const b=I/255;return b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4)}getContrastRatio(I){const b=this.getRelativeLuminance(),S=I.getRelativeLuminance();return b>S?(b+.05)/(S+.05):(S+.05)/(b+.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 b=this.getRelativeLuminance(),S=I.getRelativeLuminance();return b>S}isDarkerThan(I){const b=this.getRelativeLuminance(),S=I.getRelativeLuminance();return b<S}lighten(I){return new k(new R(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*I,this.hsla.a))}darken(I){return new k(new R(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*I,this.hsla.a))}transparent(I){const{r:b,g:S,b:C,a:r}=this.rgba;return new k(new p(b,S,C,r*I))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new k(new p(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}blend(I){const b=I.rgba,S=this.rgba.a,C=b.a,r=S+C*(1-S);if(r<1e-6)return k.transparent;const u=this.rgba.r*S/r+b.r*C*(1-S)/r,i=this.rgba.g*S/r+b.g*C*(1-S)/r,f=this.rgba.b*S/r+b.b*C*(1-S)/r;return new k(new p(u,i,f,r))}makeOpaque(I){if(this.isOpaque()||I.rgba.a!==1)return this;const{r:b,g:S,b:C,a:r}=this.rgba;return new k(new p(I.rgba.r-r*(I.rgba.r-b),I.rgba.g-r*(I.rgba.g-S),I.rgba.b-r*(I.rgba.b-C),1))}flatten(...I){const b=I.reduceRight((S,C)=>k._flatten(C,S));return k._flatten(this,b)}static _flatten(I,b){const S=1-I.rgba.a;return new k(new p(S*b.rgba.r+I.rgba.a*I.rgba.r,S*b.rgba.g+I.rgba.a*I.rgba.g,S*b.rgba.b+I.rgba.a*I.rgba.b))}toString(){return this._toString||(this._toString=k.Format.CSS.format(this)),this._toString}static getLighterColor(I,b,S){if(I.isLighterThan(b))return I;S=S||.5;const C=I.getRelativeLuminance(),r=b.getRelativeLuminance();return S=S*(r-C)/r,I.lighten(S)}static getDarkerColor(I,b,S){if(I.isDarkerThan(b))return I;S=S||.5;const C=I.getRelativeLuminance(),r=b.getRelativeLuminance();return S=S*(C-r)/C,I.darken(S)}}e.Color=k,k.white=new k(new p(255,255,255,1)),k.black=new k(new p(0,0,0,1)),k.red=new k(new p(255,0,0,1)),k.blue=new k(new p(0,0,255,1)),k.green=new k(new p(0,255,0,1)),k.cyan=new k(new p(0,255,255,1)),k.lightgrey=new k(new p(211,211,211,1)),k.transparent=new k(new p(0,0,0,0)),function(E){let I;(function(b){let S;(function(C){function r(o){return o.rgba.a===1?`rgb(${o.rgba.r}, ${o.rgba.g}, ${o.rgba.b})`:E.Format.CSS.formatRGBA(o)}C.formatRGB=r;function u(o){return`rgba(${o.rgba.r}, ${o.rgba.g}, ${o.rgba.b}, ${+o.rgba.a.toFixed(2)})`}C.formatRGBA=u;function i(o){return o.hsla.a===1?`hsl(${o.hsla.h}, ${(o.hsla.s*100).toFixed(2)}%, ${(o.hsla.l*100).toFixed(2)}%)`:E.Format.CSS.formatHSLA(o)}C.formatHSL=i;function f(o){return`hsla(${o.hsla.h}, ${(o.hsla.s*100).toFixed(2)}%, ${(o.hsla.l*100).toFixed(2)}%, ${o.hsla.a.toFixed(2)})`}C.formatHSLA=f;function c(o){const g=o.toString(16);return g.length!==2?"0"+g:g}function l(o){return`#${c(o.rgba.r)}${c(o.rgba.g)}${c(o.rgba.b)}`}C.formatHex=l;function s(o,g=!1){return g&&o.rgba.a===1?E.Format.CSS.formatHex(o):`#${c(o.rgba.r)}${c(o.rgba.g)}${c(o.rgba.b)}${c(Math.round(o.rgba.a*255))}`}C.formatHexA=s;function d(o){return o.isOpaque()?E.Format.CSS.formatHex(o):E.Format.CSS.formatRGBA(o)}C.format=d;function n(o){const g=o.length;if(g===0||o.charCodeAt(0)!==35)return null;if(g===7){const h=16*a(o.charCodeAt(1))+a(o.charCodeAt(2)),v=16*a(o.charCodeAt(3))+a(o.charCodeAt(4)),m=16*a(o.charCodeAt(5))+a(o.charCodeAt(6));return new E(new p(h,v,m,1))}if(g===9){const h=16*a(o.charCodeAt(1))+a(o.charCodeAt(2)),v=16*a(o.charCodeAt(3))+a(o.charCodeAt(4)),m=16*a(o.charCodeAt(5))+a(o.charCodeAt(6)),w=16*a(o.charCodeAt(7))+a(o.charCodeAt(8));return new E(new p(h,v,m,w/255))}if(g===4){const h=a(o.charCodeAt(1)),v=a(o.charCodeAt(2)),m=a(o.charCodeAt(3));return new E(new p(16*h+h,16*v+v,16*m+m))}if(g===5){const h=a(o.charCodeAt(1)),v=a(o.charCodeAt(2)),m=a(o.charCodeAt(3)),w=a(o.charCodeAt(4));return new E(new p(16*h+h,16*v+v,16*m+m,(16*w+w)/255))}return null}C.parseHex=n;function a(o){switch(o){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}})(S=b.CSS||(b.CSS={}))})(I=E.Format||(E.Format={}))}(k=e.Color||(e.Color={}))}),define(ae[112],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throttle=e.debounce=e.memoize=e.createDecorator=void 0;function t(k){return(E,I,b)=>{let S=null,C=null;if(typeof b.value=="function"?(S="value",C=b.value):typeof b.get=="function"&&(S="get",C=b.get),!C)throw new Error("not supported");b[S]=k(C,I)}}e.createDecorator=t;function p(k,E,I){let b=null,S=null;if(typeof I.value=="function"?(b="value",S=I.value,S.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof I.get=="function"&&(b="get",S=I.get),!S)throw new Error("not supported");const C=`$memoize$${E}`;I[b]=function(...r){return this.hasOwnProperty(C)||Object.defineProperty(this,C,{configurable:!1,enumerable:!1,writable:!1,value:S.apply(this,r)}),this[C]}}e.memoize=p;function R(k,E,I){return t((b,S)=>{const C=`$debounce$${S}`,r=`$debounce$result$${S}`;return function(...u){this[r]||(this[r]=I?I():void 0),clearTimeout(this[C]),E&&(this[r]=E(this[r],...u),u=[this[r]]),this[C]=setTimeout(()=>{b.apply(this,u),this[r]=I?I():void 0},k)}})}e.debounce=R;function A(k,E,I){return t((b,S)=>{const C=`$throttle$timer$${S}`,r=`$throttle$result$${S}`,u=`$throttle$lastRun$${S}`,i=`$throttle$pending$${S}`;return function(...f){if(this[r]||(this[r]=I?I():void 0),(this[u]===null||this[u]===void 0)&&(this[u]=-Number.MAX_VALUE),E&&(this[r]=E(this[r],...f)),this[i])return;const c=this[u]+k;c<=Date.now()?(this[u]=Date.now(),b.apply(this,[this[r]]),this[r]=I?I():void 0):(this[i]=!0,this[C]=setTimeout(()=>{this[i]=!1,this[u]=Date.now(),b.apply(this,[this[r]]),this[r]=I?I():void 0},c-Date.now()))}})}e.throttle=A}),define(ae[1023],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffChange=void 0;class t{constructor(R,A,k,E){this.originalStart=R,this.originalLength=A,this.modifiedStart=k,this.modifiedLength=E}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}e.DiffChange=t}),define(ae[21],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BugIndicatingError=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(o){setTimeout(()=>{throw o.stack?d.isErrorNoTelemetry(o)?new d(o.message+` `+o.stack):new Error(o.message+` `+o.stack):o},0)}}addListener(o){return this.listeners.push(o),()=>{this._removeListener(o)}}emit(o){this.listeners.forEach(g=>{g(o)})}_removeListener(o){this.listeners.splice(this.listeners.indexOf(o),1)}setUnexpectedErrorHandler(o){this.unexpectedErrorHandler=o}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(o){this.unexpectedErrorHandler(o),this.emit(o)}onUnexpectedExternalError(o){this.unexpectedErrorHandler(o)}}e.ErrorHandler=t,e.errorHandler=new t;function p(a){e.errorHandler.setUnexpectedErrorHandler(a)}e.setUnexpectedErrorHandler=p;function R(a){I(a)||e.errorHandler.onUnexpectedError(a)}e.onUnexpectedError=R;function A(a){I(a)||e.errorHandler.onUnexpectedExternalError(a)}e.onUnexpectedExternalError=A;function k(a){if(a instanceof Error){const{name:o,message:g}=a,h=a.stacktrace||a.stack;return{$isError:!0,name:o,message:g,stack:h,noTelemetry:d.isErrorNoTelemetry(a)}}return a}e.transformErrorForSerialization=k;const E="Canceled";function I(a){return a instanceof b?!0:a instanceof Error&&a.name===E&&a.message===E}e.isCancellationError=I;class b extends Error{constructor(){super(E),this.name=this.message}}e.CancellationError=b;function S(){const a=new Error(E);return a.name=a.message,a}e.canceled=S;function C(a){return a?new Error(`Illegal argument: ${a}`):new Error("Illegal argument")}e.illegalArgument=C;function r(a){return a?new Error(`Illegal state: ${a}`):new Error("Illegal state")}e.illegalState=r;function u(a){return a?new Error(`readonly property '${a} cannot be changed'`):new Error("readonly property cannot be changed")}e.readonly=u;function i(a){const o=new Error(`${a} has been disposed`);return o.name="DISPOSED",o}e.disposed=i;function f(a){return a?a.message?a.message:a.stack?a.stack.split(` `)[0]:String(a):"Error"}e.getErrorMessage=f;class c extends Error{constructor(o){super("NotImplemented"),o&&(this.message=o)}}e.NotImplementedError=c;class l extends Error{constructor(o){super("NotSupported"),o&&(this.message=o)}}e.NotSupportedError=l;class s extends Error{constructor(){super(...arguments),this.isExpected=!0}}e.ExpectedError=s;class d extends Error{constructor(o){super(o),this.name="CodeExpectedError"}static fromError(o){if(o instanceof d)return o;const g=new d;return g.message=o.message,g.stack=o.stack,g}static isErrorNoTelemetry(o){return o.name==="CodeExpectedError"}}e.ErrorNoTelemetry=d;class n extends Error{constructor(o){super(o||"An unexpected bug occurred."),Object.setPrototypeOf(this,n.prototype);debugger}}e.BugIndicatingError=n}),define(ae[16],le([1,0,21]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackIterable=e.ArrayQueue=e.findMinBy=e.findLastMaxBy=e.findMaxBy=e.numberComparator=e.tieBreakComparators=e.compareBy=e.CompareResult=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.binarySearch2=e.binarySearch=e.removeFastWithoutKeepingOrder=e.equals=e.tail2=e.tail=void 0;function p(oe,se=0){return oe[oe.length-(1+se)]}e.tail=p;function R(oe){if(oe.length===0)throw new Error("Invalid tail call");return[oe.slice(0,oe.length-1),oe[oe.length-1]]}e.tail2=R;function A(oe,se,te=(Z,ne)=>Z===ne){if(oe===se)return!0;if(!oe||!se||oe.length!==se.length)return!1;for(let Z=0,ne=oe.length;Z<ne;Z++)if(!te(oe[Z],se[Z]))return!1;return!0}e.equals=A;function k(oe,se){const te=oe.length-1;se<te&&(oe[se]=oe[te]),oe.pop()}e.removeFastWithoutKeepingOrder=k;function E(oe,se,te){return I(oe.length,Z=>te(oe[Z],se))}e.binarySearch=E;function I(oe,se){let te=0,Z=oe-1;for(;te<=Z;){const ne=(te+Z)/2|0,ce=se(ne);if(ce<0)te=ne+1;else if(ce>0)Z=ne-1;else return ne}return-(te+1)}e.binarySearch2=I;function b(oe,se){let te=0,Z=oe.length;if(Z===0)return 0;for(;te<Z;){const ne=Math.floor((te+Z)/2);se(oe[ne])?Z=ne:te=ne+1}return te}e.findFirstInSorted=b;function S(oe,se,te){if(oe=oe|0,oe>=se.length)throw new TypeError("invalid index");const Z=se[Math.floor(se.length*Math.random())],ne=[],ce=[],de=[];for(const he of se){const pe=te(he,Z);pe<0?ne.push(he):pe>0?ce.push(he):de.push(he)}return oe<ne.length?S(oe,ne,te):oe<ne.length+de.length?de[0]:S(oe-(ne.length+de.length),ce,te)}e.quickSelect=S;function C(oe,se){const te=[];let Z;for(const ne of oe.slice(0).sort(se))!Z||se(Z[0],ne)!==0?(Z=[ne],te.push(Z)):Z.push(ne);return te}e.groupBy=C;function r(oe,se,te){const Z=[];function ne(he,pe,me){if(pe===0&&me.length===0)return;const Se=Z[Z.length-1];Se&&Se.start+Se.deleteCount===he?(Se.deleteCount+=pe,Se.toInsert.push(...me)):Z.push({start:he,deleteCount:pe,toInsert:me})}let ce=0,de=0;for(;;){if(ce===oe.length){ne(ce,0,se.slice(de));break}if(de===se.length){ne(ce,oe.length-ce,[]);break}const he=oe[ce],pe=se[de],me=te(he,pe);me===0?(ce+=1,de+=1):me<0?(ne(ce,1,[]),ce+=1):me>0&&(ne(ce,0,[pe]),de+=1)}return Z}e.sortedDiff=r;function u(oe,se,te){const Z=r(oe,se,te),ne=[],ce=[];for(const de of Z)ne.push(...oe.slice(de.start,de.start+de.deleteCount)),ce.push(...de.toInsert);return{removed:ne,added:ce}}e.delta=u;function i(oe,se,te){if(te===0)return[];const Z=oe.slice(0,te).sort(se);return c(oe,se,Z,te,oe.length),Z}e.top=i;function f(oe,se,te,Z,ne){return te===0?Promise.resolve([]):new Promise((ce,de)=>{(async()=>{const he=oe.length,pe=oe.slice(0,te).sort(se);for(let me=te,Se=Math.min(te+Z,he);me<he;me=Se,Se=Math.min(Se+Z,he)){if(me>te&&await new Promise(Ie=>setTimeout(Ie)),ne&&ne.isCancellationRequested)throw new t.CancellationError;c(oe,se,pe,me,Se)}return pe})().then(ce,de)})}e.topAsync=f;function c(oe,se,te,Z,ne){for(const ce=te.length;Z<ne;Z++){const de=oe[Z];if(se(de,te[ce-1])<0){te.pop();const he=b(te,pe=>se(de,pe)<0);te.splice(he,0,de)}}}function l(oe){return oe.filter(se=>!!se)}e.coalesce=l;function s(oe){let se=0;for(let te=0;te<oe.length;te++)oe[te]&&(oe[se]=oe[te],se+=1);oe.length=se}e.coalesceInPlace=s;function d(oe,se,te){oe.splice(te,0,oe.splice(se,1)[0])}e.move=d;function n(oe){return!Array.isArray(oe)||oe.length===0}e.isFalsyOrEmpty=n;function a(oe){return Array.isArray(oe)&&oe.length>0}e.isNonEmptyArray=a;function o(oe,se=te=>te){const te=new Set;return oe.filter(Z=>{const ne=se(Z);return te.has(ne)?!1:(te.add(ne),!0)})}e.distinct=o;function g(oe){const se=new Set;return te=>{const Z=oe(te);return se.has(Z)?!1:(se.add(Z),!0)}}e.uniqueFilter=g;function h(oe,se){const te=v(oe,se);if(te!==-1)return oe[te]}e.findLast=h;function v(oe,se){for(let te=oe.length-1;te>=0;te--){const Z=oe[te];if(se(Z))return te}return-1}e.lastIndex=v;function m(oe,se){return oe.length>0?oe[0]:se}e.firstOrDefault=m;function w(oe,se){return oe.length>0?oe[oe.length-1]:se}e.lastOrDefault=w;function D(oe,se,te=(Z,ne)=>Z===ne){let Z=0;for(let ne=0,ce=Math.min(oe.length,se.length);ne<ce&&te(oe[ne],se[ne]);ne++)Z++;return Z}e.commonPrefixLength=D;function y(oe){return[].concat(...oe)}e.flatten=y;function T(oe,se){let te=typeof se=="number"?oe:0;typeof se=="number"?te=oe:(te=0,se=oe);const Z=[];if(te<=se)for(let ne=te;ne<se;ne++)Z.push(ne);else for(let ne=te;ne>se;ne--)Z.push(ne);return Z}e.range=T;function _(oe,se,te){return oe.reduce((Z,ne)=>(Z[se(ne)]=te?te(ne):ne,Z),Object.create(null))}e.index=_;function L(oe,se){return oe.push(se),()=>M(oe,se)}e.insert=L;function M(oe,se){const te=oe.indexOf(se);if(te>-1)return oe.splice(te,1),se}e.remove=M;function O(oe,se,te){const Z=oe.slice(0,se),ne=oe.slice(se);return Z.concat(te,ne)}e.arrayInsert=O;function N(oe,se){let te;if(typeof se=="number"){let Z=se;te=()=>{const ne=Math.sin(Z++)*179426549;return ne-Math.floor(ne)}}else te=Math.random;for(let Z=oe.length-1;Z>0;Z-=1){const ne=Math.floor(te()*(Z+1)),ce=oe[Z];oe[Z]=oe[ne],oe[ne]=ce}}e.shuffle=N;function P(oe,se){const te=oe.indexOf(se);te>-1&&(oe.splice(te,1),oe.unshift(se))}e.pushToStart=P;function B(oe,se){const te=oe.indexOf(se);te>-1&&(oe.splice(te,1),oe.push(se))}e.pushToEnd=B;function V(oe,se){for(const te of se)oe.push(te)}e.pushMany=V;function z(oe,se){return Array.isArray(oe)?oe.map(se):se(oe)}e.mapArrayOrNot=z;function x(oe){return Array.isArray(oe)?oe:[oe]}e.asArray=x;function H(oe){return oe[Math.floor(Math.random()*oe.length)]}e.getRandomElement=H;function W(oe,se){for(const te of oe){const Z=se(te);if(Z!==void 0)return Z}}e.mapFind=W;function U(oe,se,te){const Z=q(oe,se),ne=oe.length,ce=te.length;oe.length=ne+ce;for(let de=ne-1;de>=Z;de--)oe[de+ce]=oe[de];for(let de=0;de<ce;de++)oe[de+Z]=te[de]}e.insertInto=U;function $(oe,se,te,Z){const ne=q(oe,se),ce=oe.splice(ne,te);return U(oe,ne,Z),ce}e.splice=$;function q(oe,se){return se<0?Math.max(se+oe.length,0):Math.min(se,oe.length)}var X;(function(oe){function se(ne){return ne<0}oe.isLessThan=se;function te(ne){return ne>0}oe.isGreaterThan=te;function Z(ne){return ne===0}oe.isNeitherLessOrGreaterThan=Z,oe.greaterThan=1,oe.lessThan=-1,oe.neitherLessOrGreaterThan=0})(X=e.CompareResult||(e.CompareResult={}));function G(oe,se){return(te,Z)=>se(oe(te),oe(Z))}e.compareBy=G;function Q(...oe){return(se,te)=>{for(const Z of oe){const ne=Z(se,te);if(!X.isNeitherLessOrGreaterThan(ne))return ne}return X.neitherLessOrGreaterThan}}e.tieBreakComparators=Q;const j=(oe,se)=>oe-se;e.numberComparator=j;function K(oe,se){if(oe.length===0)return;let te=oe[0];for(let Z=1;Z<oe.length;Z++){const ne=oe[Z];se(ne,te)>0&&(te=ne)}return te}e.findMaxBy=K;function Y(oe,se){if(oe.length===0)return;let te=oe[0];for(let Z=1;Z<oe.length;Z++){const ne=oe[Z];se(ne,te)>=0&&(te=ne)}return te}e.findLastMaxBy=Y;function ee(oe,se){return K(oe,(te,Z)=>-se(te,Z))}e.findMinBy=ee;class ie{constructor(se){this.items=se,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(se){let te=this.firstIdx;for(;te<this.items.length&&se(this.items[te]);)te++;const Z=te===this.firstIdx?null:this.items.slice(this.firstIdx,te);return this.firstIdx=te,Z}takeFromEndWhile(se){let te=this.lastIdx;for(;te>=0&&se(this.items[te]);)te--;const Z=te===this.lastIdx?null:this.items.slice(te+1,this.lastIdx+1);return this.lastIdx=te,Z}peek(){if(this.length!==0)return this.items[this.firstIdx]}peekLast(){if(this.length!==0)return this.items[this.lastIdx]}dequeue(){const se=this.items[this.firstIdx];return this.firstIdx++,se}removeLast(){const se=this.items[this.lastIdx];return this.lastIdx--,se}takeCount(se){const te=this.items.slice(this.firstIdx,this.firstIdx+se);return this.firstIdx+=se,te}}e.ArrayQueue=ie;class re{constructor(se){this.iterate=se}forEach(se){this.iterate(te=>(se(te),!0))}toArray(){const se=[];return this.iterate(te=>(se.push(te),!0)),se}filter(se){return new re(te=>this.iterate(Z=>se(Z)?te(Z):!0))}map(se){return new re(te=>this.iterate(Z=>te(se(Z))))}some(se){let te=!1;return this.iterate(Z=>(te=se(Z),!te)),te}findFirst(se){let te;return this.iterate(Z=>se(Z)?(te=Z,!1):!0),te}findLast(se){let te;return this.iterate(Z=>(se(Z)&&(te=Z),!0)),te}findLastMaxBy(se){let te,Z=!0;return this.iterate(ne=>((Z||X.isGreaterThan(se(ne,te)))&&(Z=!1,te=ne),!0)),te}}e.CallbackIterable=re,re.empty=new re(oe=>{})}),define(ae[171],le([1,0,21]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assert=e.assertNever=e.ok=void 0;function p(I,b){if(!I)throw new Error(b?`Assertion failed (${b})`:"Assertion Failed")}e.ok=p;function R(I,b="Unreachable"){throw new Error(b)}e.assertNever=R;function A(I){if(!I)throw new t.BugIndicatingError("Assertion Failed")}e.assert=A;function k(I){if(!I()){debugger;I(),(0,t.onUnexpectedError)(new t.BugIndicatingError("Assertion Failed"))}}e.assertFn=k;function E(I,b){let S=0;for(;S<I.length-1;){const C=I[S],r=I[S+1];if(!b(C,r))return!1;S++}return!0}e.checkAdjacentItems=E}),define(ae[154],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.once=void 0;function t(p){const R=this;let A=!1,k;return function(){return A||(A=!0,k=p.apply(R,arguments)),k}}e.once=t}),define(ae[356],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGenerator=e.IdGenerator=void 0;class t{constructor(R){this._prefix=R,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}e.IdGenerator=t,e.defaultGenerator=new t("id#")}),define(ae[88],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Iterable=void 0;var t;(function(p){function R(n){return n&&typeof n=="object"&&typeof n[Symbol.iterator]=="function"}p.is=R;const A=Object.freeze([]);function k(){return A}p.empty=k;function*E(n){yield n}p.single=E;function I(n){return R(n)?n:E(n)}p.wrap=I;function b(n){return n||A}p.from=b;function S(n){return!n||n[Symbol.iterator]().next().done===!0}p.isEmpty=S;function C(n){return n[Symbol.iterator]().next().value}p.first=C;function r(n,a){for(const o of n)if(a(o))return!0;return!1}p.some=r;function u(n,a){for(const o of n)if(a(o))return o}p.find=u;function*i(n,a){for(const o of n)a(o)&&(yield o)}p.filter=i;function*f(n,a){let o=0;for(const g of n)yield a(g,o++)}p.map=f;function*c(...n){for(const a of n)for(const o of a)yield o}p.concat=c;function l(n,a,o){let g=o;for(const h of n)g=a(g,h);return g}p.reduce=l;function*s(n,a,o=n.length){for(a<0&&(a+=n.length),o<0?o+=n.length:o>n.length&&(o=n.length);a<o;a++)yield n[a]}p.slice=s;function d(n,a=Number.POSITIVE_INFINITY){const o=[];if(a===0)return[o,n];const g=n[Symbol.iterator]();for(let h=0;h<a;h++){const v=g.next();if(v.done)return[o,p.empty()];o.push(v.value)}return[o,{[Symbol.iterator](){return g}}]}p.consume=d})(t=e.Iterable||(e.Iterable={}))}),define(ae[123],le([1,0]),function(J,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(o){o[o.None=0]="None",o[o.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",o[o.UnexpectedEndOfString=2]="UnexpectedEndOfString",o[o.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",o[o.InvalidUnicode=4]="InvalidUnicode",o[o.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",o[o.InvalidCharacter=6]="InvalidCharacter"})(t=e.ScanError||(e.ScanError={}));var p;(function(o){o[o.OpenBraceToken=1]="OpenBraceToken",o[o.CloseBraceToken=2]="CloseBraceToken",o[o.OpenBracketToken=3]="OpenBracketToken",o[o.CloseBracketToken=4]="CloseBracketToken",o[o.CommaToken=5]="CommaToken",o[o.ColonToken=6]="ColonToken",o[o.NullKeyword=7]="NullKeyword",o[o.TrueKeyword=8]="TrueKeyword",o[o.FalseKeyword=9]="FalseKeyword",o[o.StringLiteral=10]="StringLiteral",o[o.NumericLiteral=11]="NumericLiteral",o[o.LineCommentTrivia=12]="LineCommentTrivia",o[o.BlockCommentTrivia=13]="BlockCommentTrivia",o[o.LineBreakTrivia=14]="LineBreakTrivia",o[o.Trivia=15]="Trivia",o[o.Unknown=16]="Unknown",o[o.EOF=17]="EOF"})(p=e.SyntaxKind||(e.SyntaxKind={}));var R;(function(o){o[o.InvalidSymbol=1]="InvalidSymbol",o[o.InvalidNumberFormat=2]="InvalidNumberFormat",o[o.PropertyNameExpected=3]="PropertyNameExpected",o[o.ValueExpected=4]="ValueExpected",o[o.ColonExpected=5]="ColonExpected",o[o.CommaExpected=6]="CommaExpected",o[o.CloseBraceExpected=7]="CloseBraceExpected",o[o.CloseBracketExpected=8]="CloseBracketExpected",o[o.EndOfFileExpected=9]="EndOfFileExpected",o[o.InvalidCommentToken=10]="InvalidCommentToken",o[o.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",o[o.UnexpectedEndOfString=12]="UnexpectedEndOfString",o[o.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",o[o.InvalidUnicode=14]="InvalidUnicode",o[o.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",o[o.InvalidCharacter=16]="InvalidCharacter"})(R=e.ParseErrorCode||(e.ParseErrorCode={}));var A;(function(o){o.DEFAULT={allowTrailingComma:!0}})(A=e.ParseOptions||(e.ParseOptions={}));function k(o,g=!1){let h=0;const v=o.length;let m="",w=0,D=16,y=0;function T(B){let V=0,z=0;for(;V<B;){const x=o.charCodeAt(h);if(x>=48&&x<=57)z=z*16+x-48;else if(x>=65&&x<=70)z=z*16+x-65+10;else if(x>=97&&x<=102)z=z*16+x-97+10;else break;h++,V++}return V<B&&(z=-1),z}function _(B){h=B,m="",w=0,D=16,y=0}function L(){const B=h;if(o.charCodeAt(h)===48)h++;else for(h++;h<o.length&&b(o.charCodeAt(h));)h++;if(h<o.length&&o.charCodeAt(h)===46)if(h++,h<o.length&&b(o.charCodeAt(h)))for(h++;h<o.length&&b(o.charCodeAt(h));)h++;else return y=3,o.substring(B,h);let V=h;if(h<o.length&&(o.charCodeAt(h)===69||o.charCodeAt(h)===101))if(h++,(h<o.length&&o.charCodeAt(h)===43||o.charCodeAt(h)===45)&&h++,h<o.length&&b(o.charCodeAt(h))){for(h++;h<o.length&&b(o.charCodeAt(h));)h++;V=h}else y=3;return o.substring(B,V)}function M(){let B="",V=h;for(;;){if(h>=v){B+=o.substring(V,h),y=2;break}const z=o.charCodeAt(h);if(z===34){B+=o.substring(V,h),h++;break}if(z===92){if(B+=o.substring(V,h),h++,h>=v){y=2;break}switch(o.charCodeAt(h++)){case 34:B+='"';break;case 92:B+="\\";break;case 47:B+="/";break;case 98:B+="\b";break;case 102:B+="\f";break;case 110:B+=` `;break;case 114:B+="\r";break;case 116:B+=" ";break;case 117:{const H=T(4);H>=0?B+=String.fromCharCode(H):y=4;break}default:y=5}V=h;continue}if(z>=0&&z<=31)if(I(z)){B+=o.substring(V,h),y=2;break}else y=6;h++}return B}function O(){if(m="",y=0,w=h,h>=v)return w=v,D=17;let B=o.charCodeAt(h);if(E(B)){do h++,m+=String.fromCharCode(B),B=o.charCodeAt(h);while(E(B));return D=15}if(I(B))return h++,m+=String.fromCharCode(B),B===13&&o.charCodeAt(h)===10&&(h++,m+=` `),D=14;switch(B){case 123:return h++,D=1;case 125:return h++,D=2;case 91:return h++,D=3;case 93:return h++,D=4;case 58:return h++,D=6;case 44:return h++,D=5;case 34:return h++,m=M(),D=10;case 47:{const V=h-1;if(o.charCodeAt(h+1)===47){for(h+=2;h<v&&!I(o.charCodeAt(h));)h++;return m=o.substring(V,h),D=12}if(o.charCodeAt(h+1)===42){h+=2;const z=v-1;let x=!1;for(;h<z;){if(o.charCodeAt(h)===42&&o.charCodeAt(h+1)===47){h+=2,x=!0;break}h++}return x||(h++,y=1),m=o.substring(V,h),D=13}return m+=String.fromCharCode(B),h++,D=16}case 45:if(m+=String.fromCharCode(B),h++,h===v||!b(o.charCodeAt(h)))return D=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return m+=L(),D=11;default:for(;h<v&&N(B);)h++,B=o.charCodeAt(h);if(w!==h){switch(m=o.substring(w,h),m){case"true":return D=8;case"false":return D=9;case"null":return D=7}return D=16}return m+=String.fromCharCode(B),h++,D=16}}function N(B){if(E(B)||I(B))return!1;switch(B){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function P(){let B;do B=O();while(B>=12&&B<=15);return B}return{setPosition:_,getPosition:()=>h,scan:g?P:O,getToken:()=>D,getTokenValue:()=>m,getTokenOffset:()=>w,getTokenLength:()=>h-w,getTokenError:()=>y}}e.createScanner=k;function E(o){return o===32||o===9||o===11||o===12||o===160||o===5760||o>=8192&&o<=8203||o===8239||o===8287||o===12288||o===65279}function I(o){return o===10||o===13||o===8232||o===8233}function b(o){return o>=48&&o<=57}var S;(function(o){o[o.nullCharacter=0]="nullCharacter",o[o.maxAsciiCharacter=127]="maxAsciiCharacter",o[o.lineFeed=10]="lineFeed",o[o.carriageReturn=13]="carriageReturn",o[o.lineSeparator=8232]="lineSeparator",o[o.paragraphSeparator=8233]="paragraphSeparator",o[o.nextLine=133]="nextLine",o[o.space=32]="space",o[o.nonBreakingSpace=160]="nonBreakingSpace",o[o.enQuad=8192]="enQuad",o[o.emQuad=8193]="emQuad",o[o.enSpace=8194]="enSpace",o[o.emSpace=8195]="emSpace",o[o.threePerEmSpace=8196]="threePerEmSpace",o[o.fourPerEmSpace=8197]="fourPerEmSpace",o[o.sixPerEmSpace=8198]="sixPerEmSpace",o[o.figureSpace=8199]="figureSpace",o[o.punctuationSpace=8200]="punctuationSpace",o[o.thinSpace=8201]="thinSpace",o[o.hairSpace=8202]="hairSpace",o[o.zeroWidthSpace=8203]="zeroWidthSpace",o[o.narrowNoBreakSpace=8239]="narrowNoBreakSpace",o[o.ideographicSpace=12288]="ideographicSpace",o[o.mathematicalSpace=8287]="mathematicalSpace",o[o.ogham=5760]="ogham",o[o._=95]="_",o[o.$=36]="$",o[o._0=48]="_0",o[o._1=49]="_1",o[o._2=50]="_2",o[o._3=51]="_3",o[o._4=52]="_4",o[o._5=53]="_5",o[o._6=54]="_6",o[o._7=55]="_7",o[o._8=56]="_8",o[o._9=57]="_9",o[o.a=97]="a",o[o.b=98]="b",o[o.c=99]="c",o[o.d=100]="d",o[o.e=101]="e",o[o.f=102]="f",o[o.g=103]="g",o[o.h=104]="h",o[o.i=105]="i",o[o.j=106]="j",o[o.k=107]="k",o[o.l=108]="l",o[o.m=109]="m",o[o.n=110]="n",o[o.o=111]="o",o[o.p=112]="p",o[o.q=113]="q",o[o.r=114]="r",o[o.s=115]="s",o[o.t=116]="t",o[o.u=117]="u",o[o.v=118]="v",o[o.w=119]="w",o[o.x=120]="x",o[o.y=121]="y",o[o.z=122]="z",o[o.A=65]="A",o[o.B=66]="B",o[o.C=67]="C",o[o.D=68]="D",o[o.E=69]="E",o[o.F=70]="F",o[o.G=71]="G",o[o.H=72]="H",o[o.I=73]="I",o[o.J=74]="J",o[o.K=75]="K",o[o.L=76]="L",o[o.M=77]="M",o[o.N=78]="N",o[o.O=79]="O",o[o.P=80]="P",o[o.Q=81]="Q",o[o.R=82]="R",o[o.S=83]="S",o[o.T=84]="T",o[o.U=85]="U",o[o.V=86]="V",o[o.W=87]="W",o[o.X=88]="X",o[o.Y=89]="Y",o[o.Z=90]="Z",o[o.ampersand=38]="ampersand",o[o.asterisk=42]="asterisk",o[o.at=64]="at",o[o.backslash=92]="backslash",o[o.bar=124]="bar",o[o.caret=94]="caret",o[o.closeBrace=125]="closeBrace",o[o.closeBracket=93]="closeBracket",o[o.closeParen=41]="closeParen",o[o.colon=58]="colon",o[o.comma=44]="comma",o[o.dot=46]="dot",o[o.doubleQuote=34]="doubleQuote",o[o.equals=61]="equals",o[o.exclamation=33]="exclamation",o[o.greaterThan=62]="greaterThan",o[o.lessThan=60]="lessThan",o[o.minus=45]="minus",o[o.openBrace=123]="openBrace",o[o.openBracket=91]="openBracket",o[o.openParen=40]="openParen",o[o.percent=37]="percent",o[o.plus=43]="plus",o[o.question=63]="question",o[o.semicolon=59]="semicolon",o[o.singleQuote=39]="singleQuote",o[o.slash=47]="slash",o[o.tilde=126]="tilde",o[o.backspace=8]="backspace",o[o.formFeed=12]="formFeed",o[o.byteOrderMark=65279]="byteOrderMark",o[o.tab=9]="tab",o[o.verticalTab=11]="verticalTab"})(S||(S={}));function C(o,g){const h=[],v=new Object;let m;const w={value:{},offset:0,length:0,type:"object",parent:void 0};let D=!1;function y(T,_,L,M){w.value=T,w.offset=_,w.length=L,w.type=M,w.colonOffset=void 0,m=w}try{d(o,{onObjectBegin:(T,_)=>{if(g<=T)throw v;m=void 0,D=g>T,h.push("")},onObjectProperty:(T,_,L)=>{if(g<_||(y(T,_,L,"property"),h[h.length-1]=T,g<=_+L))throw v},onObjectEnd:(T,_)=>{if(g<=T)throw v;m=void 0,h.pop()},onArrayBegin:(T,_)=>{if(g<=T)throw v;m=void 0,h.push(0)},onArrayEnd:(T,_)=>{if(g<=T)throw v;m=void 0,h.pop()},onLiteralValue:(T,_,L)=>{if(g<_||(y(T,_,L,a(T)),g<=_+L))throw v},onSeparator:(T,_,L)=>{if(g<=_)throw v;if(T===":"&&m&&m.type==="property")m.colonOffset=_,D=!1,m=void 0;else if(T===","){const M=h[h.length-1];typeof M=="number"?h[h.length-1]=M+1:(D=!0,h[h.length-1]=""),m=void 0}}})}catch(T){if(T!==v)throw T}return{path:h,previousNode:m,isAtPropertyKey:D,matches:T=>{let _=0;for(let L=0;_<T.length&&L<h.length;L++)if(T[_]===h[L]||T[_]==="*")_++;else if(T[_]!=="**")return!1;return _===T.length}}}e.getLocation=C;function r(o,g=[],h=A.DEFAULT){let v=null,m=[];const w=[];function D(T){Array.isArray(m)?m.push(T):v!==null&&(m[v]=T)}return d(o,{onObjectBegin:()=>{const T={};D(T),w.push(m),m=T,v=null},onObjectProperty:T=>{v=T},onObjectEnd:()=>{m=w.pop()},onArrayBegin:()=>{const T=[];D(T),w.push(m),m=T,v=null},onArrayEnd:()=>{m=w.pop()},onLiteralValue:D,onError:(T,_,L)=>{g.push({error:T,offset:_,length:L})}},h),m[0]}e.parse=r;function u(o,g=[],h=A.DEFAULT){let v={type:"array",offset:-1,length:-1,children:[],parent:void 0};function m(T){v.type==="property"&&(v.length=T-v.offset,v=v.parent)}function w(T){return v.children.push(T),T}d(o,{onObjectBegin:T=>{v=w({type:"object",offset:T,length:-1,parent:v,children:[]})},onObjectProperty:(T,_,L)=>{v=w({type:"property",offset:_,length:-1,parent:v,children:[]}),v.children.push({type:"string",value:T,offset:_,length:L,parent:v})},onObjectEnd:(T,_)=>{v.length=T+_-v.offset,v=v.parent,m(T+_)},onArrayBegin:(T,_)=>{v=w({type:"array",offset:T,length:-1,parent:v,children:[]})},onArrayEnd:(T,_)=>{v.length=T+_-v.offset,v=v.parent,m(T+_)},onLiteralValue:(T,_,L)=>{w({type:a(T),offset:_,length:L,parent:v,value:T}),m(_+L)},onSeparator:(T,_,L)=>{v.type==="property"&&(T===":"?v.colonOffset=_:T===","&&m(_))},onError:(T,_,L)=>{g.push({error:T,offset:_,length:L})}},h);const y=v.children[0];return y&&delete y.parent,y}e.parseTree=u;function i(o,g){if(!o)return;let h=o;for(const v of g)if(typeof v=="string"){if(h.type!=="object"||!Array.isArray(h.children))return;let m=!1;for(const w of h.children)if(Array.isArray(w.children)&&w.children[0].value===v){h=w.children[1],m=!0;break}if(!m)return}else{const m=v;if(h.type!=="array"||m<0||!Array.isArray(h.children)||m>=h.children.length)return;h=h.children[m]}return h}e.findNodeAtLocation=i;function f(o){if(!o.parent||!o.parent.children)return[];const g=f(o.parent);if(o.parent.type==="property"){const h=o.parent.children[0].value;g.push(h)}else if(o.parent.type==="array"){const h=o.parent.children.indexOf(o);h!==-1&&g.push(h)}return g}e.getNodePath=f;function c(o){switch(o.type){case"array":return o.children.map(c);case"object":{const g=Object.create(null);for(const h of o.children){const v=h.children[1];v&&(g[h.children[0].value]=c(v))}return g}case"null":case"string":case"number":case"boolean":return o.value;default:return}}e.getNodeValue=c;function l(o,g,h=!1){return g>=o.offset&&g<o.offset+o.length||h&&g===o.offset+o.length}e.contains=l;function s(o,g,h=!1){if(l(o,g,h)){const v=o.children;if(Array.isArray(v))for(let m=0;m<v.length&&v[m].offset<=g;m++){const w=s(v[m],g,h);if(w)return w}return o}}e.findNodeAtOffset=s;function d(o,g,h=A.DEFAULT){const v=k(o,!1);function m(G){return G?()=>G(v.getTokenOffset(),v.getTokenLength()):()=>!0}function w(G){return G?Q=>G(Q,v.getTokenOffset(),v.getTokenLength()):()=>!0}const D=m(g.onObjectBegin),y=w(g.onObjectProperty),T=m(g.onObjectEnd),_=m(g.onArrayBegin),L=m(g.onArrayEnd),M=w(g.onLiteralValue),O=w(g.onSeparator),N=m(g.onComment),P=w(g.onError),B=h&&h.disallowComments,V=h&&h.allowTrailingComma;function z(){for(;;){const G=v.scan();switch(v.getTokenError()){case 4:x(14);break;case 5:x(15);break;case 3:x(13);break;case 1:B||x(11);break;case 2:x(12);break;case 6:x(16);break}switch(G){case 12:case 13:B?x(10):N();break;case 16:x(1);break;case 15:case 14:break;default:return G}}}function x(G,Q=[],j=[]){if(P(G),Q.length+j.length>0){let K=v.getToken();for(;K!==17;){if(Q.indexOf(K)!==-1){z();break}else if(j.indexOf(K)!==-1)break;K=z()}}}function H(G){const Q=v.getTokenValue();return G?M(Q):y(Q),z(),!0}function W(){switch(v.getToken()){case 11:{let G=0;try{G=JSON.parse(v.getTokenValue()),typeof G!="number"&&(x(2),G=0)}catch{x(2)}M(G);break}case 7:M(null);break;case 8:M(!0);break;case 9:M(!1);break;default:return!1}return z(),!0}function U(){return v.getToken()!==10?(x(3,[],[2,5]),!1):(H(!1),v.getToken()===6?(O(":"),z(),X()||x(4,[],[2,5])):x(5,[],[2,5]),!0)}function $(){D(),z();let G=!1;for(;v.getToken()!==2&&v.getToken()!==17;){if(v.getToken()===5){if(G||x(4,[],[]),O(","),z(),v.getToken()===2&&V)break}else G&&x(6,[],[]);U()||x(4,[],[2,5]),G=!0}return T(),v.getToken()!==2?x(7,[2],[]):z(),!0}function q(){_(),z();let G=!1;for(;v.getToken()!==4&&v.getToken()!==17;){if(v.getToken()===5){if(G||x(4,[],[]),O(","),z(),v.getToken()===4&&V)break}else G&&x(6,[],[]);X()||x(4,[],[4,5]),G=!0}return L(),v.getToken()!==4?x(8,[4],[]):z(),!0}function X(){switch(v.getToken()){case 3:return q();case 1:return $();case 10:return H(!0);default:return W()}}return z(),v.getToken()===17?h.allowEmptyContent?!0:(x(4,[],[]),!1):X()?(v.getToken()!==17&&x(9,[],[]),!0):(x(4,[],[]),!1)}e.visit=d;function n(o,g){const h=k(o),v=[];let m,w=0,D;do switch(D=h.getPosition(),m=h.scan(),m){case 12:case 13:case 17:w!==D&&v.push(o.substring(w,D)),g!==void 0&&v.push(h.getTokenValue().replace(/[^\r\n]/g,g)),w=h.getPosition();break}while(m!==17);return v.join("")}e.stripComments=n;function a(o){switch(typeof o){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(o){if(Array.isArray(o))return"array"}else return"null";return"object"}default:return"null"}}e.getNodeType=a}),define(ae[321],le([1,0,123]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEOL=e.getEOL=e.toFormattedString=e.format=void 0;function p(b,S,C){let r,u,i,f,c;if(S){for(f=S.offset,c=f+S.length,i=f;i>0&&!I(b,i-1);)i--;let D=c;for(;D<b.length&&!I(b,D);)D++;u=b.substring(i,D),r=k(u,C)}else u=b,r=0,i=0,f=0,c=b.length;const l=E(C,b);let s=!1,d=0,n;C.insertSpaces?n=A(" ",C.tabSize||4):n=" ";const a=(0,t.createScanner)(u,!1);let o=!1;function g(){return l+A(n,r+d)}function h(){let D=a.scan();for(s=!1;D===15||D===14;)s=s||D===14,D=a.scan();return o=D===16||a.getTokenError()!==0,D}const v=[];function m(D,y,T){!o&&y<c&&T>f&&b.substring(y,T)!==D&&v.push({offset:y,length:T-y,content:D})}let w=h();if(w!==17){const D=a.getTokenOffset()+i,y=A(n,r);m(y,i,D)}for(;w!==17;){let D=a.getTokenOffset()+a.getTokenLength()+i,y=h(),T="";for(;!s&&(y===12||y===13);){const L=a.getTokenOffset()+i;m(" ",D,L),D=a.getTokenOffset()+a.getTokenLength()+i,T=y===12?g():"",y=h()}if(y===2)w!==1&&(d--,T=g());else if(y===4)w!==3&&(d--,T=g());else{switch(w){case 3:case 1:d++,T=g();break;case 5:case 12:T=g();break;case 13:s?T=g():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&&(o=!0);break;case 16:o=!0;break}s&&(y===12||y===13)&&(T=g())}const _=a.getTokenOffset()+i;m(T,D,_),w=y}return v}e.format=p;function R(b,S){const C=JSON.stringify(b,void 0,S.insertSpaces?S.tabSize||4:" ");return S.eol!==void 0?C.replace(/\r\n|\r|\n/g,S.eol):C}e.toFormattedString=R;function A(b,S){let C="";for(let r=0;r<S;r++)C+=b;return C}function k(b,S){let C=0,r=0;const u=S.tabSize||4;for(;C<b.length;){const i=b.charAt(C);if(i===" ")r++;else if(i===" ")r+=u;else break;C++}return Math.floor(r/u)}function E(b,S){for(let C=0;C<S.length;C++){const r=S.charAt(C);if(r==="\r")return C+1<S.length&&S.charAt(C+1)===` `?`\r `:"\r";if(r===` `)return` `}return b&&b.eol||` `}e.getEOL=E;function I(b,S){return`\r `.indexOf(b.charAt(S))!==-1}e.isEOL=I}),define(ae[322],le([1,0,123,321]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyEdits=e.applyEdit=e.withFormatting=e.setProperty=e.removeProperty=void 0;function R(b,S,C){return A(b,S,void 0,C)}e.removeProperty=R;function A(b,S,C,r,u){const i=S.slice(),f=[],c=(0,t.parseTree)(b,f);let l,s;for(;i.length>0&&(s=i.pop(),l=(0,t.findNodeAtLocation)(c,i),l===void 0&&C!==void 0);)typeof s=="string"?C={[s]:C}:C=[C];if(l)if(l.type==="object"&&typeof s=="string"&&Array.isArray(l.children)){const d=(0,t.findNodeAtLocation)(l,[s]);if(d!==void 0)if(C===void 0){if(!d.parent)throw new Error("Malformed AST");const n=l.children.indexOf(d.parent);let a,o=d.parent.offset+d.parent.length;if(n>0){const g=l.children[n-1];a=g.offset+g.length}else a=l.offset+1,l.children.length>1&&(o=l.children[1].offset);return k(b,{offset:a,length:o-a,content:""},r)}else return k(b,{offset:d.offset,length:d.length,content:JSON.stringify(C)},r);else{if(C===void 0)return[];const n=`${JSON.stringify(s)}: ${JSON.stringify(C)}`,a=u?u(l.children.map(g=>g.children[0].value)):l.children.length;let o;if(a>0){const g=l.children[a-1];o={offset:g.offset+g.length,length:0,content:","+n}}else l.children.length===0?o={offset:l.offset+1,length:0,content:n}:o={offset:l.offset+1,length:0,content:n+","};return k(b,o,r)}}else if(l.type==="array"&&typeof s=="number"&&Array.isArray(l.children))if(C!==void 0){const d=`${JSON.stringify(C)}`;let n;if(l.children.length===0||s===0)n={offset:l.offset+1,length:0,content:l.children.length===0?d:d+","};else{const a=s===-1||s>l.children.length?l.children.length:s,o=l.children[a-1];n={offset:o.offset+o.length,length:0,content:","+d}}return k(b,n,r)}else{const d=s,n=l.children[d];let a;if(l.children.length===1)a={offset:l.offset+1,length:l.length-2,content:""};else if(l.children.length-1===d){const o=l.children[d-1],g=o.offset+o.length,h=l.offset+l.length;a={offset:g,length:h-2-g,content:""}}else a={offset:n.offset,length:l.children[d+1].offset-n.offset,content:""};return k(b,a,r)}else throw new Error(`Can not add ${typeof s!="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(b,{offset:c?c.offset:0,length:c?c.length:0,content:JSON.stringify(C)},r)}}e.setProperty=A;function k(b,S,C){let r=E(b,S),u=S.offset,i=S.offset+S.content.length;if(S.length===0||S.content.length===0){for(;u>0&&!(0,p.isEOL)(r,u-1);)u--;for(;i<r.length&&!(0,p.isEOL)(r,i);)i++}const f=(0,p.format)(r,{offset:u,length:i-u},C);for(let l=f.length-1;l>=0;l--){const s=f[l];r=E(r,s),u=Math.min(u,s.offset),i=Math.max(i,s.offset+s.length),i+=s.content.length-s.length}const c=b.length-(r.length-i)-u;return[{offset:u,length:c,content:r.substring(u,i)}]}e.withFormatting=k;function E(b,S){return b.substring(0,S.offset)+S.content+b.substring(S.offset+S.length)}e.applyEdit=E;function I(b,S){const C=S.slice(0).sort((u,i)=>{const f=u.offset-i.offset;return f===0?u.length-i.length:f});let r=b.length;for(let u=C.length-1;u>=0;u--){const i=C[u];if(i.offset+i.length<=r)b=E(b,i);else throw new Error("Overlapping edit");r=i.offset}return b}e.applyEdits=I}),define(ae[99],le([1,0]),function(J,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 p;(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"})(p=e.ScanCode||(e.ScanCode={}));class R{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(f,c){this._keyCodeToStr[f]=c,this._strToKeyCode[c.toLowerCase()]=f}keyCodeToStr(f){return this._keyCodeToStr[f]}strToKeyCode(f){return this._strToKeyCode[f.toLowerCase()]||0}}const A=new R,k=new R,E=new R;e.EVENT_KEY_CODE_MAP=new Array(230),e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE={};const I=[],b=Object.create(null),S=Object.create(null);e.ScanCodeUtils={lowerCaseToEnum:i=>S[i]||0,toEnum:i=>b[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="",f=[[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]],c=[],l=[];for(const s of f){const[d,n,a,o,g,h,v,m,w,D]=s;if(l[a]||(l[a]=!0,I[a]=o,b[o]=a,S[o.toLowerCase()]=a,n&&(e.IMMUTABLE_CODE_TO_KEY_CODE[a]=g,g!==0&&g!==3&&g!==5&&g!==4&&g!==6&&g!==57&&(e.IMMUTABLE_KEY_CODE_TO_CODE[g]=a))),!c[g]){if(c[g]=!0,!h)throw new Error(`String representation missing for key code ${g} around scan code ${o}`);A.define(g,h),k.define(g,w||h),E.define(g,D||w||h)}v&&(e.EVENT_KEY_CODE_MAP[v]=g),m&&(e.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[m]=g)}e.IMMUTABLE_KEY_CODE_TO_CODE[3]=46})();var C;(function(i){function f(a){return A.keyCodeToStr(a)}i.toString=f;function c(a){return A.strToKeyCode(a)}i.fromString=c;function l(a){return k.keyCodeToStr(a)}i.toUserSettingsUS=l;function s(a){return E.keyCodeToStr(a)}i.toUserSettingsGeneral=s;function d(a){return k.strToKeyCode(a)||E.strToKeyCode(a)}i.fromUserSettings=d;function n(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=n})(C=e.KeyCodeUtils||(e.KeyCodeUtils={}));var r;(function(i){i[i.CtrlCmd=2048]="CtrlCmd",i[i.Shift=1024]="Shift",i[i.Alt=512]="Alt",i[i.WinCtrl=256]="WinCtrl"})(r=e.KeyMod||(e.KeyMod={}));function u(i,f){const c=(f&65535)<<16>>>0;return(i|c)>>>0}e.KeyChord=u}),define(ae[234],le([1,0,21]),function(J,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 p;(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"})(p||(p={}));function R(C,r){if(C===0)return null;const u=(C&65535)>>>0,i=(C&4294901760)>>>16;return i!==0?new E([A(u,r),A(i,r)]):new E([A(u,r)])}e.createKeybinding=R;function A(C,r){const u=!!(C&2048),i=!!(C&256),f=r===2?i:u,c=!!(C&1024),l=!!(C&512),s=r===2?u:i,d=C&255;return new k(f,c,l,s,d)}e.createSimpleKeybinding=A;class k{constructor(r,u,i,f,c){this.ctrlKey=r,this.shiftKey=u,this.altKey=i,this.metaKey=f,this.keyCode=c}equals(r){return this.ctrlKey===r.ctrlKey&&this.shiftKey===r.shiftKey&&this.altKey===r.altKey&&this.metaKey===r.metaKey&&this.keyCode===r.keyCode}getHashCode(){const r=this.ctrlKey?"1":"0",u=this.shiftKey?"1":"0",i=this.altKey?"1":"0",f=this.metaKey?"1":"0";return`${r}${u}${i}${f}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new E([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 E{constructor(r){if(r.length===0)throw(0,t.illegalArgument)("parts");this.parts=r}getHashCode(){let r="";for(let u=0,i=this.parts.length;u<i;u++)u!==0&&(r+=";"),r+=this.parts[u].getHashCode();return r}equals(r){if(r===null||this.parts.length!==r.parts.length)return!1;for(let u=0;u<this.parts.length;u++)if(!this.parts[u].equals(r.parts[u]))return!1;return!0}}e.ChordKeybinding=E;class I{constructor(r,u,i,f,c){this.ctrlKey=r,this.shiftKey=u,this.altKey=i,this.metaKey=f,this.scanCode=c}equals(r){return this.ctrlKey===r.ctrlKey&&this.shiftKey===r.shiftKey&&this.altKey===r.altKey&&this.metaKey===r.metaKey&&this.scanCode===r.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 b{constructor(r,u,i,f,c,l){this.ctrlKey=r,this.shiftKey=u,this.altKey=i,this.metaKey=f,this.keyLabel=c,this.keyAriaLabel=l}}e.ResolvedKeybindingPart=b;class S{}e.ResolvedKeybinding=S}),define(ae[477],le([1,0,99,234]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingParser=void 0;class R{static _readModifiers(k){k=k.toLowerCase().trim();let E=!1,I=!1,b=!1,S=!1,C;do C=!1,/^ctrl(\+|\-)/.test(k)&&(E=!0,k=k.substr(5),C=!0),/^shift(\+|\-)/.test(k)&&(I=!0,k=k.substr(6),C=!0),/^alt(\+|\-)/.test(k)&&(b=!0,k=k.substr(4),C=!0),/^meta(\+|\-)/.test(k)&&(S=!0,k=k.substr(5),C=!0),/^win(\+|\-)/.test(k)&&(S=!0,k=k.substr(4),C=!0),/^cmd(\+|\-)/.test(k)&&(S=!0,k=k.substr(4),C=!0);while(C);let r;const u=k.indexOf(" ");return u>0?(r=k.substring(0,u),k=k.substring(u)):(r=k,k=""),{remains:k,ctrl:E,shift:I,alt:b,meta:S,key:r}}static parseSimpleKeybinding(k){const E=this._readModifiers(k),I=t.KeyCodeUtils.fromUserSettings(E.key);return[new p.SimpleKeybinding(E.ctrl,E.shift,E.alt,E.meta,I),E.remains]}static parseKeybinding(k,E){if(!k)return null;const I=[];let b;do[b,k]=this.parseSimpleKeybinding(k),I.push(b);while(k.length>0);return new p.ChordKeybinding(I)}static parseSimpleUserBinding(k){const E=this._readModifiers(k),I=E.key.match(/^\[([^\]]+)\]$/);if(I){const S=I[1],C=t.ScanCodeUtils.lowerCaseToEnum(S);return[new p.ScanCodeBinding(E.ctrl,E.shift,E.alt,E.meta,C),E.remains]}const b=t.KeyCodeUtils.fromUserSettings(E.key);return[new p.SimpleKeybinding(E.ctrl,E.shift,E.alt,E.meta,b),E.remains]}static parseUserBinding(k){if(!k)return[];const E=[];let I;for(;k.length>0;)[I,k]=this.parseSimpleUserBinding(k),E.push(I);return E}}e.KeybindingParser=R}),define(ae[206],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Lazy=void 0;class t{constructor(R){this.executor=R,this._didRun=!1}hasValue(){return this._didRun}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(R){this._error=R}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}map(R){return new t(()=>R(this.getValue()))}}e.Lazy=t}),define(ae[2],le([1,0,154,88]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.disposeOnReturn=e.ImmortalReference=e.AsyncReferenceCollection=e.ReferenceCollection=e.SafeDisposable=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.disposeIfDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.setDisposableTracker=void 0;const R=!1;let A=null;function k(w){A=w}if(e.setDisposableTracker=k,R){const w="__is_disposable_tracked__";k(new class{trackDisposable(D){const y=new Error("Potentially leaked disposable").stack;setTimeout(()=>{D[w]||console.log(y)},3e3)}setParent(D,y){if(D&&D!==s.None)try{D[w]=!0}catch{}}markAsDisposed(D){if(D&&D!==s.None)try{D[w]=!0}catch{}}markAsSingleton(D){}})}function E(w){return A?.trackDisposable(w),w}function I(w){A?.markAsDisposed(w)}function b(w,D){A?.setParent(w,D)}function S(w,D){if(!!A)for(const y of w)A.setParent(y,D)}function C(w){return A?.markAsSingleton(w),w}e.markAsSingleton=C;function r(w){return typeof w.dispose=="function"&&w.dispose.length===0}e.isDisposable=r;function u(w){if(p.Iterable.is(w)){const D=[];for(const y of w)if(y)try{y.dispose()}catch(T){D.push(T)}if(D.length===1)throw D[0];if(D.length>1)throw new AggregateError(D,"Encountered errors while disposing of store");return Array.isArray(w)?[]:w}else if(w)return w.dispose(),w}e.dispose=u;function i(w){for(const D of w)r(D)&&D.dispose();return[]}e.disposeIfDisposable=i;function f(...w){const D=c(()=>u(w));return S(w,D),D}e.combinedDisposable=f;function c(w){const D=E({dispose:(0,t.once)(()=>{I(D),w()})});return D}e.toDisposable=c;class l{constructor(){this._toDispose=new Set,this._isDisposed=!1,E(this)}dispose(){this._isDisposed||(I(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{u(this._toDispose)}finally{this._toDispose.clear()}}add(D){if(!D)return D;if(D===this)throw new Error("Cannot register a disposable on itself!");return b(D,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(D),D}}e.DisposableStore=l,l.DISABLE_DISPOSED_WARNING=!1;class s{constructor(){this._store=new l,E(this),b(this._store,this)}dispose(){I(this),this._store.dispose()}_register(D){if(D===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(D)}}e.Disposable=s,s.None=Object.freeze({dispose(){}});class d{constructor(){this._isDisposed=!1,E(this)}get value(){return this._isDisposed?void 0:this._value}set value(D){this._isDisposed||D===this._value||(this._value?.dispose(),D&&b(D,this),this._value=D)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,I(this),this._value?.dispose(),this._value=void 0}clearAndLeak(){const D=this._value;return this._value=void 0,D&&b(D,null),D}}e.MutableDisposable=d;class n{constructor(D){this._disposable=D,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=n;class a{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1,E(this)}set(D){let y=D;return this.unset=()=>y=void 0,this.isset=()=>y!==void 0,this.dispose=()=>{y&&(y(),y=void 0,I(this))},this}}e.SafeDisposable=a;class o{constructor(){this.references=new Map}acquire(D,...y){let T=this.references.get(D);T||(T={counter:0,object:this.createReferencedObject(D,...y)},this.references.set(D,T));const{object:_}=T,L=(0,t.once)(()=>{--T.counter===0&&(this.destroyReferencedObject(D,T.object),this.references.delete(D))});return T.counter++,{object:_,dispose:L}}}e.ReferenceCollection=o;class g{constructor(D){this.referenceCollection=D}async acquire(D,...y){const T=this.referenceCollection.acquire(D,...y);try{return{object:await T.object,dispose:()=>T.dispose()}}catch(_){throw T.dispose(),_}}}e.AsyncReferenceCollection=g;class h{constructor(D){this.object=D}dispose(){}}e.ImmortalReference=h;function v(w){const D=new l;try{w(D)}finally{D.dispose()}}e.disposeOnReturn=v;class m{constructor(){this._store=new Map,this._isDisposed=!1,E(this)}dispose(){I(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(!!this._store.size)try{u(this._store.values())}finally{this._store.clear()}}has(D){return this._store.has(D)}get(D){return this._store.get(D)}set(D,y,T=!1){this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),T||this._store.get(D)?.dispose(),this._store.set(D,y)}deleteAndDispose(D){this._store.get(D)?.dispose(),this._store.delete(D)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=m}),define(ae[158],le([1,0]),function(J,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 p{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 E=new t(A);if(this._first===t.Undefined)this._first=E,this._last=E;else if(k){const b=this._last;this._last=E,E.prev=b,b.next=E}else{const b=this._first;this._first=E,E.next=b,b.prev=E}this._size+=1;let I=!1;return()=>{I||(I=!0,this._remove(E))}}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=p});var we=this&&this.__decorate||function(J,e,t,p){var R=arguments.length,A=R<3?e:p===null?p=Object.getOwnPropertyDescriptor(e,t):p,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(J,e,t,p);else for(var E=J.length-1;E>=0;E--)(k=J[E])&&(A=(R<3?k(A):R>3?k(e,t,A):k(e,t))||A);return R>3&&A&&Object.defineProperty(e,t,A),A};define(ae[323],le([1,0,112]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseLinkedText=e.LinkedText=void 0;class p{constructor(E){this.nodes=E}toString(){return this.nodes.map(E=>typeof E=="string"?E:E.label).join("")}}we([t.memoize],p.prototype,"toString",null),e.LinkedText=p;const R=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: ("|')([^\3]+)(\3))?\)/gi;function A(k){const E=[];let I=0,b;for(;b=R.exec(k);){b.index-I>0&&E.push(k.substring(I,b.index));const[,S,C,,r]=b;r?E.push({label:S,href:C,title:r}):E.push({label:S,href:C}),I=b.index+b[0].length}return I<k.length&&E.push(k.substring(I)),new p(E)}e.parseLinkedText=A}),define(ae[60],le([1,0]),function(J,e){"use strict";var t,p,R;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=e.ResourceSet=e.ResourceMap=e.setToString=e.mapToString=e.getOrSet=void 0;function A(i,f,c){let l=i.get(f);return l===void 0&&(l=c,i.set(f,l)),l}e.getOrSet=A;function k(i){const f=[];return i.forEach((c,l)=>{f.push(`${l} => ${c}`)}),`Map(${i.size}) {${f.join(", ")}}`}e.mapToString=k;function E(i){const f=[];return i.forEach(c=>{f.push(c)}),`Set(${i.size}) {${f.join(", ")}}`}e.setToString=E;class I{constructor(f,c){this.uri=f,this.value=c}}class b{constructor(f,c){this[t]="ResourceMap",f instanceof b?(this.map=new Map(f.map),this.toKey=c??b.defaultToKey):(this.map=new Map,this.toKey=f??b.defaultToKey)}set(f,c){return this.map.set(this.toKey(f),new I(f,c)),this}get(f){return this.map.get(this.toKey(f))?.value}has(f){return this.map.has(this.toKey(f))}get size(){return this.map.size}clear(){this.map.clear()}delete(f){return this.map.delete(this.toKey(f))}forEach(f,c){typeof c<"u"&&(f=f.bind(c));for(const[l,s]of this.map)f(s.value,s.uri,this)}*values(){for(const f of this.map.values())yield f.value}*keys(){for(const f of this.map.values())yield f.uri}*entries(){for(const f of this.map.values())yield[f.uri,f.value]}*[(t=Symbol.toStringTag,Symbol.iterator)](){for(const[,f]of this.map)yield[f.uri,f.value]}}e.ResourceMap=b,b.defaultToKey=i=>i.toString();class S{constructor(f,c){this[p]="ResourceSet",!f||typeof f=="function"?this._map=new b(f):(this._map=new b(c),f.forEach(this.add,this))}get size(){return this._map.size}add(f){return this._map.set(f,f),this}clear(){this._map.clear()}delete(f){return this._map.delete(f)}forEach(f,c){this._map.forEach((l,s)=>f.call(c,s,s,this))}has(f){return this._map.has(f)}entries(){return this._map.entries()}keys(){return this._map.keys()}values(){return this._map.keys()}[(p=Symbol.toStringTag,Symbol.iterator)](){return this.keys()}}e.ResourceSet=S;var C;(function(i){i[i.None=0]="None",i[i.AsOld=1]="AsOld",i[i.AsNew=2]="AsNew"})(C=e.Touch||(e.Touch={}));class r{constructor(){this[R]="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(f){return this._map.has(f)}get(f,c=0){const l=this._map.get(f);if(!!l)return c!==0&&this.touch(l,c),l.value}set(f,c,l=0){let s=this._map.get(f);if(s)s.value=c,l!==0&&this.touch(s,l);else{switch(s={key:f,value:c,next:void 0,previous:void 0},l){case 0:this.addItemLast(s);break;case 1:this.addItemFirst(s);break;case 2:this.addItemLast(s);break;default:this.addItemLast(s);break}this._map.set(f,s),this._size++}return this}delete(f){return!!this.remove(f)}remove(f){const c=this._map.get(f);if(!!c)return this._map.delete(f),this.removeItem(c),this._size--,c.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const f=this._head;return this._map.delete(f.key),this.removeItem(f),this._size--,f.value}forEach(f,c){const l=this._state;let s=this._head;for(;s;){if(c?f.bind(c)(s.value,s.key,this):f(s.value,s.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");s=s.next}}keys(){const f=this,c=this._state;let l=this._head;const s={[Symbol.iterator](){return s},next(){if(f._state!==c)throw new Error("LinkedMap got modified during iteration.");if(l){const d={value:l.key,done:!1};return l=l.next,d}else return{value:void 0,done:!0}}};return s}values(){const f=this,c=this._state;let l=this._head;const s={[Symbol.iterator](){return s},next(){if(f._state!==c)throw new Error("LinkedMap got modified during iteration.");if(l){const d={value:l.value,done:!1};return l=l.next,d}else return{value:void 0,done:!0}}};return s}entries(){const f=this,c=this._state;let l=this._head;const s={[Symbol.iterator](){return s},next(){if(f._state!==c)throw new Error("LinkedMap got modified during iteration.");if(l){const d={value:[l.key,l.value],done:!1};return l=l.next,d}else return{value:void 0,done:!0}}};return s}[(R=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(f){if(f>=this.size)return;if(f===0){this.clear();return}let c=this._head,l=this.size;for(;c&&l>f;)this._map.delete(c.key),c=c.next,l--;this._head=c,this._size=l,c&&(c.previous=void 0),this._state++}addItemFirst(f){if(!this._head&&!this._tail)this._tail=f;else if(this._head)f.next=this._head,this._head.previous=f;else throw new Error("Invalid list");this._head=f,this._state++}addItemLast(f){if(!this._head&&!this._tail)this._head=f;else if(this._tail)f.previous=this._tail,this._tail.next=f;else throw new Error("Invalid list");this._tail=f,this._state++}removeItem(f){if(f===this._head&&f===this._tail)this._head=void 0,this._tail=void 0;else if(f===this._head){if(!f.next)throw new Error("Invalid list");f.next.previous=void 0,this._head=f.next}else if(f===this._tail){if(!f.previous)throw new Error("Invalid list");f.previous.next=void 0,this._tail=f.previous}else{const c=f.next,l=f.previous;if(!c||!l)throw new Error("Invalid list");c.previous=l,l.next=c}f.next=void 0,f.previous=void 0,this._state++}touch(f,c){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(c!==1&&c!==2)){if(c===1){if(f===this._head)return;const l=f.next,s=f.previous;f===this._tail?(s.next=void 0,this._tail=s):(l.previous=s,s.next=l),f.previous=void 0,f.next=this._head,this._head.previous=f,this._head=f,this._state++}else if(c===2){if(f===this._tail)return;const l=f.next,s=f.previous;f===this._head?(l.previous=void 0,this._head=l):(l.previous=s,s.next=l),f.next=void 0,f.previous=this._tail,this._tail.next=f,this._tail=f,this._state++}}}toJSON(){const f=[];return this.forEach((c,l)=>{f.push([l,c])}),f}fromJSON(f){this.clear();for(const[c,l]of f)this.set(c,l)}}e.LinkedMap=r;class u extends r{constructor(f,c=1){super(),this._limit=f,this._ratio=Math.min(Math.max(0,c),1)}get limit(){return this._limit}set limit(f){this._limit=f,this.checkTrim()}get ratio(){return this._ratio}set ratio(f){this._ratio=Math.min(Math.max(0,f),1),this.checkTrim()}get(f,c=2){return super.get(f,c)}peek(f){return super.get(f,0)}set(f,c){return super.set(f,c,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=u}),function(J,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(ae[357],le([0]),e):(J=typeof globalThis<"u"?globalThis:J||self,e(J.marked={}))}(this,function(J){"use strict";function e(oe,se){for(var te=0;te<se.length;te++){var Z=se[te];Z.enumerable=Z.enumerable||!1,Z.configurable=!0,"value"in Z&&(Z.writable=!0),Object.defineProperty(oe,Z.key,Z)}}function t(oe,se,te){return se&&e(oe.prototype,se),te&&e(oe,te),Object.defineProperty(oe,"prototype",{writable:!1}),oe}function p(oe,se){if(!!oe){if(typeof oe=="string")return R(oe,se);var te=Object.prototype.toString.call(oe).slice(8,-1);if(te==="Object"&&oe.constructor&&(te=oe.constructor.name),te==="Map"||te==="Set")return Array.from(oe);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return R(oe,se)}}function R(oe,se){(se==null||se>oe.length)&&(se=oe.length);for(var te=0,Z=new Array(se);te<se;te++)Z[te]=oe[te];return Z}function A(oe,se){var te=typeof Symbol<"u"&&oe[Symbol.iterator]||oe["@@iterator"];if(te)return(te=te.call(oe)).next.bind(te);if(Array.isArray(oe)||(te=p(oe))||se&&oe&&typeof oe.length=="number"){te&&(oe=te);var Z=0;return function(){return Z>=oe.length?{done:!0}:{done:!1,value:oe[Z++]}}}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{async:!1,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}}J.defaults=k();function E(oe){J.defaults=oe}var I=/[&<>"']/,b=/[&<>"']/g,S=/[<>"']|&(?!#?\w+;)/,C=/[<>"']|&(?!#?\w+;)/g,r={"&":"&","<":"<",">":">",'"':""","'":"'"},u=function(se){return r[se]};function i(oe,se){if(se){if(I.test(oe))return oe.replace(b,u)}else if(S.test(oe))return oe.replace(C,u);return oe}var f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function c(oe){return oe.replace(f,function(se,te){return te=te.toLowerCase(),te==="colon"?":":te.charAt(0)==="#"?te.charAt(1)==="x"?String.fromCharCode(parseInt(te.substring(2),16)):String.fromCharCode(+te.substring(1)):""})}var l=/(^|[^\[])\^/g;function s(oe,se){oe=typeof oe=="string"?oe:oe.source,se=se||"";var te={replace:function(ne,ce){return ce=ce.source||ce,ce=ce.replace(l,"$1"),oe=oe.replace(ne,ce),te},getRegex:function(){return new RegExp(oe,se)}};return te}var d=/[^\w:]/g,n=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function a(oe,se,te){if(oe){var Z;try{Z=decodeURIComponent(c(te)).replace(d,"").toLowerCase()}catch{return null}if(Z.indexOf("javascript:")===0||Z.indexOf("vbscript:")===0||Z.indexOf("data:")===0)return null}se&&!n.test(te)&&(te=m(se,te));try{te=encodeURI(te).replace(/%25/g,"%")}catch{return null}return te}var o={},g=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function m(oe,se){o[" "+oe]||(g.test(oe)?o[" "+oe]=oe+"/":o[" "+oe]=T(oe,"/",!0)),oe=o[" "+oe];var te=oe.indexOf(":")===-1;return se.substring(0,2)==="//"?te?se:oe.replace(h,"$1")+se:se.charAt(0)==="/"?te?se:oe.replace(v,"$1")+se:oe+se}var w={exec:function(){}};function D(oe){for(var se=1,te,Z;se<arguments.length;se++){te=arguments[se];for(Z in te)Object.prototype.hasOwnProperty.call(te,Z)&&(oe[Z]=te[Z])}return oe}function y(oe,se){var te=oe.replace(/\|/g,function(ce,de,he){for(var pe=!1,me=de;--me>=0&&he[me]==="\\";)pe=!pe;return pe?"|":" |"}),Z=te.split(/ \|/),ne=0;if(Z[0].trim()||Z.shift(),Z.length>0&&!Z[Z.length-1].trim()&&Z.pop(),Z.length>se)Z.splice(se);else for(;Z.length<se;)Z.push("");for(;ne<Z.length;ne++)Z[ne]=Z[ne].trim().replace(/\\\|/g,"|");return Z}function T(oe,se,te){var Z=oe.length;if(Z===0)return"";for(var ne=0;ne<Z;){var ce=oe.charAt(Z-ne-1);if(ce===se&&!te)ne++;else if(ce!==se&&te)ne++;else break}return oe.slice(0,Z-ne)}function _(oe,se){if(oe.indexOf(se[1])===-1)return-1;for(var te=oe.length,Z=0,ne=0;ne<te;ne++)if(oe[ne]==="\\")ne++;else if(oe[ne]===se[0])Z++;else if(oe[ne]===se[1]&&(Z--,Z<0))return ne;return-1}function L(oe){oe&&oe.sanitize&&!oe.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 M(oe,se){if(se<1)return"";for(var te="";se>1;)se&1&&(te+=oe),se>>=1,oe+=oe;return te+oe}function O(oe,se,te,Z){var ne=se.href,ce=se.title?i(se.title):null,de=oe[1].replace(/\\([\[\]])/g,"$1");if(oe[0].charAt(0)!=="!"){Z.state.inLink=!0;var he={type:"link",raw:te,href:ne,title:ce,text:de,tokens:Z.inlineTokens(de)};return Z.state.inLink=!1,he}return{type:"image",raw:te,href:ne,title:ce,text:i(de)}}function N(oe,se){var te=oe.match(/^(\s+)(?:```)/);if(te===null)return se;var Z=te[1];return se.split(` `).map(function(ne){var ce=ne.match(/^\s+/);if(ce===null)return ne;var de=ce[0];return de.length>=Z.length?ne.slice(Z.length):ne}).join(` `)}var P=function(){function oe(te){this.options=te||J.defaults}var se=oe.prototype;return se.space=function(Z){var ne=this.rules.block.newline.exec(Z);if(ne&&ne[0].length>0)return{type:"space",raw:ne[0]}},se.code=function(Z){var ne=this.rules.block.code.exec(Z);if(ne){var ce=ne[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:ne[0],codeBlockStyle:"indented",text:this.options.pedantic?ce:T(ce,` `)}}},se.fences=function(Z){var ne=this.rules.block.fences.exec(Z);if(ne){var ce=ne[0],de=N(ce,ne[3]||"");return{type:"code",raw:ce,lang:ne[2]?ne[2].trim():ne[2],text:de}}},se.heading=function(Z){var ne=this.rules.block.heading.exec(Z);if(ne){var ce=ne[2].trim();if(/#$/.test(ce)){var de=T(ce,"#");(this.options.pedantic||!de||/ $/.test(de))&&(ce=de.trim())}return{type:"heading",raw:ne[0],depth:ne[1].length,text:ce,tokens:this.lexer.inline(ce)}}},se.hr=function(Z){var ne=this.rules.block.hr.exec(Z);if(ne)return{type:"hr",raw:ne[0]}},se.blockquote=function(Z){var ne=this.rules.block.blockquote.exec(Z);if(ne){var ce=ne[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:ne[0],tokens:this.lexer.blockTokens(ce,[]),text:ce}}},se.list=function(Z){var ne=this.rules.block.list.exec(Z);if(ne){var ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De=ne[1].trim(),Ae=De.length>1,Pe={type:"list",raw:"",ordered:Ae,start:Ae?+De.slice(0,-1):"",loose:!1,items:[]};De=Ae?"\\d{1,9}\\"+De.slice(-1):"\\"+De,this.options.pedantic&&(De=Ae?De:"[*+-]");for(var fe=new RegExp("^( {0,3}"+De+")((?:[ ][^\\n]*)?(?:\\n|$))");Z&&(Ce=!1,!(!(ne=fe.exec(Z))||this.rules.block.hr.test(Z)));){if(ce=ne[0],Z=Z.substring(ce.length),ve=ne[2].split(` `,1)[0],be=Z.split(` `,1)[0],this.options.pedantic?(pe=2,ue=ve.trimLeft()):(pe=ne[2].search(/[^ ]/),pe=pe>4?1:pe,ue=ve.slice(pe),pe+=ne[1].length),Se=!1,!ve&&/^ *$/.test(be)&&(ce+=be+` `,Z=Z.substring(be.length+1),Ce=!0),!Ce)for(var ye=new RegExp("^ {0,"+Math.min(3,pe-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),ke=new RegExp("^ {0,"+Math.min(3,pe-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Ee=new RegExp("^ {0,"+Math.min(3,pe-1)+"}(?:```|~~~)"),Te=new RegExp("^ {0,"+Math.min(3,pe-1)+"}#");Z&&(ge=Z.split(` `,1)[0],ve=ge,this.options.pedantic&&(ve=ve.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Ee.test(ve)||Te.test(ve)||ye.test(ve)||ke.test(Z)));){if(ve.search(/[^ ]/)>=pe||!ve.trim())ue+=` `+ve.slice(pe);else if(!Se)ue+=` `+ve;else break;!Se&&!ve.trim()&&(Se=!0),ce+=ge+` `,Z=Z.substring(ge.length+1)}Pe.loose||(Ie?Pe.loose=!0:/\n *\n *$/.test(ce)&&(Ie=!0)),this.options.gfm&&(de=/^\[[ xX]\] /.exec(ue),de&&(he=de[0]!=="[ ] ",ue=ue.replace(/^\[[ xX]\] +/,""))),Pe.items.push({type:"list_item",raw:ce,task:!!de,checked:he,loose:!1,text:ue}),Pe.raw+=ce}Pe.items[Pe.items.length-1].raw=ce.trimRight(),Pe.items[Pe.items.length-1].text=ue.trimRight(),Pe.raw=Pe.raw.trimRight();var _e=Pe.items.length;for(me=0;me<_e;me++){this.lexer.state.top=!1,Pe.items[me].tokens=this.lexer.blockTokens(Pe.items[me].text,[]);var Re=Pe.items[me].tokens.filter(function(Me){return Me.type==="space"}),Le=Re.every(function(Me){for(var Oe=Me.raw.split(""),Ke=0,We=A(Oe),Xe;!(Xe=We()).done;){var Je=Xe.value;if(Je===` `&&(Ke+=1),Ke>1)return!0}return!1});!Pe.loose&&Re.length&&Le&&(Pe.loose=!0,Pe.items[me].loose=!0)}return Pe}},se.html=function(Z){var ne=this.rules.block.html.exec(Z);if(ne){var ce={type:"html",raw:ne[0],pre:!this.options.sanitizer&&(ne[1]==="pre"||ne[1]==="script"||ne[1]==="style"),text:ne[0]};if(this.options.sanitize){var de=this.options.sanitizer?this.options.sanitizer(ne[0]):i(ne[0]);ce.type="paragraph",ce.text=de,ce.tokens=this.lexer.inline(de)}return ce}},se.def=function(Z){var ne=this.rules.block.def.exec(Z);if(ne){ne[3]&&(ne[3]=ne[3].substring(1,ne[3].length-1));var ce=ne[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:ce,raw:ne[0],href:ne[2],title:ne[3]}}},se.table=function(Z){var ne=this.rules.block.table.exec(Z);if(ne){var ce={type:"table",header:y(ne[1]).map(function(Ie){return{text:Ie}}),align:ne[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:ne[3]&&ne[3].trim()?ne[3].replace(/\n[ \t]*$/,"").split(` `):[]};if(ce.header.length===ce.align.length){ce.raw=ne[0];var de=ce.align.length,he,pe,me,Se;for(he=0;he<de;he++)/^ *-+: *$/.test(ce.align[he])?ce.align[he]="right":/^ *:-+: *$/.test(ce.align[he])?ce.align[he]="center":/^ *:-+ *$/.test(ce.align[he])?ce.align[he]="left":ce.align[he]=null;for(de=ce.rows.length,he=0;he<de;he++)ce.rows[he]=y(ce.rows[he],ce.header.length).map(function(Ie){return{text:Ie}});for(de=ce.header.length,pe=0;pe<de;pe++)ce.header[pe].tokens=this.lexer.inline(ce.header[pe].text);for(de=ce.rows.length,pe=0;pe<de;pe++)for(Se=ce.rows[pe],me=0;me<Se.length;me++)Se[me].tokens=this.lexer.inline(Se[me].text);return ce}}},se.lheading=function(Z){var ne=this.rules.block.lheading.exec(Z);if(ne)return{type:"heading",raw:ne[0],depth:ne[2].charAt(0)==="="?1:2,text:ne[1],tokens:this.lexer.inline(ne[1])}},se.paragraph=function(Z){var ne=this.rules.block.paragraph.exec(Z);if(ne){var ce=ne[1].charAt(ne[1].length-1)===` `?ne[1].slice(0,-1):ne[1];return{type:"paragraph",raw:ne[0],text:ce,tokens:this.lexer.inline(ce)}}},se.text=function(Z){var ne=this.rules.block.text.exec(Z);if(ne)return{type:"text",raw:ne[0],text:ne[0],tokens:this.lexer.inline(ne[0])}},se.escape=function(Z){var ne=this.rules.inline.escape.exec(Z);if(ne)return{type:"escape",raw:ne[0],text:i(ne[1])}},se.tag=function(Z){var ne=this.rules.inline.tag.exec(Z);if(ne)return!this.lexer.state.inLink&&/^<a /i.test(ne[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(ne[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(ne[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ne[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:ne[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ne[0]):i(ne[0]):ne[0]}},se.link=function(Z){var ne=this.rules.inline.link.exec(Z);if(ne){var ce=ne[2].trim();if(!this.options.pedantic&&/^</.test(ce)){if(!/>$/.test(ce))return;var de=T(ce.slice(0,-1),"\\");if((ce.length-de.length)%2===0)return}else{var he=_(ne[2],"()");if(he>-1){var pe=ne[0].indexOf("!")===0?5:4,me=pe+ne[1].length+he;ne[2]=ne[2].substring(0,he),ne[0]=ne[0].substring(0,me).trim(),ne[3]=""}}var Se=ne[2],Ie="";if(this.options.pedantic){var ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Se);ve&&(Se=ve[1],Ie=ve[3])}else Ie=ne[3]?ne[3].slice(1,-1):"";return Se=Se.trim(),/^</.test(Se)&&(this.options.pedantic&&!/>$/.test(ce)?Se=Se.slice(1):Se=Se.slice(1,-1)),O(ne,{href:Se&&Se.replace(this.rules.inline._escapes,"$1"),title:Ie&&Ie.replace(this.rules.inline._escapes,"$1")},ne[0],this.lexer)}},se.reflink=function(Z,ne){var ce;if((ce=this.rules.inline.reflink.exec(Z))||(ce=this.rules.inline.nolink.exec(Z))){var de=(ce[2]||ce[1]).replace(/\s+/g," ");if(de=ne[de.toLowerCase()],!de||!de.href){var he=ce[0].charAt(0);return{type:"text",raw:he,text:he}}return O(ce,de,ce[0],this.lexer)}},se.emStrong=function(Z,ne,ce){ce===void 0&&(ce="");var de=this.rules.inline.emStrong.lDelim.exec(Z);if(!!de&&!(de[3]&&ce.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 he=de[1]||de[2]||"";if(!he||he&&(ce===""||this.rules.inline.punctuation.exec(ce))){var pe=de[0].length-1,me,Se,Ie=pe,ve=0,be=de[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(be.lastIndex=0,ne=ne.slice(-1*Z.length+pe);(de=be.exec(ne))!=null;)if(me=de[1]||de[2]||de[3]||de[4]||de[5]||de[6],!!me){if(Se=me.length,de[3]||de[4]){Ie+=Se;continue}else if((de[5]||de[6])&&pe%3&&!((pe+Se)%3)){ve+=Se;continue}if(Ie-=Se,!(Ie>0)){if(Se=Math.min(Se,Se+Ie+ve),Math.min(pe,Se)%2){var ge=Z.slice(1,pe+de.index+Se);return{type:"em",raw:Z.slice(0,pe+de.index+Se+1),text:ge,tokens:this.lexer.inlineTokens(ge)}}var ue=Z.slice(2,pe+de.index+Se-1);return{type:"strong",raw:Z.slice(0,pe+de.index+Se+1),text:ue,tokens:this.lexer.inlineTokens(ue)}}}}}},se.codespan=function(Z){var ne=this.rules.inline.code.exec(Z);if(ne){var ce=ne[2].replace(/\n/g," "),de=/[^ ]/.test(ce),he=/^ /.test(ce)&&/ $/.test(ce);return de&&he&&(ce=ce.substring(1,ce.length-1)),ce=i(ce,!0),{type:"codespan",raw:ne[0],text:ce}}},se.br=function(Z){var ne=this.rules.inline.br.exec(Z);if(ne)return{type:"br",raw:ne[0]}},se.del=function(Z){var ne=this.rules.inline.del.exec(Z);if(ne)return{type:"del",raw:ne[0],text:ne[2],tokens:this.lexer.inlineTokens(ne[2])}},se.autolink=function(Z,ne){var ce=this.rules.inline.autolink.exec(Z);if(ce){var de,he;return ce[2]==="@"?(de=i(this.options.mangle?ne(ce[1]):ce[1]),he="mailto:"+de):(de=i(ce[1]),he=de),{type:"link",raw:ce[0],text:de,href:he,tokens:[{type:"text",raw:de,text:de}]}}},se.url=function(Z,ne){var ce;if(ce=this.rules.inline.url.exec(Z)){var de,he;if(ce[2]==="@")de=i(this.options.mangle?ne(ce[0]):ce[0]),he="mailto:"+de;else{var pe;do pe=ce[0],ce[0]=this.rules.inline._backpedal.exec(ce[0])[0];while(pe!==ce[0]);de=i(ce[0]),ce[1]==="www."?he="http://"+de:he=de}return{type:"link",raw:ce[0],text:de,href:he,tokens:[{type:"text",raw:de,text:de}]}}},se.inlineText=function(Z,ne){var ce=this.rules.inline.text.exec(Z);if(ce){var de;return this.lexer.state.inRawBlock?de=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):i(ce[0]):ce[0]:de=i(this.options.smartypants?ne(ce[0]):ce[0]),{type:"text",raw:ce[0],text:de}}},oe}(),B={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}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\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:w,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};B._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,B._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,B.def=s(B.def).replace("label",B._label).replace("title",B._title).getRegex(),B.bullet=/(?:[*+-]|\d{1,9}[.)])/,B.listItemStart=s(/^( *)(bull) */).replace("bull",B.bullet).getRegex(),B.list=s(B.list).replace(/bull/g,B.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+B.def.source+")").getRegex(),B._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",B._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,B.html=s(B.html,"i").replace("comment",B._comment).replace("tag",B._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),B.paragraph=s(B._paragraph).replace("hr",B.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",B._tag).getRegex(),B.blockquote=s(B.blockquote).replace("paragraph",B.paragraph).getRegex(),B.normal=D({},B),B.gfm=D({},B.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),B.gfm.table=s(B.gfm.table).replace("hr",B.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",B._tag).getRegex(),B.gfm.paragraph=s(B._paragraph).replace("hr",B.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",B.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",B._tag).getRegex(),B.pedantic=D({},B.normal,{html:s(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",B._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:w,paragraph:s(B.normal._paragraph).replace("hr",B.hr).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",B.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var V={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:w,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:w,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};V._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",V.punctuation=s(V.punctuation).replace(/punctuation/g,V._punctuation).getRegex(),V.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,V.escapedEmSt=/\\\*|\\_/g,V._comment=s(B._comment).replace("(?:-->|$)","-->").getRegex(),V.emStrong.lDelim=s(V.emStrong.lDelim).replace(/punct/g,V._punctuation).getRegex(),V.emStrong.rDelimAst=s(V.emStrong.rDelimAst,"g").replace(/punct/g,V._punctuation).getRegex(),V.emStrong.rDelimUnd=s(V.emStrong.rDelimUnd,"g").replace(/punct/g,V._punctuation).getRegex(),V._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,V._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,V._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])?)+(?![-_])/,V.autolink=s(V.autolink).replace("scheme",V._scheme).replace("email",V._email).getRegex(),V._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,V.tag=s(V.tag).replace("comment",V._comment).replace("attribute",V._attribute).getRegex(),V._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,V._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,V._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,V.link=s(V.link).replace("label",V._label).replace("href",V._href).replace("title",V._title).getRegex(),V.reflink=s(V.reflink).replace("label",V._label).replace("ref",B._label).getRegex(),V.nolink=s(V.nolink).replace("ref",B._label).getRegex(),V.reflinkSearch=s(V.reflinkSearch,"g").replace("reflink",V.reflink).replace("nolink",V.nolink).getRegex(),V.normal=D({},V),V.pedantic=D({},V.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:s(/^!?\[(label)\]\((.*?)\)/).replace("label",V._label).getRegex(),reflink:s(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V._label).getRegex()}),V.gfm=D({},V.normal,{escape:s(V.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),V.gfm.url=s(V.gfm.url,"i").replace("email",V.gfm._extended_email).getRegex(),V.breaks=D({},V.gfm,{br:s(V.br).replace("{2,}","*").getRegex(),text:s(V.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function z(oe){return oe.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 x(oe){var se="",te,Z,ne=oe.length;for(te=0;te<ne;te++)Z=oe.charCodeAt(te),Math.random()>.5&&(Z="x"+Z.toString(16)),se+="&#"+Z+";";return se}var H=function(){function oe(te){this.tokens=[],this.tokens.links=Object.create(null),this.options=te||J.defaults,this.options.tokenizer=this.options.tokenizer||new P,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 Z={block:B.normal,inline:V.normal};this.options.pedantic?(Z.block=B.pedantic,Z.inline=V.pedantic):this.options.gfm&&(Z.block=B.gfm,this.options.breaks?Z.inline=V.breaks:Z.inline=V.gfm),this.tokenizer.rules=Z}oe.lex=function(Z,ne){var ce=new oe(ne);return ce.lex(Z)},oe.lexInline=function(Z,ne){var ce=new oe(ne);return ce.inlineTokens(Z)};var se=oe.prototype;return se.lex=function(Z){Z=Z.replace(/\r\n|\r/g,` `),this.blockTokens(Z,this.tokens);for(var ne;ne=this.inlineQueue.shift();)this.inlineTokens(ne.src,ne.tokens);return this.tokens},se.blockTokens=function(Z,ne){var ce=this;ne===void 0&&(ne=[]),this.options.pedantic?Z=Z.replace(/\t/g," ").replace(/^ +$/gm,""):Z=Z.replace(/^( *)(\t+)/gm,function(Ie,ve,be){return ve+" ".repeat(be.length)});for(var de,he,pe,me;Z;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Ie){return(de=Ie.call({lexer:ce},Z,ne))?(Z=Z.substring(de.raw.length),ne.push(de),!0):!1}))){if(de=this.tokenizer.space(Z)){Z=Z.substring(de.raw.length),de.raw.length===1&&ne.length>0?ne[ne.length-1].raw+=` `:ne.push(de);continue}if(de=this.tokenizer.code(Z)){Z=Z.substring(de.raw.length),he=ne[ne.length-1],he&&(he.type==="paragraph"||he.type==="text")?(he.raw+=` `+de.raw,he.text+=` `+de.text,this.inlineQueue[this.inlineQueue.length-1].src=he.text):ne.push(de);continue}if(de=this.tokenizer.fences(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.heading(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.hr(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.blockquote(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.list(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.html(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.def(Z)){Z=Z.substring(de.raw.length),he=ne[ne.length-1],he&&(he.type==="paragraph"||he.type==="text")?(he.raw+=` `+de.raw,he.text+=` `+de.raw,this.inlineQueue[this.inlineQueue.length-1].src=he.text):this.tokens.links[de.tag]||(this.tokens.links[de.tag]={href:de.href,title:de.title});continue}if(de=this.tokenizer.table(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.lheading(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(pe=Z,this.options.extensions&&this.options.extensions.startBlock&&function(){var Ie=1/0,ve=Z.slice(1),be=void 0;ce.options.extensions.startBlock.forEach(function(ge){be=ge.call({lexer:this},ve),typeof be=="number"&&be>=0&&(Ie=Math.min(Ie,be))}),Ie<1/0&&Ie>=0&&(pe=Z.substring(0,Ie+1))}(),this.state.top&&(de=this.tokenizer.paragraph(pe))){he=ne[ne.length-1],me&&he.type==="paragraph"?(he.raw+=` `+de.raw,he.text+=` `+de.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=he.text):ne.push(de),me=pe.length!==Z.length,Z=Z.substring(de.raw.length);continue}if(de=this.tokenizer.text(Z)){Z=Z.substring(de.raw.length),he=ne[ne.length-1],he&&he.type==="text"?(he.raw+=` `+de.raw,he.text+=` `+de.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=he.text):ne.push(de);continue}if(Z){var Se="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(Se);break}else throw new Error(Se)}}return this.state.top=!0,ne},se.inline=function(Z,ne){return ne===void 0&&(ne=[]),this.inlineQueue.push({src:Z,tokens:ne}),ne},se.inlineTokens=function(Z,ne){var ce=this;ne===void 0&&(ne=[]);var de,he,pe,me=Z,Se,Ie,ve;if(this.tokens.links){var be=Object.keys(this.tokens.links);if(be.length>0)for(;(Se=this.tokenizer.rules.inline.reflinkSearch.exec(me))!=null;)be.includes(Se[0].slice(Se[0].lastIndexOf("[")+1,-1))&&(me=me.slice(0,Se.index)+"["+M("a",Se[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Se=this.tokenizer.rules.inline.blockSkip.exec(me))!=null;)me=me.slice(0,Se.index)+"["+M("a",Se[0].length-2)+"]"+me.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Se=this.tokenizer.rules.inline.escapedEmSt.exec(me))!=null;)me=me.slice(0,Se.index)+"++"+me.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;Z;)if(Ie||(ve=""),Ie=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(ue){return(de=ue.call({lexer:ce},Z,ne))?(Z=Z.substring(de.raw.length),ne.push(de),!0):!1}))){if(de=this.tokenizer.escape(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.tag(Z)){Z=Z.substring(de.raw.length),he=ne[ne.length-1],he&&de.type==="text"&&he.type==="text"?(he.raw+=de.raw,he.text+=de.text):ne.push(de);continue}if(de=this.tokenizer.link(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.reflink(Z,this.tokens.links)){Z=Z.substring(de.raw.length),he=ne[ne.length-1],he&&de.type==="text"&&he.type==="text"?(he.raw+=de.raw,he.text+=de.text):ne.push(de);continue}if(de=this.tokenizer.emStrong(Z,me,ve)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.codespan(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.br(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.del(Z)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(de=this.tokenizer.autolink(Z,x)){Z=Z.substring(de.raw.length),ne.push(de);continue}if(!this.state.inLink&&(de=this.tokenizer.url(Z,x))){Z=Z.substring(de.raw.length),ne.push(de);continue}if(pe=Z,this.options.extensions&&this.options.extensions.startInline&&function(){var ue=1/0,Ce=Z.slice(1),De=void 0;ce.options.extensions.startInline.forEach(function(Ae){De=Ae.call({lexer:this},Ce),typeof De=="number"&&De>=0&&(ue=Math.min(ue,De))}),ue<1/0&&ue>=0&&(pe=Z.substring(0,ue+1))}(),de=this.tokenizer.inlineText(pe,z)){Z=Z.substring(de.raw.length),de.raw.slice(-1)!=="_"&&(ve=de.raw.slice(-1)),Ie=!0,he=ne[ne.length-1],he&&he.type==="text"?(he.raw+=de.raw,he.text+=de.text):ne.push(de);continue}if(Z){var ge="Infinite loop on byte: "+Z.charCodeAt(0);if(this.options.silent){console.error(ge);break}else throw new Error(ge)}}return ne},t(oe,null,[{key:"rules",get:function(){return{block:B,inline:V}}}]),oe}(),W=function(){function oe(te){this.options=te||J.defaults}var se=oe.prototype;return se.code=function(Z,ne,ce){var de=(ne||"").match(/\S*/)[0];if(this.options.highlight){var he=this.options.highlight(Z,de);he!=null&&he!==Z&&(ce=!0,Z=he)}return Z=Z.replace(/\n$/,"")+` `,de?'<pre><code class="'+this.options.langPrefix+i(de,!0)+'">'+(ce?Z:i(Z,!0))+`</code></pre> `:"<pre><code>"+(ce?Z:i(Z,!0))+`</code></pre> `},se.blockquote=function(Z){return`<blockquote> `+Z+`</blockquote> `},se.html=function(Z){return Z},se.heading=function(Z,ne,ce,de){if(this.options.headerIds){var he=this.options.headerPrefix+de.slug(ce);return"<h"+ne+' id="'+he+'">'+Z+"</h"+ne+`> `}return"<h"+ne+">"+Z+"</h"+ne+`> `},se.hr=function(){return this.options.xhtml?`<hr/> `:`<hr> `},se.list=function(Z,ne,ce){var de=ne?"ol":"ul",he=ne&&ce!==1?' start="'+ce+'"':"";return"<"+de+he+`> `+Z+"</"+de+`> `},se.listitem=function(Z){return"<li>"+Z+`</li> `},se.checkbox=function(Z){return"<input "+(Z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},se.paragraph=function(Z){return"<p>"+Z+`</p> `},se.table=function(Z,ne){return ne&&(ne="<tbody>"+ne+"</tbody>"),`<table> <thead> `+Z+`</thead> `+ne+`</table> `},se.tablerow=function(Z){return`<tr> `+Z+`</tr> `},se.tablecell=function(Z,ne){var ce=ne.header?"th":"td",de=ne.align?"<"+ce+' align="'+ne.align+'">':"<"+ce+">";return de+Z+("</"+ce+`> `)},se.strong=function(Z){return"<strong>"+Z+"</strong>"},se.em=function(Z){return"<em>"+Z+"</em>"},se.codespan=function(Z){return"<code>"+Z+"</code>"},se.br=function(){return this.options.xhtml?"<br/>":"<br>"},se.del=function(Z){return"<del>"+Z+"</del>"},se.link=function(Z,ne,ce){if(Z=a(this.options.sanitize,this.options.baseUrl,Z),Z===null)return ce;var de='<a href="'+i(Z)+'"';return ne&&(de+=' title="'+ne+'"'),de+=">"+ce+"</a>",de},se.image=function(Z,ne,ce){if(Z=a(this.options.sanitize,this.options.baseUrl,Z),Z===null)return ce;var de='<img src="'+Z+'" alt="'+ce+'"';return ne&&(de+=' title="'+ne+'"'),de+=this.options.xhtml?"/>":">",de},se.text=function(Z){return Z},oe}(),U=function(){function oe(){}var se=oe.prototype;return se.strong=function(Z){return Z},se.em=function(Z){return Z},se.codespan=function(Z){return Z},se.del=function(Z){return Z},se.html=function(Z){return Z},se.text=function(Z){return Z},se.link=function(Z,ne,ce){return""+ce},se.image=function(Z,ne,ce){return""+ce},se.br=function(){return""},oe}(),$=function(){function oe(){this.seen={}}var se=oe.prototype;return se.serialize=function(Z){return Z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},se.getNextSafeSlug=function(Z,ne){var ce=Z,de=0;if(this.seen.hasOwnProperty(ce)){de=this.seen[Z];do de++,ce=Z+"-"+de;while(this.seen.hasOwnProperty(ce))}return ne||(this.seen[Z]=de,this.seen[ce]=0),ce},se.slug=function(Z,ne){ne===void 0&&(ne={});var ce=this.serialize(Z);return this.getNextSafeSlug(ce,ne.dryrun)},oe}(),q=function(){function oe(te){this.options=te||J.defaults,this.options.renderer=this.options.renderer||new W,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new U,this.slugger=new $}oe.parse=function(Z,ne){var ce=new oe(ne);return ce.parse(Z)},oe.parseInline=function(Z,ne){var ce=new oe(ne);return ce.parseInline(Z)};var se=oe.prototype;return se.parse=function(Z,ne){ne===void 0&&(ne=!0);var ce="",de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e=Z.length;for(de=0;de<_e;de++){if(ue=Z[de],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ue.type]&&(Te=this.options.extensions.renderers[ue.type].call({parser:this},ue),Te!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(ue.type))){ce+=Te||"";continue}switch(ue.type){case"space":continue;case"hr":{ce+=this.renderer.hr();continue}case"heading":{ce+=this.renderer.heading(this.parseInline(ue.tokens),ue.depth,c(this.parseInline(ue.tokens,this.textRenderer)),this.slugger);continue}case"code":{ce+=this.renderer.code(ue.text,ue.lang,ue.escaped);continue}case"table":{for(be="",ve="",me=ue.header.length,he=0;he<me;he++)ve+=this.renderer.tablecell(this.parseInline(ue.header[he].tokens),{header:!0,align:ue.align[he]});for(be+=this.renderer.tablerow(ve),ge="",me=ue.rows.length,he=0;he<me;he++){for(Ie=ue.rows[he],ve="",Se=Ie.length,pe=0;pe<Se;pe++)ve+=this.renderer.tablecell(this.parseInline(Ie[pe].tokens),{header:!1,align:ue.align[pe]});ge+=this.renderer.tablerow(ve)}ce+=this.renderer.table(be,ge);continue}case"blockquote":{ge=this.parse(ue.tokens),ce+=this.renderer.blockquote(ge);continue}case"list":{for(Ce=ue.ordered,De=ue.start,Ae=ue.loose,me=ue.items.length,ge="",he=0;he<me;he++)fe=ue.items[he],ye=fe.checked,ke=fe.task,Pe="",fe.task&&(Ee=this.renderer.checkbox(ye),Ae?fe.tokens.length>0&&fe.tokens[0].type==="paragraph"?(fe.tokens[0].text=Ee+" "+fe.tokens[0].text,fe.tokens[0].tokens&&fe.tokens[0].tokens.length>0&&fe.tokens[0].tokens[0].type==="text"&&(fe.tokens[0].tokens[0].text=Ee+" "+fe.tokens[0].tokens[0].text)):fe.tokens.unshift({type:"text",text:Ee}):Pe+=Ee),Pe+=this.parse(fe.tokens,Ae),ge+=this.renderer.listitem(Pe,ke,ye);ce+=this.renderer.list(ge,Ce,De);continue}case"html":{ce+=this.renderer.html(ue.text);continue}case"paragraph":{ce+=this.renderer.paragraph(this.parseInline(ue.tokens));continue}case"text":{for(ge=ue.tokens?this.parseInline(ue.tokens):ue.text;de+1<_e&&Z[de+1].type==="text";)ue=Z[++de],ge+=` `+(ue.tokens?this.parseInline(ue.tokens):ue.text);ce+=ne?this.renderer.paragraph(ge):ge;continue}default:{var Re='Token with "'+ue.type+'" type was not found.';if(this.options.silent){console.error(Re);return}else throw new Error(Re)}}}return ce},se.parseInline=function(Z,ne){ne=ne||this.renderer;var ce="",de,he,pe,me=Z.length;for(de=0;de<me;de++){if(he=Z[de],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[he.type]&&(pe=this.options.extensions.renderers[he.type].call({parser:this},he),pe!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(he.type))){ce+=pe||"";continue}switch(he.type){case"escape":{ce+=ne.text(he.text);break}case"html":{ce+=ne.html(he.text);break}case"link":{ce+=ne.link(he.href,he.title,this.parseInline(he.tokens,ne));break}case"image":{ce+=ne.image(he.href,he.title,he.text);break}case"strong":{ce+=ne.strong(this.parseInline(he.tokens,ne));break}case"em":{ce+=ne.em(this.parseInline(he.tokens,ne));break}case"codespan":{ce+=ne.codespan(he.text);break}case"br":{ce+=ne.br();break}case"del":{ce+=ne.del(this.parseInline(he.tokens,ne));break}case"text":{ce+=ne.text(he.text);break}default:{var Se='Token with "'+he.type+'" type was not found.';if(this.options.silent){console.error(Se);return}else throw new Error(Se)}}}return ce},oe}();function X(oe,se,te){if(typeof oe>"u"||oe===null)throw new Error("marked(): input parameter is undefined or null");if(typeof oe!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected");if(typeof se=="function"&&(te=se,se=null),se=D({},X.defaults,se||{}),L(se),te){var Z=se.highlight,ne;try{ne=H.lex(oe,se)}catch(me){return te(me)}var ce=function(Se){var Ie;if(!Se)try{se.walkTokens&&X.walkTokens(ne,se.walkTokens),Ie=q.parse(ne,se)}catch(ve){Se=ve}return se.highlight=Z,Se?te(Se):te(null,Ie)};if(!Z||Z.length<3||(delete se.highlight,!ne.length))return ce();var de=0;X.walkTokens(ne,function(me){me.type==="code"&&(de++,setTimeout(function(){Z(me.text,me.lang,function(Se,Ie){if(Se)return ce(Se);Ie!=null&&Ie!==me.text&&(me.text=Ie,me.escaped=!0),de--,de===0&&ce()})},0))}),de===0&&ce();return}function he(me){if(me.message+=` Please report this to https://github.com/markedjs/marked.`,se.silent)return"<p>An error occurred:</p><pre>"+i(me.message+"",!0)+"</pre>";throw me}try{var pe=H.lex(oe,se);if(se.walkTokens){if(se.async)return Promise.all(X.walkTokens(pe,se.walkTokens)).then(function(){return q.parse(pe,se)}).catch(he);X.walkTokens(pe,se.walkTokens)}return q.parse(pe,se)}catch(me){he(me)}}X.options=X.setOptions=function(oe){return D(X.defaults,oe),E(X.defaults),X},X.getDefaults=k,X.defaults=J.defaults,X.use=function(){for(var oe=arguments.length,se=new Array(oe),te=0;te<oe;te++)se[te]=arguments[te];var Z=D.apply(void 0,[{}].concat(se)),ne=X.defaults.extensions||{renderers:{},childTokens:{}},ce;se.forEach(function(de){if(de.extensions&&(ce=!0,de.extensions.forEach(function(pe){if(!pe.name)throw new Error("extension name required");if(pe.renderer){var me=ne.renderers?ne.renderers[pe.name]:null;me?ne.renderers[pe.name]=function(){for(var Se=arguments.length,Ie=new Array(Se),ve=0;ve<Se;ve++)Ie[ve]=arguments[ve];var be=pe.renderer.apply(this,Ie);return be===!1&&(be=me.apply(this,Ie)),be}:ne.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'");ne[pe.level]?ne[pe.level].unshift(pe.tokenizer):ne[pe.level]=[pe.tokenizer],pe.start&&(pe.level==="block"?ne.startBlock?ne.startBlock.push(pe.start):ne.startBlock=[pe.start]:pe.level==="inline"&&(ne.startInline?ne.startInline.push(pe.start):ne.startInline=[pe.start]))}pe.childTokens&&(ne.childTokens[pe.name]=pe.childTokens)})),de.renderer&&function(){var pe=X.defaults.renderer||new W,me=function(ve){var be=pe[ve];pe[ve]=function(){for(var ge=arguments.length,ue=new Array(ge),Ce=0;Ce<ge;Ce++)ue[Ce]=arguments[Ce];var De=de.renderer[ve].apply(pe,ue);return De===!1&&(De=be.apply(pe,ue)),De}};for(var Se in de.renderer)me(Se);Z.renderer=pe}(),de.tokenizer&&function(){var pe=X.defaults.tokenizer||new P,me=function(ve){var be=pe[ve];pe[ve]=function(){for(var ge=arguments.length,ue=new Array(ge),Ce=0;Ce<ge;Ce++)ue[Ce]=arguments[Ce];var De=de.tokenizer[ve].apply(pe,ue);return De===!1&&(De=be.apply(pe,ue)),De}};for(var Se in de.tokenizer)me(Se);Z.tokenizer=pe}(),de.walkTokens){var he=X.defaults.walkTokens;Z.walkTokens=function(pe){var me=[];return me.push(de.walkTokens.call(this,pe)),he&&(me=me.concat(he.call(this,pe))),me}}ce&&(Z.extensions=ne),X.setOptions(Z)})},X.walkTokens=function(oe,se){for(var te=[],Z=function(){var he=ce.value;switch(te=te.concat(se.call(X,he)),he.type){case"table":{for(var pe=A(he.header),me;!(me=pe()).done;){var Se=me.value;te=te.concat(X.walkTokens(Se.tokens,se))}for(var Ie=A(he.rows),ve;!(ve=Ie()).done;)for(var be=ve.value,ge=A(be),ue;!(ue=ge()).done;){var Ce=ue.value;te=te.concat(X.walkTokens(Ce.tokens,se))}break}case"list":{te=te.concat(X.walkTokens(he.items,se));break}default:X.defaults.extensions&&X.defaults.extensions.childTokens&&X.defaults.extensions.childTokens[he.type]?X.defaults.extensions.childTokens[he.type].forEach(function(De){te=te.concat(X.walkTokens(he[De],se))}):he.tokens&&(te=te.concat(X.walkTokens(he.tokens,se)))}},ne=A(oe),ce;!(ce=ne()).done;)Z();return te},X.parseInline=function(oe,se){if(typeof oe>"u"||oe===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof oe!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected");se=D({},X.defaults,se||{}),L(se);try{var te=H.lexInline(oe,se);return se.walkTokens&&X.walkTokens(te,se.walkTokens),q.parseInline(te,se)}catch(Z){if(Z.message+=` Please report this to https://github.com/markedjs/marked.`,se.silent)return"<p>An error occurred:</p><pre>"+i(Z.message+"",!0)+"</pre>";throw Z}},X.Parser=q,X.parser=q.parse,X.Renderer=W,X.TextRenderer=U,X.Lexer=H,X.lexer=H.lex,X.Tokenizer=P,X.Slugger=$,X.parse=X;var G=X.options,Q=X.setOptions,j=X.use,K=X.walkTokens,Y=X.parseInline,ee=X,ie=q.parse,re=H.lex;J.Lexer=H,J.Parser=q,J.Renderer=W,J.Slugger=$,J.TextRenderer=U,J.Tokenizer=P,J.getDefaults=k,J.lexer=re,J.marked=X,J.options=G,J.parse=ee,J.parseInline=Y,J.parser=ie,J.setOptions=Q,J.use=j,J.walkTokens=K,Object.defineProperty(J,"__esModule",{value:!0})}),define(ae[1024],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class t{constructor(R,A=0,k=R.length,E=A-1){this.items=R,this.start=A,this.end=k,this.index=E}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(ae[405],le([1,0,1024]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator2=e.HistoryNavigator=void 0;class p{constructor(k=[],E=10){this._initialize(k),this._limit=E,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 E of k)this._history.add(E)}get _elements(){const k=[];return this._history.forEach(E=>k.push(E)),k}}e.HistoryNavigator=p;class R{constructor(k,E=10){if(this.capacity=E,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 E={value:k,previous:this.tail,next:void 0};for(this.tail.next=E,this.tail=E,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 E=this.tail.value;return this.tail.value=k,E}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 E=this.head;for(;E;){if(E.value===k)return!0;E=E.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=R}),define(ae[194],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.Counter=e.rot=e.clamp=void 0;function t(E,I,b){return Math.min(Math.max(E,I),b)}e.clamp=t;function p(E,I){return(I+E%I)%I}e.rot=p;class R{constructor(){this._next=0}getNext(){return this._next++}}e.Counter=R;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 b=this._values[this._index];return this._values[this._index]=I,this._index=(this._index+1)%this._values.length,this._sum-=b,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(ae[406],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleObservableLogger=e.getLogger=e.setLogger=void 0;let t;function p(f){t=f}e.setLogger=p;function R(){return t}e.getLogger=R;class A{constructor(){this.indentation=0,this.changedObservablesSets=new WeakMap}textToConsoleArgs(c){return k([E(u("| ",this.indentation)),c])}formatInfo(c){return c.didChange?[E(" "),b(S(c.oldValue,70),{color:"red",strikeThrough:!0}),E(" "),b(S(c.newValue,60),{color:"green"})]:[E(" (unchanged)")]}handleObservableChanged(c,l){console.log(...this.textToConsoleArgs([I("observable value changed"),b(c.debugName,{color:"BlueViolet"}),...this.formatInfo(l)]))}formatChanges(c){if(c.size!==0)return b(" (changed deps: "+[...c].map(l=>l.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(c){const l=c.handleChange;this.changedObservablesSets.set(c,new Set),c.handleChange=(s,d)=>(this.changedObservablesSets.get(c).add(s),l.apply(c,[s,d]))}handleDerivedRecomputed(c,l){const s=this.changedObservablesSets.get(c);console.log(...this.textToConsoleArgs([I("derived recomputed"),b(c.debugName,{color:"BlueViolet"}),...this.formatInfo(l),this.formatChanges(s)])),s.clear()}handleFromEventObservableTriggered(c,l){console.log(...this.textToConsoleArgs([I("observable from event triggered"),b(c.debugName,{color:"BlueViolet"}),...this.formatInfo(l)]))}handleAutorunCreated(c){const l=c.handleChange;this.changedObservablesSets.set(c,new Set),c.handleChange=(s,d)=>(this.changedObservablesSets.get(c).add(s),l.apply(c,[s,d]))}handleAutorunTriggered(c){const l=this.changedObservablesSets.get(c);console.log(...this.textToConsoleArgs([I("autorun"),b(c.debugName,{color:"BlueViolet"}),this.formatChanges(l)])),l.clear()}handleBeginTransaction(c){let l=c.getDebugName();l===void 0&&(l=""),console.log(...this.textToConsoleArgs([I("transaction"),b(l,{color:"BlueViolet"})])),this.indentation++}handleEndTransaction(){this.indentation--}}e.ConsoleObservableLogger=A;function k(f){const c=new Array,s={};let d="";function n(o){if("length"in o)for(const g of o)g&&n(g);else"text"in o?(d+=`%c${o.text}`,c.push(o.style),o.data&&Object.assign(s,o.data)):"data"in o&&Object.assign(s,o.data)}n(f);const a=[d,...c];return Object.keys(s).length>0&&a.push(s),a}function E(f){return b(f,{color:"black"})}function I(f){return b(i(`${f}: `,10),{color:"black",bold:!0})}function b(f,c={color:"black"}){function l(d){return Object.entries(d).reduce((n,[a,o])=>`${n}${a}:${o};`,"")}const s={color:c.color};return c.strikeThrough&&(s["text-decoration"]="line-through"),c.bold&&(s["font-weight"]="bold"),{text:f,style:l(s)}}function S(f,c){switch(typeof f){case"number":return""+f;case"string":return f.length+2<=c?`"${f}"`:`"${f.substr(0,c-7)}"+...`;case"boolean":return f?"true":"false";case"undefined":return"undefined";case"object":return f===null?"null":Array.isArray(f)?C(f,c):r(f,c);case"symbol":return f.toString();case"function":return`[[Function${f.name?" "+f.name:""}]]`;default:return""+f}}function C(f,c){let l="[ ",s=!0;for(const d of f){if(s||(l+=", "),l.length-5>c){l+="...";break}s=!1,l+=`${S(d,c-l.length)}`}return l+=" ]",l}function r(f,c){let l="{ ",s=!0;for(const[d,n]of Object.entries(f)){if(s||(l+=", "),l.length-5>c){l+="...";break}s=!1,l+=`${d}: ${S(n,c-l.length)}`}return l+=" }",l}function u(f,c){let l="";for(let s=1;s<=c;s++)l+=f;return l}function i(f,c){for(;f.length<c;)f+=" ";return f}}),define(ae[707],le([1,0,2,406]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autorunDelta=e.AutorunObserver=e.autorunWithStore=e.autorunHandleChanges=e.autorun=void 0;function R(b,S){return new E(b,S,void 0)}e.autorun=R;function A(b,S,C){return new E(b,C,S.handleChange)}e.autorunHandleChanges=A;function k(b,S){const C=new t.DisposableStore,r=R(S,u=>{C.clear(),b(u,C)});return(0,t.toDisposable)(()=>{r.dispose(),C.dispose()})}e.autorunWithStore=k;class E{get dependencies(){return this._dependencies}constructor(S,C,r){this.debugName=S,this.runFn=C,this._handleChange=r,this.needsToRun=!0,this.updateCount=0,this.disposed=!1,this._dependencies=new Set,this.staleDependencies=new Set,(0,p.getLogger)()?.handleAutorunCreated(this),this.runIfNeeded()}subscribeTo(S){this.disposed||(this._dependencies.add(S),this.staleDependencies.delete(S)||S.addObserver(this))}handleChange(S,C){const r=this._handleChange?this._handleChange({changedObservable:S,change:C,didChange:u=>u===S}):!0;this.needsToRun=this.needsToRun||r,this.updateCount===0&&this.runIfNeeded()}beginUpdate(){this.updateCount++}endUpdate(){this.updateCount--,this.updateCount===0&&this.runIfNeeded()}runIfNeeded(){if(!this.needsToRun)return;const S=this.staleDependencies;this.staleDependencies=this._dependencies,this._dependencies=S,this.needsToRun=!1,(0,p.getLogger)()?.handleAutorunTriggered(this);try{this.runFn(this)}finally{for(const C of this.staleDependencies)C.removeObserver(this);this.staleDependencies.clear()}}dispose(){this.disposed=!0;for(const S of this._dependencies)S.removeObserver(this);this._dependencies.clear()}toString(){return`Autorun<${this.debugName}>`}}e.AutorunObserver=E,function(b){b.Observer=E}(R=e.autorun||(e.autorun={}));function I(b,S,C){let r;return R(b,u=>{const i=S.read(u),f=r;r=i,C({lastValue:f,newValue:i})})}e.autorunDelta=I}),define(ae[565],le([1,0,406]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObservableValue=e.observableValue=e.TransactionImpl=e.getFunctionName=e.transaction=e.BaseObservable=e.ConvenientObservable=e._setDerived=void 0;let p;function R(r){p=r}e._setDerived=R;class A{get TChange(){return null}read(u){return u.subscribeTo(this),this.get()}map(u){return p(()=>{const i=I(u);return i!==void 0?i:`${this.debugName} (mapped)`},i=>u(this.read(i)))}}e.ConvenientObservable=A;class k extends A{constructor(){super(...arguments),this.observers=new Set}addObserver(u){const i=this.observers.size;this.observers.add(u),i===0&&this.onFirstObserverAdded()}removeObserver(u){this.observers.delete(u)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=k;function E(r,u){const i=new b(r,u);try{(0,t.getLogger)()?.handleBeginTransaction(i),r(i)}finally{i.finish(),(0,t.getLogger)()?.handleEndTransaction()}}e.transaction=E;function I(r){const u=r.toString(),f=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(u);return(f?f[1]:void 0)?.trim()}e.getFunctionName=I;class b{constructor(u,i){this.fn=u,this._getDebugName=i,this.updatingObservers=[]}getDebugName(){return this._getDebugName?this._getDebugName():I(this.fn)}updateObserver(u,i){this.updatingObservers.push({observer:u,observable:i}),u.beginUpdate(i)}finish(){const u=this.updatingObservers;this.updatingObservers=null;for(const{observer:i,observable:f}of u)i.endUpdate(f)}}e.TransactionImpl=b;function S(r,u){return new C(r,u)}e.observableValue=S;class C extends k{constructor(u,i){super(),this.debugName=u,this.value=i}get(){return this.value}set(u,i,f){if(this.value===u)return;if(!i){E(l=>{this.set(u,l,f)},()=>`Setting ${this.debugName}`);return}const c=this.value;this.value=u,(0,t.getLogger)()?.handleObservableChanged(this,{oldValue:c,newValue:u,change:f,didChange:!0});for(const l of this.observers)i.updateObserver(l,this),l.handleChange(this,f)}toString(){return`${this.debugName}: ${this.value}`}}e.ObservableValue=C}),define(ae[708],le([1,0,565,406]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Derived=e.derived=void 0;function R(k,E){return new A(k,E)}e.derived=R,(0,t._setDerived)(R);class A extends t.BaseObservable{get dependencies(){return this._dependencies}get debugName(){return typeof this._debugName=="function"?this._debugName():this._debugName}constructor(E,I){super(),this._debugName=E,this.computeFn=I,this.hadValue=!1,this.hasValue=!1,this.value=void 0,this.updateCount=0,this._dependencies=new Set,this.staleDependencies=new Set,(0,p.getLogger)()?.handleDerivedCreated(this)}onLastObserverRemoved(){this.hasValue=!1,this.hadValue=!1,this.value=void 0;for(const E of this._dependencies)E.removeObserver(this);this._dependencies.clear()}get(){if(this.observers.size===0){const E=this.computeFn(this);return this.onLastObserverRemoved(),E}if(this.updateCount>0&&this.hasValue){for(const E of this._dependencies)if(E.get(),!this.hasValue)break}if(!this.hasValue){const E=this.staleDependencies;this.staleDependencies=this._dependencies,this._dependencies=E;const I=this.value;try{this.value=this.computeFn(this)}finally{for(const S of this.staleDependencies)S.removeObserver(this);this.staleDependencies.clear()}this.hasValue=!0;const b=this.hadValue&&I!==this.value;if((0,p.getLogger)()?.handleDerivedRecomputed(this,{oldValue:I,newValue:this.value,change:void 0,didChange:b}),b)for(const S of this.observers)S.handleChange(this,void 0)}return this.value}beginUpdate(){if(this.updateCount===0)for(const E of this.observers)E.beginUpdate(this);this.updateCount++}handleChange(E,I){this.hasValue&&(this.hadValue=!0,this.hasValue=!1),this.updateCount===0&&this.observers.size>0&&this.get()}endUpdate(){if(this.updateCount--,this.updateCount===0){this.observers.size>0&&this.get();for(const E of this.observers)E.endUpdate(this)}}subscribeTo(E){this._dependencies.add(E),this.staleDependencies.delete(E)||E.addObserver(this)}toString(){return`LazyDerived<${this.debugName}>`}}e.Derived=A}),define(ae[1025],le([1,0,2,707,565,708,406]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.derivedObservableWithWritableCache=e.derivedObservableWithCache=e.keepAlive=e.wasEventTriggeredRecently=e.debouncedObservable=e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.waitForState=e.observableFromPromise=e.constObservable=void 0;function E(g){return new I(g)}e.constObservable=E;class I extends R.ConvenientObservable{constructor(h){super(),this.value=h}get debugName(){return this.toString()}get(){return this.value}addObserver(h){}removeObserver(h){}toString(){return`Const: ${this.value}`}}function b(g){const h=(0,R.observableValue)("promiseValue",{});return g.then(v=>{h.set({value:v},void 0)}),h}e.observableFromPromise=b;function S(g,h){return new Promise(v=>{let m=!1,w=!1;const D=(0,p.autorun)("waitForState",y=>{const T=g.read(y);h(T)&&(m?D.dispose():w=!0,v(T))});m=!0,w&&D.dispose()})}e.waitForState=S;function C(g,h){return new r(g,h)}e.observableFromEvent=C;class r extends R.BaseObservable{constructor(h,v){super(),this.event=h,this.getValue=v,this.hasValue=!1,this.handleEvent=m=>{const w=this.getValue(m),D=this.value!==w;(0,k.getLogger)()?.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:w,change:void 0,didChange:D}),D&&(this.value=w,this.hasValue&&(0,R.transaction)(y=>{for(const T of this.observers)y.updateObserver(T,this),T.handleChange(this,void 0)},()=>{const y=this.getDebugName();return"Event fired"+(y?`: ${y}`:"")}),this.hasValue=!0)}}getDebugName(){return(0,R.getFunctionName)(this.getValue)}get debugName(){const h=this.getDebugName();return"From Event"+(h?`: ${h}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){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)}}e.FromEventObservable=r,function(g){g.Observer=r}(C=e.observableFromEvent||(e.observableFromEvent={}));function u(g,h){return new i(g,h)}e.observableSignalFromEvent=u;class i extends R.BaseObservable{constructor(h,v){super(),this.debugName=h,this.event=v,this.handleEvent=()=>{(0,R.transaction)(m=>{for(const w of this.observers)m.updateObserver(w,this),w.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function f(g){return new c(g)}e.observableSignal=f;class c extends R.BaseObservable{constructor(h){super(),this.debugName=h}trigger(h){if(!h){(0,R.transaction)(v=>{this.trigger(v)},()=>`Trigger signal ${this.debugName}`);return}for(const v of this.observers)h.updateObserver(v,this),v.handleChange(this,void 0)}get(){}}function l(g,h,v){const m=(0,R.observableValue)("debounced",void 0);let w;return v.add((0,p.autorun)("debounce",D=>{const y=g.read(D);w&&clearTimeout(w),w=setTimeout(()=>{(0,R.transaction)(T=>{m.set(y,T)})},h)})),m}e.debouncedObservable=l;function s(g,h,v){const m=(0,R.observableValue)("triggeredRecently",!1);let w;return v.add(g(()=>{m.set(!0,void 0),w&&clearTimeout(w),w=setTimeout(()=>{m.set(!1,void 0)},h)})),m}e.wasEventTriggeredRecently=s;function d(g){const h=new n;return g.addObserver(h),(0,t.toDisposable)(()=>{g.removeObserver(h)})}e.keepAlive=d;class n{beginUpdate(h){}handleChange(h,v){}endUpdate(h){}}function a(g,h){let v;return(0,A.derived)(g,w=>(v=h(w,v),v))}e.derivedObservableWithCache=a;function o(g,h){let v;const m=(0,R.observableValue)("derivedObservableWithWritableCache.counter",0),w=(0,A.derived)(g,D=>(m.read(D),v=h(D,v),v));return Object.assign(w,{clearCache:D=>{v=void 0,m.set(m.get()+1,D)}})}e.derivedObservableWithWritableCache=o});var Yr=this&&this.__createBinding||(Object.create?function(J,e,t,p){p===void 0&&(p=t);var R=Object.getOwnPropertyDescriptor(e,t);(!R||("get"in R?!e.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(J,p,R)}:function(J,e,t,p){p===void 0&&(p=t),J[p]=e[t]}),Xr=this&&this.__exportStar||function(J,e){for(var t in J)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yr(e,J,t)};define(ae[159],le([1,0,565,708,707,1025,406]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.autorunWithStore=e.autorunHandleChanges=e.autorunDelta=e.autorun=e.derived=e.transaction=e.observableValue=void 0,Object.defineProperty(e,"observableValue",{enumerable:!0,get:function(){return t.observableValue}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return t.transaction}}),Object.defineProperty(e,"derived",{enumerable:!0,get:function(){return p.derived}}),Object.defineProperty(e,"autorun",{enumerable:!0,get:function(){return R.autorun}}),Object.defineProperty(e,"autorunDelta",{enumerable:!0,get:function(){return R.autorunDelta}}),Object.defineProperty(e,"autorunHandleChanges",{enumerable:!0,get:function(){return R.autorunHandleChanges}}),Object.defineProperty(e,"autorunWithStore",{enumerable:!0,get:function(){return R.autorunWithStore}}),Xr(A,e),!1&&(0,k.setLogger)(new k.ConsoleObservableLogger)}),define(ae[709],le([1,0]),function(J,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 p{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=p;class R{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=R}),function(){function J(R){const A=[];typeof R=="number"&&A.push("code/timeOrigin",R);function k(I){A.push(I,Date.now())}function E(){const I=[];for(let b=0;b<A.length;b+=2)I.push({name:A[b],startTime:A[b+1]});return I}return{mark:k,getMarks:E}}function e(){if(typeof performance=="object"&&typeof performance.mark=="function"&&!performance.nodeTiming)return typeof performance.timeOrigin!="number"&&!performance.timing?J():{mark(R){performance.mark(R)},getMarks(){let R=performance.timeOrigin;typeof R!="number"&&(R=performance.timing.navigationStart||performance.timing.redirectStart||performance.timing.fetchStart);const A=[{name:"code/timeOrigin",startTime:Math.round(R)}];for(const k of performance.getEntriesByType("mark"))A.push({name:k.name,startTime:Math.round(R+k.startTime)});return A}};if(typeof process=="object"){const R=Math.round((require.nodeRequire||require)("perf_hooks").performance.timeOrigin);return J(R)}else return console.trace("perf-util loaded in UNKNOWN environment"),J()}function t(R){return R.MonacoPerformanceMarks||(R.MonacoPerformanceMarks=e()),R.MonacoPerformanceMarks}var p;typeof global=="object"?p=global:typeof self=="object"?p=self:p={},typeof define=="function"?define("vs/base/common/performance",[],function(){return t(p)}):typeof module=="object"&&typeof module.exports=="object"?module.exports=t(p):(console.trace("perf-util defined in UNKNOWN context (neither requirejs or commonjs)"),p.perf=t(p))}(),define(ae[710],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomPort=void 0;function t(){return 1025+Math.floor((65535-1025)*Math.random())}e.randomPort=t}),define(ae[478],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var t;(function(p){function R(I,b){if(I.start>=b.end||b.start>=I.end)return{start:0,end:0};const S=Math.max(I.start,b.start),C=Math.min(I.end,b.end);return C-S<=0?{start:0,end:0}:{start:S,end:C}}p.intersect=R;function A(I){return I.end-I.start<=0}p.isEmpty=A;function k(I,b){return!A(R(I,b))}p.intersects=k;function E(I,b){const S=[],C={start:I.start,end:Math.min(b.start,I.end)},r={start:Math.max(b.end,I.start),end:I.end};return A(C)||S.push(C),A(r)||S.push(r),S}p.relativeComplement=E})(t=e.Range||(e.Range={}))}),define(ae[1026],le([1,0,478]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function p(I,b){const S=[];for(const C of b){if(I.start>=C.range.end)continue;if(I.end<C.range.start)break;const r=t.Range.intersect(I,C.range);t.Range.isEmpty(r)||S.push({range:r,size:C.size})}return S}e.groupIntersect=p;function R({start:I,end:b},S){return{start:I+S,end:b+S}}e.shift=R;function A(I){const b=[];let S=null;for(const C of I){const r=C.range.start,u=C.range.end,i=C.size;if(S&&i===S.size){S.range.end=u;continue}S={range:{start:r,end:u},size:i},b.push(S)}return b}e.consolidate=A;function k(...I){return A(I.reduce((b,S)=>b.concat(S),[]))}class E{constructor(){this.groups=[],this._size=0}splice(b,S,C=[]){const r=C.length-S,u=p({start:0,end:b},this.groups),i=p({start:b+S,end:Number.POSITIVE_INFINITY},this.groups).map(c=>({range:R(c.range,r),size:c.size})),f=C.map((c,l)=>({range:{start:b+l,end:b+l+1},size:c.size}));this.groups=k(u,f,i),this._size=this.groups.reduce((c,l)=>c+l.size*(l.range.end-l.range.start),0)}get count(){const b=this.groups.length;return b?this.groups[b-1].range.end:0}get size(){return this._size}indexAt(b){if(b<0)return-1;let S=0,C=0;for(const r of this.groups){const u=r.range.end-r.range.start,i=C+u*r.size;if(b<i)return S+Math.floor((b-C)/r.size);S+=u,C=i}return S}indexAfter(b){return Math.min(this.indexAt(b)+1,this.count)}positionAt(b){if(b<0)return-1;let S=0,C=0;for(const r of this.groups){const u=r.range.end-r.range.start,i=C+u;if(b<i)return S+(b-C)*r.size;S+=u*r.size,C=i}return-1}}e.RangeMap=E}),function(J,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 p in t)(typeof exports=="object"?exports:J)[p]=t[p]}}(typeof self<"u"?self:this,function(){return function(J){var e={};function t(p){if(e[p])return e[p].exports;var R=e[p]={i:p,l:!1,exports:{}};return J[p].call(R.exports,R,R.exports,t),R.l=!0,R.exports}return t.m=J,t.c=e,t.d=function(p,R,A){t.o(p,R)||Object.defineProperty(p,R,{enumerable:!0,get:A})},t.r=function(p){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},t.t=function(p,R){if(1&R&&(p=t(p)),8&R||4&R&&typeof p=="object"&&p&&p.__esModule)return p;var A=Object.create(null);if(t.r(A),Object.defineProperty(A,"default",{enumerable:!0,value:p}),2&R&&typeof p!="string")for(var k in p)t.d(A,k,function(E){return p[E]}.bind(null,k));return A},t.n=function(p){var R=p&&p.__esModule?function(){return p.default}:function(){return p};return t.d(R,"a",R),R},t.o=function(p,R){return Object.prototype.hasOwnProperty.call(p,R)},t.p="",t(t.s=0)}([function(J,e,t){(function(p){var R;e=J.exports=j,R=typeof p=="object"&&p.env&&p.env.NODE_DEBUG&&/\bsemver\b/i.test(p.env.NODE_DEBUG)?function(){var be=Array.prototype.slice.call(arguments,0);be.unshift("SEMVER"),console.log.apply(console,be)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var A=256,k=Number.MAX_SAFE_INTEGER||9007199254740991,E=e.re=[],I=e.src=[],b=0,S=b++;I[S]="0|[1-9]\\d*";var C=b++;I[C]="[0-9]+";var r=b++;I[r]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var u=b++;I[u]="("+I[S]+")\\.("+I[S]+")\\.("+I[S]+")";var i=b++;I[i]="("+I[C]+")\\.("+I[C]+")\\.("+I[C]+")";var f=b++;I[f]="(?:"+I[S]+"|"+I[r]+")";var c=b++;I[c]="(?:"+I[C]+"|"+I[r]+")";var l=b++;I[l]="(?:-("+I[f]+"(?:\\."+I[f]+")*))";var s=b++;I[s]="(?:-?("+I[c]+"(?:\\."+I[c]+")*))";var d=b++;I[d]="[0-9A-Za-z-]+";var n=b++;I[n]="(?:\\+("+I[d]+"(?:\\."+I[d]+")*))";var a=b++,o="v?"+I[u]+I[l]+"?"+I[n]+"?";I[a]="^"+o+"$";var g="[v=\\s]*"+I[i]+I[s]+"?"+I[n]+"?",h=b++;I[h]="^"+g+"$";var v=b++;I[v]="((?:<|>)?=?)";var m=b++;I[m]=I[C]+"|x|X|\\*";var w=b++;I[w]=I[S]+"|x|X|\\*";var D=b++;I[D]="[v=\\s]*("+I[w]+")(?:\\.("+I[w]+")(?:\\.("+I[w]+")(?:"+I[l]+")?"+I[n]+"?)?)?";var y=b++;I[y]="[v=\\s]*("+I[m]+")(?:\\.("+I[m]+")(?:\\.("+I[m]+")(?:"+I[s]+")?"+I[n]+"?)?)?";var T=b++;I[T]="^"+I[v]+"\\s*"+I[D]+"$";var _=b++;I[_]="^"+I[v]+"\\s*"+I[y]+"$";var L=b++;I[L]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var M=b++;I[M]="(?:~>?)";var O=b++;I[O]="(\\s*)"+I[M]+"\\s+",E[O]=new RegExp(I[O],"g");var N=b++;I[N]="^"+I[M]+I[D]+"$";var P=b++;I[P]="^"+I[M]+I[y]+"$";var B=b++;I[B]="(?:\\^)";var V=b++;I[V]="(\\s*)"+I[B]+"\\s+",E[V]=new RegExp(I[V],"g");var z=b++;I[z]="^"+I[B]+I[D]+"$";var x=b++;I[x]="^"+I[B]+I[y]+"$";var H=b++;I[H]="^"+I[v]+"\\s*("+g+")$|^$";var W=b++;I[W]="^"+I[v]+"\\s*("+o+")$|^$";var U=b++;I[U]="(\\s*)"+I[v]+"\\s*("+g+"|"+I[D]+")",E[U]=new RegExp(I[U],"g");var $=b++;I[$]="^\\s*("+I[D]+")\\s+-\\s+("+I[D]+")\\s*$";var q=b++;I[q]="^\\s*("+I[y]+")\\s+-\\s+("+I[y]+")\\s*$";var X=b++;I[X]="(<|>)?=?\\s*\\*";for(var G=0;G<35;G++)R(G,I[G]),E[G]||(E[G]=new RegExp(I[G]));function Q(be,ge){if(be instanceof j)return be;if(typeof be!="string"||be.length>A||!(ge?E[h]:E[a]).test(be))return null;try{return new j(be,ge)}catch{return null}}function j(be,ge){if(be instanceof j){if(be.loose===ge)return be;be=be.version}else if(typeof be!="string")throw new TypeError("Invalid Version: "+be);if(be.length>A)throw new TypeError("version is longer than "+A+" characters");if(!(this instanceof j))return new j(be,ge);R("SemVer",be,ge),this.loose=ge;var ue=be.trim().match(ge?E[h]:E[a]);if(!ue)throw new TypeError("Invalid Version: "+be);if(this.raw=be,this.major=+ue[1],this.minor=+ue[2],this.patch=+ue[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");ue[4]?this.prerelease=ue[4].split(".").map(function(Ce){if(/^[0-9]+$/.test(Ce)){var De=+Ce;if(De>=0&&De<k)return De}return Ce}):this.prerelease=[],this.build=ue[5]?ue[5].split("."):[],this.format()}e.parse=Q,e.valid=function(be,ge){var ue=Q(be,ge);return ue?ue.version:null},e.clean=function(be,ge){var ue=Q(be.trim().replace(/^[=v]+/,""),ge);return ue?ue.version:null},e.SemVer=j,j.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},j.prototype.toString=function(){return this.version},j.prototype.compare=function(be){return R("SemVer.compare",this.version,this.loose,be),be instanceof j||(be=new j(be,this.loose)),this.compareMain(be)||this.comparePre(be)},j.prototype.compareMain=function(be){return be instanceof j||(be=new j(be,this.loose)),Y(this.major,be.major)||Y(this.minor,be.minor)||Y(this.patch,be.patch)},j.prototype.comparePre=function(be){if(be instanceof j||(be=new j(be,this.loose)),this.prerelease.length&&!be.prerelease.length)return-1;if(!this.prerelease.length&&be.prerelease.length)return 1;if(!this.prerelease.length&&!be.prerelease.length)return 0;var ge=0;do{var ue=this.prerelease[ge],Ce=be.prerelease[ge];if(R("prerelease compare",ge,ue,Ce),ue===void 0&&Ce===void 0)return 0;if(Ce===void 0)return 1;if(ue===void 0)return-1;if(ue!==Ce)return Y(ue,Ce)}while(++ge)},j.prototype.inc=function(be,ge){switch(be){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 ue=this.prerelease.length;--ue>=0;)typeof this.prerelease[ue]=="number"&&(this.prerelease[ue]++,ue=-2);ue===-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: "+be)}return this.format(),this.raw=this.version,this},e.inc=function(be,ge,ue,Ce){typeof ue=="string"&&(Ce=ue,ue=void 0);try{return new j(be,ue).inc(ge,Ce).version}catch{return null}},e.diff=function(be,ge){if(oe(be,ge))return null;var ue=Q(be),Ce=Q(ge);if(ue.prerelease.length||Ce.prerelease.length){for(var De in ue)if((De==="major"||De==="minor"||De==="patch")&&ue[De]!==Ce[De])return"pre"+De;return"prerelease"}for(var De in ue)if((De==="major"||De==="minor"||De==="patch")&&ue[De]!==Ce[De])return De},e.compareIdentifiers=Y;var K=/^[0-9]+$/;function Y(be,ge){var ue=K.test(be),Ce=K.test(ge);return ue&&Ce&&(be=+be,ge=+ge),ue&&!Ce?-1:Ce&&!ue?1:be<ge?-1:be>ge?1:0}function ee(be,ge,ue){return new j(be,ue).compare(new j(ge,ue))}function ie(be,ge,ue){return ee(be,ge,ue)>0}function re(be,ge,ue){return ee(be,ge,ue)<0}function oe(be,ge,ue){return ee(be,ge,ue)===0}function se(be,ge,ue){return ee(be,ge,ue)!==0}function te(be,ge,ue){return ee(be,ge,ue)>=0}function Z(be,ge,ue){return ee(be,ge,ue)<=0}function ne(be,ge,ue,Ce){var De;switch(ge){case"===":typeof be=="object"&&(be=be.version),typeof ue=="object"&&(ue=ue.version),De=be===ue;break;case"!==":typeof be=="object"&&(be=be.version),typeof ue=="object"&&(ue=ue.version),De=be!==ue;break;case"":case"=":case"==":De=oe(be,ue,Ce);break;case"!=":De=se(be,ue,Ce);break;case">":De=ie(be,ue,Ce);break;case">=":De=te(be,ue,Ce);break;case"<":De=re(be,ue,Ce);break;case"<=":De=Z(be,ue,Ce);break;default:throw new TypeError("Invalid operator: "+ge)}return De}function ce(be,ge){if(be instanceof ce){if(be.loose===ge)return be;be=be.value}if(!(this instanceof ce))return new ce(be,ge);R("comparator",be,ge),this.loose=ge,this.parse(be),this.semver===de?this.value="":this.value=this.operator+this.semver.version,R("comp",this)}e.rcompareIdentifiers=function(be,ge){return Y(ge,be)},e.major=function(be,ge){return new j(be,ge).major},e.minor=function(be,ge){return new j(be,ge).minor},e.patch=function(be,ge){return new j(be,ge).patch},e.compare=ee,e.compareLoose=function(be,ge){return ee(be,ge,!0)},e.rcompare=function(be,ge,ue){return ee(ge,be,ue)},e.sort=function(be,ge){return be.sort(function(ue,Ce){return e.compare(ue,Ce,ge)})},e.rsort=function(be,ge){return be.sort(function(ue,Ce){return e.rcompare(ue,Ce,ge)})},e.gt=ie,e.lt=re,e.eq=oe,e.neq=se,e.gte=te,e.lte=Z,e.cmp=ne,e.Comparator=ce;var de={};function he(be,ge){if(be instanceof he)return be.loose===ge?be:new he(be.raw,ge);if(be instanceof ce)return new he(be.value,ge);if(!(this instanceof he))return new he(be,ge);if(this.loose=ge,this.raw=be,this.set=be.split(/\s*\|\|\s*/).map(function(ue){return this.parseRange(ue.trim())},this).filter(function(ue){return ue.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+be);this.format()}function pe(be){return!be||be.toLowerCase()==="x"||be==="*"}function me(be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e){return((ge=pe(ue)?"":pe(Ce)?">="+ue+".0.0":pe(De)?">="+ue+"."+Ce+".0":">="+ge)+" "+(fe=pe(ye)?"":pe(ke)?"<"+(+ye+1)+".0.0":pe(Ee)?"<"+ye+"."+(+ke+1)+".0":Te?"<="+ye+"."+ke+"."+Ee+"-"+Te:"<="+fe)).trim()}function Se(be,ge){for(var ue=0;ue<be.length;ue++)if(!be[ue].test(ge))return!1;if(ge.prerelease.length){for(ue=0;ue<be.length;ue++)if(R(be[ue].semver),be[ue].semver!==de&&be[ue].semver.prerelease.length>0){var Ce=be[ue].semver;if(Ce.major===ge.major&&Ce.minor===ge.minor&&Ce.patch===ge.patch)return!0}return!1}return!0}function Ie(be,ge,ue){try{ge=new he(ge,ue)}catch{return!1}return ge.test(be)}function ve(be,ge,ue,Ce){var De,Ae,Pe,fe,ye;switch(be=new j(be,Ce),ge=new he(ge,Ce),ue){case">":De=ie,Ae=Z,Pe=re,fe=">",ye=">=";break;case"<":De=re,Ae=te,Pe=ie,fe="<",ye="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Ie(be,ge,Ce))return!1;for(var ke=0;ke<ge.set.length;++ke){var Ee=ge.set[ke],Te=null,_e=null;if(Ee.forEach(function(Re){Re.semver===de&&(Re=new ce(">=0.0.0")),Te=Te||Re,_e=_e||Re,De(Re.semver,Te.semver,Ce)?Te=Re:Pe(Re.semver,_e.semver,Ce)&&(_e=Re)}),Te.operator===fe||Te.operator===ye||(!_e.operator||_e.operator===fe)&&Ae(be,_e.semver)||_e.operator===ye&&Pe(be,_e.semver))return!1}return!0}ce.prototype.parse=function(be){var ge=this.loose?E[H]:E[W],ue=be.match(ge);if(!ue)throw new TypeError("Invalid comparator: "+be);this.operator=ue[1],this.operator==="="&&(this.operator=""),ue[2]?this.semver=new j(ue[2],this.loose):this.semver=de},ce.prototype.toString=function(){return this.value},ce.prototype.test=function(be){return R("Comparator.test",be,this.loose),this.semver===de||(typeof be=="string"&&(be=new j(be,this.loose)),ne(be,this.operator,this.semver,this.loose))},ce.prototype.intersects=function(be,ge){if(!(be instanceof ce))throw new TypeError("a Comparator is required");var ue;if(this.operator==="")return ue=new he(be.value,ge),Ie(this.value,ue,ge);if(be.operator==="")return ue=new he(this.value,ge),Ie(be.semver,ue,ge);var Ce=!(this.operator!==">="&&this.operator!==">"||be.operator!==">="&&be.operator!==">"),De=!(this.operator!=="<="&&this.operator!=="<"||be.operator!=="<="&&be.operator!=="<"),Ae=this.semver.version===be.semver.version,Pe=!(this.operator!==">="&&this.operator!=="<="||be.operator!==">="&&be.operator!=="<="),fe=ne(this.semver,"<",be.semver,ge)&&(this.operator===">="||this.operator===">")&&(be.operator==="<="||be.operator==="<"),ye=ne(this.semver,">",be.semver,ge)&&(this.operator==="<="||this.operator==="<")&&(be.operator===">="||be.operator===">");return Ce||De||Ae&&Pe||fe||ye},e.Range=he,he.prototype.format=function(){return this.range=this.set.map(function(be){return be.join(" ").trim()}).join("||").trim(),this.range},he.prototype.toString=function(){return this.range},he.prototype.parseRange=function(be){var ge=this.loose;be=be.trim(),R("range",be,ge);var ue=ge?E[q]:E[$];be=be.replace(ue,me),R("hyphen replace",be),be=be.replace(E[U],"$1$2$3"),R("comparator trim",be,E[U]),be=(be=(be=be.replace(E[O],"$1~")).replace(E[V],"$1^")).split(/\s+/).join(" ");var Ce=ge?E[H]:E[W],De=be.split(" ").map(function(Ae){return function(Pe,fe){return R("comp",Pe),Pe=function(ye,ke){return ye.trim().split(/\s+/).map(function(Ee){return function(Te,_e){R("caret",Te,_e);var Re=_e?E[x]:E[z];return Te.replace(Re,function(Le,Me,Oe,Ke,We){var Xe;return R("caret",Te,Le,Me,Oe,Ke,We),pe(Me)?Xe="":pe(Oe)?Xe=">="+Me+".0.0 <"+(+Me+1)+".0.0":pe(Ke)?Xe=Me==="0"?">="+Me+"."+Oe+".0 <"+Me+"."+(+Oe+1)+".0":">="+Me+"."+Oe+".0 <"+(+Me+1)+".0.0":We?(R("replaceCaret pr",We),We.charAt(0)!=="-"&&(We="-"+We),Xe=Me==="0"?Oe==="0"?">="+Me+"."+Oe+"."+Ke+We+" <"+Me+"."+Oe+"."+(+Ke+1):">="+Me+"."+Oe+"."+Ke+We+" <"+Me+"."+(+Oe+1)+".0":">="+Me+"."+Oe+"."+Ke+We+" <"+(+Me+1)+".0.0"):(R("no pr"),Xe=Me==="0"?Oe==="0"?">="+Me+"."+Oe+"."+Ke+" <"+Me+"."+Oe+"."+(+Ke+1):">="+Me+"."+Oe+"."+Ke+" <"+Me+"."+(+Oe+1)+".0":">="+Me+"."+Oe+"."+Ke+" <"+(+Me+1)+".0.0"),R("caret return",Xe),Xe})}(Ee,ke)}).join(" ")}(Pe,fe),R("caret",Pe),Pe=function(ye,ke){return ye.trim().split(/\s+/).map(function(Ee){return function(Te,_e){var Re=_e?E[P]:E[N];return Te.replace(Re,function(Le,Me,Oe,Ke,We){var Xe;return R("tilde",Te,Le,Me,Oe,Ke,We),pe(Me)?Xe="":pe(Oe)?Xe=">="+Me+".0.0 <"+(+Me+1)+".0.0":pe(Ke)?Xe=">="+Me+"."+Oe+".0 <"+Me+"."+(+Oe+1)+".0":We?(R("replaceTilde pr",We),We.charAt(0)!=="-"&&(We="-"+We),Xe=">="+Me+"."+Oe+"."+Ke+We+" <"+Me+"."+(+Oe+1)+".0"):Xe=">="+Me+"."+Oe+"."+Ke+" <"+Me+"."+(+Oe+1)+".0",R("tilde return",Xe),Xe})}(Ee,ke)}).join(" ")}(Pe,fe),R("tildes",Pe),Pe=function(ye,ke){return R("replaceXRanges",ye,ke),ye.split(/\s+/).map(function(Ee){return function(Te,_e){Te=Te.trim();var Re=_e?E[_]:E[T];return Te.replace(Re,function(Le,Me,Oe,Ke,We,Xe){R("xRange",Te,Le,Me,Oe,Ke,We,Xe);var Je=pe(Oe),rt=Je||pe(Ke),je=rt||pe(We);return Me==="="&&je&&(Me=""),Je?Le=Me===">"||Me==="<"?"<0.0.0":"*":Me&&je?(rt&&(Ke=0),je&&(We=0),Me===">"?(Me=">=",rt?(Oe=+Oe+1,Ke=0,We=0):je&&(Ke=+Ke+1,We=0)):Me==="<="&&(Me="<",rt?Oe=+Oe+1:Ke=+Ke+1),Le=Me+Oe+"."+Ke+"."+We):rt?Le=">="+Oe+".0.0 <"+(+Oe+1)+".0.0":je&&(Le=">="+Oe+"."+Ke+".0 <"+Oe+"."+(+Ke+1)+".0"),R("xRange return",Le),Le})}(Ee,ke)}).join(" ")}(Pe,fe),R("xrange",Pe),Pe=function(ye,ke){return R("replaceStars",ye,ke),ye.trim().replace(E[X],"")}(Pe,fe),R("stars",Pe),Pe}(Ae,ge)}).join(" ").split(/\s+/);return this.loose&&(De=De.filter(function(Ae){return!!Ae.match(Ce)})),De=De.map(function(Ae){return new ce(Ae,ge)})},he.prototype.intersects=function(be,ge){if(!(be instanceof he))throw new TypeError("a Range is required");return this.set.some(function(ue){return ue.every(function(Ce){return be.set.some(function(De){return De.every(function(Ae){return Ce.intersects(Ae,ge)})})})})},e.toComparators=function(be,ge){return new he(be,ge).set.map(function(ue){return ue.map(function(Ce){return Ce.value}).join(" ").trim().split(" ")})},he.prototype.test=function(be){if(!be)return!1;typeof be=="string"&&(be=new j(be,this.loose));for(var ge=0;ge<this.set.length;ge++)if(Se(this.set[ge],be))return!0;return!1},e.satisfies=Ie,e.maxSatisfying=function(be,ge,ue){var Ce=null,De=null;try{var Ae=new he(ge,ue)}catch{return null}return be.forEach(function(Pe){Ae.test(Pe)&&(Ce&&De.compare(Pe)!==-1||(De=new j(Ce=Pe,ue)))}),Ce},e.minSatisfying=function(be,ge,ue){var Ce=null,De=null;try{var Ae=new he(ge,ue)}catch{return null}return be.forEach(function(Pe){Ae.test(Pe)&&(Ce&&De.compare(Pe)!==1||(De=new j(Ce=Pe,ue)))}),Ce},e.validRange=function(be,ge){try{return new he(be,ge).range||"*"}catch{return null}},e.ltr=function(be,ge,ue){return ve(be,ge,"<",ue)},e.gtr=function(be,ge,ue){return ve(be,ge,">",ue)},e.outside=ve,e.prerelease=function(be,ge){var ue=Q(be,ge);return ue&&ue.prerelease.length?ue.prerelease:null},e.intersects=function(be,ge,ue){return be=new he(be,ue),ge=new he(ge,ue),be.intersects(ge)},e.coerce=function(be){if(be instanceof j)return be;if(typeof be!="string")return null;var ge=be.match(E[L]);return ge==null?null:Q((ge[1]||"0")+"."+(ge[2]||"0")+"."+(ge[3]||"0"))}}).call(this,t(1))},function(J,e){var t,p,R=J.exports={};function A(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}function E(c){if(t===setTimeout)return setTimeout(c,0);if((t===A||!t)&&setTimeout)return t=setTimeout,setTimeout(c,0);try{return t(c,0)}catch{try{return t.call(null,c,0)}catch{return t.call(this,c,0)}}}(function(){try{t=typeof setTimeout=="function"?setTimeout:A}catch{t=A}try{p=typeof clearTimeout=="function"?clearTimeout:k}catch{p=k}})();var I,b=[],S=!1,C=-1;function r(){S&&I&&(S=!1,I.length?b=I.concat(b):C=-1,b.length&&u())}function u(){if(!S){var c=E(r);S=!0;for(var l=b.length;l;){for(I=b,b=[];++C<l;)I&&I[C].run();C=-1,l=b.length}I=null,S=!1,function(s){if(p===clearTimeout)return clearTimeout(s);if((p===k||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(s);try{p(s)}catch{try{return p.call(null,s)}catch{return p.call(this,s)}}}(c)}}function i(c,l){this.fun=c,this.array=l}function f(){}R.nextTick=function(c){var l=new Array(arguments.length-1);if(arguments.length>1)for(var s=1;s<arguments.length;s++)l[s-1]=arguments[s];b.push(new i(c,l)),b.length!==1||S||E(u)},i.prototype.run=function(){this.fun.apply(null,this.array)},R.title="browser",R.browser=!0,R.env={},R.argv=[],R.version="",R.versions={},R.on=f,R.addListener=f,R.once=f,R.off=f,R.removeListener=f,R.removeAllListeners=f,R.emit=f,R.prependListener=f,R.prependOnceListener=f,R.listeners=function(c){return[]},R.binding=function(c){throw new Error("process.binding is not supported")},R.cwd=function(){return"/"},R.chdir=function(c){throw new Error("process.chdir is not supported")},R.umask=function(){return 0}}])}),define(ae[1027],le([1,0]),function(J,e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SkipList=void 0;class p{constructor(E,I,b){this.level=E,this.key=I,this.value=b,this.forward=[]}}const R=void 0;class A{constructor(E,I=2**16){this.comparator=E,this[t]="SkipList",this._level=0,this._size=0,this._maxLevel=Math.max(1,Math.log2(I)|0),this._header=new p(this._maxLevel,R,R)}get size(){return this._size}clear(){this._header=new p(this._maxLevel,R,R)}has(E){return Boolean(A._search(this,E,this.comparator))}get(E){return A._search(this,E,this.comparator)?.value}set(E,I){return A._insert(this,E,I,this.comparator)&&(this._size+=1),this}delete(E){const I=A._delete(this,E,this.comparator);return I&&(this._size-=1),I}forEach(E,I){let b=this._header.forward[0];for(;b;)E.call(I,b.value,b.key,this),b=b.forward[0]}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*entries(){let E=this._header.forward[0];for(;E;)yield[E.key,E.value],E=E.forward[0]}*keys(){let E=this._header.forward[0];for(;E;)yield E.key,E=E.forward[0]}*values(){let E=this._header.forward[0];for(;E;)yield E.value,E=E.forward[0]}toString(){let E="[SkipList]:",I=this._header.forward[0];for(;I;)E+=`node(${I.key}, ${I.value}, lvl:${I.level})`,I=I.forward[0];return E}static _search(E,I,b){let S=E._header;for(let C=E._level-1;C>=0;C--)for(;S.forward[C]&&b(S.forward[C].key,I)<0;)S=S.forward[C];if(S=S.forward[0],S&&b(S.key,I)===0)return S}static _insert(E,I,b,S){const C=[];let r=E._header;for(let u=E._level-1;u>=0;u--){for(;r.forward[u]&&S(r.forward[u].key,I)<0;)r=r.forward[u];C[u]=r}if(r=r.forward[0],r&&S(r.key,I)===0)return r.value=b,!1;{const u=A._randomLevel(E);if(u>E._level){for(let i=E._level;i<u;i++)C[i]=E._header;E._level=u}r=new p(u,I,b);for(let i=0;i<u;i++)r.forward[i]=C[i].forward[i],C[i].forward[i]=r;return!0}}static _randomLevel(E,I=.5){let b=1;for(;Math.random()<I&&b<E._maxLevel;)b+=1;return b}static _delete(E,I,b){const S=[];let C=E._header;for(let r=E._level-1;r>=0;r--){for(;C.forward[r]&&b(C.forward[r].key,I)<0;)C=C.forward[r];S[r]=C}if(C=C.forward[0],!C||b(C.key,I)!==0)return!1;for(let r=0;r<E._level&&S[r].forward[r]===C;r++)S[r].forward[r]=C.forward[r];for(;E._level>0&&E._header.forward[E._level-1]===R;)E._level-=1;return!0}}e.SkipList=A}),define(ae[219],le([1,0,21,2]),function(J,e,t,p){"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 R(n){const a=n;return a?typeof a.read=="function":!1}e.isReadable=R;function A(n){const a=n;return a?[a.on,a.pause,a.resume,a.destroy].every(o=>typeof o=="function"):!1}e.isReadableStream=A;function k(n){const a=n;return a?A(a.stream)&&Array.isArray(a.buffer)&&typeof a.ended=="boolean":!1}e.isReadableBufferedStream=k;function E(n,a){return new I(n,a)}e.newWriteableStream=E;class I{constructor(a,o){this.reducer=a,this.options=o,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(o=>this.pendingWritePromises.push(o))}}error(a){this.state.destroyed||(this.state.flowing?this.emitError(a):this.buffer.error.push(a))}end(a){this.state.destroyed||(typeof a<"u"&&this.write(a),this.state.flowing?(this.emitEnd(),this.destroy()):this.state.ended=!0)}emitData(a){this.listeners.data.slice(0).forEach(o=>o(a))}emitError(a){this.listeners.error.length===0?(0,t.onUnexpectedError)(a):this.listeners.error.slice(0).forEach(o=>o(a))}emitEnd(){this.listeners.end.slice(0).forEach(a=>a())}on(a,o){if(!this.state.destroyed)switch(a){case"data":this.listeners.data.push(o),this.resume();break;case"end":this.listeners.end.push(o),this.state.flowing&&this.flowEnd()&&this.destroy();break;case"error":this.listeners.error.push(o),this.state.flowing&&this.flowErrors();break}}removeListener(a,o){if(this.state.destroyed)return;let g;switch(a){case"data":g=this.listeners.data;break;case"end":g=this.listeners.end;break;case"error":g=this.listeners.error;break}if(g){const h=g.indexOf(o);h>=0&&g.splice(h,1)}}flowData(){if(this.buffer.data.length>0){const a=this.reducer(this.buffer.data);this.emitData(a),this.buffer.data.length=0;const o=[...this.pendingWritePromises];this.pendingWritePromises.length=0,o.forEach(g=>g())}}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 b(n,a){const o=[];let g;for(;(g=n.read())!==null;)o.push(g);return a(o)}e.consumeReadable=b;function S(n,a,o){const g=[];let h;for(;(h=n.read())!==null&&g.length<o;)g.push(h);return h===null&&g.length>0?a(g):{read:()=>{if(g.length>0)return g.shift();if(typeof h<"u"){const v=h;return h=void 0,v}return n.read()}}}e.peekReadable=S;function C(n,a){return new Promise((o,g)=>{const h=[];r(n,{onData:v=>{a&&h.push(v)},onError:v=>{a?g(v):o(void 0)},onEnd:()=>{o(a?a(h):void 0)}})})}e.consumeStream=C;function r(n,a){let o=!1;return n.on("error",g=>{o||a.onError(g)}),n.on("end",()=>{o||a.onEnd()}),n.on("data",g=>{o||a.onData(g)}),(0,p.toDisposable)(()=>o=!0)}e.listenStream=r;function u(n,a){return new Promise((o,g)=>{const h=new p.DisposableStore,v=[],m=y=>{if(v.push(y),v.length>a)return h.dispose(),n.pause(),o({stream:n,buffer:v,ended:!1})},w=y=>g(y),D=()=>o({stream:n,buffer:v,ended:!0});h.add((0,p.toDisposable)(()=>n.removeListener("error",w))),n.on("error",w),h.add((0,p.toDisposable)(()=>n.removeListener("end",D))),n.on("end",D),h.add((0,p.toDisposable)(()=>n.removeListener("data",m))),n.on("data",m)})}e.peekStream=u;function i(n,a){const o=E(a);return o.end(n),o}e.toStream=i;function f(){const n=E(()=>{throw new Error("not supported")});return n.end(),n}e.emptyStream=f;function c(n){let a=!1;return{read:()=>a?null:(a=!0,n)}}e.toReadable=c;function l(n,a,o){const g=E(o);return r(n,{onData:h=>g.write(a.data(h)),onError:h=>g.error(a.error?a.error(h):h),onEnd:()=>g.end()}),g}e.transform=l;function s(n,a,o){let g=!1;return{read:()=>{const h=a.read();return g?h:(g=!0,h!==null?o([n,h]):n)}}}e.prefixedReadable=s;function d(n,a,o){let g=!1;const h=E(o);return r(a,{onData:v=>g?h.write(v):(g=!0,h.write(o([n,v]))),onError:v=>h.error(v),onEnd:()=>{g||(g=!0,h.write(n)),h.end()}}),h}e.prefixedStream=d}),define(ae[56],le([1,0,219]),function(J,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 p=typeof Buffer<"u";let R,A;class k{static alloc(y){return p?new k(Buffer.allocUnsafe(y)):new k(new Uint8Array(y))}static wrap(y){return p&&!Buffer.isBuffer(y)&&(y=Buffer.from(y.buffer,y.byteOffset,y.byteLength)),new k(y)}static fromString(y,T){return!(T?.dontUseNodeBuffer||!1)&&p?new k(Buffer.from(y)):(R||(R=new TextEncoder),new k(R.encode(y)))}static fromByteArray(y){const T=k.alloc(y.length);for(let _=0,L=y.length;_<L;_++)T.buffer[_]=y[_];return T}static concat(y,T){if(typeof T>"u"){T=0;for(let M=0,O=y.length;M<O;M++)T+=y[M].byteLength}const _=k.alloc(T);let L=0;for(let M=0,O=y.length;M<O;M++){const N=y[M];_.set(N,L),L+=N.byteLength}return _}constructor(y){this.buffer=y,this.byteLength=this.buffer.byteLength}clone(){const y=k.alloc(this.byteLength);return y.set(this),y}toString(){return p?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 b(this.buffer,y)}writeUInt32BE(y,T){S(this.buffer,y,T)}readUInt32LE(y){return C(this.buffer,y)}writeUInt32LE(y,T){r(this.buffer,y,T)}readUInt8(y){return u(this.buffer,y)}writeUInt8(y,T){i(this.buffer,y,T)}}e.VSBuffer=k;function E(D,y){return D[y+0]<<0>>>0|D[y+1]<<8>>>0}e.readUInt16LE=E;function I(D,y,T){D[T+0]=y&255,y=y>>>8,D[T+1]=y&255}e.writeUInt16LE=I;function b(D,y){return D[y]*2**24+D[y+1]*2**16+D[y+2]*2**8+D[y+3]}e.readUInt32BE=b;function S(D,y,T){D[T+3]=y,y=y>>>8,D[T+2]=y,y=y>>>8,D[T+1]=y,y=y>>>8,D[T]=y}e.writeUInt32BE=S;function C(D,y){return D[y+0]<<0>>>0|D[y+1]<<8>>>0|D[y+2]<<16>>>0|D[y+3]<<24>>>0}e.readUInt32LE=C;function r(D,y,T){D[T+0]=y&255,y=y>>>8,D[T+1]=y&255,y=y>>>8,D[T+2]=y&255,y=y>>>8,D[T+3]=y&255}e.writeUInt32LE=r;function u(D,y){return D[y]}e.readUInt8=u;function i(D,y,T){D[T]=y}e.writeUInt8=i;function f(D){return t.consumeReadable(D,y=>k.concat(y))}e.readableToBuffer=f;function c(D){return t.toReadable(D)}e.bufferToReadable=c;function l(D){return t.consumeStream(D,y=>k.concat(y))}e.streamToBuffer=l;async function s(D){return D.ended?k.concat(D.buffer):k.concat([...D.buffer,await l(D.stream)])}e.bufferedStreamToBuffer=s;function d(D){return t.toStream(D,y=>k.concat(y))}e.bufferToStream=d;function n(D){return t.transform(D,{data:y=>typeof y=="string"?k.fromString(y):k.wrap(y)},y=>k.concat(y))}e.streamToBufferReadableStream=n;function a(D){return t.newWriteableStream(y=>k.concat(y),D)}e.newWriteableBufferStream=a;function o(D,y){return t.prefixedReadable(D,y,T=>k.concat(T))}e.prefixedBufferReadable=o;function g(D,y){return t.prefixedStream(D,y,T=>k.concat(T))}e.prefixedBufferStream=g;function h(D){let y=0,T=0,_=0;const L=new Uint8Array(Math.floor(D.length/4*3)),M=N=>{switch(T){case 3:L[_++]=y|N,T=0;break;case 2:L[_++]=y|N>>>2,y=N<<6,T=3;break;case 1:L[_++]=y|N>>>4,y=N<<4,T=2;break;default:y=N<<2,T=1}};for(let N=0;N<D.length;N++){const P=D.charCodeAt(N);if(P>=65&&P<=90)M(P-65);else if(P>=97&&P<=122)M(P-97+26);else if(P>=48&&P<=57)M(P-48+52);else if(P===43||P===45)M(62);else if(P===47||P===95)M(63);else{if(P===61)break;throw new SyntaxError(`Unexpected base64 character ${D[N]}`)}}const O=_;for(;T>0;)M(0);return k.wrap(L).slice(0,O)}e.decodeBase64=h;const v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function w({buffer:D},y=!0,T=!1){const _=T?m:v;let L="";const M=D.byteLength%3;let O=0;for(;O<D.byteLength-M;O+=3){const N=D[O+0],P=D[O+1],B=D[O+2];L+=_[N>>>2],L+=_[(N<<4|P>>>4)&63],L+=_[(P<<2|B>>>6)&63],L+=_[B&63]}if(M===1){const N=D[O+0];L+=_[N>>>2],L+=_[N<<4&63],y&&(L+="==")}else if(M===2){const N=D[O+0],P=D[O+1];L+=_[N>>>2],L+=_[(N<<4|P>>>4)&63],L+=_[P<<2&63],y&&(L+="=")}return L}e.encodeBase64=w}),function(){function J(e,t,p,R){const A=/("[^"\\]*(?:\\.[^"\\]*)*")|('[^'\\]*(?:\\.[^'\\]*)*')|(\/\*[^\/\*]*(?:(?:\*|\/)[^\/\*]*)*?\*\/)|(\/{2,}.*?(?:(?:\r?\n)|$))|(,\s*[}\]])/g;function k(E){return E.replace(A,function(I,b,S,C,r,u){if(C)return"";if(r){const i=r.length;return r[i-1]===` `?r[i-2]==="\r"?`\r `:` `:""}else return u?I.substring(1):I})}return{stripComments:k}}typeof define=="function"?define("vs/base/common/stripComments",[],function(){return J()}):typeof module=="object"&&typeof module.exports=="object"?module.exports=J():console.trace("strip comments defined in UNKNOWN context (neither requirejs or commonjs)")}(),define(ae[13],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.withUndefinedAsNull=e.withNullAsUndefined=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=void 0;function t(g){return typeof g=="string"}e.isString=t;function p(g){return Array.isArray(g)&&g.every(h=>t(h))}e.isStringArray=p;function R(g){return typeof g=="object"&&g!==null&&!Array.isArray(g)&&!(g instanceof RegExp)&&!(g instanceof Date)}e.isObject=R;function A(g){const h=Object.getPrototypeOf(Uint8Array);return typeof g=="object"&&g instanceof h}e.isTypedArray=A;function k(g){return typeof g=="number"&&!isNaN(g)}e.isNumber=k;function E(g){return!!g&&typeof g[Symbol.iterator]=="function"}e.isIterable=E;function I(g){return g===!0||g===!1}e.isBoolean=I;function b(g){return typeof g>"u"}e.isUndefined=b;function S(g){return!C(g)}e.isDefined=S;function C(g){return b(g)||g===null}e.isUndefinedOrNull=C;function r(g,h){if(!g)throw new Error(h?`Unexpected type, expected '${h}'`:"Unexpected type")}e.assertType=r;function u(g){if(C(g))throw new Error("Assertion Failed: argument is undefined or null");return g}e.assertIsDefined=u;function i(...g){const h=[];for(let v=0;v<g.length;v++){const m=g[v];if(C(m))throw new Error(`Assertion Failed: argument at index ${v} is undefined or null`);h.push(m)}return h}e.assertAllDefined=i;const f=Object.prototype.hasOwnProperty;function c(g){if(!R(g))return!1;for(const h in g)if(f.call(g,h))return!1;return!0}e.isEmptyObject=c;function l(g){return typeof g=="function"}e.isFunction=l;function s(...g){return g.length>0&&g.every(l)}e.areFunctions=s;function d(g,h){const v=Math.min(g.length,h.length);for(let m=0;m<v;m++)n(g[m],h[m])}e.validateConstraints=d;function n(g,h){if(t(h)){if(typeof g!==h)throw new Error(`argument does not match constraint: typeof ${h}`)}else if(l(h)){try{if(g instanceof h)return}catch{}if(!C(g)&&g.constructor===h||h.length===1&&h.call(void 0,g)===!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=n;function a(g){return g===null?void 0:g}e.withNullAsUndefined=a;function o(g){return typeof g>"u"?null:g}e.withUndefinedAsNull=o}),define(ae[52],le([1,0,13]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProxyObject=e.getAllMethodNames=e.getAllPropertyNames=e.filter=e.getCaseInsensitive=e.distinct=e.safeStringify=e.equals=e.mixin=e.cloneAndChange=e.deepFreeze=e.deepClone=void 0;function p(l){if(!l||typeof l!="object"||l instanceof RegExp)return l;const s=Array.isArray(l)?[]:{};return Object.entries(l).forEach(([d,n])=>{s[d]=n&&typeof n=="object"?p(n):n}),s}e.deepClone=p;function R(l){if(!l||typeof l!="object")return l;const s=[l];for(;s.length>0;){const d=s.shift();Object.freeze(d);for(const n in d)if(A.call(d,n)){const a=d[n];typeof a=="object"&&!Object.isFrozen(a)&&!(0,t.isTypedArray)(a)&&s.push(a)}}return l}e.deepFreeze=R;const A=Object.prototype.hasOwnProperty;function k(l,s){return E(l,s,new Set)}e.cloneAndChange=k;function E(l,s,d){if((0,t.isUndefinedOrNull)(l))return l;const n=s(l);if(typeof n<"u")return n;if(Array.isArray(l)){const a=[];for(const o of l)a.push(E(o,s,d));return a}if((0,t.isObject)(l)){if(d.has(l))throw new Error("Cannot clone recursive data-structure");d.add(l);const a={};for(const o in l)A.call(l,o)&&(a[o]=E(l[o],s,d));return d.delete(l),a}return l}function I(l,s,d=!0){return(0,t.isObject)(l)?((0,t.isObject)(s)&&Object.keys(s).forEach(n=>{n in l?d&&((0,t.isObject)(l[n])&&(0,t.isObject)(s[n])?I(l[n],s[n],d):l[n]=s[n]):l[n]=s[n]}),l):s}e.mixin=I;function b(l,s){if(l===s)return!0;if(l==null||s===null||s===void 0||typeof l!=typeof s||typeof l!="object"||Array.isArray(l)!==Array.isArray(s))return!1;let d,n;if(Array.isArray(l)){if(l.length!==s.length)return!1;for(d=0;d<l.length;d++)if(!b(l[d],s[d]))return!1}else{const a=[];for(n in l)a.push(n);a.sort();const o=[];for(n in s)o.push(n);if(o.sort(),!b(a,o))return!1;for(d=0;d<a.length;d++)if(!b(l[a[d]],s[a[d]]))return!1}return!0}e.equals=b;function S(l){const s=new Set;return JSON.stringify(l,(d,n)=>{if((0,t.isObject)(n)||Array.isArray(n)){if(s.has(n))return"[Circular]";s.add(n)}return n})}e.safeStringify=S;function C(l,s){const d=Object.create(null);return!l||!s||Object.keys(s).forEach(a=>{const o=l[a],g=s[a];b(o,g)||(d[a]=g)}),d}e.distinct=C;function r(l,s){const d=s.toLowerCase(),n=Object.keys(l).find(a=>a.toLowerCase()===d);return n?l[n]:l[s]}e.getCaseInsensitive=r;function u(l,s){const d=Object.create(null);for(const[n,a]of Object.entries(l))s(n,a)&&(d[n]=a);return d}e.filter=u;function i(l){let s=[],d=Object.getPrototypeOf(l);for(;Object.prototype!==d;)s=s.concat(Object.getOwnPropertyNames(d)),d=Object.getPrototypeOf(d);return s}e.getAllPropertyNames=i;function f(l){const s=[];for(const d of i(l))typeof l[d]=="function"&&s.push(d);return s}e.getAllMethodNames=f;function c(l,s){const d=a=>function(){const o=Array.prototype.slice.call(arguments,0);return s(a,o)},n={};for(const a of l)n[a]=d(a);return n}e.createProxyObject=c}),define(ae[479],le([1,0]),function(J,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 p(A){return A<0?0:A>255?255:A|0}e.toUint8=p;function R(A){return A<0?0:A>4294967295?4294967295:A|0}e.toUint32=R}),define(ae[72],le([1,0]),function(J,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 p(R){return t.test(R)}e.isUUID=p,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let R;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?R=crypto.getRandomValues.bind(crypto):R=function(E){for(let I=0;I<E.length;I++)E[I]=Math.floor(Math.random()*256);return E};const A=new Uint8Array(16),k=[];for(let E=0;E<256;E++)k.push(E.toString(16).padStart(2,"0"));return function(){R(A),A[6]=A[6]&15|64,A[8]=A[8]&63|128;let I=0,b="";return b+=k[A[I++]],b+=k[A[I++]],b+=k[A[I++]],b+=k[A[I++]],b+="-",b+=k[A[I++]],b+=k[A[I++]],b+="-",b+=k[A[I++]],b+=k[A[I++]],b+="-",b+=k[A[I++]],b+=k[A[I++]],b+="-",b+=k[A[I++]],b+=k[A[I++]],b+=k[A[I++]],b+=k[A[I++]],b+=k[A[I++]],b+=k[A[I++]],b}}()}),define(ae[358],le([1,0,72]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VSDataTransfer=e.createFileDataTransferItem=e.createStringDataTransferItem=void 0;function p(k){return{id:(0,t.generateUuid)(),asString:async()=>k,asFile:()=>{},value:typeof k=="string"?k:void 0}}e.createStringDataTransferItem=p;function R(k,E,I){return{id:(0,t.generateUuid)(),asString:async()=>"",asFile:()=>({name:k,uri:E,data:I}),value:void 0}}e.createFileDataTransferItem=R;class A{constructor(){this._entries=new Map}get size(){return this._entries.size}has(E){return this._entries.has(this.toKey(E))}get(E){return this._entries.get(this.toKey(E))?.[0]}append(E,I){const b=this._entries.get(E);b?b.push(I):this._entries.set(this.toKey(E),[I])}replace(E,I){this._entries.set(this.toKey(E),[I])}delete(E){this._entries.delete(this.toKey(E))}*entries(){for(const[E,I]of this._entries.entries())for(const b of I)yield[E,b]}values(){return Array.from(this._entries.values()).flat()}forEach(E){for(const[I,b]of this.entries())E(b,I)}toKey(E){return E.toLowerCase()}}e.VSDataTransfer=A}),define(ae[1028],le([1,0]),function(J,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(ae[1029],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Protocol=void 0;class t{constructor(R,A){this.sender=R,this.onMessage=A}send(R){try{this.sender.send("vscode:message",R.buffer)}catch{}}disconnect(){this.sender.send("vscode:disconnect",null)}}e.Protocol=t}),define(ae[711],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OfflineError=e.isOfflineError=void 0;const t="Offline";function p(A){return A instanceof R?!0:A instanceof Error&&A.name===t&&A.message===t}e.isOfflineError=p;class R extends Error{constructor(){super(t),this.name=this.message}}e.OfflineError=R}),define(ae[1030],le([1,0,56,21,711]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.request=void 0;function A(I,b){if(!navigator.onLine)throw new R.OfflineError;I.proxyAuthorization&&(I.headers={...I.headers||{},"Proxy-Authorization":I.proxyAuthorization});const S=new XMLHttpRequest;return new Promise((C,r)=>{S.open(I.type||"GET",I.url||"",!0,I.user,I.password),k(S,I),S.responseType="arraybuffer",S.onerror=u=>r(new Error(S.statusText&&"XHR failed: "+S.statusText||"XHR failed")),S.onload=u=>{C({res:{statusCode:S.status,headers:E(S)},stream:(0,t.bufferToStream)(t.VSBuffer.wrap(new Uint8Array(S.response)))})},S.ontimeout=u=>r(new Error(`XHR timeout: ${I.timeout}ms`)),I.timeout&&(S.timeout=I.timeout),S.send(I.data),b.onCancellationRequested(()=>{S.abort(),r((0,p.canceled)())})})}e.request=A;function k(I,b){if(b.headers){e:for(const S in b.headers){switch(S){case"User-Agent":case"Accept-Encoding":case"Content-Length":continue e}I.setRequestHeader(S,b.headers[S])}}}function E(I){const b=Object.create(null);for(const S of I.getAllResponseHeaders().split(/\r\n|\n|\r/g))if(S){const C=S.indexOf(":");b[S.substr(0,C).trim().toLowerCase()]=S.substr(C+1).trim()}return b}}),define(ae[712],le([30]),{}),define(ae[1031],le([30]),{}),define(ae[1032],le([30]),{}),define(ae[1033],le([30]),{}),define(ae[1034],le([30]),{}),define(ae[1035],le([30]),{}),define(ae[480],le([1,0,29,1034,1035]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=void 0;function p(R){let A=R.definition;for(;A instanceof t.Codicon;)A=A.definition;return`.codicon-${R.id}:before { content: '${A.fontCharacter}'; }`}e.formatRule=p}),define(ae[1036],le([30]),{}),define(ae[1037],le([30]),{}),define(ae[1038],le([30]),{}),define(ae[713],le([30]),{}),define(ae[714],le([30]),{}),define(ae[715],le([30]),{}),define(ae[1039],le([30]),{}),define(ae[1040],le([30]),{}),define(ae[1041],le([30]),{}),define(ae[1042],le([30]),{}),define(ae[716],le([30]),{}),define(ae[1043],le([30]),{}),define(ae[1044],le([30]),{}),define(ae[324],le([1,0,1044]),function(J,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(ae[1045],le([30]),{}),define(ae[1046],le([30]),{}),define(ae[1047],le([30]),{}),define(ae[1048],le([30]),{}),define(ae[1049],le([30]),{}),define(ae[1050],le([30]),{}),define(ae[1051],le([30]),{}),define(ae[1052],le([30]),{}),define(ae[1053],le([30]),{}),define(ae[1054],le([30]),{}),define(ae[1055],le([30]),{}),define(ae[481],le([30]),{}),define(ae[1056],le([30]),{}),define(ae[1057],le([30]),{}),define(ae[1058],le([30]),{}),define(ae[1059],le([30]),{}),define(ae[1060],le([30]),{}),define(ae[1061],le([30]),{}),define(ae[1062],le([30]),{}),define(ae[1063],le([30]),{}),define(ae[1064],le([30]),{}),define(ae[1065],le([30]),{}),define(ae[1066],le([30]),{}),define(ae[1067],le([30]),{}),define(ae[1068],le([30]),{}),define(ae[1069],le([30]),{}),define(ae[1070],le([30]),{}),define(ae[1071],le([30]),{}),define(ae[1072],le([30]),{}),define(ae[1073],le([30]),{}),define(ae[1074],le([30]),{}),define(ae[1075],le([30]),{}),define(ae[1076],le([30]),{}),define(ae[1077],le([30]),{}),define(ae[1078],le([30]),{}),define(ae[1079],le([30]),{}),define(ae[1080],le([30]),{}),define(ae[1081],le([30]),{}),define(ae[1082],le([30]),{}),define(ae[1083],le([30]),{}),define(ae[1084],le([30]),{}),define(ae[1085],le([30]),{}),define(ae[1086],le([30]),{}),define(ae[1087],le([30]),{}),define(ae[1088],le([30]),{}),define(ae[1089],le([30]),{}),define(ae[1090],le([30]),{}),define(ae[1091],le([30]),{}),define(ae[1092],le([30]),{}),define(ae[1093],le([30]),{}),define(ae[1094],le([30]),{}),define(ae[1095],le([30]),{}),define(ae[1096],le([30]),{}),define(ae[1097],le([30]),{}),define(ae[1098],le([30]),{}),define(ae[1099],le([30]),{}),define(ae[1100],le([30]),{}),define(ae[1101],le([30]),{}),define(ae[1102],le([30]),{}),define(ae[1103],le([30]),{}),define(ae[1104],le([30]),{}),define(ae[1105],le([30]),{}),define(ae[1106],le([30]),{}),define(ae[717],le([30]),{}),define(ae[1107],le([30]),{}),define(ae[1108],le([30]),{}),define(ae[1109],le([30]),{}),define(ae[1110],le([30]),{}),define(ae[1111],le([30]),{}),define(ae[1112],le([30]),{}),define(ae[1113],le([30]),{}),define(ae[1114],le([30]),{}),define(ae[1115],le([30]),{}),define(ae[1116],le([30]),{}),define(ae[718],le([30]),{}),define(ae[1117],le([30]),{}),define(ae[1118],le([30]),{}),define(ae[1119],le([30]),{}),define(ae[1120],le([30]),{}),define(ae[719],le([30]),{}),define(ae[720],le([30]),{}),define(ae[1121],le([30]),{}),define(ae[1122],le([30]),{}),define(ae[721],le([30]),{}),define(ae[1123],le([30]),{}),define(ae[1124],le([30]),{}),define(ae[1125],le([30]),{}),define(ae[1126],le([30]),{}),define(ae[1127],le([30]),{}),define(ae[1128],le([30]),{}),define(ae[1129],le([30]),{}),define(ae[1130],le([30]),{}),define(ae[1131],le([30]),{}),define(ae[722],le([30]),{}),define(ae[1132],le([30]),{}),define(ae[1133],le([30]),{}),define(ae[1134],le([30]),{}),define(ae[1135],le([30]),{}),define(ae[1136],le([30]),{}),define(ae[1137],le([30]),{}),define(ae[1138],le([30]),{}),define(ae[1139],le([30]),{}),define(ae[1140],le([30]),{}),define(ae[1141],le([30]),{}),define(ae[1142],le([30]),{}),define(ae[1143],le([30]),{}),define(ae[1144],le([30]),{}),define(ae[1145],le([30]),{}),define(ae[1146],le([30]),{}),define(ae[1147],le([30]),{}),define(ae[1148],le([30]),{}),define(ae[1149],le([30]),{}),define(ae[1150],le([30]),{}),define(ae[1151],le([30]),{}),define(ae[1152],le([30]),{}),define(ae[1153],le([30]),{}),define(ae[1154],le([30]),{}),define(ae[1155],le([30]),{}),define(ae[1156],le([30]),{}),define(ae[1157],le([30]),{}),define(ae[1158],le([30]),{}),define(ae[1159],le([30]),{}),define(ae[1160],le([30]),{}),define(ae[1161],le([30]),{}),define(ae[1162],le([30]),{}),define(ae[1163],le([30]),{}),define(ae[1164],le([30]),{}),define(ae[1165],le([30]),{}),define(ae[1166],le([30]),{}),define(ae[1167],le([30]),{}),define(ae[1168],le([30]),{}),define(ae[1169],le([30]),{}),define(ae[1170],le([30]),{}),define(ae[1171],le([30]),{}),define(ae[407],le([30]),{}),define(ae[1172],le([30]),{}),define(ae[1173],le([30]),{}),define(ae[482],le([30]),{}),define(ae[1174],le([30]),{}),define(ae[1175],le([30]),{}),define(ae[1176],le([30]),{}),define(ae[1177],le([30]),{}),define(ae[1178],le([30]),{}),define(ae[1179],le([30]),{}),define(ae[1180],le([30]),{}),define(ae[1181],le([30]),{}),define(ae[1182],le([30]),{}),define(ae[1183],le([30]),{}),define(ae[723],le([30]),{}),define(ae[1184],le([30]),{}),define(ae[1185],le([30]),{}),define(ae[1186],le([30]),{}),define(ae[1187],le([30]),{}),define(ae[1188],le([30]),{}),define(ae[1189],le([30]),{}),define(ae[235],le([1,0,121]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function p(R,A){R instanceof t.FastDomNode?(R.setFontFamily(A.getMassagedFontFamily()),R.setFontWeight(A.fontWeight),R.setFontSize(A.fontSize),R.setFontFeatureSettings(A.fontFeatureSettings),R.setLineHeight(A.lineHeight),R.setLetterSpacing(A.letterSpacing)):(R.style.fontFamily=A.getMassagedFontFamily(),R.style.fontWeight=A.fontWeight,R.style.fontSize=A.fontSize+"px",R.style.fontFeatureSettings=A.fontFeatureSettings,R.style.lineHeight=A.lineHeight+"px",R.style.letterSpacing=A.letterSpacing+"px")}e.applyFontInfo=p}),define(ae[1190],le([1,0,235]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=e.CharWidthRequestType=void 0;var p;(function(E){E[E.Regular=0]="Regular",E[E.Italic=1]="Italic",E[E.Bold=2]="Bold"})(p=e.CharWidthRequestType||(e.CharWidthRequestType={}));class R{constructor(I,b){this.chr=I,this.type=b,this.width=0}fulfill(I){this.width=I}}e.CharWidthRequest=R;class A{constructor(I,b){this._bareFontInfo=I,this._requests=b,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 b=document.createElement("div");(0,t.applyFontInfo)(b,this._bareFontInfo),I.appendChild(b);const S=document.createElement("div");(0,t.applyFontInfo)(S,this._bareFontInfo),S.style.fontWeight="bold",I.appendChild(S);const C=document.createElement("div");(0,t.applyFontInfo)(C,this._bareFontInfo),C.style.fontStyle="italic",I.appendChild(C);const r=[];for(const u of this._requests){let i;u.type===0&&(i=b),u.type===2&&(i=S),u.type===1&&(i=C),i.appendChild(document.createElement("br"));const f=document.createElement("span");A._render(f,u),i.appendChild(f),r.push(f)}this._container=I,this._testElements=r}static _render(I,b){if(b.chr===" "){let S="\xA0";for(let C=0;C<8;C++)S+=S;I.innerText=S}else{let S=b.chr;for(let C=0;C<8;C++)S+=S;I.textContent=S}}_readFromDomElements(){for(let I=0,b=this._requests.length;I<b;I++){const S=this._requests[I],C=this._testElements[I];S.fulfill(C.offsetWidth/256)}}}function k(E,I){new A(E,I).read()}e.readCharWidths=k}),define(ae[724],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=e.EditorSettingMigration=void 0;class t{constructor(I,b){this.key=I,this.migrate=b}apply(I){const b=t._read(I,this.key),S=r=>t._read(I,r),C=(r,u)=>t._write(I,r,u);this.migrate(b,S,C)}static _read(I,b){if(typeof I>"u")return;const S=b.indexOf(".");if(S>=0){const C=b.substring(0,S);return this._read(I[C],b.substring(S+1))}return I[b]}static _write(I,b,S){const C=b.indexOf(".");if(C>=0){const r=b.substring(0,C);I[r]=I[r]||{},this._write(I[r],b.substring(C+1),S);return}I[b]=S}}e.EditorSettingMigration=t,t.items=[];function p(E,I){t.items.push(new t(E,I))}function R(E,I){p(E,(b,S,C)=>{if(typeof b<"u"){for(const[r,u]of I)if(b===r){C(E,u);return}}})}function A(E){t.items.forEach(I=>I.apply(E))}e.migrateOptions=A,R("wordWrap",[[!0,"on"],[!1,"off"]]),R("lineNumbers",[[!0,"on"],[!1,"off"]]),R("cursorBlinking",[["visible","solid"]]),R("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),R("renderLineHighlight",[[!0,"line"],[!1,"none"]]),R("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),R("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),R("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),R("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),R("autoIndent",[[!1,"advanced"],[!0,"full"]]),R("matchBrackets",[[!0,"always"],[!1,"never"]]),p("autoClosingBrackets",(E,I,b)=>{E===!1&&(b("autoClosingBrackets","never"),typeof I("autoClosingQuotes")>"u"&&b("autoClosingQuotes","never"),typeof I("autoSurround")>"u"&&b("autoSurround","never"))}),p("renderIndentGuides",(E,I,b)=>{typeof E<"u"&&(b("renderIndentGuides",void 0),typeof I("guides.indentation")>"u"&&b("guides.indentation",!!E))}),p("highlightActiveIndentGuide",(E,I,b)=>{typeof E<"u"&&(b("highlightActiveIndentGuide",void 0),typeof I("guides.highlightActiveIndentation")>"u"&&b("guides.highlightActiveIndentation",!!E))});const k={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};p("suggest.filteredTypes",(E,I,b)=>{if(E&&typeof E=="object"){for(const S of Object.entries(k))E[S[0]]===!1&&typeof I(`suggest.${S[1]}`)>"u"&&b(`suggest.${S[1]}`,!1);b("suggest.filteredTypes",void 0)}}),p("quickSuggestions",(E,I,b)=>{if(typeof E=="boolean"){const S=E?"on":"off";b("quickSuggestions",{comments:S,strings:S,other:S})}}),p("experimental.stickyScroll.enabled",(E,I,b)=>{typeof E=="boolean"&&(b("experimental.stickyScroll.enabled",void 0),typeof I("stickyScroll.enabled")>"u"&&b("stickyScroll.enabled",E))}),p("experimental.stickyScroll.maxLineCount",(E,I,b)=>{typeof E=="number"&&(b("experimental.stickyScroll.maxLineCount",void 0),typeof I("stickyScroll.maxLineCount")>"u"&&b("stickyScroll.maxLineCount",E))})}),define(ae[483],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class t{static capture(R){let A=null,k=0;if(R.getScrollTop()!==0){const E=R.getVisibleRanges();if(E.length>0){A=E[0].getStartPosition();const I=R.getTopForPosition(A.lineNumber,A.column);k=R.getScrollTop()-I}}return new t(A,k,R.getPosition())}constructor(R,A,k){this._visiblePosition=R,this._visiblePositionScrollDelta=A,this._cursorPosition=k}restore(R){if(this._visiblePosition){const A=R.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);R.setScrollTop(A+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(R){const A=R.getPosition();if(!this._cursorPosition||!A)return;const k=R.getTopForLineNumber(A.lineNumber)-R.getTopForLineNumber(this._cursorPosition.lineNumber);R.setScrollTop(R.getScrollTop()+k)}}e.StableEditorScrollState=t}),define(ae[408],le([1,0]),function(J,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(S,C){this._restrictedRenderingContextBrand=void 0,this._viewLayout=S,this.viewportData=C,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const r=this._viewLayout.getCurrentViewport();this.scrollTop=r.top,this.scrollLeft=r.left,this.viewportWidth=r.width,this.viewportHeight=r.height}getScrolledTopFromAbsoluteTop(S){return S-this.scrollTop}getVerticalOffsetForLineNumber(S,C){return this._viewLayout.getVerticalOffsetForLineNumber(S,C)}getVerticalOffsetAfterLineNumber(S,C){return this._viewLayout.getVerticalOffsetAfterLineNumber(S,C)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=t;class p extends t{constructor(S,C,r){super(S,C),this._renderingContextBrand=void 0,this._viewLines=r}linesVisibleRangesForRange(S,C){return this._viewLines.linesVisibleRangesForRange(S,C)}visibleRangeForPosition(S){return this._viewLines.visibleRangeForPosition(S)}}e.RenderingContext=p;class R{static firstLine(S){if(!S)return null;let C=null;for(const r of S)(!C||r.lineNumber<C.lineNumber)&&(C=r);return C}static lastLine(S){if(!S)return null;let C=null;for(const r of S)(!C||r.lineNumber>C.lineNumber)&&(C=r);return C}constructor(S,C,r){this.outsideRenderedLine=S,this.lineNumber=C,this.ranges=r}}e.LineVisibleRanges=R;class A{static from(S){const C=new Array(S.length);for(let r=0,u=S.length;r<u;r++){const i=S[r];C[r]=new A(i.left,i.width)}return C}constructor(S,C){this._horizontalRangeBrand=void 0,this.left=Math.round(S),this.width=Math.round(C)}toString(){return`[${this.left},${this.width}]`}}e.HorizontalRange=A;class k{constructor(S,C){this._floatHorizontalRangeBrand=void 0,this.left=S,this.width=C}toString(){return`[${this.left},${this.width}]`}static compare(S,C){return S.left-C.left}}e.FloatHorizontalRange=k;class E{constructor(S,C){this.outsideRenderedLine=S,this.originalLeft=C,this.left=Math.round(this.originalLeft)}}e.HorizontalPosition=E;class I{constructor(S,C){this.outsideRenderedLine=S,this.ranges=C}}e.VisibleRanges=I}),define(ae[725],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewUserInputEvents=void 0;class t{constructor(R){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=R}emitKeyDown(R){this.onKeyDown?.(R)}emitKeyUp(R){this.onKeyUp?.(R)}emitContextMenu(R){this.onContextMenu?.(this._convertViewToModelMouseEvent(R))}emitMouseMove(R){this.onMouseMove?.(this._convertViewToModelMouseEvent(R))}emitMouseLeave(R){this.onMouseLeave?.(this._convertViewToModelMouseEvent(R))}emitMouseDown(R){this.onMouseDown?.(this._convertViewToModelMouseEvent(R))}emitMouseUp(R){this.onMouseUp?.(this._convertViewToModelMouseEvent(R))}emitMouseDrag(R){this.onMouseDrag?.(this._convertViewToModelMouseEvent(R))}emitMouseDrop(R){this.onMouseDrop?.(this._convertViewToModelMouseEvent(R))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(R){this.onMouseWheel?.(R)}_convertViewToModelMouseEvent(R){return R.target?{event:R.event,target:this._convertViewToModelMouseTarget(R.target)}:R}_convertViewToModelMouseTarget(R){return t.convertViewToModelMouseTarget(R,this._coordinatesConverter)}static convertViewToModelMouseTarget(R,A){const k={...R};return k.position&&(k.position=A.convertViewPositionToModelPosition(k.position)),k.range&&(k.range=A.convertViewRangeToModelRange(k.range)),k}}e.ViewUserInputEvents=t}),define(ae[1191],le([1,0,408]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeUtil=void 0;class p{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(A,k){A.selectNodeContents(k)}static _readClientRects(A,k,E,I,b){const S=this._createRange();try{return S.setStart(A,k),S.setEnd(E,I),S.getClientRects()}catch{return null}finally{this._detachRange(S,b)}}static _mergeAdjacentRanges(A){if(A.length===1)return A;A.sort(t.FloatHorizontalRange.compare);const k=[];let E=0,I=A[0];for(let b=1,S=A.length;b<S;b++){const C=A[b];I.left+I.width+.9>=C.left?I.width=Math.max(I.width,C.left+C.width-I.left):(k[E++]=I,I=C)}return k[E++]=I,k}static _createHorizontalRangesFromClientRects(A,k,E){if(!A||A.length===0)return null;const I=[];for(let b=0,S=A.length;b<S;b++){const C=A[b];I[b]=new t.FloatHorizontalRange(Math.max(0,(C.left-k)/E),C.width/E)}return this._mergeAdjacentRanges(I)}static readHorizontalRanges(A,k,E,I,b,S,C,r){const i=A.children.length-1;if(0>i)return null;if(k=Math.min(i,Math.max(0,k)),I=Math.min(i,Math.max(0,I)),k===I&&E===b&&E===0&&!A.children[k].firstChild){const s=A.children[k].getClientRects();return this._createHorizontalRangesFromClientRects(s,S,C)}k!==I&&I>0&&b===0&&(I--,b=1073741824);let f=A.children[k].firstChild,c=A.children[I].firstChild;if((!f||!c)&&(!f&&E===0&&k>0&&(f=A.children[k-1].firstChild,E=1073741824),!c&&b===0&&I>0&&(c=A.children[I-1].firstChild,b=1073741824)),!f||!c)return null;E=Math.min(f.textContent.length,Math.max(0,E)),b=Math.min(c.textContent.length,Math.max(0,b));const l=this._readClientRects(f,E,c,b,r);return this._createHorizontalRangesFromClientRects(l,S,C)}}e.RangeUtil=p}),define(ae[726],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=e.Constants=void 0;var t;(function(R){R[R.START_CH_CODE=32]="START_CH_CODE",R[R.END_CH_CODE=126]="END_CH_CODE",R[R.UNKNOWN_CODE=65533]="UNKNOWN_CODE",R[R.CHAR_COUNT=96]="CHAR_COUNT",R[R.SAMPLED_CHAR_HEIGHT=16]="SAMPLED_CHAR_HEIGHT",R[R.SAMPLED_CHAR_WIDTH=10]="SAMPLED_CHAR_WIDTH",R[R.BASE_CHAR_HEIGHT=2]="BASE_CHAR_HEIGHT",R[R.BASE_CHAR_WIDTH=1]="BASE_CHAR_WIDTH",R[R.RGBA_CHANNELS_CNT=4]="RGBA_CHANNELS_CNT",R[R.RGBA_SAMPLED_ROW_WIDTH=3840]="RGBA_SAMPLED_ROW_WIDTH"})(t=e.Constants||(e.Constants={})),e.allCharCodes=(()=>{const R=[];for(let A=32;A<=126;A++)R.push(A);return R.push(65533),R})();const p=(R,A)=>(R-=32,R<0||R>96?A<=2?(R+96)%96:96-1:R);e.getCharIndex=p}),define(ae[1192],le([1,0,726,479]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class R{constructor(k,E){this.scale=E,this._minimapCharRendererBrand=void 0,this.charDataNormal=R.soften(k,12/15),this.charDataLight=R.soften(k,50/60)}static soften(k,E){const I=new Uint8ClampedArray(k.length);for(let b=0,S=k.length;b<S;b++)I[b]=(0,p.toUint8)(k[b]*E);return I}renderChar(k,E,I,b,S,C,r,u,i,f,c){const l=1*this.scale,s=2*this.scale,d=c?1:s;if(E+l>k.width||I+d>k.height){console.warn("bad render request outside image data");return}const n=f?this.charDataLight:this.charDataNormal,a=(0,t.getCharIndex)(b,i),o=k.width*4,g=r.r,h=r.g,v=r.b,m=S.r-g,w=S.g-h,D=S.b-v,y=Math.max(C,u),T=k.data;let _=a*l*s,L=I*o+E*4;for(let M=0;M<d;M++){let O=L;for(let N=0;N<l;N++){const P=n[_++]/255*(C/255);T[O++]=g+m*P,T[O++]=h+w*P,T[O++]=v+D*P,T[O++]=y}L+=o}}blockRenderChar(k,E,I,b,S,C,r,u){const i=1*this.scale,f=2*this.scale,c=u?1:f;if(E+i>k.width||I+c>k.height){console.warn("bad render request outside image data");return}const l=k.width*4,s=.5*(S/255),d=C.r,n=C.g,a=C.b,o=b.r-d,g=b.g-n,h=b.b-a,v=d+o*s,m=n+g*s,w=a+h*s,D=Math.max(S,r),y=k.data;let T=I*l+E*4;for(let _=0;_<c;_++){let L=T;for(let M=0;M<i;M++)y[L++]=v,y[L++]=m,y[L++]=w,y[L++]=D;T+=l}}}e.MinimapCharRenderer=R}),define(ae[1193],le([1,0,154]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prebakedMiniMaps=void 0;const p={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},R=A=>{const k=new Uint8ClampedArray(A.length/2);for(let E=0;E<A.length;E+=2)k[E>>1]=p[A[E]]<<4|p[A[E+1]]&15;return k};e.prebakedMiniMaps={1:(0,t.once)(()=>R("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,t.once)(()=>R("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(ae[1194],le([1,0,1192,726,1193,479]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class k{static create(I,b){if(this.lastCreated&&I===this.lastCreated.scale&&b===this.lastFontFamily)return this.lastCreated;let S;return R.prebakedMiniMaps[I]?S=new t.MinimapCharRenderer(R.prebakedMiniMaps[I](),I):S=k.createFromSampleData(k.createSampleData(b).data,I),this.lastFontFamily=b,this.lastCreated=S,S}static createSampleData(I){const b=document.createElement("canvas"),S=b.getContext("2d");b.style.height=`${16}px`,b.height=16,b.width=96*10,b.style.width=96*10+"px",S.fillStyle="#ffffff",S.font=`bold ${16}px ${I}`,S.textBaseline="middle";let C=0;for(const r of p.allCharCodes)S.fillText(String.fromCharCode(r),C,16/2),C+=10;return S.getImageData(0,0,96*10,16)}static createFromSampleData(I,b){if(I.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const C=k._downsample(I,b);return new t.MinimapCharRenderer(C,b)}static _downsampleChar(I,b,S,C,r){const u=1*r,i=2*r;let f=C,c=0;for(let l=0;l<i;l++){const s=l/i*16,d=(l+1)/i*16;for(let n=0;n<u;n++){const a=n/u*10,o=(n+1)/u*10;let g=0,h=0;for(let m=s;m<d;m++){const w=b+Math.floor(m)*3840,D=1-(m-Math.floor(m));for(let y=a;y<o;y++){const T=1-(y-Math.floor(y)),_=w+Math.floor(y)*4,L=T*D;h+=L,g+=I[_]*I[_+3]/255*L}}const v=g/h;c=Math.max(c,v),S[f++]=(0,A.toUint8)(v)}}return c}static _downsample(I,b){const S=2*b*1*b,C=S*96,r=new Uint8ClampedArray(C);let u=0,i=0,f=0;for(let c=0;c<96;c++)f=Math.max(f,this._downsampleChar(I,i,r,u,b)),u+=S,i+=10*4;if(f>0){const c=255/f;for(let l=0;l<C;l++)r[l]*=c}return r}}e.MinimapCharRendererFactory=k}),define(ae[359],le([1,0,479]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterSet=e.CharacterClassifier=void 0;class p{constructor(E){const I=(0,t.toUint8)(E);this._defaultValue=I,this._asciiMap=p._createAsciiMap(I),this._map=new Map}static _createAsciiMap(E){const I=new Uint8Array(256);return I.fill(E),I}set(E,I){const b=(0,t.toUint8)(I);E>=0&&E<256?this._asciiMap[E]=b:this._map.set(E,b)}get(E){return E>=0&&E<256?this._asciiMap[E]:this._map.get(E)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}e.CharacterClassifier=p;var R;(function(k){k[k.False=0]="False",k[k.True=1]="True"})(R||(R={}));class A{constructor(){this._actual=new p(0)}add(E){this._actual.set(E,1)}has(E){return this._actual.get(E)===1}clear(){return this._actual.clear()}}e.CharacterSet=A}),define(ae[360],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.countEOL=e.StringEOL=void 0;var t;(function(R){R[R.Unknown=0]="Unknown",R[R.Invalid=3]="Invalid",R[R.LF=1]="LF",R[R.CRLF=2]="CRLF"})(t=e.StringEOL||(e.StringEOL={}));function p(R){let A=0,k=0,E=0,I=0;for(let b=0,S=R.length;b<S;b++){const C=R.charCodeAt(b);C===13?(A===0&&(k=b),A++,b+1<S&&R.charCodeAt(b+1)===10?(I|=2,b++):I|=3,E=b+1):C===10&&(I|=1,A===0&&(k=b),A++,E=b+1)}return A===0&&(k=R.length),[A,k,R.length-E,I]}e.countEOL=p}),define(ae[50],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class t{constructor(R,A){this.lineNumber=R,this.column=A}with(R=this.lineNumber,A=this.column){return R===this.lineNumber&&A===this.column?this:new t(R,A)}delta(R=0,A=0){return this.with(this.lineNumber+R,this.column+A)}equals(R){return t.equals(this,R)}static equals(R,A){return!R&&!A?!0:!!R&&!!A&&R.lineNumber===A.lineNumber&&R.column===A.column}isBefore(R){return t.isBefore(this,R)}static isBefore(R,A){return R.lineNumber<A.lineNumber?!0:A.lineNumber<R.lineNumber?!1:R.column<A.column}isBeforeOrEqual(R){return t.isBeforeOrEqual(this,R)}static isBeforeOrEqual(R,A){return R.lineNumber<A.lineNumber?!0:A.lineNumber<R.lineNumber?!1:R.column<=A.column}static compare(R,A){const k=R.lineNumber|0,E=A.lineNumber|0;if(k===E){const I=R.column|0,b=A.column|0;return I-b}return k-E}clone(){return new t(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(R){return new t(R.lineNumber,R.column)}static isIPosition(R){return R&&typeof R.lineNumber=="number"&&typeof R.column=="number"}}e.Position=t}),define(ae[20],le([1,0,50]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;class p{constructor(A,k,E,I){A>E||A===E&&k>I?(this.startLineNumber=E,this.startColumn=I,this.endLineNumber=A,this.endColumn=k):(this.startLineNumber=A,this.startColumn=k,this.endLineNumber=E,this.endColumn=I)}isEmpty(){return p.isEmpty(this)}static isEmpty(A){return A.startLineNumber===A.endLineNumber&&A.startColumn===A.endColumn}containsPosition(A){return p.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 p.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 p.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 p.plusRange(this,A)}static plusRange(A,k){let E,I,b,S;return k.startLineNumber<A.startLineNumber?(E=k.startLineNumber,I=k.startColumn):k.startLineNumber===A.startLineNumber?(E=k.startLineNumber,I=Math.min(k.startColumn,A.startColumn)):(E=A.startLineNumber,I=A.startColumn),k.endLineNumber>A.endLineNumber?(b=k.endLineNumber,S=k.endColumn):k.endLineNumber===A.endLineNumber?(b=k.endLineNumber,S=Math.max(k.endColumn,A.endColumn)):(b=A.endLineNumber,S=A.endColumn),new p(E,I,b,S)}intersectRanges(A){return p.intersectRanges(this,A)}static intersectRanges(A,k){let E=A.startLineNumber,I=A.startColumn,b=A.endLineNumber,S=A.endColumn;const C=k.startLineNumber,r=k.startColumn,u=k.endLineNumber,i=k.endColumn;return E<C?(E=C,I=r):E===C&&(I=Math.max(I,r)),b>u?(b=u,S=i):b===u&&(S=Math.min(S,i)),E>b||E===b&&I>S?null:new p(E,I,b,S)}equalsRange(A){return p.equalsRange(this,A)}static equalsRange(A,k){return!A&&!k?!0:!!A&&!!k&&A.startLineNumber===k.startLineNumber&&A.startColumn===k.startColumn&&A.endLineNumber===k.endLineNumber&&A.endColumn===k.endColumn}getEndPosition(){return p.getEndPosition(this)}static getEndPosition(A){return new t.Position(A.endLineNumber,A.endColumn)}getStartPosition(){return p.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 p(this.startLineNumber,this.startColumn,A,k)}setStartPosition(A,k){return new p(A,k,this.endLineNumber,this.endColumn)}collapseToStart(){return p.collapseToStart(this)}delta(A){return new p(this.startLineNumber+A,this.startColumn,this.endLineNumber+A,this.endColumn)}static collapseToStart(A){return new p(A.startLineNumber,A.startColumn,A.startLineNumber,A.startColumn)}static fromPositions(A,k=A){return new p(A.lineNumber,A.column,k.lineNumber,k.column)}static lift(A){return A?new p(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 b=A.startLineNumber|0,S=k.startLineNumber|0;if(b===S){const C=A.startColumn|0,r=k.startColumn|0;if(C===r){const u=A.endLineNumber|0,i=k.endLineNumber|0;if(u===i){const f=A.endColumn|0,c=k.endColumn|0;return f-c}return u-i}return C-r}return b-S}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=p}),define(ae[138],le([1,0,20]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class p{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=p}),define(ae[727],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class t{constructor(R,A,k,E){this._rgba8Brand=void 0,this.r=t._clamp(R),this.g=t._clamp(A),this.b=t._clamp(k),this.a=t._clamp(E)}equals(R){return this.r===R.r&&this.g===R.g&&this.b===R.b&&this.a===R.a}static _clamp(R){return R<0?0:R>255?255:R|0}}e.RGBA8=t,t.Empty=new t(0,0,0,0)}),define(ae[85],le([1,0,50,20]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=e.SelectionDirection=void 0;var R;(function(k){k[k.LTR=0]="LTR",k[k.RTL=1]="RTL"})(R=e.SelectionDirection||(e.SelectionDirection={}));class A extends p.Range{constructor(E,I,b,S){super(E,I,b,S),this.selectionStartLineNumber=E,this.selectionStartColumn=I,this.positionLineNumber=b,this.positionColumn=S}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(E){return A.selectionsEqual(this,E)}static selectionsEqual(E,I){return E.selectionStartLineNumber===I.selectionStartLineNumber&&E.selectionStartColumn===I.selectionStartColumn&&E.positionLineNumber===I.positionLineNumber&&E.positionColumn===I.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(E,I){return this.getDirection()===0?new A(this.startLineNumber,this.startColumn,E,I):new A(E,I,this.startLineNumber,this.startColumn)}getPosition(){return new t.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new t.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(E,I){return this.getDirection()===0?new A(E,I,this.endLineNumber,this.endColumn):new A(this.endLineNumber,this.endColumn,E,I)}static fromPositions(E,I=E){return new A(E.lineNumber,E.column,I.lineNumber,I.column)}static fromRange(E,I){return I===0?new A(E.startLineNumber,E.startColumn,E.endLineNumber,E.endColumn):new A(E.endLineNumber,E.endColumn,E.startLineNumber,E.startColumn)}static liftSelection(E){return new A(E.selectionStartLineNumber,E.selectionStartColumn,E.positionLineNumber,E.positionColumn)}static selectionsArrEqual(E,I){if(E&&!I||!E&&I)return!1;if(!E&&!I)return!0;if(E.length!==I.length)return!1;for(let b=0,S=E.length;b<S;b++)if(!this.selectionsEqual(E[b],I[b]))return!1;return!0}static isISelection(E){return E&&typeof E.selectionStartLineNumber=="number"&&typeof E.selectionStartColumn=="number"&&typeof E.positionLineNumber=="number"&&typeof E.positionColumn=="number"}static createWithDirection(E,I,b,S,C){return C===0?new A(E,I,b,S):new A(b,S,E,I)}}e.Selection=A}),define(ae[361],le([1,0,85]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceCommandThatPreservesSelection=e.ReplaceCommandWithOffsetCursorState=e.ReplaceCommandWithoutChangingPosition=e.ReplaceCommandThatSelectsText=e.ReplaceCommand=void 0;class p{constructor(b,S,C=!1){this._range=b,this._text=S,this.insertsAutoWhitespace=C}getEditOperations(b,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(b,S){const r=S.getInverseEditOperations()[0].range;return t.Selection.fromPositions(r.getEndPosition())}}e.ReplaceCommand=p;class R{constructor(b,S){this._range=b,this._text=S}getEditOperations(b,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(b,S){const r=S.getInverseEditOperations()[0].range;return t.Selection.fromRange(r,0)}}e.ReplaceCommandThatSelectsText=R;class A{constructor(b,S,C=!1){this._range=b,this._text=S,this.insertsAutoWhitespace=C}getEditOperations(b,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(b,S){const r=S.getInverseEditOperations()[0].range;return t.Selection.fromPositions(r.getStartPosition())}}e.ReplaceCommandWithoutChangingPosition=A;class k{constructor(b,S,C,r,u=!1){this._range=b,this._text=S,this._columnDeltaOffset=r,this._lineNumberDeltaOffset=C,this.insertsAutoWhitespace=u}getEditOperations(b,S){S.addTrackedEditOperation(this._range,this._text)}computeCursorState(b,S){const r=S.getInverseEditOperations()[0].range;return t.Selection.fromPositions(r.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}e.ReplaceCommandWithOffsetCursorState=k;class E{constructor(b,S,C,r=!1){this._range=b,this._text=S,this._initialSelection=C,this._forceMoveMarkers=r,this._selectionId=null}getEditOperations(b,S){S.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=S.trackSelection(this._initialSelection)}computeCursorState(b,S){return S.getTrackedSelection(this._selectionId)}}e.ReplaceCommandThatPreservesSelection=E}),define(ae[1195],le([1,0,20,85]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionSurroundSelectionCommand=e.SurroundSelectionCommand=void 0;class R{constructor(E,I,b){this._range=E,this._charBeforeSelection=I,this._charAfterSelection=b}getEditOperations(E,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(E,I){const b=I.getInverseEditOperations(),S=b[0].range,C=b[1].range;return new p.Selection(S.endLineNumber,S.endColumn,C.endLineNumber,C.endColumn-this._charAfterSelection.length)}}e.SurroundSelectionCommand=R;class A{constructor(E,I,b){this._position=E,this._text=I,this._charAfter=b}getEditOperations(E,I){I.addTrackedEditOperation(new t.Range(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(E,I){const S=I.getInverseEditOperations()[0].range;return new p.Selection(S.endLineNumber,S.startColumn,S.endLineNumber,S.endColumn-this._charAfter.length)}}e.CompositionSurroundSelectionCommand=A}),define(ae[484],le([1,0]),function(J,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:!0,independentColorPoolPerBracketType:!1}}}),define(ae[409],le([1,0,359]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMapForWordSeparators=e.WordCharacterClassifier=e.WordCharacterClass=void 0;var p;(function(k){k[k.Regular=0]="Regular",k[k.Whitespace=1]="Whitespace",k[k.WordSeparator=2]="WordSeparator"})(p=e.WordCharacterClass||(e.WordCharacterClass={}));class R extends t.CharacterClassifier{constructor(E){super(0);for(let I=0,b=E.length;I<b;I++)this.set(E.charCodeAt(I),2);this.set(32,1),this.set(9,1)}}e.WordCharacterClassifier=R;function A(k){const E={};return I=>(E.hasOwnProperty(I)||(E[I]=k(I)),E[I])}e.getMapForWordSeparators=A(k=>new R(k))}),define(ae[299],le([1,0,88,2,158]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.setDefaultGetWordAtTextConfig=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function A(C=""){let r="(-?\\d*\\.\\d\\w*)|([^";for(const u of e.USUAL_WORD_SEPARATORS)C.indexOf(u)>=0||(r+="\\"+u);return r+="\\s]+)",new RegExp(r,"g")}e.DEFAULT_WORD_REGEXP=A();function k(C){let r=e.DEFAULT_WORD_REGEXP;if(C&&C instanceof RegExp)if(C.global)r=C;else{let u="g";C.ignoreCase&&(u+="i"),C.multiline&&(u+="m"),C.unicode&&(u+="u"),r=new RegExp(C.source,u)}return r.lastIndex=0,r}e.ensureValidWordDefinition=k;const E=new R.LinkedList;E.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function I(C){const r=E.unshift(C);return(0,p.toDisposable)(r)}e.setDefaultGetWordAtTextConfig=I;function b(C,r,u,i,f){if(f||(f=t.Iterable.first(E)),u.length>f.maxLen){let n=C-f.maxLen/2;return n<0?n=0:i+=n,u=u.substring(n,C+f.maxLen/2),b(C,r,u,i,f)}const c=Date.now(),l=C-1-i;let s=-1,d=null;for(let n=1;!(Date.now()-c>=f.timeBudget);n++){const a=l-f.windowSize*n;r.lastIndex=Math.max(0,a);const o=S(r,u,l,s);if(!o&&d||(d=o,a<=0))break;s=a}if(d){const n={word:d[0],startColumn:i+1+d.index,endColumn:i+1+d.index+d[0].length};return r.lastIndex=0,n}return null}e.getWordAtText=b;function S(C,r,u,i){let f;for(;f=C.exec(r);){const c=f.index||0;if(c<=u&&C.lastIndex>=u)return f;if(i>0&&c>i)return null}return null}}),define(ae[1196],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorContext=void 0;class t{constructor(R,A,k,E){this._cursorContextBrand=void 0,this.model=R,this.viewModel=A,this.coordinatesConverter=k,this.cursorConfig=E}}e.CursorContext=t}),define(ae[485],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SequenceFromIntArray=e.OffsetRange=e.SequenceDiff=void 0;class t{constructor(k,E){this.seq1Range=k,this.seq2Range=E}reverse(){return new t(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}}e.SequenceDiff=t;class p{constructor(k,E){this.start=k,this.endExclusive=E}get isEmpty(){return this.start===this.endExclusive}delta(k){return new p(this.start+k,this.endExclusive+k)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}}e.OffsetRange=p;class R{constructor(k){this.arr=k}getElement(k){return this.arr[k]}get length(){return this.arr.length}}e.SequenceFromIntArray=R}),define(ae[1197],le([1,0,485]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shiftSequenceDiffs=e.joinSequenceDiffs=e.optimizeSequenceDiffs=void 0;function p(E,I,b){let S=b;return S=R(E,I,S),S=A(E,I,S),S}e.optimizeSequenceDiffs=p;function R(E,I,b){const S=[];b.length>0&&S.push(b[0]);for(let C=1;C<b.length;C++){const r=S[S.length-1],u=b[C];if(u.seq1Range.isEmpty){let i=!0;const f=u.seq1Range.start-r.seq1Range.endExclusive;for(let c=1;c<=f;c++)if(I.getElement(u.seq2Range.start-c)!==I.getElement(u.seq2Range.endExclusive-c)){i=!1;break}if(i){S[S.length-1]=new t.SequenceDiff(r.seq1Range,new t.OffsetRange(r.seq2Range.start,u.seq2Range.endExclusive-f));continue}}S.push(u)}return S}e.joinSequenceDiffs=R;function A(E,I,b){if(!E.getBoundaryScore||!I.getBoundaryScore)return b;for(let S=0;S<b.length;S++){const C=b[S];if(C.seq1Range.isEmpty){const r=S>0?b[S-1].seq2Range.endExclusive:-1,u=S+1<b.length?b[S+1].seq2Range.start:I.length+1;b[S]=k(C,E,I,u,r)}else if(C.seq2Range.isEmpty){const r=S>0?b[S-1].seq1Range.endExclusive:-1,u=S+1<b.length?b[S+1].seq1Range.start:E.length+1;b[S]=k(C.reverse(),I,E,u,r).reverse()}}return b}e.shiftSequenceDiffs=A;function k(E,I,b,S,C){let r=1;for(;E.seq1Range.start-r>C&&b.getElement(E.seq2Range.start-r)===b.getElement(E.seq2Range.endExclusive-r);)r++;r--;let u=1;for(;E.seq1Range.start+u<S&&b.getElement(E.seq2Range.start+u)===b.getElement(E.seq2Range.endExclusive+u);)u++;u--;let i=0,f=-1;for(let c=-r;c<u;c++){const l=E.seq2Range.start+c,s=E.seq2Range.endExclusive+c,d=E.seq1Range.start+c,n=I.getBoundaryScore(d)+b.getBoundaryScore(l)+b.getBoundaryScore(s);n>f&&(f=n,i=c)}return i!==0?new t.SequenceDiff(E.seq1Range.delta(i),E.seq2Range.delta(i)):E}}),define(ae[1198],le([1,0,485]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MyersDiffAlgorithm=void 0;class p{compute(I,b){if(I.length===0)return[new t.SequenceDiff(new t.OffsetRange(0,0),new t.OffsetRange(0,b.length))];if(b.length===0)return[new t.SequenceDiff(new t.OffsetRange(0,I.length),new t.OffsetRange(0,0))];function S(d,n){for(;d<I.length&&n<b.length&&I.getElement(d)===b.getElement(n);)d++,n++;return d}let C=0;const r=new A;r.set(0,S(0,0));const u=new k;u.set(0,r.get(0)===0?null:new R(null,0,0,r.get(0)));let i=0;e:for(;;)for(C++,i=-C;i<=C;i+=2){const d=i===C?-1:r.get(i+1),n=i===-C?-1:r.get(i-1)+1,a=Math.min(Math.max(d,n),I.length),o=a-i,g=S(a,o);r.set(i,g);const h=a===d?u.get(i+1):u.get(i-1);if(u.set(i,g!==a?new R(h,a,o,g-a):h),r.get(i)===I.length&&r.get(i)-i===b.length)break e}let f=u.get(i);const c=[];let l=I.length,s=b.length;for(;;){const d=f?f.x+f.length:0,n=f?f.y+f.length:0;if((d!==l||n!==s)&&c.push(new t.SequenceDiff(new t.OffsetRange(d,l),new t.OffsetRange(n,s))),!f)break;l=f.x,s=f.y,f=f.prev}return c.reverse(),c}}e.MyersDiffAlgorithm=p;class R{constructor(I,b,S,C){this.prev=I,this.x=b,this.y=S,this.length=C}}class A{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(I){return I<0?(I=-I-1,this.negativeArr[I]):this.positiveArr[I]}set(I,b){if(I<0){if(I=-I-1,I>=this.negativeArr.length){const S=this.negativeArr;this.negativeArr=new Int32Array(S.length*2),this.negativeArr.set(S)}this.negativeArr[I]=b}else{if(I>=this.positiveArr.length){const S=this.positiveArr;this.positiveArr=new Int32Array(S.length*2),this.positiveArr.set(S)}this.positiveArr[I]=b}}}class k{constructor(){this.positiveArr=[],this.negativeArr=[]}get(I){return I<0?(I=-I-1,this.negativeArr[I]):this.positiveArr[I]}set(I,b){I<0?(I=-I-1,this.negativeArr[I]=b):this.positiveArr[I]=b}}}),define(ae[1199],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Array2D=void 0;class t{constructor(R,A){this.width=R,this.height=A,this.array=[],this.array=new Array(R*A)}get(R,A){return this.array[R+A*this.width]}set(R,A,k){this.array[R+A*this.width]=k}}e.Array2D=t}),define(ae[1200],le([1,0,485,1199]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicProgrammingDiffing=void 0;class R{compute(k,E,I){const b=new p.Array2D(k.length,E.length),S=new p.Array2D(k.length,E.length),C=new p.Array2D(k.length,E.length);for(let s=0;s<k.length;s++)for(let d=0;d<E.length;d++){const n=s===0?0:b.get(s-1,d),a=d===0?0:b.get(s,d-1);let o;k.getElement(s)===E.getElement(d)?(s===0||d===0?o=0:o=b.get(s-1,d-1),s>0&&d>0&&S.get(s-1,d-1)===3&&(o+=.1),o+=I?I(s,d):1):o=-1;const g=Math.max(n,a,o);if(g===o){const h=s>0&&d>0?C.get(s-1,d-1):0;C.set(s,d,h+1),S.set(s,d,3)}else g===n?(C.set(s,d,0),S.set(s,d,1)):g===a&&(C.set(s,d,0),S.set(s,d,2));b.set(s,d,g)}const r=[];let u=k.length,i=E.length;function f(s,d){(s+1!==u||d+1!==i)&&r.push(new t.SequenceDiff(new t.OffsetRange(s+1,u),new t.OffsetRange(d+1,i))),u=s,i=d}let c=k.length-1,l=E.length-1;for(;c>=0&&l>=0;)S.get(c,l)===3?(f(c,l),c--,l--):S.get(c,l)===1?c--:l--;return f(-1,-1),r.reverse(),r}}e.DynamicProgrammingDiffing=R}),define(ae[566],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=e.RangeMapping=e.LineRangeMapping=void 0;class t{constructor(k,E,I){this.originalRange=k,this.modifiedRange=E,this.innerChanges=I}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}e.LineRangeMapping=t;class p{constructor(k,E){this.originalRange=k,this.modifiedRange=E}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}}e.RangeMapping=p;class R{constructor(k,E){this.startLineNumber=k,this.endLineNumberExclusive=E}get isEmpty(){return this.startLineNumber===this.endLineNumberExclusive}delta(k){return new R(this.startLineNumber+k,this.endLineNumberExclusive+k)}get length(){return this.endLineNumberExclusive-this.startLineNumber}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}join(k){return new R(Math.min(this.startLineNumber,k.startLineNumber),Math.max(this.endLineNumberExclusive,k.endLineNumberExclusive))}}e.LineRange=R}),define(ae[1201],le([1,0,171,50,20,485,1200,1197,1198,566]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lineRangeMappingFromRangeMappings=e.StandardLinesDiffComputer=void 0;class S{constructor(){this.dynamicProgrammingDiffing=new k.DynamicProgrammingDiffing,this.myersDiffingAlgorithm=new I.MyersDiffAlgorithm}computeDiff(n,a,o){const g=new Map;function h(N){let P=g.get(N);return P===void 0&&(P=g.size,g.set(N,P)),P}const v=n.map(N=>h(N.trim())),m=a.map(N=>h(N.trim())),w=new A.SequenceFromIntArray(v),D=new A.SequenceFromIntArray(m),y=(()=>w.length+D.length<1500?this.dynamicProgrammingDiffing.compute(w,D,(N,P)=>n[N]===a[P]?a[P].length===0?.1:1+Math.log(1+a[P].length):.99):this.myersDiffingAlgorithm.compute(w,D))(),T=[],_=N=>{for(let P=0;P<N;P++){const B=L+P,V=M+P;if(n[B]!==a[V]){const z=this.refineDiff(n,a,new A.SequenceDiff(new A.OffsetRange(B,B+1),new A.OffsetRange(V,V+1)));for(const x of z)T.push(x)}}};let L=0,M=0;for(const N of y){(0,t.assertFn)(()=>N.seq1Range.start-L===N.seq2Range.start-M);const P=N.seq1Range.start-L;_(P),L=N.seq1Range.endExclusive,M=N.seq2Range.endExclusive;const B=this.refineDiff(n,a,N);for(const V of B)T.push(V)}_(n.length-L);const O=C(T);return{quitEarly:!1,changes:O}}refineDiff(n,a,o){const g=new u(n,o.seq1Range),h=new u(a,o.seq2Range),v=g.length+h.length<500?this.dynamicProgrammingDiffing.compute(g,h):this.myersDiffingAlgorithm.compute(g,h);return(0,E.optimizeSequenceDiffs)(g,h,v).map(D=>new b.RangeMapping(g.translateRange(D.seq1Range).delta(o.seq1Range.start),h.translateRange(D.seq2Range).delta(o.seq2Range.start)))}}e.StandardLinesDiffComputer=S;function C(d){const n=[];for(const a of r(d,(o,g)=>g.originalRange.startLineNumber-(o.originalRange.endLineNumber-(o.originalRange.endColumn>1?0:1))<=1||g.modifiedRange.startLineNumber-(o.modifiedRange.endLineNumber-(o.modifiedRange.endColumn>1?0:1))<=1)){const o=a[0],g=a[a.length-1];n.push(new b.LineRangeMapping(new b.LineRange(o.originalRange.startLineNumber,g.originalRange.endLineNumber+(g.originalRange.endColumn>1||g.modifiedRange.endColumn>1?1:0)),new b.LineRange(o.modifiedRange.startLineNumber,g.modifiedRange.endLineNumber+(g.originalRange.endColumn>1||g.modifiedRange.endColumn>1?1:0)),a))}return(0,t.assertFn)(()=>(0,t.checkAdjacentItems)(n,(a,o)=>o.originalRange.startLineNumber-a.originalRange.endLineNumberExclusive===o.modifiedRange.startLineNumber-a.modifiedRange.endLineNumberExclusive&&a.originalRange.endLineNumberExclusive<o.originalRange.startLineNumber&&a.modifiedRange.endLineNumberExclusive<o.modifiedRange.startLineNumber)),n}e.lineRangeMappingFromRangeMappings=C;function*r(d,n){let a,o;for(const g of d)o!==void 0&&n(o,g)?a.push(g):(a&&(yield a),a=[g]),o=g;a&&(yield a)}class u{constructor(n,a){this.lines=n,this.lineRange=a;let o=0;this.firstCharOnLineOffsets=new Int32Array(a.length);for(let h=a.start;h<a.endExclusive;h++)o+=n[h].length,this.firstCharOnLineOffsets[h-a.start]=o+1,o++;this.elements=new Int32Array(o);let g=0;for(let h=a.start;h<a.endExclusive;h++){const v=n[h];for(let m=0;m<v.length;m++)this.elements[g+m]=v.charCodeAt(m);g+=v.length,h<n.length-1&&(this.elements[g]=` `.charCodeAt(0),g+=1)}}getElement(n){return this.elements[n]}get length(){return this.elements.length}getBoundaryScore(n){const a=c(n>0?this.elements[n-1]:-1),o=c(n<this.elements.length?this.elements[n]:-1);let g=0;return a!==o&&(g+=10),g+=a,g+=o,g}translateOffset(n){let a=0,o=this.firstCharOnLineOffsets.length;for(;a<o;){const h=Math.floor((a+o)/2);this.firstCharOnLineOffsets[h]>n?o=h:a=h+1}const g=a===0?0:this.firstCharOnLineOffsets[a-1];return new p.Position(a+1,n-g+1)}translateRange(n){return R.Range.fromPositions(this.translateOffset(n.start),this.translateOffset(n.endExclusive))}}var i;(function(d){d[d.Word=0]="Word",d[d.End=1]="End",d[d.Other=2]="Other",d[d.Space=3]="Space"})(i||(i={}));function f(d){return d}function c(d){return s(d)?3:l(d)?0:d===-1?1:2}function l(d){return d>=97&&d<=122||d>=65&&d<=90||d>=48&&d<=57}function s(d){return d===32||d===9||d===10||d===13}}),define(ae[1202],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class t{constructor(R,A,k,E,I,b){this.id=R,this.label=A,this.alias=k,this._precondition=E,this._run=I,this._contextKeyService=b}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}e.InternalEditorAction=t}),define(ae[362],le([1,0]),function(J,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 p(A){return A&&typeof A.id=="string"}e.isThemeColor=p,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var R;(function(A){A.CompositionStart="compositionStart",A.CompositionEnd="compositionEnd",A.Type="type",A.ReplacePreviousChar="replacePreviousChar",A.CompositionType="compositionType",A.Paste="paste",A.Cut="cut"})(R=e.Handler||(e.Handler={}))}),define(ae[105],le([1,0,362]),function(J,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 p;(function(r){r[r.EXACT=0]="EXACT",r[r.ABOVE=1]="ABOVE",r[r.BELOW=2]="BELOW"})(p=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var R;(function(r){r[r.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",r[r.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",r[r.TOP_CENTER=2]="TOP_CENTER"})(R=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var A;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.TEXTAREA=1]="TEXTAREA",r[r.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",r[r.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",r[r.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",r[r.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",r[r.CONTENT_TEXT=6]="CONTENT_TEXT",r[r.CONTENT_EMPTY=7]="CONTENT_EMPTY",r[r.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",r[r.CONTENT_WIDGET=9]="CONTENT_WIDGET",r[r.OVERVIEW_RULER=10]="OVERVIEW_RULER",r[r.SCROLLBAR=11]="SCROLLBAR",r[r.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",r[r.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(A=e.MouseTargetType||(e.MouseTargetType={}));var k;(function(r){r[r.Idle=0]="Idle",r[r.ComputingDiff=1]="ComputingDiff",r[r.DiffComputed=2]="DiffComputed"})(k=e.DiffEditorState||(e.DiffEditorState={}));function E(r){return r&&typeof r.getEditorType=="function"?r.getEditorType()===t.EditorType.ICodeEditor:!1}e.isCodeEditor=E;function I(r){return r&&typeof r.getEditorType=="function"?r.getEditorType()===t.EditorType.IDiffEditor:!1}e.isDiffEditor=I;function b(r){return!!r&&typeof r=="object"&&typeof r.onDidChangeActiveEditor=="function"}e.isCompositeEditor=b;function S(r){return E(r)?r:I(r)?r.getModifiedEditor():b(r)&&E(r.activeCodeEditor)?r.activeCodeEditor:null}e.getCodeEditor=S;function C(r){return E(r)||I(r)?r:null}e.getIEditor=C}),define(ae[1203],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class t{get type(){return this._theme.type}get value(){return this._theme}constructor(R){this._theme=R}update(R){this._theme=R}getColor(R){return this._theme.getColor(R)}}e.EditorTheme=t}),define(ae[325],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=e.MetadataConsts=e.StandardTokenType=e.ColorId=e.FontStyle=e.LanguageId=void 0;var t;(function(I){I[I.Null=0]="Null",I[I.PlainText=1]="PlainText"})(t=e.LanguageId||(e.LanguageId={}));var p;(function(I){I[I.NotSet=-1]="NotSet",I[I.None=0]="None",I[I.Italic=1]="Italic",I[I.Bold=2]="Bold",I[I.Underline=4]="Underline",I[I.Strikethrough=8]="Strikethrough"})(p=e.FontStyle||(e.FontStyle={}));var R;(function(I){I[I.None=0]="None",I[I.DefaultForeground=1]="DefaultForeground",I[I.DefaultBackground=2]="DefaultBackground"})(R=e.ColorId||(e.ColorId={}));var A;(function(I){I[I.Other=0]="Other",I[I.Comment=1]="Comment",I[I.String=2]="String",I[I.RegEx=3]="RegEx"})(A=e.StandardTokenType||(e.StandardTokenType={}));var k;(function(I){I[I.LANGUAGEID_MASK=255]="LANGUAGEID_MASK",I[I.TOKEN_TYPE_MASK=768]="TOKEN_TYPE_MASK",I[I.BALANCED_BRACKETS_MASK=1024]="BALANCED_BRACKETS_MASK",I[I.FONT_STYLE_MASK=30720]="FONT_STYLE_MASK",I[I.FOREGROUND_MASK=16744448]="FOREGROUND_MASK",I[I.BACKGROUND_MASK=4278190080]="BACKGROUND_MASK",I[I.ITALIC_MASK=2048]="ITALIC_MASK",I[I.BOLD_MASK=4096]="BOLD_MASK",I[I.UNDERLINE_MASK=8192]="UNDERLINE_MASK",I[I.STRIKETHROUGH_MASK=16384]="STRIKETHROUGH_MASK",I[I.SEMANTIC_USE_ITALIC=1]="SEMANTIC_USE_ITALIC",I[I.SEMANTIC_USE_BOLD=2]="SEMANTIC_USE_BOLD",I[I.SEMANTIC_USE_UNDERLINE=4]="SEMANTIC_USE_UNDERLINE",I[I.SEMANTIC_USE_STRIKETHROUGH=8]="SEMANTIC_USE_STRIKETHROUGH",I[I.SEMANTIC_USE_FOREGROUND=16]="SEMANTIC_USE_FOREGROUND",I[I.SEMANTIC_USE_BACKGROUND=32]="SEMANTIC_USE_BACKGROUND",I[I.LANGUAGEID_OFFSET=0]="LANGUAGEID_OFFSET",I[I.TOKEN_TYPE_OFFSET=8]="TOKEN_TYPE_OFFSET",I[I.BALANCED_BRACKETS_OFFSET=10]="BALANCED_BRACKETS_OFFSET",I[I.FONT_STYLE_OFFSET=11]="FONT_STYLE_OFFSET",I[I.FOREGROUND_OFFSET=15]="FOREGROUND_OFFSET",I[I.BACKGROUND_OFFSET=24]="BACKGROUND_OFFSET"})(k=e.MetadataConsts||(e.MetadataConsts={}));class E{static getLanguageId(b){return(b&255)>>>0}static getTokenType(b){return(b&768)>>>8}static containsBalancedBrackets(b){return(b&1024)!==0}static getFontStyle(b){return(b&30720)>>>11}static getForeground(b){return(b&16744448)>>>15}static getBackground(b){return(b&4278190080)>>>24}static getClassNameFromMetadata(b){const S=this.getForeground(b);let C="mtk"+S;const r=this.getFontStyle(b);return r&1&&(C+=" mtki"),r&2&&(C+=" mtkb"),r&4&&(C+=" mtku"),r&8&&(C+=" mtks"),C}static getInlineStyleFromMetadata(b,S){const C=this.getForeground(b),r=this.getFontStyle(b);let u=`color: ${S[C]};`;r&1&&(u+="font-style: italic;"),r&2&&(u+="font-weight: bold;");let i="";return r&4&&(i+=" underline"),r&8&&(i+=" line-through"),i&&(u+=`text-decoration:${i};`),u}static getPresentationFromMetadata(b){const S=this.getForeground(b),C=this.getFontStyle(b);return{foreground:S,italic:Boolean(C&1),bold:Boolean(C&2),underline:Boolean(C&4),strikethrough:Boolean(C&8)}}}e.TokenMetadata=E}),define(ae[300],le([1,0]),function(J,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 p{constructor(E){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=E.open,this.close=E.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(E.notIn))for(let I=0,b=E.notIn.length;I<b;I++)switch(E.notIn[I]){case"string":this._inString=!1;break;case"comment":this._inComment=!1;break;case"regex":this._inRegEx=!1;break}}isOK(E){switch(E){case 0:return!0;case 1:return this._inComment;case 2:return this._inString;case 3:return this._inRegEx}}shouldAutoClose(E,I){if(E.getTokenCount()===0)return!0;const b=E.findTokenIndexAtOffset(I-2),S=E.getStandardTokenType(b);return this.isOK(S)}_findNeutralCharacterInRange(E,I){for(let b=E;b<=I;b++){const S=String.fromCharCode(b);if(!this.open.includes(S)&&!this.close.includes(S))return S}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=p;class R{constructor(E){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const I of E)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=R;function A(k,E,I){k.has(E)?k.get(E).push(I):k.set(E,[I])}}),define(ae[728],le([1,0,359]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeLinks=e.LinkComputer=e.StateMachine=e.Uint8Matrix=e.State=void 0;var p;(function(u){u[u.Invalid=0]="Invalid",u[u.Start=1]="Start",u[u.H=2]="H",u[u.HT=3]="HT",u[u.HTT=4]="HTT",u[u.HTTP=5]="HTTP",u[u.F=6]="F",u[u.FI=7]="FI",u[u.FIL=8]="FIL",u[u.BeforeColon=9]="BeforeColon",u[u.AfterColon=10]="AfterColon",u[u.AlmostThere=11]="AlmostThere",u[u.End=12]="End",u[u.Accept=13]="Accept",u[u.LastKnownState=14]="LastKnownState"})(p=e.State||(e.State={}));class R{constructor(i,f,c){const l=new Uint8Array(i*f);for(let s=0,d=i*f;s<d;s++)l[s]=c;this._data=l,this.rows=i,this.cols=f}get(i,f){return this._data[i*this.cols+f]}set(i,f,c){this._data[i*this.cols+f]=c}}e.Uint8Matrix=R;class A{constructor(i){let f=0,c=0;for(let s=0,d=i.length;s<d;s++){const[n,a,o]=i[s];a>f&&(f=a),n>c&&(c=n),o>c&&(c=o)}f++,c++;const l=new R(c,f,0);for(let s=0,d=i.length;s<d;s++){const[n,a,o]=i[s];l.set(n,a,o)}this._states=l,this._maxCharCode=f}nextState(i,f){return f<0||f>=this._maxCharCode?0:this._states.get(i,f)}}e.StateMachine=A;let k=null;function E(){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(u){u[u.None=0]="None",u[u.ForceTermination=1]="ForceTermination",u[u.CannotEndIn=2]="CannotEndIn"})(I||(I={}));let b=null;function S(){if(b===null){b=new t.CharacterClassifier(0);const u=` <>'"\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 f=0;f<u.length;f++)b.set(u.charCodeAt(f),1);const i=".,;:";for(let f=0;f<i.length;f++)b.set(i.charCodeAt(f),2)}return b}class C{static _createLink(i,f,c,l,s){let d=s-1;do{const n=f.charCodeAt(d);if(i.get(n)!==2)break;d--}while(d>l);if(l>0){const n=f.charCodeAt(l-1),a=f.charCodeAt(d);(n===40&&a===41||n===91&&a===93||n===123&&a===125)&&d--}return{range:{startLineNumber:c,startColumn:l+1,endLineNumber:c,endColumn:d+2},url:f.substring(l,d+1)}}static computeLinks(i,f=E()){const c=S(),l=[];for(let s=1,d=i.getLineCount();s<=d;s++){const n=i.getLineContent(s),a=n.length;let o=0,g=0,h=0,v=1,m=!1,w=!1,D=!1,y=!1;for(;o<a;){let T=!1;const _=n.charCodeAt(o);if(v===13){let L;switch(_){case 40:m=!0,L=0;break;case 41:L=m?0:1;break;case 91:D=!0,w=!0,L=0;break;case 93:D=!1,L=w?0:1;break;case 123:y=!0,L=0;break;case 125:L=y?0:1;break;case 39:case 34:case 96:h===_?L=1:h===39||h===34||h===96?L=0:L=1;break;case 42:L=h===42?1:0;break;case 124:L=h===124?1:0;break;case 32:L=D?0:1;break;default:L=c.get(_)}L===1&&(l.push(C._createLink(c,n,s,g,o)),T=!0)}else if(v===12){let L;_===91?(w=!0,L=0):L=c.get(_),L===1?T=!0:v=13}else v=f.nextState(v,_),v===0&&(T=!0);T&&(v=1,m=!1,w=!1,y=!1,g=o+1,h=_),o++}v===13&&l.push(C._createLink(c,n,s,g,a))}return l}}e.LinkComputer=C;function r(u){return!u||typeof u.getLineCount!="function"||typeof u.getLineContent!="function"?[]:C.computeLinks(u)}e.computeLinks=r}),define(ae[363],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ignoreBracketsInToken=e.ScopedLineTokens=e.createScopedLineTokens=void 0;function t(k,E){const I=k.getCount(),b=k.findTokenIndexAtOffset(E),S=k.getLanguageId(b);let C=b;for(;C+1<I&&k.getLanguageId(C+1)===S;)C++;let r=b;for(;r>0&&k.getLanguageId(r-1)===S;)r--;return new p(k,S,r,C+1,k.getStartOffset(r),k.getEndOffset(C))}e.createScopedLineTokens=t;class p{constructor(E,I,b,S,C,r){this._scopedLineTokensBrand=void 0,this._actual=E,this.languageId=I,this._firstTokenIndex=b,this._lastTokenIndex=S,this.firstCharOffset=C,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(E){return this._actual.getLineContent().substring(0,this.firstCharOffset+E)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(E){return this._actual.findTokenIndexAtOffset(E+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(E){return this._actual.getStandardTokenType(E+this._firstTokenIndex)}}e.ScopedLineTokens=p;var R;(function(k){k[k.value=3]="value"})(R||(R={}));function A(k){return(k&3)!==0}e.ignoreBracketsInToken=A}),define(ae[1204],le([1,0,300]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class p{constructor(A){if(A.autoClosingPairs?this._autoClosingPairs=A.autoClosingPairs.map(k=>new t.StandardAutoClosingPairConditional(k)):A.brackets?this._autoClosingPairs=A.brackets.map(k=>new t.StandardAutoClosingPairConditional({open:k[0],close:k[1]})):this._autoClosingPairs=[],A.__electricCharacterSupport&&A.__electricCharacterSupport.docComment){const k=A.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new t.StandardAutoClosingPairConditional({open:k.open,close:k.close||""}))}this._autoCloseBefore=typeof A.autoCloseBefore=="string"?A.autoCloseBefore:p.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=A.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}}e.CharacterPairSupport=p,p.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> `,p.DEFAULT_AUTOCLOSE_BEFORE_WHITESPACE=` `}),define(ae[1205],le([1,0]),function(J,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 p(A){return A.global&&(A.lastIndex=0),!0}class R{constructor(k){this._indentationRules=k}shouldIncrease(k){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&p(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(k))}shouldDecrease(k){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&p(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(k))}shouldIndentNextLine(k){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&p(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(k))}shouldIgnore(k){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&p(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(k))}getIndentMetadata(k){let E=0;return this.shouldIncrease(k)&&(E+=1),this.shouldDecrease(k)&&(E+=2),this.shouldIndentNextLine(k)&&(E+=4),this.shouldIgnore(k)&&(E+=8),E}}e.IndentRulesSupport=R}),define(ae[1206],le([1,0]),function(J,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(R,A,k,E,I){if(R&&A){const b=this.doNavigateValueSet(A,I);if(b)return{range:R,value:b}}if(k&&E){const b=this.doNavigateValueSet(E,I);if(b)return{range:k,value:b}}return null}doNavigateValueSet(R,A){const k=this.numberReplace(R,A);return k!==null?k:this.textReplace(R,A)}numberReplace(R,A){const k=Math.pow(10,R.length-(R.lastIndexOf(".")+1));let E=Number(R);const I=parseFloat(R);return!isNaN(E)&&!isNaN(I)&&E===I?E===0&&!A?null:(E=Math.floor(E*k),E+=A?k:-k,String(E/k)):null}textReplace(R,A){return this.valueSetsReplace(this._defaultValueSet,R,A)}valueSetsReplace(R,A,k){let E=null;for(let I=0,b=R.length;E===null&&I<b;I++)E=this.valueSetReplace(R[I],A,k);return E}valueSetReplace(R,A,k){let E=R.indexOf(A);return E>=0?(E+=k?1:-1,E<0?E=R.length-1:E%=R.length,R[E]):null}}e.BasicInplaceReplace=t,t.INSTANCE=new t}),define(ae[410],le([1,0,65]),function(J,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 p{constructor(l,s,d,n,a){this._parsedThemeRuleBrand=void 0,this.token=l,this.index=s,this.fontStyle=d,this.foreground=n,this.background=a}}e.ParsedTokenThemeRule=p;function R(c){if(!c||!Array.isArray(c))return[];const l=[];let s=0;for(let d=0,n=c.length;d<n;d++){const a=c[d];let o=-1;if(typeof a.fontStyle=="string"){o=0;const v=a.fontStyle.split(" ");for(let m=0,w=v.length;m<w;m++)switch(v[m]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break;case"strikethrough":o=o|8;break}}let g=null;typeof a.foreground=="string"&&(g=a.foreground);let h=null;typeof a.background=="string"&&(h=a.background),l[s++]=new p(a.token||"",d,o,g,h)}return l}e.parseTokenTheme=R;function A(c,l){c.sort((m,w)=>{const D=C(m.token,w.token);return D!==0?D:m.index-w.index});let s=0,d="000000",n="ffffff";for(;c.length>=1&&c[0].token==="";){const m=c.shift();m.fontStyle!==-1&&(s=m.fontStyle),m.foreground!==null&&(d=m.foreground),m.background!==null&&(n=m.background)}const a=new E;for(const m of l)a.getId(m);const o=a.getId(d),g=a.getId(n),h=new r(s,o,g),v=new i(h);for(let m=0,w=c.length;m<w;m++){const D=c[m];v.insert(D.token,D.fontStyle,a.getId(D.foreground),a.getId(D.background))}return new I(a,v)}const k=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class E{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(l){if(l===null)return 0;const s=l.match(k);if(!s)throw new Error("Illegal value for token color: "+l);l=s[1].toUpperCase();let d=this._color2id.get(l);return d||(d=++this._lastColorId,this._color2id.set(l,d),this._id2color[d]=t.Color.fromHex("#"+l),d)}getColorMap(){return this._id2color.slice(0)}}e.ColorMap=E;class I{static createFromRawTokenTheme(l,s){return this.createFromParsedTokenTheme(R(l),s)}static createFromParsedTokenTheme(l,s){return A(l,s)}constructor(l,s){this._colorMap=l,this._root=s,this._cache=new Map}getColorMap(){return this._colorMap.getColorMap()}getThemeTrieElement(){return this._root.toExternalThemeTrieElement()}_match(l){return this._root.match(l)}match(l,s){let d=this._cache.get(s);if(typeof d>"u"){const n=this._match(s),a=S(s);d=(n.metadata|a<<8)>>>0,this._cache.set(s,d)}return(d|l<<0)>>>0}}e.TokenTheme=I;const b=/\b(comment|string|regex|regexp)\b/;function S(c){const l=c.match(b);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=S;function C(c,l){return c<l?-1:c>l?1:0}e.strcmp=C;class r{constructor(l,s,d){this._themeTrieElementRuleBrand=void 0,this._fontStyle=l,this._foreground=s,this._background=d,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new r(this._fontStyle,this._foreground,this._background)}acceptOverwrite(l,s,d){l!==-1&&(this._fontStyle=l),s!==0&&(this._foreground=s),d!==0&&(this._background=d),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}e.ThemeTrieElementRule=r;class u{constructor(l,s=new Map){if(this.mainRule=l,s instanceof Map)this.children=s;else{this.children=new Map;for(const d in s)this.children.set(d,s[d])}}}e.ExternalThemeTrieElement=u;class i{constructor(l){this._themeTrieElementBrand=void 0,this._mainRule=l,this._children=new Map}toExternalThemeTrieElement(){const l=new Map;return this._children.forEach((s,d)=>{l.set(d,s.toExternalThemeTrieElement())}),new u(this._mainRule,l)}match(l){if(l==="")return this._mainRule;const s=l.indexOf(".");let d,n;s===-1?(d=l,n=""):(d=l.substring(0,s),n=l.substring(s+1));const a=this._children.get(d);return typeof a<"u"?a.match(n):this._mainRule}insert(l,s,d,n){if(l===""){this._mainRule.acceptOverwrite(s,d,n);return}const a=l.indexOf(".");let o,g;a===-1?(o=l,g=""):(o=l.substring(0,a),g=l.substring(a+1));let h=this._children.get(o);typeof h>"u"&&(h=new i(this._mainRule.clone()),this._children.set(o,h)),h.insert(g,s,d,n)}}e.ThemeTrieElement=i;function f(c){const l=[];for(let s=1,d=c.length;s<d;s++){const n=c[s];l[s]=`.mtk${s} { color: ${n}; }`}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=f}),define(ae[116],le([1,0,52]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shouldSynchronizeModel=e.ApplyEditsResult=e.SearchData=e.ValidAnnotatedEditOperation=e.ModelConstants=e.PositionAffinity=e.isITextSnapshot=e.TrackedRangeStickiness=e.FindMatch=e.TextModelResolvedOptions=e.EndOfLineSequence=e.DefaultEndOfLine=e.EndOfLinePreference=e.InjectedTextCursorStops=e.MinimapPosition=e.OverviewRulerLane=void 0;var p;(function(d){d[d.Left=1]="Left",d[d.Center=2]="Center",d[d.Right=4]="Right",d[d.Full=7]="Full"})(p=e.OverviewRulerLane||(e.OverviewRulerLane={}));var R;(function(d){d[d.Inline=1]="Inline",d[d.Gutter=2]="Gutter"})(R=e.MinimapPosition||(e.MinimapPosition={}));var A;(function(d){d[d.Both=0]="Both",d[d.Right=1]="Right",d[d.Left=2]="Left",d[d.None=3]="None"})(A=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));var k;(function(d){d[d.TextDefined=0]="TextDefined",d[d.LF=1]="LF",d[d.CRLF=2]="CRLF"})(k=e.EndOfLinePreference||(e.EndOfLinePreference={}));var E;(function(d){d[d.LF=1]="LF",d[d.CRLF=2]="CRLF"})(E=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var I;(function(d){d[d.LF=0]="LF",d[d.CRLF=1]="CRLF"})(I=e.EndOfLineSequence||(e.EndOfLineSequence={}));class b{constructor(n){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,n.tabSize|0),this.indentSize=n.tabSize|0,this.insertSpaces=Boolean(n.insertSpaces),this.defaultEOL=n.defaultEOL|0,this.trimAutoWhitespace=Boolean(n.trimAutoWhitespace),this.bracketPairColorizationOptions=n.bracketPairColorizationOptions}equals(n){return this.tabSize===n.tabSize&&this.indentSize===n.indentSize&&this.insertSpaces===n.insertSpaces&&this.defaultEOL===n.defaultEOL&&this.trimAutoWhitespace===n.trimAutoWhitespace&&(0,t.equals)(this.bracketPairColorizationOptions,n.bracketPairColorizationOptions)}createChangeEvent(n){return{tabSize:this.tabSize!==n.tabSize,indentSize:this.indentSize!==n.indentSize,insertSpaces:this.insertSpaces!==n.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==n.trimAutoWhitespace}}}e.TextModelResolvedOptions=b;class S{constructor(n,a){this._findMatchBrand=void 0,this.range=n,this.matches=a}}e.FindMatch=S;var C;(function(d){d[d.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",d[d.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",d[d.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",d[d.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(C=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));function r(d){return d&&typeof d.read=="function"}e.isITextSnapshot=r;var u;(function(d){d[d.Left=0]="Left",d[d.Right=1]="Right",d[d.None=2]="None",d[d.LeftOfInjectedText=3]="LeftOfInjectedText",d[d.RightOfInjectedText=4]="RightOfInjectedText"})(u=e.PositionAffinity||(e.PositionAffinity={}));var i;(function(d){d[d.FIRST_LINE_DETECTION_LENGTH_LIMIT=1e3]="FIRST_LINE_DETECTION_LENGTH_LIMIT"})(i=e.ModelConstants||(e.ModelConstants={}));class f{constructor(n,a,o,g,h,v){this.identifier=n,this.range=a,this.text=o,this.forceMoveMarkers=g,this.isAutoWhitespaceEdit=h,this._isTracked=v}}e.ValidAnnotatedEditOperation=f;class c{constructor(n,a,o){this.regex=n,this.wordSeparators=a,this.simpleSearch=o}}e.SearchData=c;class l{constructor(n,a,o){this.reverseEdits=n,this.changes=a,this.trimAutoWhitespaceLineNumbers=o}}e.ApplyEditsResult=l;function s(d){return!d.isTooLargeForSyncing()&&!d.isForSimpleWidget}e.shouldSynchronizeModel=s}),define(ae[364],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const t=new Array;class p{static create(k,E){if(k<=128&&E.length===0){let I=p.cache[k];return I||(I=new p(k,E),p.cache[k]=I),I}return new p(k,E)}static getEmpty(){return this.empty}constructor(k,E){this.items=k,this.additionalItems=E}add(k,E){const I=E.getKey(k);let b=I>>5;if(b===0){const C=1<<I|this.items;return C===this.items?this:p.create(C,this.additionalItems)}b--;const S=this.additionalItems.slice(0);for(;S.length<b;)S.push(0);return S[b]|=1<<(I&31),p.create(this.items,S)}has(k,E){const I=E.getKey(k);let b=I>>5;return b===0?(this.items&1<<I)!==0:(b--,((this.additionalItems[b]||0)&1<<(I&31))!==0)}merge(k){const E=this.items|k.items;if(this.additionalItems===t&&k.additionalItems===t)return E===this.items?this:E===k.items?k:p.create(E,t);const I=new Array;for(let b=0;b<Math.max(this.additionalItems.length,k.additionalItems.length);b++){const S=this.additionalItems[b]||0,C=k.additionalItems[b]||0;I.push(S|C)}return p.create(E,I)}intersects(k){if((this.items&k.items)!==0)return!0;for(let E=0;E<Math.min(this.additionalItems.length,k.additionalItems.length);E++)if((this.additionalItems[E]&k.additionalItems[E])!==0)return!0;return!1}equals(k){if(this.items!==k.items||this.additionalItems.length!==k.additionalItems.length)return!1;for(let E=0;E<this.additionalItems.length;E++)if(this.additionalItems[E]!==k.additionalItems[E])return!1;return!0}}e.SmallImmutableSet=p,p.cache=new Array(129),p.empty=p.create(0,t),e.identityKeyProvider={getKey(A){return A}};class R{constructor(){this.items=new Map}getKey(k){let E=this.items.get(k);return E===void 0&&(E=this.items.size,this.items.set(k,E)),E}reverseLookup(k){return[...this.items].find(([E,I])=>I===k)?.[0]}reverseLookupSet(k){const E=[];for(const[I]of this.items)k.has(I,this)&&E.push(I);return E}keys(){return this.items.keys()}}e.DenseKeyProvider=R}),define(ae[1207],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guessIndentation=void 0;class t{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function p(A,k,E,I,b){b.spacesDiff=0,b.looksLikeAlignment=!1;let S;for(S=0;S<k&&S<I;S++){const l=A.charCodeAt(S),s=E.charCodeAt(S);if(l!==s)break}let C=0,r=0;for(let l=S;l<k;l++)A.charCodeAt(l)===32?C++:r++;let u=0,i=0;for(let l=S;l<I;l++)E.charCodeAt(l)===32?u++:i++;if(C>0&&r>0||u>0&&i>0)return;const f=Math.abs(r-i),c=Math.abs(C-u);if(f===0){b.spacesDiff=c,c>0&&0<=u-1&&u-1<A.length&&u<E.length&&E.charCodeAt(u)!==32&&A.charCodeAt(u-1)===32&&A.charCodeAt(A.length-1)===44&&(b.looksLikeAlignment=!0);return}if(c%f===0){b.spacesDiff=c/f;return}}function R(A,k,E){const I=Math.min(A.getLineCount(),1e4);let b=0,S=0,C="",r=0;const u=[2,4,6,8,3,5,7],i=8,f=[0,0,0,0,0,0,0,0,0],c=new t;for(let d=1;d<=I;d++){const n=A.getLineLength(d),a=A.getLineContent(d),o=n<=65536;let g=!1,h=0,v=0,m=0;for(let D=0,y=n;D<y;D++){const T=o?a.charCodeAt(D):A.getLineCharCode(d,D);if(T===9)m++;else if(T===32)v++;else{g=!0,h=D;break}}if(!g||(m>0?b++:v>1&&S++,p(C,r,a,h,c),c.looksLikeAlignment&&!(E&&k===c.spacesDiff)))continue;const w=c.spacesDiff;w<=i&&f[w]++,C=a,r=h}let l=E;b!==S&&(l=b<S);let s=k;if(l){let d=l?0:.1*I;u.forEach(n=>{const a=f[n];a>d&&(d=a,s=n)}),s===4&&f[4]>0&&f[2]>0&&f[2]>=f[4]/2&&(s=2)}return{insertSpaces:l,tabSize:s}}e.guessIndentation=R}),define(ae[729],le([1,0]),function(J,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(z){z.EditorHintDecoration="squiggly-hint",z.EditorInfoDecoration="squiggly-info",z.EditorWarningDecoration="squiggly-warning",z.EditorErrorDecoration="squiggly-error",z.EditorUnnecessaryDecoration="squiggly-unnecessary",z.EditorUnnecessaryInlineDecoration="squiggly-inline-unnecessary",z.EditorDeprecatedInlineDecoration="squiggly-inline-deprecated"})(t=e.ClassName||(e.ClassName={}));var p;(function(z){z[z.Black=0]="Black",z[z.Red=1]="Red"})(p=e.NodeColor||(e.NodeColor={}));var R;(function(z){z[z.ColorMask=1]="ColorMask",z[z.ColorMaskInverse=254]="ColorMaskInverse",z[z.ColorOffset=0]="ColorOffset",z[z.IsVisitedMask=2]="IsVisitedMask",z[z.IsVisitedMaskInverse=253]="IsVisitedMaskInverse",z[z.IsVisitedOffset=1]="IsVisitedOffset",z[z.IsForValidationMask=4]="IsForValidationMask",z[z.IsForValidationMaskInverse=251]="IsForValidationMaskInverse",z[z.IsForValidationOffset=2]="IsForValidationOffset",z[z.StickinessMask=24]="StickinessMask",z[z.StickinessMaskInverse=231]="StickinessMaskInverse",z[z.StickinessOffset=3]="StickinessOffset",z[z.CollapseOnReplaceEditMask=32]="CollapseOnReplaceEditMask",z[z.CollapseOnReplaceEditMaskInverse=223]="CollapseOnReplaceEditMaskInverse",z[z.CollapseOnReplaceEditOffset=5]="CollapseOnReplaceEditOffset",z[z.MIN_SAFE_DELTA=-1073741824]="MIN_SAFE_DELTA",z[z.MAX_SAFE_DELTA=1073741824]="MAX_SAFE_DELTA"})(R||(R={}));function A(z){return(z.metadata&1)>>>0}e.getNodeColor=A;function k(z,x){z.metadata=z.metadata&254|x<<0}function E(z){return(z.metadata&2)>>>1===1}function I(z,x){z.metadata=z.metadata&253|(x?1:0)<<1}function b(z){return(z.metadata&4)>>>2===1}function S(z,x){z.metadata=z.metadata&251|(x?1:0)<<2}function C(z){return(z.metadata&24)>>>3}function r(z,x){z.metadata=z.metadata&231|x<<3}function u(z){return(z.metadata&32)>>>5===1}function i(z,x){z.metadata=z.metadata&223|(x?1:0)<<5}function f(z,x){r(z,x)}e.setNodeStickiness=f;class c{constructor(x,H,W){this.metadata=0,this.parent=this,this.left=this,this.right=this,k(this,1),this.start=H,this.end=W,this.delta=0,this.maxEnd=W,this.id=x,this.ownerId=0,this.options=null,S(this,!1),r(this,1),i(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=H,this.cachedAbsoluteEnd=W,this.range=null,I(this,!1)}reset(x,H,W,U){this.start=H,this.end=W,this.maxEnd=W,this.cachedVersionId=x,this.cachedAbsoluteStart=H,this.cachedAbsoluteEnd=W,this.range=U}setOptions(x){this.options=x;const H=this.options.className;S(this,H==="squiggly-error"||H==="squiggly-warning"||H==="squiggly-info"),r(this,this.options.stickiness),i(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(x,H,W){this.cachedVersionId!==W&&(this.range=null),this.cachedVersionId=W,this.cachedAbsoluteStart=x,this.cachedAbsoluteEnd=H}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=c,e.SENTINEL=new c(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(x,H,W,U,$){return this.root===e.SENTINEL?[]:w(this,x,H,W,U,$)}search(x,H,W){return this.root===e.SENTINEL?[]:m(this,x,H,W)}collectNodesFromOwner(x){return h(this,x)}collectNodesPostOrder(){return v(this)}insert(x){D(this,x),this._normalizeDeltaIfNecessary()}delete(x){T(this,x),this._normalizeDeltaIfNecessary()}resolveNode(x,H){const W=x;let U=0;for(;x!==this.root;)x===x.parent.right&&(U+=x.parent.delta),x=x.parent;const $=W.start+U,q=W.end+U;W.setCachedOffsets($,q,H)}acceptReplace(x,H,W,U){const $=o(this,x,x+H);for(let q=0,X=$.length;q<X;q++){const G=$[q];T(this,G)}this._normalizeDeltaIfNecessary(),g(this,x,x+H,W),this._normalizeDeltaIfNecessary();for(let q=0,X=$.length;q<X;q++){const G=$[q];G.start=G.cachedAbsoluteStart,G.end=G.cachedAbsoluteEnd,a(G,x,x+H,W,U),G.maxEnd=G.end,D(this,G)}this._normalizeDeltaIfNecessary()}getAllInOrder(){return m(this,0,!1,0)}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,s(this))}}e.IntervalTree=l;function s(z){let x=z.root,H=0;for(;x!==e.SENTINEL;){if(x.left!==e.SENTINEL&&!E(x.left)){x=x.left;continue}if(x.right!==e.SENTINEL&&!E(x.right)){H+=x.delta,x=x.right;continue}x.start=H+x.start,x.end=H+x.end,x.delta=0,P(x),I(x,!0),I(x.left,!1),I(x.right,!1),x===x.parent.right&&(H-=x.parent.delta),x=x.parent}I(z.root,!1)}var d;(function(z){z[z.MarkerDefined=0]="MarkerDefined",z[z.ForceMove=1]="ForceMove",z[z.ForceStay=2]="ForceStay"})(d||(d={}));function n(z,x,H,W){return z<H?!0:z>H||W===1?!1:W===2?!0:x}function a(z,x,H,W,U){const $=C(z),q=$===0||$===2,X=$===1||$===2,G=H-x,Q=W,j=Math.min(G,Q),K=z.start;let Y=!1;const ee=z.end;let ie=!1;x<=K&&ee<=H&&u(z)&&(z.start=x,Y=!0,z.end=x,ie=!0);{const oe=U?1:G>0?2:0;!Y&&n(K,q,x,oe)&&(Y=!0),!ie&&n(ee,X,x,oe)&&(ie=!0)}if(j>0&&!U){const oe=G>Q?2:0;!Y&&n(K,q,x+j,oe)&&(Y=!0),!ie&&n(ee,X,x+j,oe)&&(ie=!0)}{const oe=U?1:0;!Y&&n(K,q,H,oe)&&(z.start=x+Q,Y=!0),!ie&&n(ee,X,H,oe)&&(z.end=x+Q,ie=!0)}const re=Q-G;Y||(z.start=Math.max(0,K+re)),ie||(z.end=Math.max(0,ee+re)),z.start>z.end&&(z.end=z.start)}e.nodeAcceptEdit=a;function o(z,x,H){let W=z.root,U=0,$=0,q=0,X=0;const G=[];let Q=0;for(;W!==e.SENTINEL;){if(E(W)){I(W.left,!1),I(W.right,!1),W===W.parent.right&&(U-=W.parent.delta),W=W.parent;continue}if(!E(W.left)){if($=U+W.maxEnd,$<x){I(W,!0);continue}if(W.left!==e.SENTINEL){W=W.left;continue}}if(q=U+W.start,q>H){I(W,!0);continue}if(X=U+W.end,X>=x&&(W.setCachedOffsets(q,X,0),G[Q++]=W),I(W,!0),W.right!==e.SENTINEL&&!E(W.right)){U+=W.delta,W=W.right;continue}}return I(z.root,!1),G}function g(z,x,H,W){let U=z.root,$=0,q=0,X=0;const G=W-(H-x);for(;U!==e.SENTINEL;){if(E(U)){I(U.left,!1),I(U.right,!1),U===U.parent.right&&($-=U.parent.delta),P(U),U=U.parent;continue}if(!E(U.left)){if(q=$+U.maxEnd,q<x){I(U,!0);continue}if(U.left!==e.SENTINEL){U=U.left;continue}}if(X=$+U.start,X>H){U.start+=G,U.end+=G,U.delta+=G,(U.delta<-1073741824||U.delta>1073741824)&&(z.requestNormalizeDelta=!0),I(U,!0);continue}if(I(U,!0),U.right!==e.SENTINEL&&!E(U.right)){$+=U.delta,U=U.right;continue}}I(z.root,!1)}function h(z,x){let H=z.root;const W=[];let U=0;for(;H!==e.SENTINEL;){if(E(H)){I(H.left,!1),I(H.right,!1),H=H.parent;continue}if(H.left!==e.SENTINEL&&!E(H.left)){H=H.left;continue}if(H.ownerId===x&&(W[U++]=H),I(H,!0),H.right!==e.SENTINEL&&!E(H.right)){H=H.right;continue}}return I(z.root,!1),W}function v(z){let x=z.root;const H=[];let W=0;for(;x!==e.SENTINEL;){if(E(x)){I(x.left,!1),I(x.right,!1),x=x.parent;continue}if(x.left!==e.SENTINEL&&!E(x.left)){x=x.left;continue}if(x.right!==e.SENTINEL&&!E(x.right)){x=x.right;continue}H[W++]=x,I(x,!0)}return I(z.root,!1),H}function m(z,x,H,W){let U=z.root,$=0,q=0,X=0;const G=[];let Q=0;for(;U!==e.SENTINEL;){if(E(U)){I(U.left,!1),I(U.right,!1),U===U.parent.right&&($-=U.parent.delta),U=U.parent;continue}if(U.left!==e.SENTINEL&&!E(U.left)){U=U.left;continue}q=$+U.start,X=$+U.end,U.setCachedOffsets(q,X,W);let j=!0;if(x&&U.ownerId&&U.ownerId!==x&&(j=!1),H&&b(U)&&(j=!1),j&&(G[Q++]=U),I(U,!0),U.right!==e.SENTINEL&&!E(U.right)){$+=U.delta,U=U.right;continue}}return I(z.root,!1),G}function w(z,x,H,W,U,$){let q=z.root,X=0,G=0,Q=0,j=0;const K=[];let Y=0;for(;q!==e.SENTINEL;){if(E(q)){I(q.left,!1),I(q.right,!1),q===q.parent.right&&(X-=q.parent.delta),q=q.parent;continue}if(!E(q.left)){if(G=X+q.maxEnd,G<x){I(q,!0);continue}if(q.left!==e.SENTINEL){q=q.left;continue}}if(Q=X+q.start,Q>H){I(q,!0);continue}if(j=X+q.end,j>=x){q.setCachedOffsets(Q,j,$);let ee=!0;W&&q.ownerId&&q.ownerId!==W&&(ee=!1),U&&b(q)&&(ee=!1),ee&&(K[Y++]=q)}if(I(q,!0),q.right!==e.SENTINEL&&!E(q.right)){X+=q.delta,q=q.right;continue}}return I(z.root,!1),K}function D(z,x){if(z.root===e.SENTINEL)return x.parent=e.SENTINEL,x.left=e.SENTINEL,x.right=e.SENTINEL,k(x,0),z.root=x,z.root;y(z,x),B(x.parent);let H=x;for(;H!==z.root&&A(H.parent)===1;)if(H.parent===H.parent.parent.left){const W=H.parent.parent.right;A(W)===1?(k(H.parent,0),k(W,0),k(H.parent.parent,1),H=H.parent.parent):(H===H.parent.right&&(H=H.parent,M(z,H)),k(H.parent,0),k(H.parent.parent,1),O(z,H.parent.parent))}else{const W=H.parent.parent.left;A(W)===1?(k(H.parent,0),k(W,0),k(H.parent.parent,1),H=H.parent.parent):(H===H.parent.left&&(H=H.parent,O(z,H)),k(H.parent,0),k(H.parent.parent,1),M(z,H.parent.parent))}return k(z.root,0),x}function y(z,x){let H=0,W=z.root;const U=x.start,$=x.end;for(;;)if(V(U,$,W.start+H,W.end+H)<0)if(W.left===e.SENTINEL){x.start-=H,x.end-=H,x.maxEnd-=H,W.left=x;break}else W=W.left;else if(W.right===e.SENTINEL){x.start-=H+W.delta,x.end-=H+W.delta,x.maxEnd-=H+W.delta,W.right=x;break}else H+=W.delta,W=W.right;x.parent=W,x.left=e.SENTINEL,x.right=e.SENTINEL,k(x,1)}function T(z,x){let H,W;if(x.left===e.SENTINEL?(H=x.right,W=x,H.delta+=x.delta,(H.delta<-1073741824||H.delta>1073741824)&&(z.requestNormalizeDelta=!0),H.start+=x.delta,H.end+=x.delta):x.right===e.SENTINEL?(H=x.left,W=x):(W=_(x.right),H=W.right,H.start+=W.delta,H.end+=W.delta,H.delta+=W.delta,(H.delta<-1073741824||H.delta>1073741824)&&(z.requestNormalizeDelta=!0),W.start+=x.delta,W.end+=x.delta,W.delta=x.delta,(W.delta<-1073741824||W.delta>1073741824)&&(z.requestNormalizeDelta=!0)),W===z.root){z.root=H,k(H,0),x.detach(),L(),P(H),z.root.parent=e.SENTINEL;return}const U=A(W)===1;if(W===W.parent.left?W.parent.left=H:W.parent.right=H,W===x?H.parent=W.parent:(W.parent===x?H.parent=W:H.parent=W.parent,W.left=x.left,W.right=x.right,W.parent=x.parent,k(W,A(x)),x===z.root?z.root=W:x===x.parent.left?x.parent.left=W:x.parent.right=W,W.left!==e.SENTINEL&&(W.left.parent=W),W.right!==e.SENTINEL&&(W.right.parent=W)),x.detach(),U){B(H.parent),W!==x&&(B(W),B(W.parent)),L();return}B(H),B(H.parent),W!==x&&(B(W),B(W.parent));let $;for(;H!==z.root&&A(H)===0;)H===H.parent.left?($=H.parent.right,A($)===1&&(k($,0),k(H.parent,1),M(z,H.parent),$=H.parent.right),A($.left)===0&&A($.right)===0?(k($,1),H=H.parent):(A($.right)===0&&(k($.left,0),k($,1),O(z,$),$=H.parent.right),k($,A(H.parent)),k(H.parent,0),k($.right,0),M(z,H.parent),H=z.root)):($=H.parent.left,A($)===1&&(k($,0),k(H.parent,1),O(z,H.parent),$=H.parent.left),A($.left)===0&&A($.right)===0?(k($,1),H=H.parent):(A($.left)===0&&(k($.right,0),k($,1),M(z,$),$=H.parent.left),k($,A(H.parent)),k(H.parent,0),k($.left,0),O(z,H.parent),H=z.root));k(H,0),L()}function _(z){for(;z.left!==e.SENTINEL;)z=z.left;return z}function L(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function M(z,x){const H=x.right;H.delta+=x.delta,(H.delta<-1073741824||H.delta>1073741824)&&(z.requestNormalizeDelta=!0),H.start+=x.delta,H.end+=x.delta,x.right=H.left,H.left!==e.SENTINEL&&(H.left.parent=x),H.parent=x.parent,x.parent===e.SENTINEL?z.root=H:x===x.parent.left?x.parent.left=H:x.parent.right=H,H.left=x,x.parent=H,P(x),P(H)}function O(z,x){const H=x.left;x.delta-=H.delta,(x.delta<-1073741824||x.delta>1073741824)&&(z.requestNormalizeDelta=!0),x.start-=H.delta,x.end-=H.delta,x.left=H.right,H.right!==e.SENTINEL&&(H.right.parent=x),H.parent=x.parent,x.parent===e.SENTINEL?z.root=H:x===x.parent.right?x.parent.right=H:x.parent.left=H,H.right=x,x.parent=H,P(x),P(H)}function N(z){let x=z.end;if(z.left!==e.SENTINEL){const H=z.left.maxEnd;H>x&&(x=H)}if(z.right!==e.SENTINEL){const H=z.right.maxEnd+z.delta;H>x&&(x=H)}return x}function P(z){z.maxEnd=N(z)}e.recomputeMaxEnd=P;function B(z){for(;z!==e.SENTINEL;){const x=N(z);if(z.maxEnd===x)return;z.maxEnd=x,z=z.parent}}function V(z,x,H,W){return z===H?x-W:z-H}e.intervalCompare=V}),define(ae[1208],le([1,0]),function(J,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(c,l){this.piece=c,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 R(this.right);let c=this;for(;c.parent!==e.SENTINEL&&c.parent.left!==c;)c=c.parent;return c.parent===e.SENTINEL?e.SENTINEL:c.parent}prev(){if(this.left!==e.SENTINEL)return A(this.left);let c=this;for(;c.parent!==e.SENTINEL&&c.parent.right!==c;)c=c.parent;return c.parent===e.SENTINEL?e.SENTINEL:c.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=t;var p;(function(f){f[f.Black=0]="Black",f[f.Red=1]="Red"})(p=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 R(f){for(;f.left!==e.SENTINEL;)f=f.left;return f}e.leftest=R;function A(f){for(;f.right!==e.SENTINEL;)f=f.right;return f}e.righttest=A;function k(f){return f===e.SENTINEL?0:f.size_left+f.piece.length+k(f.right)}e.calculateSize=k;function E(f){return f===e.SENTINEL?0:f.lf_left+f.piece.lineFeedCnt+E(f.right)}e.calculateLF=E;function I(){e.SENTINEL.parent=e.SENTINEL}e.resetSentinel=I;function b(f,c){const l=c.right;l.size_left+=c.size_left+(c.piece?c.piece.length:0),l.lf_left+=c.lf_left+(c.piece?c.piece.lineFeedCnt:0),c.right=l.left,l.left!==e.SENTINEL&&(l.left.parent=c),l.parent=c.parent,c.parent===e.SENTINEL?f.root=l:c.parent.left===c?c.parent.left=l:c.parent.right=l,l.left=c,c.parent=l}e.leftRotate=b;function S(f,c){const l=c.left;c.left=l.right,l.right!==e.SENTINEL&&(l.right.parent=c),l.parent=c.parent,c.size_left-=l.size_left+(l.piece?l.piece.length:0),c.lf_left-=l.lf_left+(l.piece?l.piece.lineFeedCnt:0),c.parent===e.SENTINEL?f.root=l:c===c.parent.right?c.parent.right=l:c.parent.left=l,l.right=c,c.parent=l}e.rightRotate=S;function C(f,c){let l,s;if(c.left===e.SENTINEL?(s=c,l=s.right):c.right===e.SENTINEL?(s=c,l=s.left):(s=R(c.right),l=s.right),s===f.root){f.root=l,l.color=0,c.detach(),I(),f.root.parent=e.SENTINEL;return}const d=s.color===1;if(s===s.parent.left?s.parent.left=l:s.parent.right=l,s===c?(l.parent=s.parent,i(f,l)):(s.parent===c?l.parent=s:l.parent=s.parent,i(f,l),s.left=c.left,s.right=c.right,s.parent=c.parent,s.color=c.color,c===f.root?f.root=s:c===c.parent.left?c.parent.left=s:c.parent.right=s,s.left!==e.SENTINEL&&(s.left.parent=s),s.right!==e.SENTINEL&&(s.right.parent=s),s.size_left=c.size_left,s.lf_left=c.lf_left,i(f,s)),c.detach(),l.parent.left===l){const a=k(l),o=E(l);if(a!==l.parent.size_left||o!==l.parent.lf_left){const g=a-l.parent.size_left,h=o-l.parent.lf_left;l.parent.size_left=a,l.parent.lf_left=o,u(f,l.parent,g,h)}}if(i(f,l.parent),d){I();return}let n;for(;l!==f.root&&l.color===0;)l===l.parent.left?(n=l.parent.right,n.color===1&&(n.color=0,l.parent.color=1,b(f,l.parent),n=l.parent.right),n.left.color===0&&n.right.color===0?(n.color=1,l=l.parent):(n.right.color===0&&(n.left.color=0,n.color=1,S(f,n),n=l.parent.right),n.color=l.parent.color,l.parent.color=0,n.right.color=0,b(f,l.parent),l=f.root)):(n=l.parent.left,n.color===1&&(n.color=0,l.parent.color=1,S(f,l.parent),n=l.parent.left),n.left.color===0&&n.right.color===0?(n.color=1,l=l.parent):(n.left.color===0&&(n.right.color=0,n.color=1,b(f,n),n=l.parent.left),n.color=l.parent.color,l.parent.color=0,n.left.color=0,S(f,l.parent),l=f.root));l.color=0,I()}e.rbDelete=C;function r(f,c){for(i(f,c);c!==f.root&&c.parent.color===1;)if(c.parent===c.parent.parent.left){const l=c.parent.parent.right;l.color===1?(c.parent.color=0,l.color=0,c.parent.parent.color=1,c=c.parent.parent):(c===c.parent.right&&(c=c.parent,b(f,c)),c.parent.color=0,c.parent.parent.color=1,S(f,c.parent.parent))}else{const l=c.parent.parent.left;l.color===1?(c.parent.color=0,l.color=0,c.parent.parent.color=1,c=c.parent.parent):(c===c.parent.left&&(c=c.parent,S(f,c)),c.parent.color=0,c.parent.parent.color=1,b(f,c.parent.parent))}f.root.color=0}e.fixInsert=r;function u(f,c,l,s){for(;c!==f.root&&c!==e.SENTINEL;)c.parent.left===c&&(c.parent.size_left+=l,c.parent.lf_left+=s),c=c.parent}e.updateTreeMetadata=u;function i(f,c){let l=0,s=0;if(c!==f.root){for(;c!==f.root&&c===c.parent.right;)c=c.parent;if(c!==f.root)for(c=c.parent,l=k(c.left)-c.size_left,s=E(c.left)-c.lf_left,c.size_left+=l,c.lf_left+=s;c!==f.root&&(l!==0||s!==0);)c.parent.left===c&&(c.parent.size_left+=l,c.parent.lf_left+=s),c=c.parent}}e.recomputeTreeMetadata=i}),define(ae[365],le([1,0,16,479]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class R{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,b){I=(0,p.toUint32)(I);const S=this.values,C=this.prefixSum,r=b.length;return r===0?!1:(this.values=new Uint32Array(S.length+r),this.values.set(S.subarray(0,I),0),this.values.set(S.subarray(I),I+r),this.values.set(b,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,b){return I=(0,p.toUint32)(I),b=(0,p.toUint32)(b),this.values[I]===b?!1:(this.values[I]=b,I-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=I-1),!0)}removeValues(I,b){I=(0,p.toUint32)(I),b=(0,p.toUint32)(b);const S=this.values,C=this.prefixSum;if(I>=S.length)return!1;const r=S.length-I;return b>=r&&(b=r),b===0?!1:(this.values=new Uint32Array(S.length-b),this.values.set(S.subarray(0,I),0),this.values.set(S.subarray(I+b),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,p.toUint32)(I),this._getPrefixSum(I))}_getPrefixSum(I){if(I<=this.prefixSumValidIndex[0])return this.prefixSum[I];let b=this.prefixSumValidIndex[0]+1;b===0&&(this.prefixSum[0]=this.values[0],b++),I>=this.values.length&&(I=this.values.length-1);for(let S=b;S<=I;S++)this.prefixSum[S]=this.prefixSum[S-1]+this.values[S];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],I),this.prefixSum[I]}getIndexOf(I){I=Math.floor(I),this.getTotalSum();let b=0,S=this.values.length-1,C=0,r=0,u=0;for(;b<=S;)if(C=b+(S-b)/2|0,r=this.prefixSum[C],u=r-this.values[C],I<u)S=C-1;else if(I>=r)b=C+1;else break;return new k(C,I-u)}}e.PrefixSumComputer=R;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 b=this._indexBySum[I],S=b>0?this._prefixSum[b-1]:0;return new k(b,I-S)}removeValues(I,b){this._values.splice(I,b),this._invalidate(I)}insertValues(I,b){this._values=(0,t.arrayInsert)(this._values,I,b),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,b=this._values.length;I<b;I++){const S=this._values[I],C=I>0?this._prefixSum[I-1]:0;this._prefixSum[I]=C+S;for(let r=0;r<S;r++)this._indexBySum[C+r]=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,b){this._values[I]!==b&&(this._values[I]=b,this._invalidate(I))}}e.ConstantTimePrefixSumComputer=A;class k{constructor(I,b){this.index=I,this.remainder=b,this._prefixSumIndexOfResultBrand=void 0,this.index=I,this.remainder=b}}e.PrefixSumIndexOfResult=k}),define(ae[730],le([1,0,2]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelPart=void 0;class p extends t.Disposable{constructor(){super(...arguments),this._isDisposed=!1}dispose(){super.dispose(),this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}e.TextModelPart=p}),define(ae[567],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeIndentLevel=void 0;function t(p,R){let A=0,k=0;const E=p.length;for(;k<E;){const I=p.charCodeAt(k);if(I===32)A++;else if(I===9)A=A-A%R+R;else break;k++}return k===E?-1:A}e.computeIndentLevel=t}),define(ae[731],le([1,0,171,50,116]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputPosition=e.InjectedText=e.ModelLineProjectionData=void 0;class A{constructor(C,r,u,i,f){this.injectionOffsets=C,this.injectionOptions=r,this.breakOffsets=u,this.breakOffsetsVisibleColumn=i,this.wrappedTextIndentLength=f}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(C){return C>0?this.wrappedTextIndentLength:0}getLineLength(C){const r=C>0?this.breakOffsets[C-1]:0;let i=this.breakOffsets[C]-r;return C>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(C){return this.getLineLength(C)}translateToInputOffset(C,r){C>0&&(r=Math.max(0,r-this.wrappedTextIndentLength));let i=C===0?r:this.breakOffsets[C-1]+r;if(this.injectionOffsets!==null)for(let f=0;f<this.injectionOffsets.length&&i>this.injectionOffsets[f];f++)i<this.injectionOffsets[f]+this.injectionOptions[f].content.length?i=this.injectionOffsets[f]:i-=this.injectionOptions[f].content.length;return i}translateToOutputPosition(C,r=2){let u=C;if(this.injectionOffsets!==null)for(let i=0;i<this.injectionOffsets.length&&!(C<this.injectionOffsets[i]||r!==1&&C===this.injectionOffsets[i]);i++)u+=this.injectionOptions[i].content.length;return this.offsetInInputWithInjectionsToOutputPosition(u,r)}offsetInInputWithInjectionsToOutputPosition(C,r=2){let u=0,i=this.breakOffsets.length-1,f=0,c=0;for(;u<=i;){f=u+(i-u)/2|0;const s=this.breakOffsets[f];if(c=f>0?this.breakOffsets[f-1]:0,r===0)if(C<=c)i=f-1;else if(C>s)u=f+1;else break;else if(C<c)i=f-1;else if(C>=s)u=f+1;else break}let l=C-c;return f>0&&(l+=this.wrappedTextIndentLength),new b(f,l)}normalizeOutputPosition(C,r,u){if(this.injectionOffsets!==null){const i=this.outputPositionToOffsetInInputWithInjections(C,r),f=this.normalizeOffsetInInputWithInjectionsAroundInjections(i,u);if(f!==i)return this.offsetInInputWithInjectionsToOutputPosition(f,u)}if(u===0){if(C>0&&r===this.getMinOutputOffset(C))return new b(C-1,this.getMaxOutputOffset(C-1))}else if(u===1){const i=this.getOutputLineCount()-1;if(C<i&&r===this.getMaxOutputOffset(C))return new b(C+1,this.getMinOutputOffset(C+1))}return new b(C,r)}outputPositionToOffsetInInputWithInjections(C,r){return C>0&&(r=Math.max(0,r-this.wrappedTextIndentLength)),(C>0?this.breakOffsets[C-1]:0)+r}normalizeOffsetInInputWithInjectionsAroundInjections(C,r){const u=this.getInjectedTextAtOffset(C);if(!u)return C;if(r===2){if(C===u.offsetInInputWithInjections+u.length&&k(this.injectionOptions[u.injectedTextIndex].cursorStops))return u.offsetInInputWithInjections+u.length;{let i=u.offsetInInputWithInjections;if(E(this.injectionOptions[u.injectedTextIndex].cursorStops))return i;let f=u.injectedTextIndex-1;for(;f>=0&&this.injectionOffsets[f]===this.injectionOffsets[u.injectedTextIndex]&&!(k(this.injectionOptions[f].cursorStops)||(i-=this.injectionOptions[f].content.length,E(this.injectionOptions[f].cursorStops)));)f--;return i}}else if(r===1||r===4){let i=u.offsetInInputWithInjections+u.length,f=u.injectedTextIndex;for(;f+1<this.injectionOffsets.length&&this.injectionOffsets[f+1]===this.injectionOffsets[f];)i+=this.injectionOptions[f+1].content.length,f++;return i}else if(r===0||r===3){let i=u.offsetInInputWithInjections,f=u.injectedTextIndex;for(;f-1>=0&&this.injectionOffsets[f-1]===this.injectionOffsets[f];)i-=this.injectionOptions[f-1].content.length,f--;return i}(0,t.assertNever)(r)}getInjectedText(C,r){const u=this.outputPositionToOffsetInInputWithInjections(C,r),i=this.getInjectedTextAtOffset(u);return i?{options:this.injectionOptions[i.injectedTextIndex]}:null}getInjectedTextAtOffset(C){const r=this.injectionOffsets,u=this.injectionOptions;if(r!==null){let i=0;for(let f=0;f<r.length;f++){const c=u[f].content.length,l=r[f]+i,s=r[f]+i+c;if(l>C)break;if(C<=s)return{injectedTextIndex:f,offsetInInputWithInjections:l,length:c};i+=c}}}}e.ModelLineProjectionData=A;function k(S){return S==null?!0:S===R.InjectedTextCursorStops.Right||S===R.InjectedTextCursorStops.Both}function E(S){return S==null?!0:S===R.InjectedTextCursorStops.Left||S===R.InjectedTextCursorStops.Both}class I{constructor(C){this.options=C}}e.InjectedText=I;class b{constructor(C,r){this.outputLineIndex=C,this.outputOffset=r}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(C){return new p.Position(C+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=b}),define(ae[732],le([1,0]),function(J,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.CodeActionTriggerType=e.AccessibilitySupport=void 0;var t;(function(x){x[x.Unknown=0]="Unknown",x[x.Disabled=1]="Disabled",x[x.Enabled=2]="Enabled"})(t=e.AccessibilitySupport||(e.AccessibilitySupport={}));var p;(function(x){x[x.Invoke=1]="Invoke",x[x.Auto=2]="Auto"})(p=e.CodeActionTriggerType||(e.CodeActionTriggerType={}));var R;(function(x){x[x.KeepWhitespace=1]="KeepWhitespace",x[x.InsertAsSnippet=4]="InsertAsSnippet"})(R=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var A;(function(x){x[x.Method=0]="Method",x[x.Function=1]="Function",x[x.Constructor=2]="Constructor",x[x.Field=3]="Field",x[x.Variable=4]="Variable",x[x.Class=5]="Class",x[x.Struct=6]="Struct",x[x.Interface=7]="Interface",x[x.Module=8]="Module",x[x.Property=9]="Property",x[x.Event=10]="Event",x[x.Operator=11]="Operator",x[x.Unit=12]="Unit",x[x.Value=13]="Value",x[x.Constant=14]="Constant",x[x.Enum=15]="Enum",x[x.EnumMember=16]="EnumMember",x[x.Keyword=17]="Keyword",x[x.Text=18]="Text",x[x.Color=19]="Color",x[x.File=20]="File",x[x.Reference=21]="Reference",x[x.Customcolor=22]="Customcolor",x[x.Folder=23]="Folder",x[x.TypeParameter=24]="TypeParameter",x[x.User=25]="User",x[x.Issue=26]="Issue",x[x.Snippet=27]="Snippet"})(A=e.CompletionItemKind||(e.CompletionItemKind={}));var k;(function(x){x[x.Deprecated=1]="Deprecated"})(k=e.CompletionItemTag||(e.CompletionItemTag={}));var E;(function(x){x[x.Invoke=0]="Invoke",x[x.TriggerCharacter=1]="TriggerCharacter",x[x.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(E=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var I;(function(x){x[x.EXACT=0]="EXACT",x[x.ABOVE=1]="ABOVE",x[x.BELOW=2]="BELOW"})(I=e.ContentWidgetPositionPreference||(e.ContentWidgetPositionPreference={}));var b;(function(x){x[x.NotSet=0]="NotSet",x[x.ContentFlush=1]="ContentFlush",x[x.RecoverFromMarkers=2]="RecoverFromMarkers",x[x.Explicit=3]="Explicit",x[x.Paste=4]="Paste",x[x.Undo=5]="Undo",x[x.Redo=6]="Redo"})(b=e.CursorChangeReason||(e.CursorChangeReason={}));var S;(function(x){x[x.LF=1]="LF",x[x.CRLF=2]="CRLF"})(S=e.DefaultEndOfLine||(e.DefaultEndOfLine={}));var C;(function(x){x[x.Text=0]="Text",x[x.Read=1]="Read",x[x.Write=2]="Write"})(C=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));var r;(function(x){x[x.None=0]="None",x[x.Keep=1]="Keep",x[x.Brackets=2]="Brackets",x[x.Advanced=3]="Advanced",x[x.Full=4]="Full"})(r=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={}));var u;(function(x){x[x.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",x[x.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",x[x.accessibilitySupport=2]="accessibilitySupport",x[x.accessibilityPageSize=3]="accessibilityPageSize",x[x.ariaLabel=4]="ariaLabel",x[x.autoClosingBrackets=5]="autoClosingBrackets",x[x.autoClosingDelete=6]="autoClosingDelete",x[x.autoClosingOvertype=7]="autoClosingOvertype",x[x.autoClosingQuotes=8]="autoClosingQuotes",x[x.autoIndent=9]="autoIndent",x[x.automaticLayout=10]="automaticLayout",x[x.autoSurround=11]="autoSurround",x[x.bracketPairColorization=12]="bracketPairColorization",x[x.guides=13]="guides",x[x.codeLens=14]="codeLens",x[x.codeLensFontFamily=15]="codeLensFontFamily",x[x.codeLensFontSize=16]="codeLensFontSize",x[x.colorDecorators=17]="colorDecorators",x[x.columnSelection=18]="columnSelection",x[x.comments=19]="comments",x[x.contextmenu=20]="contextmenu",x[x.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",x[x.cursorBlinking=22]="cursorBlinking",x[x.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",x[x.cursorStyle=24]="cursorStyle",x[x.cursorSurroundingLines=25]="cursorSurroundingLines",x[x.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",x[x.cursorWidth=27]="cursorWidth",x[x.disableLayerHinting=28]="disableLayerHinting",x[x.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",x[x.domReadOnly=30]="domReadOnly",x[x.dragAndDrop=31]="dragAndDrop",x[x.dropIntoEditor=32]="dropIntoEditor",x[x.emptySelectionClipboard=33]="emptySelectionClipboard",x[x.extraEditorClassName=34]="extraEditorClassName",x[x.fastScrollSensitivity=35]="fastScrollSensitivity",x[x.find=36]="find",x[x.fixedOverflowWidgets=37]="fixedOverflowWidgets",x[x.folding=38]="folding",x[x.foldingStrategy=39]="foldingStrategy",x[x.foldingHighlight=40]="foldingHighlight",x[x.foldingImportsByDefault=41]="foldingImportsByDefault",x[x.foldingMaximumRegions=42]="foldingMaximumRegions",x[x.unfoldOnClickAfterEndOfLine=43]="unfoldOnClickAfterEndOfLine",x[x.fontFamily=44]="fontFamily",x[x.fontInfo=45]="fontInfo",x[x.fontLigatures=46]="fontLigatures",x[x.fontSize=47]="fontSize",x[x.fontWeight=48]="fontWeight",x[x.formatOnPaste=49]="formatOnPaste",x[x.formatOnType=50]="formatOnType",x[x.glyphMargin=51]="glyphMargin",x[x.gotoLocation=52]="gotoLocation",x[x.hideCursorInOverviewRuler=53]="hideCursorInOverviewRuler",x[x.hover=54]="hover",x[x.inDiffEditor=55]="inDiffEditor",x[x.inlineSuggest=56]="inlineSuggest",x[x.letterSpacing=57]="letterSpacing",x[x.lightbulb=58]="lightbulb",x[x.lineDecorationsWidth=59]="lineDecorationsWidth",x[x.lineHeight=60]="lineHeight",x[x.lineNumbers=61]="lineNumbers",x[x.lineNumbersMinChars=62]="lineNumbersMinChars",x[x.linkedEditing=63]="linkedEditing",x[x.links=64]="links",x[x.matchBrackets=65]="matchBrackets",x[x.minimap=66]="minimap",x[x.mouseStyle=67]="mouseStyle",x[x.mouseWheelScrollSensitivity=68]="mouseWheelScrollSensitivity",x[x.mouseWheelZoom=69]="mouseWheelZoom",x[x.multiCursorMergeOverlapping=70]="multiCursorMergeOverlapping",x[x.multiCursorModifier=71]="multiCursorModifier",x[x.multiCursorPaste=72]="multiCursorPaste",x[x.occurrencesHighlight=73]="occurrencesHighlight",x[x.overviewRulerBorder=74]="overviewRulerBorder",x[x.overviewRulerLanes=75]="overviewRulerLanes",x[x.padding=76]="padding",x[x.parameterHints=77]="parameterHints",x[x.peekWidgetDefaultFocus=78]="peekWidgetDefaultFocus",x[x.definitionLinkOpensInPeek=79]="definitionLinkOpensInPeek",x[x.quickSuggestions=80]="quickSuggestions",x[x.quickSuggestionsDelay=81]="quickSuggestionsDelay",x[x.readOnly=82]="readOnly",x[x.renameOnType=83]="renameOnType",x[x.renderControlCharacters=84]="renderControlCharacters",x[x.renderFinalNewline=85]="renderFinalNewline",x[x.renderLineHighlight=86]="renderLineHighlight",x[x.renderLineHighlightOnlyWhenFocus=87]="renderLineHighlightOnlyWhenFocus",x[x.renderValidationDecorations=88]="renderValidationDecorations",x[x.renderWhitespace=89]="renderWhitespace",x[x.revealHorizontalRightPadding=90]="revealHorizontalRightPadding",x[x.roundedSelection=91]="roundedSelection",x[x.rulers=92]="rulers",x[x.scrollbar=93]="scrollbar",x[x.scrollBeyondLastColumn=94]="scrollBeyondLastColumn",x[x.scrollBeyondLastLine=95]="scrollBeyondLastLine",x[x.scrollPredominantAxis=96]="scrollPredominantAxis",x[x.selectionClipboard=97]="selectionClipboard",x[x.selectionHighlight=98]="selectionHighlight",x[x.selectOnLineNumbers=99]="selectOnLineNumbers",x[x.showFoldingControls=100]="showFoldingControls",x[x.showUnused=101]="showUnused",x[x.snippetSuggestions=102]="snippetSuggestions",x[x.smartSelect=103]="smartSelect",x[x.smoothScrolling=104]="smoothScrolling",x[x.stickyScroll=105]="stickyScroll",x[x.stickyTabStops=106]="stickyTabStops",x[x.stopRenderingLineAfter=107]="stopRenderingLineAfter",x[x.suggest=108]="suggest",x[x.suggestFontSize=109]="suggestFontSize",x[x.suggestLineHeight=110]="suggestLineHeight",x[x.suggestOnTriggerCharacters=111]="suggestOnTriggerCharacters",x[x.suggestSelection=112]="suggestSelection",x[x.tabCompletion=113]="tabCompletion",x[x.tabIndex=114]="tabIndex",x[x.unicodeHighlighting=115]="unicodeHighlighting",x[x.unusualLineTerminators=116]="unusualLineTerminators",x[x.useShadowDOM=117]="useShadowDOM",x[x.useTabStops=118]="useTabStops",x[x.wordSeparators=119]="wordSeparators",x[x.wordWrap=120]="wordWrap",x[x.wordWrapBreakAfterCharacters=121]="wordWrapBreakAfterCharacters",x[x.wordWrapBreakBeforeCharacters=122]="wordWrapBreakBeforeCharacters",x[x.wordWrapColumn=123]="wordWrapColumn",x[x.wordWrapOverride1=124]="wordWrapOverride1",x[x.wordWrapOverride2=125]="wordWrapOverride2",x[x.wrappingIndent=126]="wrappingIndent",x[x.wrappingStrategy=127]="wrappingStrategy",x[x.showDeprecated=128]="showDeprecated",x[x.inlayHints=129]="inlayHints",x[x.editorClassName=130]="editorClassName",x[x.pixelRatio=131]="pixelRatio",x[x.tabFocusMode=132]="tabFocusMode",x[x.layoutInfo=133]="layoutInfo",x[x.wrappingInfo=134]="wrappingInfo"})(u=e.EditorOption||(e.EditorOption={}));var i;(function(x){x[x.TextDefined=0]="TextDefined",x[x.LF=1]="LF",x[x.CRLF=2]="CRLF"})(i=e.EndOfLinePreference||(e.EndOfLinePreference={}));var f;(function(x){x[x.LF=0]="LF",x[x.CRLF=1]="CRLF"})(f=e.EndOfLineSequence||(e.EndOfLineSequence={}));var c;(function(x){x[x.None=0]="None",x[x.Indent=1]="Indent",x[x.IndentOutdent=2]="IndentOutdent",x[x.Outdent=3]="Outdent"})(c=e.IndentAction||(e.IndentAction={}));var l;(function(x){x[x.Both=0]="Both",x[x.Right=1]="Right",x[x.Left=2]="Left",x[x.None=3]="None"})(l=e.InjectedTextCursorStops||(e.InjectedTextCursorStops={}));var s;(function(x){x[x.Type=1]="Type",x[x.Parameter=2]="Parameter"})(s=e.InlayHintKind||(e.InlayHintKind={}));var d;(function(x){x[x.Automatic=0]="Automatic",x[x.Explicit=1]="Explicit"})(d=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var n;(function(x){x[x.DependsOnKbLayout=-1]="DependsOnKbLayout",x[x.Unknown=0]="Unknown",x[x.Backspace=1]="Backspace",x[x.Tab=2]="Tab",x[x.Enter=3]="Enter",x[x.Shift=4]="Shift",x[x.Ctrl=5]="Ctrl",x[x.Alt=6]="Alt",x[x.PauseBreak=7]="PauseBreak",x[x.CapsLock=8]="CapsLock",x[x.Escape=9]="Escape",x[x.Space=10]="Space",x[x.PageUp=11]="PageUp",x[x.PageDown=12]="PageDown",x[x.End=13]="End",x[x.Home=14]="Home",x[x.LeftArrow=15]="LeftArrow",x[x.UpArrow=16]="UpArrow",x[x.RightArrow=17]="RightArrow",x[x.DownArrow=18]="DownArrow",x[x.Insert=19]="Insert",x[x.Delete=20]="Delete",x[x.Digit0=21]="Digit0",x[x.Digit1=22]="Digit1",x[x.Digit2=23]="Digit2",x[x.Digit3=24]="Digit3",x[x.Digit4=25]="Digit4",x[x.Digit5=26]="Digit5",x[x.Digit6=27]="Digit6",x[x.Digit7=28]="Digit7",x[x.Digit8=29]="Digit8",x[x.Digit9=30]="Digit9",x[x.KeyA=31]="KeyA",x[x.KeyB=32]="KeyB",x[x.KeyC=33]="KeyC",x[x.KeyD=34]="KeyD",x[x.KeyE=35]="KeyE",x[x.KeyF=36]="KeyF",x[x.KeyG=37]="KeyG",x[x.KeyH=38]="KeyH",x[x.KeyI=39]="KeyI",x[x.KeyJ=40]="KeyJ",x[x.KeyK=41]="KeyK",x[x.KeyL=42]="KeyL",x[x.KeyM=43]="KeyM",x[x.KeyN=44]="KeyN",x[x.KeyO=45]="KeyO",x[x.KeyP=46]="KeyP",x[x.KeyQ=47]="KeyQ",x[x.KeyR=48]="KeyR",x[x.KeyS=49]="KeyS",x[x.KeyT=50]="KeyT",x[x.KeyU=51]="KeyU",x[x.KeyV=52]="KeyV",x[x.KeyW=53]="KeyW",x[x.KeyX=54]="KeyX",x[x.KeyY=55]="KeyY",x[x.KeyZ=56]="KeyZ",x[x.Meta=57]="Meta",x[x.ContextMenu=58]="ContextMenu",x[x.F1=59]="F1",x[x.F2=60]="F2",x[x.F3=61]="F3",x[x.F4=62]="F4",x[x.F5=63]="F5",x[x.F6=64]="F6",x[x.F7=65]="F7",x[x.F8=66]="F8",x[x.F9=67]="F9",x[x.F10=68]="F10",x[x.F11=69]="F11",x[x.F12=70]="F12",x[x.F13=71]="F13",x[x.F14=72]="F14",x[x.F15=73]="F15",x[x.F16=74]="F16",x[x.F17=75]="F17",x[x.F18=76]="F18",x[x.F19=77]="F19",x[x.NumLock=78]="NumLock",x[x.ScrollLock=79]="ScrollLock",x[x.Semicolon=80]="Semicolon",x[x.Equal=81]="Equal",x[x.Comma=82]="Comma",x[x.Minus=83]="Minus",x[x.Period=84]="Period",x[x.Slash=85]="Slash",x[x.Backquote=86]="Backquote",x[x.BracketLeft=87]="BracketLeft",x[x.Backslash=88]="Backslash",x[x.BracketRight=89]="BracketRight",x[x.Quote=90]="Quote",x[x.OEM_8=91]="OEM_8",x[x.IntlBackslash=92]="IntlBackslash",x[x.Numpad0=93]="Numpad0",x[x.Numpad1=94]="Numpad1",x[x.Numpad2=95]="Numpad2",x[x.Numpad3=96]="Numpad3",x[x.Numpad4=97]="Numpad4",x[x.Numpad5=98]="Numpad5",x[x.Numpad6=99]="Numpad6",x[x.Numpad7=100]="Numpad7",x[x.Numpad8=101]="Numpad8",x[x.Numpad9=102]="Numpad9",x[x.NumpadMultiply=103]="NumpadMultiply",x[x.NumpadAdd=104]="NumpadAdd",x[x.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",x[x.NumpadSubtract=106]="NumpadSubtract",x[x.NumpadDecimal=107]="NumpadDecimal",x[x.NumpadDivide=108]="NumpadDivide",x[x.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",x[x.ABNT_C1=110]="ABNT_C1",x[x.ABNT_C2=111]="ABNT_C2",x[x.AudioVolumeMute=112]="AudioVolumeMute",x[x.AudioVolumeUp=113]="AudioVolumeUp",x[x.AudioVolumeDown=114]="AudioVolumeDown",x[x.BrowserSearch=115]="BrowserSearch",x[x.BrowserHome=116]="BrowserHome",x[x.BrowserBack=117]="BrowserBack",x[x.BrowserForward=118]="BrowserForward",x[x.MediaTrackNext=119]="MediaTrackNext",x[x.MediaTrackPrevious=120]="MediaTrackPrevious",x[x.MediaStop=121]="MediaStop",x[x.MediaPlayPause=122]="MediaPlayPause",x[x.LaunchMediaPlayer=123]="LaunchMediaPlayer",x[x.LaunchMail=124]="LaunchMail",x[x.LaunchApp2=125]="LaunchApp2",x[x.Clear=126]="Clear",x[x.MAX_VALUE=127]="MAX_VALUE"})(n=e.KeyCode||(e.KeyCode={}));var a;(function(x){x[x.Hint=1]="Hint",x[x.Info=2]="Info",x[x.Warning=4]="Warning",x[x.Error=8]="Error"})(a=e.MarkerSeverity||(e.MarkerSeverity={}));var o;(function(x){x[x.Unnecessary=1]="Unnecessary",x[x.Deprecated=2]="Deprecated"})(o=e.MarkerTag||(e.MarkerTag={}));var g;(function(x){x[x.Inline=1]="Inline",x[x.Gutter=2]="Gutter"})(g=e.MinimapPosition||(e.MinimapPosition={}));var h;(function(x){x[x.UNKNOWN=0]="UNKNOWN",x[x.TEXTAREA=1]="TEXTAREA",x[x.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",x[x.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",x[x.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",x[x.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",x[x.CONTENT_TEXT=6]="CONTENT_TEXT",x[x.CONTENT_EMPTY=7]="CONTENT_EMPTY",x[x.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",x[x.CONTENT_WIDGET=9]="CONTENT_WIDGET",x[x.OVERVIEW_RULER=10]="OVERVIEW_RULER",x[x.SCROLLBAR=11]="SCROLLBAR",x[x.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",x[x.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(h=e.MouseTargetType||(e.MouseTargetType={}));var v;(function(x){x[x.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",x[x.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",x[x.TOP_CENTER=2]="TOP_CENTER"})(v=e.OverlayWidgetPositionPreference||(e.OverlayWidgetPositionPreference={}));var m;(function(x){x[x.Left=1]="Left",x[x.Center=2]="Center",x[x.Right=4]="Right",x[x.Full=7]="Full"})(m=e.OverviewRulerLane||(e.OverviewRulerLane={}));var w;(function(x){x[x.Left=0]="Left",x[x.Right=1]="Right",x[x.None=2]="None",x[x.LeftOfInjectedText=3]="LeftOfInjectedText",x[x.RightOfInjectedText=4]="RightOfInjectedText"})(w=e.PositionAffinity||(e.PositionAffinity={}));var D;(function(x){x[x.Off=0]="Off",x[x.On=1]="On",x[x.Relative=2]="Relative",x[x.Interval=3]="Interval",x[x.Custom=4]="Custom"})(D=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));var y;(function(x){x[x.None=0]="None",x[x.Text=1]="Text",x[x.Blocks=2]="Blocks"})(y=e.RenderMinimap||(e.RenderMinimap={}));var T;(function(x){x[x.Smooth=0]="Smooth",x[x.Immediate=1]="Immediate"})(T=e.ScrollType||(e.ScrollType={}));var _;(function(x){x[x.Auto=1]="Auto",x[x.Hidden=2]="Hidden",x[x.Visible=3]="Visible"})(_=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));var L;(function(x){x[x.LTR=0]="LTR",x[x.RTL=1]="RTL"})(L=e.SelectionDirection||(e.SelectionDirection={}));var M;(function(x){x[x.Invoke=1]="Invoke",x[x.TriggerCharacter=2]="TriggerCharacter",x[x.ContentChange=3]="ContentChange"})(M=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var O;(function(x){x[x.File=0]="File",x[x.Module=1]="Module",x[x.Namespace=2]="Namespace",x[x.Package=3]="Package",x[x.Class=4]="Class",x[x.Method=5]="Method",x[x.Property=6]="Property",x[x.Field=7]="Field",x[x.Constructor=8]="Constructor",x[x.Enum=9]="Enum",x[x.Interface=10]="Interface",x[x.Function=11]="Function",x[x.Variable=12]="Variable",x[x.Constant=13]="Constant",x[x.String=14]="String",x[x.Number=15]="Number",x[x.Boolean=16]="Boolean",x[x.Array=17]="Array",x[x.Object=18]="Object",x[x.Key=19]="Key",x[x.Null=20]="Null",x[x.EnumMember=21]="EnumMember",x[x.Struct=22]="Struct",x[x.Event=23]="Event",x[x.Operator=24]="Operator",x[x.TypeParameter=25]="TypeParameter"})(O=e.SymbolKind||(e.SymbolKind={}));var N;(function(x){x[x.Deprecated=1]="Deprecated"})(N=e.SymbolTag||(e.SymbolTag={}));var P;(function(x){x[x.Hidden=0]="Hidden",x[x.Blink=1]="Blink",x[x.Smooth=2]="Smooth",x[x.Phase=3]="Phase",x[x.Expand=4]="Expand",x[x.Solid=5]="Solid"})(P=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));var B;(function(x){x[x.Line=1]="Line",x[x.Block=2]="Block",x[x.Underline=3]="Underline",x[x.LineThin=4]="LineThin",x[x.BlockOutline=5]="BlockOutline",x[x.UnderlineThin=6]="UnderlineThin"})(B=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));var V;(function(x){x[x.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",x[x.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",x[x.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",x[x.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(V=e.TrackedRangeStickiness||(e.TrackedRangeStickiness={}));var z;(function(x){x[x.None=0]="None",x[x.Same=1]="Same",x[x.Indent=2]="Indent",x[x.DeepIndent=3]="DeepIndent"})(z=e.WrappingIndent||(e.WrappingIndent={}))}),define(ae[1209],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class t{constructor(k,E,I,b){this.range=k,this.nestingLevel=E,this.nestingLevelOfEqualBracketType=I,this.isInvalid=b}}e.BracketInfo=t;class p{constructor(k,E,I,b,S,C){this.range=k,this.openingBracketRange=E,this.closingBracketRange=I,this.nestingLevel=b,this.nestingLevelOfEqualBracketType=S,this.bracketPairNode=C}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}get closingBracketInfo(){return this.bracketPairNode.closingBracket?.bracketInfo}}e.BracketPairInfo=p;class R extends p{constructor(k,E,I,b,S,C,r){super(k,E,I,b,S,C),this.minVisibleColumnIndentation=r}}e.BracketPairWithMinIndentationInfo=R}),define(ae[326],le([1,0]),function(J,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(r){r[r.Flush=1]="Flush",r[r.LineChanged=2]="LineChanged",r[r.LinesDeleted=3]="LinesDeleted",r[r.LinesInserted=4]="LinesInserted",r[r.EOLChanged=5]="EOLChanged"})(t=e.RawContentChangedType||(e.RawContentChangedType={}));class p{constructor(){this.changeType=1}}e.ModelRawFlush=p;class R{static applyInjectedText(u,i){if(!i||i.length===0)return u;let f="",c=0;for(const l of i)f+=u.substring(c,l.column-1),c=l.column-1,f+=l.options.content;return f+=u.substring(c),f}static fromDecorations(u){const i=[];for(const f of u)f.options.before&&f.options.before.content.length>0&&i.push(new R(f.ownerId,f.range.startLineNumber,f.range.startColumn,f.options.before,0)),f.options.after&&f.options.after.content.length>0&&i.push(new R(f.ownerId,f.range.endLineNumber,f.range.endColumn,f.options.after,1));return i.sort((f,c)=>f.lineNumber===c.lineNumber?f.column===c.column?f.order-c.order:f.column-c.column:f.lineNumber-c.lineNumber),i}constructor(u,i,f,c,l){this.ownerId=u,this.lineNumber=i,this.column=f,this.options=c,this.order=l}withText(u){return new R(this.ownerId,this.lineNumber,this.column,{...this.options,content:u},this.order)}}e.LineInjectedText=R;class A{constructor(u,i,f){this.changeType=2,this.lineNumber=u,this.detail=i,this.injectedText=f}}e.ModelRawLineChanged=A;class k{constructor(u,i){this.changeType=3,this.fromLineNumber=u,this.toLineNumber=i}}e.ModelRawLinesDeleted=k;class E{constructor(u,i,f,c){this.changeType=4,this.injectedTexts=c,this.fromLineNumber=u,this.toLineNumber=i,this.detail=f}}e.ModelRawLinesInserted=E;class I{constructor(){this.changeType=5}}e.ModelRawEOLChanged=I;class b{constructor(u,i,f,c){this.changes=u,this.versionId=i,this.isUndoing=f,this.isRedoing=c,this.resultingSelection=null}containsEvent(u){for(let i=0,f=this.changes.length;i<f;i++)if(this.changes[i].changeType===u)return!0;return!1}static merge(u,i){const f=[].concat(u.changes).concat(i.changes),c=i.versionId,l=u.isUndoing||i.isUndoing,s=u.isRedoing||i.isRedoing;return new b(f,c,l,s)}}e.ModelRawContentChangedEvent=b;class S{constructor(u){this.changes=u}}e.ModelInjectedTextChangedEvent=S;class C{constructor(u,i){this.rawContentChangedEvent=u,this.contentChangedEvent=i}merge(u){const i=b.merge(this.rawContentChangedEvent,u.rawContentChangedEvent),f=C._mergeChangeEvents(this.contentChangedEvent,u.contentChangedEvent);return new C(i,f)}static _mergeChangeEvents(u,i){const f=[].concat(u.changes).concat(i.changes),c=i.eol,l=i.versionId,s=u.isUndoing||i.isUndoing,d=u.isRedoing||i.isRedoing,n=u.isFlush||i.isFlush;return{changes:f,eol:c,versionId:l,isUndoing:s,isRedoing:d,isFlush:n}}}e.InternalModelContentChangeEvent=C}),define(ae[568],le([1,0]),function(J,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 p{constructor(k,E,I,b,S,C){if(this.visibleColumn=k,this.column=E,this.className=I,this.horizontalLine=b,this.forWrappedLinesAfterColumn=S,this.forWrappedLinesBeforeOrAtColumn=C,k!==-1==(E!==-1))throw new Error}}e.IndentGuide=p;class R{constructor(k,E){this.top=k,this.endColumn=E}}e.IndentGuideHorizontalLine=R}),define(ae[301],le([1,0,325]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class p{static createEmpty(k,E){const I=p.defaultTokenMetadata,b=new Uint32Array(2);return b[0]=k.length,b[1]=I,new p(b,k,E)}constructor(k,E,I){this._lineTokensBrand=void 0,this._tokens=k,this._tokensCount=this._tokens.length>>>1,this._text=E,this._languageIdCodec=I}equals(k){return k instanceof p?this.slicedEquals(k,0,this._tokensCount):!1}slicedEquals(k,E,I){if(this._text!==k._text||this._tokensCount!==k._tokensCount)return!1;const b=E<<1,S=b+(I<<1);for(let C=b;C<S;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 E=this._tokens[(k<<1)+1],I=t.TokenMetadata.getLanguageId(E);return this._languageIdCodec.decodeLanguageId(I)}getStandardTokenType(k){const E=this._tokens[(k<<1)+1];return t.TokenMetadata.getTokenType(E)}getForeground(k){const E=this._tokens[(k<<1)+1];return t.TokenMetadata.getForeground(E)}getClassName(k){const E=this._tokens[(k<<1)+1];return t.TokenMetadata.getClassNameFromMetadata(E)}getInlineStyle(k,E){const I=this._tokens[(k<<1)+1];return t.TokenMetadata.getInlineStyleFromMetadata(I,E)}getPresentation(k){const E=this._tokens[(k<<1)+1];return t.TokenMetadata.getPresentationFromMetadata(E)}getEndOffset(k){return this._tokens[k<<1]}findTokenIndexAtOffset(k){return p.findIndexInTokensArray(this._tokens,k)}inflate(){return this}sliceAndInflate(k,E,I){return new R(this,k,E,I)}static convertToEndOffset(k,E){const b=(k.length>>>1)-1;for(let S=0;S<b;S++)k[S<<1]=k[S+1<<1];k[b<<1]=E}static findIndexInTokensArray(k,E){if(k.length<=2)return 0;let I=0,b=(k.length>>>1)-1;for(;I<b;){const S=I+Math.floor((b-I)/2),C=k[S<<1];if(C===E)return S+1;C<E?I=S+1:C>E&&(b=S)}return I}withInserted(k){if(k.length===0)return this;let E=0,I=0,b="";const S=new Array;let C=0;for(;;){const r=E<this._tokensCount?this._tokens[E<<1]:-1,u=I<k.length?k[I]:null;if(r!==-1&&(u===null||r<=u.offset)){b+=this._text.substring(C,r);const i=this._tokens[(E<<1)+1];S.push(b.length,i),E++,C=r}else if(u){if(u.offset>C){b+=this._text.substring(C,u.offset);const i=this._tokens[(E<<1)+1];S.push(b.length,i),C=u.offset}b+=u.text,S.push(b.length,u.tokenMetadata),I++}else break}return new p(new Uint32Array(S),b,this._languageIdCodec)}}e.LineTokens=p,p.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;class R{constructor(k,E,I,b){this._source=k,this._startOffset=E,this._endOffset=I,this._deltaOffset=b,this._firstTokenIndex=k.findTokenIndexAtOffset(E),this._tokensCount=0;for(let S=this._firstTokenIndex,C=k.getCount();S<C&&!(k.getStartOffset(S)>=I);S++)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 R?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 E=this._source.getEndOffset(this._firstTokenIndex+k);return Math.min(this._endOffset,E)-this._startOffset+this._deltaOffset}getClassName(k){return this._source.getClassName(this._firstTokenIndex+k)}getInlineStyle(k,E){return this._source.getInlineStyle(this._firstTokenIndex+k,E)}getPresentation(k){return this._source.getPresentation(this._firstTokenIndex+k)}findTokenIndexAtOffset(k){return this._source.findTokenIndexAtOffset(k+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(ae[733],le([1,0,301]),function(J,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 p{static deleteBeginning(k,E){return k===null||k===e.EMPTY_LINE_TOKENS?k:p.delete(k,0,E)}static deleteEnding(k,E){if(k===null||k===e.EMPTY_LINE_TOKENS)return k;const I=R(k),b=I[I.length-2];return p.delete(k,E,b)}static delete(k,E,I){if(k===null||k===e.EMPTY_LINE_TOKENS||E===I)return k;const b=R(k),S=b.length>>>1;if(E===0&&b[b.length-2]===I)return e.EMPTY_LINE_TOKENS;const C=t.LineTokens.findIndexInTokensArray(b,E),r=C>0?b[C-1<<1]:0,u=b[C<<1];if(I<u){const s=I-E;for(let d=C;d<S;d++)b[d<<1]-=s;return k}let i,f;r!==E?(b[C<<1]=E,i=C+1<<1,f=E):(i=C<<1,f=r);const c=I-E;for(let s=C+1;s<S;s++){const d=b[s<<1]-c;d>f&&(b[i++]=d,b[i++]=b[(s<<1)+1],f=d)}if(i===b.length)return k;const l=new Uint32Array(i);return l.set(b.subarray(0,i),0),l.buffer}static append(k,E){if(E===e.EMPTY_LINE_TOKENS)return k;if(k===e.EMPTY_LINE_TOKENS)return E;if(k===null)return k;if(E===null)return null;const I=R(k),b=R(E),S=b.length>>>1,C=new Uint32Array(I.length+b.length);C.set(I,0);let r=I.length;const u=I[I.length-2];for(let i=0;i<S;i++)C[r++]=b[i<<1]+u,C[r++]=b[(i<<1)+1];return C.buffer}static insert(k,E,I){if(k===null||k===e.EMPTY_LINE_TOKENS)return k;const b=R(k),S=b.length>>>1;let C=t.LineTokens.findIndexInTokensArray(b,E);C>0&&b[C-1<<1]===E&&C--;for(let r=C;r<S;r++)b[r<<1]+=I;return k}}e.ContiguousTokensEditing=p;function R(A){return A instanceof Uint32Array?A:new Uint32Array(A)}e.toUint32Array=R}),define(ae[1210],le([1,0,16,56,50,360,733]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class E{static deserialize(b,S,C){const r=new Uint32Array(b.buffer),u=(0,p.readUInt32BE)(b,S);S+=4;const i=(0,p.readUInt32BE)(b,S);S+=4;const f=[];for(let c=0;c<i;c++){const l=(0,p.readUInt32BE)(b,S);S+=4,f.push(r.subarray(S/4,S/4+l/4)),S+=l}return C.push(new E(u,f)),S}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(b,S){this._startLineNumber=b,this._tokens=S}getLineTokens(b){return this._tokens[b-this._startLineNumber]}appendLineTokens(b){this._tokens.push(b)}serializeSize(){let b=0;b+=4,b+=4;for(let S=0;S<this._tokens.length;S++){const C=this._tokens[S];if(!(C instanceof Uint32Array))throw new Error("Not supported!");b+=4,b+=C.byteLength}return b}serialize(b,S){(0,p.writeUInt32BE)(b,this._startLineNumber,S),S+=4,(0,p.writeUInt32BE)(b,this._tokens.length,S),S+=4;for(let C=0;C<this._tokens.length;C++){const r=this._tokens[C];if(!(r instanceof Uint32Array))throw new Error("Not supported!");(0,p.writeUInt32BE)(b,r.byteLength,S),S+=4,b.set(new Uint8Array(r.buffer),S),S+=r.byteLength}return S}applyEdit(b,S){const[C,r]=(0,A.countEOL)(S);this._acceptDeleteRange(b),this._acceptInsertText(new R.Position(b.startLineNumber,b.startColumn),C,r)}_acceptDeleteRange(b){if(b.startLineNumber===b.endLineNumber&&b.startColumn===b.endColumn)return;const S=b.startLineNumber-this._startLineNumber,C=b.endLineNumber-this._startLineNumber;if(C<0){const r=C-S;this._startLineNumber-=r;return}if(!(S>=this._tokens.length)){if(S<0&&C>=this._tokens.length){this._startLineNumber=0,this._tokens=[];return}if(S===C){this._tokens[S]=k.ContiguousTokensEditing.delete(this._tokens[S],b.startColumn-1,b.endColumn-1);return}if(S>=0)if(this._tokens[S]=k.ContiguousTokensEditing.deleteEnding(this._tokens[S],b.startColumn-1),C<this._tokens.length){const r=k.ContiguousTokensEditing.deleteBeginning(this._tokens[C],b.endColumn-1);this._tokens[S]=k.ContiguousTokensEditing.append(this._tokens[S],r),this._tokens.splice(S+1,C-S)}else this._tokens[S]=k.ContiguousTokensEditing.append(this._tokens[S],null),this._tokens=this._tokens.slice(0,S+1);else{const r=-S;this._startLineNumber-=r,this._tokens[C]=k.ContiguousTokensEditing.deleteBeginning(this._tokens[C],b.endColumn-1),this._tokens=this._tokens.slice(C)}}}_acceptInsertText(b,S,C){if(S===0&&C===0)return;const r=b.lineNumber-this._startLineNumber;if(r<0){this._startLineNumber+=S;return}if(!(r>=this._tokens.length)){if(S===0){this._tokens[r]=k.ContiguousTokensEditing.insert(this._tokens[r],b.column-1,C);return}this._tokens[r]=k.ContiguousTokensEditing.deleteEnding(this._tokens[r],b.column-1),this._tokens[r]=k.ContiguousTokensEditing.insert(this._tokens[r],b.column-1,C),this._insertLines(b.lineNumber,S)}}_insertLines(b,S){if(S===0)return;const C=[];for(let r=0;r<S;r++)C[r]=null;this._tokens=t.arrayInsert(this._tokens,b,C)}}e.ContiguousMultilineTokens=E}),define(ae[734],le([1,0,56,1210]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class R{static deserialize(k){let E=0;const I=(0,t.readUInt32BE)(k,E);E+=4;const b=[];for(let S=0;S<I;S++)E=p.ContiguousMultilineTokens.deserialize(k,E,b);return b}constructor(){this._tokens=[]}add(k,E){if(this._tokens.length>0){const I=this._tokens[this._tokens.length-1];if(I.endLineNumber+1===k){I.appendLineTokens(E);return}}this._tokens.push(new p.ContiguousMultilineTokens(k,[E]))}finalize(){return this._tokens}serialize(){const k=this._serializeSize(),E=new Uint8Array(k);return this._serialize(E),E}_serializeSize(){let k=0;k+=4;for(let E=0;E<this._tokens.length;E++)k+=this._tokens[E].serializeSize();return k}_serialize(k){let E=0;(0,t.writeUInt32BE)(k,this._tokens.length,E),E+=4;for(let I=0;I<this._tokens.length;I++)E=this._tokens[I].serialize(k,E)}}e.ContiguousMultilineTokensBuilder=R}),define(ae[1211],le([1,0,16,50,733,301,325]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousTokensStore=void 0;class E{constructor(S){this._lineTokens=[],this._len=0,this._languageIdCodec=S}flush(){this._lineTokens=[],this._len=0}getTokens(S,C,r){let u=null;if(C<this._len&&(u=this._lineTokens[C]),u!==null&&u!==R.EMPTY_LINE_TOKENS)return new A.LineTokens((0,R.toUint32Array)(u),r,this._languageIdCodec);const i=new Uint32Array(2);return i[0]=r.length,i[1]=I(this._languageIdCodec.encodeLanguageId(S)),new A.LineTokens(i,r,this._languageIdCodec)}static _massageTokens(S,C,r){const u=r?(0,R.toUint32Array)(r):null;if(C===0){let i=!1;if(u&&u.length>1&&(i=k.TokenMetadata.getLanguageId(u[1])!==S),!i)return R.EMPTY_LINE_TOKENS}if(!u||u.length===0){const i=new Uint32Array(2);return i[0]=C,i[1]=I(S),i.buffer}return u[u.length-2]=C,u.byteOffset===0&&u.byteLength===u.buffer.byteLength?u.buffer:u}_ensureLine(S){for(;S>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(S,C){C!==0&&(S+C>this._len&&(C=this._len-S),this._lineTokens.splice(S,C),this._len-=C)}_insertLines(S,C){if(C===0)return;const r=[];for(let u=0;u<C;u++)r[u]=null;this._lineTokens=t.arrayInsert(this._lineTokens,S,r),this._len+=C}setTokens(S,C,r,u,i){const f=E._massageTokens(this._languageIdCodec.encodeLanguageId(S),r,u);this._ensureLine(C);const c=this._lineTokens[C];return this._lineTokens[C]=f,i?!E._equals(c,f):!1}static _equals(S,C){if(!S||!C)return!S&&!C;const r=(0,R.toUint32Array)(S),u=(0,R.toUint32Array)(C);if(r.length!==u.length)return!1;for(let i=0,f=r.length;i<f;i++)if(r[i]!==u[i])return!1;return!0}acceptEdit(S,C,r){this._acceptDeleteRange(S),this._acceptInsertText(new p.Position(S.startLineNumber,S.startColumn),C,r)}_acceptDeleteRange(S){const C=S.startLineNumber-1;if(C>=this._len)return;if(S.startLineNumber===S.endLineNumber){if(S.startColumn===S.endColumn)return;this._lineTokens[C]=R.ContiguousTokensEditing.delete(this._lineTokens[C],S.startColumn-1,S.endColumn-1);return}this._lineTokens[C]=R.ContiguousTokensEditing.deleteEnding(this._lineTokens[C],S.startColumn-1);const r=S.endLineNumber-1;let u=null;r<this._len&&(u=R.ContiguousTokensEditing.deleteBeginning(this._lineTokens[r],S.endColumn-1)),this._lineTokens[C]=R.ContiguousTokensEditing.append(this._lineTokens[C],u),this._deleteLines(S.startLineNumber,S.endLineNumber-S.startLineNumber)}_acceptInsertText(S,C,r){if(C===0&&r===0)return;const u=S.lineNumber-1;if(!(u>=this._len)){if(C===0){this._lineTokens[u]=R.ContiguousTokensEditing.insert(this._lineTokens[u],S.column-1,r);return}this._lineTokens[u]=R.ContiguousTokensEditing.deleteEnding(this._lineTokens[u],S.column-1),this._lineTokens[u]=R.ContiguousTokensEditing.insert(this._lineTokens[u],S.column-1,r),this._insertLines(S.lineNumber,C)}}}e.ContiguousTokensStore=E;function I(b){return(b<<0|0<<8|0<<11|1<<15|2<<24|1024)>>>0}}),define(ae[1212],le([1,0,50,20,360]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class A{static create(b,S){return new A(b,new k(S))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(b,S){this._startLineNumber=b,this._tokens=S,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(b){return this._startLineNumber<=b&&b<=this._endLineNumber?this._tokens.getLineTokens(b-this._startLineNumber):null}getRange(){const b=this._tokens.getRange();return b&&new p.Range(this._startLineNumber+b.startLineNumber,b.startColumn,this._startLineNumber+b.endLineNumber,b.endColumn)}removeTokens(b){const S=b.startLineNumber-this._startLineNumber,C=b.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(S,b.startColumn-1,C,b.endColumn-1),this._updateEndLineNumber()}split(b){const S=b.startLineNumber-this._startLineNumber,C=b.endLineNumber-this._startLineNumber,[r,u,i]=this._tokens.split(S,b.startColumn-1,C,b.endColumn-1);return[new A(this._startLineNumber,r),new A(this._startLineNumber+i,u)]}applyEdit(b,S){const[C,r,u]=(0,R.countEOL)(S);this.acceptEdit(b,C,r,u,S.length>0?S.charCodeAt(0):0)}acceptEdit(b,S,C,r,u){this._acceptDeleteRange(b),this._acceptInsertText(new t.Position(b.startLineNumber,b.startColumn),S,C,r,u),this._updateEndLineNumber()}_acceptDeleteRange(b){if(b.startLineNumber===b.endLineNumber&&b.startColumn===b.endColumn)return;const S=b.startLineNumber-this._startLineNumber,C=b.endLineNumber-this._startLineNumber;if(C<0){const u=C-S;this._startLineNumber-=u;return}const r=this._tokens.getMaxDeltaLine();if(!(S>=r+1)){if(S<0&&C>=r+1){this._startLineNumber=0,this._tokens.clear();return}if(S<0){const u=-S;this._startLineNumber-=u,this._tokens.acceptDeleteRange(b.startColumn-1,0,0,C,b.endColumn-1)}else this._tokens.acceptDeleteRange(0,S,b.startColumn-1,C,b.endColumn-1)}}_acceptInsertText(b,S,C,r,u){if(S===0&&C===0)return;const i=b.lineNumber-this._startLineNumber;if(i<0){this._startLineNumber+=S;return}const f=this._tokens.getMaxDeltaLine();i>=f+1||this._tokens.acceptInsertText(i,b.column-1,S,C,r,u)}}e.SparseMultilineTokens=A;class k{constructor(b){this._tokens=b,this._tokenCount=b.length/4}toString(b){const S=[];for(let C=0;C<this._tokenCount;C++)S.push(`(${this._getDeltaLine(C)+b},${this._getStartCharacter(C)}-${this._getEndCharacter(C)})`);return`[${S.join(",")}]`}getMaxDeltaLine(){const b=this._getTokenCount();return b===0?-1:this._getDeltaLine(b-1)}getRange(){const b=this._getTokenCount();if(b===0)return null;const S=this._getStartCharacter(0),C=this._getDeltaLine(b-1),r=this._getEndCharacter(b-1);return new p.Range(0,S+1,C,r+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(b){return this._tokens[4*b]}_getStartCharacter(b){return this._tokens[4*b+1]}_getEndCharacter(b){return this._tokens[4*b+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(b){let S=0,C=this._getTokenCount()-1;for(;S<C;){const r=S+Math.floor((C-S)/2),u=this._getDeltaLine(r);if(u<b)S=r+1;else if(u>b)C=r-1;else{let i=r;for(;i>S&&this._getDeltaLine(i-1)===b;)i--;let f=r;for(;f<C&&this._getDeltaLine(f+1)===b;)f++;return new E(this._tokens.subarray(4*i,4*f+4))}}return this._getDeltaLine(S)===b?new E(this._tokens.subarray(4*S,4*S+4)):null}clear(){this._tokenCount=0}removeTokens(b,S,C,r){const u=this._tokens,i=this._tokenCount;let f=0,c=!1,l=0;for(let s=0;s<i;s++){const d=4*s,n=u[d],a=u[d+1],o=u[d+2],g=u[d+3];if((n>b||n===b&&o>=S)&&(n<C||n===C&&a<=r))c=!0;else{if(f===0&&(l=n),c){const h=4*f;u[h]=n-l,u[h+1]=a,u[h+2]=o,u[h+3]=g}f++}}return this._tokenCount=f,l}split(b,S,C,r){const u=this._tokens,i=this._tokenCount,f=[],c=[];let l=f,s=0,d=0;for(let n=0;n<i;n++){const a=4*n,o=u[a],g=u[a+1],h=u[a+2],v=u[a+3];if(o>b||o===b&&h>=S){if(o<C||o===C&&g<=r)continue;l!==c&&(l=c,s=0,d=o)}l[s++]=o-d,l[s++]=g,l[s++]=h,l[s++]=v}return[new k(new Uint32Array(f)),new k(new Uint32Array(c)),d]}acceptDeleteRange(b,S,C,r,u){const i=this._tokens,f=this._tokenCount,c=r-S;let l=0,s=!1;for(let d=0;d<f;d++){const n=4*d;let a=i[n],o=i[n+1],g=i[n+2];const h=i[n+3];if(a<S||a===S&&g<=C){l++;continue}else if(a===S&&o<C)a===r&&g>u?g-=u-C:g=C;else if(a===S&&o===C)if(a===r&&g>u)g-=u-C;else{s=!0;continue}else if(a<r||a===r&&o<u)if(a===r&&g>u)a===S?(o=C,g=o+(g-u)):(o=0,g=o+(g-u));else{s=!0;continue}else if(a>r){if(c===0&&!s){l=f;break}a-=c}else if(a===r&&o>=u)b&&a===0&&(o+=b,g+=b),a-=c,o-=u-C,g-=u-C;else throw new Error("Not possible!");const v=4*l;i[v]=a,i[v+1]=o,i[v+2]=g,i[v+3]=h,l++}this._tokenCount=l}acceptInsertText(b,S,C,r,u,i){const f=C===0&&r===1&&(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122),c=this._tokens,l=this._tokenCount;for(let s=0;s<l;s++){const d=4*s;let n=c[d],a=c[d+1],o=c[d+2];if(!(n<b||n===b&&o<S)){if(n===b&&o===S)if(f)o+=1;else continue;else if(n===b&&a<S&&S<o)C===0?o+=r:o=S;else{if(n===b&&a===S&&f)continue;if(n===b)if(n+=C,C===0)a+=r,o+=r;else{const g=o-a;a=u+(a-S),o=a+g}else n+=C}c[d]=n,c[d+1]=a,c[d+2]=o}}}}class E{constructor(b){this._tokens=b}getCount(){return this._tokens.length/4}getStartCharacter(b){return this._tokens[4*b+1]}getEndCharacter(b){return this._tokens[4*b+2]}getMetadata(b){return this._tokens[4*b+3]}}e.SparseLineTokens=E}),define(ae[1213],le([1,0,16,301]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseTokensStore=void 0;class R{constructor(k){this._pieces=[],this._isComplete=!1,this._languageIdCodec=k}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(k,E){this._pieces=k||[],this._isComplete=E}setPartial(k,E){let I=k;if(E.length>0){const S=E[0].getRange(),C=E[E.length-1].getRange();if(!S||!C)return k;I=k.plusRange(S).plusRange(C)}let b=null;for(let S=0,C=this._pieces.length;S<C;S++){const r=this._pieces[S];if(r.endLineNumber<I.startLineNumber)continue;if(r.startLineNumber>I.endLineNumber){b=b||{index:S};break}if(r.removeTokens(I),r.isEmpty()){this._pieces.splice(S,1),S--,C--;continue}if(r.endLineNumber<I.startLineNumber)continue;if(r.startLineNumber>I.endLineNumber){b=b||{index:S};continue}const[u,i]=r.split(I);if(u.isEmpty()){b=b||{index:S};continue}i.isEmpty()||(this._pieces.splice(S,1,u,i),S++,C++,b=b||{index:S})}return b=b||{index:this._pieces.length},E.length>0&&(this._pieces=t.arrayInsert(this._pieces,b.index,E)),I}isComplete(){return this._isComplete}addSparseTokens(k,E){if(E.getLineContent().length===0)return E;const I=this._pieces;if(I.length===0)return E;const b=R._findFirstPieceWithLine(I,k),S=I[b].getLineTokens(k);if(!S)return E;const C=E.getCount(),r=S.getCount();let u=0;const i=[];let f=0,c=0;const l=(s,d)=>{s!==c&&(c=s,i[f++]=s,i[f++]=d)};for(let s=0;s<r;s++){const d=S.getStartCharacter(s),n=S.getEndCharacter(s),a=S.getMetadata(s),o=((a&1?2048:0)|(a&2?4096:0)|(a&4?8192:0)|(a&8?16384:0)|(a&16?16744448:0)|(a&32?4278190080:0))>>>0,g=~o>>>0;for(;u<C&&E.getEndOffset(u)<=d;)l(E.getEndOffset(u),E.getMetadata(u)),u++;for(u<C&&E.getStartOffset(u)<d&&l(d,E.getMetadata(u));u<C&&E.getEndOffset(u)<n;)l(E.getEndOffset(u),E.getMetadata(u)&g|a&o),u++;if(u<C)l(n,E.getMetadata(u)&g|a&o),E.getEndOffset(u)===n&&u++;else{const h=Math.min(Math.max(0,u-1),C-1);l(n,E.getMetadata(h)&g|a&o)}}for(;u<C;)l(E.getEndOffset(u),E.getMetadata(u)),u++;return new p.LineTokens(new Uint32Array(i),E.getLineContent(),this._languageIdCodec)}static _findFirstPieceWithLine(k,E){let I=0,b=k.length-1;for(;I<b;){let S=I+Math.floor((b-I)/2);if(k[S].endLineNumber<E)I=S+1;else if(k[S].startLineNumber>E)b=S-1;else{for(;S>I&&k[S-1].startLineNumber<=E&&E<=k[S-1].endLineNumber;)S--;return S}}return I}acceptEdit(k,E,I,b,S){for(const C of this._pieces)C.acceptEdit(k,E,I,b,S)}}e.SparseTokensStore=R}),define(ae[411],le([1,0,2]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class p 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 E=0,I=A.length;E<I;E++){const b=A[E];switch(b.type){case 0:this.onCompositionStart(b)&&(k=!0);break;case 1:this.onCompositionEnd(b)&&(k=!0);break;case 2:this.onConfigurationChanged(b)&&(k=!0);break;case 3:this.onCursorStateChanged(b)&&(k=!0);break;case 4:this.onDecorationsChanged(b)&&(k=!0);break;case 5:this.onFlushed(b)&&(k=!0);break;case 6:this.onFocusChanged(b)&&(k=!0);break;case 7:this.onLanguageConfigurationChanged(b)&&(k=!0);break;case 8:this.onLineMappingChanged(b)&&(k=!0);break;case 9:this.onLinesChanged(b)&&(k=!0);break;case 10:this.onLinesDeleted(b)&&(k=!0);break;case 11:this.onLinesInserted(b)&&(k=!0);break;case 12:this.onRevealRangeRequest(b)&&(k=!0);break;case 13:this.onScrollChanged(b)&&(k=!0);break;case 15:this.onTokensChanged(b)&&(k=!0);break;case 14:this.onThemeChanged(b)&&(k=!0);break;case 16:this.onTokensColorsChanged(b)&&(k=!0);break;case 17:this.onZonesChanged(b)&&(k=!0);break;default:console.info("View received unknown event: "),console.info(b)}}k&&(this._shouldRender=!0)}}e.ViewEventHandler=p}),define(ae[366],le([1,0,411]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class p extends t.ViewEventHandler{}e.DynamicViewOverlay=p}),define(ae[180],le([1,0,411]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.PartFingerprint=e.ViewPart=void 0;class p extends t.ViewEventHandler{constructor(E){super(),this._context=E,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=p;var R;(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"})(R=e.PartFingerprint||(e.PartFingerprint={}));class A{static write(E,I){E.setAttribute("data-mprt",String(I))}static read(E){const I=E.getAttribute("data-mprt");return I===null?0:parseInt(I,10)}static collect(E,I){const b=[];let S=0;for(;E&&E!==document.body&&E!==I;)E.nodeType===E.ELEMENT_NODE&&(b[S++]=this.read(E)),E=E.parentElement;const C=new Uint8Array(S);for(let r=0;r<S;r++)C[r]=b[S-r-1];return C}}e.PartFingerprints=A}),define(ae[1214],le([1,0,121,180,1057]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockDecorations=void 0;class R extends p.ViewPart{constructor(k){super(k),this.blocks=[],this.contentWidth=-1,this.domNode=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let k=!1;const I=this._context.configuration.options.get(133),b=I.contentWidth-I.verticalScrollbarWidth;return this.contentWidth!==b&&(this.contentWidth=b,k=!0),k}dispose(){super.dispose()}onConfigurationChanged(k){return this.update()}onScrollChanged(k){return k.scrollTopChanged||k.scrollLeftChanged}onDecorationsChanged(k){return!0}onZonesChanged(k){return!0}prepareRender(k){}render(k){let E=0;const I=k.getDecorationsInViewport();for(const b of I){if(!b.options.blockClassName)continue;let S=this.blocks[E];S||(S=this.blocks[E]=(0,t.createFastDomNode)(document.createElement("div")),this.domNode.appendChild(S));let C,r;b.options.blockIsAfterEnd?(C=k.getVerticalOffsetAfterLineNumber(b.range.endLineNumber,!1),r=k.getVerticalOffsetAfterLineNumber(b.range.endLineNumber,!0)):(C=k.getVerticalOffsetForLineNumber(b.range.startLineNumber,!0),r=b.range.isEmpty()?k.getVerticalOffsetForLineNumber(b.range.startLineNumber,!1):k.getVerticalOffsetAfterLineNumber(b.range.endLineNumber,!0)),S.setClassName("blockDecorations-block "+b.options.blockClassName),S.setLeft(k.scrollLeft),S.setWidth(this.contentWidth),S.setTop(C),S.setHeight(r-C),E++}for(let b=E;b<this.blocks.length;b++)this.blocks[b].domNode.remove();this.blocks.length=E}}e.BlockDecorations=R}),define(ae[1215],le([1,0,366,20,408,1059]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverlay=void 0;class A extends t.DynamicViewOverlay{constructor(E){super(),this._context=E;const I=this._context.configuration.options;this._lineHeight=I.get(60),this._typicalHalfwidthCharacterWidth=I.get(45).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(E){const I=this._context.configuration.options;return this._lineHeight=I.get(60),this._typicalHalfwidthCharacterWidth=I.get(45).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(E){return!0}onFlushed(E){return!0}onLinesChanged(E){return!0}onLinesDeleted(E){return!0}onLinesInserted(E){return!0}onScrollChanged(E){return E.scrollTopChanged||E.scrollWidthChanged}onZonesChanged(E){return!0}prepareRender(E){const I=E.getDecorationsInViewport();let b=[],S=0;for(let i=0,f=I.length;i<f;i++){const c=I[i];c.options.className&&(b[S++]=c)}b=b.sort((i,f)=>{if(i.options.zIndex<f.options.zIndex)return-1;if(i.options.zIndex>f.options.zIndex)return 1;const c=i.options.className,l=f.options.className;return c<l?-1:c>l?1:p.Range.compareRangesUsingStarts(i.range,f.range)});const C=E.visibleRange.startLineNumber,r=E.visibleRange.endLineNumber,u=[];for(let i=C;i<=r;i++){const f=i-C;u[f]=""}this._renderWholeLineDecorations(E,b,u),this._renderNormalDecorations(E,b,u),this._renderResult=u}_renderWholeLineDecorations(E,I,b){const S=String(this._lineHeight),C=E.visibleRange.startLineNumber,r=E.visibleRange.endLineNumber;for(let u=0,i=I.length;u<i;u++){const f=I[u];if(!f.options.isWholeLine)continue;const c='<div class="cdr '+f.options.className+'" style="left:0;width:100%;height:'+S+'px;"></div>',l=Math.max(f.range.startLineNumber,C),s=Math.min(f.range.endLineNumber,r);for(let d=l;d<=s;d++){const n=d-C;b[n]+=c}}}_renderNormalDecorations(E,I,b){const S=String(this._lineHeight),C=E.visibleRange.startLineNumber;let r=null,u=!1,i=null;for(let f=0,c=I.length;f<c;f++){const l=I[f];if(l.options.isWholeLine)continue;const s=l.options.className,d=Boolean(l.options.showIfCollapsed);let n=l.range;if(d&&n.endColumn===1&&n.endLineNumber!==n.startLineNumber&&(n=new p.Range(n.startLineNumber,n.startColumn,n.endLineNumber-1,this._context.viewModel.getLineMaxColumn(n.endLineNumber-1))),r===s&&u===d&&p.Range.areIntersectingOrTouching(i,n)){i=p.Range.plusRange(i,n);continue}r!==null&&this._renderNormalDecoration(E,i,r,u,S,C,b),r=s,u=d,i=n}r!==null&&this._renderNormalDecoration(E,i,r,u,S,C,b)}_renderNormalDecoration(E,I,b,S,C,r,u){const i=E.linesVisibleRangesForRange(I,b==="findMatch");if(!!i)for(let f=0,c=i.length;f<c;f++){const l=i[f];if(l.outsideRenderedLine)continue;const s=l.lineNumber-r;if(S&&l.ranges.length===1){const d=l.ranges[0];if(d.width<this._typicalHalfwidthCharacterWidth){const n=Math.round(d.left+d.width/2),a=Math.max(0,Math.round(n-this._typicalHalfwidthCharacterWidth/2));l.ranges[0]=new R.HorizontalRange(a,this._typicalHalfwidthCharacterWidth)}}for(let d=0,n=l.ranges.length;d<n;d++){const a=l.ranges[d],o='<div class="cdr '+b+'" style="left:'+String(a.left)+"px;width:"+String(a.width)+"px;height:"+C+'px;"></div>';u[s]+=o}}}render(E,I){if(!this._renderResult)return"";const b=I-E;return b<0||b>=this._renderResult.length?"":this._renderResult[b]}}e.DecorationsOverlay=A}),define(ae[569],le([1,0,366,1060]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginOverlay=e.DedupOverlay=e.DecorationToRender=void 0;class p{constructor(E,I,b){this._decorationToRenderBrand=void 0,this.startLineNumber=+E,this.endLineNumber=+I,this.className=String(b)}}e.DecorationToRender=p;class R extends t.DynamicViewOverlay{_render(E,I,b){const S=[];for(let u=E;u<=I;u++){const i=u-E;S[i]=[]}if(b.length===0)return S;b.sort((u,i)=>u.className===i.className?u.startLineNumber===i.startLineNumber?u.endLineNumber-i.endLineNumber:u.startLineNumber-i.startLineNumber:u.className<i.className?-1:1);let C=null,r=0;for(let u=0,i=b.length;u<i;u++){const f=b[u],c=f.className;let l=Math.max(f.startLineNumber,E)-E;const s=Math.min(f.endLineNumber,I)-E;C===c?(l=Math.max(r+1,l),r=Math.max(r,s)):(C=c,r=s);for(let d=l;d<=r;d++)S[d].push(C)}return S}}e.DedupOverlay=R;class A extends R{constructor(E){super(),this._context=E;const I=this._context.configuration.options,b=I.get(133);this._lineHeight=I.get(60),this._glyphMargin=I.get(51),this._glyphMarginLeft=b.glyphMarginLeft,this._glyphMarginWidth=b.glyphMarginWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(E){const I=this._context.configuration.options,b=I.get(133);return this._lineHeight=I.get(60),this._glyphMargin=I.get(51),this._glyphMarginLeft=b.glyphMarginLeft,this._glyphMarginWidth=b.glyphMarginWidth,!0}onDecorationsChanged(E){return!0}onFlushed(E){return!0}onLinesChanged(E){return!0}onLinesDeleted(E){return!0}onLinesInserted(E){return!0}onScrollChanged(E){return E.scrollTopChanged}onZonesChanged(E){return!0}_getDecorations(E){const I=E.getDecorationsInViewport(),b=[];let S=0;for(let C=0,r=I.length;C<r;C++){const u=I[C],i=u.options.glyphMarginClassName;i&&(b[S++]=new p(u.range.startLineNumber,u.range.endLineNumber,i))}return b}prepareRender(E){if(!this._glyphMargin){this._renderResult=null;return}const I=E.visibleRange.startLineNumber,b=E.visibleRange.endLineNumber,S=this._render(I,b,this._getDecorations(E)),C=this._lineHeight.toString(),r=this._glyphMarginLeft.toString(),u=this._glyphMarginWidth.toString(),i='" style="left:'+r+"px;width:"+u+"px;height:"+C+'px;"></div>',f=[];for(let c=I;c<=b;c++){const l=c-I,s=S[l];s.length===0?f[l]="":f[l]='<div class="cgmr codicon '+s.join(" ")+i}this._renderResult=f}render(E,I){if(!this._renderResult)return"";const b=I-E;return b<0||b>=this._renderResult.length?"":this._renderResult[b]}}e.GlyphMarginOverlay=A}),define(ae[1216],le([1,0,569,1064]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class p extends t.DedupOverlay{constructor(A){super(),this._context=A;const E=this._context.configuration.options.get(133);this._decorationsLeft=E.decorationsLeft,this._decorationsWidth=E.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(A){const E=this._context.configuration.options.get(133);return this._decorationsLeft=E.decorationsLeft,this._decorationsWidth=E.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(),E=[];let I=0;for(let b=0,S=k.length;b<S;b++){const C=k[b],r=C.options.linesDecorationsClassName;r&&(E[I++]=new t.DecorationToRender(C.range.startLineNumber,C.range.endLineNumber,r));const u=C.options.firstLineDecorationClassName;u&&(E[I++]=new t.DecorationToRender(C.range.startLineNumber,C.range.startLineNumber,u))}return E}prepareRender(A){const k=A.visibleRange.startLineNumber,E=A.visibleRange.endLineNumber,I=this._render(k,E,this._getDecorations(A)),b=this._decorationsLeft.toString(),S=this._decorationsWidth.toString(),C='" style="left:'+b+"px;width:"+S+'px;"></div>',r=[];for(let u=k;u<=E;u++){const i=u-k,f=I[i];let c="";for(let l=0,s=f.length;l<s;l++)c+='<div class="cldr '+f[l]+C;r[i]=c}this._renderResult=r}render(A,k){return this._renderResult?this._renderResult[k-A]:""}}e.LinesDecorationsOverlay=p}),define(ae[735],le([1,0,121,180]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Margin=void 0;class R extends p.ViewPart{constructor(k){super(k);const E=this._context.configuration.options,I=E.get(133);this._canUseLayerHinting=!E.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(R.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(R.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(k){const E=this._context.configuration.options,I=E.get(133);return this._canUseLayerHinting=!E.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 E=k.scrollTop-k.bigNumbersDelta;this._domNode.setTop(-E);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=R,R.CLASS_NAME="glyph-margin",R.OUTER_CLASS_NAME="margin"}),define(ae[1217],le([1,0,569,1065]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewLineDecorationsOverlay=void 0;class p 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(),E=[];let I=0;for(let b=0,S=k.length;b<S;b++){const C=k[b],r=C.options.marginClassName;r&&(E[I++]=new t.DecorationToRender(C.range.startLineNumber,C.range.endLineNumber,r))}return E}prepareRender(A){const k=A.visibleRange.startLineNumber,E=A.visibleRange.endLineNumber,I=this._render(k,E,this._getDecorations(A)),b=[];for(let S=k;S<=E;S++){const C=S-k,r=I[C];let u="";for(let i=0,f=r.length;i<f;i++)u+='<div class="cmdr '+r[i]+'" style=""></div>';b[C]=u}this._renderResult=b}render(A,k){return this._renderResult?this._renderResult[k-A]:""}}e.MarginViewLineDecorationsOverlay=p}),define(ae[1218],le([1,0,121,180,1067]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class R extends p.ViewPart{constructor(k){super(k);const I=this._context.configuration.options.get(133);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")),p.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(133);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 E=(0,t.createFastDomNode)(k.getDomNode());this._widgets[k.getId()]={widget:k,preference:null,domNode:E},E.setPosition("absolute"),E.setAttribute("widgetId",k.getId()),this._domNode.appendChild(E),this.setShouldRender()}setWidgetPosition(k,E){const I=this._widgets[k.getId()];return I.preference===E?!1:(I.preference=E,this.setShouldRender(),!0)}removeWidget(k){const E=k.getId();if(this._widgets.hasOwnProperty(E)){const b=this._widgets[E].domNode.domNode;delete this._widgets[E],b.parentNode.removeChild(b),this.setShouldRender()}}_renderWidget(k){const E=k.domNode;if(k.preference===null){E.setTop("");return}if(k.preference===0)E.setTop(0),E.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(k.preference===1){const I=E.domNode.clientHeight;E.setTop(this._editorHeight-I-2*this._horizontalScrollbarHeight),E.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else k.preference===2&&(E.setTop(0),E.domNode.style.right="50%")}prepareRender(k){}render(k){this._domNode.setWidth(this._editorWidth);const E=Object.keys(this._widgets);for(let I=0,b=E.length;I<b;I++){const S=E[I];this._renderWidget(this._widgets[S])}}}e.ViewOverlayWidgets=R}),define(ae[1219],le([1,0,121,21,180,50]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const k=()=>{throw new Error("Invalid change accessor")};class E extends R.ViewPart{constructor(S){super(S);const C=this._context.configuration.options,r=C.get(133);this._lineHeight=C.get(60),this._contentWidth=r.contentWidth,this._contentLeft=r.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 S=this._context.viewLayout.getWhitespaces(),C=new Map;for(const u of S)C.set(u.id,u);let r=!1;return this._context.viewModel.changeWhitespace(u=>{const i=Object.keys(this._zones);for(let f=0,c=i.length;f<c;f++){const l=i[f],s=this._zones[l],d=this._computeWhitespaceProps(s.delegate);s.isInHiddenArea=d.isInHiddenArea;const n=C.get(l);n&&(n.afterLineNumber!==d.afterViewLineNumber||n.height!==d.heightInPx)&&(u.changeOneWhitespace(l,d.afterViewLineNumber,d.heightInPx),this._safeCallOnComputedHeight(s.delegate,d.heightInPx),r=!0)}}),r}onConfigurationChanged(S){const C=this._context.configuration.options,r=C.get(133);return this._lineHeight=C.get(60),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,S.hasChanged(60)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(S){return this._recomputeWhitespacesProps()}onLinesDeleted(S){return!0}onScrollChanged(S){return S.scrollTopChanged||S.scrollWidthChanged}onZonesChanged(S){return!0}onLinesInserted(S){return!0}_getZoneOrdinal(S){return typeof S.afterColumn<"u"?S.afterColumn:1e4}_computeWhitespaceProps(S){if(S.afterLineNumber===0)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(S),minWidthInPx:this._minWidthInPixels(S)};let C;if(typeof S.afterColumn<"u")C=this._context.viewModel.model.validatePosition({lineNumber:S.afterLineNumber,column:S.afterColumn});else{const f=this._context.viewModel.model.validatePosition({lineNumber:S.afterLineNumber,column:1}).lineNumber;C=new A.Position(f,this._context.viewModel.model.getLineMaxColumn(f))}let r;C.column===this._context.viewModel.model.getLineMaxColumn(C.lineNumber)?r=this._context.viewModel.model.validatePosition({lineNumber:C.lineNumber+1,column:1}):r=this._context.viewModel.model.validatePosition({lineNumber:C.lineNumber,column:C.column+1});const u=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(C,S.afterColumnAffinity),i=this._context.viewModel.coordinatesConverter.modelPositionIsVisible(r);return{isInHiddenArea:!i,afterViewLineNumber:u.lineNumber,heightInPx:i?this._heightInPixels(S):0,minWidthInPx:this._minWidthInPixels(S)}}changeViewZones(S){let C=!1;return this._context.viewModel.changeWhitespace(r=>{const u={addZone:i=>(C=!0,this._addZone(r,i)),removeZone:i=>{!i||(C=this._removeZone(r,i)||C)},layoutZone:i=>{!i||(C=this._layoutZone(r,i)||C)}};I(S,u),u.addZone=k,u.removeZone=k,u.layoutZone=k}),C}_addZone(S,C){const r=this._computeWhitespaceProps(C),i={whitespaceId:S.insertWhitespace(r.afterViewLineNumber,this._getZoneOrdinal(C),r.heightInPx,r.minWidthInPx),delegate:C,isInHiddenArea:r.isInHiddenArea,isVisible:!1,domNode:(0,t.createFastDomNode)(C.domNode),marginDomNode:C.marginDomNode?(0,t.createFastDomNode)(C.marginDomNode):null};return this._safeCallOnComputedHeight(i.delegate,r.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(S,C){if(this._zones.hasOwnProperty(C)){const r=this._zones[C];return delete this._zones[C],S.removeWhitespace(r.whitespaceId),r.domNode.removeAttribute("monaco-visible-view-zone"),r.domNode.removeAttribute("monaco-view-zone"),r.domNode.domNode.parentNode.removeChild(r.domNode.domNode),r.marginDomNode&&(r.marginDomNode.removeAttribute("monaco-visible-view-zone"),r.marginDomNode.removeAttribute("monaco-view-zone"),r.marginDomNode.domNode.parentNode.removeChild(r.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(S,C){if(this._zones.hasOwnProperty(C)){const r=this._zones[C],u=this._computeWhitespaceProps(r.delegate);return r.isInHiddenArea=u.isInHiddenArea,S.changeOneWhitespace(r.whitespaceId,u.afterViewLineNumber,u.heightInPx),this._safeCallOnComputedHeight(r.delegate,u.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(S){if(this._zones.hasOwnProperty(S)){const C=this._zones[S];return Boolean(C.delegate.suppressMouseDown)}return!1}_heightInPixels(S){return typeof S.heightInPx=="number"?S.heightInPx:typeof S.heightInLines=="number"?this._lineHeight*S.heightInLines:this._lineHeight}_minWidthInPixels(S){return typeof S.minWidthInPx=="number"?S.minWidthInPx:0}_safeCallOnComputedHeight(S,C){if(typeof S.onComputedHeight=="function")try{S.onComputedHeight(C)}catch(r){(0,p.onUnexpectedError)(r)}}_safeCallOnDomNodeTop(S,C){if(typeof S.onDomNodeTop=="function")try{S.onDomNodeTop(C)}catch(r){(0,p.onUnexpectedError)(r)}}prepareRender(S){}render(S){const C=S.viewportData.whitespaceViewportData,r={};let u=!1;for(const f of C)this._zones[f.id].isInHiddenArea||(r[f.id]=f,u=!0);const i=Object.keys(this._zones);for(let f=0,c=i.length;f<c;f++){const l=i[f],s=this._zones[l];let d=0,n=0,a="none";r.hasOwnProperty(l)?(d=r[l].verticalOffset-S.bigNumbersDelta,n=r[l].height,a="block",s.isVisible||(s.domNode.setAttribute("monaco-visible-view-zone","true"),s.isVisible=!0),this._safeCallOnDomNodeTop(s.delegate,S.getScrolledTopFromAbsoluteTop(r[l].verticalOffset))):(s.isVisible&&(s.domNode.removeAttribute("monaco-visible-view-zone"),s.isVisible=!1),this._safeCallOnDomNodeTop(s.delegate,S.getScrolledTopFromAbsoluteTop(-1e6))),s.domNode.setTop(d),s.domNode.setHeight(n),s.domNode.setDisplay(a),s.marginDomNode&&(s.marginDomNode.setTop(d),s.marginDomNode.setHeight(n),s.marginDomNode.setDisplay(a))}u&&(this.domNode.setWidth(Math.max(S.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}e.ViewZones=E;function I(b,S){try{return b(S)}catch(C){(0,p.onUnexpectedError)(C)}}}),define(ae[570],le([1,0]),function(J,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(o){o[o.ViewCompositionStart=0]="ViewCompositionStart",o[o.ViewCompositionEnd=1]="ViewCompositionEnd",o[o.ViewConfigurationChanged=2]="ViewConfigurationChanged",o[o.ViewCursorStateChanged=3]="ViewCursorStateChanged",o[o.ViewDecorationsChanged=4]="ViewDecorationsChanged",o[o.ViewFlushed=5]="ViewFlushed",o[o.ViewFocusChanged=6]="ViewFocusChanged",o[o.ViewLanguageConfigurationChanged=7]="ViewLanguageConfigurationChanged",o[o.ViewLineMappingChanged=8]="ViewLineMappingChanged",o[o.ViewLinesChanged=9]="ViewLinesChanged",o[o.ViewLinesDeleted=10]="ViewLinesDeleted",o[o.ViewLinesInserted=11]="ViewLinesInserted",o[o.ViewRevealRangeRequest=12]="ViewRevealRangeRequest",o[o.ViewScrollChanged=13]="ViewScrollChanged",o[o.ViewThemeChanged=14]="ViewThemeChanged",o[o.ViewTokensChanged=15]="ViewTokensChanged",o[o.ViewTokensColorsChanged=16]="ViewTokensColorsChanged",o[o.ViewZonesChanged=17]="ViewZonesChanged"})(t=e.ViewEventType||(e.ViewEventType={}));class p{constructor(){this.type=0}}e.ViewCompositionStartEvent=p;class R{constructor(){this.type=1}}e.ViewCompositionEndEvent=R;class A{constructor(g){this.type=2,this._source=g}hasChanged(g){return this._source.hasChanged(g)}}e.ViewConfigurationChangedEvent=A;class k{constructor(g,h){this.type=3,this.selections=g,this.modelSelections=h}}e.ViewCursorStateChangedEvent=k;class E{constructor(g){this.type=4,g?(this.affectsMinimap=g.affectsMinimap,this.affectsOverviewRuler=g.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}e.ViewDecorationsChangedEvent=E;class I{constructor(){this.type=5}}e.ViewFlushedEvent=I;class b{constructor(g){this.type=6,this.isFocused=g}}e.ViewFocusChangedEvent=b;class S{constructor(){this.type=7}}e.ViewLanguageConfigurationEvent=S;class C{constructor(){this.type=8}}e.ViewLineMappingChangedEvent=C;class r{constructor(g,h){this.fromLineNumber=g,this.count=h,this.type=9}}e.ViewLinesChangedEvent=r;class u{constructor(g,h){this.type=10,this.fromLineNumber=g,this.toLineNumber=h}}e.ViewLinesDeletedEvent=u;class i{constructor(g,h){this.type=11,this.fromLineNumber=g,this.toLineNumber=h}}e.ViewLinesInsertedEvent=i;var f;(function(o){o[o.Simple=0]="Simple",o[o.Center=1]="Center",o[o.CenterIfOutsideViewport=2]="CenterIfOutsideViewport",o[o.Top=3]="Top",o[o.Bottom=4]="Bottom",o[o.NearTop=5]="NearTop",o[o.NearTopIfOutsideViewport=6]="NearTopIfOutsideViewport"})(f=e.VerticalRevealType||(e.VerticalRevealType={}));class c{constructor(g,h,v,m,w,D,y){this.source=g,this.minimalReveal=h,this.range=v,this.selections=m,this.verticalType=w,this.revealHorizontal=D,this.scrollType=y,this.type=12}}e.ViewRevealRangeRequestEvent=c;class l{constructor(g){this.type=13,this.scrollWidth=g.scrollWidth,this.scrollLeft=g.scrollLeft,this.scrollHeight=g.scrollHeight,this.scrollTop=g.scrollTop,this.scrollWidthChanged=g.scrollWidthChanged,this.scrollLeftChanged=g.scrollLeftChanged,this.scrollHeightChanged=g.scrollHeightChanged,this.scrollTopChanged=g.scrollTopChanged}}e.ViewScrollChangedEvent=l;class s{constructor(g){this.theme=g,this.type=14}}e.ViewThemeChangedEvent=s;class d{constructor(g){this.type=15,this.ranges=g}}e.ViewTokensChangedEvent=d;class n{constructor(){this.type=16}}e.ViewTokensColorsChangedEvent=n;class a{constructor(){this.type=17}}e.ViewZonesChangedEvent=a}),define(ae[1220],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=e.LinePartMetadata=void 0;var t;(function(R){R[R.IS_WHITESPACE=1]="IS_WHITESPACE",R[R.PSEUDO_BEFORE=2]="PSEUDO_BEFORE",R[R.PSEUDO_AFTER=4]="PSEUDO_AFTER",R[R.IS_WHITESPACE_MASK=1]="IS_WHITESPACE_MASK",R[R.PSEUDO_BEFORE_MASK=2]="PSEUDO_BEFORE_MASK",R[R.PSEUDO_AFTER_MASK=4]="PSEUDO_AFTER_MASK"})(t=e.LinePartMetadata||(e.LinePartMetadata={}));class p{constructor(A,k,E,I){this.endIndex=A,this.type=k,this.metadata=E,this.containsRTL=I,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=p}),define(ae[1221],le([1,0,20]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class p{constructor(A,k,E,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=E,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.getViewportViewLineRenderingData(this.visibleRange,A)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=p}),define(ae[736],le([1,0]),function(J,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 p{constructor(E,I,b){this._colorZoneBrand=void 0,this.from=E|0,this.to=I|0,this.colorId=b|0}static compare(E,I){return E.colorId===I.colorId?E.from===I.from?E.to-I.to:E.from-I.from:E.colorId-I.colorId}}e.ColorZone=p;class R{constructor(E,I,b,S){this._overviewRulerZoneBrand=void 0,this.startLineNumber=E,this.endLineNumber=I,this.heightInLines=b,this.color=S,this._colorZone=null}static compare(E,I){return E.color===I.color?E.startLineNumber===I.startLineNumber?E.heightInLines===I.heightInLines?E.endLineNumber-I.endLineNumber:E.heightInLines-I.heightInLines:E.startLineNumber-I.startLineNumber:E.color<I.color?-1:1}setColorZone(E){this._colorZone=E}getColorZones(){return this._colorZone}}e.OverviewRulerZone=R;class A{constructor(E){this._getVerticalOffsetForLine=E,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(E){this._zones=E,this._zones.sort(R.compare)}setLineHeight(E){return this._lineHeight===E?!1:(this._lineHeight=E,this._colorZonesInvalid=!0,!0)}setPixelRatio(E){this._pixelRatio=E,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(E){return this._domWidth===E?!1:(this._domWidth=E,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(E){return this._domHeight===E?!1:(this._domHeight=E,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(E){return this._outerHeight===E?!1:(this._outerHeight=E,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const E=this._colorZonesInvalid,I=Math.floor(this._lineHeight),b=Math.floor(this.getCanvasHeight()),S=Math.floor(this._outerHeight),C=b/S,r=Math.floor(4*this._pixelRatio/2),u=[];for(let i=0,f=this._zones.length;i<f;i++){const c=this._zones[i];if(!E){const m=c.getColorZones();if(m){u.push(m);continue}}const l=this._getVerticalOffsetForLine(c.startLineNumber),s=c.heightInLines===0?this._getVerticalOffsetForLine(c.endLineNumber)+I:l+c.heightInLines*I,d=Math.floor(C*l),n=Math.floor(C*s);let a=Math.floor((d+n)/2),o=n-a;o<r&&(o=r),a-o<0&&(a=o),a+o>b&&(a=b-o);const g=c.color;let h=this._color2Id[g];h||(h=++this._lastAssignedId,this._color2Id[g]=h,this._id2Color[h]=g);const v=new p(a-o,a+o,h);c.setColorZone(v),u.push(v)}return this._colorZonesInvalid=!1,u.sort(p.compare),u}}e.OverviewZoneManager=A}),define(ae[1222],le([1,0,121,736,411]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class A extends R.ViewEventHandler{constructor(E,I){super(),this._context=E;const b=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 p.OverviewZoneManager(S=>this._context.viewLayout.getVerticalOffsetForLineNumber(S)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(b.get(60)),this._zoneManager.setPixelRatio(b.get(131)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(E){const I=this._context.configuration.options;return E.hasChanged(60)&&(this._zoneManager.setLineHeight(I.get(60)),this._render()),E.hasChanged(131)&&(this._zoneManager.setPixelRatio(I.get(131)),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(E){return this._render(),!0}onScrollChanged(E){return E.scrollHeightChanged&&(this._zoneManager.setOuterHeight(E.scrollHeight),this._render()),!0}onZonesChanged(E){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(E){this._domNode.setTop(E.top),this._domNode.setRight(E.right);let I=!1;I=this._zoneManager.setDOMWidth(E.width)||I,I=this._zoneManager.setDOMHeight(E.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(E){this._zoneManager.setZones(E),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const E=this._zoneManager.getCanvasWidth(),I=this._zoneManager.getCanvasHeight(),b=this._zoneManager.resolveColorZones(),S=this._zoneManager.getId2Color(),C=this._domNode.domNode.getContext("2d");return C.clearRect(0,0,E,I),b.length>0&&this._renderOneLane(C,b,S,E),!0}_renderOneLane(E,I,b,S){let C=0,r=0,u=0;for(const i of I){const f=i.colorId,c=i.from,l=i.to;f!==C?(E.fillRect(0,r,S,u-r),C=f,E.fillStyle=b[C],r=c,u=l):u>=c?u=Math.max(u,l):(E.fillRect(0,r,S,u-r),r=c,u=l)}E.fillRect(0,r,S,u-r)}}e.OverviewRuler=A}),define(ae[1223],le([1,0,1203]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class p{constructor(A,k,E){this.configuration=A,this.theme=new t.EditorTheme(k),this.viewModel=E,this.viewLayout=E.viewLayout}addEventHandler(A){this.viewModel.addViewEventHandler(A)}removeEventHandler(A){this.viewModel.removeViewEventHandler(A)}}e.ViewContext=p}),define(ae[1224],le([1,0,20,85]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class R{constructor(k,E){this._selection=k,this._isMovingLeft=E}getEditOperations(k,E){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const I=this._selection.startLineNumber,b=this._selection.startColumn,S=this._selection.endColumn;if(!(this._isMovingLeft&&b===1)&&!(!this._isMovingLeft&&S===k.getLineMaxColumn(I)))if(this._isMovingLeft){const C=new t.Range(I,b-1,I,b),r=k.getValueInRange(C);E.addEditOperation(C,null),E.addEditOperation(new t.Range(I,S,I,S),r)}else{const C=new t.Range(I,S,I,S+1),r=k.getValueInRange(C);E.addEditOperation(C,null),E.addEditOperation(new t.Range(I,b,I,b),r)}}computeCursorState(k,E){return this._isMovingLeft?new p.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new p.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=R}),define(ae[236],le([1,0,21]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionItem=e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionTriggerSource=e.CodeActionAutoApply=e.CodeActionKind=void 0;class p{constructor(r){this.value=r}equals(r){return this.value===r.value}contains(r){return this.equals(r)||this.value===""||r.value.startsWith(this.value+p.sep)}intersects(r){return this.contains(r)||r.contains(this)}append(r){return new p(this.value+p.sep+r)}}e.CodeActionKind=p,p.sep=".",p.None=new p("@@none@@"),p.Empty=new p(""),p.QuickFix=new p("quickfix"),p.Refactor=new p("refactor"),p.RefactorExtract=p.Refactor.append("extract"),p.RefactorInline=p.Refactor.append("inline"),p.RefactorMove=p.Refactor.append("move"),p.RefactorRewrite=p.Refactor.append("rewrite"),p.Source=new p("source"),p.SourceOrganizeImports=p.Source.append("organizeImports"),p.SourceFixAll=p.Source.append("fixAll"),p.SurroundWith=p.Refactor.append("surround");var R;(function(C){C.IfSingle="ifSingle",C.First="first",C.Never="never"})(R=e.CodeActionAutoApply||(e.CodeActionAutoApply={}));var A;(function(C){C.Refactor="refactor",C.RefactorPreview="refactor preview",C.Lightbulb="lightbulb",C.Default="other (default)",C.SourceAction="source action",C.QuickFix="quick fix action",C.FixAll="fix all",C.OrganizeImports="organize imports",C.AutoFix="auto fix",C.QuickFixHover="quick fix hover window",C.OnSave="save participants",C.ProblemsView="problems view"})(A=e.CodeActionTriggerSource||(e.CodeActionTriggerSource={}));function k(C,r){return!(C.include&&!C.include.intersects(r)||C.excludes&&C.excludes.some(u=>I(r,u,C.include))||!C.includeSourceActions&&p.Source.contains(r))}e.mayIncludeActionsOfKind=k;function E(C,r){const u=r.kind?new p(r.kind):void 0;return!(C.include&&(!u||!C.include.contains(u))||C.excludes&&u&&C.excludes.some(i=>I(u,i,C.include))||!C.includeSourceActions&&u&&p.Source.contains(u)||C.onlyIncludePreferredActions&&!r.isPreferred)}e.filtersAction=E;function I(C,r,u){return!(!r.contains(C)||u&&r.contains(u))}class b{static fromUser(r,u){return!r||typeof r!="object"?new b(u.kind,u.apply,!1):new b(b.getKindFromUser(r,u.kind),b.getApplyFromUser(r,u.apply),b.getPreferredUser(r))}static getApplyFromUser(r,u){switch(typeof r.apply=="string"?r.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return u}}static getKindFromUser(r,u){return typeof r.kind=="string"?new p(r.kind):u}static getPreferredUser(r){return typeof r.preferred=="boolean"?r.preferred:!1}constructor(r,u,i){this.kind=r,this.apply=u,this.preferred=i}}e.CodeActionCommandArgs=b;class S{constructor(r,u){this.action=r,this.provider=u}async resolve(r){if(this.provider?.resolveCodeAction&&!this.action.edit){let u;try{u=await this.provider.resolveCodeAction(this.action,r)}catch(i){(0,t.onUnexpectedExternalError)(i)}u&&(this.action.edit=u.edit)}return this}}e.CodeActionItem=S}),define(ae[737],le([1,0,138,50,20,85]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BlockCommentCommand=void 0;class k{constructor(I,b,S){this.languageConfigurationService=S,this._selection=I,this._insertSpace=b,this._usedEndToken=null}static _haystackHasNeedleAtOffset(I,b,S){if(S<0)return!1;const C=b.length,r=I.length;if(S+C>r)return!1;for(let u=0;u<C;u++){const i=I.charCodeAt(S+u),f=b.charCodeAt(u);if(i!==f&&!(i>=65&&i<=90&&i+32===f)&&!(f>=65&&f<=90&&f+32===i))return!1}return!0}_createOperationsForBlockComment(I,b,S,C,r,u){const i=I.startLineNumber,f=I.startColumn,c=I.endLineNumber,l=I.endColumn,s=r.getLineContent(i),d=r.getLineContent(c);let n=s.lastIndexOf(b,f-1+b.length),a=d.indexOf(S,l-1-S.length);if(n!==-1&&a!==-1)if(i===c)s.substring(n+b.length,a).indexOf(S)>=0&&(n=-1,a=-1);else{const g=s.substring(n+b.length),h=d.substring(0,a);(g.indexOf(S)>=0||h.indexOf(S)>=0)&&(n=-1,a=-1)}let o;n!==-1&&a!==-1?(C&&n+b.length<s.length&&s.charCodeAt(n+b.length)===32&&(b=b+" "),C&&a>0&&d.charCodeAt(a-1)===32&&(S=" "+S,a-=1),o=k._createRemoveBlockCommentOperations(new R.Range(i,n+b.length+1,c,a+1),b,S)):(o=k._createAddBlockCommentOperations(I,b,S,this._insertSpace),this._usedEndToken=o.length===1?S:null);for(const g of o)u.addTrackedEditOperation(g.range,g.text)}static _createRemoveBlockCommentOperations(I,b,S){const C=[];return R.Range.isEmpty(I)?C.push(t.EditOperation.delete(new R.Range(I.startLineNumber,I.startColumn-b.length,I.endLineNumber,I.endColumn+S.length))):(C.push(t.EditOperation.delete(new R.Range(I.startLineNumber,I.startColumn-b.length,I.startLineNumber,I.startColumn))),C.push(t.EditOperation.delete(new R.Range(I.endLineNumber,I.endColumn,I.endLineNumber,I.endColumn+S.length)))),C}static _createAddBlockCommentOperations(I,b,S,C){const r=[];return R.Range.isEmpty(I)?r.push(t.EditOperation.replace(new R.Range(I.startLineNumber,I.startColumn,I.endLineNumber,I.endColumn),b+" "+S)):(r.push(t.EditOperation.insert(new p.Position(I.startLineNumber,I.startColumn),b+(C?" ":""))),r.push(t.EditOperation.insert(new p.Position(I.endLineNumber,I.endColumn),(C?" ":"")+S))),r}getEditOperations(I,b){const S=this._selection.startLineNumber,C=this._selection.startColumn;I.tokenization.tokenizeIfCheap(S);const r=I.getLanguageIdAtPosition(S,C),u=this.languageConfigurationService.getLanguageConfiguration(r).comments;!u||!u.blockCommentStartToken||!u.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,u.blockCommentStartToken,u.blockCommentEndToken,this._insertSpace,I,b)}computeCursorState(I,b){const S=b.getInverseEditOperations();if(S.length===2){const C=S[0],r=S[1];return new A.Selection(C.range.endLineNumber,C.range.endColumn,r.range.startLineNumber,r.range.startColumn)}else{const C=S[0].range,r=this._usedEndToken?-this._usedEndToken.length-1:0;return new A.Selection(C.endLineNumber,C.endColumn+r,C.endLineNumber,C.endColumn+r)}}}e.BlockCommentCommand=k}),define(ae[1225],le([1,0,20,85]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class R{constructor(k,E,I){this.selection=k,this.targetPosition=E,this.copy=I,this.targetSelection=null}getEditOperations(k,E){const I=k.getValueInRange(this.selection);if(this.copy||E.addEditOperation(this.selection,null),E.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 p.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 p.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 p.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 p.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 p.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,E){return this.targetSelection}}e.DragAndDropCommand=R}),define(ae[1226],le([1,0,20]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceAllCommand=void 0;class p{constructor(A,k,E){this._editorSelection=A,this._ranges=k,this._replaceStrings=E,this._trackedEditorSelectionId=null}getEditOperations(A,k){if(this._ranges.length>0){const E=[];for(let S=0;S<this._ranges.length;S++)E.push({range:this._ranges[S],text:this._replaceStrings[S]});E.sort((S,C)=>t.Range.compareRangesUsingStarts(S.range,C.range));const I=[];let b=E[0];for(let S=1;S<E.length;S++)b.range.endLineNumber===E[S].range.startLineNumber&&b.range.endColumn===E[S].range.startColumn?(b.range=b.range.plusRange(E[S].range),b.text=b.text+E[S].text):(I.push(b),b=E[S]);I.push(b);for(const S of I)k.addEditOperation(S.range,S.text)}this._trackedEditorSelectionId=k.trackSelection(this._editorSelection)}computeCursorState(A,k){return k.getTrackedSelection(this._trackedEditorSelectionId)}}e.ReplaceAllCommand=p}),define(ae[412],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRegion=e.FoldingRegions=e.MAX_LINE_NUMBER=e.MAX_FOLDING_REGIONS=e.FoldSource=void 0;var t;(function(E){E[E.provider=0]="provider",E[E.userDefined=1]="userDefined",E[E.recovered=2]="recovered"})(t=e.FoldSource||(e.FoldSource={})),e.MAX_FOLDING_REGIONS=65535,e.MAX_LINE_NUMBER=16777215;const p=4278190080;class R{constructor(I){const b=Math.ceil(I/32);this._states=new Uint32Array(b)}get(I){const b=I/32|0,S=I%32;return(this._states[b]&1<<S)!==0}set(I,b){const S=I/32|0,C=I%32,r=this._states[S];b?this._states[S]=r|1<<C:this._states[S]=r&~(1<<C)}}class A{constructor(I,b,S){if(this.sourceAbbr={[0]:" ",[1]:"u",[2]:"r"},I.length!==b.length||I.length>e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=I,this._endIndexes=b,this._collapseStates=new R(I.length),this._userDefinedStates=new R(I.length),this._recoveredStates=new R(I.length),this._types=S,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const I=[],b=(S,C)=>{const r=I[I.length-1];return this.getStartLineNumber(r)<=S&&this.getEndLineNumber(r)>=C};for(let S=0,C=this._startIndexes.length;S<C;S++){const r=this._startIndexes[S],u=this._endIndexes[S];if(r>e.MAX_LINE_NUMBER||u>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;I.length>0&&!b(r,u);)I.pop();const i=I.length>0?I[I.length-1]:-1;I.push(S),this._startIndexes[S]=r+((i&255)<<24),this._endIndexes[S]=u+((i&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(I){return this._startIndexes[I]&e.MAX_LINE_NUMBER}getEndLineNumber(I){return this._endIndexes[I]&e.MAX_LINE_NUMBER}getType(I){return this._types?this._types[I]:void 0}hasTypes(){return!!this._types}isCollapsed(I){return this._collapseStates.get(I)}setCollapsed(I,b){this._collapseStates.set(I,b)}isUserDefined(I){return this._userDefinedStates.get(I)}setUserDefined(I,b){return this._userDefinedStates.set(I,b)}isRecovered(I){return this._recoveredStates.get(I)}setRecovered(I,b){return this._recoveredStates.set(I,b)}getSource(I){return this.isUserDefined(I)?1:this.isRecovered(I)?2:0}setSource(I,b){b===1?(this.setUserDefined(I,!0),this.setRecovered(I,!1)):b===2?(this.setUserDefined(I,!1),this.setRecovered(I,!0)):(this.setUserDefined(I,!1),this.setRecovered(I,!1))}setCollapsedAllOfType(I,b){let S=!1;if(this._types)for(let C=0;C<this._types.length;C++)this._types[C]===I&&(this.setCollapsed(C,b),S=!0);return S}toRegion(I){return new k(this,I)}getParentIndex(I){this.ensureParentIndices();const b=((this._startIndexes[I]&p)>>>24)+((this._endIndexes[I]&p)>>>16);return b===e.MAX_FOLDING_REGIONS?-1:b}contains(I,b){return this.getStartLineNumber(I)<=b&&this.getEndLineNumber(I)>=b}findIndex(I){let b=0,S=this._startIndexes.length;if(S===0)return-1;for(;b<S;){const C=Math.floor((b+S)/2);I<this.getStartLineNumber(C)?S=C:b=C+1}return b-1}findRange(I){let b=this.findIndex(I);if(b>=0){if(this.getEndLineNumber(b)>=I)return b;for(b=this.getParentIndex(b);b!==-1;){if(this.contains(b,I))return b;b=this.getParentIndex(b)}}return-1}toString(){const I=[];for(let b=0;b<this.length;b++)I[b]=`[${this.sourceAbbr[this.getSource(b)]}${this.isCollapsed(b)?"+":"-"}] ${this.getStartLineNumber(b)}/${this.getEndLineNumber(b)}`;return I.join(", ")}toFoldRange(I){return{startLineNumber:this._startIndexes[I]&e.MAX_LINE_NUMBER,endLineNumber:this._endIndexes[I]&e.MAX_LINE_NUMBER,type:this._types?this._types[I]:void 0,isCollapsed:this.isCollapsed(I),source:this.getSource(I)}}static fromFoldRanges(I){const b=I.length,S=new Uint32Array(b),C=new Uint32Array(b);let r=[],u=!1;for(let f=0;f<b;f++){const c=I[f];S[f]=c.startLineNumber,C[f]=c.endLineNumber,r.push(c.type),c.type&&(u=!0)}u||(r=void 0);const i=new A(S,C,r);for(let f=0;f<b;f++)I[f].isCollapsed&&i.setCollapsed(f,!0),i.setSource(f,I[f].source);return i}static sanitizeAndMerge(I,b,S){S=S??Number.MAX_VALUE;const C=(o,g)=>Array.isArray(o)?h=>h<g?o[h]:void 0:h=>h<g?o.toFoldRange(h):void 0,r=C(I,I.length),u=C(b,b.length);let i=0,f=0,c=r(0),l=u(0);const s=[];let d,n=0;const a=[];for(;c||l;){let o;if(l&&(!c||c.startLineNumber>=l.startLineNumber))c&&c.startLineNumber===l.startLineNumber?(l.source===1?o=l:(o=c,o.isCollapsed=l.isCollapsed&&c.endLineNumber===l.endLineNumber,o.source=0),c=r(++i)):(o=l,l.isCollapsed&&l.source===0&&(o.source=2)),l=u(++f);else{let g=f,h=l;for(;;){if(!h||h.startLineNumber>c.endLineNumber){o=c;break}if(h.source===1&&h.endLineNumber>c.endLineNumber)break;h=u(++g)}c=r(++i)}if(o){for(;d&&d.endLineNumber<o.startLineNumber;)d=s.pop();o.endLineNumber>o.startLineNumber&&o.startLineNumber>n&&o.endLineNumber<=S&&(!d||d.endLineNumber>=o.endLineNumber)&&(a.push(o),n=o.startLineNumber,d&&s.push(d),d=o)}}return a}}e.FoldingRegions=A;class k{constructor(I,b){this.ranges=I,this.index=b}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(I){return I.startLineNumber<=this.startLineNumber&&I.endLineNumber>=this.endLineNumber}containsLine(I){return this.startLineNumber<=I&&I<=this.endLineNumber}hidesLine(I){return this.startLineNumber<I&&I<=this.endLineNumber}}e.FoldingRegion=k}),define(ae[1227],le([1,0,567,412]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=e.ID_INDENT_PROVIDER=void 0;const R=5e3;e.ID_INDENT_PROVIDER="indent";class A{constructor(S,C,r){this.editorModel=S,this.languageConfigurationService=C,this.foldingRangesLimit=r,this.id=e.ID_INDENT_PROVIDER}dispose(){}compute(S){const C=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,r=C&&!!C.offSide,u=C&&C.markers;return Promise.resolve(I(this.editorModel,r,u,this.foldingRangesLimit))}}e.IndentRangeProvider=A;class k{constructor(S){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=S}insertFirst(S,C,r){if(S>p.MAX_LINE_NUMBER||C>p.MAX_LINE_NUMBER)return;const u=this._length;this._startIndexes[u]=S,this._endIndexes[u]=C,this._length++,r<1e3&&(this._indentOccurrences[r]=(this._indentOccurrences[r]||0)+1)}toIndentRanges(S){const C=this._foldingRangesLimit.limit;if(this._length<=C){this._foldingRangesLimit.report({limited:!1,computed:this._length});const r=new Uint32Array(this._length),u=new Uint32Array(this._length);for(let i=this._length-1,f=0;i>=0;i--,f++)r[f]=this._startIndexes[i],u[f]=this._endIndexes[i];return new p.FoldingRegions(r,u)}else{this._foldingRangesLimit.report({limited:C,computed:this._length});let r=0,u=this._indentOccurrences.length;for(let l=0;l<this._indentOccurrences.length;l++){const s=this._indentOccurrences[l];if(s){if(s+r>C){u=l;break}r+=s}}const i=S.getOptions().tabSize,f=new Uint32Array(C),c=new Uint32Array(C);for(let l=this._length-1,s=0;l>=0;l--){const d=this._startIndexes[l],n=S.getLineContent(d),a=(0,t.computeIndentLevel)(n,i);(a<u||a===u&&r++<C)&&(f[s]=d,c[s]=this._endIndexes[l],s++)}return new p.FoldingRegions(f,c)}}}e.RangesCollector=k;const E={limit:R,report:()=>{}};function I(b,S,C,r=E){const u=b.getOptions().tabSize,i=new k(r);let f;C&&(f=new RegExp(`(${C.start.source})|(?:${C.end.source})`));const c=[],l=b.getLineCount()+1;c.push({indent:-1,endAbove:l,line:l});for(let s=b.getLineCount();s>0;s--){const d=b.getLineContent(s),n=(0,t.computeIndentLevel)(d,u);let a=c[c.length-1];if(n===-1){S&&(a.endAbove=s);continue}let o;if(f&&(o=d.match(f)))if(o[1]){let g=c.length-1;for(;g>0&&c[g].indent!==-2;)g--;if(g>0){c.length=g+1,a=c[g],i.insertFirst(s,a.line,n),a.line=s,a.indent=n,a.endAbove=s;continue}}else{c.push({indent:-2,endAbove:s,line:s});continue}if(a.indent>n){do c.pop(),a=c[c.length-1];while(a.indent>n);const g=a.endAbove-1;g-s>=1&&i.insertFirst(s,g,n)}a.indent===n?a.endAbove=s:c.push({indent:n,endAbove:s,line:s})}return i.toIndentRanges(b)}e.computeRanges=I}),define(ae[738],le([1,0,21,2,412]),function(J,e,t,p,R){"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,r,u,i){this.editorModel=C,this.providers=r,this.handleFoldingRangesChange=u,this.foldingRangesLimit=i,this.id=e.ID_SYNTAX_PROVIDER;for(const f of r)typeof f.onDidChange=="function"&&(this.disposables||(this.disposables=new p.DisposableStore),this.disposables.add(f.onDidChange(u)))}compute(C){return E(this.providers,this.editorModel,C).then(r=>r?b(r,this.foldingRangesLimit):null)}dispose(){this.disposables?.dispose()}}e.SyntaxRangeProvider=k;function E(S,C,r){let u=null;const i=S.map((f,c)=>Promise.resolve(f.provideFoldingRanges(C,A,r)).then(l=>{if(!r.isCancellationRequested&&Array.isArray(l)){Array.isArray(u)||(u=[]);const s=C.getLineCount();for(const d of l)d.start>0&&d.end>d.start&&d.end<=s&&u.push({start:d.start,end:d.end,rank:c,kind:d.kind})}},t.onUnexpectedExternalError));return Promise.all(i).then(f=>u)}class I{constructor(C){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=C}add(C,r,u,i){if(C>R.MAX_LINE_NUMBER||r>R.MAX_LINE_NUMBER)return;const f=this._length;this._startIndexes[f]=C,this._endIndexes[f]=r,this._nestingLevels[f]=i,this._types[f]=u,this._length++,i<30&&(this._nestingLevelCounts[i]=(this._nestingLevelCounts[i]||0)+1)}toIndentRanges(){const C=this._foldingRangesLimit.limit;if(this._length<=C){this._foldingRangesLimit.report({limited:!1,computed:this._length});const r=new Uint32Array(this._length),u=new Uint32Array(this._length);for(let i=0;i<this._length;i++)r[i]=this._startIndexes[i],u[i]=this._endIndexes[i];return new R.FoldingRegions(r,u,this._types)}else{this._foldingRangesLimit.report({limited:C,computed:this._length});let r=0,u=this._nestingLevelCounts.length;for(let l=0;l<this._nestingLevelCounts.length;l++){const s=this._nestingLevelCounts[l];if(s){if(s+r>C){u=l;break}r+=s}}const i=new Uint32Array(C),f=new Uint32Array(C),c=[];for(let l=0,s=0;l<this._length;l++){const d=this._nestingLevels[l];(d<u||d===u&&r++<C)&&(i[s]=this._startIndexes[l],f[s]=this._endIndexes[l],c[s]=this._types[l],s++)}return new R.FoldingRegions(i,f,c)}}}e.RangesCollector=I;function b(S,C){const r=S.sort((c,l)=>{let s=c.start-l.start;return s===0&&(s=c.rank-l.rank),s}),u=new I(C);let i;const f=[];for(const c of r)if(!i)i=c,u.add(c.start,c.end,c.kind&&c.kind.value,f.length);else if(c.start>i.start)if(c.end<=i.end)f.push(i),i=c,u.add(c.start,c.end,c.kind&&c.kind.value,f.length);else{if(c.start>i.end){do i=f.pop();while(i&&c.start>i.end);i&&f.push(i),i=c}u.add(c.start,c.end,c.kind&&c.kind.value,f.length)}return u.toIndentRanges()}e.sanitizeRanges=b}),define(ae[739],le([1,0,138,20]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class R{static _handleEolEdits(k,E){let I;const b=[];for(const S of E)typeof S.eol=="number"&&(I=S.eol),S.range&&typeof S.text=="string"&&b.push(S);return typeof I=="number"&&k.hasModel()&&k.getModel().pushEOL(I),b}static _isFullModelReplaceEdit(k,E){if(!k.hasModel())return!1;const I=k.getModel(),b=I.validateRange(E.range);return I.getFullModelRange().equalsRange(b)}static execute(k,E,I){I&&k.pushUndoStop();const b=R._handleEolEdits(k,E);b.length===1&&R._isFullModelReplaceEdit(k,b[0])?k.executeEdits("formatEditsCommand",b.map(S=>t.EditOperation.replace(p.Range.lift(S.range),S.text))):k.executeEdits("formatEditsCommand",b.map(S=>t.EditOperation.replaceMove(p.Range.lift(S.range),S.text))),I&&k.pushUndoStop()}}e.FormattingEdit=R}),define(ae[302],le([1,0]),function(J,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 p{constructor(k,E,I,b){this.priority=k,this.range=E,this.initialMousePosX=I,this.initialMousePosY=b,this.type=1}equals(k){return k.type===1&&this.range.equalsRange(k.range)}canAdoptVisibleHover(k,E){return k.type===1&&E.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=p;class R{constructor(k,E,I,b,S){this.priority=k,this.owner=E,this.range=I,this.initialMousePosX=b,this.initialMousePosY=S,this.type=2}equals(k){return k.type===2&&this.owner===k.owner}canAdoptVisibleHover(k,E){return k.type===2&&this.owner===k.owner}}e.HoverForeignElementAnchor=R,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(k){this._participants.push(k)}getAll(){return this._participants}}}),define(ae[1228],le([1,0,85]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class p{constructor(A,k,E){this._editRange=A,this._originalSelection=k,this._text=E}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=p}),define(ae[740],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function t(R,A){let k=0;for(let E=0;E<R.length;E++)R.charAt(E)===" "?k+=A:k++;return k}e.getSpaceCnt=t;function p(R,A,k){R=R<0?0:R;let E="";if(!k){const I=Math.floor(R/A);R=R%A;for(let b=0;b<I;b++)E+=" "}for(let I=0;I<R;I++)E+=" ";return E}e.generateIndent=p}),define(ae[571],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineSuggestCommitId=void 0,e.inlineSuggestCommitId="editor.action.inlineSuggest.commit"}),define(ae[572],le([1,0,20]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReadonlyEmptyArray=e.applyEdits=e.createDisposableRef=void 0;function p(I,b){return{object:I,dispose:()=>b?.dispose()}}e.createDisposableRef=p;function R(I,b){const S=new A(I),C=b.map(r=>{const u=t.Range.lift(r.range);return{startOffset:S.getOffset(u.getStartPosition()),endOffset:S.getOffset(u.getEndPosition()),text:r.text}});C.sort((r,u)=>u.startOffset-r.startOffset);for(const r of C)I=I.substring(0,r.startOffset)+r.text+I.substring(r.endOffset);return I}e.applyEdits=R;class A{constructor(b){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let S=0;S<b.length;S++)b.charAt(S)===` `&&this.lineStartOffsetByLineIdx.push(S+1)}getOffset(b){return this.lineStartOffsetByLineIdx[b.lineNumber-1]+b.column-1}}const k=[];function E(){return k}e.getReadonlyEmptyArray=E}),define(ae[1229],le([1,0,20,85]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class R{constructor(k,E,I){this._selection=k,this._isCopyingDown=E,this._noop=I||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(k,E){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)));const b=[];for(let C=I.startLineNumber;C<=I.endLineNumber;C++)b.push(k.getLineContent(C));const S=b.join(` `);S===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?E.addEditOperation(new t.Range(I.endLineNumber,k.getLineMaxColumn(I.endLineNumber),I.endLineNumber+1,1),I.endLineNumber===k.getLineCount()?"":` `):this._isCopyingDown?E.addEditOperation(new t.Range(I.startLineNumber,1,I.startLineNumber,1),S+` `):E.addEditOperation(new t.Range(I.endLineNumber,k.getLineMaxColumn(I.endLineNumber),I.endLineNumber,k.getLineMaxColumn(I.endLineNumber)),` `+S),this._selectionId=E.trackSelection(I),this._selectionDirection=this._selection.getDirection()}computeCursorState(k,E){let I=E.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let b=I.startLineNumber,S=I.startColumn,C=I.endLineNumber,r=I.endColumn;this._startLineNumberDelta!==0&&(b=b+this._startLineNumberDelta,S=1),this._endLineNumberDelta!==0&&(C=C+this._endLineNumberDelta,r=1),I=p.Selection.createWithDirection(b,S,C,r,this._selectionDirection)}return I}}e.CopyLinesCommand=R}),define(ae[1230],le([1,0,138,20]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class R{static getCollator(){return R._COLLATOR||(R._COLLATOR=new Intl.Collator),R._COLLATOR}constructor(I,b){this.selection=I,this.descending=b,this.selectionId=null}getEditOperations(I,b){const S=k(I,this.selection,this.descending);S&&b.addEditOperation(S.range,S.text),this.selectionId=b.trackSelection(this.selection)}computeCursorState(I,b){return b.getTrackedSelection(this.selectionId)}static canRun(I,b,S){if(I===null)return!1;const C=A(I,b,S);if(!C)return!1;for(let r=0,u=C.before.length;r<u;r++)if(C.before[r]!==C.after[r])return!0;return!1}}e.SortLinesCommand=R,R._COLLATOR=null;function A(E,I,b){const S=I.startLineNumber;let C=I.endLineNumber;if(I.endColumn===1&&C--,S>=C)return null;const r=[];for(let i=S;i<=C;i++)r.push(E.getLineContent(i));let u=r.slice(0);return u.sort(R.getCollator().compare),b===!0&&(u=u.reverse()),{startLineNumber:S,endLineNumber:C,before:r,after:u}}function k(E,I,b){const S=A(E,I,b);return S?t.EditOperation.replace(new p.Range(S.startLineNumber,1,S.endLineNumber,E.getLineMaxColumn(S.endLineNumber)),S.after.join(` `)):null}}),define(ae[741],le([1,0,158,50,20]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class A{async provideSelectionRanges(E,I){const b=[];for(const S of I){const C=[];b.push(C);const r=new Map;await new Promise(u=>A._bracketsRightYield(u,0,E,S,r)),await new Promise(u=>A._bracketsLeftYield(u,0,E,S,r,C))}return b}static _bracketsRightYield(E,I,b,S,C){const r=new Map,u=Date.now();for(;;){if(I>=A._maxRounds){E();break}if(!S){E();break}const i=b.bracketPairs.findNextBracket(S);if(!i){E();break}if(Date.now()-u>A._maxDuration){setTimeout(()=>A._bracketsRightYield(E,I+1,b,S,C));break}if(i.bracketInfo.isOpeningBracket){const c=i.bracketInfo.bracketText,l=r.has(c)?r.get(c):0;r.set(c,l+1)}else{const c=i.bracketInfo.getClosedBrackets()[0].bracketText;let l=r.has(c)?r.get(c):0;if(l-=1,r.set(c,Math.max(0,l)),l<0){let s=C.get(c);s||(s=new t.LinkedList,C.set(c,s)),s.push(i.range)}}S=i.range.getEndPosition()}}static _bracketsLeftYield(E,I,b,S,C,r){const u=new Map,i=Date.now();for(;;){if(I>=A._maxRounds&&C.size===0){E();break}if(!S){E();break}const f=b.bracketPairs.findPrevBracket(S);if(!f){E();break}if(Date.now()-i>A._maxDuration){setTimeout(()=>A._bracketsLeftYield(E,I+1,b,S,C,r));break}if(f.bracketInfo.isOpeningBracket){const l=f.bracketInfo.bracketText;let s=u.has(l)?u.get(l):0;if(s-=1,u.set(l,Math.max(0,s)),s<0){const d=C.get(l);if(d){const n=d.shift();d.size===0&&C.delete(l);const a=R.Range.fromPositions(f.range.getEndPosition(),n.getStartPosition()),o=R.Range.fromPositions(f.range.getStartPosition(),n.getEndPosition());r.push({range:a}),r.push({range:o}),A._addBracketLeading(b,o,r)}}}else{const l=f.bracketInfo.getClosedBrackets()[0].bracketText,s=u.has(l)?u.get(l):0;u.set(l,s+1)}S=f.range.getStartPosition()}}static _addBracketLeading(E,I,b){if(I.startLineNumber===I.endLineNumber)return;const S=I.startLineNumber,C=E.getLineFirstNonWhitespaceColumn(S);C!==0&&C!==I.startColumn&&(b.push({range:R.Range.fromPositions(new p.Position(S,C),I.getEndPosition())}),b.push({range:R.Range.fromPositions(new p.Position(S,1),I.getEndPosition())}));const r=S-1;if(r>0){const u=E.getLineFirstNonWhitespaceColumn(r);u===I.startColumn&&u!==E.getLineLastNonWhitespaceColumn(r)&&(b.push({range:R.Range.fromPositions(new p.Position(r,u),I.getEndPosition())}),b.push({range:R.Range.fromPositions(new p.Position(r,1),I.getEndPosition())}))}}}e.BracketSelectionRangeProvider=A,A._maxDuration=30,A._maxRounds=2}),define(ae[207],le([1,0]),function(J,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(f){f[f.Dollar=0]="Dollar",f[f.Colon=1]="Colon",f[f.Comma=2]="Comma",f[f.CurlyOpen=3]="CurlyOpen",f[f.CurlyClose=4]="CurlyClose",f[f.Backslash=5]="Backslash",f[f.Forwardslash=6]="Forwardslash",f[f.Pipe=7]="Pipe",f[f.Int=8]="Int",f[f.VariableName=9]="VariableName",f[f.Format=10]="Format",f[f.Plus=11]="Plus",f[f.Dash=12]="Dash",f[f.QuestionMark=13]="QuestionMark",f[f.EOF=14]="EOF"})(t=e.TokenType||(e.TokenType={}));class p{constructor(){this.value="",this.pos=0}static isDigitCharacter(c){return c>=48&&c<=57}static isVariableCharacter(c){return c===95||c>=97&&c<=122||c>=65&&c<=90}text(c){this.value=c,this.pos=0}tokenText(c){return this.value.substr(c.pos,c.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const c=this.pos;let l=0,s=this.value.charCodeAt(c),d;if(d=p._table[s],typeof d=="number")return this.pos+=1,{type:d,pos:c,len:1};if(p.isDigitCharacter(s)){d=8;do l+=1,s=this.value.charCodeAt(c+l);while(p.isDigitCharacter(s));return this.pos+=l,{type:d,pos:c,len:l}}if(p.isVariableCharacter(s)){d=9;do s=this.value.charCodeAt(c+ ++l);while(p.isVariableCharacter(s)||p.isDigitCharacter(s));return this.pos+=l,{type:d,pos:c,len:l}}d=10;do l+=1,s=this.value.charCodeAt(c+l);while(!isNaN(s)&&typeof p._table[s]>"u"&&!p.isDigitCharacter(s)&&!p.isVariableCharacter(s));return this.pos+=l,{type:d,pos:c,len:l}}}e.Scanner=p,p._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class R{constructor(){this._children=[]}appendChild(c){return c instanceof A&&this._children[this._children.length-1]instanceof A?this._children[this._children.length-1].value+=c.value:(c.parent=this,this._children.push(c)),this}replace(c,l){const{parent:s}=c,d=s.children.indexOf(c),n=s.children.slice(0);n.splice(d,1,...l),s._children=n,function a(o,g){for(const h of o)h.parent=g,a(h.children,h)}(l,s)}get children(){return this._children}get snippet(){let c=this;for(;;){if(!c)return;if(c instanceof u)return c;c=c.parent}}toString(){return this.children.reduce((c,l)=>c+l.toString(),"")}len(){return 0}}e.Marker=R;class A extends R{static escape(c){return c.replace(/\$|}|\\/g,"\\$&")}constructor(c){super(),this.value=c}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 R{}e.TransformableMarker=k;class E extends k{static compareByIndex(c,l){return c.index===l.index?0:c.isFinalTabstop?1:l.isFinalTabstop||c.index<l.index?-1:c.index>l.index?1:0}constructor(c){super(),this.index=c}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 c="";return this.transform&&(c=this.transform.toTextmateString()),this.children.length===0&&!this.transform?`$${this.index}`:this.children.length===0?`\${${this.index}${c}}`:this.choice?`\${${this.index}|${this.choice.toTextmateString()}|${c}}`:`\${${this.index}:${this.children.map(l=>l.toTextmateString()).join("")}${c}}`}clone(){const c=new E(this.index);return this.transform&&(c.transform=this.transform.clone()),c._children=this.children.map(l=>l.clone()),c}}e.Placeholder=E;class I extends R{constructor(){super(...arguments),this.options=[]}appendChild(c){return c instanceof A&&(c.parent=this,this.options.push(c)),this}toString(){return this.options[0].value}toTextmateString(){return this.options.map(c=>c.value.replace(/\||,/g,"\\$&")).join(",")}len(){return this.options[0].len()}clone(){const c=new I;return this.options.forEach(c.appendChild,c),c}}e.Choice=I;class b extends R{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(c){const l=this;let s=!1,d=c.replace(this.regexp,function(){return s=!0,l._replace(Array.prototype.slice.call(arguments,0,-2))});return!s&&this._children.some(n=>n instanceof S&&Boolean(n.elseValue))&&(d=this._replace([])),d}_replace(c){let l="";for(const s of this._children)if(s instanceof S){let d=c[s.index]||"";d=s.resolve(d),l+=d}else l+=s.toString();return l}toString(){return""}toTextmateString(){return`/${this.regexp.source}/${this.children.map(c=>c.toTextmateString())}/${(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")}`}clone(){const c=new b;return c.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),c._children=this.children.map(l=>l.clone()),c}}e.Transform=b;class S extends R{constructor(c,l,s,d){super(),this.index=c,this.shorthandName=l,this.ifValue=s,this.elseValue=d}resolve(c){return this.shorthandName==="upcase"?c?c.toLocaleUpperCase():"":this.shorthandName==="downcase"?c?c.toLocaleLowerCase():"":this.shorthandName==="capitalize"?c?c[0].toLocaleUpperCase()+c.substr(1):"":this.shorthandName==="pascalcase"?c?this._toPascalCase(c):"":this.shorthandName==="camelcase"?c?this._toCamelCase(c):"":Boolean(c)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(c)&&typeof this.elseValue=="string"?this.elseValue:c||""}_toPascalCase(c){const l=c.match(/[a-z0-9]+/gi);return l?l.map(s=>s.charAt(0).toUpperCase()+s.substr(1)).join(""):c}_toCamelCase(c){const l=c.match(/[a-z0-9]+/gi);return l?l.map((s,d)=>d===0?s.charAt(0).toLowerCase()+s.substr(1):s.charAt(0).toUpperCase()+s.substr(1)).join(""):c}toTextmateString(){let c="${";return c+=this.index,this.shorthandName?c+=`:/${this.shorthandName}`:this.ifValue&&this.elseValue?c+=`:?${this.ifValue}:${this.elseValue}`:this.ifValue?c+=`:+${this.ifValue}`:this.elseValue&&(c+=`:-${this.elseValue}`),c+="}",c}clone(){return new S(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=S;class C extends k{constructor(c){super(),this.name=c}resolve(c){let l=c.resolve(this);return this.transform&&(l=this.transform.resolve(l||"")),l!==void 0?(this._children=[new A(l)],!0):!1}toTextmateString(){let c="";return this.transform&&(c=this.transform.toTextmateString()),this.children.length===0?`\${${this.name}${c}}`:`\${${this.name}:${this.children.map(l=>l.toTextmateString()).join("")}${c}}`}clone(){const c=new C(this.name);return this.transform&&(c.transform=this.transform.clone()),c._children=this.children.map(l=>l.clone()),c}}e.Variable=C;function r(f,c){const l=[...f];for(;l.length>0;){const s=l.shift();if(!c(s))break;l.unshift(...s.children)}}class u extends R{get placeholderInfo(){if(!this._placeholders){const c=[];let l;this.walk(function(s){return s instanceof E&&(c.push(s),l=!l||l.index<s.index?s:l),!0}),this._placeholders={all:c,last:l}}return this._placeholders}get placeholders(){const{all:c}=this.placeholderInfo;return c}offset(c){let l=0,s=!1;return this.walk(d=>d===c?(s=!0,!1):(l+=d.len(),!0)),s?l:-1}fullLen(c){let l=0;return r([c],s=>(l+=s.len(),!0)),l}enclosingPlaceholders(c){const l=[];let{parent:s}=c;for(;s;)s instanceof E&&l.push(s),s=s.parent;return l}resolveVariables(c){return this.walk(l=>(l instanceof C&&l.resolve(c)&&(this._placeholders=void 0),!0)),this}appendChild(c){return this._placeholders=void 0,super.appendChild(c)}replace(c,l){return this._placeholders=void 0,super.replace(c,l)}toTextmateString(){return this.children.reduce((c,l)=>c+l.toTextmateString(),"")}clone(){const c=new u;return this._children=this.children.map(l=>l.clone()),c}walk(c){r(this.children,c)}}e.TextmateSnippet=u;class i{constructor(){this._scanner=new p,this._token={type:14,pos:0,len:0}}static escape(c){return c.replace(/\$|}|\\/g,"\\$&")}static asInsertText(c){return new i().parse(c).toString()}static guessNeedsClipboard(c){return/\${?CLIPBOARD/.test(c)}parse(c,l,s){const d=new u;return this.parseFragment(c,d),this.ensureFinalTabstop(d,s??!1,l??!1),d}parseFragment(c,l){const s=l.children.length;for(this._scanner.text(c),this._token=this._scanner.next();this._parse(l););const d=new Map,n=[];l.walk(a=>(a instanceof E&&(a.isFinalTabstop?d.set(0,void 0):!d.has(a.index)&&a.children.length>0?d.set(a.index,a.children):n.push(a)),!0));for(const a of n){const o=d.get(a.index);if(o){const g=new E(a.index);g.transform=a.transform;for(const h of o)g.appendChild(h.clone());l.replace(a,[g])}}return l.children.slice(s)}ensureFinalTabstop(c,l,s){(l||s&&c.placeholders.length>0)&&(c.placeholders.find(n=>n.index===0)||c.appendChild(new E(0)))}_accept(c,l){if(c===void 0||this._token.type===c){const s=l?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),s}return!1}_backTo(c){return this._scanner.pos=c.pos+c.len,this._token=c,!1}_until(c){const l=this._token;for(;this._token.type!==c;){if(this._token.type===14)return!1;if(this._token.type===5){const d=this._scanner.next();if(d.type!==0&&d.type!==4&&d.type!==5)return!1}this._token=this._scanner.next()}const s=this._scanner.value.substring(l.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),s}_parse(c){return this._parseEscaped(c)||this._parseTabstopOrVariableName(c)||this._parseComplexPlaceholder(c)||this._parseComplexVariable(c)||this._parseAnything(c)}_parseEscaped(c){let l;return(l=this._accept(5,!0))?(l=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||l,c.appendChild(new A(l)),!0):!1}_parseTabstopOrVariableName(c){let l;const s=this._token;return this._accept(0)&&(l=this._accept(9,!0)||this._accept(8,!0))?(c.appendChild(/^\d+$/.test(l)?new E(Number(l)):new C(l)),!0):this._backTo(s)}_parseComplexPlaceholder(c){let l;const s=this._token;if(!(this._accept(0)&&this._accept(3)&&(l=this._accept(8,!0))))return this._backTo(s);const n=new E(Number(l));if(this._accept(1))for(;;){if(this._accept(4))return c.appendChild(n),!0;if(!this._parse(n))return c.appendChild(new A("${"+l+":")),n.children.forEach(c.appendChild,c),!0}else if(n.index>0&&this._accept(7)){const a=new I;for(;;){if(this._parseChoiceElement(a)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(a),this._accept(4)))return c.appendChild(n),!0}return this._backTo(s),!1}}else return this._accept(6)?this._parseTransform(n)?(c.appendChild(n),!0):(this._backTo(s),!1):this._accept(4)?(c.appendChild(n),!0):this._backTo(s)}_parseChoiceElement(c){const l=this._token,s=[];for(;!(this._token.type===2||this._token.type===7);){let d;if((d=this._accept(5,!0))?d=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||d:d=this._accept(void 0,!0),!d)return this._backTo(l),!1;s.push(d)}return s.length===0?(this._backTo(l),!1):(c.appendChild(new A(s.join(""))),!0)}_parseComplexVariable(c){let l;const s=this._token;if(!(this._accept(0)&&this._accept(3)&&(l=this._accept(9,!0))))return this._backTo(s);const n=new C(l);if(this._accept(1))for(;;){if(this._accept(4))return c.appendChild(n),!0;if(!this._parse(n))return c.appendChild(new A("${"+l+":")),n.children.forEach(c.appendChild,c),!0}else return this._accept(6)?this._parseTransform(n)?(c.appendChild(n),!0):(this._backTo(s),!1):this._accept(4)?(c.appendChild(n),!0):this._backTo(s)}_parseTransform(c){const l=new b;let s="",d="";for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(6,!0)||n,s+=n;continue}if(this._token.type!==14){s+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let n;if(n=this._accept(5,!0)){n=this._accept(5,!0)||this._accept(6,!0)||n,l.appendChild(new A(n));continue}if(!(this._parseFormatString(l)||this._parseAnything(l)))return!1}for(;!this._accept(4);){if(this._token.type!==14){d+=this._accept(void 0,!0);continue}return!1}try{l.regexp=new RegExp(s,d)}catch{return!1}return c.transform=l,!0}_parseFormatString(c){const l=this._token;if(!this._accept(0))return!1;let s=!1;this._accept(3)&&(s=!0);const d=this._accept(8,!0);if(d)if(s){if(this._accept(4))return c.appendChild(new S(Number(d))),!0;if(!this._accept(1))return this._backTo(l),!1}else return c.appendChild(new S(Number(d))),!0;else return this._backTo(l),!1;if(this._accept(6)){const n=this._accept(9,!0);return!n||!this._accept(4)?(this._backTo(l),!1):(c.appendChild(new S(Number(d),n)),!0)}else if(this._accept(11)){const n=this._until(4);if(n)return c.appendChild(new S(Number(d),void 0,n,void 0)),!0}else if(this._accept(12)){const n=this._until(4);if(n)return c.appendChild(new S(Number(d),void 0,void 0,n)),!0}else if(this._accept(13)){const n=this._until(1);if(n){const a=this._until(4);if(a)return c.appendChild(new S(Number(d),void 0,n,a)),!0}}else{const n=this._until(4);if(n)return c.appendChild(new S(Number(d),void 0,void 0,n)),!0}return this._backTo(l),!1}_parseAnything(c){return this._token.type!==14?(c.appendChild(new A(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=i}),define(ae[1231],le([1,0,16,2,359]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class A{constructor(E,I,b,S){this._disposables=new p.DisposableStore,this._disposables.add(b.onDidSuggest(C=>{C.completionModel.items.length===0&&this.reset()})),this._disposables.add(b.onDidCancel(C=>{this.reset()})),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(E.onWillType(C=>{if(this._active&&!I.isFrozen()&&b.state!==0){const r=C.charCodeAt(C.length-1);this._active.acceptCharacters.has(r)&&E.getOption(0)&&S(this._active.item)}}))}_onItem(E){if(!E||!(0,t.isNonEmptyArray)(E.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===E.item)return;const I=new R.CharacterSet;for(const b of E.item.completion.commitCharacters)b.length>0&&I.add(b.charCodeAt(0));this._active={acceptCharacters:I,item:E}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=A}),define(ae[1232],le([1,0,2]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class p{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 E=A.getSelections(),I=E.length;let b=!1;for(let C=0;C<I;C++)if(!E[C].isEmpty()){b=!0;break}if(!b)return;this._lastOvertyped=[];const S=A.getModel();for(let C=0;C<I;C++){const r=E[C];if(S.getValueLengthInRange(r)>p._maxSelectionLength)return;this._lastOvertyped[C]={value:S.getValueInRange(r),multiline:r.startLineNumber!==r.endLineNumber}}this._empty=!1})),this._disposables.add(k.onDidCancel(E=>{!this._empty&&!E.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=p,p._maxSelectionLength=51200}),define(ae[742],le([1,0,16,20,741]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordDistance=void 0;class A{static async create(E,I){if(!I.getOption(108).localityBonus||!I.hasModel())return A.None;const b=I.getModel(),S=I.getPosition();if(!E.canComputeWordRanges(b.uri))return A.None;const[C]=await new R.BracketSelectionRangeProvider().provideSelectionRanges(b,[S]);if(C.length===0)return A.None;const r=await E.computeWordRanges(b.uri,C[0].range);if(!r)return A.None;const u=b.getWordUntilPosition(S);return delete r[u.word],new class extends A{distance(i,f){if(!S.equals(I.getPosition()))return 0;if(f.kind===17)return 2<<20;const c=typeof f.label=="string"?f.label:f.label.label,l=r[c];if((0,t.isFalsyOrEmpty)(l))return 2<<20;const s=(0,t.binarySearch)(l,p.Range.fromPositions(i),p.Range.compareRangesUsingStarts),d=s>=0?l[s]:l[Math.max(0,~s-1)];let n=C.length;for(const a of C){if(!p.Range.containsRange(a.range,d))break;n-=1}return n}}}}e.WordDistance=A,A.None=new class extends A{distance(){return 0}}}),define(ae[1233],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(ae[1234],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/button/button",e)}),define(ae[1235],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/dialog/dialog",e)}),define(ae[1236],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/dropdown/dropdownActionViewItem",e)}),define(ae[1237],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/findinput/findInput",e)}),define(ae[1238],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(ae[1239],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(ae[1240],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(ae[1241],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(ae[1242],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(ae[1243],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/menu/menubar",e)}),define(ae[1244],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(ae[1245],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/splitview/paneview",e)}),define(ae[1246],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(ae[1247],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/tree/abstractTree",e)}),define(ae[1248],le([3,4]),function(J,e){return J.create("vs/base/browser/ui/tree/treeDefaults",e)}),define(ae[1249],le([3,4]),function(J,e){return J.create("vs/base/common/actions",e)}),define(ae[1250],le([3,4]),function(J,e){return J.create("vs/base/common/date",e)}),define(ae[208],le([1,0,1250]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toLocalISOString=e.fromNow=void 0;const p=60,R=p*60,A=R*24,k=A*7,E=A*30,I=A*365;function b(C,r,u){typeof C!="number"&&(C=C.getTime());const i=Math.round((new Date().getTime()-C)/1e3);if(i<-30)return(0,t.localize)(0,null,b(new Date().getTime()+i*1e3,!1));if(i<30)return(0,t.localize)(1,null);let f;return i<p?(f=i,r?f===1?u?(0,t.localize)(2,null,f):(0,t.localize)(3,null,f):u?(0,t.localize)(4,null,f):(0,t.localize)(5,null,f):f===1?u?(0,t.localize)(6,null,f):(0,t.localize)(7,null,f):u?(0,t.localize)(8,null,f):(0,t.localize)(9,null,f)):i<R?(f=Math.floor(i/p),r?f===1?u?(0,t.localize)(10,null,f):(0,t.localize)(11,null,f):u?(0,t.localize)(12,null,f):(0,t.localize)(13,null,f):f===1?u?(0,t.localize)(14,null,f):(0,t.localize)(15,null,f):u?(0,t.localize)(16,null,f):(0,t.localize)(17,null,f)):i<A?(f=Math.floor(i/R),r?f===1?u?(0,t.localize)(18,null,f):(0,t.localize)(19,null,f):u?(0,t.localize)(20,null,f):(0,t.localize)(21,null,f):f===1?u?(0,t.localize)(22,null,f):(0,t.localize)(23,null,f):u?(0,t.localize)(24,null,f):(0,t.localize)(25,null,f)):i<k?(f=Math.floor(i/A),r?f===1?(0,t.localize)(26,null,f):(0,t.localize)(27,null,f):f===1?(0,t.localize)(28,null,f):(0,t.localize)(29,null,f)):i<E?(f=Math.floor(i/k),r?f===1?u?(0,t.localize)(30,null,f):(0,t.localize)(31,null,f):u?(0,t.localize)(32,null,f):(0,t.localize)(33,null,f):f===1?u?(0,t.localize)(34,null,f):(0,t.localize)(35,null,f):u?(0,t.localize)(36,null,f):(0,t.localize)(37,null,f)):i<I?(f=Math.floor(i/E),r?f===1?u?(0,t.localize)(38,null,f):(0,t.localize)(39,null,f):u?(0,t.localize)(40,null,f):(0,t.localize)(41,null,f):f===1?u?(0,t.localize)(42,null,f):(0,t.localize)(43,null,f):u?(0,t.localize)(44,null,f):(0,t.localize)(45,null,f)):(f=Math.floor(i/I),r?f===1?u?(0,t.localize)(46,null,f):(0,t.localize)(47,null,f):u?(0,t.localize)(48,null,f):(0,t.localize)(49,null,f):f===1?u?(0,t.localize)(50,null,f):(0,t.localize)(51,null,f):u?(0,t.localize)(52,null,f):(0,t.localize)(53,null,f))}e.fromNow=b;function S(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=S}),define(ae[1251],le([3,4]),function(J,e){return J.create("vs/base/common/errorMessage",e)}),define(ae[117],le([1,0,16,13,1251]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createErrorWithActions=e.isErrorWithActions=e.toErrorMessage=void 0;function A(C,r){return r&&(C.stack||C.stacktrace)?R.localize(0,null,E(C),k(C.stack)||k(C.stacktrace)):E(C)}function k(C){return Array.isArray(C)?C.join(` `):C}function E(C){return typeof C.code=="string"&&typeof C.errno=="number"&&typeof C.syscall=="string"?R.localize(1,null,C.message):C.message||R.localize(2,null)}function I(C=null,r=!1){if(!C)return R.localize(3,null);if(Array.isArray(C)){const u=t.coalesce(C),i=I(u[0],r);return u.length>1?R.localize(4,null,i,u.length):i}if(p.isString(C))return C;if(C.detail){const u=C.detail;if(u.error)return A(u.error,r);if(u.exception)return A(u.exception,r)}return C.stack?A(C,r):C.message?C.message:R.localize(5,null)}e.toErrorMessage=I;function b(C){const r=C;return r instanceof Error&&Array.isArray(r.actions)}e.isErrorWithActions=b;function S(C,r){let u;return typeof C=="string"?u=new Error(C):u=C,u.actions=r,u}e.createErrorWithActions=S}),define(ae[1252],le([3,4]),function(J,e){return J.create("vs/base/common/jsonErrorMessages",e)}),define(ae[413],le([1,0,1252]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getParseErrorMessage=void 0;function p(R){switch(R){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=p}),define(ae[1253],le([3,4]),function(J,e){return J.create("vs/base/common/keybindingLabels",e)}),define(ae[327],le([1,0,1253]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class p{constructor(k,E,I=E){this.modifierLabels=[null],this.modifierLabels[2]=k,this.modifierLabels[1]=E,this.modifierLabels[3]=I}toLabel(k,E,I){if(E.length===0)return null;const b=[];for(let S=0,C=E.length;S<C;S++){const r=E[S],u=I(r);if(u===null)return null;b[S]=R(r,u,this.modifierLabels[k])}return b.join(" ")}}e.ModifierLabelProvider=p,e.UILabelProvider=new p({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 p({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 p({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"}),e.UserSettingsLabelProvider=new p({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 R(A,k,E){if(k===null)return"";const I=[];return A.ctrlKey&&I.push(E.ctrlKey),A.shiftKey&&I.push(E.shiftKey),A.altKey&&I.push(E.altKey),A.metaKey&&I.push(E.metaKey),k!==""&&I.push(k),I.join(E.separator)}}),define(ae[1254],le([3,4]),function(J,e){return J.create("vs/base/common/platform",e)}),define(ae[14],le([1,0,1254]),function(J,e,t){"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.setTimeout0IsFaster=e.translationsConfigFile=e.locale=e.Language=e.language=e.userAgent=e.platform=e.isCI=e.isMobile=e.isIOS=e.isWebWorker=e.isWeb=e.isElectron=e.isNative=e.isLinuxSnap=e.isLinux=e.isMacintosh=e.isWindows=e.PlatformToString=e.Platform=e.globals=e.LANGUAGE_DEFAULT=void 0,e.LANGUAGE_DEFAULT="en";let p=!1,R=!1,A=!1,k=!1,E=!1,I=!1,b=!1,S=!1,C=!1,r=!1,u,i=e.LANGUAGE_DEFAULT,f,c;e.globals=typeof self=="object"?self:typeof global=="object"?global:{};let l;typeof e.globals.vscode<"u"&&typeof e.globals.vscode.process<"u"?l=e.globals.vscode.process:typeof process<"u"&&(l=process);const s=typeof l?.versions?.electron=="string",d=s&&l?.type==="renderer";if(typeof navigator=="object"&&!d)c=navigator.userAgent,p=c.indexOf("Windows")>=0,R=c.indexOf("Macintosh")>=0,S=(c.indexOf("Macintosh")>=0||c.indexOf("iPad")>=0||c.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,A=c.indexOf("Linux")>=0,r=c?.indexOf("Mobi")>=0,I=!0,u=t.getConfiguredDefaultLocale(t.localize(0,null))||e.LANGUAGE_DEFAULT,i=u;else if(typeof l=="object"){p=l.platform==="win32",R=l.platform==="darwin",A=l.platform==="linux",k=A&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,b=s,C=!!l.env.CI||!!l.env.BUILD_ARTIFACTSTAGINGDIRECTORY,u=e.LANGUAGE_DEFAULT,i=e.LANGUAGE_DEFAULT;const D=l.env.VSCODE_NLS_CONFIG;if(D)try{const y=JSON.parse(D),T=y.availableLanguages["*"];u=y.locale,i=T||e.LANGUAGE_DEFAULT,f=y._translationsConfigFile}catch{}E=!0}else console.error("Unable to resolve platform.");var n;(function(D){D[D.Web=0]="Web",D[D.Mac=1]="Mac",D[D.Linux=2]="Linux",D[D.Windows=3]="Windows"})(n=e.Platform||(e.Platform={}));function a(D){switch(D){case 0:return"Web";case 1:return"Mac";case 2:return"Linux";case 3:return"Windows"}}e.PlatformToString=a;let o=0;R?o=1:p?o=3:A&&(o=2),e.isWindows=p,e.isMacintosh=R,e.isLinux=A,e.isLinuxSnap=k,e.isNative=E,e.isElectron=b,e.isWeb=I,e.isWebWorker=I&&typeof e.globals.importScripts=="function",e.isIOS=S,e.isMobile=r,e.isCI=C,e.platform=o,e.userAgent=c,e.language=i;var g;(function(D){function y(){return e.language}D.value=y;function T(){return e.language.length===2?e.language==="en":e.language.length>=3?e.language[0]==="e"&&e.language[1]==="n"&&e.language[2]==="-":!1}D.isDefaultVariant=T;function _(){return e.language==="en"}D.isDefault=_})(g=e.Language||(e.Language={})),e.locale=u,e.translationsConfigFile=f,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const D=[];e.globals.addEventListener("message",T=>{if(T.data&&T.data.vscodeScheduleAsyncWork)for(let _=0,L=D.length;_<L;_++){const M=D[_];if(M.id===T.data.vscodeScheduleAsyncWork){D.splice(_,1),M.callback();return}}});let y=0;return T=>{const _=++y;D.push({id:_,callback:T}),e.globals.postMessage({vscodeScheduleAsyncWork:_},"*")}}return D=>setTimeout(D)})();var h;(function(D){D[D.Windows=1]="Windows",D[D.Macintosh=2]="Macintosh",D[D.Linux=3]="Linux"})(h=e.OperatingSystem||(e.OperatingSystem={})),e.OS=R||S?2:p?1:3;let v=!0,m=!1;function w(){if(!m){m=!0;const D=new Uint8Array(2);D[0]=1,D[1]=2,v=new Uint16Array(D.buffer)[0]===(2<<8)+1}return v}e.isLittleEndian=w,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(ae[209],le([1,0,14]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arch=e.platform=e.env=e.cwd=void 0;let p;if(typeof t.globals.vscode<"u"&&typeof t.globals.vscode.process<"u"){const R=t.globals.vscode.process;p={get platform(){return R.platform},get arch(){return R.arch},get env(){return R.env},cwd(){return R.cwd()}}}else typeof process<"u"?p={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:p={get platform(){return t.isWindows?"win32":t.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=p.cwd,e.env=p.env,e.platform=p.platform,e.arch=p.arch}),define(ae[53],le([1,0,209]),function(J,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 p=65,R=97,A=90,k=122,E=46,I=47,b=92,S=58,C=63;class r extends Error{constructor(n,a,o){let g;typeof a=="string"&&a.indexOf("not ")===0?(g="must not be",a=a.replace(/^not /,"")):g="must be";const h=n.indexOf(".")!==-1?"property":"argument";let v=`The "${n}" ${h} ${g} of type ${a}`;v+=`. Received type ${typeof o}`,super(v),this.code="ERR_INVALID_ARG_TYPE"}}function u(d,n){if(typeof d!="string")throw new r(n,"string",d)}function i(d){return d===I||d===b}function f(d){return d===I}function c(d){return d>=p&&d<=A||d>=R&&d<=k}function l(d,n,a,o){let g="",h=0,v=-1,m=0,w=0;for(let D=0;D<=d.length;++D){if(D<d.length)w=d.charCodeAt(D);else{if(o(w))break;w=I}if(o(w)){if(!(v===D-1||m===1))if(m===2){if(g.length<2||h!==2||g.charCodeAt(g.length-1)!==E||g.charCodeAt(g.length-2)!==E){if(g.length>2){const y=g.lastIndexOf(a);y===-1?(g="",h=0):(g=g.slice(0,y),h=g.length-1-g.lastIndexOf(a)),v=D,m=0;continue}else if(g.length!==0){g="",h=0,v=D,m=0;continue}}n&&(g+=g.length>0?`${a}..`:"..",h=2)}else g.length>0?g+=`${a}${d.slice(v+1,D)}`:g=d.slice(v+1,D),h=D-v-1;v=D,m=0}else w===E&&m!==-1?++m:m=-1}return g}function s(d,n){if(n===null||typeof n!="object")throw new r("pathObject","Object",n);const a=n.dir||n.root,o=n.base||`${n.name||""}${n.ext||""}`;return a?a===n.root?`${a}${o}`:`${a}${d}${o}`:o}e.win32={resolve(...d){let n="",a="",o=!1;for(let g=d.length-1;g>=-1;g--){let h;if(g>=0){if(h=d[g],u(h,"path"),h.length===0)continue}else n.length===0?h=t.cwd():(h=t.env[`=${n}`]||t.cwd(),(h===void 0||h.slice(0,2).toLowerCase()!==n.toLowerCase()&&h.charCodeAt(2)===b)&&(h=`${n}\\`));const v=h.length;let m=0,w="",D=!1;const y=h.charCodeAt(0);if(v===1)i(y)&&(m=1,D=!0);else if(i(y))if(D=!0,i(h.charCodeAt(1))){let T=2,_=T;for(;T<v&&!i(h.charCodeAt(T));)T++;if(T<v&&T!==_){const L=h.slice(_,T);for(_=T;T<v&&i(h.charCodeAt(T));)T++;if(T<v&&T!==_){for(_=T;T<v&&!i(h.charCodeAt(T));)T++;(T===v||T!==_)&&(w=`\\\\${L}\\${h.slice(_,T)}`,m=T)}}}else m=1;else c(y)&&h.charCodeAt(1)===S&&(w=h.slice(0,2),m=2,v>2&&i(h.charCodeAt(2))&&(D=!0,m=3));if(w.length>0)if(n.length>0){if(w.toLowerCase()!==n.toLowerCase())continue}else n=w;if(o){if(n.length>0)break}else if(a=`${h.slice(m)}\\${a}`,o=D,D&&n.length>0)break}return a=l(a,!o,"\\",i),o?`${n}\\${a}`:`${n}${a}`||"."},normalize(d){u(d,"path");const n=d.length;if(n===0)return".";let a=0,o,g=!1;const h=d.charCodeAt(0);if(n===1)return f(h)?"\\":d;if(i(h))if(g=!0,i(d.charCodeAt(1))){let m=2,w=m;for(;m<n&&!i(d.charCodeAt(m));)m++;if(m<n&&m!==w){const D=d.slice(w,m);for(w=m;m<n&&i(d.charCodeAt(m));)m++;if(m<n&&m!==w){for(w=m;m<n&&!i(d.charCodeAt(m));)m++;if(m===n)return`\\\\${D}\\${d.slice(w)}\\`;m!==w&&(o=`\\\\${D}\\${d.slice(w,m)}`,a=m)}}}else a=1;else c(h)&&d.charCodeAt(1)===S&&(o=d.slice(0,2),a=2,n>2&&i(d.charCodeAt(2))&&(g=!0,a=3));let v=a<n?l(d.slice(a),!g,"\\",i):"";return v.length===0&&!g&&(v="."),v.length>0&&i(d.charCodeAt(n-1))&&(v+="\\"),o===void 0?g?`\\${v}`:v:g?`${o}\\${v}`:`${o}${v}`},isAbsolute(d){u(d,"path");const n=d.length;if(n===0)return!1;const a=d.charCodeAt(0);return i(a)||n>2&&c(a)&&d.charCodeAt(1)===S&&i(d.charCodeAt(2))},join(...d){if(d.length===0)return".";let n,a;for(let h=0;h<d.length;++h){const v=d[h];u(v,"path"),v.length>0&&(n===void 0?n=a=v:n+=`\\${v}`)}if(n===void 0)return".";let o=!0,g=0;if(typeof a=="string"&&i(a.charCodeAt(0))){++g;const h=a.length;h>1&&i(a.charCodeAt(1))&&(++g,h>2&&(i(a.charCodeAt(2))?++g:o=!1))}if(o){for(;g<n.length&&i(n.charCodeAt(g));)g++;g>=2&&(n=`\\${n.slice(g)}`)}return e.win32.normalize(n)},relative(d,n){if(u(d,"from"),u(n,"to"),d===n)return"";const a=e.win32.resolve(d),o=e.win32.resolve(n);if(a===o||(d=a.toLowerCase(),n=o.toLowerCase(),d===n))return"";let g=0;for(;g<d.length&&d.charCodeAt(g)===b;)g++;let h=d.length;for(;h-1>g&&d.charCodeAt(h-1)===b;)h--;const v=h-g;let m=0;for(;m<n.length&&n.charCodeAt(m)===b;)m++;let w=n.length;for(;w-1>m&&n.charCodeAt(w-1)===b;)w--;const D=w-m,y=v<D?v:D;let T=-1,_=0;for(;_<y;_++){const M=d.charCodeAt(g+_);if(M!==n.charCodeAt(m+_))break;M===b&&(T=_)}if(_!==y){if(T===-1)return o}else{if(D>y){if(n.charCodeAt(m+_)===b)return o.slice(m+_+1);if(_===2)return o.slice(m+_)}v>y&&(d.charCodeAt(g+_)===b?T=_:_===2&&(T=3)),T===-1&&(T=0)}let L="";for(_=g+T+1;_<=h;++_)(_===h||d.charCodeAt(_)===b)&&(L+=L.length===0?"..":"\\..");return m+=T,L.length>0?`${L}${o.slice(m,w)}`:(o.charCodeAt(m)===b&&++m,o.slice(m,w))},toNamespacedPath(d){if(typeof d!="string")return d;if(d.length===0)return"";const n=e.win32.resolve(d);if(n.length<=2)return d;if(n.charCodeAt(0)===b){if(n.charCodeAt(1)===b){const a=n.charCodeAt(2);if(a!==C&&a!==E)return`\\\\?\\UNC\\${n.slice(2)}`}}else if(c(n.charCodeAt(0))&&n.charCodeAt(1)===S&&n.charCodeAt(2)===b)return`\\\\?\\${n}`;return d},dirname(d){u(d,"path");const n=d.length;if(n===0)return".";let a=-1,o=0;const g=d.charCodeAt(0);if(n===1)return i(g)?d:".";if(i(g)){if(a=o=1,i(d.charCodeAt(1))){let m=2,w=m;for(;m<n&&!i(d.charCodeAt(m));)m++;if(m<n&&m!==w){for(w=m;m<n&&i(d.charCodeAt(m));)m++;if(m<n&&m!==w){for(w=m;m<n&&!i(d.charCodeAt(m));)m++;if(m===n)return d;m!==w&&(a=o=m+1)}}}}else c(g)&&d.charCodeAt(1)===S&&(a=n>2&&i(d.charCodeAt(2))?3:2,o=a);let h=-1,v=!0;for(let m=n-1;m>=o;--m)if(i(d.charCodeAt(m))){if(!v){h=m;break}}else v=!1;if(h===-1){if(a===-1)return".";h=a}return d.slice(0,h)},basename(d,n){n!==void 0&&u(n,"ext"),u(d,"path");let a=0,o=-1,g=!0,h;if(d.length>=2&&c(d.charCodeAt(0))&&d.charCodeAt(1)===S&&(a=2),n!==void 0&&n.length>0&&n.length<=d.length){if(n===d)return"";let v=n.length-1,m=-1;for(h=d.length-1;h>=a;--h){const w=d.charCodeAt(h);if(i(w)){if(!g){a=h+1;break}}else m===-1&&(g=!1,m=h+1),v>=0&&(w===n.charCodeAt(v)?--v===-1&&(o=h):(v=-1,o=m))}return a===o?o=m:o===-1&&(o=d.length),d.slice(a,o)}for(h=d.length-1;h>=a;--h)if(i(d.charCodeAt(h))){if(!g){a=h+1;break}}else o===-1&&(g=!1,o=h+1);return o===-1?"":d.slice(a,o)},extname(d){u(d,"path");let n=0,a=-1,o=0,g=-1,h=!0,v=0;d.length>=2&&d.charCodeAt(1)===S&&c(d.charCodeAt(0))&&(n=o=2);for(let m=d.length-1;m>=n;--m){const w=d.charCodeAt(m);if(i(w)){if(!h){o=m+1;break}continue}g===-1&&(h=!1,g=m+1),w===E?a===-1?a=m:v!==1&&(v=1):a!==-1&&(v=-1)}return a===-1||g===-1||v===0||v===1&&a===g-1&&a===o+1?"":d.slice(a,g)},format:s.bind(null,"\\"),parse(d){u(d,"path");const n={root:"",dir:"",base:"",ext:"",name:""};if(d.length===0)return n;const a=d.length;let o=0,g=d.charCodeAt(0);if(a===1)return i(g)?(n.root=n.dir=d,n):(n.base=n.name=d,n);if(i(g)){if(o=1,i(d.charCodeAt(1))){let T=2,_=T;for(;T<a&&!i(d.charCodeAt(T));)T++;if(T<a&&T!==_){for(_=T;T<a&&i(d.charCodeAt(T));)T++;if(T<a&&T!==_){for(_=T;T<a&&!i(d.charCodeAt(T));)T++;T===a?o=T:T!==_&&(o=T+1)}}}}else if(c(g)&&d.charCodeAt(1)===S){if(a<=2)return n.root=n.dir=d,n;if(o=2,i(d.charCodeAt(2))){if(a===3)return n.root=n.dir=d,n;o=3}}o>0&&(n.root=d.slice(0,o));let h=-1,v=o,m=-1,w=!0,D=d.length-1,y=0;for(;D>=o;--D){if(g=d.charCodeAt(D),i(g)){if(!w){v=D+1;break}continue}m===-1&&(w=!1,m=D+1),g===E?h===-1?h=D:y!==1&&(y=1):h!==-1&&(y=-1)}return m!==-1&&(h===-1||y===0||y===1&&h===m-1&&h===v+1?n.base=n.name=d.slice(v,m):(n.name=d.slice(v,h),n.base=d.slice(v,m),n.ext=d.slice(h,m))),v>0&&v!==o?n.dir=d.slice(0,v-1):n.dir=n.root,n},sep:"\\",delimiter:";",win32:null,posix:null},e.posix={resolve(...d){let n="",a=!1;for(let o=d.length-1;o>=-1&&!a;o--){const g=o>=0?d[o]:t.cwd();u(g,"path"),g.length!==0&&(n=`${g}/${n}`,a=g.charCodeAt(0)===I)}return n=l(n,!a,"/",f),a?`/${n}`:n.length>0?n:"."},normalize(d){if(u(d,"path"),d.length===0)return".";const n=d.charCodeAt(0)===I,a=d.charCodeAt(d.length-1)===I;return d=l(d,!n,"/",f),d.length===0?n?"/":a?"./":".":(a&&(d+="/"),n?`/${d}`:d)},isAbsolute(d){return u(d,"path"),d.length>0&&d.charCodeAt(0)===I},join(...d){if(d.length===0)return".";let n;for(let a=0;a<d.length;++a){const o=d[a];u(o,"path"),o.length>0&&(n===void 0?n=o:n+=`/${o}`)}return n===void 0?".":e.posix.normalize(n)},relative(d,n){if(u(d,"from"),u(n,"to"),d===n||(d=e.posix.resolve(d),n=e.posix.resolve(n),d===n))return"";const a=1,o=d.length,g=o-a,h=1,v=n.length-h,m=g<v?g:v;let w=-1,D=0;for(;D<m;D++){const T=d.charCodeAt(a+D);if(T!==n.charCodeAt(h+D))break;T===I&&(w=D)}if(D===m)if(v>m){if(n.charCodeAt(h+D)===I)return n.slice(h+D+1);if(D===0)return n.slice(h+D)}else g>m&&(d.charCodeAt(a+D)===I?w=D:D===0&&(w=0));let y="";for(D=a+w+1;D<=o;++D)(D===o||d.charCodeAt(D)===I)&&(y+=y.length===0?"..":"/..");return`${y}${n.slice(h+w)}`},toNamespacedPath(d){return d},dirname(d){if(u(d,"path"),d.length===0)return".";const n=d.charCodeAt(0)===I;let a=-1,o=!0;for(let g=d.length-1;g>=1;--g)if(d.charCodeAt(g)===I){if(!o){a=g;break}}else o=!1;return a===-1?n?"/":".":n&&a===1?"//":d.slice(0,a)},basename(d,n){n!==void 0&&u(n,"ext"),u(d,"path");let a=0,o=-1,g=!0,h;if(n!==void 0&&n.length>0&&n.length<=d.length){if(n===d)return"";let v=n.length-1,m=-1;for(h=d.length-1;h>=0;--h){const w=d.charCodeAt(h);if(w===I){if(!g){a=h+1;break}}else m===-1&&(g=!1,m=h+1),v>=0&&(w===n.charCodeAt(v)?--v===-1&&(o=h):(v=-1,o=m))}return a===o?o=m:o===-1&&(o=d.length),d.slice(a,o)}for(h=d.length-1;h>=0;--h)if(d.charCodeAt(h)===I){if(!g){a=h+1;break}}else o===-1&&(g=!1,o=h+1);return o===-1?"":d.slice(a,o)},extname(d){u(d,"path");let n=-1,a=0,o=-1,g=!0,h=0;for(let v=d.length-1;v>=0;--v){const m=d.charCodeAt(v);if(m===I){if(!g){a=v+1;break}continue}o===-1&&(g=!1,o=v+1),m===E?n===-1?n=v:h!==1&&(h=1):n!==-1&&(h=-1)}return n===-1||o===-1||h===0||h===1&&n===o-1&&n===a+1?"":d.slice(n,o)},format:s.bind(null,"/"),parse(d){u(d,"path");const n={root:"",dir:"",base:"",ext:"",name:""};if(d.length===0)return n;const a=d.charCodeAt(0)===I;let o;a?(n.root="/",o=1):o=0;let g=-1,h=0,v=-1,m=!0,w=d.length-1,D=0;for(;w>=o;--w){const y=d.charCodeAt(w);if(y===I){if(!m){h=w+1;break}continue}v===-1&&(m=!1,v=w+1),y===E?g===-1?g=w:D!==1&&(D=1):g!==-1&&(D=-1)}if(v!==-1){const y=h===0&&a?1:h;g===-1||D===0||D===1&&g===v-1&&g===h+1?n.base=n.name=d.slice(y,v):(n.name=d.slice(y,g),n.base=d.slice(y,v),n.ext=d.slice(g,v))}return h>0?n.dir=d.slice(0,h-1):a&&(n.dir="/"),n},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(ae[160],le([1,0,53]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeMimeType=e.getExtensionForMimeType=e.getMediaMime=e.getMediaOrTextMime=e.Mimes=void 0,e.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"});const p={".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"},R={".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 A(S){const C=(0,t.extname)(S),r=p[C.toLowerCase()];return r!==void 0?r:k(S)}e.getMediaOrTextMime=A;function k(S){const C=(0,t.extname)(S);return R[C.toLowerCase()]}e.getMediaMime=k;function E(S){for(const C in R)if(R[C]===S)return C}e.getExtensionForMimeType=E;const I=/^(.+)\/(.+?)(;.+)?$/;function b(S,C){const r=I.exec(S);return r?`${r[1].toLowerCase()}/${r[2].toLowerCase()}${r[3]??""}`:C?void 0:S}e.normalizeMimeType=b}),define(ae[743],le([1,0,14]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeDangerousEnvVariables=e.sanitizeProcessEnvironment=e.TerminateResponseCode=e.Source=void 0;var p;(function(E){E[E.stdout=0]="stdout",E[E.stderr=1]="stderr"})(p=e.Source||(e.Source={}));var R;(function(E){E[E.Success=0]="Success",E[E.Unknown=1]="Unknown",E[E.AccessDenied=2]="AccessDenied",E[E.ProcessNotFound=3]="ProcessNotFound"})(R=e.TerminateResponseCode||(e.TerminateResponseCode={}));function A(E,...I){const b=I.reduce((r,u)=>(r[u]=!0,r),{}),S=[/^ELECTRON_.+$/,/^VSCODE_(?!SHELL_LOGIN).+$/,/^SNAP(|_.*)$/,/^GDK_PIXBUF_.+$/];Object.keys(E).filter(r=>!b[r]).forEach(r=>{for(let u=0;u<S.length;u++)if(r.search(S[u])!==-1){delete E[r];break}})}e.sanitizeProcessEnvironment=A;function k(E){!E||(delete E.DEBUG,t.isMacintosh&&delete E.DYLD_LIBRARY_PATH,t.isLinux&&delete E.LD_PRELOAD)}e.removeDangerousEnvVariables=k}),define(ae[146],le([1,0,14]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopWatch=void 0;const p=t.globals.performance&&typeof t.globals.performance.now=="function";class R{static create(k=!0){return new R(k)}constructor(k){this._highResolution=p&&k,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}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=R}),define(ae[6],le([1,0,21,154,2,158,146]),function(J,e,t,p,R,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.EventDeliveryQueue=e.Emitter=e.setGlobalLeakWarningThreshold=e.EventProfiling=e.Event=void 0;const E=!1,I=!1;var b;(function(w){w.None=()=>R.Disposable.None;function D(ee){if(I){const{onListenerDidAdd:ie}=ee,re=i.create();let oe=0;ee.onListenerDidAdd=()=>{++oe===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),re.print()),ie?.()}}}function y(ee,ie){return z(ee,()=>{},0,void 0,void 0,ie)}w.defer=y;function T(ee,ie=0,re){return w.debounce(ee,(oe,se)=>oe?(oe.push(se),oe):[se],ie,void 0,void 0,re)}w.accumulate=T;function _(ee){return(ie,re=null,oe)=>{let se=!1,te;return te=ee(Z=>{if(!se)return te?te.dispose():se=!0,ie.call(re,Z)},null,oe),se&&te.dispose(),te}}w.once=_;function L(ee,ie,re){return V((oe,se=null,te)=>ee(Z=>oe.call(se,ie(Z)),null,te),re)}w.map=L;function M(ee,ie,re){return V((oe,se=null,te)=>ee(Z=>{ie(Z),oe.call(se,Z)},null,te),re)}w.forEach=M;function O(ee,ie,re){return V((oe,se=null,te)=>ee(Z=>ie(Z)&&oe.call(se,Z),null,te),re)}w.filter=O;function N(ee){return ee}w.signal=N;function P(...ee){return(ie,re=null,oe)=>(0,R.combinedDisposable)(...ee.map(se=>se(te=>ie.call(re,te),null,oe)))}w.any=P;function B(ee,ie,re,oe){let se=re;return L(ee,te=>(se=ie(se,te),se),oe)}w.reduce=B;function V(ee,ie){let re;const oe={onFirstListenerAdd(){re=ee(se.fire,se)},onLastListenerRemove(){re?.dispose()}};ie||D(oe);const se=new c(oe);return ie?.add(se),se.event}function z(ee,ie,re=100,oe=!1,se,te){let Z,ne,ce,de=0;const he={leakWarningThreshold:se,onFirstListenerAdd(){Z=ee(me=>{de++,ne=ie(ne,me),oe&&!ce&&(pe.fire(ne),ne=void 0),clearTimeout(ce),ce=setTimeout(()=>{const Se=ne;ne=void 0,ce=void 0,(!oe||de>1)&&pe.fire(Se),de=0},re)})},onLastListenerRemove(){Z.dispose()}};te||D(he);const pe=new c(he);return te?.add(pe),pe.event}w.debounce=z;function x(ee,ie=(oe,se)=>oe===se,re){let oe=!0,se;return O(ee,te=>{const Z=oe||!ie(te,se);return oe=!1,se=te,Z},re)}w.latch=x;function H(ee,ie,re){return[w.filter(ee,ie,re),w.filter(ee,oe=>!ie(oe),re)]}w.split=H;function W(ee,ie=!1,re=[]){let oe=re.slice(),se=ee(ne=>{oe?oe.push(ne):Z.fire(ne)});const te=()=>{oe?.forEach(ne=>Z.fire(ne)),oe=null},Z=new c({onFirstListenerAdd(){se||(se=ee(ne=>Z.fire(ne)))},onFirstListenerDidAdd(){oe&&(ie?setTimeout(te):te())},onLastListenerRemove(){se&&se.dispose(),se=null}});return Z.event}w.buffer=W;class U{constructor(ie){this.event=ie,this.disposables=new R.DisposableStore}map(ie){return new U(L(this.event,ie,this.disposables))}forEach(ie){return new U(M(this.event,ie,this.disposables))}filter(ie){return new U(O(this.event,ie,this.disposables))}reduce(ie,re){return new U(B(this.event,ie,re,this.disposables))}latch(){return new U(x(this.event,void 0,this.disposables))}debounce(ie,re=100,oe=!1,se){return new U(z(this.event,ie,re,oe,se,this.disposables))}on(ie,re,oe){return this.event(ie,re,oe)}once(ie,re,oe){return _(this.event)(ie,re,oe)}dispose(){this.disposables.dispose()}}function $(ee){return new U(ee)}w.chain=$;function q(ee,ie,re=oe=>oe){const oe=(...ne)=>Z.fire(re(...ne)),se=()=>ee.on(ie,oe),te=()=>ee.removeListener(ie,oe),Z=new c({onFirstListenerAdd:se,onLastListenerRemove:te});return Z.event}w.fromNodeEventEmitter=q;function X(ee,ie,re=oe=>oe){const oe=(...ne)=>Z.fire(re(...ne)),se=()=>ee.addEventListener(ie,oe),te=()=>ee.removeEventListener(ie,oe),Z=new c({onFirstListenerAdd:se,onLastListenerRemove:te});return Z.event}w.fromDOMEventEmitter=X;function G(ee){return new Promise(ie=>_(ee)(ie))}w.toPromise=G;function Q(ee,ie){return ie(void 0),ee(re=>ie(re))}w.runAndSubscribe=Q;function j(ee,ie){let re=null;function oe(te){re?.dispose(),re=new R.DisposableStore,ie(te,re)}oe(void 0);const se=ee(te=>oe(te));return(0,R.toDisposable)(()=>{se.dispose(),re?.dispose()})}w.runAndSubscribeWithStore=j;class K{constructor(ie,re){this.obs=ie,this._counter=0,this._hasChanged=!1;const oe={onFirstListenerAdd:()=>{ie.addObserver(this)},onLastListenerRemove:()=>{ie.removeObserver(this)}};re||D(oe),this.emitter=new c(oe),re&&re.add(this.emitter)}beginUpdate(ie){this._counter++}handleChange(ie,re){this._hasChanged=!0}endUpdate(ie){--this._counter===0&&this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this.obs.get()))}}function Y(ee,ie){return new K(ee,ie).emitter.event}w.fromObservable=Y})(b=e.Event||(e.Event={}));class S{constructor(D){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${D}_${S._idPool++}`,S.all.add(this)}start(D){this._stopWatch=new k.StopWatch(!0),this.listenerCount=D}stop(){if(this._stopWatch){const D=this._stopWatch.elapsed();this.durations.push(D),this.elapsedOverall+=D,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=S,S.all=new Set,S._idPool=0;let C=-1;function r(w){const D=C;return C=w,{dispose(){C=D}}}e.setGlobalLeakWarningThreshold=r;class u{constructor(D,y=Math.random().toString(18).slice(2,5)){this.customThreshold=D,this.name=y,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(D,y){let T=C;if(typeof this.customThreshold=="number"&&(T=this.customThreshold),T<=0||y<T)return;this._stacks||(this._stacks=new Map);const _=this._stacks.get(D.value)||0;if(this._stacks.set(D.value,_+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=T*.5;let L,M=0;for(const[O,N]of this._stacks)(!L||M<N)&&(L=O,M=N);console.warn(`[${this.name}] potential listener LEAK detected, having ${y} listeners already. MOST frequent listener (${M}):`),console.warn(L)}return()=>{const L=this._stacks.get(D.value)||0;this._stacks.set(D.value,L-1)}}}class i{static create(){return new i(new Error().stack??"")}constructor(D){this.value=D}print(){console.warn(this.value.split(` `).slice(2).join(` `))}}class f{constructor(D,y,T){this.callback=D,this.callbackThis=y,this.stack=T,this.subscription=new R.SafeDisposable}invoke(D){this.callback.call(this.callbackThis,D)}}class c{constructor(D){this._disposed=!1,this._options=D,this._leakageMon=C>0?new u(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=this._options?._profName?new S(this._options._profName):void 0,this._deliveryQueue=this._options?.deliveryQueue}dispose(){if(!this._disposed){if(this._disposed=!0,this._listeners){if(E){const D=Array.from(this._listeners);queueMicrotask(()=>{for(const y of D)y.subscription.isset()&&(y.subscription.unset(),y.stack?.print())})}this._listeners.clear()}this._deliveryQueue?.clear(this),this._options?.onLastListenerRemove?.(),this._leakageMon?.dispose()}}get event(){return this._event||(this._event=(D,y,T)=>{this._listeners||(this._listeners=new A.LinkedList);const _=this._listeners.isEmpty();_&&this._options?.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);let L,M;this._leakageMon&&this._listeners.size>=30&&(M=i.create(),L=this._leakageMon.check(M,this._listeners.size+1)),E&&(M=M??i.create());const O=new f(D,y,M),N=this._listeners.push(O);_&&this._options?.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options?.onListenerDidAdd&&this._options.onListenerDidAdd(this,D,y);const P=O.subscription.set(()=>{L?.(),this._disposed||(N(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return T instanceof R.DisposableStore?T.add(P):Array.isArray(T)&&T.push(P),P}),this._event}fire(D){if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s);for(const y of this._listeners)this._deliveryQueue.push(this,y,D);this._perfMon?.start(this._deliveryQueue.size),this._deliveryQueue.deliver(),this._perfMon?.stop()}}hasListeners(){return this._listeners?!this._listeners.isEmpty():!1}}e.Emitter=c;class l{constructor(){this._queue=new A.LinkedList}get size(){return this._queue.size}push(D,y,T){this._queue.push(new d(D,y,T))}clear(D){const y=new A.LinkedList;for(const T of this._queue)T.emitter!==D&&y.push(T);this._queue=y}deliver(){for(;this._queue.size>0;){const D=this._queue.shift();try{D.listener.invoke(D.event)}catch(y){(0,t.onUnexpectedError)(y)}}}}e.EventDeliveryQueue=l;class s extends l{clear(D){this._queue.clear()}}class d{constructor(D,y,T){this.emitter=D,this.listener=y,this.event=T}}class n extends c{async fireAsync(D,y,T){if(!!this._listeners){this._asyncDeliveryQueue||(this._asyncDeliveryQueue=new A.LinkedList);for(const _ of this._listeners)this._asyncDeliveryQueue.push([_,D]);for(;this._asyncDeliveryQueue.size>0&&!y.isCancellationRequested;){const[_,L]=this._asyncDeliveryQueue.shift(),M=[],O={...L,token:y,waitUntil:N=>{if(Object.isFrozen(M))throw new Error("waitUntil can NOT be called asynchronous");T&&(N=T(N,_.callback)),M.push(N)}};try{_.invoke(O)}catch(N){(0,t.onUnexpectedError)(N);continue}Object.freeze(M),await Promise.allSettled(M).then(N=>{for(const P of N)P.status==="rejected"&&(0,t.onUnexpectedError)(P.reason)})}}}}e.AsyncEmitter=n;class a extends c{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){if(this._eventQueue.size>0){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=a;class o extends a{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=o;class g extends c{constructor(D){super(D),this._queuedEvents=[],this._mergeFn=D?.merge}fire(D){!this.hasListeners()||(this._queuedEvents.push(D),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(y=>super.fire(y)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=g;class h{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new c({onFirstListenerAdd:()=>this.onFirstListenerAdd(),onLastListenerRemove:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(D){const y={event:D,listener:null};this.events.push(y),this.hasListeners&&this.hook(y);const T=()=>{this.hasListeners&&this.unhook(y);const _=this.events.indexOf(y);this.events.splice(_,1)};return(0,R.toDisposable)((0,p.once)(T))}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(y=>this.emitter.fire(y))}unhook(D){D.listener&&D.listener.dispose(),D.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=h;class v{constructor(){this.buffers=[]}wrapEvent(D){return(y,T,_)=>D(L=>{const M=this.buffers[this.buffers.length-1];M?M.push(()=>y.call(T,L)):y.call(T,L)},void 0,_)}bufferEvents(D){const y=[];this.buffers.push(y);const T=D();return this.buffers.pop(),y.forEach(_=>_()),T}}e.EventBufferer=v;class m{constructor(){this.listening=!1,this.inputEvent=b.None,this.inputEventListener=R.Disposable.None,this.emitter=new c({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=m}),define(ae[86],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWCOVisible=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 R{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(n,a){this._zoomLevel!==n&&(this._zoomLevel=n)}getZoomFactor(){return this._zoomFactor}setZoomFactor(n){this._zoomFactor=n}setFullscreen(n){this._fullscreen!==n&&(this._fullscreen=n,this._onDidChangeFullscreen.fire())}isFullscreen(){return this._fullscreen}}R.INSTANCE=new R;class A extends p.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(n){this._mediaQueryList?.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),n&&this._onDidChange.fire()}}class k extends p.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const n=this._register(new A);this._register(n.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const n=document.createElement("canvas").getContext("2d"),a=window.devicePixelRatio||1,o=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;return a/o}}class E{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,p.markAsSingleton)(new k)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function I(d,n){typeof d=="string"&&(d=window.matchMedia(d)),d.addEventListener("change",n)}e.addMatchMediaChangeListener=I,e.PixelRatio=new E;function b(d,n){R.INSTANCE.setZoomLevel(d,n)}e.setZoomLevel=b;function S(){return R.INSTANCE.getZoomLevel()}e.getZoomLevel=S;function C(){return R.INSTANCE.getZoomFactor()}e.getZoomFactor=C;function r(d){R.INSTANCE.setZoomFactor(d)}e.setZoomFactor=r;function u(d){R.INSTANCE.setFullscreen(d)}e.setFullscreen=u;function i(){return R.INSTANCE.isFullscreen()}e.isFullscreen=i,e.onDidChangeFullscreen=R.INSTANCE.onDidChangeFullscreen;const f=navigator.userAgent;e.isFirefox=f.indexOf("Firefox")>=0,e.isWebKit=f.indexOf("AppleWebKit")>=0,e.isChrome=f.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&f.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=f.indexOf("Electron/")>=0,e.isAndroid=f.indexOf("Android")>=0;let c=!1;if(window.matchMedia){const d=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),n=window.matchMedia("(display-mode: fullscreen)");c=d.matches,I(d,({matches:a})=>{c&&n.matches||(c=a)})}function l(){return c}e.isStandalone=l;function s(){return navigator?.windowControlsOverlay?.visible}e.isWCOVisible=s}),define(ae[237],le([1,0,86,14]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=e.KeyboardSupport=void 0;var R;(function(A){A[A.Always=0]="Always",A[A.FullScreen=1]="FullScreen",A[A.None=2]="None"})(R=e.KeyboardSupport||(e.KeyboardSupport={})),e.BrowserFeatures={clipboard:{writeText:p.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:p.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>p.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(ae[195],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class p{get event(){return this.emitter.event}constructor(A,k,E){const I=b=>this.emitter.fire(b);this.emitter=new t.Emitter({onFirstListenerAdd:()=>A.addEventListener(k,I,E),onLastListenerRemove:()=>A.removeEventListener(k,I,E)})}dispose(){this.emitter.dispose()}}e.DomEmitter=p}),define(ae[90],le([1,0,86,99,234,14]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=e.printStandardKeyboardEvent=e.printKeyboardEvent=void 0;function k(i){if(i.charCode){const c=String.fromCharCode(i.charCode).toUpperCase();return p.KeyCodeUtils.fromString(c)}const f=i.keyCode;if(f===3)return 7;if(t.isFirefox){if(f===59)return 80;if(f===107)return 81;if(f===109)return 83;if(A.isMacintosh&&f===224)return 57}else if(t.isWebKit){if(f===91)return 57;if(A.isMacintosh&&f===93)return 57;if(!A.isMacintosh&&f===92)return 57}return p.EVENT_KEY_CODE_MAP[f]||0}const E=A.isMacintosh?256:2048,I=512,b=1024,S=A.isMacintosh?2048:256;function C(i){const f=[];return i.ctrlKey&&f.push("ctrl"),i.shiftKey&&f.push("shift"),i.altKey&&f.push("alt"),i.metaKey&&f.push("meta"),`modifiers: [${f.join(",")}], code: ${i.code}, keyCode: ${i.keyCode}, key: ${i.key}`}e.printKeyboardEvent=C;function r(i){const f=[];return i.ctrlKey&&f.push("ctrl"),i.shiftKey&&f.push("shift"),i.altKey&&f.push("alt"),i.metaKey&&f.push("meta"),`modifiers: [${f.join(",")}], code: ${i.code}, keyCode: ${i.keyCode} ('${p.KeyCodeUtils.toString(i.keyCode)}')`}e.printStandardKeyboardEvent=r;class u{constructor(f){this._standardKeyboardEventBrand=!0;const c=f;this.browserEvent=c,this.target=c.target,this.ctrlKey=c.ctrlKey,this.shiftKey=c.shiftKey,this.altKey=c.altKey,this.metaKey=c.metaKey,this.keyCode=k(c),this.code=c.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(f){return this._asKeybinding===f}_computeKeybinding(){let f=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(f=this.keyCode);let c=0;return this.ctrlKey&&(c|=E),this.altKey&&(c|=I),this.shiftKey&&(c|=b),this.metaKey&&(c|=S),c|=f,c}_computeRuntimeKeybinding(){let f=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(f=this.keyCode),new R.SimpleKeybinding(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,f)}}e.StandardKeyboardEvent=u}),define(ae[139],le([1,0,86,1020,14]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.DragMouseEvent=e.StandardMouseEvent=void 0;class A{constructor(b){this.timestamp=Date.now(),this.browserEvent=b,this.leftButton=b.button===0,this.middleButton=b.button===1,this.rightButton=b.button===2,this.buttons=b.buttons,this.target=b.target,this.detail=b.detail||1,b.type==="dblclick"&&(this.detail=2),this.ctrlKey=b.ctrlKey,this.shiftKey=b.shiftKey,this.altKey=b.altKey,this.metaKey=b.metaKey,typeof b.pageX=="number"?(this.posx=b.pageX,this.posy=b.pageY):(this.posx=b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=b.clientY+document.body.scrollTop+document.documentElement.scrollTop);const S=p.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(self,b.view);this.posx-=S.left,this.posy-=S.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=A;class k extends A{constructor(b){super(b),this.dataTransfer=b.dataTransfer}}e.DragMouseEvent=k;class E{constructor(b,S=0,C=0){if(this.browserEvent=b||null,this.target=b?b.target||b.targetNode||b.srcElement:null,this.deltaY=C,this.deltaX=S,b){const r=b,u=b;if(typeof r.wheelDeltaY<"u")this.deltaY=r.wheelDeltaY/120;else if(typeof u.VERTICAL_AXIS<"u"&&u.axis===u.VERTICAL_AXIS)this.deltaY=-u.detail/3;else if(b.type==="wheel"){const i=b;i.deltaMode===i.DOM_DELTA_LINE?t.isFirefox&&!R.isMacintosh?this.deltaY=-b.deltaY/3:this.deltaY=-b.deltaY:this.deltaY=-b.deltaY/40}if(typeof r.wheelDeltaX<"u")t.isSafari&&R.isWindows?this.deltaX=-(r.wheelDeltaX/120):this.deltaX=r.wheelDeltaX/120;else if(typeof u.HORIZONTAL_AXIS<"u"&&u.axis===u.HORIZONTAL_AXIS)this.deltaX=-b.detail/3;else if(b.type==="wheel"){const i=b;i.deltaMode===i.DOM_DELTA_LINE?t.isFirefox&&!R.isMacintosh?this.deltaX=-b.deltaX/3:this.deltaX=-b.deltaX:this.deltaX=-b.deltaX/40}this.deltaY===0&&this.deltaX===0&&b.wheelDelta&&(this.deltaY=b.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}e.StandardWheelEvent=E}),define(ae[36],le([1,0,6,2,1249]),function(J,e,t,p,R){"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 p.Disposable{constructor(r,u="",i="",f=!0,c){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=r,this._label=u,this._cssClass=i,this._enabled=f,this._actionCallback=c}get id(){return this._id}get label(){return this._label}set label(r){this._setLabel(r)}_setLabel(r){this._label!==r&&(this._label=r,this._onDidChange.fire({label:r}))}get tooltip(){return this._tooltip||""}set tooltip(r){this._setTooltip(r)}_setTooltip(r){this._tooltip!==r&&(this._tooltip=r,this._onDidChange.fire({tooltip:r}))}get class(){return this._cssClass}set class(r){this._setClass(r)}_setClass(r){this._cssClass!==r&&(this._cssClass=r,this._onDidChange.fire({class:r}))}get enabled(){return this._enabled}set enabled(r){this._setEnabled(r)}_setEnabled(r){this._enabled!==r&&(this._enabled=r,this._onDidChange.fire({enabled:r}))}get checked(){return this._checked}set checked(r){this._setChecked(r)}_setChecked(r){this._checked!==r&&(this._checked=r,this._onDidChange.fire({checked:r}))}async run(r,u){this._actionCallback&&await this._actionCallback(r)}}e.Action=A;class k extends p.Disposable{constructor(){super(...arguments),this._onWillRun=this._register(new t.Emitter),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new t.Emitter),this.onDidRun=this._onDidRun.event}async run(r,u){if(!r.enabled)return;this._onWillRun.fire({action:r});let i;try{await this.runAction(r,u)}catch(f){i=f}this._onDidRun.fire({action:r,error:i})}async runAction(r,u){await r.run(u)}}e.ActionRunner=k;class E{constructor(){this.id=E.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...r){let u=[];for(const i of r)i.length&&(u.length?u=[...u,new E,...i]:u=i);return u}async run(){}}e.Separator=E,E.ID="vs.actions.separator";class I{get actions(){return this._actions}constructor(r,u,i,f){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=r,this.label=u,this.class=f,this._actions=i}async run(){}}e.SubmenuAction=I;class b extends A{constructor(){super(b.ID,R.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=b,b.ID="vs.actions.empty";function S(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}}e.toAction=S}),define(ae[1255],le([1,0,36,1248]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapseAllAction=void 0;class R extends t.Action{constructor(k,E){super("vs.tree.collapse",p.localize(0,null),"collapse-all",E),this.viewer=k}async run(){this.viewer.collapseAll(),this.viewer.setSelection([]),this.viewer.setFocus([])}}e.CollapseAllAction=R}),define(ae[32],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const p=Object.freeze(function(E,I){const b=setTimeout(E.bind(I),0);return{dispose(){clearTimeout(b)}}});var R;(function(E){function I(b){return b===E.None||b===E.Cancelled||b instanceof A?!0:!b||typeof b!="object"?!1:typeof b.isCancellationRequested=="boolean"&&typeof b.onCancellationRequested=="function"}E.isCancellationToken=I,E.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:t.Event.None}),E.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:p})})(R=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?p:(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=R.Cancelled}dispose(I=!1){I&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof A&&this._token.dispose():this._token=R.None}}e.CancellationTokenSource=k}),define(ae[573],le([1,0,32]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=e.Cache=void 0;class p{constructor(E){this.task=E,this.result=null}get(){if(this.result)return this.result;const E=new t.CancellationTokenSource,I=this.task(E.token);return this.result={promise:I,dispose:()=>{this.result=null,E.cancel(),E.dispose()}},this.result}}e.Cache=p;class R{constructor(E){this.fn=E,this.lastCache=void 0,this.lastArgKey=void 0}get(E){const I=JSON.stringify(E);return this.lastArgKey!==I&&(this.lastArgKey=I,this.lastCache=this.fn(E)),this.lastCache}}e.LRUCachedFunction=R;class A{get cachedValues(){return this._map}constructor(E){this.fn=E,this._map=new Map}get(E){if(this._map.has(E))return this._map.get(E);const I=this.fn(E);return this._map.set(E,I),I}}e.CachedFunction=A}),define(ae[744],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MutableObservableValue=e.staticObservableValue=void 0;const R=k=>({onDidChange:t.Event.None,value:k});e.staticObservableValue=R;class A extends p.Disposable{get value(){return this._value}set value(E){E!==this._value&&(this._value=E,this.changeEmitter.fire(E))}constructor(E){super(),this._value=E,this.changeEmitter=this._register(new t.Emitter),this.onDidChange=this.changeEmitter.event}}e.MutableObservableValue=A}),define(ae[745],le([1,0,16,32,21]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapPager=e.DelayedPagedModel=e.PagedModel=e.singlePagePager=void 0;function A(S){return{isResolved:!!S,promise:null,cts:null,promiseIndexes:new Set,elements:S||[]}}function k(S){return{firstPage:S,total:S.length,pageSize:S.length,getPage:(C,r)=>Promise.resolve(S)}}e.singlePagePager=k;class E{get length(){return this.pager.total}constructor(C){this.pages=[],this.pager=Array.isArray(C)?k(C):C;const r=Math.ceil(this.pager.total/this.pager.pageSize);this.pages=[A(this.pager.firstPage.slice()),...(0,t.range)(r-1).map(()=>A())]}isResolved(C){const r=Math.floor(C/this.pager.pageSize);return!!this.pages[r].isResolved}get(C){const r=Math.floor(C/this.pager.pageSize),u=C%this.pager.pageSize;return this.pages[r].elements[u]}resolve(C,r){if(r.isCancellationRequested)return Promise.reject((0,R.canceled)());const u=Math.floor(C/this.pager.pageSize),i=C%this.pager.pageSize,f=this.pages[u];return f.isResolved?Promise.resolve(f.elements[i]):(f.promise||(f.cts=new p.CancellationTokenSource,f.promise=this.pager.getPage(u,f.cts.token).then(c=>{f.elements=c,f.isResolved=!0,f.promise=null,f.cts=null},c=>(f.isResolved=!1,f.promise=null,f.cts=null,Promise.reject(c)))),r.onCancellationRequested(()=>{!f.cts||(f.promiseIndexes.delete(C),f.promiseIndexes.size===0&&f.cts.cancel())}),f.promiseIndexes.add(C),f.promise.then(()=>f.elements[i]))}}e.PagedModel=E;class I{get length(){return this.model.length}constructor(C,r=500){this.model=C,this.timeout=r}isResolved(C){return this.model.isResolved(C)}get(C){return this.model.get(C)}resolve(C,r){return new Promise((u,i)=>{if(r.isCancellationRequested)return i((0,R.canceled)());const f=setTimeout(()=>{if(r.isCancellationRequested)return i((0,R.canceled)());c.dispose(),this.model.resolve(C,r).then(u,i)},this.timeout),c=r.onCancellationRequested(()=>{clearTimeout(f),c.dispose(),i((0,R.canceled)())})})}}e.DelayedPagedModel=I;function b(S,C){return{firstPage:S.firstPage.map(C),total:S.total,pageSize:S.pageSize,getPage:(r,u)=>S.getPage(r,u).then(i=>i.map(C))}}e.mapPager=b}),define(ae[486],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=e.ScrollbarVisibility=void 0;var R;(function(u){u[u.Auto=1]="Auto",u[u.Hidden=2]="Hidden",u[u.Visible=3]="Visible"})(R=e.ScrollbarVisibility||(e.ScrollbarVisibility={}));class A{constructor(i,f,c,l,s,d,n){this._forceIntegerValues=i,this._scrollStateBrand=void 0,this._forceIntegerValues&&(f=f|0,c=c|0,l=l|0,s=s|0,d=d|0,n=n|0),this.rawScrollLeft=l,this.rawScrollTop=n,f<0&&(f=0),l+f>c&&(l=c-f),l<0&&(l=0),s<0&&(s=0),n+s>d&&(n=d-s),n<0&&(n=0),this.width=f,this.scrollWidth=c,this.scrollLeft=l,this.height=s,this.scrollHeight=d,this.scrollTop=n}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,f){return new A(this._forceIntegerValues,typeof i.width<"u"?i.width:this.width,typeof i.scrollWidth<"u"?i.scrollWidth:this.scrollWidth,f?this.rawScrollLeft:this.scrollLeft,typeof i.height<"u"?i.height:this.height,typeof i.scrollHeight<"u"?i.scrollHeight:this.scrollHeight,f?this.rawScrollTop:this.scrollTop)}withScrollPosition(i){return new A(this._forceIntegerValues,this.width,this.scrollWidth,typeof i.scrollLeft<"u"?i.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof i.scrollTop<"u"?i.scrollTop:this.rawScrollTop)}createScrollEvent(i,f){const c=this.width!==i.width,l=this.scrollWidth!==i.scrollWidth,s=this.scrollLeft!==i.scrollLeft,d=this.height!==i.height,n=this.scrollHeight!==i.scrollHeight,a=this.scrollTop!==i.scrollTop;return{inSmoothScrolling:f,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:c,scrollWidthChanged:l,scrollLeftChanged:s,heightChanged:d,scrollHeightChanged:n,scrollTopChanged:a}}}e.ScrollState=A;class k extends p.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,f){const c=this._state.withScrollDimensions(i,f);this._setState(c,Boolean(this._smoothScrolling)),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(i){const f=this._state.withScrollPosition(i);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(f,!1)}setScrollPositionSmooth(i,f){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(i);if(this._smoothScrolling){i={scrollLeft:typeof i.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:i.scrollLeft,scrollTop:typeof i.scrollTop>"u"?this._smoothScrolling.to.scrollTop:i.scrollTop};const c=this._state.withScrollPosition(i);if(this._smoothScrolling.to.scrollLeft===c.scrollLeft&&this._smoothScrolling.to.scrollTop===c.scrollTop)return;let l;f?l=new S(this._smoothScrolling.from,c,this._smoothScrolling.startTime,this._smoothScrolling.duration):l=this._smoothScrolling.combine(this._state,c,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=l}else{const c=this._state.withScrollPosition(i);this._smoothScrolling=S.start(this._state,c,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(),f=this._state.withScrollPosition(i);if(this._setState(f,!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,f){const c=this._state;c.equals(i)||(this._state=i,this._onScroll.fire(this._state.createScrollEvent(c,f)))}}e.Scrollable=k;class E{constructor(i,f,c){this.scrollLeft=i,this.scrollTop=f,this.isDone=c}}e.SmoothScrollingUpdate=E;function I(u,i){const f=i-u;return function(c){return u+f*r(c)}}function b(u,i,f){return function(c){return c<f?u(c/f):i((c-f)/(1-f))}}class S{constructor(i,f,c,l){this.from=i,this.to=f,this.duration=l,this.startTime=c,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,f,c){if(Math.abs(i-f)>2.5*c){let s,d;return i<f?(s=i+.75*c,d=f-.75*c):(s=i-.75*c,d=f+.75*c),b(I(i,s),I(d,f),.33)}return I(i,f)}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 f=(i-this.startTime)/this.duration;if(f<1){const c=this.scrollLeft(f),l=this.scrollTop(f);return new E(c,l,!1)}return new E(this.to.scrollLeft,this.to.scrollTop,!0)}combine(i,f,c){return S.start(i,f,c)}static start(i,f,c){c=c+10;const l=Date.now()-10;return new S(i,f,l,c)}}e.SmoothScrollingOperation=S;function C(u){return Math.pow(u,3)}function r(u){return 1-C(1-u)}}),define(ae[1256],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sequence=void 0;class p{constructor(){this.elements=[],this._onDidSplice=new t.Emitter,this.onDidSplice=this._onDidSplice.event}splice(A,k,E=[]){this.elements.splice(A,k,...E),this._onDidSplice.fire({start:A,deleteCount:k,toInsert:E})}}e.Sequence=p}),define(ae[28],le([1,0,573,206]),function(J,e,t,p){"use strict";var R;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.charCount=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.isAsciiDigit=e.compareSubstringIgnoreCase=e.compareIgnoreCase=e.compareSubstring=e.compare=e.replaceAsync=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(Re){return!Re||typeof Re!="string"?!0:Re.trim().length===0}e.isFalsyOrWhitespace=A;const k=/{(\d+)}/g;function E(Re,...Le){return Le.length===0?Re:Re.replace(k,function(Me,Oe){const Ke=parseInt(Oe,10);return isNaN(Ke)||Ke<0||Ke>=Le.length?Me:Le[Ke]})}e.format=E;const I=/{([^}]+)}/g;function b(Re,Le){return Re.replace(I,(Me,Oe)=>Le[Oe]??Me)}e.format2=b;function S(Re){return Re.replace(/[<>&]/g,function(Le){switch(Le){case"<":return"<";case">":return">";case"&":return"&";default:return Le}})}e.escape=S;function C(Re){return Re.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=C;function r(Re,Le){let Me=0;const Oe=Le.charCodeAt(0);for(let Ke=Re.length-1;Ke>=0;Ke--)Re.charCodeAt(Ke)===Oe&&Me++;return Me}e.count=r;function u(Re,Le,Me="\u2026"){return Re.length<=Le?Re:`${Re.substr(0,Le)}${Me}`}e.truncate=u;function i(Re,Le=" "){const Me=f(Re,Le);return c(Me,Le)}e.trim=i;function f(Re,Le){if(!Re||!Le)return Re;const Me=Le.length;if(Me===0||Re.length===0)return Re;let Oe=0;for(;Re.indexOf(Le,Oe)===Oe;)Oe=Oe+Me;return Re.substring(Oe)}e.ltrim=f;function c(Re,Le){if(!Re||!Le)return Re;const Me=Le.length,Oe=Re.length;if(Me===0||Oe===0)return Re;let Ke=Oe,We=-1;for(;We=Re.lastIndexOf(Le,Ke-1),!(We===-1||We+Me!==Ke);){if(We===0)return"";Ke=We}return Re.substring(0,Ke)}e.rtrim=c;function l(Re){return Re.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=l;function s(Re){return Re.replace(/\*/g,"")}e.stripWildcards=s;function d(Re,Le,Me={}){if(!Re)throw new Error("Cannot create regex from empty string");Le||(Re=C(Re)),Me.wholeWord&&(/\B/.test(Re.charAt(0))||(Re="\\b"+Re),/\B/.test(Re.charAt(Re.length-1))||(Re=Re+"\\b"));let Oe="";return Me.global&&(Oe+="g"),Me.matchCase||(Oe+="i"),Me.multiline&&(Oe+="m"),Me.unicode&&(Oe+="u"),new RegExp(Re,Oe)}e.createRegExp=d;function n(Re){return Re.source==="^"||Re.source==="^$"||Re.source==="$"||Re.source==="^\\s*$"?!1:!!(Re.exec("")&&Re.lastIndex===0)}e.regExpLeadsToEndlessLoop=n;function a(Re){return!!Re.match(/([^\\]|^)(\\\\)*\\\d+/)}e.regExpContainsBackreference=a;function o(Re){return(Re.global?"g":"")+(Re.ignoreCase?"i":"")+(Re.multiline?"m":"")+(Re.unicode?"u":"")}e.regExpFlags=o;function g(Re){return Re.split(/\r\n|\r|\n/)}e.splitLines=g;function h(Re){for(let Le=0,Me=Re.length;Le<Me;Le++){const Oe=Re.charCodeAt(Le);if(Oe!==32&&Oe!==9)return Le}return-1}e.firstNonWhitespaceIndex=h;function v(Re,Le=0,Me=Re.length){for(let Oe=Le;Oe<Me;Oe++){const Ke=Re.charCodeAt(Oe);if(Ke!==32&&Ke!==9)return Re.substring(Le,Oe)}return Re.substring(Le,Me)}e.getLeadingWhitespace=v;function m(Re,Le=Re.length-1){for(let Me=Le;Me>=0;Me--){const Oe=Re.charCodeAt(Me);if(Oe!==32&&Oe!==9)return Me}return-1}e.lastNonWhitespaceIndex=m;function w(Re,Le,Me){const Oe=[];let Ke=0;for(const We of Re.matchAll(Le)){if(Oe.push(Re.slice(Ke,We.index)),We.index===void 0)throw new Error("match.index should be defined");Ke=We.index+We[0].length,Oe.push(Me(We[0],...We.slice(1),We.index,Re,We.groups))}return Oe.push(Re.slice(Ke)),Promise.all(Oe).then(We=>We.join(""))}e.replaceAsync=w;function D(Re,Le){return Re<Le?-1:Re>Le?1:0}e.compare=D;function y(Re,Le,Me=0,Oe=Re.length,Ke=0,We=Le.length){for(;Me<Oe&&Ke<We;Me++,Ke++){const rt=Re.charCodeAt(Me),je=Le.charCodeAt(Ke);if(rt<je)return-1;if(rt>je)return 1}const Xe=Oe-Me,Je=We-Ke;return Xe<Je?-1:Xe>Je?1:0}e.compareSubstring=y;function T(Re,Le){return _(Re,Le,0,Re.length,0,Le.length)}e.compareIgnoreCase=T;function _(Re,Le,Me=0,Oe=Re.length,Ke=0,We=Le.length){for(;Me<Oe&&Ke<We;Me++,Ke++){let rt=Re.charCodeAt(Me),je=Le.charCodeAt(Ke);if(rt===je)continue;if(rt>=128||je>=128)return y(Re.toLowerCase(),Le.toLowerCase(),Me,Oe,Ke,We);M(rt)&&(rt-=32),M(je)&&(je-=32);const Ue=rt-je;if(Ue!==0)return Ue}const Xe=Oe-Me,Je=We-Ke;return Xe<Je?-1:Xe>Je?1:0}e.compareSubstringIgnoreCase=_;function L(Re){return Re>=48&&Re<=57}e.isAsciiDigit=L;function M(Re){return Re>=97&&Re<=122}e.isLowerAsciiLetter=M;function O(Re){return Re>=65&&Re<=90}e.isUpperAsciiLetter=O;function N(Re,Le){return Re.length===Le.length&&_(Re,Le)===0}e.equalsIgnoreCase=N;function P(Re,Le){const Me=Le.length;return Le.length>Re.length?!1:_(Re,Le,0,Me)===0}e.startsWithIgnoreCase=P;function B(Re,Le){const Me=Math.min(Re.length,Le.length);let Oe;for(Oe=0;Oe<Me;Oe++)if(Re.charCodeAt(Oe)!==Le.charCodeAt(Oe))return Oe;return Me}e.commonPrefixLength=B;function V(Re,Le){const Me=Math.min(Re.length,Le.length);let Oe;const Ke=Re.length-1,We=Le.length-1;for(Oe=0;Oe<Me;Oe++)if(Re.charCodeAt(Ke-Oe)!==Le.charCodeAt(We-Oe))return Oe;return Me}e.commonSuffixLength=V;function z(Re){return 55296<=Re&&Re<=56319}e.isHighSurrogate=z;function x(Re){return 56320<=Re&&Re<=57343}e.isLowSurrogate=x;function H(Re,Le){return(Re-55296<<10)+(Le-56320)+65536}e.computeCodePoint=H;function W(Re,Le,Me){const Oe=Re.charCodeAt(Me);if(z(Oe)&&Me+1<Le){const Ke=Re.charCodeAt(Me+1);if(x(Ke))return H(Oe,Ke)}return Oe}e.getNextCodePoint=W;function U(Re,Le){const Me=Re.charCodeAt(Le-1);if(x(Me)&&Le>1){const Oe=Re.charCodeAt(Le-2);if(z(Oe))return H(Oe,Me)}return Me}class ${get offset(){return this._offset}constructor(Le,Me=0){this._str=Le,this._len=Le.length,this._offset=Me}setOffset(Le){this._offset=Le}prevCodePoint(){const Le=U(this._str,this._offset);return this._offset-=Le>=65536?2:1,Le}nextCodePoint(){const Le=W(this._str,this._len,this._offset);return this._offset+=Le>=65536?2:1,Le}eol(){return this._offset>=this._len}}e.CodePointIterator=$;class q{get offset(){return this._iterator.offset}constructor(Le,Me=0){this._iterator=new $(Le,Me)}nextGraphemeLength(){const Le=Ae.getInstance(),Me=this._iterator,Oe=Me.offset;let Ke=Le.getGraphemeBreakType(Me.nextCodePoint());for(;!Me.eol();){const We=Me.offset,Xe=Le.getGraphemeBreakType(Me.nextCodePoint());if(Ce(Ke,Xe)){Me.setOffset(We);break}Ke=Xe}return Me.offset-Oe}prevGraphemeLength(){const Le=Ae.getInstance(),Me=this._iterator,Oe=Me.offset;let Ke=Le.getGraphemeBreakType(Me.prevCodePoint());for(;Me.offset>0;){const We=Me.offset,Xe=Le.getGraphemeBreakType(Me.prevCodePoint());if(Ce(Xe,Ke)){Me.setOffset(We);break}Ke=Xe}return Oe-Me.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=q;function X(Re,Le){return new q(Re,Le).nextGraphemeLength()}e.nextCharLength=X;function G(Re,Le){return new q(Re,Le).prevGraphemeLength()}e.prevCharLength=G;function Q(Re,Le){Le>0&&x(Re.charCodeAt(Le))&&Le--;const Me=Le+X(Re,Le);return[Me-G(Re,Me),Me]}e.getCharContainingOffset=Q;function j(Re){const Le=new q(Re);let Me=0;for(;!Le.eol();)Me++,Le.nextGraphemeLength();return Me}e.charCount=j;let K;function Y(){return/(?:[\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 ee(Re){return K||(K=Y()),K.test(Re)}e.containsRTL=ee;const ie=/^[\t\n\r\x20-\x7E]*$/;function re(Re){return ie.test(Re)}e.isBasicASCII=re,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function oe(Re){return e.UNUSUAL_LINE_TERMINATORS.test(Re)}e.containsUnusualLineTerminators=oe;function se(Re){return Re>=11904&&Re<=55215||Re>=63744&&Re<=64255||Re>=65281&&Re<=65374}e.isFullWidthCharacter=se;function te(Re){return Re>=127462&&Re<=127487||Re===8986||Re===8987||Re===9200||Re===9203||Re>=9728&&Re<=10175||Re===11088||Re===11093||Re>=127744&&Re<=128591||Re>=128640&&Re<=128764||Re>=128992&&Re<=129008||Re>=129280&&Re<=129535||Re>=129648&&Re<=129782}e.isEmojiImprecise=te;function Z(Re,Le){if(Re.length<Le)return Re;const Me=/\b/g;let Oe=0;for(;Me.test(Re)&&!(Re.length-Me.lastIndex<Le);)Oe=Me.lastIndex,Me.lastIndex+=1;return Re.substring(Oe).replace(/^\s/,"")}e.lcut=Z;const ne=/\x1B\x5B[12]?K/g,ce=/\x1b\[\d+m/g,de=/\x1b\[0?m/g;function he(Re){return Re&&(Re=Re.replace(ne,""),Re=Re.replace(ce,""),Re=Re.replace(de,"")),Re}e.removeAnsiEscapeCodes=he,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function pe(Re){return!!(Re&&Re.length>0&&Re.charCodeAt(0)===65279)}e.startsWithUTF8BOM=pe;function me(Re){return pe(Re)?Re.substr(1):Re}e.stripUTF8BOM=me;function Se(Re,Le){if(!Re||!Le||Re.length<Le.length)return!1;const Me=Le.length,Oe=Re.toLowerCase();let Ke=0,We=-1;for(;Ke<Me;){const Xe=Oe.indexOf(Le[Ke],We+1);if(Xe<0)return!1;We=Xe,Ke++}return!0}e.fuzzyContains=Se;function Ie(Re,Le=!1){return Re?(Le&&(Re=Re.replace(/\\./g,"")),Re.toLowerCase()!==Re):!1}e.containsUppercaseCharacter=Ie;function ve(Re){return Re.charAt(0).toUpperCase()+Re.slice(1)}e.uppercaseFirstLetter=ve;function be(Re,Le=1){if(Le===0)return"";let Me=-1;do Me=Re.indexOf(` `,Me+1),Le--;while(Le>0&&Me>=0);return Me===-1?Re:(Re[Me-1]==="\r"&&Me--,Re.substr(0,Me))}e.getNLines=be;function ge(Re){return Re=Re%(2*26),Re<26?String.fromCharCode(97+Re):String.fromCharCode(65+Re-26)}e.singleLetterHash=ge;function ue(Re){return Ae.getInstance().getGraphemeBreakType(Re)}e.getGraphemeBreakType=ue;function Ce(Re,Le){return Re===0?Le!==5&&Le!==7:Re===2&&Le===3?!1:Re===4||Re===2||Re===3||Le===4||Le===2||Le===3?!0:!(Re===8&&(Le===8||Le===9||Le===11||Le===12)||(Re===11||Re===9)&&(Le===9||Le===10)||(Re===12||Re===10)&&Le===10||Le===5||Le===13||Le===7||Re===1||Re===13&&Le===14||Re===6&&Le===6)}var De;(function(Re){Re[Re.Other=0]="Other",Re[Re.Prepend=1]="Prepend",Re[Re.CR=2]="CR",Re[Re.LF=3]="LF",Re[Re.Control=4]="Control",Re[Re.Extend=5]="Extend",Re[Re.Regional_Indicator=6]="Regional_Indicator",Re[Re.SpacingMark=7]="SpacingMark",Re[Re.L=8]="L",Re[Re.V=9]="V",Re[Re.T=10]="T",Re[Re.LV=11]="LV",Re[Re.LVT=12]="LVT",Re[Re.ZWJ=13]="ZWJ",Re[Re.Extended_Pictographic=14]="Extended_Pictographic"})(De=e.GraphemeBreakType||(e.GraphemeBreakType={}));class Ae{static getInstance(){return Ae._INSTANCE||(Ae._INSTANCE=new Ae),Ae._INSTANCE}constructor(){this._data=Pe()}getGraphemeBreakType(Le){if(Le<32)return Le===10?3:Le===13?2:4;if(Le<127)return 0;const Me=this._data,Oe=Me.length/3;let Ke=1;for(;Ke<=Oe;)if(Le<Me[3*Ke])Ke=2*Ke;else if(Le>Me[3*Ke+1])Ke=2*Ke+1;else return Me[3*Ke+2];return 0}}Ae._INSTANCE=null;function Pe(){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 fe(Re,Le){if(Re===0)return 0;const Me=ye(Re,Le);if(Me!==void 0)return Me;const Oe=new $(Le,Re);return Oe.prevCodePoint(),Oe.offset}e.getLeftDeleteOffset=fe;function ye(Re,Le){const Me=new $(Le,Re);let Oe=Me.prevCodePoint();for(;ke(Oe)||Oe===65039||Oe===8419;){if(Me.offset===0)return;Oe=Me.prevCodePoint()}if(!te(Oe))return;let Ke=Me.offset;return Ke>0&&Me.prevCodePoint()===8205&&(Ke=Me.offset),Ke}function ke(Re){return 127995<=Re&&Re<=127999}var Ee;(function(Re){Re[Re.zwj=8205]="zwj",Re[Re.emojiVariantSelector=65039]="emojiVariantSelector",Re[Re.enclosingKeyCap=8419]="enclosingKeyCap"})(Ee||(Ee={})),e.noBreakWhitespace="\xA0";class Te{static getInstance(Le){return Te.cache.get(Array.from(Le))}static getLocales(){return Te._locales.getValue()}constructor(Le){this.confusableDictionary=Le}isAmbiguous(Le){return this.confusableDictionary.has(Le)}getPrimaryConfusable(Le){return this.confusableDictionary.get(Le)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=Te,R=Te,Te.ambiguousCharacterData=new p.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]}')),Te.cache=new t.LRUCachedFunction(Re=>{function Le(je){const Ue=new Map;for(let Fe=0;Fe<je.length;Fe+=2)Ue.set(je[Fe],je[Fe+1]);return Ue}function Me(je,Ue){const Fe=new Map(je);for(const[He,Be]of Ue)Fe.set(He,Be);return Fe}function Oe(je,Ue){if(!je)return Ue;const Fe=new Map;for(const[He,Be]of je)Ue.has(He)&&Fe.set(He,Be);return Fe}const Ke=R.ambiguousCharacterData.getValue();let We=Re.filter(je=>!je.startsWith("_")&&je in Ke);We.length===0&&(We=["_default"]);let Xe;for(const je of We){const Ue=Le(Ke[je]);Xe=Oe(Xe,Ue)}const Je=Le(Ke._common),rt=Me(Je,Xe);return new Te(rt)}),Te._locales=new p.Lazy(()=>Object.keys(Te.ambiguousCharacterData.getValue()).filter(Re=>!Re.startsWith("_")));class _e{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(_e.getRawData())),this._data}static isInvisibleCharacter(Le){return _e.getData().has(Le)}static get codePoints(){return _e.getData()}}e.InvisibleCharacters=_e,_e._data=void 0}),define(ae[164],le([1,0,53,14,28,13]),function(J,e,t,p,R,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 E(m){return m.replace(/[\\/]/g,t.posix.sep)}e.toSlashes=E;function I(m){return m.indexOf("/")===-1&&(m=E(m)),/^[a-zA-Z]:(\/|$)/.test(m)&&(m="/"+m),m}e.toPosixPath=I;function b(m,w=t.posix.sep){if(!m)return"";const D=m.length,y=m.charCodeAt(0);if(k(y)){if(k(m.charCodeAt(1))&&!k(m.charCodeAt(2))){let _=3;const L=_;for(;_<D&&!k(m.charCodeAt(_));_++);if(L!==_&&!k(m.charCodeAt(_+1))){for(_+=1;_<D;_++)if(k(m.charCodeAt(_)))return m.slice(0,_+1).replace(/[\\/]/g,w)}}return w}else if(l(y)&&m.charCodeAt(1)===58)return k(m.charCodeAt(2))?m.slice(0,2)+w:m.slice(0,2);let T=m.indexOf("://");if(T!==-1){for(T+=3;T<D;T++)if(k(m.charCodeAt(T)))return m.slice(0,T+1)}return""}e.getRoot=b;function S(m){if(!p.isWindows||!m||m.length<5)return!1;let w=m.charCodeAt(0);if(w!==92||(w=m.charCodeAt(1),w!==92))return!1;let D=2;const y=D;for(;D<m.length&&(w=m.charCodeAt(D),w!==92);D++);return!(y===D||(w=m.charCodeAt(D+1),isNaN(w)||w===92))}e.isUNC=S;const C=/[\\/:\*\?"<>\|]/g,r=/[\\/]/g,u=/^(con|prn|aux|clock\$|nul|lpt[0-9]|com[0-9])(\.(.*?))?$/i;function i(m,w=p.isWindows){const D=w?C:r;return!(!m||m.length===0||/^\s+$/.test(m)||(D.lastIndex=0,D.test(m))||w&&u.test(m)||m==="."||m===".."||w&&m[m.length-1]==="."||w&&m.length!==m.trim().length||m.length>255)}e.isValidBasename=i;function f(m,w,D){const y=m===w;return!D||y?y:!m||!w?!1:(0,R.equalsIgnoreCase)(m,w)}e.isEqual=f;function c(m,w,D,y=t.sep){if(m===w)return!0;if(!m||!w||w.length>m.length)return!1;if(D){if(!(0,R.startsWithIgnoreCase)(m,w))return!1;if(w.length===m.length)return!0;let _=w.length;return w.charAt(w.length-1)===y&&_--,m.charAt(_)===y}return w.charAt(w.length-1)!==y&&(w+=y),m.indexOf(w)===0}e.isEqualOrParent=c;function l(m){return m>=65&&m<=90||m>=97&&m<=122}e.isWindowsDriveLetter=l;function s(m,w){return p.isWindows&&m.endsWith(":")&&(m+=t.sep),(0,t.isAbsolute)(m)||(m=(0,t.join)(w,m)),m=(0,t.normalize)(m),p.isWindows?(m=(0,R.rtrim)(m,t.sep),m.endsWith(":")&&(m+=t.sep)):(m=(0,R.rtrim)(m,t.sep),m||(m=t.sep)),m}e.sanitizeFilePath=s;function d(m){const w=(0,t.normalize)(m);return p.isWindows?m.length>3?!1:n(w)&&(m.length===2||w.charCodeAt(2)===92):w===t.posix.sep}e.isRootOrDriveLetter=d;function n(m,w=p.isWindows){return w?l(m.charCodeAt(0))&&m.charCodeAt(1)===58:!1}e.hasDriveLetter=n;function a(m){return n(m)?m[0]:void 0}e.getDriveLetter=a;function o(m,w,D){return w.length>m.length?-1:m===w?0:(D&&(m=m.toLowerCase(),w=w.toLowerCase()),m.indexOf(w))}e.indexOfPath=o;function g(m){const w=m.split(":");let D,y,T;for(const _ of w){const L=Number(_);(0,A.isNumber)(L)?y===void 0?y=L:T===void 0&&(T=L):D=D?[D,_].join(":"):_}if(!D)throw new Error("Format for `--goto` should be: `FILE:LINE(:COLUMN)`");return{path:D,line:y!==void 0?y:void 0,column:T!==void 0?T:y!==void 0?1:void 0}}e.parseLineAndColumnAware=g;const h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function v(m,w,D=8){let y="";for(let _=0;_<D;_++)y+=h.charAt(Math.floor(Math.random()*h.length));let T;return w?T=`${w}-${y}`:T=y,m?(0,t.join)(m,T):T}e.randomPath=v}),define(ae[96],le([1,0,60,28]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGraceful=e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScoreOptions=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 R(...ce){return function(de,he){for(let pe=0,me=ce.length;pe<me;pe++){const Se=ce[pe](de,he);if(Se)return Se}return null}}e.or=R,e.matchesStrictPrefix=A.bind(void 0,!1),e.matchesPrefix=A.bind(void 0,!0);function A(ce,de,he){if(!he||he.length<de.length)return null;let pe;return ce?pe=p.startsWithIgnoreCase(he,de):pe=he.indexOf(de)===0,pe?de.length>0?[{start:0,end:de.length}]:[]:null}function k(ce,de){const he=de.toLowerCase().indexOf(ce.toLowerCase());return he===-1?null:[{start:he,end:he+ce.length}]}e.matchesContiguousSubString=k;function E(ce,de){return I(ce.toLowerCase(),de.toLowerCase(),0,0)}e.matchesSubString=E;function I(ce,de,he,pe){if(he===ce.length)return[];if(pe===de.length)return null;if(ce[he]===de[pe]){let me=null;return(me=I(ce,de,he+1,pe+1))?l({start:pe,end:pe+1},me):null}return I(ce,de,he,pe+1)}function b(ce){return 97<=ce&&ce<=122}function S(ce){return 65<=ce&&ce<=90}e.isUpper=S;function C(ce){return 48<=ce&&ce<=57}function r(ce){return ce===32||ce===9||ce===10||ce===13}const u=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(ce=>u.add(ce.charCodeAt(0)));function i(ce){return r(ce)||u.has(ce)}function f(ce,de){return ce===de||i(ce)&&i(de)}function c(ce){return b(ce)||S(ce)||C(ce)}function l(ce,de){return de.length===0?de=[ce]:ce.end===de[0].start?de[0].start=ce.start:de.unshift(ce),de}function s(ce,de){for(let he=de;he<ce.length;he++){const pe=ce.charCodeAt(he);if(S(pe)||C(pe)||he>0&&!c(ce.charCodeAt(he-1)))return he}return ce.length}function d(ce,de,he,pe){if(he===ce.length)return[];if(pe===de.length)return null;if(ce[he]!==de[pe].toLowerCase())return null;{let me=null,Se=pe+1;for(me=d(ce,de,he+1,pe+1);!me&&(Se=s(de,Se))<de.length;)me=d(ce,de,he+1,Se),Se++;return me===null?null:l({start:pe,end:pe+1},me)}}function n(ce){let de=0,he=0,pe=0,me=0,Se=0;for(let ue=0;ue<ce.length;ue++)Se=ce.charCodeAt(ue),S(Se)&&de++,b(Se)&&he++,c(Se)&&pe++,C(Se)&&me++;const Ie=de/ce.length,ve=he/ce.length,be=pe/ce.length,ge=me/ce.length;return{upperPercent:Ie,lowerPercent:ve,alphaPercent:be,numericPercent:ge}}function a(ce){const{upperPercent:de,lowerPercent:he}=ce;return he===0&&de>.6}function o(ce){const{upperPercent:de,lowerPercent:he,alphaPercent:pe,numericPercent:me}=ce;return he>.2&&de<.8&&pe>.6&&me<.2}function g(ce){let de=0,he=0,pe=0,me=0;for(let Se=0;Se<ce.length;Se++)pe=ce.charCodeAt(Se),S(pe)&&de++,b(pe)&&he++,r(pe)&&me++;return(de===0||he===0)&&me===0?ce.length<=30:de<=5}function h(ce,de){if(!de||(de=de.trim(),de.length===0)||!g(ce)||de.length>60)return null;const he=n(de);if(!o(he)){if(!a(he))return null;de=de.toLowerCase()}let pe=null,me=0;for(ce=ce.toLowerCase();me<de.length&&(pe=d(ce,de,0,me))===null;)me=s(de,me+1);return pe}e.matchesCamelCase=h;function v(ce,de,he=!1){if(!de||de.length===0)return null;let pe=null,me=0;for(ce=ce.toLowerCase(),de=de.toLowerCase();me<de.length&&(pe=m(ce,de,0,me,he))===null;)me=w(de,me+1);return pe}e.matchesWords=v;function m(ce,de,he,pe,me){if(he===ce.length)return[];if(pe===de.length)return null;if(f(ce.charCodeAt(he),de.charCodeAt(pe))){let Se=null,Ie=pe+1;if(Se=m(ce,de,he+1,pe+1,me),!me)for(;!Se&&(Ie=w(de,Ie))<de.length;)Se=m(ce,de,he+1,Ie,me),Ie++;return Se?ce.charCodeAt(he)!==de.charCodeAt(pe)?Se:l({start:pe,end:pe+1},Se):null}else return null}function w(ce,de){for(let he=de;he<ce.length;he++)if(i(ce.charCodeAt(he))||he>0&&i(ce.charCodeAt(he-1)))return he;return ce.length}const D=R(e.matchesPrefix,h,k),y=R(e.matchesPrefix,h,E),T=new t.LRUCache(1e4);function _(ce,de,he=!1){if(typeof ce!="string"||typeof de!="string")return null;let pe=T.get(ce);pe||(pe=new RegExp(p.convertSimple2RegExpPattern(ce),"i"),T.set(ce,pe));const me=pe.exec(de);return me?[{start:me.index,end:me.index+me[0].length}]:he?y(ce,de):D(ce,de)}e.matchesFuzzy=_;function L(ce,de){const he=ie(ce,ce.toLowerCase(),0,de,de.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return he?O(he):null}e.matchesFuzzy2=L;function M(ce,de,he,pe,me,Se){const Ie=Math.min(13,ce.length);for(;he<Ie;he++){const ve=ie(ce,de,he,pe,me,Se,{firstMatchCanBeWeak:!1,boostFullMatch:!0});if(ve)return ve}return[0,Se]}e.anyScore=M;function O(ce){if(typeof ce>"u")return[];const de=[],he=ce[1];for(let pe=ce.length-1;pe>1;pe--){const me=ce[pe]+he,Se=de[de.length-1];Se&&Se.end===me?Se.end=me+1:de.push({start:me,end:me+1})}return de}e.createMatches=O;const N=128;function P(){const ce=[],de=[];for(let he=0;he<=N;he++)de[he]=0;for(let he=0;he<=N;he++)ce.push(de.slice(0));return ce}function B(ce){const de=[];for(let he=0;he<=ce;he++)de[he]=0;return de}const V=B(2*N),z=B(2*N),x=P(),H=P(),W=P(),U=!1;function $(ce,de,he,pe,me){function Se(ve,be,ge=" "){for(;ve.length<be;)ve=ge+ve;return ve}let Ie=` | |${pe.split("").map(ve=>Se(ve,3)).join("|")} `;for(let ve=0;ve<=he;ve++)ve===0?Ie+=" |":Ie+=`${de[ve-1]}|`,Ie+=ce[ve].slice(0,me+1).map(be=>Se(be.toString(),3)).join("|")+` `;return Ie}function q(ce,de,he,pe){ce=ce.substr(de),he=he.substr(pe),console.log($(H,ce,ce.length,he,he.length)),console.log($(W,ce,ce.length,he,he.length)),console.log($(x,ce,ce.length,he,he.length))}function X(ce,de){if(de<0||de>=ce.length)return!1;const he=ce.codePointAt(de);switch(he){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!p.isEmojiImprecise(he)}}function G(ce,de){if(de<0||de>=ce.length)return!1;switch(ce.charCodeAt(de)){case 32:case 9:return!0;default:return!1}}function Q(ce,de,he){return de[ce]!==he[ce]}function j(ce,de,he,pe,me,Se,Ie=!1){for(;de<he&&me<Se;)ce[de]===pe[me]&&(Ie&&(V[de]=me),de+=1),me+=1;return de===he}e.isPatternInWord=j;var K;(function(ce){ce[ce.Diag=1]="Diag",ce[ce.Left=2]="Left",ce[ce.LeftLeft=3]="LeftLeft"})(K||(K={}));var Y;(function(ce){ce.Default=[-100,0];function de(he){return!he||he.length===2&&he[0]===-100&&he[1]===0}ce.isDefault=de})(Y=e.FuzzyScore||(e.FuzzyScore={}));class ee{constructor(de,he){this.firstMatchCanBeWeak=de,this.boostFullMatch=he}}e.FuzzyScoreOptions=ee,ee.default={boostFullMatch:!0,firstMatchCanBeWeak:!1};function ie(ce,de,he,pe,me,Se,Ie=ee.default){const ve=ce.length>N?N:ce.length,be=pe.length>N?N:pe.length;if(he>=ve||Se>=be||ve-he>be-Se||!j(de,he,ve,me,Se,be,!0))return;re(ve,be,he,Se,de,me);let ge=1,ue=1,Ce=he,De=Se;const Ae=[!1];for(ge=1,Ce=he;Ce<ve;ge++,Ce++){const Ee=V[Ce],Te=z[Ce],_e=Ce+1<ve?z[Ce+1]:be;for(ue=Ee-Se+1,De=Ee;De<_e;ue++,De++){let Re=Number.MIN_SAFE_INTEGER,Le=!1;De<=Te&&(Re=oe(ce,de,Ce,he,pe,me,De,be,Se,x[ge-1][ue-1]===0,Ae));let Me=0;Re!==Number.MAX_SAFE_INTEGER&&(Le=!0,Me=Re+H[ge-1][ue-1]);const Oe=De>Ee,Ke=Oe?H[ge][ue-1]+(x[ge][ue-1]>0?-5:0):0,We=De>Ee+1&&x[ge][ue-1]>0,Xe=We?H[ge][ue-2]+(x[ge][ue-2]>0?-5:0):0;if(We&&(!Oe||Xe>=Ke)&&(!Le||Xe>=Me))H[ge][ue]=Xe,W[ge][ue]=3,x[ge][ue]=0;else if(Oe&&(!Le||Ke>=Me))H[ge][ue]=Ke,W[ge][ue]=2,x[ge][ue]=0;else if(Le)H[ge][ue]=Me,W[ge][ue]=1,x[ge][ue]=x[ge-1][ue-1]+1;else throw new Error("not possible")}}if(U&&q(ce,he,pe,Se),!Ae[0]&&!Ie.firstMatchCanBeWeak)return;ge--,ue--;const Pe=[H[ge][ue],Se];let fe=0,ye=0;for(;ge>=1;){let Ee=ue;do{const Te=W[ge][Ee];if(Te===3)Ee=Ee-2;else if(Te===2)Ee=Ee-1;else break}while(Ee>=1);fe>1&&de[he+ge-1]===me[Se+ue-1]&&!Q(Ee+Se-1,pe,me)&&fe+1>x[ge][Ee]&&(Ee=ue),Ee===ue?fe++:fe=1,ye||(ye=Ee),ge--,ue=Ee-1,Pe.push(ue)}be===ve&&Ie.boostFullMatch&&(Pe[0]+=2);const ke=ye-ve;return Pe[0]-=ke,Pe}e.fuzzyScore=ie;function re(ce,de,he,pe,me,Se){let Ie=ce-1,ve=de-1;for(;Ie>=he&&ve>=pe;)me[Ie]===Se[ve]&&(z[Ie]=ve,Ie--),ve--}function oe(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue){if(de[he]!==Se[Ie])return Number.MIN_SAFE_INTEGER;let Ce=1,De=!1;return Ie===he-pe?Ce=ce[he]===me[Ie]?7:5:Q(Ie,me,Se)&&(Ie===0||!Q(Ie-1,me,Se))?(Ce=ce[he]===me[Ie]?7:5,De=!0):X(Se,Ie)&&(Ie===0||!X(Se,Ie-1))?Ce=5:(X(Se,Ie-1)||G(Se,Ie-1))&&(Ce=5,De=!0),Ce>1&&he===pe&&(ue[0]=!0),De||(De=Q(Ie,me,Se)||X(Se,Ie-1)||G(Se,Ie-1)),he===pe?Ie>be&&(Ce-=De?3:5):ge?Ce+=De?2:0:Ce+=De?0:1,Ie+1===ve&&(Ce-=De?3:5),Ce}function se(ce,de,he,pe,me,Se,Ie){return Z(ce,de,he,pe,me,Se,!0,Ie)}e.fuzzyScoreGracefulAggressive=se;function te(ce,de,he,pe,me,Se,Ie){return Z(ce,de,he,pe,me,Se,!1,Ie)}e.fuzzyScoreGraceful=te;function Z(ce,de,he,pe,me,Se,Ie,ve){let be=ie(ce,de,he,pe,me,Se,ve);if(be&&!Ie)return be;if(ce.length>=3){const ge=Math.min(7,ce.length-1);for(let ue=he+1;ue<ge;ue++){const Ce=ne(ce,ue);if(Ce){const De=ie(Ce,Ce.toLowerCase(),he,pe,me,Se,ve);De&&(De[0]-=3,(!be||De[0]>be[0])&&(be=De))}}}return be}function ne(ce,de){if(de+1>=ce.length)return;const he=ce[de],pe=ce[de+1];if(he!==pe)return ce.slice(0,de)+pe+he+ce.slice(de+2)}}),define(ae[108],le([1,0,28]),function(J,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 p(l){return R(l,0)}e.hash=p;function R(l,s){switch(typeof l){case"object":return l===null?A(349,s):Array.isArray(l)?I(l,s):b(l,s);case"string":return E(l,s);case"boolean":return k(l,s);case"number":return A(l,s);case"undefined":return A(937,s);default:return A(617,s)}}e.doHash=R;function A(l,s){return(s<<5)-s+l|0}e.numberHash=A;function k(l,s){return A(l?433:863,s)}function E(l,s){s=A(149417,s);for(let d=0,n=l.length;d<n;d++)s=A(l.charCodeAt(d),s);return s}e.stringHash=E;function I(l,s){return s=A(104579,s),l.reduce((d,n)=>R(n,d),s)}function b(l,s){return s=A(181387,s),Object.keys(l).sort().reduce((d,n)=>(d=E(n,d),R(l[n],d)),s)}class S{constructor(){this._value=0}get value(){return this._value}hash(s){return this._value=R(s,this._value),this._value}}e.Hasher=S;var C;(function(l){l[l.BLOCK_SIZE=64]="BLOCK_SIZE",l[l.UNICODE_REPLACEMENT=65533]="UNICODE_REPLACEMENT"})(C||(C={}));function r(l,s,d=32){const n=d-s,a=~((1<<n)-1);return(l<<s|(a&l)>>>n)>>>0}function u(l,s=0,d=l.byteLength,n=0){for(let a=0;a<d;a++)l[s+a]=n}function i(l,s,d="0"){for(;l.length<s;)l=d+l;return l}function f(l,s=32){return l instanceof ArrayBuffer?Array.from(new Uint8Array(l)).map(d=>d.toString(16).padStart(2,"0")).join(""):i((l>>>0).toString(16),s/4)}e.toHexString=f;class c{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(s){const d=s.length;if(d===0)return;const n=this._buff;let a=this._buffLen,o=this._leftoverHighSurrogate,g,h;for(o!==0?(g=o,h=-1,o=0):(g=s.charCodeAt(0),h=0);;){let v=g;if(t.isHighSurrogate(g))if(h+1<d){const m=s.charCodeAt(h+1);t.isLowSurrogate(m)?(h++,v=t.computeCodePoint(g,m)):v=65533}else{o=g;break}else t.isLowSurrogate(g)&&(v=65533);if(a=this._push(n,a,v),h++,h<d)g=s.charCodeAt(h);else break}this._buffLen=a,this._leftoverHighSurrogate=o}_push(s,d,n){return n<128?s[d++]=n:n<2048?(s[d++]=192|(n&1984)>>>6,s[d++]=128|(n&63)>>>0):n<65536?(s[d++]=224|(n&61440)>>>12,s[d++]=128|(n&4032)>>>6,s[d++]=128|(n&63)>>>0):(s[d++]=240|(n&1835008)>>>18,s[d++]=128|(n&258048)>>>12,s[d++]=128|(n&4032)>>>6,s[d++]=128|(n&63)>>>0),d>=64&&(this._step(),d-=64,this._totalLen+=64,s[0]=s[64+0],s[1]=s[64+1],s[2]=s[64+2]),d}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()),f(this._h0)+f(this._h1)+f(this._h2)+f(this._h3)+f(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,u(this._buff,this._buffLen),this._buffLen>56&&(this._step(),u(this._buff));const s=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(s/4294967296),!1),this._buffDV.setUint32(60,s%4294967296,!1),this._step()}_step(){const s=c._bigBlock32,d=this._buffDV;for(let D=0;D<64;D+=4)s.setUint32(D,d.getUint32(D,!1),!1);for(let D=64;D<320;D+=4)s.setUint32(D,r(s.getUint32(D-12,!1)^s.getUint32(D-32,!1)^s.getUint32(D-56,!1)^s.getUint32(D-64,!1),1),!1);let n=this._h0,a=this._h1,o=this._h2,g=this._h3,h=this._h4,v,m,w;for(let D=0;D<80;D++)D<20?(v=a&o|~a&g,m=1518500249):D<40?(v=a^o^g,m=1859775393):D<60?(v=a&o|a&g|o&g,m=2400959708):(v=a^o^g,m=3395469782),w=r(n,5)+v+h+m+s.getUint32(D*4,!1)&4294967295,h=g,g=o,o=r(a,30),a=n,n=w;this._h0=this._h0+n&4294967295,this._h1=this._h1+a&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+g&4294967295,this._h4=this._h4+h&4294967295}}e.StringSHA1=c,c._bigBlock32=new DataView(new ArrayBuffer(320))}),define(ae[574],le([1,0,56,108]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sha1Hex=void 0;async function R(A){if(globalThis?.crypto?.subtle){const k=t.VSBuffer.fromString(A,{dontUseNodeBuffer:!0}).buffer,E=await globalThis.crypto.subtle.digest({name:"sha-1"},k);return(0,p.toHexString)(E)}else{const k=new p.StringSHA1;return k.update(A),k.digest()}}e.sha1Hex=R}),define(ae[414],le([1,0,1023,108]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.MyArray=e.Debug=e.stringDiff=e.StringDiffSequence=void 0;class R{constructor(r){this.source=r}getElements(){const r=this.source,u=new Int32Array(r.length);for(let i=0,f=r.length;i<f;i++)u[i]=r.charCodeAt(i);return u}}e.StringDiffSequence=R;function A(C,r,u){return new S(new R(C),new R(r)).ComputeDiff(u).changes}e.stringDiff=A;class k{static Assert(r,u){if(!r)throw new Error(u)}}e.Debug=k;class E{static Copy(r,u,i,f,c){for(let l=0;l<c;l++)i[f+l]=r[u+l]}static Copy2(r,u,i,f,c){for(let l=0;l<c;l++)i[f+l]=r[u+l]}}e.MyArray=E;var I;(function(C){C[C.MaxDifferencesHistory=1447]="MaxDifferencesHistory"})(I||(I={}));class b{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(r,u){this.m_originalStart=Math.min(this.m_originalStart,r),this.m_modifiedStart=Math.min(this.m_modifiedStart,u),this.m_originalCount++}AddModifiedElement(r,u){this.m_originalStart=Math.min(this.m_originalStart,r),this.m_modifiedStart=Math.min(this.m_modifiedStart,u),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 S{constructor(r,u,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=r,this._modifiedSequence=u;const[f,c,l]=S._getElements(r),[s,d,n]=S._getElements(u);this._hasStrings=l&&n,this._originalStringElements=f,this._originalElementsOrHash=c,this._modifiedStringElements=s,this._modifiedElementsOrHash=d,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(r){return r.length>0&&typeof r[0]=="string"}static _getElements(r){const u=r.getElements();if(S._isStringArray(u)){const i=new Int32Array(u.length);for(let f=0,c=u.length;f<c;f++)i[f]=(0,p.stringHash)(u[f],0);return[u,i,!0]}return u instanceof Int32Array?[[],u,!1]:[[],new Int32Array(u),!1]}ElementsAreEqual(r,u){return this._originalElementsOrHash[r]!==this._modifiedElementsOrHash[u]?!1:this._hasStrings?this._originalStringElements[r]===this._modifiedStringElements[u]:!0}ElementsAreStrictEqual(r,u){if(!this.ElementsAreEqual(r,u))return!1;const i=S._getStrictElement(this._originalSequence,r),f=S._getStrictElement(this._modifiedSequence,u);return i===f}static _getStrictElement(r,u){return typeof r.getStrictElement=="function"?r.getStrictElement(u):null}OriginalElementsAreEqual(r,u){return this._originalElementsOrHash[r]!==this._originalElementsOrHash[u]?!1:this._hasStrings?this._originalStringElements[r]===this._originalStringElements[u]:!0}ModifiedElementsAreEqual(r,u){return this._modifiedElementsOrHash[r]!==this._modifiedElementsOrHash[u]?!1:this._hasStrings?this._modifiedStringElements[r]===this._modifiedStringElements[u]:!0}ComputeDiff(r){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,r)}_ComputeDiff(r,u,i,f,c){const l=[!1];let s=this.ComputeDiffRecursive(r,u,i,f,l);return c&&(s=this.PrettifyChanges(s)),{quitEarly:l[0],changes:s}}ComputeDiffRecursive(r,u,i,f,c){for(c[0]=!1;r<=u&&i<=f&&this.ElementsAreEqual(r,i);)r++,i++;for(;u>=r&&f>=i&&this.ElementsAreEqual(u,f);)u--,f--;if(r>u||i>f){let o;return i<=f?(k.Assert(r===u+1,"originalStart should only be one more than originalEnd"),o=[new t.DiffChange(r,0,i,f-i+1)]):r<=u?(k.Assert(i===f+1,"modifiedStart should only be one more than modifiedEnd"),o=[new t.DiffChange(r,u-r+1,i,0)]):(k.Assert(r===u+1,"originalStart should only be one more than originalEnd"),k.Assert(i===f+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const l=[0],s=[0],d=this.ComputeRecursionPoint(r,u,i,f,l,s,c),n=l[0],a=s[0];if(d!==null)return d;if(!c[0]){const o=this.ComputeDiffRecursive(r,n,i,a,c);let g=[];return c[0]?g=[new t.DiffChange(n+1,u-(n+1)+1,a+1,f-(a+1)+1)]:g=this.ComputeDiffRecursive(n+1,u,a+1,f,c),this.ConcatenateChanges(o,g)}return[new t.DiffChange(r,u-r+1,i,f-i+1)]}WALKTRACE(r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){let T=null,_=null,L=new b,M=u,O=i,N=h[0]-w[0]-f,P=-1073741824,B=this.m_forwardHistory.length-1;do{const V=N+r;V===M||V<O&&n[V-1]<n[V+1]?(o=n[V+1],v=o-N-f,o<P&&L.MarkNextChange(),P=o,L.AddModifiedElement(o+1,v),N=V+1-r):(o=n[V-1]+1,v=o-N-f,o<P&&L.MarkNextChange(),P=o-1,L.AddOriginalElement(o,v+1),N=V-1-r),B>=0&&(n=this.m_forwardHistory[B],r=n[0],M=1,O=n.length-1)}while(--B>=-1);if(T=L.getReverseChanges(),y[0]){let V=h[0]+1,z=w[0]+1;if(T!==null&&T.length>0){const x=T[T.length-1];V=Math.max(V,x.getOriginalEnd()),z=Math.max(z,x.getModifiedEnd())}_=[new t.DiffChange(V,g-V+1,z,m-z+1)]}else{L=new b,M=l,O=s,N=h[0]-w[0]-d,P=1073741824,B=D?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const V=N+c;V===M||V<O&&a[V-1]>=a[V+1]?(o=a[V+1]-1,v=o-N-d,o>P&&L.MarkNextChange(),P=o+1,L.AddOriginalElement(o+1,v+1),N=V+1-c):(o=a[V-1],v=o-N-d,o>P&&L.MarkNextChange(),P=o,L.AddModifiedElement(o+1,v+1),N=V-1-c),B>=0&&(a=this.m_reverseHistory[B],c=a[0],M=1,O=a.length-1)}while(--B>=-1);_=L.getChanges()}return this.ConcatenateChanges(T,_)}ComputeRecursionPoint(r,u,i,f,c,l,s){let d=0,n=0,a=0,o=0,g=0,h=0;r--,i--,c[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const v=u-r+(f-i),m=v+1,w=new Int32Array(m),D=new Int32Array(m),y=f-i,T=u-r,_=r-i,L=u-f,O=(T-y)%2===0;w[y]=r,D[T]=u,s[0]=!1;for(let N=1;N<=v/2+1;N++){let P=0,B=0;a=this.ClipDiagonalBound(y-N,N,y,m),o=this.ClipDiagonalBound(y+N,N,y,m);for(let z=a;z<=o;z+=2){z===a||z<o&&w[z-1]<w[z+1]?d=w[z+1]:d=w[z-1]+1,n=d-(z-y)-_;const x=d;for(;d<u&&n<f&&this.ElementsAreEqual(d+1,n+1);)d++,n++;if(w[z]=d,d+n>P+B&&(P=d,B=n),!O&&Math.abs(z-T)<=N-1&&d>=D[z])return c[0]=d,l[0]=n,x<=D[z]&&1447>0&&N<=1447+1?this.WALKTRACE(y,a,o,_,T,g,h,L,w,D,d,u,c,n,f,l,O,s):null}const V=(P-r+(B-i)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(P,V))return s[0]=!0,c[0]=P,l[0]=B,V>0&&1447>0&&N<=1447+1?this.WALKTRACE(y,a,o,_,T,g,h,L,w,D,d,u,c,n,f,l,O,s):(r++,i++,[new t.DiffChange(r,u-r+1,i,f-i+1)]);g=this.ClipDiagonalBound(T-N,N,T,m),h=this.ClipDiagonalBound(T+N,N,T,m);for(let z=g;z<=h;z+=2){z===g||z<h&&D[z-1]>=D[z+1]?d=D[z+1]-1:d=D[z-1],n=d-(z-T)-L;const x=d;for(;d>r&&n>i&&this.ElementsAreEqual(d,n);)d--,n--;if(D[z]=d,O&&Math.abs(z-y)<=N&&d<=w[z])return c[0]=d,l[0]=n,x>=w[z]&&1447>0&&N<=1447+1?this.WALKTRACE(y,a,o,_,T,g,h,L,w,D,d,u,c,n,f,l,O,s):null}if(N<=1447){let z=new Int32Array(o-a+2);z[0]=y-a+1,E.Copy2(w,a,z,1,o-a+1),this.m_forwardHistory.push(z),z=new Int32Array(h-g+2),z[0]=T-g+1,E.Copy2(D,g,z,1,h-g+1),this.m_reverseHistory.push(z)}}return this.WALKTRACE(y,a,o,_,T,g,h,L,w,D,d,u,c,n,f,l,O,s)}PrettifyChanges(r){for(let u=0;u<r.length;u++){const i=r[u],f=u<r.length-1?r[u+1].originalStart:this._originalElementsOrHash.length,c=u<r.length-1?r[u+1].modifiedStart:this._modifiedElementsOrHash.length,l=i.originalLength>0,s=i.modifiedLength>0;for(;i.originalStart+i.originalLength<f&&i.modifiedStart+i.modifiedLength<c&&(!l||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!s||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const n=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!n)break;i.originalStart++,i.modifiedStart++}const d=[null];if(u<r.length-1&&this.ChangesOverlap(r[u],r[u+1],d)){r[u]=d[0],r.splice(u+1,1),u--;continue}}for(let u=r.length-1;u>=0;u--){const i=r[u];let f=0,c=0;if(u>0){const o=r[u-1];f=o.originalStart+o.originalLength,c=o.modifiedStart+o.modifiedLength}const l=i.originalLength>0,s=i.modifiedLength>0;let d=0,n=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let o=1;;o++){const g=i.originalStart-o,h=i.modifiedStart-o;if(g<f||h<c||l&&!this.OriginalElementsAreEqual(g,g+i.originalLength)||s&&!this.ModifiedElementsAreEqual(h,h+i.modifiedLength))break;const m=(g===f&&h===c?5:0)+this._boundaryScore(g,i.originalLength,h,i.modifiedLength);m>n&&(n=m,d=o)}i.originalStart-=d,i.modifiedStart-=d;const a=[null];if(u>0&&this.ChangesOverlap(r[u-1],r[u],a)){r[u-1]=a[0],r.splice(u,1),u++;continue}}if(this._hasStrings)for(let u=1,i=r.length;u<i;u++){const f=r[u-1],c=r[u],l=c.originalStart-f.originalStart-f.originalLength,s=f.originalStart,d=c.originalStart+c.originalLength,n=d-s,a=f.modifiedStart,o=c.modifiedStart+c.modifiedLength,g=o-a;if(l<5&&n<20&&g<20){const h=this._findBetterContiguousSequence(s,n,a,g,l);if(h){const[v,m]=h;(v!==f.originalStart+f.originalLength||m!==f.modifiedStart+f.modifiedLength)&&(f.originalLength=v-f.originalStart,f.modifiedLength=m-f.modifiedStart,c.originalStart=v+l,c.modifiedStart=m+l,c.originalLength=d-c.originalStart,c.modifiedLength=o-c.modifiedStart)}}}return r}_findBetterContiguousSequence(r,u,i,f,c){if(u<c||f<c)return null;const l=r+u-c+1,s=i+f-c+1;let d=0,n=0,a=0;for(let o=r;o<l;o++)for(let g=i;g<s;g++){const h=this._contiguousSequenceScore(o,g,c);h>0&&h>d&&(d=h,n=o,a=g)}return d>0?[n,a]:null}_contiguousSequenceScore(r,u,i){let f=0;for(let c=0;c<i;c++){if(!this.ElementsAreEqual(r+c,u+c))return 0;f+=this._originalStringElements[r+c].length}return f}_OriginalIsBoundary(r){return r<=0||r>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[r])}_OriginalRegionIsBoundary(r,u){if(this._OriginalIsBoundary(r)||this._OriginalIsBoundary(r-1))return!0;if(u>0){const i=r+u;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(r){return r<=0||r>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[r])}_ModifiedRegionIsBoundary(r,u){if(this._ModifiedIsBoundary(r)||this._ModifiedIsBoundary(r-1))return!0;if(u>0){const i=r+u;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(r,u,i,f){const c=this._OriginalRegionIsBoundary(r,u)?1:0,l=this._ModifiedRegionIsBoundary(i,f)?1:0;return c+l}ConcatenateChanges(r,u){const i=[];if(r.length===0||u.length===0)return u.length>0?u:r;if(this.ChangesOverlap(r[r.length-1],u[0],i)){const f=new Array(r.length+u.length-1);return E.Copy(r,0,f,0,r.length-1),f[r.length-1]=i[0],E.Copy(u,1,f,r.length,u.length-1),f}else{const f=new Array(r.length+u.length);return E.Copy(r,0,f,0,r.length),E.Copy(u,0,f,r.length,u.length),f}}ChangesOverlap(r,u,i){if(k.Assert(r.originalStart<=u.originalStart,"Left change is not less than or equal to right change"),k.Assert(r.modifiedStart<=u.modifiedStart,"Left change is not less than or equal to right change"),r.originalStart+r.originalLength>=u.originalStart||r.modifiedStart+r.modifiedLength>=u.modifiedStart){const f=r.originalStart;let c=r.originalLength;const l=r.modifiedStart;let s=r.modifiedLength;return r.originalStart+r.originalLength>=u.originalStart&&(c=u.originalStart+u.originalLength-r.originalStart),r.modifiedStart+r.modifiedLength>=u.modifiedStart&&(s=u.modifiedStart+u.modifiedLength-r.modifiedStart),i[0]=new t.DiffChange(f,c,l,s),!0}else return i[0]=null,!1}ClipDiagonalBound(r,u,i,f){if(r>=0&&r<f)return r;const c=i,l=f-i-1,s=u%2===0;if(r<0){const d=c%2===0;return s===d?0:1}else{const d=l%2===0;return s===d?f-1:f-2}}}e.LcsDiff=S}),define(ae[210],le([1,0,29,96,28]),function(J,e,t,p,R){"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),E=new RegExp(`(\\\\)?${A.source}`,"g");function I(c){return c.replace(E,(l,s)=>s?l:`\\${l}`)}e.escapeIcons=I;const b=new RegExp(`\\\\${A.source}`,"g");function S(c){return c.replace(b,l=>`\\${l}`)}e.markdownEscapeEscapedIcons=S;const C=new RegExp(`(\\s)?(\\\\)?${A.source}(\\s)?`,"g");function r(c){return c.indexOf(e.iconStartMarker)===-1?c:c.replace(C,(l,s,d,n)=>d?l:s||n||"")}e.stripIcons=r;function u(c){const l=c.indexOf(e.iconStartMarker);return l===-1?{text:c}:i(c,l)}e.parseLabelWithIcons=u;function i(c,l){const s=[];let d="";function n(D){if(D){d+=D;for(const y of D)s.push(g)}}let a=-1,o="",g=0,h,v,m=l;const w=c.length;for(n(c.substr(0,l));m<w;)h=c[m],v=c[m+1],h===e.iconStartMarker[0]&&v===e.iconStartMarker[1]?(a=m,n(o),o=e.iconStartMarker,m++):h===")"&&a!==-1?(g+=m-a+1,a=-1,o=""):a!==-1?k.test(h)?o+=h:(n(o),a=-1,o=""):n(h),m++;return n(o),{text:d,iconOffsets:s}}function f(c,l,s=!1){const{text:d,iconOffsets:n}=l;if(!n||n.length===0)return(0,p.matchesFuzzy)(c,d,s);const a=(0,R.ltrim)(d," "),o=d.length-a.length,g=(0,p.matchesFuzzy)(c,a,s);if(g)for(const h of g){const v=n[h.start+o]+o;h.start+=v,h.end+=v}return g}e.matchesFuzzyIconAware=f}),define(ae[746],le([1,0,28]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildReplaceStringWithCasePreserved=void 0;function p(k,E){if(k&&k[0]!==""){const I=R(k,E,"-"),b=R(k,E,"_");return I&&!b?A(k,E,"-"):!I&&b?A(k,E,"_"):k[0].toUpperCase()===k[0]?E.toUpperCase():k[0].toLowerCase()===k[0]?E.toLowerCase():t.containsUppercaseCharacter(k[0][0])&&E.length>0?E[0].toUpperCase()+E.substr(1):k[0][0].toUpperCase()!==k[0][0]&&E.length>0?E[0].toLowerCase()+E.substr(1):E}else return E}e.buildReplaceStringWithCasePreserved=p;function R(k,E,I){return k[0].indexOf(I)!==-1&&E.indexOf(I)!==-1&&k[0].split(I).length===E.split(I).length}function A(k,E,I){const b=E.split(I),S=k[0].split(I);let C="";return b.forEach((r,u)=>{C+=p([S[u]],r)+I}),C.slice(0,-1)}}),define(ae[68],le([1,0,28]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var p;(function(R){R[R.Ignore=0]="Ignore",R[R.Info=1]="Info",R[R.Warning=2]="Warning",R[R.Error=3]="Error"})(p||(p={})),function(R){const A="error",k="warning",E="warn",I="info",b="ignore";function S(r){return r?t.equalsIgnoreCase(A,r)?R.Error:t.equalsIgnoreCase(k,r)||t.equalsIgnoreCase(E,r)?R.Warning:t.equalsIgnoreCase(I,r)?R.Info:R.Ignore:R.Ignore}R.fromValue=S;function C(r){switch(r){case R.Error:return A;case R.Warning:return k;case R.Info:return I;default:return b}}R.toString=C}(p||(p={})),e.default=p}),define(ae[220],le([1,0,16,28]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class R{constructor(){this._value="",this._pos=0}reset(u){return this._value=u,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(u){const i=u.charCodeAt(0),f=this._value.charCodeAt(this._pos);return i-f}value(){return this._value[this._pos]}}e.StringIterator=R;class A{constructor(u=!0){this._caseSensitive=u}reset(u){return this._value=u,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let u=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(u)this._from++;else break;else u=!1;return this}cmp(u){return this._caseSensitive?(0,p.compareSubstring)(u,this._value,0,u.length,this._from,this._to):(0,p.compareSubstringIgnoreCase)(u,this._value,0,u.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.ConfigKeysIterator=A;class k{constructor(u=!0,i=!0){this._splitOnBackslash=u,this._caseSensitive=i}reset(u){this._from=0,this._to=0,this._value=u,this._valueLen=u.length;for(let i=u.length-1;i>=0;i--,this._valueLen--){const f=this._value.charCodeAt(i);if(!(f===47||this._splitOnBackslash&&f===92))break}return this.next()}hasNext(){return this._to<this._valueLen}next(){this._from=this._to;let u=!0;for(;this._to<this._valueLen;this._to++){const i=this._value.charCodeAt(this._to);if(i===47||this._splitOnBackslash&&i===92)if(u)this._from++;else break;else u=!1}return this}cmp(u){return this._caseSensitive?(0,p.compareSubstring)(u,this._value,0,u.length,this._from,this._to):(0,p.compareSubstringIgnoreCase)(u,this._value,0,u.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}e.PathIterator=k;var E;(function(r){r[r.Scheme=1]="Scheme",r[r.Authority=2]="Authority",r[r.Path=3]="Path",r[r.Query=4]="Query",r[r.Fragment=5]="Fragment"})(E||(E={}));class I{constructor(u,i){this._ignorePathCasing=u,this._ignoreQueryAndFragment=i,this._states=[],this._stateIdx=0}reset(u){return this._value=u,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new k(!1,!this._ignorePathCasing(u)),this._pathIterator.reset(u.path),this._pathIterator.value()&&this._states.push(3)),this._ignoreQueryAndFragment(u)||(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(u){if(this._states[this._stateIdx]===1)return(0,p.compareIgnoreCase)(u,this._value.scheme);if(this._states[this._stateIdx]===2)return(0,p.compareIgnoreCase)(u,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(u);if(this._states[this._stateIdx]===4)return(0,p.compare)(u,this._value.query);if(this._states[this._stateIdx]===5)return(0,p.compare)(u,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 b{constructor(){this.height=1}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}rotateLeft(){const u=this.right;return this.right=u.left,u.left=this,this.updateHeight(),u.updateHeight(),u}rotateRight(){const u=this.left;return this.left=u.right,u.right=this,this.updateHeight(),u.updateHeight(),u}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(r){r[r.Left=-1]="Left",r[r.Mid=0]="Mid",r[r.Right=1]="Right"})(S||(S={}));class C{static forUris(u=()=>!1,i=()=>!1){return new C(new I(u,i))}static forPaths(u=!1){return new C(new k(void 0,!u))}static forStrings(){return new C(new R)}static forConfigKeys(){return new C(new A)}constructor(u){this._iter=u}clear(){this._root=void 0}fill(u,i){if(i){const f=i.slice(0);(0,t.shuffle)(f);for(const c of f)this.set(c,u)}else{const f=u.slice(0);(0,t.shuffle)(f);for(const c of f)this.set(c[0],c[1])}}set(u,i){const f=this._iter.reset(u);let c;this._root||(this._root=new b,this._root.segment=f.value());const l=[];for(c=this._root;;){const d=f.cmp(c.segment);if(d>0)c.left||(c.left=new b,c.left.segment=f.value()),l.push([-1,c]),c=c.left;else if(d<0)c.right||(c.right=new b,c.right.segment=f.value()),l.push([1,c]),c=c.right;else if(f.hasNext())f.next(),c.mid||(c.mid=new b,c.mid.segment=f.value()),l.push([0,c]),c=c.mid;else break}const s=c.value;c.value=i,c.key=u;for(let d=l.length-1;d>=0;d--){const n=l[d][1];n.updateHeight();const a=n.balanceFactor();if(a<-1||a>1){const o=l[d][0],g=l[d+1][0];if(o===1&&g===1)l[d][1]=n.rotateLeft();else if(o===-1&&g===-1)l[d][1]=n.rotateRight();else if(o===1&&g===-1)n.right=l[d+1][1]=l[d+1][1].rotateRight(),l[d][1]=n.rotateLeft();else if(o===-1&&g===1)n.left=l[d+1][1]=l[d+1][1].rotateLeft(),l[d][1]=n.rotateRight();else throw new Error;if(d>0)switch(l[d-1][0]){case-1:l[d-1][1].left=l[d][1];break;case 1:l[d-1][1].right=l[d][1];break;case 0:l[d-1][1].mid=l[d][1];break}else this._root=l[0][1]}}return s}get(u){return this._getNode(u)?.value}_getNode(u){const i=this._iter.reset(u);let f=this._root;for(;f;){const c=i.cmp(f.segment);if(c>0)f=f.left;else if(c<0)f=f.right;else if(i.hasNext())i.next(),f=f.mid;else break}return f}has(u){const i=this._getNode(u);return!(i?.value===void 0&&i?.mid===void 0)}delete(u){return this._delete(u,!1)}deleteSuperstr(u){return this._delete(u,!0)}_delete(u,i){const f=this._iter.reset(u),c=[];let l=this._root;for(;l;){const s=f.cmp(l.segment);if(s>0)c.push([-1,l]),l=l.left;else if(s<0)c.push([1,l]),l=l.right;else if(f.hasNext())f.next(),c.push([0,l]),l=l.mid;else break}if(!!l){if(i?(l.left=void 0,l.mid=void 0,l.right=void 0,l.height=1):(l.key=void 0,l.value=void 0),!l.mid&&!l.value)if(l.left&&l.right){const s=this._min(l.right);if(s.key){const{key:d,value:n,segment:a}=s;this._delete(s.key,!1),l.key=d,l.value=n,l.segment=a}}else{const s=l.left??l.right;if(c.length>0){const[d,n]=c[c.length-1];switch(d){case-1:n.left=s;break;case 0:n.mid=s;break;case 1:n.right=s;break}}else this._root=s}for(let s=c.length-1;s>=0;s--){const d=c[s][1];d.updateHeight();const n=d.balanceFactor();if(n>1?(d.right.balanceFactor()>=0||(d.right=d.right.rotateRight()),c[s][1]=d.rotateLeft()):n<-1&&(d.left.balanceFactor()<=0||(d.left=d.left.rotateLeft()),c[s][1]=d.rotateRight()),s>0)switch(c[s-1][0]){case-1:c[s-1][1].left=c[s][1];break;case 1:c[s-1][1].right=c[s][1];break;case 0:c[s-1][1].mid=c[s][1];break}else this._root=c[0][1]}}}_min(u){for(;u.left;)u=u.left;return u}findSubstr(u){const i=this._iter.reset(u);let f=this._root,c;for(;f;){const l=i.cmp(f.segment);if(l>0)f=f.left;else if(l<0)f=f.right;else if(i.hasNext())i.next(),c=f.value||c,f=f.mid;else break}return f&&f.value||c}findSuperstr(u){const i=this._iter.reset(u);let f=this._root;for(;f;){const c=i.cmp(f.segment);if(c>0)f=f.left;else if(c<0)f=f.right;else if(i.hasNext())i.next(),f=f.mid;else return f.mid?this._entries(f.mid):void 0}}forEach(u){for(const[i,f]of this)u(f,i)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(u){const i=[];return this._dfsEntries(u,i),i[Symbol.iterator]()}_dfsEntries(u,i){!u||(u.left&&this._dfsEntries(u.left,i),u.value&&i.push([u.key,u.value]),u.mid&&this._dfsEntries(u.mid,i),u.right&&this._dfsEntries(u.right,i))}_isBalanced(){const u=i=>{if(!i)return!0;const f=i.balanceFactor();return f<-1||f>1?!1:u(i.left)&&u(i.right)};return u(this._root)}}e.TernarySearchTree=C}),define(ae[9],le([1,0,53,14]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const R=/^\w[\w\d+.-]*$/,A=/^\//,k=/^\/\//;function E(h,v){if(!h.scheme&&v)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${h.authority}", path: "${h.path}", query: "${h.query}", fragment: "${h.fragment}"}`);if(h.scheme&&!R.test(h.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(h.path){if(h.authority){if(!A.test(h.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(h.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(h,v){return!h&&!v?"file":h}function b(h,v){switch(h){case"https":case"http":case"file":v?v[0]!==C&&(v=C+v):v=C;break}return v}const S="",C="/",r=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(v){return v instanceof u?!0:v?typeof v.authority=="string"&&typeof v.fragment=="string"&&typeof v.path=="string"&&typeof v.query=="string"&&typeof v.scheme=="string"&&typeof v.fsPath=="string"&&typeof v.with=="function"&&typeof v.toString=="function":!1}constructor(v,m,w,D,y,T=!1){typeof v=="object"?(this.scheme=v.scheme||S,this.authority=v.authority||S,this.path=v.path||S,this.query=v.query||S,this.fragment=v.fragment||S):(this.scheme=I(v,T),this.authority=m||S,this.path=b(this.scheme,w||S),this.query=D||S,this.fragment=y||S,E(this,T))}get fsPath(){return d(this,!1)}with(v){if(!v)return this;let{scheme:m,authority:w,path:D,query:y,fragment:T}=v;return m===void 0?m=this.scheme:m===null&&(m=S),w===void 0?w=this.authority:w===null&&(w=S),D===void 0?D=this.path:D===null&&(D=S),y===void 0?y=this.query:y===null&&(y=S),T===void 0?T=this.fragment:T===null&&(T=S),m===this.scheme&&w===this.authority&&D===this.path&&y===this.query&&T===this.fragment?this:new f(m,w,D,y,T)}static parse(v,m=!1){const w=r.exec(v);return w?new f(w[2]||S,g(w[4]||S),g(w[5]||S),g(w[7]||S),g(w[9]||S),m):new f(S,S,S,S,S)}static file(v){let m=S;if(p.isWindows&&(v=v.replace(/\\/g,C)),v[0]===C&&v[1]===C){const w=v.indexOf(C,2);w===-1?(m=v.substring(2),v=C):(m=v.substring(2,w),v=v.substring(w)||C)}return new f("file",m,v,S,S)}static from(v){const m=new f(v.scheme,v.authority,v.path,v.query,v.fragment);return E(m,!0),m}static joinPath(v,...m){if(!v.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let w;return p.isWindows&&v.scheme==="file"?w=u.file(t.win32.join(d(v,!0),...m)).path:w=t.posix.join(v.path,...m),v.with({path:w})}toString(v=!1){return n(this,v)}toJSON(){return this}static revive(v){if(v){if(v instanceof u)return v;{const m=new f(v);return m._formatted=v.external,m._fsPath=v._sep===i?v.fsPath:null,m}}else return v}}e.URI=u;const i=p.isWindows?1:void 0;class f extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=d(this,!1)),this._fsPath}toString(v=!1){return v?n(this,!0):(this._formatted||(this._formatted=n(this,!1)),this._formatted)}toJSON(){const v={$mid:1};return this._fsPath&&(v.fsPath=this._fsPath,v._sep=i),this._formatted&&(v.external=this._formatted),this.path&&(v.path=this.path),this.scheme&&(v.scheme=this.scheme),this.authority&&(v.authority=this.authority),this.query&&(v.query=this.query),this.fragment&&(v.fragment=this.fragment),v}}const c={[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(h,v){let m,w=-1;for(let D=0;D<h.length;D++){const y=h.charCodeAt(D);if(y>=97&&y<=122||y>=65&&y<=90||y>=48&&y<=57||y===45||y===46||y===95||y===126||v&&y===47)w!==-1&&(m+=encodeURIComponent(h.substring(w,D)),w=-1),m!==void 0&&(m+=h.charAt(D));else{m===void 0&&(m=h.substr(0,D));const T=c[y];T!==void 0?(w!==-1&&(m+=encodeURIComponent(h.substring(w,D)),w=-1),m+=T):w===-1&&(w=D)}}return w!==-1&&(m+=encodeURIComponent(h.substring(w))),m!==void 0?m:h}function s(h){let v;for(let m=0;m<h.length;m++){const w=h.charCodeAt(m);w===35||w===63?(v===void 0&&(v=h.substr(0,m)),v+=c[w]):v!==void 0&&(v+=h[m])}return v!==void 0?v:h}function d(h,v){let m;return h.authority&&h.path.length>1&&h.scheme==="file"?m=`//${h.authority}${h.path}`:h.path.charCodeAt(0)===47&&(h.path.charCodeAt(1)>=65&&h.path.charCodeAt(1)<=90||h.path.charCodeAt(1)>=97&&h.path.charCodeAt(1)<=122)&&h.path.charCodeAt(2)===58?v?m=h.path.substr(1):m=h.path[1].toLowerCase()+h.path.substr(2):m=h.path,p.isWindows&&(m=m.replace(/\//g,"\\")),m}e.uriToFsPath=d;function n(h,v){const m=v?s:l;let w="",{scheme:D,authority:y,path:T,query:_,fragment:L}=h;if(D&&(w+=D,w+=":"),(y||D==="file")&&(w+=C,w+=C),y){let M=y.indexOf("@");if(M!==-1){const O=y.substr(0,M);y=y.substr(M+1),M=O.indexOf(":"),M===-1?w+=m(O,!1):(w+=m(O.substr(0,M),!1),w+=":",w+=m(O.substr(M+1),!1)),w+="@"}y=y.toLowerCase(),M=y.indexOf(":"),M===-1?w+=m(y,!1):(w+=m(y.substr(0,M),!1),w+=y.substr(M))}if(T){if(T.length>=3&&T.charCodeAt(0)===47&&T.charCodeAt(2)===58){const M=T.charCodeAt(1);M>=65&&M<=90&&(T=`/${String.fromCharCode(M+32)}:${T.substr(3)}`)}else if(T.length>=2&&T.charCodeAt(1)===58){const M=T.charCodeAt(0);M>=65&&M<=90&&(T=`${String.fromCharCode(M+32)}:${T.substr(2)}`)}w+=m(T,!0)}return _&&(w+="?",w+=m(_,!1)),L&&(w+="#",w+=v?L:l(L,!1)),w}function a(h){try{return decodeURIComponent(h)}catch{return h.length>3?h.substr(0,3)+a(h.substr(3)):h}}const o=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function g(h){return h.match(o)?h.replace(o,v=>a(v)):h}}),define(ae[747],le([1,0,9]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=e.getFirstFrame=e.parse=e.isRemoteConsoleLog=void 0;function p(b){const S=b;return S&&typeof S.type=="string"&&typeof S.severity=="string"}e.isRemoteConsoleLog=p;function R(b){const S=[];let C;try{const r=JSON.parse(b.arguments),u=r[r.length-1];u&&u.__$stack&&(r.pop(),C=u.__$stack),S.push(...r)}catch{S.push("Unable to log remote console arguments",b.arguments)}return{args:S,stack:C}}e.parse=R;function A(b){if(typeof b!="string")return A(R(b).stack);const S=b;if(S){const C=k(S),r=/at [^\/]*((?:(?:[a-zA-Z]+:)|(?:[\/])|(?:\\\\))(?:.+)):(\d+):(\d+)/.exec(C||"");if(r&&r.length===4)return{uri:t.URI.file(r[1]),line:Number(r[2]),column:Number(r[3])}}}e.getFirstFrame=A;function k(b){if(!b)return b;const S=b.indexOf(` `);return S===-1?b:b.substring(0,S)}function E(b,S){const{args:C,stack:r}=R(b),u=typeof C[0]=="string"&&C.length===1;let i=k(r);i&&(i=`(${i.trim()})`);let f=[];if(typeof C[0]=="string"?i&&u?f=[`%c[${S}] %c${C[0]} %c${i}`,I("blue"),I(""),I("grey")]:f=[`%c[${S}] %c${C[0]}`,I("blue"),I(""),...C.slice(1)]:f=[`%c[${S}]%`,I("blue"),...C],i&&!u&&f.push(i),typeof console[b.severity]!="function")throw new Error("Unknown console method");console[b.severity].apply(console,f)}e.log=E;function I(b){return`color: ${b}`}}),define(ae[165],le([1,0,56,28,9]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function A(b){return JSON.stringify(b,E)}e.stringify=A;function k(b){let S=JSON.parse(b);return S=I(S),S}e.parse=k;function E(b,S){return S instanceof RegExp?{$mid:2,source:S.source,flags:(0,p.regExpFlags)(S)}:S}function I(b,S=0){if(!b||S>200)return b;if(typeof b=="object"){switch(b.$mid){case 1:return R.URI.revive(b);case 2:return new RegExp(b.source,b.flags);case 15:return new Date(b.source)}if(b instanceof t.VSBuffer||b instanceof Uint8Array)return b;if(Array.isArray(b))for(let C=0;C<b.length;++C)b[C]=I(b[C],S+1);else for(const C in b)Object.hasOwnProperty.call(b,C)&&(b[C]=I(b[C],S+1))}return b}e.revive=I}),define(ae[22],le([1,0,14,9]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.connectionTokenCookieName=e.Schemas=void 0;var R;(function(I){I.inMemory="inmemory",I.vscode="vscode",I.internal="private",I.walkThrough="walkThrough",I.walkThroughSnippet="walkThroughSnippet",I.http="http",I.https="https",I.file="file",I.mailto="mailto",I.untitled="untitled",I.data="data",I.command="command",I.vscodeRemote="vscode-remote",I.vscodeRemoteResource="vscode-remote-resource",I.vscodeUserData="vscode-userdata",I.vscodeCustomEditor="vscode-custom-editor",I.vscodeNotebook="vscode-notebook",I.vscodeNotebookCell="vscode-notebook-cell",I.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",I.vscodeNotebookCellOutput="vscode-notebook-cell-output",I.vscodeInteractive="vscode-interactive",I.vscodeInteractiveInput="vscode-interactive-input",I.vscodeSettings="vscode-settings",I.vscodeWorkspaceTrust="vscode-workspace-trust",I.vscodeTerminal="vscode-terminal",I.webviewPanel="webview-panel",I.vscodeWebview="vscode-webview",I.extension="extension",I.vscodeFileResource="vscode-file",I.tmp="tmp",I.vsls="vsls",I.vscodeSourceControl="vscode-scm"})(R=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,this._remoteResourcesPath=`/${R.vscodeRemoteResource}`}setPreferredWebSchema(b){this._preferredWebSchema=b}setDelegate(b){this._delegate=b}setServerRootPath(b){this._remoteResourcesPath=`${b}/${R.vscodeRemoteResource}`}set(b,S,C){this._hosts[b]=S,this._ports[b]=C}setConnectionToken(b,S){this._connectionTokens[b]=S}getPreferredWebSchema(){return this._preferredWebSchema}rewrite(b){if(this._delegate)return this._delegate(b);const S=b.authority;let C=this._hosts[S];C&&C.indexOf(":")!==-1&&C.indexOf("[")===-1&&(C=`[${C}]`);const r=this._ports[S],u=this._connectionTokens[S];let i=`path=${encodeURIComponent(b.path)}`;return typeof u=="string"&&(i+=`&${e.connectionTokenQueryName}=${encodeURIComponent(u)}`),p.URI.from({scheme:t.isWeb?this._preferredWebSchema:R.vscodeRemoteResource,authority:`${C}:${r}`,path:this._remoteResourcesPath,query:i})}}e.RemoteAuthorities=new A;class k{asBrowserUri(b,S){const C=this.toUri(b,S);return C.scheme===R.vscodeRemote?e.RemoteAuthorities.rewrite(C):C.scheme===R.file&&(t.isNative||t.isWebWorker&&t.globals.origin===`${R.vscodeFileResource}://${k.FALLBACK_AUTHORITY}`)?C.with({scheme:R.vscodeFileResource,authority:C.authority||k.FALLBACK_AUTHORITY,query:null,fragment:null}):C}asFileUri(b,S){const C=this.toUri(b,S);return C.scheme===R.vscodeFileResource?C.with({scheme:R.file,authority:C.authority!==k.FALLBACK_AUTHORITY?C.authority:null,query:null,fragment:null}):C}toUri(b,S){return p.URI.isUri(b)?b:p.URI.parse(S.toUrl(b))}}k.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new k;var E;(function(I){const b=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);I.CoopAndCoep=Object.freeze(b.get("3"));const S="vscode-coi";function C(u){let i;typeof u=="string"?i=new URL(u).searchParams:u instanceof URL?i=u.searchParams:p.URI.isUri(u)&&(i=new URL(u.toString(!0)).searchParams);const f=i?.get(S);if(!!f)return b.get(f)}I.getHeadersFromQuery=C;function r(u,i,f){if(!globalThis.crossOriginIsolated)return;const c=i&&f?"3":f?"2":"1";u instanceof URLSearchParams?u.set(S,c):u[S]=c}I.addSearchParam=r})(E=e.COI||(e.COI={}))}),define(ae[18],le([1,0,164,22,53,14,28,9]),function(J,e,t,p,R,A,k,E){"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(u){return(0,E.uriToFsPath)(u,!0)}e.originalFSPath=I;class b{constructor(i){this._ignorePathCasing=i}compare(i,f,c=!1){return i===f?0:(0,k.compare)(this.getComparisonKey(i,c),this.getComparisonKey(f,c))}isEqual(i,f,c=!1){return i===f?!0:!i||!f?!1:this.getComparisonKey(i,c)===this.getComparisonKey(f,c)}getComparisonKey(i,f=!1){return i.with({path:this._ignorePathCasing(i)?i.path.toLowerCase():void 0,fragment:f?null:void 0}).toString()}ignorePathCasing(i){return this._ignorePathCasing(i)}isEqualOrParent(i,f,c=!1){if(i.scheme===f.scheme){if(i.scheme===p.Schemas.file)return t.isEqualOrParent(I(i),I(f),this._ignorePathCasing(i))&&i.query===f.query&&(c||i.fragment===f.fragment);if((0,e.isEqualAuthority)(i.authority,f.authority))return t.isEqualOrParent(i.path,f.path,this._ignorePathCasing(i),"/")&&i.query===f.query&&(c||i.fragment===f.fragment)}return!1}joinPath(i,...f){return E.URI.joinPath(i,...f)}basenameOrAuthority(i){return(0,e.basename)(i)||i.authority}basename(i){return R.posix.basename(i.path)}extname(i){return R.posix.extname(i.path)}dirname(i){if(i.path.length===0)return i;let f;return i.scheme===p.Schemas.file?f=E.URI.file(R.dirname(I(i))).path:(f=R.posix.dirname(i.path),i.authority&&f.length&&f.charCodeAt(0)!==47&&(console.error(`dirname("${i.toString})) resulted in a relative path`),f="/")),i.with({path:f})}normalizePath(i){if(!i.path.length)return i;let f;return i.scheme===p.Schemas.file?f=E.URI.file(R.normalize(I(i))).path:f=R.posix.normalize(i.path),i.with({path:f})}relativePath(i,f){if(i.scheme!==f.scheme||!(0,e.isEqualAuthority)(i.authority,f.authority))return;if(i.scheme===p.Schemas.file){const s=R.relative(I(i),I(f));return A.isWindows?t.toSlashes(s):s}let c=i.path||"/";const l=f.path||"/";if(this._ignorePathCasing(i)){let s=0;for(const d=Math.min(c.length,l.length);s<d&&!(c.charCodeAt(s)!==l.charCodeAt(s)&&c.charAt(s).toLowerCase()!==l.charAt(s).toLowerCase());s++);c=l.substr(0,s)+c.substr(s)}return R.posix.relative(c,l)}resolvePath(i,f){if(i.scheme===p.Schemas.file){const c=E.URI.file(R.resolve(I(i),f));return i.with({authority:c.authority,path:c.path})}return f=t.toPosixPath(f),i.with({path:R.posix.resolve(i.path,f)})}isAbsolutePath(i){return!!i.path&&i.path[0]==="/"}isEqualAuthority(i,f){return i===f||i!==void 0&&f!==void 0&&(0,k.equalsIgnoreCase)(i,f)}hasTrailingPathSeparator(i,f=R.sep){if(i.scheme===p.Schemas.file){const c=I(i);return c.length>t.getRoot(c).length&&c[c.length-1]===f}else{const c=i.path;return c.length>1&&c.charCodeAt(c.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,f=R.sep){return(0,e.hasTrailingPathSeparator)(i,f)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,f=R.sep){let c=!1;if(i.scheme===p.Schemas.file){const l=I(i);c=l!==void 0&&l.length===t.getRoot(l).length&&l[l.length-1]===f}else{f="/";const l=i.path;c=l.length===1&&l.charCodeAt(l.length-1)===47}return!c&&!(0,e.hasTrailingPathSeparator)(i,f)?i.with({path:i.path+"/"}):i}}e.ExtUri=b,e.extUri=new b(()=>!1),e.extUriBiasedIgnorePathCase=new b(u=>u.scheme===p.Schemas.file?!A.isLinux:!0),e.extUriIgnorePathCase=new b(u=>!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 S(u,i){const f=[];for(let c=0;c<u.length;c++){const l=i(u[c]);u.some((s,d)=>d===c?!1:(0,e.isEqualOrParent)(l,i(s)))||f.push(u[c])}return f}e.distinctParents=S;var C;(function(u){u.META_DATA_LABEL="label",u.META_DATA_DESCRIPTION="description",u.META_DATA_SIZE="size",u.META_DATA_MIME="mime";function i(f){const c=new Map;f.path.substring(f.path.indexOf(";")+1,f.path.lastIndexOf(";")).split(";").forEach(d=>{const[n,a]=d.split(":");n&&a&&c.set(n,a)});const s=f.path.substring(0,f.path.indexOf(";"));return s&&c.set(u.META_DATA_MIME,s),c}u.parseMetaData=i})(C=e.DataUri||(e.DataUri={}));function r(u,i,f){if(i){let c=u.path;return c&&c[0]!==R.posix.sep&&(c=R.posix.sep+c),u.with({scheme:f,authority:i,path:c})}return u.with({scheme:f})}e.toLocalResource=r}),define(ae[11],le([1,0,32,21,6,2,18,14]),function(J,e,t,p,R,A,k,E){"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(Q){return!!Q&&typeof Q.then=="function"}e.isThenable=I;function b(Q){const j=new t.CancellationTokenSource,K=Q(j.token),Y=new Promise((ee,ie)=>{const re=j.token.onCancellationRequested(()=>{re.dispose(),j.dispose(),ie(new p.CancellationError)});Promise.resolve(K).then(oe=>{re.dispose(),j.dispose(),ee(oe)},oe=>{re.dispose(),j.dispose(),ie(oe)})});return new class{cancel(){j.cancel()}then(ee,ie){return Y.then(ee,ie)}catch(ee){return this.then(void 0,ee)}finally(ee){return Y.finally(ee)}}}e.createCancelablePromise=b;function S(Q,j,K){return new Promise((Y,ee)=>{const ie=j.onCancellationRequested(()=>{ie.dispose(),Y(K)});Q.then(Y,ee).finally(()=>ie.dispose())})}e.raceCancellation=S;function C(Q,j){return new Promise((K,Y)=>{const ee=j.onCancellationRequested(()=>{ee.dispose(),Y(new p.CancellationError)});Q.then(K,Y).finally(()=>ee.dispose())})}e.raceCancellationError=C;async function r(Q){let j=-1;const K=Q.map((ee,ie)=>ee.then(re=>(j=ie,re))),Y=await Promise.race(K);return Q.forEach((ee,ie)=>{ie!==j&&ee.cancel()}),Y}e.raceCancellablePromises=r;function u(Q,j,K){let Y;const ee=setTimeout(()=>{Y?.(void 0),K?.()},j);return Promise.race([Q.finally(()=>clearTimeout(ee)),new Promise(ie=>Y=ie)])}e.raceTimeout=u;function i(Q){return new Promise((j,K)=>{const Y=Q();I(Y)?Y.then(j,K):j(Y)})}e.asPromise=i;class f{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(j){if(this.activePromise){if(this.queuedPromiseFactory=j,!this.queuedPromise){const K=()=>{this.queuedPromise=null;const Y=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,Y};this.queuedPromise=new Promise(Y=>{this.activePromise.then(K,K).then(Y)})}return new Promise((K,Y)=>{this.queuedPromise.then(K,Y)})}return this.activePromise=j(),new Promise((K,Y)=>{this.activePromise.then(ee=>{this.activePromise=null,K(ee)},ee=>{this.activePromise=null,Y(ee)})})}}e.Throttler=f;class c{constructor(){this.current=Promise.resolve(null)}queue(j){return this.current=this.current.then(()=>j(),()=>j())}}e.Sequencer=c;class l{constructor(){this.promiseMap=new Map}queue(j,K){const ee=(this.promiseMap.get(j)??Promise.resolve()).catch(()=>{}).then(K).finally(()=>{this.promiseMap.get(j)===ee&&this.promiseMap.delete(j)});return this.promiseMap.set(j,ee),ee}}e.SequencerByKey=l;const s=(Q,j)=>{let K=!0;const Y=setTimeout(()=>{K=!1,j()},Q);return{isTriggered:()=>K,dispose:()=>{clearTimeout(Y),K=!1}}},d=Q=>{let j=!0;return queueMicrotask(()=>{j&&(j=!1,Q())}),{isTriggered:()=>j,dispose:()=>{j=!1}}};e.MicrotaskDelay=Symbol("MicrotaskDelay");class n{constructor(j){this.defaultDelay=j,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(j,K=this.defaultDelay){this.task=j,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((ee,ie)=>{this.doResolve=ee,this.doReject=ie}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const ee=this.task;return this.task=null,ee()}}));const Y=()=>{this.deferred=null,this.doResolve?.(null)};return this.deferred=K===e.MicrotaskDelay?d(Y):s(K,Y),this.completionPromise}isTriggered(){return!!this.deferred?.isTriggered()}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject?.(new p.CancellationError),this.completionPromise=null)}cancelTimeout(){this.deferred?.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=n;class a{constructor(j){this.delayer=new n(j),this.throttler=new f}trigger(j,K){return this.delayer.trigger(()=>this.throttler.queue(j),K)}isTriggered(){return this.delayer.isTriggered()}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}e.ThrottledDelayer=a;class o{constructor(){this._isOpen=!1,this._promise=new Promise((j,K)=>{this._completePromise=j})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}e.Barrier=o;class g extends o{constructor(j){super(),this._timeout=setTimeout(()=>this.open(),j)}open(){clearTimeout(this._timeout),super.open()}}e.AutoOpenBarrier=g;function h(Q,j){return j?new Promise((K,Y)=>{const ee=setTimeout(()=>{ie.dispose(),K()},Q),ie=j.onCancellationRequested(()=>{clearTimeout(ee),ie.dispose(),Y(new p.CancellationError)})}):b(K=>h(Q,K))}e.timeout=h;function v(Q,j=0){const K=setTimeout(Q,j);return(0,A.toDisposable)(()=>clearTimeout(K))}e.disposableTimeout=v;function m(Q){const j=[];let K=0;const Y=Q.length;function ee(){return K<Y?Q[K++]():null}function ie(re){re!=null&&j.push(re);const oe=ee();return oe?oe.then(ie):Promise.resolve(j)}return Promise.resolve(null).then(ie)}e.sequence=m;function w(Q,j=Y=>!!Y,K=null){let Y=0;const ee=Q.length,ie=()=>{if(Y>=ee)return Promise.resolve(K);const re=Q[Y++];return Promise.resolve(re()).then(se=>j(se)?Promise.resolve(se):ie())};return ie()}e.first=w;function D(Q,j=Y=>!!Y,K=null){if(Q.length===0)return Promise.resolve(K);let Y=Q.length;const ee=()=>{Y=-1;for(const ie of Q)ie.cancel?.()};return new Promise((ie,re)=>{for(const oe of Q)oe.then(se=>{--Y>=0&&j(se)?(ee(),ie(se)):Y===0&&ie(K)}).catch(se=>{--Y>=0&&(ee(),re(se))})})}e.firstParallel=D;class y{constructor(j){this._size=0,this.maxDegreeOfParalellism=j,this.outstandingPromises=[],this.runningPromises=0,this._onDrained=new R.Emitter}get onDrained(){return this._onDrained.event}get size(){return this._size}queue(j){return this._size++,new Promise((K,Y)=>{this.outstandingPromises.push({factory:j,c:K,e:Y}),this.consume()})}consume(){for(;this.outstandingPromises.length&&this.runningPromises<this.maxDegreeOfParalellism;){const j=this.outstandingPromises.shift();this.runningPromises++;const K=j.factory();K.then(j.c,j.e),K.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 _{constructor(){this.queues=new Map,this.drainers=new Set}async whenDrained(){if(this.isDrained())return;const j=new W;return this.drainers.add(j),j.p}isDrained(){for(const[,j]of this.queues)if(j.size>0)return!1;return!0}queueFor(j,K=k.extUri){const Y=K.getComparisonKey(j);let ee=this.queues.get(Y);return ee||(ee=new T,R.Event.once(ee.onDrained)(()=>{ee?.dispose(),this.queues.delete(Y),this.onDidQueueDrain()}),this.queues.set(Y,ee)),ee}onDidQueueDrain(){!this.isDrained()||this.releaseDrainers()}releaseDrainers(){for(const j of this.drainers)j.complete();this.drainers.clear()}dispose(){for(const[,j]of this.queues)j.dispose();this.queues.clear(),this.releaseDrainers()}}e.ResourceQueue=_;class L{constructor(j,K){this._token=-1,typeof j=="function"&&typeof K=="number"&&this.setIfNotSet(j,K)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(j,K){this.cancel(),this._token=setTimeout(()=>{this._token=-1,j()},K)}setIfNotSet(j,K){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,j()},K))}}e.TimeoutTimer=L;class M{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(j,K){this.cancel(),this._token=setInterval(()=>{j()},K)}}e.IntervalTimer=M;class O{constructor(j,K){this.timeoutToken=-1,this.runner=j,this.timeout=K,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(j=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,j)}get delay(){return this.timeout}set delay(j){this.timeout=j}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner?.()}}e.RunOnceScheduler=O;class N{constructor(j,K){K%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${K}ms is not a multiple of 1000ms.`),this.runner=j,this.timeout=K,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(j=this.timeout){j%1e3!==0&&console.warn(`ProcessTimeRunOnceScheduler resolution is 1s, ${j}ms is not a multiple of 1000ms.`),this.cancel(),this.counter=Math.ceil(j/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?.())}}e.ProcessTimeRunOnceScheduler=N;class P extends O{constructor(j,K){super(j,K),this.units=[]}work(j){this.units.push(j),this.isScheduled()||this.schedule()}doRun(){const j=this.units;this.units=[],this.runner?.(j)}dispose(){this.units=[],super.dispose()}}e.RunOnceWorker=P;class B extends A.Disposable{constructor(j,K){super(),this.options=j,this.handler=K,this.pendingWork=[],this.throttler=this._register(new A.MutableDisposable),this.disposed=!1}get pending(){return this.pendingWork.length}work(j){if(this.disposed)return!1;if(typeof this.options.maxBufferedWork=="number"){if(this.throttler.value){if(this.pending+j.length>this.options.maxBufferedWork)return!1}else if(this.pending+j.length-this.options.maxWorkChunkSize>this.options.maxBufferedWork)return!1}return this.pendingWork.push(...j),this.throttler.value||this.doWork(),!0}doWork(){this.handler(this.pendingWork.splice(0,this.options.maxWorkChunkSize)),this.pendingWork.length>0&&(this.throttler.value=new O(()=>{this.throttler.clear(),this.doWork()},this.options.throttleDelay),this.throttler.value.schedule())}dispose(){super.dispose(),this.disposed=!0}}e.ThrottledWorker=B,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=Q=>{(0,E.setTimeout0)(()=>{if(j)return;const K=Date.now()+15;Q(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,K-Date.now())}}))});let j=!1;return{dispose(){j||(j=!0)}}}:e.runWhenIdle=(Q,j)=>{const K=requestIdleCallback(Q,typeof j=="number"?{timeout:j}:void 0);let Y=!1;return{dispose(){Y||(Y=!0,cancelIdleCallback(K))}}}}();class V{constructor(j){this._didRun=!1,this._executor=()=>{try{this._value=j()}catch(K){this._error=K}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=V;async function z(Q,j,K){let Y;for(let ee=0;ee<K;ee++)try{return await Q()}catch(ie){Y=ie,await h(j)}throw Y}e.retry=z;class x{hasPending(j){return this._pending?typeof j=="number"?this._pending.taskId===j:!!this._pending:!1}get pending(){return this._pending?.promise}cancelPending(){this._pending?.cancel()}setPending(j,K,Y){return this._pending={taskId:j,cancel:()=>Y?.(),promise:K},K.then(()=>this.donePending(j),()=>this.donePending(j)),K}donePending(j){this._pending&&j===this._pending.taskId&&(this._pending=void 0,this.triggerNext())}triggerNext(){if(this._next){const j=this._next;this._next=void 0,j.run().then(j.promiseResolve,j.promiseReject)}}setNext(j){if(this._next)this._next.run=j;else{let K,Y;const ee=new Promise((ie,re)=>{K=ie,Y=re});this._next={run:j,promise:ee,promiseResolve:K,promiseReject:Y}}return this._next.promise}hasNext(){return!!this._next}async join(){return this._next?.promise??this._pending?.promise}}e.TaskSequentializer=x;class H{constructor(j,K=()=>Date.now()){this.interval=j,this.nowFn=K,this.lastIncrementTime=0,this.value=0}increment(){const j=this.nowFn();return j-this.lastIncrementTime>this.interval&&(this.lastIncrementTime=j,this.value=0),this.value++,this.value}}e.IntervalCounter=H;class W{get isRejected(){return this.rejected}get isResolved(){return this.resolved}get isSettled(){return this.rejected||this.resolved}constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise((j,K)=>{this.completeCallback=j,this.errorCallback=K})}complete(j){return new Promise(K=>{this.completeCallback(j),this.resolved=!0,K()})}error(j){return new Promise(K=>{this.errorCallback(j),this.rejected=!0,K()})}cancel(){new Promise(j=>{this.errorCallback(new p.CancellationError),this.rejected=!0,j()})}}e.DeferredPromise=W;var U;(function(Q){async function j(Y){let ee;const ie=await Promise.all(Y.map(re=>re.then(oe=>oe,oe=>{ee||(ee=oe)})));if(typeof ee<"u")throw ee;return ie}Q.settled=j;function K(Y){return new Promise(async(ee,ie)=>{try{await Y(ee,ie)}catch(re){ie(re)}})}Q.withAsyncBody=K})(U=e.Promises||(e.Promises={}));var $;(function(Q){Q[Q.Initial=0]="Initial",Q[Q.DoneOK=1]="DoneOK",Q[Q.DoneError=2]="DoneError"})($||($={}));class q{static fromArray(j){return new q(K=>{K.emitMany(j)})}static fromPromise(j){return new q(async K=>{K.emitMany(await j)})}static fromPromises(j){return new q(async K=>{await Promise.all(j.map(async Y=>K.emitOne(await Y)))})}static merge(j){return new q(async K=>{await Promise.all(j.map(async Y=>{for await(const ee of Y)K.emitOne(ee)}))})}constructor(j){this._state=0,this._results=[],this._error=null,this._onStateChanged=new R.Emitter,queueMicrotask(async()=>{const K={emitOne:Y=>this.emitOne(Y),emitMany:Y=>this.emitMany(Y),reject:Y=>this.reject(Y)};try{await Promise.resolve(j(K)),this.resolve()}catch(Y){this.reject(Y)}finally{K.emitOne=void 0,K.emitMany=void 0,K.reject=void 0}})}[Symbol.asyncIterator](){let j=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(j<this._results.length)return{done:!1,value:this._results[j++]};if(this._state===1)return{done:!0,value:void 0};await R.Event.toPromise(this._onStateChanged.event)}while(!0)}}}static map(j,K){return new q(async Y=>{for await(const ee of j)Y.emitOne(K(ee))})}map(j){return q.map(this,j)}static filter(j,K){return new q(async Y=>{for await(const ee of j)K(ee)&&Y.emitOne(ee)})}filter(j){return q.filter(this,j)}static coalesce(j){return q.filter(j,K=>!!K)}coalesce(){return q.coalesce(this)}static async toPromise(j){const K=[];for await(const Y of j)K.push(Y);return K}toPromise(){return q.toPromise(this)}emitOne(j){this._state===0&&(this._results.push(j),this._onStateChanged.fire())}emitMany(j){this._state===0&&(this._results=this._results.concat(j),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(j){this._state===0&&(this._state=2,this._error=j,this._onStateChanged.fire())}}e.AsyncIterableObject=q,q.EMPTY=q.fromArray([]);class X extends q{constructor(j,K){super(K),this._source=j}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=X;function G(Q){const j=new t.CancellationTokenSource,K=Q(j.token);return new X(j,async Y=>{const ee=j.token.onCancellationRequested(()=>{ee.dispose(),j.dispose(),Y.reject(new p.CancellationError)});try{for await(const ie of K){if(j.token.isCancellationRequested)return;Y.emitOne(ie)}ee.dispose(),j.dispose()}catch(ie){ee.dispose(),j.dispose(),Y.reject(ie)}})}e.createCancelableAsyncIterable=G}),define(ae[10],le([1,0,86,237,90,139,11,21,6,748,2,22,14,13,9]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.h=e.DragAndDropObserver=e.getCookieValue=e.ModifierKeyEmitter=e.multibyteAwareBtoa=e.safeInnerHtml=e.basicMarkupHtmlTags=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.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.getDomNodeZoomLevel=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.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseMoveListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=void 0;function f(Ne){for(;Ne.firstChild;)Ne.firstChild.remove()}e.clearNode=f;function c(Ne){return Ne?.isConnected??!1}e.isInDOM=c;class l{constructor(Ge,Ze,ft,Dt){this._node=Ge,this._type=Ze,this._handler=ft,this._options=Dt||!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 s(Ne,Ge,Ze,ft){return new l(Ne,Ge,Ze,ft)}e.addDisposableListener=s;function d(Ne){return function(Ge){return Ne(new A.StandardMouseEvent(Ge))}}function n(Ne){return function(Ge){return Ne(new R.StandardKeyboardEvent(Ge))}}const a=function(Ge,Ze,ft,Dt){let St=ft;return Ze==="click"||Ze==="mousedown"?St=d(ft):(Ze==="keydown"||Ze==="keypress"||Ze==="keyup")&&(St=n(ft)),s(Ge,Ze,St,Dt)};e.addStandardDisposableListener=a;const o=function(Ge,Ze,ft){const Dt=d(Ze);return h(Ge,Dt,ft)};e.addStandardDisposableGenericMouseDownListener=o;const g=function(Ge,Ze,ft){const Dt=d(Ze);return m(Ge,Dt,ft)};e.addStandardDisposableGenericMouseUpListener=g;function h(Ne,Ge,Ze){return s(Ne,r.isIOS&&p.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,Ge,Ze)}e.addDisposableGenericMouseDownListener=h;function v(Ne,Ge,Ze){return s(Ne,r.isIOS&&p.BrowserFeatures.pointerEvents?e.EventType.POINTER_MOVE:e.EventType.MOUSE_MOVE,Ge,Ze)}e.addDisposableGenericMouseMoveListener=v;function m(Ne,Ge,Ze){return s(Ne,r.isIOS&&p.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,Ge,Ze)}e.addDisposableGenericMouseUpListener=m;class w{constructor(Ge,Ze=0){this._runner=Ge,this.priority=Ze,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(Ge){(0,E.onUnexpectedError)(Ge)}}static sort(Ge,Ze){return Ze.priority-Ge.priority}}(function(){let Ne=[],Ge=null,Ze=!1,ft=!1;const Dt=()=>{for(Ze=!1,Ge=Ne,Ne=[],ft=!0;Ge.length>0;)Ge.sort(w.sort),Ge.shift().execute();ft=!1};e.scheduleAtNextAnimationFrame=(St,Ye=0)=>{const it=new w(St,Ye);return Ne.push(it),Ze||(Ze=!0,requestAnimationFrame(Dt)),it},e.runAtThisOrScheduleAtNextAnimationFrame=(St,Ye)=>{if(ft){const it=new w(St,Ye);return Ge.push(it),it}else return(0,e.scheduleAtNextAnimationFrame)(St,Ye)}})();function D(Ne){return(0,e.scheduleAtNextAnimationFrame)(Ne,1e4)}e.measure=D;function y(Ne){return(0,e.scheduleAtNextAnimationFrame)(Ne,-1e4)}e.modify=y;const T=8,_=function(Ne,Ge){return Ge};class L extends S.Disposable{constructor(Ge,Ze,ft,Dt=_,St=T){super();let Ye=null,it=0;const ct=this._register(new k.TimeoutTimer),gt=()=>{it=new Date().getTime(),ft(Ye),Ye=null};this._register(s(Ge,Ze,$e=>{Ye=Dt(Ye,$e);const Qe=new Date().getTime()-it;Qe>=St?(ct.cancel(),gt()):ct.setIfNotSet(gt,St-Qe)}))}}function M(Ne,Ge,Ze,ft,Dt){return new L(Ne,Ge,Ze,ft,Dt)}e.addDisposableThrottledListener=M;function O(Ne){return document.defaultView.getComputedStyle(Ne,null)}e.getComputedStyle=O;function N(Ne){if(Ne!==document.body)return new B(Ne.clientWidth,Ne.clientHeight);if(r.isIOS&&window.visualViewport)return new B(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new B(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new B(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new B(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=N;class P{static convertToPixels(Ge,Ze){return parseFloat(Ze)||0}static getDimension(Ge,Ze,ft){const Dt=O(Ge),St=Dt?Dt.getPropertyValue(Ze):"0";return P.convertToPixels(Ge,St)}static getBorderLeftWidth(Ge){return P.getDimension(Ge,"border-left-width","borderLeftWidth")}static getBorderRightWidth(Ge){return P.getDimension(Ge,"border-right-width","borderRightWidth")}static getBorderTopWidth(Ge){return P.getDimension(Ge,"border-top-width","borderTopWidth")}static getBorderBottomWidth(Ge){return P.getDimension(Ge,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(Ge){return P.getDimension(Ge,"padding-left","paddingLeft")}static getPaddingRight(Ge){return P.getDimension(Ge,"padding-right","paddingRight")}static getPaddingTop(Ge){return P.getDimension(Ge,"padding-top","paddingTop")}static getPaddingBottom(Ge){return P.getDimension(Ge,"padding-bottom","paddingBottom")}static getMarginLeft(Ge){return P.getDimension(Ge,"margin-left","marginLeft")}static getMarginTop(Ge){return P.getDimension(Ge,"margin-top","marginTop")}static getMarginRight(Ge){return P.getDimension(Ge,"margin-right","marginRight")}static getMarginBottom(Ge){return P.getDimension(Ge,"margin-bottom","marginBottom")}}class B{constructor(Ge,Ze){this.width=Ge,this.height=Ze}with(Ge=this.width,Ze=this.height){return Ge!==this.width||Ze!==this.height?new B(Ge,Ze):this}static is(Ge){return typeof Ge=="object"&&typeof Ge.height=="number"&&typeof Ge.width=="number"}static lift(Ge){return Ge instanceof B?Ge:new B(Ge.width,Ge.height)}static equals(Ge,Ze){return Ge===Ze?!0:!Ge||!Ze?!1:Ge.width===Ze.width&&Ge.height===Ze.height}}e.Dimension=B,B.None=new B(0,0);function V(Ne){let Ge=Ne.offsetParent,Ze=Ne.offsetTop,ft=Ne.offsetLeft;for(;(Ne=Ne.parentNode)!==null&&Ne!==document.body&&Ne!==document.documentElement;){Ze-=Ne.scrollTop;const Dt=te(Ne)?null:O(Ne);Dt&&(ft-=Dt.direction!=="rtl"?Ne.scrollLeft:-Ne.scrollLeft),Ne===Ge&&(ft+=P.getBorderLeftWidth(Ne),Ze+=P.getBorderTopWidth(Ne),Ze+=Ne.offsetTop,ft+=Ne.offsetLeft,Ge=Ne.offsetParent)}return{left:ft,top:Ze}}e.getTopLeftOffset=V;function z(Ne,Ge,Ze){typeof Ge=="number"&&(Ne.style.width=`${Ge}px`),typeof Ze=="number"&&(Ne.style.height=`${Ze}px`)}e.size=z;function x(Ne,Ge,Ze,ft,Dt,St="absolute"){typeof Ge=="number"&&(Ne.style.top=`${Ge}px`),typeof Ze=="number"&&(Ne.style.right=`${Ze}px`),typeof ft=="number"&&(Ne.style.bottom=`${ft}px`),typeof Dt=="number"&&(Ne.style.left=`${Dt}px`),Ne.style.position=St}e.position=x;function H(Ne){const Ge=Ne.getBoundingClientRect();return{left:Ge.left+window.scrollX,top:Ge.top+window.scrollY,width:Ge.width,height:Ge.height}}e.getDomNodePagePosition=H;function W(Ne){let Ge=Ne,Ze=1;do{const ft=O(Ge).zoom;ft!=null&&ft!=="1"&&(Ze*=ft),Ge=Ge.parentElement}while(Ge!==null&&Ge!==document.documentElement);return Ze}e.getDomNodeZoomLevel=W;function U(Ne){const Ge=P.getMarginLeft(Ne)+P.getMarginRight(Ne);return Ne.offsetWidth+Ge}e.getTotalWidth=U;function $(Ne){const Ge=P.getBorderLeftWidth(Ne)+P.getBorderRightWidth(Ne),Ze=P.getPaddingLeft(Ne)+P.getPaddingRight(Ne);return Ne.offsetWidth-Ge-Ze}e.getContentWidth=$;function q(Ne){const Ge=P.getMarginLeft(Ne)+P.getMarginRight(Ne);return Ne.scrollWidth+Ge}e.getTotalScrollWidth=q;function X(Ne){const Ge=P.getBorderTopWidth(Ne)+P.getBorderBottomWidth(Ne),Ze=P.getPaddingTop(Ne)+P.getPaddingBottom(Ne);return Ne.offsetHeight-Ge-Ze}e.getContentHeight=X;function G(Ne){const Ge=P.getMarginTop(Ne)+P.getMarginBottom(Ne);return Ne.offsetHeight+Ge}e.getTotalHeight=G;function Q(Ne,Ge){if(Ne===null)return 0;const Ze=V(Ne),ft=V(Ge);return Ze.left-ft.left}function j(Ne,Ge){const Ze=Ge.map(Dt=>Math.max(q(Dt),U(Dt))+Q(Dt,Ne)||0);return Math.max(...Ze)}e.getLargestChildWidth=j;function K(Ne,Ge){for(;Ne;){if(Ne===Ge)return!0;Ne=Ne.parentNode}return!1}e.isAncestor=K;const Y="parentFlowToElementId";function ee(Ne,Ge){Ne.dataset[Y]=Ge.id}e.setParentFlowTo=ee;function ie(Ne){const Ge=Ne.dataset[Y];return typeof Ge=="string"?document.getElementById(Ge):null}function re(Ne,Ge){let Ze=Ne;for(;Ze;){if(Ze===Ge)return!0;if(Ze instanceof HTMLElement){const ft=ie(Ze);if(ft){Ze=ft;continue}}Ze=Ze.parentNode}return!1}e.isAncestorUsingFlowTo=re;function oe(Ne,Ge,Ze){for(;Ne&&Ne.nodeType===Ne.ELEMENT_NODE;){if(Ne.classList.contains(Ge))return Ne;if(Ze){if(typeof Ze=="string"){if(Ne.classList.contains(Ze))return null}else if(Ne===Ze)return null}Ne=Ne.parentNode}return null}e.findParentWithClass=oe;function se(Ne,Ge,Ze){return!!oe(Ne,Ge,Ze)}e.hasParentWithClass=se;function te(Ne){return Ne&&!!Ne.host&&!!Ne.mode}e.isShadowRoot=te;function Z(Ne){return!!ne(Ne)}e.isInShadowDOM=Z;function ne(Ne){for(;Ne.parentNode;){if(Ne===document.body)return null;Ne=Ne.parentNode}return te(Ne)?Ne:null}e.getShadowRoot=ne;function ce(){let Ne=document.activeElement;for(;Ne?.shadowRoot;)Ne=Ne.shadowRoot.activeElement;return Ne}e.getActiveElement=ce;function de(Ne=document.getElementsByTagName("head")[0]){const Ge=document.createElement("style");return Ge.type="text/css",Ge.media="screen",Ne.appendChild(Ge),Ge}e.createStyleSheet=de;function he(Ne=document.getElementsByTagName("head")[0]){const Ge=document.createElement("meta");return Ne.appendChild(Ge),Ge}e.createMetaElement=he;let pe=null;function me(){return pe||(pe=de()),pe}function Se(Ne){return Ne?.sheet?.rules?Ne.sheet.rules:Ne?.sheet?.cssRules?Ne.sheet.cssRules:[]}function Ie(Ne,Ge,Ze=me()){!Ze||!Ge||Ze.sheet.insertRule(Ne+"{"+Ge+"}",0)}e.createCSSRule=Ie;function ve(Ne,Ge=me()){if(!Ge)return;const Ze=Se(Ge),ft=[];for(let Dt=0;Dt<Ze.length;Dt++)Ze[Dt].selectorText.indexOf(Ne)!==-1&&ft.push(Dt);for(let Dt=ft.length-1;Dt>=0;Dt--)Ge.sheet.deleteRule(ft[Dt])}e.removeCSSRulesContainingSelector=ve;function be(Ne){return typeof HTMLElement=="object"?Ne instanceof HTMLElement:Ne&&typeof Ne=="object"&&Ne.nodeType===1&&typeof Ne.nodeName=="string"}e.isHTMLElement=be,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",POINTER_LEAVE:"pointerleave",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:(Ne,Ge)=>(Ne.preventDefault(),Ge&&Ne.stopPropagation(),Ne)};function ge(Ne){const Ge=[];for(let Ze=0;Ne&&Ne.nodeType===Ne.ELEMENT_NODE;Ze++)Ge[Ze]=Ne.scrollTop,Ne=Ne.parentNode;return Ge}e.saveParentsScrollTop=ge;function ue(Ne,Ge){for(let Ze=0;Ne&&Ne.nodeType===Ne.ELEMENT_NODE;Ze++)Ne.scrollTop!==Ge[Ze]&&(Ne.scrollTop=Ge[Ze]),Ne=Ne.parentNode}e.restoreParentsScrollTop=ue;class Ce extends S.Disposable{static hasFocusWithin(Ge){const Ze=ne(Ge),ft=Ze?Ze.activeElement:document.activeElement;return K(ft,Ge)}constructor(Ge){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 Ze=Ce.hasFocusWithin(Ge),ft=!1;const Dt=()=>{ft=!1,Ze||(Ze=!0,this._onDidFocus.fire())},St=()=>{Ze&&(ft=!0,window.setTimeout(()=>{ft&&(ft=!1,Ze=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{Ce.hasFocusWithin(Ge)!==Ze&&(Ze?St():Dt())},this._register(s(Ge,e.EventType.FOCUS,Dt,!0)),this._register(s(Ge,e.EventType.BLUR,St,!0)),this._register(s(Ge,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(s(Ge,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler()))}refreshState(){this._refreshStateHandler()}}function De(Ne){return new Ce(Ne)}e.trackFocus=De;function Ae(Ne,Ge){return Ne.after(Ge),Ge}e.after=Ae;function Pe(Ne,...Ge){if(Ne.append(...Ge),Ge.length===1&&typeof Ge[0]!="string")return Ge[0]}e.append=Pe;function fe(Ne,Ge){return Ne.insertBefore(Ge,Ne.firstChild),Ge}e.prepend=fe;function ye(Ne,...Ge){Ne.innerText="",Pe(Ne,...Ge)}e.reset=ye;const ke=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var Ee;(function(Ne){Ne.HTML="http://www.w3.org/1999/xhtml",Ne.SVG="http://www.w3.org/2000/svg"})(Ee=e.Namespace||(e.Namespace={}));function Te(Ne,Ge,Ze,...ft){const Dt=ke.exec(Ge);if(!Dt)throw new Error("Bad use of emmet");const St=Dt[1]||"div";let Ye;return Ne!==Ee.HTML?Ye=document.createElementNS(Ne,St):Ye=document.createElement(St),Dt[3]&&(Ye.id=Dt[3]),Dt[4]&&(Ye.className=Dt[4].replace(/\./g," ").trim()),Ze&&Object.entries(Ze).forEach(([it,ct])=>{typeof ct>"u"||(/^on\w+$/.test(it)?Ye[it]=ct:it==="selected"?ct&&Ye.setAttribute(it,"true"):Ye.setAttribute(it,ct))}),Ye.append(...ft),Ye}function _e(Ne,Ge,...Ze){return Te(Ee.HTML,Ne,Ge,...Ze)}e.$=_e,_e.SVG=function(Ne,Ge,...Ze){return Te(Ee.SVG,Ne,Ge,...Ze)};function Re(Ne,Ge){const Ze=[];return Ne.forEach((ft,Dt)=>{Dt>0&&(Ge instanceof Node?Ze.push(Ge.cloneNode()):Ze.push(document.createTextNode(Ge))),Ze.push(ft)}),Ze}e.join=Re;function Le(...Ne){for(const Ge of Ne)Ge.style.display="",Ge.removeAttribute("aria-hidden")}e.show=Le;function Me(...Ne){for(const Ge of Ne)Ge.style.display="none",Ge.setAttribute("aria-hidden","true")}e.hide=Me;function Oe(Ne,Ge){for(;Ne&&Ne.nodeType===Ne.ELEMENT_NODE;){if(Ne instanceof HTMLElement&&Ne.hasAttribute(Ge))return Ne;Ne=Ne.parentNode}return null}function Ke(Ne){!Ne||!Ne.hasAttribute("tabIndex")||(document.activeElement===Ne&&Oe(Ne.parentElement,"tabIndex")?.focus(),Ne.removeAttribute("tabindex"))}e.removeTabIndexAndUpdateFocus=Ke;function We(Ne){return Ge=>{Ge.preventDefault(),Ge.stopPropagation(),Ne(Ge)}}e.finalHandler=We;function Xe(){return new Promise(Ne=>{document.readyState==="complete"||document&&document.body!==null?Ne(void 0):window.addEventListener("DOMContentLoaded",Ne,!1)})}e.domContentLoaded=Xe;function Je(Ne){const Ge=window.devicePixelRatio*Ne;return Math.max(1,Math.floor(Ge))/window.devicePixelRatio}e.computeScreenAwareSize=Je;function rt(Ne){window.open(Ne,"_blank","noopener")}e.windowOpenNoOpener=rt;const je=780,Ue=640;function Fe(Ne){const Ge=Math.floor(window.screenLeft+window.innerWidth/2-je/2),Ze=Math.floor(window.screenTop+window.innerHeight/2-Ue/2);window.open(Ne,"_blank",`width=${je},height=${Ue},top=${Ze},left=${Ge}`)}e.windowOpenPopup=Fe;function He(Ne,Ge=!0){const Ze=window.open();return Ze?(Ge&&(Ze.opener=null),Ze.location.href=Ne,!0):!1}e.windowOpenWithSuccess=He;function Be(Ne){const Ge=()=>{Ne(),Ze=(0,e.scheduleAtNextAnimationFrame)(Ge)};let Ze=(0,e.scheduleAtNextAnimationFrame)(Ge);return(0,S.toDisposable)(()=>Ze.dispose())}e.animate=Be,C.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function ze(Ne){return Ne?`url('${C.FileAccess.asBrowserUri(Ne).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=ze;function nt(Ne){return`'${Ne.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=nt;function ut(Ne,Ge){let Ze;if(i.URI.isUri(Ne))Ze=Ne.toString(!0);else{const Dt=new Blob([Ne]);Ze=URL.createObjectURL(Dt),setTimeout(()=>URL.revokeObjectURL(Ze))}const ft=document.createElement("a");document.body.appendChild(ft),ft.download=Ge,ft.href=Ze,ft.click(),setTimeout(()=>document.body.removeChild(ft))}e.triggerDownload=ut;function ot(){return new Promise(Ne=>{const Ge=document.createElement("input");document.body.appendChild(Ge),Ge.type="file",Ge.multiple=!0,I.Event.once(I.Event.fromDOMEventEmitter(Ge,"input"))(()=>{Ne((0,u.withNullAsUndefined)(Ge.files))}),Ge.click(),setTimeout(()=>document.body.removeChild(Ge))})}e.triggerUpload=ot;var at;(function(Ne){Ne[Ne.DOCUMENT=1]="DOCUMENT",Ne[Ne.BROWSER=2]="BROWSER"})(at=e.DetectedFullscreenMode||(e.DetectedFullscreenMode={}));function wt(){return document.fullscreenElement||document.webkitFullscreenElement||document.webkitIsFullScreen?{mode:at.DOCUMENT,guess:!1}:window.innerHeight===screen.height?{mode:at.BROWSER,guess:!1}:(r.isMacintosh||r.isLinux)&&window.outerHeight===screen.height&&window.outerWidth===screen.width?{mode:at.BROWSER,guess:!0}:null}e.detectFullscreen=wt;function It(Ne,Ge=!1){const Ze=document.createElement("a");return b.addHook("afterSanitizeAttributes",ft=>{for(const Dt of["href","src"])if(ft.hasAttribute(Dt)){const St=ft.getAttribute(Dt);if(Dt==="href"&&St.startsWith("#"))continue;if(Ze.href=St,!Ne.includes(Ze.protocol.replace(/:$/,""))){if(Ge&&Dt==="src"&&Ze.href.startsWith("data:"))continue;ft.removeAttribute(Dt)}}}),(0,S.toDisposable)(()=>{b.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=It;const _t=[C.Schemas.http,C.Schemas.https,C.Schemas.command];e.basicMarkupHtmlTags=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);const lt=Object.freeze({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,RETURN_TRUSTED_TYPE:!0});function pt(Ne,Ge){const Ze=It(_t);try{const ft=b.sanitize(Ge,lt);Ne.innerHTML=ft}finally{Ze.dispose()}}e.safeInnerHtml=pt;function st(Ne){const Ge=new Uint16Array(Ne.length);for(let Dt=0;Dt<Ge.length;Dt++)Ge[Dt]=Ne.charCodeAt(Dt);let Ze="";const ft=new Uint8Array(Ge.buffer);for(let Dt=0;Dt<ft.length;Dt++)Ze+=String.fromCharCode(ft[Dt]);return Ze}function qe(Ne){return btoa(st(Ne))}e.multibyteAwareBtoa=qe;class Et extends I.Emitter{constructor(){super(),this._subscriptions=new S.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(s(window,"keydown",Ge=>{if(Ge.defaultPrevented)return;const Ze=new R.StandardKeyboardEvent(Ge);if(!(Ze.keyCode===6&&Ge.repeat)){if(Ge.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(Ge.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(Ge.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(Ge.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(Ze.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=Ge.altKey,this._keyStatus.ctrlKey=Ge.ctrlKey,this._keyStatus.metaKey=Ge.metaKey,this._keyStatus.shiftKey=Ge.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=Ge,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(s(window,"keyup",Ge=>{Ge.defaultPrevented||(!Ge.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!Ge.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!Ge.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!Ge.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=Ge.altKey,this._keyStatus.ctrlKey=Ge.ctrlKey,this._keyStatus.metaKey=Ge.metaKey,this._keyStatus.shiftKey=Ge.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=Ge,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(s(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(s(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(s(document.body,"mousemove",Ge=>{Ge.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(s(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 Et.instance||(Et.instance=new Et),Et.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=Et;function Tt(Ne){const Ge=document.cookie.match("(^|[^;]+)\\s*"+Ne+"\\s*=\\s*([^;]+)");return Ge?Ge.pop():void 0}e.getCookieValue=Tt;class xt extends S.Disposable{constructor(Ge,Ze){super(),this.element=Ge,this.callbacks=Ze,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(s(this.element,e.EventType.DRAG_ENTER,Ge=>{this.counter++,this.dragStartTime=Ge.timeStamp,this.callbacks.onDragEnter(Ge)})),this._register(s(this.element,e.EventType.DRAG_OVER,Ge=>{Ge.preventDefault(),this.callbacks.onDragOver?.(Ge,Ge.timeStamp-this.dragStartTime)})),this._register(s(this.element,e.EventType.DRAG_LEAVE,Ge=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(Ge))})),this._register(s(this.element,e.EventType.DRAG_END,Ge=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(Ge)})),this._register(s(this.element,e.EventType.DROP,Ge=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(Ge)}))}}e.DragAndDropObserver=xt;const At=/(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;function Nt(Ne,...Ge){let Ze,ft;Array.isArray(Ge[0])?(Ze={},ft=Ge[0]):(Ze=Ge[0]||{},ft=Ge[1]);const Dt=At.exec(Ne);if(!Dt||!Dt.groups)throw new Error("Bad use of h");const St=Dt.groups.tag||"div",Ye=document.createElement(St);Dt.groups.id&&(Ye.id=Dt.groups.id),Dt.groups.class&&(Ye.className=Dt.groups.class.replace(/\./g," ").trim());const it={};if(Dt.groups.name&&(it[Dt.groups.name]=Ye),ft)for(const ct of ft)ct instanceof HTMLElement?Ye.appendChild(ct):typeof ct=="string"?Ye.append(ct):(Object.assign(it,ct),Ye.appendChild(ct.root));for(const[ct,gt]of Object.entries(Ze))if(ct==="style")for(const[$e,Qe]of Object.entries(gt))Ye.style.setProperty(kt($e),typeof Qe=="number"?Qe+"px":""+Qe);else ct==="tabIndex"?Ye.tabIndex=gt:Ye.setAttribute(kt(ct),gt.toString());return it.root=Ye,it}e.h=Nt;function kt(Ne){return Ne.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(ae[181],le([1,0,10,2,160]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyDragImage=e.DataTransfers=e.DelayedDragHandler=void 0;class A extends p.Disposable{constructor(I,b){super(),this._register((0,t.addDisposableListener)(I,"dragover",S=>{S.preventDefault(),this.timeout||(this.timeout=setTimeout(()=>{b(),this.timeout=null},800))})),["dragleave","drop","dragend"].forEach(S=>{this._register((0,t.addDisposableListener)(I,S,()=>{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:R.Mimes.text};function k(E,I,b){const S=document.createElement("div");S.className=b,S.textContent=I,E.dataTransfer&&(document.body.appendChild(S),E.dataTransfer.setDragImage(S,-10,-10),setTimeout(()=>document.body.removeChild(S),0))}e.applyDragImage=k}),define(ae[367],le([1,0,10]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function p(r,u={}){const i=A(u);return i.textContent=r,i}e.renderText=p;function R(r,u={}){const i=A(u);return I(i,b(r,!!u.renderCodeSegments),u.actionHandler,u.renderCodeSegments),i}e.renderFormattedText=R;function A(r){const u=r.inline?"span":"div",i=document.createElement(u);return r.className&&(i.className=r.className),i}e.createElement=A;class k{constructor(u){this.source=u,this.index=0}eos(){return this.index>=this.source.length}next(){const u=this.peek();return this.advance(),u}peek(){return this.source[this.index]}advance(){this.index++}}var E;(function(r){r[r.Invalid=0]="Invalid",r[r.Root=1]="Root",r[r.Text=2]="Text",r[r.Bold=3]="Bold",r[r.Italics=4]="Italics",r[r.Action=5]="Action",r[r.ActionClose=6]="ActionClose",r[r.Code=7]="Code",r[r.NewLine=8]="NewLine"})(E||(E={}));function I(r,u,i,f){let c;if(u.type===2)c=document.createTextNode(u.content||"");else if(u.type===3)c=document.createElement("b");else if(u.type===4)c=document.createElement("i");else if(u.type===7&&f)c=document.createElement("code");else if(u.type===5&&i){const l=document.createElement("a");i.disposables.add(t.addStandardDisposableListener(l,"click",s=>{i.callback(String(u.index),s)})),c=l}else u.type===8?c=document.createElement("br"):u.type===1&&(c=r);c&&r!==c&&r.appendChild(c),c&&Array.isArray(u.children)&&u.children.forEach(l=>{I(c,l,i,f)})}function b(r,u){const i={type:1,children:[]};let f=0,c=i;const l=[],s=new k(r);for(;!s.eos();){let d=s.next();const n=d==="\\"&&C(s.peek(),u)!==0;if(n&&(d=s.next()),!n&&S(d,u)&&d===s.peek()){s.advance(),c.type===2&&(c=l.pop());const a=C(d,u);if(c.type===a||c.type===5&&a===6)c=l.pop();else{const o={type:a,children:[]};a===5&&(o.index=f,f++),c.children.push(o),l.push(c),c=o}}else if(d===` `)c.type===2&&(c=l.pop()),c.children.push({type:8});else if(c.type!==2){const a={type:2,content:d};c.children.push(a),l.push(c),c=a}else c.content+=d}return c.type===2&&(c=l.pop()),l.length,i}function S(r,u){return C(r,u)!==0}function C(r,u){switch(r){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return u?7:0;default:return 0}}}),define(ae[415],le([1,0,10,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class R{constructor(){this._hooks=new p.DisposableStore,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(k,E){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const I=this._onStopCallback;this._onStopCallback=null,k&&I&&I(E)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(k,E,I,b,S){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=b,this._onStopCallback=S;let C=k;try{k.setPointerCapture(E),this._hooks.add((0,p.toDisposable)(()=>{try{k.releasePointerCapture(E)}catch{}}))}catch{C=window}this._hooks.add(t.addDisposableListener(C,t.EventType.POINTER_MOVE,r=>{if(r.buttons!==I){this.stopMonitoring(!0);return}r.preventDefault(),this._pointerMoveCallback(r)})),this._hooks.add(t.addDisposableListener(C,t.EventType.POINTER_UP,r=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=R}),define(ae[133],le([1,0,10,16,112,2,158]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var E;(function(b){b.Tap="-monaco-gesturetap",b.Change="-monaco-gesturechange",b.Start="-monaco-gesturestart",b.End="-monaco-gesturesend",b.Contextmenu="-monaco-gesturecontextmenu"})(E=e.EventType||(e.EventType={}));class I extends A.Disposable{constructor(){super(),this.dispatched=!1,this.targets=new k.LinkedList,this.ignoreTargets=new k.LinkedList,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(t.addDisposableListener(document,"touchstart",S=>this.onTouchStart(S),{passive:!1})),this._register(t.addDisposableListener(document,"touchend",S=>this.onTouchEnd(S))),this._register(t.addDisposableListener(document,"touchmove",S=>this.onTouchMove(S),{passive:!1}))}static addTarget(S){if(!I.isTouchDevice())return A.Disposable.None;I.INSTANCE||(I.INSTANCE=new I);const C=I.INSTANCE.targets.push(S);return(0,A.toDisposable)(C)}static ignoreTarget(S){if(!I.isTouchDevice())return A.Disposable.None;I.INSTANCE||(I.INSTANCE=new I);const C=I.INSTANCE.ignoreTargets.push(S);return(0,A.toDisposable)(C)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(S){const C=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let r=0,u=S.targetTouches.length;r<u;r++){const i=S.targetTouches.item(r);this.activeTouches[i.identifier]={id:i.identifier,initialTarget:i.target,initialTimeStamp:C,initialPageX:i.pageX,initialPageY:i.pageY,rollingTimestamps:[C],rollingPageX:[i.pageX],rollingPageY:[i.pageY]};const f=this.newGestureEvent(E.Start,i.target);f.pageX=i.pageX,f.pageY=i.pageY,this.dispatchEvent(f)}this.dispatched&&(S.preventDefault(),S.stopPropagation(),this.dispatched=!1)}onTouchEnd(S){const C=Date.now(),r=Object.keys(this.activeTouches).length;for(let u=0,i=S.changedTouches.length;u<i;u++){const f=S.changedTouches.item(u);if(!this.activeTouches.hasOwnProperty(String(f.identifier))){console.warn("move of an UNKNOWN touch",f);continue}const c=this.activeTouches[f.identifier],l=Date.now()-c.initialTimeStamp;if(l<I.HOLD_DELAY&&Math.abs(c.initialPageX-p.tail(c.rollingPageX))<30&&Math.abs(c.initialPageY-p.tail(c.rollingPageY))<30){const s=this.newGestureEvent(E.Tap,c.initialTarget);s.pageX=p.tail(c.rollingPageX),s.pageY=p.tail(c.rollingPageY),this.dispatchEvent(s)}else if(l>=I.HOLD_DELAY&&Math.abs(c.initialPageX-p.tail(c.rollingPageX))<30&&Math.abs(c.initialPageY-p.tail(c.rollingPageY))<30){const s=this.newGestureEvent(E.Contextmenu,c.initialTarget);s.pageX=p.tail(c.rollingPageX),s.pageY=p.tail(c.rollingPageY),this.dispatchEvent(s)}else if(r===1){const s=p.tail(c.rollingPageX),d=p.tail(c.rollingPageY),n=p.tail(c.rollingTimestamps)-c.rollingTimestamps[0],a=s-c.rollingPageX[0],o=d-c.rollingPageY[0],g=[...this.targets].filter(h=>c.initialTarget instanceof Node&&h.contains(c.initialTarget));this.inertia(g,C,Math.abs(a)/n,a>0?1:-1,s,Math.abs(o)/n,o>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(E.End,c.initialTarget)),delete this.activeTouches[f.identifier]}this.dispatched&&(S.preventDefault(),S.stopPropagation(),this.dispatched=!1)}newGestureEvent(S,C){const r=document.createEvent("CustomEvent");return r.initEvent(S,!1,!0),r.initialTarget=C,r.tapCount=0,r}dispatchEvent(S){if(S.type===E.Tap){const C=new Date().getTime();let r=0;C-this._lastSetTapCountTime>I.CLEAR_TAP_COUNT_TIME?r=1:r=2,this._lastSetTapCountTime=C,S.tapCount=r}else(S.type===E.Change||S.type===E.Contextmenu)&&(this._lastSetTapCountTime=0);if(S.initialTarget instanceof Node){for(const C of this.ignoreTargets)if(C.contains(S.initialTarget))return;for(const C of this.targets)C.contains(S.initialTarget)&&(C.dispatchEvent(S),this.dispatched=!0)}}inertia(S,C,r,u,i,f,c,l){this.handle=t.scheduleAtNextAnimationFrame(()=>{const s=Date.now(),d=s-C;let n=0,a=0,o=!0;r+=I.SCROLL_FRICTION*d,f+=I.SCROLL_FRICTION*d,r>0&&(o=!1,n=u*r*d),f>0&&(o=!1,a=c*f*d);const g=this.newGestureEvent(E.Change);g.translationX=n,g.translationY=a,S.forEach(h=>h.dispatchEvent(g)),o||this.inertia(S,s,r,u,i+n,f,c,l+a)})}onTouchMove(S){const C=Date.now();for(let r=0,u=S.changedTouches.length;r<u;r++){const i=S.changedTouches.item(r);if(!this.activeTouches.hasOwnProperty(String(i.identifier))){console.warn("end of an UNKNOWN touch",i);continue}const f=this.activeTouches[i.identifier],c=this.newGestureEvent(E.Change,f.initialTarget);c.translationX=i.pageX-p.tail(f.rollingPageX),c.translationY=i.pageY-p.tail(f.rollingPageY),c.pageX=i.pageX,c.pageY=i.pageY,this.dispatchEvent(c),f.rollingPageX.length>3&&(f.rollingPageX.shift(),f.rollingPageY.shift(),f.rollingTimestamps.shift()),f.rollingPageX.push(i.pageX),f.rollingPageY.push(i.pageY),f.rollingTimestamps.push(C)}this.dispatched&&(S.preventDefault(),S.stopPropagation(),this.dispatched=!1)}}I.SCROLL_FRICTION=-.005,I.HOLD_DELAY=700,I.CLEAR_TAP_COUNT_TIME=400,we([R.memoize],I,"isTouchDevice",null),e.Gesture=I}),define(ae[110],le([1,0,10,14,1031]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const R=2e4;let A,k,E,I,b;function S(i){A=document.createElement("div"),A.className="monaco-aria-container";const f=()=>{const l=document.createElement("div");return l.className="monaco-alert",l.setAttribute("role","alert"),l.setAttribute("aria-atomic","true"),A.appendChild(l),l};k=f(),E=f();const c=()=>{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=c(),b=c(),i.appendChild(A)}e.setARIAContainer=S;function C(i){!A||(k.textContent!==i?(t.clearNode(E),u(k,i)):(t.clearNode(k),u(E,i)))}e.alert=C;function r(i){!A||(p.isMacintosh?C(i):I.textContent!==i?(t.clearNode(b),u(I,i)):(t.clearNode(I),u(b,i)))}e.status=r;function u(i,f){t.clearNode(i),f.length>R&&(f=f.substr(0,R)),i.textContent=f,i.style.visibility="hidden",i.style.visibility="visible"}}),define(ae[749],le([1,0,237,10,2,14,478,1036]),function(J,e,t,p,R,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 E;(function(c){c[c.ABSOLUTE=1]="ABSOLUTE",c[c.FIXED=2]="FIXED",c[c.FIXED_SHADOW=3]="FIXED_SHADOW"})(E=e.ContextViewDOMPosition||(e.ContextViewDOMPosition={}));var I;(function(c){c[c.LEFT=0]="LEFT",c[c.RIGHT=1]="RIGHT"})(I=e.AnchorAlignment||(e.AnchorAlignment={}));var b;(function(c){c[c.BELOW=0]="BELOW",c[c.ABOVE=1]="ABOVE"})(b=e.AnchorPosition||(e.AnchorPosition={}));var S;(function(c){c[c.VERTICAL=0]="VERTICAL",c[c.HORIZONTAL=1]="HORIZONTAL"})(S=e.AnchorAxisAlignment||(e.AnchorAxisAlignment={}));var C;(function(c){c[c.Before=0]="Before",c[c.After=1]="After"})(C=e.LayoutAnchorPosition||(e.LayoutAnchorPosition={}));var r;(function(c){c[c.AVOID=0]="AVOID",c[c.ALIGN=1]="ALIGN"})(r=e.LayoutAnchorMode||(e.LayoutAnchorMode={}));function u(c,l,s){const d=s.mode===r.ALIGN?s.offset:s.offset+s.size,n=s.mode===r.ALIGN?s.offset+s.size:s.offset;return s.position===0?l<=c-d?d:l<=n?n-l:Math.max(c-l,0):l<=n?n-l:l<=c-d?d:0}e.layout=u;class i extends R.Disposable{constructor(l,s){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=R.Disposable.None,this.toDisposeOnSetContainer=R.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=p.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,p.hide(this.view),this.setContainer(l,s),this._register((0,R.toDisposable)(()=>this.setContainer(null,1)))}setContainer(l,s){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=s!==1,this.useShadowDOM=s===3,this.useShadowDOM){this.shadowRootHostElement=p.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const n=document.createElement("style");n.textContent=f,this.shadowRoot.appendChild(n),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(p.$("slot"))}else this.container.appendChild(this.view);const d=new R.DisposableStore;i.BUBBLE_UP_EVENTS.forEach(n=>{d.add(p.addStandardDisposableListener(this.container,n,a=>{this.onDOMEvent(a,!1)}))}),i.BUBBLE_DOWN_EVENTS.forEach(n=>{d.add(p.addStandardDisposableListener(this.container,n,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=d}}show(l){this.isVisible()&&this.hide(),p.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",p.show(this.view),this.toDisposeOnClean=l.render(this.view)||R.Disposable.None,this.delegate=l,this.doLayout(),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;const l=this.delegate.getAnchor();let s;if(p.isHTMLElement(l)){const w=p.getDomNodePagePosition(l),D=p.getDomNodeZoomLevel(l);s={top:w.top*D,left:w.left*D,width:w.width*D,height:w.height*D}}else s={top:l.y,left:l.x,width:l.width||1,height:l.height||2};const d=p.getTotalWidth(this.view),n=p.getTotalHeight(this.view),a=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,g=this.delegate.anchorAxisAlignment||0;let h,v;if(g===0){const w={offset:s.top-window.pageYOffset,size:s.height,position:a===0?0:1},D={offset:s.left,size:s.width,position:o===0?0:1,mode:r.ALIGN};h=u(window.innerHeight,n,w)+window.pageYOffset,k.Range.intersects({start:h,end:h+n},{start:w.offset,end:w.offset+w.size})&&(D.mode=r.AVOID),v=u(window.innerWidth,d,D)}else{const w={offset:s.left,size:s.width,position:o===0?0:1},D={offset:s.top,size:s.height,position:a===0?0:1,mode:r.ALIGN};v=u(window.innerWidth,d,w),k.Range.intersects({start:v,end:v+d},{start:w.offset,end:w.offset+w.size})&&(D.mode=r.AVOID),h=u(window.innerHeight,n,D)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(a===0?"bottom":"top"),this.view.classList.add(o===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const m=p.getDomNodePagePosition(this.container);this.view.style.top=`${h-(this.useFixedPosition?p.getDomNodePagePosition(this.view).top:m.top)}px`,this.view.style.left=`${v-(this.useFixedPosition?p.getDomNodePagePosition(this.view).left:m.left)}px`,this.view.style.width="initial"}hide(l){const s=this.delegate;this.delegate=null,s?.onHide&&s.onHide(l),this.toDisposeOnClean.dispose(),p.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(l,s){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(l,document.activeElement):s&&!p.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"];const f=` :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(ae[277],le([1,0,10,65,52,28,1037]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;const k={badgeBackground:p.Color.fromHex("#4D4D4D"),badgeForeground:p.Color.fromHex("#FFFFFF")};class E{constructor(b,S){this.count=0,this.options=S||Object.create(null),(0,R.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)(b,(0,t.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(b){this.count=b,this.render()}setCountFormat(b){this.countFormat=b,this.render()}setTitleFormat(b){this.titleFormat=b,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(b){this.badgeBackground=b.badgeBackground,this.badgeForeground=b.badgeForeground,this.badgeBorder=b.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const b=this.badgeBackground?this.badgeBackground.toString():"",S=this.badgeForeground?this.badgeForeground.toString():"",C=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=b,this.element.style.color=S,this.element.style.borderWidth=C?"1px":"",this.element.style.borderStyle=C?"solid":"",this.element.style.borderColor=C}}}e.CountBadge=E}),define(ae[1257],le([1,0,10,90,133,36,6,713]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=e.Dropdown=e.BaseDropdown=void 0;class E extends A.ActionRunner{constructor(C,r){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 u=r.labelRenderer;u||(u=f=>(f.textContent=r.label||"",null));for(const f of[t.EventType.CLICK,t.EventType.MOUSE_DOWN,R.EventType.Tap])this._register((0,t.addDisposableListener)(this.element,f,c=>t.EventHelper.stop(c,!0)));for(const f of[t.EventType.MOUSE_DOWN,R.EventType.Tap])this._register((0,t.addDisposableListener)(this._label,f,c=>{c instanceof MouseEvent&&(c.detail>1||c.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,t.addDisposableListener)(this._label,t.EventType.KEY_UP,f=>{const c=new p.StandardKeyboardEvent(f);(c.equals(3)||c.equals(10))&&(t.EventHelper.stop(f,!0),this.visible?this.hide():this.show())}));const i=u(this._label);i&&this._register(i),this._register(R.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,r){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=E;class I extends E{constructor(C,r){super(C,r),this.contextViewProvider=r.contextViewProvider}show(){super.show(),this.element.classList.add("active"),this.contextViewProvider.showContextView({getAnchor:()=>this.getAnchor(),render:C=>this.renderContents(C),onDOMEvent:(C,r)=>{this.onEvent(C,r)},onHide:()=>this.onHide()})}getAnchor(){return this.element}onHide(){this.element.classList.remove("active")}hide(){super.hide(),this.contextViewProvider?.hideContextView()}renderContents(C){return null}}e.Dropdown=I;class b extends E{constructor(C,r){super(C,r),this._actions=[],this._contextMenuProvider=r.contextMenuProvider,this.actions=r.actions||[],this.actionProvider=r.actionProvider,this.menuClassName=r.menuClassName||"",this.menuAsChild=!!r.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=b}),define(ae[143],le([1,0,10,29]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const R=new RegExp(`(\\\\)?\\$\\((${p.CSSIcon.iconNameExpression}(?:${p.CSSIcon.iconModifierExpression})?)\\)`,"g");function A(E){const I=new Array;let b,S=0,C=0;for(;(b=R.exec(E))!==null;){C=b.index||0,S<C&&I.push(E.substring(S,C)),S=(b.index||0)+b[0].length;const[,r,u]=b;I.push(r?`$(${u})`:k({id:u}))}return S<E.length&&I.push(E.substring(S)),I}e.renderLabelWithIcons=A;function k(E){const I=t.$("span");return I.classList.add(...p.CSSIcon.asClassNameArray(E)),I}e.renderIcon=k}),define(ae[182],le([1,0,10,90,133,143,36,29,65,6,2,52,1234,1033]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ButtonBar=e.ButtonWithDescription=e.ButtonWithDropdown=e.Button=void 0;const u={buttonBackground:I.Color.fromHex("#0E639C"),buttonHoverBackground:I.Color.fromHex("#006BB3"),buttonSeparator:I.Color.white,buttonForeground:I.Color.white};class i extends S.Disposable{get onDidClick(){return this._onDidClick.event}constructor(d,n){super(),this._onDidClick=this._register(new b.Emitter),this.options=n||Object.create(null),(0,C.mixin)(this.options,u,!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"),d.appendChild(this._element),this._register(R.Gesture.addTarget(this._element)),[t.EventType.CLICK,R.EventType.Tap].forEach(a=>{this._register((0,t.addDisposableListener)(this._element,a,o=>{if(!this.enabled){t.EventHelper.stop(o);return}this._onDidClick.fire(o)}))}),this._register((0,t.addDisposableListener)(this._element,t.EventType.KEY_DOWN,a=>{const o=new p.StandardKeyboardEvent(a);let g=!1;this.enabled&&(o.equals(3)||o.equals(10))?(this._onDidClick.fire(a),g=!0):o.equals(9)&&(this._element.blur(),g=!0),g&&t.EventHelper.stop(o,!0)})),this._register((0,t.addDisposableListener)(this._element,t.EventType.MOUSE_OVER,a=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register((0,t.addDisposableListener)(this._element,t.EventType.MOUSE_OUT,a=>{this.applyStyles()})),this.focusTracker=this._register((0,t.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.setHoverBackground()})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.applyStyles()})),this.applyStyles()}setHoverBackground(){let d;this.options.secondary?d=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:d=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,d&&(this._element.style.backgroundColor=d)}style(d){this.buttonForeground=d.buttonForeground,this.buttonBackground=d.buttonBackground,this.buttonHoverBackground=d.buttonHoverBackground,this.buttonSecondaryForeground=d.buttonSecondaryForeground,this.buttonSecondaryBackground=d.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=d.buttonSecondaryHoverBackground,this.buttonBorder=d.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let d,n;this.options.secondary?(n=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",d=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(n=this.buttonForeground?this.buttonForeground.toString():"",d=this.buttonBackground?this.buttonBackground.toString():"");const a=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=n,this._element.style.backgroundColor=d,this._element.style.borderWidth=a?"1px":"",this._element.style.borderStyle=a?"solid":"",this._element.style.borderColor=a}}get element(){return this._element}set label(d){if(this._element.classList.add("monaco-text-button"),this.options.supportIcons){const n=[];for(let a of(0,A.renderLabelWithIcons)(d))if(typeof a=="string"){if(a=a.trim(),a==="")continue;const o=document.createElement("span");o.textContent=a,n.push(o)}else n.push(a);(0,t.reset)(this._element,...n)}else this._element.textContent=d;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=d)}set icon(d){this._element.classList.add(...E.CSSIcon.asClassNameArray(d))}set enabled(d){d?(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=i;class f extends S.Disposable{constructor(d,n){super(),this._onDidClick=this._register(new b.Emitter),this.onDidClick=this._onDidClick.event,this.element=document.createElement("div"),this.element.classList.add("monaco-button-dropdown"),d.appendChild(this.element),this.button=this._register(new i(this.element,n)),this._register(this.button.onDidClick(a=>this._onDidClick.fire(a))),this.action=this._register(new k.Action("primaryAction",this.button.label,void 0,!0,async()=>this._onDidClick.fire(void 0))),this.separatorContainer=document.createElement("div"),this.separatorContainer.classList.add("monaco-button-dropdown-separator"),this.separator=document.createElement("div"),this.separatorContainer.appendChild(this.separator),this.element.appendChild(this.separatorContainer),this.dropdownButton=this._register(new i(this.element,{...n,title:!1,supportIcons:!0})),this.dropdownButton.element.title=(0,r.localize)(0,null),this.dropdownButton.element.setAttribute("aria-haspopup","true"),this.dropdownButton.element.setAttribute("aria-expanded","false"),this.dropdownButton.element.classList.add("monaco-dropdown-button"),this.dropdownButton.icon=E.Codicon.dropDownButton,this._register(this.dropdownButton.onDidClick(a=>{n.contextMenuProvider.showContextMenu({getAnchor:()=>this.dropdownButton.element,getActions:()=>n.addPrimaryActionToDropdown===!1?[...n.actions]:[this.action,...n.actions],actionRunner:n.actionRunner,onHide:()=>this.dropdownButton.element.setAttribute("aria-expanded","false")}),this.dropdownButton.element.setAttribute("aria-expanded","true")}))}set label(d){this.button.label=d,this.action.label=d}set icon(d){this.button.icon=d}set enabled(d){this.button.enabled=d,this.dropdownButton.enabled=d,this.element.classList.toggle("disabled",!d)}get enabled(){return this.button.enabled}style(d){this.button.style(d),this.dropdownButton.style(d);const n=d.buttonBorder?d.buttonBorder.toString():"";this.separatorContainer.style.borderTopWidth=n?"1px":"",this.separatorContainer.style.borderTopStyle=n?"solid":"",this.separatorContainer.style.borderTopColor=n,this.separatorContainer.style.borderBottomWidth=n?"1px":"",this.separatorContainer.style.borderBottomStyle=n?"solid":"",this.separatorContainer.style.borderBottomColor=n,this.separatorContainer.style.backgroundColor=d.buttonBackground?.toString()??"",this.separator.style.backgroundColor=d.buttonSeparator?.toString()??""}focus(){this.button.focus()}hasFocus(){return this.button.hasFocus()||this.dropdownButton.hasFocus()}}e.ButtonWithDropdown=f;class c extends i{constructor(d,n){super(d,n),this._element.classList.add("monaco-description-button"),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._descriptionElement=document.createElement("div"),this._descriptionElement.classList.add("monaco-button-description"),this._element.appendChild(this._descriptionElement)}set label(d){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,t.reset)(this._labelElement,...(0,A.renderLabelWithIcons)(d)):this._labelElement.textContent=d,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=d)}set description(d){this.options.supportIcons?(0,t.reset)(this._descriptionElement,...(0,A.renderLabelWithIcons)(d)):this._descriptionElement.textContent=d}}e.ButtonWithDescription=c;class l extends S.Disposable{constructor(d){super(),this.container=d,this._buttons=[]}get buttons(){return this._buttons}addButton(d){const n=this._register(new i(this.container,d));return this.pushButton(n),n}addButtonWithDescription(d){const n=this._register(new c(this.container,d));return this.pushButton(n),n}addButtonWithDropdown(d){const n=this._register(new f(this.container,d));return this.pushButton(n),n}pushButton(d){this._buttons.push(d);const n=this._buttons.length-1;this._register((0,t.addDisposableListener)(d.element,t.EventType.KEY_DOWN,a=>{const o=new p.StandardKeyboardEvent(a);let g=!0,h;o.equals(15)?h=n>0?n-1:this._buttons.length-1:o.equals(17)?h=n===this._buttons.length-1?0:n+1:g=!1,g&&typeof h=="number"&&(this._buttons[h].focus(),t.EventHelper.stop(a,!0))}))}}e.ButtonBar=l}),define(ae[250],le([1,0,10,143,52]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HighlightedLabel=void 0;class A{constructor(E,I){this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=I?.supportIcons??!1,this.domNode=t.append(E,t.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(E,I=[],b="",S){E||(E=""),S&&(E=A.escapeNewLines(E,I)),!(this.didEverRender&&this.text===E&&this.title===b&&R.equals(this.highlights,I))&&(this.text=E,this.title=b,this.highlights=I,this.render())}render(){const E=[];let I=0;for(const b of this.highlights){if(b.end===b.start)continue;if(I<b.start){const r=this.text.substring(I,b.start);E.push(t.$("span",void 0,...this.supportIcons?(0,p.renderLabelWithIcons)(r):[r])),I=b.start}const S=this.text.substring(I,b.end),C=t.$("span.highlight",void 0,...this.supportIcons?(0,p.renderLabelWithIcons)(S):[S]);b.extraClasses&&C.classList.add(...b.extraClasses),E.push(C),I=b.end}if(I<this.text.length){const b=this.text.substring(I);E.push(t.$("span",void 0,...this.supportIcons?(0,p.renderLabelWithIcons)(b):[b]))}t.reset(this.domNode,...E),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(E,I){let b=0,S=0;return E.replace(/\r\n|\r|\n/g,(C,r)=>{S=C===`\r `?-1:0,r+=b;for(const u of I)u.end<=r||(u.start>=r&&(u.start+=S),u.end>=r&&(u.end+=S));return b+=S,"\u23CE"})}}e.HighlightedLabel=A}),define(ae[416],le([1,0,10,143]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleIconLabel=void 0;class R{constructor(k){this._container=k}set text(k){(0,t.reset)(this._container,...(0,p.renderLabelWithIcons)(k??""))}set title(k){this._container.title=k}}e.SimpleIconLabel=R}),define(ae[368],le([1,0,10,327,52,1242,1042]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=void 0;const k=t.$;class E{constructor(b,S,C){this.os=S,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(b,k(".monaco-keybinding")),this.didEverRender=!1,b.appendChild(this.domNode)}get element(){return this.domNode}set(b,S){this.didEverRender&&this.keybinding===b&&E.areSame(this.matches,S)||(this.keybinding=b,this.matches=S,this.render())}render(){if(this.clear(),this.keybinding){const[b,S]=this.keybinding.getParts();b&&this.renderPart(this.domNode,b,this.matches?this.matches.firstPart:null),S&&(t.append(this.domNode,k("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,S,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(b,S,C){const r=p.UILabelProvider.modifierLabels[this.os];S.ctrlKey&&this.renderKey(b,r.ctrlKey,Boolean(C?.ctrlKey),r.separator),S.shiftKey&&this.renderKey(b,r.shiftKey,Boolean(C?.shiftKey),r.separator),S.altKey&&this.renderKey(b,r.altKey,Boolean(C?.altKey),r.separator),S.metaKey&&this.renderKey(b,r.metaKey,Boolean(C?.metaKey),r.separator);const u=S.keyLabel;u&&this.renderKey(b,u,Boolean(C?.keyCode),"")}renderKey(b,S,C,r){t.append(b,this.createKeyElement(S,C?".highlight":"")),r&&t.append(b,k("span.monaco-keybinding-key-separator",void 0,r))}renderUnbound(b){t.append(b,this.createKeyElement((0,A.localize)(0,null)))}createKeyElement(b,S=""){const C=k("span.monaco-keybinding-key"+S,void 0,b);return this.keyElements.add(C),C}style(b){this.labelBackground=b.keybindingLabelBackground,this.labelForeground=b.keybindingLabelForeground,this.labelBorder=b.keybindingLabelBorder,this.labelBottomBorder=b.keybindingLabelBottomBorder,this.labelShadow=b.keybindingLabelShadow,this.applyStyles()}applyStyles(){if(this.element){for(const b of this.keyElements)this.labelBackground&&(b.style.backgroundColor=this.labelBackground?.toString()),this.labelBorder&&(b.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(b.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(b.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(b,S){return b===S||!b&&!S?!0:!!b&&!!S&&(0,R.equals)(b.firstPart,S.firstPart)&&(0,R.equals)(b.chordPart,S.chordPart)}}e.KeybindingLabel=E}),define(ae[1258],le([1,0,10]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RowCache=void 0;function p(A){try{A.parentElement?.removeChild(A)}catch{}}class R{constructor(k){this.renderers=k,this.cache=new Map}alloc(k){let E=this.getTemplateCache(k).pop();if(!E){const I=(0,t.$)(".monaco-list-row"),S=this.getRenderer(k).renderTemplate(I);E={domNode:I,templateId:k,templateData:S}}return E}release(k){!k||this.releaseRow(k)}releaseRow(k){const{domNode:E,templateId:I}=k;E&&(E.classList.remove("scrolling"),p(E)),this.getTemplateCache(I).push(k)}getTemplateCache(k){let E=this.cache.get(k);return E||(E=[],this.cache.set(k,E)),E}dispose(){this.cache.forEach((k,E)=>{for(const I of k)this.getRenderer(E).disposeTemplate(I.templateData),I.templateData=null}),this.cache.clear()}getRenderer(k){const E=this.renderers.get(k);if(!E)throw new Error(`No renderer found for ${k}`);return E}}e.RowCache=R}),define(ae[303],le([1,0,10,11,65,2,52,13,1045]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const I="done",b="active",S="infinite",C="infinite-long-running",r="discrete",u={progressBarBackground:R.Color.fromHex("#0E70C0")};class i extends A.Disposable{constructor(c,l){super(),this.options=l||Object.create(null),(0,k.mixin)(this.options,u,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this.showDelayedScheduler=this._register(new p.RunOnceScheduler(()=>(0,t.show)(this.element),0)),this.longRunningScheduler=this._register(new p.RunOnceScheduler(()=>this.infiniteLongRunning(),i.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(c)}create(c){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),c.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(b,S,C,r),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}done(){return this.doDone(!0)}stop(){return this.doDone(!1)}doDone(c){return this.element.classList.add(I),this.element.classList.contains(S)?(this.bit.style.opacity="0",c?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",c?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(r,I,C),this.element.classList.add(b,S),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(C)}total(c){return this.workedVal=0,this.totalWork=c,this.element.setAttribute("aria-valuemax",c.toString()),this}hasTotal(){return(0,E.isNumber)(this.totalWork)}worked(c){return c=Math.max(1,Number(c)),this.doSetWorked(this.workedVal+c)}setWorked(c){return c=Math.max(1,Number(c)),this.doSetWorked(c)}doSetWorked(c){const l=this.totalWork||100;return this.workedVal=c,this.workedVal=Math.min(l,this.workedVal),this.element.classList.remove(S,C,I),this.element.classList.add(b,r),this.element.setAttribute("aria-valuenow",c.toString()),this.bit.style.width=100*(this.workedVal/l)+"%",this}getContainer(){return this.element}show(c){this.showDelayedScheduler.cancel(),typeof c=="number"?this.showDelayedScheduler.schedule(c):(0,t.show)(this.element)}hide(){(0,t.hide)(this.element),this.showDelayedScheduler.cancel()}style(c){this.progressBarBackground=c.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const c=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=c}}}e.ProgressBar=i,i.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(ae[278],le([1,0,10,195,133,11,112,6,2,14,1046]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.setGlobalHoverDelay=e.setGlobalSashSize=e.SashState=e.Orientation=e.OrthogonalEdge=void 0;const S=!1;var C;(function(v){v.North="north",v.South="south",v.East="east",v.West="west"})(C=e.OrthogonalEdge||(e.OrthogonalEdge={}));var r;(function(v){v[v.VERTICAL=0]="VERTICAL",v[v.HORIZONTAL=1]="HORIZONTAL"})(r=e.Orientation||(e.Orientation={}));var u;(function(v){v[v.Disabled=0]="Disabled",v[v.AtMinimum=1]="AtMinimum",v[v.AtMaximum=2]="AtMaximum",v[v.Enabled=3]="Enabled"})(u=e.SashState||(e.SashState={}));let i=4;const f=new E.Emitter;function c(v){i=v,f.fire(v)}e.setGlobalSashSize=c;let l=300;const s=new E.Emitter;function d(v){l=v,s.fire(v)}e.setGlobalHoverDelay=d;class n{constructor(){this.disposables=new I.DisposableStore}get onPointerMove(){return this.disposables.add(new p.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new p.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}we([k.memoize],n.prototype,"onPointerMove",null),we([k.memoize],n.prototype,"onPointerUp",null);class a{get onPointerMove(){return this.disposables.add(new p.DomEmitter(this.el,R.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new p.DomEmitter(this.el,R.EventType.End)).event}constructor(m){this.el=m,this.disposables=new I.DisposableStore}dispose(){this.disposables.dispose()}}we([k.memoize],a.prototype,"onPointerMove",null),we([k.memoize],a.prototype,"onPointerUp",null);class o{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(m){this.factory=m}dispose(){}}we([k.memoize],o.prototype,"onPointerMove",null),we([k.memoize],o.prototype,"onPointerUp",null);const g="pointer-events-disabled";class h extends I.Disposable{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 w=D=>{this.orthogonalStartDragHandleDisposables.clear(),D!==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 p.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>h.onMouseEnter(m),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new p.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>h.onMouseLeave(m),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(m.onDidEnablementChange.event(w,this)),w(m.state)}this._orthogonalStartSash=m}set orthogonalEndSash(m){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),m){const w=D=>{this.orthogonalEndDragHandleDisposables.clear(),D!==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 p.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>h.onMouseEnter(m),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new p.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>h.onMouseLeave(m),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(m.onDidEnablementChange.event(w,this)),w(m.state)}this._orthogonalEndSash=m}constructor(m,w,D){super(),this.hoverDelay=l,this.hoverDelayer=this._register(new A.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new E.Emitter),this._onDidStart=this._register(new E.Emitter),this._onDidChange=this._register(new E.Emitter),this._onDidReset=this._register(new E.Emitter),this._onDidEnd=this._register(new E.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")),D.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${D.orthogonalEdge}`),b.isMacintosh&&this.el.classList.add("mac");const y=this._register(new p.DomEmitter(this.el,"mousedown")).event;this._register(y(P=>this.onPointerStart(P,new n),this));const T=this._register(new p.DomEmitter(this.el,"dblclick")).event;this._register(T(this.onPointerDoublePress,this));const _=this._register(new p.DomEmitter(this.el,"mouseenter")).event;this._register(_(()=>h.onMouseEnter(this)));const L=this._register(new p.DomEmitter(this.el,"mouseleave")).event;this._register(L(()=>h.onMouseLeave(this))),this._register(R.Gesture.addTarget(this.el));const M=this._register(new p.DomEmitter(this.el,R.EventType.Start)).event;this._register(M(P=>this.onPointerStart(P,new a(this.el)),this));const O=this._register(new p.DomEmitter(this.el,R.EventType.Tap)).event;let N;this._register(O(P=>{if(N){clearTimeout(N),N=void 0,this.onPointerDoublePress(P);return}clearTimeout(N),N=setTimeout(()=>N=void 0,250)},this)),typeof D.size=="number"?(this.size=D.size,D.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=i,this._register(f.event(P=>{this.size=P,this.layout()}))),this._register(s.event(P=>this.hoverDelay=P)),this.layoutProvider=w,this.orthogonalStartSash=D.orthogonalStartSash,this.orthogonalEndSash=D.orthogonalEndSash,this.orientation=D.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",S),this.layout()}onPointerStart(m,w){t.EventHelper.stop(m);let D=!1;if(!m.__orthogonalSashEvent){const z=this.getOrthogonalSash(m);z&&(D=!0,m.__orthogonalSashEvent=!0,z.onPointerStart(m,new o(w)))}if(this.linkedSash&&!m.__linkedSashEvent&&(m.__linkedSashEvent=!0,this.linkedSash.onPointerStart(m,new o(w))),!this.state)return;const y=document.getElementsByTagName("iframe");for(const z of y)z.classList.add(g);const T=m.pageX,_=m.pageY,L=m.altKey,M={startX:T,currentX:T,startY:_,currentY:_,altKey:L};this.el.classList.add("active"),this._onDidStart.fire(M);const O=(0,t.createStyleSheet)(this.el),N=()=>{let z="";D?z="all-scroll":this.orientation===1?this.state===1?z="s-resize":this.state===2?z="n-resize":z=b.isMacintosh?"row-resize":"ns-resize":this.state===1?z="e-resize":this.state===2?z="w-resize":z=b.isMacintosh?"col-resize":"ew-resize",O.textContent=`* { cursor: ${z} !important; }`},P=new I.DisposableStore;N(),D||this.onDidEnablementChange.event(N,null,P);const B=z=>{t.EventHelper.stop(z,!1);const x={startX:T,currentX:z.pageX,startY:_,currentY:z.pageY,altKey:L};this._onDidChange.fire(x)},V=z=>{t.EventHelper.stop(z,!1),this.el.removeChild(O),this.el.classList.remove("active"),this._onDidEnd.fire(),P.dispose();for(const x of y)x.classList.remove(g)};w.onPointerMove(B,null,P),w.onPointerUp(V,null,P),P.add(w)}onPointerDoublePress(m){const w=this.getOrthogonalSash(m);w&&w._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(m,w=!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,()=>{}),!w&&m.linkedSash&&h.onMouseEnter(m.linkedSash,!0)}static onMouseLeave(m,w=!1){m.hoverDelayer.cancel(),m.el.classList.remove("hover"),!w&&m.linkedSash&&h.onMouseLeave(m.linkedSash,!0)}clearSashHoverState(){h.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){const w=m.initialTarget??m.target;if(!(!w||!(w instanceof HTMLElement))&&w.classList.contains("orthogonal-drag-handle"))return w.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=h}),define(ae[750],le([1,0,10,278,6,2]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class k{constructor(){this._onDidWillResize=new R.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new R.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 p.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new p.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new p.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:p.OrthogonalEdge.North}),this._southSash=new p.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:p.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let I,b=0,S=0;this._sashListener.add(R.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{I===void 0&&(this._onDidWillResize.fire(),I=this._size,b=0,S=0)})),this._sashListener.add(R.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{I!==void 0&&(I=void 0,b=0,S=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(C=>{I&&(S=C.currentX-C.startX,this.layout(I.height+b,I.width+S),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(C=>{I&&(S=-(C.currentX-C.startX),this.layout(I.height+b,I.width+S),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(C=>{I&&(b=-(C.currentY-C.startY),this.layout(I.height+b,I.width+S),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(C=>{I&&(b=C.currentY-C.startY,this.layout(I.height+b,I.width+S),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(R.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(R.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,b,S,C){this._northSash.state=I?3:0,this._eastSash.state=b?3:0,this._southSash.state=S?3:0,this._westSash.state=C?3:0}layout(I=this.size.height,b=this.size.width){const{height:S,width:C}=this._minSize,{height:r,width:u}=this._maxSize;I=Math.max(S,Math.min(r,I)),b=Math.max(C,Math.min(u,b));const i=new t.Dimension(b,I);t.Dimension.equals(i,this._size)||(this.domNode.style.height=I+"px",this.domNode.style.width=b+"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(ae[1259],le([1,0,11,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class R extends p.Disposable{constructor(k,E,I){super(),this._visibility=k,this._visibleClassName=E,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?.setClassName(this._visibleClassName)},0))}_hide(k){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode?.setClassName(this._invisibleClassName+(k?" fade":"")))}}e.ScrollbarVisibilityController=R}),define(ae[1260],le([1,0,10,133,16,6,2,14]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class I extends k.Disposable{constructor(S,C,r,u){super(),this.selected=0,this.selectBoxOptions=u||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),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new A.Emitter),this.styles=r,this.registerListeners(),this.setOptions(S,C)}registerListeners(){this._register(p.Gesture.addTarget(this.selectElement)),[p.EventType.Tap].forEach(S=>{this._register(t.addDisposableListener(this.selectElement,S,C=>{this.selectElement.focus()}))}),this._register(t.addStandardDisposableListener(this.selectElement,"click",S=>{t.EventHelper.stop(S,!0)})),this._register(t.addStandardDisposableListener(this.selectElement,"change",S=>{this.selectElement.title=S.target.value,this._onDidSelect.fire({index:S.target.selectedIndex,selected:S.target.value})})),this._register(t.addStandardDisposableListener(this.selectElement,"keydown",S=>{let C=!1;E.isMacintosh?(S.keyCode===18||S.keyCode===16||S.keyCode===10)&&(C=!0):(S.keyCode===18&&S.altKey||S.keyCode===10||S.keyCode===3)&&(C=!0),C&&S.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(S,C){(!this.options||!R.equals(this.options,S))&&(this.options=S,this.selectElement.options.length=0,this.options.forEach((r,u)=>{this.selectElement.add(this.createOption(r.text,u,r.isDisabled))})),C!==void 0&&this.select(C)}select(S){this.options.length===0?this.selected=0:S>=0&&S<this.options.length?this.selected=S:S>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(S){this.selectBoxOptions.ariaLabel=S,this.selectElement.setAttribute("aria-label",S)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(S){this.selectElement.tabIndex=S?0:-1}render(S){S.classList.add("select-container"),S.appendChild(this.selectElement),this.setOptions(this.options,this.selected),this.applyStyles()}style(S){this.styles=S,this.applyStyles()}applyStyles(){if(this.selectElement){const S=this.styles.selectBackground?this.styles.selectBackground.toString():"",C=this.styles.selectForeground?this.styles.selectForeground.toString():"",r=this.styles.selectBorder?this.styles.selectBorder.toString():"";this.selectElement.style.backgroundColor=S,this.selectElement.style.color=C,this.selectElement.style.borderColor=r}}createOption(S,C,r){const u=document.createElement("option");return u.value=S,u.text=S,u.disabled=!!r,u}}e.SelectBoxNative=I}),define(ae[575],le([1,0,297,16,11,414,6,88]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function I(r){return typeof r=="object"&&"visibility"in r&&"data"in r}e.isFilterResult=I;function b(r){switch(r){case!0:return 1;case!1:return 0;default:return r}}e.getVisibleState=b;function S(r){return typeof r.collapsible=="boolean"}class C{constructor(u,i,f,c={}){this.user=u,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 R.Delayer(R.MicrotaskDelay),this.collapseByDefault=typeof c.collapseByDefault>"u"?!1:c.collapseByDefault,this.filter=c.filter,this.autoExpandSingleChildren=typeof c.autoExpandSingleChildren>"u"?!1:c.autoExpandSingleChildren,this.root={parent:void 0,element:f,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(u,i,f=E.Iterable.empty(),c={}){if(u.length===0)throw new t.TreeError(this.user,"Invalid tree location");c.diffIdentityProvider?this.spliceSmart(c.diffIdentityProvider,u,i,f,c):this.spliceSimple(u,i,f,c)}spliceSmart(u,i,f,c=E.Iterable.empty(),l,s=l.diffDepth??0){const{parentNode:d}=this.getParentNodeWithListIndex(i);if(!d.lastDiffIds)return this.spliceSimple(i,f,c,l);const n=[...c],a=i[i.length-1],o=new A.LcsDiff({getElements:()=>d.lastDiffIds},{getElements:()=>[...d.children.slice(0,a),...n,...d.children.slice(a+f)].map(w=>u.getId(w.element).toString())}).ComputeDiff(!1);if(o.quitEarly)return d.lastDiffIds=void 0,this.spliceSimple(i,f,n,l);const g=i.slice(0,-1),h=(w,D,y)=>{if(s>0)for(let T=0;T<y;T++)w--,D--,this.spliceSmart(u,[...g,w,0],Number.MAX_SAFE_INTEGER,n[D].children,l,s-1)};let v=Math.min(d.children.length,a+f),m=n.length;for(const w of o.changes.sort((D,y)=>y.originalStart-D.originalStart))h(v,m,v-(w.originalStart+w.originalLength)),v=w.originalStart,m=w.modifiedStart-a,this.spliceSimple([...g,v],w.originalLength,E.Iterable.slice(n,m,m+w.modifiedLength),l);h(v,m,v)}spliceSimple(u,i,f=E.Iterable.empty(),{onDidCreateNode:c,onDidDeleteNode:l,diffIdentityProvider:s}){const{parentNode:d,listIndex:n,revealed:a,visible:o}=this.getParentNodeWithListIndex(u),g=[],h=E.Iterable.map(f,N=>this.createTreeNode(N,d,d.visible?1:0,a,g,c)),v=u[u.length-1],m=d.children.length>0;let w=0;for(let N=v;N>=0&&N<d.children.length;N--){const P=d.children[N];if(P.visible){w=P.visibleChildIndex;break}}const D=[];let y=0,T=0;for(const N of h)D.push(N),T+=N.renderNodeCount,N.visible&&(N.visibleChildIndex=w+y++);const _=(0,p.splice)(d.children,v,i,D);s?d.lastDiffIds?(0,p.splice)(d.lastDiffIds,v,i,D.map(N=>s.getId(N.element).toString())):d.lastDiffIds=d.children.map(N=>s.getId(N.element).toString()):d.lastDiffIds=void 0;let L=0;for(const N of _)N.visible&&L++;if(L!==0)for(let N=v+D.length;N<d.children.length;N++){const P=d.children[N];P.visible&&(P.visibleChildIndex-=L)}if(d.visibleChildrenCount+=y-L,a&&o){const N=_.reduce((P,B)=>P+(B.visible?B.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(d,T-N),this.list.splice(n,N,g)}if(_.length>0&&l){const N=P=>{l(P),P.children.forEach(N)};_.forEach(N)}this._onDidSplice.fire({insertedNodes:D,deletedNodes:_});const M=d.children.length>0;m!==M&&this.setCollapsible(u.slice(0,-1),M);let O=d;for(;O;){if(O.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}O=O.parent}}rerender(u){if(u.length===0)throw new t.TreeError(this.user,"Invalid tree location");const{node:i,listIndex:f,revealed:c}=this.getTreeNodeWithListIndex(u);i.visible&&c&&this.list.splice(f,1,[i])}updateElementHeight(u,i){if(u.length===0)throw new t.TreeError(this.user,"Invalid tree location");const{listIndex:f}=this.getTreeNodeWithListIndex(u);this.list.updateElementHeight(f,i)}has(u){return this.hasTreeNode(u)}getListIndex(u){const{listIndex:i,visible:f,revealed:c}=this.getTreeNodeWithListIndex(u);return f&&c?i:-1}getListRenderCount(u){return this.getTreeNode(u).renderNodeCount}isCollapsible(u){return this.getTreeNode(u).collapsible}setCollapsible(u,i){const f=this.getTreeNode(u);typeof i>"u"&&(i=!f.collapsible);const c={collapsible:i};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(u,c))}isCollapsed(u){return this.getTreeNode(u).collapsed}setCollapsed(u,i,f){const c=this.getTreeNode(u);typeof i>"u"&&(i=!c.collapsed);const l={collapsed:i,recursive:f||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(u,l))}_setCollapseState(u,i){const{node:f,listIndex:c,revealed:l}=this.getTreeNodeWithListIndex(u),s=this._setListNodeCollapseState(f,c,l,i);if(f!==this.root&&this.autoExpandSingleChildren&&s&&!S(i)&&f.collapsible&&!f.collapsed&&!i.recursive){let d=-1;for(let n=0;n<f.children.length;n++)if(f.children[n].visible)if(d>-1){d=-1;break}else d=n;d>-1&&this._setCollapseState([...u,d],i)}return s}_setListNodeCollapseState(u,i,f,c){const l=this._setNodeCollapseState(u,c,!1);if(!f||!u.visible||!l)return l;const s=u.renderNodeCount,d=this.updateNodeAfterCollapseChange(u),n=s-(i===-1?0:1);return this.list.splice(i+1,n,d.slice(1)),l}_setNodeCollapseState(u,i,f){let c;if(u===this.root?c=!1:(S(i)?(c=u.collapsible!==i.collapsible,u.collapsible=i.collapsible):u.collapsible?(c=u.collapsed!==i.collapsed,u.collapsed=i.collapsed):c=!1,c&&this._onDidChangeCollapseState.fire({node:u,deep:f})),!S(i)&&i.recursive)for(const l of u.children)c=this._setNodeCollapseState(l,i,!0)||c;return c}expandTo(u){this.eventBufferer.bufferEvents(()=>{let i=this.getTreeNode(u);for(;i.parent;)i=i.parent,u=u.slice(0,u.length-1),i.collapsed&&this._setCollapseState(u,{collapsed:!1,recursive:!1})})}refilter(){const u=this.root.renderNodeCount,i=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,u,i),this.refilterDelayer.cancel()}createTreeNode(u,i,f,c,l,s){const d={parent:i,element:u.element,children:[],depth:i.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof u.collapsible=="boolean"?u.collapsible:typeof u.collapsed<"u",collapsed:typeof u.collapsed>"u"?this.collapseByDefault:u.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},n=this._filterNode(d,f);d.visibility=n,c&&l.push(d);const a=u.children||E.Iterable.empty(),o=c&&n!==0&&!d.collapsed;let g=0,h=1;for(const v of a){const m=this.createTreeNode(v,d,n,o,l,s);d.children.push(m),h+=m.renderNodeCount,m.visible&&(m.visibleChildIndex=g++)}return d.collapsible=d.collapsible||d.children.length>0,d.visibleChildrenCount=g,d.visible=n===2?g>0:n===1,d.visible?d.collapsed||(d.renderNodeCount=h):(d.renderNodeCount=0,c&&l.pop()),s?.(d),d}updateNodeAfterCollapseChange(u){const i=u.renderNodeCount,f=[];return this._updateNodeAfterCollapseChange(u,f),this._updateAncestorsRenderNodeCount(u.parent,f.length-i),f}_updateNodeAfterCollapseChange(u,i){if(u.visible===!1)return 0;if(i.push(u),u.renderNodeCount=1,!u.collapsed)for(const f of u.children)u.renderNodeCount+=this._updateNodeAfterCollapseChange(f,i);return this._onDidChangeRenderNodeCount.fire(u),u.renderNodeCount}updateNodeAfterFilterChange(u){const i=u.renderNodeCount,f=[];return this._updateNodeAfterFilterChange(u,u.visible?1:0,f),this._updateAncestorsRenderNodeCount(u.parent,f.length-i),f}_updateNodeAfterFilterChange(u,i,f,c=!0){let l;if(u!==this.root){if(l=this._filterNode(u,i),l===0)return u.visible=!1,u.renderNodeCount=0,!1;c&&f.push(u)}const s=f.length;u.renderNodeCount=u===this.root?0:1;let d=!1;if(!u.collapsed||l!==0){let n=0;for(const a of u.children)d=this._updateNodeAfterFilterChange(a,l,f,c&&!u.collapsed)||d,a.visible&&(a.visibleChildIndex=n++);u.visibleChildrenCount=n}else u.visibleChildrenCount=0;return u!==this.root&&(u.visible=l===2?d:l===1,u.visibility=l),u.visible?u.collapsed||(u.renderNodeCount+=f.length-s):(u.renderNodeCount=0,c&&f.pop()),this._onDidChangeRenderNodeCount.fire(u),u.visible}_updateAncestorsRenderNodeCount(u,i){if(i!==0)for(;u;)u.renderNodeCount+=i,this._onDidChangeRenderNodeCount.fire(u),u=u.parent}_filterNode(u,i){const f=this.filter?this.filter.filter(u.element,i):1;return typeof f=="boolean"?(u.filterData=void 0,f?1:0):I(f)?(u.filterData=f.data,b(f.visibility)):(u.filterData=void 0,b(f))}hasTreeNode(u,i=this.root){if(!u||u.length===0)return!0;const[f,...c]=u;return f<0||f>i.children.length?!1:this.hasTreeNode(c,i.children[f])}getTreeNode(u,i=this.root){if(!u||u.length===0)return i;const[f,...c]=u;if(f<0||f>i.children.length)throw new t.TreeError(this.user,"Invalid tree location");return this.getTreeNode(c,i.children[f])}getTreeNodeWithListIndex(u){if(u.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:i,listIndex:f,revealed:c,visible:l}=this.getParentNodeWithListIndex(u),s=u[u.length-1];if(s<0||s>i.children.length)throw new t.TreeError(this.user,"Invalid tree location");const d=i.children[s];return{node:d,listIndex:f,revealed:c,visible:l&&d.visible}}getParentNodeWithListIndex(u,i=this.root,f=0,c=!0,l=!0){const[s,...d]=u;if(s<0||s>i.children.length)throw new t.TreeError(this.user,"Invalid tree location");for(let n=0;n<s;n++)f+=i.children[n].renderNodeCount;return c=c&&!i.collapsed,l=l&&i.visible,d.length===0?{parentNode:i,listIndex:f,revealed:c,visible:l}:this.getParentNodeWithListIndex(d,i.children[s],f+1,c,l)}getNode(u=[]){return this.getTreeNode(u)}getNodeLocation(u){const i=[];let f=u;for(;f.parent;)i.push(f.parent.children.indexOf(f)),f=f.parent;return i.reverse()}getParentNodeLocation(u){if(u.length!==0)return u.length===1?[]:(0,p.tail2)(u)[0]}getFirstElementChild(u){const i=this.getTreeNode(u);if(i.children.length!==0)return i.children[0].element}getLastElementAncestor(u=[]){const i=this.getTreeNode(u);if(i.children.length!==0)return this._getLastElementAncestor(i)}_getLastElementAncestor(u){return u.children.length===0?u.element:this._getLastElementAncestor(u.children[u.children.length-1])}}e.IndexTreeModel=C}),define(ae[487],le([1,0,575,297,88]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectTreeModel=void 0;class A{get size(){return this.nodes.size}constructor(E,I,b={}){this.user=E,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new t.IndexTreeModel(E,I,null,b),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,b.sorter&&(this.sorter={compare(S,C){return b.sorter.compare(S.element,C.element)}}),this.identityProvider=b.identityProvider}setChildren(E,I=R.Iterable.empty(),b={}){const S=this.getElementLocation(E);this._setChildren(S,this.preserveCollapseState(I),b)}_setChildren(E,I=R.Iterable.empty(),b){const S=new Set,C=new Set,r=i=>{if(i.element===null)return;const f=i;if(S.add(f.element),this.nodes.set(f.element,f),this.identityProvider){const c=this.identityProvider.getId(f.element).toString();C.add(c),this.nodesByIdentity.set(c,f)}b.onDidCreateNode?.(f)},u=i=>{if(i.element===null)return;const f=i;if(S.has(f.element)||this.nodes.delete(f.element),this.identityProvider){const c=this.identityProvider.getId(f.element).toString();C.has(c)||this.nodesByIdentity.delete(c)}b.onDidDeleteNode?.(f)};this.model.splice([...E,0],Number.MAX_VALUE,I,{...b,onDidCreateNode:r,onDidDeleteNode:u})}preserveCollapseState(E=R.Iterable.empty()){return this.sorter&&(E=[...E].sort(this.sorter.compare.bind(this.sorter))),R.Iterable.map(E,I=>{let b=this.nodes.get(I.element);if(!b&&this.identityProvider){const r=this.identityProvider.getId(I.element).toString();b=this.nodesByIdentity.get(r)}if(!b)return{...I,children:this.preserveCollapseState(I.children)};const S=typeof I.collapsible=="boolean"?I.collapsible:b.collapsible,C=typeof I.collapsed<"u"?I.collapsed:b.collapsed;return{...I,collapsible:S,collapsed:C,children:this.preserveCollapseState(I.children)}})}rerender(E){const I=this.getElementLocation(E);this.model.rerender(I)}updateElementHeight(E,I){const b=this.getElementLocation(E);this.model.updateElementHeight(b,I)}resort(E=null,I=!0){if(!this.sorter)return;const b=this.getElementLocation(E),S=this.model.getNode(b);this._setChildren(b,this.resortChildren(S,I),{})}resortChildren(E,I,b=!0){let S=[...E.children];return(I||b)&&(S=S.sort(this.sorter.compare.bind(this.sorter))),R.Iterable.map(S,C=>({element:C.element,collapsible:C.collapsible,collapsed:C.collapsed,children:this.resortChildren(C,I,!1)}))}getFirstElementChild(E=null){const I=this.getElementLocation(E);return this.model.getFirstElementChild(I)}getLastElementAncestor(E=null){const I=this.getElementLocation(E);return this.model.getLastElementAncestor(I)}has(E){return this.nodes.has(E)}getListIndex(E){const I=this.getElementLocation(E);return this.model.getListIndex(I)}getListRenderCount(E){const I=this.getElementLocation(E);return this.model.getListRenderCount(I)}isCollapsible(E){const I=this.getElementLocation(E);return this.model.isCollapsible(I)}setCollapsible(E,I){const b=this.getElementLocation(E);return this.model.setCollapsible(b,I)}isCollapsed(E){const I=this.getElementLocation(E);return this.model.isCollapsed(I)}setCollapsed(E,I,b){const S=this.getElementLocation(E);return this.model.setCollapsed(S,I,b)}expandTo(E){const I=this.getElementLocation(E);this.model.expandTo(I)}refilter(){this.model.refilter()}getNode(E=null){if(E===null)return this.model.getNode(this.model.rootRef);const I=this.nodes.get(E);if(!I)throw new p.TreeError(this.user,`Tree element not found: ${E}`);return I}getNodeLocation(E){return E.element}getParentNodeLocation(E){if(E===null)throw new p.TreeError(this.user,"Invalid getParentNodeLocation call");const I=this.nodes.get(E);if(!I)throw new p.TreeError(this.user,`Tree element not found: ${E}`);const b=this.model.getNodeLocation(I),S=this.model.getParentNodeLocation(b);return this.model.getNode(S).element}getElementLocation(E){if(E===null)return[];const I=this.nodes.get(E);if(!I)throw new p.TreeError(this.user,`Tree element not found: ${E}`);return this.model.getNodeLocation(I)}}e.ObjectTreeModel=A}),define(ae[1261],le([1,0,487,297,6,88]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function k(s){const d=[s.element],n=s.incompressible||!1;return{element:{elements:d,incompressible:n},children:A.Iterable.map(A.Iterable.from(s.children),k),collapsible:s.collapsible,collapsed:s.collapsed}}function E(s){const d=[s.element],n=s.incompressible||!1;let a,o;for(;[o,a]=A.Iterable.consume(A.Iterable.from(s.children),2),!(o.length!==1||o[0].incompressible);)s=o[0],d.push(s.element);return{element:{elements:d,incompressible:n},children:A.Iterable.map(A.Iterable.concat(o,a),E),collapsible:s.collapsible,collapsed:s.collapsed}}e.compress=E;function I(s,d=0){let n;return d<s.element.elements.length-1?n=[I(s,d+1)]:n=A.Iterable.map(A.Iterable.from(s.children),a=>I(a,0)),d===0&&s.element.incompressible?{element:s.element.elements[d],children:n,incompressible:!0,collapsible:s.collapsible,collapsed:s.collapsed}:{element:s.element.elements[d],children:n,collapsible:s.collapsible,collapsed:s.collapsed}}function b(s){return I(s,0)}e.decompress=b;function S(s,d,n){return s.element===d?{...s,children:n}:{...s,children:A.Iterable.map(A.Iterable.from(s.children),a=>S(a,d,n))}}const C=s=>({getId(d){return d.elements.map(n=>s.getId(n).toString()).join("\0")}});class r{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get size(){return this.nodes.size}constructor(d,n,a={}){this.user=d,this.rootRef=null,this.nodes=new Map,this.model=new t.ObjectTreeModel(d,n,a),this.enabled=typeof a.compressionEnabled>"u"?!0:a.compressionEnabled,this.identityProvider=a.identityProvider}setChildren(d,n=A.Iterable.empty(),a){const o=a.diffIdentityProvider&&C(a.diffIdentityProvider);if(d===null){const _=A.Iterable.map(n,this.enabled?E:k);this._setChildren(null,_,{diffIdentityProvider:o,diffDepth:1/0});return}const g=this.nodes.get(d);if(!g)throw new Error("Unknown compressed tree node");const h=this.model.getNode(g),v=this.model.getParentNodeLocation(g),m=this.model.getNode(v),w=b(h),D=S(w,d,n),y=(this.enabled?E:k)(D),T=m.children.map(_=>_===h?y:_);this._setChildren(m.element,T,{diffIdentityProvider:o,diffDepth:h.depth-m.depth})}isCompressionEnabled(){return this.enabled}setCompressionEnabled(d){if(d===this.enabled)return;this.enabled=d;const a=this.model.getNode().children,o=A.Iterable.map(a,b),g=A.Iterable.map(o,d?E:k);this._setChildren(null,g,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(d,n,a){const o=new Set,g=v=>{for(const m of v.element.elements)o.add(m),this.nodes.set(m,v.element)},h=v=>{for(const m of v.element.elements)o.has(m)||this.nodes.delete(m)};this.model.setChildren(d,n,{...a,onDidCreateNode:g,onDidDeleteNode:h})}has(d){return this.nodes.has(d)}getListIndex(d){const n=this.getCompressedNode(d);return this.model.getListIndex(n)}getListRenderCount(d){const n=this.getCompressedNode(d);return this.model.getListRenderCount(n)}getNode(d){if(typeof d>"u")return this.model.getNode();const n=this.getCompressedNode(d);return this.model.getNode(n)}getNodeLocation(d){const n=this.model.getNodeLocation(d);return n===null?null:n.elements[n.elements.length-1]}getParentNodeLocation(d){const n=this.getCompressedNode(d),a=this.model.getParentNodeLocation(n);return a===null?null:a.elements[a.elements.length-1]}getFirstElementChild(d){const n=this.getCompressedNode(d);return this.model.getFirstElementChild(n)}getLastElementAncestor(d){const n=typeof d>"u"?void 0:this.getCompressedNode(d);return this.model.getLastElementAncestor(n)}isCollapsible(d){const n=this.getCompressedNode(d);return this.model.isCollapsible(n)}setCollapsible(d,n){const a=this.getCompressedNode(d);return this.model.setCollapsible(a,n)}isCollapsed(d){const n=this.getCompressedNode(d);return this.model.isCollapsed(n)}setCollapsed(d,n,a){const o=this.getCompressedNode(d);return this.model.setCollapsed(o,n,a)}expandTo(d){const n=this.getCompressedNode(d);this.model.expandTo(n)}rerender(d){const n=this.getCompressedNode(d);this.model.rerender(n)}updateElementHeight(d,n){const a=this.getCompressedNode(d);!a||this.model.updateElementHeight(a,n)}refilter(){this.model.refilter()}resort(d=null,n=!0){const a=this.getCompressedNode(d);this.model.resort(a,n)}getCompressedNode(d){if(d===null)return null;const n=this.nodes.get(d);if(!n)throw new p.TreeError(this.user,`Tree element not found: ${d}`);return n}}e.CompressedObjectTreeModel=r;const u=s=>s[s.length-1];e.DefaultElementMapper=u;class i{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(d=>new i(this.unwrapper,d))}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}constructor(d,n){this.unwrapper=d,this.node=n}}function f(s,d){return{splice(n,a,o){d.splice(n,a,o.map(g=>s.map(g)))},updateElementHeight(n,a){d.updateElementHeight(n,a)}}}function c(s,d){return{...d,identityProvider:d.identityProvider&&{getId(n){return d.identityProvider.getId(s(n))}},sorter:d.sorter&&{compare(n,a){return d.sorter.compare(n.elements[0],a.elements[0])}},filter:d.filter&&{filter(n,a){return d.filter.filter(s(n),a)}}}}class l{get onDidSplice(){return R.Event.map(this.model.onDidSplice,({insertedNodes:d,deletedNodes:n})=>({insertedNodes:d.map(a=>this.nodeMapper.map(a)),deletedNodes:n.map(a=>this.nodeMapper.map(a))}))}get onDidChangeCollapseState(){return R.Event.map(this.model.onDidChangeCollapseState,({node:d,deep:n})=>({node:this.nodeMapper.map(d),deep:n}))}get onDidChangeRenderNodeCount(){return R.Event.map(this.model.onDidChangeRenderNodeCount,d=>this.nodeMapper.map(d))}constructor(d,n,a={}){this.rootRef=null,this.elementMapper=a.elementMapper||e.DefaultElementMapper;const o=g=>this.elementMapper(g.elements);this.nodeMapper=new p.WeakMapper(g=>new i(o,g)),this.model=new r(d,f(this.nodeMapper,n),c(o,a))}setChildren(d,n=A.Iterable.empty(),a={}){this.model.setChildren(d,n,a)}isCompressionEnabled(){return this.model.isCompressionEnabled()}setCompressionEnabled(d){this.model.setCompressionEnabled(d)}has(d){return this.model.has(d)}getListIndex(d){return this.model.getListIndex(d)}getListRenderCount(d){return this.model.getListRenderCount(d)}getNode(d){return this.nodeMapper.map(this.model.getNode(d))}getNodeLocation(d){return d.element}getParentNodeLocation(d){return this.model.getParentNodeLocation(d)}getFirstElementChild(d){const n=this.model.getFirstElementChild(d);return n===null||typeof n>"u"?n:this.elementMapper(n.elements)}getLastElementAncestor(d){const n=this.model.getLastElementAncestor(d);return n===null||typeof n>"u"?n:this.elementMapper(n.elements)}isCollapsible(d){return this.model.isCollapsible(d)}setCollapsible(d,n){return this.model.setCollapsible(d,n)}isCollapsed(d){return this.model.isCollapsed(d)}setCollapsed(d,n,a){return this.model.setCollapsed(d,n,a)}expandTo(d){return this.model.expandTo(d)}rerender(d){return this.model.rerender(d)}updateElementHeight(d,n){this.model.updateElementHeight(d,n)}refilter(){return this.model.refilter()}resort(d=null,n=!0){return this.model.resort(d,n)}getCompressedTreeNode(d=null){return this.model.getNode(d)}}e.CompressibleObjectTreeModel=l}),define(ae[140],le([1,0,10,90,139,133,2]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Widget=void 0;class E extends k.Disposable{onclick(b,S){this._register(t.addDisposableListener(b,t.EventType.CLICK,C=>S(new R.StandardMouseEvent(C))))}onmousedown(b,S){this._register(t.addDisposableListener(b,t.EventType.MOUSE_DOWN,C=>S(new R.StandardMouseEvent(C))))}onmouseover(b,S){this._register(t.addDisposableListener(b,t.EventType.MOUSE_OVER,C=>S(new R.StandardMouseEvent(C))))}onmouseleave(b,S){this._register(t.addDisposableListener(b,t.EventType.MOUSE_LEAVE,C=>S(new R.StandardMouseEvent(C))))}onkeydown(b,S){this._register(t.addDisposableListener(b,t.EventType.KEY_DOWN,C=>S(new p.StandardKeyboardEvent(C))))}onkeyup(b,S){this._register(t.addDisposableListener(b,t.EventType.KEY_UP,C=>S(new p.StandardKeyboardEvent(C))))}oninput(b,S){this._register(t.addDisposableListener(b,t.EventType.INPUT,S))}onblur(b,S){this._register(t.addDisposableListener(b,t.EventType.BLUR,S))}onfocus(b,S){this._register(t.addDisposableListener(b,t.EventType.FOCUS,S))}onchange(b,S){this._register(t.addDisposableListener(b,t.EventType.CHANGE,S))}ignoreGesture(b){return A.Gesture.ignoreTarget(b)}}e.Widget=E}),define(ae[576],le([1,0,415,140,11,10]),function(J,e,t,p,R,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 p.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<"u"&&(this.bgDomNode.style.top="0px"),typeof I.left<"u"&&(this.bgDomNode.style.left="0px"),typeof I.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof I.right<"u"&&(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<"u"&&(this.domNode.style.top=I.top+"px"),typeof I.left<"u"&&(this.domNode.style.left=I.left+"px"),typeof I.bottom<"u"&&(this.domNode.style.bottom=I.bottom+"px"),typeof I.right<"u"&&(this.domNode.style.right=I.right+"px"),this._pointerMoveMonitor=this._register(new t.GlobalPointerMoveMonitor),this._register(A.addStandardDisposableListener(this.bgDomNode,A.EventType.POINTER_DOWN,b=>this._arrowPointerDown(b))),this._register(A.addStandardDisposableListener(this.domNode,A.EventType.POINTER_DOWN,b=>this._arrowPointerDown(b))),this._pointerdownRepeatTimer=this._register(new R.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new R.TimeoutTimer)}_arrowPointerDown(I){if(!I.target||!(I.target instanceof Element))return;const b=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(b,200),this._pointerMoveMonitor.startMonitoring(I.target,I.pointerId,I.buttons,S=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),I.preventDefault()}}e.ScrollbarArrow=k}),define(ae[751],le([1,0,10,121,415,576,1259,140,14]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const b=140;class S extends E.Widget{constructor(r){super(),this._lazyRender=r.lazyRender,this._host=r.host,this._scrollable=r.scrollable,this._scrollByPage=r.scrollByPage,this._scrollbarState=r.scrollbarState,this._visibilityController=this._register(new k.ScrollbarVisibilityController(r.visibility,"visible scrollbar "+r.extraScrollbarClassName,"invisible scrollbar "+r.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new R.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,p.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,u=>this._domNodePointerDown(u)))}_createArrow(r){const u=this._register(new A.ScrollbarArrow(r));this.domNode.domNode.appendChild(u.bgDomNode),this.domNode.domNode.appendChild(u.domNode)}_createSlider(r,u,i,f){this.slider=(0,p.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(r),this.slider.setLeft(u),typeof i=="number"&&this.slider.setWidth(i),typeof f=="number"&&this.slider.setHeight(f),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,c=>{c.button===0&&(c.preventDefault(),this._sliderPointerDown(c))})),this.onclick(this.slider.domNode,c=>{c.leftButton&&c.stopPropagation()})}_onElementSize(r){return this._scrollbarState.setVisibleSize(r)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(r){return this._scrollbarState.setScrollSize(r)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(r){return this._scrollbarState.setScrollPosition(r)&&(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(r){r.target===this.domNode.domNode&&this._onPointerDown(r)}delegatePointerDown(r){const u=this.domNode.domNode.getClientRects()[0].top,i=u+this._scrollbarState.getSliderPosition(),f=u+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),c=this._sliderPointerPosition(r);i<=c&&c<=f?r.button===0&&(r.preventDefault(),this._sliderPointerDown(r)):this._onPointerDown(r)}_onPointerDown(r){let u,i;if(r.target===this.domNode.domNode&&typeof r.offsetX=="number"&&typeof r.offsetY=="number")u=r.offsetX,i=r.offsetY;else{const c=t.getDomNodePagePosition(this.domNode.domNode);u=r.pageX-c.left,i=r.pageY-c.top}const f=this._pointerDownRelativePosition(u,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(f):this._scrollbarState.getDesiredScrollPositionFromOffset(f)),r.button===0&&(r.preventDefault(),this._sliderPointerDown(r))}_sliderPointerDown(r){if(!r.target||!(r.target instanceof Element))return;const u=this._sliderPointerPosition(r),i=this._sliderOrthogonalPointerPosition(r),f=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(r.target,r.pointerId,r.buttons,c=>{const l=this._sliderOrthogonalPointerPosition(c),s=Math.abs(l-i);if(I.isWindows&&s>b){this._setDesiredScrollPositionNow(f.getScrollPosition());return}const n=this._sliderPointerPosition(c)-u;this._setDesiredScrollPositionNow(f.getDesiredScrollPositionFromDelta(n))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(r){const u={};this.writeScrollPosition(u,r),this._scrollable.setScrollPositionNow(u)}updateScrollbarSize(r){this._updateScrollbarSize(r),this._scrollbarState.setScrollbarSize(r),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=S}),define(ae[1262],le([1,0,139,751,576,706,29]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class E extends p.AbstractScrollbar{constructor(b,S,C){const r=b.getScrollDimensions(),u=b.getCurrentScrollPosition();if(super({lazyRender:S.lazyRender,host:C,scrollbarState:new A.ScrollbarState(S.horizontalHasArrows?S.arrowSize:0,S.horizontal===2?0:S.horizontalScrollbarSize,S.vertical===2?0:S.verticalScrollbarSize,r.width,r.scrollWidth,u.scrollLeft),visibility:S.horizontal,extraScrollbarClassName:"horizontal",scrollable:b,scrollByPage:S.scrollByPage}),S.horizontalHasArrows){const i=(S.arrowSize-R.ARROW_IMG_SIZE)/2,f=(S.horizontalScrollbarSize-R.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonLeft,top:f,left:i,bottom:void 0,right:void 0,bgWidth:S.arrowSize,bgHeight:S.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonRight,top:f,left:void 0,bottom:void 0,right:i,bgWidth:S.arrowSize,bgHeight:S.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((S.horizontalScrollbarSize-S.horizontalSliderSize)/2),0,void 0,S.horizontalSliderSize)}_updateSlider(b,S){this.slider.setWidth(b),this.slider.setLeft(S)}_renderDomNode(b,S){this.domNode.setWidth(b),this.domNode.setHeight(S),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(b){return this._shouldRender=this._onElementScrollSize(b.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(b.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(b.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(b,S){return b}_sliderPointerPosition(b){return b.pageX}_sliderOrthogonalPointerPosition(b){return b.pageY}_updateScrollbarSize(b){this.slider.setHeight(b)}writeScrollPosition(b,S){b.scrollLeft=S}updateOptions(b){this.updateScrollbarSize(b.horizontal===2?0:b.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(b.vertical===2?0:b.verticalScrollbarSize),this._visibilityController.setVisibility(b.horizontal),this._scrollByPage=b.scrollByPage}}e.HorizontalScrollbar=E}),define(ae[1263],le([1,0,139,751,576,706,29]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class E extends p.AbstractScrollbar{constructor(b,S,C){const r=b.getScrollDimensions(),u=b.getCurrentScrollPosition();if(super({lazyRender:S.lazyRender,host:C,scrollbarState:new A.ScrollbarState(S.verticalHasArrows?S.arrowSize:0,S.vertical===2?0:S.verticalScrollbarSize,0,r.height,r.scrollHeight,u.scrollTop),visibility:S.vertical,extraScrollbarClassName:"vertical",scrollable:b,scrollByPage:S.scrollByPage}),S.verticalHasArrows){const i=(S.arrowSize-R.ARROW_IMG_SIZE)/2,f=(S.verticalScrollbarSize-R.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonUp,top:i,left:f,bottom:void 0,right:void 0,bgWidth:S.verticalScrollbarSize,bgHeight:S.arrowSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:k.Codicon.scrollbarButtonDown,top:void 0,left:f,bottom:i,right:void 0,bgWidth:S.verticalScrollbarSize,bgHeight:S.arrowSize,onActivate:()=>this._host.onMouseWheel(new t.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((S.verticalScrollbarSize-S.verticalSliderSize)/2),S.verticalSliderSize,void 0)}_updateSlider(b,S){this.slider.setHeight(b),this.slider.setTop(S)}_renderDomNode(b,S){this.domNode.setWidth(S),this.domNode.setHeight(b),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(b){return this._shouldRender=this._onElementScrollSize(b.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(b.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(b.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(b,S){return S}_sliderPointerPosition(b){return b.pageY}_sliderOrthogonalPointerPosition(b){return b.pageX}_updateScrollbarSize(b){this.slider.setWidth(b)}writeScrollPosition(b,S){b.scrollTop=S}updateOptions(b){this.updateScrollbarSize(b.vertical===2?0:b.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(b.vertical),this._scrollByPage=b.scrollByPage}}e.VerticalScrollbar=E}),define(ae[147],le([1,0,86,10,121,139,1262,1263,140,11,6,2,14,486,1047]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const i=500,f=50,c=!0;class l{constructor(v,m,w){this.timestamp=v,this.deltaX=m,this.deltaY=w,this.score=0}}class s{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let v=1,m=0,w=1,D=this._rear;do{const y=D===this._front?v:Math.pow(2,-w);if(v-=y,m+=this._memory[D].score*y,D===this._front)break;D=(this._capacity+D-1)%this._capacity,w++}while(!0);return m<=.5}accept(v,m,w){const D=new l(v,m,w);D.score=this._computeScore(D),this._front===-1&&this._rear===-1?(this._memory[0]=D,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]=D)}_computeScore(v){if(Math.abs(v.deltaX)>0&&Math.abs(v.deltaY)>0)return 1;let m=.5;const w=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(v.deltaX)||!this._isAlmostInt(v.deltaY))&&(m+=.25),Math.min(Math.max(m,0),1)}_isAlmostInt(v){return Math.abs(Math.round(v)-v)<.01}}e.MouseWheelClassifier=s,s.INSTANCE=new s;class d extends I.Widget{get options(){return this._options}constructor(v,m,w){super(),this._onScroll=this._register(new S.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new S.Emitter),this.onWillScroll=this._onWillScroll.event,v.style.overflow="hidden",this._options=g(m),this._scrollable=w,this._register(this._scrollable.onScroll(y=>{this._onWillScroll.fire(y),this._onDidScroll(y),this._onScroll.fire(y)}));const D={onMouseWheel:y=>this._onMouseWheel(y),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new E.VerticalScrollbar(this._scrollable,this._options,D)),this._horizontalScrollbar=this._register(new k.HorizontalScrollbar(this._scrollable,this._options,D)),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(v),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,R.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,R.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,R.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.onmouseleave(this._listenOnDomNode,y=>this._onMouseLeave(y)),this._hideTimeout=this._register(new b.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}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(v){this._verticalScrollbar.delegatePointerDown(v)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(v){this._scrollable.setScrollDimensions(v,!1)}updateClassName(v){this._options.className=v,r.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(v){typeof v.handleMouseWheel<"u"&&(this._options.handleMouseWheel=v.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof v.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=v.mouseWheelScrollSensitivity),typeof v.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=v.fastScrollSensitivity),typeof v.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=v.scrollPredominantAxis),typeof v.horizontal<"u"&&(this._options.horizontal=v.horizontal),typeof v.vertical<"u"&&(this._options.vertical=v.vertical),typeof v.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=v.horizontalScrollbarSize),typeof v.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=v.verticalScrollbarSize),typeof v.scrollByPage<"u"&&(this._options.scrollByPage=v.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(v){this._revealOnScroll=v}delegateScrollFromMouseWheelEvent(v){this._onMouseWheel(new A.StandardWheelEvent(v))}_setListeningToMouseWheel(v){if(this._mouseWheelToDispose.length>0!==v&&(this._mouseWheelToDispose=(0,C.dispose)(this._mouseWheelToDispose),v)){const w=D=>{this._onMouseWheel(new A.StandardWheelEvent(D))};this._mouseWheelToDispose.push(p.addDisposableListener(this._listenOnDomNode,p.EventType.MOUSE_WHEEL,w,{passive:!1}))}}_onMouseWheel(v){const m=s.INSTANCE;if(c){const y=window.devicePixelRatio/(0,t.getZoomFactor)();r.isWindows||r.isLinux?m.accept(Date.now(),v.deltaX/y,v.deltaY/y):m.accept(Date.now(),v.deltaX,v.deltaY)}let w=!1;if(v.deltaY||v.deltaX){let y=v.deltaY*this._options.mouseWheelScrollSensitivity,T=v.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.isMacintosh&&v.browserEvent&&v.browserEvent.shiftKey;(this._options.scrollYToX||_)&&!T&&(T=y,y=0),v.browserEvent&&v.browserEvent.altKey&&(T=T*this._options.fastScrollSensitivity,y=y*this._options.fastScrollSensitivity);const L=this._scrollable.getFutureScrollPosition();let M={};if(y){const O=f*y,N=L.scrollTop-(O<0?Math.floor(O):Math.ceil(O));this._verticalScrollbar.writeScrollPosition(M,N)}if(T){const O=f*T,N=L.scrollLeft-(O<0?Math.floor(O):Math.ceil(O));this._horizontalScrollbar.writeScrollPosition(M,N)}M=this._scrollable.validateScrollPosition(M),(L.scrollLeft!==M.scrollLeft||L.scrollTop!==M.scrollTop)&&(c&&this._options.mouseWheelSmoothScroll&&m.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(M):this._scrollable.setScrollPositionNow(M),w=!0)}let D=w;!D&&this._options.alwaysConsumeMouseWheel&&(D=!0),!D&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(D=!0),D&&(v.preventDefault(),v.stopPropagation())}_onDidScroll(v){this._shouldRender=this._horizontalScrollbar.onDidScroll(v)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(v)||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 v=this._scrollable.getCurrentScrollPosition(),m=v.scrollTop>0,w=v.scrollLeft>0,D=w?" left":"",y=m?" top":"",T=w||m?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${D}`),this._topShadowDomNode.setClassName(`shadow${y}`),this._topLeftShadowDomNode.setClassName(`shadow${T}${y}${D}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(v){this._mouseIsOver=!1,this._hide()}_onMouseOver(v){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=d;class n extends d{constructor(v,m){m=m||{},m.mouseWheelSmoothScroll=!1;const w=new u.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:D=>p.scheduleAtNextAnimationFrame(D)});super(v,m,w),this._register(w)}setScrollPosition(v){this._scrollable.setScrollPositionNow(v)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.ScrollableElement=n;class a extends d{constructor(v,m,w){super(v,m,w)}setScrollPosition(v){v.reuseAnimation?this._scrollable.setScrollPositionSmooth(v,v.reuseAnimation):this._scrollable.setScrollPositionNow(v)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=a;class o extends d{constructor(v,m){m=m||{},m.mouseWheelSmoothScroll=!1;const w=new u.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:D=>p.scheduleAtNextAnimationFrame(D)});super(v,m,w),this._register(w),this._element=v,this.onScroll(D=>{D.scrollTopChanged&&(this._element.scrollTop=D.scrollTop),D.scrollLeftChanged&&(this._element.scrollLeft=D.scrollLeft)}),this.scanDomNode()}setScrollPosition(v){this._scrollable.setScrollPositionNow(v)}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=o;function g(h){const v={lazyRender:typeof h.lazyRender<"u"?h.lazyRender:!1,className:typeof h.className<"u"?h.className:"",useShadows:typeof h.useShadows<"u"?h.useShadows:!0,handleMouseWheel:typeof h.handleMouseWheel<"u"?h.handleMouseWheel:!0,flipAxes:typeof h.flipAxes<"u"?h.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof h.consumeMouseWheelIfScrollbarIsNeeded<"u"?h.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof h.alwaysConsumeMouseWheel<"u"?h.alwaysConsumeMouseWheel:!1,scrollYToX:typeof h.scrollYToX<"u"?h.scrollYToX:!1,mouseWheelScrollSensitivity:typeof h.mouseWheelScrollSensitivity<"u"?h.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof h.fastScrollSensitivity<"u"?h.fastScrollSensitivity:5,scrollPredominantAxis:typeof h.scrollPredominantAxis<"u"?h.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof h.mouseWheelSmoothScroll<"u"?h.mouseWheelSmoothScroll:!0,arrowSize:typeof h.arrowSize<"u"?h.arrowSize:11,listenOnDomNode:typeof h.listenOnDomNode<"u"?h.listenOnDomNode:null,horizontal:typeof h.horizontal<"u"?h.horizontal:1,horizontalScrollbarSize:typeof h.horizontalScrollbarSize<"u"?h.horizontalScrollbarSize:10,horizontalSliderSize:typeof h.horizontalSliderSize<"u"?h.horizontalSliderSize:0,horizontalHasArrows:typeof h.horizontalHasArrows<"u"?h.horizontalHasArrows:!1,vertical:typeof h.vertical<"u"?h.vertical:1,verticalScrollbarSize:typeof h.verticalScrollbarSize<"u"?h.verticalScrollbarSize:10,verticalHasArrows:typeof h.verticalHasArrows<"u"?h.verticalHasArrows:!1,verticalSliderSize:typeof h.verticalSliderSize<"u"?h.verticalSliderSize:0,scrollByPage:typeof h.scrollByPage<"u"?h.scrollByPage:!1};return v.horizontalSliderSize=typeof h.horizontalSliderSize<"u"?h.horizontalSliderSize:v.horizontalScrollbarSize,v.verticalSliderSize=typeof h.verticalSliderSize<"u"?h.verticalSliderSize:v.verticalScrollbarSize,r.isMacintosh&&(v.className+=" mac"),v}}),define(ae[1264],le([1,0,10,147,16,29,6,2,1032]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsWidget=e.BreadcrumbsItem=void 0;class I{dispose(){}}e.BreadcrumbsItem=I;class b{constructor(C,r,u){this._disposables=new E.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 p.DomScrollableElement(this._domNode,{vertical:2,horizontal:1,horizontalScrollbarSize:r,useShadows:!1,scrollYToX:!0}),this._separatorIcon=u,this._disposables.add(this._scrollable),this._disposables.add(t.addStandardDisposableListener(this._domNode,"click",f=>this._onClick(f))),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(f=>this._onDidChangeFocus.fire(!1))),this._disposables.add(i.onDidFocus(f=>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 r=new E.DisposableStore;return r.add(t.modify(()=>{this._dimension=C,this._domNode.style.width=`${C.width}px`,this._domNode.style.height=`${C.height}px`,r.add(this._updateScrollbar())})),r}_updateScrollbar(){return t.measure(()=>{t.measure(()=>{this._scrollable.setRevealOnScroll(!1),this._scrollable.scanDomNode(),this._scrollable.setRevealOnScroll(!0)})})}style(C){let r="";C.breadcrumbsBackground&&(r+=`.monaco-breadcrumbs { background-color: ${C.breadcrumbsBackground}}`),C.breadcrumbsForeground&&(r+=`.monaco-breadcrumbs .monaco-breadcrumb-item { color: ${C.breadcrumbsForeground}} `),C.breadcrumbsFocusForeground&&(r+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused { color: ${C.breadcrumbsFocusForeground}} `),C.breadcrumbsFocusAndSelectionForeground&&(r+=`.monaco-breadcrumbs .monaco-breadcrumb-item.focused.selected { color: ${C.breadcrumbsFocusAndSelectionForeground}} `),C.breadcrumbsHoverForeground&&(r+=`.monaco-breadcrumbs:not(.disabled ) .monaco-breadcrumb-item:hover:not(.focused):not(.selected) { color: ${C.breadcrumbsHoverForeground}} `),this._styleElement.innerText!==r&&(this._styleElement.innerText=r)}setEnabled(C){this._enabled=C,this._domNode.classList.toggle("disabled",!this._enabled)}domFocus(){const 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,r){this._focus(this._items.indexOf(C),r)}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,r){this._focusedItemIdx=-1;for(let u=0;u<this._nodes.length;u++){const i=this._nodes[u];u!==C?i.classList.remove("focused"):(this._focusedItemIdx=u,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:r})}reveal(C){const r=this._items.indexOf(C);r>=0&&this._reveal(r,!1)}_reveal(C,r){const u=this._nodes[C];if(u){const{width:i}=this._scrollable.getScrollDimensions(),{scrollLeft:f}=this._scrollable.getScrollPosition();(!r||u.offsetLeft>f+i||u.offsetLeft<f)&&(this._scrollable.setRevealOnScroll(!1),this._scrollable.setScrollPosition({scrollLeft:u.offsetLeft}),this._scrollable.setRevealOnScroll(!0))}}getSelection(){return this._items[this._selectedItemIdx]}setSelection(C,r){this._select(this._items.indexOf(C),r)}_select(C,r){this._selectedItemIdx=-1;for(let u=0;u<this._nodes.length;u++){const i=this._nodes[u];u!==C?i.classList.remove("selected"):(this._selectedItemIdx=u,i.classList.add("selected"))}this._onDidSelectItem.fire({type:"select",item:this._items[this._selectedItemIdx],node:this._nodes[this._selectedItemIdx],payload:r})}getItems(){return this._items}setItems(C){let r,u=[];try{r=(0,R.commonPrefixLength)(this._items,C,(i,f)=>i.equals(f)),u=this._items.splice(r,this._items.length-r,...C.slice(r)),this._render(r),(0,E.dispose)(u),this._focus(-1,void 0)}catch(i){const f=new Error(`BreadcrumbsItem#setItems: newItems: ${C.length}, prefix: ${r}, removed: ${u.length}`);throw f.name=i.name,f.stack=i.stack,f}}_render(C){let r=!1;for(;C<this._items.length&&C<this._nodes.length;C++){const u=this._items[C],i=this._nodes[C];this._renderItem(u,i),r=!0}for(;C<this._nodes.length;){const u=this._nodes.pop();u&&(this._freeNodes.push(u),u.remove(),r=!0)}for(;C<this._items.length;C++){const u=this._items[C],i=this._freeNodes.length>0?this._freeNodes.pop():document.createElement("div");i&&(this._renderItem(u,i),this._domNode.appendChild(i),this._nodes.push(i),r=!0)}r&&this.layout(void 0)}_renderItem(C,r){t.clearNode(r),r.className="";try{C.render(r)}catch(i){r.innerText="<<RENDER ERROR>>",console.error(i)}r.tabIndex=-1,r.setAttribute("role","listitem"),r.classList.add("monaco-breadcrumb-item");const u=t.$(A.CSSIcon.asCSSSelector(this._separatorIcon));r.appendChild(u)}_onClick(C){if(!!this._enabled)for(let r=C.target;r;r=r.parentElement){const u=this._nodes.indexOf(r);if(u>=0){this._focus(u,C),this._select(u,C);break}}}}e.BreadcrumbsWidget=b}),define(ae[577],le([1,0,10,90,147,2,1039]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverAction=e.HoverWidget=e.HoverPosition=void 0;const k=t.$;var E;(function(S){S[S.LEFT=0]="LEFT",S[S.RIGHT=1]="RIGHT",S[S.BELOW=2]="BELOW",S[S.ABOVE=3]="ABOVE"})(E=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 R.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=I;class b extends A.Disposable{static render(C,r,u){return new b(C,r,u)}constructor(C,r,u){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"),r.iconClass&&t.append(this.action,k(`span.icon.${r.iconClass}`));const i=t.append(this.action,k("span"));i.textContent=u?`${r.label} (${u})`:r.label,this._register(t.addDisposableListener(this.actionContainer,t.EventType.CLICK,f=>{f.stopPropagation(),f.preventDefault(),r.run(this.actionContainer)})),this._register(t.addDisposableListener(this.actionContainer,t.EventType.KEY_UP,f=>{new p.StandardKeyboardEvent(f).equals(3)&&(f.stopPropagation(),f.preventDefault(),r.run(this.actionContainer))})),this.setEnabled(!0)}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=b}),define(ae[328],le([1,0,181,10,195,133,147,16,11,112,6,2,478,486,1026,1258,21]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const l={CurrentDragAndDropData:void 0},s={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(v){return[v]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class d{get context(){return this._context}set context(m){this._context=m}constructor(m){this.elements=m}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=d;class n{constructor(m){this.elements=m}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=n;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 w=0;w<m.files.length;w++){const D=m.files.item(w);D&&(D.size||D.type)&&this.files.push(D)}}}getData(){return{types:this.types,files:this.files}}}e.NativeDragAndDropData=a;function o(v,m){return Array.isArray(v)&&Array.isArray(m)?(0,E.equals)(v,m):v===m}class g{constructor(m){m?.getSetSize?this.getSetSize=m.getSetSize.bind(m):this.getSetSize=(w,D,y)=>y,m?.getPosInSet?this.getPosInSet=m.getPosInSet.bind(m):this.getPosInSet=(w,D)=>D+1,m?.getRole?this.getRole=m.getRole.bind(m):this.getRole=w=>"listitem",m?.isChecked?this.isChecked=m.isChecked.bind(m):this.isChecked=w=>{}}}class h{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 w of this.items)this.measureItemWidth(w);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,p.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=""}}constructor(m,w,D,y=s){if(this.virtualDelegate=w,this.domId=`list_id_${++h.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new I.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=C.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=C.Disposable.None,this.onDragLeaveTimeout=C.Disposable.None,this.disposables=new C.DisposableStore,this._onDidChangeContentHeight=new S.Emitter,this.onDidChangeContentHeight=S.Event.latch(this._onDidChangeContentHeight.event,void 0,this.disposables),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 i.RangeMap;for(const _ of D)this.renderers.set(_.templateId,_);this.cache=this.disposables.add(new f.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=y.horizontalScrolling??s.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof y.additionalScrollHeight>"u"?0:y.additionalScrollHeight,this.accessibilityProvider=new g(y.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(y.transformOptimization??s.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(A.Gesture.addTarget(this.rowsContainer)),this.scrollable=new u.Scrollable({forceIntegerValues:!0,smoothScrollDuration:y.smoothScrolling??!1?125:0,scheduleAtNextAnimationFrame:_=>(0,p.scheduleAtNextAnimationFrame)(_)}),this.scrollableElement=this.disposables.add(new k.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:y.alwaysConsumeMouseWheel??s.alwaysConsumeMouseWheel,horizontal:1,vertical:y.verticalScrollMode??s.verticalScrollMode,useShadows:y.useShadows??s.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,p.addDisposableListener)(this.rowsContainer,A.EventType.Change,_=>this.onTouchChange(_))),this.disposables.add((0,p.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",_=>_.target.scrollTop=0)),this.disposables.add((0,p.addDisposableListener)(this.domNode,"dragover",_=>this.onDragOver(this.toDragEvent(_)))),this.disposables.add((0,p.addDisposableListener)(this.domNode,"drop",_=>this.onDrop(this.toDragEvent(_)))),this.disposables.add((0,p.addDisposableListener)(this.domNode,"dragleave",_=>this.onDragLeave(this.toDragEvent(_)))),this.disposables.add((0,p.addDisposableListener)(this.domNode,"dragend",_=>this.onDragEnd(_))),this.setRowLineHeight=y.setRowLineHeight??s.setRowLineHeight,this.setRowHeight=y.setRowHeight??s.setRowHeight,this.supportDynamicHeights=y.supportDynamicHeights??s.supportDynamicHeights,this.dnd=y.dnd??s.dnd,this.layout(y.initialSize?.height,y.initialSize?.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})}delegateScrollFromMouseWheelEvent(m){this.scrollableElement.delegateScrollFromMouseWheelEvent(m)}delegateVerticalScrollbarPointerDown(m){this.scrollableElement.delegateVerticalScrollbarPointerDown(m)}updateElementHeight(m,w,D){if(m<0||m>=this.items.length)return;const y=this.items[m].size;if(typeof w>"u"){if(!this.supportDynamicHeights){console.warn("Dynamic heights not supported");return}this.items[m].lastDynamicHeightWidth=void 0,w=y+this.probeDynamicHeight(m)}if(y===w)return;const T=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);let _=0;m<T.start||D!==null&&D>m&&D<=T.end?_=w-y:_=0,this.rangeMap.splice(m,1,[{size:w}]),this.items[m].size=w,this.render(T,Math.max(0,this.lastRenderTop+_),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}splice(m,w,D=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(m,w,D)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(m,w,D=[]){const y=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),T={start:m,end:m+w},_=r.Range.intersect(y,T),L=new Map;for(let G=_.end-1;G>=_.start;G--){const Q=this.items[G];if(Q.dragStartDisposable.dispose(),Q.checkedDisposable.dispose(),Q.row){let j=L.get(Q.templateId);j||(j=[],L.set(Q.templateId,j));const K=this.renderers.get(Q.templateId);K&&K.disposeElement&&K.disposeElement(Q.element,G,Q.row.templateData,Q.size),j.push(Q.row)}Q.row=null}const M={start:m+w,end:this.items.length},O=r.Range.intersect(M,y),N=r.Range.relativeComplement(M,y),P=D.map(G=>({id:String(this.itemId++),element:G,templateId:this.virtualDelegate.getTemplateId(G),size:this.virtualDelegate.getHeight(G),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(G),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:C.Disposable.None,checkedDisposable:C.Disposable.None}));let B;m===0&&w>=this.items.length?(this.rangeMap=new i.RangeMap,this.rangeMap.splice(0,0,P),B=this.items,this.items=P):(this.rangeMap.splice(m,w,P),B=this.items.splice(m,w,...P));const V=D.length-w,z=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),x=(0,i.shift)(O,V),H=r.Range.intersect(z,x);for(let G=H.start;G<H.end;G++)this.updateItemInDOM(this.items[G],G);const W=r.Range.relativeComplement(x,z);for(const G of W)for(let Q=G.start;Q<G.end;Q++)this.removeItemFromDOM(Q);const U=N.map(G=>(0,i.shift)(G,V)),q=[{start:m,end:m+D.length},...U].map(G=>r.Range.intersect(z,G)),X=this.getNextToLastElement(q);for(const G of q)for(let Q=G.start;Q<G.end;Q++){const j=this.items[Q],Y=L.get(j.templateId)?.pop();this.insertItemInDOM(Q,X,Y)}for(const G of L.values())for(const Q of G)this.cache.release(Q);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),B.map(G=>G.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,p.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 w of this.items)typeof w.width<"u"&&(m=Math.max(m,w.width));this.scrollWidth=m,this.scrollableElement.setScrollDimensions({scrollWidth:m===0?0:m+10})}updateWidth(m){if(!this.horizontalScrolling||typeof this.scrollWidth>"u")return;const w=this.items[m];this.measureItemWidth(w),typeof w.width<"u"&&w.width>this.scrollWidth&&(this.scrollWidth=w.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),w=this.rangeMap.positionAt(m.start),D=this.rangeMap.positionAt(m.start+1);return D!==-1&&(D-w)/2+w<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(w=>w.element===m)}domElement(m){const w=this.items[m].row;return w&&w.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,w){const D={height:typeof m=="number"?m:(0,p.getContentHeight)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,D.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(D),typeof w<"u"&&(this.renderWidth=w,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof w=="number"?w:(0,p.getContentWidth)(this.domNode)})}render(m,w,D,y,T,_=!1){const L=this.getRenderRange(w,D),M=r.Range.relativeComplement(L,m),O=r.Range.relativeComplement(m,L),N=this.getNextToLastElement(M);if(_){const P=r.Range.intersect(m,L);for(let B=P.start;B<P.end;B++)this.updateItemInDOM(this.items[B],B)}for(const P of M)for(let B=P.start;B<P.end;B++)this.insertItemInDOM(B,N);for(const P of O)for(let B=P.start;B<P.end;B++)this.removeItemFromDOM(B);y!==void 0&&(this.rowsContainer.style.left=`-${y}px`),this.rowsContainer.style.top=`-${w}px`,this.horizontalScrolling&&T!==void 0&&(this.rowsContainer.style.width=`${Math.max(T,this.renderWidth)}px`),this.lastRenderTop=w,this.lastRenderHeight=D}insertItemInDOM(m,w,D){const y=this.items[m];y.row||(y.row=D??this.cache.alloc(y.templateId));const T=this.accessibilityProvider.getRole(y.element)||"listitem";y.row.domNode.setAttribute("role",T);const _=this.accessibilityProvider.isChecked(y.element);if(typeof _=="boolean")y.row.domNode.setAttribute("aria-checked",String(!!_));else if(_){const O=N=>y.row.domNode.setAttribute("aria-checked",String(!!N));O(_.value),y.checkedDisposable=_.onDidChange(O)}y.row.domNode.parentElement||(w?this.rowsContainer.insertBefore(y.row.domNode,w):this.rowsContainer.appendChild(y.row.domNode)),this.updateItemInDOM(y,m);const L=this.renderers.get(y.templateId);if(!L)throw new Error(`No renderer found for template id ${y.templateId}`);L?.renderElement(y.element,m,y.row.templateData,y.size);const M=this.dnd.getDragURI(y.element);y.dragStartDisposable.dispose(),y.row.domNode.draggable=!!M,M&&(y.dragStartDisposable=(0,p.addDisposableListener)(y.row.domNode,"dragstart",O=>this.onDragStart(y.element,M,O))),this.horizontalScrolling&&(this.measureItemWidth(y),this.eventuallyUpdateScrollWidth())}measureItemWidth(m){if(!m.row||!m.row.domNode)return;m.row.domNode.style.width="fit-content",m.width=(0,p.getContentWidth)(m.row.domNode);const w=window.getComputedStyle(m.row.domNode);w.paddingLeft&&(m.width+=parseFloat(w.paddingLeft)),w.paddingRight&&(m.width+=parseFloat(w.paddingRight)),m.row.domNode.style.width=""}updateItemInDOM(m,w){m.row.domNode.style.top=`${this.elementTop(w)}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",`${w}`),m.row.domNode.setAttribute("data-last-element",w===this.length-1?"true":"false"),m.row.domNode.setAttribute("data-parity",w%2===0?"even":"odd"),m.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(m.element,w,this.length))),m.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(m.element,w))),m.row.domNode.setAttribute("id",this.getElementDomId(w)),m.row.domNode.classList.toggle("drop-target",m.dropTarget)}removeItemFromDOM(m){const w=this.items[m];if(w.dragStartDisposable.dispose(),w.checkedDisposable.dispose(),w.row){const D=this.renderers.get(w.templateId);D&&D.disposeElement&&D.disposeElement(w.element,m,w.row.templateData,w.size),this.cache.release(w.row),w.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(m,w){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:m,reuseAnimation:w})}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 S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"click")).event,m=>this.toMouseEvent(m),this.disposables)}get onMouseDblClick(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"dblclick")).event,m=>this.toMouseEvent(m),this.disposables)}get onMouseMiddleClick(){return S.Event.filter(S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"auxclick")).event,m=>this.toMouseEvent(m),this.disposables),m=>m.browserEvent.button===1,this.disposables)}get onMouseUp(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"mouseup")).event,m=>this.toMouseEvent(m),this.disposables)}get onMouseDown(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"mousedown")).event,m=>this.toMouseEvent(m),this.disposables)}get onMouseOver(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"mouseover")).event,m=>this.toMouseEvent(m),this.disposables)}get onMouseMove(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"mousemove")).event,m=>this.toMouseEvent(m),this.disposables)}get onMouseOut(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"mouseout")).event,m=>this.toMouseEvent(m),this.disposables)}get onContextMenu(){return S.Event.any(S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"contextmenu")).event,m=>this.toMouseEvent(m),this.disposables),S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,A.EventType.Contextmenu)).event,m=>this.toGestureEvent(m),this.disposables))}get onTouchStart(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.domNode,"touchstart")).event,m=>this.toTouchEvent(m),this.disposables)}get onTap(){return S.Event.map(this.disposables.add(new R.DomEmitter(this.rowsContainer,A.EventType.Tap)).event,m=>this.toGestureEvent(m),this.disposables)}toMouseEvent(m){const w=this.getItemIndexFromEventTarget(m.target||null),D=typeof w>"u"?void 0:this.items[w],y=D&&D.element;return{browserEvent:m,index:w,element:y}}toTouchEvent(m){const w=this.getItemIndexFromEventTarget(m.target||null),D=typeof w>"u"?void 0:this.items[w],y=D&&D.element;return{browserEvent:m,index:w,element:y}}toGestureEvent(m){const w=this.getItemIndexFromEventTarget(m.initialTarget||null),D=typeof w>"u"?void 0:this.items[w],y=D&&D.element;return{browserEvent:m,index:w,element:y}}toDragEvent(m){const w=this.getItemIndexFromEventTarget(m.target||null),D=typeof w>"u"?void 0:this.items[w],y=D&&D.element;return{browserEvent:m,index:w,element:y}}onScroll(m){try{const w=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(w,m.scrollTop,m.height,m.scrollLeft,m.scrollWidth),this.supportDynamicHeights&&this._rerender(m.scrollTop,m.height,m.inSmoothScrolling)}catch(w){throw console.error("Got bad scroll event:",m),w}}onTouchChange(m){m.preventDefault(),m.stopPropagation(),this.scrollTop-=m.translationY}onDragStart(m,w,D){if(!D.dataTransfer)return;const y=this.dnd.getDragElements(m);if(D.dataTransfer.effectAllowed="copyMove",D.dataTransfer.setData(t.DataTransfers.TEXT,w),D.dataTransfer.setDragImage){let T;this.dnd.getDragLabel&&(T=this.dnd.getDragLabel(y,D)),typeof T>"u"&&(T=String(y.length));const _=(0,p.$)(".monaco-drag-image");_.textContent=T,document.body.appendChild(_),D.dataTransfer.setDragImage(_,-10,-10),setTimeout(()=>document.body.removeChild(_),0)}this.domNode.classList.add("dragging"),this.currentDragData=new d(y),l.CurrentDragAndDropData=new n(y),this.dnd.onDragStart?.(this.currentDragData,D)}onDragOver(m){if(m.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),l.CurrentDragAndDropData&&l.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(m.browserEvent),!m.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(l.CurrentDragAndDropData)this.currentDragData=l.CurrentDragAndDropData;else{if(!m.browserEvent.dataTransfer.types)return!1;this.currentDragData=new a}const w=this.dnd.onDragOver(this.currentDragData,m.element,m.index,m.browserEvent);if(this.canDrop=typeof w=="boolean"?w:w.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;m.browserEvent.dataTransfer.dropEffect=typeof w!="boolean"&&w.effect===0?"copy":"move";let D;if(typeof w!="boolean"&&w.feedback?D=w.feedback:typeof m.index>"u"?D=[-1]:D=[m.index],D=(0,E.distinct)(D).filter(y=>y>=-1&&y<this.length).sort((y,T)=>y-T),D=D[0]===-1?[-1]:D,o(this.currentDragFeedback,D))return!0;if(this.currentDragFeedback=D,this.currentDragFeedbackDisposable.dispose(),D[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,C.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const y of D){const T=this.items[y];T.dropTarget=!0,T.row?.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,C.toDisposable)(()=>{for(const y of D){const T=this.items[y];T.dropTarget=!1,T.row?.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(m){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,I.disposableTimeout)(()=>this.clearDragOverFeedback(),100),this.currentDragData&&this.dnd.onDragLeave?.(this.currentDragData,m.element,m.index,m.browserEvent)}onDrop(m){if(!this.canDrop)return;const w=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,l.CurrentDragAndDropData=void 0,!(!w||!m.browserEvent.dataTransfer)&&(m.browserEvent.preventDefault(),w.update(m.browserEvent.dataTransfer),this.dnd.drop(w,m.element,m.index,m.browserEvent))}onDragEnd(m){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,l.CurrentDragAndDropData=void 0,this.dnd.onDragEnd?.(m)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=C.Disposable.None}setupDragAndDropScrollTopAnimation(m){if(!this.dragOverAnimationDisposable){const w=(0,p.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,p.animate)(this.animateDragAndDropScrollTop.bind(this,w))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,I.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=m.pageY}animateDragAndDropScrollTop(m){if(this.dragOverMouseY===void 0)return;const w=this.dragOverMouseY-m,D=this.renderHeight-35;w<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(w-35))):w>D&&(this.scrollTop+=Math.min(14,Math.floor(.3*(w-D))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(m){const w=this.scrollableElement.getDomNode();let D=m;for(;D instanceof HTMLElement&&D!==this.rowsContainer&&w.contains(D);){const y=D.getAttribute("data-index");if(y){const T=Number(y);if(!isNaN(T))return T}D=D.parentElement}}getRenderRange(m,w){return{start:this.rangeMap.indexAt(m),end:this.rangeMap.indexAfter(m+w-1)}}_rerender(m,w,D){const y=this.getRenderRange(m,w);let T,_;m===this.elementTop(y.start)?(T=y.start,_=0):y.end-y.start>1&&(T=y.start+1,_=this.elementTop(T)-m);let L=0;for(;;){const M=this.getRenderRange(m,w);let O=!1;for(let N=M.start;N<M.end;N++){const P=this.probeDynamicHeight(N);P!==0&&this.rangeMap.splice(N,1,[this.items[N]]),L+=P,O=O||P!==0}if(!O){L!==0&&this.eventuallyUpdateScrollDimensions();const N=r.Range.relativeComplement(y,M);for(const B of N)for(let V=B.start;V<B.end;V++)this.items[V].row&&this.removeItemFromDOM(V);const P=r.Range.relativeComplement(M,y);for(const B of P)for(let V=B.start;V<B.end;V++){const z=V+1,x=z<this.items.length?this.items[z].row:null,H=x?x.domNode:null;this.insertItemInDOM(V,H)}for(let B=M.start;B<M.end;B++)this.items[B].row&&this.updateItemInDOM(this.items[B],B);if(typeof T=="number"){const B=this.scrollable.getFutureScrollPosition().scrollTop-m,V=this.elementTop(T)-_+B;this.setScrollTop(V,D)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(m){const w=this.items[m];if(this.virtualDelegate.getDynamicHeight){const _=this.virtualDelegate.getDynamicHeight(w.element);if(_!==null){const L=w.size;return w.size=_,w.lastDynamicHeightWidth=this.renderWidth,_-L}}if(!w.hasDynamicHeight||w.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(w.element))return 0;const D=w.size;if(w.row)return w.row.domNode.style.height="",w.size=w.row.domNode.offsetHeight,w.lastDynamicHeightWidth=this.renderWidth,w.size-D;const y=this.cache.alloc(w.templateId);y.domNode.style.height="",this.rowsContainer.appendChild(y.domNode);const T=this.renderers.get(w.templateId);if(!T)throw new c.BugIndicatingError("Missing renderer for templateId: "+w.templateId);return T.renderElement(w.element,m,y.templateData,void 0),w.size=y.domNode.offsetHeight,T.disposeElement?.(w.element,m,y.templateData,void 0),this.virtualDelegate.setDynamicHeight?.(w.element,w.size),w.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(y.domNode),this.cache.release(y),w.size-D}getNextToLastElement(m){const w=m[m.length-1];if(!w)return null;const D=this.items[w.end];return!D||!D.row?null:D.row.domNode}getElementDomId(m){return`${this.domId}_${m}`}dispose(){if(this.items){for(const m of this.items)if(m.row){const w=this.renderers.get(m.row.templateId);w&&(w.disposeElement?.(m.element,-1,m.row.templateData,void 0),w.disposeTemplate(m.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),(0,C.dispose)(this.disposables)}}h.InstanceCount=0,we([b.memoize],h.prototype,"onMouseClick",null),we([b.memoize],h.prototype,"onMouseDblClick",null),we([b.memoize],h.prototype,"onMouseMiddleClick",null),we([b.memoize],h.prototype,"onMouseUp",null),we([b.memoize],h.prototype,"onMouseDown",null),we([b.memoize],h.prototype,"onMouseOver",null),we([b.memoize],h.prototype,"onMouseMove",null),we([b.memoize],h.prototype,"onMouseOut",null),we([b.memoize],h.prototype,"onContextMenu",null),we([b.memoize],h.prototype,"onTouchStart",null),we([b.memoize],h.prototype,"onTap",null),e.ListView=h}),define(ae[196],le([1,0,10,195,90,133,110,1021,16,11,65,112,6,96,2,194,52,14,13,476,328,716]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.List=e.DefaultStyleController=e.MouseController=e.isSelectionRangeChangeEvent=e.isSelectionSingleChangeEvent=e.DefaultKeyboardNavigationDelegate=e.TypeNavigationMode=e.isButton=e.isMonacoEditor=e.isInputElement=void 0;class a{constructor(K){this.trait=K,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(K){return K}renderElement(K,Y,ee){const ie=this.renderedElements.findIndex(re=>re.templateData===ee);if(ie>=0){const re=this.renderedElements[ie];this.trait.unrender(ee),re.index=Y}else{const re={index:Y,templateData:ee};this.renderedElements.push(re)}this.trait.renderIndex(Y,ee)}splice(K,Y,ee){const ie=[];for(const re of this.renderedElements)re.index<K?ie.push(re):re.index>=K+Y&&ie.push({index:re.index+ee-Y,templateData:re.templateData});this.renderedElements=ie}renderIndexes(K){for(const{index:Y,templateData:ee}of this.renderedElements)K.indexOf(Y)>-1&&this.trait.renderIndex(Y,ee)}disposeTemplate(K){const Y=this.renderedElements.findIndex(ee=>ee.templateData===K);Y<0||this.renderedElements.splice(Y,1)}}class o{get name(){return this._trait}get renderer(){return new a(this)}constructor(K){this._trait=K,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new r.Emitter,this.onChange=this._onChange.event}splice(K,Y,ee){Y=Math.max(0,Math.min(Y,this.length-K));const ie=ee.length-Y,re=K+Y,oe=[...this.sortedIndexes.filter(te=>te<K),...ee.map((te,Z)=>te?Z+K:-1).filter(te=>te!==-1),...this.sortedIndexes.filter(te=>te>=re).map(te=>te+ie)],se=this.length+ie;if(this.sortedIndexes.length>0&&oe.length===0&&se>0){const te=this.sortedIndexes.find(Z=>Z>=K)??se-1;oe.push(Math.min(te,se-1))}this.renderer.splice(K,Y,ee.length),this._set(oe,oe),this.length=se}renderIndex(K,Y){Y.classList.toggle(this._trait,this.contains(K))}unrender(K){K.classList.remove(this._trait)}set(K,Y){return this._set(K,[...K].sort($),Y)}_set(K,Y,ee){const ie=this.indexes,re=this.sortedIndexes;this.indexes=K,this.sortedIndexes=Y;const oe=W(re,K);return this.renderer.renderIndexes(oe),this._onChange.fire({indexes:K,browserEvent:ee}),ie}get(){return this.indexes}contains(K){return(0,I.binarySearch)(this.sortedIndexes,K,$)>=0}dispose(){(0,i.dispose)(this._onChange)}}we([C.memoize],o.prototype,"renderer",null);class g extends o{constructor(K){super("selected"),this.setAriaSelected=K}renderIndex(K,Y){super.renderIndex(K,Y),this.setAriaSelected&&(this.contains(K)?Y.setAttribute("aria-selected","true"):Y.setAttribute("aria-selected","false"))}}class h{constructor(K,Y,ee){this.trait=K,this.view=Y,this.identityProvider=ee}splice(K,Y,ee){if(!this.identityProvider)return this.trait.splice(K,Y,ee.map(()=>!1));const ie=this.trait.get().map(oe=>this.identityProvider.getId(this.view.element(oe)).toString()),re=ee.map(oe=>ie.indexOf(this.identityProvider.getId(oe).toString())>-1);this.trait.splice(K,Y,re)}}function v(j){return j.tagName==="INPUT"||j.tagName==="TEXTAREA"}e.isInputElement=v;function m(j){return j.classList.contains("monaco-editor")?!0:j.classList.contains("monaco-list")||!j.parentElement?!1:m(j.parentElement)}e.isMonacoEditor=m;function w(j){return j.tagName==="A"&&j.classList.contains("monaco-button")||j.tagName==="DIV"&&j.classList.contains("monaco-button-dropdown")?!0:j.classList.contains("monaco-list")||!j.parentElement?!1:w(j.parentElement)}e.isButton=w;class D{get onKeyDown(){return this.disposables.add(r.Event.chain(this.disposables.add(new p.DomEmitter(this.view.domNode,"keydown")).event).filter(K=>!v(K.target)).map(K=>new R.StandardKeyboardEvent(K)))}constructor(K,Y,ee){this.list=K,this.view=Y,this.disposables=new i.DisposableStore,this.multipleSelectionDisposables=new i.DisposableStore,this.onKeyDown.filter(ie=>ie.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(ie=>ie.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(ie=>ie.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(ie=>ie.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(ie=>ie.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(ie=>ie.keyCode===9).on(this.onEscape,this,this.disposables),ee.multipleSelectionSupport!==!1&&this.onKeyDown.filter(ie=>(l.isMacintosh?ie.metaKey:ie.ctrlKey)&&ie.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}updateOptions(K){K.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),K.multipleSelectionSupport&&this.onKeyDown.filter(Y=>(l.isMacintosh?Y.metaKey:Y.ctrlKey)&&Y.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(K){K.preventDefault(),K.stopPropagation(),this.list.setSelection(this.list.getFocus(),K.browserEvent)}onUpArrow(K){K.preventDefault(),K.stopPropagation(),this.list.focusPrevious(1,!1,K.browserEvent);const Y=this.list.getFocus()[0];this.list.setAnchor(Y),this.list.reveal(Y),this.view.domNode.focus()}onDownArrow(K){K.preventDefault(),K.stopPropagation(),this.list.focusNext(1,!1,K.browserEvent);const Y=this.list.getFocus()[0];this.list.setAnchor(Y),this.list.reveal(Y),this.view.domNode.focus()}onPageUpArrow(K){K.preventDefault(),K.stopPropagation(),this.list.focusPreviousPage(K.browserEvent);const Y=this.list.getFocus()[0];this.list.setAnchor(Y),this.list.reveal(Y),this.view.domNode.focus()}onPageDownArrow(K){K.preventDefault(),K.stopPropagation(),this.list.focusNextPage(K.browserEvent);const Y=this.list.getFocus()[0];this.list.setAnchor(Y),this.list.reveal(Y),this.view.domNode.focus()}onCtrlA(K){K.preventDefault(),K.stopPropagation(),this.list.setSelection((0,I.range)(this.list.length),K.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(K){this.list.getSelection().length&&(K.preventDefault(),K.stopPropagation(),this.list.setSelection([],K.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}we([C.memoize],D.prototype,"onKeyDown",null);var y;(function(j){j[j.Automatic=0]="Automatic",j[j.Trigger=1]="Trigger"})(y=e.TypeNavigationMode||(e.TypeNavigationMode={}));var T;(function(j){j[j.Idle=0]="Idle",j[j.Typing=1]="Typing"})(T||(T={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(j){return j.ctrlKey||j.metaKey||j.altKey?!1:j.keyCode>=31&&j.keyCode<=56||j.keyCode>=21&&j.keyCode<=30||j.keyCode>=93&&j.keyCode<=102||j.keyCode>=80&&j.keyCode<=90}};class _{constructor(K,Y,ee,ie,re){this.list=K,this.view=Y,this.keyboardNavigationLabelProvider=ee,this.keyboardNavigationEventFilter=ie,this.delegate=re,this.enabled=!1,this.state=T.Idle,this.mode=y.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new i.DisposableStore,this.disposables=new i.DisposableStore,this.updateOptions(K.options)}updateOptions(K){K.typeNavigationEnabled??!0?this.enable():this.disable(),this.mode=K.typeNavigationMode??y.Automatic}trigger(){this.triggered=!this.triggered}enable(){if(this.enabled)return;let K=!1;const Y=this.enabledDisposables.add(r.Event.chain(this.enabledDisposables.add(new p.DomEmitter(this.view.domNode,"keydown")).event)).filter(re=>!v(re.target)).filter(()=>this.mode===y.Automatic||this.triggered).map(re=>new R.StandardKeyboardEvent(re)).filter(re=>K||this.keyboardNavigationEventFilter(re)).filter(re=>this.delegate.mightProducePrintableCharacter(re)).forEach(re=>t.EventHelper.stop(re,!0)).map(re=>re.browserEvent.key).event,ee=r.Event.debounce(Y,()=>null,800,void 0,void 0,this.enabledDisposables);r.Event.reduce(r.Event.any(Y,ee),(re,oe)=>oe===null?null:(re||"")+oe,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),ee(this.onClear,this,this.enabledDisposables),Y(()=>K=!0,void 0,this.enabledDisposables),ee(()=>K=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){!this.enabled||(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){const K=this.list.getFocus();if(K.length>0&&K[0]===this.previouslyFocused){const Y=this.list.options.accessibilityProvider?.getAriaLabel(this.list.element(K[0]));Y&&(0,k.alert)(Y)}this.previouslyFocused=-1}onInput(K){if(!K){this.state=T.Idle,this.triggered=!1;return}const Y=this.list.getFocus(),ee=Y.length>0?Y[0]:0,ie=this.state===T.Idle?1:0;this.state=T.Typing;for(let re=0;re<this.list.length;re++){const oe=(ee+re+ie)%this.list.length,se=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(oe)),te=se&&se.toString();if(typeof te>"u"||(0,u.matchesPrefix)(K,te)){this.previouslyFocused=ee,this.list.setFocus([oe]),this.list.reveal(oe);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class L{constructor(K,Y){this.list=K,this.view=Y,this.disposables=new i.DisposableStore,this.disposables.add(r.Event.chain(this.disposables.add(new p.DomEmitter(Y.domNode,"keydown")).event)).filter(ie=>!v(ie.target)).map(ie=>new R.StandardKeyboardEvent(ie)).filter(ie=>ie.keyCode===2&&!ie.ctrlKey&&!ie.metaKey&&!ie.shiftKey&&!ie.altKey).on(this.onTab,this,this.disposables)}onTab(K){if(K.target!==this.view.domNode)return;const Y=this.list.getFocus();if(Y.length===0)return;const ee=this.view.domElement(Y[0]);if(!ee)return;const ie=ee.querySelector("[tabIndex]");if(!ie||!(ie instanceof HTMLElement)||ie.tabIndex===-1)return;const re=window.getComputedStyle(ie);re.visibility==="hidden"||re.display==="none"||(K.preventDefault(),K.stopPropagation(),ie.focus())}dispose(){this.disposables.dispose()}}function M(j){return l.isMacintosh?j.browserEvent.metaKey:j.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=M;function O(j){return j.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=O;function N(j){return j instanceof MouseEvent&&j.button===2}const P={isSelectionSingleChangeEvent:M,isSelectionRangeChangeEvent:O};class B{constructor(K){this.list=K,this.disposables=new i.DisposableStore,this._onPointer=new r.Emitter,this.onPointer=this._onPointer.event,K.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P),this.mouseSupport=typeof K.options.mouseSupport>"u"||!!K.options.mouseSupport,this.mouseSupport&&(K.onMouseDown(this.onMouseDown,this,this.disposables),K.onContextMenu(this.onContextMenu,this,this.disposables),K.onMouseDblClick(this.onDoubleClick,this,this.disposables),K.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(A.Gesture.addTarget(K.getHTMLElement()))),r.Event.any(K.onMouseClick,K.onMouseMiddleClick,K.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(K){K.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,K.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P))}isSelectionSingleChangeEvent(K){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(K):!1}isSelectionRangeChangeEvent(K){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(K):!1}isSelectionChangeEvent(K){return this.isSelectionSingleChangeEvent(K)||this.isSelectionRangeChangeEvent(K)}onMouseDown(K){m(K.browserEvent.target)||document.activeElement!==K.browserEvent.target&&this.list.domFocus()}onContextMenu(K){if(m(K.browserEvent.target))return;const Y=typeof K.index>"u"?[]:[K.index];this.list.setFocus(Y,K.browserEvent)}onViewPointer(K){if(!this.mouseSupport||v(K.browserEvent.target)||m(K.browserEvent.target))return;const Y=K.index;if(typeof Y>"u"){this.list.setFocus([],K.browserEvent),this.list.setSelection([],K.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(K))return this.changeSelection(K);if(this.isSelectionChangeEvent(K))return this.changeSelection(K);this.list.setFocus([Y],K.browserEvent),this.list.setAnchor(Y),N(K.browserEvent)||this.list.setSelection([Y],K.browserEvent),this._onPointer.fire(K)}onDoubleClick(K){if(v(K.browserEvent.target)||m(K.browserEvent.target)||this.isSelectionChangeEvent(K))return;const Y=this.list.getFocus();this.list.setSelection(Y,K.browserEvent)}changeSelection(K){const Y=K.index;let ee=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(K)){typeof ee>"u"&&(ee=this.list.getFocus()[0]??Y,this.list.setAnchor(ee));const ie=Math.min(ee,Y),re=Math.max(ee,Y),oe=(0,I.range)(ie,re+1),se=this.list.getSelection(),te=H(W(se,[ee]),ee);if(te.length===0)return;const Z=W(oe,U(se,te));this.list.setSelection(Z,K.browserEvent),this.list.setFocus([Y],K.browserEvent)}else if(this.isSelectionSingleChangeEvent(K)){const ie=this.list.getSelection(),re=ie.filter(oe=>oe!==Y);this.list.setFocus([Y]),this.list.setAnchor(Y),ie.length===re.length?this.list.setSelection([...re,Y],K.browserEvent):this.list.setSelection(re,K.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=B;class V{constructor(K,Y){this.styleElement=K,this.selectorSuffix=Y}style(K){const Y=this.selectorSuffix&&`.${this.selectorSuffix}`,ee=[];K.listBackground&&(K.listBackground.isOpaque()?ee.push(`.monaco-list${Y} .monaco-list-rows { background: ${K.listBackground}; }`):l.isMacintosh||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),K.listFocusBackground&&(ee.push(`.monaco-list${Y}:focus .monaco-list-row.focused { background-color: ${K.listFocusBackground}; }`),ee.push(`.monaco-list${Y}:focus .monaco-list-row.focused:hover { background-color: ${K.listFocusBackground}; }`)),K.listFocusForeground&&ee.push(`.monaco-list${Y}:focus .monaco-list-row.focused { color: ${K.listFocusForeground}; }`),K.listActiveSelectionBackground&&(ee.push(`.monaco-list${Y}:focus .monaco-list-row.selected { background-color: ${K.listActiveSelectionBackground}; }`),ee.push(`.monaco-list${Y}:focus .monaco-list-row.selected:hover { background-color: ${K.listActiveSelectionBackground}; }`)),K.listActiveSelectionForeground&&ee.push(`.monaco-list${Y}:focus .monaco-list-row.selected { color: ${K.listActiveSelectionForeground}; }`),K.listActiveSelectionIconForeground&&ee.push(`.monaco-list${Y}:focus .monaco-list-row.selected .codicon { color: ${K.listActiveSelectionIconForeground}; }`),K.listFocusAndSelectionOutline&&ee.push(`.monaco-list${Y}:focus .monaco-list-row.selected { outline-color: ${K.listFocusAndSelectionOutline} !important; }`),K.listFocusAndSelectionBackground&&ee.push(` .monaco-drag-image, .monaco-list${Y}:focus .monaco-list-row.selected.focused { background-color: ${K.listFocusAndSelectionBackground}; } `),K.listFocusAndSelectionForeground&&ee.push(` .monaco-drag-image, .monaco-list${Y}:focus .monaco-list-row.selected.focused { color: ${K.listFocusAndSelectionForeground}; } `),K.listInactiveFocusForeground&&(ee.push(`.monaco-list${Y} .monaco-list-row.focused { color: ${K.listInactiveFocusForeground}; }`),ee.push(`.monaco-list${Y} .monaco-list-row.focused:hover { color: ${K.listInactiveFocusForeground}; }`)),K.listInactiveSelectionIconForeground&&ee.push(`.monaco-list${Y} .monaco-list-row.focused .codicon { color: ${K.listInactiveSelectionIconForeground}; }`),K.listInactiveFocusBackground&&(ee.push(`.monaco-list${Y} .monaco-list-row.focused { background-color: ${K.listInactiveFocusBackground}; }`),ee.push(`.monaco-list${Y} .monaco-list-row.focused:hover { background-color: ${K.listInactiveFocusBackground}; }`)),K.listInactiveSelectionBackground&&(ee.push(`.monaco-list${Y} .monaco-list-row.selected { background-color: ${K.listInactiveSelectionBackground}; }`),ee.push(`.monaco-list${Y} .monaco-list-row.selected:hover { background-color: ${K.listInactiveSelectionBackground}; }`)),K.listInactiveSelectionForeground&&ee.push(`.monaco-list${Y} .monaco-list-row.selected { color: ${K.listInactiveSelectionForeground}; }`),K.listHoverBackground&&ee.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${K.listHoverBackground}; }`),K.listHoverForeground&&ee.push(`.monaco-list${Y}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${K.listHoverForeground}; }`),K.listSelectionOutline&&ee.push(`.monaco-list${Y} .monaco-list-row.selected { outline: 1px dotted ${K.listSelectionOutline}; outline-offset: -1px; }`),K.listFocusOutline&&ee.push(` .monaco-drag-image, .monaco-list${Y}:focus .monaco-list-row.focused { outline: 1px solid ${K.listFocusOutline}; outline-offset: -1px; } .monaco-workbench.context-menu-visible .monaco-list${Y}.last-focused .monaco-list-row.focused { outline: 1px solid ${K.listFocusOutline}; outline-offset: -1px; } `),K.listInactiveFocusOutline&&ee.push(`.monaco-list${Y} .monaco-list-row.focused { outline: 1px dotted ${K.listInactiveFocusOutline}; outline-offset: -1px; }`),K.listHoverOutline&&ee.push(`.monaco-list${Y} .monaco-list-row:hover { outline: 1px dashed ${K.listHoverOutline}; outline-offset: -1px; }`),K.listDropBackground&&ee.push(` .monaco-list${Y}.drop-target, .monaco-list${Y} .monaco-list-rows.drop-target, .monaco-list${Y} .monaco-list-row.drop-target { background-color: ${K.listDropBackground} !important; color: inherit !important; } `),K.tableColumnsBorder&&ee.push(` .monaco-table:hover > .monaco-split-view2, .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { border-color: ${K.tableColumnsBorder}; }`),K.tableOddRowsBackgroundColor&&ee.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: ${K.tableOddRowsBackgroundColor}; } `),this.styleElement.textContent=ee.join(` `)}}e.DefaultStyleController=V;const z={listFocusBackground:S.Color.fromHex("#7FB0D0"),listActiveSelectionBackground:S.Color.fromHex("#0E639C"),listActiveSelectionForeground:S.Color.fromHex("#FFFFFF"),listActiveSelectionIconForeground:S.Color.fromHex("#FFFFFF"),listFocusAndSelectionOutline:S.Color.fromHex("#90C2F9"),listFocusAndSelectionBackground:S.Color.fromHex("#094771"),listFocusAndSelectionForeground:S.Color.fromHex("#FFFFFF"),listInactiveSelectionBackground:S.Color.fromHex("#3F3F46"),listInactiveSelectionIconForeground:S.Color.fromHex("#FFFFFF"),listHoverBackground:S.Color.fromHex("#2A2D2E"),listDropBackground:S.Color.fromHex("#383B3D"),treeIndentGuidesStroke:S.Color.fromHex("#a9a9a9"),tableColumnsBorder:S.Color.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:S.Color.fromHex("#cccccc").transparent(.04)},x={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function H(j,K){const Y=j.indexOf(K);if(Y===-1)return[];const ee=[];let ie=Y-1;for(;ie>=0&&j[ie]===K-(Y-ie);)ee.push(j[ie--]);for(ee.reverse(),ie=Y;ie<j.length&&j[ie]===K+(ie-Y);)ee.push(j[ie++]);return ee}function W(j,K){const Y=[];let ee=0,ie=0;for(;ee<j.length||ie<K.length;)if(ee>=j.length)Y.push(K[ie++]);else if(ie>=K.length)Y.push(j[ee++]);else if(j[ee]===K[ie]){Y.push(j[ee]),ee++,ie++;continue}else j[ee]<K[ie]?Y.push(j[ee++]):Y.push(K[ie++]);return Y}function U(j,K){const Y=[];let ee=0,ie=0;for(;ee<j.length||ie<K.length;)if(ee>=j.length)Y.push(K[ie++]);else if(ie>=K.length)Y.push(j[ee++]);else if(j[ee]===K[ie]){ee++,ie++;continue}else j[ee]<K[ie]?Y.push(j[ee++]):ie++;return Y}const $=(j,K)=>j-K;class q{constructor(K,Y){this._templateId=K,this.renderers=Y}get templateId(){return this._templateId}renderTemplate(K){return this.renderers.map(Y=>Y.renderTemplate(K))}renderElement(K,Y,ee,ie){let re=0;for(const oe of this.renderers)oe.renderElement(K,Y,ee[re++],ie)}disposeElement(K,Y,ee,ie){let re=0;for(const oe of this.renderers)oe.disposeElement?.(K,Y,ee[re],ie),re+=1}disposeTemplate(K){let Y=0;for(const ee of this.renderers)ee.disposeTemplate(K[Y++])}}class X{constructor(K){this.accessibilityProvider=K,this.templateId="a18n"}renderTemplate(K){return K}renderElement(K,Y,ee){const ie=this.accessibilityProvider.getAriaLabel(K);ie?ee.setAttribute("aria-label",ie):ee.removeAttribute("aria-label");const re=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(K);typeof re=="number"?ee.setAttribute("aria-level",`${re}`):ee.removeAttribute("aria-level")}disposeTemplate(K){}}class G{constructor(K,Y){this.list=K,this.dnd=Y}getDragElements(K){const Y=this.list.getSelectedElements();return Y.indexOf(K)>-1?Y:[K]}getDragURI(K){return this.dnd.getDragURI(K)}getDragLabel(K,Y){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(K,Y)}onDragStart(K,Y){this.dnd.onDragStart?.(K,Y)}onDragOver(K,Y,ee,ie){return this.dnd.onDragOver(K,Y,ee,ie)}onDragLeave(K,Y,ee,ie){this.dnd.onDragLeave?.(K,Y,ee,ie)}onDragEnd(K){this.dnd.onDragEnd?.(K)}drop(K,Y,ee,ie){this.dnd.drop(K,Y,ee,ie)}}class Q{get onDidChangeFocus(){return r.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),K=>this.toListEvent(K),this.disposables)}get onDidChangeSelection(){return r.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),K=>this.toListEvent(K),this.disposables)}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 K=!1;const Y=this.disposables.add(r.Event.chain(this.disposables.add(new p.DomEmitter(this.view.domNode,"keydown")).event)).map(re=>new R.StandardKeyboardEvent(re)).filter(re=>K=re.keyCode===58||re.shiftKey&&re.keyCode===68).map(re=>t.EventHelper.stop(re,!0)).filter(()=>!1).event,ee=this.disposables.add(r.Event.chain(this.disposables.add(new p.DomEmitter(this.view.domNode,"keyup")).event)).forEach(()=>K=!1).map(re=>new R.StandardKeyboardEvent(re)).filter(re=>re.keyCode===58||re.shiftKey&&re.keyCode===68).map(re=>t.EventHelper.stop(re,!0)).map(({browserEvent:re})=>{const oe=this.getFocus(),se=oe.length?oe[0]:void 0,te=typeof se<"u"?this.view.element(se):void 0,Z=typeof se<"u"?this.view.domElement(se):this.view.domNode;return{index:se,element:te,anchor:Z,browserEvent:re}}).event,ie=this.disposables.add(r.Event.chain(this.view.onContextMenu)).filter(re=>!K).map(({element:re,index:oe,browserEvent:se})=>({element:re,index:oe,anchor:{x:se.pageX+1,y:se.pageY},browserEvent:se})).event;return r.Event.any(Y,ee,ie)}get onKeyDown(){return this.disposables.add(new p.DomEmitter(this.view.domNode,"keydown")).event}get onKeyUp(){return this.disposables.add(new p.DomEmitter(this.view.domNode,"keyup")).event}get onKeyPress(){return this.disposables.add(new p.DomEmitter(this.view.domNode,"keypress")).event}get onDidFocus(){return r.Event.signal(this.disposables.add(new p.DomEmitter(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return r.Event.signal(this.disposables.add(new p.DomEmitter(this.view.domNode,"blur",!0)).event)}constructor(K,Y,ee,ie,re=x){this.user=K,this._options=re,this.focus=new o("focused"),this.anchor=new o("anchor"),this.eventBufferer=new r.EventBufferer,this._ariaLabel="",this.disposables=new i.DisposableStore,this._onDidDispose=new r.Emitter,this.onDidDispose=this._onDidDispose.event;const oe=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new g(oe!=="listbox"),(0,c.mixin)(re,z,!1);const se=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=re.accessibilityProvider,this.accessibilityProvider&&(se.push(new X(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),ie=ie.map(Z=>new q(Z.templateId,[...se,Z]));const te={...re,dnd:re.dnd&&new G(this,re.dnd)};if(this.view=new n.ListView(Y,ee,ie,te),this.view.domNode.setAttribute("role",oe),re.styleController)this.styleController=re.styleController(this.view.domId);else{const Z=(0,t.createStyleSheet)(this.view.domNode);this.styleController=new V(Z,this.view.domId)}if(this.spliceable=new E.CombinedSpliceable([new h(this.focus,this.view,re.identityProvider),new h(this.selection,this.view,re.identityProvider),new h(this.anchor,this.view,re.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 L(this,this.view)),(typeof re.keyboardSupport!="boolean"||re.keyboardSupport)&&(this.keyboardController=new D(this,this.view,re),this.disposables.add(this.keyboardController)),re.keyboardNavigationLabelProvider){const Z=re.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new _(this,this.view,re.keyboardNavigationLabelProvider,re.keyboardNavigationEventFilter??(()=>!0),Z),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(re),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")}createMouseController(K){return new B(this)}updateOptions(K={}){this._options={...this._options,...K},this.typeNavigationController?.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(K),this.keyboardController?.updateOptions(K),this.view.updateOptions(K)}get options(){return this._options}splice(K,Y,ee=[]){if(K<0||K>this.view.length)throw new d.ListError(this.user,`Invalid start index: ${K}`);if(Y<0)throw new d.ListError(this.user,`Invalid delete count: ${Y}`);Y===0&&ee.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(K,Y,ee))}updateWidth(K){this.view.updateWidth(K)}updateElementHeight(K,Y){this.view.updateElementHeight(K,Y,null)}rerender(){this.view.rerender()}element(K){return this.view.element(K)}indexOf(K){return this.view.indexOf(K)}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(K){this.view.setScrollTop(K)}get scrollLeft(){return this.view.getScrollLeft()}set scrollLeft(K){this.view.setScrollLeft(K)}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(K){this._ariaLabel=K,this.view.domNode.setAttribute("aria-label",K)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(K,Y){this.view.layout(K,Y)}triggerTypeNavigation(){this.typeNavigationController?.trigger()}setSelection(K,Y){for(const ee of K)if(ee<0||ee>=this.length)throw new d.ListError(this.user,`Invalid index ${ee}`);this.selection.set(K,Y)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(K=>this.view.element(K))}setAnchor(K){if(typeof K>"u"){this.anchor.set([]);return}if(K<0||K>=this.length)throw new d.ListError(this.user,`Invalid index ${K}`);this.anchor.set([K])}getAnchor(){return(0,I.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const K=this.getAnchor();return typeof K>"u"?void 0:this.element(K)}setFocus(K,Y){for(const ee of K)if(ee<0||ee>=this.length)throw new d.ListError(this.user,`Invalid index ${ee}`);this.focus.set(K,Y)}focusNext(K=1,Y=!1,ee,ie){if(this.length===0)return;const re=this.focus.get(),oe=this.findNextIndex(re.length>0?re[0]+K:0,Y,ie);oe>-1&&this.setFocus([oe],ee)}focusPrevious(K=1,Y=!1,ee,ie){if(this.length===0)return;const re=this.focus.get(),oe=this.findPreviousIndex(re.length>0?re[0]-K:0,Y,ie);oe>-1&&this.setFocus([oe],ee)}async focusNextPage(K,Y){let ee=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);ee=ee===0?0:ee-1;const ie=this.getFocus()[0];if(ie!==ee&&(ie===void 0||ee>ie)){const re=this.findPreviousIndex(ee,!1,Y);re>-1&&ie!==re?this.setFocus([re],K):this.setFocus([ee],K)}else{const re=this.view.getScrollTop();let oe=re+this.view.renderHeight;ee>ie&&(oe-=this.view.elementHeight(ee)),this.view.setScrollTop(oe),this.view.getScrollTop()!==re&&(this.setFocus([]),await(0,b.timeout)(0),await this.focusNextPage(K,Y))}}async focusPreviousPage(K,Y){let ee;const ie=this.view.getScrollTop();ie===0?ee=this.view.indexAt(ie):ee=this.view.indexAfter(ie-1);const re=this.getFocus()[0];if(re!==ee&&(re===void 0||re>=ee)){const oe=this.findNextIndex(ee,!1,Y);oe>-1&&re!==oe?this.setFocus([oe],K):this.setFocus([ee],K)}else{const oe=ie;this.view.setScrollTop(ie-this.view.renderHeight),this.view.getScrollTop()!==oe&&(this.setFocus([]),await(0,b.timeout)(0),await this.focusPreviousPage(K,Y))}}focusLast(K,Y){if(this.length===0)return;const ee=this.findPreviousIndex(this.length-1,!1,Y);ee>-1&&this.setFocus([ee],K)}focusFirst(K,Y){this.focusNth(0,K,Y)}focusNth(K,Y,ee){if(this.length===0)return;const ie=this.findNextIndex(K,!1,ee);ie>-1&&this.setFocus([ie],Y)}findNextIndex(K,Y=!1,ee){for(let ie=0;ie<this.length;ie++){if(K>=this.length&&!Y)return-1;if(K=K%this.length,!ee||ee(this.element(K)))return K;K++}return-1}findPreviousIndex(K,Y=!1,ee){for(let ie=0;ie<this.length;ie++){if(K<0&&!Y)return-1;if(K=(this.length+K%this.length)%this.length,!ee||ee(this.element(K)))return K;K--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(K=>this.view.element(K))}reveal(K,Y){if(K<0||K>=this.length)throw new d.ListError(this.user,`Invalid index ${K}`);const ee=this.view.getScrollTop(),ie=this.view.elementTop(K),re=this.view.elementHeight(K);if((0,s.isNumber)(Y)){const oe=re-this.view.renderHeight;this.view.setScrollTop(oe*(0,f.clamp)(Y,0,1)+ie)}else{const oe=ie+re,se=ee+this.view.renderHeight;ie<ee&&oe>=se||(ie<ee||oe>=se&&re>=this.view.renderHeight?this.view.setScrollTop(ie):oe>=se&&this.view.setScrollTop(oe-this.view.renderHeight))}}getRelativeTop(K){if(K<0||K>=this.length)throw new d.ListError(this.user,`Invalid index ${K}`);const Y=this.view.getScrollTop(),ee=this.view.elementTop(K),ie=this.view.elementHeight(K);if(ee<Y||ee+ie>Y+this.view.renderHeight)return null;const re=ie-this.view.renderHeight;return Math.abs((Y-ee)/re)}isDOMFocused(){return this.view.domNode===document.activeElement}getHTMLElement(){return this.view.domNode}getElementID(K){return this.view.getElementDomId(K)}style(K){this.styleController.style(K)}toListEvent({indexes:K,browserEvent:Y}){return{indexes:K,elements:K.map(ee=>this.view.element(ee)),browserEvent:Y}}_onFocusChange(){const K=this.focus.get();this.view.domNode.classList.toggle("element-focused",K.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){const K=this.focus.get();if(K.length>0){let Y;this.accessibilityProvider?.getActiveDescendantId&&(Y=this.accessibilityProvider.getActiveDescendantId(this.view.element(K[0]))),this.view.domNode.setAttribute("aria-activedescendant",Y||this.view.getElementDomId(K[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const K=this.selection.get();this.view.domNode.classList.toggle("selection-none",K.length===0),this.view.domNode.classList.toggle("selection-single",K.length===1),this.view.domNode.classList.toggle("selection-multiple",K.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}we([C.memoize],Q.prototype,"onDidChangeFocus",null),we([C.memoize],Q.prototype,"onDidChangeSelection",null),we([C.memoize],Q.prototype,"onContextMenu",null),we([C.memoize],Q.prototype,"onKeyDown",null),we([C.memoize],Q.prototype,"onKeyUp",null),we([C.memoize],Q.prototype,"onKeyPress",null),we([C.memoize],Q.prototype,"onDidFocus",null),we([C.memoize],Q.prototype,"onDidBlur",null),e.List=Q}),define(ae[752],le([1,0,16,32,6,2,196,716]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class E{get templateId(){return this.renderer.templateId}constructor(r,u){this.renderer=r,this.modelProvider=u}renderTemplate(r){return{data:this.renderer.renderTemplate(r),disposable:A.Disposable.None}}renderElement(r,u,i,f){if(i.disposable?.dispose(),!i.data)return;const c=this.modelProvider();if(c.isResolved(r))return this.renderer.renderElement(c.get(r),r,i.data,f);const l=new p.CancellationTokenSource,s=c.resolve(r,l.token);i.disposable={dispose:()=>l.cancel()},this.renderer.renderPlaceholder(r,i.data),s.then(d=>this.renderer.renderElement(d,r,i.data,f))}disposeTemplate(r){r.disposable&&(r.disposable.dispose(),r.disposable=void 0),r.data&&(this.renderer.disposeTemplate(r.data),r.data=void 0)}}class I{constructor(r,u){this.modelProvider=r,this.accessibilityProvider=u}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(r){const u=this.modelProvider();return u.isResolved(r)?this.accessibilityProvider.getAriaLabel(u.get(r)):null}}function b(C,r){return{...r,accessibilityProvider:r.accessibilityProvider&&new I(C,r.accessibilityProvider)}}class S{constructor(r,u,i,f,c={}){const l=()=>this.model,s=f.map(d=>new E(d,l));this.list=new k.List(r,u,i,s,b(l,c))}updateOptions(r){this.list.updateOptions(r)}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 R.Event.map(this.list.onMouseClick,({element:r,index:u,browserEvent:i})=>({element:r===void 0?void 0:this._model.get(r),index:u,browserEvent:i}))}get onMouseDblClick(){return R.Event.map(this.list.onMouseDblClick,({element:r,index:u,browserEvent:i})=>({element:r===void 0?void 0:this._model.get(r),index:u,browserEvent:i}))}get onTap(){return R.Event.map(this.list.onTap,({element:r,index:u,browserEvent:i})=>({element:r===void 0?void 0:this._model.get(r),index:u,browserEvent:i}))}get onPointer(){return R.Event.map(this.list.onPointer,({element:r,index:u,browserEvent:i})=>({element:r===void 0?void 0:this._model.get(r),index:u,browserEvent:i}))}get onDidChangeFocus(){return R.Event.map(this.list.onDidChangeFocus,({elements:r,indexes:u,browserEvent:i})=>({elements:r.map(f=>this._model.get(f)),indexes:u,browserEvent:i}))}get onDidChangeSelection(){return R.Event.map(this.list.onDidChangeSelection,({elements:r,indexes:u,browserEvent:i})=>({elements:r.map(f=>this._model.get(f)),indexes:u,browserEvent:i}))}get onContextMenu(){return R.Event.map(this.list.onContextMenu,({element:r,index:u,anchor:i,browserEvent:f})=>typeof r>"u"?{element:r,index:u,anchor:i,browserEvent:f}:{element:this._model.get(r),index:u,anchor:i,browserEvent:f})}get model(){return this._model}set model(r){this._model=r,this.list.splice(0,this.list.length,(0,t.range)(r.length))}get length(){return this.list.length}get scrollTop(){return this.list.scrollTop}set scrollTop(r){this.list.scrollTop=r}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(r){this.list.scrollLeft=r}setAnchor(r){this.list.setAnchor(r)}getAnchor(){return this.list.getAnchor()}setFocus(r){this.list.setFocus(r)}focusNext(r,u){this.list.focusNext(r,u)}focusPrevious(r,u){this.list.focusPrevious(r,u)}focusNextPage(){return this.list.focusNextPage()}focusPreviousPage(){return this.list.focusPreviousPage()}focusLast(){this.list.focusLast()}focusFirst(){this.list.focusFirst()}getFocus(){return this.list.getFocus()}setSelection(r,u){this.list.setSelection(r,u)}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(r=>this.model.get(r))}layout(r,u){this.list.layout(r,u)}triggerTypeNavigation(){this.list.triggerTypeNavigation()}reveal(r,u){this.list.reveal(r,u)}style(r){this.list.style(r)}dispose(){this.list.dispose()}}e.PagedList=S}),define(ae[221],le([1,0,10,195,278,147,16,65,6,2,194,486,13,278,1051]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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 u.Orientation}});const i={separatorBorder:E.Color.transparent};var f;(function(o){o[o.Normal=0]="Normal",o[o.Low=1]="Low",o[o.High=2]="High"})(f=e.LayoutPriority||(e.LayoutPriority={}));class c{set size(g){this._size=g}get size(){return this._size}get cachedVisibleSize(){return this._cachedVisibleSize}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(g,h){g!==this.visible&&(g?(this.size=(0,S.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",g),this.view.setVisible?.(g))}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(g){this.container.style.pointerEvents=g?"":"none"}constructor(g,h,v,m){this.container=g,this.view=h,this.disposable=m,this._cachedVisibleSize=void 0,typeof v=="number"?(this._size=v,this._cachedVisibleSize=void 0,g.classList.add("visible")):(this._size=0,this._cachedVisibleSize=v.cachedVisibleSize)}layout(g,h){this.layoutContainer(g),this.view.layout(this.size,g,h)}dispose(){return this.disposable.dispose(),this.view}}class l extends c{layoutContainer(g){this.container.style.top=`${g}px`,this.container.style.height=`${this.size}px`}}class s extends c{layoutContainer(g){this.container.style.left=`${g}px`,this.container.style.width=`${this.size}px`}}var d;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(d||(d={}));var n;(function(o){o.Distribute={type:"distribute"};function g(v){return{type:"split",index:v}}o.Split=g;function h(v){return{type:"invisible",cachedVisibleSize:v}}o.Invisible=h})(n=e.Sizing||(e.Sizing={}));class a extends b.Disposable{get length(){return this.viewItems.length}get minimumSize(){return this.viewItems.reduce((g,h)=>g+h.minimumSize,0)}get maximumSize(){return this.length===0?Number.POSITIVE_INFINITY:this.viewItems.reduce((g,h)=>g+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(g){for(const h of this.sashItems)h.sash.orthogonalStartSash=g;this._orthogonalStartSash=g}set orthogonalEndSash(g){for(const h of this.sashItems)h.sash.orthogonalEndSash=g;this._orthogonalEndSash=g}get sashes(){return this.sashItems.map(g=>g.sash)}set startSnappingEnabled(g){this._startSnappingEnabled!==g&&(this._startSnappingEnabled=g,this.updateSashEnablement())}set endSnappingEnabled(g){this._endSnappingEnabled!==g&&(this._endSnappingEnabled=g,this.updateSashEnablement())}constructor(g,h={}){super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=d.Idle,this._onDidSashChange=this._register(new I.Emitter),this._onDidSashReset=this._register(new I.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"),g.appendChild(this.el),this.sashContainer=(0,t.append)(this.el,(0,t.$)(".sash-container")),this.viewContainer=(0,t.$)(".split-view-container"),this.scrollable=new C.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:t.scheduleAtNextAnimationFrame}),this.scrollableElement=this._register(new A.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?h.scrollbarVisibility??1:2,horizontal:this.orientation===1?h.scrollbarVisibility??1:2},this.scrollable));const v=this._register(new p.DomEmitter(this.viewContainer,"scroll")).event;this._register(v(m=>{const w=this.scrollableElement.getScrollPosition(),D=Math.abs(this.viewContainer.scrollLeft-w.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,y=Math.abs(this.viewContainer.scrollTop-w.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(D!==void 0||y!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:D,scrollTop:y})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(m=>{m.scrollTopChanged&&(this.viewContainer.scrollTop=m.scrollTop),m.scrollLeftChanged&&(this.viewContainer.scrollLeft=m.scrollLeft)})),(0,t.append)(this.el,this.scrollableElement.getDomNode()),this.style(h.styles||i),h.descriptor&&(this.size=h.descriptor.size,h.descriptor.views.forEach((m,w)=>{const D=r.isUndefined(m.visible)||m.visible?m.size:{type:"invisible",cachedVisibleSize:m.size},y=m.view;this.doAddView(y,D,w,!0)}),this.contentSize=this.viewItems.reduce((m,w)=>m+w.size,0),this.saveProportions())}style(g){g.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",g.separatorBorder.toString()))}addView(g,h,v=this.viewItems.length,m){this.doAddView(g,h,v,m)}removeView(g,h){if(this.state!==d.Idle)throw new Error("Cant modify splitview");if(this.state=d.Busy,g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");const m=this.viewItems.splice(g,1)[0].dispose();if(this.viewItems.length>=1){const w=Math.max(g-1,0);this.sashItems.splice(w,1)[0].disposable.dispose()}return this.relayout(),this.state=d.Idle,h?.type==="distribute"&&this.distributeViewSizes(),m}moveView(g,h){if(this.state!==d.Idle)throw new Error("Cant modify splitview");const v=this.getViewCachedVisibleSize(g),m=typeof v>"u"?this.getViewSize(g):n.Invisible(v),w=this.removeView(g);this.addView(w,m,h)}swapViews(g,h){if(this.state!==d.Idle)throw new Error("Cant modify splitview");if(g>h)return this.swapViews(h,g);const v=this.getViewSize(g),m=this.getViewSize(h),w=this.removeView(h),D=this.removeView(g);this.addView(w,v,g),this.addView(D,m,h)}isViewVisible(g){if(g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[g].visible}setViewVisible(g,h){if(g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");this.viewItems[g].setVisible(h),this.distributeEmptySpace(g),this.layoutViews(),this.saveProportions()}getViewCachedVisibleSize(g){if(g<0||g>=this.viewItems.length)throw new Error("Index out of bounds");return this.viewItems[g].cachedVisibleSize}layout(g,h){const v=Math.max(this.size,this.contentSize);if(this.size=g,this.layoutContext=h,this.proportions)for(let m=0;m<this.viewItems.length;m++){const w=this.viewItems[m];w.size=(0,S.clamp)(Math.round(this.proportions[m]*g),w.minimumSize,w.maximumSize)}else{const m=(0,k.range)(this.viewItems.length),w=m.filter(y=>this.viewItems[y].priority===1),D=m.filter(y=>this.viewItems[y].priority===2);this.resize(this.viewItems.length-1,g-v,void 0,w,D)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(g=>g.size/this.contentSize))}onSashStart({sash:g,start:h,alt:v}){for(const y of this.viewItems)y.enabled=!1;const m=this.sashItems.findIndex(y=>y.sash===g),w=(0,b.combinedDisposable)((0,t.addDisposableListener)(document.body,"keydown",y=>D(this.sashDragState.current,y.altKey)),(0,t.addDisposableListener)(document.body,"keyup",()=>D(this.sashDragState.current,!1))),D=(y,T)=>{const _=this.viewItems.map(P=>P.size);let L=Number.NEGATIVE_INFINITY,M=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(T=!T),T)if(m===this.sashItems.length-1){const B=this.viewItems[m];L=(B.minimumSize-B.size)/2,M=(B.maximumSize-B.size)/2}else{const B=this.viewItems[m+1];L=(B.size-B.maximumSize)/2,M=(B.size-B.minimumSize)/2}let O,N;if(!T){const P=(0,k.range)(m,-1),B=(0,k.range)(m+1,this.viewItems.length),V=P.reduce((X,G)=>X+(this.viewItems[G].minimumSize-_[G]),0),z=P.reduce((X,G)=>X+(this.viewItems[G].viewMaximumSize-_[G]),0),x=B.length===0?Number.POSITIVE_INFINITY:B.reduce((X,G)=>X+(_[G]-this.viewItems[G].minimumSize),0),H=B.length===0?Number.NEGATIVE_INFINITY:B.reduce((X,G)=>X+(_[G]-this.viewItems[G].viewMaximumSize),0),W=Math.max(V,H),U=Math.min(x,z),$=this.findFirstSnapIndex(P),q=this.findFirstSnapIndex(B);if(typeof $=="number"){const X=this.viewItems[$],G=Math.floor(X.viewMinimumSize/2);O={index:$,limitDelta:X.visible?W-G:W+G,size:X.size}}if(typeof q=="number"){const X=this.viewItems[q],G=Math.floor(X.viewMinimumSize/2);N={index:q,limitDelta:X.visible?U+G:U-G,size:X.size}}}this.sashDragState={start:y,current:y,index:m,sizes:_,minDelta:L,maxDelta:M,alt:T,snapBefore:O,snapAfter:N,disposable:w}};D(h,v)}onSashChange({current:g}){const{index:h,start:v,sizes:m,alt:w,minDelta:D,maxDelta:y,snapBefore:T,snapAfter:_}=this.sashDragState;this.sashDragState.current=g;const L=g-v,M=this.resize(h,L,m,void 0,void 0,D,y,T,_);if(w){const O=h===this.sashItems.length-1,N=this.viewItems.map(H=>H.size),P=O?h:h+1,B=this.viewItems[P],V=B.size-B.maximumSize,z=B.size-B.minimumSize,x=O?h-1:h+1;this.resize(x,-M,N,void 0,void 0,V,z)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(g){this._onDidSashChange.fire(g),this.sashDragState.disposable.dispose(),this.saveProportions();for(const h of this.viewItems)h.enabled=!0}onViewChange(g,h){const v=this.viewItems.indexOf(g);v<0||v>=this.viewItems.length||(h=typeof h=="number"?h:g.size,h=(0,S.clamp)(h,g.minimumSize,g.maximumSize),this.inverseAltBehavior&&v>0?(this.resize(v-1,Math.floor((g.size-h)/2)),this.distributeEmptySpace(),this.layoutViews()):(g.size=h,this.relayout([v],void 0)))}resizeView(g,h){if(this.state!==d.Idle)throw new Error("Cant modify splitview");if(this.state=d.Busy,g<0||g>=this.viewItems.length)return;const v=(0,k.range)(this.viewItems.length).filter(y=>y!==g),m=[...v.filter(y=>this.viewItems[y].priority===1),g],w=v.filter(y=>this.viewItems[y].priority===2),D=this.viewItems[g];h=Math.round(h),h=(0,S.clamp)(h,D.minimumSize,Math.min(D.maximumSize,this.size)),D.size=h,this.relayout(m,w),this.state=d.Idle}isViewSizeMaximized(g){if(g<0||g>=this.viewItems.length)return!1;for(const h of this.viewItems)if(h!==this.viewItems[g]&&h.size>h.minimumSize)return!1;return!0}distributeViewSizes(){const g=[];let h=0;for(const y of this.viewItems)y.maximumSize-y.minimumSize>0&&(g.push(y),h+=y.size);const v=Math.floor(h/g.length);for(const y of g)y.size=(0,S.clamp)(v,y.minimumSize,y.maximumSize);const m=(0,k.range)(this.viewItems.length),w=m.filter(y=>this.viewItems[y].priority===1),D=m.filter(y=>this.viewItems[y].priority===2);this.relayout(w,D)}getViewSize(g){return g<0||g>=this.viewItems.length?-1:this.viewItems[g].size}doAddView(g,h,v=this.viewItems.length,m){if(this.state!==d.Idle)throw new Error("Cant modify splitview");this.state=d.Busy;const w=(0,t.$)(".split-view-view");v===this.viewItems.length?this.viewContainer.appendChild(w):this.viewContainer.insertBefore(w,this.viewContainer.children.item(v));const D=g.onDidChange(O=>this.onViewChange(L,O)),y=(0,b.toDisposable)(()=>this.viewContainer.removeChild(w)),T=(0,b.combinedDisposable)(D,y);let _;typeof h=="number"?_=h:h.type==="split"?_=this.getViewSize(h.index)/2:h.type==="invisible"?_={cachedVisibleSize:h.cachedVisibleSize}:_=g.minimumSize;const L=this.orientation===0?new l(w,g,_,T):new s(w,g,_,T);if(this.viewItems.splice(v,0,L),this.viewItems.length>1){const O={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},N=this.orientation===0?new R.Sash(this.sashContainer,{getHorizontalSashTop:X=>this.getSashPosition(X),getHorizontalSashWidth:this.getSashOrthogonalSize},{...O,orientation:1}):new R.Sash(this.sashContainer,{getVerticalSashLeft:X=>this.getSashPosition(X),getVerticalSashHeight:this.getSashOrthogonalSize},{...O,orientation:0}),P=this.orientation===0?X=>({sash:N,start:X.startY,current:X.currentY,alt:X.altKey}):X=>({sash:N,start:X.startX,current:X.currentX,alt:X.altKey}),V=I.Event.map(N.onDidStart,P)(this.onSashStart,this),x=I.Event.map(N.onDidChange,P)(this.onSashChange,this),W=I.Event.map(N.onDidEnd,()=>this.sashItems.findIndex(X=>X.sash===N))(this.onSashEnd,this),U=N.onDidReset(()=>{const X=this.sashItems.findIndex(Y=>Y.sash===N),G=(0,k.range)(X,-1),Q=(0,k.range)(X+1,this.viewItems.length),j=this.findFirstSnapIndex(G),K=this.findFirstSnapIndex(Q);typeof j=="number"&&!this.viewItems[j].visible||typeof K=="number"&&!this.viewItems[K].visible||this._onDidSashReset.fire(X)}),$=(0,b.combinedDisposable)(V,x,W,U,N),q={sash:N,disposable:$};this.sashItems.splice(v-1,0,q)}w.appendChild(g.element);let M;typeof h!="number"&&h.type==="split"&&(M=[h.index]),m||this.relayout([v],M),this.state=d.Idle,!m&&typeof h!="number"&&h.type==="distribute"&&this.distributeViewSizes()}relayout(g,h){const v=this.viewItems.reduce((m,w)=>m+w.size,0);this.resize(this.viewItems.length-1,this.size-v,void 0,g,h),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(g,h,v=this.viewItems.map(L=>L.size),m,w,D=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,T,_){if(g<0||g>=this.viewItems.length)return 0;const L=(0,k.range)(g,-1),M=(0,k.range)(g+1,this.viewItems.length);if(w)for(const q of w)(0,k.pushToStart)(L,q),(0,k.pushToStart)(M,q);if(m)for(const q of m)(0,k.pushToEnd)(L,q),(0,k.pushToEnd)(M,q);const O=L.map(q=>this.viewItems[q]),N=L.map(q=>v[q]),P=M.map(q=>this.viewItems[q]),B=M.map(q=>v[q]),V=L.reduce((q,X)=>q+(this.viewItems[X].minimumSize-v[X]),0),z=L.reduce((q,X)=>q+(this.viewItems[X].maximumSize-v[X]),0),x=M.length===0?Number.POSITIVE_INFINITY:M.reduce((q,X)=>q+(v[X]-this.viewItems[X].minimumSize),0),H=M.length===0?Number.NEGATIVE_INFINITY:M.reduce((q,X)=>q+(v[X]-this.viewItems[X].maximumSize),0),W=Math.max(V,H,D),U=Math.min(x,z,y);let $=!1;if(T){const q=this.viewItems[T.index],X=h>=T.limitDelta;$=X!==q.visible,q.setVisible(X,T.size)}if(!$&&_){const q=this.viewItems[_.index],X=h<_.limitDelta;$=X!==q.visible,q.setVisible(X,_.size)}if($)return this.resize(g,h,v,m,w,D,y);h=(0,S.clamp)(h,W,U);for(let q=0,X=h;q<O.length;q++){const G=O[q],Q=(0,S.clamp)(N[q]+X,G.minimumSize,G.maximumSize);X-=Q-N[q],G.size=Q}for(let q=0,X=h;q<P.length;q++){const G=P[q],Q=(0,S.clamp)(B[q]-X,G.minimumSize,G.maximumSize);X+=Q-B[q],G.size=Q}return h}distributeEmptySpace(g){const h=this.viewItems.reduce((y,T)=>y+T.size,0);let v=this.size-h;const m=(0,k.range)(this.viewItems.length-1,-1),w=m.filter(y=>this.viewItems[y].priority===1),D=m.filter(y=>this.viewItems[y].priority===2);for(const y of D)(0,k.pushToStart)(m,y);for(const y of w)(0,k.pushToEnd)(m,y);typeof g=="number"&&(0,k.pushToEnd)(m,g);for(let y=0;v!==0&&y<m.length;y++){const T=this.viewItems[m[y]],_=(0,S.clamp)(T.size+v,T.minimumSize,T.maximumSize);v-=_-T.size,T.size=_}}layoutViews(){this.contentSize=this.viewItems.reduce((h,v)=>h+v.size,0);let g=0;for(const h of this.viewItems)h.layout(g,this.layoutContext),g+=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 g=!1;const h=this.viewItems.map(T=>g=T.size-T.minimumSize>0||g);g=!1;const v=this.viewItems.map(T=>g=T.maximumSize-T.size>0||g),m=[...this.viewItems].reverse();g=!1;const w=m.map(T=>g=T.size-T.minimumSize>0||g).reverse();g=!1;const D=m.map(T=>g=T.maximumSize-T.size>0||g).reverse();let y=0;for(let T=0;T<this.sashItems.length;T++){const{sash:_}=this.sashItems[T];y+=this.viewItems[T].size;const M=!(h[T]&&D[T+1]),O=!(v[T]&&w[T+1]);if(M&&O){const N=(0,k.range)(T,-1),P=(0,k.range)(T+1,this.viewItems.length),B=this.findFirstSnapIndex(N),V=this.findFirstSnapIndex(P),z=typeof B=="number"&&!this.viewItems[B].visible,x=typeof V=="number"&&!this.viewItems[V].visible;z&&w[T]&&(y>0||this.startSnappingEnabled)?_.state=1:x&&h[T]&&(y<this.contentSize||this.endSnappingEnabled)?_.state=2:_.state=0}else M&&!O?_.state=1:!M&&O?_.state=2:_.state=3}}getSashPosition(g){let h=0;for(let v=0;v<this.sashItems.length;v++)if(h+=this.viewItems[v].size,this.sashItems[v].sash===g)return h;return 0}findFirstSnapIndex(g){for(const h of g){const v=this.viewItems[h];if(!!v.visible&&v.snap)return h}for(const h of g){const v=this.viewItems[h];if(v.visible&&v.maximumSize-v.minimumSize>0)return;if(!v.visible&&v.snap)return h}}dispose(){super.dispose(),(0,b.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(g=>g.disposable.dispose()),this.sashItems=[]}}e.SplitView=a}),define(ae[1265],le([1,0,10,221,6,2]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CenteredViewLayout=void 0;const k={leftMarginRatio:.1909,rightMarginRatio:.1909};function E(S){const C=(0,t.$)(".centered-layout-margin");return C.style.height="100%",S&&(C.style.backgroundColor=S.toString()),{element:C,layout:()=>{},minimumSize:60,maximumSize:Number.POSITIVE_INFINITY,onDidChange:R.Event.None}}function I(S,C){return{element:S.element,get maximumSize(){return S.maximumWidth},get minimumSize(){return S.minimumWidth},onDidChange:R.Event.map(S.onDidChange,r=>r&&r.width),layout:(r,u,i)=>S.layout(r,C(),i?.top??0,(i?.left??0)+u)}}class b{constructor(C,r,u={leftMarginRatio:k.leftMarginRatio,rightMarginRatio:k.rightMarginRatio}){this.container=C,this.view=r,this.state=u,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,r,u,i){this.width=C,this.height=r,this.splitView?(this.splitView.layout(C),this.didLayout||this.resizeMargins()):this.view.layout(C,r,u,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 p.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 r=this.style?this.style.background:void 0;this.emptyViews=[E(r),E(r)],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?.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=b}),define(ae[753],le([1,0,10,221,16,65,6,2,194,13,278,221,715]),function(J,e,t,p,R,A,k,E,I,b,S,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 S.Orientation}}),Object.defineProperty(e,"LayoutPriority",{enumerable:!0,get:function(){return C.LayoutPriority}}),Object.defineProperty(e,"Sizing",{enumerable:!0,get:function(){return C.Sizing}});const r={separatorBorder:A.Color.transparent};function u(h){return h===0?1:0}e.orthogonal=u;function i(h){return!!h.children}e.isGridBranchNode=i;class f{constructor(v){this.isLayoutEnabled=v}}function c(h,v){return v===1?{left:h.start,right:h.end,top:h.orthogonalStart,bottom:h.orthogonalEnd}:{top:h.start,bottom:h.end,left:h.orthogonalStart,right:h.orthogonalEnd}}function l(h,v){return v===1?{start:h.left,end:h.right,orthogonalStart:h.top,orthogonalEnd:h.bottom}:{start:h.top,end:h.bottom,orthogonalStart:h.left,orthogonalEnd:h.right}}function s(h,v){if(Math.abs(h)>v)throw new Error("Invalid index");return(0,I.rot)(h,v+1)}class d{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(v=>v.minimumOrthogonalSize))}get maximumSize(){return Math.min(...this.children.map(v=>v.maximumOrthogonalSize))}get priority(){if(this.children.length===0)return 0;const v=this.children.map(m=>typeof m.priority>"u"?0:m.priority);return v.some(m=>m===2)?2:v.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(v){this._boundarySashes=v,this.splitview.orthogonalStartSash=v.orthogonalStart,this.splitview.orthogonalEndSash=v.orthogonalEnd;for(let m=0;m<this.children.length;m++){const w=this.children[m],D=m===0,y=m===this.children.length-1;w.boundarySashes={start:v.orthogonalStart,end:v.orthogonalEnd,orthogonalStart:D?v.start:w.boundarySashes.orthogonalStart,orthogonalEnd:y?v.end:w.boundarySashes.orthogonalEnd}}}get edgeSnapping(){return this._edgeSnapping}set edgeSnapping(v){if(this._edgeSnapping!==v){this._edgeSnapping=v;for(const m of this.children)m instanceof d&&(m.edgeSnapping=v);this.updateSplitviewEdgeSnappingEnablement()}}constructor(v,m,w,D,y=0,T=0,_=!1,L){if(this.orientation=v,this.layoutController=m,this.proportionalLayout=D,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=E.Disposable.None,this.onDidScroll=this._onDidScroll.event,this.childrenChangeDisposable=E.Disposable.None,this._onDidSashReset=new k.Emitter,this.onDidSashReset=this._onDidSashReset.event,this.splitviewSashResetDisposable=E.Disposable.None,this.childrenSashResetDisposable=E.Disposable.None,this._boundarySashes={},this._edgeSnapping=!1,this._styles=w,this._size=y,this._orthogonalSize=T,this.element=(0,t.$)(".monaco-grid-branch-node"),!L)this.splitview=new p.SplitView(this.element,{orientation:v,styles:w,proportionalLayout:D}),this.splitview.layout(y,{orthogonalSize:T,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:y,absoluteOrthogonalSize:T});else{const O={views:L.map(P=>({view:P.node,size:P.node.size,visible:P.node instanceof a&&P.visible!==void 0?P.visible:!0})),size:this.orthogonalSize},N={proportionalLayout:D,orientation:v,styles:w};this.children=L.map(P=>P.node),this.splitview=new p.SplitView(this.element,{...N,descriptor:O}),this.children.forEach((P,B)=>{const V=B===0,z=B===this.children.length;P.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:V?this.boundarySashes.start:this.splitview.sashes[B-1],orthogonalEnd:z?this.boundarySashes.end:this.splitview.sashes[B]}})}const M=k.Event.map(this.splitview.onDidSashReset,O=>[O]);this.splitviewSashResetDisposable=M(this._onDidSashReset.fire,this._onDidSashReset),this.updateChildrenEvents()}style(v){this._styles=v,this.splitview.style(v);for(const m of this.children)m instanceof d&&m.style(v)}layout(v,m,w){if(!!this.layoutController.isLayoutEnabled){if(typeof w>"u")throw new Error("Invalid state");this._size=w.orthogonalSize,this._orthogonalSize=v,this.absoluteOffset=w.absoluteOffset+m,this.absoluteOrthogonalOffset=w.absoluteOrthogonalOffset,this.absoluteOrthogonalSize=w.absoluteOrthogonalSize,this.splitview.layout(w.orthogonalSize,{orthogonalSize:v,absoluteOffset:this.absoluteOrthogonalOffset,absoluteOrthogonalOffset:this.absoluteOffset,absoluteSize:w.absoluteOrthogonalSize,absoluteOrthogonalSize:w.absoluteSize}),this.updateSplitviewEdgeSnappingEnablement()}}setVisible(v){for(const m of this.children)m.setVisible(v)}addChild(v,m,w,D){w=s(w,this.children.length),this.splitview.addView(v,m,w,D),this._addChild(v,w),this.onDidChildrenChange()}_addChild(v,m){const w=m===0,D=m===this.children.length;this.children.splice(m,0,v),v.boundarySashes={start:this.boundarySashes.orthogonalStart,end:this.boundarySashes.orthogonalEnd,orthogonalStart:w?this.boundarySashes.start:this.splitview.sashes[m-1],orthogonalEnd:D?this.boundarySashes.end:this.splitview.sashes[m]},w||(this.children[m-1].boundarySashes={...this.children[m-1].boundarySashes,orthogonalEnd:this.splitview.sashes[m-1]}),D||(this.children[m+1].boundarySashes={...this.children[m+1].boundarySashes,orthogonalStart:this.splitview.sashes[m]})}removeChild(v,m){v=s(v,this.children.length),this.splitview.removeView(v,m),this._removeChild(v),this.onDidChildrenChange()}_removeChild(v){const m=v===0,w=v===this.children.length-1,[D]=this.children.splice(v,1);return m||(this.children[v-1].boundarySashes={...this.children[v-1].boundarySashes,orthogonalEnd:this.splitview.sashes[v-1]}),w||(this.children[v].boundarySashes={...this.children[v].boundarySashes,orthogonalStart:this.splitview.sashes[Math.max(v-1,0)]}),D}moveChild(v,m){if(v=s(v,this.children.length),m=s(m,this.children.length),v===m)return;v<m&&m--,this.splitview.moveView(v,m);const w=this._removeChild(v);this._addChild(w,m),this.onDidChildrenChange()}swapChildren(v,m){v=s(v,this.children.length),m=s(m,this.children.length),v!==m&&(this.splitview.swapViews(v,m),[this.children[v].boundarySashes,this.children[m].boundarySashes]=[this.children[v].boundarySashes,this.children[m].boundarySashes],[this.children[v],this.children[m]]=[this.children[m],this.children[v]],this.onDidChildrenChange())}resizeChild(v,m){v=s(v,this.children.length),this.splitview.resizeView(v,m)}isChildSizeMaximized(v){return this.splitview.isViewSizeMaximized(v)}distributeViewSizes(v=!1){if(this.splitview.distributeViewSizes(),v)for(const m of this.children)m instanceof d&&m.distributeViewSizes(!0)}getChildSize(v){return v=s(v,this.children.length),this.splitview.getViewSize(v)}isChildVisible(v){return v=s(v,this.children.length),this.splitview.isViewVisible(v)}setChildVisible(v,m){v=s(v,this.children.length),this.splitview.isViewVisible(v)!==m&&this.splitview.setViewVisible(v,m)}getChildCachedVisibleSize(v){return v=s(v,this.children.length),this.splitview.getViewCachedVisibleSize(v)}onDidChildrenChange(){this.updateChildrenEvents(),this._onDidChange.fire(void 0)}updateChildrenEvents(){const v=k.Event.map(k.Event.any(...this.children.map(D=>D.onDidChange)),()=>{});this.childrenChangeDisposable.dispose(),this.childrenChangeDisposable=v(this._onDidChange.fire,this._onDidChange);const m=k.Event.any(...this.children.map((D,y)=>k.Event.map(D.onDidSashReset,T=>[y,...T])));this.childrenSashResetDisposable.dispose(),this.childrenSashResetDisposable=m(this._onDidSashReset.fire,this._onDidSashReset);const w=k.Event.any(k.Event.signal(this.splitview.onDidScroll),...this.children.map(D=>D.onDidScroll));this.onDidScrollDisposable.dispose(),this.onDidScrollDisposable=w(this._onDidScroll.fire,this._onDidScroll)}trySet2x2(v){if(this.children.length!==2||v.children.length!==2||this.getChildSize(0)!==v.getChildSize(0))return E.Disposable.None;const[m,w]=this.children,[D,y]=v.children;if(!(m instanceof a)||!(w instanceof a)||!(D instanceof a)||!(y instanceof a))return E.Disposable.None;this.orientation===0?(w.linkedWidthNode=D.linkedHeightNode=m,m.linkedWidthNode=y.linkedHeightNode=w,y.linkedWidthNode=m.linkedHeightNode=D,D.linkedWidthNode=w.linkedHeightNode=y):(D.linkedWidthNode=w.linkedHeightNode=m,y.linkedWidthNode=m.linkedHeightNode=w,m.linkedWidthNode=y.linkedHeightNode=D,w.linkedWidthNode=D.linkedHeightNode=y);const T=this.splitview.sashes[0],_=v.splitview.sashes[0];return T.linkedSash=_,_.linkedSash=T,this._onDidChange.fire(void 0),v._onDidChange.fire(void 0),(0,E.toDisposable)(()=>{T.linkedSash=_.linkedSash=void 0,m.linkedHeightNode=m.linkedWidthNode=void 0,w.linkedHeightNode=w.linkedWidthNode=void 0,D.linkedHeightNode=D.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 v of this.children)v.dispose();this._onDidChange.dispose(),this._onDidSashReset.dispose(),this.splitviewSashResetDisposable.dispose(),this.childrenSashResetDisposable.dispose(),this.childrenChangeDisposable.dispose(),this.splitview.dispose()}}function n(h){const[v,m]=k.Event.split(h.onDidChange,b.isUndefined);return k.Event.any(m,k.Event.map(k.Event.latch(k.Event.map(v,w=>[h.minimumWidth,h.maximumWidth,h.minimumHeight,h.maximumHeight]),R.equals),w=>{}))}class a{get size(){return this._size}get orthogonalSize(){return this._orthogonalSize}get linkedWidthNode(){return this._linkedWidthNode}set linkedWidthNode(v){this._onDidLinkedWidthNodeChange.input=v?v._onDidViewChange:k.Event.None,this._linkedWidthNode=v,this._onDidSetLinkedNode.fire(void 0)}get linkedHeightNode(){return this._linkedHeightNode}set linkedHeightNode(v){this._onDidLinkedHeightNodeChange.input=v?v._onDidViewChange:k.Event.None,this._linkedHeightNode=v,this._onDidSetLinkedNode.fire(void 0)}constructor(v,m,w,D,y=0){this.view=v,this.orientation=m,this.layoutController=w,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 E.DisposableStore,this._boundarySashes={},this.cachedWidth=0,this.cachedHeight=0,this.cachedTop=0,this.cachedLeft=0,this._orthogonalSize=D,this._size=y;const T=n(v);this._onDidViewChange=k.Event.map(T,_=>_&&(this.orientation===0?_.width:_.height),this.disposables),this.onDidChange=k.Event.any(this._onDidViewChange,this._onDidSetLinkedNode.event,this._onDidLinkedWidthNodeChange.event,this._onDidLinkedHeightNodeChange.event)}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(v){this._boundarySashes=v,this.view.setBoundarySashes?.(c(v,this.orientation))}layout(v,m,w){if(!!this.layoutController.isLayoutEnabled){if(typeof w>"u")throw new Error("Invalid state");this._size=v,this._orthogonalSize=w.orthogonalSize,this.absoluteOffset=w.absoluteOffset+m,this.absoluteOrthogonalOffset=w.absoluteOrthogonalOffset,this._layout(this.width,this.height,this.top,this.left)}}_layout(v,m,w,D){this.cachedWidth===v&&this.cachedHeight===m&&this.cachedTop===w&&this.cachedLeft===D||(this.cachedWidth=v,this.cachedHeight=m,this.cachedTop=w,this.cachedLeft=D,this.view.layout(v,m,w,D))}setVisible(v){this.view.setVisible?.(v)}dispose(){this.disposables.dispose()}}function o(h,v,m){if(h instanceof d){const w=new d(u(h.orientation),h.layoutController,h.styles,h.proportionalLayout,v,m,h.edgeSnapping);let D=0;for(let y=h.children.length-1;y>=0;y--){const T=h.children[y],_=T instanceof d?T.orthogonalSize:T.size;let L=h.size===0?0:Math.round(v*_/h.size);D+=L,y===0&&(L+=v-D),w.addChild(o(T,m,L),L,0,!0)}return w}else return new a(h.view,u(h.orientation),h.layoutController,m)}class g{get root(){return this._root}set root(v){const m=this._root;m&&(this.element.removeChild(m.element),m.dispose()),this._root=v,this.element.appendChild(v.element),this.onDidSashResetRelay.input=v.onDidSashReset,this._onDidChange.input=k.Event.map(v.onDidChange,()=>{}),this._onDidScroll.input=v.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(v){if(this._root.orientation===v)return;const{size:m,orthogonalSize:w}=this._root;this.root=o(this._root,w,m),this.root.layout(m,0,{orthogonalSize:w,absoluteOffset:0,absoluteOrthogonalOffset:0,absoluteSize:m,absoluteOrthogonalSize:w}),this.boundarySashes=this.boundarySashes}set boundarySashes(v){this._boundarySashes=v,this.root.boundarySashes=l(v,this.orientation)}set edgeSnapping(v){this.root.edgeSnapping=v}constructor(v={}){this.onDidSashResetRelay=new k.Relay,this._onDidScroll=new k.Relay,this._onDidChange=new k.Relay,this._boundarySashes={},this.disposable2x2=E.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=v.styles||r,this.proportionalLayout=typeof v.proportionalLayout<"u"?!!v.proportionalLayout:!0,this.layoutController=new f(!1),this.root=new d(0,this.layoutController,this.styles,this.proportionalLayout)}style(v){this.styles=v,this.root.style(v)}layout(v,m,w=0,D=0){this.layoutController.isLayoutEnabled=!0;const[y,T,_,L]=this.root.orientation===1?[m,v,w,D]:[v,m,D,w];this.root.layout(y,0,{orthogonalSize:T,absoluteOffset:_,absoluteOrthogonalOffset:L,absoluteSize:y,absoluteOrthogonalSize:T})}addView(v,m,w){this.disposable2x2.dispose(),this.disposable2x2=E.Disposable.None;const[D,y]=(0,R.tail2)(w),[T,_]=this.getNode(D);if(_ instanceof d){const L=new a(v,u(_.orientation),this.layoutController,_.orthogonalSize);_.addChild(L,m,y)}else{const[,L]=(0,R.tail2)(T),[,M]=(0,R.tail2)(D);let O=0;const N=L.getChildCachedVisibleSize(M);typeof N=="number"&&(O=p.Sizing.Invisible(N)),L.removeChild(M);const P=new d(_.orientation,_.layoutController,this.styles,this.proportionalLayout,_.size,_.orthogonalSize,L.edgeSnapping);L.addChild(P,_.size,M);const B=new a(_.view,L.orientation,this.layoutController,_.size);P.addChild(B,O,0),typeof m!="number"&&m.type==="split"&&(m=p.Sizing.Split(0));const V=new a(v,L.orientation,this.layoutController,_.size);P.addChild(V,m,y)}this.trySet2x2()}removeView(v,m){this.disposable2x2.dispose(),this.disposable2x2=E.Disposable.None;const[w,D]=(0,R.tail2)(v),[y,T]=this.getNode(w);if(!(T instanceof d))throw new Error("Invalid location");const _=T.children[D];if(!(_ instanceof a))throw new Error("Invalid location");if(T.removeChild(D,m),T.children.length===0)throw new Error("Invalid grid state");if(T.children.length>1)return this.trySet2x2(),_.view;if(y.length===0){const B=T.children[0];return B instanceof a||(T.removeChild(0),this.root=B,this.boundarySashes=this.boundarySashes,this.trySet2x2()),_.view}const[,L]=(0,R.tail2)(y),[,M]=(0,R.tail2)(w),O=T.children[0],N=T.isChildVisible(0);T.removeChild(0);const P=L.children.map((B,V)=>L.getChildSize(V));if(L.removeChild(M,m),O instanceof d){P.splice(M,1,...O.children.map(B=>B.size));for(let B=0;B<O.children.length;B++){const V=O.children[B];L.addChild(V,V.size,M+B)}}else{const B=new a(O.view,u(O.orientation),this.layoutController,O.size),V=N?O.orthogonalSize:p.Sizing.Invisible(O.orthogonalSize);L.addChild(B,V,M)}for(let B=0;B<P.length;B++)L.resizeChild(B,P[B]);return this.trySet2x2(),_.view}moveView(v,m,w){const[,D]=this.getNode(v);if(!(D instanceof d))throw new Error("Invalid location");D.moveChild(m,w),this.trySet2x2()}swapViews(v,m){const[w,D]=(0,R.tail2)(v),[,y]=this.getNode(w);if(!(y instanceof d))throw new Error("Invalid from location");const T=y.getChildSize(D),_=y.children[D];if(!(_ instanceof a))throw new Error("Invalid from location");const[L,M]=(0,R.tail2)(m),[,O]=this.getNode(L);if(!(O instanceof d))throw new Error("Invalid to location");const N=O.getChildSize(M),P=O.children[M];if(!(P instanceof a))throw new Error("Invalid to location");y===O?y.swapChildren(D,M):(y.removeChild(D),O.removeChild(M),y.addChild(P,T,D),O.addChild(_,N,M)),this.trySet2x2()}resizeView(v,m){const[w,D]=(0,R.tail2)(v),[y,T]=this.getNode(w);if(!(T instanceof d))throw new Error("Invalid location");if(!m.width&&!m.height)return;const[_,L]=T.orientation===1?[m.width,m.height]:[m.height,m.width];if(typeof L=="number"&&y.length>0){const[,M]=(0,R.tail2)(y),[,O]=(0,R.tail2)(w);M.resizeChild(O,L)}typeof _=="number"&&T.resizeChild(D,_),this.trySet2x2()}getViewSize(v){if(!v)return{width:this.root.width,height:this.root.height};const[,m]=this.getNode(v);return{width:m.width,height:m.height}}getViewCachedVisibleSize(v){const[m,w]=(0,R.tail2)(v),[,D]=this.getNode(m);if(!(D instanceof d))throw new Error("Invalid location");return D.getChildCachedVisibleSize(w)}maximizeViewSize(v){const[m,w]=this.getNode(v);if(!(w instanceof a))throw new Error("Invalid location");for(let D=0;D<m.length;D++)m[D].resizeChild(v[D],Number.POSITIVE_INFINITY)}isViewSizeMaximized(v){const[m,w]=this.getNode(v);if(!(w instanceof a))throw new Error("Invalid location");for(let D=0;D<m.length;D++)if(!m[D].isChildSizeMaximized(v[D]))return!1;return!0}distributeViewSizes(v){if(!v){this.root.distributeViewSizes(!0);return}const[,m]=this.getNode(v);if(!(m instanceof d))throw new Error("Invalid location");m.distributeViewSizes(),this.trySet2x2()}isViewVisible(v){const[m,w]=(0,R.tail2)(v),[,D]=this.getNode(m);if(!(D instanceof d))throw new Error("Invalid from location");return D.isChildVisible(w)}setViewVisible(v,m){const[w,D]=(0,R.tail2)(v),[,y]=this.getNode(w);if(!(y instanceof d))throw new Error("Invalid from location");y.setChildVisible(D,m)}getView(v){const m=v?this.getNode(v)[1]:this._root;return this._getViews(m,this.orientation)}static deserialize(v,m,w={}){if(typeof v.orientation!="number")throw new Error("Invalid JSON: 'orientation' property must be a number.");if(typeof v.width!="number")throw new Error("Invalid JSON: 'width' property must be a number.");if(typeof v.height!="number")throw new Error("Invalid JSON: 'height' property must be a number.");if(v.root?.type!=="branch")throw new Error("Invalid JSON: 'root' property must have 'type' value of branch.");const D=v.orientation,y=v.height,T=new g(w);return T._deserialize(v.root,D,m,y),T}_deserialize(v,m,w,D){this.root=this._deserializeNode(v,m,w,D)}_deserializeNode(v,m,w,D){let y;if(v.type==="branch"){const _=v.data.map(L=>({node:this._deserializeNode(L,u(m),w,v.size),visible:L.visible}));y=new d(m,this.layoutController,this.styles,this.proportionalLayout,v.size,D,void 0,_)}else y=new a(w.fromJSON(v.data),m,this.layoutController,D,v.size);return y}_getViews(v,m,w){const D={top:v.top,left:v.left,width:v.width,height:v.height};if(v instanceof a)return{view:v.view,box:D,cachedVisibleSize:w};const y=[];for(let T=0;T<v.children.length;T++){const _=v.children[T],L=v.getChildCachedVisibleSize(T);y.push(this._getViews(_,u(m),L))}return{children:y,box:D}}getNode(v,m=this.root,w=[]){if(v.length===0)return[w,m];if(!(m instanceof d))throw new Error("Invalid location");const[D,...y]=v;if(D<0||D>=m.children.length)throw new Error("Invalid location");const T=m.children[D];return w.push(m),this.getNode(y,T,w)}trySet2x2(){if(this.disposable2x2.dispose(),this.disposable2x2=E.Disposable.None,this.root.children.length!==2)return;const[v,m]=this.root.children;!(v instanceof d)||!(m instanceof d)||(this.disposable2x2=v.trySet2x2(m))}getViewMap(v,m){m||(m=this.root),m instanceof d?m.children.forEach(w=>this.getViewMap(v,w)):v.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=g}),define(ae[578],le([1,0,16,2,753,753,715]),function(J,e,t,p,R,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(m){m[m.Up=0]="Up",m[m.Down=1]="Down",m[m.Left=2]="Left",m[m.Right=3]="Right"})(k=e.Direction||(e.Direction={}));function E(m){switch(m){case 0:return 1;case 1:return 0;case 2:return 3;case 3:return 2}}function I(m){return!!m.children}e.isGridBranchNode=I;function b(m,w){if(w.length===0)return m;if(!I(m))throw new Error("Invalid location");const[D,...y]=w;return b(m.children[D],y)}function S(m,w){return!(m.start>=w.end||w.start>=m.end)}function C(m,w){const D=i(w),y=w===0?m.top:w===3?m.left+m.width:w===1?m.top+m.height:m.left,T={start:D===1?m.top:m.left,end:D===1?m.top+m.height:m.left+m.width};return{offset:y,range:T}}function r(m,w,D){const y=[];function T(_,L,M){if(I(_))for(const O of _.children)T(O,L,M);else{const{offset:O,range:N}=C(_.box,L);O===M.offset&&S(N,M.range)&&y.push(_)}}return T(m,w,D),y}function u(m,w){return w.length%2===0?(0,R.orthogonal)(m):m}function i(m){return m===0||m===1?0:1}function f(m,w,D){const y=u(m,w),T=i(D);if(y===T){let[_,L]=(0,t.tail2)(w);return(D===3||D===1)&&(L+=1),[..._,L]}else{const _=D===3||D===1?1:0;return[...w,_]}}e.getRelativeLocation=f;function c(m){const w=m.parentElement;if(!w)throw new Error("Invalid grid element");let D=w.firstElementChild,y=0;for(;D!==m&&D!==w.lastElementChild&&D;)D=D.nextElementSibling,y++;return y}function l(m){const w=m.parentElement;if(!w)throw new Error("Invalid grid element");if(/\bmonaco-grid-view\b/.test(w.className))return[];const D=c(w),y=w.parentElement.parentElement.parentElement.parentElement;return[...l(y),D]}var s;(function(m){m.Distribute={type:"distribute"},m.Split={type:"split"};function w(D){return{type:"invisible",cachedVisibleSize:D}}m.Invisible=w})(s=e.Sizing||(e.Sizing={}));class d extends p.Disposable{get orientation(){return this.gridview.orientation}set orientation(w){this.gridview.orientation=w}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(w){this.gridview.boundarySashes=w}set edgeSnapping(w){this.gridview.edgeSnapping=w}get element(){return this.gridview.element}constructor(w,D={}){super(),this.views=new Map,this.didLayout=!1,w instanceof R.GridView?(this.gridview=w,this.gridview.getViewMap(this.views)):this.gridview=new R.GridView(D),this._register(this.gridview),this._register(this.gridview.onDidSashReset(this.onDidSashReset,this)),w instanceof R.GridView||this._addView(w,0,[0]),this.onDidChange=this.gridview.onDidChange,this.onDidScroll=this.gridview.onDidScroll}style(w){this.gridview.style(w)}layout(w,D,y=0,T=0){this.gridview.layout(w,D,y,T),this.didLayout=!0}addView(w,D,y,T){if(this.views.has(w))throw new Error("Can't add same view twice");const _=i(T);this.views.size===1&&this.orientation!==_&&(this.orientation=_);const L=this.getViewLocation(y),M=f(this.gridview.orientation,L,T);let O;if(typeof D=="number")O=D;else if(D.type==="split"){const[,N]=(0,t.tail2)(L);O=R.Sizing.Split(N)}else D.type==="distribute"?O=R.Sizing.Distribute:O=D;this._addView(w,O,M)}addViewAt(w,D,y){if(this.views.has(w))throw new Error("Can't add same view twice");let T;typeof D=="number"?T=D:D.type==="distribute"?T=R.Sizing.Distribute:T=D,this._addView(w,T,y)}_addView(w,D,y){this.views.set(w,w.element),this.gridview.addView(w,D,y)}removeView(w,D){if(this.views.size===1)throw new Error("Can't remove last view");const y=this.getViewLocation(w);this.gridview.removeView(y,D&&D.type==="distribute"?R.Sizing.Distribute:void 0),this.views.delete(w)}moveView(w,D,y,T){const _=this.getViewLocation(w),[L,M]=(0,t.tail2)(_),O=this.getViewLocation(y),N=f(this.gridview.orientation,O,T),[P,B]=(0,t.tail2)(N);(0,t.equals)(L,P)?this.gridview.moveView(L,M,B):(this.removeView(w,typeof D=="number"?void 0:D),this.addView(w,D,y,T))}moveViewTo(w,D){const y=this.getViewLocation(w),[T,_]=(0,t.tail2)(y),[L,M]=(0,t.tail2)(D);if((0,t.equals)(T,L))this.gridview.moveView(T,_,M);else{const O=this.getViewSize(w),N=u(this.gridview.orientation,y),P=this.getViewCachedVisibleSize(w),B=typeof P>"u"?N===1?O.width:O.height:s.Invisible(P);this.removeView(w),this.addViewAt(w,B,D)}}swapViews(w,D){const y=this.getViewLocation(w),T=this.getViewLocation(D);return this.gridview.swapViews(y,T)}resizeView(w,D){const y=this.getViewLocation(w);return this.gridview.resizeView(y,D)}isViewSizeMaximized(w){const D=this.getViewLocation(w);return this.gridview.isViewSizeMaximized(D)}getViewSize(w){if(!w)return this.gridview.getViewSize();const D=this.getViewLocation(w);return this.gridview.getViewSize(D)}getViewCachedVisibleSize(w){const D=this.getViewLocation(w);return this.gridview.getViewCachedVisibleSize(D)}maximizeViewSize(w){const D=this.getViewLocation(w);this.gridview.maximizeViewSize(D)}distributeViewSizes(){this.gridview.distributeViewSizes()}isViewVisible(w){const D=this.getViewLocation(w);return this.gridview.isViewVisible(D)}setViewVisible(w,D){const y=this.getViewLocation(w);this.gridview.setViewVisible(y,D)}getViews(){return this.gridview.getView()}getNeighborViews(w,D,y=!1){if(!this.didLayout)throw new Error("Can't call getNeighborViews before first layout");const T=this.getViewLocation(w),_=this.getViews(),L=b(_,T);let M=C(L.box,D);return y&&(D===0&&L.box.top===0?M={offset:_.box.top+_.box.height,range:M.range}:D===3&&L.box.left+L.box.width===_.box.width?M={offset:0,range:M.range}:D===1&&L.box.top+L.box.height===_.box.height?M={offset:0,range:M.range}:D===2&&L.box.left===0&&(M={offset:_.box.left+_.box.width,range:M.range})),r(_,E(D),M).map(O=>O.view)}getViewLocation(w){const D=this.views.get(w);if(!D)throw new Error("View not found");return l(D)}onDidSashReset(w){const D=_=>{const L=this.gridview.getView(_);if(I(L))return!1;const M=u(this.orientation,_),O=M===1?L.view.preferredWidth:L.view.preferredHeight;if(typeof O!="number")return!1;const N=M===1?{width:Math.round(O)}:{height:Math.round(O)};return this.gridview.resizeView(_,N),!0};if(D(w))return;const[y,T]=(0,t.tail2)(w);D([...y,T+1])||this.gridview.distributeViewSizes(y)}}e.Grid=d;class n extends d{constructor(){super(...arguments),this.initialLayoutContext=!0}static serializeNode(w,D){const y=D===0?w.box.width:w.box.height;return I(w)?{type:"branch",data:w.children.map(T=>n.serializeNode(T,(0,R.orthogonal)(D))),size:y}:typeof w.cachedVisibleSize=="number"?{type:"leaf",data:w.view.toJSON(),size:w.cachedVisibleSize,visible:!1}:{type:"leaf",data:w.view.toJSON(),size:y}}static deserialize(w,D,y={}){if(typeof w.orientation!="number")throw new Error("Invalid JSON: 'orientation' property must be a number.");if(typeof w.width!="number")throw new Error("Invalid JSON: 'width' property must be a number.");if(typeof w.height!="number")throw new Error("Invalid JSON: 'height' property must be a number.");const T=R.GridView.deserialize(w,D,y);return new n(T,y)}static from(w,D={}){return n.deserialize(v(w),{fromJSON:y=>y},D)}serialize(){return{root:n.serializeNode(this.getViews(),this.orientation),orientation:this.orientation,width:this.width,height:this.height}}layout(w,D,y=0,T=0){super.layout(w,D,y,T),this.initialLayoutContext&&(this.initialLayoutContext=!1,this.gridview.trySet2x2())}}e.SerializableGrid=n;function a(m){return!!m.groups}function o(m,w){if(!w&&m.groups&&m.groups.length<=1&&(m.groups=void 0),!a(m))return;let D=0,y=0;for(const M of m.groups)o(M,!1),M.size&&(D+=M.size,y++);const T=y>0?D:1,_=m.groups.length-y,L=T/_;for(const M of m.groups)M.size||(M.size=L)}e.sanitizeGridNodeDescriptor=o;function g(m){return a(m)?{type:"branch",data:m.groups.map(w=>g(w)),size:m.size}:{type:"leaf",data:m.data,size:m.size}}function h(m,w){if(m.type==="branch"){const D=m.data.map(y=>h(y,(0,R.orthogonal)(w)));if(w===0){const y=m.size||(D.length===0?void 0:Math.max(...D.map(_=>_.width||0))),T=D.length===0?void 0:D.reduce((_,L)=>_+(L.height||0),0);return{width:y,height:T}}else{const y=D.length===0?void 0:D.reduce((_,L)=>_+(L.width||0),0),T=m.size||(D.length===0?void 0:Math.max(...D.map(_=>_.height||0)));return{width:y,height:T}}}else{const D=w===0?m.size:void 0,y=w===0?void 0:m.size;return{width:D,height:y}}}function v(m){o(m,!0);const w=g(m),{width:D,height:y}=h(w,m.orientation);return{root:w,orientation:m.orientation,width:D||1,height:y||1}}e.createSerializedGrid=v}),define(ae[754],le([1,0,86,181,10,195,90,133,65,6,2,1245,221,1050]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PaneView=e.DefaultPaneDndController=e.Pane=void 0;class u extends S.Disposable{get ariaHeaderLabel(){return this._ariaHeaderLabel}set ariaHeaderLabel(s){this._ariaHeaderLabel=s,this.header.setAttribute("aria-label",this.ariaHeaderLabel)}get draggableElement(){return this.header}get dropTargetElement(){return this.element}get dropBackground(){return this._dropBackground}get minimumBodySize(){return this._minimumBodySize}set minimumBodySize(s){this._minimumBodySize=s,this._onDidChange.fire(void 0)}get maximumBodySize(){return this._maximumBodySize}set maximumBodySize(s){this._maximumBodySize=s,this._onDidChange.fire(void 0)}get headerSize(){return this.headerVisible?u.HEADER_SIZE:0}get minimumSize(){const s=this.headerSize,n=!this.headerVisible||this.isExpanded()?this.minimumBodySize:0;return s+n}get maximumSize(){const s=this.headerSize,n=!this.headerVisible||this.isExpanded()?this.maximumBodySize:0;return s+n}constructor(s){super(),this.expandedSize=void 0,this._headerVisible=!0,this.styles={},this.animationTimer=void 0,this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeExpansionState=this._register(new b.Emitter),this.onDidChangeExpansionState=this._onDidChangeExpansionState.event,this.orthogonalSize=0,this._expanded=typeof s.expanded>"u"?!0:!!s.expanded,this._orientation=typeof s.orientation>"u"?0:s.orientation,this._ariaHeaderLabel=(0,C.localize)(0,null,s.title),this._minimumBodySize=typeof s.minimumBodySize=="number"?s.minimumBodySize:this._orientation===1?200:120,this._maximumBodySize=typeof s.maximumBodySize=="number"?s.maximumBodySize:Number.POSITIVE_INFINITY,this.element=(0,R.$)(".pane")}isExpanded(){return this._expanded}setExpanded(s){return this._expanded===!!s?!1:(this.element?.classList.toggle("expanded",s),this._expanded=!!s,this.updateHeader(),s?(typeof this.animationTimer=="number"&&clearTimeout(this.animationTimer),(0,R.append)(this.element,this.body)):this.animationTimer=window.setTimeout(()=>{this.body.remove()},200),this._onDidChangeExpansionState.fire(s),this._onDidChange.fire(s?this.expandedSize:void 0),!0)}get headerVisible(){return this._headerVisible}set headerVisible(s){this._headerVisible!==!!s&&(this._headerVisible=!!s,this.updateHeader(),this._onDidChange.fire(void 0))}get orientation(){return this._orientation}set orientation(s){this._orientation!==s&&(this._orientation=s,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,R.$)(".pane-header"),(0,R.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 s=(0,R.trackFocus)(this.header);this._register(s),this._register(s.onDidFocus(()=>this.header.classList.add("focused"),null)),this._register(s.onDidBlur(()=>this.header.classList.remove("focused"),null)),this.updateHeader();const d=this._register(new S.DisposableStore),n=this._register(new A.DomEmitter(this.header,"keydown")),a=b.Event.map(n.event,o=>new k.StandardKeyboardEvent(o),d);this._register(b.Event.filter(a,o=>o.keyCode===3||o.keyCode===10,d)(()=>this.setExpanded(!this.isExpanded()),null)),this._register(b.Event.filter(a,o=>o.keyCode===15,d)(()=>this.setExpanded(!1),null)),this._register(b.Event.filter(a,o=>o.keyCode===17,d)(()=>this.setExpanded(!0),null)),this._register(E.Gesture.addTarget(this.header)),[R.EventType.CLICK,E.EventType.Tap].forEach(o=>{this._register((0,R.addDisposableListener)(this.header,o,g=>{g.defaultPrevented||this.setExpanded(!this.isExpanded())}))}),this.body=(0,R.append)(this.element,(0,R.$)(".pane-body")),this.renderBody(this.body),this.isExpanded()||this.body.remove()}layout(s){const d=this.headerVisible?u.HEADER_SIZE:0,n=this._orientation===0?this.orthogonalSize:s,a=this._orientation===0?s-d:this.orthogonalSize-d;this.isExpanded()&&(this.body.classList.toggle("wide",n>=600),this.layoutBody(a,n),this.expandedSize=s)}style(s){this.styles=s,this.header&&this.updateHeader()}updateHeader(){const s=!this.headerVisible||this.isExpanded();this.header.style.lineHeight=`${this.headerSize}px`,this.header.classList.toggle("hidden",!this.headerVisible),this.header.classList.toggle("expanded",s),this.header.setAttribute("aria-expanded",String(s)),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=u,u.HEADER_SIZE=22;class i extends S.Disposable{constructor(s,d,n){super(),this.pane=s,this.dnd=d,this.context=n,this.dragOverCounter=0,this._onDidDrop=this._register(new b.Emitter),this.onDidDrop=this._onDidDrop.event,s.draggableElement.draggable=!0,this._register((0,R.addDisposableListener)(s.draggableElement,"dragstart",a=>this.onDragStart(a))),this._register((0,R.addDisposableListener)(s.dropTargetElement,"dragenter",a=>this.onDragEnter(a))),this._register((0,R.addDisposableListener)(s.dropTargetElement,"dragleave",a=>this.onDragLeave(a))),this._register((0,R.addDisposableListener)(s.dropTargetElement,"dragend",a=>this.onDragEnd(a))),this._register((0,R.addDisposableListener)(s.dropTargetElement,"drop",a=>this.onDrop(a)))}onDragStart(s){if(!this.dnd.canDrag(this.pane)||!s.dataTransfer){s.preventDefault(),s.stopPropagation();return}s.dataTransfer.effectAllowed="move",t.isFirefox&&s.dataTransfer?.setData(p.DataTransfers.TEXT,this.pane.draggableElement.textContent||"");const d=(0,R.append)(document.body,(0,R.$)(".monaco-drag-image",{},this.pane.draggableElement.textContent||""));s.dataTransfer.setDragImage(d,-10,-10),setTimeout(()=>document.body.removeChild(d),0),this.context.draggable=this}onDragEnter(s){!this.context.draggable||this.context.draggable===this||!this.dnd.canDrop(this.context.draggable.pane,this.pane)||(this.dragOverCounter++,this.render())}onDragLeave(s){!this.context.draggable||this.context.draggable===this||!this.dnd.canDrop(this.context.draggable.pane,this.pane)||(this.dragOverCounter--,this.dragOverCounter===0&&this.render())}onDragEnd(s){!this.context.draggable||(this.dragOverCounter=0,this.render(),this.context.draggable=null)}onDrop(s){!this.context.draggable||(R.EventHelper.stop(s),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 s=null;this.dragOverCounter>0&&(s=(this.pane.dropBackground||i.DefaultDragOverBackgroundColor).toString()),this.pane.dropTargetElement.style.backgroundColor=s||""}}i.DefaultDragOverBackgroundColor=new I.Color(new I.RGBA(128,128,128,.5));class f{canDrag(s){return!0}canDrop(s,d){return!0}}e.DefaultPaneDndController=f;class c extends S.Disposable{constructor(s,d={}){super(),this.dndContext={draggable:null},this.paneItems=[],this.orthogonalSize=0,this.size=0,this.animationTimer=void 0,this._onDidDrop=this._register(new b.Emitter),this.onDidDrop=this._onDidDrop.event,this.dnd=d.dnd,this.orientation=d.orientation??0,this.element=(0,R.append)(s,(0,R.$)(".monaco-pane-view")),this.splitview=this._register(new r.SplitView(this.element,{orientation:this.orientation})),this.onDidSashReset=this.splitview.onDidSashReset,this.onDidSashChange=this.splitview.onDidSashChange,this.onDidScroll=this.splitview.onDidScroll;const n=this._register(new S.DisposableStore),a=this._register(new A.DomEmitter(this.element,"keydown")),o=b.Event.map(b.Event.filter(a.event,g=>g.target instanceof HTMLElement&&g.target.classList.contains("pane-header"),n),g=>new k.StandardKeyboardEvent(g),n);this._register(b.Event.filter(o,g=>g.keyCode===16,n)(()=>this.focusPrevious())),this._register(b.Event.filter(o,g=>g.keyCode===18,n)(()=>this.focusNext()))}addPane(s,d,n=this.splitview.length){const a=new S.DisposableStore;s.onDidChangeExpansionState(this.setupAnimation,this,a);const o={pane:s,disposable:a};if(this.paneItems.splice(n,0,o),s.orientation=this.orientation,s.orthogonalSize=this.orthogonalSize,this.splitview.addView(s,d,n),this.dnd){const g=new i(s,this.dnd,this.dndContext);a.add(g),a.add(g.onDidDrop(this._onDidDrop.fire,this._onDidDrop))}}removePane(s){const d=this.paneItems.findIndex(a=>a.pane===s);if(d===-1)return;this.splitview.removeView(d,s.isExpanded()?r.Sizing.Distribute:void 0),this.paneItems.splice(d,1)[0].disposable.dispose()}movePane(s,d){const n=this.paneItems.findIndex(g=>g.pane===s),a=this.paneItems.findIndex(g=>g.pane===d);if(n===-1||a===-1)return;const[o]=this.paneItems.splice(n,1);this.paneItems.splice(a,0,o),this.splitview.moveView(n,a)}resizePane(s,d){const n=this.paneItems.findIndex(a=>a.pane===s);n!==-1&&this.splitview.resizeView(n,d)}getPaneSize(s){const d=this.paneItems.findIndex(n=>n.pane===s);return d===-1?-1:this.splitview.getViewSize(d)}layout(s,d){this.orthogonalSize=this.orientation===0?d:s,this.size=this.orientation===1?d:s;for(const n of this.paneItems)n.pane.orthogonalSize=this.orthogonalSize;this.splitview.layout(this.size)}flipOrientation(s,d){this.orientation=this.orientation===0?1:0;const n=this.paneItems.map(g=>this.getPaneSize(g.pane));this.splitview.dispose(),(0,R.clearNode)(this.element),this.splitview=this._register(new r.SplitView(this.element,{orientation:this.orientation}));const a=this.orientation===0?d:s,o=this.orientation===1?d:s;this.paneItems.forEach((g,h)=>{g.pane.orthogonalSize=a,g.pane.orientation=this.orientation;const v=this.size===0?0:o*n[h]/this.size;this.splitview.addView(g.pane,v,h)}),this.size=o,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 s=this.getPaneHeaderElements(),d=s.indexOf(document.activeElement);d!==-1&&s[Math.max(d-1,0)].focus()}focusNext(){const s=this.getPaneHeaderElements(),d=s.indexOf(document.activeElement);d!==-1&&s[Math.min(d+1,s.length-1)].focus()}dispose(){super.dispose(),this.paneItems.forEach(s=>s.disposable.dispose())}}e.PaneView=c}),define(ae[755],le([1,0,10,196,221,6,2,1052]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class E{constructor(r,u,i){this.columns=r,this.getColumnSize=i,this.templateId=E.TemplateId,this.renderedTemplates=new Set;const f=new Map(u.map(c=>[c.templateId,c]));this.renderers=[];for(const c of r){const l=f.get(c.templateId);if(!l)throw new Error(`Table cell renderer for template id ${c.templateId} not found.`);this.renderers.push(l)}}renderTemplate(r){const u=(0,t.append)(r,(0,t.$)(".monaco-table-tr")),i=[],f=[];for(let l=0;l<this.columns.length;l++){const s=this.renderers[l],d=(0,t.append)(u,(0,t.$)(".monaco-table-td",{"data-col-index":l}));d.style.width=`${this.getColumnSize(l)}px`,i.push(d),f.push(s.renderTemplate(d))}const c={container:r,cellContainers:i,cellTemplateData:f};return this.renderedTemplates.add(c),c}renderElement(r,u,i,f){for(let c=0;c<this.columns.length;c++){const s=this.columns[c].project(r);this.renderers[c].renderElement(s,u,i.cellTemplateData[c],f)}}disposeElement(r,u,i,f){for(let c=0;c<this.columns.length;c++){const l=this.renderers[c];if(l.disposeElement){const d=this.columns[c].project(r);l.disposeElement(d,u,i.cellTemplateData[c],f)}}}disposeTemplate(r){for(let u=0;u<this.columns.length;u++)this.renderers[u].disposeTemplate(r.cellTemplateData[u]);(0,t.clearNode)(r.container),this.renderedTemplates.delete(r)}layoutColumn(r,u){for(const{cellContainers:i}of this.renderedTemplates)i[r].style.width=`${u}px`}}E.TemplateId="row";function I(C){return{getHeight(r){return C.getHeight(r)},getTemplateId(){return E.TemplateId}}}class b{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}constructor(r,u){this.column=r,this.index=u,this._onDidLayout=new A.Emitter,this.onDidLayout=this._onDidLayout.event,this.element=(0,t.$)(".monaco-table-th",{"data-col-index":u,title:r.tooltip},r.label)}layout(r){this._onDidLayout.fire([this.index,r])}}class S{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(r){this.list.scrollTop=r}get scrollLeft(){return this.list.scrollLeft}set scrollLeft(r){this.list.scrollLeft=r}get scrollHeight(){return this.list.scrollHeight}get renderHeight(){return this.list.renderHeight}get onDidDispose(){return this.list.onDidDispose}constructor(r,u,i,f,c,l){this.virtualDelegate=i,this.domId=`table_id_${++S.InstanceCount}`,this.disposables=new k.DisposableStore,this.cachedWidth=0,this.cachedHeight=0,this.domNode=(0,t.append)(u,(0,t.$)(`.monaco-table.${this.domId}`));const s=f.map((a,o)=>new b(a,o)),d={size:s.reduce((a,o)=>a+o.column.weight,0),views:s.map(a=>({size:a.column.weight,view:a}))};this.splitview=this.disposables.add(new R.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:d})),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const n=new E(f,c,a=>this.splitview.getViewSize(a));this.list=this.disposables.add(new p.List(r,this.domNode,I(i),[n],l)),A.Event.any(...s.map(a=>a.onDidLayout))(([a,o])=>n.layoutColumn(a,o),null,this.disposables),this.splitview.onDidSashReset(a=>{const o=f.reduce((h,v)=>h+v.weight,0),g=f[a].weight/o*this.cachedWidth;this.splitview.resizeView(a,g)},null,this.disposables),this.styleElement=(0,t.createStyleSheet)(this.domNode),this.style({})}updateOptions(r){this.list.updateOptions(r)}splice(r,u,i=[]){this.list.splice(r,u,i)}rerender(){this.list.rerender()}row(r){return this.list.element(r)}indexOf(r){return this.list.indexOf(r)}get length(){return this.list.length}getHTMLElement(){return this.domNode}layout(r,u){r=r??(0,t.getContentHeight)(this.domNode),u=u??(0,t.getContentWidth)(this.domNode),this.cachedWidth=u,this.cachedHeight=r,this.splitview.layout(u);const i=r-this.virtualDelegate.headerRowHeight;this.list.getHTMLElement().style.height=`${i}px`,this.list.layout(i,u)}triggerTypeNavigation(){this.list.triggerTypeNavigation()}style(r){const u=[];u.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=u.join(` `),this.list.style(r)}domFocus(){this.list.domFocus()}setAnchor(r){this.list.setAnchor(r)}getAnchor(){return this.list.getAnchor()}getSelectedElements(){return this.list.getSelectedElements()}setSelection(r,u){this.list.setSelection(r,u)}getSelection(){return this.list.getSelection()}setFocus(r,u){this.list.setFocus(r,u)}focusNext(r=1,u=!1,i){this.list.focusNext(r,u,i)}focusPrevious(r=1,u=!1,i){this.list.focusPrevious(r,u,i)}focusNextPage(r){return this.list.focusNextPage(r)}focusPreviousPage(r){return this.list.focusPreviousPage(r)}focusFirst(r){this.list.focusFirst(r)}focusLast(r){this.list.focusLast(r)}getFocus(){return this.list.getFocus()}getFocusedElements(){return this.list.getFocusedElements()}getRelativeTop(r){return this.list.getRelativeTop(r)}reveal(r,u){this.list.reveal(r,u)}dispose(){this.disposables.dispose()}}e.Table=S,S.InstanceCount=0}),define(ae[304],le([1,0,11,53]),function(J,e,t,p){"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 R=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 E(T,_,L=!1){const M=T||"",O=_||"",N=R.value.collator.compare(M,O);return R.value.collatorIsNumeric&&N===0&&M!==O?M<O?-1:1:N}e.compareFileNames=E;function I(T,_){const L=A.value.collator;return T=T||"",_=_||"",a(L,T,_)}e.compareFileNamesDefault=I;function b(T,_){const L=A.value.collator;return T=T||"",_=_||"",v(T,_)||a(L,T,_)}e.compareFileNamesUpper=b;function S(T,_){const L=A.value.collator;return T=T||"",_=_||"",h(T,_)||a(L,T,_)}e.compareFileNamesLower=S;function C(T,_){return T=T||"",_=_||"",T===_?0:T<_?-1:1}e.compareFileNamesUnicode=C;function r(T,_,L=!1){L||(T=T&&T.toLowerCase(),_=_&&_.toLowerCase());const[M,O]=d(T),[N,P]=d(_);return M!==N?M<N?-1:1:O===P?0:O<P?-1:1}e.noIntlCompareFileNames=r;function u(T,_){const[L,M]=d(T),[O,N]=d(_);let P=R.value.collator.compare(M,N);if(P===0){if(R.value.collatorIsNumeric&&M!==N)return M<N?-1:1;if(P=R.value.collator.compare(L,O),R.value.collatorIsNumeric&&P===0&&L!==O)return L<O?-1:1}return P}e.compareFileExtensions=u;function i(T,_){T=T||"",_=_||"";const L=n(T),M=n(_),O=A.value.collator,N=k.value.collator;return a(N,L,M)||a(O,T,_)}e.compareFileExtensionsDefault=i;function f(T,_){T=T||"",_=_||"";const L=n(T),M=n(_),O=A.value.collator,N=k.value.collator;return a(N,L,M)||v(T,_)||a(O,T,_)}e.compareFileExtensionsUpper=f;function c(T,_){T=T||"",_=_||"";const L=n(T),M=n(_),O=A.value.collator,N=k.value.collator;return a(N,L,M)||h(T,_)||a(O,T,_)}e.compareFileExtensionsLower=c;function l(T,_){T=T||"",_=_||"";const L=n(T).toLowerCase(),M=n(_).toLowerCase();return L!==M?L<M?-1:1:T!==_?T<_?-1:1:0}e.compareFileExtensionsUnicode=l;const s=/^(.*?)(\.([^.]*))?$/;function d(T,_=!1){const L=T?s.exec(T):[];let M=[L&&L[1]||"",L&&L[3]||""];return _&&(!M[0]&&M[1]||M[0]&&M[0].charAt(0)===".")&&(M=[M[0]+"."+M[1],""]),M}function n(T){const _=T?s.exec(T):[];return _&&_[1]&&_[1].charAt(0)!=="."&&_[3]||""}function a(T,_,L){const M=T.compare(_,L);return M!==0?M:_.length!==L.length?_.length<L.length?-1:1:0}function o(T){const _=T.charAt(0);return _.toLocaleUpperCase()!==_}function g(T){const _=T.charAt(0);return _.toLocaleLowerCase()!==_}function h(T,_){return o(T)&&g(_)?-1:g(T)&&o(_)?1:0}function v(T,_){return g(T)&&o(_)?-1:o(T)&&g(_)?1:0}function m(T,_,L=!1){return L||(T=T&&T.toLowerCase(),_=_&&_.toLowerCase()),T===_?0:T<_?-1:1}function w(T,_,L=!1){const M=T.split(p.sep),O=_.split(p.sep),N=M.length-1,P=O.length-1;let B,V;for(let z=0;;z++){if(B=N===z,V=P===z,B&&V)return E(M[z],O[z],L);if(B)return-1;if(V)return 1;const x=m(M[z],O[z],L);if(x!==0)return x}}e.comparePaths=w;function D(T,_,L){const M=T.toLowerCase(),O=_.toLowerCase(),N=y(T,_,L);if(N)return N;const P=M.endsWith(L),B=O.endsWith(L);if(P!==B)return P?-1:1;const V=E(M,O);return V!==0?V:M.localeCompare(O)}e.compareAnything=D;function y(T,_,L){const M=T.toLowerCase(),O=_.toLowerCase(),N=M.startsWith(L),P=O.startsWith(L);if(N!==P)return N?-1:1;if(N&&P){if(M.length<O.length)return-1;if(M.length>O.length)return 1}return 0}e.compareByPrefix=y}),define(ae[417],le([1,0,304,96,108,53,14,28]),function(J,e,t,p,R,A,k,E){"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,b=[I,[]];function S(x,H,W,U){if(!x||!H)return b;const $=x.length,q=H.length;if($<q)return b;const X=x.toLowerCase();return C(H,W,q,x,X,$,U)}e.scoreFuzzy=S;function C(x,H,W,U,$,q,X){const G=[],Q=[];for(let ee=0;ee<W;ee++){const ie=ee*q,re=ie-q,oe=ee>0,se=x[ee],te=H[ee];for(let Z=0;Z<q;Z++){const ne=Z>0,ce=ie+Z,de=ce-1,he=re+Z-1,pe=ne?G[de]:0,me=oe&&ne?G[he]:0,Se=oe&&ne?Q[he]:0;let Ie;!me&&oe?Ie=0:Ie=r(se,te,U,$,Z,Se),Ie&&me+Ie>=pe&&(X||oe||$.startsWith(H,Z))?(Q[ce]=Se+1,G[ce]=me+Ie):(Q[ce]=I,G[ce]=pe)}}const j=[];let K=W-1,Y=q-1;for(;K>=0&&Y>=0;){const ee=K*q+Y;Q[ee]===I||(j.push(Y),K--),Y--}return[G[W*q-1],j.reverse()]}function r(x,H,W,U,$,q){let X=0;if(!u(H,U[$]))return X;if(X+=1,q>0&&(X+=q*5),x===W[$]&&(X+=1),$===0)X+=8;else{const G=i(W.charCodeAt($-1));G?X+=G:(0,p.isUpper)(W.charCodeAt($))&&q===0&&(X+=2)}return X}function u(x,H){return x===H?!0:x==="/"||x==="\\"?H==="/"||H==="\\":!1}function i(x){switch(x){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 f=[void 0,[]];function c(x,H,W=0,U=0){const $=H;return $.values&&$.values.length>1?l(x,$.values,W,U):s(x,H,W,U)}e.scoreFuzzy2=c;function l(x,H,W,U){let $=0;const q=[];for(const X of H){const[G,Q]=s(x,X,W,U);if(typeof G!="number")return f;$+=G,q.push(...Q)}return[$,y(q)]}function s(x,H,W,U){const $=(0,p.fuzzyScore)(H.original,H.originalLowercase,W,x,x.toLowerCase(),U,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return $?[$[0],(0,p.createMatches)($)]:f}const d=Object.freeze({score:0}),n=1<<18,a=1<<17,o=1<<16;function g(x,H,W,U){const $=U.values?U.values:[U];return(0,R.hash)({[U.normalized]:{values:$.map(X=>({value:X.normalized,expectContiguousMatch:X.expectContiguousMatch})),label:x,description:H,allowNonContiguousMatches:W}})}function h(x,H,W,U,$){if(!x||!H.normalized)return d;const q=U.getItemLabel(x);if(!q)return d;const X=U.getItemDescription(x),G=g(q,X,W,H),Q=$[G];if(Q)return Q;const j=v(q,X,U.getItemPath(x),H,W);return $[G]=j,j}e.scoreItemFuzzy=h;function v(x,H,W,U,$){const q=!W||!U.containsPathSeparator;return W&&(k.isLinux?U.pathNormalized===W:(0,E.equalsIgnoreCase)(U.pathNormalized,W))?{score:n,labelMatch:[{start:0,end:x.length}],descriptionMatch:H?[{start:0,end:H.length}]:void 0}:U.values&&U.values.length>1?m(x,H,W,U.values,q,$):w(x,H,W,U,q,$)}function m(x,H,W,U,$,q){let X=0;const G=[],Q=[];for(const j of U){const{score:K,labelMatch:Y,descriptionMatch:ee}=w(x,H,W,j,$,q);if(K===I)return d;X+=K,Y&&G.push(...Y),ee&&Q.push(...ee)}return{score:X,labelMatch:y(G),descriptionMatch:y(Q)}}function w(x,H,W,U,$,q){if($||!H){const[X,G]=S(x,U.normalized,U.normalizedLowercase,q&&!U.expectContiguousMatch);if(X){const Q=(0,p.matchesPrefix)(U.normalized,x);let j;return Q?(j=a,j+=Math.round(U.normalized.length/x.length*100)):j=o,{score:j+X,labelMatch:Q||D(G)}}}if(H){let X=H;W&&(X=`${H}${A.sep}`);const G=X.length,Q=`${X}${x}`,[j,K]=S(Q,U.normalized,U.normalizedLowercase,q&&!U.expectContiguousMatch);if(j){const Y=D(K),ee=[],ie=[];return Y.forEach(re=>{re.start<G&&re.end>G?(ee.push({start:0,end:re.end-G}),ie.push({start:re.start,end:G})):re.start>=G?ee.push({start:re.start-G,end:re.end-G}):ie.push(re)}),{score:j,labelMatch:ee,descriptionMatch:ie}}}return d}function D(x){const H=[];if(!x)return H;let W;for(const U of x)W&&W.end===U?W.end+=1:(W={start:U,end:U+1},H.push(W));return H}function y(x){const H=x.sort(($,q)=>$.start-q.start),W=[];let U;for(const $ of H)!U||!T(U,$)?(U=$,W.push($)):(U.start=Math.min(U.start,$.start),U.end=Math.max(U.end,$.end));return W}function T(x,H){return!(x.end<H.start||H.end<x.start)}function _(x,H,W,U,$,q){const X=h(x,W,U,$,q),G=h(H,W,U,$,q),Q=X.score,j=G.score;if((Q===n||j===n)&&Q!==j)return Q===n?-1:1;if(Q>o||j>o){if(Q!==j)return Q>j?-1:1;if(Q<a&&j<a){const se=M(X.labelMatch,G.labelMatch);if(se!==0)return se}const re=$.getItemLabel(x)||"",oe=$.getItemLabel(H)||"";if(re.length!==oe.length)return re.length-oe.length}if(Q!==j)return Q>j?-1:1;const K=Array.isArray(X.labelMatch)&&X.labelMatch.length>0,Y=Array.isArray(G.labelMatch)&&G.labelMatch.length>0;if(K&&!Y)return-1;if(Y&&!K)return 1;const ee=L(x,X,$),ie=L(H,G,$);return ee&&ie&&ee!==ie?ie>ee?-1:1:O(x,H,W,$)}e.compareItemsByFuzzyScore=_;function L(x,H,W){let U=-1,$=-1;if(H.descriptionMatch&&H.descriptionMatch.length?U=H.descriptionMatch[0].start:H.labelMatch&&H.labelMatch.length&&(U=H.labelMatch[0].start),H.labelMatch&&H.labelMatch.length){if($=H.labelMatch[H.labelMatch.length-1].end,H.descriptionMatch&&H.descriptionMatch.length){const q=W.getItemDescription(x);q&&($+=q.length)}}else H.descriptionMatch&&H.descriptionMatch.length&&($=H.descriptionMatch[H.descriptionMatch.length-1].end);return $-U}function M(x,H){if(!x&&!H||(!x||!x.length)&&(!H||!H.length))return 0;if(!H||!H.length)return-1;if(!x||!x.length)return 1;const W=x[0].start,$=x[x.length-1].end-W,q=H[0].start,G=H[H.length-1].end-q;return $===G?0:G<$?1:-1}function O(x,H,W,U){const $=U.getItemLabel(x)||"",q=U.getItemLabel(H)||"",X=U.getItemDescription(x),G=U.getItemDescription(H),Q=$.length+(X?X.length:0),j=q.length+(G?G.length:0);if(Q!==j)return Q-j;const K=U.getItemPath(x),Y=U.getItemPath(H);return K&&Y&&K.length!==Y.length?K.length-Y.length:$!==q?(0,t.compareAnything)($,q,W.normalized):X&&G&&X!==G?(0,t.compareAnything)(X,G,W.normalized):K&&Y&&K!==Y?(0,t.compareAnything)(K,Y,W.normalized):0}function N(x){return x.startsWith('"')&&x.endsWith('"')}const P=" ";function B(x){typeof x!="string"&&(x="");const H=x.toLowerCase(),{pathNormalized:W,normalized:U,normalizedLowercase:$}=V(x),q=W.indexOf(A.sep)>=0,X=N(x);let G;const Q=x.split(P);if(Q.length>1)for(const j of Q){const K=N(j),{pathNormalized:Y,normalized:ee,normalizedLowercase:ie}=V(j);ee&&(G||(G=[]),G.push({original:j,originalLowercase:j.toLowerCase(),pathNormalized:Y,normalized:ee,normalizedLowercase:ie,expectContiguousMatch:K}))}return{original:x,originalLowercase:H,pathNormalized:W,normalized:U,normalizedLowercase:$,values:G,containsPathSeparator:q,expectContiguousMatch:X}}e.prepareQuery=B;function V(x){let H;k.isWindows?H=x.replace(/\//g,A.sep):H=x.replace(/\\/g,A.sep);const W=(0,E.stripWildcards)(H).replace(/\s|"/g,"");return{pathNormalized:H,normalized:W,normalizedLowercase:W.toLowerCase()}}function z(x){return Array.isArray(x)?B(x.map(H=>H.original).join(P)):B(x.original)}e.pieceToQuery=z}),define(ae[144],le([1,0,16,11,164,60,53,14,28]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.patternsEquals=e.getPathTerms=e.getBasenameTerms=e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=e.getEmptyExpression=void 0;function b(){return Object.create(null)}e.getEmptyExpression=b,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const S="[/\\\\]",C="[^/\\\\]",r=/\//g;function u(W,U){switch(W){case 0:return"";case 1:return`${C}*?`;default:return`(?:${S}|${C}+${S}${U?`|${S}${C}+`:""})*?`}}function i(W,U){if(!W)return[];const $=[];let q=!1,X=!1,G="";for(const Q of W){switch(Q){case U:if(!q&&!X){$.push(G),G="";continue}break;case"{":q=!0;break;case"}":q=!1;break;case"[":X=!0;break;case"]":X=!1;break}G+=Q}return G&&$.push(G),$}e.splitGlobAware=i;function f(W){if(!W)return"";let U="";const $=i(W,e.GLOB_SPLIT);if($.every(q=>q===e.GLOBSTAR))U=".*";else{let q=!1;$.forEach((X,G)=>{if(X===e.GLOBSTAR){if(q)return;U+=u(2,G===$.length-1)}else{let Q=!1,j="",K=!1,Y="";for(const ee of X){if(ee!=="}"&&Q){j+=ee;continue}if(K&&(ee!=="]"||!Y)){let ie;ee==="-"?ie=ee:(ee==="^"||ee==="!")&&!Y?ie="^":ee===e.GLOB_SPLIT?ie="":ie=(0,I.escapeRegExpCharacters)(ee),Y+=ie;continue}switch(ee){case"{":Q=!0;continue;case"[":K=!0;continue;case"}":{U+=`(?:${i(j,",").map(oe=>f(oe)).join("|")})`,Q=!1,j="";break}case"]":{U+="["+Y+"]",K=!1,Y="";break}case"?":U+=C;continue;case"*":U+=u(1);continue;default:U+=(0,I.escapeRegExpCharacters)(ee)}}G<$.length-1&&($[G+1]!==e.GLOBSTAR||G+2<$.length)&&(U+=S)}q=X===e.GLOBSTAR})}return U}const c=/^\*\*\/\*\.[\w\.-]+$/,l=/^\*\*\/([\w\.-]+)\/?$/,s=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,d=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,n=/^\*\*((\/[\w\.-]+)+)\/?$/,a=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,o=new A.LRUCache(1e4),g=function(){return!1},h=function(){return null};function v(W,U){if(!W)return h;let $;typeof W!="string"?$=W.pattern:$=W,$=$.trim();const q=`${$}_${!!U.trimForExclusions}`;let X=o.get(q);if(X)return m(X,W);let G;return c.test($)?X=D($.substr(4),$):(G=l.exec(w($,U)))?X=y(G[1],$):(U.trimForExclusions?d:s).test($)?X=T($,U):(G=n.exec(w($,U)))?X=_(G[1].substr(1),$,!0):(G=a.exec(w($,U)))?X=_(G[1],$,!1):X=L($),o.set(q,X),m(X,W)}function m(W,U){if(typeof U=="string")return W;const $=function(q,X){return(0,R.isEqualOrParent)(q,U.base,!E.isLinux)?W(q.substr(U.base.length+1),X):null};return $.allBasenames=W.allBasenames,$.allPaths=W.allPaths,$.basenames=W.basenames,$.patterns=W.patterns,$}function w(W,U){return U.trimForExclusions&&W.endsWith("/**")?W.substr(0,W.length-2):W}function D(W,U){return function($,q){return typeof $=="string"&&$.endsWith(W)?U:null}}function y(W,U){const $=`/${W}`,q=`\\${W}`,X=function(Q,j){return typeof Q!="string"?null:j?j===W?U:null:Q===W||Q.endsWith($)||Q.endsWith(q)?U:null},G=[W];return X.basenames=G,X.patterns=[U],X.allBasenames=G,X}function T(W,U){const $=x(W.slice(1,-1).split(",").map(j=>v(j,U)).filter(j=>j!==h),W),q=$.length;if(!q)return h;if(q===1)return $[0];const X=function(j,K){for(let Y=0,ee=$.length;Y<ee;Y++)if($[Y](j,K))return W;return null},G=$.find(j=>!!j.allBasenames);G&&(X.allBasenames=G.allBasenames);const Q=$.reduce((j,K)=>K.allPaths?j.concat(K.allPaths):j,[]);return Q.length&&(X.allPaths=Q),X}function _(W,U,$){const q=k.sep===k.posix.sep,X=q?W:W.replace(r,k.sep),G=k.sep+X,Q=k.posix.sep+W;let j;return $?j=function(K,Y){return typeof K=="string"&&(K===X||K.endsWith(G)||!q&&(K===W||K.endsWith(Q)))?U:null}:j=function(K,Y){return typeof K=="string"&&(K===X||!q&&K===W)?U:null},j.allPaths=[($?"*/":"./")+W],j}function L(W){try{const U=new RegExp(`^${f(W)}$`);return function($){return U.lastIndex=0,typeof $=="string"&&U.test($)?W:null}}catch{return h}}function M(W,U,$){return!W||typeof U!="string"?!1:O(W)(U,void 0,$)}e.match=M;function O(W,U={}){if(!W)return g;if(typeof W=="string"||N(W)){const $=v(W,U);if($===h)return g;const q=function(X,G){return!!$(X,G)};return $.allBasenames&&(q.allBasenames=$.allBasenames),$.allPaths&&(q.allPaths=$.allPaths),q}return V(W,U)}e.parse=O;function N(W){const U=W;return U?typeof U.base=="string"&&typeof U.pattern=="string":!1}e.isRelativePattern=N;function P(W){return W.allBasenames||[]}e.getBasenameTerms=P;function B(W){return W.allPaths||[]}e.getPathTerms=B;function V(W,U){const $=x(Object.getOwnPropertyNames(W).map(j=>z(j,W[j],U)).filter(j=>j!==h)),q=$.length;if(!q)return h;if(!$.some(j=>!!j.requiresSiblings)){if(q===1)return $[0];const j=function(ee,ie){let re;for(let oe=0,se=$.length;oe<se;oe++){const te=$[oe](ee,ie);if(typeof te=="string")return te;(0,p.isThenable)(te)&&(re||(re=[]),re.push(te))}return re?(async()=>{for(const oe of re){const se=await oe;if(typeof se=="string")return se}return null})():null},K=$.find(ee=>!!ee.allBasenames);K&&(j.allBasenames=K.allBasenames);const Y=$.reduce((ee,ie)=>ie.allPaths?ee.concat(ie.allPaths):ee,[]);return Y.length&&(j.allPaths=Y),j}const X=function(j,K,Y){let ee,ie;for(let re=0,oe=$.length;re<oe;re++){const se=$[re];se.requiresSiblings&&Y&&(K||(K=(0,k.basename)(j)),ee||(ee=K.substr(0,K.length-(0,k.extname)(j).length)));const te=se(j,K,ee,Y);if(typeof te=="string")return te;(0,p.isThenable)(te)&&(ie||(ie=[]),ie.push(te))}return ie?(async()=>{for(const re of ie){const oe=await re;if(typeof oe=="string")return oe}return null})():null},G=$.find(j=>!!j.allBasenames);G&&(X.allBasenames=G.allBasenames);const Q=$.reduce((j,K)=>K.allPaths?j.concat(K.allPaths):j,[]);return Q.length&&(X.allPaths=Q),X}function z(W,U,$){if(U===!1)return h;const q=v(W,$);if(q===h)return h;if(typeof U=="boolean")return q;if(U){const X=U.when;if(typeof X=="string"){const G=(Q,j,K,Y)=>{if(!Y||!q(Q,j))return null;const ee=X.replace("$(basename)",K),ie=Y(ee);return(0,p.isThenable)(ie)?ie.then(re=>re?W:null):ie?W:null};return G.requiresSiblings=!0,G}}return q}function x(W,U){const $=W.filter(j=>!!j.basenames);if($.length<2)return W;const q=$.reduce((j,K)=>{const Y=K.basenames;return Y?j.concat(Y):j},[]);let X;if(U){X=[];for(let j=0,K=q.length;j<K;j++)X.push(U)}else X=$.reduce((j,K)=>{const Y=K.patterns;return Y?j.concat(Y):j},[]);const G=function(j,K){if(typeof j!="string")return null;if(!K){let ee;for(ee=j.length;ee>0;ee--){const ie=j.charCodeAt(ee-1);if(ie===47||ie===92)break}K=j.substr(ee)}const Y=q.indexOf(K);return Y!==-1?X[Y]:null};G.basenames=q,G.patterns=X,G.allBasenames=q;const Q=W.filter(j=>!j.basenames);return Q.push(G),Q}function H(W,U){return(0,t.equals)(W,U,($,q)=>typeof $=="string"&&typeof q=="string"?$===q:typeof $!="string"&&typeof q!="string"?$.base===q.base&&$.pattern===q.pattern:!1)}e.patternsEquals=H}),define(ae[113],le([1,0,21,210,18,28,9]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=e.MarkdownStringTextNewlineStyle=void 0;var E;(function(c){c[c.Paragraph=0]="Paragraph",c[c.Break=1]="Break"})(E=e.MarkdownStringTextNewlineStyle||(e.MarkdownStringTextNewlineStyle={}));class I{constructor(l="",s=!1){if(this.value=l,typeof this.value!="string")throw(0,t.illegalArgument)("value");typeof s=="boolean"?(this.isTrusted=s,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=s.isTrusted??void 0,this.supportThemeIcons=s.supportThemeIcons??!1,this.supportHtml=s.supportHtml??!1)}appendText(l,s=0){return this.value+=r(this.supportThemeIcons?(0,p.escapeIcons)(l):l).replace(/([ \t]+)/g,(d,n)=>" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,s===1?`\\ `:` `),this}appendMarkdown(l){return this.value+=l,this}appendCodeblock(l,s){return this.value+="\n```",this.value+=l,this.value+=` `,this.value+=s,this.value+="\n```\n",this}appendLink(l,s,d){return this.value+="[",this.value+=this._escape(s,"]"),this.value+="](",this.value+=this._escape(String(l),")"),d&&(this.value+=` "${this._escape(this._escape(d,'"'),")")}"`),this.value+=")",this}_escape(l,s){const d=new RegExp((0,A.escapeRegExpCharacters)(s),"g");return l.replace(d,(n,a)=>l.charAt(a-1)!=="\\"?`\\${n}`:n)}}e.MarkdownString=I;function b(c){return S(c)?!c.value:Array.isArray(c)?c.every(b):!0}e.isEmptyMarkdownString=b;function S(c){return c instanceof I?!0:c&&typeof c=="object"?typeof c.value=="string"&&(typeof c.isTrusted=="boolean"||c.isTrusted===void 0)&&(typeof c.supportThemeIcons=="boolean"||c.supportThemeIcons===void 0):!1}e.isMarkdownString=S;function C(c,l){return c===l?!0:!c||!l?!1:c.value===l.value&&c.isTrusted===l.isTrusted&&c.supportThemeIcons===l.supportThemeIcons&&c.supportHtml===l.supportHtml&&(c.baseUri===l.baseUri||!!c.baseUri&&!!l.baseUri&&(0,R.isEqual)(k.URI.from(c.baseUri),k.URI.from(l.baseUri)))}e.markdownStringEqual=C;function r(c){return c.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=r;function u(c){return c.replace(/"/g,""")}e.escapeDoubleQuotes=u;function i(c){return c&&c.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}e.removeMarkdownEscapes=i;function f(c){const l=[],s=c.split("|").map(n=>n.trim());c=s[0];const d=s[1];if(d){const n=/height=(\d+)/.exec(d),a=/width=(\d+)/.exec(d),o=n?n[1]:"",g=a?a[1]:"",h=isFinite(parseInt(g)),v=isFinite(parseInt(o));h&&l.push(`width="${g}"`),v&&l.push(`height="${o}"`)}return{href:c,dimensions:l}}e.parseHrefAndDimensions=f}),define(ae[238],le([1,0,10,748,195,367,139,143,21,6,113,210,356,206,2,357,165,22,52,18,28,9]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.allowedMarkdownAttr=e.renderMarkdown=void 0;const o=Object.freeze({image:(L,M,O)=>{let N=[],P=[];return L&&({href:L,dimensions:N}=(0,S.parseHrefAndDimensions)(L),P.push(`src="${(0,S.escapeDoubleQuotes)(L)}"`)),O&&P.push(`alt="${(0,S.escapeDoubleQuotes)(O)}"`),M&&P.push(`title="${(0,S.escapeDoubleQuotes)(M)}"`),N.length&&(P=P.concat(N)),"<img "+P.join(" ")+">"},paragraph:L=>`<p>${L}</p>`,link:(L,M,O)=>typeof L!="string"?"":(L===O&&(O=(0,S.removeMarkdownEscapes)(O)),M=typeof M=="string"?(0,S.escapeDoubleQuotes)((0,S.removeMarkdownEscapes)(M)):"",L=(0,S.removeMarkdownEscapes)(L),L=L.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="${L}" title="${M||L}">${O}</a>`)});function g(L,M={},O={}){const N=new i.DisposableStore;let P=!1;const B=(0,A.createElement)(M),V=function(X){let G;try{G=(0,c.parse)(decodeURIComponent(X))}catch{}return G?(G=(0,s.cloneAndChange)(G,Q=>{if(L.uris&&L.uris[Q])return a.URI.revive(L.uris[Q])}),encodeURIComponent(JSON.stringify(G))):X},z=function(X,G){const Q=L.uris&&L.uris[X];let j=a.URI.revive(Q);return G?X.startsWith(l.Schemas.data+":")?X:(j||(j=a.URI.parse(X)),l.FileAccess.asBrowserUri(j).toString(!0)):!j||a.URI.parse(X).toString()===j.toString()?X:(j.query&&(j=j.with({query:V(j.query)})),j.toString())},x=new f.marked.Renderer;x.image=o.image,x.link=o.link,x.paragraph=o.paragraph;const H=[];if(M.codeBlockRenderer&&(x.code=(X,G)=>{const Q=r.defaultGenerator.nextId(),j=M.codeBlockRenderer(h(G),X);return H.push(j.then(K=>[Q,K])),`<div class="code" data-code="${Q}">${(0,n.escape)(X)}</div>`}),M.actionHandler){const X=M.actionHandler.disposables.add(new R.DomEmitter(B,"click")),G=M.actionHandler.disposables.add(new R.DomEmitter(B,"auxclick"));M.actionHandler.disposables.add(b.Event.any(X.event,G.event)(Q=>{const j=new k.StandardMouseEvent(Q);if(!j.leftButton&&!j.middleButton)return;let K=j.target;if(!(K.tagName!=="A"&&(K=K.parentElement,!K||K.tagName!=="A")))try{let Y=K.dataset.href;Y&&(L.baseUri&&(Y=v(a.URI.from(L.baseUri),Y)),M.actionHandler.callback(Y,j))}catch(Y){(0,I.onUnexpectedError)(Y)}finally{j.preventDefault()}}))}L.supportHtml||(O.sanitizer=X=>(L.isTrusted?X.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?X:"",O.sanitize=!0,O.silent=!0),O.renderer=x;let W=L.value??"";W.length>1e5&&(W=`${W.substr(0,1e5)}\u2026`),L.supportThemeIcons&&(W=(0,C.markdownEscapeEscapedIcons)(W));let U=f.marked.parse(W,O);L.supportThemeIcons&&(U=(0,E.renderLabelWithIcons)(U).map(G=>typeof G=="string"?G:G.outerHTML).join(""));const q=new DOMParser().parseFromString(m(L,U),"text/html");if(q.body.querySelectorAll("img").forEach(X=>{const G=X.getAttribute("src");if(G){let Q=G;try{L.baseUri&&(Q=v(a.URI.from(L.baseUri),Q))}catch{}X.src=z(Q,!0)}}),q.body.querySelectorAll("a").forEach(X=>{const G=X.getAttribute("href");if(X.setAttribute("href",""),!G||/^data:|javascript:/i.test(G)||/^command:/i.test(G)&&!L.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(G))X.replaceWith(...X.childNodes);else{let Q=z(G,!1);L.baseUri&&(Q=v(a.URI.from(L.baseUri),G)),X.dataset.href=Q}}),B.innerHTML=m(L,q.body.innerHTML),H.length>0&&Promise.all(H).then(X=>{if(P)return;const G=new Map(X),Q=B.querySelectorAll("div[data-code]");for(const j of Q){const K=G.get(j.dataset.code??"");K&&t.reset(j,K)}M.asyncRenderCallback?.()}),M.asyncRenderCallback)for(const X of B.getElementsByTagName("img")){const G=N.add(t.addDisposableListener(X,"load",()=>{G.dispose(),M.asyncRenderCallback()}))}return{element:B,dispose:()=>{P=!0,N.dispose()}}}e.renderMarkdown=g;function h(L){if(!L)return"";const M=L.split(/[\s+|:|,|\{|\?]/,1);return M.length?M[0]:L}function v(L,M){return/^\w[\w\d+.-]*:/.test(M)?M:L.path.endsWith("/")?(0,d.resolvePath)(L,M).toString():(0,d.resolvePath)((0,d.dirname)(L),M).toString()}function m(L,M){const{config:O,allowedSchemes:N}=w(L);p.addHook("uponSanitizeAttribute",(B,V)=>{if(V.attrName==="style"||V.attrName==="class"){if(B.tagName==="SPAN"){if(V.attrName==="style"){V.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(V.attrValue);return}else if(V.attrName==="class"){V.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(V.attrValue);return}}V.keepAttr=!1;return}});const P=t.hookDomPurifyHrefAndSrcSanitizer(N);try{return p.sanitize(M,{...O,RETURN_TRUSTED_TYPE:!0})}finally{p.removeHook("uponSanitizeAttribute"),P.dispose()}}e.allowedMarkdownAttr=["align","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width"];function w(L){const M=[l.Schemas.http,l.Schemas.https,l.Schemas.mailto,l.Schemas.data,l.Schemas.file,l.Schemas.vscodeFileResource,l.Schemas.vscodeRemote,l.Schemas.vscodeRemoteResource];return L.isTrusted&&M.push(l.Schemas.command),{config:{ALLOWED_TAGS:[...t.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:M}}function D(L){return typeof L=="string"?L:y(L)}e.renderStringAsPlaintext=D;function y(L){let M=L.value??"";M.length>1e5&&(M=`${M.substr(0,1e5)}\u2026`);const O=f.marked.parse(M,{renderer:_.getValue()}).replace(/&(#\d+|[a-zA-Z]+);/g,N=>T.get(N)??N);return m({isTrusted:!1},O).toString()}e.renderMarkdownAsPlaintext=y;const T=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),_=new u.Lazy(()=>{const L=new f.marked.Renderer;return L.code=M=>M,L.blockquote=M=>M,L.html=M=>"",L.heading=(M,O,N)=>M+` `,L.hr=()=>"",L.list=(M,O)=>M,L.listitem=M=>M+` `,L.paragraph=M=>M+` `,L.table=(M,O)=>M+O+` `,L.tablerow=M=>M,L.tablecell=(M,O)=>M+" ",L.strong=M=>M,L.em=M=>M,L.codespan=M=>M,L.br=()=>` `,L.del=M=>M,L.image=(M,O,N)=>"",L.text=M=>M,L.link=(M,O,N)=>N,L})}),define(ae[369],le([1,0,10,11,32,113,210,2,13,1240]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function S(u,i){(0,I.isString)(i)?u.title=(0,k.stripIcons)(i):i?.markdownNotSupportedFallback?u.title=i.markdownNotSupportedFallback:u.removeAttribute("title")}e.setupNativeHover=S;class C{constructor(i,f,c){this.hoverDelegate=i,this.target=f,this.fadeInAnimation=c}async update(i,f,c){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let l;if(i===void 0||(0,I.isString)(i)||i instanceof HTMLElement)l=i;else if(!(0,I.isFunction)(i.markdown))l=i.markdown??i.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,b.localize)(0,null),f),this._cancellationTokenSource=new R.CancellationTokenSource;const s=this._cancellationTokenSource.token;if(l=await i.markdown(s),l===void 0&&(l=i.markdownNotSupportedFallback),this.isDisposed||s.isCancellationRequested)return}this.show(l,f,c)}show(i,f,c){const l=this._hoverWidget;if(this.hasContent(i)){const s={content:i,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!l,...c};this._hoverWidget=this.hoverDelegate.showHover(s,f)}l?.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 r(u,i,f,c){let l,s;const d=(h,v)=>{h&&(s?.dispose(),s=void 0),v&&(l?.dispose(),l=void 0),u.onDidHideHover?.()},n=(h,v,m)=>new p.TimeoutTimer(async()=>{(!s||s.isDisposed)&&(s=new C(u,m||i,h>0),await s.update(f,v,c))},h),a=()=>{if(l)return;const h=new E.DisposableStore,v=D=>d(!1,D.fromElement===i);h.add(t.addDisposableListener(i,t.EventType.MOUSE_LEAVE,v,!0));const m=()=>d(!0,!0);h.add(t.addDisposableListener(i,t.EventType.MOUSE_DOWN,m,!0));const w={targetElements:[i],dispose:()=>{}};if(u.placement===void 0||u.placement==="mouse"){const D=y=>{w.x=y.x+10,y.target instanceof HTMLElement&&y.target.classList.contains("action-label")&&d(!0,!0)};h.add(t.addDisposableListener(i,t.EventType.MOUSE_MOVE,D,!0))}h.add(n(u.delay,!1,w)),l=h},o=t.addDisposableListener(i,t.EventType.MOUSE_OVER,a,!0);return{show:h=>{d(!1,!0),n(0,h)},hide:()=>{d(!0,!0)},update:async(h,v)=>{f=h,await s?.update(f,void 0,v)},dispose:()=>{o.dispose(),d(!0,!0)}}}e.setupCustomHover=r}),define(ae[239],le([1,0,10,250,369,2,52,478,1040]),function(J,e,t,p,R,A,k,E){"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 b extends A.Disposable{constructor(i,f){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 c=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")))),f?.supportHighlights||f?.supportIcons?this.nameNode=new r(c,!!f.supportIcons):this.nameNode=new S(c),f?.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new p.HighlightedLabel(t.append(this.descriptionContainer.element,t.$("span.label-description")),{supportIcons:!!f.supportIcons}):this.descriptionNodeFactory=()=>this._register(new I(t.append(this.descriptionContainer.element,t.$("span.label-description")))),this.hoverDelegate=f?.hoverDelegate}get element(){return this.domNode.element}setLabel(i,f,c){const l=["monaco-icon-label"],s=["monaco-icon-label-container"];c&&(c.extraClasses&&l.push(...c.extraClasses),c.italic&&l.push("italic"),c.strikethrough&&l.push("strikethrough"),c.disabledCommand&&s.push("disabled")),this.domNode.className=l.join(" "),this.labelContainer.className=s.join(" "),this.setupHover(c?.descriptionTitle?this.labelContainer:this.element,c?.title),this.nameNode.setLabel(i,c),(f||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof p.HighlightedLabel?(this.descriptionNode.set(f||"",c?c.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,c?.descriptionTitle)):(this.descriptionNode.textContent=f||"",this.setupHover(this.descriptionNode.element,c?.descriptionTitle||""),this.descriptionNode.empty=!f))}setupHover(i,f){const c=this.customHovers.get(i);if(c&&(c.dispose(),this.customHovers.delete(i)),!f){i.removeAttribute("title");return}if(!this.hoverDelegate)(0,R.setupNativeHover)(i,f);else{const l=(0,R.setupCustomHover)(this.hoverDelegate,i,f);l&&this.customHovers.set(i,l)}}dispose(){super.dispose();for(const i of this.customHovers.values())i.dispose();this.customHovers.clear()}}e.IconLabel=b;class S{constructor(i){this.container=i,this.label=void 0,this.singleLabel=void 0}setLabel(i,f){if(!(this.label===i&&(0,k.equals)(this.options,f)))if(this.label=i,this.options=f,typeof i=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=t.append(this.container,t.$("a.label-name",{id:f?.domId}))),this.singleLabel.textContent=i;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let c=0;c<i.length;c++){const l=i[c],s=f?.domId&&`${f?.domId}_${c}`;t.append(this.container,t.$("a.label-name",{id:s,"data-icon-label-count":i.length,"data-icon-label-index":c,role:"treeitem"},l)),c<i.length-1&&t.append(this.container,t.$("span.label-separator",void 0,f?.separator||"/"))}}}}function C(u,i,f){if(!f)return;let c=0;return u.map(l=>{const s={start:c,end:c+l.length},d=f.map(n=>E.Range.intersect(s,n)).filter(n=>!E.Range.isEmpty(n)).map(({start:n,end:a})=>({start:n-c,end:a-c}));return c=s.end+i.length,d})}class r{constructor(i,f){this.container=i,this.supportIcons=f,this.label=void 0,this.singleLabel=void 0}setLabel(i,f){if(!(this.label===i&&(0,k.equals)(this.options,f)))if(this.label=i,this.options=f,typeof i=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new p.HighlightedLabel(t.append(this.container,t.$("a.label-name",{id:f?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(i,f?.matches,void 0,f?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const c=f?.separator||"/",l=C(i,c,f?.matches);for(let s=0;s<i.length;s++){const d=i[s],n=l?l[s]:void 0,a=f?.domId&&`${f?.domId}_${s}`,o=t.$("a.label-name",{id:a,"data-icon-label-count":i.length,"data-icon-label-index":s,role:"treeitem"});new p.HighlightedLabel(t.append(this.container,o),{supportIcons:this.supportIcons}).set(d,n,void 0,f?.labelEscapeNewLines),s<i.length-1&&t.append(o,t.$("span.label-separator",void 0,c))}}}}}),define(ae[1266],le([1,0,10,195,90,238,196,16,6,99,2,14,1244,1049]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxList=void 0;const u=t.$,i="selectOption.entry.template";class f{get templateId(){return i}renderTemplate(s){const d=Object.create(null);return d.root=s,d.text=t.append(s,u(".option-text")),d.detail=t.append(s,u(".option-detail")),d.decoratorRight=t.append(s,u(".option-decorator-right")),d}renderElement(s,d,n){const a=n,o=s.text,g=s.detail,h=s.decoratorRight,v=s.isDisabled;a.text.textContent=o,a.detail.textContent=g||"",a.decoratorRight.innerText=h||"",v?a.root.classList.add("option-disabled"):a.root.classList.remove("option-disabled")}disposeTemplate(s){}}class c extends S.Disposable{constructor(s,d,n,a,o){super(),this.options=[],this._currentSelection=0,this._hasDetails=!1,this._skipLayout=!1,this._sticky=!1,this._isVisible=!1,this.selectBoxOptions=o||Object.create(null),typeof this.selectBoxOptions.minBottomMargin!="number"?this.selectBoxOptions.minBottomMargin=c.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),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=new I.Emitter,this._register(this._onDidSelect),this.styles=a,this.registerListeners(),this.constructSelectDropDown(n),this.selected=d||0,s&&this.setOptions(s,d)}getHeight(){return 18}getTemplateId(){return i}constructSelectDropDown(s){this.contextViewProvider=s,this.selectDropDownContainer=t.$(".monaco-select-box-dropdown-container"),this.selectDropDownContainer.classList.add("monaco-select-box-dropdown-padding"),this.selectionDetailsPane=t.append(this.selectDropDownContainer,u(".select-box-details-pane"));const d=t.append(this.selectDropDownContainer,u(".select-box-dropdown-container-width-control")),n=t.append(d,u(".width-control-div"));this.widthControlElement=document.createElement("span"),this.widthControlElement.className="option-text-width-control",t.append(n,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",d=>{this.selected=d.target.selectedIndex,this._onDidSelect.fire({index:d.target.selectedIndex,selected:d.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,d=>{t.EventHelper.stop(d),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(t.addDisposableListener(this.selectElement,t.EventType.MOUSE_DOWN,d=>{t.EventHelper.stop(d)}));let s;this._register(t.addDisposableListener(this.selectElement,"touchstart",d=>{s=this._isVisible})),this._register(t.addDisposableListener(this.selectElement,"touchend",d=>{t.EventHelper.stop(d),s?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(t.addDisposableListener(this.selectElement,t.EventType.KEY_DOWN,d=>{const n=new R.StandardKeyboardEvent(d);let a=!1;C.isMacintosh?(n.keyCode===18||n.keyCode===16||n.keyCode===10||n.keyCode===3)&&(a=!0):(n.keyCode===18&&n.altKey||n.keyCode===16&&n.altKey||n.keyCode===10||n.keyCode===3)&&(a=!0),a&&(this.showSelectDropDown(),t.EventHelper.stop(d,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(s,d){E.equals(this.options,s)||(this.options=s,this.selectElement.options.length=0,this._hasDetails=!1,this.options.forEach((n,a)=>{this.selectElement.add(this.createOption(n.text,a,n.isDisabled)),typeof n.description=="string"&&(this._hasDetails=!0)})),d!==void 0&&(this.select(d),this._currentSelection=this.selected)}setOptionsList(){this.selectList?.splice(0,this.selectList.length,this.options)}select(s){s>=0&&s<this.options.length?this.selected=s:s>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(s){this.selectBoxOptions.ariaLabel=s,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(s){this.selectElement.tabIndex=s?0:-1}render(s){this.container=s,s.classList.add("select-container"),s.appendChild(this.selectElement),this.applyStyles()}style(s){const d=[];this.styles=s,this.styles.listFocusBackground&&d.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&&d.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&&d.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)?(d.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&d.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&&d.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&&d.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&&d.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; }`),d.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; }"),d.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=d.join(` `),this.applyStyles()}applyStyles(){if(this.selectElement){const s=this.styles.selectBackground?this.styles.selectBackground.toString():"",d=this.styles.selectForeground?this.styles.selectForeground.toString():"",n=this.styles.selectBorder?this.styles.selectBorder.toString():"";this.selectElement.style.backgroundColor=s,this.selectElement.style.color=d,this.selectElement.style.borderColor=n}this.selectList&&this.styleList()}styleList(){if(this.selectList){const s=this.styles.selectBackground?this.styles.selectBackground.toString():"";this.selectList.style({});const d=this.styles.selectListBackground?this.styles.selectListBackground.toString():s;this.selectDropDownListContainer.style.backgroundColor=d,this.selectionDetailsPane.style.backgroundColor=d;const n=this.styles.focusBorder?this.styles.focusBorder.toString():"";this.selectDropDownContainer.style.outlineColor=n,this.selectDropDownContainer.style.outlineOffset="-1px"}}createOption(s,d,n){const a=document.createElement("option");return a.value=s,a.text=s,a.disabled=!!n,a}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:s=>this.renderSelectDropDown(s,!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:s=>this.renderSelectDropDown(s),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(s){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),s&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(s,d){return s.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(d),{dispose:()=>{try{s.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let s=0;return this.options.forEach((d,n)=>{this.updateDetail(n),this.selectionDetailsPane.offsetHeight>s&&(s=this.selectionDetailsPane.offsetHeight)}),s}layoutSelectDropDown(s){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const d=t.getDomNodePagePosition(this.selectElement),n=getComputedStyle(this.selectElement),a=parseFloat(n.getPropertyValue("--dropdown-padding-top"))+parseFloat(n.getPropertyValue("--dropdown-padding-bottom")),o=window.innerHeight-d.top-d.height-(this.selectBoxOptions.minBottomMargin||0),g=d.top-c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,h=this.selectElement.offsetWidth,v=this.setWidthControlElement(this.widthControlElement),m=Math.max(v,Math.round(h)).toString()+"px";this.selectDropDownContainer.style.width=m,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let w=this.selectList.contentHeight;const D=this._hasDetails?this.measureMaxDetailsHeight():0,y=w+a+D,T=Math.floor((o-a-D)/this.getHeight()),_=Math.floor((g-a-D)/this.getHeight());if(s)return d.top+d.height>window.innerHeight-22||d.top<c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||T<1&&_<1?!1:(T<c.DEFAULT_MINIMUM_VISIBLE_OPTIONS&&_>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(d.top+d.height>window.innerHeight-22||d.top<c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN||this._dropDownPosition===0&&T<1||this._dropDownPosition===1&&_<1)return this.hideSelectDropDown(!0),!1;if(this._dropDownPosition===0){if(this._isVisible&&T+_<1)return this.hideSelectDropDown(!0),!1;y>o&&(w=T*this.getHeight())}else y>g&&(w=_*this.getHeight());return this.selectList.layout(w),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=w+a+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=w+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(s){let d=0;if(s){let n=0,a=0;this.options.forEach((o,g)=>{const h=o.detail?o.detail.length:0,v=o.decoratorRight?o.decoratorRight.length:0,m=o.text.length+h+v;m>a&&(n=g,a=m)}),s.textContent=this.options[n].text+(this.options[n].decoratorRight?this.options[n].decoratorRight+" ":""),d=t.getTotalWidth(s)}return d}createSelectList(s){if(this.selectList)return;this.selectDropDownListContainer=t.append(s,u(".select-box-dropdown-list-container")),this.listRenderer=new f,this.selectList=new k.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:a=>{let o=a.text;return a.detail&&(o+=`. ${a.detail}`),a.decoratorRight&&(o+=`. ${a.decoratorRight}`),a.description&&(o+=`. ${a.description}`),o},getWidgetAriaLabel:()=>(0,r.localize)(0,null),getRole:()=>"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const d=this._register(new p.DomEmitter(this.selectDropDownListContainer,"keydown")),n=I.Event.chain(d.event).filter(()=>this.selectList.length>0).map(a=>new R.StandardKeyboardEvent(a));this._register(n.filter(a=>a.keyCode===3).on(a=>this.onEnter(a),this)),this._register(n.filter(a=>a.keyCode===2).on(a=>this.onEnter(a),this)),this._register(n.filter(a=>a.keyCode===9).on(a=>this.onEscape(a),this)),this._register(n.filter(a=>a.keyCode===16).on(a=>this.onUpArrow(a),this)),this._register(n.filter(a=>a.keyCode===18).on(a=>this.onDownArrow(a),this)),this._register(n.filter(a=>a.keyCode===12).on(this.onPageDown,this)),this._register(n.filter(a=>a.keyCode===11).on(this.onPageUp,this)),this._register(n.filter(a=>a.keyCode===14).on(this.onHome,this)),this._register(n.filter(a=>a.keyCode===13).on(this.onEnd,this)),this._register(n.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<"u"&&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(s){if(!this.selectList.length)return;t.EventHelper.stop(s);const d=s.target;if(!d||d.classList.contains("slider"))return;const n=d.closest(".monaco-list-row");if(!n)return;const a=Number(n.getAttribute("data-index")),o=n.classList.contains("option-disabled");a>=0&&a<this.options.length&&!o&&(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(s,d){const n=o=>{for(let g=0;g<o.childNodes.length;g++){const h=o.childNodes.item(g);(h.tagName&&h.tagName.toLowerCase())==="img"?o.removeChild(h):n(h)}},a=(0,A.renderMarkdown)({value:s,supportThemeIcons:!0},{actionHandler:d});return a.element.classList.add("select-box-description-markdown"),n(a.element),a.element}onListFocus(s){!this._isVisible||!this._hasDetails||this.updateDetail(s.indexes[0])}updateDetail(s){this.selectionDetailsPane.innerText="";const d=this.options[s],n=d?.description??"",a=d?.descriptionIsMarkdown??!1;if(n){if(a){const o=d.descriptionMarkdownActionHandler;this.selectionDetailsPane.appendChild(this.renderDescriptionMarkdown(n,o))}else this.selectionDetailsPane.innerText=n;this.selectionDetailsPane.style.display="block"}else this.selectionDetailsPane.style.display="none";this._skipLayout=!0,this.contextViewProvider.layout(),this._skipLayout=!1}onEscape(s){t.EventHelper.stop(s),this.select(this._currentSelection),this.hideSelectDropDown(!0)}onEnter(s){t.EventHelper.stop(s),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(s){if(this.selected<this.options.length-1){t.EventHelper.stop(s,!0);const d=this.options[this.selected+1].isDisabled;if(d&&this.options.length>this.selected+2)this.selected+=2;else{if(d)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(s){this.selected>0&&(t.EventHelper.stop(s,!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(s){t.EventHelper.stop(s),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(s){t.EventHelper.stop(s),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(s){t.EventHelper.stop(s),!(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(s){t.EventHelper.stop(s),!(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(s){const d=b.KeyCodeUtils.toString(s.keyCode);let n=-1;for(let a=0;a<this.options.length-1;a++)if(n=(a+this.selected+1)%this.options.length,this.options[n].text.charAt(0).toUpperCase()===d&&!this.options[n].isDisabled){this.select(n),this.selectList.setFocus([n]),this.selectList.reveal(this.selectList.getFocus()[0]),t.EventHelper.stop(s);break}}dispose(){this.hideSelectDropDown(!1),super.dispose()}}e.SelectBoxList=c,c.DEFAULT_DROPDOWN_MINIMUM_BOTTOM_MARGIN=32,c.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN=2,c.DEFAULT_MINIMUM_VISIBLE_OPTIONS=3}),define(ae[418],le([1,0,1266,1260,140,65,52,14,1048]),function(J,e,t,p,R,A,k,E){"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 R.Widget{constructor(S,C,r,u=(0,k.deepClone)(e.defaultStyles),i){super(),E.isMacintosh&&!i?.useCustomDrawn?this.selectBoxDelegate=new p.SelectBoxNative(S,C,u,i):this.selectBoxDelegate=new t.SelectBoxList(S,C,r,u,i),this._register(this.selectBoxDelegate)}get onDidSelect(){return this.selectBoxDelegate.onDidSelect}setOptions(S,C){this.selectBoxDelegate.setOptions(S,C)}select(S){this.selectBoxDelegate.select(S)}setAriaLabel(S){this.selectBoxDelegate.setAriaLabel(S)}focus(){this.selectBoxDelegate.focus()}blur(){this.selectBoxDelegate.blur()}setFocusable(S){this.selectBoxDelegate.setFocusable(S)}render(S){this.selectBoxDelegate.render(S)}style(S){this.selectBoxDelegate.style(S)}applyStyles(){this.selectBoxDelegate.applyStyles()}}e.SelectBox=I}),define(ae[137],le([1,0,86,181,10,133,369,418,36,2,14,13,1233,712]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectActionViewItem=e.ActionViewItem=e.BaseActionViewItem=void 0;class u extends b.Disposable{get action(){return this._action}constructor(l,s,d={}){super(),this.options=d,this._context=l||this,this._action=s,s instanceof I.Action&&this._register(s.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}handleActionChangeEvent(l){l.enabled!==void 0&&this.updateEnabled(),l.checked!==void 0&&this.updateChecked(),l.class!==void 0&&this.updateClass(),l.label!==void 0&&(this.updateLabel(),this.updateTooltip()),l.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new I.ActionRunner)),this._actionRunner}set actionRunner(l){this._actionRunner=l}isEnabled(){return this._action.enabled}setActionContext(l){this._context=l}render(l){const s=this.element=l;this._register(A.Gesture.addTarget(l));const d=this.options&&this.options.draggable;d&&(l.draggable=!0,t.isFirefox&&this._register((0,R.addDisposableListener)(l,R.EventType.DRAG_START,n=>n.dataTransfer?.setData(p.DataTransfers.TEXT,this._action.label)))),this._register((0,R.addDisposableListener)(s,A.EventType.Tap,n=>this.onClick(n,!0))),this._register((0,R.addDisposableListener)(s,R.EventType.MOUSE_DOWN,n=>{d||R.EventHelper.stop(n,!0),this._action.enabled&&n.button===0&&s.classList.add("active")})),S.isMacintosh&&this._register((0,R.addDisposableListener)(s,R.EventType.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register((0,R.addDisposableListener)(s,R.EventType.CLICK,n=>{R.EventHelper.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register((0,R.addDisposableListener)(s,R.EventType.DBLCLICK,n=>{R.EventHelper.stop(n,!0)})),[R.EventType.MOUSE_UP,R.EventType.MOUSE_OUT].forEach(n=>{this._register((0,R.addDisposableListener)(s,n,a=>{R.EventHelper.stop(a),s.classList.remove("active")}))})}onClick(l,s=!1){R.EventHelper.stop(l,!0);const d=C.isUndefinedOrNull(this._context)?this.options?.useEventAsContext?l:{preserveFocus:s}:this._context;this.actionRunner.run(this._action,d)}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(l){this.element&&(this.element.tabIndex=l?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){if(!this.element)return;const l=this.getTooltip()??"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(l):(this.customHover=(0,k.setupCustomHover)(this.options.hoverDelegate,this.element,l),this._store.add(this.customHover))):this.element.title=l}updateAriaLabel(){if(this.element){const l=this.getTooltip()??"";this.element.setAttribute("aria-label",l)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}e.BaseActionViewItem=u;class i extends u{constructor(l,s,d={}){super(l,s,d),this.options=d,this.options.icon=d.icon!==void 0?d.icon:!1,this.options.label=d.label!==void 0?d.label:!0,this.cssClass=""}render(l){super.render(l),this.element&&(this.label=(0,R.append)(this.element,(0,R.$)("a.action-label"))),this.label&&(this._action.id===I.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,R.append)(this.element,(0,R.$)("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(l){this.label&&(this.label.tabIndex=l?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let l=null;return this.action.tooltip?l=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(l=this.action.label,this.options.keybinding&&(l=r.localize(0,null,l,this.options.keybinding))),l??void 0}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label?.classList.remove("codicon")}updateEnabled(){this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element?.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element?.classList.add("disabled"))}updateAriaLabel(){if(this.label){const l=this.getTooltip()??"";this.label.setAttribute("aria-label",l)}}updateChecked(){this.label&&(this.action.checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}e.ActionViewItem=i;class f extends u{constructor(l,s,d,n,a,o){super(l,s),this.selectBox=new E.SelectBox(d,n,a,void 0,o),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}setOptions(l,s){this.selectBox.setOptions(l,s)}select(l){this.selectBox.select(l)}registerListeners(){this._register(this.selectBox.onDidSelect(l=>this.runAction(l.selected,l.index)))}runAction(l,s){this.actionRunner.run(this._action,this.getActionContext(l,s))}getActionContext(l,s){return l}setFocusable(l){this.selectBox.setFocusable(l)}focus(){this.selectBox?.focus()}blur(){this.selectBox?.blur()}render(l){this.selectBox.render(l)}}e.SelectActionViewItem=f}),define(ae[79],le([1,0,10,90,137,36,6,2,13,712]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.prepareActions=e.ActionBar=e.ActionsOrientation=void 0;var b;(function(r){r[r.HORIZONTAL=0]="HORIZONTAL",r[r.VERTICAL=1]="VERTICAL"})(b=e.ActionsOrientation||(e.ActionsOrientation={}));class S extends E.Disposable{constructor(u,i={}){super(),this._actionRunnerDisposables=this._register(new E.DisposableStore),this.viewItemDisposables=this._register(new E.DisposableMap),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._onWillRun=this._register(new k.Emitter),this.onWillRun=this._onWillRun.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._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(l=>this._onDidRun.fire(l))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(l=>this._onWillRun.fire(l))),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 f,c;switch(this._orientation){case 0:f=[15],c=[17];break;case 1:f=[16],c=[18],this.domNode.className+=" vertical";break}this._register(t.addDisposableListener(this.domNode,t.EventType.KEY_DOWN,l=>{const s=new p.StandardKeyboardEvent(l);let d=!0;const n=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;f&&(s.equals(f[0])||s.equals(f[1]))?d=this.focusPrevious():c&&(s.equals(c[0])||s.equals(c[1]))?d=this.focusNext():s.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():s.equals(14)?d=this.focusFirst():s.equals(13)?d=this.focusLast():s.equals(2)&&n instanceof R.BaseActionViewItem&&n.trapsArrowNavigation?d=this.focusNext():this.isTriggerKeyEvent(s)?this._triggerKeys.keyDown?this.doTrigger(s):this.triggerKeyDown=!0:d=!1,d&&(s.preventDefault(),s.stopPropagation())})),this._register(t.addDisposableListener(this.domNode,t.EventType.KEY_UP,l=>{const s=new p.StandardKeyboardEvent(l);this.isTriggerKeyEvent(s)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(s)),s.preventDefault(),s.stopPropagation()):(s.equals(2)||s.equals(1026))&&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",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),u.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setAriaLabel(u){u?this.actionsList.setAttribute("aria-label",u):this.actionsList.removeAttribute("aria-label")}setFocusable(u){if(this.focusable=u,this.focusable){const i=this.viewItems.find(f=>f instanceof R.BaseActionViewItem&&f.isEnabled());i instanceof R.BaseActionViewItem&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof R.BaseActionViewItem&&i.setFocusable(!1)})}isTriggerKeyEvent(u){let i=!1;return this._triggerKeys.keys.forEach(f=>{i=i||u.equals(f)}),i}updateFocusedItem(){for(let u=0;u<this.actionsList.children.length;u++){const i=this.actionsList.children[u];if(t.isAncestor(t.getActiveElement(),i)){this.focusedItem=u;break}}}get context(){return this._context}set context(u){this._context=u,this.viewItems.forEach(i=>i.setActionContext(u))}get actionRunner(){return this._actionRunner}set actionRunner(u){this._actionRunner=u,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(i=>this._onDidRun.fire(i))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(i=>this._onWillRun.fire(i))),this.viewItems.forEach(i=>i.actionRunner=u)}getContainer(){return this.domNode}hasAction(u){return this.viewItems.findIndex(i=>i.action.id===u.id)!==-1}getAction(u){if(typeof u=="number")return this.viewItems[u]?.action;if(u instanceof HTMLElement){for(;u.parentElement!==this.actionsList;){if(!u.parentElement)return;u=u.parentElement}for(let i=0;i<this.actionsList.childNodes.length;i++)if(this.actionsList.childNodes[i]===u)return this.viewItems[i].action}}push(u,i={}){const f=Array.isArray(u)?u:[u];let c=I.isNumber(i.index)?i.index:null;f.forEach(l=>{const s=document.createElement("li");s.className="action-item",s.setAttribute("role","presentation");let d;this.options.actionViewItemProvider&&(d=this.options.actionViewItemProvider(l)),d||(d=new R.ActionViewItem(this.context,l,{hoverDelegate:this.options.hoverDelegate,...i})),this.options.allowContextMenu||this.viewItemDisposables.set(d,t.addDisposableListener(s,t.EventType.CONTEXT_MENU,n=>{t.EventHelper.stop(n,!0)})),d.actionRunner=this._actionRunner,d.setActionContext(this.context),d.render(s),this.focusable&&d instanceof R.BaseActionViewItem&&this.viewItems.length===0&&d.setFocusable(!0),c===null||c<0||c>=this.actionsList.children.length?(this.actionsList.appendChild(s),this.viewItems.push(d)):(this.actionsList.insertBefore(s,this.actionsList.children[c]),this.viewItems.splice(c,0,d),c++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}getWidth(u){if(u>=0&&u<this.actionsList.children.length){const i=this.actionsList.children.item(u);if(i)return i.clientWidth}return 0}getHeight(u){if(u>=0&&u<this.actionsList.children.length){const i=this.actionsList.children.item(u);if(i)return i.clientHeight}return 0}pull(u){u>=0&&u<this.viewItems.length&&(this.actionsList.removeChild(this.actionsList.childNodes[u]),this.viewItemDisposables.deleteAndDispose(this.viewItems[u]),(0,E.dispose)(this.viewItems.splice(u,1)),this.refreshRole())}clear(){this.viewItems=(0,E.dispose)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),t.clearNode(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(u){let i=!1,f;if(u===void 0?i=!0:typeof u=="number"?f=u:typeof u=="boolean"&&(i=u),i&&typeof this.focusedItem>"u"){const c=this.viewItems.findIndex(l=>l.isEnabled());this.focusedItem=c===-1?void 0:c,this.updateFocus(void 0,void 0,!0)}else f!==void 0&&(this.focusedItem=f),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(u){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let f;do{if(!u&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,f=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!f.isEnabled()||f.action.id===A.Separator.ID));return this.updateFocus(),!0}focusPrevious(u){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let f;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!u&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}f=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!f.isEnabled()||f.action.id===A.Separator.ID));return this.updateFocus(!0),!0}updateFocus(u,i,f=!1){typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&this.viewItems[this.previouslyFocusedItem]?.blur();const c=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(c){let l=!0;I.isFunction(c.focus)||(l=!1),this.options.focusOnlyEnabledItems&&I.isFunction(c.isEnabled)&&!c.isEnabled()&&(l=!1),c.action.id===A.Separator.ID&&(l=!1),l?(f||this.previouslyFocusedItem!==this.focusedItem)&&(c.focus(u),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0)}}doTrigger(u){if(typeof this.focusedItem>"u")return;const i=this.viewItems[this.focusedItem];if(i instanceof R.BaseActionViewItem){const f=i._context===null||i._context===void 0?u:i._context;this.run(i._action,f)}}async run(u,i){await this._actionRunner.run(u,i)}dispose(){this.viewItems=(0,E.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=S;function C(r){if(!r.length)return r;let u=-1;for(let f=0;f<r.length;f++)if(r[f].id!==A.Separator.ID){u=f;break}if(u===-1)return[];r=r.slice(u);for(let f=r.length-1;f>=0&&r[f].id===A.Separator.ID;f--)r.splice(f,1);let i=!1;for(let f=r.length-1;f>=0;f--){const c=r[f].id===A.Separator.ID;c&&!i?r.splice(f,1):c?c&&(i=!1):i=!0}return r}e.prepareActions=C}),define(ae[279],le([1,0,1236,10,90,137,1257,36,29,6,713]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionWithDropdownActionViewItem=e.DropdownMenuActionViewItem=void 0;class S extends A.BaseActionViewItem{constructor(u,i,f,c=Object.create(null)){super(null,u,c),this.actionItem=null,this._onDidChangeVisibility=this._register(new b.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=i,this.contextMenuProvider=f,this.options=c,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(u){this.actionItem=u;const i=l=>{this.element=(0,p.append)(l,(0,p.$)("a.action-label"));let s=[];return typeof this.options.classNames=="string"?s=this.options.classNames.split(/\s+/g).filter(d=>!!d):this.options.classNames&&(s=this.options.classNames),s.find(d=>d==="icon")||s.push("codicon"),this.element.classList.add(...s),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},f=Array.isArray(this.menuActionsOrProvider),c={contextMenuProvider:this.contextMenuProvider,labelRenderer:i,menuAsChild:this.options.menuAsChild,actions:f?this.menuActionsOrProvider:void 0,actionProvider:f?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new k.DropdownMenu(u,c)),this._register(this.dropdownMenu.onDidChangeVisibility(l=>{this.element?.setAttribute("aria-expanded",`${l}`),this._onDidChangeVisibility.fire(l)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const l=this;this.dropdownMenu.menuOptions={...this.dropdownMenu.menuOptions,get anchorAlignment(){return l.options.anchorAlignmentProvider()}}}this.updateTooltip(),this.updateEnabled()}getTooltip(){let u=null;return this.action.tooltip?u=this.action.tooltip:this.action.label&&(u=this.action.label),u??void 0}setActionContext(u){super.setActionContext(u),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=u:this.dropdownMenu.menuOptions={context:u})}show(){this.dropdownMenu?.show()}updateEnabled(){const u=!this.action.enabled;this.actionItem?.classList.toggle("disabled",u),this.element?.classList.toggle("disabled",u)}}e.DropdownMenuActionViewItem=S;class C extends A.ActionViewItem{constructor(u,i,f,c){super(u,i,f),this.contextMenuProvider=c}render(u){if(super.render(u),this.element){this.element.classList.add("action-dropdown-item");const i={getActions:()=>{const l=this.options.menuActionsOrProvider;return Array.isArray(l)?l:l.getActions()}},f=this.options.menuActionClassNames||[],c=(0,p.h)("div.action-dropdown-item-separator",[(0,p.h)("div",{})]).root;c.classList.toggle("prominent",f.includes("prominent")),(0,p.append)(this.element,c),this.dropdownMenuActionViewItem=new S(this._register(new E.Action("dropdownAction",t.localize(0,null))),i,this.contextMenuProvider,{classNames:["dropdown",...I.Codicon.dropDownButton.classNamesArray,...f]}),this.dropdownMenuActionViewItem.render(this.element),this._register((0,p.addDisposableListener)(this.element,p.EventType.KEY_DOWN,l=>{const s=new R.StandardKeyboardEvent(l);let d=!1;this.dropdownMenuActionViewItem?.isFocused()&&s.equals(15)?(d=!0,this.dropdownMenuActionViewItem?.blur(),this.focus()):this.isFocused()&&s.equals(17)&&(d=!0,this.blur(),this.dropdownMenuActionViewItem?.focus()),d&&(s.preventDefault(),s.stopPropagation())}))}}blur(){super.blur(),this.dropdownMenuActionViewItem?.blur()}setFocusable(u){super.setFocusable(u),this.dropdownMenuActionViewItem?.setFocusable(u)}}e.ActionWithDropdownActionViewItem=C}),define(ae[211],le([1,0,10,195,367,79,110,147,140,65,6,405,52,1241,1041]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.MessageType=void 0;const i=t.$;var f;(function(d){d[d.INFO=1]="INFO",d[d.WARNING=2]="WARNING",d[d.ERROR=3]="ERROR"})(f=e.MessageType||(e.MessageType={}));const c={inputBackground:b.Color.fromHex("#3C3C3C"),inputForeground:b.Color.fromHex("#CCCCCC"),inputValidationInfoBorder:b.Color.fromHex("#55AAFF"),inputValidationInfoBackground:b.Color.fromHex("#063B49"),inputValidationWarningBorder:b.Color.fromHex("#B89500"),inputValidationWarningBackground:b.Color.fromHex("#352A05"),inputValidationErrorBorder:b.Color.fromHex("#BE1100"),inputValidationErrorBackground:b.Color.fromHex("#5A1D1D")};class l extends I.Widget{constructor(n,a,o){super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new S.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new S.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=a,this.options=o||Object.create(null),(0,r.mixin)(this.options,c,!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(n,i(".monaco-inputbox.idle"));const g=this.options.flexibleHeight?"textarea":"input",h=t.append(this.element,i(".ibwrapper"));if(this.input=t.append(h,i(g+".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(h,i("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new E.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(n,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(w=>this.input.scrollTop=w.scrollTop));const v=this._register(new p.DomEmitter(document,"selectionchange")),m=S.Event.filter(v.event,()=>document.getSelection()?.anchorNode===h);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._register(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(n){this.placeholder=n,this.input.setAttribute("placeholder",n)}setTooltip(n){this.tooltip=n,this.input.title=n}setAriaLabel(n){this.ariaLabel=n,n?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(n){this.input.value!==n&&(this.input.value=n,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(n=null){this.input.select(),n&&(this.input.setSelectionRange(n.start,n.end),n.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(n){n?this.enable():this.disable()}get width(){return t.getTotalWidth(this.input)}set width(n){if(this.options.flexibleHeight&&this.options.flexibleWidth){let a=0;if(this.mirror){const o=parseFloat(this.mirror.style.paddingLeft||"")||0,g=parseFloat(this.mirror.style.paddingRight||"")||0;a=o+g}this.input.style.width=n-a+"px"}else this.input.style.width=n+"px";this.mirror&&(this.mirror.style.width=n+"px")}set paddingRight(n){this.input.style.width=`calc(100% - ${n}px)`,this.mirror&&(this.mirror.style.paddingRight=n+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const n=this.cachedContentHeight,a=this.cachedHeight,o=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:n,height:a}),this.scrollableElement.setScrollPosition({scrollTop:o})}showMessage(n,a){this.message=n,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(n.type));const o=this.stylesForType(this.message.type);this.element.style.border=o.border?`1px solid ${o.border}`:"",this.message.content&&(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 n=null;return this.validation&&(n=this.validation(this.value),n?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(n)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),n?.type}stylesForType(n){switch(n){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(n){switch(n){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let n;const a=()=>n.style.width=t.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:g=>{if(!this.message)return null;n=t.append(g,i(".monaco-inputbox-container")),a();const h={inline:!0,className:"monaco-inputbox-message"},v=this.message.formatContent?(0,R.renderFormattedText)(this.message.content,h):(0,R.renderText)(this.message.content,h);v.classList.add(this.classForType(this.message.type));const m=this.stylesForType(this.message.type);return v.style.backgroundColor=m.background?m.background.toString():"",v.style.color=m.foreground?m.foreground.toString():"",v.style.border=m.border?`1px solid ${m.border}`:"",t.append(n,v),null},onHide:()=>{this.state="closed"},layout:a});let o;this.message.type===3?o=u.localize(0,null,this.message.content):this.message.type===2?o=u.localize(1,null,this.message.content):o=u.localize(2,null,this.message.content),k.alert(o),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 n=this.value,o=n.charCodeAt(n.length-1)===10?" ":"";(n+o).replace(/\u000c/g,"")?this.mirror.textContent=n+o:this.mirror.innerText="\xA0",this.layout()}style(n){this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const n=this.inputBackground?this.inputBackground.toString():"",a=this.inputForeground?this.inputForeground.toString():"",o=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=n,this.element.style.color=a,this.input.style.backgroundColor="inherit",this.input.style.color=a,this.element.style.borderWidth=o?"1px":"",this.element.style.borderStyle=o?"solid":"",this.element.style.borderColor=o}layout(){if(!this.mirror)return;const n=this.cachedContentHeight;this.cachedContentHeight=t.getTotalHeight(this.mirror),n!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(n){const a=this.inputElement,o=a.selectionStart,g=a.selectionEnd,h=a.value;o!==null&&g!==null&&(this.value=h.substr(0,o)+n+h.substr(g),a.setSelectionRange(o+1,o+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar?.dispose(),super.dispose()}}e.InputBox=l;class s extends l{constructor(n,a,o){const g=u.localize(3,null),h=` or \u21C5 ${g}`,v=` (\u21C5 ${g})`;super(n,a,o),this._onDidFocus=this._register(new S.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new S.Emitter),this.onDidBlur=this._onDidBlur.event,this.history=new C.HistoryNavigator(o.history,100);const m=()=>{if(o.showHistoryHint&&o.showHistoryHint()&&!this.placeholder.endsWith(h)&&!this.placeholder.endsWith(v)&&this.history.getHistory().length){const w=this.placeholder.endsWith(")")?h:v,D=this.placeholder+w;o.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=D:this.setPlaceHolder(D)}};this.observer=new MutationObserver((w,D)=>{w.forEach(y=>{y.target.textContent||m()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>m()),this.onblur(this.input,()=>{const w=D=>{if(this.placeholder.endsWith(D)){const y=this.placeholder.slice(0,this.placeholder.length-D.length);return o.showPlaceholderOnFocus?this.placeholder=y:this.setPlaceHolder(y),!0}else return!1};w(v)||w(h)})}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 n=this.getNextValue();n&&(n=n===this.value?this.getNextValue():n),n&&(this.value=n,k.status(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let n=this.getPreviousValue();n&&(n=n===this.value?this.getPreviousValue():n),n&&(this.value=n,k.status(this.value))}clearHistory(){this.history.clear()}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let n=this.history.current();return n||(n=this.history.last(),this.history.next()),n}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}e.HistoryInputBox=s}),define(ae[579],le([1,0,86,133,10,90,139,79,137,480,749,147,36,11,29,210,2,14,28]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"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 d;(function(m){m[m.Right=0]="Right",m[m.Left=1]="Left"})(d=e.Direction||(e.Direction={}));class n extends E.ActionBar{constructor(w,D,y={}){w.classList.add("monaco-menu-container"),w.setAttribute("role","presentation");const T=document.createElement("div");T.classList.add("monaco-menu"),T.setAttribute("role","presentation"),super(T,{orientation:1,actionViewItemProvider:M=>this.doGetActionViewItem(M,y,_),context:y.context,actionRunner:y.actionRunner,ariaLabel:y.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...l.isMacintosh||l.isLinux?[10]:[]],keyDown:!0}}),this.menuElement=T,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new c.DisposableStore),this.initializeOrUpdateStyleSheet(w,{}),this._register(p.Gesture.addTarget(T)),(0,R.addDisposableListener)(T,R.EventType.KEY_DOWN,M=>{new A.StandardKeyboardEvent(M).equals(2)&&M.preventDefault()}),y.enableMnemonics&&this.menuDisposables.add((0,R.addDisposableListener)(T,R.EventType.KEY_DOWN,M=>{const O=M.key.toLocaleLowerCase();if(this.mnemonics.has(O)){R.EventHelper.stop(M,!0);const N=this.mnemonics.get(O);if(N.length===1&&(N[0]instanceof o&&N[0].container&&this.focusItemByElement(N[0].container),N[0].onClick(M)),N.length>1){const P=N.shift();P&&P.container&&(this.focusItemByElement(P.container),N.push(P)),this.mnemonics.set(O,N)}}})),l.isLinux&&this._register((0,R.addDisposableListener)(T,R.EventType.KEY_DOWN,M=>{const O=new A.StandardKeyboardEvent(M);O.equals(14)||O.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),R.EventHelper.stop(M,!0)):(O.equals(13)||O.equals(12))&&(this.focusedItem=0,this.focusPrevious(),R.EventHelper.stop(M,!0))})),this._register((0,R.addDisposableListener)(this.domNode,R.EventType.MOUSE_OUT,M=>{const O=M.relatedTarget;(0,R.isAncestor)(O,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),M.stopPropagation())})),this._register((0,R.addDisposableListener)(this.actionsList,R.EventType.MOUSE_OVER,M=>{let O=M.target;if(!(!O||!(0,R.isAncestor)(O,this.actionsList)||O===this.actionsList)){for(;O.parentElement!==this.actionsList&&O.parentElement!==null;)O=O.parentElement;if(O.classList.contains("action-item")){const N=this.focusedItem;this.setFocusedItem(O),N!==this.focusedItem&&this.updateFocus()}}})),this._register(p.Gesture.addTarget(this.actionsList)),this._register((0,R.addDisposableListener)(this.actionsList,p.EventType.Tap,M=>{let O=M.initialTarget;if(!(!O||!(0,R.isAncestor)(O,this.actionsList)||O===this.actionsList)){for(;O.parentElement!==this.actionsList&&O.parentElement!==null;)O=O.parentElement;if(O.classList.contains("action-item")){const N=this.focusedItem;this.setFocusedItem(O),N!==this.focusedItem&&this.updateFocus()}}}));const _={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 L=this.scrollableElement.getDomNode();L.style.position="",this._register((0,R.addDisposableListener)(T,p.EventType.Change,M=>{R.EventHelper.stop(M,!0);const O=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:O-M.translationY})})),this._register((0,R.addDisposableListener)(L,R.EventType.MOUSE_UP,M=>{M.preventDefault()})),T.style.maxHeight=`${Math.max(10,window.innerHeight-w.getBoundingClientRect().top-35)}px`,D=D.filter(M=>y.submenuIds?.has(M.id)?(console.warn(`Found submenu cycle: ${M.id}`),!1):!0),this.push(D,{icon:!0,label:!0,isMenu:!0}),w.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(M=>!(M instanceof g)).forEach((M,O,N)=>{M.updatePositionInSet(O+1,N.length)})}initializeOrUpdateStyleSheet(w,D){this.styleSheet||((0,R.isInShadowDOM)(w)?this.styleSheet=(0,R.createStyleSheet)(w):(n.globalStyleSheet||(n.globalStyleSheet=(0,R.createStyleSheet)()),this.styleSheet=n.globalStyleSheet)),this.styleSheet.textContent=v(D,(0,R.isInShadowDOM)(w))}style(w){const D=this.getContainer();this.initializeOrUpdateStyleSheet(D,w);const y=w.foregroundColor?`${w.foregroundColor}`:"",T=w.backgroundColor?`${w.backgroundColor}`:"",_=w.borderColor?`1px solid ${w.borderColor}`:"",L="5px",M=w.shadowColor?`0 2px 8px ${w.shadowColor}`:"";D.style.outline=_,D.style.borderRadius=L,D.style.color=y,D.style.backgroundColor=T,D.style.boxShadow=M,this.viewItems&&this.viewItems.forEach(O=>{(O instanceof a||O instanceof g)&&O.style(w)})}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}get scrollOffset(){return this.menuElement.scrollTop}trigger(w){if(w<=this.viewItems.length&&w>=0){const D=this.viewItems[w];if(D instanceof o)super.focus(w),D.open(!0);else if(D instanceof a)super.run(D._action,D._context);else return}}focusItemByElement(w){const D=this.focusedItem;this.setFocusedItem(w),D!==this.focusedItem&&this.updateFocus()}setFocusedItem(w){for(let D=0;D<this.actionsList.children.length;D++){const y=this.actionsList.children[D];if(w===y){this.focusedItem=D;break}}}updateFocus(w){super.updateFocus(w,!0,!0),typeof this.focusedItem<"u"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(w,D,y){if(w instanceof r.Separator)return new g(D.context,w,{icon:!0});if(w instanceof r.SubmenuAction){const T=new o(w,w.actions,y,{...D,submenuIds:new Set([...D.submenuIds||[],w.id])});if(D.enableMnemonics){const _=T.getMnemonic();if(_&&T.isEnabled()){let L=[];this.mnemonics.has(_)&&(L=this.mnemonics.get(_)),L.push(T),this.mnemonics.set(_,L)}}return T}else{const T={enableMnemonics:D.enableMnemonics,useEventAsContext:D.useEventAsContext};if(D.getKeyBinding){const L=D.getKeyBinding(w);if(L){const M=L.getLabel();M&&(T.keybinding=M)}}const _=new a(D.context,w,T);if(D.enableMnemonics){const L=_.getMnemonic();if(L&&_.isEnabled()){let M=[];this.mnemonics.has(L)&&(M=this.mnemonics.get(L)),M.push(_),this.mnemonics.set(L,M)}}return _}}}e.Menu=n;class a extends I.BaseActionViewItem{constructor(w,D,y={}){if(y.isMenu=!0,super(D,D,y),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){const T=this.action.label;if(T){const _=e.MENU_MNEMONIC_REGEX.exec(T);_&&(this.mnemonic=(_[1]?_[1]:_[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new u.RunOnceScheduler(()=>{!this.element||(this._register((0,R.addDisposableListener)(this.element,R.EventType.MOUSE_UP,T=>{if(R.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,R.addDisposableListener)(this.element,R.EventType.CONTEXT_MENU,T=>{R.EventHelper.stop(T,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(w){super.render(w),this.element&&(this.container=w,this.item=(0,R.append)(this.element,(0,R.$)("a.action-menu-item")),this._action.id===r.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,R.append)(this.item,(0,R.$)("span.menu-item-check"+i.Codicon.menuSelection.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,R.append)(this.item,(0,R.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,R.append)(this.item,(0,R.$)("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?.focus(),this.applyStyle()}updatePositionInSet(w,D){this.item&&(this.item.setAttribute("aria-posinset",`${w}`),this.item.setAttribute("aria-setsize",`${D}`))}updateLabel(){if(!!this.label&&this.options.label){(0,R.clearNode)(this.label);let w=(0,f.stripIcons)(this.action.label);if(w){const D=h(w);this.options.enableMnemonics||(w=D),this.label.setAttribute("aria-label",D.replace(/&&/g,"&"));const y=e.MENU_MNEMONIC_REGEX.exec(w);if(y){w=s.escape(w),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let T=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(w);for(;T&&T[1];)T=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(w);const _=L=>L.replace(/&&/g,"&");T?this.label.append(s.ltrim(_(w.substr(0,T.index))," "),(0,R.$)("u",{"aria-hidden":"true"},T[3]),s.rtrim(_(w.substr(T.index+T[0].length))," ")):this.label.innerText=_(w).trim(),this.item?.setAttribute("aria-keyshortcuts",(y[1]?y[1]:y[3]).toLocaleLowerCase())}else this.label.innerText=w.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.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.action.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 w=this.action.checked;this.item.classList.toggle("checked",!!w),w!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",w?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const w=this.element&&this.element.classList.contains("focused"),D=w&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,y=w&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,T=w&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",_=w&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=D?D.toString():"",this.item.style.backgroundColor=y?y.toString():"",this.item.style.outline=T,this.item.style.outlineOffset=_),this.check&&(this.check.style.color=D?D.toString():"")}style(w){this.menuStyle=w,this.applyStyle()}}class o extends a{constructor(w,D,y,T){super(w,w,T),this.submenuActions=D,this.parentData=y,this.submenuOptions=T,this.mysubmenu=null,this.submenuDisposables=this._register(new c.DisposableStore),this.mouseOver=!1,this.expandDirection=T&&T.expandDirection!==void 0?T.expandDirection:d.Right,this.showScheduler=new u.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new u.RunOnceScheduler(()=>{this.element&&!(0,R.isAncestor)((0,R.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(w){super.render(w),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,R.append)(this.item,(0,R.$)("span.submenu-indicator"+i.Codicon.menuSubmenu.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,R.addDisposableListener)(this.element,R.EventType.KEY_UP,D=>{const y=new A.StandardKeyboardEvent(D);(y.equals(17)||y.equals(3))&&(R.EventHelper.stop(D,!0),this.createSubmenu(!0))})),this._register((0,R.addDisposableListener)(this.element,R.EventType.KEY_DOWN,D=>{const y=new A.StandardKeyboardEvent(D);(0,R.getActiveElement)()===this.item&&(y.equals(17)||y.equals(3))&&R.EventHelper.stop(D,!0)})),this._register((0,R.addDisposableListener)(this.element,R.EventType.MOUSE_OVER,D=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,R.addDisposableListener)(this.element,R.EventType.MOUSE_LEAVE,D=>{this.mouseOver=!1})),this._register((0,R.addDisposableListener)(this.element,R.EventType.FOCUS_OUT,D=>{this.element&&!(0,R.isAncestor)((0,R.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(w){this.cleanupExistingSubmenu(!1),this.createSubmenu(w)}onClick(w){R.EventHelper.stop(w,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(w){if(this.parentData.submenu&&(w||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(w,D,y,T){const _={top:0,left:0};return _.left=(0,S.layout)(w.width,D.width,{position:T===d.Right?0:1,offset:y.left,size:y.width}),_.left>=y.left&&_.left<y.left+y.width&&(y.left+10+D.width<=w.width&&(_.left=y.left+10),y.top+=10,y.height=0),_.top=(0,S.layout)(w.height,D.height,{position:0,offset:y.top,size:0}),_.top+D.height===y.top&&_.top+y.height+D.height<=w.height&&(_.top+=y.height),_}createSubmenu(w=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=(0,R.append)(this.element,(0,R.$)("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const D=getComputedStyle(this.parentData.parent.domNode),y=parseFloat(D.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 n(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new r.EmptySubmenuAction],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const T=this.element.getBoundingClientRect(),_={top:T.top-y,left:T.left,height:T.height+2*y,width:T.width},L=this.submenuContainer.getBoundingClientRect(),{top:M,left:O}=this.calculateSubmenuMenuLayout(new R.Dimension(window.innerWidth,window.innerHeight),R.Dimension.lift(L),_,this.expandDirection);this.submenuContainer.style.left=`${O-L.left}px`,this.submenuContainer.style.top=`${M-L.top}px`,this.submenuDisposables.add((0,R.addDisposableListener)(this.submenuContainer,R.EventType.KEY_UP,N=>{new A.StandardKeyboardEvent(N).equals(15)&&(R.EventHelper.stop(N,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,R.addDisposableListener)(this.submenuContainer,R.EventType.KEY_DOWN,N=>{new A.StandardKeyboardEvent(N).equals(15)&&R.EventHelper.stop(N,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(w),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(w){this.item&&this.item?.setAttribute("aria-expanded",w)}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const D=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=D?`${D}`:""),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 g extends I.ActionViewItem{style(w){this.label&&(this.label.style.borderBottomColor=w.separatorColor?`${w.separatorColor}`:"")}}function h(m){const w=e.MENU_MNEMONIC_REGEX,D=w.exec(m);if(!D)return m;const y=!D[1];return m.replace(w,y?"$2$3":"").trim()}e.cleanMnemonic=h;function v(m,w){let D=` .monaco-menu { font-size: 13px; border-radius: 5px; min-width: 160px; } ${(0,b.formatRule)(i.Codicon.menuSelection)} ${(0,b.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 { color: var(--vscode-disabledForeground); } /* 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 var(--vscode-menu-separatorBackground); padding-top: 1px; padding: 30px; } .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-menu-item:hover .keybinding, .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { opacity: unset; } .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 { width: 100%; height: 0px !important; opacity: 1; } .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; } .hc-black .context-view.monaco-menu-container, .hc-light .context-view.monaco-menu-container, :host-context(.hc-black) .context-view.monaco-menu-container, :host-context(.hc-light) .context-view.monaco-menu-container { box-shadow: none; } .hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, .hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, :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: .6em 0; } .monaco-menu .monaco-action-bar.vertical .action-menu-item { height: 2em; } .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; margin: 5px 0 !important; padding: 0; border-radius: 0; } .linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, :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; } .linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator { :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(w){D+=` /* 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&&(D+=` .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&&(D+=` .monaco-scrollable-element > .scrollbar > .slider { background: ${T}; } `);const _=m.scrollbarSliderHoverBackground;_&&(D+=` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${_}; } `);const L=m.scrollbarSliderActiveBackground;L&&(D+=` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${L}; } `)}return D}}),define(ae[1267],le([1,0,86,10,90,139,133,579,36,16,11,29,6,99,2,14,28,13,1243,1043]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuBar=void 0;const d=p.$;var n;(function(o){o[o.HIDDEN=0]="HIDDEN",o[o.VISIBLE=1]="VISIBLE",o[o.FOCUSED=2]="FOCUSED",o[o.OPEN=3]="OPEN"})(n||(n={}));class a extends i.Disposable{constructor(g,h={}){super(),this.container=g,this.options=h,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=n.VISIBLE,this._onVisibilityChange=this._register(new r.Emitter),this._onFocusStateChange=this._register(new r.Emitter),this.createOverflowMenu(),this.menuUpdater=this._register(new S.RunOnceScheduler(()=>this.update(),200)),this.actionRunner=this.options.actionRunner??this._register(new I.ActionRunner),this._register(this.actionRunner.onWillRun(()=>{this.setUnfocusedState()})),this._register(p.ModifierKeyEmitter.getInstance().event(this.onModifierKeyToggled,this)),this._register(p.addDisposableListener(this.container,p.EventType.KEY_DOWN,v=>{const m=new R.StandardKeyboardEvent(v);let w=!0;const D=v.key?v.key.toLocaleLowerCase():"",y=f.isMacintosh&&!this.isCompact;if(m.equals(15)||y&&m.equals(1026))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(D)){const T=this.mnemonics.get(D);this.onMenuTriggered(T,!1)}else w=!1;!this.isCompact&&(m.equals(1026)||m.equals(2))&&m.preventDefault(),w&&(m.preventDefault(),m.stopPropagation())})),this._register(p.addDisposableListener(window,p.EventType.MOUSE_DOWN,()=>{this.isFocused&&this.setUnfocusedState()})),this._register(p.addDisposableListener(this.container,p.EventType.FOCUS_IN,v=>{const m=v;m.relatedTarget&&(this.container.contains(m.relatedTarget)||(this.focusToReturn=m.relatedTarget))})),this._register(p.addDisposableListener(this.container,p.EventType.FOCUS_OUT,v=>{const m=v;m.relatedTarget?m.relatedTarget&&!this.container.contains(m.relatedTarget)&&(this.focusToReturn=void 0,this.setUnfocusedState()):this.setUnfocusedState()})),this._register(p.addDisposableListener(window,p.EventType.KEY_DOWN,v=>{if(!this.options.enableMnemonics||!v.altKey||v.ctrlKey||v.defaultPrevented)return;const m=v.key.toLocaleLowerCase();if(!this.mnemonics.has(m))return;this.mnemonicsInUse=!0,this.updateMnemonicVisibility(!0);const w=this.mnemonics.get(m);this.onMenuTriggered(w,!1)})),this.setUnfocusedState()}push(g){(0,b.asArray)(g).forEach(v=>{const m=this.menus.length,w=(0,E.cleanMnemonic)(v.label),D=E.MENU_MNEMONIC_REGEX.exec(v.label);if(D){const y=D[1]?D[1]:D[3];this.registerMnemonic(this.menus.length,y)}if(this.isCompact)this.menus.push(v);else{const y=d("div.menubar-menu-button",{role:"menuitem",tabindex:-1,"aria-label":w,"aria-haspopup":!0}),T=d("div.menubar-menu-title",{role:"none","aria-hidden":!0});y.appendChild(T),this.container.insertBefore(y,this.overflowMenu.buttonElement),this.updateLabels(T,y,v.label),this._register(p.addDisposableListener(y,p.EventType.KEY_UP,_=>{const L=new R.StandardKeyboardEvent(_);let M=!0;(L.equals(18)||L.equals(3))&&!this.isOpen?(this.focusedMenu={index:m},this.openedViaKeyboard=!0,this.focusState=n.OPEN):M=!1,M&&(L.preventDefault(),L.stopPropagation())})),this._register(k.Gesture.addTarget(y)),this._register(p.addDisposableListener(y,k.EventType.Tap,_=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&p.isAncestor(_.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(m,!0),_.preventDefault(),_.stopPropagation())})),this._register(p.addDisposableListener(y,p.EventType.MOUSE_DOWN,_=>{if(!new A.StandardMouseEvent(_).leftButton){_.preventDefault();return}this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(m,!0)),_.preventDefault(),_.stopPropagation()})),this._register(p.addDisposableListener(y,p.EventType.MOUSE_UP,_=>{_.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(m,!0))})),this._register(p.addDisposableListener(y,p.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:v.label,actions:v.actions,buttonElement:y,titleElement:T})}})}createOverflowMenu(){const g=this.isCompact?s.localize(0,null):s.localize(1,null),h=d("div.menubar-menu-button",{role:"menuitem",tabindex:this.isCompact?0:-1,"aria-label":g,"aria-haspopup":!0}),v=d("div.menubar-menu-title.toolbar-toggle-more"+C.Codicon.menuBarMore.cssSelector,{role:"none","aria-hidden":!0});h.appendChild(v),this.container.appendChild(h),h.style.visibility="hidden",this._register(p.addDisposableListener(h,p.EventType.KEY_UP,m=>{const w=new R.StandardKeyboardEvent(m);let D=!0;const y=[3];this.isCompact?(y.push(10),this.options.compactMode===E.Direction.Right?y.push(17):this.options.compactMode===E.Direction.Left&&y.push(15)):y.push(18),y.some(T=>w.equals(T))&&!this.isOpen?(this.focusedMenu={index:a.OVERFLOW_INDEX},this.openedViaKeyboard=!0,this.focusState=n.OPEN):D=!1,D&&(w.preventDefault(),w.stopPropagation())})),this._register(k.Gesture.addTarget(h)),this._register(p.addDisposableListener(h,k.EventType.Tap,m=>{this.isOpen&&this.focusedMenu&&this.focusedMenu.holder&&p.isAncestor(m.initialTarget,this.focusedMenu.holder)||(this.ignoreNextMouseUp=!1,this.onMenuTriggered(a.OVERFLOW_INDEX,!0),m.preventDefault(),m.stopPropagation())})),this._register(p.addDisposableListener(h,p.EventType.MOUSE_DOWN,m=>{if(!new A.StandardMouseEvent(m).leftButton){m.preventDefault();return}this.isOpen?this.ignoreNextMouseUp=!1:(this.ignoreNextMouseUp=!0,this.onMenuTriggered(a.OVERFLOW_INDEX,!0)),m.preventDefault(),m.stopPropagation()})),this._register(p.addDisposableListener(h,p.EventType.MOUSE_UP,m=>{m.defaultPrevented||(this.ignoreNextMouseUp?this.ignoreNextMouseUp=!1:this.isFocused&&this.onMenuTriggered(a.OVERFLOW_INDEX,!0))})),this._register(p.addDisposableListener(h,p.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},h.focus())})),this.overflowMenu={buttonElement:h,titleElement:v,label:"More",actions:[]}}updateMenu(g){const h=this.menus.filter(v=>v.label===g.label);h&&h.length&&(h[0].actions=g.actions)}dispose(){super.dispose(),this.menus.forEach(g=>{g.titleElement?.remove(),g.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 g=this.menus[0].buttonElement.getBoundingClientRect().left;return(this.hasOverflow?this.overflowMenu.buttonElement.getBoundingClientRect().right:this.menus[this.menus.length-1].buttonElement.getBoundingClientRect().right)-g}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=n.FOCUSED):this.isOpen||this.setUnfocusedState()}updateOverflowAction(){if(!this.menus||!this.menus.length)return;const g="overflow-menu-only";this.container.classList.toggle(g,!1);const h=this.container.offsetWidth;let v=0,m=this.isCompact;const w=this.numMenusShown;this.numMenusShown=0;const D=this.menus.filter(y=>y.buttonElement!==void 0&&y.titleElement!==void 0);for(const y of D){if(!m){const T=y.buttonElement.offsetWidth;v+T>h?m=!0:(v+=T,this.numMenusShown++,this.numMenusShown>w&&(y.buttonElement.style.visibility="visible"))}m&&(y.buttonElement.style.visibility="hidden")}if(this.numMenusShown-1<=D.length/2){for(const y of D)y.buttonElement.style.visibility="hidden";m=!0,this.numMenusShown=0,v=0}if(this.isCompact){this.overflowMenu.actions=[];for(let T=this.numMenusShown;T<this.menus.length;T++)this.overflowMenu.actions.push(new I.SubmenuAction(`menubar.submenu.${this.menus[T].label}`,this.menus[T].label,this.menus[T].actions||[]));const y=this.options.getCompactMenuActions?.();y&&y.length&&(this.overflowMenu.actions.push(new I.Separator),this.overflowMenu.actions.push(...y)),this.overflowMenu.buttonElement.style.visibility="visible"}else if(m){for(;v+this.overflowMenu.buttonElement.offsetWidth>h&&this.numMenusShown>0;){this.numMenusShown--;const y=D[this.numMenusShown].buttonElement.offsetWidth;D[this.numMenusShown].buttonElement.style.visibility="hidden",v-=y}this.overflowMenu.actions=[];for(let y=this.numMenusShown;y<D.length;y++)this.overflowMenu.actions.push(new I.SubmenuAction(`menubar.submenu.${D[y].label}`,D[y].label,D[y].actions||[]));this.overflowMenu.buttonElement.nextElementSibling!==D[this.numMenusShown].buttonElement&&(this.overflowMenu.buttonElement.remove(),this.container.insertBefore(this.overflowMenu.buttonElement,D[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";this.container.classList.toggle(g,this.numMenusShown===0)}updateLabels(g,h,v){const m=(0,E.cleanMnemonic)(v);if(this.options.enableMnemonics){const D=c.escape(v);E.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let y=E.MENU_ESCAPED_MNEMONIC_REGEX.exec(D);for(;y&&y[1];)y=E.MENU_ESCAPED_MNEMONIC_REGEX.exec(D);const T=_=>_.replace(/&&/g,"&");y?(g.innerText="",g.append(c.ltrim(T(D.substr(0,y.index))," "),d("mnemonic",{"aria-hidden":"true"},y[3]),c.rtrim(T(D.substr(y.index+y[0].length))," "))):g.innerText=T(D).trim()}else g.innerText=m.replace(/&&/g,"&");const w=E.MENU_MNEMONIC_REGEX.exec(v);if(w){const D=w[1]?w[1]:w[3];this.options.enableMnemonics?h.setAttribute("aria-keyshortcuts","Alt+"+D.toLocaleLowerCase()):h.removeAttribute("aria-keyshortcuts")}}style(g){this.menuStyle=g}update(g){if(g&&(this.options=g),this.isFocused){this.updatePending=!0;return}this.menus.forEach(h=>{!h.buttonElement||!h.titleElement||this.updateLabels(h.titleElement,h.buttonElement,h.label)}),this.overflowLayoutScheduled||(this.overflowLayoutScheduled=p.scheduleAtNextAnimationFrame(()=>{this.updateOverflowAction(),this.overflowLayoutScheduled=void 0})),this.setUnfocusedState()}registerMnemonic(g,h){this.mnemonics.set(h.toLocaleLowerCase(),g)}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(g){if(this._focusState>=n.FOCUSED&&g<n.FOCUSED&&this.updatePending&&(this.menuUpdater.schedule(),this.updatePending=!1),g===this._focusState)return;const h=this.isVisible,v=this.isOpen,m=this.isFocused;switch(this._focusState=g,g){case n.HIDDEN:h&&this.hideMenubar(),v&&this.cleanupCustomMenu(),m&&(this.focusedMenu=void 0,this.focusToReturn&&(this.focusToReturn.focus(),this.focusToReturn=void 0));break;case n.VISIBLE:h||this.showMenubar(),v&&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 n.FOCUSED:h||this.showMenubar(),v&&this.cleanupCustomMenu(),this.focusedMenu&&(this.focusedMenu.index===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[this.focusedMenu.index].buttonElement?.focus());break;case n.OPEN:h||this.showMenubar(),this.focusedMenu&&this.showCustomMenu(this.focusedMenu.index,this.openedViaKeyboard);break}this._focusState=g,this._onFocusStateChange.fire(this.focusState>=n.FOCUSED)}get isVisible(){return this.focusState>=n.VISIBLE}get isFocused(){return this.focusState>=n.FOCUSED}get isOpen(){return this.focusState>=n.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=n.HIDDEN:this.options.visibility==="classic"&&t.isFullscreen()?this.focusState=n.HIDDEN:this.focusState=n.VISIBLE,this.ignoreNextMouseUp=!1,this.mnemonicsInUse=!1,this.updateMnemonicVisibility(!1)}focusPrevious(){if(!this.focusedMenu||this.numMenusShown===0)return;let g=(this.focusedMenu.index-1+this.numMenusShown)%this.numMenusShown;this.focusedMenu.index===a.OVERFLOW_INDEX?g=this.numMenusShown-1:this.focusedMenu.index===0&&this.hasOverflow&&(g=a.OVERFLOW_INDEX),g!==this.focusedMenu.index&&(this.isOpen?(this.cleanupCustomMenu(),this.showCustomMenu(g)):this.isFocused&&(this.focusedMenu.index=g,g===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[g].buttonElement?.focus()))}focusNext(){if(!this.focusedMenu||this.numMenusShown===0)return;let g=(this.focusedMenu.index+1)%this.numMenusShown;this.focusedMenu.index===a.OVERFLOW_INDEX?g=0:this.focusedMenu.index===this.numMenusShown-1&&(g=a.OVERFLOW_INDEX),g!==this.focusedMenu.index&&(this.isOpen?(this.cleanupCustomMenu(),this.showCustomMenu(g)):this.isFocused&&(this.focusedMenu.index=g,g===a.OVERFLOW_INDEX?this.overflowMenu.buttonElement.focus():this.menus[g].buttonElement?.focus()))}updateMnemonicVisibility(g){this.menus&&this.menus.forEach(h=>{if(h.titleElement&&h.titleElement.children.length){const v=h.titleElement.children.item(0);v&&(v.style.textDecoration=this.options.alwaysOnMnemonics||g?"underline":"")}})}get mnemonicsInUse(){return this._mnemonicsInUse}set mnemonicsInUse(g){this._mnemonicsInUse=g}get shouldAltKeyFocus(){return f.isMacintosh?!1:!this.options.disableAltFocus||this.options.visibility==="toggle"}get onVisibilityChange(){return this._onVisibilityChange.event}get onFocusStateChange(){return this._onFocusStateChange.event}onMenuTriggered(g,h){this.isOpen?this.isCurrentMenu(g)?this.setUnfocusedState():(this.cleanupCustomMenu(),this.showCustomMenu(g,this.openedViaKeyboard)):(this.focusedMenu={index:g},this.openedViaKeyboard=!h,this.focusState=n.OPEN)}onModifierKeyToggled(g){const h=!g.altKey&&!g.ctrlKey&&!g.shiftKey&&!g.metaKey;this.options.visibility!=="hidden"&&(g.event&&this.shouldAltKeyFocus&&u.ScanCodeUtils.toEnum(g.event.code)===159&&g.event.preventDefault(),this.isFocused&&g.lastKeyPressed==="alt"&&g.altKey&&(this.setUnfocusedState(),this.mnemonicsInUse=!1,this.awaitingAltRelease=!0),h&&g.lastKeyPressed==="alt"&&g.lastKeyReleased==="alt"&&(this.awaitingAltRelease||(!this.isFocused&&this.shouldAltKeyFocus?(this.mnemonicsInUse=!0,this.focusedMenu={index:this.numMenusShown>0?0:a.OVERFLOW_INDEX},this.focusState=n.FOCUSED):this.isOpen||this.setUnfocusedState())),!g.altKey&&g.lastKeyReleased==="alt"&&(this.awaitingAltRelease=!1),this.options.enableMnemonics&&this.menus&&!this.isOpen&&this.updateMnemonicVisibility(!this.awaitingAltRelease&&g.altKey||this.mnemonicsInUse))}isCurrentMenu(g){return this.focusedMenu?this.focusedMenu.index===g:!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?.classList.remove("open"),this.focusedMenu.holder.remove()),this.focusedMenu.widget?.dispose(),this.focusedMenu={index:this.focusedMenu.index})}showCustomMenu(g,h=!0){const v=g>=this.numMenusShown?a.OVERFLOW_INDEX:g,m=v===a.OVERFLOW_INDEX?this.overflowMenu:this.menus[v];if(!m.actions||!m.buttonElement||!m.titleElement)return;const w=d("div.menubar-menu-items-holder",{title:""});m.buttonElement.classList.add("open");const D=m.titleElement.getBoundingClientRect(),y=p.getDomNodeZoomLevel(m.titleElement);this.options.compactMode===E.Direction.Right?(w.style.top=`${D.top}px`,w.style.left=`${D.left+this.container.clientWidth}px`):this.options.compactMode===E.Direction.Left?(w.style.top=`${D.top}px`,w.style.right=`${this.container.clientWidth}px`,w.style.left="auto"):(w.style.top=`${D.bottom*y}px`,w.style.left=`${D.left*y}px`),m.buttonElement.appendChild(w);const T={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:E.Direction.Right,useEventAsContext:!0},_=this._register(new E.Menu(w,m.actions,T));this.menuStyle&&_.style(this.menuStyle),this._register(_.onDidCancel(()=>{this.focusState=n.FOCUSED})),v!==g?_.trigger(g-this.numMenusShown):_.focus(h),this.focusedMenu={index:v,holder:w,widget:_}}}e.MenuBar=a,a.OVERFLOW_INDEX=-1}),define(ae[197],le([1,0,137,140,29,65,6,1053]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Checkbox=e.Toggle=e.ToggleActionViewItem=void 0;const E={inputActiveOptionBorder:A.Color.fromHex("#007ACC00"),inputActiveOptionForeground:A.Color.fromHex("#FFFFFF"),inputActiveOptionBackground:A.Color.fromHex("#0E639C50")};class I extends t.BaseActionViewItem{constructor(r,u,i){super(r,u,i),this.toggle=this._register(new b({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(r){this.element=r,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(r){this.toggle.domNode.tabIndex=r?0:-1}}e.ToggleActionViewItem=I;class b extends p.Widget{constructor(r){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={...E,...r},this._checked=this._opts.isChecked;const u=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,u.push(...R.CSSIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&u.push(...this._opts.actionClassName.split(" ")),this._checked&&u.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...u),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._register(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(),i.stopPropagation();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(r){this._checked=r,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(r){this._icon&&this.domNode.classList.remove(...R.CSSIcon.asClassNameArray(this._icon)),this._icon=r,this._icon&&this.domNode.classList.add(...R.CSSIcon.asClassNameArray(this._icon))}width(){return 2+2+2+16}style(r){r.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=r.inputActiveOptionBorder),r.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=r.inputActiveOptionForeground),r.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=r.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(r){this.domNode.title=r,this.domNode.setAttribute("aria-label",r)}}e.Toggle=b;class S extends p.Widget{constructor(r,u){super(),this.title=r,this.isChecked=u,this.checkbox=new b({title:this.title,isChecked:this.isChecked,icon:R.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(r){this.checkbox.checked=r,this.applyStyles()}focus(){this.domNode.focus()}hasFocus(){return this.domNode===document.activeElement}style(r){this.styles=r,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=S}),define(ae[756],le([1,0,197,29,1238]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const A=R.localize(0,null),k=R.localize(1,null),E=R.localize(2,null);class I extends t.Toggle{constructor(r){super({icon:p.Codicon.caseSensitive,title:A+r.appendTitle,isChecked:r.isChecked,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionForeground:r.inputActiveOptionForeground,inputActiveOptionBackground:r.inputActiveOptionBackground})}}e.CaseSensitiveToggle=I;class b extends t.Toggle{constructor(r){super({icon:p.Codicon.wholeWord,title:k+r.appendTitle,isChecked:r.isChecked,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionForeground:r.inputActiveOptionForeground,inputActiveOptionBackground:r.inputActiveOptionBackground})}}e.WholeWordsToggle=b;class S extends t.Toggle{constructor(r){super({icon:p.Codicon.regex,title:E+r.appendTitle,isChecked:r.isChecked,inputActiveOptionBorder:r.inputActiveOptionBorder,inputActiveOptionForeground:r.inputActiveOptionForeground,inputActiveOptionBackground:r.inputActiveOptionBackground})}}e.RegexToggle=S}),define(ae[488],le([1,0,10,756,211,140,6,1237,2,714]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const b=E.localize(0,null);class S extends A.Widget{constructor(r,u,i){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=new I.DisposableStore,this.additionalToggles=[],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.placeholder=i.placeholder||"",this.validation=i.validation,this.label=i.label||b,this.showCommonFindToggles=!!i.showCommonFindToggles,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 f=i.appendCaseSensitiveLabel||"",c=i.appendWholeWordsLabel||"",l=i.appendRegexLabel||"",s=i.history||[],d=!!i.flexibleHeight,n=!!i.flexibleWidth,a=i.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new R.HistoryInputBox(this.domNode,u,{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:s,showHistoryHint:i.showHistoryHint,flexibleHeight:d,flexibleWidth:n,flexibleMaxHeight:a})),this.showCommonFindToggles){this.regex=this._register(new p.RegexToggle({appendTitle:l,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(g=>{this._onRegexKeyDown.fire(g)})),this.wholeWords=this._register(new p.WholeWordsToggle({appendTitle:c,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new p.CaseSensitiveToggle({appendTitle:f,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(g=>{this._onCaseSensitiveKeyDown.fire(g)}));const o=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){const h=o.indexOf(document.activeElement);if(h>=0){let v=-1;g.equals(17)?v=(h+1)%o.length:g.equals(15)&&(h===0?v=o.length-1:v=h-1),g.equals(9)?(o[h].blur(),this.inputBox.focus()):v>=0&&o[v].focus(),t.EventHelper.stop(g,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"block":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(i?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),r?.appendChild(this.domNode),this._register(t.addDisposableListener(this.inputBox.inputElement,"compositionstart",o=>{this.imeSessionInProgress=!0})),this._register(t.addDisposableListener(this.inputBox.inputElement,"compositionend",o=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,o=>this._onKeyDown.fire(o)),this.onkeyup(this.inputBox.inputElement,o=>this._onKeyUp.fire(o)),this.oninput(this.inputBox.inputElement,o=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,o=>this._onMouseDown.fire(o))}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();for(const r of this.additionalToggles)r.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex?.disable(),this.wholeWords?.disable(),this.caseSensitive?.disable();for(const r of this.additionalToggles)r.disable()}setFocusInputOnOptionClick(r){this.fixFocusOnOptionClickEnabled=r}setEnabled(r){r?this.enable():this.disable()}setAdditionalToggles(r){for(const u of this.additionalToggles)u.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.dispose(),this.additionalTogglesDisposables=new I.DisposableStore;for(const u of r??[])this.additionalTogglesDisposables.add(u),this.controls.appendChild(u.domNode),this.additionalTogglesDisposables.add(u.onChange(i=>{this._onDidOptionChange.fire(i),!i&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(u);this.additionalToggles.length>0&&(this.controls.style.display="block"),this.inputBox.paddingRight=(this.caseSensitive?.width()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.additionalToggles.reduce((u,i)=>u+i.width(),0)}clear(){this.clearValidation(),this.setValue(""),this.focus()}getValue(){return this.inputBox.value}setValue(r){this.inputBox.value!==r&&(this.inputBox.value=r)}onSearchSubmit(){this.inputBox.addToHistory()}style(r){this.inputActiveOptionBorder=r.inputActiveOptionBorder,this.inputActiveOptionForeground=r.inputActiveOptionForeground,this.inputActiveOptionBackground=r.inputActiveOptionBackground,this.inputBackground=r.inputBackground,this.inputForeground=r.inputForeground,this.inputBorder=r.inputBorder,this.inputValidationInfoBackground=r.inputValidationInfoBackground,this.inputValidationInfoForeground=r.inputValidationInfoForeground,this.inputValidationInfoBorder=r.inputValidationInfoBorder,this.inputValidationWarningBackground=r.inputValidationWarningBackground,this.inputValidationWarningForeground=r.inputValidationWarningForeground,this.inputValidationWarningBorder=r.inputValidationWarningBorder,this.inputValidationErrorBackground=r.inputValidationErrorBackground,this.inputValidationErrorForeground=r.inputValidationErrorForeground,this.inputValidationErrorBorder=r.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const r={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex?.style(r),this.wholeWords?.style(r),this.caseSensitive?.style(r);for(const i of this.additionalToggles)i.style(r);const u={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(u)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive?.checked??!1}setCaseSensitive(r){this.caseSensitive&&(this.caseSensitive.checked=r)}getWholeWords(){return this.wholeWords?.checked??!1}setWholeWords(r){this.wholeWords&&(this.wholeWords.checked=r)}getRegex(){return this.regex?.checked??!1}setRegex(r){this.regex&&(this.regex.checked=r,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(r){this.inputBox.showMessage(r)}clearMessage(){this.inputBox.hideMessage()}clearValidation(){this.inputBox.hideMessage()}}e.FindInput=S,S.OPTION_CHANGE="optionChange"}),define(ae[1268],le([1,0,10,197,211,140,29,6,1239,714]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=e.PreserveCaseToggle=void 0;const b=I.localize(0,null),S=I.localize(1,null);class C extends p.Toggle{constructor(i){super({icon:k.Codicon.preserveCase,title:S+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.PreserveCaseToggle=C;class r extends A.Widget{constructor(i,f,c,l){super(),this._showOptionButtons=c,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new E.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new E.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new E.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new E.Emitter),this.onInput=this._onInput.event,this._onKeyUp=this._register(new E.Emitter),this.onKeyUp=this._onKeyUp.event,this._onPreserveCaseKeyDown=this._register(new E.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=f,this.placeholder=l.placeholder||"",this.validation=l.validation,this.label=l.label||b,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 s=l.appendPreserveCaseLabel||"",d=l.history||[],n=!!l.flexibleHeight,a=!!l.flexibleWidth,o=l.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new R.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:d,showHistoryHint:l.showHistoryHint,flexibleHeight:n,flexibleWidth:a,flexibleMaxHeight:o})),this.preserveCase=this._register(new C({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(v=>{this._onDidOptionChange.fire(v),!v&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(v=>{this._onPreserveCaseKeyDown.fire(v)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,v=>{if(v.equals(15)||v.equals(17)||v.equals(9)){const m=g.indexOf(document.activeElement);if(m>=0){let w=-1;v.equals(17)?w=(m+1)%g.length:v.equals(15)&&(m===0?w=g.length-1:w=m-1),v.equals(9)?(g[m].blur(),this.inputBox.focus()):w>=0&&g[w].focus(),t.EventHelper.stop(v,!0)}}});const h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),i?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,v=>this._onKeyDown.fire(v)),this.onkeyup(this.inputBox.inputElement,v=>this._onKeyUp.fire(v)),this.oninput(this.inputBox.inputElement,v=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,v=>this._onMouseDown.fire(v))}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 f={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(f)}}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?.validate()}showMessage(i){this.inputBox?.showMessage(i)}clearMessage(){this.inputBox?.hideMessage()}clearValidation(){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=r,r.OPTION_CHANGE="optionChange"}),define(ae[263],le([1,0,79,279,36,29,6,2,13,1246,1054]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class S extends E.Disposable{constructor(u,i,f={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new k.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=new E.DisposableStore,this.options=f,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new C(()=>this.toggleMenuActionViewItem?.show(),f.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",u.appendChild(this.element),this.actionBar=this._register(new t.ActionBar(this.element,{orientation:f.orientation,ariaLabel:f.ariaLabel,actionRunner:f.actionRunner,allowContextMenu:f.allowContextMenu,actionViewItemProvider:c=>{if(c.id===C.ID)return this.toggleMenuActionViewItem=new p.DropdownMenuActionViewItem(c,c.menuActions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:A.CSSIcon.asClassNameArray(f.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(f.actionViewItemProvider){const l=f.actionViewItemProvider(c);if(l)return l}if(c instanceof R.SubmenuAction){const l=new p.DropdownMenuActionViewItem(c,c.actions,i,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:c.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(u){this.actionBar.actionRunner=u}get actionRunner(){return this.actionBar.actionRunner}set context(u){this.actionBar.context=u,this.toggleMenuActionViewItem?.setActionContext(u);for(const i of this.submenuActionViewItems)i.setActionContext(u)}getElement(){return this.element}focus(){this.actionBar.focus()}getItemsWidth(){let u=0;for(let i=0;i<this.actionBar.length();i++)u+=this.actionBar.getWidth(i);return u}getItemAction(u){return this.actionBar.getAction(u)}getItemWidth(u){return this.actionBar.getWidth(u)}getItemsLength(){return this.actionBar.length()}setAriaLabel(u){this.actionBar.setAriaLabel(u)}setActions(u,i){this.clear();const f=u?u.slice(0):[];this.hasSecondaryActions=!!(i&&i.length>0),this.hasSecondaryActions&&i&&(this.toggleMenuAction.menuActions=i.slice(0),f.push(this.toggleMenuAction)),f.forEach(c=>{this.actionBar.push(c,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(c)})})}getKeybindingLabel(u){const i=this.lookupKeybindings?this.options.getKeyBinding?.(u):void 0;return(0,I.withNullAsUndefined)(i?.getLabel())}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),super.dispose()}}e.ToolBar=S;class C extends R.Action{constructor(u,i){i=i||b.localize(0,null),super(C.ID,i,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=u}async run(){this.toggleDropdownMenu()}get menuActions(){return this._menuActions}set menuActions(u){this._menuActions=u}}e.ToggleMenuAction=C,C.ID="toolbar.toggle.more"}),define(ae[305],le([1,0,10,195,90,79,488,328,196,197,575,297,36,16,11,29,298,6,96,2,194,13,1247,1055]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.TreeFindMode=e.ModeToggle=e.RenderIndentGuides=e.AbstractTreeViewState=e.ComposedTreeDelegate=void 0;class g extends E.ElementsDragAndDropData{set context(X){this.data.context=X}get context(){return this.data.context}constructor(X){super(X.elements.map(G=>G.element)),this.data=X}}function h(q){return q instanceof E.ElementsDragAndDropData?new g(q):q}class v{constructor(X,G){this.modelProvider=X,this.dnd=G,this.autoExpandDisposable=d.Disposable.None}getDragURI(X){return this.dnd.getDragURI(X.element)}getDragLabel(X,G){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(X.map(Q=>Q.element),G)}onDragStart(X,G){this.dnd.onDragStart?.(h(X),G)}onDragOver(X,G,Q,j,K=!0){const Y=this.dnd.onDragOver(h(X),G&&G.element,Q,j),ee=this.autoExpandNode!==G;if(ee&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=G),typeof G>"u")return Y;if(ee&&typeof Y!="boolean"&&Y.autoExpand&&(this.autoExpandDisposable=(0,i.disposableTimeout)(()=>{const te=this.modelProvider(),Z=te.getNodeLocation(G);te.isCollapsed(Z)&&te.setCollapsed(Z,!1),this.autoExpandNode=void 0},500)),typeof Y=="boolean"||!Y.accept||typeof Y.bubble>"u"||Y.feedback){if(!K){const te=typeof Y=="boolean"?Y:Y.accept,Z=typeof Y=="boolean"?void 0:Y.effect;return{accept:te,effect:Z,feedback:[Q]}}return Y}if(Y.bubble===1){const te=this.modelProvider(),Z=te.getNodeLocation(G),ne=te.getParentNodeLocation(Z),ce=te.getNode(ne),de=ne&&te.getListIndex(ne);return this.onDragOver(X,ce,de,j,!1)}const ie=this.modelProvider(),re=ie.getNodeLocation(G),oe=ie.getListIndex(re),se=ie.getListRenderCount(re);return{...Y,feedback:(0,u.range)(oe,oe+se)}}drop(X,G,Q,j){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(h(X),G&&G.element,Q,j)}onDragEnd(X){this.dnd.onDragEnd?.(X)}}function m(q,X){return X&&{...X,identityProvider:X.identityProvider&&{getId(G){return X.identityProvider.getId(G.element)}},dnd:X.dnd&&new v(q,X.dnd),multipleSelectionController:X.multipleSelectionController&&{isSelectionSingleChangeEvent(G){return X.multipleSelectionController.isSelectionSingleChangeEvent({...G,element:G.element})},isSelectionRangeChangeEvent(G){return X.multipleSelectionController.isSelectionRangeChangeEvent({...G,element:G.element})}},accessibilityProvider:X.accessibilityProvider&&{...X.accessibilityProvider,getSetSize(G){const Q=q(),j=Q.getNodeLocation(G),K=Q.getParentNodeLocation(j);return Q.getNode(K).visibleChildrenCount},getPosInSet(G){return G.visibleChildIndex+1},isChecked:X.accessibilityProvider&&X.accessibilityProvider.isChecked?G=>X.accessibilityProvider.isChecked(G.element):void 0,getRole:X.accessibilityProvider&&X.accessibilityProvider.getRole?G=>X.accessibilityProvider.getRole(G.element):()=>"treeitem",getAriaLabel(G){return X.accessibilityProvider.getAriaLabel(G.element)},getWidgetAriaLabel(){return X.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:X.accessibilityProvider&&X.accessibilityProvider.getWidgetRole?()=>X.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:X.accessibilityProvider&&X.accessibilityProvider.getAriaLevel?G=>X.accessibilityProvider.getAriaLevel(G.element):G=>G.depth,getActiveDescendantId:X.accessibilityProvider.getActiveDescendantId&&(G=>X.accessibilityProvider.getActiveDescendantId(G.element))},keyboardNavigationLabelProvider:X.keyboardNavigationLabelProvider&&{...X.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(G){return X.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(G.element)}}}}class w{constructor(X){this.delegate=X}getHeight(X){return this.delegate.getHeight(X.element)}getTemplateId(X){return this.delegate.getTemplateId(X.element)}hasDynamicHeight(X){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(X.element)}setDynamicHeight(X,G){this.delegate.setDynamicHeight?.(X.element,G)}}e.ComposedTreeDelegate=w;class D{static lift(X){return X instanceof D?X:new D(X)}static empty(X=0){return new D({focus:[],selection:[],expanded:Object.create(null),scrollTop:X})}constructor(X){if(this.focus=new Set(X.focus),this.selection=new Set(X.selection),X.expanded instanceof Array){this.expanded=Object.create(null);for(const G of X.expanded)this.expanded[G]=1}else this.expanded=X.expanded;this.expanded=X.expanded,this.scrollTop=X.scrollTop}toJSON(){return{focus:Array.from(this.focus),selection:Array.from(this.selection),expanded:this.expanded,scrollTop:this.scrollTop}}}e.AbstractTreeViewState=D;var y;(function(q){q.None="none",q.OnHover="onHover",q.Always="always"})(y=e.RenderIndentGuides||(e.RenderIndentGuides={}));class T{get elements(){return this._elements}constructor(X,G=[]){this._elements=G,this.disposables=new d.DisposableStore,this.onDidChange=l.Event.forEach(X,Q=>this._elements=Q,this.disposables)}dispose(){this.disposables.dispose()}}class _{constructor(X,G,Q,j,K,Y={}){this.renderer=X,this.modelProvider=G,this.activeNodes=j,this.renderedIndentGuides=K,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=_.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=d.Disposable.None,this.disposables=new d.DisposableStore,this.templateId=X.templateId,this.updateOptions(Y),l.Event.map(Q,ee=>ee.node)(this.onDidChangeNodeTwistieState,this,this.disposables),X.onDidChangeTwistieState?.(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(X={}){if(typeof X.indent<"u"){const G=(0,n.clamp)(X.indent,0,40);if(G!==this.indent){this.indent=G;for(const[Q,j]of this.renderedNodes)this.renderTreeElement(Q,j)}}if(typeof X.renderIndentGuides<"u"){const G=X.renderIndentGuides!==y.None;if(G!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=G,this.indentGuidesDisposable.dispose(),G)){const Q=new d.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Q),this.indentGuidesDisposable=Q,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof X.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=X.hideTwistiesOfChildlessElements)}renderTemplate(X){const G=(0,t.append)(X,(0,t.$)(".monaco-tl-row")),Q=(0,t.append)(G,(0,t.$)(".monaco-tl-indent")),j=(0,t.append)(G,(0,t.$)(".monaco-tl-twistie")),K=(0,t.append)(G,(0,t.$)(".monaco-tl-contents")),Y=this.renderer.renderTemplate(K);return{container:X,indent:Q,twistie:j,indentGuidesDisposable:d.Disposable.None,templateData:Y}}renderElement(X,G,Q,j){this.renderedNodes.set(X,Q),this.renderedElements.set(X.element,X),this.renderTreeElement(X,Q),this.renderer.renderElement(X,G,Q.templateData,j)}disposeElement(X,G,Q,j){Q.indentGuidesDisposable.dispose(),this.renderer.disposeElement?.(X,G,Q.templateData,j),typeof j=="number"&&(this.renderedNodes.delete(X),this.renderedElements.delete(X.element))}disposeTemplate(X){this.renderer.disposeTemplate(X.templateData)}onDidChangeTwistieState(X){const G=this.renderedElements.get(X);!G||this.onDidChangeNodeTwistieState(G)}onDidChangeNodeTwistieState(X){const G=this.renderedNodes.get(X);!G||(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(X,G))}renderTreeElement(X,G){const Q=_.DefaultIndent+(X.depth-1)*this.indent;G.twistie.style.paddingLeft=`${Q}px`,G.indent.style.width=`${Q+this.indent-16}px`,X.collapsible?G.container.setAttribute("aria-expanded",String(!X.collapsed)):G.container.removeAttribute("aria-expanded"),G.twistie.classList.remove(...f.Codicon.treeItemExpanded.classNamesArray);let j=!1;if(this.renderer.renderTwistie&&(j=this.renderer.renderTwistie(X.element,G.twistie)),X.collapsible&&(!this.hideTwistiesOfChildlessElements||X.visibleChildrenCount>0)?(j||G.twistie.classList.add(...f.Codicon.treeItemExpanded.classNamesArray),G.twistie.classList.add("collapsible"),G.twistie.classList.toggle("collapsed",X.collapsed)):G.twistie.classList.remove("collapsible","collapsed"),(0,t.clearNode)(G.indent),G.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const K=new d.DisposableStore,Y=this.modelProvider();for(;;){const ee=Y.getNodeLocation(X),ie=Y.getParentNodeLocation(ee);if(!ie)break;const re=Y.getNode(ie),oe=(0,t.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(re)&&oe.classList.add("active"),G.indent.childElementCount===0?G.indent.appendChild(oe):G.indent.insertBefore(oe,G.indent.firstElementChild),this.renderedIndentGuides.add(re,oe),K.add((0,d.toDisposable)(()=>this.renderedIndentGuides.delete(re,oe))),X=re}G.indentGuidesDisposable=K}_onDidChangeActiveNodes(X){if(!this.shouldRenderIndentGuides)return;const G=new Set,Q=this.modelProvider();X.forEach(j=>{const K=Q.getNodeLocation(j);try{const Y=Q.getParentNodeLocation(K);j.collapsible&&j.children.length>0&&!j.collapsed?G.add(j):Y&&G.add(Q.getNode(Y))}catch{}}),this.activeIndentNodes.forEach(j=>{G.has(j)||this.renderedIndentGuides.forEach(j,K=>K.classList.remove("active"))}),G.forEach(j=>{this.activeIndentNodes.has(j)||this.renderedIndentGuides.forEach(j,K=>K.classList.add("active"))}),this.activeIndentNodes=G}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,d.dispose)(this.disposables)}}_.DefaultIndent=8;class L{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(X){this._pattern=X,this._lowercasePattern=X.toLowerCase()}constructor(X,G,Q){this.tree=X,this.keyboardNavigationLabelProvider=G,this._filter=Q,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new d.DisposableStore,X.onWillRefilter(this.reset,this,this.disposables)}filter(X,G){let Q=1;if(this._filter){const Y=this._filter.filter(X,G);if(typeof Y=="boolean"?Q=Y?1:0:(0,S.isFilterResult)(Y)?Q=(0,S.getVisibleState)(Y.visibility):Q=Y,Q===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:s.FuzzyScore.Default,visibility:Q};const j=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(X),K=Array.isArray(j)?j:[j];for(const Y of K){const ee=Y&&Y.toString();if(typeof ee>"u")return{data:s.FuzzyScore.Default,visibility:Q};const ie=(0,s.fuzzyScore)(this._pattern,this._lowercasePattern,0,ee,ee.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(ie)return this._matchCount++,K.length===1?{data:ie,visibility:Q}:{data:{label:ee,score:ie},visibility:Q}}return this.tree.findMode===O.Filter?2:{data:s.FuzzyScore.Default,visibility:Q}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,d.dispose)(this.disposables)}}class M extends b.Toggle{constructor(X){super({icon:f.Codicon.listFilter,title:(0,o.localize)(0,null),isChecked:X?.isChecked??!1,inputActiveOptionBorder:X?.inputActiveOptionBorder,inputActiveOptionForeground:X?.inputActiveOptionForeground,inputActiveOptionBackground:X?.inputActiveOptionBackground})}}e.ModeToggle=M;var O;(function(q){q[q.Highlight=0]="Highlight",q[q.Filter=1]="Filter"})(O=e.TreeFindMode||(e.TreeFindMode={}));class N extends d.Disposable{set mode(X){this.modeToggle.checked=X===O.Filter,this.findInput.inputBox.setPlaceHolder(X===O.Filter?(0,o.localize)(1,null):(0,o.localize)(2,null))}get value(){return this.findInput.inputBox.value}set value(X){this.findInput.inputBox.value=X}constructor(X,G,Q,j,K){super(),this.tree=G,this.elements=(0,t.h)(".monaco-tree-type-filter",[(0,t.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,t.h)(".monaco-tree-type-filter-input@findInput"),(0,t.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new l.Emitter,this.onDidDisable=this._onDidDisable.event,X.appendChild(this.elements.root),this._register((0,d.toDisposable)(()=>X.removeChild(this.elements.root))),this.modeToggle=this._register(new M({...K,isChecked:j===O.Filter})),this.onDidChangeMode=l.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?O.Filter:O.Highlight,this._store),this.findInput=this._register(new k.FindInput(this.elements.findInput,Q,{label:(0,o.localize)(3,null),additionalToggles:[this.modeToggle],showCommonFindToggles:!1})),this.actionbar=this._register(new A.ActionBar(this.elements.actionbar)),this.mode=j;const Y=this._register(new p.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),ee=this._register(l.Event.chain(Y.event)).map(se=>new R.StandardKeyboardEvent(se)).event;this._register(ee(se=>{switch(se.keyCode){case 18:se.preventDefault(),se.stopPropagation(),this.tree.domFocus();return}}));const ie=this._register(new r.Action("close",(0,o.localize)(4,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(ie,{icon:!0,label:!1});const re=this._register(new p.DomEmitter(this.elements.grab,"mousedown"));this._register(re.event(se=>{const te=new d.DisposableStore,Z=te.add(new p.DomEmitter(window,"mousemove")),ne=te.add(new p.DomEmitter(window,"mouseup")),ce=this.right,de=se.pageX,he=this.top,pe=se.pageY;this.elements.grab.classList.add("grabbing");const me=this.elements.root.style.transition;this.elements.root.style.transition="unset";const Se=Ie=>{const ve=Ie.pageX-de;this.right=ce-ve;const be=Ie.pageY-pe;this.top=he+be,this.layout()};te.add(Z.event(Se)),te.add(ne.event(Ie=>{Se(Ie),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=me,te.dispose()}))}));const oe=this._register(l.Event.chain(this._register(new p.DomEmitter(this.elements.grab,"keydown")).event)).map(se=>new R.StandardKeyboardEvent(se)).event;this._register(oe(se=>{let te,Z;if(se.keyCode===15?te=Number.POSITIVE_INFINITY:se.keyCode===17?te=0:se.keyCode===10&&(te=this.right===0?Number.POSITIVE_INFINITY:0),se.keyCode===16?Z=0:se.keyCode===18&&(Z=Number.POSITIVE_INFINITY),te!==void 0&&(se.preventDefault(),se.stopPropagation(),this.right=te,this.layout()),Z!==void 0){se.preventDefault(),se.stopPropagation(),this.top=Z;const ne=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=ne},0)}})),this.onDidChangeValue=this.findInput.onDidChange,this.style(K??{})}style(X){this.findInput.style(X),X.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=X.listFilterWidgetBackground.toString()),X.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${X.listFilterWidgetShadow}`)}focus(){this.findInput.focus()}select(){this.findInput.select()}layout(X=this.width){this.width=X,this.right=(0,n.clamp)(this.right,0,Math.max(0,X-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,n.clamp)(this.top,0,24),this.elements.root.style.top=`${this.top}px`}showMessage(X){this.findInput.showMessage(X)}clearMessage(){this.findInput.clearMessage()}async dispose(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),await(0,i.timeout)(300),super.dispose()}}class P{get pattern(){return this._pattern}get mode(){return this._mode}set mode(X){X!==this._mode&&(this._mode=X,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(X))}constructor(X,G,Q,j,K){this.tree=X,this.view=Q,this.filter=j,this.contextViewProvider=K,this._pattern="",this.previousPattern="",this.width=0,this._onDidChangeMode=new l.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangePattern=new l.Emitter,this.onDidChangePattern=this._onDidChangePattern.event,this._onDidChangeOpenState=new l.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new d.DisposableStore,this.disposables=new d.DisposableStore,this._mode=X.options.defaultFindMode??O.Highlight,G.onDidSplice(this.onDidSpliceModel,this,this.disposables)}open(){if(this.widget){this.widget.focus(),this.widget.select();return}this.mode=this.tree.options.defaultFindMode??O.Highlight,this.widget=new N(this.view.getHTMLElement(),this.tree,this.contextViewProvider,this.mode,this.styles),this.enabledDisposables.add(this.widget),this.widget.onDidChangeValue(this.onDidChangeValue,this,this.enabledDisposables),this.widget.onDidChangeMode(X=>this.mode=X,void 0,this.enabledDisposables),this.widget.onDidDisable(this.close,this,this.enabledDisposables),this.widget.layout(this.width),this.widget.focus(),this.widget.value=this.previousPattern,this.widget.select(),this._onDidChangeOpenState.fire(!0)}close(){!this.widget||(this.widget=void 0,this.enabledDisposables.dispose(),this.enabledDisposables=new d.DisposableStore,this.previousPattern=this.pattern,this.onDidChangeValue(""),this.tree.domFocus(),this._onDidChangeOpenState.fire(!1))}onDidChangeValue(X){this._pattern=X,this._onDidChangePattern.fire(X),this.filter.pattern=X,this.tree.refilter(),X&&this.tree.focusNext(0,!0,void 0,Q=>!s.FuzzyScore.isDefault(Q.filterData));const G=this.tree.getFocus();if(G.length>0){const Q=G[0];this.tree.getRelativeTop(Q)===null&&this.tree.reveal(Q,.5)}this.render()}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){const X=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&X?this.tree.options.showNotFoundMessage??!0?this.widget?.showMessage({type:2,content:(0,o.localize)(5,null)}):this.widget?.showMessage({type:2}):this.widget?.clearMessage()}shouldAllowFocus(X){return!this.widget||!this.pattern||this._mode===O.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!s.FuzzyScore.isDefault(X.filterData)}style(X){this.styles=X,this.widget?.style(X)}layout(X){this.width=X,this.widget?.layout(X)}dispose(){this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function B(q){let X=C.TreeMouseEventTarget.Unknown;return(0,t.hasParentWithClass)(q.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?X=C.TreeMouseEventTarget.Twistie:(0,t.hasParentWithClass)(q.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?X=C.TreeMouseEventTarget.Element:(0,t.hasParentWithClass)(q.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(X=C.TreeMouseEventTarget.Filter),{browserEvent:q.browserEvent,element:q.element?q.element.element:null,target:X}}function V(q){return{element:q.element?q.element.element:null,browserEvent:q.browserEvent,anchor:q.anchor}}function z(q,X){X(q),q.children.forEach(G=>z(G,X))}class x{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(X,G){this.getFirstViewElementWithTrait=X,this.identityProvider=G,this.nodes=[],this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event}set(X,G){!G?.__forceEvent&&(0,u.equals)(this.nodes,X)||this._set(X,!1,G)}_set(X,G,Q){if(this.nodes=[...X],this.elements=void 0,this._nodeSet=void 0,!G){const j=this;this._onDidChange.fire({get elements(){return j.get()},browserEvent:Q})}}get(){return this.elements||(this.elements=this.nodes.map(X=>X.element)),[...this.elements]}getNodes(){return this.nodes}has(X){return this.nodeSet.has(X)}onDidModelSplice({insertedNodes:X,deletedNodes:G}){if(!this.identityProvider){const ie=this.createNodeSet(),re=oe=>ie.delete(oe);G.forEach(oe=>z(oe,re)),this.set([...ie.values()]);return}const Q=new Set,j=ie=>Q.add(this.identityProvider.getId(ie.element).toString());G.forEach(ie=>z(ie,j));const K=new Map,Y=ie=>K.set(this.identityProvider.getId(ie.element).toString(),ie);X.forEach(ie=>z(ie,Y));const ee=[];for(const ie of this.nodes){const re=this.identityProvider.getId(ie.element).toString();if(!Q.has(re))ee.push(ie);else{const se=K.get(re);se&&ee.push(se)}}if(this.nodes.length>0&&ee.length===0){const ie=this.getFirstViewElementWithTrait();ie&&ee.push(ie)}this._set(ee,!0)}createNodeSet(){const X=new Set;for(const G of this.nodes)X.add(G);return X}}class H extends I.MouseController{constructor(X,G){super(X),this.tree=G}onViewPointer(X){if((0,I.isButton)(X.browserEvent.target)||(0,I.isInputElement)(X.browserEvent.target)||(0,I.isMonacoEditor)(X.browserEvent.target))return;const G=X.element;if(!G)return super.onViewPointer(X);if(this.isSelectionRangeChangeEvent(X)||this.isSelectionSingleChangeEvent(X))return super.onViewPointer(X);const Q=X.browserEvent.target,j=Q.classList.contains("monaco-tl-twistie")||Q.classList.contains("monaco-icon-label")&&Q.classList.contains("folder-icon")&&X.browserEvent.offsetX<16;let K=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?K=this.tree.expandOnlyOnTwistieClick(G.element):K=!!this.tree.expandOnlyOnTwistieClick,K&&!j&&X.browserEvent.detail!==2)return super.onViewPointer(X);if(!this.tree.expandOnDoubleClick&&X.browserEvent.detail===2)return super.onViewPointer(X);if(G.collapsible){const Y=this.tree.model,ee=Y.getNodeLocation(G),ie=X.browserEvent.altKey;if(this.tree.setFocus([ee]),Y.setCollapsed(ee,void 0,ie),K&&j)return}super.onViewPointer(X)}onDoubleClick(X){X.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(X)}}class W extends I.List{constructor(X,G,Q,j,K,Y,ee,ie){super(X,G,Q,j,ie),this.focusTrait=K,this.selectionTrait=Y,this.anchorTrait=ee}createMouseController(X){return new H(this,X.tree)}splice(X,G,Q=[]){if(super.splice(X,G,Q),Q.length===0)return;const j=[],K=[];let Y;Q.forEach((ee,ie)=>{this.focusTrait.has(ee)&&j.push(X+ie),this.selectionTrait.has(ee)&&K.push(X+ie),this.anchorTrait.has(ee)&&(Y=X+ie)}),j.length>0&&super.setFocus((0,u.distinct)([...super.getFocus(),...j])),K.length>0&&super.setSelection((0,u.distinct)([...super.getSelection(),...K])),typeof Y=="number"&&super.setAnchor(Y)}setFocus(X,G,Q=!1){super.setFocus(X,G),Q||this.focusTrait.set(X.map(j=>this.element(j)),G)}setSelection(X,G,Q=!1){super.setSelection(X,G),Q||this.selectionTrait.set(X.map(j=>this.element(j)),G)}setAnchor(X,G=!1){super.setAnchor(X),G||(typeof X>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(X)]))}}class U{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 l.Event.map(this.view.onMouseClick,B)}get onMouseDblClick(){return l.Event.filter(l.Event.map(this.view.onMouseDblClick,B),X=>X.target!==C.TreeMouseEventTarget.Filter)}get onContextMenu(){return l.Event.map(this.view.onContextMenu,V)}get onTap(){return l.Event.map(this.view.onTap,B)}get onPointer(){return l.Event.map(this.view.onPointer,B)}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 l.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}get findMode(){return this.findController?.mode??O.Highlight}set findMode(X){this.findController&&(this.findController.mode=X)}get onDidChangeFindPattern(){return this.findController?this.findController.onDidChangePattern:l.Event.None}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(X,G,Q,j,K={}){this._user=X,this._options=K,this.eventBufferer=new l.EventBufferer,this.onDidChangeFindOpenState=l.Event.None,this.disposables=new d.DisposableStore,this._onWillRefilter=new l.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new l.Emitter,this.onDidUpdateOptions=this._onDidUpdateOptions.event;const Y=new w(Q),ee=new l.Relay,ie=new l.Relay,re=this.disposables.add(new T(ie.event)),oe=new c.SetMap;this.renderers=j.map(Z=>new _(Z,()=>this.model,ee.event,re,oe,K));for(const Z of this.renderers)this.disposables.add(Z);let se;K.keyboardNavigationLabelProvider&&(se=new L(this,K.keyboardNavigationLabelProvider,K.filter),K={...K,filter:se},this.disposables.add(se)),this.focus=new x(()=>this.view.getFocusedElements()[0],K.identityProvider),this.selection=new x(()=>this.view.getSelectedElements()[0],K.identityProvider),this.anchor=new x(()=>this.view.getAnchorElement(),K.identityProvider),this.view=new W(X,G,Y,this.renderers,this.focus,this.selection,this.anchor,{...m(()=>this.model,K),tree:this}),this.model=this.createModel(X,this.view,K),ee.input=this.model.onDidChangeCollapseState;const te=l.Event.forEach(this.model.onDidSplice,Z=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(Z),this.selection.onDidModelSplice(Z)})},this.disposables);if(te(()=>null,null,this.disposables),ie.input=l.Event.chain(l.Event.any(te,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const Z=new Set;for(const ne of this.focus.getNodes())Z.add(ne);for(const ne of this.selection.getNodes())Z.add(ne);return[...Z.values()]}).event,K.keyboardSupport!==!1){const Z=l.Event.chain(this.view.onKeyDown).filter(ne=>!(0,I.isInputElement)(ne.target)).map(ne=>new R.StandardKeyboardEvent(ne));Z.filter(ne=>ne.keyCode===15).on(this.onLeftArrow,this,this.disposables),Z.filter(ne=>ne.keyCode===17).on(this.onRightArrow,this,this.disposables),Z.filter(ne=>ne.keyCode===10).on(this.onSpace,this,this.disposables)}(K.findWidgetEnabled??!0)&&K.keyboardNavigationLabelProvider&&K.contextViewProvider?(this.findController=new P(this,this.model,this.view,se,K.contextViewProvider),this.focusNavigationFilter=Z=>this.findController.shouldAllowFocus(Z),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode):this.onDidChangeFindMode=l.Event.None,this.styleElement=(0,t.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===y.Always)}updateOptions(X={}){this._options={...this._options,...X};for(const G of this.renderers)G.updateOptions(X);this.view.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===y.Always)}get options(){return this._options}updateWidth(X){const G=this.model.getListIndex(X);G!==-1&&this.view.updateWidth(G)}getHTMLElement(){return this.view.getHTMLElement()}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.scrollTop}set scrollTop(X){this.view.scrollTop=X}get scrollLeft(){return this.view.scrollLeft}set scrollLeft(X){this.view.scrollLeft=X}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleElement(){const X=this.view.firstVisibleIndex;return X<0||X>=this.view.length?void 0:this.view.element(X).element}get lastVisibleElement(){const X=this.view.lastVisibleIndex;return this.view.element(X).element}get ariaLabel(){return this.view.ariaLabel}set ariaLabel(X){this.view.ariaLabel=X}domFocus(){this.view.domFocus()}isDOMFocused(){return this.getHTMLElement()===document.activeElement}layout(X,G){this.view.layout(X,G),(0,a.isNumber)(G)&&this.findController?.layout(G)}style(X){const G=`.${this.view.domId}`,Q=[];X.treeIndentGuidesStroke&&(Q.push(`.monaco-list${G}:hover .monaco-tl-indent > .indent-guide, .monaco-list${G}.always .monaco-tl-indent > .indent-guide { border-color: ${X.treeIndentGuidesStroke.transparent(.4)}; }`),Q.push(`.monaco-list${G} .monaco-tl-indent > .indent-guide.active { border-color: ${X.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Q.join(` `),this.findController?.style(X),this.view.style(X)}getParentElement(X){const G=this.model.getParentNodeLocation(X);return this.model.getNode(G).element}getFirstElementChild(X){return this.model.getFirstElementChild(X)}getNode(X){return this.model.getNode(X)}collapse(X,G=!1){return this.model.setCollapsed(X,!0,G)}expand(X,G=!1){return this.model.setCollapsed(X,!1,G)}toggleCollapsed(X,G=!1){return this.model.setCollapsed(X,void 0,G)}expandAll(){this.model.setCollapsed(this.model.rootRef,!1,!0)}collapseAll(){this.model.setCollapsed(this.model.rootRef,!0,!0)}isCollapsible(X){return this.model.isCollapsible(X)}setCollapsible(X,G){return this.model.setCollapsible(X,G)}isCollapsed(X){return this.model.isCollapsed(X)}triggerTypeNavigation(){this.view.triggerTypeNavigation()}openFind(){this.findController?.open()}closeFind(){this.findController?.close()}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setAnchor(X){if(typeof X>"u")return this.view.setAnchor(void 0);const G=this.model.getNode(X);this.anchor.set([G]);const Q=this.model.getListIndex(X);Q>-1&&this.view.setAnchor(Q,!0)}getAnchor(){return(0,u.firstOrDefault)(this.anchor.get(),void 0)}setSelection(X,G){const Q=X.map(K=>this.model.getNode(K));this.selection.set(Q,G);const j=X.map(K=>this.model.getListIndex(K)).filter(K=>K>-1);this.view.setSelection(j,G,!0)}getSelection(){return this.selection.get()}setFocus(X,G){const Q=X.map(K=>this.model.getNode(K));this.focus.set(Q,G);const j=X.map(K=>this.model.getListIndex(K)).filter(K=>K>-1);this.view.setFocus(j,G,!0)}focusNext(X=1,G=!1,Q,j=this.focusNavigationFilter){this.view.focusNext(X,G,Q,j)}focusPrevious(X=1,G=!1,Q,j=this.focusNavigationFilter){this.view.focusPrevious(X,G,Q,j)}focusNextPage(X,G=this.focusNavigationFilter){return this.view.focusNextPage(X,G)}focusPreviousPage(X,G=this.focusNavigationFilter){return this.view.focusPreviousPage(X,G)}focusLast(X,G=this.focusNavigationFilter){this.view.focusLast(X,G)}focusFirst(X,G=this.focusNavigationFilter){this.view.focusFirst(X,G)}getFocus(){return this.focus.get()}reveal(X,G){this.model.expandTo(X);const Q=this.model.getListIndex(X);Q!==-1&&this.view.reveal(Q,G)}getRelativeTop(X){const G=this.model.getListIndex(X);return G===-1?null:this.view.getRelativeTop(G)}getViewState(X=this.options.identityProvider){if(!X)throw new C.TreeError(this._user,"Can't get tree view state without an identity provider");const G=Y=>X.getId(Y).toString(),Q=D.empty(this.scrollTop);for(const Y of this.getFocus())Q.focus.add(G(Y));for(const Y of this.getSelection())Q.selection.add(G(Y));const j=this.model.getNode(),K=[j];for(;K.length>0;){const Y=K.shift();Y!==j&&Y.collapsible&&(Q.expanded[G(Y.element)]=Y.collapsed?0:1),K.push(...Y.children)}return Q}onLeftArrow(X){X.preventDefault(),X.stopPropagation();const G=this.view.getFocusedElements();if(G.length===0)return;const Q=G[0],j=this.model.getNodeLocation(Q);if(!this.model.setCollapsed(j,!0)){const Y=this.model.getParentNodeLocation(j);if(!Y)return;const ee=this.model.getListIndex(Y);this.view.reveal(ee),this.view.setFocus([ee])}}onRightArrow(X){X.preventDefault(),X.stopPropagation();const G=this.view.getFocusedElements();if(G.length===0)return;const Q=G[0],j=this.model.getNodeLocation(Q);if(!this.model.setCollapsed(j,!1)){if(!Q.children.some(ie=>ie.visible))return;const[Y]=this.view.getFocus(),ee=Y+1;this.view.reveal(ee),this.view.setFocus([ee])}}onSpace(X){X.preventDefault(),X.stopPropagation();const G=this.view.getFocusedElements();if(G.length===0)return;const Q=G[0],j=this.model.getNodeLocation(Q),K=X.browserEvent.altKey;this.model.setCollapsed(j,void 0,K)}navigate(X){return new $(this.view,this.model,X)}dispose(){(0,d.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=U;class ${constructor(X,G,Q){this.view=X,this.model=G,Q?this.index=this.model.getListIndex(Q):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(ae[757],le([1,0,305,487,297,88]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class k extends t.AbstractTree{constructor(I,b,S,C,r,u={}){super(I,b,S,C,u),this.user=I,this.dataSource=r,this.nodesByIdentity=new Map,this.identityProvider=u.identityProvider}getInput(){return this.input}setInput(I,b){if(b&&!this.identityProvider)throw new R.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(!b){this._refresh(I);return}const S=[],C=[],r=i=>{const f=this.identityProvider.getId(i).toString();return!b.expanded[f]},u=i=>{const f=this.identityProvider.getId(i.element).toString();b.focus.has(f)&&S.push(i.element),b.selection.has(f)&&C.push(i.element)};this._refresh(I,r,u),this.setFocus(S),this.setSelection(C),b&&typeof b.scrollTop=="number"&&(this.scrollTop=b.scrollTop)}updateChildren(I=this.input){if(typeof this.input>"u")throw new R.TreeError(this.user,"Tree input not set");let b;this.identityProvider&&(b=S=>{const C=this.identityProvider.getId(S).toString(),r=this.nodesByIdentity.get(C);if(!!r)return r.collapsed}),this._refresh(I,b)}resort(I=this.input,b=!0){this.model.resort(I===this.input?null:I,b)}refresh(I){if(I===void 0){this.view.rerender();return}this.model.rerender(I)}_refresh(I,b,S){let C;if(this.identityProvider){const r=new Set,u=S;S=i=>{const f=this.identityProvider.getId(i.element).toString();r.add(f),this.nodesByIdentity.set(f,i),u?.(i)},C=i=>{const f=this.identityProvider.getId(i.element).toString();r.has(f)||this.nodesByIdentity.delete(f)}}this.model.setChildren(I===this.input?null:I,this.iterate(I,b).elements,{onDidCreateNode:S,onDidDeleteNode:C})}iterate(I,b){const S=[...this.dataSource.getChildren(I)];return{elements:A.Iterable.map(S,r=>{const{elements:u,size:i}=this.iterate(r,b),f=this.dataSource.hasChildren?this.dataSource.hasChildren(r):void 0,c=i===0?void 0:b&&b(r);return{element:r,children:u,collapsible:f,collapsed:c}}),size:S.length}}createModel(I,b,S){return new p.ObjectTreeModel(I,b,S)}}e.DataTree=k}),define(ae[580],le([1,0,305,1261,487,112,88]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class E extends t.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(r,u,i,f,c={}){super(r,u,i,f,c),this.user=r}setChildren(r,u=k.Iterable.empty(),i){this.model.setChildren(r,u,i)}rerender(r){if(r===void 0){this.view.rerender();return}this.model.rerender(r)}updateElementHeight(r,u){this.model.updateElementHeight(r,u)}resort(r,u=!0){this.model.resort(r,u)}hasElement(r){return this.model.has(r)}createModel(r,u,i){return new R.ObjectTreeModel(r,u,i)}}e.ObjectTree=E;class I{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(r,u){this._compressedTreeNodeProvider=r,this.renderer=u,this.templateId=u.templateId,u.onDidChangeTwistieState&&(this.onDidChangeTwistieState=u.onDidChangeTwistieState)}renderTemplate(r){const u=this.renderer.renderTemplate(r);return{compressedTreeNode:void 0,data:u}}renderElement(r,u,i,f){const c=this.compressedTreeNodeProvider.getCompressedTreeNode(r.element);c.element.elements.length===1?(i.compressedTreeNode=void 0,this.renderer.renderElement(r,u,i.data,f)):(i.compressedTreeNode=c,this.renderer.renderCompressedElements(c,u,i.data,f))}disposeElement(r,u,i,f){i.compressedTreeNode?this.renderer.disposeCompressedElements?.(i.compressedTreeNode,u,i.data,f):this.renderer.disposeElement?.(r,u,i.data,f)}disposeTemplate(r){this.renderer.disposeTemplate(r.data)}renderTwistie(r,u){return this.renderer.renderTwistie?this.renderer.renderTwistie(r,u):!1}}we([A.memoize],I.prototype,"compressedTreeNodeProvider",null);function b(C,r){return r&&{...r,keyboardNavigationLabelProvider:r.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(u){let i;try{i=C().getCompressedTreeNode(u)}catch{return r.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(u)}return i.element.elements.length===1?r.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(u):r.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}}}class S extends E{constructor(r,u,i,f,c={}){const l=()=>this,s=f.map(d=>new I(l,d));super(r,u,i,s,b(l,c))}setChildren(r,u=k.Iterable.empty(),i){this.model.setChildren(r,u,i)}createModel(r,u,i){return new p.CompressibleObjectTreeModel(r,u,i)}updateOptions(r={}){super.updateOptions(r),typeof r.compressionEnabled<"u"&&this.model.setCompressionEnabled(r.compressionEnabled)}getCompressedTreeNode(r=null){return this.model.getCompressedTreeNode(r)}}e.CompressibleObjectTree=S}),define(ae[489],le([1,0,328,305,575,580,297,11,29,21,6,88,2,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function i(M){return{...M,children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0}}function f(M,O){return O.parent?O.parent===M?!0:f(M,O.parent):!1}function c(M,O){return M===O||f(M,O)||f(O,M)}class l{get element(){return this.node.element.element}get children(){return this.node.children.map(O=>new l(O))}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}constructor(O){this.node=O}}class s{constructor(O,N,P){this.renderer=O,this.nodeMapper=N,this.onDidChangeTwistieState=P,this.renderedNodes=new Map,this.templateId=O.templateId}renderTemplate(O){return{templateData:this.renderer.renderTemplate(O)}}renderElement(O,N,P,B){this.renderer.renderElement(this.nodeMapper.map(O),N,P.templateData,B)}renderTwistie(O,N){return O.slow?(N.classList.add(...I.Codicon.treeItemLoading.classNamesArray),!0):(N.classList.remove(...I.Codicon.treeItemLoading.classNamesArray),!1)}disposeElement(O,N,P,B){this.renderer.disposeElement?.(this.nodeMapper.map(O),N,P.templateData,B)}disposeTemplate(O){this.renderer.disposeTemplate(O.templateData)}dispose(){this.renderedNodes.clear()}}function d(M){return{browserEvent:M.browserEvent,elements:M.elements.map(O=>O.element)}}function n(M){return{browserEvent:M.browserEvent,element:M.element&&M.element.element,target:M.target}}function a(M){return{browserEvent:M.browserEvent,element:M.element&&M.element.element,anchor:M.anchor}}class o extends t.ElementsDragAndDropData{set context(O){this.data.context=O}get context(){return this.data.context}constructor(O){super(O.elements.map(N=>N.element)),this.data=O}}function g(M){return M instanceof t.ElementsDragAndDropData?new o(M):M}class h{constructor(O){this.dnd=O}getDragURI(O){return this.dnd.getDragURI(O.element)}getDragLabel(O,N){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(O.map(P=>P.element),N)}onDragStart(O,N){this.dnd.onDragStart?.(g(O),N)}onDragOver(O,N,P,B,V=!0){return this.dnd.onDragOver(g(O),N&&N.element,P,B)}drop(O,N,P,B){this.dnd.drop(g(O),N&&N.element,P,B)}onDragEnd(O){this.dnd.onDragEnd?.(O)}}function v(M){return M&&{...M,collapseByDefault:!0,identityProvider:M.identityProvider&&{getId(O){return M.identityProvider.getId(O.element)}},dnd:M.dnd&&new h(M.dnd),multipleSelectionController:M.multipleSelectionController&&{isSelectionSingleChangeEvent(O){return M.multipleSelectionController.isSelectionSingleChangeEvent({...O,element:O.element})},isSelectionRangeChangeEvent(O){return M.multipleSelectionController.isSelectionRangeChangeEvent({...O,element:O.element})}},accessibilityProvider:M.accessibilityProvider&&{...M.accessibilityProvider,getPosInSet:void 0,getSetSize:void 0,getRole:M.accessibilityProvider.getRole?O=>M.accessibilityProvider.getRole(O.element):()=>"treeitem",isChecked:M.accessibilityProvider.isChecked?O=>!!M.accessibilityProvider?.isChecked(O.element):void 0,getAriaLabel(O){return M.accessibilityProvider.getAriaLabel(O.element)},getWidgetAriaLabel(){return M.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:M.accessibilityProvider.getWidgetRole?()=>M.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:M.accessibilityProvider.getAriaLevel&&(O=>M.accessibilityProvider.getAriaLevel(O.element)),getActiveDescendantId:M.accessibilityProvider.getActiveDescendantId&&(O=>M.accessibilityProvider.getActiveDescendantId(O.element))},filter:M.filter&&{filter(O,N){return M.filter.filter(O.element,N)}},keyboardNavigationLabelProvider:M.keyboardNavigationLabelProvider&&{...M.keyboardNavigationLabelProvider,getKeyboardNavigationLabel(O){return M.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(O.element)}},sorter:void 0,expandOnlyOnTwistieClick:typeof M.expandOnlyOnTwistieClick>"u"?void 0:typeof M.expandOnlyOnTwistieClick!="function"?M.expandOnlyOnTwistieClick:O=>M.expandOnlyOnTwistieClick(O.element),additionalScrollHeight:M.additionalScrollHeight}}function m(M,O){O(M),M.children.forEach(N=>m(N,O))}class w{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return S.Event.map(this.tree.onDidChangeFocus,d)}get onDidChangeSelection(){return S.Event.map(this.tree.onDidChangeSelection,d)}get onKeyDown(){return this.tree.onKeyDown}get onMouseClick(){return S.Event.map(this.tree.onMouseClick,n)}get onMouseDblClick(){return S.Event.map(this.tree.onMouseDblClick,n)}get onContextMenu(){return S.Event.map(this.tree.onContextMenu,a)}get onTap(){return S.Event.map(this.tree.onTap,n)}get onPointer(){return S.Event.map(this.tree.onPointer,n)}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 onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get findMode(){return this.tree.findMode}set findMode(O){this.tree.findMode=O}get expandOnlyOnTwistieClick(){if(typeof this.tree.expandOnlyOnTwistieClick=="boolean")return this.tree.expandOnlyOnTwistieClick;const O=this.tree.expandOnlyOnTwistieClick;return N=>O(this.nodes.get(N===this.root.element?null:N)||null)}get onDidDispose(){return this.tree.onDidDispose}constructor(O,N,P,B,V,z={}){this.user=O,this.dataSource=V,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new S.Emitter,this._onDidChangeNodeSlowState=new S.Emitter,this.nodeMapper=new k.WeakMapper(x=>new l(x)),this.disposables=new r.DisposableStore,this.identityProvider=z.identityProvider,this.autoExpandSingleChildren=typeof z.autoExpandSingleChildren>"u"?!1:z.autoExpandSingleChildren,this.sorter=z.sorter,this.collapseByDefault=z.collapseByDefault,this.tree=this.createTree(O,N,P,B,z),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,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)}createTree(O,N,P,B,V){const z=new p.ComposedTreeDelegate(P),x=B.map(W=>new s(W,this.nodeMapper,this._onDidChangeNodeSlowState.event)),H=v(V)||{};return new A.ObjectTree(O,N,z,x,H)}updateOptions(O={}){this.tree.updateOptions(O)}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(O){this.tree.scrollTop=O}get scrollLeft(){return this.tree.scrollLeft}set scrollLeft(O){this.tree.scrollLeft=O}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(O){this.tree.ariaLabel=O}domFocus(){this.tree.domFocus()}layout(O,N){this.tree.layout(O,N)}style(O){this.tree.style(O)}getInput(){return this.root.element}async setInput(O,N){this.refreshPromises.forEach(B=>B.cancel()),this.refreshPromises.clear(),this.root.element=O;const P=N&&{viewState:N,focus:[],selection:[]};await this._updateChildren(O,!0,!1,P),P&&(this.tree.setFocus(P.focus),this.tree.setSelection(P.selection)),N&&typeof N.scrollTop=="number"&&(this.scrollTop=N.scrollTop)}async updateChildren(O=this.root.element,N=!0,P=!1,B){await this._updateChildren(O,N,P,void 0,B)}async _updateChildren(O=this.root.element,N=!0,P=!1,B,V){if(typeof this.root.element>"u")throw new k.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await S.Event.toPromise(this._onDidRender.event));const z=this.getDataNode(O);if(await this.refreshAndRenderNode(z,N,B,V),P)try{this.tree.rerender(z)}catch{}}resort(O=this.root.element,N=!0){this.tree.resort(this.getDataNode(O),N)}hasNode(O){return O===this.root.element||this.nodes.has(O)}rerender(O){if(O===void 0||O===this.root.element){this.tree.rerender();return}const N=this.getDataNode(O);this.tree.rerender(N)}updateWidth(O){const N=this.getDataNode(O);this.tree.updateWidth(N)}getNode(O=this.root.element){const N=this.getDataNode(O),P=this.tree.getNode(N===this.root?null:N);return this.nodeMapper.map(P)}collapse(O,N=!1){const P=this.getDataNode(O);return this.tree.collapse(P===this.root?null:P,N)}async expand(O,N=!1){if(typeof this.root.element>"u")throw new k.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(await this.root.refreshPromise,await S.Event.toPromise(this._onDidRender.event));const P=this.getDataNode(O);if(this.tree.hasElement(P)&&!this.tree.isCollapsible(P)||(P.refreshPromise&&(await this.root.refreshPromise,await S.Event.toPromise(this._onDidRender.event)),P!==this.root&&!P.refreshPromise&&!this.tree.isCollapsed(P)))return!1;const B=this.tree.expand(P===this.root?null:P,N);return P.refreshPromise&&(await this.root.refreshPromise,await S.Event.toPromise(this._onDidRender.event)),B}toggleCollapsed(O,N=!1){return this.tree.toggleCollapsed(this.getDataNode(O),N)}expandAll(){this.tree.expandAll()}collapseAll(){this.tree.collapseAll()}isCollapsible(O){return this.tree.isCollapsible(this.getDataNode(O))}isCollapsed(O){return this.tree.isCollapsed(this.getDataNode(O))}triggerTypeNavigation(){this.tree.triggerTypeNavigation()}openFind(){this.tree.openFind()}closeFind(){this.tree.closeFind()}refilter(){this.tree.refilter()}setAnchor(O){this.tree.setAnchor(typeof O>"u"?void 0:this.getDataNode(O))}getAnchor(){return this.tree.getAnchor()?.element}setSelection(O,N){const P=O.map(B=>this.getDataNode(B));this.tree.setSelection(P,N)}getSelection(){return this.tree.getSelection().map(N=>N.element)}setFocus(O,N){const P=O.map(B=>this.getDataNode(B));this.tree.setFocus(P,N)}focusNext(O=1,N=!1,P){this.tree.focusNext(O,N,P)}focusPrevious(O=1,N=!1,P){this.tree.focusPrevious(O,N,P)}focusNextPage(O){return this.tree.focusNextPage(O)}focusPreviousPage(O){return this.tree.focusPreviousPage(O)}focusLast(O){this.tree.focusLast(O)}focusFirst(O){this.tree.focusFirst(O)}getFocus(){return this.tree.getFocus().map(N=>N.element)}reveal(O,N){this.tree.reveal(this.getDataNode(O),N)}getRelativeTop(O){return this.tree.getRelativeTop(this.getDataNode(O))}getParentElement(O){const N=this.tree.getParentElement(this.getDataNode(O));return N&&N.element}getFirstElementChild(O=this.root.element){const N=this.getDataNode(O),P=this.tree.getFirstElementChild(N===this.root?null:N);return P&&P.element}getDataNode(O){const N=this.nodes.get(O===this.root.element?null:O);if(!N)throw new k.TreeError(this.user,`Data tree node not found: ${O}`);return N}async refreshAndRenderNode(O,N,P,B){await this.refreshNode(O,N,P),this.render(O,P,B)}async refreshNode(O,N,P){let B;if(this.subTreeRefreshPromises.forEach((V,z)=>{!B&&c(z,O)&&(B=V.then(()=>this.refreshNode(O,N,P)))}),B)return B;if(O!==this.root&&this.tree.getNode(O).collapsed){O.hasChildren=!!this.dataSource.hasChildren(O.element),O.stale=!0;return}return this.doRefreshSubTree(O,N,P)}async doRefreshSubTree(O,N,P){let B;O.refreshPromise=new Promise(V=>B=V),this.subTreeRefreshPromises.set(O,O.refreshPromise),O.refreshPromise.finally(()=>{O.refreshPromise=void 0,this.subTreeRefreshPromises.delete(O)});try{const V=await this.doRefreshNode(O,N,P);O.stale=!1,await E.Promises.settled(V.map(z=>this.doRefreshSubTree(z,N,P)))}finally{B()}}async doRefreshNode(O,N,P){O.hasChildren=!!this.dataSource.hasChildren(O.element);let B;if(!O.hasChildren)B=Promise.resolve(C.Iterable.empty());else{const V=this.doGetChildren(O);if((0,u.isIterable)(V))B=Promise.resolve(V);else{const z=(0,E.timeout)(800);z.then(()=>{O.slow=!0,this._onDidChangeNodeSlowState.fire(O)},x=>null),B=V.finally(()=>z.cancel())}}try{const V=await B;return this.setChildren(O,V,N,P)}catch(V){if(O!==this.root&&this.tree.hasElement(O)&&this.tree.collapse(O),(0,b.isCancellationError)(V))return[];throw V}finally{O.slow&&(O.slow=!1,this._onDidChangeNodeSlowState.fire(O))}}doGetChildren(O){let N=this.refreshPromises.get(O);if(N)return N;const P=this.dataSource.getChildren(O.element);return(0,u.isIterable)(P)?this.processChildren(P):(N=(0,E.createCancelablePromise)(async()=>this.processChildren(await P)),this.refreshPromises.set(O,N),N.finally(()=>{this.refreshPromises.delete(O)}))}_onDidChangeCollapseState({node:O,deep:N}){O.element!==null&&!O.collapsed&&O.element.stale&&(N?this.collapse(O.element.element):this.refreshAndRenderNode(O.element,!1).catch(b.onUnexpectedError))}setChildren(O,N,P,B){const V=[...N];if(O.children.length===0&&V.length===0)return[];const z=new Map,x=new Map;for(const U of O.children)if(z.set(U.element,U),this.identityProvider){const $=this.tree.isCollapsed(U);x.set(U.id,{node:U,collapsed:$})}const H=[],W=V.map(U=>{const $=!!this.dataSource.hasChildren(U);if(!this.identityProvider){const Q=i({element:U,parent:O,hasChildren:$});return $&&this.collapseByDefault&&!this.collapseByDefault(U)&&(Q.collapsedByDefault=!1,H.push(Q)),Q}const q=this.identityProvider.getId(U).toString(),X=x.get(q);if(X){const Q=X.node;return z.delete(Q.element),this.nodes.delete(Q.element),this.nodes.set(U,Q),Q.element=U,Q.hasChildren=$,P?X.collapsed?(Q.children.forEach(j=>m(j,K=>this.nodes.delete(K.element))),Q.children.splice(0,Q.children.length),Q.stale=!0):H.push(Q):$&&this.collapseByDefault&&!this.collapseByDefault(U)&&(Q.collapsedByDefault=!1,H.push(Q)),Q}const G=i({element:U,parent:O,id:q,hasChildren:$});return B&&B.viewState.focus&&B.viewState.focus.indexOf(q)>-1&&B.focus.push(G),B&&B.viewState.selection&&B.viewState.selection.indexOf(q)>-1&&B.selection.push(G),B&&B.viewState.expanded&&B.viewState.expanded.indexOf(q)>-1?H.push(G):$&&this.collapseByDefault&&!this.collapseByDefault(U)&&(G.collapsedByDefault=!1,H.push(G)),G});for(const U of z.values())m(U,$=>this.nodes.delete($.element));for(const U of W)this.nodes.set(U.element,U);return O.children.splice(0,O.children.length,...W),O!==this.root&&this.autoExpandSingleChildren&&W.length===1&&H.length===0&&(W[0].collapsedByDefault=!1,H.push(W[0])),H}render(O,N,P){const B=O.children.map(z=>this.asTreeElement(z,N)),V=P&&{...P,diffIdentityProvider:P.diffIdentityProvider&&{getId(z){return P.diffIdentityProvider.getId(z.element)}}};this.tree.setChildren(O===this.root?null:O,B,V),O!==this.root&&this.tree.setCollapsible(O,O.hasChildren),this._onDidRender.fire()}asTreeElement(O,N){if(O.stale)return{element:O,collapsible:O.hasChildren,collapsed:!0};let P;return N&&N.viewState.expanded&&O.id&&N.viewState.expanded.indexOf(O.id)>-1?P=!1:P=O.collapsedByDefault,O.collapsedByDefault=void 0,{element:O,children:O.hasChildren?C.Iterable.map(O.children,B=>this.asTreeElement(B,N)):[],collapsible:O.hasChildren,collapsed:P}}processChildren(O){return this.sorter&&(O=[...O].sort(this.sorter.compare.bind(this.sorter))),O}getViewState(){if(!this.identityProvider)throw new k.TreeError(this.user,"Can't get tree view state without an identity provider");const O=x=>this.identityProvider.getId(x).toString(),N=this.getFocus().map(O),P=this.getSelection().map(O),B=[],V=this.tree.getNode(),z=[V];for(;z.length>0;){const x=z.pop();x!==V&&x.collapsible&&!x.collapsed&&B.push(O(x.element.element)),z.push(...x.children)}return{focus:N,selection:P,expanded:B,scrollTop:this.scrollTop}}dispose(){this.disposables.dispose()}}e.AsyncDataTree=w;class D{get element(){return{elements:this.node.element.elements.map(O=>O.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(O=>new D(O))}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}constructor(O){this.node=O}}class y{constructor(O,N,P,B){this.renderer=O,this.nodeMapper=N,this.compressibleNodeMapperProvider=P,this.onDidChangeTwistieState=B,this.renderedNodes=new Map,this.disposables=[],this.templateId=O.templateId}renderTemplate(O){return{templateData:this.renderer.renderTemplate(O)}}renderElement(O,N,P,B){this.renderer.renderElement(this.nodeMapper.map(O),N,P.templateData,B)}renderCompressedElements(O,N,P,B){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(O),N,P.templateData,B)}renderTwistie(O,N){return O.slow?(N.classList.add(...I.Codicon.treeItemLoading.classNamesArray),!0):(N.classList.remove(...I.Codicon.treeItemLoading.classNamesArray),!1)}disposeElement(O,N,P,B){this.renderer.disposeElement?.(this.nodeMapper.map(O),N,P.templateData,B)}disposeCompressedElements(O,N,P,B){this.renderer.disposeCompressedElements?.(this.compressibleNodeMapperProvider().map(O),N,P.templateData,B)}disposeTemplate(O){this.renderer.disposeTemplate(O.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,r.dispose)(this.disposables)}}function T(M){const O=M&&v(M);return O&&{...O,keyboardNavigationLabelProvider:O.keyboardNavigationLabelProvider&&{...O.keyboardNavigationLabelProvider,getCompressedNodeKeyboardNavigationLabel(N){return M.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(N.map(P=>P.element))}}}}class _ extends w{constructor(O,N,P,B,V,z,x={}){super(O,N,P,V,z,x),this.compressionDelegate=B,this.compressibleNodeMapper=new k.WeakMapper(H=>new D(H)),this.filter=x.filter}createTree(O,N,P,B,V){const z=new p.ComposedTreeDelegate(P),x=B.map(W=>new y(W,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),H=T(V)||{};return new A.CompressibleObjectTree(O,N,z,x,H)}asTreeElement(O,N){return{incompressible:this.compressionDelegate.isIncompressible(O.element),...super.asTreeElement(O,N)}}updateOptions(O={}){this.tree.updateOptions(O)}getViewState(){if(!this.identityProvider)throw new k.TreeError(this.user,"Can't get tree view state without an identity provider");const O=x=>this.identityProvider.getId(x).toString(),N=this.getFocus().map(O),P=this.getSelection().map(O),B=[],V=this.tree.getCompressedTreeNode(),z=[V];for(;z.length>0;){const x=z.pop();if(x!==V&&x.collapsible&&!x.collapsed)for(const H of x.element.elements)B.push(O(H.element));z.push(...x.children)}return{focus:N,selection:P,expanded:B,scrollTop:this.scrollTop}}render(O,N){if(!this.identityProvider)return super.render(O,N);const P=q=>this.identityProvider.getId(q).toString(),B=q=>{const X=new Set;for(const G of q){const Q=this.tree.getCompressedTreeNode(G===this.root?null:G);if(!!Q.element)for(const j of Q.element.elements)X.add(P(j.element))}return X},V=B(this.tree.getSelection()),z=B(this.tree.getFocus());super.render(O,N);const x=this.getSelection();let H=!1;const W=this.getFocus();let U=!1;const $=q=>{const X=q.element;if(X)for(let G=0;G<X.elements.length;G++){const Q=P(X.elements[G].element),j=X.elements[X.elements.length-1].element;V.has(Q)&&x.indexOf(j)===-1&&(x.push(j),H=!0),z.has(Q)&&W.indexOf(j)===-1&&(W.push(j),U=!0)}q.children.forEach($)};$(this.tree.getCompressedTreeNode(O===this.root?null:O)),H&&this.setSelection(x),U&&this.setFocus(W)}processChildren(O){return this.filter&&(O=C.Iterable.filter(O,N=>{const P=this.filter.filter(N,1),B=L(P);if(B===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return B===1})),super.processChildren(O)}}e.CompressibleAsyncDataTree=_;function L(M){return typeof M=="boolean"?M?1:0:(0,R.isFilterResult)(M)?(0,R.getVisibleState)(M.visibility):(0,R.getVisibleState)(M)}}),define(ae[130],le([1,0,16,164,53,14,18,28]),function(J,e,t,p,R,A,k,E){"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.getPathLabel=void 0;function I(h,v){const{os:m,tildify:w,relative:D}=v;if(D){const _=b(h,D,m);if(typeof _=="string")return _}let y=h.fsPath;if(m===1&&!A.isWindows?y=y.replace(/\//g,"\\"):m!==1&&A.isWindows&&(y=y.replace(/\\/g,"/")),m!==1&&w?.userHome){const _=w.userHome.fsPath;let L;h.scheme!==w.userHome.scheme&&h.path.startsWith(R.posix.sep)?L=w.userHome.with({path:h.path}).fsPath:L=h.fsPath,y=r(L,_,m)}return(m===1?R.win32:R.posix).normalize(S(y,m===1))}e.getPathLabel=I;function b(h,v,m){const w=m===1?R.win32:R.posix,D=m===3?k.extUri:k.extUriIgnorePathCase,y=v.getWorkspace(),T=(0,t.firstOrDefault)(y.folders);if(!T)return;h.scheme!==T.uri.scheme&&h.path.startsWith(R.posix.sep)&&(h=T.uri.with({path:h.path}));const _=v.getWorkspaceFolder(h);if(!_)return;let L;if(D.isEqual(_.uri,h)?L="":L=D.relativePath(_.uri,h)??"",L&&(L=w.normalize(L)),y.folders.length>1&&!v.noPrefix){const M=_.name?_.name:D.basenameOrAuthority(_.uri);L=L?`${M} \u2022 ${L}`:M}return L}function S(h,v=A.isWindows){return(0,p.hasDriveLetter)(h,v)?h.charAt(0).toUpperCase()+h.slice(1):h}e.normalizeDriveLetter=S;let C=Object.create(null);function r(h,v,m=A.OS){if(m===1||!h||!v)return h;let w=C.original===v?C.normalized:void 0;w||(w=v,A.isWindows&&(w=(0,p.toSlashes)(w)),w=`${(0,E.rtrim)(w,R.posix.sep)}${R.posix.sep}`,C={original:v,normalized:w});let D=h;return A.isWindows&&(D=(0,p.toSlashes)(D)),(m===3?D.startsWith(w):(0,E.startsWithIgnoreCase)(D,w))?`~/${D.substr(w.length)}`:h}e.tildify=r;function u(h,v){return h.replace(/^~($|\/|\\)/,`${v}$1`)}e.untildify=u;const i="\u2026",f="\\\\",c="~";function l(h,v=R.sep){const m=new Array(h.length);let w=!1;for(let D=0;D<h.length;D++){const y=h[D];if(y===""){m[D]=`.${v}`;continue}if(!y){m[D]=y;continue}w=!0;let T="",_=y;_.indexOf(f)===0?(T=_.substr(0,_.indexOf(f)+f.length),_=_.substr(_.indexOf(f)+f.length)):_.indexOf(v)===0?(T=_.substr(0,_.indexOf(v)+v.length),_=_.substr(_.indexOf(v)+v.length)):_.indexOf(c)===0&&(T=_.substr(0,_.indexOf(c)+c.length),_=_.substr(_.indexOf(c)+c.length));const L=_.split(v);for(let M=1;w&&M<=L.length;M++)for(let O=L.length-M;w&&O>=0;O--){w=!1;let N=L.slice(O,O+M).join(v);for(let P=0;!w&&P<h.length;P++)if(P!==D&&h[P]&&h[P].indexOf(N)>-1){const B=O+M===L.length,V=O>0&&h[P].indexOf(v)>-1?v+N:N,z=h[P].endsWith(V);w=!B||z}if(!w){let P="";(L[0].endsWith(":")||T!=="")&&(O===1&&(O=0,M++,N=L[0]+v+N),O>0&&(P=L[0]+v),P=T+P),O>0&&(P=P+i+v),P=P+N,O+M<L.length&&(P=P+v+i),m[D]=P}}w&&(m[D]=y)}return m}e.shorten=l;var s;(function(h){h[h.TEXT=0]="TEXT",h[h.VARIABLE=1]="VARIABLE",h[h.SEPARATOR=2]="SEPARATOR"})(s||(s={}));function d(h,v=Object.create(null)){const m=[];let w=!1,D="";for(const y of h)if(y==="$"||w&&y==="{")D&&m.push({value:D,type:s.TEXT}),D="",w=!0;else if(y==="}"&&w){const T=v[D];if(typeof T=="string")T.length&&m.push({value:T,type:s.VARIABLE});else if(T){const _=m[m.length-1];(!_||_.type!==s.SEPARATOR)&&m.push({value:T.label,type:s.SEPARATOR})}D="",w=!1}else D+=y;return D&&!w&&m.push({value:D,type:s.TEXT}),m.filter((y,T)=>{if(y.type===s.SEPARATOR){const _=m[T-1],L=m[T+1];return[_,L].every(M=>M&&(M.type===s.VARIABLE||M.type===s.TEXT)&&M.value.length>0)}return!0}).map(y=>y.value).join("")}e.template=d;function n(h,v){return A.isMacintosh||v?h.replace(/\(&&\w\)|&&/g,"").replace(/&/g,A.isMacintosh?"&":"&&"):h.replace(/&&|&/g,m=>m==="&"?"&&":"&")}e.mnemonicMenuLabel=n;function a(h,v){return A.isMacintosh||v?h.replace(/\(&&\w\)|&&/g,""):A.isWindows?h.replace(/&&|&/g,m=>m==="&"?"&&":"&"):h.replace(/&&/g,"_")}e.mnemonicButtonLabel=a;function o(h){return h.replace(/&/g,"&&")}e.unmnemonicLabel=o;function g(h){const v=h.indexOf("/")!==-1?R.posix:R.win32,m=v.basename(h),w=v.dirname(h);return m.length?{name:m,parentPath:w}:{name:w,parentPath:""}}e.splitName=g}),define(ae[758],le([1,0,10,90,79,182,197,211,36,29,130,2,14,1235,1038]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Dialog=void 0;class i extends C.Disposable{constructor(c,l,s,d){super(),this.container=c,this.message=l,this.options=d,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(s)&&s.length>0?this.buttons=s:this.options.disableDefaultAction?this.buttons=[]:this.buttons=[u.localize(0,null)];const n=this.element.appendChild((0,t.$)(".dialog-buttons-row"));this.buttonsContainer=n.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 h=this.messageContainer.appendChild((0,t.$)(".dialog-message")).appendChild((0,t.$)("#monaco-dialog-message-text.dialog-message-text"));h.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 g=this.messageContainer.appendChild((0,t.$)("#monaco-dialog-message-body.dialog-message-body"));this.options.renderBody(g);for(const h of this.messageContainer.querySelectorAll("a"))h.tabIndex=0}if(this.options.inputs?this.inputs=this.options.inputs.map(g=>{const h=this.messageContainer.appendChild((0,t.$)(".dialog-message-input")),v=this._register(new E.InputBox(h,void 0,{placeholder:g.placeholder,type:g.type??"text"}));return g.value&&(v.value=g.value),v}):this.inputs=[],this.options.checkboxLabel){const g=this.messageContainer.appendChild((0,t.$)(".dialog-checkbox-row")),h=this.checkbox=this._register(new k.Checkbox(this.options.checkboxLabel,!!this.options.checkboxChecked));g.appendChild(h.domNode);const v=g.appendChild((0,t.$)(".dialog-checkbox-message"));v.innerText=this.options.checkboxLabel,this._register((0,t.addDisposableListener)(v,t.EventType.CLICK,()=>h.checked=!h.checked))}const o=this.element.appendChild((0,t.$)(".dialog-toolbar-row"));this.toolbarContainer=o.appendChild((0,t.$)(".dialog-toolbar"))}getIconAriaLabel(){const c=u.localize(1,null);switch(this.options.type){case"error":u.localize(2,null);break;case"warning":u.localize(3,null);break;case"pending":u.localize(4,null);break;case"none":case"info":case"question":default:break}return c}updateMessage(c){this.messageDetailElement.innerText=c}async show(){return this.focusToReturn=document.activeElement,new Promise(c=>{(0,t.clearNode)(this.buttonsContainer);const l=this.buttonBar=this._register(new A.ButtonBar(this.buttonsContainer)),s=this.rearrangeButtons(this.buttons,this.options.cancelId);s.forEach((n,a)=>{const o=s[a].index===0,g=this.options.buttonDetails?this._register(l.addButtonWithDescription({title:!0,secondary:!o})):this._register(l.addButton({title:!0,secondary:!o}));g.label=(0,S.mnemonicButtonLabel)(s[a].label,!0),g instanceof A.ButtonWithDescription&&(g.description=this.options.buttonDetails[s[a].index]),this._register(g.onDidClick(h=>{h&&t.EventHelper.stop(h),c({button:s[a].index,checkboxChecked:this.checkbox?this.checkbox.checked:void 0,values:this.inputs.length>0?this.inputs.map(v=>v.value):void 0})}))}),this._register((0,t.addDisposableListener)(window,"keydown",n=>{const a=new p.StandardKeyboardEvent(n);if(a.equals(512)&&a.preventDefault(),a.equals(3)){this.inputs.some(g=>g.hasFocus())&&(t.EventHelper.stop(n),c({button:s.find(g=>g.index!==this.options.cancelId)?.index??0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0,values:this.inputs.length>0?this.inputs.map(g=>g.value):void 0}));return}if(a.equals(10))return;let o=!1;if(a.equals(2)||a.equals(17)||a.equals(1026)||a.equals(15)){const g=[];let h=-1;if(this.messageContainer){const v=this.messageContainer.querySelectorAll("a");for(const m of v)g.push(m),m===document.activeElement&&(h=g.length-1)}for(const v of this.inputs)g.push(v),v.hasFocus()&&(h=g.length-1);if(this.checkbox&&(g.push(this.checkbox),this.checkbox.hasFocus()&&(h=g.length-1)),this.buttonBar)for(const v of this.buttonBar.buttons)g.push(v),v.hasFocus()&&(h=g.length-1);if(a.equals(2)||a.equals(17)){h===-1&&(h=0);const v=(h+1)%g.length;g[v].focus()}else{h===-1&&(h=g.length);let v=h-1;v===-1&&(v=g.length-1),g[v].focus()}o=!0}o?t.EventHelper.stop(n,!0):this.options.keyEventProcessor&&this.options.keyEventProcessor(a)},!0)),this._register((0,t.addDisposableListener)(window,"keyup",n=>{t.EventHelper.stop(n,!0);const a=new p.StandardKeyboardEvent(n);!this.options.disableCloseAction&&a.equals(9)&&c({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})},!0)),this._register((0,t.addDisposableListener)(this.element,"focusout",n=>{!!n.relatedTarget&&!!this.element&&((0,t.isAncestor)(n.relatedTarget,this.element)||(this.focusToReturn=n.relatedTarget,n.target&&(n.target.focus(),t.EventHelper.stop(n,!0))))},!1));const d="codicon-modifier-spin";if(this.iconElement.classList.remove(...b.Codicon.dialogError.classNamesArray,...b.Codicon.dialogWarning.classNamesArray,...b.Codicon.dialogInfo.classNamesArray,...b.Codicon.loading.classNamesArray,d),this.options.icon)this.iconElement.classList.add(...this.options.icon.classNamesArray);else switch(this.options.type){case"error":this.iconElement.classList.add(...b.Codicon.dialogError.classNamesArray);break;case"warning":this.iconElement.classList.add(...b.Codicon.dialogWarning.classNamesArray);break;case"pending":this.iconElement.classList.add(...b.Codicon.loading.classNamesArray,d);break;case"none":case"info":case"question":default:this.iconElement.classList.add(...b.Codicon.dialogInfo.classNamesArray);break}if(!this.options.disableCloseAction){const n=this._register(new R.ActionBar(this.toolbarContainer,{})),a=this._register(new I.Action("dialog.close",u.localize(5,null),b.Codicon.dialogClose.classNames,!0,async()=>{c({button:this.options.cancelId||0,checkboxChecked:this.checkbox?this.checkbox.checked:void 0})}));n.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()):s.forEach((n,a)=>{n.index===0&&l.buttons[a].focus()})})}applyStyles(){if(this.styles){const c=this.styles,l=c.dialogForeground,s=c.dialogBackground,d=c.dialogShadow?`0 0px 8px ${c.dialogShadow}`:"",n=c.dialogBorder?`1px solid ${c.dialogBorder}`:"",a=c.textLinkForeground;if(this.shadowElement.style.boxShadow=d,this.element.style.color=l?.toString()??"",this.element.style.backgroundColor=s?.toString()??"",this.element.style.border=n,this.buttonBar?.buttons.forEach(g=>g.style(c)),this.checkbox?.style(c),l&&s){const g=l.transparent(.9);this.messageDetailElement.style.color=g.makeOpaque(s).toString()}if(a)for(const g of this.messageContainer.getElementsByTagName("a"))g.style.color=a.toString();let o;switch(this.options.type){case"error":o=c.errorIconForeground;break;case"warning":o=c.warningIconForeground;break;default:o=c.infoIconForeground;break}o&&(this.iconElement.style.color=o.toString());for(const g of this.inputs)g.style(c)}}style(c){this.styles=c,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(c,l){const s=[];if(c.length===0)return s;if(c.forEach((d,n)=>{s.push({label:d,index:n})}),(r.isMacintosh||r.isLinux)&&l!==void 0&&l<c.length){const d=s.splice(l,1)[0];s.reverse(),s.splice(s.length-1,0,d)}return s}}e.Dialog=i}),define(ae[1269],le([1,0,112,220,53,18,9]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceTree=void 0;class E{get childrenCount(){return this._children.size}get children(){return this._children.values()}get name(){return R.posix.basename(this.relativePath)}constructor(C,r,u,i=void 0,f=void 0){this.uri=C,this.relativePath=r,this.context=u,this.element=i,this.parent=f,this._children=new Map}get(C){return this._children.get(C)}set(C,r){this._children.set(C,r)}delete(C){this._children.delete(C)}clear(){this._children.clear()}}we([t.memoize],E.prototype,"name",null);function I(S,C){typeof S.element<"u"&&C.push(S.element);for(const r of S.children)I(r,C);return C}class b{static getRoot(C){for(;C.parent;)C=C.parent;return C}static collect(C){return I(C,[])}static isResourceNode(C){return C instanceof E}constructor(C,r=k.URI.file("/"),u=A.extUri){this.extUri=u,this.root=new E(r,"",C)}add(C,r){const u=this.extUri.relativePath(this.root.uri,C)||C.path,i=new p.PathIterator(!1).reset(u);let f=this.root,c="";for(;;){const l=i.value();c=c+"/"+l;let s=f.get(l);if(s?i.hasNext()||(s.element=r):(s=new E(this.extUri.joinPath(this.root.uri,c),c,this.root.context,i.hasNext()?void 0:r,f),f.set(l,s)),f=s,!i.hasNext())return;i.next()}}delete(C){const r=this.extUri.relativePath(this.root.uri,C)||C.path,u=new p.PathIterator(!1).reset(r);return this._delete(this.root,u)}_delete(C,r){const u=r.value(),i=C.get(u);if(!!i){if(r.hasNext()){const f=this._delete(i,r.next());return typeof f<"u"&&i.childrenCount===0&&C.delete(u),f}return C.delete(u),i.element}}clear(){this.root.clear()}getNode(C){const r=this.extUri.relativePath(this.root.uri,C)||C.path,u=new p.PathIterator(!1).reset(r);let i=this.root;for(;;){const f=u.value(),c=i.get(f);if(!c||!u.hasNext())return c;i=c,u.next()}}}e.ResourceTree=b}),define(ae[759],le([1,0,9]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.transformAndReviveIncomingURIs=e.transformIncomingURIs=e.transformOutgoingURIs=e.DefaultURITransformer=e.URITransformer=void 0;function p(S){return S.toJSON()}class R{constructor(C){this._uriTransformer=C}transformIncoming(C){const r=this._uriTransformer.transformIncoming(C);return r===C?C:p(t.URI.from(r))}transformOutgoing(C){const r=this._uriTransformer.transformOutgoing(C);return r===C?C:p(t.URI.from(r))}transformOutgoingURI(C){const r=this._uriTransformer.transformOutgoing(C);return r===C?C:t.URI.from(r)}transformOutgoingScheme(C){return this._uriTransformer.transformOutgoingScheme(C)}}e.URITransformer=R,e.DefaultURITransformer=new class{transformIncoming(S){return S}transformOutgoing(S){return S}transformOutgoingURI(S){return S}transformOutgoingScheme(S){return S}};function A(S,C,r){if(!S||r>200)return null;if(typeof S=="object"){if(S instanceof t.URI)return C.transformOutgoing(S);for(const u in S)if(Object.hasOwnProperty.call(S,u)){const i=A(S[u],C,r+1);i!==null&&(S[u]=i)}}return null}function k(S,C){const r=A(S,C,0);return r===null?S:r}e.transformOutgoingURIs=k;function E(S,C,r,u){if(!S||u>200)return null;if(typeof S=="object"){if(S.$mid===1)return r?t.URI.revive(C.transformIncoming(S)):C.transformIncoming(S);for(const i in S)if(Object.hasOwnProperty.call(S,i)){const f=E(S[i],C,r,u+1);f!==null&&(S[i]=f)}}return null}function I(S,C){const r=E(S,C,!1,0);return r===null?S:r}e.transformIncomingURIs=I;function b(S,C){const r=E(S,C,!0,0);return r===null?S:r}e.transformAndReviveIncomingURIs=b}),define(ae[419],le([1,0,21,6,2,52,14,28]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const I="$initialize";let b=!1;function S(h){!k.isWeb||(b||(b=!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(h.message))}e.logOnceWebWorkerWarning=S;var C;(function(h){h[h.Request=0]="Request",h[h.Reply=1]="Reply",h[h.SubscribeEvent=2]="SubscribeEvent",h[h.Event=3]="Event",h[h.UnsubscribeEvent=4]="UnsubscribeEvent"})(C||(C={}));class r{constructor(v,m,w,D){this.vsWorker=v,this.req=m,this.method=w,this.args=D,this.type=0}}class u{constructor(v,m,w,D){this.vsWorker=v,this.seq=m,this.res=w,this.err=D,this.type=1}}class i{constructor(v,m,w,D){this.vsWorker=v,this.req=m,this.eventName=w,this.arg=D,this.type=2}}class f{constructor(v,m,w){this.vsWorker=v,this.req=m,this.event=w,this.type=3}}class c{constructor(v,m){this.vsWorker=v,this.req=m,this.type=4}}class l{constructor(v){this._workerId=-1,this._handler=v,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(v){this._workerId=v}sendMessage(v,m){const w=String(++this._lastSentReq);return new Promise((D,y)=>{this._pendingReplies[w]={resolve:D,reject:y},this._send(new r(this._workerId,w,v,m))})}listen(v,m){let w=null;const D=new p.Emitter({onFirstListenerAdd:()=>{w=String(++this._lastSentReq),this._pendingEmitters.set(w,D),this._send(new i(this._workerId,w,v,m))},onLastListenerRemove:()=>{this._pendingEmitters.delete(w),this._send(new c(this._workerId,w)),w=null}});return D.event}handleMessage(v){!v||!v.vsWorker||this._workerId!==-1&&v.vsWorker!==this._workerId||this._handleMessage(v)}_handleMessage(v){switch(v.type){case 1:return this._handleReplyMessage(v);case 0:return this._handleRequestMessage(v);case 2:return this._handleSubscribeEventMessage(v);case 3:return this._handleEventMessage(v);case 4:return this._handleUnsubscribeEventMessage(v)}}_handleReplyMessage(v){if(!this._pendingReplies[v.seq]){console.warn("Got reply to unknown seq");return}const m=this._pendingReplies[v.seq];if(delete this._pendingReplies[v.seq],v.err){let w=v.err;v.err.$isError&&(w=new Error,w.name=v.err.name,w.message=v.err.message,w.stack=v.err.stack),m.reject(w);return}m.resolve(v.res)}_handleRequestMessage(v){const m=v.req;this._handler.handleMessage(v.method,v.args).then(D=>{this._send(new u(this._workerId,m,D,void 0))},D=>{D.detail instanceof Error&&(D.detail=(0,t.transformErrorForSerialization)(D.detail)),this._send(new u(this._workerId,m,void 0,(0,t.transformErrorForSerialization)(D)))})}_handleSubscribeEventMessage(v){const m=v.req,w=this._handler.handleEvent(v.eventName,v.arg)(D=>{this._send(new f(this._workerId,m,D))});this._pendingEvents.set(m,w)}_handleEventMessage(v){if(!this._pendingEmitters.has(v.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(v.req).fire(v.event)}_handleUnsubscribeEventMessage(v){if(!this._pendingEvents.has(v.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(v.req).dispose(),this._pendingEvents.delete(v.req)}_send(v){const m=[];if(v.type===0)for(let w=0;w<v.args.length;w++)v.args[w]instanceof ArrayBuffer&&m.push(v.args[w]);else v.type===1&&v.res instanceof ArrayBuffer&&m.push(v.res);this._handler.sendMessage(v,m)}}class s extends R.Disposable{constructor(v,m,w){super();let D=null;this._worker=this._register(v.create("vs/base/common/worker/simpleWorker",M=>{this._protocol.handleMessage(M)},M=>{D?.(M)})),this._protocol=new l({sendMessage:(M,O)=>{this._worker.postMessage(M,O)},handleMessage:(M,O)=>{if(typeof w[M]!="function")return Promise.reject(new Error("Missing method "+M+" on main thread host."));try{return Promise.resolve(w[M].apply(w,O))}catch(N){return Promise.reject(N)}},handleEvent:(M,O)=>{if(n(M)){const N=w[M].call(w,O);if(typeof N!="function")throw new Error(`Missing dynamic event ${M} on main thread host.`);return N}if(d(M)){const N=w[M];if(typeof N!="function")throw new Error(`Missing event ${M} on main thread host.`);return N}throw new Error(`Malformed event name ${M}`)}}),this._protocol.setWorkerId(this._worker.getId());let y=null;typeof k.globals.require<"u"&&typeof k.globals.require.getConfig=="function"?y=k.globals.require.getConfig():typeof k.globals.requirejs<"u"&&(y=k.globals.requirejs.s.contexts._.config);const T=(0,A.getAllMethodNames)(w);this._onModuleLoaded=this._protocol.sendMessage(I,[this._worker.getId(),JSON.parse(JSON.stringify(y)),m,T]);const _=(M,O)=>this._request(M,O),L=(M,O)=>this._protocol.listen(M,O);this._lazyProxy=new Promise((M,O)=>{D=O,this._onModuleLoaded.then(N=>{M(a(N,_,L))},N=>{O(N),this._onError("Worker failed to load "+m,N)})})}getProxyObject(){return this._lazyProxy}_request(v,m){return new Promise((w,D)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(v,m).then(w,D)},D)})}_onError(v,m){console.error(v),console.info(m)}}e.SimpleWorkerClient=s;function d(h){return h[0]==="o"&&h[1]==="n"&&E.isUpperAsciiLetter(h.charCodeAt(2))}function n(h){return/^onDynamic/.test(h)&&E.isUpperAsciiLetter(h.charCodeAt(9))}function a(h,v,m){const w=T=>function(){const _=Array.prototype.slice.call(arguments,0);return v(T,_)},D=T=>function(_){return m(T,_)},y={};for(const T of h){if(n(T)){y[T]=D(T);continue}if(d(T)){y[T]=m(T,void 0);continue}y[T]=w(T)}return y}class o{constructor(v,m){this._requestHandlerFactory=m,this._requestHandler=null,this._protocol=new l({sendMessage:(w,D)=>{v(w,D)},handleMessage:(w,D)=>this._handleMessage(w,D),handleEvent:(w,D)=>this._handleEvent(w,D)})}onmessage(v){this._protocol.handleMessage(v)}_handleMessage(v,m){if(v===I)return this.initialize(m[0],m[1],m[2],m[3]);if(!this._requestHandler||typeof this._requestHandler[v]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+v));try{return Promise.resolve(this._requestHandler[v].apply(this._requestHandler,m))}catch(w){return Promise.reject(w)}}_handleEvent(v,m){if(!this._requestHandler)throw new Error("Missing requestHandler");if(n(v)){const w=this._requestHandler[v].call(this._requestHandler,m);if(typeof w!="function")throw new Error(`Missing dynamic event ${v} on request handler.`);return w}if(d(v)){const w=this._requestHandler[v];if(typeof w!="function")throw new Error(`Missing event ${v} on request handler.`);return w}throw new Error(`Malformed event name ${v}`)}initialize(v,m,w,D){this._protocol.setWorkerId(v);const _=a(D,(L,M)=>this._protocol.sendMessage(L,M),(L,M)=>this._protocol.listen(L,M));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(_),Promise.resolve((0,A.getAllMethodNames)(this._requestHandler))):(m&&(typeof m.baseUrl<"u"&&delete m.baseUrl,typeof m.paths<"u"&&typeof m.paths.vs<"u"&&delete m.paths.vs,typeof m.trustedTypesPolicy!==void 0&&delete m.trustedTypesPolicy,m.catchError=!0,k.globals.require.config(m)),new Promise((L,M)=>{(k.globals.require||J)([w],N=>{if(this._requestHandler=N.create(_),!this._requestHandler){M(new Error("No RequestHandler!"));return}L((0,A.getAllMethodNames)(this._requestHandler))},M)}))}}e.SimpleWorkerServer=o;function g(h){return new o(h,null)}e.create=g}),define(ae[581],le([1,0,22,14,419]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const A=window.trustedTypes?.createPolicy("defaultWorkerFactory",{createScriptURL:C=>C});function k(C){if(p.globals.MonacoEnvironment){if(typeof p.globals.MonacoEnvironment.getWorker=="function")return p.globals.MonacoEnvironment.getWorker("workerMain.js",C);if(typeof p.globals.MonacoEnvironment.getWorkerUrl=="function"){const r=p.globals.MonacoEnvironment.getWorkerUrl("workerMain.js",C);return new Worker(A?A.createScriptURL(r):r,{name:C})}}if(typeof J=="function"){const r=J.toUrl("vs/base/worker/workerMain.js"),u=E(r,C);return new Worker(A?A.createScriptURL(u):u,{name:C})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function E(C,r){if(/^((http:)|(https:)|(file:))/.test(C)&&C.substring(0,self.origin.length)!==self.origin){const l="vs/base/worker/defaultWorkerFactory.js",s=J.toUrl(l).slice(0,-l.length),d=`/*${r}*/self.MonacoEnvironment={baseUrl: '${s}'};const ttPolicy = self.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${C}') ?? '${C}');/*${r}*/`,n=new Blob([d],{type:"application/javascript"});return URL.createObjectURL(n)}const u=C.lastIndexOf("?"),i=C.lastIndexOf("#",u),f=u>0?new URLSearchParams(C.substring(u+1,~i?i:void 0)):new URLSearchParams;return t.COI.addSearchParam(f,!0,!0),f.toString()?`${C}?${f.toString()}#${r}`:`${C}#${r}`}e.getWorkerBootstrapUrl=E;function I(C){return typeof C.then=="function"}class b{constructor(r,u,i,f,c){this.id=u;const l=k(i);I(l)?this.worker=l:this.worker=Promise.resolve(l),this.postMessage(r,[]),this.worker.then(s=>{s.onmessage=function(d){f(d.data)},s.onmessageerror=c,typeof s.addEventListener=="function"&&s.addEventListener("error",c)})}getId(){return this.id}postMessage(r,u){this.worker?.then(i=>i.postMessage(r,u))}dispose(){this.worker?.then(r=>r.terminate()),this.worker=null}}class S{constructor(r){this._label=r,this._webWorkerFailedBeforeError=!1}create(r,u,i){const f=++S.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new b(r,f,this._label||"anonymous"+f,u,c=>{(0,R.logOnceWebWorkerWarning)(c),this._webWorkerFailedBeforeError=c,i(c)})}}e.DefaultWorkerFactory=S,S.LAST_WORKER_ID=0}),define(ae[183],le([1,0,16,11,56,32,112,21,6,2,165,28,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"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 u;(function(W){W[W.Promise=100]="Promise",W[W.PromiseCancel=101]="PromiseCancel",W[W.EventListen=102]="EventListen",W[W.EventDispose=103]="EventDispose"})(u=e.RequestType||(e.RequestType={}));function i(W){switch(W){case 100:return"req";case 101:return"cancel";case 102:return"subscribe";case 103:return"unsubscribe"}}var f;(function(W){W[W.Initialize=200]="Initialize",W[W.PromiseSuccess=201]="PromiseSuccess",W[W.PromiseError=202]="PromiseError",W[W.PromiseErrorObj=203]="PromiseErrorObj",W[W.EventFire=204]="EventFire"})(f=e.ResponseType||(e.ResponseType={}));function c(W){switch(W){case 200:return"init";case 201:return"reply:";case 202:case 203:return"replyErr:";case 204:return"event:"}}var l;(function(W){W[W.Uninitialized=0]="Uninitialized",W[W.Idle=1]="Idle"})(l||(l={}));class s{constructor(U){this.buffer=U,this.pos=0}read(U){const $=this.buffer.slice(this.pos,this.pos+U);return this.pos+=$.byteLength,$}}class d{constructor(){this.buffers=[]}get buffer(){return R.VSBuffer.concat(this.buffers)}write(U){this.buffers.push(U)}}var n;(function(W){W[W.Undefined=0]="Undefined",W[W.String=1]="String",W[W.Buffer=2]="Buffer",W[W.VSBuffer=3]="VSBuffer",W[W.Array=4]="Array",W[W.Object=5]="Object"})(n||(n={}));function a(W){const U=R.VSBuffer.alloc(4);return U.writeUInt32BE(W,0),U}function o(W){return W.read(4).readUInt32BE(0)}function g(W){const U=R.VSBuffer.alloc(1);return U.writeUInt8(W,0),U}const h={Undefined:g(n.Undefined),String:g(n.String),Buffer:g(n.Buffer),VSBuffer:g(n.VSBuffer),Array:g(n.Array),Object:g(n.Object)},v=typeof Buffer<"u";function m(W,U){if(typeof U>"u")W.write(h.Undefined);else if(typeof U=="string"){const $=R.VSBuffer.fromString(U);W.write(h.String),W.write(a($.byteLength)),W.write($)}else if(v&&Buffer.isBuffer(U)){const $=R.VSBuffer.wrap(U);W.write(h.Buffer),W.write(a($.byteLength)),W.write($)}else if(U instanceof R.VSBuffer)W.write(h.VSBuffer),W.write(a(U.byteLength)),W.write(U);else if(Array.isArray(U)){W.write(h.Array),W.write(a(U.length));for(const $ of U)m(W,$)}else{const $=R.VSBuffer.fromString(JSON.stringify(U));W.write(h.Object),W.write(a($.byteLength)),W.write($)}}function w(W){switch(W.read(1).readUInt8(0)){case n.Undefined:return;case n.String:return W.read(o(W)).toString();case n.Buffer:return W.read(o(W)).buffer;case n.VSBuffer:return W.read(o(W));case n.Array:{const $=o(W),q=[];for(let X=0;X<$;X++)q.push(w(W));return q}case n.Object:return JSON.parse(W.read(o(W)).toString())}}class D{constructor(U,$,q=null,X=1e3){this.protocol=U,this.ctx=$,this.logger=q,this.timeoutDelay=X,this.channels=new Map,this.activeRequests=new Map,this.pendingRequests=new Map,this.protocolListener=this.protocol.onMessage(G=>this.onRawMessage(G)),this.sendResponse({type:200})}registerChannel(U,$){this.channels.set(U,$),setTimeout(()=>this.flushPendingRequests(U),0)}sendResponse(U){switch(U.type){case 200:{const $=this.send([U.type]);this.logger?.logOutgoing($,0,1,c(U.type));return}case 201:case 202:case 204:case 203:{const $=this.send([U.type,U.id],U.data);this.logger?.logOutgoing($,U.id,1,c(U.type),U.data);return}}}send(U,$=void 0){const q=new d;return m(q,U),m(q,$),this.sendBuffer(q.buffer)}sendBuffer(U){try{return this.protocol.send(U),U.byteLength}catch{return 0}}onRawMessage(U){const $=new s(U),q=w($),X=w($),G=q[0];switch(G){case 100:return this.logger?.logIncoming(U.byteLength,q[1],1,`${i(G)}: ${q[2]}.${q[3]}`,X),this.onPromise({type:G,id:q[1],channelName:q[2],name:q[3],arg:X});case 102:return this.logger?.logIncoming(U.byteLength,q[1],1,`${i(G)}: ${q[2]}.${q[3]}`,X),this.onEventListen({type:G,id:q[1],channelName:q[2],name:q[3],arg:X});case 101:return this.logger?.logIncoming(U.byteLength,q[1],1,`${i(G)}`),this.disposeActiveRequest({type:G,id:q[1]});case 103:return this.logger?.logIncoming(U.byteLength,q[1],1,`${i(G)}`),this.disposeActiveRequest({type:G,id:q[1]})}}onPromise(U){const $=this.channels.get(U.channelName);if(!$){this.collectPendingRequest(U);return}const q=new A.CancellationTokenSource;let X;try{X=$.call(this.ctx,U.name,U.arg,q.token)}catch(j){X=Promise.reject(j)}const G=U.id;X.then(j=>{this.sendResponse({id:G,data:j,type:201}),this.activeRequests.delete(U.id)},j=>{j instanceof Error?this.sendResponse({id:G,data:{message:j.message,name:j.name,stack:j.stack?j.stack.split?j.stack.split(` `):j.stack:void 0},type:202}):this.sendResponse({id:G,data:j,type:203}),this.activeRequests.delete(U.id)});const Q=(0,b.toDisposable)(()=>q.cancel());this.activeRequests.set(U.id,Q)}onEventListen(U){const $=this.channels.get(U.channelName);if(!$){this.collectPendingRequest(U);return}const q=U.id,G=$.listen(this.ctx,U.name,U.arg)(Q=>this.sendResponse({id:q,data:Q,type:204}));this.activeRequests.set(U.id,G)}disposeActiveRequest(U){const $=this.activeRequests.get(U.id);$&&($.dispose(),this.activeRequests.delete(U.id))}collectPendingRequest(U){let $=this.pendingRequests.get(U.channelName);$||($=[],this.pendingRequests.set(U.channelName,$));const q=setTimeout(()=>{console.error(`Unknown channel: ${U.channelName}`),U.type===100&&this.sendResponse({id:U.id,data:{name:"Unknown channel",message:`Channel name '${U.channelName}' timed out after ${this.timeoutDelay}ms`,stack:void 0},type:202})},this.timeoutDelay);$.push({request:U,timeoutTimer:q})}flushPendingRequests(U){const $=this.pendingRequests.get(U);if($){for(const q of $)switch(clearTimeout(q.timeoutTimer),q.request.type){case 100:this.onPromise(q.request);break;case 102:this.onEventListen(q.request);break}this.pendingRequests.delete(U)}}dispose(){this.protocolListener&&(this.protocolListener.dispose(),this.protocolListener=null),(0,b.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}e.ChannelServer=D;var y;(function(W){W[W.LocalSide=0]="LocalSide",W[W.OtherSide=1]="OtherSide"})(y=e.RequestInitiator||(e.RequestInitiator={}));class T{constructor(U,$=null){this.protocol=U,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(q=>this.onBuffer(q)),this.logger=$}getChannel(U){const $=this;return{call(q,X,G){return $.isDisposed?Promise.reject(new E.CancellationError):$.requestPromise(U,q,X,G)},listen(q,X){return $.isDisposed?I.Event.None:$.requestEvent(U,q,X)}}}requestPromise(U,$,q,X=A.CancellationToken.None){const G=this.lastRequestId++,j={id:G,type:100,channelName:U,name:$,arg:q};if(X.isCancellationRequested)return Promise.reject(new E.CancellationError);let K;return new Promise((ee,ie)=>{if(X.isCancellationRequested)return ie(new E.CancellationError);const re=()=>{const Z=ne=>{switch(ne.type){case 201:this.handlers.delete(G),ee(ne.data);break;case 202:{this.handlers.delete(G);const ce=new Error(ne.data.message);ce.stack=Array.isArray(ne.data.stack)?ne.data.stack.join(` `):ne.data.stack,ce.name=ne.data.name,ie(ce);break}case 203:this.handlers.delete(G),ie(ne.data);break}};this.handlers.set(G,Z),this.sendRequest(j)};let oe=null;this.state===l.Idle?re():(oe=(0,p.createCancelablePromise)(Z=>this.whenInitialized()),oe.then(()=>{oe=null,re()}));const se=()=>{oe?(oe.cancel(),oe=null):this.sendRequest({id:G,type:101}),ie(new E.CancellationError)},te=X.onCancellationRequested(se);K=(0,b.combinedDisposable)((0,b.toDisposable)(se),te),this.activeRequests.add(K)}).finally(()=>{this.activeRequests.delete(K)})}requestEvent(U,$,q){const X=this.lastRequestId++,Q={id:X,type:102,channelName:U,name:$,arg:q};let j=null;const K=new I.Emitter({onFirstListenerAdd:()=>{j=(0,p.createCancelablePromise)(ee=>this.whenInitialized()),j.then(()=>{j=null,this.activeRequests.add(K),this.sendRequest(Q)})},onLastListenerRemove:()=>{j?(j.cancel(),j=null):(this.activeRequests.delete(K),this.sendRequest({id:X,type:103}))}}),Y=ee=>K.fire(ee.data);return this.handlers.set(X,Y),K.event}sendRequest(U){switch(U.type){case 100:case 102:{const $=this.send([U.type,U.id,U.channelName,U.name],U.arg);this.logger?.logOutgoing($,U.id,0,`${i(U.type)}: ${U.channelName}.${U.name}`,U.arg);return}case 101:case 103:{const $=this.send([U.type,U.id]);this.logger?.logOutgoing($,U.id,0,i(U.type));return}}}send(U,$=void 0){const q=new d;return m(q,U),m(q,$),this.sendBuffer(q.buffer)}sendBuffer(U){try{return this.protocol.send(U),U.byteLength}catch{return 0}}onBuffer(U){const $=new s(U),q=w($),X=w($),G=q[0];switch(G){case 200:return this.logger?.logIncoming(U.byteLength,0,0,c(G)),this.onResponse({type:q[0]});case 201:case 202:case 204:case 203:return this.logger?.logIncoming(U.byteLength,q[1],0,c(G),X),this.onResponse({type:q[0],id:q[1],data:X})}}onResponse(U){if(U.type===200){this.state=l.Idle,this._onDidInitialize.fire();return}this.handlers.get(U.id)?.(U)}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,b.dispose)(this.activeRequests.values()),this.activeRequests.clear()}}we([k.memoize],T.prototype,"onDidInitializePromise",null),e.ChannelClient=T;class _{get connections(){const U=[];return this._connections.forEach($=>U.push($)),U}constructor(U){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,U(({protocol:$,onDidClientDisconnect:q})=>{I.Event.once($.onMessage)(G=>{const Q=new s(G),j=w(Q),K=new D($,j),Y=new T($);this.channels.forEach((ie,re)=>K.registerChannel(re,ie));const ee={channelServer:K,channelClient:Y,ctx:j};this._connections.add(ee),this._onDidAddConnection.fire(ee),q(()=>{K.dispose(),Y.dispose(),this._connections.delete(ee),this._onDidRemoveConnection.fire(ee)})})})}getChannel(U,$){const q=this;return{call(X,G,Q){let j;if((0,r.isFunction)($)){const Y=(0,t.getRandomElement)(q.connections.filter($));j=Y?Promise.resolve(Y):I.Event.toPromise(I.Event.filter(q.onDidAddConnection,$))}else j=$.routeCall(q,X,G);const K=j.then(Y=>Y.channelClient.getChannel(U));return M(K).call(X,G,Q)},listen(X,G){if((0,r.isFunction)($))return q.getMulticastEvent(U,$,X,G);const Q=$.routeEvent(q,X,G).then(j=>j.channelClient.getChannel(U));return M(Q).listen(X,G)}}}getMulticastEvent(U,$,q,X){const G=this;let Q=new b.DisposableStore;const j=new I.Emitter({onFirstListenerAdd:()=>{Q=new b.DisposableStore;const K=new I.EventMultiplexer,Y=new Map,ee=re=>{const se=re.channelClient.getChannel(U).listen(q,X),te=K.add(se);Y.set(re,te)},ie=re=>{const oe=Y.get(re);!oe||(oe.dispose(),Y.delete(re))};G.connections.filter($).forEach(ee),I.Event.filter(G.onDidAddConnection,$)(ee,void 0,Q),G.onDidRemoveConnection(ie,void 0,Q),K.event(j.fire,j,Q),Q.add(K)},onLastListenerRemove:()=>{Q.dispose()}});return j.event}registerChannel(U,$){this.channels.set(U,$),this._connections.forEach(q=>{q.channelServer.registerChannel(U,$)})}dispose(){this.channels.clear(),this._connections.clear(),this._onDidAddConnection.dispose(),this._onDidRemoveConnection.dispose()}}e.IPCServer=_;class L{constructor(U,$,q=null){const X=new d;m(X,$),U.send(X.buffer),this.channelClient=new T(U,q),this.channelServer=new D(U,$,q)}getChannel(U){return this.channelClient.getChannel(U)}registerChannel(U,$){this.channelServer.registerChannel(U,$)}dispose(){this.channelClient.dispose(),this.channelServer.dispose()}}e.IPCClient=L;function M(W){return{call(U,$,q){return W.then(X=>X.call(U,$,q))},listen(U,$){const q=new I.Relay;return W.then(X=>q.input=X.listen(U,$)),q.event}}}e.getDelayedChannel=M;function O(W){let U=!1;return{call($,q,X){return U?W.call($,q,X):(0,p.timeout)(0).then(()=>U=!0).then(()=>W.call($,q,X))},listen($,q){if(U)return W.listen($,q);const X=new I.Relay;return(0,p.timeout)(0).then(()=>U=!0).then(()=>X.input=W.listen($,q)),X.event}}}e.getNextTickChannel=O;class N{constructor(U){this.fn=U}routeCall(U){return this.route(U)}routeEvent(U){return this.route(U)}async route(U){for(const $ of U.connections)if(await Promise.resolve(this.fn($.ctx)))return Promise.resolve($);return await I.Event.toPromise(U.onDidAddConnection),await this.route(U)}}e.StaticRouter=N;var P;(function(W){function U(G,Q){const j=G,K=Q&&Q.disableMarshalling,Y=new Map;for(const ee in j)q(ee)&&Y.set(ee,I.Event.buffer(j[ee],!0));return new class{listen(ee,ie,re){const oe=Y.get(ie);if(oe)return oe;if(X(ie)){const se=j[ie];if(typeof se=="function")return se.call(j,re)}throw new Error(`Event not found: ${ie}`)}call(ee,ie,re){const oe=j[ie];if(typeof oe=="function"){if(!K&&Array.isArray(re))for(let se=0;se<re.length;se++)re[se]=(0,S.revive)(re[se]);return oe.apply(j,re)}throw new Error(`Method not found: ${ie}`)}}}W.fromService=U;function $(G,Q){const j=Q&&Q.disableMarshalling;return new Proxy({},{get(K,Y){if(typeof Y=="string")return Q?.properties?.has(Y)?Q.properties.get(Y):X(Y)?function(ee){return G.listen(Y,ee)}:q(Y)?G.listen(Y):async function(...ee){let ie;Q&&!(0,r.isUndefinedOrNull)(Q.context)?ie=[Q.context,...ee]:ie=ee;const re=await G.call(Y,ie);return j?re:(0,S.revive)(re)};throw new Error(`Property not found: ${String(Y)}`)}})}W.toService=$;function q(G){return G[0]==="o"&&G[1]==="n"&&C.isUpperAsciiLetter(G.charCodeAt(2))}function X(G){return/^onDynamic/.test(G)&&C.isUpperAsciiLetter(G.charCodeAt(9))}})(P=e.ProxyChannel||(e.ProxyChannel={}));const B=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function V(W){if(Array.isArray(W))return W;if(W&&typeof W=="object"&&typeof W.toString=="function"){const U=W.toString();if(U!=="[object Object]")return U}return W}function z(W){return Array.isArray(W)?W.map(V):V(W)}function x(W,U,$,q,X,G,Q){Q=z(Q);const j=B[X],K=j[q%j.length];let Y=[`%c[${W}]%c[${String(U).padStart(7," ")}]%c[len: ${String($).padStart(5," ")}]%c${String(q).padStart(5," ")} - ${G}`,"color: darkgreen","color: grey","color: grey",`color: ${K}`];/\($/.test(G)?(Y=Y.concat(Q),Y.push(")")):Y.push(Q),console.log.apply(console,Y)}e.logWithColors=x;class H{constructor(U,$){this._outgoingPrefix=U,this._incomingPrefix=$,this._totalIncoming=0,this._totalOutgoing=0}logOutgoing(U,$,q,X,G){this._totalOutgoing+=U,x(this._outgoingPrefix,this._totalOutgoing,U,$,q,X,G)}logIncoming(U,$,q,X,G){this._totalIncoming+=U,x(this._incomingPrefix,this._totalIncoming,U,$,q,X,G)}}e.IPCLogger=H}),define(ae[760],le([1,0,56,6,183]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=e.Protocol=void 0;class A{constructor(I){this.port=I,this.onMessage=p.Event.fromDOMEventEmitter(this.port,"message",b=>t.VSBuffer.wrap(b.data)),I.start()}send(I){this.port.postMessage(I.buffer)}disconnect(){this.port.close()}}e.Protocol=A;class k extends R.IPCClient{constructor(I,b){const S=new A(I);super(S,b),this.protocol=S}dispose(){this.protocol.disconnect()}}e.Client=k}),define(ae[420],le([1,0,56,6,2,183]),function(J,e,t,p,R,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(v){v.Created="created",v.Read="read",v.Write="write",v.Open="open",v.Error="error",v.Close="close",v.BrowserWebSocketBlobReceived="browserWebSocketBlobReceived",v.NodeEndReceived="nodeEndReceived",v.NodeEndSent="nodeEndSent",v.NodeDrainBegin="nodeDrainBegin",v.NodeDrainEnd="nodeDrainEnd",v.zlibInflateError="zlibInflateError",v.zlibInflateData="zlibInflateData",v.zlibInflateInitialWrite="zlibInflateInitialWrite",v.zlibInflateInitialFlushFired="zlibInflateInitialFlushFired",v.zlibInflateWrite="zlibInflateWrite",v.zlibInflateFlushFired="zlibInflateFlushFired",v.zlibDeflateError="zlibDeflateError",v.zlibDeflateData="zlibDeflateData",v.zlibDeflateWrite="zlibDeflateWrite",v.zlibDeflateFlushFired="zlibDeflateFlushFired",v.WebSocketNodeSocketWrite="webSocketNodeSocketWrite",v.WebSocketNodeSocketPeekedHeader="webSocketNodeSocketPeekedHeader",v.WebSocketNodeSocketReadHeader="webSocketNodeSocketReadHeader",v.WebSocketNodeSocketReadData="webSocketNodeSocketReadData",v.WebSocketNodeSocketUnmaskedData="webSocketNodeSocketUnmaskedData",v.WebSocketNodeSocketDrainBegin="webSocketNodeSocketDrainBegin",v.WebSocketNodeSocketDrainEnd="webSocketNodeSocketDrainEnd",v.ProtocolHeaderRead="protocolHeaderRead",v.ProtocolMessageRead="protocolMessageRead",v.ProtocolHeaderWrite="protocolHeaderWrite",v.ProtocolMessageWrite="protocolMessageWrite",v.ProtocolWrite="protocolWrite"})(k=e.SocketDiagnosticsEventType||(e.SocketDiagnosticsEventType={}));var E;(function(v){v.enableDiagnostics=!1,v.records=[];const m=new WeakMap;let w=0;function D(T,_){if(!m.has(T)){const L=String(++w);m.set(T,L)}return m.get(T)}function y(T,_,L,M){if(!v.enableDiagnostics)return;const O=D(T,_);if(M instanceof t.VSBuffer||M instanceof Uint8Array||M instanceof ArrayBuffer||ArrayBuffer.isView(M)){const N=t.VSBuffer.alloc(M.byteLength);N.set(M),v.records.push({timestamp:Date.now(),id:O,label:_,type:L,buff:N})}else v.records.push({timestamp:Date.now(),id:O,label:_,type:L,data:M})}v.traceSocketEvent=y})(E=e.SocketDiagnostics||(e.SocketDiagnostics={}));var I;(function(v){v[v.NodeSocketCloseEvent=0]="NodeSocketCloseEvent",v[v.WebSocketCloseEvent=1]="WebSocketCloseEvent"})(I=e.SocketCloseEventType||(e.SocketCloseEventType={}));let b=null;function S(){return b||(b=t.VSBuffer.alloc(0)),b}class C{get byteLength(){return this._totalLength}constructor(){this._chunks=[],this._totalLength=0}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,w){if(m===0)return S();if(m>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===m){const _=this._chunks[0];return w&&(this._chunks.shift(),this._totalLength-=m),_}if(this._chunks[0].byteLength>m){const _=this._chunks[0].slice(0,m);return w&&(this._chunks[0]=this._chunks[0].slice(m),this._totalLength-=m),_}const D=t.VSBuffer.alloc(m);let y=0,T=0;for(;m>0;){const _=this._chunks[T];if(_.byteLength>m){const L=_.slice(0,m);D.set(L,y),y+=m,w&&(this._chunks[T]=_.slice(m),this._totalLength-=m),m-=m}else D.set(_,y),y+=_.byteLength,w?(this._chunks.shift(),this._totalLength-=_.byteLength):T++,m-=_.byteLength}return D}}e.ChunkStream=C;var r;(function(v){v[v.None=0]="None",v[v.Regular=1]="Regular",v[v.Control=2]="Control",v[v.Ack=3]="Ack",v[v.Disconnect=5]="Disconnect",v[v.ReplayRequest=6]="ReplayRequest",v[v.Pause=7]="Pause",v[v.Resume=8]="Resume",v[v.KeepAlive=9]="KeepAlive"})(r||(r={}));function u(v){switch(v){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";case 9:return"KeepAlive"}}var i;(function(v){v[v.HeaderLength=13]="HeaderLength",v[v.AcknowledgeTime=2e3]="AcknowledgeTime",v[v.TimeoutTime=2e4]="TimeoutTime",v[v.ReconnectionGraceTime=108e5]="ReconnectionGraceTime",v[v.ReconnectionShortGraceTime=3e5]="ReconnectionShortGraceTime"})(i=e.ProtocolConstants||(e.ProtocolConstants={}));class f{constructor(m,w,D,y){this.type=m,this.id=w,this.ack=D,this.data=y,this.writtenTime=0}get size(){return this.data.byteLength}}class c extends R.Disposable{constructor(m){super(),this._onMessage=this._register(new p.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(w=>this.acceptChunk(w))),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 w=this._incomingData.read(this._state.readLen);if(this._state.readHead)this._state.readHead=!1,this._state.readLen=w.readUInt32BE(9),this._state.messageType=w.readUInt8(0),this._state.id=w.readUInt32BE(1),this._state.ack=w.readUInt32BE(5),this._socket.traceSocketEvent("protocolHeaderRead",{messageType:u(this._state.messageType),id:this._state.id,ack:this._state.ack,messageSize:this._state.readLen});else{const D=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",w),this._onMessage.fire(new f(D,y,T,w)),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 w=t.VSBuffer.alloc(13);w.writeUInt8(m.type,0),w.writeUInt32BE(m.id,1),w.writeUInt32BE(m.ack,5),w.writeUInt32BE(m.data.byteLength,9),this._socket.traceSocketEvent("protocolHeaderWrite",{messageType:u(m.type),id:m.id,ack:m.ack,messageSize:m.data.byteLength}),this._socket.traceSocketEvent("protocolMessageWrite",m.data),this._writeSoon(w,m.data)}_bufferAdd(m,w){const D=this._totalLength===0;return this._data.push(m,w),this._totalLength+=m.byteLength+w.byteLength,D}_bufferTake(){const m=t.VSBuffer.concat(this._data,this._totalLength);return this._data.length=0,this._totalLength=0,m}_writeSoon(m,w){this._bufferAdd(m,w)&&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 s extends R.Disposable{constructor(m){super(),this._onMessage=new p.Emitter,this.onMessage=this._onMessage.event,this._onDidDispose=new p.Emitter,this.onDidDispose=this._onDidDispose.event,this._socket=m,this._socketWriter=this._register(new l(this._socket)),this._socketReader=this._register(new c(this._socket)),this._register(this._socketReader.onMessage(w=>{w.type===1&&this._onMessage.fire(w.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 f(1,0,0,m))}}e.Protocol=s;class d extends A.IPCClient{static fromSocket(m,w){return new d(new s(m),w)}get onDidDispose(){return this.protocol.onDidDispose}constructor(m,w,D=null){super(m,w,D),this.protocol=m}dispose(){super.dispose();const m=this.protocol.getSocket();this.protocol.sendDisconnect(),this.protocol.dispose(),m.end()}}e.Client=d;class n{constructor(){this._hasListeners=!1,this._isDeliveringMessages=!1,this._bufferedMessages=[],this._emitter=new p.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=n;class a{constructor(m){this.data=m,this.next=null}}class o{constructor(){this._first=null,this._last=null}length(){let m=0,w=this._first;for(;w;)w=w.next,m++;return m}peek(){return this._first?this._first.data:null}toArray(){const m=[];let w=0,D=this._first;for(;D;)m[w++]=D.data,D=D.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 w=new a(m);if(!this._first){this._first=w,this._last=w;return}this._last.next=w,this._last=w}}class g{static getInstance(){return g._INSTANCE||(g._INSTANCE=new g),g._INSTANCE}constructor(){this.lastRuns=[];const m=Date.now();for(let w=0;w<g._HISTORY_LENGTH;w++)this.lastRuns[w]=m-1e3*w;setInterval(()=>{for(let w=g._HISTORY_LENGTH;w>=1;w--)this.lastRuns[w]=this.lastRuns[w-1];this.lastRuns[0]=Date.now()},1e3)}load(){const m=Date.now(),w=(1+g._HISTORY_LENGTH)*1e3;let D=0;for(let y=0;y<g._HISTORY_LENGTH;y++)m-this.lastRuns[y]<=w&&D++;return 1-D/g._HISTORY_LENGTH}hasHighLoad(){return this.load()>=.5}}g._HISTORY_LENGTH=10,g._INSTANCE=null;class h{get unacknowledgedCount(){return this._outgoingMsgId-this._outgoingAckId}constructor(m,w=null,D=g.getInstance()){this._onControlMessage=new n,this.onControlMessage=this._onControlMessage.event,this._onMessage=new n,this.onMessage=this._onMessage.event,this._onDidDispose=new n,this.onDidDispose=this._onDidDispose.event,this._onSocketClose=new n,this.onSocketClose=this._onSocketClose.event,this._onSocketTimeout=new n,this.onSocketTimeout=this._onSocketTimeout.event,this._loadEstimator=D,this._isReconnecting=!1,this._outgoingUnackMsg=new o,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 c(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))),w&&this._socketReader.acceptChunk(w),this._keepAliveInterval=setInterval(()=>{this._sendKeepAlive()},5e3)}dispose(){this._outgoingAckTimeout&&(clearTimeout(this._outgoingAckTimeout),this._outgoingAckTimeout=null),this._incomingAckTimeout&&(clearTimeout(this._incomingAckTimeout),this._incomingAckTimeout=null),this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._socketDisposables=(0,R.dispose)(this._socketDisposables)}drain(){return this._socketWriter.drain()}sendDisconnect(){const m=new f(5,0,0,S());this._socketWriter.write(m),this._socketWriter.flush()}sendPause(){const m=new f(7,0,0,S());this._socketWriter.write(m)}sendResume(){const m=new f(8,0,0,S());this._socketWriter.write(m)}pauseSocketWriting(){this._socketWriter.pause()}getSocket(){return this._socket}getMillisSinceLastIncomingData(){return Date.now()-this._socketReader.lastReadTime}beginAcceptReconnection(m,w){this._isReconnecting=!0,this._socketDisposables=(0,R.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 c(this._socket),this._socketDisposables.push(this._socketReader),this._socketDisposables.push(this._socketReader.onMessage(D=>this._receiveMessage(D))),this._socketDisposables.push(this._socket.onClose(D=>this._onSocketClose.fire(D))),this._socketReader.acceptChunk(w)}endAcceptReconnection(){this._isReconnecting=!1,this._incomingAckId=this._incomingMsgId;const m=new f(3,0,this._incomingAckId,S());this._socketWriter.write(m);const w=this._outgoingUnackMsg.toArray();for(let D=0,y=w.length;D<y;D++)this._socketWriter.write(w[D]);this._recvAckCheck()}acceptDisconnect(){this._onDidDispose.fire()}_receiveMessage(m){if(m.ack>this._outgoingAckId){this._outgoingAckId=m.ack;do{const w=this._outgoingUnackMsg.peek();if(w&&w.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 w=Date.now();w-this._lastReplayRequestTime>1e4&&(this._lastReplayRequestTime=w,this._socketWriter.write(new f(6,0,0,S())))}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 w=this._outgoingUnackMsg.toArray();for(let D=0,y=w.length;D<y;D++)this._socketWriter.write(w[D]);this._recvAckCheck();break}case 7:{this._socketWriter.pause();break}case 8:{this._socketWriter.resume();break}case 9:break}}readEntireBuffer(){return this._socketReader.readEntireBuffer()}flush(){this._socketWriter.flush()}send(m){const w=++this._outgoingMsgId;this._incomingAckId=this._incomingMsgId;const D=new f(1,w,this._incomingAckId,m);this._outgoingUnackMsg.push(D),this._isReconnecting||(this._socketWriter.write(D),this._recvAckCheck())}sendControl(m){const w=new f(2,0,0,m);this._socketWriter.write(w)}_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(),w=Date.now()-m.writtenTime,D=Date.now()-this._socketReader.lastReadTime,y=Date.now()-this._lastSocketTimeoutTime;if(w>=2e4&&D>=2e4&&y>=2e4&&!this._loadEstimator.hasHighLoad()){this._lastSocketTimeoutTime=Date.now(),this._onSocketTimeout.fire({unacknowledgedMsgCount:this._outgoingUnackMsg.length(),timeSinceOldestUnacknowledgedMsg:w,timeSinceLastReceivedSomeData:D});return}const T=Math.max(2e4-w,2e4-D,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 f(3,0,this._incomingAckId,S());this._socketWriter.write(m)}_sendKeepAlive(){const m=new f(9,0,0,S());this._socketWriter.write(m)}}e.PersistentProtocol=h}),define(ae[1270],le([1,0,56,21,6,2,53,14,72,183,420]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.connect=e.serve=e.Server=e.createStaticIPCHandle=e.createRandomIPCHandle=e.XDG_RUNTIME_DIR=e.WebSocketNodeSocket=e.NodeSocket=void 0;function C(){return{crypto:J.__$__nodeRequire("crypto"),zlib:J.__$__nodeRequire("zlib"),net:J.__$__nodeRequire("net"),os:J.__$__nodeRequire("os")}}class r{traceSocketEvent(D,y){S.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,D,y)}constructor(D,y=""){this._canWrite=!0,this.debugLabel=y,this.socket=D,this.traceSocketEvent("created",{type:"NodeSocket"}),this._errorListener=T=>{if(this.traceSocketEvent("error",{code:T?.code,message:T?.message}),T){if(T.code==="EPIPE")return;(0,p.onUnexpectedError)(T)}},this.socket.on("error",this._errorListener),this._closeListener=T=>{this.traceSocketEvent("close",{hadError:T}),this._canWrite=!1},this.socket.on("close",this._closeListener),this._endListener=()=>{this.traceSocketEvent("nodeEndReceived"),this._canWrite=!1},this.socket.on("end",this._endListener)}dispose(){this.socket.off("error",this._errorListener),this.socket.off("close",this._closeListener),this.socket.off("end",this._endListener),this.socket.destroy()}onData(D){const y=T=>{this.traceSocketEvent("read",T),D(t.VSBuffer.wrap(T))};return this.socket.on("data",y),{dispose:()=>this.socket.off("data",y)}}onClose(D){const y=T=>{D({type:0,hadError:T,error:void 0})};return this.socket.on("close",y),{dispose:()=>this.socket.off("close",y)}}onEnd(D){const y=()=>{D()};return this.socket.on("end",y),{dispose:()=>this.socket.off("end",y)}}write(D){if(!(this.socket.destroyed||!this._canWrite))try{this.traceSocketEvent("write",D),this.socket.write(D.buffer,y=>{if(y){if(y.code==="EPIPE")return;(0,p.onUnexpectedError)(y)}})}catch(y){if(y.code==="EPIPE")return;(0,p.onUnexpectedError)(y)}}end(){this.traceSocketEvent("nodeEndSent"),this.socket.end()}drain(){return this.traceSocketEvent("nodeDrainBegin"),new Promise((D,y)=>{if(this.socket.bufferSize===0){this.traceSocketEvent("nodeDrainEnd"),D();return}const T=()=>{this.socket.off("close",T),this.socket.off("end",T),this.socket.off("error",T),this.socket.off("timeout",T),this.socket.off("drain",T),this.traceSocketEvent("nodeDrainEnd"),D()};this.socket.on("close",T),this.socket.on("end",T),this.socket.on("error",T),this.socket.on("timeout",T),this.socket.on("drain",T)})}}e.NodeSocket=r;var u;(function(w){w[w.MinHeaderByteSize=2]="MinHeaderByteSize"})(u||(u={}));var i;(function(w){w[w.PeekHeader=1]="PeekHeader",w[w.ReadHeader=2]="ReadHeader",w[w.ReadBody=3]="ReadBody",w[w.Fin=4]="Fin"})(i||(i={}));class f extends A.Disposable{get permessageDeflate(){return this._flowManager.permessageDeflate}get recordedInflateBytes(){return this._flowManager.recordedInflateBytes}traceSocketEvent(D,y){this.socket.traceSocketEvent(D,y)}constructor(D,y,T,_){super(),this._onData=this._register(new R.Emitter),this._onClose=this._register(new R.Emitter),this._isEnded=!1,this._state={state:1,readLen:2,fin:0,compressed:!1,firstFrameOfMessage:!0,mask:0},this.socket=D,this.traceSocketEvent("created",{type:"WebSocketNodeSocket",permessageDeflate:y,inflateBytesLength:T?.byteLength||0,recordInflateBytes:_}),this._flowManager=this._register(new c(this,y,T,_,this._onData,(L,M)=>this._write(L,M))),this._register(this._flowManager.onError(L=>{console.error(L),(0,p.onUnexpectedError)(L),this._onClose.fire({type:0,hadError:!0,error:L})})),this._incomingData=new S.ChunkStream,this._register(this.socket.onData(L=>this._acceptChunk(L))),this._register(this.socket.onClose(L=>this._onClose.fire(L)))}dispose(){this._flowManager.isProcessingWriteQueue()?this._register(this._flowManager.onDidFinishProcessingWriteQueue(()=>{this.dispose()})):(this.socket.dispose(),super.dispose())}onData(D){return this._onData.event(D)}onClose(D){return this._onClose.event(D)}onEnd(D){return this.socket.onEnd(D)}write(D){this._flowManager.writeMessage(D)}_write(D,y){if(this._isEnded)return;this.traceSocketEvent("webSocketNodeSocketWrite",D);let T=2;D.byteLength<126?T+=0:D.byteLength<2**16?T+=2:T+=8;const _=t.VSBuffer.alloc(T);if(y?_.writeUInt8(194,0):_.writeUInt8(130,0),D.byteLength<126)_.writeUInt8(D.byteLength,1);else if(D.byteLength<2**16){_.writeUInt8(126,1);let L=1;_.writeUInt8(D.byteLength>>>8&255,++L),_.writeUInt8(D.byteLength>>>0&255,++L)}else{_.writeUInt8(127,1);let L=1;_.writeUInt8(0,++L),_.writeUInt8(0,++L),_.writeUInt8(0,++L),_.writeUInt8(0,++L),_.writeUInt8(D.byteLength>>>24&255,++L),_.writeUInt8(D.byteLength>>>16&255,++L),_.writeUInt8(D.byteLength>>>8&255,++L),_.writeUInt8(D.byteLength>>>0&255,++L)}this.socket.write(t.VSBuffer.concat([_,D]))}end(){this._isEnded=!0,this.socket.end()}_acceptChunk(D){if(D.byteLength!==0){for(this._incomingData.acceptChunk(D);this._incomingData.byteLength>=this._state.readLen;)if(this._state.state===1){const y=this._incomingData.peek(this._state.readLen),T=y.readUInt8(0),_=(T&128)>>>7,L=(T&64)>>>6,M=y.readUInt8(1),O=(M&128)>>>7,N=M&127;this._state.state=2,this._state.readLen=2+(O?4:0)+(N===126?2:0)+(N===127?8:0),this._state.fin=_,this._state.firstFrameOfMessage&&(this._state.compressed=Boolean(L)),this._state.firstFrameOfMessage=Boolean(_),this._state.mask=0,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{headerSize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin})}else if(this._state.state===2){const y=this._incomingData.read(this._state.readLen),T=y.readUInt8(1),_=(T&128)>>>7;let L=T&127,M=1;L===126?L=y.readUInt8(++M)*2**8+y.readUInt8(++M):L===127&&(L=y.readUInt8(++M)*0+y.readUInt8(++M)*0+y.readUInt8(++M)*0+y.readUInt8(++M)*0+y.readUInt8(++M)*2**24+y.readUInt8(++M)*2**16+y.readUInt8(++M)*2**8+y.readUInt8(++M));let O=0;_&&(O=y.readUInt8(++M)*2**24+y.readUInt8(++M)*2**16+y.readUInt8(++M)*2**8+y.readUInt8(++M)),this._state.state=3,this._state.readLen=L,this._state.mask=O,this.traceSocketEvent("webSocketNodeSocketPeekedHeader",{bodySize:this._state.readLen,compressed:this._state.compressed,fin:this._state.fin,mask:this._state.mask})}else if(this._state.state===3){const y=this._incomingData.read(this._state.readLen);this.traceSocketEvent("webSocketNodeSocketReadData",y),d(y,this._state.mask),this.traceSocketEvent("webSocketNodeSocketUnmaskedData",y),this._state.state=1,this._state.readLen=2,this._state.mask=0,this._flowManager.acceptFrame(y,this._state.compressed,!!this._state.fin)}}}async drain(){this.traceSocketEvent("webSocketNodeSocketDrainBegin"),this._flowManager.isProcessingWriteQueue()&&await R.Event.toPromise(this._flowManager.onDidFinishProcessingWriteQueue),await this.socket.drain(),this.traceSocketEvent("webSocketNodeSocketDrainEnd")}}e.WebSocketNodeSocket=f;class c extends A.Disposable{get permessageDeflate(){return Boolean(this._zlibInflateStream&&this._zlibDeflateStream)}get recordedInflateBytes(){return this._zlibInflateStream?this._zlibInflateStream.recordedInflateBytes:t.VSBuffer.alloc(0)}constructor(D,y,T,_,L,M){super(),this._tracer=D,this._onData=L,this._writeFn=M,this._onError=this._register(new R.Emitter),this.onError=this._onError.event,this._writeQueue=[],this._readQueue=[],this._onDidFinishProcessingWriteQueue=this._register(new R.Emitter),this.onDidFinishProcessingWriteQueue=this._onDidFinishProcessingWriteQueue.event,this._isProcessingWriteQueue=!1,this._isProcessingReadQueue=!1,y?(this._zlibInflateStream=this._register(new l(this._tracer,_,T,{windowBits:15})),this._zlibDeflateStream=this._register(new s(this._tracer,{windowBits:15})),this._register(this._zlibInflateStream.onError(O=>this._onError.fire(O))),this._register(this._zlibDeflateStream.onError(O=>this._onError.fire(O)))):(this._zlibInflateStream=null,this._zlibDeflateStream=null)}writeMessage(D){this._writeQueue.push(D),this._processWriteQueue()}async _processWriteQueue(){if(!this._isProcessingWriteQueue){for(this._isProcessingWriteQueue=!0;this._writeQueue.length>0;){const D=this._writeQueue.shift();if(this._zlibDeflateStream){const y=await this._deflateMessage(this._zlibDeflateStream,D);this._writeFn(y,!0)}else this._writeFn(D,!1)}this._isProcessingWriteQueue=!1,this._onDidFinishProcessingWriteQueue.fire()}}isProcessingWriteQueue(){return this._isProcessingWriteQueue}_deflateMessage(D,y){return new Promise((T,_)=>{D.write(y),D.flush(L=>T(L))})}acceptFrame(D,y,T){this._readQueue.push({data:D,isCompressed:y,isLastFrameOfMessage:T}),this._processReadQueue()}async _processReadQueue(){if(!this._isProcessingReadQueue){for(this._isProcessingReadQueue=!0;this._readQueue.length>0;){const D=this._readQueue.shift();if(this._zlibInflateStream&&D.isCompressed){const y=await this._inflateFrame(this._zlibInflateStream,D.data,D.isLastFrameOfMessage);this._onData.fire(y)}else this._onData.fire(D.data)}this._isProcessingReadQueue=!1}}_inflateFrame(D,y,T){return new Promise((_,L)=>{D.write(y),T&&D.write(t.VSBuffer.fromByteArray([0,0,255,255])),D.flush(M=>_(M))})}}class l extends A.Disposable{get recordedInflateBytes(){return this._recordInflateBytes?t.VSBuffer.concat(this._recordedInflateBytes):t.VSBuffer.alloc(0)}constructor(D,y,T,_){super(),this._tracer=D,this._recordInflateBytes=y,this._onError=this._register(new R.Emitter),this.onError=this._onError.event,this._recordedInflateBytes=[],this._pendingInflateData=[],this._zlibInflate=C().zlib.createInflateRaw(_),this._zlibInflate.on("error",L=>{this._tracer.traceSocketEvent("zlibInflateError",{message:L?.message,code:L?.code}),this._onError.fire(L)}),this._zlibInflate.on("data",L=>{this._tracer.traceSocketEvent("zlibInflateData",L),this._pendingInflateData.push(t.VSBuffer.wrap(L))}),T&&(this._tracer.traceSocketEvent("zlibInflateInitialWrite",T.buffer),this._zlibInflate.write(T.buffer),this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateInitialFlushFired"),this._pendingInflateData.length=0}))}write(D){this._recordInflateBytes&&this._recordedInflateBytes.push(D.clone()),this._tracer.traceSocketEvent("zlibInflateWrite",D),this._zlibInflate.write(D.buffer)}flush(D){this._zlibInflate.flush(()=>{this._tracer.traceSocketEvent("zlibInflateFlushFired");const y=t.VSBuffer.concat(this._pendingInflateData);this._pendingInflateData.length=0,D(y)})}}class s extends A.Disposable{constructor(D,y){super(),this._tracer=D,this._onError=this._register(new R.Emitter),this.onError=this._onError.event,this._pendingDeflateData=[],this._zlibDeflate=C().zlib.createDeflateRaw({windowBits:15}),this._zlibDeflate.on("error",T=>{this._tracer.traceSocketEvent("zlibDeflateError",{message:T?.message,code:T?.code}),this._onError.fire(T)}),this._zlibDeflate.on("data",T=>{this._tracer.traceSocketEvent("zlibDeflateData",T),this._pendingDeflateData.push(t.VSBuffer.wrap(T))})}write(D){this._tracer.traceSocketEvent("zlibDeflateWrite",D.buffer),this._zlibDeflate.write(D.buffer)}flush(D){this._zlibDeflate.flush(2,()=>{this._tracer.traceSocketEvent("zlibDeflateFlushFired");let y=t.VSBuffer.concat(this._pendingDeflateData);this._pendingDeflateData.length=0,y=y.slice(0,y.byteLength-4),D(y)})}}function d(w,D){if(D===0)return;const y=w.byteLength>>>2;for(let N=0;N<y;N++){const P=w.readUInt32BE(N*4);w.writeUInt32BE(P^D,N*4)}const T=y*4,_=w.byteLength-T,L=D>>>24&255,M=D>>>16&255,O=D>>>8&255;_>=1&&w.writeUInt8(w.readUInt8(T)^L,T),_>=2&&w.writeUInt8(w.readUInt8(T+1)^M,T+1),_>=3&&w.writeUInt8(w.readUInt8(T+2)^O,T+2)}e.XDG_RUNTIME_DIR=typeof process<"u"?process.env.XDG_RUNTIME_DIR:void 0;const n={[2]:107,[1]:103};function a(){const w=(0,I.generateUuid)();if(process.platform==="win32")return`\\\\.\\pipe\\vscode-ipc-${w}-sock`;let D;return e.XDG_RUNTIME_DIR?D=(0,k.join)(e.XDG_RUNTIME_DIR,`vscode-ipc-${w}.sock`):D=(0,k.join)(C().os.tmpdir(),`vscode-ipc-${w}.sock`),g(D),D}e.createRandomIPCHandle=a;function o(w,D,y){const T=C().crypto.createHash("md5").update(w).digest("hex");if(process.platform==="win32")return`\\\\.\\pipe\\${T}-${y}-${D}-sock`;let _;return e.XDG_RUNTIME_DIR&&!process.env.VSCODE_PORTABLE?_=(0,k.join)(e.XDG_RUNTIME_DIR,`vscode-${T.substr(0,8)}-${y}-${D}.sock`):_=(0,k.join)(w,`${y}-${D}.sock`),g(_),_}e.createStaticIPCHandle=o;function g(w){const D=n[E.platform];typeof D=="number"&&w.length>=D&&console.warn(`WARNING: IPC handle "${w}" is longer than ${D} chars, try a shorter --user-data-dir`)}class h extends b.IPCServer{static toClientConnectionEvent(D){const y=R.Event.fromNodeEventEmitter(D,"connection");return R.Event.map(y,T=>({protocol:new S.Protocol(new r(T,"ipc-server-connection")),onDidClientDisconnect:R.Event.once(R.Event.fromNodeEventEmitter(T,"close"))}))}constructor(D){super(h.toClientConnectionEvent(D)),this.server=D}dispose(){super.dispose(),this.server&&(this.server.close(),this.server=null)}}e.Server=h;function v(w){return new Promise((D,y)=>{const T=C().net.createServer();T.on("error",y),T.listen(w,()=>{T.removeListener("error",y),D(new h(T))})})}e.serve=v;function m(w,D){return new Promise((y,T)=>{const _=C().net.createConnection(w,()=>{_.removeListener("error",T),y(S.Client.fromSocket(new r(_,`ipc-client${D}`),D))});_.once("error",T)})}e.connect=m}),define(ae[1271],le([1,0,10,90,139,488,2,68,481]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const I=t.$;class b extends k.Disposable{constructor(C){super(),this.parent=C,this.onKeyDown=r=>t.addDisposableListener(this.findInput.inputBox.inputElement,t.EventType.KEY_DOWN,u=>{r(new p.StandardKeyboardEvent(u))}),this.onMouseDown=r=>t.addDisposableListener(this.findInput.inputBox.inputElement,t.EventType.MOUSE_DOWN,u=>{r(new R.StandardMouseEvent(u))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=t.append(this.parent,I(".quick-input-box")),this.findInput=this._register(new A.FindInput(this.container,void 0,{label:""}))}get value(){return this.findInput.getValue()}set value(C){this.findInput.setValue(C)}select(C=null){this.findInput.inputBox.select(C)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}setPlaceholder(C){this.findInput.inputBox.setPlaceHolder(C)}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(C){this.findInput.inputBox.setPlaceHolder(C)}get ariaLabel(){return this.findInput.inputBox.getAriaLabel()}set ariaLabel(C){this.findInput.inputBox.setAriaLabel(C)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(C){this.findInput.inputBox.inputElement.type=C?"password":"text"}set enabled(C){this.findInput.setEnabled(C)}set toggles(C){this.findInput.setAdditionalToggles(C)}hasFocus(){return this.findInput.inputBox.hasFocus()}setAttribute(C,r){this.findInput.inputBox.inputElement.setAttribute(C,r)}removeAttribute(C){this.findInput.inputBox.inputElement.removeAttribute(C)}showDecoration(C){C===E.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:C===E.default.Info?1:C===E.default.Warning?2:3,content:""})}stylesForType(C){return this.findInput.inputBox.stylesForType(C===E.default.Info?1:C===E.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}style(C){this.findInput.style(C)}}e.QuickInputBox=b}),define(ae[761],le([1,0,10,356,481]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconClass=void 0;const R={},A=new p.IdGenerator("quick-input-button-icon-");function k(E){if(!E)return;let I;const b=E.dark.toString();return R[b]?I=R[b]:(I=A.nextId(),t.createCSSRule(`.${I}, .hc-light .${I}`,`background-image: ${t.asCSSUrl(E.light||E.dark)}`),t.createCSSRule(`.vs-dark .${I}, .hc-black .${I}`,`background-image: ${t.asCSSUrl(E.dark)}`),R[b]=I),I}e.getIconClass=k}),define(ae[762],le([1,0,22]),function(J,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 p;(function(k){k[k.Blur=1]="Blur",k[k.Gesture=2]="Gesture",k[k.Other=3]="Other"})(p=e.QuickInputHideReason||(e.QuickInputHideReason={}));var R;(function(k){k[k.NONE=0]="NONE",k[k.FIRST=1]="FIRST",k[k.SECOND=2]="SECOND",k[k.LAST=3]="LAST"})(R=e.ItemActivation||(e.ItemActivation={}));class A{constructor(E){this.options=E}getItemLabel(E){return E.label}getItemDescription(E){if(!this.options?.skipDescription)return E.description}getItemPath(E){if(!this.options?.skipPath)return E.resource?.scheme===t.Schemas.file?E.resource.fsPath:E.resource?.path}}e.QuickPickItemScorerAccessor=A,e.quickPickItemScorerAccessor=new A}),define(ae[166],le([1,0,14]),function(J,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(ae[1272],le([1,0,1028,166]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.popup=void 0;let R=0;function A(E,I,b){const S=[],C=R++,r=`vscode:onContextMenu${C}`,u=(i,f,c)=>{S[f].click?.(c)};p.ipcRenderer.once(r,u),p.ipcRenderer.once(t.CONTEXT_MENU_CLOSE_CHANNEL,(i,f)=>{f===C&&(p.ipcRenderer.removeListener(r,u),b?.())}),p.ipcRenderer.send(t.CONTEXT_MENU_CHANNEL,C,E.map(i=>k(i,S)),r,I)}e.popup=A;function k(E,I){const b={id:I.length,label:E.label,type:E.type,accelerator:E.accelerator,checked:E.checked,enabled:typeof E.enabled=="boolean"?E.enabled:!0,visible:typeof E.visible=="boolean"?E.visible:!0};return I.push(E),Array.isArray(E.submenu)&&(b.submenu=E.submenu.map(S=>k(S,I))),b}}),define(ae[1273],le([1,0,56,6,183,1029,166]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Client=void 0;class E extends R.IPCClient{static createProtocol(){const b=p.Event.fromNodeEventEmitter(k.ipcRenderer,"vscode:message",(S,C)=>t.VSBuffer.wrap(C));return k.ipcRenderer.send("vscode:hello"),new A.Protocol(k.ipcRenderer,b)}constructor(b){const S=E.createProtocol();super(S,b),this.protocol=S}dispose(){this.protocol.disconnect()}}e.Client=E}),define(ae[582],le([1,0,6,72,166]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.acquirePort=void 0;async function A(k,E,I=(0,p.generateUuid)()){R.ipcMessagePort.acquire(E,I),typeof k=="string"&&R.ipcRenderer.send(k,I);const b=t.Event.fromDOMEventEmitter(window,"message",C=>({nonce:C.data,port:C.ports[0],source:C.source})),{port:S}=await t.Event.toPromise(t.Event.once(t.Event.filter(b,C=>C.nonce===I&&C.source===window)));return S}e.acquirePort=A}),define(ae[583],le([1,0,11,6,2,13]),function(J,e,t,p,R,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 E(C){const r=C;return r?.changed instanceof Map||r?.deleted instanceof Set}e.isStorageItemsChangeEvent=E;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 b extends R.Disposable{constructor(r,u=Object.create(null)){super(),this.database=r,this.options=u,this._onDidChangeStorage=this._register(new p.Emitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=I.None,this.cache=new Map,this.flushDelayer=new t.ThrottledDelayer(b.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(r=>this.onDidChangeItemsExternal(r)))}onDidChangeItemsExternal(r){r.changed?.forEach((u,i)=>this.accept(i,u)),r.deleted?.forEach(u=>this.accept(u,void 0))}accept(r,u){if(this.state===I.Closed)return;let i=!1;(0,A.isUndefinedOrNull)(u)?i=this.cache.delete(r):this.cache.get(r)!==u&&(this.cache.set(r,u),i=!0),i&&this._onDidChangeStorage.fire(r)}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(r,u){const i=this.cache.get(r);return(0,A.isUndefinedOrNull)(i)?u:i}getBoolean(r,u){const i=this.get(r);return(0,A.isUndefinedOrNull)(i)?u:i==="true"}getNumber(r,u){const i=this.get(r);return(0,A.isUndefinedOrNull)(i)?u:parseInt(i,10)}async set(r,u){if(this.state===I.Closed)return;if((0,A.isUndefinedOrNull)(u))return this.delete(r);const i=String(u);if(this.cache.get(r)!==i)return this.cache.set(r,i),this.pendingInserts.set(r,i),this.pendingDeletes.delete(r),this._onDidChangeStorage.fire(r),this.doFlush()}async delete(r){if(!(this.state===I.Closed||!this.cache.delete(r)))return this.pendingDeletes.has(r)||this.pendingDeletes.add(r),this.pendingInserts.delete(r),this._onDidChangeStorage.fire(r),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 r={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(r).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(r){if(!!this.hasPending)return this.doFlush(r)}async doFlush(r){return this.flushDelayer.trigger(()=>this.flushPending(),r)}async whenFlushed(){if(!!this.hasPending)return new Promise(r=>this.whenFlushedCallbacks.push(r))}dispose(){this.flushDelayer.dispose(),super.dispose()}}e.Storage=b,b.DEFAULT_FLUSH_DELAY=100;class S{constructor(){this.onDidChangeItemsExternal=p.Event.None,this.items=new Map}async getItems(){return this.items}async updateItems(r){r.insert?.forEach((u,i)=>this.items.set(i,u)),r.delete?.forEach(u=>this.items.delete(u))}async close(){}}e.InMemoryStorageDatabase=S}),define(ae[763],le([1,0,2,6]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class R extends t.Disposable{constructor(k,E){super(),this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=k,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,E)}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,E){let I=0,b=0;E?(I=E.width,b=E.height):this._referenceDomElement&&(I=this._referenceDomElement.clientWidth,b=this._referenceDomElement.clientHeight),I=Math.max(5,I),b=Math.max(5,b),(this._width!==I||this._height!==b)&&(this._width=I,this._height=b,k&&this._onDidChange.fire())}}e.ElementSizeObserver=R}),define(ae[490],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class p{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 p}),define(ae[764],le([1,0,28,20]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class R{constructor(E,I,b,S,C){this.value=E,this.selectionStart=I,this.selectionEnd=b,this.selection=S,this.newlineCountBeforeSelection=C}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(E,I){const b=E.getValue(),S=E.getSelectionStart(),C=E.getSelectionEnd();let r;if(I){const u=b.substring(0,S),i=I.value.substring(0,I.selectionStart);u===i&&(r=I.newlineCountBeforeSelection)}return new R(b,S,C,null,r)}collapseSelection(){return this.selectionStart===this.value.length?this:new R(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(E,I,b){e._debugComposition&&console.log(`writeToTextArea ${E}: ${this.toString()}`),I.setValue(E,this.value),b&&I.setSelectionRange(E,this.selectionStart,this.selectionEnd)}deduceEditorPosition(E){if(E<=this.selectionStart){const S=this.value.substring(E,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,S,-1)}if(E>=this.selectionEnd){const S=this.value.substring(this.selectionEnd,E);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,S,1)}const I=this.value.substring(this.selectionStart,E);if(I.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,I,1);const b=this.value.substring(E,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,b,-1)}_finishDeduceEditorPosition(E,I,b){let S=0,C=-1;for(;(C=I.indexOf(` `,C+1))!==-1;)S++;return[E,b*I.length,S]}static deduceInput(E,I,b){if(!E)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${E.toString()}`),console.log(`CURRENT STATE: ${I.toString()}`));const S=Math.min(t.commonPrefixLength(E.value,I.value),E.selectionStart,I.selectionStart),C=Math.min(t.commonSuffixLength(E.value,I.value),E.value.length-E.selectionEnd,I.value.length-I.selectionEnd),r=E.value.substring(S,E.value.length-C),u=I.value.substring(S,I.value.length-C),i=E.selectionStart-S,f=E.selectionEnd-S,c=I.selectionStart-S,l=I.selectionEnd-S;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${r}>, selectionStart: ${i}, selectionEnd: ${f}`),console.log(`AFTER DIFFING CURRENT STATE: <${u}>, selectionStart: ${c}, selectionEnd: ${l}`)),c===l){const d=E.selectionStart-S;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${d} chars`),{text:u,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}const s=f-i;return{text:u,replacePrevCharCnt:s,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(E,I){if(!E)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${E.toString()}`),console.log(`CURRENT STATE: ${I.toString()}`)),E.value===I.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:I.selectionEnd-E.selectionEnd};const b=Math.min(t.commonPrefixLength(E.value,I.value),E.selectionEnd),S=Math.min(t.commonSuffixLength(E.value,I.value),E.value.length-E.selectionEnd),C=E.value.substring(b,E.value.length-S),r=I.value.substring(b,I.value.length-S),u=E.selectionStart-b,i=E.selectionEnd-b,f=I.selectionStart-b,c=I.selectionEnd-b;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${C}>, selectionStart: ${u}, selectionEnd: ${i}`),console.log(`AFTER DIFFING CURRENT STATE: <${r}>, selectionStart: ${f}, selectionEnd: ${c}`)),{text:r,replacePrevCharCnt:i,replaceNextCharCnt:C.length-i,positionDelta:c-r.length}}}e.TextAreaState=R,R.EMPTY=new R("",0,0,null,void 0);class A{static _getPageOfLine(E,I){return Math.floor((E-1)/I)}static _getRangeForPage(E,I){const b=E*I,S=b+1,C=b+I;return new p.Range(S,1,C+1,1)}static fromEditorSelection(E,I,b,S){const r=A._getPageOfLine(I.startLineNumber,b),u=A._getRangeForPage(r,b),i=A._getPageOfLine(I.endLineNumber,b),f=A._getRangeForPage(i,b);let c=u.intersectRanges(new p.Range(1,1,I.startLineNumber,I.startColumn));if(S&&E.getValueLengthInRange(c,1)>500){const g=E.modifyPosition(c.getEndPosition(),-500);c=p.Range.fromPositions(g,c.getEndPosition())}const l=E.getValueInRange(c,1),s=E.getLineCount(),d=E.getLineMaxColumn(s);let n=f.intersectRanges(new p.Range(I.endLineNumber,I.endColumn,s,d));if(S&&E.getValueLengthInRange(n,1)>500){const g=E.modifyPosition(n.getStartPosition(),500);n=p.Range.fromPositions(n.getStartPosition(),g)}const a=E.getValueInRange(n,1);let o;if(r===i||r+1===i)o=E.getValueInRange(I,1);else{const g=u.intersectRanges(I),h=f.intersectRanges(I);o=E.getValueInRange(g,1)+String.fromCharCode(8230)+E.getValueInRange(h,1)}return S&&o.length>2*500&&(o=o.substring(0,500)+String.fromCharCode(8230)+o.substring(o.length-500,o.length)),new R(l+o+a,l.length,l.length+o.length,I,c.endLineNumber-c.startLineNumber)}}e.PagedScreenReaderStrategy=A}),define(ae[584],le([1,0,86,10,195,90,11,6,2,160,28,764,85]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var u;(function(d){d.Tap="-monaco-textarea-synthetic-tap"})(u=e.TextAreaSyntethicEvents||(e.TextAreaSyntethicEvents={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class i{constructor(){this._lastState=null}set(n,a){this._lastState={lastCopiedValue:n,data:a}}get(n){return this._lastState&&this._lastState.lastCopiedValue===n?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=i,i.INSTANCE=new i;class f{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(n){n=n||"";const a={text:n,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=n.length,a}}class c extends I.Disposable{get textAreaState(){return this._textAreaState}constructor(n,a,o,g){super(),this._host=n,this._textArea=a,this._OS=o,this._browser=g,this._onFocus=this._register(new E.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new E.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new E.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new E.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new E.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new E.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new E.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new E.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new E.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new E.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new E.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new k.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new k.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=C.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let h=null;this._register(this._textArea.onKeyDown(v=>{const m=new A.StandardKeyboardEvent(v);(m.keyCode===109||this._currentComposition&&m.keyCode===1)&&m.stopPropagation(),m.equals(9)&&m.preventDefault(),h=m,this._onKeyDown.fire(m)})),this._register(this._textArea.onKeyUp(v=>{const m=new A.StandardKeyboardEvent(v);this._onKeyUp.fire(m)})),this._register(this._textArea.onCompositionStart(v=>{C._debugComposition&&console.log("[compositionstart]",v);const m=new f;if(this._currentComposition){this._currentComposition=m;return}if(this._currentComposition=m,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)===v.data&&(h.code==="ArrowRight"||h.code==="ArrowLeft")){C._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",v),m.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:v.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:v.data});return}this._onCompositionStart.fire({data:v.data})})),this._register(this._textArea.onCompositionUpdate(v=>{C._debugComposition&&console.log("[compositionupdate]",v);const m=this._currentComposition;if(!m)return;if(this._browser.isAndroid){const D=C.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),y=C.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,D);this._textAreaState=D,this._onType.fire(y),this._onCompositionUpdate.fire(v);return}const w=m.handleCompositionUpdate(v.data);this._textAreaState=C.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(w),this._onCompositionUpdate.fire(v)})),this._register(this._textArea.onCompositionEnd(v=>{C._debugComposition&&console.log("[compositionend]",v);const m=this._currentComposition;if(!m)return;if(this._currentComposition=null,this._browser.isAndroid){const D=C.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),y=C.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,D);this._textAreaState=D,this._onType.fire(y),this._onCompositionEnd.fire();return}const w=m.handleCompositionUpdate(v.data);this._textAreaState=C.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(w),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(v=>{if(C._debugComposition&&console.log("[input]",v),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const m=C.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),w=C.TextAreaState.deduceInput(this._textAreaState,m,this._OS===2);w.replacePrevCharCnt===0&&w.text.length===1&&S.isHighSurrogate(w.text.charCodeAt(0))||(this._textAreaState=m,(w.text!==""||w.replacePrevCharCnt!==0||w.replaceNextCharCnt!==0||w.positionDelta!==0)&&this._onType.fire(w))})),this._register(this._textArea.onCut(v=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(v),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(v=>{this._ensureClipboardGetsEditorSelection(v)})),this._register(this._textArea.onPaste(v=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),v.preventDefault(),!v.clipboardData)return;let[m,w]=l.getTextData(v.clipboardData);!m||(w=w||i.INSTANCE.get(m),this._onPaste.fire({text:m,metadata:w}))})),this._register(this._textArea.onFocus(()=>{const v=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!v&&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=C.TextAreaState.readFromTextArea(this._textArea,null)}_installSelectionChangeListener(){let n=0;return p.addDisposableListener(document,"selectionchange",a=>{if(!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const o=Date.now(),g=o-n;if(n=o,g<5)return;const h=o-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),h<100||!this._textAreaState.selection)return;const v=this._textArea.getValue();if(this._textAreaState.value!==v)return;const m=this._textArea.getSelectionStart(),w=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===m&&this._textAreaState.selectionEnd===w)return;const D=this._textAreaState.deduceEditorPosition(m),y=this._host.deduceModelPosition(D[0],D[1],D[2]),T=this._textAreaState.deduceEditorPosition(w),_=this._host.deduceModelPosition(T[0],T[1],T[2]),L=new r.Selection(y.lineNumber,y.column,_.lineNumber,_.column);this._onSelectionChangeRequest.fire(L)})}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(n){this._hasFocus!==n&&(this._hasFocus=n,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(n,a){this._hasFocus||(a=a.collapseSelection()),a.writeToTextArea(n,this._textArea,this._hasFocus),this._textAreaState=a}writeScreenReaderContent(n){this._currentComposition||this._setAndWriteTextAreaState(n,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(n){const a=this._host.getDataToCopy(),o={version:1,isFromEmptySelection:a.isFromEmptySelection,multicursorText:a.multicursorText,mode:a.mode};i.INSTANCE.set(this._browser.isFirefox?a.text.replace(/\r\n/g,` `):a.text,o),n.preventDefault(),n.clipboardData&&l.setTextData(n.clipboardData,a.text,a.html,o)}}e.TextAreaInput=c;class l{static getTextData(n){const a=n.getData(b.Mimes.text);let o=null;const g=n.getData("vscode-editor-data");if(typeof g=="string")try{o=JSON.parse(g),o.version!==1&&(o=null)}catch{}return a.length===0&&o===null&&n.files.length>0?[Array.prototype.slice.call(n.files,0).map(v=>v.name).join(` `),null]:[a,o]}static setTextData(n,a,o,g){n.setData(b.Mimes.text,a),typeof o=="string"&&n.setData("text/html",o),n.setData("vscode-editor-data",JSON.stringify(g))}}class s extends I.Disposable{constructor(n){super(),this._actual=n,this.onKeyDown=this._register(new R.DomEmitter(this._actual,"keydown")).event,this.onKeyPress=this._register(new R.DomEmitter(this._actual,"keypress")).event,this.onKeyUp=this._register(new R.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new R.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new R.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new R.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new R.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new R.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new R.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new R.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new R.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new R.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new R.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new E.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(p.addDisposableListener(this._actual,u.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const n=p.getShadowRoot(this._actual);return n?n.activeElement===this._actual:p.isInDOM(this._actual)?document.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(n){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(n,a){const o=this._actual;o.value!==a&&(this.setIgnoreSelectionChangeTime("setValue"),o.value=a)}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(n,a,o){const g=this._actual;let h=null;const v=p.getShadowRoot(g);v?h=v.activeElement:h=document.activeElement;const m=h===g,w=g.selectionStart,D=g.selectionEnd;if(m&&w===a&&D===o){t.isFirefox&&window.parent!==window&&g.focus();return}if(m){this.setIgnoreSelectionChangeTime("setSelectionRange"),g.setSelectionRange(a,o),t.isFirefox&&window.parent!==window&&g.focus();return}try{const y=p.saveParentsScrollTop(g);this.setIgnoreSelectionChangeTime("setSelectionRange"),g.focus(),g.setSelectionRange(a,o),p.restoreParentsScrollTop(g,y)}catch{}}}e.TextAreaWrapper=s}),define(ae[1274],le([1,0,10,121,180]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class A extends R.ViewPart{constructor(r,u){super(r),this._viewDomNode=u,this._widgets={},this.domNode=(0,p.createFastDomNode)(document.createElement("div")),R.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,p.createFastDomNode)(document.createElement("div")),R.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(r){const u=Object.keys(this._widgets);for(const i of u)this._widgets[i].onConfigurationChanged(r);return!0}onDecorationsChanged(r){return!0}onFlushed(r){return!0}onLineMappingChanged(r){const u=Object.keys(this._widgets);for(const i of u)this._widgets[i].onLineMappingChanged(r);return!0}onLinesChanged(r){return!0}onLinesDeleted(r){return!0}onLinesInserted(r){return!0}onScrollChanged(r){return!0}onZonesChanged(r){return!0}addWidget(r){const u=new k(this._context,this._viewDomNode,r);this._widgets[u.id]=u,u.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(u.domNode):this.domNode.appendChild(u.domNode),this.setShouldRender()}setWidgetPosition(r,u,i,f,c){this._widgets[r.getId()].setPosition(u,i,f,c),this.setShouldRender()}removeWidget(r){const u=r.getId();if(this._widgets.hasOwnProperty(u)){const i=this._widgets[u];delete this._widgets[u];const f=i.domNode.domNode;f.parentNode.removeChild(f),f.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(r){return this._widgets.hasOwnProperty(r)?this._widgets[r].suppressMouseDown:!1}onBeforeRender(r){const u=Object.keys(this._widgets);for(const i of u)this._widgets[i].onBeforeRender(r)}prepareRender(r){const u=Object.keys(this._widgets);for(const i of u)this._widgets[i].prepareRender(r)}render(r){const u=Object.keys(this._widgets);for(const i of u)this._widgets[i].render(r)}}e.ViewContentWidgets=A;class k{constructor(r,u,i){this._primaryAnchor=new E(null,null),this._secondaryAnchor=new E(null,null),this._context=r,this._viewDomNode=u,this._actual=i,this.domNode=(0,p.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const f=this._context.configuration.options,c=f.get(133);this._fixedOverflowWidgets=f.get(37),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,this._lineHeight=f.get(60),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(r){const u=this._context.configuration.options;if(this._lineHeight=u.get(60),r.hasChanged(133)){const i=u.get(133);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(r){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(r,u,i){this._affinity=r,this._primaryAnchor=f(u,this._context.viewModel,this._affinity),this._secondaryAnchor=f(i,this._context.viewModel,this._affinity);function f(c,l,s){if(!c)return new E(null,null);const d=l.model.validatePosition(c);if(l.coordinatesConverter.modelPositionIsVisible(d)){const n=l.coordinatesConverter.convertModelPositionToViewPosition(d,s??void 0);return new E(c,n)}return new E(c,null)}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(r,u,i,f){this._setPosition(f,r,u),this._preference=i,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(r,u,i,f){const c=r.top,l=c,s=r.top+r.height,d=f.viewportHeight-s,n=c-i,a=l>=i,o=s,g=d>=i;let h=r.left;return h+u>f.scrollLeft+f.viewportWidth&&(h=f.scrollLeft+f.viewportWidth-u),h<f.scrollLeft&&(h=f.scrollLeft),{fitsAbove:a,aboveTop:n,fitsBelow:g,belowTop:o,left:h}}_layoutHorizontalSegmentInPage(r,u,i,f){const c=Math.max(0,u.left-f),l=Math.min(u.left+u.width+f,r.width);let s=u.left+i-window.scrollX;if(s+f>l){const d=s-(l-f);s-=d,i-=d}if(s<c){const d=s-c;s-=d,i-=d}return[i,s]}_layoutBoxInPage(r,u,i,f){const c=r.top-i,l=r.top+r.height,s=t.getDomNodePagePosition(this._viewDomNode.domNode),d=s.top+c-window.scrollY,n=s.top+l-window.scrollY,a=t.getClientArea(document.body),[o,g]=this._layoutHorizontalSegmentInPage(a,s,r.left-f.scrollLeft+this._contentLeft,u),h=22,v=22,m=d>=h,w=n+i<=a.height-v;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(d,h),fitsBelow:w,belowTop:n,left:g}:{fitsAbove:m,aboveTop:c,fitsBelow:w,belowTop:l,left:o}}_prepareRenderWidgetAtExactPositionOverflowing(r){return new I(r.top,r.left+this._contentLeft)}_getAnchorsCoordinates(r){const u=c(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),i=this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,f=c(i,this._affinity,this._lineHeight);return{primary:u,secondary:f};function c(l,s,d){if(!l)return null;const n=r.visibleRangeForPosition(l);if(!n)return null;const a=l.column===1&&s===3?0:n.left,o=r.getVerticalOffsetForLineNumber(l.lineNumber)-r.scrollTop;return new b(o,a,d)}}_reduceAnchorCoordinates(r,u,i){if(!u)return r;const f=this._context.configuration.options.get(45);let c=u.left;return c<r.left?c=Math.max(c,r.left-i+f.typicalFullwidthCharacterWidth):c=Math.min(c,r.left+i-f.typicalFullwidthCharacterWidth),new b(r.top,c,r.height)}_prepareRenderWidget(r){if(!this._preference||this._preference.length===0)return null;const{primary:u,secondary:i}=this._getAnchorsCoordinates(r);if(!u)return null;if(this._cachedDomNodeOffsetWidth===-1||this._cachedDomNodeOffsetHeight===-1){let l=null;if(typeof this._actual.beforeRender=="function"&&(l=S(this._actual.beforeRender,this._actual)),l)this._cachedDomNodeOffsetWidth=l.width,this._cachedDomNodeOffsetHeight=l.height;else{const d=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(d.width),this._cachedDomNodeOffsetHeight=Math.round(d.height)}}const f=this._reduceAnchorCoordinates(u,i,this._cachedDomNodeOffsetWidth);let c;this.allowEditorOverflow?c=this._layoutBoxInPage(f,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,r):c=this._layoutBoxInViewport(f,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,r);for(let l=1;l<=2;l++)for(const s of this._preference)if(s===1){if(!c)return null;if(l===2||c.fitsAbove)return{coordinate:new I(c.aboveTop,c.left),position:1}}else if(s===2){if(!c)return null;if(l===2||c.fitsBelow)return{coordinate:new I(c.belowTop,c.left),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new I(f.top,f.left)),position:0}:{coordinate:new I(f.top,f.left),position:0};return null}onBeforeRender(r){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<r.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>r.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(r){this._renderData=this._prepareRenderWidget(r)}render(r){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&S(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+r.scrollTop-r.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"&&S(this._actual.afterRender,this._actual,this._renderData.position)}}class E{constructor(r,u){this.modelPosition=r,this.viewPosition=u}}class I{constructor(r,u){this.top=r,this.left=u,this._coordinateBrand=void 0}}class b{constructor(r,u,i){this.top=r,this.left=u,this.height=i,this._anchorCoordinateBrand=void 0}}function S(C,r,...u){try{return C.call(r,...u)}catch{return null}}}),define(ae[765],le([1,0,171,6,2,52,20]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNavigator=void 0;const E={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class I extends R.Disposable{constructor(S,C={}){super(),this._onDidUpdate=this._register(new p.Emitter),this.onDidUpdate=this._onDidUpdate.event,this._editor=S,this._options=A.mixin(C,E,!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(r=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(r=>{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(S){this.ranges=[],S&&S.forEach(C=>{!this._options.ignoreCharChanges&&C.charChanges?C.charChanges.forEach(r=>{this.ranges.push({rhs:!0,range:new k.Range(r.modifiedStartLineNumber,r.modifiedStartColumn,r.modifiedEndLineNumber,r.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,r)=>k.Range.compareRangesUsingStarts(C.range,r.range)),this._onDidUpdate.fire(this)}_initIdx(S){let C=!1;const r=this._editor.getPosition();if(!r){this.nextIdx=0;return}for(let u=0,i=this.ranges.length;u<i&&!C;u++){const f=this.ranges[u].range;r.isBeforeOrEqual(f.getStartPosition())&&(this.nextIdx=u+(S?0:-1),C=!0)}C||(this.nextIdx=S?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(S,C){if(t.ok(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(S):S?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const r=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const u=r.range.getStartPosition();this._editor.setPosition(u),this._editor.revealRangeInCenter(r.range,C)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(S=0){this._move(!0,S)}previous(S=0){this._move(!1,S)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}e.DiffNavigator=I}),define(ae[766],le([1,0,28,138,20]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class A{constructor(I,b){this._selection=I,this._cursors=b,this._selectionId=null}getEditOperations(I,b){const S=k(I,this._cursors);for(let C=0,r=S.length;C<r;C++){const u=S[C];b.addEditOperation(u.range,u.text)}this._selectionId=b.trackSelection(this._selection)}computeCursorState(I,b){return b.getTrackedSelection(this._selectionId)}}e.TrimTrailingWhitespaceCommand=A;function k(E,I){I.sort((u,i)=>u.lineNumber===i.lineNumber?u.column-i.column:u.lineNumber-i.lineNumber);for(let u=I.length-2;u>=0;u--)I[u].lineNumber===I[u+1].lineNumber&&I.splice(u,1);const b=[];let S=0,C=0;const r=I.length;for(let u=1,i=E.getLineCount();u<=i;u++){const f=E.getLineContent(u),c=f.length+1;let l=0;if(C<r&&I[C].lineNumber===u&&(l=I[C].column,C++,l===c)||f.length===0)continue;const s=t.lastNonWhitespaceIndex(f);let d=0;if(s===-1)d=1;else if(s!==f.length-1)d=s+2;else continue;d=Math.max(l,d),b[S++]=p.EditOperation.delete(new R.Range(u,d,u,c))}return b}e.trimTrailingWhitespace=k}),define(ae[491],le([1,0,6]),function(J,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(p){p=Math.min(Math.max(-5,p),20),this._zoomLevel!==p&&(this._zoomLevel=p,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}}),define(ae[251],le([1,0,28]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class p{static _nextVisibleColumn(A,k,E){return A===9?p.nextRenderTabStop(k,E):t.isFullWidthCharacter(A)||t.isEmojiImprecise(A)?k+2:k+1}static visibleColumnFromColumn(A,k,E){const I=Math.min(k-1,A.length),b=A.substring(0,I),S=new t.GraphemeIterator(b);let C=0;for(;!S.eol();){const r=t.getNextCodePoint(b,I,S.offset);S.nextGraphemeLength(),C=this._nextVisibleColumn(r,C,E)}return C}static toStatusbarColumn(A,k,E){const I=A.substring(0,Math.min(k-1,A.length)),b=new t.CodePointIterator(I);let S=0;for(;!b.eol();)b.nextCodePoint()===9?S=p.nextRenderTabStop(S,E):S=S+1;return S+1}static columnFromVisibleColumn(A,k,E){if(k<=0)return 1;const I=A.length,b=new t.GraphemeIterator(A);let S=0,C=1;for(;!b.eol();){const r=t.getNextCodePoint(A,I,b.offset);b.nextGraphemeLength();const u=this._nextVisibleColumn(r,S,E),i=b.offset+1;if(u>=k){const f=k-S;return u-k<f?i:C}S=u,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=p}),define(ae[585],le([1,0,28,251]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeIndentation=void 0;function R(k,E,I){let b=0;for(let C=0;C<k.length;C++)k.charAt(C)===" "?b=p.CursorColumns.nextIndentTabStop(b,E):b++;let S="";if(!I){const C=Math.floor(b/E);b=b%E;for(let r=0;r<C;r++)S+=" "}for(let C=0;C<b;C++)S+=" ";return S}function A(k,E,I){let b=t.firstNonWhitespaceIndex(k);return b===-1&&(b=k.length),R(k.substring(0,b),E,I)+k.substring(b)}e.normalizeIndentation=A}),define(ae[280],le([1,0,28,14,56]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let A;function k(){return A||(A=new TextDecoder("UTF-16LE")),A}let E;function I(){return E||(E=new TextDecoder("UTF-16BE")),E}let b;function S(){return b||(b=p.isLittleEndian()?k():I()),b}e.getPlatformTextDecoder=S;function C(i,f,c){const l=new Uint16Array(i.buffer,f,c);return c>0&&(l[0]===65279||l[0]===65534)?r(i,f,c):k().decode(l)}e.decodeUTF16LE=C;function r(i,f,c){const l=[];let s=0;for(let d=0;d<c;d++){const n=R.readUInt16LE(i,f);f+=2,l[s++]=String.fromCharCode(n)}return l.join("")}class u{constructor(f){this._capacity=f|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 f=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return S().decode(f)}_flushBuffer(){const f=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[f]:this._completedStrings[this._completedStrings.length]=f}appendCharCode(f){const c=this._capacity-this._bufferLength;c<=1&&(c===0||t.isHighSurrogate(f))&&this._flushBuffer(),this._buffer[this._bufferLength++]=f}appendASCIICharCode(f){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=f}appendString(f){const c=f.length;if(this._bufferLength+c>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=f;return}for(let l=0;l<c;l++)this._buffer[this._bufferLength++]=f.charCodeAt(l)}}e.StringBuilder=u}),define(ae[1275],le([1,0,280,28,235,326,731]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DOMLineBreaksComputerFactory=void 0;const E=window.trustedTypes?.createPolicy("domLineBreaksComputer",{createHTML:f=>f});class I{static create(){return new I}constructor(){}createLineBreaksComputer(c,l,s,d){const n=[],a=[];return{addRequest:(o,g,h)=>{n.push(o),a.push(g)},finalize:()=>b(n,c,l,s,d,a)}}}e.DOMLineBreaksComputerFactory=I;function b(f,c,l,s,d,n){function a(V){const z=n[V];if(z){const x=A.LineInjectedText.applyInjectedText(f[V],z),H=z.map(U=>U.options),W=z.map(U=>U.column-1);return new k.ModelLineProjectionData(W,H,[x.length],[],0)}else return null}if(s===-1){const V=[];for(let z=0,x=f.length;z<x;z++)V[z]=a(z);return V}const o=Math.round(s*c.typicalHalfwidthCharacterWidth),h=Math.round(l*(d===3?2:d===2?1:0)),v=Math.ceil(c.spaceWidth*h),m=document.createElement("div");(0,R.applyFontInfo)(m,c);const w=new t.StringBuilder(1e4),D=[],y=[],T=[],_=[],L=[];for(let V=0;V<f.length;V++){const z=A.LineInjectedText.applyInjectedText(f[V],n[V]);let x=0,H=0,W=o;if(d!==0)if(x=p.firstNonWhitespaceIndex(z),x===-1)x=0;else{for(let X=0;X<x;X++)H+=z.charCodeAt(X)===9?l-H%l:1;const q=Math.ceil(c.spaceWidth*H);q+c.typicalFullwidthCharacterWidth>o?(x=0,H=0):W=o-q}const U=z.substr(x),$=C(U,H,l,W,w,v);D[V]=x,y[V]=H,T[V]=U,_[V]=$[0],L[V]=$[1]}const M=w.build(),O=E?.createHTML(M)??M;m.innerHTML=O,m.style.position="absolute",m.style.top="10000",m.style.wordWrap="break-word",document.body.appendChild(m);const N=document.createRange(),P=Array.prototype.slice.call(m.children,0),B=[];for(let V=0;V<f.length;V++){const z=P[V],x=r(N,z,T[V],_[V]);if(x===null){B[V]=a(V);continue}const H=D[V],W=y[V]+h,U=L[V],$=[];for(let Q=0,j=x.length;Q<j;Q++)$[Q]=U[x[Q]];if(H!==0)for(let Q=0,j=x.length;Q<j;Q++)x[Q]+=H;let q,X;const G=n[V];G?(q=G.map(Q=>Q.options),X=G.map(Q=>Q.column-1)):(q=null,X=null),B[V]=new k.ModelLineProjectionData(X,q,x,$,W)}return document.body.removeChild(m),B}var S;(function(f){f[f.SPAN_MODULO_LIMIT=16384]="SPAN_MODULO_LIMIT"})(S||(S={}));function C(f,c,l,s,d,n){if(n!==0){const w=String(n);d.appendString('<div style="text-indent: -'),d.appendString(w),d.appendString("px; padding-left: "),d.appendString(w),d.appendString("px; box-sizing: border-box; width:")}else d.appendString('<div style="width:');d.appendString(String(s)),d.appendString('px;">');const a=f.length;let o=c,g=0;const h=[],v=[];let m=0<a?f.charCodeAt(0):0;d.appendString("<span>");for(let w=0;w<a;w++){w!==0&&w%16384===0&&d.appendString("</span><span>"),h[w]=g,v[w]=o;const D=m;m=w+1<a?f.charCodeAt(w+1):0;let y=1,T=1;switch(D){case 9:y=l-o%l,T=y;for(let _=1;_<=y;_++)_<y?d.appendCharCode(160):d.appendASCIICharCode(32);break;case 32:m===32?d.appendCharCode(160):d.appendASCIICharCode(32);break;case 60:d.appendString("<");break;case 62:d.appendString(">");break;case 38:d.appendString("&");break;case 0:d.appendString("�");break;case 65279:case 8232:case 8233:case 133:d.appendCharCode(65533);break;default:p.isFullWidthCharacter(D)&&T++,D<32?d.appendCharCode(9216+D):d.appendCharCode(D)}g+=y,o+=T}return d.appendString("</span>"),h[f.length]=g,v[f.length]=o,d.appendString("</div>"),[h,v]}function r(f,c,l,s){if(l.length<=1)return null;const d=Array.prototype.slice.call(c.children,0),n=[];try{u(f,d,s,0,null,l.length-1,null,n)}catch(a){return console.log(a),null}return n.length===0?null:(n.push(l.length),n)}function u(f,c,l,s,d,n,a,o){if(s===n||(d=d||i(f,c,l[s],l[s+1]),a=a||i(f,c,l[n],l[n+1]),Math.abs(d[0].top-a[0].top)<=.1))return;if(s+1===n){o.push(n);return}const g=s+(n-s)/2|0,h=i(f,c,l[g],l[g+1]);u(f,c,l,s,d,g,h,o),u(f,c,l,g,h,n,a,o)}function i(f,c,l,s){return f.setStart(c[l/16384|0].firstChild,l%16384),f.setEnd(c[s/16384|0].firstChild,s%16384),f.getClientRects()}}),define(ae[586],le([1,0,121,280]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class R{constructor(I){this._createLine=I,this._set(1,[])}flush(){this._set(1,[])}_set(I,b){this._lines=b,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 b=I-this._rendLineNumberStart;if(b<0||b>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[b]}onLinesDeleted(I,b){if(this.getCount()===0)return null;const S=this.getStartLineNumber(),C=this.getEndLineNumber();if(b<S){const f=b-I+1;return this._rendLineNumberStart-=f,null}if(I>C)return null;let r=0,u=0;for(let f=S;f<=C;f++){const c=f-this._rendLineNumberStart;I<=f&&f<=b&&(u===0?(r=c,u=1):u++)}if(I<S){let f=0;b<S?f=b-I+1:f=S-I,this._rendLineNumberStart-=f}return this._lines.splice(r,u)}onLinesChanged(I,b){const S=I+b-1;if(this.getCount()===0)return!1;const C=this.getStartLineNumber(),r=this.getEndLineNumber();let u=!1;for(let i=I;i<=S;i++)i>=C&&i<=r&&(this._lines[i-this._rendLineNumberStart].onContentChanged(),u=!0);return u}onLinesInserted(I,b){if(this.getCount()===0)return null;const S=b-I+1,C=this.getStartLineNumber(),r=this.getEndLineNumber();if(I<=C)return this._rendLineNumberStart+=S,null;if(I>r)return null;if(S+I>r)return this._lines.splice(I-this._rendLineNumberStart,r-I+1);const u=[];for(let s=0;s<S;s++)u[s]=this._createLine();const i=I-this._rendLineNumberStart,f=this._lines.slice(0,i),c=this._lines.slice(i,this._lines.length-S),l=this._lines.slice(this._lines.length-S,this._lines.length);return this._lines=f.concat(u).concat(c),l}onTokensChanged(I){if(this.getCount()===0)return!1;const b=this.getStartLineNumber(),S=this.getEndLineNumber();let C=!1;for(let r=0,u=I.length;r<u;r++){const i=I[r];if(i.toLineNumber<b||i.fromLineNumber>S)continue;const f=Math.max(b,i.fromLineNumber),c=Math.min(S,i.toLineNumber);for(let l=f;l<=c;l++){const s=l-this._rendLineNumberStart;this._lines[s].onTokensChanged(),C=!0}}return C}}e.RenderedLinesCollection=R;class A{constructor(I){this._host=I,this.domNode=this._createDomNode(),this._linesCollection=new R(()=>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(133)}onFlushed(I){return this._linesCollection.flush(),!0}onLinesChanged(I){return this._linesCollection.onLinesChanged(I.fromLineNumber,I.count)}onLinesDeleted(I){const b=this._linesCollection.onLinesDeleted(I.fromLineNumber,I.toLineNumber);if(b)for(let S=0,C=b.length;S<C;S++){const r=b[S].getDomNode();r&&this.domNode.domNode.removeChild(r)}return!0}onLinesInserted(I){const b=this._linesCollection.onLinesInserted(I.fromLineNumber,I.toLineNumber);if(b)for(let S=0,C=b.length;S<C;S++){const r=b[S].getDomNode();r&&this.domNode.domNode.removeChild(r)}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 b=this._linesCollection._get(),S=new k(this.domNode.domNode,this._host,I),C={rendLineNumberStart:b.rendLineNumberStart,lines:b.lines,linesLength:b.lines.length},r=S.render(C,I.startLineNumber,I.endLineNumber,I.relativeVerticalOffset);this._linesCollection._set(r.rendLineNumberStart,r.lines)}}e.VisibleLinesCollection=A;class k{constructor(I,b,S){this.domNode=I,this.host=b,this.viewportData=S}render(I,b,S,C){const r={rendLineNumberStart:I.rendLineNumberStart,lines:I.lines.slice(0),linesLength:I.linesLength};if(r.rendLineNumberStart+r.linesLength-1<b||S<r.rendLineNumberStart){r.rendLineNumberStart=b,r.linesLength=S-b+1,r.lines=[];for(let u=b;u<=S;u++)r.lines[u-b]=this.host.createVisibleLine();return this._finishRendering(r,!0,C),r}if(this._renderUntouchedLines(r,Math.max(b-r.rendLineNumberStart,0),Math.min(S-r.rendLineNumberStart,r.linesLength-1),C,b),r.rendLineNumberStart>b){const u=b,i=Math.min(S,r.rendLineNumberStart-1);u<=i&&(this._insertLinesBefore(r,u,i,C,b),r.linesLength+=i-u+1)}else if(r.rendLineNumberStart<b){const u=Math.min(r.linesLength,b-r.rendLineNumberStart);u>0&&(this._removeLinesBefore(r,u),r.linesLength-=u)}if(r.rendLineNumberStart=b,r.rendLineNumberStart+r.linesLength-1<S){const u=r.rendLineNumberStart+r.linesLength,i=S;u<=i&&(this._insertLinesAfter(r,u,i,C,b),r.linesLength+=i-u+1)}else if(r.rendLineNumberStart+r.linesLength-1>S){const u=Math.max(0,S-r.rendLineNumberStart+1),f=r.linesLength-1-u+1;f>0&&(this._removeLinesAfter(r,f),r.linesLength-=f)}return this._finishRendering(r,!1,C),r}_renderUntouchedLines(I,b,S,C,r){const u=I.rendLineNumberStart,i=I.lines;for(let f=b;f<=S;f++){const c=u+f;i[f].layoutLine(c,C[c-r])}}_insertLinesBefore(I,b,S,C,r){const u=[];let i=0;for(let f=b;f<=S;f++)u[i++]=this.host.createVisibleLine();I.lines=u.concat(I.lines)}_removeLinesBefore(I,b){for(let S=0;S<b;S++){const C=I.lines[S].getDomNode();C&&this.domNode.removeChild(C)}I.lines.splice(0,b)}_insertLinesAfter(I,b,S,C,r){const u=[];let i=0;for(let f=b;f<=S;f++)u[i++]=this.host.createVisibleLine();I.lines=I.lines.concat(u)}_removeLinesAfter(I,b){const S=I.linesLength-b;for(let C=0;C<b;C++){const r=I.lines[S+C].getDomNode();r&&this.domNode.removeChild(r)}I.lines.splice(S,b)}_finishRenderingNewLines(I,b,S,C){k._ttPolicy&&(S=k._ttPolicy.createHTML(S));const r=this.domNode.lastChild;b||!r?this.domNode.innerHTML=S:r.insertAdjacentHTML("afterend",S);let u=this.domNode.lastChild;for(let i=I.linesLength-1;i>=0;i--){const f=I.lines[i];C[i]&&(f.setDomNode(u),u=u.previousSibling)}}_finishRenderingInvalidLines(I,b,S){const C=document.createElement("div");k._ttPolicy&&(b=k._ttPolicy.createHTML(b)),C.innerHTML=b;for(let r=0;r<I.linesLength;r++){const u=I.lines[r];if(S[r]){const i=C.firstChild,f=u.getDomNode();f.parentNode.replaceChild(i,f),u.setDomNode(i)}}}_finishRendering(I,b,S){const C=k._sb,r=I.linesLength,u=I.lines,i=I.rendLineNumberStart,f=[];{C.reset();let c=!1;for(let l=0;l<r;l++){const s=u[l];f[l]=!1,!(s.getDomNode()||!s.renderLine(l+i,S[l],this.viewportData,C))&&(f[l]=!0,c=!0)}c&&this._finishRenderingNewLines(I,b,C.build(),f)}{C.reset();let c=!1;const l=[];for(let s=0;s<r;s++){const d=u[s];l[s]=!1,!(f[s]||!d.renderLine(s+i,S[s],this.viewportData,C))&&(l[s]=!0,c=!0)}c&&this._finishRenderingInvalidLines(I,C.build(),l)}}}k._ttPolicy=window.trustedTypes?.createPolicy("editorViewLayer",{createHTML:E=>E}),k._sb=new p.StringBuilder(1e5)}),define(ae[1276],le([1,0,121,235,586,180]),function(J,e,t,p,R,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 R.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,r=this._dynamicOverlays.length;C<r;C++)if(this._dynamicOverlays[C].shouldRender())return!0;return!1}dispose(){super.dispose();for(let C=0,r=this._dynamicOverlays.length;C<r;C++)this._dynamicOverlays[C].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new E(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(C){this._dynamicOverlays.push(C)}onConfigurationChanged(C){this._visibleLines.onConfigurationChanged(C);const r=this._visibleLines.getStartLineNumber(),u=this._visibleLines.getEndLineNumber();for(let i=r;i<=u;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 r=this._dynamicOverlays.filter(u=>u.shouldRender());for(let u=0,i=r.length;u<i;u++){const f=r[u];f.prepareRender(C),f.onDidRender()}}render(C){this._viewOverlaysRender(C),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(C){this._visibleLines.renderLines(C.viewportData)}}e.ViewOverlays=k;class E{constructor(C,r){this._configuration=C,this._lineHeight=this._configuration.options.get(60),this._dynamicOverlays=r,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(60)}renderLine(C,r,u,i){let f="";for(let c=0,l=this._dynamicOverlays.length;c<l;c++)f+=this._dynamicOverlays[c].render(u.startLineNumber,C);return this._renderedContent===f?!1:(this._renderedContent=f,i.appendString('<div style="position:absolute;top:'),i.appendString(String(r)),i.appendString("px;width:100%;height:"),i.appendString(String(this._lineHeight)),i.appendString('px;">'),i.appendString(f),i.appendString("</div>"),!0)}layoutLine(C,r){this._domNode&&(this._domNode.setTop(r),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=E;class I extends k{constructor(C){super(C);const u=this._context.configuration.options.get(133);this._contentWidth=u.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(C){const u=this._context.configuration.options.get(133);return this._contentWidth=u.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 b extends k{constructor(C){super(C);const r=this._context.configuration.options,u=r.get(133);this._contentLeft=u.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,p.applyFontInfo)(this.domNode,r.get(45))}onConfigurationChanged(C){const r=this._context.configuration.options;(0,p.applyFontInfo)(this.domNode,r.get(45));const u=r.get(133);return this._contentLeft=u.contentLeft,super.onConfigurationChanged(C)||!0}onScrollChanged(C){return super.onScrollChanged(C)||C.scrollHeightChanged}_viewOverlaysRender(C){super._viewOverlaysRender(C);const r=Math.min(C.scrollHeight,1e6);this.domNode.setHeight(r),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=b}),define(ae[767],le([1,0,56,280]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function R(I){return I.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class A{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}constructor(b,S,C,r){this.oldPosition=b,this.oldText=S,this.newPosition=C,this.newText=r}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${R(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${R(this.oldText)}")`:`(replace@${this.oldPosition} "${R(this.oldText)}" with "${R(this.newText)}")`}static _writeStringSize(b){return 4+2*b.length}static _writeString(b,S,C){const r=S.length;t.writeUInt32BE(b,r,C),C+=4;for(let u=0;u<r;u++)t.writeUInt16LE(b,S.charCodeAt(u),C),C+=2;return C}static _readString(b,S){const C=t.readUInt32BE(b,S);return S+=4,(0,p.decodeUTF16LE)(b,S,C)}writeSize(){return 4+4+A._writeStringSize(this.oldText)+A._writeStringSize(this.newText)}write(b,S){return t.writeUInt32BE(b,this.oldPosition,S),S+=4,t.writeUInt32BE(b,this.newPosition,S),S+=4,S=A._writeString(b,this.oldText,S),S=A._writeString(b,this.newText,S),S}static read(b,S,C){const r=t.readUInt32BE(b,S);S+=4;const u=t.readUInt32BE(b,S);S+=4;const i=A._readString(b,S);S+=A._writeStringSize(i);const f=A._readString(b,S);return S+=A._writeStringSize(f),C.push(new A(r,i,u,f)),S}}e.TextChange=A;function k(I,b){return I===null||I.length===0?b:new E(I,b).compress()}e.compressConsecutiveTextChanges=k;class E{constructor(b,S){this._prevEdits=b,this._currEdits=S,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let b=0,S=0,C=this._getPrev(b),r=this._getCurr(S);for(;b<this._prevLen||S<this._currLen;){if(C===null){this._acceptCurr(r),r=this._getCurr(++S);continue}if(r===null){this._acceptPrev(C),C=this._getPrev(++b);continue}if(r.oldEnd<=C.newPosition){this._acceptCurr(r),r=this._getCurr(++S);continue}if(C.newEnd<=r.oldPosition){this._acceptPrev(C),C=this._getPrev(++b);continue}if(r.oldPosition<C.newPosition){const[l,s]=E._splitCurr(r,C.newPosition-r.oldPosition);this._acceptCurr(l),r=s;continue}if(C.newPosition<r.oldPosition){const[l,s]=E._splitPrev(C,r.oldPosition-C.newPosition);this._acceptPrev(l),C=s;continue}let f,c;if(r.oldEnd===C.newEnd)f=C,c=r,C=this._getPrev(++b),r=this._getCurr(++S);else if(r.oldEnd<C.newEnd){const[l,s]=E._splitPrev(C,r.oldLength);f=l,c=r,C=s,r=this._getCurr(++S)}else{const[l,s]=E._splitCurr(r,C.newLength);f=C,c=l,C=this._getPrev(++b),r=s}this._result[this._resultLen++]=new A(f.oldPosition,f.oldText,c.newPosition,c.newText),this._prevDeltaOffset+=f.newLength-f.oldLength,this._currDeltaOffset+=c.newLength-c.oldLength}const u=E._merge(this._result);return E._removeNoOps(u)}_acceptCurr(b){this._result[this._resultLen++]=E._rebaseCurr(this._prevDeltaOffset,b),this._currDeltaOffset+=b.newLength-b.oldLength}_getCurr(b){return b<this._currLen?this._currEdits[b]:null}_acceptPrev(b){this._result[this._resultLen++]=E._rebasePrev(this._currDeltaOffset,b),this._prevDeltaOffset+=b.newLength-b.oldLength}_getPrev(b){return b<this._prevLen?this._prevEdits[b]:null}static _rebaseCurr(b,S){return new A(S.oldPosition-b,S.oldText,S.newPosition,S.newText)}static _rebasePrev(b,S){return new A(S.oldPosition,S.oldText,S.newPosition+b,S.newText)}static _splitPrev(b,S){const C=b.newText.substr(0,S),r=b.newText.substr(S);return[new A(b.oldPosition,b.oldText,b.newPosition,C),new A(b.oldEnd,"",b.newPosition+S,r)]}static _splitCurr(b,S){const C=b.oldText.substr(0,S),r=b.oldText.substr(S);return[new A(b.oldPosition,C,b.newPosition,b.newText),new A(b.oldPosition+S,r,b.newEnd,"")]}static _merge(b){if(b.length===0)return b;const S=[];let C=0,r=b[0];for(let u=1;u<b.length;u++){const i=b[u];r.oldEnd===i.oldPosition?r=new A(r.oldPosition,r.oldText+i.oldText,r.newPosition,r.newText+i.newText):(S[C++]=r,r=i)}return S[C++]=r,S}static _removeNoOps(b){if(b.length===0)return b;const S=[];let C=0;for(let r=0;r<b.length;r++){const u=b[r];u.oldText!==u.newText&&(S[C++]=u)}return S}}}),define(ae[768],le([1,0,251]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=e.Direction=void 0;var p;(function(A){A[A.Left=0]="Left",A[A.Right=1]="Right",A[A.Nearest=2]="Nearest"})(p=e.Direction||(e.Direction={}));class R{static whitespaceVisibleColumn(k,E,I){const b=k.length;let S=0,C=-1,r=-1;for(let u=0;u<b;u++){if(u===E)return[C,r,S];switch(S%I===0&&(C=u,r=S),k.charCodeAt(u)){case 32:S+=1;break;case 9:S=t.CursorColumns.nextRenderTabStop(S,I);break;default:return[-1,-1,-1]}}return E===b?[C,r,S]:[-1,-1,-1]}static atomicPosition(k,E,I,b){const S=k.length,[C,r,u]=R.whitespaceVisibleColumn(k,E,I);if(u===-1)return-1;let i;switch(b){case 0:i=!0;break;case 1:i=!1;break;case 2:if(u%I===0)return E;i=u%I<=I/2;break}if(i){if(C===-1)return-1;let l=r;for(let s=C;s<S;++s){if(l===r+I)return C;switch(k.charCodeAt(s)){case 32:l+=1;break;case 9:l=t.CursorColumns.nextRenderTabStop(l,I);break;default:return-1}}return l===r+I?C:-1}const f=t.CursorColumns.nextRenderTabStop(u,I);let c=u;for(let l=E;l<S;l++){if(c===f)return l;switch(k.charCodeAt(l)){case 32:c+=1;break;case 9:c=t.CursorColumns.nextRenderTabStop(c,I);break;default:return-1}}return c===f?S:-1}}e.AtomicTabMoveOperations=R}),define(ae[240],le([1,0,50,20,85,363,251,585]),function(J,e,t,p,R,A,k,E){"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(n){n[n.Primary=0]="Primary",n[n.TopMost=1]="TopMost",n[n.BottomMost=2]="BottomMost"})(I=e.RevealTarget||(e.RevealTarget={}));var b;(function(n){n[n.Other=0]="Other",n[n.DeletingLeft=2]="DeletingLeft",n[n.DeletingRight=3]="DeletingRight",n[n.TypingOther=4]="TypingOther",n[n.TypingFirstSpace=5]="TypingFirstSpace",n[n.TypingConsecutiveSpace=6]="TypingConsecutiveSpace"})(b=e.EditOperationType||(e.EditOperationType={}));const S=()=>!0,C=()=>!1,r=n=>n===" "||n===" ";class u{static shouldRecreate(a){return a.hasChanged(133)||a.hasChanged(119)||a.hasChanged(33)||a.hasChanged(70)||a.hasChanged(72)||a.hasChanged(5)||a.hasChanged(8)||a.hasChanged(6)||a.hasChanged(7)||a.hasChanged(11)||a.hasChanged(118)||a.hasChanged(45)||a.hasChanged(82)}constructor(a,o,g,h){this.languageConfigurationService=h,this._cursorMoveConfigurationBrand=void 0,this._languageId=a;const v=g.options,m=v.get(133),w=v.get(45);this.readOnly=v.get(82),this.tabSize=o.tabSize,this.indentSize=o.indentSize,this.insertSpaces=o.insertSpaces,this.stickyTabStops=v.get(106),this.lineHeight=w.lineHeight,this.typicalHalfwidthCharacterWidth=w.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(m.height/this.lineHeight)-2),this.useTabStops=v.get(118),this.wordSeparators=v.get(119),this.emptySelectionClipboard=v.get(33),this.copyWithSyntaxHighlighting=v.get(21),this.multiCursorMergeOverlapping=v.get(70),this.multiCursorPaste=v.get(72),this.autoClosingBrackets=v.get(5),this.autoClosingQuotes=v.get(8),this.autoClosingDelete=v.get(6),this.autoClosingOvertype=v.get(7),this.autoSurround=v.get(11),this.autoIndent=v.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 D=this.languageConfigurationService.getLanguageConfiguration(a).getSurroundingPairs();if(D)for(const y of D)this.surroundingPairs[y.open]=y.close}get electricChars(){if(!this._electricChars){this._electricChars={};const a=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(a)for(const o of a)this._electricChars[o]=!0}return this._electricChars}onElectricCharacter(a,o,g){const h=(0,A.createScopedLineTokens)(o,g-1),v=this.languageConfigurationService.getLanguageConfiguration(h.languageId).electricCharacter;return v?v.onElectricCharacter(a,h,g-h.firstCharOffset):null}normalizeIndentation(a){return(0,E.normalizeIndentation)(a,this.indentSize,this.insertSpaces)}_getShouldAutoClose(a,o){switch(o){case"beforeWhitespace":return r;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(a);case"always":return S;case"never":return C}}_getLanguageDefinedShouldAutoClose(a){const o=this.languageConfigurationService.getLanguageConfiguration(a).getAutoCloseBeforeSet();return g=>o.indexOf(g)!==-1}visibleColumnFromColumn(a,o){return k.CursorColumns.visibleColumnFromColumn(a.getLineContent(o.lineNumber),o.column,this.tabSize)}columnFromVisibleColumn(a,o,g){const h=k.CursorColumns.columnFromVisibleColumn(a.getLineContent(o),g,this.tabSize),v=a.getLineMinColumn(o);if(h<v)return v;const m=a.getLineMaxColumn(o);return h>m?m:h}}e.CursorConfiguration=u;class i{static fromModelState(a){return new f(a)}static fromViewState(a){return new c(a)}static fromModelSelection(a){const o=R.Selection.liftSelection(a),g=new l(p.Range.fromPositions(o.getSelectionStart()),0,o.getPosition(),0);return i.fromModelState(g)}static fromModelSelections(a){const o=[];for(let g=0,h=a.length;g<h;g++)o[g]=this.fromModelSelection(a[g]);return o}constructor(a,o){this._cursorStateBrand=void 0,this.modelState=a,this.viewState=o}equals(a){return this.viewState.equals(a.viewState)&&this.modelState.equals(a.modelState)}}e.CursorState=i;class f{constructor(a){this.modelState=a,this.viewState=null}}e.PartialModelCursorState=f;class c{constructor(a){this.modelState=null,this.viewState=a}}e.PartialViewCursorState=c;class l{constructor(a,o,g,h){this._singleCursorStateBrand=void 0,this.selectionStart=a,this.selectionStartLeftoverVisibleColumns=o,this.position=g,this.leftoverVisibleColumns=h,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,o,g,h){return a?new l(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new t.Position(o,g),h):new l(new p.Range(o,g,o,g),h,new t.Position(o,g),h)}static _computeSelection(a,o){return a.isEmpty()||!o.isBeforeOrEqual(a.getStartPosition())?R.Selection.fromPositions(a.getStartPosition(),o):R.Selection.fromPositions(a.getEndPosition(),o)}}e.SingleCursorState=l;class s{constructor(a,o,g){this._editOperationResultBrand=void 0,this.type=a,this.commands=o,this.shouldPushStackElementBefore=g.shouldPushStackElementBefore,this.shouldPushStackElementAfter=g.shouldPushStackElementAfter}}e.EditOperationResult=s;function d(n){return n==="'"||n==='"'||n==="`"}e.isQuote=d}),define(ae[1277],le([1,0,240,50,20]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColumnSelection=void 0;class A{static columnSelect(E,I,b,S,C,r){const u=Math.abs(C-b)+1,i=b>C,f=S>r,c=S<r,l=[];for(let s=0;s<u;s++){const d=b+(i?-s:s),n=E.columnFromVisibleColumn(I,d,S),a=E.columnFromVisibleColumn(I,d,r),o=E.visibleColumnFromColumn(I,new p.Position(d,n)),g=E.visibleColumnFromColumn(I,new p.Position(d,a));c&&(o>r||g<S)||f&&(g>S||o<r)||l.push(new t.SingleCursorState(new R.Range(d,n,d,n),0,new p.Position(d,a),0))}if(l.length===0)for(let s=0;s<u;s++){const d=b+(i?-s:s),n=I.getLineMaxColumn(d);l.push(new t.SingleCursorState(new R.Range(d,n,d,n),0,new p.Position(d,n),0))}return{viewStates:l,reversed:i,fromLineNumber:b,fromVisualColumn:S,toLineNumber:C,toVisualColumn:r}}static columnSelectLeft(E,I,b){let S=b.toViewVisualColumn;return S>0&&S--,A.columnSelect(E,I,b.fromViewLineNumber,b.fromViewVisualColumn,b.toViewLineNumber,S)}static columnSelectRight(E,I,b){let S=0;const C=Math.min(b.fromViewLineNumber,b.toViewLineNumber),r=Math.max(b.fromViewLineNumber,b.toViewLineNumber);for(let i=C;i<=r;i++){const f=I.getLineMaxColumn(i),c=E.visibleColumnFromColumn(I,new p.Position(i,f));S=Math.max(S,c)}let u=b.toViewVisualColumn;return u<S&&u++,this.columnSelect(E,I,b.fromViewLineNumber,b.fromViewVisualColumn,b.toViewLineNumber,u)}static columnSelectUp(E,I,b,S){const C=S?E.pageSize:1,r=Math.max(1,b.toViewLineNumber-C);return this.columnSelect(E,I,b.fromViewLineNumber,b.fromViewVisualColumn,r,b.toViewVisualColumn)}static columnSelectDown(E,I,b,S){const C=S?E.pageSize:1,r=Math.min(I.getLineCount(),b.toViewLineNumber+C);return this.columnSelect(E,I,b.fromViewLineNumber,b.fromViewVisualColumn,r,b.toViewVisualColumn)}}e.ColumnSelection=A}),define(ae[587],le([1,0,240,251,50,20,28,768]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveOperations=e.CursorPosition=void 0;class I{constructor(C,r,u){this._cursorPositionBrand=void 0,this.lineNumber=C,this.column=r,this.leftoverVisibleColumns=u}}e.CursorPosition=I;class b{static leftPosition(C,r){if(r.column>C.getLineMinColumn(r.lineNumber))return r.delta(void 0,-k.prevCharLength(C.getLineContent(r.lineNumber),r.column-1));if(r.lineNumber>1){const u=r.lineNumber-1;return new R.Position(u,C.getLineMaxColumn(u))}else return r}static leftPositionAtomicSoftTabs(C,r,u){if(r.column<=C.getLineIndentColumn(r.lineNumber)){const i=C.getLineMinColumn(r.lineNumber),f=C.getLineContent(r.lineNumber),c=E.AtomicTabMoveOperations.atomicPosition(f,r.column-1,u,0);if(c!==-1&&c+1>=i)return new R.Position(r.lineNumber,c+1)}return this.leftPosition(C,r)}static left(C,r,u){const i=C.stickyTabStops?b.leftPositionAtomicSoftTabs(r,u,C.tabSize):b.leftPosition(r,u);return new I(i.lineNumber,i.column,0)}static moveLeft(C,r,u,i,f){let c,l;if(u.hasSelection()&&!i)c=u.selection.startLineNumber,l=u.selection.startColumn;else{const s=u.position.delta(void 0,-(f-1)),d=r.normalizePosition(b.clipPositionColumn(s,r),0),n=b.left(C,r,d);c=n.lineNumber,l=n.column}return u.move(i,c,l,0)}static clipPositionColumn(C,r){return new R.Position(C.lineNumber,b.clipRange(C.column,r.getLineMinColumn(C.lineNumber),r.getLineMaxColumn(C.lineNumber)))}static clipRange(C,r,u){return C<r?r:C>u?u:C}static rightPosition(C,r,u){return u<C.getLineMaxColumn(r)?u=u+k.nextCharLength(C.getLineContent(r),u-1):r<C.getLineCount()&&(r=r+1,u=C.getLineMinColumn(r)),new R.Position(r,u)}static rightPositionAtomicSoftTabs(C,r,u,i,f){if(u<C.getLineIndentColumn(r)){const c=C.getLineContent(r),l=E.AtomicTabMoveOperations.atomicPosition(c,u-1,i,1);if(l!==-1)return new R.Position(r,l+1)}return this.rightPosition(C,r,u)}static right(C,r,u){const i=C.stickyTabStops?b.rightPositionAtomicSoftTabs(r,u.lineNumber,u.column,C.tabSize,C.indentSize):b.rightPosition(r,u.lineNumber,u.column);return new I(i.lineNumber,i.column,0)}static moveRight(C,r,u,i,f){let c,l;if(u.hasSelection()&&!i)c=u.selection.endLineNumber,l=u.selection.endColumn;else{const s=u.position.delta(void 0,f-1),d=r.normalizePosition(b.clipPositionColumn(s,r),1),n=b.right(C,r,d);c=n.lineNumber,l=n.column}return u.move(i,c,l,0)}static vertical(C,r,u,i,f,c,l,s){const d=p.CursorColumns.visibleColumnFromColumn(r.getLineContent(u),i,C.tabSize)+f,n=r.getLineCount(),a=u===1&&i===1,o=u===n&&i===r.getLineMaxColumn(u),g=c<u?a:o;if(u=c,u<1?(u=1,l?i=r.getLineMinColumn(u):i=Math.min(r.getLineMaxColumn(u),i)):u>n?(u=n,l?i=r.getLineMaxColumn(u):i=Math.min(r.getLineMaxColumn(u),i)):i=C.columnFromVisibleColumn(r,u,d),g?f=0:f=d-p.CursorColumns.visibleColumnFromColumn(r.getLineContent(u),i,C.tabSize),s!==void 0){const h=new R.Position(u,i),v=r.normalizePosition(h,s);f=f+(i-v.column),u=v.lineNumber,i=v.column}return new I(u,i,f)}static down(C,r,u,i,f,c,l){return this.vertical(C,r,u,i,f,u+c,l,4)}static moveDown(C,r,u,i,f){let c,l;u.hasSelection()&&!i?(c=u.selection.endLineNumber,l=u.selection.endColumn):(c=u.position.lineNumber,l=u.position.column);const s=b.down(C,r,c,l,u.leftoverVisibleColumns,f,!0);return u.move(i,s.lineNumber,s.column,s.leftoverVisibleColumns)}static translateDown(C,r,u){const i=u.selection,f=b.down(C,r,i.selectionStartLineNumber,i.selectionStartColumn,u.selectionStartLeftoverVisibleColumns,1,!1),c=b.down(C,r,i.positionLineNumber,i.positionColumn,u.leftoverVisibleColumns,1,!1);return new t.SingleCursorState(new A.Range(f.lineNumber,f.column,f.lineNumber,f.column),f.leftoverVisibleColumns,new R.Position(c.lineNumber,c.column),c.leftoverVisibleColumns)}static up(C,r,u,i,f,c,l){return this.vertical(C,r,u,i,f,u-c,l,3)}static moveUp(C,r,u,i,f){let c,l;u.hasSelection()&&!i?(c=u.selection.startLineNumber,l=u.selection.startColumn):(c=u.position.lineNumber,l=u.position.column);const s=b.up(C,r,c,l,u.leftoverVisibleColumns,f,!0);return u.move(i,s.lineNumber,s.column,s.leftoverVisibleColumns)}static translateUp(C,r,u){const i=u.selection,f=b.up(C,r,i.selectionStartLineNumber,i.selectionStartColumn,u.selectionStartLeftoverVisibleColumns,1,!1),c=b.up(C,r,i.positionLineNumber,i.positionColumn,u.leftoverVisibleColumns,1,!1);return new t.SingleCursorState(new A.Range(f.lineNumber,f.column,f.lineNumber,f.column),f.leftoverVisibleColumns,new R.Position(c.lineNumber,c.column),c.leftoverVisibleColumns)}static _isBlankLine(C,r){return C.getLineFirstNonWhitespaceColumn(r)===0}static moveToPrevBlankLine(C,r,u,i){let f=u.position.lineNumber;for(;f>1&&this._isBlankLine(r,f);)f--;for(;f>1&&!this._isBlankLine(r,f);)f--;return u.move(i,f,r.getLineMinColumn(f),0)}static moveToNextBlankLine(C,r,u,i){const f=r.getLineCount();let c=u.position.lineNumber;for(;c<f&&this._isBlankLine(r,c);)c++;for(;c<f&&!this._isBlankLine(r,c);)c++;return u.move(i,c,r.getLineMinColumn(c),0)}static moveToBeginningOfLine(C,r,u,i){const f=u.position.lineNumber,c=r.getLineMinColumn(f),l=r.getLineFirstNonWhitespaceColumn(f)||c;let s;return u.position.column===l?s=c:s=l,u.move(i,f,s,0)}static moveToEndOfLine(C,r,u,i,f){const c=u.position.lineNumber,l=r.getLineMaxColumn(c);return u.move(i,c,l,f?1073741824-l:0)}static moveToBeginningOfBuffer(C,r,u,i){return u.move(i,1,1,0)}static moveToEndOfBuffer(C,r,u,i){const f=r.getLineCount(),c=r.getLineMaxColumn(f);return u.move(i,f,c,0)}}e.MoveOperations=b}),define(ae[588],le([1,0,28,361,240,251,587,20,50]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteOperations=void 0;class b{static deleteRight(C,r,u,i){const f=[];let c=C!==3;for(let l=0,s=i.length;l<s;l++){const d=i[l];let n=d;if(n.isEmpty()){const a=d.getPosition(),o=k.MoveOperations.right(r,u,a);n=new E.Range(o.lineNumber,o.column,a.lineNumber,a.column)}if(n.isEmpty()){f[l]=null;continue}n.startLineNumber!==n.endLineNumber&&(c=!0),f[l]=new p.ReplaceCommand(n,"")}return[c,f]}static isAutoClosingPairDelete(C,r,u,i,f,c,l){if(r==="never"&&u==="never"||C==="never")return!1;for(let s=0,d=c.length;s<d;s++){const n=c[s],a=n.getPosition();if(!n.isEmpty())return!1;const o=f.getLineContent(a.lineNumber);if(a.column<2||a.column>=o.length+1)return!1;const g=o.charAt(a.column-2),h=i.get(g);if(!h)return!1;if((0,R.isQuote)(g)){if(u==="never")return!1}else if(r==="never")return!1;const v=o.charAt(a.column-1);let m=!1;for(const w of h)w.open===g&&w.close===v&&(m=!0);if(!m)return!1;if(C==="auto"){let w=!1;for(let D=0,y=l.length;D<y;D++){const T=l[D];if(a.lineNumber===T.startLineNumber&&a.column===T.startColumn){w=!0;break}}if(!w)return!1}}return!0}static _runAutoClosingPairDelete(C,r,u){const i=[];for(let f=0,c=u.length;f<c;f++){const l=u[f].getPosition(),s=new E.Range(l.lineNumber,l.column-1,l.lineNumber,l.column+1);i[f]=new p.ReplaceCommand(s,"")}return[!0,i]}static deleteLeft(C,r,u,i,f){if(this.isAutoClosingPairDelete(r.autoClosingDelete,r.autoClosingBrackets,r.autoClosingQuotes,r.autoClosingPairs.autoClosingPairsOpenByEnd,u,i,f))return this._runAutoClosingPairDelete(r,u,i);const c=[];let l=C!==2;for(let s=0,d=i.length;s<d;s++){const n=b.getDeleteRange(i[s],u,r);if(n.isEmpty()){c[s]=null;continue}n.startLineNumber!==n.endLineNumber&&(l=!0),c[s]=new p.ReplaceCommand(n,"")}return[l,c]}static getDeleteRange(C,r,u){if(!C.isEmpty())return C;const i=C.getPosition();if(u.useTabStops&&i.column>1){const f=r.getLineContent(i.lineNumber),c=t.firstNonWhitespaceIndex(f),l=c===-1?f.length+1:c+1;if(i.column<=l){const s=u.visibleColumnFromColumn(r,i),d=A.CursorColumns.prevIndentTabStop(s,u.indentSize),n=u.columnFromVisibleColumn(r,i.lineNumber,d);return new E.Range(i.lineNumber,n,i.lineNumber,i.column)}}return E.Range.fromPositions(b.getPositionAfterDeleteLeft(i,r),i)}static getPositionAfterDeleteLeft(C,r){if(C.column>1){const u=t.getLeftDeleteOffset(C.column-1,r.getLineContent(C.lineNumber));return C.with(void 0,u+1)}else if(C.lineNumber>1){const u=C.lineNumber-1;return new I.Position(u,r.getLineMaxColumn(u))}else return C}static cut(C,r,u){const i=[];let f=null;u.sort((c,l)=>I.Position.compare(c.getStartPosition(),l.getEndPosition()));for(let c=0,l=u.length;c<l;c++){const s=u[c];if(s.isEmpty())if(C.emptySelectionClipboard){const d=s.getPosition();let n,a,o,g;d.lineNumber<r.getLineCount()?(n=d.lineNumber,a=1,o=d.lineNumber+1,g=1):d.lineNumber>1&&f?.endLineNumber!==d.lineNumber?(n=d.lineNumber-1,a=r.getLineMaxColumn(d.lineNumber-1),o=d.lineNumber,g=r.getLineMaxColumn(d.lineNumber)):(n=d.lineNumber,a=1,o=d.lineNumber,g=r.getLineMaxColumn(d.lineNumber));const h=new E.Range(n,a,o,g);f=h,h.isEmpty()?i[c]=null:i[c]=new p.ReplaceCommand(h,"")}else i[c]=null;else i[c]=new p.ReplaceCommand(s,"")}return new R.EditOperationResult(0,i,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=b}),define(ae[492],le([1,0,28,240,588,409,50,20]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=e.WordNavigationType=void 0;var I;(function(u){u[u.None=0]="None",u[u.Regular=1]="Regular",u[u.Separator=2]="Separator"})(I||(I={}));var b;(function(u){u[u.WordStart=0]="WordStart",u[u.WordStartFast=1]="WordStartFast",u[u.WordEnd=2]="WordEnd",u[u.WordAccessibility=3]="WordAccessibility"})(b=e.WordNavigationType||(e.WordNavigationType={}));class S{static _createWord(i,f,c,l,s){return{start:l,end:s,wordType:f,nextCharClass:c}}static _findPreviousWordOnLine(i,f,c){const l=f.getLineContent(c.lineNumber);return this._doFindPreviousWordOnLine(l,i,c)}static _doFindPreviousWordOnLine(i,f,c){let l=0;for(let s=c.column-2;s>=0;s--){const d=i.charCodeAt(s),n=f.get(d);if(n===0){if(l===2)return this._createWord(i,l,n,s+1,this._findEndOfWord(i,f,l,s+1));l=1}else if(n===2){if(l===1)return this._createWord(i,l,n,s+1,this._findEndOfWord(i,f,l,s+1));l=2}else if(n===1&&l!==0)return this._createWord(i,l,n,s+1,this._findEndOfWord(i,f,l,s+1))}return l!==0?this._createWord(i,l,1,0,this._findEndOfWord(i,f,l,0)):null}static _findEndOfWord(i,f,c,l){const s=i.length;for(let d=l;d<s;d++){const n=i.charCodeAt(d),a=f.get(n);if(a===1||c===1&&a===2||c===2&&a===0)return d}return s}static _findNextWordOnLine(i,f,c){const l=f.getLineContent(c.lineNumber);return this._doFindNextWordOnLine(l,i,c)}static _doFindNextWordOnLine(i,f,c){let l=0;const s=i.length;for(let d=c.column-1;d<s;d++){const n=i.charCodeAt(d),a=f.get(n);if(a===0){if(l===2)return this._createWord(i,l,a,this._findStartOfWord(i,f,l,d-1),d);l=1}else if(a===2){if(l===1)return this._createWord(i,l,a,this._findStartOfWord(i,f,l,d-1),d);l=2}else if(a===1&&l!==0)return this._createWord(i,l,a,this._findStartOfWord(i,f,l,d-1),d)}return l!==0?this._createWord(i,l,1,this._findStartOfWord(i,f,l,s-1),s):null}static _findStartOfWord(i,f,c,l){for(let s=l;s>=0;s--){const d=i.charCodeAt(s),n=f.get(d);if(n===1||c===1&&n===2||c===2&&n===0)return s+1}return 0}static moveWordLeft(i,f,c,l){let s=c.lineNumber,d=c.column;d===1&&s>1&&(s=s-1,d=f.getLineMaxColumn(s));let n=S._findPreviousWordOnLine(i,f,new k.Position(s,d));if(l===0)return new k.Position(s,n?n.start+1:1);if(l===1)return n&&n.wordType===2&&n.end-n.start===1&&n.nextCharClass===0&&(n=S._findPreviousWordOnLine(i,f,new k.Position(s,n.start+1))),new k.Position(s,n?n.start+1:1);if(l===3){for(;n&&n.wordType===2;)n=S._findPreviousWordOnLine(i,f,new k.Position(s,n.start+1));return new k.Position(s,n?n.start+1:1)}return n&&d<=n.end+1&&(n=S._findPreviousWordOnLine(i,f,new k.Position(s,n.start+1))),new k.Position(s,n?n.end+1:1)}static _moveWordPartLeft(i,f){const c=f.lineNumber,l=i.getLineMaxColumn(c);if(f.column===1)return c>1?new k.Position(c-1,i.getLineMaxColumn(c-1)):f;const s=i.getLineContent(c);for(let d=f.column-1;d>1;d--){const n=s.charCodeAt(d-2),a=s.charCodeAt(d-1);if(n===95&&a!==95)return new k.Position(c,d);if(n===45&&a!==45)return new k.Position(c,d);if((t.isLowerAsciiLetter(n)||t.isAsciiDigit(n))&&t.isUpperAsciiLetter(a))return new k.Position(c,d);if(t.isUpperAsciiLetter(n)&&t.isUpperAsciiLetter(a)&&d+1<l){const o=s.charCodeAt(d);if(t.isLowerAsciiLetter(o)||t.isAsciiDigit(o))return new k.Position(c,d)}}return new k.Position(c,1)}static moveWordRight(i,f,c,l){let s=c.lineNumber,d=c.column,n=!1;d===f.getLineMaxColumn(s)&&s<f.getLineCount()&&(n=!0,s=s+1,d=1);let a=S._findNextWordOnLine(i,f,new k.Position(s,d));if(l===2)a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=S._findNextWordOnLine(i,f,new k.Position(s,a.end+1))),a?d=a.end+1:d=f.getLineMaxColumn(s);else if(l===3){for(n&&(d=0);a&&(a.wordType===2||a.start+1<=d);)a=S._findNextWordOnLine(i,f,new k.Position(s,a.end+1));a?d=a.start+1:d=f.getLineMaxColumn(s)}else a&&!n&&d>=a.start+1&&(a=S._findNextWordOnLine(i,f,new k.Position(s,a.end+1))),a?d=a.start+1:d=f.getLineMaxColumn(s);return new k.Position(s,d)}static _moveWordPartRight(i,f){const c=f.lineNumber,l=i.getLineMaxColumn(c);if(f.column===l)return c<i.getLineCount()?new k.Position(c+1,1):f;const s=i.getLineContent(c);for(let d=f.column+1;d<l;d++){const n=s.charCodeAt(d-2),a=s.charCodeAt(d-1);if(n!==95&&a===95)return new k.Position(c,d);if(n!==45&&a===45)return new k.Position(c,d);if((t.isLowerAsciiLetter(n)||t.isAsciiDigit(n))&&t.isUpperAsciiLetter(a))return new k.Position(c,d);if(t.isUpperAsciiLetter(n)&&t.isUpperAsciiLetter(a)&&d+1<l){const o=s.charCodeAt(d);if(t.isLowerAsciiLetter(o)||t.isAsciiDigit(o))return new k.Position(c,d)}}return new k.Position(c,l)}static _deleteWordLeftWhitespace(i,f){const c=i.getLineContent(f.lineNumber),l=f.column-2,s=t.lastNonWhitespaceIndex(c,l);return s+1<l?new E.Range(f.lineNumber,s+2,f.lineNumber,f.column):null}static deleteWordLeft(i,f){const c=i.wordSeparators,l=i.model,s=i.selection,d=i.whitespaceHeuristics;if(!s.isEmpty())return s;if(R.DeleteOperations.isAutoClosingPairDelete(i.autoClosingDelete,i.autoClosingBrackets,i.autoClosingQuotes,i.autoClosingPairs.autoClosingPairsOpenByEnd,i.model,[i.selection],i.autoClosedCharacters)){const h=i.selection.getPosition();return new E.Range(h.lineNumber,h.column-1,h.lineNumber,h.column+1)}const n=new k.Position(s.positionLineNumber,s.positionColumn);let a=n.lineNumber,o=n.column;if(a===1&&o===1)return null;if(d){const h=this._deleteWordLeftWhitespace(l,n);if(h)return h}let g=S._findPreviousWordOnLine(c,l,n);return f===0?g?o=g.start+1:o>1?o=1:(a--,o=l.getLineMaxColumn(a)):(g&&o<=g.end+1&&(g=S._findPreviousWordOnLine(c,l,new k.Position(a,g.start+1))),g?o=g.end+1:o>1?o=1:(a--,o=l.getLineMaxColumn(a))),new E.Range(a,o,n.lineNumber,n.column)}static deleteInsideWord(i,f,c){if(!c.isEmpty())return c;const l=new k.Position(c.positionLineNumber,c.positionColumn),s=this._deleteInsideWordWhitespace(f,l);return s||this._deleteInsideWordDetermineDeleteRange(i,f,l)}static _charAtIsWhitespace(i,f){const c=i.charCodeAt(f);return c===32||c===9}static _deleteInsideWordWhitespace(i,f){const c=i.getLineContent(f.lineNumber),l=c.length;if(l===0)return null;let s=Math.max(f.column-2,0);if(!this._charAtIsWhitespace(c,s))return null;let d=Math.min(f.column-1,l-1);if(!this._charAtIsWhitespace(c,d))return null;for(;s>0&&this._charAtIsWhitespace(c,s-1);)s--;for(;d+1<l&&this._charAtIsWhitespace(c,d+1);)d++;return new E.Range(f.lineNumber,s+1,f.lineNumber,d+2)}static _deleteInsideWordDetermineDeleteRange(i,f,c){const l=f.getLineContent(c.lineNumber),s=l.length;if(s===0)return c.lineNumber>1?new E.Range(c.lineNumber-1,f.getLineMaxColumn(c.lineNumber-1),c.lineNumber,1):c.lineNumber<f.getLineCount()?new E.Range(c.lineNumber,1,c.lineNumber+1,1):new E.Range(c.lineNumber,1,c.lineNumber,1);const d=h=>h.start+1<=c.column&&c.column<=h.end+1,n=(h,v)=>(h=Math.min(h,c.column),v=Math.max(v,c.column),new E.Range(c.lineNumber,h,c.lineNumber,v)),a=h=>{let v=h.start+1,m=h.end+1,w=!1;for(;m-1<s&&this._charAtIsWhitespace(l,m-1);)w=!0,m++;if(!w)for(;v>1&&this._charAtIsWhitespace(l,v-2);)v--;return n(v,m)},o=S._findPreviousWordOnLine(i,f,c);if(o&&d(o))return a(o);const g=S._findNextWordOnLine(i,f,c);return g&&d(g)?a(g):o&&g?n(o.end+1,g.start+1):o?n(o.start+1,o.end+1):g?n(g.start+1,g.end+1):n(1,s+1)}static _deleteWordPartLeft(i,f){if(!f.isEmpty())return f;const c=f.getPosition(),l=S._moveWordPartLeft(i,c);return new E.Range(c.lineNumber,c.column,l.lineNumber,l.column)}static _findFirstNonWhitespaceChar(i,f){const c=i.length;for(let l=f;l<c;l++){const s=i.charAt(l);if(s!==" "&&s!==" ")return l}return c}static _deleteWordRightWhitespace(i,f){const c=i.getLineContent(f.lineNumber),l=f.column-1,s=this._findFirstNonWhitespaceChar(c,l);return l+1<s?new E.Range(f.lineNumber,f.column,f.lineNumber,s+1):null}static deleteWordRight(i,f){const c=i.wordSeparators,l=i.model,s=i.selection,d=i.whitespaceHeuristics;if(!s.isEmpty())return s;const n=new k.Position(s.positionLineNumber,s.positionColumn);let a=n.lineNumber,o=n.column;const g=l.getLineCount(),h=l.getLineMaxColumn(a);if(a===g&&o===h)return null;if(d){const m=this._deleteWordRightWhitespace(l,n);if(m)return m}let v=S._findNextWordOnLine(c,l,n);return f===2?v?o=v.end+1:o<h||a===g?o=h:(a++,v=S._findNextWordOnLine(c,l,new k.Position(a,1)),v?o=v.start+1:o=l.getLineMaxColumn(a)):(v&&o>=v.start+1&&(v=S._findNextWordOnLine(c,l,new k.Position(a,v.end+1))),v?o=v.start+1:o<h||a===g?o=h:(a++,v=S._findNextWordOnLine(c,l,new k.Position(a,1)),v?o=v.start+1:o=l.getLineMaxColumn(a))),new E.Range(a,o,n.lineNumber,n.column)}static _deleteWordPartRight(i,f){if(!f.isEmpty())return f;const c=f.getPosition(),l=S._moveWordPartRight(i,c);return new E.Range(c.lineNumber,c.column,l.lineNumber,l.column)}static _createWordAtPosition(i,f,c){const l=new E.Range(f,c.start+1,f,c.end+1);return{word:i.getValueInRange(l),startColumn:l.startColumn,endColumn:l.endColumn}}static getWordAtPosition(i,f,c){const l=(0,A.getMapForWordSeparators)(f),s=S._findPreviousWordOnLine(l,i,c);if(s&&s.wordType===1&&s.start<=c.column-1&&c.column-1<=s.end)return S._createWordAtPosition(i,c.lineNumber,s);const d=S._findNextWordOnLine(l,i,c);return d&&d.wordType===1&&d.start<=c.column-1&&c.column-1<=d.end?S._createWordAtPosition(i,c.lineNumber,d):null}static word(i,f,c,l,s){const d=(0,A.getMapForWordSeparators)(i.wordSeparators),n=S._findPreviousWordOnLine(d,f,s),a=S._findNextWordOnLine(d,f,s);if(!l){let m,w;return n&&n.wordType===1&&n.start<=s.column-1&&s.column-1<=n.end?(m=n.start+1,w=n.end+1):a&&a.wordType===1&&a.start<=s.column-1&&s.column-1<=a.end?(m=a.start+1,w=a.end+1):(n?m=n.end+1:m=1,a?w=a.start+1:w=f.getLineMaxColumn(s.lineNumber)),new p.SingleCursorState(new E.Range(s.lineNumber,m,s.lineNumber,w),0,new k.Position(s.lineNumber,w),0)}let o,g;n&&n.wordType===1&&n.start<s.column-1&&s.column-1<n.end?(o=n.start+1,g=n.end+1):a&&a.wordType===1&&a.start<s.column-1&&s.column-1<a.end?(o=a.start+1,g=a.end+1):(o=s.column,g=s.column);const h=s.lineNumber;let v;if(c.selectionStart.containsPosition(s))v=c.selectionStart.endColumn;else if(s.isBeforeOrEqual(c.selectionStart.getStartPosition())){v=o;const m=new k.Position(h,v);c.selectionStart.containsPosition(m)&&(v=c.selectionStart.endColumn)}else{v=g;const m=new k.Position(h,v);c.selectionStart.containsPosition(m)&&(v=c.selectionStart.startColumn)}return c.move(!0,h,v,0)}}e.WordOperations=S;class C extends S{static deleteWordPartLeft(i){const f=r([S.deleteWordLeft(i,0),S.deleteWordLeft(i,2),S._deleteWordPartLeft(i.model,i.selection)]);return f.sort(E.Range.compareRangesUsingEnds),f[2]}static deleteWordPartRight(i){const f=r([S.deleteWordRight(i,0),S.deleteWordRight(i,2),S._deleteWordPartRight(i.model,i.selection)]);return f.sort(E.Range.compareRangesUsingStarts),f[0]}static moveWordPartLeft(i,f,c){const l=r([S.moveWordLeft(i,f,c,0),S.moveWordLeft(i,f,c,2),S._moveWordPartLeft(f,c)]);return l.sort(k.Position.compare),l[2]}static moveWordPartRight(i,f,c){const l=r([S.moveWordRight(i,f,c,0),S.moveWordRight(i,f,c,2),S._moveWordPartRight(f,c)]);return l.sort(k.Position.compare),l[0]}}e.WordPartOperations=C;function r(u){return u.filter(i=>Boolean(i))}}),define(ae[589],le([1,0,13,240,587,492,50,20]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class I{static addCursorDown(C,r,u){const i=[];let f=0;for(let c=0,l=r.length;c<l;c++){const s=r[c];i[f++]=new p.CursorState(s.modelState,s.viewState),u?i[f++]=p.CursorState.fromModelState(R.MoveOperations.translateDown(C.cursorConfig,C.model,s.modelState)):i[f++]=p.CursorState.fromViewState(R.MoveOperations.translateDown(C.cursorConfig,C,s.viewState))}return i}static addCursorUp(C,r,u){const i=[];let f=0;for(let c=0,l=r.length;c<l;c++){const s=r[c];i[f++]=new p.CursorState(s.modelState,s.viewState),u?i[f++]=p.CursorState.fromModelState(R.MoveOperations.translateUp(C.cursorConfig,C.model,s.modelState)):i[f++]=p.CursorState.fromViewState(R.MoveOperations.translateUp(C.cursorConfig,C,s.viewState))}return i}static moveToBeginningOfLine(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f];i[f]=this._moveToLineStart(C,l,u)}return i}static _moveToLineStart(C,r,u){const i=r.viewState.position.column,f=r.modelState.position.column,c=i===f,l=r.viewState.position.lineNumber,s=C.getLineFirstNonWhitespaceColumn(l);return!c&&!(i===s)?this._moveToLineStartByView(C,r,u):this._moveToLineStartByModel(C,r,u)}static _moveToLineStartByView(C,r,u){return p.CursorState.fromViewState(R.MoveOperations.moveToBeginningOfLine(C.cursorConfig,C,r.viewState,u))}static _moveToLineStartByModel(C,r,u){return p.CursorState.fromModelState(R.MoveOperations.moveToBeginningOfLine(C.cursorConfig,C.model,r.modelState,u))}static moveToEndOfLine(C,r,u,i){const f=[];for(let c=0,l=r.length;c<l;c++){const s=r[c];f[c]=this._moveToLineEnd(C,s,u,i)}return f}static _moveToLineEnd(C,r,u,i){const f=r.viewState.position,c=C.getLineMaxColumn(f.lineNumber),l=f.column===c,s=r.modelState.position,d=C.model.getLineMaxColumn(s.lineNumber),n=c-f.column===d-s.column;return l||n?this._moveToLineEndByModel(C,r,u,i):this._moveToLineEndByView(C,r,u,i)}static _moveToLineEndByView(C,r,u,i){return p.CursorState.fromViewState(R.MoveOperations.moveToEndOfLine(C.cursorConfig,C,r.viewState,u,i))}static _moveToLineEndByModel(C,r,u,i){return p.CursorState.fromModelState(R.MoveOperations.moveToEndOfLine(C.cursorConfig,C.model,r.modelState,u,i))}static expandLineSelection(C,r){const u=[];for(let i=0,f=r.length;i<f;i++){const c=r[i],l=c.modelState.selection.startLineNumber,s=C.model.getLineCount();let d=c.modelState.selection.endLineNumber,n;d===s?n=C.model.getLineMaxColumn(s):(d++,n=1),u[i]=p.CursorState.fromModelState(new p.SingleCursorState(new E.Range(l,1,l,1),0,new k.Position(d,n),0))}return u}static moveToBeginningOfBuffer(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f];i[f]=p.CursorState.fromModelState(R.MoveOperations.moveToBeginningOfBuffer(C.cursorConfig,C.model,l.modelState,u))}return i}static moveToEndOfBuffer(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f];i[f]=p.CursorState.fromModelState(R.MoveOperations.moveToEndOfBuffer(C.cursorConfig,C.model,l.modelState,u))}return i}static selectAll(C,r){const u=C.model.getLineCount(),i=C.model.getLineMaxColumn(u);return p.CursorState.fromModelState(new p.SingleCursorState(new E.Range(1,1,1,1),0,new k.Position(u,i),0))}static line(C,r,u,i,f){const c=C.model.validatePosition(i),l=f?C.coordinatesConverter.validateViewPosition(new k.Position(f.lineNumber,f.column),c):C.coordinatesConverter.convertModelPositionToViewPosition(c);if(!u||!r.modelState.hasSelection()){const d=C.model.getLineCount();let n=c.lineNumber+1,a=1;return n>d&&(n=d,a=C.model.getLineMaxColumn(n)),p.CursorState.fromModelState(new p.SingleCursorState(new E.Range(c.lineNumber,1,n,a),0,new k.Position(n,a),0))}const s=r.modelState.selectionStart.getStartPosition().lineNumber;if(c.lineNumber<s)return p.CursorState.fromViewState(r.viewState.move(r.modelState.hasSelection(),l.lineNumber,1,0));if(c.lineNumber>s){const d=C.getLineCount();let n=l.lineNumber+1,a=1;return n>d&&(n=d,a=C.getLineMaxColumn(n)),p.CursorState.fromViewState(r.viewState.move(r.modelState.hasSelection(),n,a,0))}else{const d=r.modelState.selectionStart.getEndPosition();return p.CursorState.fromModelState(r.modelState.move(r.modelState.hasSelection(),d.lineNumber,d.column,0))}}static word(C,r,u,i){const f=C.model.validatePosition(i);return p.CursorState.fromModelState(A.WordOperations.word(C.cursorConfig,C.model,r.modelState,u,f))}static cancelSelection(C,r){if(!r.modelState.hasSelection())return new p.CursorState(r.modelState,r.viewState);const u=r.viewState.position.lineNumber,i=r.viewState.position.column;return p.CursorState.fromViewState(new p.SingleCursorState(new E.Range(u,i,u,i),0,new k.Position(u,i),0))}static moveTo(C,r,u,i,f){const c=C.model.validatePosition(i),l=f?C.coordinatesConverter.validateViewPosition(new k.Position(f.lineNumber,f.column),c):C.coordinatesConverter.convertModelPositionToViewPosition(c);return p.CursorState.fromViewState(r.viewState.move(u,l.lineNumber,l.column,0))}static simpleMove(C,r,u,i,f,c){switch(u){case 0:return c===4?this._moveHalfLineLeft(C,r,i):this._moveLeft(C,r,i,f);case 1:return c===4?this._moveHalfLineRight(C,r,i):this._moveRight(C,r,i,f);case 2:return c===2?this._moveUpByViewLines(C,r,i,f):this._moveUpByModelLines(C,r,i,f);case 3:return c===2?this._moveDownByViewLines(C,r,i,f):this._moveDownByModelLines(C,r,i,f);case 4:return c===2?r.map(l=>p.CursorState.fromViewState(R.MoveOperations.moveToPrevBlankLine(C.cursorConfig,C,l.viewState,i))):r.map(l=>p.CursorState.fromModelState(R.MoveOperations.moveToPrevBlankLine(C.cursorConfig,C.model,l.modelState,i)));case 5:return c===2?r.map(l=>p.CursorState.fromViewState(R.MoveOperations.moveToNextBlankLine(C.cursorConfig,C,l.viewState,i))):r.map(l=>p.CursorState.fromModelState(R.MoveOperations.moveToNextBlankLine(C.cursorConfig,C.model,l.modelState,i)));case 6:return this._moveToViewMinColumn(C,r,i);case 7:return this._moveToViewFirstNonWhitespaceColumn(C,r,i);case 8:return this._moveToViewCenterColumn(C,r,i);case 9:return this._moveToViewMaxColumn(C,r,i);case 10:return this._moveToViewLastNonWhitespaceColumn(C,r,i);default:return null}}static viewportMove(C,r,u,i,f){const c=C.getCompletelyVisibleViewRange(),l=C.coordinatesConverter.convertViewRangeToModelRange(c);switch(u){case 11:{const s=this._firstLineNumberInRange(C.model,l,f),d=C.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(C,r[0],i,s,d)]}case 13:{const s=this._lastLineNumberInRange(C.model,l,f),d=C.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(C,r[0],i,s,d)]}case 12:{const s=Math.round((l.startLineNumber+l.endLineNumber)/2),d=C.model.getLineFirstNonWhitespaceColumn(s);return[this._moveToModelPosition(C,r[0],i,s,d)]}case 14:{const s=[];for(let d=0,n=r.length;d<n;d++){const a=r[d];s[d]=this.findPositionInViewportIfOutside(C,a,c,i)}return s}default:return null}}static findPositionInViewportIfOutside(C,r,u,i){const f=r.viewState.position.lineNumber;if(u.startLineNumber<=f&&f<=u.endLineNumber-1)return new p.CursorState(r.modelState,r.viewState);{let c;f>u.endLineNumber-1?c=u.endLineNumber-1:f<u.startLineNumber?c=u.startLineNumber:c=f;const l=R.MoveOperations.vertical(C.cursorConfig,C,f,r.viewState.position.column,r.viewState.leftoverVisibleColumns,c,!1);return p.CursorState.fromViewState(r.viewState.move(i,l.lineNumber,l.column,l.leftoverVisibleColumns))}}static _firstLineNumberInRange(C,r,u){let i=r.startLineNumber;return r.startColumn!==C.getLineMinColumn(i)&&i++,Math.min(r.endLineNumber,i+u-1)}static _lastLineNumberInRange(C,r,u){let i=r.startLineNumber;return r.startColumn!==C.getLineMinColumn(i)&&i++,Math.max(i,r.endLineNumber-u+1)}static _moveLeft(C,r,u,i){return r.map(f=>p.CursorState.fromViewState(R.MoveOperations.moveLeft(C.cursorConfig,C,f.viewState,u,i)))}static _moveHalfLineLeft(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=Math.round(C.getLineContent(s).length/2);i[f]=p.CursorState.fromViewState(R.MoveOperations.moveLeft(C.cursorConfig,C,l.viewState,u,d))}return i}static _moveRight(C,r,u,i){return r.map(f=>p.CursorState.fromViewState(R.MoveOperations.moveRight(C.cursorConfig,C,f.viewState,u,i)))}static _moveHalfLineRight(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=Math.round(C.getLineContent(s).length/2);i[f]=p.CursorState.fromViewState(R.MoveOperations.moveRight(C.cursorConfig,C,l.viewState,u,d))}return i}static _moveDownByViewLines(C,r,u,i){const f=[];for(let c=0,l=r.length;c<l;c++){const s=r[c];f[c]=p.CursorState.fromViewState(R.MoveOperations.moveDown(C.cursorConfig,C,s.viewState,u,i))}return f}static _moveDownByModelLines(C,r,u,i){const f=[];for(let c=0,l=r.length;c<l;c++){const s=r[c];f[c]=p.CursorState.fromModelState(R.MoveOperations.moveDown(C.cursorConfig,C.model,s.modelState,u,i))}return f}static _moveUpByViewLines(C,r,u,i){const f=[];for(let c=0,l=r.length;c<l;c++){const s=r[c];f[c]=p.CursorState.fromViewState(R.MoveOperations.moveUp(C.cursorConfig,C,s.viewState,u,i))}return f}static _moveUpByModelLines(C,r,u,i){const f=[];for(let c=0,l=r.length;c<l;c++){const s=r[c];f[c]=p.CursorState.fromModelState(R.MoveOperations.moveUp(C.cursorConfig,C.model,s.modelState,u,i))}return f}static _moveToViewPosition(C,r,u,i,f){return p.CursorState.fromViewState(r.viewState.move(u,i,f,0))}static _moveToModelPosition(C,r,u,i,f){return p.CursorState.fromModelState(r.modelState.move(u,i,f,0))}static _moveToViewMinColumn(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=C.getLineMinColumn(s);i[f]=this._moveToViewPosition(C,l,u,s,d)}return i}static _moveToViewFirstNonWhitespaceColumn(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=C.getLineFirstNonWhitespaceColumn(s);i[f]=this._moveToViewPosition(C,l,u,s,d)}return i}static _moveToViewCenterColumn(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=Math.round((C.getLineMaxColumn(s)+C.getLineMinColumn(s))/2);i[f]=this._moveToViewPosition(C,l,u,s,d)}return i}static _moveToViewMaxColumn(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=C.getLineMaxColumn(s);i[f]=this._moveToViewPosition(C,l,u,s,d)}return i}static _moveToViewLastNonWhitespaceColumn(C,r,u){const i=[];for(let f=0,c=r.length;f<c;f++){const l=r[f],s=l.viewState.position.lineNumber,d=C.getLineLastNonWhitespaceColumn(s);i[f]=this._moveToViewPosition(C,l,u,s,d)}return i}}e.CursorMoveCommands=I;var b;(function(S){const C=function(f){if(!t.isObject(f))return!1;const c=f;return!(!t.isString(c.to)||!t.isUndefined(c.select)&&!t.isBoolean(c.select)||!t.isUndefined(c.by)&&!t.isString(c.by)||!t.isUndefined(c.value)&&!t.isNumber(c.value))};S.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}}}}]},S.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"},S.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function r(f){if(!f.to)return null;let c;switch(f.to){case S.RawDirection.Left:c=0;break;case S.RawDirection.Right:c=1;break;case S.RawDirection.Up:c=2;break;case S.RawDirection.Down:c=3;break;case S.RawDirection.PrevBlankLine:c=4;break;case S.RawDirection.NextBlankLine:c=5;break;case S.RawDirection.WrappedLineStart:c=6;break;case S.RawDirection.WrappedLineFirstNonWhitespaceCharacter:c=7;break;case S.RawDirection.WrappedLineColumnCenter:c=8;break;case S.RawDirection.WrappedLineEnd:c=9;break;case S.RawDirection.WrappedLineLastNonWhitespaceCharacter:c=10;break;case S.RawDirection.ViewPortTop:c=11;break;case S.RawDirection.ViewPortBottom:c=13;break;case S.RawDirection.ViewPortCenter:c=12;break;case S.RawDirection.ViewPortIfOutside:c=14;break;default:return null}let l=0;switch(f.by){case S.RawUnit.Line:l=1;break;case S.RawUnit.WrappedLine:l=2;break;case S.RawUnit.Character:l=3;break;case S.RawUnit.HalfLine:l=4;break}return{direction:c,unit:l,select:!!f.select,value:f.value||1}}S.parse=r;let u;(function(f){f[f.Left=0]="Left",f[f.Right=1]="Right",f[f.Up=2]="Up",f[f.Down=3]="Down",f[f.PrevBlankLine=4]="PrevBlankLine",f[f.NextBlankLine=5]="NextBlankLine",f[f.WrappedLineStart=6]="WrappedLineStart",f[f.WrappedLineFirstNonWhitespaceCharacter=7]="WrappedLineFirstNonWhitespaceCharacter",f[f.WrappedLineColumnCenter=8]="WrappedLineColumnCenter",f[f.WrappedLineEnd=9]="WrappedLineEnd",f[f.WrappedLineLastNonWhitespaceCharacter=10]="WrappedLineLastNonWhitespaceCharacter",f[f.ViewPortTop=11]="ViewPortTop",f[f.ViewPortCenter=12]="ViewPortCenter",f[f.ViewPortBottom=13]="ViewPortBottom",f[f.ViewPortIfOutside=14]="ViewPortIfOutside"})(u=S.Direction||(S.Direction={}));let i;(function(f){f[f.None=0]="None",f[f.Line=1]="Line",f[f.WrappedLine=2]="WrappedLine",f[f.Character=3]="Character",f[f.HalfLine=4]="HalfLine"})(i=S.Unit||(S.Unit={}))})(b=e.CursorMove||(e.CursorMove={}))}),define(ae[1278],le([1,0,240,50,20,85]),function(J,e,t,p,R,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 R.Range(1,1,1,1),0,new p.Position(1,1),0),new t.SingleCursorState(new R.Range(1,1,1,1),0,new p.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 b=I.model._getTrackedRange(this._selTrackedRange);return A.Selection.fromRange(b,this.modelState.selection.getDirection())}ensureValidState(I){this._setState(I,this.modelState,this.viewState)}setState(I,b,S){this._setState(I,b,S)}static _validatePositionWithCache(I,b,S,C){return b.equals(S)?C:I.normalizePosition(b,2)}static _validateViewState(I,b){const S=b.position,C=b.selectionStart.getStartPosition(),r=b.selectionStart.getEndPosition(),u=I.normalizePosition(S,2),i=this._validatePositionWithCache(I,C,S,u),f=this._validatePositionWithCache(I,r,C,i);return S.equals(u)&&C.equals(i)&&r.equals(f)?b:new t.SingleCursorState(R.Range.fromPositions(i,f),b.selectionStartLeftoverVisibleColumns+C.column-i.column,u,b.leftoverVisibleColumns+S.column-u.column)}_setState(I,b,S){if(S&&(S=k._validateViewState(I.viewModel,S)),b){const C=I.model.validateRange(b.selectionStart),r=b.selectionStart.equalsRange(C)?b.selectionStartLeftoverVisibleColumns:0,u=I.model.validatePosition(b.position),i=b.position.equals(u)?b.leftoverVisibleColumns:0;b=new t.SingleCursorState(C,r,u,i)}else{if(!S)return;const C=I.model.validateRange(I.coordinatesConverter.convertViewRangeToModelRange(S.selectionStart)),r=I.model.validatePosition(I.coordinatesConverter.convertViewPositionToModelPosition(S.position));b=new t.SingleCursorState(C,S.selectionStartLeftoverVisibleColumns,r,S.leftoverVisibleColumns)}if(S){const C=I.coordinatesConverter.validateViewRange(S.selectionStart,b.selectionStart),r=I.coordinatesConverter.validateViewPosition(S.position,b.position);S=new t.SingleCursorState(C,b.selectionStartLeftoverVisibleColumns,r,b.leftoverVisibleColumns)}else{const C=I.coordinatesConverter.convertModelPositionToViewPosition(new p.Position(b.selectionStart.startLineNumber,b.selectionStart.startColumn)),r=I.coordinatesConverter.convertModelPositionToViewPosition(new p.Position(b.selectionStart.endLineNumber,b.selectionStart.endColumn)),u=new R.Range(C.lineNumber,C.column,r.lineNumber,r.column),i=I.coordinatesConverter.convertModelPositionToViewPosition(b.position);S=new t.SingleCursorState(u,b.selectionStartLeftoverVisibleColumns,i,b.leftoverVisibleColumns)}this.modelState=b,this.viewState=S,this._updateTrackedRange(I)}}e.Cursor=k}),define(ae[1279],le([1,0,16,240,1278,50,20,85]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorCollection=void 0;class I{constructor(S){this.context=S,this.cursors=[new R.Cursor(S)],this.lastAddedCursorIndex=0}dispose(){for(const S of this.cursors)S.dispose(this.context)}startTrackingSelections(){for(const S of this.cursors)S.startTrackingSelection(this.context)}stopTrackingSelections(){for(const S of this.cursors)S.stopTrackingSelection(this.context)}updateContext(S){this.context=S}ensureValidState(){for(const S of this.cursors)S.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map(S=>S.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(S=>S.asCursorState())}getViewPositions(){return this.cursors.map(S=>S.viewState.position)}getTopMostViewPosition(){return(0,t.findMinBy)(this.cursors,(0,t.compareBy)(S=>S.viewState.position,A.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,t.findLastMaxBy)(this.cursors,(0,t.compareBy)(S=>S.viewState.position,A.Position.compare)).viewState.position}getSelections(){return this.cursors.map(S=>S.modelState.selection)}getViewSelections(){return this.cursors.map(S=>S.viewState.selection)}setSelections(S){this.setStates(p.CursorState.fromModelSelections(S))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(S){S!==null&&(this.cursors[0].setState(this.context,S[0].modelState,S[0].viewState),this._setSecondaryStates(S.slice(1)))}_setSecondaryStates(S){const C=this.cursors.length-1,r=S.length;if(C<r){const u=r-C;for(let i=0;i<u;i++)this._addSecondaryCursor()}else if(C>r){const u=C-r;for(let i=0;i<u;i++)this._removeSecondaryCursor(this.cursors.length-2)}for(let u=0;u<r;u++)this.cursors[u+1].setState(this.context,S[u].modelState,S[u].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.cursors.push(new R.Cursor(this.context)),this.lastAddedCursorIndex=this.cursors.length-1}getLastAddedCursorIndex(){return this.cursors.length===1||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(S){this.lastAddedCursorIndex>=S+1&&this.lastAddedCursorIndex--,this.cursors[S+1].dispose(this.context),this.cursors.splice(S+1,1)}normalize(){if(this.cursors.length===1)return;const S=this.cursors.slice(0),C=[];for(let r=0,u=S.length;r<u;r++)C.push({index:r,selection:S[r].modelState.selection});C.sort((0,t.compareBy)(r=>r.selection,k.Range.compareRangesUsingStarts));for(let r=0;r<C.length-1;r++){const u=C[r],i=C[r+1],f=u.selection,c=i.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let l;if(c.isEmpty()||f.isEmpty()?l=c.getStartPosition().isBeforeOrEqual(f.getEndPosition()):l=c.getStartPosition().isBefore(f.getEndPosition()),l){const s=u.index<i.index?r:r+1,d=u.index<i.index?r+1:r,n=C[d].index,a=C[s].index,o=C[d].selection,g=C[s].selection;if(!o.equalsSelection(g)){const h=o.plusRange(g),v=o.selectionStartLineNumber===o.startLineNumber&&o.selectionStartColumn===o.startColumn,m=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn;let w;n===this.lastAddedCursorIndex?(w=v,this.lastAddedCursorIndex=a):w=m;let D;w?D=new E.Selection(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn):D=new E.Selection(h.endLineNumber,h.endColumn,h.startLineNumber,h.startColumn),C[s].selection=D;const y=p.CursorState.fromModelSelection(D);S[a].setState(this.context,y.modelState,y.viewState)}for(const h of C)h.index>n&&h.index--;S.splice(n,1),C.splice(d,1),this._removeSecondaryCursor(n-1),r--}}}}e.CursorCollection=I}),define(ae[769],le([1,0,414,566,28,20,171]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.SmartLinesDiffComputer=void 0;const E=3;class I{computeDiff(n,a,o){const h=new f(n,a,{maxComputationTime:o.maxComputationTime,shouldIgnoreTrimWhitespace:o.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),v=[];let m=null;for(const w of h.changes){let D;w.originalEndLineNumber===0?D=new p.LineRange(w.originalStartLineNumber+1,w.originalStartLineNumber+1):D=new p.LineRange(w.originalStartLineNumber,w.originalEndLineNumber+1);let y;w.modifiedEndLineNumber===0?y=new p.LineRange(w.modifiedStartLineNumber+1,w.modifiedStartLineNumber+1):y=new p.LineRange(w.modifiedStartLineNumber,w.modifiedEndLineNumber+1);let T=new p.LineRangeMapping(D,y,w.charChanges?.map(_=>new p.RangeMapping(new A.Range(_.originalStartLineNumber,_.originalStartColumn,_.originalEndLineNumber,_.originalEndColumn),new A.Range(_.modifiedStartLineNumber,_.modifiedStartColumn,_.modifiedEndLineNumber,_.modifiedEndColumn))));m&&(m.modifiedRange.endLineNumberExclusive===T.modifiedRange.startLineNumber||m.originalRange.endLineNumberExclusive===T.originalRange.startLineNumber)&&(T=new p.LineRangeMapping(m.originalRange.join(T.originalRange),m.modifiedRange.join(T.modifiedRange),m.innerChanges&&T.innerChanges?m.innerChanges.concat(T.innerChanges):void 0),v.pop()),v.push(T),m=T}return(0,k.assertFn)(()=>(0,k.checkAdjacentItems)(v,(w,D)=>D.originalRange.startLineNumber-w.originalRange.endLineNumberExclusive===D.modifiedRange.startLineNumber-w.modifiedRange.endLineNumberExclusive&&w.originalRange.endLineNumberExclusive<D.originalRange.startLineNumber&&w.modifiedRange.endLineNumberExclusive<D.modifiedRange.startLineNumber)),{quitEarly:h.quitEarly,changes:v}}}e.SmartLinesDiffComputer=I;function b(d,n,a,o){return new t.LcsDiff(d,n,a).ComputeDiff(o)}class S{constructor(n){const a=[],o=[];for(let g=0,h=n.length;g<h;g++)a[g]=c(n[g],1),o[g]=l(n[g],1);this.lines=n,this._startColumns=a,this._endColumns=o}getElements(){const n=[];for(let a=0,o=this.lines.length;a<o;a++)n[a]=this.lines[a].substring(this._startColumns[a]-1,this._endColumns[a]-1);return n}getStrictElement(n){return this.lines[n]}getStartLineNumber(n){return n+1}getEndLineNumber(n){return n+1}createCharSequence(n,a,o){const g=[],h=[],v=[];let m=0;for(let w=a;w<=o;w++){const D=this.lines[w],y=n?this._startColumns[w]:1,T=n?this._endColumns[w]:D.length+1;for(let _=y;_<T;_++)g[m]=D.charCodeAt(_-1),h[m]=w+1,v[m]=_,m++;!n&&w<o&&(g[m]=10,h[m]=w+1,v[m]=D.length+1,m++)}return new C(g,h,v)}}class C{constructor(n,a,o){this._charCodes=n,this._lineNumbers=a,this._columns=o}toString(){return"["+this._charCodes.map((n,a)=>(n===10?"\\n":String.fromCharCode(n))+`-(${this._lineNumbers[a]},${this._columns[a]})`).join(", ")+"]"}_assertIndex(n,a){if(n<0||n>=a.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(n){return n>0&&n===this._lineNumbers.length?this.getEndLineNumber(n-1):(this._assertIndex(n,this._lineNumbers),this._lineNumbers[n])}getEndLineNumber(n){return n===-1?this.getStartLineNumber(n+1):(this._assertIndex(n,this._lineNumbers),this._charCodes[n]===10?this._lineNumbers[n]+1:this._lineNumbers[n])}getStartColumn(n){return n>0&&n===this._columns.length?this.getEndColumn(n-1):(this._assertIndex(n,this._columns),this._columns[n])}getEndColumn(n){return n===-1?this.getStartColumn(n+1):(this._assertIndex(n,this._columns),this._charCodes[n]===10?1:this._columns[n]+1)}}class r{constructor(n,a,o,g,h,v,m,w){this.originalStartLineNumber=n,this.originalStartColumn=a,this.originalEndLineNumber=o,this.originalEndColumn=g,this.modifiedStartLineNumber=h,this.modifiedStartColumn=v,this.modifiedEndLineNumber=m,this.modifiedEndColumn=w}static createFromDiffChange(n,a,o){const g=a.getStartLineNumber(n.originalStart),h=a.getStartColumn(n.originalStart),v=a.getEndLineNumber(n.originalStart+n.originalLength-1),m=a.getEndColumn(n.originalStart+n.originalLength-1),w=o.getStartLineNumber(n.modifiedStart),D=o.getStartColumn(n.modifiedStart),y=o.getEndLineNumber(n.modifiedStart+n.modifiedLength-1),T=o.getEndColumn(n.modifiedStart+n.modifiedLength-1);return new r(g,h,v,m,w,D,y,T)}}function u(d){if(d.length<=1)return d;const n=[d[0]];let a=n[0];for(let o=1,g=d.length;o<g;o++){const h=d[o],v=h.originalStart-(a.originalStart+a.originalLength),m=h.modifiedStart-(a.modifiedStart+a.modifiedLength);Math.min(v,m)<E?(a.originalLength=h.originalStart+h.originalLength-a.originalStart,a.modifiedLength=h.modifiedStart+h.modifiedLength-a.modifiedStart):(n.push(h),a=h)}return n}class i{constructor(n,a,o,g,h){this.originalStartLineNumber=n,this.originalEndLineNumber=a,this.modifiedStartLineNumber=o,this.modifiedEndLineNumber=g,this.charChanges=h}static createFromDiffResult(n,a,o,g,h,v,m){let w,D,y,T,_;if(a.originalLength===0?(w=o.getStartLineNumber(a.originalStart)-1,D=0):(w=o.getStartLineNumber(a.originalStart),D=o.getEndLineNumber(a.originalStart+a.originalLength-1)),a.modifiedLength===0?(y=g.getStartLineNumber(a.modifiedStart)-1,T=0):(y=g.getStartLineNumber(a.modifiedStart),T=g.getEndLineNumber(a.modifiedStart+a.modifiedLength-1)),v&&a.originalLength>0&&a.originalLength<20&&a.modifiedLength>0&&a.modifiedLength<20&&h()){const L=o.createCharSequence(n,a.originalStart,a.originalStart+a.originalLength-1),M=g.createCharSequence(n,a.modifiedStart,a.modifiedStart+a.modifiedLength-1);if(L.getElements().length>0&&M.getElements().length>0){let O=b(L,M,h,!0).changes;m&&(O=u(O)),_=[];for(let N=0,P=O.length;N<P;N++)_.push(r.createFromDiffChange(O[N],L,M))}}return new i(w,D,y,T,_)}}class f{constructor(n,a,o){this.shouldComputeCharChanges=o.shouldComputeCharChanges,this.shouldPostProcessCharChanges=o.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=o.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=o.shouldMakePrettyDiff,this.originalLines=n,this.modifiedLines=a,this.original=new S(n),this.modified=new S(a),this.continueLineDiff=s(o.maxComputationTime),this.continueCharDiff=s(o.maxComputationTime===0?0:Math.min(o.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:void 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:void 0}]};const n=b(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),a=n.changes,o=n.quitEarly;if(this.shouldIgnoreTrimWhitespace){const m=[];for(let w=0,D=a.length;w<D;w++)m.push(i.createFromDiffResult(this.shouldIgnoreTrimWhitespace,a[w],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:o,changes:m}}const g=[];let h=0,v=0;for(let m=-1,w=a.length;m<w;m++){const D=m+1<w?a[m+1]:null,y=D?D.originalStart:this.originalLines.length,T=D?D.modifiedStart:this.modifiedLines.length;for(;h<y&&v<T;){const _=this.originalLines[h],L=this.modifiedLines[v];if(_!==L){{let M=c(_,1),O=c(L,1);for(;M>1&&O>1;){const N=_.charCodeAt(M-2),P=L.charCodeAt(O-2);if(N!==P)break;M--,O--}(M>1||O>1)&&this._pushTrimWhitespaceCharChange(g,h+1,1,M,v+1,1,O)}{let M=l(_,1),O=l(L,1);const N=_.length+1,P=L.length+1;for(;M<N&&O<P;){const B=_.charCodeAt(M-1),V=_.charCodeAt(O-1);if(B!==V)break;M++,O++}(M<N||O<P)&&this._pushTrimWhitespaceCharChange(g,h+1,M,N,v+1,O,P)}}h++,v++}D&&(g.push(i.createFromDiffResult(this.shouldIgnoreTrimWhitespace,D,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),h+=D.originalLength,v+=D.modifiedLength)}return{quitEarly:o,changes:g}}_pushTrimWhitespaceCharChange(n,a,o,g,h,v,m){if(this._mergeTrimWhitespaceCharChange(n,a,o,g,h,v,m))return;let w;this.shouldComputeCharChanges&&(w=[new r(a,o,a,g,h,v,h,m)]),n.push(new i(a,a,h,h,w))}_mergeTrimWhitespaceCharChange(n,a,o,g,h,v,m){const w=n.length;if(w===0)return!1;const D=n[w-1];return D.originalEndLineNumber===0||D.modifiedEndLineNumber===0?!1:D.originalEndLineNumber+1===a&&D.modifiedEndLineNumber+1===h?(D.originalEndLineNumber=a,D.modifiedEndLineNumber=h,this.shouldComputeCharChanges&&D.charChanges&&D.charChanges.push(new r(a,o,a,g,h,v,h,m)),!0):!1}}e.DiffComputer=f;function c(d,n){const a=R.firstNonWhitespaceIndex(d);return a===-1?n:a+1}function l(d,n){const a=R.lastNonWhitespaceIndex(d);return a===-1?n:a+2}function s(d){if(d===0)return()=>!0;const n=Date.now();return()=>Date.now()-n<d}}),define(ae[1280],le([1,0,769,1201]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.linesDiffComputers=void 0,e.linesDiffComputers={smart:new t.SmartLinesDiffComputer,experimental:new p.StandardLinesDiffComputer}}),define(ae[1281],le([1,0,144,53]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.score=void 0;function R(A,k,E,I,b,S){if(Array.isArray(A)){let C=0;for(const r of A){const u=R(r,k,E,I,b,S);if(u===10)return u;u>C&&(C=u)}return C}else{if(typeof A=="string")return I?A==="*"?5:A===E?10:0:0;if(A){const{language:C,pattern:r,scheme:u,hasAccessToAllModels:i,notebookType:f}=A;if(!I&&!i)return 0;f&&b&&(k=b);let c=0;if(u)if(u===k.scheme)c=10;else if(u==="*")c=5;else return 0;if(C)if(C===E)c=10;else if(C==="*")c=Math.max(c,5);else return 0;if(f)if(f===S)c=10;else if(f==="*"&&S!==void 0)c=Math.max(c,5);else return 0;if(r){let l;if(typeof r=="string"?l=r:l={...r,base:(0,p.normalize)(r.base)},l===k.fsPath||(0,t.match)(l,k.fsPath))c=10;else return 0}return c}else return 0}}e.score=R}),define(ae[493],le([1,0,6,2,116,1281]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function k(b){return typeof b=="string"?!1:Array.isArray(b)?b.every(k):!!b.exclusive}class E{constructor(S,C,r,u){this.uri=S,this.languageId=C,this.notebookUri=r,this.notebookType=u}equals(S){return this.notebookType===S.notebookType&&this.languageId===S.languageId&&this.uri.toString()===S.uri.toString()&&this.notebookUri?.toString()===S.notebookUri?.toString()}}class I{constructor(S){this._notebookInfoResolver=S,this._clock=0,this._entries=[],this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event}register(S,C){let r={selector:S,provider:C,_score:-1,_time:this._clock++};return this._entries.push(r),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,p.toDisposable)(()=>{if(r){const u=this._entries.indexOf(r);u>=0&&(this._entries.splice(u,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),r=void 0)}})}has(S){return this.all(S).length>0}all(S){if(!S)return[];this._updateScores(S);const C=[];for(const r of this._entries)r._score>0&&C.push(r.provider);return C}ordered(S){const C=[];return this._orderedForEach(S,r=>C.push(r.provider)),C}orderedGroups(S){const C=[];let r,u;return this._orderedForEach(S,i=>{r&&u===i._score?r.push(i.provider):(u=i._score,r=[i.provider],C.push(r))}),C}_orderedForEach(S,C){this._updateScores(S);for(const r of this._entries)r._score>0&&C(r)}_updateScores(S){const C=this._notebookInfoResolver?.(S.uri),r=C?new E(S.uri,S.getLanguageId(),C.uri,C.type):new E(S.uri,S.getLanguageId(),void 0,void 0);if(!this._lastCandidate?.equals(r)){this._lastCandidate=r;for(const u of this._entries)if(u._score=(0,A.score)(u.selector,r.uri,r.languageId,(0,R.shouldSynchronizeModel)(S),r.notebookUri,r.notebookType),k(u.selector)&&u._score>0){for(const i of this._entries)i._score=0;u._score=1e3;break}this._entries.sort(I._compareByScoreAndTime)}}static _compareByScoreAndTime(S,C){return S._score<C._score?1:S._score>C._score?-1:S._time<C._time?1:S._time>C._time?-1:0}}e.LanguageFeatureRegistry=I}),define(ae[1282],le([1,0,573,21]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class R{constructor(S,C){this.languageId=S;let r;C.colorizedBracketPairs?r=A(C.colorizedBracketPairs.map(f=>[f[0],f[1]])):C.brackets?r=A(C.brackets.map(f=>[f[0],f[1]]).filter(f=>!(f[0]==="<"&&f[1]===">"))):r=[];const u=new t.CachedFunction(f=>{const c=new Set;return{info:new E(this,f,c),closing:c}}),i=new t.CachedFunction(f=>{const c=new Set;return{info:new I(this,f,c),opening:c}});for(const[f,c]of r){const l=u.get(f),s=i.get(c);l.closing.add(s.info),s.opening.add(l.info)}this._openingBrackets=new Map([...u.cachedValues].map(([f,c])=>[f,c.info])),this._closingBrackets=new Map([...i.cachedValues].map(([f,c])=>[f,c.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(S){return this._openingBrackets.get(S)}getClosingBracketInfo(S){return this._closingBrackets.get(S)}getBracketInfo(S){return this.getOpeningBracketInfo(S)||this.getClosingBracketInfo(S)}}e.LanguageBracketsConfiguration=R;function A(b){return b.filter(([S,C])=>S!==""&&C!=="")}class k{constructor(S,C){this.config=S,this.bracketText=C}get languageId(){return this.config.languageId}}e.BracketKindBase=k;class E extends k{constructor(S,C,r){super(S,C),this.openedBrackets=r,this.isOpeningBracket=!0}}e.OpeningBracketKind=E;class I extends k{constructor(S,C,r){super(S,C),this.closedBrackets=r,this.isOpeningBracket=!1}closes(S){if(S.languageId===this.languageId&&S.config!==this.config)throw new p.BugIndicatingError("Brackets from different language configuration cannot be used.");return this.closedBrackets.has(S)}getClosedBrackets(){return[...this.closedBrackets]}}e.ClosingBracketKind=I}),define(ae[1283],le([1,0,21,28,300]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class A{constructor(E){E=E||{},E.brackets=E.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],E.brackets.forEach(I=>{const b=A._createOpenBracketRegExp(I[0]),S=A._createCloseBracketRegExp(I[1]);b&&S&&this._brackets.push({open:I[0],openRegExp:b,close:I[1],closeRegExp:S})}),this._regExpRules=E.onEnterRules||[]}onEnter(E,I,b,S){if(E>=3)for(let C=0,r=this._regExpRules.length;C<r;C++){const u=this._regExpRules[C];if([{reg:u.beforeText,text:b},{reg:u.afterText,text:S},{reg:u.previousLineText,text:I}].every(f=>f.reg?(f.reg.lastIndex=0,f.reg.test(f.text)):!0))return u.action}if(E>=2&&b.length>0&&S.length>0)for(let C=0,r=this._brackets.length;C<r;C++){const u=this._brackets[C];if(u.openRegExp.test(b)&&u.closeRegExp.test(S))return{indentAction:R.IndentAction.IndentOutdent}}if(E>=2&&b.length>0){for(let C=0,r=this._brackets.length;C<r;C++)if(this._brackets[C].openRegExp.test(b))return{indentAction:R.IndentAction.Indent}}return null}static _createOpenBracketRegExp(E){let I=p.escapeRegExpCharacters(E);return/\B/.test(I.charAt(0))||(I="\\b"+I),I+="\\s*$",A._safeRegExp(I)}static _createCloseBracketRegExp(E){let I=p.escapeRegExpCharacters(E);return/\B/.test(I.charAt(I.length-1))||(I=I+"\\b"),I="^\\s*"+I,A._safeRegExp(I)}static _safeRegExp(E){try{return new RegExp(E)}catch(I){return(0,t.onUnexpectedError)(I),null}}}e.OnEnterSupport=A}),define(ae[590],le([1,0,28,280,20]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class A{constructor(n,a,o,g,h,v){this._richEditBracketBrand=void 0,this.languageId=n,this.index=a,this.open=o,this.close=g,this.forwardRegex=h,this.reversedRegex=v,this._openSet=A._toSet(this.open),this._closeSet=A._toSet(this.close)}isOpen(n){return this._openSet.has(n)}isClose(n){return this._closeSet.has(n)}static _toSet(n){const a=new Set;for(const o of n)a.add(o);return a}}e.RichEditBracket=A;function k(d){const n=d.length;d=d.map(v=>[v[0].toLowerCase(),v[1].toLowerCase()]);const a=[];for(let v=0;v<n;v++)a[v]=v;const o=(v,m)=>{const[w,D]=v,[y,T]=m;return w===y||w===T||D===y||D===T},g=(v,m)=>{const w=Math.min(v,m),D=Math.max(v,m);for(let y=0;y<n;y++)a[y]===D&&(a[y]=w)};for(let v=0;v<n;v++){const m=d[v];for(let w=v+1;w<n;w++){const D=d[w];o(m,D)&&g(a[v],a[w])}}const h=[];for(let v=0;v<n;v++){const m=[],w=[];for(let D=0;D<n;D++)if(a[D]===v){const[y,T]=d[D];m.push(y),w.push(T)}m.length>0&&h.push({open:m,close:w})}return h}class E{constructor(n,a){this._richEditBracketsBrand=void 0;const o=k(a);this.brackets=o.map((g,h)=>new A(n,h,g.open,g.close,C(g.open,g.close,o,h),r(g.open,g.close,o,h))),this.forwardRegex=u(this.brackets),this.reversedRegex=i(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const g of this.brackets){for(const h of g.open)this.textIsBracket[h]=g,this.textIsOpenBracket[h]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,h.length);for(const h of g.close)this.textIsBracket[h]=g,this.textIsOpenBracket[h]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,h.length)}}}e.RichEditBrackets=E;function I(d,n,a,o){for(let g=0,h=n.length;g<h;g++){if(g===a)continue;const v=n[g];for(const m of v.open)m.indexOf(d)>=0&&o.push(m);for(const m of v.close)m.indexOf(d)>=0&&o.push(m)}}function b(d,n){return d.length-n.length}function S(d){if(d.length<=1)return d;const n=[],a=new Set;for(const o of d)a.has(o)||(n.push(o),a.add(o));return n}function C(d,n,a,o){let g=[];g=g.concat(d),g=g.concat(n);for(let h=0,v=g.length;h<v;h++)I(g[h],a,o,g);return g=S(g),g.sort(b),g.reverse(),c(g)}function r(d,n,a,o){let g=[];g=g.concat(d),g=g.concat(n);for(let h=0,v=g.length;h<v;h++)I(g[h],a,o,g);return g=S(g),g.sort(b),g.reverse(),c(g.map(l))}function u(d){let n=[];for(const a of d){for(const o of a.open)n.push(o);for(const o of a.close)n.push(o)}return n=S(n),c(n)}function i(d){let n=[];for(const a of d){for(const o of a.open)n.push(o);for(const o of a.close)n.push(o)}return n=S(n),c(n.map(l))}function f(d){const n=/^[\w ]+$/.test(d);return d=t.escapeRegExpCharacters(d),n?`\\b${d}\\b`:d}function c(d){const n=`(${d.map(f).join(")|(")})`;return t.createRegExp(n,!0)}const l=function(){function d(o){const g=new Uint16Array(o.length);let h=0;for(let v=o.length-1;v>=0;v--)g[h++]=o.charCodeAt(v);return p.getPlatformTextDecoder().decode(g)}let n=null,a=null;return function(g){return n!==g&&(n=g,a=d(n)),a}}();class s{static _findPrevBracketInText(n,a,o,g){const h=o.match(n);if(!h)return null;const v=o.length-(h.index||0),m=h[0].length,w=g+v;return new R.Range(a,w-m+1,a,w+1)}static findPrevBracketInRange(n,a,o,g,h){const m=l(o).substring(o.length-h,o.length-g);return this._findPrevBracketInText(n,a,m,g)}static findNextBracketInText(n,a,o,g){const h=o.match(n);if(!h)return null;const v=h.index||0,m=h[0].length;if(m===0)return null;const w=g+v;return new R.Range(a,w+1,a,w+1+m)}static findNextBracketInRange(n,a,o,g,h){const v=o.substring(g,h);return this.findNextBracketInText(n,a,v,g)}}e.BracketsUtils=s}),define(ae[1284],le([1,0,16,363,590]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class A{constructor(E){this._richEditBrackets=E}getElectricCharacters(){const E=[];if(this._richEditBrackets)for(const I of this._richEditBrackets.brackets)for(const b of I.close){const S=b.charAt(b.length-1);E.push(S)}return(0,t.distinct)(E)}onElectricCharacter(E,I,b){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const S=I.findTokenIndexAtOffset(b-1);if((0,p.ignoreBracketsInToken)(I.getStandardTokenType(S)))return null;const C=this._richEditBrackets.reversedRegex,r=I.getLineContent().substring(0,b-1)+E,u=R.BracketsUtils.findPrevBracketInRange(C,1,r,0,r.length);if(!u)return null;const i=r.substring(u.startColumn-1,u.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[i])return null;const c=I.getActualLineContentBefore(u.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:i}:null}}e.BracketElectricCharacterSupport=A}),define(ae[264],le([1,0,28,50,20]),function(J,e,t,p,R){"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{static lengthDiffNonNegative(m,w){return w.isLessThan(m)?A.zero:m.lineCount===w.lineCount?new A(0,w.columnCount-m.columnCount):new A(w.lineCount-m.lineCount,w.columnCount)}constructor(m,w){this.lineCount=m,this.columnCount=w}isZero(){return this.lineCount===0&&this.columnCount===0}toLength(){return b(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(v,m,w,D){return v!==w?b(w-v,D):b(0,D-m)}e.lengthDiff=k,e.lengthZero=0;function E(v){return v===0}e.lengthIsZero=E;const I=2**26;function b(v,m){return v*I+m}e.toLength=b;function S(v){const m=v,w=Math.floor(m/I),D=m-w*I;return new A(w,D)}e.lengthToObj=S;function C(v){return Math.floor(v/I)}e.lengthGetLineCount=C;function r(v){return v}e.lengthGetColumnCountIfZeroLineCount=r;function u(v,m){return m<I?v+m:v-v%I+m}e.lengthAdd=u;function i(v,m){const w=v,D=m;if(D-w<=0)return e.lengthZero;const T=Math.floor(w/I),_=Math.floor(D/I),L=D-_*I;if(T===_){const M=w-T*I;return b(0,L-M)}else return b(_-T,L)}e.lengthDiffNonNegative=i;function f(v,m){return v<m}e.lengthLessThan=f;function c(v,m){return v<=m}e.lengthLessThanEqual=c;function l(v,m){return v>=m}e.lengthGreaterThanEqual=l;function s(v){const m=v,w=Math.floor(m/I),D=m-w*I;return new p.Position(w+1,D+1)}e.lengthToPosition=s;function d(v){return b(v.lineNumber-1,v.column-1)}e.positionToLength=d;function n(v,m){const w=v,D=Math.floor(w/I),y=w-D*I,T=m,_=Math.floor(T/I),L=T-_*I;return new R.Range(D+1,y+1,_+1,L+1)}e.lengthsToRange=n;function a(v,m){return v-m}e.lengthCompare=a;function o(v){const m=(0,t.splitLines)(v);return b(m.length-1,m[m.length-1].length)}e.lengthOfString=o;function g(v){const m=(0,t.splitLines)(v);return new A(m.length-1,m[m.length-1].length)}e.lengthOfStringObj=g;function h(v){return v}e.lengthHash=h}),define(ae[494],le([1,0,251,264,364]),function(J,e,t,p,R){"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(s){s[s.Text=0]="Text",s[s.Bracket=1]="Bracket",s[s.Pair=2]="Pair",s[s.UnexpectedClosingBracket=3]="UnexpectedClosingBracket",s[s.List=4]="List"})(A=e.AstNodeKind||(e.AstNodeKind={}));class k{get length(){return this._length}constructor(d){this._length=d}}class E extends k{static create(d,n,a){let o=d.length;return n&&(o=(0,p.lengthAdd)(o,n.length)),a&&(o=(0,p.lengthAdd)(o,a.length)),new E(o,d,n,a,n?n.missingOpeningBracketIds:R.SmallImmutableSet.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(d){switch(d){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const d=new Array;return d.push(this.openingBracket),this.child&&d.push(this.child),this.closingBracket&&d.push(this.closingBracket),d}constructor(d,n,a,o,g){super(d),this.openingBracket=n,this.child=a,this.closingBracket=o,this.missingOpeningBracketIds=g}canBeReused(d){return!(this.closingBracket===null||d.intersects(this.missingOpeningBracketIds))}flattenLists(){return E.create(this.openingBracket.flattenLists(),this.child&&this.child.flattenLists(),this.closingBracket&&this.closingBracket.flattenLists())}deepClone(){return new E(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(d,n){return this.child?this.child.computeMinIndentation((0,p.lengthAdd)(d,this.openingBracket.length),n):Number.MAX_SAFE_INTEGER}}e.PairAstNode=E;class I extends k{static create23(d,n,a,o=!1){let g=d.length,h=d.missingOpeningBracketIds;if(d.listHeight!==n.listHeight)throw new Error("Invalid list heights");if(g=(0,p.lengthAdd)(g,n.length),h=h.merge(n.missingOpeningBracketIds),a){if(d.listHeight!==a.listHeight)throw new Error("Invalid list heights");g=(0,p.lengthAdd)(g,a.length),h=h.merge(a.missingOpeningBracketIds)}return o?new S(g,d.listHeight+1,d,n,a,h):new b(g,d.listHeight+1,d,n,a,h)}static create(d,n=!1){if(d.length===0)return this.getEmpty();{let a=d[0].length,o=d[0].missingOpeningBracketIds;for(let g=1;g<d.length;g++)a=(0,p.lengthAdd)(a,d[g].length),o=o.merge(d[g].missingOpeningBracketIds);return n?new r(a,d[0].listHeight+1,d,o):new C(a,d[0].listHeight+1,d,o)}}static getEmpty(){return new r(p.lengthZero,0,[],R.SmallImmutableSet.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}constructor(d,n,a){super(d),this.listHeight=n,this._missingOpeningBracketIds=a,this.cachedMinIndentation=-1}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const d=this.childrenLength;if(d===0)return;const n=this.getChild(d-1),a=n.kind===4?n.toMutable():n;return n!==a&&this.setChild(d-1,a),a}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const n=this.getChild(0),a=n.kind===4?n.toMutable():n;return n!==a&&this.setChild(0,a),a}canBeReused(d){if(d.intersects(this.missingOpeningBracketIds))return!1;let n=this,a;for(;n.kind===4&&(a=n.childrenLength)>0;)n=n.getChild(a-1);return n.canBeReused(d)}handleChildrenChanged(){this.throwIfImmutable();const d=this.childrenLength;let n=this.getChild(0).length,a=this.getChild(0).missingOpeningBracketIds;for(let o=1;o<d;o++){const g=this.getChild(o);n=(0,p.lengthAdd)(n,g.length),a=a.merge(g.missingOpeningBracketIds)}this._length=n,this._missingOpeningBracketIds=a,this.cachedMinIndentation=-1}flattenLists(){const d=new Array;for(const n of this.children){const a=n.flattenLists();a.kind===4?d.push(...a.children):d.push(a)}return I.create(d)}computeMinIndentation(d,n){if(this.cachedMinIndentation!==-1)return this.cachedMinIndentation;let a=Number.MAX_SAFE_INTEGER,o=d;for(let g=0;g<this.childrenLength;g++){const h=this.getChild(g);h&&(a=Math.min(a,h.computeMinIndentation(o,n)),o=(0,p.lengthAdd)(o,h.length))}return this.cachedMinIndentation=a,a}}e.ListAstNode=I;class b extends I{get childrenLength(){return this._item3!==null?3:2}getChild(d){switch(d){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(d,n){switch(d){case 0:this._item1=n;return;case 1:this._item2=n;return;case 2:this._item3=n;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}constructor(d,n,a,o,g,h){super(d,n,h),this._item1=a,this._item2=o,this._item3=g}deepClone(){return new b(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(d){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=d,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const d=this._item3;return this._item3=null,this.handleChildrenChanged(),d}prependChildOfSameHeight(d){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=d,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const d=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),d}toMutable(){return this}}class S extends b{toMutable(){return new b(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class C extends I{get childrenLength(){return this._children.length}getChild(d){return this._children[d]}setChild(d,n){this._children[d]=n}get children(){return this._children}constructor(d,n,a,o){super(d,n,o),this._children=a}deepClone(){const d=new Array(this._children.length);for(let n=0;n<this._children.length;n++)d[n]=this._children[n].deepClone();return new C(this.length,this.listHeight,d,this.missingOpeningBracketIds)}appendChildOfSameHeight(d){this.throwIfImmutable(),this._children.push(d),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const d=this._children.pop();return this.handleChildrenChanged(),d}prependChildOfSameHeight(d){this.throwIfImmutable(),this._children.unshift(d),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const d=this._children.shift();return this.handleChildrenChanged(),d}toMutable(){return this}}class r extends C{toMutable(){return new C(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const u=[];class i extends k{get listHeight(){return 0}get childrenLength(){return 0}getChild(d){return null}get children(){return u}flattenLists(){return this}deepClone(){return this}}class f extends i{get kind(){return 0}get missingOpeningBracketIds(){return R.SmallImmutableSet.getEmpty()}canBeReused(d){return!0}computeMinIndentation(d,n){const a=(0,p.lengthToObj)(d),o=(a.columnCount===0?a.lineCount:a.lineCount+1)+1,g=(0,p.lengthGetLineCount)((0,p.lengthAdd)(d,this.length))+1;let h=Number.MAX_SAFE_INTEGER;for(let v=o;v<=g;v++){const m=n.getLineFirstNonWhitespaceColumn(v),w=n.getLineContent(v);if(m===0)continue;const D=t.CursorColumns.visibleColumnFromColumn(w,m,n.getOptions().tabSize);h=Math.min(h,D)}return h}}e.TextAstNode=f;class c extends i{static create(d,n,a){return new c(d,n,a)}get kind(){return 1}get missingOpeningBracketIds(){return R.SmallImmutableSet.getEmpty()}constructor(d,n,a){super(d),this.bracketInfo=n,this.bracketIds=a}get text(){return this.bracketInfo.bracketText}get languageId(){return this.bracketInfo.languageId}canBeReused(d){return!1}computeMinIndentation(d,n){return Number.MAX_SAFE_INTEGER}}e.BracketAstNode=c;class l extends i{get kind(){return 3}constructor(d,n){super(n),this.missingOpeningBracketIds=d}canBeReused(d){return!d.intersects(this.missingOpeningBracketIds)}computeMinIndentation(d,n){return Number.MAX_SAFE_INTEGER}}e.InvalidBracketAstNode=l}),define(ae[770],le([1,0,264]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class p{constructor(E,I,b){this.startOffset=E,this.endOffset=I,this.newLength=b}}e.TextEditInfo=p;class R{constructor(E,I){this.documentLength=I,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=E.map(b=>A.from(b))}getOffsetBeforeChange(E){return this.adjustNextEdit(E),this.translateCurToOld(E)}getDistanceToNextChange(E){this.adjustNextEdit(E);const I=this.edits[this.nextEditIdx],b=I?this.translateOldToCur(I.offsetObj):this.documentLength;return(0,t.lengthDiffNonNegative)(E,b)}translateOldToCur(E){return E.lineCount===this.deltaLineIdxInOld?(0,t.toLength)(E.lineCount+this.deltaOldToNewLineCount,E.columnCount+this.deltaOldToNewColumnCount):(0,t.toLength)(E.lineCount+this.deltaOldToNewLineCount,E.columnCount)}translateCurToOld(E){const I=(0,t.lengthToObj)(E);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(E){for(;this.nextEditIdx<this.edits.length;){const I=this.edits[this.nextEditIdx],b=this.translateOldToCur(I.endOffsetAfterObj);if((0,t.lengthLessThanEqual)(b,E)){this.nextEditIdx++;const S=(0,t.lengthToObj)(b),C=(0,t.lengthToObj)(this.translateOldToCur(I.endOffsetBeforeObj)),r=S.lineCount-C.lineCount;this.deltaOldToNewLineCount+=r;const u=this.deltaLineIdxInOld===I.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,i=S.columnCount-C.columnCount;this.deltaOldToNewColumnCount=u+i,this.deltaLineIdxInOld=I.endOffsetBeforeObj.lineCount}else break}}}e.BeforeEditPositionMapper=R;class A{static from(E){return new A(E.startOffset,E.endOffset,E.newLength)}constructor(E,I,b){this.endOffsetBeforeObj=(0,t.lengthToObj)(I),this.endOffsetAfterObj=(0,t.lengthToObj)((0,t.lengthAdd)(E,b)),this.offsetObj=(0,t.lengthToObj)(E)}}}),define(ae[1285],le([1,0,494]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.concat23TreesOfSameHeight=e.concat23Trees=void 0;function p(b){if(b.length===0)return null;if(b.length===1)return b[0];let S=0;function C(){if(S>=b.length)return null;const f=S,c=b[f].listHeight;for(S++;S<b.length&&b[S].listHeight===c;)S++;return S-f>=2?R(f===0&&S===b.length?b:b.slice(f,S),!1):b[f]}let r=C(),u=C();if(!u)return r;for(let f=C();f;f=C())A(r,u)<=A(u,f)?(r=k(r,u),u=f):u=k(u,f);return k(r,u)}e.concat23Trees=p;function R(b,S=!1){if(b.length===0)return null;if(b.length===1)return b[0];let C=b.length;for(;C>3;){const r=C>>1;for(let u=0;u<r;u++){const i=u<<1;b[u]=t.ListAstNode.create23(b[i],b[i+1],i+3===C?b[i+2]:null,S)}C=r}return t.ListAstNode.create23(b[0],b[1],C>=3?b[2]:null,S)}e.concat23TreesOfSameHeight=R;function A(b,S){return Math.abs(b.listHeight-S.listHeight)}function k(b,S){return b.listHeight===S.listHeight?t.ListAstNode.create23(b,S,null,!1):b.listHeight>S.listHeight?E(b,S):I(S,b)}function E(b,S){b=b.toMutable();let C=b;const r=new Array;let u;for(;;){if(S.listHeight===C.listHeight){u=S;break}if(C.kind!==4)throw new Error("unexpected");r.push(C),C=C.makeLastElementMutable()}for(let i=r.length-1;i>=0;i--){const f=r[i];u?f.childrenLength>=3?u=t.ListAstNode.create23(f.unappendChild(),u,null,!1):(f.appendChildOfSameHeight(u),u=void 0):f.handleChildrenChanged()}return u?t.ListAstNode.create23(b,u,null,!1):b}function I(b,S){b=b.toMutable();let C=b;const r=new Array;for(;S.listHeight!==C.listHeight;){if(C.kind!==4)throw new Error("unexpected");r.push(C),C=C.makeFirstElementMutable()}let u=S;for(let i=r.length-1;i>=0;i--){const f=r[i];u?f.childrenLength>=3?u=t.ListAstNode.create23(u,f.unprependChild(),null,!1):(f.prependChildOfSameHeight(u),u=void 0):f.handleChildrenChanged()}return u?t.ListAstNode.create23(u,b,null,!1):b}}),define(ae[1286],le([1,0,264]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class p{constructor(E){this.lastOffset=t.lengthZero,this.nextNodes=[E],this.offsets=[t.lengthZero],this.idxs=[]}readLongestNodeAt(E,I){if((0,t.lengthLessThan)(E,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=E;;){const b=A(this.nextNodes);if(!b)return;const S=A(this.offsets);if((0,t.lengthLessThan)(E,S))return;if((0,t.lengthLessThan)(S,E))if((0,t.lengthAdd)(S,b.length)<=E)this.nextNodeAfterCurrent();else{const C=R(b);C!==-1?(this.nextNodes.push(b.getChild(C)),this.offsets.push(S),this.idxs.push(C)):this.nextNodeAfterCurrent()}else{if(I(b))return this.nextNodeAfterCurrent(),b;{const C=R(b);if(C===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(b.getChild(C)),this.offsets.push(S),this.idxs.push(C)}}}}nextNodeAfterCurrent(){for(;;){const E=A(this.offsets),I=A(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const b=A(this.nextNodes),S=R(b,this.idxs[this.idxs.length-1]);if(S!==-1){this.nextNodes.push(b.getChild(S)),this.offsets.push((0,t.lengthAdd)(E,I.length)),this.idxs[this.idxs.length-1]=S;break}else this.idxs.pop()}}}e.NodeReader=p;function R(k,E=-1){for(;;){if(E++,E>=k.childrenLength)return-1;if(k.getChild(E))return E}}function A(k){return k.length>0?k[k.length-1]:void 0}}),define(ae[771],le([1,0,494,770,364,264,1285,1286]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function I(S,C,r,u){return new b(S,C,r,u).parseDocument()}e.parseDocument=I;class b{get nodesConstructed(){return this._itemsConstructed}get nodesReused(){return this._itemsFromCache}constructor(C,r,u,i){if(this.tokenizer=C,this.createImmutableLists=i,this._itemsConstructed=0,this._itemsFromCache=0,u&&i)throw new Error("Not supported");this.oldNodeReader=u?new E.NodeReader(u):void 0,this.positionMapper=new p.BeforeEditPositionMapper(r,C.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let C=this.parseList(R.SmallImmutableSet.getEmpty());return C||(C=t.ListAstNode.getEmpty()),C}parseList(C){const r=new Array;for(;;){const i=this.tokenizer.peek();if(!i||i.kind===2&&i.bracketIds.intersects(C))break;const f=this.parseChild(C);f.kind===4&&f.childrenLength===0||r.push(f)}return this.oldNodeReader?(0,k.concat23Trees)(r):(0,k.concat23TreesOfSameHeight)(r,this.createImmutableLists)}parseChild(C){if(this.oldNodeReader){const u=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,A.lengthIsZero)(u)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),f=>(0,A.lengthLessThan)(f.length,u)?f.canBeReused(C):!1);if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const r=this.tokenizer.read();switch(r.kind){case 2:return new t.InvalidBracketAstNode(r.bracketIds,r.length);case 0:return r.astNode;case 1:{const u=C.merge(r.bracketIds),i=this.parseList(u),f=this.tokenizer.peek();return f&&f.kind===2&&(f.bracketId===r.bracketId||f.bracketIds.intersects(r.bracketIds))?(this.tokenizer.read(),t.PairAstNode.create(r.astNode,i,f.astNode)):t.PairAstNode.create(r.astNode,i,null)}default:throw new Error("unexpected")}}}}),define(ae[591],le([1,0,21,325,494,264,364]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=e.TokenKind=void 0;var E;(function(r){r[r.Text=0]="Text",r[r.OpeningBracket=1]="OpeningBracket",r[r.ClosingBracket=2]="ClosingBracket"})(E=e.TokenKind||(e.TokenKind={}));class I{constructor(u,i,f,c,l){this.length=u,this.kind=i,this.bracketId=f,this.bracketIds=c,this.astNode=l}}e.Token=I;class b{constructor(u,i){this.textModel=u,this.bracketTokens=i,this.reader=new S(this.textModel,this.bracketTokens),this._offset=A.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=u.getLineCount(),this.textBufferLastLineLength=u.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,A.toLength)(this.textBufferLineCount,this.textBufferLastLineLength)}getText(){return this.textModel.getValue()}skip(u){this.didPeek=!1,this._offset=(0,A.lengthAdd)(this._offset,u);const i=(0,A.lengthToObj)(this._offset);this.reader.setPosition(i.lineCount,i.columnCount)}read(){let u;return this.peeked?(this.didPeek=!1,u=this.peeked):u=this.reader.read(),u&&(this._offset=(0,A.lengthAdd)(this._offset,u.length)),u}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=b;class S{constructor(u,i){this.textModel=u,this.bracketTokens=i,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=u.getLineCount(),this.textBufferLastLineLength=u.getLineLength(this.textBufferLineCount)}setPosition(u,i){u===this.lineIdx?(this.lineCharOffset=i,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=u,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.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const u=this.lineIdx,i=this.lineCharOffset;let f=0;for(;;){const l=this.lineTokens,s=l.getCount();let d=null;if(this.lineTokenOffset<s){const n=l.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<s&&n===l.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const a=p.TokenMetadata.getTokenType(n)===0,o=p.TokenMetadata.containsBalancedBrackets(n),g=l.getEndOffset(this.lineTokenOffset);if(o&&a&&this.lineCharOffset<g){const h=l.getLanguageId(this.lineTokenOffset),v=this.line.substring(this.lineCharOffset,g),m=this.bracketTokens.getSingleLanguageBracketTokens(h),w=m.regExpGlobal;if(w){w.lastIndex=0;const D=w.exec(v);D&&(d=m.getToken(D[0]),d&&(this.lineCharOffset+=D.index))}}if(f+=g-this.lineCharOffset,d)if(u!==this.lineIdx||i!==this.lineCharOffset){this.peekedToken=d;break}else return this.lineCharOffset+=(0,A.lengthGetColumnCountIfZeroLineCount)(d.length),d;else this.lineTokenOffset++,this.lineCharOffset=g}else if(this.lineIdx===this.textBufferLineCount-1||(this.lineIdx++,this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,f+=33,f>1e3))break;if(f>1500)break}const c=(0,A.lengthDiff)(u,i,this.lineIdx,this.lineCharOffset);return new I(c,0,-1,k.SmallImmutableSet.getEmpty(),new R.TextAstNode(c))}}class C{constructor(u,i){this.text=u,this._offset=A.lengthZero,this.idx=0;const f=i.getRegExpStr(),c=f?new RegExp(f+`| `,"gi"):null,l=[];let s,d=0,n=0,a=0,o=0;const g=new Array;for(let m=0;m<60;m++)g.push(new I((0,A.toLength)(0,m),0,-1,k.SmallImmutableSet.getEmpty(),new R.TextAstNode((0,A.toLength)(0,m))));const h=new Array;for(let m=0;m<60;m++)h.push(new I((0,A.toLength)(1,m),0,-1,k.SmallImmutableSet.getEmpty(),new R.TextAstNode((0,A.toLength)(1,m))));if(c)for(c.lastIndex=0;(s=c.exec(u))!==null;){const m=s.index,w=s[0];if(w===` `)d++,n=m+1;else{if(a!==m){let D;if(o===d){const y=m-a;if(y<g.length)D=g[y];else{const T=(0,A.toLength)(0,y);D=new I(T,0,-1,k.SmallImmutableSet.getEmpty(),new R.TextAstNode(T))}}else{const y=d-o,T=m-n;if(y===1&&T<h.length)D=h[T];else{const _=(0,A.toLength)(y,T);D=new I(_,0,-1,k.SmallImmutableSet.getEmpty(),new R.TextAstNode(_))}}l.push(D)}l.push(i.getToken(w)),a=m+w.length,o=d}}const v=u.length;if(a!==v){const m=o===d?(0,A.toLength)(0,v-a):(0,A.toLength)(d-o,v-n);l.push(new I(m,0,-1,k.SmallImmutableSet.getEmpty(),new R.TextAstNode(m)))}this.length=(0,A.toLength)(d,v-n),this.tokens=l}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(u){throw new t.NotSupportedError}getText(){return this.text}}e.FastTokenizer=C}),define(ae[772],le([1,0,28,494,264,364,591]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageAgnosticBracketTokens=e.BracketTokens=void 0;class E{static createFromLanguage(C,r){function u(f){return r.getKey(`${f.languageId}:::${f.bracketText}`)}const i=new Map;for(const f of C.bracketsNew.openingBrackets){const c=(0,R.toLength)(0,f.bracketText.length),l=u(f),s=A.SmallImmutableSet.getEmpty().add(l,A.identityKeyProvider);i.set(f.bracketText,new k.Token(c,1,l,s,p.BracketAstNode.create(c,f,s)))}for(const f of C.bracketsNew.closingBrackets){const c=(0,R.toLength)(0,f.bracketText.length);let l=A.SmallImmutableSet.getEmpty();const s=f.getClosedBrackets();for(const d of s)l=l.add(u(d),A.identityKeyProvider);i.set(f.bracketText,new k.Token(c,2,u(s[0]),l,p.BracketAstNode.create(c,f,l)))}return new E(i)}constructor(C){this.map=C,this.hasRegExp=!1,this._regExpGlobal=null}getRegExpStr(){if(this.isEmpty)return null;{const C=[...this.map.keys()];return C.sort(),C.reverse(),C.map(r=>I(r)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const C=this.getRegExpStr();this._regExpGlobal=C?new RegExp(C,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(C){return this.map.get(C.toLowerCase())}findClosingTokenText(C){for(const[r,u]of this.map)if(u.kind===2&&u.bracketIds.intersects(C))return r}get isEmpty(){return this.map.size===0}}e.BracketTokens=E;function I(S){let C=(0,t.escapeRegExpCharacters)(S);return/^[\w ]+/.test(S)&&(C=`\\b${C}`),/[\w ]+$/.test(S)&&(C=`${C}\\b`),C}class b{constructor(C,r){this.denseKeyProvider=C,this.getLanguageConfiguration=r,this.languageIdToBracketTokens=new Map}didLanguageChange(C){return this.languageIdToBracketTokens.has(C)}getSingleLanguageBracketTokens(C){let r=this.languageIdToBracketTokens.get(C);return r||(r=E.createFromLanguage(this.getLanguageConfiguration(C),this.denseKeyProvider),this.languageIdToBracketTokens.set(C,r)),r}getToken(C,r){return this.getSingleLanguageBracketTokens(r).getToken(C)}}e.LanguageAgnosticBracketTokens=b}),define(ae[1287],le([1,0,6,2,20,1209,770,772,264,771,364,591,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class u extends p.Disposable{didLanguageChange(n){return this.brackets.didLanguageChange(n)}constructor(n,a){if(super(),this.textModel=n,this.getLanguageConfiguration=a,this.didChangeEmitter=new t.Emitter,this.denseKeyProvider=new S.DenseKeyProvider,this.brackets=new E.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,n.tokenization.backgroundTokenizationState===0){const o=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),g=new C.FastTokenizer(this.textModel.getValue(),o);this.initialAstWithoutTokens=(0,b.parseDocument)(g,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else n.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):n.tokenization.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const n=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,n||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:n}){const a=n.map(o=>new k.TextEditInfo((0,I.toLength)(o.fromLineNumber-1,0),(0,I.toLength)(o.toLineNumber,0),(0,I.toLength)(o.toLineNumber-o.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(a,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(n){const a=n.changes.map(o=>{const g=R.Range.lift(o.range);return new k.TextEditInfo((0,I.positionToLength)(g.getStartPosition()),(0,I.positionToLength)(g.getEndPosition()),(0,I.lengthOfString)(o.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(a,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(a,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(n,a,o){const h=a,v=new C.TextBufferTokenizer(this.textModel,this.brackets);return(0,b.parseDocument)(v,n,h,o)}getBracketsInRange(n){const a=(0,I.toLength)(n.startLineNumber-1,n.startColumn-1),o=(0,I.toLength)(n.endLineNumber-1,n.endColumn-1);return new r.CallbackIterable(g=>{const h=this.initialAstWithoutTokens||this.astWithTokens;c(h,I.lengthZero,h.length,a,o,g,0,0,new Map)})}getBracketPairsInRange(n,a){const o=(0,I.positionToLength)(n.getStartPosition()),g=(0,I.positionToLength)(n.getEndPosition());return new r.CallbackIterable(h=>{const v=this.initialAstWithoutTokens||this.astWithTokens,m=new l(h,a,this.textModel);s(v,I.lengthZero,v.length,o,g,m,0,new Map)})}getFirstBracketAfter(n){const a=this.initialAstWithoutTokens||this.astWithTokens;return f(a,I.lengthZero,a.length,(0,I.positionToLength)(n))}getFirstBracketBefore(n){const a=this.initialAstWithoutTokens||this.astWithTokens;return i(a,I.lengthZero,a.length,(0,I.positionToLength)(n))}}e.BracketPairsTree=u;function i(d,n,a,o){if(d.kind===4||d.kind===2){const g=[];for(const h of d.children)a=(0,I.lengthAdd)(n,h.length),g.push({nodeOffsetStart:n,nodeOffsetEnd:a}),n=a;for(let h=g.length-1;h>=0;h--){const{nodeOffsetStart:v,nodeOffsetEnd:m}=g[h];if((0,I.lengthLessThan)(v,o)){const w=i(d.children[h],v,m,o);if(w)return w}}return null}else{if(d.kind===3)return null;if(d.kind===1){const g=(0,I.lengthsToRange)(n,a);return{bracketInfo:d.bracketInfo,range:g}}}return null}function f(d,n,a,o){if(d.kind===4||d.kind===2){for(const g of d.children){if(a=(0,I.lengthAdd)(n,g.length),(0,I.lengthLessThan)(o,a)){const h=f(g,n,a,o);if(h)return h}n=a}return null}else{if(d.kind===3)return null;if(d.kind===1){const g=(0,I.lengthsToRange)(n,a);return{bracketInfo:d.bracketInfo,range:g}}}return null}function c(d,n,a,o,g,h,v,m,w,D=!1){if(v>200)return!0;e:for(;;)switch(d.kind){case 4:{const y=d.childrenLength;for(let T=0;T<y;T++){const _=d.getChild(T);if(!!_){if(a=(0,I.lengthAdd)(n,_.length),(0,I.lengthLessThanEqual)(n,g)&&(0,I.lengthGreaterThanEqual)(a,o)){if((0,I.lengthGreaterThanEqual)(a,g)){d=_;continue e}if(!c(_,n,a,o,g,h,v,0,w))return!1}n=a}}return!0}case 2:{let y=0;if(w){let _=w.get(d.openingBracket.text);_===void 0&&(_=0),y=_,_++,w.set(d.openingBracket.text,_)}const T=d.childrenLength;for(let _=0;_<T;_++){const L=d.getChild(_);if(!!L){if(a=(0,I.lengthAdd)(n,L.length),(0,I.lengthLessThanEqual)(n,g)&&(0,I.lengthGreaterThanEqual)(a,o)){if((0,I.lengthGreaterThanEqual)(a,g)){d=L,v++;continue e}if(!c(L,n,a,o,g,h,v+1,y+1,w,!d.closingBracket))return!1}n=a}}return w?.set(d.openingBracket.text,y),!0}case 3:{const y=(0,I.lengthsToRange)(n,a);return h(new A.BracketInfo(y,v-1,0,!0))}case 1:{const y=(0,I.lengthsToRange)(n,a);return h(new A.BracketInfo(y,v-1,m-1,D))}case 0:return!0}}class l{constructor(n,a,o){this.push=n,this.includeMinIndentation=a,this.textModel=o}}function s(d,n,a,o,g,h,v,m){if(v>200)return!0;let w=!0;if(d.kind===2){let D=0;if(m){let _=m.get(d.openingBracket.text);_===void 0&&(_=0),D=_,_++,m.set(d.openingBracket.text,_)}const y=(0,I.lengthAdd)(n,d.openingBracket.length);let T=-1;if(h.includeMinIndentation&&(T=d.computeMinIndentation(n,h.textModel)),w=h.push(new A.BracketPairWithMinIndentationInfo((0,I.lengthsToRange)(n,a),(0,I.lengthsToRange)(n,y),d.closingBracket?(0,I.lengthsToRange)((0,I.lengthAdd)(y,d.child?.length||I.lengthZero),a):void 0,v,D,d,T)),n=y,w&&d.child){const _=d.child;if(a=(0,I.lengthAdd)(n,_.length),(0,I.lengthLessThanEqual)(n,g)&&(0,I.lengthGreaterThanEqual)(a,o)&&(w=s(_,n,a,o,g,h,v+1,m),!w))return!1}m?.set(d.openingBracket.text,D)}else{let D=n;for(const y of d.children){const T=D;if(D=(0,I.lengthAdd)(D,y.length),(0,I.lengthLessThanEqual)(T,g)&&(0,I.lengthLessThanEqual)(o,D)&&(w=s(y,T,D,o,g,h,v,m),!w))return!1}}return w}}),define(ae[1288],le([1,0,16,6,2,20,363,590,1287]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class b extends R.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(f,c){super(),this.textModel=f,this.languageConfigurationService=c,this.bracketPairsTree=this._register(new R.MutableDisposable),this.onDidChangeEmitter=new p.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(l=>{(!l.languageId||this.bracketPairsTree.value?.object.didLanguageChange(l.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(f){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(f){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(f){this.bracketPairsTree.value?.object.handleContentChanged(f)}handleDidChangeBackgroundTokenizationState(){this.bracketPairsTree.value?.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(f){this.bracketPairsTree.value?.object.handleDidChangeTokens(f)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const f=new R.DisposableStore;this.bracketPairsTree.value=S(f.add(new I.BracketPairsTree(this.textModel,c=>this.languageConfigurationService.getLanguageConfiguration(c))),f),f.add(this.bracketPairsTree.value.object.onDidChange(c=>this.onDidChangeEmitter.fire(c))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(f){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(f,!1)||t.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(f){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketPairsInRange(f,!0)||t.CallbackIterable.empty}getBracketsInRange(f){return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getBracketsInRange(f)||t.CallbackIterable.empty}findMatchingBracketUp(f,c,l){const s=this.textModel.validatePosition(c),d=this.textModel.getLanguageIdAtPosition(s.lineNumber,s.column);if(this.canBuildAST){const n=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew.getClosingBracketInfo(f);if(!n)return null;const a=this.getBracketPairsInRange(A.Range.fromPositions(c,c)).findLast(o=>n.closes(o.openingBracketInfo));return a?a.openingBracketRange:null}else{const n=f.toLowerCase(),a=this.languageConfigurationService.getLanguageConfiguration(d).brackets;if(!a)return null;const o=a.textIsBracket[n];return o?u(this._findMatchingBracketUp(o,s,C(l))):null}}matchBracket(f,c){if(this.canBuildAST){const l=this.getBracketPairsInRange(A.Range.fromPositions(f,f)).filter(s=>s.closingBracketRange!==void 0&&(s.openingBracketRange.containsPosition(f)||s.closingBracketRange.containsPosition(f))).findLastMaxBy((0,t.compareBy)(s=>s.openingBracketRange.containsPosition(f)?s.openingBracketRange:s.closingBracketRange,A.Range.compareRangesUsingStarts));return l?[l.openingBracketRange,l.closingBracketRange]:null}else{const l=C(c);return this._matchBracket(this.textModel.validatePosition(f),l)}}_establishBracketSearchOffsets(f,c,l,s){const d=c.getCount(),n=c.getLanguageId(s);let a=Math.max(0,f.column-1-l.maxBracketLength);for(let g=s-1;g>=0;g--){const h=c.getEndOffset(g);if(h<=a)break;if((0,k.ignoreBracketsInToken)(c.getStandardTokenType(g))||c.getLanguageId(g)!==n){a=h;break}}let o=Math.min(c.getLineContent().length,f.column-1+l.maxBracketLength);for(let g=s+1;g<d;g++){const h=c.getStartOffset(g);if(h>=o)break;if((0,k.ignoreBracketsInToken)(c.getStandardTokenType(g))||c.getLanguageId(g)!==n){o=h;break}}return{searchStartOffset:a,searchEndOffset:o}}_matchBracket(f,c){const l=f.lineNumber,s=this.textModel.tokenization.getLineTokens(l),d=this.textModel.getLineContent(l),n=s.findTokenIndexAtOffset(f.column-1);if(n<0)return null;const a=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(n)).brackets;if(a&&!(0,k.ignoreBracketsInToken)(s.getStandardTokenType(n))){let{searchStartOffset:o,searchEndOffset:g}=this._establishBracketSearchOffsets(f,s,a,n),h=null;for(;;){const v=E.BracketsUtils.findNextBracketInRange(a.forwardRegex,l,d,o,g);if(!v)break;if(v.startColumn<=f.column&&f.column<=v.endColumn){const m=d.substring(v.startColumn-1,v.endColumn-1).toLowerCase(),w=this._matchFoundBracket(v,a.textIsBracket[m],a.textIsOpenBracket[m],c);if(w){if(w instanceof r)return null;h=w}}o=v.endColumn-1}if(h)return h}if(n>0&&s.getStartOffset(n)===f.column-1){const o=n-1,g=this.languageConfigurationService.getLanguageConfiguration(s.getLanguageId(o)).brackets;if(g&&!(0,k.ignoreBracketsInToken)(s.getStandardTokenType(o))){const{searchStartOffset:h,searchEndOffset:v}=this._establishBracketSearchOffsets(f,s,g,o),m=E.BracketsUtils.findPrevBracketInRange(g.reversedRegex,l,d,h,v);if(m&&m.startColumn<=f.column&&f.column<=m.endColumn){const w=d.substring(m.startColumn-1,m.endColumn-1).toLowerCase(),D=this._matchFoundBracket(m,g.textIsBracket[w],g.textIsOpenBracket[w],c);if(D)return D instanceof r?null:D}}}return null}_matchFoundBracket(f,c,l,s){if(!c)return null;const d=l?this._findMatchingBracketDown(c,f.getEndPosition(),s):this._findMatchingBracketUp(c,f.getStartPosition(),s);return d?d instanceof r?d:[f,d]:null}_findMatchingBracketUp(f,c,l){const s=f.languageId,d=f.reversedRegex;let n=-1,a=0;const o=(g,h,v,m)=>{for(;;){if(l&&++a%100===0&&!l())return r.INSTANCE;const w=E.BracketsUtils.findPrevBracketInRange(d,g,h,v,m);if(!w)break;const D=h.substring(w.startColumn-1,w.endColumn-1).toLowerCase();if(f.isOpen(D)?n++:f.isClose(D)&&n--,n===0)return w;m=w.startColumn-1}return null};for(let g=c.lineNumber;g>=1;g--){const h=this.textModel.tokenization.getLineTokens(g),v=h.getCount(),m=this.textModel.getLineContent(g);let w=v-1,D=m.length,y=m.length;g===c.lineNumber&&(w=h.findTokenIndexAtOffset(c.column-1),D=c.column-1,y=c.column-1);let T=!0;for(;w>=0;w--){const _=h.getLanguageId(w)===s&&!(0,k.ignoreBracketsInToken)(h.getStandardTokenType(w));if(_)T?D=h.getStartOffset(w):(D=h.getStartOffset(w),y=h.getEndOffset(w));else if(T&&D!==y){const L=o(g,m,D,y);if(L)return L}T=_}if(T&&D!==y){const _=o(g,m,D,y);if(_)return _}}return null}_findMatchingBracketDown(f,c,l){const s=f.languageId,d=f.forwardRegex;let n=1,a=0;const o=(h,v,m,w)=>{for(;;){if(l&&++a%100===0&&!l())return r.INSTANCE;const D=E.BracketsUtils.findNextBracketInRange(d,h,v,m,w);if(!D)break;const y=v.substring(D.startColumn-1,D.endColumn-1).toLowerCase();if(f.isOpen(y)?n++:f.isClose(y)&&n--,n===0)return D;m=D.endColumn-1}return null},g=this.textModel.getLineCount();for(let h=c.lineNumber;h<=g;h++){const v=this.textModel.tokenization.getLineTokens(h),m=v.getCount(),w=this.textModel.getLineContent(h);let D=0,y=0,T=0;h===c.lineNumber&&(D=v.findTokenIndexAtOffset(c.column-1),y=c.column-1,T=c.column-1);let _=!0;for(;D<m;D++){const L=v.getLanguageId(D)===s&&!(0,k.ignoreBracketsInToken)(v.getStandardTokenType(D));if(L)_||(y=v.getStartOffset(D)),T=v.getEndOffset(D);else if(_&&y!==T){const M=o(h,w,y,T);if(M)return M}_=L}if(_&&y!==T){const L=o(h,w,y,T);if(L)return L}}return null}findPrevBracket(f){const c=this.textModel.validatePosition(f);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketBefore(c)||null;let l=null,s=null,d=null;for(let n=c.lineNumber;n>=1;n--){const a=this.textModel.tokenization.getLineTokens(n),o=a.getCount(),g=this.textModel.getLineContent(n);let h=o-1,v=g.length,m=g.length;if(n===c.lineNumber){h=a.findTokenIndexAtOffset(c.column-1),v=c.column-1,m=c.column-1;const D=a.getLanguageId(h);l!==D&&(l=D,s=this.languageConfigurationService.getLanguageConfiguration(l).brackets,d=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew)}let w=!0;for(;h>=0;h--){const D=a.getLanguageId(h);if(l!==D){if(s&&d&&w&&v!==m){const T=E.BracketsUtils.findPrevBracketInRange(s.reversedRegex,n,g,v,m);if(T)return this._toFoundBracket(d,T);w=!1}l=D,s=this.languageConfigurationService.getLanguageConfiguration(l).brackets,d=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew}const y=!!s&&!(0,k.ignoreBracketsInToken)(a.getStandardTokenType(h));if(y)w?v=a.getStartOffset(h):(v=a.getStartOffset(h),m=a.getEndOffset(h));else if(d&&s&&w&&v!==m){const T=E.BracketsUtils.findPrevBracketInRange(s.reversedRegex,n,g,v,m);if(T)return this._toFoundBracket(d,T)}w=y}if(d&&s&&w&&v!==m){const D=E.BracketsUtils.findPrevBracketInRange(s.reversedRegex,n,g,v,m);if(D)return this._toFoundBracket(d,D)}}return null}findNextBracket(f){const c=this.textModel.validatePosition(f);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),this.bracketPairsTree.value?.object.getFirstBracketAfter(c)||null;const l=this.textModel.getLineCount();let s=null,d=null,n=null;for(let a=c.lineNumber;a<=l;a++){const o=this.textModel.tokenization.getLineTokens(a),g=o.getCount(),h=this.textModel.getLineContent(a);let v=0,m=0,w=0;if(a===c.lineNumber){v=o.findTokenIndexAtOffset(c.column-1),m=c.column-1,w=c.column-1;const y=o.getLanguageId(v);s!==y&&(s=y,d=this.languageConfigurationService.getLanguageConfiguration(s).brackets,n=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew)}let D=!0;for(;v<g;v++){const y=o.getLanguageId(v);if(s!==y){if(n&&d&&D&&m!==w){const _=E.BracketsUtils.findNextBracketInRange(d.forwardRegex,a,h,m,w);if(_)return this._toFoundBracket(n,_);D=!1}s=y,d=this.languageConfigurationService.getLanguageConfiguration(s).brackets,n=this.languageConfigurationService.getLanguageConfiguration(s).bracketsNew}const T=!!d&&!(0,k.ignoreBracketsInToken)(o.getStandardTokenType(v));if(T)D||(m=o.getStartOffset(v)),w=o.getEndOffset(v);else if(n&&d&&D&&m!==w){const _=E.BracketsUtils.findNextBracketInRange(d.forwardRegex,a,h,m,w);if(_)return this._toFoundBracket(n,_)}D=T}if(n&&d&&D&&m!==w){const y=E.BracketsUtils.findNextBracketInRange(d.forwardRegex,a,h,m,w);if(y)return this._toFoundBracket(n,y)}}return null}findEnclosingBrackets(f,c){const l=this.textModel.validatePosition(f);if(this.canBuildAST){const w=A.Range.fromPositions(l),D=this.getBracketPairsInRange(A.Range.fromPositions(l,l)).findLast(y=>y.closingBracketRange!==void 0&&y.range.strictContainsRange(w));return D?[D.openingBracketRange,D.closingBracketRange]:null}const s=C(c),d=this.textModel.getLineCount(),n=new Map;let a=[];const o=(w,D)=>{if(!n.has(w)){const y=[];for(let T=0,_=D?D.brackets.length:0;T<_;T++)y[T]=0;n.set(w,y)}a=n.get(w)};let g=0;const h=(w,D,y,T,_)=>{for(;;){if(s&&++g%100===0&&!s())return r.INSTANCE;const L=E.BracketsUtils.findNextBracketInRange(w.forwardRegex,D,y,T,_);if(!L)break;const M=y.substring(L.startColumn-1,L.endColumn-1).toLowerCase(),O=w.textIsBracket[M];if(O&&(O.isOpen(M)?a[O.index]++:O.isClose(M)&&a[O.index]--,a[O.index]===-1))return this._matchFoundBracket(L,O,!1,s);T=L.endColumn-1}return null};let v=null,m=null;for(let w=l.lineNumber;w<=d;w++){const D=this.textModel.tokenization.getLineTokens(w),y=D.getCount(),T=this.textModel.getLineContent(w);let _=0,L=0,M=0;if(w===l.lineNumber){_=D.findTokenIndexAtOffset(l.column-1),L=l.column-1,M=l.column-1;const N=D.getLanguageId(_);v!==N&&(v=N,m=this.languageConfigurationService.getLanguageConfiguration(v).brackets,o(v,m))}let O=!0;for(;_<y;_++){const N=D.getLanguageId(_);if(v!==N){if(m&&O&&L!==M){const B=h(m,w,T,L,M);if(B)return u(B);O=!1}v=N,m=this.languageConfigurationService.getLanguageConfiguration(v).brackets,o(v,m)}const P=!!m&&!(0,k.ignoreBracketsInToken)(D.getStandardTokenType(_));if(P)O||(L=D.getStartOffset(_)),M=D.getEndOffset(_);else if(m&&O&&L!==M){const B=h(m,w,T,L,M);if(B)return u(B)}O=P}if(m&&O&&L!==M){const N=h(m,w,T,L,M);if(N)return u(N)}}return null}_toFoundBracket(f,c){if(!c)return null;let l=this.textModel.getValueInRange(c);l=l.toLowerCase();const s=f.getBracketInfo(l);return s?{range:c,bracketInfo:s}:null}}e.BracketPairsTextModelPart=b;function S(i,f){return{object:i,dispose:()=>f?.dispose()}}function C(i){if(typeof i>"u")return()=>!0;{const f=Date.now();return()=>Date.now()-f<=i}}class r{constructor(){this._searchCanceledBrand=void 0}}r.INSTANCE=new r;function u(i){return i instanceof r?null:i}}),define(ae[1289],le([1,0,772,264,771,364,591]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function E(b,S){const C=new A.DenseKeyProvider,r=new t.LanguageAgnosticBracketTokens(C,s=>S.getLanguageConfiguration(s)),u=new k.TextBufferTokenizer(new I([b]),r),i=(0,R.parseDocument)(u,[],void 0,!0);let f="";const c=b.getLineContent();function l(s,d){if(s.kind===2)l(s.openingBracket,d),d=(0,p.lengthAdd)(d,s.openingBracket.length),s.child&&(l(s.child,d),d=(0,p.lengthAdd)(d,s.child.length)),s.closingBracket?(l(s.closingBracket,d),d=(0,p.lengthAdd)(d,s.closingBracket.length)):f+=r.getSingleLanguageBracketTokens(s.openingBracket.languageId).findClosingTokenText(s.openingBracket.bracketIds);else if(s.kind!==3){if(s.kind===0||s.kind===1)f+=c.substring((0,p.lengthGetColumnCountIfZeroLineCount)(d),(0,p.lengthGetColumnCountIfZeroLineCount)((0,p.lengthAdd)(d,s.length)));else if(s.kind===4)for(const n of s.children)l(n,d),d=(0,p.lengthAdd)(d,n.length)}}return l(i,p.lengthZero),f}e.fixBracketsInLine=E;class I{constructor(S){this.lines=S,this.tokenization={getLineTokens:C=>this.lines[C-1]}}getValue(){return this.lines.map(S=>S.getLineContent()).join(` `)}getLineCount(){return this.lines.length}getLineLength(S){return this.lines[S-1].getLineContent().length}}}),define(ae[773],le([1,0,16,28,251,20,730,567,568]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairGuidesClassNames=e.GuidesTextModelPart=void 0;class b extends k.TextModelPart{constructor(r,u){super(),this.textModel=r,this.languageConfigurationService=u}getLanguageConfiguration(r){return this.languageConfigurationService.getLanguageConfiguration(r)}_computeIndentLevel(r){return(0,E.computeIndentLevel)(this.textModel.getLineContent(r+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(r,u,i){this.assertNotDisposed();const f=this.textModel.getLineCount();if(r<1||r>f)throw new Error("Illegal value for lineNumber");const c=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,l=Boolean(c&&c.offSide);let s=-2,d=-1,n=-2,a=-1;const o=O=>{if(s!==-1&&(s===-2||s>O-1)){s=-1,d=-1;for(let N=O-2;N>=0;N--){const P=this._computeIndentLevel(N);if(P>=0){s=N,d=P;break}}}if(n===-2){n=-1,a=-1;for(let N=O;N<f;N++){const P=this._computeIndentLevel(N);if(P>=0){n=N,a=P;break}}}};let g=-2,h=-1,v=-2,m=-1;const w=O=>{if(g===-2){g=-1,h=-1;for(let N=O-2;N>=0;N--){const P=this._computeIndentLevel(N);if(P>=0){g=N,h=P;break}}}if(v!==-1&&(v===-2||v<O-1)){v=-1,m=-1;for(let N=O;N<f;N++){const P=this._computeIndentLevel(N);if(P>=0){v=N,m=P;break}}}};let D=0,y=!0,T=0,_=!0,L=0,M=0;for(let O=0;y||_;O++){const N=r-O,P=r+O;O>1&&(N<1||N<u)&&(y=!1),O>1&&(P>f||P>i)&&(_=!1),O>5e4&&(y=!1,_=!1);let B=-1;if(y&&N>=1){const z=this._computeIndentLevel(N-1);z>=0?(n=N-1,a=z,B=Math.ceil(z/this.textModel.getOptions().indentSize)):(o(N),B=this._getIndentLevelForWhitespaceLine(l,d,a))}let V=-1;if(_&&P<=f){const z=this._computeIndentLevel(P-1);z>=0?(g=P-1,h=z,V=Math.ceil(z/this.textModel.getOptions().indentSize)):(w(P),V=this._getIndentLevelForWhitespaceLine(l,h,m))}if(O===0){M=B;continue}if(O===1){if(P<=f&&V>=0&&M+1===V){y=!1,D=P,T=P,L=V;continue}if(N>=1&&B>=0&&B-1===M){_=!1,D=N,T=N,L=B;continue}if(D=r,T=r,L=M,L===0)return{startLineNumber:D,endLineNumber:T,indent:L}}y&&(B>=L?D=N:y=!1),_&&(V>=L?T=P:_=!1)}return{startLineNumber:D,endLineNumber:T,indent:L}}getLinesBracketGuides(r,u,i,f){const c=[];for(let o=r;o<=u;o++)c.push([]);const l=!0,s=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new A.Range(r,1,u,this.textModel.getLineMaxColumn(u))).toArray();let d;if(i&&s.length>0){const o=(r<=i.lineNumber&&i.lineNumber<=u?s:this.textModel.bracketPairs.getBracketPairsInRange(A.Range.fromPositions(i)).toArray()).filter(g=>A.Range.strictContainsPosition(g.range,i));d=(0,t.findLast)(o,g=>l||g.range.startLineNumber!==g.range.endLineNumber)?.range}const n=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,a=new S;for(const o of s){if(!o.closingBracketRange)continue;const g=d&&o.range.equalsRange(d);if(!g&&!f.includeInactive)continue;const h=a.getInlineClassName(o.nestingLevel,o.nestingLevelOfEqualBracketType,n)+(f.highlightActive&&g?" "+a.activeClassName:""),v=o.openingBracketRange.getStartPosition(),m=o.closingBracketRange.getStartPosition(),w=f.horizontalGuides===I.HorizontalGuidesState.Enabled||f.horizontalGuides===I.HorizontalGuidesState.EnabledForActive&&g;if(o.range.startLineNumber===o.range.endLineNumber){l&&w&&c[o.range.startLineNumber-r].push(new I.IndentGuide(-1,o.openingBracketRange.getEndPosition().column,h,new I.IndentGuideHorizontalLine(!1,m.column),-1,-1));continue}const D=this.getVisibleColumnFromPosition(m),y=this.getVisibleColumnFromPosition(o.openingBracketRange.getStartPosition()),T=Math.min(y,D,o.minVisibleColumnIndentation+1);let _=!1;p.firstNonWhitespaceIndex(this.textModel.getLineContent(o.closingBracketRange.startLineNumber))<o.closingBracketRange.startColumn-1&&(_=!0);const O=Math.max(v.lineNumber,r),N=Math.min(m.lineNumber,u),P=_?1:0;for(let B=O;B<N+P;B++)c[B-r].push(new I.IndentGuide(T,-1,h,null,B===v.lineNumber?v.column:-1,B===m.lineNumber?m.column:-1));w&&(v.lineNumber>=r&&y>T&&c[v.lineNumber-r].push(new I.IndentGuide(T,-1,h,new I.IndentGuideHorizontalLine(!1,v.column),-1,-1)),m.lineNumber<=u&&D>T&&c[m.lineNumber-r].push(new I.IndentGuide(T,-1,h,new I.IndentGuideHorizontalLine(!_,m.column),-1,-1)))}for(const o of c)o.sort((g,h)=>g.visibleColumn-h.visibleColumn);return c}getVisibleColumnFromPosition(r){return R.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(r.lineNumber),r.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(r,u){this.assertNotDisposed();const i=this.textModel.getLineCount();if(r<1||r>i)throw new Error("Illegal value for startLineNumber");if(u<1||u>i)throw new Error("Illegal value for endLineNumber");const f=this.textModel.getOptions(),c=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,l=Boolean(c&&c.offSide),s=new Array(u-r+1);let d=-2,n=-1,a=-2,o=-1;for(let g=r;g<=u;g++){const h=g-r,v=this._computeIndentLevel(g-1);if(v>=0){d=g-1,n=v,s[h]=Math.ceil(v/f.indentSize);continue}if(d===-2){d=-1,n=-1;for(let m=g-2;m>=0;m--){const w=this._computeIndentLevel(m);if(w>=0){d=m,n=w;break}}}if(a!==-1&&(a===-2||a<g-1)){a=-1,o=-1;for(let m=g;m<i;m++){const w=this._computeIndentLevel(m);if(w>=0){a=m,o=w;break}}}s[h]=this._getIndentLevelForWhitespaceLine(l,n,o)}return s}_getIndentLevelForWhitespaceLine(r,u,i){const f=this.textModel.getOptions();return u===-1||i===-1?0:u<i?1+Math.floor(u/f.indentSize):u===i||r?Math.ceil(i/f.indentSize):1+Math.floor(i/f.indentSize)}}e.GuidesTextModelPart=b;class S{constructor(){this.activeClassName="indent-active"}getInlineClassName(r,u,i){return this.getInlineClassNameOfLevel(i?u:r)}getInlineClassNameOfLevel(r){return`bracket-indent-guide lvl-${r%30}`}}e.BracketPairGuidesClassNames=S}),define(ae[1290],le([1,0,28,50,365]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MirrorTextModel=void 0;class A{constructor(E,I,b,S){this._uri=E,this._lines=I,this._eol=b,this._versionId=S,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(E){E.eol&&E.eol!==this._eol&&(this._eol=E.eol,this._lineStarts=null);const I=E.changes;for(const b of I)this._acceptDeleteRange(b.range),this._acceptInsertText(new p.Position(b.range.startLineNumber,b.range.startColumn),b.text);this._versionId=E.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const E=this._eol.length,I=this._lines.length,b=new Uint32Array(I);for(let S=0;S<I;S++)b[S]=this._lines[S].length+E;this._lineStarts=new R.PrefixSumComputer(b)}}_setLineText(E,I){this._lines[E]=I,this._lineStarts&&this._lineStarts.setValue(E,this._lines[E].length+this._eol.length)}_acceptDeleteRange(E){if(E.startLineNumber===E.endLineNumber){if(E.startColumn===E.endColumn)return;this._setLineText(E.startLineNumber-1,this._lines[E.startLineNumber-1].substring(0,E.startColumn-1)+this._lines[E.startLineNumber-1].substring(E.endColumn-1));return}this._setLineText(E.startLineNumber-1,this._lines[E.startLineNumber-1].substring(0,E.startColumn-1)+this._lines[E.endLineNumber-1].substring(E.endColumn-1)),this._lines.splice(E.startLineNumber,E.endLineNumber-E.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(E.startLineNumber,E.endLineNumber-E.startLineNumber)}_acceptInsertText(E,I){if(I.length===0)return;const b=(0,t.splitLines)(I);if(b.length===1){this._setLineText(E.lineNumber-1,this._lines[E.lineNumber-1].substring(0,E.column-1)+b[0]+this._lines[E.lineNumber-1].substring(E.column-1));return}b[b.length-1]+=this._lines[E.lineNumber-1].substring(E.column-1),this._setLineText(E.lineNumber-1,this._lines[E.lineNumber-1].substring(0,E.column-1)+b[0]);const S=new Uint32Array(b.length-1);for(let C=1;C<b.length;C++)this._lines.splice(E.lineNumber+C-1,0,b[C]),S[C-1]=b[C].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(E.lineNumber,S)}}e.MirrorTextModel=A}),define(ae[370],le([1,0,28,409,50,20,116]),function(J,e,t,p,R,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 E=999;class I{constructor(s,d,n,a){this.searchString=s,this.isRegex=d,this.matchCase=n,this.wordSeparators=a}parseSearchRequest(){if(this.searchString==="")return null;let s;this.isRegex?s=b(this.searchString):s=this.searchString.indexOf(` `)>=0;let d=null;try{d=t.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:s,global:!0,unicode:!0})}catch{return null}if(!d)return null;let n=!this.isRegex&&!s;return n&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(n=this.matchCase),new k.SearchData(d,this.wordSeparators?(0,p.getMapForWordSeparators)(this.wordSeparators):null,n?this.searchString:null)}}e.SearchParams=I;function b(l){if(!l||l.length===0)return!1;for(let s=0,d=l.length;s<d;s++){const n=l.charCodeAt(s);if(n===10)return!0;if(n===92){if(s++,s>=d)break;const a=l.charCodeAt(s);if(a===110||a===114||a===87)return!0}}return!1}e.isMultilineRegexSource=b;function S(l,s,d){if(!d)return new k.FindMatch(l,null);const n=[];for(let a=0,o=s.length;a<o;a++)n[a]=s[a];return new k.FindMatch(l,n)}e.createFindMatch=S;class C{constructor(s){const d=[];let n=0;for(let a=0,o=s.length;a<o;a++)s.charCodeAt(a)===10&&(d[n++]=a);this._lineFeedsOffsets=d}findLineFeedCountBeforeOffset(s){const d=this._lineFeedsOffsets;let n=0,a=d.length-1;if(a===-1||s<=d[0])return 0;for(;n<a;){const o=n+((a-n)/2>>0);d[o]>=s?a=o-1:d[o+1]>=s?(n=o,a=o):n=o+1}return n+1}}class r{static findMatches(s,d,n,a,o){const g=d.parseSearchRequest();return g?g.regex.multiline?this._doFindMatchesMultiline(s,n,new c(g.wordSeparators,g.regex),a,o):this._doFindMatchesLineByLine(s,n,g,a,o):[]}static _getMultilineMatchRange(s,d,n,a,o,g){let h,v=0;a?(v=a.findLineFeedCountBeforeOffset(o),h=d+o+v):h=d+o;let m;if(a){const T=a.findLineFeedCountBeforeOffset(o+g.length)-v;m=h+g.length+T}else m=h+g.length;const w=s.getPositionAt(h),D=s.getPositionAt(m);return new A.Range(w.lineNumber,w.column,D.lineNumber,D.column)}static _doFindMatchesMultiline(s,d,n,a,o){const g=s.getOffsetAt(d.getStartPosition()),h=s.getValueInRange(d,1),v=s.getEOL()===`\r `?new C(h):null,m=[];let w=0,D;for(n.reset(0);D=n.next(h);)if(m[w++]=S(this._getMultilineMatchRange(s,g,h,v,D.index,D[0]),D,a),w>=o)return m;return m}static _doFindMatchesLineByLine(s,d,n,a,o){const g=[];let h=0;if(d.startLineNumber===d.endLineNumber){const m=s.getLineContent(d.startLineNumber).substring(d.startColumn-1,d.endColumn-1);return h=this._findMatchesInLine(n,m,d.startLineNumber,d.startColumn-1,h,g,a,o),g}const v=s.getLineContent(d.startLineNumber).substring(d.startColumn-1);h=this._findMatchesInLine(n,v,d.startLineNumber,d.startColumn-1,h,g,a,o);for(let m=d.startLineNumber+1;m<d.endLineNumber&&h<o;m++)h=this._findMatchesInLine(n,s.getLineContent(m),m,0,h,g,a,o);if(h<o){const m=s.getLineContent(d.endLineNumber).substring(0,d.endColumn-1);h=this._findMatchesInLine(n,m,d.endLineNumber,0,h,g,a,o)}return g}static _findMatchesInLine(s,d,n,a,o,g,h,v){const m=s.wordSeparators;if(!h&&s.simpleSearch){const y=s.simpleSearch,T=y.length,_=d.length;let L=-T;for(;(L=d.indexOf(y,L+T))!==-1;)if((!m||f(m,d,_,L,T))&&(g[o++]=new k.FindMatch(new A.Range(n,L+1+a,n,L+1+T+a),null),o>=v))return o;return o}const w=new c(s.wordSeparators,s.regex);let D;w.reset(0);do if(D=w.next(d),D&&(g[o++]=S(new A.Range(n,D.index+1+a,n,D.index+1+D[0].length+a),D,h),o>=v))return o;while(D);return o}static findNextMatch(s,d,n,a){const o=d.parseSearchRequest();if(!o)return null;const g=new c(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(s,n,g,a):this._doFindNextMatchLineByLine(s,n,g,a)}static _doFindNextMatchMultiline(s,d,n,a){const o=new R.Position(d.lineNumber,1),g=s.getOffsetAt(o),h=s.getLineCount(),v=s.getValueInRange(new A.Range(o.lineNumber,o.column,h,s.getLineMaxColumn(h)),1),m=s.getEOL()===`\r `?new C(v):null;n.reset(d.column-1);const w=n.next(v);return w?S(this._getMultilineMatchRange(s,g,v,m,w.index,w[0]),w,a):d.lineNumber!==1||d.column!==1?this._doFindNextMatchMultiline(s,new R.Position(1,1),n,a):null}static _doFindNextMatchLineByLine(s,d,n,a){const o=s.getLineCount(),g=d.lineNumber,h=s.getLineContent(g),v=this._findFirstMatchInLine(n,h,g,d.column,a);if(v)return v;for(let m=1;m<=o;m++){const w=(g+m-1)%o,D=s.getLineContent(w+1),y=this._findFirstMatchInLine(n,D,w+1,1,a);if(y)return y}return null}static _findFirstMatchInLine(s,d,n,a,o){s.reset(a-1);const g=s.next(d);return g?S(new A.Range(n,g.index+1,n,g.index+1+g[0].length),g,o):null}static findPreviousMatch(s,d,n,a){const o=d.parseSearchRequest();if(!o)return null;const g=new c(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(s,n,g,a):this._doFindPreviousMatchLineByLine(s,n,g,a)}static _doFindPreviousMatchMultiline(s,d,n,a){const o=this._doFindMatchesMultiline(s,new A.Range(1,1,d.lineNumber,d.column),n,a,10*E);if(o.length>0)return o[o.length-1];const g=s.getLineCount();return d.lineNumber!==g||d.column!==s.getLineMaxColumn(g)?this._doFindPreviousMatchMultiline(s,new R.Position(g,s.getLineMaxColumn(g)),n,a):null}static _doFindPreviousMatchLineByLine(s,d,n,a){const o=s.getLineCount(),g=d.lineNumber,h=s.getLineContent(g).substring(0,d.column-1),v=this._findLastMatchInLine(n,h,g,a);if(v)return v;for(let m=1;m<=o;m++){const w=(o+g-m-1)%o,D=s.getLineContent(w+1),y=this._findLastMatchInLine(n,D,w+1,a);if(y)return y}return null}static _findLastMatchInLine(s,d,n,a){let o=null,g;for(s.reset(0);g=s.next(d);)o=S(new A.Range(n,g.index+1,n,g.index+1+g[0].length),g,a);return o}}e.TextModelSearch=r;function u(l,s,d,n,a){if(n===0)return!0;const o=s.charCodeAt(n-1);if(l.get(o)!==0||o===13||o===10)return!0;if(a>0){const g=s.charCodeAt(n);if(l.get(g)!==0)return!0}return!1}function i(l,s,d,n,a){if(n+a===d)return!0;const o=s.charCodeAt(n+a);if(l.get(o)!==0||o===13||o===10)return!0;if(a>0){const g=s.charCodeAt(n+a-1);if(l.get(g)!==0)return!0}return!1}function f(l,s,d,n,a){return u(l,s,d,n,a)&&i(l,s,d,n,a)}e.isValidMatch=f;class c{constructor(s,d){this._wordSeparators=s,this._searchRegex=d,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(s){this._searchRegex.lastIndex=s,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(s){const d=s.length;let n;do{if(this._prevMatchStartIndex+this._prevMatchLength===d||(n=this._searchRegex.exec(s),!n))return null;const a=n.index,o=n[0].length;if(a===this._prevMatchStartIndex&&o===this._prevMatchLength){if(o===0){t.getNextCodePoint(s,d,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=a,this._prevMatchLength=o,!this._wordSeparators||f(this._wordSeparators,s,d,a,o))return n}while(n);return null}}e.Searcher=c}),define(ae[774],le([1,0,50,20,116,1208,370]),function(J,e,t,p,R,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 E(c){let l;return c[c.length-1]<65536?l=new Uint16Array(c.length):l=new Uint32Array(c.length),l.set(c,0),l}e.createUintArray=E;class I{constructor(l,s,d,n,a){this.lineStarts=l,this.cr=s,this.lf=d,this.crlf=n,this.isBasicASCII=a}}e.LineStarts=I;function b(c,l=!0){const s=[0];let d=1;for(let n=0,a=c.length;n<a;n++){const o=c.charCodeAt(n);o===13?n+1<a&&c.charCodeAt(n+1)===10?(s[d++]=n+2,n++):s[d++]=n+1:o===10&&(s[d++]=n+1)}return l?E(s):s}e.createLineStartsFast=b;function S(c,l){c.length=0,c[0]=0;let s=1,d=0,n=0,a=0,o=!0;for(let h=0,v=l.length;h<v;h++){const m=l.charCodeAt(h);m===13?h+1<v&&l.charCodeAt(h+1)===10?(a++,c[s++]=h+2,h++):(d++,c[s++]=h+1):m===10?(n++,c[s++]=h+1):o&&m!==9&&(m<32||m>126)&&(o=!1)}const g=new I(E(c),d,n,a,o);return c.length=0,g}e.createLineStarts=S;class C{constructor(l,s,d,n,a){this.bufferIndex=l,this.start=s,this.end=d,this.lineFeedCnt=n,this.length=a}}e.Piece=C;class r{constructor(l,s){this.buffer=l,this.lineStarts=s}}e.StringBuffer=r;class u{constructor(l,s){this._pieces=[],this._tree=l,this._BOM=s,this._index=0,l.root!==A.SENTINEL&&l.iterate(l.root,d=>(d!==A.SENTINEL&&this._pieces.push(d.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 s=this._cache.length-1;s>=0;s--){const d=this._cache[s];if(d.nodeStartOffset<=l&&d.nodeStartOffset+d.node.piece.length>=l)return d}return null}get2(l){for(let s=this._cache.length-1;s>=0;s--){const d=this._cache[s];if(d.nodeStartLineNumber&&d.nodeStartLineNumber<l&&d.nodeStartLineNumber+d.node.piece.lineFeedCnt>=l)return d}return null}set(l){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(l)}validate(l){let s=!1;const d=this._cache;for(let n=0;n<d.length;n++){const a=d[n];if(a.node.parent===null||a.nodeStartOffset>=l){d[n]=null,s=!0;continue}}if(s){const n=[];for(const a of d)a!==null&&n.push(a);this._cache=n}}}class f{constructor(l,s,d){this.create(l,s,d)}create(l,s,d){this._buffers=[new r("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=A.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=s,this._EOLLength=s.length,this._EOLNormalized=d;let n=null;for(let a=0,o=l.length;a<o;a++)if(l[a].buffer.length>0){l[a].lineStarts||(l[a].lineStarts=b(l[a].buffer));const g=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]),n=this.rbInsertRight(n,g)}this._searchCache=new i(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(l){const s=e.AverageBufferSize,d=s-Math.floor(s/3),n=d*2;let a="",o=0;const g=[];if(this.iterate(this.root,h=>{const v=this.getNodeContent(h),m=v.length;if(o<=d||o+m<n)return a+=v,o+=m,!0;const w=a.replace(/\r\n|\r|\n/g,l);return g.push(new r(w,b(w))),a=v,o=m,!0}),o>0){const h=a.replace(/\r\n|\r|\n/g,l);g.push(new r(h,b(h)))}this.create(g,l,!0)}getEOL(){return this._EOL}setEOL(l){this._EOL=l,this._EOLLength=this._EOL.length,this.normalizeEOL(l)}createSnapshot(l){return new u(this,l)}equal(l){if(this.getLength()!==l.getLength()||this.getLineCount()!==l.getLineCount())return!1;const s=0;return this.iterate(this.root,n=>{if(n===A.SENTINEL)return!0;const a=this.getNodeContent(n),o=a.length,g=l.nodeAt(s),h=l.nodeAt(s+o),v=l.getValueInRange2(g,h);return a===v})}getOffsetAt(l,s){let d=0,n=this.root;for(;n!==A.SENTINEL;)if(n.left!==A.SENTINEL&&n.lf_left+1>=l)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=l)return d+=n.size_left,d+=this.getAccumulatedValue(n,l-n.lf_left-2)+s-1;l-=n.lf_left+n.piece.lineFeedCnt,d+=n.size_left+n.piece.length,n=n.right}return d}getPositionAt(l){l=Math.floor(l),l=Math.max(0,l);let s=this.root,d=0;const n=l;for(;s!==A.SENTINEL;)if(s.size_left!==0&&s.size_left>=l)s=s.left;else if(s.size_left+s.piece.length>=l){const a=this.getIndexOf(s,l-s.size_left);if(d+=s.lf_left+a.index,a.index===0){const o=this.getOffsetAt(d+1,1),g=n-o;return new t.Position(d+1,g+1)}return new t.Position(d+1,a.remainder+1)}else if(l-=s.size_left+s.piece.length,d+=s.lf_left+s.piece.lineFeedCnt,s.right===A.SENTINEL){const a=this.getOffsetAt(d+1,1),o=n-l-a;return new t.Position(d+1,o+1)}else s=s.right;return new t.Position(1,1)}getValueInRange(l,s){if(l.startLineNumber===l.endLineNumber&&l.startColumn===l.endColumn)return"";const d=this.nodeAt2(l.startLineNumber,l.startColumn),n=this.nodeAt2(l.endLineNumber,l.endColumn),a=this.getValueInRange2(d,n);return s?s!==this._EOL||!this._EOLNormalized?a.replace(/\r\n|\r|\n/g,s):s===this.getEOL()&&this._EOLNormalized?a:a.replace(/\r\n|\r|\n/g,s):a}getValueInRange2(l,s){if(l.node===s.node){const g=l.node,h=this._buffers[g.piece.bufferIndex].buffer,v=this.offsetInBuffer(g.piece.bufferIndex,g.piece.start);return h.substring(v+l.remainder,v+s.remainder)}let d=l.node;const n=this._buffers[d.piece.bufferIndex].buffer,a=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);let o=n.substring(a+l.remainder,a+d.piece.length);for(d=d.next();d!==A.SENTINEL;){const g=this._buffers[d.piece.bufferIndex].buffer,h=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);if(d===s.node){o+=g.substring(h,h+s.remainder);break}else o+=g.substr(h,d.piece.length);d=d.next()}return o}getLinesContent(){const l=[];let s=0,d="",n=!1;return this.iterate(this.root,a=>{if(a===A.SENTINEL)return!0;const o=a.piece;let g=o.length;if(g===0)return!0;const h=this._buffers[o.bufferIndex].buffer,v=this._buffers[o.bufferIndex].lineStarts,m=o.start.line,w=o.end.line;let D=v[m]+o.start.column;if(n&&(h.charCodeAt(D)===10&&(D++,g--),l[s++]=d,d="",n=!1,g===0))return!0;if(m===w)return!this._EOLNormalized&&h.charCodeAt(D+g-1)===13?(n=!0,d+=h.substr(D,g-1)):d+=h.substr(D,g),!0;d+=this._EOLNormalized?h.substring(D,Math.max(D,v[m+1]-this._EOLLength)):h.substring(D,v[m+1]).replace(/(\r\n|\r|\n)$/,""),l[s++]=d;for(let y=m+1;y<w;y++)d=this._EOLNormalized?h.substring(v[y],v[y+1]-this._EOLLength):h.substring(v[y],v[y+1]).replace(/(\r\n|\r|\n)$/,""),l[s++]=d;return!this._EOLNormalized&&h.charCodeAt(v[w]+o.end.column-1)===13?(n=!0,o.end.column===0?s--:d=h.substr(v[w],o.end.column-1)):d=h.substr(v[w],o.end.column),!0}),n&&(l[s++]=d,d=""),l[s++]=d,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 s=l.node.next();if(!s)return 0;const d=this._buffers[s.piece.bufferIndex],n=this.offsetInBuffer(s.piece.bufferIndex,s.piece.start);return d.buffer.charCodeAt(n)}else{const s=this._buffers[l.node.piece.bufferIndex],n=this.offsetInBuffer(l.node.piece.bufferIndex,l.node.piece.start)+l.remainder;return s.buffer.charCodeAt(n)}}getLineCharCode(l,s){const d=this.nodeAt2(l,s+1);return this._getCharCode(d)}getLineLength(l){if(l===this.getLineCount()){const s=this.getOffsetAt(l,1);return this.getLength()-s}return this.getOffsetAt(l+1,1)-this.getOffsetAt(l,1)-this._EOLLength}getCharCode(l){const s=this.nodeAt(l);return this._getCharCode(s)}findMatchesInNode(l,s,d,n,a,o,g,h,v,m,w){const D=this._buffers[l.piece.bufferIndex],y=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start),T=this.offsetInBuffer(l.piece.bufferIndex,a),_=this.offsetInBuffer(l.piece.bufferIndex,o);let L;const M={line:0,column:0};let O,N;s._wordSeparators?(O=D.buffer.substring(T,_),N=P=>P+T,s.reset(0)):(O=D.buffer,N=P=>P,s.reset(T));do if(L=s.next(O),L){if(N(L.index)>=_)return m;this.positionInBuffer(l,N(L.index)-y,M);const P=this.getLineFeedCnt(l.piece.bufferIndex,a,M),B=M.line===a.line?M.column-a.column+n:M.column+1,V=B+L[0].length;if(w[m++]=(0,k.createFindMatch)(new p.Range(d+P,B,d+P,V),L,h),N(L.index)+L[0].length>=_||m>=v)return m}while(L);return m}findMatchesLineByLine(l,s,d,n){const a=[];let o=0;const g=new k.Searcher(s.wordSeparators,s.regex);let h=this.nodeAt2(l.startLineNumber,l.startColumn);if(h===null)return[];const v=this.nodeAt2(l.endLineNumber,l.endColumn);if(v===null)return[];let m=this.positionInBuffer(h.node,h.remainder);const w=this.positionInBuffer(v.node,v.remainder);if(h.node===v.node)return this.findMatchesInNode(h.node,g,l.startLineNumber,l.startColumn,m,w,s,d,n,o,a),a;let D=l.startLineNumber,y=h.node;for(;y!==v.node;){const _=this.getLineFeedCnt(y.piece.bufferIndex,m,y.piece.end);if(_>=1){const M=this._buffers[y.piece.bufferIndex].lineStarts,O=this.offsetInBuffer(y.piece.bufferIndex,y.piece.start),N=M[m.line+_],P=D===l.startLineNumber?l.startColumn:1;if(o=this.findMatchesInNode(y,g,D,P,m,this.positionInBuffer(y,N-O),s,d,n,o,a),o>=n)return a;D+=_}const L=D===l.startLineNumber?l.startColumn-1:0;if(D===l.endLineNumber){const M=this.getLineContent(D).substring(L,l.endColumn-1);return o=this._findMatchesInLine(s,g,M,l.endLineNumber,L,o,a,d,n),a}if(o=this._findMatchesInLine(s,g,this.getLineContent(D).substr(L),D,L,o,a,d,n),o>=n)return a;D++,h=this.nodeAt2(D,1),y=h.node,m=this.positionInBuffer(h.node,h.remainder)}if(D===l.endLineNumber){const _=D===l.startLineNumber?l.startColumn-1:0,L=this.getLineContent(D).substring(_,l.endColumn-1);return o=this._findMatchesInLine(s,g,L,l.endLineNumber,_,o,a,d,n),a}const T=D===l.startLineNumber?l.startColumn:1;return o=this.findMatchesInNode(v.node,g,D,T,m,w,s,d,n,o,a),a}_findMatchesInLine(l,s,d,n,a,o,g,h,v){const m=l.wordSeparators;if(!h&&l.simpleSearch){const D=l.simpleSearch,y=D.length,T=d.length;let _=-y;for(;(_=d.indexOf(D,_+y))!==-1;)if((!m||(0,k.isValidMatch)(m,d,T,_,y))&&(g[o++]=new R.FindMatch(new p.Range(n,_+1+a,n,_+1+y+a),null),o>=v))return o;return o}let w;s.reset(0);do if(w=s.next(d),w&&(g[o++]=(0,k.createFindMatch)(new p.Range(n,w.index+1+a,n,w.index+1+w[0].length+a),w,h),o>=v))return o;while(w);return o}insert(l,s,d=!1){if(this._EOLNormalized=this._EOLNormalized&&d,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==A.SENTINEL){const{node:n,remainder:a,nodeStartOffset:o}=this.nodeAt(l),g=n.piece,h=g.bufferIndex,v=this.positionInBuffer(n,a);if(n.piece.bufferIndex===0&&g.end.line===this._lastChangeBufferPos.line&&g.end.column===this._lastChangeBufferPos.column&&o+g.length===l&&s.length<e.AverageBufferSize){this.appendToNode(n,s),this.computeBufferMetadata();return}if(o===l)this.insertContentToNodeLeft(s,n),this._searchCache.validate(l);else if(o+n.piece.length>l){const m=[];let w=new C(g.bufferIndex,v,g.end,this.getLineFeedCnt(g.bufferIndex,v,g.end),this.offsetInBuffer(h,g.end)-this.offsetInBuffer(h,v));if(this.shouldCheckCRLF()&&this.endWithCR(s)&&this.nodeCharCodeAt(n,a)===10){const _={line:w.start.line+1,column:0};w=new C(w.bufferIndex,_,w.end,this.getLineFeedCnt(w.bufferIndex,_,w.end),w.length-1),s+=` `}if(this.shouldCheckCRLF()&&this.startWithLF(s))if(this.nodeCharCodeAt(n,a-1)===13){const _=this.positionInBuffer(n,a-1);this.deleteNodeTail(n,_),s="\r"+s,n.piece.length===0&&m.push(n)}else this.deleteNodeTail(n,v);else this.deleteNodeTail(n,v);const D=this.createNewPieces(s);w.length>0&&this.rbInsertRight(n,w);let y=n;for(let T=0;T<D.length;T++)y=this.rbInsertRight(y,D[T]);this.deleteNodes(m)}else this.insertContentToNodeRight(s,n)}else{const n=this.createNewPieces(s);let a=this.rbInsertLeft(null,n[0]);for(let o=1;o<n.length;o++)a=this.rbInsertRight(a,n[o])}this.computeBufferMetadata()}delete(l,s){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",s<=0||this.root===A.SENTINEL)return;const d=this.nodeAt(l),n=this.nodeAt(l+s),a=d.node,o=n.node;if(a===o){const D=this.positionInBuffer(a,d.remainder),y=this.positionInBuffer(a,n.remainder);if(d.nodeStartOffset===l){if(s===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(d.nodeStartOffset+a.piece.length===l+s){this.deleteNodeTail(a,D),this.validateCRLFWithNextNode(a),this.computeBufferMetadata();return}this.shrinkNode(a,D,y),this.computeBufferMetadata();return}const g=[],h=this.positionInBuffer(a,d.remainder);this.deleteNodeTail(a,h),this._searchCache.validate(l),a.piece.length===0&&g.push(a);const v=this.positionInBuffer(o,n.remainder);this.deleteNodeHead(o,v),o.piece.length===0&&g.push(o);const m=a.next();for(let D=m;D!==A.SENTINEL&&D!==o;D=D.next())g.push(D);const w=a.piece.length===0?a.prev():a;this.deleteNodes(g),this.validateCRLFWithNextNode(w),this.computeBufferMetadata()}insertContentToNodeLeft(l,s){const d=[];if(this.shouldCheckCRLF()&&this.endWithCR(l)&&this.startWithLF(s)){const o=s.piece,g={line:o.start.line+1,column:0},h=new C(o.bufferIndex,g,o.end,this.getLineFeedCnt(o.bufferIndex,g,o.end),o.length-1);s.piece=h,l+=` `,(0,A.updateTreeMetadata)(this,s,-1,-1),s.piece.length===0&&d.push(s)}const n=this.createNewPieces(l);let a=this.rbInsertLeft(s,n[n.length-1]);for(let o=n.length-2;o>=0;o--)a=this.rbInsertLeft(a,n[o]);this.validateCRLFWithPrevNode(a),this.deleteNodes(d)}insertContentToNodeRight(l,s){this.adjustCarriageReturnFromNext(l,s)&&(l+=` `);const d=this.createNewPieces(l),n=this.rbInsertRight(s,d[0]);let a=n;for(let o=1;o<d.length;o++)a=this.rbInsertRight(a,d[o]);this.validateCRLFWithPrevNode(n)}positionInBuffer(l,s,d){const n=l.piece,a=l.piece.bufferIndex,o=this._buffers[a].lineStarts,h=o[n.start.line]+n.start.column+s;let v=n.start.line,m=n.end.line,w=0,D=0,y=0;for(;v<=m&&(w=v+(m-v)/2|0,y=o[w],w!==m);)if(D=o[w+1],h<y)m=w-1;else if(h>=D)v=w+1;else break;return d?(d.line=w,d.column=h-y,null):{line:w,column:h-y}}getLineFeedCnt(l,s,d){if(d.column===0)return d.line-s.line;const n=this._buffers[l].lineStarts;if(d.line===n.length-1)return d.line-s.line;const a=n[d.line+1],o=n[d.line]+d.column;if(a>o+1)return d.line-s.line;const g=o-1;return this._buffers[l].buffer.charCodeAt(g)===13?d.line-s.line+1:d.line-s.line}offsetInBuffer(l,s){return this._buffers[l].lineStarts[s.line]+s.column}deleteNodes(l){for(let s=0;s<l.length;s++)(0,A.rbDelete)(this,l[s])}createNewPieces(l){if(l.length>e.AverageBufferSize){const m=[];for(;l.length>e.AverageBufferSize;){const D=l.charCodeAt(e.AverageBufferSize-1);let y;D===13||D>=55296&&D<=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=b(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 r(y,T))}const w=b(l);return m.push(new C(this._buffers.length,{line:0,column:0},{line:w.length-1,column:l.length-w[w.length-1]},w.length-1,l.length)),this._buffers.push(new r(l,w)),m}let s=this._buffers[0].buffer.length;const d=b(l,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===s&&s!==0&&this.startWithLF(l)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let m=0;m<d.length;m++)d[m]+=s+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(d.slice(1)),this._buffers[0].buffer+="_"+l,s+=1}else{if(s!==0)for(let m=0;m<d.length;m++)d[m]+=s;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(d.slice(1)),this._buffers[0].buffer+=l}const a=this._buffers[0].buffer.length,o=this._buffers[0].lineStarts.length-1,g=a-this._buffers[0].lineStarts[o],h={line:o,column:g},v=new C(0,n,h,this.getLineFeedCnt(0,n,h),a-s);return this._lastChangeBufferPos=h,[v]}getLinesRawContent(){return this.getContentOfSubTree(this.root)}getLineRawContent(l,s=0){let d=this.root,n="";const a=this._searchCache.get2(l);if(a){d=a.node;const o=this.getAccumulatedValue(d,l-a.nodeStartLineNumber-1),g=this._buffers[d.piece.bufferIndex].buffer,h=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);if(a.nodeStartLineNumber+d.piece.lineFeedCnt===l)n=g.substring(h+o,h+d.piece.length);else{const v=this.getAccumulatedValue(d,l-a.nodeStartLineNumber);return g.substring(h+o,h+v-s)}}else{let o=0;const g=l;for(;d!==A.SENTINEL;)if(d.left!==A.SENTINEL&&d.lf_left>=l-1)d=d.left;else if(d.lf_left+d.piece.lineFeedCnt>l-1){const h=this.getAccumulatedValue(d,l-d.lf_left-2),v=this.getAccumulatedValue(d,l-d.lf_left-1),m=this._buffers[d.piece.bufferIndex].buffer,w=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);return o+=d.size_left,this._searchCache.set({node:d,nodeStartOffset:o,nodeStartLineNumber:g-(l-1-d.lf_left)}),m.substring(w+h,w+v-s)}else if(d.lf_left+d.piece.lineFeedCnt===l-1){const h=this.getAccumulatedValue(d,l-d.lf_left-2),v=this._buffers[d.piece.bufferIndex].buffer,m=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);n=v.substring(m+h,m+d.piece.length);break}else l-=d.lf_left+d.piece.lineFeedCnt,o+=d.size_left+d.piece.length,d=d.right}for(d=d.next();d!==A.SENTINEL;){const o=this._buffers[d.piece.bufferIndex].buffer;if(d.piece.lineFeedCnt>0){const g=this.getAccumulatedValue(d,0),h=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);return n+=o.substring(h,h+g-s),n}else{const g=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start);n+=o.substr(g,d.piece.length)}d=d.next()}return n}computeBufferMetadata(){let l=this.root,s=1,d=0;for(;l!==A.SENTINEL;)s+=l.lf_left+l.piece.lineFeedCnt,d+=l.size_left+l.piece.length,l=l.right;this._lineCnt=s,this._length=d,this._searchCache.validate(this._length)}getIndexOf(l,s){const d=l.piece,n=this.positionInBuffer(l,s),a=n.line-d.start.line;if(this.offsetInBuffer(d.bufferIndex,d.end)-this.offsetInBuffer(d.bufferIndex,d.start)===s){const o=this.getLineFeedCnt(l.piece.bufferIndex,d.start,n);if(o!==a)return{index:o,remainder:0}}return{index:a,remainder:n.column}}getAccumulatedValue(l,s){if(s<0)return 0;const d=l.piece,n=this._buffers[d.bufferIndex].lineStarts,a=d.start.line+s+1;return a>d.end.line?n[d.end.line]+d.end.column-n[d.start.line]-d.start.column:n[a]-n[d.start.line]-d.start.column}deleteNodeTail(l,s){const d=l.piece,n=d.lineFeedCnt,a=this.offsetInBuffer(d.bufferIndex,d.end),o=s,g=this.offsetInBuffer(d.bufferIndex,o),h=this.getLineFeedCnt(d.bufferIndex,d.start,o),v=h-n,m=g-a,w=d.length+m;l.piece=new C(d.bufferIndex,d.start,o,h,w),(0,A.updateTreeMetadata)(this,l,m,v)}deleteNodeHead(l,s){const d=l.piece,n=d.lineFeedCnt,a=this.offsetInBuffer(d.bufferIndex,d.start),o=s,g=this.getLineFeedCnt(d.bufferIndex,o,d.end),h=this.offsetInBuffer(d.bufferIndex,o),v=g-n,m=a-h,w=d.length+m;l.piece=new C(d.bufferIndex,o,d.end,g,w),(0,A.updateTreeMetadata)(this,l,m,v)}shrinkNode(l,s,d){const n=l.piece,a=n.start,o=n.end,g=n.length,h=n.lineFeedCnt,v=s,m=this.getLineFeedCnt(n.bufferIndex,n.start,v),w=this.offsetInBuffer(n.bufferIndex,s)-this.offsetInBuffer(n.bufferIndex,a);l.piece=new C(n.bufferIndex,n.start,v,m,w),(0,A.updateTreeMetadata)(this,l,w-g,m-h);const D=new C(n.bufferIndex,d,o,this.getLineFeedCnt(n.bufferIndex,d,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,d)),y=this.rbInsertRight(l,D);this.validateCRLFWithPrevNode(y)}appendToNode(l,s){this.adjustCarriageReturnFromNext(s,l)&&(s+=` `);const d=this.shouldCheckCRLF()&&this.startWithLF(s)&&this.endWithCR(l),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=s;const a=b(s,!1);for(let y=0;y<a.length;y++)a[y]+=n;if(d){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:n-y}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(a.slice(1));const o=this._buffers[0].lineStarts.length-1,g=this._buffers[0].buffer.length-this._buffers[0].lineStarts[o],h={line:o,column:g},v=l.piece.length+s.length,m=l.piece.lineFeedCnt,w=this.getLineFeedCnt(0,l.piece.start,h),D=w-m;l.piece=new C(l.piece.bufferIndex,l.piece.start,h,w,v),this._lastChangeBufferPos=h,(0,A.updateTreeMetadata)(this,l,s.length,D)}nodeAt(l){let s=this.root;const d=this._searchCache.get(l);if(d)return{node:d.node,nodeStartOffset:d.nodeStartOffset,remainder:l-d.nodeStartOffset};let n=0;for(;s!==A.SENTINEL;)if(s.size_left>l)s=s.left;else if(s.size_left+s.piece.length>=l){n+=s.size_left;const a={node:s,remainder:l-s.size_left,nodeStartOffset:n};return this._searchCache.set(a),a}else l-=s.size_left+s.piece.length,n+=s.size_left+s.piece.length,s=s.right;return null}nodeAt2(l,s){let d=this.root,n=0;for(;d!==A.SENTINEL;)if(d.left!==A.SENTINEL&&d.lf_left>=l-1)d=d.left;else if(d.lf_left+d.piece.lineFeedCnt>l-1){const a=this.getAccumulatedValue(d,l-d.lf_left-2),o=this.getAccumulatedValue(d,l-d.lf_left-1);return n+=d.size_left,{node:d,remainder:Math.min(a+s-1,o),nodeStartOffset:n}}else if(d.lf_left+d.piece.lineFeedCnt===l-1){const a=this.getAccumulatedValue(d,l-d.lf_left-2);if(a+s-1<=d.piece.length)return{node:d,remainder:a+s-1,nodeStartOffset:n};s-=d.piece.length-a;break}else l-=d.lf_left+d.piece.lineFeedCnt,n+=d.size_left+d.piece.length,d=d.right;for(d=d.next();d!==A.SENTINEL;){if(d.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(d,0),o=this.offsetOfNode(d);return{node:d,remainder:Math.min(s-1,a),nodeStartOffset:o}}else if(d.piece.length>=s-1){const a=this.offsetOfNode(d);return{node:d,remainder:s-1,nodeStartOffset:a}}else s-=d.piece.length;d=d.next()}return null}nodeCharCodeAt(l,s){if(l.piece.lineFeedCnt<1)return-1;const d=this._buffers[l.piece.bufferIndex],n=this.offsetInBuffer(l.piece.bufferIndex,l.piece.start)+s;return d.buffer.charCodeAt(n)}offsetOfNode(l){if(!l)return 0;let s=l.size_left;for(;l!==this.root;)l.parent.right===l&&(s+=l.parent.size_left+l.parent.piece.length),l=l.parent;return s}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 s=l.piece,d=this._buffers[s.bufferIndex].lineStarts,n=s.start.line,a=d[n]+s.start.column;return n===d.length-1||d[n+1]>a+1?!1:this._buffers[s.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 s=l.prev();this.endWithCR(s)&&this.fixCRLF(s,l)}}validateCRLFWithNextNode(l){if(this.shouldCheckCRLF()&&this.endWithCR(l)){const s=l.next();this.startWithLF(s)&&this.fixCRLF(l,s)}}fixCRLF(l,s){const d=[],n=this._buffers[l.piece.bufferIndex].lineStarts;let a;l.piece.end.column===0?a={line:l.piece.end.line-1,column:n[l.piece.end.line]-n[l.piece.end.line-1]-1}:a={line:l.piece.end.line,column:l.piece.end.column-1};const o=l.piece.length-1,g=l.piece.lineFeedCnt-1;l.piece=new C(l.piece.bufferIndex,l.piece.start,a,g,o),(0,A.updateTreeMetadata)(this,l,-1,-1),l.piece.length===0&&d.push(l);const h={line:s.piece.start.line+1,column:0},v=s.piece.length-1,m=this.getLineFeedCnt(s.piece.bufferIndex,h,s.piece.end);s.piece=new C(s.piece.bufferIndex,h,s.piece.end,m,v),(0,A.updateTreeMetadata)(this,s,-1,-1),s.piece.length===0&&d.push(s);const w=this.createNewPieces(`\r `);this.rbInsertRight(l,w[0]);for(let D=0;D<d.length;D++)(0,A.rbDelete)(this,d[D])}adjustCarriageReturnFromNext(l,s){if(this.shouldCheckCRLF()&&this.endWithCR(l)){const d=s.next();if(this.startWithLF(d)){if(l+=` `,d.piece.length===1)(0,A.rbDelete)(this,d);else{const n=d.piece,a={line:n.start.line+1,column:0},o=n.length-1,g=this.getLineFeedCnt(n.bufferIndex,a,n.end);d.piece=new C(n.bufferIndex,a,n.end,g,o),(0,A.updateTreeMetadata)(this,d,-1,-1)}return!0}}return!1}iterate(l,s){if(l===A.SENTINEL)return s(A.SENTINEL);const d=this.iterate(l.left,s);return d&&s(l)&&this.iterate(l.right,s)}getNodeContent(l){if(l===A.SENTINEL)return"";const s=this._buffers[l.piece.bufferIndex],d=l.piece,n=this.offsetInBuffer(d.bufferIndex,d.start),a=this.offsetInBuffer(d.bufferIndex,d.end);return s.buffer.substring(n,a)}getPieceContent(l){const s=this._buffers[l.bufferIndex],d=this.offsetInBuffer(l.bufferIndex,l.start),n=this.offsetInBuffer(l.bufferIndex,l.end);return s.buffer.substring(d,n)}rbInsertRight(l,s){const d=new A.TreeNode(s,1);if(d.left=A.SENTINEL,d.right=A.SENTINEL,d.parent=A.SENTINEL,d.size_left=0,d.lf_left=0,this.root===A.SENTINEL)this.root=d,d.color=0;else if(l.right===A.SENTINEL)l.right=d,d.parent=l;else{const a=(0,A.leftest)(l.right);a.left=d,d.parent=a}return(0,A.fixInsert)(this,d),d}rbInsertLeft(l,s){const d=new A.TreeNode(s,1);if(d.left=A.SENTINEL,d.right=A.SENTINEL,d.parent=A.SENTINEL,d.size_left=0,d.lf_left=0,this.root===A.SENTINEL)this.root=d,d.color=0;else if(l.left===A.SENTINEL)l.left=d,d.parent=l;else{const n=(0,A.righttest)(l.left);n.right=d,d.parent=n}return(0,A.fixInsert)(this,d),d}getContentOfSubTree(l){let s="";return this.iterate(l,d=>(s+=this.getNodeContent(d),!0)),s}}e.PieceTreeBase=f}),define(ae[592],le([1,0,6,28,20,116,774,360,767,2]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class S extends b.Disposable{constructor(r,u,i,f,c,l,s){super(),this._onDidChangeContent=this._register(new t.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._BOM=u,this._mightContainNonBasicASCII=!l,this._mightContainRTL=f,this._mightContainUnusualLineTerminators=c,this._pieceTree=new k.PieceTreeBase(r,i,s)}equals(r){return!(r instanceof S)||this._BOM!==r._BOM||this.getEOL()!==r.getEOL()?!1:this._pieceTree.equal(r._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(r){return this._pieceTree.createSnapshot(r?this._BOM:"")}getOffsetAt(r,u){return this._pieceTree.getOffsetAt(r,u)}getPositionAt(r){return this._pieceTree.getPositionAt(r)}getRangeAt(r,u){const i=r+u,f=this.getPositionAt(r),c=this.getPositionAt(i);return new R.Range(f.lineNumber,f.column,c.lineNumber,c.column)}getValueInRange(r,u=0){if(r.isEmpty())return"";const i=this._getEndOfLine(u);return this._pieceTree.getValueInRange(r,i)}getValueLengthInRange(r,u=0){if(r.isEmpty())return 0;if(r.startLineNumber===r.endLineNumber)return r.endColumn-r.startColumn;const i=this.getOffsetAt(r.startLineNumber,r.startColumn),f=this.getOffsetAt(r.endLineNumber,r.endColumn);let c=0;const l=this._getEndOfLine(u),s=this.getEOL();if(l.length!==s.length){const d=l.length-s.length,n=r.endLineNumber-r.startLineNumber;c=d*n}return f-i+c}getCharacterCountInRange(r,u=0){if(this._mightContainNonBasicASCII){let i=0;const f=r.startLineNumber,c=r.endLineNumber;for(let l=f;l<=c;l++){const s=this.getLineContent(l),d=l===f?r.startColumn-1:0,n=l===c?r.endColumn-1:s.length;for(let a=d;a<n;a++)p.isHighSurrogate(s.charCodeAt(a))?(i=i+1,a=a+1):i=i+1}return i+=this._getEndOfLine(u).length*(c-f),i}return this.getValueLengthInRange(r,u)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(r){return this._pieceTree.getLineContent(r)}getLineCharCode(r,u){return this._pieceTree.getLineCharCode(r,u)}getCharCode(r){return this._pieceTree.getCharCode(r)}getLineLength(r){return this._pieceTree.getLineLength(r)}getLineMinColumn(r){return 1}getLineMaxColumn(r){return this.getLineLength(r)+1}getLineFirstNonWhitespaceColumn(r){const u=p.firstNonWhitespaceIndex(this.getLineContent(r));return u===-1?0:u+1}getLineLastNonWhitespaceColumn(r){const u=p.lastNonWhitespaceIndex(this.getLineContent(r));return u===-1?0:u+2}_getEndOfLine(r){switch(r){case 1:return` `;case 2:return`\r `;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(r){this._pieceTree.setEOL(r)}applyEdits(r,u,i){let f=this._mightContainRTL,c=this._mightContainUnusualLineTerminators,l=this._mightContainNonBasicASCII,s=!0,d=[];for(let m=0;m<r.length;m++){const w=r[m];s&&w._isTracked&&(s=!1);const D=w.range;if(w.text){let M=!0;l||(M=!p.isBasicASCII(w.text),l=M),!f&&M&&(f=p.containsRTL(w.text)),!c&&M&&(c=p.containsUnusualLineTerminators(w.text))}let y="",T=0,_=0,L=0;if(w.text){let M;[T,_,L,M]=(0,E.countEOL)(w.text);const O=this.getEOL();M===0||M===(O===`\r `?2:1)?y=w.text:y=w.text.replace(/\r\n|\r|\n/g,O)}d[m]={sortIndex:m,identifier:w.identifier||null,range:D,rangeOffset:this.getOffsetAt(D.startLineNumber,D.startColumn),rangeLength:this.getValueLengthInRange(D),text:y,eolCount:T,firstLineLength:_,lastLineLength:L,forceMoveMarkers:Boolean(w.forceMoveMarkers),isAutoWhitespaceEdit:w.isAutoWhitespaceEdit||!1}}d.sort(S._sortOpsAscending);let n=!1;for(let m=0,w=d.length-1;m<w;m++){const D=d[m].range.getEndPosition(),y=d[m+1].range.getStartPosition();if(y.isBeforeOrEqual(D)){if(y.isBefore(D))throw new Error("Overlapping ranges are not allowed!");n=!0}}s&&(d=this._reduceOperations(d));const a=i||u?S._getInverseEditRanges(d):[],o=[];if(u)for(let m=0;m<d.length;m++){const w=d[m],D=a[m];if(w.isAutoWhitespaceEdit&&w.range.isEmpty())for(let y=D.startLineNumber;y<=D.endLineNumber;y++){let T="";y===D.startLineNumber&&(T=this.getLineContent(w.range.startLineNumber),p.firstNonWhitespaceIndex(T)!==-1)||o.push({lineNumber:y,oldContent:T})}}let g=null;if(i){let m=0;g=[];for(let w=0;w<d.length;w++){const D=d[w],y=a[w],T=this.getValueInRange(D.range),_=D.rangeOffset+m;m+=D.text.length-T.length,g[w]={sortIndex:D.sortIndex,identifier:D.identifier,range:y,text:T,textChange:new I.TextChange(D.rangeOffset,T,_,D.text)}}n||g.sort((w,D)=>w.sortIndex-D.sortIndex)}this._mightContainRTL=f,this._mightContainUnusualLineTerminators=c,this._mightContainNonBasicASCII=l;const h=this._doApplyEdits(d);let v=null;if(u&&o.length>0){o.sort((m,w)=>w.lineNumber-m.lineNumber),v=[];for(let m=0,w=o.length;m<w;m++){const D=o[m].lineNumber;if(m>0&&o[m-1].lineNumber===D)continue;const y=o[m].oldContent,T=this.getLineContent(D);T.length===0||T===y||p.firstNonWhitespaceIndex(T)!==-1||v.push(D)}}return this._onDidChangeContent.fire(),new A.ApplyEditsResult(g,h,v)}_reduceOperations(r){return r.length<1e3?r:[this._toSingleEditOperation(r)]}_toSingleEditOperation(r){let u=!1;const i=r[0].range,f=r[r.length-1].range,c=new R.Range(i.startLineNumber,i.startColumn,f.endLineNumber,f.endColumn);let l=i.startLineNumber,s=i.startColumn;const d=[];for(let h=0,v=r.length;h<v;h++){const m=r[h],w=m.range;u=u||m.forceMoveMarkers,d.push(this.getValueInRange(new R.Range(l,s,w.startLineNumber,w.startColumn))),m.text.length>0&&d.push(m.text),l=w.endLineNumber,s=w.endColumn}const n=d.join(""),[a,o,g]=(0,E.countEOL)(n);return{sortIndex:0,identifier:r[0].identifier,range:c,rangeOffset:this.getOffsetAt(c.startLineNumber,c.startColumn),rangeLength:this.getValueLengthInRange(c,0),text:n,eolCount:a,firstLineLength:o,lastLineLength:g,forceMoveMarkers:u,isAutoWhitespaceEdit:!1}}_doApplyEdits(r){r.sort(S._sortOpsDescending);const u=[];for(let i=0;i<r.length;i++){const f=r[i],c=f.range.startLineNumber,l=f.range.startColumn,s=f.range.endLineNumber,d=f.range.endColumn;if(c===s&&l===d&&f.text.length===0)continue;f.text?(this._pieceTree.delete(f.rangeOffset,f.rangeLength),this._pieceTree.insert(f.rangeOffset,f.text,!0)):this._pieceTree.delete(f.rangeOffset,f.rangeLength);const n=new R.Range(c,l,s,d);u.push({range:n,rangeLength:f.rangeLength,text:f.text,rangeOffset:f.rangeOffset,forceMoveMarkers:f.forceMoveMarkers})}return u}findMatchesLineByLine(r,u,i,f){return this._pieceTree.findMatchesLineByLine(r,u,i,f)}getPieceTree(){return this._pieceTree}static _getInverseEditRange(r,u){const i=r.startLineNumber,f=r.startColumn,[c,l,s]=(0,E.countEOL)(u);let d;if(u.length>0){const n=c+1;n===1?d=new R.Range(i,f,i,f+l):d=new R.Range(i,f,i+n-1,s+1)}else d=new R.Range(i,f,i,f);return d}static _getInverseEditRanges(r){const u=[];let i=0,f=0,c=null;for(let l=0,s=r.length;l<s;l++){const d=r[l];let n,a;c?c.range.endLineNumber===d.range.startLineNumber?(n=i,a=f+(d.range.startColumn-c.range.endColumn)):(n=i+(d.range.startLineNumber-c.range.endLineNumber),a=d.range.startColumn):(n=d.range.startLineNumber,a=d.range.startColumn);let o;if(d.text.length>0){const g=d.eolCount+1;g===1?o=new R.Range(n,a,n,a+d.firstLineLength):o=new R.Range(n,a,n+g-1,d.lastLineLength+1)}else o=new R.Range(n,a,n,a);i=o.endLineNumber,f=o.endColumn,u.push(o),c=d}return u}static _sortOpsAscending(r,u){const i=R.Range.compareRangesUsingEnds(r.range,u.range);return i===0?r.sortIndex-u.sortIndex:i}static _sortOpsDescending(r,u){const i=R.Range.compareRangesUsingEnds(r.range,u.range);return i===0?u.sortIndex-r.sortIndex:-i}}e.PieceTreeTextBuffer=S}),define(ae[775],le([1,0,28,774,592]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=e.PieceTreeTextBufferFactory=void 0;class A{constructor(I,b,S,C,r,u,i,f,c){this._chunks=I,this._bom=b,this._cr=S,this._lf=C,this._crlf=r,this._containsRTL=u,this._containsUnusualLineTerminators=i,this._isBasicASCII=f,this._normalizeEOL=c}_getEOL(I){const b=this._cr+this._lf+this._crlf,S=this._cr+this._crlf;return b===0?I===1?` `:`\r `:S>b/2?`\r `:` `}create(I){const b=this._getEOL(I),S=this._chunks;if(this._normalizeEOL&&(b===`\r `&&(this._cr>0||this._lf>0)||b===` `&&(this._cr>0||this._crlf>0)))for(let r=0,u=S.length;r<u;r++){const i=S[r].buffer.replace(/\r\n|\r|\n/g,b),f=(0,p.createLineStartsFast)(i);S[r]=new p.StringBuffer(i,f)}const C=new R.PieceTreeTextBuffer(S,this._bom,b,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 b=I.charCodeAt(I.length-1);b===13||b>=55296&&b<=56319?(this._acceptChunk1(I.substr(0,I.length-1),!1),this._hasPreviousChar=!0,this._previousChar=b):(this._acceptChunk1(I,!1),this._hasPreviousChar=!1,this._previousChar=b)}_acceptChunk1(I,b){!b&&I.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+I):this._acceptChunk2(I))}_acceptChunk2(I){const b=(0,p.createLineStarts)(this._tmpLineStarts,I);this.chunks.push(new p.StringBuffer(I,b.lineStarts)),this.cr+=b.cr,this.lf+=b.lf,this.crlf+=b.crlf,this.isBasicASCII&&(this.isBasicASCII=b.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 b=(0,p.createLineStartsFast)(I.buffer);I.lineStarts=b,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=k}),define(ae[776],le([1,0,56,14]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeSemanticTokensDto=e.encodeSemanticTokensDto=void 0;var R;(function(C){C[C.Full=1]="Full",C[C.Delta=2]="Delta"})(R||(R={}));function A(C){for(let r=0,u=C.length;r<u;r+=4){const i=C[r+0],f=C[r+1],c=C[r+2],l=C[r+3];C[r+0]=l,C[r+1]=c,C[r+2]=f,C[r+3]=i}}function k(C){const r=new Uint8Array(C.buffer,C.byteOffset,C.length*4);return p.isLittleEndian()||A(r),t.VSBuffer.wrap(r)}function E(C){const r=C.buffer;if(p.isLittleEndian()||A(r),r.byteOffset%4===0)return new Uint32Array(r.buffer,r.byteOffset,r.length/4);{const u=new Uint8Array(r.byteLength);return u.set(r),new Uint32Array(u.buffer,u.byteOffset,u.length/4)}}function I(C){const r=new Uint32Array(b(C));let u=0;if(r[u++]=C.id,C.type==="full")r[u++]=1,r[u++]=C.data.length,r.set(C.data,u),u+=C.data.length;else{r[u++]=2,r[u++]=C.deltas.length;for(const i of C.deltas)r[u++]=i.start,r[u++]=i.deleteCount,i.data?(r[u++]=i.data.length,r.set(i.data,u),u+=i.data.length):r[u++]=0}return k(r)}e.encodeSemanticTokensDto=I;function b(C){let r=0;if(r+=1+1,C.type==="full")r+=1+C.data.length;else{r+=1,r+=(1+1+1)*C.deltas.length;for(const u of C.deltas)u.data&&(r+=u.data.length)}return r}function S(C){const r=E(C);let u=0;const i=r[u++];if(r[u++]===1){const s=r[u++],d=r.subarray(u,u+s);return u+=s,{id:i,type:"full",data:d}}const c=r[u++],l=[];for(let s=0;s<c;s++){const d=r[u++],n=r[u++],a=r[u++];let o;a>0&&(o=r.subarray(u,u+a),u+=a),l[s]={start:d,deleteCount:n,data:o}}return{id:i,type:"delta",deltas:l}}e.decodeSemanticTokensDto=S}),define(ae[777],le([1,0,20,370,28,171,299]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeHighlighterReasonKind=e.UnicodeTextModelHighlighter=void 0;class E{static computeUnicodeHighlights(i,f,c){const l=c?c.startLineNumber:1,s=c?c.endLineNumber:i.getLineCount(),d=new S(f),n=d.getCandidateCodePoints();let a;n==="allNonBasicAscii"?a=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):a=new RegExp(`${I(Array.from(n))}`,"g");const o=new p.Searcher(null,a),g=[];let h=!1,v,m=0,w=0,D=0;e:for(let y=l,T=s;y<=T;y++){const _=i.getLineContent(y),L=_.length;o.reset(0);do if(v=o.next(_),v){let M=v.index,O=v.index+v[0].length;if(M>0){const V=_.charCodeAt(M-1);R.isHighSurrogate(V)&&M--}if(O+1<L){const V=_.charCodeAt(O-1);R.isHighSurrogate(V)&&O++}const N=_.substring(M,O),P=(0,k.getWordAtText)(M+1,k.DEFAULT_WORD_REGEXP,_,0),B=d.shouldHighlightNonBasicASCII(N,P?P.word:null);if(B!==0){B===3?m++:B===2?w++:B===1?D++:(0,A.assertNever)(B);const V=1e3;if(g.length>=V){h=!0;break e}g.push(new t.Range(y,M+1,y,O+1))}}while(v)}return{ranges:g,hasMore:h,ambiguousCharacterCount:m,invisibleCharacterCount:w,nonBasicAsciiCharacterCount:D}}static computeUnicodeHighlightReason(i,f){const c=new S(f);switch(c.shouldHighlightNonBasicASCII(i,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=i.codePointAt(0),d=c.ambiguousCharacters.getPrimaryConfusable(s),n=R.AmbiguousCharacters.getLocales().filter(a=>!R.AmbiguousCharacters.getInstance(new Set([...f.allowedLocales,a])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(d),notAmbiguousInLocales:n}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=E;function I(u,i){return`[${R.escapeRegExpCharacters(u.map(c=>String.fromCodePoint(c)).join(""))}]`}var b;(function(u){u[u.Ambiguous=0]="Ambiguous",u[u.Invisible=1]="Invisible",u[u.NonBasicAscii=2]="NonBasicAscii"})(b=e.UnicodeHighlighterReasonKind||(e.UnicodeHighlighterReasonKind={}));class S{constructor(i){this.options=i,this.allowedCodePoints=new Set(i.allowedCodePoints),this.ambiguousCharacters=R.AmbiguousCharacters.getInstance(new Set(i.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const i=new Set;if(this.options.invisibleCharacters)for(const f of R.InvisibleCharacters.codePoints)C(String.fromCodePoint(f))||i.add(f);if(this.options.ambiguousCharacters)for(const f of this.ambiguousCharacters.getConfusableCodePoints())i.add(f);for(const f of this.allowedCodePoints)i.delete(f);return i}shouldHighlightNonBasicASCII(i,f){const c=i.codePointAt(0);if(this.allowedCodePoints.has(c))return 0;if(this.options.nonBasicASCII)return 1;let l=!1,s=!1;if(f)for(const d of f){const n=d.codePointAt(0),a=R.isBasicASCII(d);l=l||a,!a&&!this.ambiguousCharacters.isAmbiguous(n)&&!R.InvisibleCharacters.isInvisibleCharacter(n)&&(s=!0)}return!l&&s?0:this.options.invisibleCharacters&&!C(i)&&R.InvisibleCharacters.isInvisibleCharacter(c)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(c)?3:0}}function C(u){return u===" "||u===` `||u===" "}var r;(function(u){u[u.None=0]="None",u[u.NonBasicASCII=1]="NonBasicASCII",u[u.Invisible=2]="Invisible",u[u.Ambiguous=3]="Ambiguous"})(r||(r={}))}),define(ae[1291],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=void 0;class R{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(E){this._onDidChange.fire({changedLanguages:E,changedColorMap:!1})}register(E,I){return this._map.set(E,I),this.fire([E]),(0,p.toDisposable)(()=>{this._map.get(E)===I&&(this._map.delete(E),this.fire([E]))})}registerFactory(E,I){this._factories.get(E)?.dispose();const b=new A(this,E,I);return this._factories.set(E,b),(0,p.toDisposable)(()=>{const S=this._factories.get(E);!S||S!==b||(this._factories.delete(E),S.dispose())})}async getOrCreate(E){const I=this.get(E);if(I)return I;const b=this._factories.get(E);return!b||b.isResolved?null:(await b.resolve(),this.get(E))}get(E){return this._map.get(E)||null}isResolved(E){if(this.get(E))return!0;const b=this._factories.get(E);return!!(!b||b.isResolved)}setColorMap(E){this._colorMap=E,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=R;class A extends p.Disposable{get isResolved(){return this._isResolved}constructor(E,I,b){super(),this._registry=E,this._languageId=I,this._factory=b,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const E=await Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,E&&!this._isDisposed&&this._register(this._registry.register(this._languageId,E))}}}),define(ae[92],le([1,0,29,9,20,1291]),function(J,e,t,p,R,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=void 0;class k{constructor(T,_,L){this._tokenBrand=void 0,this.offset=T,this.type=_,this.language=L}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=k;class E{constructor(T,_){this._tokenizationResultBrand=void 0,this.tokens=T,this.endState=_}}e.TokenizationResult=E;class I{constructor(T,_){this._encodedTokenizationResultBrand=void 0,this.tokens=T,this.endState=_}}e.EncodedTokenizationResult=I;var b;(function(y){y[y.Method=0]="Method",y[y.Function=1]="Function",y[y.Constructor=2]="Constructor",y[y.Field=3]="Field",y[y.Variable=4]="Variable",y[y.Class=5]="Class",y[y.Struct=6]="Struct",y[y.Interface=7]="Interface",y[y.Module=8]="Module",y[y.Property=9]="Property",y[y.Event=10]="Event",y[y.Operator=11]="Operator",y[y.Unit=12]="Unit",y[y.Value=13]="Value",y[y.Constant=14]="Constant",y[y.Enum=15]="Enum",y[y.EnumMember=16]="EnumMember",y[y.Keyword=17]="Keyword",y[y.Text=18]="Text",y[y.Color=19]="Color",y[y.File=20]="File",y[y.Reference=21]="Reference",y[y.Customcolor=22]="Customcolor",y[y.Folder=23]="Folder",y[y.TypeParameter=24]="TypeParameter",y[y.User=25]="User",y[y.Issue=26]="Issue",y[y.Snippet=27]="Snippet"})(b=e.CompletionItemKind||(e.CompletionItemKind={}));var S;(function(y){const T=new Map;T.set(0,t.Codicon.symbolMethod),T.set(1,t.Codicon.symbolFunction),T.set(2,t.Codicon.symbolConstructor),T.set(3,t.Codicon.symbolField),T.set(4,t.Codicon.symbolVariable),T.set(5,t.Codicon.symbolClass),T.set(6,t.Codicon.symbolStruct),T.set(7,t.Codicon.symbolInterface),T.set(8,t.Codicon.symbolModule),T.set(9,t.Codicon.symbolProperty),T.set(10,t.Codicon.symbolEvent),T.set(11,t.Codicon.symbolOperator),T.set(12,t.Codicon.symbolUnit),T.set(13,t.Codicon.symbolValue),T.set(15,t.Codicon.symbolEnum),T.set(14,t.Codicon.symbolConstant),T.set(15,t.Codicon.symbolEnum),T.set(16,t.Codicon.symbolEnumMember),T.set(17,t.Codicon.symbolKeyword),T.set(27,t.Codicon.symbolSnippet),T.set(18,t.Codicon.symbolText),T.set(19,t.Codicon.symbolColor),T.set(20,t.Codicon.symbolFile),T.set(21,t.Codicon.symbolReference),T.set(22,t.Codicon.symbolCustomColor),T.set(23,t.Codicon.symbolFolder),T.set(24,t.Codicon.symbolTypeParameter),T.set(25,t.Codicon.account),T.set(26,t.Codicon.issues);function _(O){let N=T.get(O);return N||(console.info("No codicon found for CompletionItemKind "+O),N=t.Codicon.symbolProperty),N}y.toIcon=_;const L=new Map;L.set("method",0),L.set("function",1),L.set("constructor",2),L.set("field",3),L.set("variable",4),L.set("class",5),L.set("struct",6),L.set("interface",7),L.set("module",8),L.set("property",9),L.set("event",10),L.set("operator",11),L.set("unit",12),L.set("value",13),L.set("constant",14),L.set("enum",15),L.set("enum-member",16),L.set("enumMember",16),L.set("keyword",17),L.set("snippet",27),L.set("text",18),L.set("color",19),L.set("file",20),L.set("reference",21),L.set("customcolor",22),L.set("folder",23),L.set("type-parameter",24),L.set("typeParameter",24),L.set("account",25),L.set("issue",26);function M(O,N){let P=L.get(O);return typeof P>"u"&&!N&&(P=9),P}y.fromString=M})(S=e.CompletionItemKinds||(e.CompletionItemKinds={}));var C;(function(y){y[y.Deprecated=1]="Deprecated"})(C=e.CompletionItemTag||(e.CompletionItemTag={}));var r;(function(y){y[y.KeepWhitespace=1]="KeepWhitespace",y[y.InsertAsSnippet=4]="InsertAsSnippet"})(r=e.CompletionItemInsertTextRule||(e.CompletionItemInsertTextRule={}));var u;(function(y){y[y.Invoke=0]="Invoke",y[y.TriggerCharacter=1]="TriggerCharacter",y[y.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(u=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var i;(function(y){y[y.Automatic=0]="Automatic",y[y.Explicit=1]="Explicit"})(i=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var f;(function(y){y[y.Invoke=1]="Invoke",y[y.Auto=2]="Auto"})(f=e.CodeActionTriggerType||(e.CodeActionTriggerType={}));var c;(function(y){y[y.Invoke=1]="Invoke",y[y.TriggerCharacter=2]="TriggerCharacter",y[y.ContentChange=3]="ContentChange"})(c=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var l;(function(y){y[y.Text=0]="Text",y[y.Read=1]="Read",y[y.Write=2]="Write"})(l=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));function s(y){return y&&p.URI.isUri(y.uri)&&R.Range.isIRange(y.range)&&(R.Range.isIRange(y.originSelectionRange)||R.Range.isIRange(y.targetSelectionRange))}e.isLocationLink=s;var d;(function(y){y[y.File=0]="File",y[y.Module=1]="Module",y[y.Namespace=2]="Namespace",y[y.Package=3]="Package",y[y.Class=4]="Class",y[y.Method=5]="Method",y[y.Property=6]="Property",y[y.Field=7]="Field",y[y.Constructor=8]="Constructor",y[y.Enum=9]="Enum",y[y.Interface=10]="Interface",y[y.Function=11]="Function",y[y.Variable=12]="Variable",y[y.Constant=13]="Constant",y[y.String=14]="String",y[y.Number=15]="Number",y[y.Boolean=16]="Boolean",y[y.Array=17]="Array",y[y.Object=18]="Object",y[y.Key=19]="Key",y[y.Null=20]="Null",y[y.EnumMember=21]="EnumMember",y[y.Struct=22]="Struct",y[y.Event=23]="Event",y[y.Operator=24]="Operator",y[y.TypeParameter=25]="TypeParameter"})(d=e.SymbolKind||(e.SymbolKind={}));var n;(function(y){y[y.Deprecated=1]="Deprecated"})(n=e.SymbolTag||(e.SymbolTag={}));var a;(function(y){const T=new Map;T.set(0,t.Codicon.symbolFile),T.set(1,t.Codicon.symbolModule),T.set(2,t.Codicon.symbolNamespace),T.set(3,t.Codicon.symbolPackage),T.set(4,t.Codicon.symbolClass),T.set(5,t.Codicon.symbolMethod),T.set(6,t.Codicon.symbolProperty),T.set(7,t.Codicon.symbolField),T.set(8,t.Codicon.symbolConstructor),T.set(9,t.Codicon.symbolEnum),T.set(10,t.Codicon.symbolInterface),T.set(11,t.Codicon.symbolFunction),T.set(12,t.Codicon.symbolVariable),T.set(13,t.Codicon.symbolConstant),T.set(14,t.Codicon.symbolString),T.set(15,t.Codicon.symbolNumber),T.set(16,t.Codicon.symbolBoolean),T.set(17,t.Codicon.symbolArray),T.set(18,t.Codicon.symbolObject),T.set(19,t.Codicon.symbolKey),T.set(20,t.Codicon.symbolNull),T.set(21,t.Codicon.symbolEnumMember),T.set(22,t.Codicon.symbolStruct),T.set(23,t.Codicon.symbolEvent),T.set(24,t.Codicon.symbolOperator),T.set(25,t.Codicon.symbolTypeParameter);function _(L){let M=T.get(L);return M||(console.info("No codicon found for SymbolKind "+L),M=t.Codicon.symbolProperty),M}y.toIcon=_})(a=e.SymbolKinds||(e.SymbolKinds={}));class o{constructor(T){this.value=T}}e.FoldingRangeKind=o,o.Comment=new o("comment"),o.Imports=new o("imports"),o.Region=new o("region");var g;(function(y){function T(_){return!_||typeof _!="object"?!1:typeof _.id=="string"&&typeof _.title=="string"}y.is=T})(g=e.Command||(e.Command={}));var h;(function(y){y[y.Collapsed=0]="Collapsed",y[y.Expanded=1]="Expanded"})(h=e.CommentThreadCollapsibleState||(e.CommentThreadCollapsibleState={}));var v;(function(y){y[y.Unresolved=0]="Unresolved",y[y.Resolved=1]="Resolved"})(v=e.CommentThreadState||(e.CommentThreadState={}));var m;(function(y){y[y.Editing=0]="Editing",y[y.Preview=1]="Preview"})(m=e.CommentMode||(e.CommentMode={}));var w;(function(y){y[y.Type=1]="Type",y[y.Parameter=2]="Parameter"})(w=e.InlayHintKind||(e.InlayHintKind={})),e.TokenizationRegistry=new A.TokenizationRegistry;var D;(function(y){y[y.None=0]="None",y[y.Option=1]="Option",y[y.Default=2]="Default",y[y.Preferred=3]="Preferred"})(D=e.ExternalUriOpenerPriority||(e.ExternalUriOpenerPriority={}))}),define(ae[593],le([1,0,92]),function(J,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 p(A,k){return new t.TokenizationResult([new t.Token(0,"",A)],k)}e.nullTokenize=p;function R(A,k){const E=new Uint32Array(2);return E[0]=0,E[1]=(A<<0|0<<8|0<<11|1<<15|2<<24)>>>0,new t.EncodedTokenizationResult(E,k===null?e.NullState:k)}e.nullTokenizeEncoded=R}),define(ae[329],le([1,0,28,301,92,593]),function(J,e,t,p,R,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,r,u)=>(0,A.nullTokenizeEncoded)(0,u)};function E(C,r,u){return S(r,C.languageIdCodec,R.TokenizationRegistry.get(u)||k)}e.tokenizeToStringSync=E;async function I(C,r,u){if(!u)return S(r,C.languageIdCodec,k);const i=await R.TokenizationRegistry.getOrCreate(u);return S(r,C.languageIdCodec,i||k)}e.tokenizeToString=I;function b(C,r,u,i,f,c,l){let s="<div>",d=i,n=0,a=!0;for(let o=0,g=r.getCount();o<g;o++){const h=r.getEndOffset(o);if(h<=i)continue;let v="";for(;d<h&&d<f;d++){const m=C.charCodeAt(d);switch(m){case 9:{let w=c-(d+n)%c;for(n+=w-1;w>0;)l&&a?(v+=" ",a=!1):(v+=" ",a=!0),w--;break}case 60:v+="<",a=!1;break;case 62:v+=">",a=!1;break;case 38:v+="&",a=!1;break;case 0:v+="�",a=!1;break;case 65279:case 8232:case 8233:case 133:v+="\uFFFD",a=!1;break;case 13:v+="​",a=!1;break;case 32:l&&a?(v+=" ",a=!1):(v+=" ",a=!0);break;default:v+=String.fromCharCode(m),a=!1}}if(s+=`<span style="${r.getInlineStyle(o,u)}">${v}</span>`,h>f||d>=f)break}return s+="</div>",s}e.tokenizeLineToHTML=b;function S(C,r,u){let i='<div class="monaco-tokenized-source">';const f=t.splitLines(C);let c=u.getInitialState();for(let l=0,s=f.length;l<s;l++){const d=f[l];l>0&&(i+="<br/>");const n=u.tokenizeEncoded(d,!0,c);p.LineTokens.convertToEndOffset(n.tokens,d.length);const o=new p.LineTokens(n.tokens,d,r).inflate();let g=0;for(let h=0,v=o.getCount();h<v;h++){const m=o.getClassName(h),w=o.getEndOffset(h);i+=`<span class="${m}">${t.escape(d.substring(g,w))}</span>`,g=w}c=n.endState}return i+="</div>",i}e._tokenizeToString=S}),define(ae[1292],le([1,0,16,21,301,92,593,2,146,360,734,11,14]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelTokenization=e.TokenizationStateStore=void 0;var u;(function(d){d[d.CHEAP_TOKENIZATION_LENGTH_LIMIT=2048]="CHEAP_TOKENIZATION_LENGTH_LIMIT"})(u||(u={}));class i{constructor(n){this._default=n,this._store=[]}get(n){return n<this._store.length?this._store[n]:this._default}set(n,a){for(;n>=this._store.length;)this._store[this._store.length]=this._default;this._store[n]=a}delete(n,a){a===0||n>=this._store.length||this._store.splice(n,a)}insert(n,a){if(a===0||n>=this._store.length)return;const o=[];for(let g=0;g<a;g++)o[g]=this._default;this._store=t.arrayInsert(this._store,n,o)}}class f{get invalidLineStartIndex(){return this._firstLineNeedsTokenization}constructor(n,a){this.tokenizationSupport=n,this.initialState=a,this._lineBeginState=new i(null),this._lineNeedsTokenization=new i(!0),this._firstLineNeedsTokenization=0,this._lineBeginState.set(0,this.initialState)}markMustBeTokenized(n){this._lineNeedsTokenization.set(n,!0),this._firstLineNeedsTokenization=Math.min(this._firstLineNeedsTokenization,n)}getBeginState(n){return this._lineBeginState.get(n)}setEndState(n,a,o){if(this._lineNeedsTokenization.set(a,!1),this._firstLineNeedsTokenization=a+1,a===n-1)return;const g=this._lineBeginState.get(a+1);if(g===null||!o.equals(g)){this._lineBeginState.set(a+1,o),this.markMustBeTokenized(a+1);return}let h=a+1;for(;h<n&&!this._lineNeedsTokenization.get(h);)h++;this._firstLineNeedsTokenization=h}applyEdits(n,a){this.markMustBeTokenized(n.startLineNumber-1),this._lineBeginState.delete(n.startLineNumber,n.endLineNumber-n.startLineNumber),this._lineNeedsTokenization.delete(n.startLineNumber,n.endLineNumber-n.startLineNumber),this._lineBeginState.insert(n.startLineNumber,a),this._lineNeedsTokenization.insert(n.startLineNumber,a)}}e.TokenizationStateStore=f;class c extends E.Disposable{constructor(n,a,o){super(),this._textModel=n,this._tokenizationPart=a,this._languageIdCodec=o,this._isScheduled=!1,this._isDisposed=!1,this._tokenizationStateStore=null,this._register(A.TokenizationRegistry.onDidChange(g=>{const h=this._textModel.getLanguageId();g.changedLanguages.indexOf(h)!==-1&&(this._resetTokenizationState(),this._tokenizationPart.clearTokens())})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(n){if(n.isFlush){this._resetTokenizationState();return}if(this._tokenizationStateStore)for(let a=0,o=n.changes.length;a<o;a++){const g=n.changes[a],[h]=(0,b.countEOL)(g.text);this._tokenizationStateStore.applyEdits(g.range,h)}this._beginBackgroundTokenization()}handleDidChangeAttached(){this._beginBackgroundTokenization()}handleDidChangeLanguage(n){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}_resetTokenizationState(){const[n,a]=l(this._textModel,this._tokenizationPart);n&&a?this._tokenizationStateStore=new f(n,a):this._tokenizationStateStore=null,this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,C.runWhenIdle)(n=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(n)}))}_backgroundTokenizeWithDeadline(n){const a=Date.now()+n.timeRemaining(),o=()=>{this._isDisposed||!this._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()<a?(0,r.setTimeout0)(o):this._beginBackgroundTokenization())};o()}_backgroundTokenizeForAtLeast1ms(){const n=this._textModel.getLineCount(),a=new S.ContiguousMultilineTokensBuilder,o=I.StopWatch.create(!1);do if(o.elapsed()>1||this._tokenizeOneInvalidLine(a)>=n)break;while(this._hasLinesToTokenize());this._tokenizationPart.setTokens(a.finalize(),this._isTokenizationComplete())}tokenizeViewport(n,a){const o=new S.ContiguousMultilineTokensBuilder;this._tokenizeViewport(o,n,a),this._tokenizationPart.setTokens(o.finalize(),this._isTokenizationComplete())}reset(){this._resetTokenizationState(),this._tokenizationPart.clearTokens()}forceTokenization(n){const a=new S.ContiguousMultilineTokensBuilder;this._updateTokensUntilLine(a,n),this._tokenizationPart.setTokens(a.finalize(),this._isTokenizationComplete())}getTokenTypeIfInsertingCharacter(n,a){if(!this._tokenizationStateStore)return 0;this.forceTokenization(n.lineNumber);const o=this._tokenizationStateStore.getBeginState(n.lineNumber-1);if(!o)return 0;const g=this._textModel.getLanguageId(),h=this._textModel.getLineContent(n.lineNumber),v=h.substring(0,n.column-1)+a+h.substring(n.column-1),m=s(this._languageIdCodec,g,this._tokenizationStateStore.tokenizationSupport,v,!0,o),w=new R.LineTokens(m.tokens,v,this._languageIdCodec);if(w.getCount()===0)return 0;const D=w.findTokenIndexAtOffset(n.column-1);return w.getStandardTokenType(D)}tokenizeLineWithEdit(n,a,o){const g=n.lineNumber,h=n.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(g);const v=this._tokenizationStateStore.getBeginState(g-1);if(!v)return null;const m=this._textModel.getLineContent(g),w=m.substring(0,h-1)+o+m.substring(h-1+a),D=this._textModel.getLanguageIdAtPosition(g,0),y=s(this._languageIdCodec,D,this._tokenizationStateStore.tokenizationSupport,w,!0,v);return new R.LineTokens(y.tokens,w,this._languageIdCodec)}isCheapToTokenize(n){if(!this._tokenizationStateStore)return!0;const a=this._tokenizationStateStore.invalidLineStartIndex+1;return n>a?!1:n<a||this._textModel.getLineLength(n)<2048}_hasLinesToTokenize(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_isTokenizationComplete(){return this._tokenizationStateStore?this._tokenizationStateStore.invalidLineStartIndex>=this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(n){if(!this._tokenizationStateStore||!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const a=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(n,a),a}_updateTokensUntilLine(n,a){if(!this._tokenizationStateStore)return;const o=this._textModel.getLanguageId(),g=this._textModel.getLineCount(),h=a-1;for(let v=this._tokenizationStateStore.invalidLineStartIndex;v<=h;v++){const m=this._textModel.getLineContent(v+1),w=this._tokenizationStateStore.getBeginState(v),D=s(this._languageIdCodec,o,this._tokenizationStateStore.tokenizationSupport,m,!0,w);n.add(v+1,D.tokens),this._tokenizationStateStore.setEndState(g,v,D.endState),v=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(n,a,o){if(!this._tokenizationStateStore||o<=this._tokenizationStateStore.invalidLineStartIndex)return;if(a<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(n,o);return}let g=this._textModel.getLineFirstNonWhitespaceColumn(a);const h=[];let v=null;for(let D=a-1;g>1&&D>=1;D--){const y=this._textModel.getLineFirstNonWhitespaceColumn(D);if(y!==0&&y<g&&(h.push(this._textModel.getLineContent(D)),g=y,v=this._tokenizationStateStore.getBeginState(D-1),v))break}v||(v=this._tokenizationStateStore.initialState);const m=this._textModel.getLanguageId();let w=v;for(let D=h.length-1;D>=0;D--)w=s(this._languageIdCodec,m,this._tokenizationStateStore.tokenizationSupport,h[D],!1,w).endState;for(let D=a;D<=o;D++){const y=this._textModel.getLineContent(D),T=s(this._languageIdCodec,m,this._tokenizationStateStore.tokenizationSupport,y,!0,w);n.add(D,T.tokens),this._tokenizationStateStore.markMustBeTokenized(D-1),w=T.endState}}}e.TextModelTokenization=c;function l(d,n){if(d.isTooLargeForTokenization())return[null,null];const a=A.TokenizationRegistry.get(n.getLanguageId());if(!a)return[null,null];let o;try{o=a.getInitialState()}catch(g){return(0,p.onUnexpectedError)(g),[null,null]}return[a,o]}function s(d,n,a,o,g,h){let v=null;if(a)try{v=a.tokenizeEncoded(o,g,h.clone())}catch(m){(0,p.onUnexpectedError)(m)}return v||(v=(0,k.nullTokenizeEncoded)(d.encodeLanguageId(n),h)),R.LineTokens.convertToEndOffset(v.tokens,o.length),v}}),define(ae[1293],le([1,0,6,50,299,730,1292,1211,1213]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class b extends A.TextModelPart{constructor(C,r,u,i,f){super(),this._languageService=C,this._languageConfigurationService=r,this._textModel=u,this.bracketPairsTextModelPart=i,this._languageId=f,this._onDidChangeLanguage=this._register(new t.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new t.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new t.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new t.Emitter),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._tokens=new E.ContiguousTokensStore(this._languageService.languageIdCodec),this._semanticTokens=new I.SparseTokensStore(this._languageService.languageIdCodec),this._tokenization=new k.TextModelTokenization(u,this,this._languageService.languageIdCodec),this._languageRegistryListener=this._languageConfigurationService.onDidChange(c=>{c.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})}_hasListeners(){return this._onDidChangeLanguage.hasListeners()||this._onDidChangeLanguageConfiguration.hasListeners()||this._onDidChangeTokens.hasListeners()||this._onBackgroundTokenizationStateChanged.hasListeners()}acceptEdit(C,r,u,i,f){this._tokens.acceptEdit(C,u,i),this._semanticTokens.acceptEdit(C,u,i,f,r.length>0?r.charCodeAt(0):0)}handleDidChangeAttached(){this._tokenization.handleDidChangeAttached()}flush(){this._tokens.flush(),this._semanticTokens.flush()}handleDidChangeContent(C){this._tokenization.handleDidChangeContent(C)}dispose(){this._languageRegistryListener.dispose(),this._tokenization.dispose(),super.dispose()}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(C){if(this._backgroundTokenizationState===2)return;const r=C?2:1;this._backgroundTokenizationState!==r&&(this._backgroundTokenizationState=r,this.bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}setLineTokens(C,r){if(C<1||C>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");this._tokens.setTokens(this._languageId,C-1,this._textModel.getLineLength(C),r,!1)}setTokens(C,r=!1){if(C.length!==0){const u=[];for(let i=0,f=C.length;i<f;i++){const c=C[i];let l=0,s=0,d=!1;for(let n=c.startLineNumber;n<=c.endLineNumber;n++)d?(this._tokens.setTokens(this._languageId,n-1,this._textModel.getLineLength(n),c.getLineTokens(n),!1),s=n):this._tokens.setTokens(this._languageId,n-1,this._textModel.getLineLength(n),c.getLineTokens(n),!0)&&(d=!0,l=n,s=n);d&&u.push({fromLineNumber:l,toLineNumber:s})}u.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:u})}this.handleTokenizationProgress(r)}setSemanticTokens(C,r){this._semanticTokens.set(C,r),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:C!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(C,r){if(this.hasCompleteSemanticTokens())return;const u=this._textModel.validateRange(this._semanticTokens.setPartial(C,r));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:u.startLineNumber,toLineNumber:u.endLineNumber}]})}tokenizeViewport(C,r){C=Math.max(1,C),r=Math.min(this._textModel.getLineCount(),r),this._tokenization.tokenizeViewport(C,r)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}clearSemanticTokens(){this._semanticTokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}_emitModelTokensChangedEvent(C){this._textModel._isDisposing()||(this.bracketPairsTextModelPart.handleDidChangeTokens(C),this._onDidChangeTokens.fire(C))}resetTokenization(){this._tokenization.reset()}forceTokenization(C){if(C<1||C>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(C)}isCheapToTokenize(C){return this._tokenization.isCheapToTokenize(C)}tokenizeIfCheap(C){this.isCheapToTokenize(C)&&this.forceTokenization(C)}getLineTokens(C){if(C<1||C>this._textModel.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(C)}_getLineTokens(C){const r=this._textModel.getLineContent(C),u=this._tokens.getTokens(this._languageId,C-1,r);return this._semanticTokens.addSparseTokens(C,u)}getTokenTypeIfInsertingCharacter(C,r,u){const i=this._textModel.validatePosition(new p.Position(C,r));return this._tokenization.getTokenTypeIfInsertingCharacter(i,u)}tokenizeLineWithEdit(C,r,u){const i=this._textModel.validatePosition(C);return this._tokenization.tokenizeLineWithEdit(i,r,u)}getLanguageConfiguration(C){return this._languageConfigurationService.getLanguageConfiguration(C)}getWordAtPosition(C){this.assertNotDisposed();const r=this._textModel.validatePosition(C),u=this._textModel.getLineContent(r.lineNumber),i=this._getLineTokens(r.lineNumber),f=i.findTokenIndexAtOffset(r.column-1),[c,l]=b._findLanguageBoundaries(i,f),s=(0,R.getWordAtText)(r.column,this.getLanguageConfiguration(i.getLanguageId(f)).getWordDefinition(),u.substring(c,l),c);if(s&&s.startColumn<=C.column&&C.column<=s.endColumn)return s;if(f>0&&c===r.column-1){const[d,n]=b._findLanguageBoundaries(i,f-1),a=(0,R.getWordAtText)(r.column,this.getLanguageConfiguration(i.getLanguageId(f-1)).getWordDefinition(),u.substring(d,n),d);if(a&&a.startColumn<=C.column&&C.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(C,r){const u=C.getLanguageId(r);let i=0;for(let c=r;c>=0&&C.getLanguageId(c)===u;c--)i=C.getStartOffset(c);let f=C.getLineContent().length;for(let c=r,l=C.getCount();c<l&&C.getLanguageId(c)===u;c++)f=C.getEndOffset(c);return[i,f]}getWordUntilPosition(C){const r=this.getWordAtPosition(C);return r?{word:r.word.substr(0,C.column-r.startColumn),startColumn:r.startColumn,endColumn:C.column}:{word:"",startColumn:C.column,endColumn:C.column}}getLanguageId(){return this._languageId}getLanguageIdAtPosition(C,r){const u=this._textModel.validatePosition(new p.Position(C,r)),i=this.getLineTokens(u.lineNumber);return i.getLanguageId(i.findTokenIndexAtOffset(u.column-1))}setLanguageId(C,r="api"){if(this._languageId===C)return;const u={oldLanguage:this._languageId,newLanguage:C,source:r};this._languageId=C,this.bracketPairsTextModelPart.handleDidChangeLanguage(u),this._tokenization.handleDidChangeLanguage(u),this._onDidChangeLanguage.fire(u),this._onDidChangeLanguageConfiguration.fire({})}}e.TokenizationTextModelPart=b}),define(ae[1294],le([1,0,32,6,99,9,50,20,85,92,732]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class C{static chord(i,f){return(0,R.KeyChord)(i,f)}}e.KeyMod=C,C.CtrlCmd=2048,C.Shift=1024,C.Alt=512,C.WinCtrl=256;function r(){return{editor:void 0,languages:void 0,CancellationTokenSource:t.CancellationTokenSource,Emitter:p.Emitter,KeyCode:S.KeyCode,KeyMod:C,Position:k.Position,Range:E.Range,Selection:I.Selection,SelectionDirection:S.SelectionDirection,MarkerSeverity:S.MarkerSeverity,MarkerTag:S.MarkerTag,Uri:A.URI,Token:b.Token}}e.createMonacoBaseAPI=r}),define(ae[1295],le([1,0,414,14,9,50,20,1290,299,728,1206,1294,146,777,769,1280,52]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=e.MirrorModel=void 0;class l extends E.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(a){return this._lines[a-1]}getWordAtPosition(a,o){const g=(0,I.getWordAtText)(a.column,(0,I.ensureValidWordDefinition)(o),this._lines[a.lineNumber-1],0);return g?new k.Range(a.lineNumber,g.startColumn,a.lineNumber,g.endColumn):null}getWordUntilPosition(a,o){const g=this.getWordAtPosition(a,o);return g?{word:this._lines[a.lineNumber-1].substring(g.startColumn-1,a.column-1),startColumn:g.startColumn,endColumn:a.column}:{word:"",startColumn:a.column,endColumn:a.column}}words(a){const o=this._lines,g=this._wordenize.bind(this);let h=0,v="",m=0,w=[];return{*[Symbol.iterator](){for(;;)if(m<w.length){const D=v.substring(w[m].start,w[m].end);m+=1,yield D}else if(h<o.length)v=o[h],w=g(v,a),m=0,h+=1;else break}}}getLineWords(a,o){const g=this._lines[a-1],h=this._wordenize(g,o),v=[];for(const m of h)v.push({word:g.substring(m.start,m.end),startColumn:m.start+1,endColumn:m.end+1});return v}_wordenize(a,o){const g=[];let h;for(o.lastIndex=0;(h=o.exec(a))&&h[0].length!==0;)g.push({start:h.index,end:h.index+h[0].length});return g}getValueInRange(a){if(a=this._validateRange(a),a.startLineNumber===a.endLineNumber)return this._lines[a.startLineNumber-1].substring(a.startColumn-1,a.endColumn-1);const o=this._eol,g=a.startLineNumber-1,h=a.endLineNumber-1,v=[];v.push(this._lines[g].substring(a.startColumn-1));for(let m=g+1;m<h;m++)v.push(this._lines[m]);return v.push(this._lines[h].substring(0,a.endColumn-1)),v.join(o)}offsetAt(a){return a=this._validatePosition(a),this._ensureLineStarts(),this._lineStarts.getPrefixSum(a.lineNumber-2)+(a.column-1)}positionAt(a){a=Math.floor(a),a=Math.max(0,a),this._ensureLineStarts();const o=this._lineStarts.getIndexOf(a),g=this._lines[o.index].length;return{lineNumber:1+o.index,column:1+Math.min(o.remainder,g)}}_validateRange(a){const o=this._validatePosition({lineNumber:a.startLineNumber,column:a.startColumn}),g=this._validatePosition({lineNumber:a.endLineNumber,column:a.endColumn});return o.lineNumber!==a.startLineNumber||o.column!==a.startColumn||g.lineNumber!==a.endLineNumber||g.column!==a.endColumn?{startLineNumber:o.lineNumber,startColumn:o.column,endLineNumber:g.lineNumber,endColumn:g.column}:a}_validatePosition(a){if(!A.Position.isIPosition(a))throw new Error("bad position");let{lineNumber:o,column:g}=a,h=!1;if(o<1)o=1,g=1,h=!0;else if(o>this._lines.length)o=this._lines.length,g=this._lines[o-1].length+1,h=!0;else{const v=this._lines[o-1].length+1;g<1?(g=1,h=!0):g>v&&(g=v,h=!0)}return h?{lineNumber:o,column:g}:a}}e.MirrorModel=l;class s{constructor(a,o){this._host=a,this._models=Object.create(null),this._foreignModuleFactory=o,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(a){return this._models[a]}_getModels(){const a=[];return Object.keys(this._models).forEach(o=>a.push(this._models[o])),a}acceptNewModel(a){this._models[a.url]=new l(R.URI.parse(a.url),a.lines,a.EOL,a.versionId)}acceptModelChanged(a,o){if(!this._models[a])return;this._models[a].onEvents(o)}acceptRemovedModel(a){!this._models[a]||delete this._models[a]}async computeUnicodeHighlights(a,o,g){const h=this._getModel(a);return h?u.UnicodeTextModelHighlighter.computeUnicodeHighlights(h,o,g):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async computeDiff(a,o,g){const h=this._getModel(a),v=this._getModel(o);return!h||!v?null:s.computeDiff(h,v,g)}static computeDiff(a,o,g){const h=g.diffAlgorithm==="experimental"?f.linesDiffComputers.experimental:f.linesDiffComputers.smart,v=a.getLinesContent(),m=o.getLinesContent(),w=h.computeDiff(v,m,g);return{identical:w.changes.length>0?!1:this._modelsAreIdentical(a,o),quitEarly:w.quitEarly,changes:w.changes.map(y=>[y.originalRange.startLineNumber,y.originalRange.endLineNumberExclusive,y.modifiedRange.startLineNumber,y.modifiedRange.endLineNumberExclusive,y.innerChanges?.map(T=>[T.originalRange.startLineNumber,T.originalRange.startColumn,T.originalRange.endLineNumber,T.originalRange.endColumn,T.modifiedRange.startLineNumber,T.modifiedRange.startColumn,T.modifiedRange.endLineNumber,T.modifiedRange.endColumn])])}}static _modelsAreIdentical(a,o){const g=a.getLineCount(),h=o.getLineCount();if(g!==h)return!1;for(let v=1;v<=g;v++){const m=a.getLineContent(v),w=o.getLineContent(v);if(m!==w)return!1}return!0}async computeDirtyDiff(a,o,g){const h=this._getModel(a),v=this._getModel(o);if(!h||!v)return null;const m=h.getLinesContent(),w=v.getLinesContent();return new i.DiffComputer(m,w,{shouldComputeCharChanges:!1,shouldPostProcessCharChanges:!1,shouldIgnoreTrimWhitespace:g,shouldMakePrettyDiff:!0,maxComputationTime:1e3}).computeDiff().changes}async computeMoreMinimalEdits(a,o){const g=this._getModel(a);if(!g)return o;const h=[];let v;o=o.slice(0).sort((m,w)=>{if(m.range&&w.range)return k.Range.compareRangesUsingStarts(m.range,w.range);const D=m.range?0:1,y=w.range?0:1;return D-y});for(let{range:m,text:w,eol:D}of o){if(typeof D=="number"&&(v=D),k.Range.isEmpty(m)&&!w)continue;const y=g.getValueInRange(m);if(w=w.replace(/\r\n|\n|\r/g,g.eol),y===w)continue;if(Math.max(w.length,y.length)>s._diffLimit){h.push({range:m,text:w});continue}const T=(0,t.stringDiff)(y,w,!1),_=g.offsetAt(k.Range.lift(m).getStartPosition());for(const L of T){const M=g.positionAt(_+L.originalStart),O=g.positionAt(_+L.originalStart+L.originalLength),N={text:w.substr(L.modifiedStart,L.modifiedLength),range:{startLineNumber:M.lineNumber,startColumn:M.column,endLineNumber:O.lineNumber,endColumn:O.column}};g.getValueInRange(N.range)!==N.text&&h.push(N)}}return typeof v=="number"&&h.push({eol:v,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),h}async computeLinks(a){const o=this._getModel(a);return o?(0,b.computeLinks)(o):null}async textualSuggest(a,o,g,h){const v=new r.StopWatch(!0),m=new RegExp(g,h),w=new Set;e:for(const D of a){const y=this._getModel(D);if(!!y){for(const T of y.words(m))if(!(T===o||!isNaN(Number(T)))&&(w.add(T),w.size>s._suggestionsLimit))break e}}return{words:Array.from(w),duration:v.elapsed()}}async computeWordRanges(a,o,g,h){const v=this._getModel(a);if(!v)return Object.create(null);const m=new RegExp(g,h),w=Object.create(null);for(let D=o.startLineNumber;D<o.endLineNumber;D++){const y=v.getLineWords(D,m);for(const T of y){if(!isNaN(Number(T.word)))continue;let _=w[T.word];_||(_=[],w[T.word]=_),_.push({startLineNumber:D,startColumn:T.startColumn,endLineNumber:D,endColumn:T.endColumn})}}return w}async navigateValueSet(a,o,g,h,v){const m=this._getModel(a);if(!m)return null;const w=new RegExp(h,v);o.startColumn===o.endColumn&&(o={startLineNumber:o.startLineNumber,startColumn:o.startColumn,endLineNumber:o.endLineNumber,endColumn:o.endColumn+1});const D=m.getValueInRange(o),y=m.getWordAtPosition({lineNumber:o.startLineNumber,column:o.startColumn},w);if(!y)return null;const T=m.getValueInRange(y);return S.BasicInplaceReplace.INSTANCE.navigateValueSet(o,D,y,T,g)}loadForeignModule(a,o,g){const h=(w,D)=>this._host.fhr(w,D),m={host:(0,c.createProxyObject)(g,h),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(m,o),Promise.resolve((0,c.getAllMethodNames)(this._foreignModule))):new Promise((w,D)=>{J([a],y=>{this._foreignModule=y.create(m,o),w((0,c.getAllMethodNames)(this._foreignModule))},D)})}fmr(a,o){if(!this._foreignModule||typeof this._foreignModule[a]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+a));try{return Promise.resolve(this._foreignModule[a].apply(this._foreignModule,o))}catch(g){return Promise.reject(g)}}}e.EditorSimpleWorker=s,s._diffLimit=1e5,s._suggestionsLimit=1e4;function d(n){return new s(n,null)}e.create=d,typeof importScripts=="function"&&(p.globals.monaco=(0,C.createMonacoBaseAPI)())}),define(ae[421],le([1,0,28]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDecorationsNormalizer=e.DecorationSegment=e.LineDecoration=void 0;class p{constructor(I,b,S,C){this.startColumn=I,this.endColumn=b,this.className=S,this.type=C,this._lineDecorationBrand=void 0}static _equals(I,b){return I.startColumn===b.startColumn&&I.endColumn===b.endColumn&&I.className===b.className&&I.type===b.type}static equalsArr(I,b){const S=I.length,C=b.length;if(S!==C)return!1;for(let r=0;r<S;r++)if(!p._equals(I[r],b[r]))return!1;return!0}static extractWrapped(I,b,S){if(I.length===0)return I;const C=b+1,r=S+1,u=S-b,i=[];let f=0;for(const c of I)c.endColumn<=C||c.startColumn>=r||(i[f++]=new p(Math.max(1,c.startColumn-C+1),Math.min(u+1,c.endColumn-C+1),c.className,c.type));return i}static filter(I,b,S,C){if(I.length===0)return[];const r=[];let u=0;for(let i=0,f=I.length;i<f;i++){const c=I[i],l=c.range;if(l.endLineNumber<b||l.startLineNumber>b||l.isEmpty()&&(c.type===0||c.type===3))continue;const s=l.startLineNumber===b?l.startColumn:S,d=l.endLineNumber===b?l.endColumn:C;r[u++]=new p(s,d,c.inlineClassName,c.type)}return r}static _typeCompare(I,b){const S=[2,0,1,3];return S[I]-S[b]}static compare(I,b){if(I.startColumn!==b.startColumn)return I.startColumn-b.startColumn;if(I.endColumn!==b.endColumn)return I.endColumn-b.endColumn;const S=p._typeCompare(I.type,b.type);return S!==0?S:I.className!==b.className?I.className<b.className?-1:1:0}}e.LineDecoration=p;class R{constructor(I,b,S,C){this.startOffset=I,this.endOffset=b,this.className=S,this.metadata=C}}e.DecorationSegment=R;class A{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(I){let b=0;for(let S=0,C=I.length;S<C;S++)b|=I[S];return b}consumeLowerThan(I,b,S){for(;this.count>0&&this.stopOffsets[0]<I;){let C=0;for(;C+1<this.count&&this.stopOffsets[C]===this.stopOffsets[C+1];)C++;S.push(new R(b,this.stopOffsets[C],this.classNames.join(" "),A._metadata(this.metadata))),b=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&&b<I&&(S.push(new R(b,I-1,this.classNames.join(" "),A._metadata(this.metadata))),b=I),b}insert(I,b,S){if(this.count===0||this.stopOffsets[this.count-1]<=I)this.stopOffsets.push(I),this.classNames.push(b),this.metadata.push(S);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,b),this.metadata.splice(C,0,S);break}this.count++}}class k{static normalize(I,b){if(b.length===0)return[];const S=[],C=new A;let r=0;for(let u=0,i=b.length;u<i;u++){const f=b[u];let c=f.startColumn,l=f.endColumn;const s=f.className,d=f.type===1?2:f.type===2?4:0;if(c>1){const o=I.charCodeAt(c-2);t.isHighSurrogate(o)&&c--}if(l>1){const o=I.charCodeAt(l-2);t.isHighSurrogate(o)&&l--}const n=c-1,a=l-2;r=C.consumeLowerThan(n,r,S),C.count===0&&(r=n),C.insert(a,s,d)}return C.consumeLowerThan(1073741824,r,S),S}}e.LineDecorationsNormalizer=k}),define(ae[1296],le([1,0,28]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class p{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(E){this._hasPending=!0,this._inserts.push(E)}change(E){this._hasPending=!0,this._changes.push(E)}remove(E){this._hasPending=!0,this._removes.push(E)}mustCommit(){return this._hasPending}commit(E){if(!this._hasPending)return;const I=this._inserts,b=this._changes,S=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],E._commitPendingChanges(I,b,S)}}class R{constructor(E,I,b,S,C){this.id=E,this.afterLineNumber=I,this.ordinal=b,this.height=S,this.minWidth=C,this.prefixSum=0}}e.EditorWhitespace=R;class A{constructor(E,I,b,S){this._instanceId=t.singleLetterHash(++A.INSTANCE_COUNT),this._pendingChanges=new p,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=E,this._lineHeight=I,this._paddingTop=b,this._paddingBottom=S}static findInsertionIndex(E,I,b){let S=0,C=E.length;for(;S<C;){const r=S+C>>>1;I===E[r].afterLineNumber?b<E[r].ordinal?C=r:S=r+1:I<E[r].afterLineNumber?C=r:S=r+1}return S}setLineHeight(E){this._checkPendingChanges(),this._lineHeight=E}setPadding(E,I){this._paddingTop=E,this._paddingBottom=I}onFlushed(E){this._checkPendingChanges(),this._lineCount=E}changeWhitespace(E){let I=!1;try{E({insertWhitespace:(S,C,r,u)=>{I=!0,S=S|0,C=C|0,r=r|0,u=u|0;const i=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new R(i,S,C,r,u)),i},changeOneWhitespace:(S,C,r)=>{I=!0,C=C|0,r=r|0,this._pendingChanges.change({id:S,newAfterLineNumber:C,newHeight:r})},removeWhitespace:S=>{I=!0,this._pendingChanges.remove({id:S})}})}finally{this._pendingChanges.commit(this)}return I}_commitPendingChanges(E,I,b){if((E.length>0||b.length>0)&&(this._minWidth=-1),E.length+I.length+b.length<=1){for(const i of E)this._insertWhitespace(i);for(const i of I)this._changeOneWhitespace(i.id,i.newAfterLineNumber,i.newHeight);for(const i of b){const f=this._findWhitespaceIndex(i.id);f!==-1&&this._removeWhitespace(f)}return}const S=new Set;for(const i of b)S.add(i.id);const C=new Map;for(const i of I)C.set(i.id,i);const r=i=>{const f=[];for(const c of i)if(!S.has(c.id)){if(C.has(c.id)){const l=C.get(c.id);c.afterLineNumber=l.newAfterLineNumber,c.height=l.newHeight}f.push(c)}return f},u=r(this._arr).concat(r(E));u.sort((i,f)=>i.afterLineNumber===f.afterLineNumber?i.ordinal-f.ordinal:i.afterLineNumber-f.afterLineNumber),this._arr=u,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(E){const I=A.findInsertionIndex(this._arr,E.afterLineNumber,E.ordinal);this._arr.splice(I,0,E),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,I-1)}_findWhitespaceIndex(E){const I=this._arr;for(let b=0,S=I.length;b<S;b++)if(I[b].id===E)return b;return-1}_changeOneWhitespace(E,I,b){const S=this._findWhitespaceIndex(E);if(S!==-1&&(this._arr[S].height!==b&&(this._arr[S].height=b,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,S-1)),this._arr[S].afterLineNumber!==I)){const C=this._arr[S];this._removeWhitespace(S),C.afterLineNumber=I,this._insertWhitespace(C)}}_removeWhitespace(E){this._arr.splice(E,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,E-1)}onLinesDeleted(E,I){this._checkPendingChanges(),E=E|0,I=I|0,this._lineCount-=I-E+1;for(let b=0,S=this._arr.length;b<S;b++){const C=this._arr[b].afterLineNumber;E<=C&&C<=I?this._arr[b].afterLineNumber=E-1:C>I&&(this._arr[b].afterLineNumber-=I-E+1)}}onLinesInserted(E,I){this._checkPendingChanges(),E=E|0,I=I|0,this._lineCount+=I-E+1;for(let b=0,S=this._arr.length;b<S;b++){const C=this._arr[b].afterLineNumber;E<=C&&(this._arr[b].afterLineNumber+=I-E+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(E){this._checkPendingChanges(),E=E|0;let I=Math.max(0,this._prefixSumValidIndex+1);I===0&&(this._arr[0].prefixSum=this._arr[0].height,I++);for(let b=I;b<=E;b++)this._arr[b].prefixSum=this._arr[b-1].prefixSum+this._arr[b].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,E),this._arr[E].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const E=this._lineHeight*this._lineCount,I=this.getWhitespacesTotalHeight();return E+I+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(E){this._checkPendingChanges(),E=E|0;const I=this._findLastWhitespaceBeforeLineNumber(E);return I===-1?0:this.getWhitespacesAccumulatedHeight(I)}_findLastWhitespaceBeforeLineNumber(E){E=E|0;const I=this._arr;let b=0,S=I.length-1;for(;b<=S;){const r=(S-b|0)/2|0,u=b+r|0;if(I[u].afterLineNumber<E){if(u+1>=I.length||I[u+1].afterLineNumber>=E)return u;b=u+1|0}else S=u-1|0}return-1}_findFirstWhitespaceAfterLineNumber(E){E=E|0;const b=this._findLastWhitespaceBeforeLineNumber(E)+1;return b<this._arr.length?b:-1}getFirstWhitespaceIndexAfterLineNumber(E){return this._checkPendingChanges(),E=E|0,this._findFirstWhitespaceAfterLineNumber(E)}getVerticalOffsetForLineNumber(E,I=!1){this._checkPendingChanges(),E=E|0;let b;E>1?b=this._lineHeight*(E-1):b=0;const S=this.getWhitespaceAccumulatedHeightBeforeLineNumber(E-(I?1:0));return b+S+this._paddingTop}getVerticalOffsetAfterLineNumber(E,I=!1){this._checkPendingChanges(),E=E|0;const b=this._lineHeight*E,S=this.getWhitespaceAccumulatedHeightBeforeLineNumber(E+(I?1:0));return b+S+this._paddingTop}hasWhitespace(){return this._checkPendingChanges(),this.getWhitespacesCount()>0}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let E=0;for(let I=0,b=this._arr.length;I<b;I++)E=Math.max(E,this._arr[I].minWidth);this._minWidth=E}return this._minWidth}isAfterLines(E){this._checkPendingChanges();const I=this.getLinesTotalHeight();return E>I}isInTopPadding(E){return this._paddingTop===0?!1:(this._checkPendingChanges(),E<this._paddingTop)}isInBottomPadding(E){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const I=this.getLinesTotalHeight();return E>=I-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(E){if(this._checkPendingChanges(),E=E|0,E<0)return 1;const I=this._lineCount|0,b=this._lineHeight;let S=1,C=I;for(;S<C;){const r=(S+C)/2|0,u=this.getVerticalOffsetForLineNumber(r)|0;if(E>=u+b)S=r+1;else{if(E>=u)return r;C=r}}return S>I?I:S}getLinesViewportData(E,I){this._checkPendingChanges(),E=E|0,I=I|0;const b=this._lineHeight,S=this.getLineNumberAtOrAfterVerticalOffset(E)|0,C=this.getVerticalOffsetForLineNumber(S)|0;let r=this._lineCount|0,u=this.getFirstWhitespaceIndexAfterLineNumber(S)|0;const i=this.getWhitespacesCount()|0;let f,c;u===-1?(u=i,c=r+1,f=0):(c=this.getAfterLineNumberForWhitespaceIndex(u)|0,f=this.getHeightForWhitespaceIndex(u)|0);let l=C,s=l;const d=5e5;let n=0;C>=d&&(n=Math.floor(C/d)*d,n=Math.floor(n/b)*b,s-=n);const a=[],o=E+(I-E)/2;let g=-1;for(let w=S;w<=r;w++){if(g===-1){const D=l,y=l+b;(D<=o&&o<y||D>o)&&(g=w)}for(l+=b,a[w-S]=s,s+=b;c===w;)s+=f,l+=f,u++,u>=i?c=r+1:(c=this.getAfterLineNumberForWhitespaceIndex(u)|0,f=this.getHeightForWhitespaceIndex(u)|0);if(l>=I){r=w;break}}g===-1&&(g=r);const h=this.getVerticalOffsetForLineNumber(r)|0;let v=S,m=r;return v<m&&C<E&&v++,v<m&&h+b>I&&m--,{bigNumbersDelta:n,startLineNumber:S,endLineNumber:r,relativeVerticalOffset:a,centeredLineNumber:g,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:m}}getVerticalOffsetForWhitespaceIndex(E){this._checkPendingChanges(),E=E|0;const I=this.getAfterLineNumberForWhitespaceIndex(E);let b;I>=1?b=this._lineHeight*I:b=0;let S;return E>0?S=this.getWhitespacesAccumulatedHeight(E-1):S=0,b+S+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(E){this._checkPendingChanges(),E=E|0;let I=0,b=this.getWhitespacesCount()-1;if(b<0)return-1;const S=this.getVerticalOffsetForWhitespaceIndex(b),C=this.getHeightForWhitespaceIndex(b);if(E>=S+C)return-1;for(;I<b;){const r=Math.floor((I+b)/2),u=this.getVerticalOffsetForWhitespaceIndex(r),i=this.getHeightForWhitespaceIndex(r);if(E>=u+i)I=r+1;else{if(E>=u)return r;b=r}}return I}getWhitespaceAtVerticalOffset(E){this._checkPendingChanges(),E=E|0;const I=this.getWhitespaceIndexAtOrAfterVerticallOffset(E);if(I<0||I>=this.getWhitespacesCount())return null;const b=this.getVerticalOffsetForWhitespaceIndex(I);if(b>E)return null;const S=this.getHeightForWhitespaceIndex(I),C=this.getIdForWhitespaceIndex(I),r=this.getAfterLineNumberForWhitespaceIndex(I);return{id:C,afterLineNumber:r,verticalOffset:b,height:S}}getWhitespaceViewportData(E,I){this._checkPendingChanges(),E=E|0,I=I|0;const b=this.getWhitespaceIndexAtOrAfterVerticallOffset(E),S=this.getWhitespacesCount()-1;if(b<0)return[];const C=[];for(let r=b;r<=S;r++){const u=this.getVerticalOffsetForWhitespaceIndex(r),i=this.getHeightForWhitespaceIndex(r);if(u>=I)break;C.push({id:this.getIdForWhitespaceIndex(r),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(r),verticalOffset:u,height:i})}return C}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(E){return this._checkPendingChanges(),E=E|0,this._arr[E].id}getAfterLineNumberForWhitespaceIndex(E){return this._checkPendingChanges(),E=E|0,this._arr[E].afterLineNumber}getHeightForWhitespaceIndex(E){return this._checkPendingChanges(),E=E|0,this._arr[E].height}}e.LinesLayout=A,A.INSTANCE_COUNT=0}),define(ae[281],le([1,0,28,20]),function(J,e,t,p){"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 R{constructor(i,f,c,l){this._viewportBrand=void 0,this.top=i|0,this.left=f|0,this.width=c|0,this.height=l|0}}e.Viewport=R;class A{constructor(i,f){this.tabSize=i,this.data=f}}e.MinimapLinesRenderingData=A;class k{constructor(i,f,c,l,s,d,n){this._viewLineDataBrand=void 0,this.content=i,this.continuesWithWrappedLine=f,this.minColumn=c,this.maxColumn=l,this.startVisibleColumn=s,this.tokens=d,this.inlineDecorations=n}}e.ViewLineData=k;class E{constructor(i,f,c,l,s,d,n,a,o,g){this.minColumn=i,this.maxColumn=f,this.content=c,this.continuesWithWrappedLine=l,this.isBasicASCII=E.isBasicASCII(c,d),this.containsRTL=E.containsRTL(c,this.isBasicASCII,s),this.tokens=n,this.inlineDecorations=a,this.tabSize=o,this.startVisibleColumn=g}static isBasicASCII(i,f){return f?t.isBasicASCII(i):!0}static containsRTL(i,f,c){return!f&&c?t.containsRTL(i):!1}}e.ViewLineRenderingData=E;var I;(function(u){u[u.Regular=0]="Regular",u[u.Before=1]="Before",u[u.After=2]="After",u[u.RegularAffectingLetterSpacing=3]="RegularAffectingLetterSpacing"})(I=e.InlineDecorationType||(e.InlineDecorationType={}));class b{constructor(i,f,c){this.range=i,this.inlineClassName=f,this.type=c}}e.InlineDecoration=b;class S{constructor(i,f,c,l){this.startOffset=i,this.endOffset=f,this.inlineClassName=c,this.inlineClassNameAffectsLetterSpacing=l}toInlineDecoration(i){return new b(new p.Range(i,this.startOffset+1,i,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=S;class C{constructor(i,f){this._viewModelDecorationBrand=void 0,this.range=i,this.options=f}}e.ViewModelDecoration=C;class r{constructor(i,f,c){this.color=i,this.zIndex=f,this.data=c}static cmp(i,f){return i.zIndex===f.zIndex?i.color<f.color?-1:i.color>f.color?1:0:i.zIndex-f.zIndex}}e.OverviewRulerDecorationsGroup=r}),define(ae[778],le([1,0,6,2,727,92]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class k extends p.Disposable{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,p.markAsSingleton)(new k)),this._INSTANCE}constructor(){super(),this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(A.TokenizationRegistry.onDidChange(I=>{I.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const I=A.TokenizationRegistry.getColorMap();if(!I){this._colors=[R.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[R.RGBA8.Empty];for(let S=1;S<I.length;S++){const C=I[S].rgba;this._colors[S]=new R.RGBA8(C.r,C.g,C.b,Math.round(C.a*255))}const b=I[2].getRelativeLuminance();this._backgroundIsLight=b>=.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(ae[1297],le([1,0,301,50,326,281]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function k(u,i){return u===null?i?I.INSTANCE:b.INSTANCE:new E(u,i)}e.createModelLineProjection=k;class E{constructor(i,f){this._projectionData=i,this._isVisible=f}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,f,c){this._assertVisible();const l=c>0?this._projectionData.breakOffsets[c-1]:0,s=this._projectionData.breakOffsets[c];let d;if(this._projectionData.injectionOffsets!==null){const n=this._projectionData.injectionOffsets.map((o,g)=>new R.LineInjectedText(0,0,o+1,this._projectionData.injectionOptions[g],0));d=R.LineInjectedText.applyInjectedText(i.getLineContent(f),n).substring(l,s)}else d=i.getValueInRange({startLineNumber:f,startColumn:l+1,endLineNumber:f,endColumn:s+1});return c>0&&(d=C(this._projectionData.wrappedTextIndentLength)+d),d}getViewLineLength(i,f,c){return this._assertVisible(),this._projectionData.getLineLength(c)}getViewLineMinColumn(i,f,c){return this._assertVisible(),this._projectionData.getMinOutputOffset(c)+1}getViewLineMaxColumn(i,f,c){return this._assertVisible(),this._projectionData.getMaxOutputOffset(c)+1}getViewLineData(i,f,c){const l=new Array;return this.getViewLinesData(i,f,c,1,0,[!0],l),l[0]}getViewLinesData(i,f,c,l,s,d,n){this._assertVisible();const a=this._projectionData,o=a.injectionOffsets,g=a.injectionOptions;let h=null;if(o){h=[];let m=0,w=0;for(let D=0;D<a.getOutputLineCount();D++){const y=new Array;h[D]=y;const T=D>0?a.breakOffsets[D-1]:0,_=a.breakOffsets[D];for(;w<o.length;){const L=g[w].content.length,M=o[w]+m,O=M+L;if(M>_)break;if(T<O){const N=g[w];if(N.inlineClassName){const P=D>0?a.wrappedTextIndentLength:0,B=P+Math.max(M-T,0),V=P+Math.min(O-T,_);B!==V&&y.push(new A.SingleLineInlineDecoration(B,V,N.inlineClassName,N.inlineClassNameAffectsLetterSpacing))}}if(O<=_)m+=L,w++;else break}}}let v;o?v=i.tokenization.getLineTokens(f).withInserted(o.map((m,w)=>({offset:m,text:g[w].content,tokenMetadata:t.LineTokens.defaultTokenMetadata}))):v=i.tokenization.getLineTokens(f);for(let m=c;m<c+l;m++){const w=s+m-c;if(!d[w]){n[w]=null;continue}n[w]=this._getViewLineData(v,h?h[m]:null,m)}}_getViewLineData(i,f,c){this._assertVisible();const l=this._projectionData,s=c>0?l.wrappedTextIndentLength:0,d=c>0?l.breakOffsets[c-1]:0,n=l.breakOffsets[c],a=i.sliceAndInflate(d,n,s);let o=a.getLineContent();c>0&&(o=C(l.wrappedTextIndentLength)+o);const g=this._projectionData.getMinOutputOffset(c)+1,h=o.length+1,v=c+1<this.getViewLineCount(),m=c===0?0:l.breakOffsetsVisibleColumn[c-1];return new A.ViewLineData(o,v,g,h,m,a,f)}getModelColumnOfViewPosition(i,f){return this._assertVisible(),this._projectionData.translateToInputOffset(i,f-1)+1}getViewPositionOfModelPosition(i,f,c=2){return this._assertVisible(),this._projectionData.translateToOutputPosition(f-1,c).toPosition(i)}getViewLineNumberOfModelPosition(i,f){this._assertVisible();const c=this._projectionData.translateToOutputPosition(f-1);return i+c.outputLineIndex}normalizePosition(i,f,c){const l=f.lineNumber-i;return this._projectionData.normalizeOutputPosition(i,f.column-1,c).toPosition(l)}getInjectedTextAt(i,f){return this._projectionData.getInjectedText(i,f-1)}_assertVisible(){if(!this._isVisible)throw new Error("Not supported")}}class I{constructor(){}isVisible(){return!0}setVisible(i){return i?this:b.INSTANCE}getProjectionData(){return null}getViewLineCount(){return 1}getViewLineContent(i,f,c){return i.getLineContent(f)}getViewLineLength(i,f,c){return i.getLineLength(f)}getViewLineMinColumn(i,f,c){return i.getLineMinColumn(f)}getViewLineMaxColumn(i,f,c){return i.getLineMaxColumn(f)}getViewLineData(i,f,c){const l=i.tokenization.getLineTokens(f),s=l.getLineContent();return new A.ViewLineData(s,!1,1,s.length+1,0,l.inflate(),null)}getViewLinesData(i,f,c,l,s,d,n){if(!d[s]){n[s]=null;return}n[s]=this.getViewLineData(i,f,0)}getModelColumnOfViewPosition(i,f){return f}getViewPositionOfModelPosition(i,f){return new p.Position(i,f)}getViewLineNumberOfModelPosition(i,f){return i}normalizePosition(i,f,c){return f}getInjectedTextAt(i,f){return null}}I.INSTANCE=new I;class b{constructor(){}isVisible(){return!1}setVisible(i){return i?I.INSTANCE:this}getProjectionData(){return null}getViewLineCount(){return 0}getViewLineContent(i,f,c){throw new Error("Not supported")}getViewLineLength(i,f,c){throw new Error("Not supported")}getViewLineMinColumn(i,f,c){throw new Error("Not supported")}getViewLineMaxColumn(i,f,c){throw new Error("Not supported")}getViewLineData(i,f,c){throw new Error("Not supported")}getViewLinesData(i,f,c,l,s,d,n){throw new Error("Not supported")}getModelColumnOfViewPosition(i,f){throw new Error("Not supported")}getViewPositionOfModelPosition(i,f){throw new Error("Not supported")}getViewLineNumberOfModelPosition(i,f){throw new Error("Not supported")}normalizePosition(i,f,c){throw new Error("Not supported")}getInjectedTextAt(i,f){throw new Error("Not supported")}}b.INSTANCE=new b;const S=[""];function C(u){if(u>=S.length)for(let i=1;i<=u;i++)S[i]=r(i);return S[u]}function r(u){return new Array(u+1).join(" ")}}),define(ae[1298],le([1,0,28,359,326,731]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class k{static create(s){return new k(s.get(122),s.get(121))}constructor(s,d){this.classifier=new I(s,d)}createLineBreaksComputer(s,d,n,a){const o=[],g=[],h=[];return{addRequest:(v,m,w)=>{o.push(v),g.push(m),h.push(w)},finalize:()=>{const v=s.typicalFullwidthCharacterWidth/s.typicalHalfwidthCharacterWidth,m=[];for(let w=0,D=o.length;w<D;w++){const y=g[w],T=h[w];T&&!T.injectionOptions&&!y?m[w]=C(this.classifier,T,o[w],d,n,v,a):m[w]=r(this.classifier,o[w],y,d,n,v,a)}return b.length=0,S.length=0,m}}}}e.MonospaceLineBreaksComputerFactory=k;var E;(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"})(E||(E={}));class I extends p.CharacterClassifier{constructor(s,d){super(0);for(let n=0;n<s.length;n++)this.set(s.charCodeAt(n),1);for(let n=0;n<d.length;n++)this.set(d.charCodeAt(n),2)}get(s){return s>=0&&s<256?this._asciiMap[s]:s>=12352&&s<=12543||s>=13312&&s<=19903||s>=19968&&s<=40959?3:this._map.get(s)||this._defaultValue}}let b=[],S=[];function C(l,s,d,n,a,o,g){if(a===-1)return null;const h=d.length;if(h<=1)return null;const v=s.breakOffsets,m=s.breakOffsetsVisibleColumn,w=c(d,n,a,o,g),D=a-w,y=b,T=S;let _=0,L=0,M=0,O=a;const N=v.length;let P=0;if(P>=0){let B=Math.abs(m[P]-O);for(;P+1<N;){const V=Math.abs(m[P+1]-O);if(V>=B)break;B=V,P++}}for(;P<N;){let B=P<0?0:v[P],V=P<0?0:m[P];L>B&&(B=L,V=M);let z=0,x=0,H=0,W=0;if(V<=O){let $=V,q=B===0?0:d.charCodeAt(B-1),X=B===0?0:l.get(q),G=!0;for(let Q=B;Q<h;Q++){const j=Q,K=d.charCodeAt(Q);let Y,ee;if(t.isHighSurrogate(K)?(Q++,Y=0,ee=2):(Y=l.get(K),ee=u(K,$,n,o)),j>L&&f(q,X,K,Y)&&(z=j,x=$),$+=ee,$>O){j>L?(H=j,W=$-ee):(H=Q+1,W=$),$-x>D&&(z=0),G=!1;break}q=K,X=Y}if(G){_>0&&(y[_]=v[v.length-1],T[_]=m[v.length-1],_++);break}}if(z===0){let $=V,q=d.charCodeAt(B),X=l.get(q),G=!1;for(let Q=B-1;Q>=L;Q--){const j=Q+1,K=d.charCodeAt(Q);if(K===9){G=!0;break}let Y,ee;if(t.isLowSurrogate(K)?(Q--,Y=0,ee=2):(Y=l.get(K),ee=t.isFullWidthCharacter(K)?o:1),$<=O){if(H===0&&(H=j,W=$),$<=O-D)break;if(f(K,Y,q,X)){z=j,x=$;break}}$-=ee,q=K,X=Y}if(z!==0){const Q=D-(W-x);if(Q<=n){const j=d.charCodeAt(H);let K;t.isHighSurrogate(j)?K=2:K=u(j,W,n,o),Q-K<0&&(z=0)}}if(G){P--;continue}}if(z===0&&(z=H,x=W),z<=L){const $=d.charCodeAt(L);t.isHighSurrogate($)?(z=L+2,x=M+2):(z=L+1,x=M+u($,M,n,o))}for(L=z,y[_]=z,M=x,T[_]=x,_++,O=x+D;P<0||P<N&&m[P]<x;)P++;let U=Math.abs(m[P]-O);for(;P+1<N;){const $=Math.abs(m[P+1]-O);if($>=U)break;U=$,P++}}return _===0?null:(y.length=_,T.length=_,b=s.breakOffsets,S=s.breakOffsetsVisibleColumn,s.breakOffsets=y,s.breakOffsetsVisibleColumn=T,s.wrappedTextIndentLength=w,s)}function r(l,s,d,n,a,o,g){const h=R.LineInjectedText.applyInjectedText(s,d);let v,m;if(d&&d.length>0?(v=d.map(x=>x.options),m=d.map(x=>x.column-1)):(v=null,m=null),a===-1)return v?new A.ModelLineProjectionData(m,v,[h.length],[],0):null;const w=h.length;if(w<=1)return v?new A.ModelLineProjectionData(m,v,[h.length],[],0):null;const D=c(h,n,a,o,g),y=a-D,T=[],_=[];let L=0,M=0,O=0,N=a,P=h.charCodeAt(0),B=l.get(P),V=u(P,0,n,o),z=1;t.isHighSurrogate(P)&&(V+=1,P=h.charCodeAt(1),B=l.get(P),z++);for(let x=z;x<w;x++){const H=x,W=h.charCodeAt(x);let U,$;t.isHighSurrogate(W)?(x++,U=0,$=2):(U=l.get(W),$=u(W,V,n,o)),f(P,B,W,U)&&(M=H,O=V),V+=$,V>N&&((M===0||V-O>y)&&(M=H,O=V-$),T[L]=M,_[L]=O,L++,N=O+y,M=0),P=W,B=U}return L===0&&(!d||d.length===0)?null:(T[L]=w,_[L]=V,new A.ModelLineProjectionData(m,v,T,_,D))}function u(l,s,d,n){return l===9?d-s%d:t.isFullWidthCharacter(l)||l<32?n:1}function i(l,s){return s-l%s}function f(l,s,d,n){return d!==32&&(s===2&&n!==2||s!==1&&n===1||s===3&&n!==2||n===3&&s!==1)}function c(l,s,d,n,a){let o=0;if(a!==0){const g=t.firstNonWhitespaceIndex(l);if(g!==-1){for(let v=0;v<g;v++)o+=l.charCodeAt(v)===9?i(o,s):1;const h=a===3?2:a===2?1:0;for(let v=0;v<h;v++)o+=i(o,s);o+n>d&&(o=0)}}return o}}),define(ae[594],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelTokensChangedEvent=e.ModelOptionsChangedEvent=e.ModelContentChangedEvent=e.ModelLanguageConfigurationChangedEvent=e.ModelLanguageChangedEvent=e.ModelDecorationsChangedEvent=e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.OutgoingViewModelEventKind=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class R extends p.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(a){this._addOutgoingEvent(a),this._emitOutgoingEvents()}_addOutgoingEvent(a){for(let o=0,g=this._outgoingEvents.length;o<g;o++){const h=this._outgoingEvents[o].kind===a.kind?this._outgoingEvents[o].attemptToMerge(a):null;if(h){this._outgoingEvents[o]=h;return}}this._outgoingEvents.push(a)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){if(this._collector||this._isConsumingViewEventQueue)return;const a=this._outgoingEvents.shift();a.isNoOp()||this._onEvent.fire(a)}}addViewEventHandler(a){for(let o=0,g=this._eventHandlers.length;o<g;o++)this._eventHandlers[o]===a&&console.warn("Detected duplicate listener in ViewEventDispatcher",a);this._eventHandlers.push(a)}removeViewEventHandler(a){for(let o=0;o<this._eventHandlers.length;o++)if(this._eventHandlers[o]===a){this._eventHandlers.splice(o,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new A),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const a=this._collector.outgoingEvents,o=this._collector.viewEvents;this._collector=null;for(const g of a)this._addOutgoingEvent(g);o.length>0&&this._emitMany(o)}this._emitOutgoingEvents()}emitSingleViewEvent(a){try{this.beginEmitViewEvents().emitViewEvent(a)}finally{this.endEmitViewEvents()}}_emitMany(a){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(a):this._viewEventQueue=a,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const a=this._viewEventQueue;this._viewEventQueue=null;const o=this._eventHandlers.slice(0);for(const g of o)g.handleEvents(a)}}}e.ViewModelEventDispatcher=R;class A{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(a){this.viewEvents.push(a)}emitOutgoingEvent(a){this.outgoingEvents.push(a)}}e.ViewModelEventsCollector=A;var k;(function(n){n[n.ContentSizeChanged=0]="ContentSizeChanged",n[n.FocusChanged=1]="FocusChanged",n[n.ScrollChanged=2]="ScrollChanged",n[n.ViewZonesChanged=3]="ViewZonesChanged",n[n.HiddenAreasChanged=4]="HiddenAreasChanged",n[n.ReadOnlyEditAttempt=5]="ReadOnlyEditAttempt",n[n.CursorStateChanged=6]="CursorStateChanged",n[n.ModelDecorationsChanged=7]="ModelDecorationsChanged",n[n.ModelLanguageChanged=8]="ModelLanguageChanged",n[n.ModelLanguageConfigurationChanged=9]="ModelLanguageConfigurationChanged",n[n.ModelContentChanged=10]="ModelContentChanged",n[n.ModelOptionsChanged=11]="ModelOptionsChanged",n[n.ModelTokensChanged=12]="ModelTokensChanged"})(k=e.OutgoingViewModelEventKind||(e.OutgoingViewModelEventKind={}));class E{constructor(a,o,g,h){this.kind=0,this._oldContentWidth=a,this._oldContentHeight=o,this.contentWidth=g,this.contentHeight=h,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(a){return a.kind!==this.kind?null:new E(this._oldContentWidth,this._oldContentHeight,a.contentWidth,a.contentHeight)}}e.ContentSizeChangedEvent=E;class I{constructor(a,o){this.kind=1,this.oldHasFocus=a,this.hasFocus=o}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(a){return a.kind!==this.kind?null:new I(this.oldHasFocus,a.hasFocus)}}e.FocusChangedEvent=I;class b{constructor(a,o,g,h,v,m,w,D){this.kind=2,this._oldScrollWidth=a,this._oldScrollLeft=o,this._oldScrollHeight=g,this._oldScrollTop=h,this.scrollWidth=v,this.scrollLeft=m,this.scrollHeight=w,this.scrollTop=D,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}attemptToMerge(a){return a.kind!==this.kind?null:new b(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,a.scrollWidth,a.scrollLeft,a.scrollHeight,a.scrollTop)}}e.ScrollChangedEvent=b;class S{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=S;class C{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=C;class r{constructor(a,o,g,h,v,m,w){this.kind=6,this.oldSelections=a,this.selections=o,this.oldModelVersionId=g,this.modelVersionId=h,this.source=v,this.reason=m,this.reachedMaxCursorCount=w}static _selectionsAreEqual(a,o){if(!a&&!o)return!0;if(!a||!o)return!1;const g=a.length,h=o.length;if(g!==h)return!1;for(let v=0;v<g;v++)if(!a[v].equalsSelection(o[v]))return!1;return!0}isNoOp(){return r._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}attemptToMerge(a){return a.kind!==this.kind?null:new r(this.oldSelections,a.selections,this.oldModelVersionId,a.modelVersionId,a.source,a.reason,this.reachedMaxCursorCount||a.reachedMaxCursorCount)}}e.CursorStateChangedEvent=r;class u{constructor(){this.kind=5}isNoOp(){return!1}attemptToMerge(a){return a.kind!==this.kind?null:this}}e.ReadOnlyEditAttemptEvent=u;class i{constructor(a){this.event=a,this.kind=7}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelDecorationsChangedEvent=i;class f{constructor(a){this.event=a,this.kind=8}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelLanguageChangedEvent=f;class c{constructor(a){this.event=a,this.kind=9}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelLanguageConfigurationChangedEvent=c;class l{constructor(a){this.event=a,this.kind=10}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelContentChangedEvent=l;class s{constructor(a){this.event=a,this.kind=11}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelOptionsChangedEvent=s;class d{constructor(a){this.event=a,this.kind=12}isNoOp(){return!1}attemptToMerge(a){return null}}e.ModelTokensChangedEvent=d}),define(ae[1299],le([1,0,6,2,486,1296,281,594]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLayout=void 0;const I=125;class b{constructor(u,i,f,c){u=u|0,i=i|0,f=f|0,c=c|0,u<0&&(u=0),i<0&&(i=0),f<0&&(f=0),c<0&&(c=0),this.width=u,this.contentWidth=i,this.scrollWidth=Math.max(u,i),this.height=f,this.contentHeight=c,this.scrollHeight=Math.max(f,c)}equals(u){return this.width===u.width&&this.contentWidth===u.contentWidth&&this.height===u.height&&this.contentHeight===u.contentHeight}}class S extends p.Disposable{constructor(u,i){super(),this._onDidContentSizeChange=this._register(new t.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new b(0,0,0,0),this._scrollable=this._register(new R.Scrollable({forceIntegerValues:!0,smoothScrollDuration:u,scheduleAtNextAnimationFrame:i})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(u){this._scrollable.setSmoothScrollDuration(u)}validateScrollPosition(u){return this._scrollable.validateScrollPosition(u)}getScrollDimensions(){return this._dimensions}setScrollDimensions(u){if(this._dimensions.equals(u))return;const i=this._dimensions;this._dimensions=u,this._scrollable.setScrollDimensions({width:u.width,scrollWidth:u.scrollWidth,height:u.height,scrollHeight:u.scrollHeight},!0);const f=i.contentWidth!==u.contentWidth,c=i.contentHeight!==u.contentHeight;(f||c)&&this._onDidContentSizeChange.fire(new E.ContentSizeChangedEvent(i.contentWidth,i.contentHeight,u.contentWidth,u.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(u){this._scrollable.setScrollPositionNow(u)}setScrollPositionSmooth(u){this._scrollable.setScrollPositionSmooth(u)}}class C extends p.Disposable{constructor(u,i,f){super(),this._configuration=u;const c=this._configuration.options,l=c.get(133),s=c.get(76);this._linesLayout=new A.LinesLayout(i,c.get(60),s.top,s.bottom),this._scrollable=this._register(new S(0,f)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new b(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(104)?I:0)}onConfigurationChanged(u){const i=this._configuration.options;if(u.hasChanged(60)&&this._linesLayout.setLineHeight(i.get(60)),u.hasChanged(76)){const f=i.get(76);this._linesLayout.setPadding(f.top,f.bottom)}if(u.hasChanged(133)){const f=i.get(133),c=f.contentWidth,l=f.height,s=this._scrollable.getScrollDimensions(),d=s.contentWidth;this._scrollable.setScrollDimensions(new b(c,s.contentWidth,l,this._getContentHeight(c,l,d)))}else this._updateHeight();u.hasChanged(104)&&this._configureSmoothScrollDuration()}onFlushed(u){this._linesLayout.onFlushed(u)}onLinesDeleted(u,i){this._linesLayout.onLinesDeleted(u,i)}onLinesInserted(u,i){this._linesLayout.onLinesInserted(u,i)}_getHorizontalScrollbarHeight(u,i){const c=this._configuration.options.get(93);return c.horizontal===2||u>=i?0:c.horizontalScrollbarSize}_getContentHeight(u,i,f){const c=this._configuration.options;let l=this._linesLayout.getLinesTotalHeight();return c.get(95)?l+=Math.max(0,i-c.get(60)-c.get(76).bottom):l+=this._getHorizontalScrollbarHeight(u,f),l}_updateHeight(){const u=this._scrollable.getScrollDimensions(),i=u.width,f=u.height,c=u.contentWidth;this._scrollable.setScrollDimensions(new b(i,u.contentWidth,f,this._getContentHeight(i,f,c)))}getCurrentViewport(){const u=this._scrollable.getScrollDimensions(),i=this._scrollable.getCurrentScrollPosition();return new k.Viewport(i.scrollTop,i.scrollLeft,u.width,u.height)}getFutureViewport(){const u=this._scrollable.getScrollDimensions(),i=this._scrollable.getFutureScrollPosition();return new k.Viewport(i.scrollTop,i.scrollLeft,u.width,u.height)}_computeContentWidth(u){const i=this._configuration.options,f=i.get(134),c=i.get(45),l=i.get(133);if(f.isViewportWrapping){const s=i.get(66);return u>l.contentWidth+c.typicalHalfwidthCharacterWidth&&s.enabled&&s.side==="right"?u+l.verticalScrollbarWidth:u}else{const s=i.get(94)*c.typicalHalfwidthCharacterWidth,d=this._linesLayout.getWhitespaceMinWidth();return Math.max(u+s+l.verticalScrollbarWidth,d)}}setMaxLineWidth(u){const i=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new b(i.width,this._computeContentWidth(u),i.height,i.contentHeight)),this._updateHeight()}saveState(){const u=this._scrollable.getFutureScrollPosition(),i=u.scrollTop,f=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(i),c=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(f);return{scrollTop:i,scrollTopWithoutViewZones:i-c,scrollLeft:u.scrollLeft}}changeWhitespace(u){const i=this._linesLayout.changeWhitespace(u);return i&&this.onHeightMaybeChanged(),i}getVerticalOffsetForLineNumber(u,i=!1){return this._linesLayout.getVerticalOffsetForLineNumber(u,i)}getVerticalOffsetAfterLineNumber(u,i=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(u,i)}isAfterLines(u){return this._linesLayout.isAfterLines(u)}isInTopPadding(u){return this._linesLayout.isInTopPadding(u)}isInBottomPadding(u){return this._linesLayout.isInBottomPadding(u)}getLineNumberAtVerticalOffset(u){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(u)}getWhitespaceAtVerticalOffset(u){return this._linesLayout.getWhitespaceAtVerticalOffset(u)}getLinesViewportData(){const u=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(u.top,u.top+u.height)}getLinesViewportDataAtScrollTop(u){const i=this._scrollable.getScrollDimensions();return u+i.height>i.scrollHeight&&(u=i.scrollHeight-i.height),u<0&&(u=0),this._linesLayout.getLinesViewportData(u,u+i.height)}getWhitespaceViewportData(){const u=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(u.top,u.top+u.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(u){return this._scrollable.validateScrollPosition(u)}setScrollPosition(u,i){i===1?this._scrollable.setScrollPositionNow(u):this._scrollable.setScrollPositionSmooth(u)}deltaScrollNow(u,i){const f=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:f.scrollLeft+u,scrollTop:f.scrollTop+i})}}e.ViewLayout=C}),define(ae[1300],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class p{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)}constructor(A,k,E){this.presentationIndex=E,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}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(A,k){for(let E=0;E<this.colorPresentations.length;E++)if(k.toLowerCase()===this.colorPresentations[E].label){this.presentationIndex=E,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}e.ColorPickerModel=p}),define(ae[1301],le([1,0,28,138,50,20,85,737]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=e.Type=void 0;var I;(function(S){S[S.Toggle=0]="Toggle",S[S.ForceAdd=1]="ForceAdd",S[S.ForceRemove=2]="ForceRemove"})(I=e.Type||(e.Type={}));class b{constructor(C,r,u,i,f,c,l){this.languageConfigurationService=C,this._selection=r,this._tabSize=u,this._type=i,this._insertSpace=f,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=c,this._ignoreFirstLine=l||!1}static _gatherPreflightCommentStrings(C,r,u,i){C.tokenization.tokenizeIfCheap(r);const f=C.getLanguageIdAtPosition(r,1),c=i.getLanguageConfiguration(f).comments,l=c?c.lineCommentToken:null;if(!l)return null;const s=[];for(let d=0,n=u-r+1;d<n;d++)s[d]={ignore:!1,commentStr:l,commentStrOffset:0,commentStrLength:l.length};return s}static _analyzeLines(C,r,u,i,f,c,l,s){let d=!0,n;C===0?n=!0:C===1?n=!1:n=!0;for(let a=0,o=i.length;a<o;a++){const g=i[a],h=f+a;if(h===f&&l){g.ignore=!0;continue}const v=u.getLineContent(h),m=t.firstNonWhitespaceIndex(v);if(m===-1){g.ignore=c,g.commentStrOffset=v.length;continue}if(d=!1,g.ignore=!1,g.commentStrOffset=m,n&&!E.BlockCommentCommand._haystackHasNeedleAtOffset(v,g.commentStr,m)&&(C===0?n=!1:C===1||(g.ignore=!0)),n&&r){const w=m+g.commentStrLength;w<v.length&&v.charCodeAt(w)===32&&(g.commentStrLength+=1)}}if(C===0&&d){n=!1;for(let a=0,o=i.length;a<o;a++)i[a].ignore=!1}return{supported:!0,shouldRemoveComments:n,lines:i}}static _gatherPreflightData(C,r,u,i,f,c,l,s){const d=b._gatherPreflightCommentStrings(u,i,f,s);return d===null?{supported:!1}:b._analyzeLines(C,r,u,d,i,c,l,s)}_executeLineComments(C,r,u,i){let f;u.shouldRemoveComments?f=b._createRemoveLineCommentsOperations(u.lines,i.startLineNumber):(b._normalizeInsertionPoint(C,u.lines,i.startLineNumber,this._tabSize),f=this._createAddLineCommentsOperations(u.lines,i.startLineNumber));const c=new R.Position(i.positionLineNumber,i.positionColumn);for(let l=0,s=f.length;l<s;l++)r.addEditOperation(f[l].range,f[l].text),A.Range.isEmpty(f[l].range)&&A.Range.getStartPosition(f[l].range).equals(c)&&C.getLineContent(c.lineNumber).length+1===c.column&&(this._deltaColumn=(f[l].text||"").length);this._selectionId=r.trackSelection(i)}_attemptRemoveBlockComment(C,r,u,i){let f=r.startLineNumber,c=r.endLineNumber;const l=i.length+Math.max(C.getLineFirstNonWhitespaceColumn(r.startLineNumber),r.startColumn);let s=C.getLineContent(f).lastIndexOf(u,l-1),d=C.getLineContent(c).indexOf(i,r.endColumn-1-u.length);return s!==-1&&d===-1&&(d=C.getLineContent(f).indexOf(i,s+u.length),c=f),s===-1&&d!==-1&&(s=C.getLineContent(c).lastIndexOf(u,d),f=c),r.isEmpty()&&(s===-1||d===-1)&&(s=C.getLineContent(f).indexOf(u),s!==-1&&(d=C.getLineContent(f).indexOf(i,s+u.length))),s!==-1&&C.getLineContent(f).charCodeAt(s+u.length)===32&&(u+=" "),d!==-1&&C.getLineContent(c).charCodeAt(d-1)===32&&(i=" "+i,d-=1),s!==-1&&d!==-1?E.BlockCommentCommand._createRemoveBlockCommentOperations(new A.Range(f,s+u.length+1,c,d+1),u,i):null}_executeBlockComment(C,r,u){C.tokenization.tokenizeIfCheap(u.startLineNumber);const i=C.getLanguageIdAtPosition(u.startLineNumber,1),f=this.languageConfigurationService.getLanguageConfiguration(i).comments;if(!f||!f.blockCommentStartToken||!f.blockCommentEndToken)return;const c=f.blockCommentStartToken,l=f.blockCommentEndToken;let s=this._attemptRemoveBlockComment(C,u,c,l);if(!s){if(u.isEmpty()){const d=C.getLineContent(u.startLineNumber);let n=t.firstNonWhitespaceIndex(d);n===-1&&(n=d.length),s=E.BlockCommentCommand._createAddBlockCommentOperations(new A.Range(u.startLineNumber,n+1,u.startLineNumber,d.length+1),c,l,this._insertSpace)}else s=E.BlockCommentCommand._createAddBlockCommentOperations(new A.Range(u.startLineNumber,C.getLineFirstNonWhitespaceColumn(u.startLineNumber),u.endLineNumber,C.getLineMaxColumn(u.endLineNumber)),c,l,this._insertSpace);s.length===1&&(this._deltaColumn=c.length+1)}this._selectionId=r.trackSelection(u);for(const d of s)r.addEditOperation(d.range,d.text)}getEditOperations(C,r){let u=this._selection;if(this._moveEndPositionDown=!1,u.startLineNumber===u.endLineNumber&&this._ignoreFirstLine){r.addEditOperation(new A.Range(u.startLineNumber,C.getLineMaxColumn(u.startLineNumber),u.startLineNumber+1,1),u.startLineNumber===C.getLineCount()?"":` `),this._selectionId=r.trackSelection(u);return}u.startLineNumber<u.endLineNumber&&u.endColumn===1&&(this._moveEndPositionDown=!0,u=u.setEndPosition(u.endLineNumber-1,C.getLineMaxColumn(u.endLineNumber-1)));const i=b._gatherPreflightData(this._type,this._insertSpace,C,u.startLineNumber,u.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine,this.languageConfigurationService);return i.supported?this._executeLineComments(C,r,i,u):this._executeBlockComment(C,r,u)}computeCursorState(C,r){let u=r.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(u=u.setEndPosition(u.endLineNumber+1,1)),new k.Selection(u.selectionStartLineNumber,u.selectionStartColumn+this._deltaColumn,u.positionLineNumber,u.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(C,r){const u=[];for(let i=0,f=C.length;i<f;i++){const c=C[i];c.ignore||u.push(p.EditOperation.delete(new A.Range(r+i,c.commentStrOffset+1,r+i,c.commentStrOffset+c.commentStrLength+1)))}return u}_createAddLineCommentsOperations(C,r){const u=[],i=this._insertSpace?" ":"";for(let f=0,c=C.length;f<c;f++){const l=C[f];l.ignore||u.push(p.EditOperation.insert(new R.Position(r+f,l.commentStrOffset+1),l.commentStr+i))}return u}static nextVisibleColumn(C,r,u,i){return u?C+(r-C%r):C+i}static _normalizeInsertionPoint(C,r,u,i){let f=1073741824,c,l;for(let s=0,d=r.length;s<d;s++){if(r[s].ignore)continue;const n=C.getLineContent(u+s);let a=0;for(let o=0,g=r[s].commentStrOffset;a<f&&o<g;o++)a=b.nextVisibleColumn(a,i,n.charCodeAt(o)===9,1);a<f&&(f=a)}f=Math.floor(f/i)*i;for(let s=0,d=r.length;s<d;s++){if(r[s].ignore)continue;const n=C.getLineContent(u+s);let a=0;for(c=0,l=r[s].commentStrOffset;a<f&&c<l;c++)a=b.nextVisibleColumn(a,i,n.charCodeAt(c)===9,1);a>f?r[s].commentStrOffset=c-1:r[s].commentStrOffset=c}}}e.LineCommentCommand=b}),define(ae[779],le([1,0,746]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseReplaceString=e.ReplacePiece=e.ReplacePattern=void 0;var p;(function(S){S[S.StaticValue=0]="StaticValue",S[S.DynamicPieces=1]="DynamicPieces"})(p||(p={}));class R{constructor(C){this.staticValue=C,this.kind=0}}class A{constructor(C){this.pieces=C,this.kind=1}}class k{static fromStaticValue(C){return new k([E.staticValue(C)])}get hasReplacementPatterns(){return this._state.kind===1}constructor(C){!C||C.length===0?this._state=new R(""):C.length===1&&C[0].staticValue!==null?this._state=new R(C[0].staticValue):this._state=new A(C)}buildReplaceString(C,r){if(this._state.kind===0)return r?(0,t.buildReplaceStringWithCasePreserved)(C,this._state.staticValue):this._state.staticValue;let u="";for(let i=0,f=this._state.pieces.length;i<f;i++){const c=this._state.pieces[i];if(c.staticValue!==null){u+=c.staticValue;continue}let l=k._substitute(c.matchIndex,C);if(c.caseOps!==null&&c.caseOps.length>0){const s=[],d=c.caseOps.length;let n=0;for(let a=0,o=l.length;a<o;a++){if(n>=d){s.push(l.slice(a));break}switch(c.caseOps[n]){case"U":s.push(l[a].toUpperCase());break;case"u":s.push(l[a].toUpperCase()),n++;break;case"L":s.push(l[a].toLowerCase());break;case"l":s.push(l[a].toLowerCase()),n++;break;default:s.push(l[a])}}l=s.join("")}u+=l}return u}static _substitute(C,r){if(r===null)return"";if(C===0)return r[0];let u="";for(;C>0;){if(C<r.length)return(r[C]||"")+u;u=String(C%10)+u,C=Math.floor(C/10)}return"$"+u}}e.ReplacePattern=k;class E{static staticValue(C){return new E(C,-1,null)}static matchIndex(C){return new E(null,C,null)}static caseOps(C,r){return new E(null,C,r)}constructor(C,r,u){this.staticValue=C,this.matchIndex=r,!u||u.length===0?this.caseOps=null:this.caseOps=u.slice(0)}}e.ReplacePiece=E;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,r){this._emitStatic(C),this._lastCharIndex=r}_emitStatic(C){C.length!==0&&(this._currentStaticPiece+=C)}emitMatchIndex(C,r,u){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=E.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=E.caseOps(C,u),this._lastCharIndex=r}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=E.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new k(this._result)}}function b(S){if(!S||S.length===0)return new k(null);const C=[],r=new I(S);for(let u=0,i=S.length;u<i;u++){const f=S.charCodeAt(u);if(f===92){if(u++,u>=i)break;const c=S.charCodeAt(u);switch(c){case 92:r.emitUnchanged(u-1),r.emitStatic("\\",u+1);break;case 110:r.emitUnchanged(u-1),r.emitStatic(` `,u+1);break;case 116:r.emitUnchanged(u-1),r.emitStatic(" ",u+1);break;case 117:case 85:case 108:case 76:r.emitUnchanged(u-1),r.emitStatic("",u+1),C.push(String.fromCharCode(c));break}continue}if(f===36){if(u++,u>=i)break;const c=S.charCodeAt(u);if(c===36){r.emitUnchanged(u-1),r.emitStatic("$",u+1);continue}if(c===48||c===38){r.emitUnchanged(u-1),r.emitMatchIndex(0,u+1,C),C.length=0;continue}if(49<=c&&c<=57){let l=c-48;if(u+1<i){const s=S.charCodeAt(u+1);if(48<=s&&s<=57){u++,l=l*10+(s-48),r.emitUnchanged(u-2),r.emitMatchIndex(l,u+1,C),C.length=0;continue}}r.emitUnchanged(u-1),r.emitMatchIndex(l,u+1,C),C.length=0;continue}}}return r.finalize()}e.parseReplaceString=b}),define(ae[1302],le([1,0,6,412,108]),function(J,e,t,p,R){"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 A{get regions(){return this._regions}get textModel(){return this._textModel}get decorationProvider(){return this._decorationProvider}constructor(s,d){this._updateEventEmitter=new t.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=s,this._decorationProvider=d,this._regions=new p.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(s){if(!s.length)return;s=s.sort((n,a)=>n.regionIndex-a.regionIndex);const d={};this._decorationProvider.changeDecorations(n=>{let a=0,o=-1,g=-1;const h=v=>{for(;a<v;){const m=this._regions.getEndLineNumber(a),w=this._regions.isCollapsed(a);if(m<=o){const D=this.regions.getSource(a)!==0;n.changeDecorationOptions(this._editorDecorationIds[a],this._decorationProvider.getDecorationOption(w,m<=g,D))}w&&m>g&&(g=m),a++}};for(const v of s){const m=v.regionIndex,w=this._editorDecorationIds[m];if(w&&!d[w]){d[w]=!0,h(m);const D=!this._regions.isCollapsed(m);this._regions.setCollapsed(m,D),o=Math.max(o,this._regions.getEndLineNumber(m))}}h(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:s})}removeManualRanges(s){const d=new Array,n=a=>{for(const o of s)if(!(o.startLineNumber>a.endLineNumber||a.startLineNumber>o.endLineNumber))return!0;return!1};for(let a=0;a<this._regions.length;a++){const o=this._regions.toFoldRange(a);(o.source===0||!n(o))&&d.push(o)}this.updatePost(p.FoldingRegions.fromFoldRanges(d))}update(s,d=[]){const n=this._currentFoldedOrManualRanges(d),a=p.FoldingRegions.sanitizeAndMerge(s,n,this._textModel.getLineCount());this.updatePost(p.FoldingRegions.fromFoldRanges(a))}updatePost(s){const d=[];let n=-1;for(let a=0,o=s.length;a<o;a++){const g=s.getStartLineNumber(a),h=s.getEndLineNumber(a),v=s.isCollapsed(a),m=s.getSource(a)!==0,w={startLineNumber:g,startColumn:this._textModel.getLineMaxColumn(g),endLineNumber:h,endColumn:this._textModel.getLineMaxColumn(h)+1};d.push({range:w,options:this._decorationProvider.getDecorationOption(v,h<=n,m)}),v&&h>n&&(n=h)}this._decorationProvider.changeDecorations(a=>this._editorDecorationIds=a.deltaDecorations(this._editorDecorationIds,d)),this._regions=s,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(s=[]){const d=(a,o)=>{for(const g of s)if(a<g&&g<=o)return!0;return!1},n=[];for(let a=0,o=this._regions.length;a<o;a++){let g=this.regions.isCollapsed(a);const h=this.regions.getSource(a);if(g||h!==0){const v=this._regions.toFoldRange(a),m=this._textModel.getDecorationRange(this._editorDecorationIds[a]);m&&(g&&(d(m.startLineNumber,m.endLineNumber)||m.endLineNumber-m.startLineNumber!==v.endLineNumber-v.startLineNumber)&&(g=!1),n.push({startLineNumber:m.startLineNumber,endLineNumber:m.endLineNumber,type:v.type,isCollapsed:g,source:h}))}}return n}getMemento(){const s=this._currentFoldedOrManualRanges(),d=[];for(let n=0,a=s.length;n<a;n++){const o=s[n],g=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);d.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,isCollapsed:o.isCollapsed,source:o.source,checksum:g})}return d.length>0?d:void 0}applyMemento(s){if(!Array.isArray(s))return;const d=[],n=this._textModel.getLineCount();for(const o of s){if(o.startLineNumber>=o.endLineNumber||o.startLineNumber<1||o.endLineNumber>=n)continue;const g=this._getLinesChecksum(o.startLineNumber+1,o.endLineNumber);(!o.checksum||g===o.checksum)&&d.push({startLineNumber:o.startLineNumber,endLineNumber:o.endLineNumber,type:void 0,isCollapsed:o.isCollapsed??!0,source:o.source??0})}const a=p.FoldingRegions.sanitizeAndMerge(this._regions,d,n);this.updatePost(p.FoldingRegions.fromFoldRanges(a))}_getLinesChecksum(s,d){return(0,R.hash)(this._textModel.getLineContent(s)+this._textModel.getLineContent(d))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(s,d){const n=[];if(this._regions){let a=this._regions.findRange(s),o=1;for(;a>=0;){const g=this._regions.toRegion(a);(!d||d(g,o))&&n.push(g),o++,a=g.parentIndex}}return n}getRegionAtLine(s){if(this._regions){const d=this._regions.findRange(s);if(d>=0)return this._regions.toRegion(d)}return null}getRegionsInside(s,d){const n=[],a=s?s.regionIndex+1:0,o=s?s.endLineNumber:Number.MAX_VALUE;if(d&&d.length===2){const g=[];for(let h=a,v=this._regions.length;h<v;h++){const m=this._regions.toRegion(h);if(this._regions.getStartLineNumber(h)<o){for(;g.length>0&&!m.containedBy(g[g.length-1]);)g.pop();g.push(m),d(m,g.length)&&n.push(m)}else break}}else for(let g=a,h=this._regions.length;g<h;g++){const v=this._regions.toRegion(g);if(this._regions.getStartLineNumber(g)<o)(!d||d(v))&&n.push(v);else break}return n}}e.FoldingModel=A;function k(l,s,d){const n=[];for(const a of d){const o=l.getRegionAtLine(a);if(o){const g=!o.isCollapsed;if(n.push(o),s>1){const h=l.getRegionsInside(o,(v,m)=>v.isCollapsed!==g&&m<s);n.push(...h)}}}l.toggleCollapseState(n)}e.toggleCollapseState=k;function E(l,s,d=Number.MAX_VALUE,n){const a=[];if(n&&n.length>0)for(const o of n){const g=l.getRegionAtLine(o);if(g&&(g.isCollapsed!==s&&a.push(g),d>1)){const h=l.getRegionsInside(g,(v,m)=>v.isCollapsed!==s&&m<d);a.push(...h)}}else{const o=l.getRegionsInside(null,(g,h)=>g.isCollapsed!==s&&h<d);a.push(...o)}l.toggleCollapseState(a)}e.setCollapseStateLevelsDown=E;function I(l,s,d,n){const a=[];for(const o of n){const g=l.getAllRegionsAtLine(o,(h,v)=>h.isCollapsed!==s&&v<=d);a.push(...g)}l.toggleCollapseState(a)}e.setCollapseStateLevelsUp=I;function b(l,s,d){const n=[];for(const a of d){const o=l.getAllRegionsAtLine(a,g=>g.isCollapsed!==s);o.length>0&&n.push(o[0])}l.toggleCollapseState(n)}e.setCollapseStateUp=b;function S(l,s,d,n){const a=(g,h)=>h===s&&g.isCollapsed!==d&&!n.some(v=>g.containsLine(v)),o=l.getRegionsInside(null,a);l.toggleCollapseState(o)}e.setCollapseStateAtLevel=S;function C(l,s,d){const n=[];for(const g of d){const h=l.getAllRegionsAtLine(g,void 0);h.length>0&&n.push(h[0])}const a=g=>n.every(h=>!h.containedBy(g)&&!g.containedBy(h))&&g.isCollapsed!==s,o=l.getRegionsInside(null,a);l.toggleCollapseState(o)}e.setCollapseStateForRest=C;function r(l,s,d){const n=l.textModel,a=l.regions,o=[];for(let g=a.length-1;g>=0;g--)if(d!==a.isCollapsed(g)){const h=a.getStartLineNumber(g);s.test(n.getLineContent(h))&&o.push(a.toRegion(g))}l.toggleCollapseState(o)}e.setCollapseStateForMatchingLines=r;function u(l,s,d){const n=l.regions,a=[];for(let o=n.length-1;o>=0;o--)d!==n.isCollapsed(o)&&s===n.getType(o)&&a.push(n.toRegion(o));l.toggleCollapseState(a)}e.setCollapseStateForType=u;function i(l,s){let d=null;const n=s.getRegionAtLine(l);if(n!==null&&(d=n.startLineNumber,l===d)){const a=n.parentIndex;a!==-1?d=s.regions.getStartLineNumber(a):d=null}return d}e.getParentFoldLine=i;function f(l,s){let d=s.getRegionAtLine(l);if(d!==null&&d.startLineNumber===l){if(l!==d.startLineNumber)return d.startLineNumber;{const n=d.parentIndex;let a=0;for(n!==-1&&(a=s.regions.getStartLineNumber(d.parentIndex));d!==null;)if(d.regionIndex>0){if(d=s.regions.toRegion(d.regionIndex-1),d.startLineNumber<=a)return null;if(d.parentIndex===n)return d.startLineNumber}else return null}}else if(s.regions.length>0)for(d=s.regions.toRegion(s.regions.length-1);d!==null;){if(d.startLineNumber<l)return d.startLineNumber;d.regionIndex>0?d=s.regions.toRegion(d.regionIndex-1):d=null}return null}e.getPreviousFoldLine=f;function c(l,s){let d=s.getRegionAtLine(l);if(d!==null&&d.startLineNumber===l){const n=d.parentIndex;let a=0;if(n!==-1)a=s.regions.getEndLineNumber(d.parentIndex);else{if(s.regions.length===0)return null;a=s.regions.getEndLineNumber(s.regions.length-1)}for(;d!==null;)if(d.regionIndex<s.regions.length){if(d=s.regions.toRegion(d.regionIndex+1),d.startLineNumber>=a)return null;if(d.parentIndex===n)return d.startLineNumber}else return null}else if(s.regions.length>0)for(d=s.regions.toRegion(0);d!==null;){if(d.startLineNumber>l)return d.startLineNumber;d.regionIndex<s.regions.length?d=s.regions.toRegion(d.regionIndex+1):d=null}return null}e.getNextFoldLine=c}),define(ae[1303],le([1,0,16,6,20,360]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HiddenRangeModel=void 0;class k{get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}constructor(S){this._updateEventEmitter=new p.Emitter,this._hasLineChanges=!1,this._foldingModel=S,this._foldingModelListener=S.onDidChange(C=>this.updateHiddenRanges()),this._hiddenRanges=[],S.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(S){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=S.changes.some(C=>C.range.endLineNumber!==C.range.startLineNumber||(0,A.countEOL)(C.text)[0]!==0))}updateHiddenRanges(){let S=!1;const C=[];let r=0,u=0,i=Number.MAX_VALUE,f=-1;const c=this._foldingModel.regions;for(;r<c.length;r++){if(!c.isCollapsed(r))continue;const l=c.getStartLineNumber(r)+1,s=c.getEndLineNumber(r);i<=l&&s<=f||(!S&&u<this._hiddenRanges.length&&this._hiddenRanges[u].startLineNumber===l&&this._hiddenRanges[u].endLineNumber===s?(C.push(this._hiddenRanges[u]),u++):(S=!0,C.push(new R.Range(l,1,s,1))),i=l,f=s)}(this._hasLineChanges||S||u<this._hiddenRanges.length)&&this.applyHiddenRanges(C)}applyHiddenRanges(S){this._hiddenRanges=S,this._hasLineChanges=!1,this._updateEventEmitter.fire(S)}hasRanges(){return this._hiddenRanges.length>0}isHidden(S){return I(this._hiddenRanges,S)!==null}adjustSelections(S){let C=!1;const r=this._foldingModel.textModel;let u=null;const i=f=>((!u||!E(f,u))&&(u=I(this._hiddenRanges,f)),u?u.startLineNumber-1:null);for(let f=0,c=S.length;f<c;f++){let l=S[f];const s=i(l.startLineNumber);s&&(l=l.setStartPosition(s,r.getLineMaxColumn(s)),C=!0);const d=i(l.endLineNumber);d&&(l=l.setEndPosition(d,r.getLineMaxColumn(d)),C=!0),S[f]=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 E(b,S){return b>=S.startLineNumber&&b<=S.endLineNumber}function I(b,S){const C=(0,t.findFirstInSorted)(b,r=>S<r.startLineNumber)-1;return C>=0&&b[C].endLineNumber>=S?b[C]:null}}),define(ae[495],le([1,0,6,2,14]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClickLinkGesture=e.ClickLinkOptions=e.ClickLinkKeyboardEvent=e.ClickLinkMouseEvent=void 0;function A(C,r){return!!C[r]}class k{constructor(r,u){this.target=r.target,this.isLeftClick=r.event.leftButton,this.isMiddleClick=r.event.middleButton,this.isRightClick=r.event.rightButton,this.hasTriggerModifier=A(r.event,u.triggerModifier),this.hasSideBySideModifier=A(r.event,u.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=r.event.detail<=1}}e.ClickLinkMouseEvent=k;class E{constructor(r,u){this.keyCodeIsTriggerKey=r.keyCode===u.triggerKey,this.keyCodeIsSideBySideKey=r.keyCode===u.triggerSideBySideKey,this.hasTriggerModifier=A(r,u.triggerModifier)}}e.ClickLinkKeyboardEvent=E;class I{constructor(r,u,i,f){this.triggerKey=r,this.triggerModifier=u,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=f}equals(r){return this.triggerKey===r.triggerKey&&this.triggerModifier===r.triggerModifier&&this.triggerSideBySideKey===r.triggerSideBySideKey&&this.triggerSideBySideModifier===r.triggerSideBySideModifier}}e.ClickLinkOptions=I;function b(C){return C==="altKey"?R.isMacintosh?new I(57,"metaKey",6,"altKey"):new I(5,"ctrlKey",6,"altKey"):R.isMacintosh?new I(6,"altKey",57,"metaKey"):new I(6,"altKey",5,"ctrlKey")}class S extends p.Disposable{constructor(r,u){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=r,this._alwaysFireExecuteOnMouseUp=u,this._opts=b(this._editor.getOption(71)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(i=>{if(i.hasChanged(71)){const f=b(this._editor.getOption(71));if(this._opts.equals(f))return;this._opts=f,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(i=>this._onEditorMouseMove(new k(i,this._opts)))),this._register(this._editor.onMouseDown(i=>this._onEditorMouseDown(new k(i,this._opts)))),this._register(this._editor.onMouseUp(i=>this._onEditorMouseUp(new k(i,this._opts)))),this._register(this._editor.onKeyDown(i=>this._onEditorKeyDown(new E(i,this._opts)))),this._register(this._editor.onKeyUp(i=>this._onEditorKeyUp(new E(i,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(i=>this._onDidChangeCursorSelection(i))),this._register(this._editor.onDidChangeModel(i=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(i=>{(i.scrollTopChanged||i.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(r){r.selection&&r.selection.startColumn!==r.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(r){this._lastMouseMoveEvent=r,this._onMouseMoveOrRelevantKeyDown.fire([r,null])}_onEditorMouseDown(r){this._hasTriggerKeyOnMouseDown=r.hasTriggerModifier,this._lineNumberOnMouseDown=r.target.position?r.target.position.lineNumber:0}_onEditorMouseUp(r){const u=r.target.position?r.target.position.lineNumber:0;(this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===u||this._alwaysFireExecuteOnMouseUp)&&this._onExecute.fire(r)}_onEditorKeyDown(r){this._lastMouseMoveEvent&&(r.keyCodeIsTriggerKey||r.keyCodeIsSideBySideKey&&r.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,r]):r.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(r){r.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=S}),define(ae[780],le([1,0,11,21,6,2]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=e.HoverStartSource=e.HoverStartMode=void 0;var k;(function(C){C[C.Idle=0]="Idle",C[C.FirstWait=1]="FirstWait",C[C.SecondWait=2]="SecondWait",C[C.WaitingForAsync=3]="WaitingForAsync",C[C.WaitingForAsyncShowingLoading=4]="WaitingForAsyncShowingLoading"})(k||(k={}));var E;(function(C){C[C.Delayed=0]="Delayed",C[C.Immediate=1]="Immediate"})(E=e.HoverStartMode||(e.HoverStartMode={}));var I;(function(C){C[C.Mouse=0]="Mouse",C[C.Keyboard=1]="Keyboard"})(I=e.HoverStartSource||(e.HoverStartSource={}));class b{constructor(r,u,i){this.value=r,this.isComplete=u,this.hasLoadingMessage=i}}e.HoverResult=b;class S extends A.Disposable{constructor(r,u){super(),this._editor=r,this._computer=u,this._onResult=this._register(new R.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(54).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(r,u=!0){this._state=r,u&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,t.createCancelableAsyncIterable)(r=>this._computer.computeAsync(r)),(async()=>{try{for await(const r of this._asyncIterable)r&&(this._result.push(r),this._fireResult());this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(r){(0,p.onUnexpectedError)(r)}})()):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 r=this._state===0,u=this._state===4;this._onResult.fire(new b(this._result.slice(0),r,u))}start(r){if(r===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=S}),define(ae[595],le([1,0,21,2,50,20,22,9]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class I{constructor(u,i){this.range=u,this.direction=i}}e.InlayHintAnchor=I;class b{constructor(u,i,f){this.hint=u,this.anchor=i,this.provider=f,this._isResolved=!1}with(u){const i=new b(this.hint,u.anchor,this.provider);return i._isResolved=this._isResolved,i._currentResolve=this._currentResolve,i}async resolve(u){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return await this._currentResolve,u.isCancellationRequested?void 0:this.resolve(u);this._isResolved||(this._currentResolve=this._doResolve(u).finally(()=>this._currentResolve=void 0)),await this._currentResolve}}async _doResolve(u){try{const i=await Promise.resolve(this.provider.resolveInlayHint(this.hint,u));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=b;class S{static async create(u,i,f,c){const l=[],s=u.ordered(i).reverse().map(d=>f.map(async n=>{try{const a=await d.provideInlayHints(i,n,c);a?.hints.length&&l.push([a,d])}catch(a){(0,t.onUnexpectedExternalError)(a)}}));if(await Promise.all(s.flat()),c.isCancellationRequested||i.isDisposed())throw new t.CancellationError;return new S(f,l,i)}constructor(u,i,f){this._disposables=new p.DisposableStore,this.ranges=u,this.provider=new Set;const c=[];for(const[l,s]of i){this._disposables.add(l),this.provider.add(s);for(const d of l.hints){const n=f.validatePosition(d.position);let a="before";const o=S._getRangeAtPosition(f,n);let g;o.getStartPosition().isBefore(n)?(g=A.Range.fromPositions(o.getStartPosition(),n),a="after"):(g=A.Range.fromPositions(n,o.getEndPosition()),a="before"),c.push(new b(d,new I(g,a),s))}}this.items=c.sort((l,s)=>R.Position.compare(l.hint.position,s.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(u,i){const f=i.lineNumber,c=u.getWordAtPosition(i);if(c)return new A.Range(f,c.startColumn,f,c.endColumn);u.tokenization.tokenizeIfCheap(f);const l=u.tokenization.getLineTokens(f),s=i.column-1,d=l.findTokenIndexAtOffset(s);let n=l.getStartOffset(d),a=l.getEndOffset(d);return a-n===1&&(n===s&&d>1?(n=l.getStartOffset(d-1),a=l.getEndOffset(d-1)):a===s&&d<l.getCount()-1&&(n=l.getStartOffset(d+1),a=l.getEndOffset(d+1))),new A.Range(f,n+1,f,a+1)}}e.InlayHintsFragments=S;function C(r){return E.URI.from({scheme:k.Schemas.command,path:r.id,query:r.arguments&&encodeURIComponent(JSON.stringify(r.arguments))}).toString()}e.asCommandLink=C}),define(ae[496],le([1,0,6,2,572]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseGhostTextWidgetModel=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class A{static equals(S,C){return S===C||!!S&&!!C&&S.equals(C)}constructor(S,C,r=0){this.lineNumber=S,this.parts=C,this.additionalReservedLineCount=r}equals(S){return this.lineNumber===S.lineNumber&&this.parts.length===S.parts.length&&this.parts.every((C,r)=>C.equals(S.parts[r]))}render(S,C=!1){const r=this.lineNumber;return(0,R.applyEdits)(S,[...this.parts.map(u=>({range:{startLineNumber:r,endLineNumber:r,startColumn:u.column,endColumn:u.column},text:C?`[${u.lines.join(` `)}]`:u.lines.join(` `)}))])}renderForScreenReader(S){if(this.parts.length===0)return"";const C=this.parts[this.parts.length-1],r=S.substr(0,C.column-1);return(0,R.applyEdits)(r,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(S=>S.lines.length===0)}}e.GhostText=A;class k{constructor(S,C,r){this.column=S,this.lines=C,this.preview=r}equals(S){return this.column===S.column&&this.lines.length===S.lines.length&&this.lines.every((C,r)=>C===S.lines[r])}}e.GhostTextPart=k;class E{constructor(S,C,r,u,i=0){this.lineNumber=S,this.columnStart=C,this.length=r,this.newLines=u,this.additionalReservedLineCount=i,this.parts=[new k(this.columnStart+this.length,this.newLines,!1)]}renderForScreenReader(S){return this.newLines.join(` `)}render(S,C=!1){const r=this.lineNumber,u=this.lineNumber;return C?(0,R.applyEdits)(S,[{range:{startLineNumber:r,endLineNumber:u,startColumn:this.columnStart,endColumn:this.columnStart},text:"("},{range:{startLineNumber:r,endLineNumber:u,startColumn:this.columnStart+this.length,endColumn:this.columnStart+this.length},text:`)[${this.newLines.join(` `)}]`}]):(0,R.applyEdits)(S,[{range:{startLineNumber:r,endLineNumber:u,startColumn:this.columnStart,endColumn:this.columnStart+this.length},text:this.newLines.join(` `)}])}}e.GhostTextReplacement=E;class I extends p.Disposable{get expanded(){return this._expanded===void 0?!0:this._expanded}constructor(S){super(),this.editor=S,this._expanded=void 0,this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this._register(S.onDidChangeConfiguration(C=>{C.hasChanged(108)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(S){this._expanded=!0,this.onDidChangeEmitter.fire()}}e.BaseGhostTextWidgetModel=I}),define(ae[596],le([1,0,414,28,20,496]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inlineCompletionToGhostText=e.normalizedInlineCompletionsEquals=e.minimizeInlineCompletion=void 0;function k(u,i){if(!i)return i;const f=u.getValueInRange(i.range),c=p.commonPrefixLength(f,i.insertText),l=u.getOffsetAt(i.range.getStartPosition())+c,s=u.getPositionAt(l),d=f.substr(c),n=p.commonSuffixLength(d,i.insertText),a=u.getPositionAt(Math.max(l,u.getOffsetAt(i.range.getEndPosition())-n));return{range:R.Range.fromPositions(s,a),insertText:i.insertText.substr(c,i.insertText.length-c-n),snippetInfo:i.snippetInfo,filterText:i.filterText,additionalTextEdits:i.additionalTextEdits}}e.minimizeInlineCompletion=k;function E(u,i){return u===i?!0:!u||!i?!1:u.range.equalsRange(i.range)&&u.insertText===i.insertText&&u.command===i.command}e.normalizedInlineCompletionsEquals=E;function I(u,i,f,c,l=0){if(u.range.startLineNumber!==u.range.endLineNumber)return;const s=i.getLineContent(u.range.startLineNumber),d=p.getLeadingWhitespace(s).length;if(u.range.startColumn-1<=d){const m=p.getLeadingWhitespace(u.insertText).length,w=s.substring(u.range.startColumn-1,d),D=R.Range.fromPositions(u.range.getStartPosition().delta(0,w.length),u.range.getEndPosition()),y=u.insertText.startsWith(w)?u.insertText.substring(w.length):u.insertText.substring(m);u={range:D,insertText:y,command:u.command,snippetInfo:void 0,filterText:u.filterText,additionalTextEdits:u.additionalTextEdits}}const a=i.getValueInRange(u.range),o=S(a,u.insertText);if(!o)return;const g=u.range.startLineNumber,h=new Array;if(f==="prefix"){const m=o.filter(w=>w.originalLength===0);if(m.length>1||m.length===1&&m[0].originalStart!==a.length)return}const v=u.insertText.length-l;for(const m of o){const w=u.range.startColumn+m.originalStart+m.originalLength;if(f==="subwordSmart"&&c&&c.lineNumber===u.range.startLineNumber&&w<c.column||m.originalLength>0)return;if(m.modifiedLength===0)continue;const D=m.modifiedStart+m.modifiedLength,y=Math.max(m.modifiedStart,Math.min(D,v)),T=u.insertText.substring(m.modifiedStart,y),_=u.insertText.substring(y,Math.max(m.modifiedStart,D));if(T.length>0){const L=p.splitLines(T);h.push(new A.GhostTextPart(w,L,!1))}if(_.length>0){const L=p.splitLines(_);h.push(new A.GhostTextPart(w,L,!0))}}return new A.GhostText(g,h,0)}e.inlineCompletionToGhostText=I;let b;function S(u,i){if(b?.originalValue===u&&b?.newValue===i)return b?.changes;{let f=r(u,i,!0);if(f){const c=C(f);if(c>0){const l=r(u,i,!1);l&&C(l)<c&&(f=l)}}return b={originalValue:u,newValue:i,changes:f},f}}function C(u){let i=0;for(const f of u)i+=Math.max(f.originalLength-f.modifiedLength,0);return i}function r(u,i,f){if(u.length>5e3||i.length>5e3)return;function c(o){let g=0;for(let h=0,v=o.length;h<v;h++){const m=o.charCodeAt(h);m>g&&(g=m)}return g}const l=Math.max(c(u),c(i));function s(o){if(o<0)throw new Error("unexpected");return l+o+1}function d(o){let g=0,h=0;const v=new Int32Array(o.length);for(let m=0,w=o.length;m<w;m++)if(f&&o[m]==="("){const D=h*100+g;v[m]=s(2*D),g++}else if(f&&o[m]===")"){g=Math.max(g-1,0);const D=h*100+g;v[m]=s(2*D+1),g===0&&h++}else v[m]=o.charCodeAt(m);return v}const n=d(u),a=d(i);return new t.LcsDiff({getElements:()=>n},{getElements:()=>a}).ComputeDiff(!1).changes}}),define(ae[1304],le([1,0,28,20]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class R{provideSelectionRanges(k,E){const I=[];for(const b of E){const S=[];I.push(S),this._addInWordRanges(S,k,b),this._addWordRanges(S,k,b),this._addWhitespaceLine(S,k,b),S.push({range:k.getFullModelRange()})}return I}_addInWordRanges(k,E,I){const b=E.getWordAtPosition(I);if(!b)return;const{word:S,startColumn:C}=b,r=I.column-C;let u=r,i=r,f=0;for(;u>=0;u--){const c=S.charCodeAt(u);if(u!==r&&(c===95||c===45))break;if((0,t.isLowerAsciiLetter)(c)&&(0,t.isUpperAsciiLetter)(f))break;f=c}for(u+=1;i<S.length;i++){const c=S.charCodeAt(i);if((0,t.isUpperAsciiLetter)(c)&&(0,t.isLowerAsciiLetter)(f))break;if(c===95||c===45)break;f=c}u<i&&k.push({range:new p.Range(I.lineNumber,C+u,I.lineNumber,C+i)})}_addWordRanges(k,E,I){const b=E.getWordAtPosition(I);b&&k.push({range:new p.Range(I.lineNumber,b.startColumn,I.lineNumber,b.endColumn)})}_addWhitespaceLine(k,E,I){E.getLineLength(I.lineNumber)>0&&E.getLineFirstNonWhitespaceColumn(I.lineNumber)===0&&E.getLineLastNonWhitespaceColumn(I.lineNumber)===0&&k.push({range:new p.Range(I.lineNumber,1,I.lineNumber,E.getLineMaxColumn(I.lineNumber))})}}e.WordSelectionRangeProvider=R}),define(ae[781],le([1,0,16,96,28]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class A{constructor(b,S){this.leadingLineContent=b,this.characterCountDelta=S}}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 E{constructor(b,S,C,r,u,i,f=p.FuzzyScoreOptions.default,c=void 0){this.clipboardText=c,this._snippetCompareFn=E._compareCompletionItems,this._items=b,this._column=S,this._wordDistance=r,this._options=u,this._refilterKind=1,this._lineContext=C,this._fuzzyScoreOptions=f,i==="top"?this._snippetCompareFn=E._compareCompletionItemsSnippetsUp:i==="bottom"&&(this._snippetCompareFn=E._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(b){(this._lineContext.leadingLineContent!==b.leadingLineContent||this._lineContext.characterCountDelta!==b.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<b.characterCountDelta&&this._filteredItems?2:1,this._lineContext=b)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const b=new Set;for(const[S,C]of this._providerInfo)C&&b.add(S);return b}adopt(b){const S=[];for(let C=0;C<this._items.length;)b.has(this._items[C].provider)?C++:(S.push(this._items[C]),this._items[C]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,S}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const b=[],{leadingLineContent:S,characterCountDelta:C}=this._lineContext;let r="",u="";const i=this._refilterKind===1?this._items:this._filteredItems,f=[],c=!this._options.filterGraceful||i.length>2e3?p.fuzzyScore:p.fuzzyScoreGracefulAggressive;for(let l=0;l<i.length;l++){const s=i[l];if(s.isInvalid)continue;this._providerInfo.set(s.provider,Boolean(s.container.incomplete));const d=s.position.column-s.editStart.column,n=d+C-(s.position.column-this._column);if(r.length!==n&&(r=n===0?"":S.slice(-n),u=r.toLowerCase()),s.word=r,n===0)s.score=p.FuzzyScore.Default;else{let a=0;for(;a<d;){const o=r.charCodeAt(a);if(o===32||o===9)a+=1;else break}if(a>=n)s.score=p.FuzzyScore.Default;else if(typeof s.completion.filterText=="string"){const o=c(r,u,a,s.completion.filterText,s.filterTextLow,0,this._fuzzyScoreOptions);if(!o)continue;(0,R.compareIgnoreCase)(s.completion.filterText,s.textLabel)===0?s.score=o:(s.score=(0,p.anyScore)(r,u,a,s.textLabel,s.labelLow,0),s.score[0]=o[0])}else{const o=c(r,u,a,s.textLabel,s.labelLow,0,this._fuzzyScoreOptions);if(!o)continue;s.score=o}}s.idx=l,s.distance=this._wordDistance.distance(s.position,s.completion),f.push(s),b.push(s.textLabel.length)}this._filteredItems=f.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:b.length?(0,t.quickSelect)(b.length-.85,b,(l,s)=>l-s):0}}static _compareCompletionItems(b,S){return b.score[0]>S.score[0]?-1:b.score[0]<S.score[0]?1:b.distance<S.distance?-1:b.distance>S.distance?1:b.idx<S.idx?-1:b.idx>S.idx?1:0}static _compareCompletionItemsSnippetsDown(b,S){if(b.completion.kind!==S.completion.kind){if(b.completion.kind===27)return 1;if(S.completion.kind===27)return-1}return E._compareCompletionItems(b,S)}static _compareCompletionItemsSnippetsUp(b,S){if(b.completion.kind!==S.completion.kind){if(b.completion.kind===27)return-1;if(S.completion.kind===27)return 1}return E._compareCompletionItems(b,S)}}e.CompletionModel=E}),define(ae[1305],le([3,4]),function(J,e){return J.create("vs/base/parts/quickinput/browser/quickInput",e)}),define(ae[1306],le([3,4]),function(J,e){return J.create("vs/base/parts/quickinput/browser/quickInputList",e)}),define(ae[1307],le([1,0,10,90,79,239,368,36,16,29,304,112,6,210,2,14,28,13,761,1306,481]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesContiguousIconAware=e.QuickInputList=e.QuickInputListFocus=void 0;const n=t.$;class a{get checked(){return!!this._checked}set checked(_){_!==this._checked&&(this._checked=_,this._onChecked.fire(_))}constructor(_){this.hidden=!1,this._onChecked=new r.Emitter,this.onChecked=this._onChecked.event,Object.assign(this,_)}dispose(){this._onChecked.dispose()}}class o{get templateId(){return o.ID}renderTemplate(_){const L=Object.create(null);L.toDisposeElement=[],L.toDisposeTemplate=[],L.entry=t.append(_,n(".quick-input-list-entry"));const M=t.append(L.entry,n("label.quick-input-list-label"));L.toDisposeTemplate.push(t.addStandardDisposableListener(M,t.EventType.CLICK,z=>{L.checkbox.offsetParent||z.preventDefault()})),L.checkbox=t.append(M,n("input.quick-input-list-checkbox")),L.checkbox.type="checkbox",L.toDisposeTemplate.push(t.addStandardDisposableListener(L.checkbox,t.EventType.CHANGE,z=>{L.element.checked=L.checkbox.checked}));const O=t.append(M,n(".quick-input-list-rows")),N=t.append(O,n(".quick-input-list-row")),P=t.append(O,n(".quick-input-list-row"));L.label=new A.IconLabel(N,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const B=t.append(N,n(".quick-input-list-entry-keybinding"));L.keybinding=new k.KeybindingLabel(B,f.OS);const V=t.append(P,n(".quick-input-list-label-meta"));return L.detail=new A.IconLabel(V,{supportHighlights:!0,supportIcons:!0}),L.separator=t.append(L.entry,n(".quick-input-list-separator")),L.actionBar=new R.ActionBar(L.entry),L.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),L.toDisposeTemplate.push(L.actionBar),L}renderElement(_,L,M){M.element=_;const O=_.item?_.item:_.separator;M.checkbox.checked=_.checked,M.toDisposeElement.push(_.onChecked(x=>M.checkbox.checked=x));const{labelHighlights:N,descriptionHighlights:P,detailHighlights:B}=_,V=Object.create(null);V.matches=N||[],V.descriptionTitle=_.saneDescription,V.descriptionMatches=P||[],O.type!=="separator"?(V.extraClasses=O.iconClasses,V.italic=O.italic,V.strikethrough=O.strikethrough,M.entry.classList.remove("quick-input-list-separator-as-item")):M.entry.classList.add("quick-input-list-separator-as-item"),M.label.setLabel(_.saneLabel,_.saneDescription,V),M.keybinding.set(O.type==="separator"?void 0:O.keybinding),_.saneDetail&&M.detail.setLabel(_.saneDetail,void 0,{matches:B,title:_.saneDetail}),_.item&&_.separator&&_.separator.label?(M.separator.textContent=_.separator.label,M.separator.style.display=""):M.separator.style.display="none",M.entry.classList.toggle("quick-input-list-separator-border",!!_.separator);const z=O.buttons;z&&z.length?(M.actionBar.push(z.map((x,H)=>{let W=x.iconClass||(x.iconPath?(0,s.getIconClass)(x.iconPath):void 0);x.alwaysVisible&&(W=W?`${W} always-visible`:"always-visible");const U=new E.Action(`id-${H}`,"",W,!0,async()=>{O.type!=="separator"?_.fireButtonTriggered({button:x,item:O}):_.fireSeparatorButtonTriggered({button:x,separator:O})});return U.tooltip=x.tooltip||"",U}),{icon:!0,label:!1}),M.entry.classList.add("has-actions")):M.entry.classList.remove("has-actions")}disposeElement(_,L,M){M.toDisposeElement=(0,i.dispose)(M.toDisposeElement),M.actionBar.clear()}disposeTemplate(_){_.toDisposeElement=(0,i.dispose)(_.toDisposeElement),_.toDisposeTemplate=(0,i.dispose)(_.toDisposeTemplate)}}o.ID="listelement";class g{getHeight(_){return _.item?_.saneDetail?44:22:24}getTemplateId(_){return o.ID}}var h;(function(T){T[T.First=1]="First",T[T.Second=2]="Second",T[T.Last=3]="Last",T[T.Next=4]="Next",T[T.Previous=5]="Previous",T[T.NextPage=6]="NextPage",T[T.PreviousPage=7]="PreviousPage"})(h=e.QuickInputListFocus||(e.QuickInputListFocus={}));class v{constructor(_,L,M){this.parent=_,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new r.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new r.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new r.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new r.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new r.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new r.Emitter,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new r.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new r.Emitter,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=L,this.container=t.append(this.parent,n(".quick-input-list"));const O=new g,N=new y;this.list=M.createList("QuickInput",this.container,O,[new o],{identityProvider:{getId:P=>P.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:N}),this.list.getHTMLElement().id=L,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(P=>{const B=new p.StandardKeyboardEvent(P);switch(B.keyCode){case 10:this.toggleCheckbox();break;case 31:(f.isMacintosh?P.metaKey:P.ctrlKey)&&this.list.setFocus((0,I.range)(this.list.length));break;case 16:{const V=this.list.getFocus();V.length===1&&V[0]===0&&this._onLeave.fire();break}case 18:{const V=this.list.getFocus();V.length===1&&V[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(B)})),this.disposables.push(this.list.onMouseDown(P=>{P.browserEvent.button!==2&&P.browserEvent.preventDefault()})),this.disposables.push(t.addDisposableListener(this.container,t.EventType.CLICK,P=>{(P.x||P.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(P=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(P=>{typeof P.index=="number"&&(P.browserEvent.preventDefault(),this.list.setSelection([P.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return r.Event.map(this.list.onDidChangeFocus,_=>_.elements.map(L=>L.item))}get onDidChangeSelection(){return r.Event.map(this.list.onDidChangeSelection,_=>({items:_.elements.map(L=>L.item),event:_.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(_){this.list.scrollTop=_}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(_,L=!0){for(let M=0,O=_.length;M<O;M++){const N=_[M];if(!N.hidden)if(N.checked)L=!0;else return!1}return L}getCheckedCount(){let _=0;const L=this.elements;for(let M=0,O=L.length;M<O;M++)L[M].checked&&_++;return _}getVisibleCount(){let _=0;const L=this.elements;for(let M=0,O=L.length;M<O;M++)L[M].hidden||_++;return _}setAllVisibleChecked(_){try{this._fireCheckedEvents=!1,this.elements.forEach(L=>{L.hidden||(L.checked=_)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(_){this.elementDisposables=(0,i.dispose)(this.elementDisposables);const L=O=>this.fireButtonTriggered(O),M=O=>this.fireSeparatorButtonTriggered(O);this.inputElements=_,this.elements=_.reduce((O,N,P)=>{const B=P&&_[P-1],V=N.label?N.label.replace(/\r?\n/g," "):"",z=(0,u.parseLabelWithIcons)(V).text.trim();let x,H,W,U,$,q;N.type!=="separator"&&(x=N.meta&&N.meta.replace(/\r?\n/g," "),H=N.description&&N.description.replace(/\r?\n/g," "),W=N.detail&&N.detail.replace(/\r?\n/g," "),U=N.highlights?.label,$=N.highlights?.description,q=N.highlights?.detail);const X=N.ariaLabel||[V,H,W].map(j=>(0,b.getCodiconAriaLabel)(j)).filter(j=>!!j).join(", "),G=this.parent.classList.contains("show-checkboxes");let Q;if(N.type==="separator"){if(!N.buttons)return O;Q=N}else B&&B.type==="separator"&&!B.buttons&&(Q=B);return O.push(new a({hasCheckbox:G,index:P,item:N.type!=="separator"?N:void 0,saneLabel:V,saneSortLabel:z,saneMeta:x,saneAriaLabel:X,saneDescription:H,saneDetail:W,labelHighlights:U,descriptionHighlights:$,detailHighlights:q,checked:!1,separator:Q,fireButtonTriggered:L,fireSeparatorButtonTriggered:M})),O},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(O=>O.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((O,N,P)=>(O.set(N.item??N.separator,P),O),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(_=>_.item)}setFocusedElements(_){if(this.list.setFocus(_.filter(L=>this.elementsToIndexes.has(L)).map(L=>this.elementsToIndexes.get(L))),_.length>0){const L=this.list.getFocus()[0];typeof L=="number"&&this.list.reveal(L)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}getSelectedElements(){return this.list.getSelectedElements().map(_=>_.item)}setSelectedElements(_){this.list.setSelection(_.filter(L=>this.elementsToIndexes.has(L)).map(L=>this.elementsToIndexes.get(L)))}getCheckedElements(){return this.elements.filter(_=>_.checked).map(_=>_.item).filter(_=>!!_)}setCheckedElements(_){try{this._fireCheckedEvents=!1;const L=new Set;for(const M of _)L.add(M);for(const M of this.elements)M.checked=L.has(M.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(_){this.list.getHTMLElement().style.pointerEvents=_?"":"none"}focus(_){if(!this.list.length)return;switch(_===h.Second&&this.list.length<2&&(_=h.First),_){case h.First:this.list.scrollTop=0,this.list.focusFirst(void 0,M=>!!M.item);break;case h.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,M=>!!M.item);break;case h.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,M=>!!M.item);break;case h.Next:{this.list.focusNext(void 0,!0,void 0,O=>!!O.item);const M=this.list.getFocus()[0];M!==0&&!this.elements[M-1].item&&this.list.firstVisibleIndex>M-1&&this.list.reveal(M-1);break}case h.Previous:{this.list.focusPrevious(void 0,!0,void 0,O=>!!O.item);const M=this.list.getFocus()[0];M!==0&&!this.elements[M-1].item&&this.list.firstVisibleIndex>M-1&&this.list.reveal(M-1);break}case h.NextPage:this.list.focusNextPage(void 0,M=>!!M.item);break;case h.PreviousPage:this.list.focusPreviousPage(void 0,M=>!!M.item);break}const L=this.list.getFocus()[0];typeof L=="number"&&this.list.reveal(L)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(_){this.list.getHTMLElement().style.maxHeight=_?`calc(${Math.floor(_/44)*44}px)`:"",this.list.layout()}filter(_){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const L=_;if(_=_.trim(),!_||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(O=>{O.labelHighlights=void 0,O.descriptionHighlights=void 0,O.detailHighlights=void 0,O.hidden=!1;const N=O.index&&this.inputElements[O.index-1];O.item&&(O.separator=N&&N.type==="separator"&&!N.buttons?N:void 0)});else{let O;this.elements.forEach(N=>{let P;this.matchOnLabelMode==="fuzzy"?P=this.matchOnLabel?(0,l.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(_,(0,u.parseLabelWithIcons)(N.saneLabel))):void 0:P=this.matchOnLabel?(0,l.withNullAsUndefined)(m(L,(0,u.parseLabelWithIcons)(N.saneLabel))):void 0;const B=this.matchOnDescription?(0,l.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(_,(0,u.parseLabelWithIcons)(N.saneDescription||""))):void 0,V=this.matchOnDetail?(0,l.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(_,(0,u.parseLabelWithIcons)(N.saneDetail||""))):void 0,z=this.matchOnMeta?(0,l.withNullAsUndefined)((0,u.matchesFuzzyIconAware)(_,(0,u.parseLabelWithIcons)(N.saneMeta||""))):void 0;if(P||B||V||z?(N.labelHighlights=P,N.descriptionHighlights=B,N.detailHighlights=V,N.hidden=!1):(N.labelHighlights=void 0,N.descriptionHighlights=void 0,N.detailHighlights=void 0,N.hidden=N.item?!N.item.alwaysShow:!0),!this.sortByLabel){const x=N.index&&this.inputElements[N.index-1];O=x&&x.type==="separator"?x:O,O&&!N.hidden&&(N.separator=O,O=void 0)}})}const M=this.elements.filter(O=>!O.hidden);if(this.sortByLabel&&_){const O=_.toLowerCase();M.sort((N,P)=>D(N,P,O))}return this.elementsToIndexes=M.reduce((O,N,P)=>(O.set(N.item??N.separator,P),O),new Map),this.list.splice(0,this.list.length,M),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(M.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const _=this.list.getFocusedElements(),L=this.allVisibleChecked(_);for(const M of _)M.checked=!L}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(_){this.container.style.display=_?"":"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(_){this._onButtonTriggered.fire(_)}fireSeparatorButtonTriggered(_){this._onSeparatorButtonTriggered.fire(_)}style(_){this.list.style(_)}}we([C.memoize],v.prototype,"onDidChangeFocus",null),we([C.memoize],v.prototype,"onDidChangeSelection",null),e.QuickInputList=v;function m(T,_){const{text:L,iconOffsets:M}=_;if(!M||M.length===0)return w(T,L);const O=(0,c.ltrim)(L," "),N=L.length-O.length,P=w(T,O);if(P)for(const B of P){const V=M[B.start+N]+N;B.start+=V,B.end+=V}return P}e.matchesContiguousIconAware=m;function w(T,_){const L=_.toLowerCase().indexOf(T.toLowerCase());return L!==-1?[{start:L,end:L+T.length}]:null}function D(T,_,L){const M=T.labelHighlights||[],O=_.labelHighlights||[];return M.length&&!O.length?-1:!M.length&&O.length?1:M.length===0&&O.length===0?0:(0,S.compareAnything)(T.saneSortLabel,_.saneSortLabel,L)}class y{getWidgetAriaLabel(){return(0,d.localize)(0,null)}getAriaLabel(_){return _.separator?.label?`${_.saneAriaLabel}, ${_.separator.label}`:_.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(_){return _.hasCheckbox?"checkbox":"option"}isChecked(_){if(!!_.hasCheckbox)return{value:_.checked,onDidChange:_.onChecked}}}}),define(ae[1308],le([1,0,10,90,79,182,277,143,303,197,36,16,11,32,29,6,2,14,68,13,761,762,1305,1271,1307,481]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const v=t.$,m={iconClass:i.Codicon.quickInputBack.classNames,tooltip:(0,o.localize)(0,null),handle:-1};class w extends c.Disposable{constructor(L){super(),this.ui=L,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=w.noPromptMessage,this._severity=s.default.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new f.Emitter),this.onDidHideEmitter=this._register(new f.Emitter),this.onDisposeEmitter=this._register(new f.Emitter),this.visibleDisposables=this._register(new c.DisposableStore),this.onDidTriggerButton=this.onDidTriggerButtonEmitter.event,this.onDidHide=this.onDidHideEmitter.event,this.onDispose=this.onDisposeEmitter.event}get title(){return this._title}set title(L){this._title=L,this.update()}get description(){return this._description}set description(L){this._description=L,this.update()}get step(){return this._steps}set step(L){this._steps=L,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(L){this._totalSteps=L,this.update()}get enabled(){return this._enabled}set enabled(L){this._enabled=L,this.update()}get contextKey(){return this._contextKey}set contextKey(L){this._contextKey=L,this.update()}get busy(){return this._busy}set busy(L){this._busy=L,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(L){const M=this._ignoreFocusOut!==L&&!l.isIOS;this._ignoreFocusOut=L&&!l.isIOS,M&&this.update()}get buttons(){return this._buttons}set buttons(L){this._buttons=L,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(L){this._validationMessage=L,this.update()}get severity(){return this._severity}set severity(L){this._severity=L,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(L=>{this.buttons.indexOf(L)!==-1&&this.onDidTriggerButtonEmitter.fire(L)})),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(L=a.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:L})}update(){if(!this.visible)return;const L=this.getTitle();L&&this.ui.title.textContent!==L?this.ui.title.textContent=L:!L&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const M=this.getDescription();if(this.ui.description1.textContent!==M&&(this.ui.description1.textContent=M),this.ui.description2.textContent!==M&&(this.ui.description2.textContent=M),this.busy&&!this.busyDelay&&(this.busyDelay=new r.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 N=this.buttons.filter(B=>B===m);this.ui.leftActionBar.push(N.map((B,V)=>{const z=new S.Action(`id-${V}`,"",B.iconClass||(0,n.getIconClass)(B.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(B)});return z.tooltip=B.tooltip||"",z}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const P=this.buttons.filter(B=>B!==m);this.ui.rightActionBar.push(P.map((B,V)=>{const z=new S.Action(`id-${V}`,"",B.iconClass||(0,n.getIconClass)(B.iconPath),!0,async()=>{this.onDidTriggerButtonEmitter.fire(B)});return z.tooltip=B.tooltip||"",z}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const O=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==O&&(this._lastValidationMessage=O,t.reset(this.ui.message,...(0,E.renderLabelWithIcons)(O))),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,o.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(L){if(this.ui.inputBox.showDecoration(L),L!==s.default.Ignore){const M=this.ui.inputBox.stylesForType(L);this.ui.message.style.color=M.foreground?`${M.foreground}`:"",this.ui.message.style.backgroundColor=M.background?`${M.background}`:"",this.ui.message.style.border=M.border?`1px solid ${M.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()}}w.noPromptMessage=(0,o.localize)(1,null);class D extends w{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new f.Emitter),this.onWillAcceptEmitter=this._register(new f.Emitter),this.onDidAcceptEmitter=this._register(new f.Emitter),this.onDidCustomEmitter=this._register(new f.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?a.ItemActivation.NONE:a.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new f.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new f.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new f.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new f.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=L=>L,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,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(L){this._quickNavigate=L,this.update()}get value(){return this._value}set value(L){this.doSetValue(L)}doSetValue(L,M){this._value!==L&&(this._value=L,M||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(L){this._ariaLabel=L,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(L){this._placeholder=L,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(L){this.ui.list.scrollTop=L}set items(L){this._items=L,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(L){this._canSelectMany=L,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(L){this._canAcceptInBackground=L}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(L){this._matchOnDescription=L,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(L){this._matchOnDetail=L,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(L){this._matchOnLabel=L,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(L){this._matchOnLabelMode=L,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(L){this._sortByLabel=L,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(L){this._autoFocusOnList=L,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(L){this._keepScrollPosition=L}get itemActivation(){return this._itemActivation}set itemActivation(L){this._itemActivation=L}get activeItems(){return this._activeItems}set activeItems(L){this._activeItems=L,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(L){this._selectedItems=L,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?a.NO_KEY_MODS:this.ui.keyMods}set valueSelection(L){this._valueSelection=L,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(L){this._customButton=L,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(L){this._customButtonLabel=L,this.update()}get customHover(){return this._customButtonHover}set customHover(L){this._customButtonHover=L,this.update()}get ok(){return this._ok}set ok(L){this._ok=L,this.update()}inputHasFocus(){return this.visible?this.ui.inputBox.hasFocus():!1}focusOnInput(){this.ui.inputBox.setFocus()}get hideInput(){return!!this._hideInput}set hideInput(L){this._hideInput=L,this.update()}get hideCheckAll(){return!!this._hideCheckAll}set hideCheckAll(L){this._hideCheckAll=L,this.update()}set toggles(L){const M=L?.filter(O=>O instanceof b.Toggle);this.ui.inputBox.toggles=M}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(h.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(L=>{this.doSetValue(L,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(L=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(L=>{switch(L.keyCode){case 18:this.ui.list.focus(h.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(L,!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(L,!0);break;case 12:this.ui.list.focus(h.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(L,!0);break;case 11:this.ui.list.focus(h.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),t.EventHelper.stop(L,!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:(L.ctrlKey||L.metaKey)&&!L.shiftKey&&!L.altKey&&(this.ui.list.focus(h.QuickInputListFocus.First),t.EventHelper.stop(L,!0));break;case 13:(L.ctrlKey||L.metaKey)&&!L.shiftKey&&!L.altKey&&(this.ui.list.focus(h.QuickInputListFocus.Last),t.EventHelper.stop(L,!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(L=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,C.equals)(L,this._activeItems,(M,O)=>M===O)||(this._activeItems=L,this.onDidChangeActiveEmitter.fire(L))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:L,event:M})=>{if(this.canSelectMany){L.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,C.equals)(L,this._selectedItems,(O,N)=>O===N)||(this._selectedItems=L,this.onDidChangeSelectionEmitter.fire(L),L.length&&this.handleAccept(M instanceof MouseEvent&&M.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(L=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&(0,C.equals)(L,this._selectedItems,(M,O)=>M===O)||(this._selectedItems=L,this.onDidChangeSelectionEmitter.fire(L))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(L=>this.onDidTriggerItemButtonEmitter.fire(L))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(L=>this.onDidTriggerSeparatorButtonEmitter.fire(L))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(L){let M=!1;this.onWillAcceptEmitter.fire({veto:()=>M=!0}),M||this.onDidAcceptEmitter.fire({inBackground:L})}registerQuickNavigation(){return t.addDisposableListener(this.ui.container,t.EventType.KEY_UP,L=>{if(this.canSelectMany||!this._quickNavigate)return;const M=new p.StandardKeyboardEvent(L),O=M.keyCode;this._quickNavigate.keybindings.some(B=>{const[V,z]=B.getParts();return z?!1:V.shiftKey&&O===4?!(M.ctrlKey||M.altKey||M.metaKey):!!(V.altKey&&O===6||V.ctrlKey&&O===5||V.metaKey&&O===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 L=this.keepScrollPosition?this.scrollTop:0,M=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",M&&!this.description);const O={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!M,progressBar:!M,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(O),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||"");let N=this.ariaLabel;if(N||(N=this.placeholder||D.DEFAULT_ARIA_LABEL,this.title&&(N+=` - ${this.title}`)),this.ui.inputBox.ariaLabel!==N&&(this.ui.inputBox.ariaLabel=N),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,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 a.ItemActivation.NONE:this._itemActivation=a.ItemActivation.FIRST;break;case a.ItemActivation.SECOND:this.ui.list.focus(h.QuickInputListFocus.Second),this._itemActivation=a.ItemActivation.FIRST;break;case a.ItemActivation.LAST:this.ui.list.focus(h.QuickInputListFocus.Last),this._itemActivation=a.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),O.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(h.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=L)}}D.DEFAULT_ARIA_LABEL=(0,o.localize)(3,null);class y extends w{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new f.Emitter),this.onDidAcceptEmitter=this._register(new f.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(L){this._value=L||"",this.update()}set valueSelection(L){this._valueSelection=L,this.valueSelectionUpdated=!0,this.update()}get placeholder(){return this._placeholder}set placeholder(L){this._placeholder=L,this.update()}get password(){return this._password}set password(L){this._password=L,this.update()}get prompt(){return this._prompt}set prompt(L){this._prompt=L,this.noValidationMessage=L?(0,o.localize)(4,null,L):w.noPromptMessage,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(L=>{L!==this.value&&(this._value=L,this.onDidValueChangeEmitter.fire(L))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const L={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0};this.ui.setVisibilities(L),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 T extends c.Disposable{constructor(L){super(),this.options=L,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new f.Emitter),this.onDidCustomEmitter=this._register(new f.Emitter),this.onDidTriggerButtonEmitter=this._register(new f.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new f.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new f.Emitter),this.onHide=this.onHideEmitter.event,this.backButton=m,this.idPrefix=L.idPrefix,this.parentElement=L.container,this.styles=L.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const L=M=>{this.keyMods.ctrlCmd=M.ctrlKey||M.metaKey,this.keyMods.alt=M.altKey};this._register(t.addDisposableListener(window,t.EventType.KEY_DOWN,L,!0)),this._register(t.addDisposableListener(window,t.EventType.KEY_UP,L,!0)),this._register(t.addDisposableListener(window,t.EventType.MOUSE_DOWN,L,!0))}getUI(){if(this.ui)return this.ui;const L=t.append(this.parentElement,v(".quick-input-widget.show-file-icons"));L.tabIndex=-1,L.style.display="none";const M=t.createStyleSheet(L),O=t.append(L,v(".quick-input-titlebar")),N=this._register(new R.ActionBar(O));N.domNode.classList.add("quick-input-left-action-bar");const P=t.append(O,v(".quick-input-title")),B=this._register(new R.ActionBar(O));B.domNode.classList.add("quick-input-right-action-bar");const V=t.append(L,v(".quick-input-description")),z=t.append(L,v(".quick-input-header")),x=t.append(z,v("input.quick-input-check-all"));x.type="checkbox",x.setAttribute("aria-label",(0,o.localize)(5,null)),this._register(t.addStandardDisposableListener(x,t.EventType.CHANGE,te=>{const Z=x.checked;re.setAllVisibleChecked(Z)})),this._register(t.addDisposableListener(x,t.EventType.CLICK,te=>{(te.x||te.y)&&$.setFocus()}));const H=t.append(z,v(".quick-input-description")),W=t.append(z,v(".quick-input-and-message")),U=t.append(W,v(".quick-input-filter")),$=this._register(new g.QuickInputBox(U));$.setAttribute("aria-describedby",`${this.idPrefix}message`);const q=t.append(U,v(".quick-input-visible-count"));q.setAttribute("aria-live","polite"),q.setAttribute("aria-atomic","true");const X=new k.CountBadge(q,{countFormat:(0,o.localize)(6,null)}),G=t.append(U,v(".quick-input-count"));G.setAttribute("aria-live","polite");const Q=new k.CountBadge(G,{countFormat:(0,o.localize)(7,null)}),j=t.append(z,v(".quick-input-action")),K=new A.Button(j);K.label=(0,o.localize)(8,null),this._register(K.onDidClick(te=>{this.onDidAcceptEmitter.fire()}));const Y=t.append(z,v(".quick-input-action")),ee=new A.Button(Y);ee.label=(0,o.localize)(9,null),this._register(ee.onDidClick(te=>{this.onDidCustomEmitter.fire()}));const ie=t.append(W,v(`#${this.idPrefix}message.quick-input-message`)),re=this._register(new h.QuickInputList(L,this.idPrefix+"list",this.options));this._register(re.onChangedAllVisibleChecked(te=>{x.checked=te})),this._register(re.onChangedVisibleCount(te=>{X.setCount(te)})),this._register(re.onChangedCheckedCount(te=>{Q.setCount(te)})),this._register(re.onLeave(()=>{setTimeout(()=>{$.setFocus(),this.controller instanceof D&&this.controller.canSelectMany&&re.clearFocus()},0)})),this._register(re.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const oe=new I.ProgressBar(L);oe.getContainer().classList.add("quick-input-progress");const se=t.trackFocus(L);return this._register(se),this._register(t.addDisposableListener(L,t.EventType.FOCUS,te=>{this.previousFocusElement=te.relatedTarget instanceof HTMLElement?te.relatedTarget:void 0},!0)),this._register(se.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(a.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(t.addDisposableListener(L,t.EventType.FOCUS,te=>{$.setFocus()})),this._register(t.addDisposableListener(L,t.EventType.KEY_DOWN,te=>{const Z=new p.StandardKeyboardEvent(te);switch(Z.keyCode){case 3:t.EventHelper.stop(te,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:t.EventHelper.stop(te,!0),this.hide(a.QuickInputHideReason.Gesture);break;case 2:if(!Z.altKey&&!Z.ctrlKey&&!Z.metaKey){const ne=[".action-label.codicon"];L.classList.contains("show-checkboxes")?ne.push("input"):ne.push("input[type=text]"),this.getUI().list.isDisplayed()&&ne.push(".monaco-list");const ce=L.querySelectorAll(ne.join(", "));Z.shiftKey&&Z.target===ce[0]?(t.EventHelper.stop(te,!0),ce[ce.length-1].focus()):!Z.shiftKey&&Z.target===ce[ce.length-1]&&(t.EventHelper.stop(te,!0),ce[0].focus())}break}})),this.ui={container:L,styleSheet:M,leftActionBar:N,titleBar:O,title:P,description1:V,description2:H,rightActionBar:B,checkAll:x,filterContainer:U,inputBox:$,visibleCountContainer:q,visibleCount:X,countContainer:G,count:Q,okContainer:j,ok:K,message:ie,customButtonContainer:Y,customButton:ee,list:re,progressBar:oe,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:te=>this.show(te),hide:()=>this.hide(),setVisibilities:te=>this.setVisibilities(te),setComboboxAccessibility:te=>this.setComboboxAccessibility(te),setEnabled:te=>this.setEnabled(te),setContextKey:te=>this.options.setContextKey(te)},this.updateStyles(),this.ui}pick(L,M={},O=u.CancellationToken.None){return new Promise((N,P)=>{let B=H=>{B=N,M.onKeyMods?.(V.keyMods),N(H)};if(O.isCancellationRequested){B(void 0);return}const V=this.createQuickPick();let z;const x=[V,V.onDidAccept(()=>{if(V.canSelectMany)B(V.selectedItems.slice()),V.hide();else{const H=V.activeItems[0];H&&(B(H),V.hide())}}),V.onDidChangeActive(H=>{const W=H[0];W&&M.onDidFocus&&M.onDidFocus(W)}),V.onDidChangeSelection(H=>{if(!V.canSelectMany){const W=H[0];W&&(B(W),V.hide())}}),V.onDidTriggerItemButton(H=>M.onDidTriggerItemButton&&M.onDidTriggerItemButton({...H,removeItem:()=>{const W=V.items.indexOf(H.item);if(W!==-1){const U=V.items.slice(),$=U.splice(W,1),q=V.activeItems.filter(G=>G!==$[0]),X=V.keepScrollPosition;V.keepScrollPosition=!0,V.items=U,q&&(V.activeItems=q),V.keepScrollPosition=X}}})),V.onDidTriggerSeparatorButton(H=>M.onDidTriggerSeparatorButton?.(H)),V.onDidChangeValue(H=>{z&&!H&&(V.activeItems.length!==1||V.activeItems[0]!==z)&&(V.activeItems=[z])}),O.onCancellationRequested(()=>{V.hide()}),V.onDidHide(()=>{(0,c.dispose)(x),B(void 0)})];V.title=M.title,V.canSelectMany=!!M.canPickMany,V.placeholder=M.placeHolder,V.ignoreFocusOut=!!M.ignoreFocusLost,V.matchOnDescription=!!M.matchOnDescription,V.matchOnDetail=!!M.matchOnDetail,V.matchOnLabel=M.matchOnLabel===void 0||M.matchOnLabel,V.autoFocusOnList=M.autoFocusOnList===void 0||M.autoFocusOnList,V.quickNavigate=M.quickNavigate,V.hideInput=!!M.hideInput,V.contextKey=M.contextKey,V.busy=!0,Promise.all([L,M.activeItem]).then(([H,W])=>{z=W,V.busy=!1,V.items=H,V.canSelectMany&&(V.selectedItems=H.filter(U=>U.type!=="separator"&&U.picked)),z&&(V.activeItems=[z])}),V.show(),Promise.resolve(L).then(void 0,H=>{P(H),V.hide()})})}setValidationOnInput(L,M){M&&(0,d.isString)(M)?(L.severity=s.default.Error,L.validationMessage=M):M&&!(0,d.isString)(M)?(L.severity=M.severity,L.validationMessage=M.content):(L.severity=s.default.Ignore,L.validationMessage=void 0)}input(L={},M=u.CancellationToken.None){return new Promise(O=>{if(M.isCancellationRequested){O(void 0);return}const N=this.createInputBox(),P=L.validateInput||(()=>Promise.resolve(void 0)),B=f.Event.debounce(N.onDidChangeValue,(H,W)=>W,100);let V=L.value||"",z=Promise.resolve(P(V));const x=[N,B(H=>{H!==V&&(z=Promise.resolve(P(H)),V=H),z.then(W=>{H===V&&this.setValidationOnInput(N,W)})}),N.onDidAccept(()=>{const H=N.value;H!==V&&(z=Promise.resolve(P(H)),V=H),z.then(W=>{!W||!(0,d.isString)(W)&&W.severity!==s.default.Error?(O(H),N.hide()):H===V&&this.setValidationOnInput(N,W)})}),M.onCancellationRequested(()=>{N.hide()}),N.onDidHide(()=>{(0,c.dispose)(x),O(void 0)})];N.title=L.title,N.value=L.value||"",N.valueSelection=L.valueSelection,N.prompt=L.prompt,N.placeholder=L.placeHolder,N.password=!!L.password,N.ignoreFocusOut=!!L.ignoreFocusLost,N.show()})}createQuickPick(){const L=this.getUI();return new D(L)}createInputBox(){const L=this.getUI();return new y(L)}show(L){const M=this.getUI();this.onShowEmitter.fire();const O=this.controller;this.controller=L,O?.didHide(),this.setEnabled(!0),M.leftActionBar.clear(),M.title.textContent="",M.description1.textContent="",M.description2.textContent="",M.rightActionBar.clear(),M.checkAll.checked=!1,M.inputBox.placeholder="",M.inputBox.password=!1,M.inputBox.showDecoration(s.default.Ignore),M.visibleCount.setCount(0),M.count.setCount(0),t.reset(M.message),M.progressBar.stop(),M.list.setElements([]),M.list.matchOnDescription=!1,M.list.matchOnDetail=!1,M.list.matchOnLabel=!0,M.list.sortByLabel=!0,M.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),M.inputBox.ariaLabel="";const N=this.options.backKeybindingLabel();m.tooltip=N?(0,o.localize)(10,null,N):(0,o.localize)(11,null),M.container.style.display="",this.updateLayout(),M.inputBox.setFocus()}setVisibilities(L){const M=this.getUI();M.title.style.display=L.title?"":"none",M.description1.style.display=L.description&&(L.inputBox||L.checkAll)?"":"none",M.description2.style.display=L.description&&!(L.inputBox||L.checkAll)?"":"none",M.checkAll.style.display=L.checkAll?"":"none",M.filterContainer.style.display=L.inputBox?"":"none",M.visibleCountContainer.style.display=L.visibleCount?"":"none",M.countContainer.style.display=L.count?"":"none",M.okContainer.style.display=L.ok?"":"none",M.customButtonContainer.style.display=L.customButton?"":"none",M.message.style.display=L.message?"":"none",M.progressBar.getContainer().style.display=L.progressBar?"":"none",M.list.display(!!L.list),M.container.classList.toggle("show-checkboxes",L.checkBox),this.updateLayout()}setComboboxAccessibility(L){if(L!==this.comboboxAccessibility){const M=this.getUI();this.comboboxAccessibility=L,this.comboboxAccessibility?(M.inputBox.setAttribute("role","combobox"),M.inputBox.setAttribute("aria-haspopup","true"),M.inputBox.setAttribute("aria-autocomplete","list"),M.inputBox.setAttribute("aria-activedescendant",M.list.getActiveDescendant()||"")):(M.inputBox.removeAttribute("role"),M.inputBox.removeAttribute("aria-haspopup"),M.inputBox.removeAttribute("aria-autocomplete"),M.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(L){if(L!==this.enabled){this.enabled=L;for(const M of this.getUI().leftActionBar.viewItems)M.action.enabled=L;for(const M of this.getUI().rightActionBar.viewItems)M.action.enabled=L;this.getUI().checkAll.disabled=!L,this.getUI().inputBox.enabled=L,this.getUI().ok.enabled=L,this.getUI().list.enabled=L,L||this.getUI().container.focus()}}hide(L){const M=this.controller;if(M){const O=!this.ui?.container.contains(document.activeElement);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!O){let N=this.previousFocusElement;for(;N&&!N.offsetParent;)N=(0,d.withNullAsUndefined)(N.parentElement);N?.offsetParent?(N.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}M.didHide(L)}}focus(){if(this.isDisplayed()){const L=this.getUI();L.inputBox.enabled?L.inputBox.setFocus():L.list.domFocus()}}toggle(){this.isDisplayed()&&this.controller instanceof D&&this.controller.canSelectMany&&this.getUI().list.toggleCheckbox()}navigate(L,M){this.isDisplayed()&&this.getUI().list.isDisplayed()&&(this.getUI().list.focus(L?h.QuickInputListFocus.Next:h.QuickInputListFocus.Previous),M&&this.controller instanceof D&&(this.controller.quickNavigate=M))}async accept(L={alt:!1,ctrlCmd:!1}){this.keyMods.alt=L.alt,this.keyMods.ctrlCmd=L.ctrlCmd,this.onDidAcceptEmitter.fire()}async back(){this.onDidTriggerButtonEmitter.fire(this.backButton)}async cancel(){this.hide()}layout(L,M){this.dimension=L,this.titleBarOffset=M,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const L=this.ui.container.style,M=Math.min(this.dimension.width*.62,T.MAX_WIDTH);L.width=M+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(L){this.styles=L,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:L,quickInputBackground:M,quickInputForeground:O,contrastBorder:N,widgetShadow:P}=this.styles.widget;this.ui.titleBar.style.backgroundColor=L?L.toString():"",this.ui.container.style.backgroundColor=M?M.toString():"",this.ui.container.style.color=O?O.toString():"",this.ui.container.style.border=N?`1px solid ${N}`:"",this.ui.container.style.boxShadow=P?`0 0 8px 2px ${P}`:"",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 B=[];this.styles.list.pickerGroupBorder&&B.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&B.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),this.styles.list.pickerGroupForeground&&B.push(`.quick-input-list .quick-input-list-separator-as-item { 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)&&(B.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&B.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&B.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&B.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&B.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&B.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),B.push("}"));const V=B.join(` `);V!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=V)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}e.QuickInputController=T,T.MAX_WIDTH=600}),define(ae[1309],le([3,4]),function(J,e){return J.create("vs/editor/browser/controller/textAreaHandler",e)}),define(ae[1310],le([3,4]),function(J,e){return J.create("vs/editor/browser/coreCommands",e)}),define(ae[1311],le([3,4]),function(J,e){return J.create("vs/editor/browser/editorExtensions",e)}),define(ae[1312],le([3,4]),function(J,e){return J.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(ae[1313],le([3,4]),function(J,e){return J.create("vs/editor/browser/widget/diffEditorWidget",e)}),define(ae[1314],le([3,4]),function(J,e){return J.create("vs/editor/browser/widget/diffReview",e)}),define(ae[1315],le([3,4]),function(J,e){return J.create("vs/editor/browser/widget/inlineDiffMargin",e)}),define(ae[1316],le([1,0,1315,10,36,2,20,29]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffMargin=void 0;class I extends A.Disposable{get visibility(){return this._visibility}set visibility(S){this._visibility!==S&&(this._visibility=S,S?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}constructor(S,C,r,u,i,f){super(),this._viewZoneId=S,this._marginDomNode=C,this.editor=r,this.diff=u,this._contextMenuService=i,this._clipboardService=f,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=E.Codicon.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const c=r.getOption(60),l=r.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${c}px`,this._diffActions.style.lineHeight=`${c}px`,this._marginDomNode.appendChild(this._diffActions);const s=[],d=u.modifiedEndLineNumber===0;s.push(new R.Action("diff.clipboard.copyDeletedContent",d?u.originalEndLineNumber>u.modifiedStartLineNumber?t.localize(0,null):t.localize(1,null):u.originalEndLineNumber>u.modifiedStartLineNumber?t.localize(2,null):t.localize(3,null),void 0,!0,async()=>{const h=new k.Range(u.originalStartLineNumber,1,u.originalEndLineNumber+1,1),v=u.originalModel.getValueInRange(h);await this._clipboardService.writeText(v)}));let n=0,a;u.originalEndLineNumber>u.modifiedStartLineNumber&&(a=new R.Action("diff.clipboard.copyDeletedLineContent",d?t.localize(4,null,u.originalStartLineNumber):t.localize(5,null,u.originalStartLineNumber),void 0,!0,async()=>{const h=u.originalModel.getLineContent(u.originalStartLineNumber+n);if(h===""){const v=u.originalModel.getEndOfLineSequence();await this._clipboardService.writeText(v===0?` `:`\r `)}else await this._clipboardService.writeText(h)}),s.push(a)),r.getOption(82)||s.push(new R.Action("diff.inline.revertChange",t.localize(6,null),void 0,!0,async()=>{const h=new k.Range(u.originalStartLineNumber,1,u.originalEndLineNumber,u.originalModel.getLineMaxColumn(u.originalEndLineNumber)),v=u.originalModel.getValueInRange(h);if(u.modifiedEndLineNumber===0){const m=r.getModel().getLineMaxColumn(u.modifiedStartLineNumber);r.executeEdits("diffEditor",[{range:new k.Range(u.modifiedStartLineNumber,m,u.modifiedStartLineNumber,m),text:l+v}])}else{const m=r.getModel().getLineMaxColumn(u.modifiedEndLineNumber);r.executeEdits("diffEditor",[{range:new k.Range(u.modifiedStartLineNumber,1,u.modifiedEndLineNumber,m),text:v}])}}));const g=(h,v)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:h,y:v}),getActions:()=>(a&&(a.label=d?t.localize(7,null,u.originalStartLineNumber+n):t.localize(8,null,u.originalStartLineNumber+n)),s),autoSelectFirstItem:!0})};this._register(p.addStandardDisposableListener(this._diffActions,"mousedown",h=>{const{top:v,height:m}=p.getDomNodePagePosition(this._diffActions),w=Math.floor(c/3);h.preventDefault(),g(h.posx,v+m+w)})),this._register(r.onMouseMove(h=>{h.target.type===8||h.target.type===5?h.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,n=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,c)):this.visibility=!1:this.visibility=!1})),this._register(r.onMouseDown(h=>{!h.event.rightButton||(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._viewZoneId&&(h.event.preventDefault(),n=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,c),g(h.event.posx,h.event.posy+c))}))}_updateLightBulbPosition(S,C,r){const{top:u}=p.getDomNodePagePosition(S),i=C-u,f=Math.floor(i/r),c=f*r;if(this._diffActions.style.top=`${c}px`,this.diff.viewLineCounts){let l=0;for(let s=0;s<this.diff.viewLineCounts.length;s++)if(l+=this.diff.viewLineCounts[s],f<l)return s}return f}}e.InlineDiffMargin=I}),define(ae[1317],le([3,4]),function(J,e){return J.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(ae[1318],le([3,4]),function(J,e){return J.create("vs/editor/common/config/editorOptions",e)}),define(ae[134],le([1,0,1318,14,299,16,52,484]),function(J,e,t,p,R,A,k,E){"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(Ee){Ee[Ee.None=0]="None",Ee[Ee.Keep=1]="Keep",Ee[Ee.Brackets=2]="Brackets",Ee[Ee.Advanced=3]="Advanced",Ee[Ee.Full=4]="Full"})(I=e.EditorAutoIndentStrategy||(e.EditorAutoIndentStrategy={})),e.MINIMAP_GUTTER_WIDTH=8;class b{constructor(Te){this._values=Te}hasChanged(Te){return this._values[Te]}}e.ConfigurationChangedEvent=b;class S{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=S;class C{constructor(Te,_e,Re,Le){this.id=Te,this.name=_e,this.defaultValue=Re,this.schema=Le}applyUpdate(Te,_e){return u(Te,_e)}compute(Te,_e,Re){return Re}}class r{constructor(Te,_e){this.newValue=Te,this.didChange=_e}}e.ApplyUpdateResult=r;function u(Ee,Te){if(typeof Ee!="object"||typeof Te!="object"||!Ee||!Te)return new r(Te,Ee!==Te);if(Array.isArray(Ee)||Array.isArray(Te)){const Re=Array.isArray(Ee)&&Array.isArray(Te)&&A.equals(Ee,Te);return new r(Te,!Re)}let _e=!1;for(const Re in Te)if(Te.hasOwnProperty(Re)){const Le=u(Ee[Re],Te[Re]);Le.didChange&&(Ee[Re]=Le.newValue,_e=!0)}return new r(Ee,_e)}class i{constructor(Te){this.schema=void 0,this.id=Te,this.name="_never_",this.defaultValue=void 0}applyUpdate(Te,_e){return u(Te,_e)}validate(Te){return this.defaultValue}}class f{constructor(Te,_e,Re,Le){this.id=Te,this.name=_e,this.defaultValue=Re,this.schema=Le}applyUpdate(Te,_e){return u(Te,_e)}validate(Te){return typeof Te>"u"?this.defaultValue:Te}compute(Te,_e,Re){return Re}}function c(Ee,Te){return typeof Ee>"u"?Te:Ee==="false"?!1:Boolean(Ee)}e.boolean=c;class l extends f{constructor(Te,_e,Re,Le=void 0){typeof Le<"u"&&(Le.type="boolean",Le.default=Re),super(Te,_e,Re,Le)}validate(Te){return c(Te,this.defaultValue)}}function s(Ee,Te,_e,Re){if(typeof Ee>"u")return Te;let Le=parseInt(Ee,10);return isNaN(Le)?Te:(Le=Math.max(_e,Le),Le=Math.min(Re,Le),Le|0)}e.clampedInt=s;class d extends f{static clampedInt(Te,_e,Re,Le){return s(Te,_e,Re,Le)}constructor(Te,_e,Re,Le,Me,Oe=void 0){typeof Oe<"u"&&(Oe.type="integer",Oe.default=Re,Oe.minimum=Le,Oe.maximum=Me),super(Te,_e,Re,Oe),this.minimum=Le,this.maximum=Me}validate(Te){return d.clampedInt(Te,this.defaultValue,this.minimum,this.maximum)}}class n extends f{static clamp(Te,_e,Re){return Te<_e?_e:Te>Re?Re:Te}static float(Te,_e){if(typeof Te=="number")return Te;if(typeof Te>"u")return _e;const Re=parseFloat(Te);return isNaN(Re)?_e:Re}constructor(Te,_e,Re,Le,Me){typeof Me<"u"&&(Me.type="number",Me.default=Re),super(Te,_e,Re,Me),this.validationFn=Le}validate(Te){return this.validationFn(n.float(Te,this.defaultValue))}}class a extends f{static string(Te,_e){return typeof Te!="string"?_e:Te}constructor(Te,_e,Re,Le=void 0){typeof Le<"u"&&(Le.type="string",Le.default=Re),super(Te,_e,Re,Le)}validate(Te){return a.string(Te,this.defaultValue)}}function o(Ee,Te,_e){return typeof Ee!="string"||_e.indexOf(Ee)===-1?Te:Ee}e.stringSet=o;class g extends f{constructor(Te,_e,Re,Le,Me=void 0){typeof Me<"u"&&(Me.type="string",Me.enum=Le,Me.default=Re),super(Te,_e,Re,Me),this._allowedValues=Le}validate(Te){return o(Te,this.defaultValue,this._allowedValues)}}class h extends C{constructor(Te,_e,Re,Le,Me,Oe,Ke=void 0){typeof Ke<"u"&&(Ke.type="string",Ke.enum=Me,Ke.default=Le),super(Te,_e,Re,Ke),this._allowedValues=Me,this._convert=Oe}validate(Te){return typeof Te!="string"?this.defaultValue:this._allowedValues.indexOf(Te)===-1?this.defaultValue:this._convert(Te)}}function v(Ee){switch(Ee){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",tags:["accessibility"],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,_e,Re){return Re===0?Te.accessibilitySupport:Re}}class w 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 _e=Te;return{insertSpace:c(_e.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:c(_e.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}var D;(function(Ee){Ee[Ee.Hidden=0]="Hidden",Ee[Ee.Blink=1]="Blink",Ee[Ee.Smooth=2]="Smooth",Ee[Ee.Phase=3]="Phase",Ee[Ee.Expand=4]="Expand",Ee[Ee.Solid=5]="Solid"})(D=e.TextEditorCursorBlinkingStyle||(e.TextEditorCursorBlinkingStyle={}));function y(Ee){switch(Ee){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var T;(function(Ee){Ee[Ee.Line=1]="Line",Ee[Ee.Block=2]="Block",Ee[Ee.Underline=3]="Underline",Ee[Ee.LineThin=4]="LineThin",Ee[Ee.BlockOutline=5]="BlockOutline",Ee[Ee.UnderlineThin=6]="UnderlineThin"})(T=e.TextEditorCursorStyle||(e.TextEditorCursorStyle={}));function _(Ee){switch(Ee){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=_;function L(Ee){switch(Ee){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 M extends i{constructor(){super(130)}compute(Te,_e,Re){const Le=["monaco-editor"];return _e.get(34)&&Le.push(_e.get(34)),Te.extraEditorClassName&&Le.push(Te.extraEditorClassName),_e.get(67)==="default"?Le.push("mouse-default"):_e.get(67)==="copy"&&Le.push("mouse-copy"),_e.get(101)&&Le.push("showUnused"),_e.get(128)&&Le.push("showDeprecated"),Le.join(" ")}}class O extends l{constructor(){super(33,"emptySelectionClipboard",!0,{description:t.localize(6,null)})}compute(Te,_e,Re){return Re&&Te.emptySelectionClipboard}}class N extends C{constructor(){const Te={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(36,"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:p.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 _e=Te;return{cursorMoveOnType:c(_e.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof Te.seedSearchStringFromSelection=="boolean"?Te.seedSearchStringFromSelection?"always":"never":o(_e.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof Te.autoFindInSelection=="boolean"?Te.autoFindInSelection?"always":"never":o(_e.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:c(_e.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:c(_e.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:c(_e.loop,this.defaultValue.loop)}}}class P extends C{constructor(){super(46,"fontLigatures",P.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>"u"?this.defaultValue:typeof Te=="string"?Te==="false"?P.OFF:Te==="true"?P.ON:Te:Boolean(Te)?P.ON:P.OFF}}e.EditorFontLigatures=P,P.OFF='"liga" off, "calt" off',P.ON='"liga" on, "calt" on';class B extends i{constructor(){super(45)}compute(Te,_e,Re){return Te.fontInfo}}class V extends f{constructor(){super(47,"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 _e=n.float(Te,this.defaultValue);return _e===0?e.EDITOR_FONT_DEFAULTS.fontSize:n.clamp(_e,6,100)}compute(Te,_e,Re){return Te.fontInfo.fontSize}}class z extends C{constructor(){super(48,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:z.MINIMUM_VALUE,maximum:z.MAXIMUM_VALUE,errorMessage:t.localize(23,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:z.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:t.localize(24,null)})}validate(Te){return Te==="normal"||Te==="bold"?Te:String(d.clampedInt(Te,e.EDITOR_FONT_DEFAULTS.fontWeight,z.MINIMUM_VALUE,z.MAXIMUM_VALUE))}}z.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],z.MINIMUM_VALUE=1,z.MAXIMUM_VALUE=1e3;class x 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:""},_e={type:"string",enum:["peek","gotoAndPeek","goto"],default:Te.multiple,enumDescriptions:[t.localize(25,null),t.localize(26,null),t.localize(27,null)]},Re=["","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(52,"gotoLocation",Te,{"editor.gotoLocation.multiple":{deprecationMessage:t.localize(28,null)},"editor.gotoLocation.multipleDefinitions":{description:t.localize(29,null),..._e},"editor.gotoLocation.multipleTypeDefinitions":{description:t.localize(30,null),..._e},"editor.gotoLocation.multipleDeclarations":{description:t.localize(31,null),..._e},"editor.gotoLocation.multipleImplementations":{description:t.localize(32,null),..._e},"editor.gotoLocation.multipleReferences":{description:t.localize(33,null),..._e},"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:Te.alternativeDefinitionCommand,enum:Re,description:t.localize(34,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:Te.alternativeTypeDefinitionCommand,enum:Re,description:t.localize(35,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:Te.alternativeDeclarationCommand,enum:Re,description:t.localize(36,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:Te.alternativeImplementationCommand,enum:Re,description:t.localize(37,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:Te.alternativeReferenceCommand,enum:Re,description:t.localize(38,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{multiple:o(_e.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:_e.multipleDefinitions??o(_e.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:_e.multipleTypeDefinitions??o(_e.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:_e.multipleDeclarations??o(_e.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:_e.multipleImplementations??o(_e.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:_e.multipleReferences??o(_e.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:a.string(_e.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:a.string(_e.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:a.string(_e.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:a.string(_e.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:a.string(_e.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class H extends C{constructor(){const Te={enabled:!0,delay:300,sticky:!0,above:!0};super(54,"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 _e=Te;return{enabled:c(_e.enabled,this.defaultValue.enabled),delay:d.clampedInt(_e.delay,this.defaultValue.delay,0,1e4),sticky:c(_e.sticky,this.defaultValue.sticky),above:c(_e.above,this.defaultValue.above)}}}var W;(function(Ee){Ee[Ee.None=0]="None",Ee[Ee.Text=1]="Text",Ee[Ee.Blocks=2]="Blocks"})(W=e.RenderMinimap||(e.RenderMinimap={}));class U extends i{constructor(){super(133)}compute(Te,_e,Re){return U.computeLayout(_e,{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 _e=Te.height/Te.lineHeight,Re=Te.scrollBeyondLastLine?_e-1:0,Le=(Te.viewLineCount+Re)/(Te.pixelRatio*Te.height),Me=Math.floor(Te.viewLineCount/Le);return{typicalViewportLineCount:_e,extraLinesBeyondLastLine:Re,desiredRatio:Le,minimapLineCount:Me}}static _computeMinimapLayout(Te,_e){const Re=Te.outerWidth,Le=Te.outerHeight,Me=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(Me*Le),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Le};const Oe=_e.stableMinimapLayoutInput,Ke=Oe&&Te.outerHeight===Oe.outerHeight&&Te.lineHeight===Oe.lineHeight&&Te.typicalHalfwidthCharacterWidth===Oe.typicalHalfwidthCharacterWidth&&Te.pixelRatio===Oe.pixelRatio&&Te.scrollBeyondLastLine===Oe.scrollBeyondLastLine&&Te.minimap.enabled===Oe.minimap.enabled&&Te.minimap.side===Oe.minimap.side&&Te.minimap.size===Oe.minimap.size&&Te.minimap.showSlider===Oe.minimap.showSlider&&Te.minimap.renderCharacters===Oe.minimap.renderCharacters&&Te.minimap.maxColumn===Oe.minimap.maxColumn&&Te.minimap.scale===Oe.minimap.scale&&Te.verticalScrollbarWidth===Oe.verticalScrollbarWidth&&Te.isViewportWrapping===Oe.isViewportWrapping,We=Te.lineHeight,Xe=Te.typicalHalfwidthCharacterWidth,Je=Te.scrollBeyondLastLine,rt=Te.minimap.renderCharacters;let je=Me>=2?Math.round(Te.minimap.scale*2):Te.minimap.scale;const Ue=Te.minimap.maxColumn,Fe=Te.minimap.size,He=Te.minimap.side,Be=Te.verticalScrollbarWidth,ze=Te.viewLineCount,nt=Te.remainingWidth,ut=Te.isViewportWrapping,ot=rt?2:3;let at=Math.floor(Me*Le);const wt=at/Me;let It=!1,_t=!1,lt=ot*je,pt=je/Me,st=1;if(Fe==="fill"||Fe==="fit"){const{typicalViewportLineCount:kt,extraLinesBeyondLastLine:Ne,desiredRatio:Ge,minimapLineCount:Ze}=U.computeContainedMinimapLineCount({viewLineCount:ze,scrollBeyondLastLine:Je,height:Le,lineHeight:We,pixelRatio:Me});if(ze/Ze>1)It=!0,_t=!0,je=1,lt=1,pt=je/Me;else{let Dt=!1,St=je+1;if(Fe==="fit"){const Ye=Math.ceil((ze+Ne)*lt);ut&&Ke&&nt<=_e.stableFitRemainingWidth?(Dt=!0,St=_e.stableFitMaxMinimapScale):Dt=Ye>at}if(Fe==="fill"||Dt){It=!0;const Ye=je;lt=Math.min(We*Me,Math.max(1,Math.floor(1/Ge))),ut&&Ke&&nt<=_e.stableFitRemainingWidth&&(St=_e.stableFitMaxMinimapScale),je=Math.min(St,Math.max(1,Math.floor(lt/ot))),je>Ye&&(st=Math.min(2,je/Ye)),pt=je/Me/st,at=Math.ceil(Math.max(kt,ze+Ne)*lt),ut?(_e.stableMinimapLayoutInput=Te,_e.stableFitRemainingWidth=nt,_e.stableFitMaxMinimapScale=je):(_e.stableMinimapLayoutInput=null,_e.stableFitRemainingWidth=0)}}}const qe=Math.floor(Ue*pt),Et=Math.min(qe,Math.max(0,Math.floor((nt-Be-2)*pt/(Xe+pt)))+e.MINIMAP_GUTTER_WIDTH);let Tt=Math.floor(Me*Et);const xt=Tt/Me;Tt=Math.floor(Tt*st);const At=rt?1:2,Nt=He==="left"?0:Re-Et-Be;return{renderMinimap:At,minimapLeft:Nt,minimapWidth:Et,minimapHeightIsEditorHeight:It,minimapIsSampling:_t,minimapScale:je,minimapLineHeight:lt,minimapCanvasInnerWidth:Tt,minimapCanvasInnerHeight:at,minimapCanvasOuterWidth:xt,minimapCanvasOuterHeight:wt}}static computeLayout(Te,_e){const Re=_e.outerWidth|0,Le=_e.outerHeight|0,Me=_e.lineHeight|0,Oe=_e.lineNumbersDigitCount|0,Ke=_e.typicalHalfwidthCharacterWidth,We=_e.maxDigitWidth,Xe=_e.pixelRatio,Je=_e.viewLineCount,rt=Te.get(125),je=rt==="inherit"?Te.get(124):rt,Ue=je==="inherit"?Te.get(120):je,Fe=Te.get(123),He=_e.isDominatedByLongLines,Be=Te.get(51),ze=Te.get(61).renderType!==0,nt=Te.get(62),ut=Te.get(95),ot=Te.get(66),at=Te.get(93),wt=at.verticalScrollbarSize,It=at.verticalHasArrows,_t=at.arrowSize,lt=at.horizontalScrollbarSize,pt=Te.get(59),st=Te.get(38),qe=Te.get(100)!=="never";let Et;if(typeof pt=="string"&&/^\d+(\.\d+)?ch$/.test(pt)){const gt=parseFloat(pt.substr(0,pt.length-2));Et=d.clampedInt(gt*Ke,0,0,1e3)}else Et=d.clampedInt(pt,0,0,1e3);st&&qe&&(Et+=16);let Tt=0;if(ze){const gt=Math.max(Oe,nt);Tt=Math.round(gt*We)}let xt=0;Be&&(xt=Me);let At=0,Nt=At+xt,kt=Nt+Tt,Ne=kt+Et;const Ge=Re-xt-Tt-Et;let Ze=!1,ft=!1,Dt=-1;je==="inherit"&&He?(Ze=!0,ft=!0):Ue==="on"||Ue==="bounded"?ft=!0:Ue==="wordWrapColumn"&&(Dt=Fe);const St=U._computeMinimapLayout({outerWidth:Re,outerHeight:Le,lineHeight:Me,typicalHalfwidthCharacterWidth:Ke,pixelRatio:Xe,scrollBeyondLastLine:ut,minimap:ot,verticalScrollbarWidth:wt,viewLineCount:Je,remainingWidth:Ge,isViewportWrapping:ft},_e.memory||new S);St.renderMinimap!==0&&St.minimapLeft===0&&(At+=St.minimapWidth,Nt+=St.minimapWidth,kt+=St.minimapWidth,Ne+=St.minimapWidth);const Ye=Ge-St.minimapWidth,it=Math.max(1,Math.floor((Ye-wt-2)/Ke)),ct=It?_t:0;return ft&&(Dt=Math.max(1,it),Ue==="bounded"&&(Dt=Math.min(Dt,Fe))),{width:Re,height:Le,glyphMarginLeft:At,glyphMarginWidth:xt,lineNumbersLeft:Nt,lineNumbersWidth:Tt,decorationsLeft:kt,decorationsWidth:Et,contentLeft:Ne,contentWidth:Ye,minimap:St,viewportColumn:it,isWordWrapMinified:Ze,isViewportWrapping:ft,wrappingColumn:Dt,verticalScrollbarWidth:wt,horizontalScrollbarHeight:lt,overviewRuler:{top:ct,width:wt,height:Le-2*ct,right:0}}}}e.EditorLayoutInfoComputer=U;class $ extends C{constructor(){super(127,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[t.localize(43,null),t.localize(44,null)],type:"string",enum:["simple","advanced"],default:"simple",description:t.localize(45,null)}})}validate(Te){return o(Te,"simple",["simple","advanced"])}compute(Te,_e,Re){return _e.get(2)===2?"advanced":Re}}class q extends C{constructor(){const Te={enabled:!0};super(58,"lightbulb",Te,{"editor.lightbulb.enabled":{type:"boolean",default:Te.enabled,description:t.localize(46,null)}})}validate(Te){return!Te||typeof Te!="object"?this.defaultValue:{enabled:c(Te.enabled,this.defaultValue.enabled)}}}class X extends C{constructor(){const Te={enabled:!1,maxLineCount:5};super(105,"stickyScroll",Te,{"editor.stickyScroll.enabled":{type:"boolean",default:Te.enabled,description:t.localize(47,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:Te.maxLineCount,minimum:1,maximum:10,description:t.localize(48,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{enabled:c(_e.enabled,this.defaultValue.enabled),maxLineCount:d.clampedInt(_e.maxLineCount,this.defaultValue.maxLineCount,1,10)}}}class G extends C{constructor(){const Te={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(129,"inlayHints",Te,{"editor.inlayHints.enabled":{type:"string",default:Te.enabled,description:t.localize(49,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[t.localize(50,null),t.localize(51,null,p.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),t.localize(52,null,p.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),t.localize(53,null)]},"editor.inlayHints.fontSize":{type:"number",default:Te.fontSize,markdownDescription:t.localize(54,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:Te.fontFamily,markdownDescription:t.localize(55,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:Te.padding,description:t.localize(56,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return typeof _e.enabled=="boolean"&&(_e.enabled=_e.enabled?"on":"off"),{enabled:o(_e.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:d.clampedInt(_e.fontSize,this.defaultValue.fontSize,0,100),fontFamily:a.string(_e.fontFamily,this.defaultValue.fontFamily),padding:c(_e.padding,this.defaultValue.padding)}}}class Q extends n{constructor(){super(60,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,Te=>n.clamp(Te,0,150),{markdownDescription:t.localize(57,null)})}compute(Te,_e,Re){return Te.fontInfo.lineHeight}}class j extends C{constructor(){const Te={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(66,"minimap",Te,{"editor.minimap.enabled":{type:"boolean",default:Te.enabled,description:t.localize(58,null)},"editor.minimap.autohide":{type:"boolean",default:Te.autohide,description:t.localize(59,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[t.localize(60,null),t.localize(61,null),t.localize(62,null)],default:Te.size,description:t.localize(63,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:Te.side,description:t.localize(64,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:Te.showSlider,description:t.localize(65,null)},"editor.minimap.scale":{type:"number",default:Te.scale,minimum:1,maximum:3,enum:[1,2,3],description:t.localize(66,null)},"editor.minimap.renderCharacters":{type:"boolean",default:Te.renderCharacters,description:t.localize(67,null)},"editor.minimap.maxColumn":{type:"number",default:Te.maxColumn,description:t.localize(68,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{enabled:c(_e.enabled,this.defaultValue.enabled),autohide:c(_e.autohide,this.defaultValue.autohide),size:o(_e.size,this.defaultValue.size,["proportional","fill","fit"]),side:o(_e.side,this.defaultValue.side,["right","left"]),showSlider:o(_e.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:c(_e.renderCharacters,this.defaultValue.renderCharacters),scale:d.clampedInt(_e.scale,1,1,3),maxColumn:d.clampedInt(_e.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function K(Ee){return Ee==="ctrlCmd"?p.isMacintosh?"metaKey":"ctrlKey":"altKey"}class Y extends C{constructor(){super(76,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:t.localize(69,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:t.localize(70,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{top:d.clampedInt(_e.top,0,0,1e3),bottom:d.clampedInt(_e.bottom,0,0,1e3)}}}class ee extends C{constructor(){const Te={enabled:!0,cycle:!1};super(77,"parameterHints",Te,{"editor.parameterHints.enabled":{type:"boolean",default:Te.enabled,description:t.localize(71,null)},"editor.parameterHints.cycle":{type:"boolean",default:Te.cycle,description:t.localize(72,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{enabled:c(_e.enabled,this.defaultValue.enabled),cycle:c(_e.cycle,this.defaultValue.cycle)}}}class ie extends i{constructor(){super(131)}compute(Te,_e,Re){return Te.pixelRatio}}class re extends C{constructor(){const Te={other:"on",comments:"off",strings:"off"},_e=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[t.localize(73,null),t.localize(74,null),t.localize(75,null)]}];super(80,"quickSuggestions",Te,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:_e,default:Te.strings,description:t.localize(76,null)},comments:{anyOf:_e,default:Te.comments,description:t.localize(77,null)},other:{anyOf:_e,default:Te.other,description:t.localize(78,null)}},default:Te,markdownDescription:t.localize(79,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=Te}validate(Te){if(typeof Te=="boolean"){const Xe=Te?"on":"off";return{comments:Xe,strings:Xe,other:Xe}}if(!Te||typeof Te!="object")return this.defaultValue;const{other:_e,comments:Re,strings:Le}=Te,Me=["on","inline","off"];let Oe,Ke,We;return typeof _e=="boolean"?Oe=_e?"on":"off":Oe=o(_e,this.defaultValue.other,Me),typeof Re=="boolean"?Ke=Re?"on":"off":Ke=o(Re,this.defaultValue.comments,Me),typeof Le=="boolean"?We=Le?"on":"off":We=o(Le,this.defaultValue.strings,Me),{other:Oe,comments:Ke,strings:We}}}var oe;(function(Ee){Ee[Ee.Off=0]="Off",Ee[Ee.On=1]="On",Ee[Ee.Relative=2]="Relative",Ee[Ee.Interval=3]="Interval",Ee[Ee.Custom=4]="Custom"})(oe=e.RenderLineNumbersType||(e.RenderLineNumbersType={}));class se extends C{constructor(){super(61,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[t.localize(80,null),t.localize(81,null),t.localize(82,null),t.localize(83,null)],default:"on",description:t.localize(84,null)})}validate(Te){let _e=this.defaultValue.renderType,Re=this.defaultValue.renderFn;return typeof Te<"u"&&(typeof Te=="function"?(_e=4,Re=Te):Te==="interval"?_e=3:Te==="relative"?_e=2:Te==="on"?_e=1:_e=0),{renderType:_e,renderFn:Re}}}function te(Ee){const Te=Ee.get(88);return Te==="editable"?Ee.get(82):Te!=="on"}e.filterValidationDecorations=te;class Z extends C{constructor(){const Te=[],_e={type:"number",description:t.localize(85,null)};super(92,"rulers",Te,{type:"array",items:{anyOf:[_e,{type:["object"],properties:{column:_e,color:{type:"string",description:t.localize(86,null),format:"color-hex"}}}]},default:Te,description:t.localize(87,null)})}validate(Te){if(Array.isArray(Te)){const _e=[];for(const Re of Te)if(typeof Re=="number")_e.push({column:d.clampedInt(Re,0,0,1e4),color:null});else if(Re&&typeof Re=="object"){const Le=Re;_e.push({column:d.clampedInt(Le.column,0,0,1e4),color:Le.color})}return _e.sort((Re,Le)=>Re.column-Le.column),_e}return this.defaultValue}}function ne(Ee,Te){if(typeof Ee!="string")return Te;switch(Ee){case"hidden":return 2;case"visible":return 3;default:return 1}}class ce 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(93,"scrollbar",Te,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[t.localize(88,null),t.localize(89,null),t.localize(90,null)],default:"auto",description:t.localize(91,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[t.localize(92,null),t.localize(93,null),t.localize(94,null)],default:"auto",description:t.localize(95,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:Te.verticalScrollbarSize,description:t.localize(96,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:Te.horizontalScrollbarSize,description:t.localize(97,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:Te.scrollByPage,description:t.localize(98,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te,Re=d.clampedInt(_e.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Le=d.clampedInt(_e.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:d.clampedInt(_e.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:ne(_e.vertical,this.defaultValue.vertical),horizontal:ne(_e.horizontal,this.defaultValue.horizontal),useShadows:c(_e.useShadows,this.defaultValue.useShadows),verticalHasArrows:c(_e.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:c(_e.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:c(_e.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:c(_e.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Re,horizontalSliderSize:d.clampedInt(_e.horizontalSliderSize,Re,0,1e3),verticalScrollbarSize:Le,verticalSliderSize:d.clampedInt(_e.verticalSliderSize,Le,0,1e3),scrollByPage:c(_e.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 de extends C{constructor(){const Te={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(115,"unicodeHighlight",Te,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Te.nonBasicASCII,description:t.localize(99,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:Te.invisibleCharacters,description:t.localize(100,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:Te.ambiguousCharacters,description:t.localize(101,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Te.includeComments,description:t.localize(102,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:Te.includeStrings,description:t.localize(103,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:Te.allowedCharacters,description:t.localize(104,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:Te.allowedLocales,description:t.localize(105,null)}})}applyUpdate(Te,_e){let Re=!1;_e.allowedCharacters&&Te&&(k.equals(Te.allowedCharacters,_e.allowedCharacters)||(Te={...Te,allowedCharacters:_e.allowedCharacters},Re=!0)),_e.allowedLocales&&Te&&(k.equals(Te.allowedLocales,_e.allowedLocales)||(Te={...Te,allowedLocales:_e.allowedLocales},Re=!0));const Le=super.applyUpdate(Te,_e);return Re?new r(Le.newValue,!0):Le}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{nonBasicASCII:Se(_e.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:c(_e.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:c(_e.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:Se(_e.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:Se(_e.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,_e){if(typeof Te!="object"||!Te)return _e;const Re={};for(const[Le,Me]of Object.entries(Te))Me===!0&&(Re[Le]=!0);return Re}}class he extends C{constructor(){const Te={enabled:!0,mode:"subwordSmart"};super(56,"inlineSuggest",Te,{"editor.inlineSuggest.enabled":{type:"boolean",default:Te.enabled,description:t.localize(106,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{enabled:c(_e.enabled,this.defaultValue.enabled),mode:o(_e.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class pe extends C{constructor(){const Te={enabled:E.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:E.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(12,"bracketPairColorization",Te,{"editor.bracketPairColorization.enabled":{type:"boolean",default:Te.enabled,markdownDescription:t.localize(107,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:Te.independentColorPoolPerBracketType,description:t.localize(108,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{enabled:c(_e.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:c(_e.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class me 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(109,null),t.localize(110,null),t.localize(111,null)],default:Te.bracketPairs,description:t.localize(112,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[t.localize(113,null),t.localize(114,null),t.localize(115,null)],default:Te.bracketPairsHorizontal,description:t.localize(116,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:Te.highlightActiveBracketPair,description:t.localize(117,null)},"editor.guides.indentation":{type:"boolean",default:Te.indentation,description:t.localize(118,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[t.localize(119,null),t.localize(120,null),t.localize(121,null)],default:Te.highlightActiveIndentation,description:t.localize(122,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{bracketPairs:Se(_e.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:Se(_e.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:c(_e.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:c(_e.indentation,this.defaultValue.indentation),highlightActiveIndentation:Se(_e.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function Se(Ee,Te,_e){const Re=_e.indexOf(Ee);return Re===-1?Te:_e[Re]}class Ie 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,matchOnWordStartOnly:!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(108,"suggest",Te,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[t.localize(123,null),t.localize(124,null)],default:Te.insertMode,description:t.localize(125,null)},"editor.suggest.filterGraceful":{type:"boolean",default:Te.filterGraceful,description:t.localize(126,null)},"editor.suggest.localityBonus":{type:"boolean",default:Te.localityBonus,description:t.localize(127,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:Te.shareSuggestSelections,markdownDescription:t.localize(128,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:Te.snippetsPreventQuickSuggestions,description:t.localize(129,null)},"editor.suggest.showIcons":{type:"boolean",default:Te.showIcons,description:t.localize(130,null)},"editor.suggest.showStatusBar":{type:"boolean",default:Te.showStatusBar,description:t.localize(131,null)},"editor.suggest.preview":{type:"boolean",default:Te.preview,description:t.localize(132,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:Te.showInlineDetails,description:t.localize(133,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:t.localize(134,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:t.localize(135,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:t.localize(136,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:t.localize(137,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:t.localize(138,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:t.localize(139,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:t.localize(140,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:t.localize(141,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:t.localize(142,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:t.localize(143,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:t.localize(144,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:t.localize(145,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:t.localize(146,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:t.localize(147,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:t.localize(148,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:t.localize(149,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:t.localize(150,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:t.localize(151,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:t.localize(152,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:t.localize(153,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:t.localize(154,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:t.localize(155,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:t.localize(156,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:t.localize(157,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:t.localize(158,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:t.localize(159,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:t.localize(160,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:t.localize(161,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:t.localize(162,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:t.localize(163,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:t.localize(164,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:t.localize(165,null)}})}validate(Te){if(!Te||typeof Te!="object")return this.defaultValue;const _e=Te;return{insertMode:o(_e.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:c(_e.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:c(_e.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:c(_e.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:c(_e.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:c(_e.showIcons,this.defaultValue.showIcons),showStatusBar:c(_e.showStatusBar,this.defaultValue.showStatusBar),preview:c(_e.preview,this.defaultValue.preview),previewMode:o(_e.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:c(_e.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:c(_e.showMethods,this.defaultValue.showMethods),showFunctions:c(_e.showFunctions,this.defaultValue.showFunctions),showConstructors:c(_e.showConstructors,this.defaultValue.showConstructors),showDeprecated:c(_e.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:c(_e.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:c(_e.showFields,this.defaultValue.showFields),showVariables:c(_e.showVariables,this.defaultValue.showVariables),showClasses:c(_e.showClasses,this.defaultValue.showClasses),showStructs:c(_e.showStructs,this.defaultValue.showStructs),showInterfaces:c(_e.showInterfaces,this.defaultValue.showInterfaces),showModules:c(_e.showModules,this.defaultValue.showModules),showProperties:c(_e.showProperties,this.defaultValue.showProperties),showEvents:c(_e.showEvents,this.defaultValue.showEvents),showOperators:c(_e.showOperators,this.defaultValue.showOperators),showUnits:c(_e.showUnits,this.defaultValue.showUnits),showValues:c(_e.showValues,this.defaultValue.showValues),showConstants:c(_e.showConstants,this.defaultValue.showConstants),showEnums:c(_e.showEnums,this.defaultValue.showEnums),showEnumMembers:c(_e.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:c(_e.showKeywords,this.defaultValue.showKeywords),showWords:c(_e.showWords,this.defaultValue.showWords),showColors:c(_e.showColors,this.defaultValue.showColors),showFiles:c(_e.showFiles,this.defaultValue.showFiles),showReferences:c(_e.showReferences,this.defaultValue.showReferences),showFolders:c(_e.showFolders,this.defaultValue.showFolders),showTypeParameters:c(_e.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:c(_e.showSnippets,this.defaultValue.showSnippets),showUsers:c(_e.showUsers,this.defaultValue.showUsers),showIssues:c(_e.showIssues,this.defaultValue.showIssues)}}}class ve extends C{constructor(){super(103,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:t.localize(166,null),default:!0,type:"boolean"}})}validate(Te){return!Te||typeof Te!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:c(Te.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class be extends i{constructor(){super(132)}compute(Te,_e,Re){return _e.get(82)?!0:Te.tabFocusMode}}var ge;(function(Ee){Ee[Ee.None=0]="None",Ee[Ee.Same=1]="Same",Ee[Ee.Indent=2]="Indent",Ee[Ee.DeepIndent=3]="DeepIndent"})(ge=e.WrappingIndent||(e.WrappingIndent={}));class ue extends C{constructor(){super(126,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[t.localize(167,null),t.localize(168,null),t.localize(169,null),t.localize(170,null)],description:t.localize(171,null),default:"same"}})}validate(Te){switch(Te){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(Te,_e,Re){return _e.get(2)===2?0:Re}}class Ce extends i{constructor(){super(134)}compute(Te,_e,Re){const Le=_e.get(133);return{isDominatedByLongLines:Te.isDominatedByLongLines,isWordWrapMinified:Le.isWordWrapMinified,isViewportWrapping:Le.isViewportWrapping,wrappingColumn:Le.wrappingColumn}}}class De extends C{constructor(){const Te={enabled:!0};super(32,"dropIntoEditor",Te,{"editor.dropIntoEditor.enabled":{type:"boolean",default:Te.enabled,markdownDescription:t.localize(172,null)}})}validate(Te){return!Te||typeof Te!="object"?this.defaultValue:{enabled:c(Te.enabled,this.defaultValue.enabled)}}}const Ae="Consolas, 'Courier New', monospace",Pe="Menlo, Monaco, 'Courier New', monospace",fe="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:p.isMacintosh?Pe:p.isLinux?fe:Ae,fontWeight:"normal",fontSize:p.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function ye(Ee){return e.editorOptionsRegistry[Ee.id]=Ee,Ee}var ke;(function(Ee){Ee[Ee.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",Ee[Ee.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",Ee[Ee.accessibilitySupport=2]="accessibilitySupport",Ee[Ee.accessibilityPageSize=3]="accessibilityPageSize",Ee[Ee.ariaLabel=4]="ariaLabel",Ee[Ee.autoClosingBrackets=5]="autoClosingBrackets",Ee[Ee.autoClosingDelete=6]="autoClosingDelete",Ee[Ee.autoClosingOvertype=7]="autoClosingOvertype",Ee[Ee.autoClosingQuotes=8]="autoClosingQuotes",Ee[Ee.autoIndent=9]="autoIndent",Ee[Ee.automaticLayout=10]="automaticLayout",Ee[Ee.autoSurround=11]="autoSurround",Ee[Ee.bracketPairColorization=12]="bracketPairColorization",Ee[Ee.guides=13]="guides",Ee[Ee.codeLens=14]="codeLens",Ee[Ee.codeLensFontFamily=15]="codeLensFontFamily",Ee[Ee.codeLensFontSize=16]="codeLensFontSize",Ee[Ee.colorDecorators=17]="colorDecorators",Ee[Ee.columnSelection=18]="columnSelection",Ee[Ee.comments=19]="comments",Ee[Ee.contextmenu=20]="contextmenu",Ee[Ee.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",Ee[Ee.cursorBlinking=22]="cursorBlinking",Ee[Ee.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",Ee[Ee.cursorStyle=24]="cursorStyle",Ee[Ee.cursorSurroundingLines=25]="cursorSurroundingLines",Ee[Ee.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",Ee[Ee.cursorWidth=27]="cursorWidth",Ee[Ee.disableLayerHinting=28]="disableLayerHinting",Ee[Ee.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",Ee[Ee.domReadOnly=30]="domReadOnly",Ee[Ee.dragAndDrop=31]="dragAndDrop",Ee[Ee.dropIntoEditor=32]="dropIntoEditor",Ee[Ee.emptySelectionClipboard=33]="emptySelectionClipboard",Ee[Ee.extraEditorClassName=34]="extraEditorClassName",Ee[Ee.fastScrollSensitivity=35]="fastScrollSensitivity",Ee[Ee.find=36]="find",Ee[Ee.fixedOverflowWidgets=37]="fixedOverflowWidgets",Ee[Ee.folding=38]="folding",Ee[Ee.foldingStrategy=39]="foldingStrategy",Ee[Ee.foldingHighlight=40]="foldingHighlight",Ee[Ee.foldingImportsByDefault=41]="foldingImportsByDefault",Ee[Ee.foldingMaximumRegions=42]="foldingMaximumRegions",Ee[Ee.unfoldOnClickAfterEndOfLine=43]="unfoldOnClickAfterEndOfLine",Ee[Ee.fontFamily=44]="fontFamily",Ee[Ee.fontInfo=45]="fontInfo",Ee[Ee.fontLigatures=46]="fontLigatures",Ee[Ee.fontSize=47]="fontSize",Ee[Ee.fontWeight=48]="fontWeight",Ee[Ee.formatOnPaste=49]="formatOnPaste",Ee[Ee.formatOnType=50]="formatOnType",Ee[Ee.glyphMargin=51]="glyphMargin",Ee[Ee.gotoLocation=52]="gotoLocation",Ee[Ee.hideCursorInOverviewRuler=53]="hideCursorInOverviewRuler",Ee[Ee.hover=54]="hover",Ee[Ee.inDiffEditor=55]="inDiffEditor",Ee[Ee.inlineSuggest=56]="inlineSuggest",Ee[Ee.letterSpacing=57]="letterSpacing",Ee[Ee.lightbulb=58]="lightbulb",Ee[Ee.lineDecorationsWidth=59]="lineDecorationsWidth",Ee[Ee.lineHeight=60]="lineHeight",Ee[Ee.lineNumbers=61]="lineNumbers",Ee[Ee.lineNumbersMinChars=62]="lineNumbersMinChars",Ee[Ee.linkedEditing=63]="linkedEditing",Ee[Ee.links=64]="links",Ee[Ee.matchBrackets=65]="matchBrackets",Ee[Ee.minimap=66]="minimap",Ee[Ee.mouseStyle=67]="mouseStyle",Ee[Ee.mouseWheelScrollSensitivity=68]="mouseWheelScrollSensitivity",Ee[Ee.mouseWheelZoom=69]="mouseWheelZoom",Ee[Ee.multiCursorMergeOverlapping=70]="multiCursorMergeOverlapping",Ee[Ee.multiCursorModifier=71]="multiCursorModifier",Ee[Ee.multiCursorPaste=72]="multiCursorPaste",Ee[Ee.occurrencesHighlight=73]="occurrencesHighlight",Ee[Ee.overviewRulerBorder=74]="overviewRulerBorder",Ee[Ee.overviewRulerLanes=75]="overviewRulerLanes",Ee[Ee.padding=76]="padding",Ee[Ee.parameterHints=77]="parameterHints",Ee[Ee.peekWidgetDefaultFocus=78]="peekWidgetDefaultFocus",Ee[Ee.definitionLinkOpensInPeek=79]="definitionLinkOpensInPeek",Ee[Ee.quickSuggestions=80]="quickSuggestions",Ee[Ee.quickSuggestionsDelay=81]="quickSuggestionsDelay",Ee[Ee.readOnly=82]="readOnly",Ee[Ee.renameOnType=83]="renameOnType",Ee[Ee.renderControlCharacters=84]="renderControlCharacters",Ee[Ee.renderFinalNewline=85]="renderFinalNewline",Ee[Ee.renderLineHighlight=86]="renderLineHighlight",Ee[Ee.renderLineHighlightOnlyWhenFocus=87]="renderLineHighlightOnlyWhenFocus",Ee[Ee.renderValidationDecorations=88]="renderValidationDecorations",Ee[Ee.renderWhitespace=89]="renderWhitespace",Ee[Ee.revealHorizontalRightPadding=90]="revealHorizontalRightPadding",Ee[Ee.roundedSelection=91]="roundedSelection",Ee[Ee.rulers=92]="rulers",Ee[Ee.scrollbar=93]="scrollbar",Ee[Ee.scrollBeyondLastColumn=94]="scrollBeyondLastColumn",Ee[Ee.scrollBeyondLastLine=95]="scrollBeyondLastLine",Ee[Ee.scrollPredominantAxis=96]="scrollPredominantAxis",Ee[Ee.selectionClipboard=97]="selectionClipboard",Ee[Ee.selectionHighlight=98]="selectionHighlight",Ee[Ee.selectOnLineNumbers=99]="selectOnLineNumbers",Ee[Ee.showFoldingControls=100]="showFoldingControls",Ee[Ee.showUnused=101]="showUnused",Ee[Ee.snippetSuggestions=102]="snippetSuggestions",Ee[Ee.smartSelect=103]="smartSelect",Ee[Ee.smoothScrolling=104]="smoothScrolling",Ee[Ee.stickyScroll=105]="stickyScroll",Ee[Ee.stickyTabStops=106]="stickyTabStops",Ee[Ee.stopRenderingLineAfter=107]="stopRenderingLineAfter",Ee[Ee.suggest=108]="suggest",Ee[Ee.suggestFontSize=109]="suggestFontSize",Ee[Ee.suggestLineHeight=110]="suggestLineHeight",Ee[Ee.suggestOnTriggerCharacters=111]="suggestOnTriggerCharacters",Ee[Ee.suggestSelection=112]="suggestSelection",Ee[Ee.tabCompletion=113]="tabCompletion",Ee[Ee.tabIndex=114]="tabIndex",Ee[Ee.unicodeHighlighting=115]="unicodeHighlighting",Ee[Ee.unusualLineTerminators=116]="unusualLineTerminators",Ee[Ee.useShadowDOM=117]="useShadowDOM",Ee[Ee.useTabStops=118]="useTabStops",Ee[Ee.wordSeparators=119]="wordSeparators",Ee[Ee.wordWrap=120]="wordWrap",Ee[Ee.wordWrapBreakAfterCharacters=121]="wordWrapBreakAfterCharacters",Ee[Ee.wordWrapBreakBeforeCharacters=122]="wordWrapBreakBeforeCharacters",Ee[Ee.wordWrapColumn=123]="wordWrapColumn",Ee[Ee.wordWrapOverride1=124]="wordWrapOverride1",Ee[Ee.wordWrapOverride2=125]="wordWrapOverride2",Ee[Ee.wrappingIndent=126]="wrappingIndent",Ee[Ee.wrappingStrategy=127]="wrappingStrategy",Ee[Ee.showDeprecated=128]="showDeprecated",Ee[Ee.inlayHints=129]="inlayHints",Ee[Ee.editorClassName=130]="editorClassName",Ee[Ee.pixelRatio=131]="pixelRatio",Ee[Ee.tabFocusMode=132]="tabFocusMode",Ee[Ee.layoutInfo=133]="layoutInfo",Ee[Ee.wrappingInfo=134]="wrappingInfo"})(ke=e.EditorOption||(e.EditorOption={})),e.EditorOptions={acceptSuggestionOnCommitCharacter:ye(new l(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:t.localize(173,null)})),acceptSuggestionOnEnter:ye(new g(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",t.localize(174,null),""],markdownDescription:t.localize(175,null)})),accessibilitySupport:ye(new m),accessibilityPageSize:ye(new d(3,"accessibilityPageSize",10,1,1073741824,{description:t.localize(176,null),tags:["accessibility"]})),ariaLabel:ye(new a(4,"ariaLabel",t.localize(177,null))),autoClosingBrackets:ye(new g(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",t.localize(178,null),t.localize(179,null),""],description:t.localize(180,null)})),autoClosingDelete:ye(new g(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",t.localize(181,null),""],description:t.localize(182,null)})),autoClosingOvertype:ye(new g(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",t.localize(183,null),""],description:t.localize(184,null)})),autoClosingQuotes:ye(new g(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",t.localize(185,null),t.localize(186,null),""],description:t.localize(187,null)})),autoIndent:ye(new h(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],v,{enumDescriptions:[t.localize(188,null),t.localize(189,null),t.localize(190,null),t.localize(191,null),t.localize(192,null)],description:t.localize(193,null)})),automaticLayout:ye(new l(10,"automaticLayout",!1)),autoSurround:ye(new g(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[t.localize(194,null),t.localize(195,null),t.localize(196,null),""],description:t.localize(197,null)})),bracketPairColorization:ye(new pe),bracketPairGuides:ye(new me),stickyTabStops:ye(new l(106,"stickyTabStops",!1,{description:t.localize(198,null)})),codeLens:ye(new l(14,"codeLens",!0,{description:t.localize(199,null)})),codeLensFontFamily:ye(new a(15,"codeLensFontFamily","",{description:t.localize(200,null)})),codeLensFontSize:ye(new d(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:t.localize(201,null)})),colorDecorators:ye(new l(17,"colorDecorators",!0,{description:t.localize(202,null)})),columnSelection:ye(new l(18,"columnSelection",!1,{description:t.localize(203,null)})),comments:ye(new w),contextmenu:ye(new l(20,"contextmenu",!0)),copyWithSyntaxHighlighting:ye(new l(21,"copyWithSyntaxHighlighting",!0,{description:t.localize(204,null)})),cursorBlinking:ye(new h(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],y,{description:t.localize(205,null)})),cursorSmoothCaretAnimation:ye(new l(23,"cursorSmoothCaretAnimation",!1,{description:t.localize(206,null)})),cursorStyle:ye(new h(24,"cursorStyle",T.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],L,{description:t.localize(207,null)})),cursorSurroundingLines:ye(new d(25,"cursorSurroundingLines",0,0,1073741824,{description:t.localize(208,null)})),cursorSurroundingLinesStyle:ye(new g(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[t.localize(209,null),t.localize(210,null)],description:t.localize(211,null)})),cursorWidth:ye(new d(27,"cursorWidth",0,0,1073741824,{markdownDescription:t.localize(212,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(213,null)})),emptySelectionClipboard:ye(new O),dropIntoEditor:ye(new De),stickyScroll:ye(new X),extraEditorClassName:ye(new a(34,"extraEditorClassName","")),fastScrollSensitivity:ye(new n(35,"fastScrollSensitivity",5,Ee=>Ee<=0?5:Ee,{markdownDescription:t.localize(214,null)})),find:ye(new N),fixedOverflowWidgets:ye(new l(37,"fixedOverflowWidgets",!1)),folding:ye(new l(38,"folding",!0,{description:t.localize(215,null)})),foldingStrategy:ye(new g(39,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[t.localize(216,null),t.localize(217,null)],description:t.localize(218,null)})),foldingHighlight:ye(new l(40,"foldingHighlight",!0,{description:t.localize(219,null)})),foldingImportsByDefault:ye(new l(41,"foldingImportsByDefault",!1,{description:t.localize(220,null)})),foldingMaximumRegions:ye(new d(42,"foldingMaximumRegions",5e3,10,65e3,{description:t.localize(221,null)})),unfoldOnClickAfterEndOfLine:ye(new l(43,"unfoldOnClickAfterEndOfLine",!1,{description:t.localize(222,null)})),fontFamily:ye(new a(44,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:t.localize(223,null)})),fontInfo:ye(new B),fontLigatures2:ye(new P),fontSize:ye(new V),fontWeight:ye(new z),formatOnPaste:ye(new l(49,"formatOnPaste",!1,{description:t.localize(224,null)})),formatOnType:ye(new l(50,"formatOnType",!1,{description:t.localize(225,null)})),glyphMargin:ye(new l(51,"glyphMargin",!0,{description:t.localize(226,null)})),gotoLocation:ye(new x),hideCursorInOverviewRuler:ye(new l(53,"hideCursorInOverviewRuler",!1,{description:t.localize(227,null)})),hover:ye(new H),inDiffEditor:ye(new l(55,"inDiffEditor",!1)),letterSpacing:ye(new n(57,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,Ee=>n.clamp(Ee,-5,20),{description:t.localize(228,null)})),lightbulb:ye(new q),lineDecorationsWidth:ye(new f(59,"lineDecorationsWidth",10)),lineHeight:ye(new Q),lineNumbers:ye(new se),lineNumbersMinChars:ye(new d(62,"lineNumbersMinChars",5,1,300)),linkedEditing:ye(new l(63,"linkedEditing",!1,{description:t.localize(229,null)})),links:ye(new l(64,"links",!0,{description:t.localize(230,null)})),matchBrackets:ye(new g(65,"matchBrackets","always",["always","near","never"],{description:t.localize(231,null)})),minimap:ye(new j),mouseStyle:ye(new g(67,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ye(new n(68,"mouseWheelScrollSensitivity",1,Ee=>Ee===0?1:Ee,{markdownDescription:t.localize(232,null)})),mouseWheelZoom:ye(new l(69,"mouseWheelZoom",!1,{markdownDescription:t.localize(233,null)})),multiCursorMergeOverlapping:ye(new l(70,"multiCursorMergeOverlapping",!0,{description:t.localize(234,null)})),multiCursorModifier:ye(new h(71,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],K,{markdownEnumDescriptions:[t.localize(235,null),t.localize(236,null)],markdownDescription:t.localize(237,null)})),multiCursorPaste:ye(new g(72,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[t.localize(238,null),t.localize(239,null)],markdownDescription:t.localize(240,null)})),occurrencesHighlight:ye(new l(73,"occurrencesHighlight",!0,{description:t.localize(241,null)})),overviewRulerBorder:ye(new l(74,"overviewRulerBorder",!0,{description:t.localize(242,null)})),overviewRulerLanes:ye(new d(75,"overviewRulerLanes",3,0,3)),padding:ye(new Y),parameterHints:ye(new ee),peekWidgetDefaultFocus:ye(new g(78,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[t.localize(243,null),t.localize(244,null)],description:t.localize(245,null)})),definitionLinkOpensInPeek:ye(new l(79,"definitionLinkOpensInPeek",!1,{description:t.localize(246,null)})),quickSuggestions:ye(new re),quickSuggestionsDelay:ye(new d(81,"quickSuggestionsDelay",10,0,1073741824,{description:t.localize(247,null)})),readOnly:ye(new l(82,"readOnly",!1)),renameOnType:ye(new l(83,"renameOnType",!1,{description:t.localize(248,null),markdownDeprecationMessage:t.localize(249,null)})),renderControlCharacters:ye(new l(84,"renderControlCharacters",!0,{description:t.localize(250,null),restricted:!0})),renderFinalNewline:ye(new l(85,"renderFinalNewline",!0,{description:t.localize(251,null)})),renderLineHighlight:ye(new g(86,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",t.localize(252,null)],description:t.localize(253,null)})),renderLineHighlightOnlyWhenFocus:ye(new l(87,"renderLineHighlightOnlyWhenFocus",!1,{description:t.localize(254,null)})),renderValidationDecorations:ye(new g(88,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ye(new g(89,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",t.localize(255,null),t.localize(256,null),t.localize(257,null),""],description:t.localize(258,null)})),revealHorizontalRightPadding:ye(new d(90,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:ye(new l(91,"roundedSelection",!0,{description:t.localize(259,null)})),rulers:ye(new Z),scrollbar:ye(new ce),scrollBeyondLastColumn:ye(new d(94,"scrollBeyondLastColumn",4,0,1073741824,{description:t.localize(260,null)})),scrollBeyondLastLine:ye(new l(95,"scrollBeyondLastLine",!0,{description:t.localize(261,null)})),scrollPredominantAxis:ye(new l(96,"scrollPredominantAxis",!0,{description:t.localize(262,null)})),selectionClipboard:ye(new l(97,"selectionClipboard",!0,{description:t.localize(263,null),included:p.isLinux})),selectionHighlight:ye(new l(98,"selectionHighlight",!0,{description:t.localize(264,null)})),selectOnLineNumbers:ye(new l(99,"selectOnLineNumbers",!0)),showFoldingControls:ye(new g(100,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[t.localize(265,null),t.localize(266,null),t.localize(267,null)],description:t.localize(268,null)})),showUnused:ye(new l(101,"showUnused",!0,{description:t.localize(269,null)})),showDeprecated:ye(new l(128,"showDeprecated",!0,{description:t.localize(270,null)})),inlayHints:ye(new G),snippetSuggestions:ye(new g(102,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[t.localize(271,null),t.localize(272,null),t.localize(273,null),t.localize(274,null)],description:t.localize(275,null)})),smartSelect:ye(new ve),smoothScrolling:ye(new l(104,"smoothScrolling",!1,{description:t.localize(276,null)})),stopRenderingLineAfter:ye(new d(107,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ye(new Ie),inlineSuggest:ye(new he),suggestFontSize:ye(new d(109,"suggestFontSize",0,0,1e3,{markdownDescription:t.localize(277,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:ye(new d(110,"suggestLineHeight",0,0,1e3,{markdownDescription:t.localize(278,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:ye(new l(111,"suggestOnTriggerCharacters",!0,{description:t.localize(279,null)})),suggestSelection:ye(new g(112,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[t.localize(280,null),t.localize(281,null),t.localize(282,null)],description:t.localize(283,null)})),tabCompletion:ye(new g(113,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[t.localize(284,null),t.localize(285,null),t.localize(286,null)],description:t.localize(287,null)})),tabIndex:ye(new d(114,"tabIndex",0,-1,1073741824)),unicodeHighlight:ye(new de),unusualLineTerminators:ye(new g(116,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[t.localize(288,null),t.localize(289,null),t.localize(290,null)],description:t.localize(291,null)})),useShadowDOM:ye(new l(117,"useShadowDOM",!0)),useTabStops:ye(new l(118,"useTabStops",!0,{description:t.localize(292,null)})),wordSeparators:ye(new a(119,"wordSeparators",R.USUAL_WORD_SEPARATORS,{description:t.localize(293,null)})),wordWrap:ye(new g(120,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[t.localize(294,null),t.localize(295,null),t.localize(296,null),t.localize(297,null)],description:t.localize(298,null)})),wordWrapBreakAfterCharacters:ye(new a(121,"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(122,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:ye(new d(123,"wordWrapColumn",80,1,1073741824,{markdownDescription:t.localize(299,null)})),wordWrapOverride1:ye(new g(124,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ye(new g(125,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:ye(new M),pixelRatio:ye(new ie),tabFocusMode:ye(new be),layoutInfo:ye(new U),wrappingInfo:ye(new Ce),wrappingIndent:ye(new ue),wrappingStrategy:ye(new $)}}),define(ae[1319],le([1,0,10,121,28,235,134,50,20,324]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class S{constructor(u,i,f,c,l,s,d){this.top=u,this.left=i,this.paddingLeft=f,this.width=c,this.height=l,this.textContent=s,this.textContentClassName=d}}class C{constructor(u){this._context=u;const i=this._context.configuration.options,f=i.get(45);this._cursorStyle=i.get(24),this._lineHeight=i.get(60),this._typicalHalfwidthCharacterWidth=f.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,p.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${b.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,A.applyFontInfo)(this._domNode,f),this._domNode.setDisplay("none"),this._position=new E.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(u){const i=this._context.configuration.options,f=i.get(45);return this._cursorStyle=i.get(24),this._lineHeight=i.get(60),this._typicalHalfwidthCharacterWidth=f.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(i.get(27),this._typicalHalfwidthCharacterWidth),(0,A.applyFontInfo)(this._domNode,f),!0}onCursorPositionChanged(u){return this._position=u,!0}_getGraphemeAwarePosition(){const{lineNumber:u,column:i}=this._position,f=this._context.viewModel.getLineContent(u),[c,l]=R.getCharContainingOffset(f,i-1);return[new E.Position(u,c+1),f.substring(c,l)]}_prepareRender(u){let i="";const[f,c]=this._getGraphemeAwarePosition();if(this._cursorStyle===k.TextEditorCursorStyle.Line||this._cursorStyle===k.TextEditorCursorStyle.LineThin){const h=u.visibleRangeForPosition(f);if(!h||h.outsideRenderedLine)return null;let v;this._cursorStyle===k.TextEditorCursorStyle.Line?(v=t.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),v>2&&(i=c)):v=t.computeScreenAwareSize(1);let m=h.left,w=0;v>=2&&m>=1&&(w=1,m-=w);const D=u.getVerticalOffsetForLineNumber(f.lineNumber)-u.bigNumbersDelta;return new S(D,m,w,v,this._lineHeight,i,"")}const l=u.linesVisibleRangesForRange(new I.Range(f.lineNumber,f.column,f.lineNumber,f.column+c.length),!1);if(!l||l.length===0)return null;const s=l[0];if(s.outsideRenderedLine||s.ranges.length===0)return null;const d=s.ranges[0],n=c===" "?this._typicalHalfwidthCharacterWidth:d.width<1?this._typicalHalfwidthCharacterWidth:d.width;let a="";if(this._cursorStyle===k.TextEditorCursorStyle.Block){const h=this._context.viewModel.getViewLineData(f.lineNumber);i=c;const v=h.tokens.findTokenIndexAtOffset(f.column-1);a=h.tokens.getClassName(v)}let o=u.getVerticalOffsetForLineNumber(f.lineNumber)-u.bigNumbersDelta,g=this._lineHeight;return(this._cursorStyle===k.TextEditorCursorStyle.Underline||this._cursorStyle===k.TextEditorCursorStyle.UnderlineThin)&&(o+=this._lineHeight-2,g=2),new S(o,d.left,0,n,g,i,a)}prepareRender(u){this._renderData=this._prepareRender(u)}render(u){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${b.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.setPaddingLeft(this._renderData.paddingLeft),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(ae[282],le([1,0,14,134,491]),function(J,e,t,p,R){"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 E{static createFromValidatedSettings(S,C,r){const u=S.get(44),i=S.get(48),f=S.get(47),c=S.get(46),l=S.get(60),s=S.get(57);return E._create(u,i,f,c,l,s,C,r)}static createFromRawSettings(S,C,r=!1){const u=p.EditorOptions.fontFamily.validate(S.fontFamily),i=p.EditorOptions.fontWeight.validate(S.fontWeight),f=p.EditorOptions.fontSize.validate(S.fontSize),c=p.EditorOptions.fontLigatures2.validate(S.fontLigatures),l=p.EditorOptions.lineHeight.validate(S.lineHeight),s=p.EditorOptions.letterSpacing.validate(S.letterSpacing);return E._create(u,i,f,c,l,s,C,r)}static _create(S,C,r,u,i,f,c,l){i===0?i=A*r:i<k&&(i=i*r),i=Math.round(i),i<k&&(i=k);const s=1+(l?0:R.EditorZoom.getZoomLevel()*.1);return r*=s,i*=s,new E({pixelRatio:c,fontFamily:S,fontWeight:C,fontSize:r,fontFeatureSettings:u,lineHeight:i,letterSpacing:f})}constructor(S){this._bareFontInfoBrand=void 0,this.pixelRatio=S.pixelRatio,this.fontFamily=String(S.fontFamily),this.fontWeight=String(S.fontWeight),this.fontSize=S.fontSize,this.fontFeatureSettings=S.fontFeatureSettings,this.lineHeight=S.lineHeight|0,this.letterSpacing=S.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){const S=p.EDITOR_FONT_DEFAULTS.fontFamily,C=E._wrapInQuotes(this.fontFamily);return S&&this.fontFamily!==S?`${C}, ${S}`:C}static _wrapInQuotes(S){return/[,"']/.test(S)?S:/[+ ]/.test(S)?`"${S}"`:S}}e.BareFontInfo=E,e.SERIALIZED_FONT_INFO_VERSION=1;class I extends E{constructor(S,C){super(S),this._editorStylingBrand=void 0,this.version=e.SERIALIZED_FONT_INFO_VERSION,this.isTrusted=C,this.isMonospace=S.isMonospace,this.typicalHalfwidthCharacterWidth=S.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=S.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=S.canUseHalfwidthRightwardsArrow,this.spaceWidth=S.spaceWidth,this.middotWidth=S.middotWidth,this.wsmiddotWidth=S.wsmiddotWidth,this.maxDigitWidth=S.maxDigitWidth}equals(S){return this.fontFamily===S.fontFamily&&this.fontWeight===S.fontWeight&&this.fontSize===S.fontSize&&this.fontFeatureSettings===S.fontFeatureSettings&&this.lineHeight===S.lineHeight&&this.letterSpacing===S.letterSpacing&&this.typicalHalfwidthCharacterWidth===S.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===S.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===S.canUseHalfwidthRightwardsArrow&&this.spaceWidth===S.spaceWidth&&this.middotWidth===S.middotWidth&&this.wsmiddotWidth===S.wsmiddotWidth&&this.maxDigitWidth===S.maxDigitWidth}}e.FontInfo=I}),define(ae[422],le([1,0,86,6,2,1190,134,282]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontMeasurements=void 0;class I extends R.Disposable{constructor(){super(),this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this._cache=new b,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(window.clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearAllFontInfos(){this._cache=new b,this._onDidChange.fire()}_writeToCache(C,r){this._cache.put(C,r),!r.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=window.setTimeout(()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const C=this._cache.getValues();let r=!1;for(const u of C)u.isTrusted||(r=!0,this._cache.remove(u));r&&this._onDidChange.fire()}serializeFontInfo(){return this._cache.getValues().filter(C=>C.isTrusted)}restoreFontInfo(C){for(const r of C){if(r.version!==E.SERIALIZED_FONT_INFO_VERSION)continue;const u=new E.FontInfo(r,!1);this._writeToCache(u,u)}}readFontInfo(C){if(!this._cache.has(C)){let r=this._actualReadFontInfo(C);(r.typicalHalfwidthCharacterWidth<=2||r.typicalFullwidthCharacterWidth<=2||r.spaceWidth<=2||r.maxDigitWidth<=2)&&(r=new E.FontInfo({pixelRatio:t.PixelRatio.value,fontFamily:r.fontFamily,fontWeight:r.fontWeight,fontSize:r.fontSize,fontFeatureSettings:r.fontFeatureSettings,lineHeight:r.lineHeight,letterSpacing:r.letterSpacing,isMonospace:r.isMonospace,typicalHalfwidthCharacterWidth:Math.max(r.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(r.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:r.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(r.spaceWidth,5),middotWidth:Math.max(r.middotWidth,5),wsmiddotWidth:Math.max(r.wsmiddotWidth,5),maxDigitWidth:Math.max(r.maxDigitWidth,5)},!1)),this._writeToCache(C,r)}return this._cache.get(C)}_createRequest(C,r,u,i){const f=new A.CharWidthRequest(C,r);return u.push(f),i?.push(f),f}_actualReadFontInfo(C){const r=[],u=[],i=this._createRequest("n",0,r,u),f=this._createRequest("\uFF4D",0,r,null),c=this._createRequest(" ",0,r,u),l=this._createRequest("0",0,r,u),s=this._createRequest("1",0,r,u),d=this._createRequest("2",0,r,u),n=this._createRequest("3",0,r,u),a=this._createRequest("4",0,r,u),o=this._createRequest("5",0,r,u),g=this._createRequest("6",0,r,u),h=this._createRequest("7",0,r,u),v=this._createRequest("8",0,r,u),m=this._createRequest("9",0,r,u),w=this._createRequest("\u2192",0,r,u),D=this._createRequest("\uFFEB",0,r,null),y=this._createRequest("\xB7",0,r,u),T=this._createRequest(String.fromCharCode(11825),0,r,null),_="|/-_ilm%";for(let P=0,B=_.length;P<B;P++)this._createRequest(_.charAt(P),0,r,u),this._createRequest(_.charAt(P),1,r,u),this._createRequest(_.charAt(P),2,r,u);(0,A.readCharWidths)(C,r);const L=Math.max(l.width,s.width,d.width,n.width,a.width,o.width,g.width,h.width,v.width,m.width);let M=C.fontFeatureSettings===k.EditorFontLigatures.OFF;const O=u[0].width;for(let P=1,B=u.length;M&&P<B;P++){const V=O-u[P].width;if(V<-.001||V>.001){M=!1;break}}let N=!0;return M&&D.width!==O&&(N=!1),D.width>w.width&&(N=!1),new E.FontInfo({pixelRatio:t.PixelRatio.value,fontFamily:C.fontFamily,fontWeight:C.fontWeight,fontSize:C.fontSize,fontFeatureSettings:C.fontFeatureSettings,lineHeight:C.lineHeight,letterSpacing:C.letterSpacing,isMonospace:M,typicalHalfwidthCharacterWidth:i.width,typicalFullwidthCharacterWidth:f.width,canUseHalfwidthRightwardsArrow:N,spaceWidth:c.width,middotWidth:y.width,wsmiddotWidth:T.width,maxDigitWidth:L},!0)}}class b{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(C){const r=C.getId();return!!this._values[r]}get(C){const r=C.getId();return this._values[r]}put(C,r){const u=C.getId();this._keys[u]=C,this._values[u]=r}remove(C){const r=C.getId();delete this._keys[r],delete this._values[r]}getValues(){return Object.keys(this._keys).map(C=>this._values[C])}}e.FontMeasurements=new I}),define(ae[782],le([1,0,50,20,281,134]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class k{constructor(r,u,i,f,c){this._cachedOnlyMinimapDecorations=null,this.editorId=r,this.model=u,this.configuration=i,this._linesCollection=f,this._coordinatesConverter=c,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(r){const u=r.id;let i=this._decorationsCache[u];if(!i){const f=r.range,c=r.options;let l;if(c.isWholeLine){const s=this._coordinatesConverter.convertModelPositionToViewPosition(new t.Position(f.startLineNumber,1),0),d=this._coordinatesConverter.convertModelPositionToViewPosition(new t.Position(f.endLineNumber,this.model.getLineMaxColumn(f.endLineNumber)),1);l=new p.Range(s.lineNumber,s.column,d.lineNumber,d.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(f,1);i=new R.ViewModelDecoration(l,c),this._decorationsCache[u]=i}return i}getDecorationsViewportData(r,u=!1){let i=this._cachedModelDecorationsResolver!==null;return i=i&&r.equalsRange(this._cachedModelDecorationsResolverViewRange),i=i&&this._cachedOnlyMinimapDecorations===u,i||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(r,u),this._cachedModelDecorationsResolverViewRange=r,this._cachedOnlyMinimapDecorations=u),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(r,u=!1){const i=new p.Range(r,this._linesCollection.getViewLineMinColumn(r),r,this._linesCollection.getViewLineMaxColumn(r));return this._getDecorationsInRange(i,u).inlineDecorations[0]}_getDecorationsInRange(r,u){const i=this._linesCollection.getDecorationsInRange(r,this.editorId,(0,A.filterValidationDecorations)(this.configuration.options),u),f=r.startLineNumber,c=r.endLineNumber,l=[];let s=0;const d=[];for(let n=f;n<=c;n++)d[n-f]=[];for(let n=0,a=i.length;n<a;n++){const o=i[n],g=o.options;if(!E(this.model,o))continue;const h=this._getOrCreateViewModelDecoration(o),v=h.range;if(l[s++]=h,g.inlineClassName){const m=new R.InlineDecoration(v,g.inlineClassName,g.inlineClassNameAffectsLetterSpacing?3:0),w=Math.max(f,v.startLineNumber),D=Math.min(c,v.endLineNumber);for(let y=w;y<=D;y++)d[y-f].push(m)}if(g.beforeContentClassName&&f<=v.startLineNumber&&v.startLineNumber<=c){const m=new R.InlineDecoration(new p.Range(v.startLineNumber,v.startColumn,v.startLineNumber,v.startColumn),g.beforeContentClassName,1);d[v.startLineNumber-f].push(m)}if(g.afterContentClassName&&f<=v.endLineNumber&&v.endLineNumber<=c){const m=new R.InlineDecoration(new p.Range(v.endLineNumber,v.endColumn,v.endLineNumber,v.endColumn),g.afterContentClassName,2);d[v.endLineNumber-f].push(m)}}return{decorations:l,inlineDecorations:d}}}e.ViewModelDecorations=k;function E(C,r){return!(r.options.hideInCommentTokens&&I(C,r)||r.options.hideInStringTokens&&b(C,r))}e.isModelDecorationVisible=E;function I(C,r){return S(C,r.range,u=>u===1)}e.isModelDecorationInComment=I;function b(C,r){return S(C,r.range,u=>u===2)}e.isModelDecorationInString=b;function S(C,r,u){for(let i=r.startLineNumber;i<=r.endLineNumber;i++){const f=C.tokenization.getLineTokens(i),c=i===r.startLineNumber,l=i===r.endLineNumber;let s=c?f.findTokenIndexAtOffset(r.startColumn-1):0;for(;s<f.getCount()&&!(l&&f.getStartOffset(s)>r.endColumn-1);){if(!u(f.getStandardTokenType(s)))return!1;s++}}return!0}}),define(ae[1320],le([3,4]),function(J,e){return J.create("vs/editor/common/core/editorColorRegistry",e)}),define(ae[1321],le([3,4]),function(J,e){return J.create("vs/editor/common/editorContextKeys",e)}),define(ae[1322],le([3,4]),function(J,e){return J.create("vs/editor/common/languages/modesRegistry",e)}),define(ae[1323],le([3,4]),function(J,e){return J.create("vs/editor/common/model/editStack",e)}),define(ae[423],le([1,0,1323,21,85,9,767,56,18]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function b(c){return c.toString()}class S{static create(l,s){const d=l.getAlternativeVersionId(),n=u(l);return new S(d,d,n,n,s,s,[])}constructor(l,s,d,n,a,o,g){this.beforeVersionId=l,this.afterVersionId=s,this.beforeEOL=d,this.afterEOL=n,this.beforeCursorState=a,this.afterCursorState=o,this.changes=g}append(l,s,d,n,a){s.length>0&&(this.changes=(0,k.compressConsecutiveTextChanges)(this.changes,s)),this.afterEOL=d,this.afterVersionId=n,this.afterCursorState=a}static _writeSelectionsSize(l){return 4+4*4*(l?l.length:0)}static _writeSelections(l,s,d){if(E.writeUInt32BE(l,s?s.length:0,d),d+=4,s)for(const n of s)E.writeUInt32BE(l,n.selectionStartLineNumber,d),d+=4,E.writeUInt32BE(l,n.selectionStartColumn,d),d+=4,E.writeUInt32BE(l,n.positionLineNumber,d),d+=4,E.writeUInt32BE(l,n.positionColumn,d),d+=4;return d}static _readSelections(l,s,d){const n=E.readUInt32BE(l,s);s+=4;for(let a=0;a<n;a++){const o=E.readUInt32BE(l,s);s+=4;const g=E.readUInt32BE(l,s);s+=4;const h=E.readUInt32BE(l,s);s+=4;const v=E.readUInt32BE(l,s);s+=4,d.push(new R.Selection(o,g,h,v))}return s}serialize(){let l=10+S._writeSelectionsSize(this.beforeCursorState)+S._writeSelectionsSize(this.afterCursorState)+4;for(const n of this.changes)l+=n.writeSize();const s=new Uint8Array(l);let d=0;E.writeUInt32BE(s,this.beforeVersionId,d),d+=4,E.writeUInt32BE(s,this.afterVersionId,d),d+=4,E.writeUInt8(s,this.beforeEOL,d),d+=1,E.writeUInt8(s,this.afterEOL,d),d+=1,d=S._writeSelections(s,this.beforeCursorState,d),d=S._writeSelections(s,this.afterCursorState,d),E.writeUInt32BE(s,this.changes.length,d),d+=4;for(const n of this.changes)d=n.write(s,d);return s.buffer}static deserialize(l){const s=new Uint8Array(l);let d=0;const n=E.readUInt32BE(s,d);d+=4;const a=E.readUInt32BE(s,d);d+=4;const o=E.readUInt8(s,d);d+=1;const g=E.readUInt8(s,d);d+=1;const h=[];d=S._readSelections(s,d,h);const v=[];d=S._readSelections(s,d,v);const m=E.readUInt32BE(s,d);d+=4;const w=[];for(let D=0;D<m;D++)d=k.TextChange.read(s,d,w);return new S(n,a,o,g,h,v,w)}}e.SingleModelEditStackData=S;class C{get type(){return 0}get resource(){return A.URI.isUri(this.model)?this.model:this.model.uri}constructor(l,s,d,n){this.label=l,this.code=s,this.model=d,this._data=S.create(d,n)}toString(){return(this._data instanceof S?this._data:S.deserialize(this._data)).changes.map(s=>s.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 S}append(l,s,d,n,a){this._data instanceof S&&this._data.append(l,s,d,n,a)}close(){this._data instanceof S&&(this._data=this._data.serialize())}open(){this._data instanceof S||(this._data=S.deserialize(this._data))}undo(){if(A.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof S&&(this._data=this._data.serialize());const l=S.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 S&&(this._data=this._data.serialize());const l=S.deserialize(this._data);this.model._applyRedo(l.changes,l.afterEOL,l.afterVersionId,l.afterCursorState)}heapSize(){return this._data instanceof S&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=C;class r{get resources(){return this._editStackElementsArr.map(l=>l.resource)}constructor(l,s,d){this.label=l,this.code=s,this.type=1,this._isOpen=!0,this._editStackElementsArr=d.slice(0),this._editStackElementsMap=new Map;for(const n of this._editStackElementsArr){const a=b(n.resource);this._editStackElementsMap.set(a,n)}this._delegate=null}setDelegate(l){this._delegate=l}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}getMissingModels(){const l=[];for(const s of this._editStackElementsArr)A.URI.isUri(s.model)&&l.push(s.model);return l}matchesResource(l){const s=b(l);return this._editStackElementsMap.has(s)}setModel(l){const s=b(A.URI.isUri(l)?l:l.uri);this._editStackElementsMap.has(s)&&this._editStackElementsMap.get(s).setModel(l)}canAppend(l){if(!this._isOpen)return!1;const s=b(l.uri);return this._editStackElementsMap.has(s)?this._editStackElementsMap.get(s).canAppend(l):!1}append(l,s,d,n,a){const o=b(l.uri);this._editStackElementsMap.get(o).append(l,s,d,n,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 s=b(l);return this._editStackElementsMap.has(s)?this._editStackElementsMap.get(s).heapSize():0}split(){return this._editStackElementsArr}toString(){const l=[];for(const s of this._editStackElementsArr)l.push(`${(0,I.basename)(s.resource)}: ${s}`);return`{${l.join(", ")}}`}}e.MultiModelEditStackElement=r;function u(c){return c.getEOL()===` `?0:1}function i(c){return c?c instanceof C||c instanceof r:!1}e.isEditStackElement=i;class f{constructor(l,s){this._model=l,this._undoRedoService=s}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 s=this._undoRedoService.getLastElement(this._model.uri);if(i(s)&&s.canAppend(this._model))return s;const d=new C(t.localize(0,null),"undoredo.textBufferEdit",this._model,l);return this._undoRedoService.pushElement(d),d}pushEOL(l){const s=this._getOrCreateEditStackElement(null);this._model.setEOL(l),s.append(this._model,[],u(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(l,s,d){const n=this._getOrCreateEditStackElement(l),a=this._model.applyEdits(s,!0),o=f._computeCursorState(d,a),g=a.map((h,v)=>({index:v,textChange:h.textChange}));return g.sort((h,v)=>h.textChange.oldPosition===v.textChange.oldPosition?h.index-v.index:h.textChange.oldPosition-v.textChange.oldPosition),n.append(this._model,g.map(h=>h.textChange),u(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(l,s){try{return l?l(s):null}catch(d){return(0,p.onUnexpectedError)(d),null}}}e.EditStack=f}),define(ae[1324],le([3,4]),function(J,e){return J.create("vs/editor/common/standaloneStrings",e)}),define(ae[1325],le([1,0,1324]),function(J,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 p;(function(r){r.noSelection=t.localize(0,null),r.singleSelectionRange=t.localize(1,null),r.singleSelection=t.localize(2,null),r.multiSelectionRange=t.localize(3,null),r.multiSelection=t.localize(4,null),r.emergencyConfOn=t.localize(5,null),r.openingDocs=t.localize(6,null),r.readonlyDiffEditor=t.localize(7,null),r.editableDiffEditor=t.localize(8,null),r.readonlyEditor=t.localize(9,null),r.editableEditor=t.localize(10,null),r.changeConfigToOnMac=t.localize(11,null),r.changeConfigToOnWinLinux=t.localize(12,null),r.auto_on=t.localize(13,null),r.auto_off=t.localize(14,null),r.tabFocusModeOnMsg=t.localize(15,null),r.tabFocusModeOnMsgNoKb=t.localize(16,null),r.tabFocusModeOffMsg=t.localize(17,null),r.tabFocusModeOffMsgNoKb=t.localize(18,null),r.openDocMac=t.localize(19,null),r.openDocWinLinux=t.localize(20,null),r.outroMsg=t.localize(21,null),r.showAccessibilityHelpAction=t.localize(22,null)})(p=e.AccessibilityHelpNLS||(e.AccessibilityHelpNLS={}));var R;(function(r){r.inspectTokensAction=t.localize(23,null)})(R=e.InspectTokensNLS||(e.InspectTokensNLS={}));var A;(function(r){r.gotoLineActionLabel=t.localize(24,null)})(A=e.GoToLineNLS||(e.GoToLineNLS={}));var k;(function(r){r.helpQuickAccessActionLabel=t.localize(25,null)})(k=e.QuickHelpNLS||(e.QuickHelpNLS={}));var E;(function(r){r.quickCommandActionLabel=t.localize(26,null),r.quickCommandHelp=t.localize(27,null)})(E=e.QuickCommandNLS||(e.QuickCommandNLS={}));var I;(function(r){r.quickOutlineActionLabel=t.localize(28,null),r.quickOutlineByCategoryActionLabel=t.localize(29,null)})(I=e.QuickOutlineNLS||(e.QuickOutlineNLS={}));var b;(function(r){r.editorViewAccessibleLabel=t.localize(30,null),r.accessibilityHelpMessage=t.localize(31,null)})(b=e.StandaloneCodeEditorNLS||(e.StandaloneCodeEditorNLS={}));var S;(function(r){r.toggleHighContrast=t.localize(32,null)})(S=e.ToggleHighContrastNLS||(e.ToggleHighContrastNLS={}));var C;(function(r){r.bulkEditServiceSummary=t.localize(33,null)})(C=e.StandaloneServicesNLS||(e.StandaloneServicesNLS={}))}),define(ae[1326],le([3,4]),function(J,e){return J.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(ae[424],le([1,0,1326,28,280,421,1220]),function(J,e,t,p,R,A,k){"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.RenderWhitespace=void 0;var E;(function(T){T[T.None=0]="None",T[T.Boundary=1]="Boundary",T[T.Selection=2]="Selection",T[T.Trailing=3]="Trailing",T[T.All=4]="All"})(E=e.RenderWhitespace||(e.RenderWhitespace={}));class I{constructor(_,L){this.startOffset=_,this.endOffset=L}equals(_){return this.startOffset===_.startOffset&&this.endOffset===_.endOffset}}e.LineRange=I;class b{constructor(_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j){this.useMonospaceOptimizations=_,this.canUseHalfwidthRightwardsArrow=L,this.lineContent=M,this.continuesWithWrappedLine=O,this.isBasicASCII=N,this.containsRTL=P,this.fauxIndentLength=B,this.lineTokens=V,this.lineDecorations=z.sort(A.LineDecoration.compare),this.tabSize=x,this.startVisibleColumn=H,this.spaceWidth=W,this.stopRenderingLineAfter=q,this.renderWhitespace=X==="all"?4:X==="boundary"?1:X==="selection"?2:X==="trailing"?3:0,this.renderControlCharacters=G,this.fontLigatures=Q,this.selectionsOnLine=j&&j.sort((ee,ie)=>ee.startOffset<ie.startOffset?-1:1);const K=Math.abs($-W),Y=Math.abs(U-W);K<Y?(this.renderSpaceWidth=$,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=U,this.renderSpaceCharCode=183)}sameSelection(_){if(this.selectionsOnLine===null)return _===null;if(_===null||_.length!==this.selectionsOnLine.length)return!1;for(let L=0;L<this.selectionsOnLine.length;L++)if(!this.selectionsOnLine[L].equals(_[L]))return!1;return!0}equals(_){return this.useMonospaceOptimizations===_.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===_.canUseHalfwidthRightwardsArrow&&this.lineContent===_.lineContent&&this.continuesWithWrappedLine===_.continuesWithWrappedLine&&this.isBasicASCII===_.isBasicASCII&&this.containsRTL===_.containsRTL&&this.fauxIndentLength===_.fauxIndentLength&&this.tabSize===_.tabSize&&this.startVisibleColumn===_.startVisibleColumn&&this.spaceWidth===_.spaceWidth&&this.renderSpaceWidth===_.renderSpaceWidth&&this.renderSpaceCharCode===_.renderSpaceCharCode&&this.stopRenderingLineAfter===_.stopRenderingLineAfter&&this.renderWhitespace===_.renderWhitespace&&this.renderControlCharacters===_.renderControlCharacters&&this.fontLigatures===_.fontLigatures&&A.LineDecoration.equalsArr(this.lineDecorations,_.lineDecorations)&&this.lineTokens.equals(_.lineTokens)&&this.sameSelection(_.selectionsOnLine)}}e.RenderLineInput=b;var S;(function(T){T[T.PART_INDEX_MASK=4294901760]="PART_INDEX_MASK",T[T.CHAR_INDEX_MASK=65535]="CHAR_INDEX_MASK",T[T.CHAR_INDEX_OFFSET=0]="CHAR_INDEX_OFFSET",T[T.PART_INDEX_OFFSET=16]="PART_INDEX_OFFSET"})(S=e.CharacterMappingConstants||(e.CharacterMappingConstants={}));class C{constructor(_,L){this.partIndex=_,this.charIndex=L}}e.DomPosition=C;class r{static getPartIndex(_){return(_&4294901760)>>>16}static getCharIndex(_){return(_&65535)>>>0}constructor(_,L){this.length=_,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(_,L,M,O){const N=(L<<16|M<<0)>>>0;this._data[_-1]=N,this._horizontalOffset[_-1]=O}getHorizontalOffset(_){return this._horizontalOffset.length===0?0:this._horizontalOffset[_-1]}charOffsetToPartData(_){return this.length===0?0:_<0?this._data[0]:_>=this.length?this._data[this.length-1]:this._data[_]}getDomPosition(_){const L=this.charOffsetToPartData(_-1),M=r.getPartIndex(L),O=r.getCharIndex(L);return new C(M,O)}getColumn(_,L){return this.partDataToCharOffset(_.partIndex,L,_.charIndex)+1}partDataToCharOffset(_,L,M){if(this.length===0)return 0;const O=(_<<16|M<<0)>>>0;let N=0,P=this.length-1;for(;N+1<P;){const q=N+P>>>1,X=this._data[q];if(X===O)return q;X>O?P=q:N=q}if(N===P)return N;const B=this._data[N],V=this._data[P];if(B===O)return N;if(V===O)return P;const z=r.getPartIndex(B),x=r.getCharIndex(B),H=r.getPartIndex(V);let W;z!==H?W=L:W=r.getCharIndex(V);const U=M-x,$=W-M;return U<=$?N:P}inflate(){const _=[];for(let L=0;L<this.length;L++){const M=this._data[L],O=r.getPartIndex(M),N=r.getCharIndex(M),P=this._horizontalOffset[L];_.push([O,N,P])}return _}}e.CharacterMapping=r;var u;(function(T){T[T.None=0]="None",T[T.Before=1]="Before",T[T.After=2]="After"})(u=e.ForeignElementType||(e.ForeignElementType={}));class i{constructor(_,L,M){this._renderLineOutputBrand=void 0,this.characterMapping=_,this.containsRTL=L,this.containsForeignElements=M}}e.RenderLineOutput=i;function f(T,_){if(T.lineContent.length===0){if(T.lineDecorations.length>0){_.appendString("<span>");let L=0,M=0,O=0;for(const P of T.lineDecorations)(P.type===1||P.type===2)&&(_.appendString('<span class="'),_.appendString(P.className),_.appendString('"></span>'),P.type===1&&(O|=1,L++),P.type===2&&(O|=2,M++));_.appendString("</span>");const N=new r(1,L+M);return N.setColumnInfo(1,L,0,0),new i(N,!1,O)}return _.appendString("<span><span></span></span>"),new i(new r(0,0),!1,0)}return w(d(T),_)}e.renderViewLine=f;class c{constructor(_,L,M,O){this.characterMapping=_,this.html=L,this.containsRTL=M,this.containsForeignElements=O}}e.RenderLineOutput2=c;function l(T){const _=new R.StringBuilder(1e4),L=f(T,_);return new c(L.characterMapping,_.build(),L.containsRTL,L.containsForeignElements)}e.renderViewLine2=l;class s{constructor(_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X){this.fontIsMonospace=_,this.canUseHalfwidthRightwardsArrow=L,this.lineContent=M,this.len=O,this.isOverflowing=N,this.overflowingCharCount=P,this.parts=B,this.containsForeignElements=V,this.fauxIndentLength=z,this.tabSize=x,this.startVisibleColumn=H,this.containsRTL=W,this.spaceWidth=U,this.renderSpaceCharCode=$,this.renderWhitespace=q,this.renderControlCharacters=X}}function d(T){const _=T.lineContent;let L,M,O;T.stopRenderingLineAfter!==-1&&T.stopRenderingLineAfter<_.length?(L=!0,M=_.length-T.stopRenderingLineAfter,O=T.stopRenderingLineAfter):(L=!1,M=0,O=_.length);let N=n(_,T.containsRTL,T.lineTokens,T.fauxIndentLength,O);T.renderControlCharacters&&!T.isBasicASCII&&(N=h(_,N)),(T.renderWhitespace===4||T.renderWhitespace===1||T.renderWhitespace===2&&!!T.selectionsOnLine||T.renderWhitespace===3)&&(N=v(T,_,O,N));let P=0;if(T.lineDecorations.length>0){for(let B=0,V=T.lineDecorations.length;B<V;B++){const z=T.lineDecorations[B];z.type===3||z.type===1?P|=1:z.type===2&&(P|=2)}N=m(_,O,N,T.lineDecorations)}return T.containsRTL||(N=o(_,N,!T.isBasicASCII||T.fontLigatures)),new s(T.useMonospaceOptimizations,T.canUseHalfwidthRightwardsArrow,_,O,L,M,N,P,T.fauxIndentLength,T.tabSize,T.startVisibleColumn,T.containsRTL,T.spaceWidth,T.renderSpaceCharCode,T.renderWhitespace,T.renderControlCharacters)}function n(T,_,L,M,O){const N=[];let P=0;M>0&&(N[P++]=new k.LinePart(M,"",0,!1));let B=M;for(let V=0,z=L.getCount();V<z;V++){const x=L.getEndOffset(V);if(x<=M)continue;const H=L.getClassName(V);if(x>=O){const U=_?p.containsRTL(T.substring(B,O)):!1;N[P++]=new k.LinePart(O,H,0,U);break}const W=_?p.containsRTL(T.substring(B,x)):!1;N[P++]=new k.LinePart(x,H,0,W),B=x}return N}var a;(function(T){T[T.LongToken=50]="LongToken"})(a||(a={}));function o(T,_,L){let M=0;const O=[];let N=0;if(L)for(let P=0,B=_.length;P<B;P++){const V=_[P],z=V.endIndex;if(M+50<z){const x=V.type,H=V.metadata,W=V.containsRTL;let U=-1,$=M;for(let q=M;q<z;q++)T.charCodeAt(q)===32&&(U=q),U!==-1&&q-$>=50&&(O[N++]=new k.LinePart(U+1,x,H,W),$=U+1,U=-1);$!==z&&(O[N++]=new k.LinePart(z,x,H,W))}else O[N++]=V;M=z}else for(let P=0,B=_.length;P<B;P++){const V=_[P],z=V.endIndex,x=z-M;if(x>50){const H=V.type,W=V.metadata,U=V.containsRTL,$=Math.ceil(x/50);for(let q=1;q<$;q++){const X=M+q*50;O[N++]=new k.LinePart(X,H,W,U)}O[N++]=new k.LinePart(z,H,W,U)}else O[N++]=V;M=z}return O}function g(T){return T<32?T!==9:T===127||T>=8234&&T<=8238||T>=8294&&T<=8297||T>=8206&&T<=8207||T===1564}function h(T,_){const L=[];let M=new k.LinePart(0,"",0,!1),O=0;for(const N of _){const P=N.endIndex;for(;O<P;O++){const B=T.charCodeAt(O);g(B)&&(O>M.endIndex&&(M=new k.LinePart(O,N.type,N.metadata,N.containsRTL),L.push(M)),M=new k.LinePart(O+1,"mtkcontrol",N.metadata,!1),L.push(M))}O>M.endIndex&&(M=new k.LinePart(P,N.type,N.metadata,N.containsRTL),L.push(M))}return L}function v(T,_,L,M){const O=T.continuesWithWrappedLine,N=T.fauxIndentLength,P=T.tabSize,B=T.startVisibleColumn,V=T.useMonospaceOptimizations,z=T.selectionsOnLine,x=T.renderWhitespace===1,H=T.renderWhitespace===3,W=T.renderSpaceWidth!==T.spaceWidth,U=[];let $=0,q=0,X=M[q].type,G=M[q].containsRTL,Q=M[q].endIndex;const j=M.length;let K=!1,Y=p.firstNonWhitespaceIndex(_),ee;Y===-1?(K=!0,Y=L,ee=L):ee=p.lastNonWhitespaceIndex(_);let ie=!1,re=0,oe=z&&z[re],se=B%P;for(let Z=N;Z<L;Z++){const ne=_.charCodeAt(Z);oe&&Z>=oe.endOffset&&(re++,oe=z&&z[re]);let ce;if(Z<Y||Z>ee)ce=!0;else if(ne===9)ce=!0;else if(ne===32)if(x)if(ie)ce=!0;else{const de=Z+1<L?_.charCodeAt(Z+1):0;ce=de===32||de===9}else ce=!0;else ce=!1;if(ce&&z&&(ce=!!oe&&oe.startOffset<=Z&&oe.endOffset>Z),ce&&H&&(ce=K||Z>ee),ce&&G&&Z>=Y&&Z<=ee&&(ce=!1),ie){if(!ce||!V&&se>=P){if(W){const de=$>0?U[$-1].endIndex:N;for(let he=de+1;he<=Z;he++)U[$++]=new k.LinePart(he,"mtkw",1,!1)}else U[$++]=new k.LinePart(Z,"mtkw",1,!1);se=se%P}}else(Z===Q||ce&&Z>N)&&(U[$++]=new k.LinePart(Z,X,0,G),se=se%P);for(ne===9?se=P:p.isFullWidthCharacter(ne)?se+=2:se++,ie=ce;Z===Q&&(q++,q<j);)X=M[q].type,G=M[q].containsRTL,Q=M[q].endIndex}let te=!1;if(ie)if(O&&x){const Z=L>0?_.charCodeAt(L-1):0,ne=L>1?_.charCodeAt(L-2):0;Z===32&&ne!==32&&ne!==9||(te=!0)}else te=!0;if(te)if(W){const Z=$>0?U[$-1].endIndex:N;for(let ne=Z+1;ne<=L;ne++)U[$++]=new k.LinePart(ne,"mtkw",1,!1)}else U[$++]=new k.LinePart(L,"mtkw",1,!1);else U[$++]=new k.LinePart(L,X,0,G);return U}function m(T,_,L,M){M.sort(A.LineDecoration.compare);const O=A.LineDecorationsNormalizer.normalize(T,M),N=O.length;let P=0;const B=[];let V=0,z=0;for(let H=0,W=L.length;H<W;H++){const U=L[H],$=U.endIndex,q=U.type,X=U.metadata,G=U.containsRTL;for(;P<N&&O[P].startOffset<$;){const Q=O[P];if(Q.startOffset>z&&(z=Q.startOffset,B[V++]=new k.LinePart(z,q,X,G)),Q.endOffset+1<=$)z=Q.endOffset+1,B[V++]=new k.LinePart(z,q+" "+Q.className,X|Q.metadata,G),P++;else{z=$,B[V++]=new k.LinePart(z,q+" "+Q.className,X|Q.metadata,G);break}}$>z&&(z=$,B[V++]=new k.LinePart(z,q,X,G))}const x=L[L.length-1].endIndex;if(P<N&&O[P].startOffset===x)for(;P<N&&O[P].startOffset===x;){const H=O[P];B[V++]=new k.LinePart(z,H.className,H.metadata,!1),P++}return B}function w(T,_){const L=T.fontIsMonospace,M=T.canUseHalfwidthRightwardsArrow,O=T.containsForeignElements,N=T.lineContent,P=T.len,B=T.isOverflowing,V=T.overflowingCharCount,z=T.parts,x=T.fauxIndentLength,H=T.tabSize,W=T.startVisibleColumn,U=T.containsRTL,$=T.spaceWidth,q=T.renderSpaceCharCode,X=T.renderWhitespace,G=T.renderControlCharacters,Q=new r(P+1,z.length);let j=!1,K=0,Y=W,ee=0,ie=0,re=0;U?_.appendString('<span dir="ltr">'):_.appendString("<span>");for(let oe=0,se=z.length;oe<se;oe++){const te=z[oe],Z=te.endIndex,ne=te.type,ce=te.containsRTL,de=X!==0&&te.isWhitespace(),he=de&&!L&&(ne==="mtkw"||!O),pe=K===Z&&te.isPseudoAfter();if(ee=0,_.appendString("<span "),ce&&_.appendString('style="unicode-bidi:isolate" '),_.appendString('class="'),_.appendString(he?"mtkz":ne),_.appendASCIICharCode(34),de){let me=0;{let Se=K,Ie=Y;for(;Se<Z;Se++){const be=(N.charCodeAt(Se)===9?H-Ie%H:1)|0;me+=be,Se>=x&&(Ie+=be)}}for(he&&(_.appendString(' style="width:'),_.appendString(String($*me)),_.appendString('px"')),_.appendASCIICharCode(62);K<Z;K++){Q.setColumnInfo(K+1,oe-re,ee,ie),re=0;const Se=N.charCodeAt(K);let Ie,ve;if(Se===9){Ie=H-Y%H|0,ve=Ie,!M||ve>1?_.appendCharCode(8594):_.appendCharCode(65515);for(let be=2;be<=ve;be++)_.appendCharCode(160)}else Ie=2,ve=1,_.appendCharCode(q),_.appendCharCode(8204);ee+=Ie,ie+=ve,K>=x&&(Y+=ve)}}else for(_.appendASCIICharCode(62);K<Z;K++){Q.setColumnInfo(K+1,oe-re,ee,ie),re=0;const me=N.charCodeAt(K);let Se=1,Ie=1;switch(me){case 9:Se=H-Y%H,Ie=Se;for(let ve=1;ve<=Se;ve++)_.appendCharCode(160);break;case 32:_.appendCharCode(160);break;case 60:_.appendString("<");break;case 62:_.appendString(">");break;case 38:_.appendString("&");break;case 0:G?_.appendCharCode(9216):_.appendString("�");break;case 65279:case 8232:case 8233:case 133:_.appendCharCode(65533);break;default:p.isFullWidthCharacter(me)&&Ie++,G&&me<32?_.appendCharCode(9216+me):G&&me===127?_.appendCharCode(9249):G&&g(me)?(_.appendString("[U+"),_.appendString(D(me)),_.appendString("]"),Se=8,Ie=Se):_.appendCharCode(me)}ee+=Se,ie+=Ie,K>=x&&(Y+=Ie)}pe?re++:re=0,K>=P&&!j&&te.isPseudoAfter()&&(j=!0,Q.setColumnInfo(K+1,oe,ee,ie)),_.appendString("</span>")}return j||Q.setColumnInfo(P+1,z.length-1,ee,ie),B&&(_.appendString('<span class="mtkoverflow">'),_.appendString(t.localize(0,null,y(V))),_.appendString("</span>")),_.appendString("</span>"),new i(Q,U,O)}function D(T){return T.toString(16).toUpperCase().padStart(4,"0")}function y(T){return T<1024?t.localize(1,null,T):T<1024*1024?`${(T/1024).toFixed(1)} KB`:`${(T/1024/1024).toFixed(1)} MB`}}),define(ae[1327],le([3,4]),function(J,e){return J.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(ae[1328],le([3,4]),function(J,e){return J.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(ae[1329],le([3,4]),function(J,e){return J.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(ae[1330],le([3,4]),function(J,e){return J.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(ae[1331],le([3,4]),function(J,e){return J.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(ae[1332],le([3,4]),function(J,e){return J.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(ae[1333],le([3,4]),function(J,e){return J.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(ae[1334],le([3,4]),function(J,e){return J.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(ae[1335],le([3,4]),function(J,e){return J.create("vs/editor/contrib/codeAction/browser/codeActionWidget",e)}),define(ae[1336],le([3,4]),function(J,e){return J.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(ae[1337],le([3,4]),function(J,e){return J.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(ae[1338],le([3,4]),function(J,e){return J.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(ae[1339],le([3,4]),function(J,e){return J.create("vs/editor/contrib/comment/browser/comment",e)}),define(ae[1340],le([3,4]),function(J,e){return J.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(ae[1341],le([3,4]),function(J,e){return J.create("vs/editor/contrib/copyPaste/browser/copyPasteContribution",e)}),define(ae[1342],le([3,4]),function(J,e){return J.create("vs/editor/contrib/copyPaste/browser/copyPasteController",e)}),define(ae[1343],le([3,4]),function(J,e){return J.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(ae[1344],le([3,4]),function(J,e){return J.create("vs/editor/contrib/dropIntoEditor/browser/dropIntoEditorContribution",e)}),define(ae[1345],le([3,4]),function(J,e){return J.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(ae[1346],le([3,4]),function(J,e){return J.create("vs/editor/contrib/find/browser/findController",e)}),define(ae[1347],le([3,4]),function(J,e){return J.create("vs/editor/contrib/find/browser/findWidget",e)}),define(ae[1348],le([3,4]),function(J,e){return J.create("vs/editor/contrib/folding/browser/folding",e)}),define(ae[1349],le([3,4]),function(J,e){return J.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(ae[1350],le([3,4]),function(J,e){return J.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(ae[1351],le([3,4]),function(J,e){return J.create("vs/editor/contrib/format/browser/format",e)}),define(ae[1352],le([3,4]),function(J,e){return J.create("vs/editor/contrib/format/browser/formatActions",e)}),define(ae[1353],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(ae[1354],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(ae[1355],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(ae[1356],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(ae[1357],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(ae[1358],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(ae[1359],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(ae[1360],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(ae[425],le([1,0,21,6,356,2,60,18,28,20,1360]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class C{constructor(c,l,s,d){this.isProviderFirst=c,this.parent=l,this.link=s,this._rangeCallback=d,this.id=R.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){return this._range??this.link.targetSelectionRange??this.link.range}set range(c){this._range=c,this._rangeCallback(this)}get ariaMessage(){const c=this.parent.getPreview(this)?.preview(this.range);return c?(0,S.localize)(1,null,(0,E.basename)(this.uri),this.range.startLineNumber,this.range.startColumn,c.value):(0,S.localize)(0,null,(0,E.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=C;class r{constructor(c){this._modelReference=c}dispose(){this._modelReference.dispose()}preview(c,l=8){const s=this._modelReference.object.textEditorModel;if(!s)return;const{startLineNumber:d,startColumn:n,endLineNumber:a,endColumn:o}=c,g=s.getWordUntilPosition({lineNumber:d,column:n-l}),h=new b.Range(d,g.startColumn,d,n),v=new b.Range(a,o,a,1073741824),m=s.getValueInRange(h).replace(/^\s+/,""),w=s.getValueInRange(c),D=s.getValueInRange(v).replace(/\s+$/,"");return{value:m+w+D,highlight:{start:m.length,end:m.length+w.length}}}}e.FilePreview=r;class u{constructor(c,l){this.parent=c,this.uri=l,this.children=[],this._previews=new k.ResourceMap}dispose(){(0,A.dispose)(this._previews.values()),this._previews.clear()}getPreview(c){return this._previews.get(c.uri)}get ariaMessage(){const c=this.children.length;return c===1?(0,S.localize)(2,null,(0,E.basename)(this.uri),this.uri.fsPath):(0,S.localize)(3,null,c,(0,E.basename)(this.uri),this.uri.fsPath)}async resolve(c){if(this._previews.size!==0)return this;for(const l of this.children)if(!this._previews.has(l.uri))try{const s=await c.createModelReference(l.uri);this._previews.set(l.uri,new r(s))}catch(s){(0,t.onUnexpectedError)(s)}return this}}e.FileReferences=u;class i{constructor(c,l){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new p.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=c,this._title=l;const[s]=c;c.sort(i._compareReferences);let d;for(const n of c)if((!d||!E.extUri.isEqual(d.uri,n.uri,!0))&&(d=new u(this,n.uri),this.groups.push(d)),d.children.length===0||i._compareReferences(n,d.children[d.children.length-1])!==0){const a=new C(s===n,d,n,o=>this._onDidChangeReferenceRange.fire(o));this.references.push(a),d.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,S.localize)(4,null):this.references.length===1?(0,S.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,S.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,S.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(c,l){const{parent:s}=c;let d=s.children.indexOf(c);const n=s.children.length,a=s.parent.groups.length;return a===1||l&&d+1<n||!l&&d>0?(l?d=(d+1)%n:d=(d+n-1)%n,s.children[d]):(d=s.parent.groups.indexOf(s),l?(d=(d+1)%a,s.parent.groups[d].children[0]):(d=(d+a-1)%a,s.parent.groups[d].children[s.parent.groups[d].children.length-1]))}nearestReference(c,l){const s=this.references.map((d,n)=>({idx:n,prefixLen:I.commonPrefixLength(d.uri.toString(),c.toString()),offsetDist:Math.abs(d.range.startLineNumber-l.lineNumber)*100+Math.abs(d.range.startColumn-l.column)})).sort((d,n)=>d.prefixLen>n.prefixLen?-1:d.prefixLen<n.prefixLen?1:d.offsetDist<n.offsetDist?-1:d.offsetDist>n.offsetDist?1:0)[0];if(s)return this.references[s.idx]}referenceAt(c,l){for(const s of this.references)if(s.uri.toString()===c.toString()&&b.Range.containsPosition(s.range,l))return s}firstReference(){for(const c of this.references)if(c.isProviderFirst)return c;return this.references[0]}static _compareReferences(c,l){return E.extUri.compare(c.uri,l.uri)||b.Range.compareRangesUsingStarts(c.range,l.range)}}e.ReferencesModel=i}),define(ae[1361],le([3,4]),function(J,e){return J.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(ae[1362],le([3,4]),function(J,e){return J.create("vs/editor/contrib/hover/browser/hover",e)}),define(ae[1363],le([3,4]),function(J,e){return J.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(ae[1364],le([3,4]),function(J,e){return J.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(ae[1365],le([3,4]),function(J,e){return J.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(ae[1366],le([3,4]),function(J,e){return J.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(ae[1367],le([3,4]),function(J,e){return J.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(ae[1368],le([3,4]),function(J,e){return J.create("vs/editor/contrib/inlineCompletions/browser/ghostTextController",e)}),define(ae[1369],le([3,4]),function(J,e){return J.create("vs/editor/contrib/inlineCompletions/browser/ghostTextHoverParticipant",e)}),define(ae[1370],le([3,4]),function(J,e){return J.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(ae[1371],le([3,4]),function(J,e){return J.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(ae[1372],le([3,4]),function(J,e){return J.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(ae[1373],le([3,4]),function(J,e){return J.create("vs/editor/contrib/links/browser/links",e)}),define(ae[1374],le([3,4]),function(J,e){return J.create("vs/editor/contrib/message/browser/messageController",e)}),define(ae[1375],le([3,4]),function(J,e){return J.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(ae[1376],le([3,4]),function(J,e){return J.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(ae[1377],le([3,4]),function(J,e){return J.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(ae[1378],le([3,4]),function(J,e){return J.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(ae[1379],le([3,4]),function(J,e){return J.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(ae[1380],le([3,4]),function(J,e){return J.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(ae[1381],le([3,4]),function(J,e){return J.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(ae[1382],le([3,4]),function(J,e){return J.create("vs/editor/contrib/rename/browser/rename",e)}),define(ae[1383],le([3,4]),function(J,e){return J.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(ae[1384],le([3,4]),function(J,e){return J.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(ae[1385],le([3,4]),function(J,e){return J.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(ae[1386],le([3,4]),function(J,e){return J.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(ae[1387],le([3,4]),function(J,e){return J.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(ae[1388],le([3,4]),function(J,e){return J.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(ae[1389],le([3,4]),function(J,e){return J.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(ae[1390],le([3,4]),function(J,e){return J.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(ae[1391],le([3,4]),function(J,e){return J.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(ae[1392],le([3,4]),function(J,e){return J.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(ae[1393],le([3,4]),function(J,e){return J.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(ae[1394],le([3,4]),function(J,e){return J.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(ae[1395],le([3,4]),function(J,e){return J.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(ae[1396],le([3,4]),function(J,e){return J.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(ae[1397],le([3,4]),function(J,e){return J.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(ae[1398],le([3,4]),function(J,e){return J.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(ae[1399],le([3,4]),function(J,e){return J.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(ae[1400],le([3,4]),function(J,e){return J.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(ae[1401],le([3,4]),function(J,e){return J.create("vs/platform/action/common/actionCommonCategories",e)}),define(ae[1402],le([3,4]),function(J,e){return J.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(ae[1403],le([3,4]),function(J,e){return J.create("vs/platform/actions/browser/toolbar",e)}),define(ae[1404],le([3,4]),function(J,e){return J.create("vs/platform/actions/common/menuResetAction",e)}),define(ae[1405],le([3,4]),function(J,e){return J.create("vs/platform/actions/common/menuService",e)}),define(ae[1406],le([3,4]),function(J,e){return J.create("vs/platform/configuration/common/configurationRegistry",e)}),define(ae[1407],le([3,4]),function(J,e){return J.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(ae[1408],le([3,4]),function(J,e){return J.create("vs/platform/contextkey/common/contextkeys",e)}),define(ae[1409],le([3,4]),function(J,e){return J.create("vs/platform/dialogs/common/dialogs",e)}),define(ae[1410],le([3,4]),function(J,e){return J.create("vs/platform/dnd/browser/dnd",e)}),define(ae[1411],le([3,4]),function(J,e){return J.create("vs/platform/extensionManagement/common/extensionManagement",e)}),define(ae[1412],le([3,4]),function(J,e){return J.create("vs/platform/extensionManagement/common/extensionManagementCLI",e)}),define(ae[1413],le([3,4]),function(J,e){return J.create("vs/platform/extensionManagement/common/extensionNls",e)}),define(ae[1414],le([3,4]),function(J,e){return J.create("vs/platform/extensionManagement/common/extensionsScannerService",e)}),define(ae[1415],le([3,4]),function(J,e){return J.create("vs/platform/extensions/common/extensionValidator",e)}),define(ae[1416],le([3,4]),function(J,e){return J.create("vs/platform/files/browser/htmlFileSystemProvider",e)}),define(ae[1417],le([3,4]),function(J,e){return J.create("vs/platform/files/common/fileService",e)}),define(ae[1418],le([3,4]),function(J,e){return J.create("vs/platform/files/common/files",e)}),define(ae[1419],le([3,4]),function(J,e){return J.create("vs/platform/files/common/io",e)}),define(ae[1420],le([3,4]),function(J,e){return J.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(ae[1421],le([3,4]),function(J,e){return J.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(ae[1422],le([3,4]),function(J,e){return J.create("vs/platform/languagePacks/common/languagePacks",e)}),define(ae[1423],le([3,4]),function(J,e){return J.create("vs/platform/languagePacks/common/localizedStrings",e)}),define(ae[1424],le([3,4]),function(J,e){return J.create("vs/platform/list/browser/listService",e)}),define(ae[1425],le([3,4]),function(J,e){return J.create("vs/platform/markers/common/markers",e)}),define(ae[1426],le([3,4]),function(J,e){return J.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(ae[1427],le([3,4]),function(J,e){return J.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(ae[1428],le([3,4]),function(J,e){return J.create("vs/platform/quickinput/browser/quickPickPin",e)}),define(ae[1429],le([3,4]),function(J,e){return J.create("vs/platform/request/common/request",e)}),define(ae[1430],le([3,4]),function(J,e){return J.create("vs/platform/telemetry/common/telemetryService",e)}),define(ae[1431],le([3,4]),function(J,e){return J.create("vs/platform/terminal/common/terminalPlatformConfiguration",e)}),define(ae[1432],le([3,4]),function(J,e){return J.create("vs/platform/terminal/common/terminalProfiles",e)}),define(ae[1433],le([3,4]),function(J,e){return J.create("vs/platform/theme/common/colorRegistry",e)}),define(ae[1434],le([3,4]),function(J,e){return J.create("vs/platform/theme/common/iconRegistry",e)}),define(ae[1435],le([3,4]),function(J,e){return J.create("vs/platform/theme/common/tokenClassificationRegistry",e)}),define(ae[1436],le([3,4]),function(J,e){return J.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(ae[1437],le([3,4]),function(J,e){return J.create("vs/platform/update/common/update.config.contribution",e)}),define(ae[1438],le([3,4]),function(J,e){return J.create("vs/platform/userDataProfile/common/userDataProfile",e)}),define(ae[1439],le([3,4]),function(J,e){return J.create("vs/platform/userDataSync/common/abstractSynchronizer",e)}),define(ae[1440],le([3,4]),function(J,e){return J.create("vs/platform/userDataSync/common/keybindingsSync",e)}),define(ae[1441],le([3,4]),function(J,e){return J.create("vs/platform/userDataSync/common/settingsSync",e)}),define(ae[1442],le([3,4]),function(J,e){return J.create("vs/platform/userDataSync/common/userDataSync",e)}),define(ae[1443],le([3,4]),function(J,e){return J.create("vs/platform/userDataSync/common/userDataSyncMachines",e)}),define(ae[1444],le([3,4]),function(J,e){return J.create("vs/platform/workspace/common/workspace",e)}),define(ae[1445],le([3,4]),function(J,e){return J.create("vs/platform/workspace/common/workspaceTrust",e)}),define(ae[1446],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadAuthentication",e)}),define(ae[1447],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadCLICommands",e)}),define(ae[1448],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadComments",e)}),define(ae[1449],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadCustomEditors",e)}),define(ae[1450],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadExtensionService",e)}),define(ae[1451],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadFileSystemEventService",e)}),define(ae[1452],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadMessageService",e)}),define(ae[1453],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadProgress",e)}),define(ae[1454],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadSaveParticipant",e)}),define(ae[1455],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadTask",e)}),define(ae[1456],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadTunnelService",e)}),define(ae[1457],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadUriOpeners",e)}),define(ae[1458],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadWebviews",e)}),define(ae[1459],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/mainThreadWorkspace",e)}),define(ae[1460],le([3,4]),function(J,e){return J.create("vs/workbench/api/browser/viewsExtensionPoint",e)}),define(ae[1461],le([3,4]),function(J,e){return J.create("vs/workbench/api/common/configurationExtensionPoint",e)}),define(ae[1462],le([3,4]),function(J,e){return J.create("vs/workbench/api/common/jsonValidationExtensionPoint",e)}),define(ae[1463],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/developerActions",e)}),define(ae[1464],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/helpActions",e)}),define(ae[1465],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/layoutActions",e)}),define(ae[1466],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/navigationActions",e)}),define(ae[1467],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/quickAccessActions",e)}),define(ae[1468],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/textInputActions",e)}),define(ae[1469],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/windowActions",e)}),define(ae[1470],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/workspaceActions",e)}),define(ae[1471],le([3,4]),function(J,e){return J.create("vs/workbench/browser/actions/workspaceCommands",e)}),define(ae[1472],le([3,4]),function(J,e){return J.create("vs/workbench/browser/editor",e)}),define(ae[1473],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/activitybar/activitybarActions",e)}),define(ae[1474],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/activitybar/activitybarPart",e)}),define(ae[1475],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/auxiliarybar/auxiliaryBarActions",e)}),define(ae[1476],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/auxiliarybar/auxiliaryBarPart",e)}),define(ae[1477],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/banner/bannerPart",e)}),define(ae[1478],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/compositeBar",e)}),define(ae[1479],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/compositeBarActions",e)}),define(ae[1480],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/compositePart",e)}),define(ae[1481],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/dialogs/dialogHandler",e)}),define(ae[1482],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/binaryDiffEditor",e)}),define(ae[1483],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/binaryEditor",e)}),define(ae[1484],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/breadcrumbs",e)}),define(ae[1485],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/breadcrumbsControl",e)}),define(ae[1486],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/breadcrumbsPicker",e)}),define(ae[1487],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editor.contribution",e)}),define(ae[1488],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorActions",e)}),define(ae[1489],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorCommands",e)}),define(ae[1490],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorConfiguration",e)}),define(ae[1491],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorDropTarget",e)}),define(ae[1492],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorGroupView",e)}),define(ae[1493],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorPanes",e)}),define(ae[1494],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorPlaceholder",e)}),define(ae[1495],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorQuickAccess",e)}),define(ae[1496],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/editorStatus",e)}),define(ae[1497],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/sideBySideEditor",e)}),define(ae[1498],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/tabsTitleControl",e)}),define(ae[1499],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/textCodeEditor",e)}),define(ae[1500],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/textDiffEditor",e)}),define(ae[1501],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/textEditor",e)}),define(ae[1502],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/editor/titleControl",e)}),define(ae[1503],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsActions",e)}),define(ae[1504],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsAlerts",e)}),define(ae[1505],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsCenter",e)}),define(ae[1506],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsCommands",e)}),define(ae[1507],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsList",e)}),define(ae[1508],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsStatus",e)}),define(ae[1509],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsToasts",e)}),define(ae[1510],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/notifications/notificationsViewer",e)}),define(ae[1511],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/panel/panelActions",e)}),define(ae[1512],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/panel/panelPart",e)}),define(ae[1513],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/sidebar/sidebarActions",e)}),define(ae[1514],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/statusbar/statusbarActions",e)}),define(ae[1515],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/statusbar/statusbarModel",e)}),define(ae[1516],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/statusbar/statusbarPart",e)}),define(ae[1517],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/titlebar/commandCenterControl",e)}),define(ae[1518],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/titlebar/menubarControl",e)}),define(ae[1519],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/titlebar/titlebarPart",e)}),define(ae[1520],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/titlebar/windowTitle",e)}),define(ae[1521],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/views/checkbox",e)}),define(ae[1522],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/views/treeView",e)}),define(ae[1523],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/views/viewFilter",e)}),define(ae[1524],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/views/viewPane",e)}),define(ae[1525],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/views/viewPaneContainer",e)}),define(ae[1526],le([3,4]),function(J,e){return J.create("vs/workbench/browser/parts/views/viewsService",e)}),define(ae[1527],le([3,4]),function(J,e){return J.create("vs/workbench/browser/quickaccess",e)}),define(ae[1528],le([3,4]),function(J,e){return J.create("vs/workbench/browser/workbench",e)}),define(ae[1529],le([3,4]),function(J,e){return J.create("vs/workbench/browser/workbench.contribution",e)}),define(ae[1530],le([3,4]),function(J,e){return J.create("vs/workbench/common/configuration",e)}),define(ae[1531],le([3,4]),function(J,e){return J.create("vs/workbench/common/contextkeys",e)}),define(ae[1532],le([3,4]),function(J,e){return J.create("vs/workbench/common/editor",e)}),define(ae[1533],le([3,4]),function(J,e){return J.create("vs/workbench/common/editor/diffEditorInput",e)}),define(ae[1534],le([3,4]),function(J,e){return J.create("vs/workbench/common/editor/sideBySideEditorInput",e)}),define(ae[1535],le([3,4]),function(J,e){return J.create("vs/workbench/common/editor/textEditorModel",e)}),define(ae[1536],le([3,4]),function(J,e){return J.create("vs/workbench/common/theme",e)}),define(ae[1537],le([3,4]),function(J,e){return J.create("vs/workbench/common/views",e)}),define(ae[1538],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/audioCues/browser/audioCueService",e)}),define(ae[1539],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/audioCues/browser/audioCues.contribution",e)}),define(ae[1540],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/audioCues/browser/commands",e)}),define(ae[1541],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/bulkEdit/browser/bulkEditService",e)}),define(ae[1542],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEdit.contribution",e)}),define(ae[1543],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPane",e)}),define(ae[1544],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditPreview",e)}),define(ae[1545],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/bulkEdit/browser/preview/bulkEditTree",e)}),define(ae[1546],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution",e)}),define(ae[1547],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek",e)}),define(ae[1548],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/callHierarchy/browser/callHierarchyTree",e)}),define(ae[1549],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeActions/browser/codeActionsContribution",e)}),define(ae[1550],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeActions/common/codeActionsExtensionPoint",e)}),define(ae[1551],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeActions/common/documentationExtensionPoint",e)}),define(ae[1552],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/accessibility/accessibility",e)}),define(ae[1553],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/diffEditorHelper",e)}),define(ae[1554],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget",e)}),define(ae[1555],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/inspectEditorTokens/inspectEditorTokens",e)}),define(ae[1556],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/inspectKeybindings",e)}),define(ae[1557],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/languageConfigurationExtensionPoint",e)}),define(ae[1558],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/largeFileOptimizations",e)}),define(ae[1559],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline",e)}),define(ae[1560],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree",e)}),define(ae[1561],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoLineQuickAccess",e)}),define(ae[1562],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/quickaccess/gotoSymbolQuickAccess",e)}),define(ae[1563],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/saveParticipants",e)}),define(ae[1564],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/toggleColumnSelection",e)}),define(ae[1565],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/toggleMinimap",e)}),define(ae[1566],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/toggleMultiCursorModifier",e)}),define(ae[1567],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/toggleRenderControlCharacter",e)}),define(ae[1568],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/toggleRenderWhitespace",e)}),define(ae[1569],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/toggleWordWrap",e)}),define(ae[1570],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/browser/untitledTextEditorHint",e)}),define(ae[1571],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/electron-sandbox/selectionClipboard",e)}),define(ae[1572],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/codeEditor/electron-sandbox/startDebugTextMate",e)}),define(ae[1573],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentColors",e)}),define(ae[1574],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentGlyphWidget",e)}),define(ae[1575],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentNode",e)}),define(ae[1576],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentReply",e)}),define(ae[1577],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentThreadBody",e)}),define(ae[1578],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentThreadHeader",e)}),define(ae[1579],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/comments.contribution",e)}),define(ae[1580],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentsEditorContribution",e)}),define(ae[1581],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentsTreeViewer",e)}),define(ae[1582],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentsView",e)}),define(ae[1583],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/commentsViewActions",e)}),define(ae[1584],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/browser/reactionsAction",e)}),define(ae[1585],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/comments/common/commentModel",e)}),define(ae[1586],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/customEditor/common/contributedCustomEditors",e)}),define(ae[1587],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/customEditor/common/customEditor",e)}),define(ae[1588],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/customEditor/common/extensionPoint",e)}),define(ae[1589],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/baseDebugView",e)}),define(ae[1590],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/breakpointEditorContribution",e)}),define(ae[1591],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/breakpointWidget",e)}),define(ae[1592],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/breakpointsView",e)}),define(ae[1593],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/callStackEditorContribution",e)}),define(ae[1594],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/callStackView",e)}),define(ae[1595],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debug.contribution",e)}),define(ae[1596],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugActionViewItems",e)}),define(ae[1597],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugAdapterManager",e)}),define(ae[1598],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugColors",e)}),define(ae[1599],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugCommands",e)}),define(ae[1600],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugConfigurationManager",e)}),define(ae[1601],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugConsoleQuickAccess",e)}),define(ae[1602],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugEditorActions",e)}),define(ae[1603],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugEditorContribution",e)}),define(ae[1604],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugHover",e)}),define(ae[1605],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugIcons",e)}),define(ae[1606],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugQuickAccess",e)}),define(ae[1607],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugService",e)}),define(ae[1608],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugSession",e)}),define(ae[1609],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugSessionPicker",e)}),define(ae[1610],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugStatus",e)}),define(ae[1611],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugTaskRunner",e)}),define(ae[1612],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugToolBar",e)}),define(ae[1613],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/debugViewlet",e)}),define(ae[1614],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/disassemblyView",e)}),define(ae[1615],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/exceptionWidget",e)}),define(ae[1616],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/linkDetector",e)}),define(ae[1617],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/loadedScriptsView",e)}),define(ae[1618],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/rawDebugSession",e)}),define(ae[1619],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/repl",e)}),define(ae[1620],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/replViewer",e)}),define(ae[1621],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/statusbarColorProvider",e)}),define(ae[1622],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/variablesView",e)}),define(ae[1623],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/watchExpressionsView",e)}),define(ae[1624],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/browser/welcomeView",e)}),define(ae[1625],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/abstractDebugAdapter",e)}),define(ae[1626],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debug",e)}),define(ae[1627],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debugContentProvider",e)}),define(ae[1628],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debugLifecycle",e)}),define(ae[1629],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debugModel",e)}),define(ae[1630],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debugSchemas",e)}),define(ae[1631],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debugSource",e)}),define(ae[1632],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/debugger",e)}),define(ae[1633],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/disassemblyViewInput",e)}),define(ae[1634],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/loadedScriptsPicker",e)}),define(ae[1635],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/debug/common/replModel",e)}),define(ae[1636],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/deprecatedExtensionMigrator/browser/deprecatedExtensionMigrator.contribution",e)}),define(ae[1637],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/editSessions/browser/editSessions.contribution",e)}),define(ae[1638],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/editSessions/browser/editSessionsStorageService",e)}),define(ae[1639],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/editSessions/browser/editSessionsViews",e)}),define(ae[1640],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/editSessions/common/editSessions",e)}),define(ae[1641],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/emmet/browser/actions/expandAbbreviation",e)}),define(ae[1642],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/experiments/browser/experiments.contribution",e)}),define(ae[1643],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/abstractRuntimeExtensionsEditor",e)}),define(ae[1644],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/configBasedRecommendations",e)}),define(ae[1645],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/dynamicWorkspaceRecommendations",e)}),define(ae[1646],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/exeBasedRecommendations",e)}),define(ae[1647],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionEditor",e)}),define(ae[1648],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionRecommendationNotificationService",e)}),define(ae[1649],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensions.contribution",e)}),define(ae[1650],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsActions",e)}),define(ae[1651],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsActivationProgress",e)}),define(ae[1652],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsCompletionItemsProvider",e)}),define(ae[1653],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsDependencyChecker",e)}),define(ae[1654],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsIcons",e)}),define(ae[1655],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsQuickAccess",e)}),define(ae[1656],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsViewer",e)}),define(ae[1657],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsViewlet",e)}),define(ae[1658],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsViews",e)}),define(ae[1659],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsWidgets",e)}),define(ae[1660],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/extensionsWorkbenchService",e)}),define(ae[1661],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/fileBasedRecommendations",e)}),define(ae[1662],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/webRecommendations",e)}),define(ae[1663],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/browser/workspaceRecommendations",e)}),define(ae[1664],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/common/extensionsFileTemplate",e)}),define(ae[1665],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/common/extensionsInput",e)}),define(ae[1666],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/common/extensionsUtils",e)}),define(ae[1667],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/common/reportExtensionIssueAction",e)}),define(ae[1668],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/common/runtimeExtensionsInput",e)}),define(ae[1669],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/debugExtensionHostAction",e)}),define(ae[1670],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/extensionProfileService",e)}),define(ae[1671],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/extensions.contribution",e)}),define(ae[1672],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsActions",e)}),define(ae[1673],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsAutoProfiler",e)}),define(ae[1674],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/extensionsSlowActions",e)}),define(ae[1675],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/extensions/electron-sandbox/runtimeExtensionsEditor",e)}),define(ae[1676],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/externalTerminal/browser/externalTerminal.contribution",e)}),define(ae[1677],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/externalTerminal/electron-sandbox/externalTerminal.contribution",e)}),define(ae[1678],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/externalUriOpener/common/configuration",e)}),define(ae[1679],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService",e)}),define(ae[1680],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/feedback/browser/feedback",e)}),define(ae[1681],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/feedback/browser/feedbackStatusbarItem",e)}),define(ae[1682],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/editors/binaryFileEditor",e)}),define(ae[1683],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/editors/textFileEditor",e)}),define(ae[1684],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/editors/textFileSaveErrorHandler",e)}),define(ae[1685],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/explorerViewlet",e)}),define(ae[1686],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/fileActions",e)}),define(ae[1687],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/fileActions.contribution",e)}),define(ae[1688],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/fileCommands",e)}),define(ae[1689],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/fileConstants",e)}),define(ae[1690],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/fileImportExport",e)}),define(ae[1691],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/files.contribution",e)}),define(ae[1692],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/views/emptyView",e)}),define(ae[1693],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/views/explorerDecorationsProvider",e)}),define(ae[1694],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/views/explorerView",e)}),define(ae[1695],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/views/explorerViewer",e)}),define(ae[1696],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/views/openEditorsView",e)}),define(ae[1697],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/browser/workspaceWatcher",e)}),define(ae[1698],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/common/dirtyFilesIndicator",e)}),define(ae[1699],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/common/files",e)}),define(ae[1700],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/electron-sandbox/fileActions.contribution",e)}),define(ae[1701],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/electron-sandbox/files.contribution",e)}),define(ae[1702],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/files/electron-sandbox/textFileEditor",e)}),define(ae[1703],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/folding/browser/folding.contribution",e)}),define(ae[1704],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/format/browser/formatActionsMultiple",e)}),define(ae[1705],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/format/browser/formatActionsNone",e)}),define(ae[1706],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/format/browser/formatModified",e)}),define(ae[1707],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/inlayHints/browser/inlayHintsAccessibilty",e)}),define(ae[1708],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/interactive/browser/interactive.contribution",e)}),define(ae[1709],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/interactive/browser/interactiveEditor",e)}),define(ae[1710],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/issue/electron-sandbox/issue.contribution",e)}),define(ae[1711],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/issue/electron-sandbox/issueActions",e)}),define(ae[1712],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/keybindings/browser/keybindings.contribution",e)}),define(ae[1713],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/languageDetection/browser/languageDetection.contribution",e)}),define(ae[1714],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/languageStatus/browser/languageStatus.contribution",e)}),define(ae[1715],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localHistory/browser/localHistory",e)}),define(ae[1716],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localHistory/browser/localHistoryCommands",e)}),define(ae[1717],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localHistory/browser/localHistoryTimeline",e)}),define(ae[1718],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localHistory/electron-sandbox/localHistoryCommands",e)}),define(ae[1719],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localization/browser/localizationsActions",e)}),define(ae[1720],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localization/electron-sandbox/localeService",e)}),define(ae[1721],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localization/electron-sandbox/localization.contribution",e)}),define(ae[1722],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/localization/electron-sandbox/minimalTranslations",e)}),define(ae[1723],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/logs/common/logs.contribution",e)}),define(ae[1724],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/logs/common/logsActions",e)}),define(ae[1725],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/logs/electron-sandbox/logs.contribution",e)}),define(ae[1726],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/logs/electron-sandbox/logsActions",e)}),define(ae[1727],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/markers/browser/markers.contribution",e)}),define(ae[1728],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/markers/browser/markersFileDecorations",e)}),define(ae[1729],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/markers/browser/markersTable",e)}),define(ae[1730],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/markers/browser/markersTreeViewer",e)}),define(ae[1731],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/markers/browser/markersView",e)}),define(ae[1732],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/markers/browser/messages",e)}),define(ae[1733],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/commands/commands",e)}),define(ae[1734],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/commands/devCommands",e)}),define(ae[1735],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution",e)}),define(ae[1736],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/mergeEditorInput",e)}),define(ae[1737],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel",e)}),define(ae[1738],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController",e)}),define(ae[1739],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/colors",e)}),define(ae[1740],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/conflictActions",e)}),define(ae[1741],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView",e)}),define(ae[1742],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView",e)}),define(ae[1743],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView",e)}),define(ae[1744],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/mergeEditor",e)}),define(ae[1745],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/browser/view/viewModel",e)}),define(ae[1746],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/common/mergeEditor",e)}),define(ae[1747],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/mergeEditor/electron-sandbox/devCommands",e)}),define(ae[1748],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/cellCommands/cellCommands",e)}),define(ae[1749],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/executionStatusBarItemController",e)}),define(ae[1750],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/cellStatusBar/statusBarProviders",e)}),define(ae[1751],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/clipboard/notebookClipboard",e)}),define(ae[1752],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/editorStatusBar/editorStatusBar",e)}),define(ae[1753],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFind",e)}),define(ae[1754],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget",e)}),define(ae[1755],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget",e)}),define(ae[1756],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/format/formatting",e)}),define(ae[1757],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/gettingStarted/notebookGettingStarted",e)}),define(ae[1758],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/layout/layoutActions",e)}),define(ae[1759],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/navigation/arrow",e)}),define(ae[1760],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/outline/notebookOutline",e)}),define(ae[1761],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/profile/notebookProfile",e)}),define(ae[1762],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/contrib/troubleshoot/layout",e)}),define(ae[1763],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/controller/coreActions",e)}),define(ae[1764],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/controller/editActions",e)}),define(ae[1765],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/controller/executeActions",e)}),define(ae[1766],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/controller/foldingController",e)}),define(ae[1767],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/controller/insertCellActions",e)}),define(ae[1768],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/controller/layoutActions",e)}),define(ae[1769],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/diff/diffElementOutputs",e)}),define(ae[1770],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/diff/notebookDiffActions",e)}),define(ae[1771],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor",e)}),define(ae[1772],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/notebook.contribution",e)}),define(ae[1773],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/notebookEditor",e)}),define(ae[1774],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/notebookEditorWidget",e)}),define(ae[1775],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/notebookExtensionPoint",e)}),define(ae[1776],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/notebookIcons",e)}),define(ae[1777],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/services/notebookExecutionServiceImpl",e)}),define(ae[1778],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/services/notebookKeymapServiceImpl",e)}),define(ae[1779],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions",e)}),define(ae[1780],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/cellOutput",e)}),define(ae[1781],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCell",e)}),define(ae[1782],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCellExecutionIcon",e)}),define(ae[1783],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/codeCellRunToolbar",e)}),define(ae[1784],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/collapsedCellOutput",e)}),define(ae[1785],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint",e)}),define(ae[1786],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/cellParts/markupCell",e)}),define(ae[1787],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView",e)}),define(ae[1788],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/view/renderers/cellRenderer",e)}),define(ae[1789],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem",e)}),define(ae[1790],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/notebook/common/notebookEditorModel",e)}),define(ae[1791],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/outline/browser/outline.contribution",e)}),define(ae[1792],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/outline/browser/outlinePane",e)}),define(ae[1793],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/output/browser/logViewer",e)}),define(ae[1794],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/output/browser/output.contribution",e)}),define(ae[1795],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/output/browser/outputView",e)}),define(ae[1796],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/performance/browser/performance.contribution",e)}),define(ae[1797],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/performance/browser/perfviewEditor",e)}),define(ae[1798],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/performance/electron-sandbox/performance.contribution",e)}),define(ae[1799],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/performance/electron-sandbox/startupProfiler",e)}),define(ae[1800],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/keybindingWidgets",e)}),define(ae[1801],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/keybindingsEditor",e)}),define(ae[1802],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/keybindingsEditorContribution",e)}),define(ae[1803],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/preferences.contribution",e)}),define(ae[1804],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/preferencesActions",e)}),define(ae[1805],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/preferencesIcons",e)}),define(ae[1806],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/preferencesRenderers",e)}),define(ae[1807],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/preferencesWidgets",e)}),define(ae[1808],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/settingsEditor2",e)}),define(ae[1809],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/settingsEditorSettingIndicators",e)}),define(ae[1810],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/settingsLayout",e)}),define(ae[1811],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/settingsSearchMenu",e)}),define(ae[1812],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/settingsTree",e)}),define(ae[1813],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/settingsWidgets",e)}),define(ae[1814],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/browser/tocTree",e)}),define(ae[1815],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/common/preferencesContribution",e)}),define(ae[1816],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/preferences/common/settingsEditorColorRegistry",e)}),define(ae[1817],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/quickaccess/browser/commandsQuickAccess",e)}),define(ae[1818],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/quickaccess/browser/quickAccess.contribution",e)}),define(ae[1819],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/quickaccess/browser/viewQuickAccess",e)}),define(ae[1820],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/relauncher/browser/relauncher.contribution",e)}),define(ae[1821],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/explorerViewItems",e)}),define(ae[1822],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/remote",e)}),define(ae[1823],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/remoteExplorer",e)}),define(ae[1824],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/remoteIcons",e)}),define(ae[1825],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/remoteIndicator",e)}),define(ae[1826],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/tunnelFactory",e)}),define(ae[1827],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/browser/tunnelView",e)}),define(ae[1828],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/common/remote.contribution",e)}),define(ae[1829],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remote/electron-sandbox/remote.contribution",e)}),define(ae[1830],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/remoteTunnel/electron-sandbox/remoteTunnel.contribution",e)}),define(ae[1831],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/sash/browser/sash.contribution",e)}),define(ae[1832],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/scm/browser/activity",e)}),define(ae[1833],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/scm/browser/dirtydiffDecorator",e)}),define(ae[1834],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/scm/browser/scm.contribution",e)}),define(ae[1835],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/scm/browser/scmRepositoriesViewPane",e)}),define(ae[1836],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/scm/browser/scmViewPane",e)}),define(ae[1837],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/scm/browser/scmViewPaneContainer",e)}),define(ae[1838],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/anythingQuickAccess",e)}),define(ae[1839],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/patternInputWidget",e)}),define(ae[1840],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/replaceService",e)}),define(ae[1841],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/search.contribution",e)}),define(ae[1842],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/searchActions",e)}),define(ae[1843],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/searchIcons",e)}),define(ae[1844],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/searchMessage",e)}),define(ae[1845],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/searchResultsView",e)}),define(ae[1846],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/searchView",e)}),define(ae[1847],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/searchWidget",e)}),define(ae[1848],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/search/browser/symbolsQuickAccess",e)}),define(ae[1849],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/searchEditor/browser/searchEditor",e)}),define(ae[1850],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/searchEditor/browser/searchEditor.contribution",e)}),define(ae[1851],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/searchEditor/browser/searchEditorInput",e)}),define(ae[1852],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/searchEditor/browser/searchEditorSerialization",e)}),define(ae[1853],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/commands/abstractSnippetsActions",e)}),define(ae[1854],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/commands/configureSnippets",e)}),define(ae[1855],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/commands/fileTemplateSnippets",e)}),define(ae[1856],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/commands/insertSnippet",e)}),define(ae[1857],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/commands/surroundWithSnippet",e)}),define(ae[1858],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/snippetCodeActionProvider",e)}),define(ae[1859],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/snippetCompletionProvider",e)}),define(ae[1860],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/snippetPicker",e)}),define(ae[1861],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/snippets.contribution",e)}),define(ae[1862],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/snippetsFile",e)}),define(ae[1863],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/snippets/browser/snippetsService",e)}),define(ae[1864],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/surveys/browser/ces.contribution",e)}),define(ae[1865],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/surveys/browser/languageSurveys.contribution",e)}),define(ae[1866],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/surveys/browser/nps.contribution",e)}),define(ae[1867],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/abstractTaskService",e)}),define(ae[1868],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/runAutomaticTasks",e)}),define(ae[1869],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/task.contribution",e)}),define(ae[1870],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/taskQuickPick",e)}),define(ae[1871],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/taskTerminalStatus",e)}),define(ae[1872],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/tasksQuickAccess",e)}),define(ae[1873],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/browser/terminalTaskSystem",e)}),define(ae[1874],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/jsonSchemaCommon",e)}),define(ae[1875],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/jsonSchema_v1",e)}),define(ae[1876],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/jsonSchema_v2",e)}),define(ae[1877],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/problemMatcher",e)}),define(ae[1878],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/taskConfiguration",e)}),define(ae[1879],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/taskDefinitionRegistry",e)}),define(ae[1880],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/taskService",e)}),define(ae[1881],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/taskTemplates",e)}),define(ae[1882],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/common/tasks",e)}),define(ae[1883],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/tasks/electron-sandbox/taskService",e)}),define(ae[1884],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/baseTerminalBackend",e)}),define(ae[1885],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/environmentVariableInfo",e)}),define(ae[1886],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/links/terminalLink",e)}),define(ae[1887],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/links/terminalLinkDetectorAdapter",e)}),define(ae[1888],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/links/terminalLinkManager",e)}),define(ae[1889],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/links/terminalLinkQuickpick",e)}),define(ae[1890],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminal.contribution",e)}),define(ae[1891],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalActions",e)}),define(ae[1892],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalConfigHelper",e)}),define(ae[1893],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalDecorationsProvider",e)}),define(ae[1894],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalEditorInput",e)}),define(ae[1895],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalIcons",e)}),define(ae[1896],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalInstance",e)}),define(ae[1897],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalMainContribution",e)}),define(ae[1898],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalMenus",e)}),define(ae[1899],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalProcessManager",e)}),define(ae[1900],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalProfileQuickpick",e)}),define(ae[1901],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalProfileResolverService",e)}),define(ae[1902],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalQuickAccess",e)}),define(ae[1903],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalQuickFixBuiltinActions",e)}),define(ae[1904],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalRunRecentQuickPick",e)}),define(ae[1905],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalService",e)}),define(ae[1906],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalTabbedView",e)}),define(ae[1907],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalTabsList",e)}),define(ae[1908],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalTooltip",e)}),define(ae[1909],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/terminalView",e)}),define(ae[1910],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/xterm/decorationAddon",e)}),define(ae[1911],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/xterm/decorationStyles",e)}),define(ae[1912],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/xterm/quickFixAddon",e)}),define(ae[1913],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/browser/xterm/xtermTerminal",e)}),define(ae[1914],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/common/terminal",e)}),define(ae[1915],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/common/terminalColorRegistry",e)}),define(ae[1916],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/common/terminalConfiguration",e)}),define(ae[1917],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/common/terminalContextKey",e)}),define(ae[1918],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/common/terminalStrings",e)}),define(ae[1919],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/terminal/electron-sandbox/terminalRemote",e)}),define(ae[1920],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/icons",e)}),define(ae[1921],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testExplorerActions",e)}),define(ae[1922],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testing.contribution",e)}),define(ae[1923],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingConfigurationUi",e)}),define(ae[1924],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingDecorations",e)}),define(ae[1925],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingExplorerFilter",e)}),define(ae[1926],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingExplorerView",e)}),define(ae[1927],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingOutputPeek",e)}),define(ae[1928],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingOutputTerminalService",e)}),define(ae[1929],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingProgressUiService",e)}),define(ae[1930],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/testingViewPaneContainer",e)}),define(ae[1931],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/browser/theme",e)}),define(ae[1932],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/common/configuration",e)}),define(ae[1933],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/common/constants",e)}),define(ae[1934],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/common/testResult",e)}),define(ae[1935],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/common/testServiceImpl",e)}),define(ae[1936],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/testing/common/testingContextKeys",e)}),define(ae[1937],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/themes/browser/themes.contribution",e)}),define(ae[1938],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/timeline/browser/timeline.contribution",e)}),define(ae[1939],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/timeline/browser/timelinePane",e)}),define(ae[1940],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution",e)}),define(ae[1941],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek",e)}),define(ae[1942],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree",e)}),define(ae[1943],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/update/browser/releaseNotesEditor",e)}),define(ae[1944],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/update/browser/update",e)}),define(ae[1945],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/update/browser/update.contribution",e)}),define(ae[1946],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/url/browser/trustedDomains",e)}),define(ae[1947],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/url/browser/trustedDomainsValidator",e)}),define(ae[1948],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/url/browser/url.contribution",e)}),define(ae[1949],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataProfile/browser/userDataProfile",e)}),define(ae[1950],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataProfile/browser/userDataProfileActions",e)}),define(ae[1951],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataSync/browser/userDataSync",e)}),define(ae[1952],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataSync/browser/userDataSync.contribution",e)}),define(ae[1953],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataSync/browser/userDataSyncConflictsView",e)}),define(ae[1954],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataSync/browser/userDataSyncViews",e)}),define(ae[1955],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution",e)}),define(ae[1956],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/watermark/browser/watermark",e)}),define(ae[1957],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/webview/browser/webview.contribution",e)}),define(ae[1958],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/webview/browser/webviewElement",e)}),define(ae[1959],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/webview/electron-sandbox/webviewCommands",e)}),define(ae[1960],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/webviewPanel/browser/webviewCommands",e)}),define(ae[1961],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/webviewPanel/browser/webviewEditor",e)}),define(ae[1962],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution",e)}),define(ae[1963],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted",e)}),define(ae[1964],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStarted.contribution",e)}),define(ae[1965],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedColors",e)}),define(ae[1966],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedExtensionPoint",e)}),define(ae[1967],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedIcons",e)}),define(ae[1968],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedInput",e)}),define(ae[1969],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/browser/gettingStartedService",e)}),define(ae[1970],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/common/gettingStartedContent",e)}),define(ae[1971],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile",e)}),define(ae[1972],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker",e)}),define(ae[1973],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeOverlay/browser/welcomeOverlay",e)}),define(ae[1974],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeViews/common/newFile.contribution",e)}),define(ae[1975],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeViews/common/viewsWelcomeContribution",e)}),define(ae[1976],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeViews/common/viewsWelcomeExtensionPoint",e)}),define(ae[1977],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeWalkthrough/browser/editor/editorWalkThrough",e)}),define(ae[1978],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeWalkthrough/browser/walkThrough.contribution",e)}),define(ae[1979],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/welcomeWalkthrough/browser/walkThroughPart",e)}),define(ae[1980],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/workspace/browser/workspace.contribution",e)}),define(ae[1981],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/workspace/browser/workspaceTrustEditor",e)}),define(ae[1982],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/workspace/common/workspace",e)}),define(ae[1983],le([3,4]),function(J,e){return J.create("vs/workbench/contrib/workspaces/browser/workspaces.contribution",e)}),define(ae[1984],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/actions/developerActions",e)}),define(ae[1985],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/actions/installActions",e)}),define(ae[1986],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/actions/windowActions",e)}),define(ae[1987],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/desktop.contribution",e)}),define(ae[1988],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/desktop.main",e)}),define(ae[1989],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/parts/dialogs/dialogHandler",e)}),define(ae[1990],le([3,4]),function(J,e){return J.create("vs/workbench/electron-sandbox/window",e)}),define(ae[1991],le([3,4]),function(J,e){return J.create("vs/workbench/services/actions/common/menusExtensionPoint",e)}),define(ae[1992],le([3,4]),function(J,e){return J.create("vs/workbench/services/authentication/browser/authenticationService",e)}),define(ae[1993],le([3,4]),function(J,e){return J.create("vs/workbench/services/configuration/browser/configurationService",e)}),define(ae[1994],le([3,4]),function(J,e){return J.create("vs/workbench/services/configuration/common/configurationEditing",e)}),define(ae[1995],le([3,4]),function(J,e){return J.create("vs/workbench/services/configuration/common/jsonEditingService",e)}),define(ae[1996],le([3,4]),function(J,e){return J.create("vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService",e)}),define(ae[1997],le([3,4]),function(J,e){return J.create("vs/workbench/services/configurationResolver/common/configurationResolverSchema",e)}),define(ae[1998],le([3,4]),function(J,e){return J.create("vs/workbench/services/configurationResolver/common/configurationResolverUtils",e)}),define(ae[1999],le([3,4]),function(J,e){return J.create("vs/workbench/services/configurationResolver/common/variableResolver",e)}),define(ae[2e3],le([3,4]),function(J,e){return J.create("vs/workbench/services/decorations/browser/decorationsService",e)}),define(ae[2001],le([3,4]),function(J,e){return J.create("vs/workbench/services/dialogs/browser/abstractFileDialogService",e)}),define(ae[2002],le([3,4]),function(J,e){return J.create("vs/workbench/services/dialogs/browser/simpleFileDialog",e)}),define(ae[2003],le([3,4]),function(J,e){return J.create("vs/workbench/services/editor/browser/editorResolverService",e)}),define(ae[2004],le([3,4]),function(J,e){return J.create("vs/workbench/services/editor/common/editorResolverService",e)}),define(ae[2005],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensionManagement/browser/extensionBisect",e)}),define(ae[2006],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensionManagement/browser/extensionEnablementService",e)}),define(ae[2007],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensionManagement/common/extensionManagementService",e)}),define(ae[2008],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensionManagement/electron-sandbox/extensionManagementServerService",e)}),define(ae[2009],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensionManagement/electron-sandbox/remoteExtensionManagementService",e)}),define(ae[2010],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensionRecommendations/common/workspaceExtensionsConfig",e)}),define(ae[2011],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/browser/extensionUrlHandler",e)}),define(ae[2012],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/browser/webWorkerExtensionHost",e)}),define(ae[2013],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/common/abstractExtensionService",e)}),define(ae[2014],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/common/extensionHostManager",e)}),define(ae[2015],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/common/extensionsRegistry",e)}),define(ae[2016],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/common/extensionsUtil",e)}),define(ae[2017],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/common/remoteExtensionHost",e)}),define(ae[2018],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/electron-sandbox/cachedExtensionScanner",e)}),define(ae[2019],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/electron-sandbox/electronExtensionService",e)}),define(ae[2020],le([3,4]),function(J,e){return J.create("vs/workbench/services/extensions/electron-sandbox/localProcessExtensionHost",e)}),define(ae[2021],le([3,4]),function(J,e){return J.create("vs/workbench/services/history/browser/historyService",e)}),define(ae[2022],le([3,4]),function(J,e){return J.create("vs/workbench/services/integrity/electron-sandbox/integrityService",e)}),define(ae[2023],le([3,4]),function(J,e){return J.create("vs/workbench/services/keybinding/browser/keybindingService",e)}),define(ae[2024],le([3,4]),function(J,e){return J.create("vs/workbench/services/keybinding/common/keybindingEditing",e)}),define(ae[2025],le([3,4]),function(J,e){return J.create("vs/workbench/services/label/common/labelService",e)}),define(ae[2026],le([3,4]),function(J,e){return J.create("vs/workbench/services/language/common/languageService",e)}),define(ae[2027],le([3,4]),function(J,e){return J.create("vs/workbench/services/notification/common/notificationService",e)}),define(ae[2028],le([3,4]),function(J,e){return J.create("vs/workbench/services/preferences/browser/keybindingsEditorInput",e)}),define(ae[2029],le([3,4]),function(J,e){return J.create("vs/workbench/services/preferences/browser/keybindingsEditorModel",e)}),define(ae[2030],le([3,4]),function(J,e){return J.create("vs/workbench/services/preferences/browser/preferencesService",e)}),define(ae[2031],le([3,4]),function(J,e){return J.create("vs/workbench/services/preferences/common/preferencesEditorInput",e)}),define(ae[2032],le([3,4]),function(J,e){return J.create("vs/workbench/services/preferences/common/preferencesModels",e)}),define(ae[2033],le([3,4]),function(J,e){return J.create("vs/workbench/services/preferences/common/preferencesValidation",e)}),define(ae[2034],le([3,4]),function(J,e){return J.create("vs/workbench/services/progress/browser/progressService",e)}),define(ae[2035],le([3,4]),function(J,e){return J.create("vs/workbench/services/remote/common/remoteExplorerService",e)}),define(ae[2036],le([3,4]),function(J,e){return J.create("vs/workbench/services/remote/electron-sandbox/remoteAgentService",e)}),define(ae[2037],le([3,4]),function(J,e){return J.create("vs/workbench/services/search/common/queryBuilder",e)}),define(ae[2038],le([3,4]),function(J,e){return J.create("vs/workbench/services/textMate/browser/abstractTextMateService",e)}),define(ae[2039],le([3,4]),function(J,e){return J.create("vs/workbench/services/textMate/common/TMGrammars",e)}),define(ae[2040],le([3,4]),function(J,e){return J.create("vs/workbench/services/textfile/browser/textFileService",e)}),define(ae[2041],le([3,4]),function(J,e){return J.create("vs/workbench/services/textfile/common/textFileEditorModel",e)}),define(ae[2042],le([3,4]),function(J,e){return J.create("vs/workbench/services/textfile/common/textFileEditorModelManager",e)}),define(ae[2043],le([3,4]),function(J,e){return J.create("vs/workbench/services/textfile/common/textFileSaveParticipant",e)}),define(ae[2044],le([3,4]),function(J,e){return J.create("vs/workbench/services/textfile/electron-sandbox/nativeTextFileService",e)}),define(ae[2045],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/browser/fileIconThemeData",e)}),define(ae[2046],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/browser/productIconThemeData",e)}),define(ae[2047],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/browser/workbenchThemeService",e)}),define(ae[2048],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/colorExtensionPoint",e)}),define(ae[2049],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/colorThemeData",e)}),define(ae[2050],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/colorThemeSchema",e)}),define(ae[2051],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/fileIconThemeSchema",e)}),define(ae[2052],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/iconExtensionPoint",e)}),define(ae[2053],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/productIconThemeSchema",e)}),define(ae[2054],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/themeConfiguration",e)}),define(ae[2055],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/themeExtensionPoints",e)}),define(ae[2056],le([3,4]),function(J,e){return J.create("vs/workbench/services/themes/common/tokenClassificationExtensionPoint",e)}),define(ae[2057],le([3,4]),function(J,e){return J.create("vs/workbench/services/userDataProfile/browser/userDataProfileManagement",e)}),define(ae[2058],le([3,4]),function(J,e){return J.create("vs/workbench/services/userDataProfile/common/userDataProfile",e)}),define(ae[2059],le([3,4]),function(J,e){return J.create("vs/workbench/services/userDataProfile/common/userDataProfileImportExportService",e)}),define(ae[2060],le([3,4]),function(J,e){return J.create("vs/workbench/services/userDataProfile/common/userDataProfileService",e)}),define(ae[2061],le([3,4]),function(J,e){return J.create("vs/workbench/services/userDataSync/browser/userDataSyncWorkbenchService",e)}),define(ae[2062],le([3,4]),function(J,e){return J.create("vs/workbench/services/userDataSync/common/userDataSync",e)}),define(ae[2063],le([3,4]),function(J,e){return J.create("vs/workbench/services/views/browser/viewDescriptorService",e)}),define(ae[2064],le([3,4]),function(J,e){return J.create("vs/workbench/services/views/common/viewContainerModel",e)}),define(ae[2065],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/common/fileWorkingCopyManager",e)}),define(ae[2066],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopy",e)}),define(ae[2067],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopyManager",e)}),define(ae[2068],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant",e)}),define(ae[2069],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/common/workingCopyHistoryService",e)}),define(ae[2070],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/common/workingCopyHistoryTracker",e)}),define(ae[2071],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupService",e)}),define(ae[2072],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/electron-sandbox/workingCopyBackupTracker",e)}),define(ae[2073],le([3,4]),function(J,e){return J.create("vs/workbench/services/workingCopy/electron-sandbox/workingCopyHistoryService",e)}),define(ae[2074],le([3,4]),function(J,e){return J.create("vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService",e)}),define(ae[2075],le([3,4]),function(J,e){return J.create("vs/workbench/services/workspaces/browser/workspaceTrustEditorInput",e)}),define(ae[2076],le([3,4]),function(J,e){return J.create("vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService",e)}),define(ae[597],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isICommandActionToggleInfo=void 0;function t(p){return p?p.condition!==void 0:!1}e.isICommandActionToggleInfo=t}),define(ae[70],le([1,0,1401]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({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(ae[2077],le([1,0,14]),function(J,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 p;(function(k){k.Team="team",k.Internal="internal",k.Insiders="insider",k.Public="public"})(p=e.TargetPopulation||(e.TargetPopulation={}));var R;(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.ExtensionVersion="X-VSCode-ExtensionVersion",k.Language="X-VSCode-Language",k.TargetPopulation="X-VSCode-TargetPopulation"})(R=e.Filters||(e.Filters={}));class A{constructor(E,I,b,S){this.version=E,this.appName=I,this.machineId=b,this.targetPopulation=S}getFilterValue(E){switch(E){case R.ApplicationVersion:return this.version;case R.Build:return this.appName;case R.ClientId:return this.machineId;case R.Language:return t.language;case R.ExtensionName:return"vscode-core";case R.ExtensionVersion:return"999999.0";case R.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){const E=new Map,I=Object.values(R);for(const b of I)E.set(b,this.getFilterValue(b));return E}}e.AssignmentFilterProvider=A}),define(ae[2078],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWorkspaceBackupInfo=e.isFolderBackupInfo=void 0;function t(R){return R&&R.hasOwnProperty("folderUri")}e.isFolderBackupInfo=t;function p(R){return R&&R.hasOwnProperty("workspace")}e.isWorkspaceBackupInfo=p}),define(ae[2079],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostDebugChannelClient=e.ExtensionHostDebugBroadcastChannel=void 0;class R{constructor(){this._onCloseEmitter=new t.Emitter,this._onReloadEmitter=new t.Emitter,this._onTerminateEmitter=new t.Emitter,this._onAttachEmitter=new t.Emitter}call(E,I,b){switch(I){case"close":return Promise.resolve(this._onCloseEmitter.fire({sessionId:b[0]}));case"reload":return Promise.resolve(this._onReloadEmitter.fire({sessionId:b[0]}));case"terminate":return Promise.resolve(this._onTerminateEmitter.fire({sessionId:b[0]}));case"attach":return Promise.resolve(this._onAttachEmitter.fire({sessionId:b[0],port:b[1],subId:b[2]}))}throw new Error("Method not implemented.")}listen(E,I,b){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=R,R.ChannelName="extensionhostdebugservice";class A extends p.Disposable{constructor(E){super(),this.channel=E}reload(E){this.channel.call("reload",[E])}get onReload(){return this.channel.listen("reload")}close(E){this.channel.call("close",[E])}get onClose(){return this.channel.listen("close")}attachSession(E,I,b){this.channel.call("attach",[E,I,b])}get onAttachSession(){return this.channel.listen("attach")}terminateSession(E,I){this.channel.call("terminate",[E,I])}get onTerminateSession(){return this.channel.listen("terminate")}openExtensionDevelopmentHostWindow(E,I){return this.channel.call("openExtensionDevelopmentHostWindow",[E,I])}}e.ExtensionHostDebugChannelClient=A}),define(ae[2080],le([1,0,9]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadServiceChannelClient=e.DownloadServiceChannel=void 0;class p{constructor(k){this.service=k}listen(k,E,I){throw new Error("Invalid listen")}call(k,E,I){switch(E){case"download":return this.service.download(t.URI.revive(I[0]),t.URI.revive(I[1]))}throw new Error("Invalid call")}}e.DownloadServiceChannel=p;class R{constructor(k,E){this.channel=k,this.getUriTransformer=E}async download(k,E){const I=this.getUriTransformer();I&&(k=I.transformOutgoingURI(k),E=I.transformOutgoingURI(E)),await this.channel.call("download",[k,E])}}e.DownloadServiceChannelClient=R}),define(ae[161],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorSelectionSource=e.TextEditorSelectionRevealType=e.EditorOpenSource=e.EditorResolution=e.EditorActivation=void 0;var t;(function(E){E[E.ACTIVATE=1]="ACTIVATE",E[E.RESTORE=2]="RESTORE",E[E.PRESERVE=3]="PRESERVE"})(t=e.EditorActivation||(e.EditorActivation={}));var p;(function(E){E[E.PICK=0]="PICK",E[E.EXCLUSIVE_ONLY=1]="EXCLUSIVE_ONLY"})(p=e.EditorResolution||(e.EditorResolution={}));var R;(function(E){E[E.API=0]="API",E[E.USER=1]="USER"})(R=e.EditorOpenSource||(e.EditorOpenSource={}));var A;(function(E){E[E.Center=0]="Center",E[E.CenterIfOutsideViewport=1]="CenterIfOutsideViewport",E[E.NearTop=2]="NearTop",E[E.NearTopIfOutsideViewport=3]="NearTopIfOutsideViewport"})(A=e.TextEditorSelectionRevealType||(e.TextEditorSelectionRevealType={}));var k;(function(E){E.PROGRAMMATIC="api",E.NAVIGATION="code.navigation",E.JUMP="code.jump"})(k=e.TextEditorSelectionSource||(e.TextEditorSelectionSource={}))}),define(ae[783],le([1,0,208,112,22,53,209,18,9]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parsePtyHostPort=e.parseSearchPort=e.parseExtensionHostPort=e.AbstractNativeEnvironmentService=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=void 0,e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX=/^([^.]+\..+):(.+)$/;class b{get appRoot(){return(0,A.dirname)(R.FileAccess.asFileUri("",J).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 stateResource(){return(0,E.joinPath)(this.appSettingsHome,"globalStorage","storage.json")}get userRoamingDataHome(){return this.appSettingsHome}get userDataSyncHome(){return(0,E.joinPath)(this.userRoamingDataHome,"sync")}get logsPath(){if(!this.args.logsPath){const f=(0,t.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"");this.args.logsPath=(0,A.join)(this.userDataPath,"logs",f)}return this.args.logsPath}get userDataSyncLogResource(){return I.URI.file((0,A.join)(this.logsPath,"userDataSync.log"))}get editSessionsLogResource(){return I.URI.file((0,A.join)(this.logsPath,"editSessions.log"))}get remoteTunnelLogResource(){return I.URI.file((0,A.join)(this.logsPath,"remoteTunnel.log"))}get sync(){return this.args.sync}get machineSettingsResource(){return(0,E.joinPath)(I.URI.file((0,A.join)(this.userDataPath,"Machine")),"settings.json")}get workspaceStorageHome(){return(0,E.joinPath)(this.appSettingsHome,"workspaceStorage")}get localHistoryHome(){return(0,E.joinPath)(this.appSettingsHome,"History")}get keyboardLayoutResource(){return(0,E.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get argvResource(){const f=k.env.VSCODE_PORTABLE;return f?I.URI.file((0,A.join)(f,"argv.json")):(0,E.joinPath)(this.userHome,this.productService.dataFolderName,"argv.json")}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 f=this.args["builtin-extensions-dir"];return f?(0,A.resolve)(f):(0,A.normalize)((0,A.join)(R.FileAccess.asFileUri("",J).fsPath,"..","extensions"))}get extensionsDownloadLocation(){const f=this.args["extensions-download-dir"];return f?I.URI.file((0,A.resolve)(f)):I.URI.file((0,A.join)(this.userDataPath,"CachedExtensionVSIXs"))}get extensionsPath(){const f=this.args["extensions-dir"];if(f)return(0,A.resolve)(f);const c=k.env.VSCODE_EXTENSIONS;if(c)return c;const l=k.env.VSCODE_PORTABLE;return l?(0,A.join)(l,"extensions"):(0,E.joinPath)(this.userHome,this.productService.dataFolderName,"extensions").fsPath}get extensionDevelopmentLocationURI(){const f=this.args.extensionDevelopmentPath;if(Array.isArray(f))return f.map(c=>/^[^:/?#]+?:\/\//.test(c)?I.URI.parse(c):I.URI.file((0,A.normalize)(c)))}get extensionDevelopmentKind(){return this.args.extensionDevelopmentKind?.map(f=>f==="ui"||f==="workspace"||f==="web"?f:"workspace")}get extensionTestsLocationURI(){const f=this.args.extensionTestsPath;if(f)return/^[^:/?#]+?:\/\//.test(f)?I.URI.parse(f):I.URI.file((0,A.normalize)(f))}get disableExtensions(){if(this.args["disable-extensions"])return!0;const f=this.args["disable-extension"];if(f){if(typeof f=="string")return[f];if(Array.isArray(f)&&f.length>0)return f}return!1}get debugExtensionHost(){return S(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?.find(f=>!e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(f))}get extensionLogLevel(){const f=[];for(const c of this.args.log||[]){const l=e.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(c);l&&l[1]&&l[2]&&f.push([l[1],l[2]])}return f.length?f:void 0}get serviceMachineIdResource(){return(0,E.joinPath)(I.URI.file(this.userDataPath),"machineid")}get crashReporterId(){return this.args["crash-reporter-id"]}get crashReporterDirectory(){return this.args["crash-reporter-directory"]}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 policyFile(){if(this.args["__enable-file-policy"]){const f=k.env.VSCODE_PORTABLE;return f?I.URI.file((0,A.join)(f,"policy.json")):(0,E.joinPath)(this.userHome,this.productService.dataFolderName,"policy.json")}}get continueOn(){return this.args.continueOn}set continueOn(f){this.args.continueOn=f}get args(){return this._args}constructor(f,c,l){this._args=f,this.paths=c,this.productService=l,this.editSessionId=this.args.editSessionId}}we([p.memoize],b.prototype,"appRoot",null),we([p.memoize],b.prototype,"userHome",null),we([p.memoize],b.prototype,"userDataPath",null),we([p.memoize],b.prototype,"appSettingsHome",null),we([p.memoize],b.prototype,"tmpDir",null),we([p.memoize],b.prototype,"cacheHome",null),we([p.memoize],b.prototype,"stateResource",null),we([p.memoize],b.prototype,"userRoamingDataHome",null),we([p.memoize],b.prototype,"userDataSyncHome",null),we([p.memoize],b.prototype,"userDataSyncLogResource",null),we([p.memoize],b.prototype,"editSessionsLogResource",null),we([p.memoize],b.prototype,"remoteTunnelLogResource",null),we([p.memoize],b.prototype,"sync",null),we([p.memoize],b.prototype,"machineSettingsResource",null),we([p.memoize],b.prototype,"workspaceStorageHome",null),we([p.memoize],b.prototype,"localHistoryHome",null),we([p.memoize],b.prototype,"keyboardLayoutResource",null),we([p.memoize],b.prototype,"argvResource",null),we([p.memoize],b.prototype,"isExtensionDevelopment",null),we([p.memoize],b.prototype,"untitledWorkspacesHome",null),we([p.memoize],b.prototype,"installSourcePath",null),we([p.memoize],b.prototype,"builtinExtensionsPath",null),we([p.memoize],b.prototype,"extensionsPath",null),we([p.memoize],b.prototype,"extensionDevelopmentLocationURI",null),we([p.memoize],b.prototype,"extensionDevelopmentKind",null),we([p.memoize],b.prototype,"extensionTestsLocationURI",null),we([p.memoize],b.prototype,"debugExtensionHost",null),we([p.memoize],b.prototype,"logLevel",null),we([p.memoize],b.prototype,"extensionLogLevel",null),we([p.memoize],b.prototype,"serviceMachineIdResource",null),we([p.memoize],b.prototype,"telemetryLogResource",null),we([p.memoize],b.prototype,"disableWorkspaceTrust",null),we([p.memoize],b.prototype,"policyFile",null),e.AbstractNativeEnvironmentService=b;function S(i,f){return u(i["inspect-extensions"],i["inspect-brk-extensions"],5870,f,i.debugId,i.extensionEnvironment)}e.parseExtensionHostPort=S;function C(i,f){return u(i["inspect-search"],i["inspect-brk-search"],5876,f,i.extensionEnvironment)}e.parseSearchPort=C;function r(i,f){return u(i["inspect-ptyhost"],i["inspect-brk-ptyhost"],5877,f,i.extensionEnvironment)}e.parsePtyHostPort=r;function u(i,f,c,l,s,d){const a=Number(f||i)||(l?null:c),o=a?Boolean(!!f):!1;let g;if(d)try{g=JSON.parse(d)}catch{}return{port:a,break:o,debugId:s,env:g}}}),define(ae[784],le([1,0,9]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRemotes=e.getDomainsOfRemotes=e.AllowedSecondLevelDomains=void 0;const p=/^([^@:]+@)?([^:]+):/,R=/^([^@:]+@)?([^:]+):(.+)$/,A=/^([^@]+@)?([^:]+)(:\d+)?$/,k=/([^@:.]+\.[^@:.]+)(:\d+)?$/,E=/^\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 b(c){const l=c.match(k);return l?l[1]:null}function S(c){if(c.indexOf("://")===-1){const l=c.match(p);return l?b(l[2]):null}try{const l=t.URI.parse(c);if(l.authority)return b(l.authority)}catch{}return null}function C(c,l){const s=new Set;let d;for(;d=E.exec(c);){const a=S(d[1]);a&&s.add(a)}const n=new Set(l);return Array.from(s).map(a=>n.has(a)?a:a.replace(I,"a"))}e.getDomainsOfRemotes=C;function r(c){const l=c.match(A);return l?l[2]:null}function u(c,l,s){return c&&l?(s&&l.endsWith(".git")&&(l=l.substr(0,l.length-4)),l.indexOf("/")===0?`${c}${l}`:`${c}/${l}`):null}function i(c,l){if(c.indexOf("://")===-1){const s=c.match(R);if(s)return u(s[2],s[3],l)}try{const s=t.URI.parse(c);if(s.authority)return u(r(s.authority),s.path,l)}catch{}return null}function f(c,l=!1){const s=[];let d;for(;d=E.exec(c);){const n=i(d[1],l);n&&s.push(n)}return s}e.getRemotes=f}),define(ae[785],le([1,0,13,1413]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.localizeManifest=void 0;function R(k,E,I){try{A(k,E,I)}catch{}return k}e.localizeManifest=R;function A(k,E,I){const b=(S,C,r)=>{const u=S[C];if((0,t.isString)(u)){const i=u,f=i.length;if(f>1&&i[0]==="%"&&i[f-1]==="%"){const c=i.substr(1,f-2);let l=E[c];l===void 0&&I&&(l=I[c]);const s=typeof l=="string"?l:l.message;if(s!==void 0){const d=I?.[c],n=typeof d=="string"?d:d?.message;if(r&&(C==="title"||C==="category")&&n&&n!==s){const a={value:s,original:n};S[C]=a}else S[C]=s}else console.warn(`[${k.name}]: ${(0,p.localize)(0,null,c)}`)}}else if((0,t.isObject)(u))for(const i in u)u.hasOwnProperty(i)&&(i==="commands"?b(u,i,!0):b(u,i,r));else if(Array.isArray(u))for(let i=0;i<u.length;i++)b(u,i,r)};for(const S in k)k.hasOwnProperty(S)&&b(k,S)}}),define(ae[2081],le([1,0]),function(J,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,E,I){return this.channel.call("promptImportantExtensionsInstallNotification",[A,k,E,I])}promptWorkspaceRecommendations(A){throw new Error("not supported")}hasToIgnoreRecommendationNotifications(){throw new Error("not supported")}}e.ExtensionRecommendationNotificationServiceChannelClient=t;class p{constructor(A){this.service=A}listen(A,k){throw new Error(`Event not found: ${k}`)}call(A,k,E){switch(k){case"promptImportantExtensionsInstallNotification":return this.service.promptImportantExtensionsInstallNotification(E[0],E[1],E[2],E[3])}throw new Error(`Call not found: ${k}`)}}e.ExtensionRecommendationNotificationServiceChannel=p}),define(ae[786],le([1,0,18,68,1415,306]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEngineValid=e.isValidExtensionVersion=e.validateExtensionManifest=e.isValidVersion=e.normalizeVersion=e.parseVersion=e.isValidVersionStr=void 0;const k=/^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/,E=/^-(\d{4})(\d{2})(\d{2})$/;function I(l){return l=l.trim(),l==="*"||k.test(l)}e.isValidVersionStr=I;function b(l){if(!I(l))return null;if(l=l.trim(),l==="*")return{hasCaret:!1,hasGreaterEquals:!1,majorBase:0,majorMustEqual:!1,minorBase:0,minorMustEqual:!1,patchBase:0,patchMustEqual:!1,preRelease:null};const s=l.match(k);return s?{hasCaret:s[1]==="^",hasGreaterEquals:s[1]===">=",majorBase:s[2]==="x"?0:parseInt(s[2],10),majorMustEqual:s[2]!=="x",minorBase:s[4]==="x"?0:parseInt(s[4],10),minorMustEqual:s[4]!=="x",patchBase:s[6]==="x"?0:parseInt(s[6],10),patchMustEqual:s[6]!=="x",preRelease:s[8]||null}:null}e.parseVersion=b;function S(l){if(!l)return null;const s=l.majorBase,d=l.majorMustEqual,n=l.minorBase;let a=l.minorMustEqual;const o=l.patchBase;let g=l.patchMustEqual;l.hasCaret&&(s===0||(a=!1),g=!1);let h=0;if(l.preRelease){const v=E.exec(l.preRelease);if(v){const[,m,w,D]=v;h=Date.UTC(Number(m),Number(w)-1,Number(D))}}return{majorBase:s,majorMustEqual:d,minorBase:n,minorMustEqual:a,patchBase:o,patchMustEqual:g,isMinimum:l.hasGreaterEquals,notBefore:h}}e.normalizeVersion=S;function C(l,s,d){let n;typeof l=="string"?n=S(b(l)):n=l;let a;s instanceof Date?a=s.getTime():typeof s=="string"&&(a=new Date(s).getTime());let o;if(typeof d=="string"?o=S(b(d)):o=d,!n||!o)return!1;const g=n.majorBase,h=n.minorBase,v=n.patchBase;let m=o.majorBase,w=o.minorBase,D=o.patchBase;const y=o.notBefore;let T=o.majorMustEqual,_=o.minorMustEqual,L=o.patchMustEqual;return o.isMinimum?g>m?!0:g<m?!1:h>w?!0:h<w||a&&a<y?!1:v>=D:(g===1&&m===0&&(!T||!_||!L)&&(m=1,w=0,D=0,T=!0,_=!1,L=!1),g<m?!1:g>m?!T:h<w?!1:h>w?!_:v<D?!1:v>D?!L:!(a&&a<y))}e.isValidVersion=C;function r(l,s,d,n,a){const o=[];if(typeof n.publisher<"u"&&typeof n.publisher!="string")return o.push([p.default.Error,R.localize(0,null)]),o;if(typeof n.name!="string")return o.push([p.default.Error,R.localize(1,null,"name")]),o;if(typeof n.version!="string")return o.push([p.default.Error,R.localize(2,null,"version")]),o;if(!n.engines)return o.push([p.default.Error,R.localize(3,null,"engines")]),o;if(typeof n.engines.vscode!="string")return o.push([p.default.Error,R.localize(4,null,"engines.vscode")]),o;if(typeof n.extensionDependencies<"u"&&!c(n.extensionDependencies))return o.push([p.default.Error,R.localize(5,null,"extensionDependencies")]),o;if(typeof n.activationEvents<"u"){if(!c(n.activationEvents))return o.push([p.default.Error,R.localize(6,null,"activationEvents")]),o;if(typeof n.main>"u"&&typeof n.browser>"u")return o.push([p.default.Error,R.localize(7,null,"activationEvents","main")]),o}if(typeof n.extensionKind<"u"&&typeof n.main>"u"&&o.push([p.default.Warning,R.localize(8,null,"extensionKind")]),typeof n.main<"u"){if(typeof n.main!="string")return o.push([p.default.Error,R.localize(9,null,"main")]),o;{const v=(0,t.joinPath)(d,n.main);(0,t.isEqualOrParent)(v,d)||o.push([p.default.Warning,R.localize(10,null,v.path,d.path)])}if(typeof n.activationEvents>"u")return o.push([p.default.Error,R.localize(11,null,"activationEvents","main")]),o}if(typeof n.browser<"u"){if(typeof n.browser!="string")return o.push([p.default.Error,R.localize(12,null,"browser")]),o;{const v=(0,t.joinPath)(d,n.browser);(0,t.isEqualOrParent)(v,d)||o.push([p.default.Warning,R.localize(13,null,v.path,d.path)])}if(typeof n.activationEvents>"u")return o.push([p.default.Error,R.localize(14,null,"activationEvents","browser")]),o}if(!A.valid(n.version))return o.push([p.default.Error,R.localize(15,null)]),o;const g=[];if(!u(l,s,n,a,g))for(const v of g)o.push([p.default.Error,v]);return o}e.validateExtensionManifest=r;function u(l,s,d,n,a){return n||typeof d.main>"u"&&typeof d.browser>"u"?!0:f(l,s,d.engines.vscode,a)}e.isValidExtensionVersion=u;function i(l,s,d){return l==="*"||f(s,d,l)}e.isEngineValid=i;function f(l,s,d,n=[]){const a=S(b(d));if(!a)return n.push(R.localize(16,null,d)),!1;if(a.majorBase===0){if(!a.majorMustEqual||!a.minorMustEqual)return n.push(R.localize(17,null,d)),!1}else if(!a.majorMustEqual)return n.push(R.localize(18,null,d)),!1;return C(l,s,a)?!0:(n.push(R.localize(19,null,l,d)),!1)}function c(l){if(!Array.isArray(l))return!1;for(let s=0,d=l.length;s<d;s++)if(typeof l[s]!="string")return!1;return!0}}),define(ae[371],le([1,0,56,72]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getServiceMachineId=void 0;async function R(A,k,E){let I=E&&E.get("storage.serviceMachineId",-1)||null;if(I)return I;try{const S=(await k.readFile(A.serviceMachineIdResource)).value.toString();I=(0,p.isUUID)(S)?S:null}catch{I=null}if(!I){I=(0,p.generateUuid)();try{await k.writeFile(A.serviceMachineIdResource,t.VSBuffer.fromString(I))}catch{}}return E?.store("storage.serviceMachineId",I,-1,1),I}e.getServiceMachineId=R}),define(ae[426],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebFileSystemAccess=void 0;var t;(function(p){function R(I){return typeof I?.showDirectoryPicker=="function"}p.supported=R;function A(I){const b=I;return b?typeof b.kind=="string"&&typeof b.queryPermission=="function"&&typeof b.requestPermission=="function":!1}p.isFileSystemHandle=A;function k(I){return I.kind==="file"}p.isFileSystemFileHandle=k;function E(I){return I.kind==="directory"}p.isFileSystemDirectoryHandle=E})(t=e.WebFileSystemAccess||(e.WebFileSystemAccess={}))}),define(ae[372],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function t(p){return p.lookupKeybinding("history.showPrevious")?.getElectronAccelerator()==="Up"&&p.lookupKeybinding("history.showNext")?.getElectronAccelerator()==="Down"}e.showHistoryKeybindingHint=t}),define(ae[97],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class t{constructor(R,A=[],k=!1){this.ctor=R,this.staticArguments=A,this.supportsDelayedInstantiation=k}}e.SyncDescriptor=t}),define(ae[35],le([1,0,97]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=e.InstantiationType=void 0;const p=[];var R;(function(E){E[E.Eager=0]="Eager",E[E.Delayed=1]="Delayed"})(R=e.InstantiationType||(e.InstantiationType={}));function A(E,I,b){I instanceof t.SyncDescriptor||(I=new t.SyncDescriptor(I,[],Boolean(b))),p.push([E,I])}e.registerSingleton=A;function k(){return p}e.getSingletonServiceDescriptors=k}),define(ae[2082],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class t{constructor(A,k){this.key=A,this.data=k,this.incoming=new Map,this.outgoing=new Map}}e.Node=t;class p{constructor(A){this._hashFn=A,this._nodes=new Map}roots(){const A=[];for(const k of this._nodes.values())k.outgoing.size===0&&A.push(k);return A}insertEdge(A,k){const E=this.lookupOrInsertNode(A),I=this.lookupOrInsertNode(k);E.outgoing.set(I.key,I),I.incoming.set(E.key,E)}removeNode(A){const k=this._hashFn(A);this._nodes.delete(k);for(const E of this._nodes.values())E.outgoing.delete(k),E.incoming.delete(k)}lookupOrInsertNode(A){const k=this._hashFn(A);let E=this._nodes.get(k);return E||(E=new t(k,A),this._nodes.set(k,E)),E}lookup(A){return this._nodes.get(this._hashFn(A))}isEmpty(){return this._nodes.size===0}toString(){const A=[];for(const[k,E]of this._nodes)A.push(`${k} (-> incoming)[${[...E.incoming.keys()].join(", ")}] (outgoing ->)[${[...E.outgoing.keys()].join(",")}] `);return A.join(` `)}findCycleSlow(){for(const[A,k]of this._nodes){const E=new Set([A]),I=this._findCycle(k,E);if(I)return I}}_findCycle(A,k){for(const[E,I]of A.outgoing){if(k.has(E))return[...k,E].join(" -> ");k.add(E);const b=this._findCycle(I,k);if(b)return b;k.delete(E)}}}e.Graph=p}),define(ae[5],le([1,0]),function(J,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 E(I){return I[k.DI_DEPENDENCIES]||[]}k.getServiceDependencies=E})(t=e._util||(e._util={})),e.IInstantiationService=R("instantiationService");function p(k,E,I){E[t.DI_TARGET]===E?E[t.DI_DEPENDENCIES].push({id:k,index:I}):(E[t.DI_DEPENDENCIES]=[{id:k,index:I}],E[t.DI_TARGET]=E)}function R(k){if(t.serviceIds.has(k))return t.serviceIds.get(k);const E=function(I,b,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");p(E,I,S)};return E.toString=()=>k,t.serviceIds.set(k,E),E}e.createDecorator=R;function A(k){return k}e.refineServiceDecorator=A}),define(ae[145],le([1,0,5,9,13]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,t.createDecorator)("IWorkspaceEditService");class A{constructor(b){this.metadata=b}static convert(b){return b.edits.map(S=>{if(k.is(S))return k.lift(S);if(E.is(S))return E.lift(S);throw new Error("Unsupported edit")})}}e.ResourceEdit=A;class k extends A{static is(b){return b instanceof k?!0:(0,R.isObject)(b)&&p.URI.isUri(b.resource)&&(0,R.isObject)(b.textEdit)}static lift(b){return b instanceof k?b:new k(b.resource,b.textEdit,b.versionId,b.metadata)}constructor(b,S,C=void 0,r){super(r),this.resource=b,this.textEdit=S,this.versionId=C}}e.ResourceTextEdit=k;class E extends A{static is(b){return b instanceof E?!0:(0,R.isObject)(b)&&(Boolean(b.newResource)||Boolean(b.oldResource))}static lift(b){return b instanceof E?b:new E(b.oldResource,b.newResource,b.options,b.metadata)}constructor(b,S,C={},r){super(r),this.oldResource=b,this.newResource=S,this.options=C}}e.ResourceFileEdit=E}),define(ae[75],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,t.createDecorator)("codeEditorService")}),define(ae[42],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,t.createDecorator)("languageService")}),define(ae[212],le([1,0,5]),function(J,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)});var F=this&&this.__param||function(J,e){return function(t,p){e(t,p,J)}};define(ae[787],le([1,0,566,20,212]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let A=class{constructor(E){this.editorWorkerService=E}async computeDiff(E,I,b){const S=await this.editorWorkerService.computeDiff(E.uri,I.uri,b);if(!S)throw new Error("no diff result available");return{identical:S.identical,quitEarly:S.quitEarly,changes:S.changes.map(r=>new t.LineRangeMapping(new t.LineRange(r[0],r[1]),new t.LineRange(r[2],r[3]),r[4]?.map(u=>new t.RangeMapping(new p.Range(u[0],u[1],u[2],u[3]),new p.Range(u[4],u[5],u[6],u[7])))))}}};A=we([F(0,R.IEditorWorkerService)],A),e.WorkerBasedDocumentDiffProvider=A}),define(ae[61],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,t.createDecorator)("ILanguageFeaturesService")}),define(ae[2083],le([1,0,493,61,35]),function(J,e,t,p,R){"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)),this.documentOnDropEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this)),this.documentPasteEditProvider=new t.LanguageFeatureRegistry(this._score.bind(this))}setNotebookTypeResolver(E){this._notebookTypeResolver=E}_score(E){return this._notebookTypeResolver?.(E)}}e.LanguageFeaturesService=A,(0,R.registerSingleton)(p.ILanguageFeaturesService,A,1)}),define(ae[497],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,t.createDecorator)("markerDecorationsService")}),define(ae[54],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,t.createDecorator)("modelService")}),define(ae[62],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isResolvedTextEditorModel=e.ITextModelService=void 0,e.ITextModelService=(0,t.createDecorator)("textModelService");function p(R){return!!R.textEditorModel}e.isResolvedTextEditorModel=p}),define(ae[114],le([1,0,5]),function(J,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(ae[788],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IChecksumService=void 0,e.IChecksumService=(0,t.createDecorator)("checksumService")}),define(ae[93],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,t.createDecorator)("clipboardService")}),define(ae[31],le([1,0,6,88,2,158,13,5]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullCommandService=e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,E.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new t.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(I,b){if(!I)throw new Error("invalid command");if(typeof I=="string"){if(!b)throw new Error("invalid command");return this.registerCommand({id:I,handler:b})}if(I.description){const i=[];for(const c of I.description.args)i.push(c.constraint);const f=I.handler;I.handler=function(c,...l){return(0,k.validateConstraints)(l,i),f(c,...l)}}const{id:S}=I;let C=this._commands.get(S);C||(C=new A.LinkedList,this._commands.set(S,C));const r=C.unshift(I),u=(0,R.toDisposable)(()=>{r(),this._commands.get(S)?.isEmpty()&&this._commands.delete(S)});return this._onDidRegisterCommand.fire(S),u}registerCommandAlias(I,b){return e.CommandsRegistry.registerCommand(I,(S,...C)=>S.get(e.ICommandService).executeCommand(b,...C))}getCommand(I){const b=this._commands.get(I);if(!(!b||b.isEmpty()))return p.Iterable.first(b)}getCommands(){const I=new Map;for(const b of this._commands.keys()){const S=this.getCommand(b);S&&I.set(b,S)}return I}},e.NullCommandService={_serviceBrand:void 0,onWillExecuteCommand:()=>R.Disposable.None,onDidExecuteCommand:()=>R.Disposable.None,executeCommand(){return Promise.resolve(void 0)}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(ae[789],le([1,0,32,21,9,54,31,13,776,20,61]),function(J,e,t,p,R,A,k,E,I,b,S){"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(o){return o&&!!o.data}e.isSemanticTokens=C;function r(o){return o&&Array.isArray(o.edits)}e.isSemanticTokensEdits=r;class u{constructor(g,h,v){this.provider=g,this.tokens=h,this.error=v}}e.DocumentSemanticTokensResult=u;function i(o,g){return o.has(g)}e.hasDocumentSemanticTokensProvider=i;function f(o,g){const h=o.orderedGroups(g);return h.length>0?h[0]:[]}async function c(o,g,h,v,m){const w=f(o,g),D=await Promise.all(w.map(async y=>{let T,_=null;try{T=await y.provideDocumentSemanticTokens(g,y===h?v:null,m)}catch(L){_=L,T=null}return(!T||!C(T)&&!r(T))&&(T=null),new u(y,T,_)}));for(const y of D){if(y.error)throw y.error;if(y.tokens)return y}return D.length>0?D[0]:null}e.getDocumentSemanticTokens=c;function l(o,g){const h=o.orderedGroups(g);return h.length>0?h[0]:null}class s{constructor(g,h){this.provider=g,this.tokens=h}}function d(o,g){return o.has(g)}e.hasDocumentRangeSemanticTokensProvider=d;function n(o,g){const h=o.orderedGroups(g);return h.length>0?h[0]:[]}async function a(o,g,h,v){const m=n(o,g),w=await Promise.all(m.map(async D=>{let y;try{y=await D.provideDocumentRangeSemanticTokens(g,h,v)}catch(T){(0,p.onUnexpectedExternalError)(T),y=null}return(!y||!C(y))&&(y=null),new s(D,y)}));for(const D of w)if(D.tokens)return D;return w.length>0?w[0]:null}e.getDocumentRangeSemanticTokens=a,k.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",async(o,...g)=>{const[h]=g;(0,E.assertType)(h instanceof R.URI);const v=o.get(A.IModelService).getModel(h);if(!v)return;const{documentSemanticTokensProvider:m}=o.get(S.ILanguageFeaturesService),w=l(m,v);return w?w[0].getLegend():o.get(k.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",h)}),k.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",async(o,...g)=>{const[h]=g;(0,E.assertType)(h instanceof R.URI);const v=o.get(A.IModelService).getModel(h);if(!v)return;const{documentSemanticTokensProvider:m}=o.get(S.ILanguageFeaturesService);if(!i(m,v))return o.get(k.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",h,v.getFullModelRange());const w=await c(m,v,null,null,t.CancellationToken.None);if(!w)return;const{provider:D,tokens:y}=w;if(!y||!C(y))return;const T=(0,I.encodeSemanticTokensDto)({id:0,type:"full",data:y.data});return y.resultId&&D.releaseDocumentSemanticTokens(y.resultId),T}),k.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",async(o,...g)=>{const[h,v]=g;(0,E.assertType)(h instanceof R.URI);const m=o.get(A.IModelService).getModel(h);if(!m)return;const{documentRangeSemanticTokensProvider:w}=o.get(S.ILanguageFeaturesService),D=n(w,m);if(D.length===0)return;if(D.length===1)return D[0].getLegend();if(!v||!b.Range.isIRange(v))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),D[0].getLegend();const y=await a(w,m,b.Range.lift(v),t.CancellationToken.None);if(!!y)return y.provider.getLegend()}),k.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",async(o,...g)=>{const[h,v]=g;(0,E.assertType)(h instanceof R.URI),(0,E.assertType)(b.Range.isIRange(v));const m=o.get(A.IModelService).getModel(h);if(!m)return;const{documentRangeSemanticTokensProvider:w}=o.get(S.ILanguageFeaturesService),D=await a(w,m,b.Range.lift(v),t.CancellationToken.None);if(!(!D||!D.tokens))return(0,I.encodeSemanticTokensDto)({id:0,type:"full",data:D.tokens.data})})}),define(ae[790],le([1,0,32,21,2,13,9,54,31,61]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class S{constructor(){this.lenses=[],this._disposables=new R.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(u,i){this._disposables.add(u);for(const f of u.lenses)this.lenses.push({symbol:f,provider:i})}}e.CodeLensModel=S;async function C(r,u,i){const f=r.ordered(u),c=new Map,l=new S,s=f.map(async(d,n)=>{c.set(d,n);try{const a=await Promise.resolve(d.provideCodeLenses(u,i));a&&l.add(a,d)}catch(a){(0,p.onUnexpectedExternalError)(a)}});return await Promise.all(s),l.lenses=l.lenses.sort((d,n)=>d.symbol.range.startLineNumber<n.symbol.range.startLineNumber?-1:d.symbol.range.startLineNumber>n.symbol.range.startLineNumber?1:c.get(d.provider)<c.get(n.provider)?-1:c.get(d.provider)>c.get(n.provider)?1:d.symbol.range.startColumn<n.symbol.range.startColumn?-1:d.symbol.range.startColumn>n.symbol.range.startColumn?1:0),l}e.getCodeLensModel=C,I.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(r,...u){let[i,f]=u;(0,A.assertType)(k.URI.isUri(i)),(0,A.assertType)(typeof f=="number"||!f);const{codeLensProvider:c}=r.get(b.ILanguageFeaturesService),l=r.get(E.IModelService).getModel(i);if(!l)throw(0,p.illegalArgument)();const s=[],d=new R.DisposableStore;return C(c,l,t.CancellationToken.None).then(n=>{d.add(n);const a=[];for(const o of n.lenses)f==null||Boolean(o.symbol.command)?s.push(o.symbol):f-- >0&&o.provider.resolveCodeLens&&a.push(Promise.resolve(o.provider.resolveCodeLens(l,o.symbol,t.CancellationToken.None)).then(g=>s.push(g||o.symbol)));return Promise.all(a)}).then(()=>s).finally(()=>{setTimeout(()=>d.dispose(),100)})})}),define(ae[791],le([1,0,32,21,9,20,54,31,61]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function b(C,r,u){const i=[],c=C.ordered(r).reverse().map(l=>Promise.resolve(l.provideDocumentColors(r,u)).then(s=>{if(Array.isArray(s))for(const d of s)i.push({colorInfo:d,provider:l})}));return Promise.all(c).then(()=>i)}e.getColors=b;function S(C,r,u,i){return Promise.resolve(u.provideColorPresentations(C,r,i))}e.getColorPresentations=S,E.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(C,...r){const[u]=r;if(!(u instanceof R.URI))throw(0,p.illegalArgument)();const{colorProvider:i}=C.get(I.ILanguageFeaturesService),f=C.get(k.IModelService).getModel(u);if(!f)throw(0,p.illegalArgument)();const c=[],s=i.ordered(f).reverse().map(d=>Promise.resolve(d.provideDocumentColors(f,t.CancellationToken.None)).then(n=>{if(Array.isArray(n))for(const a of n)c.push({range:a.range,color:[a.color.red,a.color.green,a.color.blue,a.color.alpha]})}));return Promise.all(s).then(()=>c)}),E.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(C,...r){const[u,i]=r,{uri:f,range:c}=i;if(!(f instanceof R.URI)||!Array.isArray(u)||u.length!==4||!A.Range.isIRange(c))throw(0,p.illegalArgument)();const[l,s,d,n]=u,{colorProvider:a}=C.get(I.ILanguageFeaturesService),o=C.get(k.IModelService).getModel(f);if(!o)throw(0,p.illegalArgument)();const g={range:c,color:{red:l,green:s,blue:d,alpha:n}},h=[],m=a.ordered(o).reverse().map(w=>Promise.resolve(w.provideColorPresentations(o,g,t.CancellationToken.None)).then(D=>{Array.isArray(D)&&h.push(...D)}));return Promise.all(m).then(()=>h)})}),define(ae[2084],le([1,0,16,32,21,2,13,9,20,54,31,61]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class r{constructor(c,l){this._link=c,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(c){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,c)).then(l=>(this._link=l||this._link,this._link.url?this.resolve(c):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))}}e.Link=r;class u{constructor(c){this._disposables=new A.DisposableStore;let l=[];for(const[s,d]of c){const n=s.links.map(a=>new r(a,d));l=u._union(l,n),(0,A.isDisposable)(s)&&this._disposables.add(s)}this.links=l}dispose(){this._disposables.dispose(),this.links.length=0}static _union(c,l){const s=[];let d,n,a,o;for(d=0,a=0,n=c.length,o=l.length;d<n&&a<o;){const g=c[d],h=l[a];if(I.Range.areIntersectingOrTouching(g.range,h.range)){d++;continue}I.Range.compareRangesUsingStarts(g.range,h.range)<0?(s.push(g),d++):(s.push(h),a++)}for(;d<n;d++)s.push(c[d]);for(;a<o;a++)s.push(l[a]);return s}}e.LinksList=u;function i(f,c,l){const s=[],d=f.ordered(c).reverse().map((n,a)=>Promise.resolve(n.provideLinks(c,l)).then(o=>{o&&(s[a]=[o,n])},R.onUnexpectedExternalError));return Promise.all(d).then(()=>{const n=new u((0,t.coalesce)(s));return l.isCancellationRequested?(n.dispose(),new u([])):n})}e.getLinks=i,S.CommandsRegistry.registerCommand("_executeLinkProvider",async(f,...c)=>{let[l,s]=c;(0,k.assertType)(l instanceof E.URI),typeof s!="number"&&(s=0);const{linkProvider:d}=f.get(C.ILanguageFeaturesService),n=f.get(b.IModelService).getModel(l);if(!n)return[];const a=await i(d,n,p.CancellationToken.None);if(!a)return[];for(let g=0;g<Math.min(s,a.links.length);g++)await a.links[g].resolve(p.CancellationToken.None);const o=a.links.slice(0);return a.dispose(),o})}),define(ae[8],le([1,0,13,9,5]),function(J,e,t,p,R){"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,R.createDecorator)("configurationService");function A(l){return l&&typeof l=="object"&&(!l.overrideIdentifier||typeof l.overrideIdentifier=="string")&&(!l.resource||l.resource instanceof p.URI)}e.isConfigurationOverrides=A;function k(l){return l&&typeof l=="object"&&(!l.overrideIdentifiers||Array.isArray(l.overrideIdentifiers))&&!l.overrideIdentifier&&(!l.resource||l.resource instanceof p.URI)}e.isConfigurationUpdateOverrides=k;var E;(function(l){l[l.APPLICATION=1]="APPLICATION",l[l.USER=2]="USER",l[l.USER_LOCAL=3]="USER_LOCAL",l[l.USER_REMOTE=4]="USER_REMOTE",l[l.WORKSPACE=5]="WORKSPACE",l[l.WORKSPACE_FOLDER=6]="WORKSPACE_FOLDER",l[l.DEFAULT=7]="DEFAULT",l[l.MEMORY=8]="MEMORY"})(E=e.ConfigurationTarget||(e.ConfigurationTarget={}));function I(l){switch(l){case 1:return"APPLICATION";case 2:return"USER";case 3:return"USER_LOCAL";case 4:return"USER_REMOTE";case 5:return"WORKSPACE";case 6:return"WORKSPACE_FOLDER";case 7:return"DEFAULT";case 8:return"MEMORY"}}e.ConfigurationTargetToString=I;function b(l,s){const d=Object.create(null);for(const n in l)S(d,n,l[n],s);return d}e.toValuesTree=b;function S(l,s,d,n){const a=s.split("."),o=a.pop();let g=l;for(let h=0;h<a.length;h++){const v=a[h];let m=g[v];switch(typeof m){case"undefined":m=g[v]=Object.create(null);break;case"object":break;default:n(`Ignoring ${s} as ${a.slice(0,h+1).join(".")} is ${JSON.stringify(m)}`);return}g=m}if(typeof g=="object"&&g!==null)try{g[o]=d}catch{n(`Ignoring ${s} as ${a.join(".")} is ${JSON.stringify(g)}`)}else n(`Ignoring ${s} as ${a.join(".")} is ${JSON.stringify(g)}`)}e.addToValueTree=S;function C(l,s){const d=s.split(".");r(l,d)}e.removeFromValueTree=C;function r(l,s){const d=s.shift();if(s.length===0){delete l[d];return}if(Object.keys(l).indexOf(d)!==-1){const n=l[d];typeof n=="object"&&!Array.isArray(n)&&(r(n,s),Object.keys(n).length===0&&delete l[d])}}function u(l,s,d){function n(g,h){let v=g;for(const m of h){if(typeof v!="object"||v===null)return;v=v[m]}return v}const a=s.split("."),o=n(l,a);return typeof o>"u"?d:o}e.getConfigurationValue=u;function i(l,s,d){Object.keys(s).forEach(n=>{n!=="__proto__"&&(n in l?t.isObject(l[n])&&t.isObject(s[n])?i(l[n],s[n],d):d&&(l[n]=s[n]):l[n]=s[n])})}e.merge=i;function f(l,s,d){const n=l.inspect(s),a=l.inspect(d);return typeof n.userValue<"u"||typeof n.workspaceValue<"u"||typeof n.workspaceFolderValue<"u"?n.value:typeof a.userValue<"u"||typeof a.workspaceValue<"u"||typeof a.workspaceFolderValue<"u"?a.value:n.defaultValue}e.getMigratedSettingValue=f;function c(l){return l.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=c}),define(ae[2085],le([1,0,6,2,50,42,54,8]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceConfigurationService=void 0;let I=class extends p.Disposable{constructor(S,C,r){super(),this.configurationService=S,this.modelService=C,this.languageService=r,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._register(this.configurationService.onDidChangeConfiguration(u=>this._onDidChangeConfiguration.fire(this.toResourceConfigurationChangeEvent(u))))}getValue(S,C,r){return typeof r=="string"?this._getValue(S,R.Position.isIPosition(C)?C:null,r):this._getValue(S,null,typeof C=="string"?C:void 0)}updateValue(S,C,r,u){const i=this.getLanguage(S,null),f=this.configurationService.inspect(C,{resource:S,overrideIdentifier:i});switch(u===void 0&&(u=this.deriveConfigurationTarget(f,i)),u){case 8:return this._updateValue(C,r,u,f.memory?.override,S,i);case 6:return this._updateValue(C,r,u,f.workspaceFolder?.override,S,i);case 5:return this._updateValue(C,r,u,f.workspace?.override,S,i);case 4:return this._updateValue(C,r,u,f.userRemote?.override,S,i);default:return this._updateValue(C,r,u,f.userLocal?.override,S,i)}}_updateValue(S,C,r,u,i,f){return f&&u!==void 0?this.configurationService.updateValue(S,C,{resource:i,overrideIdentifier:f},r):this.configurationService.updateValue(S,C,{resource:i},r)}deriveConfigurationTarget(S,C){if(C){if(S.memory?.override!==void 0)return 8;if(S.workspaceFolder?.override!==void 0)return 6;if(S.workspace?.override!==void 0)return 5;if(S.userRemote?.override!==void 0)return 4;if(S.userLocal?.override!==void 0)return 3}return S.memory?.value!==void 0?8:S.workspaceFolder?.value!==void 0?6:S.workspace?.value!==void 0?5:S.userRemote?.value!==void 0?4:3}_getValue(S,C,r){const u=S?this.getLanguage(S,C):void 0;return typeof r>"u"?this.configurationService.getValue({resource:S,overrideIdentifier:u}):this.configurationService.getValue(r,{resource:S,overrideIdentifier:u})}getLanguage(S,C){const r=this.modelService.getModel(S);return r?C?r.getLanguageIdAtPosition(C.lineNumber,C.column):r.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(S)}toResourceConfigurationChangeEvent(S){return{affectedKeys:S.affectedKeys,affectsConfiguration:(C,r)=>{const u=this.getLanguage(C,null);return S.affectsConfiguration(r,{resource:C,overrideIdentifier:u})}}}};I=we([F(0,E.IConfigurationService),F(1,k.IModelService),F(2,A.ILanguageService)],I),e.TextResourceConfigurationService=I}),define(ae[7],le([1,0,14,28,5]),function(J,e,t,p,R){"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 E;(function(N){N[N.False=0]="False",N[N.True=1]="True",N[N.Defined=2]="Defined",N[N.Not=3]="Not",N[N.Equals=4]="Equals",N[N.NotEquals=5]="NotEquals",N[N.And=6]="And",N[N.Regex=7]="Regex",N[N.NotRegex=8]="NotRegex",N[N.Or=9]="Or",N[N.In=10]="In",N[N.NotIn=11]="NotIn",N[N.Greater=12]="Greater",N[N.GreaterEquals=13]="GreaterEquals",N[N.Smaller=14]="Smaller",N[N.SmallerEquals=15]="SmallerEquals"})(E=e.ContextKeyExprType||(e.ContextKeyExprType={}));class I{static false(){return C.INSTANCE}static true(){return r.INSTANCE}static has(P){return u.create(P)}static equals(P,B){return i.create(P,B)}static notEquals(P,B){return l.create(P,B)}static regex(P,B){return h.create(P,B)}static in(P,B){return f.create(P,B)}static notIn(P,B){return c.create(P,B)}static not(P){return s.create(P)}static and(...P){return w.create(P,null,!0)}static or(...P){return D.create(P,null,!0)}static greater(P,B){return n.create(P,B)}static greaterEquals(P,B){return a.create(P,B)}static smaller(P,B){return o.create(P,B)}static smallerEquals(P,B){return g.create(P,B)}static deserialize(P,B=!1){if(!!P)return this._deserializeOrExpression(P,B)}static _deserializeOrExpression(P,B){const V=P.split("||");return D.create(V.map(z=>this._deserializeAndExpression(z,B)),null,!0)}static _deserializeAndExpression(P,B){const V=P.split("&&");return w.create(V.map(z=>this._deserializeOne(z,B)),null,!0)}static _deserializeOne(P,B){if(P=P.trim(),P.indexOf("!=")>=0){const V=P.split("!=");return l.create(V[0].trim(),this._deserializeValue(V[1],B))}if(P.indexOf("==")>=0){const V=P.split("==");return i.create(V[0].trim(),this._deserializeValue(V[1],B))}if(P.indexOf("=~")>=0){const V=P.split("=~");return h.create(V[0].trim(),this._deserializeRegexValue(V[1],B))}if(P.indexOf(" not in ")>=0){const V=P.split(" not in ");return c.create(V[0].trim(),this._deserializeValue(V[1],B))}if(P.indexOf(" in ")>=0){const V=P.split(" in ");return f.create(V[0].trim(),this._deserializeValue(V[1],B))}if(/^[^<=>]+>=[^<=>]+$/.test(P)){const V=P.split(">=");return a.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(P)){const V=P.split(">");return n.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(P)){const V=P.split("<=");return g.create(V[0].trim(),V[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(P)){const V=P.split("<");return o.create(V[0].trim(),V[1].trim())}return/^\!\s*/.test(P)?s.create(P.substr(1).trim()):u.create(P)}static _deserializeValue(P,B){if(P=P.trim(),P==="true")return!0;if(P==="false")return!1;const V=/^'([^']*)'$/.exec(P);return V?V[1].trim():P}static _deserializeRegexValue(P,B){if((0,p.isFalsyOrWhitespace)(P)){if(B)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}const V=P.indexOf("/"),z=P.lastIndexOf("/");if(V===z||V<0){if(B)throw new Error(`bad regexp-value '${P}', missing /-enclosure`);return console.warn(`bad regexp-value '${P}', missing /-enclosure`),null}const x=P.slice(V+1,z),H=P[z+1]==="i"?"i":"";try{return new RegExp(x,H)}catch(W){if(B)throw new Error(`bad regexp-value '${P}', parse error: ${W}`);return console.warn(`bad regexp-value '${P}', parse error: ${W}`),null}}}e.ContextKeyExpr=I;function b(N,P){const B=N?N.substituteConstants():void 0,V=P?P.substituteConstants():void 0;return!B&&!V?!0:!B||!V?!1:B.equals(V)}e.expressionsAreEqualWithConstantSubstitution=b;function S(N,P){return N.cmp(P)}class C{constructor(){this.type=0}cmp(P){return this.type-P.type}equals(P){return P.type===this.type}substituteConstants(){return this}evaluate(P){return!1}serialize(){return"false"}keys(){return[]}map(P){return this}negate(){return r.INSTANCE}}e.ContextKeyFalseExpr=C,C.INSTANCE=new C;class r{constructor(){this.type=1}cmp(P){return this.type-P.type}equals(P){return P.type===this.type}substituteConstants(){return this}evaluate(P){return!0}serialize(){return"true"}keys(){return[]}map(P){return this}negate(){return C.INSTANCE}}e.ContextKeyTrueExpr=r,r.INSTANCE=new r;class u{static create(P,B=null){const V=A.get(P);return typeof V=="boolean"?V?r.INSTANCE:C.INSTANCE:new u(P,B)}constructor(P,B){this.key=P,this.negated=B,this.type=2}cmp(P){return P.type!==this.type?this.type-P.type:T(this.key,P.key)}equals(P){return P.type===this.type?this.key===P.key:!1}substituteConstants(){const P=A.get(this.key);return typeof P=="boolean"?P?r.INSTANCE:C.INSTANCE:this}evaluate(P){return!!P.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}map(P){return P.mapDefined(this.key)}negate(){return this.negated||(this.negated=s.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=u;class i{static create(P,B,V=null){if(typeof B=="boolean")return B?u.create(P,V):s.create(P,V);const z=A.get(P);return typeof z=="boolean"?B===(z?"true":"false")?r.INSTANCE:C.INSTANCE:new i(P,B,V)}constructor(P,B,V){this.key=P,this.value=B,this.negated=V,this.type=4}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){const P=A.get(this.key);if(typeof P=="boolean"){const B=P?"true":"false";return this.value===B?r.INSTANCE:C.INSTANCE}return this}evaluate(P){return P.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}map(P){return P.mapEquals(this.key,this.value)}negate(){return this.negated||(this.negated=l.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=i;class f{static create(P,B){return new f(P,B)}constructor(P,B){this.key=P,this.valueKey=B,this.type=10,this.negated=null}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.valueKey,P.key,P.valueKey)}equals(P){return P.type===this.type?this.key===P.key&&this.valueKey===P.valueKey:!1}substituteConstants(){return this}evaluate(P){const B=P.getValue(this.valueKey),V=P.getValue(this.key);return Array.isArray(B)?B.includes(V):typeof V=="string"&&typeof B=="object"&&B!==null?k.call(B,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}map(P){return P.mapIn(this.key,this.valueKey)}negate(){return this.negated||(this.negated=c.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=f;class c{static create(P,B){return new c(P,B)}constructor(P,B){this.key=P,this.valueKey=B,this.type=11,this._negated=f.create(P,B)}cmp(P){return P.type!==this.type?this.type-P.type:this._negated.cmp(P._negated)}equals(P){return P.type===this.type?this._negated.equals(P._negated):!1}substituteConstants(){return this}evaluate(P){return!this._negated.evaluate(P)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}map(P){return P.mapNotIn(this.key,this.valueKey)}negate(){return this._negated}}e.ContextKeyNotInExpr=c;class l{static create(P,B,V=null){if(typeof B=="boolean")return B?s.create(P,V):u.create(P,V);const z=A.get(P);return typeof z=="boolean"?B===(z?"true":"false")?C.INSTANCE:r.INSTANCE:new l(P,B,V)}constructor(P,B,V){this.key=P,this.value=B,this.negated=V,this.type=5}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){const P=A.get(this.key);if(typeof P=="boolean"){const B=P?"true":"false";return this.value===B?C.INSTANCE:r.INSTANCE}return this}evaluate(P){return P.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}map(P){return P.mapNotEquals(this.key,this.value)}negate(){return this.negated||(this.negated=i.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=l;class s{static create(P,B=null){const V=A.get(P);return typeof V=="boolean"?V?C.INSTANCE:r.INSTANCE:new s(P,B)}constructor(P,B){this.key=P,this.negated=B,this.type=3}cmp(P){return P.type!==this.type?this.type-P.type:T(this.key,P.key)}equals(P){return P.type===this.type?this.key===P.key:!1}substituteConstants(){const P=A.get(this.key);return typeof P=="boolean"?P?C.INSTANCE:r.INSTANCE:this}evaluate(P){return!P.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}map(P){return P.mapNot(this.key)}negate(){return this.negated||(this.negated=u.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=s;function d(N,P){if(typeof N=="string"){const B=parseFloat(N);isNaN(B)||(N=B)}return typeof N=="string"||typeof N=="number"?P(N):C.INSTANCE}class n{static create(P,B,V=null){return d(B,z=>new n(P,z,V))}constructor(P,B,V){this.key=P,this.value=B,this.negated=V,this.type=12}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}map(P){return P.mapGreater(this.key,this.value)}negate(){return this.negated||(this.negated=g.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=n;class a{static create(P,B,V=null){return d(B,z=>new a(P,z,V))}constructor(P,B,V){this.key=P,this.value=B,this.negated=V,this.type=13}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}map(P){return P.mapGreaterEquals(this.key,this.value)}negate(){return this.negated||(this.negated=o.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=a;class o{static create(P,B,V=null){return d(B,z=>new o(P,z,V))}constructor(P,B,V){this.key=P,this.value=B,this.negated=V,this.type=14}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}map(P){return P.mapSmaller(this.key,this.value)}negate(){return this.negated||(this.negated=a.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerExpr=o;class g{static create(P,B,V=null){return d(B,z=>new g(P,z,V))}constructor(P,B,V){this.key=P,this.value=B,this.negated=V,this.type=15}cmp(P){return P.type!==this.type?this.type-P.type:_(this.key,this.value,P.key,P.value)}equals(P){return P.type===this.type?this.key===P.key&&this.value===P.value:!1}substituteConstants(){return this}evaluate(P){return typeof this.value=="string"?!1:parseFloat(P.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}map(P){return P.mapSmallerEquals(this.key,this.value)}negate(){return this.negated||(this.negated=n.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=g;class h{static create(P,B){return new h(P,B)}constructor(P,B){this.key=P,this.regexp=B,this.type=7,this.negated=null}cmp(P){if(P.type!==this.type)return this.type-P.type;if(this.key<P.key)return-1;if(this.key>P.key)return 1;const B=this.regexp?this.regexp.source:"",V=P.regexp?P.regexp.source:"";return B<V?-1:B>V?1:0}equals(P){if(P.type===this.type){const B=this.regexp?this.regexp.source:"",V=P.regexp?P.regexp.source:"";return this.key===P.key&&B===V}return!1}substituteConstants(){return this}evaluate(P){const B=P.getValue(this.key);return this.regexp?this.regexp.test(B):!1}serialize(){const P=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${P}`}keys(){return[this.key]}map(P){return P.mapRegex(this.key,this.regexp)}negate(){return this.negated||(this.negated=v.create(this)),this.negated}}e.ContextKeyRegexExpr=h;class v{static create(P){return new v(P)}constructor(P){this._actual=P,this.type=8}cmp(P){return P.type!==this.type?this.type-P.type:this._actual.cmp(P._actual)}equals(P){return P.type===this.type?this._actual.equals(P._actual):!1}substituteConstants(){return this}evaluate(P){return!this._actual.evaluate(P)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}map(P){return new v(this._actual.map(P))}negate(){return this._actual}}e.ContextKeyNotRegexExpr=v;function m(N){let P=null;for(let B=0,V=N.length;B<V;B++){const z=N[B].substituteConstants();if(N[B]!==z&&P===null){P=[];for(let x=0;x<B;x++)P[x]=N[x]}P!==null&&(P[B]=z)}return P===null?N:P}class w{static create(P,B,V){return w._normalizeArr(P,B,V)}constructor(P,B){this.expr=P,this.negated=B,this.type=6}cmp(P){if(P.type!==this.type)return this.type-P.type;if(this.expr.length<P.expr.length)return-1;if(this.expr.length>P.expr.length)return 1;for(let B=0,V=this.expr.length;B<V;B++){const z=S(this.expr[B],P.expr[B]);if(z!==0)return z}return 0}equals(P){if(P.type===this.type){if(this.expr.length!==P.expr.length)return!1;for(let B=0,V=this.expr.length;B<V;B++)if(!this.expr[B].equals(P.expr[B]))return!1;return!0}return!1}substituteConstants(){const P=m(this.expr);return P===this.expr?this:w.create(P,this.negated,!1)}evaluate(P){for(let B=0,V=this.expr.length;B<V;B++)if(!this.expr[B].evaluate(P))return!1;return!0}static _normalizeArr(P,B,V){const z=[];let x=!1;for(const H of P)if(!!H){if(H.type===1){x=!0;continue}if(H.type===0)return C.INSTANCE;if(H.type===6){z.push(...H.expr);continue}z.push(H)}if(z.length===0&&x)return r.INSTANCE;if(z.length!==0){if(z.length===1)return z[0];z.sort(S);for(let H=1;H<z.length;H++)z[H-1].equals(z[H])&&(z.splice(H,1),H--);if(z.length===1)return z[0];for(;z.length>1;){const H=z[z.length-1];if(H.type!==9)break;z.pop();const W=z.pop(),U=z.length===0,$=D.create(H.expr.map(q=>w.create([q,W],null,V)),null,U);$&&(z.push($),z.sort(S))}if(z.length===1)return z[0];if(V){for(let H=0;H<z.length;H++)for(let W=H+1;W<z.length;W++)if(z[H].negate().equals(z[W]))return C.INSTANCE;if(z.length===1)return z[0]}return new w(z,B)}}serialize(){return this.expr.map(P=>P.serialize()).join(" && ")}keys(){const P=[];for(const B of this.expr)P.push(...B.keys());return P}map(P){return new w(this.expr.map(B=>B.map(P)),null)}negate(){if(!this.negated){const P=[];for(const B of this.expr)P.push(B.negate());this.negated=D.create(P,this,!0)}return this.negated}}class D{static create(P,B,V){return D._normalizeArr(P,B,V)}constructor(P,B){this.expr=P,this.negated=B,this.type=9}cmp(P){if(P.type!==this.type)return this.type-P.type;if(this.expr.length<P.expr.length)return-1;if(this.expr.length>P.expr.length)return 1;for(let B=0,V=this.expr.length;B<V;B++){const z=S(this.expr[B],P.expr[B]);if(z!==0)return z}return 0}equals(P){if(P.type===this.type){if(this.expr.length!==P.expr.length)return!1;for(let B=0,V=this.expr.length;B<V;B++)if(!this.expr[B].equals(P.expr[B]))return!1;return!0}return!1}substituteConstants(){const P=m(this.expr);return P===this.expr?this:D.create(P,this.negated,!1)}evaluate(P){for(let B=0,V=this.expr.length;B<V;B++)if(this.expr[B].evaluate(P))return!0;return!1}static _normalizeArr(P,B,V){let z=[],x=!1;if(P){for(let H=0,W=P.length;H<W;H++){const U=P[H];if(!!U){if(U.type===0){x=!0;continue}if(U.type===1)return r.INSTANCE;if(U.type===9){z=z.concat(U.expr);continue}z.push(U)}}if(z.length===0&&x)return C.INSTANCE;z.sort(S)}if(z.length!==0){if(z.length===1)return z[0];for(let H=1;H<z.length;H++)z[H-1].equals(z[H])&&(z.splice(H,1),H--);if(z.length===1)return z[0];if(V){for(let H=0;H<z.length;H++)for(let W=H+1;W<z.length;W++)if(z[H].negate().equals(z[W]))return r.INSTANCE;if(z.length===1)return z[0]}return new D(z,B)}}serialize(){return this.expr.map(P=>P.serialize()).join(" || ")}keys(){const P=[];for(const B of this.expr)P.push(...B.keys());return P}map(P){return new D(this.expr.map(B=>B.map(P)),null)}negate(){if(!this.negated){const P=[];for(const B of this.expr)P.push(B.negate());for(;P.length>1;){const B=P.shift(),V=P.shift(),z=[];for(const x of O(B))for(const H of O(V))z.push(w.create([x,H],null,!1));P.unshift(D.create(z,null,!1))}this.negated=D.create(P,this,!0)}return this.negated}}class y extends u{static all(){return y._info.values()}constructor(P,B,V){super(P,null),this._defaultValue=B,typeof V=="object"?y._info.push({...V,key:P}):V!==!0&&y._info.push({key:P,description:V,type:B!=null?typeof B:void 0})}bindTo(P){return P.createKey(this.key,this._defaultValue)}getValue(P){return P.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(P){return i.create(this.key,P)}notEqualsTo(P){return l.create(this.key,P)}}e.RawContextKey=y,y._info=[],e.IContextKeyService=(0,R.createDecorator)("contextKeyService"),e.SET_CONTEXT_COMMAND_ID="setContext";function T(N,P){return N<P?-1:N>P?1:0}function _(N,P,B,V){return N<B?-1:N>B?1:P<V?-1:P>V?1:0}function L(N,P){if(N.type===0||P.type===1)return!0;if(N.type===9)return P.type===9?M(N.expr,P.expr):!1;if(P.type===9){for(const B of P.expr)if(L(N,B))return!0;return!1}if(N.type===6){if(P.type===6)return M(P.expr,N.expr);for(const B of N.expr)if(L(B,P))return!0;return!1}return N.equals(P)}e.implies=L;function M(N,P){let B=0,V=0;for(;B<N.length&&V<P.length;){const z=N[B].cmp(P[V]);if(z<0)return!1;z===0&&B++,V++}return B===N.length}function O(N){return N.type===9?N.expr:[N]}}),define(ae[59],le([1,0,1321,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorContextKeys=void 0;var R;(function(A){A.editorSimpleInput=new p.RawContextKey("editorSimpleInput",!1,!0),A.editorTextFocus=new p.RawContextKey("editorTextFocus",!1,t.localize(0,null)),A.focus=new p.RawContextKey("editorFocus",!1,t.localize(1,null)),A.textInputFocus=new p.RawContextKey("textInputFocus",!1,t.localize(2,null)),A.readOnly=new p.RawContextKey("editorReadonly",!1,t.localize(3,null)),A.inDiffEditor=new p.RawContextKey("inDiffEditor",!1,t.localize(4,null)),A.columnSelection=new p.RawContextKey("editorColumnSelection",!1,t.localize(5,null)),A.writable=A.readOnly.toNegated(),A.hasNonEmptySelection=new p.RawContextKey("editorHasSelection",!1,t.localize(6,null)),A.hasOnlyEmptySelection=A.hasNonEmptySelection.toNegated(),A.hasMultipleSelections=new p.RawContextKey("editorHasMultipleSelections",!1,t.localize(7,null)),A.hasSingleSelection=A.hasMultipleSelections.toNegated(),A.tabMovesFocus=new p.RawContextKey("editorTabMovesFocus",!1,t.localize(8,null)),A.tabDoesNotMoveFocus=A.tabMovesFocus.toNegated(),A.isInWalkThroughSnippet=new p.RawContextKey("isInEmbeddedEditor",!1,!0),A.canUndo=new p.RawContextKey("canUndo",!1,!0),A.canRedo=new p.RawContextKey("canRedo",!1,!0),A.hoverVisible=new p.RawContextKey("editorHoverVisible",!1,t.localize(9,null)),A.inCompositeEditor=new p.RawContextKey("inCompositeEditor",void 0,t.localize(10,null)),A.notInCompositeEditor=A.inCompositeEditor.toNegated(),A.languageId=new p.RawContextKey("editorLangId","",t.localize(11,null)),A.hasCompletionItemProvider=new p.RawContextKey("editorHasCompletionItemProvider",!1,t.localize(12,null)),A.hasCodeActionsProvider=new p.RawContextKey("editorHasCodeActionsProvider",!1,t.localize(13,null)),A.hasCodeLensProvider=new p.RawContextKey("editorHasCodeLensProvider",!1,t.localize(14,null)),A.hasDefinitionProvider=new p.RawContextKey("editorHasDefinitionProvider",!1,t.localize(15,null)),A.hasDeclarationProvider=new p.RawContextKey("editorHasDeclarationProvider",!1,t.localize(16,null)),A.hasImplementationProvider=new p.RawContextKey("editorHasImplementationProvider",!1,t.localize(17,null)),A.hasTypeDefinitionProvider=new p.RawContextKey("editorHasTypeDefinitionProvider",!1,t.localize(18,null)),A.hasHoverProvider=new p.RawContextKey("editorHasHoverProvider",!1,t.localize(19,null)),A.hasDocumentHighlightProvider=new p.RawContextKey("editorHasDocumentHighlightProvider",!1,t.localize(20,null)),A.hasDocumentSymbolProvider=new p.RawContextKey("editorHasDocumentSymbolProvider",!1,t.localize(21,null)),A.hasReferenceProvider=new p.RawContextKey("editorHasReferenceProvider",!1,t.localize(22,null)),A.hasRenameProvider=new p.RawContextKey("editorHasRenameProvider",!1,t.localize(23,null)),A.hasSignatureHelpProvider=new p.RawContextKey("editorHasSignatureHelpProvider",!1,t.localize(24,null)),A.hasInlayHintsProvider=new p.RawContextKey("editorHasInlayHintsProvider",!1,t.localize(25,null)),A.hasDocumentFormattingProvider=new p.RawContextKey("editorHasDocumentFormattingProvider",!1,t.localize(26,null)),A.hasDocumentSelectionFormattingProvider=new p.RawContextKey("editorHasDocumentSelectionFormattingProvider",!1,t.localize(27,null)),A.hasMultipleDocumentFormattingProvider=new p.RawContextKey("editorHasMultipleDocumentFormattingProvider",!1,t.localize(28,null)),A.hasMultipleDocumentSelectionFormattingProvider=new p.RawContextKey("editorHasMultipleDocumentSelectionFormattingProvider",!1,t.localize(29,null))})(R=e.EditorContextKeys||(e.EditorContextKeys={}))}),define(ae[598],le([1,0,32,21,13,9,50,92,61,62,31,7]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSignatureHelp=e.Context=void 0,e.Context={Visible:new C.RawContextKey("parameterHintsVisible",!1),MultipleSignatures:new C.RawContextKey("parameterHintsMultipleSignatures",!1)};async function r(u,i,f,c,l){const s=u.ordered(i);for(const d of s)try{const n=await d.provideSignatureHelp(i,f,l,c);if(n)return n}catch(n){(0,p.onUnexpectedExternalError)(n)}}e.provideSignatureHelp=r,S.CommandsRegistry.registerCommand("_executeSignatureHelpProvider",async(u,...i)=>{const[f,c,l]=i;(0,R.assertType)(A.URI.isUri(f)),(0,R.assertType)(k.Position.isIPosition(c)),(0,R.assertType)(typeof l=="string"||!l);const s=u.get(I.ILanguageFeaturesService),d=await u.get(b.ITextModelService).createModelReference(f);try{const n=await r(s.signatureHelpProvider,d.object.textEditorModel,k.Position.lift(c),{triggerKind:E.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:l},t.CancellationToken.None);return n?(setTimeout(()=>n.dispose(),0),n.value):void 0}finally{d.dispose()}})}),define(ae[2086],le([1,0,11,21,6,2,359,92,598]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var b;(function(r){let u;(function(c){c[c.Default=0]="Default",c[c.Active=1]="Active",c[c.Pending=2]="Pending"})(u=r.Type||(r.Type={})),r.Default={type:0};class i{constructor(l,s){this.request=l,this.previouslyActiveHints=s,this.type=2}}r.Pending=i;class f{constructor(l){this.hints=l,this.type=1}}r.Active=f})(b||(b={}));class S extends A.Disposable{constructor(u,i,f=S.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new R.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=b.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=u,this.providers=i,this.throttledDelayer=new t.Delayer(f),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(c=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(c=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(c=>this.onCursorChange(c))),this._register(this.editor.onDidChangeModelContent(c=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(c=>this.onDidType(c))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(u){this._state.type===2&&this._state.request.cancel(),this._state=u}cancel(u=!1){this.state=b.Default,this.throttledDelayer.cancel(),u||this._onChangedHints.fire(void 0)}trigger(u,i){const f=this.editor.getModel();if(!f||!this.providers.has(f))return;const c=++this.triggerId;this._pendingTriggers.push(u),this.throttledDelayer.trigger(()=>this.doTrigger(c),i).catch(p.onUnexpectedError)}next(){if(this.state.type!==1)return;const u=this.state.hints.signatures.length,i=this.state.hints.activeSignature,f=i%u===u-1,c=this.editor.getOption(77).cycle;if((u<2||f)&&!c){this.cancel();return}this.updateActiveSignature(f&&c?0:i+1)}previous(){if(this.state.type!==1)return;const u=this.state.hints.signatures.length,i=this.state.hints.activeSignature,f=i===0,c=this.editor.getOption(77).cycle;if((u<2||f)&&!c){this.cancel();return}this.updateActiveSignature(f&&c?u-1:i-1)}updateActiveSignature(u){this.state.type===1&&(this.state=new b.Active({...this.state.hints,activeSignature:u}),this._onChangedHints.fire(this.state.hints))}async doTrigger(u){const i=this.state.type===1||this.state.type===2,f=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const c=this._pendingTriggers.reduce(C);this._pendingTriggers=[];const l={triggerKind:c.triggerKind,triggerCharacter:c.triggerCharacter,isRetrigger:i,activeSignatureHelp:f};if(!this.editor.hasModel())return!1;const s=this.editor.getModel(),d=this.editor.getPosition();this.state=new b.Pending((0,t.createCancelablePromise)(n=>(0,I.provideSignatureHelp)(this.providers,s,d,l,n)),f);try{const n=await this.state.request;return u!==this.triggerId?(n?.dispose(),!1):!n||!n.value.signatures||n.value.signatures.length===0?(n?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new b.Active(n.value),this._lastSignatureHelpResult.value=n,this._onChangedHints.fire(this.state.hints),!0)}catch(n){return u===this.triggerId&&(this.state=b.Default),(0,p.onUnexpectedError)(n),!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.clear(),this.retriggerChars.clear();const u=this.editor.getModel();if(!!u)for(const i of this.providers.ordered(u)){for(const f of i.signatureHelpTriggerCharacters||[])if(f.length){const c=f.charCodeAt(0);this.triggerChars.add(c),this.retriggerChars.add(c)}for(const f of i.signatureHelpRetriggerCharacters||[])f.length&&this.retriggerChars.add(f.charCodeAt(0))}}onDidType(u){if(!this.triggerOnType)return;const i=u.length-1,f=u.charCodeAt(i);(this.triggerChars.has(f)||this.isTriggered&&this.retriggerChars.has(f))&&this.trigger({triggerKind:E.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:u.charAt(i)})}onCursorChange(u){u.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:E.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:E.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(77).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=S,S.DEFAULT_DELAY=120;function C(r,u){switch(u.triggerKind){case E.SignatureHelpTriggerKind.Invoke:return u;case E.SignatureHelpTriggerKind.ContentChange:return r;case E.SignatureHelpTriggerKind.TriggerCharacter:default:return u}}}),define(ae[2087],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let p=class ir{constructor(A,k){this._editor=A,this._index=0,this._ckOtherSuggestions=ir.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},E){if(A.items.length===0){this.reset();return}if(ir._moveIndex(!0,A,k)===k){this.reset();return}this._acceptNext=E,this._model=A,this._index=k,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(A,k,E){let I=E;for(;I=(I+k.items.length+(A?1:-1))%k.items.length,!(I===E||!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=ir._moveIndex(A,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};p.OtherSuggestions=new t.RawContextKey("hasOtherSuggestions",!1),p=we([F(1,t.IContextKeyService)],p),e.SuggestAlternatives=p}),define(ae[2088],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let p=class Ko{constructor(A,k){this._editor=A,this._enabled=!1,this._ckAtEnd=Ko.AtEnd.bindTo(k),this._configListener=this._editor.onDidChangeConfiguration(E=>E.hasChanged(113)&&this._update()),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose(),this._ckAtEnd.reset()}_update(){const A=this._editor.getOption(113)==="on";if(this._enabled!==A)if(this._enabled=A,this._enabled){const k=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const E=this._editor.getModel(),I=this._editor.getSelection(),b=E.getWordAtPosition(I.getStartPosition());if(!b){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(b.endColumn===I.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(k),k()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};p.AtEnd=new t.RawContextKey("atEndOfWord",!1),p=we([F(1,t.IContextKeyService)],p),e.WordContextKey=p}),define(ae[111],le([1,0,7,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.AccessibilitySupport=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,p.createDecorator)("accessibilityService");var R;(function(A){A[A.Unknown=0]="Unknown",A[A.Disabled=1]="Disabled",A[A.Enabled=2]="Enabled"})(R=e.AccessibilitySupport||(e.AccessibilitySupport={})),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new t.RawContextKey("accessibilityModeEnabled",!1)}),define(ae[2089],le([1,0,86,16,6,2,52,14,763,422,724,490,134,491,282,111]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let c=class extends A.Disposable{constructor(h,v,m,w){super(),this._accessibilityService=w,this._onDidChange=this._register(new R.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new R.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new r.ComputeOptionsMemory,this.isSimpleWidget=h,this._containerObserver=this._register(new I.ElementSizeObserver(m,v.dimension)),this._rawOptions=o(v),this._validatedOptions=a.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(u.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(C.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(b.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(t.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const h=this._computeOptions(),v=a.checkEquals(this.options,h);v!==null&&(this.options=h,this._onDidChangeFast.fire(v),this._onDidChange.fire(v))}_computeOptions(){const h=this._readEnvConfiguration(),v=i.BareFontInfo.createFromValidatedSettings(this._validatedOptions,h.pixelRatio,this.isSimpleWidget),m=this._readFontInfo(v),w={memory:this._computeOptionsMemory,outerWidth:h.outerWidth,outerHeight:h.outerHeight-this._reservedHeight,fontInfo:m,extraEditorClassName:h.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:h.emptySelectionClipboard,pixelRatio:h.pixelRatio,tabFocusMode:C.TabFocus.getTabFocusMode(),accessibilitySupport:h.accessibilitySupport};return a.computeOptions(this._validatedOptions,w)}_readEnvConfiguration(){return{extraEditorClassName:s(),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(h){return b.FontMeasurements.readFontInfo(h)}getRawOptions(){return this._rawOptions}updateOptions(h){const v=o(h);!a.applyUpdate(this._rawOptions,v)||(this._validatedOptions=a.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(h){this._containerObserver.observe(h)}setIsDominatedByLongLines(h){this._isDominatedByLongLines!==h&&(this._isDominatedByLongLines=h,this._recomputeOptions())}setModelLineCount(h){const v=l(h);this._lineNumbersDigitCount!==v&&(this._lineNumbersDigitCount=v,this._recomputeOptions())}setViewLineCount(h){this._viewLineCount!==h&&(this._viewLineCount=h,this._recomputeOptions())}setReservedHeight(h){this._reservedHeight!==h&&(this._reservedHeight=h,this._recomputeOptions())}};c=we([F(3,f.IAccessibilityService)],c),e.EditorConfiguration=c;function l(g){let h=0;for(;g;)g=Math.floor(g/10),h++;return h||1}function s(){let g="";return!t.isSafari&&!t.isWebkitWebView&&(g+="no-user-select "),t.isSafari&&(g+="no-minimap-shadow ",g+="enable-user-select "),E.isMacintosh&&(g+="mac "),g}class d{constructor(){this._values=[]}_read(h){return this._values[h]}get(h){return this._values[h]}_write(h,v){this._values[h]=v}}class n{constructor(){this._values=[]}_read(h){if(h>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[h]}get(h){return this._read(h)}_write(h,v){this._values[h]=v}}e.ComputedEditorOptions=n;class a{static validateOptions(h){const v=new d;for(const m of r.editorOptionsRegistry){const w=m.name==="_never_"?void 0:h[m.name];v._write(m.id,m.validate(w))}return v}static computeOptions(h,v){const m=new n;for(const w of r.editorOptionsRegistry)m._write(w.id,w.compute(v,m,h._read(w.id)));return m}static _deepEquals(h,v){if(typeof h!="object"||typeof v!="object"||!h||!v)return h===v;if(Array.isArray(h)||Array.isArray(v))return Array.isArray(h)&&Array.isArray(v)?p.equals(h,v):!1;if(Object.keys(h).length!==Object.keys(v).length)return!1;for(const m in h)if(!a._deepEquals(h[m],v[m]))return!1;return!0}static checkEquals(h,v){const m=[];let w=!1;for(const D of r.editorOptionsRegistry){const y=!a._deepEquals(h._read(D.id),v._read(D.id));m[D.id]=y,y&&(w=!0)}return w?new r.ConfigurationChangedEvent(m):null}static applyUpdate(h,v){let m=!1;for(const w of r.editorOptionsRegistry)if(v.hasOwnProperty(w.name)){const D=w.applyUpdate(h[w.name],v[w.name]);h[w.name]=D.newValue,m=m||D.didChange}return m}}function o(g){const h=k.deepClone(g);return(0,S.migrateOptions)(h),h}}),define(ae[141],le([1,0,14,1408,7]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.ProductQualityContext=e.IsDevelopmentContext=e.IsMobileContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new R.RawContextKey("isMac",t.isMacintosh,(0,p.localize)(0,null)),e.IsLinuxContext=new R.RawContextKey("isLinux",t.isLinux,(0,p.localize)(1,null)),e.IsWindowsContext=new R.RawContextKey("isWindows",t.isWindows,(0,p.localize)(2,null)),e.IsWebContext=new R.RawContextKey("isWeb",t.isWeb,(0,p.localize)(3,null)),e.IsMacNativeContext=new R.RawContextKey("isMacNative",t.isMacintosh&&!t.isWeb,(0,p.localize)(4,null)),e.IsIOSContext=new R.RawContextKey("isIOS",t.isIOS,(0,p.localize)(5,null)),e.IsMobileContext=new R.RawContextKey("isMobile",t.isMobile,(0,p.localize)(6,null)),e.IsDevelopmentContext=new R.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new R.RawContextKey("productQualityType","",(0,p.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new R.RawContextKey(e.InputFocusedContextKey,!1,(0,p.localize)(8,null))}),define(ae[37],le([1,0,5]),function(J,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(ae[330],le([1,0,5]),function(J,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 p{constructor(){this.secretVault={}}async getPassword(A,k){return this.secretVault[A]?.[k]??null}async setPassword(A,k,E){this.secretVault[A]=this.secretVault[A]??{},this.secretVault[A][k]=E}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 E of Object.keys(this.secretVault[A]||{}))k.push({account:E,password:this.secretVault[A][E]});return k}async clear(){this.secretVault={}}}e.InMemoryCredentialsProvider=p}),define(ae[427],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionHostDebugService=void 0,e.IExtensionHostDebugService=(0,t.createDecorator)("extensionHostDebugService")}),define(ae[599],le([1,0,5]),function(J,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 p(A){return!!A.hostName&&!!A.errorMessage}e.isRemoteDiagnosticError=p;class R{async getPerformanceInfo(k,E){return{}}async getSystemInfo(k,E){return{processArgs:"nullProcessArgs",gpuStatus:"nullGpuStatus",screenReader:"nullScreenReader",remoteData:[],os:"nullOs",memory:"nullMemory",vmHint:"nullVmHint"}}async getDiagnostics(k,E){return""}async getWorkspaceFileExtensions(k){return{extensions:[]}}async reportWorkspaceStats(k){}}e.NullDiagnosticsService=R}),define(ae[47],le([1,0,18,1409,5]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFileNamesMessage=e.ConfirmResult=e.IFileDialogService=e.IDialogService=void 0,e.IDialogService=(0,R.createDecorator)("dialogService"),e.IFileDialogService=(0,R.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 E(I){const b=[];return b.push(...I.slice(0,k).map(S=>typeof S=="string"?S:(0,t.basename)(S))),I.length>k&&(I.length-k===1?b.push((0,p.localize)(0,null)):b.push((0,p.localize)(1,null,I.length-k))),b.push(""),b.join(` `)}e.getFileNamesMessage=E}),define(ae[373],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDownloadService=void 0,e.IDownloadService=(0,t.createDecorator)("downloadService")}),define(ae[81],le([1,0,5]),function(J,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(ae[82],le([1,0,1411,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesLocalizedLabel=e.PreferencesLabel=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 R(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=R;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,s){switch(l){case 3:return s==="x64"?"win32-x64":s==="ia32"?"win32-ia32":s==="arm64"?"win32-arm64":"unknown";case 2:return s==="x64"?"linux-x64":s==="arm64"?"linux-arm64":s==="arm"?"linux-armhf":"unknown";case"alpine":return s==="x64"?"alpine-x64":s==="arm64"?"alpine-arm64":"unknown";case 1:return s==="x64"?"darwin-x64":s==="arm64"?"darwin-arm64":"unknown";case 0:return"web"}}e.getTargetPlatform=k;function E(l,s){return s==="web"&&!l.includes("web")}e.isNotWebExtensionInWebTargetPlatform=E;function I(l,s,d){return E(s,d)?!1:l==="undefined"||l==="universal"?!0:l==="unknown"?!1:l===d?!0:b(d).includes(l)}e.isTargetPlatformCompatible=I;function b(l){switch(l){case"win32-x64":return["win32-ia32"];case"win32-arm64":return["win32-ia32"]}return[]}e.getFallbackTargetPlarforms=b;function S(l){return l&&typeof l=="object"&&typeof l.id=="string"&&(!l.uuid||typeof l.uuid=="string")}e.isIExtensionIdentifier=S;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 r;(function(l){l[l.Default=0]="Default",l[l.Ascending=1]="Ascending",l[l.Descending=2]="Descending"})(r=e.SortOrder||(e.SortOrder={}));var u;(function(l){l.Install="install",l.Uninstall="uninstall"})(u=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,p.createDecorator)("extensionGalleryService");var f;(function(l){l.Unsupported="Unsupported",l.Deprecated="Deprecated",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",l.Signature="Signature"})(f=e.ExtensionManagementErrorCode||(e.ExtensionManagementErrorCode={}));class c extends Error{constructor(s,d){super(s),this.code=d,this.name=d}}e.ExtensionManagementError=c,e.IExtensionManagementService=(0,p.createDecorator)("extensionManagementService"),e.DISABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/disabled",e.ENABLED_EXTENSIONS_STORAGE_PATH="extensionsIdentifiers/enabled",e.IGlobalExtensionEnablementService=(0,p.createDecorator)("IGlobalExtensionEnablementService"),e.IExtensionTipsService=(0,p.createDecorator)("IExtensionTipsService"),e.ExtensionsLabel=(0,t.localize)(0,null),e.ExtensionsLocalizedLabel={value:e.ExtensionsLabel,original:"Extensions"},e.PreferencesLabel=(0,t.localize)(1,null),e.PreferencesLocalizedLabel={value:e.PreferencesLabel,original:"Preferences"}}),define(ae[792],le([1,0,6,2,165,52,9,759,82]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTipsChannel=e.ExtensionManagementChannelClient=e.ExtensionManagementChannel=void 0;function b(c,l){return k.URI.revive(l?l.transformIncoming(c):c)}function S(c,l){return l?l.transformOutgoingURI(c):c}function C(c,l){l=l||E.DefaultURITransformer;const s=c.manifest;return{...(0,E.transformAndReviveIncomingURIs)({...c,manifest:void 0},l),manifest:s}}function r(c,l){return l?(0,A.cloneAndChange)(c,s=>s instanceof k.URI?l.transformOutgoingURI(s):void 0):c}class u{constructor(l,s){this.service=l,this.getUriTransformer=s,this.onInstallExtension=t.Event.buffer(l.onInstallExtension,!0),this.onDidInstallExtensions=t.Event.buffer(l.onDidInstallExtensions,!0),this.onUninstallExtension=t.Event.buffer(l.onUninstallExtension,!0),this.onDidUninstallExtension=t.Event.buffer(l.onDidUninstallExtension,!0)}listen(l,s){const d=this.getUriTransformer(l);switch(s){case"onInstallExtension":return this.onInstallExtension;case"onDidInstallExtensions":return t.Event.map(this.onDidInstallExtensions,n=>n.map(a=>({...a,local:a.local?r(a.local,d):a.local})));case"onUninstallExtension":return this.onUninstallExtension;case"onDidUninstallExtension":return this.onDidUninstallExtension}throw new Error("Invalid listen")}call(l,s,d){const n=this.getUriTransformer(l);switch(s){case"zip":return this.service.zip(C(d[0],n)).then(a=>S(a,n));case"unzip":return this.service.unzip(b(d[0],n));case"install":return this.service.install(b(d[0],n),(0,R.revive)(d[1]));case"getManifest":return this.service.getManifest(b(d[0],n));case"getTargetPlatform":return this.service.getTargetPlatform();case"canInstall":return this.service.canInstall(d[0]);case"installFromGallery":return this.service.installFromGallery(d[0],(0,R.revive)(d[1]));case"uninstall":return this.service.uninstall(C(d[0],n),(0,R.revive)(d[1]));case"reinstallFromGallery":return this.service.reinstallFromGallery(C(d[0],n));case"getInstalled":return this.service.getInstalled(d[0],k.URI.revive(d[1])).then(a=>a.map(o=>r(o,n)));case"getMetadata":return this.service.getMetadata(C(d[0],n));case"updateMetadata":return this.service.updateMetadata(C(d[0],n),d[1]).then(a=>r(a,n));case"updateExtensionScope":return this.service.updateExtensionScope(C(d[0],n),d[1]).then(a=>r(a,n));case"getExtensionsControlManifest":return this.service.getExtensionsControlManifest();case"download":return this.service.download(d[0],d[1])}throw new Error("Invalid call")}}e.ExtensionManagementChannel=u;class i extends p.Disposable{get onInstallExtension(){return this._onInstallExtension.event}get onDidInstallExtensions(){return this._onDidInstallExtensions.event}get onUninstallExtension(){return this._onUninstallExtension.event}get onDidUninstallExtension(){return this._onDidUninstallExtension.event}constructor(l){super(),this.channel=l,this._onInstallExtension=this._register(new t.Emitter),this._onDidInstallExtensions=this._register(new t.Emitter),this._onUninstallExtension=this._register(new t.Emitter),this._onDidUninstallExtension=this._register(new t.Emitter),this._register(this.channel.listen("onInstallExtension")(s=>this._onInstallExtension.fire({identifier:s.identifier,source:this.isUriComponents(s.source)?k.URI.revive(s.source):s.source,profileLocation:k.URI.revive(s.profileLocation)}))),this._register(this.channel.listen("onDidInstallExtensions")(s=>this._onDidInstallExtensions.fire(s.map(d=>({...d,local:d.local?C(d.local,null):d.local,source:this.isUriComponents(d.source)?k.URI.revive(d.source):d.source,profileLocation:k.URI.revive(d.profileLocation)}))))),this._register(this.channel.listen("onUninstallExtension")(s=>this._onUninstallExtension.fire({identifier:s.identifier,profileLocation:k.URI.revive(s.profileLocation)}))),this._register(this.channel.listen("onDidUninstallExtension")(s=>this._onDidUninstallExtension.fire({...s,profileLocation:k.URI.revive(s.profileLocation)})))}isUriComponents(l){return l?typeof l.path=="string"&&typeof l.scheme=="string":!1}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=this.channel.call("getTargetPlatform")),this._targetPlatformPromise}async canInstall(l){const s=await this.getTargetPlatform();return l.allTargetPlatforms.some(d=>(0,I.isTargetPlatformCompatible)(d,l.allTargetPlatforms,s))}zip(l){return Promise.resolve(this.channel.call("zip",[l]).then(s=>k.URI.revive(s)))}unzip(l){return Promise.resolve(this.channel.call("unzip",[l]))}install(l,s){return Promise.resolve(this.channel.call("install",[l,s])).then(d=>C(d,null))}getManifest(l){return Promise.resolve(this.channel.call("getManifest",[l]))}installFromGallery(l,s){return Promise.resolve(this.channel.call("installFromGallery",[l,s])).then(d=>C(d,null))}uninstall(l,s){return Promise.resolve(this.channel.call("uninstall",[l,s]))}reinstallFromGallery(l){return Promise.resolve(this.channel.call("reinstallFromGallery",[l]))}getInstalled(l=null,s){return Promise.resolve(this.channel.call("getInstalled",[l,s])).then(d=>d.map(n=>C(n,null)))}getMetadata(l){return Promise.resolve(this.channel.call("getMetadata",[l]))}updateMetadata(l,s){return Promise.resolve(this.channel.call("updateMetadata",[l,s])).then(d=>C(d,null))}updateExtensionScope(l,s){return Promise.resolve(this.channel.call("updateExtensionScope",[l,s])).then(d=>C(d,null))}getExtensionsControlManifest(){return Promise.resolve(this.channel.call("getExtensionsControlManifest"))}async download(l,s){const d=await this.channel.call("download",[l,s]);return k.URI.revive(d)}registerParticipant(){throw new Error("Not Supported")}}e.ExtensionManagementChannelClient=i;class f{constructor(l){this.service=l}listen(l,s){throw new Error("Invalid listen")}call(l,s,d){switch(s){case"getConfigBasedTips":return this.service.getConfigBasedTips(k.URI.revive(d[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=f}),define(ae[793],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlTrustService=void 0,e.IExtensionUrlTrustService=(0,t.createDecorator)("extensionUrlTrustService")}),define(ae[428],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionRecommendationNotificationService=e.RecommendationsNotificationResult=e.RecommendationSourceToString=e.RecommendationSource=void 0;var p;(function(k){k[k.FILE=1]="FILE",k[k.WORKSPACE=2]="WORKSPACE",k[k.EXE=3]="EXE"})(p=e.RecommendationSource||(e.RecommendationSource={}));function R(k){switch(k){case 1:return"file";case 2:return"workspace";case 3:return"exe"}}e.RecommendationSourceToString=R;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(ae[794],le([1,0,5]),function(J,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(ae[795],le([1,0,5]),function(J,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(ae[19],le([1,0,220,53,28,13,9,1418,5]),function(J,e,t,p,R,A,k,E,I){"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,I.createDecorator)("fileService");function b(x){return x.create===!0}e.isFileOpenForWriteOptions=b;var S;(function(x){x[x.Unknown=0]="Unknown",x[x.File=1]="File",x[x.Directory=2]="Directory",x[x.SymbolicLink=64]="SymbolicLink"})(S=e.FileType||(e.FileType={}));var C;(function(x){x[x.Readonly=1]="Readonly"})(C=e.FilePermission||(e.FilePermission={}));var r;(function(x){x[x.FileReadWrite=2]="FileReadWrite",x[x.FileOpenReadWriteClose=4]="FileOpenReadWriteClose",x[x.FileReadStream=16]="FileReadStream",x[x.FileFolderCopy=8]="FileFolderCopy",x[x.PathCaseSensitive=1024]="PathCaseSensitive",x[x.Readonly=2048]="Readonly",x[x.Trash=4096]="Trash",x[x.FileWriteUnlock=8192]="FileWriteUnlock",x[x.FileAtomicRead=16384]="FileAtomicRead",x[x.FileClone=32768]="FileClone"})(r=e.FileSystemProviderCapabilities||(e.FileSystemProviderCapabilities={}));function u(x){return!!(x.capabilities&2)}e.hasReadWriteCapability=u;function i(x){return!!(x.capabilities&8)}e.hasFileFolderCopyCapability=i;function f(x){return!!(x.capabilities&32768)}e.hasFileCloneCapability=f;function c(x){return!!(x.capabilities&4)}e.hasOpenReadWriteCloseCapability=c;function l(x){return!!(x.capabilities&16)}e.hasFileReadStreamCapability=l;function s(x){return u(x)?!!(x.capabilities&16384):!1}e.hasFileAtomicReadCapability=s;var d;(function(x){x.FileExists="EntryExists",x.FileNotFound="EntryNotFound",x.FileNotADirectory="EntryNotADirectory",x.FileIsADirectory="EntryIsADirectory",x.FileExceedsMemoryLimit="EntryExceedsMemoryLimit",x.FileTooLarge="EntryTooLarge",x.FileWriteLocked="EntryWriteLocked",x.NoPermissions="NoPermissions",x.Unavailable="Unavailable",x.Unknown="Unknown"})(d=e.FileSystemProviderErrorCode||(e.FileSystemProviderErrorCode={}));class n extends Error{constructor(H,W){super(H),this.code=W}}e.FileSystemProviderError=n;function a(x,H){const W=new n(x.toString(),H);return g(W,H),W}e.createFileSystemProviderError=a;function o(x){return x||a((0,E.localize)(0,null),d.Unknown)}e.ensureFileSystemProviderError=o;function g(x,H){return x.name=H?`${H} (FileSystemError)`:"FileSystemError",x}e.markAsFileSystemProviderError=g;function h(x){if(!x)return d.Unknown;if(x instanceof n)return x.code;const H=/^(.+) \(FileSystemError\)$/.exec(x.name);if(!H)return d.Unknown;switch(H[1]){case d.FileExists:return d.FileExists;case d.FileIsADirectory:return d.FileIsADirectory;case d.FileNotADirectory:return d.FileNotADirectory;case d.FileNotFound:return d.FileNotFound;case d.FileExceedsMemoryLimit:return d.FileExceedsMemoryLimit;case d.FileTooLarge:return d.FileTooLarge;case d.FileWriteLocked:return d.FileWriteLocked;case d.NoPermissions:return d.NoPermissions;case d.Unavailable:return d.Unavailable}return d.Unknown}e.toFileSystemProviderErrorCode=h;function v(x){if(x instanceof _)return x.fileOperationResult;switch(h(x)){case d.FileNotFound:return 1;case d.FileIsADirectory:return 0;case d.FileNotADirectory:return 10;case d.FileWriteLocked:return 5;case d.NoPermissions:return 6;case d.FileExists:return 4;case d.FileExceedsMemoryLimit:return 9;case d.FileTooLarge:return 7;default:return 11}}e.toFileOperationResult=v;var m;(function(x){x[x.CREATE=0]="CREATE",x[x.DELETE=1]="DELETE",x[x.MOVE=2]="MOVE",x[x.COPY=3]="COPY",x[x.WRITE=4]="WRITE"})(m=e.FileOperation||(e.FileOperation={}));class w{constructor(H,W,U){this.resource=H,this.operation=W,this.target=U}isOperation(H){return this.operation===H}}e.FileOperationEvent=w;var D;(function(x){x[x.UPDATED=0]="UPDATED",x[x.ADDED=1]="ADDED",x[x.DELETED=2]="DELETED"})(D=e.FileChangeType||(e.FileChangeType={}));class y{constructor(H,W){this.added=void 0,this.updated=void 0,this.deleted=void 0,this.rawChanges=[],this.rawAdded=[],this.rawUpdated=[],this.rawDeleted=[],this.rawChanges=H;const U=new Map;for(const $ of H){const q=U.get($.type);switch(q?q.push([$.resource,$]):U.set($.type,[[$.resource,$]]),$.type){case 1:this.rawAdded.push($.resource);break;case 0:this.rawUpdated.push($.resource);break;case 2:this.rawDeleted.push($.resource);break}}for(const[$,q]of U)switch($){case 1:this.added=t.TernarySearchTree.forUris(()=>W),this.added.fill(q);break;case 0:this.updated=t.TernarySearchTree.forUris(()=>W),this.updated.fill(q);break;case 2:this.deleted=t.TernarySearchTree.forUris(()=>W),this.deleted.fill(q);break}}contains(H,...W){return this.doContains(H,{includeChildren:!1},...W)}affects(H,...W){return this.doContains(H,{includeChildren:!0},...W)}doContains(H,W,...U){if(!H)return!1;const $=U.length>0;return!!((!$||U.includes(1))&&(this.added?.get(H)||W.includeChildren&&this.added?.findSuperstr(H))||(!$||U.includes(0))&&(this.updated?.get(H)||W.includeChildren&&this.updated?.findSuperstr(H))||(!$||U.includes(2))&&(this.deleted?.findSubstr(H)||W.includeChildren&&this.deleted?.findSuperstr(H)))}gotAdded(){return!!this.added}gotDeleted(){return!!this.deleted}gotUpdated(){return!!this.updated}}e.FileChangesEvent=y;function T(x,H,W){return!x||!H||x===H||H.length>x.length?!1:(H.charAt(H.length-1)!==p.sep&&(H+=p.sep),W?(0,R.startsWithIgnoreCase)(x,H):x.indexOf(H)===0)}e.isParent=T;class _ extends Error{constructor(H,W,U){super(H),this.fileOperationResult=W,this.options=U}}e.FileOperationError=_;class L extends _{constructor(H,W,U){super(H,2,U),this.stat=W}}e.NotModifiedSinceFileOperationError=L;var M;(function(x){x[x.FILE_IS_DIRECTORY=0]="FILE_IS_DIRECTORY",x[x.FILE_NOT_FOUND=1]="FILE_NOT_FOUND",x[x.FILE_NOT_MODIFIED_SINCE=2]="FILE_NOT_MODIFIED_SINCE",x[x.FILE_MODIFIED_SINCE=3]="FILE_MODIFIED_SINCE",x[x.FILE_MOVE_CONFLICT=4]="FILE_MOVE_CONFLICT",x[x.FILE_WRITE_LOCKED=5]="FILE_WRITE_LOCKED",x[x.FILE_PERMISSION_DENIED=6]="FILE_PERMISSION_DENIED",x[x.FILE_TOO_LARGE=7]="FILE_TOO_LARGE",x[x.FILE_INVALID_PATH=8]="FILE_INVALID_PATH",x[x.FILE_EXCEEDS_MEMORY_LIMIT=9]="FILE_EXCEEDS_MEMORY_LIMIT",x[x.FILE_NOT_DIRECTORY=10]="FILE_NOT_DIRECTORY",x[x.FILE_OTHER_ERROR=11]="FILE_OTHER_ERROR"})(M=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 O;(function(x){x[x.FILE=0]="FILE",x[x.FOLDER=1]="FOLDER",x[x.ROOT_FOLDER=2]="ROOT_FOLDER"})(O=e.FileKind||(e.FileKind={})),e.ETAG_DISABLED="";function N(x){if(!(typeof x.size!="number"||typeof x.mtime!="number"))return x.mtime.toString(29)+x.size.toString(31)}e.etag=N;async function P(x,H){if(!H.hasProvider(k.URI.from({scheme:x.scheme})))return new Promise(W=>{const U=H.onDidChangeFileSystemProviderRegistrations($=>{$.scheme===x.scheme&&$.added&&(U.dispose(),W())})})}e.whenProviderRegistered=P,e.MIN_MAX_MEMORY_SIZE_MB=2048,e.FALLBACK_MAX_MEMORY_SIZE_MB=4096;class B{static formatSize(H){return(0,A.isNumber)(H)||(H=0),H<B.KB?(0,E.localize)(1,null,H.toFixed(0)):H<B.MB?(0,E.localize)(2,null,(H/B.KB).toFixed(2)):H<B.GB?(0,E.localize)(3,null,(H/B.MB).toFixed(2)):H<B.TB?(0,E.localize)(4,null,(H/B.GB).toFixed(2)):(0,E.localize)(5,null,(H/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 V;(function(x){x[x.IA32=0]="IA32",x[x.OTHER=1]="OTHER"})(V=e.Arch||(e.Arch={}));function z(x){return{maxFileSize:x===0?300*B.MB:16*B.GB,maxHeapSize:x===0?700*B.MB:2*700*B.MB}}e.getPlatformLimits=z}),define(ae[2090],le([1,0,1416,9,56,6,2,22,53,14,18,219,19,426]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HTMLFileSystemProvider=void 0;class i{get capabilities(){return this._capabilities||(this._capabilities=18,b.isLinux&&(this._capabilities|=1024)),this._capabilities}constructor(c,l,s){this.indexedDB=c,this.store=l,this.logService=s,this.onDidChangeCapabilities=A.Event.None,this.onDidChangeFile=A.Event.None,this.extUri=b.isLinux?S.extUri:S.extUriIgnorePathCase,this._files=new Map,this._directories=new Map}async stat(c){try{const l=await this.getHandle(c);if(!l)throw this.createFileSystemProviderError(c,"No such file or directory, stat",r.FileSystemProviderErrorCode.FileNotFound);if(u.WebFileSystemAccess.isFileSystemFileHandle(l)){const s=await l.getFile();return{type:r.FileType.File,mtime:s.lastModified,ctime:0,size:s.size}}return{type:r.FileType.Directory,mtime:0,ctime:0,size:0}}catch(l){throw this.toFileSystemProviderError(l)}}async readdir(c){try{const l=await this.getDirectoryHandle(c);if(!l)throw this.createFileSystemProviderError(c,"No such file or directory, readdir",r.FileSystemProviderErrorCode.FileNotFound);const s=[];for await(const[d,n]of l)s.push([d,u.WebFileSystemAccess.isFileSystemFileHandle(n)?r.FileType.File:r.FileType.Directory]);return s}catch(l){throw this.toFileSystemProviderError(l)}}readFileStream(c,l,s){const d=(0,C.newWriteableStream)(n=>R.VSBuffer.concat(n.map(a=>R.VSBuffer.wrap(a))).buffer,{highWaterMark:10});return(async()=>{try{const n=await this.getFileHandle(c);if(!n)throw this.createFileSystemProviderError(c,"No such file or directory, readFile",r.FileSystemProviderErrorCode.FileNotFound);const a=await n.getFile();if(typeof l.length=="number"||typeof l.position=="number"){let o=new Uint8Array(await a.arrayBuffer());typeof l?.position=="number"&&(o=o.slice(l.position)),typeof l?.length=="number"&&(o=o.slice(0,l.length)),d.end(o)}else{const o=a.stream().getReader();let g=await o.read();for(;!g.done&&!(s.isCancellationRequested||(await d.write(g.value),s.isCancellationRequested));)g=await o.read();d.end(void 0)}}catch(n){d.error(this.toFileSystemProviderError(n)),d.end()}})(),d}async readFile(c){try{const l=await this.getFileHandle(c);if(!l)throw this.createFileSystemProviderError(c,"No such file or directory, readFile",r.FileSystemProviderErrorCode.FileNotFound);const s=await l.getFile();return new Uint8Array(await s.arrayBuffer())}catch(l){throw this.toFileSystemProviderError(l)}}async writeFile(c,l,s){try{let d=await this.getFileHandle(c);if(!s.create||!s.overwrite){if(d){if(!s.overwrite)throw this.createFileSystemProviderError(c,"File already exists, writeFile",r.FileSystemProviderErrorCode.FileExists)}else if(!s.create)throw this.createFileSystemProviderError(c,"No such file, writeFile",r.FileSystemProviderErrorCode.FileNotFound)}if(!d){const a=await this.getDirectoryHandle(this.extUri.dirname(c));if(!a)throw this.createFileSystemProviderError(c,"No such parent directory, writeFile",r.FileSystemProviderErrorCode.FileNotFound);if(d=await a.getFileHandle(this.extUri.basename(c),{create:!0}),!d)throw this.createFileSystemProviderError(c,"Unable to create file , writeFile",r.FileSystemProviderErrorCode.Unknown)}const n=await d.createWritable();await n.write(l),await n.close()}catch(d){throw this.toFileSystemProviderError(d)}}async mkdir(c){try{const l=await this.getDirectoryHandle(this.extUri.dirname(c));if(!l)throw this.createFileSystemProviderError(c,"No such parent directory, mkdir",r.FileSystemProviderErrorCode.FileNotFound);await l.getDirectoryHandle(this.extUri.basename(c),{create:!0})}catch(l){throw this.toFileSystemProviderError(l)}}async delete(c,l){try{const s=await this.getDirectoryHandle(this.extUri.dirname(c));if(!s)throw this.createFileSystemProviderError(c,"No such parent directory, delete",r.FileSystemProviderErrorCode.FileNotFound);return s.removeEntry(this.extUri.basename(c),{recursive:l.recursive})}catch(s){throw this.toFileSystemProviderError(s)}}async rename(c,l,s){try{if(this.extUri.isEqual(c,l))return;const d=await this.getFileHandle(c);if(d){const n=await d.getFile(),a=new Uint8Array(await n.arrayBuffer());await this.writeFile(l,a,{create:!0,overwrite:s.overwrite,unlock:!1}),await this.delete(c,{recursive:!1,useTrash:!1})}else throw this.createFileSystemProviderError(c,(0,t.localize)(0,null),r.FileSystemProviderErrorCode.Unavailable)}catch(d){throw this.toFileSystemProviderError(d)}}watch(c,l){return k.Disposable.None}registerFileHandle(c){return this.registerHandle(c,this._files)}registerDirectoryHandle(c){return this.registerHandle(c,this._directories)}get directories(){return this._directories.values()}async registerHandle(c,l){let s=`/${c.name}`;if(l.has(s)&&!await l.get(s)?.isSameEntry(c)){const d=(0,I.extname)(c.name),n=(0,I.basename)(c.name,d);let a=1;do s=`/${n}-${a++}${d}`;while(l.has(s)&&!await l.get(s)?.isSameEntry(c))}l.set(s,c);try{await this.indexedDB?.runInTransaction(this.store,"readwrite",d=>d.put(c,s))}catch(d){this.logService.error(d)}return p.URI.from({scheme:E.Schemas.file,path:s})}async getHandle(c){let l=await this.doGetHandle(c);if(!l){const s=await this.getDirectoryHandle(this.extUri.dirname(c));if(s){const d=S.extUri.basename(c);try{l=await s.getFileHandle(d)}catch{try{l=await s.getDirectoryHandle(d)}catch{}}}}return l}async getFileHandle(c){const l=await this.doGetHandle(c);if(l instanceof FileSystemFileHandle)return l;const s=await this.getDirectoryHandle(this.extUri.dirname(c));try{return await s?.getFileHandle(S.extUri.basename(c))}catch{return}}async getDirectoryHandle(c){const l=await this.doGetHandle(c);if(l instanceof FileSystemDirectoryHandle)return l;const s=this.extUri.dirname(c);if(this.extUri.isEqual(s,c))return;const d=await this.getDirectoryHandle(s);try{return await d?.getDirectoryHandle(S.extUri.basename(c))}catch{return}}async doGetHandle(c){if(this.extUri.dirname(c).path!=="/")return;const l=c.path.replace(/\/$/,""),s=this._files.get(l)??this._directories.get(l);if(s)return s;const d=await this.indexedDB?.runInTransaction(this.store,"readonly",n=>n.get(l));if(u.WebFileSystemAccess.isFileSystemHandle(d)){let n=await d.queryPermission()==="granted";try{n||(n=await d.requestPermission()==="granted")}catch(a){this.logService.error(a)}if(n)return u.WebFileSystemAccess.isFileSystemFileHandle(d)?this._files.set(l,d):u.WebFileSystemAccess.isFileSystemDirectoryHandle(d)&&this._directories.set(l,d),d}throw this.createFileSystemProviderError(c,"No file system handle registered",r.FileSystemProviderErrorCode.Unavailable)}toFileSystemProviderError(c){if(c instanceof r.FileSystemProviderError)return c;let l=r.FileSystemProviderErrorCode.Unknown;return c.name==="NotAllowedError"&&(c=new Error((0,t.localize)(1,null)),l=r.FileSystemProviderErrorCode.Unavailable),(0,r.createFileSystemProviderError)(c,l)}createFileSystemProviderError(c,l,s){return(0,r.createFileSystemProviderError)(new Error(`${l} (${(0,I.normalize)(c.path)})`),s)}}e.HTMLFileSystemProvider=i}),define(ae[796],le([1,0,56,117,21,6,2,219,9,72,19]),function(J,e,t,p,R,A,k,E,I,b,S){"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(u,i){super(),this.channel=u,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,b.generateUuid)(),this.registerFileChangeListeners()}get capabilities(){return this._capabilities||(this._capabilities=57374,this.extraCapabilities.pathCaseSensitive&&(this._capabilities|=1024),this.extraCapabilities.trash&&(this._capabilities|=4096)),this._capabilities}stat(u){return this.channel.call("stat",[u])}readdir(u){return this.channel.call("readdir",[u])}async readFile(u,i){const{buffer:f}=await this.channel.call("readFile",[u,i]);return f}readFileStream(u,i,f){const c=(0,E.newWriteableStream)(s=>t.VSBuffer.concat(s.map(d=>t.VSBuffer.wrap(d))).buffer),l=this.channel.listen("readFileStream",[u,i])(s=>{if(s instanceof t.VSBuffer)c.write(s.buffer);else{if(s==="end")c.end();else{let d=s;d instanceof Error||(d=(0,S.createFileSystemProviderError)((0,p.toErrorMessage)(d),S.FileSystemProviderErrorCode.Unknown)),c.error(d),c.end()}l.dispose()}});return f.onCancellationRequested(()=>{c.error((0,R.canceled)()),c.end(),l.dispose()}),c}writeFile(u,i,f){return this.channel.call("writeFile",[u,t.VSBuffer.wrap(i),f])}open(u,i){return this.channel.call("open",[u,i])}close(u){return this.channel.call("close",[u])}async read(u,i,f,c,l){const[s,d]=await this.channel.call("read",[u,i,l]);return f.set(s.buffer.slice(0,d),c),d}write(u,i,f,c,l){return this.channel.call("write",[u,i,t.VSBuffer.wrap(f),c,l])}mkdir(u){return this.channel.call("mkdir",[u])}delete(u,i){return this.channel.call("delete",[u,i])}rename(u,i,f){return this.channel.call("rename",[u,i,f])}copy(u,i,f){return this.channel.call("copy",[u,i,f])}cloneFile(u,i){return this.channel.call("cloneFile",[u,i])}registerFileChangeListeners(){this._register(this.channel.listen("fileChange",[this.sessionId])(u=>{if(Array.isArray(u)){const i=u;this._onDidChange.fire(i.map(f=>({resource:I.URI.revive(f.resource),type:f.type})))}else{const i=u;this._onDidWatchError.fire(i)}}))}watch(u,i){const f=(0,b.generateUuid)();return this.channel.call("watch",[this.sessionId,f,u,i]),(0,k.toDisposable)(()=>this.channel.call("unwatch",[this.sessionId,f]))}}e.DiskFileSystemProviderClient=C}),define(ae[2091],le([1,0,56,21,1419,19]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readFileIntoStream=void 0;async function k(S,C,r,u,i,f){let c;try{await E(S,C,r,u,i,f)}catch(l){c=l}finally{c&&i.errorTransformer&&(c=i.errorTransformer(c)),typeof c<"u"&&r.error(c),r.end()}}e.readFileIntoStream=k;async function E(S,C,r,u,i,f){I(f);const c=await S.open(C,{create:!1});try{I(f);let l=0,s=0,d=i&&typeof i.length=="number"?i.length:void 0,n=t.VSBuffer.alloc(Math.min(i.bufferSize,typeof d=="number"?d:i.bufferSize)),a=i&&typeof i.position=="number"?i.position:0,o=0;do s=await S.read(c,a,n.buffer,o,n.byteLength-o),a+=s,o+=s,l+=s,typeof d=="number"&&(d-=s),o===n.byteLength&&(await r.write(u(n)),n=t.VSBuffer.alloc(Math.min(i.bufferSize,typeof d=="number"?d:i.bufferSize)),o=0);while(s>0&&(typeof d!="number"||d>0)&&I(f)&&b(l,i));if(o>0){let g=o;typeof d=="number"&&(g=Math.min(o,d)),r.write(u(n.slice(0,g)))}}catch(l){throw(0,A.ensureFileSystemProviderError)(l)}finally{await S.close(c)}}function I(S){if(S.isCancellationRequested)throw(0,p.canceled)();return!0}function b(S,C){if(C?.limits){if(typeof C.limits.memory=="number"&&S>C.limits.memory)throw(0,A.createFileSystemProviderError)((0,R.localize)(0,null),A.FileSystemProviderErrorCode.FileExceedsMemoryLimit);if(typeof C.limits.size=="number"&&S>C.limits.size)throw(0,A.createFileSystemProviderError)((0,R.localize)(1,null),A.FileSystemProviderErrorCode.FileTooLarge)}return!0}}),define(ae[600],le([1,0,144,2,53,14,9,19]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseWatcherPatterns=e.normalizeWatcherPattern=e.coalesceEvents=e.toFileChanges=e.AbstractUniversalWatcherClient=e.AbstractNonRecursiveWatcherClient=e.AbstractWatcherClient=e.isRecursiveWatchRequest=void 0;function I(l){return l.recursive===!0}e.isRecursiveWatchRequest=I;class b extends p.Disposable{constructor(s,d,n,a){super(),this.onFileChanges=s,this.onLogMessage=d,this.verboseLogging=n,this.options=a,this.watcherDisposables=this._register(new p.MutableDisposable),this.requests=void 0,this.restartCounter=0}init(){const s=new p.DisposableStore;this.watcherDisposables.value=s,this.watcher=this.createWatcher(s),this.watcher.setVerboseLogging(this.verboseLogging),s.add(this.watcher.onDidChangeFile(d=>this.onFileChanges(d))),s.add(this.watcher.onDidLogMessage(d=>this.onLogMessage(d))),s.add(this.watcher.onDidError(d=>this.onError(d)))}onError(s){this.options.restartOnError?this.restartCounter<b.MAX_RESTARTS&&this.requests?(this.error(`restarting watcher after error: ${s}`),this.restart(this.requests)):this.error(`gave up attempting to restart watcher after error: ${s}`):this.error(s)}restart(s){this.restartCounter++,this.init(),this.watch(s)}async watch(s){this.requests=s,await this.watcher?.watch(s)}async setVerboseLogging(s){this.verboseLogging=s,await this.watcher?.setVerboseLogging(s)}error(s){this.onLogMessage({type:"error",message:`[File Watcher (${this.options.type})] ${s}`})}dispose(){return this.watcher=void 0,super.dispose()}}e.AbstractWatcherClient=b,b.MAX_RESTARTS=5;class S extends b{constructor(s,d,n){super(s,d,n,{type:"node.js",restartOnError:!1})}}e.AbstractNonRecursiveWatcherClient=S;class C extends b{constructor(s,d,n){super(s,d,n,{type:"universal",restartOnError:!0})}}e.AbstractUniversalWatcherClient=C;function r(l){return l.map(s=>({type:s.type,resource:k.URI.file(s.path)}))}e.toFileChanges=r;function u(l){const s=new c;for(const d of l)s.processEvent(d);return s.coalesce()}e.coalesceEvents=u;function i(l,s){return typeof s=="string"&&!s.startsWith(t.GLOBSTAR)&&!(0,R.isAbsolute)(s)?{base:l,pattern:s}:s}e.normalizeWatcherPattern=i;function f(l,s){const d=[];for(const n of s)d.push((0,t.parse)(i(l,n)));return d}e.parseWatcherPatterns=f;class c{constructor(){this.coalesced=new Set,this.mapPathToChange=new Map}toKey(s){return A.isLinux?s.path:s.path.toLowerCase()}processEvent(s){const d=this.mapPathToChange.get(this.toKey(s));let n=!1;if(d){const a=d.type,o=s.type;d.path!==s.path&&(s.type===2||s.type===1)?n=!0:a===1&&o===2?(this.mapPathToChange.delete(this.toKey(s)),this.coalesced.delete(d)):a===2&&o===1?d.type=0:a===1&&o===0||(d.type=o)}else n=!0;n&&(this.coalesced.add(s),this.mapPathToChange.set(this.toKey(s),s))}coalesce(){const s=[],d=[];return Array.from(this.coalesced).filter(n=>n.type!==2?(s.push(n),!1):!0).sort((n,a)=>n.path.length-a.path.length).filter(n=>d.some(a=>(0,E.isParent)(n.path,a,!A.isLinux))?!1:(d.push(n.path),!0)).concat(s)}}}),define(ae[151],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class t{constructor(...R){this._entries=new Map;for(const[A,k]of R)this.set(A,k)}set(R,A){const k=this._entries.get(R);return this._entries.set(R,A),k}has(R){return this._entries.has(R)}get(R){return this._entries.get(R)}}e.ServiceCollection=t}),define(ae[797],le([1,0,11,21,2,97,2082,5,151,158]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const S=!1;class C extends Error{constructor(c){super("cyclic dependency between services"),this.message=c.findCycleSlow()??`UNABLE to detect cycle, dumping graph: ${c.toString()}`}}class r{constructor(c=new I.ServiceCollection,l=!1,s,d=S){this._services=c,this._strict=l,this._parent=s,this._enableTracing=d,this._activeInstantiations=new Set,this._services.set(E.IInstantiationService,this),this._globalGraph=d?s?._globalGraph??new k.Graph(n=>n):void 0}createChild(c){return new r(c,this._strict,this,this._enableTracing)}invokeFunction(c,...l){const s=i.traceInvocation(this._enableTracing,c);let d=!1;try{return c({get:a=>{if(d)throw(0,p.illegalState)("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(a,s);if(!o)throw new Error(`[invokeFunction] unknown service '${a}'`);return o}},...l)}finally{d=!0,s.stop()}}createInstance(c,...l){let s,d;return c instanceof A.SyncDescriptor?(s=i.traceCreation(this._enableTracing,c.ctor),d=this._createInstance(c.ctor,c.staticArguments.concat(l),s)):(s=i.traceCreation(this._enableTracing,c),d=this._createInstance(c,l,s)),s.stop(),d}_createInstance(c,l=[],s){const d=E._util.getServiceDependencies(c).sort((o,g)=>o.index-g.index),n=[];for(const o of d){const g=this._getOrCreateServiceInstance(o.id,s);g||this._throwIfStrict(`[createInstance] ${c.name} depends on UNKNOWN service ${o.id}.`,!1),n.push(g)}const a=d.length>0?d[0].index:l.length;if(l.length!==a){console.trace(`[createInstance] First service dependency of ${c.name} at position ${a+1} conflicts with ${l.length} static arguments`);const o=a-l.length;o>0?l=l.concat(new Array(o)):l=l.slice(0,a)}return Reflect.construct(c,l.concat(n))}_setServiceInstance(c,l){if(this._services.get(c)instanceof A.SyncDescriptor)this._services.set(c,l);else if(this._parent)this._parent._setServiceInstance(c,l);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(c){const l=this._services.get(c);return!l&&this._parent?this._parent._getServiceInstanceOrDescriptor(c):l}_getOrCreateServiceInstance(c,l){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(c));const s=this._getServiceInstanceOrDescriptor(c);return s instanceof A.SyncDescriptor?this._safeCreateAndCacheServiceInstance(c,s,l.branch(c,!0)):(l.branch(c,!1),s)}_safeCreateAndCacheServiceInstance(c,l,s){if(this._activeInstantiations.has(c))throw new Error(`illegal state - RECURSIVELY instantiating service '${c}'`);this._activeInstantiations.add(c);try{return this._createAndCacheServiceInstance(c,l,s)}finally{this._activeInstantiations.delete(c)}}_createAndCacheServiceInstance(c,l,s){const d=new k.Graph(o=>o.id.toString());let n=0;const a=[{id:c,desc:l,_trace:s}];for(;a.length;){const o=a.pop();if(d.lookupOrInsertNode(o),n++>1e3)throw new C(d);for(const g of E._util.getServiceDependencies(o.desc.ctor)){const h=this._getServiceInstanceOrDescriptor(g.id);if(h||this._throwIfStrict(`[createInstance] ${c} depends on ${g.id} which is NOT registered.`,!0),this._globalGraph?.insertEdge(String(o.id),String(g.id)),h instanceof A.SyncDescriptor){const v={id:g.id,desc:h,_trace:o._trace.branch(g.id,!0)};d.insertEdge(o,v),a.push(v)}}}for(;;){const o=d.roots();if(o.length===0){if(!d.isEmpty())throw new C(d);break}for(const{data:g}of o){if(this._getServiceInstanceOrDescriptor(g.id)instanceof A.SyncDescriptor){const v=this._createServiceInstanceWithOwner(g.id,g.desc.ctor,g.desc.staticArguments,g.desc.supportsDelayedInstantiation,g._trace);this._setServiceInstance(g.id,v)}d.removeNode(g)}}return this._getServiceInstanceOrDescriptor(c)}_createServiceInstanceWithOwner(c,l,s=[],d,n){if(this._services.get(c)instanceof A.SyncDescriptor)return this._createServiceInstance(c,l,s,d,n);if(this._parent)return this._parent._createServiceInstanceWithOwner(c,l,s,d,n);throw new Error(`illegalState - creating UNKNOWN service instance ${l.name}`)}_createServiceInstance(c,l,s=[],d,n){if(d){const a=new r(void 0,this._strict,this,this._enableTracing);a._globalGraphImplicitDependency=String(c);const o=new Map,g=new t.IdleValue(()=>{const h=a._createInstance(l,s,n);for(const[v,m]of o){const w=h[v];if(typeof w=="function")for(const D of m)w.apply(h,D)}return o.clear(),h});return new Proxy(Object.create(null),{get(h,v){if(!g.isInitialized&&typeof v=="string"&&(v.startsWith("onDid")||v.startsWith("onWill"))){let D=o.get(v);return D||(D=new b.LinkedList,o.set(v,D)),(T,_,L)=>{const M=D.push([T,_,L]);return(0,R.toDisposable)(M)}}if(v in h)return h[v];const m=g.value;let w=m[v];return typeof w!="function"||(w=w.bind(m),h[v]=w),w},set(h,v,m){return g.value[v]=m,!0}})}else return this._createInstance(l,s,n)}_throwIfStrict(c,l){if(l&&console.warn(c),this._strict)throw new Error(c)}}e.InstantiationService=r;var u;(function(f){f[f.Creation=0]="Creation",f[f.Invocation=1]="Invocation",f[f.Branch=2]="Branch"})(u||(u={}));class i{static traceInvocation(c,l){return c?new i(1,l.name||new Error().stack.split(` `).slice(3,4).join(` `)):i._None}static traceCreation(c,l){return c?new i(0,l.name):i._None}constructor(c,l){this.type=c,this.name=l,this._start=Date.now(),this._dep=[]}branch(c,l){const s=new i(2,c.toString());return this._dep.push([c,l,s]),s}stop(){const c=Date.now()-this._start;i._totals+=c;let l=!1;function s(n,a){const o=[],g=new Array(n+1).join(" ");for(const[h,v,m]of a._dep)if(v&&m){l=!0,o.push(`${g}CREATES -> ${h}`);const w=s(n+1,m);w&&o.push(w)}else o.push(`${g}uses -> ${h}`);return o.join(` `)}const d=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${s(1,this)}`,`DONE, took ${c.toFixed(2)}ms (grand total ${i._totals.toFixed(2)}ms)`];(c>2||l)&&i.all.add(d.join(` `))}}e.Trace=i,i.all=new Set,i._None=new class extends i{constructor(){super(-1,null)}stop(){}branch(){return this}},i._totals=0}),define(ae[2092],le([1,0,2,1273]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronIPCMainProcessService=void 0;class R extends t.Disposable{constructor(k){super(),this.mainProcessConnection=this._register(new p.Client(`window:${k}`))}getChannel(k){return this.mainProcessConnection.getChannel(k)}registerChannel(k,E){this.mainProcessConnection.registerChannel(k,E)}}e.ElectronIPCMainProcessService=R}),define(ae[102],le([1,0,183,97,35,5]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerSharedProcessRemoteService=e.ISharedProcessService=e.registerMainProcessRemoteService=e.IMainProcessService=void 0;class k{constructor(u,i,f,c){const l=f.getChannel(u);return E(i)?c.createInstance(new p.SyncDescriptor(i.channelClientCtor,[l])):t.ProxyChannel.toService(l,i?.proxyOptions)}}function E(r){return!!r?.channelClientCtor}e.IMainProcessService=(0,A.createDecorator)("mainProcessService");let I=class extends k{constructor(u,i,f,c){super(u,i,f,c)}};I=we([F(2,e.IMainProcessService),F(3,A.IInstantiationService)],I);function b(r,u,i){(0,R.registerSingleton)(r,new p.SyncDescriptor(I,[u,i],!0))}e.registerMainProcessRemoteService=b,e.ISharedProcessService=(0,A.createDecorator)("sharedProcessService");let S=class extends k{constructor(u,i,f,c){super(u,i,f,c)}};S=we([F(2,e.ISharedProcessService),F(3,A.IInstantiationService)],S);function C(r,u,i){(0,R.registerSingleton)(r,new p.SyncDescriptor(S,[u,i],!0))}e.registerSharedProcessRemoteService=C}),define(ae[2093],le([1,0,599,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSharedProcessRemoteService)(t.IDiagnosticsService,"diagnostics")}),define(ae[2094],le([1,0,5,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExternalTerminalMainService=void 0,e.IExternalTerminalMainService=(0,t.createDecorator)("externalTerminal"),(0,p.registerMainProcessRemoteService)(e.IExternalTerminalMainService,"externalTerminal")}),define(ae[601],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIssueService=void 0,e.IIssueService=(0,t.createDecorator)("issueService")}),define(ae[2095],le([1,0,16,11,6,2,1421]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const E=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class I extends A.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:R.Event.None}get inChordMode(){return!!this._currentChord}constructor(C,r,u,i,f){super(),this._contextKeyService=C,this._commandService=r,this._telemetryService=u,this._notificationService=i,this._logService=f,this._onDidUpdateKeybindings=this._register(new R.Emitter),this._currentChord=null,this._currentChordChecker=new p.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=b.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new p.TimeoutTimer,this._logging=!1}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(r=>r.resolvedKeybinding))}lookupKeybinding(C,r){const u=this._getResolver().lookupPrimaryKeybinding(C,r||this._contextKeyService);if(!!u)return u.resolvedKeybinding}dispatchEvent(C,r){return this._dispatch(C,r)}softDispatch(C,r){this._log("/ Soft dispatching keyboard event");const u=this.resolveKeyboardEvent(C);if(u.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[i]=u.getDispatchParts();if(i===null)return this._log("\\ Keyboard event cannot be dispatched"),null;const f=this._contextKeyService.getContext(r),c=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(f,c,i)}_enterChordMode(C,r){this._currentChord={keypress:C,label:r},this._currentChordStatusMessage=this._notificationService.status(k.localize(0,null,r));const u=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-u>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}dispatchByUserSettingsLabel(C,r){this._log(`/ Dispatching keybinding triggered via menu entry accelerator - ${C}`);const u=this.resolveUserBinding(C);u.length===0?this._log(`\\ Could not resolve - ${C}`):this._doDispatch(u[0],r,!1)}_dispatch(C,r){return this._doDispatch(this.resolveKeyboardEvent(C),r,!1)}_singleModifierDispatch(C,r){const u=this.resolveKeyboardEvent(C),[i]=u.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=b.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=b.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(u,r,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${i}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[f]=u.getParts();return this._ignoreSingleModifiers=new b(f),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(C,r,u=!1){let i=!1;if(C.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let f=null,c=null;if(u){const[n]=C.getSingleModifierDispatchParts();f=n,c=n}else[f]=C.getDispatchParts(),c=this._currentChord?this._currentChord.keypress:null;if(f===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),i;const l=this._contextKeyService.getContext(r),s=C.getLabel(),d=this._getResolver().resolve(l,c,f);return this._logService.trace("KeybindingService#dispatch",s,d?.commandId),d&&d.enterChord?(i=!0,this._enterChordMode(f,s),this._log("+ Entering chord mode..."),i):(this._currentChord&&(!d||!d.commandId)&&(this._log(`+ Leaving chord mode: Nothing bound to "${this._currentChord.label} ${s}".`),this._notificationService.status(k.localize(1,null,this._currentChord.label,s),{hideAfter:10*1e3}),i=!0),this._leaveChordMode(),d&&d.commandId&&(d.bubble||(i=!0),this._log(`+ Invoking command ${d.commandId}.`),typeof d.commandArgs>"u"?this._commandService.executeCommand(d.commandId).then(void 0,n=>this._notificationService.warn(n)):this._commandService.executeCommand(d.commandId,d.commandArgs).then(void 0,n=>this._notificationService.warn(n)),E.test(d.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:d.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 b{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}}}b.EMPTY=new b(null)}),define(ae[602],le([1,0,21,327,234]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class A extends R.ResolvedKeybinding{constructor(E,I){if(super(),I.length===0)throw(0,t.illegalArgument)("parts");this._os=E,this._parts=I}getLabel(){return p.UILabelProvider.toLabel(this._os,this._parts,E=>this._getLabel(E))}getAriaLabel(){return p.AriaLabelProvider.toLabel(this._os,this._parts,E=>this._getAriaLabel(E))}getElectronAccelerator(){return this._parts.length>1||this._parts[0].isDuplicateModifierCase()?null:p.ElectronAcceleratorLabelProvider.toLabel(this._os,this._parts,E=>this._getElectronAccelerator(E))}getUserSettingsLabel(){return p.UserSettingsLabelProvider.toLabel(this._os,this._parts,E=>this._getUserSettingsLabel(E))}isWYSIWYG(){return this._parts.every(E=>this._isWYSIWYG(E))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(E=>this._getPart(E))}_getPart(E){return new R.ResolvedKeybindingPart(E.ctrlKey,E.shiftKey,E.altKey,E.metaKey,this._getLabel(E),this._getAriaLabel(E))}getDispatchParts(){return this._parts.map(E=>this._getDispatchPart(E))}getSingleModifierDispatchParts(){return this._parts.map(E=>this._getSingleModifierDispatchPart(E))}}e.BaseResolvedKeybinding=A}),define(ae[38],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,t.createDecorator)("keybindingService")}),define(ae[2096],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=void 0;class p{constructor(E,I,b){this._log=b,this._defaultKeybindings=E,this._defaultBoundCommands=new Map;for(const S of E){const C=S.command;C&&C.charAt(0)!=="-"&&this._defaultBoundCommands.set(C,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=p.handleRemovals([].concat(E).concat(I));for(let S=0,C=this._keybindings.length;S<C;S++){const r=this._keybindings[S];r.keypressParts.length!==0&&(r.when&&r.when.type===0||this._addKeyPress(r.keypressParts[0],r))}}static _isTargetedForRemoval(E,I,b,S){return!(I&&E.keypressParts[0]!==I||b&&E.keypressParts[1]!==b||S&&S.type!==1&&(!E.when||!(0,t.expressionsAreEqualWithConstantSubstitution)(S,E.when)))}static handleRemovals(E){const I=new Map;for(let S=0,C=E.length;S<C;S++){const r=E[S];if(r.command&&r.command.charAt(0)==="-"){const u=r.command.substring(1);I.has(u)?I.get(u).push(r):I.set(u,[r])}}if(I.size===0)return E;const b=[];for(let S=0,C=E.length;S<C;S++){const r=E[S];if(!r.command||r.command.length===0){b.push(r);continue}if(r.command.charAt(0)==="-")continue;const u=I.get(r.command);if(!u||!r.isDefault){b.push(r);continue}let i=!1;for(const f of u){const c=f.keypressParts[0],l=f.keypressParts[1],s=f.when;if(this._isTargetedForRemoval(r,c,l,s)){i=!0;break}}if(!i){b.push(r);continue}}return b}_addKeyPress(E,I){const b=this._map.get(E);if(typeof b>"u"){this._map.set(E,[I]),this._addToLookupMap(I);return}for(let S=b.length-1;S>=0;S--){const C=b[S];if(C.command===I.command)continue;const r=C.keypressParts.length>1,u=I.keypressParts.length>1;r&&u&&C.keypressParts[1]!==I.keypressParts[1]||p.whenIsEntirelyIncluded(C.when,I.when)&&this._removeFromLookupMap(C)}b.push(I),this._addToLookupMap(I)}_addToLookupMap(E){if(!E.command)return;let I=this._lookupMap.get(E.command);typeof I>"u"?(I=[E],this._lookupMap.set(E.command,I)):I.push(E)}_removeFromLookupMap(E){if(!E.command)return;const I=this._lookupMap.get(E.command);if(!(typeof I>"u")){for(let b=0,S=I.length;b<S;b++)if(I[b]===E){I.splice(b,1);return}}}static whenIsEntirelyIncluded(E,I){return!I||I.type===1?!0:!E||E.type===1?!1:(0,t.implies)(E,I)}getDefaultBoundCommands(){return this._defaultBoundCommands}getDefaultKeybindings(){return this._defaultKeybindings}getKeybindings(){return this._keybindings}lookupKeybindings(E){const I=this._lookupMap.get(E);if(typeof I>"u"||I.length===0)return[];const b=[];let S=0;for(let C=I.length-1;C>=0;C--)b[S++]=I[C];return b}lookupPrimaryKeybinding(E,I){const b=this._lookupMap.get(E);if(typeof b>"u"||b.length===0)return null;if(b.length===1)return b[0];for(let S=b.length-1;S>=0;S--){const C=b[S];if(I.contextMatchesRules(C.when))return C}return b[b.length-1]}resolve(E,I,b){this._log(`| Resolving ${b}${I?` chorded from ${I}`:""}`);let S=null;if(I!==null){const r=this._map.get(I);if(typeof r>"u")return this._log("\\ No keybinding entries."),null;S=[];for(let u=0,i=r.length;u<i;u++){const f=r[u];f.keypressParts[1]===b&&S.push(f)}}else{const r=this._map.get(b);if(typeof r>"u")return this._log("\\ No keybinding entries."),null;S=r}const C=this._findCommand(E,S);return C?I===null&&C.keypressParts.length>1&&C.keypressParts[1]!==null?(this._log(`\\ From ${S.length} keybinding entries, matched chord, when: ${R(C.when)}, source: ${A(C)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${S.length} keybinding entries, matched ${C.command}, when: ${R(C.when)}, source: ${A(C)}.`),{enterChord:!1,leaveChord:C.keypressParts.length>1,commandId:C.command,commandArgs:C.commandArgs,bubble:C.bubble}):(this._log(`\\ From ${S.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(E,I){for(let b=I.length-1;b>=0;b--){const S=I[b];if(!!p._contextMatchesRules(E,S.when))return S}return null}static _contextMatchesRules(E,I){return I?I.evaluate(E):!0}}e.KeybindingResolver=p;function R(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(ae[498],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeElementsAfterNulls=e.ResolvedKeybindingItem=void 0;class t{constructor(A,k,E,I,b,S,C){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=A,this.keypressParts=A?p(A.getDispatchParts()):[],A&&this.keypressParts.length===0&&(this.keypressParts=p(A.getSingleModifierDispatchParts())),this.bubble=k?k.charCodeAt(0)===94:!1,this.command=this.bubble?k.substr(1):k,this.commandArgs=E,this.when=I,this.isDefault=b,this.extensionId=S,this.isBuiltinExtension=C}}e.ResolvedKeybindingItem=t;function p(R){const A=[];for(let k=0,E=R.length;k<E;k++){const I=R[k];if(!I)return A;A.push(I)}return A}e.removeElementsAfterNulls=p}),define(ae[2097],le([1,0,99,234,602,498]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.USLayoutResolvedKeybinding=void 0;class k extends R.BaseResolvedKeybinding{constructor(I,b){super(b,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 b=t.KeyCodeUtils.toUserSettingsUS(I.keyCode);return b&&b.toLowerCase()}_isWYSIWYG(){return!0}_getDispatchPart(I){return k.getDispatchStr(I)}static getDispatchStr(I){if(I.isModifierKey())return null;let b="";return I.ctrlKey&&(b+="ctrl+"),I.shiftKey&&(b+="shift+"),I.altKey&&(b+="alt+"),I.metaKey&&(b+="meta+"),b+=t.KeyCodeUtils.toString(I.keyCode),b}_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 b=t.IMMUTABLE_CODE_TO_KEY_CODE[I];if(b!==-1)return b;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 p.SimpleKeybinding)return I;const b=this._scanCodeToKeyCode(I.scanCode);return b===0?null:new p.SimpleKeybinding(I.ctrlKey,I.shiftKey,I.altKey,I.metaKey,b)}static resolveUserBinding(I,b){const S=(0,A.removeElementsAfterNulls)(I.map(C=>this._resolveSimpleUserBinding(C)));return S.length>0?[new k(new p.ChordKeybinding(S),b)]:[]}}e.USLayoutResolvedKeybinding=k}),define(ae[2098],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getDispatchConfig=e.DispatchConfig=void 0;var t;(function(R){R[R.Code=0]="Code",R[R.KeyCode=1]="KeyCode"})(t=e.DispatchConfig||(e.DispatchConfig={}));function p(R){const A=R.getValue("keyboard");return(A?A.dispatch:null)==="keyCode"?1:0}e.getDispatchConfig=p}),define(ae[603],le([1,0,99,5]),function(J,e,t,p){"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,p.createDecorator)("keyboardLayoutService");function R(C,r){return!C||!r?!1:!!(C.name&&r.name&&C.name===r.name||C.id&&r.id&&C.id===r.id||C.model&&r.model&&C.model===r.model&&C.layout===r.layout)}e.areKeyboardLayoutsEqual=R;function A(C){if(!C)return{label:"",description:""};if(C.name)return{label:C.text,description:""};if(C.id){const u=C;return u.localizedName?{label:u.localizedName,description:""}:/^com\.apple\.keylayout\./.test(u.id)?{label:u.id.replace(/^com\.apple\.keylayout\./,"").replace(/-/," "),description:""}:/^.*inputmethod\./.test(u.id)?{label:u.id.replace(/^.*inputmethod\./,"").replace(/[-\.]/," "),description:`Input Method (${u.lang})`}:{label:u.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 E(C,r){return!C&&!r?!0:!C||!r?!1:C.vkey===r.vkey&&C.value===r.value&&C.withShift===r.withShift&&C.withAltGr===r.withAltGr&&C.withShiftAltGr===r.withShiftAltGr}function I(C,r){if(!C&&!r)return!0;if(!C||!r)return!1;for(let u=0;u<193;u++){const i=t.ScanCodeUtils.toString(u),f=C[i],c=r[i];if(!E(f,c))return!1}return!0}e.windowsKeyboardMappingEquals=I;function b(C,r){return!C&&!r?!0:!C||!r?!1:C.value===r.value&&C.withShift===r.withShift&&C.withAltGr===r.withAltGr&&C.withShiftAltGr===r.withShiftAltGr}function S(C,r){if(!C&&!r)return!0;if(!C||!r)return!1;for(let u=0;u<193;u++){const i=t.ScanCodeUtils.toString(u),f=C[i],c=r[i];if(!b(f,c))return!1}return!0}e.macLinuxKeyboardMappingEquals=S}),define(ae[2099],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedKeyboardMapper=void 0;class t{constructor(R){this._actual=R,this._cache=new Map}dumpDebugInfo(){return this._actual.dumpDebugInfo()}resolveKeybinding(R){const A=R.getHashCode(),k=this._cache.get(A);if(!k){const E=this._actual.resolveKeybinding(R);return this._cache.set(A,E),E}return k}resolveKeyboardEvent(R){return this._actual.resolveKeyboardEvent(R)}resolveUserBinding(R){return this._actual.resolveUserBinding(R)}}e.CachedKeyboardMapper=t}),define(ae[49],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,t.createDecorator)("labelService")}),define(ae[374],le([1,0,32,2,14,1422,82,5]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagePackBaseService=e.ILanguagePackService=void 0,e.ILanguagePackService=(0,E.createDecorator)("languagePackService");let I=class extends p.Disposable{constructor(S){super(),this.extensionGalleryService=S}async getAvailableLanguages(){const S=new t.CancellationTokenSource;setTimeout(()=>S.cancel(),1e3);let C;try{C=await this.extensionGalleryService.query({text:'category:"language packs"',pageSize:20},S.token)}catch{return[]}const u=C.firstPage.filter(i=>i.properties.localizedLanguages?.length&&i.tags.some(f=>f.startsWith("lp-"))).map(i=>{const f=i.properties.localizedLanguages?.[0],c=this.getLocale(i);return{...this.createQuickPickItem(c,f,i),extensionId:i.identifier.id,galleryExtension:i}});return u.push({...this.createQuickPickItem("en","English"),extensionId:"default"}),u}getLocale(S){return S.tags.find(C=>C.startsWith("lp-"))?.split("lp-")[1]}createQuickPickItem(S,C,r){const u=C??S;let i;if(u!==S&&(i=`(${S})`),S.toLowerCase()===R.language.toLowerCase()&&(i??="",i+=(0,A.localize)(0,null)),r?.installCount){i??="";const f=r.installCount;let c;f>1e6?c=`${Math.floor(f/1e5)/10}M`:f>1e3?c=`${Math.floor(f/1e3)}K`:c=String(f),i+=` $(cloud-download) ${c}`}return{id:S,label:u,description:i}}};I=we([F(0,k.IExtensionGalleryService)],I),e.LanguagePackBaseService=I}),define(ae[2100],le([1,0,1423]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const p=t.localize(0,null),R=t.localize(1,null),A=t.localize(2,null);e.default={open:p,close:R,find:A}}),define(ae[2101],le([1,0,10,16,14,2100]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerWindowDriver=e.BrowserWindowDriver=void 0;class k{async setValue(b,S){const C=document.querySelector(b);if(!C)return Promise.reject(new Error(`Element not found: ${b}`));const r=C;r.value=S;const u=new Event("input",{bubbles:!0,cancelable:!0});r.dispatchEvent(u)}async getTitle(){return document.title}async isActiveElement(b){if(document.querySelector(b)!==document.activeElement){const C=[];let r=document.activeElement;for(;r;){const u=r.tagName,i=r.id?`#${r.id}`:"",f=(0,p.coalesce)(r.className.split(/\s+/g).map(c=>c.trim())).map(c=>`.${c}`).join("");C.unshift(`${u}${i}${f}`),r=r.parentElement}throw new Error(`Active element not found. Current active element is '${C.join(" > ")}'. Looking for ${b}`)}return!0}async getElements(b,S){const C=document.querySelectorAll(b),r=[];for(let u=0;u<C.length;u++){const i=C.item(u);r.push(this.serializeElement(i,S))}return r}serializeElement(b,S){const C=Object.create(null);for(let f=0;f<b.attributes.length;f++){const c=b.attributes.item(f);c&&(C[c.name]=c.value)}const r=[];if(S)for(let f=0;f<b.children.length;f++){const c=b.children.item(f);c&&r.push(this.serializeElement(c,!0))}const{left:u,top:i}=(0,t.getTopLeftOffset)(b);return{tagName:b.tagName,className:b.className,textContent:b.textContent||"",attributes:C,children:r,left:u,top:i}}async getElementXY(b,S,C){const r=typeof S=="number"&&typeof C=="number"?{x:S,y:C}:void 0;return this._getElementXY(b,r)}async typeInEditor(b,S){const C=document.querySelector(b);if(!C)throw new Error(`Editor not found: ${b}`);const r=C,u=r.selectionStart,i=u+S.length,f=r.value,c=f.substr(0,u)+S+f.substr(u);r.value=c,r.setSelectionRange(i,i);const l=new Event("input",{bubbles:!0,cancelable:!0});r.dispatchEvent(l)}async getTerminalBuffer(b){const S=document.querySelector(b);if(!S)throw new Error(`Terminal not found: ${b}`);const C=S.xterm;if(!C)throw new Error(`Xterm not found: ${b}`);const r=[];for(let u=0;u<C.buffer.active.length;u++)r.push(C.buffer.active.getLine(u).translateToString(!0));return r}async writeInTerminal(b,S){const C=document.querySelector(b);if(!C)throw new Error(`Element not found: ${b}`);const r=C.xterm;if(!r)throw new Error(`Xterm not found: ${b}`);r._core.coreService.triggerDataEvent(S)}getLocaleInfo(){return Promise.resolve({language:R.language,locale:R.locale})}getLocalizedStrings(){return Promise.resolve({open:A.default.open,close:A.default.close,find:A.default.find})}async _getElementXY(b,S){const C=document.querySelector(b);if(!C)return Promise.reject(new Error(`Element not found: ${b}`));const{left:r,top:u}=(0,t.getTopLeftOffset)(C),{width:i,height:f}=(0,t.getClientArea)(C);let c,l;return S?(c=r+S.x,l=u+S.y):(c=r+i/2,l=u+f/2),c=Math.round(c),l=Math.round(l),{x:c,y:l}}click(b,S,C){throw new Error("Method not implemented.")}async exitApplication(){}}e.BrowserWindowDriver=k;function E(){Object.assign(window,{driver:new k})}e.registerWindowDriver=E}),define(ae[2102],le([1,0,2101]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerWindowDriver=void 0;class p extends t.BrowserWindowDriver{constructor(k){super(),this.helper=k}exitApplication(){return this.helper.exitApplication()}}function R(A){Object.assign(window,{driver:new p(A)})}e.registerWindowDriver=R}),define(ae[198],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,t.createDecorator)("layoutService")}),define(ae[2103],le([1,0,10,110,6,2,111,8,7,198]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let S=class extends A.Disposable{constructor(r,u,i){super(),this._contextKeyService=r,this._layoutService=u,this._configurationService=i,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new R.Emitter,this._onDidChangeReducedMotion=new R.Emitter,this._accessibilityModeEnabledContext=k.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const f=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(l=>{l.affectsConfiguration("editor.accessibilitySupport")&&(f(),this._onDidChangeScreenReaderOptimized.fire()),l.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),f(),this._register(this.onDidChangeScreenReaderOptimized(()=>f()));const c=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=c.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(c)}initReducedMotionListeners(r){if(!this._layoutService.hasContainer)return;this._register((0,t.addDisposableListener)(r,"change",()=>{this._systemMotionReduced=r.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const u=()=>{const i=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",i),this._layoutService.container.classList.toggle("enable-motion",!i)};u(),this._register(this.onDidChangeReducedMotion(()=>u()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const r=this._configurationService.getValue("editor.accessibilitySupport");return r==="on"||r==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const r=this._configMotionReduced;return r==="on"||r==="auto"&&this._systemMotionReduced}alwaysUnderlineAccessKeys(){return Promise.resolve(!1)}getAccessibilitySupport(){return this._accessibilitySupport}setAccessibilitySupport(r){this._accessibilitySupport!==r&&(this._accessibilitySupport=r,this._onDidChangeScreenReaderOptimized.fire())}alert(r){(0,p.alert)(r)}};S=we([F(0,I.IContextKeyService),F(1,b.ILayoutService),F(2,E.IConfigurationService)],S),e.AccessibilityService=S}),define(ae[2104],le([1,0,749,2,198]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let A=class extends p.Disposable{constructor(E){super(),this.layoutService=E,this.currentViewDisposable=p.Disposable.None,this.container=E.hasContainer?E.container:null,this.contextView=this._register(new t.ContextView(this.container,1)),this.layout(),this._register(E.onDidLayout(()=>this.layout()))}setContainer(E,I){this.contextView.setContainer(E,I||1)}showContextView(E,I,b){I?(I!==this.container||this.shadowRoot!==b)&&(this.container=I,this.setContainer(I,b?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=b,this.contextView.show(E);const S=(0,p.toDisposable)(()=>{this.currentViewDisposable===S&&this.hideContextView()});return this.currentViewDisposable=S,S}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(E){this.contextView.hide(E)}};A=we([F(0,R.ILayoutService)],A),e.ContextViewService=A}),define(ae[798],le([1,0,10,11]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerZIndex=e.ZIndex=void 0;var R;(function(S){S[S.Base=0]="Base",S[S.Sash=35]="Sash",S[S.SuggestWidget=40]="SuggestWidget",S[S.Hover=50]="Hover",S[S.DragImage=1e3]="DragImage",S[S.MenubarMenuItemsHolder=2e3]="MenubarMenuItemsHolder",S[S.ContextView=2500]="ContextView",S[S.ModalDialog=2600]="ModalDialog",S[S.PaneDropOverlay=1e4]="PaneDropOverlay"})(R=e.ZIndex||(e.ZIndex={}));const A=Object.keys(R).filter(S=>!isNaN(Number(S))).map(S=>Number(S)).sort((S,C)=>C-S);function k(S){for(const C of A)if(S>=C)return C;return-1}class E{constructor(){this.styleSheet=(0,t.createStyleSheet)(),this.zIndexMap=new Map,this.scheduler=new p.RunOnceScheduler(()=>this.updateStyleElement(),200)}registerZIndex(C,r,u){if(this.zIndexMap.get(u))throw new Error(`z-index with name ${u} has already been registered.`);const i=C+r;if(k(i)!==C)throw new Error(`Relative layer: ${C} + z-index: ${r} exceeds next layer ${i}.`);return this.zIndexMap.set(u,i),this.scheduler.schedule(),this.getVarName(u)}getVarName(C){return`--z-index-${C}`}updateStyleElement(){(0,t.clearNode)(this.styleSheet);let C="";this.zIndexMap.forEach((r,u)=>{C+=`${this.getVarName(u)}: ${r}; `}),(0,t.createCSSRule)(":root",C,this.styleSheet)}}const I=new E;function b(S,C,r){return I.registerZIndex(S,C,r)}e.registerZIndex=b}),define(ae[2105],le([1,0,11]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.handleVetos=void 0;function p(R,A){if(R.length===0)return Promise.resolve(!1);const k=[];let E=!1;for(const I of R){if(I===!0)return Promise.resolve(!0);(0,t.isThenable)(I)&&k.push(I.then(b=>{b&&(E=!0)},b=>{A(b),E=!0}))}return t.Promises.settled(k).then(()=>E)}e.handleVetos=p}),define(ae[25],le([1,0,117,6,2,60,14,9,5]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelToString=e.parseLogLevel=e.getLogLevel=e.NullLoggerService=e.NullLogService=e.NullLogger=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,I.createDecorator)("logService"),e.ILoggerService=(0,I.createDecorator)("loggerService");function b(){return new Date().toISOString()}var S;(function(w){w[w.Trace=0]="Trace",w[w.Debug=1]="Debug",w[w.Info=2]="Info",w[w.Warning=3]="Warning",w[w.Error=4]="Error",w[w.Critical=5]="Critical",w[w.Off=6]="Off"})(S=e.LogLevel||(e.LogLevel={})),e.DEFAULT_LOG_LEVEL=S.Info;function C(w,D,y){switch(D){case S.Trace:w.trace(y);break;case S.Debug:w.debug(y);break;case S.Info:w.info(y);break;case S.Warning:w.warn(y);break;case S.Error:w.error(y);break;case S.Critical:w.critical(y);break;default:throw new Error("Invalid log level")}}e.log=C;function r(w){let D="";for(let y=0;y<w.length;y++){let T=w[y];if(typeof T=="object")try{T=JSON.stringify(T)}catch{}D+=(y>0?" ":"")+T}return D}e.format=r;class u extends R.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new p.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(D){this.level!==D&&(this.level=D,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}e.AbstractLogger=u;class i extends u{constructor(D){super(),this.logAlways=D}checkLogLevel(D){return this.logAlways||this.getLevel()<=D}trace(D,...y){this.checkLogLevel(S.Trace)&&this.log(S.Trace,r([D,...y]))}debug(D,...y){this.checkLogLevel(S.Debug)&&this.log(S.Debug,r([D,...y]))}info(D,...y){this.checkLogLevel(S.Info)&&this.log(S.Info,r([D,...y]))}warn(D,...y){this.checkLogLevel(S.Warning)&&this.log(S.Warning,r([D,...y]))}error(D,...y){if(this.checkLogLevel(S.Error))if(D instanceof Error){const T=Array.prototype.slice.call(arguments);T[0]=D.stack,this.log(S.Error,r(T))}else this.log(S.Error,r([D,...y]))}critical(D,...y){this.checkLogLevel(S.Critical)&&this.log(S.Critical,r([D,...y]))}flush(){}}e.AbstractMessageLogger=i;class f extends u{constructor(D=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(D),this.useColors=!k.isWindows}trace(D,...y){this.getLevel()<=S.Trace&&(this.useColors?console.log(`\x1B[90m[main ${b()}]\x1B[0m`,D,...y):console.log(`[main ${b()}]`,D,...y))}debug(D,...y){this.getLevel()<=S.Debug&&(this.useColors?console.log(`\x1B[90m[main ${b()}]\x1B[0m`,D,...y):console.log(`[main ${b()}]`,D,...y))}info(D,...y){this.getLevel()<=S.Info&&(this.useColors?console.log(`\x1B[90m[main ${b()}]\x1B[0m`,D,...y):console.log(`[main ${b()}]`,D,...y))}warn(D,...y){this.getLevel()<=S.Warning&&(this.useColors?console.warn(`\x1B[93m[main ${b()}]\x1B[0m`,D,...y):console.warn(`[main ${b()}]`,D,...y))}error(D,...y){this.getLevel()<=S.Error&&(this.useColors?console.error(`\x1B[91m[main ${b()}]\x1B[0m`,D,...y):console.error(`[main ${b()}]`,D,...y))}critical(D,...y){this.getLevel()<=S.Critical&&(this.useColors?console.error(`\x1B[90m[main ${b()}]\x1B[0m`,D,...y):console.error(`[main ${b()}]`,D,...y))}dispose(){}flush(){}}e.ConsoleMainLogger=f;class c extends u{constructor(D=e.DEFAULT_LOG_LEVEL){super(),this.setLevel(D)}trace(D,...y){this.getLevel()<=S.Trace&&console.log("%cTRACE","color: #888",D,...y)}debug(D,...y){this.getLevel()<=S.Debug&&console.log("%cDEBUG","background: #eee; color: #888",D,...y)}info(D,...y){this.getLevel()<=S.Info&&console.log("%c INFO","color: #33f",D,...y)}warn(D,...y){this.getLevel()<=S.Warning&&console.log("%c WARN","color: #993",D,...y)}error(D,...y){this.getLevel()<=S.Error&&console.log("%c ERR","color: #f33",D,...y)}critical(D,...y){this.getLevel()<=S.Critical&&console.log("%cCRITI","background: #f33; color: white",D,...y)}dispose(){}flush(){}}e.ConsoleLogger=c;class l extends u{constructor(D,y=e.DEFAULT_LOG_LEVEL){super(),this.adapter=D,this.setLevel(y)}trace(D,...y){this.getLevel()<=S.Trace&&this.adapter.log(S.Trace,[this.extractMessage(D),...y])}debug(D,...y){this.getLevel()<=S.Debug&&this.adapter.log(S.Debug,[this.extractMessage(D),...y])}info(D,...y){this.getLevel()<=S.Info&&this.adapter.log(S.Info,[this.extractMessage(D),...y])}warn(D,...y){this.getLevel()<=S.Warning&&this.adapter.log(S.Warning,[this.extractMessage(D),...y])}error(D,...y){this.getLevel()<=S.Error&&this.adapter.log(S.Error,[this.extractMessage(D),...y])}critical(D,...y){this.getLevel()<=S.Critical&&this.adapter.log(S.Critical,[this.extractMessage(D),...y])}extractMessage(D){return typeof D=="string"?D:(0,t.toErrorMessage)(D,this.getLevel()<=S.Trace)}dispose(){}flush(){}}e.AdapterLogger=l;class s extends u{constructor(D){super(),this.logServices=D,D.length&&this.setLevel(D[0].getLevel())}setLevel(D){for(const y of this.logServices)y.setLevel(D);super.setLevel(D)}trace(D,...y){for(const T of this.logServices)T.trace(D,...y)}debug(D,...y){for(const T of this.logServices)T.debug(D,...y)}info(D,...y){for(const T of this.logServices)T.info(D,...y)}warn(D,...y){for(const T of this.logServices)T.warn(D,...y)}error(D,...y){for(const T of this.logServices)T.error(D,...y)}critical(D,...y){for(const T of this.logServices)T.critical(D,...y)}flush(){for(const D of this.logServices)D.flush()}dispose(){for(const D of this.logServices)D.dispose()}}e.MultiplexLogService=s;class d extends R.Disposable{constructor(D){super(),this.logger=D,this._register(D)}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(D){this.logger.setLevel(D)}getLevel(){return this.logger.getLevel()}trace(D,...y){this.logger.trace(D,...y)}debug(D,...y){this.logger.debug(D,...y)}info(D,...y){this.logger.info(D,...y)}warn(D,...y){this.logger.warn(D,...y)}error(D,...y){this.logger.error(D,...y)}critical(D,...y){this.logger.critical(D,...y)}flush(){this.logger.flush()}}e.LogService=d;class n extends R.Disposable{constructor(D,y){super(),this.logLevel=D,this.loggerItems=new A.ResourceMap,this._register(y(T=>this.setLevel(T)))}getLoggers(){return[...this.loggerItems.values()].map(({logger:D})=>D)}getLogger(D){return this.loggerItems.get(D)?.logger}createLogger(D,y,T){let _=this.loggerItems.get(D)?.logger;return _||(T=y?.always?S.Trace:T,_=this.doCreateLogger(D,T??this.logLevel,y),this.loggerItems.set(D,{logger:_,logLevel:T})),_}setLevel(D,y){const T=E.URI.isUri(D)?D:void 0,_=T?y:D;if(T){const L=this.loggerItems.get(T);L&&L.logLevel!==_&&(L.logLevel=_,L.logger.setLevel(_))}else this.logLevel=_,this.loggerItems.forEach(({logLevel:L,logger:M})=>{L===void 0&&M.setLevel(this.logLevel)})}getLogLevel(D){return this.loggerItems.get(D)?.logLevel}dispose(){this.loggerItems.forEach(({logger:D})=>D.dispose()),this.loggerItems.clear(),super.dispose()}}e.AbstractLoggerService=n;class a{constructor(){this.onDidChangeLogLevel=new p.Emitter().event}setLevel(D){}getLevel(){return S.Info}trace(D,...y){}debug(D,...y){}info(D,...y){}warn(D,...y){}error(D,...y){}critical(D,...y){}dispose(){}flush(){}}e.NullLogger=a;class o extends a{}e.NullLogService=o;class g extends n{constructor(){super(S.Info,p.Event.None)}doCreateLogger(D,y,T){return new a}}e.NullLoggerService=g;function h(w){if(w.verbose)return S.Trace;if(typeof w.logLevel=="string"){const D=v(w.logLevel.toLowerCase());if(D!==void 0)return D}return e.DEFAULT_LOG_LEVEL}e.getLogLevel=h;function v(w){switch(w){case"trace":return S.Trace;case"debug":return S.Debug;case"info":return S.Info;case"warn":return S.Warning;case"error":return S.Error;case"critical":return S.Critical;case"off":return S.Off}}e.parseLogLevel=v;function m(w){switch(w){case S.Trace:return"trace";case S.Debug:return"debug";case S.Info:return"info";case S.Warning:return"warn";case S.Error:return"error";case S.Critical:return"critical";case S.Off:return"off"}}e.LogLevelToString=m}),define(ae[2106],le([1,0,16,11,21,6,2,53,600,25]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractDiskFileSystemProvider=void 0;class S extends k.Disposable{constructor(r,u){super(),this.logService=r,this.options=u,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 p.ThrottledDelayer(0)),this.nonRecursivePathsToWatch=[],this.nonRecursiveWatchRequestDelayer=this._register(new p.ThrottledDelayer(0))}watch(r,u){return u.recursive||this.options?.watcher?.forceUniversal?this.watchUniversal(r,u):this.watchNonRecursive(r,u)}watchUniversal(r,u){const i={path:this.toFilePath(r),excludes:u.excludes,includes:u.includes,recursive:u.recursive},f=(0,t.insert)(this.universalPathsToWatch,i);return this.refreshUniversalWatchers(),(0,k.toDisposable)(()=>{f(),this.refreshUniversalWatchers()})}refreshUniversalWatchers(){this.universalWatchRequestDelayer.trigger(()=>this.doRefreshUniversalWatchers()).catch(r=>(0,R.onUnexpectedError)(r))}doRefreshUniversalWatchers(){this.universalWatcher||(this.universalWatcher=this._register(this.createUniversalWatcher(u=>this._onDidChangeFile.fire((0,I.toFileChanges)(u)),u=>this.onWatcherLogMessage(u),this.logService.getLevel()===b.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.universalWatcher?.setVerboseLogging(this.logService.getLevel()===b.LogLevel.Trace)})));const r=this.options?.watcher?.recursive?.usePolling;if(r===!0)for(const u of this.universalPathsToWatch)(0,I.isRecursiveWatchRequest)(u)&&(u.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);else if(Array.isArray(r))for(const u of this.universalPathsToWatch)(0,I.isRecursiveWatchRequest)(u)&&r.includes(u.path)&&(u.pollingInterval=this.options?.watcher?.recursive?.pollingInterval??5e3);return this.universalWatcher.watch(this.universalPathsToWatch)}watchNonRecursive(r,u){const i={path:this.toFilePath(r),excludes:u.excludes,includes:u.includes,recursive:!1},f=(0,t.insert)(this.nonRecursivePathsToWatch,i);return this.refreshNonRecursiveWatchers(),(0,k.toDisposable)(()=>{f(),this.refreshNonRecursiveWatchers()})}refreshNonRecursiveWatchers(){this.nonRecursiveWatchRequestDelayer.trigger(()=>this.doRefreshNonRecursiveWatchers()).catch(r=>(0,R.onUnexpectedError)(r))}doRefreshNonRecursiveWatchers(){return this.nonRecursiveWatcher||(this.nonRecursiveWatcher=this._register(this.createNonRecursiveWatcher(r=>this._onDidChangeFile.fire((0,I.toFileChanges)(r)),r=>this.onWatcherLogMessage(r),this.logService.getLevel()===b.LogLevel.Trace)),this._register(this.logService.onDidChangeLogLevel(()=>{this.nonRecursiveWatcher?.setVerboseLogging(this.logService.getLevel()===b.LogLevel.Trace)}))),this.nonRecursiveWatcher.watch(this.nonRecursivePathsToWatch)}onWatcherLogMessage(r){r.type==="error"&&this._onDidWatchError.fire(r.message),this.logService[r.type](r.message)}toFilePath(r){return(0,E.normalize)(r.fsPath)}}e.AbstractDiskFileSystemProvider=S}),define(ae[2107],le([1,0,16,11,56,32,6,108,88,2,220,22,241,18,219,1417,19,2091,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileService=void 0;let d=class extends b.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 p.ResourceQueue)}registerProvider(a,o){if(this.provider.has(a))throw new Error(`A filesystem provider for the scheme '${a}' is already registered.`);(0,r.mark)(`code/registerFilesystem/${a}`);const g=new b.DisposableStore;return this.provider.set(a,o),this._onDidChangeFileSystemProviderRegistrations.fire({added:!0,scheme:a,provider:o}),g.add(o.onDidChangeFile(h=>this._onDidFilesChange.fire(new c.FileChangesEvent(h,!this.isPathCaseSensitive(o))))),typeof o.onDidWatchError=="function"&&g.add(o.onDidWatchError(h=>this._onDidWatchError.fire(new Error(h)))),g.add(o.onDidChangeCapabilities(()=>this._onDidChangeFileSystemProviderCapabilities.fire({provider:o,scheme:a}))),(0,b.toDisposable)(()=>{this._onDidChangeFileSystemProviderRegistrations.fire({added:!1,scheme:a,provider:o}),this.provider.delete(a),(0,b.dispose)(g)})}getProvider(a){return this.provider.get(a)}async activateProvider(a){const o=[];this._onWillActivateFileSystemProvider.fire({scheme:a,join(g){o.push(g)}}),!this.provider.has(a)&&await p.Promises.settled(o)}async canHandleResource(a){return await this.activateProvider(a.scheme),this.hasProvider(a)}hasProvider(a){return this.provider.has(a.scheme)}hasCapability(a,o){const g=this.provider.get(a.scheme);return!!(g&&g.capabilities&o)}listCapabilities(){return I.Iterable.map(this.provider,([a,o])=>({scheme:a,capabilities:o.capabilities}))}async withProvider(a){if(!(0,u.isAbsolutePath)(a))throw new c.FileOperationError((0,f.localize)(0,null,this.resourceForError(a)),8);await this.activateProvider(a.scheme);const o=this.provider.get(a.scheme);if(!o){const g=new Error;throw g.name="ENOPRO",g.message=(0,f.localize)(1,null,a.toString()),g}return o}async withReadProvider(a){const o=await this.withProvider(a);if((0,c.hasOpenReadWriteCloseCapability)(o)||(0,c.hasReadWriteCapability)(o)||(0,c.hasFileReadStreamCapability)(o))return o;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 o=await this.withProvider(a);if((0,c.hasOpenReadWriteCloseCapability)(o)||(0,c.hasReadWriteCapability)(o))return o;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,o){try{return await this.doResolveFile(a,o)}catch(g){throw(0,c.toFileSystemProviderErrorCode)(g)===c.FileSystemProviderErrorCode.FileNotFound?new c.FileOperationError((0,f.localize)(2,null,this.resourceForError(a)),1):(0,c.ensureFileSystemProviderError)(g)}}async doResolveFile(a,o){const g=await this.withProvider(a),h=this.isPathCaseSensitive(g),v=o?.resolveTo,m=o?.resolveSingleChildDescendants,w=o?.resolveMetadata,D=await g.stat(a);let y;return this.toFileStat(g,a,D,void 0,!!w,(T,_)=>(y||(y=S.TernarySearchTree.forUris(()=>!h),y.set(a,!0),v&&y.fill(!0,v)),y.get(T.resource)||y.findSuperstr(T.resource.with({query:null,fragment:null}))?!0:T.isDirectory&&m?_===1:!1))}async toFileStat(a,o,g,h,v,m){const{providerExtUri:w}=this.getExtUri(a),D={resource:o,name:w.basename(o),isFile:(g.type&c.FileType.File)!==0,isDirectory:(g.type&c.FileType.Directory)!==0,isSymbolicLink:(g.type&c.FileType.SymbolicLink)!==0,mtime:g.mtime,ctime:g.ctime,size:g.size,readonly:Boolean((g.permissions??0)&c.FilePermission.Readonly)||Boolean(a.capabilities&2048),etag:(0,c.etag)({mtime:g.mtime,size:g.size}),children:void 0};if(D.isDirectory&&m(D,h)){try{const y=await a.readdir(o),T=await p.Promises.settled(y.map(async([_,L])=>{try{const M=w.joinPath(o,_),O=v?await a.stat(M):{type:L};return await this.toFileStat(a,M,O,y.length,v,m)}catch(M){return this.logService.trace(M),null}}));D.children=(0,t.coalesce)(T)}catch(y){this.logService.trace(y),D.children=[]}return D}return D}async resolveAll(a){return p.Promises.settled(a.map(async o=>{try{return{stat:await this.doResolveFile(o.resource,o.options),success:!0}}catch(g){return this.logService.trace(g),{stat:void 0,success:!1}}}))}async stat(a){const o=await this.withProvider(a),g=await o.stat(a);return this.toFileStat(o,a,g,void 0,!0,()=>!1)}async exists(a){const o=await this.withProvider(a);try{return!!await o.stat(a)}catch{return!1}}async canCreateFile(a,o){try{await this.doValidateCreateFile(a,o)}catch(g){return g}return!0}async doValidateCreateFile(a,o){if(!o?.overwrite&&await this.exists(a))throw new c.FileOperationError((0,f.localize)(3,null,this.resourceForError(a)),3,o)}async createFile(a,o=R.VSBuffer.fromString(""),g){await this.doValidateCreateFile(a,g);const h=await this.writeFile(a,o);return this._onDidRunOperation.fire(new c.FileOperationEvent(a,0,h)),h}async writeFile(a,o,g){const h=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),{providerExtUri:v}=this.getExtUri(h);try{await this.validateWriteFile(h,a,g)||await this.mkdirp(h,v.dirname(a));let w;if((0,c.hasReadWriteCapability)(h)&&!(o instanceof R.VSBuffer))if((0,i.isReadableStream)(o)){const D=await(0,i.peekStream)(o,3);D.ended?w=R.VSBuffer.concat(D.buffer):w=D}else w=(0,i.peekReadable)(o,D=>R.VSBuffer.concat(D),3);else w=o;!(0,c.hasOpenReadWriteCloseCapability)(h)||(0,c.hasReadWriteCapability)(h)&&w instanceof R.VSBuffer?await this.doWriteUnbuffered(h,a,g,w):await this.doWriteBuffered(h,a,g,w instanceof R.VSBuffer?(0,R.bufferToReadable)(w):w),this._onDidRunOperation.fire(new c.FileOperationEvent(a,4))}catch(m){throw new c.FileOperationError((0,f.localize)(4,null,this.resourceForError(a),(0,c.ensureFileSystemProviderError)(m).toString()),(0,c.toFileOperationResult)(m),g)}return this.resolve(a,{resolveMetadata:!0})}async validateWriteFile(a,o,g){if(!!g?.unlock&&!(a.capabilities&8192))throw new Error((0,f.localize)(5,null,this.resourceForError(o)));let v;try{v=await a.stat(o)}catch{return}if((v.type&c.FileType.Directory)!==0)throw new c.FileOperationError((0,f.localize)(6,null,this.resourceForError(o)),0,g);if(this.throwIfFileIsReadonly(o,v),typeof g?.mtime=="number"&&typeof g.etag=="string"&&g.etag!==c.ETAG_DISABLED&&typeof v.mtime=="number"&&typeof v.size=="number"&&g.mtime<v.mtime&&g.etag!==(0,c.etag)({mtime:g.mtime,size:v.size}))throw new c.FileOperationError((0,f.localize)(7,null),3,g);return v}async readFile(a,o,g){const h=await this.withReadProvider(a);return o?.atomic?this.doReadFileAtomic(h,a,o,g):this.doReadFile(h,a,o,g)}async doReadFileAtomic(a,o,g,h){return new Promise((v,m)=>{this.writeQueue.queueFor(o,this.getExtUri(a).providerExtUri).queue(async()=>{try{const w=await this.doReadFile(a,o,g,h);v(w)}catch(w){m(w)}})})}async doReadFile(a,o,g,h){const v=await this.doReadFileStream(a,o,{...g,preferUnbuffered:!0},h);return{...v,value:await(0,R.streamToBuffer)(v.value)}}async readFileStream(a,o,g){const h=await this.withReadProvider(a);return this.doReadFileStream(h,a,o,g)}async doReadFileStream(a,o,g,h){const v=new A.CancellationTokenSource(h),m=this.validateReadFile(o,g).then(D=>D,D=>{throw v.cancel(),D});let w;try{return typeof g?.etag=="string"&&g.etag!==c.ETAG_DISABLED&&await m,g?.atomic&&(0,c.hasFileAtomicReadCapability)(a)||!((0,c.hasOpenReadWriteCloseCapability)(a)||(0,c.hasFileReadStreamCapability)(a))||(0,c.hasReadWriteCapability)(a)&&g?.preferUnbuffered?w=this.readFileUnbuffered(a,o,g):(0,c.hasFileReadStreamCapability)(a)?w=this.readFileStreamed(a,o,v.token,g):w=this.readFileBuffered(a,o,v.token,g),{...await m,value:w}}catch(D){w&&await(0,i.consumeStream)(w);const y=(0,f.localize)(8,null,this.resourceForError(o),(0,c.ensureFileSystemProviderError)(D).toString());throw D instanceof c.NotModifiedSinceFileOperationError?new c.NotModifiedSinceFileOperationError(y,D.stat,g):new c.FileOperationError(y,(0,c.toFileOperationResult)(D),g)}}readFileStreamed(a,o,g,h=Object.create(null)){const v=a.readFileStream(o,h,g);return(0,i.transform)(v,{data:m=>m instanceof R.VSBuffer?m:R.VSBuffer.wrap(m),error:m=>new c.FileOperationError((0,f.localize)(9,null,this.resourceForError(o),(0,c.ensureFileSystemProviderError)(m).toString()),(0,c.toFileOperationResult)(m),h)},m=>R.VSBuffer.concat(m))}readFileBuffered(a,o,g,h=Object.create(null)){const v=(0,R.newWriteableBufferStream)();return(0,l.readFileIntoStream)(a,o,v,m=>m,{...h,bufferSize:this.BUFFER_SIZE,errorTransformer:m=>new c.FileOperationError((0,f.localize)(10,null,this.resourceForError(o),(0,c.ensureFileSystemProviderError)(m).toString()),(0,c.toFileOperationResult)(m),h)},g),v}readFileUnbuffered(a,o,g){const h=(0,i.newWriteableStream)(v=>R.VSBuffer.concat(v));return(async()=>{try{let v;g?.atomic&&(0,c.hasFileAtomicReadCapability)(a)?v=await a.readFile(o,{atomic:!0}):v=await a.readFile(o),typeof g?.position=="number"&&(v=v.slice(g.position)),typeof g?.length=="number"&&(v=v.slice(0,g.length)),this.validateReadFileLimits(o,v.byteLength,g),h.end(R.VSBuffer.wrap(v))}catch(v){h.error(v),h.end()}})(),h}async validateReadFile(a,o){const g=await this.resolve(a,{resolveMetadata:!0});if(g.isDirectory)throw new c.FileOperationError((0,f.localize)(11,null,this.resourceForError(a)),0,o);if(typeof o?.etag=="string"&&o.etag!==c.ETAG_DISABLED&&o.etag===g.etag)throw new c.NotModifiedSinceFileOperationError((0,f.localize)(12,null),g,o);return this.validateReadFileLimits(a,g.size,o),g}validateReadFileLimits(a,o,g){if(g?.limits){let h;if(typeof g.limits.memory=="number"&&o>g.limits.memory&&(h=9),typeof g.limits.size=="number"&&o>g.limits.size&&(h=7),typeof h=="number")throw new c.FileOperationError((0,f.localize)(13,null,this.resourceForError(a)),h)}}async canMove(a,o,g){return this.doCanMoveCopy(a,o,"move",g)}async canCopy(a,o,g){return this.doCanMoveCopy(a,o,"copy",g)}async doCanMoveCopy(a,o,g,h){if(a.toString()!==o.toString())try{const v=g==="move"?this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a):await this.withReadProvider(a),m=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(o),o);await this.doValidateMoveCopy(v,a,m,o,g,h)}catch(v){return v}return!0}async move(a,o,g){const h=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(a),a),v=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(o),o),m=await this.doMoveCopy(h,a,v,o,"move",!!g),w=await this.resolve(o,{resolveMetadata:!0});return this._onDidRunOperation.fire(new c.FileOperationEvent(a,m==="move"?2:3,w)),w}async copy(a,o,g){const h=await this.withReadProvider(a),v=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(o),o),m=await this.doMoveCopy(h,a,v,o,"copy",!!g),w=await this.resolve(o,{resolveMetadata:!0});return this._onDidRunOperation.fire(new c.FileOperationEvent(a,m==="copy"?3:2,w)),w}async doMoveCopy(a,o,g,h,v,m){if(o.toString()===h.toString())return v;const{exists:w,isSameResourceWithDifferentPathCase:D}=await this.doValidateMoveCopy(a,o,g,h,v,m);if(w&&!D&&m&&await this.del(h,{recursive:!0}),await this.mkdirp(g,this.getExtUri(g).providerExtUri.dirname(h)),v==="copy"){if(a===g&&(0,c.hasFileFolderCopyCapability)(a))await a.copy(o,h,{overwrite:m});else{const y=await this.resolve(o);y.isDirectory?await this.doCopyFolder(a,y,g,h):await this.doCopyFile(a,o,g,h)}return v}else return a===g?(await a.rename(o,h,{overwrite:m}),v):(await this.doMoveCopy(a,o,g,h,"copy",m),await this.del(o,{recursive:!0}),"copy")}async doCopyFile(a,o,g,h){if((0,c.hasOpenReadWriteCloseCapability)(a)&&(0,c.hasOpenReadWriteCloseCapability)(g))return this.doPipeBuffered(a,o,g,h);if((0,c.hasOpenReadWriteCloseCapability)(a)&&(0,c.hasReadWriteCapability)(g))return this.doPipeBufferedToUnbuffered(a,o,g,h);if((0,c.hasReadWriteCapability)(a)&&(0,c.hasOpenReadWriteCloseCapability)(g))return this.doPipeUnbufferedToBuffered(a,o,g,h);if((0,c.hasReadWriteCapability)(a)&&(0,c.hasReadWriteCapability)(g))return this.doPipeUnbuffered(a,o,g,h)}async doCopyFolder(a,o,g,h){await g.mkdir(h),Array.isArray(o.children)&&await p.Promises.settled(o.children.map(async v=>{const m=this.getExtUri(g).providerExtUri.joinPath(h,v.name);return v.isDirectory?this.doCopyFolder(a,await this.resolve(v.resource),g,m):this.doCopyFile(a,v.resource,g,m)}))}async doValidateMoveCopy(a,o,g,h,v,m){let w=!1;if(a===g){const{providerExtUri:y,isPathCaseSensitive:T}=this.getExtUri(a);if(T||(w=y.isEqual(o,h)),w&&v==="copy")throw new Error((0,f.localize)(14,null,this.resourceForError(o),this.resourceForError(h)));if(!w&&y.isEqualOrParent(h,o))throw new Error((0,f.localize)(15,null,this.resourceForError(o),this.resourceForError(h)))}const D=await this.exists(h);if(D&&!w){if(!m)throw new c.FileOperationError((0,f.localize)(16,null,this.resourceForError(o),this.resourceForError(h)),4);if(a===g){const{providerExtUri:y}=this.getExtUri(a);if(y.isEqualOrParent(o,h))throw new Error((0,f.localize)(17,null,this.resourceForError(o),this.resourceForError(h)))}}return{exists:D,isSameResourceWithDifferentPathCase:w}}getExtUri(a){const o=this.isPathCaseSensitive(a);return{providerExtUri:o?u.extUri:u.extUriIgnorePathCase,isPathCaseSensitive:o}}isPathCaseSensitive(a){return!!(a.capabilities&1024)}async createFolder(a){const o=this.throwIfFileSystemIsReadonly(await this.withProvider(a),a);await this.mkdirp(o,a);const g=await this.resolve(a,{resolveMetadata:!0});return this._onDidRunOperation.fire(new c.FileOperationEvent(a,0,g)),g}async mkdirp(a,o){const g=[],{providerExtUri:h}=this.getExtUri(a);for(;!h.isEqual(o,h.dirname(o));)try{if(((await a.stat(o)).type&c.FileType.Directory)===0)throw new Error((0,f.localize)(18,null,this.resourceForError(o)));break}catch(v){if((0,c.toFileSystemProviderErrorCode)(v)!==c.FileSystemProviderErrorCode.FileNotFound)throw v;g.push(h.basename(o)),o=h.dirname(o)}for(let v=g.length-1;v>=0;v--){o=h.joinPath(o,g[v]);try{await a.mkdir(o)}catch(m){if((0,c.toFileSystemProviderErrorCode)(m)!==c.FileSystemProviderErrorCode.FileExists)throw m}}}async canDelete(a,o){try{await this.doValidateDelete(a,o)}catch(g){return g}return!0}async doValidateDelete(a,o){const g=this.throwIfFileSystemIsReadonly(await this.withProvider(a),a);if(!!o?.useTrash&&!(g.capabilities&4096))throw new Error((0,f.localize)(19,null,this.resourceForError(a)));let v;try{v=await g.stat(a)}catch{}if(v)this.throwIfFileIsReadonly(a,v);else throw new c.FileOperationError((0,f.localize)(20,null,this.resourceForError(a)),1);if(!!!o?.recursive){const w=await this.resolve(a);if(w.isDirectory&&Array.isArray(w.children)&&w.children.length>0)throw new Error((0,f.localize)(21,null,this.resourceForError(a)))}return g}async del(a,o){const g=await this.doValidateDelete(a,o),h=!!o?.useTrash,v=!!o?.recursive;await g.delete(a,{recursive:v,useTrash:h}),this._onDidRunOperation.fire(new c.FileOperationEvent(a,1))}async cloneFile(a,o){const g=await this.withProvider(a),h=this.throwIfFileSystemIsReadonly(await this.withWriteProvider(o),o);if(g===h&&this.getExtUri(g).providerExtUri.isEqual(a,o))return;if(g===h&&(0,c.hasFileCloneCapability)(g))return g.cloneFile(a,o);await this.mkdirp(h,this.getExtUri(h).providerExtUri.dirname(o));const v=this.writeQueue.queueFor(a,this.getExtUri(g).providerExtUri);return g===h&&(0,c.hasFileFolderCopyCapability)(g)?v.queue(()=>g.copy(a,o,{overwrite:!0})):v.queue(()=>this.doCopyFile(g,a,h,o))}watch(a,o={recursive:!1,excludes:[]}){const g=new b.DisposableStore;let h=!1,v=()=>{h=!0};return g.add((0,b.toDisposable)(()=>v())),(async()=>{try{const m=await this.doWatch(a,o);h?(0,b.dispose)(m):v=()=>(0,b.dispose)(m)}catch(m){this.logService.error(m)}})(),g}async doWatch(a,o){const g=await this.withProvider(a),h=(0,E.hash)([this.getExtUri(g).providerExtUri.getComparisonKey(a),o]);let v=this.activeWatchers.get(h);return v||(v={count:0,disposable:g.watch(a,o)},this.activeWatchers.set(h,v)),v.count+=1,(0,b.toDisposable)(()=>{v&&(v.count--,v.count===0&&((0,b.dispose)(v.disposable),this.activeWatchers.delete(h)))})}dispose(){super.dispose();for(const[,a]of this.activeWatchers)(0,b.dispose)(a.disposable);this.activeWatchers.clear()}async doWriteBuffered(a,o,g,h){return this.writeQueue.queueFor(o,this.getExtUri(a).providerExtUri).queue(async()=>{const v=await a.open(o,{create:!0,unlock:g?.unlock??!1});try{(0,i.isReadableStream)(h)||(0,i.isReadableBufferedStream)(h)?await this.doWriteStreamBufferedQueued(a,v,h):await this.doWriteReadableBufferedQueued(a,v,h)}catch(m){throw(0,c.ensureFileSystemProviderError)(m)}finally{await a.close(v)}})}async doWriteStreamBufferedQueued(a,o,g){let h=0,v;if((0,i.isReadableBufferedStream)(g)){if(g.buffer.length>0){const m=R.VSBuffer.concat(g.buffer);await this.doWriteBuffer(a,o,m,m.byteLength,h,0),h+=m.byteLength}if(g.ended)return;v=g.stream}else v=g;return new Promise((m,w)=>{(0,i.listenStream)(v,{onData:async D=>{v.pause();try{await this.doWriteBuffer(a,o,D,D.byteLength,h,0)}catch(y){return w(y)}h+=D.byteLength,setTimeout(()=>v.resume())},onError:D=>w(D),onEnd:()=>m()})})}async doWriteReadableBufferedQueued(a,o,g){let h=0,v;for(;(v=g.read())!==null;)await this.doWriteBuffer(a,o,v,v.byteLength,h,0),h+=v.byteLength}async doWriteBuffer(a,o,g,h,v,m){let w=0;for(;w<h;)w+=await a.write(o,v+w,g.buffer,m+w,h-w)}async doWriteUnbuffered(a,o,g,h){return this.writeQueue.queueFor(o,this.getExtUri(a).providerExtUri).queue(()=>this.doWriteUnbufferedQueued(a,o,g,h))}async doWriteUnbufferedQueued(a,o,g,h){let v;h instanceof R.VSBuffer?v=h:(0,i.isReadableStream)(h)?v=await(0,R.streamToBuffer)(h):(0,i.isReadableBufferedStream)(h)?v=await(0,R.bufferedStreamToBuffer)(h):v=(0,R.readableToBuffer)(h),await a.writeFile(o,v.buffer,{create:!0,overwrite:!0,unlock:g?.unlock??!1})}async doPipeBuffered(a,o,g,h){return this.writeQueue.queueFor(h,this.getExtUri(g).providerExtUri).queue(()=>this.doPipeBufferedQueued(a,o,g,h))}async doPipeBufferedQueued(a,o,g,h){let v,m;try{v=await a.open(o,{create:!1}),m=await g.open(h,{create:!0,unlock:!1});const w=R.VSBuffer.alloc(this.BUFFER_SIZE);let D=0,y=0,T=0;do T=await a.read(v,D,w.buffer,y,w.byteLength-y),await this.doWriteBuffer(g,m,w,T,D,y),D+=T,y+=T,y===w.byteLength&&(y=0);while(T>0)}catch(w){throw(0,c.ensureFileSystemProviderError)(w)}finally{await p.Promises.settled([typeof v=="number"?a.close(v):Promise.resolve(),typeof m=="number"?g.close(m):Promise.resolve()])}}async doPipeUnbuffered(a,o,g,h){return this.writeQueue.queueFor(h,this.getExtUri(g).providerExtUri).queue(()=>this.doPipeUnbufferedQueued(a,o,g,h))}async doPipeUnbufferedQueued(a,o,g,h){return g.writeFile(h,await a.readFile(o),{create:!0,overwrite:!0,unlock:!1})}async doPipeUnbufferedToBuffered(a,o,g,h){return this.writeQueue.queueFor(h,this.getExtUri(g).providerExtUri).queue(()=>this.doPipeUnbufferedToBufferedQueued(a,o,g,h))}async doPipeUnbufferedToBufferedQueued(a,o,g,h){const v=await g.open(h,{create:!0,unlock:!1});try{const m=await a.readFile(o);await this.doWriteBuffer(g,v,R.VSBuffer.wrap(m),m.byteLength,0,0)}catch(m){throw(0,c.ensureFileSystemProviderError)(m)}finally{await g.close(v)}}async doPipeBufferedToUnbuffered(a,o,g,h){const v=await(0,R.streamToBuffer)(this.readFileBuffered(a,o,A.CancellationToken.None));await this.doWriteUnbuffered(g,h,void 0,v)}throwIfFileSystemIsReadonly(a,o){if(a.capabilities&2048)throw new c.FileOperationError((0,f.localize)(22,null,this.resourceForError(o)),6);return a}throwIfFileIsReadonly(a,o){if((o.permissions??0)&c.FilePermission.Readonly)throw new c.FileOperationError((0,f.localize)(23,null,this.resourceForError(a)),6)}resourceForError(a){return a.scheme===C.Schemas.file?a.fsPath:a.toString(!0)}};d=we([F(0,s.ILogService)],d),e.FileService=d}),define(ae[499],le([1,0,6,9,25]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FollowerLogService=e.LoggerChannelClient=e.LoggerChannel=e.LogLevelChannelClient=e.LogLevelChannel=void 0;class A{constructor(r,u){this.logService=r,this.loggerService=u,this.onDidChangeLogLevel=t.Event.buffer(r.onDidChangeLogLevel,!0)}listen(r,u){switch(u){case"onDidChangeLogLevel":return this.onDidChangeLogLevel}throw new Error(`Event not found: ${u}`)}async call(r,u,i){switch(u){case"setLevel":return i[1]?this.loggerService.setLevel(p.URI.revive(i[1]),i[0]):this.logService.setLevel(i[0])}throw new Error(`Call not found: ${u}`)}}e.LogLevelChannel=A;class k{constructor(r){this.channel=r}get onDidChangeLogLevel(){return this.channel.listen("onDidChangeLogLevel")}setLevel(r,u){k.setLevel(this.channel,r,u)}static setLevel(r,u,i){return r.call("setLevel",[u,i])}}e.LogLevelChannelClient=k;class E{constructor(r){this.loggerService=r,this.loggers=new Map}listen(r,u){throw new Error(`Event not found: ${u}`)}async call(r,u,i){switch(u){case"createLogger":this.createLogger(p.URI.revive(i[0]),i[1]);return;case"log":return this.log(p.URI.revive(i[0]),i[1]);case"consoleLog":return this.consoleLog(i[0],i[1])}throw new Error(`Call not found: ${u}`)}createLogger(r,u){this.loggers.set(r.toString(),this.loggerService.createLogger(r,u))}consoleLog(r,u){let i=console.log;switch(r){case R.LogLevel.Error:i=console.error;break;case R.LogLevel.Warning:i=console.warn;break;case R.LogLevel.Info:i=console.info;break}i.call(console,...u)}log(r,u){const i=this.loggers.get(r.toString());if(!i)throw new Error("Create the logger before logging");for(const[f,c]of u)(0,R.log)(i,f,c)}}e.LoggerChannel=E;class I extends R.AbstractLoggerService{constructor(r,u,i){super(r,u),this.channel=i}createConsoleMainLogger(){return new R.AdapterLogger({log:(r,u)=>{this.channel.call("consoleLog",[r,u])}})}doCreateLogger(r,u,i){return new b(this.channel,r,u,i)}}e.LoggerChannelClient=I;class b extends R.AbstractMessageLogger{constructor(r,u,i,f){super(f?.always),this.channel=r,this.file=u,this.isLoggerCreated=!1,this.buffer=[],this.setLevel(i),this.channel.call("createLogger",[u,f]).then(()=>{this.doLog(this.buffer),this.isLoggerCreated=!0})}log(r,u){const i=[[r,u]];this.isLoggerCreated?this.doLog(i):this.buffer.push(...i)}doLog(r){this.channel.call("log",[this.file,r])}}class S extends R.LogService{constructor(r,u){super(u),this.parent=r,this._register(r.onDidChangeLogLevel(i=>u.setLevel(i)))}setLevel(r){super.setLevel(r),this.parent.setLevel(r)}}e.FollowerLogService=S}),define(ae[124],le([1,0,68,1425,5]),function(J,e,t,p,R){"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 b(i,f){return f-i}I.compare=b;const S=Object.create(null);S[I.Error]=(0,p.localize)(0,null),S[I.Warning]=(0,p.localize)(1,null),S[I.Info]=(0,p.localize)(2,null);function C(i){return S[i]||""}I.toString=C;function r(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=r;function u(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=u}(k=e.MarkerSeverity||(e.MarkerSeverity={}));var E;(function(I){const b="";function S(r){return C(r,!0)}I.makeKey=S;function C(r,u){const i=[b];return r.source?i.push(r.source.replace("\xA6","\\\xA6")):i.push(b),r.code?typeof r.code=="string"?i.push(r.code.replace("\xA6","\\\xA6")):i.push(r.code.value.replace("\xA6","\\\xA6")):i.push(b),r.severity!==void 0&&r.severity!==null?i.push(k.toString(r.severity)):i.push(b),r.message&&u?i.push(r.message.replace("\xA6","\\\xA6")):i.push(b),r.startLineNumber!==void 0&&r.startLineNumber!==null?i.push(r.startLineNumber.toString()):i.push(b),r.startColumn!==void 0&&r.startColumn!==null?i.push(r.startColumn.toString()):i.push(b),r.endLineNumber!==void 0&&r.endLineNumber!==null?i.push(r.endLineNumber.toString()):i.push(b),r.endColumn!==void 0&&r.endColumn!==null?i.push(r.endColumn.toString()):i.push(b),i.push(b),i.join("\xA6")}I.makeKeyOptionalMessage=C})(E=e.IMarkerData||(e.IMarkerData={})),e.IMarkerService=(0,R.createDecorator)("markerService")}),define(ae[799],le([1,0,16,6,2,158,28,9,20,35,5,124,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class u{constructor(l,s,d){this.marker=l,this.index=s,this.total=d}}e.MarkerCoordinate=u;let i=class{constructor(l,s,d){this._markerService=s,this._configService=d,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new R.DisposableStore,this._markers=[],this._nextIdx=-1,E.URI.isUri(l)?this._resourceFilter=g=>g.toString()===l.toString():l&&(this._resourceFilter=l);const n=this._configService.getValue("problems.sortOrder"),a=(g,h)=>{let v=(0,k.compare)(g.resource.toString(),h.resource.toString());return v===0&&(n==="position"?v=I.Range.compareRangesUsingStarts(g,h)||C.MarkerSeverity.compare(g.severity,h.severity):v=C.MarkerSeverity.compare(g.severity,h.severity)||I.Range.compareRangesUsingStarts(g,h)),v},o=()=>{this._markers=this._markerService.read({resource:E.URI.isUri(l)?l:void 0,severities:C.MarkerSeverity.Error|C.MarkerSeverity.Warning|C.MarkerSeverity.Info}),typeof l=="function"&&(this._markers=this._markers.filter(g=>this._resourceFilter(g.resource))),this._markers.sort(a)};o(),this._dispoables.add(s.onMarkerChanged(g=>{(!this._resourceFilter||g.some(h=>this._resourceFilter(h)))&&(o(),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 u(l,this._nextIdx+1,this._markers.length)}_initIdx(l,s,d){let n=!1,a=this._markers.findIndex(o=>o.resource.toString()===l.uri.toString());a<0&&(a=(0,t.binarySearch)(this._markers,{resource:l.uri},(o,g)=>(0,k.compare)(o.resource.toString(),g.resource.toString())),a<0&&(a=~a));for(let o=a;o<this._markers.length;o++){let g=I.Range.lift(this._markers[o]);if(g.isEmpty()){const h=l.getWordAtPosition(g.getStartPosition());h&&(g=new I.Range(g.startLineNumber,h.startColumn,g.startLineNumber,h.endColumn))}if(s&&(g.containsPosition(s)||s.isBeforeOrEqual(g.getStartPosition()))){this._nextIdx=o,n=!0;break}if(this._markers[o].resource.toString()!==l.uri.toString())break}n||(this._nextIdx=d?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(l,s,d){if(this._markers.length===0)return!1;const n=this._nextIdx;return this._nextIdx===-1?this._initIdx(s,d,l):l?this._nextIdx=(this._nextIdx+1)%this._markers.length:l||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(l,s){let d=this._markers.findIndex(n=>n.resource.toString()===l.toString());if(!(d<0)){for(;d<this._markers.length;d++)if(I.Range.containsPosition(this._markers[d],s))return new u(this._markers[d],d+1,this._markers.length)}}};i=we([F(1,C.IMarkerService),F(2,r.IConfigurationService)],i),e.MarkerList=i,e.IMarkerNavigationService=(0,S.createDecorator)("IMarkerNavigationService");let f=class{constructor(l,s){this._markerService=l,this._configService=s,this._provider=new A.LinkedList}registerProvider(l){const s=this._provider.unshift(l);return(0,R.toDisposable)(()=>s())}getMarkerList(l){for(const s of this._provider){const d=s.getMarkerList(l);if(d)return d}return new i(l,this._markerService,this._configService)}};f=we([F(0,C.IMarkerService),F(1,r.IConfigurationService)],f),(0,b.registerSingleton)(e.IMarkerNavigationService,f,1)}),define(ae[500],le([1,0,16,6,88,60,22,9,124]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerService=e.unsupportedSchemas=void 0,e.unsupportedSchemas=new Set([k.Schemas.inMemory,k.Schemas.vscodeSourceControl,k.Schemas.walkThrough,k.Schemas.walkThroughSnippet]);class b{constructor(){this._byResource=new A.ResourceMap,this._byOwner=new Map}set(u,i,f){let c=this._byResource.get(u);c||(c=new Map,this._byResource.set(u,c)),c.set(i,f);let l=this._byOwner.get(i);l||(l=new A.ResourceMap,this._byOwner.set(i,l)),l.set(u,f)}get(u,i){return this._byResource.get(u)?.get(i)}delete(u,i){let f=!1,c=!1;const l=this._byResource.get(u);l&&(f=l.delete(i));const s=this._byOwner.get(i);if(s&&(c=s.delete(u)),f!==c)throw new Error("illegal state");return f&&c}values(u){return typeof u=="string"?this._byOwner.get(u)?.values()??R.Iterable.empty():E.URI.isUri(u)?this._byResource.get(u)?.values()??R.Iterable.empty():R.Iterable.map(R.Iterable.concat(...this._byOwner.values()),i=>i[1])}}class S{constructor(u){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new A.ResourceMap,this._service=u,this._subscription=u.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(u){for(const i of u){const f=this._data.get(i);f&&this._substract(f);const c=this._resourceStats(i);this._add(c),this._data.set(i,c)}}_resourceStats(u){const i={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(u.scheme))return i;for(const{severity:f}of this._service.read({resource:u}))f===I.MarkerSeverity.Error?i.errors+=1:f===I.MarkerSeverity.Warning?i.warnings+=1:f===I.MarkerSeverity.Info?i.infos+=1:i.unknowns+=1;return i}_substract(u){this.errors-=u.errors,this.warnings-=u.warnings,this.infos-=u.infos,this.unknowns-=u.unknowns}_add(u){this.errors+=u.errors,this.warnings+=u.warnings,this.infos+=u.infos,this.unknowns+=u.unknowns}}class C{constructor(){this._onMarkerChanged=new p.DebounceEmitter({delay:0,merge:C._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new b,this._stats=new S(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}getStatistics(){return this._stats}remove(u,i){for(const f of i||[])this.changeOne(u,f,[])}changeOne(u,i,f){if((0,t.isFalsyOrEmpty)(f))this._data.delete(i,u)&&this._onMarkerChanged.fire([i]);else{const c=[];for(const l of f){const s=C._toMarker(u,i,l);s&&c.push(s)}this._data.set(i,u,c),this._onMarkerChanged.fire([i])}}static _toMarker(u,i,f){let{code:c,severity:l,message:s,source:d,startLineNumber:n,startColumn:a,endLineNumber:o,endColumn:g,relatedInformation:h,tags:v}=f;if(!!s)return n=n>0?n:1,a=a>0?a:1,o=o>=n?o:n,g=g>0?g:a,{resource:i,owner:u,code:c,severity:l,message:s,source:d,startLineNumber:n,startColumn:a,endLineNumber:o,endColumn:g,relatedInformation:h,tags:v}}changeAll(u,i){const f=[],c=this._data.values(u);if(c)for(const l of c){const s=R.Iterable.first(l);s&&(f.push(s.resource),this._data.delete(s.resource,u))}if((0,t.isNonEmptyArray)(i)){const l=new A.ResourceMap;for(const{resource:s,marker:d}of i){const n=C._toMarker(u,s,d);if(!n)continue;const a=l.get(s);a?a.push(n):(l.set(s,[n]),f.push(s))}for(const[s,d]of l)this._data.set(s,u,d)}f.length>0&&this._onMarkerChanged.fire(f)}read(u=Object.create(null)){let{owner:i,resource:f,severities:c,take:l}=u;if((!l||l<0)&&(l=-1),i&&f){const s=this._data.get(f,i);if(s){const d=[];for(const n of s)if(C._accept(n,c)){const a=d.push(n);if(l>0&&a===l)break}return d}else return[]}else if(!i&&!f){const s=[];for(const d of this._data.values())for(const n of d)if(C._accept(n,c)){const a=s.push(n);if(l>0&&a===l)return s}return s}else{const s=this._data.values(f??i),d=[];for(const n of s)for(const a of n)if(C._accept(a,c)){const o=d.push(a);if(l>0&&o===l)return d}return d}}static _accept(u,i){return i===void 0||(i&u.severity)===u.severity}static _merge(u){const i=new A.ResourceMap;for(const f of u)for(const c of f)i.set(c,!0);return Array.from(i.keys())}}e.MarkerService=C}),define(ae[800],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMenubarService=void 0,e.IMenubarService=(0,t.createDecorator)("menubarService")}),define(ae[89],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INativeHostService=void 0,e.INativeHostService=(0,t.createDecorator)("nativeHostService")}),define(ae[2108],le([1,0,183,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostService=void 0;let R=class{constructor(k,E){return this.windowId=k,t.ProxyChannel.toService(E.getChannel("nativeHost"),{context:k,properties:(()=>{const I=new Map;return I.set("windowId",k),I})()})}};R=we([F(1,p.IMainProcessService)],R),e.NativeHostService=R}),define(ae[26],le([1,0,6,68,5]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpProgress=e.NoOpNotification=e.NotificationsFilter=e.NeverShowAgainScope=e.INotificationService=e.Severity=void 0,e.Severity=p.default,e.INotificationService=(0,R.createDecorator)("notificationService");var A;(function(b){b[b.WORKSPACE=0]="WORKSPACE",b[b.PROFILE=1]="PROFILE",b[b.APPLICATION=2]="APPLICATION"})(A=e.NeverShowAgainScope||(e.NeverShowAgainScope={}));var k;(function(b){b[b.OFF=0]="OFF",b[b.SILENT=1]="SILENT",b[b.ERROR=2]="ERROR"})(k=e.NotificationsFilter||(e.NotificationsFilter={}));class E{constructor(){this.progress=new I,this.onDidClose=t.Event.None,this.onDidChangeVisibility=t.Event.None}updateSeverity(S){}updateMessage(S){}updateActions(S){}close(){}}e.NoOpNotification=E;class I{infinite(){}done(){}total(S){}worked(S){}}e.NoOpProgress=I}),define(ae[41],le([1,0,2,28,9,5]),function(J,e,t,p,R,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(S){return{resolved:S,dispose(){}}}});function k(S,C){return R.URI.isUri(S)?(0,p.equalsIgnoreCase)(S.scheme,C):(0,p.startsWithIgnoreCase)(S,C+":")}e.matchesScheme=k;function E(S,...C){return C.some(r=>k(S,r))}e.matchesSomeScheme=E;function I(S,C){return S.with({fragment:`${C.startLineNumber},${C.startColumn}${C.endLineNumber?`-${C.endLineNumber}${C.endColumn?`,${C.endColumn}`:""}`:""}`})}e.withSelection=I;function b(S){let C;const r=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(S.fragment);return r&&(C={startLineNumber:parseInt(r[1]),startColumn:r[2]?parseInt(r[2]):1,endLineNumber:r[4]?parseInt(r[4]):void 0,endColumn:r[4]?r[5]?parseInt(r[5]):1:void 0},S=S.with({fragment:""})),{selection:C,uri:S}}e.extractSelection=b}),define(ae[2109],le([1,0,10,32,158,60,165,22,18,9,75,31,161,41]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let i=class{constructor(s){this._commandService=s}async open(s,d){if(!(0,u.matchesScheme)(s,E.Schemas.command))return!1;if(!d?.allowCommands)return!0;typeof s=="string"&&(s=b.URI.parse(s));let n=[];try{n=(0,k.parse)(decodeURIComponent(s.query))}catch{try{n=(0,k.parse)(s.query)}catch{}}return Array.isArray(n)||(n=[n]),await this._commandService.executeCommand(s.path,...n),!0}};i=we([F(0,C.ICommandService)],i);let f=class{constructor(s){this._editorService=s}async open(s,d){typeof s=="string"&&(s=b.URI.parse(s));const{selection:n,uri:a}=(0,u.extractSelection)(s);return s=a,s.scheme===E.Schemas.file&&(s=(0,I.normalizePath)(s)),await this._editorService.openCodeEditor({resource:s,options:{selection:n,source:d?.fromUserGesture?r.EditorOpenSource.USER:r.EditorOpenSource.API,...d?.editorOptions}},this._editorService.getFocusedCodeEditor(),d?.openToSide),!0}};f=we([F(0,S.ICodeEditorService)],f);let c=class{constructor(s,d){this._openers=new R.LinkedList,this._validators=new R.LinkedList,this._resolvers=new R.LinkedList,this._resolvedUriTargets=new A.ResourceMap(n=>n.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new R.LinkedList,this._defaultExternalOpener={openExternal:async n=>((0,u.matchesSomeScheme)(n,E.Schemas.http,E.Schemas.https)?t.windowOpenNoOpener(n):window.location.href=n,!0)},this._openers.push({open:async(n,a)=>a?.openExternal||(0,u.matchesSomeScheme)(n,E.Schemas.mailto,E.Schemas.http,E.Schemas.https,E.Schemas.vsls)?(await this._doOpenExternal(n,a),!0):!1}),this._openers.push(new i(d)),this._openers.push(new f(s))}registerOpener(s){return{dispose:this._openers.unshift(s)}}registerValidator(s){return{dispose:this._validators.push(s)}}registerExternalUriResolver(s){return{dispose:this._resolvers.push(s)}}setDefaultExternalOpener(s){this._defaultExternalOpener=s}registerExternalOpener(s){return{dispose:this._externalOpeners.push(s)}}async open(s,d){const n=typeof s=="string"?b.URI.parse(s):s,a=this._resolvedUriTargets.get(n)??s;for(const o of this._validators)if(!await o.shouldOpen(a,d))return!1;for(const o of this._openers)if(await o.open(s,d))return!0;return!1}async resolveExternalUri(s,d){for(const n of this._resolvers)try{const a=await n.resolveExternalUri(s,d);if(a)return this._resolvedUriTargets.has(a.resolved)||this._resolvedUriTargets.set(a.resolved,s),a}catch{}throw new Error("Could not resolve external URI: "+s.toString())}async _doOpenExternal(s,d){const n=typeof s=="string"?b.URI.parse(s):s;let a;try{a=(await this.resolveExternalUri(n,d)).resolved}catch{a=n}let o;if(typeof s=="string"&&n.toString()===a.toString()?o=s:o=encodeURI(a.toString(!0)),d?.allowContributedOpeners){const g=typeof d?.allowContributedOpeners=="string"?d?.allowContributedOpeners:void 0;for(const h of this._externalOpeners)if(await h.openExternal(o,{sourceUri:n,preferredOpenerId:g},p.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:n},p.CancellationToken.None)}dispose(){this._validators.clear()}};c=we([F(0,S.ICodeEditorService),F(1,C.ICommandService)],c),e.OpenerService=c}),define(ae[242],le([1,0,108,60,194,35,5,25,41]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,k.createDecorator)("ILanguageFeatureDebounceService");var b;(function(r){const u=new WeakMap;let i=0;function f(c){let l=u.get(c);return l===void 0&&(l=++i,u.set(c,l)),l}r.of=f})(b||(b={}));class S{constructor(u,i,f,c,l,s){this._logService=u,this._name=i,this._registry=f,this._default=c,this._min=l,this._max=s,this._cache=new p.LRUCache(50,.7)}_key(u){return u.id+this._registry.all(u).reduce((i,f)=>(0,t.doHash)(b.of(f),i),0)}get(u){const i=this._key(u),f=this._cache.get(i);return f?(0,R.clamp)(f.value,this._min,this._max):this.default()}update(u,i){const f=this._key(u);let c=this._cache.get(f);c||(c=new R.SlidingWindowAverage(6),this._cache.set(f,c));const l=(0,R.clamp)(c.update(i),this._min,this._max);return(0,I.matchesScheme)(u.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${u.uri.toString()} is ${l}ms`),l}_overall(){const u=new R.MovingAverage;for(const[,i]of this._cache)u.update(i.value);return u.value}default(){const u=this._overall()|0||this._default;return(0,R.clamp)(u,this._min,this._max)}}let C=class{constructor(u){this._logService=u,this._data=new Map}for(u,i,f){const c=f?.min??50,l=f?.max??c**2,s=f?.key??void 0,d=`${b.of(u)},${c}${s?","+s:""}`;let n=this._data.get(d);return n||(n=new S(this._logService,i,u,this._overallAverage()|0||c*1.5,c,l),this._data.set(d,n)),n}_overallAverage(){const u=new R.MovingAverage;for(const i of this._data.values())u.update(i.default());return u.value}};C=we([F(0,E.ILogService)],C),e.LanguageFeatureDebounceService=C,(0,A.registerSingleton)(e.ILanguageFeatureDebounceService,C,1)}),define(ae[375],le([1,0,16,32,21,88,60,28,50,20,242,5,35,54,2,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class c{remove(){this.parent?.children.delete(this.id)}static findId(o,g){let h;typeof o=="string"?h=`${g.id}/${o}`:(h=`${g.id}/${o.name}`,g.children.get(h)!==void 0&&(h=`${g.id}/${o.name}_${o.range.startLineNumber}_${o.range.startColumn}`));let v=h;for(let m=0;g.children.get(v)!==void 0;m++)v=`${h}_${m}`;return v}static getElementById(o,g){if(!o)return;const h=(0,E.commonPrefixLength)(o,g.id);if(h===o.length)return g;if(!(h<g.id.length))for(const[,v]of g.children){const m=c.getElementById(o,v);if(m)return m}}static size(o){let g=1;for(const[,h]of o.children)g+=c.size(h);return g}static empty(o){return o.children.size===0}}e.TreeElement=c;class l extends c{constructor(o,g,h){super(),this.id=o,this.parent=g,this.symbol=h,this.children=new Map}}e.OutlineElement=l;class s extends c{constructor(o,g,h,v){super(),this.id=o,this.parent=g,this.label=h,this.order=v,this.children=new Map}getItemEnclosingPosition(o){return o?this._getItemEnclosingPosition(o,this.children):void 0}_getItemEnclosingPosition(o,g){for(const[,h]of g)if(!(!h.symbol.range||!b.Range.containsPosition(h.symbol.range,o)))return this._getItemEnclosingPosition(o,h.children)||h}updateMarker(o){for(const[,g]of this.children)this._updateMarker(o,g)}_updateMarker(o,g){g.marker=void 0;const h=(0,t.binarySearch)(o,g.symbol.range,b.Range.compareRangesUsingStarts);let v;h<0?(v=~h,v>0&&b.Range.areIntersecting(o[v-1],g.symbol.range)&&(v-=1)):v=h;const m=[];let w;for(;v<o.length&&b.Range.areIntersecting(g.symbol.range,o[v]);v++){const D=o[v];m.push(D),o[v]=void 0,(!w||D.severity>w)&&(w=D.severity)}for(const[,D]of g.children)this._updateMarker(m,D);w&&(g.marker={count:m.length,topSev:w}),(0,t.coalesceInPlace)(o)}}e.OutlineGroup=s;class d extends c{static create(o,g,h){const v=new p.CancellationTokenSource(h),m=new d(g.uri),w=o.ordered(g),D=w.map((T,_)=>{const L=c.findId(`provider_${_}`,m),M=new s(L,m,T.displayName??"Unknown Outline Provider",_);return Promise.resolve(T.provideDocumentSymbols(g,v.token)).then(O=>{for(const N of O||[])d._makeOutlineElement(N,M);return M},O=>((0,R.onUnexpectedExternalError)(O),M)).then(O=>{c.empty(O)?O.remove():m._groups.set(L,O)})}),y=o.onDidChange(()=>{const T=o.ordered(g);(0,t.equals)(T,w)||v.cancel()});return Promise.all(D).then(()=>v.token.isCancellationRequested&&!h.isCancellationRequested?d.create(o,g,h):m._compact()).finally(()=>{y.dispose()})}static _makeOutlineElement(o,g){const h=c.findId(o,g),v=new l(h,g,o);if(o.children)for(const m of o.children)d._makeOutlineElement(m,v);g.children.set(v.id,v)}static get(o){for(;o;){if(o instanceof d)return o;o=o.parent}}constructor(o){super(),this.uri=o,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let o=0;for(const[g,h]of this._groups)h.children.size===0?this._groups.delete(g):o+=1;if(o!==1)this.children=this._groups;else{const g=A.Iterable.first(this._groups.values());for(const[,h]of g.children)h.parent=this,this.children.set(h.id,h)}return this}merge(o){return this.uri.toString()!==o.uri.toString()||this._groups.size!==o._groups.size?!1:(this._groups=o._groups,this.children=o.children,!0)}getItemEnclosingPosition(o,g){let h;if(g){let m=g.parent;for(;m&&!h;)m instanceof s&&(h=m),m=m.parent}let v;for(const[,m]of this._groups)if(v=m.getItemEnclosingPosition(o),v&&(!h||h===m))break;return v}getItemById(o){return c.getElementById(o,this)}updateMarker(o){o.sort(b.Range.compareRangesUsingStarts);for(const[,g]of this._groups)g.updateMarker(o.slice(0))}getTopLevelSymbols(){const o=[];for(const g of this.children.values())g instanceof l?o.push(g.symbol):o.push(...A.Iterable.map(g.children.values(),h=>h.symbol));return o.sort((g,h)=>b.Range.compareRangesUsingStarts(g.range,h.range))}asListOfDocumentSymbols(){const o=this.getTopLevelSymbols(),g=[];return d._flattenDocumentSymbols(g,o,""),g.sort((h,v)=>I.Position.compare(b.Range.getStartPosition(h.range),b.Range.getStartPosition(v.range))||I.Position.compare(b.Range.getEndPosition(v.range),b.Range.getEndPosition(h.range)))}static _flattenDocumentSymbols(o,g,h){for(const v of g)o.push({kind:v.kind,tags:v.tags,name:v.name,detail:v.detail,containerName:v.containerName||h,range:v.range,selectionRange:v.selectionRange,children:void 0}),v.children&&d._flattenDocumentSymbols(o,v.children,v.name)}}e.OutlineModel=d,e.IOutlineModelService=(0,C.createDecorator)("IOutlineModelService");let n=class{constructor(o,g,h){this._languageFeaturesService=o,this._disposables=new i.DisposableStore,this._cache=new k.LRUCache(10,.7),this._debounceInformation=g.for(o.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(h.onModelRemoved(v=>{this._cache.delete(v.id)}))}dispose(){this._disposables.dispose()}async getOrCreate(o,g){const h=this._languageFeaturesService.documentSymbolProvider,v=h.ordered(o);let m=this._cache.get(o.id);if(!m||m.versionId!==o.getVersionId()||!(0,t.equals)(m.provider,v)){const D=new p.CancellationTokenSource;m={versionId:o.getVersionId(),provider:v,promiseCnt:0,source:D,promise:d.create(h,o,D.token),model:void 0},this._cache.set(o.id,m);const y=Date.now();m.promise.then(T=>{m.model=T,this._debounceInformation.update(o,Date.now()-y)}).catch(T=>{this._cache.delete(o.id)})}if(m.model)return m.model;m.promiseCnt+=1;const w=g.onCancellationRequested(()=>{--m.promiseCnt===0&&(m.source.cancel(),this._cache.delete(o.id))});try{return await m.promise}finally{w.dispose()}}getDebounceValue(o){return this._debounceInformation.get(o)}};n=we([F(0,f.ILanguageFeaturesService),F(1,S.ILanguageFeatureDebounceService),F(2,u.IModelService)],n),e.OutlineModelService=n,(0,r.registerSingleton)(e.IOutlineModelService,n,1)}),define(ae[2110],le([1,0,32,13,9,62,375,31]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),E.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",async function(I,...b){const[S]=b;(0,p.assertType)(R.URI.isUri(S));const C=I.get(k.IOutlineModelService),u=await I.get(A.ITextModelService).createModelReference(S);try{return(await C.getOrCreate(u.object.textEditorModel,t.CancellationToken.None)).getTopLevelSymbols()}finally{u.dispose()}})}),define(ae[501],le([1,0,6,88,2,5]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NullPolicyService=e.AbstractPolicyService=e.IPolicyService=void 0,e.IPolicyService=(0,A.createDecorator)("policy");class k extends R.Disposable{constructor(){super(...arguments),this.policyDefinitions={},this.policies=new Map,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event}async registerPolicyDefinitions(b){const S=Object.keys(this.policyDefinitions).length;return this.policyDefinitions={...b,...this.policyDefinitions},S!==Object.keys(this.policyDefinitions).length&&await this.initializePolicies(b),p.Iterable.reduce(this.policies.entries(),(C,[r,u])=>({...C,[r]:u}),{})}getPolicyValue(b){return this.policies.get(b)}serialize(){return p.Iterable.reduce(Object.entries(this.policyDefinitions),(b,[S,C])=>({...b,[S]:{definition:C,value:this.policies.get(S)}}),{})}}e.AbstractPolicyService=k;class E{constructor(){this.onDidChange=t.Event.None}async registerPolicyDefinitions(){return{}}getPolicyValue(){}serialize(){}}e.NullPolicyService=E}),define(ae[2111],le([1,0,6,2,501]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyChannelClient=e.PolicyChannel=void 0;class A{constructor(I){this.service=I,this.disposables=new p.DisposableStore}listen(I,b){switch(b){case"onDidChange":return t.Event.map(this.service.onDidChange,S=>S.reduce((C,r)=>({...C,[r]:this.service.getPolicyValue(r)??null}),{}),this.disposables)}throw new Error(`Event not found: ${b}`)}call(I,b,S){switch(b){case"registerPolicyDefinitions":return this.service.registerPolicyDefinitions(S)}throw new Error(`Call not found: ${b}`)}dispose(){this.disposables.dispose()}}e.PolicyChannel=A;class k extends R.AbstractPolicyService{constructor(I,b){super(),this.channel=b;for(const S in I){const{definition:C,value:r}=I[S];this.policyDefinitions[S]=C,r!==void 0&&this.policies.set(S,r)}this.channel.listen("onDidChange")(S=>{for(const C in S){const r=S[C];r===null?this.policies.delete(C):this.policies.set(C,r)}this._onDidChange.fire(Object.keys(S))})}async initializePolicies(I){const b=await this.channel.call("registerPolicyDefinitions",I);for(const S in b)this.policies.set(S,b[S])}}e.PolicyChannelClient=k}),define(ae[307],le([1,0,22,14,209,18]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k;if(typeof p.globals.vscode<"u"&&typeof p.globals.vscode.context<"u"){const E=p.globals.vscode.context.configuration();if(E)k=E.product;else throw new Error("Sandbox: unable to resolve product configuration from preload script.")}else if(typeof J?.__$__nodeRequire=="function"){const E=(0,A.dirname)(t.FileAccess.asFileUri("",J));if(k=J.__$__nodeRequire((0,A.joinPath)(E,"product.json").fsPath),R.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}),!k.version){const I=J.__$__nodeRequire((0,A.joinPath)(E,"package.json").fsPath);Object.assign(k,{version:I.version})}}else k={},Object.keys(k).length===0&&Object.assign(k,{version:"1.72.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(ae[46],le([1,0,5]),function(J,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(ae[502],le([1,0,53,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Utils=e.IV8InspectProfilingService=void 0,e.IV8InspectProfilingService=(0,p.createDecorator)("IV8InspectProfilingService");var R;(function(A){function k(I){return Boolean(I.samples&&I.timeDeltas)}A.isValidProfile=k;function E(I,b="noAbsolutePaths"){for(const S of I.nodes)S.callFrame&&S.callFrame.url&&((0,t.isAbsolute)(S.callFrame.url)||/^\w[\w\d+.-]*:\/\/\/?/.test(S.callFrame.url))&&(S.callFrame.url=(0,t.join)(b,(0,t.basename)(S.callFrame.url)));return I}A.rewriteAbsolutePaths=E})(R=e.Utils||(e.Utils={}))}),define(ae[2112],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reportSample=void 0;function t(p,R,A){const{sample:k,perfBaseline:E,source:I}=p,b=new Error(`[PerfSampleError]|${k.selfTime}ms`);b.name="PerfSampleError",b.stack=`${b.message} by ${p.source} in ${k.location} `+k.caller.map(S=>` at ${S.location} (${S.percentage}%)`).join(` `),A.error(b),R.publicLog2("unresponsive.sample",{perfBaseline:E,selfTime:k.selfTime,totalTime:k.totalTime,percentage:k.percentage,functionName:k.location,callers:k.caller.map(S=>S.location).join("<"),callersAnnotated:k.caller.map(S=>`${S.percentage}|${S.location}`).join("<"),source:I})}e.reportSample=t}),define(ae[2113],le([1,0,102,502]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(p.IV8InspectProfilingService,"v8InspectProfiling")}),define(ae[66],le([1,0,11,32,2,5]),function(J,e,t,p,R,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(S){S[S.Explorer=1]="Explorer",S[S.Scm=3]="Scm",S[S.Extensions=5]="Extensions",S[S.Window=10]="Window",S[S.Notification=15]="Notification",S[S.Dialog=20]="Dialog"})(k=e.ProgressLocation||(e.ProgressLocation={})),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class E{get value(){return this._value}constructor(C){this.callback=C}report(C){this._value=C,this.callback(this._value)}}e.Progress=E,E.None=Object.freeze({report(){}});let I=class extends R.Disposable{constructor(C,r){super(),this.deferred=new t.DeferredPromise,r.withProgress(C,u=>(this.reporter=u,this.lastStep&&u.report(this.lastStep),this.deferred.p)),this._register((0,R.toDisposable)(()=>this.deferred.complete()))}report(C){this.reporter?this.reporter.report(C):this.lastStep=C}};I=we([F(1,e.IProgressService)],I),e.UnmanagedProgress=I;class b extends R.Disposable{constructor(C){super(),this.progressIndicator=C,this.currentOperationId=0,this.currentOperationDisposables=this._register(new R.DisposableStore)}start(C){this.stop();const r=++this.currentOperationId,u=new p.CancellationTokenSource;return this.currentProgressTimeout=setTimeout(()=>{r===this.currentOperationId&&(this.currentProgressRunner=this.progressIndicator.show(!0))},C),this.currentOperationDisposables.add((0,R.toDisposable)(()=>clearTimeout(this.currentProgressTimeout))),this.currentOperationDisposables.add((0,R.toDisposable)(()=>u.cancel())),this.currentOperationDisposables.add((0,R.toDisposable)(()=>this.currentProgressRunner?this.currentProgressRunner.done():void 0)),{id:r,token:u.token,stop:()=>this.doStop(r),isCurrent:()=>this.currentOperationId===r}}stop(){this.doStop(this.currentOperationId)}doStop(C){this.currentOperationId===C&&this.currentOperationDisposables.clear()}}e.LongRunningOperation=b,e.IEditorProgressService=(0,A.createDecorator)("editorProgressService")}),define(ae[252],le([1,0,11,32,2]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var A;(function(b){b[b.NO_ACTION=0]="NO_ACTION",b[b.CLOSE_PICKER=1]="CLOSE_PICKER",b[b.REFRESH_PICKER=2]="REFRESH_PICKER",b[b.REMOVE_ITEM=3]="REMOVE_ITEM"})(A=e.TriggerAction||(e.TriggerAction={}));function k(b){const S=b;return Array.isArray(S.items)}function E(b){const S=b;return!!S.picks&&S.additionalPicks instanceof Promise}class I extends R.Disposable{constructor(S,C){super(),this.prefix=S,this.options=C}provide(S,C,r){const u=new R.DisposableStore;S.canAcceptInBackground=!!this.options?.canAcceptInBackground,S.matchOnLabel=S.matchOnDescription=S.matchOnDetail=S.sortByLabel=!1;let i;const f=u.add(new R.MutableDisposable),c=async()=>{const l=f.value=new R.DisposableStore;i?.dispose(!0),S.busy=!1,i=new p.CancellationTokenSource(C);const s=i.token,d=S.value.substr(this.prefix.length).trim(),n=this._getPicks(d,l,s,r),a=(o,g)=>{let h,v;if(k(o)?(h=o.items,v=o.active):h=o,h.length===0){if(g)return!1;d.length>0&&this.options?.noResultsPick&&(h=[this.options.noResultsPick])}return S.items=h,v&&(S.activeItems=[v]),!0};if(n!==null)if(E(n)){let o=!1,g=!1;await Promise.all([(async()=>{await(0,t.timeout)(I.FAST_PICKS_RACE_DELAY),!s.isCancellationRequested&&(g||(o=a(n.picks,!0)))})(),(async()=>{S.busy=!0;try{const h=await n.additionalPicks;if(s.isCancellationRequested)return;let v,m;k(n.picks)?(v=n.picks.items,m=n.picks.active):v=n.picks;let w,D;if(k(h)?(w=h.items,D=h.active):w=h,w.length>0||!o){let y;if(!m&&!D){const T=S.activeItems[0];T&&v.indexOf(T)!==-1&&(y=T)}a({items:[...v,...w],active:m||D||y})}}finally{s.isCancellationRequested||(S.busy=!1),g=!0}})()])}else if(!(n instanceof Promise))a(n);else{S.busy=!0;try{const o=await n;if(s.isCancellationRequested)return;a(o)}finally{s.isCancellationRequested||(S.busy=!1)}}};return u.add(S.onDidChangeValue(()=>c())),c(),u.add(S.onDidAccept(l=>{const[s]=S.selectedItems;typeof s?.accept=="function"&&(l.inBackground||S.hide(),s.accept(S.keyMods,l))})),u.add(S.onDidTriggerItemButton(async({button:l,item:s})=>{if(typeof s.trigger=="function"){const d=s.buttons?.indexOf(l)??-1;if(d>=0){const n=s.trigger(d,S.keyMods),a=typeof n=="number"?n:await n;if(C.isCancellationRequested)return;switch(a){case A.NO_ACTION:break;case A.CLOSE_PICKER:S.hide();break;case A.REFRESH_PICKER:c();break;case A.REMOVE_ITEM:{const o=S.items.indexOf(s);if(o!==-1){const g=S.items.slice(),h=g.splice(o,1),v=S.activeItems.filter(w=>w!==h[0]),m=S.keepScrollPosition;S.keepScrollPosition=!0,S.items=g,v&&(S.activeItems=v),S.keepScrollPosition=m}break}}}}})),u}}e.PickerQuickAccessProvider=I,I.FAST_PICKS_RACE_DELAY=200});var Yr=this&&this.__createBinding||(Object.create?function(J,e,t,p){p===void 0&&(p=t);var R=Object.getOwnPropertyDescriptor(e,t);(!R||("get"in R?!e.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(J,p,R)}:function(J,e,t,p){p===void 0&&(p=t),J[p]=e[t]}),Xr=this&&this.__exportStar||function(J,e){for(var t in J)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Yr(e,J,t)};define(ae[48],le([1,0,5,762]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=void 0,Xr(p,e),e.IQuickInputService=(0,t.createDecorator)("quickInputService")}),define(ae[17],le([1,0,171,13]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class R{constructor(){this.data=new Map}add(k,E){t.ok(p.isString(k)),t.ok(p.isObject(E)),t.ok(!this.data.has(k),"There is already an extension with this id"),this.data.set(k,E)}knows(k){return this.data.has(k)}as(k){return this.data.get(k)||null}}e.Registry=new R}),define(ae[253],le([1,0,181,16,11,56,165,22,14,68,13,9,1410,47,2090,426,19,5,41,17]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.containsDragType=e.extractFileListData=e.createDraggedEditorInputFromRawResourcesData=e.extractEditorsAndFilesDropData=e.extractEditorsDropData=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};function n(D){const y=[];if(D.dataTransfer&&D.dataTransfer.types.length>0){const T=D.dataTransfer.getData(e.CodeDataTransfers.EDITORS);if(T)try{y.push(...(0,k.parse)(T))}catch{}else try{const M=D.dataTransfer.getData(t.DataTransfers.RESOURCES);y.push(...o(M))}catch{}if(D.dataTransfer?.files)for(let M=0;M<D.dataTransfer.files.length;M++){const O=D.dataTransfer.files[M];if(O&&O.path)try{y.push({resource:C.URI.file(O.path),isExternal:!0,allowWorkspaceOpen:!0})}catch{}}const _=D.dataTransfer.getData(e.CodeDataTransfers.FILES);if(_)try{const M=JSON.parse(_);for(const O of M)y.push({resource:C.URI.file(O),isExternal:!0,allowWorkspaceOpen:!0})}catch{}const L=d.Registry.as(e.Extensions.DragAndDropContribution).getAll();for(const M of L){const O=D.dataTransfer.getData(M.dataFormatKey);if(O)try{y.push(...M.getEditorInputs(O))}catch{}}}return y}e.extractEditorsDropData=n;async function a(D,y){const T=n(y);if(y.dataTransfer&&I.isWeb&&m(y,t.DataTransfers.FILES)&&y.dataTransfer.items){const M=await D.get(l.IInstantiationService).invokeFunction(O=>g(O,y));for(const O of M)T.push({resource:O.resource,contents:O.contents?.toString(),isExternal:!0,allowWorkspaceOpen:O.isDirectory})}return T}e.extractEditorsAndFilesDropData=a;function o(D){const y=[];if(D){const T=JSON.parse(D);for(const _ of T)if(_.indexOf(":")>0){const{selection:L,uri:M}=(0,s.extractSelection)(C.URI.parse(_));y.push({resource:M,options:{selection:L}})}}return y}e.createDraggedEditorInputFromRawResourcesData=o;async function g(D,y){if(f.WebFileSystemAccess.supported(window)){const _=y.dataTransfer?.items;if(_)return h(D,_)}const T=y.dataTransfer?.files;return T?v(D,T):[]}async function h(D,y){const T=D.get(c.IFileService).getProvider(E.Schemas.file);if(!(T instanceof i.HTMLFileSystemProvider))return[];const _=[];for(let L=0;L<y.length;L++){const M=y[L];if(M){const O=new R.DeferredPromise;_.push(O),(async()=>{try{const N=await M.getAsFileSystemHandle();if(!N){O.complete(void 0);return}f.WebFileSystemAccess.isFileSystemFileHandle(N)?O.complete({resource:await T.registerFileHandle(N),isDirectory:!1}):f.WebFileSystemAccess.isFileSystemDirectoryHandle(N)?O.complete({resource:await T.registerDirectoryHandle(N),isDirectory:!0}):O.complete(void 0)}catch{O.complete(void 0)}})()}}return(0,p.coalesce)(await Promise.all(_.map(L=>L.p)))}async function v(D,y){const T=D.get(u.IDialogService),_=[];for(let L=0;L<y.length;L++){const M=y.item(L);if(M){if(M.size>100*c.ByteSize.MB){T.show(b.default.Warning,(0,r.localize)(0,null));continue}const O=new R.DeferredPromise;_.push(O);const N=new FileReader;N.onerror=()=>O.complete(void 0),N.onabort=()=>O.complete(void 0),N.onload=async P=>{const B=M.name,V=(0,S.withNullAsUndefined)(P.target?.result);if(typeof B!="string"||typeof V>"u"){O.complete(void 0);return}O.complete({resource:C.URI.from({scheme:E.Schemas.untitled,path:B}),contents:typeof V=="string"?A.VSBuffer.fromString(V):A.VSBuffer.wrap(new Uint8Array(V))})},N.readAsArrayBuffer(M)}}return(0,p.coalesce)(await Promise.all(_.map(L=>L.p)))}e.extractFileListData=v;function m(D,...y){if(!D.dataTransfer)return!1;const T=D.dataTransfer.types,_=[];for(let L=0;L<T.length;L++)_.push(T[L].toLowerCase());for(const L of y)if(_.indexOf(L.toLowerCase())>=0)return!0;return!1}e.containsDragType=m;class w{constructor(){this._contributions=new Map}register(y){if(this._contributions.has(y.dataFormatKey))throw new Error(`A drag and drop contributiont with key '${y.dataFormatKey}' was already registered.`);this._contributions.set(y.dataFormatKey,y)}getAll(){return this._contributions.values()}}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},d.Registry.add(e.Extensions.DragAndDropContribution,new w)}),define(ae[503],le([1,0,181,16,358,160,9,253]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriList=e.addExternalEditorsDropData=e.createFileDataTransferItemFromFile=e.toVSDataTransfer=void 0;function I(r){const u=new R.VSDataTransfer;for(const i of r.items){const f=i.type;if(i.kind==="string"){const c=new Promise(l=>i.getAsString(l));u.append(f,(0,R.createStringDataTransferItem)(c))}else if(i.kind==="file"){const c=i.getAsFile();c&&u.append(f,b(c))}}return u}e.toVSDataTransfer=I;function b(r){const u=r.path?k.URI.parse(r.path):void 0;return(0,R.createFileDataTransferItem)(r.name,u,async()=>new Uint8Array(await r.arrayBuffer()))}e.createFileDataTransferItemFromFile=b;const S=Object.freeze([E.CodeDataTransfers.EDITORS,E.CodeDataTransfers.FILES,t.DataTransfers.RESOURCES]);function C(r,u,i=!1){if(u.dataTransfer&&(i||!r.has(A.Mimes.uriList))){const f=(0,E.extractEditorsDropData)(u).filter(c=>c.resource).map(c=>c.resource.toString());for(const c of u.dataTransfer?.items){const l=c.getAsFile();l&&f.push(l.path?k.URI.file(l.path).toString():l.name)}f.length&&r.replace(A.Mimes.uriList,(0,R.createStringDataTransferItem)(e.UriList.create(f)))}for(const f of S)r.delete(f)}e.addExternalEditorsDropData=C,e.UriList=Object.freeze({create:r=>(0,p.distinct)(r.map(u=>u.toString())).join(`\r `),parse:r=>r.split(`\r `).filter(u=>!u.startsWith("#"))})}),define(ae[155],le([1,0,6,17]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function R(E){return E.length>0&&E.charAt(E.length-1)==="#"?E.substring(0,E.length-1):E}class A{constructor(){this._onDidChangeSchema=new t.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.schemasById={}}registerSchema(I,b){this.schemasById[R(I)]=b,this._onDidChangeSchema.fire(I)}notifySchemaChanged(I){this._onDidChangeSchema.fire(I)}getSchemaContributions(){return{schemas:this.schemasById}}}const k=new A;p.Registry.add(e.Extensions.JSONContribution,k)}),define(ae[55],le([1,0,16,6,13,1406,8,155,17]),function(J,e,t,p,R,A,k,E,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 b;(function(a){a.Multiline="multilineText",a.Singleline="singlelineText"})(b=e.EditPresentationTypes||(e.EditPresentationTypes={})),e.Extensions={Configuration:"base.contributions.configuration"};var S;(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"})(S=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(E.Extensions.JSONContribution);class r{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new p.Emitter,this.onDidSchemaChange=this._onDidSchemaChange.event,this._onDidUpdateConfiguration=new p.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.policyConfigurations=new Map,this.excludedConfigurationProperties={},C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(o,g=!0){this.registerConfigurations([o],g)}registerConfigurations(o,g=!0){const h=this.doRegisterConfigurations(o,g);C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:h})}deregisterConfigurations(o){const g=this.doDeregisterConfigurations(o);C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:g})}updateConfigurations({add:o,remove:g}){const h=[];h.push(...this.doDeregisterConfigurations(g)),h.push(...this.doRegisterConfigurations(o,!1)),C.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:(0,t.distinct)(h)})}registerDefaultConfigurations(o){const g=[],h=[];for(const{overrides:v,source:m}of o)for(const w in v)if(g.push(w),e.OVERRIDE_PROPERTY_REGEX.test(w)){const D=this.configurationDefaultsOverrides.get(w),y=D?.valuesSources??new Map;if(m)for(const M of Object.keys(v[w]))y.set(M,m);const T={...D?.value||{},...v[w]};this.configurationDefaultsOverrides.set(w,{source:m,value:T,valuesSources:y});const _=(0,k.getLanguageTagSettingPlainKey)(w),L={type:"object",default:T,description:A.localize(1,null,_),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:T,source:R.isString(m)?void 0:m,defaultValueSource:m};h.push(...f(w)),this.configurationProperties[w]=L,this.defaultLanguageConfigurationOverridesNode.properties[w]=L}else{this.configurationDefaultsOverrides.set(w,{value:v[w],source:m});const D=this.configurationProperties[w];D&&(this.updatePropertyDefaultValue(w,D),this.updateSchema(w,D))}this.registerOverrideIdentifiers(h),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:g,defaultsOverrides:!0})}deregisterDefaultConfigurations(o){const g=[];for(const{overrides:h,source:v}of o)for(const m in h){const w=this.configurationDefaultsOverrides.get(m),D=R.isString(v)?v:v?.id,y=R.isString(w?.source)?w?.source:w?.source?.id;if(D===y)if(g.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:g,defaultsOverrides:!0})}notifyConfigurationSchemaUpdated(...o){this._onDidSchemaChange.fire()}registerOverrideIdentifiers(o){for(const g of o)this.overrideIdentifiers.add(g);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(o,g){const h=[];return o.forEach(v=>{h.push(...this.validateAndRegisterProperties(v,g,v.extensionInfo,v.restrictedProperties)),this.configurationContributors.push(v),this.registerJSONConfiguration(v)}),h}doDeregisterConfigurations(o){const g=[],h=v=>{if(v.properties)for(const m in v.properties){g.push(m);const w=this.configurationProperties[m];w?.policy?.name&&this.policyConfigurations.delete(w.policy.name),delete this.configurationProperties[m],this.removeFromSchema(m,v.properties[m])}v.allOf?.forEach(m=>h(m))};for(const v of o){h(v);const m=this.configurationContributors.indexOf(v);m!==-1&&this.configurationContributors.splice(m,1)}return g}validateAndRegisterProperties(o,g=!0,h,v,m=3){m=R.isUndefinedOrNull(o.scope)?m:o.scope;const w=[],D=o.properties;if(D)for(const T in D){const _=D[T];if(g&&d(T,_)){delete D[T];continue}if(_.source=h,_.defaultDefaultValue=D[T].default,this.updatePropertyDefaultValue(T,_),e.OVERRIDE_PROPERTY_REGEX.test(T)?_.scope=void 0:(_.scope=R.isUndefinedOrNull(_.scope)?m:_.scope,_.restricted=R.isUndefinedOrNull(_.restricted)?!!v?.includes(T):_.restricted),D[T].hasOwnProperty("included")&&!D[T].included){this.excludedConfigurationProperties[T]=D[T],delete D[T];continue}else this.configurationProperties[T]=D[T],D[T].policy?.name&&this.policyConfigurations.set(D[T].policy.name,T);!D[T].deprecationMessage&&D[T].markdownDeprecationMessage&&(D[T].deprecationMessage=D[T].markdownDeprecationMessage),w.push(T)}const y=o.allOf;if(y)for(const T of y)w.push(...this.validateAndRegisterProperties(T,g,h,v,m));return w}getConfigurations(){return this.configurationContributors}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}getExcludedConfigurationProperties(){return this.excludedConfigurationProperties}getConfigurationDefaultsOverrides(){return this.configurationDefaultsOverrides}registerJSONConfiguration(o){const g=h=>{const v=h.properties;if(v)for(const w in v)this.updateSchema(w,v[w]);h.allOf?.forEach(g)};g(o)}updateSchema(o,g){switch(e.allSettings.properties[o]=g,g.scope){case 1:e.applicationSettings.properties[o]=g;break;case 2:e.machineSettings.properties[o]=g;break;case 6:e.machineOverridableSettings.properties[o]=g;break;case 3:e.windowSettings.properties[o]=g;break;case 4:e.resourceSettings.properties[o]=g;break;case 5:e.resourceSettings.properties[o]=g,this.resourceLanguageSettingsSchema.properties[o]=g;break}}removeFromSchema(o,g){switch(delete e.allSettings.properties[o],g.scope){case 1:delete e.applicationSettings.properties[o];break;case 2:delete e.machineSettings.properties[o];break;case 6:delete e.machineOverridableSettings.properties[o];break;case 3:delete e.windowSettings.properties[o];break;case 4:case 5:delete e.resourceSettings.properties[o],delete this.resourceLanguageSettingsSchema.properties[o];break}}updateOverridePropertyPatternKey(){for(const o of this.overrideIdentifiers.values()){const g=`[${o}]`,h={type:"object",description:A.localize(2,null),errorMessage:A.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(g,h),e.allSettings.properties[g]=h,e.applicationSettings.properties[g]=h,e.machineSettings.properties[g]=h,e.machineOverridableSettings.properties[g]=h,e.windowSettings.properties[g]=h,e.resourceSettings.properties[g]=h}this._onDidSchemaChange.fire()}registerOverridePropertyPatternKey(){const o={type:"object",description:A.localize(4,null),errorMessage:A.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=o,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(o,g){const h=this.configurationDefaultsOverrides.get(o);let v=h?.value,m=h?.source;R.isUndefined(v)&&(v=g.defaultDefaultValue,m=void 0),R.isUndefined(v)&&(v=l(g.type)),g.default=v,g.defaultValueSource=m}}const u="\\[([^\\]]+)\\]",i=new RegExp(u,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${u})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function f(a){const o=[];if(e.OVERRIDE_PROPERTY_REGEX.test(a)){let g=i.exec(a);for(;g?.length;){const h=g[1].trim();h&&o.push(h),g=i.exec(a)}}return(0,t.distinct)(o)}e.overrideIdentifiersFromKey=f;function c(a){return a.reduce((o,g)=>`${o}[${g}]`,"")}e.keyFromOverrideIdentifiers=c;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 s=new r;I.Registry.add(e.Extensions.Configuration,s);function d(a,o){return a.trim()?e.OVERRIDE_PROPERTY_REGEX.test(a)?A.localize(7,null,a):s.getConfigurationProperties()[a]!==void 0?A.localize(8,null,a):o.policy?.name&&s.getPolicyConfigurations().get(o.policy?.name)!==void 0?A.localize(9,null,a,o.policy?.name,s.getPolicyConfigurations().get(o.policy?.name)):null:A.localize(6,null)}e.validateProperty=d;function n(){const a=[],o=s.getConfigurationProperties();for(const g of Object.keys(o))a.push([g,o[g].scope]);return a.push(["launch",4]),a.push(["task",4]),a}e.getScopes=n}),define(ae[331],le([1,0,134,484,1317,55,17]),function(J,e,t,p,R,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:R.localize(0,null),scope:5});const E={...e.editorConfigurationBaseNode,properties:{"editor.tabSize":{type:"number",default:p.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:R.localize(1,null,"`#editor.detectIndentation#`")},"editor.insertSpaces":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:R.localize(2,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:R.localize(3,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:R.localize(4,null)},"editor.largeFileOptimizations":{type:"boolean",default:p.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:R.localize(5,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:R.localize(6,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[R.localize(7,null),R.localize(8,null),R.localize(9,null)],description:R.localize(10,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[R.localize(11,null),R.localize(12,null),R.localize(13,null)],default:"configuredByTheme",description:R.localize(14,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:R.localize(15,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:R.localize(16,null)},"editor.language.brackets":{type:["array","null"],default:null,description:R.localize(17,null),items:{type:"array",items:[{type:"string",description:R.localize(18,null)},{type:"string",description:R.localize(19,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:R.localize(20,null),items:{type:"array",items:[{type:"string",description:R.localize(21,null)},{type:"string",description:R.localize(22,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:R.localize(23,null)},"diffEditor.maxFileSize":{type:"number",default:50,description:R.localize(24,null)},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:R.localize(25,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:!0,description:R.localize(26,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:R.localize(27,null)},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:R.localize(28,null)},"diffEditor.codeLens":{type:"boolean",default:!1,description:R.localize(29,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[R.localize(30,null),R.localize(31,null),R.localize(32,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["smart","experimental"],default:"smart",markdownEnumDescriptions:[R.localize(33,null),R.localize(34,null)]}}};function I(i){return typeof i.type<"u"||typeof i.anyOf<"u"}for(const i of t.editorOptionsRegistry){const f=i.schema;if(typeof f<"u")if(I(f))E.properties[`editor.${i.name}`]=f;else for(const c in f)Object.hasOwnProperty.call(f,c)&&(E.properties[c]=f[c])}let b=null;function S(){return b===null&&(b=Object.create(null),Object.keys(E.properties).forEach(i=>{b[i]=!0})),b}function C(i){return S()[`editor.${i}`]||!1}e.isEditorConfigurationKey=C;function r(i){return S()[`diffEditor.${i}`]||!1}e.isDiffEditorConfigurationKey=r,k.Registry.as(A.Extensions.Configuration).registerConfiguration(E)}),define(ae[125],le([1,0,1322,6,17,160,55]),function(J,e,t,p,R,A,k){"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 E{constructor(){this._onDidChangeLanguages=new p.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(b){return this._languages.push(b),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let S=0,C=this._languages.length;S<C;S++)if(this._languages[S]===b){this._languages.splice(S,1);return}}}}getLanguages(){return this._languages}}e.EditorModesRegistry=E,e.ModesRegistry=new E,R.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:[A.Mimes.text]}),R.Registry.as(k.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])}),define(ae[122],le([1,0,6,2,28,299,300,363,1204,1284,1205,1283,590,5,8,42,35,125,1282]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedLanguageConfiguration=e.LanguageConfigurationRegistry=e.LanguageConfigurationChangeEvent=e.getScopedLineTokens=e.getIndentationAtPosition=e.LanguageConfigurationService=e.ILanguageConfigurationService=e.LanguageConfigurationServiceChangeEvent=void 0;class d{constructor(O){this.languageId=O}affects(O){return this.languageId?this.languageId===O:!0}}e.LanguageConfigurationServiceChangeEvent=d,e.ILanguageConfigurationService=(0,u.createDecorator)("languageConfigurationService");let n=class extends p.Disposable{constructor(O,N){super(),this.configurationService=O,this.languageService=N,this._registry=this._register(new _),this.onDidChangeEmitter=this._register(new t.Emitter),this.onDidChange=this.onDidChangeEmitter.event,this.configurations=new Map;const P=new Set(Object.values(o));this._register(this.configurationService.onDidChangeConfiguration(B=>{const V=B.change.keys.some(x=>P.has(x)),z=B.change.overrides.filter(([x,H])=>H.some(W=>P.has(W))).map(([x])=>x);if(V)this.configurations.clear(),this.onDidChangeEmitter.fire(new d(void 0));else for(const x of z)this.languageService.isRegisteredLanguageId(x)&&(this.configurations.delete(x),this.onDidChangeEmitter.fire(new d(x)))})),this._register(this._registry.onDidChange(B=>{this.configurations.delete(B.languageId),this.onDidChangeEmitter.fire(new d(B.languageId))}))}register(O,N,P){return this._registry.register(O,N,P)}getLanguageConfiguration(O){let N=this.configurations.get(O);return N||(N=a(O,this._registry,this.configurationService,this.languageService),this.configurations.set(O,N)),N}};n=we([F(0,i.IConfigurationService),F(1,f.ILanguageService)],n),e.LanguageConfigurationService=n;function a(M,O,N,P){let B=O.getLanguageConfiguration(M);if(!B){if(!P.isRegisteredLanguageId(M))throw new Error(`Language id "${M}" is not configured nor known`);B=new L(M,{})}const V=g(B.languageId,N),z=D([B.underlyingConfig,V]);return new L(B.languageId,z)}const o={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function g(M,O){const N=O.getValue(o.brackets,{overrideIdentifier:M}),P=O.getValue(o.colorizedBracketPairs,{overrideIdentifier:M});return{brackets:h(N),colorizedBracketPairs:h(P)}}function h(M){if(!!Array.isArray(M))return M.map(O=>{if(!(!Array.isArray(O)||O.length!==2))return[O[0],O[1]]}).filter(O=>!!O)}function v(M,O,N){const P=M.getLineContent(O);let B=R.getLeadingWhitespace(P);return B.length>N-1&&(B=B.substring(0,N-1)),B}e.getIndentationAtPosition=v;function m(M,O,N){M.tokenization.forceTokenization(O);const P=M.tokenization.getLineTokens(O),B=typeof N>"u"?M.getLineMaxColumn(O)-1:N-1;return(0,E.createScopedLineTokens)(P,B)}e.getScopedLineTokens=m;class w{constructor(O){this.languageId=O,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(O,N){const P=new y(O,N,++this._order);return this._entries.push(P),this._resolved=null,(0,p.toDisposable)(()=>{for(let B=0;B<this._entries.length;B++)if(this._entries[B]===P){this._entries.splice(B,1),this._resolved=null;break}})}getResolvedConfiguration(){if(!this._resolved){const O=this._resolve();O&&(this._resolved=new L(this.languageId,O))}return this._resolved}_resolve(){return this._entries.length===0?null:(this._entries.sort(y.cmp),D(this._entries.map(O=>O.configuration)))}}function D(M){let O={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 N of M)O={comments:N.comments||O.comments,brackets:N.brackets||O.brackets,wordPattern:N.wordPattern||O.wordPattern,indentationRules:N.indentationRules||O.indentationRules,onEnterRules:N.onEnterRules||O.onEnterRules,autoClosingPairs:N.autoClosingPairs||O.autoClosingPairs,surroundingPairs:N.surroundingPairs||O.surroundingPairs,autoCloseBefore:N.autoCloseBefore||O.autoCloseBefore,folding:N.folding||O.folding,colorizedBracketPairs:N.colorizedBracketPairs||O.colorizedBracketPairs,__electricCharacterSupport:N.__electricCharacterSupport||O.__electricCharacterSupport};return O}class y{constructor(O,N,P){this.configuration=O,this.priority=N,this.order=P}static cmp(O,N){return O.priority===N.priority?O.order-N.order:O.priority-N.priority}}class T{constructor(O){this.languageId=O}}e.LanguageConfigurationChangeEvent=T;class _ extends p.Disposable{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.register(l.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(O,N,P=0){let B=this._entries.get(O);B||(B=new w(O),this._entries.set(O,B));const V=B.register(N,P);return this._onDidChange.fire(new T(O)),(0,p.toDisposable)(()=>{V.dispose(),this._onDidChange.fire(new T(O))})}getLanguageConfiguration(O){return this._entries.get(O)?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=_;class L{constructor(O,N){this.languageId=O,this.underlyingConfig=N,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=L._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 S.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new s.LanguageBracketsConfiguration(O,this.underlyingConfig)}getWordDefinition(){return(0,A.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new r.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new b.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(O,N,P,B){return this._onEnterSupport?this._onEnterSupport.onEnter(O,N,P,B):null}getAutoClosingPairs(){return new k.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(O){const N=O.comments;if(!N)return null;const P={};if(N.lineComment&&(P.lineCommentToken=N.lineComment),N.blockComment){const[B,V]=N.blockComment;P.blockCommentStartToken=B,P.blockCommentEndToken=V}return P}}e.ResolvedLanguageConfiguration=L,(0,c.registerSingleton)(e.ILanguageConfigurationService,n,1)}),define(ae[604],le([1,0,11,2,419,581,20,122,1295,54,114,28,16,25,146,21,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const l=60*1e3,s=5*60*1e3;function d(w,D){const y=w.getModel(D);return!(!y||y.isTooLargeForSyncing())}let n=class extends p.Disposable{constructor(D,y,T,_,L){super(),this._modelService=D,this._workerManager=this._register(new o(this._modelService,_)),this._logService=T,this._register(L.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(M,O)=>d(this._modelService,M.uri)?this._workerManager.withWorker().then(N=>N.computeLinks(M.uri)).then(N=>N&&{links:N}):Promise.resolve({links:[]})})),this._register(L.completionProvider.register("*",new a(this._workerManager,y,this._modelService,_)))}dispose(){super.dispose()}canComputeUnicodeHighlights(D){return d(this._modelService,D)}computedUnicodeHighlights(D,y,T){return this._workerManager.withWorker().then(_=>_.computedUnicodeHighlights(D,y,T))}computeDiff(D,y,T){return this._workerManager.withWorker().then(_=>_.computeDiff(D,y,T))}canComputeDirtyDiff(D,y){return d(this._modelService,D)&&d(this._modelService,y)}computeDirtyDiff(D,y,T){return this._workerManager.withWorker().then(_=>_.computeDirtyDiff(D,y,T))}computeMoreMinimalEdits(D,y){if((0,r.isNonEmptyArray)(y)){if(!d(this._modelService,D))return Promise.resolve(y);const T=i.StopWatch.create(!0),_=this._workerManager.withWorker().then(L=>L.computeMoreMinimalEdits(D,y));return _.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",D.toString(!0),T.elapsed())),Promise.race([_,(0,t.timeout)(1e3).then(()=>y)])}else return Promise.resolve(void 0)}canNavigateValueSet(D){return d(this._modelService,D)}navigateValueSet(D,y,T){return this._workerManager.withWorker().then(_=>_.navigateValueSet(D,y,T))}canComputeWordRanges(D){return d(this._modelService,D)}computeWordRanges(D,y){return this._workerManager.withWorker().then(T=>T.computeWordRanges(D,y))}};n=we([F(0,b.IModelService),F(1,S.ITextResourceConfigurationService),F(2,u.ILogService),F(3,E.ILanguageConfigurationService),F(4,c.ILanguageFeaturesService)],n),e.EditorWorkerService=n;class a{constructor(D,y,T,_){this.languageConfigurationService=_,this._debugDisplayName="wordbasedCompletions",this._workerManager=D,this._configurationService=y,this._modelService=T}async provideCompletionItems(D,y){const T=this._configurationService.getValue(D.uri,y,"editor");if(!T.wordBasedSuggestions)return;const _=[];if(T.wordBasedSuggestionsMode==="currentDocument")d(this._modelService,D.uri)&&_.push(D.uri);else for(const V of this._modelService.getModels())!d(this._modelService,V.uri)||(V===D?_.unshift(V.uri):(T.wordBasedSuggestionsMode==="allDocuments"||V.getLanguageId()===D.getLanguageId())&&_.push(V.uri));if(_.length===0)return;const L=this.languageConfigurationService.getLanguageConfiguration(D.getLanguageId()).getWordDefinition(),M=D.getWordAtPosition(y),O=M?new k.Range(y.lineNumber,M.startColumn,y.lineNumber,M.endColumn):k.Range.fromPositions(y),N=O.setEndPosition(y.lineNumber,y.column),B=await(await this._workerManager.withWorker()).textualSuggest(_,M?.word,L);if(!!B)return{duration:B.duration,suggestions:B.words.map(V=>({kind:18,label:V,insertText:V,range:{insert:N,replace:O}}))}}}class o extends p.Disposable{constructor(D,y){super(),this.languageConfigurationService=y,this._modelService=D,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new t.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(s/2)),this._register(this._modelService.onModelRemoved(_=>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>s&&(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 g extends p.Disposable{constructor(D,y,T){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=D,this._modelService=y,!T){const _=new t.IntervalTimer;_.cancelAndSet(()=>this._checkStopModelSync(),Math.round(l/2)),this._register(_)}}dispose(){for(const D in this._syncedModels)(0,p.dispose)(this._syncedModels[D]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(D,y){for(const T of D){const _=T.toString();this._syncedModels[_]||this._beginModelSync(T,y),this._syncedModels[_]&&(this._syncedModelsLastUsedTime[_]=new Date().getTime())}}_checkStopModelSync(){const D=new Date().getTime(),y=[];for(const T in this._syncedModelsLastUsedTime)D-this._syncedModelsLastUsedTime[T]>l&&y.push(T);for(const T of y)this._stopModelSync(T)}_beginModelSync(D,y){const T=this._modelService.getModel(D);if(!T||!y&&T.isTooLargeForSyncing())return;const _=D.toString();this._proxy.acceptNewModel({url:T.uri.toString(),lines:T.getLinesContent(),EOL:T.getEOL(),versionId:T.getVersionId()});const L=new p.DisposableStore;L.add(T.onDidChangeContent(M=>{this._proxy.acceptModelChanged(_.toString(),M)})),L.add(T.onWillDispose(()=>{this._stopModelSync(_)})),L.add((0,p.toDisposable)(()=>{this._proxy.acceptRemovedModel(_)})),this._syncedModels[_]=L}_stopModelSync(D){const y=this._syncedModels[D];delete this._syncedModels[D],delete this._syncedModelsLastUsedTime[D],(0,p.dispose)(y)}}class h{constructor(D){this._instance=D,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class v{constructor(D){this._workerClient=D}fhr(D,y){return this._workerClient.fhr(D,y)}}e.EditorWorkerHost=v;class m extends p.Disposable{constructor(D,y,T,_){super(),this.languageConfigurationService=_,this._disposed=!1,this._modelService=D,this._keepIdleModels=y,this._workerFactory=new A.DefaultWorkerFactory(T),this._worker=null,this._modelManager=null}fhr(D,y){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new R.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new v(this)))}catch(D){(0,R.logOnceWebWorkerWarning)(D),this._worker=new h(new I.EditorSimpleWorker(new v(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,D=>((0,R.logOnceWebWorkerWarning)(D),this._worker=new h(new I.EditorSimpleWorker(new v(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(D){return this._modelManager||(this._modelManager=this._register(new g(D,this._modelService,this._keepIdleModels))),this._modelManager}async _withSyncedResources(D,y=!1){return this._disposed?Promise.reject((0,f.canceled)()):this._getProxy().then(T=>(this._getOrCreateModelManager(T).ensureSyncedResources(D,y),T))}computedUnicodeHighlights(D,y,T){return this._withSyncedResources([D]).then(_=>_.computeUnicodeHighlights(D.toString(),y,T))}computeDiff(D,y,T){return this._withSyncedResources([D,y],!0).then(_=>_.computeDiff(D.toString(),y.toString(),T))}computeDirtyDiff(D,y,T){return this._withSyncedResources([D,y]).then(_=>_.computeDirtyDiff(D.toString(),y.toString(),T))}computeMoreMinimalEdits(D,y){return this._withSyncedResources([D]).then(T=>T.computeMoreMinimalEdits(D.toString(),y))}computeLinks(D){return this._withSyncedResources([D]).then(y=>y.computeLinks(D.toString()))}async textualSuggest(D,y,T){const _=await this._withSyncedResources(D),L=T.source,M=(0,C.regExpFlags)(T);return _.textualSuggest(D.map(O=>O.toString()),y,L,M)}computeWordRanges(D,y){return this._withSyncedResources([D]).then(T=>{const _=this._modelService.getModel(D);if(!_)return Promise.resolve(null);const L=this.languageConfigurationService.getLanguageConfiguration(_.getLanguageId()).getWordDefinition(),M=L.source,O=(0,C.regExpFlags)(L);return T.computeWordRanges(D.toString(),y,M,O)})}navigateValueSet(D,y,T){return this._withSyncedResources([D]).then(_=>{const L=this._modelService.getModel(D);if(!L)return null;const M=this.languageConfigurationService.getLanguageConfiguration(L.getLanguageId()).getWordDefinition(),O=M.source,N=(0,C.regExpFlags)(M);return _.navigateValueSet(D.toString(),y,T,O,N)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=m}),define(ae[801],le([1,0,52,604]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function R(k,E,I){return new A(k,E,I)}e.createWebWorker=R;class A extends p.EditorWorkerClient{constructor(E,I,b){super(E,b.keepIdleModels||!1,b.label,I),this._foreignModuleId=b.moduleId,this._foreignModuleCreateData=b.createData||null,this._foreignModuleHost=b.host||null,this._foreignProxy=null}fhr(E,I){if(!this._foreignModuleHost||typeof this._foreignModuleHost[E]!="function")return Promise.reject(new Error("Missing method "+E+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[E].apply(this._foreignModuleHost,I))}catch(b){return Promise.reject(b)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(E=>{const I=this._foreignModuleHost?(0,t.getAllMethodNames)(this._foreignModuleHost):[];return E.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,I).then(b=>{this._foreignModuleCreateData=null;const S=(u,i)=>E.fmr(u,i),C=(u,i)=>function(){const f=Array.prototype.slice.call(arguments,0);return i(u,f)},r={};for(const u of b)r[u]=C(u,S);return r})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(E){return this._withSyncedResources(E).then(I=>this.getProxy())}}}),define(ae[605],le([1,0,28,300,363,122]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndentMetadata=e.getIndentActionForType=e.getIndentForEnter=e.getGoodIndentForLine=e.getInheritIndentForLine=void 0;function k(r,u,i){const f=r.tokenization.getLanguageIdAtPosition(u,0);if(u>1){let c,l=-1;for(c=u-1;c>=1;c--){if(r.tokenization.getLanguageIdAtPosition(c,0)!==f)return l;const s=r.getLineContent(c);if(i.shouldIgnore(s)||/^\s+$/.test(s)||s===""){l=c;continue}return c}}return-1}function E(r,u,i,f=!0,c){if(r<4)return null;const l=c.getLanguageConfiguration(u.tokenization.getLanguageId()).indentRulesSupport;if(!l)return null;if(i<=1)return{indentation:"",action:null};const s=k(u,i,l);if(s<0)return null;if(s<1)return{indentation:"",action:null};const d=u.getLineContent(s);if(l.shouldIncrease(d)||l.shouldIndentNextLine(d))return{indentation:t.getLeadingWhitespace(d),action:p.IndentAction.Indent,line:s};if(l.shouldDecrease(d))return{indentation:t.getLeadingWhitespace(d),action:null,line:s};{if(s===1)return{indentation:t.getLeadingWhitespace(u.getLineContent(s)),action:null,line:s};const n=s-1,a=l.getIndentMetadata(u.getLineContent(n));if(!(a&3)&&a&4){let o=0;for(let g=n-1;g>0;g--)if(!l.shouldIndentNextLine(u.getLineContent(g))){o=g;break}return{indentation:t.getLeadingWhitespace(u.getLineContent(o+1)),action:null,line:o+1}}if(f)return{indentation:t.getLeadingWhitespace(u.getLineContent(s)),action:null,line:s};for(let o=s;o>0;o--){const g=u.getLineContent(o);if(l.shouldIncrease(g))return{indentation:t.getLeadingWhitespace(g),action:p.IndentAction.Indent,line:o};if(l.shouldIndentNextLine(g)){let h=0;for(let v=o-1;v>0;v--)if(!l.shouldIndentNextLine(u.getLineContent(o))){h=v;break}return{indentation:t.getLeadingWhitespace(u.getLineContent(h+1)),action:null,line:h+1}}else if(l.shouldDecrease(g))return{indentation:t.getLeadingWhitespace(g),action:null,line:o}}return{indentation:t.getLeadingWhitespace(u.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=E;function I(r,u,i,f,c,l){if(r<4)return null;const s=l.getLanguageConfiguration(i);if(!s)return null;const d=l.getLanguageConfiguration(i).indentRulesSupport;if(!d)return null;const n=E(r,u,f,void 0,l),a=u.getLineContent(f);if(n){const o=n.line;if(o!==void 0){const g=s.onEnter(r,"",u.getLineContent(o),"");if(g){let h=t.getLeadingWhitespace(u.getLineContent(o));return g.removeText&&(h=h.substring(0,h.length-g.removeText)),g.indentAction===p.IndentAction.Indent||g.indentAction===p.IndentAction.IndentOutdent?h=c.shiftIndent(h):g.indentAction===p.IndentAction.Outdent&&(h=c.unshiftIndent(h)),d.shouldDecrease(a)&&(h=c.unshiftIndent(h)),g.appendText&&(h+=g.appendText),t.getLeadingWhitespace(h)}}return d.shouldDecrease(a)?n.action===p.IndentAction.Indent?n.indentation:c.unshiftIndent(n.indentation):n.action===p.IndentAction.Indent?c.shiftIndent(n.indentation):n.indentation}return null}e.getGoodIndentForLine=I;function b(r,u,i,f,c){if(r<4)return null;u.tokenization.forceTokenization(i.startLineNumber);const l=u.tokenization.getLineTokens(i.startLineNumber),s=(0,R.createScopedLineTokens)(l,i.startColumn-1),d=s.getLineContent();let n=!1,a;s.firstCharOffset>0&&l.getLanguageId(0)!==s.languageId?(n=!0,a=d.substr(0,i.startColumn-1-s.firstCharOffset)):a=l.getLineContent().substring(0,i.startColumn-1);let o;i.isEmpty()?o=d.substr(i.startColumn-1-s.firstCharOffset):o=(0,A.getScopedLineTokens)(u,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset);const g=c.getLanguageConfiguration(s.languageId).indentRulesSupport;if(!g)return null;const h=a,v=t.getLeadingWhitespace(a),m={tokenization:{getLineTokens:T=>u.tokenization.getLineTokens(T),getLanguageId:()=>u.getLanguageId(),getLanguageIdAtPosition:(T,_)=>u.getLanguageIdAtPosition(T,_)},getLineContent:T=>T===i.startLineNumber?h:u.getLineContent(T)},w=t.getLeadingWhitespace(l.getLineContent()),D=E(r,m,i.startLineNumber+1,void 0,c);if(!D){const T=n?w:v;return{beforeEnter:T,afterEnter:T}}let y=n?w:D.indentation;return D.action===p.IndentAction.Indent&&(y=f.shiftIndent(y)),g.shouldDecrease(o)&&(y=f.unshiftIndent(y)),{beforeEnter:n?w:v,afterEnter:y}}e.getIndentForEnter=b;function S(r,u,i,f,c,l){if(r<4)return null;const s=(0,A.getScopedLineTokens)(u,i.startLineNumber,i.startColumn);if(s.firstCharOffset)return null;const d=l.getLanguageConfiguration(s.languageId).indentRulesSupport;if(!d)return null;const n=s.getLineContent(),a=n.substr(0,i.startColumn-1-s.firstCharOffset);let o;if(i.isEmpty()?o=n.substr(i.startColumn-1-s.firstCharOffset):o=(0,A.getScopedLineTokens)(u,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset),!d.shouldDecrease(a+o)&&d.shouldDecrease(a+f+o)){const g=E(r,u,i.startLineNumber,!1,l);if(!g)return null;let h=g.indentation;return g.action!==p.IndentAction.Indent&&(h=c.unshiftIndent(h)),h}return null}e.getIndentActionForType=S;function C(r,u,i){const f=i.getLanguageConfiguration(r.getLanguageId()).indentRulesSupport;return!f||u<1||u>r.getLineCount()?null:f.getIndentMetadata(r.getLineContent(u))}e.getIndentMetadata=C}),define(ae[606],le([1,0,300,122]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function R(A,k,E,I){const b=(0,p.getScopedLineTokens)(k,E.startLineNumber,E.startColumn),S=I.getLanguageConfiguration(b.languageId);if(!S)return null;const C=b.getLineContent(),r=C.substr(0,E.startColumn-1-b.firstCharOffset);let u;E.isEmpty()?u=C.substr(E.startColumn-1-b.firstCharOffset):u=(0,p.getScopedLineTokens)(k,E.endLineNumber,E.endColumn).getLineContent().substr(E.endColumn-1-b.firstCharOffset);let i="";if(E.startLineNumber>1&&b.firstCharOffset===0){const n=(0,p.getScopedLineTokens)(k,E.startLineNumber-1);n.languageId===b.languageId&&(i=n.getLineContent())}const f=S.onEnter(A,i,r,u);if(!f)return null;const c=f.indentAction;let l=f.appendText;const s=f.removeText||0;l?c===t.IndentAction.Indent&&(l=" "+l):c===t.IndentAction.Indent||c===t.IndentAction.IndentOutdent?l=" ":l="";let d=(0,p.getIndentationAtPosition)(k,E.startLineNumber,E.startColumn);return s&&(d=d.substring(0,d.length-s)),{indentAction:c,appendText:l,removeText:s,indentation:d}}e.getEnterAction=R}),define(ae[607],le([1,0,28,251,20,85,606,122]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=e.cachedStringRepeat=void 0;const I=Object.create(null);function b(C,r){if(r<=0)return"";I[C]||(I[C]=["",C]);const u=I[C];for(let i=u.length;i<=r;i++)u[i]=u[i-1]+C;return u[r]}e.cachedStringRepeat=b;let S=class cs{static unshiftIndent(r,u,i,f,c){const l=p.CursorColumns.visibleColumnFromColumn(r,u,i);if(c){const s=b(" ",f),n=p.CursorColumns.prevIndentTabStop(l,f)/f;return b(s,n)}else{const s=" ",n=p.CursorColumns.prevRenderTabStop(l,i)/i;return b(s,n)}}static shiftIndent(r,u,i,f,c){const l=p.CursorColumns.visibleColumnFromColumn(r,u,i);if(c){const s=b(" ",f),n=p.CursorColumns.nextIndentTabStop(l,f)/f;return b(s,n)}else{const s=" ",n=p.CursorColumns.nextRenderTabStop(l,i)/i;return b(s,n)}}constructor(r,u,i){this._languageConfigurationService=i,this._opts=u,this._selection=r,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(r,u,i){this._useLastEditRangeForCursorEndPosition?r.addTrackedEditOperation(u,i):r.addEditOperation(u,i)}getEditOperations(r,u){const i=this._selection.startLineNumber;let f=this._selection.endLineNumber;this._selection.endColumn===1&&i!==f&&(f=f-1);const{tabSize:c,indentSize:l,insertSpaces:s}=this._opts,d=i===f;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(r.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let n=0,a=0;for(let o=i;o<=f;o++,n=a){a=0;const g=r.getLineContent(o);let h=t.firstNonWhitespaceIndex(g);if(this._opts.isUnshift&&(g.length===0||h===0)||!d&&!this._opts.isUnshift&&g.length===0)continue;if(h===-1&&(h=g.length),o>1&&p.CursorColumns.visibleColumnFromColumn(g,h+1,c)%l!==0&&r.tokenization.isCheapToTokenize(o-1)){const w=(0,k.getEnterAction)(this._opts.autoIndent,r,new R.Range(o-1,r.getLineMaxColumn(o-1),o-1,r.getLineMaxColumn(o-1)),this._languageConfigurationService);if(w){if(a=n,w.appendText)for(let D=0,y=w.appendText.length;D<y&&a<l&&w.appendText.charCodeAt(D)===32;D++)a++;w.removeText&&(a=Math.max(0,a-w.removeText));for(let D=0;D<a&&!(h===0||g.charCodeAt(h-1)!==32);D++)h--}}if(this._opts.isUnshift&&h===0)continue;let v;this._opts.isUnshift?v=cs.unshiftIndent(g,h+1,c,l,s):v=cs.shiftIndent(g,h+1,c,l,s),this._addEditOperation(u,new R.Range(o,1,o,h+1),v),o===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=h+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&r.getLineLength(i)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const n=s?b(" ",l):" ";for(let a=i;a<=f;a++){const o=r.getLineContent(a);let g=t.firstNonWhitespaceIndex(o);if(!(this._opts.isUnshift&&(o.length===0||g===0))&&!(!d&&!this._opts.isUnshift&&o.length===0)&&(g===-1&&(g=o.length),!(this._opts.isUnshift&&g===0)))if(this._opts.isUnshift){g=Math.min(g,l);for(let h=0;h<g;h++)if(o.charCodeAt(h)===9){g=h+1;break}this._addEditOperation(u,new R.Range(a,1,a,g+1),"")}else this._addEditOperation(u,new R.Range(a,1,a,1),n),a===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=u.trackSelection(this._selection)}computeCursorState(r,u){if(this._useLastEditRangeForCursorEndPosition){const f=u.getInverseEditOperations()[0];return new A.Selection(f.range.endLineNumber,f.range.endColumn,f.range.endLineNumber,f.range.endColumn)}const i=u.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){const f=this._selection.startColumn;return i.startColumn<=f?i:i.getDirection()===0?new A.Selection(i.startLineNumber,f,i.endLineNumber,i.endColumn):new A.Selection(i.endLineNumber,i.endColumn,i.startLineNumber,f)}return i}};S=we([F(2,E.ILanguageConfigurationService)],S),e.ShiftCommand=S}),define(ae[608],le([1,0,21,28,361,607,1195,240,409,20,50,300,122,363,605,606]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositionOutcome=e.TypeWithAutoClosingCommand=e.TypeOperations=void 0;class c{static indent(h,v,m){if(v===null||m===null)return[];const w=[];for(let D=0,y=m.length;D<y;D++)w[D]=new A.ShiftCommand(m[D],{isUnshift:!1,tabSize:h.tabSize,indentSize:h.indentSize,insertSpaces:h.insertSpaces,useTabStops:h.useTabStops,autoIndent:h.autoIndent},h.languageConfigurationService);return w}static outdent(h,v,m){const w=[];for(let D=0,y=m.length;D<y;D++)w[D]=new A.ShiftCommand(m[D],{isUnshift:!0,tabSize:h.tabSize,indentSize:h.indentSize,insertSpaces:h.insertSpaces,useTabStops:h.useTabStops,autoIndent:h.autoIndent},h.languageConfigurationService);return w}static shiftIndent(h,v,m){return m=m||1,A.ShiftCommand.shiftIndent(v,v.length+m,h.tabSize,h.indentSize,h.insertSpaces)}static unshiftIndent(h,v,m){return m=m||1,A.ShiftCommand.unshiftIndent(v,v.length+m,h.tabSize,h.indentSize,h.insertSpaces)}static _distributedPaste(h,v,m,w){const D=[];for(let y=0,T=m.length;y<T;y++)D[y]=new R.ReplaceCommand(m[y],w[y]);return new E.EditOperationResult(0,D,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(h,v,m,w,D){const y=[];for(let T=0,_=m.length;T<_;T++){const L=m[T],M=L.getPosition();if(D&&!L.isEmpty()&&(D=!1),D&&w.indexOf(` `)!==w.length-1&&(D=!1),D){const O=new b.Range(M.lineNumber,1,M.lineNumber,1);y[T]=new R.ReplaceCommandThatPreservesSelection(O,w,L,!0)}else y[T]=new R.ReplaceCommand(L,w)}return new E.EditOperationResult(0,y,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(h,v,m,w,D){if(w||v.length===1)return null;if(D&&D.length===v.length)return D;if(h.multiCursorPaste==="spread"){m.charCodeAt(m.length-1)===10&&(m=m.substr(0,m.length-1)),m.charCodeAt(m.length-1)===13&&(m=m.substr(0,m.length-1));const y=p.splitLines(m);if(y.length===v.length)return y}return null}static paste(h,v,m,w,D,y){const T=this._distributePasteToCursors(h,m,w,D,y);return T?(m=m.sort(b.Range.compareRangesUsingStarts),this._distributedPaste(h,v,m,T)):this._simplePaste(h,v,m,w,D)}static _goodIndentForLine(h,v,m){let w=null,D="";const y=(0,i.getInheritIndentForLine)(h.autoIndent,v,m,!1,h.languageConfigurationService);if(y)w=y.action,D=y.indentation;else if(m>1){let T;for(T=m-1;T>=1;T--){const M=v.getLineContent(T);if(p.lastNonWhitespaceIndex(M)>=0)break}if(T<1)return null;const _=v.getLineMaxColumn(T),L=(0,f.getEnterAction)(h.autoIndent,v,new b.Range(T,_,T,_),h.languageConfigurationService);L&&(D=L.indentation+L.appendText)}return w&&(w===C.IndentAction.Indent&&(D=c.shiftIndent(h,D)),w===C.IndentAction.Outdent&&(D=c.unshiftIndent(h,D)),D=h.normalizeIndentation(D)),D||null}static _replaceJumpToNextIndent(h,v,m,w){let D="";const y=m.getStartPosition();if(h.insertSpaces){const T=h.visibleColumnFromColumn(v,y),_=h.indentSize,L=_-T%_;for(let M=0;M<L;M++)D+=" "}else D=" ";return new R.ReplaceCommand(m,D,w)}static tab(h,v,m){const w=[];for(let D=0,y=m.length;D<y;D++){const T=m[D];if(T.isEmpty()){const _=v.getLineContent(T.startLineNumber);if(/^\s*$/.test(_)&&v.tokenization.isCheapToTokenize(T.startLineNumber)){let L=this._goodIndentForLine(h,v,T.startLineNumber);L=L||" ";const M=h.normalizeIndentation(L);if(!_.startsWith(M)){w[D]=new R.ReplaceCommand(new b.Range(T.startLineNumber,1,T.startLineNumber,_.length+1),M,!0);continue}}w[D]=this._replaceJumpToNextIndent(h,v,T,!0)}else{if(T.startLineNumber===T.endLineNumber){const _=v.getLineMaxColumn(T.startLineNumber);if(T.startColumn!==1||T.endColumn!==_){w[D]=this._replaceJumpToNextIndent(h,v,T,!1);continue}}w[D]=new A.ShiftCommand(T,{isUnshift:!1,tabSize:h.tabSize,indentSize:h.indentSize,insertSpaces:h.insertSpaces,useTabStops:h.useTabStops,autoIndent:h.autoIndent},h.languageConfigurationService)}}return w}static compositionType(h,v,m,w,D,y,T,_){const L=w.map(M=>this._compositionType(m,M,D,y,T,_));return new E.EditOperationResult(4,L,{shouldPushStackElementBefore:n(h,4),shouldPushStackElementAfter:!1})}static _compositionType(h,v,m,w,D,y){if(!v.isEmpty())return null;const T=v.getPosition(),_=Math.max(1,T.column-w),L=Math.min(h.getLineMaxColumn(T.lineNumber),T.column+D),M=new b.Range(T.lineNumber,_,T.lineNumber,L);return h.getValueInRange(M)===m&&y===0?null:new R.ReplaceCommandWithOffsetCursorState(M,m,0,y)}static _typeCommand(h,v,m){return m?new R.ReplaceCommandWithoutChangingPosition(h,v,!0):new R.ReplaceCommand(h,v,!0)}static _enter(h,v,m,w){if(h.autoIndent===0)return c._typeCommand(w,` `,m);if(!v.tokenization.isCheapToTokenize(w.getStartPosition().lineNumber)||h.autoIndent===1){const _=v.getLineContent(w.startLineNumber),L=p.getLeadingWhitespace(_).substring(0,w.startColumn-1);return c._typeCommand(w,` `+h.normalizeIndentation(L),m)}const D=(0,f.getEnterAction)(h.autoIndent,v,w,h.languageConfigurationService);if(D){if(D.indentAction===C.IndentAction.None)return c._typeCommand(w,` `+h.normalizeIndentation(D.indentation+D.appendText),m);if(D.indentAction===C.IndentAction.Indent)return c._typeCommand(w,` `+h.normalizeIndentation(D.indentation+D.appendText),m);if(D.indentAction===C.IndentAction.IndentOutdent){const _=h.normalizeIndentation(D.indentation),L=h.normalizeIndentation(D.indentation+D.appendText),M=` `+L+` `+_;return m?new R.ReplaceCommandWithoutChangingPosition(w,M,!0):new R.ReplaceCommandWithOffsetCursorState(w,M,-1,L.length-_.length,!0)}else if(D.indentAction===C.IndentAction.Outdent){const _=c.unshiftIndent(h,D.indentation);return c._typeCommand(w,` `+h.normalizeIndentation(_+D.appendText),m)}}const y=v.getLineContent(w.startLineNumber),T=p.getLeadingWhitespace(y).substring(0,w.startColumn-1);if(h.autoIndent>=4){const _=(0,i.getIndentForEnter)(h.autoIndent,v,w,{unshiftIndent:L=>c.unshiftIndent(h,L),shiftIndent:L=>c.shiftIndent(h,L),normalizeIndentation:L=>h.normalizeIndentation(L)},h.languageConfigurationService);if(_){let L=h.visibleColumnFromColumn(v,w.getEndPosition());const M=w.endColumn,O=v.getLineContent(w.endLineNumber),N=p.firstNonWhitespaceIndex(O);if(N>=0?w=w.setEndPosition(w.endLineNumber,Math.max(w.endColumn,N+1)):w=w.setEndPosition(w.endLineNumber,v.getLineMaxColumn(w.endLineNumber)),m)return new R.ReplaceCommandWithoutChangingPosition(w,` `+h.normalizeIndentation(_.afterEnter),!0);{let P=0;return M<=N+1&&(h.insertSpaces||(L=Math.ceil(L/h.indentSize)),P=Math.min(L+1-h.normalizeIndentation(_.afterEnter).length-1,0)),new R.ReplaceCommandWithOffsetCursorState(w,` `+h.normalizeIndentation(_.afterEnter),0,P,!0)}}}return c._typeCommand(w,` `+h.normalizeIndentation(T),m)}static _isAutoIndentType(h,v,m){if(h.autoIndent<4)return!1;for(let w=0,D=m.length;w<D;w++)if(!v.tokenization.isCheapToTokenize(m[w].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(h,v,m,w){const D=(0,r.getIndentationAtPosition)(v,m.startLineNumber,m.startColumn),y=(0,i.getIndentActionForType)(h.autoIndent,v,m,w,{shiftIndent:T=>c.shiftIndent(h,T),unshiftIndent:T=>c.unshiftIndent(h,T)},h.languageConfigurationService);if(y===null)return null;if(y!==h.normalizeIndentation(D)){const T=v.getLineFirstNonWhitespaceColumn(m.startLineNumber);return T===0?c._typeCommand(new b.Range(m.startLineNumber,1,m.endLineNumber,m.endColumn),h.normalizeIndentation(y)+w,!1):c._typeCommand(new b.Range(m.startLineNumber,1,m.endLineNumber,m.endColumn),h.normalizeIndentation(y)+v.getLineContent(m.startLineNumber).substring(T-1,m.startColumn-1)+w,!1)}return null}static _isAutoClosingOvertype(h,v,m,w,D){if(h.autoClosingOvertype==="never"||!h.autoClosingPairs.autoClosingPairsCloseSingleChar.has(D))return!1;for(let y=0,T=m.length;y<T;y++){const _=m[y];if(!_.isEmpty())return!1;const L=_.getPosition(),M=v.getLineContent(L.lineNumber);if(M.charAt(L.column-1)!==D)return!1;const N=(0,E.isQuote)(D);if((L.column>2?M.charCodeAt(L.column-2):0)===92&&N)return!1;if(h.autoClosingOvertype==="auto"){let B=!1;for(let V=0,z=w.length;V<z;V++){const x=w[V];if(L.lineNumber===x.startLineNumber&&L.column===x.startColumn){B=!0;break}}if(!B)return!1}}return!0}static _runAutoClosingOvertype(h,v,m,w,D){const y=[];for(let T=0,_=w.length;T<_;T++){const M=w[T].getPosition(),O=new b.Range(M.lineNumber,M.column,M.lineNumber,M.column+1);y[T]=new R.ReplaceCommand(O,D)}return new E.EditOperationResult(4,y,{shouldPushStackElementBefore:n(h,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(h,v){const m=v.charAt(0),w=h.autoClosingPairs.autoClosingPairsOpenByStart.get(m)||[],D=h.autoClosingPairs.autoClosingPairsCloseByStart.get(m)||[],y=w.some(_=>v.startsWith(_.open)),T=D.some(_=>v.startsWith(_.close));return!y&&T}static _findAutoClosingPairOpen(h,v,m,w){const D=h.autoClosingPairs.autoClosingPairsOpenByEnd.get(w);if(!D)return null;let y=null;for(const T of D)if(y===null||T.open.length>y.open.length){let _=!0;for(const L of m)if(v.getValueInRange(new b.Range(L.lineNumber,L.column-T.open.length+1,L.lineNumber,L.column))+w!==T.open){_=!1;break}_&&(y=T)}return y}static _findContainedAutoClosingPair(h,v){if(v.open.length<=1)return null;const m=v.close.charAt(v.close.length-1),w=h.autoClosingPairs.autoClosingPairsCloseByEnd.get(m)||[];let D=null;for(const y of w)y.open!==v.open&&v.open.includes(y.open)&&v.close.endsWith(y.close)&&(!D||y.open.length>D.open.length)&&(D=y);return D}static _getAutoClosingPairClose(h,v,m,w,D){const y=(0,E.isQuote)(w),T=y?h.autoClosingQuotes:h.autoClosingBrackets,_=y?h.shouldAutoCloseBefore.quote:h.shouldAutoCloseBefore.bracket;if(T==="never")return null;for(const B of m)if(!B.isEmpty())return null;const L=m.map(B=>{const V=B.getPosition();return D?{lineNumber:V.lineNumber,beforeColumn:V.column-w.length,afterColumn:V.column}:{lineNumber:V.lineNumber,beforeColumn:V.column,afterColumn:V.column}}),M=this._findAutoClosingPairOpen(h,v,L.map(B=>new S.Position(B.lineNumber,B.beforeColumn)),w);if(!M)return null;const O=this._findContainedAutoClosingPair(h,M),N=O?O.close:"";let P=!0;for(const B of L){const{lineNumber:V,beforeColumn:z,afterColumn:x}=B,H=v.getLineContent(V),W=H.substring(0,z-1),U=H.substring(x-1);if(U.startsWith(N)||(P=!1),U.length>0){const G=U.charAt(0);if(!c._isBeforeClosingBrace(h,U)&&!_(G))return null}if(M.open.length===1&&(w==="'"||w==='"')&&T!=="always"){const G=(0,I.getMapForWordSeparators)(h.wordSeparators);if(W.length>0){const Q=W.charCodeAt(W.length-1);if(G.get(Q)===0)return null}}if(!v.tokenization.isCheapToTokenize(V))return null;v.tokenization.forceTokenization(V);const $=v.tokenization.getLineTokens(V),q=(0,u.createScopedLineTokens)($,z-1);if(!M.shouldAutoClose(q,z-q.firstCharOffset))return null;const X=M.findNeutralCharacter();if(X){const G=v.tokenization.getTokenTypeIfInsertingCharacter(V,z,X);if(!M.isOK(G))return null}}return P?M.close.substring(0,M.close.length-N.length):M.close}static _runAutoClosingOpenCharType(h,v,m,w,D,y,T){const _=[];for(let L=0,M=w.length;L<M;L++){const O=w[L];_[L]=new l(O,D,!y,T)}return new E.EditOperationResult(4,_,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(h,v){return(0,E.isQuote)(v)?h.autoSurround==="quotes"||h.autoSurround==="languageDefined":h.autoSurround==="brackets"||h.autoSurround==="languageDefined"}static _isSurroundSelectionType(h,v,m,w){if(!c._shouldSurroundChar(h,w)||!h.surroundingPairs.hasOwnProperty(w))return!1;const D=(0,E.isQuote)(w);for(const y of m){if(y.isEmpty())return!1;let T=!0;for(let _=y.startLineNumber;_<=y.endLineNumber;_++){const L=v.getLineContent(_),M=_===y.startLineNumber?y.startColumn-1:0,O=_===y.endLineNumber?y.endColumn-1:L.length,N=L.substring(M,O);if(/[^ \t]/.test(N)){T=!1;break}}if(T)return!1;if(D&&y.startLineNumber===y.endLineNumber&&y.startColumn+1===y.endColumn){const _=v.getValueInRange(y);if((0,E.isQuote)(_))return!1}}return!0}static _runSurroundSelectionType(h,v,m,w,D){const y=[];for(let T=0,_=w.length;T<_;T++){const L=w[T],M=v.surroundingPairs[D];y[T]=new k.SurroundSelectionCommand(L,D,M)}return new E.EditOperationResult(0,y,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(h,v,m){return!!(m.length===1&&v.tokenization.isCheapToTokenize(m[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(h,v,m,w,D){if(!v.electricChars.hasOwnProperty(D)||!w.isEmpty())return null;const y=w.getPosition();m.tokenization.forceTokenization(y.lineNumber);const T=m.tokenization.getLineTokens(y.lineNumber);let _;try{_=v.onElectricCharacter(D,T,y.column)}catch(L){return(0,t.onUnexpectedError)(L),null}if(!_)return null;if(_.matchOpenBracket){const L=(T.getLineContent()+D).lastIndexOf(_.matchOpenBracket)+1,M=m.bracketPairs.findMatchingBracketUp(_.matchOpenBracket,{lineNumber:y.lineNumber,column:L},500);if(M){if(M.startLineNumber===y.lineNumber)return null;const O=m.getLineContent(M.startLineNumber),N=p.getLeadingWhitespace(O),P=v.normalizeIndentation(N),B=m.getLineContent(y.lineNumber),V=m.getLineFirstNonWhitespaceColumn(y.lineNumber)||y.column,z=B.substring(V-1,y.column-1),x=P+z+D,H=new b.Range(y.lineNumber,1,y.lineNumber,y.column),W=new R.ReplaceCommand(H,x);return new E.EditOperationResult(d(x,h),[W],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(h,v,m,w,D,y){if(!w)return null;let T=null;for(const O of w)if(T===null)T=O.insertedText;else if(T!==O.insertedText)return null;if(!T||T.length!==1)return null;const _=T;let L=!1;for(const O of w)if(O.deletedText.length!==0){L=!0;break}if(L){if(!c._shouldSurroundChar(v,_)||!v.surroundingPairs.hasOwnProperty(_))return null;const O=(0,E.isQuote)(_);for(const B of w)if(B.deletedSelectionStart!==0||B.deletedSelectionEnd!==B.deletedText.length||/^[ \t]+$/.test(B.deletedText)||O&&(0,E.isQuote)(B.deletedText))return null;const N=[];for(const B of D){if(!B.isEmpty())return null;N.push(B.getPosition())}if(N.length!==w.length)return null;const P=[];for(let B=0,V=N.length;B<V;B++)P.push(new k.CompositionSurroundSelectionCommand(N[B],w[B].deletedText,v.surroundingPairs[_]));return new E.EditOperationResult(4,P,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(v,m,D,y,_)){const O=D.map(N=>new R.ReplaceCommand(new b.Range(N.positionLineNumber,N.positionColumn,N.positionLineNumber,N.positionColumn+1),"",!1));return new E.EditOperationResult(4,O,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const M=this._getAutoClosingPairClose(v,m,D,_,!0);return M!==null?this._runAutoClosingOpenCharType(h,v,m,D,_,!0,M):null}static typeWithInterceptors(h,v,m,w,D,y,T){if(!h&&T===` `){const M=[];for(let O=0,N=D.length;O<N;O++)M[O]=c._enter(m,w,!1,D[O]);return new E.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!h&&this._isAutoIndentType(m,w,D)){const M=[];let O=!1;for(let N=0,P=D.length;N<P;N++)if(M[N]=this._runAutoIndentType(m,w,D[N],T),!M[N]){O=!0;break}if(!O)return new E.EditOperationResult(4,M,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(this._isAutoClosingOvertype(m,w,D,y,T))return this._runAutoClosingOvertype(v,m,w,D,T);if(!h){const M=this._getAutoClosingPairClose(m,w,D,T,!1);if(M)return this._runAutoClosingOpenCharType(v,m,w,D,T,!1,M)}if(!h&&this._isSurroundSelectionType(m,w,D,T))return this._runSurroundSelectionType(v,m,w,D,T);if(!h&&this._isTypeInterceptorElectricChar(m,w,D)){const M=this._typeInterceptorElectricChar(v,m,w,D[0],T);if(M)return M}const _=[];for(let M=0,O=D.length;M<O;M++)_[M]=new R.ReplaceCommand(D[M],T);const L=d(T,v);return new E.EditOperationResult(L,_,{shouldPushStackElementBefore:n(v,L),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(h,v,m,w,D){const y=[];for(let _=0,L=w.length;_<L;_++)y[_]=new R.ReplaceCommand(w[_],D);const T=d(D,h);return new E.EditOperationResult(T,y,{shouldPushStackElementBefore:n(h,T),shouldPushStackElementAfter:!1})}static lineInsertBefore(h,v,m){if(v===null||m===null)return[];const w=[];for(let D=0,y=m.length;D<y;D++){let T=m[D].positionLineNumber;if(T===1)w[D]=new R.ReplaceCommandWithoutChangingPosition(new b.Range(1,1,1,1),` `);else{T--;const _=v.getLineMaxColumn(T);w[D]=this._enter(h,v,!1,new b.Range(T,_,T,_))}}return w}static lineInsertAfter(h,v,m){if(v===null||m===null)return[];const w=[];for(let D=0,y=m.length;D<y;D++){const T=m[D].positionLineNumber,_=v.getLineMaxColumn(T);w[D]=this._enter(h,v,!1,new b.Range(T,_,T,_))}return w}static lineBreakInsert(h,v,m){const w=[];for(let D=0,y=m.length;D<y;D++)w[D]=this._enter(h,v,!0,m[D]);return w}}e.TypeOperations=c;class l extends R.ReplaceCommandWithOffsetCursorState{constructor(h,v,m,w){super(h,(m?v:"")+w,0,-w.length),this._openCharacter=v,this._closeCharacter=w,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(h,v){const w=v.getInverseEditOperations()[0].range;return this.closeCharacterRange=new b.Range(w.startLineNumber,w.endColumn-this._closeCharacter.length,w.endLineNumber,w.endColumn),this.enclosingRange=new b.Range(w.startLineNumber,w.endColumn-this._openCharacter.length-this._closeCharacter.length,w.endLineNumber,w.endColumn),super.computeCursorState(h,v)}}e.TypeWithAutoClosingCommand=l;class s{constructor(h,v,m,w,D,y){this.deletedText=h,this.deletedSelectionStart=v,this.deletedSelectionEnd=m,this.insertedText=w,this.insertedSelectionStart=D,this.insertedSelectionEnd=y}}e.CompositionOutcome=s;function d(g,h){return g===" "?h===5||h===6?6:5:4}function n(g,h){return o(g)&&!o(h)?!0:g===5?!1:a(g)!==a(h)}function a(g){return g===6||g===5?"space":g}function o(g){return g===4||g===5||g===6}}),define(ae[802],le([1,0,21,28,1279,240,1196,588,608,20,85,326,570,2,594]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorsController=void 0;class f extends u.Disposable{constructor(o,g,h,v){super(),this._model=o,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=g,this._coordinatesConverter=h,this.context=new k.CursorContext(this._model,this._viewModel,this._coordinatesConverter,v),this._cursors=new R.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,u.dispose)(this._autoClosedActions),super.dispose()}updateConfiguration(o){this.context=new k.CursorContext(this._model,this._viewModel,this._coordinatesConverter,o),this._cursors.updateContext(this.context)}onLineMappingChanged(o){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(o,"viewModel",0,this.getCursorStates())}setHasFocus(o){this._hasFocus=o}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){const o=this._cursors.getSelections();for(let g=0;g<this._autoClosedActions.length;g++){const h=this._autoClosedActions[g];h.isValid(o)||(h.dispose(),this._autoClosedActions.splice(g,1),g--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(o,g,h,v){let m=!1;v!==null&&v.length>f.MAX_CURSOR_COUNT&&(v=v.slice(0,f.MAX_CURSOR_COUNT),m=!0);const w=c.from(this._model,this);return this._cursors.setStates(v),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,g,h,w,m)}setCursorColumnSelectData(o){this._columnSelectData=o}revealPrimary(o,g,h,v,m,w){const D=this._cursors.getViewPositions();let y=null,T=null;D.length>1?T=this._cursors.getViewSelections():y=b.Range.fromPositions(D[0],D[0]),o.emitViewEvent(new r.ViewRevealRangeRequestEvent(g,h,y,T,v,m,w))}saveState(){const o=[],g=this._cursors.getSelections();for(let h=0,v=g.length;h<v;h++){const m=g[h];o.push({inSelectionMode:!m.isEmpty(),selectionStart:{lineNumber:m.selectionStartLineNumber,column:m.selectionStartColumn},position:{lineNumber:m.positionLineNumber,column:m.positionColumn}})}return o}restoreState(o,g){const h=[];for(let v=0,m=g.length;v<m;v++){const w=g[v];let D=1,y=1;w.position&&w.position.lineNumber&&(D=w.position.lineNumber),w.position&&w.position.column&&(y=w.position.column);let T=D,_=y;w.selectionStart&&w.selectionStart.lineNumber&&(T=w.selectionStart.lineNumber),w.selectionStart&&w.selectionStart.column&&(_=w.selectionStart.column),h.push({selectionStartLineNumber:T,selectionStartColumn:_,positionLineNumber:D,positionColumn:y})}this.setStates(o,"restoreState",0,A.CursorState.fromModelSelections(h)),this.revealPrimary(o,"restoreState",!1,0,!0,1)}onModelContentChanged(o,g){if(g instanceof C.ModelInjectedTextChangedEvent){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(o,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{const h=g.rawContentChangedEvent;if(this._knownModelVersionId=h.versionId,this._isHandling)return;const v=h.containsEvent(1);if(this._prevEditOperationType=0,v)this._cursors.dispose(),this._cursors=new R.CursorCollection(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(o,"model",1,null,!1);else if(this._hasFocus&&h.resultingSelection&&h.resultingSelection.length>0){const m=A.CursorState.fromModelSelections(h.resultingSelection);this.setStates(o,"modelChange",h.isUndoing?5:h.isRedoing?6:2,m)&&this.revealPrimary(o,"modelChange",!1,0,!0,0)}else{const m=this._cursors.readSelectionFromMarkers();this.setStates(o,"modelChange",2,A.CursorState.fromModelSelections(m))}}}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 o=this._cursors.getPrimaryCursor(),g=o.viewState.selectionStart.getStartPosition(),h=o.viewState.position;return{isReal:!1,fromViewLineNumber:g.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,g),toViewLineNumber:h.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,h)}}getSelections(){return this._cursors.getSelections()}getPosition(){return this._cursors.getPrimaryCursor().modelState.position}setSelections(o,g,h,v){this.setStates(o,g,v,A.CursorState.fromModelSelections(h))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(o){this._prevEditOperationType=o}_pushAutoClosedAction(o,g){const h=[],v=[];for(let D=0,y=o.length;D<y;D++)h.push({range:o[D],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),v.push({range:g[D],options:{description:"auto-closed-enclosing",stickiness:1}});const m=this._model.deltaDecorations([],h),w=this._model.deltaDecorations([],v);this._autoClosedActions.push(new l(this._model,m,w))}_executeEditOperation(o){if(!o)return;o.shouldPushStackElementBefore&&this._model.pushStackElement();const g=s.executeCommands(this._model,this._cursors.getSelections(),o.commands);if(g){this._interpretCommandResult(g);const h=[],v=[];for(let m=0;m<o.commands.length;m++){const w=o.commands[m];w instanceof I.TypeWithAutoClosingCommand&&w.enclosingRange&&w.closeCharacterRange&&(h.push(w.closeCharacterRange),v.push(w.enclosingRange))}h.length>0&&this._pushAutoClosedAction(h,v),this._prevEditOperationType=o.type}o.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(o){(!o||o.length===0)&&(o=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(o),this._cursors.normalize()}_emitStateChangedIfNecessary(o,g,h,v,m){const w=c.from(this._model,this);if(w.equals(v))return!1;const D=this._cursors.getSelections(),y=this._cursors.getViewSelections();if(o.emitViewEvent(new r.ViewCursorStateChangedEvent(y,D)),!v||v.cursorState.length!==w.cursorState.length||w.cursorState.some((T,_)=>!T.modelState.equals(v.cursorState[_].modelState))){const T=v?v.cursorState.map(L=>L.modelState.selection):null,_=v?v.modelVersionId:0;o.emitOutgoingEvent(new i.CursorStateChangedEvent(T,D,_,w.modelVersionId,g||"keyboard",h,m))}return!0}_findAutoClosingPairs(o){if(!o.length)return null;const g=[];for(let h=0,v=o.length;h<v;h++){const m=o[h];if(!m.text||m.text.indexOf(` `)>=0)return null;const w=m.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!w)return null;const D=w[1],y=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(D);if(!y||y.length!==1)return null;const T=y[0].open,_=m.text.length-w[2].length-1,L=m.text.lastIndexOf(T,_-1);if(L===-1)return null;g.push([L,_])}return g}executeEdits(o,g,h,v){let m=null;g==="snippet"&&(m=this._findAutoClosingPairs(h)),m&&(h[0]._isTracked=!0);const w=[],D=[],y=this._model.pushEditOperations(this.getSelections(),h,T=>{if(m)for(let L=0,M=m.length;L<M;L++){const[O,N]=m[L],P=T[L],B=P.range.startLineNumber,V=P.range.startColumn-1+O,z=P.range.startColumn-1+N;w.push(new b.Range(B,z+1,B,z+2)),D.push(new b.Range(B,V+1,B,z+2))}const _=v(T);return _&&(this._isHandling=!0),_});y&&(this._isHandling=!1,this.setSelections(o,g,y,0)),w.length>0&&this._pushAutoClosedAction(w,D)}_executeEdit(o,g,h,v=0){if(this.context.cursorConfig.readOnly)return;const m=c.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),o()}catch(w){(0,t.onUnexpectedError)(w)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(g,h,v,m,!1)&&this.revealPrimary(g,h,!1,0,!0,0)}getAutoClosedCharacters(){return l.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(o){this._compositionState=new n(this._model,this.getSelections())}endComposition(o,g){const h=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{g==="keyboard"&&this._executeEditOperation(I.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,h,this.getSelections(),this.getAutoClosedCharacters()))},o,g)}type(o,g,h){this._executeEdit(()=>{if(h==="keyboard"){const v=g.length;let m=0;for(;m<v;){const w=p.nextCharLength(g,m),D=g.substr(m,w);this._executeEditOperation(I.TypeOperations.typeWithInterceptors(!!this._compositionState,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),D)),m+=w}}else this._executeEditOperation(I.TypeOperations.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g))},o,h)}compositionType(o,g,h,v,m,w){if(g.length===0&&h===0&&v===0){if(m!==0){const D=this.getSelections().map(y=>{const T=y.getPosition();return new S.Selection(T.lineNumber,T.column+m,T.lineNumber,T.column+m)});this.setSelections(o,w,D,0)}return}this._executeEdit(()=>{this._executeEditOperation(I.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g,h,v,m))},o,w)}paste(o,g,h,v,m){this._executeEdit(()=>{this._executeEditOperation(I.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),g,h,v||[]))},o,m,4)}cut(o,g){this._executeEdit(()=>{this._executeEditOperation(E.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},o,g)}executeCommand(o,g,h){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new A.EditOperationResult(0,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,h)}executeCommands(o,g,h){this._executeEdit(()=>{this._executeEditOperation(new A.EditOperationResult(0,g,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},o,h)}}e.CursorsController=f,f.MAX_CURSOR_COUNT=1e4;class c{static from(o,g){return new c(o.getVersionId(),g.getCursorStates())}constructor(o,g){this.modelVersionId=o,this.cursorState=g}equals(o){if(!o||this.modelVersionId!==o.modelVersionId||this.cursorState.length!==o.cursorState.length)return!1;for(let g=0,h=this.cursorState.length;g<h;g++)if(!this.cursorState[g].equals(o.cursorState[g]))return!1;return!0}}class l{static getAllAutoClosedCharacters(o){let g=[];for(const h of o)g=g.concat(h.getAutoClosedCharactersRanges());return g}constructor(o,g,h){this._model=o,this._autoClosedCharactersDecorations=g,this._autoClosedEnclosingDecorations=h}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){const o=[];for(let g=0;g<this._autoClosedCharactersDecorations.length;g++){const h=this._model.getDecorationRange(this._autoClosedCharactersDecorations[g]);h&&o.push(h)}return o}isValid(o){const g=[];for(let h=0;h<this._autoClosedEnclosingDecorations.length;h++){const v=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[h]);if(v&&(g.push(v),v.startLineNumber!==v.endLineNumber))return!1}g.sort(b.Range.compareRangesUsingStarts),o.sort(b.Range.compareRangesUsingStarts);for(let h=0;h<o.length;h++)if(h>=g.length||!g[h].strictContainsRange(o[h]))return!1;return!0}}class s{static executeCommands(o,g,h){const v={model:o,selectionsBefore:g,trackedRanges:[],trackedRangesDirection:[]},m=this._innerExecuteCommands(v,h);for(let w=0,D=v.trackedRanges.length;w<D;w++)v.model._setTrackedRange(v.trackedRanges[w],null,0);return m}static _innerExecuteCommands(o,g){if(this._arrayIsEmpty(g))return null;const h=this._getEditOperations(o,g);if(h.operations.length===0)return null;const v=h.operations,m=this._getLoserCursorMap(v);if(m.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;const w=[];for(let T=0,_=v.length;T<_;T++)m.hasOwnProperty(v[T].identifier.major.toString())||w.push(v[T]);h.hadTrackedEditOperation&&w.length>0&&(w[0]._isTracked=!0);let D=o.model.pushEditOperations(o.selectionsBefore,w,T=>{const _=[];for(let O=0;O<o.selectionsBefore.length;O++)_[O]=[];for(const O of T)!O.identifier||_[O.identifier.major].push(O);const L=(O,N)=>O.identifier.minor-N.identifier.minor,M=[];for(let O=0;O<o.selectionsBefore.length;O++)_[O].length>0?(_[O].sort(L),M[O]=g[O].computeCursorState(o.model,{getInverseEditOperations:()=>_[O],getTrackedSelection:N=>{const P=parseInt(N,10),B=o.model._getTrackedRange(o.trackedRanges[P]);return o.trackedRangesDirection[P]===0?new S.Selection(B.startLineNumber,B.startColumn,B.endLineNumber,B.endColumn):new S.Selection(B.endLineNumber,B.endColumn,B.startLineNumber,B.startColumn)}})):M[O]=o.selectionsBefore[O];return M});D||(D=o.selectionsBefore);const y=[];for(const T in m)m.hasOwnProperty(T)&&y.push(parseInt(T,10));y.sort((T,_)=>_-T);for(const T of y)D.splice(T,1);return D}static _arrayIsEmpty(o){for(let g=0,h=o.length;g<h;g++)if(o[g])return!1;return!0}static _getEditOperations(o,g){let h=[],v=!1;for(let m=0,w=g.length;m<w;m++){const D=g[m];if(D){const y=this._getEditOperationsFromCommand(o,m,D);h=h.concat(y.operations),v=v||y.hadTrackedEditOperation}}return{operations:h,hadTrackedEditOperation:v}}static _getEditOperationsFromCommand(o,g,h){const v=[];let m=0;const w=(L,M,O=!1)=>{b.Range.isEmpty(L)&&M===""||v.push({identifier:{major:g,minor:m++},range:L,text:M,forceMoveMarkers:O,isAutoWhitespaceEdit:h.insertsAutoWhitespace})};let D=!1;const _={addEditOperation:w,addTrackedEditOperation:(L,M,O)=>{D=!0,w(L,M,O)},trackSelection:(L,M)=>{const O=S.Selection.liftSelection(L);let N;if(O.isEmpty())if(typeof M=="boolean")M?N=2:N=3;else{const V=o.model.getLineMaxColumn(O.startLineNumber);O.startColumn===V?N=2:N=3}else N=1;const P=o.trackedRanges.length,B=o.model._setTrackedRange(null,O,N);return o.trackedRanges[P]=B,o.trackedRangesDirection[P]=O.getDirection(),P.toString()}};try{h.getEditOperations(o.model,_)}catch(L){return(0,t.onUnexpectedError)(L),{operations:[],hadTrackedEditOperation:!1}}return{operations:v,hadTrackedEditOperation:D}}static _getLoserCursorMap(o){o=o.slice(0),o.sort((h,v)=>-b.Range.compareRangesUsingEnds(h.range,v.range));const g={};for(let h=1;h<o.length;h++){const v=o[h-1],m=o[h];if(b.Range.getStartPosition(v.range).isBefore(b.Range.getEndPosition(m.range))){let w;v.identifier.major>m.identifier.major?w=v.identifier.major:w=m.identifier.major,g[w.toString()]=!0;for(let D=0;D<o.length;D++)o[D].identifier.major===w&&(o.splice(D,1),D<h&&h--,D--);h>0&&h--}}return g}}class d{constructor(o,g,h){this.text=o,this.startSelection=g,this.endSelection=h}}class n{static _capture(o,g){const h=[];for(const v of g){if(v.startLineNumber!==v.endLineNumber)return null;h.push(new d(o.getLineContent(v.startLineNumber),v.startColumn-1,v.endColumn-1))}return h}constructor(o,g){this._original=n._capture(o,g)}deduceOutcome(o,g){if(!this._original)return null;const h=n._capture(o,g);if(!h||this._original.length!==h.length)return null;const v=[];for(let m=0,w=this._original.length;m<w;m++)v.push(n._deduceOutcome(this._original[m],h[m]));return v}static _deduceOutcome(o,g){const h=Math.min(o.startSelection,g.startSelection,p.commonPrefixLength(o.text,g.text)),v=Math.min(o.text.length-o.endSelection,g.text.length-g.endSelection,p.commonSuffixLength(o.text,g.text)),m=o.text.substring(h,o.text.length-v),w=g.text.substring(h,g.text.length-v);return new I.CompositionOutcome(m,o.startSelection-h,o.endSelection-h,w,g.startSelection-h,g.endSelection-h)}}}),define(ae[199],le([1,0,22,18,125,19]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cssEscape=e.getIconClassesForLanguageId=e.getIconClasses=void 0;const k=/(?:\/|^)(?:([^\/]+)\/)?([^\/]+)$/;function E(C,r,u,i){const f=i===A.FileKind.ROOT_FOLDER?["rootfolder-icon"]:i===A.FileKind.FOLDER?["folder-icon"]:["file-icon"];if(u){let c;if(u.scheme===t.Schemas.data)c=p.DataUri.parseMetaData(u).get(p.DataUri.META_DATA_LABEL);else{const l=u.path.match(k);l?(c=S(l[2].toLowerCase()),l[1]&&f.push(`${S(l[1].toLowerCase())}-name-dir-icon`)):c=S(u.authority.toLowerCase())}if(i===A.FileKind.FOLDER)f.push(`${c}-name-folder-icon`);else{if(c){if(f.push(`${c}-name-file-icon`),f.push("name-file-icon"),c.length<=255){const s=c.split(".");for(let d=1;d<s.length;d++)f.push(`${s.slice(d).join(".")}-ext-file-icon`)}f.push("ext-file-icon")}const l=b(C,r,u);l&&f.push(`${S(l)}-lang-file-icon`)}}return f}e.getIconClasses=E;function I(C){return["file-icon",`${S(C)}-lang-file-icon`]}e.getIconClassesForLanguageId=I;function b(C,r,u){if(!u)return null;let i=null;if(u.scheme===t.Schemas.data){const c=p.DataUri.parseMetaData(u).get(p.DataUri.META_DATA_MIME);c&&(i=r.getLanguageIdByMimeType(c))}else{const f=C.getModel(u);f&&(i=f.getLanguageId())}return i&&i!==R.PLAINTEXT_LANGUAGE_ID?i:r.guessLanguageIdByFilepathOrFirstLine(u)}function S(C){return C.replace(/[\11\12\14\15\40]/g,"/")}e.cssEscape=S}),define(ae[376],le([1,0,144,160,22,53,18,28,125]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageIds=e.getMimeTypes=e.clearConfiguredLanguageAssociations=e.clearPlatformLanguageAssociations=e.registerConfiguredLanguageAssociation=e.registerPlatformLanguageAssociation=void 0;let b=[],S=[],C=[];function r(g,h=!1){i(g,!1,h)}e.registerPlatformLanguageAssociation=r;function u(g){i(g,!0,!1)}e.registerConfiguredLanguageAssociation=u;function i(g,h,v){const m=f(g,h);b.push(m),m.userConfigured?C.push(m):S.push(m),v&&!m.userConfigured&&b.forEach(w=>{w.mime===m.mime||w.userConfigured||(m.extension&&w.extension===m.extension&&console.warn(`Overwriting extension <<${m.extension}>> to now point to mime <<${m.mime}>>`),m.filename&&w.filename===m.filename&&console.warn(`Overwriting filename <<${m.filename}>> to now point to mime <<${m.mime}>>`),m.filepattern&&w.filepattern===m.filepattern&&console.warn(`Overwriting filepattern <<${m.filepattern}>> to now point to mime <<${m.mime}>>`),m.firstline&&w.firstline===m.firstline&&console.warn(`Overwriting firstline <<${m.firstline}>> to now point to mime <<${m.mime}>>`))})}function f(g,h){return{id:g.id,mime:g.mime,filename:g.filename,extension:g.extension,filepattern:g.filepattern,firstline:g.firstline,userConfigured:h,filenameLowercase:g.filename?g.filename.toLowerCase():void 0,extensionLowercase:g.extension?g.extension.toLowerCase():void 0,filepatternLowercase:g.filepattern?(0,t.parse)(g.filepattern.toLowerCase()):void 0,filepatternOnPath:g.filepattern?g.filepattern.indexOf(A.posix.sep)>=0:!1}}function c(){b=b.filter(g=>g.userConfigured),S=[]}e.clearPlatformLanguageAssociations=c;function l(){b=b.filter(g=>!g.userConfigured),C=[]}e.clearConfiguredLanguageAssociations=l;function s(g,h){return n(g,h).map(v=>v.mime)}e.getMimeTypes=s;function d(g,h){return n(g,h).map(v=>v.id)}e.getLanguageIds=d;function n(g,h){let v;if(g)switch(g.scheme){case R.Schemas.file:v=g.fsPath;break;case R.Schemas.data:{v=k.DataUri.parseMetaData(g).get(k.DataUri.META_DATA_LABEL);break}case R.Schemas.vscodeNotebookCell:v=void 0;break;default:v=g.path}if(!v)return[{id:"unknown",mime:p.Mimes.unknown}];v=v.toLowerCase();const m=(0,A.basename)(v),w=a(v,m,C);if(w)return[w,{id:I.PLAINTEXT_LANGUAGE_ID,mime:p.Mimes.text}];const D=a(v,m,S);if(D)return[D,{id:I.PLAINTEXT_LANGUAGE_ID,mime:p.Mimes.text}];if(h){const y=o(h);if(y)return[y,{id:I.PLAINTEXT_LANGUAGE_ID,mime:p.Mimes.text}]}return[{id:"unknown",mime:p.Mimes.unknown}]}function a(g,h,v){let m,w,D;for(let y=v.length-1;y>=0;y--){const T=v[y];if(h===T.filenameLowercase){m=T;break}if(T.filepattern&&(!w||T.filepattern.length>w.filepattern.length)){const _=T.filepatternOnPath?g:h;T.filepatternLowercase?.(_)&&(w=T)}T.extension&&(!D||T.extension.length>D.extension.length)&&h.endsWith(T.extensionLowercase)&&(D=T)}if(m)return m;if(w)return w;if(D)return D}function o(g){if((0,E.startsWithUTF8BOM)(g)&&(g=g.substr(1)),g.length>0)for(let h=b.length-1;h>=0;h--){const v=b[h];if(!v.firstline)continue;const m=g.match(v.firstline);if(m&&m.length>0)return v}}}),define(ae[2114],le([1,0,6,2,28,376,125,55,17]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const b=Object.prototype.hasOwnProperty,S="vs.editor.nullLanguage";class C{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(S,0),this._register(k.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(i,f){this._languageIdToLanguage[f]=i,this._languageToLanguageId.set(i,f)}register(i){if(this._languageToLanguageId.has(i))return;const f=this._nextLanguageId++;this._register(i,f)}encodeLanguageId(i){return this._languageToLanguageId.get(i)||0}decodeLanguageId(i){return this._languageIdToLanguage[i]||S}}e.LanguageIdCodec=C;class r extends p.Disposable{constructor(i=!0,f=!1){super(),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,r.instanceCount++,this._warnOnOverwrite=f,this.languageIdCodec=new C,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},i&&(this._initializeFromRegistry(),this._register(k.ModesRegistry.onDidChangeLanguages(c=>{this._initializeFromRegistry()})))}dispose(){r.instanceCount--,super.dispose()}setDynamicLanguages(i){this._dynamicLanguages=i,this._initializeFromRegistry()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,A.clearPlatformLanguageAssociations)();const i=[].concat(k.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(i)}registerLanguage(i){return k.ModesRegistry.registerLanguage(i)}_registerLanguages(i){for(const f of i)this._registerLanguage(f);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(f=>{const c=this._languages[f];c.name&&(this._nameMap[c.name]=c.identifier),c.aliases.forEach(l=>{this._lowercaseNameMap[l.toLowerCase()]=c.identifier}),c.mimetypes.forEach(l=>{this._mimeTypesMap[l]=c.identifier})}),I.Registry.as(E.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(i){const f=i.id;let c;b.call(this._languages,f)?c=this._languages[f]:(this.languageIdCodec.register(f),c={identifier:f,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[f]=c),this._mergeLanguage(c,i)}_mergeLanguage(i,f){const c=f.id;let l=null;if(Array.isArray(f.mimetypes)&&f.mimetypes.length>0&&(i.mimetypes.push(...f.mimetypes),l=f.mimetypes[0]),l||(l=`text/x-${c}`,i.mimetypes.push(l)),Array.isArray(f.extensions)){f.configuration?i.extensions=f.extensions.concat(i.extensions):i.extensions=i.extensions.concat(f.extensions);for(const n of f.extensions)(0,A.registerPlatformLanguageAssociation)({id:c,mime:l,extension:n},this._warnOnOverwrite)}if(Array.isArray(f.filenames))for(const n of f.filenames)(0,A.registerPlatformLanguageAssociation)({id:c,mime:l,filename:n},this._warnOnOverwrite),i.filenames.push(n);if(Array.isArray(f.filenamePatterns))for(const n of f.filenamePatterns)(0,A.registerPlatformLanguageAssociation)({id:c,mime:l,filepattern:n},this._warnOnOverwrite);if(typeof f.firstLine=="string"&&f.firstLine.length>0){let n=f.firstLine;n.charAt(0)!=="^"&&(n="^"+n);try{const a=new RegExp(n);(0,R.regExpLeadsToEndlessLoop)(a)||(0,A.registerPlatformLanguageAssociation)({id:c,mime:l,firstline:a},this._warnOnOverwrite)}catch(a){console.warn(`[${f.id}]: Invalid regular expression \`${n}\`: `,a)}}i.aliases.push(c);let s=null;if(typeof f.aliases<"u"&&Array.isArray(f.aliases)&&(f.aliases.length===0?s=[null]:s=f.aliases),s!==null)for(const n of s)!n||n.length===0||i.aliases.push(n);const d=s!==null&&s.length>0;if(!(d&&s[0]===null)){const n=(d?s[0]:null)||c;(d||!i.name)&&(i.name=n)}f.configuration&&i.configurationFiles.push(f.configuration),f.icon&&i.icons.push(f.icon)}isRegisteredLanguageId(i){return i?b.call(this._languages,i):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getSortedRegisteredLanguageNames(){const i=[];for(const f in this._nameMap)b.call(this._nameMap,f)&&i.push({languageName:f,languageId:this._nameMap[f]});return i.sort((f,c)=>(0,R.compareIgnoreCase)(f.languageName,c.languageName)),i}getLanguageName(i){return b.call(this._languages,i)?this._languages[i].name:null}getMimeType(i){return b.call(this._languages,i)&&this._languages[i].mimetypes[0]||null}getExtensions(i){return b.call(this._languages,i)?this._languages[i].extensions:[]}getFilenames(i){return b.call(this._languages,i)?this._languages[i].filenames:[]}getIcon(i){return b.call(this._languages,i)&&this._languages[i].icons[0]||null}getConfigurationFiles(i){return b.call(this._languages,i)?this._languages[i].configurationFiles||[]:[]}getLanguageIdByLanguageName(i){const f=i.toLowerCase();return b.call(this._lowercaseNameMap,f)?this._lowercaseNameMap[f]:null}getLanguageIdByMimeType(i){return i&&b.call(this._mimeTypesMap,i)?this._mimeTypesMap[i]:null}guessLanguageIdByFilepathOrFirstLine(i,f){return!i&&!f?[]:(0,A.getLanguageIds)(i,f)}}e.LanguagesRegistry=r,r.instanceCount=0}),define(ae[2115],le([1,0,6,2,2114,16,92,125]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class I extends p.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 R.LanguagesRegistry(!0,C)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){I.instanceCount--,super.dispose()}registerLanguage(C){return this._registry.registerLanguage(C)}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,r){const u=this._registry.guessLanguageIdByFilepathOrFirstLine(C,r);return(0,A.firstOrDefault)(u,null)}createById(C){return new b(this.onDidChange,()=>this._createAndGetLanguageIdentifier(C))}createByMimeType(C){return new b(this.onDidChange,()=>{const r=this.getLanguageIdByMimeType(C);return this._createAndGetLanguageIdentifier(r)})}createByFilepathOrFirstLine(C,r){return new b(this.onDidChange,()=>{const u=this.guessLanguageIdByFilepathOrFirstLine(C,r);return this._createAndGetLanguageIdentifier(u)})}_createAndGetLanguageIdentifier(C){return(!C||!this.isRegisteredLanguageId(C))&&(C=E.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 b{constructor(C,r){this._onDidChangeLanguages=C,this._selector=r,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?.fire(this.languageId))}}}),define(ae[2116],le([1,0,28,607,20,85,300,122,740,605,606]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let C=class{constructor(u,i,f,c){this._languageConfigurationService=c,this._selection=u,this._isMovingDown=i,this._autoIndent=f,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(u,i){const f=u.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===f){this._selectionId=i.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=i.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let c=this._selection;c.startLineNumber<c.endLineNumber&&c.endColumn===1&&(this._moveEndPositionDown=!0,c=c.setEndPosition(c.endLineNumber-1,u.getLineMaxColumn(c.endLineNumber-1)));const{tabSize:l,indentSize:s,insertSpaces:d}=u.getOptions(),n=this.buildIndentConverter(l,s,d),a={tokenization:{getLineTokens:o=>u.tokenization.getLineTokens(o),getLanguageId:()=>u.getLanguageId(),getLanguageIdAtPosition:(o,g)=>u.getLanguageIdAtPosition(o,g)},getLineContent:null};if(c.startLineNumber===c.endLineNumber&&u.getLineMaxColumn(c.startLineNumber)===1){const o=c.startLineNumber,g=this._isMovingDown?o+1:o-1;u.getLineMaxColumn(g)===1?i.addEditOperation(new R.Range(1,1,1,1),null):(i.addEditOperation(new R.Range(o,1,o,1),u.getLineContent(g)),i.addEditOperation(new R.Range(g,1,g,u.getLineMaxColumn(g)),null)),c=new A.Selection(g,1,g,1)}else{let o,g;if(this._isMovingDown){o=c.endLineNumber+1,g=u.getLineContent(o),i.addEditOperation(new R.Range(o-1,u.getLineMaxColumn(o-1),o,u.getLineMaxColumn(o)),null);let h=g;if(this.shouldAutoIndent(u,c)){const v=this.matchEnterRule(u,n,l,o,c.startLineNumber-1);if(v!==null){const w=t.getLeadingWhitespace(u.getLineContent(o)),D=v+I.getSpaceCnt(w,l);h=I.generateIndent(D,l,d)+this.trimLeft(g)}else{a.getLineContent=D=>D===c.startLineNumber?u.getLineContent(o):u.getLineContent(D);const w=(0,b.getGoodIndentForLine)(this._autoIndent,a,u.getLanguageIdAtPosition(o,1),c.startLineNumber,n,this._languageConfigurationService);if(w!==null){const D=t.getLeadingWhitespace(u.getLineContent(o)),y=I.getSpaceCnt(w,l),T=I.getSpaceCnt(D,l);y!==T&&(h=I.generateIndent(y,l,d)+this.trimLeft(g))}}i.addEditOperation(new R.Range(c.startLineNumber,1,c.startLineNumber,1),h+` `);const m=this.matchEnterRuleMovingDown(u,n,l,c.startLineNumber,o,h);if(m!==null)m!==0&&this.getIndentEditsOfMovingBlock(u,i,c,l,d,m);else{a.getLineContent=D=>D===c.startLineNumber?h:D>=c.startLineNumber+1&&D<=c.endLineNumber+1?u.getLineContent(D-1):u.getLineContent(D);const w=(0,b.getGoodIndentForLine)(this._autoIndent,a,u.getLanguageIdAtPosition(o,1),c.startLineNumber+1,n,this._languageConfigurationService);if(w!==null){const D=t.getLeadingWhitespace(u.getLineContent(c.startLineNumber)),y=I.getSpaceCnt(w,l),T=I.getSpaceCnt(D,l);if(y!==T){const _=y-T;this.getIndentEditsOfMovingBlock(u,i,c,l,d,_)}}}}else i.addEditOperation(new R.Range(c.startLineNumber,1,c.startLineNumber,1),h+` `)}else if(o=c.startLineNumber-1,g=u.getLineContent(o),i.addEditOperation(new R.Range(o,1,o+1,1),null),i.addEditOperation(new R.Range(c.endLineNumber,u.getLineMaxColumn(c.endLineNumber),c.endLineNumber,u.getLineMaxColumn(c.endLineNumber)),` `+g),this.shouldAutoIndent(u,c)){a.getLineContent=v=>v===o?u.getLineContent(c.startLineNumber):u.getLineContent(v);const h=this.matchEnterRule(u,n,l,c.startLineNumber,c.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(u,i,c,l,d,h);else{const v=(0,b.getGoodIndentForLine)(this._autoIndent,a,u.getLanguageIdAtPosition(c.startLineNumber,1),o,n,this._languageConfigurationService);if(v!==null){const m=t.getLeadingWhitespace(u.getLineContent(c.startLineNumber)),w=I.getSpaceCnt(v,l),D=I.getSpaceCnt(m,l);if(w!==D){const y=w-D;this.getIndentEditsOfMovingBlock(u,i,c,l,d,y)}}}}}this._selectionId=i.trackSelection(c)}buildIndentConverter(u,i,f){return{shiftIndent:c=>p.ShiftCommand.shiftIndent(c,c.length+1,u,i,f),unshiftIndent:c=>p.ShiftCommand.unshiftIndent(c,c.length+1,u,i,f)}}parseEnterResult(u,i,f,c,l){if(l){let s=l.indentation;l.indentAction===k.IndentAction.None||l.indentAction===k.IndentAction.Indent?s=l.indentation+l.appendText:l.indentAction===k.IndentAction.IndentOutdent?s=l.indentation:l.indentAction===k.IndentAction.Outdent&&(s=i.unshiftIndent(l.indentation)+l.appendText);const d=u.getLineContent(c);if(this.trimLeft(d).indexOf(this.trimLeft(s))>=0){const n=t.getLeadingWhitespace(u.getLineContent(c));let a=t.getLeadingWhitespace(s);const o=(0,b.getIndentMetadata)(u,c,this._languageConfigurationService);o!==null&&o&2&&(a=i.unshiftIndent(a));const g=I.getSpaceCnt(a,f),h=I.getSpaceCnt(n,f);return g-h}}return null}matchEnterRuleMovingDown(u,i,f,c,l,s){if(t.lastNonWhitespaceIndex(s)>=0){const d=u.getLineMaxColumn(l),n=(0,S.getEnterAction)(this._autoIndent,u,new R.Range(l,d,l,d),this._languageConfigurationService);return this.parseEnterResult(u,i,f,c,n)}else{let d=c-1;for(;d>=1;){const o=u.getLineContent(d);if(t.lastNonWhitespaceIndex(o)>=0)break;d--}if(d<1||c>u.getLineCount())return null;const n=u.getLineMaxColumn(d),a=(0,S.getEnterAction)(this._autoIndent,u,new R.Range(d,n,d,n),this._languageConfigurationService);return this.parseEnterResult(u,i,f,c,a)}}matchEnterRule(u,i,f,c,l,s){let d=l;for(;d>=1;){let o;if(d===l&&s!==void 0?o=s:o=u.getLineContent(d),t.lastNonWhitespaceIndex(o)>=0)break;d--}if(d<1||c>u.getLineCount())return null;const n=u.getLineMaxColumn(d),a=(0,S.getEnterAction)(this._autoIndent,u,new R.Range(d,n,d,n),this._languageConfigurationService);return this.parseEnterResult(u,i,f,c,a)}trimLeft(u){return u.replace(/^\s+/,"")}shouldAutoIndent(u,i){if(this._autoIndent<4||!u.tokenization.isCheapToTokenize(i.startLineNumber))return!1;const f=u.getLanguageIdAtPosition(i.startLineNumber,1),c=u.getLanguageIdAtPosition(i.endLineNumber,1);return!(f!==c||this._languageConfigurationService.getLanguageConfiguration(f).indentRulesSupport===null)}getIndentEditsOfMovingBlock(u,i,f,c,l,s){for(let d=f.startLineNumber;d<=f.endLineNumber;d++){const n=u.getLineContent(d),a=t.getLeadingWhitespace(n),g=I.getSpaceCnt(a,c)+s,h=I.generateIndent(g,c,l);h!==a&&(i.addEditOperation(new R.Range(d,1,d,a.length+1),h),d===f.endLineNumber&&f.endColumn<=a.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(u,i){let f=i.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(f=f.setEndPosition(f.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&f.startLineNumber<f.endLineNumber&&(f=f.setEndPosition(f.endLineNumber,2)),f}};C=we([F(3,E.ILanguageConfigurationService)],C),e.MoveLinesCommand=C}),define(ae[184],le([1,0,238,21,6,2,22,9,235,42,125,329,41]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openLinkFromMarkdown=e.MarkdownRenderer=void 0;let u=class Go{constructor(c,l,s){this._options=c,this._languageService=l,this._openerService=s,this._onDidRenderAsync=new R.Emitter,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(c,l,s){if(!c)return{element:document.createElement("span"),dispose:()=>{}};const d=new A.DisposableStore;return{element:d.add((0,t.renderMarkdown)(c,{...this._getRenderOptions(c,d),...l},s)).element,dispose:()=>d.dispose()}}_getRenderOptions(c,l){return{codeBlockRenderer:async(s,d)=>{let n;s?n=this._languageService.getLanguageIdByLanguageName(s):this._options.editor&&(n=this._options.editor.getModel()?.getLanguageId()),n||(n=S.PLAINTEXT_LANGUAGE_ID);const a=await(0,C.tokenizeToString)(this._languageService,d,n),o=document.createElement("span");if(o.innerHTML=Go._ttpTokenizer?.createHTML(a)??a,this._options.editor){const g=this._options.editor.getOption(45);(0,I.applyFontInfo)(o,g)}else this._options.codeBlockFontFamily&&(o.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(o.style.fontSize=this._options.codeBlockFontSize),o},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:s=>i(this._openerService,s,c.isTrusted),disposables:l}}}};u._ttpTokenizer=window.trustedTypes?.createPolicy("tokenizeToString",{createHTML(f){return f}}),u=we([F(1,b.ILanguageService),F(2,r.IOpenerService)],u),e.MarkdownRenderer=u;async function i(f,c,l){let s=!1;if(l)try{const d=E.URI.parse(c);if(d.scheme===k.Schemas.command)if(typeof l=="boolean"){if(!l)return!1;s=!0}else{if(!l.enabledCommands.includes(d.path))return!1;s=!0}}catch{}try{return await f.open(c,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:s})}catch(d){return(0,p.onUnexpectedError)(d),!1}}e.openLinkFromMarkdown=i}),define(ae[2117],le([1,0,10,16,113,2,184,780,41,577]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const S=t.$;class C extends A.Disposable{constructor(i,f,c=I.NullOpenerService){super(),this._renderDisposeables=this._register(new A.DisposableStore),this._editor=i,this._isVisible=!1,this._messages=[],this._hover=this._register(new b.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new k.MarkdownRenderer({editor:this._editor},f,c)),this._computer=new r(this._editor),this._hoverOperation=this._register(new E.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(45)&&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(f=>this._editor.applyFontInfo(f))}_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,f){this._renderDisposeables.clear();const c=document.createDocumentFragment();for(const l of f){const s=S("div.hover-row.markdown-hover"),d=t.append(s,S("div.hover-contents")),n=this._renderDisposeables.add(this._markdownRenderer.render(l.value));d.appendChild(n.element),c.appendChild(s)}this._updateContents(c),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 f=this._editor.getLayoutInfo(),c=this._editor.getTopForLineNumber(i),l=this._editor.getScrollTop(),s=this._editor.getOption(60),d=this._hover.containerDomNode.clientHeight,n=c-l-(d-s)/2;this._hover.containerDomNode.style.left=`${f.glyphMarginLeft+f.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(n),0)}px`}}e.MarginHoverWidget=C,C.ID="editor.contrib.modesGlyphHoverWidget";class r{get lineNumber(){return this._lineNumber}set lineNumber(i){this._lineNumber=i}constructor(i){this._editor=i,this._lineNumber=-1}computeSync(){const i=l=>({value:l}),f=this._editor.getLineDecorations(this._lineNumber),c=[];if(!f)return c;for(const l of f){if(!l.options.glyphMarginClassName)continue;const s=l.options.glyphMarginHoverMessage;!s||(0,R.isEmptyMarkdownString)(s)||c.push(...(0,p.asArray)(s).map(i))}return c}}}),define(ae[803],le([1,0,10,147,29,6,113,2,184,750,1391,5]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function r(f){return!!f&&Boolean(f.completion.documentation||f.completion.detail&&f.completion.detail!==f.completion.label)}e.canExpandCompletionItem=r;let u=class{constructor(c,l){this._editor=c,this._onDidClose=new A.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new A.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new E.DisposableStore,this._renderDisposeable=new E.DisposableStore,this._borderWidth=1,this._size=new t.Dimension(330,0),this.domNode=t.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=l.createInstance(I.MarkdownRenderer,{editor:c}),this._body=t.$(".body"),this._scrollbar=new p.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),t.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=t.append(this._body,t.$(".header")),this._close=t.append(this._header,t.$("span"+R.Codicon.close.cssSelector)),this._close.title=S.localize(0,null),this._type=t.append(this._header,t.$("p.type")),this._docs=t.append(this._body,t.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(45)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const c=this._editor.getOptions(),l=c.get(45),s=l.getMassagedFontFamily(),d=c.get(109)||l.fontSize,n=c.get(110)||l.lineHeight,a=l.fontWeight,o=`${d}px`,g=`${n}px`;this.domNode.style.fontSize=o,this.domNode.style.lineHeight=`${n/d}`,this.domNode.style.fontWeight=a,this.domNode.style.fontFeatureSettings=l.fontFeatureSettings,this._type.style.fontFamily=s,this._close.style.height=g,this._close.style.width=g}getLayoutInfo(){const c=this._editor.getOption(110)||this._editor.getOption(45).lineHeight,l=this._borderWidth,s=l*2;return{lineHeight:c,borderWidth:l,borderHeight:s,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=S.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(c,l){this._renderDisposeable.clear();let{detail:s,documentation:d}=c.completion;if(l){let n="";n+=`score: ${c.score[0]} `,n+=`prefix: ${c.word??"(no prefix)"} `,n+=`word: ${c.completion.filterText?c.completion.filterText+" (filterText)":c.textLabel} `,n+=`distance: ${c.distance} (localityBonus-setting) `,n+=`index: ${c.idx}, based on ${c.completion.sortText&&`sortText: "${c.completion.sortText}"`||"label"} `,n+=`commit_chars: ${c.completion.commitCharacters?.join("")} `,d=new k.MarkdownString().appendCodeblock("empty",n),s=`Provider: ${c.provider._debugDisplayName}`}if(!l&&!r(c)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const n=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=n,this._type.title=n,t.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(n))}else t.clearNode(this._type),this._type.title="",t.hide(this._type),this.domNode.classList.add("no-type");if(t.clearNode(this._docs),typeof d=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=d;else if(d){this._docs.classList.add("markdown-docs"),t.clearNode(this._docs);const n=this._markdownRenderer.render(d);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(c,l){const s=new t.Dimension(c,l);t.Dimension.equals(s,this._size)||(this._size=s,t.size(this.domNode,c,l)),this._scrollbar.scanDomNode()}scrollDown(c=8){this._body.scrollTop+=c}scrollUp(c=8){this._body.scrollTop-=c}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(c){this._borderWidth=c}get borderWidth(){return this._borderWidth}};u=we([F(1,C.IInstantiationService)],u),e.SuggestDetailsWidget=u;class i{constructor(c,l){this.widget=c,this._editor=l,this._disposables=new E.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new b.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(c.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let s,d,n=0,a=0;this._disposables.add(this._resizable.onDidWillResize(()=>{s=this._topLeft,d=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(o=>{if(s&&d){this.widget.layout(o.dimension.width,o.dimension.height);let g=!1;o.west&&(a=d.width-o.dimension.width,g=!0),o.north&&(n=d.height-o.dimension.height,g=!0),g&&this._applyTopLeft({top:s.top+n,left:s.left+a})}o.done&&(s=void 0,d=void 0,n=0,a=0,this._userSize=o.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(c=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),c&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(c,l){const s=c.getBoundingClientRect();this._anchorBox=s,this._preferAlignAtTop=l,this._placeAtAnchor(this._anchorBox,this._userSize??this.widget.size,l)}_placeAtAnchor(c,l,s){const d=t.getClientArea(document.body),n=this.widget.getLayoutInfo(),a=new t.Dimension(220,2*n.lineHeight),o=c.top,g=function(){const M=d.width-(c.left+c.width+n.borderWidth+n.horizontalPadding),O=-n.borderWidth+c.left+c.width,N=new t.Dimension(M,d.height-c.top-n.borderHeight-n.verticalPadding),P=N.with(void 0,c.top+c.height-n.borderHeight-n.verticalPadding);return{top:o,left:O,fit:M-l.width,maxSizeTop:N,maxSizeBottom:P,minSize:a.with(Math.min(M,a.width))}}(),h=function(){const M=c.left-n.borderWidth-n.horizontalPadding,O=Math.max(n.horizontalPadding,c.left-l.width-n.borderWidth),N=new t.Dimension(M,d.height-c.top-n.borderHeight-n.verticalPadding),P=N.with(void 0,c.top+c.height-n.borderHeight-n.verticalPadding);return{top:o,left:O,fit:M-l.width,maxSizeTop:N,maxSizeBottom:P,minSize:a.with(Math.min(M,a.width))}}(),v=function(){const M=c.left,O=-n.borderWidth+c.top+c.height,N=new t.Dimension(c.width-n.borderHeight,d.height-c.top-c.height-n.verticalPadding);return{top:O,left:M,fit:N.height-l.height,maxSizeBottom:N,maxSizeTop:N,minSize:a.with(N.width)}}(),m=[g,h,v],w=m.find(M=>M.fit>=0)??m.sort((M,O)=>O.fit-M.fit)[0],D=c.top+c.height-n.borderHeight;let y,T=l.height;const _=Math.max(w.maxSizeTop.height,w.maxSizeBottom.height);T>_&&(T=_);let L;s?T<=w.maxSizeTop.height?(y=!0,L=w.maxSizeTop):(y=!1,L=w.maxSizeBottom):T<=w.maxSizeBottom.height?(y=!1,L=w.maxSizeBottom):(y=!0,L=w.maxSizeTop),this._applyTopLeft({left:w.left,top:y?w.top:D-T}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!y,w===g,y,w!==g),this._resizable.minSize=w.minSize,this._resizable.maxSize=L,this._resizable.layout(T,Math.min(L.width,l.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(c){this._topLeft=c,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=i}),define(ae[429],le([1,0,16,6,123,2,60,52,13,9,8,55,17]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.mergeChanges=e.Configuration=e.UserSettings=e.ConfigurationModelParser=e.ConfigurationModel=void 0;class u{constructor(g={},h=[],v=[],m){this._contents=g,this._keys=h,this._overrides=v,this.raw=m,this.frozen=!1,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this.raw?.length){const g=this.raw.map(h=>{if(h instanceof u)return h;const v=new i("");return v.parseRaw(h),v.configurationModel});this._rawConfiguration=g.reduce((h,v)=>v===h?v:h.merge(v),g[0])}else this._rawConfiguration=this;return this._rawConfiguration}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}isFrozen(){return this.frozen}getValue(g){return g?(0,S.getConfigurationValue)(this.contents,g):this.contents}inspect(g,h){const v=this.rawConfiguration.getValue(g),m=h?this.rawConfiguration.getOverrideValue(g,h):void 0,w=h?this.rawConfiguration.override(h).getValue(g):v;return{value:v,override:m,merged:w}}getOverrideValue(g,h){const v=this.getContentsForOverrideIdentifer(h);return v?g?(0,S.getConfigurationValue)(v,g):v:void 0}getKeysForOverrideIdentifier(g){const h=[];for(const v of this.overrides)v.identifiers.includes(g)&&h.push(...v.keys);return t.distinct(h)}getAllOverrideIdentifiers(){const g=[];for(const h of this.overrides)g.push(...h.identifiers);return t.distinct(g)}override(g){let h=this.overrideConfigurations.get(g);return h||(h=this.createOverrideConfigurationModel(g),this.overrideConfigurations.set(g,h)),h}merge(...g){const h=E.deepClone(this.contents),v=E.deepClone(this.overrides),m=[...this.keys],w=this.raw?.length?[...this.raw]:[this];for(const D of g)if(w.push(...D.raw?.length?D.raw:[D]),!D.isEmpty()){this.mergeContents(h,D.contents);for(const y of D.overrides){const[T]=v.filter(_=>t.equals(_.identifiers,y.identifiers));T?(this.mergeContents(T.contents,y.contents),T.keys.push(...y.keys),T.keys=t.distinct(T.keys)):v.push(E.deepClone(y))}for(const y of D.keys)m.indexOf(y)===-1&&m.push(y)}return new u(h,m,v,w.every(D=>D instanceof u)?void 0:w)}freeze(){return this.frozen=!0,this}clone(){return new u(E.deepClone(this.contents),[...this.keys],E.deepClone(this.overrides))}createOverrideConfigurationModel(g){const h=this.getContentsForOverrideIdentifer(g);if(!h||typeof h!="object"||!Object.keys(h).length)return this;const v={};for(const m of t.distinct([...Object.keys(this.contents),...Object.keys(h)])){let w=this.contents[m];const D=h[m];D&&(typeof w=="object"&&typeof D=="object"?(w=E.deepClone(w),this.mergeContents(w,D)):w=D),v[m]=w}return new u(v,this.keys,this.overrides)}mergeContents(g,h){for(const v of Object.keys(h)){if(v in g&&I.isObject(g[v])&&I.isObject(h[v])){this.mergeContents(g[v],h[v]);continue}g[v]=E.deepClone(h[v])}}checkAndFreeze(g){return this.frozen&&!Object.isFrozen(g)?E.deepFreeze(g):g}getContentsForOverrideIdentifer(g){let h=null,v=null;const m=w=>{w&&(v?this.mergeContents(v,w):v=E.deepClone(w))};for(const w of this.overrides)t.equals(w.identifiers,[g])?h=w.contents:w.identifiers.includes(g)&&m(w.contents);return m(h),v}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(g,h){this.addKey(g),(0,S.addToValueTree)(this.contents,g,h,v=>{throw new Error(v)})}removeValue(g){this.removeKey(g)&&(0,S.removeFromValueTree)(this.contents,g)}addKey(g){let h=this.keys.length;for(let v=0;v<h;v++)g.indexOf(this.keys[v])===0&&(h=v);this.keys.splice(h,1,g)}removeKey(g){const h=this.keys.indexOf(g);return h!==-1?(this.keys.splice(h,1),!0):!1}}e.ConfigurationModel=u;class i{constructor(g){this._name=g,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[],this._parseErrors=[]}get configurationModel(){return this._configurationModel||new u}get restrictedConfigurations(){return this._restrictedConfigurations}get errors(){return this._parseErrors}parse(g,h){if(!I.isUndefinedOrNull(g)){const v=this.doParseContent(g);this.parseRaw(v,h)}}reparse(g){this._raw&&this.parseRaw(this._raw,g)}parseRaw(g,h){this._raw=g;const{contents:v,keys:m,overrides:w,restricted:D,hasExcludedProperties:y}=this.doParseRaw(g,h);this._configurationModel=new u(v,m,w,y?[g]:void 0),this._restrictedConfigurations=D||[]}doParseContent(g){let h={},v=null,m=[];const w=[],D=[];function y(_){Array.isArray(m)?m.push(_):v!==null&&(m[v]=_)}const T={onObjectBegin:()=>{const _={};y(_),w.push(m),m=_,v=null},onObjectProperty:_=>{v=_},onObjectEnd:()=>{m=w.pop()},onArrayBegin:()=>{const _=[];y(_),w.push(m),m=_,v=null},onArrayEnd:()=>{m=w.pop()},onLiteralValue:y,onError:(_,L,M)=>{D.push({error:_,offset:L,length:M})}};if(g)try{R.visit(g,T),h=m[0]||{}}catch(_){console.error(`Error while parsing settings file ${this._name}: ${_}`),this._parseErrors=[_]}return h}doParseRaw(g,h){const v=r.Registry.as(C.Extensions.Configuration).getConfigurationProperties(),m=this.filter(g,v,!0,h);g=m.raw;const w=(0,S.toValuesTree)(g,T=>console.error(`Conflict in settings file ${this._name}: ${T}`)),D=Object.keys(g),y=this.toOverrides(g,T=>console.error(`Conflict in settings file ${this._name}: ${T}`));return{contents:w,keys:D,overrides:y,restricted:m.restricted,hasExcludedProperties:m.hasExcludedProperties}}filter(g,h,v,m){let w=!1;if(!m?.scopes&&!m?.skipRestricted)return{raw:g,restricted:[],hasExcludedProperties:w};const D={},y=[];for(const T in g)if(C.OVERRIDE_PROPERTY_REGEX.test(T)&&v){const _=this.filter(g[T],h,!1,m);D[T]=_.raw,w=w||_.hasExcludedProperties,y.push(..._.restricted)}else{const _=h[T],L=_?typeof _.scope<"u"?_.scope:3:void 0;_?.restricted&&y.push(T),(L===void 0||m.scopes===void 0||m.scopes.includes(L))&&!(m.skipRestricted&&_?.restricted)?D[T]=g[T]:w=!0}return{raw:D,restricted:y,hasExcludedProperties:w}}toOverrides(g,h){const v=[];for(const m of Object.keys(g))if(C.OVERRIDE_PROPERTY_REGEX.test(m)){const w={};for(const D in g[m])w[D]=g[m][D];v.push({identifiers:(0,C.overrideIdentifiersFromKey)(m),keys:Object.keys(w),contents:(0,S.toValuesTree)(w,h)})}return v}}e.ConfigurationModelParser=i;class f extends A.Disposable{constructor(g,h,v,m){super(),this.userSettingsResource=g,this.scopes=h,this.fileService=m,this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.parser=new i(this.userSettingsResource.toString()),this.parseOptions={scopes:this.scopes},this._register(this.fileService.watch(v.dirname(this.userSettingsResource))),this._register(this.fileService.watch(this.userSettingsResource)),this._register(p.Event.any(p.Event.filter(this.fileService.onDidFilesChange,w=>w.contains(this.userSettingsResource)),p.Event.filter(this.fileService.onDidRunOperation,w=>(w.isOperation(0)||w.isOperation(3)||w.isOperation(1)||w.isOperation(4))&&v.isEqual(w.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 u}}reparse(){return this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}}e.UserSettings=f;class c{constructor(g,h,v,m,w,D,y,T,_,L,M,O,N){this.key=g,this.overrides=h,this.value=v,this.overrideIdentifiers=m,this.defaultConfiguration=w,this.policyConfiguration=D,this.applicationConfiguration=y,this.userConfiguration=T,this.localUserConfiguration=_,this.remoteUserConfiguration=L,this.workspaceConfiguration=M,this.folderConfigurationModel=O,this.memoryInspectValue=N}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get default(){return this.defaultInspectValue.value!==void 0||this.defaultInspectValue.override!==void 0?{value:this.defaultInspectValue.value,override:this.defaultInspectValue.override}:void 0}get policyInspectValue(){return this._policyInspectValue===void 0&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get policy(){return this.policyInspectValue?.value!==void 0?{value:this.policyInspectValue.value}:void 0}get applicationInspectValue(){return this._applicationInspectValue===void 0&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get application(){return this.applicationInspectValue?.value!==void 0||this.applicationInspectValue?.override!==void 0?{value:this.applicationInspectValue.value,override:this.applicationInspectValue.override}:void 0}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}get userLocalInspectValue(){return this._userLocalInspectValue||(this._userLocalInspectValue=this.localUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userLocalInspectValue}get userLocalValue(){return this.userLocalInspectValue.merged}get userLocal(){return this.userLocalInspectValue.value!==void 0||this.userLocalInspectValue.override!==void 0?{value:this.userLocalInspectValue.value,override:this.userLocalInspectValue.override}:void 0}get userRemoteInspectValue(){return this._userRemoteInspectValue||(this._userRemoteInspectValue=this.remoteUserConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userRemoteInspectValue}get userRemoteValue(){return this.userRemoteInspectValue.merged}get userRemote(){return this.userRemoteInspectValue.value!==void 0||this.userRemoteInspectValue.override!==void 0?{value:this.userRemoteInspectValue.value,override:this.userRemoteInspectValue.override}:void 0}get workspaceInspectValue(){return this._workspaceInspectValue===void 0&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspace(){return this.workspaceInspectValue?.value!==void 0||this.workspaceInspectValue?.override!==void 0?{value:this.workspaceInspectValue.value,override:this.workspaceInspectValue.override}:void 0}get workspaceFolderInspectValue(){return this._workspaceFolderInspectValue===void 0&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get workspaceFolder(){return this.workspaceFolderInspectValue?.value!==void 0||this.workspaceFolderInspectValue?.override!==void 0?{value:this.workspaceFolderInspectValue.value,override:this.workspaceFolderInspectValue.override}:void 0}get memoryValue(){return this.memoryInspectValue.merged}get memory(){return this.memoryInspectValue.value!==void 0||this.memoryInspectValue.override!==void 0?{value:this.memoryInspectValue.value,override:this.memoryInspectValue.override}:void 0}}class l{constructor(g,h,v,m,w=new u,D=new u,y=new k.ResourceMap,T=new u,_=new k.ResourceMap,L=!0){this._defaultConfiguration=g,this._policyConfiguration=h,this._applicationConfiguration=v,this._localUserConfiguration=m,this._remoteUserConfiguration=w,this._workspaceConfiguration=D,this._folderConfigurations=y,this._memoryConfiguration=T,this._memoryConfigurationByResource=_,this._freeze=L,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new k.ResourceMap,this._userConfiguration=null}getValue(g,h,v){return this.getConsolidatedConfigurationModel(g,h,v).getValue(g)}updateValue(g,h,v={}){let m;v.resource?(m=this._memoryConfigurationByResource.get(v.resource),m||(m=new u,this._memoryConfigurationByResource.set(v.resource,m))):m=this._memoryConfiguration,h===void 0?m.removeValue(g):m.setValue(g,h),v.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(g,h,v){const m=this.getConsolidatedConfigurationModel(g,h,v),w=t.distinct(m.overrides.map(T=>T.identifiers).flat()).filter(T=>m.getOverrideValue(g,T)!==void 0),D=this.getFolderConfigurationModelForResource(h.resource,v),y=h.resource?this._memoryConfigurationByResource.get(h.resource)||this._memoryConfiguration:this._memoryConfiguration;return new c(g,h,m.getValue(g),w.length?w:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration.freeze(),this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration.freeze(),this.userConfiguration.freeze(),this.localUserConfiguration.freeze(),this.remoteUserConfiguration.freeze(),v?this._workspaceConfiguration.freeze():void 0,D?D.freeze():void 0,y.inspect(g,h.overrideIdentifier))}keys(g){const h=this.getFolderConfigurationModelForResource(void 0,g);return{default:this._defaultConfiguration.freeze().keys,user:this.userConfiguration.freeze().keys,workspace:this._workspaceConfiguration.freeze().keys,workspaceFolder:h?h.freeze().keys:[]}}updateDefaultConfiguration(g){this._defaultConfiguration=g,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations.clear()}updatePolicyConfiguration(g){this._policyConfiguration=g}updateApplicationConfiguration(g){this._applicationConfiguration=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,h){this._folderConfigurations.set(g,h),this._foldersConsolidatedConfigurations.delete(g)}deleteFolderConfiguration(g){this.folderConfigurations.delete(g),this._foldersConsolidatedConfigurations.delete(g)}compareAndUpdateDefaultConfiguration(g,h){const v=[];if(!h){const{added:m,updated:w,removed:D}=n(this._defaultConfiguration,g);h=[...m,...w,...D]}for(const m of h)for(const w of(0,C.overrideIdentifiersFromKey)(m)){const D=this._defaultConfiguration.getKeysForOverrideIdentifier(w),y=g.getKeysForOverrideIdentifier(w),T=[...y.filter(_=>D.indexOf(_)===-1),...D.filter(_=>y.indexOf(_)===-1),...D.filter(_=>!E.equals(this._defaultConfiguration.override(w).getValue(_),g.override(w).getValue(_)))];v.push([w,T])}return this.updateDefaultConfiguration(g),{keys:h,overrides:v}}compareAndUpdatePolicyConfiguration(g){const{added:h,updated:v,removed:m}=n(this._policyConfiguration,g),w=[...h,...v,...m];return w.length&&this.updatePolicyConfiguration(g),{keys:w,overrides:[]}}compareAndUpdateApplicationConfiguration(g){const{added:h,updated:v,removed:m,overrides:w}=n(this.applicationConfiguration,g),D=[...h,...v,...m];return D.length&&this.updateApplicationConfiguration(g),{keys:D,overrides:w}}compareAndUpdateLocalUserConfiguration(g){const{added:h,updated:v,removed:m,overrides:w}=n(this.localUserConfiguration,g),D=[...h,...v,...m];return D.length&&this.updateLocalUserConfiguration(g),{keys:D,overrides:w}}compareAndUpdateRemoteUserConfiguration(g){const{added:h,updated:v,removed:m,overrides:w}=n(this.remoteUserConfiguration,g),D=[...h,...v,...m];return D.length&&this.updateRemoteUserConfiguration(g),{keys:D,overrides:w}}compareAndUpdateWorkspaceConfiguration(g){const{added:h,updated:v,removed:m,overrides:w}=n(this.workspaceConfiguration,g),D=[...h,...v,...m];return D.length&&this.updateWorkspaceConfiguration(g),{keys:D,overrides:w}}compareAndUpdateFolderConfiguration(g,h){const v=this.folderConfigurations.get(g),{added:m,updated:w,removed:D,overrides:y}=n(v,h),T=[...m,...w,...D];return(T.length||!v)&&this.updateFolderConfiguration(g,h),{keys:T,overrides:y}}compareAndDeleteFolderConfiguration(g){const h=this.folderConfigurations.get(g);if(!h)throw new Error("Unknown folder");this.deleteFolderConfiguration(g);const{added:v,updated:m,removed:w,overrides:D}=n(h,void 0);return{keys:[...v,...m,...w],overrides:D}}get defaults(){return this._defaultConfiguration}get applicationConfiguration(){return this._applicationConfiguration}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}getConsolidatedConfigurationModel(g,h,v){let m=this.getConsolidatedConfigurationModelForResource(h,v);return h.overrideIdentifier&&(m=m.override(h.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(g)!==void 0&&(m=m.merge(this._policyConfiguration)),m}getConsolidatedConfigurationModelForResource({resource:g},h){let v=this.getWorkspaceConsolidatedConfiguration();if(h&&g){const m=h.getFolder(g);m&&(v=this.getFolderConsolidatedConfiguration(m.uri)||v);const w=this._memoryConfigurationByResource.get(g);w&&(v=v.merge(w))}return v}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(g){let h=this._foldersConsolidatedConfigurations.get(g);if(!h){const v=this.getWorkspaceConsolidatedConfiguration(),m=this._folderConfigurations.get(g);m?(h=v.merge(m),this._freeze&&(h=h.freeze()),this._foldersConsolidatedConfigurations.set(g,h)):h=v}return h}getFolderConfigurationModelForResource(g,h){if(h&&g){const v=h.getFolder(g);if(v)return this._folderConfigurations.get(v.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.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,h)=>{const{contents:v,overrides:m,keys:w}=this._folderConfigurations.get(h);return g.push([h,{contents:v,overrides:m,keys:w}]),g},[])}}allKeys(){const g=new Set;return this._defaultConfiguration.freeze().keys.forEach(h=>g.add(h)),this.userConfiguration.freeze().keys.forEach(h=>g.add(h)),this._workspaceConfiguration.freeze().keys.forEach(h=>g.add(h)),this._folderConfigurations.forEach(h=>h.freeze().keys.forEach(v=>g.add(v))),[...g.values()]}allOverrideIdentifiers(){const g=new Set;return this._defaultConfiguration.freeze().getAllOverrideIdentifiers().forEach(h=>g.add(h)),this.userConfiguration.freeze().getAllOverrideIdentifiers().forEach(h=>g.add(h)),this._workspaceConfiguration.freeze().getAllOverrideIdentifiers().forEach(h=>g.add(h)),this._folderConfigurations.forEach(h=>h.freeze().getAllOverrideIdentifiers().forEach(v=>g.add(v))),[...g.values()]}getAllKeysForOverrideIdentifier(g){const h=new Set;return this._defaultConfiguration.getKeysForOverrideIdentifier(g).forEach(v=>h.add(v)),this.userConfiguration.getKeysForOverrideIdentifier(g).forEach(v=>h.add(v)),this._workspaceConfiguration.getKeysForOverrideIdentifier(g).forEach(v=>h.add(v)),this._folderConfigurations.forEach(v=>v.getKeysForOverrideIdentifier(g).forEach(m=>h.add(m))),[...h.values()]}static parse(g){const h=this.parseConfigurationModel(g.defaults),v=this.parseConfigurationModel(g.policy),m=this.parseConfigurationModel(g.application),w=this.parseConfigurationModel(g.user),D=this.parseConfigurationModel(g.workspace),y=g.folders.reduce((T,_)=>(T.set(b.URI.revive(_[0]),this.parseConfigurationModel(_[1])),T),new k.ResourceMap);return new l(h,v,m,w,new u,D,y,new u,new k.ResourceMap,!1)}static parseConfigurationModel(g){return new u(g.contents,g.keys,g.overrides).freeze()}}e.Configuration=l;function s(...o){if(o.length===0)return{keys:[],overrides:[]};if(o.length===1)return o[0];const g=new Set,h=new Map;for(const m of o)m.keys.forEach(w=>g.add(w)),m.overrides.forEach(([w,D])=>{const y=(0,k.getOrSet)(h,w,new Set);D.forEach(T=>y.add(T))});const v=[];return h.forEach((m,w)=>v.push([w,[...m.values()]])),{keys:[...g.values()],overrides:v}}e.mergeChanges=s;class d{constructor(g,h,v,m){this.change=g,this.previous=h,this.currentConfiguraiton=v,this.currentWorkspace=m,this._previousConfiguration=void 0;const w=new Set;g.keys.forEach(y=>w.add(y)),g.overrides.forEach(([,y])=>y.forEach(T=>w.add(T))),this.affectedKeys=[...w.values()];const D=new u;this.affectedKeys.forEach(y=>D.setValue(y,{})),this.affectedKeysTree=D.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=l.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(g,h){if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,g)){if(h){const v=this.previousConfiguration?this.previousConfiguration.getValue(g,h,this.previous?.workspace):void 0,m=this.currentConfiguraiton.getValue(g,h,this.currentWorkspace);return!E.equals(v,m)}return!0}return!1}doesAffectedKeysTreeContains(g,h){let v=(0,S.toValuesTree)({[h]:!0},()=>{}),m;for(;typeof v=="object"&&(m=Object.keys(v)[0]);){if(g=g[m],!g)return!1;v=v[m]}return!0}}e.ConfigurationChangeEvent=d;function n(o,g){const{added:h,removed:v,updated:m}=a(g?.rawConfiguration,o?.rawConfiguration),w=[],D=o?.getAllOverrideIdentifiers()||[],y=g?.getAllOverrideIdentifiers()||[];if(g){const T=y.filter(_=>!D.includes(_));for(const _ of T)w.push([_,g.getKeysForOverrideIdentifier(_)])}if(o){const T=D.filter(_=>!y.includes(_));for(const _ of T)w.push([_,o.getKeysForOverrideIdentifier(_)])}if(g&&o){for(const T of D)if(y.includes(T)){const _=a({contents:o.getOverrideValue(void 0,T)||{},keys:o.getKeysForOverrideIdentifier(T)},{contents:g.getOverrideValue(void 0,T)||{},keys:g.getKeysForOverrideIdentifier(T)});w.push([T,[..._.added,..._.removed,..._.updated]])}}return{added:h,removed:v,updated:m,overrides:w}}function a(o,g){const h=o?g?o.keys.filter(w=>g.keys.indexOf(w)===-1):[...o.keys]:[],v=g?o?g.keys.filter(w=>o.keys.indexOf(w)===-1):[...g.keys]:[],m=[];if(o&&g){for(const w of g.keys)if(o.keys.indexOf(w)!==-1){const D=(0,S.getConfigurationValue)(g.contents,w),y=(0,S.getConfigurationValue)(o.contents,w);E.equals(D,y)||m.push(w)}}return{added:h,removed:v,updated:m}}}),define(ae[804],le([1,0,16,6,2,52,13,8,429,55,25,501,17]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PolicyConfiguration=e.NullPolicyConfiguration=e.DefaultConfigurationModel=e.DefaultConfiguration=void 0;class u extends R.Disposable{constructor(){super(...arguments),this._onDidChangeConfiguration=this._register(new p.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event}get configurationModel(){return this._configurationModel||(this._configurationModel=new i(this.getConfigurationDefaultOverrides())),this._configurationModel}async initialize(){return this._configurationModel=void 0,this._register(r.Registry.as(b.Extensions.Configuration).onDidUpdateConfiguration(({properties:s,defaultsOverrides:d})=>this.onDidUpdateConfiguration(s,d))),this.configurationModel}reload(){return this._configurationModel=void 0,this.configurationModel}onDidUpdateConfiguration(s,d){this._configurationModel=void 0,this._onDidChangeConfiguration.fire({defaults:this.configurationModel,properties:s})}getConfigurationDefaultOverrides(){return{}}}e.DefaultConfiguration=u;class i extends I.ConfigurationModel{constructor(s={}){const d=r.Registry.as(b.Extensions.Configuration).getConfigurationProperties(),n=Object.keys(d),a=Object.create(null),o=[];for(const g in d){const h=s[g],v=h!==void 0?h:d[g].default;(0,E.addToValueTree)(a,g,v,m=>console.error(`Conflict in default settings: ${m}`))}for(const g of Object.keys(a))b.OVERRIDE_PROPERTY_REGEX.test(g)&&o.push({identifiers:(0,b.overrideIdentifiersFromKey)(g),keys:Object.keys(a[g]),contents:(0,E.toValuesTree)(a[g],h=>console.error(`Conflict in default settings file: ${h}`))});super(a,n,o)}}e.DefaultConfigurationModel=i;class f{constructor(){this.onDidChangeConfiguration=p.Event.None,this.configurationModel=new I.ConfigurationModel}async initialize(){return this.configurationModel}}e.NullPolicyConfiguration=f;let c=class extends R.Disposable{get configurationModel(){return this._configurationModel}constructor(s,d,n){super(),this.defaultConfiguration=s,this.policyService=d,this.logService=n,this._onDidChangeConfiguration=this._register(new p.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configurationModel=new I.ConfigurationModel}async initialize(){return this.update(await this.registerPolicyDefinitions(this.defaultConfiguration.configurationModel.keys),!1),this._register(this.policyService.onDidChange(s=>this.onDidChangePolicies(s))),this._register(this.defaultConfiguration.onDidChangeConfiguration(async({properties:s})=>this.update(await this.registerPolicyDefinitions(s),!0))),this._configurationModel}async registerPolicyDefinitions(s){const d={},n=[],a=r.Registry.as(b.Extensions.Configuration).getConfigurationProperties();for(const o of s){const g=a[o];if(!g){n.push(o);continue}if(g.policy){if(g.type!=="string"&&g.type!=="number"){this.logService.warn(`Policy ${g.policy.name} has unsupported type ${g.type}`);continue}n.push(o),d[g.policy.name]={type:g.type}}}return(0,k.isEmptyObject)(d)||await this.policyService.registerPolicyDefinitions(d),n}onDidChangePolicies(s){const d=r.Registry.as(b.Extensions.Configuration).getPolicyConfigurations(),n=(0,t.coalesce)(s.map(a=>d.get(a)));this.update(n,!0)}update(s,d){const n=r.Registry.as(b.Extensions.Configuration).getConfigurationProperties(),a=[],o=this._configurationModel.isEmpty();for(const g of s){const h=n[g]?.policy?.name;if(h){const v=this.policyService.getPolicyValue(h);(o?v!==void 0:!(0,A.equals)(this._configurationModel.getValue(g),v))&&a.push([g,v])}else this._configurationModel.getValue(g)!==void 0&&a.push([g,void 0])}if(a.length){const g=this._configurationModel;this._configurationModel=new I.ConfigurationModel;for(const h of g.keys)this._configurationModel.setValue(h,g.getValue(h));for(const[h,v]of a)v===void 0?this._configurationModel.removeValue(h):this._configurationModel.setValue(h,v);d&&this._onDidChangeConfiguration.fire(this._configurationModel)}}};c=we([F(1,C.IPolicyService),F(2,S.ILogService)],c),e.PolicyConfiguration=c}),define(ae[98],le([1,0,234,14,31,17,2,158]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=e.KeybindingWeight=void 0;var I;(function(C){C[C.EditorCore=0]="EditorCore",C[C.EditorContrib=100]="EditorContrib",C[C.WorkbenchContrib=200]="WorkbenchContrib",C[C.BuiltinExtension=300]="BuiltinExtension",C[C.ExternalExtension=400]="ExternalExtension"})(I=e.KeybindingWeight||(e.KeybindingWeight={}));class b{constructor(){this._coreKeybindings=new E.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(r){if(p.OS===1){if(r&&r.win)return r.win}else if(p.OS===2){if(r&&r.mac)return r.mac}else if(r&&r.linux)return r.linux;return r}registerKeybindingRule(r){const u=b.bindToCurrentPlatform(r),i=new k.DisposableStore;if(u&&u.primary){const f=(0,t.createKeybinding)(u.primary,p.OS);f&&i.add(this._registerDefaultKeybinding(f,r.id,r.args,r.weight,0,r.when))}if(u&&Array.isArray(u.secondary))for(let f=0,c=u.secondary.length;f<c;f++){const l=u.secondary[f],s=(0,t.createKeybinding)(l,p.OS);s&&i.add(this._registerDefaultKeybinding(s,r.id,r.args,r.weight,-f-1,r.when))}return i}setExtensionKeybindings(r){const u=[];let i=0;for(const f of r)f.keybinding.length>0&&(u[i++]={keybinding:f.keybinding,command:f.id,commandArgs:f.args,when:f.when,weight1:f.weight,weight2:0,extensionId:f.extensionId||null,isBuiltinExtension:f.isBuiltinExtension||!1});this._extensionKeybindings=u,this._cachedMergedKeybindings=null}registerCommandAndKeybindingRule(r){return(0,k.combinedDisposable)(this.registerKeybindingRule(r),R.CommandsRegistry.registerCommand(r))}static _mightProduceChar(r){return r>=21&&r<=30||r>=31&&r<=56?!0:r===80||r===81||r===82||r===83||r===84||r===85||r===86||r===110||r===111||r===87||r===88||r===89||r===90||r===91||r===92}_assertNoCtrlAlt(r,u){r.ctrlKey&&r.altKey&&!r.metaKey&&b._mightProduceChar(r.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",r," for ",u)}_registerDefaultKeybinding(r,u,i,f,c,l){p.OS===1&&this._assertNoCtrlAlt(r.parts[0],u);const s=this._coreKeybindings.push({keybinding:r.parts,command:u,commandArgs:i,when:l,weight1:f,weight2:c,extensionId:null,isBuiltinExtension:!1});return this._cachedMergedKeybindings=null,(0,k.toDisposable)(()=>{s(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(S)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new b,e.Extensions={EditorModes:"platform.keybindingsRegistry"},A.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function S(C,r){if(C.weight1!==r.weight1)return C.weight1-r.weight1;if(C.command&&r.command){if(C.command<r.command)return-1;if(C.command>r.command)return 1}return C.weight2-r.weight2}}),define(ae[265],le([1,0,488,1268,211,7,98,1420,2]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.ContextScopedHistoryInputBox=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new A.RawContextKey("suggestWidgetVisible",!1,(0,E.localize)(0,null));const b="historyNavigationWidgetFocus",S="historyNavigationForwardsEnabled",C="historyNavigationBackwardsEnabled";let r;const u=[];function i(s,d){if(u.includes(d))throw new Error("Cannot register the same widget multiple times");u.push(d);const n=new I.DisposableStore,a=new A.RawContextKey(b,!1).bindTo(s),o=new A.RawContextKey(S,!0).bindTo(s),g=new A.RawContextKey(C,!0).bindTo(s),h=()=>{a.set(!0),r=d},v=()=>{a.set(!1),r===d&&(r=void 0)};return d.element===document.activeElement&&h(),n.add(d.onDidFocus(()=>h())),n.add(d.onDidBlur(()=>v())),n.add((0,I.toDisposable)(()=>{u.splice(u.indexOf(d),1),v()})),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:g,dispose(){n.dispose()}}}e.registerAndCreateHistoryNavigationContext=i;let f=class extends R.HistoryInputBox{constructor(d,n,a,o){super(d,n,a);const g=this._register(o.createScoped(this.element));this._register(i(g,this))}};f=we([F(3,A.IContextKeyService)],f),e.ContextScopedHistoryInputBox=f;let c=class extends t.FindInput{constructor(d,n,a,o){super(d,n,a);const g=this._register(o.createScoped(this.inputBox.element));this._register(i(g,this.inputBox))}};c=we([F(3,A.IContextKeyService)],c),e.ContextScopedFindInput=c;let l=class extends p.ReplaceInput{constructor(d,n,a,o,g=!1){super(d,n,g,a);const h=this._register(o.createScoped(this.inputBox.element));this._register(i(h,this.inputBox))}};l=we([F(3,A.IContextKeyService)],l),e.ContextScopedReplaceInput=l,k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:A.ContextKeyExpr.and(A.ContextKeyExpr.has(b),A.ContextKeyExpr.equals(C,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:s=>{r?.showPreviousValue()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:A.ContextKeyExpr.and(A.ContextKeyExpr.has(b),A.ContextKeyExpr.equals(S,!0),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:s=>{r?.showNextValue()}})}),define(ae[222],le([1,0,16,2,17]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var A;(function(E){E[E.PRESERVE=0]="PRESERVE",E[E.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((b,S)=>S.prefix.length-b.prefix.length),(0,p.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(S=>I.startsWith(S.prefix))||void 0||this.defaultProvider}clear(){const I=[...this.providers],b=this.defaultProvider;return this.providers=[],this.defaultProvider=void 0,()=>{this.providers=I,this.defaultProvider=b}}}e.QuickAccessRegistry=k,R.Registry.add(e.Extensions.Quickaccess,new k)}),define(ae[805],le([1,0,1427,17,2,38,222,48]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let I=class nr{constructor(S,C){this.quickInputService=S,this.keybindingService=C,this.registry=p.Registry.as(k.Extensions.Quickaccess)}provide(S){const C=new R.DisposableStore;return C.add(S.onDidAccept(()=>{const[r]=S.selectedItems;r&&this.quickInputService.quickAccess.show(r.prefix,{preserveValue:!0})})),C.add(S.onDidChangeValue(r=>{const u=this.registry.getQuickAccessProvider(r.substr(nr.PREFIX.length));u&&u.prefix&&u.prefix!==nr.PREFIX&&this.quickInputService.quickAccess.show(u.prefix,{preserveValue:!0})})),S.items=this.getQuickAccessProviders().filter(r=>r.prefix!==nr.PREFIX),C}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((C,r)=>C.prefix.localeCompare(r.prefix)).flatMap(C=>this.createPicks(C))}createPicks(S){return S.helpEntries.map(C=>{const r=C.prefix||S.prefix,u=r||"\u2026";return{prefix:r,label:u,keybinding:C.commandId?this.keybindingService.lookupKeybinding(C.commandId):void 0,ariaLabel:(0,t.localize)(0,null,u,C.description),description:C.description}})}};I.PREFIX="?",I=we([F(0,E.IQuickInputService),F(1,A.IKeybindingService)],I),e.HelpQuickAccessProvider=I}),define(ae[2118],le([1,0,11,32,154,2,5,222,48,17]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let S=class extends A.Disposable{constructor(r,u){super(),this.quickInputService=r,this.instantiationService=u,this.registry=b.Registry.as(E.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}pick(r="",u){return this.doShowOrPick(r,!0,u)}show(r="",u){this.doShowOrPick(r,!1,u)}doShowOrPick(r,u,i){const[f,c]=this.getOrInstantiateProvider(r),l=this.visibleQuickAccess,s=l?.descriptor;if(l&&c&&s===c){r!==c.prefix&&!i?.preserveValue&&(l.picker.value=r),this.adjustValueSelection(l.picker,c,i);return}if(c&&!i?.preserveValue){let g;if(l&&s&&s!==c){const h=l.value.substr(s.prefix.length);h&&(g=`${c.prefix}${h}`)}if(!g){const h=f?.defaultFilterValue;h===E.DefaultQuickAccessFilterValue.LAST?g=this.lastAcceptedPickerValues.get(c):typeof h=="string"&&(g=`${c.prefix}${h}`)}typeof g=="string"&&(r=g)}const d=new A.DisposableStore,n=d.add(this.quickInputService.createQuickPick());n.value=r,this.adjustValueSelection(n,c,i),n.placeholder=c?.placeholder,n.quickNavigate=i?.quickNavigateConfiguration,n.hideInput=!!n.quickNavigate&&!l,(typeof i?.itemActivation=="number"||i?.quickNavigateConfiguration)&&(n.itemActivation=i?.itemActivation??I.ItemActivation.SECOND),n.contextKey=c?.contextKey,n.filterValue=g=>g.substring(c?c.prefix.length:0),c?.placeholder&&(n.ariaLabel=c?.placeholder);let a;u&&(a=new t.DeferredPromise,d.add((0,R.once)(n.onWillAccept)(g=>{g.veto(),n.hide()}))),d.add(this.registerPickerListeners(n,f,c,r,i?.providerOptions));const o=d.add(new p.CancellationTokenSource);if(f&&d.add(f.provide(n,o.token,i?.providerOptions)),(0,R.once)(n.onDidHide)(()=>{n.selectedItems.length===0&&o.cancel(),d.dispose(),a?.complete(n.selectedItems.slice(0))}),n.show(),u)return a?.p}adjustValueSelection(r,u,i){let f;i?.preserveValue?f=[r.value.length,r.value.length]:f=[u?.prefix.length??0,r.value.length],r.valueSelection=f}registerPickerListeners(r,u,i,f,c){const l=new A.DisposableStore,s=this.visibleQuickAccess={picker:r,descriptor:i,value:f};return l.add((0,A.toDisposable)(()=>{s===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),l.add(r.onDidChangeValue(d=>{const[n]=this.getOrInstantiateProvider(d);n!==u?this.show(d,{preserveValue:!0,providerOptions:c}):s.value=d})),i&&l.add(r.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,r.value)})),l}getOrInstantiateProvider(r){const u=this.registry.getQuickAccessProvider(r);if(!u)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(u);return i||(i=this.instantiationService.createInstance(u.ctor),this.mapProviderToDescriptor.set(u,i)),[i,u]}};S=we([F(0,I.IQuickInputService),F(1,k.IInstantiationService)],S),e.QuickAccessController=S}),define(ae[148],le([1,0,21,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverError=e.RemoteAuthorityResolverErrorCode=e.IRemoteAuthorityResolverService=void 0,e.IRemoteAuthorityResolverService=(0,p.createDecorator)("remoteAuthorityResolverService");var R;(function(k){k.Unknown="Unknown",k.NotAvailable="NotAvailable",k.TemporarilyNotAvailable="TemporarilyNotAvailable",k.NoResolverFound="NoResolverFound"})(R=e.RemoteAuthorityResolverErrorCode||(e.RemoteAuthorityResolverErrorCode={}));class A extends t.ErrorNoTelemetry{static isNotAvailable(E){return E instanceof A&&E._code===R.NotAvailable}static isTemporarilyNotAvailable(E){return E instanceof A&&E._code===R.TemporarilyNotAvailable}static isNoResolverFound(E){return E instanceof A&&E._code===R.NoResolverFound}static isHandled(E){return E instanceof A&&E.isHandled}constructor(E,I=R.Unknown,b){super(E),this._message=E,this._code=I,this._detail=b,this.isHandled=I===R.NotAvailable&&b===!0,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,A.prototype)}}e.RemoteAuthorityResolverError=A}),define(ae[2119],le([1,0,10,11,56,6,2,420,148]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserSocketFactory=e.defaultWebSocketFactory=void 0;class b extends k.Disposable{traceSocketEvent(u,i){E.SocketDiagnostics.traceSocketEvent(this._socket,this._debugLabel,u,i)}constructor(u,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(u),this.traceSocketEvent("created",{type:"BrowserWebSocket",url:u}),this._fileReader=new FileReader,this._queue=[],this._isReading=!1,this._isClosed=!1,this._fileReader.onload=a=>{this._isReading=!1;const o=a.target.result;this.traceSocketEvent("read",o),this._onData.fire(o),this._queue.length>0&&f(this._queue.shift())};const f=a=>{if(this._isReading){this._queue.push(a);return}this._isReading=!0,this._fileReader.readAsArrayBuffer(a)};this._socketMessageListener=a=>{const o=a.data;this.traceSocketEvent("browserWebSocketBlobReceived",{type:o.type,size:o.size}),f(o)},this._socket.addEventListener("message",this._socketMessageListener),this._register(t.addDisposableListener(this._socket,"open",a=>{this.traceSocketEvent("open"),this._onOpen.fire()}));let c=null;const l=()=>{const a=c;c=null,this._onError.fire(a)},s=this._register(new p.RunOnceScheduler(l,0)),d=a=>{s.cancel(),c=a,s.schedule()},n=a=>{s.cancel(),c=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,c&&(window.navigator.onLine?a.wasClean?(s.cancel(),l()):n(new I.RemoteAuthorityResolverError(a.reason||`WebSocket close with status code ${a.code}`,I.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable,a)):n(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}),d(a)}))}send(u){this._isClosed||(this.traceSocketEvent("write",u),this._socket.send(u))}close(){this._isClosed=!0,this.traceSocketEvent("close"),this._socket.close(),this._socket.removeEventListener("message",this._socketMessageListener),this.dispose()}}e.defaultWebSocketFactory=new class{create(r,u){return new b(r,u)}};class S{traceSocketEvent(u,i){typeof this.socket.traceSocketEvent=="function"?this.socket.traceSocketEvent(u,i):E.SocketDiagnostics.traceSocketEvent(this.socket,this.debugLabel,u,i)}constructor(u,i){this.socket=u,this.debugLabel=i}dispose(){this.socket.close()}onData(u){return this.socket.onData(i=>u(R.VSBuffer.wrap(new Uint8Array(i))))}onClose(u){const i=f=>{u(typeof f>"u"?f:{type:1,code:f.code,reason:f.reason,wasClean:f.wasClean,event:f.event})};return this.socket.onClose(i)}onEnd(u){return k.Disposable.None}write(u){this.socket.send(u.buffer)}end(){this.socket.close()}drain(){return Promise.resolve()}}class C{constructor(u){this._webSocketFactory=u||e.defaultWebSocketFactory}connect(u,i,f,c,l,s){const d=/^https:/.test(window.location.href)?"wss":"ws",n=this._webSocketFactory.create(`${d}://${/:/.test(u)&&!/\[/.test(u)?`[${u}]`:u}:${i}${f}?${c}&skipWebSocketFrames=false`,l),a=n.onError(o=>s(o,void 0));n.onOpen(()=>{a.dispose(),s(void 0,new S(n,l))})}}e.BrowserSocketFactory=C}),define(ae[223],le([1,0,22]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseAuthorityWithOptionalPort=e.parseAuthorityWithPort=e.getRemoteServerRootPath=e.getRemoteName=e.getRemoteAuthority=void 0;function p(b){return b.scheme===t.Schemas.vscodeRemote?b.authority:void 0}e.getRemoteAuthority=p;function R(b){if(!b)return;const S=b.indexOf("+");return S<0?b:b.substr(0,S)}e.getRemoteName=R;function A(b){return`/${b.quality??"oss"}-${b.commit??"dev"}`}e.getRemoteServerRootPath=A;function k(b){const{host:S,port:C}=I(b);if(typeof C>"u")throw new Error("Remote authority doesn't contain a port!");return{host:S,port:C}}e.parseAuthorityWithPort=k;function E(b,S){let{host:C,port:r}=I(b);return typeof r>"u"&&(r=S),{host:C,port:r}}e.parseAuthorityWithOptionalPort=E;function I(b){const S=b.match(/^(\[[0-9a-z:]+\]):(\d+)$/);if(S)return{host:S[1],port:parseInt(S[2],10)};const C=b.match(/^(\[[0-9a-z:]+\])$/);if(C)return{host:C[1],port:void 0};const r=b.match(/(.*):(\d+)$/);return r?{host:r[1],port:parseInt(r[2],10)}:{host:b,port:void 0}}}),define(ae[115],le([1,0,28,5,223]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBuiltinExtensionsScannerService=e.isResolverExtension=e.isAuthenticationProviderExtension=e.isLanguagePackExtension=e.isApplicationScopedExtension=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(i){if(typeof i=="object"&&i!==null&&i.supported!==!0)return i.description}e.getWorkspaceSupportTypeMessage=A;function k(i){return i&&typeof i=="object"&&typeof i.id=="string"&&(!i.uuid||typeof i.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 E;(function(i){i[i.System=0]="System",i[i.User=1]="User"})(E=e.ExtensionType||(e.ExtensionType={}));var I;(function(i){i.WIN32_X64="win32-x64",i.WIN32_IA32="win32-ia32",i.WIN32_ARM64="win32-arm64",i.LINUX_X64="linux-x64",i.LINUX_ARM64="linux-arm64",i.LINUX_ARMHF="linux-armhf",i.ALPINE_X64="alpine-x64",i.ALPINE_ARM64="alpine-arm64",i.DARWIN_X64="darwin-x64",i.DARWIN_ARM64="darwin-arm64",i.WEB="web",i.UNIVERSAL="universal",i.UNKNOWN="unknown",i.UNDEFINED="undefined"})(I=e.TargetPlatform||(e.TargetPlatform={}));class b{constructor(f){this.value=f,this._lower=f.toLowerCase()}static equals(f,c){if(typeof f>"u"||f===null)return typeof c>"u"||c===null;if(typeof c>"u"||c===null)return!1;if(typeof f=="string"||typeof c=="string"){const l=typeof f=="string"?f:f.value,s=typeof c=="string"?c:c.value;return t.equalsIgnoreCase(l,s)}return f._lower===c._lower}static toKey(f){return typeof f=="string"?f.toLowerCase():f._lower}}e.ExtensionIdentifier=b;function S(i){return C(i)}e.isApplicationScopedExtension=S;function C(i){return i.contributes&&i.contributes.localizations?i.contributes.localizations.length>0:!1}e.isLanguagePackExtension=C;function r(i){return i.contributes&&i.contributes.authentication?i.contributes.authentication.length>0:!1}e.isAuthenticationProviderExtension=r;function u(i,f){if(f){const c=`onResolveRemoteAuthority:${(0,R.getRemoteName)(f)}`;return i.activationEvents?.indexOf(c)!==-1}return!1}e.isResolverExtension=u,e.IBuiltinExtensionsScannerService=(0,p.createDecorator)("IBuiltinExtensionsScannerService")}),define(ae[100],le([1,0,28,82,115,14,9,21,209]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeTargetPlatform=e.isAlpineLinux=e.getExtensionDependencies=e.BetterMergeId=e.getGalleryExtensionTelemetryData=e.getLocalExtensionTelemetryData=e.groupByExtension=e.getGalleryExtensionId=e.adoptToGalleryExtensionId=e.getExtensionId=e.getIdAndVersion=e.ExtensionKey=e.areSameExtensions=void 0;function b(g,h){return g.uuid&&h.uuid?g.uuid===h.uuid:g.id===h.id?!0:(0,t.compareIgnoreCase)(g.id,h.id)===0}e.areSameExtensions=b;const S=/^([^.]+\..+)-(\d+\.\d+\.\d+)(-(.+))?$/;class C{static create(h){const v=h.manifest?h.manifest.version:h.version,m=h.manifest?h.targetPlatform:h.properties.targetPlatform;return new C(h.identifier,v,m)}static parse(h){const v=S.exec(h);return v&&v[1]&&v[2]?new C({id:v[1]},v[2],v[4]||void 0):null}constructor(h,v,m="undefined"){this.version=v,this.targetPlatform=m,this.id=h.id}toString(){return`${this.id}-${this.version}${this.targetPlatform!=="undefined"?`-${this.targetPlatform}`:""}`}equals(h){return h instanceof C?b(this,h)&&this.version===h.version&&this.targetPlatform===h.targetPlatform:!1}}e.ExtensionKey=C;const r=/^([^.]+\..+)@((prerelease)|(\d+\.\d+\.\d+(-.*)?))$/;function u(g){const h=r.exec(g);return h&&h[1]?[f(h[1]),h[2]]:[f(g),void 0]}e.getIdAndVersion=u;function i(g,h){return`${g}.${h}`}e.getExtensionId=i;function f(g){return g.toLocaleLowerCase()}e.adoptToGalleryExtensionId=f;function c(g,h){return f(i(g,h))}e.getGalleryExtensionId=c;function l(g,h){const v=[],m=w=>{for(const D of v)if(D.some(y=>b(h(y),h(w))))return D;return null};for(const w of g){const D=m(w);D?D.push(w):v.push([w])}return v}e.groupByExtension=l;function s(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=s;function d(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),isSigned:g.isSigned,...g.telemetryData}}e.getGalleryExtensionTelemetryData=d,e.BetterMergeId=new R.ExtensionIdentifier("pprice.better-merge");function n(g,h){const v=[],m=h.manifest.extensionDependencies?.slice(0)??[];for(;m.length;){const w=m.shift();if(w&&v.every(D=>!b(D.identifier,{id:w}))){const D=g.filter(y=>b(y.identifier,{id:w}));D.length===1&&(v.push(D[0]),m.push(...D[0].manifest.extensionDependencies?.slice(0)??[]))}}return v}e.getExtensionDependencies=n;async function a(g,h){if(!A.isLinux)return!1;let v;try{v=(await g.readFile(k.URI.file("/etc/os-release"))).value.toString()}catch{try{v=(await g.readFile(k.URI.file("/usr/lib/os-release"))).value.toString()}catch(w){h.debug("Error while getting the os-release file.",(0,E.getErrorMessage)(w))}}return!!v&&(v.match(/^ID=([^\u001b\r\n]*)/m)||[])[1]==="alpine"}e.isAlpineLinux=a;async function o(g,h){const v=await a(g,h),m=(0,p.getTargetPlatform)(v?"alpine":A.platform,I.arch);return h.debug("ComputeTargetPlatform:",m),m}e.computeTargetPlatform=o}),define(ae[2120],le([1,0,32,21,22,18,306,9,1412,82,100,115]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionManagementCLI=void 0;const r=c=>(0,I.localize)(0,null,c),u=(0,I.localize)(1,null,"ms-dotnettools.csharp");function i(c,l){return l?`${c.publisher}.${c.name}@${c.version}`:`${c.publisher}.${c.name}`}let f=class{constructor(l,s){this.extensionManagementService=l,this.extensionGalleryService=s}get location(){}async listExtensions(l,s,d,n=console){let a=await this.extensionManagementService.getInstalled(1,d);const o=C.EXTENSION_CATEGORIES.map(h=>h.toLowerCase());if(s&&s!==""){if(o.indexOf(s.toLowerCase())<0){n.log("Invalid category please enter a valid category. To list valid categories run --category without a category specified");return}a=a.filter(h=>h.manifest.categories?h.manifest.categories.map(m=>m.toLowerCase()).indexOf(s.toLowerCase())>-1:!1)}else if(s===""){n.log("Possible Categories: "),o.forEach(h=>{n.log(h)});return}this.location&&n.log((0,I.localize)(2,null,this.location)),a=a.sort((h,v)=>h.identifier.id.localeCompare(v.identifier.id));let g;for(const h of a)g!==h.identifier.id&&(g=h.identifier.id,n.log(i(h.manifest,l)))}async installExtensions(l,s,d,n,a=console){const o=[],g=[];l.length&&a.log(this.location?(0,I.localize)(3,null,this.location):(0,I.localize)(4,null));const h=await this.extensionManagementService.getInstalled(1,d.profileLocation),v=(y,T)=>{const _=h.find(L=>(0,S.areSameExtensions)(L.identifier,{id:y}));if(_){if(!n&&(!T||T==="prerelease"&&_.preRelease))return a.log((0,I.localize)(5,null,y,_.manifest.version,y)),!1;if(T&&_.manifest.version===T)return a.log((0,I.localize)(6,null,`${y}@${T}`)),!1}return!0},m=(y,T,_)=>{D.push({id:y,version:T!=="prerelease"?T:void 0,installOptions:{...d,isBuiltin:_,installPreReleaseVersion:T==="prerelease"||d.installPreReleaseVersion}})},w=[],D=[];for(const y of l)if(y instanceof E.URI)w.push(y);else{const[T,_]=(0,S.getIdAndVersion)(y);v(T,_)&&m(T,_,!1)}for(const y of s){const[T,_]=(0,S.getIdAndVersion)(y);v(T,_)&&m(T,_,!0)}if(w.length&&await Promise.all(w.map(async y=>{try{const T=await this.installVSIX(y,{...d,isBuiltin:!1},n,a);T&&g.push(T)}catch(T){a.error(T.message||T.stack||T),o.push(y.toString())}})),D.length){const y=await this.getGalleryExtensions(D);await Promise.all(D.map(async T=>{const _=y.get(T.id.toLowerCase());if(_)try{const L=await this.installFromGallery(T,_,h,n,a);L&&g.push(L)}catch(L){a.error(L.message||L.stack||L),o.push(T.id)}else a.error(`${r(T.version?`${T.id}@${T.version}`:T.id)} ${u}`),o.push(T.id)}))}if(o.length)throw new Error((0,I.localize)(7,null,o.join(", ")))}async installVSIX(l,s,d,n){const a=await this.extensionManagementService.getManifest(l);if(!a)throw new Error("Invalid vsix");if(await this.validateVSIX(a,d,s.profileLocation,n))try{return await this.extensionManagementService.install(l,s),n.log((0,I.localize)(8,null,(0,A.basename)(l))),a}catch(g){if((0,p.isCancellationError)(g))return n.log((0,I.localize)(9,null,(0,A.basename)(l))),null;throw g}return null}async getGalleryExtensions(l){const s=new Map,d=l.some(a=>a.installOptions.installPreReleaseVersion),n=await this.extensionGalleryService.getExtensions(l.map(a=>({...a,preRelease:d})),t.CancellationToken.None);for(const a of n)s.set(a.identifier.id.toLowerCase(),a);return s}async installFromGallery({id:l,version:s,installOptions:d},n,a,o,g){const h=await this.extensionGalleryService.getManifest(n,t.CancellationToken.None);if(h&&!this.validateExtensionKind(h,g))return null;const v=a.find(m=>(0,S.areSameExtensions)(m.identifier,n.identifier));if(v){if(n.version===v.manifest.version)return g.log((0,I.localize)(10,null,s?`${l}@${s}`:l)),null;g.log((0,I.localize)(11,null,l,n.version))}try{d.isBuiltin?g.log(s?(0,I.localize)(12,null,l,s):(0,I.localize)(13,null,l)):g.log(s?(0,I.localize)(14,null,l,s):(0,I.localize)(15,null,l));const m=await this.extensionManagementService.installFromGallery(n,{...d,installGivenVersion:!!s});return g.log((0,I.localize)(16,null,l,m.manifest.version)),h}catch(m){if((0,p.isCancellationError)(m))return g.log((0,I.localize)(17,null,l)),null;throw m}}validateExtensionKind(l,s){return!0}async validateVSIX(l,s,d,n){const a={id:(0,S.getGalleryExtensionId)(l.publisher,l.name)},g=(await this.extensionManagementService.getInstalled(1,d)).find(h=>(0,S.areSameExtensions)(a,h.identifier)&&(0,k.gt)(h.manifest.version,l.version));return g&&!s?(n.log((0,I.localize)(18,null,g.identifier.id,g.manifest.version,l.version)),!1):this.validateExtensionKind(l,n)}async uninstallExtensions(l,s,d,n=console){const a=async g=>{if(g instanceof E.URI){const h=await this.extensionManagementService.getManifest(g);return i(h)}return g},o=[];for(const g of l){const h=await a(g),m=(await this.extensionManagementService.getInstalled(void 0,d)).filter(w=>(0,S.areSameExtensions)(w.identifier,{id:h}));if(!m.length)throw new Error(`${this.notInstalled(h)} ${u}`);if(m.some(w=>w.type===0)){n.log((0,I.localize)(19,null,h));return}if(!s&&m.some(w=>w.isBuiltin)){n.log((0,I.localize)(20,null,h));return}n.log((0,I.localize)(21,null,h));for(const w of m)await this.extensionManagementService.uninstall(w,{profileLocation:d}),o.push(w);this.location?n.log((0,I.localize)(22,null,h,this.location)):n.log((0,I.localize)(23,null,h))}}async locateExtension(l,s=console){const d=await this.extensionManagementService.getInstalled();l.forEach(n=>{d.forEach(a=>{if(a.identifier.id===n&&a.location.scheme===R.Schemas.file){s.log(a.location.fsPath);return}})})}notInstalled(l){return this.location?(0,I.localize)(24,null,l,this.location):(0,I.localize)(25,null,l)}};f=we([F(0,b.IExtensionManagementService),F(1,b.IExtensionGalleryService)],f),e.ExtensionManagementCLI=f}),define(ae[504],le([1,0,11,56,2,60,9,100,19,5,25]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfileScannerService=e.IExtensionsProfileScannerService=void 0,e.IExtensionsProfileScannerService=(0,b.createDecorator)("IExtensionsProfileScannerService");let C=class extends R.Disposable{constructor(u,i){super(),this.fileService=u,this.logService=i,this.resourcesAccessQueueMap=new A.ResourceMap}scanProfileExtensions(u){return this.withProfileExtensions(u)}addExtensionsToProfile(u,i){return this.withProfileExtensions(i,f=>(f=f.filter(c=>u.some(([l])=>!(0,E.areSameExtensions)(c.identifier,l.identifier))),f.push(...u.map(([c,l])=>({identifier:c.identifier,version:c.manifest.version,location:c.location,metadata:l}))),f))}removeExtensionFromProfile(u,i){return this.withProfileExtensions(i,f=>f.filter(c=>!(0,E.areSameExtensions)(c.identifier,u)))}async withProfileExtensions(u,i){return this.getResourceAccessQueue(u).queue(async()=>{let f=[];try{const c=await this.fileService.readFile(u),l=JSON.parse(c.value.toString());for(const s of l){if(!s.identifier){this.logService.info("Ignoring invalid extension while scanning. Identifier does not exist.",s);continue}if(!s.location){this.logService.info("Ignoring invalid extension while scanning. Location does not exist.",s);continue}if(!s.version){this.logService.info("Ignoring invalid extension while scanning. Version does not exist.",s);continue}f.push({identifier:s.identifier,location:k.URI.revive(s.location),version:s.version,metadata:s.metadata})}}catch(c){c.fileOperationResult!==1&&this.logService.error(c)}if(i){f=i(f);const c=f.map(l=>({identifier:l.identifier,version:l.version,location:l.location.toJSON(),metadata:l.metadata}));await this.fileService.writeFile(u,p.VSBuffer.fromString(JSON.stringify(c)))}return f})}getResourceAccessQueue(u){let i=this.resourcesAccessQueueMap.get(u);return i||(i=new t.Queue,this.resourcesAccessQueueMap.set(u,i)),i}};C=we([F(0,I.IFileService),F(1,S.ILogService)],C),e.ExtensionsProfileScannerService=C}),define(ae[2121],le([1,0,32,100]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateUnsupportedExtensions=void 0;async function R(A,k,E,I,b){try{const S=await A.getExtensionsControlManifest();if(!S.deprecated)return;const C=await A.getInstalled(1);for(const[r,u]of Object.entries(S.deprecated)){if(!u?.extension)continue;const{id:i,autoMigrate:f,preRelease:c}=u.extension;if(!f)continue;const l=C.find(d=>(0,p.areSameExtensions)(d.identifier,{id:r}));if(!l)continue;const s=(await k.getExtensions([{id:i,preRelease:c}],{targetPlatform:await A.getTargetPlatform(),compatible:!0},t.CancellationToken.None))[0];if(!s){b.info(`Skipping migrating '${l.identifier.id}' extension because, the comaptible target '${i}' extension is not found`);continue}try{b.info(`Migrating '${l.identifier.id}' extension to '${i}' extension...`);const d=!I.getDisabledExtensions().some(a=>(0,p.areSameExtensions)(a,l.identifier));await A.uninstall(l),b.info(`Uninstalled the unsupported extension '${l.identifier.id}'`);let n=C.find(a=>(0,p.areSameExtensions)(a.identifier,{id:i}));(!n||!n.isPreReleaseVersion&&d)&&(n=await A.installFromGallery(s,{installPreReleaseVersion:!0,isMachineScoped:l.isMachineScoped,operation:4}),b.info(`Installed the pre-release extension '${n.identifier.id}'`),d||(await I.disableExtension(n.identifier),b.info(`Disabled the pre-release extension '${n.identifier.id}' because the unsupported extension '${l.identifier.id}' is disabled`)),f.storage&&(E.addToMigrationList((0,p.getExtensionId)(l.manifest.publisher,l.manifest.name),(0,p.getExtensionId)(n.manifest.publisher,n.manifest.name)),b.info("Added pre-release extension to the storage migration list"))),b.info(`Migrated '${l.identifier.id}' extension to '${i}' extension.`)}catch(d){b.error(d)}}}catch(S){b.error(S)}}e.migrateUnsupportedExtensions=R}),define(ae[609],le([1,0,11,56,32,21,6,2,72,420,148,223]),function(J,e,t,p,R,A,k,E,I,b,S,C){"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 r=30*1e3;var u;(function(G){G[G.Management=1]="Management",G[G.ExtensionHost=2]="ExtensionHost",G[G.Tunnel=3]="Tunnel"})(u=e.ConnectionType||(e.ConnectionType={}));function i(G){switch(G){case 1:return"Management";case 2:return"ExtensionHost";case 3:return"Tunnel"}}function f(G){const Q=new R.CancellationTokenSource;return setTimeout(()=>Q.cancel(),G),Q.token}function c(G,Q){if(G.isCancellationRequested||Q.isCancellationRequested)return R.CancellationToken.Cancelled;const j=new R.CancellationTokenSource;return G.onCancellationRequested(()=>j.cancel()),Q.onCancellationRequested(()=>j.cancel()),j.token}class l{get didTimeout(){return this._state==="timedout"}constructor(Q){this._state="pending",this._disposables=new E.DisposableStore,this.promise=new Promise((j,K)=>{this._resolvePromise=j,this._rejectPromise=K}),Q.isCancellationRequested?this._timeout():this._disposables.add(Q.onCancellationRequested(()=>this._timeout()))}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 s(G,Q){const j=new l(Q);return j.registerDisposable(G.onControlMessage(K=>{const Y=JSON.parse(K.toString()),ee=W(Y);ee?j.reject(ee):j.resolve(Y)})),j.promise}function d(G,Q,j,K,Y,ee,ie,re){const oe=new l(re);return Q.connect(j,K,Y,ee,ie,(se,te)=>{oe.didTimeout?(se&&G.error(se),te?.dispose()):se||!te?oe.reject(se):oe.resolve(te)}),oe.promise}function n(G,Q){const j=new l(Q);return G.then(K=>{j.didTimeout||j.resolve(K)},K=>{j.didTimeout||j.reject(K)}),j.promise}async function a(G,Q,j,K){const Y=q(G,Q);G.logService.trace(`${Y} 1/6. invoking socketFactory.connect().`);let ee;try{ee=await d(G.logService,G.socketFactory,G.host,G.port,(0,C.getRemoteServerRootPath)(G),`reconnectionToken=${G.reconnectionToken}&reconnection=${G.reconnectionProtocol?"true":"false"}`,`renderer-${i(Q)}-${G.reconnectionToken}`,K)}catch(te){throw G.logService.error(`${Y} socketFactory.connect() failed or timed out. Error:`),G.logService.error(te),te}G.logService.trace(`${Y} 2/6. socketFactory.connect() was successful.`);let ie,re;G.reconnectionProtocol?(G.reconnectionProtocol.beginAcceptReconnection(ee,null),ie=G.reconnectionProtocol,re=!1):(ie=new b.PersistentProtocol(ee,null),re=!0),G.logService.trace(`${Y} 3/6. sending AuthRequest control message.`);const oe=await n(G.signService.createNewMessage((0,I.generateUuid)()),K),se={type:"auth",auth:G.connectionToken||"00000000000000000000",data:oe.data};ie.sendControl(p.VSBuffer.fromString(JSON.stringify(se)));try{const te=await s(ie,c(K,f(1e4)));if(te.type!=="sign"||typeof te.data!="string"){const de=new Error("Unexpected handshake message");throw de.code="VSCODE_CONNECTION_ERROR",de}if(G.logService.trace(`${Y} 4/6. received SignRequest control message.`),!await n(G.signService.validate(oe,te.signedData),K)){const de=new Error("Refused to connect to unsupported server");throw de.code="VSCODE_CONNECTION_ERROR",de}const ne=await n(G.signService.sign(te.data),K),ce={type:"connectionType",commit:G.commit,signedData:ne,desiredConnectionType:Q};return j&&(ce.args=j),G.logService.trace(`${Y} 5/6. sending ConnectionTypeRequest control message.`),ie.sendControl(p.VSBuffer.fromString(JSON.stringify(ce))),{protocol:ie,ownsProtocol:re}}catch(te){throw te&&te.code==="ETIMEDOUT"&&(G.logService.error(`${Y} the handshake timed out. Error:`),G.logService.error(te)),te&&te.code==="VSCODE_CONNECTION_ERROR"&&(G.logService.error(`${Y} received error control message when negotiating connection. Error:`),G.logService.error(te)),re&&H(ie),te}}async function o(G,Q,j,K){const Y=Date.now(),ee=q(G,Q),{protocol:ie,ownsProtocol:re}=await a(G,Q,j,K),oe=new l(K);return oe.registerDisposable(ie.onControlMessage(se=>{const te=JSON.parse(se.toString()),Z=W(te);Z?(G.logService.error(`${ee} received error control message when negotiating connection. Error:`),G.logService.error(Z),re&&H(ie),oe.reject(Z)):(G.reconnectionProtocol?.endAcceptReconnection(),G.logService.trace(`${ee} 6/6. handshake finished, connection is up and running after ${X(Y)}!`),oe.resolve({protocol:ie,firstMessage:te}))})),oe.promise}async function g(G,Q){const{protocol:j}=await o(G,1,void 0,Q);return{protocol:j}}async function h(G,Q,j){const{protocol:K,firstMessage:Y}=await o(G,2,Q,j),ee=Y&&Y.debugPort;return{protocol:K,debugPort:ee}}async function v(G,Q,j){const K=Date.now(),Y=q(G,3),{protocol:ee}=await a(G,3,Q,j);return G.logService.trace(`${Y} 6/6. handshake finished, connection is up and running after ${X(K)}!`),ee}async function m(G,Q,j){const{host:K,port:Y,connectionToken:ee}=await G.addressProvider.getAddress();return{commit:G.commit,quality:G.quality,host:K,port:Y,connectionToken:ee,reconnectionToken:Q,reconnectionProtocol:j,socketFactory:G.socketFactory,signService:G.signService,logService:G.logService}}async function w(G,Q,j){return y(G,async K=>{const{protocol:Y}=await g(K,R.CancellationToken.None);return new z(G,Q,j,K.reconnectionToken,Y)})}e.connectRemoteAgentManagement=w;async function D(G,Q){return y(G,async j=>{const{protocol:K,debugPort:Y}=await h(j,Q,R.CancellationToken.None);return new x(G,Q,j.reconnectionToken,K,Y)})}e.connectRemoteAgentExtensionHost=D;async function y(G,Q){for(let K=1;;K++)try{const Y=(0,I.generateUuid)(),ee=await m(G,Y,null);return await Q(ee)}catch(Y){if(K<5)G.logService.error(`[remote-connection][attempt ${K}] An error occurred in initial connection! Will retry... Error:`),G.logService.error(Y);else throw G.logService.error(`[remote-connection][attempt ${K}] An error occurred in initial connection! It will be treated as a permanent error. Error:`),G.logService.error(Y),V.triggerPermanentFailure(0,0,S.RemoteAuthorityResolverError.isHandled(Y)),Y}}async function T(G,Q,j){const K=await m(G,(0,I.generateUuid)(),null);return await v(K,{host:Q,port:j},R.CancellationToken.None)}e.connectRemoteAgentTunnel=T;function _(G){return(0,t.createCancelablePromise)(Q=>new Promise((j,K)=>{const Y=setTimeout(j,G*1e3);Q.onCancellationRequested(()=>{clearTimeout(Y),j()})}))}var L;(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"})(L=e.PersistentConnectionEventType||(e.PersistentConnectionEventType={}));class M{constructor(Q,j){this.reconnectionToken=Q,this.millisSinceLastIncomingData=j,this.type=0}}e.ConnectionLostEvent=M;class O{constructor(Q,j,K,Y){this.reconnectionToken=Q,this.millisSinceLastIncomingData=j,this.durationSeconds=K,this.cancellableTimer=Y,this.type=1}skipWait(){this.cancellableTimer.cancel()}}e.ReconnectionWaitEvent=O;class N{constructor(Q,j,K){this.reconnectionToken=Q,this.millisSinceLastIncomingData=j,this.attempt=K,this.type=2}}e.ReconnectionRunningEvent=N;class P{constructor(Q,j,K){this.reconnectionToken=Q,this.millisSinceLastIncomingData=j,this.attempt=K,this.type=4}}e.ConnectionGainEvent=P;class B{constructor(Q,j,K,Y){this.reconnectionToken=Q,this.millisSinceLastIncomingData=j,this.attempt=K,this.handled=Y,this.type=3}}e.ReconnectionPermanentFailureEvent=B;class V extends E.Disposable{static triggerPermanentFailure(Q,j,K){this._permanentFailure=!0,this._permanentFailureMillisSinceLastIncomingData=Q,this._permanentFailureAttempt=j,this._permanentFailureHandled=K,this._instances.forEach(Y=>Y._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||V._permanentFailure}constructor(Q,j,K,Y,ee){super(),this._connectionType=Q,this._options=j,this.reconnectionToken=K,this.protocol=Y,this._reconnectionFailureIsFatal=ee,this._onDidStateChange=this._register(new k.Emitter),this.onDidStateChange=this._onDidStateChange.event,this._permanentFailure=!1,this._isReconnecting=!1,this._onDidStateChange.fire(new P(this.reconnectionToken,0,0)),this._register(Y.onSocketClose(ie=>{const re=$(this._connectionType,this.reconnectionToken,!0);ie?ie.type===0?(this._options.logService.info(`${re} received socket close event (hadError: ${ie.hadError}).`),ie.error&&this._options.logService.error(ie.error)):(this._options.logService.info(`${re} received socket close event (wasClean: ${ie.wasClean}, code: ${ie.code}, reason: ${ie.reason}).`),ie.event&&this._options.logService.error(ie.event)):this._options.logService.info(`${re} received socket close event.`),this._beginReconnecting()})),this._register(Y.onSocketTimeout(ie=>{const re=$(this._connectionType,this.reconnectionToken,!0);this._options.logService.info(`${re} received socket timeout event (unacknowledgedMsgCount: ${ie.unacknowledgedMsgCount}, timeSinceOldestUnacknowledgedMsg: ${ie.timeSinceOldestUnacknowledgedMsg}, timeSinceLastReceivedSomeData: ${ie.timeSinceLastReceivedSomeData}).`),this._beginReconnecting()})),V._instances.push(this),this._register((0,E.toDisposable)(()=>{const ie=V._instances.indexOf(this);ie>=0&&V._instances.splice(ie,1)})),this._isPermanentFailure&&this._gotoPermanentFailure(V._permanentFailureMillisSinceLastIncomingData,V._permanentFailureAttempt,V._permanentFailureHandled)}async _beginReconnecting(){if(!this._isReconnecting)try{this._isReconnecting=!0,await this._runReconnectingLoop()}finally{this._isReconnecting=!1}}async _runReconnectingLoop(){if(this._isPermanentFailure)return;const Q=$(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 M(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData()));const j=[0,5,5,10,10,10,10,10,30];let K=-1;do{K++;const Y=K<j.length?j[K]:j[j.length-1];try{if(Y>0){const ie=_(Y);this._onDidStateChange.fire(new O(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),Y,ie)),this._options.logService.info(`${Q} waiting for ${Y} seconds before reconnecting...`);try{await ie}catch{}}if(this._isPermanentFailure){this._options.logService.error(`${Q} permanent failure occurred while running the reconnecting loop.`);break}this._onDidStateChange.fire(new N(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),K+1)),this._options.logService.info(`${Q} resolving connection...`);const ee=await m(this._options,this.reconnectionToken,this.protocol);this._options.logService.info(`${Q} connecting to ${ee.host}:${ee.port}...`),await this._reconnect(ee,f(r)),this._options.logService.info(`${Q} reconnected!`),this._onDidStateChange.fire(new P(this.reconnectionToken,this.protocol.getMillisSinceLastIncomingData(),K+1));break}catch(ee){if(ee.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(ee),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),K+1,!1);break}if(K>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(ee),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),K+1,!1);break}if(S.RemoteAuthorityResolverError.isTemporarilyNotAvailable(ee)){this._options.logService.info(`${Q} A temporarily not available error occurred while trying to reconnect, will try again...`),this._options.logService.trace(ee);continue}if((ee.code==="ETIMEDOUT"||ee.code==="ENETUNREACH"||ee.code==="ECONNREFUSED"||ee.code==="ECONNRESET")&&ee.syscall==="connect"){this._options.logService.info(`${Q} A network error occurred while trying to reconnect, will try again...`),this._options.logService.trace(ee);continue}if((0,A.isCancellationError)(ee)){this._options.logService.info(`${Q} A promise cancelation error occurred while trying to reconnect, will try again...`),this._options.logService.trace(ee);continue}if(ee instanceof S.RemoteAuthorityResolverError){this._options.logService.error(`${Q} A RemoteAuthorityResolverError occurred while trying to reconnect. Will give up now! Error:`),this._options.logService.error(ee),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),K+1,S.RemoteAuthorityResolverError.isHandled(ee));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(ee),this._onReconnectionPermanentFailure(this.protocol.getMillisSinceLastIncomingData(),K+1,!1);break}}while(!this._isPermanentFailure)}_onReconnectionPermanentFailure(Q,j,K){this._reconnectionFailureIsFatal?V.triggerPermanentFailure(Q,j,K):this._gotoPermanentFailure(Q,j,K)}_gotoPermanentFailure(Q,j,K){this._onDidStateChange.fire(new B(this.reconnectionToken,Q,j,K)),H(this.protocol)}_pauseSocketWriting(){this.protocol.pauseSocketWriting()}}e.PersistentConnection=V,V._permanentFailure=!1,V._permanentFailureMillisSinceLastIncomingData=0,V._permanentFailureAttempt=0,V._permanentFailureHandled=!1,V._instances=[];class z extends V{constructor(Q,j,K,Y,ee){super(1,Q,Y,ee,!0),this.client=this._register(new b.Client(ee,{remoteAuthority:j,clientId:K},Q.ipcLogger))}async _reconnect(Q,j){await g(Q,j)}}e.ManagementPersistentConnection=z;class x extends V{constructor(Q,j,K,Y,ee){super(2,Q,K,Y,!1),this._startArguments=j,this.debugPort=ee}async _reconnect(Q,j){await h(Q,this._startArguments,j)}}e.ExtensionHostPersistentConnection=x;function H(G){try{G.acceptDisconnect();const Q=G.getSocket();G.dispose(),Q.dispose()}catch(Q){(0,A.onUnexpectedError)(Q)}}function W(G){if(G&&G.type==="error"){const Q=new Error(`Connection error: ${G.reason}`);return Q.code="VSCODE_CONNECTION_ERROR",Q}return null}function U(G,Q){for(;G.length<Q;)G+=" ";return G}function $(G,Q,j){return`[remote-connection][${U(i(G),13)}][${Q.substr(0,5)}\u2026][${j?"reconnect":"initial"}]`}function q(G,Q){return`${$(Q,G.reconnectionToken,!!G.reconnectionProtocol)}[${G.host}:${G.port}]`}function X(G){return`${Date.now()-G} ms`}}),define(ae[806],le([1,0,5]),function(J,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(ae[2122],le([1,0,21,6,2,22,46,223]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAuthorityResolverService=void 0;class I{constructor(C){this.input=C,this.promise=new Promise((r,u)=>{this._resolve=r,this._reject=u}),this.result=null}resolve(C){this.result=C,this._resolve(this.result)}reject(C){this._reject(C)}}let b=class extends R.Disposable{constructor(C){super(),this._onDidChangeConnectionData=this._register(new p.Emitter),this.onDidChangeConnectionData=this._onDidChangeConnectionData.event,this._resolveAuthorityRequests=new Map,this._connectionTokens=new Map,this._canonicalURIRequests=new Map,this._canonicalURIProvider=null,A.RemoteAuthorities.setServerRootPath((0,E.getRemoteServerRootPath)(C))}resolveAuthority(C){return this._resolveAuthorityRequests.has(C)||this._resolveAuthorityRequests.set(C,new I(C)),this._resolveAuthorityRequests.get(C).promise}async getCanonicalURI(C){const r=C.toString();if(!this._canonicalURIRequests.has(r)){const u=new I(C);this._canonicalURIProvider?.(u.input).then(i=>u.resolve(i),i=>u.reject(i)),this._canonicalURIRequests.set(r,u)}return this._canonicalURIRequests.get(r).promise}getConnectionData(C){if(!this._resolveAuthorityRequests.has(C))return null;const r=this._resolveAuthorityRequests.get(C);if(!r.result)return null;const u=this._connectionTokens.get(C);return{host:r.result.authority.host,port:r.result.authority.port,connectionToken:u}}_clearResolvedAuthority(C){this._resolveAuthorityRequests.has(C)&&(this._resolveAuthorityRequests.get(C).reject(t.canceled()),this._resolveAuthorityRequests.delete(C))}_setResolvedAuthority(C,r){if(this._resolveAuthorityRequests.has(C.authority)){const u=this._resolveAuthorityRequests.get(C.authority);A.RemoteAuthorities.set(C.authority,C.host,C.port),C.connectionToken&&A.RemoteAuthorities.setConnectionToken(C.authority,C.connectionToken),u.resolve({authority:C,options:r}),this._onDidChangeConnectionData.fire()}}_setResolvedAuthorityError(C,r){this._resolveAuthorityRequests.has(C)&&this._resolveAuthorityRequests.get(C).reject(t.ErrorNoTelemetry.fromError(r))}_setAuthorityConnectionToken(C,r){this._connectionTokens.set(C,r),A.RemoteAuthorities.setConnectionToken(C,r),this._onDidChangeConnectionData.fire()}_setCanonicalURIProvider(C){this._canonicalURIProvider=C,this._canonicalURIRequests.forEach(r=>{this._canonicalURIProvider(r.input).then(u=>r.resolve(u),u=>r.reject(u))})}};b=we([F(0,k.IProductService)],b),e.RemoteAuthorityResolverService=b}),define(ae[2123],le([1,0,102,806]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(p.ISharedProcessTunnelService,p.ipcSharedProcessTunnelChannelName)}),define(ae[807],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONFIGURATION_KEY_HOST_NAME=e.CONFIGURATION_KEY_PREFIX=e.TunnelStates=e.IRemoteTunnelService=void 0,e.IRemoteTunnelService=(0,t.createDecorator)("IRemoteTunnelService");var p;(function(R){R.disconnected={type:"disconnected"},R.uninitialized={type:"uninitialized"},R.connected=A=>({type:"connected",info:A}),R.connecting=A=>({type:"connecting",progress:A})})(p=e.TunnelStates||(e.TunnelStates={})),e.CONFIGURATION_KEY_PREFIX="remote.tunnels.access",e.CONFIGURATION_KEY_HOST_NAME=e.CONFIGURATION_KEY_PREFIX+".hostNameOverride"}),define(ae[2124],le([1,0,102,807]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(p.IRemoteTunnelService,"remoteTunnel")}),define(ae[2125],le([1,0,1030,8,25]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RequestService=void 0;let A=class{constructor(E,I){this.configurationService=E,this.logService=I}async request(E,I){this.logService.trace("RequestService#request (browser) - begin",E.url),E.proxyAuthorization||(E.proxyAuthorization=this.configurationService.getValue("http.proxyAuthorization"));try{const b=await(0,t.request)(E,I);return this.logService.trace("RequestService#request (browser) - success",E.url),b}catch(b){throw this.logService.error("RequestService#request (browser) - error",E.url,b),b}}async resolveProxy(E){}};A=we([F(0,p.IConfigurationService),F(1,R.ILogService)],A),e.RequestService=A}),define(ae[172],le([1,0,56,1429,55,5,17]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProxyConfigurationsScope=e.asJson=e.asTextOrError=e.asText=e.isSuccess=e.IRequestService=void 0,e.IRequestService=(0,A.createDecorator)("requestService");function E(f){return f.res.statusCode&&f.res.statusCode>=200&&f.res.statusCode<300||f.res.statusCode===1223}e.isSuccess=E;function I(f){return f.res.statusCode===204}async function b(f){return I(f)?null:(await(0,t.streamToBuffer)(f.stream)).toString()}e.asText=b;async function S(f){if(!E(f))throw new Error("Server returned "+f.res.statusCode);return b(f)}e.asTextOrError=S;async function C(f){if(!E(f))throw new Error("Server returned "+f.res.statusCode);if(I(f))return null;const l=(await(0,t.streamToBuffer)(f.stream)).toString();try{return JSON.parse(l)}catch(s){throw s.message+=`: `+l,s}}e.asJson=C;function r(f){i(f)}e.updateProxyConfigurationsScope=r;let u;function i(f){const c=k.Registry.as(R.Extensions.Configuration),l=u;u={id:"http",order:15,title:(0,p.localize)(0,null),type:"object",scope:f,properties:{"http.proxy":{type:"string",pattern:"^(https?|socks5?)://([^:]*(:[^@]*)?@)?([^:]+|\\[[:0-9a-fA-F]+\\])(:\\d+)?/?$|^$",markdownDescription:(0,p.localize)(1,null),restricted:!0},"http.proxyStrictSSL":{type:"boolean",default:!0,description:(0,p.localize)(2,null),restricted:!0},"http.proxyAuthorization":{type:["null","string"],default:null,markdownDescription:(0,p.localize)(3,null),restricted:!0},"http.proxySupport":{type:"string",enum:["off","on","fallback","override"],enumDescriptions:[(0,p.localize)(4,null),(0,p.localize)(5,null),(0,p.localize)(6,null),(0,p.localize)(7,null)],default:"override",description:(0,p.localize)(8,null),restricted:!0},"http.systemCertificates":{type:"boolean",default:!0,description:(0,p.localize)(9,null),restricted:!0}}},c.updateConfigurations({add:[u],remove:l?[l]:[]})}i(2)}),define(ae[2126],le([1,0,32,22,19,172]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DownloadService=void 0;let k=class{constructor(I,b){this.requestService=I,this.fileService=b}async download(I,b,S=t.CancellationToken.None){if(I.scheme===p.Schemas.file||I.scheme===p.Schemas.vscodeRemote){await this.fileService.copy(I,b);return}const C={type:"GET",url:I.toString(!0)},r=await this.requestService.request(C,S);if(r.res.statusCode===200)await this.fileService.writeFile(b,r.stream);else{const u=await(0,A.asTextOrError)(r);throw new Error(`Expected 200, got back ${r.res.statusCode} instead. ${u}`)}}};k=we([F(0,A.IRequestService),F(1,R.IFileService)],k),e.DownloadService=k}),define(ae[2127],le([1,0,16,32,2,18,784,19,25,46,172]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionTipsService=void 0;let C=class extends R.Disposable{constructor(u,i,f,c){super(),this.fileService=u,this.productService=i,this.requestService=f,this.logService=c,this.allConfigBasedTips=new Map,this.productService.configBasedExtensionTips&&Object.entries(this.productService.configBasedExtensionTips).forEach(([,l])=>this.allConfigBasedTips.set(l.configPath,l))}getConfigBasedTips(u){return this.getValidConfigBasedTips(u)}getAllWorkspacesTips(){return this.fetchWorkspacesTips()}async getImportantExecutableBasedTips(){return[]}async getOtherExecutableBasedTips(){return[]}async getValidConfigBasedTips(u){const i=[];for(const[f,c]of this.allConfigBasedTips)if(!(c.configScheme&&c.configScheme!==u.scheme))try{const l=await this.fileService.readFile((0,A.joinPath)(u,f)),s=new Map;Object.entries(c.recommendations).forEach(([n,a])=>{if((0,t.isNonEmptyArray)(a.remotes))for(const o of a.remotes)s.set(o,{extensionId:n,extensionName:a.name,configName:c.configName,important:!!a.important,isExtensionPack:!!a.isExtensionPack,whenNotInstalled:a.whenNotInstalled});else i.push({extensionId:n,extensionName:a.name,configName:c.configName,important:!!a.important,isExtensionPack:!!a.isExtensionPack,whenNotInstalled:a.whenNotInstalled})});const d=(0,k.getDomainsOfRemotes)(l.value.toString(),[...s.keys()]);for(const n of d){const a=s.get(n);a&&i.push(a)}}catch{}return i}async fetchWorkspacesTips(){if(!this.productService.extensionsGallery?.recommendationsUrl)return[];try{const u=await this.requestService.request({type:"GET",url:this.productService.extensionsGallery?.recommendationsUrl},p.CancellationToken.None);if(u.res.statusCode!==200)return[];const i=await(0,S.asJson)(u);return i?i.workspaceRecommendations||[]:[]}catch(u){return this.logService.error(u),[]}}};C=we([F(0,E.IFileService),F(1,b.IProductService),F(2,S.IRequestService),F(3,I.ILogService)],C),e.ExtensionTipsService=C}),define(ae[2128],le([1,0,108,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ipcSharedProcessWorkerChannelName=e.ISharedProcessWorkerService=e.hash=void 0;function R(A){return(0,t.hash)({moduleId:A.process.moduleId,windowId:A.reply.windowId})}e.hash=R,e.ISharedProcessWorkerService=(0,p.createDecorator)("sharedProcessWorkerService"),e.ipcSharedProcessWorkerChannelName="sharedProcessWorker"}),define(ae[505],le([1,0,5]),function(J,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(ae[2129],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageClient=e.WorkspaceStorageDatabaseClient=e.ProfileStorageDatabaseClient=e.ApplicationStorageDatabaseClient=void 0;class R extends p.Disposable{constructor(C,r,u){super(),this.channel=C,this.profile=r,this.workspace=u}async getItems(){const C={profile:this.profile,workspace:this.workspace},r=await this.channel.call("getItems",C);return new Map(r)}updateItems(C){const r={profile:this.profile,workspace:this.workspace};return C.insert&&(r.insert=Array.from(C.insert.entries())),C.delete&&(r.delete=Array.from(C.delete.values())),this.channel.call("updateItems",r)}}class A extends R{constructor(C,r){super(C,r,void 0),this._onDidChangeItemsExternal=this._register(new t.Emitter),this.onDidChangeItemsExternal=this._onDidChangeItemsExternal.event,this.registerListeners()}registerListeners(){this._register(this.channel.listen("onDidChangeStorage",{profile:this.profile})(C=>this.onDidChangeStorage(C)))}onDidChangeStorage(C){(Array.isArray(C.changed)||Array.isArray(C.deleted))&&this._onDidChangeItemsExternal.fire({changed:C.changed?new Map(C.changed):void 0,deleted:C.deleted?new Set(C.deleted):void 0})}}class k extends A{constructor(C){super(C,void 0)}async close(){this.dispose()}}e.ApplicationStorageDatabaseClient=k;class E extends A{constructor(C,r){super(C,r)}async close(){this.dispose()}}e.ProfileStorageDatabaseClient=E;class I extends R{constructor(C,r){super(C,void 0,r),this.onDidChangeItemsExternal=t.Event.None}async close(){this.dispose()}}e.WorkspaceStorageDatabaseClient=I;class b{constructor(C){this.channel=C}isUsed(C){const r={payload:C,profile:void 0,workspace:void 0};return this.channel.call("isUsed",r)}}e.StorageClient=b}),define(ae[808],le([1,0,14,209,9,72]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyMicrosoftInternalDomain=e.resolveCommonProperties=void 0;function k(b){if(t.platform===2&&/^penguin(\.|$)/i.test(b))return"chromebook"}async function E(b,S,C,r,u,i,f,c,l,s){const d=Object.create(null);d["common.machineId"]=f,d.sessionID=(0,A.generateUuid)()+Date.now(),d.commitHash=u,d.version=i,d["common.platformVersion"]=(S||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),d["common.platform"]=(0,t.PlatformToString)(t.platform),d["common.nodePlatform"]=p.platform,d["common.nodeArch"]=r,d["common.product"]=s||"desktop",c&&(d["common.msftInternal"]=c);let n=0;const a=Date.now();Object.defineProperties(d,{timestamp:{get:()=>new Date,enumerable:!0},"common.timesincesessionstart":{get:()=>Date.now()-a,enumerable:!0},"common.sequence":{get:()=>n++,enumerable:!0}}),t.isLinuxSnap&&(d["common.snap"]="true");const o=k(C);o&&(d["common.platformDetail"]=o);try{const g=await b.readFile(R.URI.file(l));d["common.source"]=g.value.toString().slice(0,30)}catch{}return d}e.resolveCommonProperties=E;function I(b){const S=p.env.USERDNSDOMAIN;if(!S)return!1;const C=S.toLowerCase();return b.some(r=>C===r)}e.verifyMicrosoftInternalDomain=I}),define(ae[2130],le([1,0,16,21,2,52,19]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorEvent=void 0;var E;(function(b){function S(C,r){return C.callstack<r.callstack?-1:C.callstack>r.callstack?1:0}b.compare=S})(E=e.ErrorEvent||(e.ErrorEvent={}));class I{constructor(S,C=I.ERROR_FLUSH_TIMEOUT){this._flushHandle=-1,this._buffer=[],this._disposables=new R.DisposableStore,this._telemetryService=S,this._flushDelay=C;const r=p.errorHandler.addListener(u=>this._onErrorEvent(u));this._disposables.add((0,R.toDisposable)(r)),this.installErrorListeners()}dispose(){clearTimeout(this._flushHandle),this._flushBuffer(),this._disposables.dispose()}installErrorListeners(){}_onErrorEvent(S){if(!S||(S.detail&&S.detail.stack&&(S=S.detail),p.ErrorNoTelemetry.isErrorNoTelemetry(S)||S instanceof k.FileOperationError))return;const C=Array.isArray(S.stack)?S.stack.join(` `):S.stack,r=S.message?S.message:(0,A.safeStringify)(S);!C||this._enqueue({msg:r,callstack:C})}_enqueue(S){const C=(0,t.binarySearch)(this._buffer,S,E.compare);C<0?(S.count=1,this._buffer.splice(~C,0,S)):(this._buffer[C].count||(this._buffer[C].count=0),this._buffer[C].count+=1),this._flushHandle===-1&&(this._flushHandle=setTimeout(()=>{this._flushBuffer(),this._flushHandle=-1},this._flushDelay))}_flushBuffer(){for(const S of this._buffer)this._telemetryService.publicLogError2("UnhandledError",S);this._buffer.length=0}}e.default=I,I.ERROR_FLUSH_TIMEOUT=5*1e3}),define(ae[2131],le([1,0,21,2,14,2130]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class k extends A.default{installErrorListeners(){let I;const b=this;typeof R.globals.onerror=="function"&&(I=R.globals.onerror),R.globals.onerror=function(S,C,r,u,i){b._onUncaughtError(S,C,r,u,i),I?.apply(this,arguments)},this._disposables.add((0,p.toDisposable)(()=>{I&&(R.globals.onerror=I)}))}_onUncaughtError(I,b,S,C,r){const u={callstack:I,msg:I,file:b,line:S,column:C};if(r){if(t.ErrorNoTelemetry.isErrorNoTelemetry(r))return;const{name:i,message:f,stack:c}=r;u.uncaught_error_name=i,f&&(u.uncaught_error_msg=f),c&&(u.callstack=Array.isArray(r.stack)?r.stack=r.stack.join(` `):r.stack)}this._enqueue(u)}}e.default=k}),define(ae[27],le([1,0,5]),function(J,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 p;(function(A){A[A.NONE=0]="NONE",A[A.CRASH=1]="CRASH",A[A.ERROR=2]="ERROR",A[A.USAGE=3]="USAGE"})(p=e.TelemetryLevel||(e.TelemetryLevel={}));var R;(function(A){A.OFF="off",A.CRASH="crash",A.ERROR="error",A.ON="all"})(R=e.TelemetryConfiguration||(e.TelemetryConfiguration={}))}),define(ae[2132],le([1,0,6,88,2,52,146,220,9,1407,31,8,7,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setContext=e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const i="data-keybinding-context";class f{constructor(L,M){this._id=L,this._parent=M,this._value=Object.create(null),this._value._contextId=L}get value(){return{...this._value}}setValue(L,M){return this._value[L]!==M?(this._value[L]=M,!0):!1}removeValue(L){return L in this._value?(delete this._value[L],!0):!1}getValue(L){const M=this._value[L];return typeof M>"u"&&this._parent?this._parent.getValue(L):M}updateParent(L){this._parent=L}collectAllValues(){let L=this._parent?this._parent.collectAllValues():Object.create(null);return L={...L,...this._value},delete L._contextId,L}}e.Context=f;class c extends f{constructor(){super(-1,null)}setValue(L,M){return!1}removeValue(L){return!1}getValue(L){}collectAllValues(){return Object.create(null)}}c.INSTANCE=new c;class l extends f{constructor(L,M,O){super(L,null),this._configurationService=M,this._values=E.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(N=>{if(N.source===7){const P=Array.from(this._values,([B])=>B);this._values.clear(),O.fire(new n(P))}else{const P=[];for(const B of N.affectedKeys){const V=`config.${B}`,z=this._values.findSuperstr(V);z!==void 0&&(P.push(...p.Iterable.map(z,([x])=>x)),this._values.deleteSuperstr(V)),this._values.has(V)&&(P.push(V),this._values.delete(V))}O.fire(new n(P))}})}dispose(){this._listener.dispose()}getValue(L){if(L.indexOf(l._keyPrefix)!==0)return super.getValue(L);if(this._values.has(L))return this._values.get(L);const M=L.substr(l._keyPrefix.length),O=this._configurationService.getValue(M);let N;switch(typeof O){case"number":case"boolean":case"string":N=O;break;default:Array.isArray(O)?N=JSON.stringify(O):N=O}return this._values.set(L,N),N}setValue(L,M){return super.setValue(L,M)}removeValue(L){return super.removeValue(L)}collectAllValues(){const L=Object.create(null);return this._values.forEach((M,O)=>L[O]=M),{...L,...super.collectAllValues()}}}l._keyPrefix="config.";class s{constructor(L,M,O){this._service=L,this._key=M,this._defaultValue=O,this.reset()}set(L){this._service.setContext(this._key,L)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class d{constructor(L){this.key=L}affectsSome(L){return L.has(this.key)}allKeysContainedIn(L){return this.affectsSome(L)}}class n{constructor(L){this.keys=L}affectsSome(L){for(const M of this.keys)if(L.has(M))return!0;return!1}allKeysContainedIn(L){return this.keys.every(M=>L.has(M))}}class a{constructor(L){this.events=L}affectsSome(L){for(const M of this.events)if(M.affectsSome(L))return!0;return!1}allKeysContainedIn(L){return this.events.every(M=>M.allKeysContainedIn(L))}}function o(_,L){return _.allKeysContainedIn(new Set(Object.keys(L)))}class g{constructor(L){this._onDidChangeContext=new t.PauseableEmitter({merge:M=>new a(M)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=L}get contextId(){return this._myContextId}createKey(L,M){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new s(this,L,M)}bufferChangeEvents(L){this._onDidChangeContext.pause();try{L()}finally{this._onDidChangeContext.resume()}}createScoped(L){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new v(this,L)}createOverlay(L=p.Iterable.empty()){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new w(this,L)}contextMatchesRules(L){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const M=this.getContextValuesContainer(this._myContextId);return L?L.evaluate(M):!0}getContextKeyValue(L){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(L)}setContext(L,M){if(this._isDisposed)return;const O=this.getContextValuesContainer(this._myContextId);!O||O.setValue(L,M)&&this._onDidChangeContext.fire(new d(L))}removeContext(L){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(L)&&this._onDidChangeContext.fire(new d(L))}getContext(L){return this._isDisposed?c.INSTANCE:this.getContextValuesContainer(D(L))}}e.AbstractContextKeyService=g;let h=class extends g{constructor(L){super(0),this._contexts=new Map,this._toDispose=new R.DisposableStore,this._lastContextId=0;const M=new l(this._myContextId,L,this._onDidChangeContext);this._contexts.set(this._myContextId,M),this._toDispose.add(M)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(L){return this._isDisposed?c.INSTANCE:this._contexts.get(L)||c.INSTANCE}createChildContext(L=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const M=++this._lastContextId;return this._contexts.set(M,new f(M,this.getContextValuesContainer(L))),M}disposeContext(L){this._isDisposed||this._contexts.delete(L)}updateParent(L){throw new Error("Cannot update parent of root ContextKeyService")}};h=we([F(0,C.IConfigurationService)],h),e.ContextKeyService=h;class v extends g{constructor(L,M){if(super(L.createChildContext()),this._parentChangeListener=new R.MutableDisposable,this._parent=L,this._updateParentChangeListener(),this._domNode=M,this._domNode.hasAttribute(i)){let O="";this._domNode.classList&&(O=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${O?": "+O:""}`)}this._domNode.setAttribute(i,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(L=>{const O=this._parent.getContextValuesContainer(this._myContextId).value;o(L,O)||this._onDidChangeContext.fire(L)})}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(i),this._isDisposed=!0)}getContextValuesContainer(L){return this._isDisposed?c.INSTANCE:this._parent.getContextValuesContainer(L)}createChildContext(L=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(L)}disposeContext(L){this._isDisposed||this._parent.disposeContext(L)}updateParent(L){const M=this._parent.getContextValuesContainer(this._myContextId),O=M.collectAllValues();this._parent=L,this._updateParentChangeListener();const N=this._parent.getContextValuesContainer(this._parent.contextId);M.updateParent(N);const P=M.collectAllValues(),B={...(0,A.distinct)(O,P),...(0,A.distinct)(P,O)},V=Object.keys(B);this._onDidChangeContext.fire(new n(V))}}class m{constructor(L,M){this.parent=L,this.overlay=M}getValue(L){return this.overlay.has(L)?this.overlay.get(L):this.parent.getValue(L)}}class w{get contextId(){return this.parent.contextId}get onDidChangeContext(){return this.parent.onDidChangeContext}constructor(L,M){this.parent=L,this.overlay=new Map(M)}bufferChangeEvents(L){this.parent.bufferChangeEvents(L)}createKey(){throw new Error("Not supported.")}getContext(L){return new m(this.parent.getContext(L),this.overlay)}getContextValuesContainer(L){const M=this.parent.getContextValuesContainer(L);return new m(M,this.overlay)}contextMatchesRules(L){const M=this.getContextValuesContainer(this.contextId);return L?L.evaluate(M):!0}getContextKeyValue(L){return this.overlay.has(L)?this.overlay.get(L):this.parent.getContextKeyValue(L)}createScoped(){throw new Error("Not supported.")}createOverlay(L=p.Iterable.empty()){return new w(this,L)}updateParent(){throw new Error("Not supported.")}dispose(){}}function D(_){for(;_;){if(_.hasAttribute(i)){const L=_.getAttribute(i);return L?parseInt(L,10):NaN}_=_.parentElement}return 0}function y(_,L,M){const O=_.get(r.IContextKeyService),N=_.get(u.ITelemetryService),P=new k.StopWatch(!0);O.createKey(String(L),T(M));const B=P.elapsed();N.publicLog2("command.setContext",{contextKey:String(L),duration:B})}e.setContext=y;function T(_){return(0,A.cloneAndChange)(_,L=>{if(typeof L=="object"&&L.$mid===1)return I.URI.revive(L).toString();if(L instanceof I.URI)return L.toString()})}S.CommandsRegistry.registerCommand(r.SET_CONTEXT_COMMAND_ID,y),S.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...r.RawContextKey.all()].sort((_,L)=>_.key.localeCompare(L.key))},description:{description:(0,b.localize)(0,null),args:[]}}),S.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const _=[],L=new Set;for(const M of r.RawContextKey.all())L.has(M.key)||(L.add(M.key),_.push(M));_.sort((M,O)=>M.key.localeCompare(O.key)),console.log(JSON.stringify(_,void 0,2))})}),define(ae[809],le([1,0,581,419,35,5,25,2112,27]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IProfileAnalysisWorkerService=e.ProfilingOutput=void 0;var b;(function(C){C[C.Failure=0]="Failure",C[C.Irrelevant=1]="Irrelevant",C[C.Interesting=2]="Interesting"})(b=e.ProfilingOutput||(e.ProfilingOutput={})),e.IProfileAnalysisWorkerService=(0,A.createDecorator)("IProfileAnalysisWorkerService");let S=class{constructor(r,u){this._telemetryService=r,this._logService=u,this._workerFactory=new t.DefaultWorkerFactory("CpuProfileAnalysis")}async _withWorker(r){const u=new p.SimpleWorkerClient(this._workerFactory,"vs/platform/profiling/electron-sandbox/profileAnalysisWorker",{});try{return await r(await u.getProxyObject())}finally{u.dispose()}}async analyseBottomUp(r,u,i){return this._withWorker(async f=>{const c=await f.analyseBottomUp(r);if(c.kind===2)for(const l of c.samples)(0,E.reportSample)({sample:l,perfBaseline:i,source:u(l.url)},this._telemetryService,this._logService);return c.kind})}async analyseByLocation(r,u){return this._withWorker(async i=>await i.analyseByUrlCategory(r,u))}};S=we([F(0,I.ITelemetryService),F(1,k.ILogService)],S),(0,R.registerSingleton)(e.IProfileAnalysisWorkerService,S,1)}),define(ae[2133],le([1,0]),function(J,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:E,data:I}){return this.appenders.forEach(b=>b.log(E,I)),Promise.resolve(null)}}e.TelemetryAppenderChannel=t;class p{constructor(A){this.channel=A}log(A,k){return this.channel.call("log",{eventName:A,data:k}).then(void 0,E=>`Failed to log telemetry: ${console.warn(E)}`),Promise.resolve(null)}flush(){return Promise.resolve()}}e.TelemetryAppenderClient=p}),define(ae[213],le([1,0,52,744,13,8,808,27]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cleanData=e.getPiiPathsFromEnvironment=e.isInternalTelemetry=e.cleanRemoteAuthority=e.validateTelemetryData=e.getTelemetryLevel=e.supportsTelemetry=e.configurationTelemetry=e.NullAppender=e.NullEndpointTelemetryService=e.NullTelemetryService=e.NullTelemetryServiceShape=void 0;class I{constructor(){this.sendErrorTelemetry=!1,this.telemetryLevel=(0,p.staticObservableValue)(0)}publicLog(v,m){return Promise.resolve(void 0)}publicLog2(v,m){return this.publicLog(v,m)}publicLogError(v,m){return Promise.resolve(void 0)}publicLogError2(v,m){return this.publicLogError(v,m)}setExperimentProperty(){}getTelemetryInfo(){return Promise.resolve({instanceId:"someValue.instanceId",sessionId:"someValue.sessionId",machineId:"someValue.machineId",firstSessionDate:"someValue.firstSessionDate"})}}e.NullTelemetryServiceShape=I,e.NullTelemetryService=new I;class b{async publicLog(v,m,w){}async publicLogError(v,m,w){}}e.NullEndpointTelemetryService=b,e.NullAppender={log:()=>null,flush:()=>Promise.resolve(null)};function S(h,v){return v.onDidChangeConfiguration(m=>{m.source!==7&&h.publicLog2("updateConfiguration",{configurationSource:(0,A.ConfigurationTargetToString)(m.source),configurationKeys:l(m.sourceConfig)})})}e.configurationTelemetry=S;function C(h,v){return!(v.disableTelemetry||!h.enableTelemetry||v.extensionTestsLocationURI)}e.supportsTelemetry=C;function r(h){const v=h.getValue(E.TELEMETRY_SETTING_ID),m=h.getValue("telemetry.enableCrashReporter");if(h.getValue(E.TELEMETRY_OLD_SETTING_ID)===!1||m===!1)return 0;switch(v??"all"){case"all":return 3;case"error":return 2;case"crash":return 1;case"off":return 0}}e.getTelemetryLevel=r;function u(h){const v={},m={},w={};c(h,w);for(let D in w){D=D.length>150?D.substr(D.length-149):D;const y=w[D];typeof y=="number"?m[D]=y:typeof y=="boolean"?m[D]=y?1:0:typeof y=="string"?(y.length>8192&&console.warn(`Telemetry property: ${D} has been trimmed to 8192, the original length is ${y.length}`),v[D]=y.substring(0,8191)):typeof y<"u"&&y!==null&&(v[D]=y)}return{properties:v,measurements:m}}e.validateTelemetryData=u;const i=["ssh-remote","dev-container","attached-container","wsl","tunneling","codespaces"];function f(h){if(!h)return"none";for(const v of i)if(h.startsWith(`${v}+`))return v;return"other"}e.cleanRemoteAuthority=f;function c(h,v,m=0,w){if(!!h)for(const D of Object.getOwnPropertyNames(h)){const y=h[D],T=w?w+D:D;Array.isArray(y)?v[T]=(0,t.safeStringify)(y):y instanceof Date?v[T]=y.toISOString():(0,R.isObject)(y)?m<2?c(y,v,m+1,T+"."):v[T]=(0,t.safeStringify)(y):v[T]=y}}function l(h){if(!h)return[];const v=[];return s(v,"",h),v}function s(h,v,m){m&&typeof m=="object"&&!Array.isArray(m)?Object.keys(m).forEach(w=>s(h,v?`${v}.${w}`:w,m[w])):h.push(v)}function d(h,v){const m=h.msftInternalDomains||[],w=v.getValue("telemetry.internalTesting");return(0,k.verifyMicrosoftInternalDomain)(m)||w}e.isInternalTelemetry=d;function n(h){return[h.appRoot,h.extensionsPath,h.userHome.fsPath,h.tmpDir.fsPath,h.userDataPath]}e.getPiiPathsFromEnvironment=n;function a(h,v){if(!h||!h.includes("/")&&!h.includes("\\"))return h;let m=h;const w=[];for(const _ of v)for(;;){const L=_.exec(h);if(!L)break;w.push([L.index,_.lastIndex])}const D=/^[\\\/]?(node_modules|node_modules\.asar)[\\\/]/,y=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-\._]+(\\\\|\\|\/))+[\w-\._]*/g;let T=0;for(m="";;){const _=y.exec(h);if(!_)break;const L=w.some(([M,O])=>_.index<O&&M<y.lastIndex);!D.test(_[0])&&!L&&(m+=h.substring(T,_.index)+"<REDACTED: user-file-path>",T=y.lastIndex)}return T<h.length&&(m+=h.substr(T)),m}function o(h){if(!h)return h;const v=h.toLowerCase(),m=[{label:"Google API Key",regex:/AIza[A-Za-z0-9_\\\-]{35}/},{label:"Slack Token",regex:/xox[pbar]\-[A-Za-z0-9]/},{label:"Generic Secret",regex:/(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/},{label:"Email",regex:/@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/}];for(const w of m)if(w.regex.test(v))return`<REDACTED: ${w.label}>`;return h}function g(h,v){return(0,t.cloneAndChange)(h,m=>{if(typeof m=="string"){let w=m;w=a(w,v);for(const D of v)w=w.replace(D,"");return w=o(w),w}})}e.cleanData=g}),define(ae[2134],le([1,0,213,2077]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AssignmentService=e.BaseAssignmentService=void 0;class R{constructor(){}setSharedProperty(I,b){}postEvent(I,b){}}class A{get experimentsEnabled(){return!0}constructor(I,b,S,C,r){this.getMachineId=I,this.configurationService=b,this.productService=S,this.telemetry=C,this.keyValueStorage=r,this.networkInitialized=!1,S.tasConfig&&this.experimentsEnabled&&(0,t.getTelemetryLevel)(this.configurationService)===3&&(this.tasClient=this.setupTASClient());const u=this.configurationService.getValue("experiments.overrideDelay"),i=typeof u=="number"?u:0;this.overrideInitDelay=new Promise(f=>setTimeout(f,i))}async getTreatment(I){await this.overrideInitDelay;const b=this.configurationService.getValue("experiments.override."+I);if(b!==void 0)return b;if(!this.tasClient||!this.experimentsEnabled)return;let S;const C=await this.tasClient;return this.networkInitialized?S=C.getTreatmentVariable("vscode",I):S=await C.getTreatmentVariableAsync("vscode",I,!0),S=C.getTreatmentVariable("vscode",I),S}async setupTASClient(){const I=this.productService.quality==="stable"?p.TargetPopulation.Public:p.TargetPopulation.Insiders,b=await this.getMachineId(),S=new p.AssignmentFilterProvider(this.productService.version,this.productService.nameLong,b,I),C=this.productService.tasConfig,r=new(await new Promise((u,i)=>{J(["tas-client-umd"],u,i)})).ExperimentationService({filterProviders:[S],telemetry:this.telemetry,storageKey:p.ASSIGNMENT_STORAGE_KEY,keyValueStorage:this.keyValueStorage,featuresTelemetryPropertyName:C.featuresTelemetryPropertyName,assignmentContextTelemetryPropertyName:C.assignmentContextTelemetryPropertyName,telemetryEventName:C.telemetryEventName,endpoint:C.endpoint,refetchInterval:p.ASSIGNMENT_REFETCH_INTERVAL});return await r.initializePromise,r.initialFetch.then(()=>this.networkInitialized=!0),r}}e.BaseAssignmentService=A;class k extends A{constructor(I,b,S){super(()=>Promise.resolve(I),b,S,new R)}}e.AssignmentService=k}),define(ae[308],le([1,0,14,28,9,5,371,213,22,223]),function(J,e,t,p,R,A,k,E,I,b){"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 S{constructor(r,u,i,f,c){this._fileService=r,this._storageService=u,this._productService=i,this._environmentService=f,this._configurationService=c,this._webExtensionResourceEndPoint=`${(0,b.getRemoteServerRootPath)(i)}/${e.WEB_EXTENSION_RESOURCE_END_POINT}/`,i.extensionsGallery&&(this._extensionGalleryResourceUrlTemplate=i.extensionsGallery.resourceUrlTemplate,this._extensionGalleryAuthority=this._extensionGalleryResourceUrlTemplate?this._getExtensionGalleryAuthority(R.URI.parse(this._extensionGalleryResourceUrlTemplate)):void 0)}get supportsExtensionGalleryResources(){return this._extensionGalleryResourceUrlTemplate!==void 0}getExtensionGalleryResourceURL(r,u){if(this._extensionGalleryResourceUrlTemplate){const i=R.URI.parse((0,p.format2)(this._extensionGalleryResourceUrlTemplate,{publisher:r.publisher,name:r.name,version:r.version,path:"extension"}));return this._isWebExtensionResourceEndPoint(i)?i.with({scheme:I.RemoteAuthorities.getPreferredWebSchema()}):i}}isExtensionGalleryResource(r){return this._extensionGalleryAuthority&&this._extensionGalleryAuthority===this._getExtensionGalleryAuthority(r)}async getExtensionGalleryRequestHeaders(){const r={"X-Client-Name":`${this._productService.applicationName}${t.isWeb?"-web":""}`,"X-Client-Version":this._productService.version};return(0,E.supportsTelemetry)(this._productService,this._environmentService)&&(0,E.getTelemetryLevel)(this._configurationService)===3&&(r["X-Machine-Id"]=await this._getServiceMachineId()),this._productService.commit&&(r["X-Client-Commit"]=this._productService.commit),r}_getServiceMachineId(){return this._serviceMachineIdPromise||(this._serviceMachineIdPromise=(0,k.getServiceMachineId)(this._environmentService,this._fileService,this._storageService)),this._serviceMachineIdPromise}_getExtensionGalleryAuthority(r){if(this._isWebExtensionResourceEndPoint(r))return r.authority;const u=r.authority.indexOf(".");return u!==-1?r.authority.substring(u+1):void 0}_isWebExtensionResourceEndPoint(r){return r.path.startsWith(this._webExtensionResourceEndPoint)}}e.AbstractExtensionResourceLoaderService=S}),define(ae[2135],le([1,0,371,213]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveMarketplaceHeaders=void 0;async function R(A,k,E,I,b,S,C){const r={"X-Market-Client-Id":`VSCode ${A}`,"User-Agent":`VSCode ${A} (${k.nameShort})`};if((0,p.supportsTelemetry)(k,E)&&(0,p.getTelemetryLevel)(I)===3){const u=await(0,t.getServiceMachineId)(E,b,S),{sessionId:i}=await C.getTelemetryInfo();r["X-Market-User-Id"]=u,r["VSCode-SessionId"]=i}return r}e.resolveMarketplaceHeaders=R}),define(ae[2136],le([1,0,2,52,744,14,28,1430,8,55,307,46,17,27,213]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let f=class{constructor(s,d,n){this._configurationService=d,this._productService=n,this._experimentProperties={},this.telemetryLevel=new R.MutableObservableValue(3),this._disposables=new t.DisposableStore,this._cleanupPatterns=[],this._appenders=s.appenders,this._commonProperties=s.commonProperties||Promise.resolve({}),this._piiPaths=s.piiPaths||[],this._sendErrorTelemetry=!!s.sendErrorTelemetry,this._cleanupPatterns=[/(vscode-)?file:\/\/\/.*?\/resources\/app\//gi];for(const a of this._piiPaths)this._cleanupPatterns.push(new RegExp((0,k.escapeRegExpCharacters)(a),"gi"));this._updateTelemetryLevel(),this._configurationService.onDidChangeConfiguration(this._updateTelemetryLevel,this,this._disposables)}setExperimentProperty(s,d){this._experimentProperties[s]=d}_updateTelemetryLevel(){let s=(0,i.getTelemetryLevel)(this._configurationService);const d=this._productService.enabledTelemetryLevels;if(d){this._sendErrorTelemetry=this.sendErrorTelemetry?d.error:!1;const n=d.usage?3:d.error?2:0;s=Math.min(s,n)}this.telemetryLevel.value=s}get sendErrorTelemetry(){return this._sendErrorTelemetry}async getTelemetryInfo(){const s=await this._commonProperties,d=s.sessionID,n=s["common.machineId"],a=s["common.firstSessionDate"],o=s["common.msftInternal"];return{sessionId:d,machineId:n,firstSessionDate:a,msftInternal:o}}dispose(){this._disposables.dispose()}_log(s,d,n,a){return this.telemetryLevel.value<d?Promise.resolve(void 0):this._commonProperties.then(o=>{n=(0,p.mixin)(n,this._experimentProperties),n=(0,i.cleanData)(n,this._cleanupPatterns),n=(0,p.mixin)(n,o),this._appenders.forEach(g=>g.log(s,n))},o=>{console.error(o)})}publicLog(s,d,n){return this._log(s,3,d,n)}publicLog2(s,d,n){return this.publicLog(s,d,n)}publicLogError(s,d){return this._sendErrorTelemetry?this._log(s,2,d,!0):Promise.resolve(void 0)}publicLogError2(s,d){return this.publicLogError(s,d)}};f.IDLE_START_EVENT_NAME="UserIdleStart",f.IDLE_STOP_EVENT_NAME="UserIdleStop",f=we([F(1,I.IConfigurationService),F(2,C.IProductService)],f),e.TelemetryService=f;function c(){const l=(0,E.localize)(0,null,S.default.nameLong),s=S.default.privacyStatementUrl?(0,E.localize)(2,null,"https://aka.ms/vscode-telemetry",S.default.privacyStatementUrl):(0,E.localize)(1,null,"https://aka.ms/vscode-telemetry"),d=A.isWeb?"":(0,E.localize)(3,null),n=(0,E.localize)(4,null),a=(0,E.localize)(5,null),o=(0,E.localize)(6,null),g=(0,E.localize)(7,null),h=` | | ${n} | ${a} | ${o} | |:------|:---------------------:|:---------------:|:--------------:| | all | \u2713 | \u2713 | \u2713 | | error | \u2713 | \u2713 | - | | crash | \u2713 | - | - | | off | - | - | - | `,v=(0,E.localize)(8,null);return` ${l} ${s} ${d} ${g} ${h} ${v} `}r.Registry.as(b.Extensions.Configuration).registerConfiguration({id:u.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,E.localize)(9,null),properties:{[u.TELEMETRY_SETTING_ID]:{type:"string",enum:["all","error","crash","off"],enumDescriptions:[(0,E.localize)(10,null),(0,E.localize)(11,null),(0,E.localize)(12,null),(0,E.localize)(13,null)],markdownDescription:c(),default:"all",restricted:!0,scope:1,tags:["usesOnlineServices","telemetry"]}}}),r.Registry.as(b.Extensions.Configuration).registerConfiguration({id:u.TELEMETRY_SECTION_ID,order:110,type:"object",title:(0,E.localize)(14,null),properties:{[u.TELEMETRY_OLD_SETTING_ID]:{type:"boolean",markdownDescription:S.default.privacyStatementUrl?(0,E.localize)(16,null,S.default.nameLong,S.default.privacyStatementUrl):(0,E.localize)(15,null,S.default.nameLong),default:!0,restricted:!0,markdownDeprecationMessage:(0,E.localize)(17,null,`\`#${u.TELEMETRY_SETTING_ID}#\``),scope:1,tags:["usesOnlineServices","telemetry"]}}})}),define(ae[2137],le([1,0,102,27]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSharedProcessRemoteService)(p.ICustomEndpointTelemetryService,"customEndpointTelemetry")}),define(ae[2138],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BufferMarkCapability=void 0;class p{constructor(A){this._terminal=A,this.type=4,this._idToMarkerMap=new Map,this._anonymousMarkers=[],this._onMarkAdded=new t.Emitter,this.onMarkAdded=this._onMarkAdded.event}*markers(){for(const A of this._idToMarkerMap.values())yield A;for(const A of this._anonymousMarkers)yield A}addMark(A){const k=A?.marker||this._terminal.registerMarker(),E=A?.id;!k||(E?(this._idToMarkerMap.set(E,k),k.onDispose(()=>this._idToMarkerMap.delete(E))):(this._anonymousMarkers.push(k),k.onDispose(()=>this._anonymousMarkers.filter(I=>I!==k))),this._onMarkAdded.fire({marker:k,id:E,hidden:A?.hidden,hoverMessage:A?.hoverMessage}))}getMark(A){return this._idToMarkerMap.get(A)}}e.BufferMarkCapability=p}),define(ae[2139],le([1,0,11,112,6,25]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOutputMatchForCommand=e.CommandDetectionCapability=void 0;let k=class{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}get _isInputting(){return!!(this._currentCommand.commandStartMarker&&!this._currentCommand.commandExecutedMarker)}get hasInput(){if(!(!this._isInputting||!this._currentCommand?.commandStartMarker)){if(this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY===this._currentCommand.commandStartMarker?.line){const r=this._terminal.buffer.active.getLine(this._terminal.buffer.active.cursorY)?.translateToString(!0,this._currentCommand.commandStartX);return r===void 0?void 0:r.length>0}return!0}}constructor(r,u){this._terminal=r,this._logService=u,this.type=2,this._commands=[],this._currentCommand={},this._isWindowsPty=!1,this._commandMarkers=[],this.__isCommandStorageDisabled=!1,this._onCommandStarted=new R.Emitter,this.onCommandStarted=this._onCommandStarted.event,this._onBeforeCommandFinished=new R.Emitter,this.onBeforeCommandFinished=this._onBeforeCommandFinished.event,this._onCommandFinished=new R.Emitter,this.onCommandFinished=this._onCommandFinished.event,this._onCommandExecuted=new R.Emitter,this.onCommandExecuted=this._onCommandExecuted.event,this._onCommandInvalidated=new R.Emitter,this.onCommandInvalidated=this._onCommandInvalidated.event,this._onCurrentCommandInvalidated=new R.Emitter,this.onCurrentCommandInvalidated=this._onCurrentCommandInvalidated.event,this._dimensions={cols:this._terminal.cols,rows:this._terminal.rows},this._terminal.onResize(i=>this._handleResize(i)),this._terminal.onCursorMove(()=>this._handleCursorMove()),this._setupClearListeners()}_handleResize(r){this._isWindowsPty&&this._preHandleResizeWindows(r),this._dimensions.cols=r.cols,this._dimensions.rows=r.rows}_handleCursorMove(){this._terminal.buffer.active===this._terminal.buffer.normal&&this._currentCommand.commandStartMarker&&this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY<this._currentCommand.commandStartMarker.line&&(this._clearCommandsInViewport(),this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire({reason:"windows"}))}_setupClearListeners(){this.onBeforeCommandFinished(r=>{this._isWindowsPty&&(r.command.trim().toLowerCase()==="clear"||r.command.trim().toLowerCase()==="cls")&&(this._clearCommandsInViewport(),this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire({reason:"windows"}))}),this._terminal.parser.registerCsiHandler({final:"J"},r=>(this._isWindowsPty||r.length>=1&&(r[0]===2||r[0]===3)&&this._clearCommandsInViewport(),!1))}_preHandleResizeWindows(r){const u=this._terminal.buffer.active.baseY,i=r.rows-this._dimensions.rows;i>0&&this._waitForCursorMove().then(()=>{const f=Math.min(i,u);for(let c=this.commands.length-1;c>=0;c--){const l=this.commands[c];if(!l.marker||l.marker.line<u||l.commandStartLineContent===void 0)break;const s=this._terminal.buffer.active.getLine(l.marker.line);if(!s||s.translateToString(!0)===l.commandStartLineContent)continue;const d=l.marker.line-f;this._terminal.buffer.active.getLine(d)?.translateToString(!0)===l.commandStartLineContent&&this._terminal._core._bufferService.buffer.lines.onDeleteEmitter.fire({index:this._terminal.buffer.active.baseY,amount:f})}})}_clearCommandsInViewport(){let r=0;for(let u=this._commands.length-1;u>=0;u--){const i=this._commands[u].marker?.line;if(i&&i<this._terminal.buffer.active.baseY)break;r++}r>0&&this._onCommandInvalidated.fire(this._commands.splice(this._commands.length-r,r))}_waitForCursorMove(){const r=this._terminal.buffer.active.cursorX,u=this._terminal.buffer.active.cursorY;let i=0;return new Promise((f,c)=>{const l=setInterval(()=>{if(r!==this._terminal.buffer.active.cursorX||u!==this._terminal.buffer.active.cursorY){f(),clearInterval(l);return}i+=10,i>1e3&&(clearInterval(l),f())},10)})}setCwd(r){this._cwd=r}setIsWindowsPty(r){this._isWindowsPty=r}setIsCommandStorageDisabled(){this.__isCommandStorageDisabled=!0}getCwdForLine(r){return this._currentCommand.promptStartMarker&&r>=this._currentCommand.promptStartMarker?.line?this._cwd:[...this._commands].reverse().find(i=>i.marker.line<=r-1)?.cwd}handlePromptStart(r){this._currentCommand.promptStartMarker=r?.marker||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(r){if(this._handleCommandStartOptions=r,this._currentCommand.commandStartMarker=r?.marker||this._currentCommand.commandStartMarker,this._currentCommand.commandStartMarker?.line===this._terminal.buffer.active.cursorY){this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._logService.debug("CommandDetectionCapability#handleCommandStart",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line);return}if(this._isWindowsPty){this._handleCommandStartWindows();return}this._currentCommand.commandStartX=this._terminal.buffer.active.cursorX,this._currentCommand.commandStartMarker=r?.marker||this._terminal.registerMarker(0),this._currentCommand.commandExecutedMarker?.dispose(),this._currentCommand.commandExecutedMarker=void 0,this._currentCommand.commandExecutedX=void 0;for(const u of this._commandMarkers)u.dispose();this._commandMarkers.length=0,this._onCommandStarted.fire({marker:r?.marker||this._currentCommand.commandStartMarker,markProperties:r?.markProperties}),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 r=this._terminal.registerMarker(0);r&&this._commandMarkers.push(r)}})),this._currentCommand.commandStartMarker=this._terminal.registerMarker(0),this._currentCommand.commandStartMarker){const r=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);r&&(this._currentCommand.commandStartLineContent=r.translateToString(!0))}this._onCommandStarted.fire({marker:this._currentCommand.commandStartMarker}),this._logService.debug("CommandDetectionCapability#_handleCommandStartWindows",this._currentCommand.commandStartX,this._currentCommand.commandStartMarker?.line)})}handleGenericCommand(r){r?.markProperties?.disableCommandStorage&&this.setIsCommandStorageDisabled(),this.handlePromptStart(r),this.handleCommandStart(r),this.handleCommandExecuted(r),this.handleCommandFinished(void 0,r)}handleCommandExecuted(r){if(this._isWindowsPty){this._handleCommandExecutedWindows();return}if(this._currentCommand.commandExecutedMarker=r?.marker||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.__isCommandStorageDisabled?"":this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line)?.translateToString(!0,this._currentCommand.commandStartX,this._currentCommand.commandRightPromptStartX).trim();let u=this._currentCommand.commandStartMarker.line+1;const i=this._currentCommand.commandExecutedMarker.line;for(;u<i;u++){const f=this._terminal.buffer.active.getLine(u);if(f){const c=this._currentCommand.continuations?.find(s=>s.marker.line===u);c&&(this._currentCommand.command+=` `);const l=c?.end??0;this._currentCommand.command+=f.translateToString(!0,l)}}u===i&&(this._currentCommand.command+=this._terminal.buffer.active.getLine(i)?.translateToString(!0,void 0,this._currentCommand.commandExecutedX)||""),this._onCommandExecuted.fire()}_handleCommandExecutedWindows(){this._onCursorMoveListener?.dispose(),this._onCursorMoveListener=void 0,this._evaluateCommandMarkersWindows(),this._currentCommand.commandExecutedX=this._terminal.buffer.active.cursorX,this._onCommandExecuted.fire(),this._logService.debug("CommandDetectionCapability#handleCommandExecuted",this._currentCommand.commandExecutedX,this._currentCommand.commandExecutedMarker?.line)}invalidateCurrentCommand(r){this._currentCommand.isInvalid=!0,this._onCurrentCommandInvalidated.fire(r)}handleCommandFinished(r,u){this._isWindowsPty&&this._preHandleCommandFinishedWindows(),this._currentCommand.commandFinishedMarker=u?.marker||this._terminal.registerMarker(0);let i=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=r,this._exitCode===void 0){const f=this.commands.length>0?this.commands[this.commands.length-1]:void 0;i&&i.length>0&&f?.command===i&&(this._exitCode=f.exitCode)}if(!(this._currentCommand.commandStartMarker===void 0||!this._terminal.buffer.active)){if(this._exitCode===void 0&&i===void 0&&(i=""),i!==void 0&&!i.startsWith("\\")||this._handleCommandStartOptions?.ignoreCommandLine){const f=this._terminal.buffer.active,c=Date.now(),l=this._currentCommand.commandExecutedMarker,s=this._currentCommand.commandFinishedMarker,d={command:this._handleCommandStartOptions?.ignoreCommandLine?"":i||"",marker:this._currentCommand.commandStartMarker,endMarker:s,executedMarker:l,timestamp:c,cwd:this._cwd,exitCode:this._exitCode,commandStartLineContent:this._currentCommand.commandStartLineContent,hasOutput:()=>!l?.isDisposed&&!s?.isDisposed&&!!(l&&s&&l?.line<s.line),getOutput:()=>E(l,s,f),getOutputMatch:n=>I(l,s,f,this._terminal.cols,n),markProperties:u?.markProperties};this._commands.push(d),this._logService.debug("CommandDetectionCapability#onCommandFinished",d),this._onBeforeCommandFinished.fire(d),this._currentCommand.isInvalid||this._onCommandFinished.fire(d)}this._currentCommand.previousCommandMarker=this._currentCommand.commandStartMarker,this._currentCommand={},this._handleCommandStartOptions=void 0}}_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((r,u)=>r.line-u.line),this._currentCommand.commandStartMarker=this._commandMarkers[0],this._currentCommand.commandStartMarker){const r=this._terminal.buffer.active.getLine(this._currentCommand.commandStartMarker.line);r&&(this._currentCommand.commandStartLineContent=r.translateToString(!0))}this._currentCommand.commandExecutedMarker=this._commandMarkers[this._commandMarkers.length-1]}}setCommandLine(r){this._logService.debug("CommandDetectionCapability#setCommandLine",r),this._currentCommand.command=r}serialize(){const r=this.commands.map(u=>({startLine:u.marker?.line,startX:void 0,endLine:u.endMarker?.line,executedLine:u.executedMarker?.line,command:this.__isCommandStorageDisabled?"":u.command,cwd:u.cwd,exitCode:u.exitCode,commandStartLineContent:u.commandStartLineContent,timestamp:u.timestamp,markProperties:u.markProperties}));return this._currentCommand.commandStartMarker&&r.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,markProperties:void 0}),{isWindowsPty:this._isWindowsPty,commands:r}}deserialize(r){r.isWindowsPty&&this.setIsWindowsPty(r.isWindowsPty);const u=this._terminal.buffer.normal;for(const i of r.commands){const f=i.startLine!==void 0?this._terminal.registerMarker(i.startLine-(u.baseY+u.cursorY)):void 0;if(!f)continue;if(!i.endLine){this._currentCommand.commandStartMarker=f,this._currentCommand.commandStartX=i.startX,this._cwd=i.cwd,this._onCommandStarted.fire({marker:f});continue}const c=i.endLine!==void 0?this._terminal.registerMarker(i.endLine-(u.baseY+u.cursorY)):void 0,l=i.executedLine!==void 0?this._terminal.registerMarker(i.executedLine-(u.baseY+u.cursorY)):void 0,s={command:this.__isCommandStorageDisabled?"":i.command,marker:f,endMarker:c,executedMarker:l,timestamp:i.timestamp,cwd:i.cwd,commandStartLineContent:i.commandStartLineContent,exitCode:i.exitCode,hasOutput:()=>!l?.isDisposed&&!c?.isDisposed&&!!(l&&c&&l.line<c.line),getOutput:()=>E(l,c,u),getOutputMatch:d=>I(l,c,u,this._terminal.cols,d),markProperties:i.markProperties};this._commands.push(s),this._logService.debug("CommandDetectionCapability#onCommandFinished",s),this._onCommandFinished.fire(s)}}};we([(0,p.debounce)(500)],k.prototype,"_handleCursorMove",null),k=we([F(1,A.ILogService)],k),e.CommandDetectionCapability=k;function E(C,r,u){if(!C||!r)return;const i=C.line,f=r.line;if(i===f)return;let c="",l;for(let s=i;s<f;s++)l=u.getLine(s),l&&(c+=l.translateToString(!l.isWrapped)+(l.isWrapped?"":` `));return c===""?void 0:c}function I(C,r,u,i,f){if(!C||!r)return;const c=C.line,l=r.line,s=f.lineMatcher,d=typeof s=="string"?1:f.length||S(s),n=[];if(f.anchor==="bottom")for(let a=l-(f.offset||0);a>=c;a--){let o=a;const g=a;for(;o>=c&&u.getLine(o)?.isWrapped;)o--;a=o,n.unshift(b(u,o,g,i)),n.length>d&&n.pop();const h=n.join(` `).match(s);if(h)return h}else for(let a=c+(f.offset||0);a<l;a++){const o=a;let g=a;for(;g+1<l&&u.getLine(g+1)?.isWrapped;)g++;if(a=g,n.push(b(u,o,g,i)),n.length===d&&n.shift(),f){const h=n.join(` `).match(s);if(h)return h}}}e.getOutputMatchForCommand=I;function b(C,r,u,i){const f=Math.max(2048/i*2);u=Math.min(u,r+f);let c="";for(let l=r;l<=u;l++){const s=C.getLine(l);s&&(c+=s.translateToString(!0,0,i))}return c}function S(C){if(!C.multiline)return 1;const r=C.source;let u=1,i=r.indexOf("\\n");for(;i!==-1;)u++,i=r.indexOf("\\n",i+1);return u}}),define(ae[2140],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CwdDetectionCapability=void 0;class p{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 E=this._cwds.get(this._cwd)||0;this._cwds.delete(this._cwd),this._cwds.set(this._cwd,E+1),k&&this._onDidChangeCwd.fire(A)}}e.CwdDetectionCapability=p}),define(ae[2141],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NaiveCwdDetectionCapability=void 0;class p{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=p}),define(ae[2142],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartialCommandDetectionCapability=void 0;var p;(function(A){A[A.MinimumPromptLength=2]="MinimumPromptLength"})(p||(p={}));class R{get commands(){return this._commands}constructor(k){this._terminal=k,this.type=3,this._commands=[],this._onCommandFinished=new t.Emitter,this.onCommandFinished=this._onCommandFinished.event,this._terminal.onData(E=>this._onData(E)),this._terminal.parser.registerCsiHandler({final:"J"},E=>(E.length>=1&&(E[0]===2||E[0]===3)&&this._clearCommandsInViewport(),!1))}_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 E=this._commands.length-1;E>=0&&!(this._commands[E].line<this._terminal.buffer.active.baseY);E--)k++;this._commands.splice(this._commands.length-k,k)}}e.PartialCommandDetectionCapability=R}),define(ae[610],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalCapabilityStoreMultiplexer=e.TerminalCapabilityStore=void 0;class R extends p.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(E,I){this._map.set(E,I),this._onDidAddCapability.fire(E)}get(E){return this._map.get(E)}remove(E){!this._map.has(E)||(this._map.delete(E),this._onDidRemoveCapability.fire(E))}has(E){return this._map.has(E)}}e.TerminalCapabilityStore=R;class A extends p.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 E of this._stores)for(const I of E.items)yield I}has(E){for(const I of this._stores)for(const b of I.items)if(b===E)return!0;return!1}get(E){for(const I of this._stores){const b=I.get(E);if(b)return b}}add(E){this._stores.push(E);for(const I of E.items)this._onDidAddCapability.fire(I);E.onDidAddCapability(I=>this._onDidAddCapability.fire(I)),E.onDidRemoveCapability(I=>this._onDidRemoveCapability.fire(I))}}e.TerminalCapabilityStoreMultiplexer=A}),define(ae[185],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalExitReason=e.ShellIntegrationStatus=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.TerminalLogConstants=e.TerminalSettingId=e.TerminalSettingPrefix=void 0;var p;(function(d){d.Shell="terminal.integrated.shell.",d.ShellArgs="terminal.integrated.shellArgs.",d.DefaultProfile="terminal.integrated.defaultProfile.",d.Profiles="terminal.integrated.profiles."})(p=e.TerminalSettingPrefix||(e.TerminalSettingPrefix={}));var R;(function(d){d.ShellLinux="terminal.integrated.shell.linux",d.ShellMacOs="terminal.integrated.shell.osx",d.ShellWindows="terminal.integrated.shell.windows",d.SendKeybindingsToShell="terminal.integrated.sendKeybindingsToShell",d.AutomationShellLinux="terminal.integrated.automationShell.linux",d.AutomationShellMacOs="terminal.integrated.automationShell.osx",d.AutomationShellWindows="terminal.integrated.automationShell.windows",d.AutomationProfileLinux="terminal.integrated.automationProfile.linux",d.AutomationProfileMacOs="terminal.integrated.automationProfile.osx",d.AutomationProfileWindows="terminal.integrated.automationProfile.windows",d.ShellArgsLinux="terminal.integrated.shellArgs.linux",d.ShellArgsMacOs="terminal.integrated.shellArgs.osx",d.ShellArgsWindows="terminal.integrated.shellArgs.windows",d.ProfilesWindows="terminal.integrated.profiles.windows",d.ProfilesMacOs="terminal.integrated.profiles.osx",d.ProfilesLinux="terminal.integrated.profiles.linux",d.DefaultProfileLinux="terminal.integrated.defaultProfile.linux",d.DefaultProfileMacOs="terminal.integrated.defaultProfile.osx",d.DefaultProfileWindows="terminal.integrated.defaultProfile.windows",d.UseWslProfiles="terminal.integrated.useWslProfiles",d.TabsDefaultColor="terminal.integrated.tabs.defaultColor",d.TabsDefaultIcon="terminal.integrated.tabs.defaultIcon",d.TabsEnabled="terminal.integrated.tabs.enabled",d.TabsEnableAnimation="terminal.integrated.tabs.enableAnimation",d.TabsHideCondition="terminal.integrated.tabs.hideCondition",d.TabsShowActiveTerminal="terminal.integrated.tabs.showActiveTerminal",d.TabsShowActions="terminal.integrated.tabs.showActions",d.TabsLocation="terminal.integrated.tabs.location",d.TabsFocusMode="terminal.integrated.tabs.focusMode",d.MacOptionIsMeta="terminal.integrated.macOptionIsMeta",d.MacOptionClickForcesSelection="terminal.integrated.macOptionClickForcesSelection",d.AltClickMovesCursor="terminal.integrated.altClickMovesCursor",d.CopyOnSelection="terminal.integrated.copyOnSelection",d.EnableMultiLinePasteWarning="terminal.integrated.enableMultiLinePasteWarning",d.DrawBoldTextInBrightColors="terminal.integrated.drawBoldTextInBrightColors",d.FontFamily="terminal.integrated.fontFamily",d.FontSize="terminal.integrated.fontSize",d.LetterSpacing="terminal.integrated.letterSpacing",d.LineHeight="terminal.integrated.lineHeight",d.MinimumContrastRatio="terminal.integrated.minimumContrastRatio",d.FastScrollSensitivity="terminal.integrated.fastScrollSensitivity",d.MouseWheelScrollSensitivity="terminal.integrated.mouseWheelScrollSensitivity",d.BellDuration="terminal.integrated.bellDuration",d.FontWeight="terminal.integrated.fontWeight",d.FontWeightBold="terminal.integrated.fontWeightBold",d.CursorBlinking="terminal.integrated.cursorBlinking",d.CursorStyle="terminal.integrated.cursorStyle",d.CursorWidth="terminal.integrated.cursorWidth",d.Scrollback="terminal.integrated.scrollback",d.DetectLocale="terminal.integrated.detectLocale",d.DefaultLocation="terminal.integrated.defaultLocation",d.GpuAcceleration="terminal.integrated.gpuAcceleration",d.TerminalTitleSeparator="terminal.integrated.tabs.separator",d.TerminalTitle="terminal.integrated.tabs.title",d.TerminalDescription="terminal.integrated.tabs.description",d.RightClickBehavior="terminal.integrated.rightClickBehavior",d.Cwd="terminal.integrated.cwd",d.ConfirmOnExit="terminal.integrated.confirmOnExit",d.ConfirmOnKill="terminal.integrated.confirmOnKill",d.EnableBell="terminal.integrated.enableBell",d.CommandsToSkipShell="terminal.integrated.commandsToSkipShell",d.AllowChords="terminal.integrated.allowChords",d.AllowMnemonics="terminal.integrated.allowMnemonics",d.EnvMacOs="terminal.integrated.env.osx",d.EnvLinux="terminal.integrated.env.linux",d.EnvWindows="terminal.integrated.env.windows",d.EnvironmentChangesIndicator="terminal.integrated.environmentChangesIndicator",d.EnvironmentChangesRelaunch="terminal.integrated.environmentChangesRelaunch",d.ShowExitAlert="terminal.integrated.showExitAlert",d.SplitCwd="terminal.integrated.splitCwd",d.WindowsEnableConpty="terminal.integrated.windowsEnableConpty",d.WordSeparators="terminal.integrated.wordSeparators",d.EnableFileLinks="terminal.integrated.enableFileLinks",d.UnicodeVersion="terminal.integrated.unicodeVersion",d.LocalEchoLatencyThreshold="terminal.integrated.localEchoLatencyThreshold",d.LocalEchoEnabled="terminal.integrated.localEchoEnabled",d.LocalEchoExcludePrograms="terminal.integrated.localEchoExcludePrograms",d.LocalEchoStyle="terminal.integrated.localEchoStyle",d.EnablePersistentSessions="terminal.integrated.enablePersistentSessions",d.PersistentSessionReviveProcess="terminal.integrated.persistentSessionReviveProcess",d.CustomGlyphs="terminal.integrated.customGlyphs",d.PersistentSessionScrollback="terminal.integrated.persistentSessionScrollback",d.InheritEnv="terminal.integrated.inheritEnv",d.ShowLinkHover="terminal.integrated.showLinkHover",d.IgnoreProcessNames="terminal.integrated.ignoreProcessNames",d.AutoReplies="terminal.integrated.autoReplies",d.ShellIntegrationEnabled="terminal.integrated.shellIntegration.enabled",d.ShellIntegrationShowWelcome="terminal.integrated.shellIntegration.showWelcome",d.ShellIntegrationDecorationsEnabled="terminal.integrated.shellIntegration.decorationsEnabled",d.ShellIntegrationCommandHistory="terminal.integrated.shellIntegration.history",d.SmoothScrolling="terminal.integrated.smoothScrolling"})(R=e.TerminalSettingId||(e.TerminalSettingId={}));var A;(function(d){d.FileName="ptyhost"})(A=e.TerminalLogConstants||(e.TerminalLogConstants={}));var k;(function(d){d.PowerShell="pwsh",d.Bash="bash",d.Fish="fish",d.Sh="sh",d.Csh="csh",d.Ksh="ksh",d.Zsh="zsh"})(k=e.PosixShellType||(e.PosixShellType={}));var E;(function(d){d.CommandPrompt="cmd",d.PowerShell="pwsh",d.Wsl="wsl",d.GitBash="gitbash"})(E=e.WindowsShellType||(e.WindowsShellType={}));var I;(function(d){d[d.Api=0]="Api",d[d.Process=1]="Process",d[d.Sequence=2]="Sequence",d[d.Config=3]="Config"})(I=e.TitleEventSource||(e.TitleEventSource={}));var b;(function(d){d.LocalPty="localPty",d.PtyHost="ptyHost",d.Log="log",d.Heartbeat="heartbeat"})(b=e.TerminalIpcChannels||(e.TerminalIpcChannels={})),e.IPtyService=(0,t.createDecorator)("ptyService");var S;(function(d){d.Cwd="cwd",d.InitialCwd="initialCwd",d.FixedDimensions="fixedDimensions",d.Title="title",d.ShellType="shellType",d.HasChildProcesses="hasChildProcesses",d.ResolvedShellLaunchConfig="resolvedShellLaunchConfig",d.OverrideDimensions="overrideDimensions",d.FailedShellIntegrationActivation="failedShellIntegrationActivation",d.UsedShellIntegrationInjection="usedShellIntegrationInjection"})(S=e.ProcessPropertyType||(e.ProcessPropertyType={}));var C;(function(d){d[d.BeatInterval=5e3]="BeatInterval",d[d.FirstWaitMultiplier=1.2]="FirstWaitMultiplier",d[d.SecondWaitMultiplier=1]="SecondWaitMultiplier",d[d.CreateProcessTimeout=5e3]="CreateProcessTimeout"})(C=e.HeartbeatConstants||(e.HeartbeatConstants={}));var r;(function(d){d[d.Panel=1]="Panel",d[d.Editor=2]="Editor"})(r=e.TerminalLocation||(e.TerminalLocation={}));var u;(function(d){d.TerminalView="view",d.Editor="editor"})(u=e.TerminalLocationString||(e.TerminalLocationString={}));var i;(function(d){d[d.GraceTime=6e4]="GraceTime",d[d.ShortGraceTime=6e3]="ShortGraceTime"})(i=e.LocalReconnectConstants||(e.LocalReconnectConstants={}));var f;(function(d){d[d.HighWatermarkChars=1e5]="HighWatermarkChars",d[d.LowWatermarkChars=5e3]="LowWatermarkChars",d[d.CharCountAckSize=5e3]="CharCountAckSize"})(f=e.FlowControlConstants||(e.FlowControlConstants={}));var c;(function(d){d.GitBash="Git Bash",d.Pwsh="PowerShell"})(c=e.ProfileSource||(e.ProfileSource={}));var l;(function(d){d[d.Off=0]="Off",d[d.FinalTerm=1]="FinalTerm",d[d.VSCode=2]="VSCode"})(l=e.ShellIntegrationStatus||(e.ShellIntegrationStatus={}));var s;(function(d){d[d.Unknown=0]="Unknown",d[d.Shutdown=1]="Shutdown",d[d.Process=2]="Process",d[d.User=3]="User",d[d.Extension=4]="Extension"})(s=e.TerminalExitReason||(e.TerminalExitReason={}))}),define(ae[2143],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataBufferer=void 0;class t{constructor(R){this._callback=R,this._terminalBufferMap=new Map}dispose(){for(const R of this._terminalBufferMap.values())R.dispose()}startBuffering(R,A,k=5){const E=A(I=>{const b=typeof I=="string"?I:I.data;let S=this._terminalBufferMap.get(R);if(S){S.data.push(b);return}const C=setTimeout(()=>this.flushBuffer(R),k);S={data:[b],timeoutId:C,dispose:()=>{clearTimeout(C),this.flushBuffer(R),E.dispose()}},this._terminalBufferMap.set(R,S)});return E}stopBuffering(R){this._terminalBufferMap.get(R)?.dispose()}flushBuffer(R){const A=this._terminalBufferMap.get(R);A&&(this._terminalBufferMap.delete(R),this._callback(R,A.data.join("")))}}e.TerminalDataBufferer=t}),define(ae[506],le([1,0,14]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeCwd=e.collapseTildePath=e.escapeNonWindowsPath=void 0;function p(k){let E=k;E.indexOf("\\")!==0&&(E=E.replace(/\\/g,"\\\\"));const I=/[\`\$\|\&\>\~\#\!\^\*\;\<\"\']/g;return E=E.replace(I,""),`'${E}'`}e.escapeNonWindowsPath=p;function R(k,E,I){if(!k)return"";if(!E)return k;E.match(/[\/\\]$/)&&(E=E.slice(0,E.length-1));const b=k.replace(/\\/g,"/").toLowerCase(),S=E.replace(/\\/g,"/").toLowerCase();return b.includes(S)?`~${I}${k.slice(E.length+1)}`:k}e.collapseTildePath=R;function A(k){return k.match(/^['"].*['"]$/)&&(k=k.substring(1,k.length-1)),t.OS===1&&k&&k[1]===":"?k[0].toUpperCase()+k.substring(1):k}e.sanitizeCwd=A}),define(ae[2144],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalRecorder=void 0;const t=1024*1024;class p{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 E=this._entries[this._entries.length-1];if(E.cols===A&&E.rows===k)return;if(E.cols===0&&E.rows===0){E.cols=A,E.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 E=this._entries[0],I=this._totalDataLength-t;I>=E.data[0].length?(this._totalDataLength-=E.data[0].length,E.data.shift(),E.data.length===0&&this._entries.shift()):(E.data[0]=E.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=p}),define(ae[507],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatMessageForTerminal=void 0;function t(p,R={}){let A="";return R.excludeLeadingNewLine||(A+=`\r `),A+="\x1B[0m\x1B[7m * ",R.loudFormatting?A+="\x1B[0;104m":A+="\x1B[0m",A+=` ${p} \x1B[0m \r`,A}e.formatMessageForTerminal=t}),define(ae[2145],le([1,0,2,610,2139,2140,2142,25,6,2138,9,506]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseMarkSequence=e.parseKeyValueAssignment=e.deserializeMessage=e.ShellIntegrationAddon=void 0;var r;(function(d){d[d.FinalTerm=133]="FinalTerm",d[d.VSCode=633]="VSCode",d[d.ITerm=1337]="ITerm",d[d.SetCwd=7]="SetCwd",d[d.SetWindowsFriendlyCwd=9]="SetWindowsFriendlyCwd"})(r||(r={}));var u;(function(d){d.PromptStart="A",d.CommandStart="B",d.CommandExecuted="C",d.CommandFinished="D",d.CommandLine="E",d.ContinuationStart="F",d.ContinuationEnd="G",d.RightPromptStart="H",d.RightPromptEnd="I",d.Property="P",d.SetMark="SetMark"})(u||(u={}));var i;(function(d){d.SetMark="SetMark",d.CurrentDir="CurrentDir"})(i||(i={}));let f=class extends t.Disposable{get status(){return this._status}constructor(n,a,o){super(),this._disableTelemetry=n,this._telemetryService=a,this._logService=o,this.capabilities=new p.TerminalCapabilityStore,this._hasUpdatedTelemetry=!1,this._commonProtocolDisposables=[],this._status=0,this._onDidChangeStatus=new I.Emitter,this.onDidChangeStatus=this._onDidChangeStatus.event,this._register((0,t.toDisposable)(()=>{this._clearActivationTimeout(),this._disposeCommonProtocol()}))}_disposeCommonProtocol(){(0,t.dispose)(this._commonProtocolDisposables),this._commonProtocolDisposables.length=0}activate(n){this._terminal=n,this.capabilities.add(3,new k.PartialCommandDetectionCapability(this._terminal)),this._register(n.parser.registerOscHandler(633,a=>this._handleVSCodeSequence(a))),this._register(n.parser.registerOscHandler(1337,a=>this._doHandleITermSequence(a))),this._commonProtocolDisposables.push(n.parser.registerOscHandler(133,a=>this._handleFinalTermSequence(a))),this._register(n.parser.registerOscHandler(7,a=>this._doHandleSetCwd(a))),this._register(n.parser.registerOscHandler(9,a=>this._doHandleSetWindowsFriendlyCwd(a))),this._ensureCapabilitiesOrAddFailureTelemetry()}_handleFinalTermSequence(n){const a=this._doHandleFinalTermSequence(n);return this._status===0&&(this._status=1,this._onDidChangeStatus.fire(this._status)),a}_doHandleFinalTermSequence(n){if(!this._terminal)return!1;const[a,...o]=n.split(";");switch(a){case"A":return this._createOrGetCommandDetection(this._terminal).handlePromptStart(),!0;case"B":return this._createOrGetCommandDetection(this._terminal).handleCommandStart({ignoreCommandLine:!0}),!0;case"C":return this._createOrGetCommandDetection(this._terminal).handleCommandExecuted(),!0;case"D":{const g=o.length===1?parseInt(o[0]):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(g),!0}}return!1}_handleVSCodeSequence(n){const a=this._doHandleVSCodeSequence(n);return!this._hasUpdatedTelemetry&&a&&(this._telemetryService?.publicLog2("terminal/shellIntegrationActivationSucceeded"),this._hasUpdatedTelemetry=!0,this._clearActivationTimeout()),this._status!==2&&(this._status=2,this._onDidChangeStatus.fire(this._status)),a}async _ensureCapabilitiesOrAddFailureTelemetry(){!this._telemetryService||this._disableTelemetry||(this._activationTimeout=setTimeout(()=>{!this.capabilities.get(2)&&!this.capabilities.get(0)&&(this._telemetryService?.publicLog2("terminal/shellIntegrationActivationTimeout"),this._logService.warn("Shell integration failed to add capabilities within 10 seconds")),this._hasUpdatedTelemetry=!0},1e4))}_clearActivationTimeout(){this._activationTimeout!==void 0&&(clearTimeout(this._activationTimeout),this._activationTimeout=void 0)}_doHandleVSCodeSequence(n){if(!this._terminal)return!1;const[a,...o]=n.split(";");switch(a){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 g=o.length===1?parseInt(o[0]):void 0;return this._createOrGetCommandDetection(this._terminal).handleCommandFinished(g),!0}case"E":{let g;return o.length===1?g=c(o[0]):g="",this._createOrGetCommandDetection(this._terminal).setCommandLine(g),!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{key:g,value:h}=l(o[0]);if(h===void 0)return!0;switch(g){case"Cwd":return this._updateCwd(h),!0;case"IsWindows":return this._createOrGetCommandDetection(this._terminal).setIsWindowsPty(h==="True"),!0;case"Task":return this._createOrGetBufferMarkDetection(this._terminal),this.capabilities.get(2)?.setIsCommandStorageDisabled(),!0}}case"SetMark":return this._createOrGetBufferMarkDetection(this._terminal).addMark(s(o)),!0}return!1}_updateCwd(n){n=(0,C.sanitizeCwd)(n),this._createOrGetCwdDetection().updateCwd(n),this.capabilities.get(2)?.setCwd(n)}_doHandleITermSequence(n){if(!this._terminal)return!1;const[a]=n.split(";");switch(a){case"SetMark":this._createOrGetBufferMarkDetection(this._terminal).addMark();default:{const{key:o,value:g}=l(a);if(g===void 0)return!0;switch(o){case"CurrentDir":return this._updateCwd(g),!0}}}return!1}_doHandleSetWindowsFriendlyCwd(n){if(!this._terminal)return!1;const[a,...o]=n.split(";");switch(a){case"9":return o.length&&this._updateCwd(o[0]),!0}return!1}_doHandleSetCwd(n){if(!this._terminal)return!1;const[a]=n.split(";");if(a.match(/^file:\/\/.*\//)){const o=S.URI.parse(a);if(o.path&&o.path.length>0)return this._updateCwd(o.path),!0}return!1}serialize(){return!this._terminal||!this.capabilities.has(2)?{isWindowsPty:!1,commands:[]}:this._createOrGetCommandDetection(this._terminal).serialize()}deserialize(n){if(!this._terminal)throw new Error("Cannot restore commands before addon is activated");this._createOrGetCommandDetection(this._terminal).deserialize(n)}_createOrGetCwdDetection(){let n=this.capabilities.get(0);return n||(n=new A.CwdDetectionCapability,this.capabilities.add(0,n)),n}_createOrGetCommandDetection(n){let a=this.capabilities.get(2);return a||(a=new R.CommandDetectionCapability(n,this._logService),this.capabilities.add(2,a)),a}_createOrGetBufferMarkDetection(n){let a=this.capabilities.get(4);return a||(a=new b.BufferMarkCapability(n),this.capabilities.add(4,a)),a}};f=we([F(2,E.ILogService)],f),e.ShellIntegrationAddon=f;function c(d){let n=d.replace(/\\\\/g,"\\");const a=/\\x([0-9a-f]{2})/i;for(;;){const o=n.match(a);if(!o?.index||o.length<2)break;n=n.slice(0,o.index)+String.fromCharCode(parseInt(o[1],16))+n.slice(o.index+4)}return n}e.deserializeMessage=c;function l(d){const n=c(d),a=n.indexOf("=");return a===-1?{key:n,value:void 0}:{key:n.substring(0,a),value:n.substring(1+a)}}e.parseKeyValueAssignment=l;function s(d){let n,a=!1;for(const o of d)o==="Hidden"&&(a=!0),o.startsWith("Id=")&&(n=o.substring(3));return{id:n,hidden:a}}e.parseMarkSequence=s}),define(ae[611],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILocalPtyService=void 0,e.ILocalPtyService=(0,t.createDecorator)("localPtyService")}),define(ae[33],le([1,0,11,65,6,171,1433,155,17]),function(J,e,t,p,R,A,k,E,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.listFilterWidgetShadow=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.listFocusAndSelectionOutline=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.editorStickyScrollHoverBackground=e.editorStickyScrollBackground=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.buttonSeparator=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.disabledForeground=e.foreground=e.getColorRegistry=e.registerColor=e.Extensions=e.ColorTransformType=e.asCssVariableName=void 0;function b(L){return`--vscode-${L.replace(/\./g,"-")}`}e.asCssVariableName=b;var S;(function(L){L[L.Darken=0]="Darken",L[L.Lighten=1]="Lighten",L[L.Transparent=2]="Transparent",L[L.OneOf=3]="OneOf",L[L.LessProminent=4]="LessProminent",L[L.IfDefinedThenElse=5]="IfDefinedThenElse"})(S=e.ColorTransformType||(e.ColorTransformType={})),e.Extensions={ColorContribution:"base.contributions.colors"};class C{constructor(){this._onDidChangeSchema=new R.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(M,O,N,P=!1,B){const V={id:M,description:N,defaults:O,needsTransparency:P,deprecationMessage:B};this.colorsById[M]=V;const z={type:"string",description:N,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return B&&(z.deprecationMessage=B),this.colorSchema.properties[M]=z,this.colorReferenceSchema.enum.push(M),this.colorReferenceSchema.enumDescriptions.push(N),this._onDidChangeSchema.fire(),M}deregisterColor(M){delete this.colorsById[M],delete this.colorSchema.properties[M];const O=this.colorReferenceSchema.enum.indexOf(M);O!==-1&&(this.colorReferenceSchema.enum.splice(O,1),this.colorReferenceSchema.enumDescriptions.splice(O,1)),this._onDidChangeSchema.fire()}getColors(){return Object.keys(this.colorsById).map(M=>this.colorsById[M])}resolveDefaultColor(M,O){const N=this.colorsById[M];if(N&&N.defaults){const P=N.defaults[O.type];return y(P,O)}}getColorSchema(){return this.colorSchema}getColorReferenceSchema(){return this.colorReferenceSchema}toString(){const M=(O,N)=>{const P=O.indexOf(".")===-1?0:1,B=N.indexOf(".")===-1?0:1;return P!==B?P-B:O.localeCompare(N)};return Object.keys(this.colorsById).sort(M).map(O=>`- \`${O}\`: ${this.colorsById[O].description}`).join(` `)}}const r=new C;I.Registry.add(e.Extensions.ColorContribution,r);function u(L){return L===null||typeof L.hcLight>"u"&&(L.hcDark===null||typeof L.hcDark=="string"?L.hcLight=L.hcDark:L.hcLight=L.light),L}function i(L,M,O,N,P){return r.registerColor(L,u(M),O,N,P)}e.registerColor=i;function f(){return r}e.getColorRegistry=f,e.foreground=i("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},k.localize(0,null)),e.disabledForeground=i("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},k.localize(1,null)),e.errorForeground=i("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},k.localize(2,null)),e.descriptionForeground=i("descriptionForeground",{light:"#717171",dark:v(e.foreground,.7),hcDark:v(e.foreground,.7),hcLight:v(e.foreground,.7)},k.localize(3,null)),e.iconForeground=i("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},k.localize(4,null)),e.focusBorder=i("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#0F4A85"},k.localize(5,null)),e.contrastBorder=i("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},k.localize(6,null)),e.activeContrastBorder=i("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},k.localize(7,null)),e.selectionBackground=i("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},k.localize(8,null)),e.textSeparatorForeground=i("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:p.Color.black,hcLight:"#292929"},k.localize(9,null)),e.textLinkForeground=i("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},k.localize(10,null)),e.textLinkActiveForeground=i("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},k.localize(11,null)),e.textPreformatForeground=i("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},k.localize(12,null)),e.textBlockQuoteBackground=i("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},k.localize(13,null)),e.textBlockQuoteBorder=i("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:p.Color.white,hcLight:"#292929"},k.localize(14,null)),e.textCodeBlockBackground=i("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:p.Color.black,hcLight:"#F2F2F2"},k.localize(15,null)),e.widgetShadow=i("widget.shadow",{dark:v(p.Color.black,.36),light:v(p.Color.black,.16),hcDark:null,hcLight:null},k.localize(16,null)),e.inputBackground=i("input.background",{dark:"#3C3C3C",light:p.Color.white,hcDark:p.Color.black,hcLight:p.Color.white},k.localize(17,null)),e.inputForeground=i("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},k.localize(18,null)),e.inputBorder=i("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(19,null)),e.inputActiveOptionBorder=i("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(20,null)),e.inputActiveOptionHoverBackground=i("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},k.localize(21,null)),e.inputActiveOptionBackground=i("inputOption.activeBackground",{dark:v(e.focusBorder,.4),light:v(e.focusBorder,.2),hcDark:p.Color.transparent,hcLight:p.Color.transparent},k.localize(22,null)),e.inputActiveOptionForeground=i("inputOption.activeForeground",{dark:p.Color.white,light:p.Color.black,hcDark:null,hcLight:e.foreground},k.localize(23,null)),e.inputPlaceholderForeground=i("input.placeholderForeground",{light:v(e.foreground,.5),dark:v(e.foreground,.5),hcDark:v(e.foreground,.7),hcLight:v(e.foreground,.7)},k.localize(24,null)),e.inputValidationInfoBackground=i("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:p.Color.black,hcLight:p.Color.white},k.localize(25,null)),e.inputValidationInfoForeground=i("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},k.localize(26,null)),e.inputValidationInfoBorder=i("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(27,null)),e.inputValidationWarningBackground=i("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:p.Color.black,hcLight:p.Color.white},k.localize(28,null)),e.inputValidationWarningForeground=i("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},k.localize(29,null)),e.inputValidationWarningBorder=i("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(30,null)),e.inputValidationErrorBackground=i("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:p.Color.black,hcLight:p.Color.white},k.localize(31,null)),e.inputValidationErrorForeground=i("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},k.localize(32,null)),e.inputValidationErrorBorder=i("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(33,null)),e.selectBackground=i("dropdown.background",{dark:"#3C3C3C",light:p.Color.white,hcDark:p.Color.black,hcLight:p.Color.white},k.localize(34,null)),e.selectListBackground=i("dropdown.listBackground",{dark:null,light:null,hcDark:p.Color.black,hcLight:p.Color.white},k.localize(35,null)),e.selectForeground=i("dropdown.foreground",{dark:"#F0F0F0",light:null,hcDark:p.Color.white,hcLight:e.foreground},k.localize(36,null)),e.selectBorder=i("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(37,null)),e.checkboxBackground=i("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},k.localize(38,null)),e.checkboxForeground=i("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},k.localize(39,null)),e.checkboxBorder=i("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},k.localize(40,null)),e.buttonForeground=i("button.foreground",{dark:p.Color.white,light:p.Color.white,hcDark:p.Color.white,hcLight:p.Color.white},k.localize(41,null)),e.buttonSeparator=i("button.separator",{dark:v(e.buttonForeground,.4),light:v(e.buttonForeground,.4),hcDark:v(e.buttonForeground,.4),hcLight:v(e.buttonForeground,.4)},k.localize(42,null)),e.buttonBackground=i("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},k.localize(43,null)),e.buttonHoverBackground=i("button.hoverBackground",{dark:h(e.buttonBackground,.2),light:g(e.buttonBackground,.2),hcDark:null,hcLight:null},k.localize(44,null)),e.buttonBorder=i("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(45,null)),e.buttonSecondaryForeground=i("button.secondaryForeground",{dark:p.Color.white,light:p.Color.white,hcDark:p.Color.white,hcLight:e.foreground},k.localize(46,null)),e.buttonSecondaryBackground=i("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:p.Color.white},k.localize(47,null)),e.buttonSecondaryHoverBackground=i("button.secondaryHoverBackground",{dark:h(e.buttonSecondaryBackground,.2),light:g(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},k.localize(48,null)),e.badgeBackground=i("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:p.Color.black,hcLight:"#0F4A85"},k.localize(49,null)),e.badgeForeground=i("badge.foreground",{dark:p.Color.white,light:"#333",hcDark:p.Color.white,hcLight:p.Color.white},k.localize(50,null)),e.scrollbarShadow=i("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},k.localize(51,null)),e.scrollbarSliderBackground=i("scrollbarSlider.background",{dark:p.Color.fromHex("#797979").transparent(.4),light:p.Color.fromHex("#646464").transparent(.4),hcDark:v(e.contrastBorder,.6),hcLight:v(e.contrastBorder,.4)},k.localize(52,null)),e.scrollbarSliderHoverBackground=i("scrollbarSlider.hoverBackground",{dark:p.Color.fromHex("#646464").transparent(.7),light:p.Color.fromHex("#646464").transparent(.7),hcDark:v(e.contrastBorder,.8),hcLight:v(e.contrastBorder,.8)},k.localize(53,null)),e.scrollbarSliderActiveBackground=i("scrollbarSlider.activeBackground",{dark:p.Color.fromHex("#BFBFBF").transparent(.4),light:p.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(54,null)),e.progressBarBackground=i("progressBar.background",{dark:p.Color.fromHex("#0E70C0"),light:p.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(55,null)),e.editorErrorBackground=i("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(56,null),!0),e.editorErrorForeground=i("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},k.localize(57,null)),e.editorErrorBorder=i("editorError.border",{dark:null,light:null,hcDark:p.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},k.localize(58,null)),e.editorWarningBackground=i("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(59,null),!0),e.editorWarningForeground=i("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD37",hcLight:"#895503"},k.localize(60,null)),e.editorWarningBorder=i("editorWarning.border",{dark:null,light:null,hcDark:p.Color.fromHex("#FFCC00").transparent(.8),hcLight:"#"},k.localize(61,null)),e.editorInfoBackground=i("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(62,null),!0),e.editorInfoForeground=i("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},k.localize(63,null)),e.editorInfoBorder=i("editorInfo.border",{dark:null,light:null,hcDark:p.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},k.localize(64,null)),e.editorHintForeground=i("editorHint.foreground",{dark:p.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},k.localize(65,null)),e.editorHintBorder=i("editorHint.border",{dark:null,light:null,hcDark:p.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},k.localize(66,null)),e.sashHoverBorder=i("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},k.localize(67,null)),e.editorBackground=i("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:p.Color.black,hcLight:p.Color.white},k.localize(68,null)),e.editorForeground=i("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:p.Color.white,hcLight:e.foreground},k.localize(69,null)),e.editorStickyScrollBackground=i("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},k.localize(70,null)),e.editorStickyScrollHoverBackground=i("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:p.Color.fromHex("#0F4A85").transparent(.1)},k.localize(71,null)),e.editorWidgetBackground=i("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:p.Color.white},k.localize(72,null)),e.editorWidgetForeground=i("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},k.localize(73,null)),e.editorWidgetBorder=i("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(74,null)),e.editorWidgetResizeBorder=i("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},k.localize(75,null)),e.quickInputBackground=i("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(76,null)),e.quickInputForeground=i("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},k.localize(77,null)),e.quickInputTitleBackground=i("quickInputTitle.background",{dark:new p.Color(new p.RGBA(255,255,255,.105)),light:new p.Color(new p.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:p.Color.white},k.localize(78,null)),e.pickerGroupForeground=i("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:p.Color.white,hcLight:"#0F4A85"},k.localize(79,null)),e.pickerGroupBorder=i("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:p.Color.white,hcLight:"#0F4A85"},k.localize(80,null)),e.keybindingLabelBackground=i("keybindingLabel.background",{dark:new p.Color(new p.RGBA(128,128,128,.17)),light:new p.Color(new p.RGBA(221,221,221,.4)),hcDark:p.Color.transparent,hcLight:p.Color.transparent},k.localize(81,null)),e.keybindingLabelForeground=i("keybindingLabel.foreground",{dark:p.Color.fromHex("#CCCCCC"),light:p.Color.fromHex("#555555"),hcDark:p.Color.white,hcLight:e.foreground},k.localize(82,null)),e.keybindingLabelBorder=i("keybindingLabel.border",{dark:new p.Color(new p.RGBA(51,51,51,.6)),light:new p.Color(new p.RGBA(204,204,204,.4)),hcDark:new p.Color(new p.RGBA(111,195,223)),hcLight:e.contrastBorder},k.localize(83,null)),e.keybindingLabelBottomBorder=i("keybindingLabel.bottomBorder",{dark:new p.Color(new p.RGBA(68,68,68,.6)),light:new p.Color(new p.RGBA(187,187,187,.4)),hcDark:new p.Color(new p.RGBA(111,195,223)),hcLight:e.foreground},k.localize(84,null)),e.editorSelectionBackground=i("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},k.localize(85,null)),e.editorSelectionForeground=i("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:p.Color.white},k.localize(86,null)),e.editorInactiveSelection=i("editor.inactiveSelectionBackground",{light:v(e.editorSelectionBackground,.5),dark:v(e.editorSelectionBackground,.5),hcDark:v(e.editorSelectionBackground,.7),hcLight:v(e.editorSelectionBackground,.5)},k.localize(87,null),!0),e.editorSelectionHighlight=i("editor.selectionHighlightBackground",{light:D(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:D(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},k.localize(88,null),!0),e.editorSelectionHighlightBorder=i("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(89,null)),e.editorFindMatch=i("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},k.localize(90,null)),e.editorFindMatchHighlight=i("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},k.localize(91,null),!0),e.editorFindRangeHighlight=i("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},k.localize(92,null),!0),e.editorFindMatchBorder=i("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(93,null)),e.editorFindMatchHighlightBorder=i("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(94,null)),e.editorFindRangeHighlightBorder=i("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:v(e.activeContrastBorder,.4),hcLight:v(e.activeContrastBorder,.4)},k.localize(95,null),!0),e.searchEditorFindMatch=i("searchEditor.findMatchBackground",{light:v(e.editorFindMatchHighlight,.66),dark:v(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},k.localize(96,null)),e.searchEditorFindMatchBorder=i("searchEditor.findMatchBorder",{light:v(e.editorFindMatchHighlightBorder,.66),dark:v(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},k.localize(97,null)),e.editorHoverHighlight=i("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},k.localize(98,null),!0),e.editorHoverBackground=i("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(99,null)),e.editorHoverForeground=i("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},k.localize(100,null)),e.editorHoverBorder=i("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},k.localize(101,null)),e.editorHoverStatusBarBackground=i("editorHoverWidget.statusBarBackground",{dark:h(e.editorHoverBackground,.2),light:g(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(102,null)),e.editorActiveLinkForeground=i("editorLink.activeForeground",{dark:"#4E94CE",light:p.Color.blue,hcDark:p.Color.cyan,hcLight:"#292929"},k.localize(103,null)),e.editorInlayHintForeground=i("editorInlayHint.foreground",{dark:e.badgeForeground,light:e.badgeForeground,hcDark:p.Color.black,hcLight:e.badgeForeground},k.localize(104,null)),e.editorInlayHintBackground=i("editorInlayHint.background",{dark:v(e.badgeBackground,.8),light:v(e.badgeBackground,.6),hcDark:"#f38518",hcLight:e.badgeBackground},k.localize(105,null)),e.editorInlayHintTypeForeground=i("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},k.localize(106,null)),e.editorInlayHintTypeBackground=i("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},k.localize(107,null)),e.editorInlayHintParameterForeground=i("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},k.localize(108,null)),e.editorInlayHintParameterBackground=i("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},k.localize(109,null)),e.editorLightBulbForeground=i("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},k.localize(110,null)),e.editorLightBulbAutoFixForeground=i("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},k.localize(111,null)),e.defaultInsertColor=new p.Color(new p.RGBA(155,185,85,.2)),e.defaultRemoveColor=new p.Color(new p.RGBA(255,0,0,.2)),e.diffInserted=i("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},k.localize(112,null),!0),e.diffRemoved=i("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},k.localize(113,null),!0),e.diffInsertedLine=i("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},k.localize(114,null),!0),e.diffRemovedLine=i("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},k.localize(115,null),!0),e.diffInsertedLineGutter=i("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(116,null)),e.diffRemovedLineGutter=i("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(117,null)),e.diffOverviewRulerInserted=i("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(118,null)),e.diffOverviewRulerRemoved=i("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(119,null)),e.diffInsertedOutline=i("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},k.localize(120,null)),e.diffRemovedOutline=i("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},k.localize(121,null)),e.diffBorder=i("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(122,null)),e.diffDiagonalFill=i("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},k.localize(123,null)),e.listFocusBackground=i("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(124,null)),e.listFocusForeground=i("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(125,null)),e.listFocusOutline=i("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(126,null)),e.listFocusAndSelectionOutline=i("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(127,null)),e.listActiveSelectionBackground=i("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:p.Color.fromHex("#0F4A85").transparent(.1)},k.localize(128,null)),e.listActiveSelectionForeground=i("list.activeSelectionForeground",{dark:p.Color.white,light:p.Color.white,hcDark:null,hcLight:null},k.localize(129,null)),e.listActiveSelectionIconForeground=i("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(130,null)),e.listInactiveSelectionBackground=i("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:p.Color.fromHex("#0F4A85").transparent(.1)},k.localize(131,null)),e.listInactiveSelectionForeground=i("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(132,null)),e.listInactiveSelectionIconForeground=i("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(133,null)),e.listInactiveFocusBackground=i("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(134,null)),e.listInactiveFocusOutline=i("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(135,null)),e.listHoverBackground=i("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:p.Color.fromHex("#0F4A85").transparent(.1)},k.localize(136,null)),e.listHoverForeground=i("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(137,null)),e.listDropBackground=i("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},k.localize(138,null)),e.listHighlightForeground=i("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},k.localize(139,null)),e.listFocusHighlightForeground=i("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:w(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},k.localize(140,null)),e.listInvalidItemForeground=i("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},k.localize(141,null)),e.listErrorForeground=i("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},k.localize(142,null)),e.listWarningForeground=i("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},k.localize(143,null)),e.listFilterWidgetBackground=i("listFilterWidget.background",{light:g(e.editorWidgetBackground,0),dark:h(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(144,null)),e.listFilterWidgetOutline=i("listFilterWidget.outline",{dark:p.Color.transparent,light:p.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},k.localize(145,null)),e.listFilterWidgetNoMatchesOutline=i("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(146,null)),e.listFilterWidgetShadow=i("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},k.localize(147,null)),e.listFilterMatchHighlight=i("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},k.localize(148,null)),e.listFilterMatchHighlightBorder=i("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},k.localize(149,null)),e.treeIndentGuidesStroke=i("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},k.localize(150,null)),e.tableColumnsBorder=i("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},k.localize(151,null)),e.tableOddRowsBackgroundColor=i("tree.tableOddRowsBackground",{dark:v(e.foreground,.04),light:v(e.foreground,.04),hcDark:null,hcLight:null},k.localize(152,null)),e.listDeemphasizedForeground=i("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},k.localize(153,null)),e._deprecatedQuickInputListFocusBackground=i("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,k.localize(154,null)),e.quickInputListFocusForeground=i("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},k.localize(155,null)),e.quickInputListFocusIconForeground=i("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},k.localize(156,null)),e.quickInputListFocusBackground=i("quickInputList.focusBackground",{dark:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:m(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},k.localize(157,null)),e.menuBorder=i("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(158,null)),e.menuForeground=i("menu.foreground",{dark:e.selectForeground,light:e.foreground,hcDark:e.selectForeground,hcLight:e.selectForeground},k.localize(159,null)),e.menuBackground=i("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},k.localize(160,null)),e.menuSelectionForeground=i("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},k.localize(161,null)),e.menuSelectionBackground=i("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},k.localize(162,null)),e.menuSelectionBorder=i("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(163,null)),e.menuSeparatorBackground=i("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},k.localize(164,null)),e.toolbarHoverBackground=i("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},k.localize(165,null)),e.toolbarHoverOutline=i("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},k.localize(166,null)),e.toolbarActiveBackground=i("toolbar.activeBackground",{dark:h(e.toolbarHoverBackground,.1),light:g(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},k.localize(167,null)),e.snippetTabstopHighlightBackground=i("editor.snippetTabstopHighlightBackground",{dark:new p.Color(new p.RGBA(124,124,124,.3)),light:new p.Color(new p.RGBA(10,50,100,.2)),hcDark:new p.Color(new p.RGBA(124,124,124,.3)),hcLight:new p.Color(new p.RGBA(10,50,100,.2))},k.localize(168,null)),e.snippetTabstopHighlightBorder=i("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(169,null)),e.snippetFinalTabstopHighlightBackground=i("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(170,null)),e.snippetFinalTabstopHighlightBorder=i("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new p.Color(new p.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},k.localize(171,null)),e.breadcrumbsForeground=i("breadcrumb.foreground",{light:v(e.foreground,.8),dark:v(e.foreground,.8),hcDark:v(e.foreground,.8),hcLight:v(e.foreground,.8)},k.localize(172,null)),e.breadcrumbsBackground=i("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},k.localize(173,null)),e.breadcrumbsFocusForeground=i("breadcrumb.focusForeground",{light:g(e.foreground,.2),dark:h(e.foreground,.1),hcDark:h(e.foreground,.1),hcLight:h(e.foreground,.1)},k.localize(174,null)),e.breadcrumbsActiveSelectionForeground=i("breadcrumb.activeSelectionForeground",{light:g(e.foreground,.2),dark:h(e.foreground,.1),hcDark:h(e.foreground,.1),hcLight:h(e.foreground,.1)},k.localize(175,null)),e.breadcrumbsPickerBackground=i("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},k.localize(176,null));const c=.5,l=p.Color.fromHex("#40C8AE").transparent(c),s=p.Color.fromHex("#40A6FF").transparent(c),d=p.Color.fromHex("#606060").transparent(.4),n=.4,a=1;e.mergeCurrentHeaderBackground=i("merge.currentHeaderBackground",{dark:l,light:l,hcDark:null,hcLight:null},k.localize(177,null),!0),e.mergeCurrentContentBackground=i("merge.currentContentBackground",{dark:v(e.mergeCurrentHeaderBackground,n),light:v(e.mergeCurrentHeaderBackground,n),hcDark:v(e.mergeCurrentHeaderBackground,n),hcLight:v(e.mergeCurrentHeaderBackground,n)},k.localize(178,null),!0),e.mergeIncomingHeaderBackground=i("merge.incomingHeaderBackground",{dark:s,light:s,hcDark:null,hcLight:null},k.localize(179,null),!0),e.mergeIncomingContentBackground=i("merge.incomingContentBackground",{dark:v(e.mergeIncomingHeaderBackground,n),light:v(e.mergeIncomingHeaderBackground,n),hcDark:v(e.mergeIncomingHeaderBackground,n),hcLight:v(e.mergeIncomingHeaderBackground,n)},k.localize(180,null),!0),e.mergeCommonHeaderBackground=i("merge.commonHeaderBackground",{dark:d,light:d,hcDark:null,hcLight:null},k.localize(181,null),!0),e.mergeCommonContentBackground=i("merge.commonContentBackground",{dark:v(e.mergeCommonHeaderBackground,n),light:v(e.mergeCommonHeaderBackground,n),hcDark:v(e.mergeCommonHeaderBackground,n),hcLight:v(e.mergeCommonHeaderBackground,n)},k.localize(182,null),!0),e.mergeBorder=i("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},k.localize(183,null)),e.overviewRulerCurrentContentForeground=i("editorOverviewRuler.currentContentForeground",{dark:v(e.mergeCurrentHeaderBackground,a),light:v(e.mergeCurrentHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},k.localize(184,null)),e.overviewRulerIncomingContentForeground=i("editorOverviewRuler.incomingContentForeground",{dark:v(e.mergeIncomingHeaderBackground,a),light:v(e.mergeIncomingHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},k.localize(185,null)),e.overviewRulerCommonContentForeground=i("editorOverviewRuler.commonContentForeground",{dark:v(e.mergeCommonHeaderBackground,a),light:v(e.mergeCommonHeaderBackground,a),hcDark:e.mergeBorder,hcLight:e.mergeBorder},k.localize(186,null)),e.overviewRulerFindMatchForeground=i("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},k.localize(187,null),!0),e.overviewRulerSelectionHighlightForeground=i("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},k.localize(188,null),!0),e.minimapFindMatch=i("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},k.localize(189,null),!0),e.minimapSelectionOccurrenceHighlight=i("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},k.localize(190,null),!0),e.minimapSelection=i("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},k.localize(191,null),!0),e.minimapError=i("minimap.errorHighlight",{dark:new p.Color(new p.RGBA(255,18,18,.7)),light:new p.Color(new p.RGBA(255,18,18,.7)),hcDark:new p.Color(new p.RGBA(255,50,50,1)),hcLight:"#B5200D"},k.localize(192,null)),e.minimapWarning=i("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},k.localize(193,null)),e.minimapBackground=i("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},k.localize(194,null)),e.minimapForegroundOpacity=i("minimap.foregroundOpacity",{dark:p.Color.fromHex("#000f"),light:p.Color.fromHex("#000f"),hcDark:p.Color.fromHex("#000f"),hcLight:p.Color.fromHex("#000f")},k.localize(195,null)),e.minimapSliderBackground=i("minimapSlider.background",{light:v(e.scrollbarSliderBackground,.5),dark:v(e.scrollbarSliderBackground,.5),hcDark:v(e.scrollbarSliderBackground,.5),hcLight:v(e.scrollbarSliderBackground,.5)},k.localize(196,null)),e.minimapSliderHoverBackground=i("minimapSlider.hoverBackground",{light:v(e.scrollbarSliderHoverBackground,.5),dark:v(e.scrollbarSliderHoverBackground,.5),hcDark:v(e.scrollbarSliderHoverBackground,.5),hcLight:v(e.scrollbarSliderHoverBackground,.5)},k.localize(197,null)),e.minimapSliderActiveBackground=i("minimapSlider.activeBackground",{light:v(e.scrollbarSliderActiveBackground,.5),dark:v(e.scrollbarSliderActiveBackground,.5),hcDark:v(e.scrollbarSliderActiveBackground,.5),hcLight:v(e.scrollbarSliderActiveBackground,.5)},k.localize(198,null)),e.problemsErrorIconForeground=i("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},k.localize(199,null)),e.problemsWarningIconForeground=i("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},k.localize(200,null)),e.problemsInfoIconForeground=i("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},k.localize(201,null)),e.chartsForeground=i("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},k.localize(202,null)),e.chartsLines=i("charts.lines",{dark:v(e.foreground,.5),light:v(e.foreground,.5),hcDark:v(e.foreground,.5),hcLight:v(e.foreground,.5)},k.localize(203,null)),e.chartsRed=i("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},k.localize(204,null)),e.chartsBlue=i("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},k.localize(205,null)),e.chartsYellow=i("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},k.localize(206,null)),e.chartsOrange=i("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},k.localize(207,null)),e.chartsGreen=i("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},k.localize(208,null)),e.chartsPurple=i("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},k.localize(209,null));function o(L,M){switch(L.op){case 0:return y(L.value,M)?.darken(L.factor);case 1:return y(L.value,M)?.lighten(L.factor);case 2:return y(L.value,M)?.transparent(L.factor);case 3:for(const O of L.values){const N=y(O,M);if(N)return N}return;case 5:return y(M.defines(L.if)?L.then:L.else,M);case 4:{const O=y(L.value,M);if(!O)return;const N=y(L.background,M);return N?O.isDarkerThan(N)?p.Color.getLighterColor(O,N,L.factor).transparent(L.transparency):p.Color.getDarkerColor(O,N,L.factor).transparent(L.transparency):O.transparent(L.factor*L.transparency)}default:throw(0,A.assertNever)(L)}}e.executeTransform=o;function g(L,M){return{op:0,value:L,factor:M}}e.darken=g;function h(L,M){return{op:1,value:L,factor:M}}e.lighten=h;function v(L,M){return{op:2,value:L,factor:M}}e.transparent=v;function m(...L){return{op:3,values:L}}e.oneOf=m;function w(L,M,O){return{op:5,if:L,then:M,else:O}}e.ifDefinedThenElse=w;function D(L,M,O,N){return{op:4,value:L,background:M,factor:O,transparency:N}}function y(L,M){if(L!==null){if(typeof L=="string")return L[0]==="#"?p.Color.fromHex(L):M.getColor(L);if(L instanceof p.Color)return L;if(typeof L=="object")return o(L,M)}}e.resolveColorValue=y,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const T=I.Registry.as(E.Extensions.JSONContribution);T.registerSchema(e.workbenchColorsSchemaId,r.getColorSchema());const _=new t.RunOnceScheduler(()=>T.notifySchemaChanged(e.workbenchColorsSchemaId),200);r.onDidChangeSchema(()=>{_.isScheduled()||_.schedule()})}),define(ae[430],le([1,0,10,415,139,11,2,33]),function(J,e,t,p,R,A,k,E){"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(o,g){this.x=o,this.y=g,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new b(this.x-window.scrollX,this.y-window.scrollY)}}e.PageCoordinates=I;class b{constructor(o,g){this.clientX=o,this.clientY=g,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new I(this.clientX+window.scrollX,this.clientY+window.scrollY)}}e.ClientCoordinates=b;class S{constructor(o,g,h,v){this.x=o,this.y=g,this.width=h,this.height=v,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=S;class C{constructor(o,g){this.x=o,this.y=g,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=C;function r(a){const o=t.getDomNodePagePosition(a);return new S(o.left,o.top,o.width,o.height)}e.createEditorPagePosition=r;function u(a,o,g){const h=o.width/a.offsetWidth,v=o.height/a.offsetHeight,m=(g.x-o.x)/h,w=(g.y-o.y)/v;return new C(m,w)}e.createCoordinatesRelativeToEditor=u;class i extends R.StandardMouseEvent{constructor(o,g,h){super(o),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=g,this.pos=new I(this.posx,this.posy),this.editorPos=r(h),this.relativePos=u(h,this.editorPos,this.pos)}}e.EditorMouseEvent=i;class f{constructor(o){this._editorViewDomNode=o}_create(o){return new i(o,!1,this._editorViewDomNode)}onContextMenu(o,g){return t.addDisposableListener(o,"contextmenu",h=>{g(this._create(h))})}onMouseUp(o,g){return t.addDisposableListener(o,"mouseup",h=>{g(this._create(h))})}onMouseDown(o,g){return t.addDisposableListener(o,t.EventType.MOUSE_DOWN,h=>{g(this._create(h))})}onPointerDown(o,g){return t.addDisposableListener(o,t.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onMouseLeave(o,g){return t.addDisposableListener(o,t.EventType.MOUSE_LEAVE,h=>{g(this._create(h))})}onMouseMove(o,g){return t.addDisposableListener(o,"mousemove",h=>g(this._create(h)))}}e.EditorMouseEventFactory=f;class c{constructor(o){this._editorViewDomNode=o}_create(o){return new i(o,!1,this._editorViewDomNode)}onPointerUp(o,g){return t.addDisposableListener(o,"pointerup",h=>{g(this._create(h))})}onPointerDown(o,g){return t.addDisposableListener(o,t.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onPointerLeave(o,g){return t.addDisposableListener(o,t.EventType.POINTER_LEAVE,h=>{g(this._create(h))})}onPointerMove(o,g){return t.addDisposableListener(o,"pointermove",h=>g(this._create(h)))}}e.EditorPointerEventFactory=c;class l extends k.Disposable{constructor(o){super(),this._editorViewDomNode=o,this._globalPointerMoveMonitor=this._register(new p.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(o,g,h,v,m){this._keydownListener=t.addStandardDisposableListener(document,"keydown",w=>{w.toKeybinding().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,w.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(o,g,h,w=>{v(new i(w,!0,this._editorViewDomNode))},w=>{this._keydownListener.dispose(),m(w)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=l;class s{constructor(o){this._editor=o,this._instanceId=++s._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new A.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(o){const g=this.getOrCreateRule(o);return g.increaseRefCount(),{className:g.className,dispose:()=>{g.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(o){const g=this.computeUniqueKey(o);let h=this._rules.get(g);if(!h){const v=this._counter++;h=new d(g,`dyn-rule-${this._instanceId}-${v}`,t.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,o),this._rules.set(g,h)}return h}computeUniqueKey(o){return JSON.stringify(o)}garbageCollect(){for(const o of this._rules.values())o.hasReferences()||(this._rules.delete(o.key),o.dispose())}}e.DynamicCssRules=s,s._idPool=0;class d{constructor(o,g,h,v){this.key=o,this.className=g,this.properties=v,this._referenceCount=0,this._styleElement=t.createStyleSheet(h),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(o,g){let h=`.${o} {`;for(const v in g){const m=g[v];let w;typeof m=="object"?w=`var(${(0,E.asCssVariableName)(m.id)})`:w=m,h+=` ${n(v)}: ${w};`}return h+=` }`,h}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function n(a){return a.replace(/(^[A-Z])/,([o])=>o.toLowerCase()).replace(/([A-Z])/g,([o])=>`-${o.toLowerCase()}`)}}),define(ae[126],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var t;(function(A){A.DARK="dark",A.LIGHT="light",A.HIGH_CONTRAST_DARK="hcDark",A.HIGH_CONTRAST_LIGHT="hcLight"})(t=e.ColorScheme||(e.ColorScheme={}));function p(A){return A===t.HIGH_CONTRAST_DARK||A===t.HIGH_CONTRAST_LIGHT}e.isHighContrast=p;function R(A){return A===t.DARK||A===t.HIGH_CONTRAST_DARK}e.isDark=R}),define(ae[810],le([1,0,86,121,14,1191,408,421,424,126,134]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLine=e.ViewLineOptions=e.DomReadingContext=void 0;const C=function(){return R.isNative?!0:!(R.isLinux||t.isFirefox||t.isSafari)}();let r=!0;class u{readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const g=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=g.left,this._clientRectScale=g.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(g,h){this._domNode=g,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=h}}e.DomReadingContext=u;class i{constructor(g,h){this.themeType=h;const v=g.options,m=v.get(45);this.renderWhitespace=v.get(89),this.renderControlCharacters=v.get(84),this.spaceWidth=m.spaceWidth,this.middotWidth=m.middotWidth,this.wsmiddotWidth=m.wsmiddotWidth,this.useMonospaceOptimizations=m.isMonospace&&!v.get(29),this.canUseHalfwidthRightwardsArrow=m.canUseHalfwidthRightwardsArrow,this.lineHeight=v.get(60),this.stopRenderingLineAfter=v.get(107),this.fontLigatures=v.get(46)}equals(g){return this.themeType===g.themeType&&this.renderWhitespace===g.renderWhitespace&&this.renderControlCharacters===g.renderControlCharacters&&this.spaceWidth===g.spaceWidth&&this.middotWidth===g.middotWidth&&this.wsmiddotWidth===g.wsmiddotWidth&&this.useMonospaceOptimizations===g.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===g.canUseHalfwidthRightwardsArrow&&this.lineHeight===g.lineHeight&&this.stopRenderingLineAfter===g.stopRenderingLineAfter&&this.fontLigatures===g.fontLigatures}}e.ViewLineOptions=i;class f{constructor(g){this._options=g,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(g){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,p.createFastDomNode)(g);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(g){this._isMaybeInvalid=!0,this._options=g}onSelectionChanged(){return(0,b.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(g,h,v,m){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const w=v.getViewLineRenderingData(g),D=this._options,y=E.LineDecoration.filter(w.inlineDecorations,g,w.minColumn,w.maxColumn);let T=null;if((0,b.isHighContrast)(D.themeType)||this._options.renderWhitespace==="selection"){const O=v.selections;for(const N of O){if(N.endLineNumber<g||N.startLineNumber>g)continue;const P=N.startLineNumber===g?N.startColumn:w.minColumn,B=N.endLineNumber===g?N.endColumn:w.maxColumn;P<B&&((0,b.isHighContrast)(D.themeType)||this._options.renderWhitespace!=="selection"?y.push(new E.LineDecoration(P,B,"inline-selected-text",0)):(T||(T=[]),T.push(new I.LineRange(P-1,B-1))))}}const _=new I.RenderLineInput(D.useMonospaceOptimizations,D.canUseHalfwidthRightwardsArrow,w.content,w.continuesWithWrappedLine,w.isBasicASCII,w.containsRTL,w.minColumn-1,w.tokens,y,w.tabSize,w.startVisibleColumn,D.spaceWidth,D.middotWidth,D.wsmiddotWidth,D.stopRenderingLineAfter,D.renderWhitespace,D.renderControlCharacters,D.fontLigatures!==S.EditorFontLigatures.OFF,T);if(this._renderedViewLine&&this._renderedViewLine.input.equals(_))return!1;m.appendString('<div style="top:'),m.appendString(String(h)),m.appendString("px;height:"),m.appendString(String(this._options.lineHeight)),m.appendString('px;" class="'),m.appendString(f.CLASS_NAME),m.appendString('">');const L=(0,I.renderViewLine)(_,m);m.appendString("</div>");let M=null;return r&&C&&w.isBasicASCII&&D.useMonospaceOptimizations&&L.containsForeignElements===0&&w.content.length<300&&_.lineTokens.getCount()<100&&(M=new c(this._renderedViewLine?this._renderedViewLine.domNode:null,_,L.characterMapping)),M||(M=d(this._renderedViewLine?this._renderedViewLine.domNode:null,_,L.characterMapping,L.containsRTL,L.containsForeignElements)),this._renderedViewLine=M,!0}layoutLine(g,h){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(h),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 c:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof c?this._renderedViewLine.monospaceAssumptionsAreValid():r}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof c&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(g,h,v,m){if(!this._renderedViewLine)return null;h=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,h)),v=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,v));const w=this._renderedViewLine.input.stopRenderingLineAfter;if(w!==-1&&h>w+1&&v>w+1)return new k.VisibleRanges(!0,[new k.FloatHorizontalRange(this.getWidth(),0)]);w!==-1&&h>w+1&&(h=w+1),w!==-1&&v>w+1&&(v=w+1);const D=this._renderedViewLine.getVisibleRangesForRange(g,h,v,m);return D&&D.length>0?new k.VisibleRanges(!1,D):null}getColumnOfNodeOffset(g,h,v){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(g,h,v):1}}e.ViewLine=f,f.CLASS_NAME="view-line";class c{constructor(g,h,v){this.domNode=g,this.input=h,this._characterMapping=v,this._charWidth=h.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return r;const g=this.getWidth(),h=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(g-h)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),r=!1),r}toSlowRenderedLine(){return d(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(g,h,v,m){const w=this._getCharPosition(h),D=this._getCharPosition(v);return[new k.FloatHorizontalRange(w,D-w)]}_getCharPosition(g){const h=this._characterMapping.getHorizontalOffset(g);return this._charWidth*h}getColumnOfNodeOffset(g,h,v){const m=h.textContent.length;let w=-1;for(;h;)h=h.previousSibling,w++;return this._characterMapping.getColumn(new I.DomPosition(w,v),m)}}class l{constructor(g,h,v,m,w){if(this.domNode=g,this.input=h,this._characterMapping=v,this._isWhitespaceOnly=/^\s*$/.test(h.lineContent),this._containsForeignElements=w,this._cachedWidth=-1,this._pixelOffsetCache=null,!m||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let D=0,y=this._characterMapping.length;D<=y;D++)this._pixelOffsetCache[D]=-1}}_getReadingTarget(g){return g.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(g,h,v,m){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const w=this._readPixelOffset(this.domNode,g,h,m);if(w===-1)return null;const D=this._readPixelOffset(this.domNode,g,v,m);return D===-1?null:[new k.FloatHorizontalRange(w,D-w)]}return this._readVisibleRangesForRange(this.domNode,g,h,v,m)}_readVisibleRangesForRange(g,h,v,m,w){if(v===m){const D=this._readPixelOffset(g,h,v,w);return D===-1?null:[new k.FloatHorizontalRange(D,0)]}else return this._readRawVisibleRangesForRange(g,v,m,w)}_readPixelOffset(g,h,v,m){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const w=this._getReadingTarget(g);return w.firstChild?w.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const w=this._pixelOffsetCache[v];if(w!==-1)return w;const D=this._actualReadPixelOffset(g,h,v,m);return this._pixelOffsetCache[v]=D,D}return this._actualReadPixelOffset(g,h,v,m)}_actualReadPixelOffset(g,h,v,m){if(this._characterMapping.length===0){const T=A.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),0,0,0,0,m.clientRectDeltaLeft,m.clientRectScale,m.endNode);return!T||T.length===0?-1:T[0].left}if(v===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const w=this._characterMapping.getDomPosition(v),D=A.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),w.partIndex,w.charIndex,w.partIndex,w.charIndex,m.clientRectDeltaLeft,m.clientRectScale,m.endNode);if(!D||D.length===0)return-1;const y=D[0].left;if(this.input.isBasicASCII){const T=this._characterMapping.getHorizontalOffset(v),_=Math.round(this.input.spaceWidth*T);if(Math.abs(_-y)<=1)return _}return y}_readRawVisibleRangesForRange(g,h,v,m){if(h===1&&v===this._characterMapping.length)return[new k.FloatHorizontalRange(0,this.getWidth())];const w=this._characterMapping.getDomPosition(h),D=this._characterMapping.getDomPosition(v);return A.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),w.partIndex,w.charIndex,D.partIndex,D.charIndex,m.clientRectDeltaLeft,m.clientRectScale,m.endNode)}getColumnOfNodeOffset(g,h,v){const m=h.textContent.length;let w=-1;for(;h;)h=h.previousSibling,w++;return this._characterMapping.getColumn(new I.DomPosition(w,v),m)}}class s extends l{_readVisibleRangesForRange(g,h,v,m,w){const D=super._readVisibleRangesForRange(g,h,v,m,w);if(!D||D.length===0||v===m||v===1&&m===this._characterMapping.length)return D;if(!this.input.containsRTL){const y=this._readPixelOffset(g,h,m,w);if(y!==-1){const T=D[D.length-1];T.left<y&&(T.width=y-T.left)}}return D}}const d=function(){return t.isWebKit?n:a}();function n(o,g,h,v,m){return new s(o,g,h,v,m)}function a(o,g,h,v,m){return new l(o,g,h,v,m)}}),define(ae[811],le([1,0,430,180,810,50,20,251,10,768]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.shadowCaretRangeFromPoint=e.MouseTargetFactory=e.HitTestContext=e.MouseTarget=e.PointerHandlerLastRenderData=void 0;var S;(function(v){v[v.Unknown=0]="Unknown",v[v.Content=1]="Content"})(S||(S={}));class C{constructor(m=null){this.hitTarget=m,this.type=0}}class r{constructor(m,w,D){this.position=m,this.spanNode=w,this.injectedText=D,this.type=1}}var u;(function(v){function m(w,D,y){const T=w.getPositionFromDOMInfo(D,y);return T?new r(T,D,null):new C(D)}v.createFromDOMInfo=m})(u||(u={}));class i{constructor(m,w){this.lastViewCursorsRenderData=m,this.lastTextareaPosition=w}}e.PointerHandlerLastRenderData=i;class f{static _deduceRage(m,w=null){return!w&&m?new k.Range(m.lineNumber,m.column,m.lineNumber,m.column):w??null}static createUnknown(m,w,D){return{type:0,element:m,mouseColumn:w,position:D,range:this._deduceRage(D)}}static createTextarea(m,w){return{type:1,element:m,mouseColumn:w,position:null,range:null}}static createMargin(m,w,D,y,T,_){return{type:m,element:w,mouseColumn:D,position:y,range:T,detail:_}}static createViewZone(m,w,D,y,T){return{type:m,element:w,mouseColumn:D,position:y,range:this._deduceRage(y),detail:T}}static createContentText(m,w,D,y,T){return{type:6,element:m,mouseColumn:w,position:D,range:this._deduceRage(D,y),detail:T}}static createContentEmpty(m,w,D,y){return{type:7,element:m,mouseColumn:w,position:D,range:this._deduceRage(D),detail:y}}static createContentWidget(m,w,D){return{type:9,element:m,mouseColumn:w,position:null,range:null,detail:D}}static createScrollbar(m,w,D){return{type:11,element:m,mouseColumn:w,position:D,range:this._deduceRage(D)}}static createOverlayWidget(m,w,D){return{type:12,element:m,mouseColumn:w,position:null,range:null,detail:D}}static createOutsideEditor(m,w,D,y){return{type:13,element:null,mouseColumn:m,position:w,range:this._deduceRage(w),outsidePosition:D,outsideDistance:y}}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=f;class c{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,w,D){this.viewModel=m.viewModel;const y=m.configuration.options;this.layoutInfo=y.get(133),this.viewDomNode=w.viewDomNode,this.lineHeight=y.get(60),this.stickyTabStops=y.get(106),this.typicalHalfwidthCharacterWidth=y.get(45).typicalHalfwidthCharacterWidth,this.lastRenderData=D,this._context=m,this._viewHelper=w}getZoneAtCoord(m){return l.getZoneAtCoord(this._context,m)}static getZoneAtCoord(m,w){const D=m.viewLayout.getWhitespaceAtVerticalOffset(w);if(D){const y=D.verticalOffset+D.height/2,T=m.viewModel.getLineCount();let _=null,L,M=null;return D.afterLineNumber!==T&&(M=new A.Position(D.afterLineNumber+1,1)),D.afterLineNumber>0&&(_=new A.Position(D.afterLineNumber,m.viewModel.getLineMaxColumn(D.afterLineNumber))),M===null?L=_:_===null?L=M:w<y?L=_:L=M,{viewZoneId:D.id,afterLineNumber:D.afterLineNumber,positionBefore:_,positionAfter:M,position:L}}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 w=this._context.viewLayout.getLineNumberAtVerticalOffset(m),D=this._context.viewModel.getLineMaxColumn(w);return{range:new k.Range(w,1,w,D),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,w){return l._findAttribute(m,w,this._viewHelper.viewDomNode)}static _findAttribute(m,w,D){for(;m&&m!==document.body;){if(m.hasAttribute&&m.hasAttribute(w))return m.getAttribute(w);if(m===D)return null;m=m.parentNode}return null}getLineWidth(m){return this._viewHelper.getLineWidth(m)}visibleRangeForPosition(m,w){return this._viewHelper.visibleRangeForPosition(m,w)}getPositionFromDOMInfo(m,w){return this._viewHelper.getPositionFromDOMInfo(m,w)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}e.HitTestContext=l;class s{constructor(m,w,D,y){this.editorPos=w,this.pos=D,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,o._getMouseColumn(this.mouseContentHorizontalOffset,m.typicalHalfwidthCharacterWidth))}}class d extends s{constructor(m,w,D,y,T){super(m,w,D,y),this._ctx=m,T?(this.target=T,this.targetPath=p.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)?E.CursorColumns.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(m.lineNumber),m.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(m=null){return f.createUnknown(this.target,this._getMouseColumn(m),m)}fulfillTextarea(){return f.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(m,w,D,y){return f.createMargin(m,this.target,this._getMouseColumn(w),w,D,y)}fulfillViewZone(m,w,D){return f.createViewZone(m,this.target,this._getMouseColumn(w),w,D)}fulfillContentText(m,w,D){return f.createContentText(this.target,this._getMouseColumn(m),m,w,D)}fulfillContentEmpty(m,w){return f.createContentEmpty(this.target,this._getMouseColumn(m),m,w)}fulfillContentWidget(m){return f.createContentWidget(this.target,this._getMouseColumn(),m)}fulfillScrollbar(m){return f.createScrollbar(this.target,this._getMouseColumn(m),m)}fulfillOverlayWidget(m){return f.createOverlayWidget(this.target,this._getMouseColumn(),m)}withTarget(m){return new d(this._ctx,this.editorPos,this.pos,this.relativePos,m)}}const n={isAfterLines:!0};function a(v){return{isAfterLines:!1,horizontalDistanceToText:v}}class o{constructor(m,w){this._context=m,this._viewHelper=w}mouseTargetIsWidget(m){const w=m.target,D=p.PartFingerprints.collect(w,this._viewHelper.viewDomNode);return!!(c.isChildOfContentWidgets(D)||c.isChildOfOverflowingContentWidgets(D)||c.isChildOfOverlayWidgets(D))}createMouseTarget(m,w,D,y,T){const _=new l(this._context,this._viewHelper,m),L=new d(_,w,D,y,T);try{return o._createMouseTarget(_,L,!1)}catch{return L.fulfillUnknown()}}static _createMouseTarget(m,w,D){if(w.target===null){if(D)return w.fulfillUnknown();const _=o._doHitTest(m,w);return _.type===1?o.createMouseTargetFromHitTestPosition(m,w,_.spanNode,_.position,_.injectedText):this._createMouseTarget(m,w.withTarget(_.hitTarget),!0)}const y=w;let T=null;return T=T||o._hitTestContentWidget(m,y),T=T||o._hitTestOverlayWidget(m,y),T=T||o._hitTestMinimap(m,y),T=T||o._hitTestScrollbarSlider(m,y),T=T||o._hitTestViewZone(m,y),T=T||o._hitTestMargin(m,y),T=T||o._hitTestViewCursor(m,y),T=T||o._hitTestTextArea(m,y),T=T||o._hitTestViewLines(m,y,D),T=T||o._hitTestScrollbar(m,y),T||w.fulfillUnknown()}static _hitTestContentWidget(m,w){if(c.isChildOfContentWidgets(w.targetPath)||c.isChildOfOverflowingContentWidgets(w.targetPath)){const D=m.findAttribute(w.target,"widgetId");return D?w.fulfillContentWidget(D):w.fulfillUnknown()}return null}static _hitTestOverlayWidget(m,w){if(c.isChildOfOverlayWidgets(w.targetPath)){const D=m.findAttribute(w.target,"widgetId");return D?w.fulfillOverlayWidget(D):w.fulfillUnknown()}return null}static _hitTestViewCursor(m,w){if(w.target){const D=m.lastRenderData.lastViewCursorsRenderData;for(const y of D)if(w.target===y.domNode)return w.fulfillContentText(y.position,null,{mightBeForeignElement:!1,injectedText:null})}if(w.isInContentArea){const D=m.lastRenderData.lastViewCursorsRenderData,y=w.mouseContentHorizontalOffset,T=w.mouseVerticalOffset;for(const _ of D){if(y<_.contentLeft||y>_.contentLeft+_.width)continue;const L=m.getVerticalOffsetForLineNumber(_.position.lineNumber);if(L<=T&&T<=L+_.height)return w.fulfillContentText(_.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(m,w){const D=m.getZoneAtCoord(w.mouseVerticalOffset);if(D){const y=w.isInContentArea?8:5;return w.fulfillViewZone(y,D.position,D)}return null}static _hitTestTextArea(m,w){return c.isTextArea(w.targetPath)?m.lastRenderData.lastTextareaPosition?w.fulfillContentText(m.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):w.fulfillTextarea():null}static _hitTestMargin(m,w){if(w.isInMarginArea){const D=m.getFullLineRangeAtCoord(w.mouseVerticalOffset),y=D.range.getStartPosition();let T=Math.abs(w.relativePos.x);const _={isAfterLines:D.isAfterLines,glyphMarginLeft:m.layoutInfo.glyphMarginLeft,glyphMarginWidth:m.layoutInfo.glyphMarginWidth,lineNumbersWidth:m.layoutInfo.lineNumbersWidth,offsetX:T};return T-=m.layoutInfo.glyphMarginLeft,T<=m.layoutInfo.glyphMarginWidth?w.fulfillMargin(2,y,D.range,_):(T-=m.layoutInfo.glyphMarginWidth,T<=m.layoutInfo.lineNumbersWidth?w.fulfillMargin(3,y,D.range,_):(T-=m.layoutInfo.lineNumbersWidth,w.fulfillMargin(4,y,D.range,_)))}return null}static _hitTestViewLines(m,w,D){if(!c.isChildOfViewLines(w.targetPath))return null;if(m.isInTopPadding(w.mouseVerticalOffset))return w.fulfillContentEmpty(new A.Position(1,1),n);if(m.isAfterLines(w.mouseVerticalOffset)||m.isInBottomPadding(w.mouseVerticalOffset)){const T=m.viewModel.getLineCount(),_=m.viewModel.getLineMaxColumn(T);return w.fulfillContentEmpty(new A.Position(T,_),n)}if(D){if(c.isStrictChildOfViewLines(w.targetPath)){const T=m.getLineNumberAtVerticalOffset(w.mouseVerticalOffset);if(m.viewModel.getLineLength(T)===0){const L=m.getLineWidth(T),M=a(w.mouseContentHorizontalOffset-L);return w.fulfillContentEmpty(new A.Position(T,1),M)}const _=m.getLineWidth(T);if(w.mouseContentHorizontalOffset>=_){const L=a(w.mouseContentHorizontalOffset-_),M=new A.Position(T,m.viewModel.getLineMaxColumn(T));return w.fulfillContentEmpty(M,L)}}return w.fulfillUnknown()}const y=o._doHitTest(m,w);return y.type===1?o.createMouseTargetFromHitTestPosition(m,w,y.spanNode,y.position,y.injectedText):this._createMouseTarget(m,w.withTarget(y.hitTarget),!0)}static _hitTestMinimap(m,w){if(c.isChildOfMinimap(w.targetPath)){const D=m.getLineNumberAtVerticalOffset(w.mouseVerticalOffset),y=m.viewModel.getLineMaxColumn(D);return w.fulfillScrollbar(new A.Position(D,y))}return null}static _hitTestScrollbarSlider(m,w){if(c.isChildOfScrollableElement(w.targetPath)&&w.target&&w.target.nodeType===1){const D=w.target.className;if(D&&/\b(slider|scrollbar)\b/.test(D)){const y=m.getLineNumberAtVerticalOffset(w.mouseVerticalOffset),T=m.viewModel.getLineMaxColumn(y);return w.fulfillScrollbar(new A.Position(y,T))}}return null}static _hitTestScrollbar(m,w){if(c.isChildOfScrollableElement(w.targetPath)){const D=m.getLineNumberAtVerticalOffset(w.mouseVerticalOffset),y=m.viewModel.getLineMaxColumn(D);return w.fulfillScrollbar(new A.Position(D,y))}return null}getMouseColumn(m){const w=this._context.configuration.options,D=w.get(133),y=this._context.viewLayout.getCurrentScrollLeft()+m.x-D.contentLeft;return o._getMouseColumn(y,w.get(45).typicalHalfwidthCharacterWidth)}static _getMouseColumn(m,w){return m<0?1:Math.round(m/w)+1}static createMouseTargetFromHitTestPosition(m,w,D,y,T){const _=y.lineNumber,L=y.column,M=m.getLineWidth(_);if(w.mouseContentHorizontalOffset>M){const H=a(w.mouseContentHorizontalOffset-M);return w.fulfillContentEmpty(y,H)}const O=m.visibleRangeForPosition(_,L);if(!O)return w.fulfillUnknown(y);const N=O.left;if(w.mouseContentHorizontalOffset===N)return w.fulfillContentText(y,null,{mightBeForeignElement:!!T,injectedText:T});const P=[];if(P.push({offset:O.left,column:L}),L>1){const H=m.visibleRangeForPosition(_,L-1);H&&P.push({offset:H.left,column:L-1})}const B=m.viewModel.getLineMaxColumn(_);if(L<B){const H=m.visibleRangeForPosition(_,L+1);H&&P.push({offset:H.left,column:L+1})}P.sort((H,W)=>H.offset-W.offset);const V=w.pos.toClientCoordinates(),z=D.getBoundingClientRect(),x=z.left<=V.clientX&&V.clientX<=z.right;for(let H=1;H<P.length;H++){const W=P[H-1],U=P[H];if(W.offset<=w.mouseContentHorizontalOffset&&w.mouseContentHorizontalOffset<=U.offset){const $=new k.Range(_,W.column,_,U.column),q=Math.abs(W.offset-w.mouseContentHorizontalOffset),X=Math.abs(U.offset-w.mouseContentHorizontalOffset),G=q<X?new A.Position(_,W.column):new A.Position(_,U.column);return w.fulfillContentText(G,$,{mightBeForeignElement:!x||!!T,injectedText:T})}}return w.fulfillContentText(y,null,{mightBeForeignElement:!x||!!T,injectedText:T})}static _doHitTestWithCaretRangeFromPoint(m,w){const D=m.getLineNumberAtVerticalOffset(w.mouseVerticalOffset),y=m.getVerticalOffsetForLineNumber(D),T=y+m.lineHeight;if(!(D===m.viewModel.getLineCount()&&w.mouseVerticalOffset>T)){const L=Math.floor((y+T)/2);let M=w.pos.y+(L-w.mouseVerticalOffset);M<=w.editorPos.y&&(M=w.editorPos.y+1),M>=w.editorPos.y+w.editorPos.height&&(M=w.editorPos.y+w.editorPos.height-1);const O=new t.PageCoordinates(w.pos.x,M),N=this._actualDoHitTestWithCaretRangeFromPoint(m,O.toClientCoordinates());if(N.type===1)return N}return this._actualDoHitTestWithCaretRangeFromPoint(m,w.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(m,w){const D=I.getShadowRoot(m.viewDomNode);let y;if(D?typeof D.caretRangeFromPoint>"u"?y=g(D,w.clientX,w.clientY):y=D.caretRangeFromPoint(w.clientX,w.clientY):y=document.caretRangeFromPoint(w.clientX,w.clientY),!y||!y.startContainer)return new C;const T=y.startContainer;if(T.nodeType===T.TEXT_NODE){const _=T.parentNode,L=_?_.parentNode:null,M=L?L.parentNode:null;return(M&&M.nodeType===M.ELEMENT_NODE?M.className:null)===R.ViewLine.CLASS_NAME?u.createFromDOMInfo(m,_,y.startOffset):new C(T.parentNode)}else if(T.nodeType===T.ELEMENT_NODE){const _=T.parentNode,L=_?_.parentNode:null;return(L&&L.nodeType===L.ELEMENT_NODE?L.className:null)===R.ViewLine.CLASS_NAME?u.createFromDOMInfo(m,T,T.textContent.length):new C(T)}return new C}static _doHitTestWithCaretPositionFromPoint(m,w){const D=document.caretPositionFromPoint(w.clientX,w.clientY);if(D.offsetNode.nodeType===D.offsetNode.TEXT_NODE){const y=D.offsetNode.parentNode,T=y?y.parentNode:null,_=T?T.parentNode:null;return(_&&_.nodeType===_.ELEMENT_NODE?_.className:null)===R.ViewLine.CLASS_NAME?u.createFromDOMInfo(m,D.offsetNode.parentNode,D.offset):new C(D.offsetNode.parentNode)}if(D.offsetNode.nodeType===D.offsetNode.ELEMENT_NODE){const y=D.offsetNode.parentNode,T=y&&y.nodeType===y.ELEMENT_NODE?y.className:null,_=y?y.parentNode:null,L=_&&_.nodeType===_.ELEMENT_NODE?_.className:null;if(T===R.ViewLine.CLASS_NAME){const M=D.offsetNode.childNodes[Math.min(D.offset,D.offsetNode.childNodes.length-1)];if(M)return u.createFromDOMInfo(m,M,0)}else if(L===R.ViewLine.CLASS_NAME)return u.createFromDOMInfo(m,D.offsetNode,0)}return new C(D.offsetNode)}static _snapToSoftTabBoundary(m,w){const D=w.getLineContent(m.lineNumber),{tabSize:y}=w.model.getOptions(),T=b.AtomicTabMoveOperations.atomicPosition(D,m.column-1,y,2);return T!==-1?new A.Position(m.lineNumber,T+1):m}static _doHitTest(m,w){let D=new C;if(typeof document.caretRangeFromPoint=="function"?D=this._doHitTestWithCaretRangeFromPoint(m,w):document.caretPositionFromPoint&&(D=this._doHitTestWithCaretPositionFromPoint(m,w.pos.toClientCoordinates())),D.type===1){const y=m.viewModel.getInjectedTextAt(D.position),T=m.viewModel.normalizePosition(D.position,2);(y||!T.equals(D.position))&&(D=new r(T,D.spanNode,y))}return D.type===1&&m.stickyTabStops&&(D=new r(this._snapToSoftTabBoundary(D.position,m.viewModel),D.spanNode,D.injectedText)),D}}e.MouseTargetFactory=o;function g(v,m,w){const D=document.createRange();let y=v.elementFromPoint(m,w);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(),_=window.getComputedStyle(y,null).getPropertyValue("font"),L=y.innerText;let M=T.left,O=0,N;if(m>T.left+T.width)O=L.length;else{const P=h.getInstance();for(let B=0;B<L.length+1;B++){if(N=P.getCharWidth(L.charAt(B),_)/2,M+=N,m<M){O=B;break}M+=N}}D.setStart(y.firstChild,O),D.setEnd(y.firstChild,O)}return D}e.shadowCaretRangeFromPoint=g;class h{static getInstance(){return h._INSTANCE||(h._INSTANCE=new h),h._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(m,w){const D=m+w;if(this._cache[D])return this._cache[D];const y=this._canvas.getContext("2d");y.font=w;const _=y.measureText(m).width;return this._cache[D]=_,_}}h._INSTANCE=null}),define(ae[2146],le([1,0,10,139,2,14,811,430,491,50,85,411]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MouseHandler=void 0;class r extends C.ViewEventHandler{constructor(s,d,n){super(),this._mouseLeaveMonitor=null,this._context=s,this.viewController=d,this.viewHelper=n,this.mouseTargetFactory=new k.MouseTargetFactory(this._context,n),this._mouseDownOperation=this._register(new u(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(h,v)=>this._createMouseTarget(h,v),h=>this._getMouseColumn(h))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(133).height;const a=new E.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(a.onContextMenu(this.viewHelper.viewDomNode,h=>this._onContextMenu(h,!0))),this._register(a.onMouseMove(this.viewHelper.viewDomNode,h=>{this._onMouseMove(h),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=t.addDisposableListener(document,"mousemove",v=>{this.viewHelper.viewDomNode.contains(v.target)||this._onMouseLeave(new E.EditorMouseEvent(v,!1,this.viewHelper.viewDomNode))}))})),this._register(a.onMouseUp(this.viewHelper.viewDomNode,h=>this._onMouseUp(h))),this._register(a.onMouseLeave(this.viewHelper.viewDomNode,h=>this._onMouseLeave(h)));let o=0;this._register(a.onPointerDown(this.viewHelper.viewDomNode,(h,v)=>{o=v})),this._register(t.addDisposableListener(this.viewHelper.viewDomNode,t.EventType.POINTER_UP,h=>{this._mouseDownOperation.onPointerUp()})),this._register(a.onMouseDown(this.viewHelper.viewDomNode,h=>this._onMouseDown(h,o)));const g=h=>{if(this.viewController.emitMouseWheel(h),!this._context.configuration.options.get(69))return;const v=new p.StandardWheelEvent(h);if(A.isMacintosh?(h.metaKey||h.ctrlKey)&&!h.shiftKey&&!h.altKey:h.ctrlKey&&!h.metaKey&&!h.shiftKey&&!h.altKey){const w=I.EditorZoom.getZoomLevel(),D=v.deltaY>0?1:-1;I.EditorZoom.setZoomLevel(w+D),v.preventDefault(),v.stopPropagation()}};this._register(t.addDisposableListener(this.viewHelper.viewDomNode,t.EventType.MOUSE_WHEEL,g,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(s){if(s.hasChanged(133)){const d=this._context.configuration.options.get(133).height;this._height!==d&&(this._height=d,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(s){return this._mouseDownOperation.onCursorStateChanged(s),!1}onFocusChanged(s){return!1}getTargetAtClientPoint(s,d){const a=new E.ClientCoordinates(s,d).toPageCoordinates(),o=(0,E.createEditorPagePosition)(this.viewHelper.viewDomNode);if(a.y<o.y||a.y>o.y+o.height||a.x<o.x||a.x>o.x+o.width)return null;const g=(0,E.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,o,a);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),o,a,g,null)}_createMouseTarget(s,d){let n=s.target;if(!this.viewHelper.viewDomNode.contains(n)){const a=t.getShadowRoot(this.viewHelper.viewDomNode);a&&(n=a.elementsFromPoint(s.posx,s.posy).find(o=>this.viewHelper.viewDomNode.contains(o)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s.editorPos,s.pos,s.relativePos,d?n:null)}_getMouseColumn(s){return this.mouseTargetFactory.getMouseColumn(s.relativePos)}_onContextMenu(s,d){this.viewController.emitContextMenu({event:s,target:this._createMouseTarget(s,d)})}_onMouseMove(s){this.mouseTargetFactory.mouseTargetIsWidget(s)||s.preventDefault(),!(this._mouseDownOperation.isActive()||s.timestamp<this.lastMouseLeaveTime)&&this.viewController.emitMouseMove({event:s,target:this._createMouseTarget(s,!0)})}_onMouseLeave(s){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:s,target:null})}_onMouseUp(s){this.viewController.emitMouseUp({event:s,target:this._createMouseTarget(s,!0)})}_onMouseDown(s,d){const n=this._createMouseTarget(s,!0),a=n.type===6||n.type===7,o=n.type===2||n.type===3||n.type===4,g=n.type===3,h=this._context.configuration.options.get(99),v=n.type===8||n.type===5,m=n.type===9;let w=s.leftButton||s.middleButton;A.isMacintosh&&s.leftButton&&s.ctrlKey&&(w=!1);const D=()=>{s.preventDefault(),this.viewHelper.focusTextArea()};if(w&&(a||g&&h))D(),this._mouseDownOperation.start(n.type,s,d);else if(o)s.preventDefault();else if(v){const y=n.detail;w&&this.viewHelper.shouldSuppressMouseDownOnViewZone(y.viewZoneId)&&(D(),this._mouseDownOperation.start(n.type,s,d),s.preventDefault())}else m&&this.viewHelper.shouldSuppressMouseDownOnWidget(n.detail)&&(D(),s.preventDefault());this.viewController.emitMouseDown({event:s,target:n})}_onMouseWheel(s){this.viewController.emitMouseWheel(s)}}e.MouseHandler=r;class u extends R.Disposable{constructor(s,d,n,a,o,g){super(),this._context=s,this._viewController=d,this._viewHelper=n,this._mouseTargetFactory=a,this._createMouseTarget=o,this._getMouseColumn=g,this._mouseMoveMonitor=this._register(new E.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new i(this._context,this._viewHelper,this._mouseTargetFactory,(h,v,m)=>this._dispatchMouse(h,v,m))),this._mouseState=new c,this._currentSelection=new S.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(s){this._lastMouseEvent=s,this._mouseState.setModifiers(s);const d=this._findMousePosition(s,!1);!d||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:s,target:d}):d.type===13&&(d.outsidePosition==="above"||d.outsidePosition==="below")?this._topBottomDragScrolling.start(d,s):(this._topBottomDragScrolling.stop(),this._dispatchMouse(d,!0,1)))}start(s,d,n){this._lastMouseEvent=d,this._mouseState.setStartedOnLineNumbers(s===3),this._mouseState.setStartButtons(d),this._mouseState.setModifiers(d);const a=this._findMousePosition(d,!0);if(!a||!a.position)return;this._mouseState.trySetCount(d.detail,a.position),d.detail=this._mouseState.count;const o=this._context.configuration.options;if(!o.get(82)&&o.get(31)&&!o.get(18)&&!this._mouseState.altKey&&d.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,n,d.buttons,g=>this._onMouseDownThenMove(g),g=>{const h=this._findMousePosition(this._lastMouseEvent,!1);g&&g instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:h?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(a,d.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,n,d.buttons,g=>this._onMouseDownThenMove(g),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(s){this._currentSelection=s.selections[0]}_getPositionOutsideEditor(s){const d=s.editorPos,n=this._context.viewModel,a=this._context.viewLayout,o=this._getMouseColumn(s);if(s.posy<d.y){const h=d.y-s.posy,v=Math.max(a.getCurrentScrollTop()-h,0),m=k.HitTestContext.getZoneAtCoord(this._context,v);if(m){const D=this._helpPositionJumpOverViewZone(m);if(D)return k.MouseTarget.createOutsideEditor(o,D,"above",h)}const w=a.getLineNumberAtVerticalOffset(v);return k.MouseTarget.createOutsideEditor(o,new b.Position(w,1),"above",h)}if(s.posy>d.y+d.height){const h=s.posy-d.y-d.height,v=a.getCurrentScrollTop()+s.relativePos.y,m=k.HitTestContext.getZoneAtCoord(this._context,v);if(m){const D=this._helpPositionJumpOverViewZone(m);if(D)return k.MouseTarget.createOutsideEditor(o,D,"below",h)}const w=a.getLineNumberAtVerticalOffset(v);return k.MouseTarget.createOutsideEditor(o,new b.Position(w,n.getLineMaxColumn(w)),"below",h)}const g=a.getLineNumberAtVerticalOffset(a.getCurrentScrollTop()+s.relativePos.y);if(s.posx<d.x){const h=d.x-s.posx;return k.MouseTarget.createOutsideEditor(o,new b.Position(g,1),"left",h)}if(s.posx>d.x+d.width){const h=s.posx-d.x-d.width;return k.MouseTarget.createOutsideEditor(o,new b.Position(g,n.getLineMaxColumn(g)),"right",h)}return null}_findMousePosition(s,d){const n=this._getPositionOutsideEditor(s);if(n)return n;const a=this._createMouseTarget(s,d);if(!a.position)return null;if(a.type===8||a.type===5){const g=this._helpPositionJumpOverViewZone(a.detail);if(g)return k.MouseTarget.createViewZone(a.type,a.element,a.mouseColumn,g,a.detail)}return a}_helpPositionJumpOverViewZone(s){const d=new b.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),n=s.positionBefore,a=s.positionAfter;return n&&a?n.isBefore(d)?n:a:null}_dispatchMouse(s,d,n){!s.position||this._viewController.dispatchMouse({position:s.position,mouseColumn:s.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:n,inSelectionMode:d,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:s.type===6&&s.detail.injectedText!==null})}}class i extends R.Disposable{constructor(s,d,n,a){super(),this._context=s,this._viewHelper=d,this._mouseTargetFactory=n,this._dispatchMouse=a,this._operation=null}dispose(){super.dispose(),this.stop()}start(s,d){this._operation?this._operation.setPosition(s,d):this._operation=new f(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,s,d)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class f extends R.Disposable{constructor(s,d,n,a,o,g){super(),this._context=s,this._viewHelper=d,this._mouseTargetFactory=n,this._dispatchMouse=a,this._position=o,this._mouseEvent=g,this._lastTime=Date.now(),this._animationFrameDisposable=t.scheduleAtNextAnimationFrame(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(s,d){this._position=s,this._mouseEvent=d}_tick(){const s=Date.now(),d=s-this._lastTime;return this._lastTime=s,d}_getScrollSpeed(){const s=this._context.configuration.options.get(60),d=this._context.configuration.options.get(133).height/s,n=this._position.outsideDistance/s;return n<=1.5?Math.max(30,d*(1+n)):n<=3?Math.max(60,d*(2+n)):Math.max(200,d*(7+n))}_execute(){const s=this._context.configuration.options.get(60),d=this._getScrollSpeed(),n=this._tick(),a=d*(n/1e3)*s,o=this._position.outsidePosition==="above"?-a:a;this._context.viewModel.viewLayout.deltaScrollNow(0,o),this._viewHelper.renderNow();const g=this._context.viewLayout.getLinesViewportData(),h=this._position.outsidePosition==="above"?g.startLineNumber:g.endLineNumber;let v;{const m=(0,E.createEditorPagePosition)(this._viewHelper.viewDomNode),w=this._context.configuration.options.get(133).horizontalScrollbarHeight,D=new E.PageCoordinates(this._mouseEvent.pos.x,m.y+m.height-w-.1),y=(0,E.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,m,D);v=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),m,D,y,null)}(!v.position||v.position.lineNumber!==h)&&(this._position.outsidePosition==="above"?v=k.MouseTarget.createOutsideEditor(this._position.mouseColumn,new b.Position(h,1),"above",this._position.outsideDistance):v=k.MouseTarget.createOutsideEditor(this._position.mouseColumn,new b.Position(h,this._context.viewModel.getLineMaxColumn(h)),"below",this._position.outsideDistance)),this._dispatchMouse(v,!0,2),this._animationFrameDisposable=t.scheduleAtNextAnimationFrame(()=>this._execute())}}class c{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}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 count(){return this._lastMouseDownCount}setModifiers(s){this._altKey=s.altKey,this._ctrlKey=s.ctrlKey,this._metaKey=s.metaKey,this._shiftKey=s.shiftKey}setStartButtons(s){this._leftButton=s.leftButton,this._middleButton=s.middleButton}setStartedOnLineNumbers(s){this._startedOnLineNumbers=s}trySetCount(s,d){const n=new Date().getTime();n-this._lastSetMouseDownCountTime>c.CLEAR_MOUSE_DOWN_COUNT_TIME&&(s=1),this._lastSetMouseDownCountTime=n,s>this._lastMouseDownCount+1&&(s=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(d)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=d,this._lastMouseDownCount=Math.min(s,this._lastMouseDownPositionEqualCount)}}c.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(ae[2147],le([1,0,10,14,133,2,2146,430,237,584]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class S extends k.MouseHandler{constructor(i,f,c){super(i,f,c),this._register(R.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,R.EventType.Tap,s=>this.onTap(s))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,R.EventType.Change,s=>this.onChange(s))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,R.EventType.Contextmenu,s=>this._onContextMenu(new E.EditorMouseEvent(s,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const d=s.pointerType;if(d==="mouse"){this._lastPointerType="mouse";return}else d==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const l=new E.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(l.onPointerMove(this.viewHelper.viewDomNode,s=>this._onMouseMove(s))),this._register(l.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(l.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(l.onPointerDown(this.viewHelper.viewDomNode,(s,d)=>this._onMouseDown(s,d)))}onTap(i){if(!i.initialTarget||!this.viewHelper.linesContentDomNode.contains(i.initialTarget))return;i.preventDefault(),this.viewHelper.focusTextArea();const f=this._createMouseTarget(new E.EditorMouseEvent(i,!1,this.viewHelper.viewDomNode),!1);f.position&&this.viewController.dispatchMouse({position:f.position,mouseColumn:f.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:i.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:f.type===6&&f.detail.injectedText!==null})}onChange(i){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-i.translationX,-i.translationY)}_onMouseDown(i,f){i.browserEvent.pointerType!=="touch"&&super._onMouseDown(i,f)}}e.PointerEventHandler=S;class C extends k.MouseHandler{constructor(i,f,c){super(i,f,c),this._register(R.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,R.EventType.Tap,l=>this.onTap(l))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,R.EventType.Change,l=>this.onChange(l))),this._register(t.addDisposableListener(this.viewHelper.linesContentDomNode,R.EventType.Contextmenu,l=>this._onContextMenu(new E.EditorMouseEvent(l,!1,this.viewHelper.viewDomNode),!1)))}onTap(i){i.preventDefault(),this.viewHelper.focusTextArea();const f=this._createMouseTarget(new E.EditorMouseEvent(i,!1,this.viewHelper.viewDomNode),!1);if(f.position){const c=document.createEvent("CustomEvent");c.initEvent(b.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(c),this.viewController.moveTo(f.position,1)}}onChange(i){this._context.viewModel.viewLayout.deltaScrollNow(-i.translationX,-i.translationY)}}class r extends A.Disposable{constructor(i,f,c){super(),p.isIOS&&I.BrowserFeatures.pointerEvents?this.handler=this._register(new S(i,f,c)):window.TouchEvent?this.handler=this._register(new C(i,f,c)):this.handler=this._register(new k.MouseHandler(i,f,c))}getTargetAtClientPoint(i,f){return this.handler.getTargetAtClientPoint(i,f)}}e.PointerHandler=r}),define(ae[2148],le([1,0,14,11,235,586,180,810,50,20,408,324,1063]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class r{constructor(){this._currentVisibleRange=new b.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(l){this._currentVisibleRange=l}}class u{constructor(l,s,d,n,a,o,g){this.minimalReveal=l,this.lineNumber=s,this.startColumn=d,this.endColumn=n,this.startScrollTop=a,this.stopScrollTop=o,this.scrollType=g,this.type="range",this.minLineNumber=s,this.maxLineNumber=s}}class i{constructor(l,s,d,n,a){this.minimalReveal=l,this.selections=s,this.startScrollTop=d,this.stopScrollTop=n,this.scrollType=a,this.type="selections";let o=s[0].startLineNumber,g=s[0].endLineNumber;for(let h=1,v=s.length;h<v;h++){const m=s[h];o=Math.min(o,m.startLineNumber),g=Math.max(g,m.endLineNumber)}this.minLineNumber=o,this.maxLineNumber=g}}class f extends k.ViewPart{constructor(l,s){super(l),this._linesContent=s,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new A.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const d=this._context.configuration,n=this._context.configuration.options,a=n.get(45),o=n.get(134);this._lineHeight=n.get(60),this._typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=n.get(90),this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),this._viewLineOptions=new E.ViewLineOptions(d,this._context.theme.type),k.PartFingerprints.write(this.domNode,7),this.domNode.setClassName(`view-lines ${C.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),(0,R.applyFontInfo)(this.domNode,a),this._maxLineWidth=0,this._asyncUpdateLineWidths=new p.RunOnceScheduler(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new p.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new r,this._horizontalRevealRequest=null,this._stickyScrollEnabled=n.get(105).enabled,this._maxNumberStickyLines=n.get(105).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new E.ViewLine(this._viewLineOptions)}onConfigurationChanged(l){this._visibleLines.onConfigurationChanged(l),l.hasChanged(134)&&(this._maxLineWidth=0);const s=this._context.configuration.options,d=s.get(45),n=s.get(134);return this._lineHeight=s.get(60),this._typicalHalfwidthCharacterWidth=d.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=s.get(90),this._cursorSurroundingLines=s.get(25),this._cursorSurroundingLinesStyle=s.get(26),this._canUseLayerHinting=!s.get(28),this._stickyScrollEnabled=s.get(105).enabled,this._maxNumberStickyLines=s.get(105).maxLineCount,(0,R.applyFontInfo)(this.domNode,d),this._onOptionsMaybeChanged(),l.hasChanged(133)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const l=this._context.configuration,s=new E.ViewLineOptions(l,this._context.theme.type);if(!this._viewLineOptions.equals(s)){this._viewLineOptions=s;const d=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let a=d;a<=n;a++)this._visibleLines.getVisibleLine(a).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(l){const s=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();let n=!1;for(let a=s;a<=d;a++)n=this._visibleLines.getVisibleLine(a).onSelectionChanged()||n;return n}onDecorationsChanged(l){{const s=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let n=s;n<=d;n++)this._visibleLines.getVisibleLine(n).onDecorationsChanged()}return!0}onFlushed(l){const s=this._visibleLines.onFlushed(l);return this._maxLineWidth=0,s}onLinesChanged(l){return this._visibleLines.onLinesChanged(l)}onLinesDeleted(l){return this._visibleLines.onLinesDeleted(l)}onLinesInserted(l){return this._visibleLines.onLinesInserted(l)}onRevealRangeRequest(l){const s=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),l.source,l.minimalReveal,l.range,l.selections,l.verticalType);if(s===-1)return!1;let d=this._context.viewLayout.validateScrollPosition({scrollTop:s});l.revealHorizontal?l.range&&l.range.startLineNumber!==l.range.endLineNumber?d={scrollTop:d.scrollTop,scrollLeft:0}:l.range?this._horizontalRevealRequest=new u(l.minimalReveal,l.range.startLineNumber,l.range.startColumn,l.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),d.scrollTop,l.scrollType):l.selections&&l.selections.length>0&&(this._horizontalRevealRequest=new i(l.minimalReveal,l.selections,this._context.viewLayout.getCurrentScrollTop(),d.scrollTop,l.scrollType)):this._horizontalRevealRequest=null;const a=Math.abs(this._context.viewLayout.getCurrentScrollTop()-d.scrollTop)<=this._lineHeight?1:l.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(d,a),!0}onScrollChanged(l){if(this._horizontalRevealRequest&&l.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&l.scrollTopChanged){const s=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),d=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(l.scrollTop<s||l.scrollTop>d)&&(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,s){const d=this._getViewLineDomNode(l);if(d===null)return null;const n=this._getLineNumberFor(d);if(n===-1||n<1||n>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(n)===1)return new I.Position(n,1);const a=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<a||n>o)return null;let g=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,l,s);const h=this._context.viewModel.getLineMinColumn(n);return g<h&&(g=h),new I.Position(n,g)}_getViewLineDomNode(l){for(;l&&l.nodeType===1;){if(l.className===E.ViewLine.CLASS_NAME)return l;l=l.parentElement}return null}_getLineNumberFor(l){const s=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let n=s;n<=d;n++){const a=this._visibleLines.getVisibleLine(n);if(l===a.getDomNode())return n}return-1}getLineWidth(l){const s=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();return l<s||l>d?-1:this._visibleLines.getVisibleLine(l).getWidth()}linesVisibleRangesForRange(l,s){if(this.shouldRender())return null;const d=l.endLineNumber,n=b.Range.intersectRanges(l,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;const a=[];let o=0;const g=new E.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let h=0;s&&(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(n.startLineNumber,1)).lineNumber);const v=this._visibleLines.getStartLineNumber(),m=this._visibleLines.getEndLineNumber();for(let w=n.startLineNumber;w<=n.endLineNumber;w++){if(w<v||w>m)continue;const D=w===n.startLineNumber?n.startColumn:1,y=w===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(w),T=this._visibleLines.getVisibleLine(w).getVisibleRangesForRange(w,D,y,g);if(!!T){if(s&&w<d){const _=h;h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(w+1,1)).lineNumber,_!==h&&(T.ranges[T.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}a[o++]=new S.LineVisibleRanges(T.outsideRenderedLine,w,S.HorizontalRange.from(T.ranges))}}return o===0?null:a}_visibleRangesForLineRange(l,s,d){return this.shouldRender()||l<this._visibleLines.getStartLineNumber()||l>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(l).getVisibleRangesForRange(l,s,d,new E.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(l){const s=this._visibleRangesForLineRange(l.lineNumber,l.column,l.column);return s?new S.HorizontalPosition(s.outsideRenderedLine,s.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(l){const s=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();let n=1,a=!0;for(let o=s;o<=d;o++){const g=this._visibleLines.getVisibleLine(o);if(l&&!g.getWidthIsFast()){a=!1;continue}n=Math.max(n,g.getWidth())}return a&&s===1&&d===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),a}_checkMonospaceFontAssumptions(){let l=-1,s=-1;const d=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let a=d;a<=n;a++){const o=this._visibleLines.getVisibleLine(a);if(o.needsMonospaceFontCheck()){const g=o.getWidth();g>s&&(s=g,l=a)}}if(l!==-1&&!this._visibleLines.getVisibleLine(l).monospaceAssumptionsAreValid())for(let a=d;a<=n;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 d=this._horizontalRevealRequest;if(l.startLineNumber<=d.minLineNumber&&d.maxLineNumber<=l.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(d);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:n.scrollLeft},d.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),t.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const d=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let a=d;a<=n;a++)if(this._visibleLines.getVisibleLine(a).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const s=this._context.viewLayout.getCurrentScrollTop()-l.bigNumbersDelta;this._linesContent.setTop(-s),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(l){const s=Math.ceil(l);this._maxLineWidth<s&&(this._maxLineWidth=s,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(l,s,d,n,a,o){const g=l.top,h=l.height,v=g+h;let m,w,D;if(a&&a.length>0){let M=a[0].startLineNumber,O=a[0].endLineNumber;for(let N=1,P=a.length;N<P;N++){const B=a[N];M=Math.min(M,B.startLineNumber),O=Math.max(O,B.endLineNumber)}m=!1,w=this._context.viewLayout.getVerticalOffsetForLineNumber(M),D=this._context.viewLayout.getVerticalOffsetForLineNumber(O)+this._lineHeight}else if(n)m=!0,w=this._context.viewLayout.getVerticalOffsetForLineNumber(n.startLineNumber),D=this._context.viewLayout.getVerticalOffsetForLineNumber(n.endLineNumber)+this._lineHeight;else return-1;const y=(s==="mouse"||d)&&this._cursorSurroundingLinesStyle==="default";let T=0,_=0;if(y)d||(T=this._lineHeight);else{const M=Math.min(h/this._lineHeight/2,this._cursorSurroundingLines);this._stickyScrollEnabled?T=Math.max(M,this._maxNumberStickyLines)*this._lineHeight:T=M*this._lineHeight,_=Math.max(0,M-1)*this._lineHeight}d||(o===0||o===4)&&(_+=this._lineHeight),w-=T,D+=_;let L;if(D-w>h){if(!m)return-1;L=w}else if(o===5||o===6)if(o===6&&g<=w&&D<=v)L=g;else{const M=Math.max(5*this._lineHeight,h*.2),O=w-M,N=D-h;L=Math.max(N,O)}else if(o===1||o===2)if(o===2&&g<=w&&D<=v)L=g;else{const M=(w+D)/2;L=Math.max(0,M-h/2)}else L=this._computeMinimumScrolling(g,v,w,D,o===3,o===4);return L}_computeScrollLeftToReveal(l){const s=this._context.viewLayout.getCurrentViewport(),d=this._context.configuration.options.get(133),n=s.left,a=n+s.width-d.verticalScrollbarWidth;let o=1073741824,g=0;if(l.type==="range"){const v=this._visibleRangesForLineRange(l.lineNumber,l.startColumn,l.endColumn);if(!v)return null;for(const m of v.ranges)o=Math.min(o,Math.round(m.left)),g=Math.max(g,Math.round(m.left+m.width))}else for(const v of l.selections){if(v.startLineNumber!==v.endLineNumber)return null;const m=this._visibleRangesForLineRange(v.startLineNumber,v.startColumn,v.endColumn);if(!m)return null;for(const w of m.ranges)o=Math.min(o,Math.round(w.left)),g=Math.max(g,Math.round(w.left+w.width))}return l.minimalReveal||(o=Math.max(0,o-f.HORIZONTAL_EXTRA_PX),g+=this._revealHorizontalRightPadding),l.type==="selections"&&g-o>s.width?null:{scrollLeft:this._computeMinimumScrolling(n,a,o,g),maxHorizontalOffset:g}}_computeMinimumScrolling(l,s,d,n,a,o){l=l|0,s=s|0,d=d|0,n=n|0,a=!!a,o=!!o;const g=s-l;if(n-d<g){if(a)return d;if(o)return Math.max(0,n-g);if(d<l)return d;if(n>s)return Math.max(0,n-g)}else return d;return l}}e.ViewLines=f,f.HORIZONTAL_EXTRA_PX=30}),define(ae[73],le([1,0,65,33,126]),function(J,e,t,p,R){"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(n,a){const o=Object.create(null);for(const g in a){const h=a[g];h&&(o[g]=(0,p.resolveColorValue)(h,n))}return o}e.computeStyles=A;function k(n,a,o){function g(){const h=A(n.getColorTheme(),a);typeof o=="function"?o(h):o.style(h)}return g(),n.onDidColorThemeChange(g)}e.attachStyler=k;function E(n,a,o){return k(a,{inputActiveOptionBorder:o?.inputActiveOptionBorderColor||p.inputActiveOptionBorder,inputActiveOptionForeground:o?.inputActiveOptionForegroundColor||p.inputActiveOptionForeground,inputActiveOptionBackground:o?.inputActiveOptionBackgroundColor||p.inputActiveOptionBackground},n)}e.attachToggleStyler=E;function I(n,a,o){return k(a,{badgeBackground:o?.badgeBackground||p.badgeBackground,badgeForeground:o?.badgeForeground||p.badgeForeground,badgeBorder:p.contrastBorder},n)}e.attachBadgeStyler=I;function b(n,a,o){return k(a,{inputBackground:o?.inputBackground||p.inputBackground,inputForeground:o?.inputForeground||p.inputForeground,inputBorder:o?.inputBorder||p.inputBorder,inputValidationInfoBorder:o?.inputValidationInfoBorder||p.inputValidationInfoBorder,inputValidationInfoBackground:o?.inputValidationInfoBackground||p.inputValidationInfoBackground,inputValidationInfoForeground:o?.inputValidationInfoForeground||p.inputValidationInfoForeground,inputValidationWarningBorder:o?.inputValidationWarningBorder||p.inputValidationWarningBorder,inputValidationWarningBackground:o?.inputValidationWarningBackground||p.inputValidationWarningBackground,inputValidationWarningForeground:o?.inputValidationWarningForeground||p.inputValidationWarningForeground,inputValidationErrorBorder:o?.inputValidationErrorBorder||p.inputValidationErrorBorder,inputValidationErrorBackground:o?.inputValidationErrorBackground||p.inputValidationErrorBackground,inputValidationErrorForeground:o?.inputValidationErrorForeground||p.inputValidationErrorForeground},n)}e.attachInputBoxStyler=b;function S(n,a,o){return k(a,{selectBackground:o?.selectBackground||p.selectBackground,selectListBackground:o?.selectListBackground||p.selectListBackground,selectForeground:o?.selectForeground||p.selectForeground,decoratorRightForeground:o?.pickerGroupForeground||p.pickerGroupForeground,selectBorder:o?.selectBorder||p.selectBorder,focusBorder:o?.focusBorder||p.focusBorder,listFocusBackground:o?.listFocusBackground||p.quickInputListFocusBackground,listInactiveSelectionIconForeground:o?.listInactiveSelectionIconForeground||p.quickInputListFocusIconForeground,listFocusForeground:o?.listFocusForeground||p.quickInputListFocusForeground,listFocusOutline:o?.listFocusOutline||(g=>(0,R.isHighContrast)(g.type)?p.activeContrastBorder:t.Color.transparent),listHoverBackground:o?.listHoverBackground||p.listHoverBackground,listHoverForeground:o?.listHoverForeground||p.listHoverForeground,listHoverOutline:o?.listFocusOutline||p.activeContrastBorder,selectListBorder:o?.selectListBorder||p.editorWidgetBorder},n)}e.attachSelectBoxStyler=S;function C(n,a,o){return k(a,{inputBackground:o?.inputBackground||p.inputBackground,inputForeground:o?.inputForeground||p.inputForeground,inputBorder:o?.inputBorder||p.inputBorder,inputActiveOptionBorder:o?.inputActiveOptionBorder||p.inputActiveOptionBorder,inputActiveOptionForeground:o?.inputActiveOptionForeground||p.inputActiveOptionForeground,inputActiveOptionBackground:o?.inputActiveOptionBackground||p.inputActiveOptionBackground,inputValidationInfoBorder:o?.inputValidationInfoBorder||p.inputValidationInfoBorder,inputValidationInfoBackground:o?.inputValidationInfoBackground||p.inputValidationInfoBackground,inputValidationInfoForeground:o?.inputValidationInfoForeground||p.inputValidationInfoForeground,inputValidationWarningBorder:o?.inputValidationWarningBorder||p.inputValidationWarningBorder,inputValidationWarningBackground:o?.inputValidationWarningBackground||p.inputValidationWarningBackground,inputValidationWarningForeground:o?.inputValidationWarningForeground||p.inputValidationWarningForeground,inputValidationErrorBorder:o?.inputValidationErrorBorder||p.inputValidationErrorBorder,inputValidationErrorBackground:o?.inputValidationErrorBackground||p.inputValidationErrorBackground,inputValidationErrorForeground:o?.inputValidationErrorForeground||p.inputValidationErrorForeground},n)}e.attachFindReplaceInputBoxStyler=C;function r(n,a,o){return k(a,{...e.defaultListStyles,...o||{}},n)}e.attachListStyler=r,e.defaultListStyles={listFocusBackground:p.listFocusBackground,listFocusForeground:p.listFocusForeground,listFocusOutline:p.listFocusOutline,listActiveSelectionBackground:p.listActiveSelectionBackground,listActiveSelectionForeground:p.listActiveSelectionForeground,listActiveSelectionIconForeground:p.listActiveSelectionIconForeground,listFocusAndSelectionOutline:p.listFocusAndSelectionOutline,listFocusAndSelectionBackground:p.listActiveSelectionBackground,listFocusAndSelectionForeground:p.listActiveSelectionForeground,listInactiveSelectionBackground:p.listInactiveSelectionBackground,listInactiveSelectionIconForeground:p.listInactiveSelectionIconForeground,listInactiveSelectionForeground:p.listInactiveSelectionForeground,listInactiveFocusBackground:p.listInactiveFocusBackground,listInactiveFocusOutline:p.listInactiveFocusOutline,listHoverBackground:p.listHoverBackground,listHoverForeground:p.listHoverForeground,listDropBackground:p.listDropBackground,listSelectionOutline:p.activeContrastBorder,listHoverOutline:p.activeContrastBorder,listFilterWidgetBackground:p.listFilterWidgetBackground,listFilterWidgetOutline:p.listFilterWidgetOutline,listFilterWidgetNoMatchesOutline:p.listFilterWidgetNoMatchesOutline,listFilterWidgetShadow:p.listFilterWidgetShadow,treeIndentGuidesStroke:p.treeIndentGuidesStroke,tableColumnsBorder:p.tableColumnsBorder,tableOddRowsBackgroundColor:p.tableOddRowsBackgroundColor,inputActiveOptionBorder:p.inputActiveOptionBorder,inputActiveOptionForeground:p.inputActiveOptionForeground,inputActiveOptionBackground:p.inputActiveOptionBackground,inputBackground:p.inputBackground,inputForeground:p.inputForeground,inputBorder:p.inputBorder,inputValidationInfoBackground:p.inputValidationInfoBackground,inputValidationInfoForeground:p.inputValidationInfoForeground,inputValidationInfoBorder:p.inputValidationInfoBorder,inputValidationWarningBackground:p.inputValidationWarningBackground,inputValidationWarningForeground:p.inputValidationWarningForeground,inputValidationWarningBorder:p.inputValidationWarningBorder,inputValidationErrorBackground:p.inputValidationErrorBackground,inputValidationErrorForeground:p.inputValidationErrorForeground,inputValidationErrorBorder:p.inputValidationErrorBorder};function u(n,a,o){return k(a,{buttonForeground:o?.buttonForeground||p.buttonForeground,buttonSeparator:o?.buttonSeparator||p.buttonSeparator,buttonBackground:o?.buttonBackground||p.buttonBackground,buttonHoverBackground:o?.buttonHoverBackground||p.buttonHoverBackground,buttonSecondaryForeground:o?.buttonSecondaryForeground||p.buttonSecondaryForeground,buttonSecondaryBackground:o?.buttonSecondaryBackground||p.buttonSecondaryBackground,buttonSecondaryHoverBackground:o?.buttonSecondaryHoverBackground||p.buttonSecondaryHoverBackground,buttonBorder:o?.buttonBorder||p.buttonBorder},n)}e.attachButtonStyler=u;function i(n,a,o){return k(a,{keybindingLabelBackground:o&&o.keybindingLabelBackground||p.keybindingLabelBackground,keybindingLabelForeground:o&&o.keybindingLabelForeground||p.keybindingLabelForeground,keybindingLabelBorder:o&&o.keybindingLabelBorder||p.keybindingLabelBorder,keybindingLabelBottomBorder:o&&o.keybindingLabelBottomBorder||p.keybindingLabelBottomBorder,keybindingLabelShadow:o&&o.keybindingLabelShadow||p.widgetShadow},n)}e.attachKeybindingLabelStyler=i;function f(n,a,o){return k(a,{progressBarBackground:o?.progressBarBackground||p.progressBarBackground},n)}e.attachProgressBarStyler=f;function c(n,a,o){return k(n,a,o)}e.attachStylerCallback=c,e.defaultBreadcrumbsStyles={breadcrumbsBackground:p.breadcrumbsBackground,breadcrumbsForeground:p.breadcrumbsForeground,breadcrumbsHoverForeground:p.breadcrumbsFocusForeground,breadcrumbsFocusForeground:p.breadcrumbsFocusForeground,breadcrumbsFocusAndSelectionForeground:p.breadcrumbsActiveSelectionForeground};function l(n,a,o){return k(a,{...e.defaultBreadcrumbsStyles,...o},n)}e.attachBreadcrumbsStyler=l,e.defaultMenuStyles={shadowColor:p.widgetShadow,borderColor:p.menuBorder,foregroundColor:p.menuForeground,backgroundColor:p.menuBackground,selectionForegroundColor:p.menuSelectionForeground,selectionBackgroundColor:p.menuSelectionBackground,selectionBorderColor:p.menuSelectionBorder,separatorColor:p.menuSeparatorBackground,scrollbarShadow:p.scrollbarShadow,scrollbarSliderBackground:p.scrollbarSliderBackground,scrollbarSliderHoverBackground:p.scrollbarSliderHoverBackground,scrollbarSliderActiveBackground:p.scrollbarSliderActiveBackground};function s(n,a,o){return k(a,{...e.defaultMenuStyles,...o},n)}e.attachMenuStyler=s,e.defaultDialogStyles={dialogBackground:p.editorWidgetBackground,dialogForeground:p.editorWidgetForeground,dialogShadow:p.widgetShadow,dialogBorder:p.contrastBorder,buttonForeground:p.buttonForeground,buttonSeparator:p.buttonSeparator,buttonBackground:p.buttonBackground,buttonSecondaryBackground:p.buttonSecondaryBackground,buttonSecondaryForeground:p.buttonSecondaryForeground,buttonSecondaryHoverBackground:p.buttonSecondaryHoverBackground,buttonHoverBackground:p.buttonHoverBackground,buttonBorder:p.buttonBorder,checkboxBorder:p.checkboxBorder,checkboxBackground:p.checkboxBackground,checkboxForeground:p.checkboxForeground,errorIconForeground:p.problemsErrorIconForeground,warningIconForeground:p.problemsWarningIconForeground,infoIconForeground:p.problemsInfoIconForeground,inputBackground:p.inputBackground,inputForeground:p.inputForeground,inputBorder:p.inputBorder,textLinkForeground:p.textLinkForeground};function d(n,a,o){return k(a,{...e.defaultDialogStyles,...o},n)}e.attachDialogStyler=d}),define(ae[2149],le([1,0,10,139,579,36,21,2,73]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class b{constructor(C,r,u,i,f){this.contextViewService=C,this.telemetryService=r,this.notificationService=u,this.keybindingService=i,this.themeService=f,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(C){this.options=C}showContextMenu(C){const r=C.getActions();if(!r.length)return;this.focusToReturn=document.activeElement;let u;const 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:f=>{const c=C.getMenuClassName?C.getMenuClassName():"";c&&(f.className+=" "+c),this.options.blockMouse&&(this.block=f.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,d=>d.stopPropagation()));const l=new E.DisposableStore,s=C.actionRunner||new A.ActionRunner;return s.onWillRun(this.onActionRun,this,l),s.onDidRun(this.onDidActionRun,this,l),u=new R.Menu(f,r,{actionViewItemProvider:C.getActionViewItem,context:C.getActionsContext?C.getActionsContext():null,actionRunner:s,getKeyBinding:C.getKeyBinding?C.getKeyBinding:d=>this.keybindingService.lookupKeybinding(d.id)}),l.add((0,I.attachMenuStyler)(u,this.themeService)),u.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,l),u.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,d=>{if(d.defaultPrevented)return;const n=new p.StandardMouseEvent(d);let a=n.target;if(!n.rightButton){for(;a;){if(a===f)return;a=a.parentElement}this.contextViewService.hideContextView(!0)}})),(0,E.combinedDisposable)(l,u)},focus:()=>{u?.focus(!!C.autoSelectFirstItem)},onHide:f=>{C.onHide?.(!!f),this.block&&(this.block.remove(),this.block=null),this.focusToReturn?.focus()}},i,!!i)}onActionRun(C){this.telemetryService.publicLog2("workbenchActionExecuted",{id:C.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn?.focus()}onDidActionRun(C){C.error&&!(0,k.isCancellationError)(C.error)&&this.notificationService.error(C.error)}}e.ContextMenuHandler=b}),define(ae[12],le([1,0,29,6,2,5,17,126]),function(J,e,t,p,R,A,k,E){"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(c){function l(s){return s&&typeof s=="object"&&typeof s.id=="string"}c.isThemeColor=l})(I=e.ThemeColor||(e.ThemeColor={}));function b(c){return{id:c}}e.themeColorFromId=b;var S;(function(c){function l(v){return v&&typeof v=="object"&&typeof v.id=="string"&&(typeof v.color>"u"||I.isThemeColor(v.color))}c.isThemeIcon=l;const s=new RegExp(`^\\$\\((${t.CSSIcon.iconNameExpression}(?:${t.CSSIcon.iconModifierExpression})?)\\)$`);function d(v){const m=s.exec(v);if(!m)return;const[,w]=m;return{id:w}}c.fromString=d;function n(v){return{id:v}}c.fromId=n;function a(v,m){let w=v.id;const D=w.lastIndexOf("~");return D!==-1&&(w=w.substring(0,D)),m&&(w=`${w}~${m}`),{id:w}}c.modify=a;function o(v){const m=v.id.lastIndexOf("~");if(m!==-1)return v.id.substring(m+1)}c.getModifier=o;function g(v,m){return v.id===m.id&&v.color?.id===m.color?.id}c.isEqual=g;function h(v,m){return{id:v.id,color:m?b(m):void 0}}c.asThemeIcon=h,c.asClassNameArray=t.CSSIcon.asClassNameArray,c.asClassName=t.CSSIcon.asClassName,c.asCSSSelector=t.CSSIcon.asCSSSelector})(S=e.ThemeIcon||(e.ThemeIcon={})),e.FileThemeIcon=t.Codicon.file,e.FolderThemeIcon=t.Codicon.folder;function C(c){switch(c){case E.ColorScheme.DARK:return"vs-dark";case E.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case E.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=C,e.Extensions={ThemingContribution:"base.contributions.theming"};class r{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new p.Emitter}onColorThemeChange(l){return this.themingParticipants.push(l),this.onThemingParticipantAddedEmitter.fire(l),(0,R.toDisposable)(()=>{const s=this.themingParticipants.indexOf(l);this.themingParticipants.splice(s,1)})}get onThemingParticipantAdded(){return this.onThemingParticipantAddedEmitter.event}getThemingParticipants(){return this.themingParticipants}}const u=new r;k.Registry.add(e.Extensions.ThemingContribution,u);function i(c){return u.onColorThemeChange(c)}e.registerThemingParticipant=i;class f extends R.Disposable{constructor(l){super(),this.themeService=l,this.theme=l.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(s=>this.onThemeChange(s)))}onThemeChange(l){this.theme=l,this.updateStyles()}updateStyles(){}getColor(l,s){let d=this.theme.getColor(l);return d&&s&&(d=s(d,this.theme)),d?d.toString():null}}e.Themable=f}),define(ae[2150],le([1,0,10,6,2,158,28,9,362,116,12]),function(J,e,t,p,R,A,k,E,I,b,S){"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 C=class extends R.Disposable{constructor(a){super(),this._themeService=a,this._onCodeEditorAdd=this._register(new p.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new p.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new p.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new p.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._onDidChangeTransientModelProperty=this._register(new p.Emitter),this.onDidChangeTransientModelProperty=this._onDidChangeTransientModelProperty.event,this._onDecorationTypeRegistered=this._register(new p.Emitter),this.onDecorationTypeRegistered=this._onDecorationTypeRegistered.event,this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._codeEditorOpenHandlers=new A.LinkedList,this._transientWatchers={},this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}addCodeEditor(a){this._codeEditors[a.getId()]=a,this._onCodeEditorAdd.fire(a)}removeCodeEditor(a){delete this._codeEditors[a.getId()]&&this._onCodeEditorRemove.fire(a)}listCodeEditors(){return Object.keys(this._codeEditors).map(a=>this._codeEditors[a])}addDiffEditor(a){this._diffEditors[a.getId()]=a,this._onDiffEditorAdd.fire(a)}removeDiffEditor(a){delete this._diffEditors[a.getId()]&&this._onDiffEditorRemove.fire(a)}listDiffEditors(){return Object.keys(this._diffEditors).map(a=>this._diffEditors[a])}getFocusedCodeEditor(){let a=null;const o=this.listCodeEditors();for(const g of o){if(g.hasTextFocus())return g;g.hasWidgetFocus()&&(a=g)}return a}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=this._createGlobalStyleSheet()),this._globalStyleSheet}_createGlobalStyleSheet(){return new i(t.createStyleSheet())}_getOrCreateStyleSheet(a){if(!a)return this._getOrCreateGlobalStyleSheet();const o=a.getContainerDomNode();if(!t.isInShadowDOM(o))return this._getOrCreateGlobalStyleSheet();const g=a.getId();if(!this._editorStyleSheets.has(g)){const h=new u(this,g,t.createStyleSheet(o));this._editorStyleSheets.set(g,h)}return this._editorStyleSheets.get(g)}_removeEditorStyleSheets(a){this._editorStyleSheets.delete(a)}registerDecorationType(a,o,g,h,v){let m=this._decorationOptionProviders.get(o);if(!m){const w=this._getOrCreateStyleSheet(v),D={styleSheet:w,key:o,parentTypeKey:h,options:g||Object.create(null)};h?m=new f(this._themeService,w,D):m=new c(a,this._themeService,w,D),this._decorationOptionProviders.set(o,m),this._onDecorationTypeRegistered.fire(o)}m.refCount++}listDecorationTypes(){return Array.from(this._decorationOptionProviders.keys())}removeDecorationType(a){const o=this._decorationOptionProviders.get(a);o&&(o.refCount--,o.refCount<=0&&(this._decorationOptionProviders.delete(a),o.dispose(),this.listCodeEditors().forEach(g=>g.removeDecorationsByType(a))))}resolveDecorationOptions(a,o){const g=this._decorationOptionProviders.get(a);if(!g)throw new Error("Unknown decoration type key: "+a);return g.getOptions(this,o)}resolveDecorationCSSRules(a){const o=this._decorationOptionProviders.get(a);return o?o.resolveDecorationCSSRules():null}setModelProperty(a,o,g){const h=a.toString();let v;this._modelProperties.has(h)?v=this._modelProperties.get(h):(v=new Map,this._modelProperties.set(h,v)),v.set(o,g)}getModelProperty(a,o){const g=a.toString();if(this._modelProperties.has(g))return this._modelProperties.get(g).get(o)}setTransientModelProperty(a,o,g){const h=a.uri.toString();let v;this._transientWatchers.hasOwnProperty(h)?v=this._transientWatchers[h]:(v=new r(h,a,this),this._transientWatchers[h]=v),v.set(o,g),this._onDidChangeTransientModelProperty.fire(a)}getTransientModelProperty(a,o){const g=a.uri.toString();if(!!this._transientWatchers.hasOwnProperty(g))return this._transientWatchers[g].get(o)}getTransientModelProperties(a){const o=a.uri.toString();if(!!this._transientWatchers.hasOwnProperty(o))return this._transientWatchers[o].keys().map(g=>[g,this._transientWatchers[o].get(g)])}_removeWatcher(a){delete this._transientWatchers[a.uri]}async openCodeEditor(a,o,g){for(const h of this._codeEditorOpenHandlers){const v=await h(a,o,g);if(v!==null)return v}return null}registerCodeEditorOpenHandler(a){const o=this._codeEditorOpenHandlers.unshift(a);return(0,R.toDisposable)(o)}};C=we([F(0,S.IThemeService)],C),e.AbstractCodeEditorService=C;class r{constructor(a,o,g){this.uri=a,this._values={},o.onWillDispose(()=>g._removeWatcher(this))}set(a,o){this._values[a]=o}get(a){return this._values[a]}keys(){return Object.keys(this._values)}}e.ModelTransientSettingWatcher=r;class u{get sheet(){return this._styleSheet.sheet}constructor(a,o,g){this._parent=a,this._editorId=o,this._styleSheet=g,this._refCount=0}ref(){this._refCount++}unref(){this._refCount--,this._refCount===0&&(this._styleSheet.parentNode?.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(a,o){this._styleSheet.sheet.insertRule(a,o)}removeRulesContainingSelector(a){t.removeCSSRulesContainingSelector(a,this._styleSheet)}}e.RefCountedStyleSheet=u;class i{get sheet(){return this._styleSheet.sheet}constructor(a){this._styleSheet=a}ref(){}unref(){}insertRule(a,o){this._styleSheet.sheet.insertRule(a,o)}removeRulesContainingSelector(a){t.removeCSSRulesContainingSelector(a,this._styleSheet)}}e.GlobalStyleSheet=i;class f{constructor(a,o,g){this._styleSheet=o,this._styleSheet.ref(),this._parentTypeKey=g.parentTypeKey,this.refCount=0,this._beforeContentRules=new l(3,g,a),this._afterContentRules=new l(4,g,a)}getOptions(a,o){const g=a.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(g.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(g.afterContentClassName=this._afterContentRules.className),g}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=f;class c{constructor(a,o,g,h){this._disposables=new R.DisposableStore,this.description=a,this._styleSheet=g,this._styleSheet.ref(),this.refCount=0;const v=_=>{const L=new l(_,h,o);if(this._disposables.add(L),L.hasContent)return L.className},m=_=>{const L=new l(_,h,o);return this._disposables.add(L),L.hasContent?{className:L.className,hasLetterSpacing:L.hasLetterSpacing}:null};this.className=v(0);const w=m(1);if(w&&(this.inlineClassName=w.className,this.inlineClassNameAffectsLetterSpacing=w.hasLetterSpacing),this.beforeContentClassName=v(3),this.afterContentClassName=v(4),h.options.beforeInjectedText&&h.options.beforeInjectedText.contentText){const _=m(5);this.beforeInjectedText={content:h.options.beforeInjectedText.contentText,inlineClassName:_?.className,inlineClassNameAffectsLetterSpacing:_?.hasLetterSpacing||h.options.beforeInjectedText.affectsLetterSpacing}}if(h.options.afterInjectedText&&h.options.afterInjectedText.contentText){const _=m(6);this.afterInjectedText={content:h.options.afterInjectedText.contentText,inlineClassName:_?.className,inlineClassNameAffectsLetterSpacing:_?.hasLetterSpacing||h.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=v(2);const D=h.options;this.isWholeLine=Boolean(D.isWholeLine),this.stickiness=D.rangeBehavior;const y=D.light&&D.light.overviewRulerColor||D.overviewRulerColor,T=D.dark&&D.dark.overviewRulerColor||D.overviewRulerColor;(typeof y<"u"||typeof T<"u")&&(this.overviewRuler={color:y||T,darkColor:T||y,position:D.overviewRulerLane||b.OverviewRulerLane.Center})}getOptions(a,o){return o?{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=c,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 l{constructor(a,o,g){this._theme=g.getColorTheme(),this._ruleType=a,this._providerArgs=o,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let h=d.getClassName(this._providerArgs.key,a);this._providerArgs.parentTypeKey&&(h=h+" "+d.getClassName(this._providerArgs.parentTypeKey,a)),this._className=h,this._unThemedSelector=d.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,a),this._buildCSS(),this._usesThemeColors?this._themeListener=g.onDidColorThemeChange(v=>{this._theme=g.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 a=this._providerArgs.options;let o,g,h;switch(this._ruleType){case 0:o=this.getCSSTextForModelDecorationClassName(a),g=this.getCSSTextForModelDecorationClassName(a.light),h=this.getCSSTextForModelDecorationClassName(a.dark);break;case 1:o=this.getCSSTextForModelDecorationInlineClassName(a),g=this.getCSSTextForModelDecorationInlineClassName(a.light),h=this.getCSSTextForModelDecorationInlineClassName(a.dark);break;case 2:o=this.getCSSTextForModelDecorationGlyphMarginClassName(a),g=this.getCSSTextForModelDecorationGlyphMarginClassName(a.light),h=this.getCSSTextForModelDecorationGlyphMarginClassName(a.dark);break;case 3:o=this.getCSSTextForModelDecorationContentClassName(a.before),g=this.getCSSTextForModelDecorationContentClassName(a.light&&a.light.before),h=this.getCSSTextForModelDecorationContentClassName(a.dark&&a.dark.before);break;case 4:o=this.getCSSTextForModelDecorationContentClassName(a.after),g=this.getCSSTextForModelDecorationContentClassName(a.light&&a.light.after),h=this.getCSSTextForModelDecorationContentClassName(a.dark&&a.dark.after);break;case 5:o=this.getCSSTextForModelDecorationContentClassName(a.beforeInjectedText),g=this.getCSSTextForModelDecorationContentClassName(a.light&&a.light.beforeInjectedText),h=this.getCSSTextForModelDecorationContentClassName(a.dark&&a.dark.beforeInjectedText);break;case 6:o=this.getCSSTextForModelDecorationContentClassName(a.afterInjectedText),g=this.getCSSTextForModelDecorationContentClassName(a.light&&a.light.afterInjectedText),h=this.getCSSTextForModelDecorationContentClassName(a.dark&&a.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const v=this._providerArgs.styleSheet;let m=!1;o.length>0&&(v.insertRule(`${this._unThemedSelector} {${o}}`,0),m=!0),g.length>0&&(v.insertRule(`.vs${this._unThemedSelector}, .hc-light${this._unThemedSelector} {${g}}`,0),m=!0),h.length>0&&(v.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${h}}`,0),m=!0),this._hasContent=m}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(a){if(!a)return"";const o=[];return this.collectCSSText(a,["backgroundColor"],o),this.collectCSSText(a,["outline","outlineColor","outlineStyle","outlineWidth"],o),this.collectBorderSettingsCSSText(a,o),o.join("")}getCSSTextForModelDecorationInlineClassName(a){if(!a)return"";const o=[];return this.collectCSSText(a,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],o),a.letterSpacing&&(this._hasLetterSpacing=!0),o.join("")}getCSSTextForModelDecorationContentClassName(a){if(!a)return"";const o=[];if(typeof a<"u"){if(this.collectBorderSettingsCSSText(a,o),typeof a.contentIconPath<"u"&&o.push(k.format(e._CSS_MAP.contentIconPath,t.asCSSUrl(E.URI.revive(a.contentIconPath)))),typeof a.contentText=="string"){const h=a.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");o.push(k.format(e._CSS_MAP.contentText,h))}this.collectCSSText(a,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],o),this.collectCSSText(a,["width","height"],o)&&o.push("display:inline-block;")}return o.join("")}getCSSTextForModelDecorationGlyphMarginClassName(a){if(!a)return"";const o=[];return typeof a.gutterIconPath<"u"&&(o.push(k.format(e._CSS_MAP.gutterIconPath,t.asCSSUrl(E.URI.revive(a.gutterIconPath)))),typeof a.gutterIconSize<"u"&&o.push(k.format(e._CSS_MAP.gutterIconSize,a.gutterIconSize))),o.join("")}collectBorderSettingsCSSText(a,o){return this.collectCSSText(a,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],o)?(o.push(k.format("box-sizing: border-box;")),!0):!1}collectCSSText(a,o,g){const h=g.length;for(const v of o){const m=this.resolveValue(a[v]);typeof m=="string"&&g.push(k.format(e._CSS_MAP[v],m))}return g.length!==h}resolveValue(a){if((0,I.isThemeColor)(a)){this._usesThemeColors=!0;const o=this._theme.getColor(a.id);return o?o.toString():"transparent"}return a}}var s;(function(n){n[n.ClassName=0]="ClassName",n[n.InlineClassName=1]="InlineClassName",n[n.GlyphMarginClassName=2]="GlyphMarginClassName",n[n.BeforeContentClassName=3]="BeforeContentClassName",n[n.AfterContentClassName=4]="AfterContentClassName",n[n.BeforeInjectedTextClassName=5]="BeforeInjectedTextClassName",n[n.AfterInjectedTextClassName=6]="AfterInjectedTextClassName"})(s||(s={}));class d{static getClassName(a,o){return"ced-"+a+"-"+o}static getSelector(a,o,g){let h=".monaco-editor ."+this.getClassName(a,g);return o&&(h=h+"."+this.getClassName(o,g)),g===3?h+="::before":g===4&&(h+="::after"),h}}}),define(ae[2151],le([1,0,10,121,147,180,12,33]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class I extends A.ViewPart{constructor(S,C,r,u){super(S);const i=this._context.configuration.options,f=i.get(93),c=i.get(68),l=i.get(35),s=i.get(96),d={listenOnDomNode:r.domNode,className:"editor-scrollable "+(0,k.getThemeTypeSelector)(S.theme.type),useShadows:!1,lazyRender:!0,vertical:f.vertical,horizontal:f.horizontal,verticalHasArrows:f.verticalHasArrows,horizontalHasArrows:f.horizontalHasArrows,verticalScrollbarSize:f.verticalScrollbarSize,verticalSliderSize:f.verticalSliderSize,horizontalScrollbarSize:f.horizontalScrollbarSize,horizontalSliderSize:f.horizontalSliderSize,handleMouseWheel:f.handleMouseWheel,alwaysConsumeMouseWheel:f.alwaysConsumeMouseWheel,arrowSize:f.arrowSize,mouseWheelScrollSensitivity:c,fastScrollSensitivity:l,scrollPredominantAxis:s,scrollByPage:f.scrollByPage};this.scrollbar=this._register(new R.SmoothScrollableElement(C.domNode,d,this._context.viewLayout.getScrollable())),A.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,p.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const n=(a,o,g)=>{const h={};if(o){const v=a.scrollTop;v&&(h.scrollTop=this._context.viewLayout.getCurrentScrollTop()+v,a.scrollTop=0)}if(g){const v=a.scrollLeft;v&&(h.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+v,a.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(h,1)};this._register(t.addDisposableListener(r.domNode,"scroll",a=>n(r.domNode,!0,!0))),this._register(t.addDisposableListener(C.domNode,"scroll",a=>n(C.domNode,!0,!1))),this._register(t.addDisposableListener(u.domNode,"scroll",a=>n(u.domNode,!0,!1))),this._register(t.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",a=>n(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const S=this._context.configuration.options,C=S.get(133);this.scrollbarDomNode.setLeft(C.contentLeft),S.get(66).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(S){this.scrollbar.delegateVerticalScrollbarPointerDown(S)}onConfigurationChanged(S){if(S.hasChanged(93)||S.hasChanged(68)||S.hasChanged(35)){const C=this._context.configuration.options,r=C.get(93),u=C.get(68),i=C.get(35),f=C.get(96),c={vertical:r.vertical,horizontal:r.horizontal,verticalScrollbarSize:r.verticalScrollbarSize,horizontalScrollbarSize:r.horizontalScrollbarSize,scrollByPage:r.scrollByPage,handleMouseWheel:r.handleMouseWheel,mouseWheelScrollSensitivity:u,fastScrollSensitivity:i,scrollPredominantAxis:f};this.scrollbar.updateOptions(c)}return S.hasChanged(133)&&this._setLayout(),!0}onScrollChanged(S){return!0}onThemeChanged(S){return this.scrollbar.updateClassName("editor-scrollable "+(0,k.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(S){}render(S){this.scrollbar.renderNow()}}e.EditorScrollbar=I,(0,k.registerThemingParticipant)((b,S)=>{const C=b.getColor(E.scrollbarShadow);C&&S.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 r=b.getColor(E.scrollbarSliderBackground);r&&S.addRule(` .monaco-scrollable-element > .scrollbar > .slider { background: ${r}; } `);const u=b.getColor(E.scrollbarSliderHoverBackground);u&&S.addRule(` .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${u}; } `);const i=b.getColor(E.scrollbarSliderActiveBackground);i&&S.addRule(` .monaco-scrollable-element > .scrollbar > .slider.active { background: ${i}; } `)})}),define(ae[2152],le([1,0,10,121,415,2,14,28,586,180,134,20,727,778,281,33,12,85,133,1194,116,154,1066]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const o=140,g=2;class h{constructor(O,N,P){const B=O.options,V=B.get(131),z=B.get(133),x=z.minimap,H=B.get(45),W=B.get(66);this.renderMinimap=x.renderMinimap,this.size=W.size,this.minimapHeightIsEditorHeight=x.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=B.get(95),this.showSlider=W.showSlider,this.autohide=W.autohide,this.pixelRatio=V,this.typicalHalfwidthCharacterWidth=H.typicalHalfwidthCharacterWidth,this.lineHeight=B.get(60),this.minimapLeft=x.minimapLeft,this.minimapWidth=x.minimapWidth,this.minimapHeight=z.height,this.canvasInnerWidth=x.minimapCanvasInnerWidth,this.canvasInnerHeight=x.minimapCanvasInnerHeight,this.canvasOuterWidth=x.minimapCanvasOuterWidth,this.canvasOuterHeight=x.minimapCanvasOuterHeight,this.isSampling=x.minimapIsSampling,this.editorHeight=z.height,this.fontScale=x.minimapScale,this.minimapLineHeight=x.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,a.once)(()=>d.MinimapCharRendererFactory.create(this.fontScale,H.fontFamily)),this.defaultBackgroundColor=P.getColor(2),this.backgroundColor=h._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=h._getMinimapForegroundOpacity(N)}static _getMinimapBackground(O,N){const P=O.getColor(f.minimapBackground);return P?new r.RGBA8(P.rgba.r,P.rgba.g,P.rgba.b,Math.round(255*P.rgba.a)):N}static _getMinimapForegroundOpacity(O){const N=O.getColor(f.minimapForegroundOpacity);return N?r.RGBA8._clamp(Math.round(255*N.rgba.a)):255}equals(O){return this.renderMinimap===O.renderMinimap&&this.size===O.size&&this.minimapHeightIsEditorHeight===O.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===O.scrollBeyondLastLine&&this.showSlider===O.showSlider&&this.autohide===O.autohide&&this.pixelRatio===O.pixelRatio&&this.typicalHalfwidthCharacterWidth===O.typicalHalfwidthCharacterWidth&&this.lineHeight===O.lineHeight&&this.minimapLeft===O.minimapLeft&&this.minimapWidth===O.minimapWidth&&this.minimapHeight===O.minimapHeight&&this.canvasInnerWidth===O.canvasInnerWidth&&this.canvasInnerHeight===O.canvasInnerHeight&&this.canvasOuterWidth===O.canvasOuterWidth&&this.canvasOuterHeight===O.canvasOuterHeight&&this.isSampling===O.isSampling&&this.editorHeight===O.editorHeight&&this.fontScale===O.fontScale&&this.minimapLineHeight===O.minimapLineHeight&&this.minimapCharWidth===O.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(O.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(O.backgroundColor)&&this.foregroundAlpha===O.foregroundAlpha}}class v{constructor(O,N,P,B,V,z,x,H){this.scrollTop=O,this.scrollHeight=N,this.sliderNeeded=P,this._computedSliderRatio=B,this.sliderTop=V,this.sliderHeight=z,this.startLineNumber=x,this.endLineNumber=H}getDesiredScrollTopFromDelta(O){return Math.round(this.scrollTop+O/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(O){return Math.round((O-this.sliderHeight/2)/this._computedSliderRatio)}static create(O,N,P,B,V,z,x,H,W,U,$){const q=O.pixelRatio,X=O.minimapLineHeight,G=Math.floor(O.canvasInnerHeight/X),Q=O.lineHeight;if(O.minimapHeightIsEditorHeight){const re=H*O.lineHeight+(O.scrollBeyondLastLine?V-O.lineHeight:0),oe=Math.max(1,Math.floor(V*V/re)),se=Math.max(0,O.minimapHeight-oe),te=se/(U-V),Z=W*te,ne=se>0,ce=Math.floor(O.canvasInnerHeight/O.minimapLineHeight);return new v(W,U,ne,te,Z,oe,1,Math.min(x,ce))}let j;if(z&&P!==x){const re=P-N+1;j=Math.floor(re*X/q)}else{const re=V/Q;j=Math.floor(re*X/q)}let K;O.scrollBeyondLastLine?K=(x-1)*X/q:K=Math.max(0,x*X/q-j),K=Math.min(O.minimapHeight-j,K);const Y=K/(U-V),ee=W*Y;let ie=0;if(O.scrollBeyondLastLine&&(ie=V/Q-1),G>=x+ie){const oe=x,se=K>0;return new v(W,U,se,Y,ee,j,1,oe)}else{let re=Math.max(1,Math.floor(N-ee*q/X));$&&$.scrollHeight===U&&($.scrollTop>W&&(re=Math.min(re,$.startLineNumber)),$.scrollTop<W&&(re=Math.max(re,$.startLineNumber)));const oe=Math.min(x,re+G-1),se=(W-B)/Q,te=(N-re+se)*X/q;return new v(W,U,!0,Y,te,j,re,oe)}}}class m{constructor(O){this.dy=O}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}m.INVALID=new m(-1);class w{constructor(O,N,P){this.renderedLayout=O,this._imageData=N,this._renderedLines=new I.RenderedLinesCollection(()=>m.INVALID),this._renderedLines._set(O.startLineNumber,P)}linesEquals(O){if(!this.scrollEquals(O))return!1;const P=this._renderedLines._get().lines;for(let B=0,V=P.length;B<V;B++)if(P[B].dy===-1)return!1;return!0}scrollEquals(O){return this.renderedLayout.startLineNumber===O.startLineNumber&&this.renderedLayout.endLineNumber===O.endLineNumber}_get(){const O=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:O.rendLineNumberStart,lines:O.lines}}onLinesChanged(O,N){return this._renderedLines.onLinesChanged(O,N)}onLinesDeleted(O,N){this._renderedLines.onLinesDeleted(O,N)}onLinesInserted(O,N){this._renderedLines.onLinesInserted(O,N)}onTokensChanged(O){return this._renderedLines.onTokensChanged(O)}}class D{constructor(O,N,P,B){this._backgroundFillData=D._createBackgroundFillData(N,P,B),this._buffers=[O.createImageData(N,P),O.createImageData(N,P)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const O=this._buffers[this._lastUsedBuffer];return O.data.set(this._backgroundFillData),O}static _createBackgroundFillData(O,N,P){const B=P.r,V=P.g,z=P.b,x=P.a,H=new Uint8ClampedArray(O*N*4);let W=0;for(let U=0;U<N;U++)for(let $=0;$<O;$++)H[W]=B,H[W+1]=V,H[W+2]=z,H[W+3]=x,W+=4;return H}}class y{static compute(O,N,P){if(O.renderMinimap===0||!O.isSampling)return[null,[]];const B=O.pixelRatio,V=O.lineHeight,z=O.scrollBeyondLastLine,{minimapLineCount:x}=S.EditorLayoutInfoComputer.computeContainedMinimapLineCount({viewLineCount:N,scrollBeyondLastLine:z,height:O.editorHeight,lineHeight:V,pixelRatio:B}),H=N/x,W=H/2;if(!P||P.minimapLines.length===0){const ee=[];if(ee[0]=1,x>1){for(let ie=0,re=x-1;ie<re;ie++)ee[ie]=Math.round(ie*H+W);ee[x-1]=N}return[new y(H,ee),[]]}const U=P.minimapLines,$=U.length,q=[];let X=0,G=0,Q=1;const j=10;let K=[],Y=null;for(let ee=0;ee<x;ee++){const ie=Math.max(Q,Math.round(ee*H)),re=Math.max(ie,Math.round((ee+1)*H));for(;X<$&&U[X]<ie;){if(K.length<j){const se=X+1+G;Y&&Y.type==="deleted"&&Y._oldIndex===X-1?Y.deleteToLineNumber++:(Y={type:"deleted",_oldIndex:X,deleteFromLineNumber:se,deleteToLineNumber:se},K.push(Y)),G--}X++}let oe;if(X<$&&U[X]<=re)oe=U[X],X++;else if(ee===0?oe=1:ee+1===x?oe=N:oe=Math.round(ee*H+W),K.length<j){const se=X+1+G;Y&&Y.type==="inserted"&&Y._i===ee-1?Y.insertToLineNumber++:(Y={type:"inserted",_i:ee,insertFromLineNumber:se,insertToLineNumber:se},K.push(Y)),G++}q[ee]=oe,Q=oe}if(K.length<j)for(;X<$;){const ee=X+1+G;Y&&Y.type==="deleted"&&Y._oldIndex===X-1?Y.deleteToLineNumber++:(Y={type:"deleted",_oldIndex:X,deleteFromLineNumber:ee,deleteToLineNumber:ee},K.push(Y)),G--,X++}else K=[{type:"flush"}];return[new y(H,q),K]}constructor(O,N){this.samplingRatio=O,this.minimapLines=N}modelLineToMinimapLine(O){return Math.min(this.minimapLines.length,Math.max(1,Math.round(O/this.samplingRatio)))}modelLineRangeToMinimapLineRange(O,N){let P=this.modelLineToMinimapLine(O)-1;for(;P>0&&this.minimapLines[P-1]>=O;)P--;let B=this.modelLineToMinimapLine(N)-1;for(;B+1<this.minimapLines.length&&this.minimapLines[B+1]<=N;)B++;if(P===B){const V=this.minimapLines[P];if(V<O||V>N)return null}return[P+1,B+1]}decorationLineRangeToMinimapLineRange(O,N){let P=this.modelLineToMinimapLine(O),B=this.modelLineToMinimapLine(N);return O!==N&&B===P&&(B===this.minimapLines.length?P>1&&P--:B++),[P,B]}onLinesDeleted(O){const N=O.toLineNumber-O.fromLineNumber+1;let P=this.minimapLines.length,B=0;for(let V=this.minimapLines.length-1;V>=0&&!(this.minimapLines[V]<O.fromLineNumber);V--)this.minimapLines[V]<=O.toLineNumber?(this.minimapLines[V]=Math.max(1,O.fromLineNumber-1),P=Math.min(P,V),B=Math.max(B,V)):this.minimapLines[V]-=N;return[P,B]}onLinesInserted(O){const N=O.toLineNumber-O.fromLineNumber+1;for(let P=this.minimapLines.length-1;P>=0&&!(this.minimapLines[P]<O.fromLineNumber);P--)this.minimapLines[P]+=N}}class T extends b.ViewPart{constructor(O){super(O),this.tokensColorTracker=u.MinimapTokensColorTracker.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new h(this._context.configuration,this._context.theme,this.tokensColorTracker);const[N]=y.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=N,this._shouldCheckSampling=!1,this._actual=new _(O.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const O=new h(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(O)?!1:(this.options=O,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(O){return this._onOptionsMaybeChanged()}onCursorStateChanged(O){return this._selections=O.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(O){return O.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(O){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(O){if(this._samplingState){const N=this._samplingState.modelLineRangeToMinimapLineRange(O.fromLineNumber,O.fromLineNumber+O.count-1);return N?this._actual.onLinesChanged(N[0],N[1]-N[0]+1):!1}else return this._actual.onLinesChanged(O.fromLineNumber,O.count)}onLinesDeleted(O){if(this._samplingState){const[N,P]=this._samplingState.onLinesDeleted(O);return N<=P&&this._actual.onLinesChanged(N+1,P-N+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(O.fromLineNumber,O.toLineNumber)}onLinesInserted(O){return this._samplingState?(this._samplingState.onLinesInserted(O),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(O.fromLineNumber,O.toLineNumber)}onScrollChanged(O){return this._actual.onScrollChanged()}onThemeChanged(O){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(O){if(this._samplingState){const N=[];for(const P of O.ranges){const B=this._samplingState.modelLineRangeToMinimapLineRange(P.fromLineNumber,P.toLineNumber);B&&N.push({fromLineNumber:B[0],toLineNumber:B[1]})}return N.length?this._actual.onTokensChanged(N):!1}else return this._actual.onTokensChanged(O.ranges)}onTokensColorsChanged(O){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(O){return this._actual.onZonesChanged()}prepareRender(O){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(O){let N=O.visibleRange.startLineNumber,P=O.visibleRange.endLineNumber;this._samplingState&&(N=this._samplingState.modelLineToMinimapLine(N),P=this._samplingState.modelLineToMinimapLine(P));const B={viewportContainsWhitespaceGaps:O.viewportData.whitespaceViewportData.length>0,scrollWidth:O.scrollWidth,scrollHeight:O.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:P,viewportStartLineNumberVerticalOffset:O.getVerticalOffsetForLineNumber(N),scrollTop:O.scrollTop,scrollLeft:O.scrollLeft,viewportWidth:O.viewportWidth,viewportHeight:O.viewportHeight};this._actual.render(B)}_recreateLineSampling(){this._minimapSelections=null;const O=Boolean(this._samplingState),[N,P]=y.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,O&&this._samplingState)for(const B of P)switch(B.type){case"deleted":this._actual.onLinesDeleted(B.deleteFromLineNumber,B.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(B.insertFromLineNumber,B.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(O){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[O-1]):this._context.viewModel.getLineContent(O)}getLineMaxColumn(O){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[O-1]):this._context.viewModel.getLineMaxColumn(O)}getMinimapLinesRenderingData(O,N,P){if(this._samplingState){const B=[];for(let V=0,z=N-O+1;V<z;V++)P[V]?B[V]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[O+V-1]):B[V]=null;return B}return this._context.viewModel.getMinimapLinesRenderingData(O,N,P).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const O of this._selections){const[N,P]=this._samplingState.decorationLineRangeToMinimapLineRange(O.startLineNumber,O.endLineNumber);this._minimapSelections.push(new l.Selection(N,O.startColumn,P,O.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(O,N){let P;if(this._samplingState){const V=this._samplingState.minimapLines[O-1],z=this._samplingState.minimapLines[N-1];P=new C.Range(V,1,z,this._context.viewModel.getLineMaxColumn(z))}else P=new C.Range(O,1,N,this._context.viewModel.getLineMaxColumn(N));const B=this._context.viewModel.getDecorationsInViewport(P,!0);if(this._samplingState){const V=[];for(const z of B){if(!z.options.minimap)continue;const x=z.range,H=this._samplingState.modelLineToMinimapLine(x.startLineNumber),W=this._samplingState.modelLineToMinimapLine(x.endLineNumber);V.push(new i.ViewModelDecoration(new C.Range(H,x.startColumn,W,x.endColumn),z.options))}return V}return B}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(O){this._samplingState&&(O=this._samplingState.minimapLines[O-1]),this._context.viewModel.revealRange("mouse",!1,new C.Range(O,1,O,1),1,0)}setScrollTop(O){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:O},1)}}e.Minimap=T;class _ extends A.Disposable{constructor(O,N){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=O,this._model=N,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(f.minimapSelection),this._domNode=(0,p.createFastDomNode)(document.createElement("div")),b.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,p.createFastDomNode)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,p.createFastDomNode)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,p.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,p.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,p.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,P=>{if(P.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(P.button===0&&this._lastRenderData){const W=t.getDomNodePagePosition(this._slider.domNode),U=W.top+W.height/2;this._startSliderDragging(P,U,this._lastRenderData.renderedLayout)}return}const V=this._model.options.minimapLineHeight,z=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*P.offsetY;let H=Math.floor(z/V)+this._lastRenderData.renderedLayout.startLineNumber;H=Math.min(H,this._model.getLineCount()),this._model.revealLineNumber(H)}),this._sliderPointerMoveMonitor=new R.GlobalPointerMoveMonitor,this._sliderPointerDownListener=t.addStandardDisposableListener(this._slider.domNode,t.EventType.POINTER_DOWN,P=>{P.preventDefault(),P.stopPropagation(),P.button===0&&this._lastRenderData&&this._startSliderDragging(P,P.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=s.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=t.addDisposableListener(this._domNode.domNode,s.EventType.Start,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(P))},{passive:!1}),this._sliderTouchMoveListener=t.addDisposableListener(this._domNode.domNode,s.EventType.Change,P=>{P.preventDefault(),P.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(P)},{passive:!1}),this._sliderTouchEndListener=t.addStandardDisposableListener(this._domNode.domNode,s.EventType.End,P=>{P.preventDefault(),P.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(O,N,P){if(!O.target||!(O.target instanceof Element))return;const B=O.pageX;this._slider.toggleClassName("active",!0);const V=(z,x)=>{const H=Math.abs(x-B);if(k.isWindows&&H>o){this._model.setScrollTop(P.scrollTop);return}const W=z-N;this._model.setScrollTop(P.getDesiredScrollTopFromDelta(W))};O.pageY!==N&&V(O.pageY,B),this._sliderPointerMoveMonitor.startMonitoring(O.target,O.pointerId,O.buttons,z=>V(z.pageY,z.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(O){const N=this._domNode.domNode.getBoundingClientRect().top,P=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(O.pageY-N);this._model.setScrollTop(P)}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(){const O=["minimap"];return this._model.options.showSlider==="always"?O.push("slider-always"):O.push("slider-mouseover"),this._model.options.autohide&&O.push("autohide"),O.join(" ")}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 D(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(O,N){return this._lastRenderData?this._lastRenderData.onLinesChanged(O,N):!1}onLinesDeleted(O,N){return this._lastRenderData?.onLinesDeleted(O,N),!0}onLinesInserted(O,N){return this._lastRenderData?.onLinesInserted(O,N),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(f.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(O){return this._lastRenderData?this._lastRenderData.onTokensChanged(O):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(O){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}O.scrollLeft+O.viewportWidth>=O.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const P=v.create(this._model.options,O.viewportStartLineNumber,O.viewportEndLineNumber,O.viewportStartLineNumberVerticalOffset,O.viewportHeight,O.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),O.scrollTop,O.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(P.sliderNeeded?"block":"none"),this._slider.setTop(P.sliderTop),this._slider.setHeight(P.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(P.sliderHeight),this.renderDecorations(P),this._lastRenderData=this.renderLines(P)}renderDecorations(O){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(C.Range.compareRangesUsingStarts);const P=this._model.getMinimapDecorationsInViewport(O.startLineNumber,O.endLineNumber);P.sort((q,X)=>(q.options.zIndex||0)-(X.options.zIndex||0));const{canvasInnerWidth:B,canvasInnerHeight:V}=this._model.options,z=this._model.options.minimapLineHeight,x=this._model.options.minimapCharWidth,H=this._model.getOptions().tabSize,W=this._decorationsCanvas.domNode.getContext("2d");W.clearRect(0,0,B,V);const U=new L(O.startLineNumber,O.endLineNumber,!1);this._renderSelectionLineHighlights(W,N,U,O,z),this._renderDecorationsLineHighlights(W,P,U,O,z);const $=new L(O.startLineNumber,O.endLineNumber,null);this._renderSelectionsHighlights(W,N,$,O,z,H,x,B),this._renderDecorationsHighlights(W,P,$,O,z,H,x,B)}}_renderSelectionLineHighlights(O,N,P,B,V){if(!this._selectionColor||this._selectionColor.isTransparent())return;O.fillStyle=this._selectionColor.transparent(.5).toString();let z=0,x=0;for(const H of N){const W=Math.max(B.startLineNumber,H.startLineNumber),U=Math.min(B.endLineNumber,H.endLineNumber);if(W>U)continue;for(let X=W;X<=U;X++)P.set(X,!0);const $=(W-B.startLineNumber)*V,q=(U-B.startLineNumber)*V+V;x>=$||(x>z&&O.fillRect(S.MINIMAP_GUTTER_WIDTH,z,O.canvas.width,x-z),z=$),x=q}x>z&&O.fillRect(S.MINIMAP_GUTTER_WIDTH,z,O.canvas.width,x-z)}_renderDecorationsLineHighlights(O,N,P,B,V){const z=new Map;for(let x=N.length-1;x>=0;x--){const H=N[x],W=H.options.minimap;if(!W||W.position!==n.MinimapPosition.Inline)continue;const U=Math.max(B.startLineNumber,H.range.startLineNumber),$=Math.min(B.endLineNumber,H.range.endLineNumber);if(U>$)continue;const q=W.getColor(this._theme.value);if(!q||q.isTransparent())continue;let X=z.get(q.toString());X||(X=q.transparent(.5).toString(),z.set(q.toString(),X)),O.fillStyle=X;for(let G=U;G<=$;G++){if(P.has(G))continue;P.set(G,!0);const Q=(U-B.startLineNumber)*V;O.fillRect(S.MINIMAP_GUTTER_WIDTH,Q,O.canvas.width,V)}}}_renderSelectionsHighlights(O,N,P,B,V,z,x,H){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const W of N){const U=Math.max(B.startLineNumber,W.startLineNumber),$=Math.min(B.endLineNumber,W.endLineNumber);if(!(U>$))for(let q=U;q<=$;q++)this.renderDecorationOnLine(O,P,W,this._selectionColor,B,q,V,V,z,x,H)}}_renderDecorationsHighlights(O,N,P,B,V,z,x,H){for(const W of N){const U=W.options.minimap;if(!U)continue;const $=Math.max(B.startLineNumber,W.range.startLineNumber),q=Math.min(B.endLineNumber,W.range.endLineNumber);if($>q)continue;const X=U.getColor(this._theme.value);if(!(!X||X.isTransparent()))for(let G=$;G<=q;G++)switch(U.position){case n.MinimapPosition.Inline:this.renderDecorationOnLine(O,P,W.range,X,B,G,V,V,z,x,H);continue;case n.MinimapPosition.Gutter:{const Q=(G-B.startLineNumber)*V,j=2;this.renderDecoration(O,X,j,Q,g,V);continue}}}}renderDecorationOnLine(O,N,P,B,V,z,x,H,W,U,$){const q=(z-V.startLineNumber)*H;if(q+x<0||q>this._model.options.canvasInnerHeight)return;const{startLineNumber:X,endLineNumber:G}=P,Q=X===z?P.startColumn:1,j=G===z?P.endColumn:this._model.getLineMaxColumn(z),K=this.getXOffsetForPosition(N,z,Q,W,U,$),Y=this.getXOffsetForPosition(N,z,j,W,U,$);this.renderDecoration(O,B,K,q,Y-K,x)}getXOffsetForPosition(O,N,P,B,V,z){if(P===1)return S.MINIMAP_GUTTER_WIDTH;if((P-1)*V>=z)return z;let H=O.get(N);if(!H){const W=this._model.getLineContent(N);H=[S.MINIMAP_GUTTER_WIDTH];let U=S.MINIMAP_GUTTER_WIDTH;for(let $=1;$<W.length+1;$++){const q=W.charCodeAt($-1),X=q===9?B*V:E.isFullWidthCharacter(q)?2*V:V,G=U+X;if(G>=z){H[$]=z;break}H[$]=G,U=G}O.set(N,H)}return P-1<H.length?H[P-1]:z}renderDecoration(O,N,P,B,V,z){O.fillStyle=N&&N.toString()||"",O.fillRect(P,B,V,z)}renderLines(O){const N=O.startLineNumber,P=O.endLineNumber,B=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(O)){const me=this._lastRenderData._get();return new w(O,me.imageData,me.lines)}const V=this._getBuffer();if(!V)return null;const[z,x,H]=_._renderUntouchedLines(V,N,P,B,this._lastRenderData),W=this._model.getMinimapLinesRenderingData(N,P,H),U=this._model.getOptions().tabSize,$=this._model.options.defaultBackgroundColor,q=this._model.options.backgroundColor,X=this._model.options.foregroundAlpha,G=this._model.tokensColorTracker,Q=G.backgroundIsLight(),j=this._model.options.renderMinimap,K=this._model.options.charRenderer(),Y=this._model.options.fontScale,ee=this._model.options.minimapCharWidth,re=(j===1?2:2+1)*Y,oe=B>re?Math.floor((B-re)/2):0,se=q.a/255,te=new r.RGBA8(Math.round((q.r-$.r)*se+$.r),Math.round((q.g-$.g)*se+$.g),Math.round((q.b-$.b)*se+$.b),255);let Z=0;const ne=[];for(let me=0,Se=P-N+1;me<Se;me++)H[me]&&_._renderLine(V,te,q.a,Q,j,ee,G,X,K,Z,oe,U,W[me],Y,B),ne[me]=new m(Z),Z+=B;const ce=z===-1?0:z,he=(x===-1?V.height:x)-ce;return this._canvas.domNode.getContext("2d").putImageData(V,0,0,0,ce,V.width,he),new w(O,V,ne)}static _renderUntouchedLines(O,N,P,B,V){const z=[];if(!V){for(let te=0,Z=P-N+1;te<Z;te++)z[te]=!0;return[-1,-1,z]}const x=V._get(),H=x.imageData.data,W=x.rendLineNumberStart,U=x.lines,$=U.length,q=O.width,X=O.data,G=(P-N+1)*B*q*4;let Q=-1,j=-1,K=-1,Y=-1,ee=-1,ie=-1,re=0;for(let te=N;te<=P;te++){const Z=te-N,ne=te-W,ce=ne>=0&&ne<$?U[ne].dy:-1;if(ce===-1){z[Z]=!0,re+=B;continue}const de=ce*q*4,he=(ce+B)*q*4,pe=re*q*4,me=(re+B)*q*4;Y===de&&ie===pe?(Y=he,ie=me):(K!==-1&&(X.set(H.subarray(K,Y),ee),Q===-1&&K===0&&K===ee&&(Q=Y),j===-1&&Y===G&&K===ee&&(j=K)),K=de,Y=he,ee=pe,ie=me),z[Z]=!1,re+=B}K!==-1&&(X.set(H.subarray(K,Y),ee),Q===-1&&K===0&&K===ee&&(Q=Y),j===-1&&Y===G&&K===ee&&(j=K));const oe=Q===-1?-1:Q/(q*4),se=j===-1?-1:j/(q*4);return[oe,se,z]}static _renderLine(O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q){const j=X.content,K=X.tokens,Y=O.width-z,ee=Q===1;let ie=S.MINIMAP_GUTTER_WIDTH,re=0,oe=0;for(let se=0,te=K.getCount();se<te;se++){const Z=K.getEndOffset(se),ne=K.getForeground(se),ce=x.getColor(ne);for(;re<Z;re++){if(ie>Y)return;const de=j.charCodeAt(re);if(de===9){const he=q-(re+oe)%q;oe+=he-1,ie+=he*z}else if(de===32)ie+=z;else{const he=E.isFullWidthCharacter(de)?2:1;for(let pe=0;pe<he;pe++)if(V===2?W.blockRenderChar(O,ie,U+$,ce,H,N,P,ee):W.renderChar(O,ie,U+$,de,ce,H,N,P,G,B,ee),ie+=z,ie>Y)return}}}}}class L{constructor(O,N,P){this._startLineNumber=O,this._endLineNumber=N,this._defaultValue=P,this._values=[];for(let B=0,V=this._endLineNumber-this._startLineNumber+1;B<V;B++)this._values[B]=P}has(O){return this.get(O)!==this._defaultValue}set(O,N){O<this._startLineNumber||O>this._endLineNumber||(this._values[O-this._startLineNumber]=N)}get(O){return O<this._startLineNumber||O>this._endLineNumber?this._defaultValue:this._values[O-this._startLineNumber]}}(0,c.registerThemingParticipant)((M,O)=>{const N=M.getColor(f.minimapSliderBackground);N&&O.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${N}; }`);const P=M.getColor(f.minimapSliderHoverBackground);P&&O.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${P}; }`);const B=M.getColor(f.minimapSliderActiveBackground);B&&O.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${B}; }`);const V=M.getColor(f.scrollbarShadow);V&&O.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${V} -6px 0 6px -6px inset; }`)})}),define(ae[2153],le([1,0,121,180,33,12,1069]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class k extends p.ViewPart{constructor(I){super(I),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const S=this._context.configuration.options.get(93);this._useShadows=S.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 b=this._context.configuration.options.get(133);b.minimap.renderMinimap===0||b.minimap.minimapWidth>0&&b.minimap.minimapLeft===0?this._width=b.width:this._width=b.width-b.verticalScrollbarWidth}onConfigurationChanged(I){const S=this._context.configuration.options.get(93);return this._useShadows=S.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)((E,I)=>{const b=E.getColor(R.scrollbarShadow);b&&I.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${b} 0 6px 6px -6px inset; }`)})}),define(ae[2154],le([1,0,366,33,12,1070]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;var A;(function(r){r[r.EXTERN=0]="EXTERN",r[r.INTERN=1]="INTERN",r[r.FLAT=2]="FLAT"})(A||(A={}));class k{constructor(u){this.left=u.left,this.width=u.width,this.startStyle=null,this.endStyle=null}}class E{constructor(u,i){this.lineNumber=u,this.ranges=i}}function I(r){return new k(r)}function b(r){return new E(r.lineNumber,r.ranges.map(I))}class S extends t.DynamicViewOverlay{constructor(u){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=u;const i=this._context.configuration.options;this._lineHeight=i.get(60),this._roundedSelection=i.get(91),this._typicalHalfwidthCharacterWidth=i.get(45).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(u){const i=this._context.configuration.options;return this._lineHeight=i.get(60),this._roundedSelection=i.get(91),this._typicalHalfwidthCharacterWidth=i.get(45).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(u){return this._selections=u.selections.slice(0),!0}onDecorationsChanged(u){return!0}onFlushed(u){return!0}onLinesChanged(u){return!0}onLinesDeleted(u){return!0}onLinesInserted(u){return!0}onScrollChanged(u){return u.scrollTopChanged}onZonesChanged(u){return!0}_visibleRangesHaveGaps(u){for(let i=0,f=u.length;i<f;i++)if(u[i].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(u,i,f){const c=this._typicalHalfwidthCharacterWidth/4;let l=null,s=null;if(f&&f.length>0&&i.length>0){const d=i[0].lineNumber;if(d===u.startLineNumber)for(let a=0;!l&&a<f.length;a++)f[a].lineNumber===d&&(l=f[a].ranges[0]);const n=i[i.length-1].lineNumber;if(n===u.endLineNumber)for(let a=f.length-1;!s&&a>=0;a--)f[a].lineNumber===n&&(s=f[a].ranges[0]);l&&!l.startStyle&&(l=null),s&&!s.startStyle&&(s=null)}for(let d=0,n=i.length;d<n;d++){const a=i[d].ranges[0],o=a.left,g=a.left+a.width,h={top:0,bottom:0},v={top:0,bottom:0};if(d>0){const m=i[d-1].ranges[0].left,w=i[d-1].ranges[0].left+i[d-1].ranges[0].width;C(o-m)<c?h.top=2:o>m&&(h.top=1),C(g-w)<c?v.top=2:m<g&&g<w&&(v.top=1)}else l&&(h.top=l.startStyle.top,v.top=l.endStyle.top);if(d+1<n){const m=i[d+1].ranges[0].left,w=i[d+1].ranges[0].left+i[d+1].ranges[0].width;C(o-m)<c?h.bottom=2:m<o&&o<w&&(h.bottom=1),C(g-w)<c?v.bottom=2:g<w&&(v.bottom=1)}else s&&(h.bottom=s.startStyle.bottom,v.bottom=s.endStyle.bottom);a.startStyle=h,a.endStyle=v}}_getVisibleRangesWithStyle(u,i,f){const l=(i.linesVisibleRangesForRange(u,!0)||[]).map(b);return!this._visibleRangesHaveGaps(l)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(i.visibleRange,l,f),l}_createSelectionPiece(u,i,f,c,l){return'<div class="cslr '+f+'" style="top:'+u.toString()+"px;left:"+c.toString()+"px;width:"+l.toString()+"px;height:"+i+'px;"></div>'}_actualRenderOneSelection(u,i,f,c){if(c.length===0)return;const l=!!c[0].ranges[0].startStyle,s=this._lineHeight.toString(),d=(this._lineHeight-1).toString(),n=c[0].lineNumber,a=c[c.length-1].lineNumber;for(let o=0,g=c.length;o<g;o++){const h=c[o],v=h.lineNumber,m=v-i,w=f&&(v===a||v===n)?d:s,D=f&&v===n?1:0;let y="",T="";for(let _=0,L=h.ranges.length;_<L;_++){const M=h.ranges[_];if(l){const N=M.startStyle,P=M.endStyle;if(N.top===1||N.bottom===1){y+=this._createSelectionPiece(D,w,S.SELECTION_CLASS_NAME,M.left-S.ROUNDED_PIECE_WIDTH,S.ROUNDED_PIECE_WIDTH);let B=S.EDITOR_BACKGROUND_CLASS_NAME;N.top===1&&(B+=" "+S.SELECTION_TOP_RIGHT),N.bottom===1&&(B+=" "+S.SELECTION_BOTTOM_RIGHT),y+=this._createSelectionPiece(D,w,B,M.left-S.ROUNDED_PIECE_WIDTH,S.ROUNDED_PIECE_WIDTH)}if(P.top===1||P.bottom===1){y+=this._createSelectionPiece(D,w,S.SELECTION_CLASS_NAME,M.left+M.width,S.ROUNDED_PIECE_WIDTH);let B=S.EDITOR_BACKGROUND_CLASS_NAME;P.top===1&&(B+=" "+S.SELECTION_TOP_LEFT),P.bottom===1&&(B+=" "+S.SELECTION_BOTTOM_LEFT),y+=this._createSelectionPiece(D,w,B,M.left+M.width,S.ROUNDED_PIECE_WIDTH)}}let O=S.SELECTION_CLASS_NAME;if(l){const N=M.startStyle,P=M.endStyle;N.top===0&&(O+=" "+S.SELECTION_TOP_LEFT),N.bottom===0&&(O+=" "+S.SELECTION_BOTTOM_LEFT),P.top===0&&(O+=" "+S.SELECTION_TOP_RIGHT),P.bottom===0&&(O+=" "+S.SELECTION_BOTTOM_RIGHT)}T+=this._createSelectionPiece(D,w,O,M.left,M.width)}u[m][0]+=y,u[m][1]+=T}}prepareRender(u){const i=[],f=u.visibleRange.startLineNumber,c=u.visibleRange.endLineNumber;for(let s=f;s<=c;s++){const d=s-f;i[d]=["",""]}const l=[];for(let s=0,d=this._selections.length;s<d;s++){const n=this._selections[s];if(n.isEmpty()){l[s]=null;continue}const a=this._getVisibleRangesWithStyle(n,u,this._previousFrameVisibleRangesWithStyle[s]);l[s]=a,this._actualRenderOneSelection(i,f,this._selections.length>1,a)}this._previousFrameVisibleRangesWithStyle=l,this._renderResult=i.map(([s,d])=>s+d)}render(u,i){if(!this._renderResult)return"";const f=i-u;return f<0||f>=this._renderResult.length?"":this._renderResult[f]}}e.SelectionsOverlay=S,S.SELECTION_CLASS_NAME="selected-text",S.SELECTION_TOP_LEFT="top-left-radius",S.SELECTION_BOTTOM_LEFT="bottom-left-radius",S.SELECTION_TOP_RIGHT="top-right-radius",S.SELECTION_BOTTOM_RIGHT="bottom-right-radius",S.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",S.ROUNDED_PIECE_WIDTH=10,(0,R.registerThemingParticipant)((r,u)=>{const i=r.getColor(p.editorSelectionBackground);i&&u.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const f=r.getColor(p.editorInactiveSelection);f&&u.addRule(`.monaco-editor .selected-text { background-color: ${f}; }`);const c=r.getColor(p.editorSelectionForeground);c&&!c.isTransparent()&&u.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${c}; }`)});function C(r){return r<0?-r:r}}),define(ae[167],le([1,0,1320,65,33,12,126]),function(J,e,t,p,R,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,R.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(0,null)),e.editorLineHighlightBorder=(0,R.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:R.contrastBorder},t.localize(1,null)),e.editorRangeHighlight=(0,R.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},t.localize(2,null),!0),e.editorRangeHighlightBorder=(0,R.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:R.activeContrastBorder,hcLight:R.activeContrastBorder},t.localize(3,null),!0),e.editorSymbolHighlight=(0,R.registerColor)("editor.symbolHighlightBackground",{dark:R.editorFindMatchHighlight,light:R.editorFindMatchHighlight,hcDark:null,hcLight:null},t.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,R.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:R.activeContrastBorder,hcLight:R.activeContrastBorder},t.localize(5,null),!0),e.editorCursorForeground=(0,R.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:p.Color.black,hcDark:p.Color.white,hcLight:"#0F4A85"},t.localize(6,null)),e.editorCursorBackground=(0,R.registerColor)("editorCursor.background",null,t.localize(7,null)),e.editorWhitespaces=(0,R.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},t.localize(8,null)),e.editorIndentGuides=(0,R.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},t.localize(9,null)),e.editorActiveIndentGuides=(0,R.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},t.localize(10,null)),e.editorLineNumbers=(0,R.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:p.Color.white,hcLight:"#292929"},t.localize(11,null));const E=(0,R.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:R.activeContrastBorder,hcLight:R.activeContrastBorder},t.localize(12,null),!1,t.localize(13,null));e.editorActiveLineNumber=(0,R.registerColor)("editorLineNumber.activeForeground",{dark:E,light:E,hcDark:E,hcLight:E},t.localize(14,null)),e.editorRuler=(0,R.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:p.Color.lightgrey,hcDark:p.Color.white,hcLight:"#292929"},t.localize(15,null)),e.editorCodeLensForeground=(0,R.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},t.localize(16,null)),e.editorBracketMatchBackground=(0,R.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},t.localize(17,null)),e.editorBracketMatchBorder=(0,R.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:R.contrastBorder,hcLight:R.contrastBorder},t.localize(18,null)),e.editorOverviewRulerBorder=(0,R.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},t.localize(19,null)),e.editorOverviewRulerBackground=(0,R.registerColor)("editorOverviewRuler.background",null,t.localize(20,null)),e.editorGutter=(0,R.registerColor)("editorGutter.background",{dark:R.editorBackground,light:R.editorBackground,hcDark:R.editorBackground,hcLight:R.editorBackground},t.localize(21,null)),e.editorUnnecessaryCodeBorder=(0,R.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:p.Color.fromHex("#fff").transparent(.8),hcLight:R.contrastBorder},t.localize(22,null)),e.editorUnnecessaryCodeOpacity=(0,R.registerColor)("editorUnnecessaryCode.opacity",{dark:p.Color.fromHex("#000a"),light:p.Color.fromHex("#0007"),hcDark:null,hcLight:null},t.localize(23,null)),e.ghostTextBorder=(0,R.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:p.Color.fromHex("#fff").transparent(.8),hcLight:p.Color.fromHex("#292929").transparent(.8)},t.localize(24,null)),e.ghostTextForeground=(0,R.registerColor)("editorGhostText.foreground",{dark:p.Color.fromHex("#ffffff56"),light:p.Color.fromHex("#0007"),hcDark:null,hcLight:null},t.localize(25,null)),e.ghostTextBackground=(0,R.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},t.localize(26,null));const I=new p.Color(new p.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,R.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:I,light:I,hcDark:I,hcLight:I},t.localize(27,null),!0),e.overviewRulerError=(0,R.registerColor)("editorOverviewRuler.errorForeground",{dark:new p.Color(new p.RGBA(255,18,18,.7)),light:new p.Color(new p.RGBA(255,18,18,.7)),hcDark:new p.Color(new p.RGBA(255,50,50,1)),hcLight:"#B5200D"},t.localize(28,null)),e.overviewRulerWarning=(0,R.registerColor)("editorOverviewRuler.warningForeground",{dark:R.editorWarningForeground,light:R.editorWarningForeground,hcDark:R.editorWarningBorder,hcLight:R.editorWarningBorder},t.localize(29,null)),e.overviewRulerInfo=(0,R.registerColor)("editorOverviewRuler.infoForeground",{dark:R.editorInfoForeground,light:R.editorInfoForeground,hcDark:R.editorInfoBorder,hcLight:R.editorInfoBorder},t.localize(30,null)),e.editorBracketHighlightingForeground1=(0,R.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},t.localize(31,null)),e.editorBracketHighlightingForeground2=(0,R.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},t.localize(32,null)),e.editorBracketHighlightingForeground3=(0,R.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},t.localize(33,null)),e.editorBracketHighlightingForeground4=(0,R.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(34,null)),e.editorBracketHighlightingForeground5=(0,R.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(35,null)),e.editorBracketHighlightingForeground6=(0,R.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(36,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,R.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new p.Color(new p.RGBA(255,18,18,.8)),light:new p.Color(new p.RGBA(255,18,18,.8)),hcDark:new p.Color(new p.RGBA(255,50,50,1)),hcLight:""},t.localize(37,null)),e.editorBracketPairGuideBackground1=(0,R.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(38,null)),e.editorBracketPairGuideBackground2=(0,R.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(39,null)),e.editorBracketPairGuideBackground3=(0,R.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(40,null)),e.editorBracketPairGuideBackground4=(0,R.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(41,null)),e.editorBracketPairGuideBackground5=(0,R.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(42,null)),e.editorBracketPairGuideBackground6=(0,R.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(43,null)),e.editorBracketPairGuideActiveBackground1=(0,R.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(44,null)),e.editorBracketPairGuideActiveBackground2=(0,R.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(45,null)),e.editorBracketPairGuideActiveBackground3=(0,R.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(46,null)),e.editorBracketPairGuideActiveBackground4=(0,R.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(47,null)),e.editorBracketPairGuideActiveBackground5=(0,R.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(48,null)),e.editorBracketPairGuideActiveBackground6=(0,R.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},t.localize(49,null)),e.editorUnicodeHighlightBorder=(0,R.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:""},t.localize(50,null)),e.editorUnicodeHighlightBackground=(0,R.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:""},t.localize(51,null)),(0,A.registerThemingParticipant)((b,S)=>{const C=b.getColor(R.editorBackground);C&&S.addRule(`.monaco-editor, .monaco-editor-background { background-color: ${C}; }`);const r=b.getColor(e.editorLineHighlight),u=r&&!r.isTransparent()?r:C;u&&S.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${u}; }`);const i=b.getColor(R.editorForeground);i&&S.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${i}; }`);const f=b.getColor(e.editorGutter);f&&S.addRule(`.monaco-editor .margin { background-color: ${f}; }`);const c=b.getColor(e.editorRangeHighlight);c&&S.addRule(`.monaco-editor .rangeHighlight { background-color: ${c}; }`);const l=b.getColor(e.editorRangeHighlightBorder);l&&S.addRule(`.monaco-editor .rangeHighlight { border: 1px ${(0,k.isHighContrast)(b.type)?"dotted":"solid"} ${l}; }`);const s=b.getColor(e.editorSymbolHighlight);s&&S.addRule(`.monaco-editor .symbolHighlight { background-color: ${s}; }`);const d=b.getColor(e.editorSymbolHighlightBorder);d&&S.addRule(`.monaco-editor .symbolHighlight { border: 1px ${(0,k.isHighContrast)(b.type)?"dotted":"solid"} ${d}; }`);const n=b.getColor(e.editorWhitespaces);n&&(S.addRule(`.monaco-editor .mtkw { color: ${n} !important; }`),S.addRule(`.monaco-editor .mtkz { color: ${n} !important; }`))})}),define(ae[2155],le([1,0,366,167,16,12,85,126,1058]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class I extends t.DynamicViewOverlay{constructor(r){super(),this._context=r;const u=this._context.configuration.options,i=u.get(133);this._lineHeight=u.get(60),this._renderLineHighlight=u.get(86),this._renderLineHighlightOnlyWhenFocus=u.get(87),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 r=!1;const u=this._selections.map(f=>f.positionLineNumber);u.sort((f,c)=>f-c),R.equals(this._cursorLineNumbers,u)||(this._cursorLineNumbers=u,r=!0);const i=this._selections.every(f=>f.isEmpty());return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,r=!0),r}onThemeChanged(r){return this._readFromSelections()}onConfigurationChanged(r){const u=this._context.configuration.options,i=u.get(133);return this._lineHeight=u.get(60),this._renderLineHighlight=u.get(86),this._renderLineHighlightOnlyWhenFocus=u.get(87),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(r){return this._selections=r.selections,this._readFromSelections()}onFlushed(r){return!0}onLinesDeleted(r){return!0}onLinesInserted(r){return!0}onScrollChanged(r){return r.scrollWidthChanged||r.scrollTopChanged}onZonesChanged(r){return!0}onFocusChanged(r){return this._renderLineHighlightOnlyWhenFocus?(this._focused=r.isFocused,!0):!1}prepareRender(r){if(!this._shouldRenderThis()){this._renderData=null;return}const u=this._renderOne(r),i=r.visibleRange.startLineNumber,f=r.visibleRange.endLineNumber,c=this._cursorLineNumbers.length;let l=0;const s=[];for(let d=i;d<=f;d++){const n=d-i;for(;l<c&&this._cursorLineNumbers[l]<d;)l++;l<c&&this._cursorLineNumbers[l]===d?s[n]=u:s[n]=""}this._renderData=s}render(r,u){if(!this._renderData)return"";const i=u-r;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 b extends I{_renderOne(r){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(r.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=b;class S extends I{_renderOne(r){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=S,(0,A.registerThemingParticipant)((C,r)=>{const u=C.getColor(p.editorLineHighlight);if(u&&(r.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${u}; }`),r.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${u}; border: none; }`)),!u||u.isTransparent()||C.defines(p.editorLineHighlightBorder)){const i=C.getColor(p.editorLineHighlightBorder);i&&(r.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),r.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),(0,E.isHighContrast)(C.type)&&(r.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),r.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(ae[2156],le([1,0,366,167,12,50,16,13,773,568,1061]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class S extends t.DynamicViewOverlay{constructor(u){super(),this._context=u,this._primaryPosition=null;const i=this._context.configuration.options,f=i.get(134),c=i.get(45);this._lineHeight=i.get(60),this._spaceWidth=c.spaceWidth,this._maxIndentLeft=f.wrappingColumn===-1?-1:f.wrappingColumn*c.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(u){const i=this._context.configuration.options,f=i.get(134),c=i.get(45);return this._lineHeight=i.get(60),this._spaceWidth=c.spaceWidth,this._maxIndentLeft=f.wrappingColumn===-1?-1:f.wrappingColumn*c.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=i.get(13),!0}onCursorStateChanged(u){const f=u.selections[0].getPosition();return this._primaryPosition?.equals(f)?!1:(this._primaryPosition=f,!0)}onDecorationsChanged(u){return!0}onFlushed(u){return!0}onLinesChanged(u){return!0}onLinesDeleted(u){return!0}onLinesInserted(u){return!0}onScrollChanged(u){return u.scrollTopChanged}onZonesChanged(u){return!0}onLanguageConfigurationChanged(u){return!0}prepareRender(u){if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const i=u.visibleRange.startLineNumber,f=u.visibleRange.endLineNumber,c=u.scrollWidth,l=this._lineHeight,s=this._primaryPosition,d=this.getGuidesByLine(i,f,s),n=[];for(let a=i;a<=f;a++){const o=a-i,g=d[o];let h="";const v=u.visibleRangeForPosition(new A.Position(a,1))?.left??0;for(const m of g){const w=m.column===-1?v+(m.visibleColumn-1)*this._spaceWidth:u.visibleRangeForPosition(new A.Position(a,m.column)).left;if(w>c||this._maxIndentLeft>0&&w>this._maxIndentLeft)break;const D=m.horizontalLine?m.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",y=m.horizontalLine?(u.visibleRangeForPosition(new A.Position(a,m.horizontalLine.endColumn))?.left??w+this._spaceWidth)-w:this._spaceWidth;h+=`<div class="core-guide ${m.className} ${D}" style="left:${w}px;height:${l}px;width:${y}px"></div>`}n[o]=h}this._renderResult=n}getGuidesByLine(u,i,f){const c=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(u,i,f,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?b.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?b.HorizontalGuidesState.EnabledForActive:b.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,l=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(u,i):null;let s=0,d=0,n=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&f){const g=this._context.viewModel.getActiveIndentGuide(f.lineNumber,u,i);s=g.startLineNumber,d=g.endLineNumber,n=g.indent}const{indentSize:a}=this._context.viewModel.model.getOptions(),o=[];for(let g=u;g<=i;g++){const h=new Array;o.push(h);const v=c?c[g-u]:[],m=new k.ArrayQueue(v),w=l?l[g-u]:[];for(let D=1;D<=w;D++){const y=(D-1)*a+1,T=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||v.length===0)&&s<=g&&g<=d&&D===n;h.push(...m.takeWhile(L=>L.visibleColumn<y)||[]);const _=m.peek();(!_||_.visibleColumn!==y||_.horizontalLine)&&h.push(new b.IndentGuide(y,-1,T?"core-guide-indent-active":"core-guide-indent",null,-1,-1))}h.push(...m.takeWhile(D=>!0)||[])}return o}render(u,i){if(!this._renderResult)return"";const f=i-u;return f<0||f>=this._renderResult.length?"":this._renderResult[f]}}e.IndentGuidesOverlay=S;function C(r){if(!(r&&r.isTransparent()))return r}(0,R.registerThemingParticipant)((r,u)=>{const i=r.getColor(p.editorIndentGuides);i&&u.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const f=r.getColor(p.editorActiveIndentGuides)||i;f&&u.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${f} inset; }`);const c=[{bracketColor:p.editorBracketHighlightingForeground1,guideColor:p.editorBracketPairGuideBackground1,guideColorActive:p.editorBracketPairGuideActiveBackground1},{bracketColor:p.editorBracketHighlightingForeground2,guideColor:p.editorBracketPairGuideBackground2,guideColorActive:p.editorBracketPairGuideActiveBackground2},{bracketColor:p.editorBracketHighlightingForeground3,guideColor:p.editorBracketPairGuideBackground3,guideColorActive:p.editorBracketPairGuideActiveBackground3},{bracketColor:p.editorBracketHighlightingForeground4,guideColor:p.editorBracketPairGuideBackground4,guideColorActive:p.editorBracketPairGuideActiveBackground4},{bracketColor:p.editorBracketHighlightingForeground5,guideColor:p.editorBracketPairGuideBackground5,guideColorActive:p.editorBracketPairGuideActiveBackground5},{bracketColor:p.editorBracketHighlightingForeground6,guideColor:p.editorBracketPairGuideBackground6,guideColorActive:p.editorBracketPairGuideActiveBackground6}],l=new I.BracketPairGuidesClassNames,s=c.map(d=>{const n=r.getColor(d.bracketColor),a=r.getColor(d.guideColor),o=r.getColor(d.guideColorActive),g=C(C(a)??n?.transparent(.3)),h=C(C(o)??n);if(!(!g||!h))return{guideColor:g,guideColorActive:h}}).filter(E.isDefined);if(s.length>0){for(let d=0;d<30;d++){const n=s[d%s.length];u.addRule(`.monaco-editor .${l.getInlineClassNameOfLevel(d).replace(/ /g,".")} { --guide-color: ${n.guideColor}; --guide-color-active: ${n.guideColorActive}; }`)}u.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),u.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),u.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),u.addRule(`.monaco-editor .vertical.${l.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),u.addRule(`.monaco-editor .horizontal-top.${l.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),u.addRule(`.monaco-editor .horizontal-bottom.${l.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}})}),define(ae[812],le([1,0,14,366,50,167,12,1062]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class E extends p.DynamicViewOverlay{constructor(b){super(),this._context=b,this._readConfig(),this._lastCursorModelPosition=new R.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const b=this._context.configuration.options;this._lineHeight=b.get(60);const S=b.get(61);this._renderLineNumbers=S.renderType,this._renderCustomLineNumbers=S.renderFn,this._renderFinalNewline=b.get(85);const C=b.get(133);this._lineNumbersLeft=C.lineNumbersLeft,this._lineNumbersWidth=C.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(b){return this._readConfig(),!0}onCursorStateChanged(b){const S=b.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(S);let C=!1;return this._activeLineNumber!==S.lineNumber&&(this._activeLineNumber=S.lineNumber,C=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(C=!0),C}onFlushed(b){return!0}onLinesChanged(b){return!0}onLinesDeleted(b){return!0}onLinesInserted(b){return!0}onScrollChanged(b){return b.scrollTopChanged}onZonesChanged(b){return!0}_getLineRenderLineNumber(b){const S=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new R.Position(b,1));if(S.column!==1)return"";const C=S.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(C);if(this._renderLineNumbers===2){const r=Math.abs(this._lastCursorModelPosition.lineNumber-C);return r===0?'<span class="relative-current-line-number">'+C+"</span>":String(r)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===C||C%10===0?String(C):"":String(C)}prepareRender(b){if(this._renderLineNumbers===0){this._renderResult=null;return}const S=t.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",C=b.visibleRange.startLineNumber,r=b.visibleRange.endLineNumber,u='<div class="'+E.CLASS_NAME+S+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',i=this._context.viewModel.getLineCount(),f=[];for(let c=C;c<=r;c++){const l=c-C;if(!this._renderFinalNewline&&c===i&&this._context.viewModel.getLineLength(c)===0){f[l]="";continue}const s=this._getLineRenderLineNumber(c);s?c===this._activeLineNumber?f[l]='<div class="active-line-number '+E.CLASS_NAME+S+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+s+"</div>":f[l]=u+s+"</div>":f[l]=""}this._renderResult=f}render(b,S){if(!this._renderResult)return"";const C=S-b;return C<0||C>=this._renderResult.length?"":this._renderResult[C]}}e.LineNumbersOverlay=E,E.CLASS_NAME="line-numbers",(0,k.registerThemingParticipant)((I,b)=>{const S=I.getColor(A.editorLineNumbers);S&&b.addRule(`.monaco-editor .line-numbers { color: ${S}; }`);const C=I.getColor(A.editorActiveLineNumber);C&&b.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${C}; }`)})}),define(ae[2157],le([1,0,1309,86,121,14,28,235,584,764,180,812,735,134,409,50,20,85,324,92,65,11,1056]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class o{constructor(w,D,y,T,_){this._context=w,this.modelLineNumber=D,this.distanceToModelLineStart=y,this.widthOfHiddenLineTextBefore=T,this.distanceToModelLineEnd=_,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(w){const D=new f.Position(this.modelLineNumber,this.distanceToModelLineStart+1),y=new f.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(D),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(y),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=w.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=w.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(w){return this._previousPresentation||(w?this._previousPresentation=w:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const g=p.isFirefox;class h extends S.ViewPart{constructor(w,D,y){super(w),this._primaryCursorPosition=new f.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=D,this._visibleRangeProvider=y,this._scrollLeft=0,this._scrollTop=0;const T=this._context.configuration.options,_=T.get(133);this._setAccessibilityOptions(T),this._accessibilityWriteTimer=this._register(new a.TimeoutTimer),this._contentLeft=_.contentLeft,this._contentWidth=_.contentWidth,this._contentHeight=_.height,this._fontInfo=T.get(45),this._lineHeight=T.get(60),this._emptySelectionClipboard=T.get(33),this._copyWithSyntaxHighlighting=T.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,R.createFastDomNode)(document.createElement("textarea")),S.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${s.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:L}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${L*this._fontInfo.spaceWidth}px`,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(T)),this.textArea.setAttribute("tabindex",String(T.get(114))),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"),T.get(30)&&T.get(82)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,R.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const M={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:P=>this._context.viewModel.getLineMaxColumn(P),getValueInRange:(P,B)=>this._context.viewModel.getValueInRange(P,B),getValueLengthInRange:(P,B)=>this._context.viewModel.getValueLengthInRange(P,B),modifyPosition:(P,B)=>this._context.viewModel.modifyPosition(P,B)},O={getDataToCopy:()=>{const P=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,A.isWindows),B=this._context.viewModel.model.getEOL(),V=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),z=Array.isArray(P)?P:null,x=Array.isArray(P)?P.join(B):P;let H,W=null;if(I.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&x.length<65536){const U=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);U&&(H=U.html,W=U.mode)}return{isFromEmptySelection:V,multicursorText:z,text:x,html:H,mode:W}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const P=this._selections[0];if(A.isMacintosh&&P.isEmpty()){const V=P.getStartPosition();let z=this._getWordBeforePosition(V);if(z.length===0&&(z=this._getCharacterBeforePosition(V)),z.length>0)return new b.TextAreaState(z,z.length,z.length,c.Range.fromPositions(V),0)}const B=500;if(A.isMacintosh&&!P.isEmpty()&&M.getValueLengthInRange(P,0)<B){const V=M.getValueInRange(P,0);return new b.TextAreaState(V,0,V.length,P,0)}if(p.isSafari&&!P.isEmpty()){const V="vscode-placeholder";return new b.TextAreaState(V,0,V.length,null,void 0)}return b.TextAreaState.EMPTY}if(p.isAndroid){const P=this._selections[0];if(P.isEmpty()){const B=P.getStartPosition(),[V,z]=this._getAndroidWordAtPosition(B);if(V.length>0)return new b.TextAreaState(V,z,z,c.Range.fromPositions(B),0)}return b.TextAreaState.EMPTY}return b.PagedScreenReaderStrategy.fromEditorSelection(M,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(P,B,V)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(P,B,V)},N=this._register(new I.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new I.TextAreaInput(O,N,A.OS,p)),this._register(this._textAreaInput.onKeyDown(P=>{this._viewController.emitKeyDown(P)})),this._register(this._textAreaInput.onKeyUp(P=>{this._viewController.emitKeyUp(P)})),this._register(this._textAreaInput.onPaste(P=>{let B=!1,V=null,z=null;P.metadata&&(B=this._emptySelectionClipboard&&!!P.metadata.isFromEmptySelection,V=typeof P.metadata.multicursorText<"u"?P.metadata.multicursorText:null,z=P.metadata.mode),this._viewController.paste(P.text,B,V,z)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(P=>{P.replacePrevCharCnt||P.replaceNextCharCnt||P.positionDelta?(b._debugComposition&&console.log(` => compositionType: <<${P.text}>>, ${P.replacePrevCharCnt}, ${P.replaceNextCharCnt}, ${P.positionDelta}`),this._viewController.compositionType(P.text,P.replacePrevCharCnt,P.replaceNextCharCnt,P.positionDelta)):(b._debugComposition&&console.log(` => type: <<${P.text}>>`),this._viewController.type(P.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(P=>{this._viewController.setSelection(P)})),this._register(this._textAreaInput.onCompositionStart(P=>{const B=this.textArea.domNode,V=this._modelSelections[0],{distanceToModelLineStart:z,widthOfHiddenTextBefore:x}=(()=>{const W=B.value.substring(0,Math.min(B.selectionStart,B.selectionEnd)),U=W.lastIndexOf(` `),$=W.substring(U+1),q=$.lastIndexOf(" "),X=$.length-q-1,G=V.getStartPosition(),Q=Math.min(G.column-1,X),j=G.column-1-Q,K=$.substring(0,$.length-Q),{tabSize:Y}=this._context.viewModel.model.getOptions(),ee=v(K,this._fontInfo,Y);return{distanceToModelLineStart:j,widthOfHiddenTextBefore:ee}})(),{distanceToModelLineEnd:H}=(()=>{const W=B.value.substring(Math.max(B.selectionStart,B.selectionEnd)),U=W.indexOf(` `),$=U===-1?W:W.substring(0,U),q=$.indexOf(" "),X=q===-1?$.length:$.length-q-1,G=V.getEndPosition(),Q=Math.min(this._context.viewModel.model.getLineMaxColumn(G.lineNumber)-G.column,X);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(G.lineNumber)-G.column-Q}})();this._context.viewModel.revealRange("keyboard",!0,c.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new o(this._context,V.startLineNumber,z,x,H),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${s.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(P=>{!this._visibleTextArea||(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${s.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(w){const D='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',y=this._context.viewModel.getLineContent(w.lineNumber),T=(0,i.getMapForWordSeparators)(D);let _=!0,L=w.column,M=!0,O=w.column,N=0;for(;N<50&&(_||M);){if(_&&L<=1&&(_=!1),_){const P=y.charCodeAt(L-2);T.get(P)!==0?_=!1:L--}if(M&&O>y.length&&(M=!1),M){const P=y.charCodeAt(O-1);T.get(P)!==0?M=!1:O++}N++}return[y.substring(L-1,O-1),w.column-L]}_getWordBeforePosition(w){const D=this._context.viewModel.getLineContent(w.lineNumber),y=(0,i.getMapForWordSeparators)(this._context.configuration.options.get(119));let T=w.column,_=0;for(;T>1;){const L=D.charCodeAt(T-2);if(y.get(L)!==0||_>50)return D.substring(T-1,w.column-1);_++,T--}return D.substring(0,w.column-1)}_getCharacterBeforePosition(w){if(w.column>1){const y=this._context.viewModel.getLineContent(w.lineNumber).charAt(w.column-2);if(!k.isHighSurrogate(y.charCodeAt(0)))return y}return""}_getAriaLabel(w){return w.get(2)===1?t.localize(1,null,A.isLinux?"Shift+Alt+F1":"Alt+F1"):w.get(4)}_setAccessibilityOptions(w){this._accessibilitySupport=w.get(2);const D=w.get(3);this._accessibilitySupport===2&&D===u.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=D;const T=w.get(133).wrappingColumn;if(T!==-1&&this._accessibilitySupport!==1){const _=w.get(45);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(T*_.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=g?0:1}onConfigurationChanged(w){const D=this._context.configuration.options,y=D.get(133);this._setAccessibilityOptions(D),this._contentLeft=y.contentLeft,this._contentWidth=y.contentWidth,this._contentHeight=y.height,this._fontInfo=D.get(45),this._lineHeight=D.get(60),this._emptySelectionClipboard=D.get(33),this._copyWithSyntaxHighlighting=D.get(21),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:T}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${T*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(D)),this.textArea.setAttribute("tabindex",String(D.get(114))),(w.hasChanged(30)||w.hasChanged(82))&&(D.get(30)&&D.get(82)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),w.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(w){return this._selections=w.selections.slice(0),this._modelSelections=w.modelSelections.slice(0),this._accessibilitySupport===1?this._accessibilityWriteTimer.cancelAndSet(()=>this._textAreaInput.writeScreenReaderContent("selection changed"),0):this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(w){return!0}onFlushed(w){return!0}onLinesChanged(w){return!0}onLinesDeleted(w){return!0}onLinesInserted(w){return!0}onScrollChanged(w){return this._scrollLeft=w.scrollLeft,this._scrollTop=w.scrollTop,!0}onZonesChanged(w){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}refreshFocusState(){this._textAreaInput.refreshFocusState()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(w){w.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",w.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),w.role&&this.textArea.setAttribute("role",w.role)}prepareRender(w){this._primaryCursorPosition=new f.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=w.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea?.prepareRender(w)}render(w){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const y=this._visibleTextArea.visibleTextareaStart,T=this._visibleTextArea.visibleTextareaEnd,_=this._visibleTextArea.startPosition,L=this._visibleTextArea.endPosition;if(_&&L&&y&&T&&T.left>=this._scrollLeft&&y.left<=this._scrollLeft+this._contentWidth){const M=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,O=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let N=this._visibleTextArea.widthOfHiddenLineTextBefore,P=this._contentLeft+y.left-this._scrollLeft,B=T.left-y.left+1;if(P<this._contentLeft){const U=this._contentLeft-P;P+=U,N+=U,B-=U}B>this._contentWidth&&(B=this._contentWidth);const V=this._context.viewModel.getViewLineData(_.lineNumber),z=V.tokens.findTokenIndexAtOffset(_.column-1),x=V.tokens.findTokenIndexAtOffset(L.column-1),H=z===x,W=this._visibleTextArea.definePresentation(H?V.tokens.getPresentation(z):null);this.textArea.domNode.scrollTop=O*this._lineHeight,this.textArea.domNode.scrollLeft=N,this._doRender({lastRenderPosition:null,top:M,left:P,width:B,height:this._lineHeight,useCover:!1,color:(d.TokenizationRegistry.getColorMap()||[])[W.foreground],italic:W.italic,bold:W.bold,underline:W.underline,strikethrough:W.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const w=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(w<this._contentLeft||w>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const D=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(D<0||D>this._contentHeight){this._renderAtTopLeft();return}if(A.isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:D,left:this._textAreaWrapping?this._contentLeft:w,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const y=this._textAreaInput.textAreaState.newlineCountBeforeSelection??this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=y*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:D,left:this._textAreaWrapping?this._contentLeft:w,width:this._textAreaWidth,height:g?0:1,useCover:!1})}_newlinecount(w){let D=0,y=-1;do{if(y=w.indexOf(` `,y+1),y===-1)break;D++}while(!0);return D}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:g?0:1,useCover:!0})}_doRender(w){this._lastRenderPosition=w.lastRenderPosition;const D=this.textArea,y=this.textAreaCover;(0,E.applyFontInfo)(D,this._fontInfo),D.setTop(w.top),D.setLeft(w.left),D.setWidth(w.width),D.setHeight(w.height),D.setColor(w.color?n.Color.Format.CSS.formatHex(w.color):""),D.setFontStyle(w.italic?"italic":""),w.bold&&D.setFontWeight("bold"),D.setTextDecoration(`${w.underline?" underline":""}${w.strikethrough?" line-through":""}`),y.setTop(w.useCover?w.top:0),y.setLeft(w.useCover?w.left:0),y.setWidth(w.useCover?w.width:0),y.setHeight(w.useCover?w.height:0);const T=this._context.configuration.options;T.get(51)?y.setClassName("monaco-editor-background textAreaCover "+r.Margin.OUTER_CLASS_NAME):T.get(61).renderType!==0?y.setClassName("monaco-editor-background textAreaCover "+C.LineNumbersOverlay.CLASS_NAME):y.setClassName("monaco-editor-background textAreaCover")}}e.TextAreaHandler=h;function v(m,w,D){if(m.length===0)return 0;const y=document.createElement("div");y.style.position="absolute",y.style.top="-50000px",y.style.width="50000px";const T=document.createElement("span");(0,E.applyFontInfo)(T,w),T.style.whiteSpace="pre",T.style.tabSize=`${D*w.spaceWidth}px`,T.append(m),y.appendChild(T),document.body.appendChild(y);const _=T.offsetWidth;return document.body.removeChild(y),_}}),define(ae[2158],le([1,0,121,65,180,50,92,167,281]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class b{constructor(i,f){const c=i.options;this.lineHeight=c.get(60),this.pixelRatio=c.get(131),this.overviewRulerLanes=c.get(75),this.renderBorder=c.get(74);const l=f.getColor(E.editorOverviewRulerBorder);this.borderColor=l?l.toString():null,this.hideCursor=c.get(53);const s=f.getColor(E.editorCursorForeground);this.cursorColor=s?s.transparent(.7).toString():null,this.themeType=f.type;const d=c.get(66),n=d.enabled,a=d.side,o=f.getColor(E.editorOverviewRulerBackground),g=k.TokenizationRegistry.getDefaultBackground();o?this.backgroundColor=o:n&&a==="right"?this.backgroundColor=g:this.backgroundColor=null;const v=c.get(133).overviewRuler;this.top=v.top,this.right=v.right,this.domWidth=v.width,this.domHeight=v.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[m,w]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=m,this.w=w}_initLanes(i,f,c){const l=f-i;if(c>=3){const s=Math.floor(l/3),d=Math.floor(l/3),n=l-s-d,a=i,o=a+s,g=a+s+n;return[[0,a,o,a,g,a,o,a],[0,s,n,s+n,d,s+n+d,n+d,s+n+d]]}else if(c===2){const s=Math.floor(l/2),d=l-s,n=i,a=n+s;return[[0,n,n,n,a,n,n,n],[0,s,s,s,d,s+d,s+d,s+d]]}else{const s=i,d=l;return[[0,s,s,s,s,s,s,s],[0,d,d,d,d,d,d,d]]}}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&&p.Color.equals(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 S;(function(u){u[u.MIN_DECORATION_HEIGHT=6]="MIN_DECORATION_HEIGHT"})(S||(S={}));var C;(function(u){u[u.Left=1]="Left",u[u.Center=2]="Center",u[u.Right=4]="Right",u[u.Full=7]="Full"})(C||(C={}));class r extends R.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(f=>{f.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(i){const f=new b(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(f)?!1:(this._settings=f,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 f=0,c=i.selections.length;f<c;f++)this._cursorPositions[f]=i.selections[f].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(){const i=this._settings.backgroundColor;if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(i?p.Color.Format.CSS.formatHexA(i):""),this._domNode.setDisplay("none");return}this._domNode.setDisplay("block");const f=this._settings.canvasWidth,c=this._settings.canvasHeight,l=this._settings.lineHeight,s=this._context.viewLayout,d=this._context.viewLayout.getScrollHeight(),n=c/d,a=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme),o=6*this._settings.pixelRatio|0,g=o/2|0,h=this._domNode.domNode.getContext("2d");i?i.isOpaque()?(h.fillStyle=p.Color.Format.CSS.formatHexA(i),h.fillRect(0,0,f,c)):(h.clearRect(0,0,f,c),h.fillStyle=p.Color.Format.CSS.formatHexA(i),h.fillRect(0,0,f,c)):h.clearRect(0,0,f,c);const v=this._settings.x,m=this._settings.w;a.sort(I.OverviewRulerDecorationsGroup.cmp);for(const w of a){const D=w.color,y=w.data;h.fillStyle=D;let T=0,_=0,L=0;for(let M=0,O=y.length/3;M<O;M++){const N=y[3*M],P=y[3*M+1],B=y[3*M+2];let V=s.getVerticalOffsetForLineNumber(P)*n|0,z=(s.getVerticalOffsetForLineNumber(B)+l)*n|0;if(z-V<o){let H=(V+z)/2|0;H<g?H=g:H+g>c&&(H=c-g),V=H-g,z=H+g}V>L+1||N!==T?(M!==0&&h.fillRect(v[T],_,m[T],L-_),T=N,_=V,L=z):z>L&&(L=z)}h.fillRect(v[T],_,m[T],L-_)}if(!this._settings.hideCursor&&this._settings.cursorColor){const w=2*this._settings.pixelRatio|0,D=w/2|0,y=this._settings.x[7],T=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let _=-100,L=-100;for(let M=0,O=this._cursorPositions.length;M<O;M++){const N=this._cursorPositions[M];let P=s.getVerticalOffsetForLineNumber(N.lineNumber)*n|0;P<D?P=D:P+D>c&&(P=c-D);const B=P-D,V=B+w;B>L+1?(M!==0&&h.fillRect(y,_,T,L-_),_=B,L=V):V>L&&(L=V)}h.fillRect(y,_,T,L-_)}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,c),h.stroke(),h.moveTo(0,0),h.lineTo(f,0),h.stroke())}}e.DecorationsOverviewRuler=r}),define(ae[2159],le([1,0,121,180,167,12,1068]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rulers=void 0;class k extends p.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 b=this._context.configuration.options;this._rulers=b.get(92),this._typicalHalfwidthCharacterWidth=b.get(45).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(I){const b=this._context.configuration.options;return this._rulers=b.get(92),this._typicalHalfwidthCharacterWidth=b.get(45).typicalHalfwidthCharacterWidth,!0}onScrollChanged(I){return I.scrollHeightChanged}prepareRender(I){}_ensureRulersCount(){const I=this._renderedRulers.length,b=this._rulers.length;if(I===b)return;if(I<b){const{tabSize:C}=this._context.viewModel.model.getOptions(),r=C;let u=b-I;for(;u>0;){const i=(0,t.createFastDomNode)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(r),this.domNode.appendChild(i),this._renderedRulers.push(i),u--}return}let S=I-b;for(;S>0;){const C=this._renderedRulers.pop();this.domNode.removeChild(C),S--}}render(I){this._ensureRulersCount();for(let b=0,S=this._rulers.length;b<S;b++){const C=this._renderedRulers[b],r=this._rulers[b];C.setBoxShadow(r.color?`1px 0 0 0 ${r.color} inset`:""),C.setHeight(Math.min(I.scrollHeight,1e6)),C.setLeft(r.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=k,(0,A.registerThemingParticipant)((E,I)=>{const b=E.getColor(R.editorRuler);b&&I.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${b} inset; }`)})}),define(ae[2160],le([1,0,121,11,180,1319,134,167,12,126,1071]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class S extends R.ViewPart{constructor(r){super(r);const u=this._context.configuration.options;this._readOnly=u.get(82),this._cursorBlinking=u.get(22),this._cursorStyle=u.get(24),this._cursorSmoothCaretAnimation=u.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 p.TimeoutTimer,this._cursorFlatBlinkInterval=new p.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(r){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(r){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(r){const u=this._context.configuration.options;this._readOnly=u.get(82),this._cursorBlinking=u.get(22),this._cursorStyle=u.get(24),this._cursorSmoothCaretAnimation=u.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(r);for(let i=0,f=this._secondaryCursors.length;i<f;i++)this._secondaryCursors[i].onConfigurationChanged(r);return!0}_onCursorPositionChanged(r,u){if(this._primaryCursor.onCursorPositionChanged(r),this._updateBlinking(),this._secondaryCursors.length<u.length){const i=u.length-this._secondaryCursors.length;for(let f=0;f<i;f++){const c=new A.ViewCursor(this._context);this._domNode.domNode.insertBefore(c.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(c)}}else if(this._secondaryCursors.length>u.length){const i=this._secondaryCursors.length-u.length;for(let f=0;f<i;f++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let i=0;i<u.length;i++)this._secondaryCursors[i].onCursorPositionChanged(u[i])}onCursorStateChanged(r){const u=[];for(let f=0,c=r.selections.length;f<c;f++)u[f]=r.selections[f].getPosition();this._onCursorPositionChanged(u[0],u.slice(1));const i=r.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(r){return!0}onFlushed(r){return!0}onFocusChanged(r){return this._editorHasFocus=r.isFocused,this._updateBlinking(),!1}onLinesChanged(r){return!0}onLinesDeleted(r){return!0}onLinesInserted(r){return!0}onScrollChanged(r){return!0}onTokensChanged(r){const u=i=>{for(let f=0,c=r.ranges.length;f<c;f++)if(r.ranges[f].fromLineNumber<=i.lineNumber&&i.lineNumber<=r.ranges[f].toLineNumber)return!0;return!1};if(u(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(u(i.getPosition()))return!0;return!1}onZonesChanged(r){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const r=this._getCursorBlinking(),u=r===0,i=r===5;u?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!u&&!i&&(r===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},S.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},S.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let r="cursors-layer";switch(this._selectionIsEmpty||(r+=" has-selection"),this._cursorStyle){case k.TextEditorCursorStyle.Line:r+=" cursor-line-style";break;case k.TextEditorCursorStyle.Block:r+=" cursor-block-style";break;case k.TextEditorCursorStyle.Underline:r+=" cursor-underline-style";break;case k.TextEditorCursorStyle.LineThin:r+=" cursor-line-thin-style";break;case k.TextEditorCursorStyle.BlockOutline:r+=" cursor-block-outline-style";break;case k.TextEditorCursorStyle.UnderlineThin:r+=" cursor-underline-thin-style";break;default:r+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:r+=" cursor-blink";break;case 2:r+=" cursor-smooth";break;case 3:r+=" cursor-phase";break;case 4:r+=" cursor-expand";break;case 5:r+=" cursor-solid";break;default:r+=" cursor-solid"}else r+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(r+=" cursor-smooth-caret-animation"),r}_show(){this._primaryCursor.show();for(let r=0,u=this._secondaryCursors.length;r<u;r++)this._secondaryCursors[r].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let r=0,u=this._secondaryCursors.length;r<u;r++)this._secondaryCursors[r].hide();this._isVisible=!1}prepareRender(r){this._primaryCursor.prepareRender(r);for(let u=0,i=this._secondaryCursors.length;u<i;u++)this._secondaryCursors[u].prepareRender(r)}render(r){const u=[];let i=0;const f=this._primaryCursor.render(r);f&&(u[i++]=f);for(let c=0,l=this._secondaryCursors.length;c<l;c++){const s=this._secondaryCursors[c].render(r);s&&(u[i++]=s)}this._renderData=u}getLastRenderData(){return this._renderData}}e.ViewCursors=S,S.BLINK_INTERVAL=500,(0,I.registerThemingParticipant)((C,r)=>{const u=C.getColor(E.editorCursorForeground);if(u){let i=C.getColor(E.editorCursorBackground);i||(i=u.opposite()),r.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${u}; }`),r.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${u}; border-color: ${u}; color: ${i}; }`),(0,b.isHighContrast)(C.type)&&r.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}})}),define(ae[2161],le([1,0,6,2,20,167,12]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class E extends p.Disposable{constructor(S){super(),this.textModel=S,this.colorProvider=new I,this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=S.getOptions().bracketPairColorizationOptions,this._register(S.bracketPairs.onDidChange(C=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(S){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(S,C,r,u){return u?[]:C===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(S).map(f=>({id:`bracket${f.range.toString()}-${f.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(f,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:f.range})).toArray():[]}getAllDecorations(S,C){return S===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new R.Range(1,1,this.textModel.getLineCount(),1),S,C):[]}}e.ColorizedBracketPairsDecorationProvider=E;class I{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(S,C){return S.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(C?S.nestingLevelOfEqualBracketType:S.nestingLevel)}getInlineClassNameOfLevel(S){return`bracket-highlighting-${S%30}`}}(0,k.registerThemingParticipant)((b,S)=>{const C=[A.editorBracketHighlightingForeground1,A.editorBracketHighlightingForeground2,A.editorBracketHighlightingForeground3,A.editorBracketHighlightingForeground4,A.editorBracketHighlightingForeground5,A.editorBracketHighlightingForeground6],r=new I;S.addRule(`.monaco-editor .${r.unexpectedClosingBracketClassName} { color: ${b.getColor(A.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const u=C.map(i=>b.getColor(i)).filter(i=>!!i).filter(i=>!i.isTransparent());for(let i=0;i<30;i++){const f=u[i%u.length];S.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(i)} { color: ${f}; }`)}})}),define(ae[2162],le([1,0,124,2,116,12,167,54,20,22,6,33,60]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;class u extends p.Disposable{constructor(c){super(),this.model=c,this._markersData=new Map,this._register((0,p.toDisposable)(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(c,l){const s=[...this._markersData.keys()];this._markersData.clear();const d=this.model.deltaDecorations(s,l);for(let n=0;n<d.length;n++)this._markersData.set(d[n],c[n]);return s.length!==0||d.length!==0}getMarker(c){return this._markersData.get(c.id)}getMarkers(){const c=[];return this._markersData.forEach((l,s)=>{const d=this.model.getDecorationRange(s);d&&c.push([d,l])}),c}}let i=class extends p.Disposable{constructor(c,l){super(),this._markerService=l,this._onDidChangeMarker=this._register(new S.Emitter),this.onDidChangeMarker=this._onDidChangeMarker.event,this._markerDecorations=new r.ResourceMap,c.getModels().forEach(s=>this._onModelAdded(s)),this._register(c.onModelAdded(this._onModelAdded,this)),this._register(c.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(c=>c.dispose()),this._markerDecorations.clear()}getMarker(c,l){const s=this._markerDecorations.get(c);return s&&s.getMarker(l)||null}getLiveMarkers(c){const l=this._markerDecorations.get(c);return l?l.getMarkers():[]}_handleMarkerChange(c){c.forEach(l=>{const s=this._markerDecorations.get(l);s&&this._updateDecorations(s)})}_onModelAdded(c){const l=new u(c);this._markerDecorations.set(c.uri,l),this._updateDecorations(l)}_onModelRemoved(c){const l=this._markerDecorations.get(c.uri);l&&(l.dispose(),this._markerDecorations.delete(c.uri)),(c.uri.scheme===b.Schemas.inMemory||c.uri.scheme===b.Schemas.internal||c.uri.scheme===b.Schemas.vscode)&&this._markerService?.read({resource:c.uri}).map(s=>s.owner).forEach(s=>this._markerService.remove(s,[c.uri]))}_updateDecorations(c){const l=this._markerService.read({resource:c.model.uri,take:500}),s=l.map(d=>({range:this._createDecorationRange(c.model,d),options:this._createDecorationOption(d)}));c.update(l,s)&&this._onDidChangeMarker.fire(c.model)}_createDecorationRange(c,l){let s=I.Range.lift(l);if(l.severity===t.MarkerSeverity.Hint&&!this._hasMarkerTag(l,1)&&!this._hasMarkerTag(l,2)&&(s=s.setEndPosition(s.startLineNumber,s.startColumn+2)),s=c.validateRange(s),s.isEmpty()){const d=c.getLineLastNonWhitespaceColumn(s.startLineNumber)||c.getLineMaxColumn(s.startLineNumber);if(d===1||s.endColumn>=d)return s;const n=c.getWordAtPosition(s.getStartPosition());n&&(s=new I.Range(s.startLineNumber,n.startColumn,s.endLineNumber,n.endColumn))}else if(l.endColumn===Number.MAX_VALUE&&l.startColumn===1&&s.startLineNumber===s.endLineNumber){const d=c.getLineFirstNonWhitespaceColumn(l.startLineNumber);d<s.endColumn&&(s=new I.Range(s.startLineNumber,d,s.endLineNumber,s.endColumn),l.startColumn=d)}return s}_createDecorationOption(c){let l,s,d,n,a;switch(c.severity){case t.MarkerSeverity.Hint:this._hasMarkerTag(c,2)?l=void 0:this._hasMarkerTag(c,1)?l="squiggly-unnecessary":l="squiggly-hint",d=0;break;case t.MarkerSeverity.Warning:l="squiggly-warning",s=(0,A.themeColorFromId)(k.overviewRulerWarning),d=20,a={color:(0,A.themeColorFromId)(C.minimapWarning),position:R.MinimapPosition.Inline};break;case t.MarkerSeverity.Info:l="squiggly-info",s=(0,A.themeColorFromId)(k.overviewRulerInfo),d=10;break;case t.MarkerSeverity.Error:default:l="squiggly-error",s=(0,A.themeColorFromId)(k.overviewRulerError),d=30,a={color:(0,A.themeColorFromId)(C.minimapError),position:R.MinimapPosition.Inline};break}return c.tags&&(c.tags.indexOf(1)!==-1&&(n="squiggly-inline-unnecessary"),c.tags.indexOf(2)!==-1&&(n="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:l,showIfCollapsed:!0,overviewRuler:{color:s,position:R.OverviewRulerLane.Right},minimap:a,zIndex:d,inlineClassName:n}}_hasMarkerTag(c,l){return c.tags?c.tags.indexOf(l)>=0:!1}};i=we([F(0,E.IModelService),F(1,t.IMarkerService)],i),e.MarkerDecorationsService=i}),define(ae[813],le([1,0,325,12,25,1212,42]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=e.SemanticTokensProviderStylingConstants=void 0;var E;(function(u){u[u.NO_STYLING=2147483647]="NO_STYLING"})(E=e.SemanticTokensProviderStylingConstants||(e.SemanticTokensProviderStylingConstants={}));let I=class{constructor(i,f,c,l){this._legend=i,this._themeService=f,this._languageService=c,this._logService=l,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new r}getMetadata(i,f,c){const l=this._languageService.languageIdCodec.encodeLanguageId(c),s=this._hashTable.get(i,f,l);let d;if(s)d=s.metadata,this._logService.getLevel()===R.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${f}: foreground ${t.TokenMetadata.getForeground(d)}, fontStyle ${t.TokenMetadata.getFontStyle(d).toString(2)}`);else{let n=this._legend.tokenTypes[i];const a=[];if(n){let o=f;for(let h=0;o>0&&h<this._legend.tokenModifiers.length;h++)o&1&&a.push(this._legend.tokenModifiers[h]),o=o>>1;o>0&&this._logService.getLevel()===R.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${f.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const g=this._themeService.getColorTheme().getTokenStyleMetadata(n,a,c);typeof g>"u"?d=2147483647:(d=0,typeof g.italic<"u"&&(d|=(g.italic?1:0)<<11|1),typeof g.bold<"u"&&(d|=(g.bold?2:0)<<11|2),typeof g.underline<"u"&&(d|=(g.underline?4:0)<<11|4),typeof g.strikethrough<"u"&&(d|=(g.strikethrough?8:0)<<11|8),g.foreground&&(d|=g.foreground<<15|16),d===0&&(d=2147483647))}else this._logService.getLevel()===R.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),d=2147483647,n="not-in-legend";this._hashTable.add(i,f,l,d),this._logService.getLevel()===R.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${n}) / ${f} (${a.join(" ")}): foreground ${t.TokenMetadata.getForeground(d)}, fontStyle ${t.TokenMetadata.getFontStyle(d).toString(2)}`)}return d}warnOverlappingSemanticTokens(i,f){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${f}`))}warnInvalidLengthSemanticTokens(i,f){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${i}, column ${f}`))}warnInvalidEditStart(i,f,c,l,s){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${i}, resultId: ${f}) at edit #${c}: The provided start offset ${l} is outside the previous data (length ${s}).`))}};I=we([F(1,p.IThemeService),F(2,k.ILanguageService),F(3,R.ILogService)],I),e.SemanticTokensProviderStyling=I;var b;(function(u){u[u.DesiredTokensPerArea=400]="DesiredTokensPerArea",u[u.DesiredMaxAreas=1024]="DesiredMaxAreas"})(b||(b={}));function S(u,i,f){const c=u.data,l=u.data.length/5|0,s=Math.max(Math.ceil(l/1024),400),d=[];let n=0,a=1,o=0;for(;n<l;){const g=n;let h=Math.min(g+s,l);if(h<l){let _=h;for(;_-1>g&&c[5*_]===0;)_--;if(_-1===g){let L=h;for(;L+1<l&&c[5*L]===0;)L++;h=L}else h=_}let v=new Uint32Array((h-g)*4),m=0,w=0,D=0,y=0;for(;n<h;){const _=5*n,L=c[_],M=c[_+1],O=a+L|0,N=L===0?o+M|0:M,P=c[_+2],B=N+P|0,V=c[_+3],z=c[_+4];if(B<=N)i.warnInvalidLengthSemanticTokens(O,N+1);else if(D===O&&y>N)i.warnOverlappingSemanticTokens(O,N+1);else{const x=i.getMetadata(V,z,f);x!==2147483647&&(w===0&&(w=O),v[m]=O-w,v[m+1]=N,v[m+2]=B,v[m+3]=x,m+=4,D=O,y=B)}a=O,o=N,n++}m!==v.length&&(v=v.subarray(0,m));const T=A.SparseMultilineTokens.create(w,v);d.push(T)}return d}e.toMultilineTokens2=S;class C{constructor(i,f,c,l){this.tokenTypeIndex=i,this.tokenModifierSet=f,this.languageId=c,this.metadata=l,this.next=null}}class r{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=r._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<r._SIZES.length?2/3*this._currentLength:0),this._elements=[],r._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(i,f){for(let c=0;c<f;c++)i[c]=null}_hash2(i,f){return(i<<5)-i+f|0}_hashFunc(i,f,c){return this._hash2(this._hash2(i,f),c)%this._currentLength}get(i,f,c){const l=this._hashFunc(i,f,c);let s=this._elements[l];for(;s;){if(s.tokenTypeIndex===i&&s.tokenModifierSet===f&&s.languageId===c)return s;s=s.next}return null}add(i,f,c,l){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=r._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<r._SIZES.length?2/3*this._currentLength:0),this._elements=[],r._nullOutEntries(this._elements,this._currentLength);for(const d of s){let n=d;for(;n;){const a=n.next;n.next=null,this._add(n),n=a}}}this._add(new C(i,f,c,l))}_add(i){const f=this._hashFunc(i.tokenTypeIndex,i.tokenModifierSet,i.languageId);i.next=this._elements[f],this._elements[f]=i}}r._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}),define(ae[2163],le([1,0,10,133,29,6,2,13,567,1336,38,33,12,1078]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var u;(function(f){let c;(function(s){s[s.Hidden=0]="Hidden",s[s.Showing=1]="Showing"})(c=f.Type||(f.Type={})),f.Hidden={type:0};class l{constructor(d,n,a,o){this.actions=d,this.trigger=n,this.editorPosition=a,this.widgetPosition=o,this.type=1}}f.Showing=l})(u||(u={}));let i=class $o extends k.Disposable{constructor(c,l,s,d){super(),this._editor=c,this._onClick=this._register(new A.Emitter),this.onClick=this._onClick.event,this._state=u.Hidden,this._domNode=document.createElement("div"),this._domNode.className=R.Codicon.lightBulb.classNames,this._register(p.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(n=>{const a=this._editor.getModel();(this.state.type!==1||!a||this.state.editorPosition.lineNumber>=a.getLineCount())&&this.hide()})),this._register(t.addStandardDisposableGenericMouseDownListener(this._domNode,n=>{if(this.state.type!==1)return;this._editor.focus(),n.preventDefault();const{top:a,height:o}=t.getDomNodePagePosition(this._domNode),g=this._editor.getOption(60);let h=Math.floor(g/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(h+=g),this._onClick.fire({x:n.posx,y:a+o+h,actions:this.state.actions,trigger:this.state.trigger})})),this._register(t.addDisposableListener(this._domNode,"mouseenter",n=>{(n.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(58)&&!this._editor.getOption(58).enabled&&this.hide()})),this._register(A.Event.runAndSubscribe(d.onDidUpdateKeybindings,()=>{this._preferredKbLabel=(0,E.withNullAsUndefined)(d.lookupKeybinding(s)?.getLabel()),this._quickFixKbLabel=(0,E.withNullAsUndefined)(d.lookupKeybinding(l)?.getLabel()),this._updateLightBulbTitleAndIcon()}))}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(c,l,s){if(c.validActions.length<=0)return this.hide();const d=this._editor.getOptions();if(!d.get(58).enabled)return this.hide();const n=this._editor.getModel();if(!n)return this.hide();const{lineNumber:a,column:o}=n.validatePosition(s),g=n.getOptions().tabSize,h=d.get(45),v=n.getLineContent(a),m=(0,I.computeIndentLevel)(v,g),w=h.spaceWidth*m>22,D=T=>T>2&&this._editor.getTopForLineNumber(T)===this._editor.getTopForLineNumber(T-1);let y=a;if(!w){if(a>1&&!D(a-1))y-=1;else if(!D(a+1))y+=1;else if(o*h.spaceWidth<22)return this.hide()}this.state=new u.Showing(c,l,s,{position:{lineNumber:y,column:1},preference:$o._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==u.Hidden&&(this.state=u.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(c){this._state=c,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...R.Codicon.lightBulb.classNamesArray),this._domNode.classList.add(...R.Codicon.lightbulbAutofix.classNamesArray),this._preferredKbLabel)){this.title=b.localize(0,null,this._preferredKbLabel);return}this._domNode.classList.remove(...R.Codicon.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...R.Codicon.lightBulb.classNamesArray),this._quickFixKbLabel?this.title=b.localize(1,null,this._quickFixKbLabel):this.title=b.localize(2,null)}set title(c){this._domNode.title=c}};i._posPref=[0],i=we([F(3,S.IKeybindingService)],i),e.LightBulbWidget=i,(0,r.registerThemingParticipant)((f,c)=>{const l=f.getColor(C.editorBackground)?.transparent(.7),s=f.getColor(C.editorLightBulbForeground);s&&c.addRule(` .monaco-editor .contentWidgets ${R.Codicon.lightBulb.cssSelector} { color: ${s}; background-color: ${l}; }`);const d=f.getColor(C.editorLightBulbAutoFixForeground);d&&c.addRule(` .monaco-editor .contentWidgets ${R.Codicon.lightbulbAutofix.cssSelector} { color: ${d}; background-color: ${l}; }`)})}),define(ae[2164],le([1,0,86,10,415,140,65,6,2,1338,33,12,1080]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.ColorPickerBody=e.ColorPickerHeader=void 0;const r=p.$;class u extends I.Disposable{constructor(a,o,g){super(),this.model=o,this.domNode=r(".colorpicker-header"),p.append(a,this.domNode),this.pickedColorNode=p.append(this.domNode,r(".picked-color"));const h=(0,b.localize)(0,null);this.pickedColorNode.setAttribute("title",h);const v=p.append(this.domNode,r(".original-color"));v.style.backgroundColor=k.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=g.getColorTheme().getColor(S.editorHoverBackground)||k.Color.white,this._register((0,C.registerThemingParticipant)((m,w)=>{this.backgroundColor=m.getColor(S.editorHoverBackground)||k.Color.white})),this._register(p.addDisposableListener(this.pickedColorNode,p.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(p.addDisposableListener(v,p.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(o.onDidChangeColor(this.onDidChangeColor,this)),this._register(o.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=k.Color.Format.CSS.format(o.color)||"",this.pickedColorNode.classList.toggle("light",o.color.rgba.a<.5?this.backgroundColor.isLighter():o.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(r(".codicon.codicon-color-mode"))}}e.ColorPickerHeader=u;class i extends I.Disposable{constructor(a,o,g){super(),this.model=o,this.pixelRatio=g,this.domNode=r(".colorpicker-body"),p.append(a,this.domNode),this.saturationBox=new f(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 s(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:o}){const g=this.model.color.hsva;this.model.color=new k.Color(new k.HSVA(g.h,a,o,g.a))}onDidOpacityChange(a){const o=this.model.color.hsva;this.model.color=new k.Color(new k.HSVA(o.h,o.s,o.v,a))}onDidHueChange(a){const o=this.model.color.hsva,g=(1-a)*360;this.model.color=new k.Color(new k.HSVA(g===360?0:g,o.s,o.v,o.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}e.ColorPickerBody=i;class f extends I.Disposable{constructor(a,o,g){super(),this.model=o,this.pixelRatio=g,this._onDidChange=new E.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new E.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=r(".saturation-wrap"),p.append(a,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",p.append(this.domNode,this.canvas),this.selection=r(".saturation-selection"),p.append(this.domNode,this.selection),this.layout(),this._register(p.addDisposableListener(this.domNode,p.EventType.POINTER_DOWN,h=>this.onPointerDown(h))),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 R.GlobalPointerMoveMonitor);const o=p.getDomNodePagePosition(this.domNode);a.target!==this.selection&&this.onDidChangePosition(a.offsetX,a.offsetY),this.monitor.startMonitoring(a.target,a.pointerId,a.buttons,h=>this.onDidChangePosition(h.pageX-o.left,h.pageY-o.top),()=>null);const g=p.addDisposableListener(document,p.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),g.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(a,o){const g=Math.max(0,Math.min(1,a/this.width)),h=Math.max(0,Math.min(1,1-o/this.height));this.paintSelection(g,h),this._onDidChange.fire({s:g,v:h})}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,o=new k.Color(new k.HSVA(a.h,1,1,1)),g=this.canvas.getContext("2d"),h=g.createLinearGradient(0,0,this.canvas.width,0);h.addColorStop(0,"rgba(255, 255, 255, 1)"),h.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),h.addColorStop(1,"rgba(255, 255, 255, 0)");const v=g.createLinearGradient(0,0,0,this.canvas.height);v.addColorStop(0,"rgba(0, 0, 0, 0)"),v.addColorStop(1,"rgba(0, 0, 0, 1)"),g.rect(0,0,this.canvas.width,this.canvas.height),g.fillStyle=k.Color.Format.CSS.format(o),g.fill(),g.fillStyle=h,g.fill(),g.fillStyle=v,g.fill()}paintSelection(a,o){this.selection.style.left=`${a*this.width}px`,this.selection.style.top=`${this.height-o*this.height}px`}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class c extends I.Disposable{constructor(a,o){super(),this.model=o,this._onDidChange=new E.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new E.Emitter,this.onColorFlushed=this._onColorFlushed.event,this.domNode=p.append(a,r(".strip")),this.overlay=p.append(this.domNode,r(".overlay")),this.slider=p.append(this.domNode,r(".slider")),this.slider.style.top="0px",this._register(p.addDisposableListener(this.domNode,p.EventType.POINTER_DOWN,g=>this.onPointerDown(g))),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 o=this._register(new R.GlobalPointerMoveMonitor),g=p.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),a.target!==this.slider&&this.onDidChangeTop(a.offsetY),o.startMonitoring(a.target,a.pointerId,a.buttons,v=>this.onDidChangeTop(v.pageY-g.top),()=>null);const h=p.addDisposableListener(document,p.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),h.dispose(),o.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(a){const o=Math.max(0,Math.min(1,1-a/this.height));this.updateSliderPosition(o),this._onDidChange.fire(o)}updateSliderPosition(a){this.slider.style.top=`${(1-a)*this.height}px`}}class l extends c{constructor(a,o){super(a,o),this.domNode.classList.add("opacity-strip"),this._register(o.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(a){const{r:o,g,b:h}=a.rgba,v=new k.Color(new k.RGBA(o,g,h,1)),m=new k.Color(new k.RGBA(o,g,h,0));this.overlay.style.background=`linear-gradient(to bottom, ${v} 0%, ${m} 100%)`}getValue(a){return a.hsva.a}}class s extends c{constructor(a,o){super(a,o),this.domNode.classList.add("hue-strip")}getValue(a){return 1-a.hsva.h/360}}class d extends A.Widget{constructor(a,o,g,h){super(),this.model=o,this.pixelRatio=g,this._register(t.PixelRatio.onDidChange(()=>this.layout()));const v=r(".colorpicker-widget");a.appendChild(v);const m=new u(v,this.model,h);this.body=new i(v,this.model,this.pixelRatio),this._register(m),this._register(this.body)}getId(){return d.ID}layout(){this.body.layout()}}e.ColorPickerWidget=d,d.ID="editor.contrib.colorPickerWidget"}),define(ae[2165],le([1,0,10,277,250,239,96,2,18,62,1358,5,38,49,73,12,425]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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 l=class{constructor(w){this._resolverService=w}hasChildren(w){return w instanceof c.ReferencesModel||w instanceof c.FileReferences}getChildren(w){if(w instanceof c.ReferencesModel)return w.groups;if(w instanceof c.FileReferences)return w.resolve(this._resolverService).then(D=>D.children);throw new Error("bad tree")}};l=we([F(0,b.ITextModelService)],l),e.DataSource=l;class s{getHeight(){return 23}getTemplateId(w){return w instanceof c.FileReferences?o.id:h.id}}e.Delegate=s;let d=class{constructor(w){this._keybindingService=w}getKeyboardNavigationLabel(w){if(w instanceof c.OneReference){const D=w.parent.getPreview(w)?.preview(w.range);if(D)return D.value}return(0,I.basename)(w.uri)}mightProducePrintableCharacter(w){return this._keybindingService.mightProducePrintableCharacter(w)}};d=we([F(0,r.IKeybindingService)],d),e.StringRepresentationProvider=d;class n{getId(w){return w instanceof c.OneReference?w.id:w.uri}}e.IdentityProvider=n;let a=class extends E.Disposable{constructor(w,D,y){super(),this._labelService=D;const T=document.createElement("div");T.classList.add("reference-file"),this.file=this._register(new A.IconLabel(T,{supportHighlights:!0})),this.badge=new p.CountBadge(t.append(T,t.$(".count"))),this._register((0,i.attachBadgeStyler)(this.badge,y)),w.appendChild(T)}set(w,D){const y=(0,I.dirname)(w.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(w.uri),this._labelService.getUriLabel(y,{relative:!0}),{title:this._labelService.getUriLabel(w.uri),matches:D});const T=w.children.length;this.badge.setCount(T),T>1?this.badge.setTitleFormat((0,S.localize)(0,null,T)):this.badge.setTitleFormat((0,S.localize)(1,null,T))}};a=we([F(1,u.ILabelService),F(2,f.IThemeService)],a);let o=class qo{constructor(w){this._instantiationService=w,this.templateId=qo.id}renderTemplate(w){return this._instantiationService.createInstance(a,w)}renderElement(w,D,y){y.set(w.element,(0,k.createMatches)(w.filterData))}disposeTemplate(w){w.dispose()}};o.id="FileReferencesRenderer",o=we([F(0,C.IInstantiationService)],o),e.FileReferencesRenderer=o;class g{constructor(w){this.label=new R.HighlightedLabel(w)}set(w,D){const y=w.parent.getPreview(w)?.preview(w.range);if(!y||!y.value)this.label.set(`${(0,I.basename)(w.uri)}:${w.range.startLineNumber+1}:${w.range.startColumn+1}`);else{const{value:T,highlight:_}=y;D&&!k.FuzzyScore.isDefault(D)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(T,(0,k.createMatches)(D))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(T,[_]))}}}class h{constructor(){this.templateId=h.id}renderTemplate(w){return new g(w)}renderElement(w,D,y){y.set(w.element,w.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=h,h.id="OneReferenceRenderer";class v{getWidgetAriaLabel(){return(0,S.localize)(2,null)}getAriaLabel(w){return w.ariaMessage}}e.AccessibilityProvider=v}),define(ae[2166],le([1,0,10,2,28,235,134,301,50,20,280,116,42,167,421,424,496,5,12,1087]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=void 0;const d=window.trustedTypes?.createPolicy("editorGhostText",{createHTML:m=>m});let n=class extends p.Disposable{constructor(w,D,y,T){super(),this.editor=w,this.model=D,this.instantiationService=y,this.languageService=T,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(o,this.editor)),this.additionalLinesWidget=this._register(new g(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this.replacementDecoration=this._register(new a(this.editor)),this._register(this.editor.onDidChangeConfiguration(_=>{(_.hasChanged(29)||_.hasChanged(107)||_.hasChanged(89)||_.hasChanged(84)||_.hasChanged(46)||_.hasChanged(45)||_.hasChanged(60))&&this.update()})),this._register((0,p.toDisposable)(()=>{this.disposed=!0,this.update(),this.viewMoreContentWidget?.dispose(),this.viewMoreContentWidget=void 0})),this._register(D.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(w){return this.additionalLinesWidget.viewZoneId===w}update(){const w=this.model.ghostText;if(!this.editor.hasModel()||!w||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear(),this.replacementDecoration.clear();return}const D=new Array,y=new Array;function T(O,N){if(y.length>0){const P=y[y.length-1];N&&P.decorations.push(new i.LineDecoration(P.content.length+1,P.content.length+1+O[0].length,N,0)),P.content+=O[0],O=O.slice(1)}for(const P of O)y.push({content:P,decorations:N?[new i.LineDecoration(1,P.length+1,N,0)]:[]})}w instanceof c.GhostTextReplacement?this.replacementDecoration.setDecorations([{range:new b.Range(w.lineNumber,w.columnStart,w.lineNumber,w.columnStart+w.length),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}]):this.replacementDecoration.setDecorations([]);const _=this.editor.getModel().getLineContent(w.lineNumber);let L,M=0;for(const O of w.parts){let N=O.lines;L===void 0?(D.push({column:O.column,text:N[0],preview:O.preview}),N=N.slice(1)):T([_.substring(M,O.column-1)],void 0),N.length>0&&(T(N,"ghost-text"),L===void 0&&O.column<=_.length&&(L=O.column)),M=O.column-1}L!==void 0&&T([_.substring(M)],void 0),this.partsWidget.setParts(w.lineNumber,D,L!==void 0?{column:L,length:_.length+1-L}:void 0),this.additionalLinesWidget.updateLines(w.lineNumber,y,w.additionalReservedLineCount),0<0?this.viewMoreContentWidget=this.renderViewMoreLines(new I.Position(w.lineNumber,this.editor.getModel().getLineMaxColumn(w.lineNumber)),"",0):(this.viewMoreContentWidget?.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(w,D,y){const T=this.editor.getOption(45),_=document.createElement("div");_.className="suggest-preview-additional-widget",(0,A.applyFontInfo)(_,T);const L=document.createElement("span");L.className="content-spacer",L.append(D),_.append(L);const M=document.createElement("span");M.className="content-newline suggest-preview-text",M.append("\u23CE "),_.append(M);const O=new p.DisposableStore,N=document.createElement("div");return N.className="button suggest-preview-text",N.append(`+${y} lines\u2026`),O.add(t.addStandardDisposableListener(N,"mousedown",P=>{this.model?.setExpanded(!0),P.preventDefault(),this.editor.focus()})),_.append(N),new v(this.editor,w,_,O)}};n=we([F(2,l.IInstantiationService),F(3,r.ILanguageService)],n),e.GhostTextWidget=n;class a{constructor(w){this.editor=w,this.decorationIds=[]}setDecorations(w){this.editor.changeDecorations(D=>{this.decorationIds=D.deltaDecorations(this.decorationIds,w)})}clear(){this.setDecorations([])}dispose(){this.clear()}}class o{constructor(w){this.editor=w,this.decorationIds=[]}dispose(){this.clear()}clear(){this.editor.changeDecorations(w=>{this.decorationIds=w.deltaDecorations(this.decorationIds,[])})}setParts(w,D,y){if(!this.editor.getModel())return;const _=new Array;y&&_.push({range:b.Range.fromPositions(new I.Position(w,y.column),new I.Position(w,y.column+y.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.editor.changeDecorations(L=>{this.decorationIds=L.deltaDecorations(this.decorationIds,D.map(M=>({range:b.Range.fromPositions(new I.Position(w,M.column)),options:{description:"ghost-text",after:{content:M.text,inlineClassName:M.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:C.InjectedTextCursorStops.Left},showIfCollapsed:!0}})).concat(_))})}}class g{get viewZoneId(){return this._viewZoneId}constructor(w,D){this.editor=w,this.languageIdCodec=D,this._viewZoneId=void 0}dispose(){this.clear()}clear(){this.editor.changeViewZones(w=>{this._viewZoneId&&(w.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(w,D,y){const T=this.editor.getModel();if(!T)return;const{tabSize:_}=T.getOptions();this.editor.changeViewZones(L=>{this._viewZoneId&&(L.removeZone(this._viewZoneId),this._viewZoneId=void 0);const M=Math.max(D.length,y);if(M>0){const O=document.createElement("div");h(O,_,D,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=L.addZone({afterLineNumber:w,heightInLines:M,domNode:O,afterColumnAffinity:1})}})}}function h(m,w,D,y,T){const _=y.get(29),L=y.get(107),M="none",O=y.get(84),N=y.get(46),P=y.get(45),B=y.get(60),V=new S.StringBuilder(1e4);V.appendString('<div class="suggest-preview-text">');for(let H=0,W=D.length;H<W;H++){const U=D[H],$=U.content;V.appendString('<div class="view-line'),V.appendString('" style="top:'),V.appendString(String(H*B)),V.appendString('px;width:1000000px;">');const q=R.isBasicASCII($),X=R.containsRTL($),G=E.LineTokens.createEmpty($,T);(0,f.renderViewLine)(new f.RenderLineInput(P.isMonospace&&!_,P.canUseHalfwidthRightwardsArrow,$,!1,q,X,0,G,U.decorations,w,0,P.spaceWidth,P.middotWidth,P.wsmiddotWidth,L,M,O,N!==k.EditorFontLigatures.OFF,null),V),V.appendString("</div>")}V.appendString("</div>"),(0,A.applyFontInfo)(m,P);const z=V.build(),x=d?d.createHTML(z):z;m.innerHTML=x}class v extends p.Disposable{constructor(w,D,y,T){super(),this.editor=w,this.position=D,this.domNode=y,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(T),this._register((0,p.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,s.registerThemingParticipant)((m,w)=>{const D=m.getColor(u.ghostTextForeground);D&&(w.addRule(`.monaco-editor .ghost-text-decoration { color: ${D.toString()} !important; }`),w.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${D.toString()} !important; }`),w.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${D.toString()} !important; }`));const y=m.getColor(u.ghostTextBackground);y&&(w.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${y.toString()}; }`),w.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${y.toString()}; }`),w.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${y.toString()}; }`));const T=m.getColor(u.ghostTextBorder);T&&(w.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${T}; }`),w.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${T}; }`),w.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${T}; }`))})}),define(ae[814],le([1,0,154,2,13,105,116,167,12]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class b{constructor(C){this.options=C,this.rangeHighlightDecorationId=void 0}provide(C,r){const u=new p.DisposableStore;C.canAcceptInBackground=!!this.options?.canAcceptInBackground,C.matchOnLabel=C.matchOnDescription=C.matchOnDetail=C.sortByLabel=!1;const i=u.add(new p.MutableDisposable);return i.value=this.doProvide(C,r),u.add(this.onDidActiveTextEditorControlChange(()=>{i.value=void 0,i.value=this.doProvide(C,r)})),u}doProvide(C,r){const u=new p.DisposableStore,i=this.activeTextEditorControl;if(i&&this.canProvideWithTextEditor(i)){const f={editor:i},c=(0,A.getCodeEditor)(i);if(c){let l=(0,R.withNullAsUndefined)(i.saveViewState());u.add(c.onDidChangeCursorPosition(()=>{l=(0,R.withNullAsUndefined)(i.saveViewState())})),f.restoreViewState=()=>{l&&i===this.activeTextEditorControl&&i.restoreViewState(l)},u.add((0,t.once)(r.onCancellationRequested)(()=>f.restoreViewState?.()))}u.add((0,p.toDisposable)(()=>this.clearDecorations(i))),u.add(this.provideWithTextEditor(f,C,r))}else u.add(this.provideWithoutTextEditor(C,r));return u}canProvideWithTextEditor(C){return!0}gotoLocation({editor:C},r){C.setSelection(r.range),C.revealRangeInCenter(r.range,0),r.preserveFocus||C.focus()}getModel(C){return(0,A.isDiffEditor)(C)?C.getModel()?.modified:C.getModel()}addDecorations(C,r){C.changeDecorations(u=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const f=[{range:r,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:r,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,I.themeColorFromId)(E.overviewRulerRangeHighlight),position:k.OverviewRulerLane.Full}}}],[c,l]=u.deltaDecorations(i,f);this.rangeHighlightDecorationId={rangeHighlightId:c,overviewRulerDecorationId:l}})}clearDecorations(C){const r=this.rangeHighlightDecorationId;r&&(C.changeDecorations(u=>{u.deltaDecorations([r.overviewRulerDecorationId,r.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=b}),define(ae[815],le([1,0,2,105,814,1379]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class k extends R.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(I){const b=(0,A.localize)(0,null);return I.items=[{label:b}],I.ariaLabel=b,t.Disposable.None}provideWithTextEditor(I,b,S){const C=I.editor,r=new t.DisposableStore;r.add(b.onDidAccept(f=>{const[c]=b.selectedItems;if(c){if(!this.isValidLineNumber(C,c.lineNumber))return;this.gotoLocation(I,{range:this.toRange(c.lineNumber,c.column),keyMods:b.keyMods,preserveFocus:f.inBackground}),f.inBackground||b.hide()}}));const u=()=>{const f=this.parsePosition(C,b.value.trim().substr(k.PREFIX.length)),c=this.getPickLabel(C,f.lineNumber,f.column);if(b.items=[{lineNumber:f.lineNumber,column:f.column,label:c}],b.ariaLabel=c,!this.isValidLineNumber(C,f.lineNumber)){this.clearDecorations(C);return}const l=this.toRange(f.lineNumber,f.column);C.revealRangeInCenter(l,0),this.addDecorations(C,l)};u(),r.add(b.onDidChangeValue(()=>u()));const i=(0,p.getCodeEditor)(C);return i&&i.getOptions().get(61).renderType===2&&(i.updateOptions({lineNumbers:"on"}),r.add((0,t.toDisposable)(()=>i.updateOptions({lineNumbers:"relative"})))),r}toRange(I=1,b=1){return{startLineNumber:I,startColumn:b,endLineNumber:I,endColumn:b}}parsePosition(I,b){const S=b.split(/,|:|#/).map(r=>parseInt(r,10)).filter(r=>!isNaN(r)),C=this.lineCount(I)+1;return{lineNumber:S[0]>0?S[0]:C+S[0],column:S[1]}}getPickLabel(I,b,S){if(this.isValidLineNumber(I,b))return this.isValidColumn(I,b,S)?(0,A.localize)(1,null,b,S):(0,A.localize)(2,null,b);const C=I.getPosition()||{lineNumber:1,column:1},r=this.lineCount(I);return r>1?(0,A.localize)(3,null,C.lineNumber,C.column,r):(0,A.localize)(4,null,C.lineNumber,C.column)}isValidLineNumber(I,b){return!b||typeof b!="number"?!1:b>0&&b<=this.lineCount(I)}isValidColumn(I,b,S){if(!S||typeof S!="number")return!1;const C=this.getModel(I);if(!C)return!1;const r={lineNumber:b,column:S};return C.validatePosition(r).equals(r)}lineCount(I){return this.getModel(I)?.getLineCount()??0}}e.AbstractGotoLineQuickAccessProvider=k,k.PREFIX=":"}),define(ae[2167],le([1,0,11,32,29,417,2,28,20,92,375,814,1380,61,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let f=class ds extends C.AbstractEditorNavigationQuickAccessProvider{constructor(d,n,a=Object.create(null)){super(a),this._languageFeaturesService=d,this._outlineModelService=n,this.options=a,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(d){return this.provideLabelPick(d,(0,r.localize)(0,null)),k.Disposable.None}provideWithTextEditor(d,n,a){const o=d.editor,g=this.getModel(o);return g?this._languageFeaturesService.documentSymbolProvider.has(g)?this.doProvideWithEditorSymbols(d,g,n,a):this.doProvideWithoutEditorSymbols(d,g,n,a):k.Disposable.None}doProvideWithoutEditorSymbols(d,n,a,o){const g=new k.DisposableStore;return this.provideLabelPick(a,(0,r.localize)(1,null)),(async()=>!await this.waitForLanguageSymbolRegistry(n,g)||o.isCancellationRequested||g.add(this.doProvideWithEditorSymbols(d,n,a,o)))(),g}provideLabelPick(d,n){d.items=[{label:n,index:0,kind:14}],d.ariaLabel=n}async waitForLanguageSymbolRegistry(d,n){if(this._languageFeaturesService.documentSymbolProvider.has(d))return!0;const a=new t.DeferredPromise,o=n.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(d)&&(o.dispose(),a.complete(!0))}));return n.add((0,k.toDisposable)(()=>a.complete(!1))),a.p}doProvideWithEditorSymbols(d,n,a,o){const g=d.editor,h=new k.DisposableStore;h.add(a.onDidAccept(y=>{const[T]=a.selectedItems;T&&T.range&&(this.gotoLocation(d,{range:T.range.selection,keyMods:a.keyMods,preserveFocus:y.inBackground}),y.inBackground||a.hide())})),h.add(a.onDidTriggerItemButton(({item:y})=>{y&&y.range&&(this.gotoLocation(d,{range:y.range.selection,keyMods:a.keyMods,forceSideBySide:!0}),a.hide())}));const v=this.getDocumentSymbols(n,o);let m;const w=async y=>{m?.dispose(!0),a.busy=!1,m=new p.CancellationTokenSource(o),a.busy=!0;try{const T=(0,A.prepareQuery)(a.value.substr(ds.PREFIX.length).trim()),_=await this.doGetSymbolPicks(v,T,void 0,m.token);if(o.isCancellationRequested)return;if(_.length>0){if(a.items=_,y&&T.original.length===0){const L=(0,i.findLast)(_,M=>Boolean(M.type!=="separator"&&M.range&&I.Range.containsPosition(M.range.decoration,y)));L&&(a.activeItems=[L])}}else T.original.length>0?this.provideLabelPick(a,(0,r.localize)(2,null)):this.provideLabelPick(a,(0,r.localize)(3,null))}finally{o.isCancellationRequested||(a.busy=!1)}};h.add(a.onDidChangeValue(()=>w(void 0))),w(g.getSelection()?.getPosition());let D=2;return h.add(a.onDidChangeActive(()=>{const[y]=a.activeItems;if(y&&y.range){if(D-- >0)return;g.revealRangeInCenter(y.range.selection,0),this.addDecorations(g,y.range.decoration)}})),h}async doGetSymbolPicks(d,n,a,o){const g=await d;if(o.isCancellationRequested)return[];const h=n.original.indexOf(ds.SCOPE_PREFIX)===0,v=h?1:0;let m,w;n.values&&n.values.length>1?(m=(0,A.pieceToQuery)(n.values[0]),w=(0,A.pieceToQuery)(n.values.slice(1))):m=n;let D;const y=this.options?.openSideBySideDirection?.();y&&(D=[{iconClass:y==="right"?R.Codicon.splitHorizontal.classNames:R.Codicon.splitVertical.classNames,tooltip:y==="right"?(0,r.localize)(4,null):(0,r.localize)(5,null)}]);const T=[];for(let M=0;M<g.length;M++){const O=g[M],N=(0,E.trim)(O.name),P=`$(${b.SymbolKinds.toIcon(O.kind).id}) ${N}`,B=P.length-N.length;let V=O.containerName;a?.extraContainerLabel&&(V?V=`${a.extraContainerLabel} \u2022 ${V}`:V=a.extraContainerLabel);let z,x,H,W;if(n.original.length>v){let $=!1;if(m!==n&&([z,x]=(0,A.scoreFuzzy2)(P,{...n,values:void 0},v,B),typeof z=="number"&&($=!0)),typeof z!="number"&&([z,x]=(0,A.scoreFuzzy2)(P,m,v,B),typeof z!="number"))continue;if(!$&&w){if(V&&w.original.length>0&&([H,W]=(0,A.scoreFuzzy2)(V,w)),typeof H!="number")continue;typeof z=="number"&&(z+=H)}}const U=O.tags&&O.tags.indexOf(1)>=0;T.push({index:M,kind:O.kind,score:z,label:P,ariaLabel:N,description:V,highlights:U?void 0:{label:x,description:W},range:{selection:I.Range.collapseToStart(O.selectionRange),decoration:O.range},strikethrough:U,buttons:D})}const _=T.sort((M,O)=>h?this.compareByKindAndScore(M,O):this.compareByScore(M,O));let L=[];if(h){let P=function(){O&&typeof M=="number"&&N>0&&(O.label=(0,E.format)(l[M]||c,N))},M,O,N=0;for(const B of _)M!==B.kind?(P(),M=B.kind,N=1,O={type:"separator"},L.push(O)):N++,L.push(B);P()}else _.length>0&&(L=[{label:(0,r.localize)(6,null,T.length),type:"separator"},..._]);return L}compareByScore(d,n){if(typeof d.score!="number"&&typeof n.score=="number")return 1;if(typeof d.score=="number"&&typeof n.score!="number")return-1;if(typeof d.score=="number"&&typeof n.score=="number"){if(d.score>n.score)return-1;if(d.score<n.score)return 1}return d.index<n.index?-1:d.index>n.index?1:0}compareByKindAndScore(d,n){const a=l[d.kind]||c,o=l[n.kind]||c,g=a.localeCompare(o);return g===0?this.compareByScore(d,n):g}async getDocumentSymbols(d,n){const a=await this._outlineModelService.getOrCreate(d,n);return n.isCancellationRequested?[]:a.asListOfDocumentSymbols()}};f.PREFIX="@",f.SCOPE_PREFIX=":",f.PREFIX_BY_CATEGORY=`${f.PREFIX}${f.SCOPE_PREFIX}`,f=we([F(0,u.ILanguageFeaturesService),F(1,S.IOutlineModelService)],f),e.AbstractGotoSymbolQuickAccessProvider=f;const c=(0,r.localize)(7,null),l={[5]:(0,r.localize)(8,null),[11]:(0,r.localize)(9,null),[8]:(0,r.localize)(10,null),[12]:(0,r.localize)(11,null),[4]:(0,r.localize)(12,null),[22]:(0,r.localize)(13,null),[23]:(0,r.localize)(14,null),[24]:(0,r.localize)(15,null),[10]:(0,r.localize)(16,null),[2]:(0,r.localize)(17,null),[3]:(0,r.localize)(18,null),[25]:(0,r.localize)(19,null),[1]:(0,r.localize)(20,null),[6]:(0,r.localize)(21,null),[9]:(0,r.localize)(22,null),[21]:(0,r.localize)(23,null),[14]:(0,r.localize)(24,null),[0]:(0,r.localize)(25,null),[17]:(0,r.localize)(26,null),[15]:(0,r.localize)(27,null),[16]:(0,r.localize)(28,null),[18]:(0,r.localize)(29,null),[19]:(0,r.localize)(30,null),[7]:(0,r.localize)(31,null),[13]:(0,r.localize)(32,null)}}),define(ae[2168],le([1,0,2,50,1383,7,38,33,12,1092]),function(J,e,t,p,R,A,k,E,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,R.localize)(0,null));let b=class{constructor(C,r,u,i,f){this._editor=C,this._acceptKeybindings=r,this._themeService=u,this._keybindingService=i,this._disposables=new t.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(f),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(45)&&this._updateFont()})),this._disposables.add(u.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,R.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[r,u]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(r),this._label.innerText=(0,R.localize)(2,null,this._keybindingService.lookupKeybinding(r)?.getLabel(),this._keybindingService.lookupKeybinding(u)?.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 r=C.getColor(E.widgetShadow);this._domNode.style.backgroundColor=String(C.getColor(E.editorWidgetBackground)??""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String(C.getColor(E.inputForeground)??""),this._input.style.backgroundColor=String(C.getColor(E.inputBackground)??"");const u=C.getColor(E.inputBorder);this._input.style.borderWidth=u?"1px":"0px",this._input.style.borderStyle=u?"solid":"none",this._input.style.borderColor=u?.toString()??"none"}_updateFont(){if(!this._input||!this._label)return;const C=this._editor.getOption(45);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?.(C)}cancelInput(C){this._currentCancelInput?.(C)}getInput(C,r,u,i,f,c){this._domNode.classList.toggle("preview",f),this._position=new p.Position(C.startLineNumber,C.startColumn),this._input.value=r,this._input.setAttribute("selectionStart",u.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(s=>{this._currentCancelInput=d=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,s(d),!0),this._currentAcceptInput=d=>{if(this._input.value.trim().length===0||this._input.value===r){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,s({newName:this._input.value,wantsPreview:f&&d})},l.add(c.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)}};b=we([F(2,I.IThemeService),F(3,k.IKeybindingService),F(4,A.IContextKeyService)],b),e.RenameInputField=b}),define(ae[612],le([1,0,29,1394,33,12]),function(J,e,t,p,R,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,R.registerColor)("symbolIcon.arrayForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,R.registerColor)("symbolIcon.booleanForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,R.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,p.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,R.registerColor)("symbolIcon.colorForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,R.registerColor)("symbolIcon.constantForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,R.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,p.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,R.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,p.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,R.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,p.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,R.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,p.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,R.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,p.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,R.registerColor)("symbolIcon.fileForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,R.registerColor)("symbolIcon.folderForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,R.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,p.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,R.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,p.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,R.registerColor)("symbolIcon.keyForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,R.registerColor)("symbolIcon.keywordForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,R.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,p.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,R.registerColor)("symbolIcon.moduleForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,R.registerColor)("symbolIcon.namespaceForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,R.registerColor)("symbolIcon.nullForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,R.registerColor)("symbolIcon.numberForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,R.registerColor)("symbolIcon.objectForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,R.registerColor)("symbolIcon.operatorForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,R.registerColor)("symbolIcon.packageForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,R.registerColor)("symbolIcon.propertyForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,R.registerColor)("symbolIcon.referenceForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,R.registerColor)("symbolIcon.snippetForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,R.registerColor)("symbolIcon.stringForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,R.registerColor)("symbolIcon.structForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,R.registerColor)("symbolIcon.textForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,R.registerColor)("symbolIcon.typeParameterForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,R.registerColor)("symbolIcon.unitForeground",{dark:R.foreground,light:R.foreground,hcDark:R.foreground,hcLight:R.foreground},(0,p.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,R.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,p.localize)(32,null)),(0,A.registerThemingParticipant)((k,E)=>{const I=k.getColor(e.SYMBOL_ICON_ARRAY_FOREGROUND);I&&E.addRule(`${t.Codicon.symbolArray.cssSelector} { color: ${I}; }`);const b=k.getColor(e.SYMBOL_ICON_BOOLEAN_FOREGROUND);b&&E.addRule(`${t.Codicon.symbolBoolean.cssSelector} { color: ${b}; }`);const S=k.getColor(e.SYMBOL_ICON_CLASS_FOREGROUND);S&&E.addRule(`${t.Codicon.symbolClass.cssSelector} { color: ${S}; }`);const C=k.getColor(e.SYMBOL_ICON_METHOD_FOREGROUND);C&&E.addRule(`${t.Codicon.symbolMethod.cssSelector} { color: ${C}; }`);const r=k.getColor(e.SYMBOL_ICON_COLOR_FOREGROUND);r&&E.addRule(`${t.Codicon.symbolColor.cssSelector} { color: ${r}; }`);const u=k.getColor(e.SYMBOL_ICON_CONSTANT_FOREGROUND);u&&E.addRule(`${t.Codicon.symbolConstant.cssSelector} { color: ${u}; }`);const i=k.getColor(e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND);i&&E.addRule(`${t.Codicon.symbolConstructor.cssSelector} { color: ${i}; }`);const f=k.getColor(e.SYMBOL_ICON_ENUMERATOR_FOREGROUND);f&&E.addRule(` ${t.Codicon.symbolValue.cssSelector},${t.Codicon.symbolEnum.cssSelector} { color: ${f}; }`);const c=k.getColor(e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND);c&&E.addRule(`${t.Codicon.symbolEnumMember.cssSelector} { color: ${c}; }`);const l=k.getColor(e.SYMBOL_ICON_EVENT_FOREGROUND);l&&E.addRule(`${t.Codicon.symbolEvent.cssSelector} { color: ${l}; }`);const s=k.getColor(e.SYMBOL_ICON_FIELD_FOREGROUND);s&&E.addRule(`${t.Codicon.symbolField.cssSelector} { color: ${s}; }`);const d=k.getColor(e.SYMBOL_ICON_FILE_FOREGROUND);d&&E.addRule(`${t.Codicon.symbolFile.cssSelector} { color: ${d}; }`);const n=k.getColor(e.SYMBOL_ICON_FOLDER_FOREGROUND);n&&E.addRule(`${t.Codicon.symbolFolder.cssSelector} { color: ${n}; }`);const a=k.getColor(e.SYMBOL_ICON_FUNCTION_FOREGROUND);a&&E.addRule(`${t.Codicon.symbolFunction.cssSelector} { color: ${a}; }`);const o=k.getColor(e.SYMBOL_ICON_INTERFACE_FOREGROUND);o&&E.addRule(`${t.Codicon.symbolInterface.cssSelector} { color: ${o}; }`);const g=k.getColor(e.SYMBOL_ICON_KEY_FOREGROUND);g&&E.addRule(`${t.Codicon.symbolKey.cssSelector} { color: ${g}; }`);const h=k.getColor(e.SYMBOL_ICON_KEYWORD_FOREGROUND);h&&E.addRule(`${t.Codicon.symbolKeyword.cssSelector} { color: ${h}; }`);const v=k.getColor(e.SYMBOL_ICON_MODULE_FOREGROUND);v&&E.addRule(`${t.Codicon.symbolModule.cssSelector} { color: ${v}; }`);const m=k.getColor(e.SYMBOL_ICON_NAMESPACE_FOREGROUND);m&&E.addRule(`${t.Codicon.symbolNamespace.cssSelector} { color: ${m}; }`);const w=k.getColor(e.SYMBOL_ICON_NULL_FOREGROUND);w&&E.addRule(`${t.Codicon.symbolNull.cssSelector} { color: ${w}; }`);const D=k.getColor(e.SYMBOL_ICON_NUMBER_FOREGROUND);D&&E.addRule(`${t.Codicon.symbolNumber.cssSelector} { color: ${D}; }`);const y=k.getColor(e.SYMBOL_ICON_OBJECT_FOREGROUND);y&&E.addRule(`${t.Codicon.symbolObject.cssSelector} { color: ${y}; }`);const T=k.getColor(e.SYMBOL_ICON_OPERATOR_FOREGROUND);T&&E.addRule(`${t.Codicon.symbolOperator.cssSelector} { color: ${T}; }`);const _=k.getColor(e.SYMBOL_ICON_PACKAGE_FOREGROUND);_&&E.addRule(`${t.Codicon.symbolPackage.cssSelector} { color: ${_}; }`);const L=k.getColor(e.SYMBOL_ICON_PROPERTY_FOREGROUND);L&&E.addRule(`${t.Codicon.symbolProperty.cssSelector} { color: ${L}; }`);const M=k.getColor(e.SYMBOL_ICON_REFERENCE_FOREGROUND);M&&E.addRule(`${t.Codicon.symbolReference.cssSelector} { color: ${M}; }`);const O=k.getColor(e.SYMBOL_ICON_SNIPPET_FOREGROUND);O&&E.addRule(`${t.Codicon.symbolSnippet.cssSelector} { color: ${O}; }`);const N=k.getColor(e.SYMBOL_ICON_STRING_FOREGROUND);N&&E.addRule(`${t.Codicon.symbolString.cssSelector} { color: ${N}; }`);const P=k.getColor(e.SYMBOL_ICON_STRUCT_FOREGROUND);P&&E.addRule(`${t.Codicon.symbolStruct.cssSelector} { color: ${P}; }`);const B=k.getColor(e.SYMBOL_ICON_TEXT_FOREGROUND);B&&E.addRule(`${t.Codicon.symbolText.cssSelector} { color: ${B}; }`);const V=k.getColor(e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND);V&&E.addRule(`${t.Codicon.symbolTypeParameter.cssSelector} { color: ${V}; }`);const z=k.getColor(e.SYMBOL_ICON_UNIT_FOREGROUND);z&&E.addRule(`${t.Codicon.symbolUnit.cssSelector} { color: ${z}; }`);const x=k.getColor(e.SYMBOL_ICON_VARIABLE_FOREGROUND);x&&E.addRule(`${t.Codicon.symbolVariable.cssSelector} { color: ${x}; }`)})}),define(ae[15],le([1,0,36,29,6,2,158,31,7,97,5,98,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"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 u(o){return o.command!==void 0}e.isIMenuItem=u;function i(o){return o.submenu!==void 0}e.isISubmenuItem=i;class f{static for(g){return f._instances.get(g)??new f(g)}constructor(g){if(f._instances.has(g))throw new TypeError(`MenuId with identifier '${g}' already exists. Use MenuId.for(ident) or a unique identifier`);f._instances.set(g,this),this.id=g}}e.MenuId=f,f._instances=new Map,f.CommandPalette=new f("CommandPalette"),f.DebugBreakpointsContext=new f("DebugBreakpointsContext"),f.DebugCallStackContext=new f("DebugCallStackContext"),f.DebugConsoleContext=new f("DebugConsoleContext"),f.DebugVariablesContext=new f("DebugVariablesContext"),f.DebugWatchContext=new f("DebugWatchContext"),f.DebugToolBar=new f("DebugToolBar"),f.DebugToolBarStop=new f("DebugToolBarStop"),f.EditorContext=new f("EditorContext"),f.SimpleEditorContext=new f("SimpleEditorContext"),f.EditorContent=new f("EditorContent"),f.EditorContextCopy=new f("EditorContextCopy"),f.EditorContextPeek=new f("EditorContextPeek"),f.EditorContextShare=new f("EditorContextShare"),f.EditorTitle=new f("EditorTitle"),f.EditorTitleRun=new f("EditorTitleRun"),f.EditorTitleContext=new f("EditorTitleContext"),f.EmptyEditorGroup=new f("EmptyEditorGroup"),f.EmptyEditorGroupContext=new f("EmptyEditorGroupContext"),f.ExplorerContext=new f("ExplorerContext"),f.ExtensionContext=new f("ExtensionContext"),f.GlobalActivity=new f("GlobalActivity"),f.CommandCenter=new f("CommandCenter"),f.LayoutControlMenuSubmenu=new f("LayoutControlMenuSubmenu"),f.LayoutControlMenu=new f("LayoutControlMenu"),f.MenubarMainMenu=new f("MenubarMainMenu"),f.MenubarAppearanceMenu=new f("MenubarAppearanceMenu"),f.MenubarDebugMenu=new f("MenubarDebugMenu"),f.MenubarEditMenu=new f("MenubarEditMenu"),f.MenubarCopy=new f("MenubarCopy"),f.MenubarFileMenu=new f("MenubarFileMenu"),f.MenubarGoMenu=new f("MenubarGoMenu"),f.MenubarHelpMenu=new f("MenubarHelpMenu"),f.MenubarLayoutMenu=new f("MenubarLayoutMenu"),f.MenubarNewBreakpointMenu=new f("MenubarNewBreakpointMenu"),f.MenubarPanelAlignmentMenu=new f("MenubarPanelAlignmentMenu"),f.MenubarPanelPositionMenu=new f("MenubarPanelPositionMenu"),f.MenubarPreferencesMenu=new f("MenubarPreferencesMenu"),f.MenubarRecentMenu=new f("MenubarRecentMenu"),f.MenubarSelectionMenu=new f("MenubarSelectionMenu"),f.MenubarShare=new f("MenubarShare"),f.MenubarSwitchEditorMenu=new f("MenubarSwitchEditorMenu"),f.MenubarSwitchGroupMenu=new f("MenubarSwitchGroupMenu"),f.MenubarTerminalMenu=new f("MenubarTerminalMenu"),f.MenubarViewMenu=new f("MenubarViewMenu"),f.MenubarHomeMenu=new f("MenubarHomeMenu"),f.OpenEditorsContext=new f("OpenEditorsContext"),f.ProblemsPanelContext=new f("ProblemsPanelContext"),f.SCMChangeContext=new f("SCMChangeContext"),f.SCMResourceContext=new f("SCMResourceContext"),f.SCMResourceFolderContext=new f("SCMResourceFolderContext"),f.SCMResourceGroupContext=new f("SCMResourceGroupContext"),f.SCMSourceControl=new f("SCMSourceControl"),f.SCMTitle=new f("SCMTitle"),f.SearchContext=new f("SearchContext"),f.StatusBarWindowIndicatorMenu=new f("StatusBarWindowIndicatorMenu"),f.StatusBarRemoteIndicatorMenu=new f("StatusBarRemoteIndicatorMenu"),f.StickyScrollContext=new f("StickyScrollContext"),f.TestItem=new f("TestItem"),f.TestItemGutter=new f("TestItemGutter"),f.TestPeekElement=new f("TestPeekElement"),f.TestPeekTitle=new f("TestPeekTitle"),f.TouchBarContext=new f("TouchBarContext"),f.TitleBarContext=new f("TitleBarContext"),f.TitleBarTitleContext=new f("TitleBarTitleContext"),f.TunnelContext=new f("TunnelContext"),f.TunnelPrivacy=new f("TunnelPrivacy"),f.TunnelProtocol=new f("TunnelProtocol"),f.TunnelPortInline=new f("TunnelInline"),f.TunnelTitle=new f("TunnelTitle"),f.TunnelLocalAddressInline=new f("TunnelLocalAddressInline"),f.TunnelOriginInline=new f("TunnelOriginInline"),f.ViewItemContext=new f("ViewItemContext"),f.ViewContainerTitle=new f("ViewContainerTitle"),f.ViewContainerTitleContext=new f("ViewContainerTitleContext"),f.ViewTitle=new f("ViewTitle"),f.ViewTitleContext=new f("ViewTitleContext"),f.CommentThreadTitle=new f("CommentThreadTitle"),f.CommentThreadActions=new f("CommentThreadActions"),f.CommentThreadTitleContext=new f("CommentThreadTitleContext"),f.CommentThreadCommentContext=new f("CommentThreadCommentContext"),f.CommentTitle=new f("CommentTitle"),f.CommentActions=new f("CommentActions"),f.InteractiveToolbar=new f("InteractiveToolbar"),f.InteractiveCellTitle=new f("InteractiveCellTitle"),f.InteractiveCellDelete=new f("InteractiveCellDelete"),f.InteractiveCellExecute=new f("InteractiveCellExecute"),f.InteractiveInputExecute=new f("InteractiveInputExecute"),f.NotebookToolbar=new f("NotebookToolbar"),f.NotebookCellTitle=new f("NotebookCellTitle"),f.NotebookCellDelete=new f("NotebookCellDelete"),f.NotebookCellInsert=new f("NotebookCellInsert"),f.NotebookCellBetween=new f("NotebookCellBetween"),f.NotebookCellListTop=new f("NotebookCellTop"),f.NotebookCellExecute=new f("NotebookCellExecute"),f.NotebookCellExecutePrimary=new f("NotebookCellExecutePrimary"),f.NotebookDiffCellInputTitle=new f("NotebookDiffCellInputTitle"),f.NotebookDiffCellMetadataTitle=new f("NotebookDiffCellMetadataTitle"),f.NotebookDiffCellOutputsTitle=new f("NotebookDiffCellOutputsTitle"),f.NotebookOutputToolbar=new f("NotebookOutputToolbar"),f.NotebookEditorLayoutConfigure=new f("NotebookEditorLayoutConfigure"),f.NotebookKernelSource=new f("NotebookKernelSource"),f.BulkEditTitle=new f("BulkEditTitle"),f.BulkEditContext=new f("BulkEditContext"),f.TimelineItemContext=new f("TimelineItemContext"),f.TimelineTitle=new f("TimelineTitle"),f.TimelineTitleContext=new f("TimelineTitleContext"),f.TimelineFilterSubMenu=new f("TimelineFilterSubMenu"),f.AccountsContext=new f("AccountsContext"),f.PanelTitle=new f("PanelTitle"),f.AuxiliaryBarTitle=new f("AuxiliaryBarTitle"),f.TerminalInstanceContext=new f("TerminalInstanceContext"),f.TerminalEditorInstanceContext=new f("TerminalEditorInstanceContext"),f.TerminalNewDropdownContext=new f("TerminalNewDropdownContext"),f.TerminalTabContext=new f("TerminalTabContext"),f.TerminalTabEmptyAreaContext=new f("TerminalTabEmptyAreaContext"),f.TerminalInlineTabContext=new f("TerminalInlineTabContext"),f.WebviewContext=new f("WebviewContext"),f.InlineCompletionsActions=new f("InlineCompletionsActions"),f.NewFile=new f("NewFile"),f.MergeInput1Toolbar=new f("MergeToolbar1Toolbar"),f.MergeInput2Toolbar=new f("MergeToolbar2Toolbar"),f.MergeBaseToolbar=new f("MergeBaseToolbar"),f.MergeInputResultToolbar=new f("MergeToolbarResultToolbar"),e.IMenuService=(0,S.createDecorator)("menuService");class c{static for(g){let h=this._all.get(g);return h||(h=new c(g),this._all.set(g,h)),h}static merge(g){const h=new Set;for(const v of g)v instanceof c&&h.add(v.id);return h}constructor(g){this.id=g,this.has=h=>h===g}}c._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new R.MicrotaskEmitter({merge:c.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(o){return this._commands.set(o.id,o),this._onDidChangeMenu.fire(c.for(f.CommandPalette)),(0,A.toDisposable)(()=>{this._commands.delete(o.id)&&this._onDidChangeMenu.fire(c.for(f.CommandPalette))})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((g,h)=>o.set(h,g)),o}appendMenuItem(o,g){let h=this._menuItems.get(o);h||(h=new k.LinkedList,this._menuItems.set(o,h));const v=h.push(g);return this._onDidChangeMenu.fire(c.for(o)),(0,A.toDisposable)(v)}appendMenuItems(o){const g=new A.DisposableStore;for(const{id:h,item:v}of o)g.add(this.appendMenuItem(h,v));return g}getMenuItems(o){let g;return this._menuItems.has(o)?g=[...this._menuItems.get(o)]:g=[],o===f.CommandPalette&&this._appendImplicitItems(g),g}_appendImplicitItems(o){const g=new Set;for(const h of o)u(h)&&(g.add(h.command.id),h.alt&&g.add(h.alt.id));this._commands.forEach((h,v)=>{g.has(v)||o.push({command:h})})}};class l extends t.SubmenuAction{constructor(g,h,v){super(`submenuitem.${g.submenu.id}`,typeof g.title=="string"?g.title:g.title.value,v,"submenu"),this.item=g,this.hideActions=h}}e.SubmenuItemAction=l;let s=class us{static label(g,h){return h?.renderShortTitle&&g.shortTitle?typeof g.shortTitle=="string"?g.shortTitle:g.shortTitle.value:typeof g.title=="string"?g.title:g.title.value}constructor(g,h,v,m,w,D){if(this.hideActions=m,this._commandService=D,this.id=g.id,this.label=us.label(g,v),this.tooltip=(typeof g.tooltip=="string"?g.tooltip:g.tooltip?.value)??"",this.enabled=!g.precondition||w.contextMatchesRules(g.precondition),this.checked=void 0,g.toggled){const y=g.toggled.condition?g.toggled:{condition:g.toggled};this.checked=w.contextMatchesRules(y.condition),this.checked&&y.tooltip&&(this.tooltip=typeof y.tooltip=="string"?y.tooltip:y.tooltip.value),y.title&&(this.label=typeof y.title=="string"?y.title:y.title.value)}this.item=g,this.alt=h?new us(h,void 0,v,m,w,D):void 0,this._options=v,r.ThemeIcon.isThemeIcon(g.icon)&&(this.class=p.CSSIcon.asClassName(g.icon))}run(...g){let h=[];return this._options?.arg&&(h=[...h,this._options.arg]),this._options?.shouldForwardArgs&&(h=[...h,...g]),this._commandService.executeCommand(this.id,...h)}};s=we([F(4,I.IContextKeyService),F(5,E.ICommandService)],s),e.MenuItemAction=s;class d{static create(g,h,v,m,w,D){return new d(g,h,v,m,w,D)}static from(g,h,v,m){return d.create(g,g.ID,g.LABEL,h,v,m)}constructor(g,h,v,m,w,D){this._id=h,this._label=v,this._keybindings=m,this._keybindingContext=w,this._keybindingWeight=D,this._descriptor=new b.SyncDescriptor(g,[this._id,this._label])}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=d;class n{constructor(g){this.desc=g}}e.Action2=n;function a(o){const g=new A.DisposableStore,h=new o,{f1:v,menu:m,keybinding:w,description:D,...y}=h.desc;if(g.add(E.CommandsRegistry.registerCommand({id:y.id,handler:(T,..._)=>h.run(T,..._),description:D})),Array.isArray(m))for(const T of m)g.add(e.MenuRegistry.appendMenuItem(T.id,{command:y,...T}));else m&&g.add(e.MenuRegistry.appendMenuItem(m.id,{command:y,...m}));if(v&&(g.add(e.MenuRegistry.appendMenuItem(f.CommandPalette,{command:y,when:y.precondition})),g.add(e.MenuRegistry.addCommand(y))),Array.isArray(w))for(const T of w)g.add(C.KeybindingsRegistry.registerKeybindingRule({...T,id:y.id,when:y.precondition?I.ContextKeyExpr.and(y.precondition,T.when):T.when}));else w&&g.add(C.KeybindingsRegistry.registerKeybindingRule({...w,id:y.id,when:y.precondition?I.ContextKeyExpr.and(y.precondition,w.when):w.when}));return g}e.registerAction2=a}),define(ae[40],le([1,0,1311,9,75,50,54,62,15,31,7,5,98,17,27,13,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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(P){this.id=P.id,this.precondition=P.precondition,this._kbOpts=P.kbOpts,this._menuOpts=P.menuOpts,this._description=P.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const P=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const B of P){let V=B.kbExpr;this.precondition&&(V?V=S.ContextKeyExpr.and(V,this.precondition):V=this.precondition);const z={id:this.id,weight:B.weight,args:B.args,when:V,primary:B.primary,secondary:B.secondary,win:B.win,linux:B.linux,mac:B.mac};r.KeybindingsRegistry.registerKeybindingRule(z)}}b.CommandsRegistry.registerCommand({id:this.id,handler:(P,B)=>this.runCommand(P,B),description:this._description})}_registerMenuItem(P){I.MenuRegistry.appendMenuItem(P.menuId,{group:P.group,command:{id:this.id,title:P.title,icon:P.icon,precondition:this.precondition},when:P.when,order:P.order})}}e.Command=l;class s extends l{constructor(){super(...arguments),this._implementations=[]}addImplementation(P,B,V){return this._implementations.push({priority:P,name:B,implementation:V}),this._implementations.sort((z,x)=>x.priority-z.priority),{dispose:()=>{for(let z=0;z<this._implementations.length;z++)if(this._implementations[z].implementation===V){this._implementations.splice(z,1);return}}}}runCommand(P,B){const V=P.get(c.ILogService);V.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const z of this._implementations){const x=z.implementation(P,B);if(x)return V.trace(`Command '${this.id}' was handled by '${z.name}'.`),typeof x=="boolean"?void 0:x}V.trace(`The Command '${this.id}' was not handled by any implementation.`)}}e.MultiCommand=s;class d extends l{constructor(P,B){super(B),this.command=P}runCommand(P,B){return this.command.runCommand(P,B)}}e.ProxyCommand=d;class n extends l{static bindToContribution(P){return class extends n{constructor(V){super(V),this._callback=V.handler}runEditorCommand(V,z,x){const H=P(z);H&&this._callback(H,x)}}}static runEditorCommand(P,B,V,z){const x=P.get(R.ICodeEditorService),H=x.getFocusedCodeEditor()||x.getActiveCodeEditor();if(!!H)return H.invokeWithinContext(W=>{if(!!W.get(S.IContextKeyService).contextMatchesRules((0,f.withNullAsUndefined)(V)))return z(W,H,B)})}runCommand(P,B){return n.runEditorCommand(P,B,this.precondition,(V,z,x)=>this.runEditorCommand(V,z,x))}}e.EditorCommand=n;class a extends n{static convertOptions(P){let B;Array.isArray(P.menuOpts)?B=P.menuOpts:P.menuOpts?B=[P.menuOpts]:B=[];function V(z){return z.menuId||(z.menuId=I.MenuId.EditorContext),z.title||(z.title=P.label),z.when=S.ContextKeyExpr.and(P.precondition,z.when),z}return Array.isArray(P.contextMenuOpts)?B.push(...P.contextMenuOpts.map(V)):P.contextMenuOpts&&B.push(V(P.contextMenuOpts)),P.menuOpts=B,P}constructor(P){super(a.convertOptions(P)),this.label=P.label,this.alias=P.alias}runEditorCommand(P,B,V){return this.reportTelemetry(P,B),this.run(P,B,V||{})}reportTelemetry(P,B){P.get(i.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=a;class o extends a{constructor(){super(...arguments),this._implementations=[]}addImplementation(P,B){return this._implementations.push([P,B]),this._implementations.sort((V,z)=>z[0]-V[0]),{dispose:()=>{for(let V=0;V<this._implementations.length;V++)if(this._implementations[V][1]===B){this._implementations.splice(V,1);return}}}}run(P,B,V){for(const z of this._implementations){const x=z[1](P,B,V);if(x)return typeof x=="boolean"?void 0:x}}}e.MultiEditorAction=o;class g extends I.Action2{run(P,...B){const V=P.get(R.ICodeEditorService),z=V.getFocusedCodeEditor()||V.getActiveCodeEditor();if(!!z)return z.invokeWithinContext(x=>{if(x.get(S.IContextKeyService).contextMatchesRules((0,f.withNullAsUndefined)(this.desc.precondition)))return this.runEditorCommand(x,z,B)})}}e.EditorAction2=g;function h(N,P){b.CommandsRegistry.registerCommand(N,function(B,...V){const z=B.get(C.IInstantiationService),[x,H]=V;(0,f.assertType)(p.URI.isUri(x)),(0,f.assertType)(A.Position.isIPosition(H));const W=B.get(k.IModelService).getModel(x);if(W){const U=A.Position.lift(H);return z.invokeFunction(P,W,U,...V.slice(2))}return B.get(E.ITextModelService).createModelReference(x).then(U=>new Promise(($,q)=>{try{const X=z.invokeFunction(P,U.object.textEditorModel,A.Position.lift(H),V.slice(2));$(X)}catch(X){q(X)}}).finally(()=>{U.dispose()}))})}e.registerModelAndPositionCommand=h;function v(N){return M.INSTANCE.registerEditorCommand(N),N}e.registerEditorCommand=v;function m(N){const P=new N;return M.INSTANCE.registerEditorAction(P),P}e.registerEditorAction=m;function w(N){return M.INSTANCE.registerEditorAction(N),N}e.registerMultiEditorAction=w;function D(N){M.INSTANCE.registerEditorAction(N)}e.registerInstantiatedEditorAction=D;function y(N,P){M.INSTANCE.registerEditorContribution(N,P)}e.registerEditorContribution=y;function T(N,P){M.INSTANCE.registerDiffEditorContribution(N,P)}e.registerDiffEditorContribution=T;var _;(function(N){function P(H){return M.INSTANCE.getEditorCommand(H)}N.getEditorCommand=P;function B(){return M.INSTANCE.getEditorActions()}N.getEditorActions=B;function V(){return M.INSTANCE.getEditorContributions()}N.getEditorContributions=V;function z(H){return M.INSTANCE.getEditorContributions().filter(W=>H.indexOf(W.id)>=0)}N.getSomeEditorContributions=z;function x(){return M.INSTANCE.getDiffEditorContributions()}N.getDiffEditorContributions=x})(_=e.EditorExtensionsRegistry||(e.EditorExtensionsRegistry={}));const L={EditorCommonContributions:"editor.contributions"};class M{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(P,B){this.editorContributions.push({id:P,ctor:B})}getEditorContributions(){return this.editorContributions.slice(0)}registerDiffEditorContribution(P,B){this.diffEditorContributions.push({id:P,ctor:B})}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(P){P.register(),this.editorActions.push(P)}getEditorActions(){return this.editorActions}registerEditorCommand(P){P.register(),this.editorCommands[P.id]=P}getEditorCommand(P){return this.editorCommands[P]||null}}M.INSTANCE=new M,u.Registry.add(L.EditorCommonContributions,M.INSTANCE);function O(N){return N.register(),N}e.UndoCommand=O(new s({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},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}]})),O(new d(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=O(new s({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},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}]})),O(new d(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=O(new s({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},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(ae[332],le([1,0,1310,86,13,110,40,75,1277,240,588,589,608,50,20,59,7,98]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.NavigationCommandRevealType=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const s=0;class d extends k.EditorCommand{runEditorCommand(L,M,O){const N=M._getViewModel();!N||this.runCoreEditorCommand(N,O||{})}}e.CoreEditorCommand=d;var n;(function(_){const L=function(P){if(!R.isObject(P))return!1;const B=P;return!(!R.isString(B.to)||!R.isUndefined(B.by)&&!R.isString(B.by)||!R.isUndefined(B.value)&&!R.isNumber(B.value)||!R.isUndefined(B.revealCursor)&&!R.isBoolean(B.revealCursor))};_.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', 'editor'\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:L,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},_.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},_.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function M(P){let B;switch(P.to){case _.RawDirection.Up:B=1;break;case _.RawDirection.Right:B=2;break;case _.RawDirection.Down:B=3;break;case _.RawDirection.Left:B=4;break;default:return null}let V;switch(P.by){case _.RawUnit.Line:V=1;break;case _.RawUnit.WrappedLine:V=2;break;case _.RawUnit.Page:V=3;break;case _.RawUnit.HalfPage:V=4;break;case _.RawUnit.Editor:V=5;break;case _.RawUnit.Column:V=6;break;default:V=2}const z=Math.floor(P.value||1),x=!!P.revealCursor;return{direction:B,unit:V,value:z,revealCursor:x,select:!!P.select}}_.parse=M;let O;(function(P){P[P.Up=1]="Up",P[P.Right=2]="Right",P[P.Down=3]="Down",P[P.Left=4]="Left"})(O=_.Direction||(_.Direction={}));let N;(function(P){P[P.Line=1]="Line",P[P.WrappedLine=2]="WrappedLine",P[P.Page=3]="Page",P[P.HalfPage=4]="HalfPage",P[P.Editor=5]="Editor",P[P.Column=6]="Column"})(N=_.Unit||(_.Unit={}))})(n=e.EditorScroll_||(e.EditorScroll_={}));var a;(function(_){const L=function(M){if(!R.isObject(M))return!1;const O=M;return!(!R.isNumber(O.lineNumber)&&!R.isString(O.lineNumber)||!R.isUndefined(O.at)&&!R.isString(O.at))};_.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:L,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},_.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(a=e.RevealLine_||(e.RevealLine_={}));class o{constructor(L){L.addImplementation(1e4,"code-editor",(M,O)=>{const N=M.get(E.ICodeEditorService).getFocusedCodeEditor();return N&&N.hasTextFocus()?this._runEditorCommand(M,N,O):!1}),L.addImplementation(1e3,"generic-dom-input-textarea",(M,O)=>{const N=document.activeElement;return N&&["input","textarea"].indexOf(N.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),L.addImplementation(0,"generic-dom",(M,O)=>{const N=M.get(E.ICodeEditorService).getActiveCodeEditor();return N?(N.focus(),this._runEditorCommand(M,N,O)):!1})}_runEditorCommand(L,M,O){const N=this.runEditorCommand(L,M,O);return N||!0}}var g;(function(_){_[_.Regular=0]="Regular",_[_.Minimal=1]="Minimal",_[_.None=2]="None"})(g=e.NavigationCommandRevealType||(e.NavigationCommandRevealType={}));var h;(function(_){class L extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){if(!Y.position)return;K.model.pushStackElement(),K.setCursorStates(Y.source,3,[C.CursorMoveCommands.moveTo(K,K.getPrimaryCursorState(),this._inSelectionMode,Y.position,Y.viewPosition)])&&Y.revealType!==2&&K.revealPrimaryCursor(Y.source,!0,!0)}}_.MoveTo=(0,k.registerEditorCommand)(new L({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),_.MoveToSelect=(0,k.registerEditorCommand)(new L({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class M extends d{runCoreEditorCommand(K,Y){K.model.pushStackElement();const ee=this._getColumnSelectResult(K,K.getPrimaryCursorState(),K.getCursorColumnSelectData(),Y);ee!==null&&(K.setCursorStates(Y.source,3,ee.viewStates.map(ie=>b.CursorState.fromViewState(ie))),K.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:ee.fromLineNumber,fromViewVisualColumn:ee.fromVisualColumn,toViewLineNumber:ee.toLineNumber,toViewVisualColumn:ee.toVisualColumn}),ee.reversed?K.revealTopMostCursor(Y.source):K.revealBottomMostCursor(Y.source))}}_.ColumnSelect=(0,k.registerEditorCommand)(new class extends M{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(j,K,Y,ee){if(typeof ee.position>"u"||typeof ee.viewPosition>"u"||typeof ee.mouseColumn>"u")return null;const ie=j.model.validatePosition(ee.position),re=j.coordinatesConverter.validateViewPosition(new u.Position(ee.viewPosition.lineNumber,ee.viewPosition.column),ie),oe=ee.doColumnSelect?Y.fromViewLineNumber:re.lineNumber,se=ee.doColumnSelect?Y.fromViewVisualColumn:ee.mouseColumn-1;return I.ColumnSelection.columnSelect(j.cursorConfig,j,oe,se,re.lineNumber,ee.mouseColumn-1)}}),_.CursorColumnSelectLeft=(0,k.registerEditorCommand)(new class extends M{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(j,K,Y,ee){return I.ColumnSelection.columnSelectLeft(j.cursorConfig,j,Y)}}),_.CursorColumnSelectRight=(0,k.registerEditorCommand)(new class extends M{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(j,K,Y,ee){return I.ColumnSelection.columnSelectRight(j.cursorConfig,j,Y)}});class O extends M{constructor(K){super(K),this._isPaged=K.isPaged}_getColumnSelectResult(K,Y,ee,ie){return I.ColumnSelection.columnSelectUp(K.cursorConfig,K,ee,this._isPaged)}}_.CursorColumnSelectUp=(0,k.registerEditorCommand)(new O({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),_.CursorColumnSelectPageUp=(0,k.registerEditorCommand)(new O({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class N extends M{constructor(K){super(K),this._isPaged=K.isPaged}_getColumnSelectResult(K,Y,ee,ie){return I.ColumnSelection.columnSelectDown(K.cursorConfig,K,ee,this._isPaged)}}_.CursorColumnSelectDown=(0,k.registerEditorCommand)(new N({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),_.CursorColumnSelectPageDown=(0,k.registerEditorCommand)(new N({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class P extends d{constructor(){super({id:"cursorMove",precondition:void 0,description:C.CursorMove.description})}runCoreEditorCommand(K,Y){const ee=C.CursorMove.parse(Y);!ee||this._runCursorMove(K,Y.source,ee)}_runCursorMove(K,Y,ee){K.model.pushStackElement(),K.setCursorStates(Y,3,P._move(K,K.getCursorStates(),ee)),K.revealPrimaryCursor(Y,!0)}static _move(K,Y,ee){const ie=ee.select,re=ee.value;switch(ee.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(K,Y,ee.direction,ie,re,ee.unit);case 11:case 13:case 12:case 14:return C.CursorMoveCommands.viewportMove(K,Y,ee.direction,ie,re);default:return null}}}_.CursorMoveImpl=P,_.CursorMove=(0,k.registerEditorCommand)(new P);let B;(function(j){j[j.PAGE_SIZE_MARKER=-1]="PAGE_SIZE_MARKER"})(B||(B={}));class V extends d{constructor(K){super(K),this._staticArgs=K.args}runCoreEditorCommand(K,Y){let ee=this._staticArgs;this._staticArgs.value===-1&&(ee={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:Y.pageSize||K.cursorConfig.pageSize}),K.model.pushStackElement(),K.setCursorStates(Y.source,3,C.CursorMoveCommands.simpleMove(K,K.getCursorStates(),ee.direction,ee.select,ee.value,ee.unit)),K.revealPrimaryCursor(Y.source,!0)}}_.CursorLeft=(0,k.registerEditorCommand)(new V({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),_.CursorLeftSelect=(0,k.registerEditorCommand)(new V({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1039}})),_.CursorRight=(0,k.registerEditorCommand)(new V({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),_.CursorRightSelect=(0,k.registerEditorCommand)(new V({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1041}})),_.CursorUp=(0,k.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),_.CursorUpSelect=(0,k.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),_.CursorPageUp=(0,k.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:11}})),_.CursorPageUpSelect=(0,k.registerEditorCommand)(new V({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1035}})),_.CursorDown=(0,k.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),_.CursorDownSelect=(0,k.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),_.CursorPageDown=(0,k.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:12}})),_.CursorPageDownSelect=(0,k.registerEditorCommand)(new V({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1036}})),_.CreateCursor=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(j,K){if(!K.position)return;let Y;K.wholeLine?Y=C.CursorMoveCommands.line(j,j.getPrimaryCursorState(),!1,K.position,K.viewPosition):Y=C.CursorMoveCommands.moveTo(j,j.getPrimaryCursorState(),!1,K.position,K.viewPosition);const ee=j.getCursorStates();if(ee.length>1){const ie=Y.modelState?Y.modelState.position:null,re=Y.viewState?Y.viewState.position:null;for(let oe=0,se=ee.length;oe<se;oe++){const te=ee[oe];if(!(ie&&!te.modelState.selection.containsPosition(ie))&&!(re&&!te.viewState.selection.containsPosition(re))){ee.splice(oe,1),j.model.pushStackElement(),j.setCursorStates(K.source,3,ee);return}}}ee.push(Y),j.model.pushStackElement(),j.setCursorStates(K.source,3,ee)}}),_.LastCursorMoveToSelect=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(j,K){if(!K.position)return;const Y=j.getLastAddedCursorIndex(),ee=j.getCursorStates(),ie=ee.slice(0);ie[Y]=C.CursorMoveCommands.moveTo(j,ee[Y],!0,K.position,K.viewPosition),j.model.pushStackElement(),j.setCursorStates(K.source,3,ie)}});class z extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){K.model.pushStackElement(),K.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToBeginningOfLine(K,K.getCursorStates(),this._inSelectionMode)),K.revealPrimaryCursor(Y.source,!0)}}_.CursorHome=(0,k.registerEditorCommand)(new z({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),_.CursorHomeSelect=(0,k.registerEditorCommand)(new z({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class x extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){K.model.pushStackElement(),K.setCursorStates(Y.source,3,this._exec(K.getCursorStates())),K.revealPrimaryCursor(Y.source,!0)}_exec(K){const Y=[];for(let ee=0,ie=K.length;ee<ie;ee++){const re=K[ee],oe=re.modelState.position.lineNumber;Y[ee]=b.CursorState.fromModelState(re.modelState.move(this._inSelectionMode,oe,1,0))}return Y}}_.CursorLineStart=(0,k.registerEditorCommand)(new x({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:0,mac:{primary:287}}})),_.CursorLineStartSelect=(0,k.registerEditorCommand)(new x({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1311}}}));class H extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){K.model.pushStackElement(),K.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToEndOfLine(K,K.getCursorStates(),this._inSelectionMode,Y.sticky||!1)),K.revealPrimaryCursor(Y.source,!0)}}_.CursorEnd=(0,k.registerEditorCommand)(new H({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:t.localize(0,null),type:"boolean",default:!1}}}}]}})),_.CursorEndSelect=(0,k.registerEditorCommand)(new H({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:t.localize(1,null),type:"boolean",default:!1}}}}]}}));class W extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){K.model.pushStackElement(),K.setCursorStates(Y.source,3,this._exec(K,K.getCursorStates())),K.revealPrimaryCursor(Y.source,!0)}_exec(K,Y){const ee=[];for(let ie=0,re=Y.length;ie<re;ie++){const oe=Y[ie],se=oe.modelState.position.lineNumber,te=K.model.getLineMaxColumn(se);ee[ie]=b.CursorState.fromModelState(oe.modelState.move(this._inSelectionMode,se,te,0))}return ee}}_.CursorLineEnd=(0,k.registerEditorCommand)(new W({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:0,mac:{primary:291}}})),_.CursorLineEndSelect=(0,k.registerEditorCommand)(new W({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1315}}}));class U extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){K.model.pushStackElement(),K.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToBeginningOfBuffer(K,K.getCursorStates(),this._inSelectionMode)),K.revealPrimaryCursor(Y.source,!0)}}_.CursorTop=(0,k.registerEditorCommand)(new U({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:2062,mac:{primary:2064}}})),_.CursorTopSelect=(0,k.registerEditorCommand)(new U({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3086,mac:{primary:3088}}}));class $ extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){K.model.pushStackElement(),K.setCursorStates(Y.source,3,C.CursorMoveCommands.moveToEndOfBuffer(K,K.getCursorStates(),this._inSelectionMode)),K.revealPrimaryCursor(Y.source,!0)}}_.CursorBottom=(0,k.registerEditorCommand)(new $({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:2061,mac:{primary:2066}}})),_.CursorBottomSelect=(0,k.registerEditorCommand)(new $({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:3085,mac:{primary:3090}}}));class q extends d{constructor(){super({id:"editorScroll",precondition:void 0,description:n.description})}determineScrollMethod(K){const Y=[6],ee=[1,2,3,4,5,6],ie=[4,2],re=[1,3];return Y.includes(K.unit)&&ie.includes(K.direction)?this._runHorizontalEditorScroll.bind(this):ee.includes(K.unit)&&re.includes(K.direction)?this._runVerticalEditorScroll.bind(this):null}runCoreEditorCommand(K,Y){const ee=n.parse(Y);if(!ee)return;const ie=this.determineScrollMethod(ee);!ie||ie(K,Y.source,ee)}_runVerticalEditorScroll(K,Y,ee){const ie=this._computeDesiredScrollTop(K,ee);if(ee.revealCursor){const re=K.getCompletelyVisibleViewRangeAtScrollTop(ie);K.setCursorStates(Y,3,[C.CursorMoveCommands.findPositionInViewportIfOutside(K,K.getPrimaryCursorState(),re,ee.select)])}K.viewLayout.setScrollPosition({scrollTop:ie},0)}_computeDesiredScrollTop(K,Y){if(Y.unit===1){const re=K.getCompletelyVisibleViewRange(),oe=K.coordinatesConverter.convertViewRangeToModelRange(re);let se;Y.direction===1?se=Math.max(1,oe.startLineNumber-Y.value):se=Math.min(K.model.getLineCount(),oe.startLineNumber+Y.value);const te=K.coordinatesConverter.convertModelPositionToViewPosition(new u.Position(se,1));return K.viewLayout.getVerticalOffsetForLineNumber(te.lineNumber)}if(Y.unit===5){let re=0;return Y.direction===3&&(re=K.model.getLineCount()-K.cursorConfig.pageSize),K.viewLayout.getVerticalOffsetForLineNumber(re)}let ee;Y.unit===3?ee=K.cursorConfig.pageSize*Y.value:Y.unit===4?ee=Math.round(K.cursorConfig.pageSize/2)*Y.value:ee=Y.value;const ie=(Y.direction===1?-1:1)*ee;return K.viewLayout.getCurrentScrollTop()+ie*K.cursorConfig.lineHeight}_runHorizontalEditorScroll(K,Y,ee){const ie=this._computeDesiredScrollLeft(K,ee);K.viewLayout.setScrollPosition({scrollLeft:ie},0)}_computeDesiredScrollLeft(K,Y){const ee=(Y.direction===4?-1:1)*Y.value;return K.viewLayout.getCurrentScrollLeft()+ee*K.cursorConfig.typicalHalfwidthCharacterWidth}}_.EditorScrollImpl=q,_.EditorScroll=(0,k.registerEditorCommand)(new q),_.ScrollLineUp=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Up,by:n.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollPageUp=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Up,by:n.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollEditorTop=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollEditorTop",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Up,by:n.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollLineDown=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Down,by:n.RawUnit.WrappedLine,value:1,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollPageDown=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Down,by:n.RawUnit.Page,value:1,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollEditorBottom=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollEditorBottom",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Down,by:n.RawUnit.Editor,value:1,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollLeft=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollLeft",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Left,by:n.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:K.source})}}),_.ScrollRight=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"scrollRight",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus}})}runCoreEditorCommand(j,K){_.EditorScroll.runCoreEditorCommand(j,{to:n.RawDirection.Right,by:n.RawUnit.Column,value:2,revealCursor:!1,select:!1,source:K.source})}});class X extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){!Y.position||(K.model.pushStackElement(),K.setCursorStates(Y.source,3,[C.CursorMoveCommands.word(K,K.getPrimaryCursorState(),this._inSelectionMode,Y.position)]),Y.revealType!==2&&K.revealPrimaryCursor(Y.source,!0,!0))}}_.WordSelect=(0,k.registerEditorCommand)(new X({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),_.WordSelectDrag=(0,k.registerEditorCommand)(new X({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),_.LastCursorWordSelect=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(j,K){if(!K.position)return;const Y=j.getLastAddedCursorIndex(),ee=j.getCursorStates(),ie=ee.slice(0),re=ee[Y];ie[Y]=C.CursorMoveCommands.word(j,re,re.modelState.hasSelection(),K.position),j.model.pushStackElement(),j.setCursorStates(K.source,3,ie)}});class G extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){!Y.position||(K.model.pushStackElement(),K.setCursorStates(Y.source,3,[C.CursorMoveCommands.line(K,K.getPrimaryCursorState(),this._inSelectionMode,Y.position,Y.viewPosition)]),Y.revealType!==2&&K.revealPrimaryCursor(Y.source,!1,!0))}}_.LineSelect=(0,k.registerEditorCommand)(new G({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),_.LineSelectDrag=(0,k.registerEditorCommand)(new G({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class Q extends d{constructor(K){super(K),this._inSelectionMode=K.inSelectionMode}runCoreEditorCommand(K,Y){if(!Y.position)return;const ee=K.getLastAddedCursorIndex(),ie=K.getCursorStates(),re=ie.slice(0);re[ee]=C.CursorMoveCommands.line(K,ie[ee],this._inSelectionMode,Y.position,Y.viewPosition),K.model.pushStackElement(),K.setCursorStates(Y.source,3,re)}}_.LastCursorLineSelect=(0,k.registerEditorCommand)(new Q({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),_.LastCursorLineSelectDrag=(0,k.registerEditorCommand)(new Q({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),_.CancelSelection=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"cancelSelection",precondition:f.EditorContextKeys.hasNonEmptySelection,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(j,K){j.model.pushStackElement(),j.setCursorStates(K.source,3,[C.CursorMoveCommands.cancelSelection(j,j.getPrimaryCursorState())]),j.revealPrimaryCursor(K.source,!0)}}),_.RemoveSecondaryCursors=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"removeSecondaryCursors",precondition:f.EditorContextKeys.hasMultipleSelections,kbOpts:{weight:s+1,kbExpr:f.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(j,K){j.model.pushStackElement(),j.setCursorStates(K.source,3,[j.getPrimaryCursorState()]),j.revealPrimaryCursor(K.source,!0),(0,A.status)(t.localize(2,null))}}),_.RevealLine=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"revealLine",precondition:void 0,description:a.description})}runCoreEditorCommand(j,K){const Y=K,ee=Y.lineNumber||0;let ie=typeof ee=="number"?ee+1:parseInt(ee)+1;ie<1&&(ie=1);const re=j.model.getLineCount();ie>re&&(ie=re);const oe=new i.Range(ie,1,ie,j.model.getLineMaxColumn(ie));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 te=j.coordinatesConverter.convertModelRangeToViewRange(oe);j.revealRange(K.source,!1,te,se,0)}}),_.SelectAll=new class extends o{constructor(){super(k.SelectAllCommand)}runDOMCommand(){p.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(j,K,Y){const ee=K._getViewModel();!ee||this.runCoreEditorCommand(ee,Y)}runCoreEditorCommand(j,K){j.model.pushStackElement(),j.setCursorStates("keyboard",3,[C.CursorMoveCommands.selectAll(j,j.getPrimaryCursorState())])}},_.SetSelection=(0,k.registerEditorCommand)(new class extends d{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(j,K){!K.selection||(j.model.pushStackElement(),j.setCursorStates(K.source,3,[b.CursorState.fromModelSelection(K.selection)]))}})})(h=e.CoreNavigationCommands||(e.CoreNavigationCommands={}));const v=c.ContextKeyExpr.and(f.EditorContextKeys.textInputFocus,f.EditorContextKeys.columnSelection);function m(_,L){l.KeybindingsRegistry.registerKeybindingRule({id:_,primary:L,when:v,weight:s+1})}m(h.CursorColumnSelectLeft.id,1039),m(h.CursorColumnSelectRight.id,1041),m(h.CursorColumnSelectUp.id,1040),m(h.CursorColumnSelectPageUp.id,1035),m(h.CursorColumnSelectDown.id,1042),m(h.CursorColumnSelectPageDown.id,1036);function w(_){return _.register(),_}var D;(function(_){class L extends k.EditorCommand{runEditorCommand(O,N,P){const B=N._getViewModel();!B||this.runCoreEditingCommand(N,B,P||{})}}_.CoreEditingCommand=L,_.LineBreakInsert=(0,k.registerEditorCommand)(new class extends L{constructor(){super({id:"lineBreakInsert",precondition:f.EditorContextKeys.writable,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(M,O,N){M.pushUndoStop(),M.executeCommands(this.id,r.TypeOperations.lineBreakInsert(O.cursorConfig,O.model,O.getCursorStates().map(P=>P.modelState.selection)))}}),_.Outdent=(0,k.registerEditorCommand)(new class extends L{constructor(){super({id:"outdent",precondition:f.EditorContextKeys.writable,kbOpts:{weight:s,kbExpr:c.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus,f.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(M,O,N){M.pushUndoStop(),M.executeCommands(this.id,r.TypeOperations.outdent(O.cursorConfig,O.model,O.getCursorStates().map(P=>P.modelState.selection))),M.pushUndoStop()}}),_.Tab=(0,k.registerEditorCommand)(new class extends L{constructor(){super({id:"tab",precondition:f.EditorContextKeys.writable,kbOpts:{weight:s,kbExpr:c.ContextKeyExpr.and(f.EditorContextKeys.editorTextFocus,f.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(M,O,N){M.pushUndoStop(),M.executeCommands(this.id,r.TypeOperations.tab(O.cursorConfig,O.model,O.getCursorStates().map(P=>P.modelState.selection))),M.pushUndoStop()}}),_.DeleteLeft=(0,k.registerEditorCommand)(new class extends L{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(M,O,N){const[P,B]=S.DeleteOperations.deleteLeft(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(V=>V.modelState.selection),O.getCursorAutoClosedCharacters());P&&M.pushUndoStop(),M.executeCommands(this.id,B),O.setPrevEditOperationType(2)}}),_.DeleteRight=(0,k.registerEditorCommand)(new class extends L{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:s,kbExpr:f.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(M,O,N){const[P,B]=S.DeleteOperations.deleteRight(O.getPrevEditOperationType(),O.cursorConfig,O.model,O.getCursorStates().map(V=>V.modelState.selection));P&&M.pushUndoStop(),M.executeCommands(this.id,B),O.setPrevEditOperationType(3)}}),_.Undo=new class extends o{constructor(){super(k.UndoCommand)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(M,O,N){if(!(!O.hasModel()||O.getOption(82)===!0))return O.getModel().undo()}},_.Redo=new class extends o{constructor(){super(k.RedoCommand)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(M,O,N){if(!(!O.hasModel()||O.getOption(82)===!0))return O.getModel().redo()}}})(D=e.CoreEditingCommands||(e.CoreEditingCommands={}));class y extends k.Command{constructor(L,M,O){super({id:L,precondition:void 0,description:O}),this._handlerId=M}runCommand(L,M){const O=L.get(E.ICodeEditorService).getFocusedCodeEditor();!O||O.trigger("keyboard",this._handlerId,M)}}function T(_,L){w(new y("default:"+_,_)),w(new y(_,_,L))}T("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),T("replacePreviousChar"),T("compositionType"),T("compositionStart"),T("compositionEnd"),T("paste"),T("cut")}),define(ae[2169],le([1,0,497,40]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let R=class{constructor(k,E){}dispose(){}};R.ID="editor.contrib.markerDecorations",R=we([F(1,t.IMarkerDecorationsService)],R),e.MarkerDecorationsContribution=R,(0,p.registerEditorContribution)(R.ID,R)}),define(ae[2170],le([1,0,332,50,14]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class A{constructor(E,I,b,S){this.configuration=E,this.viewModel=I,this.userInputEvents=b,this.commandDelegate=S}paste(E,I,b,S){this.commandDelegate.paste(E,I,b,S)}type(E){this.commandDelegate.type(E)}compositionType(E,I,b,S){this.commandDelegate.compositionType(E,I,b,S)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(E){t.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:E})}_validateViewColumn(E){const I=this.viewModel.getLineMinColumn(E.lineNumber);return E.column<I?new p.Position(E.lineNumber,I):E}_hasMulticursorModifier(E){switch(this.configuration.options.get(71)){case"altKey":return E.altKey;case"ctrlKey":return E.ctrlKey;case"metaKey":return E.metaKey;default:return!1}}_hasNonMulticursorModifier(E){switch(this.configuration.options.get(71)){case"altKey":return E.ctrlKey||E.metaKey;case"ctrlKey":return E.altKey||E.metaKey;case"metaKey":return E.ctrlKey||E.altKey;default:return!1}}dispatchMouse(E){const I=this.configuration.options,b=R.isLinux&&I.get(97),S=I.get(18);E.middleButton&&!b?this._columnSelect(E.position,E.mouseColumn,E.inSelectionMode):E.startedOnLineNumbers?this._hasMulticursorModifier(E)?E.inSelectionMode?this._lastCursorLineSelect(E.position,E.revealType):this._createCursor(E.position,!0):E.inSelectionMode?this._lineSelectDrag(E.position,E.revealType):this._lineSelect(E.position,E.revealType):E.mouseDownCount>=4?this._selectAll():E.mouseDownCount===3?this._hasMulticursorModifier(E)?E.inSelectionMode?this._lastCursorLineSelectDrag(E.position,E.revealType):this._lastCursorLineSelect(E.position,E.revealType):E.inSelectionMode?this._lineSelectDrag(E.position,E.revealType):this._lineSelect(E.position,E.revealType):E.mouseDownCount===2?E.onInjectedText||(this._hasMulticursorModifier(E)?this._lastCursorWordSelect(E.position,E.revealType):E.inSelectionMode?this._wordSelectDrag(E.position,E.revealType):this._wordSelect(E.position,E.revealType)):this._hasMulticursorModifier(E)?this._hasNonMulticursorModifier(E)||(E.shiftKey?this._columnSelect(E.position,E.mouseColumn,!0):E.inSelectionMode?this._lastCursorMoveToSelect(E.position,E.revealType):this._createCursor(E.position,!1)):E.inSelectionMode?E.altKey?this._columnSelect(E.position,E.mouseColumn,!0):S?this._columnSelect(E.position,E.mouseColumn,!0):this._moveToSelect(E.position,E.revealType):this.moveTo(E.position,E.revealType)}_usualArgs(E,I){return E=this._validateViewColumn(E),{source:"mouse",position:this._convertViewToModelPosition(E),viewPosition:E,revealType:I}}moveTo(E,I){t.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_moveToSelect(E,I){t.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_columnSelect(E,I,b){E=this._validateViewColumn(E),t.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(E),viewPosition:E,mouseColumn:I,doColumnSelect:b})}_createCursor(E,I){E=this._validateViewColumn(E),t.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(E),viewPosition:E,wholeLine:I})}_lastCursorMoveToSelect(E,I){t.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_wordSelect(E,I){t.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_wordSelectDrag(E,I){t.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_lastCursorWordSelect(E,I){t.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_lineSelect(E,I){t.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_lineSelectDrag(E,I){t.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_lastCursorLineSelect(E,I){t.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_lastCursorLineSelectDrag(E,I){t.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(E,I))}_selectAll(){t.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(E){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(E)}emitKeyDown(E){this.userInputEvents.emitKeyDown(E)}emitKeyUp(E){this.userInputEvents.emitKeyUp(E)}emitContextMenu(E){this.userInputEvents.emitContextMenu(E)}emitMouseMove(E){this.userInputEvents.emitMouseMove(E)}emitMouseLeave(E){this.userInputEvents.emitMouseLeave(E)}emitMouseUp(E){this.userInputEvents.emitMouseUp(E)}emitMouseDown(E){this.userInputEvents.emitMouseDown(E)}emitMouseDrag(E){this.userInputEvents.emitMouseDrag(E)}emitMouseDrop(E){this.userInputEvents.emitMouseDrop(E)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(E){this.userInputEvents.emitMouseWheel(E)}}e.ViewController=A}),define(ae[2171],le([1,0,10,85,121,21,2147,2157,2170,725,1276,180,1274,2155,1215,2151,569,2156,812,2148,1216,735,1217,2152,1218,2158,1222,2159,2153,2154,2160,1219,50,408,1223,1221,411,12,811,1214]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;class x extends P.ViewEventHandler{constructor(U,$,q,X,G,Q){super(),this._selections=[new p.Selection(1,1,1,1)],this._renderAnimationFrame=null;const j=new I.ViewController($,X,G,U);this._context=new O.ViewContext($,q,X),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=new E.TextAreaHandler(this._context,j,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,R.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,R.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,R.createFastDomNode)(document.createElement("div")),C.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new f.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new d.ViewLines(this._context,this._linesContent),this._viewZones=new _.ViewZones(this._context),this._viewParts.push(this._viewZones);const K=new v.DecorationsOverviewRuler(this._context);this._viewParts.push(K);const Y=new D.ScrollDecorationViewPart(this._context);this._viewParts.push(Y);const ee=new S.ContentViewOverlays(this._context);this._viewParts.push(ee),ee.addDynamicOverlay(new u.CurrentLineHighlightOverlay(this._context)),ee.addDynamicOverlay(new y.SelectionsOverlay(this._context)),ee.addDynamicOverlay(new l.IndentGuidesOverlay(this._context)),ee.addDynamicOverlay(new i.DecorationsOverlay(this._context));const ie=new S.MarginViewOverlays(this._context);this._viewParts.push(ie),ie.addDynamicOverlay(new u.CurrentLineMarginHighlightOverlay(this._context)),ie.addDynamicOverlay(new c.GlyphMarginOverlay(this._context)),ie.addDynamicOverlay(new o.MarginViewLineDecorationsOverlay(this._context)),ie.addDynamicOverlay(new n.LinesDecorationsOverlay(this._context)),ie.addDynamicOverlay(new s.LineNumbersOverlay(this._context));const re=new a.Margin(this._context);re.getDomNode().appendChild(this._viewZones.marginDomNode),re.getDomNode().appendChild(ie.getDomNode()),this._viewParts.push(re),this._contentWidgets=new r.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 h.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const oe=new w.Rulers(this._context);this._viewParts.push(oe);const se=new z.BlockDecorations(this._context);this._viewParts.push(se);const te=new g.Minimap(this._context);if(this._viewParts.push(te),K){const Z=this._scrollbar.getOverviewRulerLayoutInfo();Z.parent.insertBefore(K.getDomNode(),Z.insertBefore)}this._linesContent.appendChild(ee.getDomNode()),this._linesContent.appendChild(oe.domNode),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(re.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(Y.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(te.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),Q?Q.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new k.PointerHandler(this._context,j,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,viewLinesDomNode:this._viewLines.getDomNode().domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:U=>{this._textAreaHandler.textArea.domNode.dispatchEvent(U)},getLastRenderData:()=>{const U=this._viewCursors.getLastRenderData()||[],$=this._textAreaHandler.getLastRenderData();return new V.PointerHandlerLastRenderData(U,$)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:U=>this._viewZones.shouldSuppressMouseDownOnViewZone(U),shouldSuppressMouseDownOnWidget:U=>this._contentWidgets.shouldSuppressMouseDownOnWidget(U),getPositionFromDOMInfo:(U,$)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(U,$)),visibleRangeForPosition:(U,$)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new L.Position(U,$))),getLineWidth:U=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(U))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:U=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(U))}}_applyLayout(){const $=this._context.configuration.options.get(133);this.domNode.setWidth($.width),this.domNode.setHeight($.height),this._overflowGuardContainer.setWidth($.width),this._overflowGuardContainer.setHeight($.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const U=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(130)+" "+(0,B.getThemeTypeSelector)(this._context.theme.type)+U}handleEvents(U){super.handleEvents(U),this._scheduleRender()}onConfigurationChanged(U){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(U){return this._selections=U.selections,!1}onFocusChanged(U){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(U){return this._context.theme.update(U.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 U of this._viewParts)U.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=t.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){H(()=>this._actualRender())}_getViewPartsToRender(){const U=[];let $=0;for(const q of this._viewParts)q.shouldRender()&&(U[$++]=q);return U}_actualRender(){if(!t.isInDOM(this.domNode.domNode))return;let U=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&U.length===0)return;const $=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport($.startLineNumber,$.endLineNumber,$.centeredLineNumber);const q=new N.ViewportData(this._selections,$,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(q),this._viewLines.shouldRender()&&(this._viewLines.renderText(q),this._viewLines.onDidRender(),U=this._getViewPartsToRender());const X=new M.RenderingContext(this._context.viewLayout,q,this._viewLines);for(const G of U)G.prepareRender(X);for(const G of U)G.render(X),G.onDidRender()}delegateVerticalScrollbarPointerDown(U){this._scrollbar.delegateVerticalScrollbarPointerDown(U)}restoreState(U){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:U.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:U.scrollLeft},1)}getOffsetForColumn(U,$){const q=this._context.viewModel.model.validatePosition({lineNumber:U,column:$}),X=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(q);this._flushAccumulatedAndRenderNow();const G=this._viewLines.visibleRangeForPosition(new L.Position(X.lineNumber,X.column));return G?G.left:-1}getTargetAtClientPoint(U,$){const q=this._pointerHandler.getTargetAtClientPoint(U,$);return q?b.ViewUserInputEvents.convertViewToModelMouseTarget(q,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(U){return new m.OverviewRuler(this._context,U)}change(U){this._viewZones.changeViewZones(U),this._scheduleRender()}render(U,$){if($){this._viewLines.forceShouldRender();for(const q of this._viewParts)q.forceShouldRender()}U?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}refreshFocusState(){this._textAreaHandler.refreshFocusState()}setAriaOptions(U){this._textAreaHandler.setAriaOptions(U)}addContentWidget(U){this._contentWidgets.addWidget(U.widget),this.layoutContentWidget(U),this._scheduleRender()}layoutContentWidget(U){this._contentWidgets.setWidgetPosition(U.widget,U.position?.position??null,U.position?.secondaryPosition??null,U.position?.preference??null,U.position?.positionAffinity??null),this._scheduleRender()}removeContentWidget(U){this._contentWidgets.removeWidget(U.widget),this._scheduleRender()}addOverlayWidget(U){this._overlayWidgets.addWidget(U.widget),this.layoutOverlayWidget(U),this._scheduleRender()}layoutOverlayWidget(U){const $=U.position?U.position.preference:null;this._overlayWidgets.setWidgetPosition(U.widget,$)&&this._scheduleRender()}removeOverlayWidget(U){this._overlayWidgets.removeWidget(U.widget),this._scheduleRender()}}e.View=x;function H(W){try{return W()}catch(U){(0,A.onUnexpectedError)(U)}}}),define(ae[2172],le([1,0,110,113,99,40,85,59,1327,7,1075]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionAnchorSet=void 0,e.SelectionAnchorSet=new b.RawContextKey("selectionAnchorSet",!1);let S=class jo{static get(c){return c.getContribution(jo.ID)}constructor(c,l){this.editor=c,this.selectionAnchorSetContextKey=e.SelectionAnchorSet.bindTo(l),this.modelChangeListener=c.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const c=this.editor.getPosition();this.editor.changeDecorations(l=>{this.decorationId&&l.removeDecoration(this.decorationId),this.decorationId=l.addDecoration(k.Selection.fromPositions(c,c),{description:"selection-anchor",stickiness:1,hoverMessage:new p.MarkdownString().appendText((0,I.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,t.alert)((0,I.localize)(1,null,c.lineNumber,c.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const c=this.editor.getModel().getDecorationRange(this.decorationId);c&&this.editor.setPosition(c.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const c=this.editor.getModel().getDecorationRange(this.decorationId);if(c){const l=this.editor.getPosition();this.editor.setSelection(k.Selection.fromPositions(c.getStartPosition(),l)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const c=this.decorationId;this.editor.changeDecorations(l=>{l.removeDecoration(c),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};S.ID="editor.contrib.selectionAnchorController",S=we([F(1,b.IContextKeyService)],S);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:E.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2080),weight:100}})}async run(c,l){S.get(l)?.setSelectionAnchor()}}class r 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(c,l){S.get(l)?.goToSelectionAnchor()}}class u 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:E.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2089),weight:100}})}async run(c,l){S.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:E.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}async run(c,l){S.get(l)?.cancelSelectionAnchor()}}(0,A.registerEditorContribution)(S.ID,S),(0,A.registerEditorAction)(C),(0,A.registerEditorAction)(r),(0,A.registerEditorAction)(u),(0,A.registerEditorAction)(i)}),define(ae[2173],le([1,0,40,59,1224,1329]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class k extends t.EditorAction{constructor(S,C){super(C),this.left=S}run(S,C){if(!C.hasModel())return;const r=[],u=C.getSelections();for(const i of u)r.push(new R.MoveCaretCommand(i,this.left));C.pushUndoStop(),C.executeCommands(this.id,r),C.pushUndoStop()}}class E extends k{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:A.localize(0,null),alias:"Move Selected Text Left",precondition:p.EditorContextKeys.writable})}}class I extends k{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:A.localize(1,null),alias:"Move Selected Text Right",precondition:p.EditorContextKeys.writable})}}(0,t.registerEditorAction)(E),(0,t.registerEditorAction)(I)}),define(ae[2174],le([1,0,40,361,587,20,59,1330]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends t.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:E.localize(0,null),alias:"Transpose Letters",precondition:k.EditorContextKeys.writable,kbOpts:{kbExpr:k.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(S,C){if(!C.hasModel())return;const r=C.getModel(),u=[],i=C.getSelections();for(const f of i){if(!f.isEmpty())continue;const c=f.startLineNumber,l=f.startColumn,s=r.getLineMaxColumn(c);if(c===1&&(l===1||l===2&&s===2))continue;const d=l===s?f.getPosition():R.MoveOperations.rightPosition(r,f.getPosition().lineNumber,f.getPosition().column),n=R.MoveOperations.leftPosition(r,d),a=R.MoveOperations.leftPosition(r,n),o=r.getValueInRange(A.Range.fromPositions(a,n)),g=r.getValueInRange(A.Range.fromPositions(n,d)),h=A.Range.fromPositions(a,d);u.push(new p.ReplaceCommand(h,g+o))}u.length>0&&(C.pushUndoStop(),C.executeCommands(this.id,u),C.pushUndoStop())}}(0,t.registerEditorAction)(I)}),define(ae[508],le([1,0,86,14,584,40,75,59,1331,15,93]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const C="9_cutcopypaste",r=p.isNative||document.queryCommandSupported("cut"),u=p.isNative||document.queryCommandSupported("copy"),i=typeof navigator.clipboard>"u"||t.isFirefox?document.queryCommandSupported("paste"):!0;function f(s){return s.register(),s}e.CutAction=r?f(new A.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:p.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:b.MenuId.MenubarEditMenu,group:"2_ccp",title:I.localize(0,null),order:1},{menuId:b.MenuId.EditorContext,group:C,title:I.localize(1,null),when:E.EditorContextKeys.writable,order:1},{menuId:b.MenuId.CommandPalette,group:"",title:I.localize(2,null),order:1},{menuId:b.MenuId.SimpleEditorContext,group:C,title:I.localize(3,null),when:E.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=u?f(new A.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:p.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:b.MenuId.MenubarEditMenu,group:"2_ccp",title:I.localize(4,null),order:2},{menuId:b.MenuId.EditorContext,group:C,title:I.localize(5,null),order:2},{menuId:b.MenuId.CommandPalette,group:"",title:I.localize(6,null),order:1},{menuId:b.MenuId.SimpleEditorContext,group:C,title:I.localize(7,null),order:2}]})):void 0,b.MenuRegistry.appendMenuItem(b.MenuId.MenubarEditMenu,{submenu:b.MenuId.MenubarCopy,title:{value:I.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,{submenu:b.MenuId.EditorContextCopy,title:{value:I.localize(9,null),original:"Copy As"},group:C,order:3}),b.MenuRegistry.appendMenuItem(b.MenuId.EditorContext,{submenu:b.MenuId.EditorContextShare,title:{value:I.localize(10,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=i?f(new A.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:p.isNative?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:b.MenuId.MenubarEditMenu,group:"2_ccp",title:I.localize(11,null),order:4},{menuId:b.MenuId.EditorContext,group:C,title:I.localize(12,null),when:E.EditorContextKeys.writable,order:4},{menuId:b.MenuId.CommandPalette,group:"",title:I.localize(13,null),order:1},{menuId:b.MenuId.SimpleEditorContext,group:C,title:I.localize(14,null),when:E.EditorContextKeys.writable,order:4}]})):void 0;class c extends A.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:I.localize(15,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:E.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(d,n){!n.hasModel()||!n.getOption(33)&&n.getSelection().isEmpty()||(R.CopyOptions.forceCopyWithSyntaxHighlighting=!0,n.focus(),document.execCommand("copy"),R.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function l(s,d){!s||(s.addImplementation(1e4,"code-editor",(n,a)=>{const o=n.get(k.ICodeEditorService).getFocusedCodeEditor();if(o&&o.hasTextFocus()){const g=o.getOption(33),h=o.getSelection();return h&&h.isEmpty()&&!g||document.execCommand(d),!0}return!1}),s.addImplementation(0,"generic-dom",(n,a)=>(document.execCommand(d),!0)))}l(e.CutAction,"cut"),l(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(s,d)=>{const n=s.get(k.ICodeEditorService),a=s.get(S.IClipboardService),o=n.getFocusedCodeEditor();return o&&o.hasTextFocus()?!document.execCommand("paste")&&p.isWeb?(async()=>{const h=await a.readText();if(h!==""){const v=R.InMemoryClipboardMetadataManager.INSTANCE.get(h);let m=!1,w=null,D=null;v&&(m=o.getOption(33)&&!!v.isFromEmptySelection,w=typeof v.multicursorText<"u"?v.multicursorText:null,D=v.mode),o.trigger("keyboard","paste",{text:h,pasteOnNewLine:m,multicursorText:w,mode:D})}})():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(s,d)=>(document.execCommand("paste"),!0))),u&&(0,A.registerEditorAction)(c)}),define(ae[2175],le([1,0,99,40,20,59,122,737,1301,1339,15]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class C extends p.EditorAction{constructor(l,s){super(s),this._type=l}run(l,s){const d=l.get(k.ILanguageConfigurationService);if(!s.hasModel())return;const n=s.getModel(),a=[],o=n.getOptions(),g=s.getOption(19),h=s.getSelections().map((m,w)=>({selection:m,index:w,ignoreFirstLine:!1}));h.sort((m,w)=>R.Range.compareRangesUsingStarts(m.selection,w.selection));let v=h[0];for(let m=1;m<h.length;m++){const w=h[m];v.selection.endLineNumber===w.selection.startLineNumber&&(v.index<w.index?w.ignoreFirstLine=!0:(v.ignoreFirstLine=!0,v=w))}for(const m of h)a.push(new I.LineCommentCommand(d,m.selection,o.tabSize,this._type,g.insertSpace,g.ignoreEmptyLines,m.ignoreFirstLine));s.pushUndoStop(),s.executeCommands(this.id,a),s.pushUndoStop()}}class r extends C{constructor(){super(0,{id:"editor.action.commentLine",label:b.localize(0,null),alias:"Toggle Line Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:S.MenuId.MenubarEditMenu,group:"5_insert",title:b.localize(1,null),order:1}})}}class u extends C{constructor(){super(1,{id:"editor.action.addCommentLine",label:b.localize(2,null),alias:"Add Line Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2081),weight:100}})}}class i extends C{constructor(){super(2,{id:"editor.action.removeCommentLine",label:b.localize(3,null),alias:"Remove Line Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2099),weight:100}})}}class f extends p.EditorAction{constructor(){super({id:"editor.action.blockComment",label:b.localize(4,null),alias:"Toggle Block Comment",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:S.MenuId.MenubarEditMenu,group:"5_insert",title:b.localize(5,null),order:2}})}run(l,s){const d=l.get(k.ILanguageConfigurationService);if(!s.hasModel())return;const n=s.getOption(19),a=[],o=s.getSelections();for(const g of o)a.push(new E.BlockCommentCommand(g,n.insertSpace,d));s.pushUndoStop(),s.executeCommands(this.id,a),s.pushUndoStop()}}(0,p.registerEditorAction)(r),(0,p.registerEditorAction)(u),(0,p.registerEditorAction)(i),(0,p.registerEditorAction)(f)}),define(ae[333],le([1,0,10,137,36,2,14,40,59,1340,15,7,37,38,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let f=class Yo{static get(s){return s.getContribution(Yo.ID)}constructor(s,d,n,a,o,g,h){this._contextMenuService=d,this._contextViewService=n,this._contextKeyService=a,this._keybindingService=o,this._menuService=g,this._configurationService=h,this._toDispose=new A.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=s,this._toDispose.add(this._editor.onContextMenu(v=>this._onContextMenu(v))),this._toDispose.add(this._editor.onMouseWheel(v=>{if(this._contextMenuIsBeingShownCount>0){const m=this._contextViewService.getContextViewElement(),w=v.srcElement;w.shadowRoot&&t.getShadowRoot(m)===w.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(v=>{!this._editor.getOption(20)||v.keyCode===58&&(v.preventDefault(),v.stopPropagation(),this.showContextMenu())}))}_onContextMenu(s){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),s.target.position&&!this._editor.getSelection().containsPosition(s.target.position)&&this._editor.setPosition(s.target.position);return}if(s.target.type===12||s.target.type===6&&s.target.detail.injectedText)return;if(s.event.preventDefault(),s.event.stopPropagation(),s.target.type===11)return this._showScrollbarContextMenu({x:s.event.posx-1,width:2,y:s.event.posy-1,height:2});if(s.target.type!==6&&s.target.type!==7&&s.target.type!==1)return;if(this._editor.focus(),s.target.position){let n=!1;for(const a of this._editor.getSelections())if(a.containsPosition(s.target.position)){n=!0;break}n||this._editor.setPosition(s.target.position)}let d=null;s.target.type!==1&&(d={x:s.event.posx-1,width:2,y:s.event.posy-1,height:2}),this.showContextMenu(d)}showContextMenu(s){if(!this._editor.getOption(20)||!this._editor.hasModel())return;const d=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?S.MenuId.SimpleEditorContext:S.MenuId.EditorContext);d.length>0&&this._doShowContextMenu(d,s)}_getMenuActions(s,d){const n=[],a=this._menuService.createMenu(d,this._contextKeyService),o=a.getActions({arg:s.uri});a.dispose();for(const g of o){const[,h]=g;let v=0;for(const m of h)if(m instanceof S.SubmenuItemAction){const w=this._getMenuActions(s,m.item.submenu);w.length>0&&(n.push(new R.SubmenuAction(m.id,m.label,w)),v++)}else n.push(m),v++;v&&n.push(new R.Separator)}return n.length&&n.pop(),n}_doShowContextMenu(s,d=null){if(!this._editor.hasModel())return;const n=this._editor.getOption(54);if(this._editor.updateOptions({hover:{enabled:!1}}),!d){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const o=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),g=t.getDomNodePagePosition(this._editor.getDomNode()),h=g.left+o.left,v=g.top+o.top+o.height;d={x:h,y:v}}const a=this._editor.getOption(117)&&!k.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:a?this._editor.getDomNode():void 0,getAnchor:()=>d,getActions:()=>s,getActionViewItem:o=>{const g=this._keybindingFor(o);if(g)return new p.ActionViewItem(o,o,{label:!0,keybinding:g.getLabel(),isMenu:!0});const h=o;return typeof h.getActionViewItem=="function"?h.getActionViewItem():new p.ActionViewItem(o,o,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:o=>this._keybindingFor(o),onHide:o=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:n})}})}_showScrollbarContextMenu(s){if(!this._editor.hasModel())return;const d=this._editor.getOption(66);let n=0;const a=m=>({id:`menu-action-${++n}`,label:m.label,tooltip:"",class:void 0,enabled:typeof m.enabled>"u"?!0:m.enabled,checked:m.checked,run:m.run}),o=(m,w)=>new R.SubmenuAction(`menu-action-${++n}`,m,w,void 0),g=(m,w,D,y,T)=>{if(!w)return a({label:m,enabled:w,run:()=>{}});const _=M=>()=>{this._configurationService.updateValue(D,M)},L=[];for(const M of T)L.push(a({label:M.label,checked:y===M.value,run:_(M.value)}));return o(m,L)},h=[];h.push(a({label:b.localize(0,null),checked:d.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!d.enabled)}})),h.push(new R.Separator),h.push(a({label:b.localize(1,null),enabled:d.enabled,checked:d.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!d.renderCharacters)}})),h.push(g(b.localize(2,null),d.enabled,"editor.minimap.size",d.size,[{label:b.localize(3,null),value:"proportional"},{label:b.localize(4,null),value:"fill"},{label:b.localize(5,null),value:"fit"}])),h.push(g(b.localize(6,null),d.enabled,"editor.minimap.showSlider",d.showSlider,[{label:b.localize(7,null),value:"mouseover"},{label:b.localize(8,null),value:"always"}]));const v=this._editor.getOption(117)&&!k.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:v?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>h,onHide:m=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(s){return this._keybindingService.lookupKeybinding(s.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};f.ID="editor.contrib.contextmenu",f=we([F(1,r.IContextMenuService),F(2,r.IContextViewService),F(3,C.IContextKeyService),F(4,u.IKeybindingService),F(5,S.IMenuService),F(6,i.IConfigurationService)],f),e.ContextMenuController=f;class c extends E.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:b.localize(9,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(s,d){f.get(d)?.showContextMenu()}}(0,E.registerEditorContribution)(f.ID,f),(0,E.registerEditorAction)(c)}),define(ae[2176],le([1,0,2,40,59,1343]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorRedo=e.CursorUndo=e.CursorUndoRedoController=void 0;class k{constructor(r){this.selections=r}equals(r){const u=this.selections.length,i=r.selections.length;if(u!==i)return!1;for(let f=0;f<u;f++)if(!this.selections[f].equalsSelection(r.selections[f]))return!1;return!0}}class E{constructor(r,u,i){this.cursorState=r,this.scrollTop=u,this.scrollLeft=i}}class I extends t.Disposable{static get(r){return r.getContribution(I.ID)}constructor(r){super(),this._editor=r,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(r.onDidChangeModel(u=>{this._undoStack=[],this._redoStack=[]})),this._register(r.onDidChangeModelContent(u=>{this._undoStack=[],this._redoStack=[]})),this._register(r.onDidChangeCursorSelection(u=>{if(this._isCursorUndoRedo||!u.oldSelections||u.oldModelVersionId!==u.modelVersionId)return;const i=new k(u.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new E(i,r.getScrollTop(),r.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new E(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 E(new k(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(r){this._isCursorUndoRedo=!0,this._editor.setSelections(r.cursorState.selections),this._editor.setScrollPosition({scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=I,I.ID="editor.contrib.cursorUndoRedoController";class b extends p.EditorAction{constructor(){super({id:"cursorUndo",label:A.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:R.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(r,u,i){I.get(u)?.cursorUndo()}}e.CursorUndo=b;class S extends p.EditorAction{constructor(){super({id:"cursorRedo",label:A.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(r,u,i){I.get(u)?.cursorRedo()}}e.CursorRedo=S,(0,p.registerEditorContribution)(I.ID,I),(0,p.registerEditorAction)(b),(0,p.registerEditorAction)(S)}),define(ae[2177],le([1,0,40,7,32,158,5,35,1345]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const b=(0,k.createDecorator)("IEditorCancelService"),S=new p.RawContextKey("cancellableOperation",!1,(0,I.localize)(0,null));(0,E.registerSingleton)(b,class{constructor(){this._tokens=new WeakMap}add(r,u){let i=this._tokens.get(r);i||(i=r.invokeWithinContext(c=>{const l=S.bindTo(c.get(p.IContextKeyService)),s=new A.LinkedList;return{key:l,tokens:s}}),this._tokens.set(r,i));let f;return i.key.set(!0),f=i.tokens.push(u),()=>{f&&(f(),i.key.set(!i.tokens.isEmpty()),f=void 0)}}cancel(r){const u=this._tokens.get(r);if(!u)return;const i=u.tokens.pop();i&&(i.cancel(),u.key.set(!u.tokens.isEmpty()))}},1);class C extends R.CancellationTokenSource{constructor(u,i){super(i),this.editor=u,this._unregister=u.invokeWithinContext(f=>f.get(b).add(u,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:S})}runEditorCommand(r,u){r.get(b).cancel(u)}})}),define(ae[266],le([1,0,28,20,32,2,2177]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=e.CodeEditorStateFlag=void 0;var E;(function(C){C[C.Value=1]="Value",C[C.Selection=2]="Selection",C[C.Position=4]="Position",C[C.Scroll=8]="Scroll"})(E=e.CodeEditorStateFlag||(e.CodeEditorStateFlag={}));class I{constructor(r,u){if(this.flags=u,(this.flags&1)!==0){const i=r.getModel();this.modelVersionId=i?t.format("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=r.getPosition():this.position=null,(this.flags&2)!==0?this.selection=r.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=r.getScrollLeft(),this.scrollTop=r.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(r){if(!(r instanceof I))return!1;const u=r;return!(this.modelVersionId!==u.modelVersionId||this.scrollLeft!==u.scrollLeft||this.scrollTop!==u.scrollTop||!this.position&&u.position||this.position&&!u.position||this.position&&u.position&&!this.position.equals(u.position)||!this.selection&&u.selection||this.selection&&!u.selection||this.selection&&u.selection&&!this.selection.equalsRange(u.selection))}validate(r){return this._equals(new I(r,this.flags))}}e.EditorState=I;class b extends k.EditorKeybindingCancellationTokenSource{constructor(r,u,i,f){super(r,f),this._listener=new A.DisposableStore,u&4&&this._listener.add(r.onDidChangeCursorPosition(c=>{(!i||!p.Range.containsPosition(i,c.position))&&this.cancel()})),u&2&&this._listener.add(r.onDidChangeCursorSelection(c=>{(!i||!p.Range.containsRange(i,c.selection))&&this.cancel()})),u&8&&this._listener.add(r.onDidScrollChange(c=>this.cancel())),u&1&&(this._listener.add(r.onDidChangeModel(c=>this.cancel())),this._listener.add(r.onDidChangeModelContent(c=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=b;class S extends R.CancellationTokenSource{constructor(r,u){super(u),this._listener=r.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=S}),define(ae[309],le([1,0,16,32,21,2,9,145,20,85,61,54,266,1332,31,26,66,27,236]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyCodeAction=e.ApplyCodeActionReason=e.getCodeActions=e.previewSelectedCodeActionCommand=e.acceptSelectedCodeActionCommand=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorPreviewCommandId=e.refactorCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.refactorCommandId="editor.action.refactor",e.refactorPreviewCommandId="editor.action.refactor.preview",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll",e.acceptSelectedCodeActionCommand="acceptSelectedCodeAction",e.previewSelectedCodeActionCommand="previewSelectedCodeAction";class d extends A.Disposable{static codeActionsPreferredComparator(y,T){return y.isPreferred&&!T.isPreferred?-1:!y.isPreferred&&T.isPreferred?1:0}static codeActionsComparator({action:y},{action:T}){return(0,t.isNonEmptyArray)(y.diagnostics)?(0,t.isNonEmptyArray)(T.diagnostics)?d.codeActionsPreferredComparator(y,T):-1:(0,t.isNonEmptyArray)(T.diagnostics)?1:d.codeActionsPreferredComparator(y,T)}constructor(y,T,_){super(),this.documentation=T,this._register(_),this.allActions=[...y].sort(d.codeActionsComparator),this.validActions=this.allActions.filter(({action:L})=>!L.disabled)}get hasAutoFix(){return this.validActions.some(({action:y})=>!!y.kind&&s.CodeActionKind.QuickFix.contains(new s.CodeActionKind(y.kind))&&!!y.isPreferred)}}const n={actions:[],documentation:void 0};async function a(D,y,T,_,L,M){const O=_.filter||{},N={only:O.include?.value,trigger:_.type},P=new r.TextModelCancellationTokenSource(y,M),B=o(D,y,O),V=new A.DisposableStore,z=B.map(async H=>{try{L.report(H);const W=await H.provideCodeActions(y,T,N,P.token);if(W&&V.add(W),P.token.isCancellationRequested)return n;const U=(W?.actions||[]).filter(q=>q&&(0,s.filtersAction)(O,q)),$=h(H,U,O.include);return{actions:U.map(q=>new s.CodeActionItem(q,H)),documentation:$}}catch(W){if((0,R.isCancellationError)(W))throw W;return(0,R.onUnexpectedExternalError)(W),n}}),x=D.onDidChange(()=>{const H=D.all(y);(0,t.equals)(H,B)||P.cancel()});try{const H=await Promise.all(z),W=H.map($=>$.actions).flat(),U=[...(0,t.coalesce)(H.map($=>$.documentation)),...g(D,y,_,W)];return new d(W,U,V)}finally{x.dispose(),P.dispose()}}e.getCodeActions=a;function o(D,y,T){return D.all(y).filter(_=>_.providedCodeActionKinds?_.providedCodeActionKinds.some(L=>(0,s.mayIncludeActionsOfKind)(T,new s.CodeActionKind(L))):!0)}function*g(D,y,T,_){if(y&&_.length)for(const L of D.all(y))L._getAdditionalMenuItems&&(yield*L._getAdditionalMenuItems?.({trigger:T.type,only:T.filter?.include?.value},_.map(M=>M.action)))}function h(D,y,T){if(!D.documentation)return;const _=D.documentation.map(L=>({kind:new s.CodeActionKind(L.kind),command:L.command}));if(T){let L;for(const M of _)M.kind.contains(T)&&(L?L.kind.contains(M.kind)&&(L=M):L=M);if(L)return L?.command}for(const L of y)if(!!L.kind){for(const M of _)if(M.kind.contains(new s.CodeActionKind(L.kind)))return M.command}}var v;(function(D){D.OnSave="onSave",D.FromProblemsView="fromProblemsView",D.FromCodeActions="fromCodeActions"})(v=e.ApplyCodeActionReason||(e.ApplyCodeActionReason={}));async function m(D,y,T,_){const L=D.get(E.IBulkEditService),M=D.get(i.ICommandService),O=D.get(l.ITelemetryService),N=D.get(f.INotificationService);if(O.publicLog2("codeAction.applyCodeAction",{codeActionTitle:y.action.title,codeActionKind:y.action.kind,codeActionIsPreferred:!!y.action.isPreferred,reason:T}),await y.resolve(p.CancellationToken.None),y.action.edit&&await L.apply(y.action.edit,{editor:_?.editor,label:y.action.title,quotableLabel:y.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:!0,showPreview:_?.preview}),y.action.command)try{await M.executeCommand(y.action.command.id,...y.action.command.arguments||[])}catch(P){const B=w(P);N.error(typeof B=="string"?B:u.localize(0,null))}}e.applyCodeAction=m;function w(D){return typeof D=="string"?D:D instanceof Error&&typeof D.message=="string"?D.message:void 0}i.CommandsRegistry.registerCommand("_executeCodeActionProvider",async function(D,y,T,_,L){if(!(y instanceof k.URI))throw(0,R.illegalArgument)();const{codeActionProvider:M}=D.get(S.ILanguageFeaturesService),O=D.get(C.IModelService).getModel(y);if(!O)throw(0,R.illegalArgument)();const N=b.Selection.isISelection(T)?b.Selection.liftSelection(T):I.Range.isIRange(T)?O.validateRange(T):void 0;if(!N)throw(0,R.illegalArgument)();const P=typeof _=="string"?new s.CodeActionKind(_):void 0,B=await a(M,O,N,{type:1,triggerAction:s.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:P}},c.Progress.None,p.CancellationToken.None),V=[],z=Math.min(B.validActions.length,typeof L=="number"?L:0);for(let x=0;x<z;x++)V.push(B.validActions[x].resolve(p.CancellationToken.None));try{return await Promise.all(V),B.validActions.map(x=>x.action)}finally{setTimeout(()=>B.dispose(),100)}})}),define(ae[2178],le([1,0,206,309,236]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;class A{constructor(E){this.keybindingService=E}getResolver(){const E=new t.Lazy(()=>this.keybindingService.getKeybindings().filter(I=>A.codeActionCommands.indexOf(I.command)>=0).filter(I=>I.resolvedKeybinding).map(I=>{let b=I.commandArgs;return I.command===p.organizeImportsCommandId?b={kind:R.CodeActionKind.SourceOrganizeImports.value}:I.command===p.fixAllCommandId&&(b={kind:R.CodeActionKind.SourceFixAll.value}),{resolvedKeybinding:I.resolvedKeybinding,...R.CodeActionCommandArgs.fromUser(b,{kind:R.CodeActionKind.None,apply:"never"})}}));return I=>{if(I.kind)return this.bestKeybindingForCodeAction(I,E.getValue())?.resolvedKeybinding}}bestKeybindingForCodeAction(E,I){if(!E.kind)return;const b=new R.CodeActionKind(E.kind);return I.filter(S=>S.kind.contains(b)).filter(S=>S.preferred?E.isPreferred:!0).reduceRight((S,C)=>S?S.kind.contains(C.kind)?C:S:C,void 0)}}e.CodeActionKeybindingResolver=A,A.codeActionCommands=[p.refactorCommandId,p.codeActionCommandId,p.sourceActionCommandId,p.organizeImportsCommandId,p.fixAllCommandId]});var yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)},Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t};define(ae[2179],le([1,0,11,21,6,2,18,7,66,309,236]),function(J,e,t,p,R,A,k,E,I,b,S){"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 E.RawContextKey("supportedCodeAction","");class r extends A.Disposable{constructor(l,s,d,n=250){super(),this._editor=l,this._markerService=s,this._signalChange=d,this._delay=n,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 s=this._getRangeOfSelectionUnlessWhitespaceEnclosed(l);return this._createEventAndSignalChange(l,s)}_onMarkerChanges(l){const s=this._editor.getModel();!s||l.some(d=>(0,k.isEqual)(d,s.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:S.CodeActionTriggerSource.Default})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:S.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(l){if(!this._editor.hasModel())return;const s=this._editor.getModel(),d=this._editor.getSelection();if(d.isEmpty()&&l.type===2){const{lineNumber:n,column:a}=d.getPosition(),o=s.getLineContent(n);if(o.length===0)return;if(a===1){if(/\s/.test(o[0]))return}else if(a===s.getLineMaxColumn(n)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[a-2])&&/\s/.test(o[a-1]))return}return d}_createEventAndSignalChange(l,s){const d=this._editor.getModel();if(!s||!d){this._signalChange(void 0);return}const n={trigger:l,selection:s,position:s.getStartPosition()};return this._signalChange(n),n}}var u;(function(c){let l;(function(d){d[d.Empty=0]="Empty",d[d.Triggered=1]="Triggered"})(l=c.Type||(c.Type={})),c.Empty={type:0};class s{constructor(n,a,o,g){this.trigger=n,this.rangeOrSelection=a,this.position=o,this._cancellablePromise=g,this.type=1,this.actions=g.catch(h=>{if((0,p.isCancellationError)(h))return i;throw h})}cancel(){this._cancellablePromise.cancel()}}c.Triggered=s})(u=e.CodeActionsState||(e.CodeActionsState={}));const i={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class f extends A.Disposable{constructor(l,s,d,n,a){super(),this._editor=l,this._registry=s,this._markerService=d,this._progressService=a,this._codeActionOracle=this._register(new A.MutableDisposable),this._state=u.Empty,this._onDidChangeState=this._register(new R.Emitter),this.onDidChangeState=this._onDidChangeState.event,C.set(this,!1),this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(n),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){yt(this,C,"f")||(Ut(this,C,!0,"f"),super.dispose(),this.setState(u.Empty,!0))}_update(){if(yt(this,C,"f"))return;this._codeActionOracle.value=void 0,this.setState(u.Empty);const l=this._editor.getModel();if(l&&this._registry.has(l)&&!this._editor.getOption(82)){const s=[];for(const d of this._registry.all(l))Array.isArray(d.providedCodeActionKinds)&&s.push(...d.providedCodeActionKinds);this._supportedCodeActions.set(s.join(" ")),this._codeActionOracle.value=new r(this._editor,this._markerService,d=>{if(!d){this.setState(u.Empty);return}const n=(0,t.createCancelablePromise)(a=>(0,b.getCodeActions)(this._registry,l,d.selection,d.trigger,I.Progress.None,a));d.trigger.type===1&&this._progressService?.showWhile(n,250),this.setState(new u.Triggered(d.trigger,d.selection,d.position,n))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:S.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(l){this._codeActionOracle.value?.trigger(l)}setState(l,s){l!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=l,!s&&!yt(this,C,"f")&&this._onDidChangeState.fire(l))}}e.CodeActionModel=f,C=new WeakMap}),define(ae[816],le([1,0,10,79,368,196,29,2,14,309,236,1335,31,7,37,38,27,2178,480,1077,612]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionWidget=e.Context=void 0,e.Context={Visible:new u.RawContextKey("codeActionMenuVisible",!1,(0,C.localize)(0,null))};var s;(function(D){D.CodeAction="action",D.Header="header"})(s||(s={}));function d(D){return D.replace(/\r\n|\r|\n/g," ")}const n=Object.freeze({kind:S.CodeActionKind.Empty,title:(0,C.localize)(1,null)}),a=Object.freeze([{kind:S.CodeActionKind.QuickFix,title:(0,C.localize)(2,null)},{kind:S.CodeActionKind.RefactorExtract,title:(0,C.localize)(3,null),icon:{codicon:k.Codicon.wrench}},{kind:S.CodeActionKind.RefactorInline,title:(0,C.localize)(4,null),icon:{codicon:k.Codicon.wrench}},{kind:S.CodeActionKind.RefactorRewrite,title:(0,C.localize)(5,null),icon:{codicon:k.Codicon.wrench}},{kind:S.CodeActionKind.RefactorMove,title:(0,C.localize)(6,null),icon:{codicon:k.Codicon.wrench}},{kind:S.CodeActionKind.SurroundWith,title:(0,C.localize)(7,null),icon:{codicon:k.Codicon.symbolSnippet}},{kind:S.CodeActionKind.Source,title:(0,C.localize)(8,null),icon:{codicon:k.Codicon.symbolFile}},n]);let o=class{constructor(y,T){this.keybindingResolver=y,this.keybindingService=T}get templateId(){return s.CodeAction}renderTemplate(y){y.classList.add("code-action");const T=document.createElement("div");T.className="icon",y.append(T);const _=document.createElement("span");_.className="title",y.append(_);const L=new R.KeybindingLabel(y,I.OS);return{container:y,icon:T,text:_,keybinding:L}}renderElement(y,T,_){y.group.icon?(_.icon.className=y.group.icon.codicon.classNames,_.icon.style.color=y.group.icon.color??""):(_.icon.className=k.Codicon.lightBulb.classNames,_.icon.style.color="var(--vscode-editorLightBulb-foreground)"),_.text.textContent=d(y.action.action.title);const L=this.keybindingResolver.getResolver()(y.action.action);_.keybinding.set(L),L?t.show(_.keybinding.element):t.hide(_.keybinding.element),y.action.action.disabled?(_.container.title=y.action.action.disabled,_.container.classList.add("option-disabled")):(_.container.title=(0,C.localize)(9,null,this.keybindingService.lookupKeybinding(b.acceptSelectedCodeActionCommand)?.getLabel(),this.keybindingService.lookupKeybinding(b.previewSelectedCodeActionCommand)?.getLabel()),_.container.classList.remove("option-disabled"))}disposeTemplate(y){}};o=we([F(1,f.IKeybindingService)],o);class g{get templateId(){return s.Header}renderTemplate(y){y.classList.add("group-header");const T=document.createElement("span");return y.append(T),{container:y,text:T}}renderElement(y,T,_){_.text.textContent=y.group.title}disposeTemplate(y){}}const h="previewSelectedCodeAction";let v=class extends E.Disposable{constructor(y,T,_,L){super(),this.onDidSelect=_,this.codeActionLineHeight=24,this.headerLineHeight=26,this.domNode=document.createElement("div"),this.domNode.classList.add("codeActionList"),this.list=this._register(new A.List("codeActionWidget",this.domNode,{getHeight:M=>M.kind===s.Header?this.headerLineHeight:this.codeActionLineHeight,getTemplateId:M=>M.kind},[new o(new l.CodeActionKeybindingResolver(L),L),new g],{keyboardSupport:!1,accessibilityProvider:{getAriaLabel:M=>{if(M.kind===s.CodeAction){let O=d(M.action.action.title);return M.action.action.disabled&&(O=(0,C.localize)(10,null,O,M.action.action.disabled)),O}return null},getWidgetAriaLabel:()=>(0,C.localize)(11,null),getRole:()=>"option",getWidgetRole:()=>"code-action-widget"}})),this._register(this.list.onMouseClick(M=>this.onListClick(M))),this._register(this.list.onMouseOver(M=>this.onListHover(M))),this._register(this.list.onDidChangeFocus(()=>this.list.domFocus())),this._register(this.list.onDidChangeSelection(M=>this.onListSelection(M))),this.allMenuItems=this.toMenuItems(y,T),this.list.splice(0,this.list.length,this.allMenuItems),this.focusNext()}layout(y){const T=this.allMenuItems.filter(N=>N.kind===s.Header).length,L=this.allMenuItems.length*this.codeActionLineHeight+T*this.headerLineHeight-T*this.codeActionLineHeight;this.list.layout(L);const M=this.allMenuItems.map((N,P)=>{const B=document.getElementById(this.list.getElementID(P));if(B){B.style.width="auto";const V=B.getBoundingClientRect().width;return B.style.width="",V}return 0}),O=Math.max(...M,y);return this.list.layout(L,O),this.domNode.style.height=`${L}px`,this.list.domFocus(),O}focusPrevious(){this.list.focusPrevious(1,!0,void 0,y=>y.kind===s.CodeAction&&!y.action.action.disabled)}focusNext(){this.list.focusNext(1,!0,void 0,y=>y.kind===s.CodeAction&&!y.action.action.disabled)}acceptSelected(y){const T=this.list.getFocus();if(T.length===0)return;const _=T[0],L=this.list.element(_);if(L.kind!==s.CodeAction||L.action.action.disabled)return;const M=new UIEvent(y?.preview?h:"acceptSelectedCodeAction");this.list.setSelection([_],M)}onListSelection(y){if(!y.elements.length)return;const T=y.elements[0];T.kind===s.CodeAction&&!T.action.action.disabled?this.onDidSelect(T.action,{preview:y.browserEvent?.type===h}):this.list.setSelection([])}onListHover(y){this.list.setFocus(typeof y.index=="number"?[y.index]:[])}onListClick(y){y.element&&y.element.kind===s.CodeAction&&y.element.action.action.disabled&&this.list.setFocus([])}toMenuItems(y,T){if(!T)return y.map(M=>({kind:s.CodeAction,action:M,group:n}));const _=a.map(M=>({group:M,actions:[]}));for(const M of y){const O=M.action.kind?new S.CodeActionKind(M.action.kind):S.CodeActionKind.None;for(const N of _)if(N.group.kind.contains(O)){N.actions.push(M);break}}const L=[];for(const M of _)if(M.actions.length){L.push({kind:s.Header,group:M.group});for(const O of M.actions)L.push({kind:s.CodeAction,action:O,group:M.group})}return L}};v=we([F(3,f.IKeybindingService)],v);let m=!1,w=class Xo extends E.Disposable{static get INSTANCE(){return this._instance}static getOrCreateInstance(y){return this._instance||(this._instance=y.createInstance(Xo)),this._instance}constructor(y,T,_,L){super(),this._commandService=y,this._contextViewService=T,this._keybindingService=_,this._telemetryService=L,this.codeActionList=this._register(new E.MutableDisposable)}get isVisible(){return!!this.currentShowingContext}async show(y,T,_,L,M,O,N){this.currentShowingContext=void 0;const P=e.Context.Visible.bindTo(N),B=M.includeDisabledActions&&(m||T.validActions.length===0)?T.allActions:T.validActions;if(!B.length){P.reset();return}this.currentShowingContext={trigger:y,codeActions:T,anchor:_,container:L,delegate:O,options:M,contextKeyService:N},this._contextViewService.showContextView({getAnchor:()=>_,render:V=>(P.set(!0),this.renderWidget(V,y,T,M,B,O)),onHide:V=>(P.reset(),this.onWidgetClosed(y,M,T,V,O))},L,!1)}focusPrevious(){this.codeActionList.value?.focusPrevious()}focusNext(){this.codeActionList.value?.focusNext()}acceptSelected(y){this.codeActionList.value?.acceptSelected(y)}hide(){this.codeActionList.clear(),this._contextViewService.hideContextView()}renderWidget(y,T,_,L,M,O){const N=new E.DisposableStore,P=document.createElement("div");P.classList.add("codeActionWidget"),y.appendChild(P),this.codeActionList.value=new v(M,L.showHeaders??!0,($,q)=>{this.hide(),O.onSelectCodeAction($,T,q)},this._keybindingService),P.appendChild(this.codeActionList.value.domNode);const B=document.createElement("div"),V=y.appendChild(B);V.classList.add("context-view-block"),V.style.position="fixed",V.style.cursor="initial",V.style.left="0",V.style.top="0",V.style.width="100%",V.style.height="100%",V.style.zIndex="-1",N.add(t.addDisposableListener(V,t.EventType.MOUSE_DOWN,$=>$.stopPropagation()));const z=document.createElement("div"),x=y.appendChild(z);x.classList.add("context-view-pointerBlock"),x.style.position="fixed",x.style.cursor="initial",x.style.left="0",x.style.top="0",x.style.width="100%",x.style.height="100%",x.style.zIndex="2",N.add(t.addDisposableListener(x,t.EventType.POINTER_MOVE,()=>x.remove())),N.add(t.addDisposableListener(x,t.EventType.MOUSE_DOWN,()=>x.remove()));let H=0;if(!L.fromLightbulb){const $=this.createActionBar(_,L);$&&(P.appendChild($.getContainer().parentElement),N.add($),H=$.getContainer().offsetWidth)}const W=this.codeActionList.value.layout(H);P.style.width=`${W}px`;const U=N.add(t.trackFocus(y));return N.add(U.onDidBlur(()=>this.hide())),N}toggleShowDisabled(y){const T=this.currentShowingContext;this.hide(),m=y,T&&this.show(T.trigger,T.codeActions,T.anchor,T.container,T.options,T.delegate,T.contextKeyService)}onWidgetClosed(y,T,_,L,M){this._telemetryService.publicLog2("codeAction.applyCodeAction",{codeActionFrom:T.fromLightbulb?S.CodeActionTriggerSource.Lightbulb:y.triggerAction,validCodeActions:_.validActions.length,cancelled:L}),this.currentShowingContext=void 0,M.onHide(L)}createActionBar(y,T){const _=this.getActionBarActions(y,T);if(!_.length)return;const L=t.$(".codeActionWidget-action-bar"),M=new p.ActionBar(L);return M.push(_,{icon:!1,label:!0}),M}getActionBarActions(y,T){const _=y.documentation.map(L=>({id:L.id,label:L.title,tooltip:L.tooltip??"",class:void 0,enabled:!0,run:()=>this._commandService.executeCommand(L.id,...L.arguments??[])}));return T.includeDisabledActions&&y.validActions.length>0&&y.allActions.length!==y.validActions.length&&_.push(m?{id:"hideMoreCodeActions",label:(0,C.localize)(12,null),enabled:!0,tooltip:"",class:void 0,run:()=>this.toggleShowDisabled(!1)}:{id:"showMoreCodeActions",label:(0,C.localize)(13,null),enabled:!0,tooltip:"",class:void 0,run:()=>this.toggleShowDisabled(!0)}),_}};w=we([F(0,r.ICommandService),F(1,i.IContextViewService),F(2,f.IKeybindingService),F(3,c.ITelemetryService)],w),e.CodeActionWidget=w}),define(ae[2180],le([1,0,181,10,11,358,2,160,72,503,145,20,85,61,266,207,1342,93,8,66]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=void 0;const n="application/vnd.code.copyMetadata";let a=class Qo extends k.Disposable{static get(h){return h.getContribution(Qo.ID)}constructor(h,v,m,w,D,y){super(),this._bulkEditService=v,this._clipboardService=m,this._configurationService=w,this._languageFeaturesService=D,this._progressService=y,this._editor=h;const T=h.getContainerDomNode();this._register((0,p.addDisposableListener)(T,"copy",_=>this.handleCopy(_))),this._register((0,p.addDisposableListener)(T,"cut",_=>this.handleCopy(_))),this._register((0,p.addDisposableListener)(T,"paste",_=>this.handlePaste(_),!0))}arePasteActionsEnabled(h){return this._configurationService.getValue("editor.experimental.pasteActions.enabled",{resource:h.uri})}handleCopy(h){if(!h.clipboardData||!this._editor.hasTextFocus())return;const v=this._editor.getModel(),m=this._editor.getSelections();if(!v||!m?.length||!this.arePasteActionsEnabled(v))return;const w=[...m],D=m[0],y=D.isEmpty();if(y){if(!this._editor.getOption(33))return;w[0]=new C.Range(D.startLineNumber,0,D.startLineNumber,v.getLineLength(D.startLineNumber))}const T=this._languageFeaturesService.documentPasteEditProvider.ordered(v).filter(O=>!!O.prepareDocumentPaste);if(!T.length){this.setCopyMetadata(h.clipboardData,{wasFromEmptySelection:y});return}const _=(0,b.toVSDataTransfer)(h.clipboardData),L=(0,I.generateUuid)();this.setCopyMetadata(h.clipboardData,{id:L,wasFromEmptySelection:y});const M=(0,R.createCancelablePromise)(async O=>{const N=await Promise.all(T.map(P=>P.prepareDocumentPaste(v,w,_,O)));for(const P of N)P?.forEach((B,V)=>{_.replace(V,B)});return _});this._currentClipboardItem?.dataTransferPromise.cancel(),this._currentClipboardItem={handle:L,dataTransferPromise:M}}setCopyMetadata(h,v){h.setData(n,JSON.stringify(v))}async handlePaste(h){if(!h.clipboardData||!this._editor.hasTextFocus())return;const v=this._editor.getSelections();if(!v?.length||!this._editor.hasModel())return;const m=this._editor.getModel();if(!this.arePasteActionsEnabled(m))return;let w;const D=h.clipboardData?.getData(n);D&&typeof D=="string"&&(w=JSON.parse(D));const y=this._languageFeaturesService.documentPasteEditProvider.ordered(m);if(!y.length)return;h.preventDefault(),h.stopImmediatePropagation();const T=new i.EditorStateCancellationTokenSource(this._editor,3);try{const _=(0,b.toVSDataTransfer)(h.clipboardData);if(w?.id&&this._currentClipboardItem?.handle===w.id){const M=await this._currentClipboardItem.dataTransferPromise;if(T.token.isCancellationRequested)return;M.forEach((O,N)=>{_.replace(N,O)})}if(!_.has(E.Mimes.uriList)){const M=await this._clipboardService.readResources();if(T.token.isCancellationRequested)return;M.length&&_.append(E.Mimes.uriList,(0,A.createStringDataTransferItem)(b.UriList.create(M)))}_.delete(n);const L=await this._progressService.withProgress({location:15,delay:750,title:(0,c.localize)(0,null),cancellable:!0},()=>this.getProviderPasteEdit(y,_,m,v,T.token),()=>T.cancel());if(T.token.isCancellationRequested)return;if(L){const M=typeof L.insertText=="string"?f.SnippetParser.escape(L.insertText):L.insertText.snippet,O={edits:[new S.ResourceTextEdit(m.uri,{range:r.Selection.liftSelection(this._editor.getSelection()),text:M,insertAsSnippet:!0}),...L.additionalEdit?.edits??[]]};await this._bulkEditService.apply(O,{editor:this._editor});return}await this.applyDefaultPasteHandler(_,w,T.token)}finally{T.dispose()}}getProviderPasteEdit(h,v,m,w,D){return(0,R.raceCancellation)((async()=>{for(const y of h){if(D.isCancellationRequested)return;if(!o(y,v))continue;const T=await y.provideDocumentPasteEdits(m,w,v,D);if(T)return T}})(),D)}async applyDefaultPasteHandler(h,v,m){const w=h.get(E.Mimes.text)??h.get("text");if(!w)return;const D=await w.asString();m.isCancellationRequested||this._editor.trigger("keyboard","paste",{text:D,pasteOnNewLine:v?.wasFromEmptySelection,multicursorText:null})}};a.ID="editor.contrib.copyPasteActionController",a=we([F(1,S.IBulkEditService),F(2,l.IClipboardService),F(3,s.IConfigurationService),F(4,u.ILanguageFeaturesService),F(5,d.IProgressService)],a),e.CopyPasteController=a;function o(g,h){return g.pasteMimeTypes.some(v=>v.toLowerCase()===t.DataTransfers.FILES.toLowerCase()?[...h.values()].some(m=>m.asFile()):h.has(v))}}),define(ae[2181],le([1,0,40,331,2180,1341,55,17]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(R.CopyPasteController.ID,R.CopyPasteController),E.Registry.as(k.Extensions.Configuration).registerConfiguration({...p.editorConfigurationBaseNode,properties:{"editor.experimental.pasteActions.enabled":{type:"boolean",scope:5,description:A.localize(0,null),default:!1}}})}),define(ae[2182],le([1,0,40,491,1350]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class A extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:R.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(b,S){p.EditorZoom.setZoomLevel(p.EditorZoom.getZoomLevel()+1)}}class k extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:R.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(b,S){p.EditorZoom.setZoomLevel(p.EditorZoom.getZoomLevel()-1)}}class E extends t.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:R.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(b,S){p.EditorZoom.setZoomLevel(0)}}(0,t.registerEditorAction)(A),(0,t.registerEditorAction)(k),(0,t.registerEditorAction)(E)}),define(ae[431],le([1,0,110,16,32,21,88,158,13,9,266,105,50,20,85,212,62,739,1351,31,115,5,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"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 g(O){if(O=O.filter(V=>V.range),!O.length)return;let{range:N}=O[0];for(let V=1;V<O.length;V++)N=u.Range.plusRange(N,O[V].range);const{startLineNumber:P,endLineNumber:B}=N;P===B?O.length===1?(0,t.alert)(s.localize(0,null,P)):(0,t.alert)(s.localize(1,null,O.length,P)):O.length===1?(0,t.alert)(s.localize(2,null,P,B)):(0,t.alert)(s.localize(3,null,O.length,P,B))}e.alertFormattingEdits=g;function h(O,N,P){const B=[],V=new Set,z=O.ordered(P);for(const H of z)B.push(H),H.extensionId&&V.add(n.ExtensionIdentifier.toKey(H.extensionId));const x=N.ordered(P);for(const H of x){if(H.extensionId){if(V.has(n.ExtensionIdentifier.toKey(H.extensionId)))continue;V.add(n.ExtensionIdentifier.toKey(H.extensionId))}B.push({displayName:H.displayName,extensionId:H.extensionId,provideDocumentFormattingEdits(W,U,$){return H.provideDocumentRangeFormattingEdits(W,W.getFullModelRange(),U,$)}})}return B}e.getRealAndSyntheticDocumentFormattersOrdered=h;var v;(function(O){O[O.Explicit=1]="Explicit",O[O.Silent=2]="Silent"})(v=e.FormattingMode||(e.FormattingMode={}));class m{static setFormatterSelector(N){return{dispose:m._selectors.unshift(N)}}static async select(N,P,B){if(N.length===0)return;const V=k.Iterable.first(m._selectors);if(V)return await V(N,P,B)}}e.FormattingConflicts=m,m._selectors=new E.LinkedList;async function w(O,N,P,B,V,z){const x=O.get(a.IInstantiationService),{documentRangeFormattingEditProvider:H}=O.get(o.ILanguageFeaturesService),W=(0,C.isCodeEditor)(N)?N.getModel():N,U=H.ordered(W),$=await m.select(U,W,B);$&&(V.report($),await x.invokeFunction(D,$,N,P,z))}e.formatDocumentRangesWithSelectedProvider=w;async function D(O,N,P,B,V){const z=O.get(f.IEditorWorkerService);let x,H;(0,C.isCodeEditor)(P)?(x=P.getModel(),H=new S.EditorStateCancellationTokenSource(P,5,void 0,V)):(x=P,H=new S.TextModelCancellationTokenSource(P,V));const W=[];let U=0;for(const Q of(0,p.asArray)(B).sort(u.Range.compareRangesUsingStarts))U>0&&u.Range.areIntersectingOrTouching(W[U-1],Q)?W[U-1]=u.Range.fromPositions(W[U-1].getStartPosition(),Q.getEndPosition()):U=W.push(Q);const $=async Q=>await N.provideDocumentRangeFormattingEdits(x,Q,x.getFormattingOptions(),H.token)||[],q=(Q,j)=>{if(!Q.length||!j.length)return!1;const K=Q.reduce((Y,ee)=>u.Range.plusRange(Y,ee.range),Q[0].range);if(!j.some(Y=>u.Range.intersectRanges(K,Y.range)))return!1;for(const Y of Q)for(const ee of j)if(u.Range.intersectRanges(Y.range,ee.range))return!0;return!1},X=[],G=[];try{for(const Q of W){if(H.token.isCancellationRequested)return!0;G.push(await $(Q))}for(let Q=0;Q<W.length;++Q)for(let j=Q+1;j<W.length;++j){if(H.token.isCancellationRequested)return!0;if(q(G[Q],G[j])){const K=u.Range.plusRange(W[Q],W[j]),Y=await $(K);W.splice(j,1),W.splice(Q,1),W.push(K),G.splice(j,1),G.splice(Q,1),G.push(Y),Q=0,j=0}}for(const Q of G){if(H.token.isCancellationRequested)return!0;const j=await z.computeMoreMinimalEdits(x.uri,Q);j&&X.push(...j)}}finally{H.dispose()}if(X.length===0)return!1;if((0,C.isCodeEditor)(P))l.FormattingEdit.execute(P,X,!0),g(X),P.revealPositionInCenterIfOutsideViewport(P.getPosition(),1);else{const[{range:Q}]=X,j=new i.Selection(Q.startLineNumber,Q.startColumn,Q.endLineNumber,Q.endColumn);x.pushEditOperations([j],X.map(K=>({text:K.text,range:u.Range.lift(K.range),forceMoveMarkers:!0})),K=>{for(const{range:Y}of K)if(u.Range.areIntersectingOrTouching(Y,j))return[new i.Selection(Y.startLineNumber,Y.startColumn,Y.endLineNumber,Y.endColumn)];return null})}return!0}e.formatDocumentRangesWithProvider=D;async function y(O,N,P,B,V){const z=O.get(a.IInstantiationService),x=O.get(o.ILanguageFeaturesService),H=(0,C.isCodeEditor)(N)?N.getModel():N,W=h(x.documentFormattingEditProvider,x.documentRangeFormattingEditProvider,H),U=await m.select(W,H,P);U&&(B.report(U),await z.invokeFunction(T,U,N,P,V))}e.formatDocumentWithSelectedProvider=y;async function T(O,N,P,B,V){const z=O.get(f.IEditorWorkerService);let x,H;(0,C.isCodeEditor)(P)?(x=P.getModel(),H=new S.EditorStateCancellationTokenSource(P,5,void 0,V)):(x=P,H=new S.TextModelCancellationTokenSource(P,V));let W;try{const U=await N.provideDocumentFormattingEdits(x,x.getFormattingOptions(),H.token);if(W=await z.computeMoreMinimalEdits(x.uri,U),H.token.isCancellationRequested)return!0}finally{H.dispose()}if(!W||W.length===0)return!1;if((0,C.isCodeEditor)(P))l.FormattingEdit.execute(P,W,B!==2),B!==2&&(g(W),P.revealPositionInCenterIfOutsideViewport(P.getPosition(),1));else{const[{range:U}]=W,$=new i.Selection(U.startLineNumber,U.startColumn,U.endLineNumber,U.endColumn);x.pushEditOperations([$],W.map(q=>({text:q.text,range:u.Range.lift(q.range),forceMoveMarkers:!0})),q=>{for(const{range:X}of q)if(u.Range.areIntersectingOrTouching(X,$))return[new i.Selection(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn)];return null})}return!0}e.formatDocumentWithProvider=T;async function _(O,N,P,B,V,z){const x=N.documentRangeFormattingEditProvider.ordered(P);for(const H of x){const W=await Promise.resolve(H.provideDocumentRangeFormattingEdits(P,B,V,z)).catch(A.onUnexpectedExternalError);if((0,p.isNonEmptyArray)(W))return await O.computeMoreMinimalEdits(P.uri,W)}}e.getDocumentRangeFormattingEditsUntilResult=_;async function L(O,N,P,B,V){const z=h(N.documentFormattingEditProvider,N.documentRangeFormattingEditProvider,P);for(const x of z){const H=await Promise.resolve(x.provideDocumentFormattingEdits(P,B,V)).catch(A.onUnexpectedExternalError);if((0,p.isNonEmptyArray)(H))return await O.computeMoreMinimalEdits(P.uri,H)}}e.getDocumentFormattingEditsUntilResult=L;function M(O,N,P,B,V,z,x){const H=N.onTypeFormattingEditProvider.ordered(P);return H.length===0||H[0].autoFormatTriggerCharacters.indexOf(V)<0?Promise.resolve(void 0):Promise.resolve(H[0].provideOnTypeFormattingEdits(P,B,V,z,x)).catch(A.onUnexpectedExternalError).then(W=>O.computeMoreMinimalEdits(P.uri,W))}e.getOnTypeFormattingEdits=M,d.CommandsRegistry.registerCommand("_executeFormatRangeProvider",async function(O,...N){const[P,B,V]=N;(0,I.assertType)(b.URI.isUri(P)),(0,I.assertType)(u.Range.isIRange(B));const z=O.get(c.ITextModelService),x=O.get(f.IEditorWorkerService),H=O.get(o.ILanguageFeaturesService),W=await z.createModelReference(P);try{return _(x,H,W.object.textEditorModel,u.Range.lift(B),V,R.CancellationToken.None)}finally{W.dispose()}}),d.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",async function(O,...N){const[P,B]=N;(0,I.assertType)(b.URI.isUri(P));const V=O.get(c.ITextModelService),z=O.get(f.IEditorWorkerService),x=O.get(o.ILanguageFeaturesService),H=await V.createModelReference(P);try{return L(z,x,H.object.textEditorModel,B,R.CancellationToken.None)}finally{H.dispose()}}),d.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",async function(O,...N){const[P,B,V,z]=N;(0,I.assertType)(b.URI.isUri(P)),(0,I.assertType)(r.Position.isIPosition(B)),(0,I.assertType)(typeof V=="string");const x=O.get(c.ITextModelService),H=O.get(f.IEditorWorkerService),W=O.get(o.ILanguageFeaturesService),U=await x.createModelReference(P);try{return M(H,W,U.object.textEditorModel,r.Position.lift(B),V,z,R.CancellationToken.None)}finally{U.dispose()}})}),define(ae[2183],le([1,0,16,32,21,99,2,40,75,359,20,59,212,61,431,739,1352,31,7,5,66]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let a=class{constructor(m,w,D){this._editor=m,this._languageFeaturesService=w,this._workerService=D,this._disposables=new k.DisposableStore,this._sessionDisposables=new k.DisposableStore,this._disposables.add(w.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(50)&&this._update()}))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(50)||!this._editor.hasModel())return;const m=this._editor.getModel(),[w]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(m);if(!w||!w.autoFormatTriggerCharacters)return;const D=new b.CharacterSet;for(const y of w.autoFormatTriggerCharacters)D.add(y.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(y=>{const T=y.charCodeAt(y.length-1);D.has(T)&&this._trigger(String.fromCharCode(T))}))}_trigger(m){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const w=this._editor.getModel(),D=this._editor.getPosition(),y=new p.CancellationTokenSource,T=this._editor.onDidChangeModelContent(_=>{if(_.isFlush){y.cancel(),T.dispose();return}for(let L=0,M=_.changes.length;L<M;L++)if(_.changes[L].range.endLineNumber<=D.lineNumber){y.cancel(),T.dispose();return}});(0,i.getOnTypeFormattingEdits)(this._workerService,this._languageFeaturesService,w,D,m,w.getFormattingOptions(),y.token).then(_=>{y.token.isCancellationRequested||(0,t.isNonEmptyArray)(_)&&(f.FormattingEdit.execute(this._editor,_,!0),(0,i.alertFormattingEdits)(_))}).finally(()=>{T.dispose()})}};a.ID="editor.contrib.autoFormat",a=we([F(1,u.ILanguageFeaturesService),F(2,r.IEditorWorkerService)],a);let o=class{constructor(m,w,D){this.editor=m,this._languageFeaturesService=w,this._instantiationService=D,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(w.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(49)&&(!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,n.Progress.None,p.CancellationToken.None).catch(R.onUnexpectedError)}};o.ID="editor.contrib.formatOnPaste",o=we([F(1,u.ILanguageFeaturesService),F(2,d.IInstantiationService)],o);class g extends E.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:c.localize(0,null),alias:"Format Document",precondition:s.ContextKeyExpr.and(C.EditorContextKeys.notInCompositeEditor,C.EditorContextKeys.writable,C.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}async run(m,w){if(w.hasModel()){const D=m.get(d.IInstantiationService);await m.get(n.IEditorProgressService).showWhile(D.invokeFunction(i.formatDocumentWithSelectedProvider,w,1,n.Progress.None,p.CancellationToken.None),250)}}}class h extends E.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:c.localize(1,null),alias:"Format Selection",precondition:s.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:C.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}async run(m,w){if(!w.hasModel())return;const D=m.get(d.IInstantiationService),y=w.getModel(),T=w.getSelections().map(L=>L.isEmpty()?new S.Range(L.startLineNumber,1,L.startLineNumber,y.getLineMaxColumn(L.startLineNumber)):L);await m.get(n.IEditorProgressService).showWhile(D.invokeFunction(i.formatDocumentRangesWithSelectedProvider,w,T,1,n.Progress.None,p.CancellationToken.None),250)}}(0,E.registerEditorContribution)(a.ID,a),(0,E.registerEditorContribution)(o.ID,o),(0,E.registerEditorAction)(g),(0,E.registerEditorAction)(h),l.CommandsRegistry.registerCommand("editor.action.format",async v=>{const m=v.get(I.ICodeEditorService).getFocusedCodeEditor();if(!m||!m.hasModel())return;const w=v.get(l.ICommandService);m.getSelection().isEmpty()?await w.executeCommand("editor.action.formatDocument"):await w.executeCommand("editor.action.formatSelection")})}),define(ae[613],le([1,0,16,32,21,40,61,425]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;async function I(f,c,l,s){const n=l.ordered(f).map(o=>Promise.resolve(s(o,f,c)).then(void 0,g=>{(0,R.onUnexpectedExternalError)(g)})),a=await Promise.all(n);return(0,t.coalesce)(a.flat())}function b(f,c,l,s){return I(c,l,f,(d,n,a)=>d.provideDefinition(n,a,s))}e.getDefinitionsAtPosition=b;function S(f,c,l,s){return I(c,l,f,(d,n,a)=>d.provideDeclaration(n,a,s))}e.getDeclarationsAtPosition=S;function C(f,c,l,s){return I(c,l,f,(d,n,a)=>d.provideImplementation(n,a,s))}e.getImplementationsAtPosition=C;function r(f,c,l,s){return I(c,l,f,(d,n,a)=>d.provideTypeDefinition(n,a,s))}e.getTypeDefinitionsAtPosition=r;function u(f,c,l,s,d){return I(c,l,f,async(n,a,o)=>{const g=await n.provideReferences(a,o,{includeDeclaration:!0},d);if(!s||!g||g.length!==2)return g;const h=await n.provideReferences(a,o,{includeDeclaration:!1},d);return h&&h.length===1?h:g})}e.getReferencesAtPosition=u;async function i(f){const c=await f(),l=new E.ReferencesModel(c,""),s=l.references.map(d=>d.link);return l.dispose(),s}(0,A.registerModelAndPositionCommand)("_executeDefinitionProvider",(f,c,l)=>{const s=f.get(k.ILanguageFeaturesService),d=b(s.definitionProvider,c,l,p.CancellationToken.None);return i(()=>d)}),(0,A.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(f,c,l)=>{const s=f.get(k.ILanguageFeaturesService),d=r(s.typeDefinitionProvider,c,l,p.CancellationToken.None);return i(()=>d)}),(0,A.registerModelAndPositionCommand)("_executeDeclarationProvider",(f,c,l)=>{const s=f.get(k.ILanguageFeaturesService),d=S(s.declarationProvider,c,l,p.CancellationToken.None);return i(()=>d)}),(0,A.registerModelAndPositionCommand)("_executeReferenceProvider",(f,c,l)=>{const s=f.get(k.ILanguageFeaturesService),d=u(s.referenceProvider,c,l,!1,p.CancellationToken.None);return i(()=>d)}),(0,A.registerModelAndPositionCommand)("_executeImplementationProvider",(f,c,l)=>{const s=f.get(k.ILanguageFeaturesService),d=C(s.implementationProvider,c,l,p.CancellationToken.None);return i(()=>d)})}),define(ae[2184],le([1,0,6,2,18,40,75,20,1361,7,35,5,38,98,26]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new b.RawContextKey("hasSymbols",!1,(0,I.localize)(0,null)),e.ISymbolNavigationService=(0,C.createDecorator)("ISymbolNavigationService");let f=class{constructor(s,d,n,a){this._editorService=d,this._notificationService=n,this._keybindingService=a,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(s)}reset(){this._ctxHasSymbols.reset(),this._currentState?.dispose(),this._currentMessage?.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(s){const d=s.parent.parent;if(d.references.length<=1){this.reset();return}this._currentModel=d,this._currentIdx=d.references.indexOf(s),this._ctxHasSymbols.set(!0),this._showMessage();const n=new c(this._editorService),a=n.onDidChange(o=>{if(this._ignoreEditorChange)return;const g=this._editorService.getActiveCodeEditor();if(!g)return;const h=g.getModel(),v=g.getPosition();if(!h||!v)return;let m=!1,w=!1;for(const D of d.references)if((0,R.isEqual)(D.uri,h.uri))m=!0,w=w||E.Range.containsPosition(D.range,v);else if(m)break;(!m||!w)&&this.reset()});this._currentState=(0,p.combinedDisposable)(n,a)}revealNext(s){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const d=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:d.uri,options:{selection:E.Range.collapseToStart(d.range),selectionRevealType:3}},s).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){this._currentMessage?.dispose();const s=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),d=s?(0,I.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,s.getLabel()):(0,I.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(d)}};f=we([F(0,b.IContextKeyService),F(1,k.ICodeEditorService),F(2,i.INotificationService),F(3,r.IKeybindingService)],f),(0,S.registerSingleton)(e.ISymbolNavigationService,f,1),(0,A.registerEditorCommand)(new class extends A.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(l,s){return l.get(e.ISymbolNavigationService).revealNext(s)}}),u.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(l){l.get(e.ISymbolNavigationService).reset()}});let c=class{constructor(s){this._listener=new Map,this._disposables=new p.DisposableStore,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(s.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(s.onCodeEditorAdd(this._onDidAddEditor,this)),s.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,p.dispose)(this._listener.values())}_onDidAddEditor(s){this._listener.set(s,(0,p.combinedDisposable)(s.onDidChangeCursorPosition(d=>this._onDidChange.fire({editor:s})),s.onDidChangeModelContent(d=>this._onDidChange.fire({editor:s}))))}_onDidRemoveEditor(s){this._listener.get(s)?.dispose(),this._listener.delete(s)}};c=we([F(0,k.ICodeEditorService)],c)}),define(ae[817],le([1,0,11,32,21,40,61]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class E{constructor(u,i,f){this.provider=u,this.hover=i,this.ordinal=f}}e.HoverProviderResult=E;async function I(r,u,i,f,c){try{const l=await Promise.resolve(r.provideHover(i,f,c));if(l&&C(l))return new E(r,l,u)}catch(l){(0,R.onUnexpectedExternalError)(l)}}function b(r,u,i,f){const l=r.ordered(u).map((s,d)=>I(s,d,u,i,f));return t.AsyncIterableObject.fromPromises(l).coalesce()}e.getHover=b;function S(r,u,i,f){return b(r,u,i,f).map(c=>c.hover).toPromise()}e.getHoverPromise=S,(0,A.registerModelAndPositionCommand)("_executeHoverProvider",(r,u,i)=>{const f=r.get(k.ILanguageFeaturesService);return S(f.hoverProvider,u,i,p.CancellationToken.None)});function C(r){const u=typeof r.range<"u",i=typeof r.contents<"u"&&r.contents&&r.contents.length>0;return u&&i}}),define(ae[614],le([1,0,10,16,11,113,2,184,50,20,42,817,1363,8,41,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const c=t.$;class l{constructor(a,o,g,h,v){this.owner=a,this.range=o,this.contents=g,this.isBeforeContent=h,this.ordinal=v}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}}e.MarkdownHover=l;let s=class{constructor(a,o,g,h,v){this._editor=a,this._languageService=o,this._openerService=g,this._configurationService=h,this._languageFeaturesService=v,this.hoverOrdinal=2}createLoadingMessage(a){return new l(this,a.range,[new A.MarkdownString().appendText(r.localize(0,null))],!1,2e3)}computeSync(a,o){if(!this._editor.hasModel()||a.type!==1)return[];const g=this._editor.getModel(),h=a.range.startLineNumber,v=g.getLineMaxColumn(h),m=[];let w=1e3;const D=g.getLineLength(h),y=g.getLanguageIdAtPosition(a.range.startLineNumber,a.range.startColumn),T=this._editor.getOption(107),_=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:y});let L=!1;T>=0&&D>T&&a.range.startColumn>=T&&(L=!0,m.push(new l(this,a.range,[{value:r.localize(1,null)}],!1,w++))),!L&&typeof _=="number"&&D>=_&&m.push(new l(this,a.range,[{value:r.localize(2,null)}],!1,w++));let M=!1;for(const O of o){const N=O.range.startLineNumber===h?O.range.startColumn:1,P=O.range.endLineNumber===h?O.range.endColumn:v,B=O.options.hoverMessage;if(!B||(0,A.isEmptyMarkdownString)(B))continue;O.options.beforeContentClassName&&(M=!0);const V=new b.Range(a.range.startLineNumber,N,a.range.startLineNumber,P);m.push(new l(this,V,(0,p.asArray)(B),M,w++))}return m}computeAsync(a,o,g){if(!this._editor.hasModel()||a.type!==1)return R.AsyncIterableObject.EMPTY;const h=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(h))return R.AsyncIterableObject.EMPTY;const v=new I.Position(a.range.startLineNumber,a.range.startColumn);return(0,C.getHover)(this._languageFeaturesService.hoverProvider,h,v,g).filter(m=>!(0,A.isEmptyMarkdownString)(m.hover.contents)).map(m=>{const w=m.hover.range?b.Range.lift(m.hover.range):a.range;return new l(this,w,m.hover.contents,!1,m.ordinal)})}renderHoverParts(a,o){return d(a,o,this._editor,this._languageService,this._openerService)}};s=we([F(1,S.ILanguageService),F(2,i.IOpenerService),F(3,u.IConfigurationService),F(4,f.ILanguageFeaturesService)],s),e.MarkdownHoverParticipant=s;function d(n,a,o,g,h){a.sort((m,w)=>m.ordinal-w.ordinal);const v=new k.DisposableStore;for(const m of a)for(const w of m.contents){if((0,A.isEmptyMarkdownString)(w))continue;const D=c("div.hover-row.markdown-hover"),y=t.append(D,c("div.hover-contents")),T=v.add(new E.MarkdownRenderer({editor:o},g,h));v.add(T.onDidRenderAsync(()=>{y.className="hover-contents code-hover-contents",n.onContentsChanged()}));const _=v.add(T.render(w));y.appendChild(_.element),n.fragment.appendChild(D)}return v}e.renderMarkdownHovers=d}),define(ae[818],le([1,0,2,28,40,607,138,20,85,59,122,54,740,1366,48,585,605]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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 l(_,L,M,O,N){if(_.getLineCount()===1&&_.getLineMaxColumn(1)===1)return[];const P=L.getLanguageConfiguration(_.getLanguageId()).indentationRules;if(!P)return[];for(O=Math.min(O,_.getLineCount());M<=O&&P.unIndentedLinePattern;){const G=_.getLineContent(M);if(!P.unIndentedLinePattern.test(G))break;M++}if(M>O-1)return[];const{tabSize:B,indentSize:V,insertSpaces:z}=_.getOptions(),x=(G,Q)=>(Q=Q||1,A.ShiftCommand.shiftIndent(G,G.length+Q,B,V,z)),H=(G,Q)=>(Q=Q||1,A.ShiftCommand.unshiftIndent(G,G.length+Q,B,V,z)),W=[];let U;const $=_.getLineContent(M);let q=$;if(N!=null){U=N;const G=p.getLeadingWhitespace($);q=U+$.substring(G.length),P.decreaseIndentPattern&&P.decreaseIndentPattern.test(q)&&(U=H(U),q=U+$.substring(G.length)),$!==q&&W.push(k.EditOperation.replaceMove(new I.Selection(M,1,M,G.length+1),(0,f.normalizeIndentation)(U,V,z)))}else U=p.getLeadingWhitespace($);let X=U;P.increaseIndentPattern&&P.increaseIndentPattern.test(q)?(X=x(X),U=x(U)):P.indentNextLinePattern&&P.indentNextLinePattern.test(q)&&(X=x(X)),M++;for(let G=M;G<=O;G++){const Q=_.getLineContent(G),j=p.getLeadingWhitespace(Q),K=X+Q.substring(j.length);P.decreaseIndentPattern&&P.decreaseIndentPattern.test(K)&&(X=H(X),U=H(U)),j!==X&&W.push(k.EditOperation.replaceMove(new I.Selection(G,1,G,j.length+1),(0,f.normalizeIndentation)(X,V,z))),!(P.unIndentedLinePattern&&P.unIndentedLinePattern.test(Q))&&(P.increaseIndentPattern&&P.increaseIndentPattern.test(K)?(U=x(U),X=U):P.indentNextLinePattern&&P.indentNextLinePattern.test(K)?X=x(X):X=U)}return W}e.getReindentEditOperations=l;class s extends R.EditorAction{constructor(){super({id:s.ID,label:u.localize(0,null),alias:"Convert Indentation to Spaces",precondition:b.EditorContextKeys.writable})}run(L,M){const O=M.getModel();if(!O)return;const N=O.getOptions(),P=M.getSelection();if(!P)return;const B=new y(P,N.tabSize);M.pushUndoStop(),M.executeCommands(this.id,[B]),M.pushUndoStop(),O.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=s,s.ID="editor.action.indentationToSpaces";class d extends R.EditorAction{constructor(){super({id:d.ID,label:u.localize(1,null),alias:"Convert Indentation to Tabs",precondition:b.EditorContextKeys.writable})}run(L,M){const O=M.getModel();if(!O)return;const N=O.getOptions(),P=M.getSelection();if(!P)return;const B=new T(P,N.tabSize);M.pushUndoStop(),M.executeCommands(this.id,[B]),M.pushUndoStop(),O.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=d,d.ID="editor.action.indentationToTabs";class n extends R.EditorAction{constructor(L,M){super(M),this.insertSpaces=L}run(L,M){const O=L.get(i.IQuickInputService),N=L.get(C.IModelService),P=M.getModel();if(!P)return;const B=N.getCreationOptions(P.getLanguageId(),P.uri,P.isForSimpleWidget),V=[1,2,3,4,5,6,7,8].map(x=>({id:x.toString(),label:x.toString(),description:x===B.tabSize?u.localize(2,null):void 0})),z=Math.min(P.getOptions().tabSize-1,7);setTimeout(()=>{O.pick(V,{placeHolder:u.localize(3,null),activeItem:V[z]}).then(x=>{x&&P&&!P.isDisposed()&&P.updateOptions({tabSize:parseInt(x.label,10),insertSpaces:this.insertSpaces})})},50)}}e.ChangeIndentationSizeAction=n;class a extends n{constructor(){super(!1,{id:a.ID,label:u.localize(4,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=a,a.ID="editor.action.indentUsingTabs";class o extends n{constructor(){super(!0,{id:o.ID,label:u.localize(5,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=o,o.ID="editor.action.indentUsingSpaces";class g extends R.EditorAction{constructor(){super({id:g.ID,label:u.localize(6,null),alias:"Detect Indentation from Content",precondition:void 0})}run(L,M){const O=L.get(C.IModelService),N=M.getModel();if(!N)return;const P=O.getCreationOptions(N.getLanguageId(),N.uri,N.isForSimpleWidget);N.detectIndentation(P.insertSpaces,P.tabSize)}}e.DetectIndentation=g,g.ID="editor.action.detectIndentation";class h extends R.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:u.localize(7,null),alias:"Reindent Lines",precondition:b.EditorContextKeys.writable})}run(L,M){const O=L.get(S.ILanguageConfigurationService),N=M.getModel();if(!N)return;const P=l(N,O,1,N.getLineCount());P.length>0&&(M.pushUndoStop(),M.executeEdits(this.id,P),M.pushUndoStop())}}e.ReindentLinesAction=h;class v extends R.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:u.localize(8,null),alias:"Reindent Selected Lines",precondition:b.EditorContextKeys.writable})}run(L,M){const O=L.get(S.ILanguageConfigurationService),N=M.getModel();if(!N)return;const P=M.getSelections();if(P===null)return;const B=[];for(const V of P){let z=V.startLineNumber,x=V.endLineNumber;if(z!==x&&V.endColumn===1&&x--,z===1){if(z===x)continue}else z--;const H=l(N,O,z,x);B.push(...H)}B.length>0&&(M.pushUndoStop(),M.executeEdits(this.id,B),M.pushUndoStop())}}e.ReindentSelectedLinesAction=v;class m{constructor(L,M){this._initialSelection=M,this._edits=[],this._selectionId=null;for(const O of L)O.range&&typeof O.text=="string"&&this._edits.push(O)}getEditOperations(L,M){for(const N of this._edits)M.addEditOperation(E.Range.lift(N.range),N.text);let O=!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?(O=!0,this._selectionId=M.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(O=!0,this._selectionId=M.trackSelection(this._initialSelection,!1))),O||(this._selectionId=M.trackSelection(this._initialSelection))}computeCursorState(L,M){return M.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=m;let w=class{constructor(L,M){this.editor=L,this._languageConfigurationService=M,this.callOnDispose=new t.DisposableStore,this.callOnModel=new t.DisposableStore,this.callOnDispose.add(L.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(L.onDidChangeModel(()=>this.update())),this.callOnDispose.add(L.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(9)<4||this.editor.getOption(49))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:L})=>{this.trigger(L)})))}trigger(L){const M=this.editor.getSelections();if(M===null||M.length>1)return;const O=this.editor.getModel();if(!O||!O.tokenization.isCheapToTokenize(L.getStartPosition().lineNumber))return;const N=this.editor.getOption(9),{tabSize:P,indentSize:B,insertSpaces:V}=O.getOptions(),z=[],x={shiftIndent:$=>A.ShiftCommand.shiftIndent($,$.length+1,P,B,V),unshiftIndent:$=>A.ShiftCommand.unshiftIndent($,$.length+1,P,B,V)};let H=L.startLineNumber;for(;H<=L.endLineNumber;){if(this.shouldIgnoreLine(O,H)){H++;continue}break}if(H>L.endLineNumber)return;let W=O.getLineContent(H);if(!/\S/.test(W.substring(0,L.startColumn-1))){const $=(0,c.getGoodIndentForLine)(N,O,O.getLanguageId(),H,x,this._languageConfigurationService);if($!==null){const q=p.getLeadingWhitespace(W),X=r.getSpaceCnt($,P),G=r.getSpaceCnt(q,P);if(X!==G){const Q=r.generateIndent(X,P,V);z.push({range:new E.Range(H,1,H,q.length+1),text:Q}),W=Q+W.substr(q.length)}else{const Q=(0,c.getIndentMetadata)(O,H,this._languageConfigurationService);if(Q===0||Q===8)return}}}const U=H;for(;H<L.endLineNumber;){if(!/\S/.test(O.getLineContent(H+1))){H++;continue}break}if(H!==L.endLineNumber){const $={tokenization:{getLineTokens:X=>O.tokenization.getLineTokens(X),getLanguageId:()=>O.getLanguageId(),getLanguageIdAtPosition:(X,G)=>O.getLanguageIdAtPosition(X,G)},getLineContent:X=>X===U?W:O.getLineContent(X)},q=(0,c.getGoodIndentForLine)(N,$,O.getLanguageId(),H+1,x,this._languageConfigurationService);if(q!==null){const X=r.getSpaceCnt(q,P),G=r.getSpaceCnt(p.getLeadingWhitespace(O.getLineContent(H+1)),P);if(X!==G){const Q=X-G;for(let j=H+1;j<=L.endLineNumber;j++){const K=O.getLineContent(j),Y=p.getLeadingWhitespace(K),ie=r.getSpaceCnt(Y,P)+Q,re=r.generateIndent(ie,P,V);re!==Y&&z.push({range:new E.Range(j,1,j,Y.length+1),text:re})}}}}if(z.length>0){this.editor.pushUndoStop();const $=new m(z,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",$),this.editor.pushUndoStop()}}shouldIgnoreLine(L,M){L.tokenization.forceTokenization(M);const O=L.getLineFirstNonWhitespaceColumn(M);if(O===0)return!0;const N=L.tokenization.getLineTokens(M);if(N.getCount()>0){const P=N.findTokenIndexAtOffset(O);if(P>=0&&N.getStandardTokenType(P)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};w.ID="editor.contrib.autoIndentOnPaste",w=we([F(1,S.ILanguageConfigurationService)],w),e.AutoIndentOnPaste=w;function D(_,L,M,O){if(_.getLineCount()===1&&_.getLineMaxColumn(1)===1)return;let N="";for(let B=0;B<M;B++)N+=" ";const P=new RegExp(N,"gi");for(let B=1,V=_.getLineCount();B<=V;B++){let z=_.getLineFirstNonWhitespaceColumn(B);if(z===0&&(z=_.getLineMaxColumn(B)),z===1)continue;const x=new E.Range(B,1,B,z),H=_.getValueInRange(x),W=O?H.replace(/\t/ig,N):H.replace(P," ");L.addEditOperation(x,W)}}class y{constructor(L,M){this.selection=L,this.tabSize=M,this.selectionId=null}getEditOperations(L,M){this.selectionId=M.trackSelection(this.selection),D(L,M,this.tabSize,!0)}computeCursorState(L,M){return M.getTrackedSelection(this.selectionId)}}e.IndentationToSpacesCommand=y;class T{constructor(L,M){this.selection=L,this.tabSize=M,this.selectionId=null}getEditOperations(L,M){this.selectionId=M.trackSelection(this.selection),D(L,M,this.tabSize,!1)}computeCursorState(L,M){return M.getTrackedSelection(this.selectionId)}}e.IndentationToTabsCommand=T,(0,R.registerEditorContribution)(w.ID,w),(0,R.registerEditorAction)(s),(0,R.registerEditorAction)(d),(0,R.registerEditorAction)(a),(0,R.registerEditorAction)(o),(0,R.registerEditorAction)(g),(0,R.registerEditorAction)(h),(0,R.registerEditorAction)(v)}),define(ae[2185],le([1,0,40,589,59,1370]),function(J,e,t,p,R,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:R.EditorContextKeys.textInputFocus,primary:2090}})}run(I,b,S){if(S=S||{},!b.hasModel())return;const C=b._getViewModel();C.model.pushStackElement(),C.setCursorStates(S.source,3,p.CursorMoveCommands.expandLineSelection(C,C.getCursorStates())),C.revealPrimaryCursor(S.source,!0)}}e.ExpandLineSelectionAction=k,(0,t.registerEditorAction)(k)}),define(ae[819],le([1,0,99,332,40,361,766,608,138,50,20,85,59,1229,2116,1230,1371,15,122]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KebabCaseAction=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 d extends R.EditorAction{constructor(j,K){super(K),this.down=j}run(j,K){if(!K.hasModel())return;const Y=K.getSelections().map((re,oe)=>({selection:re,index:oe,ignore:!1}));Y.sort((re,oe)=>S.Range.compareRangesUsingStarts(re.selection,oe.selection));let ee=Y[0];for(let re=1;re<Y.length;re++){const oe=Y[re];ee.selection.endLineNumber===oe.selection.startLineNumber&&(ee.index<oe.index?oe.ignore=!0:(ee.ignore=!0,ee=oe))}const ie=[];for(const re of Y)ie.push(new u.CopyLinesCommand(re.selection,this.down,re.ignore));K.pushUndoStop(),K.executeCommands(this.id,ie),K.pushUndoStop()}}class n extends d{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:c.localize(0,null),alias:"Copy Line Up",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(1,null),order:1}})}}class a extends d{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:c.localize(2,null),alias:"Copy Line Down",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(3,null),order:2}})}}class o extends R.EditorAction{constructor(){super({id:"editor.action.duplicateSelection",label:c.localize(4,null),alias:"Duplicate Selection",precondition:r.EditorContextKeys.writable,menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(5,null),order:5}})}run(j,K,Y){if(!K.hasModel())return;const ee=[],ie=K.getSelections(),re=K.getModel();for(const oe of ie)if(oe.isEmpty())ee.push(new u.CopyLinesCommand(oe,!0));else{const se=new C.Selection(oe.endLineNumber,oe.endColumn,oe.endLineNumber,oe.endColumn);ee.push(new A.ReplaceCommandThatSelectsText(se,re.getValueInRange(oe)))}K.pushUndoStop(),K.executeCommands(this.id,ee),K.pushUndoStop()}}e.DuplicateSelectionAction=o;class g extends R.EditorAction{constructor(j,K){super(K),this.down=j}run(j,K){const Y=j.get(s.ILanguageConfigurationService),ee=[],ie=K.getSelections()||[],re=K.getOption(9);for(const oe of ie)ee.push(new i.MoveLinesCommand(oe,this.down,re,Y));K.pushUndoStop(),K.executeCommands(this.id,ee),K.pushUndoStop()}}class h extends g{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:c.localize(6,null),alias:"Move Line Up",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(7,null),order:3}})}}class v extends g{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:c.localize(8,null),alias:"Move Line Down",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:l.MenuId.MenubarSelectionMenu,group:"2_line",title:c.localize(9,null),order:4}})}}class m extends R.EditorAction{constructor(j,K){super(K),this.descending=j}run(j,K){const Y=K.getSelections()||[];for(const ie of Y)if(!f.SortLinesCommand.canRun(K.getModel(),ie,this.descending))return;const ee=[];for(let ie=0,re=Y.length;ie<re;ie++)ee[ie]=new f.SortLinesCommand(Y[ie],this.descending);K.pushUndoStop(),K.executeCommands(this.id,ee),K.pushUndoStop()}}e.AbstractSortLinesAction=m;class w extends m{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:c.localize(10,null),alias:"Sort Lines Ascending",precondition:r.EditorContextKeys.writable})}}e.SortLinesAscendingAction=w;class D extends m{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:c.localize(11,null),alias:"Sort Lines Descending",precondition:r.EditorContextKeys.writable})}}e.SortLinesDescendingAction=D;class y extends R.EditorAction{constructor(){super({id:"editor.action.removeDuplicateLines",label:c.localize(12,null),alias:"Delete Duplicate Lines",precondition:r.EditorContextKeys.writable})}run(j,K){if(!K.hasModel())return;const Y=K.getModel();if(Y.getLineCount()===1&&Y.getLineMaxColumn(1)===1)return;const ee=[],ie=[];let re=0;for(const oe of K.getSelections()){const se=new Set,te=[];for(let de=oe.startLineNumber;de<=oe.endLineNumber;de++){const he=Y.getLineContent(de);se.has(he)||(te.push(he),se.add(he))}const Z=new C.Selection(oe.startLineNumber,1,oe.endLineNumber,Y.getLineMaxColumn(oe.endLineNumber)),ne=oe.startLineNumber-re,ce=new C.Selection(ne,1,ne+te.length-1,te[te.length-1].length);ee.push(I.EditOperation.replace(Z,te.join(` `))),ie.push(ce),re+=oe.endLineNumber-oe.startLineNumber+1-te.length}K.pushUndoStop(),K.executeEdits(this.id,ee,ie),K.pushUndoStop()}}e.DeleteDuplicateLinesAction=y;class T extends R.EditorAction{constructor(){super({id:T.ID,label:c.localize(13,null),alias:"Trim Trailing Whitespace",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:(0,t.KeyChord)(2089,2102),weight:100}})}run(j,K,Y){let ee=[];Y.reason==="auto-save"&&(ee=(K.getSelections()||[]).map(oe=>new b.Position(oe.positionLineNumber,oe.positionColumn)));const ie=K.getSelection();if(ie===null)return;const re=new k.TrimTrailingWhitespaceCommand(ie,ee);K.pushUndoStop(),K.executeCommands(this.id,[re]),K.pushUndoStop()}}e.TrimTrailingWhitespaceAction=T,T.ID="editor.action.trimTrailingWhitespace";class _ extends R.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:c.localize(14,null),alias:"Delete Line",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(j,K){if(!K.hasModel())return;const Y=this._getLinesToRemove(K),ee=K.getModel();if(ee.getLineCount()===1&&ee.getLineMaxColumn(1)===1)return;let ie=0;const re=[],oe=[];for(let se=0,te=Y.length;se<te;se++){const Z=Y[se];let ne=Z.startLineNumber,ce=Z.endLineNumber,de=1,he=ee.getLineMaxColumn(ce);ce<ee.getLineCount()?(ce+=1,he=1):ne>1&&(ne-=1,de=ee.getLineMaxColumn(ne)),re.push(I.EditOperation.replace(new C.Selection(ne,de,ce,he),"")),oe.push(new C.Selection(ne-ie,Z.positionColumn,ne-ie,Z.positionColumn)),ie+=Z.endLineNumber-Z.startLineNumber+1}K.pushUndoStop(),K.executeEdits(this.id,re,oe),K.pushUndoStop()}_getLinesToRemove(j){const K=j.getSelections().map(ie=>{let re=ie.endLineNumber;return ie.startLineNumber<ie.endLineNumber&&ie.endColumn===1&&(re-=1),{startLineNumber:ie.startLineNumber,selectionStartColumn:ie.selectionStartColumn,endLineNumber:re,positionColumn:ie.positionColumn}});K.sort((ie,re)=>ie.startLineNumber===re.startLineNumber?ie.endLineNumber-re.endLineNumber:ie.startLineNumber-re.startLineNumber);const Y=[];let ee=K[0];for(let ie=1;ie<K.length;ie++)ee.endLineNumber+1>=K[ie].startLineNumber?ee.endLineNumber=K[ie].endLineNumber:(Y.push(ee),ee=K[ie]);return Y.push(ee),Y}}e.DeleteLinesAction=_;class L extends R.EditorAction{constructor(){super({id:"editor.action.indentLines",label:c.localize(15,null),alias:"Indent Line",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:2137,weight:100}})}run(j,K){const Y=K._getViewModel();!Y||(K.pushUndoStop(),K.executeCommands(this.id,E.TypeOperations.indent(Y.cursorConfig,K.getModel(),K.getSelections())),K.pushUndoStop())}}e.IndentLinesAction=L;class M extends R.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:c.localize(16,null),alias:"Outdent Line",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:2135,weight:100}})}run(j,K){p.CoreEditingCommands.Outdent.runEditorCommand(j,K,null)}}class O extends R.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:c.localize(17,null),alias:"Insert Line Above",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(j,K){const Y=K._getViewModel();!Y||(K.pushUndoStop(),K.executeCommands(this.id,E.TypeOperations.lineInsertBefore(Y.cursorConfig,K.getModel(),K.getSelections())))}}e.InsertLineBeforeAction=O;class N extends R.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:c.localize(18,null),alias:"Insert Line Below",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(j,K){const Y=K._getViewModel();!Y||(K.pushUndoStop(),K.executeCommands(this.id,E.TypeOperations.lineInsertAfter(Y.cursorConfig,K.getModel(),K.getSelections())))}}e.InsertLineAfterAction=N;class P extends R.EditorAction{run(j,K){if(!K.hasModel())return;const Y=K.getSelection(),ee=this._getRangesToDelete(K),ie=[];for(let se=0,te=ee.length-1;se<te;se++){const Z=ee[se],ne=ee[se+1];S.Range.intersectRanges(Z,ne)===null?ie.push(Z):ee[se+1]=S.Range.plusRange(Z,ne)}ie.push(ee[ee.length-1]);const re=this._getEndCursorState(Y,ie),oe=ie.map(se=>I.EditOperation.replace(se,""));K.pushUndoStop(),K.executeEdits(this.id,oe,re),K.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=P;class B extends P{constructor(){super({id:"deleteAllLeft",label:c.localize(19,null),alias:"Delete All Left",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(j,K){let Y=null;const ee=[];let ie=0;return K.forEach(re=>{let oe;if(re.endColumn===1&&ie>0){const se=re.startLineNumber-ie;oe=new C.Selection(se,re.startColumn,se,re.startColumn)}else oe=new C.Selection(re.startLineNumber,re.startColumn,re.startLineNumber,re.startColumn);ie+=re.endLineNumber-re.startLineNumber,re.intersectRanges(j)?Y=oe:ee.push(oe)}),Y&&ee.unshift(Y),ee}_getRangesToDelete(j){const K=j.getSelections();if(K===null)return[];let Y=K;const ee=j.getModel();return ee===null?[]:(Y.sort(S.Range.compareRangesUsingStarts),Y=Y.map(ie=>{if(ie.isEmpty())if(ie.startColumn===1){const re=Math.max(1,ie.startLineNumber-1),oe=ie.startLineNumber===1?1:ee.getLineContent(re).length+1;return new S.Range(re,oe,ie.startLineNumber,1)}else return new S.Range(ie.startLineNumber,1,ie.startLineNumber,ie.startColumn);else return new S.Range(ie.startLineNumber,1,ie.endLineNumber,ie.endColumn)}),Y)}}e.DeleteAllLeftAction=B;class V extends P{constructor(){super({id:"deleteAllRight",label:c.localize(20,null),alias:"Delete All Right",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(j,K){let Y=null;const ee=[];for(let ie=0,re=K.length,oe=0;ie<re;ie++){const se=K[ie],te=new C.Selection(se.startLineNumber-oe,se.startColumn,se.startLineNumber-oe,se.startColumn);se.intersectRanges(j)?Y=te:ee.push(te)}return Y&&ee.unshift(Y),ee}_getRangesToDelete(j){const K=j.getModel();if(K===null)return[];const Y=j.getSelections();if(Y===null)return[];const ee=Y.map(ie=>{if(ie.isEmpty()){const re=K.getLineMaxColumn(ie.startLineNumber);return ie.startColumn===re?new S.Range(ie.startLineNumber,ie.startColumn,ie.startLineNumber+1,1):new S.Range(ie.startLineNumber,ie.startColumn,ie.startLineNumber,re)}return ie});return ee.sort(S.Range.compareRangesUsingStarts),ee}}e.DeleteAllRightAction=V;class z extends R.EditorAction{constructor(){super({id:"editor.action.joinLines",label:c.localize(21,null),alias:"Join Lines",precondition:r.EditorContextKeys.writable,kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(j,K){const Y=K.getSelections();if(Y===null)return;let ee=K.getSelection();if(ee===null)return;Y.sort(S.Range.compareRangesUsingStarts);const ie=[],re=Y.reduce((ce,de)=>ce.isEmpty()?ce.endLineNumber===de.startLineNumber?(ee.equalsSelection(ce)&&(ee=de),de):de.startLineNumber>ce.endLineNumber+1?(ie.push(ce),de):new C.Selection(ce.startLineNumber,ce.startColumn,de.endLineNumber,de.endColumn):de.startLineNumber>ce.endLineNumber?(ie.push(ce),de):new C.Selection(ce.startLineNumber,ce.startColumn,de.endLineNumber,de.endColumn));ie.push(re);const oe=K.getModel();if(oe===null)return;const se=[],te=[];let Z=ee,ne=0;for(let ce=0,de=ie.length;ce<de;ce++){const he=ie[ce],pe=he.startLineNumber,me=1;let Se=0,Ie,ve;const be=oe.getLineContent(he.endLineNumber).length-he.endColumn;if(he.isEmpty()||he.startLineNumber===he.endLineNumber){const Ce=he.getStartPosition();Ce.lineNumber<oe.getLineCount()?(Ie=pe+1,ve=oe.getLineMaxColumn(Ie)):(Ie=Ce.lineNumber,ve=oe.getLineMaxColumn(Ce.lineNumber))}else Ie=he.endLineNumber,ve=oe.getLineMaxColumn(Ie);let ge=oe.getLineContent(pe);for(let Ce=pe+1;Ce<=Ie;Ce++){const De=oe.getLineContent(Ce),Ae=oe.getLineFirstNonWhitespaceColumn(Ce);if(Ae>=1){let Pe=!0;ge===""&&(Pe=!1),Pe&&(ge.charAt(ge.length-1)===" "||ge.charAt(ge.length-1)===" ")&&(Pe=!1,ge=ge.replace(/[\s\uFEFF\xA0]+$/g," "));const fe=De.substr(Ae-1);ge+=(Pe?" ":"")+fe,Pe?Se=fe.length+1:Se=fe.length}else Se=0}const ue=new S.Range(pe,me,Ie,ve);if(!ue.isEmpty()){let Ce;he.isEmpty()?(se.push(I.EditOperation.replace(ue,ge)),Ce=new C.Selection(ue.startLineNumber-ne,ge.length-Se+1,pe-ne,ge.length-Se+1)):he.startLineNumber===he.endLineNumber?(se.push(I.EditOperation.replace(ue,ge)),Ce=new C.Selection(he.startLineNumber-ne,he.startColumn,he.endLineNumber-ne,he.endColumn)):(se.push(I.EditOperation.replace(ue,ge)),Ce=new C.Selection(he.startLineNumber-ne,he.startColumn,he.startLineNumber-ne,ge.length-be)),S.Range.intersectRanges(ue,ee)!==null?Z=Ce:te.push(Ce)}ne+=ue.endLineNumber-ue.startLineNumber}te.unshift(Z),K.pushUndoStop(),K.executeEdits(this.id,se,te),K.pushUndoStop()}}e.JoinLinesAction=z;class x extends R.EditorAction{constructor(){super({id:"editor.action.transpose",label:c.localize(22,null),alias:"Transpose characters around the cursor",precondition:r.EditorContextKeys.writable})}run(j,K){const Y=K.getSelections();if(Y===null)return;const ee=K.getModel();if(ee===null)return;const ie=[];for(let re=0,oe=Y.length;re<oe;re++){const se=Y[re];if(!se.isEmpty())continue;const te=se.getStartPosition(),Z=ee.getLineMaxColumn(te.lineNumber);if(te.column>=Z){if(te.lineNumber===ee.getLineCount())continue;const ne=new S.Range(te.lineNumber,Math.max(1,te.column-1),te.lineNumber+1,1),ce=ee.getValueInRange(ne).split("").reverse().join("");ie.push(new A.ReplaceCommand(new C.Selection(te.lineNumber,Math.max(1,te.column-1),te.lineNumber+1,1),ce))}else{const ne=new S.Range(te.lineNumber,Math.max(1,te.column-1),te.lineNumber,te.column+1),ce=ee.getValueInRange(ne).split("").reverse().join("");ie.push(new A.ReplaceCommandThatPreservesSelection(ne,ce,new C.Selection(te.lineNumber,te.column+1,te.lineNumber,te.column+1)))}}K.pushUndoStop(),K.executeCommands(this.id,ie),K.pushUndoStop()}}e.TransposeAction=x;class H extends R.EditorAction{run(j,K){const Y=K.getSelections();if(Y===null)return;const ee=K.getModel();if(ee===null)return;const ie=K.getOption(119),re=[];for(const oe of Y)if(oe.isEmpty()){const se=oe.getStartPosition(),te=K.getConfiguredWordAtPosition(se);if(!te)continue;const Z=new S.Range(se.lineNumber,te.startColumn,se.lineNumber,te.endColumn),ne=ee.getValueInRange(Z);re.push(I.EditOperation.replace(Z,this._modifyText(ne,ie)))}else{const se=ee.getValueInRange(oe);re.push(I.EditOperation.replace(oe,this._modifyText(se,ie)))}K.pushUndoStop(),K.executeEdits(this.id,re),K.pushUndoStop()}}e.AbstractCaseAction=H;class W extends H{constructor(){super({id:"editor.action.transformToUppercase",label:c.localize(23,null),alias:"Transform to Uppercase",precondition:r.EditorContextKeys.writable})}_modifyText(j,K){return j.toLocaleUpperCase()}}e.UpperCaseAction=W;class U extends H{constructor(){super({id:"editor.action.transformToLowercase",label:c.localize(24,null),alias:"Transform to Lowercase",precondition:r.EditorContextKeys.writable})}_modifyText(j,K){return j.toLocaleLowerCase()}}e.LowerCaseAction=U;class ${constructor(j,K){this._pattern=j,this._flags=K,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 q extends H{constructor(){super({id:"editor.action.transformToTitlecase",label:c.localize(25,null),alias:"Transform to Title Case",precondition:r.EditorContextKeys.writable})}_modifyText(j,K){const Y=q.titleBoundary.get();return Y?j.toLocaleLowerCase().replace(Y,ee=>ee.toLocaleUpperCase()):j}}e.TitleCaseAction=q,q.titleBoundary=new $("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class X extends H{constructor(){super({id:"editor.action.transformToSnakecase",label:c.localize(26,null),alias:"Transform to Snake Case",precondition:r.EditorContextKeys.writable})}_modifyText(j,K){const Y=X.caseBoundary.get(),ee=X.singleLetters.get();return!Y||!ee?j:j.replace(Y,"$1_$2").replace(ee,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=X,X.caseBoundary=new $("(\\p{Ll})(\\p{Lu})","gmu"),X.singleLetters=new $("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class G extends H{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(K=>K.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:c.localize(27,null),alias:"Transform to Kebab Case",precondition:r.EditorContextKeys.writable})}_modifyText(j,K){const Y=G.caseBoundary.get(),ee=G.singleLetters.get(),ie=G.underscoreBoundary.get();return!Y||!ee||!ie?j:j.replace(ie,"$1-$3").replace(Y,"$1-$2").replace(ee,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=G,G.caseBoundary=new $("(\\p{Ll})(\\p{Lu})","gmu"),G.singleLetters=new $("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),G.underscoreBoundary=new $("(\\S)(_)(\\S)","gm"),(0,R.registerEditorAction)(n),(0,R.registerEditorAction)(a),(0,R.registerEditorAction)(o),(0,R.registerEditorAction)(h),(0,R.registerEditorAction)(v),(0,R.registerEditorAction)(w),(0,R.registerEditorAction)(D),(0,R.registerEditorAction)(y),(0,R.registerEditorAction)(T),(0,R.registerEditorAction)(_),(0,R.registerEditorAction)(L),(0,R.registerEditorAction)(M),(0,R.registerEditorAction)(O),(0,R.registerEditorAction)(N),(0,R.registerEditorAction)(B),(0,R.registerEditorAction)(V),(0,R.registerEditorAction)(z),(0,R.registerEditorAction)(x),(0,R.registerEditorAction)(W),(0,R.registerEditorAction)(U),X.caseBoundary.isSupported()&&X.singleLetters.isSupported()&&(0,R.registerEditorAction)(X),q.titleBoundary.isSupported()&&(0,R.registerEditorAction)(q),G.isSupported()&&(0,R.registerEditorAction)(G)}),define(ae[2186],le([1,0,2,40]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class R extends t.Disposable{static get(k){return k.getContribution(R.ID)}constructor(k){super(),this._editor=k,this._register(this._editor.onMouseDown(E=>{const I=this._editor.getOption(107);I>=0&&E.target.type===6&&E.target.position.column>=I&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}R.ID="editor.contrib.longLinesHelper",(0,p.registerEditorContribution)(R.ID,R)}),define(ae[334],le([1,0,110,11,2,40,20,1374,7,1089]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let b=class hs{static get(u){return u.getContribution(hs.ID)}constructor(u,i){this._messageWidget=new R.MutableDisposable,this._messageListeners=new R.DisposableStore,this._editor=u,this._visible=hs.MESSAGE_VISIBLE.bindTo(i)}dispose(){this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}isVisible(){return this._visible.get()}showMessage(u,i){(0,t.alert)(u),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new C(this._editor,i,u),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 p.TimeoutTimer(()=>this.closeMessage(),3e3));let f;this._messageListeners.add(this._editor.onMouseMove(c=>{!c.target.position||(f?f.containsPosition(c.target.position)||this.closeMessage():f=new k.Range(i.lineNumber-3,1,c.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(C.fadeOut(this._messageWidget.value))}};b.ID="editor.contrib.messageController",b.MESSAGE_VISIBLE=new I.RawContextKey("messageVisible",!1,E.localize(0,null)),b=we([F(1,I.IContextKeyService)],b),e.MessageController=b;const S=A.EditorCommand.bindToContribution(b.get);(0,A.registerEditorCommand)(new S({id:"leaveEditorMessage",precondition:b.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class C{static fadeOut(u){const i=()=>{u.dispose(),clearTimeout(f),u.getDomNode().removeEventListener("animationend",i)},f=setTimeout(i,110);return u.getDomNode().addEventListener("animationend",i),u.getDomNode().classList.add("fadeOut"),{dispose:i}}constructor(u,{lineNumber:i,column:f},c){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=u,this._editor.revealLinesInCenterIfOutsideViewport(i,i,0),this._position={lineNumber:i,column:f},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 s=document.createElement("div");s.classList.add("message"),s.textContent=c,this._domNode.appendChild(s);const d=document.createElement("div");d.classList.add("anchor","below"),this._domNode.appendChild(d),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(u){this._domNode.classList.toggle("below",u===2)}}(0,A.registerEditorContribution)(b.ID,b)});var Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t},yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)};define(ae[2187],le([1,0,10,21,206,2,50,334,8,7,5,816,2163]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionUi=void 0;let i=class extends A.Disposable{constructor(c,l,s,d,n,a,o){super(),this._editor=c,this.delegate=d,this._configurationService=n,this._contextKeyService=a,this._instantiationService=o,this._activeCodeActions=this._register(new A.MutableDisposable),u.set(this,!1),this._lightBulbWidget=new R.Lazy(()=>{const g=this._register(o.createInstance(r.LightBulbWidget,this._editor,l,s));return this._register(g.onClick(h=>this.showCodeActionList(h.trigger,h.actions,h,{includeDisabledActions:!1,fromLightbulb:!0,showHeaders:this.shouldShowHeaders()}))),g}),this._register(this._editor.onDidLayoutChange(()=>C.CodeActionWidget.INSTANCE?.hide()))}dispose(){Ut(this,u,!0,"f"),super.dispose()}async update(c){if(c.type!==1){this._lightBulbWidget.rawValue?.hide();return}let l;try{l=await c.actions}catch(s){(0,p.onUnexpectedError)(s);return}if(!yt(this,u,"f"))if(this._lightBulbWidget.getValue().update(l,c.trigger,c.position),c.trigger.type===1){if(c.trigger.filter?.include){const d=this.tryGetValidActionToApply(c.trigger,l);if(d){try{this._lightBulbWidget.getValue().hide(),await this.delegate.applyCodeAction(d,!1,!1)}finally{l.dispose()}return}if(c.trigger.context){const n=this.getInvalidActionThatWouldHaveBeenApplied(c.trigger,l);if(n&&n.action.disabled){E.MessageController.get(this._editor)?.showMessage(n.action.disabled,c.trigger.context.position),l.dispose();return}}}const s=!!c.trigger.filter?.include;if(c.trigger.context&&(!l.allActions.length||!s&&!l.validActions.length)){E.MessageController.get(this._editor)?.showMessage(c.trigger.context.notAvailableMessage,c.trigger.context.position),this._activeCodeActions.value=l,l.dispose();return}this._activeCodeActions.value=l,this.showCodeActionList(c.trigger,l,this.toCoords(c.position),{includeDisabledActions:s,fromLightbulb:!1,showHeaders:this.shouldShowHeaders()})}else C.CodeActionWidget.INSTANCE?.isVisible?l.dispose():this._activeCodeActions.value=l}getInvalidActionThatWouldHaveBeenApplied(c,l){if(!!l.allActions.length&&(c.autoApply==="first"&&l.validActions.length===0||c.autoApply==="ifSingle"&&l.allActions.length===1))return l.allActions.find(({action:s})=>s.disabled)}tryGetValidActionToApply(c,l){if(!!l.validActions.length&&(c.autoApply==="first"&&l.validActions.length>0||c.autoApply==="ifSingle"&&l.validActions.length===1))return l.validActions[0]}async showCodeActionList(c,l,s,d){const n=this._editor.getDomNode();if(!n)return;const a=k.Position.isIPosition(s)?this.toCoords(s):s;C.CodeActionWidget.getOrCreateInstance(this._instantiationService).show(c,l,a,n,{...d,showHeaders:this.shouldShowHeaders()},{onSelectCodeAction:async(o,g,h)=>{this.delegate.applyCodeAction(o,!0,Boolean(h.preview||g.preview))},onHide:()=>{this._editor?.focus()}},this._contextKeyService)}toCoords(c){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(c,1),this._editor.render();const l=this._editor.getScrolledVisiblePosition(c),s=(0,t.getDomNodePagePosition)(this._editor.getDomNode()),d=s.left+l.left,n=s.top+l.top+l.height;return{x:d,y:n}}shouldShowHeaders(){const c=this._editor?.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:c?.uri})}};u=new WeakMap,i=we([F(4,I.IConfigurationService),F(5,b.IContextKeyService),F(6,S.IInstantiationService)],i),e.CodeActionUi=i}),define(ae[820],le([1,0,206,2,28,40,59,61,309,2187,816,334,1333,15,7,5,124,66,2179,236]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorPreview=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=e.CodeActionController=void 0;function n(O){return i.ContextKeyExpr.regex(s.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,R.escapeRegExpCharacters)(O.value)+"\\b"))}function a(O,N,P,B){const V=d.CodeActionCommandArgs.fromUser(N,{kind:d.CodeActionKind.Refactor,apply:"never"});return h(O,typeof N?.kind=="string"?V.preferred?r.localize(0,null,N.kind):r.localize(1,null,N.kind):V.preferred?r.localize(2,null):r.localize(3,null),{include:d.CodeActionKind.Refactor.contains(V.kind)?V.kind:d.CodeActionKind.None,onlyIncludePreferredActions:V.preferred},V.apply,P,B)}const o={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:r.localize(4,null)},apply:{type:"string",description:r.localize(5,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[r.localize(6,null),r.localize(7,null),r.localize(8,null)]},preferred:{type:"boolean",default:!1,description:r.localize(9,null)}}};let g=class Jo extends p.Disposable{static get(N){return N.getContribution(Jo.ID)}constructor(N,P,B,V,z,x){super(),this._instantiationService=z,this._editor=N,this._model=this._register(new s.CodeActionModel(this._editor,x.codeActionProvider,P,B,V)),this._register(this._model.onDidChangeState(H=>this.update(H))),this._ui=new t.Lazy(()=>this._register(z.createInstance(b.CodeActionUi,N,v.Id,L.Id,{applyCodeAction:async(H,W,U)=>{try{await this._applyCodeAction(H,U)}finally{W&&this._trigger({type:2,triggerAction:d.CodeActionTriggerSource.QuickFix,filter:{}})}}})))}update(N){this._ui.getValue().update(N)}showCodeActions(N,P,B){return this._ui.getValue().showCodeActionList(N,P,B,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(N,P,B,V,z){if(!this._editor.hasModel())return;C.MessageController.get(this._editor)?.closeMessage();const x=this._editor.getPosition();this._trigger({type:1,triggerAction:P,filter:B,autoApply:V,context:{notAvailableMessage:N,position:x},preview:z})}_trigger(N){return this._model.trigger(N)}_applyCodeAction(N,P){return this._instantiationService.invokeFunction(I.applyCodeAction,N,I.ApplyCodeActionReason.FromCodeActions,{preview:P,editor:this._editor})}};g.ID="editor.contrib.codeActionController",g=we([F(1,c.IMarkerService),F(2,i.IContextKeyService),F(3,l.IEditorProgressService),F(4,f.IInstantiationService),F(5,E.ILanguageFeaturesService)],g),e.CodeActionController=g;function h(O,N,P,B,V=!1,z=d.CodeActionTriggerSource.Default){O.hasModel()&&g.get(O)?.manualTriggerAtCurrentPosition(N,z,P,B,V)}class v extends A.EditorAction{constructor(){super({id:v.Id,label:r.localize(10,null),alias:"Quick Fix...",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:k.EditorContextKeys.editorTextFocus,primary:2132,weight:100}})}run(N,P){return h(P,r.localize(11,null),void 0,void 0,!1,d.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=v,v.Id="editor.action.quickFix";class m extends A.EditorCommand{constructor(){super({id:I.codeActionCommandId,precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:o}]}})}runEditorCommand(N,P,B){const V=d.CodeActionCommandArgs.fromUser(B,{kind:d.CodeActionKind.Empty,apply:"ifSingle"});return h(P,typeof B?.kind=="string"?V.preferred?r.localize(12,null,B.kind):r.localize(13,null,B.kind):V.preferred?r.localize(14,null):r.localize(15,null),{include:V.kind,includeSourceActions:!0,onlyIncludePreferredActions:V.preferred},V.apply)}}e.CodeActionCommand=m;class w extends A.EditorAction{constructor(){super({id:I.refactorCommandId,label:r.localize(16,null),alias:"Refactor...",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:k.EditorContextKeys.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:i.ContextKeyExpr.and(k.EditorContextKeys.writable,n(d.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:o}]}})}run(N,P,B){return a(P,B,!1,d.CodeActionTriggerSource.Refactor)}}e.RefactorAction=w;class D extends A.EditorAction{constructor(){super({id:I.refactorPreviewCommandId,label:r.localize(17,null),alias:"Refactor Preview...",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasCodeActionsProvider),description:{description:"Refactor Preview...",args:[{name:"args",schema:o}]}})}run(N,P,B){return a(P,B,!0,d.CodeActionTriggerSource.RefactorPreview)}}e.RefactorPreview=D;class y extends A.EditorAction{constructor(){super({id:I.sourceActionCommandId,label:r.localize(18,null),alias:"Source Action...",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:i.ContextKeyExpr.and(k.EditorContextKeys.writable,n(d.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:o}]}})}run(N,P,B){const V=d.CodeActionCommandArgs.fromUser(B,{kind:d.CodeActionKind.Source,apply:"never"});return h(P,typeof B?.kind=="string"?V.preferred?r.localize(19,null,B.kind):r.localize(20,null,B.kind):V.preferred?r.localize(21,null):r.localize(22,null),{include:d.CodeActionKind.Source.contains(V.kind)?V.kind:d.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:V.preferred},V.apply,void 0,d.CodeActionTriggerSource.SourceAction)}}e.SourceAction=y;class T extends A.EditorAction{constructor(){super({id:I.organizeImportsCommandId,label:r.localize(23,null),alias:"Organize Imports",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,n(d.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:k.EditorContextKeys.editorTextFocus,primary:1581,weight:100}})}run(N,P){return h(P,r.localize(24,null),{include:d.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",void 0,d.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=T;class _ extends A.EditorAction{constructor(){super({id:I.fixAllCommandId,label:r.localize(25,null),alias:"Fix All",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,n(d.CodeActionKind.SourceFixAll))})}run(N,P){return h(P,r.localize(26,null),{include:d.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",void 0,d.CodeActionTriggerSource.FixAll)}}e.FixAllAction=_;class L extends A.EditorAction{constructor(){super({id:L.Id,label:r.localize(27,null),alias:"Auto Fix...",precondition:i.ContextKeyExpr.and(k.EditorContextKeys.writable,n(d.CodeActionKind.QuickFix)),kbOpts:{kbExpr:k.EditorContextKeys.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(N,P){return h(P,r.localize(28,null),{include:d.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",void 0,d.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=L,L.Id="editor.action.autoFix";const M=100+1e3;(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"hideCodeActionWidget",title:{value:r.localize(29,null),original:"Hide code action widget"},precondition:S.Context.Visible,keybinding:{weight:M,primary:9,secondary:[1033]}})}run(){S.CodeActionWidget.INSTANCE?.hide()}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"selectPrevCodeAction",title:{value:r.localize(30,null),original:"Select previous code action"},precondition:S.Context.Visible,keybinding:{weight:M,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(){S.CodeActionWidget.INSTANCE?.focusPrevious()}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"selectNextCodeAction",title:{value:r.localize(31,null),original:"Select next code action"},precondition:S.Context.Visible,keybinding:{weight:M,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(){S.CodeActionWidget.INSTANCE?.focusNext()}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:I.acceptSelectedCodeActionCommand,title:{value:r.localize(32,null),original:"Accept selected code action"},precondition:S.Context.Visible,keybinding:{weight:M,primary:3,secondary:[2132]}})}run(){S.CodeActionWidget.INSTANCE?.acceptSelected()}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:I.previewSelectedCodeActionCommand,title:{value:r.localize(33,null),original:"Preview selected code action"},precondition:S.Context.Visible,keybinding:{weight:M,primary:2051}})}run(){S.CodeActionWidget.INSTANCE?.acceptSelected({preview:!0})}})}),define(ae[2188],le([1,0,40,331,820,1334,55,17]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(R.CodeActionController.ID,R.CodeActionController),(0,t.registerEditorAction)(R.QuickFixAction),(0,t.registerEditorAction)(R.RefactorAction),(0,t.registerEditorAction)(R.RefactorPreview),(0,t.registerEditorAction)(R.SourceAction),(0,t.registerEditorAction)(R.OrganizeImportsAction),(0,t.registerEditorAction)(R.AutoFixAction),(0,t.registerEditorAction)(R.FixAllAction),(0,t.registerEditorCommand)(new R.CodeActionCommand),E.Registry.as(k.Extensions.Configuration).registerConfiguration({...p.editorConfigurationBaseNode,properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:A.localize(0,null),default:!0}}})}),define(ae[2189],le([1,0,2,40,334,1381]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class k extends t.Disposable{constructor(I){super(),this.editor=I,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const I=R.MessageController.get(this.editor);I&&this.editor.hasModel()&&(this.editor.isSimpleWidget?I.showMessage(A.localize(0,null),this.editor.getPosition()):I.showMessage(A.localize(1,null),this.editor.getPosition()))}}e.ReadOnlyMessageController=k,k.ID="editor.contrib.readOnlyMessageController",(0,p.registerEditorContribution)(k.ID,k)}),define(ae[2190],le([1,0,110,11,32,21,2,13,9,266,40,145,75,50,20,59,114,334,1382,55,7,5,25,26,66,17,2168,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class D{constructor(O,N,P){this.model=O,this.position=N,this._providerRenameIdx=0,this._providers=P.ordered(O)}hasProvider(){return this._providers.length>0}async resolveRenameLocation(O){const N=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const B=this._providers[this._providerRenameIdx];if(!B.resolveRenameLocation)break;const V=await B.resolveRenameLocation(this.model,this.position,O);if(!!V){if(V.rejectReason){N.push(V.rejectReason);continue}return V}}const P=this.model.getWordAtPosition(this.position);return P?{range:new i.Range(this.position.lineNumber,P.startColumn,this.position.lineNumber,P.endColumn),text:P.word,rejectReason:N.length>0?N.join(` `):void 0}:{range:i.Range.fromPositions(this.position),text:"",rejectReason:N.length>0?N.join(` `):void 0}}async provideRenameEdits(O,N){return this._provideRenameEdits(O,this._providerRenameIdx,[],N)}async _provideRenameEdits(O,N,P,B){const V=this._providers[N];if(!V)return{edits:[],rejectReason:P.join(` `)};const z=await V.provideRenameEdits(this.model,this.position,O,B);if(z){if(z.rejectReason)return this._provideRenameEdits(O,N+1,P.concat(z.rejectReason),B)}else return this._provideRenameEdits(O,N+1,P.concat(s.localize(0,null)),B);return z}}async function y(M,O,N,P){const B=new D(O,N,M),V=await B.resolveRenameLocation(R.CancellationToken.None);return V?.rejectReason?{edits:[],rejectReason:V.rejectReason}:B.provideRenameEdits(P,R.CancellationToken.None)}e.rename=y;let T=class Zo{static get(O){return O.getContribution(Zo.ID)}constructor(O,N,P,B,V,z,x,H){this.editor=O,this._instaService=N,this._notificationService=P,this._bulkEditService=B,this._progressService=V,this._logService=z,this._configService=x,this._languageFeaturesService=H,this._disposableStore=new k.DisposableStore,this._cts=new R.CancellationTokenSource,this._renameInputField=this._disposableStore.add(new p.IdleValue(()=>this._disposableStore.add(this._instaService.createInstance(m.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}async run(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const O=this.editor.getPosition(),N=new D(this.editor.getModel(),O,this._languageFeaturesService.renameProvider);if(!N.hasProvider())return;this._cts=new b.EditorStateCancellationTokenSource(this.editor,5);let P;try{const U=N.resolveRenameLocation(this._cts.token);this._progressService.showWhile(U,250),P=await U}catch(U){l.MessageController.get(this.editor)?.showMessage(U||s.localize(1,null),O);return}if(!P)return;if(P.rejectReason){l.MessageController.get(this.editor)?.showMessage(P.rejectReason,O);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new b.EditorStateCancellationTokenSource(this.editor,5,P.range);const B=this.editor.getSelection();let V=0,z=P.text.length;!i.Range.isEmpty(B)&&!i.Range.spansMultipleLines(B)&&i.Range.containsRange(P.range,B)&&(V=Math.max(0,B.startColumn-P.range.startColumn),z=Math.min(P.range.endColumn,B.endColumn)-P.range.startColumn);const x=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),H=await this._renameInputField.value.getInput(P.range,P.text,V,z,x,this._cts.token);if(typeof H=="boolean"){H&&this.editor.focus();return}this.editor.focus();const W=(0,p.raceCancellation)(N.provideRenameEdits(H.newName,this._cts.token),this._cts.token).then(async U=>{if(!(!U||!this.editor.hasModel())){if(U.rejectReason){this._notificationService.info(U.rejectReason);return}this.editor.setSelection(i.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(U,{editor:this.editor,showPreview:H.wantsPreview,label:s.localize(2,null,P?.text,H.newName),code:"undoredo.rename",quotableLabel:s.localize(3,null,P?.text,H.newName),respectAutoSaveConfig:!0}).then($=>{$.ariaSummary&&(0,t.alert)(s.localize(4,null,P.text,H.newName,$.ariaSummary))}).catch($=>{this._notificationService.error(s.localize(5,null)),this._logService.error($)})}},U=>{this._notificationService.error(s.localize(6,null)),this._logService.error(U)});return this._progressService.showWhile(W,250),W}acceptRenameInput(O){this._renameInputField.value.acceptInput(O)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};T.ID="editor.contrib.renameController",T=we([F(1,a.IInstantiationService),F(2,g.INotificationService),F(3,C.IBulkEditService),F(4,h.IEditorProgressService),F(5,o.ILogService),F(6,c.ITextResourceConfigurationService),F(7,w.ILanguageFeaturesService)],T);class _ extends S.EditorAction{constructor(){super({id:"editor.action.rename",label:s.localize(7,null),alias:"Rename Symbol",precondition:n.ContextKeyExpr.and(f.EditorContextKeys.writable,f.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(O,N){const P=O.get(r.ICodeEditorService),[B,V]=Array.isArray(N)&&N||[void 0,void 0];return I.URI.isUri(B)&&u.Position.isIPosition(V)?P.openCodeEditor({resource:B},P.getActiveCodeEditor()).then(z=>{!z||(z.setPosition(V),z.invokeWithinContext(x=>(this.reportTelemetry(x,z),this.run(x,z))))},A.onUnexpectedError):super.runCommand(O,N)}run(O,N){const P=T.get(N);return P?P.run():Promise.resolve()}}e.RenameAction=_,(0,S.registerEditorContribution)(T.ID,T),(0,S.registerEditorAction)(_);const L=S.EditorCommand.bindToContribution(T.get);(0,S.registerEditorCommand)(new L({id:"acceptRenameInput",precondition:m.CONTEXT_RENAME_INPUT_VISIBLE,handler:M=>M.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:f.EditorContextKeys.focus,primary:3}})),(0,S.registerEditorCommand)(new L({id:"acceptRenameInputWithPreview",precondition:n.ContextKeyExpr.and(m.CONTEXT_RENAME_INPUT_VISIBLE,n.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:M=>M.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:f.EditorContextKeys.focus,primary:1024+3}})),(0,S.registerEditorCommand)(new L({id:"cancelRenameInput",precondition:m.CONTEXT_RENAME_INPUT_VISIBLE,handler:M=>M.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:f.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,S.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(M,O,N,...P){const[B]=P;(0,E.assertType)(typeof B=="string");const{renameProvider:V}=M.get(w.ILanguageFeaturesService);return y(V,O,N,B)}),(0,S.registerModelAndPositionCommand)("_executePrepareRename",async function(M,O,N){const{renameProvider:P}=M.get(w.ILanguageFeaturesService),V=await new D(O,N,P).resolveRenameLocation(R.CancellationToken.None);if(V?.rejectReason)throw new Error(V.rejectReason);return V}),v.Registry.as(d.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:s.localize(8,null),default:!0,type:"boolean"}}})}),define(ae[2191],le([1,0,16,32,21,40,50,20,85,59,741,1304,1384,15,31,61,62,13,9]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=void 0;class d{constructor(m,w){this.index=m,this.ranges=w}mov(m){const w=this.index+(m?1:-1);if(w<0||w>=this.ranges.length)return this;const D=new d(w,this.ranges);return D.ranges[w].equalsRange(this.ranges[this.index])?D.mov(m):D}}let n=class ea{static get(m){return m.getContribution(ea.ID)}constructor(m,w){this._editor=m,this._languageFeaturesService=w,this._ignoreSelection=!1}dispose(){this._selectionListener?.dispose()}async run(m){if(!this._editor.hasModel())return;const w=this._editor.getSelections(),D=this._editor.getModel();if(this._state||await h(this._languageFeaturesService.selectionRangeProvider,D,w.map(T=>T.getPosition()),this._editor.getOption(103),p.CancellationToken.None).then(T=>{if(!(!t.isNonEmptyArray(T)||T.length!==w.length)&&!(!this._editor.hasModel()||!t.equals(this._editor.getSelections(),w,(_,L)=>_.equalsSelection(L)))){for(let _=0;_<T.length;_++)T[_]=T[_].filter(L=>L.containsPosition(w[_].getStartPosition())&&L.containsPosition(w[_].getEndPosition())),T[_].unshift(w[_]);this._state=T.map(_=>new d(0,_)),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}}};n.ID="editor.contrib.smartSelectController",n=we([F(1,f.ILanguageFeaturesService)],n);class a extends A.EditorAction{constructor(m,w){super(w),this._forward=m}async run(m,w){const D=n.get(w);D&&await D.run(this._forward)}}class o extends a{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:r.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"1_basic",title:r.localize(1,null),order:2}})}}i.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class g extends a{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:r.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:b.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:u.MenuId.MenubarSelectionMenu,group:"1_basic",title:r.localize(3,null),order:3}})}}(0,A.registerEditorContribution)(n.ID,n),(0,A.registerEditorAction)(o),(0,A.registerEditorAction)(g);async function h(v,m,w,D,y){const T=v.all(m).concat(new C.WordSelectionRangeProvider);T.length===1&&T.unshift(new S.BracketSelectionRangeProvider);const _=[],L=[];for(const M of T)_.push(Promise.resolve(M.provideSelectionRanges(m,w,y)).then(O=>{if(t.isNonEmptyArray(O)&&O.length===w.length)for(let N=0;N<w.length;N++){L[N]||(L[N]=[]);for(const P of O[N])E.Range.isIRange(P.range)&&E.Range.containsPosition(P.range,w[N])&&L[N].push(E.Range.lift(P.range))}},R.onUnexpectedExternalError));return await Promise.all(_),L.map(M=>{if(M.length===0)return[];M.sort((B,V)=>k.Position.isBefore(B.getStartPosition(),V.getStartPosition())?1:k.Position.isBefore(V.getStartPosition(),B.getStartPosition())||k.Position.isBefore(B.getEndPosition(),V.getEndPosition())?-1:k.Position.isBefore(V.getEndPosition(),B.getEndPosition())?1:0);const O=[];let N;for(const B of M)(!N||E.Range.containsRange(B,N)&&!E.Range.equalsRange(B,N))&&(O.push(B),N=B);if(!D.selectLeadingAndTrailingWhitespace)return O;const P=[O[0]];for(let B=1;B<O.length;B++){const V=O[B-1],z=O[B];if(z.startLineNumber!==V.startLineNumber||z.endLineNumber!==V.endLineNumber){const x=new E.Range(V.startLineNumber,m.getLineFirstNonWhitespaceColumn(V.startLineNumber),V.endLineNumber,m.getLineLastNonWhitespaceColumn(V.endLineNumber));x.containsRange(V)&&!x.equalsRange(V)&&z.containsRange(x)&&!z.equalsRange(x)&&P.push(x);const H=new E.Range(V.startLineNumber,1,V.endLineNumber,m.getLineMaxColumn(V.endLineNumber));H.containsRange(V)&&!H.equalsRange(x)&&z.containsRange(H)&&!z.equalsRange(H)&&P.push(H)}P.push(z)}return P})}e.provideSelectionRanges=h,i.CommandsRegistry.registerCommand("_executeSelectionRangeProvider",async function(v,...m){const[w,D]=m;(0,l.assertType)(s.URI.isUri(w));const y=v.get(f.ILanguageFeaturesService).selectionRangeProvider,T=await v.get(c.ITextModelService).createModelReference(w);try{return h(y,T.object.textEditorModel,D,{selectLeadingAndTrailingWhitespace:!0},p.CancellationToken.None)}finally{T.dispose()}})}),define(ae[2192],le([1,0,1387,70,15,8,7]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleStickyScroll=void 0;class E extends R.Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Toggle Sticky Scroll"},category:p.Categories.View,toggled:{condition:k.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:(0,t.localize)(2,null),mnemonicTitle:(0,t.localize)(3,null)},menu:[{id:R.MenuId.CommandPalette},{id:R.MenuId.MenubarViewMenu,group:"5_editor",order:2},{id:R.MenuId.StickyScrollContext}]})}async run(b){const S=b.get(A.IConfigurationService),C=!S.getValue("editor.stickyScroll.enabled");return S.updateValue("editor.stickyScroll.enabled",C)}}e.ToggleStickyScroll=E}),define(ae[224],le([1,0,32,21,96,2,146,13,9,50,20,62,207,1388,15,31,7,61,265]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"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:s.historyNavigationVisible,HasFocusedSuggestion:new c.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,u.localize)(0,null)),DetailsVisible:new c.RawContextKey("suggestWidgetDetailsVisible",!1,(0,u.localize)(1,null)),MultipleSuggestions:new c.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,u.localize)(2,null)),MakesTextEdit:new c.RawContextKey("suggestionMakesTextEdit",!0,(0,u.localize)(3,null)),AcceptSuggestionsOnEnter:new c.RawContextKey("acceptSuggestionOnEnter",!0,(0,u.localize)(4,null)),HasInsertAndReplaceRange:new c.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,u.localize)(5,null)),InsertMode:new c.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,u.localize)(6,null)}),CanResolve:new c.RawContextKey("suggestionCanResolve",!1,(0,u.localize)(7,null))},e.suggestWidgetStatusbarMenu=new i.MenuId("suggestWidgetStatusBar");class d{constructor(N,P,B,V){this.position=N,this.completion=P,this.container=B,this.provider=V,this.isInvalid=!1,this.score=R.FuzzyScore.Default,this.distance=0,this.textLabel=typeof P.label=="string"?P.label:P.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=P.sortText&&P.sortText.toLowerCase(),this.filterTextLow=P.filterText&&P.filterText.toLowerCase(),this.extensionId=P.extensionId,S.Range.isIRange(P.range)?(this.editStart=new b.Position(P.range.startLineNumber,P.range.startColumn),this.editInsertEnd=new b.Position(P.range.endLineNumber,P.range.endColumn),this.editReplaceEnd=new b.Position(P.range.endLineNumber,P.range.endColumn),this.isInvalid=this.isInvalid||S.Range.spansMultipleLines(P.range)||P.range.startLineNumber!==N.lineNumber):(this.editStart=new b.Position(P.range.insert.startLineNumber,P.range.insert.startColumn),this.editInsertEnd=new b.Position(P.range.insert.endLineNumber,P.range.insert.endColumn),this.editReplaceEnd=new b.Position(P.range.replace.endLineNumber,P.range.replace.endColumn),this.isInvalid=this.isInvalid||S.Range.spansMultipleLines(P.range.insert)||S.Range.spansMultipleLines(P.range.replace)||P.range.insert.startLineNumber!==N.lineNumber||P.range.replace.startLineNumber!==N.lineNumber||P.range.insert.startColumn!==P.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 P=N.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,N)).then(B=>{Object.assign(this.completion,B),this._isResolved=!0,P.dispose()},B=>{(0,p.isCancellationError)(B)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache}}e.CompletionItem=d;var n;(function(O){O[O.Top=0]="Top",O[O.Inline=1]="Inline",O[O.Bottom=2]="Bottom"})(n=e.SnippetSortOrder||(e.SnippetSortOrder={}));class a{constructor(N=2,P=new Set,B=new Set,V=!0){this.snippetSortOrder=N,this.kindFilter=P,this.providerFilter=B,this.showDeprecated=V}}e.CompletionOptions=a,a.default=new a;let o;function g(){return o}e.getSnippetSuggestSupport=g;function h(O){const N=o;return o=O,N}e.setSnippetSuggestSupport=h;class v{constructor(N,P,B,V){this.items=N,this.needsClipboard=P,this.durations=B,this.disposable=V}}e.CompletionItemModel=v;async function m(O,N,P,B=a.default,V={triggerKind:0},z=t.CancellationToken.None){const x=new k.StopWatch(!0);P=P.clone();const H=N.getWordAtPosition(P),W=H?new S.Range(P.lineNumber,H.startColumn,P.lineNumber,H.endColumn):S.Range.fromPositions(P),U={replace:W,insert:W.setEndPosition(P.lineNumber,P.column)},$=[],q=new A.DisposableStore,X=[];let G=!1;const Q=(K,Y,ee)=>{let ie=!1;if(!Y)return ie;for(const re of Y.suggestions)if(!B.kindFilter.has(re.kind)){if(!B.showDeprecated&&re?.tags?.includes(1))continue;re.range||(re.range=U),re.sortText||(re.sortText=typeof re.label=="string"?re.label:re.label.label),!G&&re.insertTextRules&&re.insertTextRules&4&&(G=r.SnippetParser.guessNeedsClipboard(re.insertText)),$.push(new d(P,re,Y,K)),ie=!0}return(0,A.isDisposable)(Y)&&q.add(Y),X.push({providerName:K._debugDisplayName??"unknown_provider",elapsedProvider:Y.duration??-1,elapsedOverall:ee.elapsed()}),ie},j=(async()=>{if(!o||B.kindFilter.has(27)||B.providerFilter.size>0&&!B.providerFilter.has(o))return;const K=new k.StopWatch(!0),Y=await o.provideCompletionItems(N,P,V,z);Q(o,Y,K)})();for(const K of O.orderedGroups(N)){let Y=!1;if(await Promise.all(K.map(async ee=>{if(!(B.providerFilter.size>0&&!B.providerFilter.has(ee)))try{const ie=new k.StopWatch(!0),re=await ee.provideCompletionItems(N,P,V,z);Y=Q(ee,re,ie)||Y}catch(ie){(0,p.onUnexpectedExternalError)(ie)}})),Y||z.isCancellationRequested)break}return await j,z.isCancellationRequested?(q.dispose(),Promise.reject(new p.CancellationError)):new v($.sort(_(B.snippetSortOrder)),G,{entries:X,elapsed:x.elapsed()},q)}e.provideSuggestionItems=m;function w(O,N){if(O.sortTextLow&&N.sortTextLow){if(O.sortTextLow<N.sortTextLow)return-1;if(O.sortTextLow>N.sortTextLow)return 1}return O.textLabel<N.textLabel?-1:O.textLabel>N.textLabel?1:O.completion.kind-N.completion.kind}function D(O,N){if(O.completion.kind!==N.completion.kind){if(O.completion.kind===27)return-1;if(N.completion.kind===27)return 1}return w(O,N)}function y(O,N){if(O.completion.kind!==N.completion.kind){if(O.completion.kind===27)return 1;if(N.completion.kind===27)return-1}return w(O,N)}const T=new Map;T.set(0,D),T.set(2,y),T.set(1,w);function _(O){return T.get(O)}e.getSuggestionComparator=_,f.CommandsRegistry.registerCommand("_executeCompletionItemProvider",async(O,...N)=>{const[P,B,V,z]=N;(0,E.assertType)(I.URI.isUri(P)),(0,E.assertType)(b.Position.isIPosition(B)),(0,E.assertType)(typeof V=="string"||!V),(0,E.assertType)(typeof z=="number"||!z);const{completionProvider:x}=O.get(l.ILanguageFeaturesService),H=await O.get(C.ITextModelService).createModelReference(P);try{const W={incomplete:!1,suggestions:[]},U=[],$=await m(x,H.object.textEditorModel,b.Position.lift(B),void 0,{triggerCharacter:V,triggerKind:V?1:0});for(const q of $.items)U.length<(z??0)&&U.push(q.resolve(t.CancellationToken.None)),W.incomplete=W.incomplete||q.container.incomplete,W.suggestions.push(q.completion);try{return await Promise.all(U),W}finally{setTimeout(()=>$.disposable.dispose(),100)}}finally{H.dispose()}});function L(O,N){O.getContribution("editor.contrib.suggestController")?.triggerSuggest(new Set().add(N),void 0,!0)}e.showSimpleSuggestions=L;class M{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,P){switch(P){case 1:return N.comments;case 2:return N.strings;default:return N.other}}}e.QuickSuggestionsOptions=M}),define(ae[821],le([1,0,110,490,40,1395]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class k extends R.EditorAction{constructor(){super({id:k.ID,label:A.localize(0,null),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(I,b){const C=!p.TabFocus.getTabFocusMode();p.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,R.registerEditorAction)(k)}),define(ae[2193],le([1,0,146,40,1396]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class A extends p.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:R.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(E,I){if(!I.hasModel())return;const b=I.getModel();b.tokenization.resetTokenization();const S=new t.StopWatch(!0);b.tokenization.forceTokenization(b.getLineCount()),S.stop(),console.log(`tokenization took ${S.elapsed()}`)}}(0,p.registerEditorAction)(A)}),define(ae[822],le([1,0,2,18,40,75,1398,47]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const I="ignoreUnusualLineTerminators";function b(r,u,i){r.setModelProperty(u.uri,I,i)}function S(r,u){return r.getModelProperty(u.uri,I)}let C=class extends t.Disposable{constructor(u,i,f){super(),this._editor=u,this._dialogService=i,this._codeEditorService=f,this._isPresentingDialog=!1,this._config=this._editor.getOption(116),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(116)&&(this._config=this._editor.getOption(116),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(c=>{c.isUndoing||this._checkForUnusualLineTerminators()}))}async _checkForUnusualLineTerminators(){if(this._config==="off"||!this._editor.hasModel())return;const u=this._editor.getModel();if(!u.mightContainUnusualLineTerminators()||S(this._codeEditorService,u)===!0||this._editor.getOption(82))return;if(this._config==="auto"){u.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let f;try{this._isPresentingDialog=!0,f=await this._dialogService.confirm({title:k.localize(0,null),message:k.localize(1,null),detail:k.localize(2,null,(0,p.basename)(u.uri)),primaryButton:k.localize(3,null),secondaryButton:k.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!f.confirmed){b(this._codeEditorService,u,!0);return}u.removeUnusualLineTerminators(this._editor.getSelections())}};C.ID="editor.contrib.unusualLineTerminatorsDetector",C=we([F(1,E.IDialogService),F(2,A.ICodeEditorService)],C),e.UnusualLineTerminatorsDetector=C,(0,R.registerEditorContribution)(C.ID,C)}),define(ae[823],le([1,0,40,361,134,240,492,409,50,20,85,59,122,1400,111,7,141]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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(G){super(G),this._inSelectionMode=G.inSelectionMode,this._wordNavigationType=G.wordNavigationType}runEditorCommand(G,Q,j){if(!Q.hasModel())return;const K=(0,E.getMapForWordSeparators)(Q.getOption(119)),Y=Q.getModel(),ie=Q.getSelections().map(re=>{const oe=new I.Position(re.positionLineNumber,re.positionColumn),se=this._move(K,Y,oe,this._wordNavigationType);return this._moveTo(re,se,this._inSelectionMode)});if(Y.pushStackElement(),Q._getViewModel().setCursorStates("moveWordCommand",3,ie.map(re=>A.CursorState.fromModelSelection(re))),ie.length===1){const re=new I.Position(ie[0].positionLineNumber,ie[0].positionColumn);Q.revealPosition(re,0)}}_moveTo(G,Q,j){return j?new S.Selection(G.selectionStartLineNumber,G.selectionStartColumn,Q.lineNumber,Q.column):new S.Selection(Q.lineNumber,Q.column,Q.lineNumber,Q.column)}}e.MoveWordCommand=l;class s extends l{_move(G,Q,j,K){return k.WordOperations.moveWordLeft(G,Q,j,K)}}e.WordLeftCommand=s;class d extends l{_move(G,Q,j,K){return k.WordOperations.moveWordRight(G,Q,j,K)}}e.WordRightCommand=d;class n extends s{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=n;class a extends s{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=a;class o extends s{constructor(){super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:f.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,f.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext)?.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=o;class g extends s{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=g;class h extends s{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=h;class v extends s{constructor(){super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,f.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext)?.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=v;class m extends s{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(G,Q,j,K){return super._move((0,E.getMapForWordSeparators)(R.EditorOptions.wordSeparators.defaultValue),Q,j,K)}}e.CursorWordAccessibilityLeft=m;class w extends s{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(G,Q,j,K){return super._move((0,E.getMapForWordSeparators)(R.EditorOptions.wordSeparators.defaultValue),Q,j,K)}}e.CursorWordAccessibilityLeftSelect=w;class D extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=D;class y extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:f.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,f.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext)?.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=y;class T extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=T;class _ extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=_;class L extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:f.ContextKeyExpr.and(C.EditorContextKeys.textInputFocus,f.ContextKeyExpr.and(i.CONTEXT_ACCESSIBILITY_MODE_ENABLED,c.IsWindowsContext)?.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=L;class M extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=M;class O extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(G,Q,j,K){return super._move((0,E.getMapForWordSeparators)(R.EditorOptions.wordSeparators.defaultValue),Q,j,K)}}e.CursorWordAccessibilityRight=O;class N extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(G,Q,j,K){return super._move((0,E.getMapForWordSeparators)(R.EditorOptions.wordSeparators.defaultValue),Q,j,K)}}e.CursorWordAccessibilityRightSelect=N;class P extends t.EditorCommand{constructor(G){super(G),this._whitespaceHeuristics=G.whitespaceHeuristics,this._wordNavigationType=G.wordNavigationType}runEditorCommand(G,Q,j){const K=G.get(r.ILanguageConfigurationService);if(!Q.hasModel())return;const Y=(0,E.getMapForWordSeparators)(Q.getOption(119)),ee=Q.getModel(),ie=Q.getSelections(),re=Q.getOption(5),oe=Q.getOption(8),se=K.getLanguageConfiguration(ee.getLanguageId()).getAutoClosingPairs(),te=Q._getViewModel(),Z=ie.map(ne=>{const ce=this._delete({wordSeparators:Y,model:ee,selection:ne,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:Q.getOption(6),autoClosingBrackets:re,autoClosingQuotes:oe,autoClosingPairs:se,autoClosedCharacters:te.getCursorAutoClosedCharacters()},this._wordNavigationType);return new p.ReplaceCommand(ce,"")});Q.pushUndoStop(),Q.executeCommands(this.id,Z),Q.pushUndoStop()}}e.DeleteWordCommand=P;class B extends P{_delete(G,Q){const j=k.WordOperations.deleteWordLeft(G,Q);return j||new b.Range(1,1,1,1)}}e.DeleteWordLeftCommand=B;class V extends P{_delete(G,Q){const j=k.WordOperations.deleteWordRight(G,Q);if(j)return j;const K=G.model.getLineCount(),Y=G.model.getLineMaxColumn(K);return new b.Range(K,Y,K,Y)}}e.DeleteWordRightCommand=V;class z extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:C.EditorContextKeys.writable})}}e.DeleteWordStartLeft=z;class x extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:C.EditorContextKeys.writable})}}e.DeleteWordEndLeft=x;class H extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=H;class W extends V{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:C.EditorContextKeys.writable})}}e.DeleteWordStartRight=W;class U extends V{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:C.EditorContextKeys.writable})}}e.DeleteWordEndRight=U;class $ extends V{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:C.EditorContextKeys.writable,kbOpts:{kbExpr:C.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=$;class q extends t.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:C.EditorContextKeys.writable,label:u.localize(0,null),alias:"Delete Word"})}run(G,Q,j){if(!Q.hasModel())return;const K=(0,E.getMapForWordSeparators)(Q.getOption(119)),Y=Q.getModel(),ie=Q.getSelections().map(re=>{const oe=k.WordOperations.deleteInsideWord(K,Y,re);return new p.ReplaceCommand(oe,"")});Q.pushUndoStop(),Q.executeCommands(this.id,ie),Q.pushUndoStop()}}e.DeleteInsideWord=q,(0,t.registerEditorCommand)(new n),(0,t.registerEditorCommand)(new a),(0,t.registerEditorCommand)(new o),(0,t.registerEditorCommand)(new g),(0,t.registerEditorCommand)(new h),(0,t.registerEditorCommand)(new v),(0,t.registerEditorCommand)(new D),(0,t.registerEditorCommand)(new y),(0,t.registerEditorCommand)(new T),(0,t.registerEditorCommand)(new _),(0,t.registerEditorCommand)(new L),(0,t.registerEditorCommand)(new M),(0,t.registerEditorCommand)(new m),(0,t.registerEditorCommand)(new w),(0,t.registerEditorCommand)(new O),(0,t.registerEditorCommand)(new N),(0,t.registerEditorCommand)(new z),(0,t.registerEditorCommand)(new x),(0,t.registerEditorCommand)(new H),(0,t.registerEditorCommand)(new W),(0,t.registerEditorCommand)(new U),(0,t.registerEditorCommand)(new $),(0,t.registerEditorAction)(q)}),define(ae[2194],le([1,0,40,492,20,59,823,31]),function(J,e,t,p,R,A,k,E){"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:769},weight:100}})}_delete(l,s){const d=p.WordPartOperations.deleteWordPartLeft(l);return d||new R.Range(1,1,1,1)}}e.DeleteWordPartLeft=I;class b extends k.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:A.EditorContextKeys.writable,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(l,s){const d=p.WordPartOperations.deleteWordPartRight(l);if(d)return d;const n=l.model.getLineCount(),a=l.model.getLineMaxColumn(n);return new R.Range(n,a,n,a)}}e.DeleteWordPartRight=b;class S extends k.MoveWordCommand{_move(l,s,d,n){return p.WordPartOperations.moveWordPartLeft(l,s,d)}}e.WordPartLeftCommand=S;class C extends S{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=C,E.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class r extends S{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}e.CursorWordPartLeftSelect=r,E.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class u extends k.MoveWordCommand{_move(l,s,d,n){return p.WordPartOperations.moveWordPartRight(l,s,d)}}e.WordPartRightCommand=u;class i extends u{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=i;class f extends u{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:A.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=f,(0,t.registerEditorCommand)(new I),(0,t.registerEditorCommand)(new b),(0,t.registerEditorCommand)(new C),(0,t.registerEditorCommand)(new r),(0,t.registerEditorCommand)(new i),(0,t.registerEditorCommand)(new f)}),define(ae[2195],le([1,0,1404,70,15,25]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuHiddenStatesReset=void 0;class k extends R.Action2{constructor(){super({id:"menu.resetHiddenStates",title:{value:(0,t.localize)(0,null),original:"Reset All Menus"},category:p.Categories.View,f1:!0})}run(I){I.get(R.IMenuService).resetHiddenStates(),I.get(A.ILogService).info("did RESET all menu hidden states")}}e.MenuHiddenStatesReset=k}),define(ae[76],le([1,0,10,752,196,755,305,489,757,580,6,2,1424,8,55,7,141,37,5,38,17,73,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"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.WorkbenchTreeFindOpen=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSupportsFind=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.RawWorkbenchListFocusContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,s.createDecorator)("listService");let g=class{get lastFocusedList(){return this._lastFocusedWidget}constructor(ce){this._themeService=ce,this.disposables=new C.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(ce){ce!==this._lastFocusedWidget&&(this._lastFocusedWidget?.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=ce,this._lastFocusedWidget?.getHTMLElement().classList.add("last-focused"))}register(ce,de){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const pe=new R.DefaultStyleController((0,t.createStyleSheet)(),"");this.disposables.add((0,a.attachListStyler)(pe,this._themeService))}if(this.lists.some(pe=>pe.widget===ce))throw new Error("Cannot register the same widget multiple times");const he={widget:ce,extraContextKeys:de};return this.lists.push(he),ce.getHTMLElement()===document.activeElement&&this.setLastFocusedList(ce),(0,C.combinedDisposable)(ce.onDidFocus(()=>this.setLastFocusedList(ce)),(0,C.toDisposable)(()=>this.lists.splice(this.lists.indexOf(he),1)),ce.onDidDispose(()=>{this.lists=this.lists.filter(pe=>pe!==he),this._lastFocusedWidget===ce&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}};g=we([F(0,o.IThemeService)],g),e.ListService=g,e.RawWorkbenchListFocusContextKey=new f.RawContextKey("listFocus",!0),e.WorkbenchListSupportsMultiSelectContextKey=new f.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=f.ContextKeyExpr.and(e.RawWorkbenchListFocusContextKey,f.ContextKeyExpr.not(c.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new f.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new f.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new f.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new f.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListSupportsFind=new f.RawContextKey("listSupportsFind",!0),e.WorkbenchTreeElementCanCollapse=new f.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new f.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new f.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new f.RawContextKey("treeElementHasChild",!1),e.WorkbenchTreeFindOpen=new f.RawContextKey("treeFindOpen",!1);const h="listTypeNavigationMode",v="listAutomaticKeyboardNavigation";function m(ne,ce){const de=ne.createScoped(ce.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(de),de}const w="workbench.list.multiSelectModifier",D="workbench.list.openMode",y="workbench.list.horizontalScrolling",T="workbench.list.defaultFindMode",_="workbench.list.keyboardNavigation",L="workbench.tree.indent",M="workbench.tree.renderIndentGuides",O="workbench.list.smoothScrolling",N="workbench.list.mouseWheelScrollSensitivity",P="workbench.list.fastScrollSensitivity",B="workbench.tree.expandMode";function V(ne){return ne.getValue(w)==="alt"}class z extends C.Disposable{constructor(ce){super(),this.configurationService=ce,this.useAltAsMultipleSelectionModifier=V(ce),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(ce=>{ce.affectsConfiguration(w)&&(this.useAltAsMultipleSelectionModifier=V(this.configurationService))}))}isSelectionSingleChangeEvent(ce){return this.useAltAsMultipleSelectionModifier?ce.browserEvent.altKey:(0,R.isSelectionSingleChangeEvent)(ce)}isSelectionRangeChangeEvent(ce){return(0,R.isSelectionRangeChangeEvent)(ce)}}function x(ne,ce){const de=ne.get(u.IConfigurationService),he=ne.get(d.IKeybindingService),pe=new C.DisposableStore;return[{...ce,keyboardNavigationDelegate:{mightProducePrintableCharacter(Se){return he.mightProducePrintableCharacter(Se)}},smoothScrolling:Boolean(de.getValue(O)),mouseWheelScrollSensitivity:de.getValue(N),fastScrollSensitivity:de.getValue(P),multipleSelectionController:ce.multipleSelectionController??pe.add(new z(de)),keyboardNavigationEventFilter:j(he)},pe]}let H=class extends R.List{get onDidOpen(){return this.navigator.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge){const ue=typeof me.horizontalScrolling<"u"?me.horizontalScrolling:Boolean(be.getValue(y)),[Ce,De]=ge.invokeFunction(x,me);super(ce,de,he,pe,{keyboardSupport:!1,...(0,a.computeStyles)(ve.getColorTheme(),a.defaultListStyles),...Ce,horizontalScrolling:ue}),this.disposables.add(De),this.contextKeyService=m(Se,this),this.themeService=ve,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(me.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(me.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=me.horizontalScrolling,this._useAltAsMultipleSelectionModifier=V(be),this.disposables.add(this.contextKeyService),this.disposables.add(Ie.register(this)),me.overrideStyles&&this.updateStyles(me.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Pe=this.getSelection(),fe=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Pe.length>0||fe.length>0),this.listMultiSelection.set(Pe.length>1),this.listDoubleSelection.set(Pe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Pe=this.getSelection(),fe=this.getFocus();this.listHasSelectionOrFocus.set(Pe.length>0||fe.length>0)})),this.disposables.add(be.onDidChangeConfiguration(Pe=>{Pe.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=V(be));let fe={};if(Pe.affectsConfiguration(y)&&this.horizontalScrolling===void 0){const ye=Boolean(be.getValue(y));fe={...fe,horizontalScrolling:ye}}if(Pe.affectsConfiguration(O)){const ye=Boolean(be.getValue(O));fe={...fe,smoothScrolling:ye}}if(Pe.affectsConfiguration(N)){const ye=be.getValue(N);fe={...fe,mouseWheelScrollSensitivity:ye}}if(Pe.affectsConfiguration(P)){const ye=be.getValue(P);fe={...fe,fastScrollSensitivity:ye}}Object.keys(fe).length>0&&this.updateOptions(fe)})),this.navigator=new X(this,{configurationService:be,...me}),this.disposables.add(this.navigator)}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,a.attachListStyler)(this,this.themeService,ce)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this._styler?.dispose(),super.dispose()}};H=we([F(5,f.IContextKeyService),F(6,e.IListService),F(7,o.IThemeService),F(8,u.IConfigurationService),F(9,s.IInstantiationService)],H),e.WorkbenchList=H;let W=class extends p.PagedList{get onDidOpen(){return this.navigator.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge){const ue=typeof me.horizontalScrolling<"u"?me.horizontalScrolling:Boolean(be.getValue(y)),[Ce,De]=ge.invokeFunction(x,me);super(ce,de,he,pe,{keyboardSupport:!1,...(0,a.computeStyles)(ve.getColorTheme(),a.defaultListStyles),...Ce,horizontalScrolling:ue}),this.disposables=new C.DisposableStore,this.disposables.add(De),this.contextKeyService=m(Se,this),this.themeService=ve,this.horizontalScrolling=me.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(me.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(me.selectionNavigation)),this._useAltAsMultipleSelectionModifier=V(be),this.disposables.add(this.contextKeyService),this.disposables.add(Ie.register(this)),me.overrideStyles&&this.updateStyles(me.overrideStyles),me.overrideStyles&&this.disposables.add((0,a.attachListStyler)(this,ve,me.overrideStyles)),this.disposables.add(be.onDidChangeConfiguration(Pe=>{Pe.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=V(be));let fe={};if(Pe.affectsConfiguration(y)&&this.horizontalScrolling===void 0){const ye=Boolean(be.getValue(y));fe={...fe,horizontalScrolling:ye}}if(Pe.affectsConfiguration(O)){const ye=Boolean(be.getValue(O));fe={...fe,smoothScrolling:ye}}if(Pe.affectsConfiguration(N)){const ye=be.getValue(N);fe={...fe,mouseWheelScrollSensitivity:ye}}if(Pe.affectsConfiguration(P)){const ye=be.getValue(P);fe={...fe,fastScrollSensitivity:ye}}Object.keys(fe).length>0&&this.updateOptions(fe)})),this.navigator=new X(this,{configurationService:be,...me}),this.disposables.add(this.navigator)}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,a.attachListStyler)(this,this.themeService,ce)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this._styler?.dispose(),this.disposables.dispose(),super.dispose()}};W=we([F(5,f.IContextKeyService),F(6,e.IListService),F(7,o.IThemeService),F(8,u.IConfigurationService),F(9,s.IInstantiationService)],W),e.WorkbenchPagedList=W;let U=class extends A.Table{get onDidOpen(){return this.navigator.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue){const Ce=typeof Se.horizontalScrolling<"u"?Se.horizontalScrolling:Boolean(ge.getValue(y)),[De,Ae]=ue.invokeFunction(x,Se);super(ce,de,he,pe,me,{keyboardSupport:!1,...(0,a.computeStyles)(be.getColorTheme(),a.defaultListStyles),...De,horizontalScrolling:Ce}),this.disposables.add(Ae),this.contextKeyService=m(Ie,this),this.themeService=be,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(Se.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(Se.selectionNavigation)),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=Se.horizontalScrolling,this._useAltAsMultipleSelectionModifier=V(ge),this.disposables.add(this.contextKeyService),this.disposables.add(ve.register(this)),Se.overrideStyles&&this.updateStyles(Se.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const fe=this.getSelection(),ye=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(fe.length>0||ye.length>0),this.listMultiSelection.set(fe.length>1),this.listDoubleSelection.set(fe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const fe=this.getSelection(),ye=this.getFocus();this.listHasSelectionOrFocus.set(fe.length>0||ye.length>0)})),this.disposables.add(ge.onDidChangeConfiguration(fe=>{fe.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=V(ge));let ye={};if(fe.affectsConfiguration(y)&&this.horizontalScrolling===void 0){const ke=Boolean(ge.getValue(y));ye={...ye,horizontalScrolling:ke}}if(fe.affectsConfiguration(O)){const ke=Boolean(ge.getValue(O));ye={...ye,smoothScrolling:ke}}if(fe.affectsConfiguration(N)){const ke=ge.getValue(N);ye={...ye,mouseWheelScrollSensitivity:ke}}if(fe.affectsConfiguration(P)){const ke=ge.getValue(P);ye={...ye,fastScrollSensitivity:ke}}Object.keys(ye).length>0&&this.updateOptions(ye)})),this.navigator=new G(this,{configurationService:ge,...Se}),this.disposables.add(this.navigator)}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,a.attachListStyler)(this,this.themeService,ce)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}dispose(){this._styler?.dispose(),this.disposables.dispose(),super.dispose()}};U=we([F(6,f.IContextKeyService),F(7,e.IListService),F(8,o.IThemeService),F(9,u.IConfigurationService),F(10,s.IInstantiationService)],U),e.WorkbenchTable=U;function $(ne="keydown",ce,de){const he=new KeyboardEvent(ne);return he.preserveFocus=ce,he.pinned=de,he.__forceEvent=!0,he}e.getSelectionKeyboardEvent=$;class q extends C.Disposable{constructor(ce,de){super(),this.widget=ce,this._onDidOpen=this._register(new S.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(S.Event.filter(this.widget.onDidChangeSelection,he=>he.browserEvent instanceof KeyboardEvent)(he=>this.onSelectionFromKeyboard(he))),this._register(this.widget.onPointer(he=>this.onPointer(he.element,he.browserEvent))),this._register(this.widget.onMouseDblClick(he=>this.onMouseDblClick(he.element,he.browserEvent))),typeof de?.openOnSingleClick!="boolean"&&de?.configurationService?(this.openOnSingleClick=de?.configurationService.getValue(D)!=="doubleClick",this._register(de?.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=de?.configurationService.getValue(D)!=="doubleClick"}))):this.openOnSingleClick=de?.openOnSingleClick??!0}onSelectionFromKeyboard(ce){if(ce.elements.length!==1)return;const de=ce.browserEvent,he=typeof de.preserveFocus=="boolean"?de.preserveFocus:!0,pe=typeof de.pinned=="boolean"?de.pinned:!he,me=!1;this._open(this.getSelectedElement(),he,pe,me,ce.browserEvent)}onPointer(ce,de){if(!this.openOnSingleClick||de.detail===2)return;const pe=de.button===1,me=!0,Se=pe,Ie=de.ctrlKey||de.metaKey||de.altKey;this._open(ce,me,Se,Ie,de)}onMouseDblClick(ce,de){if(!de)return;const he=de.target;if(he.classList.contains("monaco-tl-twistie")||he.classList.contains("monaco-icon-label")&&he.classList.contains("folder-icon")&&de.offsetX<16)return;const me=!1,Se=!0,Ie=de.ctrlKey||de.metaKey||de.altKey;this._open(ce,me,Se,Ie,de)}_open(ce,de,he,pe,me){!ce||this._onDidOpen.fire({editorOptions:{preserveFocus:de,pinned:he,revealIfVisible:!0},sideBySide:pe,element:ce,browserEvent:me})}}class X extends q{constructor(ce,de){super(ce,de),this.widget=ce}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class G extends q{constructor(ce,de){super(ce,de)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Q extends q{constructor(ce,de){super(ce,de)}getSelectedElement(){return this.widget.getSelection()[0]??void 0}}function j(ne){let ce=!1;return de=>{if(de.toKeybinding().isModifierKey())return!1;if(ce)return ce=!1,!1;const he=ne.softDispatch(de,de.target);return he?.enterChord?(ce=!0,!1):(ce=!1,!he)}}let K=class extends b.ObjectTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge){const{options:ue,getTypeNavigationMode:Ce,disposable:De}=Se.invokeFunction(se,me);super(ce,de,he,pe,ue),this.disposables.add(De),this.internals=new te(this,me,Ce,me.overrideStyles,Ie,ve,be,ge),this.disposables.add(this.internals)}updateOptions(ce){super.updateOptions(ce),this.internals.updateOptions(ce)}};K=we([F(5,s.IInstantiationService),F(6,f.IContextKeyService),F(7,e.IListService),F(8,o.IThemeService),F(9,u.IConfigurationService)],K),e.WorkbenchObjectTree=K;let Y=class extends b.CompressibleObjectTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge){const{options:ue,getTypeNavigationMode:Ce,disposable:De}=Se.invokeFunction(se,me);super(ce,de,he,pe,ue),this.disposables.add(De),this.internals=new te(this,me,Ce,me.overrideStyles,Ie,ve,be,ge),this.disposables.add(this.internals)}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};Y=we([F(5,s.IInstantiationService),F(6,f.IContextKeyService),F(7,e.IListService),F(8,o.IThemeService),F(9,u.IConfigurationService)],Y),e.WorkbenchCompressibleObjectTree=Y;let ee=class extends I.DataTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue){const{options:Ce,getTypeNavigationMode:De,disposable:Ae}=Ie.invokeFunction(se,Se);super(ce,de,he,pe,me,Ce),this.disposables.add(Ae),this.internals=new te(this,Se,De,Se.overrideStyles,ve,be,ge,ue),this.disposables.add(this.internals)}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};ee=we([F(6,s.IInstantiationService),F(7,f.IContextKeyService),F(8,e.IListService),F(9,o.IThemeService),F(10,u.IConfigurationService)],ee),e.WorkbenchDataTree=ee;let ie=class extends E.AsyncDataTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue){const{options:Ce,getTypeNavigationMode:De,disposable:Ae}=Ie.invokeFunction(se,Se);super(ce,de,he,pe,me,Ce),this.disposables.add(Ae),this.internals=new te(this,Se,De,Se.overrideStyles,ve,be,ge,ue),this.disposables.add(this.internals)}updateOptions(ce={}){super.updateOptions(ce),ce.overrideStyles&&this.internals.updateStyleOverrides(ce.overrideStyles),this.internals.updateOptions(ce)}};ie=we([F(6,s.IInstantiationService),F(7,f.IContextKeyService),F(8,e.IListService),F(9,o.IThemeService),F(10,u.IConfigurationService)],ie),e.WorkbenchAsyncDataTree=ie;let re=class extends E.CompressibleAsyncDataTree{get contextKeyService(){return this.internals.contextKeyService}get useAltAsMultipleSelectionModifier(){return this.internals.useAltAsMultipleSelectionModifier}get onDidOpen(){return this.internals.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce){const{options:De,getTypeNavigationMode:Ae,disposable:Pe}=ve.invokeFunction(se,Ie);super(ce,de,he,pe,me,Se,De),this.disposables.add(Pe),this.internals=new te(this,Ie,Ae,Ie.overrideStyles,be,ge,ue,Ce),this.disposables.add(this.internals)}updateOptions(ce){super.updateOptions(ce),this.internals.updateOptions(ce)}};re=we([F(7,s.IInstantiationService),F(8,f.IContextKeyService),F(9,e.IListService),F(10,o.IThemeService),F(11,u.IConfigurationService)],re),e.WorkbenchCompressibleAsyncDataTree=re;function oe(ne){const ce=ne.getValue(T);if(ce==="highlight")return k.TreeFindMode.Highlight;if(ce==="filter")return k.TreeFindMode.Filter;const de=ne.getValue(_);if(de==="simple"||de==="highlight")return k.TreeFindMode.Highlight;if(de==="filter")return k.TreeFindMode.Filter}function se(ne,ce){const de=ne.get(u.IConfigurationService),he=ne.get(l.IContextViewService),pe=ne.get(f.IContextKeyService),me=ne.get(s.IInstantiationService),Se=()=>{const ue=pe.getContextKeyValue(h);if(ue==="automatic")return R.TypeNavigationMode.Automatic;if(ue==="trigger"||pe.getContextKeyValue(v)===!1)return R.TypeNavigationMode.Trigger},Ie=ce.horizontalScrolling!==void 0?ce.horizontalScrolling:Boolean(de.getValue(y)),[ve,be]=me.invokeFunction(x,ce),ge=ce.additionalScrollHeight;return{getTypeNavigationMode:Se,disposable:be,options:{keyboardSupport:!1,...ve,indent:typeof de.getValue(L)=="number"?de.getValue(L):void 0,renderIndentGuides:de.getValue(M),smoothScrolling:Boolean(de.getValue(O)),defaultFindMode:oe(de),horizontalScrolling:Ie,additionalScrollHeight:ge,hideTwistiesOfChildlessElements:ce.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:ce.expandOnlyOnTwistieClick??de.getValue(B)==="doubleClick",contextViewProvider:he}}}let te=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(ce,de,he,pe,me,Se,Ie,ve){this.tree=ce,this.themeService=Ie,this.disposables=[],this.contextKeyService=m(me,ce),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(de.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(Boolean(de.selectionNavigation)),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set(de.findWidgetEnabled??!0),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.treeFindOpen=e.WorkbenchTreeFindOpen.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=V(ve),this.updateStyleOverrides(pe);const ge=()=>{const Ce=ce.getFocus()[0];if(!Ce)return;const De=ce.getNode(Ce);this.treeElementCanCollapse.set(De.collapsible&&!De.collapsed),this.treeElementHasParent.set(!!ce.getParentElement(Ce)),this.treeElementCanExpand.set(De.collapsible&&De.collapsed),this.treeElementHasChild.set(!!ce.getFirstElementChild(Ce))},ue=new Set;ue.add(h),ue.add(v),this.disposables.push(this.contextKeyService,Se.register(ce),ce.onDidChangeSelection(()=>{const Ce=ce.getSelection(),De=ce.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(Ce.length>0||De.length>0),this.hasMultiSelection.set(Ce.length>1),this.hasDoubleSelection.set(Ce.length===2)})}),ce.onDidChangeFocus(()=>{const Ce=ce.getSelection(),De=ce.getFocus();this.hasSelectionOrFocus.set(Ce.length>0||De.length>0),ge()}),ce.onDidChangeCollapseState(ge),ce.onDidChangeModel(ge),ce.onDidChangeFindOpenState(Ce=>this.treeFindOpen.set(Ce)),ve.onDidChangeConfiguration(Ce=>{let De={};if(Ce.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=V(ve)),Ce.affectsConfiguration(L)){const Ae=ve.getValue(L);De={...De,indent:Ae}}if(Ce.affectsConfiguration(M)){const Ae=ve.getValue(M);De={...De,renderIndentGuides:Ae}}if(Ce.affectsConfiguration(O)){const Ae=Boolean(ve.getValue(O));De={...De,smoothScrolling:Ae}}if((Ce.affectsConfiguration(T)||Ce.affectsConfiguration(_))&&ce.updateOptions({defaultFindMode:oe(ve)}),Ce.affectsConfiguration(y)&&de.horizontalScrolling===void 0){const Ae=Boolean(ve.getValue(y));De={...De,horizontalScrolling:Ae}}if(Ce.affectsConfiguration(B)&&de.expandOnlyOnTwistieClick===void 0&&(De={...De,expandOnlyOnTwistieClick:ve.getValue(B)==="doubleClick"}),Ce.affectsConfiguration(N)){const Ae=ve.getValue(N);De={...De,mouseWheelScrollSensitivity:Ae}}if(Ce.affectsConfiguration(P)){const Ae=ve.getValue(P);De={...De,fastScrollSensitivity:Ae}}Object.keys(De).length>0&&ce.updateOptions(De)}),this.contextKeyService.onDidChangeContext(Ce=>{Ce.affectsSome(ue)&&ce.updateOptions({typeNavigationMode:he()})})),this.navigator=new Q(ce,{configurationService:ve,...de}),this.disposables.push(this.navigator)}get useAltAsMultipleSelectionModifier(){return this._useAltAsMultipleSelectionModifier}updateOptions(ce){ce.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!ce.multipleSelectionSupport)}updateStyleOverrides(ce){(0,C.dispose)(this.styler),this.styler=(0,a.attachListStyler)(this.tree,this.themeService,ce)}dispose(){this.disposables=(0,C.dispose)(this.disposables),(0,C.dispose)(this.styler),this.styler=void 0}};te=we([F(4,f.IContextKeyService),F(5,e.IListService),F(6,o.IThemeService),F(7,u.IConfigurationService)],te),n.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,r.localize)(0,null),type:"object",properties:{[w]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,r.localize)(1,null),(0,r.localize)(2,null)],default:"ctrlCmd",description:(0,r.localize)(3,null)},[D]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,r.localize)(4,null)},[y]:{type:"boolean",default:!1,description:(0,r.localize)(5,null)},[L]:{type:"number",default:8,minimum:4,maximum:40,description:(0,r.localize)(6,null)},[M]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,r.localize)(7,null)},[O]:{type:"boolean",default:!1,description:(0,r.localize)(8,null)},[N]:{type:"number",default:1,markdownDescription:(0,r.localize)(9,null)},[P]:{type:"number",default:5,description:(0,r.localize)(10,null)},[T]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,r.localize)(11,null),(0,r.localize)(12,null)],default:"highlight",description:(0,r.localize)(13,null)},[_]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,r.localize)(14,null),(0,r.localize)(15,null),(0,r.localize)(16,null)],default:"highlight",description:(0,r.localize)(17,null),deprecated:!0,deprecationMessage:(0,r.localize)(18,null)},[B]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,r.localize)(19,null)}}})}),define(ae[254],le([1,0,10,195,90,133,6,2,41,33,12]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let C=class extends E.Disposable{get enabled(){return this._enabled}set enabled(u){u?(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=u}set link(u){typeof u.label=="string"?this.el.textContent=u.label:((0,t.clearNode)(this.el),this.el.appendChild(u.label)),this.el.href=u.href,typeof u.tabIndex<"u"&&(this.el.tabIndex=u.tabIndex),typeof u.title<"u"&&(this.el.title=u.title),this._link=u}constructor(u,i,f={},c){super(),this._link=i,this._enabled=!0,this.el=(0,t.append)(u,(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 p.DomEmitter(this.el,"click")),s=this._register(new p.DomEmitter(this.el,"keypress")),d=k.Event.chain(s.event).map(o=>new R.StandardKeyboardEvent(o)).filter(o=>o.keyCode===3).event,n=this._register(new p.DomEmitter(this.el,A.EventType.Tap)).event;this._register(A.Gesture.addTarget(this.el));const a=k.Event.any(l.event,d,n);this._register(a(o=>{!this.enabled||(t.EventHelper.stop(o,!0),f?.opener?f.opener(this._link.href):c.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};C=we([F(3,I.IOpenerService)],C),e.Link=C,(0,S.registerThemingParticipant)((r,u)=>{const i=r.getColor(b.textLinkForeground);i&&u.addRule(`.monaco-link { color: ${i}; }`);const f=r.getColor(b.textLinkActiveForeground);f&&u.addRule(`.monaco-link:hover { color: ${f}; }`)})}),define(ae[2196],le([1,0,32,6,1308,111,7,5,198,76,2118,33,73,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let i=class extends u.Themable{get backButton(){return this.controller.backButton}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(S.QuickAccessController))),this._quickAccess}constructor(c,l,s,d,n){super(s),this.instantiationService=c,this.contextKeyService=l,this.accessibilityService=d,this.layoutService=n,this._onShow=this._register(new p.Emitter),this.onShow=this._onShow.event,this._onHide=this._register(new p.Emitter),this.onHide=this._onHide.event,this.contexts=new Map}createController(c=this.layoutService,l){const s={idPrefix:"quickInput_",container:c.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:n=>this.setContextKey(n),returnFocus:()=>c.focus(),createList:(n,a,o,g,h)=>this.instantiationService.createInstance(b.WorkbenchList,n,a,o,g,h),styles:this.computeStyles()},d=this._register(new R.QuickInputController({...s,...l}));return d.layout(c.dimension,c.offset.quickPickTop),this._register(c.onDidLayout(n=>d.layout(n,c.offset.quickPickTop))),this._register(d.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(d.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),d}setContextKey(c){let l;c&&(l=this.contexts.get(c),l||(l=new k.RawContextKey(c,!1).bindTo(this.contextKeyService),this.contexts.set(c,l))),!(l&&l.get())&&(this.resetContextKeys(),l?.set(!0))}resetContextKeys(){this.contexts.forEach(c=>{c.get()&&c.reset()})}pick(c,l={},s=t.CancellationToken.None){return this.controller.pick(c,l,s)}input(c={},l=t.CancellationToken.None){return this.controller.input(c,l)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}focus(){this.controller.focus()}toggle(){this.controller.toggle()}navigate(c,l){this.controller.navigate(c,l)}accept(c){return this.controller.accept(c)}back(){return this.controller.back()}cancel(){return this.controller.cancel()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{...(0,r.computeStyles)(this.theme,{quickInputBackground:C.quickInputBackground,quickInputForeground:C.quickInputForeground,quickInputTitleBackground:C.quickInputTitleBackground,contrastBorder:C.contrastBorder,widgetShadow:C.widgetShadow})},inputBox:(0,r.computeStyles)(this.theme,{inputForeground:C.inputForeground,inputBackground:C.inputBackground,inputBorder:C.inputBorder,inputValidationInfoBackground:C.inputValidationInfoBackground,inputValidationInfoForeground:C.inputValidationInfoForeground,inputValidationInfoBorder:C.inputValidationInfoBorder,inputValidationWarningBackground:C.inputValidationWarningBackground,inputValidationWarningForeground:C.inputValidationWarningForeground,inputValidationWarningBorder:C.inputValidationWarningBorder,inputValidationErrorBackground:C.inputValidationErrorBackground,inputValidationErrorForeground:C.inputValidationErrorForeground,inputValidationErrorBorder:C.inputValidationErrorBorder}),countBadge:(0,r.computeStyles)(this.theme,{badgeBackground:C.badgeBackground,badgeForeground:C.badgeForeground,badgeBorder:C.contrastBorder}),button:(0,r.computeStyles)(this.theme,{buttonForeground:C.buttonForeground,buttonBackground:C.buttonBackground,buttonHoverBackground:C.buttonHoverBackground,buttonBorder:C.contrastBorder}),progressBar:(0,r.computeStyles)(this.theme,{progressBarBackground:C.progressBarBackground}),keybindingLabel:(0,r.computeStyles)(this.theme,{keybindingLabelBackground:C.keybindingLabelBackground,keybindingLabelForeground:C.keybindingLabelForeground,keybindingLabelBorder:C.keybindingLabelBorder,keybindingLabelBottomBorder:C.keybindingLabelBottomBorder,keybindingLabelShadow:C.widgetShadow}),list:(0,r.computeStyles)(this.theme,{listBackground:C.quickInputBackground,listInactiveFocusForeground:C.quickInputListFocusForeground,listInactiveSelectionIconForeground:C.quickInputListFocusIconForeground,listInactiveFocusBackground:C.quickInputListFocusBackground,listFocusOutline:C.activeContrastBorder,listInactiveFocusOutline:C.activeContrastBorder,pickerGroupBorder:C.pickerGroupBorder,pickerGroupForeground:C.pickerGroupForeground})}}};i=we([F(0,E.IInstantiationService),F(1,k.IContextKeyService),F(2,u.IThemeService),F(3,A.IAccessibilityService),F(4,I.ILayoutService)],i),e.QuickInputService=i}),define(ae[824],le([1,0,29,1428,12]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showWithPinnedItems=void 0;const A=R.ThemeIcon.asClassName(t.Codicon.pin),k=R.ThemeIcon.asClassName(t.Codicon.pinned),E=[A,k];async function I(f,c,l,s){const d=l.items;let n=b(c,l,f,void 0,s);l.onDidTriggerItemButton(async a=>{a.button.iconClass&&E.includes(a.button.iconClass)&&(l.items=d,n=b(c,l,f,a.item,s),l.items=l.value?d:n)}),l.onDidChangeValue(async a=>{l.items=a?d:n}),l.items=l.value?d:n,l.show()}e.showWithPinnedItems=I;function b(f,c,l,s,d){const n=[];let a;s?a=u(f,s,l):a=i(f,l),a.length&&n.push({type:"separator",label:(0,p.localize)(0,null)});const o=new Set;for(const g of a){const h=c.items.find(v=>r(v,g));if(h){const v=S(h),m=Object.assign({},h);(!d||!o.has(v))&&(o.add(v),C(m,!1),n.push(m))}}for(const g of c.items)C(g,!0),n.push(g);return n}function S(f){return f.type==="separator"?"":f.id||`${f.label}${f.description}${f.detail}}`}function C(f,c){if(f.type==="separator")return;const l=f.buttons?.filter(s=>s.iconClass&&!E.includes(s.iconClass))??[];l.unshift({iconClass:c?A:k,tooltip:c?(0,p.localize)(1,null):(0,p.localize)(2,null),alwaysVisible:!1}),f.buttons=l}function r(f,c){return S(f)===S(c)}function u(f,c,l){const s=c.buttons?.find(n=>n.iconClass===k);let d=i(f,l);return s?d=d.filter(n=>S(n)!==S(c)):d.push(c),l.store(f,JSON.stringify(d),1,0),d}function i(f,c){const l=c.get(f,1);return l?JSON.parse(l):[]}}),define(ae[432],le([1,0,29,68,33,12]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var k;(function(E){function I(b){switch(b){case p.default.Ignore:return"severity-ignore "+t.Codicon.info.classNames;case p.default.Info:return t.Codicon.info.classNames;case p.default.Warning:return t.Codicon.warning.classNames;case p.default.Error:return t.Codicon.error.classNames;default:return""}}E.className=I})(k=e.SeverityIcon||(e.SeverityIcon={})),(0,A.registerThemingParticipant)((E,I)=>{const b=E.getColor(R.problemsErrorIconForeground);if(b){const r=t.Codicon.error.cssSelector;I.addRule(` .monaco-editor .zone-widget ${r}, .markers-panel .marker-icon${r}, .text-search-provider-messages .providerMessage ${r}, .extensions-viewlet > .extensions ${r} { color: ${b}; } `)}const S=E.getColor(R.problemsWarningIconForeground);if(S){const r=t.Codicon.warning.cssSelector;I.addRule(` .monaco-editor .zone-widget ${r}, .markers-panel .marker-icon${r}, .extensions-viewlet > .extensions ${r}, .extension-editor ${r}, .text-search-provider-messages .providerMessage ${r}, .preferences-editor ${r} { color: ${S}; } `)}const C=E.getColor(R.problemsInfoIconForeground);if(C){const r=t.Codicon.info.cssSelector;I.addRule(` .monaco-editor .zone-widget ${r}, .markers-panel .marker-icon${r}, .extensions-viewlet > .extensions ${r}, .text-search-provider-messages .providerMessage ${r}, .extension-editor ${r} { color: ${C}; } `)}})}),define(ae[509],le([1,0,29,9,1432,12]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isUriComponents=e.terminalIconsEqual=e.terminalProfileArgsMatch=e.createProfileSchemaEnums=void 0;function k(r,u){const i=[{name:null,description:(0,R.localize)(0,null)}];return i.push(...r.map(f=>({name:f.profileName,description:E(f)}))),u&&i.push(...u.map(f=>({name:f.title,description:I(f)}))),{values:i.map(f=>f.name),markdownDescriptions:i.map(f=>f.description)}}e.createProfileSchemaEnums=k;function E(r){let u=`$(${A.ThemeIcon.isThemeIcon(r.icon)?r.icon.id:r.icon?r.icon:t.Codicon.terminal.id}) ${r.profileName} - path: ${r.path}`;return r.args&&(typeof r.args=="string"?u+=` - args: "${r.args}"`:u+=` - args: [${r.args.length===0?"":`'${r.args.join("','")}'`}]`),r.overrideName!==void 0&&(u+=` - overrideName: ${r.overrideName}`),r.color&&(u+=` - color: ${r.color}`),r.env&&(u+=` - env: ${JSON.stringify(r.env)}`),u}function I(r){return`$(${A.ThemeIcon.isThemeIcon(r.icon)?r.icon.id:r.icon?r.icon:t.Codicon.terminal.id}) ${r.title} - extensionIdentifier: ${r.extensionIdentifier}`}function b(r,u){if(!r&&!u)return!0;if(typeof r=="string"&&typeof u=="string")return r===u;if(Array.isArray(r)&&Array.isArray(u)){if(r.length!==u.length)return!1;for(let i=0;i<r.length;i++)if(r[i]!==u[i])return!1;return!0}return!1}e.terminalProfileArgsMatch=b;function S(r,u){if(!r&&!u)return!0;if(!r||!u)return!1;if(A.ThemeIcon.isThemeIcon(r)&&A.ThemeIcon.isThemeIcon(u))return r.id===u.id&&r.color===u.color;if(typeof r=="object"&&"light"in r&&"dark"in r&&typeof u=="object"&&"light"in u&&"dark"in u){const i=r,f=u;if((p.URI.isUri(i.light)||C(i.light))&&(p.URI.isUri(i.dark)||C(i.dark))&&(p.URI.isUri(f.light)||C(f.light))&&(p.URI.isUri(f.dark)||C(f.dark)))return i.light.path===f.light.path&&i.dark.path===f.dark.path}if(p.URI.isUri(r)&&p.URI.isUri(u)||C(r)||C(u)){const i=r,f=u;return i.path===f.path&&i.scheme===f.scheme}return!1}e.terminalIconsEqual=S;function C(r){return r?typeof r.path=="string"&&typeof r.scheme=="string":!1}e.isUriComponents=C}),define(ae[615],le([1,0,29,1431,55,17,509]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalDefaultProfileConfiguration=e.registerTerminalPlatformConfiguration=e.terminalIconSchema=e.terminalColorSchema=void 0,e.terminalColorSchema={type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"],default:null},e.terminalIconSchema={type:"string",enum:Array.from(t.Codicon.getAll(),n=>n.id),markdownEnumDescriptions:Array.from(t.Codicon.getAll(),n=>`$(${n.id})`)};const E={args:{description:(0,p.localize)(0,null),type:"array",items:{type:"string"}},overrideName:{description:(0,p.localize)(1,null),type:"boolean"},icon:{description:(0,p.localize)(2,null),...e.terminalIconSchema},color:{description:(0,p.localize)(3,null),...e.terminalColorSchema},env:{markdownDescription:(0,p.localize)(4,null),type:"object",additionalProperties:{type:["string","null"]},default:{}}},I={type:"object",required:["path"],properties:{path:{description:(0,p.localize)(5,null),type:["string","array"],items:{type:"string"}},...E}},b={type:"object",required:["path"],properties:{path:{description:(0,p.localize)(6,null),type:["string"],items:{type:"string"}},...E}},S=(0,p.localize)(7,null,"`#terminal.integrated.profiles.linux#`","`#terminal.integrated.defaultProfile.linux#`"),C=(0,p.localize)(8,null,"`#terminal.integrated.profiles.osx#`","`#terminal.integrated.defaultProfile.osx#`"),r=(0,p.localize)(9,null,"`#terminal.integrated.profiles.windows#`","`#terminal.integrated.defaultProfile.windows#`"),u=(0,p.localize)(10,null,"`#terminal.integrated.automationProfile.linux#`"),i=(0,p.localize)(11,null,"`#terminal.integrated.automationProfile.osx#`"),f=(0,p.localize)(12,null,"`#terminal.integrated.automationProfile.windows#`"),c={id:"terminal",order:100,title:(0,p.localize)(13,null),type:"object",properties:{["terminal.integrated.automationShell.linux"]:{restricted:!0,markdownDescription:(0,p.localize)(14,null,"`terminal.integrated.shell.linux`","`shellArgs`"),type:["string","null"],default:null,markdownDeprecationMessage:u},["terminal.integrated.automationShell.osx"]:{restricted:!0,markdownDescription:(0,p.localize)(15,null,"`terminal.integrated.shell.osx`","`shellArgs`"),type:["string","null"],default:null,markdownDeprecationMessage:i},["terminal.integrated.automationShell.windows"]:{restricted:!0,markdownDescription:(0,p.localize)(16,null,"`terminal.integrated.shell.windows`","`shellArgs`"),type:["string","null"],default:null,markdownDeprecationMessage:f},["terminal.integrated.automationProfile.linux"]:{restricted:!0,markdownDescription:(0,p.localize)(17,null,"`terminal.integrated.automationShell.linux`"),type:["object","null"],default:null,anyOf:[{type:"null"},b],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.osx"]:{restricted:!0,markdownDescription:(0,p.localize)(18,null,"`terminal.integrated.automationShell.osx`"),type:["object","null"],default:null,anyOf:[{type:"null"},b],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.automationProfile.windows"]:{restricted:!0,markdownDescription:(0,p.localize)(19,null,"`terminal.integrated.automationShell.windows`"),type:["object","null"],default:null,anyOf:[{type:"null"},b],defaultSnippets:[{body:{path:"${1}",icon:"${2}"}}]},["terminal.integrated.shell.linux"]:{restricted:!0,markdownDescription:(0,p.localize)(20,null),type:["string","null"],default:null,markdownDeprecationMessage:S},["terminal.integrated.shell.osx"]:{restricted:!0,markdownDescription:(0,p.localize)(21,null),type:["string","null"],default:null,markdownDeprecationMessage:C},["terminal.integrated.shell.windows"]:{restricted:!0,markdownDescription:(0,p.localize)(22,null),type:["string","null"],default:null,markdownDeprecationMessage:r},["terminal.integrated.shellArgs.linux"]:{restricted:!0,markdownDescription:(0,p.localize)(23,null),type:"array",items:{type:"string"},default:[],markdownDeprecationMessage:S},["terminal.integrated.shellArgs.osx"]:{restricted:!0,markdownDescription:(0,p.localize)(24,null),type:"array",items:{type:"string"},default:["-l"],markdownDeprecationMessage:C},["terminal.integrated.shellArgs.windows"]:{restricted:!0,markdownDescription:(0,p.localize)(25,null),anyOf:[{type:"array",items:{type:"string",markdownDescription:(0,p.localize)(26,null)}},{type:"string",markdownDescription:(0,p.localize)(27,null)}],default:[],markdownDeprecationMessage:r},["terminal.integrated.profiles.windows"]:{restricted:!0,markdownDescription:(0,p.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,p.localize)(29,null),enum:["PowerShell","Git Bash"]},...E}},{type:"object",required:["extensionIdentifier","id","title"],properties:{extensionIdentifier:{description:(0,p.localize)(30,null),type:"string"},id:{description:(0,p.localize)(31,null),type:"string"},title:{description:(0,p.localize)(32,null),type:"string"},...E}},{type:"null"},I]}},["terminal.integrated.profiles.osx"]:{restricted:!0,markdownDescription:(0,p.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,p.localize)(34,null),type:"string"},id:{description:(0,p.localize)(35,null),type:"string"},title:{description:(0,p.localize)(36,null),type:"string"},...E}},{type:"null"},I]}},["terminal.integrated.profiles.linux"]:{restricted:!0,markdownDescription:(0,p.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,p.localize)(38,null),type:"string"},id:{description:(0,p.localize)(39,null),type:"string"},title:{description:(0,p.localize)(40,null),type:"string"},...E}},{type:"null"},I]}},["terminal.integrated.useWslProfiles"]:{description:(0,p.localize)(41,null),type:"boolean",default:!0},["terminal.integrated.inheritEnv"]:{scope:1,description:(0,p.localize)(42,null),type:"boolean",default:!0},["terminal.integrated.persistentSessionScrollback"]:{scope:1,markdownDescription:(0,p.localize)(43,null),type:"number",default:100},["terminal.integrated.showLinkHover"]:{scope:1,description:(0,p.localize)(44,null),type:"boolean",default:!0},["terminal.integrated.ignoreProcessNames"]:{description:(0,p.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(R.Extensions.Configuration).registerConfiguration(c),d()}e.registerTerminalPlatformConfiguration=l;let s;function d(n,a){const o=A.Registry.as(R.Extensions.Configuration);let g;n&&(g=(0,k.createProfileSchemaEnums)(n?.profiles,a));const h=s;s={id:"terminal",order:100,title:(0,p.localize)(46,null),type:"object",properties:{["terminal.integrated.defaultProfile.linux"]:{restricted:!0,markdownDescription:(0,p.localize)(47,null,"`terminal.integrated.shell.linux`","`terminal.integrated.shellArgs.linux`"),type:["string","null"],default:null,enum:n?.os===3?g?.values:void 0,markdownEnumDescriptions:n?.os===3?g?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.osx"]:{restricted:!0,markdownDescription:(0,p.localize)(48,null,"`terminal.integrated.shell.osx`","`terminal.integrated.shellArgs.osx`"),type:["string","null"],default:null,enum:n?.os===2?g?.values:void 0,markdownEnumDescriptions:n?.os===2?g?.markdownDescriptions:void 0},["terminal.integrated.defaultProfile.windows"]:{restricted:!0,markdownDescription:(0,p.localize)(49,null,"`terminal.integrated.shell.windows`","`terminal.integrated.shellArgs.windows`"),type:["string","null"],default:null,enum:n?.os===1?g?.values:void 0,markdownEnumDescriptions:n?.os===1?g?.markdownDescriptions:void 0}}},o.updateConfigurations({add:[s],remove:h?[h]:[]})}e.registerTerminalDefaultProfileConfiguration=d}),define(ae[63],le([1,0,11,29,6,13,9,1434,155,17,12]),function(J,e,t,p,R,A,k,E,I,b,S){"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.IconFontDefinition=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var C;(function(n){function a(o,g){let h=o.defaults;for(;S.ThemeIcon.isThemeIcon(h);){const v=i.getIcon(h.id);if(!v)return;h=v.defaults}return h}n.getDefinition=a})(C=e.IconContribution||(e.IconContribution={}));var r;(function(n){function a(g){return{weight:g.weight,style:g.style,src:g.src.map(h=>({format:h.format,location:h.location.toString()}))}}n.toJSONObject=a;function o(g){const h=v=>(0,A.isString)(v)?v:void 0;if(g&&Array.isArray(g.src)&&g.src.every(v=>(0,A.isString)(v.format)&&(0,A.isString)(v.location)))return{weight:h(g.weight),style:h(g.style),src:g.src.map(v=>({format:v.format,location:k.URI.parse(v.location)}))}}n.fromJSONObject=o})(r=e.IconFontDefinition||(e.IconFontDefinition={}));class u{constructor(){this._onDidChange=new R.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,E.localize)(0,null)},fontCharacter:{type:"string",description:(0,E.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${p.CSSIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(a,o,g,h){const v=this.iconsById[a];if(v){if(g&&!v.description){v.description=g,this.iconSchema.properties[a].markdownDescription=`${g} $(${a})`;const D=this.iconReferenceSchema.enum.indexOf(a);D!==-1&&(this.iconReferenceSchema.enumDescriptions[D]=g),this._onDidChange.fire()}return v}const m={id:a,description:g,defaults:o,deprecationMessage:h};this.iconsById[a]=m;const w={$ref:"#/definitions/icons"};return h&&(w.deprecationMessage=h),g&&(w.markdownDescription=`${g}: $(${a})`),this.iconSchema.properties[a]=w,this.iconReferenceSchema.enum.push(a),this.iconReferenceSchema.enumDescriptions.push(g||""),this._onDidChange.fire(),{id:a}}deregisterIcon(a){delete this.iconsById[a],delete this.iconSchema.properties[a];const o=this.iconReferenceSchema.enum.indexOf(a);o!==-1&&(this.iconReferenceSchema.enum.splice(o,1),this.iconReferenceSchema.enumDescriptions.splice(o,1)),this._onDidChange.fire()}getIcons(){return Object.keys(this.iconsById).map(a=>this.iconsById[a])}getIcon(a){return this.iconsById[a]}getIconSchema(){return this.iconSchema}getIconReferenceSchema(){return this.iconReferenceSchema}registerIconFont(a,o){const g=this.iconFontsById[a];return g||(this.iconFontsById[a]=o,this._onDidChange.fire(),o)}deregisterIconFont(a){delete this.iconFontsById[a]}getIconFont(a){return this.iconFontsById[a]}toString(){const a=(v,m)=>v.id.localeCompare(m.id),o=v=>{for(;S.ThemeIcon.isThemeIcon(v.defaults);)v=this.iconsById[v.defaults.id];return`codicon codicon-${v?v.id:""}`},g=[];g.push("| preview | identifier | default codicon ID | description"),g.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const h=Object.keys(this.iconsById).map(v=>this.iconsById[v]);for(const v of h.filter(m=>!!m.description).sort(a))g.push(`|<i class="${o(v)}"></i>|${v.id}|${S.ThemeIcon.isThemeIcon(v.defaults)?v.defaults.id:v.id}|${v.description||""}|`);g.push("| preview | identifier "),g.push("| ----------- | --------------------------------- |");for(const v of h.filter(m=>!S.ThemeIcon.isThemeIcon(m.defaults)).sort(a))g.push(`|<i class="${o(v)}"></i>|${v.id}|`);return g.join(` `)}}const i=new u;b.Registry.add(e.Extensions.IconContribution,i);function f(n,a,o,g){return i.registerIcon(n,a,o,g)}e.registerIcon=f;function c(){return i}e.getIconRegistry=c;function l(){for(const n of p.Codicon.getAll())i.registerIcon(n.id,n.definition,n.description)}l(),e.iconsSchemaId="vscode://schemas/icons";const s=b.Registry.as(I.Extensions.JSONContribution);s.registerSchema(e.iconsSchemaId,i.getIconSchema());const d=new t.RunOnceScheduler(()=>s.notifySchemaChanged(e.iconsSchemaId),200);i.onDidChange(()=>{d.isScheduled()||d.schedule()}),e.widgetClose=f("widget-close",p.Codicon.close,(0,E.localize)(2,null)),e.gotoPreviousLocation=f("goto-previous-location",p.Codicon.arrowUp,(0,E.localize)(3,null)),e.gotoNextLocation=f("goto-next-location",p.Codicon.arrowDown,(0,E.localize)(4,null)),e.syncing=S.ThemeIcon.modify(p.Codicon.sync,"spin"),e.spinningLoading=S.ThemeIcon.modify(p.Codicon.loading,"spin")}),define(ae[2197],le([1,0,1314,10,121,79,147,36,2,235,40,75,134,301,50,167,424,281,7,33,12,29,63,42,1073]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffReview=void 0;const h=3;var v;(function(N){N[N.Equal=0]="Equal",N[N.Insert=1]="Insert",N[N.Delete=2]="Delete"})(v||(v={}));class m{constructor(P,B,V,z){this.originalLineStart=P,this.originalLineEnd=B,this.modifiedLineStart=V,this.modifiedLineEnd=z}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class w{constructor(P){this.entries=P}}const D=(0,o.registerIcon)("diff-review-insert",a.Codicon.add,t.localize(0,null)),y=(0,o.registerIcon)("diff-review-remove",a.Codicon.remove,t.localize(1,null)),T=(0,o.registerIcon)("diff-review-close",a.Codicon.close,t.localize(2,null));let _=class qi extends I.Disposable{constructor(P,B){super(),this._languageService=B,this._width=0,this._diffEditor=P,this._isVisible=!1,this.shadow=(0,R.createFastDomNode)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,R.createFastDomNode)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new A.ActionBar(this.actionBarContainer.domNode)),this._actionBar.push(new E.Action("diffreview.close",t.localize(3,null),"close-diff-review "+n.ThemeIcon.asClassName(T),!0,async()=>this.hide()),{label:!1,icon:!0}),this.domNode=(0,R.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,R.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(P.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(P.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(p.addStandardDisposableListener(this.domNode.domNode,"click",V=>{V.preventDefault();const z=p.findParentWithClass(V.target,"diff-review-row");z&&this._goToRow(z)})),this._register(p.addStandardDisposableListener(this.domNode.domNode,"keydown",V=>{(V.equals(18)||V.equals(2066)||V.equals(530))&&(V.preventDefault(),this._goToRow(this._getNextRow())),(V.equals(16)||V.equals(2064)||V.equals(528))&&(V.preventDefault(),this._goToRow(this._getPrevRow())),(V.equals(9)||V.equals(2057)||V.equals(521)||V.equals(1033))&&(V.preventDefault(),this.hide()),(V.equals(10)||V.equals(3))&&(V.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let P=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let V=-1;for(let z=0,x=this._diffs.length;z<x;z++)if(this._diffs[z]===this._currentDiff){V=z;break}P=this._diffs.length+V-1}else P=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;P=P%this._diffs.length;const B=this._diffs[P].entries;this._diffEditor.setPosition(new i.Position(B[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:B[0].modifiedLineStart,endColumn:1073741824,endLineNumber:B[B.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let P=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let V=-1;for(let z=0,x=this._diffs.length;z<x;z++)if(this._diffs[z]===this._currentDiff){V=z;break}P=V+1}else P=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;P=P%this._diffs.length;const B=this._diffs[P].entries;this._diffEditor.setPosition(new i.Position(B[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:B[0].modifiedLineStart,endColumn:1073741824,endLineNumber:B[B.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let P=-1;const B=this._getCurrentFocusedRow();if(B){const V=parseInt(B.getAttribute("data-line"),10);isNaN(V)||(P=V)}this.hide(),P!==-1&&(this._diffEditor.setPosition(new i.Position(P,1)),this._diffEditor.revealPosition(new i.Position(P,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){const P=this._getCurrentFocusedRow();return P?P.previousElementSibling?P.previousElementSibling:P:this._getFirstRow()}_getNextRow(){const P=this._getCurrentFocusedRow();return P?P.nextElementSibling?P.nextElementSibling:P:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){const P=document.activeElement;return P&&/diff-review-row/.test(P.className)?P:null}_goToRow(P){const B=this._getCurrentFocusedRow();P.tabIndex=0,P.focus(),B&&B!==P&&(B.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(P,B,V){this._width=B,this.shadow.setTop(P-6),this.shadow.setWidth(B),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(P),this.domNode.setWidth(B),this.domNode.setHeight(V),this._content.setHeight(V),this._content.setWidth(B),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const P=this._diffEditor.getLineChanges();if(!P||P.length===0)return[];const B=this._diffEditor.getOriginalEditor().getModel(),V=this._diffEditor.getModifiedEditor().getModel();return!B||!V?[]:qi._mergeAdjacent(P,B.getLineCount(),V.getLineCount())}static _mergeAdjacent(P,B,V){if(!P||P.length===0)return[];const z=[];let x=0;for(let $=0,q=P.length;$<q;$++){const X=P[$],G=X.originalStartLineNumber,Q=X.originalEndLineNumber,j=X.modifiedStartLineNumber,K=X.modifiedEndLineNumber,Y=[];let ee=0;{const ie=Q===0?G:G-1,re=K===0?j:j-1;let oe=1,se=1;if($>0){const ne=P[$-1];ne.originalEndLineNumber===0?oe=ne.originalStartLineNumber+1:oe=ne.originalEndLineNumber+1,ne.modifiedEndLineNumber===0?se=ne.modifiedStartLineNumber+1:se=ne.modifiedEndLineNumber+1}let te=ie-h+1,Z=re-h+1;if(te<oe){const ne=oe-te;te=te+ne,Z=Z+ne}if(Z<se){const ne=se-Z;te=te+ne,Z=Z+ne}Y[ee++]=new m(te,ie,Z,re)}Q!==0&&(Y[ee++]=new m(G,Q,0,0)),K!==0&&(Y[ee++]=new m(0,0,j,K));{const ie=Q===0?G+1:Q+1,re=K===0?j+1:K+1;let oe=B,se=V;if($+1<q){const ne=P[$+1];ne.originalEndLineNumber===0?oe=ne.originalStartLineNumber:oe=ne.originalStartLineNumber-1,ne.modifiedEndLineNumber===0?se=ne.modifiedStartLineNumber:se=ne.modifiedStartLineNumber-1}let te=ie+h-1,Z=re+h-1;if(te>oe){const ne=oe-te;te=te+ne,Z=Z+ne}if(Z>se){const ne=se-Z;te=te+ne,Z=Z+ne}Y[ee++]=new m(ie,te,re,Z)}z[x++]=new w(Y)}let H=z[0].entries;const W=[];let U=0;for(let $=1,q=z.length;$<q;$++){const X=z[$].entries,G=H[H.length-1],Q=X[0];if(G.getType()===0&&Q.getType()===0&&Q.originalLineStart<=G.originalLineEnd){H[H.length-1]=new m(G.originalLineStart,Q.originalLineEnd,G.modifiedLineStart,Q.modifiedLineEnd),H=H.concat(X.slice(1));continue}W[U++]=new w(H),H=X}return W[U++]=new w(H),W}_findDiffIndex(P){const B=P.lineNumber;for(let V=0,z=this._diffs.length;V<z;V++){const x=this._diffs[V].entries,H=x[x.length-1].modifiedLineEnd;if(B<=H)return V}return 0}_render(){const P=this._diffEditor.getOriginalEditor().getOptions(),B=this._diffEditor.getModifiedEditor().getOptions(),V=this._diffEditor.getOriginalEditor().getModel(),z=this._diffEditor.getModifiedEditor().getModel(),x=V.getOptions(),H=z.getOptions();if(!this._isVisible||!V||!z){p.clearNode(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const W=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[W]===this._currentDiff)return;this._currentDiff=this._diffs[W];const U=this._diffs[W].entries,$=document.createElement("div");$.className="diff-review-table",$.setAttribute("role","list"),$.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),(0,b.applyFontInfo)($,B.get(45));let q=0,X=0,G=0,Q=0;for(let Z=0,ne=U.length;Z<ne;Z++){const ce=U[Z],de=ce.originalLineStart,he=ce.originalLineEnd,pe=ce.modifiedLineStart,me=ce.modifiedLineEnd;de!==0&&(q===0||de<q)&&(q=de),he!==0&&(X===0||he>X)&&(X=he),pe!==0&&(G===0||pe<G)&&(G=pe),me!==0&&(Q===0||me>Q)&&(Q=me)}const j=document.createElement("div");j.className="diff-review-row";const K=document.createElement("div");K.className="diff-review-cell diff-review-summary";const Y=X-q+1,ee=Q-G+1;K.appendChild(document.createTextNode(`${W+1}/${this._diffs.length}: @@ -${q},${Y} +${G},${ee} @@`)),j.setAttribute("data-line",String(G));const ie=Z=>Z===0?t.localize(4,null):Z===1?t.localize(5,null):t.localize(6,null,Z),re=ie(Y),oe=ie(ee);j.setAttribute("aria-label",t.localize(7,null,W+1,this._diffs.length,q,re,G,oe)),j.appendChild(K),j.setAttribute("role","listitem"),$.appendChild(j);const se=B.get(60);let te=G;for(let Z=0,ne=U.length;Z<ne;Z++){const ce=U[Z];qi._renderSection($,ce,te,se,this._width,P,V,x,B,z,H,this._languageService.languageIdCodec),ce.modifiedLineStart!==0&&(te=ce.modifiedLineEnd)}p.clearNode(this._content.domNode),this._content.domNode.appendChild($),this.scrollbar.scanDomNode()}static _renderSection(P,B,V,z,x,H,W,U,$,q,X,G){const Q=B.getType();let j="diff-review-row",K="";const Y="diff-review-spacer";let ee=null;switch(Q){case 1:j="diff-review-row line-insert",K=" char-insert",ee=D;break;case 2:j="diff-review-row line-delete",K=" char-delete",ee=y;break}const ie=B.originalLineStart,re=B.originalLineEnd,oe=B.modifiedLineStart,se=B.modifiedLineEnd,te=Math.max(se-oe,re-ie),Z=H.get(133),ne=Z.glyphMarginWidth+Z.lineNumbersWidth,ce=$.get(133),de=10+ce.glyphMarginWidth+ce.lineNumbersWidth;for(let he=0;he<=te;he++){const pe=ie===0?0:ie+he,me=oe===0?0:oe+he,Se=document.createElement("div");Se.style.minWidth=x+"px",Se.className=j,Se.setAttribute("role","listitem"),me!==0&&(V=me),Se.setAttribute("data-line",String(V));const Ie=document.createElement("div");Ie.className="diff-review-cell",Ie.style.height=`${z}px`,Se.appendChild(Ie);const ve=document.createElement("span");ve.style.width=ne+"px",ve.style.minWidth=ne+"px",ve.className="diff-review-line-number"+K,pe!==0?ve.appendChild(document.createTextNode(String(pe))):ve.innerText="\xA0",Ie.appendChild(ve);const be=document.createElement("span");be.style.width=de+"px",be.style.minWidth=de+"px",be.style.paddingRight="10px",be.className="diff-review-line-number"+K,me!==0?be.appendChild(document.createTextNode(String(me))):be.innerText="\xA0",Ie.appendChild(be);const ge=document.createElement("span");if(ge.className=Y,ee){const De=document.createElement("span");De.className=n.ThemeIcon.asClassName(ee),De.innerText="\xA0\xA0",ge.appendChild(De)}else ge.innerText="\xA0\xA0";Ie.appendChild(ge);let ue;if(me!==0){let De=this._renderLine(q,$,X.tabSize,me,G);qi._ttPolicy&&(De=qi._ttPolicy.createHTML(De)),Ie.insertAdjacentHTML("beforeend",De),ue=q.getLineContent(me)}else{let De=this._renderLine(W,H,U.tabSize,pe,G);qi._ttPolicy&&(De=qi._ttPolicy.createHTML(De)),Ie.insertAdjacentHTML("beforeend",De),ue=W.getLineContent(pe)}ue.length===0&&(ue=t.localize(8,null));let Ce="";switch(Q){case 0:pe===me?Ce=t.localize(9,null,ue,pe):Ce=t.localize(10,null,ue,pe,me);break;case 1:Ce=t.localize(11,null,ue,me);break;case 2:Ce=t.localize(12,null,ue,pe);break}Se.setAttribute("aria-label",Ce),P.appendChild(Se)}}static _renderLine(P,B,V,z,x){const H=P.getLineContent(z),W=B.get(45),U=u.LineTokens.createEmpty(H,x),$=l.ViewLineRenderingData.isBasicASCII(H,P.mightContainNonBasicASCII()),q=l.ViewLineRenderingData.containsRTL(H,$,P.mightContainRTL());return(0,c.renderViewLine2)(new c.RenderLineInput(W.isMonospace&&!B.get(29),W.canUseHalfwidthRightwardsArrow,H,!1,$,q,0,U,[],V,0,W.spaceWidth,W.middotWidth,W.wsmiddotWidth,B.get(107),B.get(89),B.get(84),B.get(46)!==r.EditorFontLigatures.OFF,null)).html}};_._ttPolicy=window.trustedTypes?.createPolicy("diffReview",{createHTML:N=>N}),_=we([F(1,g.ILanguageService)],_),e.DiffReview=_,(0,n.registerThemingParticipant)((N,P)=>{const B=N.getColor(f.editorLineNumbers);B&&P.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${B}; }`);const V=N.getColor(d.scrollbarShadow);V&&P.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${V} 0 -6px 6px -6px inset; }`)});class L extends S.EditorAction{constructor(){super({id:"editor.action.diffReview.next",label:t.localize(13,null),alias:"Go to Next Difference",precondition:s.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(P,B){O(P)?.diffReviewNext()}}class M extends S.EditorAction{constructor(){super({id:"editor.action.diffReview.prev",label:t.localize(14,null),alias:"Go to Previous Difference",precondition:s.ContextKeyExpr.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(P,B){O(P)?.diffReviewPrev()}}function O(N){const P=N.get(C.ICodeEditorService),B=P.listDiffEditors(),V=P.getActiveCodeEditor();if(!V)return null;for(let z=0,x=B.length;z<x;z++){const H=B[z];if(H.getModifiedEditor().getId()===V.getId()||H.getOriginalEditor().getId()===V.getId())return H}return null}(0,S.registerEditorAction)(L),(0,S.registerEditorAction)(M)}),define(ae[2198],le([1,0,10,110,147,29,6,2,28,13,42,184,598,1377,7,41,33,63,126,12,1090]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorHoverWidgetHighlightForeground=e.ParameterHintsWidget=void 0;const n=t.$,a=(0,l.registerIcon)("parameter-hints-next",A.Codicon.chevronDown,u.localize(0,null)),o=(0,l.registerIcon)("parameter-hints-previous",A.Codicon.chevronUp,u.localize(1,null));let g=class ta extends E.Disposable{constructor(v,m,w,D,y){super(),this.editor=v,this.model=m,this.renderDisposeables=this._register(new E.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new C.MarkdownRenderer({editor:v},y,D)),this.keyVisible=r.Context.Visible.bindTo(w),this.keyMultipleSignatures=r.Context.MultipleSignatures.bindTo(w)}createParameterHintDOMNodes(){const v=n(".editor-widget.parameter-hints-widget"),m=t.append(v,n(".phwrapper"));m.tabIndex=-1;const w=t.append(m,n(".controls")),D=t.append(w,n(".button"+d.ThemeIcon.asCSSSelector(o))),y=t.append(w,n(".overloads")),T=t.append(w,n(".button"+d.ThemeIcon.asCSSSelector(a)));this._register(t.addDisposableListener(D,"click",P=>{t.EventHelper.stop(P),this.previous()})),this._register(t.addDisposableListener(T,"click",P=>{t.EventHelper.stop(P),this.next()}));const _=n(".body"),L=new R.DomScrollableElement(_,{alwaysConsumeMouseWheel:!0});this._register(L),m.appendChild(L.getDomNode());const M=t.append(_,n(".signature")),O=t.append(_,n(".docs"));v.style.userSelect="text",this.domNodes={element:v,signature:M,overloads:y,docs:O,scrollbar:L},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(P=>{this.visible&&this.editor.layoutContentWidget(this)}));const N=()=>{if(!this.domNodes)return;const P=this.editor.getOption(45);this.domNodes.element.style.fontSize=`${P.fontSize}px`,this.domNodes.element.style.lineHeight=`${P.lineHeight/P.fontSize}`};N(),this._register(k.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(P=>P.hasChanged(45)).on(N,null)),this._register(this.editor.onDidLayoutChange(P=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{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?.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(v){if(this.renderDisposeables.clear(),!this.domNodes)return;const m=v.signatures.length>1;this.domNodes.element.classList.toggle("multiple",m),this.keyMultipleSignatures.set(m),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const w=v.signatures[v.activeSignature];if(!w)return;const D=t.append(this.domNodes.signature,n(".code")),y=this.editor.getOption(45);D.style.fontSize=`${y.fontSize}px`,D.style.fontFamily=y.fontFamily;const T=w.parameters.length>0,_=w.activeParameter??v.activeParameter;if(T)this.renderParameters(D,w,_);else{const O=t.append(D,n("span"));O.textContent=w.label}const L=w.parameters[_];if(L?.documentation){const O=n("span.documentation");if(typeof L.documentation=="string")O.textContent=L.documentation;else{const N=this.renderMarkdownDocs(L.documentation);O.appendChild(N.element)}t.append(this.domNodes.docs,n("p",{},O))}if(w.documentation!==void 0)if(typeof w.documentation=="string")t.append(this.domNodes.docs,n("p",{},w.documentation));else{const O=this.renderMarkdownDocs(w.documentation);t.append(this.domNodes.docs,O.element)}const M=this.hasDocs(w,L);if(this.domNodes.signature.classList.toggle("has-docs",M),this.domNodes.docs.classList.toggle("empty",!M),this.domNodes.overloads.textContent=String(v.activeSignature+1).padStart(v.signatures.length.toString().length,"0")+"/"+v.signatures.length,L){let O="";const N=w.parameters[_];Array.isArray(N.label)?O=w.label.substring(N.label[0],N.label[1]):O=N.label,N.documentation&&(O+=typeof N.documentation=="string"?`, ${N.documentation}`:`, ${N.documentation.value}`),w.documentation&&(O+=typeof w.documentation=="string"?`, ${w.documentation}`:`, ${w.documentation.value}`),this.announcedLabel!==O&&(p.alert(u.localize(2,null,O)),this.announcedLabel=O)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(v){const m=this.renderDisposeables.add(this.markdownRenderer.render(v,{asyncRenderCallback:()=>{this.domNodes?.scrollbar.scanDomNode()}}));return m.element.classList.add("markdown-docs"),m}hasDocs(v,m){return!!(m&&typeof m.documentation=="string"&&(0,b.assertIsDefined)(m.documentation).length>0||m&&typeof m.documentation=="object"&&(0,b.assertIsDefined)(m.documentation).value.length>0||v.documentation&&typeof v.documentation=="string"&&(0,b.assertIsDefined)(v.documentation).length>0||v.documentation&&typeof v.documentation=="object"&&(0,b.assertIsDefined)(v.documentation.value).length>0)}renderParameters(v,m,w){const[D,y]=this.getParameterLabelOffsets(m,w),T=document.createElement("span");T.textContent=m.label.substring(0,D);const _=document.createElement("span");_.textContent=m.label.substring(D,y),_.className="parameter active";const L=document.createElement("span");L.textContent=m.label.substring(y),t.append(v,T,_,L)}getParameterLabelOffsets(v,m){const w=v.parameters[m];if(w){if(Array.isArray(w.label))return w.label;if(w.label.length){const D=new RegExp(`(\\W|^)${(0,I.escapeRegExpCharacters)(w.label)}(?=\\W|$)`,"g");D.test(v.label);const y=D.lastIndex-w.label.length;return y>=0?[y,D.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()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return ta.ID}updateMaxHeight(){if(!this.domNodes)return;const m=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=m;const w=this.domNodes.element.getElementsByClassName("phwrapper");w.length&&(w[0].style.maxHeight=m)}};g.ID="editor.widget.parameterHintsWidget",g=we([F(2,i.IContextKeyService),F(3,f.IOpenerService),F(4,S.ILanguageService)],g),e.ParameterHintsWidget=g,e.editorHoverWidgetHighlightForeground=(0,c.registerColor)("editorHoverWidget.highlightForeground",{dark:c.listHighlightForeground,light:c.listHighlightForeground,hcDark:c.listHighlightForeground,hcLight:c.listHighlightForeground},u.localize(3,null)),(0,d.registerThemingParticipant)((h,v)=>{const m=h.getColor(c.editorHoverBorder);if(m){const M=(0,s.isHighContrast)(h.type)?2:1;v.addRule(`.monaco-editor .parameter-hints-widget { border: ${M}px solid ${m}; }`),v.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${m.transparent(.5)}; }`),v.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${m.transparent(.5)}; }`)}const w=h.getColor(c.editorHoverBackground);w&&v.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${w}; }`);const D=h.getColor(c.textLinkForeground);D&&v.addRule(`.monaco-editor .parameter-hints-widget a { color: ${D}; }`);const y=h.getColor(c.textLinkActiveForeground);y&&v.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${y}; }`);const T=h.getColor(c.editorHoverForeground);T&&v.addRule(`.monaco-editor .parameter-hints-widget { color: ${T}; }`);const _=h.getColor(c.textCodeBlockBackground);_&&v.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${_}; }`);const L=h.getColor(e.editorHoverWidgetHighlightForeground);L&&v.addRule(`.monaco-editor .parameter-hints-widget .parameter.active { color: ${L}}`)})}),define(ae[2199],le([1,0,206,2,40,59,92,61,2086,598,1376,7,5,2198]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=void 0;let i=class ia extends p.Disposable{static get(d){return d.getContribution(ia.ID)}constructor(d,n,a){super(),this.editor=d,this.model=this._register(new I.ParameterHintsModel(d,a.signatureHelpProvider)),this._register(this.model.onChangedHints(o=>{o?(this.widget.getValue().show(),this.widget.getValue().render(o)):this.widget.rawValue?.hide()})),this.widget=new t.Lazy(()=>this._register(n.createInstance(u.ParameterHintsWidget,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){this.widget.rawValue?.previous()}next(){this.widget.rawValue?.next()}trigger(d){this.model.trigger(d,0)}};i.ID="editor.controller.parameterHints",i=we([F(1,r.IInstantiationService),F(2,E.ILanguageFeaturesService)],i);class f extends R.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:S.localize(0,null),alias:"Trigger Parameter Hints",precondition:A.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:A.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(d,n){i.get(n)?.trigger({triggerKind:k.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=f,(0,R.registerEditorContribution)(i.ID,i),(0,R.registerEditorAction)(f);const c=100+75,l=R.EditorCommand.bindToContribution(i.get);(0,R.registerEditorCommand)(new l({id:"closeParameterHints",precondition:b.Context.Visible,handler:s=>s.cancel(),kbOpts:{weight:c,kbExpr:A.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,R.registerEditorCommand)(new l({id:"showPrevParameterHint",precondition:C.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSignatures),handler:s=>s.previous(),kbOpts:{weight:c,kbExpr:A.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,R.registerEditorCommand)(new l({id:"showNextParameterHint",precondition:C.ContextKeyExpr.and(b.Context.Visible,b.Context.MultipleSignatures),handler:s=>s.next(),kbOpts:{weight:c,kbExpr:A.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(ae[2200],le([1,0,10,239,29,6,96,2,9,92,199,54,42,1392,19,63,12,803]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.suggestMoreInfoIcon=e.getAriaId=void 0;function d(g){return`suggest-aria-id:${g}`}e.getAriaId=d,e.suggestMoreInfoIcon=(0,f.registerIcon)("suggest-more-info",R.Codicon.chevronRight,u.localize(0,null));const n=new(s=class rr{extract(h,v){if(h.textLabel.match(rr._regexStrict))return v[0]=h.textLabel,!0;if(h.completion.detail&&h.completion.detail.match(rr._regexStrict))return v[0]=h.completion.detail,!0;if(typeof h.completion.documentation=="string"){const m=rr._regexRelaxed.exec(h.completion.documentation);if(m&&(m.index===0||m.index+m[0].length===h.completion.documentation.length))return v[0]=m[0],!0}return!1}},s._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*\))/,s._regexStrict=new RegExp(`^${s._regexRelaxed.source}$`,"i"),s);let a=class{constructor(h,v,m,w){this._editor=h,this._modelService=v,this._languageService=m,this._themeService=w,this._onDidToggleDetails=new A.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(h){const v=Object.create(null);v.disposables=new E.DisposableStore,v.root=h,v.root.classList.add("show-file-icons"),v.icon=(0,t.append)(h,(0,t.$)(".icon")),v.colorspan=(0,t.append)(v.icon,(0,t.$)("span.colorspan"));const m=(0,t.append)(h,(0,t.$)(".contents")),w=(0,t.append)(m,(0,t.$)(".main"));v.iconContainer=(0,t.append)(w,(0,t.$)(".icon-label.codicon")),v.left=(0,t.append)(w,(0,t.$)("span.left")),v.right=(0,t.append)(w,(0,t.$)("span.right")),v.iconLabel=new p.IconLabel(v.left,{supportHighlights:!0,supportIcons:!0}),v.disposables.add(v.iconLabel),v.parametersLabel=(0,t.append)(v.left,(0,t.$)("span.signature-label")),v.qualifierLabel=(0,t.append)(v.left,(0,t.$)("span.qualifier-label")),v.detailsLabel=(0,t.append)(v.right,(0,t.$)("span.details-label")),v.readMore=(0,t.append)(v.right,(0,t.$)("span.readMore"+c.ThemeIcon.asCSSSelector(e.suggestMoreInfoIcon))),v.readMore.title=u.localize(1,null);const D=()=>{const y=this._editor.getOptions(),T=y.get(45),_=T.getMassagedFontFamily(),L=T.fontFeatureSettings,M=y.get(109)||T.fontSize,O=y.get(110)||T.lineHeight,N=T.fontWeight,P=T.letterSpacing,B=`${M}px`,V=`${O}px`,z=`${P}px`;v.root.style.fontSize=B,v.root.style.fontWeight=N,v.root.style.letterSpacing=z,w.style.fontFamily=_,w.style.fontFeatureSettings=L,w.style.lineHeight=V,v.icon.style.height=V,v.icon.style.width=V,v.readMore.style.height=V,v.readMore.style.width=V};return D(),v.disposables.add(this._editor.onDidChangeConfiguration(y=>{(y.hasChanged(45)||y.hasChanged(109)||y.hasChanged(110))&&D()})),v}renderElement(h,v,m){const{completion:w}=h;m.root.id=d(v),m.colorspan.style.backgroundColor="";const D={labelEscapeNewLines:!0,matches:(0,k.createMatches)(h.score)},y=[];if(w.kind===19&&n.extract(h,y))m.icon.className="icon customcolor",m.iconContainer.className="icon hide",m.colorspan.style.backgroundColor=y[0];else if(w.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){m.icon.className="icon hide",m.iconContainer.className="icon hide";const T=(0,S.getIconClasses)(this._modelService,this._languageService,I.URI.from({scheme:"fake",path:h.textLabel}),i.FileKind.FILE),_=(0,S.getIconClasses)(this._modelService,this._languageService,I.URI.from({scheme:"fake",path:w.detail}),i.FileKind.FILE);D.extraClasses=T.length>_.length?T:_}else w.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(m.icon.className="icon hide",m.iconContainer.className="icon hide",D.extraClasses=[(0,S.getIconClasses)(this._modelService,this._languageService,I.URI.from({scheme:"fake",path:h.textLabel}),i.FileKind.FOLDER),(0,S.getIconClasses)(this._modelService,this._languageService,I.URI.from({scheme:"fake",path:w.detail}),i.FileKind.FOLDER)].flat()):(m.icon.className="icon hide",m.iconContainer.className="",m.iconContainer.classList.add("suggest-icon",...R.CSSIcon.asClassNameArray(b.CompletionItemKinds.toIcon(w.kind))));w.tags&&w.tags.indexOf(1)>=0&&(D.extraClasses=(D.extraClasses||[]).concat(["deprecated"]),D.matches=[]),m.iconLabel.setLabel(h.textLabel,void 0,D),typeof w.label=="string"?(m.parametersLabel.textContent="",m.detailsLabel.textContent=o(w.detail||""),m.root.classList.add("string-label")):(m.parametersLabel.textContent=o(w.label.detail||""),m.detailsLabel.textContent=o(w.label.description||""),m.root.classList.remove("string-label")),this._editor.getOption(108).showInlineDetails?(0,t.show)(m.detailsLabel):(0,t.hide)(m.detailsLabel),(0,l.canExpandCompletionItem)(h)?(m.right.classList.add("can-expand-details"),(0,t.show)(m.readMore),m.readMore.onmousedown=T=>{T.stopPropagation(),T.preventDefault()},m.readMore.onclick=T=>{T.stopPropagation(),T.preventDefault(),this._onDidToggleDetails.fire()}):(m.right.classList.remove("can-expand-details"),(0,t.hide)(m.readMore),m.readMore.onmousedown=null,m.readMore.onclick=null)}disposeTemplate(h){h.disposables.dispose()}};a=we([F(1,C.IModelService),F(2,r.ILanguageService),F(3,c.IThemeService)],a),e.ItemRenderer=a;function o(g){return g.replace(/\r\n|\r|\n/g,"")}}),define(ae[2201],le([1,0,10,79,36,2,184,5,254,63,12,1096]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const C=26;let r=class extends A.Disposable{constructor(f,c){super(),this._editor=f,this.instantiationService=c,this.banner=this._register(this.instantiationService.createInstance(u))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(f){this.banner.show({...f,onClose:()=>{this.hide(),f.onClose?.()}}),this._editor.setBanner(this.banner.element,C)}};r=we([F(1,E.IInstantiationService)],r),e.BannerController=r;let u=class extends A.Disposable{constructor(f){super(),this.instantiationService=f,this.markdownRenderer=this.instantiationService.createInstance(k.MarkdownRenderer,{}),this.element=(0,t.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(f){if(f.ariaLabel)return f.ariaLabel;if(typeof f.message=="string")return f.message}getBannerMessage(f){if(typeof f=="string"){const c=(0,t.$)("span");return c.innerText=f,c}return this.markdownRenderer.render(f).element}clear(){(0,t.clearNode)(this.element)}show(f){(0,t.clearNode)(this.element);const c=this.getAriaLabel(f);c&&this.element.setAttribute("aria-label",c);const l=(0,t.append)(this.element,(0,t.$)("div.icon-container"));l.setAttribute("aria-hidden","true"),f.icon&&l.appendChild((0,t.$)(`div${S.ThemeIcon.asCSSSelector(f.icon)}`));const s=(0,t.append)(this.element,(0,t.$)("div.message-container"));if(s.setAttribute("aria-hidden","true"),s.appendChild(this.getBannerMessage(f.message)),this.messageActionsContainer=(0,t.append)(this.element,(0,t.$)("div.message-actions-container")),f.actions)for(const n of f.actions)this._register(this.instantiationService.createInstance(I.Link,this.messageActionsContainer,{...n,tabIndex:-1},{}));const d=(0,t.append)(this.element,(0,t.$)("div.action-container"));this.actionBar=this._register(new p.ActionBar(d)),this.actionBar.push(this._register(new R.Action("banner.close","Close Banner",S.ThemeIcon.asClassName(b.widgetClose),!0,()=>{typeof f.onClose=="function"&&f.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};u=we([F(0,E.IInstantiationService)],u)}),define(ae[2202],le([1,0,10,6,63,12]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function k(I){const b=new p.Emitter,S=(0,R.getIconRegistry)();return S.onDidChange(()=>b.fire()),I?.onDidProductIconThemeChange(()=>b.fire()),{onDidChange:b.event,getCSS(){const C=I?I.getProductIconTheme():new E,r={},u=f=>{const c=C.getIcon(f);if(!c)return;const l=c.font;return l?(r[l.id]=l.definition,`.codicon-${f.id}:before { content: '${c.fontCharacter}'; font-family: ${(0,t.asCSSPropertyValue)(l.id)}; }`):`.codicon-${f.id}:before { content: '${c.fontCharacter}'; }`},i=[];for(const f of S.getIcons()){const c=u(f);c&&i.push(c)}for(const f in r){const c=r[f],l=c.weight?`font-weight: ${c.weight};`:"",s=c.style?`font-style: ${c.style};`:"",d=c.src.map(n=>`${(0,t.asCSSUrl)(n.location)} format('${n.format}')`).join(", ");i.push(`@font-face { src: ${d}; font-family: ${(0,t.asCSSPropertyValue)(f)};${l}${s} font-display: block; }`)}return i.join(` `)}}}e.getIconsStyleSheet=k;class E{getIcon(b){const S=(0,R.getIconRegistry)();let C=b.defaults;for(;A.ThemeIcon.isThemeIcon(C);){const r=S.getIcon(C.id);if(!r)return;C=r.defaults}return C}}e.UnthemedProductIconTheme=E}),define(ae[433],le([1,0,11,65,6,1435,155,17]),function(J,e,t,p,R,A,k,E){"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,o,g,h,v){this.foreground=a,this.bold=o,this.underline=g,this.strikethrough=h,this.italic=v}}e.TokenStyle=I,function(n){function a(w){return{_foreground:w.foreground===void 0?null:p.Color.Format.CSS.formatHexA(w.foreground,!0),_bold:w.bold===void 0?null:w.bold,_underline:w.underline===void 0?null:w.underline,_italic:w.italic===void 0?null:w.italic,_strikethrough:w.strikethrough===void 0?null:w.strikethrough}}n.toJSONObject=a;function o(w){if(w){const D=T=>typeof T=="boolean"?T:void 0,y=T=>typeof T=="string"?p.Color.fromHex(T):void 0;return new n(y(w._foreground),D(w._bold),D(w._underline),D(w._strikethrough),D(w._italic))}}n.fromJSONObject=o;function g(w,D){return w===D?!0:w!==void 0&&D!==void 0&&(w.foreground instanceof p.Color?w.foreground.equals(D.foreground):D.foreground===void 0)&&w.bold===D.bold&&w.underline===D.underline&&w.strikethrough===D.strikethrough&&w.italic===D.italic}n.equals=g;function h(w){return w instanceof n}n.is=h;function v(w){return new n(w.foreground,w.bold,w.underline,w.strikethrough,w.italic)}n.fromData=v;function m(w,D,y,T,_,L){let M;if(w!==void 0&&(M=p.Color.fromHex(w)),D!==void 0){y=L=T=_=!1;const O=/italic|bold|underline|strikethrough/g;let N;for(;N=O.exec(D);)switch(N[0]){case"bold":y=!0;break;case"italic":L=!0;break;case"underline":T=!0;break;case"strikethrough":_=!0;break}}return new n(M,y,T,_,L)}n.fromSettings=m}(I=e.TokenStyle||(e.TokenStyle={}));var b;(function(n){function a(v,m){if(m&&typeof m._selector=="string"&&m._style){const w=I.fromJSONObject(m._style);if(w)try{return{selector:v.parseTokenSelector(m._selector),style:w}}catch{}}}n.fromJSONObject=a;function o(v){return{_selector:v.selector.id,_style:I.toJSONObject(v.style)}}n.toJSONObject=o;function g(v,m){return v===m?!0:v!==void 0&&m!==void 0&&v.selector&&m.selector&&v.selector.id===m.selector.id&&I.equals(v.style,m.style)}n.equals=g;function h(v){return v&&v.selector&&typeof v.selector.id=="string"&&I.is(v.style)}n.is=h})(b=e.SemanticTokenRule||(e.SemanticTokenRule={})),e.Extensions={TokenClassificationContribution:"base.contributions.tokenClassification"};class S{constructor(){this._onDidChangeSchema=new R.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,o,g,h){if(!a.match(e.typeAndModifierIdPattern))throw new Error("Invalid token type id.");if(g&&!g.match(e.typeAndModifierIdPattern))throw new Error("Invalid token super type id.");const m={num:this.currentTypeNumber++,id:a,superType:g,description:o,deprecationMessage:h};this.tokenTypeById[a]=m;const w=l(o,h);this.tokenStylingSchema.properties[a]=w,this.typeHierarchy=Object.create(null)}registerTokenModifier(a,o,g){if(!a.match(e.typeAndModifierIdPattern))throw new Error("Invalid token modifier id.");const h=this.currentModifierBit;this.currentModifierBit=this.currentModifierBit*2;const v={num:h,id:a,description:o,deprecationMessage:g};this.tokenModifierById[a]=v,this.tokenStylingSchema.properties[`*.${a}`]=l(o,g)}parseTokenSelector(a,o){const g=u(a,o);return g.type?{match:(h,v,m)=>{let w=0;if(g.language!==void 0){if(g.language!==m)return-1;w+=10}if(g.type!==e.TOKEN_TYPE_WILDCARD){const y=this.getTypeHierarchy(h).indexOf(g.type);if(y===-1)return-1;w+=100-y}for(const D of g.modifiers)if(v.indexOf(D)===-1)return-1;return w+g.modifiers.length*100},id:`${[g.type,...g.modifiers.sort()].join(".")}${g.language!==void 0?":"+g.language:""}`}:{match:()=>-1,id:"$invalid"}}registerTokenStyleDefault(a,o){this.tokenStylingDefaultRules.push({selector:a,defaults:o})}deregisterTokenStyleDefault(a){const o=a.id;this.tokenStylingDefaultRules=this.tokenStylingDefaultRules.filter(g=>g.selector.id!==o)}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 o=this.typeHierarchy[a];if(!o){this.typeHierarchy[a]=o=[a];let g=this.tokenTypeById[a];for(;g&&g.superType;)o.push(g.superType),g=this.tokenTypeById[g.superType]}return o}toString(){const a=(o,g)=>{const h=o.indexOf(".")===-1?0:1,v=g.indexOf(".")===-1?0:1;return h!==v?h-v:o.localeCompare(g)};return Object.keys(this.tokenTypeById).sort(a).map(o=>`- \`${o}\`: ${this.tokenTypeById[o].description}`).join(` `)}}const C=e.TOKEN_CLASSIFIER_LANGUAGE_SEPARATOR.charCodeAt(0),r=e.CLASSIFIER_MODIFIER_SEPARATOR.charCodeAt(0);function u(n,a){let o=n.length,g=a;const h=[];for(let m=o-1;m>=0;m--){const w=n.charCodeAt(m);if(w===C||w===r){const D=n.substring(m+1,o);o=m,w===C?g=D:h.push(D)}}return{type:n.substring(0,o),modifiers:h,language:g}}e.parseClassifierString=u;const i=f();E.Registry.add(e.Extensions.TokenClassificationContribution,i);function f(){const n=new S;function a(g,h,v=[],m,w){return n.registerTokenType(g,h,m,w),v&&o(g,v),g}function o(g,h){try{const v=n.parseTokenSelector(g);n.registerTokenStyleDefault(v,{scopesToProbe:h})}catch(v){console.log(v)}}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),n.registerTokenModifier("declaration",A.localize(34,null),void 0),n.registerTokenModifier("documentation",A.localize(35,null),void 0),n.registerTokenModifier("static",A.localize(36,null),void 0),n.registerTokenModifier("abstract",A.localize(37,null),void 0),n.registerTokenModifier("deprecated",A.localize(38,null),void 0),n.registerTokenModifier("modification",A.localize(39,null),void 0),n.registerTokenModifier("async",A.localize(40,null),void 0),n.registerTokenModifier("readonly",A.localize(41,null),void 0),o("variable.readonly",[["variable.other.constant"]]),o("property.readonly",[["variable.other.constant.property"]]),o("type.defaultLibrary",[["support.type"]]),o("class.defaultLibrary",[["support.class"]]),o("interface.defaultLibrary",[["support.class"]]),o("variable.defaultLibrary",[["support.variable"],["support.other.variable"]]),o("variable.defaultLibrary.readonly",[["support.constant"]]),o("property.defaultLibrary",[["support.variable.property"]]),o("property.defaultLibrary.readonly",[["support.constant.property"]]),o("function.defaultLibrary",[["support.function"]]),o("member.defaultLibrary",[["support.function"]]),n}function c(){return i}e.getTokenClassificationRegistry=c;function l(n,a){return{description:n,deprecationMessage:a,defaultSnippets:[{body:"${1:#ff0000}"}],anyOf:[{type:"string",format:"color-hex"},{$ref:"#/definitions/style"}]}}e.tokenStylingSchemaId="vscode://schemas/token-styling";const s=E.Registry.as(k.Extensions.JSONContribution);s.registerSchema(e.tokenStylingSchemaId,i.getTokenStylingSchema());const d=new t.RunOnceScheduler(()=>s.notifySchemaChanged(e.tokenStylingSchemaId),200);i.onDidChangeSchema(()=>{d.isScheduled()||d.schedule()})}),define(ae[225],le([1,0,6,8,5,25]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTunnelService=e.DisposableTunnel=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,R.createDecorator)("tunnelService"),e.ISharedTunnelsService=(0,R.createDecorator)("sharedTunnelsService");var k;(function(f){f.Http="http",f.Https="https"})(k=e.TunnelProtocol||(e.TunnelProtocol={}));var E;(function(f){f.ConstantPrivate="constantPrivate",f.Private="private",f.Public="public"})(E=e.TunnelPrivacyId||(e.TunnelPrivacyId={}));var I;(function(f){f[f.Notify=1]="Notify",f[f.OpenBrowser=2]="OpenBrowser",f[f.OpenPreview=3]="OpenPreview",f[f.Silent=4]="Silent",f[f.Ignore=5]="Ignore",f[f.OpenBrowserOnce=6]="OpenBrowserOnce"})(I=e.ProvidedOnAutoForward||(e.ProvidedOnAutoForward={}));function b(f){if(f.scheme!=="http"&&f.scheme!=="https")return;const c=/^(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d+)$/.exec(f.authority);if(!!c)return{address:c[1],port:+c[2]}}e.extractLocalHostUriMetaDataForPortMapping=b,e.LOCALHOST_ADDRESSES=["localhost","127.0.0.1","0:0:0:0:0:0:0:1","::1"];function S(f){return e.LOCALHOST_ADDRESSES.indexOf(f)>=0}e.isLocalhost=S,e.ALL_INTERFACES_ADDRESSES=["0.0.0.0","0:0:0:0:0:0:0:0","::"];function C(f){return e.ALL_INTERFACES_ADDRESSES.indexOf(f)>=0}e.isAllInterfaces=C;function r(f,c,l,s){if(l===1)return!1;if(l===2&&C(c)){const d=/(\d+)\.(\d+)\.(\d+)/g.exec(s);if(d?.length===4&&parseInt(d[1])>=18)return!1}return f<1024}e.isPortPrivileged=r;class u{constructor(c,l,s){this.remoteAddress=c,this.localAddress=l,this._dispose=s,this._onDispose=new t.Emitter,this.onDidDispose=this._onDispose.event}dispose(){return this._onDispose.fire(),this._dispose()}}e.DisposableTunnel=u;let i=class{constructor(c,l){this.logService=c,this.configurationService=l,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=[],this._factoryInProgress=new Set}get hasTunnelProvider(){return!!this._tunnelProvider}get defaultTunnelHost(){const c=this.configurationService.getValue("remote.localPortHost");return!c||c==="localhost"?"127.0.0.1":"0.0.0.0"}setTunnelProvider(c){return this._tunnelProvider=c,c?(this._onAddedTunnelProvider.fire(),{dispose:()=>{this._tunnelProvider=void 0,this._canElevate=!1,this._privacyOptions=[]}}):(this._canElevate=!1,this._privacyOptions=[],this._onAddedTunnelProvider.fire(),{dispose:()=>{}})}setTunnelFeatures(c){this._canElevate=c.elevation,this._privacyOptions=c.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 c=[],l=Array.from(this._tunnels.values());for(const s of l){const d=Array.from(s.values());for(const n of d){const a=await n.value;a&&c.push(a)}}return c}async dispose(){for(const c of this._tunnels.values()){for(const{value:l}of c.values())await l.then(s=>s?.dispose());c.clear()}this._tunnels.clear()}setEnvironmentTunnel(c,l,s,d,n){this.addTunnelToMap(c,l,Promise.resolve({tunnelRemoteHost:c,tunnelRemotePort:l,localAddress:s,privacy:d,protocol:n,dispose:()=>Promise.resolve()}))}async getExistingTunnel(c,l){(C(c)||S(c))&&(c=e.LOCALHOST_ADDRESSES[0]);const s=this.getTunnelFromMap(c,l);if(s)return++s.refcount,s.value}openTunnel(c,l,s,d,n=!1,a,o){if(this.logService.trace(`ForwardedPorts: (TunnelService) openTunnel request for ${l}:${s} on local port ${d}.`),!c)return;if(l||(l="localhost"),this._tunnelProvider&&this._factoryInProgress.has(s)){this.logService.debug("ForwardedPorts: (TunnelService) Another call to create a tunnel with the same address has occurred before the last one completed. This call will be ignored.");return}const g=this.retainOrCreateTunnel(c,l,s,d,n,a,o);return g?g.then(h=>{if(!h){this.logService.trace("ForwardedPorts: (TunnelService) New tunnel is undefined."),this.removeEmptyTunnelFromMap(l,s);return}this.logService.trace("ForwardedPorts: (TunnelService) New tunnel established.");const v=this.makeTunnel(h);return(h.tunnelRemoteHost!==l||h.tunnelRemotePort!==s)&&this.logService.warn("ForwardedPorts: (TunnelService) Created tunnel does not match requirements of requested tunnel. Host or port mismatch."),this._onTunnelOpened.fire(v),v}):(this.logService.trace("ForwardedPorts: (TunnelService) Tunnel was not created."),g)}makeTunnel(c){return{tunnelRemotePort:c.tunnelRemotePort,tunnelRemoteHost:c.tunnelRemoteHost,tunnelLocalPort:c.tunnelLocalPort,localAddress:c.localAddress,privacy:c.privacy,protocol:c.protocol,dispose:async()=>{this.logService.trace(`ForwardedPorts: (TunnelService) dispose request for ${c.tunnelRemoteHost}:${c.tunnelRemotePort} `);const l=this._tunnels.get(c.tunnelRemoteHost);if(l){const s=l.get(c.tunnelRemotePort);s&&(s.refcount--,await this.tryDisposeTunnel(c.tunnelRemoteHost,c.tunnelRemotePort,s))}}}}async tryDisposeTunnel(c,l,s){if(s.refcount<=0){this.logService.trace(`ForwardedPorts: (TunnelService) Tunnel is being disposed ${c}:${l}.`);const d=s.value.then(async n=>{n&&(await n.dispose(!0),this._onTunnelClosed.fire({host:n.tunnelRemoteHost,port:n.tunnelRemotePort}))});return this._tunnels.has(c)&&this._tunnels.get(c).delete(l),d}}async closeTunnel(c,l){this.logService.trace(`ForwardedPorts: (TunnelService) close request for ${c}:${l} `);const s=this._tunnels.get(c);if(s&&s.has(l)){const d=s.get(l);d.refcount=0,await this.tryDisposeTunnel(c,l,d)}}addTunnelToMap(c,l,s){this._tunnels.has(c)||this._tunnels.set(c,new Map),this._tunnels.get(c).set(l,{refcount:1,value:s})}async removeEmptyTunnelFromMap(c,l){const s=this._tunnels.get(c);s&&(await s.get(l)||s.delete(l),s.size===0&&this._tunnels.delete(c))}getTunnelFromMap(c,l){const s=[c];S(c)?(s.push(...e.LOCALHOST_ADDRESSES),s.push(...e.ALL_INTERFACES_ADDRESSES)):C(c)&&s.push(...e.ALL_INTERFACES_ADDRESSES);const d=s.map(n=>this._tunnels.get(n));for(const n of d){const a=n?.get(l);if(a)return a}}canTunnel(c){return!!b(c)}createWithProvider(c,l,s,d,n,a,o){this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel with provider ${l}:${s} on local port ${d}.`);const g=s;this._factoryInProgress.add(g);const h=d===void 0?s:d,v={elevationRequired:n?this.isPortPrivileged(h):!1},m={remoteAddress:{host:l,port:s},localAddressPort:d,privacy:a,public:a?a!==E.Private:void 0,protocol:o},w=c.forwardPort(m,v);return w?(this.addTunnelToMap(l,s,w),w.finally(()=>{this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created by provider."),this._factoryInProgress.delete(g)})):this._factoryInProgress.delete(g),w}};i=we([F(0,A.ILogService),F(1,p.IConfigurationService)],i),e.AbstractTunnelService=i}),define(ae[156],le([1,0,5]),function(J,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 p;(function(E){E[E.Resource=0]="Resource",E[E.Workspace=1]="Workspace"})(p=e.UndoRedoElementType||(e.UndoRedoElementType={}));class R{constructor(I,b){this.resource=I,this.elements=b}}e.ResourceEditStackSnapshot=R;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(ae[94],le([1,0,16,65,21,6,2,219,28,9,360,585,50,20,85,484,42,122,116,1288,2161,423,773,1207,729,592,775,370,1293,326,156]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeContentEmitter=e.DidChangeDecorationsEmitter=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.LONG_LINE_BOUNDARY=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactoryFromStream=e.createTextBufferFactory=void 0;function _(oe){const se=new m.PieceTreeTextBufferBuilder;return se.acceptChunk(oe),se.finish()}e.createTextBufferFactory=_;function L(oe){return new Promise((se,te)=>{const Z=new m.PieceTreeTextBufferBuilder;let ne=!1;(0,E.listenStream)(oe,{onData:ce=>{Z.acceptChunk(typeof ce=="string"?ce:ce.toString())},onError:ce=>{ne||(ne=!0,te(ce))},onEnd:()=>{ne||(ne=!0,se(Z.finish()))}})})}e.createTextBufferFactoryFromStream=L;function M(oe){const se=new m.PieceTreeTextBufferBuilder;let te;for(;typeof(te=oe.read())=="string";)se.acceptChunk(te);return se.finish()}e.createTextBufferFactoryFromSnapshot=M;function O(oe,se){let te;return typeof oe=="string"?te=_(oe):s.isITextSnapshot(oe)?te=M(oe):te=oe,te.create(se)}e.createTextBuffer=O;let N=0;const P=999;e.LONG_LINE_BOUNDARY=1e4;class B{constructor(se){this._source=se,this._eos=!1}read(){if(this._eos)return null;const se=[];let te=0,Z=0;do{const ne=this._source.read();if(ne===null)return this._eos=!0,te===0?null:se.join("");if(ne.length>0&&(se[te++]=ne,Z+=ne.length),Z>=64*1024)return se.join("")}while(!0)}}const V=()=>{throw new Error("Invalid change accessor")};var z;(function(oe){oe[oe.Relaxed=0]="Relaxed",oe[oe.SurrogatePairs=1]="SurrogatePairs"})(z||(z={}));let x=class An extends k.Disposable{static resolveOptions(se,te){if(te.detectIndentation){const Z=(0,g.guessIndentation)(se,te.tabSize,te.insertSpaces);return new s.TextModelResolvedOptions({tabSize:Z.tabSize,indentSize:Z.tabSize,insertSpaces:Z.insertSpaces,trimAutoWhitespace:te.trimAutoWhitespace,defaultEOL:te.defaultEOL,bracketPairColorizationOptions:te.bracketPairColorizationOptions})}return new s.TextModelResolvedOptions({tabSize:te.tabSize,indentSize:te.indentSize,insertSpaces:te.insertSpaces,trimAutoWhitespace:te.trimAutoWhitespace,defaultEOL:te.defaultEOL,bracketPairColorizationOptions:te.bracketPairColorizationOptions})}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(se){return this._eventEmitter.slowEvent(te=>se(te.contentChangedEvent))}onDidChangeContentOrInjectedText(se){return(0,k.combinedDisposable)(this._eventEmitter.fastEvent(te=>se(te)),this._onDidChangeInjectedText.event(te=>se(te)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(se,te,Z,ne=null,ce,de,he){super(),this._undoRedoService=ce,this._languageService=de,this._languageConfigurationService=he,this._onWillDispose=this._register(new A.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new ie(ve=>this.handleBeforeFireDecorationsChangedEvent(ve))),this.onDidChangeDecorations=this._onDidChangeDecorations.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 re),this._deltaDecorationCallCnt=0,N++,this.id="$model"+N,this.isForSimpleWidget=Z.isForSimpleWidget,typeof ne>"u"||ne===null?this._associatedResource=b.URI.parse("inmemory://model/"+N):this._associatedResource=ne,this._attachedEditorCount=0;const{textBuffer:pe,disposable:me}=O(se,Z.defaultEOL);this._buffer=pe,this._bufferDisposable=me,this._options=An.resolveOptions(this._buffer,Z),this._bracketPairs=this._register(new d.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new o.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new n.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new D.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,te);const Se=this._buffer.getLineCount(),Ie=this._buffer.getValueLengthInRange(new u.Range(1,1,Se,this._buffer.getLineLength(Se)+1),0);Z.largeFileOptimizations?this._isTooLargeForTokenization=Ie>An.LARGE_FILE_SIZE_THRESHOLD||Se>An.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=Ie>An.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=I.singleLetterHash(N),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new $,this._commandManager=new a.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const se=new v.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);se.dispose(),this._buffer=se,this._bufferDisposable=k.Disposable.None}_hasListeners(){return this._onWillDispose.hasListeners()||this._onDidChangeDecorations.hasListeners()||this._tokenizationTextModelPart._hasListeners()||this._onDidChangeOptions.hasListeners()||this._onDidChangeAttached.hasListeners()||this._onDidChangeInjectedText.hasListeners()||this._eventEmitter.hasListeners()}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}equalsTextBuffer(se){return this._assertNotDisposed(),this._buffer.equals(se)}getTextBuffer(){return this._assertNotDisposed(),this._buffer}_emitContentChangedEvent(se,te){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(te),this._bracketPairs.handleDidChangeContent(te),this._eventEmitter.fire(new y.InternalModelContentChangeEvent(se,te)))}setValue(se){if(this._assertNotDisposed(),se===null)return;const{textBuffer:te,disposable:Z}=O(se,this._options.defaultEOL);this._setValueFromTextBuffer(te,Z)}_createContentChanged2(se,te,Z,ne,ce,de,he){return{changes:[{range:se,rangeOffset:te,rangeLength:Z,text:ne}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:ce,isRedoing:de,isFlush:he}}_setValueFromTextBuffer(se,te){this._assertNotDisposed();const Z=this.getFullModelRange(),ne=this.getValueLengthInRange(Z),ce=this.getLineCount(),de=this.getLineMaxColumn(ce);this._buffer=se,this._bufferDisposable.dispose(),this._bufferDisposable=te,this._increaseVersionId(),this._tokenizationTextModelPart.flush(),this._decorations=Object.create(null),this._decorationsTree=new $,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new y.ModelRawContentChangedEvent([new y.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new u.Range(1,1,ce,de),0,ne,this.getValue(),!1,!1,!0))}setEOL(se){this._assertNotDisposed();const te=se===1?`\r `:` `;if(this._buffer.getEOL()===te)return;const Z=this.getFullModelRange(),ne=this.getValueLengthInRange(Z),ce=this.getLineCount(),de=this.getLineMaxColumn(ce);this._onBeforeEOLChange(),this._buffer.setEOL(te),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new y.ModelRawContentChangedEvent([new y.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new u.Range(1,1,ce,de),0,ne,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const se=this.getVersionId(),te=this._decorationsTree.collectNodesPostOrder();for(let Z=0,ne=te.length;Z<ne;Z++){const ce=te[Z],de=ce.range,he=ce.cachedAbsoluteStart-ce.start,pe=this._buffer.getOffsetAt(de.startLineNumber,de.startColumn),me=this._buffer.getOffsetAt(de.endLineNumber,de.endColumn);ce.cachedAbsoluteStart=pe,ce.cachedAbsoluteEnd=me,ce.cachedVersionId=se,ce.start=pe-he,ce.end=me-he,(0,h.recomputeMaxEnd)(ce)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&(this._tokenizationTextModelPart.handleDidChangeAttached(),this._onDidChangeAttached.fire(void 0))}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&(this._tokenizationTextModelPart.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 se=0,te=0;const Z=this._buffer.getLineCount();for(let ne=1;ne<=Z;ne++){const ce=this._buffer.getLineLength(ne);ce>=e.LONG_LINE_BOUNDARY?te+=ce:se+=ce}return te>se}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(se){this._assertNotDisposed();const te=typeof se.tabSize<"u"?se.tabSize:this._options.tabSize,Z=typeof se.indentSize<"u"?se.indentSize:this._options.indentSize,ne=typeof se.insertSpaces<"u"?se.insertSpaces:this._options.insertSpaces,ce=typeof se.trimAutoWhitespace<"u"?se.trimAutoWhitespace:this._options.trimAutoWhitespace,de=typeof se.bracketColorizationOptions<"u"?se.bracketColorizationOptions:this._options.bracketPairColorizationOptions,he=new s.TextModelResolvedOptions({tabSize:te,indentSize:Z,insertSpaces:ne,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:ce,bracketPairColorizationOptions:de});if(this._options.equals(he))return;const pe=this._options.createChangeEvent(he);this._options=he,this._bracketPairs.handleDidChangeOptions(pe),this._decorationProvider.handleDidChangeOptions(pe),this._onDidChangeOptions.fire(pe)}detectIndentation(se,te){this._assertNotDisposed();const Z=(0,g.guessIndentation)(this._buffer,te,se);this.updateOptions({insertSpaces:Z.insertSpaces,tabSize:Z.tabSize,indentSize:Z.tabSize})}normalizeIndentation(se){return this._assertNotDisposed(),(0,C.normalizeIndentation)(se,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(se=null){const te=this.findMatches(I.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(se,te.map(Z=>({range:Z.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(se){this._assertNotDisposed();const te=this._validatePosition(se.lineNumber,se.column,0);return this._buffer.getOffsetAt(te.lineNumber,te.column)}getPositionAt(se){this._assertNotDisposed();const te=Math.min(this._buffer.getLength(),Math.max(0,se));return this._buffer.getPositionAt(te)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(se){this._versionId=se}_overwriteAlternativeVersionId(se){this._alternativeVersionId=se}_overwriteInitialUndoRedoSnapshot(se){this._initialUndoRedoSnapshot=se}getValue(se,te=!1){this._assertNotDisposed();const Z=this.getFullModelRange(),ne=this.getValueInRange(Z,se);return te?this._buffer.getBOM()+ne:ne}createSnapshot(se=!1){return new B(this._buffer.createSnapshot(se))}getValueLength(se,te=!1){this._assertNotDisposed();const Z=this.getFullModelRange(),ne=this.getValueLengthInRange(Z,se);return te?this._buffer.getBOM().length+ne:ne}getValueInRange(se,te=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(se),te)}getValueLengthInRange(se,te=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(se),te)}getCharacterCountInRange(se,te=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(se),te)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(se){if(this._assertNotDisposed(),se<1||se>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(se)}getLineLength(se){if(this._assertNotDisposed(),se<1||se>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(se)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` `?0:1}getLineMinColumn(se){return this._assertNotDisposed(),1}getLineMaxColumn(se){if(this._assertNotDisposed(),se<1||se>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(se)+1}getLineFirstNonWhitespaceColumn(se){if(this._assertNotDisposed(),se<1||se>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(se)}getLineLastNonWhitespaceColumn(se){if(this._assertNotDisposed(),se<1||se>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(se)}_validateRangeRelaxedNoAllocations(se){const te=this._buffer.getLineCount(),Z=se.startLineNumber,ne=se.startColumn;let ce=Math.floor(typeof Z=="number"&&!isNaN(Z)?Z:1),de=Math.floor(typeof ne=="number"&&!isNaN(ne)?ne:1);if(ce<1)ce=1,de=1;else if(ce>te)ce=te,de=this.getLineMaxColumn(ce);else if(de<=1)de=1;else{const Ie=this.getLineMaxColumn(ce);de>=Ie&&(de=Ie)}const he=se.endLineNumber,pe=se.endColumn;let me=Math.floor(typeof he=="number"&&!isNaN(he)?he:1),Se=Math.floor(typeof pe=="number"&&!isNaN(pe)?pe:1);if(me<1)me=1,Se=1;else if(me>te)me=te,Se=this.getLineMaxColumn(me);else if(Se<=1)Se=1;else{const Ie=this.getLineMaxColumn(me);Se>=Ie&&(Se=Ie)}return Z===ce&&ne===de&&he===me&&pe===Se&&se instanceof u.Range&&!(se instanceof i.Selection)?se:new u.Range(ce,de,me,Se)}_isValidPosition(se,te,Z){if(typeof se!="number"||typeof te!="number"||isNaN(se)||isNaN(te)||se<1||te<1||(se|0)!==se||(te|0)!==te)return!1;const ne=this._buffer.getLineCount();if(se>ne)return!1;if(te===1)return!0;const ce=this.getLineMaxColumn(se);if(te>ce)return!1;if(Z===1){const de=this._buffer.getLineCharCode(se,te-2);if(I.isHighSurrogate(de))return!1}return!0}_validatePosition(se,te,Z){const ne=Math.floor(typeof se=="number"&&!isNaN(se)?se:1),ce=Math.floor(typeof te=="number"&&!isNaN(te)?te:1),de=this._buffer.getLineCount();if(ne<1)return new r.Position(1,1);if(ne>de)return new r.Position(de,this.getLineMaxColumn(de));if(ce<=1)return new r.Position(ne,1);const he=this.getLineMaxColumn(ne);if(ce>=he)return new r.Position(ne,he);if(Z===1){const pe=this._buffer.getLineCharCode(ne,ce-2);if(I.isHighSurrogate(pe))return new r.Position(ne,ce-1)}return new r.Position(ne,ce)}validatePosition(se){return this._assertNotDisposed(),se instanceof r.Position&&this._isValidPosition(se.lineNumber,se.column,1)?se:this._validatePosition(se.lineNumber,se.column,1)}_isValidRange(se,te){const Z=se.startLineNumber,ne=se.startColumn,ce=se.endLineNumber,de=se.endColumn;if(!this._isValidPosition(Z,ne,0)||!this._isValidPosition(ce,de,0))return!1;if(te===1){const he=ne>1?this._buffer.getLineCharCode(Z,ne-2):0,pe=de>1&&de<=this._buffer.getLineLength(ce)?this._buffer.getLineCharCode(ce,de-2):0,me=I.isHighSurrogate(he),Se=I.isHighSurrogate(pe);return!me&&!Se}return!0}validateRange(se){if(this._assertNotDisposed(),se instanceof u.Range&&!(se instanceof i.Selection)&&this._isValidRange(se,1))return se;const Z=this._validatePosition(se.startLineNumber,se.startColumn,0),ne=this._validatePosition(se.endLineNumber,se.endColumn,0),ce=Z.lineNumber,de=Z.column,he=ne.lineNumber,pe=ne.column;{const me=de>1?this._buffer.getLineCharCode(ce,de-2):0,Se=pe>1&&pe<=this._buffer.getLineLength(he)?this._buffer.getLineCharCode(he,pe-2):0,Ie=I.isHighSurrogate(me),ve=I.isHighSurrogate(Se);return!Ie&&!ve?new u.Range(ce,de,he,pe):ce===he&&de===pe?new u.Range(ce,de-1,he,pe-1):Ie&&ve?new u.Range(ce,de-1,he,pe+1):Ie?new u.Range(ce,de-1,he,pe):new u.Range(ce,de,he,pe+1)}return new u.Range(ce,de,he,pe)}modifyPosition(se,te){this._assertNotDisposed();const Z=this.getOffsetAt(se)+te;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,Z)))}getFullModelRange(){this._assertNotDisposed();const se=this.getLineCount();return new u.Range(1,1,se,this.getLineMaxColumn(se))}findMatchesLineByLine(se,te,Z,ne){return this._buffer.findMatchesLineByLine(se,te,Z,ne)}findMatches(se,te,Z,ne,ce,de,he=P){this._assertNotDisposed();let pe=null;te!==null&&(Array.isArray(te)||(te=[te]),te.every(Ie=>u.Range.isIRange(Ie))&&(pe=te.map(Ie=>this.validateRange(Ie)))),pe===null&&(pe=[this.getFullModelRange()]),pe=pe.sort((Ie,ve)=>Ie.startLineNumber-ve.startLineNumber||Ie.startColumn-ve.startColumn);const me=[];me.push(pe.reduce((Ie,ve)=>u.Range.areIntersecting(Ie,ve)?Ie.plusRange(ve):(me.push(Ie),ve)));let Se;if(!Z&&se.indexOf(` `)<0){const ve=new w.SearchParams(se,Z,ne,ce).parseSearchRequest();if(!ve)return[];Se=be=>this.findMatchesLineByLine(be,ve,de,he)}else Se=Ie=>w.TextModelSearch.findMatches(this,new w.SearchParams(se,Z,ne,ce),Ie,de,he);return me.map(Se).reduce((Ie,ve)=>Ie.concat(ve),[])}findNextMatch(se,te,Z,ne,ce,de){this._assertNotDisposed();const he=this.validatePosition(te);if(!Z&&se.indexOf(` `)<0){const me=new w.SearchParams(se,Z,ne,ce).parseSearchRequest();if(!me)return null;const Se=this.getLineCount();let Ie=new u.Range(he.lineNumber,he.column,Se,this.getLineMaxColumn(Se)),ve=this.findMatchesLineByLine(Ie,me,de,1);return w.TextModelSearch.findNextMatch(this,new w.SearchParams(se,Z,ne,ce),he,de),ve.length>0||(Ie=new u.Range(1,1,he.lineNumber,this.getLineMaxColumn(he.lineNumber)),ve=this.findMatchesLineByLine(Ie,me,de,1),ve.length>0)?ve[0]:null}return w.TextModelSearch.findNextMatch(this,new w.SearchParams(se,Z,ne,ce),he,de)}findPreviousMatch(se,te,Z,ne,ce,de){this._assertNotDisposed();const he=this.validatePosition(te);return w.TextModelSearch.findPreviousMatch(this,new w.SearchParams(se,Z,ne,ce),he,de)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(se){if((this.getEOL()===` `?0:1)!==se)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(se)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(se){return se instanceof s.ValidAnnotatedEditOperation?se:new s.ValidAnnotatedEditOperation(se.identifier||null,this.validateRange(se.range),se.text,se.forceMoveMarkers||!1,se.isAutoWhitespaceEdit||!1,se._isTracked||!1)}_validateEditOperations(se){const te=[];for(let Z=0,ne=se.length;Z<ne;Z++)te[Z]=this._validateEditOperation(se[Z]);return te}pushEditOperations(se,te,Z){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(se,this._validateEditOperations(te),Z)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(se,te,Z){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){const ne=te.map(de=>({range:this.validateRange(de.range),text:de.text}));let ce=!0;if(se)for(let de=0,he=se.length;de<he;de++){const pe=se[de];let me=!1;for(let Se=0,Ie=ne.length;Se<Ie;Se++){const ve=ne[Se].range,be=ve.startLineNumber>pe.endLineNumber,ge=pe.startLineNumber>ve.endLineNumber;if(!be&&!ge){me=!0;break}}if(!me){ce=!1;break}}if(ce)for(let de=0,he=this._trimAutoWhitespaceLines.length;de<he;de++){const pe=this._trimAutoWhitespaceLines[de],me=this.getLineMaxColumn(pe);let Se=!0;for(let Ie=0,ve=ne.length;Ie<ve;Ie++){const be=ne[Ie].range,ge=ne[Ie].text;if(!(pe<be.startLineNumber||pe>be.endLineNumber)&&!(pe===be.startLineNumber&&be.startColumn===me&&be.isEmpty()&&ge&&ge.length>0&&ge.charAt(0)===` `)&&!(pe===be.startLineNumber&&be.startColumn===1&&be.isEmpty()&&ge&&ge.length>0&&ge.charAt(ge.length-1)===` `)){Se=!1;break}}if(Se){const Ie=new u.Range(pe,1,pe,me);te.push(new s.ValidAnnotatedEditOperation(null,Ie,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(se,te,Z)}_applyUndo(se,te,Z,ne){const ce=se.map(de=>{const he=this.getPositionAt(de.newPosition),pe=this.getPositionAt(de.newEnd);return{range:new u.Range(he.lineNumber,he.column,pe.lineNumber,pe.column),text:de.oldText}});this._applyUndoRedoEdits(ce,te,!0,!1,Z,ne)}_applyRedo(se,te,Z,ne){const ce=se.map(de=>{const he=this.getPositionAt(de.oldPosition),pe=this.getPositionAt(de.oldEnd);return{range:new u.Range(he.lineNumber,he.column,pe.lineNumber,pe.column),text:de.newText}});this._applyUndoRedoEdits(ce,te,!1,!0,Z,ne)}_applyUndoRedoEdits(se,te,Z,ne,ce,de){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=Z,this._isRedoing=ne,this.applyEdits(se,!1),this.setEOL(te),this._overwriteAlternativeVersionId(ce)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(de),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(se,te=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const Z=this._validateEditOperations(se);return this._doApplyEdits(Z,te)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(se,te){const Z=this._buffer.getLineCount(),ne=this._buffer.applyEdits(se,this._options.trimAutoWhitespace,te),ce=this._buffer.getLineCount(),de=ne.changes;if(this._trimAutoWhitespaceLines=ne.trimAutoWhitespaceLineNumbers,de.length!==0){for(let me=0,Se=de.length;me<Se;me++){const Ie=de[me],[ve,be,ge]=(0,S.countEOL)(Ie.text);this._tokenizationTextModelPart.acceptEdit(Ie.range,Ie.text,ve,be,ge),this._decorationsTree.acceptReplace(Ie.rangeOffset,Ie.rangeLength,Ie.text.length,Ie.forceMoveMarkers)}const he=[];this._increaseVersionId();let pe=Z;for(let me=0,Se=de.length;me<Se;me++){const Ie=de[me],[ve]=(0,S.countEOL)(Ie.text);this._onDidChangeDecorations.fire();const be=Ie.range.startLineNumber,ge=Ie.range.endLineNumber,ue=ge-be,Ce=ve,De=Math.min(ue,Ce),Ae=Ce-ue,Pe=ce-pe-Ae+be,fe=Pe,ye=Pe+Ce,ke=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new r.Position(fe,1)),this.getOffsetAt(new r.Position(ye,this.getLineMaxColumn(ye))),0),Ee=y.LineInjectedText.fromDecorations(ke),Te=new t.ArrayQueue(Ee);for(let _e=De;_e>=0;_e--){const Re=be+_e,Le=Pe+_e;Te.takeFromEndWhile(Oe=>Oe.lineNumber>Le);const Me=Te.takeFromEndWhile(Oe=>Oe.lineNumber===Le);he.push(new y.ModelRawLineChanged(Re,this.getLineContent(Le),Me))}if(De<ue){const _e=be+De;he.push(new y.ModelRawLinesDeleted(_e+1,ge))}if(De<Ce){const _e=new t.ArrayQueue(Ee),Re=be+De,Le=Ce-De,Me=ce-pe-Le+Re+1,Oe=[],Ke=[];for(let We=0;We<Le;We++){const Xe=Me+We;Ke[We]=this.getLineContent(Xe),_e.takeWhile(Je=>Je.lineNumber<Xe),Oe[We]=_e.takeWhile(Je=>Je.lineNumber===Xe)}he.push(new y.ModelRawLinesInserted(Re+1,be+Ce,Ke,Oe))}pe+=Ae}this._emitContentChangedEvent(new y.ModelRawContentChangedEvent(he,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:de,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return ne.reverseEdits===null?void 0:ne.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(se){if(se===null||se.size===0)return;const Z=Array.from(se).map(ne=>new y.ModelRawLineChanged(ne,this.getLineContent(ne),this._getInjectedTextInLine(ne)));this._onDidChangeInjectedText.fire(new y.ModelInjectedTextChangedEvent(Z))}changeDecorations(se,te=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(te,se)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(se,te){const Z={addDecoration:(ce,de)=>this._deltaDecorationsImpl(se,[],[{range:ce,options:de}])[0],changeDecoration:(ce,de)=>{this._changeDecorationImpl(ce,de)},changeDecorationOptions:(ce,de)=>{this._changeDecorationOptionsImpl(ce,ee(de))},removeDecoration:ce=>{this._deltaDecorationsImpl(se,[ce],[])},deltaDecorations:(ce,de)=>ce.length===0&&de.length===0?[]:this._deltaDecorationsImpl(se,ce,de)};let ne=null;try{ne=te(Z)}catch(ce){(0,R.onUnexpectedError)(ce)}return Z.addDecoration=V,Z.changeDecoration=V,Z.changeDecorationOptions=V,Z.removeDecoration=V,Z.deltaDecorations=V,ne}deltaDecorations(se,te,Z=0){if(this._assertNotDisposed(),se||(se=[]),se.length===0&&te.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,R.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(Z,se,te)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(se){return this.getDecorationRange(se)}_setTrackedRange(se,te,Z){const ne=se?this._decorations[se]:null;if(!ne)return te?this._deltaDecorationsImpl(0,[],[{range:te,options:Y[Z]}])[0]:null;if(!te)return this._decorationsTree.delete(ne),delete this._decorations[ne.id],null;const ce=this._validateRangeRelaxedNoAllocations(te),de=this._buffer.getOffsetAt(ce.startLineNumber,ce.startColumn),he=this._buffer.getOffsetAt(ce.endLineNumber,ce.endColumn);return this._decorationsTree.delete(ne),ne.reset(this.getVersionId(),de,he,ce),ne.setOptions(Y[Z]),this._decorationsTree.insert(ne),ne.id}removeAllDecorationsWithOwnerId(se){if(this._isDisposed)return;const te=this._decorationsTree.collectNodesFromOwner(se);for(let Z=0,ne=te.length;Z<ne;Z++){const ce=te[Z];this._decorationsTree.delete(ce),delete this._decorations[ce.id]}}getDecorationOptions(se){const te=this._decorations[se];return te?te.options:null}getDecorationRange(se){const te=this._decorations[se];return te?this._decorationsTree.getNodeRange(this,te):null}getLineDecorations(se,te=0,Z=!1){return se<1||se>this.getLineCount()?[]:this.getLinesDecorations(se,se,te,Z)}getLinesDecorations(se,te,Z=0,ne=!1){const ce=this.getLineCount(),de=Math.min(ce,Math.max(1,se)),he=Math.min(ce,Math.max(1,te)),pe=this.getLineMaxColumn(he),me=new u.Range(de,1,he,pe),Se=this._getDecorationsInRange(me,Z,ne);return(0,t.pushMany)(Se,this._decorationProvider.getDecorationsInRange(me,Z,ne)),Se}getDecorationsInRange(se,te=0,Z=!1,ne=!1){const ce=this.validateRange(se),de=this._getDecorationsInRange(ce,te,Z);return(0,t.pushMany)(de,this._decorationProvider.getDecorationsInRange(ce,te,Z,ne)),de}getOverviewRulerDecorations(se=0,te=!1){return this._decorationsTree.getAll(this,se,te,!0)}getInjectedTextDecorations(se=0){return this._decorationsTree.getAllInjectedText(this,se)}_getInjectedTextInLine(se){const te=this._buffer.getOffsetAt(se,1),Z=te+this._buffer.getLineLength(se),ne=this._decorationsTree.getInjectedTextInInterval(this,te,Z,0);return y.LineInjectedText.fromDecorations(ne).filter(ce=>ce.lineNumber===se)}getAllDecorations(se=0,te=!1){let Z=this._decorationsTree.getAll(this,se,te,!1);return Z=Z.concat(this._decorationProvider.getAllDecorations(se,te)),Z}_getDecorationsInRange(se,te,Z){const ne=this._buffer.getOffsetAt(se.startLineNumber,se.startColumn),ce=this._buffer.getOffsetAt(se.endLineNumber,se.endColumn);return this._decorationsTree.getAllInInterval(this,ne,ce,te,Z)}getRangeAt(se,te){return this._buffer.getRangeAt(se,te-se)}_changeDecorationImpl(se,te){const Z=this._decorations[se];if(!Z)return;if(Z.options.after){const he=this.getDecorationRange(se);this._onDidChangeDecorations.recordLineAffectedByInjectedText(he.endLineNumber)}if(Z.options.before){const he=this.getDecorationRange(se);this._onDidChangeDecorations.recordLineAffectedByInjectedText(he.startLineNumber)}const ne=this._validateRangeRelaxedNoAllocations(te),ce=this._buffer.getOffsetAt(ne.startLineNumber,ne.startColumn),de=this._buffer.getOffsetAt(ne.endLineNumber,ne.endColumn);this._decorationsTree.delete(Z),Z.reset(this.getVersionId(),ce,de,ne),this._decorationsTree.insert(Z),this._onDidChangeDecorations.checkAffectedAndFire(Z.options),Z.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ne.endLineNumber),Z.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ne.startLineNumber)}_changeDecorationOptionsImpl(se,te){const Z=this._decorations[se];if(!Z)return;const ne=!!(Z.options.overviewRuler&&Z.options.overviewRuler.color),ce=!!(te.overviewRuler&&te.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(Z.options),this._onDidChangeDecorations.checkAffectedAndFire(te),Z.options.after||te.after){const de=this._decorationsTree.getNodeRange(this,Z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(de.endLineNumber)}if(Z.options.before||te.before){const de=this._decorationsTree.getNodeRange(this,Z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(de.startLineNumber)}ne!==ce?(this._decorationsTree.delete(Z),Z.setOptions(te),this._decorationsTree.insert(Z)):Z.setOptions(te)}_deltaDecorationsImpl(se,te,Z){const ne=this.getVersionId(),ce=te.length;let de=0;const he=Z.length;let pe=0;this._onDidChangeDecorations.beginDeferredEmit();try{const me=new Array(he);for(;de<ce||pe<he;){let Se=null;if(de<ce){do Se=this._decorations[te[de++]];while(!Se&&de<ce);if(Se){if(Se.options.after){const Ie=this._decorationsTree.getNodeRange(this,Se);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ie.endLineNumber)}if(Se.options.before){const Ie=this._decorationsTree.getNodeRange(this,Se);this._onDidChangeDecorations.recordLineAffectedByInjectedText(Ie.startLineNumber)}this._decorationsTree.delete(Se),this._onDidChangeDecorations.checkAffectedAndFire(Se.options)}}if(pe<he){if(!Se){const Ce=++this._lastDecorationId,De=`${this._instanceId};${Ce}`;Se=new h.IntervalNode(De,0,0),this._decorations[De]=Se}const Ie=Z[pe],ve=this._validateRangeRelaxedNoAllocations(Ie.range),be=ee(Ie.options),ge=this._buffer.getOffsetAt(ve.startLineNumber,ve.startColumn),ue=this._buffer.getOffsetAt(ve.endLineNumber,ve.endColumn);Se.ownerId=se,Se.reset(ne,ge,ue,ve),Se.setOptions(be),Se.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.endLineNumber),Se.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(ve.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(be),this._decorationsTree.insert(Se),me[pe]=Se.id,pe++}else Se&&delete this._decorations[Se.id]}return me}finally{this._onDidChangeDecorations.endDeferredEmit()}}getLanguageId(){return this.tokenization.getLanguageId()}setMode(se,te){this.tokenization.setLanguageId(se,te)}getLanguageIdAtPosition(se,te){return this.tokenization.getLanguageIdAtPosition(se,te)}setLineTokens(se,te){this._tokenizationTextModelPart.setLineTokens(se,te)}getWordAtPosition(se){return this._tokenizationTextModelPart.getWordAtPosition(se)}getWordUntilPosition(se){return this._tokenizationTextModelPart.getWordUntilPosition(se)}normalizePosition(se,te){return se}getLineIndentColumn(se){return H(this.getLineContent(se))+1}};x.MODEL_SYNC_LIMIT=50*1024*1024,x.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,x.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,x.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:f.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:f.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:f.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:f.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:f.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:f.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},x=we([F(4,T.IUndoRedoService),F(5,c.ILanguageService),F(6,l.ILanguageConfigurationService)],x),e.TextModel=x;function H(oe){let se=0;for(const te of oe)if(te===" "||te===" ")se++;else break;return se}function W(oe){return!!(oe.options.overviewRuler&&oe.options.overviewRuler.color)}function U(oe){return!!oe.options.after||!!oe.options.before}class ${constructor(){this._decorationsTree0=new h.IntervalTree,this._decorationsTree1=new h.IntervalTree,this._injectedTextDecorationsTree=new h.IntervalTree}ensureAllNodesHaveRanges(se){this.getAll(se,0,!1,!1)}_ensureNodesHaveRanges(se,te){for(const Z of te)Z.range===null&&(Z.range=se.getRangeAt(Z.cachedAbsoluteStart,Z.cachedAbsoluteEnd));return te}getAllInInterval(se,te,Z,ne,ce){const de=se.getVersionId(),he=this._intervalSearch(te,Z,ne,ce,de);return this._ensureNodesHaveRanges(se,he)}_intervalSearch(se,te,Z,ne,ce){const de=this._decorationsTree0.intervalSearch(se,te,Z,ne,ce),he=this._decorationsTree1.intervalSearch(se,te,Z,ne,ce),pe=this._injectedTextDecorationsTree.intervalSearch(se,te,Z,ne,ce);return de.concat(he).concat(pe)}getInjectedTextInInterval(se,te,Z,ne){const ce=se.getVersionId(),de=this._injectedTextDecorationsTree.intervalSearch(te,Z,ne,!1,ce);return this._ensureNodesHaveRanges(se,de).filter(he=>he.options.showIfCollapsed||!he.range.isEmpty())}getAllInjectedText(se,te){const Z=se.getVersionId(),ne=this._injectedTextDecorationsTree.search(te,!1,Z);return this._ensureNodesHaveRanges(se,ne).filter(ce=>ce.options.showIfCollapsed||!ce.range.isEmpty())}getAll(se,te,Z,ne){const ce=se.getVersionId(),de=this._search(te,Z,ne,ce);return this._ensureNodesHaveRanges(se,de)}_search(se,te,Z,ne){if(Z)return this._decorationsTree1.search(se,te,ne);{const ce=this._decorationsTree0.search(se,te,ne),de=this._decorationsTree1.search(se,te,ne),he=this._injectedTextDecorationsTree.search(se,te,ne);return ce.concat(de).concat(he)}}collectNodesFromOwner(se){const te=this._decorationsTree0.collectNodesFromOwner(se),Z=this._decorationsTree1.collectNodesFromOwner(se),ne=this._injectedTextDecorationsTree.collectNodesFromOwner(se);return te.concat(Z).concat(ne)}collectNodesPostOrder(){const se=this._decorationsTree0.collectNodesPostOrder(),te=this._decorationsTree1.collectNodesPostOrder(),Z=this._injectedTextDecorationsTree.collectNodesPostOrder();return se.concat(te).concat(Z)}insert(se){U(se)?this._injectedTextDecorationsTree.insert(se):W(se)?this._decorationsTree1.insert(se):this._decorationsTree0.insert(se)}delete(se){U(se)?this._injectedTextDecorationsTree.delete(se):W(se)?this._decorationsTree1.delete(se):this._decorationsTree0.delete(se)}getNodeRange(se,te){const Z=se.getVersionId();return te.cachedVersionId!==Z&&this._resolveNode(te,Z),te.range===null&&(te.range=se.getRangeAt(te.cachedAbsoluteStart,te.cachedAbsoluteEnd)),te.range}_resolveNode(se,te){U(se)?this._injectedTextDecorationsTree.resolveNode(se,te):W(se)?this._decorationsTree1.resolveNode(se,te):this._decorationsTree0.resolveNode(se,te)}acceptReplace(se,te,Z,ne){this._decorationsTree0.acceptReplace(se,te,Z,ne),this._decorationsTree1.acceptReplace(se,te,Z,ne),this._injectedTextDecorationsTree.acceptReplace(se,te,Z,ne)}}function q(oe){return oe.replace(/[^a-z0-9\-_]/gi," ")}class X{constructor(se){this.color=se.color||"",this.darkColor=se.darkColor||""}}class G extends X{constructor(se){super(se),this._resolvedColor=null,this.position=typeof se.position=="number"?se.position:s.OverviewRulerLane.Center}getColor(se){return this._resolvedColor||(se.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,se):this._resolvedColor=this._resolveColor(this.color,se)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(se,te){if(typeof se=="string")return se;const Z=se?te.getColor(se.id):null;return Z?Z.toString():""}}e.ModelDecorationOverviewRulerOptions=G;class Q extends X{constructor(se){super(se),this.position=se.position}getColor(se){return this._resolvedColor||(se.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,se):this._resolvedColor=this._resolveColor(this.color,se)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(se,te){return typeof se=="string"?p.Color.fromHex(se):te.getColor(se.id)}}e.ModelDecorationMinimapOptions=Q;class j{static from(se){return se instanceof j?se:new j(se)}constructor(se){this.content=se.content||"",this.inlineClassName=se.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=se.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=se.attachedData||null,this.cursorStops=se.cursorStops||null}}e.ModelDecorationInjectedTextOptions=j;class K{static register(se){return new K(se)}static createDynamic(se){return new K(se)}constructor(se){this.description=se.description,this.blockClassName=se.blockClassName?q(se.blockClassName):null,this.blockIsAfterEnd=se.blockIsAfterEnd??null,this.stickiness=se.stickiness||0,this.zIndex=se.zIndex||0,this.className=se.className?q(se.className):null,this.hoverMessage=se.hoverMessage||null,this.glyphMarginHoverMessage=se.glyphMarginHoverMessage||null,this.isWholeLine=se.isWholeLine||!1,this.showIfCollapsed=se.showIfCollapsed||!1,this.collapseOnReplaceEdit=se.collapseOnReplaceEdit||!1,this.overviewRuler=se.overviewRuler?new G(se.overviewRuler):null,this.minimap=se.minimap?new Q(se.minimap):null,this.glyphMarginClassName=se.glyphMarginClassName?q(se.glyphMarginClassName):null,this.linesDecorationsClassName=se.linesDecorationsClassName?q(se.linesDecorationsClassName):null,this.firstLineDecorationClassName=se.firstLineDecorationClassName?q(se.firstLineDecorationClassName):null,this.marginClassName=se.marginClassName?q(se.marginClassName):null,this.inlineClassName=se.inlineClassName?q(se.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=se.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=se.beforeContentClassName?q(se.beforeContentClassName):null,this.afterContentClassName=se.afterContentClassName?q(se.afterContentClassName):null,this.after=se.after?j.from(se.after):null,this.before=se.before?j.from(se.before):null,this.hideInCommentTokens=se.hideInCommentTokens??!1,this.hideInStringTokens=se.hideInStringTokens??!1}}e.ModelDecorationOptions=K,K.EMPTY=K.register({description:"empty"});const Y=[K.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),K.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),K.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),K.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ee(oe){return oe instanceof K?oe:K.createDynamic(oe)}class ie extends k.Disposable{constructor(se){super(),this.handleBeforeFire=se,this._actual=this._register(new A.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}hasListeners(){return this._actual.hasListeners()}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),this._affectedInjectedTextLines?.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(se){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(se)}checkAffectedAndFire(se){this._affectsMinimap||(this._affectsMinimap=!!(se.minimap&&se.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(se.overviewRuler&&se.overviewRuler.color)),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const se={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(se)}}e.DidChangeDecorationsEmitter=ie;class re 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(se=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=se;const te=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(te),this._slowEmitter.fire(te)}}fire(se){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(se):this._deferredEvent=se;return}this._fastEmitter.fire(se),this._slowEmitter.fire(se)}}e.DidChangeContentEmitter=re}),define(ae[616],le([1,0,6,2,14,21,138,20,94,484,125,42,54,114,8,11,32,12,25,156,108,423,22,813,789,52,122,242,146,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelSemanticColoring=e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=e.ModelService=void 0;function T(H){return H.toString()}function _(H){const W=new n.StringSHA1,U=H.createSnapshot();let $;for(;$=U.read();)W.update($);return W.digest()}class L{constructor(W,U,$){this._modelEventListeners=new p.DisposableStore,this.model=W,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(W.onWillDispose(()=>U(W))),this._modelEventListeners.add(W.onDidChangeLanguage(q=>$(W,q)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(W,U){this._disposeLanguageSelection(),this._languageSelection=W,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(W.languageId,U)),this.model.setMode(W.languageId,U)}}const M=R.isLinux||R.isMacintosh?1:2;class O{constructor(W,U,$,q,X,G,Q,j){this.uri=W,this.initialUndoRedoSnapshot=U,this.time=$,this.sharesUndoRedoStack=q,this.heapSize=X,this.sha1=G,this.versionId=Q,this.alternativeVersionId=j}}let N=class rn extends p.Disposable{constructor(W,U,$,q,X,G,Q,j,K){super(),this._configurationService=W,this._resourcePropertiesService=U,this._themeService=$,this._logService=q,this._undoRedoService=X,this._languageService=G,this._languageConfigurationService=Q,this._languageFeatureDebounceService=j,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 V(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new B(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,K))}static _readModelOptions(W,U){let $=b.EDITOR_MODEL_DEFAULTS.tabSize;if(W.editor&&typeof W.editor.tabSize<"u"){const ie=parseInt(W.editor.tabSize,10);isNaN(ie)||($=ie),$<1&&($=1)}let q=$;if(W.editor&&typeof W.editor.indentSize<"u"&&W.editor.indentSize!=="tabSize"){const ie=parseInt(W.editor.indentSize,10);isNaN(ie)||(q=ie),q<1&&(q=1)}let X=b.EDITOR_MODEL_DEFAULTS.insertSpaces;W.editor&&typeof W.editor.insertSpaces<"u"&&(X=W.editor.insertSpaces==="false"?!1:Boolean(W.editor.insertSpaces));let G=M;const Q=W.eol;Q===`\r `?G=2:Q===` `&&(G=1);let j=b.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;W.editor&&typeof W.editor.trimAutoWhitespace<"u"&&(j=W.editor.trimAutoWhitespace==="false"?!1:Boolean(W.editor.trimAutoWhitespace));let K=b.EDITOR_MODEL_DEFAULTS.detectIndentation;W.editor&&typeof W.editor.detectIndentation<"u"&&(K=W.editor.detectIndentation==="false"?!1:Boolean(W.editor.detectIndentation));let Y=b.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;W.editor&&typeof W.editor.largeFileOptimizations<"u"&&(Y=W.editor.largeFileOptimizations==="false"?!1:Boolean(W.editor.largeFileOptimizations));let ee=b.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return W.editor?.bracketPairColorization&&typeof W.editor.bracketPairColorization=="object"&&(ee={enabled:!!W.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!W.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:U,tabSize:$,indentSize:q,insertSpaces:X,detectIndentation:K,defaultEOL:G,trimAutoWhitespace:j,largeFileOptimizations:Y,bracketPairColorizationOptions:ee}}_getEOL(W,U){if(W)return this._resourcePropertiesService.getEOL(W,U);const $=this._configurationService.getValue("files.eol",{overrideIdentifier:U});return $&&typeof $=="string"&&$!=="auto"?$:R.OS===3||R.OS===2?` `:`\r `}_shouldRestoreUndoStack(){const W=this._configurationService.getValue("files.restoreUndoStack");return typeof W=="boolean"?W:!0}getCreationOptions(W,U,$){let q=this._modelCreationOptionsByLanguageAndResource[W+U];if(!q){const X=this._configurationService.getValue("editor",{overrideIdentifier:W,resource:U}),G=this._getEOL(U,W);q=rn._readModelOptions({editor:X,eol:G},$),this._modelCreationOptionsByLanguageAndResource[W+U]=q}return q}_updateModelOptions(){const W=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const U=Object.keys(this._models);for(let $=0,q=U.length;$<q;$++){const X=U[$],G=this._models[X],Q=G.model.getLanguageId(),j=G.model.uri,K=W[Q+j],Y=this.getCreationOptions(Q,j,G.model.isForSimpleWidget);rn._setModelOptionsForModel(G.model,Y,K)}}static _setModelOptionsForModel(W,U,$){$&&$.defaultEOL!==U.defaultEOL&&W.getLineCount()===1&&W.setEOL(U.defaultEOL===1?0:1),!($&&$.detectIndentation===U.detectIndentation&&$.insertSpaces===U.insertSpaces&&$.tabSize===U.tabSize&&$.indentSize===U.indentSize&&$.trimAutoWhitespace===U.trimAutoWhitespace&&(0,v.equals)($.bracketPairColorizationOptions,U.bracketPairColorizationOptions))&&(U.detectIndentation?(W.detectIndentation(U.insertSpaces,U.tabSize),W.updateOptions({trimAutoWhitespace:U.trimAutoWhitespace,bracketColorizationOptions:U.bracketPairColorizationOptions})):W.updateOptions({insertSpaces:U.insertSpaces,tabSize:U.tabSize,indentSize:U.indentSize,trimAutoWhitespace:U.trimAutoWhitespace,bracketColorizationOptions:U.bracketPairColorizationOptions}))}_insertDisposedModel(W){this._disposedModels.set(T(W.uri),W),this._disposedModelsHeapSize+=W.heapSize}_removeDisposedModel(W){const U=this._disposedModels.get(T(W));return U&&(this._disposedModelsHeapSize-=U.heapSize),this._disposedModels.delete(T(W)),U}_ensureDisposedModelsHeapSize(W){if(this._disposedModelsHeapSize>W){const U=[];for(this._disposedModels.forEach($=>{$.sharesUndoRedoStack||U.push($)}),U.sort(($,q)=>$.time-q.time);U.length>0&&this._disposedModelsHeapSize>W;){const $=U.shift();this._removeDisposedModel($.uri),$.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot($.initialUndoRedoSnapshot)}}}_createModelData(W,U,$,q){const X=this.getCreationOptions(U,$,q),G=new I.TextModel(W,U,X,$,this._undoRedoService,this._languageService,this._languageConfigurationService);if($&&this._disposedModels.has(T($))){const K=this._removeDisposedModel($),Y=this._undoRedoService.getElements($),ee=_(G)===K.sha1;if(ee||K.sharesUndoRedoStack){for(const ie of Y.past)(0,a.isEditStackElement)(ie)&&ie.matchesResource($)&&ie.setModel(G);for(const ie of Y.future)(0,a.isEditStackElement)(ie)&&ie.matchesResource($)&&ie.setModel(G);this._undoRedoService.setElementsValidFlag($,!0,ie=>(0,a.isEditStackElement)(ie)&&ie.matchesResource($)),ee&&(G._overwriteVersionId(K.versionId),G._overwriteAlternativeVersionId(K.alternativeVersionId),G._overwriteInitialUndoRedoSnapshot(K.initialUndoRedoSnapshot))}else K.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(K.initialUndoRedoSnapshot)}const Q=T(G.uri);if(this._models[Q])throw new Error("ModelService: Cannot add model because it already exists!");const j=new L(G,K=>this._onWillDispose(K),(K,Y)=>this._onDidChangeLanguage(K,Y));return this._models[Q]=j,j}updateModel(W,U){const $=this.getCreationOptions(W.getLanguageId(),W.uri,W.isForSimpleWidget),{textBuffer:q,disposable:X}=(0,I.createTextBuffer)(U,$.defaultEOL);if(W.equalsTextBuffer(q)){X.dispose();return}W.pushStackElement(),W.pushEOL(q.getEOL()===`\r `?1:0),W.pushEditOperations([],rn._computeEdits(W,q),()=>[]),W.pushStackElement(),X.dispose()}static _commonPrefix(W,U,$,q,X,G){const Q=Math.min(U,X);let j=0;for(let K=0;K<Q&&W.getLineContent($+K)===q.getLineContent(G+K);K++)j++;return j}static _commonSuffix(W,U,$,q,X,G){const Q=Math.min(U,X);let j=0;for(let K=0;K<Q&&W.getLineContent($+U-K)===q.getLineContent(G+X-K);K++)j++;return j}static _computeEdits(W,U){const $=W.getLineCount(),q=U.getLineCount(),X=this._commonPrefix(W,$,1,U,q,1);if($===q&&X===$)return[];const G=this._commonSuffix(W,$-X,X,U,q-X,X);let Q,j;return G>0?(Q=new E.Range(X+1,1,$-G+1,1),j=new E.Range(X+1,1,q-G+1,1)):X>0?(Q=new E.Range(X,W.getLineMaxColumn(X),$,W.getLineMaxColumn($)),j=new E.Range(X,1+U.getLineLength(X),q,1+U.getLineLength(q))):(Q=new E.Range(1,1,$,W.getLineMaxColumn($)),j=new E.Range(1,1,q,1+U.getLineLength(q))),[k.EditOperation.replaceMove(Q,U.getValueInRange(j,0))]}createModel(W,U,$,q=!1){let X;return U?(X=this._createModelData(W,U.languageId,$,q),this.setMode(X.model,U)):X=this._createModelData(W,S.PLAINTEXT_LANGUAGE_ID,$,q),this._onModelAdded.fire(X.model),X.model}setMode(W,U,$){if(!U)return;const q=this._models[T(W.uri)];!q||q.setLanguage(U,$)}destroyModel(W){const U=this._models[T(W)];!U||U.model.dispose()}getModels(){const W=[],U=Object.keys(this._models);for(let $=0,q=U.length;$<q;$++){const X=U[$];W.push(this._models[X].model)}return W}getModel(W){const U=T(W),$=this._models[U];return $?$.model:null}getSemanticTokensProviderStyling(W){return this._semanticStyling.get(W)}_schemaShouldMaintainUndoRedoElements(W){return W.scheme===o.Schemas.file||W.scheme===o.Schemas.vscodeRemote||W.scheme===o.Schemas.vscodeUserData||W.scheme===o.Schemas.vscodeNotebookCell||W.scheme==="fake-fs"}_onWillDispose(W){const U=T(W.uri),$=this._models[U],q=this._undoRedoService.getUriComparisonKey(W.uri)!==W.uri.toString();let X=!1,G=0;if(q||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(W.uri)){const j=this._undoRedoService.getElements(W.uri);if(j.past.length>0||j.future.length>0){for(const K of j.past)(0,a.isEditStackElement)(K)&&K.matchesResource(W.uri)&&(X=!0,G+=K.heapSize(W.uri),K.setModel(W.uri));for(const K of j.future)(0,a.isEditStackElement)(K)&&K.matchesResource(W.uri)&&(X=!0,G+=K.heapSize(W.uri),K.setModel(W.uri))}}const Q=rn.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(X)if(!q&&G>Q){const j=$.model.getInitialUndoRedoSnapshot();j!==null&&this._undoRedoService.restoreSnapshot(j)}else this._ensureDisposedModelsHeapSize(Q-G),this._undoRedoService.setElementsValidFlag(W.uri,!1,j=>(0,a.isEditStackElement)(j)&&j.matchesResource(W.uri)),this._insertDisposedModel(new O(W.uri,$.model.getInitialUndoRedoSnapshot(),Date.now(),q,G,_(W),W.getVersionId(),W.getAlternativeVersionId()));else if(!q){const j=$.model.getInitialUndoRedoSnapshot();j!==null&&this._undoRedoService.restoreSnapshot(j)}delete this._models[U],$.dispose(),delete this._modelCreationOptionsByLanguageAndResource[W.getLanguageId()+W.uri],this._onModelRemoved.fire(W)}_onDidChangeLanguage(W,U){const $=U.oldLanguage,q=W.getLanguageId(),X=this.getCreationOptions($,W.uri,W.isForSimpleWidget),G=this.getCreationOptions(q,W.uri,W.isForSimpleWidget);rn._setModelOptionsForModel(W,G,X),this._onModelModeChanged.fire({model:W,oldLanguageId:$})}};N.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,N=we([F(0,i.IConfigurationService),F(1,u.ITextResourcePropertiesService),F(2,l.IThemeService),F(3,s.ILogService),F(4,d.IUndoRedoService),F(5,C.ILanguageService),F(6,m.ILanguageConfigurationService),F(7,w.ILanguageFeatureDebounceService),F(8,y.ILanguageFeaturesService)],N),e.ModelService=N,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function P(H,W,U){const $=U.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:H.getLanguageId(),resource:H.uri})?.enabled;return typeof $=="boolean"?$:W.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=P;let B=class extends p.Disposable{constructor(W,U,$,q,X,G){super(),this._watchers=Object.create(null),this._semanticStyling=W;const Q=Y=>{this._watchers[Y.uri.toString()]=new x(Y,this._semanticStyling,$,X,G)},j=(Y,ee)=>{ee.dispose(),delete this._watchers[Y.uri.toString()]},K=()=>{for(const Y of U.getModels()){const ee=this._watchers[Y.uri.toString()];P(Y,$,q)?ee||Q(Y):ee&&j(Y,ee)}};this._register(U.onModelAdded(Y=>{P(Y,$,q)&&Q(Y)})),this._register(U.onModelRemoved(Y=>{const ee=this._watchers[Y.uri.toString()];ee&&j(Y,ee)})),this._register(q.onDidChangeConfiguration(Y=>{Y.affectsConfiguration(e.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&K()})),this._register($.onDidColorThemeChange(K))}dispose(){for(const W of Object.values(this._watchers))W.dispose();super.dispose()}};B=we([F(1,r.IModelService),F(2,l.IThemeService),F(3,i.IConfigurationService),F(4,w.ILanguageFeatureDebounceService),F(5,y.ILanguageFeaturesService)],B);class V extends p.Disposable{constructor(W,U,$){super(),this._themeService=W,this._languageService=U,this._logService=$,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(W){return this._caches.has(W)||this._caches.set(W,new g.SemanticTokensProviderStyling(W.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(W)}}class z{constructor(W,U,$){this.provider=W,this.resultId=U,this.data=$}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let x=class ji extends p.Disposable{constructor(W,U,$,q,X){super(),this._isDisposed=!1,this._model=W,this._semanticStyling=U,this._provider=X.documentSemanticTokensProvider,this._debounceInformation=q.for(this._provider,"DocumentSemanticTokens",{min:ji.REQUEST_MIN_DELAY,max:ji.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new f.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),ji.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,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 G=()=>{(0,p.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const Q of this._provider.all(W))typeof Q.onDidChange=="function"&&this._documentProvidersChangeListeners.push(Q.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};G(),this._register(this._provider.onDidChange(()=>{G(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register($.onDidColorThemeChange(Q=>{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,h.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}const W=new c.CancellationTokenSource,U=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,$=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,q=(0,h.getDocumentSemanticTokens)(this._provider,this._model,U,$,W.token);this._currentDocumentRequestCancellationTokenSource=W,this._providersChangedDuringRequest=!1;const X=[],G=this._model.onDidChangeContent(j=>{X.push(j)}),Q=new D.StopWatch(!1);q.then(j=>{if(this._debounceInformation.update(this._model,Q.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,G.dispose(),!j)this._setDocumentSemanticTokens(null,null,null,X);else{const{provider:K,tokens:Y}=j,ee=this._semanticStyling.get(K);this._setDocumentSemanticTokens(K,Y||null,ee,X)}},j=>{j&&(A.isCancellationError(j)||typeof j.message=="string"&&j.message.indexOf("busy")!==-1)||A.onUnexpectedError(j),this._currentDocumentRequestCancellationTokenSource=null,G.dispose(),(X.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(W,U,$,q,X){X=Math.min(X,$.length-q,W.length-U);for(let G=0;G<X;G++)$[q+G]=W[U+G]}_setDocumentSemanticTokens(W,U,$,q){const X=this._currentDocumentResponse,G=()=>{(q.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){W&&U&&W.releaseDocumentSemanticTokens(U.resultId);return}if(!W||!$){this._model.tokenization.setSemanticTokens(null,!1);return}if(!U){this._model.tokenization.setSemanticTokens(null,!0),G();return}if((0,h.isSemanticTokensEdits)(U)){if(!X){this._model.tokenization.setSemanticTokens(null,!0);return}if(U.edits.length===0)U={resultId:U.resultId,data:X.data};else{let Q=0;for(const ie of U.edits)Q+=(ie.data?ie.data.length:0)-ie.deleteCount;const j=X.data,K=new Uint32Array(j.length+Q);let Y=j.length,ee=K.length;for(let ie=U.edits.length-1;ie>=0;ie--){const re=U.edits[ie];if(re.start>j.length){$.warnInvalidEditStart(X.resultId,U.resultId,ie,re.start,j.length),this._model.tokenization.setSemanticTokens(null,!0);return}const oe=Y-(re.start+re.deleteCount);oe>0&&(ji._copy(j,Y-oe,K,ee-oe,oe),ee-=oe),re.data&&(ji._copy(re.data,0,K,ee-re.data.length,re.data.length),ee-=re.data.length),Y=re.start}Y>0&&ji._copy(j,0,K,0,Y),U={resultId:U.resultId,data:K}}}if((0,h.isSemanticTokens)(U)){this._currentDocumentResponse=new z(W,U.resultId,U.data);const Q=(0,g.toMultilineTokens2)(U,$,this._model.getLanguageId());if(q.length>0)for(const j of q)for(const K of Q)for(const Y of j.changes)K.applyEdit(Y.range,Y.text);this._model.tokenization.setSemanticTokens(Q,!0)}else this._model.tokenization.setSemanticTokens(null,!0);G()}};x.REQUEST_MIN_DELAY=300,x.REQUEST_MAX_DELAY=2e3,x=we([F(2,l.IThemeService),F(3,w.ILanguageFeatureDebounceService),F(4,y.ILanguageFeaturesService)],x),e.ModelSemanticColoring=x}),define(ae[2203],le([1,0,54,62,2,156,423]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelUndoRedoParticipant=void 0;let E=class extends R.Disposable{constructor(b,S,C){super(),this._modelService=b,this._textModelService=S,this._undoRedoService=C,this._register(this._modelService.onModelRemoved(r=>{const u=this._undoRedoService.getElements(r.uri);if(!(u.past.length===0&&u.future.length===0)){for(const i of u.past)i instanceof k.MultiModelEditStackElement&&i.setDelegate(this);for(const i of u.future)i instanceof k.MultiModelEditStackElement&&i.setDelegate(this)}}))}prepareUndoRedo(b){const S=b.getMissingModels();if(S.length===0)return R.Disposable.None;const C=S.map(async r=>{try{return await this._textModelService.createModelReference(r)}catch{return R.Disposable.None}});return Promise.all(C).then(r=>({dispose:()=>(0,R.dispose)(r)}))}};E=we([F(0,t.IModelService),F(1,p.ITextModelService),F(2,A.IUndoRedoService)],E),e.ModelUndoRedoParticipant=E}),define(ae[2204],le([1,0,16,50,20,568,94,326,570,1297,365,281]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class r{constructor(a,o,g,h,v,m,w,D,y){this._editorId=a,this.model=o,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=g,this._monospaceLineBreaksComputerFactory=h,this.fontInfo=v,this.tabSize=m,this.wrappingStrategy=w,this.wrappingColumn=D,this.wrappingIndent=y,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new c(this)}_constructLines(a,o){this.modelLineProjections=[],a&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const g=this.model.getLinesContent(),h=this.model.getInjectedTextDecorations(this._editorId),v=g.length,m=this.createLineBreaksComputer(),w=new t.ArrayQueue(E.LineInjectedText.fromDecorations(h));for(let N=0;N<v;N++){const P=w.takeWhile(B=>B.lineNumber===N+1);m.addRequest(g[N],P,o?o[N]:null)}const D=m.finalize(),y=[],T=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(R.Range.compareRangesUsingStarts);let _=1,L=0,M=-1,O=M+1<T.length?L+1:v+2;for(let N=0;N<v;N++){const P=N+1;P===O&&(M++,_=T[M].startLineNumber,L=T[M].endLineNumber,O=M+1<T.length?L+1:v+2);const B=P>=_&&P<=L,V=(0,b.createModelLineProjection)(D[N],!B);y[N]=V.getViewLineCount(),this.modelLineProjections[N]=V}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new S.ConstantTimePrefixSumComputer(y)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(a=>this.model.getDecorationRange(a))}setHiddenAreas(a){const o=a.map(L=>this.model.validateRange(L)),g=u(o),h=this.hiddenAreasDecorationIds.map(L=>this.model.getDecorationRange(L)).sort(R.Range.compareRangesUsingStarts);if(g.length===h.length){let L=!1;for(let M=0;M<g.length;M++)if(!g[M].equalsRange(h[M])){L=!0;break}if(!L)return!1}const v=g.map(L=>({range:L,options:k.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,v);const m=g;let w=1,D=0,y=-1,T=y+1<m.length?D+1:this.modelLineProjections.length+2,_=!1;for(let L=0;L<this.modelLineProjections.length;L++){const M=L+1;M===T&&(y++,w=m[y].startLineNumber,D=m[y].endLineNumber,T=y+1<m.length?D+1:this.modelLineProjections.length+2);let O=!1;if(M>=w&&M<=D?this.modelLineProjections[L].isVisible()&&(this.modelLineProjections[L]=this.modelLineProjections[L].setVisible(!1),O=!0):(_=!0,this.modelLineProjections[L].isVisible()||(this.modelLineProjections[L]=this.modelLineProjections[L].setVisible(!0),O=!0)),O){const N=this.modelLineProjections[L].getViewLineCount();this.projectedModelLineLineCounts.setValue(L,N)}}return _||this.setHiddenAreas([]),!0}modelPositionIsVisible(a,o){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,o,g,h){const v=this.fontInfo.equals(a),m=this.wrappingStrategy===o,w=this.wrappingColumn===g,D=this.wrappingIndent===h;if(v&&m&&w&&D)return!1;const y=v&&m&&!w&&D;this.fontInfo=a,this.wrappingStrategy=o,this.wrappingColumn=g,this.wrappingIndent=h;let T=null;if(y){T=[];for(let _=0,L=this.modelLineProjections.length;_<L;_++)T[_]=this.modelLineProjections[_].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,o,g){if(!a||a<=this._validModelVersionId)return null;const h=o===1?1:this.projectedModelLineLineCounts.getPrefixSum(o-1)+1,v=this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections.splice(o-1,g-o+1),this.projectedModelLineLineCounts.removeValues(o-1,g-o+1),new I.ViewLinesDeletedEvent(h,v)}onModelLinesInserted(a,o,g,h){if(!a||a<=this._validModelVersionId)return null;const v=o>2&&!this.modelLineProjections[o-2].isVisible(),m=o===1?1:this.projectedModelLineLineCounts.getPrefixSum(o-1)+1;let w=0;const D=[],y=[];for(let T=0,_=h.length;T<_;T++){const L=(0,b.createModelLineProjection)(h[T],!v);D.push(L);const M=L.getViewLineCount();w+=M,y[T]=M}return this.modelLineProjections=this.modelLineProjections.slice(0,o-1).concat(D).concat(this.modelLineProjections.slice(o-1)),this.projectedModelLineLineCounts.insertValues(o-1,y),new I.ViewLinesInsertedEvent(m,m+w-1)}onModelLineChanged(a,o,g){if(a!==null&&a<=this._validModelVersionId)return[!1,null,null,null];const h=o-1,v=this.modelLineProjections[h].getViewLineCount(),m=this.modelLineProjections[h].isVisible(),w=(0,b.createModelLineProjection)(g,m);this.modelLineProjections[h]=w;const D=this.modelLineProjections[h].getViewLineCount();let y=!1,T=0,_=-1,L=0,M=-1,O=0,N=-1;v>D?(T=this.projectedModelLineLineCounts.getPrefixSum(o-1)+1,_=T+D-1,O=_+1,N=O+(v-D)-1,y=!0):v<D?(T=this.projectedModelLineLineCounts.getPrefixSum(o-1)+1,_=T+v-1,L=_+1,M=L+(D-v)-1,y=!0):(T=this.projectedModelLineLineCounts.getPrefixSum(o-1)+1,_=T+D-1),this.projectedModelLineLineCounts.setValue(h,D);const P=T<=_?new I.ViewLinesChangedEvent(T,_-T+1):null,B=L<=M?new I.ViewLinesInsertedEvent(L,M):null,V=O<=N?new I.ViewLinesDeletedEvent(O,N):null;return[y,P,B,V]}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 o=this.getViewLineCount();return a>o?o:a|0}getActiveIndentGuide(a,o,g){a=this._toValidViewLineNumber(a),o=this._toValidViewLineNumber(o),g=this._toValidViewLineNumber(g);const h=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),v=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),m=this.convertViewPositionToModelPosition(g,this.getViewLineMinColumn(g)),w=this.model.guides.getActiveIndentGuide(h.lineNumber,v.lineNumber,m.lineNumber),D=this.convertModelPositionToViewPosition(w.startLineNumber,1),y=this.convertModelPositionToViewPosition(w.endLineNumber,this.model.getLineMaxColumn(w.endLineNumber));return{startLineNumber:D.lineNumber,endLineNumber:y.lineNumber,indent:w.indent}}getViewLineInfo(a){a=this._toValidViewLineNumber(a);const o=this.projectedModelLineLineCounts.getIndexOf(a-1),g=o.index,h=o.remainder;return new i(g+1,h)}getMinColumnOfViewLine(a){return this.modelLineProjections[a.modelLineNumber-1].getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(a){return this.modelLineProjections[a.modelLineNumber-1].getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(a){const o=this.modelLineProjections[a.modelLineNumber-1],g=o.getViewLineMinColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),h=o.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,g);return new p.Position(a.modelLineNumber,h)}getModelEndPositionOfViewLine(a){const o=this.modelLineProjections[a.modelLineNumber-1],g=o.getViewLineMaxColumn(this.model,a.modelLineNumber,a.modelLineWrappedLineIdx),h=o.getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,g);return new p.Position(a.modelLineNumber,h)}getViewLineInfosGroupedByModelRanges(a,o){const g=this.getViewLineInfo(a),h=this.getViewLineInfo(o),v=new Array;let m=this.getModelStartPositionOfViewLine(g),w=new Array;for(let D=g.modelLineNumber;D<=h.modelLineNumber;D++){const y=this.modelLineProjections[D-1];if(y.isVisible()){const T=D===g.modelLineNumber?g.modelLineWrappedLineIdx:0,_=D===h.modelLineNumber?h.modelLineWrappedLineIdx+1:y.getViewLineCount();for(let L=T;L<_;L++)w.push(new i(D,L))}if(!y.isVisible()&&m){const T=new p.Position(D-1,this.model.getLineMaxColumn(D-1)+1),_=R.Range.fromPositions(m,T);v.push(new f(_,w)),w=[],m=null}else y.isVisible()&&!m&&(m=new p.Position(D,1))}if(m){const D=R.Range.fromPositions(m,this.getModelEndPositionOfViewLine(h));v.push(new f(D,w))}return v}getViewLinesBracketGuides(a,o,g,h){const v=g?this.convertViewPositionToModelPosition(g.lineNumber,g.column):null,m=[];for(const w of this.getViewLineInfosGroupedByModelRanges(a,o)){const D=w.modelRange.startLineNumber,y=this.model.guides.getLinesBracketGuides(D,w.modelRange.endLineNumber,v,h);for(const T of w.viewLines){const L=y[T.modelLineNumber-D].map(M=>{if(M.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[T.modelLineNumber-1].getViewPositionOfModelPosition(0,M.forWrappedLinesAfterColumn).lineNumber>=T.modelLineWrappedLineIdx||M.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[T.modelLineNumber-1].getViewPositionOfModelPosition(0,M.forWrappedLinesBeforeOrAtColumn).lineNumber<T.modelLineWrappedLineIdx)return;if(!M.horizontalLine)return M;let O=-1;if(M.column!==-1){const B=this.modelLineProjections[T.modelLineNumber-1].getViewPositionOfModelPosition(0,M.column);if(B.lineNumber===T.modelLineWrappedLineIdx)O=B.column;else if(B.lineNumber<T.modelLineWrappedLineIdx)O=this.getMinColumnOfViewLine(T);else if(B.lineNumber>T.modelLineWrappedLineIdx)return}const N=this.convertModelPositionToViewPosition(T.modelLineNumber,M.horizontalLine.endColumn),P=this.modelLineProjections[T.modelLineNumber-1].getViewPositionOfModelPosition(0,M.horizontalLine.endColumn);return P.lineNumber===T.modelLineWrappedLineIdx?new A.IndentGuide(M.visibleColumn,O,M.className,new A.IndentGuideHorizontalLine(M.horizontalLine.top,N.column),-1,-1):P.lineNumber<T.modelLineWrappedLineIdx||M.visibleColumn!==-1?void 0:new A.IndentGuide(M.visibleColumn,O,M.className,new A.IndentGuideHorizontalLine(M.horizontalLine.top,this.getMaxColumnOfViewLine(T)),-1,-1)});m.push(L.filter(M=>!!M))}}return m}getViewLinesIndentGuides(a,o){a=this._toValidViewLineNumber(a),o=this._toValidViewLineNumber(o);const g=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),h=this.convertViewPositionToModelPosition(o,this.getViewLineMaxColumn(o));let v=[];const m=[],w=[],D=g.lineNumber-1,y=h.lineNumber-1;let T=null;for(let O=D;O<=y;O++){const N=this.modelLineProjections[O];if(N.isVisible()){const P=N.getViewLineNumberOfModelPosition(0,O===D?g.column:1),B=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(O+1)),V=B-P+1;let z=0;V>1&&N.getViewLineMinColumn(this.model,O+1,B)===1&&(z=P===0?1:2),m.push(V),w.push(z),T===null&&(T=new p.Position(O+1,0))}else T!==null&&(v=v.concat(this.model.guides.getLinesIndentGuides(T.lineNumber,O)),T=null)}T!==null&&(v=v.concat(this.model.guides.getLinesIndentGuides(T.lineNumber,h.lineNumber)),T=null);const _=o-a+1,L=new Array(_);let M=0;for(let O=0,N=v.length;O<N;O++){let P=v[O];const B=Math.min(_-M,m[O]),V=w[O];let z;V===2?z=0:V===1?z=1:z=B;for(let x=0;x<B;x++)x===z&&(P=0),L[M++]=P}return L}getViewLineContent(a){const o=this.getViewLineInfo(a);return this.modelLineProjections[o.modelLineNumber-1].getViewLineContent(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getViewLineLength(a){const o=this.getViewLineInfo(a);return this.modelLineProjections[o.modelLineNumber-1].getViewLineLength(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getViewLineMinColumn(a){const o=this.getViewLineInfo(a);return this.modelLineProjections[o.modelLineNumber-1].getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getViewLineMaxColumn(a){const o=this.getViewLineInfo(a);return this.modelLineProjections[o.modelLineNumber-1].getViewLineMaxColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getViewLineData(a){const o=this.getViewLineInfo(a);return this.modelLineProjections[o.modelLineNumber-1].getViewLineData(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getViewLinesData(a,o,g){a=this._toValidViewLineNumber(a),o=this._toValidViewLineNumber(o);const h=this.projectedModelLineLineCounts.getIndexOf(a-1);let v=a;const m=h.index,w=h.remainder,D=[];for(let y=m,T=this.model.getLineCount();y<T;y++){const _=this.modelLineProjections[y];if(!_.isVisible())continue;const L=y===m?w:0;let M=_.getViewLineCount()-L,O=!1;if(v+M>o&&(O=!0,M=o-v+1),_.getViewLinesData(this.model,y+1,L,M,v-a,g,D),v+=M,O)break}return D}validateViewPosition(a,o,g){a=this._toValidViewLineNumber(a);const h=this.projectedModelLineLineCounts.getIndexOf(a-1),v=h.index,m=h.remainder,w=this.modelLineProjections[v],D=w.getViewLineMinColumn(this.model,v+1,m),y=w.getViewLineMaxColumn(this.model,v+1,m);o<D&&(o=D),o>y&&(o=y);const T=w.getModelColumnOfViewPosition(m,o);return this.model.validatePosition(new p.Position(v+1,T)).equals(g)?new p.Position(a,o):this.convertModelPositionToViewPosition(g.lineNumber,g.column)}validateViewRange(a,o){const g=this.validateViewPosition(a.startLineNumber,a.startColumn,o.getStartPosition()),h=this.validateViewPosition(a.endLineNumber,a.endColumn,o.getEndPosition());return new R.Range(g.lineNumber,g.column,h.lineNumber,h.column)}convertViewPositionToModelPosition(a,o){const g=this.getViewLineInfo(a),h=this.modelLineProjections[g.modelLineNumber-1].getModelColumnOfViewPosition(g.modelLineWrappedLineIdx,o);return this.model.validatePosition(new p.Position(g.modelLineNumber,h))}convertViewRangeToModelRange(a){const o=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),g=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);return new R.Range(o.lineNumber,o.column,g.lineNumber,g.column)}convertModelPositionToViewPosition(a,o,g=2){const h=this.model.validatePosition(new p.Position(a,o)),v=h.lineNumber,m=h.column;let w=v-1,D=!1;for(;w>0&&!this.modelLineProjections[w].isVisible();)w--,D=!0;if(w===0&&!this.modelLineProjections[w].isVisible())return new p.Position(1,1);const y=1+this.projectedModelLineLineCounts.getPrefixSum(w);let T;return D?T=this.modelLineProjections[w].getViewPositionOfModelPosition(y,this.model.getLineMaxColumn(w+1),g):T=this.modelLineProjections[v-1].getViewPositionOfModelPosition(y,m,g),T}convertModelRangeToViewRange(a,o=0){if(a.isEmpty()){const g=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,o);return R.Range.fromPositions(g)}else{const g=this.convertModelPositionToViewPosition(a.startLineNumber,a.startColumn,1),h=this.convertModelPositionToViewPosition(a.endLineNumber,a.endColumn,0);return new R.Range(g.lineNumber,g.column,h.lineNumber,h.column)}}getViewLineNumberOfModelPosition(a,o){let g=a-1;if(this.modelLineProjections[g].isVisible()){const v=1+this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections[g].getViewLineNumberOfModelPosition(v,o)}for(;g>0&&!this.modelLineProjections[g].isVisible();)g--;if(g===0&&!this.modelLineProjections[g].isVisible())return 1;const h=1+this.projectedModelLineLineCounts.getPrefixSum(g);return this.modelLineProjections[g].getViewLineNumberOfModelPosition(h,this.model.getLineMaxColumn(g+1))}getDecorationsInRange(a,o,g,h){const v=this.convertViewPositionToModelPosition(a.startLineNumber,a.startColumn),m=this.convertViewPositionToModelPosition(a.endLineNumber,a.endColumn);if(m.lineNumber-v.lineNumber<=a.endLineNumber-a.startLineNumber)return this.model.getDecorationsInRange(new R.Range(v.lineNumber,1,m.lineNumber,m.column),o,g,h);let w=[];const D=v.lineNumber-1,y=m.lineNumber-1;let T=null;for(let O=D;O<=y;O++)if(this.modelLineProjections[O].isVisible())T===null&&(T=new p.Position(O+1,O===D?v.column:1));else if(T!==null){const P=this.model.getLineMaxColumn(O);w=w.concat(this.model.getDecorationsInRange(new R.Range(T.lineNumber,T.column,O,P),o,g,h)),T=null}T!==null&&(w=w.concat(this.model.getDecorationsInRange(new R.Range(T.lineNumber,T.column,m.lineNumber,m.column),o,g,h)),T=null),w.sort((O,N)=>{const P=R.Range.compareRangesUsingStarts(O.range,N.range);return P===0?O.id<N.id?-1:O.id>N.id?1:0:P});const _=[];let L=0,M=null;for(const O of w){const N=O.id;M!==N&&(M=N,_[L++]=O)}return _}getInjectedTextAt(a){const o=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[o.modelLineNumber-1].getInjectedTextAt(o.modelLineWrappedLineIdx,a.column)}normalizePosition(a,o){const g=this.getViewLineInfo(a.lineNumber);return this.modelLineProjections[g.modelLineNumber-1].normalizePosition(g.modelLineWrappedLineIdx,a,o)}getLineIndentColumn(a){const o=this.getViewLineInfo(a);return o.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(o.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=r;function u(n){if(n.length===0)return[];const a=n.slice();a.sort(R.Range.compareRangesUsingStarts);const o=[];let g=a[0].startLineNumber,h=a[0].endLineNumber;for(let v=1,m=a.length;v<m;v++){const w=a[v];w.startLineNumber>h+1?(o.push(new R.Range(g,1,h,1)),g=w.startLineNumber,h=w.endLineNumber):w.endLineNumber>h&&(h=w.endLineNumber)}return o.push(new R.Range(g,1,h,1)),o}class i{get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}constructor(a,o){this.modelLineNumber=a,this.modelLineWrappedLineIdx=o}}class f{constructor(a,o){this.modelRange=a,this.viewLines=o}}class c{constructor(a){this._lines=a}convertViewPositionToModelPosition(a){return this._lines.convertViewPositionToModelPosition(a.lineNumber,a.column)}convertViewRangeToModelRange(a){return this._lines.convertViewRangeToModelRange(a)}validateViewPosition(a,o){return this._lines.validateViewPosition(a.lineNumber,a.column,o)}validateViewRange(a,o){return this._lines.validateViewRange(a,o)}convertModelPositionToViewPosition(a,o){return this._lines.convertModelPositionToViewPosition(a.lineNumber,a.column,o)}convertModelRangeToViewRange(a,o){return this._lines.convertModelRangeToViewRange(a,o)}modelPositionIsVisible(a){return this._lines.modelPositionIsVisible(a.lineNumber,a.column)}getModelLineViewLineCount(a){return this._lines.getModelLineViewLineCount(a)}getViewLineNumberOfModelPosition(a,o){return this._lines.getViewLineNumberOfModelPosition(a,o)}}var l;(function(n){n[n.BlockNone=0]="BlockNone",n[n.BlockSubsequent=1]="BlockSubsequent",n[n.BlockAll=2]="BlockAll"})(l||(l={}));class s{constructor(a){this.model=a}dispose(){}createCoordinatesConverter(){return new d(this)}getHiddenAreas(){return[]}setHiddenAreas(a){return!1}setTabSize(a){return!1}setWrappingSettings(a,o,g,h){return!1}createLineBreaksComputer(){const a=[];return{addRequest:(o,g,h)=>{a.push(null)},finalize:()=>a}}onModelFlushed(){}onModelLinesDeleted(a,o,g){return new I.ViewLinesDeletedEvent(o,g)}onModelLinesInserted(a,o,g,h){return new I.ViewLinesInsertedEvent(o,g)}onModelLineChanged(a,o,g){return[!1,new I.ViewLinesChangedEvent(o,1),null,null]}acceptVersionId(a){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(a,o,g){return{startLineNumber:a,endLineNumber:a,indent:0}}getViewLinesBracketGuides(a,o,g){return new Array(o-a+1).fill([])}getViewLinesIndentGuides(a,o){const g=o-a+1,h=new Array(g);for(let v=0;v<g;v++)h[v]=0;return h}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 o=this.model.tokenization.getLineTokens(a),g=o.getLineContent();return new C.ViewLineData(g,!1,1,g.length+1,0,o.inflate(),null)}getViewLinesData(a,o,g){const h=this.model.getLineCount();a=Math.min(Math.max(1,a),h),o=Math.min(Math.max(1,o),h);const v=[];for(let m=a;m<=o;m++){const w=m-a;v[w]=g[w]?this.getViewLineData(m):null}return v}getDecorationsInRange(a,o,g,h){return this.model.getDecorationsInRange(a,o,g,h)}normalizePosition(a,o){return this.model.normalizePosition(a,o)}getLineIndentColumn(a){return this.model.getLineIndentColumn(a)}getInjectedTextAt(a){return null}}e.ViewModelLinesFromModelAsIs=s;class d{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,o){return this._validPosition(o)}validateViewRange(a,o){return this._validRange(o)}convertModelPositionToViewPosition(a){return this._validPosition(a)}convertModelRangeToViewRange(a){return this._validRange(a)}modelPositionIsVisible(a){const o=this._lines.model.getLineCount();return!(a.lineNumber<1||a.lineNumber>o)}getModelLineViewLineCount(a){return 1}getViewLineNumberOfModelPosition(a,o){return a}}}),define(ae[2205],le([1,0,16,11,65,2,14,28,134,802,240,50,20,326,92,125,329,570,1299,778,281,782,594,2204]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const h=!0;class v extends A.Disposable{constructor(M,O,N,P,B,V,z,x){if(super(),this.languageConfigurationService=z,this._themeService=x,this.hiddenAreasModel=new D,this.previousHiddenAreas=[],this._editorId=M,this._configuration=O,this.model=N,this._eventDispatcher=new o.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new p.RunOnceScheduler(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new p.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=m.create(this.model),h&&this.model.isTooLargeForTokenization())this._lines=new g.ViewModelLinesFromModelAsIs(this.model);else{const H=this._configuration.options,W=H.get(45),U=H.get(127),$=H.get(134),q=H.get(126);this._lines=new g.ViewModelLinesFromProjectedModel(this._editorId,this.model,P,B,W,this.model.getOptions().tabSize,U,$.wrappingColumn,q)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new b.CursorsController(N,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new s.ViewLayout(this._configuration,this.getLineCount(),V)),this._register(this.viewLayout.onDidScroll(H=>{H.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),H.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new l.ViewScrollChangedEvent(H)),this._eventDispatcher.emitOutgoingEvent(new o.ScrollChangedEvent(H.oldScrollWidth,H.oldScrollLeft,H.oldScrollHeight,H.oldScrollTop,H.scrollWidth,H.scrollLeft,H.scrollHeight,H.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(H=>{this._eventDispatcher.emitOutgoingEvent(H)})),this._decorations=new a.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(H=>{try{const W=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(W,H)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(d.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new l.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(H=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new l.ViewThemeChangedEvent(H))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(M){this._eventDispatcher.addViewEventHandler(M)}removeViewEventHandler(M){this._eventDispatcher.removeViewEventHandler(M)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const M=this.viewLayout.getLinesViewportData(),O=new r.Range(M.startLineNumber,this.getLineMinColumn(M.startLineNumber),M.endLineNumber,this.getLineMaxColumn(M.endLineNumber)),N=this._toModelVisibleRanges(O);for(const P of N)this.model.tokenization.tokenizeViewport(P.startLineNumber,P.endLineNumber)}setHasFocus(M){this._hasFocus=M,this._cursor.setHasFocus(M),this._eventDispatcher.emitSingleViewEvent(new l.ViewFocusChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new o.FocusChangedEvent(!M,M))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new l.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new l.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const M=new C.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),O=this.coordinatesConverter.convertViewPositionToModelPosition(M);return new _(O,this._viewportStart.startLineDelta)}return new _(null,0)}_onConfigurationChanged(M,O){const N=this._captureStableViewport(),P=this._configuration.options,B=P.get(45),V=P.get(127),z=P.get(134),x=P.get(126);this._lines.setWrappingSettings(B,V,z.wrappingColumn,x)&&(M.emitViewEvent(new l.ViewFlushedEvent),M.emitViewEvent(new l.ViewLineMappingChangedEvent),M.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(M),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),O.hasChanged(82)&&(this._decorations.reset(),M.emitViewEvent(new l.ViewDecorationsChangedEvent(null))),M.emitViewEvent(new l.ViewConfigurationChangedEvent(O)),this.viewLayout.onConfigurationChanged(O),N.recoverViewportStart(this.coordinatesConverter,this.viewLayout),S.CursorConfiguration.shouldRecreate(O)&&(this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(M=>{try{const N=this._eventDispatcher.beginEmitViewEvents();let P=!1,B=!1;const V=M instanceof u.InternalModelContentChangeEvent?M.rawContentChangedEvent.changes:M.changes,z=M instanceof u.InternalModelContentChangeEvent?M.rawContentChangedEvent.versionId:null,x=this._lines.createLineBreaksComputer();for(const U of V)switch(U.changeType){case 4:{for(let $=0;$<U.detail.length;$++){const q=U.detail[$];let X=U.injectedTexts[$];X&&(X=X.filter(G=>!G.ownerId||G.ownerId===this._editorId)),x.addRequest(q,X,null)}break}case 2:{let $=null;U.injectedText&&($=U.injectedText.filter(q=>!q.ownerId||q.ownerId===this._editorId)),x.addRequest(U.detail,$,null);break}}const H=x.finalize(),W=new t.ArrayQueue(H);for(const U of V)switch(U.changeType){case 1:{this._lines.onModelFlushed(),N.emitViewEvent(new l.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),P=!0;break}case 3:{const $=this._lines.onModelLinesDeleted(z,U.fromLineNumber,U.toLineNumber);$!==null&&(N.emitViewEvent($),this.viewLayout.onLinesDeleted($.fromLineNumber,$.toLineNumber)),P=!0;break}case 4:{const $=W.takeCount(U.detail.length),q=this._lines.onModelLinesInserted(z,U.fromLineNumber,U.toLineNumber,$);q!==null&&(N.emitViewEvent(q),this.viewLayout.onLinesInserted(q.fromLineNumber,q.toLineNumber)),P=!0;break}case 2:{const $=W.dequeue(),[q,X,G,Q]=this._lines.onModelLineChanged(z,U.lineNumber,$);B=q,X&&N.emitViewEvent(X),G&&(N.emitViewEvent(G),this.viewLayout.onLinesInserted(G.fromLineNumber,G.toLineNumber)),Q&&(N.emitViewEvent(Q),this.viewLayout.onLinesDeleted(Q.fromLineNumber,Q.toLineNumber));break}case 5:break}z!==null&&this._lines.acceptVersionId(z),this.viewLayout.onHeightMaybeChanged(),!P&&B&&(N.emitViewEvent(new l.ViewLineMappingChangedEvent),N.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const O=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&O){const N=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(N){const P=this.coordinatesConverter.convertModelPositionToViewPosition(N.getStartPosition()),B=this.viewLayout.getVerticalOffsetForLineNumber(P.lineNumber);this.viewLayout.setScrollPosition({scrollTop:B+this._viewportStart.startLineDelta},1)}}try{const N=this._eventDispatcher.beginEmitViewEvents();M instanceof u.InternalModelContentChangeEvent&&N.emitOutgoingEvent(new o.ModelContentChangedEvent(M.contentChangedEvent)),this._cursor.onModelContentChanged(N,M)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeTokens(M=>{const O=[];for(let N=0,P=M.ranges.length;N<P;N++){const B=M.ranges[N],V=this.coordinatesConverter.convertModelPositionToViewPosition(new C.Position(B.fromLineNumber,1)).lineNumber,z=this.coordinatesConverter.convertModelPositionToViewPosition(new C.Position(B.toLineNumber,this.model.getLineMaxColumn(B.toLineNumber))).lineNumber;O[N]={fromLineNumber:V,toLineNumber:z}}this._eventDispatcher.emitSingleViewEvent(new l.ViewTokensChangedEvent(O)),M.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitOutgoingEvent(new o.ModelTokensChangedEvent(M))})),this._register(this.model.onDidChangeLanguageConfiguration(M=>{this._eventDispatcher.emitSingleViewEvent(new l.ViewLanguageConfigurationEvent),this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new o.ModelLanguageConfigurationChangedEvent(M))})),this._register(this.model.onDidChangeLanguage(M=>{this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new o.ModelLanguageChangedEvent(M))})),this._register(this.model.onDidChangeOptions(M=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const O=this._eventDispatcher.beginEmitViewEvents();O.emitViewEvent(new l.ViewFlushedEvent),O.emitViewEvent(new l.ViewLineMappingChangedEvent),O.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(O),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new S.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new o.ModelOptionsChangedEvent(M))})),this._register(this.model.onDidChangeDecorations(M=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new l.ViewDecorationsChangedEvent(M)),this._eventDispatcher.emitOutgoingEvent(new o.ModelDecorationsChangedEvent(M))}))}setHiddenAreas(M,O){this.hiddenAreasModel.setHiddenAreas(O,M);const N=this.hiddenAreasModel.getMergedRanges();if(N===this.previousHiddenAreas)return;this.previousHiddenAreas=N;const P=this._captureStableViewport();let B=!1;try{const V=this._eventDispatcher.beginEmitViewEvents();B=this._lines.setHiddenAreas(N),B&&(V.emitViewEvent(new l.ViewFlushedEvent),V.emitViewEvent(new l.ViewLineMappingChangedEvent),V.emitViewEvent(new l.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(V),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),P.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),B&&this._eventDispatcher.emitOutgoingEvent(new o.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const M=this._configuration.options.get(133),O=this._configuration.options.get(60),N=Math.max(20,Math.round(M.height/O)),P=this.viewLayout.getLinesViewportData(),B=Math.max(1,P.completelyVisibleStartLineNumber-N),V=Math.min(this.getLineCount(),P.completelyVisibleEndLineNumber+N);return this._toModelVisibleRanges(new r.Range(B,this.getLineMinColumn(B),V,this.getLineMaxColumn(V)))}getVisibleRanges(){const M=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(M)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(M){const O=this.coordinatesConverter.convertViewRangeToModelRange(M),N=this._lines.getHiddenAreas();if(N.length===0)return[O];const P=[];let B=0,V=O.startLineNumber,z=O.startColumn;const x=O.endLineNumber,H=O.endColumn;for(let W=0,U=N.length;W<U;W++){const $=N[W].startLineNumber,q=N[W].endLineNumber;q<V||$>x||(V<$&&(P[B++]=new r.Range(V,z,$-1,this.model.getLineMaxColumn($-1))),V=q+1,z=1)}return(V<x||V===x&&z<H)&&(P[B++]=new r.Range(V,z,x,H)),P}getCompletelyVisibleViewRange(){const M=this.viewLayout.getLinesViewportData(),O=M.completelyVisibleStartLineNumber,N=M.completelyVisibleEndLineNumber;return new r.Range(O,this.getLineMinColumn(O),N,this.getLineMaxColumn(N))}getCompletelyVisibleViewRangeAtScrollTop(M){const O=this.viewLayout.getLinesViewportDataAtScrollTop(M),N=O.completelyVisibleStartLineNumber,P=O.completelyVisibleEndLineNumber;return new r.Range(N,this.getLineMinColumn(N),P,this.getLineMaxColumn(P))}saveState(){const M=this.viewLayout.saveState(),O=M.scrollTop,N=this.viewLayout.getLineNumberAtVerticalOffset(O),P=this.coordinatesConverter.convertViewPositionToModelPosition(new C.Position(N,this.getLineMinColumn(N))),B=this.viewLayout.getVerticalOffsetForLineNumber(N)-O;return{scrollLeft:M.scrollLeft,firstPosition:P,firstPositionDeltaTop:B}}reduceRestoreState(M){if(typeof M.firstPosition>"u")return this._reduceRestoreStateCompatibility(M);const O=this.model.validatePosition(M.firstPosition),N=this.coordinatesConverter.convertModelPositionToViewPosition(O),P=this.viewLayout.getVerticalOffsetForLineNumber(N.lineNumber)-M.firstPositionDeltaTop;return{scrollLeft:M.scrollLeft,scrollTop:P}}_reduceRestoreStateCompatibility(M){return{scrollLeft:M.scrollLeft,scrollTop:M.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(M,O,N){this._viewportStart.update(this,M)}getActiveIndentGuide(M,O,N){return this._lines.getActiveIndentGuide(M,O,N)}getLinesIndentGuides(M,O){return this._lines.getViewLinesIndentGuides(M,O)}getBracketGuidesInRangeByLine(M,O,N,P){return this._lines.getViewLinesBracketGuides(M,O,N,P)}getLineContent(M){return this._lines.getViewLineContent(M)}getLineLength(M){return this._lines.getViewLineLength(M)}getLineMinColumn(M){return this._lines.getViewLineMinColumn(M)}getLineMaxColumn(M){return this._lines.getViewLineMaxColumn(M)}getLineFirstNonWhitespaceColumn(M){const O=E.firstNonWhitespaceIndex(this.getLineContent(M));return O===-1?0:O+1}getLineLastNonWhitespaceColumn(M){const O=E.lastNonWhitespaceIndex(this.getLineContent(M));return O===-1?0:O+2}getDecorationsInViewport(M,O=!1){return this._decorations.getDecorationsViewportData(M,O).decorations}getInjectedTextAt(M){return this._lines.getInjectedTextAt(M)}getViewportViewLineRenderingData(M,O){const P=this._decorations.getDecorationsViewportData(M).inlineDecorations[O-M.startLineNumber];return this._getViewLineRenderingData(O,P)}getViewLineRenderingData(M){const O=this._decorations.getInlineDecorationsOnLine(M);return this._getViewLineRenderingData(M,O)}_getViewLineRenderingData(M,O){const N=this.model.mightContainRTL(),P=this.model.mightContainNonBasicASCII(),B=this.getTabSize(),V=this._lines.getViewLineData(M);return V.inlineDecorations&&(O=[...O,...V.inlineDecorations.map(z=>z.toInlineDecoration(M))]),new n.ViewLineRenderingData(V.minColumn,V.maxColumn,V.content,V.continuesWithWrappedLine,N,P,V.tokens,O,B,V.startVisibleColumn)}getViewLineData(M){return this._lines.getViewLineData(M)}getMinimapLinesRenderingData(M,O,N){const P=this._lines.getViewLinesData(M,O,N);return new n.MinimapLinesRenderingData(this.getTabSize(),P)}getAllOverviewRulerDecorations(M){const O=this.model.getOverviewRulerDecorations(this._editorId,(0,I.filterValidationDecorations)(this._configuration.options)),N=new w;for(const P of O){const B=P.options,V=B.overviewRuler;if(!V)continue;const z=V.position;if(z===0)continue;const x=V.getColor(M.value),H=this.coordinatesConverter.getViewLineNumberOfModelPosition(P.range.startLineNumber,P.range.startColumn),W=this.coordinatesConverter.getViewLineNumberOfModelPosition(P.range.endLineNumber,P.range.endColumn);N.accept(x,B.zIndex,H,W,z)}return N.asArray}_invalidateDecorationsColorCache(){const M=this.model.getOverviewRulerDecorations();for(const O of M)O.options.overviewRuler?.invalidateCachedColor(),O.options.minimap?.invalidateCachedColor()}getValueInRange(M,O){const N=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueInRange(N,O)}getValueLengthInRange(M,O){const N=this.coordinatesConverter.convertViewRangeToModelRange(M);return this.model.getValueLengthInRange(N,O)}modifyPosition(M,O){const N=this.coordinatesConverter.convertViewPositionToModelPosition(M);return this.model.modifyPosition(N,O)}deduceModelPositionRelativeToViewPosition(M,O,N){const P=this.coordinatesConverter.convertViewPositionToModelPosition(M);this.model.getEOL().length===2&&(O<0?O-=N:O+=N);const V=this.model.getOffsetAt(P)+O;return this.model.getPositionAt(V)}getPlainTextToCopy(M,O,N){const P=N?`\r `:this.model.getEOL();M=M.slice(0),M.sort(r.Range.compareRangesUsingStarts);let B=!1,V=!1;for(const x of M)x.isEmpty()?B=!0:V=!0;if(!V){if(!O)return"";const x=M.map(W=>W.startLineNumber);let H="";for(let W=0;W<x.length;W++)W>0&&x[W-1]===x[W]||(H+=this.model.getLineContent(x[W])+P);return H}if(B&&O){const x=[];let H=0;for(const W of M){const U=W.startLineNumber;W.isEmpty()?U!==H&&x.push(this.model.getLineContent(U)):x.push(this.model.getValueInRange(W,N?2:0)),H=U}return x.length===1?x[0]:x}const z=[];for(const x of M)x.isEmpty()||z.push(this.model.getValueInRange(x,N?2:0));return z.length===1?z[0]:z}getRichTextToCopy(M,O){const N=this.model.getLanguageId();if(N===f.PLAINTEXT_LANGUAGE_ID||M.length!==1)return null;let P=M[0];if(P.isEmpty()){if(!O)return null;const W=P.startLineNumber;P=new r.Range(W,this.model.getLineMinColumn(W),W,this.model.getLineMaxColumn(W))}const B=this._configuration.options.get(45),V=this._getColorMap(),x=/[:;\\\/<>]/.test(B.fontFamily)||B.fontFamily===I.EDITOR_FONT_DEFAULTS.fontFamily;let H;return x?H=I.EDITOR_FONT_DEFAULTS.fontFamily:(H=B.fontFamily,H=H.replace(/"/g,"'"),/[,']/.test(H)||/[+ ]/.test(H)&&(H=`'${H}'`),H=`${H}, ${I.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:N,html:`<div style="color: ${V[1]};background-color: ${V[2]};font-family: ${H};font-weight: ${B.fontWeight};font-size: ${B.fontSize}px;line-height: ${B.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(P,V)+"</div>"}}_getHTMLToCopy(M,O){const N=M.startLineNumber,P=M.startColumn,B=M.endLineNumber,V=M.endColumn,z=this.getTabSize();let x="";for(let H=N;H<=B;H++){const W=this.model.tokenization.getLineTokens(H),U=W.getLineContent(),$=H===N?P-1:0,q=H===B?V-1:U.length;U===""?x+="<br>":x+=(0,c.tokenizeLineToHTML)(U,W.inflate(),O,$,q,z,k.isWindows)}return x}_getColorMap(){const M=i.TokenizationRegistry.getColorMap(),O=["#000000"];if(M)for(let N=1,P=M.length;N<P;N++)O[N]=R.Color.Format.CSS.formatHex(M[N]);return O}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(M,O,N){return this._withViewEventsCollector(P=>this._cursor.setStates(P,M,O,N))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(M){this._cursor.setCursorColumnSelectData(M)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(M){this._cursor.setPrevEditOperationType(M)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(M,O,N=0){this._withViewEventsCollector(P=>this._cursor.setSelections(P,M,O,N))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(M){this._withViewEventsCollector(O=>this._cursor.restoreState(O,M))}_executeCursorEdit(M){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new o.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(M)}executeEdits(M,O,N){this._executeCursorEdit(P=>this._cursor.executeEdits(P,M,O,N))}startComposition(){this._executeCursorEdit(M=>this._cursor.startComposition(M))}endComposition(M){this._executeCursorEdit(O=>this._cursor.endComposition(O,M))}type(M,O){this._executeCursorEdit(N=>this._cursor.type(N,M,O))}compositionType(M,O,N,P,B){this._executeCursorEdit(V=>this._cursor.compositionType(V,M,O,N,P,B))}paste(M,O,N,P){this._executeCursorEdit(B=>this._cursor.paste(B,M,O,N,P))}cut(M){this._executeCursorEdit(O=>this._cursor.cut(O,M))}executeCommand(M,O){this._executeCursorEdit(N=>this._cursor.executeCommand(N,M,O))}executeCommands(M,O){this._executeCursorEdit(N=>this._cursor.executeCommands(N,M,O))}revealPrimaryCursor(M,O,N=!1){this._withViewEventsCollector(P=>this._cursor.revealPrimary(P,M,N,0,O,0))}revealTopMostCursor(M){const O=this._cursor.getTopMostViewPosition(),N=new r.Range(O.lineNumber,O.column,O.lineNumber,O.column);this._withViewEventsCollector(P=>P.emitViewEvent(new l.ViewRevealRangeRequestEvent(M,!1,N,null,0,!0,0)))}revealBottomMostCursor(M){const O=this._cursor.getBottomMostViewPosition(),N=new r.Range(O.lineNumber,O.column,O.lineNumber,O.column);this._withViewEventsCollector(P=>P.emitViewEvent(new l.ViewRevealRangeRequestEvent(M,!1,N,null,0,!0,0)))}revealRange(M,O,N,P,B){this._withViewEventsCollector(V=>V.emitViewEvent(new l.ViewRevealRangeRequestEvent(M,!1,N,null,P,O,B)))}changeWhitespace(M){this.viewLayout.changeWhitespace(M)&&(this._eventDispatcher.emitSingleViewEvent(new l.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new o.ViewZonesChangedEvent))}_withViewEventsCollector(M){try{const O=this._eventDispatcher.beginEmitViewEvents();return M(O)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(M,O){return this._lines.normalizePosition(M,O)}getLineIndentColumn(M){return this._lines.getLineIndentColumn(M)}}e.ViewModel=v;class m{static create(M){const O=M._setTrackedRange(null,new r.Range(1,1,1,1),1);return new m(M,1,!1,O,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(M,O,N,P,B){this._model=M,this._viewLineNumber=O,this._isValid=N,this._modelTrackedRange=P,this._startLineDelta=B}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(M,O){const N=M.coordinatesConverter.convertViewPositionToModelPosition(new C.Position(O,M.getLineMinColumn(O))),P=M.model._setTrackedRange(this._modelTrackedRange,new r.Range(N.lineNumber,N.column,N.lineNumber,N.column),1),B=M.viewLayout.getVerticalOffsetForLineNumber(O),V=M.viewLayout.getCurrentScrollTop();this._viewLineNumber=O,this._isValid=!0,this._modelTrackedRange=P,this._startLineDelta=V-B}invalidate(){this._isValid=!1}}class w{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(M,O,N,P,B){const V=this._asMap[M];if(V){const z=V.data,x=z[z.length-3],H=z[z.length-1];if(x===B&&H+1>=N){P>H&&(z[z.length-1]=P);return}z.push(B,N,P)}else{const z=new n.OverviewRulerDecorationsGroup(M,O,[B,N,P]);this._asMap[M]=z,this.asArray.push(z)}}}class D{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(M,O){const N=this.hiddenAreas.get(M);N&&T(N,O)||(this.hiddenAreas.set(M,O),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const M=Array.from(this.hiddenAreas.values()).reduce((O,N)=>y(O,N),[]);return T(this.ranges,M)?this.ranges:(this.ranges=M,this.ranges)}}function y(L,M){const O=[];let N=0,P=0;for(;N<L.length&&P<M.length;){const B=L[N],V=M[P];if(B.endLineNumber<V.startLineNumber-1)O.push(L[N++]);else if(V.endLineNumber<B.startLineNumber-1)O.push(M[P++]);else{const z=Math.min(B.startLineNumber,V.startLineNumber),x=Math.max(B.endLineNumber,V.endLineNumber);O.push(new r.Range(z,1,x,1)),N++,P++}}for(;N<L.length;)O.push(L[N++]);for(;P<M.length;)O.push(M[P++]);return O}function T(L,M){if(L.length!==M.length)return!1;for(let O=0;O<L.length;O++)if(!L[O].equalsRange(M[O]))return!1;return!0}class _{constructor(M,O){this.viewportStartModelPosition=M,this.startLineDelta=O}recoverViewportStart(M,O){if(!this.viewportStartModelPosition)return;const N=M.convertModelPositionToViewPosition(this.viewportStartModelPosition),P=O.getVerticalOffsetForLineNumber(N.lineNumber);O.setScrollPosition({scrollTop:P+this.startLineDelta},1)}}}),define(ae[173],le([1,0,1312,10,21,6,108,2,22,2089,40,75,2171,725,134,802,251,50,20,85,1202,362,59,94,167,33,2205,31,7,5,151,26,12,111,13,1298,1275,492,122,235,61,2169,1074]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModeContext=e.BooleanEventEmitter=e.CodeEditorWidget=void 0;let H=0;class W{constructor(te,Z,ne,ce,de){this.model=te,this.viewModel=Z,this.view=ne,this.hasRealView=ce,this.listenersToRemove=de}dispose(){(0,E.dispose)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let U=class sn extends E.Disposable{get isSimpleWidget(){return this._configuration.isSimpleWidget}constructor(te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be){super(),this.languageConfigurationService=ve,this._deliveryQueue=new A.EventDeliveryQueue,this._onDidDispose=this._register(new A.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeModelTokens=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModelTokens=this._onDidChangeModelTokens.event,this._onDidChangeConfiguration=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new q({deliveryQueue:this._deliveryQueue})),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onWillType=this._onWillType.event,this._onDidType=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onDropIntoEditor=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDropIntoEditor=this._onDropIntoEditor.event,this._onContextMenu=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new A.Emitter({deliveryQueue:this._deliveryQueue})),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._contributions=new E.DisposableMap,this._actions=new Map,this._bannerDomNode=null,this._dropIntoEditorDecorations=this.createDecorationsCollection();const ge={...Z};this._domElement=te,this._overflowWidgetsDomNode=ge.overflowWidgetsDomNode,delete ge.overflowWidgetsDomNode,this._id=++H,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=ne.telemetryData,this._configuration=this._register(this._createConfiguration(ne.isSimpleWidget||!1,ge,Ie)),this._register(this._configuration.onDidChange(De=>{this._onDidChangeConfiguration.fire(De);const Ae=this._configuration.options;if(De.hasChanged(133)){const Pe=Ae.get(133);this._onDidLayoutChange.fire(Pe)}})),this._contextKeyService=this._register(pe.createScoped(this._domElement)),this._notificationService=Se,this._codeEditorService=de,this._commandService=he,this._themeService=me,this._register(new X(this,this._contextKeyService)),this._register(new G(this,this._contextKeyService,be)),this._instantiationService=ce.createChild(new T.ServiceCollection([D.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new Q(te),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let ue;Array.isArray(ne.contributions)?ue=ne.contributions:ue=S.EditorExtensionsRegistry.getEditorContributions();for(const De of ue){if(this._contributions.has(De.id)){(0,R.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${De.id}`));continue}try{const Ae=this._instantiationService.createInstance(De.ctor,this);this._contributions.set(De.id,Ae)}catch(Ae){(0,R.onUnexpectedError)(Ae)}}for(const De of S.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(De.id)){(0,R.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${De.id}`));continue}const Ae=new n.InternalEditorAction(De.id,De.label,De.alias,(0,O.withNullAsUndefined)(De.precondition),()=>this._instantiationService.invokeFunction(Pe=>Promise.resolve(De.runEditorCommand(Pe,this,null))),this._contextKeyService);this._actions.set(Ae.id,Ae)}const Ce=()=>!this._configuration.options.get(82)&&this._configuration.options.get(32).enabled;this._register(new p.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:De=>{if(!Ce())return;const Ae=this.getTargetAtClientPoint(De.clientX,De.clientY);Ae?.position&&this.showDropIndicatorAt(Ae.position)},onDrop:async De=>{if(!Ce()||(this.removeDropIndicator(),!De.dataTransfer))return;const Ae=this.getTargetAtClientPoint(De.clientX,De.clientY);Ae?.position&&this._onDropIntoEditor.fire({position:Ae.position,event:De})},onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}_createConfiguration(te,Z,ne){return new b.EditorConfiguration(te,Z,this._domElement,ne)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return a.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._contributions.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(te){return this._instantiationService.invokeFunction(te)}updateOptions(te){this._configuration.updateOptions(te||{})}getOptions(){return this._configuration.options}getOption(te){return this._configuration.options.get(te)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(te){return this._modelData?B.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(119),te):null}getValue(te=null){if(!this._modelData)return"";const Z=!!(te&&te.preserveBOM);let ne=0;return te&&te.lineEnding&&te.lineEnding===` `?ne=1:te&&te.lineEnding&&te.lineEnding===`\r `&&(ne=2),this._modelData.model.getValue(ne,Z)}setValue(te){!this._modelData||this._modelData.model.setValue(te)}getModel(){return this._modelData?this._modelData.model:null}setModel(te=null){const Z=te;if(this._modelData===null&&Z===null||this._modelData&&this._modelData.model===Z)return;const ne=this.hasTextFocus(),ce=this._detachModel();this._attachModel(Z),ne&&this.hasModel()&&this.focus();const de={oldModelUrl:ce?ce.uri:null,newModelUrl:Z?Z.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(de),this._postDetachModelCleanup(ce)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const te in this._decorationTypeSubtypes){const Z=this._decorationTypeSubtypes[te];for(const ne in Z)this._removeDecorationType(te+"-"+ne)}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 _getVerticalOffsetAfterPosition(te,Z,ne,ce){const de=te.model.validatePosition({lineNumber:Z,column:ne}),he=te.viewModel.coordinatesConverter.convertModelPositionToViewPosition(de);return te.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(he.lineNumber,ce)}getTopForLineNumber(te,Z=!1){return this._modelData?sn._getVerticalOffsetForPosition(this._modelData,te,1,Z):-1}getTopForPosition(te,Z){return this._modelData?sn._getVerticalOffsetForPosition(this._modelData,te,Z,!1):-1}static _getVerticalOffsetForPosition(te,Z,ne,ce=!1){const de=te.model.validatePosition({lineNumber:Z,column:ne}),he=te.viewModel.coordinatesConverter.convertModelPositionToViewPosition(de);return te.viewModel.viewLayout.getVerticalOffsetForLineNumber(he.lineNumber,ce)}getBottomForLineNumber(te,Z=!1){return this._modelData?sn._getVerticalOffsetAfterPosition(this._modelData,te,1,Z):-1}setHiddenAreas(te,Z){this._modelData?.viewModel.setHiddenAreas(te.map(ne=>s.Range.lift(ne)),Z)}getVisibleColumnFromPosition(te){if(!this._modelData)return te.column;const Z=this._modelData.model.validatePosition(te),ne=this._modelData.model.getOptions().tabSize;return c.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(Z.lineNumber),Z.column,ne)+1}getStatusbarColumn(te){if(!this._modelData)return te.column;const Z=this._modelData.model.validatePosition(te),ne=this._modelData.model.getOptions().tabSize;return c.CursorColumns.toStatusbarColumn(this._modelData.model.getLineContent(Z.lineNumber),Z.column,ne)}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(te,Z="api"){if(!!this._modelData){if(!l.Position.isIPosition(te))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(Z,[{selectionStartLineNumber:te.lineNumber,selectionStartColumn:te.column,positionLineNumber:te.lineNumber,positionColumn:te.column}])}}_sendRevealRange(te,Z,ne,ce){if(!this._modelData)return;if(!s.Range.isIRange(te))throw new Error("Invalid arguments");const de=this._modelData.model.validateRange(te),he=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(de);this._modelData.viewModel.revealRange("api",ne,he,Z,ce)}revealLine(te,Z=0){this._revealLine(te,0,Z)}revealLineInCenter(te,Z=0){this._revealLine(te,1,Z)}revealLineInCenterIfOutsideViewport(te,Z=0){this._revealLine(te,2,Z)}revealLineNearTop(te,Z=0){this._revealLine(te,5,Z)}_revealLine(te,Z,ne){if(typeof te!="number")throw new Error("Invalid arguments");this._sendRevealRange(new s.Range(te,1,te,1),Z,!1,ne)}revealPosition(te,Z=0){this._revealPosition(te,0,!0,Z)}revealPositionInCenter(te,Z=0){this._revealPosition(te,1,!0,Z)}revealPositionInCenterIfOutsideViewport(te,Z=0){this._revealPosition(te,2,!0,Z)}revealPositionNearTop(te,Z=0){this._revealPosition(te,5,!0,Z)}_revealPosition(te,Z,ne,ce){if(!l.Position.isIPosition(te))throw new Error("Invalid arguments");this._sendRevealRange(new s.Range(te.lineNumber,te.column,te.lineNumber,te.column),Z,ne,ce)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(te,Z="api"){const ne=d.Selection.isISelection(te),ce=s.Range.isIRange(te);if(!ne&&!ce)throw new Error("Invalid arguments");if(ne)this._setSelectionImpl(te,Z);else if(ce){const de={selectionStartLineNumber:te.startLineNumber,selectionStartColumn:te.startColumn,positionLineNumber:te.endLineNumber,positionColumn:te.endColumn};this._setSelectionImpl(de,Z)}}_setSelectionImpl(te,Z){if(!this._modelData)return;const ne=new d.Selection(te.selectionStartLineNumber,te.selectionStartColumn,te.positionLineNumber,te.positionColumn);this._modelData.viewModel.setSelections(Z,[ne])}revealLines(te,Z,ne=0){this._revealLines(te,Z,0,ne)}revealLinesInCenter(te,Z,ne=0){this._revealLines(te,Z,1,ne)}revealLinesInCenterIfOutsideViewport(te,Z,ne=0){this._revealLines(te,Z,2,ne)}revealLinesNearTop(te,Z,ne=0){this._revealLines(te,Z,5,ne)}_revealLines(te,Z,ne,ce){if(typeof te!="number"||typeof Z!="number")throw new Error("Invalid arguments");this._sendRevealRange(new s.Range(te,1,Z,1),ne,!1,ce)}revealRange(te,Z=0,ne=!1,ce=!0){this._revealRange(te,ne?1:0,ce,Z)}revealRangeInCenter(te,Z=0){this._revealRange(te,1,!0,Z)}revealRangeInCenterIfOutsideViewport(te,Z=0){this._revealRange(te,2,!0,Z)}revealRangeNearTop(te,Z=0){this._revealRange(te,5,!0,Z)}revealRangeNearTopIfOutsideViewport(te,Z=0){this._revealRange(te,6,!0,Z)}revealRangeAtTop(te,Z=0){this._revealRange(te,3,!0,Z)}_revealRange(te,Z,ne,ce){if(!s.Range.isIRange(te))throw new Error("Invalid arguments");this._sendRevealRange(s.Range.lift(te),Z,ne,ce)}setSelections(te,Z="api",ne=0){if(!!this._modelData){if(!te||te.length===0)throw new Error("Invalid arguments");for(let ce=0,de=te.length;ce<de;ce++)if(!d.Selection.isISelection(te[ce]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(Z,te,ne)}}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(te,Z=1){if(!!this._modelData){if(typeof te!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollLeft:te},Z)}}setScrollTop(te,Z=1){if(!!this._modelData){if(typeof te!="number")throw new Error("Invalid arguments");this._modelData.viewModel.viewLayout.setScrollPosition({scrollTop:te},Z)}}setScrollPosition(te,Z=1){!this._modelData||this._modelData.viewModel.viewLayout.setScrollPosition(te,Z)}saveViewState(){if(!this._modelData)return null;const te={};for(const[ce,de]of this._contributions)typeof de.saveViewState=="function"&&(te[ce]=de.saveViewState());const Z=this._modelData.viewModel.saveCursorState(),ne=this._modelData.viewModel.saveState();return{cursorState:Z,viewState:ne,contributionsState:te}}restoreViewState(te){if(!this._modelData||!this._modelData.hasRealView)return;const Z=te;if(Z&&Z.cursorState&&Z.viewState){const ne=Z.cursorState;Array.isArray(ne)?ne.length>0&&this._modelData.viewModel.restoreCursorState(ne):this._modelData.viewModel.restoreCursorState([ne]);const ce=Z.contributionsState||{};for(const[he,pe]of this._contributions)typeof pe.restoreViewState=="function"&&pe.restoreViewState(ce[he]);const de=this._modelData.viewModel.reduceRestoreState(Z.viewState);this._modelData.view.restoreState(de)}}onVisible(){this._modelData?.view.refreshFocusState()}onHide(){this._modelData?.view.refreshFocusState(),this._focusTracker.refreshState()}getContribution(te){return this._contributions.get(te)||null}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let te=this.getActions();return te=te.filter(Z=>Z.isSupported()),te}getAction(te){return this._actions.get(te)||null}trigger(te,Z,ne){switch(ne=ne||{},Z){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(te);return;case"type":{const de=ne;this._type(te,de.text||"");return}case"replacePreviousChar":{const de=ne;this._compositionType(te,de.text||"",de.replaceCharCnt||0,0,0);return}case"compositionType":{const de=ne;this._compositionType(te,de.text||"",de.replacePrevCharCnt||0,de.replaceNextCharCnt||0,de.positionDelta||0);return}case"paste":{const de=ne;this._paste(te,de.text||"",de.pasteOnNewLine||!1,de.multicursorText||null,de.mode||null);return}case"cut":this._cut(te);return}const ce=this.getAction(Z);if(ce){Promise.resolve(ce.run()).then(void 0,R.onUnexpectedError);return}!this._modelData||this._triggerEditorCommand(te,Z,ne)||this._triggerCommand(Z,ne)}_triggerCommand(te,Z){this._commandService.executeCommand(te,Z)}_startComposition(){!this._modelData||(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(te){!this._modelData||(this._modelData.viewModel.endComposition(te),this._onDidCompositionEnd.fire())}_type(te,Z){!this._modelData||Z.length===0||(te==="keyboard"&&this._onWillType.fire(Z),this._modelData.viewModel.type(Z,te),te==="keyboard"&&this._onDidType.fire(Z))}_compositionType(te,Z,ne,ce,de){!this._modelData||this._modelData.viewModel.compositionType(Z,ne,ce,de,te)}_paste(te,Z,ne,ce,de){if(!this._modelData||Z.length===0)return;const he=this._modelData.viewModel,pe=he.getSelection().getStartPosition();he.paste(Z,ne,ce,te);const me=he.getSelection().getStartPosition();te==="keyboard"&&this._onDidPaste.fire({range:new s.Range(pe.lineNumber,pe.column,me.lineNumber,me.column),languageId:de})}_cut(te){!this._modelData||this._modelData.viewModel.cut(te)}_triggerEditorCommand(te,Z,ne){const ce=S.EditorExtensionsRegistry.getEditorCommand(Z);return ce?(ne=ne||{},ne.source=te,this._instantiationService.invokeFunction(de=>{Promise.resolve(ce.runEditorCommand(de,this,ne)).then(void 0,R.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(82)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(82)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(te,Z,ne){if(!this._modelData||this._configuration.options.get(82))return!1;let ce;return ne?Array.isArray(ne)?ce=()=>ne:ce=ne:ce=()=>null,this._modelData.viewModel.executeEdits(te,Z,ce),!0}executeCommand(te,Z){!this._modelData||this._modelData.viewModel.executeCommand(Z,te)}executeCommands(te,Z){!this._modelData||this._modelData.viewModel.executeCommands(Z,te)}createDecorationsCollection(te){return new j(this,te)}changeDecorations(te){return this._modelData?this._modelData.model.changeDecorations(te,this._id):null}getLineDecorations(te){return this._modelData?this._modelData.model.getLineDecorations(te,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(te){return this._modelData?this._modelData.model.getDecorationsInRange(te,this._id,(0,i.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(te,Z){return this._modelData?te.length===0&&Z.length===0?te:this._modelData.model.deltaDecorations(te,Z,this._id):[]}removeDecorations(te){!this._modelData||te.length===0||this._modelData.model.changeDecorations(Z=>{Z.deltaDecorations(te,[])})}setDecorationsByType(te,Z,ne){const ce={},de=this._decorationTypeSubtypes[Z]||{};this._decorationTypeSubtypes[Z]=ce;const he=[];for(const me of ne){let Se=Z;if(me.renderOptions){const ve=(0,k.hash)(me.renderOptions).toString(16);Se=Z+"-"+ve,!de[ve]&&!ce[ve]&&this._registerDecorationType(te,Se,me.renderOptions,Z),ce[ve]=!0}const Ie=this._resolveDecorationOptions(Se,!!me.hoverMessage);me.hoverMessage&&(Ie.hoverMessage=me.hoverMessage),he.push({range:me.range,options:Ie})}for(const me in de)ce[me]||this._removeDecorationType(Z+"-"+me);const pe=this._decorationTypeKeysToIds[Z]||[];this._decorationTypeKeysToIds[Z]=this.deltaDecorations(pe,he)}setDecorationsByTypeFast(te,Z){const ne=this._decorationTypeSubtypes[te]||{};for(const pe in ne)this._removeDecorationType(te+"-"+pe);this._decorationTypeSubtypes[te]={};const ce=g.ModelDecorationOptions.createDynamic(this._resolveDecorationOptions(te,!1)),de=new Array(Z.length);for(let pe=0,me=Z.length;pe<me;pe++)de[pe]={range:Z[pe],options:ce};const he=this._decorationTypeKeysToIds[te]||[];this._decorationTypeKeysToIds[te]=this.deltaDecorations(he,de)}removeDecorationsByType(te){const Z=this._decorationTypeKeysToIds[te];Z&&this.deltaDecorations(Z,[]),this._decorationTypeKeysToIds.hasOwnProperty(te)&&delete this._decorationTypeKeysToIds[te],this._decorationTypeSubtypes.hasOwnProperty(te)&&delete this._decorationTypeSubtypes[te]}getLayoutInfo(){return this._configuration.options.get(133)}createOverviewRuler(te){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(te)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(te){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(te)}layout(te){this._configuration.observeContainer(te),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(te){const Z={widget:te,position:te.getPosition()};this._contentWidgets.hasOwnProperty(te.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[te.getId()]=Z,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(Z)}layoutContentWidget(te){const Z=te.getId();if(this._contentWidgets.hasOwnProperty(Z)){const ne=this._contentWidgets[Z];ne.position=te.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(ne)}}removeContentWidget(te){const Z=te.getId();if(this._contentWidgets.hasOwnProperty(Z)){const ne=this._contentWidgets[Z];delete this._contentWidgets[Z],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(ne)}}addOverlayWidget(te){const Z={widget:te,position:te.getPosition()};this._overlayWidgets.hasOwnProperty(te.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[te.getId()]=Z,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(Z)}layoutOverlayWidget(te){const Z=te.getId();if(this._overlayWidgets.hasOwnProperty(Z)){const ne=this._overlayWidgets[Z];ne.position=te.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(ne)}}removeOverlayWidget(te){const Z=te.getId();if(this._overlayWidgets.hasOwnProperty(Z)){const ne=this._overlayWidgets[Z];delete this._overlayWidgets[Z],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(ne)}}changeViewZones(te){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(te)}getTargetAtClientPoint(te,Z){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(te,Z)}getScrolledVisiblePosition(te){if(!this._modelData||!this._modelData.hasRealView)return null;const Z=this._modelData.model.validatePosition(te),ne=this._configuration.options,ce=ne.get(133),de=sn._getVerticalOffsetForPosition(this._modelData,Z.lineNumber,Z.column)-this.getScrollTop(),he=this._modelData.view.getOffsetForColumn(Z.lineNumber,Z.column)+ce.glyphMarginWidth+ce.lineNumbersWidth+ce.decorationsWidth-this.getScrollLeft();return{top:de,left:he,height:ne.get(60)}}getOffsetForColumn(te,Z){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(te,Z)}render(te=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,te)}setAriaOptions(te){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(te)}applyFontInfo(te){(0,z.applyFontInfo)(te,this._configuration.options.get(45))}setBanner(te,Z){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=te,this._configuration.setReservedHeight(te?Z:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(te){if(!te){this._modelData=null;return}const Z=[];this._domElement.setAttribute("data-mode-id",te.getLanguageId()),this._configuration.setIsDominatedByLongLines(te.isDominatedByLongLines()),this._configuration.setModelLineCount(te.getLineCount()),te.onBeforeAttached();const ne=new m.ViewModel(this._id,this._configuration,te,P.DOMLineBreaksComputerFactory.create(),N.MonospaceLineBreaksComputerFactory.create(this._configuration.options),he=>p.scheduleAtNextAnimationFrame(he),this.languageConfigurationService,this._themeService);Z.push(te.onWillDispose(()=>this.setModel(null))),Z.push(ne.onEvent(he=>{switch(he.kind){case 0:this._onDidContentSizeChange.fire(he);break;case 1:this._editorTextFocus.setValue(he.hasFocus);break;case 2:this._onDidScrollChange.fire(he);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{he.reachedMaxCursorCount&&this._notificationService.warn(t.localize(0,null,f.CursorsController.MAX_CURSOR_COUNT));const pe=[];for(let Ie=0,ve=he.selections.length;Ie<ve;Ie++)pe[Ie]=he.selections[Ie].getPosition();const me={position:pe[0],secondaryPositions:pe.slice(1),reason:he.reason,source:he.source};this._onDidChangeCursorPosition.fire(me);const Se={selection:he.selections[0],secondarySelections:he.selections.slice(1),modelVersionId:he.modelVersionId,oldSelections:he.oldSelections,oldModelVersionId:he.oldModelVersionId,source:he.source,reason:he.reason};this._onDidChangeCursorSelection.fire(Se);break}case 7:this._onDidChangeModelDecorations.fire(he.event);break;case 8:this._domElement.setAttribute("data-mode-id",te.getLanguageId()),this._onDidChangeModelLanguage.fire(he.event);break;case 9:this._onDidChangeModelLanguageConfiguration.fire(he.event);break;case 10:this._onDidChangeModelContent.fire(he.event);break;case 11:this._onDidChangeModelOptions.fire(he.event);break;case 12:this._onDidChangeModelTokens.fire(he.event);break}}));const[ce,de]=this._createView(ne);if(de){this._domElement.appendChild(ce.domNode.domNode);let he=Object.keys(this._contentWidgets);for(let pe=0,me=he.length;pe<me;pe++){const Se=he[pe];ce.addContentWidget(this._contentWidgets[Se])}he=Object.keys(this._overlayWidgets);for(let pe=0,me=he.length;pe<me;pe++){const Se=he[pe];ce.addOverlayWidget(this._overlayWidgets[Se])}ce.render(!1,!0),ce.domNode.domNode.setAttribute("data-uri",te.uri.toString())}this._modelData=new W(te,ne,ce,de,Z)}_createView(te){let Z;this.isSimpleWidget?Z={paste:(de,he,pe,me)=>{this._paste("keyboard",de,he,pe,me)},type:de=>{this._type("keyboard",de)},compositionType:(de,he,pe,me)=>{this._compositionType("keyboard",de,he,pe,me)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:Z={paste:(de,he,pe,me)=>{const Se={text:de,pasteOnNewLine:he,multicursorText:pe,mode:me};this._commandService.executeCommand("paste",Se)},type:de=>{const he={text:de};this._commandService.executeCommand("type",he)},compositionType:(de,he,pe,me)=>{if(pe||me){const Se={text:de,replacePrevCharCnt:he,replaceNextCharCnt:pe,positionDelta:me};this._commandService.executeCommand("compositionType",Se)}else{const Se={text:de,replaceCharCnt:he};this._commandService.executeCommand("replacePreviousChar",Se)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const ne=new u.ViewUserInputEvents(te.coordinatesConverter);return ne.onKeyDown=de=>this._onKeyDown.fire(de),ne.onKeyUp=de=>this._onKeyUp.fire(de),ne.onContextMenu=de=>this._onContextMenu.fire(de),ne.onMouseMove=de=>this._onMouseMove.fire(de),ne.onMouseLeave=de=>this._onMouseLeave.fire(de),ne.onMouseDown=de=>this._onMouseDown.fire(de),ne.onMouseUp=de=>this._onMouseUp.fire(de),ne.onMouseDrag=de=>this._onMouseDrag.fire(de),ne.onMouseDrop=de=>this._onMouseDrop.fire(de),ne.onMouseDropCanceled=de=>this._onMouseDropCanceled.fire(de),ne.onMouseWheel=de=>this._onMouseWheel.fire(de),[new r.View(Z,this._configuration,this._themeService.getColorTheme(),te,ne,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(te){te?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const te=this._modelData.model,Z=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),Z&&this._domElement.contains(Z)&&this._domElement.removeChild(Z),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),te}_registerDecorationType(te,Z,ne,ce){this._codeEditorService.registerDecorationType(te,Z,ne,ce,this)}_removeDecorationType(te){this._codeEditorService.removeDecorationType(te)}_resolveDecorationOptions(te,Z){return this._codeEditorService.resolveDecorationOptions(te,Z)}getTelemetryData(){return this._telemetryData}hasModel(){return this._modelData!==null}showDropIndicatorAt(te){const Z=[{range:new s.Range(te.lineNumber,te.column,te.lineNumber,te.column),options:sn.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(Z),this.revealPosition(te,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}};U.dropIntoEditorDecorationOptions=g.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),U=we([F(3,y.IInstantiationService),F(4,C.ICodeEditorService),F(5,w.ICommandService),F(6,D.IContextKeyService),F(7,L.IThemeService),F(8,_.INotificationService),F(9,M.IAccessibilityService),F(10,V.ILanguageConfigurationService),F(11,x.ILanguageFeaturesService)],U),e.CodeEditorWidget=U;var $;(function(se){se[se.NotSet=0]="NotSet",se[se.False=1]="False",se[se.True=2]="True"})($||($={}));class q extends E.Disposable{constructor(te){super(),this._emitterOptions=te,this._onDidChangeToTrue=this._register(new A.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new A.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(te){const Z=te?2:1;this._value!==Z&&(this._value=Z,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=q;class X extends E.Disposable{constructor(te,Z){super(),this._editor=te,Z.createKey("editorId",te.getId()),this._editorSimpleInput=o.EditorContextKeys.editorSimpleInput.bindTo(Z),this._editorFocus=o.EditorContextKeys.focus.bindTo(Z),this._textInputFocus=o.EditorContextKeys.textInputFocus.bindTo(Z),this._editorTextFocus=o.EditorContextKeys.editorTextFocus.bindTo(Z),this._editorTabMovesFocus=o.EditorContextKeys.tabMovesFocus.bindTo(Z),this._editorReadonly=o.EditorContextKeys.readOnly.bindTo(Z),this._inDiffEditor=o.EditorContextKeys.inDiffEditor.bindTo(Z),this._editorColumnSelection=o.EditorContextKeys.columnSelection.bindTo(Z),this._hasMultipleSelections=o.EditorContextKeys.hasMultipleSelections.bindTo(Z),this._hasNonEmptySelection=o.EditorContextKeys.hasNonEmptySelection.bindTo(Z),this._canUndo=o.EditorContextKeys.canUndo.bindTo(Z),this._canRedo=o.EditorContextKeys.canRedo.bindTo(Z),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 te=this._editor.getOptions();this._editorTabMovesFocus.set(te.get(132)),this._editorReadonly.set(te.get(82)),this._inDiffEditor.set(te.get(55)),this._editorColumnSelection.set(te.get(18))}_updateFromSelection(){const te=this._editor.getSelections();te?(this._hasMultipleSelections.set(te.length>1),this._hasNonEmptySelection.set(te.some(Z=>!Z.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 te=this._editor.getModel();this._canUndo.set(Boolean(te&&te.canUndo())),this._canRedo.set(Boolean(te&&te.canRedo()))}}class G extends E.Disposable{constructor(te,Z,ne){super(),this._editor=te,this._contextKeyService=Z,this._languageFeaturesService=ne,this._langId=o.EditorContextKeys.languageId.bindTo(Z),this._hasCompletionItemProvider=o.EditorContextKeys.hasCompletionItemProvider.bindTo(Z),this._hasCodeActionsProvider=o.EditorContextKeys.hasCodeActionsProvider.bindTo(Z),this._hasCodeLensProvider=o.EditorContextKeys.hasCodeLensProvider.bindTo(Z),this._hasDefinitionProvider=o.EditorContextKeys.hasDefinitionProvider.bindTo(Z),this._hasDeclarationProvider=o.EditorContextKeys.hasDeclarationProvider.bindTo(Z),this._hasImplementationProvider=o.EditorContextKeys.hasImplementationProvider.bindTo(Z),this._hasTypeDefinitionProvider=o.EditorContextKeys.hasTypeDefinitionProvider.bindTo(Z),this._hasHoverProvider=o.EditorContextKeys.hasHoverProvider.bindTo(Z),this._hasDocumentHighlightProvider=o.EditorContextKeys.hasDocumentHighlightProvider.bindTo(Z),this._hasDocumentSymbolProvider=o.EditorContextKeys.hasDocumentSymbolProvider.bindTo(Z),this._hasReferenceProvider=o.EditorContextKeys.hasReferenceProvider.bindTo(Z),this._hasRenameProvider=o.EditorContextKeys.hasRenameProvider.bindTo(Z),this._hasSignatureHelpProvider=o.EditorContextKeys.hasSignatureHelpProvider.bindTo(Z),this._hasInlayHintsProvider=o.EditorContextKeys.hasInlayHintsProvider.bindTo(Z),this._hasDocumentFormattingProvider=o.EditorContextKeys.hasDocumentFormattingProvider.bindTo(Z),this._hasDocumentSelectionFormattingProvider=o.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(Z),this._hasMultipleDocumentFormattingProvider=o.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(Z),this._hasMultipleDocumentSelectionFormattingProvider=o.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(Z),this._isInWalkThrough=o.EditorContextKeys.isInWalkThroughSnippet.bindTo(Z);const ce=()=>this._update();this._register(te.onDidChangeModel(ce)),this._register(te.onDidChangeModelLanguage(ce)),this._register(ne.completionProvider.onDidChange(ce)),this._register(ne.codeActionProvider.onDidChange(ce)),this._register(ne.codeLensProvider.onDidChange(ce)),this._register(ne.definitionProvider.onDidChange(ce)),this._register(ne.declarationProvider.onDidChange(ce)),this._register(ne.implementationProvider.onDidChange(ce)),this._register(ne.typeDefinitionProvider.onDidChange(ce)),this._register(ne.hoverProvider.onDidChange(ce)),this._register(ne.documentHighlightProvider.onDidChange(ce)),this._register(ne.documentSymbolProvider.onDidChange(ce)),this._register(ne.referenceProvider.onDidChange(ce)),this._register(ne.renameProvider.onDidChange(ce)),this._register(ne.documentFormattingEditProvider.onDidChange(ce)),this._register(ne.documentRangeFormattingEditProvider.onDidChange(ce)),this._register(ne.signatureHelpProvider.onDidChange(ce)),this._register(ne.inlayHintsProvider.onDidChange(ce)),ce()}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 te=this._editor.getModel();if(!te){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(te.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(te)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(te)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(te)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(te)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(te)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(te)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(te)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(te)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(te)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(te)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(te)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(te)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(te)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(te)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(te)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(te)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(te)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(te).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(te).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(te).length>1),this._isInWalkThrough.set(te.uri.scheme===I.Schemas.walkThroughSnippet)})}}e.EditorModeContext=G;class Q extends E.Disposable{constructor(te){super(),this._onChange=this._register(new A.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(p.trackFocus(te)),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?.()}}class j{get length(){return this._decorationIds.length}constructor(te,Z){this._editor=te,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(Z)&&Z.length>0&&this.set(Z)}onDidChange(te,Z,ne){return this._editor.onDidChangeModelDecorations(ce=>{this._isChangingDecorations||te.call(Z,ce)},ne)}getRange(te){return!this._editor.hasModel()||te>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[te])}getRanges(){if(!this._editor.hasModel())return[];const te=this._editor.getModel(),Z=[];for(const ne of this._decorationIds){const ce=te.getDecorationRange(ne);ce&&Z.push(ce)}return Z}has(te){return this._decorationIds.includes(te.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(te){try{this._isChangingDecorations=!0,this._editor.changeDecorations(Z=>{this._decorationIds=Z.deltaDecorations(this._decorationIds,te)})}finally{this._isChangingDecorations=!1}}}const K=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 ee(se){return K+encodeURIComponent(se.toString())+Y}const ie=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),re=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 oe(se){return ie+encodeURIComponent(se.toString())+re}(0,L.registerThemingParticipant)((se,te)=>{const Z=se.getColor(v.editorErrorBorder);Z&&te.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${Z}; }`);const ne=se.getColor(v.editorErrorForeground);ne&&te.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${ee(ne)}") repeat-x bottom left; }`);const ce=se.getColor(v.editorErrorBackground);ce&&te.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${ce}; }`);const de=se.getColor(v.editorWarningBorder);de&&te.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${de}; }`);const he=se.getColor(v.editorWarningForeground);he&&te.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${ee(he)}") repeat-x bottom left; }`);const pe=se.getColor(v.editorWarningBackground);pe&&te.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${pe}; }`);const me=se.getColor(v.editorInfoBorder);me&&te.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${me}; }`);const Se=se.getColor(v.editorInfoForeground);Se&&te.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${ee(Se)}") repeat-x bottom left; }`);const Ie=se.getColor(v.editorInfoBackground);Ie&&te.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${Ie}; }`);const ve=se.getColor(v.editorHintBorder);ve&&te.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${ve}; }`);const be=se.getColor(v.editorHintForeground);be&&te.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${oe(be)}") no-repeat bottom left; }`);const ge=se.getColor(h.editorUnnecessaryCodeOpacity);ge&&te.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${ge.rgba.a}; }`);const ue=se.getColor(h.editorUnnecessaryCodeBorder);ue&&te.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${ue}; }`);const Ce=se.getColor(v.editorForeground)||"inherit";te.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${Ce}}`)})}),define(ae[377],le([1,0,1313,10,171,121,278,11,6,2,235,483,75,173,2197,134,50,20,280,362,94,736,421,424,281,7,5,151,26,33,12,37,1316,93,40,21,66,763,29,324,63,126,787,1072]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;class U{constructor(ue,Ce){this._contextMenuService=ue,this._clipboardService=Ce,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(ue){return ue.filter(Ce=>!this._zonesMap[String(Ce.id)])}clean(ue){this._zones.length>0&&ue.changeViewZones(Ce=>{for(const De of this._zones)Ce.removeZone(De)}),this._zones=[],this._zonesMap={},ue.changeDecorations(Ce=>{this._decorations=Ce.deltaDecorations(this._decorations,[])})}apply(ue,Ce,De,Ae){const Pe=Ae?C.StableEditorScrollState.capture(ue):null;ue.changeViewZones(fe=>{for(const ye of this._zones)fe.removeZone(ye);for(const ye of this._inlineDiffMargins)ye.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let ye=0,ke=De.zones.length;ye<ke;ye++){const Ee=De.zones[ye];Ee.suppressMouseDown=!0;const Te=fe.addZone(Ee);this._zones.push(Te),this._zonesMap[String(Te)]=!0,De.zones[ye].diff&&Ee.marginDomNode&&(Ee.suppressMouseDown=!1,De.zones[ye].diff?.originalModel.getValueLength()!==0&&this._inlineDiffMargins.push(new L.InlineDiffMargin(Te,Ee.marginDomNode,ue,De.zones[ye].diff,this._contextMenuService,this._clipboardService)))}}),Pe?.restore(ue),ue.changeDecorations(fe=>{this._decorations=fe.deltaDecorations(this._decorations,De.decorations)}),Ce?.setZones(De.overviewZones)}}let $=0;const q=(0,x.registerIcon)("diff-insert",V.Codicon.add,t.localize(0,null)),X=(0,x.registerIcon)("diff-remove",V.Codicon.remove,t.localize(1,null)),G=window.trustedTypes?.createPolicy("diffEditorWidget",{createHTML:ge=>ge}),Q=t.localize(2,null);let j=class ni extends b.Disposable{constructor(ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e){super(),this._editorProgressService=_e,this._onDidDispose=this._register(new I.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModel=this._register(new I.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidUpdateDiff=this._register(new I.Emitter),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new I.Emitter),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._documentDiffProvider=fe.createInstance(W.WorkerBasedDocumentDiffProvider),this._codeEditorService=ye,this._contextKeyService=this._register(Pe.createScoped(ue)),this._instantiationService=fe.createChild(new w.ServiceCollection([v.IContextKeyService,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=ke,this._notificationService=Ee,this._id=++$,this._state=0,this._updatingDiffProgress=null,this._domElement=ue,Ce=Ce||{},this._options=ve(Ce,{enableSplitViewResizing:!0,renderSideBySide:!0,renderMarginRevertIcon:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit",diffAlgorithm:"smart"}),typeof Ce.isInEmbeddedEditor<"u"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",Ce.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new E.RunOnceScheduler(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=ni._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,A.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(p.addStandardDisposableListener(this._overviewDomElement,p.EventType.POINTER_DOWN,Le=>{this._modifiedEditor.delegateVerticalScrollbarPointerDown(Le)})),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 U(Te,Ae),this._modifiedEditorState=new U(Te,Ae),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new B.ElementSizeObserver(this._containerDomElement,Ce.dimension)),this._register(this._elementSizeObserver.onDidChange(()=>this._onDidContainerSizeChanged())),Ce.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(Ce,De.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(Ce,De.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=fe.createInstance(i.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 oe(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new te(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(ke.onDidColorThemeChange(Le=>{this._strategy&&this._strategy.applyColors(Le)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=ni._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const Re=O.EditorExtensionsRegistry.getDiffEditorContributions();for(const Le of Re)try{this._register(fe.createInstance(Le.ctor,this))}catch(Me){(0,N.onUnexpectedError)(Me)}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(ue){this._state!==ue&&(this._state=ue,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}hasWidgetFocus(){return p.isAncestor(document.activeElement,this._domElement)}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(ue,Ce){let De="monaco-diff-editor monaco-editor-background ";return Ce&&(De+="side-by-side "),De+=(0,T.getThemeTypeSelector)(ue.type),De}_disposeOverviewRulers(){this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose(),this._originalOverviewRuler=null),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose(),this._modifiedOverviewRuler=null)}_createOverviewRulers(){!this._options.renderOverviewRuler||(R.ok(!this._originalOverviewRuler&&!this._modifiedOverviewRuler),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(ue,Ce){const De=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(ue),Ce);this._register(De.onDidScrollChange(Pe=>{this._isHandlingScrollEvent||!Pe.scrollTopChanged&&!Pe.scrollLeftChanged&&!Pe.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:Pe.scrollLeft,scrollTop:Pe.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(De.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(De.onDidChangeConfiguration(Pe=>{!De.getModel()||(Pe.hasChanged(45)&&this._updateDecorationsRunner.schedule(),Pe.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(De.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(De.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const Ae=this._contextKeyService.createKey("isInDiffLeftEditor",De.hasWidgetFocus());return this._register(De.onDidFocusEditorWidget(()=>Ae.set(!0))),this._register(De.onDidBlurEditorWidget(()=>Ae.set(!1))),this._register(De.onDidContentSizeChange(Pe=>{const fe=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ni.ONE_OVERVIEW_WIDTH,ye=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:ye,contentWidth:fe,contentHeightChanged:Pe.contentHeightChanged,contentWidthChanged:Pe.contentWidthChanged})})),De}_createRightHandSideEditor(ue,Ce){const De=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(ue),Ce);this._register(De.onDidScrollChange(Pe=>{this._isHandlingScrollEvent||!Pe.scrollTopChanged&&!Pe.scrollLeftChanged&&!Pe.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:Pe.scrollLeft,scrollTop:Pe.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(De.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(De.onDidChangeConfiguration(Pe=>{!De.getModel()||(Pe.hasChanged(45)&&this._updateDecorationsRunner.schedule(),Pe.hasChanged(134)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(De.onDidChangeHiddenAreas(()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()})),this._register(De.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(De.onDidChangeModelOptions(Pe=>{Pe.tabSize&&this._updateDecorationsRunner.schedule()}));const Ae=this._contextKeyService.createKey("isInDiffRightEditor",De.hasWidgetFocus());return this._register(De.onDidFocusEditorWidget(()=>Ae.set(!0))),this._register(De.onDidBlurEditorWidget(()=>Ae.set(!1))),this._register(De.onDidContentSizeChange(Pe=>{const fe=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+ni.ONE_OVERVIEW_WIDTH,ye=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:ye,contentWidth:fe,contentHeightChanged:Pe.contentHeightChanged,contentWidthChanged:Pe.contentWidthChanged})})),this._register(De.onMouseDown(Pe=>{if(!Pe.event.rightButton&&Pe.target.position&&Pe.target.element?.className.includes("arrow-revert-change")){const fe=Pe.target.position.lineNumber,ye=this._diffComputationResult?.changes.find(ke=>ke.modifiedStartLineNumber===fe-1||ke.modifiedStartLineNumber===fe);ye&&this.revertChange(ye),Pe.event.stopPropagation(),this._updateDecorations();return}})),De}revertChange(ue){const Ce=this._modifiedEditor,De=this._originalEditor.getModel(),Ae=this._modifiedEditor.getModel();if(!De||!Ae||!Ce)return;const Pe=ue.originalEndLineNumber>0?new l.Range(ue.originalStartLineNumber,1,ue.originalEndLineNumber,De.getLineMaxColumn(ue.originalEndLineNumber)):null,fe=Pe?De.getValueInRange(Pe):null,ye=ue.modifiedEndLineNumber>0?new l.Range(ue.modifiedStartLineNumber,1,ue.modifiedEndLineNumber,Ae.getLineMaxColumn(ue.modifiedEndLineNumber)):null,ke=Ae.getEOL();if(ue.originalEndLineNumber===0&&ye){let Ee=ye;ue.modifiedStartLineNumber>1?Ee=ye.setStartPosition(ue.modifiedStartLineNumber-1,Ae.getLineMaxColumn(ue.modifiedStartLineNumber-1)):ue.modifiedEndLineNumber<Ae.getLineCount()&&(Ee=ye.setEndPosition(ue.modifiedEndLineNumber+1,1)),Ce.executeEdits("diffEditor",[{range:Ee,text:""}])}else if(ue.modifiedEndLineNumber===0&&fe!==null){const Ee=ue.modifiedStartLineNumber<Ae.getLineCount()?new c.Position(ue.modifiedStartLineNumber+1,1):new c.Position(ue.modifiedStartLineNumber,Ae.getLineMaxColumn(ue.modifiedStartLineNumber));Ce.executeEdits("diffEditor",[{range:l.Range.fromPositions(Ee,Ee),text:ue.modifiedStartLineNumber<Ae.getLineCount()?fe+ke:ke+fe}])}else ye&&fe!==null&&Ce.executeEdits("diffEditor",[{range:ye,text:fe}])}_createInnerEditor(ue,Ce,De,Ae){return ue.createInstance(u.CodeEditorWidget,Ce,De,Ae)}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 d.EditorType.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getDiffComputationResult(){return this._diffComputationResult}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(ue){const Ce=ve(ue,this._options),De=be(this._options,Ce);this._options=Ce;const Ae=De.ignoreTrimWhitespace||De.renderIndicators||De.renderMarginRevertIcon,Pe=this._isVisible&&(De.maxComputationTime||De.maxFileSize||De.diffAlgorithm);Ae?this._beginUpdateDecorations():Pe&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(ue)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(ue)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),De.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new oe(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new te(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=ni._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),De.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(ue){if(ue&&(!ue.original||!ue.modified))throw new Error(ue.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._disposeOverviewRulers(),this._originalEditor.setModel(ue?ue.original:null),this._modifiedEditor.setModel(ue?ue.modified:null),this._updateDecorationsRunner.cancel(),ue&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),ue&&(this._createOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport(),this._onDidChangeModel.fire()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(ue){return this._modifiedEditor.getVisibleColumnFromPosition(ue)}getStatusbarColumn(ue){return this._modifiedEditor.getStatusbarColumn(ue)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(ue,Ce="api"){this._modifiedEditor.setPosition(ue,Ce)}revealLine(ue,Ce=0){this._modifiedEditor.revealLine(ue,Ce)}revealLineInCenter(ue,Ce=0){this._modifiedEditor.revealLineInCenter(ue,Ce)}revealLineInCenterIfOutsideViewport(ue,Ce=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(ue,Ce)}revealLineNearTop(ue,Ce=0){this._modifiedEditor.revealLineNearTop(ue,Ce)}revealPosition(ue,Ce=0){this._modifiedEditor.revealPosition(ue,Ce)}revealPositionInCenter(ue,Ce=0){this._modifiedEditor.revealPositionInCenter(ue,Ce)}revealPositionInCenterIfOutsideViewport(ue,Ce=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(ue,Ce)}revealPositionNearTop(ue,Ce=0){this._modifiedEditor.revealPositionNearTop(ue,Ce)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(ue,Ce="api"){this._modifiedEditor.setSelection(ue,Ce)}setSelections(ue,Ce="api"){this._modifiedEditor.setSelections(ue,Ce)}revealLines(ue,Ce,De=0){this._modifiedEditor.revealLines(ue,Ce,De)}revealLinesInCenter(ue,Ce,De=0){this._modifiedEditor.revealLinesInCenter(ue,Ce,De)}revealLinesInCenterIfOutsideViewport(ue,Ce,De=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(ue,Ce,De)}revealLinesNearTop(ue,Ce,De=0){this._modifiedEditor.revealLinesNearTop(ue,Ce,De)}revealRange(ue,Ce=0,De=!1,Ae=!0){this._modifiedEditor.revealRange(ue,Ce,De,Ae)}revealRangeInCenter(ue,Ce=0){this._modifiedEditor.revealRangeInCenter(ue,Ce)}revealRangeInCenterIfOutsideViewport(ue,Ce=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(ue,Ce)}revealRangeNearTop(ue,Ce=0){this._modifiedEditor.revealRangeNearTop(ue,Ce)}revealRangeNearTopIfOutsideViewport(ue,Ce=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(ue,Ce)}revealRangeAtTop(ue,Ce=0){this._modifiedEditor.revealRangeAtTop(ue,Ce)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const ue=this._originalEditor.saveViewState(),Ce=this._modifiedEditor.saveViewState();return{original:ue,modified:Ce}}restoreViewState(ue){if(ue&&ue.original&&ue.modified){const Ce=ue;this._originalEditor.restoreViewState(Ce.original),this._modifiedEditor.restoreViewState(Ce.modified)}}layout(ue){this._elementSizeObserver.observe(ue)}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(ue,Ce,De){this._modifiedEditor.trigger(ue,Ce,De)}createDecorationsCollection(ue){return this._modifiedEditor.createDecorationsCollection(ue)}changeDecorations(ue){return this._modifiedEditor.changeDecorations(ue)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const ue=this._elementSizeObserver.getHeight(),Ce=this._getReviewHeight(),De=ni.ENTIRE_DIFF_OVERVIEW_WIDTH-2*ni.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:ni.ONE_OVERVIEW_WIDTH,right:De+ni.ONE_OVERVIEW_WIDTH,height:ue-Ce}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:ni.ONE_OVERVIEW_WIDTH,height:ue-Ce}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),ni.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(ue,Ce){return!ue&&!Ce?!0:!ue||!Ce?!1:ue.toString()===Ce.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const ue=this._originalEditor.getModel(),Ce=this._modifiedEditor.getModel();if(!ue||!Ce)return;this._diffComputationToken++;const De=this._diffComputationToken,Ae=this._options.maxFileSize*1024*1024,Pe=fe=>{const ye=fe.getValueLength();return Ae===0||ye<=Ae};if(!Pe(ue)||!Pe(Ce)){(!ni._equals(ue.uri,this._lastOriginalWarning)||!ni._equals(Ce.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=ue.uri,this._lastModifiedWarning=Ce.uri,this._notificationService.warn(t.localize(3,null)));return}this._setState(1),this._documentDiffProvider.computeDiff(ue,Ce,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace,maxComputationTime:this._options.maxComputationTime,diffAlgorithm:this._options.diffAlgorithm}).then(fe=>{De===this._diffComputationToken&&ue===this._originalEditor.getModel()&&Ce===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult={identical:fe.identical,quitEarly:fe.quitEarly,changes:fe.changes.map(ye=>{let ke,Ee,Te,_e,Re=ye.innerChanges;return ye.originalRange.isEmpty?(ke=ye.originalRange.startLineNumber-1,Ee=0,Re=void 0):(ke=ye.originalRange.startLineNumber,Ee=ye.originalRange.endLineNumberExclusive-1),ye.modifiedRange.isEmpty?(Te=ye.modifiedRange.startLineNumber-1,_e=0,Re=void 0):(Te=ye.modifiedRange.startLineNumber,_e=ye.modifiedRange.endLineNumberExclusive-1),{originalStartLineNumber:ke,originalEndLineNumber:Ee,modifiedStartLineNumber:Te,modifiedEndLineNumber:_e,charChanges:Re?.map(Le=>({originalStartLineNumber:Le.originalRange.startLineNumber,originalStartColumn:Le.originalRange.startColumn,originalEndLineNumber:Le.originalRange.endLineNumber,originalEndColumn:Le.originalRange.endColumn,modifiedStartLineNumber:Le.modifiedRange.startLineNumber,modifiedStartColumn:Le.modifiedRange.startColumn,modifiedEndLineNumber:Le.modifiedRange.endLineNumber,modifiedEndColumn:Le.modifiedRange.endColumn}))}})},this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},fe=>{De===this._diffComputationToken&&ue===this._originalEditor.getModel()&&Ce===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 ue=this._diffComputationResult?this._diffComputationResult.changes:[],Ce=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),De=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),Ae=this._strategy.getEditorsDiffDecorations(ue,this._options.ignoreTrimWhitespace,this._options.renderIndicators,this._options.renderMarginRevertIcon,Ce,De);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,Ae.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,Ae.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(ue){const Ce={...ue};return Ce.inDiffEditor=!0,Ce.automaticLayout=!1,Ce.scrollbar={...Ce.scrollbar||{}},Ce.scrollbar.vertical="visible",Ce.folding=!1,Ce.codeLens=this._options.diffCodeLens,Ce.fixedOverflowWidgets=!0,Ce.minimap={...Ce.minimap||{}},Ce.minimap.enabled=!1,Ce}_adjustOptionsForLeftHandSide(ue){const Ce=this._adjustOptionsForSubEditor(ue);return this._options.renderSideBySide?Ce.wordWrapOverride1=this._options.diffWordWrap:(Ce.wordWrapOverride1="off",Ce.wordWrapOverride2="off"),ue.originalAriaLabel&&(Ce.ariaLabel=ue.originalAriaLabel),Ce.ariaLabel+=Q,Ce.readOnly=!this._options.originalEditable,Ce.dropIntoEditor={enabled:!Ce.readOnly},Ce.extraEditorClassName="original-in-monaco-diff-editor",{...Ce,dimension:{height:0,width:0}}}_adjustOptionsForRightHandSide(ue){const Ce=this._adjustOptionsForSubEditor(ue);return ue.modifiedAriaLabel&&(Ce.ariaLabel=ue.modifiedAriaLabel),Ce.ariaLabel+=Q,Ce.wordWrapOverride1=this._options.diffWordWrap,Ce.revealHorizontalRightPadding=f.EditorOptions.revealHorizontalRightPadding.defaultValue+ni.ENTIRE_DIFF_OVERVIEW_WIDTH,Ce.scrollbar.verticalHasArrows=!1,Ce.extraEditorClassName="modified-in-monaco-diff-editor",{...Ce,dimension:{height:0,width:0}}}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const ue=this._elementSizeObserver.getWidth(),Ce=this._elementSizeObserver.getHeight(),De=this._getReviewHeight(),Ae=this._strategy.layout();this._originalDomNode.style.width=Ae+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=ue-Ae+"px",this._modifiedDomNode.style.left=Ae+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=Ce-De+"px",this._overviewDomElement.style.width=ni.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=ue-ni.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(ni.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:Ae,height:Ce-De}),this._modifiedEditor.layout({width:ue-Ae-(this._options.renderOverviewRuler?ni.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:Ce-De}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(Ce-De,ue,De),this._layoutOverviewViewport()}_layoutOverviewViewport(){const ue=this._computeOverviewViewport();ue?(this._overviewViewportDomElement.setTop(ue.top),this._overviewViewportDomElement.setHeight(ue.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const ue=this._modifiedEditor.getLayoutInfo();if(!ue)return null;const Ce=this._modifiedEditor.getScrollTop(),De=this._modifiedEditor.getScrollHeight(),Ae=Math.max(0,ue.height),Pe=Math.max(0,Ae-2*0),fe=De>0?Pe/De:0,ye=Math.max(0,Math.floor(ue.height*fe)),ke=Math.floor(Ce*fe);return{height:ye,top:ke}}_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(ue){this._strategy?.dispose(),this._strategy=ue,ue.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(ue,Ce){const De=this._diffComputationResult?this._diffComputationResult.changes:[];if(De.length===0||ue<Ce(De[0]))return null;let Ae=0,Pe=De.length-1;for(;Ae<Pe;){const fe=Math.floor((Ae+Pe)/2),ye=Ce(De[fe]),ke=fe+1<=Pe?Ce(De[fe+1]):1073741824;ue<ye?Pe=fe-1:ue>=ke?Ae=fe+1:(Ae=fe,Pe=fe)}return De[Ae]}_getEquivalentLineForOriginalLineNumber(ue){const Ce=this._getLineChangeAtOrBeforeLineNumber(ue,ke=>ke.originalStartLineNumber);if(!Ce)return ue;const De=Ce.originalStartLineNumber+(Ce.originalEndLineNumber>0?-1:0),Ae=Ce.modifiedStartLineNumber+(Ce.modifiedEndLineNumber>0?-1:0),Pe=Ce.originalEndLineNumber>0?Ce.originalEndLineNumber-Ce.originalStartLineNumber+1:0,fe=Ce.modifiedEndLineNumber>0?Ce.modifiedEndLineNumber-Ce.modifiedStartLineNumber+1:0,ye=ue-De;return ye<=Pe?Ae+Math.min(ye,fe):Ae+fe-Pe+ye}_getEquivalentLineForModifiedLineNumber(ue){const Ce=this._getLineChangeAtOrBeforeLineNumber(ue,ke=>ke.modifiedStartLineNumber);if(!Ce)return ue;const De=Ce.originalStartLineNumber+(Ce.originalEndLineNumber>0?-1:0),Ae=Ce.modifiedStartLineNumber+(Ce.modifiedEndLineNumber>0?-1:0),Pe=Ce.originalEndLineNumber>0?Ce.originalEndLineNumber-Ce.originalStartLineNumber+1:0,fe=Ce.modifiedEndLineNumber>0?Ce.modifiedEndLineNumber-Ce.modifiedStartLineNumber+1:0,ye=ue-Ae;return ye<=fe?De+Math.min(ye,Pe):De+Pe-fe+ye}getDiffLineInformationForOriginal(ue){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(ue)}:null}getDiffLineInformationForModified(ue){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(ue)}:null}};j.ONE_OVERVIEW_WIDTH=15,j.ENTIRE_DIFF_OVERVIEW_WIDTH=30,j.UPDATE_DIFF_DECORATIONS_DELAY=200,j=we([F(3,M.IClipboardService),F(4,v.IContextKeyService),F(5,m.IInstantiationService),F(6,r.ICodeEditorService),F(7,T.IThemeService),F(8,D.INotificationService),F(9,_.IContextMenuService),F(10,P.IEditorProgressService)],j),e.DiffEditorWidget=j;class K extends b.Disposable{constructor(ue){super(),this._dataSource=ue,this._insertColor=null,this._removeColor=null}applyColors(ue){const Ce=ue.getColor(y.diffOverviewRulerInserted)||(ue.getColor(y.diffInserted)||y.defaultInsertColor).transparent(2),De=ue.getColor(y.diffOverviewRulerRemoved)||(ue.getColor(y.diffRemoved)||y.defaultRemoveColor).transparent(2),Ae=!Ce.equals(this._insertColor)||!De.equals(this._removeColor);return this._insertColor=Ce,this._removeColor=De,Ae}getEditorsDiffDecorations(ue,Ce,De,Ae,Pe,fe){fe=fe.sort((Te,_e)=>Te.afterLineNumber-_e.afterLineNumber),Pe=Pe.sort((Te,_e)=>Te.afterLineNumber-_e.afterLineNumber);const ye=this._getViewZones(ue,Pe,fe,De),ke=this._getOriginalEditorDecorations(ye,ue,Ce,De),Ee=this._getModifiedEditorDecorations(ye,ue,Ce,De,Ae);return{original:{decorations:ke.decorations,overviewZones:ke.overviewZones,zones:ye.original},modified:{decorations:Ee.decorations,overviewZones:Ee.overviewZones,zones:ye.modified}}}}class Y{constructor(ue){this._source=ue,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 ee{constructor(ue,Ce,De,Ae,Pe){this._lineChanges=ue,this._originalForeignVZ=Ce,this._modifiedForeignVZ=De,this._originalEditor=Ae,this._modifiedEditor=Pe}static _getViewLineCount(ue,Ce,De){const Ae=ue.getModel(),Pe=ue._getViewModel();if(Ae&&Pe){const fe=Ie(Ae,Pe,Ce,De);return fe.endLineNumber-fe.startLineNumber+1}return De-Ce+1}getViewZones(){const ue=this._originalEditor.getOption(60),Ce=this._modifiedEditor.getOption(60),De=this._originalEditor.getOption(134).wrappingColumn!==-1,Ae=this._modifiedEditor.getOption(134).wrappingColumn!==-1,Pe=De||Ae,fe=this._originalEditor.getModel(),ye=this._originalEditor._getViewModel().coordinatesConverter,ke=this._modifiedEditor._getViewModel().coordinatesConverter,Ee={original:[],modified:[]};let Te=0,_e=0,Re=0,Le=0,Me=0,Oe=0;const Ke=(Ue,Fe)=>Ue.afterLineNumber-Fe.afterLineNumber,We=(Ue,Fe)=>{if(Fe.domNode===null&&Ue.length>0){const He=Ue[Ue.length-1];if(He.afterLineNumber===Fe.afterLineNumber&&He.domNode===null){He.heightInLines+=Fe.heightInLines;return}}Ue.push(Fe)},Xe=new Y(this._modifiedForeignVZ),Je=new Y(this._originalForeignVZ);let rt=1,je=1;for(let Ue=0,Fe=this._lineChanges.length;Ue<=Fe;Ue++){const He=Ue<Fe?this._lineChanges[Ue]:null;He!==null?(Re=He.originalStartLineNumber+(He.originalEndLineNumber>0?-1:0),Le=He.modifiedStartLineNumber+(He.modifiedEndLineNumber>0?-1:0),_e=He.originalEndLineNumber>0?ee._getViewLineCount(this._originalEditor,He.originalStartLineNumber,He.originalEndLineNumber):0,Te=He.modifiedEndLineNumber>0?ee._getViewLineCount(this._modifiedEditor,He.modifiedStartLineNumber,He.modifiedEndLineNumber):0,Me=Math.max(He.originalStartLineNumber,He.originalEndLineNumber),Oe=Math.max(He.modifiedStartLineNumber,He.modifiedEndLineNumber)):(Re+=1e7+_e,Le+=1e7+Te,Me=Re,Oe=Le);let Be=[],ze=[];if(Pe){let ot;He?He.originalEndLineNumber>0?ot=He.originalStartLineNumber-rt:ot=He.modifiedStartLineNumber-je:ot=fe.getLineCount()-rt+1;for(let at=0;at<ot;at++){const wt=rt+at,It=je+at,_t=ye.getModelLineViewLineCount(wt),lt=ke.getModelLineViewLineCount(It);_t<lt?Be.push({afterLineNumber:wt,heightInLines:lt-_t,domNode:null,marginDomNode:null}):_t>lt&&ze.push({afterLineNumber:It,heightInLines:_t-lt,domNode:null,marginDomNode:null})}He&&(rt=(He.originalEndLineNumber>0?He.originalEndLineNumber:He.originalStartLineNumber)+1,je=(He.modifiedEndLineNumber>0?He.modifiedEndLineNumber:He.modifiedStartLineNumber)+1)}for(;Xe.current&&Xe.current.afterLineNumber<=Oe;){let ot;Xe.current.afterLineNumber<=Le?ot=Re-Le+Xe.current.afterLineNumber:ot=Me;let at=null;He&&He.modifiedStartLineNumber<=Xe.current.afterLineNumber&&Xe.current.afterLineNumber<=He.modifiedEndLineNumber&&(at=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),Be.push({afterLineNumber:ot,heightInLines:Xe.current.height/Ce,domNode:null,marginDomNode:at}),Xe.advance()}for(;Je.current&&Je.current.afterLineNumber<=Me;){let ot;Je.current.afterLineNumber<=Re?ot=Le-Re+Je.current.afterLineNumber:ot=Oe,ze.push({afterLineNumber:ot,heightInLines:Je.current.height/ue,domNode:null}),Je.advance()}if(He!==null&&ce(He)){const ot=this._produceOriginalFromDiff(He,_e,Te);ot&&Be.push(ot)}if(He!==null&&de(He)){const ot=this._produceModifiedFromDiff(He,_e,Te);ot&&ze.push(ot)}let nt=0,ut=0;for(Be=Be.sort(Ke),ze=ze.sort(Ke);nt<Be.length&&ut<ze.length;){const ot=Be[nt],at=ze[ut],wt=ot.afterLineNumber-Re,It=at.afterLineNumber-Le;wt<It?(We(Ee.original,ot),nt++):It<wt?(We(Ee.modified,at),ut++):ot.shouldNotShrink?(We(Ee.original,ot),nt++):at.shouldNotShrink?(We(Ee.modified,at),ut++):ot.heightInLines>=at.heightInLines?(ot.heightInLines-=at.heightInLines,ut++):(at.heightInLines-=ot.heightInLines,nt++)}for(;nt<Be.length;)We(Ee.original,Be[nt]),nt++;for(;ut<ze.length;)We(Ee.modified,ze[ut]),ut++}return{original:ee._ensureDomNodes(Ee.original),modified:ee._ensureDomNodes(Ee.modified)}}static _ensureDomNodes(ue){return ue.map(Ce=>(Ce.domNode||(Ce.domNode=me()),Ce))}}function ie(ge,ue,Ce,De,Ae){return{range:new l.Range(ge,ue,Ce,De),options:Ae}}const re={arrowRevertChange:n.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginClassName:"arrow-revert-change "+T.ThemeIcon.asClassName(V.Codicon.arrowRight)}),charDelete:n.ModelDecorationOptions.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:n.ModelDecorationOptions.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:n.ModelDecorationOptions.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:n.ModelDecorationOptions.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:n.ModelDecorationOptions.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:n.ModelDecorationOptions.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+T.ThemeIcon.asClassName(q),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:n.ModelDecorationOptions.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:n.ModelDecorationOptions.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+T.ThemeIcon.asClassName(X),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:n.ModelDecorationOptions.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class oe extends K{constructor(ue,Ce){super(ue),this._disableSash=Ce===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new k.Sash(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(De=>this._onSashDrag(De)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(ue){const Ce=ue===!1;this._disableSash!==Ce&&(this._disableSash=Ce,this._sash.state=this._disableSash?0:3)}layout(ue=this._sashRatio){const De=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?j.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let Ae=Math.floor((ue||.5)*De);const Pe=Math.floor(.5*De);return Ae=this._disableSash?Pe:Ae||Pe,De>oe.MINIMUM_EDITOR_WIDTH*2?(Ae<oe.MINIMUM_EDITOR_WIDTH&&(Ae=oe.MINIMUM_EDITOR_WIDTH),Ae>De-oe.MINIMUM_EDITOR_WIDTH&&(Ae=De-oe.MINIMUM_EDITOR_WIDTH)):Ae=Pe,this._sashPosition!==Ae&&(this._sashPosition=Ae),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(ue){const De=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?j.ENTIRE_DIFF_OVERVIEW_WIDTH:0),Ae=this.layout((this._startSashPosition+(ue.currentX-ue.startX))/De);this._sashRatio=Ae/De,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(ue){return 0}getVerticalSashLeft(ue){return this._sashPosition}getVerticalSashHeight(ue){return this._dataSource.getHeight()}_getViewZones(ue,Ce,De){const Ae=this._dataSource.getOriginalEditor(),Pe=this._dataSource.getModifiedEditor();return new se(ue,Ce,De,Ae,Pe).getViewZones()}_getOriginalEditorDecorations(ue,Ce,De,Ae){const Pe=this._dataSource.getOriginalEditor(),fe=String(this._removeColor),ye={decorations:[],overviewZones:[]},ke=Pe.getModel(),Ee=Pe._getViewModel();for(const Te of Ce)if(de(Te)){ye.decorations.push({range:new l.Range(Te.originalStartLineNumber,1,Te.originalEndLineNumber,1073741824),options:Ae?re.lineDeleteWithSign:re.lineDelete}),(!ce(Te)||!Te.charChanges)&&ye.decorations.push(ie(Te.originalStartLineNumber,1,Te.originalEndLineNumber,1073741824,re.charDeleteWholeLine));const _e=Ie(ke,Ee,Te.originalStartLineNumber,Te.originalEndLineNumber);if(ye.overviewZones.push(new a.OverviewRulerZone(_e.startLineNumber,_e.endLineNumber,0,fe)),Te.charChanges){for(const Re of Te.charChanges)if(pe(Re))if(De)for(let Le=Re.originalStartLineNumber;Le<=Re.originalEndLineNumber;Le++){let Me,Oe;Le===Re.originalStartLineNumber?Me=Re.originalStartColumn:Me=ke.getLineFirstNonWhitespaceColumn(Le),Le===Re.originalEndLineNumber?Oe=Re.originalEndColumn:Oe=ke.getLineLastNonWhitespaceColumn(Le),ye.decorations.push(ie(Le,Me,Le,Oe,re.charDelete))}else ye.decorations.push(ie(Re.originalStartLineNumber,Re.originalStartColumn,Re.originalEndLineNumber,Re.originalEndColumn,re.charDelete))}}return ye}_getModifiedEditorDecorations(ue,Ce,De,Ae,Pe){const fe=this._dataSource.getModifiedEditor(),ye=String(this._insertColor),ke={decorations:[],overviewZones:[]},Ee=fe.getModel(),Te=fe._getViewModel();for(const _e of Ce){if(Pe)if(_e.modifiedEndLineNumber>0)ke.decorations.push({range:new l.Range(_e.modifiedStartLineNumber,1,_e.modifiedStartLineNumber,1),options:re.arrowRevertChange});else{const Re=ue.modified.find(Le=>Le.afterLineNumber===_e.modifiedStartLineNumber);Re&&(Re.marginDomNode=Se())}if(ce(_e)){ke.decorations.push({range:new l.Range(_e.modifiedStartLineNumber,1,_e.modifiedEndLineNumber,1073741824),options:Ae?re.lineInsertWithSign:re.lineInsert}),(!de(_e)||!_e.charChanges)&&ke.decorations.push(ie(_e.modifiedStartLineNumber,1,_e.modifiedEndLineNumber,1073741824,re.charInsertWholeLine));const Re=Ie(Ee,Te,_e.modifiedStartLineNumber,_e.modifiedEndLineNumber);if(ke.overviewZones.push(new a.OverviewRulerZone(Re.startLineNumber,Re.endLineNumber,0,ye)),_e.charChanges){for(const Le of _e.charChanges)if(he(Le))if(De)for(let Me=Le.modifiedStartLineNumber;Me<=Le.modifiedEndLineNumber;Me++){let Oe,Ke;Me===Le.modifiedStartLineNumber?Oe=Le.modifiedStartColumn:Oe=Ee.getLineFirstNonWhitespaceColumn(Me),Me===Le.modifiedEndLineNumber?Ke=Le.modifiedEndColumn:Ke=Ee.getLineLastNonWhitespaceColumn(Me),ke.decorations.push(ie(Me,Oe,Me,Ke,re.charInsert))}else ke.decorations.push(ie(Le.modifiedStartLineNumber,Le.modifiedStartColumn,Le.modifiedEndLineNumber,Le.modifiedEndColumn,re.charInsert))}}}return ke}}oe.MINIMUM_EDITOR_WIDTH=100;class se extends ee{constructor(ue,Ce,De,Ae,Pe){super(ue,Ce,De,Ae,Pe)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(ue,Ce,De){return De>Ce?{afterLineNumber:Math.max(ue.originalStartLineNumber,ue.originalEndLineNumber),heightInLines:De-Ce,domNode:null}:null}_produceModifiedFromDiff(ue,Ce,De){return Ce>De?{afterLineNumber:Math.max(ue.modifiedStartLineNumber,ue.modifiedEndLineNumber),heightInLines:Ce-De,domNode:null}:null}}class te extends K{constructor(ue,Ce){super(ue),this._decorationsLeft=ue.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(ue.getOriginalEditor().onDidLayoutChange(De=>{this._decorationsLeft!==De.decorationsLeft&&(this._decorationsLeft=De.decorationsLeft,ue.relayoutEditors())}))}setEnableSplitViewResizing(ue){}_getViewZones(ue,Ce,De,Ae){const Pe=this._dataSource.getOriginalEditor(),fe=this._dataSource.getModifiedEditor();return new Z(ue,Ce,De,Pe,fe,Ae).getViewZones()}_getOriginalEditorDecorations(ue,Ce,De,Ae){const Pe=String(this._removeColor),fe={decorations:[],overviewZones:[]},ye=this._dataSource.getOriginalEditor(),ke=ye.getModel(),Ee=ye._getViewModel();let Te=0;for(const _e of Ce)if(de(_e)){for(fe.decorations.push({range:new l.Range(_e.originalStartLineNumber,1,_e.originalEndLineNumber,1073741824),options:re.lineDeleteMargin});Te<ue.modified.length;){const Me=ue.modified[Te];if(Me.diff&&Me.diff.originalStartLineNumber>=_e.originalStartLineNumber)break;Te++}let Re=0;if(Te<ue.modified.length){const Me=ue.modified[Te];Me.diff&&Me.diff.originalStartLineNumber===_e.originalStartLineNumber&&Me.diff.originalEndLineNumber===_e.originalEndLineNumber&&Me.diff.modifiedStartLineNumber===_e.modifiedStartLineNumber&&Me.diff.modifiedEndLineNumber===_e.modifiedEndLineNumber&&(Re=Me.heightInLines)}const Le=Ie(ke,Ee,_e.originalStartLineNumber,_e.originalEndLineNumber);fe.overviewZones.push(new a.OverviewRulerZone(Le.startLineNumber,Le.endLineNumber,Re,Pe))}return fe}_getModifiedEditorDecorations(ue,Ce,De,Ae,Pe){const fe=this._dataSource.getModifiedEditor(),ye=String(this._insertColor),ke={decorations:[],overviewZones:[]},Ee=fe.getModel(),Te=fe._getViewModel();for(const _e of Ce)if(ce(_e)){ke.decorations.push({range:new l.Range(_e.modifiedStartLineNumber,1,_e.modifiedEndLineNumber,1073741824),options:Ae?re.lineInsertWithSign:re.lineInsert});const Re=Ie(Ee,Te,_e.modifiedStartLineNumber,_e.modifiedEndLineNumber);if(ke.overviewZones.push(new a.OverviewRulerZone(Re.startLineNumber,Re.endLineNumber,0,ye)),_e.charChanges){for(const Le of _e.charChanges)if(he(Le))if(De)for(let Me=Le.modifiedStartLineNumber;Me<=Le.modifiedEndLineNumber;Me++){let Oe,Ke;Me===Le.modifiedStartLineNumber?Oe=Le.modifiedStartColumn:Oe=Ee.getLineFirstNonWhitespaceColumn(Me),Me===Le.modifiedEndLineNumber?Ke=Le.modifiedEndColumn:Ke=Ee.getLineLastNonWhitespaceColumn(Me),ke.decorations.push(ie(Me,Oe,Me,Ke,re.charInsert))}else ke.decorations.push(ie(Le.modifiedStartLineNumber,Le.modifiedStartColumn,Le.modifiedEndLineNumber,Le.modifiedEndColumn,re.charInsert))}else ke.decorations.push(ie(_e.modifiedStartLineNumber,1,_e.modifiedEndLineNumber,1073741824,re.charInsertWholeLine))}return ke}layout(){return Math.max(5,this._decorationsLeft)}}class Z extends ee{constructor(ue,Ce,De,Ae,Pe,fe){super(ue,Ce,De,Ae,Pe),this._originalModel=Ae.getModel(),this._renderIndicators=fe,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const ue=super.getViewZones();return this._finalize(ue),ue}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const ue=document.createElement("div");return ue.className="inline-added-margin-view-zone",ue}_produceOriginalFromDiff(ue,Ce,De){const Ae=document.createElement("div");return Ae.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(ue.originalStartLineNumber,ue.originalEndLineNumber),heightInLines:De,domNode:document.createElement("div"),marginDomNode:Ae}}_produceModifiedFromDiff(ue,Ce,De){const Ae=document.createElement("div");Ae.className=`view-lines line-delete ${z.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`;const Pe=document.createElement("div");Pe.className="inline-deleted-margin-view-zone";const fe={shouldNotShrink:!0,afterLineNumber:ue.modifiedEndLineNumber===0?ue.modifiedStartLineNumber:ue.modifiedStartLineNumber-1,heightInLines:Ce,minWidthInPx:0,domNode:Ae,marginDomNode:Pe,diff:{originalStartLineNumber:ue.originalStartLineNumber,originalEndLineNumber:ue.originalEndLineNumber,modifiedStartLineNumber:ue.modifiedStartLineNumber,modifiedEndLineNumber:ue.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let ye=ue.originalStartLineNumber;ye<=ue.originalEndLineNumber;ye++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(ye),null,null);return this._pendingLineChange.push(ue),this._pendingViewZones.push(fe),fe}_finalize(ue){const Ce=this._modifiedEditor.getOptions(),De=this._modifiedEditor.getModel().getOptions().tabSize,Ae=Ce.get(45),Pe=Ce.get(29),fe=Ae.typicalHalfwidthCharacterWidth,ye=Ce.get(94),ke=this._originalModel.mightContainNonBasicASCII(),Ee=this._originalModel.mightContainRTL(),Te=Ce.get(60),Re=Ce.get(133).decorationsWidth,Le=Ce.get(107),Me=Ce.get(89),Oe=Ce.get(84),Ke=Ce.get(46),We=this._lineBreaksComputer.finalize();let Xe=0;for(let Je=0;Je<this._pendingLineChange.length;Je++){const rt=this._pendingLineChange[Je],je=this._pendingViewZones[Je],Ue=je.domNode;(0,S.applyFontInfo)(Ue,Ae);const Fe=je.marginDomNode;(0,S.applyFontInfo)(Fe,Ae);const He=[];if(rt.charChanges)for(const It of rt.charChanges)pe(It)&&He.push(new h.InlineDecoration(new l.Range(It.originalStartLineNumber,It.originalStartColumn,It.originalEndLineNumber,It.originalEndColumn),"char-delete",0));const Be=He.length>0,ze=new s.StringBuilder(1e4);let nt=0,ut=0,ot=null;for(let It=rt.originalStartLineNumber;It<=rt.originalEndLineNumber;It++){const _t=It-rt.originalStartLineNumber,lt=this._originalModel.tokenization.getLineTokens(It),pt=lt.getLineContent(),st=We[Xe++],qe=o.LineDecoration.filter(He,It,1,pt.length+1);if(st){let Et=0;for(const xt of st.breakOffsets){const At=lt.sliceAndInflate(Et,xt,0),Nt=pt.substring(Et,xt);nt=Math.max(nt,this._renderOriginalLine(ut++,Nt,At,o.LineDecoration.extractWrapped(qe,Et,xt),Be,ke,Ee,Ae,Pe,Te,Re,Le,Me,Oe,Ke,De,ze,Fe)),Et=xt}for(ot||(ot=[]);ot.length<_t;)ot[ot.length]=1;ot[_t]=st.breakOffsets.length,je.heightInLines+=st.breakOffsets.length-1;const Tt=document.createElement("div");Tt.className="gutter-delete",ue.original.push({afterLineNumber:It,afterColumn:0,heightInLines:st.breakOffsets.length-1,domNode:me(),marginDomNode:Tt})}else nt=Math.max(nt,this._renderOriginalLine(ut++,pt,lt,qe,Be,ke,Ee,Ae,Pe,Te,Re,Le,Me,Oe,Ke,De,ze,Fe))}nt+=ye;const at=ze.build(),wt=G?G.createHTML(at):at;if(Ue.innerHTML=wt,je.minWidthInPx=nt*fe,ot){const It=rt.originalEndLineNumber-rt.originalStartLineNumber;for(;ot.length<=It;)ot[ot.length]=1}je.diff.viewLineCounts=ot}ue.original.sort((Je,rt)=>Je.afterLineNumber-rt.afterLineNumber)}_renderOriginalLine(ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e,Re,Le,Me,Oe,Ke,We,Xe){We.appendString('<div class="view-line'),Pe||We.appendString(" char-delete"),We.appendString('" style="top:'),We.appendString(String(ue*Te)),We.appendString('px;width:1000000px;">');const Je=h.ViewLineRenderingData.isBasicASCII(Ce,fe),rt=h.ViewLineRenderingData.containsRTL(Ce,Je,ye),je=(0,g.renderViewLine)(new g.RenderLineInput(ke.isMonospace&&!Ee,ke.canUseHalfwidthRightwardsArrow,Ce,!1,Je,rt,0,De,Ae,Ke,0,ke.spaceWidth,ke.middotWidth,ke.wsmiddotWidth,Re,Le,Me,Oe!==f.EditorFontLigatures.OFF,null),We);if(We.appendString("</div>"),this._renderIndicators){const Ue=document.createElement("div");Ue.className=`delete-sign ${T.ThemeIcon.asClassName(X)}`,Ue.setAttribute("style",`position:absolute;top:${ue*Te}px;width:${_e}px;height:${Te}px;right:0;`),Xe.appendChild(Ue)}return je.characterMapping.getHorizontalOffset(je.characterMapping.length)}}function ne(ge,ue){return(0,f.stringSet)(ge,ue,["off","on","inherit"])}function ce(ge){return ge.modifiedEndLineNumber>0}function de(ge){return ge.originalEndLineNumber>0}function he(ge){return ge.modifiedStartLineNumber===ge.modifiedEndLineNumber?ge.modifiedEndColumn-ge.modifiedStartColumn>0:ge.modifiedEndLineNumber-ge.modifiedStartLineNumber>0}function pe(ge){return ge.originalStartLineNumber===ge.originalEndLineNumber?ge.originalEndColumn-ge.originalStartColumn>0:ge.originalEndLineNumber-ge.originalStartLineNumber>0}function me(){const ge=document.createElement("div");return ge.className="diagonal-fill",ge}function Se(){const ge=document.createElement("div");return ge.className="arrow-revert-change "+T.ThemeIcon.asClassName(V.Codicon.arrowRight),p.$("div",{},ge)}function Ie(ge,ue,Ce,De){const Ae=ge.getLineCount();return Ce=Math.min(Ae,Math.max(1,Ce)),De=Math.min(Ae,Math.max(1,De)),ue.coordinatesConverter.convertModelRangeToViewRange(new l.Range(Ce,ge.getLineMinColumn(Ce),De,ge.getLineMaxColumn(De)))}function ve(ge,ue){return{enableSplitViewResizing:(0,f.boolean)(ge.enableSplitViewResizing,ue.enableSplitViewResizing),renderSideBySide:(0,f.boolean)(ge.renderSideBySide,ue.renderSideBySide),renderMarginRevertIcon:(0,f.boolean)(ge.renderMarginRevertIcon,ue.renderMarginRevertIcon),maxComputationTime:(0,f.clampedInt)(ge.maxComputationTime,ue.maxComputationTime,0,1073741824),maxFileSize:(0,f.clampedInt)(ge.maxFileSize,ue.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,f.boolean)(ge.ignoreTrimWhitespace,ue.ignoreTrimWhitespace),renderIndicators:(0,f.boolean)(ge.renderIndicators,ue.renderIndicators),originalEditable:(0,f.boolean)(ge.originalEditable,ue.originalEditable),diffCodeLens:(0,f.boolean)(ge.diffCodeLens,ue.diffCodeLens),renderOverviewRuler:(0,f.boolean)(ge.renderOverviewRuler,ue.renderOverviewRuler),diffWordWrap:ne(ge.diffWordWrap,ue.diffWordWrap),diffAlgorithm:(0,f.stringSet)(ge.diffAlgorithm,ue.diffAlgorithm,["smart","experimental"])}}function be(ge,ue){return{enableSplitViewResizing:ge.enableSplitViewResizing!==ue.enableSplitViewResizing,renderSideBySide:ge.renderSideBySide!==ue.renderSideBySide,renderMarginRevertIcon:ge.renderMarginRevertIcon!==ue.renderMarginRevertIcon,maxComputationTime:ge.maxComputationTime!==ue.maxComputationTime,maxFileSize:ge.maxFileSize!==ue.maxFileSize,ignoreTrimWhitespace:ge.ignoreTrimWhitespace!==ue.ignoreTrimWhitespace,renderIndicators:ge.renderIndicators!==ue.renderIndicators,originalEditable:ge.originalEditable!==ue.originalEditable,diffCodeLens:ge.diffCodeLens!==ue.diffCodeLens,renderOverviewRuler:ge.renderOverviewRuler!==ue.renderOverviewRuler,diffWordWrap:ge.diffWordWrap!==ue.diffWordWrap,diffAlgorithm:ge.diffAlgorithm!==ue.diffAlgorithm}}(0,T.registerThemingParticipant)((ge,ue)=>{const Ce=ge.getColor(y.diffInserted);Ce&&ue.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${Ce}; }`);const De=ge.getColor(y.diffInsertedLine)||Ce;De&&ue.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${De}; }`);const Ae=ge.getColor(y.diffInsertedLineGutter)||De;Ae&&(ue.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${Ae}; }`),ue.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${Ae}; }`));const Pe=ge.getColor(y.diffRemoved);Pe&&ue.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${Pe}; }`);const fe=ge.getColor(y.diffRemovedLine)||Pe;fe&&ue.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${fe}; }`);const ye=ge.getColor(y.diffRemovedLineGutter)||fe;ye&&(ue.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${ye}; }`),ue.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${ye}; }`));const ke=ge.getColor(y.diffInsertedOutline);ke&&ue.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${(0,H.isHighContrast)(ge.type)?"dashed":"solid"} ${ke}; }`);const Ee=ge.getColor(y.diffRemovedOutline);Ee&&ue.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${(0,H.isHighContrast)(ge.type)?"dashed":"solid"} ${Ee}; }`);const Te=ge.getColor(y.scrollbarShadow);Te&&ue.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${Te}; }`);const _e=ge.getColor(y.diffBorder);_e&&ue.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${_e}; }`);const Re=ge.getColor(y.scrollbarSliderBackground);Re&&ue.addRule(` .monaco-diff-editor .diffViewport { background: ${Re}; } `);const Le=ge.getColor(y.scrollbarSliderHoverBackground);Le&&ue.addRule(` .monaco-diff-editor .diffViewport:hover { background: ${Le}; } `);const Me=ge.getColor(y.scrollbarSliderActiveBackground);Me&&ue.addRule(` .monaco-diff-editor .diffViewport:active { background: ${Me}; } `);const Oe=ge.getColor(y.diffDiagonalFill);ue.addRule(` .monaco-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${Oe} 12.5%, #0000 12.5%, #0000 50%, ${Oe} 50%, ${Oe} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `)})}),define(ae[226],le([1,0,52,75,173,377,31,7,5,26,12,111,37,93,66,122,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedDiffEditorWidget=e.EmbeddedCodeEditorWidget=void 0;let l=class extends R.CodeEditorWidget{constructor(n,a,o,g,h,v,m,w,D,y,T,_){super(n,{...o.getRawOptions(),overflowWidgetsDomNode:o.getOverflowWidgetsDomNode()},{},g,h,v,m,w,D,y,T,_),this._parentEditor=o,this._overwriteOptions=a,super.updateOptions(this._overwriteOptions),this._register(o.onDidChangeConfiguration(L=>this._onParentConfigurationChanged(L)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(n){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(n){t.mixin(this._overwriteOptions,n,!0),super.updateOptions(this._overwriteOptions)}};l=we([F(3,I.IInstantiationService),F(4,p.ICodeEditorService),F(5,k.ICommandService),F(6,E.IContextKeyService),F(7,S.IThemeService),F(8,b.INotificationService),F(9,C.IAccessibilityService),F(10,f.ILanguageConfigurationService),F(11,c.ILanguageFeaturesService)],l),e.EmbeddedCodeEditorWidget=l;let s=class extends A.DiffEditorWidget{constructor(n,a,o,g,h,v,m,w,D,y,T){super(n,o.getRawOptions(),{},y,g,h,v,m,w,D,T),this._parentEditor=o,this._overwriteOptions=a,super.updateOptions(this._overwriteOptions),this._register(o.onDidChangeConfiguration(_=>this._onParentConfigurationChanged(_)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(n){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(n){t.mixin(this._overwriteOptions,n,!0),super.updateOptions(this._overwriteOptions)}};s=we([F(3,E.IContextKeyService),F(4,I.IInstantiationService),F(5,p.ICodeEditorService),F(6,S.IThemeService),F(7,b.INotificationService),F(8,r.IContextMenuService),F(9,u.IClipboardService),F(10,i.IEditorProgressService)],s),e.EmbeddedDiffEditorWidget=s}),define(ae[2206],le([1,0,11,2,40,50,20,85,59,116,94,167,1328,15,33,12,1076]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const c=(0,i.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},r.localize(0,null));class l extends R.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:r.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:3160,weight:100}})}run(o,g){n.get(g)?.jumpToBracket()}}class s extends R.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:r.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(o,g,h){let v=!0;h&&h.selectBrackets===!1&&(v=!1),n.get(g)?.selectToBracket(v)}}class d{constructor(o,g,h){this.position=o,this.brackets=g,this.options=h}}class n extends p.Disposable{static get(o){return o.getContribution(n.ID)}constructor(o){super(),this._editor=o,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new t.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(65),this._updateBracketsSoon.schedule(),this._register(o.onDidChangeCursorPosition(g=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeModelContent(g=>{this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeModel(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeModelLanguageConfiguration(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(o.onDidChangeConfiguration(g=>{g.hasChanged(65)&&(this._matchBrackets=this._editor.getOption(65),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(o.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(o.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const o=this._editor.getModel(),g=this._editor.getSelections().map(h=>{const v=h.getStartPosition(),m=o.bracketPairs.matchBracket(v);let w=null;if(m)m[0].containsPosition(v)&&!m[1].containsPosition(v)?w=m[1].getStartPosition():m[1].containsPosition(v)&&(w=m[0].getStartPosition());else{const D=o.bracketPairs.findEnclosingBrackets(v);if(D)w=D[1].getStartPosition();else{const y=o.bracketPairs.findNextBracket(v);y&&y.range&&(w=y.range.getStartPosition())}}return w?new E.Selection(w.lineNumber,w.column,w.lineNumber,w.column):new E.Selection(v.lineNumber,v.column,v.lineNumber,v.column)});this._editor.setSelections(g),this._editor.revealRange(g[0])}selectToBracket(o){if(!this._editor.hasModel())return;const g=this._editor.getModel(),h=[];this._editor.getSelections().forEach(v=>{const m=v.getStartPosition();let w=g.bracketPairs.matchBracket(m);if(!w&&(w=g.bracketPairs.findEnclosingBrackets(m),!w)){const T=g.bracketPairs.findNextBracket(m);T&&T.range&&(w=g.bracketPairs.matchBracket(T.range.getStartPosition()))}let D=null,y=null;if(w){w.sort(k.Range.compareRangesUsingStarts);const[T,_]=w;if(D=o?T.getStartPosition():T.getEndPosition(),y=o?_.getEndPosition():_.getStartPosition(),_.containsPosition(m)){const L=D;D=y,y=L}}D&&y&&h.push(new E.Selection(D.lineNumber,D.column,y.lineNumber,y.column))}),h.length>0&&(this._editor.setSelections(h),this._editor.revealRange(h[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const o=[];let g=0;for(const h of this._lastBracketsData){const v=h.brackets;v&&(o[g++]={range:v[0],options:h.options},o[g++]={range:v[1],options:h.options})}this._decorations.set(o)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const o=this._editor.getSelections();if(o.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const g=this._editor.getModel(),h=g.getVersionId();let v=[];this._lastVersionId===h&&(v=this._lastBracketsData);const m=[];let w=0;for(let L=0,M=o.length;L<M;L++){const O=o[L];O.isEmpty()&&(m[w++]=O.getStartPosition())}m.length>1&&m.sort(A.Position.compare);const D=[];let y=0,T=0;const _=v.length;for(let L=0,M=m.length;L<M;L++){const O=m[L];for(;T<_&&v[T].position.isBefore(O);)T++;if(T<_&&v[T].position.equals(O))D[y++]=v[T];else{let N=g.bracketPairs.matchBracket(O,20),P=n._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!N&&this._matchBrackets==="always"&&(N=g.bracketPairs.findEnclosingBrackets(O,20),P=n._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),D[y++]=new d(O,N,P)}}this._lastBracketsData=D,this._lastVersionId=h}}e.BracketMatchingController=n,n.ID="editor.contrib.bracketMatchingController",n._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=S.ModelDecorationOptions.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:(0,f.themeColorFromId)(c),position:b.OverviewRulerLane.Center}}),n._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=S.ModelDecorationOptions.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"}),(0,R.registerEditorContribution)(n.ID,n),(0,R.registerEditorAction)(s),(0,R.registerEditorAction)(l),(0,f.registerThemingParticipant)((a,o)=>{const g=a.getColor(C.editorBracketMatchBackground);g&&o.addRule(`.monaco-editor .bracket-match { background-color: ${g}; }`);const h=a.getColor(C.editorBracketMatchBorder);h&&o.addRule(`.monaco-editor .bracket-match { border: 1px solid ${h}; }`)}),u.MenuRegistry.appendMenuItem(u.MenuId.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:r.localize(3,null)},order:2})}),define(ae[2207],le([1,0,10,143,20,94,1079]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class k{constructor(C,r,u){this.afterColumn=1073741824,this.afterLineNumber=C,this.heightInPx=r,this._onHeight=u,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 E{constructor(C,r,u){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=C,this._id=`codelens.widget-${E._idPool++}`,this.updatePosition(u),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${r}`}withCommands(C,r){this._commands.clear();const u=[];let i=!1;for(let f=0;f<C.length;f++){const c=C[f];if(!!c&&(i=!0,c.command)){const l=(0,p.renderLabelWithIcons)(c.command.title.trim());c.command.id?(u.push(t.$("a",{id:String(f),title:c.command.tooltip,role:"button"},...l)),this._commands.set(String(f),c.command)):u.push(t.$("span",{title:c.command.tooltip},...l)),f+1<C.length&&u.push(t.$("span",void 0,"\xA0|\xA0"))}}i?(t.reset(this._domNode,...u),this._isEmpty&&r&&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 r=this._editor.getModel().getLineFirstNonWhitespaceColumn(C);this._widgetPosition={position:{lineNumber:C,column:r},preference:[1]}}getPosition(){return this._widgetPosition||null}}E._idPool=0;class I{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(C,r){this._addDecorations.push(C),this._addDecorationsCallbacks.push(r)}removeDecoration(C){this._removeDecorations.push(C)}commit(C){const r=C.deltaDecorations(this._removeDecorations,this._addDecorations);for(let u=0,i=r.length;u<i;u++)this._addDecorationsCallbacks[u](r[u])}}e.CodeLensHelper=I;class b{constructor(C,r,u,i,f,c,l){this._isDisposed=!1,this._editor=r,this._className=u,this._data=C,this._decorationIds=[];let s;const d=[];this._data.forEach((n,a)=>{n.symbol.command&&d.push(n.symbol),i.addDecoration({range:n.symbol.range,options:A.ModelDecorationOptions.EMPTY},o=>this._decorationIds[a]=o),s?s=R.Range.plusRange(s,n.symbol.range):s=R.Range.lift(n.symbol.range)}),this._viewZone=new k(s.startLineNumber-1,c,l),this._viewZoneId=f.addZone(this._viewZone),d.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(d,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new E(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(C,r){this._decorationIds.forEach(C.removeDecoration,C),this._decorationIds=[],r?.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,r)=>{const u=this._editor.getModel().getDecorationRange(C),i=this._data[r].symbol;return!!(u&&R.Range.isEmpty(i.range)===u.isEmpty())})}updateCodeLensSymbols(C,r){this._decorationIds.forEach(r.removeDecoration,r),this._decorationIds=[],this._data=C,this._data.forEach((u,i)=>{r.addDecoration({range:u.symbol.range,options:A.ModelDecorationOptions.EMPTY},f=>this._decorationIds[i]=f)})}updateHeight(C,r){this._viewZone.heightInPx=C,r.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(C){if(!this._viewZone.isVisible())return null;for(let r=0;r<this._decorationIds.length;r++){const u=C.getDecorationRange(this._decorationIds[r]);u&&(this._data[r].symbol.range=u)}return this._data}updateCommands(C){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(C,!0);for(let r=0;r<this._data.length;r++){const u=C[r];if(u){const{symbol:i}=this._data[r];i.command=u.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 r=this._editor.getModel().getDecorationRange(this._decorationIds[0]);r&&(this._viewZone.afterLineNumber=r.startLineNumber-1,C.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(r.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}e.CodeLensWidget=b}),define(ae[617],le([1,0,11,65,21,2,146,28,430,40,20,94,242,61,791,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});const c=500;let l=class na extends A.Disposable{constructor(d,n,a,o){super(),this._editor=d,this._configurationService=n,this._languageFeaturesService=a,this._localToDispose=this._register(new A.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new I.DynamicCssRules(this._editor),this._colorDecorationClassRefs=this._register(new A.DisposableStore),this._debounceInformation=o.for(a.colorProvider,"Document Colors",{min:na.RECOMPUTE_TIME}),this._register(d.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(d.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(a.colorProvider.onDidChange(()=>this.onModelChanged())),this._register(d.onDidChangeConfiguration(()=>{const g=this._isEnabled;this._isEnabled=this.isEnabled(),g!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const d=this._editor.getModel();if(!d)return!1;const n=d.getLanguageId(),a=this._configurationService.getValue(n);if(a&&typeof a=="object"){const o=a.colorDecorators;if(o&&o.enable!==void 0&&!o.enable)return o.enable}return this._editor.getOption(17)}static get(d){return d.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const d=this._editor.getModel();!d||!this._languageFeaturesService.colorProvider.has(d)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new t.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(d)))})),this.beginCompute())}beginCompute(){this._computePromise=(0,t.createCancelablePromise)(async d=>{const n=this._editor.getModel();if(!n)return Promise.resolve([]);const a=new k.StopWatch(!1),o=await(0,i.getColors)(this._languageFeaturesService.colorProvider,n,d);return this._debounceInformation.update(n,a.elapsed()),o}),this._computePromise.then(d=>{this.updateDecorations(d),this.updateColorDecorators(d),this._computePromise=null},R.onUnexpectedError)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(d){const n=d.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._editor.changeDecorations(a=>{this._decorationsIds=a.deltaDecorations(this._decorationsIds,n),this._colorDatas=new Map,this._decorationsIds.forEach((o,g)=>this._colorDatas.set(o,d[g]))})}updateColorDecorators(d){this._colorDecorationClassRefs.clear();const n=[];for(let a=0;a<d.length&&n.length<c;a++){const{red:o,green:g,blue:h,alpha:v}=d[a].colorInfo.color,m=new p.RGBA(Math.round(o*255),Math.round(g*255),Math.round(h*255),v),w=`rgba(${m.r}, ${m.g}, ${m.b}, ${m.a})`,D=this._colorDecorationClassRefs.add(this._ruleFactory.createClassNameRef({backgroundColor:w}));n.push({range:{startLineNumber:d[a].colorInfo.range.startLineNumber,startColumn:d[a].colorInfo.range.startColumn,endLineNumber:d[a].colorInfo.range.endLineNumber,endColumn:d[a].colorInfo.range.endColumn},options:{description:"colorDetector",before:{content:E.noBreakWhitespace,inlineClassName:`${D.className} colorpicker-color-decoration`,inlineClassNameAffectsLetterSpacing:!0,attachedData:e.ColorDecorationInjectedTextMarker}}})}this._colorDecoratorIds.set(n)}removeAllDecorations(){this._editor.removeDecorations(this._decorationsIds),this._decorationsIds=[],this._colorDecoratorIds.clear(),this._colorDecorationClassRefs.clear()}getColorData(d){const n=this._editor.getModel();if(!n)return null;const a=n.getDecorationsInRange(S.Range.fromPositions(d,d)).filter(o=>this._colorDatas.has(o.id));return a.length===0?null:this._colorDatas.get(a[0].id)}isColorDecoration(d){return this._colorDecoratorIds.has(d)}};l.ID="editor.contrib.colorDetector",l.RECOMPUTE_TIME=1e3,l=we([F(1,f.IConfigurationService),F(2,u.ILanguageFeaturesService),F(3,r.ILanguageFeatureDebounceService)],l),e.ColorDetector=l,(0,b.registerEditorContribution)(l.ID,l)}),define(ae[2208],le([1,0,11,32,65,2,20,791,617,1300,2164,12]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorHoverParticipant=e.ColorHover=void 0;class r{constructor(f,c,l,s){this.owner=f,this.range=c,this.model=l,this.provider=s,this.forceShowAtRange=!0}isValidForHoverAnchor(f){return f.type===1&&this.range.startColumn<=f.range.startColumn&&this.range.endColumn>=f.range.endColumn}}e.ColorHover=r;let u=class{constructor(f,c){this._editor=f,this._themeService=c,this.hoverOrdinal=1}computeSync(f,c){return[]}computeAsync(f,c,l){return t.AsyncIterableObject.fromPromise(this._computeAsync(f,c,l))}async _computeAsync(f,c,l){if(!this._editor.hasModel())return[];const s=I.ColorDetector.get(this._editor);if(!s)return[];for(const d of c){if(!s.isColorDecoration(d))continue;const n=s.getColorData(d.range.getStartPosition());if(n)return[await this._createColorHover(this._editor.getModel(),n.colorInfo,n.provider)]}return[]}async _createColorHover(f,c,l){const s=f.getValueInRange(c.range),{red:d,green:n,blue:a,alpha:o}=c.color,g=new R.RGBA(Math.round(d*255),Math.round(n*255),Math.round(a*255),o),h=new R.Color(g),v=await(0,E.getColorPresentations)(f,c,l,p.CancellationToken.None),m=new b.ColorPickerModel(h,[],0);return m.colorPresentations=v||[],m.guessColorPresentation(h,s),new r(this,k.Range.lift(c.range),m,l)}renderHoverParts(f,c){if(c.length===0||!this._editor.hasModel())return A.Disposable.None;const l=new A.DisposableStore,s=c[0],d=this._editor.getModel(),n=s.model,a=l.add(new S.ColorPickerWidget(f.fragment,n,this._editor.getOption(131),this._themeService));f.setColorPicker(a);let o=new k.Range(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);const g=()=>{let v,m;if(n.presentation.textEdit){v=[n.presentation.textEdit],m=new k.Range(n.presentation.textEdit.range.startLineNumber,n.presentation.textEdit.range.startColumn,n.presentation.textEdit.range.endLineNumber,n.presentation.textEdit.range.endColumn);const w=this._editor.getModel()._setTrackedRange(null,m,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",v),m=this._editor.getModel()._getTrackedRange(w)||m}else v=[{range:o,text:n.presentation.label,forceMoveMarkers:!1}],m=o.setEndPosition(o.endLineNumber,o.startColumn+n.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",v);n.presentation.additionalTextEdits&&(v=[...n.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",v),f.hide()),this._editor.pushUndoStop(),o=m},h=v=>(0,E.getColorPresentations)(d,{range:o,color:{red:v.rgba.r/255,green:v.rgba.g/255,blue:v.rgba.b/255,alpha:v.rgba.a}},s.provider,p.CancellationToken.None).then(m=>{n.colorPresentations=m||[]});return l.add(n.onColorFlushed(v=>{h(v).then(g)})),l.add(n.onDidChangeColor(h)),l}};u=we([F(1,C.IThemeService)],u),e.ColorHoverParticipant=u}),define(ae[825],le([1,0,2,14,40,50,20,85,94,1225,1081]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function S(r){return p.isMacintosh?r.altKey:r.ctrlKey}class C extends t.Disposable{static get(u){return u.getContribution(C.ID)}constructor(u){super(),this._editor=u,this._dndDecorationIds=this._editor.createDecorationsCollection(),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._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(u){!this._editor.getOption(31)||this._editor.getOption(18)||(S(u)&&(this._modifierPressed=!0),this._mouseDown&&S(u)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(u){!this._editor.getOption(31)||this._editor.getOption(18)||(S(u)&&(this._modifierPressed=!1),this._mouseDown&&u.keyCode===C.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(u){this._mouseDown=!0}_onEditorMouseUp(u){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(u){const i=u.target;if(this._dragSelection===null){const c=(this._editor.getSelections()||[]).filter(l=>i.position&&l.containsPosition(i.position));if(c.length===1)this._dragSelection=c[0];else return}S(u.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(u){if(u.target&&(this._hitContent(u.target)||this._hitMargin(u.target))&&u.target.position){const i=new A.Position(u.target.position.lineNumber,u.target.position.column);if(this._dragSelection===null){let f=null;if(u.event.shiftKey){const c=this._editor.getSelection();if(c){const{selectionStartLineNumber:l,selectionStartColumn:s}=c;f=[new E.Selection(l,s,i.lineNumber,i.column)]}}else f=(this._editor.getSelections()||[]).map(c=>c.containsPosition(i)?new E.Selection(i.lineNumber,i.column,i.lineNumber,i.column):c);this._editor.setSelections(f||[],"mouse",3)}else(!this._dragSelection.containsPosition(i)||(S(u.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(i)||this._dragSelection.getStartPosition().equals(i)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(C.ID,new b.DragAndDropCommand(this._dragSelection,i,S(u.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(u){this._dndDecorationIds.set([{range:new k.Range(u.lineNumber,u.column,u.lineNumber,u.column),options:C._DECORATION_OPTIONS}]),this._editor.revealPosition(u,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(u){return u.type===6||u.type===7}_hitMargin(u){return u.type===2||u.type===3||u.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=p.isMacintosh?6:5,C._DECORATION_OPTIONS=I.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,R.registerEditorContribution)(C.ID,C)}),define(ae[826],le([1,0,20,116,94,33,12]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class E{constructor(b){this._editor=b,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(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 b=this._findScopeDecorationIds.map(S=>this._editor.getModel().getDecorationRange(S)).filter(S=>!!S);if(b.length)return b}return null}getStartPosition(){return this._startPosition}setStartPosition(b){this._startPosition=b,this.setCurrentFindMatch(null)}_getDecorationIndex(b){const S=this._decorations.indexOf(b);return S>=0?S+1:1}getCurrentMatchesPosition(b){const S=this._editor.getModel().getDecorationsInRange(b);for(const C of S){const r=C.options;if(r===E._FIND_MATCH_DECORATION||r===E._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(C.id)}return 0}setCurrentFindMatch(b){let S=null,C=0;if(b)for(let r=0,u=this._decorations.length;r<u;r++){const i=this._editor.getModel().getDecorationRange(this._decorations[r]);if(b.equalsRange(i)){S=this._decorations[r],C=r+1;break}}return(this._highlightedDecorationId!==null||S!==null)&&this._editor.changeDecorations(r=>{if(this._highlightedDecorationId!==null&&(r.changeDecorationOptions(this._highlightedDecorationId,E._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),S!==null&&(this._highlightedDecorationId=S,r.changeDecorationOptions(this._highlightedDecorationId,E._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(r.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),S!==null){let u=this._editor.getModel().getDecorationRange(S);if(u.startLineNumber!==u.endLineNumber&&u.endColumn===1){const i=u.endLineNumber-1,f=this._editor.getModel().getLineMaxColumn(i);u=new t.Range(u.startLineNumber,u.startColumn,i,f)}this._rangeHighlightDecorationId=r.addDecoration(u,E._RANGE_HIGHLIGHT_DECORATION)}}),C}set(b,S){this._editor.changeDecorations(C=>{let r=E._FIND_MATCH_DECORATION;const u=[];if(b.length>1e3){r=E._FIND_MATCH_NO_OVERVIEW_DECORATION;const f=this._editor.getModel().getLineCount(),l=this._editor.getLayoutInfo().height/f,s=Math.max(2,Math.ceil(3/l));let d=b[0].range.startLineNumber,n=b[0].range.endLineNumber;for(let a=1,o=b.length;a<o;a++){const g=b[a].range;n+s>=g.startLineNumber?g.endLineNumber>n&&(n=g.endLineNumber):(u.push({range:new t.Range(d,1,n,1),options:E._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),d=g.startLineNumber,n=g.endLineNumber)}u.push({range:new t.Range(d,1,n,1),options:E._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const i=new Array(b.length);for(let f=0,c=b.length;f<c;f++)i[f]={range:b[f].range,options:r};this._decorations=C.deltaDecorations(this._decorations,i),this._overviewRulerApproximateDecorations=C.deltaDecorations(this._overviewRulerApproximateDecorations,u),this._rangeHighlightDecorationId&&(C.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(f=>C.removeDecoration(f)),this._findScopeDecorationIds=[]),S?.length&&(this._findScopeDecorationIds=S.map(f=>C.addDecoration(f,E._FIND_SCOPE_DECORATION)))})}matchBeforePosition(b){if(this._decorations.length===0)return null;for(let S=this._decorations.length-1;S>=0;S--){const C=this._decorations[S],r=this._editor.getModel().getDecorationRange(C);if(!(!r||r.endLineNumber>b.lineNumber)){if(r.endLineNumber<b.lineNumber)return r;if(!(r.endColumn>b.column))return r}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(b){if(this._decorations.length===0)return null;for(let S=0,C=this._decorations.length;S<C;S++){const r=this._decorations[S],u=this._editor.getModel().getDecorationRange(r);if(!(!u||u.startLineNumber<b.lineNumber)){if(u.startLineNumber>b.lineNumber)return u;if(!(u.startColumn<b.column))return u}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let b=[];return b=b.concat(this._decorations),b=b.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&b.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&b.push(this._rangeHighlightDecorationId),b}}e.FindDecorations=E,E._CURRENT_FIND_MATCH_DECORATION=R.ModelDecorationOptions.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:(0,k.themeColorFromId)(A.overviewRulerFindMatchForeground),position:p.OverviewRulerLane.Center},minimap:{color:(0,k.themeColorFromId)(A.minimapFindMatch),position:p.MinimapPosition.Inline}}),E._FIND_MATCH_DECORATION=R.ModelDecorationOptions.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:(0,k.themeColorFromId)(A.overviewRulerFindMatchForeground),position:p.OverviewRulerLane.Center},minimap:{color:(0,k.themeColorFromId)(A.minimapFindMatch),position:p.MinimapPosition.Inline}}),E._FIND_MATCH_NO_OVERVIEW_DECORATION=R.ModelDecorationOptions.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0}),E._FIND_MATCH_ONLY_OVERVIEW_DECORATION=R.ModelDecorationOptions.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:(0,k.themeColorFromId)(A.overviewRulerFindMatchForeground),position:p.OverviewRulerLane.Center}}),E._RANGE_HIGHLIGHT_DECORATION=R.ModelDecorationOptions.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),E._FIND_SCOPE_DECORATION=R.ModelDecorationOptions.register({description:"find-scope",className:"findScope",isWholeLine:!0})}),define(ae[310],le([1,0,16,11,2,361,50,20,85,370,826,1226,779,7]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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 u.RawContextKey("findWidgetVisible",!1),e.CONTEXT_FIND_WIDGET_NOT_VISIBLE=e.CONTEXT_FIND_WIDGET_VISIBLE.toNegated(),e.CONTEXT_FIND_INPUT_FOCUSED=new u.RawContextKey("findInputFocussed",!1),e.CONTEXT_REPLACE_INPUT_FOCUSED=new u.RawContextKey("replaceInputFocussed",!1),e.ToggleCaseSensitiveKeybinding={primary:545,mac:{primary:2593}},e.ToggleWholeWordKeybinding={primary:565,mac:{primary:2613}},e.ToggleRegexKeybinding={primary:560,mac:{primary:2608}},e.ToggleSearchScopeKeybinding={primary:554,mac:{primary:2602}},e.TogglePreserveCaseKeybinding={primary:558,mac:{primary:2606}},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 f{constructor(l,s){this._toDispose=new R.DisposableStore,this._editor=l,this._state=s,this._isDisposed=!1,this._startSearchingTimer=new p.TimeoutTimer,this._decorations=new S.FindDecorations(l),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new p.RunOnceScheduler(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(d=>{(d.reason===3||d.reason===5||d.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(d=>{this._ignoreModelContentChanged||(d.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,R.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,s){return s||l.getFullModelRange()}research(l,s){let d=null;typeof s<"u"?s!==null&&(Array.isArray(s)?d=s:d=[s]):d=this._decorations.getFindScopes(),d!==null&&(d=d.map(g=>{if(g.startLineNumber!==g.endLineNumber){let h=g.endLineNumber;return g.endColumn===1&&(h=h-1),new E.Range(g.startLineNumber,1,h,this._editor.getModel().getLineMaxColumn(h))}return g}));const n=this._findMatches(d,!1,e.MATCHES_LIMIT);this._decorations.set(n,d);const a=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(a);if(o===0&&n.length>0){const g=(0,t.findFirstInSorted)(n.map(h=>h.range),h=>E.Range.compareRangesUsingStarts(h,a)>=0);o=g>0?g-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),l&&this._editor.getOption(36).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const l=this._decorations.getFindScope();return l&&this._editor.revealRangeInCenterIfOutsideViewport(l,0),!0}return!1}_setCurrentFindMatch(l){const s=this._decorations.setCurrentFindMatch(l);this._state.changeMatchInfo(s,this._decorations.getCount(),l),this._editor.setSelection(l),this._editor.revealRangeInCenterIfOutsideViewport(l,0)}_prevSearchPosition(l){const s=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:d,column:n}=l;const a=this._editor.getModel();return s||n===1?(d===1?d=a.getLineCount():d--,n=a.getLineMaxColumn(d)):n--,new k.Position(d,n)}_moveToPrevMatch(l,s=!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;const d=this._decorations.getFindScope(),n=f._getSearchRange(this._editor.getModel(),d);n.getEndPosition().isBefore(l)&&(l=n.getEndPosition()),l.isBefore(n.getStartPosition())&&(l=n.getEndPosition());const{lineNumber:a,column:o}=l,g=this._editor.getModel();let h=new k.Position(a,o),v=g.findPreviousMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,!1);if(v&&v.range.isEmpty()&&v.range.getStartPosition().equals(h)&&(h=this._prevSearchPosition(h),v=g.findPreviousMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,!1)),!!v){if(!s&&!n.containsRange(v.range))return this._moveToPrevMatch(v.range.getStartPosition(),!0);this._setCurrentFindMatch(v.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(l){const s=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:d,column:n}=l;const a=this._editor.getModel();return s||n===a.getLineMaxColumn(d)?(d===a.getLineCount()?d=1:d++,n=1):n++,new k.Position(d,n)}_moveToNextMatch(l){if(!this._state.canNavigateForward()){const d=this._decorations.matchBeforePosition(l);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<e.MATCHES_LIMIT){let d=this._decorations.matchAfterPosition(l);d&&d.isEmpty()&&d.getStartPosition().equals(l)&&(l=this._nextSearchPosition(l),d=this._decorations.matchAfterPosition(l)),d&&this._setCurrentFindMatch(d);return}const s=this._getNextMatch(l,!1,!0);s&&this._setCurrentFindMatch(s.range)}_getNextMatch(l,s,d,n=!1){if(this._cannotFind())return null;const a=this._decorations.getFindScope(),o=f._getSearchRange(this._editor.getModel(),a);o.getEndPosition().isBefore(l)&&(l=o.getStartPosition()),l.isBefore(o.getStartPosition())&&(l=o.getStartPosition());const{lineNumber:g,column:h}=l,v=this._editor.getModel();let m=new k.Position(g,h),w=v.findNextMatch(this._state.searchString,m,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,s);return d&&w&&w.range.isEmpty()&&w.range.getStartPosition().equals(m)&&(m=this._nextSearchPosition(m),w=v.findNextMatch(this._state.searchString,m,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,s)),w?!n&&!o.containsRange(w.range)?this._getNextMatch(w.range.getEndPosition(),s,d,!0):w:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?(0,r.parseReplaceString)(this._state.replaceString):r.ReplacePattern.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;const l=this._getReplacePattern(),s=this._editor.getSelection(),d=this._getNextMatch(s.getStartPosition(),!0,!1);if(d)if(s.equalsRange(d.range)){const n=l.buildReplaceString(d.matches,this._state.preserveCase),a=new A.ReplaceCommand(s,n);this._executeEditorCommand("replace",a),this._decorations.setStartPosition(new k.Position(s.startLineNumber,s.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(d.range)}_findMatches(l,s,d){const n=(l||[null]).map(a=>f._getSearchRange(this._editor.getModel(),a));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null,s,d)}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 s=new b.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(119):null).parseSearchRequest();if(!s)return;let d=s.regex;if(!d.multiline){let w="mu";d.ignoreCase&&(w+="i"),d.global&&(w+="g"),d=new RegExp(d.source,w)}const n=this._editor.getModel(),a=n.getValue(1),o=n.getFullModelRange(),g=this._getReplacePattern();let h;const v=this._state.preserveCase;g.hasReplacementPatterns||v?h=a.replace(d,function(){return g.buildReplaceString(arguments,v)}):h=a.replace(d,g.buildReplaceString(null,v));const m=new A.ReplaceCommandThatPreservesSelection(o,h,this._editor.getSelection());this._executeEditorCommand("replaceAll",m)}_regularReplaceAll(l){const s=this._getReplacePattern(),d=this._findMatches(l,s.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let o=0,g=d.length;o<g;o++)n[o]=s.buildReplaceString(d[o].matches,this._state.preserveCase);const a=new C.ReplaceAllCommand(this._editor.getSelection(),d.map(o=>o.range),n);this._executeEditorCommand("replaceAll",a)}selectAllMatches(){if(!this._hasMatches())return;const l=this._decorations.getFindScopes();let d=this._findMatches(l,!1,1073741824).map(a=>new I.Selection(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn));const n=this._editor.getSelection();for(let a=0,o=d.length;a<o;a++)if(d[a].equalsRange(n)){d=[n].concat(d.slice(0,a)).concat(d.slice(a+1));break}this._editor.setSelections(d)}_executeEditorCommand(l,s){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(l,s),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}e.FindModelBoundToEditorModel=f}),define(ae[2209],le([1,0,10,756,140,11,310,33,12]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOptionsWidget=void 0;class b extends R.Widget{constructor(C,r,u,i){super(),this._hideSoon=this._register(new A.RunOnceScheduler(()=>this._hide(),2e3)),this._isVisible=!1,this._editor=C,this._state=r,this._keybindingService=u,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const f=i.getColorTheme().getColor(E.inputActiveOptionBorder),c=i.getColorTheme().getColor(E.inputActiveOptionForeground),l=i.getColorTheme().getColor(E.inputActiveOptionBackground);this.caseSensitive=this._register(new p.CaseSensitiveToggle({appendTitle:this._keybindingLabelFor(k.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:f,inputActiveOptionForeground:c,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 p.WholeWordsToggle({appendTitle:this._keybindingLabelFor(k.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:f,inputActiveOptionForeground:c,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 p.RegexToggle({appendTitle:this._keybindingLabelFor(k.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:f,inputActiveOptionForeground:c,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(s=>{let d=!1;s.isRegex&&(this.regex.checked=this._state.isRegex,d=!0),s.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,d=!0),s.matchCase&&(this.caseSensitive.checked=this._state.matchCase,d=!0),!this._state.isRevealed&&d&&this._revealTemporarily()})),this._register(t.addDisposableListener(this._domNode,t.EventType.MOUSE_LEAVE,s=>this._onMouseLeave())),this._register(t.addDisposableListener(this._domNode,"mouseover",s=>this._onMouseOver())),this._applyTheme(i.getColorTheme()),this._register(i.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(C){const r=this._keybindingService.lookupKeybinding(C);return r?` (${r.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return b.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){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){const r={inputActiveOptionBorder:C.getColor(E.inputActiveOptionBorder),inputActiveOptionForeground:C.getColor(E.inputActiveOptionForeground),inputActiveOptionBackground:C.getColor(E.inputActiveOptionBackground)};this.caseSensitive.style(r),this.wholeWords.style(r),this.regex.style(r)}}e.FindOptionsWidget=b,b.ID="editor.contrib.findOptionsWidget",(0,I.registerThemingParticipant)((S,C)=>{const r=S.getColor(E.editorWidgetBackground);r&&C.addRule(`.monaco-editor .findOptionsWidget { background-color: ${r}; }`);const u=S.getColor(E.editorWidgetForeground);u&&C.addRule(`.monaco-editor .findOptionsWidget { color: ${u}; }`);const i=S.getColor(E.widgetShadow);i&&C.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${i}; }`);const f=S.getColor(E.contrastBorder);f&&C.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${f}; }`)})}),define(ae[434],le([1,0,6,2,20,310]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=e.FindOptionOverride=void 0;var k;(function(b){b[b.NotSet=0]="NotSet",b[b.True=1]="True",b[b.False=2]="False"})(k=e.FindOptionOverride||(e.FindOptionOverride={}));function E(b,S){return b===1?!0:b===2?!1:S}class I extends p.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return E(this._isRegexOverride,this._isRegex)}get wholeWord(){return E(this._wholeWordOverride,this._wholeWord)}get matchCase(){return E(this._matchCaseOverride,this._matchCase)}get preserveCase(){return E(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}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}changeMatchInfo(S,C,r){const u={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};let i=!1;C===0&&(S=0),S>C&&(S=C),this._matchesPosition!==S&&(this._matchesPosition=S,u.matchesPosition=!0,i=!0),this._matchesCount!==C&&(this._matchesCount=C,u.matchesCount=!0,i=!0),typeof r<"u"&&(R.Range.equalsRange(this._currentMatch,r)||(this._currentMatch=r,u.currentMatch=!0,i=!0)),i&&this._onFindReplaceStateChange.fire(u)}change(S,C,r=!0){const u={moveCursor:C,updateHistory:r,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};let i=!1;const f=this.isRegex,c=this.wholeWord,l=this.matchCase,s=this.preserveCase;typeof S.searchString<"u"&&this._searchString!==S.searchString&&(this._searchString=S.searchString,u.searchString=!0,i=!0),typeof S.replaceString<"u"&&this._replaceString!==S.replaceString&&(this._replaceString=S.replaceString,u.replaceString=!0,i=!0),typeof S.isRevealed<"u"&&this._isRevealed!==S.isRevealed&&(this._isRevealed=S.isRevealed,u.isRevealed=!0,i=!0),typeof S.isReplaceRevealed<"u"&&this._isReplaceRevealed!==S.isReplaceRevealed&&(this._isReplaceRevealed=S.isReplaceRevealed,u.isReplaceRevealed=!0,i=!0),typeof S.isRegex<"u"&&(this._isRegex=S.isRegex),typeof S.wholeWord<"u"&&(this._wholeWord=S.wholeWord),typeof S.matchCase<"u"&&(this._matchCase=S.matchCase),typeof S.preserveCase<"u"&&(this._preserveCase=S.preserveCase),typeof S.searchScope<"u"&&(S.searchScope?.every(d=>this._searchScope?.some(n=>!R.Range.equalsRange(n,d)))||(this._searchScope=S.searchScope,u.searchScope=!0,i=!0)),typeof S.loop<"u"&&this._loop!==S.loop&&(this._loop=S.loop,u.loop=!0,i=!0),typeof S.isSearching<"u"&&this._isSearching!==S.isSearching&&(this._isSearching=S.isSearching,u.isSearching=!0,i=!0),typeof S.filters<"u"&&(this._filters?this._filters.update(S.filters):this._filters=S.filters,u.filters=!0,i=!0),this._isRegexOverride=typeof S.isRegexOverride<"u"?S.isRegexOverride:0,this._wholeWordOverride=typeof S.wholeWordOverride<"u"?S.wholeWordOverride:0,this._matchCaseOverride=typeof S.matchCaseOverride<"u"?S.matchCaseOverride:0,this._preserveCaseOverride=typeof S.preserveCaseOverride<"u"?S.preserveCaseOverride:0,f!==this.isRegex&&(i=!0,u.isRegex=!0),c!==this.wholeWord&&(i=!0,u.wholeWord=!0),l!==this.matchCase&&(i=!0,u.matchCase=!0),s!==this.preserveCase&&(i=!0,u.preserveCase=!0),i&&this._onFindReplaceStateChange.fire(u)}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(ae[510],le([1,0,10,110,197,278,140,11,29,21,2,14,28,20,310,1347,265,372,33,63,12,126,13,1082]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"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 g=(0,d.registerIcon)("find-selection",I.Codicon.selection,f.localize(0,null)),h=(0,d.registerIcon)("find-collapsed",I.Codicon.chevronRight,f.localize(1,null)),v=(0,d.registerIcon)("find-expanded",I.Codicon.chevronDown,f.localize(2,null));e.findReplaceIcon=(0,d.registerIcon)("find-replace",I.Codicon.replace,f.localize(3,null)),e.findReplaceAllIcon=(0,d.registerIcon)("find-replace-all",I.Codicon.replaceAll,f.localize(4,null)),e.findPreviousMatchIcon=(0,d.registerIcon)("find-previous-match",I.Codicon.arrowUp,f.localize(5,null)),e.findNextMatchIcon=(0,d.registerIcon)("find-next-match",I.Codicon.arrowDown,f.localize(6,null));const m=f.localize(7,null),w=f.localize(8,null),D=f.localize(9,null),y=f.localize(10,null),T=f.localize(11,null),_=f.localize(12,null),L=f.localize(13,null),M=f.localize(14,null),O=f.localize(15,null),N=f.localize(16,null),P=f.localize(17,null),B=f.localize(18,null,i.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=f.localize(19,null),e.NLS_NO_RESULTS=f.localize(20,null);const V=419,x=275-54;let H=69;const W=33,U="ctrlEnterReplaceAll.windows.donotask",$=C.isMacintosh?256:2048;class q{constructor(Y){this.afterLineNumber=Y,this.heightInPx=W,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=q;function X(K,Y,ee){const ie=!!Y.match(/\n/);if(ee&&ie&&ee.selectionStart>0){K.stopPropagation();return}}function G(K,Y,ee){const ie=!!Y.match(/\n/);if(ee&&ie&&ee.selectionEnd<ee.value.length){K.stopPropagation();return}}class Q extends k.Widget{constructor(Y,ee,ie,re,oe,se,te,Z,ne){super(),this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=Y,this._controller=ee,this._state=ie,this._contextViewProvider=re,this._keybindingService=oe,this._contextKeyService=se,this._storageService=Z,this._notificationService=ne,this._ctrlEnterReplaceAllWarningPrompted=!!Z.getBoolean(U,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new E.Delayer(500),this._register((0,S.toDisposable)(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(ce=>this._onStateChanged(ce))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(ce=>{if(ce.hasChanged(82)&&(this._codeEditor.getOption(82)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),ce.hasChanged(133)&&this._tryUpdateWidgetWidth(),ce.hasChanged(2)&&this.updateAccessibilitySupport(),ce.hasChanged(36)){const de=this._codeEditor.getOption(36).addExtraSpaceOnTop;de&&!this._viewZone&&(this._viewZone=new q(0),this._showViewZone()),!de&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(async()=>{if(this._isVisible){const ce=await this._controller.getGlobalBufferTerm();ce&&ce!==this._state.searchString&&(this._state.change({searchString:ce},!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(36).addExtraSpaceOnTop&&(this._viewZone=new q(0)),this._applyTheme(te.getColorTheme()),this._register(te.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(ce=>{if(ce.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Q.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(82)&&!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){const ee=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",ee),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,b.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=H+"px",this._state.matchesCount>=i.MATCHES_LIMIT?this._matchesCount.title=B:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let Y;if(this._state.matchesCount>0){let ee=String(this._state.matchesCount);this._state.matchesCount>=i.MATCHES_LIMIT&&(ee+="+");let ie=String(this._state.matchesPosition);ie==="0"&&(ie="?"),Y=r.format(e.NLS_MATCHES_LOCATION,ie,ee)}else Y=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(Y)),(0,p.alert)(this._getAriaLabel(Y,this._state.currentMatch,this._state.searchString)),H=Math.max(H,this._matchesCount.clientWidth)}_getAriaLabel(Y,ee,ie){if(Y===e.NLS_NO_RESULTS)return ie===""?f.localize(21,null,Y):f.localize(22,null,Y,ie);if(ee){const re=f.localize(23,null,Y,ie,ee.startLineNumber+":"+ee.startColumn),oe=this._codeEditor.getModel();return oe&&ee.startLineNumber<=oe.getLineCount()&&ee.startLineNumber>=1?`${oe.getLineContent(ee.startLineNumber)}, ${re}`:re}return f.localize(24,null,Y,ie)}_updateToggleSelectionFindButton(){const Y=this._codeEditor.getSelection(),ee=Y?Y.startLineNumber!==Y.endLineNumber||Y.startColumn!==Y.endColumn:!1,ie=this._toggleSelectionFind.checked;this._isVisible&&(ie||ee)?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);const Y=this._state.searchString.length>0,ee=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&Y&&ee&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&Y&&ee&&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);const ie=!this._codeEditor.getOption(82);this._toggleReplaceBtn.setEnabled(this._isVisible&&ie)}_reveal(){if(this._revealTimeouts.forEach(Y=>{clearTimeout(Y)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const Y=this._codeEditor.getSelection();switch(this._codeEditor.getOption(36).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const ie=!!Y&&Y.startLineNumber!==Y.endLineNumber;this._toggleSelectionFind.checked=ie;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 ee=!0;if(this._codeEditor.getOption(36).seedSearchStringFromSelection&&Y){const ie=this._codeEditor.getDomNode();if(ie){const re=t.getDomNodePagePosition(ie),oe=this._codeEditor.getScrolledVisiblePosition(Y.getStartPosition()),se=re.left+(oe?oe.left:0),te=oe?oe.top:0;if(this._viewZone&&te<this._viewZone.heightInPx){Y.endLineNumber>Y.startLineNumber&&(ee=!1);const Z=t.getTopLeftOffset(this._domNode).left;se>Z&&(ee=!1);const ne=this._codeEditor.getScrolledVisiblePosition(Y.getEndPosition());re.left+(ne?ne.left:0)>Z&&(ee=!1)}}}this._showViewZone(ee)}}_hide(Y){this._revealTimeouts.forEach(ee=>{clearTimeout(ee)}),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(36).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const ie=this._viewZone;this._viewZoneId!==void 0||!ie||this._codeEditor.changeViewZones(re=>{ie.heightInPx=this._getHeight(),this._viewZoneId=re.addZone(ie),this._codeEditor.setScrollTop(Y||this._codeEditor.getScrollTop()+ie.heightInPx)})}_showViewZone(Y=!0){if(!this._isVisible||!this._codeEditor.getOption(36).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new q(0));const ie=this._viewZone;this._codeEditor.changeViewZones(re=>{if(this._viewZoneId!==void 0){const oe=this._getHeight();if(oe===ie.heightInPx)return;const se=oe-ie.heightInPx;ie.heightInPx=oe,re.layoutZone(this._viewZoneId),Y&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+se);return}else{let oe=this._getHeight();if(oe-=this._codeEditor.getOption(76).top,oe<=0)return;ie.heightInPx=oe,this._viewZoneId=re.addZone(ie),Y&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+oe)}})}_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){const ee={inputActiveOptionBorder:Y.getColor(s.inputActiveOptionBorder),inputActiveOptionBackground:Y.getColor(s.inputActiveOptionBackground),inputActiveOptionForeground:Y.getColor(s.inputActiveOptionForeground),inputBackground:Y.getColor(s.inputBackground),inputForeground:Y.getColor(s.inputForeground),inputBorder:Y.getColor(s.inputBorder),inputValidationInfoBackground:Y.getColor(s.inputValidationInfoBackground),inputValidationInfoForeground:Y.getColor(s.inputValidationInfoForeground),inputValidationInfoBorder:Y.getColor(s.inputValidationInfoBorder),inputValidationWarningBackground:Y.getColor(s.inputValidationWarningBackground),inputValidationWarningForeground:Y.getColor(s.inputValidationWarningForeground),inputValidationWarningBorder:Y.getColor(s.inputValidationWarningBorder),inputValidationErrorBackground:Y.getColor(s.inputValidationErrorBackground),inputValidationErrorForeground:Y.getColor(s.inputValidationErrorForeground),inputValidationErrorBorder:Y.getColor(s.inputValidationErrorBorder)};this._findInput.style(ee),this._replaceInput.style(ee),this._toggleSelectionFind.style(ee)}_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 ie=Y.width,re=Y.minimap.minimapWidth;let oe=!1,se=!1,te=!1;if(this._resized&&t.getTotalWidth(this._domNode)>V){this._domNode.style.maxWidth=`${ie-28-re-15}px`,this._replaceInput.width=t.getTotalWidth(this._findInput.domNode);return}if(V+28+re>=ie&&(se=!0),V+28+re-H>=ie&&(te=!0),V+28+re-H>=ie+50&&(oe=!0),this._domNode.classList.toggle("collapsed-find-widget",oe),this._domNode.classList.toggle("narrow-find-widget",te),this._domNode.classList.toggle("reduced-find-widget",se),!te&&!oe&&(this._domNode.style.maxWidth=`${ie-28-re-15}px`),this._resized){this._findInput.inputBox.layout();const Z=this._findInput.inputBox.element.clientWidth;Z>0&&(this._replaceInput.width=Z)}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){const Y=this._codeEditor.getSelections();Y.map(ee=>{ee.endColumn===1&&ee.endLineNumber>ee.startLineNumber&&(ee=ee.setEndPosition(ee.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ee.endLineNumber-1)));const ie=this._state.currentMatch;return ee.startLineNumber!==ee.endLineNumber&&!u.Range.equalsRange(ee,ie)?ee:null}).filter(ee=>!!ee),Y.length&&this._state.change({searchScope:Y},!0)}}_onFindInputMouseDown(Y){Y.middleButton&&Y.stopPropagation()}_onFindInputKeyDown(Y){if(Y.equals($|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(2066)){this._codeEditor.focus(),Y.preventDefault();return}if(Y.equals(16))return X(Y,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(Y.equals(18))return G(Y,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(Y){if(Y.equals($|3))if(this._keybindingService.dispatchEvent(Y,Y.target)){Y.preventDefault();return}else{C.isWindows&&C.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(f.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(1026)){this._findInput.focus(),Y.preventDefault();return}if(Y.equals(2066)){this._codeEditor.focus(),Y.preventDefault();return}if(Y.equals(16))return X(Y,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(Y.equals(18))return G(Y,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(Y){return 0}_keybindingLabelFor(Y){const ee=this._keybindingService.lookupKeybinding(Y);return ee?` (${ee.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new c.ContextScopedFindInput(null,this._contextViewProvider,{width:x,label:m,placeholder:w,appendCaseSensitiveLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(i.FIND_IDS.ToggleRegexCommand),validation:Z=>{if(Z.length===0||!this._findInput.getRegex())return null;try{return new RegExp(Z,"gu"),null}catch(ne){return{content:ne.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,l.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(Z=>this._onFindInputKeyDown(Z))),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(Z=>{Z.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),Z.preventDefault())})),this._register(this._findInput.onRegexKeyDown(Z=>{Z.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),Z.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(Z=>{this._tryUpdateHeight()&&this._showViewZone()})),C.isLinux&&this._register(this._findInput.onMouseDown(Z=>this._onFindInputMouseDown(Z))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new j({label:D+this._keybindingLabelFor(i.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,o.assertIsDefined)(this._codeEditor.getAction(i.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,b.onUnexpectedError)}})),this._nextBtn=this._register(new j({label:y+this._keybindingLabelFor(i.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,o.assertIsDefined)(this._codeEditor.getAction(i.FIND_IDS.NextMatchFindAction)).run().then(void 0,b.onUnexpectedError)}}));const ie=document.createElement("div");ie.className="find-part",ie.appendChild(this._findInput.domNode);const re=document.createElement("div");re.className="find-actions",ie.appendChild(re),re.appendChild(this._matchesCount),re.appendChild(this._prevBtn.domNode),re.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new R.Toggle({icon:g,title:T+this._keybindingLabelFor(i.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const Z=this._codeEditor.getSelections();Z.map(ne=>(ne.endColumn===1&&ne.endLineNumber>ne.startLineNumber&&(ne=ne.setEndPosition(ne.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ne.endLineNumber-1))),ne.isEmpty()?null:ne)).filter(ne=>!!ne),Z.length&&this._state.change({searchScope:Z},!0)}}else this._state.change({searchScope:null},!0)})),re.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new j({label:_+this._keybindingLabelFor(i.FIND_IDS.CloseFindWidgetCommand),icon:d.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:Z=>{Z.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),Z.preventDefault())}})),re.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new c.ContextScopedReplaceInput(null,void 0,{label:L,placeholder:M,appendPreserveCaseLabel:this._keybindingLabelFor(i.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,l.showHistoryKeybindingHint)(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(Z=>this._onReplaceInputKeyDown(Z))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(Z=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(Z=>{Z.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(),Z.preventDefault())})),this._replaceBtn=this._register(new j({label:O+this._keybindingLabelFor(i.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:Z=>{Z.equals(1026)&&(this._closeBtn.focus(),Z.preventDefault())}})),this._replaceAllBtn=this._register(new j({label:N+this._keybindingLabelFor(i.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const oe=document.createElement("div");oe.className="replace-part",oe.appendChild(this._replaceInput.domNode);const se=document.createElement("div");se.className="replace-actions",oe.appendChild(se),se.appendChild(this._replaceBtn.domNode),se.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new j({label:P,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=`${V}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(ie),this._domNode.appendChild(oe),this._resizeSash=new A.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let te=V;this._register(this._resizeSash.onDidStart(()=>{te=t.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(Z=>{this._resized=!0;const ne=te+Z.startX-Z.currentX;if(ne<V)return;const ce=parseFloat(t.getComputedStyle(this._domNode).maxWidth)||0;ne>ce||(this._domNode.style.width=`${ne}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const Z=t.getTotalWidth(this._domNode);if(Z<V)return;let ne=V;if(!this._resized||Z===V){const ce=this._codeEditor.getLayoutInfo();ne=ce.width-28-ce.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${ne}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=Q,Q.ID="editor.contrib.findWidget";class j extends k.Widget{constructor(Y){super(),this._opts=Y;let ee="button";this._opts.className&&(ee=ee+" "+this._opts.className),this._opts.icon&&(ee=ee+" "+n.ThemeIcon.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=ee,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,ie=>{this._opts.onTrigger(),ie.preventDefault()}),this.onkeydown(this._domNode,ie=>{if(ie.equals(10)||ie.equals(3)){this._opts.onTrigger(),ie.preventDefault();return}this._opts.onKeyDown?.(ie)})}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(...n.ThemeIcon.asClassNameArray(h)),this._domNode.classList.add(...n.ThemeIcon.asClassNameArray(v))):(this._domNode.classList.remove(...n.ThemeIcon.asClassNameArray(v)),this._domNode.classList.add(...n.ThemeIcon.asClassNameArray(h)))}}e.SimpleButton=j,(0,n.registerThemingParticipant)((K,Y)=>{const ee=(me,Se)=>{Se&&Y.addRule(`.monaco-editor ${me} { background-color: ${Se}; }`)};ee(".findMatch",K.getColor(s.editorFindMatchHighlight)),ee(".currentFindMatch",K.getColor(s.editorFindMatch)),ee(".findScope",K.getColor(s.editorFindRangeHighlight));const ie=K.getColor(s.editorWidgetBackground);ee(".find-widget",ie);const re=K.getColor(s.widgetShadow);re&&Y.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${re}; }`);const oe=K.getColor(s.editorFindMatchHighlightBorder);oe&&Y.addRule(`.monaco-editor .findMatch { border: 1px ${(0,a.isHighContrast)(K.type)?"dotted":"solid"} ${oe}; box-sizing: border-box; }`);const se=K.getColor(s.editorFindMatchBorder);se&&Y.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${se}; padding: 1px; box-sizing: border-box; }`);const te=K.getColor(s.editorFindRangeHighlightBorder);te&&Y.addRule(`.monaco-editor .findScope { border: 1px ${(0,a.isHighContrast)(K.type)?"dashed":"solid"} ${te}; }`);const Z=K.getColor(s.contrastBorder);Z&&Y.addRule(`.monaco-editor .find-widget { border: 1px solid ${Z}; }`);const ne=K.getColor(s.editorWidgetForeground);ne&&Y.addRule(`.monaco-editor .find-widget { color: ${ne}; }`);const ce=K.getColor(s.errorForeground);ce&&Y.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${ce}; }`);const de=K.getColor(s.editorWidgetResizeBorder);if(de)Y.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${de}; }`);else{const me=K.getColor(s.editorWidgetBorder);me&&Y.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${me}; }`)}const he=K.getColor(s.toolbarHoverBackground);he&&Y.addRule(` .monaco-editor .find-widget .button:not(.disabled):hover, .monaco-editor .find-widget .codicon-find-selection:hover { background-color: ${he} !important; } `);const pe=K.getColor(s.focusBorder);pe&&Y.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${pe}; }`)})}),define(ae[2210],le([1,0,29,94,1349,63,12]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0,e.foldingExpandedIcon=(0,A.registerIcon)("folding-expanded",t.Codicon.chevronDown,(0,R.localize)(0,null)),e.foldingCollapsedIcon=(0,A.registerIcon)("folding-collapsed",t.Codicon.chevronRight,(0,R.localize)(1,null)),e.foldingManualCollapsedIcon=(0,A.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,R.localize)(2,null)),e.foldingManualExpandedIcon=(0,A.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,R.localize)(3,null));class E{constructor(b){this.editor=b,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(b,S,C){return S?E.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?b?this.showFoldingHighlights?E.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:E.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:E.NO_CONTROLS_EXPANDED_RANGE_DECORATION:b?C?this.showFoldingHighlights?E.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:E.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?E.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:E.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?C?E.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:E.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:C?E.MANUALLY_EXPANDED_VISUAL_DECORATION:E.EXPANDED_VISUAL_DECORATION}changeDecorations(b){return this.editor.changeDecorations(b)}removeDecorations(b){this.editor.removeDecorations(b)}}e.FoldingDecorationProvider=E,E.COLLAPSED_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),E.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),E.MANUALLY_COLLAPSED_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),E.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),E.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=p.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),E.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=p.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0}),E.EXPANDED_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+k.ThemeIcon.asClassName(e.foldingExpandedIcon)}),E.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingExpandedIcon)}),E.MANUALLY_EXPANDED_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+k.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),E.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=p.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:k.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),E.NO_CONTROLS_EXPANDED_RANGE_DECORATION=p.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),E.HIDDEN_RANGE_DECORATION=p.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(ae[511],le([1,0,11,21,99,2,28,13,483,40,59,92,122,1302,1303,1227,1348,7,33,12,2210,412,738,26,242,146,61,6,1083]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorFoldForeground=e.foldBackgroundBackground=e.FoldingController=void 0;const D=new l.RawContextKey("foldingEnabled",!1);let y=class Ln extends A.Disposable{static get(Y){return Y.getContribution(Ln.ID)}static setFoldingRangeProviderSelector(Y){return Ln._foldingRangeSelector=Y,{dispose:()=>{Ln._foldingRangeSelector=void 0}}}get foldingLimitInfo(){return this._foldingLimitInfo}constructor(Y,ee,ie,re,oe,se){super(),this.contextKeyService=ee,this.languageConfigurationService=ie,this.languageFeaturesService=se,this.localToDispose=this._register(new A.DisposableStore),this._onDidChangeFoldingLimit=new w.Emitter,this.onDidChangeFoldingLimit=this._onDidChangeFoldingLimit.event,this.editor=Y;const te=this.editor.getOptions();this._isEnabled=te.get(38),this._useFoldingProviders=te.get(39)!=="indentation",this._unfoldOnClickAfterEndOfLine=te.get(43),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=te.get(41),this._foldingLimitReporter={get limit(){return Y.getOptions().get(42)},report:Z=>{(!this._foldingLimitInfo||Z.limited!==this._foldingLimitInfo.limited)&&(this._foldingLimitInfo=Z,this._onDidChangeFoldingLimit.fire(Z))}},this.updateDebounceInfo=oe.for(se.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new n.FoldingDecorationProvider(Y),this.foldingDecorationProvider.showFoldingControls=te.get(100),this.foldingDecorationProvider.showFoldingHighlights=te.get(40),this.foldingEnabled=D.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(Z=>{if(Z.hasChanged(38)&&(this._isEnabled=this.editor.getOptions().get(38),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),Z.hasChanged(42)&&this.onModelChanged(),Z.hasChanged(100)||Z.hasChanged(40)){const ne=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=ne.get(100),this.foldingDecorationProvider.showFoldingHighlights=ne.get(40),this.triggerFoldingModelChanged()}Z.hasChanged(39)&&(this._useFoldingProviders=this.editor.getOptions().get(39)!=="indentation",this.onFoldingStrategyChanged()),Z.hasChanged(43)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(43)),Z.hasChanged(41)&&(this._foldingImportsByDefault=this.editor.getOptions().get(41))})),this.onModelChanged()}saveViewState(){const Y=this.editor.getModel();if(!Y||!this._isEnabled||Y.isTooLargeForTokenization())return{};if(this.foldingModel){const ee=this.foldingModel.getMemento(),ie=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:ee,lineCount:Y.getLineCount(),provider:ie,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(Y){const ee=this.editor.getModel();if(!(!ee||!this._isEnabled||ee.isTooLargeForTokenization()||!this.hiddenRangeModel)&&!!Y&&(this._currentModelHasFoldedImports=!!Y.foldedImports,Y.collapsedRegions&&Y.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(Y.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const Y=this.editor.getModel();!this._isEnabled||!Y||Y.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new u.FoldingModel(Y,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(ee=>this.onHiddenRangesChanges(ee))),this.updateScheduler=new t.Delayer(this.updateDebounceInfo.get(Y)),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(ee=>this.onDidChangeModelContent(ee))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(ee=>this.onEditorMouseDown(ee))),this.localToDispose.add(this.editor.onMouseUp(ee=>this.onEditorMouseUp(ee))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler?.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.rangeProvider?.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider?.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(Y){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new f.IndentRangeProvider(Y,this.languageConfigurationService,this._foldingLimitReporter),this._useFoldingProviders&&this.foldingModel){const ee=this.languageFeaturesService.foldingRangeProvider.ordered(this.foldingModel.textModel),ie=Ln._foldingRangeSelector?.(ee,Y)??ee;ie.length>0&&(this.rangeProvider=new o.SyntaxRangeProvider(Y,ie,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(Y){this.hiddenRangeModel?.notifyChangeModelContent(Y),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const Y=this.foldingModel;if(!Y)return null;const ee=new v.StopWatch(!0),ie=this.getRangeProvider(Y.textModel),re=this.foldingRegionPromise=(0,t.createCancelablePromise)(oe=>ie.compute(oe));return re.then(oe=>{if(oe&&re===this.foldingRegionPromise){let se;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const ce=oe.setCollapsedAllOfType(C.FoldingRangeKind.Imports.value,!0);ce&&(se=I.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=ce)}const te=this.editor.getSelections(),Z=te?te.map(ce=>ce.startLineNumber):[];Y.update(oe,Z),se?.restore(this.editor);const ne=this.updateDebounceInfo.update(Y.textModel,ee.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=ne)}return Y})}).then(void 0,Y=>((0,p.onUnexpectedError)(Y),null)))}onHiddenRangesChanges(Y){if(this.hiddenRangeModel&&Y.length&&!this._restoringViewState){const ee=this.editor.getSelections();ee&&this.hiddenRangeModel.adjustSelections(ee)&&this.editor.setSelections(ee)}this.editor.setHiddenAreas(Y,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const Y=this.getFoldingModel();!Y||Y.then(ee=>{if(ee){const ie=this.editor.getSelections();if(ie&&ie.length>0){const re=[];for(const oe of ie){const se=oe.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(se)&&re.push(...ee.getAllRegionsAtLine(se,te=>te.isCollapsed&&se>te.startLineNumber))}re.length&&(ee.toggleCollapseState(re),this.reveal(ie[0].getPosition()))}}}).then(void 0,p.onUnexpectedError)}onEditorMouseDown(Y){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!Y.target||!Y.target.range||!Y.event.leftButton&&!Y.event.middleButton)return;const ee=Y.target.range;let ie=!1;switch(Y.target.type){case 4:{const re=Y.target.detail,oe=Y.target.element.offsetLeft;if(re.offsetX-oe<5)return;ie=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!Y.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const re=this.editor.getModel();if(re&&ee.startColumn===re.getLineMaxColumn(ee.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:ee.startLineNumber,iconClicked:ie}}onEditorMouseUp(Y){const ee=this.foldingModel;if(!ee||!this.mouseDownInfo||!Y.target)return;const ie=this.mouseDownInfo.lineNumber,re=this.mouseDownInfo.iconClicked,oe=Y.target.range;if(!oe||oe.startLineNumber!==ie)return;if(re){if(Y.target.type!==4)return}else{const te=this.editor.getModel();if(!te||oe.startColumn!==te.getLineMaxColumn(ie))return}const se=ee.getRegionAtLine(ie);if(se&&se.startLineNumber===ie){const te=se.isCollapsed;if(re||te){const Z=Y.event.altKey;let ne=[];if(Z){const ce=he=>!he.containedBy(se)&&!se.containedBy(he),de=ee.getRegionsInside(null,ce);for(const he of de)he.isCollapsed&&ne.push(he);ne.length===0&&(ne=de)}else{const ce=Y.event.middleButton||Y.event.shiftKey;if(ce)for(const de of ee.getRegionsInside(se))de.isCollapsed===te&&ne.push(de);(te||!ce||ne.length===0)&&ne.push(se)}ee.toggleCollapseState(ne),this.reveal({lineNumber:ie,column:1})}}}reveal(Y){this.editor.revealPositionInCenterIfOutsideViewport(Y,0)}};y.ID="editor.contrib.folding",y=we([F(1,l.IContextKeyService),F(2,r.ILanguageConfigurationService),F(3,g.INotificationService),F(4,h.ILanguageFeatureDebounceService),F(5,m.ILanguageFeaturesService)],y),e.FoldingController=y;class T extends b.EditorAction{runEditorCommand(Y,ee,ie){const re=Y.get(r.ILanguageConfigurationService),oe=y.get(ee);if(!oe)return;const se=oe.getFoldingModel();if(se)return this.reportTelemetry(Y,ee),se.then(te=>{if(te){this.invoke(oe,te,ee,ie,re);const Z=ee.getSelection();Z&&oe.reveal(Z.getStartPosition())}})}getSelectedLines(Y){const ee=Y.getSelections();return ee?ee.map(ie=>ie.startLineNumber):[]}getLineNumbers(Y,ee){return Y&&Y.selectionLines?Y.selectionLines.map(ie=>ie+1):this.getSelectedLines(ee)}run(Y,ee){}}function _(K){if(!E.isUndefined(K)){if(!E.isObject(K))return!1;const Y=K;if(!E.isUndefined(Y.levels)&&!E.isNumber(Y.levels)||!E.isUndefined(Y.direction)&&!E.isString(Y.direction)||!E.isUndefined(Y.selectionLines)&&(!Array.isArray(Y.selectionLines)||!Y.selectionLines.every(E.isNumber)))return!1}return!0}class L extends T{constructor(){super({id:"editor.unfold",label:c.localize(0,null),alias:"Unfold",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3161,mac:{primary:2649},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:_,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Y,ee,ie,re){const oe=re&&re.levels||1,se=this.getLineNumbers(re,ie);re&&re.direction==="up"?(0,u.setCollapseStateLevelsUp)(ee,!1,oe,se):(0,u.setCollapseStateLevelsDown)(ee,!1,oe,se)}}class M extends T{constructor(){super({id:"editor.unfoldRecursively",label:c.localize(1,null),alias:"Unfold Recursively",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2137),weight:100}})}invoke(Y,ee,ie,re){(0,u.setCollapseStateLevelsDown)(ee,!1,Number.MAX_VALUE,this.getSelectedLines(ie))}}class O extends T{constructor(){super({id:"editor.fold",label:c.localize(2,null),alias:"Fold",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:3159,mac:{primary:2647},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:_,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(Y,ee,ie,re){const oe=this.getLineNumbers(re,ie),se=re&&re.levels,te=re&&re.direction;typeof se!="number"&&typeof te!="string"?(0,u.setCollapseStateUp)(ee,!0,oe):te==="up"?(0,u.setCollapseStateLevelsUp)(ee,!0,se||1,oe):(0,u.setCollapseStateLevelsDown)(ee,!0,se||1,oe)}}class N extends T{constructor(){super({id:"editor.toggleFold",label:c.localize(3,null),alias:"Toggle Fold",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2090),weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);(0,u.toggleCollapseState)(ee,1,re)}}class P extends T{constructor(){super({id:"editor.foldRecursively",label:c.localize(4,null),alias:"Fold Recursively",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2135),weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);(0,u.setCollapseStateLevelsDown)(ee,!0,Number.MAX_VALUE,re)}}class B extends T{constructor(){super({id:"editor.foldAllBlockComments",label:c.localize(5,null),alias:"Fold All Block Comments",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2133),weight:100}})}invoke(Y,ee,ie,re,oe){if(ee.regions.hasTypes())(0,u.setCollapseStateForType)(ee,C.FoldingRangeKind.Comment.value,!0);else{const se=ie.getModel();if(!se)return;const te=oe.getLanguageConfiguration(se.getLanguageId()).comments;if(te&&te.blockCommentStartToken){const Z=new RegExp("^\\s*"+(0,k.escapeRegExpCharacters)(te.blockCommentStartToken));(0,u.setCollapseStateForMatchingLines)(ee,Z,!0)}}}}class V extends T{constructor(){super({id:"editor.foldAllMarkerRegions",label:c.localize(6,null),alias:"Fold All Regions",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2077),weight:100}})}invoke(Y,ee,ie,re,oe){if(ee.regions.hasTypes())(0,u.setCollapseStateForType)(ee,C.FoldingRangeKind.Region.value,!0);else{const se=ie.getModel();if(!se)return;const te=oe.getLanguageConfiguration(se.getLanguageId()).foldingRules;if(te&&te.markers&&te.markers.start){const Z=new RegExp(te.markers.start);(0,u.setCollapseStateForMatchingLines)(ee,Z,!0)}}}}class z extends T{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:c.localize(7,null),alias:"Unfold All Regions",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2078),weight:100}})}invoke(Y,ee,ie,re,oe){if(ee.regions.hasTypes())(0,u.setCollapseStateForType)(ee,C.FoldingRangeKind.Region.value,!1);else{const se=ie.getModel();if(!se)return;const te=oe.getLanguageConfiguration(se.getLanguageId()).foldingRules;if(te&&te.markers&&te.markers.start){const Z=new RegExp(te.markers.start);(0,u.setCollapseStateForMatchingLines)(ee,Z,!1)}}}}class x extends T{constructor(){super({id:"editor.foldAllExcept",label:c.localize(8,null),alias:"Fold All Regions Except Selected",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2131),weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);(0,u.setCollapseStateForRest)(ee,!0,re)}}class H extends T{constructor(){super({id:"editor.unfoldAllExcept",label:c.localize(9,null),alias:"Unfold All Regions Except Selected",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2129),weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);(0,u.setCollapseStateForRest)(ee,!1,re)}}class W extends T{constructor(){super({id:"editor.foldAll",label:c.localize(10,null),alias:"Fold All",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2069),weight:100}})}invoke(Y,ee,ie){(0,u.setCollapseStateLevelsDown)(ee,!0)}}class U extends T{constructor(){super({id:"editor.unfoldAll",label:c.localize(11,null),alias:"Unfold All",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2088),weight:100}})}invoke(Y,ee,ie){(0,u.setCollapseStateLevelsDown)(ee,!1)}}class $ extends T{getFoldingLevel(){return parseInt(this.id.substr($.ID_PREFIX.length))}invoke(Y,ee,ie){(0,u.setCollapseStateAtLevel)(ee,this.getFoldingLevel(),!0,this.getSelectedLines(ie))}}$.ID_PREFIX="editor.foldLevel",$.ID=K=>$.ID_PREFIX+K;class q extends T{constructor(){super({id:"editor.gotoParentFold",label:c.localize(12,null),alias:"Go to Parent Fold",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);if(re.length>0){const oe=(0,u.getParentFoldLine)(re[0],ee);oe!==null&&ie.setSelection({startLineNumber:oe,startColumn:1,endLineNumber:oe,endColumn:1})}}}class X extends T{constructor(){super({id:"editor.gotoPreviousFold",label:c.localize(13,null),alias:"Go to Previous Folding Range",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);if(re.length>0){const oe=(0,u.getPreviousFoldLine)(re[0],ee);oe!==null&&ie.setSelection({startLineNumber:oe,startColumn:1,endLineNumber:oe,endColumn:1})}}}class G extends T{constructor(){super({id:"editor.gotoNextFold",label:c.localize(14,null),alias:"Go to Next Folding Range",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,weight:100}})}invoke(Y,ee,ie){const re=this.getSelectedLines(ie);if(re.length>0){const oe=(0,u.getNextFoldLine)(re[0],ee);oe!==null&&ie.setSelection({startLineNumber:oe,startColumn:1,endLineNumber:oe,endColumn:1})}}}class Q extends T{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:c.localize(15,null),alias:"Create Manual Folding Range from Selection",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2130),weight:100}})}invoke(Y,ee,ie){const re=[],oe=ie.getSelections();if(oe){for(const se of oe){let te=se.endLineNumber;se.endColumn===1&&--te,te>se.startLineNumber&&(re.push({startLineNumber:se.startLineNumber,endLineNumber:te,type:void 0,isCollapsed:!0,source:1}),ie.setSelection({startLineNumber:se.startLineNumber,startColumn:1,endLineNumber:se.startLineNumber,endColumn:1}))}if(re.length>0){re.sort((te,Z)=>te.startLineNumber-Z.startLineNumber);const se=a.FoldingRegions.sanitizeAndMerge(ee.regions,re,ie.getModel()?.getLineCount());ee.updatePost(a.FoldingRegions.fromFoldRanges(se))}}}}class j extends T{constructor(){super({id:"editor.removeManualFoldingRanges",label:c.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2132),weight:100}})}invoke(Y,ee,ie){const re=ie.getSelections();if(re){const oe=[];for(const se of re){const{startLineNumber:te,endLineNumber:Z}=se;oe.push(Z>=te?{startLineNumber:te,endLineNumber:Z}:{endLineNumber:Z,startLineNumber:te})}ee.removeManualRanges(oe),Y.triggerFoldingModelChanged()}}}(0,b.registerEditorContribution)(y.ID,y),(0,b.registerEditorAction)(L),(0,b.registerEditorAction)(M),(0,b.registerEditorAction)(O),(0,b.registerEditorAction)(P),(0,b.registerEditorAction)(W),(0,b.registerEditorAction)(U),(0,b.registerEditorAction)(B),(0,b.registerEditorAction)(V),(0,b.registerEditorAction)(z),(0,b.registerEditorAction)(x),(0,b.registerEditorAction)(H),(0,b.registerEditorAction)(N),(0,b.registerEditorAction)(q),(0,b.registerEditorAction)(X),(0,b.registerEditorAction)(G),(0,b.registerEditorAction)(Q),(0,b.registerEditorAction)(j);for(let K=1;K<=7;K++)(0,b.registerInstantiatedEditorAction)(new $({id:$.ID(K),label:c.localize(17,null,K),alias:`Fold Level ${K}`,precondition:D,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2048|21+K),weight:100}}));e.foldBackgroundBackground=(0,s.registerColor)("editor.foldBackground",{light:(0,s.transparent)(s.editorSelectionBackground,.3),dark:(0,s.transparent)(s.editorSelectionBackground,.3),hcDark:null,hcLight:null},c.localize(18,null),!0),e.editorFoldForeground=(0,s.registerColor)("editorGutter.foldingControlForeground",{dark:s.iconForeground,light:s.iconForeground,hcDark:s.iconForeground,hcLight:s.iconForeground},c.localize(19,null)),(0,d.registerThemingParticipant)((K,Y)=>{const ee=K.getColor(e.foldBackgroundBackground);ee&&Y.addRule(`.monaco-editor .folded-background { background-color: ${ee}; }`);const ie=K.getColor(e.editorFoldForeground);ie&&Y.addRule(` .monaco-editor .cldr${d.ThemeIcon.asCSSSelector(n.foldingExpandedIcon)}, .monaco-editor .cldr${d.ThemeIcon.asCSSSelector(n.foldingCollapsedIcon)}, .monaco-editor .cldr${d.ThemeIcon.asCSSSelector(n.foldingManualExpandedIcon)}, .monaco-editor .cldr${d.ThemeIcon.asCSSSelector(n.foldingManualCollapsedIcon)} { color: ${ie} !important; } `)})}),define(ae[2211],le([1,0,10,577,16,2,50,20,94,92,780,302,7,5,38,224,11,59]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContentHoverWidget=e.ContentHoverController=void 0;const s=t.$;let d=class gs extends A.Disposable{constructor(D,y,T){super(),this._editor=D,this._instantiationService=y,this._keybindingService=T,this._widget=this._register(this._instantiationService.createInstance(g,this._editor)),this._currentResult=null,this._participants=[];for(const _ of C.HoverParticipantRegistry.getAll())this._participants.push(this._instantiationService.createInstance(_,this._editor));this._participants.sort((_,L)=>_.hoverOrdinal-L.hoverOrdinal),this._computer=new v(this._editor,this._participants),this._hoverOperation=this._register(new S.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(_=>{if(!this._computer.anchor)return;const L=_.hasLoadingMessage?this._addLoadingMessage(_.value):_.value;this._withResult(new n(this._computer.anchor,L,_.isComplete))})),this._register(t.addStandardDisposableListener(this._widget.getDomNode(),"keydown",_=>{_.equals(9)&&this.hide()})),this._register(b.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._currentResult&&(this._widget.clear(),this._setCurrentResult(this._currentResult))}))}maybeShowAt(D){const y=[];for(const _ of this._participants)if(_.suggestHoverAnchor){const L=_.suggestHoverAnchor(D);L&&y.push(L)}const T=D.target;if(T.type===6&&y.push(new C.HoverRangeAnchor(0,T.range,D.event.posx,D.event.posy)),T.type===7){const _=this._editor.getOption(45).typicalHalfwidthCharacterWidth/2;!T.detail.isAfterLines&&typeof T.detail.horizontalDistanceToText=="number"&&T.detail.horizontalDistanceToText<_&&y.push(new C.HoverRangeAnchor(0,T.range,D.event.posx,D.event.posy))}return y.length===0?this._startShowingOrUpdateHover(null,0,0,!1,D):(y.sort((_,L)=>L.priority-_.priority),this._startShowingOrUpdateHover(y[0],0,0,!1,D))}startShowingAtRange(D,y,T,_){this._startShowingOrUpdateHover(new C.HoverRangeAnchor(0,D,void 0,void 0),y,T,_,null)}_startShowingOrUpdateHover(D,y,T,_,L){return!this._widget.position||!this._currentResult?D?(this._startHoverOperationIfNecessary(D,y,T,_,!1),!0):!1:this._editor.getOption(54).sticky&&L&&this._widget.isMouseGettingCloser(L.event.posx,L.event.posy)?(D&&this._startHoverOperationIfNecessary(D,y,T,_,!0),!0):D?D&&this._currentResult.anchor.equals(D)?!0:D.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(D)),this._startHoverOperationIfNecessary(D,y,T,_,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(D,y,T,_,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(D,y,T,_,L){this._computer.anchor&&this._computer.anchor.equals(D)||(this._hoverOperation.cancel(),this._computer.anchor=D,this._computer.shouldFocus=_,this._computer.source=T,this._computer.insistOnKeepingHoverVisible=L,this._hoverOperation.start(y))}_setCurrentResult(D){this._currentResult!==D&&(D&&D.messages.length===0&&(D=null),this._currentResult=D,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}isColorPickerVisible(){return this._widget.isColorPickerVisible}isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}containsNode(D){return this._widget.getDomNode().contains(D)}_addLoadingMessage(D){if(this._computer.anchor){for(const y of this._participants)if(y.createLoadingMessage){const T=y.createLoadingMessage(this._computer.anchor);if(T)return D.slice(0).concat([T])}}return D}_withResult(D){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!D.isComplete||this._computer.insistOnKeepingHoverVisible&&D.messages.length===0)||this._setCurrentResult(D)}_renderMessages(D,y){const{showAtPosition:T,showAtSecondaryPosition:_,highlightRange:L}=gs.computeHoverRanges(this._editor,D.range,y),M=new A.DisposableStore,O=M.add(new h(this._keybindingService)),N=document.createDocumentFragment();let P=null;const B={fragment:N,statusBar:O,setColorPicker:z=>P=z,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const z of this._participants){const x=y.filter(H=>H.owner===z);x.length>0&&M.add(z.renderHoverParts(B,x))}const V=y.some(z=>z.isBeforeContent);if(O.hasContent&&N.appendChild(O.hoverElement),N.hasChildNodes()){if(L){const z=this._editor.createDecorationsCollection();z.set([{range:L,options:gs._DECORATION_OPTIONS}]),M.add((0,A.toDisposable)(()=>{z.clear()}))}this._widget.showAt(N,new o(P,T,_,this._editor.getOption(54).above,this._computer.shouldFocus,this._computer.source,V,D.initialMousePosX,D.initialMousePosY,M))}else M.dispose()}static computeHoverRanges(D,y,T){let _=1;if(D.hasModel()){const P=D._getViewModel(),B=P.coordinatesConverter,V=B.convertModelRangeToViewRange(y),z=new k.Position(V.startLineNumber,P.getLineMinColumn(V.startLineNumber));_=B.convertViewPositionToModelPosition(z).column}const L=y.startLineNumber;let M=y.startColumn,O=T[0].range,N=null;for(const P of T)O=E.Range.plusRange(O,P.range),P.range.startLineNumber===L&&P.range.endLineNumber===L&&(M=Math.max(Math.min(M,P.range.startColumn),_)),P.forceShowAtRange&&(N=P.range);return{showAtPosition:N?N.getStartPosition():new k.Position(L,y.startColumn),showAtSecondaryPosition:N?N.getStartPosition():new k.Position(L,M),highlightRange:O}}};d._DECORATION_OPTIONS=I.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),d=we([F(1,u.IInstantiationService),F(2,i.IKeybindingService)],d),e.ContentHoverController=d;class n{constructor(D,y,T){this.anchor=D,this.messages=y,this.isComplete=T}filter(D){const y=this.messages.filter(T=>T.isValidForHoverAnchor(D));return y.length===this.messages.length?this:new a(this,this.anchor,y,this.isComplete)}}class a extends n{constructor(D,y,T,_){super(y,T,_),this.original=D}filter(D){return this.original.filter(D)}}class o{constructor(D,y,T,_,L,M,O,N,P,B){this.colorPicker=D,this.showAtPosition=y,this.showAtSecondaryPosition=T,this.preferAbove=_,this.stoleFocus=L,this.source=M,this.isBeforeContent=O,this.initialMousePosX=N,this.initialMousePosY=P,this.disposables=B,this.closestMouseDistance=void 0}}let g=class ra extends A.Disposable{get position(){return this._visibleData?.showAtPosition??null}get isColorPickerVisible(){return Boolean(this._visibleData?.colorPicker)}get isVisibleFromKeyboard(){return this._visibleData?.source===1}constructor(D,y){super(),this._editor=D,this._contextKeyService=y,this.allowEditorOverflow=!0,this._hoverVisibleKey=l.EditorContextKeys.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new p.HoverWidget),this._visibleData=null,this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(T=>{T.hasChanged(45)&&this._updateFont()})),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return ra.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let D=this._visibleData.preferAbove;!D&&this._contextKeyService.getContextKeyValue(f.Context.Visible.key)&&(D=!0);const y=this._visibleData.isBeforeContent?3:void 0;return{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,preference:D?[1,2]:[2,1],positionAffinity:y}}isMouseGettingCloser(D,y){if(!this._visibleData)return!1;if(typeof this._visibleData.initialMousePosX>"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=D,this._visibleData.initialMousePosY=y,!1;const T=t.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=m(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,T.left,T.top,T.width,T.height));const _=m(D,y,T.left,T.top,T.width,T.height);return _>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,_),!0)}_setVisibleData(D){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=D,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const D=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:y,lineHeight:T}=this._editor.getOption(45);this._hover.contentsDomNode.style.fontSize=`${y}px`,this._hover.contentsDomNode.style.lineHeight=`${T/y}`,this._hover.contentsDomNode.style.maxHeight=`${D}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(y=>this._editor.applyFontInfo(y))}showAt(D,y){this._setVisibleData(y),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(D),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this.onContentsChanged(),this._editor.render(),this.onContentsChanged(),y.stoleFocus&&this._hover.containerDomNode.focus(),y.colorPicker?.layout()}hide(){if(this._visibleData){const D=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),D&&this._editor.focus()}}onContentsChanged(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged();const D=this._hover.scrollbar.getScrollDimensions();if(D.scrollWidth>D.width){const T=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==T&&(this._hover.contentsDomNode.style.paddingBottom=T,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};g.ID="editor.contrib.contentHoverWidget",g=we([F(1,r.IContextKeyService)],g),e.ContentHoverWidget=g;let h=class extends A.Disposable{get hasContent(){return this._hasContent}constructor(D){super(),this._keybindingService=D,this._hasContent=!1,this.hoverElement=s("div.hover-row.status-bar"),this.actionsElement=t.append(this.hoverElement,s("div.actions"))}addAction(D){const y=this._keybindingService.lookupKeybinding(D.commandId),T=y?y.getLabel():null;return this._hasContent=!0,this._register(p.HoverAction.render(this.actionsElement,D,T))}append(D){const y=t.append(this.actionsElement,D);return this._hasContent=!0,y}};h=we([F(0,i.IKeybindingService)],h);class v{get anchor(){return this._anchor}set anchor(D){this._anchor=D}get shouldFocus(){return this._shouldFocus}set shouldFocus(D){this._shouldFocus=D}get source(){return this._source}set source(D){this._source=D}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(D){this._insistOnKeepingHoverVisible=D}constructor(D,y){this._editor=D,this._participants=y,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(D,y){if(y.type!==1)return[];const T=D.getModel(),_=y.range.startLineNumber;if(_>T.getLineCount())return[];const L=T.getLineMaxColumn(_);return D.getLineDecorations(_).filter(M=>{if(M.options.isWholeLine)return!0;const O=M.range.startLineNumber===_?M.range.startColumn:1,N=M.range.endLineNumber===_?M.range.endColumn:L;if(M.options.showIfCollapsed){if(O>y.range.startColumn+1||y.range.endColumn-1>N)return!1}else if(O>y.range.startColumn||y.range.endColumn>N)return!1;return!0})}computeAsync(D){const y=this._anchor;if(!this._editor.hasModel()||!y)return c.AsyncIterableObject.EMPTY;const T=v._getLineDecorations(this._editor,y);return c.AsyncIterableObject.merge(this._participants.map(_=>_.computeAsync?_.computeAsync(y,T,D):c.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const D=v._getLineDecorations(this._editor,this._anchor);let y=[];for(const T of this._participants)y=y.concat(T.computeSync(this._anchor,D));return(0,R.coalesce)(y)}}function m(w,D,y,T,_,L){const M=y+_/2,O=T+L/2,N=Math.max(Math.abs(w-M)-_/2,0),P=Math.max(Math.abs(D-O)-L/2,0);return Math.sqrt(N*N+P*P)}}),define(ae[2212],le([1,0,11,21,266,40,20,85,59,94,212,167,1365,12,1228]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let f=class fs{static get(d){return d.getContribution(fs.ID)}constructor(d,n){this.editor=d,this.editorWorkerService=n,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(d,n){this.currentRequest?.cancel();const a=this.editor.getSelection(),o=this.editor.getModel();if(!o||!a)return;let g=a;if(g.startLineNumber!==g.endLineNumber)return;const h=new R.EditorState(this.editor,5),v=o.uri;return this.editorWorkerService.canNavigateValueSet(v)?(this.currentRequest=(0,t.createCancelablePromise)(m=>this.editorWorkerService.navigateValueSet(v,g,n)),this.currentRequest.then(m=>{if(!m||!m.range||!m.value||!h.validate(this.editor))return;const w=k.Range.lift(m.range);let D=m.range;const y=m.value.length-(g.endColumn-g.startColumn);D={startLineNumber:D.startLineNumber,startColumn:D.startColumn,endLineNumber:D.endLineNumber,endColumn:D.startColumn+m.value.length},y>1&&(g=new E.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+y-1));const T=new i.InPlaceReplaceCommand(w,g,m.value);this.editor.pushUndoStop(),this.editor.executeCommand(d,T),this.editor.pushUndoStop(),this.decorations.set([{range:D,options:fs.DECORATION}]),this.decorationRemover?.cancel(),this.decorationRemover=(0,t.timeout)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(p.onUnexpectedError)}).catch(p.onUnexpectedError)):Promise.resolve(void 0)}};f.ID="editor.contrib.inPlaceReplaceController",f.DECORATION=b.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),f=we([F(1,S.IEditorWorkerService)],f);class c extends A.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:r.localize(0,null),alias:"Replace with Previous Value",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:3154,weight:100}})}run(d,n){const a=f.get(n);return a?a.run(this.id,!0):Promise.resolve(void 0)}}class l extends A.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:r.localize(1,null),alias:"Replace with Next Value",precondition:I.EditorContextKeys.writable,kbOpts:{kbExpr:I.EditorContextKeys.editorTextFocus,primary:3156,weight:100}})}run(d,n){const a=f.get(n);return a?a.run(this.id,!1):Promise.resolve(void 0)}}(0,A.registerEditorContribution)(f.ID,f),(0,A.registerEditorAction)(c),(0,A.registerEditorAction)(l),(0,u.registerThemingParticipant)((s,d)=>{const n=s.getColor(C.editorBracketMatchBorder);n&&d.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${n}; }`)})}),define(ae[2213],le([1,0,16,11,32,65,21,6,2,28,9,40,75,50,20,59,94,122,1372,7,33,12,61,242,146]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"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 d.RawContextKey("LinkedEditingInputVisible",!1);const v="linked-editing-decoration";let m=class ps extends I.Disposable{static get(_){return _.getContribution(ps.ID)}constructor(_,L,M,O,N){super(),this.languageConfigurationService=O,this._syncRangesToken=0,this._localToDispose=this._register(new I.DisposableStore),this._editor=_,this._providers=M.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(L),this._debounceInformation=N.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=this._editor.createDecorationsCollection(),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(P=>{(P.hasChanged(63)||P.hasChanged(83))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(_){const L=this._editor.getModel(),M=L!==null&&(this._editor.getOption(63)||this._editor.getOption(83))&&this._providers.has(L);if(M===this._enabled&&!_||(this._enabled=M,this.clearRanges(),this._localToDispose.clear(),!M||L===null))return;this._localToDispose.add(E.Event.runAndSubscribe(L.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(L.getLanguageId()).getWordDefinition()}));const O=new p.Delayer(this._debounceInformation.get(L)),N=()=>{this._rangeUpdateTriggerPromise=O.trigger(()=>this.updateRanges(),this._debounceDuration??this._debounceInformation.get(L))},P=new p.Delayer(0),B=V=>{this._rangeSyncTriggerPromise=P.trigger(()=>this._syncRanges(V))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{N()})),this._localToDispose.add(this._editor.onDidChangeModelContent(V=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const z=this._currentDecorations.getRange(0);if(z&&V.changes.every(x=>z.intersectRanges(x.range))){B(this._syncRangesToken);return}}N()})),this._localToDispose.add({dispose:()=>{O.dispose(),P.dispose()}}),this.updateRanges()}_syncRanges(_){if(!this._editor.hasModel()||_!==this._syncRangesToken||this._currentDecorations.length===0)return;const L=this._editor.getModel(),M=this._currentDecorations.getRange(0);if(!M||M.startLineNumber!==M.endLineNumber)return this.clearRanges();const O=L.getValueInRange(M);if(this._currentWordPattern){const P=O.match(this._currentWordPattern);if((P?P[0].length:0)!==O.length)return this.clearRanges()}const N=[];for(let P=1,B=this._currentDecorations.length;P<B;P++){const V=this._currentDecorations.getRange(P);if(!!V)if(V.startLineNumber!==V.endLineNumber)N.push({range:V,text:O});else{let z=L.getValueInRange(V),x=O,H=V.startColumn,W=V.endColumn;const U=b.commonPrefixLength(z,x);H+=U,z=z.substr(U),x=x.substr(U);const $=b.commonSuffixLength(z,x);W-=$,z=z.substr(0,z.length-$),x=x.substr(0,x.length-$),(H!==W||x.length!==0)&&N.push({range:new i.Range(V.startLineNumber,H,V.endLineNumber,W),text:x})}}if(N.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const P=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",N),this._editor._getViewModel().setPrevEditOperationType(P)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations.clear(),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(_=!1){if(!this._editor.hasModel()){this.clearRanges();return}const L=this._editor.getPosition();if(!this._enabled&&!_||this._editor.getSelections().length>1){this.clearRanges();return}const M=this._editor.getModel(),O=M.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===O){if(L.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const P=this._currentDecorations.getRange(0);if(P&&P.containsPosition(L))return}}this._currentRequestPosition=L,this._currentRequestModelVersion=O;const N=(0,p.createCancelablePromise)(async P=>{try{const B=new h.StopWatch(!1),V=await y(this._providers,M,L,P);if(this._debounceInformation.update(M,B.elapsed()),N!==this._currentRequest||(this._currentRequest=null,O!==M.getVersionId()))return;let z=[];V?.ranges&&(z=V.ranges),this._currentWordPattern=V?.wordPattern||this._languageWordPattern;let x=!1;for(let W=0,U=z.length;W<U;W++)if(i.Range.containsPosition(z[W],L)){if(x=!0,W!==0){const $=z[W];z.splice(W,1),z.unshift($)}break}if(!x){this.clearRanges();return}const H=z.map(W=>({range:W,options:ps.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(H),this._syncRangesToken++}catch(B){(0,k.isCancellationError)(B)||(0,k.onUnexpectedError)(B),(this._currentRequest===N||!this._currentRequest)&&this.clearRanges()}});return this._currentRequest=N,N}setDebounceDuration(_){this._debounceDuration=_}};m.ID="editor.contrib.linkedEditing",m.DECORATION=c.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:v}),m=we([F(1,d.IContextKeyService),F(2,o.ILanguageFeaturesService),F(3,l.ILanguageConfigurationService),F(4,g.ILanguageFeatureDebounceService)],m),e.LinkedEditingContribution=m;class w extends C.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:s.localize(0,null),alias:"Start Linked Editing",precondition:d.ContextKeyExpr.and(f.EditorContextKeys.writable,f.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(_,L){const M=_.get(r.ICodeEditorService),[O,N]=Array.isArray(L)&&L||[void 0,void 0];return S.URI.isUri(O)&&u.Position.isIPosition(N)?M.openCodeEditor({resource:O},M.getActiveCodeEditor()).then(P=>{!P||(P.setPosition(N),P.invokeWithinContext(B=>(this.reportTelemetry(B,P),this.run(B,P))))},k.onUnexpectedError):super.runCommand(_,L)}run(_,L){const M=m.get(L);return M?Promise.resolve(M.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=w;const D=C.EditorCommand.bindToContribution(m.get);(0,C.registerEditorCommand)(new D({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:T=>T.clearRanges(),kbOpts:{kbExpr:f.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function y(T,_,L,M){const O=T.ordered(_);return(0,p.first)(O.map(N=>async()=>{try{return await N.provideLinkedEditingRanges(_,L,M)}catch(P){(0,k.onUnexpectedExternalError)(P);return}}),N=>!!N&&t.isNonEmptyArray(N?.ranges))}e.editorLinkedEditingBackground=(0,n.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},s.localize(1,null)),(0,a.registerThemingParticipant)((T,_)=>{const L=T.getColor(e.editorLinkedEditingBackground);L&&_.addRule(`.monaco-editor .${v} { background: ${L}; border-left-color: ${L}; }`)}),(0,C.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(T,_,L)=>{const{linkedEditingRangeProvider:M}=T.get(o.ILanguageFeaturesService);return y(M,_,L,R.CancellationToken.None)}),(0,C.registerEditorContribution)(m.ID,m),(0,C.registerEditorAction)(w)}),define(ae[827],le([1,0,11,32,21,113,2,22,14,18,146,9,40,94,242,61,495,2084,1373,26,41,33,12,1088]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let g=class sa extends k.Disposable{static get(y){return y.getContribution(sa.ID)}constructor(y,T,_,L,M){super(),this.editor=y,this.openerService=T,this.notificationService=_,this.languageFeaturesService=L,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=M.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 O=this._register(new c.ClickLinkGesture(y));this._register(O.onMouseMoveOrRelevantKeyDown(([N,P])=>{this._onEditorMouseMove(N,P)})),this._register(O.onExecute(N=>{this.onEditorMouseUp(N)})),this._register(O.onCancel(N=>{this.cleanUpActiveLinkDecoration()})),this._register(y.onDidChangeConfiguration(N=>{!N.hasChanged(64)||(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(y.onDidChangeModelContent(N=>{!this.editor.hasModel()||this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(y.onDidChangeModel(N=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(y.onDidChangeModelLanguage(N=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(N=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}async computeLinksNow(){if(!this.editor.hasModel()||!this.editor.getOption(64))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 S.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,R.onUnexpectedError)(T)}finally{this.computePromise=null}}}updateDecorations(y){const T=this.editor.getOption(71)==="altKey",_=[],L=Object.keys(this.currentOccurrences);for(const O of L){const N=this.currentOccurrences[O];_.push(N.decorationId)}const M=[];if(y)for(const O of y)M.push(v.decoration(O,T));this.editor.changeDecorations(O=>{const N=O.deltaDecorations(_,M);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let P=0,B=N.length;P<B;P++){const V=new v(y[P],N[P]);this.currentOccurrences[V.decorationId]=V}})}_onEditorMouseMove(y,T){const _=this.editor.getOption(71)==="altKey";if(this.isEnabled(y,T)){this.cleanUpActiveLinkDecoration();const L=this.getLinkOccurrence(y.target.position);L&&this.editor.changeDecorations(M=>{L.activate(M,_),this.activeLinkDecorationId=L.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const y=this.editor.getOption(71)==="altKey";if(this.activeLinkDecorationId){const T=this.currentOccurrences[this.activeLinkDecorationId];T&&this.editor.changeDecorations(_=>{T.deactivate(_,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,_=!1){if(!this.openerService)return;const{link:L}=y;L.resolve(p.CancellationToken.None).then(M=>{if(typeof M=="string"&&this.editor.hasModel()){const O=this.editor.getModel().uri;if(O.scheme===E.Schemas.file&&M.startsWith(`${E.Schemas.file}:`)){const N=C.URI.parse(M);if(N.scheme===E.Schemas.file){const P=b.originalFSPath(N);let B=null;P.startsWith("/./")?B=`.${P.substr(1)}`:P.startsWith("//./")&&(B=`.${P.substr(2)}`),B&&(M=b.joinPath(O,B))}}}return this.openerService.open(M,{openToSide:T,fromUserGesture:_,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},M=>{const O=M instanceof Error?M.message:M;O==="invalid"?this.notificationService.warn(s.localize(0,null,L.url.toString())):O==="missing"?this.notificationService.warn(s.localize(1,null)):(0,R.onUnexpectedError)(M)})}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 _ of T){const L=this.currentOccurrences[_.id];if(L)return L}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()}};g.ID="editor.linkDetector",g=we([F(1,n.IOpenerService),F(2,d.INotificationService),F(3,f.ILanguageFeaturesService),F(4,i.ILanguageFeatureDebounceService)],g),e.LinkDetector=g;const h={general:u.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:u.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class v{static decoration(y,T){return{range:y.range,options:v._getOptions(y,T,!1)}}static _getOptions(y,T,_){const L={..._?h.active:h.general};return L.hoverMessage=m(y,T),L}constructor(y,T){this.link=y,this.decorationId=T}activate(y,T){y.changeDecorationOptions(this.decorationId,v._getOptions(this.link,T,!0))}deactivate(y,T){y.changeDecorationOptions(this.decorationId,v._getOptions(this.link,T,!1))}}function m(D,y){const T=D.url&&/^command:/i.test(D.url.toString()),_=D.tooltip?D.tooltip:T?s.localize(2,null):s.localize(3,null),L=y?I.isMacintosh?s.localize(4,null):s.localize(5,null):I.isMacintosh?s.localize(6,null):s.localize(7,null);if(D.url){let M="";if(/^command:/i.test(D.url.toString())){const N=D.url.toString().match(/^command:([^?#]+)/);if(N){const P=N[1];M=s.localize(8,null,P)}}return new A.MarkdownString("",!0).appendLink(D.url.toString(!0).replace(/ /g,"%20"),_,M).appendMarkdown(` (${L})`)}else return new A.MarkdownString().appendText(`${_} (${L})`)}class w extends r.EditorAction{constructor(){super({id:"editor.action.openLink",label:s.localize(9,null),alias:"Open Link",precondition:void 0})}run(y,T){const _=g.get(T);if(!_||!T.hasModel())return;const L=T.getSelections();for(const M of L){const O=_.getLinkOccurrence(M.getEndPosition());O&&_.openLinkOccurrence(O,!1)}}}(0,r.registerEditorContribution)(g.ID,g),(0,r.registerEditorAction)(w),(0,o.registerThemingParticipant)((D,y)=>{const T=D.getColor(a.editorActiveLinkForeground);T&&y.addRule(`.monaco-editor .detected-link-active { color: ${T} !important; }`)})}),define(ae[2214],le([1,0,2,61,375,32,11,6,16,88,511,18]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=e.StickyRange=void 0;class r{constructor(s,d){this.startLineNumber=s,this.endLineNumber=d}}e.StickyRange=r;class u{constructor(s,d,n){this.startLineNumber=s,this.endLineNumber=d,this.nestingDepth=n}}e.StickyLineCandidate=u;let i=class extends t.Disposable{constructor(s,d){super(),this._onDidChangeStickyScroll=this._store.add(new E.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._sessionStore=new t.DisposableStore,this._editor=s,this._languageFeaturesService=d,this._updateSoon=this._register(new k.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(105)&&this.readConfiguration()})),this.readConfiguration()}dispose(){super.dispose(),this._sessionStore.dispose()}readConfiguration(){if(this._editor.getOption(105).enabled===!1){this._sessionStore.clear();return}else this._sessionStore.add(this._editor.onDidChangeModel(()=>{this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this.update()})),this.update()}getVersionId(){return this._model?.version??-1}async update(){this._cts?.dispose(!0),this._cts=new A.CancellationTokenSource,await this.updateOutlineModel(this._cts.token),this._onDidChangeStickyScroll.fire()}async updateOutlineModel(s){if(!this._editor.hasModel())return;const d=this._editor.getModel(),n=d.getVersionId(),o=(this._model?!(0,C.isEqual)(this._model.uri,d.uri):!1)?setTimeout(()=>{s.isCancellationRequested||(this._model=new c(d.uri,d.getVersionId(),void 0,void 0),this._onDidChangeStickyScroll.fire())},75):void 0,g=await R.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,d,s);if(!s.isCancellationRequested){if(g.children.size!==0){const{stickyOutlineElement:h,providerID:v}=f.fromOutlineModel(g,this._model?.outlineProviderId);this._model=new c(d.uri,n,h,v)}else{const v=await S.FoldingController.get(this._editor)?.getFoldingModel();if(s.isCancellationRequested)return;if(v&&v.regions.length!==0){const m=f.fromFoldingModel(v);this._model=new c(d.uri,n,m,void 0)}else this._model=void 0}clearTimeout(o)}}updateIndex(s){return s===-1?s=0:s<0&&(s=-s-2),s}getCandidateStickyLinesIntersectingFromOutline(s,d,n,a,o){if(d.children.length===0)return;let g=o;const h=[];for(let w=0;w<d.children.length;w++){const D=d.children[w];D.range&&h.push(D.range.startLineNumber)}const v=this.updateIndex((0,I.binarySearch)(h,s.startLineNumber,(w,D)=>w-D)),m=this.updateIndex((0,I.binarySearch)(h,s.startLineNumber+a,(w,D)=>w-D));for(let w=v;w<=m;w++){const D=d.children[w];if(!D)return;if(D.range){const y=D.range.startLineNumber,T=D.range.endLineNumber;s.startLineNumber<=T+1&&y-1<=s.endLineNumber&&y!==g&&(g=y,n.push(new u(y,T-1,a+1)),this.getCandidateStickyLinesIntersectingFromOutline(s,D,n,a+1,y))}else this.getCandidateStickyLinesIntersectingFromOutline(s,D,n,a,o)}}getCandidateStickyLinesIntersecting(s){if(!this._model?.element)return[];let d=[];this.getCandidateStickyLinesIntersectingFromOutline(s,this._model.element,d,0,-1);const n=this._editor._getViewModel()?.getHiddenAreas();if(n)for(const a of n)d=d.filter(o=>!(o.startLineNumber>=a.startLineNumber&&o.endLineNumber<=a.endLineNumber+1));return d}};i.ID="store.contrib.stickyScrollController",i=we([F(1,p.ILanguageFeaturesService)],i),e.StickyLineCandidateProvider=i;class f{static comparator(s,d){return s.startLineNumber!==d.startLineNumber?s.startLineNumber-d.startLineNumber:d.endLineNumber-s.endLineNumber}static fromOutlineElement(s,d){const n=[];for(const o of s.children.values())if(o.symbol.selectionRange.startLineNumber!==o.symbol.range.endLineNumber)if(o.symbol.selectionRange.startLineNumber!==d)n.push(f.fromOutlineElement(o,o.symbol.selectionRange.startLineNumber));else for(const g of o.children.values())n.push(f.fromOutlineElement(g,o.symbol.selectionRange.startLineNumber));n.sort((o,g)=>this.comparator(o.range,g.range));const a=new r(s.symbol.selectionRange.startLineNumber,s.symbol.range.endLineNumber);return new f(a,n,void 0)}static fromOutlineModel(s,d){let n;if(b.Iterable.first(s.children.values())instanceof R.OutlineGroup){const h=b.Iterable.find(s.children.values(),v=>v.id===d);if(h)n=h.children;else{let v="",m=-1,w;for(const[D,y]of s.children.entries()){const T=f.findSumOfRangesOfGroup(y);T>m&&(w=y,m=T,v=y.id)}d=v,n=w.children}}else n=s.children;const a=[],o=Array.from(n.values()).sort((h,v)=>{const m=new r(h.symbol.range.startLineNumber,h.symbol.range.endLineNumber),w=new r(v.symbol.range.startLineNumber,v.symbol.range.endLineNumber);return this.comparator(m,w)});for(const h of o)a.push(f.fromOutlineElement(h,h.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new f(void 0,a,void 0),providerID:d}}static findSumOfRangesOfGroup(s){let d=0;for(const n of s.children.values())d+=this.findSumOfRangesOfGroup(n);return s instanceof R.OutlineElement?d+s.symbol.range.endLineNumber-s.symbol.selectionRange.startLineNumber:d}static fromFoldingModel(s){const d=s.regions,n=d.length;let a;const o=[],g=new f(void 0,[],void 0);let h=g;for(let v=0;v<n;v++){for(a=new r(d.getStartLineNumber(v),d.getEndLineNumber(v)+1);o.length!==0&&(a.startLineNumber<o[o.length-1].startLineNumber||a.endLineNumber>o[o.length-1].endLineNumber);)o.pop(),h.parent!==void 0&&(h=h.parent);const m=new f(a,[],h);h.children.push(m),h=m,o.push(a)}return g}constructor(s,d,n){this.range=s,this.children=d,this.parent=n}}class c{constructor(s,d,n,a){this.uri=s,this.version=d,this.element=n,this.outlineProviderId=a}}}),define(ae[2215],le([1,0,11,2,40,789,54,616,813,8,12,242,146,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class oa extends p.Disposable{static get(c){return c.getContribution(oa.ID)}constructor(c,l,s,d,n,a){super(),this._modelService=l,this._themeService=s,this._configurationService=d,this._editor=c,this._provider=a.documentRangeSemanticTokensProvider,this._debounceInformation=n.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new t.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const o=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{o()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),o()})),this._register(this._editor.onDidChangeModelContent(g=>{this._cancelAll(),o()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),o()})),this._register(this._configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(E.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),o())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),o()}))}_cancelAll(){for(const c of this._outstandingRequests)c.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(c){for(let l=0,s=this._outstandingRequests.length;l<s;l++)if(this._outstandingRequests[l]===c){this._outstandingRequests.splice(l,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const c=this._editor.getModel();if(c.tokenization.hasCompleteSemanticTokens())return;if(!(0,E.isSemanticColoringEnabled)(c,this._themeService,this._configurationService)){c.tokenization.hasSomeSemanticTokens()&&c.tokenization.setSemanticTokens(null,!1);return}if(!(0,A.hasDocumentRangeSemanticTokensProvider)(this._provider,c)){c.tokenization.hasSomeSemanticTokens()&&c.tokenization.setSemanticTokens(null,!1);return}const l=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(l.map(s=>this._requestRange(c,s)))}_requestRange(c,l){const s=c.getVersionId(),d=(0,t.createCancelablePromise)(a=>Promise.resolve((0,A.getDocumentRangeSemanticTokens)(this._provider,c,l,a))),n=new r.StopWatch(!1);return d.then(a=>{if(this._debounceInformation.update(c,n.elapsed()),!a||!a.tokens||c.isDisposed()||c.getVersionId()!==s)return;const{provider:o,tokens:g}=a,h=this._modelService.getSemanticTokensProviderStyling(o);c.tokenization.setPartialSemanticTokens(l,(0,I.toMultilineTokens2)(g,h,c.getLanguageId()))}).then(()=>this._removeOutstandingRequest(d),()=>this._removeOutstandingRequest(d)),d}};i.ID="editor.contrib.viewportSemanticTokens",i=we([F(1,k.IModelService),F(2,S.IThemeService),F(3,b.IConfigurationService),F(4,C.ILanguageFeatureDebounceService),F(5,u.ILanguageFeaturesService)],i),(0,R.registerEditorContribution)(i.ID,i)}),define(ae[2216],le([1,0,110,16,11,32,21,2,40,20,59,116,94,92,1399,7,33,12,61,126]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOccurrencesAtPosition=void 0;const n=(0,c.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},i.localize(0,null),!0),a=(0,c.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},i.localize(1,null),!0),o=(0,c.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:c.activeContrastBorder,hcLight:c.activeContrastBorder},i.localize(2,null)),g=(0,c.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:c.activeContrastBorder,hcLight:c.activeContrastBorder},i.localize(3,null)),h=(0,c.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},i.localize(4,null),!0),v=(0,c.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},i.localize(5,null),!0),m=new f.RawContextKey("hasWordHighlights",!1);function w(V,z,x,H){const W=V.ordered(z);return(0,R.first)(W.map(U=>()=>Promise.resolve(U.provideDocumentHighlights(z,x,H)).then(void 0,k.onUnexpectedExternalError)),p.isNonEmptyArray)}e.getOccurrencesAtPosition=w;class D{constructor(z,x,H){this._model=z,this._selection=x,this._wordSeparators=H,this._wordRange=this._getCurrentWordRange(z,x),this._result=null}get result(){return this._result||(this._result=(0,R.createCancelablePromise)(z=>this._compute(this._model,this._selection,this._wordSeparators,z))),this._result}_getCurrentWordRange(z,x){const H=z.getWordAtPosition(x.getPosition());return H?new b.Range(x.startLineNumber,H.startColumn,x.startLineNumber,H.endColumn):null}isValid(z,x,H){const W=x.startLineNumber,U=x.startColumn,$=x.endColumn,q=this._getCurrentWordRange(z,x);let X=Boolean(this._wordRange&&this._wordRange.equalsRange(q));for(let G=0,Q=H.length;!X&&G<Q;G++){const j=H.getRange(G);j&&j.startLineNumber===W&&j.startColumn<=U&&j.endColumn>=$&&(X=!0)}return X}cancel(){this.result.cancel()}}class y extends D{constructor(z,x,H,W){super(z,x,H),this._providers=W}_compute(z,x,H,W){return w(this._providers,z,x.getPosition(),W).then(U=>U||[])}}class T extends D{constructor(z,x,H){super(z,x,H),this._selectionIsEmpty=x.isEmpty()}_compute(z,x,H,W){return(0,R.timeout)(250,W).then(()=>{if(!x.isEmpty())return[];const U=z.getWordAtPosition(x.getPosition());return!U||U.word.length>1e3?[]:z.findMatches(U.word,!0,!1,!0,H,!1).map(q=>({range:q.range,kind:u.DocumentHighlightKind.Text}))})}isValid(z,x,H){const W=x.isEmpty();return this._selectionIsEmpty!==W?!1:super.isValid(z,x,H)}}function _(V,z,x,H){return V.has(z)?new y(z,x,H,V):new T(z,x,H)}(0,I.registerModelAndPositionCommand)("_executeDocumentHighlights",(V,z,x)=>{const H=V.get(s.ILanguageFeaturesService);return w(H.documentHighlightProvider,z,x,A.CancellationToken.None)});class L{constructor(z,x,H){this.toUnhook=new E.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=z,this.providers=x,this._hasWordHighlights=m.bindTo(H),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(73),this.model=this.editor.getModel(),this.toUnhook.add(z.onDidChangeCursorPosition(W=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(W)})),this.toUnhook.add(z.onDidChangeModelContent(W=>{this._stopAll()})),this.toUnhook.add(z.onDidChangeConfiguration(W=>{const U=this.editor.getOption(73);this.occurrencesHighlight!==U&&(this.occurrencesHighlight=U,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(b.Range.compareRangesUsingStarts)}moveNext(){const z=this._getSortedHighlights(),H=(z.findIndex(U=>U.containsPosition(this.editor.getPosition()))+1)%z.length,W=z[H];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(W.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(W);const U=this._getWord();if(U){const $=this.editor.getModel().getLineContent(W.startLineNumber);(0,t.alert)(`${$}, ${H+1} of ${z.length} for '${U.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const z=this._getSortedHighlights(),H=(z.findIndex(U=>U.containsPosition(this.editor.getPosition()))-1+z.length)%z.length,W=z[H];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(W.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(W);const U=this._getWord();if(U){const $=this.editor.getModel().getLineContent(W.startLineNumber);(0,t.alert)(`${$}, ${H+1} of ${z.length} for '${U.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),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(z){if(!this.occurrencesHighlight){this._stopAll();return}if(z.reason!==3){this._stopAll();return}this._run()}_getWord(){const z=this.editor.getSelection(),x=z.startLineNumber,H=z.startColumn;return this.model.getWordAtPosition({lineNumber:x,column:H})}_run(){const z=this.editor.getSelection();if(z.startLineNumber!==z.endLineNumber){this._stopAll();return}const x=z.startColumn,H=z.endColumn,W=this._getWord();if(!W||W.startColumn>x||W.endColumn<H){this._stopAll();return}const U=this.workerRequest&&this.workerRequest.isValid(this.model,z,this.decorations);if(this.lastCursorPositionChangeTime=new Date().getTime(),U)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();const $=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=_(this.providers,this.model,this.editor.getSelection(),this.editor.getOption(119)),this.workerRequest.result.then(q=>{$===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=q||[],this._beginRenderDecorations())},k.onUnexpectedError)}}_beginRenderDecorations(){const z=new Date().getTime(),x=this.lastCursorPositionChangeTime+250;z>=x?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},x-z)}renderDecorations(){this.renderDecorationsTimer=-1;const z=[];for(const x of this.workerRequestValue)x.range&&z.push({range:x.range,options:L._getDecorationOptions(x.kind)});this.decorations.set(z),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(z){return z===u.DocumentHighlightKind.Write?this._WRITE_OPTIONS:z===u.DocumentHighlightKind.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}L._WRITE_OPTIONS=r.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,l.themeColorFromId)(v),position:C.OverviewRulerLane.Center},minimap:{color:(0,l.themeColorFromId)(c.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline}}),L._TEXT_OPTIONS=r.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,l.themeColorFromId)(c.overviewRulerSelectionHighlightForeground),position:C.OverviewRulerLane.Center},minimap:{color:(0,l.themeColorFromId)(c.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline}}),L._REGULAR_OPTIONS=r.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,l.themeColorFromId)(h),position:C.OverviewRulerLane.Center},minimap:{color:(0,l.themeColorFromId)(c.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline}});let M=class aa extends E.Disposable{static get(z){return z.getContribution(aa.ID)}constructor(z,x,H){super(),this.wordHighlighter=null;const W=()=>{z.hasModel()&&(this.wordHighlighter=new L(z,H.documentHighlightProvider,x))};this._register(z.onDidChangeModel(U=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),W()})),W()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter?.moveNext()}moveBack(){this.wordHighlighter?.moveBack()}restoreViewState(z){this.wordHighlighter&&z&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};M.ID="editor.contrib.wordHighlighter",M=we([F(1,f.IContextKeyService),F(2,s.ILanguageFeaturesService)],M);class O extends I.EditorAction{constructor(z,x){super(x),this._isNext=z}run(z,x){const H=M.get(x);!H||(this._isNext?H.moveNext():H.moveBack())}}class N extends O{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:i.localize(6,null),alias:"Go to Next Symbol Highlight",precondition:m,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class P extends O{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:i.localize(7,null),alias:"Go to Previous Symbol Highlight",precondition:m,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class B extends I.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:i.localize(8,null),alias:"Trigger Symbol Highlight",precondition:m.toNegated(),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(z,x,H){const W=M.get(x);!W||W.restoreViewState(!0)}}(0,I.registerEditorContribution)(M.ID,M),(0,I.registerEditorAction)(N),(0,I.registerEditorAction)(P),(0,I.registerEditorAction)(B),(0,l.registerThemingParticipant)((V,z)=>{const x=V.getColor(c.editorSelectionHighlight);x&&(z.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${x}; }`),z.addRule(`.monaco-editor .selectionHighlight { background-color: ${x.transparent(.5)}; }`));const H=V.getColor(n);H&&z.addRule(`.monaco-editor .wordHighlight { background-color: ${H}; }`);const W=V.getColor(a);W&&z.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${W}; }`);const U=V.getColor(c.editorSelectionHighlightBorder);U&&z.addRule(`.monaco-editor .selectionHighlight { border: 1px ${(0,d.isHighContrast)(V.type)?"dotted":"solid"} ${U}; box-sizing: border-box; }`);const $=V.getColor(o);$&&z.addRule(`.monaco-editor .wordHighlight { border: 1px ${(0,d.isHighContrast)(V.type)?"dashed":"solid"} ${$}; box-sizing: border-box; }`);const q=V.getColor(g);q&&z.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${(0,d.isHighContrast)(V.type)?"dashed":"solid"} ${q}; box-sizing: border-box; }`)})}),define(ae[512],le([1,0,10,278,65,356,2,52,20,94,1098]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=e.ViewZoneDelegate=void 0;const S=new R.Color(new R.RGBA(0,122,204)),C={showArrow:!0,showFrame:!0,className:"",frameColor:S,arrowColor:S,keepEditorSelection:!1},r="vs.editor.contrib.zoneWidget";class u{constructor(s,d,n,a,o,g){this.id="",this.domNode=s,this.afterLineNumber=d,this.afterColumn=n,this.heightInLines=a,this._onDomNodeTop=o,this._onComputedHeight=g}onDomNodeTop(s){this._onDomNodeTop(s)}onComputedHeight(s){this._onComputedHeight(s)}}e.ViewZoneDelegate=u;class i{constructor(s,d){this._id=s,this._domNode=d}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=i;class f{constructor(s){this._editor=s,this._ruleName=f._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),t.removeCSSRulesContainingSelector(this._ruleName)}set color(s){this._color!==s&&(this._color=s,this._updateStyle())}set height(s){this._height!==s&&(this._height=s,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(s){s.column===1&&(s={lineNumber:s.lineNumber,column:2}),this._decorations.set([{range:I.Range.fromPositions(s),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}f._IdGenerator=new A.IdGenerator(".arrow-decoration-");class c{constructor(s,d={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new k.DisposableStore,this.container=null,this._isShowing=!1,this.editor=s,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=E.deepClone(d),E.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(n=>{const a=this._getWidth(n);this.domNode.style.width=a+"px",this.domNode.style.left=this._getLeft(n)+"px",this._onWidth(a)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(s=>{this._viewZone&&s.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),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 f(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(s){s.frameColor&&(this.options.frameColor=s.frameColor),s.arrowColor&&(this.options.arrowColor=s.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const s=this.options.frameColor.toString();this.container.style.borderTopColor=s,this.container.style.borderBottomColor=s}if(this._arrow&&this.options.arrowColor){const s=this.options.arrowColor.toString();this._arrow.color=s}}_getWidth(s){return s.width-s.minimap.minimapWidth-s.verticalScrollbarWidth}_getLeft(s){return s.minimap.minimapWidth>0&&s.minimap.minimapLeft===0?s.minimap.minimapWidth:0}_onViewZoneTop(s){this.domNode.style.top=s+"px"}_onViewZoneHeight(s){if(this.domNode.style.height=`${s}px`,this.container){const d=s-this._decoratingElementsHeight();this.container.style.height=`${d}px`;const n=this.editor.getLayoutInfo();this._doLayout(d,this._getWidth(n))}this._resizeSash?.layout()}get position(){const s=this._positionMarkerId.getRange(0);if(!!s)return s.getStartPosition()}show(s,d){const n=I.Range.isIRange(s)?I.Range.lift(s):I.Range.fromPositions(s);this._isShowing=!0,this._showImpl(n,d),this._isShowing=!1,this._positionMarkerId.set([{range:n,options:b.ModelDecorationOptions.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones(s=>{this._viewZone&&s.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow?.hide()}_decoratingElementsHeight(){const s=this.editor.getOption(60);let d=0;if(this.options.showArrow){const n=Math.round(s/3);d+=2*n}if(this.options.showFrame){const n=Math.round(s/9);d+=2*n}return d}_showImpl(s,d){const n=s.getStartPosition(),a=this.editor.getLayoutInfo(),o=this._getWidth(a);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(a)+"px";const g=document.createElement("div");g.style.overflow="hidden";const h=this.editor.getOption(60),v=Math.max(12,this.editor.getLayoutInfo().height/h*.8);d=Math.min(d,v);let m=0,w=0;if(this._arrow&&this.options.showArrow&&(m=Math.round(h/3),this._arrow.height=m,this._arrow.show(n)),this.options.showFrame&&(w=Math.round(h/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 u(g,n.lineNumber,n.column,d,_=>this._onViewZoneTop(_),_=>this._onViewZoneHeight(_)),this._viewZone.id=T.addZone(this._viewZone),this._overlayWidget=new i(r+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const T=this.options.frameWidth?this.options.frameWidth:w;this.container.style.borderTopWidth=T+"px",this.container.style.borderBottomWidth=T+"px"}const D=d*h-this._decoratingElementsHeight();this.container&&(this.container.style.top=m+"px",this.container.style.height=D+"px",this.container.style.overflow="hidden"),this._doLayout(D,o),this.options.keepEditorSelection||this.editor.setSelection(s);const y=this.editor.getModel();if(y){const T=s.endLineNumber+1;T<=y.getLineCount()?this.revealLine(T,!1):this.revealLine(y.getLineCount(),!0)}}revealLine(s,d){d?this.editor.revealLineInCenter(s,0):this.editor.revealLine(s,0)}setCssClass(s,d){!this.container||(d&&this.container.classList.remove(d),this.container.classList.add(s))}_onWidth(s){}_doLayout(s,d){}_relayout(s){this._viewZone&&this._viewZone.heightInLines!==s&&this.editor.changeViewZones(d=>{this._viewZone&&(this._viewZone.heightInLines=s,d.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new p.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let s;this._disposables.add(this._resizeSash.onDidStart(d=>{this._viewZone&&(s={startY:d.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{s=void 0})),this._disposables.add(this._resizeSash.onDidChange(d=>{if(s){const n=(d.currentY-s.startY)/this.editor.getOption(60),a=n<0?Math.ceil(n):Math.floor(n),o=s.heightInLines+a;o>5&&o<35&&this._relayout(o)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const s=this.editor.getLayoutInfo();return s.width-s.minimap.minimapWidth}}e.ZoneWidget=c}),define(ae[2217],le([1,0,21,2,22,68,1436,47,35,26,156]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const C=!1;function r(h){return h.scheme===R.Schemas.file?h.fsPath:h.path}let u=0;class i{constructor(v,m,w,D,y,T,_){this.id=++u,this.type=0,this.actual=v,this.label=v.label,this.confirmBeforeUndo=v.confirmBeforeUndo||!1,this.resourceLabel=m,this.strResource=w,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=D,this.groupOrder=y,this.sourceId=T,this.sourceOrder=_,this.isValid=!0}setValid(v){this.isValid=v}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}var f;(function(h){h[h.ExternalRemoval=0]="ExternalRemoval",h[h.NoParallelUniverses=1]="NoParallelUniverses"})(f||(f={}));class c{constructor(v,m){this.resourceLabel=v,this.reason=m}}class l{constructor(){this.elements=new Map}createMessage(){const v=[],m=[];for(const[,D]of this.elements)(D.reason===0?v:m).push(D.resourceLabel);const w=[];return v.length>0&&w.push(k.localize(0,null,v.join(", "))),m.length>0&&w.push(k.localize(1,null,m.join(", "))),w.join(` `)}get size(){return this.elements.size}has(v){return this.elements.has(v)}set(v,m){this.elements.set(v,m)}delete(v){return this.elements.delete(v)}}class s{constructor(v,m,w,D,y,T,_){this.id=++u,this.type=1,this.actual=v,this.label=v.label,this.confirmBeforeUndo=v.confirmBeforeUndo||!1,this.resourceLabels=m,this.strResources=w,this.groupId=D,this.groupOrder=y,this.sourceId=T,this.sourceOrder=_,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(v,m,w){this.removedResources||(this.removedResources=new l),this.removedResources.has(m)||this.removedResources.set(m,new c(v,w))}setValid(v,m,w){w?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 c(v,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class d{constructor(v,m){this.resourceLabel=v,this.strResource=m,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const v of this._past)v.type===1&&v.removeResource(this.resourceLabel,this.strResource,0);for(const v of this._future)v.type===1&&v.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const v=[];v.push(`* ${this.strResource}:`);for(let m=0;m<this._past.length;m++)v.push(` * [UNDO] ${this._past[m]}`);for(let m=this._future.length-1;m>=0;m--)v.push(` * [REDO] ${this._future[m]}`);return v.join(` `)}flushAllElements(){this._past=[],this._future=[],this.versionId++}setElementsIsValid(v){for(const m of this._past)m.type===1?m.setValid(this.resourceLabel,this.strResource,v):m.setValid(v);for(const m of this._future)m.type===1?m.setValid(this.resourceLabel,this.strResource,v):m.setValid(v)}_setElementValidFlag(v,m){v.type===1?v.setValid(this.resourceLabel,this.strResource,m):v.setValid(m)}setElementsValidFlag(v,m){for(const w of this._past)m(w.actual)&&this._setElementValidFlag(w,v);for(const w of this._future)m(w.actual)&&this._setElementValidFlag(w,v)}pushElement(v){for(const m of this._future)m.type===1&&m.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(v),this.versionId++}createSnapshot(v){const m=[];for(let w=0,D=this._past.length;w<D;w++)m.push(this._past[w].id);for(let w=this._future.length-1;w>=0;w--)m.push(this._future[w].id);return new S.ResourceEditStackSnapshot(v,m)}restoreSnapshot(v){const m=v.elements.length;let w=!0,D=0,y=-1;for(let _=0,L=this._past.length;_<L;_++,D++){const M=this._past[_];w&&(D>=m||M.id!==v.elements[D])&&(w=!1,y=0),!w&&M.type===1&&M.removeResource(this.resourceLabel,this.strResource,0)}let T=-1;for(let _=this._future.length-1;_>=0;_--,D++){const L=this._future[_];w&&(D>=m||L.id!==v.elements[D])&&(w=!1,T=_),!w&&L.type===1&&L.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 v=[],m=[];for(const w of this._past)v.push(w.actual);for(const w of this._future)m.push(w.actual);return{past:v,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(v,m){for(let w=this._past.length-1;w>=0;w--)if(this._past[w]===v){m.has(this.strResource)?this._past[w]=m.get(this.strResource):this._past.splice(w,1);break}this.versionId++}splitFutureWorkspaceElement(v,m){for(let w=this._future.length-1;w>=0;w--)if(this._future[w]===v){m.has(this.strResource)?this._future[w]=m.get(this.strResource):this._future.splice(w,1);break}this.versionId++}moveBackward(v){this._past.pop(),this._future.push(v),this.versionId++}moveForward(v){this._future.pop(),this._past.push(v),this.versionId++}}class n{constructor(v){this.editStacks=v,this._versionIds=[];for(let m=0,w=this.editStacks.length;m<w;m++)this._versionIds[m]=this.editStacks[m].versionId}isValid(){for(let v=0,m=this.editStacks.length;v<m;v++)if(this._versionIds[v]!==this.editStacks[v].versionId)return!1;return!0}}const a=new d("","");a.locked=!0;let o=class{constructor(v,m){this._dialogService=v,this._notificationService=m,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}registerUriComparisonKeyComputer(v,m){return this._uriComparisonKeyComputers.push([v,m]),{dispose:()=>{for(let w=0,D=this._uriComparisonKeyComputers.length;w<D;w++)if(this._uriComparisonKeyComputers[w][1]===m){this._uriComparisonKeyComputers.splice(w,1);return}}}}getUriComparisonKey(v){for(const m of this._uriComparisonKeyComputers)if(m[0]===v.scheme)return m[1].getComparisonKey(v);return v.toString()}_print(v){console.log("------------------------------------"),console.log(`AFTER ${v}: `);const m=[];for(const w of this._editStacks)m.push(w[1].toString());console.log(m.join(` `))}pushElement(v,m=S.UndoRedoGroup.None,w=S.UndoRedoSource.None){if(v.type===0){const D=r(v.resource),y=this.getUriComparisonKey(v.resource);this._pushElement(new i(v,D,y,m.id,m.nextOrder(),w.id,w.nextOrder()))}else{const D=new Set,y=[],T=[];for(const _ of v.resources){const L=r(_),M=this.getUriComparisonKey(_);D.has(M)||(D.add(M),y.push(L),T.push(M))}y.length===1?this._pushElement(new i(v,y[0],T[0],m.id,m.nextOrder(),w.id,w.nextOrder())):this._pushElement(new s(v,y,T,m.id,m.nextOrder(),w.id,w.nextOrder()))}C&&this._print("pushElement")}_pushElement(v){for(let m=0,w=v.strResources.length;m<w;m++){const D=v.resourceLabels[m],y=v.strResources[m];let T;this._editStacks.has(y)?T=this._editStacks.get(y):(T=new d(D,y),this._editStacks.set(y,T)),T.pushElement(v)}}getLastElement(v){const m=this.getUriComparisonKey(v);if(this._editStacks.has(m)){const w=this._editStacks.get(m);if(w.hasFutureElements())return null;const D=w.getClosestPastElement();return D?D.actual:null}return null}_splitPastWorkspaceElement(v,m){const w=v.actual.split(),D=new Map;for(const y of w){const T=r(y.resource),_=this.getUriComparisonKey(y.resource),L=new i(y,T,_,0,0,0,0);D.set(L.strResource,L)}for(const y of v.strResources){if(m&&m.has(y))continue;this._editStacks.get(y).splitPastWorkspaceElement(v,D)}}_splitFutureWorkspaceElement(v,m){const w=v.actual.split(),D=new Map;for(const y of w){const T=r(y.resource),_=this.getUriComparisonKey(y.resource),L=new i(y,T,_,0,0,0,0);D.set(L.strResource,L)}for(const y of v.strResources){if(m&&m.has(y))continue;this._editStacks.get(y).splitFutureWorkspaceElement(v,D)}}removeElements(v){const m=typeof v=="string"?v:this.getUriComparisonKey(v);this._editStacks.has(m)&&(this._editStacks.get(m).dispose(),this._editStacks.delete(m)),C&&this._print("removeElements")}setElementsValidFlag(v,m,w){const D=this.getUriComparisonKey(v);this._editStacks.has(D)&&this._editStacks.get(D).setElementsValidFlag(m,w),C&&this._print("setElementsValidFlag")}hasElements(v){const m=this.getUriComparisonKey(v);if(this._editStacks.has(m)){const w=this._editStacks.get(m);return w.hasPastElements()||w.hasFutureElements()}return!1}createSnapshot(v){const m=this.getUriComparisonKey(v);return this._editStacks.has(m)?this._editStacks.get(m).createSnapshot(v):new S.ResourceEditStackSnapshot(v,[])}restoreSnapshot(v){const m=this.getUriComparisonKey(v.resource);if(this._editStacks.has(m)){const w=this._editStacks.get(m);w.restoreSnapshot(v),!w.hasPastElements()&&!w.hasFutureElements()&&(w.dispose(),this._editStacks.delete(m))}C&&this._print("restoreSnapshot")}getElements(v){const m=this.getUriComparisonKey(v);return this._editStacks.has(m)?this._editStacks.get(m).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(v){if(!v)return[null,null];let m=null,w=null;for(const[D,y]of this._editStacks){const T=y.getClosestPastElement();!T||T.sourceId===v&&(!m||T.sourceOrder>m.sourceOrder)&&(m=T,w=D)}return[m,w]}canUndo(v){if(v instanceof S.UndoRedoSource){const[,w]=this._findClosestUndoElementWithSource(v.id);return!!w}const m=this.getUriComparisonKey(v);return this._editStacks.has(m)?this._editStacks.get(m).hasPastElements():!1}_onError(v,m){(0,t.onUnexpectedError)(v);for(const w of m.strResources)this.removeElements(w);this._notificationService.error(v)}_acquireLocks(v){for(const m of v.editStacks)if(m.locked)throw new Error("Cannot acquire edit stack lock");for(const m of v.editStacks)m.locked=!0;return()=>{for(const m of v.editStacks)m.locked=!1}}_safeInvokeWithLocks(v,m,w,D,y){const T=this._acquireLocks(w);let _;try{_=m()}catch(L){return T(),D.dispose(),this._onError(L,v)}return _?_.then(()=>(T(),D.dispose(),y()),L=>(T(),D.dispose(),this._onError(L,v))):(T(),D.dispose(),y())}async _invokeWorkspacePrepare(v){if(typeof v.actual.prepareUndoRedo>"u")return p.Disposable.None;const m=v.actual.prepareUndoRedo();return typeof m>"u"?p.Disposable.None:m}_invokeResourcePrepare(v,m){if(v.actual.type!==1||typeof v.actual.prepareUndoRedo>"u")return m(p.Disposable.None);const w=v.actual.prepareUndoRedo();return w?(0,p.isDisposable)(w)?m(w):w.then(D=>m(D)):m(p.Disposable.None)}_getAffectedEditStacks(v){const m=[];for(const w of v.strResources)m.push(this._editStacks.get(w)||a);return new n(m)}_tryToSplitAndUndo(v,m,w,D){if(m.canSplit())return this._splitPastWorkspaceElement(m,w),this._notificationService.warn(D),new g(this._undo(v,0,!0));for(const y of m.strResources)this.removeElements(y);return this._notificationService.warn(D),new g}_checkWorkspaceUndo(v,m,w,D){if(m.removedResources)return this._tryToSplitAndUndo(v,m,m.removedResources,k.localize(2,null,m.label,m.removedResources.createMessage()));if(D&&m.invalidatedResources)return this._tryToSplitAndUndo(v,m,m.invalidatedResources,k.localize(3,null,m.label,m.invalidatedResources.createMessage()));const y=[];for(const _ of w.editStacks)_.getClosestPastElement()!==m&&y.push(_.resourceLabel);if(y.length>0)return this._tryToSplitAndUndo(v,m,null,k.localize(4,null,m.label,y.join(", ")));const T=[];for(const _ of w.editStacks)_.locked&&T.push(_.resourceLabel);return T.length>0?this._tryToSplitAndUndo(v,m,null,k.localize(5,null,m.label,T.join(", "))):w.isValid()?null:this._tryToSplitAndUndo(v,m,null,k.localize(6,null,m.label))}_workspaceUndo(v,m,w){const D=this._getAffectedEditStacks(m),y=this._checkWorkspaceUndo(v,m,D,!1);return y?y.returnValue:this._confirmAndExecuteWorkspaceUndo(v,m,D,w)}_isPartOfUndoGroup(v){if(!v.groupId)return!1;for(const[,m]of this._editStacks){const w=m.getClosestPastElement();if(!!w){if(w===v){const D=m.getSecondClosestPastElement();if(D&&D.groupId===v.groupId)return!0}if(w.groupId===v.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(v,m,w,D){if(m.canSplit()&&!this._isPartOfUndoGroup(m)){const _=await this._dialogService.show(A.default.Info,k.localize(7,null,m.label),[k.localize(8,null,w.editStacks.length),k.localize(9,null),k.localize(10,null)],{cancelId:2});if(_.choice===2)return;if(_.choice===1)return this._splitPastWorkspaceElement(m,null),this._undo(v,0,!0);const L=this._checkWorkspaceUndo(v,m,w,!1);if(L)return L.returnValue;D=!0}let y;try{y=await this._invokeWorkspacePrepare(m)}catch(_){return this._onError(_,m)}const T=this._checkWorkspaceUndo(v,m,w,!0);if(T)return y.dispose(),T.returnValue;for(const _ of w.editStacks)_.moveBackward(m);return this._safeInvokeWithLocks(m,()=>m.actual.undo(),w,y,()=>this._continueUndoInGroup(m.groupId,D))}_resourceUndo(v,m,w){if(!m.isValid){v.flushAllElements();return}if(v.locked){const D=k.localize(11,null,m.label);this._notificationService.warn(D);return}return this._invokeResourcePrepare(m,D=>(v.moveBackward(m),this._safeInvokeWithLocks(m,()=>m.actual.undo(),new n([v]),D,()=>this._continueUndoInGroup(m.groupId,w))))}_findClosestUndoElementInGroup(v){if(!v)return[null,null];let m=null,w=null;for(const[D,y]of this._editStacks){const T=y.getClosestPastElement();!T||T.groupId===v&&(!m||T.groupOrder>m.groupOrder)&&(m=T,w=D)}return[m,w]}_continueUndoInGroup(v,m){if(!v)return;const[,w]=this._findClosestUndoElementInGroup(v);if(w)return this._undo(w,0,m)}undo(v){if(v instanceof S.UndoRedoSource){const[,m]=this._findClosestUndoElementWithSource(v.id);return m?this._undo(m,v.id,!1):void 0}return typeof v=="string"?this._undo(v,0,!1):this._undo(this.getUriComparisonKey(v),0,!1)}_undo(v,m=0,w){if(!this._editStacks.has(v))return;const D=this._editStacks.get(v),y=D.getClosestPastElement();if(!y)return;if(y.groupId){const[_,L]=this._findClosestUndoElementInGroup(y.groupId);if(y!==_&&L)return this._undo(L,m,w)}if((y.sourceId!==m||y.confirmBeforeUndo)&&!w)return this._confirmAndContinueUndo(v,m,y);try{return y.type===1?this._workspaceUndo(v,y,w):this._resourceUndo(D,y,w)}finally{C&&this._print("undo")}}async _confirmAndContinueUndo(v,m,w){if((await this._dialogService.show(A.default.Info,k.localize(12,null,w.label),[k.localize(13,null),k.localize(14,null)],{cancelId:1})).choice!==1)return this._undo(v,m,!0)}_findClosestRedoElementWithSource(v){if(!v)return[null,null];let m=null,w=null;for(const[D,y]of this._editStacks){const T=y.getClosestFutureElement();!T||T.sourceId===v&&(!m||T.sourceOrder<m.sourceOrder)&&(m=T,w=D)}return[m,w]}canRedo(v){if(v instanceof S.UndoRedoSource){const[,w]=this._findClosestRedoElementWithSource(v.id);return!!w}const m=this.getUriComparisonKey(v);return this._editStacks.has(m)?this._editStacks.get(m).hasFutureElements():!1}_tryToSplitAndRedo(v,m,w,D){if(m.canSplit())return this._splitFutureWorkspaceElement(m,w),this._notificationService.warn(D),new g(this._redo(v));for(const y of m.strResources)this.removeElements(y);return this._notificationService.warn(D),new g}_checkWorkspaceRedo(v,m,w,D){if(m.removedResources)return this._tryToSplitAndRedo(v,m,m.removedResources,k.localize(15,null,m.label,m.removedResources.createMessage()));if(D&&m.invalidatedResources)return this._tryToSplitAndRedo(v,m,m.invalidatedResources,k.localize(16,null,m.label,m.invalidatedResources.createMessage()));const y=[];for(const _ of w.editStacks)_.getClosestFutureElement()!==m&&y.push(_.resourceLabel);if(y.length>0)return this._tryToSplitAndRedo(v,m,null,k.localize(17,null,m.label,y.join(", ")));const T=[];for(const _ of w.editStacks)_.locked&&T.push(_.resourceLabel);return T.length>0?this._tryToSplitAndRedo(v,m,null,k.localize(18,null,m.label,T.join(", "))):w.isValid()?null:this._tryToSplitAndRedo(v,m,null,k.localize(19,null,m.label))}_workspaceRedo(v,m){const w=this._getAffectedEditStacks(m),D=this._checkWorkspaceRedo(v,m,w,!1);return D?D.returnValue:this._executeWorkspaceRedo(v,m,w)}async _executeWorkspaceRedo(v,m,w){let D;try{D=await this._invokeWorkspacePrepare(m)}catch(T){return this._onError(T,m)}const y=this._checkWorkspaceRedo(v,m,w,!0);if(y)return D.dispose(),y.returnValue;for(const T of w.editStacks)T.moveForward(m);return this._safeInvokeWithLocks(m,()=>m.actual.redo(),w,D,()=>this._continueRedoInGroup(m.groupId))}_resourceRedo(v,m){if(!m.isValid){v.flushAllElements();return}if(v.locked){const w=k.localize(20,null,m.label);this._notificationService.warn(w);return}return this._invokeResourcePrepare(m,w=>(v.moveForward(m),this._safeInvokeWithLocks(m,()=>m.actual.redo(),new n([v]),w,()=>this._continueRedoInGroup(m.groupId))))}_findClosestRedoElementInGroup(v){if(!v)return[null,null];let m=null,w=null;for(const[D,y]of this._editStacks){const T=y.getClosestFutureElement();!T||T.groupId===v&&(!m||T.groupOrder<m.groupOrder)&&(m=T,w=D)}return[m,w]}_continueRedoInGroup(v){if(!v)return;const[,m]=this._findClosestRedoElementInGroup(v);if(m)return this._redo(m)}redo(v){if(v instanceof S.UndoRedoSource){const[,m]=this._findClosestRedoElementWithSource(v.id);return m?this._redo(m):void 0}return typeof v=="string"?this._redo(v):this._redo(this.getUriComparisonKey(v))}_redo(v){if(!this._editStacks.has(v))return;const m=this._editStacks.get(v),w=m.getClosestFutureElement();if(!!w){if(w.groupId){const[D,y]=this._findClosestRedoElementInGroup(w.groupId);if(w!==D&&y)return this._redo(y)}try{return w.type===1?this._workspaceRedo(v,w):this._resourceRedo(m,w)}finally{C&&this._print("redo")}}}};o=we([F(0,E.IDialogService),F(1,b.INotificationService)],o),e.UndoRedoService=o;class g{constructor(v){this.returnValue=v}}(0,I.registerSingleton)(S.IUndoRedoService,o,1)}),define(ae[283],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUpdateService=e.State=e.UpdateType=e.StateType=void 0;var p;(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"})(p=e.StateType||(e.StateType={}));var R;(function(A){A[A.Setup=0]="Setup",A[A.Archive=1]="Archive",A[A.Snap=2]="Snap"})(R=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(ae[2218],le([1,0,14,1437,55,17]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),A.Registry.as(R.Extensions.Configuration).registerConfiguration({id:"update",order:15,title:(0,p.localize)(0,null),type:"object",properties:{"update.mode":{type:"string",enum:["none","manual","start","default"],default:"default",scope:1,description:(0,p.localize)(1,null),tags:["usesOnlineServices"],enumDescriptions:[(0,p.localize)(2,null),(0,p.localize)(3,null),(0,p.localize)(4,null),(0,p.localize)(5,null)],policy:{name:"UpdateMode",minimumVersion:"1.67"}},"update.channel":{type:"string",default:"default",scope:1,description:(0,p.localize)(6,null),deprecationMessage:(0,p.localize)(7,null,"update.mode")},"update.enableWindowsBackgroundUpdates":{type:"boolean",default:!0,scope:1,title:(0,p.localize)(8,null),description:(0,p.localize)(9,null),included:t.isWindows&&!t.isWeb},"update.showReleaseNotes":{type:"boolean",default:!0,scope:1,description:(0,p.localize)(10,null),tags:["usesOnlineServices"]}}})}),define(ae[2219],le([1,0,6,283]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateChannelClient=e.UpdateChannel=void 0;class R{constructor(E){this.service=E}listen(E,I){switch(I){case"onStateChange":return this.service.onStateChange}throw new Error(`Event not found: ${I}`)}call(E,I,b){switch(I){case"checkForUpdates":return this.service.checkForUpdates(b);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();case"_applySpecificUpdate":return this.service._applySpecificUpdate(b)}throw new Error(`Call not found: ${I}`)}}e.UpdateChannel=R;class A{get state(){return this._state}set state(E){this._state=E,this._onStateChange.fire(E)}constructor(E){this.channel=E,this._onStateChange=new t.Emitter,this.onStateChange=this._onStateChange.event,this._state=p.State.Uninitialized,this.channel.listen("onStateChange")(I=>this.state=I),this.channel.call("_getInitialState").then(I=>this.state=I)}checkForUpdates(E){return this.channel.call("checkForUpdates",E)}downloadUpdate(){return this.channel.call("downloadUpdate")}applyUpdate(){return this.channel.call("applyUpdate")}quitAndInstall(){return this.channel.call("quitAndInstall")}isLatestVersion(){return this.channel.call("isLatestVersion")}_applySpecificUpdate(E){return this.channel.call("_applySpecificUpdate",E)}}e.UpdateChannelClient=A}),define(ae[57],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IUriIdentityService=void 0,e.IUriIdentityService=(0,t.createDecorator)("IUriIdentityService")}),define(ae[2220],le([1,0,57,35,19,18,1027,6,2]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UriIdentityService=void 0;class b{constructor(r){this.uri=r,this.time=b._clock++}touch(){return this.time=b._clock++,this}}b._clock=0;let S=class{constructor(r){this._fileService=r,this._dispooables=new I.DisposableStore,this._limit=2**16;const u=new Map,i=f=>{let c=u.get(f.scheme);return c===void 0&&(c=r.hasProvider(f)&&!this._fileService.hasCapability(f,1024),u.set(f.scheme,c)),c};this._dispooables.add(E.Event.any(r.onDidChangeFileSystemProviderRegistrations,r.onDidChangeFileSystemProviderCapabilities)(f=>{u.delete(f.scheme)})),this.extUri=new A.ExtUri(i),this._canonicalUris=new k.SkipList((f,c)=>this.extUri.compare(f,c,!0),this._limit)}dispose(){this._dispooables.dispose(),this._canonicalUris.clear()}asCanonicalUri(r){this._fileService.hasProvider(r)&&(r=(0,A.normalizePath)(r));const u=this._canonicalUris.get(r);return u?u.touch().uri.with({fragment:r.fragment}):(this._canonicalUris.set(r,new b(r)),this._checkTrim(),r)}_checkTrim(){if(this._canonicalUris.size<this._limit)return;const r=[...this._canonicalUris.entries()].sort((i,f)=>i[1].touch<f[1].touch?1:i[1].touch>f[1].touch?-1:0);b._clock=0,this._canonicalUris.clear();const u=this._limit*.5;for(let i=0;i<u;i++)this._canonicalUris.set(r[i][0],r[i][1].touch())}};S=we([F(0,R.IFileService)],S),e.UriIdentityService=S,(0,p.registerSingleton)(t.IUriIdentityService,S,1)}),define(ae[435],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IURLService=void 0,e.IURLService=(0,t.createDecorator)("urlService")}),define(ae[2221],le([1,0,9]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.URLHandlerRouter=e.URLHandlerChannelClient=e.URLHandlerChannel=void 0;class p{constructor(E){this.handler=E}listen(E,I){throw new Error(`Event not found: ${I}`)}call(E,I,b){switch(I){case"handleURL":return this.handler.handleURL(t.URI.revive(b[0]),b[1])}throw new Error(`Call not found: ${I}`)}}e.URLHandlerChannel=p;class R{constructor(E){this.channel=E}handleURL(E,I){return this.channel.call("handleURL",[E.toJSON(),I])}}e.URLHandlerChannelClient=R;class A{constructor(E){this.next=E}async routeCall(E,I,b,S){if(I!=="handleURL")throw new Error(`Call not found: ${I}`);if(b){const C=t.URI.revive(b);if(C&&C.query){const r=/\bwindowId=(\d+)/.exec(C.query);if(r){const u=r[1],i=new RegExp(`window:${u}`),f=E.connections.find(c=>i.test(c.ctx));if(f)return f}}}return this.next.routeCall(E,I,b,S)}routeEvent(E,I){throw new Error(`Event not found: ${I}`)}}e.URLHandlerRouter=A}),define(ae[2222],le([1,0,11,2,9,46]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeURLService=e.AbstractURLService=void 0;class k extends p.Disposable{constructor(){super(...arguments),this.handlers=new Set}open(b,S){const C=[...this.handlers.values()];return(0,t.first)(C.map(r=>()=>r.handleURL(b,S)),void 0,!1).then(r=>r||!1)}registerHandler(b){return this.handlers.add(b),(0,p.toDisposable)(()=>this.handlers.delete(b))}}e.AbstractURLService=k;let E=class extends k{constructor(b){super(),this.productService=b}create(b){let{authority:S,path:C,query:r,fragment:u}=b||{authority:void 0,path:void 0,query:void 0,fragment:void 0};return S&&C&&C.indexOf("/")!==0&&(C=`/${C}`),R.URI.from({scheme:this.productService.urlProtocol,authority:S,path:C,query:r,fragment:u})}};E=we([F(0,A.IProductService)],E),e.NativeURLService=E}),define(ae[2223],le([1,0,6,2,19,219,220,56]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileUserDataProvider=void 0;class I extends p.Disposable{get capabilities(){return this.fileSystemProvider.capabilities&-5}constructor(S,C,r,u){super(),this.fileSystemScheme=S,this.fileSystemProvider=C,this.userDataScheme=r,this.logService=u,this.onDidChangeCapabilities=this.fileSystemProvider.onDidChangeCapabilities,this._onDidChangeFile=this._register(new t.Emitter),this.onDidChangeFile=this._onDidChangeFile.event,this.watchResources=k.TernarySearchTree.forUris(()=>!(this.capabilities&1024)),this._register(this.fileSystemProvider.onDidChangeFile(i=>this.handleFileChanges(i)))}watch(S,C){this.watchResources.set(S,S);const r=this.fileSystemProvider.watch(this.toFileSystemResource(S),C);return(0,p.toDisposable)(()=>{this.watchResources.delete(S),r.dispose()})}stat(S){return this.fileSystemProvider.stat(this.toFileSystemResource(S))}mkdir(S){return this.fileSystemProvider.mkdir(this.toFileSystemResource(S))}rename(S,C,r){return this.fileSystemProvider.rename(this.toFileSystemResource(S),this.toFileSystemResource(C),r)}readFile(S){return this.fileSystemProvider.readFile(this.toFileSystemResource(S),{atomic:!0})}readFileStream(S,C,r){const u=(0,A.newWriteableStream)(i=>E.VSBuffer.concat(i.map(f=>E.VSBuffer.wrap(f))).buffer);return(async()=>{try{const i=await this.readFile(S);u.end(i)}catch(i){u.error(i),u.end()}})(),u}readdir(S){return this.fileSystemProvider.readdir(this.toFileSystemResource(S))}writeFile(S,C,r){return this.fileSystemProvider.writeFile(this.toFileSystemResource(S),C,r)}delete(S,C){return this.fileSystemProvider.delete(this.toFileSystemResource(S),C)}copy(S,C,r){if((0,R.hasFileFolderCopyCapability)(this.fileSystemProvider))return this.fileSystemProvider.copy(this.toFileSystemResource(S),this.toFileSystemResource(C),r);throw new Error("copy not supported")}handleFileChanges(S){const C=[];for(const r of S){if(r.resource.scheme!==this.fileSystemScheme)continue;const u=this.toUserDataResource(r.resource);this.watchResources.findSubstr(u)&&C.push({resource:u,type:r.type})}C.length&&(this.logService.debug("User data changed"),this._onDidChangeFile.fire(C))}toFileSystemResource(S){return S.with({scheme:this.fileSystemScheme})}toUserDataResource(S){return S.with({scheme:this.userDataScheme})}}e.FileUserDataProvider=I}),define(ae[513],le([1,0,322]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLineEndOffset=e.getLineStartOffset=e.edit=void 0;function p(k,E,I,b){const S=(0,t.setProperty)(k,E,I,b)[0];return S&&(k=k.substring(0,S.offset)+S.content+k.substring(S.offset+S.length)),k}e.edit=p;function R(k,E,I){let b=I;for(;b>=0;){if(k.charAt(b)===E.charAt(E.length-1)&&E.length===1)return b+1;if(b--,E.length===2&&b>=0&&k.charAt(b)===E.charAt(0))return b+2}return 0}e.getLineStartOffset=R;function A(k,E,I){let b=I;for(;b>=0;)if(k.charAt(b)===E.charAt(E.length-1)&&E.length===1||(b++,E.length===2&&b>=0&&k.charAt(b)===E.charAt(1)))return b;return k.length-1}e.getLineEndOffset=A}),define(ae[2224],le([1,0,52,306,13]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;function A(u,i,f,c,l,s){const d=[],n=[],a=[];if(!i){const B=u.filter(({identifier:V})=>l.every(z=>z.toLowerCase()!==V.id.toLowerCase()));return{local:{added:d,removed:n,updated:a},remote:B.length>0?{added:B,updated:[],removed:[],all:B}:null}}u=u.map(C),i=i.map(C),f=f?f.map(C):null;const o=new Map,g=B=>{B.uuid&&o.set(B.id.toLowerCase(),B.uuid)};u.forEach(({identifier:B})=>g(B)),i.forEach(({identifier:B})=>g(B)),f?.forEach(({identifier:B})=>g(B));const h=B=>{const V=B.identifier.uuid||o.get(B.identifier.id.toLowerCase());return V?`uuid:${V}`:`id:${B.identifier.id.toLowerCase()}`},v=(B,V)=>(B.set(h(V),V),B),m=u.reduce(v,new Map),w=i.reduce(v,new Map),D=i.reduce((B,V)=>v(B,(0,t.deepClone)(V)),new Map),y=f?f.reduce(v,new Map):null,T=c.reduce(v,new Map),_=l.reduce((B,V)=>{const z=o.get(V.toLowerCase());return B.add(z?`uuid:${z}`:`id:${V.toLowerCase()}`)},new Set),L=s.reduce((B,{id:V,uuid:z})=>(z=z??o.get(V.toLowerCase()),B.add(z?`uuid:${z}`:`id:${V.toLowerCase()}`)),new Set),M=k(m,w,_,!1);if(M.added.size>0||M.removed.size>0||M.updated.size>0){const B=k(y,m,_,!1),V=k(y,w,_,!0),z=(x,H,W,U)=>({...U,installed:H.installed||W.installed,version:W.version&&(!H.installed||p.gt(W.version,H.version))?W.version:H.version,state:I(H,W,y?.get(x)),preRelease:(H.installed?U.preRelease:W.preRelease)??H.preRelease});for(const x of V.removed.values()){const H=m.get(x);if(!H)continue;const W=(0,R.assertIsDefined)(y?.get(x)),U=!L.has(x)&&W.installed;H.installed&&U?n.push(H.identifier):D.set(x,H)}for(const x of V.added.values()){const H=(0,R.assertIsDefined)(w.get(x)),W=m.get(x);if(W){if(M.updated.has(x)){const U=z(x,W,H,H);E(W,H,!1,!1)||a.push(r(U,x)),D.set(x,U)}}else H.installed&&d.push(r(H,x))}for(const x of V.updated.values()){const H=(0,R.assertIsDefined)(w.get(x)),W=(0,R.assertIsDefined)(y?.get(x)),U=m.get(x);if(U)if(!L.has(x)&&W.installed&&U.installed&&!H.installed)n.push(U.identifier);else{const q=z(x,U,H,H);a.push(r(q,x)),D.set(x,q)}else H.installed&&d.push(r(H,x))}for(const x of B.added.values())V.added.has(x)||D.set(x,(0,R.assertIsDefined)(m.get(x)));for(const x of B.updated.values()){if(V.removed.has(x)||V.updated.has(x))continue;const H=(0,R.assertIsDefined)(m.get(x)),W=(0,R.assertIsDefined)(w.get(x));D.set(x,z(x,H,W,H))}for(const x of B.removed.values())V.updated.has(x)||V.removed.has(x)||T.has(x)||!(0,R.assertIsDefined)(w.get(x)).installed||L.has(x)||!(0,R.assertIsDefined)(y?.get(x)).installed||D.delete(x)}const O=[],N=k(w,D,new Set,!0),P=N.added.size>0||N.updated.size>0||N.removed.size>0;return P&&D.forEach((B,V)=>O.push(r(B,V))),{local:{added:d,removed:n,updated:a},remote:P?{added:[...N.added].map(B=>D.get(B)),updated:[...N.updated].map(B=>D.get(B)),removed:[...N.removed].map(B=>w.get(B)),all:O}:null}}e.merge=A;function k(u,i,f,c){const l=u?[...u.keys()].filter(o=>!f.has(o)):[],s=[...i.keys()].filter(o=>!f.has(o)),d=s.filter(o=>l.indexOf(o)===-1).reduce((o,g)=>(o.add(g),o),new Set),n=l.filter(o=>s.indexOf(o)===-1).reduce((o,g)=>(o.add(g),o),new Set),a=new Set;for(const o of l){if(n.has(o))continue;const g=u.get(o),h=i.get(o);(!h||!E(g,h,c,!0))&&a.add(o)}return{added:d,removed:n,updated:a}}function E(u,i,f,c){return!(u.disabled!==i.disabled||c&&u.installed!==i.installed||u.installed&&i.installed&&u.preRelease!==i.preRelease||!S(u.state,i.state)||f&&u.version!==i.version)}function I(u,i,f){const c=u.state,l=i.state,s=f?.state;if(!i.version||c&&p.gt(u.version,i.version))return c;if(l&&p.gt(i.version,u.version)||!c)return l;if(!l)return c;const d=(0,t.deepClone)(c),n=s?b(s,l):{added:Object.keys(l).reduce((o,g)=>(o.add(g),o),new Set),removed:new Set,updated:new Set},a=s?b(s,c):{added:Object.keys(c).reduce((o,g)=>(o.add(g),o),new Set),removed:new Set,updated:new Set};for(const o of[...n.added.values(),...n.updated.values()])d[o]=l[o];for(const o of n.removed.values())a.updated.has(o)||delete d[o];return d}function b(u,i){const f=Object.keys(u),c=Object.keys(i),l=c.filter(n=>f.indexOf(n)===-1).reduce((n,a)=>(n.add(a),n),new Set),s=f.filter(n=>c.indexOf(n)===-1).reduce((n,a)=>(n.add(a),n),new Set),d=new Set;for(const n of f){if(s.has(n))continue;const a=u[n],o=i[n];(0,t.equals)(a,o)||d.add(n)}return{added:l,removed:s,updated:d}}function S(u={},i={}){const{added:f,removed:c,updated:l}=b(u,i);return f.size===0&&c.size===0&&l.size===0}function C(u){return{...u,disabled:!!u.disabled,installed:!!u.installed}}function r(u,i){const f={identifier:{id:u.identifier.id,uuid:i.startsWith("uuid:")?i.substring(5):void 0},preRelease:!!u.preRelease};return u.version&&(f.version=u.version),u.disabled&&(f.disabled=!0),u.installed&&(f.installed=!0),u.state&&(f.state=u.state),f}}),define(ae[436],le([1,0,16,8,5]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IgnoredExtensionsManagementService=e.IIgnoredExtensionsManagementService=void 0,e.IIgnoredExtensionsManagementService=(0,R.createDecorator)("IIgnoredExtensionsManagementService");let A=class{constructor(E){this.configurationService=E}hasToNeverSyncExtension(E){return this.getConfiguredIgnoredExtensions().includes(E.toLowerCase())}hasToAlwaysSyncExtension(E){return this.getConfiguredIgnoredExtensions().includes(`-${E.toLowerCase()}`)}updateIgnoredExtensions(E,I){let b=[...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(S=>S.toLowerCase());return b=b.filter(S=>S!==E&&S!==`-${E}`),I&&b.push(E.toLowerCase()),this.configurationService.updateValue("settingsSync.ignoredExtensions",b.length?b:void 0,2)}updateSynchronizedExtensions(E,I){let b=[...this.configurationService.getValue("settingsSync.ignoredExtensions")].map(S=>S.toLowerCase());return b=b.filter(S=>S!==E&&S!==`-${E}`),I&&b.push(`-${E.toLowerCase()}`),this.configurationService.updateValue("settingsSync.ignoredExtensions",b.length?b:void 0,2)}getIgnoredExtensions(E){const I=E.filter(r=>r.isMachineScoped).map(r=>r.identifier.id.toLowerCase()),b=this.getConfiguredIgnoredExtensions().map(r=>r.toLowerCase()),S=[],C=[];if(Array.isArray(b))for(const r of b)r.startsWith("-")?C.push(r.substring(1)):S.push(r);return(0,t.distinct)([...I,...S].filter(r=>C.indexOf(r)===-1))}getConfiguredIgnoredExtensions(){let E=this.configurationService.inspect("settingsSync.ignoredExtensions").userValue;return E!==void 0||(E=this.configurationService.inspect("sync.ignoredExtensions").userValue,E!==void 0)?E:(this.configurationService.getValue("settingsSync.ignoredExtensions")||[]).map(I=>I.toLowerCase())}};A=we([F(0,p.IConfigurationService)],A),e.IgnoredExtensionsManagementService=A}),define(ae[2225],le([1,0,16,123,52,7,513]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=e.parseKeybindings=void 0;function E(n){return(0,p.parse)(n)||[]}e.parseKeybindings=E;async function I(n,a,o,g,h){const v=E(n),m=E(a),w=o?E(o):null,D=[...v,...m,...w||[]].map(z=>z.key),y=await h.resolveUserBindings(D),T=S(v,m,w,y);if(!T.hasLocalForwarded&&!T.hasRemoteForwarded)return{mergeContent:n,hasChanges:!1,hasConflicts:!1};if(!T.hasLocalForwarded&&T.hasRemoteForwarded)return{mergeContent:a,hasChanges:!0,hasConflicts:!1};if(T.hasLocalForwarded&&!T.hasRemoteForwarded)return{mergeContent:n,hasChanges:!0,hasConflicts:!1};const _=r(v),L=r(m),M=w?r(w):null,O=i(_,L,y),N=M?i(M,_,y):{added:[..._.keys()].reduce((z,x)=>(z.add(x),z),new Set),removed:new Set,updated:new Set},P=M?i(M,L,y):{added:[...L.keys()].reduce((z,x)=>(z.add(x),z),new Set),removed:new Set,updated:new Set},B=b(O,N,P);let V=n;for(const z of B.removed.values())B.conflicts.has(z)||(V=s(V,z,g));for(const z of B.added.values()){if(B.conflicts.has(z))continue;const x=L.get(z);if(x.some(H=>H.command!==`-${z}`&&T.conflicts.has(y[H.key]))){B.conflicts.add(z);continue}V=l(V,x,g)}for(const z of B.updated.values()){if(B.conflicts.has(z))continue;const x=L.get(z);if(x.some(H=>H.command!==`-${z}`&&T.conflicts.has(y[H.key]))){B.conflicts.add(z);continue}V=d(V,z,x,g)}return{mergeContent:V,hasChanges:!0,hasConflicts:B.conflicts.size>0}}e.merge=I;function b(n,a,o){const g=new Set,h=new Set,v=new Set,m=new Set;for(const w of a.removed.values())o.updated.has(w)&&m.add(w);for(const w of o.removed.values())m.has(w)||(a.updated.has(w)?m.add(w):h.add(w));for(const w of a.added.values())m.has(w)||o.added.has(w)&&n.updated.has(w)&&m.add(w);for(const w of o.added.values())m.has(w)||(a.added.has(w)?n.updated.has(w)&&m.add(w):g.add(w));for(const w of a.updated.values())m.has(w)||o.updated.has(w)&&n.updated.has(w)&&m.add(w);for(const w of o.updated.values())m.has(w)||(a.updated.has(w)?n.updated.has(w)&&m.add(w):v.add(w));return{added:g,removed:h,updated:v,conflicts:m}}function S(n,a,o,g){const h=new Set,v=C(n,g),m=C(a,g),w=o?C(o,g):null,D=u(v,m);if(D.added.size===0&&D.removed.size===0&&D.updated.size===0)return{hasLocalForwarded:!1,hasRemoteForwarded:!1,added:h,removed:h,updated:h,conflicts:h};const y=w?u(w,v):{added:[...v.keys()].reduce((N,P)=>(N.add(P),N),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:h,removed:h,updated:h,conflicts:h};const T=w?u(w,m):{added:[...m.keys()].reduce((N,P)=>(N.add(P),N),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:h,removed:h,updated:h,conflicts:h};const{added:_,removed:L,updated:M,conflicts:O}=b(D,y,T);return{hasLocalForwarded:!0,hasRemoteForwarded:!0,added:_,removed:L,updated:M,conflicts:O}}function C(n,a){const o=new Map;for(const g of n){const h=a[g.key];let v=o.get(h);v||(v=[],o.set(h,v)),v.push(g)}return o}function r(n){const a=new Map;for(const o of n){const g=o.command[0]==="-"?o.command.substring(1):o.command;let h=a.get(g);h||(h=[],a.set(g,h)),h.push(o)}return a}function u(n,a){const o=[...n.keys()],g=[...a.keys()],h=g.filter(w=>o.indexOf(w)===-1).reduce((w,D)=>(w.add(D),w),new Set),v=o.filter(w=>g.indexOf(w)===-1).reduce((w,D)=>(w.add(D),w),new Set),m=new Set;for(const w of o){if(v.has(w))continue;const D=n.get(w).map(T=>({...T,key:w})),y=a.get(w).map(T=>({...T,key:w}));(0,t.equals)(D,y,(T,_)=>c(T,_))||m.add(w)}return{added:h,removed:v,updated:m}}function i(n,a,o){const g=[...n.keys()],h=[...a.keys()],v=h.filter(D=>g.indexOf(D)===-1).reduce((D,y)=>(D.add(y),D),new Set),m=g.filter(D=>h.indexOf(D)===-1).reduce((D,y)=>(D.add(y),D),new Set),w=new Set;for(const D of g){if(m.has(D))continue;const y=n.get(D).map(_=>({..._,key:o[_.key]})),T=a.get(D).map(_=>({..._,key:o[_.key]}));f(y,T)||w.add(D)}return{added:v,removed:m,updated:w}}function f(n,a){return!(!(0,t.equals)(n.filter(({command:o})=>o[0]!=="-"),a.filter(({command:o})=>o[0]!=="-"),(o,g)=>c(o,g))||!(0,t.equals)(n.filter(({command:o})=>o[0]==="-"),a.filter(({command:o})=>o[0]==="-"),(o,g)=>c(o,g)))}function c(n,a){if(n.command!==a.command||n.key!==a.key)return!1;const o=A.ContextKeyExpr.deserialize(n.when),g=A.ContextKeyExpr.deserialize(a.when);return!(o&&!g||!o&&g||o&&g&&!o.equals(g)||!R.equals(n.args,a.args))}function l(n,a,o){for(const g of a)n=k.edit(n,[-1],g,o);return n}function s(n,a,o){const g=E(n);for(let h=g.length-1;h>=0;h--)(g[h].command===a||g[h].command===`-${a}`)&&(n=k.edit(n,[h],void 0,o));return n}function d(n,a,o,g){const h=E(n),v=h.findIndex(m=>m.command===a||m.command===`-${a}`);for(let m=h.length-1;m>=0;m--)(h[m].command===a||h[m].command===`-${a}`)&&(n=k.edit(n,[m],void 0,g));for(let m=o.length-1;m>=0;m--)n=k.edit(n,[v],o[m],g);return n}}),define(ae[2226],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.areSame=e.merge=void 0;function t(A,k,E){const I={},b={},S=new Set;if(!k)return{local:{added:I,updated:b,removed:[...S.values()]},remote:{added:A,updated:{},removed:[]},conflicts:[]};const C=p(A,k);if(C.added.size===0&&C.removed.size===0&&C.updated.size===0)return{local:{added:I,updated:b,removed:[...S.values()]},remote:{added:{},updated:{},removed:[]},conflicts:[]};const r=p(E,A),u=p(E,k),i={},f={},c=new Set,l=new Set;for(const s of r.removed.values())u.updated.has(s)?I[s]=k[s]:c.add(s);for(const s of u.removed.values())l.has(s)||(r.updated.has(s)?l.add(s):S.add(s));for(const s of r.updated.values())l.has(s)||(u.updated.has(s)?C.updated.has(s)&&l.add(s):f[s]=A[s]);for(const s of u.updated.values())l.has(s)||(r.updated.has(s)?C.updated.has(s)&&l.add(s):A[s]!==void 0&&(b[s]=k[s]));for(const s of r.added.values())l.has(s)||(u.added.has(s)?C.updated.has(s)&&l.add(s):i[s]=A[s]);for(const s of u.added.values())l.has(s)||(r.added.has(s)?C.updated.has(s)&&l.add(s):I[s]=k[s]);return{local:{added:I,removed:[...S.values()],updated:b},remote:{added:i,removed:[...c.values()],updated:f},conflicts:[...l.values()]}}e.merge=t;function p(A,k){const E=A?Object.keys(A):[],I=k?Object.keys(k):[],b=I.filter(r=>E.indexOf(r)===-1).reduce((r,u)=>(r.add(u),r),new Set),S=E.filter(r=>I.indexOf(r)===-1).reduce((r,u)=>(r.add(u),r),new Set),C=new Set;for(const r of E){if(S.has(r))continue;const u=A[r],i=k[r];u!==i&&C.add(r)}return{added:b,removed:S,updated:C}}function R(A,k){const{added:E,removed:I,updated:b}=p(A,k);return E.size===0&&I.size===0&&b.size===0}e.areSame=R}),define(ae[95],le([1,0,16,13,1442,55,82,5,155,17]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PREVIEW_DIR_NAME=e.USER_DATA_SYNC_SCHEME=e.IUserDataSyncLogService=e.IUserDataSyncUtilService=e.IUserDataAutoSyncService=e.IUserDataSyncResourceProviderService=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.getPathSegments=e.ALL_SYNC_RESOURCES=e.SyncResource=e.isAuthenticationProvider=e.registerConfiguration=e.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM=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 S(){const m=b.Registry.as(A.Extensions.Configuration).getConfigurationProperties();return Object.keys(m).filter(w=>!!m[w].disallowSyncIgnore)}e.getDisallowedIgnoredSettings=S;function C(){const m=b.Registry.as(A.Extensions.Configuration).getConfigurationProperties(),w=Object.keys(m).filter(T=>!!m[T].ignoreSync),D=Object.keys(m).filter(T=>m[T].scope===2||m[T].scope===6),y=S();return(0,t.distinct)([e.CONFIGURATION_SYNC_STORE_KEY,...w,...D,...y])}e.getDefaultIgnoredSettings=C,e.USER_DATA_SYNC_CONFIGURATION_SCOPE="settingsSync",e.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM="settingsSync.keybindingsPerPlatform";function r(){const m="vscode://schemas/ignoredSettings",w=b.Registry.as(A.Extensions.Configuration);w.registerConfiguration({id:"settingsSync",order:30,title:(0,R.localize)(0,null),type:"object",properties:{[e.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM]:{type:"boolean",description:(0,R.localize)(1,null),default:!0,scope:1,tags:["sync","usesOnlineServices"]},"settingsSync.ignoredExtensions":{type:"array",markdownDescription:(0,R.localize)(2,null),items:[{type:"string",pattern:k.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,R.localize)(3,null)}],default:[],scope:1,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]},"settingsSync.ignoredSettings":{type:"array",description:(0,R.localize)(4,null),default:[],scope:1,$ref:m,additionalProperties:!0,uniqueItems:!0,disallowSyncIgnore:!0,tags:["sync","usesOnlineServices"]}}});const D=b.Registry.as(I.Extensions.JSONContribution),y=()=>{const T=S(),_=C().filter(N=>N!==e.CONFIGURATION_SYNC_STORE_KEY),L=Object.keys(A.allSettings.properties).filter(N=>_.indexOf(N)===-1),M=_.filter(N=>T.indexOf(N)===-1),O={items:{type:"string",enum:[...L,...M.map(N=>`-${N}`)]}};D.registerSchema(m,O)};return w.onDidUpdateConfiguration(()=>y())}e.registerConfiguration=r;function u(m){return m&&(0,p.isObject)(m)&&(0,p.isString)(m.id)&&Array.isArray(m.scopes)}e.isAuthenticationProvider=u;var i;(function(m){m.Settings="settings",m.Keybindings="keybindings",m.Snippets="snippets",m.Tasks="tasks",m.Extensions="extensions",m.GlobalState="globalState",m.Profiles="profiles"})(i=e.SyncResource||(e.SyncResource={})),e.ALL_SYNC_RESOURCES=["settings","keybindings","snippets","tasks","extensions","globalState","profiles"];function f(m,...w){return m?[m,...w]:w}e.getPathSegments=f;function c(m,w,D,y){return y.joinPath(D.userDataSyncHome,...f(m,w,`lastSync${w}.json`))}e.getLastSyncResourceUri=c,e.IUserDataSyncStoreManagementService=(0,E.createDecorator)("IUserDataSyncStoreManagementService"),e.IUserDataSyncStoreService=(0,E.createDecorator)("IUserDataSyncStoreService"),e.IUserDataSyncBackupStoreService=(0,E.createDecorator)("IUserDataSyncBackupStoreService"),e.HEADER_OPERATION_ID="x-operation-id",e.HEADER_EXECUTION_ID="X-Execution-Id";function l(m){const w={};return w[e.HEADER_EXECUTION_ID]=m,w}e.createSyncHeaders=l;var s;(function(m){m.Unauthorized="Unauthorized",m.Conflict="Conflict",m.Gone="Gone",m.PreconditionFailed="PreconditionFailed",m.TooLarge="TooLarge",m.UpgradeRequired="UpgradeRequired",m.PreconditionRequired="PreconditionRequired",m.TooManyRequests="RemoteTooManyRequests",m.TooManyRequestsAndRetryAfter="TooManyRequestsAndRetryAfter",m.RequestFailed="RequestFailed",m.RequestCanceled="RequestCanceled",m.RequestTimeout="RequestTimeout",m.RequestProtocolNotSupported="RequestProtocolNotSupported",m.RequestPathNotEscaped="RequestPathNotEscaped",m.RequestHeadersNotObject="RequestHeadersNotObject",m.NoCollection="NoCollection",m.NoRef="NoRef",m.EmptyResponse="EmptyResponse",m.TurnedOff="TurnedOff",m.SessionExpired="SessionExpired",m.ServiceChanged="ServiceChanged",m.DefaultServiceChanged="DefaultServiceChanged",m.LocalTooManyRequests="LocalTooManyRequests",m.LocalPreconditionFailed="LocalPreconditionFailed",m.LocalInvalidContent="LocalInvalidContent",m.LocalError="LocalError",m.IncompatibleLocalContent="IncompatibleLocalContent",m.IncompatibleRemoteContent="IncompatibleRemoteContent",m.UnresolvedConflicts="UnresolvedConflicts",m.Unknown="Unknown"})(s=e.UserDataSyncErrorCode||(e.UserDataSyncErrorCode={}));class d extends Error{constructor(w,D,y,T){super(w),this.code=D,this.resource=y,this.operationId=T,this.name=`${this.code} (UserDataSyncError) syncResource:${this.resource||"unknown"} operationId:${this.operationId||"unknown"}`}}e.UserDataSyncError=d;class n extends d{constructor(w,D,y,T,_){super(w,y,void 0,_),this.url=D,this.serverCode=T}}e.UserDataSyncStoreError=n;class a extends d{constructor(w,D){super(w,D)}}e.UserDataAutoSyncError=a,function(m){function w(D){if(D instanceof m)return D;const y=/^(.+) \(UserDataSyncError\) syncResource:(.+) operationId:(.+)$/.exec(D.name);if(y&&y[1]){const T=y[2]==="unknown"?void 0:y[2],_=y[3]==="unknown"?void 0:y[3];return new m(D.message,y[1],T,_)}return new m(D.message,"Unknown")}m.toUserDataSyncError=w}(d=e.UserDataSyncError||(e.UserDataSyncError={}));var o;(function(m){m.Uninitialized="uninitialized",m.Idle="idle",m.Syncing="syncing",m.HasConflicts="hasConflicts"})(o=e.SyncStatus||(e.SyncStatus={}));var g;(function(m){m[m.None=0]="None",m[m.Added=1]="Added",m[m.Modified=2]="Modified",m[m.Deleted=3]="Deleted"})(g=e.Change||(e.Change={}));var h;(function(m){m.Preview="preview",m.Conflict="conflict",m.Accepted="accepted"})(h=e.MergeState||(e.MergeState={})),e.SYNC_SERVICE_URL_TYPE="sync.store.url.type";function v(m){return`sync.enable.${m}`}e.getEnablementKey=v,e.IUserDataSyncEnablementService=(0,E.createDecorator)("IUserDataSyncEnablementService"),e.IUserDataSyncService=(0,E.createDecorator)("IUserDataSyncService"),e.IUserDataSyncResourceProviderService=(0,E.createDecorator)("IUserDataSyncResourceProviderService"),e.IUserDataAutoSyncService=(0,E.createDecorator)("IUserDataAutoSyncService"),e.IUserDataSyncUtilService=(0,E.createDecorator)("IUserDataSyncUtilService"),e.IUserDataSyncLogService=(0,E.createDecorator)("IUserDataSyncLogService"),e.USER_DATA_SYNC_SCHEME="vscode-userdata-sync",e.PREVIEW_DIR_NAME="preview"}),define(ae[2227],le([1,0,52,95]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;function R(k,E,I,b,S){if(!E)return{remote:{added:Object.keys(k),removed:[],updated:[],all:Object.keys(k).length>0?k:null},local:{added:{},removed:[],updated:{}}};const C=A(k,E);if(C.added.size===0&&C.removed.size===0&&C.updated.size===0)return{remote:{added:[],removed:[],updated:[],all:null},local:{added:{},removed:[],updated:{}}};const r=I?A(I,E):{added:Object.keys(E).reduce((s,d)=>(s.add(d),s),new Set),removed:new Set,updated:new Set},u=I?A(I,k):{added:Object.keys(k).reduce((s,d)=>(s.add(d),s),new Set),removed:new Set,updated:new Set},i={added:{},removed:[],updated:{}},f=t.deepClone(E),c=!I;for(const s of u.added.values())s!==p.SYNC_SERVICE_URL_TYPE&&c&&r.added.has(s)||(f[s]=k[s]);for(const s of u.updated.values())f[s]=k[s];for(const s of u.removed.values())b.unregistered.includes(s)||delete f[s];for(const s of r.added.values()){const d=E[s];if(b.machine.includes(s)){S.info(`GlobalState: Skipped adding ${s} in local storage because it is declared as machine scoped.`);continue}if(I&&u.added.has(s))continue;const n=k[s];n&&n.value===d.value||s===p.SYNC_SERVICE_URL_TYPE&&c&&u.added.has(s)||(n?i.updated[s]=d:i.added[s]=d)}for(const s of r.updated.values()){const d=E[s];if(b.machine.includes(s)){S.info(`GlobalState: Skipped updating ${s} in local storage because it is declared as machine scoped.`);continue}if(u.updated.has(s)||u.removed.has(s))continue;const n=k[s];n&&n.value===d.value||(i.updated[s]=d)}for(const s of r.removed.values()){if(b.machine.includes(s)){S.trace(`GlobalState: Skipped removing ${s} in local storage because it is declared as machine scoped.`);continue}u.updated.has(s)||u.removed.has(s)||i.removed.push(s)}const l=A(E,f);return{local:i,remote:{added:[...l.added],updated:[...l.updated],removed:[...l.removed],all:l.added.size===0&&l.removed.size===0&&l.updated.size===0?null:f}}}e.merge=R;function A(k,E){const I=Object.keys(k),b=Object.keys(E),S=b.filter(u=>I.indexOf(u)===-1).reduce((u,i)=>(u.add(i),u),new Set),C=I.filter(u=>b.indexOf(u)===-1).reduce((u,i)=>(u.add(i),u),new Set),r=new Set;for(const u of I){if(C.has(u))continue;const i=k[u],f=E[u];t.equals(i,f)||r.add(u)}return{added:S,removed:C,updated:r}}}),define(ae[437],le([1,0,16,123,322,321,52,513,95]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addSetting=e.isEmpty=e.areSame=e.merge=e.updateIgnoredSettings=e.removeComments=e.getIgnoredSettings=void 0;function b(D,y,T){let _=[];T?_=C(T):_=S(y);const L=[],M=[...(0,I.getDisallowedIgnoredSettings)()];if(Array.isArray(_))for(const O of _)O.startsWith("-")?M.push(O.substring(1)):L.push(O);return(0,t.distinct)([...D,...L].filter(O=>M.indexOf(O)===-1))}e.getIgnoredSettings=b;function S(D){let y=D.inspect("settingsSync.ignoredSettings").userValue;return y!==void 0||(y=D.inspect("sync.ignoredSettings").userValue,y!==void 0)?y:D.getValue("settingsSync.ignoredSettings")||[]}function C(D){const y=(0,p.parse)(D);return y?y["settingsSync.ignoredSettings"]||y["sync.ignoredSettings"]||[]:[]}function r(D,y){const T=(0,p.parse)(D)||{};let _="{}";for(const L of Object.keys(T)){const M=(0,R.setProperty)(_,[L],T[L],y);_=(0,R.applyEdits)(_,M)}return _}e.removeComments=r;function u(D,y,T,_){if(T.length){const L=w(y),M=(0,p.parse)(y)||{},O=(0,p.parse)(D);if(!O)return D;const N=[];for(const P of T){const B=M[P],V=O[P];B===void 0?D=E.edit(D,[P],void 0,_):V!==void 0?D=E.edit(D,[P],B,_):N.push(o(P,L))}N.sort((P,B)=>P.startOffset-B.startOffset),N.forEach(P=>D=s(P.setting.key,y,D,_))}return D}e.updateIgnoredSettings=u;function i(D,y,T,_,L,M){const O=u(D,y,_,M),N=T!==O,P=T!==y;if(!N&&!P)return{conflictsSettings:[],localContent:null,remoteContent:null,hasConflicts:!1};if(N&&!P)return{conflictsSettings:[],localContent:null,remoteContent:O,hasConflicts:!1};if(P&&!N)return{conflictsSettings:[],localContent:u(y,D,_,M),remoteContent:null,hasConflicts:!1};if(T===null&&c(D)){const ee=f(D,y,_)?null:u(y,D,_,M);return{conflictsSettings:[],localContent:ee,remoteContent:null,hasConflicts:!1}}let B=D,V=y;const z=(0,p.parse)(D),x=(0,p.parse)(y),H=T?(0,p.parse)(T):null,W=_.reduce((ee,ie)=>(ee.add(ie),ee),new Set),U=l(z,x,W),$=l(H,z,W),q=l(H,x,W),X=new Map,G=new Set,Q=ee=>{G.add(ee);const ie=L.filter(({key:re})=>re===ee)[0];ie?(B=E.edit(B,[ee],ie.value,M),V=E.edit(V,[ee],ie.value,M)):X.set(ee,{key:ee,localValue:z[ee],remoteValue:x[ee]})};for(const ee of $.removed.values())q.updated.has(ee)?Q(ee):V=E.edit(V,[ee],void 0,M);for(const ee of q.removed.values())G.has(ee)||($.updated.has(ee)?Q(ee):B=E.edit(B,[ee],void 0,M));for(const ee of $.updated.values())G.has(ee)||(q.updated.has(ee)?U.updated.has(ee)&&Q(ee):V=E.edit(V,[ee],z[ee],M));for(const ee of q.updated.values())G.has(ee)||($.updated.has(ee)?U.updated.has(ee)&&Q(ee):B=E.edit(B,[ee],x[ee],M));for(const ee of $.added.values())G.has(ee)||(q.added.has(ee)?U.updated.has(ee)&&Q(ee):V=s(ee,B,V,M));for(const ee of q.added.values())G.has(ee)||($.added.has(ee)?U.updated.has(ee)&&Q(ee):B=s(ee,V,B,M));const j=X.size>0||!f(B,V,_),K=j||!f(B,D,[]),Y=j||!f(V,y,[]);return{localContent:K?B:null,remoteContent:Y?V:null,conflictsSettings:[...X.values()],hasConflicts:j}}e.merge=i;function f(D,y,T){if(D===y)return!0;const _=(0,p.parse)(D),L=(0,p.parse)(y),M=T.reduce((P,B)=>(P.add(B),P),new Set),O=w(D).filter(P=>!(P.setting&&M.has(P.setting.key))),N=w(y).filter(P=>!(P.setting&&M.has(P.setting.key)));if(O.length!==N.length)return!1;for(let P=0;P<O.length;P++){const B=O[P],V=N[P];if(B.setting&&V.setting){if(B.setting.key!==V.setting.key||!k.equals(_[B.setting.key],L[B.setting.key]))return!1}else if(!B.setting&&!V.setting){if(B.value!==V.value)return!1}else return!1}return!0}e.areSame=f;function c(D){return D?w(D).length===0:!0}e.isEmpty=c;function l(D,y,T){const _=D?Object.keys(D).filter(P=>!T.has(P)):[],L=Object.keys(y).filter(P=>!T.has(P)),M=L.filter(P=>_.indexOf(P)===-1).reduce((P,B)=>(P.add(B),P),new Set),O=_.filter(P=>L.indexOf(P)===-1).reduce((P,B)=>(P.add(B),P),new Set),N=new Set;if(D)for(const P of _){if(O.has(P))continue;const B=D[P],V=y[P];k.equals(B,V)||N.add(P)}return{added:M,removed:O,updated:N}}function s(D,y,T,_){const L=(0,p.parse)(y),M=w(y),O=w(T),N=d(D,M,O);return n(T,D,L[D],N,O,_)}e.addSetting=s;function d(D,y,T){const _=y.findIndex(M=>M.setting?.key===D),L=y[_-1];if(L){if(L.setting){const O=o(L.setting.key,T);if(O)return{index:T.indexOf(O),insertAfter:!0}}else{const O=g(_,y);if(O){const N=o(O.setting.key,T);if(N){const P=h(T.indexOf(N),T),B=v(y,O,y[_]);if(P){const V=v(T,N,P),z=m(B,V);return z?{index:T.indexOf(z),insertAfter:!0}:{index:T.indexOf(P),insertAfter:!1}}else{const V=v(T,N,T[T.length-1]),z=m(B,V);return z?{index:T.indexOf(z),insertAfter:!0}:{index:T.length-1,insertAfter:!0}}}}}const M=y[_+1];if(M)if(M.setting){const O=o(M.setting.key,T);if(O)return{index:T.indexOf(O),insertAfter:!1}}else{const O=h(_,y);if(O){const N=o(O.setting.key,T);if(N){const P=g(T.indexOf(N),T),B=v(y,y[_],O);if(P){const V=v(T,P,N),z=m(B.reverse(),V.reverse());return z?{index:T.indexOf(z),insertAfter:!1}:{index:T.indexOf(P),insertAfter:!0}}else{const V=v(T,T[0],N),z=m(B.reverse(),V.reverse());return z?{index:T.indexOf(z),insertAfter:!1}:{index:0,insertAfter:!1}}}}}}return{index:T.length-1,insertAfter:!0}}function n(D,y,T,_,L,M){let O;return _.index===-1?O=(0,R.setProperty)(D,[y],T,M):O=a(D,y,T,_,L,M).map(N=>(0,R.withFormatting)(D,N,M)[0]),(0,R.applyEdits)(D,O)}function a(D,y,T,_,L,M){const O=`${JSON.stringify(y)}: ${JSON.stringify(T)}`,N=(0,A.getEOL)(M,D),P=L[_.index];if(_.insertAfter){const B=[];if(P.setting)B.push({offset:P.endOffset,length:0,content:","+O});else{const V=h(_.index,L),z=g(_.index,L),x=z?.setting?.commaOffset;z&&x===void 0&&B.push({offset:z.endOffset,length:0,content:","});const H=x!==void 0&&x>P.endOffset;B.push({offset:H?x+1:P.endOffset,length:0,content:V?N+O+",":N+O})}return B}else{if(P.setting)return[{offset:P.startOffset,length:0,content:O+","}];const B=(L[_.index-1]&&!L[_.index-1].setting?N:"")+O+(h(_.index,L)?",":"")+N;return[{offset:P.startOffset,length:0,content:B}]}}function o(D,y){return y.filter(T=>T.setting?.key===D)[0]}function g(D,y){for(let T=D-1;T>=0;T--)if(y[T].setting)return y[T]}function h(D,y){for(let T=D+1;T<y.length;T++)if(y[T].setting)return y[T]}function v(D,y,T){const _=D.indexOf(y),L=D.indexOf(T);return D.filter((M,O)=>_<O&&O<L)}function m(D,y){if(D.length&&y.length){let T=0;for(;T<y.length&&T<D.length;T++)if(D[T].value!==y[T].value)return y[T-1];return y[T-1]}}function w(D){const y=[];let T=-1,_,L;const M={onObjectBegin:O=>{T++},onObjectProperty:(O,N,P)=>{T===0&&(_=N,L=O)},onObjectEnd:(O,N)=>{T--,T===0&&y.push({startOffset:_,endOffset:O+N,value:D.substring(_,O+N),setting:{key:L,commaOffset:void 0}})},onArrayBegin:(O,N)=>{T++},onArrayEnd:(O,N)=>{T--,T===0&&y.push({startOffset:_,endOffset:O+N,value:D.substring(_,O+N),setting:{key:L,commaOffset:void 0}})},onLiteralValue:(O,N,P)=>{T===0&&y.push({startOffset:_,endOffset:N+P,value:D.substring(_,N+P),setting:{key:L,commaOffset:void 0}})},onSeparator:(O,N,P)=>{if(T===0&&O===","){let B=y.length-1;for(;B>=0&&!y[B].setting;B--);const V=y[B];V&&y.splice(B,1,{startOffset:V.startOffset,endOffset:V.endOffset,value:V.value,setting:{key:V.setting.key,commaOffset:N}})}},onComment:(O,N)=>{T===0&&y.push({startOffset:O,endOffset:O+N,value:D.substring(O,O+N)})}};return(0,p.visit)(D,M),y}}),define(ae[514],le([1,0,6,2,5,95]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncAccountService=e.IUserDataSyncAccountService=void 0,e.IUserDataSyncAccountService=(0,R.createDecorator)("IUserDataSyncAccountService");let k=class extends p.Disposable{get account(){return this._account}constructor(I,b){super(),this.userDataSyncStoreService=I,this.logService=b,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))}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=we([F(0,A.IUserDataSyncStoreService),F(1,A.IUserDataSyncLogService)],k),e.UserDataSyncAccountService=k}),define(ae[828],le([1,0,2,9]),function(J,e,t,p){"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 R{constructor(r){this.service=r}listen(r,u){switch(u){case"onError":return this.service.onError}throw new Error(`Event not found: ${u}`)}call(r,u,i){switch(u){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=R;class A{constructor(r){this.service=r}listen(r,u){throw new Error(`Event not found: ${u}`)}call(r,u,i){switch(u){case"resolveDefaultIgnoredSettings":return this.service.resolveDefaultIgnoredSettings();case"resolveUserKeybindings":return this.service.resolveUserBindings(i[0]);case"resolveFormattingOptions":return this.service.resolveFormattingOptions(p.URI.revive(i[0]))}throw new Error("Invalid call")}}e.UserDataSycnUtilServiceChannel=A;class k{constructor(r){this.channel=r}async resolveDefaultIgnoredSettings(){return this.channel.call("resolveDefaultIgnoredSettings")}async resolveUserBindings(r){return this.channel.call("resolveUserKeybindings",[r])}async resolveFormattingOptions(r){return this.channel.call("resolveFormattingOptions",[r])}}e.UserDataSyncUtilServiceClient=k;class E{constructor(r){this.service=r}listen(r,u){switch(u){case"onDidChange":return this.service.onDidChange}throw new Error(`Event not found: ${u}`)}async call(r,u,i){switch(u){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=E;class I{constructor(r){this.service=r}listen(r,u){switch(u){case"onDidChangeAccount":return this.service.onDidChangeAccount;case"onTokenFailed":return this.service.onTokenFailed}throw new Error(`Event not found: ${u}`)}call(r,u,i){switch(u){case"_getInitialData":return Promise.resolve(this.service.account);case"updateAccount":return this.service.updateAccount(i)}throw new Error("Invalid call")}}e.UserDataSyncAccountServiceChannel=I;class b{constructor(r){this.service=r}listen(r,u){switch(u){case"onDidChangeUserDataSyncStore":return this.service.onDidChangeUserDataSyncStore}throw new Error(`Event not found: ${u}`)}call(r,u,i){switch(u){case"switch":return this.service.switch(i[0]);case"getPreviousUserDataSyncStore":return this.service.getPreviousUserDataSyncStore()}throw new Error("Invalid call")}}e.UserDataSyncStoreManagementServiceChannel=b;class S extends t.Disposable{constructor(r){super(),this.channel=r,this.onDidChangeUserDataSyncStore=this.channel.listen("onDidChangeUserDataSyncStore")}async switch(r){return this.channel.call("switch",[r])}async getPreviousUserDataSyncStore(){const r=await this.channel.call("getPreviousUserDataSyncStore");return this.revive(r)}revive(r){return{url:p.URI.revive(r.url),type:r.type,defaultUrl:p.URI.revive(r.defaultUrl),insidersUrl:p.URI.revive(r.insidersUrl),stableUrl:p.URI.revive(r.stableUrl),canSwitch:r.canSwitch,authenticationProviders:r.authenticationProviders}}}e.UserDataSyncStoreManagementServiceChannelClient=S}),define(ae[2228],le([1,0,81,25]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncLogService=void 0;let R=class extends p.AbstractLogger{constructor(k,E){super(),this.logger=this._register(k.createLogger(E.userDataSyncLogResource,{name:"settingssync"}))}trace(k,...E){this.logger.trace(k,...E)}debug(k,...E){this.logger.debug(k,...E)}info(k,...E){this.logger.info(k,...E)}warn(k,...E){this.logger.warn(k,...E)}error(k,...E){this.logger.error(k,...E)}critical(k,...E){this.logger.critical(k,...E)}flush(){this.logger.flush()}};R=we([F(0,p.ILoggerService),F(1,t.IEnvironmentService)],R),e.UserDataSyncLogService=R}),define(ae[2229],le([1,0,160,53]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWebviewContentMimeType=void 0;const R=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 E=(0,p.extname)(k.fsPath).toLowerCase();return R.get(E)||(0,t.getMediaMime)(k.fsPath)||t.Mimes.unknown}e.getWebviewContentMimeType=A}),define(ae[2230],le([1,0,22,9,225]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewPortMappingManager=void 0;class A{constructor(E,I,b){this._getExtensionLocation=E,this._getMappings=I,this.tunnelService=b,this._tunnels=new Map}async getRedirect(E,I){const b=p.URI.parse(I),S=(0,R.extractLocalHostUriMetaDataForPortMapping)(b);if(!!S){for(const C of this._getMappings())if(C.webviewPort===S.port){const r=this._getExtensionLocation();if(r&&r.scheme===t.Schemas.vscodeRemote){const u=E&&await this.getOrCreateTunnel(E,C.extensionHostPort);if(u)return u.tunnelLocalPort===C.webviewPort?void 0:encodeURI(b.with({authority:`127.0.0.1:${u.tunnelLocalPort}`}).toString(!0))}if(C.webviewPort!==C.extensionHostPort)return encodeURI(b.with({authority:`${S.address}:${C.extensionHostPort}`}).toString(!0))}}}async dispose(){for(const E of this._tunnels.values())await E.dispose();this._tunnels.clear()}async getOrCreateTunnel(E,I){const b=this._tunnels.get(I);if(b)return b;const S=await this.tunnelService.openTunnel({getAddress:async()=>E},void 0,I);return S&&this._tunnels.set(I,S),S}}e.WebviewPortMappingManager=A}),define(ae[243],le([1,0,14]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomLevelToZoomFactor=e.useWindowControlsOverlay=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 p(S){return!!S.workspaceUri}e.isWorkspaceToOpen=p;function R(S){return!!S.folderUri}e.isFolderToOpen=R;function A(S){return!!S.fileUri}e.isFileToOpen=A;function k(S){const C=E(S),r=S.getValue("window.menuBarVisibility");return r==="default"||C==="native"&&r==="compact"||t.isMacintosh&&t.isNative?"classic":r}e.getMenuBarVisibility=k;function E(S){if(t.isWeb)return"custom";const C=S.getValue("window");if(C){if(t.isMacintosh&&C.nativeTabs===!0||t.isMacintosh&&C.nativeFullScreen===!1)return"native";const i=C.titleBarStyle;if(i==="native"||i==="custom")return i}return t.isLinux?"native":"custom"}e.getTitleBarStyle=E;function I(S){if(!t.isWindows||t.isWeb||E(S)==="native")return!1;const C=S.getValue("window.experimental.windowControlsOverlay.enabled");return typeof C=="boolean"?C:!1}e.useWindowControlsOverlay=I;function b(S=0){return Math.pow(1.2,S)}e.zoomLevelToZoomFactor=b}),define(ae[829],le([1,0,86,166,243]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.zoomOut=e.zoomIn=e.applyZoom=void 0;function A(I){p.webFrame.setZoomLevel(I),(0,t.setZoomFactor)((0,R.zoomLevelToZoomFactor)(I)),(0,t.setZoomLevel)(I,!1)}e.applyZoom=A;function k(){A((0,t.getZoomLevel)()+1)}e.zoomIn=k;function E(){A((0,t.getZoomLevel)()-1)}e.zoomOut=E}),define(ae[618],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionIdentityMatch=e.IEditSessionIdentityService=void 0,e.IEditSessionIdentityService=(0,t.createDecorator)("editSessionIdentityService");var p;(function(R){R[R.Complete=100]="Complete",R[R.Partial=50]="Partial",R[R.None=0]="None"})(p=e.EditSessionIdentityMatch||(e.EditSessionIdentityMatch={}))}),define(ae[227],le([1,0,22]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isVirtualWorkspace=e.getVirtualWorkspaceAuthority=e.getVirtualWorkspaceScheme=e.getVirtualWorkspaceLocation=e.isVirtualResource=void 0;function p(I){return I.scheme!==t.Schemas.file&&I.scheme!==t.Schemas.vscodeRemote}e.isVirtualResource=p;function R(I){if(I.folders.length)return I.folders.every(b=>p(b.uri))?I.folders[0].uri:void 0;if(I.configuration&&p(I.configuration))return I.configuration}e.getVirtualWorkspaceLocation=R;function A(I){return R(I)?.scheme}e.getVirtualWorkspaceScheme=A;function k(I){return R(I)?.authority}e.getVirtualWorkspaceAuthority=k;function E(I){return R(I)!==void 0}e.isVirtualWorkspace=E}),define(ae[34],le([1,0,1444,53,220,18,9,5,22]),function(J,e,t,p,R,A,k,E,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_SUFFIX=e.WORKSPACE_EXTENSION=e.toWorkspaceFolder=e.WorkspaceFolder=e.Workspace=e.isWorkspaceFolder=e.isWorkspace=e.WorkbenchState=e.reviveIdentifier=e.isWorkspaceIdentifier=e.toWorkspaceIdentifier=e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE=e.isSingleFolderWorkspaceIdentifier=e.IWorkspaceContextService=void 0,e.IWorkspaceContextService=(0,E.createDecorator)("contextService");function b(g){const h=g;return typeof h?.id=="string"&&k.URI.isUri(h.uri)}e.isSingleFolderWorkspaceIdentifier=b,e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE={id:"ext-dev"};function S(g,h){if(typeof g=="string"||typeof g>"u")return typeof g=="string"?{id:(0,p.basename)(g)}:h?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:void 0;const v=g;if(v.configuration)return{id:v.id,configPath:v.configuration};if(v.folders.length===1)return{id:v.id,uri:v.folders[0].uri}}e.toWorkspaceIdentifier=S;function C(g){const h=g;return typeof h?.id=="string"&&k.URI.isUri(h.configPath)}e.isWorkspaceIdentifier=C;function r(g){const h=g;if(h?.uri)return{id:h.id,uri:k.URI.revive(h.uri)};const v=g;if(v?.configPath)return{id:v.id,configPath:k.URI.revive(v.configPath)};if(g?.id)return{id:g.id}}e.reviveIdentifier=r;var u;(function(g){g[g.EMPTY=1]="EMPTY",g[g.FOLDER=2]="FOLDER",g[g.WORKSPACE=3]="WORKSPACE"})(u=e.WorkbenchState||(e.WorkbenchState={}));function i(g){const h=g;return!!(h&&typeof h=="object"&&typeof h.id=="string"&&Array.isArray(h.folders))}e.isWorkspace=i;function f(g){const h=g;return!!(h&&typeof h=="object"&&k.URI.isUri(h.uri)&&typeof h.name=="string"&&typeof h.toResource=="function")}e.isWorkspaceFolder=f;class c{constructor(h,v,m,w,D){this._id=h,this._transient=m,this._configuration=w,this._ignorePathCasing=D,this._foldersMap=R.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=v}update(h){this._id=h.id,this._configuration=h.configuration,this._transient=h.transient,this._ignorePathCasing=h._ignorePathCasing,this.folders=h.folders}get folders(){return this._folders}set folders(h){this._folders=h,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(h){this._configuration=h}getFolder(h){return h&&this._foldersMap.findSubstr(h)||null}updateFoldersMap(){this._foldersMap=R.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const h of this.folders)this._foldersMap.set(h.uri,h)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=c;class l{constructor(h,v){this.raw=v,this.uri=h.uri,this.index=h.index,this.name=h.name}toResource(h){return(0,A.joinPath)(this.uri,h)}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=l;function s(g){return new l({uri:g,index:0,name:(0,A.basenameOrAuthority)(g)},{uri:g.toString()})}e.toWorkspaceFolder=s,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_SUFFIX=`.${e.WORKSPACE_EXTENSION}`,e.WORKSPACE_FILTER=[{name:(0,t.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.UNTITLED_WORKSPACE_NAME="workspace.json";function d(g,h){return A.extUriBiasedIgnorePathCase.isEqualOrParent(g,h.untitledWorkspacesHome)}e.isUntitledWorkspace=d;function n(g){let h;return k.URI.isUri(g)?h=g:h=g.configuration,h?.scheme===I.Schemas.tmp}e.isTemporaryWorkspace=n;function a(g,h){return!d(g,h)&&!n(g)}e.isSavedWorkspace=a;function o(g){return(typeof g=="string"?(0,p.extname)(g):(0,A.extname)(g))===e.WORKSPACE_SUFFIX}e.hasWorkspaceFileExtension=o}),define(ae[830],le([1,0,11,358,2,160,18,9,503,40,145,20,61,266,207,1344,66,34]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=void 0;let s=class extends R.Disposable{constructor(a,o,g,h,v){super(),this._bulkEditService=o,this._languageFeaturesService=g,this._progressService=h,this._register(a.onDropIntoEditor(m=>this.onDropIntoEditor(a,m.position,m.event))),this._languageFeaturesService.documentOnDropEditProvider.register("*",new d(v))}async onDropIntoEditor(a,o,g){if(!g.dataTransfer||!a.hasModel())return;const h=a.getModel(),v=h.getVersionId(),m=await this.extractDataTransferData(g);if(m.size===0||a.getModel().getVersionId()!==v)return;const w=new u.EditorStateCancellationTokenSource(a,1);try{const D=this._languageFeaturesService.documentOnDropEditProvider.ordered(h),y=await this._progressService.withProgress({location:15,delay:750,title:(0,f.localize)(0,null),cancellable:!0},()=>(0,t.raceCancellation)((async()=>{for(const T of D){const _=await T.provideDocumentOnDropEdits(h,o,m,w.token);if(w.token.isCancellationRequested)return;if(_)return _}})(),w.token),()=>{w.cancel()});if(w.token.isCancellationRequested||a.getModel().getVersionId()!==v)return;if(y){const T=typeof y.insertText=="string"?i.SnippetParser.escape(y.insertText):y.insertText.snippet,_={edits:[new S.ResourceTextEdit(h.uri,{range:new C.Range(o.lineNumber,o.column,o.lineNumber,o.column),text:T,insertAsSnippet:!0}),...y.additionalEdit?.edits??[]]};await this._bulkEditService.apply(_,{editor:a});return}}finally{w.dispose()}}async extractDataTransferData(a){if(!a.dataTransfer)return new p.VSDataTransfer;const o=(0,I.toVSDataTransfer)(a.dataTransfer);return(0,I.addExternalEditorsDropData)(o,a),o}};s.ID="editor.contrib.dropIntoEditorController",s=we([F(1,S.IBulkEditService),F(2,r.ILanguageFeaturesService),F(3,c.IProgressService),F(4,l.IWorkspaceContextService)],s),e.DropIntoEditorController=s;let d=class{constructor(a){this._workspaceContextService=a}async provideDocumentOnDropEdits(a,o,g,h){const v=g.get(A.Mimes.uriList);if(v){const w=await v.asString(),D=this.getUriListInsertText(w);if(D)return{insertText:D}}const m=g.get("text")??g.get(A.Mimes.text);if(m)return{insertText:await m.asString()}}getUriListInsertText(a){const o=[];for(const g of I.UriList.parse(a))try{o.push(E.URI.parse(g))}catch{}if(!!o.length)return o.map(g=>{const h=this._workspaceContextService.getWorkspaceFolder(g);if(h){const v=(0,k.relativePath)(h.uri,g);if(v)return v}return g.fsPath}).join(" ")}};d=we([F(0,l.IWorkspaceContextService)],d),(0,b.registerEditorContribution)(s.ID,s)}),define(ae[831],le([1,0,130,53,18,28,72,122,207,1386,34]),function(J,e,t,p,R,A,k,E,I,b,S){"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(n){this._delegates=n}resolve(n){for(const a of this._delegates){const o=a.resolve(n);if(o!==void 0)return o}}}e.CompositeSnippetVariableResolver=C;class r{constructor(n,a,o,g){this._model=n,this._selection=a,this._selectionIdx=o,this._overtypingCapturer=g}resolve(n){const{name:a}=n;if(a==="SELECTION"||a==="TM_SELECTED_TEXT"){let o=this._model.getValueInRange(this._selection)||void 0,g=this._selection.startLineNumber!==this._selection.endLineNumber;if(!o&&this._overtypingCapturer){const h=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);h&&(o=h.value,g=h.multiline)}if(o&&g&&n.snippet){const h=this._model.getLineContent(this._selection.startLineNumber),v=(0,A.getLeadingWhitespace)(h,0,this._selection.startColumn-1);let m=v;n.snippet.walk(D=>D===n?!1:(D instanceof I.Text&&(m=(0,A.getLeadingWhitespace)((0,A.splitLines)(D.value).pop())),!0));const w=(0,A.commonPrefixLength)(m,v);o=o.replace(/(\r\n|\r|\n)(.*)/g,(D,y,T)=>`${y}${m.substr(w)}${T}`)}return o}else{if(a==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(a==="TM_CURRENT_WORD"){const o=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return o&&o.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=r;class u{constructor(n,a){this._labelService=n,this._model=a}resolve(n){const{name:a}=n;if(a==="TM_FILENAME")return p.basename(this._model.uri.fsPath);if(a==="TM_FILENAME_BASE"){const o=p.basename(this._model.uri.fsPath),g=o.lastIndexOf(".");return g<=0?o:o.slice(0,g)}else{if(a==="TM_DIRECTORY")return p.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,R.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=u;class i{constructor(n,a,o,g){this._readClipboardText=n,this._selectionIdx=a,this._selectionCount=o,this._spread=g}resolve(n){if(n.name!=="CLIPBOARD")return;const a=this._readClipboardText();if(!!a){if(this._spread){const o=a.split(/\r\n|\n|\r/).filter(g=>!(0,A.isFalsyOrWhitespace)(g));if(o.length===this._selectionCount)return o[this._selectionIdx]}return a}}}e.ClipboardBasedVariableResolver=i;let f=class{constructor(n,a,o){this._model=n,this._selection=a,this._languageConfigurationService=o}resolve(n){const{name:a}=n,o=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),g=this._languageConfigurationService.getLanguageConfiguration(o).comments;if(!!g){if(a==="LINE_COMMENT")return g.lineCommentToken||void 0;if(a==="BLOCK_COMMENT_START")return g.blockCommentStartToken||void 0;if(a==="BLOCK_COMMENT_END")return g.blockCommentEndToken||void 0}}};f=we([F(2,E.ILanguageConfigurationService)],f),e.CommentBasedVariableResolver=f;class c{constructor(){this._date=new Date}resolve(n){const{name:a}=n;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 c.dayNames[this._date.getDay()];if(a==="CURRENT_DAY_NAME_SHORT")return c.dayNamesShort[this._date.getDay()];if(a==="CURRENT_MONTH_NAME")return c.monthNames[this._date.getMonth()];if(a==="CURRENT_MONTH_NAME_SHORT")return c.monthNamesShort[this._date.getMonth()];if(a==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}e.TimeBasedVariableResolver=c,c.dayNames=[b.localize(0,null),b.localize(1,null),b.localize(2,null),b.localize(3,null),b.localize(4,null),b.localize(5,null),b.localize(6,null)],c.dayNamesShort=[b.localize(7,null),b.localize(8,null),b.localize(9,null),b.localize(10,null),b.localize(11,null),b.localize(12,null),b.localize(13,null)],c.monthNames=[b.localize(14,null),b.localize(15,null),b.localize(16,null),b.localize(17,null),b.localize(18,null),b.localize(19,null),b.localize(20,null),b.localize(21,null),b.localize(22,null),b.localize(23,null),b.localize(24,null),b.localize(25,null)],c.monthNamesShort=[b.localize(26,null),b.localize(27,null),b.localize(28,null),b.localize(29,null),b.localize(30,null),b.localize(31,null),b.localize(32,null),b.localize(33,null),b.localize(34,null),b.localize(35,null),b.localize(36,null),b.localize(37,null)];class l{constructor(n){this._workspaceService=n}resolve(n){if(!this._workspaceService)return;const a=(0,S.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!!a){if(n.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(a);if(n.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(a)}}_resolveWorkspaceName(n){if((0,S.isSingleFolderWorkspaceIdentifier)(n))return p.basename(n.uri.path);let a=p.basename(n.configPath.path);return a.endsWith(S.WORKSPACE_EXTENSION)&&(a=a.substr(0,a.length-S.WORKSPACE_EXTENSION.length-1)),a}_resoveWorkspacePath(n){if((0,S.isSingleFolderWorkspaceIdentifier)(n))return(0,t.normalizeDriveLetter)(n.uri.fsPath);const a=p.basename(n.configPath.path);let o=n.configPath.fsPath;return o.endsWith(a)&&(o=o.substr(0,o.length-a.length-1)),o?(0,t.normalizeDriveLetter)(o):"/"}}e.WorkspaceBasedVariableResolver=l;class s{resolve(n){const{name:a}=n;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=s}),define(ae[832],le([1,0,16,2,28,13,138,20,85,122,94,49,34,207,831,1093]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class f{constructor(d,n,a){this._editor=d,this._snippet=n,this._snippetLineLeadingWhitespace=a,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,t.groupBy)(n.placeholders,u.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}initialize(d){this._offset=d.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const d=this._editor.getModel();this._editor.changeDecorations(n=>{for(const a of this._snippet.placeholders){const o=this._snippet.offset(a),g=this._snippet.fullLen(a),h=E.Range.fromPositions(d.getPositionAt(this._offset+o),d.getPositionAt(this._offset+o+g)),v=a.isFinalTabstop?f._decor.inactiveFinal:f._decor.inactive,m=n.addDecoration(h,v);this._placeholderDecorations.set(a,m)}})}move(d){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const o=[];for(const g of this._placeholderGroups[this._placeholderGroupsIdx])if(g.transform){const h=this._placeholderDecorations.get(g),v=this._editor.getModel().getDecorationRange(h),m=this._editor.getModel().getValueInRange(v),w=g.transform.resolve(m).split(/\r\n|\r|\n/);for(let D=1;D<w.length;D++)w[D]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+w[D]);o.push(k.EditOperation.replace(v,w.join(this._editor.getModel().getEOL())))}o.length>0&&this._editor.executeEdits("snippet.placeholderTransform",o)}let n=!1;d===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,n=!0):d===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,n=!0);const a=this._editor.getModel().changeDecorations(o=>{const g=new Set,h=[];for(const v of this._placeholderGroups[this._placeholderGroupsIdx]){const m=this._placeholderDecorations.get(v),w=this._editor.getModel().getDecorationRange(m);h.push(new I.Selection(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn)),n=n&&this._hasPlaceholderBeenCollapsed(v),o.changeDecorationOptions(m,v.isFinalTabstop?f._decor.activeFinal:f._decor.active),g.add(v);for(const D of this._snippet.enclosingPlaceholders(v)){const y=this._placeholderDecorations.get(D);o.changeDecorationOptions(y,D.isFinalTabstop?f._decor.activeFinal:f._decor.active),g.add(D)}}for(const[v,m]of this._placeholderDecorations)g.has(v)||o.changeDecorationOptions(m,v.isFinalTabstop?f._decor.inactiveFinal:f._decor.inactive);return h});return n?this.move(d):a??[]}_hasPlaceholderBeenCollapsed(d){let n=d;for(;n;){if(n instanceof u.Placeholder){const a=this._placeholderDecorations.get(n);if(this._editor.getModel().getDecorationRange(a).isEmpty()&&n.toString().length>0)return!0}n=n.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}get isTrivialSnippet(){return this._snippet.placeholders.length===0||this._snippet.placeholders.length===1&&this._snippet.placeholders[0].isFinalTabstop}computePossibleSelections(){const d=new Map;for(const n of this._placeholderGroups){let a;for(const o of n){if(o.isFinalTabstop)break;a||(a=[],d.set(o.index,a));const g=this._placeholderDecorations.get(o),h=this._editor.getModel().getDecorationRange(g);if(!h){d.delete(o.index);break}a.push(h)}}return d}get activeChoice(){if(!this._placeholderDecorations)return;const d=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!d?.choice)return;const n=this._placeholderDecorations.get(d);if(!n)return;const a=this._editor.getModel().getDecorationRange(n);if(!!a)return{range:a,choice:d.choice}}get hasChoice(){let d=!1;return this._snippet.walk(n=>(d=n instanceof u.Choice,!d)),d}merge(d){const n=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(a=>{for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const g=d.shift();console.assert(g._offset!==-1),console.assert(!g._placeholderDecorations);const h=g._snippet.placeholderInfo.last.index;for(const m of g._snippet.placeholderInfo.all)m.isFinalTabstop?m.index=o.index+(h+1)/this._nestingLevel:m.index=o.index+m.index/this._nestingLevel;this._snippet.replace(o,g._snippet.children);const v=this._placeholderDecorations.get(o);a.removeDecoration(v),this._placeholderDecorations.delete(o);for(const m of g._snippet.placeholders){const w=g._snippet.offset(m),D=g._snippet.fullLen(m),y=E.Range.fromPositions(n.getPositionAt(g._offset+w),n.getPositionAt(g._offset+w+D)),T=a.addDecoration(y,f._decor.inactive);this._placeholderDecorations.set(m,T)}}this._placeholderGroups=(0,t.groupBy)(this._snippet.placeholders,u.Placeholder.compareByIndex)})}getEnclosingRange(){let d;const n=this._editor.getModel();for(const a of this._placeholderDecorations.values()){const o=(0,A.withNullAsUndefined)(n.getDecorationRange(a));d?d=d.plusRange(o):d=o}return d}}e.OneSnippet=f,f._decor={active:S.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:S.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:S.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:S.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const c={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let l=class ki{static adjustWhitespace(d,n,a,o,g){const h=d.getLineContent(n.lineNumber),v=(0,R.getLeadingWhitespace)(h,0,n.column-1);let m;return a.walk(w=>{if(!(w instanceof u.Text)||w.parent instanceof u.Choice)return!0;const D=w.value.split(/\r\n|\r|\n/);if(o){const T=a.offset(w);if(T===0)D[0]=d.normalizeIndentation(D[0]);else{m=m??a.toString();const _=m.charCodeAt(T-1);(_===10||_===13)&&(D[0]=d.normalizeIndentation(v+D[0]))}for(let _=1;_<D.length;_++)D[_]=d.normalizeIndentation(v+D[_])}const y=D.join(d.getEOL());return y!==w.value&&(w.parent.replace(w,[new u.Text(y)]),m=void 0),!0}),v}static adjustSelection(d,n,a,o){if(a!==0||o!==0){const{positionLineNumber:g,positionColumn:h}=n,v=h-a,m=h+o,w=d.validateRange({startLineNumber:g,startColumn:v,endLineNumber:g,endColumn:m});n=I.Selection.createWithDirection(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn,n.getDirection())}return n}static createEditsAndSnippetsFromSelections(d,n,a,o,g,h,v,m,w){const D=[],y=[];if(!d.hasModel())return{edits:D,snippets:y};const T=d.getModel(),_=d.invokeWithinContext(V=>V.get(r.IWorkspaceContextService)),L=d.invokeWithinContext(V=>new i.ModelBasedVariableResolver(V.get(C.ILabelService),T)),M=()=>v,O=T.getValueInRange(ki.adjustSelection(T,d.getSelection(),a,0)),N=T.getValueInRange(ki.adjustSelection(T,d.getSelection(),0,o)),P=T.getLineFirstNonWhitespaceColumn(d.getSelection().positionLineNumber),B=d.getSelections().map((V,z)=>({selection:V,idx:z})).sort((V,z)=>E.Range.compareRangesUsingStarts(V.selection,z.selection));for(const{selection:V,idx:z}of B){let x=ki.adjustSelection(T,V,a,0),H=ki.adjustSelection(T,V,0,o);O!==T.getValueInRange(x)&&(x=V),N!==T.getValueInRange(H)&&(H=V);const W=V.setStartPosition(x.startLineNumber,x.startColumn).setEndPosition(H.endLineNumber,H.endColumn),U=new u.SnippetParser().parse(n,!0,g),$=W.getStartPosition(),q=ki.adjustWhitespace(T,$,U,h||z>0&&P!==T.getLineFirstNonWhitespaceColumn(V.positionLineNumber),!0);U.resolveVariables(new i.CompositeSnippetVariableResolver([L,new i.ClipboardBasedVariableResolver(M,z,B.length,d.getOption(72)==="spread"),new i.SelectionBasedVariableResolver(T,V,z,m),new i.CommentBasedVariableResolver(T,V,w),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(_),new i.RandomBasedVariableResolver])),D[z]=k.EditOperation.replace(W,U.toString()),D[z].identifier={major:z,minor:0},D[z]._isTracked=!0,y[z]=new f(d,U,q)}return{edits:D,snippets:y}}static createEditsAndSnippetsFromEdits(d,n,a,o,g,h,v){if(!d.hasModel()||n.length===0)return{edits:[],snippets:[]};const m=[],w=d.getModel(),D=new u.SnippetParser,y=new u.TextmateSnippet,T=new i.CompositeSnippetVariableResolver([d.invokeWithinContext(L=>new i.ModelBasedVariableResolver(L.get(C.ILabelService),w)),new i.ClipboardBasedVariableResolver(()=>g,0,d.getSelections().length,d.getOption(72)==="spread"),new i.SelectionBasedVariableResolver(w,d.getSelection(),0,h),new i.CommentBasedVariableResolver(w,d.getSelection(),v),new i.TimeBasedVariableResolver,new i.WorkspaceBasedVariableResolver(d.invokeWithinContext(L=>L.get(r.IWorkspaceContextService))),new i.RandomBasedVariableResolver]);n=n.sort((L,M)=>E.Range.compareRangesUsingStarts(L.range,M.range));let _=0;for(let L=0;L<n.length;L++){const{range:M,template:O}=n[L];if(L>0){const V=n[L-1].range,z=E.Range.fromPositions(V.getEndPosition(),M.getStartPosition()),x=new u.Text(w.getValueInRange(z));y.appendChild(x),_+=x.value.length}D.parseFragment(O,y),y.resolveVariables(T);const N=y.toString(),P=N.slice(_);_=N.length;const B=k.EditOperation.replace(M,P);B.identifier={major:L,minor:0},B._isTracked=!0,m.push(B)}return D.ensureFinalTabstop(y,a,!0),{edits:m,snippets:[new f(d,y,"")]}}constructor(d,n,a=c,o){this._editor=d,this._template=n,this._options=a,this._languageConfigurationService=o,this._templateMerges=[],this._snippets=[]}dispose(){(0,p.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:d,snippets:n}=typeof this._template=="string"?ki.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):ki.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=n,this._editor.executeEdits("snippet",d,a=>{const o=a.filter(g=>!!g.identifier);for(let g=0;g<n.length;g++)n[g].initialize(o[g].textChange);return this._snippets[0].hasPlaceholder?this._move(!0):o.map(g=>I.Selection.fromPositions(g.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(d,n=c){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,d]);const{edits:a,snippets:o}=ki.createEditsAndSnippetsFromSelections(this._editor,d,n.overwriteBefore,n.overwriteAfter,!0,n.adjustWhitespace,n.clipboardText,n.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",a,g=>{const h=g.filter(m=>!!m.identifier);for(let m=0;m<o.length;m++)o[m].initialize(h[m].textChange);const v=o[0].isTrivialSnippet;if(!v){for(const m of this._snippets)m.merge(o);console.assert(o.length===0)}return this._snippets[0].hasPlaceholder&&!v?this._move(void 0):h.map(m=>I.Selection.fromPositions(m.range.getEndPosition()))})}next(){const d=this._move(!0);this._editor.setSelections(d),this._editor.revealPositionInCenterIfOutsideViewport(d[0].getPosition())}prev(){const d=this._move(!1);this._editor.setSelections(d),this._editor.revealPositionInCenterIfOutsideViewport(d[0].getPosition())}_move(d){const n=[];for(const a of this._snippets){const o=a.move(d);n.push(...o)}return n}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const d=this._editor.getSelections();if(d.length<this._snippets.length)return!1;const n=new Map;for(const a of this._snippets){const o=a.computePossibleSelections();if(n.size===0)for(const[g,h]of o){h.sort(E.Range.compareRangesUsingStarts);for(const v of d)if(h[0].containsRange(v)){n.set(g,[]);break}}if(n.size===0)return!1;n.forEach((g,h)=>{g.push(...o.get(h))})}d.sort(E.Range.compareRangesUsingStarts);for(const[a,o]of n){if(o.length!==d.length){n.delete(a);continue}o.sort(E.Range.compareRangesUsingStarts);for(let g=0;g<o.length;g++)if(!o[g].containsRange(d[g])){n.delete(a);continue}}return n.size>0}getEnclosingRange(){let d;for(const n of this._snippets){const a=n.getEnclosingRange();d?d=d.plusRange(a):d=a}return d}};l=we([F(3,b.ILanguageConfigurationService)],l),e.SnippetSession=l}),define(ae[168],le([1,0,2,13,40,50,59,122,61,224,1385,7,25,832]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const i={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let f=class Mn{static get(s){return s.getContribution(Mn.ID)}constructor(s,d,n,a,o){this._editor=s,this._logService=d,this._languageFeaturesService=n,this._languageConfigurationService=o,this._snippetListener=new t.DisposableStore,this._modelVersionId=-1,this._inSnippet=Mn.InSnippetMode.bindTo(a),this._hasNextTabstop=Mn.HasNextTabstop.bindTo(a),this._hasPrevTabstop=Mn.HasPrevTabstop.bindTo(a)}dispose(){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._session?.dispose(),this._snippetListener.dispose()}apply(s,d){try{this._doInsert(s,typeof d>"u"?i:{...i,...d})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_edits=",s),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}insert(s,d){try{this._doInsert(s,typeof d>"u"?i:{...i,...d})}catch(n){this.cancel(),this._logService.error(n),this._logService.error("snippet_error"),this._logService.error("insert_template=",s),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(s,d){if(!!this._editor.hasModel()){if(this._snippetListener.clear(),d.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof s!="string"&&this.cancel(),this._session?((0,p.assertType)(typeof s=="string"),this._session.merge(s,d)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new u.SnippetSession(this._editor,s,d,this._languageConfigurationService),this._session.insert()),d.undoStopAfter&&this._editor.getModel().pushStackElement(),this._session?.hasChoice){this._choiceCompletionItemProvider={provideCompletionItems:(a,o)=>{if(!this._session||a!==this._editor.getModel()||!A.Position.equals(this._editor.getPosition(),o))return;const{activeChoice:g}=this._session;if(!g||g.choice.options.length===0)return;const h=a.getValueInRange(g.range),v=Boolean(g.choice.options.find(w=>w.value===h)),m=[];for(let w=0;w<g.choice.options.length;w++){const D=g.choice.options[w];m.push({kind:13,label:D.value,insertText:D.value,sortText:"a".repeat(w+1),range:g.range,filterText:v?`${h}_${D.value}`:void 0,command:{id:"jumpToNextSnippetPlaceholder",title:(0,S.localize)(3,null)}})}return{suggestions:m}}};const n=this._languageFeaturesService.completionProvider.register({language:this._editor.getModel().getLanguageId(),pattern:this._editor.getModel().uri.fsPath,scheme:this._editor.getModel().uri.scheme},this._choiceCompletionItemProvider);this._snippetListener.add(n)}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(n=>n.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{activeChoice:s}=this._session;if(!s||!this._choiceCompletionItemProvider){this._currentChoice=void 0;return}this._currentChoice!==s.choice&&(this._currentChoice=s.choice,queueMicrotask(()=>{(0,b.showSimpleSuggestions)(this._editor,this._choiceCompletionItemProvider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(s=!1){this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,this._session?.dispose(),this._session=void 0,this._modelVersionId=-1,s&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session?.prev(),this._updateState()}next(){this._session?.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}getSessionEnclosingRange(){if(this._session)return this._session.getEnclosingRange()}};f.ID="snippetController2",f.InSnippetMode=new C.RawContextKey("inSnippetMode",!1,(0,S.localize)(0,null)),f.HasNextTabstop=new C.RawContextKey("hasNextTabstop",!1,(0,S.localize)(1,null)),f.HasPrevTabstop=new C.RawContextKey("hasPrevTabstop",!1,(0,S.localize)(2,null)),f=we([F(1,r.ILogService),F(2,I.ILanguageFeaturesService),F(3,C.IContextKeyService),F(4,E.ILanguageConfigurationService)],f),e.SnippetController2=f,(0,R.registerEditorContribution)(f.ID,f);const c=R.EditorCommand.bindToContribution(f.get);(0,R.registerEditorCommand)(new c({id:"jumpToNextSnippetPlaceholder",precondition:C.ContextKeyExpr.and(f.InSnippetMode,f.HasNextTabstop),handler:l=>l.next(),kbOpts:{weight:100+30,kbExpr:k.EditorContextKeys.editorTextFocus,primary:2}})),(0,R.registerEditorCommand)(new c({id:"jumpToPrevSnippetPlaceholder",precondition:C.ContextKeyExpr.and(f.InSnippetMode,f.HasPrevTabstop),handler:l=>l.prev(),kbOpts:{weight:100+30,kbExpr:k.EditorContextKeys.editorTextFocus,primary:1026}})),(0,R.registerEditorCommand)(new c({id:"leaveSnippet",precondition:f.InSnippetMode,handler:l=>l.cancel(!0),kbOpts:{weight:100+30,kbExpr:k.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,R.registerEditorCommand)(new c({id:"acceptSnippet",precondition:f.InSnippetMode,handler:l=>l.finish()}))}),define(ae[833],le([1,0,11,32,21,6,2,332,138,20,92,496,31,571,596,122,1289,61,242,207,168,171,96,572,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.provideInlineCompletions=e.SynchronizedInlineCompletionsCache=e.UpdateOperation=e.InlineCompletionsSession=e.InlineCompletionsModel=void 0;let v=class extends k.Disposable{constructor(O,N,P,B,V,z,x){super(),this.editor=O,this.cache=N,this.commandService=P,this.languageConfigurationService=B,this.languageFeaturesService=V,this.debounceService=z,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:50}),this._register(P.onDidExecuteCommand(H=>{new Set([E.CoreEditingCommands.Tab.id,E.CoreEditingCommands.DeleteLeft.id,E.CoreEditingCommands.DeleteRight.id,u.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(H.commandId)&&O.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(H=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(H=>{(H.reason===3||this.session&&!this.session.isValid)&&this.hide()})),this._register((0,k.toDisposable)(()=>{this.disposed=!0})),this._register(this.editor.onDidBlurEditorWidget(()=>{x.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(O){this.session?.setExpanded(O)}setActive(O){this.active=O,O&&this.session?.scheduleAutomaticUpdate()}startSessionIfTriggered(){!this.editor.getOption(56).enabled||this.session&&this.session.isValid||this.trigger(S.InlineCompletionTriggerKind.Automatic)}trigger(O){if(this.completionSession.value){O===S.InlineCompletionTriggerKind.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new m(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,O,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 O=await this.session?.hasMultipleInlineCompletions();return O!==void 0?O:!1}};v=we([F(2,r.ICommandService),F(3,f.ILanguageConfigurationService),F(4,l.ILanguageFeaturesService),F(5,s.ILanguageFeatureDebounceService),F(6,h.IConfigurationService)],v),e.InlineCompletionsModel=v;class m extends C.BaseGhostTextWidgetModel{constructor(O,N,P,B,V,z,x,H,W){super(O),this.triggerPosition=N,this.shouldUpdate=P,this.commandService=B,this.cache=V,this.initialTriggerKind=z,this.languageConfigurationService=x,this.registry=H,this.debounce=W,this.minReservedLineCount=0,this.updateOperation=this._register(new k.MutableDisposable),this.updateSoon=this._register(new t.RunOnceScheduler(()=>{const $=this.initialTriggerKind;return this.initialTriggerKind=S.InlineCompletionTriggerKind.Automatic,this.update($)},50)),this.filteredCompletions=[],this.currentlySelectedCompletionId=void 0;let U;this._register(this.onDidChange(()=>{const $=this.currentCompletion;$&&$.sourceInlineCompletion!==U&&(U=$.sourceInlineCompletion,$.sourceProvider.handleItemDidShow?.($.sourceInlineCompletions,U))})),this._register((0,k.toDisposable)(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition($=>{$.reason!==3&&(this.cache.value?.updateRanges(),this.cache.value&&(this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire()))})),this._register(this.editor.onDidChangeModelContent($=>{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 O=this.editor.getModel(),N=O.validatePosition(this.editor.getPosition());this.filteredCompletions=this.cache.value.completions.filter(P=>{const B=O.getValueInRange(P.synchronizedRange).toLowerCase(),V=P.inlineCompletion.filterText.toLowerCase(),z=O.getLineIndentColumn(P.synchronizedRange.startLineNumber),x=Math.max(0,N.column-P.synchronizedRange.startColumn);let H=V.substring(0,x),W=V.substring(x),U=B.substring(0,x),$=B.substring(x);return P.synchronizedRange.startColumn<=z&&(U=U.trimStart(),U.length===0&&($=$.trimStart()),H=H.trimStart(),H.length===0&&(W=W.trimStart())),H.startsWith(U)&&(0,o.matchesSubString)($,W)})}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const O=this.filteredCompletions.findIndex(N=>N.semanticId===this.currentlySelectedCompletionId);return O===-1?(this.currentlySelectedCompletionId=void 0,0):O}get currentCachedCompletion(){if(!!this.cache.value)return this.filteredCompletions[this.fixAndGetIndexOfCurrentSelection()]}async showNextInlineCompletion(){await this.ensureUpdateWithExplicitContext();const O=this.filteredCompletions||[];if(O.length>0){const N=(this.fixAndGetIndexOfCurrentSelection()+1)%O.length;this.currentlySelectedCompletionId=O[N].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}async showPreviousInlineCompletion(){await this.ensureUpdateWithExplicitContext();const O=this.filteredCompletions||[];if(O.length>0){const N=(this.fixAndGetIndexOfCurrentSelection()+O.length-1)%O.length;this.currentlySelectedCompletionId=O[N].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}async ensureUpdateWithExplicitContext(){this.updateOperation.value?this.updateOperation.value.triggerKind===S.InlineCompletionTriggerKind.Explicit?await this.updateOperation.value.promise:await this.update(S.InlineCompletionTriggerKind.Explicit):this.cache.value?.triggerKind!==S.InlineCompletionTriggerKind.Explicit&&await this.update(S.InlineCompletionTriggerKind.Explicit)}async hasMultipleInlineCompletions(){return await this.ensureUpdateWithExplicitContext(),(this.cache.value?.completions.length||0)>1}get ghostText(){const O=this.currentCompletion;if(!O)return;const N=this.editor.getPosition();if(O.range.getEndPosition().isBefore(N))return;const P=this.editor.getOptions().get(56).mode,B=(0,i.inlineCompletionToGhostText)(O,this.editor.getModel(),P,N);return B?B.isEmpty()?void 0:B:new C.GhostTextReplacement(O.range.startLineNumber,O.range.startColumn,O.range.endColumn-O.range.startColumn,O.insertText.split(` `),0)}get currentCompletion(){const O=this.currentCachedCompletion;if(!!O)return O.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(O){if(!this.shouldUpdate())return;const N=this.editor.getPosition(),P=new Date,B=(0,t.createCancelablePromise)(async z=>{let x;try{x=await T(this.registry,N,this.editor.getModel(),{triggerKind:O,selectedSuggestionInfo:void 0},z,this.languageConfigurationService);const H=new Date;this.debounce.update(this.editor.getModel(),H.getTime()-P.getTime())}catch(H){(0,R.onUnexpectedError)(H);return}z.isCancellationRequested||(this.cache.setValue(this.editor,x,O),this.updateFilteredInlineCompletions(),this.onDidChangeEmitter.fire())}),V=new w(B,O);this.updateOperation.value=V,await B,this.updateOperation.value===V&&this.updateOperation.clear()}takeOwnership(O){this._register(O)}commitCurrentCompletion(){if(!this.ghostText)return;const N=this.currentCompletion;N&&this.commit(N)}commit(O){const N=this.cache.clearAndLeak();this.editor.pushUndoStop(),O.snippetInfo?(this.editor.executeEdits("inlineSuggestion.accept",[I.EditOperation.replaceMove(O.range,""),...O.additionalTextEdits]),this.editor.setPosition(O.snippetInfo.range.getStartPosition()),n.SnippetController2.get(this.editor)?.insert(O.snippetInfo.snippet,{undoStopBefore:!1})):this.editor.executeEdits("inlineSuggestion.accept",[I.EditOperation.replaceMove(O.range,O.insertText),...O.additionalTextEdits]),O.command?this.commandService.executeCommand(O.command.id,...O.command.arguments||[]).finally(()=>{N?.dispose()}).then(void 0,R.onUnexpectedExternalError):N?.dispose(),this.onDidChangeEmitter.fire()}get commands(){return[...new Set(this.cache.value?.completions.map(N=>N.inlineCompletion.sourceInlineCompletions)||[])].flatMap(N=>N.commands||[])}}e.InlineCompletionsSession=m;class w{constructor(O,N){this.promise=O,this.triggerKind=N}dispose(){this.promise.cancel()}}e.UpdateOperation=w;class D extends k.Disposable{constructor(O,N,P,B){super(),this.editor=N,this.onChange=P,this.triggerKind=B,this.isDisposing=!1;const V=N.changeDecorations(z=>z.deltaDecorations([],O.items.map(x=>({range:x.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,k.toDisposable)(()=>{this.isDisposing=!0,N.removeDecorations(V)})),this.completions=O.items.map((z,x)=>new y(z,V[x])),this._register(N.onDidChangeModelContent(()=>{this.updateRanges()})),this._register(O)}updateRanges(){if(this.isDisposing)return;let O=!1;const N=this.editor.getModel();for(const P of this.completions){const B=N.getDecorationRange(P.decorationId);if(!B){(0,R.onUnexpectedError)(new Error("Decoration has no range"));continue}P.synchronizedRange.equalsRange(B)||(O=!0,P.synchronizedRange=B)}O&&this.onChange()}}e.SynchronizedInlineCompletionsCache=D;class y{constructor(O,N){this.inlineCompletion=O,this.decorationId=N,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=O.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(M,O,N,P,B=p.CancellationToken.None,V){const z=_(O,N),x=M.all(N),H=await Promise.all(x.map(async U=>{const $=await Promise.resolve(U.provideInlineCompletions(N,O,P,B)).catch(R.onUnexpectedExternalError);return{completions:$,provider:U,dispose:()=>{$&&U.freeInlineCompletions($)}}})),W=new Map;for(const U of H){const $=U.completions;if(!!$)for(const q of $.items){let X=q.range?b.Range.lift(q.range):z;if(X.startLineNumber!==X.endLineNumber)continue;let G,Q;if(typeof q.insertText=="string"){if(G=q.insertText,V&&q.completeBracketPairs){G=L(G,X.getStartPosition(),N,V);const K=G.length-q.insertText.length;K!==0&&(X=new b.Range(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn+K))}Q=void 0}else if("snippet"in q.insertText){const K=q.insertText.snippet.length;if(V&&q.completeBracketPairs){q.insertText.snippet=L(q.insertText.snippet,X.getStartPosition(),N,V);const ee=q.insertText.snippet.length-K;ee!==0&&(X=new b.Range(X.startLineNumber,X.startColumn,X.endLineNumber,X.endColumn+ee))}G=new d.SnippetParser().parse(q.insertText.snippet).toString(),Q={snippet:q.insertText.snippet,range:X}}else(0,a.assertNever)(q.insertText);const j={insertText:G,snippetInfo:Q,range:X,command:q.command,sourceProvider:U.provider,sourceInlineCompletions:$,sourceInlineCompletion:q,filterText:q.filterText||G,additionalTextEdits:q.additionalTextEdits||(0,g.getReadonlyEmptyArray)()};W.set(JSON.stringify({insertText:G,range:q.range}),j)}}return{items:[...W.values()],dispose:()=>{for(const U of H)U.dispose()}}}e.provideInlineCompletions=T;function _(M,O){const N=O.getWordAtPosition(M),P=O.getLineMaxColumn(M.lineNumber);return N?new b.Range(M.lineNumber,N.startColumn,M.lineNumber,P):b.Range.fromPositions(M,M.with(void 0,P))}function L(M,O,N,P){const V=N.getLineContent(O.lineNumber).substring(0,O.column-1)+M,x=N.tokenization.tokenizeLineWithEdit(O,V.length-(O.column-1),M)?.sliceAndInflate(O.column-1,V.length,0);return x?(0,c.fixBracketsInLine)(x,P):M}}),define(ae[2231],le([1,0,11,32,21,6,2,28,85,212,168,742,93,8,7,25,27,781,224,61,96,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.State=e.LineContext=void 0;class o{static shouldAutoTrigger(y){if(!y.hasModel())return!1;const T=y.getModel(),_=y.getPosition();T.tokenization.tokenizeIfCheap(_.lineNumber);const L=T.getWordAtPosition(_);return!(!L||L.endColumn!==_.column||!isNaN(Number(L.word)))}constructor(y,T,_,L,M){this.leadingLineContent=y.getLineContent(T.lineNumber).substr(0,T.column-1),this.leadingWord=y.getWordUntilPosition(T),this.lineNumber=T.lineNumber,this.column=T.column,this.auto=_,this.shy=L,this.noSelect=M}}e.LineContext=o;var g;(function(D){D[D.Idle=0]="Idle",D[D.Manual=1]="Manual",D[D.Auto=2]="Auto"})(g=e.State||(e.State={}));function h(D){return D.getOption(108).preview}function v(D,y,T){if(!Boolean(y.getContextKeyValue("inlineSuggestionVisible")))return!0;const _=T.getValue("editor.inlineSuggest.allowQuickSuggestions");return _!==void 0?Boolean(_):!1}function m(D,y,T){if(!Boolean(y.getContextKeyValue("inlineSuggestionVisible")))return!0;const _=T.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return _!==void 0?Boolean(_):!1}let w=class la{constructor(y,T,_,L,M,O,N,P){this._editor=y,this._editorWorkerService=T,this._clipboardService=_,this._telemetryService=L,this._logService=M,this._contextKeyService=O,this._configurationService=N,this._languageFeaturesService=P,this._toDispose=new k.DisposableStore,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._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let B=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{B=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{B=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(V=>{B||this._onCursorChange(V)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{B||this._refilterCompletionItems()})),this._updateTriggerCharacters()}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()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(82)||!this._editor.hasModel()||!this._editor.getOption(111))return;const y=new Map;for(const _ of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const L of _.triggerCharacters||[]){let M=y.get(L);M||(M=new Set,M.add((0,s.getSnippetSuggestSupport)()),y.set(L,M)),M.add(_)}const T=_=>{if(!m(this._editor,this._contextKeyService,this._configurationService)||o.shouldAutoTrigger(this._editor))return;if(!_){const O=this._editor.getPosition();_=this._editor.getModel().getLineContent(O.lineNumber).substr(0,O.column-1)}let L="";(0,E.isLowSurrogate)(_.charCodeAt(_.length-1))?(0,E.isHighSurrogate)(_.charCodeAt(_.length-2))&&(L=_.substr(_.length-2)):L=_.charAt(_.length-1);const M=y.get(L);if(M){const O=this._completionModel?{items:this._completionModel.adopt(M),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,noSelect:!1,triggerCharacter:L},Boolean(this._completionModel),M,O)}};this._triggerCharacterListener.add(this._editor.onDidType(T)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>T()))}get state(){return this._state}cancel(y=!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:y}))}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,noSelect:!1},!0))}_onCursorChange(y){if(!this._editor.hasModel())return;const T=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!y.selection.isEmpty()||y.reason!==0&&y.reason!==3||y.source!=="keyboard"&&y.source!=="deleteLeft"){this.cancel();return}this._state===0&&y.reason===0?(T.containsRange(this._currentSelection)||T.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._state!==0&&y.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._state===0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){s.QuickSuggestionsOptions.isAllOff(this._editor.getOption(80))||this._editor.getOption(108).snippetsPreventQuickSuggestions&&S.SnippetController2.get(this._editor)?.isInSnippet()||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!o.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const y=this._editor.getModel(),T=this._editor.getPosition(),_=this._editor.getOption(80);if(!s.QuickSuggestionsOptions.isAllOff(_)){if(!s.QuickSuggestionsOptions.isAllOn(_)){y.tokenization.tokenizeIfCheap(T.lineNumber);const L=y.tokenization.getLineTokens(T.lineNumber),M=L.getStandardTokenType(L.findTokenIndexAtOffset(Math.max(T.column-1-1,0)));if(s.QuickSuggestionsOptions.valueFor(_,M)!=="on")return}!v(this._editor,this._contextKeyService,this._configurationService)||!this._languageFeaturesService.completionProvider.has(y)||this.trigger({auto:!0,shy:!1,noSelect:!1})}},this._editor.getOption(81)))}_refilterCompletionItems(){(0,a.assertType)(this._editor.hasModel());const y=this._editor.getModel(),T=this._editor.getPosition(),_=new o(y,T,this._state===2,!1,!1);this._onNewContext(_)}trigger(y,T=!1,_,L,M){if(!this._editor.hasModel())return;const O=this._editor.getModel(),N=y.auto,P=new o(O,this._editor.getPosition(),N,y.shy,y.noSelect);this.cancel(T),this._state=N?2:1,this._onDidTrigger.fire({auto:N,shy:y.shy,position:this._editor.getPosition()}),this._context=P;let B={triggerKind:y.triggerKind??0};y.triggerCharacter&&(B={triggerKind:1,triggerCharacter:y.triggerCharacter}),this._requestToken=new p.CancellationTokenSource;const V=this._editor.getOption(102);let z=1;switch(V){case"top":z=0;break;case"bottom":z=2;break}const{itemKind:x,showDeprecated:H}=la._createSuggestFilter(this._editor),W=new s.CompletionOptions(z,M?new Set:x,_,H),U=C.WordDistance.create(this._editorWorkerService,this._editor),$=(0,s.provideSuggestionItems)(this._languageFeaturesService.completionProvider,O,this._editor.getPosition(),W,B,this._requestToken.token);Promise.all([$,U]).then(async([q,X])=>{if(this._requestToken?.dispose(),!this._editor.hasModel())return;let G=L?.clipboardText;if(!G&&q.needsClipboard&&(G=await this._clipboardService.readText()),this._state===0)return;const Q=this._editor.getModel();let j=q.items;if(L){const ee=(0,s.getSuggestionComparator)(z);j=j.concat(L.items).sort(ee)}const K=new o(Q,this._editor.getPosition(),N,y.shy,y.noSelect),Y={...n.FuzzyScoreOptions.default,firstMatchCanBeWeak:!this._editor.getOption(108).matchOnWordStartOnly};this._completionModel=new l.CompletionModel(j,this._context.column,{leadingLineContent:K.leadingLineContent,characterCountDelta:K.column-this._context.column},X,this._editor.getOption(108),this._editor.getOption(102),Y,G),this._completionDisposables.add(q.disposable),this._onNewContext(K),this._reportDurationsTelemetry(q.durations)}).catch(R.onUnexpectedError)}_reportDurationsTelemetry(y){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(y)}),this._logService.debug("suggest.durations.json",y)})}static _createSuggestFilter(y){const T=new Set;y.getOption(102)==="none"&&T.add(27);const L=y.getOption(108);return L.showMethods||T.add(0),L.showFunctions||T.add(1),L.showConstructors||T.add(2),L.showFields||T.add(3),L.showVariables||T.add(4),L.showClasses||T.add(5),L.showStructs||T.add(6),L.showInterfaces||T.add(7),L.showModules||T.add(8),L.showProperties||T.add(9),L.showEvents||T.add(10),L.showOperators||T.add(11),L.showUnits||T.add(12),L.showValues||T.add(13),L.showConstants||T.add(14),L.showEnums||T.add(15),L.showEnumMembers||T.add(16),L.showKeywords||T.add(17),L.showWords||T.add(18),L.showColors||T.add(19),L.showFiles||T.add(20),L.showReferences||T.add(21),L.showColors||T.add(22),L.showFolders||T.add(23),L.showTypeParameters||T.add(24),L.showSnippets||T.add(27),L.showUsers||T.add(25),L.showIssues||T.add(26),{itemKind:T,showDeprecated:L.showDeprecated}}_onNewContext(y){if(!!this._context){if(y.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,E.getLeadingWhitespace)(y.leadingLineContent)!==(0,E.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(y.column<this._context.column){y.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0):this.cancel();return}if(!!this._completionModel){if(y.leadingWord.word.length!==0&&y.leadingWord.startColumn>this._context.leadingWord.startColumn){const T=new Set(this._languageFeaturesService.completionProvider.all(this._editor.getModel()));for(const L of this._completionModel.allProvider)T.delete(L);const _=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0,T,{items:_,clipboardText:this._completionModel.clipboardText});return}if(y.column>this._context.column&&this._completionModel.incomplete.size>0&&y.leadingWord.word.length!==0){const{incomplete:T}=this._completionModel,_=this._completionModel.adopt(T);this.trigger({auto:this._state===2,shy:!1,noSelect:!1,triggerKind:2},!0,T,{items:_,clipboardText:this._completionModel.clipboardText})}else{const T=this._completionModel.lineContext;let _=!1;if(this._completionModel.lineContext={leadingLineContent:y.leadingLineContent,characterCountDelta:y.column-this._context.column},this._completionModel.items.length===0){if(o.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<y.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1,noSelect:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=T,_=this._completionModel.items.length>0,_&&y.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,noSelect:this._context.noSelect,isFrozen:_})}}}}};w=we([F(1,b.IEditorWorkerService),F(2,r.IClipboardService),F(3,c.ITelemetryService),F(4,f.ILogService),F(5,i.IContextKeyService),F(6,u.IConfigurationService),F(7,d.ILanguageFeaturesService)],w),e.SuggestModel=w}),define(ae[103],le([1,0,108,6,2,18,13,9,1438,81,19,5,25,34,60,57,11,72,28]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryUserDataProfilesService=e.UserDataProfilesService=e.toUserDataProfile=e.EXTENSIONS_RESOURCE_NAME=e.reviveProfile=e.IUserDataProfilesService=e.PROFILES_ENABLEMENT_CONFIG=e.isUserDataProfile=void 0;function d(h){const v=h;return!!(v&&typeof v=="object"&&typeof v.id=="string"&&typeof v.isDefault=="boolean"&&typeof v.name=="string"&&E.URI.isUri(v.location)&&E.URI.isUri(v.globalStorageHome)&&E.URI.isUri(v.settingsResource)&&E.URI.isUri(v.keybindingsResource)&&E.URI.isUri(v.tasksResource)&&E.URI.isUri(v.snippetsHome)&&((0,k.isUndefined)(v.extensionsResource)||E.URI.isUri(v.extensionsResource)))}e.isUserDataProfile=d,e.PROFILES_ENABLEMENT_CONFIG="workbench.experimental.settingsProfiles.enabled",e.IUserDataProfilesService=(0,C.createDecorator)("IUserDataProfilesService");function n(h,v){return{id:h.id,isDefault:h.isDefault,name:h.name,shortName:h.shortName,location:E.URI.revive(h.location).with({scheme:v}),globalStorageHome:E.URI.revive(h.globalStorageHome).with({scheme:v}),settingsResource:E.URI.revive(h.settingsResource).with({scheme:v}),keybindingsResource:E.URI.revive(h.keybindingsResource).with({scheme:v}),tasksResource:E.URI.revive(h.tasksResource).with({scheme:v}),snippetsHome:E.URI.revive(h.snippetsHome).with({scheme:v}),extensionsResource:E.URI.revive(h.extensionsResource)?.with({scheme:v}),useDefaultFlags:h.useDefaultFlags,isTransient:h.isTransient}}e.reviveProfile=n,e.EXTENSIONS_RESOURCE_NAME="extensions.json";function a(h,v,m,w){return{id:h,name:v,location:m,isDefault:!1,shortName:w?.shortName,globalStorageHome:(0,A.joinPath)(m,"globalStorage"),settingsResource:(0,A.joinPath)(m,"settings.json"),keybindingsResource:(0,A.joinPath)(m,"keybindings.json"),tasksResource:(0,A.joinPath)(m,"tasks.json"),snippetsHome:(0,A.joinPath)(m,"snippets"),extensionsResource:(0,A.joinPath)(m,e.EXTENSIONS_RESOURCE_NAME),useDefaultFlags:w?.useDefaultFlags,isTransient:w?.transient}}e.toUserDataProfile=a;let o=class extends R.Disposable{get defaultProfile(){return this.profiles[0]}get profiles(){return[...this.profilesObject.profiles,...this.transientProfilesObject.profiles]}constructor(v,m,w,D){super(),this.environmentService=v,this.fileService=m,this.uriIdentityService=w,this.logService=D,this.enabled=!1,this.defaultProfileShouldIncludeExtensionsResourceAlways=!1,this._onDidChangeProfiles=this._register(new p.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this._onWillCreateProfile=this._register(new p.Emitter),this.onWillCreateProfile=this._onWillCreateProfile.event,this._onWillRemoveProfile=this._register(new p.Emitter),this.onWillRemoveProfile=this._onWillRemoveProfile.event,this._onDidResetWorkspaces=this._register(new p.Emitter),this.onDidResetWorkspaces=this._onDidResetWorkspaces.event,this.profileCreationPromises=new Map,this.transientProfilesObject={profiles:[],workspaces:new i.ResourceMap},this.profilesHome=(0,A.joinPath)(this.environmentService.userRoamingDataHome,"profiles")}setEnablement(v){this.enabled!==v&&(this._profilesObject=void 0,this.enabled=v)}isEnabled(){return this.enabled}get profilesObject(){if(!this._profilesObject){const v=this.enabled?this.getStoredProfiles().map(y=>a((0,A.basename)(y.location),y.name,y.location,{shortName:y.shortName,useDefaultFlags:y.useDefaultFlags})):[];let m;const w=new i.ResourceMap,D=a((0,t.hash)(this.environmentService.userRoamingDataHome.path).toString(16),(0,I.localize)(0,null),this.environmentService.userRoamingDataHome);if(v.unshift({...D,isDefault:!0,extensionsResource:this.defaultProfileShouldIncludeExtensionsResourceAlways||v.length>0||this.transientProfilesObject.profiles.length>0?D.extensionsResource:void 0}),v.length){const y=this.getStoredProfileAssociations();if(y.workspaces)for(const[T,_]of Object.entries(y.workspaces)){const L=E.URI.parse(T),M=E.URI.parse(_),O=v.find(N=>this.uriIdentityService.extUri.isEqual(N.location,M));O&&w.set(L,O)}if(y.emptyWindow){const T=E.URI.parse(y.emptyWindow);m=v.find(_=>this.uriIdentityService.extUri.isEqual(_.location,T))}}this._profilesObject={profiles:v,workspaces:w,emptyWindow:m}}return this._profilesObject}async createTransientProfile(v){const m="Temp",w=new RegExp(`${(0,s.escapeRegExpCharacters)(m)}\\s(\\d+)`);let D=0;for(const T of this.profiles){const _=w.exec(T.name),L=_?parseInt(_[1]):0;D=L>D?L:D}const y=`${m} ${D+1}`;return this.createProfile((0,t.hash)((0,l.generateUuid)()).toString(16),y,{transient:!0},v)}async createNamedProfile(v,m,w){return this.createProfile((0,t.hash)((0,l.generateUuid)()).toString(16),v,m,w)}async createProfile(v,m,w,D){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);const y=await this.doCreateProfile(v,m,w);return D&&await this.setProfileForWorkspace(D,y),y}async doCreateProfile(v,m,w){let D=this.profileCreationPromises.get(m);return D||(D=(async()=>{try{const y=this.profiles.find(L=>L.name===m||L.id===v);if(y)return y;const T=a(v,m,(0,A.joinPath)(this.profilesHome,v),w);await this.fileService.createFolder(T.location);const _=[];return this._onWillCreateProfile.fire({profile:T,join(L){_.push(L)}}),await c.Promises.settled(_),this.updateProfiles([T],[],[]),T}finally{this.profileCreationPromises.delete(m)}})(),this.profileCreationPromises.set(m,D)),D}async updateProfile(v,m){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);let w=this.profiles.find(D=>D.id===v.id);if(!w)throw new Error(`Profile '${v.name}' does not exist`);return w=a(w.id,m.name??w.name,w.location,{shortName:m.shortName??w.shortName,transient:m.transient??w.isTransient,useDefaultFlags:m.useDefaultFlags??w.useDefaultFlags}),this.updateProfiles([],[],[w]),w}async removeProfile(v){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);if(v.isDefault)throw new Error("Cannot remove default profile");const m=this.profiles.find(D=>D.id===v.id);if(!m)throw new Error(`Profile '${v.name}' does not exist`);const w=[];this._onWillRemoveProfile.fire({profile:m,join(D){w.push(D)}});try{await Promise.allSettled(w)}catch(D){this.logService.error(D)}m.id===this.profilesObject.emptyWindow?.id&&(this.profilesObject.emptyWindow=void 0);for(const D of[...this.profilesObject.workspaces.keys()])m.id===this.profilesObject.workspaces.get(D)?.id&&this.profilesObject.workspaces.delete(D);this.updateStoredProfileAssociations(),this.updateProfiles([],[m],[]);try{this.profiles.length===1?await this.fileService.del(this.profilesHome,{recursive:!0}):await this.fileService.del(m.location,{recursive:!0})}catch(D){this.logService.error(D)}}getOrSetProfileForWorkspace(v,m=this.defaultProfile){if(!this.enabled)return this.defaultProfile;let w=this.getProfileForWorkspace(v);return w||(w=m,this.profiles.length>1&&this.setProfileForWorkspaceSync(v,w)),w}async setProfileForWorkspace(v,m){this.setProfileForWorkspaceSync(v,m)}setProfileForWorkspaceSync(v,m){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);const w=this.profiles.find(D=>D.id===m.id);if(!w)throw new Error(`Profile '${m.name}' does not exist`);this.updateWorkspaceAssociation(v,w)}unsetWorkspace(v,m){if(!this.enabled)throw new Error(`Settings Profiles are disabled. Enable them via the '${e.PROFILES_ENABLEMENT_CONFIG}' setting.`);this.updateWorkspaceAssociation(v,void 0,m)}async resetWorkspaces(){this.transientProfilesObject.workspaces.clear(),this.transientProfilesObject.emptyWindow=void 0,this.profilesObject.workspaces.clear(),this.profilesObject.emptyWindow=void 0,this.updateStoredProfileAssociations(),this._onDidResetWorkspaces.fire()}async cleanUp(){if(!!this.enabled&&await this.fileService.exists(this.profilesHome)){const v=await this.fileService.resolve(this.profilesHome);await Promise.all((v.children||[]).filter(m=>m.isDirectory&&this.profiles.every(w=>!this.uriIdentityService.extUri.isEqual(w.location,m.resource))).map(m=>this.fileService.del(m.resource,{recursive:!0})))}}async cleanUpTransientProfiles(){if(!this.enabled)return;const v=this.transientProfilesObject.profiles.filter(m=>!this.isProfileAssociatedToWorkspace(m));await Promise.allSettled(v.map(m=>this.removeProfile(m)))}getProfileForWorkspace(v){const m=this.getWorkspace(v);return E.URI.isUri(m)?this.transientProfilesObject.workspaces.get(m)??this.profilesObject.workspaces.get(m):this.transientProfilesObject.emptyWindow??this.profilesObject.emptyWindow}getWorkspace(v){return(0,u.isSingleFolderWorkspaceIdentifier)(v)?v.uri:(0,u.isWorkspaceIdentifier)(v)?v.configPath:"empty-window"}isProfileAssociatedToWorkspace(v){return!!(this.uriIdentityService.extUri.isEqual(this.transientProfilesObject.emptyWindow?.location,v.location)||[...this.transientProfilesObject.workspaces.values()].some(m=>this.uriIdentityService.extUri.isEqual(m.location,v.location))||this.uriIdentityService.extUri.isEqual(this.profilesObject.emptyWindow?.location,v.location)||[...this.profilesObject.workspaces.values()].some(m=>this.uriIdentityService.extUri.isEqual(m.location,v.location)))}updateProfiles(v,m,w){const D=[...this.profiles,...v],y=[];this.transientProfilesObject.profiles=[];for(let T of D)T.isDefault||m.some(_=>T.id===_.id)||(T=w.find(_=>T.id===_.id)??T,T.isTransient?this.transientProfilesObject.profiles.push(T):y.push({location:T.location,name:T.name,shortName:T.shortName,useDefaultFlags:T.useDefaultFlags}));this.saveStoredProfiles(y),this._profilesObject=void 0,this.triggerProfilesChanges(v,m,w)}triggerProfilesChanges(v,m,w){this._onDidChangeProfiles.fire({added:v,removed:m,updated:w,all:this.profiles})}updateWorkspaceAssociation(v,m,w){w=m?.isTransient?!0:w,w||this.updateWorkspaceAssociation(v,void 0,!0);const D=this.getWorkspace(v),y=w?this.transientProfilesObject:this.profilesObject;E.URI.isUri(D)?(y.workspaces.delete(D),m&&y.workspaces.set(D,m)):y.emptyWindow=m,w||this.updateStoredProfileAssociations()}updateStoredProfileAssociations(){const v={};for(const[w,D]of this.profilesObject.workspaces.entries())v[w.toString()]=D.location.toString();const m=this.profilesObject.emptyWindow?.location.toString();this.saveStoredProfileAssociations({workspaces:v,emptyWindow:m}),this._profilesObject=void 0}getStoredProfiles(){return[]}saveStoredProfiles(v){throw new Error("not implemented")}getStoredProfileAssociations(){return{}}saveStoredProfileAssociations(v){throw new Error("not implemented")}};o.PROFILES_KEY="userDataProfiles",o.PROFILE_ASSOCIATIONS_KEY="profileAssociations",o=we([F(0,b.IEnvironmentService),F(1,S.IFileService),F(2,f.IUriIdentityService),F(3,r.ILogService)],o),e.UserDataProfilesService=o;class g extends o{constructor(){super(...arguments),this.storedProfiles=[],this.storedProfileAssociations={}}getStoredProfiles(){return this.storedProfiles}saveStoredProfiles(v){this.storedProfiles=v}getStoredProfileAssociations(){return this.storedProfileAssociations}saveStoredProfileAssociations(v){this.storedProfileAssociations=v}}e.InMemoryUserDataProfilesService=g}),define(ae[834],le([1,0,16,11,52,56,21,123,413,2,22,53,14,18,306,68,13,9,1414,81,100,115,786,19,5,25,46,6,165,504,103,57,785]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionsScannerService=e.toExtensionDescription=e.AbstractExtensionsScannerService=e.IExtensionsScannerService=e.Translations=void 0;var M;(function(x){function H(W,U){if(W===U)return!0;const $=Object.keys(W),q=new Set;for(const X of Object.keys(U))q.add(X);if($.length!==q.size)return!1;for(const X of $){if(W[X]!==U[X])return!1;q.delete(X)}return q.size===0}x.equals=H})(M=e.Translations||(e.Translations={})),e.IExtensionsScannerService=(0,h.createDecorator)("IExtensionsScannerService");let O=class extends b.Disposable{constructor(H,W,U,$,q,X,G,Q,j,K,Y){super(),this.systemExtensionsLocation=H,this.userExtensionsLocation=W,this.extensionsControlLocation=U,this.cacheLocation=$,this.userDataProfilesService=q,this.extensionsProfileScannerService=X,this.fileService=G,this.logService=Q,this.environmentService=j,this.productService=K,this.instantiationService=Y,this._onDidChangeCache=this._register(new w.Emitter),this.onDidChangeCache=this._onDidChangeCache.event,this.obsoleteFile=(0,u.joinPath)(this.userExtensionsLocation,".obsolete"),this.systemExtensionsCachedScanner=this._register(this.instantiationService.createInstance(B,(0,u.joinPath)(this.cacheLocation,a.BUILTIN_MANIFEST_CACHE_FILE),this.obsoleteFile)),this.userExtensionsCachedScanner=this._register(this.instantiationService.createInstance(B,(0,u.joinPath)(this.cacheLocation,a.USER_MANIFEST_CACHE_FILE),this.obsoleteFile)),this.extensionsScanner=this._register(this.instantiationService.createInstance(P,this.obsoleteFile)),this._register(this.systemExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(0))),this._register(this.userExtensionsCachedScanner.onDidChangeCache(()=>this._onDidChangeCache.fire(1)))}getTargetPlatform(){return this._targetPlatformPromise||(this._targetPlatformPromise=(0,n.computeTargetPlatform)(this.fileService,this.logService)),this._targetPlatformPromise}async scanAllExtensions(H,W,U){const[$,q]=await Promise.all([this.scanSystemExtensions(H),this.scanUserExtensions(W)]),X=U?await this.scanExtensionsUnderDevelopment(H,[...$,...q]):[];return this.dedupExtensions($,q,X,await this.getTargetPlatform(),!0)}async scanSystemExtensions(H){const W=[];W.push(this.scanDefaultSystemExtensions(!!H.useCache,H.language)),W.push(this.scanDevSystemExtensions(H.language,!!H.checkControlFile));const[U,$]=await Promise.all(W);return this.applyScanOptions([...U,...$],0,H,!1)}async scanUserExtensions(H){this.logService.trace("Started scanning user extensions");const W=await this.createExtensionScannerInput(H.profileLocation??this.userExtensionsLocation,!!H.profileLocation,1,!H.includeUninstalled,H.language);let $=await(H.useCache&&!W.devMode&&W.excludeObsolete?this.userExtensionsCachedScanner:this.extensionsScanner).scanExtensions(W);return $=await this.applyScanOptions($,1,H,!0),this.logService.trace("Scanned user extensions:",$.length),$}async scanExtensionsUnderDevelopment(H,W){if(this.environmentService.isExtensionDevelopment&&this.environmentService.extensionDevelopmentLocationURI){const U=(await Promise.all(this.environmentService.extensionDevelopmentLocationURI.filter($=>$.scheme===S.Schemas.file).map(async $=>{const q=await this.createExtensionScannerInput($,!1,1,!0,H.language,!1);return(await this.extensionsScanner.scanOneOrMultipleExtensions(q)).map(G=>(G.type=W.find(Q=>(0,n.areSameExtensions)(Q.identifier,G.identifier))?.type??G.type,this.extensionsScanner.validate(G,q)))}))).flat();return this.applyScanOptions(U,"development",H,!0)}return[]}async scanExistingExtension(H,W,U){const $=await this.createExtensionScannerInput(H,!1,W,!0,U.language),q=await this.extensionsScanner.scanExtension($);return!q||!U.includeInvalid&&!q.isValid?null:q}async scanOneOrMultipleExtensions(H,W,U){const $=await this.createExtensionScannerInput(H,!1,W,!0,U.language),q=await this.extensionsScanner.scanOneOrMultipleExtensions($);return this.applyScanOptions(q,W,U,!0)}async scanMetadata(H){const W=(0,u.joinPath)(H,"package.json"),U=(await this.fileService.readFile(W)).value.toString();return JSON.parse(U).__metadata}async updateMetadata(H,W){const U=(0,u.joinPath)(H,"package.json"),$=(await this.fileService.readFile(U)).value.toString(),q=JSON.parse($);W.isMachineScoped=W.isMachineScoped||void 0,W.isBuiltin=W.isBuiltin||void 0,W.installedTimestamp=W.installedTimestamp||void 0,q.__metadata={...q.__metadata,...W},await this.fileService.writeFile((0,u.joinPath)(H,"package.json"),A.VSBuffer.fromString(JSON.stringify(q,null," ")))}async applyScanOptions(H,W,U,$){return U.includeAllVersions||(H=this.dedupExtensions(W===0?H:void 0,W===1?H:void 0,W==="development"?H:void 0,await this.getTargetPlatform(),$)),U.includeInvalid||(H=H.filter(q=>q.isValid)),H.sort((q,X)=>{const G=C.basename(q.location.fsPath),Q=C.basename(X.location.fsPath);return G<Q?-1:G>Q?1:0})}dedupExtensions(H,W,U,$,q){const X=(Q,j,K)=>{if(Q.isValid&&!j.isValid)return!1;if(Q.isValid===j.isValid){if(q&&i.gt(Q.manifest.version,j.manifest.version))return this.logService.debug(`Skipping extension ${j.location.path} with lower version ${j.manifest.version} in favour of ${Q.location.path} with version ${Q.manifest.version}`),!1;if(i.eq(Q.manifest.version,j.manifest.version)){if(Q.type===0)return this.logService.debug(`Skipping extension ${j.location.path} in favour of system extension ${Q.location.path} with same version`),!1;if(Q.targetPlatform===$)return this.logService.debug(`Skipping extension ${j.location.path} from different target platform ${j.targetPlatform}`),!1}}return K?this.logService.warn(`Overwriting user extension ${Q.location.path} with ${j.location.path}.`):this.logService.debug(`Overwriting user extension ${Q.location.path} with ${j.location.path}.`),!0},G=new Map;return H?.forEach(Q=>{const j=a.ExtensionIdentifier.toKey(Q.identifier.id),K=G.get(j);(!K||X(K,Q,!1))&&G.set(j,Q)}),W?.forEach(Q=>{const j=a.ExtensionIdentifier.toKey(Q.identifier.id),K=G.get(j);if(!K&&H&&Q.type===0){this.logService.debug(`Skipping obsolete system extension ${Q.location.path}.`);return}(!K||X(K,Q,!1))&&G.set(j,Q)}),U?.forEach(Q=>{const j=a.ExtensionIdentifier.toKey(Q.identifier.id),K=G.get(j);(!K||X(K,Q,!0))&&G.set(j,Q),G.set(j,Q)}),[...G.values()]}async scanDefaultSystemExtensions(H,W){this.logService.trace("Started scanning system extensions");const U=await this.createExtensionScannerInput(this.systemExtensionsLocation,!1,0,!0,W),q=await(H&&!U.devMode?this.systemExtensionsCachedScanner:this.extensionsScanner).scanExtensions(U);return this.logService.trace("Scanned system extensions:",q.length),q}async scanDevSystemExtensions(H,W){const U=this.environmentService.isBuilt?[]:this.productService.builtInExtensions;if(!U?.length)return[];this.logService.trace("Started scanning dev system extensions");const $=W?await this.getBuiltInExtensionControl():{},q=[],X=l.URI.file(C.normalize(C.join(S.FileAccess.asFileUri("",J).fsPath,"..",".build","builtInExtensions")));for(const Q of U){const j=$[Q.name]||"marketplace";switch(j){case"disabled":break;case"marketplace":q.push((0,u.joinPath)(X,Q.name));break;default:q.push(l.URI.file(j));break}}const G=await Promise.all(q.map(async Q=>this.extensionsScanner.scanExtension(await this.createExtensionScannerInput(Q,!1,0,!0,H))));return this.logService.trace("Scanned dev system extensions:",G.length),(0,t.coalesce)(G)}async getBuiltInExtensionControl(){try{const H=await this.fileService.readFile(this.extensionsControlLocation);return JSON.parse(H.value.toString())}catch{return{}}}async createExtensionScannerInput(H,W,U,$,q,X=!0){const G=await this.getTranslations(q??r.language),Q=await this.getMtime(H),j=W?this.userDataProfilesService.defaultProfile.extensionsResource:void 0,K=j?await this.getMtime(j):void 0;return new N(H,Q,j,K,W,U,$,X,this.productService.version,this.productService.date,this.productService.commit,!this.environmentService.isBuilt,q,G)}async getMtime(H){try{const W=await this.fileService.stat(H);if(typeof W.mtime=="number")return W.mtime}catch{}}};O=we([F(4,T.IUserDataProfilesService),F(5,y.IExtensionsProfileScannerService),F(6,g.IFileService),F(7,v.ILogService),F(8,d.IEnvironmentService),F(9,m.IProductService),F(10,h.IInstantiationService)],O),e.AbstractExtensionsScannerService=O;class N{constructor(H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re){this.location=H,this.mtime=W,this.applicationExtensionslocation=U,this.applicationExtensionslocationMtime=$,this.profile=q,this.type=X,this.excludeObsolete=G,this.validate=Q,this.productVersion=j,this.productDate=K,this.productCommit=Y,this.devMode=ee,this.language=ie,this.translations=re}static createNlsConfiguration(H){return{language:H.language,pseudo:H.language==="pseudo",devMode:H.devMode,translations:H.translations}}static equals(H,W){return(0,u.isEqual)(H.location,W.location)&&H.mtime===W.mtime&&(0,u.isEqual)(H.applicationExtensionslocation,W.applicationExtensionslocation)&&H.applicationExtensionslocationMtime===W.applicationExtensionslocationMtime&&H.profile===W.profile&&H.type===W.type&&H.excludeObsolete===W.excludeObsolete&&H.validate===W.validate&&H.productVersion===W.productVersion&&H.productDate===W.productDate&&H.productCommit===W.productCommit&&H.devMode===W.devMode&&H.language===W.language&&M.equals(H.translations,W.translations)}}let P=class extends b.Disposable{constructor(H,W,U,$,q){super(),this.obsoleteFile=H,this.extensionsProfileScannerService=W,this.uriIdentityService=U,this.fileService=$,this.logService=q}async scanExtensions(H){const W=H.profile?await this.scanExtensionsFromProfile(H):await this.scanExtensionsFromLocation(H);let U={};if(H.excludeObsolete&&H.type===1)try{const $=(await this.fileService.readFile(this.obsoleteFile)).value.toString();U=JSON.parse($)}catch{}return(0,c.isEmptyObject)(U)?W:W.filter($=>!U[n.ExtensionKey.create($).toString()])}async scanExtensionsFromLocation(H){const W=await this.fileService.resolve(H.location);if(!W.children?.length)return[];const U=await Promise.all(W.children.map(async $=>{if(!$.isDirectory||H.type===1&&(0,u.basename)($.resource).indexOf(".")===0)return null;const q=new N($.resource,H.mtime,H.applicationExtensionslocation,H.applicationExtensionslocationMtime,H.profile,H.type,H.excludeObsolete,H.validate,H.productVersion,H.productDate,H.productCommit,H.devMode,H.language,H.translations);return this.scanExtension(q)}));return(0,t.coalesce)(U).sort(($,q)=>$.location.path<q.location.path?-1:1)}async scanExtensionsFromProfile(H){let W=await this.scanExtensionsFromProfileResource(H.location,()=>!0,H);if(H.applicationExtensionslocation&&!this.uriIdentityService.extUri.isEqual(H.location,H.applicationExtensionslocation)){W=W.filter($=>!$.metadata?.isApplicationScoped);const U=await this.scanExtensionsFromProfileResource(H.applicationExtensionslocation,$=>!!$.metadata?.isApplicationScoped,H);W.push(...U)}return W}async scanExtensionsFromProfileResource(H,W,U){const $=await this.extensionsProfileScannerService.scanProfileExtensions(H);if(!$.length)return[];const q=await Promise.all($.map(async X=>{if(W(X)){const G=new N(X.location,U.mtime,U.applicationExtensionslocation,U.applicationExtensionslocationMtime,U.profile,U.type,U.excludeObsolete,U.validate,U.productVersion,U.productDate,U.productCommit,U.devMode,U.language,U.translations);return this.scanExtension(G,X.metadata)}return null}));return(0,t.coalesce)(q)}async scanOneOrMultipleExtensions(H){try{if(await this.fileService.exists((0,u.joinPath)(H.location,"package.json"))){const W=await this.scanExtension(H);return W?[W]:[]}else return await this.scanExtensions(H)}catch(W){return this.logService.error(`Error scanning extensions at ${H.location.path}:`,(0,k.getErrorMessage)(W)),[]}}async scanExtension(H,W){try{let U=await this.scanExtensionManifest(H.location);if(U){U.publisher||(U.publisher=a.UNDEFINED_PUBLISHER),W=W??U.__metadata,delete U.__metadata;const $=(0,n.getGalleryExtensionId)(U.publisher,U.name),q=W?.id?{id:$,uuid:W.id}:{id:$},X=W?.isSystem?0:H.type,G=X===0||!!W?.isBuiltin;U=await this.translateManifest(H.location,U,N.createNlsConfiguration(H));const Q={type:X,identifier:q,manifest:U,location:H.location,isBuiltin:G,targetPlatform:W?.targetPlatform??"undefined",metadata:W,isValid:!0,validations:[]};return H.validate?this.validate(Q,H):Q}}catch(U){H.type!==0&&this.logService.error(U)}return null}validate(H,W){let U=!0;const $=(0,o.validateExtensionManifest)(W.productVersion,W.productDate,W.location,H.manifest,H.isBuiltin);for(const[q,X]of $)q===f.default.Error&&(U=!1,this.logService.error(this.formatMessage(W.location,X)));return H.isValid=U,H.validations=$,H}async scanExtensionManifest(H){const W=(0,u.joinPath)(H,"package.json");let U;try{U=(await this.fileService.readFile(W)).value.toString()}catch(q){return(0,g.toFileOperationResult)(q)!==1&&this.logService.error(this.formatMessage(H,(0,s.localize)(0,null,W.path,q.message))),null}let $;try{$=JSON.parse(U)}catch{const X=[];(0,E.parse)(U,X);for(const G of X)this.logService.error(this.formatMessage(H,(0,s.localize)(1,null,W.path,G.offset,G.length,(0,I.getParseErrorMessage)(G.error))));return null}return(0,E.getNodeType)($)!=="object"?(this.logService.error(this.formatMessage(H,(0,s.localize)(2,null,W.path))),null):$}async translateManifest(H,W,U){const $=await this.getLocalizedMessages(H,W,U);if($)try{const q=[],X=await this.resolveOriginalMessageBundle($.default,q);if(q.length>0)return q.forEach(Q=>{this.logService.error(this.formatMessage(H,(0,s.localize)(3,null,$.default?.path,(0,I.getParseErrorMessage)(Q.error))))}),W;if((0,E.getNodeType)($)!=="object")return this.logService.error(this.formatMessage(H,(0,s.localize)(4,null,$.default?.path))),W;const G=$.values||Object.create(null);return(0,L.localizeManifest)(W,G,X)}catch{}return W}async getLocalizedMessages(H,W,U){const $=(0,u.joinPath)(H,"package.nls.json"),q=(j,K)=>{K.forEach(Y=>{this.logService.error(this.formatMessage(H,(0,s.localize)(5,null,j?.path,(0,I.getParseErrorMessage)(Y.error))))})},X=j=>{this.logService.error(this.formatMessage(H,(0,s.localize)(6,null,j?.path)))},G=`${W.publisher}.${W.name}`,Q=U.translations[G];if(Q)try{const j=l.URI.file(Q),K=(await this.fileService.readFile(j)).value.toString(),Y=[],ee=(0,E.parse)(K,Y);return Y.length>0?(q(j,Y),{values:void 0,default:$}):(0,E.getNodeType)(ee)!=="object"?(X(j),{values:void 0,default:$}):{values:ee.contents?ee.contents.package:void 0,default:$}}catch{return{values:void 0,default:$}}else{if(!await this.fileService.exists($))return;let K;try{K=await this.findMessageBundles(H,U)}catch{return}if(!K.localized)return{values:void 0,default:K.original};try{const Y=(await this.fileService.readFile(K.localized)).value.toString(),ee=[],ie=(0,E.parse)(Y,ee);return ee.length>0?(q(K.localized,ee),{values:void 0,default:K.original}):(0,E.getNodeType)(ie)!=="object"?(X(K.localized),{values:void 0,default:K.original}):{values:ie,default:K.original}}catch{return{values:void 0,default:K.original}}}}async resolveOriginalMessageBundle(H,W){if(H)try{const U=(await this.fileService.readFile(H)).value.toString();return(0,E.parse)(U,W)}catch{}}findMessageBundles(H,W){return new Promise((U,$)=>{const q=X=>{const G=(0,u.joinPath)(H,`package.nls.${X}.json`);this.fileService.exists(G).then(Q=>{Q&&U({localized:G,original:(0,u.joinPath)(H,"package.nls.json")});const j=X.lastIndexOf("-");j===-1?U({localized:(0,u.joinPath)(H,"package.nls.json"),original:null}):(X=X.substring(0,j),q(X))})};if(W.devMode||W.pseudo||!W.language)return U({localized:(0,u.joinPath)(H,"package.nls.json"),original:null});q(W.language)})}formatMessage(H,W){return`[${H.path}]: ${W}`}};P=we([F(1,y.IExtensionsProfileScannerService),F(2,_.IUriIdentityService),F(3,g.IFileService),F(4,v.ILogService)],P);let B=class extends P{constructor(H,W,U,$,q,X){super(W,U,$,q,X),this.cacheFile=H,this.cacheValidatorThrottler=this._register(new p.ThrottledDelayer(3e3)),this._onDidChangeCache=this._register(new w.Emitter),this.onDidChangeCache=this._onDidChangeCache.event}async scanExtensions(H){const W=await this.readExtensionCache();if(this.input=H,W&&W.input&&N.equals(W.input,this.input))return this.cacheValidatorThrottler.trigger(()=>this.validateCache()),W.result.map($=>($.location=l.URI.revive($.location),$));const U=await super.scanExtensions(H);return await this.writeExtensionCache({input:H,result:U}),U}async readExtensionCache(){try{const H=await this.fileService.readFile(this.cacheFile),W=JSON.parse(H.value.toString());return{result:W.result,input:(0,D.revive)(W.input)}}catch(H){this.logService.debug("Error while reading the extension cache file:",this.cacheFile.path,(0,k.getErrorMessage)(H))}return null}async writeExtensionCache(H){try{await this.fileService.writeFile(this.cacheFile,A.VSBuffer.fromString(JSON.stringify(H)))}catch(W){this.logService.debug("Error while writing the extension cache file:",this.cacheFile.path,(0,k.getErrorMessage)(W))}}async validateCache(){if(!this.input)return;const H=await this.readExtensionCache();if(!H)return;const W=H.result,U=JSON.parse(JSON.stringify(await super.scanExtensions(this.input)));if(!R.equals(U,W))try{await this.fileService.del(this.cacheFile),this._onDidChangeCache.fire()}catch($){this.logService.error($)}}};B=we([F(2,y.IExtensionsProfileScannerService),F(3,_.IUriIdentityService),F(4,g.IFileService),F(5,v.ILogService)],B);function V(x,H){const W=(0,n.getExtensionId)(x.manifest.publisher,x.manifest.name);return{id:W,identifier:new a.ExtensionIdentifier(W),isBuiltin:x.type===0,isUserBuiltin:x.type===1&&x.isBuiltin,isUnderDevelopment:H,extensionLocation:x.location,uuid:x.identifier.uuid,targetPlatform:x.targetPlatform,...x.manifest}}e.toExtensionDescription=V;class z extends O{constructor(H,W,U,$,q,X,G,Q,j,K,Y){super(H,W,(0,u.joinPath)(U,".vscode-oss-dev","extensions","control.json"),(0,u.joinPath)($,a.MANIFEST_CACHE_FOLDER),q,X,G,Q,j,K,Y),this.translationsPromise=(async()=>{if(r.translationsConfigFile)try{const ee=await this.fileService.readFile(l.URI.file(r.translationsConfigFile));return JSON.parse(ee.value.toString())}catch{}return Object.create(null)})()}getTranslations(H){return this.translationsPromise}}e.NativeExtensionsScannerService=z}),define(ae[2232],le([1,0,9,81,504,834,19,35,5,25,46,103]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsScannerService=void 0;let r=class extends A.NativeExtensionsScannerService{constructor(i,f,c,l,s,d,n){super(t.URI.file(s.builtinExtensionsPath),t.URI.file(s.extensionsPath),s.userHome,t.URI.file(s.userDataPath),i,f,c,l,s,d,n)}};r=we([F(0,C.IUserDataProfilesService),F(1,R.IExtensionsProfileScannerService),F(2,k.IFileService),F(3,b.ILogService),F(4,p.INativeEnvironmentService),F(5,S.IProductService),F(6,I.IInstantiationService)],r),e.ExtensionsScannerService=r,(0,E.registerSingleton)(A.IExtensionsScannerService,r,1)}),define(ae[23],le([1,0,11,6,2,241,13,583,5,103]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logStorage=e.InMemoryStorageService=e.isProfileUsingDefaultStorage=e.AbstractStorageService=e.loadKeyTargets=e.StorageTarget=e.StorageScope=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=e.IS_NEW_KEY=void 0,e.IS_NEW_KEY="__$__isNewStorageMarker",e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,I.createDecorator)("storageService");var S;(function(s){s[s.NONE=0]="NONE",s[s.SHUTDOWN=1]="SHUTDOWN"})(S=e.WillSaveStateReason||(e.WillSaveStateReason={}));var C;(function(s){s[s.APPLICATION=-1]="APPLICATION",s[s.PROFILE=0]="PROFILE",s[s.WORKSPACE=1]="WORKSPACE"})(C=e.StorageScope||(e.StorageScope={}));var r;(function(s){s[s.USER=0]="USER",s[s.MACHINE=1]="MACHINE"})(r=e.StorageTarget||(e.StorageTarget={}));function u(s){const d=s.get(e.TARGET_KEY);if(d)try{return JSON.parse(d)}catch{}return Object.create(null)}e.loadKeyTargets=u;class i extends R.Disposable{constructor(d={flushInterval:i.DEFAULT_FLUSH_INTERVAL}){super(),this.options=d,this._onDidChangeValue=this._register(new p.PauseableEmitter),this.onDidChangeValue=this._onDidChangeValue.event,this._onDidChangeTarget=this._register(new p.PauseableEmitter),this.onDidChangeTarget=this._onDidChangeTarget.event,this._onWillSaveState=this._register(new p.Emitter),this.onWillSaveState=this._onWillSaveState.event,this.flushWhenIdleScheduler=this._register(new t.RunOnceScheduler(()=>this.doFlushWhenIdle(),this.options.flushInterval)),this.runFlushWhenIdle=this._register(new R.MutableDisposable),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,t.runWhenIdle)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}stopFlushWhenIdle(){(0,R.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(d,n){if(n===e.TARGET_KEY){switch(d){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:d})}else this._onDidChangeValue.fire({scope:d,key:n,target:this.getKeyTargets(d)[n]})}emitWillSaveState(d){this._onWillSaveState.fire({reason:d})}get(d,n,a){return this.getStorage(n)?.get(d,a)}getBoolean(d,n,a){return this.getStorage(n)?.getBoolean(d,a)}getNumber(d,n,a){return this.getStorage(n)?.getNumber(d,a)}store(d,n,a,o){if((0,k.isUndefinedOrNull)(n)){this.remove(d,a);return}this.withPausedEmitters(()=>{this.updateKeyTarget(d,a,o),this.getStorage(a)?.set(d,n)})}remove(d,n){this.withPausedEmitters(()=>{this.updateKeyTarget(d,n,void 0),this.getStorage(n)?.delete(d)})}withPausedEmitters(d){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{d()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}keys(d,n){const a=[],o=this.getKeyTargets(d);for(const g of Object.keys(o))o[g]===n&&a.push(g);return a}updateKeyTarget(d,n,a){const o=this.getKeyTargets(n);typeof a=="number"?o[d]!==a&&(o[d]=a,this.getStorage(n)?.set(e.TARGET_KEY,JSON.stringify(o))):typeof o[d]=="number"&&(delete o[d],this.getStorage(n)?.set(e.TARGET_KEY,JSON.stringify(o)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(d){switch(d){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(d){const n=this.getStorage(d);return n?u(n):Object.create(null)}isNew(d){return this.getBoolean(e.IS_NEW_KEY,d)===!0}async flush(d=S.NONE){this._onWillSaveState.fire({reason:d});const n=this.getStorage(-1),a=this.getStorage(0),o=this.getStorage(1);switch(d){case S.NONE:await t.Promises.settled([n?.whenFlushed()??Promise.resolve(),a?.whenFlushed()??Promise.resolve(),o?.whenFlushed()??Promise.resolve()]);break;case S.SHUTDOWN:await t.Promises.settled([n?.flush(0)??Promise.resolve(),a?.flush(0)??Promise.resolve(),o?.flush(0)??Promise.resolve()]);break}}async log(){const d=this.getStorage(-1)?.items??new Map,n=this.getStorage(0)?.items??new Map,a=this.getStorage(1)?.items??new Map;return l(d,n,a,this.getLogDetails(-1)??"",this.getLogDetails(0)??"",this.getLogDetails(1)??"")}async switch(d,n){return this.emitWillSaveState(S.NONE),(0,b.isUserDataProfile)(d)?this.switchToProfile(d,n):this.switchToWorkspace(d,n)}canSwitchProfile(d,n){return!(d.id===n.id||f(n)&&f(d))}switchData(d,n,a,o){this.withPausedEmitters(()=>{if(o)for(const[g,h]of d)n.set(g,h);else{const g=new Set;for(const[h,v]of d)g.add(h),n.get(h)!==v&&this.emitDidChangeValue(a,h);for(const[h]of n.items)g.has(h)||this.emitDidChangeValue(a,h)}})}}e.AbstractStorageService=i,i.DEFAULT_FLUSH_INTERVAL=60*1e3;function f(s){return s.isDefault||!!s.useDefaultFlags?.uiState}e.isProfileUsingDefaultStorage=f;class c extends i{constructor(){super(),this.applicationStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase)),this.profileStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase)),this.workspaceStorage=this._register(new E.Storage(new E.InMemoryStorageDatabase)),this._register(this.workspaceStorage.onDidChangeStorage(d=>this.emitDidChangeValue(1,d))),this._register(this.profileStorage.onDidChangeStorage(d=>this.emitDidChangeValue(0,d))),this._register(this.applicationStorage.onDidChangeStorage(d=>this.emitDidChangeValue(-1,d)))}getStorage(d){switch(d){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(d){switch(d){case-1:return"inMemory (application)";case 0:return"inMemory (profile)";default:return"inMemory (workspace)"}}async doInitialize(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(d){return!1}}e.InMemoryStorageService=c;async function l(s,d,n,a,o,g){const h=M=>{try{return JSON.parse(M)}catch{return M}},v=new Map,m=new Map;s.forEach((M,O)=>{v.set(O,M),m.set(O,h(M))});const w=new Map,D=new Map;d.forEach((M,O)=>{w.set(O,M),D.set(O,h(M))});const y=new Map,T=new Map;n.forEach((M,O)=>{y.set(O,M),T.set(O,h(M))}),console.group(a!==o?`Storage: Application (path: ${a})`:`Storage: Application & Profile (path: ${a}, default profile)`);const _=[];if(v.forEach((M,O)=>{_.push({key:O,value:M})}),console.table(_),console.groupEnd(),console.log(m),a!==o){console.group(`Storage: Profile (path: ${o}, profile specific)`);const M=[];w.forEach((O,N)=>{M.push({key:N,value:O})}),console.table(M),console.groupEnd(),console.log(D)}console.group(`Storage: Workspace (path: ${g})`);const L=[];y.forEach((M,O)=>{L.push({key:O,value:M})}),console.table(L),console.groupEnd(),console.log(T)}e.logStorage=l}),define(ae[2233],le([1,0,11,154,60,20,790,35,5,23]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,I.createDecorator)("ICodeLensCache");class S{constructor(u,i){this.lineCount=u,this.data=i}}let C=class{constructor(u){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new R.LRUCache(20,.75);const i="codelens/cache";(0,t.runWhenIdle)(()=>u.remove(i,1));const f="codelens/cache2",c=u.get(f,1,"{}");this._deserialize(c),(0,p.once)(u.onWillSaveState)(l=>{l.reason===b.WillSaveStateReason.SHUTDOWN&&u.store(f,this._serialize(),1,1)})}put(u,i){const f=i.lenses.map(s=>({range:s.symbol.range,command:s.symbol.command&&{id:"",title:s.symbol.command?.title}})),c=new k.CodeLensModel;c.add({lenses:f,dispose:()=>{}},this._fakeProvider);const l=new S(u.getLineCount(),c);this._cache.set(u.uri.toString(),l)}get(u){const i=this._cache.get(u.uri.toString());return i&&i.lineCount===u.getLineCount()?i.data:void 0}delete(u){this._cache.delete(u.uri.toString())}_serialize(){const u=Object.create(null);for(const[i,f]of this._cache){const c=new Set;for(const l of f.data.lenses)c.add(l.symbol.range.startLineNumber);u[i]={lineCount:f.lineCount,lines:[...c.values()]}}return JSON.stringify(u)}_deserialize(u){try{const i=JSON.parse(u);for(const f in i){const c=i[f],l=[];for(const d of c.lines)l.push({range:new A.Range(d,1,d,11)});const s=new k.CodeLensModel;s.add({lenses:l,dispose(){}},this._fakeProvider),this._cache.set(f,new S(c.lineCount,s))}}catch{}}};C=we([F(0,b.IStorageService)],C),e.CodeLensCache=C,(0,E.registerSingleton)(e.ICodeLensCache,C,1)}),define(ae[515],le([1,0,10,11,21,108,2,483,40,134,59,790,2233,2207,1337,31,26,48,242,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensContribution=void 0;let n=class{constructor(o,g,h,v,m,w){this._editor=o,this._languageFeaturesService=g,this._commandService=v,this._notificationService=m,this._codeLensCache=w,this._disposables=new k.DisposableStore,this._localToDispose=new k.DisposableStore,this._lenses=[],this._oldCodeLensModels=new k.DisposableStore,this._provideCodeLensDebounce=h.for(g.codeLensProvider,"CodeLensProvide",{min:250}),this._resolveCodeLensesDebounce=h.for(g.codeLensProvider,"CodeLensResolve",{min:250,salt:"resolve"}),this._resolveCodeLensesScheduler=new p.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(D=>{(D.hasChanged(45)||D.hasChanged(16)||D.hasChanged(15))&&this._updateLensStyle(),D.hasChanged(14)&&this._onModelChange()})),this._disposables.add(g.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(){const o=Math.max(1.3,this._editor.getOption(60)/this._editor.getOption(47));let g=this._editor.getOption(16);return(!g||g<5)&&(g=this._editor.getOption(47)*.9|0),{fontSize:g,codeLensHeight:g*o|0}}_updateLensStyle(){const{codeLensHeight:o,fontSize:g}=this._getLayoutInfo(),h=this._editor.getOption(15),v=this._editor.getOption(45),m=`--codelens-font-family${this._styleClassName}`,w=`--codelens-font-features${this._styleClassName}`;let D=` .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${o}px; font-size: ${g}px; padding-right: ${Math.round(g*.5)}px; font-feature-settings: var(${w}) } .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${o}px; font-size: ${g}px; } `;h&&(D+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${m}), ${b.EDITOR_FONT_DEFAULTS.fontFamily}}`),this._styleElement.textContent=D,this._editor.getContainerDomNode().style.setProperty(m,h??"inherit"),this._editor.getContainerDomNode().style.setProperty(w,v.fontFeatureSettings),this._editor.changeViewZones(y=>{for(const T of this._lenses)T.updateHeight(o,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 o=this._editor.getModel();if(!o||!this._editor.getOption(14))return;const g=this._codeLensCache.get(o);if(g&&this._renderCodeLensSymbols(g),!this._languageFeaturesService.codeLensProvider.has(o)){g&&this._localToDispose.add((0,p.disposableTimeout)(()=>{const v=this._codeLensCache.get(o);g===v&&(this._codeLensCache.delete(o),this._onModelChange())},30*1e3));return}for(const v of this._languageFeaturesService.codeLensProvider.all(o))if(typeof v.onDidChange=="function"){const m=v.onDidChange(()=>h.schedule());this._localToDispose.add(m)}const h=new p.RunOnceScheduler(()=>{const v=Date.now();this._getCodeLensModelPromise?.cancel(),this._getCodeLensModelPromise=(0,p.createCancelablePromise)(m=>(0,C.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,o,m)),this._getCodeLensModelPromise.then(m=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=m,this._codeLensCache.put(o,m);const w=this._provideCodeLensDebounce.update(o,Date.now()-v);h.delay=w,this._renderCodeLensSymbols(m),this._resolveCodeLensesInViewportSoon()},R.onUnexpectedError)},this._provideCodeLensDebounce.get(o));this._localToDispose.add(h),this._localToDispose.add((0,k.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(v=>{this._editor.changeViewZones(m=>{const w=[];let D=-1;this._lenses.forEach(T=>{!T.isValid()||D===T.getLineNumber()?w.push(T):(T.update(m),D=T.getLineNumber())});const y=new u.CodeLensHelper;w.forEach(T=>{T.dispose(y,m),this._lenses.splice(this._lenses.indexOf(T),1)}),y.commit(v)})}),h.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{h.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(v=>{v.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 v=E.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(m=>{this._editor.changeViewZones(w=>{this._disposeAllLenses(m,w)})}),v.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(v=>{if(v.target.type!==9)return;let m=v.target.element;if(m?.tagName==="SPAN"&&(m=m.parentElement),m?.tagName==="A")for(const w of this._lenses){const D=w.getCommand(m);if(D){this._commandService.executeCommand(D.id,...D.arguments||[]).catch(y=>this._notificationService.error(y));break}}})),h.schedule()}_disposeAllLenses(o,g){const h=new u.CodeLensHelper;for(const v of this._lenses)v.dispose(h,g);o&&h.commit(o),this._lenses.length=0}_renderCodeLensSymbols(o){if(!this._editor.hasModel())return;const g=this._editor.getModel().getLineCount(),h=[];let v;for(const D of o.lenses){const y=D.symbol.range.startLineNumber;y<1||y>g||(v&&v[v.length-1].symbol.range.startLineNumber===y?v.push(D):(v=[D],h.push(v)))}if(!h.length&&!this._lenses.length)return;const m=E.StableEditorScrollState.capture(this._editor),w=this._getLayoutInfo();this._editor.changeDecorations(D=>{this._editor.changeViewZones(y=>{const T=new u.CodeLensHelper;let _=0,L=0;for(;L<h.length&&_<this._lenses.length;){const M=h[L][0].symbol.range.startLineNumber,O=this._lenses[_].getLineNumber();O<M?(this._lenses[_].dispose(T,y),this._lenses.splice(_,1)):O===M?(this._lenses[_].updateCodeLensSymbols(h[L],T),L++,_++):(this._lenses.splice(_,0,new u.CodeLensWidget(h[L],this._editor,this._styleClassName,T,y,w.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),_++,L++)}for(;_<this._lenses.length;)this._lenses[_].dispose(T,y),this._lenses.splice(_,1);for(;L<h.length;)this._lenses.push(new u.CodeLensWidget(h[L],this._editor,this._styleClassName,T,y,w.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),L++;T.commit(D)})}),m.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){this._resolveCodeLensesPromise?.cancel(),this._resolveCodeLensesPromise=void 0;const o=this._editor.getModel();if(!o)return;const g=[],h=[];if(this._lenses.forEach(w=>{const D=w.computeIfNecessary(o);D&&(g.push(D),h.push(w))}),g.length===0)return;const v=Date.now(),m=(0,p.createCancelablePromise)(w=>{const D=g.map((y,T)=>{const _=new Array(y.length),L=y.map((M,O)=>!M.symbol.command&&typeof M.provider.resolveCodeLens=="function"?Promise.resolve(M.provider.resolveCodeLens(o,M.symbol,w)).then(N=>{_[O]=N},R.onUnexpectedExternalError):(_[O]=M.symbol,Promise.resolve(void 0)));return Promise.all(L).then(()=>{!w.isCancellationRequested&&!h[T].isDisposed()&&h[T].updateCommands(_)})});return Promise.all(D)});this._resolveCodeLensesPromise=m,this._resolveCodeLensesPromise.then(()=>{const w=this._resolveCodeLensesDebounce.update(o,Date.now()-v);this._resolveCodeLensesScheduler.delay=w,this._currentCodeLensModel&&this._codeLensCache.put(o,this._currentCodeLensModel),this._oldCodeLensModels.clear(),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},w=>{(0,R.onUnexpectedError)(w),m===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){return this._currentCodeLensModel}};n.ID="css.editor.codeLens",n=we([F(1,d.ILanguageFeaturesService),F(2,s.ILanguageFeatureDebounceService),F(3,f.ICommandService),F(4,c.INotificationService),F(5,r.ICodeLensCache)],n),e.CodeLensContribution=n,(0,I.registerEditorContribution)(n.ID,n),(0,I.registerEditorAction)(class extends I.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:S.EditorContextKeys.hasCodeLensProvider,label:(0,i.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}async run(o,g){if(!g.hasModel())return;const h=o.get(l.IQuickInputService),v=o.get(f.ICommandService),m=o.get(c.INotificationService),w=g.getSelection().positionLineNumber,D=g.getContribution(n.ID);if(!D)return;const y=D.getModel();if(!y)return;const T=[];for(const L of y.lenses)L.symbol.command&&L.symbol.range.startLineNumber===w&&T.push({label:L.symbol.command.title,command:L.symbol.command});if(T.length===0)return;const _=await h.pick(T,{canPickMany:!1});if(!!_){if(y.isDisposed)return await v.executeCommand(this.id);try{await v.executeCommand(_.command.id,..._.command.arguments||[])}catch(L){m.error(L)}}}})}),define(ae[438],le([1,0,11,2,28,40,59,310,2209,434,510,1346,15,93,7,37,38,26,23,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"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 n=524288;function a(N,P="single",B=!1){if(!N.hasModel())return null;const V=N.getSelection();if(P==="single"&&V.startLineNumber===V.endLineNumber||P==="multiple"){if(V.isEmpty()){const z=N.getConfiguredWordAtPosition(V.getStartPosition());if(z&&B===!1)return z.word}else if(N.getModel().getValueLengthInRange(V)<n)return N.getModel().getValueInRange(V)}return null}e.getSelectionSearchString=a;var o;(function(N){N[N.NoFocusChange=0]="NoFocusChange",N[N.FocusFindInput=1]="FocusFindInput",N[N.FocusReplaceInput=2]="FocusReplaceInput"})(o=e.FindStartFocusAction||(e.FindStartFocusAction={}));let g=class ca extends p.Disposable{get editor(){return this._editor}static get(P){return P.getContribution(ca.ID)}constructor(P,B,V,z){super(),this._editor=P,this._findWidgetVisible=E.CONTEXT_FIND_WIDGET_VISIBLE.bindTo(B),this._contextKeyService=B,this._storageService=V,this._clipboardService=z,this._updateHistoryDelayer=new t.Delayer(500),this._state=this._register(new b.FindReplaceState),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(x=>this._onStateChanged(x))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const x=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),x&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(36).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(P){this.saveQueryState(P),P.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),P.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(P){P.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),P.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),P.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),P.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!!E.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()){const P=this._editor.getSelections();P.map(B=>(B.endColumn===1&&B.endLineNumber>B.startLineNumber&&(B=B.setEndPosition(B.endLineNumber-1,this._editor.getModel().getLineMaxColumn(B.endLineNumber-1))),B.isEmpty()?null:B)).filter(B=>!!B),P.length&&this._state.change({searchScope:P},!0)}}setSearchString(P){this._state.isRegex&&(P=R.escapeRegExpCharacters(P)),this._state.change({searchString:P},!1)}highlightFindOptions(P=!1){}async _start(P,B){if(this.disposeModel(),!this._editor.hasModel())return;const V={...B,isRevealed:!0};if(P.seedSearchStringFromSelection==="single"){const z=a(this._editor,P.seedSearchStringFromSelection,P.seedSearchStringFromNonEmptySelection);z&&(this._state.isRegex?V.searchString=R.escapeRegExpCharacters(z):V.searchString=z)}else if(P.seedSearchStringFromSelection==="multiple"&&!P.updateSearchScope){const z=a(this._editor,P.seedSearchStringFromSelection);z&&(V.searchString=z)}if(!V.searchString&&P.seedSearchStringFromGlobalClipboard){const z=await this.getGlobalBufferTerm();if(!this._editor.hasModel())return;z&&(V.searchString=z)}if(P.forceRevealReplace||V.isReplaceRevealed?V.isReplaceRevealed=!0:this._findWidgetVisible.get()||(V.isReplaceRevealed=!1),P.updateSearchScope){const z=this._editor.getSelections();z.some(x=>!x.isEmpty())&&(V.searchScope=z)}V.loop=P.loop,this._state.change(V,!1),this._model||(this._model=new E.FindModelBoundToEditorModel(this._editor,this._state))}start(P,B){return this._start(P,B)}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(36).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}setGlobalBufferTerm(P){this._editor.getOption(36).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(P)}};g.ID="editor.contrib.findController",g=we([F(1,i.IContextKeyService),F(2,s.IStorageService),F(3,u.IClipboardService)],g),e.CommonFindController=g;let h=class extends g{constructor(P,B,V,z,x,H,W,U){super(P,V,W,U),this._contextViewService=B,this._keybindingService=z,this._themeService=x,this._notificationService=H,this._widget=null,this._findOptionsWidget=null}async _start(P,B){this._widget||this._createFindWidget();const V=this._editor.getSelection();let z=!1;switch(this._editor.getOption(36).autoFindInSelection){case"always":z=!0;break;case"never":z=!1;break;case"multiline":{z=!!V&&V.startLineNumber!==V.endLineNumber;break}default:break}P.updateSearchScope=P.updateSearchScope||z,await super._start(P,B),this._widget&&(P.shouldFocus===2?this._widget.focusReplaceInput():P.shouldFocus===1&&this._widget.focusFindInput())}highlightFindOptions(P=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!P?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new S.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(P){this._widget?.setViewState(P)}};h=we([F(1,f.IContextViewService),F(2,i.IContextKeyService),F(3,c.IKeybindingService),F(4,d.IThemeService),F(5,l.INotificationService),F(6,s.IStorageService),F(7,u.IClipboardService)],h),e.FindController=h,e.StartFindAction=(0,A.registerMultiEditorAction)(new A.MultiEditorAction({id:E.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:2084,weight:100},menuOpts:{menuId:r.MenuId.MenubarEditMenu,group:"3_find",title:C.localize(1,null),order:1}})),e.StartFindAction.addImplementation(0,(N,P,B)=>{const V=g.get(P);return V?V.start({forceRevealReplace:!1,seedSearchStringFromSelection:P.getOption(36).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:P.getOption(36).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:P.getOption(36).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:P.getOption(36).loop}):!1});const v={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:E.FIND_IDS.StartFindWithArgs,label:C.localize(6,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:v})}async run(P,B,V){const z=g.get(B);if(z){const x=V?{searchString:V.searchString,replaceString:V.replaceString,isReplaceRevealed:V.replaceString!==void 0,isRegex:V.isRegex,wholeWord:V.matchWholeWord,matchCase:V.isCaseSensitive,preserveCase:V.preserveCase}:{};await z.start({forceRevealReplace:!1,seedSearchStringFromSelection:z.getState().searchString.length===0&&B.getOption(36).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:B.getOption(36).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:V?.findInSelection||!1,loop:B.getOption(36).loop},x),z.setGlobalBufferTerm(z.getState().searchString)}}}e.StartFindWithArgsAction=m;class w extends A.EditorAction{constructor(){super({id:E.FIND_IDS.StartFindWithSelection,label:C.localize(7,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}async run(P,B){const V=g.get(B);V&&(await V.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:B.getOption(36).loop}),V.setGlobalBufferTerm(V.getState().searchString))}}e.StartFindWithSelectionAction=w;class D extends A.EditorAction{async run(P,B){const V=g.get(B);V&&!this._run(V)&&(await V.start({forceRevealReplace:!1,seedSearchStringFromSelection:V.getState().searchString.length===0&&B.getOption(36).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:B.getOption(36).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:B.getOption(36).loop}),this._run(V))}}e.MatchFindAction=D;class y extends D{constructor(){super({id:E.FIND_IDS.NextMatchFindAction,label:C.localize(8,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:k.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,E.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(P){return P.moveToNextMatch()?(P.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=y;class T extends D{constructor(){super({id:E.FIND_IDS.PreviousMatchFindAction,label:C.localize(9,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:k.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,E.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(P){return P.moveToPrevMatch()}}e.PreviousMatchFindAction=T;class _ extends A.EditorAction{async run(P,B){const V=g.get(B);if(!V)return;const z=B.getOption(36).seedSearchStringFromSelection==="selection";let x=null;B.getOption(36).seedSearchStringFromSelection!=="never"&&(x=a(B,"single",z)),x&&V.setSearchString(x),this._run(V)||(await V.start({forceRevealReplace:!1,seedSearchStringFromSelection:B.getOption(36).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:z,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:B.getOption(36).loop}),this._run(V))}}e.SelectionMatchFindAction=_;class L extends _{constructor(){super({id:E.FIND_IDS.NextSelectionMatchFindAction,label:C.localize(10,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:k.EditorContextKeys.focus,primary:2109,weight:100}})}_run(P){return P.moveToNextMatch()}}e.NextSelectionMatchFindAction=L;class M extends _{constructor(){super({id:E.FIND_IDS.PreviousSelectionMatchFindAction,label:C.localize(11,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:k.EditorContextKeys.focus,primary:3133,weight:100}})}_run(P){return P.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=M,e.StartFindReplaceAction=(0,A.registerMultiEditorAction)(new A.MultiEditorAction({id:E.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:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:r.MenuId.MenubarEditMenu,group:"3_find",title:C.localize(13,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(N,P,B)=>{if(!P.hasModel()||P.getOption(82))return!1;const V=g.get(P);if(!V)return!1;const z=P.getSelection(),x=V.isFindInputFocused(),H=!z.isEmpty()&&z.startLineNumber===z.endLineNumber&&P.getOption(36).seedSearchStringFromSelection!=="never"&&!x,W=x||H?2:1;return V.start({forceRevealReplace:!0,seedSearchStringFromSelection:H?"single":"none",seedSearchStringFromNonEmptySelection:P.getOption(36).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:P.getOption(36).seedSearchStringFromSelection!=="never",shouldFocus:W,shouldAnimate:!0,updateSearchScope:!1,loop:P.getOption(36).loop})}),(0,A.registerEditorContribution)(g.ID,h),(0,A.registerEditorAction)(m),(0,A.registerEditorAction)(w),(0,A.registerEditorAction)(y),(0,A.registerEditorAction)(T),(0,A.registerEditorAction)(L),(0,A.registerEditorAction)(M);const O=A.EditorCommand.bindToContribution(g.get);(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.CloseFindWidgetCommand,precondition:E.CONTEXT_FIND_WIDGET_VISIBLE,handler:N=>N.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,i.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:N=>N.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:E.ToggleCaseSensitiveKeybinding.primary,mac:E.ToggleCaseSensitiveKeybinding.mac,win:E.ToggleCaseSensitiveKeybinding.win,linux:E.ToggleCaseSensitiveKeybinding.linux}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:N=>N.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:E.ToggleWholeWordKeybinding.primary,mac:E.ToggleWholeWordKeybinding.mac,win:E.ToggleWholeWordKeybinding.win,linux:E.ToggleWholeWordKeybinding.linux}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:N=>N.toggleRegex(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:E.ToggleRegexKeybinding.primary,mac:E.ToggleRegexKeybinding.mac,win:E.ToggleRegexKeybinding.win,linux:E.ToggleRegexKeybinding.linux}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:N=>N.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:E.ToggleSearchScopeKeybinding.primary,mac:E.ToggleSearchScopeKeybinding.mac,win:E.ToggleSearchScopeKeybinding.win,linux:E.ToggleSearchScopeKeybinding.linux}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:N=>N.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:E.TogglePreserveCaseKeybinding.primary,mac:E.TogglePreserveCaseKeybinding.mac,win:E.TogglePreserveCaseKeybinding.win,linux:E.TogglePreserveCaseKeybinding.linux}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ReplaceOneAction,precondition:E.CONTEXT_FIND_WIDGET_VISIBLE,handler:N=>N.replace(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:3094}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ReplaceOneAction,precondition:E.CONTEXT_FIND_WIDGET_VISIBLE,handler:N=>N.replace(),kbOpts:{weight:100+5,kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,E.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ReplaceAllAction,precondition:E.CONTEXT_FIND_WIDGET_VISIBLE,handler:N=>N.replaceAll(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:2563}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.ReplaceAllAction,precondition:E.CONTEXT_FIND_WIDGET_VISIBLE,handler:N=>N.replaceAll(),kbOpts:{weight:100+5,kbExpr:i.ContextKeyExpr.and(k.EditorContextKeys.focus,E.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,A.registerEditorCommand)(new O({id:E.FIND_IDS.SelectAllMatchesAction,precondition:E.CONTEXT_FIND_WIDGET_VISIBLE,handler:N=>N.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:k.EditorContextKeys.focus,primary:515}}))}),define(ae[835],le([1,0,110,11,99,2,40,589,20,85,59,116,94,438,1375,15,7,33,12,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusPreviousCursor=e.FocusNextCursor=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 n(W,U){const $=U.filter(q=>!W.find(X=>X.equals(q)));if($.length>=1){const q=$.map(G=>`line ${G.viewState.position.lineNumber} column ${G.viewState.position.column}`).join(", "),X=$.length===1?i.localize(0,null,q):i.localize(1,null,q);(0,t.status)(X)}}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:S.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(3,null),order:2}})}run(U,$,q){if(!$.hasModel())return;let X=!0;q&&q.logicalLine===!1&&(X=!1);const G=$._getViewModel();if(G.cursorConfig.readOnly)return;G.model.pushStackElement();const Q=G.getCursorStates();G.setCursorStates(q.source,3,E.CursorMoveCommands.addCursorUp(G,Q,X)),G.revealTopMostCursor(q.source),n(Q,G.getCursorStates())}}e.InsertCursorAbove=a;class o extends k.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:i.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(5,null),order:3}})}run(U,$,q){if(!$.hasModel())return;let X=!0;q&&q.logicalLine===!1&&(X=!1);const G=$._getViewModel();if(G.cursorConfig.readOnly)return;G.model.pushStackElement();const Q=G.getCursorStates();G.setCursorStates(q.source,3,E.CursorMoveCommands.addCursorDown(G,Q,X)),G.revealBottomMostCursor(q.source),n(Q,G.getCursorStates())}}e.InsertCursorBelow=o;class g 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:S.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(7,null),order:4}})}getCursorsForSelection(U,$,q){if(!U.isEmpty()){for(let X=U.startLineNumber;X<U.endLineNumber;X++){const G=$.getLineMaxColumn(X);q.push(new b.Selection(X,G,X,G))}U.endColumn>1&&q.push(new b.Selection(U.endLineNumber,U.endColumn,U.endLineNumber,U.endColumn))}}run(U,$){if(!$.hasModel())return;const q=$.getModel(),X=$.getSelections(),G=$._getViewModel(),Q=G.getCursorStates(),j=[];X.forEach(K=>this.getCursorsForSelection(K,q,j)),j.length>0&&$.setSelections(j),n(Q,G.getCursorStates())}}class h extends k.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(U,$){if(!$.hasModel())return;const q=$.getSelections(),X=$.getModel().getLineCount(),G=[];for(let K=q[0].startLineNumber;K<=X;K++)G.push(new b.Selection(K,q[0].startColumn,K,q[0].endColumn));const Q=$._getViewModel(),j=Q.getCursorStates();G.length>0&&$.setSelections(G),n(j,Q.getCursorStates())}}class v extends k.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:i.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(U,$){if(!$.hasModel())return;const q=$.getSelections(),X=[];for(let j=q[0].startLineNumber;j>=1;j--)X.push(new b.Selection(j,q[0].startColumn,j,q[0].endColumn));const G=$._getViewModel(),Q=G.getCursorStates();X.length>0&&$.setSelections(X),n(Q,G.getCursorStates())}}class m{constructor(U,$,q){this.selections=U,this.revealRange=$,this.revealScrollType=q}}e.MultiCursorSessionResult=m;class w{static create(U,$){if(!U.hasModel())return null;const q=$.getState();if(!U.hasTextFocus()&&q.isRevealed&&q.searchString.length>0)return new w(U,$,!1,q.searchString,q.wholeWord,q.matchCase,null);let X=!1,G,Q;const j=U.getSelections();j.length===1&&j[0].isEmpty()?(X=!0,G=!0,Q=!0):(G=q.wholeWord,Q=q.matchCase);const K=U.getSelection();let Y,ee=null;if(K.isEmpty()){const ie=U.getConfiguredWordAtPosition(K.getStartPosition());if(!ie)return null;Y=ie.word,ee=new b.Selection(K.startLineNumber,ie.startColumn,K.startLineNumber,ie.endColumn)}else Y=U.getModel().getValueInRange(K).replace(/\r\n/g,` `);return new w(U,$,X,Y,G,Q,ee)}constructor(U,$,q,X,G,Q,j){this._editor=U,this.findController=$,this.isDisconnectedFromFindController=q,this.searchText=X,this.wholeWord=G,this.matchCase=Q,this.currentMatch=j}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const U=this._getNextMatch();if(!U)return null;const $=this._editor.getSelections();return new m($.concat(U),U,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const U=this._getNextMatch();if(!U)return null;const $=this._editor.getSelections();return new m($.slice(0,$.length-1).concat(U),U,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const X=this.currentMatch;return this.currentMatch=null,X}this.findController.highlightFindOptions();const U=this._editor.getSelections(),$=U[U.length-1],q=this._editor.getModel().findNextMatch(this.searchText,$.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return q?new b.Selection(q.range.startLineNumber,q.range.startColumn,q.range.endLineNumber,q.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const U=this._getPreviousMatch();if(!U)return null;const $=this._editor.getSelections();return new m($.concat(U),U,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const U=this._getPreviousMatch();if(!U)return null;const $=this._editor.getSelections();return new m($.slice(0,$.length-1).concat(U),U,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const X=this.currentMatch;return this.currentMatch=null,X}this.findController.highlightFindOptions();const U=this._editor.getSelections(),$=U[U.length-1],q=this._editor.getModel().findPreviousMatch(this.searchText,$.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1);return q?new b.Selection(q.range.startLineNumber,q.range.startColumn,q.range.endLineNumber,q.range.endColumn):null}selectAll(U){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const $=this._editor.getModel();return U?$.findMatches(this.searchText,U,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824):$.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(119):null,!1,1073741824)}}e.MultiCursorSession=w;class D extends A.Disposable{static get(U){return U.getContribution(D.ID)}constructor(U){super(),this._sessionDispose=this._register(new A.DisposableStore),this._editor=U,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(U){if(!this._session){const $=w.create(this._editor,U);if(!$)return;this._session=$;const q={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(q.wholeWordOverride=1,q.matchCaseOverride=1,q.isRegexOverride=2),U.getState().change(q,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(X=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(U.getState().onFindReplaceStateChange(X=>{(X.matchCase||X.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const U={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(U,!1)}this._session=null}_setSelections(U){this._ignoreSelectionChange=!0,this._editor.setSelections(U),this._ignoreSelectionChange=!1}_expandEmptyToWord(U,$){if(!$.isEmpty())return $;const q=this._editor.getConfiguredWordAtPosition($.getStartPosition());return q?new b.Selection($.startLineNumber,q.startColumn,$.startLineNumber,q.endColumn):$}_applySessionResult(U){!U||(this._setSelections(U.selections),U.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(U.revealRange,U.revealScrollType))}getSession(U){return this._session}addSelectionToNextFindMatch(U){if(!!this._editor.hasModel()){if(!this._session){const $=this._editor.getSelections();if($.length>1){const X=U.getState().matchCase;if(!V(this._editor.getModel(),$,X)){const Q=this._editor.getModel(),j=[];for(let K=0,Y=$.length;K<Y;K++)j[K]=this._expandEmptyToWord(Q,$[K]);this._editor.setSelections(j);return}}}this._beginSessionIfNeeded(U),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(U){this._beginSessionIfNeeded(U),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(U){this._beginSessionIfNeeded(U),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(U){this._beginSessionIfNeeded(U),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(U){if(!this._editor.hasModel())return;let $=null;const q=U.getState();if(q.isRevealed&&q.searchString.length>0&&q.isRegex){const X=this._editor.getModel();q.searchScope?$=X.findMatches(q.searchString,q.searchScope,q.isRegex,q.matchCase,q.wholeWord?this._editor.getOption(119):null,!1,1073741824):$=X.findMatches(q.searchString,!0,q.isRegex,q.matchCase,q.wholeWord?this._editor.getOption(119):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(U),!this._session)return;$=this._session.selectAll(q.searchScope)}if($.length>0){const X=this._editor.getSelection();for(let G=0,Q=$.length;G<Q;G++){const j=$[G];if(j.range.intersectRanges(X)){$[G]=$[0],$[0]=j;break}}this._setSelections($.map(G=>new b.Selection(G.range.startLineNumber,G.range.startColumn,G.range.endLineNumber,G.range.endColumn)))}}selectAllUsingSelections(U){U.length>0&&this._setSelections(U)}}e.MultiCursorSelectionController=D,D.ID="editor.contrib.multiCursorController";class y extends k.EditorAction{run(U,$){const q=D.get($);if(!q)return;const X=u.CommonFindController.get($);if(!X)return;const G=$._getViewModel();if(G){const Q=G.getCursorStates();this._run(q,X),n(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:S.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(11,null),order:5}})}_run(U,$){U.addSelectionToNextFindMatch($)}}e.AddSelectionToNextFindMatchAction=T;class _ 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:f.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(13,null),order:6}})}_run(U,$){U.addSelectionToPreviousFindMatch($)}}e.AddSelectionToPreviousFindMatchAction=_;class L 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:S.EditorContextKeys.focus,primary:(0,R.KeyChord)(2089,2082),weight:100}})}_run(U,$){U.moveSelectionToNextFindMatch($)}}e.MoveSelectionToNextFindMatchAction=L;class M 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(U,$){U.moveSelectionToPreviousFindMatch($)}}e.MoveSelectionToPreviousFindMatchAction=M;class O 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:S.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:f.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(17,null),order:7}})}_run(U,$){U.selectAll($)}}e.SelectHighlightsAction=O;class N extends y{constructor(){super({id:"editor.action.changeAll",label:i.localize(18,null),alias:"Change All Occurrences",precondition:c.ContextKeyExpr.and(S.EditorContextKeys.writable,S.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(U,$){U.selectAll($)}}e.CompatChangeAll=N;class P{constructor(U,$,q,X,G){this._model=U,this._searchText=$,this._matchCase=q,this._wordSeparators=X,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(U=>U.range),this._cachedFindMatches.sort(I.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let B=class sr extends A.Disposable{constructor(U,$){super(),this._languageFeaturesService=$,this.editor=U,this._isEnabled=U.getOption(98),this._decorations=U.createDecorationsCollection(),this.updateSoon=this._register(new p.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(U.onDidChangeConfiguration(X=>{this._isEnabled=U.getOption(98)})),this._register(U.onDidChangeCursorSelection(X=>{!this._isEnabled||(X.selection.isEmpty()?X.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(U.onDidChangeModel(X=>{this._setState(null)})),this._register(U.onDidChangeModelContent(X=>{this._isEnabled&&this.updateSoon.schedule()}));const q=u.CommonFindController.get(U);q&&this._register(q.getState().onFindReplaceStateChange(X=>{this._update()}))}_update(){this._setState(sr._createState(this.state,this._isEnabled,this.editor))}static _createState(U,$,q){if(!$||!q.hasModel())return null;const X=q.getSelection();if(X.startLineNumber!==X.endLineNumber)return null;const G=D.get(q);if(!G)return null;const Q=u.CommonFindController.get(q);if(!Q)return null;let j=G.getSession(Q);if(!j){const ee=q.getSelections();if(ee.length>1){const re=Q.getState().matchCase;if(!V(q.getModel(),ee,re))return null}j=w.create(q,Q)}if(!j||j.currentMatch||/^[ \t]+$/.test(j.searchText)||j.searchText.length>200)return null;const K=Q.getState(),Y=K.matchCase;if(K.isRevealed){let ee=K.searchString;Y||(ee=ee.toLowerCase());let ie=j.searchText;if(Y||(ie=ie.toLowerCase()),ee===ie&&j.matchCase===K.matchCase&&j.wholeWord===K.wholeWord&&!K.isRegex)return null}return new P(q.getModel(),j.searchText,j.matchCase,j.wholeWord?q.getOption(119):null,U)}_setState(U){if(this.state=U,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const $=this.editor.getModel();if($.isTooLargeForTokenization())return;const q=this.state.findMatches(),X=this.editor.getSelections();X.sort(I.Range.compareRangesUsingStarts);const G=[];for(let K=0,Y=0,ee=q.length,ie=X.length;K<ee;){const re=q[K];if(Y>=ie)G.push(re),K++;else{const oe=I.Range.compareRangesUsingStarts(re,X[Y]);oe<0?((X[Y].isEmpty()||!I.Range.areIntersecting(re,X[Y]))&&G.push(re),K++):(oe>0||K++,Y++)}}const Q=this._languageFeaturesService.documentHighlightProvider.has($)&&this.editor.getOption(73),j=G.map(K=>({range:K,options:Q?sr._SELECTION_HIGHLIGHT:sr._SELECTION_HIGHLIGHT_OVERVIEW}));this._decorations.set(j)}dispose(){this._setState(null),super.dispose()}};B.ID="editor.contrib.selectionHighlighter",B._SELECTION_HIGHLIGHT_OVERVIEW=r.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:(0,s.themeColorFromId)(l.minimapSelectionOccurrenceHighlight),position:C.MinimapPosition.Inline},overviewRuler:{color:(0,s.themeColorFromId)(l.overviewRulerSelectionHighlightForeground),position:C.OverviewRulerLane.Center}}),B._SELECTION_HIGHLIGHT=r.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),B=we([F(1,d.ILanguageFeaturesService)],B),e.SelectionHighlighter=B;function V(W,U,$){const q=z(W,U[0],!$);for(let X=1,G=U.length;X<G;X++){const Q=U[X];if(Q.isEmpty())return!1;const j=z(W,Q,!$);if(q!==j)return!1}return!0}function z(W,U,$){const q=W.getValueInRange(U);return $?q.toLowerCase():q}class x extends k.EditorAction{constructor(){super({id:"editor.action.focusNextCursor",label:i.localize(19,null),description:{description:i.localize(20,null),args:[]},alias:"Focus Next Cursor",precondition:void 0})}run(U,$,q){if(!$.hasModel())return;const X=$._getViewModel();if(X.cursorConfig.readOnly)return;X.model.pushStackElement();const G=Array.from(X.getCursorStates()),Q=G.shift();!Q||(G.push(Q),X.setCursorStates(q.source,3,G),X.revealPrimaryCursor(q.source,!0),n(G,X.getCursorStates()))}}e.FocusNextCursor=x;class H extends k.EditorAction{constructor(){super({id:"editor.action.focusPreviousCursor",label:i.localize(21,null),description:{description:i.localize(22,null),args:[]},alias:"Focus Previous Cursor",precondition:void 0})}run(U,$,q){if(!$.hasModel())return;const X=$._getViewModel();if(X.cursorConfig.readOnly)return;X.model.pushStackElement();const G=Array.from(X.getCursorStates()),Q=G.pop();!Q||(G.unshift(Q),X.setCursorStates(q.source,3,G),X.revealPrimaryCursor(q.source,!0),n(G,X.getCursorStates()))}}e.FocusPreviousCursor=H,(0,k.registerEditorContribution)(D.ID,D),(0,k.registerEditorContribution)(B.ID,B),(0,k.registerEditorAction)(a),(0,k.registerEditorAction)(o),(0,k.registerEditorAction)(g),(0,k.registerEditorAction)(T),(0,k.registerEditorAction)(_),(0,k.registerEditorAction)(L),(0,k.registerEditorAction)(M),(0,k.registerEditorAction)(O),(0,k.registerEditorAction)(N),(0,k.registerEditorAction)(h),(0,k.registerEditorAction)(v),(0,k.registerEditorAction)(x),(0,k.registerEditorAction)(H)}),define(ae[836],le([1,0,11,2,60,220,92,8,35,5,23]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class C{constructor(l){this.name=l}select(l,s,d){if(d.length===0)return 0;const n=d[0].score[0];for(let a=0;a<d.length;a++){const{score:o,completion:g}=d[a];if(o[0]!==n)break;if(g.preselect)return a}return 0}}e.Memory=C;class r extends C{constructor(){super("first")}memorize(l,s,d){}toJSON(){}fromJSON(){}}e.NoMemory=r;class u extends C{constructor(){super("recentlyUsed"),this._cache=new R.LRUCache(300,.66),this._seq=0}memorize(l,s,d){const n=`${l.getLanguageId()}/${d.textLabel}`;this._cache.set(n,{touch:this._seq++,type:d.completion.kind,insertText:d.completion.insertText})}select(l,s,d){if(d.length===0)return 0;const n=l.getLineContent(s.lineNumber).substr(s.column-10,s.column-1);if(/\s$/.test(n))return super.select(l,s,d);const a=d[0].score[0];let o=-1,g=-1,h=-1;for(let v=0;v<d.length&&d[v].score[0]===a;v++){const m=`${l.getLanguageId()}/${d[v].textLabel}`,w=this._cache.peek(m);if(w&&w.touch>h&&w.type===d[v].completion.kind&&w.insertText===d[v].completion.insertText&&(h=w.touch,g=v),d[v].completion.preselect&&o===-1)return o=v}return g!==-1?g:o!==-1?o:0}toJSON(){return this._cache.toJSON()}fromJSON(l){this._cache.clear();const s=0;for(const[d,n]of l)n.touch=s,n.type=typeof n.type=="number"?n.type:k.CompletionItemKinds.fromString(n.type),this._cache.set(d,n);this._seq=this._cache.size}}e.LRUMemory=u;class i extends C{constructor(){super("recentlyUsedByPrefix"),this._trie=A.TernarySearchTree.forStrings(),this._seq=0}memorize(l,s,d){const{word:n}=l.getWordUntilPosition(s),a=`${l.getLanguageId()}/${n}`;this._trie.set(a,{type:d.completion.kind,insertText:d.completion.insertText,touch:this._seq++})}select(l,s,d){const{word:n}=l.getWordUntilPosition(s);if(!n)return super.select(l,s,d);const a=`${l.getLanguageId()}/${n}`;let o=this._trie.get(a);if(o||(o=this._trie.findSubstr(a)),o)for(let g=0;g<d.length;g++){const{kind:h,insertText:v}=d[g].completion;if(h===o.type&&v===o.insertText)return g}return super.select(l,s,d)}toJSON(){const l=[];return this._trie.forEach((s,d)=>l.push([d,s])),l.sort((s,d)=>-(s[1].touch-d[1].touch)).forEach((s,d)=>s[1].touch=d),l.slice(0,200)}fromJSON(l){if(this._trie.clear(),l.length>0){this._seq=l[0][1].touch+1;for(const[s,d]of l)d.type=typeof d.type=="number"?d.type:k.CompletionItemKinds.fromString(d.type),this._trie.set(s,d)}}}e.PrefixMemory=i;let f=class or{constructor(l,s){this._storageService=l,this._configService=s,this._disposables=new p.DisposableStore,this._persistSoon=new t.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(l.onWillSaveState(d=>{d.reason===S.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(l,s,d){this._withStrategy(l,s).memorize(l,s,d),this._persistSoon.schedule()}select(l,s,d){return this._withStrategy(l,s).select(l,s,d)}_withStrategy(l,s){const d=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:l.getLanguageIdAtPosition(s.lineNumber,s.column),resource:l.uri});if(this._strategy?.name!==d){this._saveState();const n=or._strategyCtors.get(d)||r;this._strategy=new n;try{const o=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,g=this._storageService.get(`${or._storagePrefix}/${d}`,o);g&&this._strategy.fromJSON(JSON.parse(g))}catch{}}return this._strategy}_saveState(){if(this._strategy){const s=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,d=JSON.stringify(this._strategy);this._storageService.store(`${or._storagePrefix}/${this._strategy.name}`,d,s,1)}}};f._strategyCtors=new Map([["recentlyUsedByPrefix",i],["recentlyUsed",u],["first",r]]),f._storagePrefix="suggest/memories",f=we([F(0,S.IStorageService),F(1,E.IConfigurationService)],f),e.SuggestMemoryService=f,e.ISuggestMemoryService=(0,b.createDecorator)("ISuggestMemories"),(0,I.registerSingleton)(e.ISuggestMemoryService,f,1)}),define(ae[2234],le([1,0,32,96,88,2,40,75,20,61,732,781,224,836,742,93,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestInlineCompletions=void 0;class l{constructor(o,g,h,v,m,w){this.range=o,this.insertText=g,this.filterText=h,this.additionalTextEdits=v,this.command=m,this.completion=w}}let s=class extends A.RefCountedDisposable{constructor(o,g,h,v,m,w){super(m.disposable),this.model=o,this.line=g,this.word=h,this.completionModel=v,this._suggestMemoryService=w}canBeReused(o,g,h){return this.model===o&&this.line===g&&this.word.word.length>0&&this.word.startColumn===h.startColumn&&this.word.endColumn<h.endColumn&&this.completionModel.incomplete.size===0}get items(){const o=[],{items:g}=this.completionModel,h=this._suggestMemoryService.select(this.model,{lineNumber:this.line,column:this.word.endColumn+this.completionModel.lineContext.characterCountDelta},g),v=R.Iterable.slice(g,h),m=R.Iterable.slice(g,0,h);let w=5;for(const D of R.Iterable.concat(v,m)){if(D.score===p.FuzzyScore.Default)continue;const y=new I.Range(D.editStart.lineNumber,D.editStart.column,D.editInsertEnd.lineNumber,D.editInsertEnd.column+this.completionModel.lineContext.characterCountDelta),T=D.completion.insertTextRules&&D.completion.insertTextRules&S.CompletionItemInsertTextRule.InsertAsSnippet?{snippet:D.completion.insertText}:D.completion.insertText;o.push(new l(y,T,D.filterTextLow??D.labelLow,D.completion.additionalTextEdits,D.completion.command,D)),w-->=0&&D.resolve(t.CancellationToken.None)}return o}};s=we([F(5,u.ISuggestMemoryService)],s);let d=class{constructor(o,g,h,v){this._getEditorOption=o,this._languageFeatureService=g,this._clipboardService=h,this._suggestMemoryService=v}async provideInlineCompletions(o,g,h,v){if(h.selectedSuggestionInfo)return;const m=this._getEditorOption(80,o);if(r.QuickSuggestionsOptions.isAllOff(m))return;o.tokenization.tokenizeIfCheap(g.lineNumber);const w=o.tokenization.getLineTokens(g.lineNumber),D=w.getStandardTokenType(w.findTokenIndexAtOffset(Math.max(g.column-1-1,0)));if(r.QuickSuggestionsOptions.valueFor(m,D)!=="inline")return;let y=o.getWordAtPosition(g),T;if(y?.word||(T=this._getTriggerCharacterInfo(o,g)),!y?.word&&!T||(y||(y=o.getWordUntilPosition(g)),y.endColumn!==g.column))return;let _;const L=o.getValueInRange(new I.Range(g.lineNumber,1,g.lineNumber,g.column));if(!T&&this._lastResult?.canBeReused(o,g.lineNumber,y)){const M=new C.LineContext(L,g.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=M,this._lastResult.acquire(),_=this._lastResult}else{const M=await(0,r.provideSuggestionItems)(this._languageFeatureService.completionProvider,o,g,new r.CompletionOptions(void 0,void 0,T?.providers),T&&{triggerKind:1,triggerCharacter:T.ch},v);let O;M.needsClipboard&&(O=await this._clipboardService.readText());const N=new C.CompletionModel(M.items,g.column,new C.LineContext(L,0),i.WordDistance.None,this._getEditorOption(108,o),this._getEditorOption(102,o),{boostFullMatch:!1,firstMatchCanBeWeak:!1},O);_=new s(o,g.lineNumber,y,N,M,this._suggestMemoryService)}return this._lastResult=_,_}handleItemDidShow(o,g){g.completion.resolve(t.CancellationToken.None)}freeInlineCompletions(o){o.release()}_getTriggerCharacterInfo(o,g){const h=o.getValueInRange(I.Range.fromPositions({lineNumber:g.lineNumber,column:g.column-1},g)),v=new Set;for(const m of this._languageFeatureService.completionProvider.all(o))m.triggerCharacters?.includes(h)&&v.add(m);if(v.size!==0)return{providers:v,ch:h}}};d=we([F(1,b.ILanguageFeaturesService),F(2,f.IClipboardService),F(3,u.ISuggestMemoryService)],d),e.SuggestInlineCompletions=d;let n=class on{constructor(o,g,h,v){if(++on._counter===1){const m=v.createInstance(d,(w,D)=>(h.listCodeEditors().find(T=>T.getModel()===D)??o).getOption(w));on._disposable=g.inlineCompletionsProvider.register("*",m)}}dispose(){--on._counter===0&&(on._disposable?.dispose(),on._disposable=void 0)}};n._counter=0,n=we([F(1,b.ILanguageFeaturesService),F(2,E.ICodeEditorService),F(3,c.IInstantiationService)],n),(0,k.registerEditorContribution)("suggest.inlineCompletionsProvider",n)}),define(ae[84],le([1,0,10,90,137,279,36,327,2,14,1402,15,597,7,37,5,38,26,23,12,126,13,73,33,1099]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.DropdownWithDefaultActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function h(L,M,O,N){const P=L.getActions(M),B=t.ModifierKeyEmitter.getInstance(),V=B.keyStatus.altKey||(b.isWindows||b.isLinux)&&B.keyStatus.shiftKey;m(P,O,V,N?z=>z===N:z=>z==="navigation")}e.createAndFillInContextMenuActions=h;function v(L,M,O,N,P,B,V){const z=L.getActions(M);m(z,O,!1,typeof N=="string"?H=>H===N:N,P,B,V)}e.createAndFillInActionBarActions=v;function m(L,M,O,N=z=>z==="navigation",P=Number.MAX_SAFE_INTEGER,B=()=>!1,V=!1){let z,x;Array.isArray(M)?(z=M,x=M):(z=M.primary,x=M.secondary);const H=new Set;for(const[W,U]of L){let $;N(W)?($=z,$.length>0&&V&&$.push(new k.Separator)):($=x,$.length>0&&$.push(new k.Separator));for(let q of U){O&&(q=q instanceof C.MenuItemAction&&q.alt?q.alt:q);const X=$.push(q);q instanceof k.SubmenuAction&&H.add({group:W,action:q,index:X-1})}}for(const{group:W,action:U,index:$}of H){const q=N(W)?z:x,X=U.actions;(X.length<=1||q.length+X.length-2<=P)&&B(U,W,q.length)&&q.splice($,1,...X)}if(z!==x&&z.length>P){const W=z.splice(P,z.length-P);x.unshift(...W,new k.Separator)}}let w=class extends R.ActionViewItem{constructor(M,O,N,P,B,V,z){super(void 0,M,{icon:!!(M.class||M.item.icon),label:!M.class&&!M.item.icon,draggable:O?.draggable,keybinding:O?.keybinding,hoverDelegate:O?.hoverDelegate}),this._keybindingService=N,this._notificationService=P,this._contextKeyService=B,this._themeService=V,this._contextMenuService=z,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(M){M.preventDefault(),M.stopPropagation();try{await this.actionRunner.run(this._commandAction,this._context)}catch(O){this._notificationService.error(O)}}render(M){super.render(M),M.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let O=!1,N=this._altKey.keyStatus.altKey||(b.isWindows||b.isLinux)&&this._altKey.keyStatus.shiftKey;const P=()=>{const B=O&&N&&!!this._commandAction.alt?.enabled;B!==this._wantsAltCommand&&(this._wantsAltCommand=B,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(B=>{N=B.altKey||(b.isWindows||b.isLinux)&&B.shiftKey,P()})),this._register((0,t.addDisposableListener)(M,"mouseleave",B=>{O=!1,P()})),this._register((0,t.addDisposableListener)(M,"mouseenter",B=>{O=!0,P()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){const M=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),O=M&&M.getLabel(),N=this._commandAction.tooltip||this._commandAction.label;let P=O?(0,S.localize)(0,null,N,O):N;if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){const B=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,V=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),z=V&&V.getLabel(),x=z?(0,S.localize)(1,null,B,z):B;P=(0,S.localize)(2,null,P,E.UILabelProvider.modifierLabels[b.OS].altKey,x)}return P}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(M){this._itemClassDispose.value=void 0;const{element:O,label:N}=this;if(!O||!N)return;const P=this._commandAction.checked&&(0,r.isICommandActionToggleInfo)(M.toggled)&&M.toggled.icon?M.toggled.icon:M.icon;if(!!P)if(d.ThemeIcon.isThemeIcon(P)){const B=d.ThemeIcon.asClassNameArray(P);N.classList.add(...B),this._itemClassDispose.value=(0,I.toDisposable)(()=>{N.classList.remove(...B)})}else N.style.backgroundImage=(0,n.isDark)(this._themeService.getColorTheme().type)?(0,t.asCSSUrl)(P.dark):(0,t.asCSSUrl)(P.light),N.classList.add("icon"),this._itemClassDispose.value=(0,I.combinedDisposable)((0,I.toDisposable)(()=>{N.style.backgroundImage="",N.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};w=we([F(2,c.IKeybindingService),F(3,l.INotificationService),F(4,u.IContextKeyService),F(5,d.IThemeService),F(6,i.IContextMenuService)],w),e.MenuEntryActionViewItem=w;let D=class extends A.DropdownMenuActionViewItem{constructor(M,O,N,P){const B=Object.assign({},O??Object.create(null),{menuAsChild:O?.menuAsChild??!1,classNames:O?.classNames??(d.ThemeIcon.isThemeIcon(M.item.icon)?d.ThemeIcon.asClassName(M.item.icon):void 0)});super(M,{getActions:()=>M.actions},N,B),this._contextMenuService=N,this._themeService=P}render(M){super.render(M),(0,a.assertType)(this.element),M.classList.add("menu-entry");const O=this._action,{icon:N}=O.item;if(N&&!d.ThemeIcon.isThemeIcon(N)){this.element.classList.add("icon");const P=()=>{this.element&&(this.element.style.backgroundImage=(0,n.isDark)(this._themeService.getColorTheme().type)?(0,t.asCSSUrl)(N.dark):(0,t.asCSSUrl)(N.light))};P(),this._register(this._themeService.onDidColorThemeChange(()=>{P()}))}}};D=we([F(2,i.IContextMenuService),F(3,d.IThemeService)],D),e.SubmenuEntryActionViewItem=D;let y=class extends R.BaseActionViewItem{get onDidChangeDropdownVisibility(){return this._dropdown.onDidChangeVisibility}constructor(M,O,N,P,B,V,z,x){super(null,M),this._keybindingService=N,this._notificationService=P,this._contextMenuService=B,this._menuService=V,this._instaService=z,this._storageService=x,this._container=null,this._options=O,this._storageKey=`${M.item.submenu.id}_lastActionId`;let H;const W=x.get(this._storageKey,1);W&&(H=M.actions.find($=>W===$.id)),H||(H=M.actions[0]),this._defaultAction=this._instaService.createInstance(w,H,{keybinding:this._getDefaultActionKeybindingLabel(H)});const U=Object.assign({},O??Object.create(null),{menuAsChild:O?.menuAsChild??!0,classNames:O?.classNames??["codicon","codicon-chevron-down"],actionRunner:O?.actionRunner??new k.ActionRunner});this._dropdown=new A.DropdownMenuActionViewItem(M,M.actions,this._contextMenuService,U),this._dropdown.actionRunner.onDidRun($=>{$.action instanceof C.MenuItemAction&&this.update($.action)})}update(M){this._storageService.store(this._storageKey,M.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(w,M,{keybinding:this._getDefaultActionKeybindingLabel(M)}),this._defaultAction.actionRunner=new class extends k.ActionRunner{async runAction(O,N){await O.run(void 0)}},this._container&&this._defaultAction.render((0,t.prepend)(this._container,(0,t.$)(".action-container")))}_getDefaultActionKeybindingLabel(M){let O;if(this._options?.renderKeybindingWithDefaultActionLabel){const N=this._keybindingService.lookupKeybinding(M.id);N&&(O=`(${N.getLabel()})`)}return O}setActionContext(M){super.setActionContext(M),this._defaultAction.setActionContext(M),this._dropdown.setActionContext(M)}render(M){this._container=M,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const O=(0,t.$)(".action-container");this._defaultAction.render((0,t.append)(this._container,O)),this._register((0,t.addDisposableListener)(O,t.EventType.KEY_DOWN,P=>{const B=new p.StandardKeyboardEvent(P);B.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),B.stopPropagation())}));const N=(0,t.$)(".dropdown-action-container");this._dropdown.render((0,t.append)(this._container,N)),this._register((0,t.addDisposableListener)(N,t.EventType.KEY_DOWN,P=>{const B=new p.StandardKeyboardEvent(P);B.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),B.stopPropagation())}))}focus(M){M?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(M){M?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};y=we([F(2,c.IKeybindingService),F(3,l.INotificationService),F(4,i.IContextMenuService),F(5,C.IMenuService),F(6,f.IInstantiationService),F(7,s.IStorageService)],y),e.DropdownWithDefaultActionViewItem=y;let T=class extends R.SelectActionViewItem{constructor(M,O,N){super(null,M,M.actions.map(P=>({text:P.id===k.Separator.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":P.label,isDisabled:!P.enabled})),0,N,{ariaLabel:M.tooltip,optionsAsChildren:!0}),this.themeService=O,this._register((0,o.attachSelectBoxStyler)(this.selectBox,O)),this.select(Math.max(0,M.actions.findIndex(P=>P.checked)))}render(M){super.render(M),this._register((0,o.attachStylerCallback)(this.themeService,{selectBorder:g.selectBorder},O=>{M.style.borderColor=O.selectBorder?`${O.selectBorder}`:""}))}runAction(M,O){const N=this.action.actions[O];N&&this.actionRunner.run(N)}};T=we([F(1,d.IThemeService),F(2,i.IContextViewService)],T);function _(L,M,O){return M instanceof C.MenuItemAction?L.createInstance(w,M,O):M instanceof C.SubmenuItemAction?M.item.isSelection?L.createInstance(T,M):M.item.rememberDefaultAction?L.createInstance(y,M,O):L.createInstance(D,M,O):void 0}e.createActionViewItem=_}),define(ae[174],le([1,0,10,79,36,29,65,6,52,40,75,226,512,1378,84,7,35,5,33,1091]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"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,c.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(h,v){const m=this._widgets.get(h);m&&(m.listener.dispose(),m.widget.dispose());const w=()=>{const D=this._widgets.get(h);D&&D.widget===v&&(D.listener.dispose(),this._widgets.delete(h))};this._widgets.set(h,{widget:v,listener:v.onDidClose(w)})}},1);var d;(function(h){h.inPeekEditor=new f.RawContextKey("inReferenceSearchEditor",!0,u.localize(0,null)),h.notInPeekEditor=h.inPeekEditor.toNegated()})(d=e.PeekContext||(e.PeekContext={}));let n=class{constructor(v,m){v instanceof C.EmbeddedCodeEditorWidget&&d.inPeekEditor.bindTo(m)}dispose(){}};n.ID="editor.contrib.referenceController",n=we([F(1,f.IContextKeyService)],n),(0,b.registerEditorContribution)(n.ID,n);function a(h){const v=h.get(S.ICodeEditorService).getFocusedCodeEditor();return v instanceof C.EmbeddedCodeEditorWidget?v.getParentEditor():v}e.getOuterEditor=a;const o={headerBackgroundColor:k.Color.white,primaryHeadingColor:k.Color.fromHex("#333333"),secondaryHeadingColor:k.Color.fromHex("#6c6c6cb3")};let g=class extends r.ZoneWidget{constructor(v,m,w){super(v,m),this.instantiationService=w,this._onDidClose=new E.Emitter,this.onDidClose=this._onDidClose.event,I.mixin(this.options,o,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(v){const m=this.options;v.headerBackgroundColor&&(m.headerBackgroundColor=v.headerBackgroundColor),v.primaryHeadingColor&&(m.primaryHeadingColor=v.primaryHeadingColor),v.secondaryHeadingColor&&(m.secondaryHeadingColor=v.secondaryHeadingColor),super.style(v)}_applyStyles(){super._applyStyles();const v=this.options;this._headElement&&v.headerBackgroundColor&&(this._headElement.style.backgroundColor=v.headerBackgroundColor.toString()),this._primaryHeading&&v.primaryHeadingColor&&(this._primaryHeading.style.color=v.primaryHeadingColor.toString()),this._secondaryHeading&&v.secondaryHeadingColor&&(this._secondaryHeading.style.color=v.secondaryHeadingColor.toString()),this._bodyElement&&v.frameColor&&(this._bodyElement.style.borderColor=v.frameColor.toString())}_fillContainer(v){this.setCssClass("peekview-widget"),this._headElement=t.$(".head"),this._bodyElement=t.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),v.appendChild(this._headElement),v.appendChild(this._bodyElement)}_fillHead(v,m){const w=t.$(".peekview-title");this.options.supportOnTitleClick&&(w.classList.add("clickable"),t.addStandardDisposableListener(w,"click",T=>this._onTitleClick(T))),t.append(this._headElement,w),this._fillTitleIcon(w),this._primaryHeading=t.$("span.filename"),this._secondaryHeading=t.$("span.dirname"),this._metaHeading=t.$("span.meta"),t.append(w,this._primaryHeading,this._secondaryHeading,this._metaHeading);const D=t.$(".peekview-actions");t.append(this._headElement,D);const y=this._getActionBarOptions();this._actionbarWidget=new p.ActionBar(D,y),this._disposables.add(this._actionbarWidget),m||this._actionbarWidget.push(new R.Action("peekview.close",u.localize(1,null),A.Codicon.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(v){}_getActionBarOptions(){return{actionViewItemProvider:i.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(v){}setTitle(v,m){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=v,this._primaryHeading.setAttribute("title",v),m?this._secondaryHeading.innerText=m:t.clearNode(this._secondaryHeading))}setMetaTitle(v){this._metaHeading&&(v?(this._metaHeading.innerText=v,t.show(this._metaHeading)):t.hide(this._metaHeading))}_doLayout(v,m){if(!this._isShowing&&v<0){this.dispose();return}const w=Math.ceil(this.editor.getOption(60)*1.2),D=Math.round(v-(w+2));this._doLayoutHead(w,m),this._doLayoutBody(D,m)}_doLayoutHead(v,m){this._headElement&&(this._headElement.style.height=`${v}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(v,m){this._bodyElement&&(this._bodyElement.style.height=`${v}px`)}};g=we([F(2,l.IInstantiationService)],g),e.PeekViewWidget=g,e.peekViewTitleBackground=(0,s.registerColor)("peekViewTitle.background",{dark:(0,s.transparent)(s.editorInfoForeground,.1),light:(0,s.transparent)(s.editorInfoForeground,.1),hcDark:null,hcLight:null},u.localize(2,null)),e.peekViewTitleForeground=(0,s.registerColor)("peekViewTitleLabel.foreground",{dark:k.Color.white,light:k.Color.black,hcDark:k.Color.white,hcLight:s.editorForeground},u.localize(3,null)),e.peekViewTitleInfoForeground=(0,s.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},u.localize(4,null)),e.peekViewBorder=(0,s.registerColor)("peekView.border",{dark:s.editorInfoForeground,light:s.editorInfoForeground,hcDark:s.contrastBorder,hcLight:s.contrastBorder},u.localize(5,null)),e.peekViewResultsBackground=(0,s.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:k.Color.black,hcLight:k.Color.white},u.localize(6,null)),e.peekViewResultsMatchForeground=(0,s.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:k.Color.white,hcLight:s.editorForeground},u.localize(7,null)),e.peekViewResultsFileForeground=(0,s.registerColor)("peekViewResult.fileForeground",{dark:k.Color.white,light:"#1E1E1E",hcDark:k.Color.white,hcLight:s.editorForeground},u.localize(8,null)),e.peekViewResultsSelectionBackground=(0,s.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},u.localize(9,null)),e.peekViewResultsSelectionForeground=(0,s.registerColor)("peekViewResult.selectionForeground",{dark:k.Color.white,light:"#6C6C6C",hcDark:k.Color.white,hcLight:s.editorForeground},u.localize(10,null)),e.peekViewEditorBackground=(0,s.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:k.Color.black,hcLight:k.Color.white},u.localize(11,null)),e.peekViewEditorGutterBackground=(0,s.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},u.localize(12,null)),e.peekViewResultsMatchHighlight=(0,s.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},u.localize(13,null)),e.peekViewEditorMatchHighlight=(0,s.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},u.localize(14,null)),e.peekViewEditorMatchHighlightBorder=(0,s.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:s.activeContrastBorder,hcLight:s.activeContrastBorder},u.localize(15,null))}),define(ae[2235],le([1,0,10,147,16,65,6,2,18,28,20,174,1354,84,15,7,5,49,124,41,432,33,12,1084]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"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(y,T,_,L,M){this._openerService=L,this._labelService=M,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new E.DisposableStore,this._editor=T;const O=document.createElement("div");O.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),O.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),O.appendChild(this._relatedBlock),this._disposables.add(t.addStandardDisposableListener(this._relatedBlock,"click",N=>{N.preventDefault();const P=this._relatedDiagnostics.get(N.target);P&&_(P)})),this._scrollable=new p.ScrollableElement(O,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),y.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(N=>{O.style.left=`-${N.scrollLeft}px`,O.style.top=`-${N.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,E.dispose)(this._disposables)}update(y){const{source:T,message:_,relatedInformation:L,code:M}=y;let O=(T?.length||0)+2;M&&(typeof M=="string"?O+=M.length:O+=M.value.length);const N=(0,b.splitLines)(_);this._lines=N.length,this._longestLineLength=0;for(const x of N)this._longestLineLength=Math.max(x.length+O,this._longestLineLength);t.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(y)),this._editor.applyFontInfo(this._messageBlock);let P=this._messageBlock;for(const x of N)P=document.createElement("div"),P.innerText=x,x===""&&(P.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(P);if(T||M){const x=document.createElement("span");if(x.classList.add("details"),P.appendChild(x),T){const H=document.createElement("span");H.innerText=T,H.classList.add("source"),x.appendChild(H)}if(M)if(typeof M=="string"){const H=document.createElement("span");H.innerText=`(${M})`,H.classList.add("code"),x.appendChild(H)}else{this._codeLink=t.$("a.code-link"),this._codeLink.setAttribute("href",`${M.target.toString()}`),this._codeLink.onclick=W=>{this._openerService.open(M.target,{allowCommands:!0}),W.preventDefault(),W.stopPropagation()};const H=t.append(this._codeLink,t.$("span"));H.innerText=M.value,x.appendChild(this._codeLink)}}if(t.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,R.isNonEmptyArray)(L)){const x=this._relatedBlock.appendChild(document.createElement("div"));x.style.paddingTop=`${Math.floor(this._editor.getOption(60)*.66)}px`,this._lines+=1;for(const H of L){const W=document.createElement("div"),U=document.createElement("a");U.classList.add("filename"),U.innerText=`${this._labelService.getUriBasenameLabel(H.resource)}(${H.startLineNumber}, ${H.startColumn}): `,U.title=this._labelService.getUriLabel(H.resource),this._relatedDiagnostics.set(U,H);const $=document.createElement("span");$.innerText=H.message,W.appendChild(U),W.appendChild($),this._lines+=1,x.appendChild(W)}}const B=this._editor.getOption(45),V=Math.ceil(B.typicalFullwidthCharacterWidth*this._longestLineLength*.75),z=B.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:V,scrollHeight:z})}layout(y,T){this._scrollable.getDomNode().style.height=`${y}px`,this._scrollable.getDomNode().style.width=`${T}px`,this._scrollable.setScrollDimensions({width:T,height:y})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(y){let T="";switch(y.severity){case s.MarkerSeverity.Error:T=r.localize(0,null);break;case s.MarkerSeverity.Warning:T=r.localize(1,null);break;case s.MarkerSeverity.Info:T=r.localize(2,null);break;case s.MarkerSeverity.Hint:T=r.localize(3,null);break}let _=r.localize(4,null,T,y.startLineNumber+":"+y.startColumn);const L=this._editor.getModel();return L&&y.startLineNumber<=L.getLineCount()&&y.startLineNumber>=1&&(_=`${L.getLineContent(y.startLineNumber)}, ${_}`),_}}let h=class da extends C.PeekViewWidget{constructor(y,T,_,L,M,O,N){super(y,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},M),this._themeService=T,this._openerService=_,this._menuService=L,this._contextKeyService=O,this._labelService=N,this._callOnDispose=new E.DisposableStore,this._onDidSelectRelatedInformation=new k.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=s.MarkerSeverity.Warning,this._backgroundColor=A.Color.white,this._applyTheme(T.getColorTheme()),this._callOnDispose.add(T.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(y){this._backgroundColor=y.getColor(e.editorMarkerNavigationBackground);let T=e.editorMarkerNavigationError,_=e.editorMarkerNavigationErrorHeader;this._severity===s.MarkerSeverity.Warning?(T=e.editorMarkerNavigationWarning,_=e.editorMarkerNavigationWarningHeader):this._severity===s.MarkerSeverity.Info&&(T=e.editorMarkerNavigationInfo,_=e.editorMarkerNavigationInfoHeader);const L=y.getColor(T),M=y.getColor(_);this.style({arrowColor:L,frameColor:L,headerBackgroundColor:M,primaryHeadingColor:y.getColor(C.peekViewTitleForeground),secondaryHeadingColor:y.getColor(C.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(y){super._fillHead(y),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(L=>this.editor.focus()));const T=[],_=this._menuService.createMenu(da.TitleMenu,this._contextKeyService);(0,u.createAndFillInActionBarActions)(_,void 0,T),this._actionbarWidget.push(T,{label:!1,icon:!0,index:0}),_.dispose()}_fillTitleIcon(y){this._icon=t.append(y,t.$(""))}_fillBody(y){this._parentContainer=y,y.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),y.appendChild(this._container),this._message=new g(this._container,this.editor,T=>this._onDidSelectRelatedInformation.fire(T),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(y,T,_){this._container.classList.remove("stale"),this._message.update(y),this._severity=y.severity,this._applyTheme(this._themeService.getColorTheme());const L=S.Range.lift(y),M=this.editor.getPosition(),O=M&&L.containsPosition(M)?M:L.getStartPosition();super.show(O,this.computeRequiredHeight());const N=this.editor.getModel();if(N){const P=_>1?r.localize(5,null,T,_):r.localize(6,null,T,_);this.setTitle((0,I.basename)(N.uri),P)}this._icon.className=`codicon ${n.SeverityIcon.className(s.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(O,0),this.editor.focus()}updateMarker(y){this._container.classList.remove("stale"),this._message.update(y)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(y,T){super._doLayoutBody(y,T),this._heightInPixel=y,this._message.layout(y,T),this._container.style.height=`${y}px`}_onWidth(y){this._message.layout(this._heightInPixel,y)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};h.TitleMenu=new i.MenuId("gotoErrorTitleMenu"),h=we([F(1,o.IThemeService),F(2,d.IOpenerService),F(3,i.IMenuService),F(4,c.IInstantiationService),F(5,f.IContextKeyService),F(6,l.ILabelService)],h),e.MarkerNavigationWidget=h;const v=(0,a.oneOf)(a.editorErrorForeground,a.editorErrorBorder),m=(0,a.oneOf)(a.editorWarningForeground,a.editorWarningBorder),w=(0,a.oneOf)(a.editorInfoForeground,a.editorInfoBorder);e.editorMarkerNavigationError=(0,a.registerColor)("editorMarkerNavigationError.background",{dark:v,light:v,hcDark:a.contrastBorder,hcLight:a.contrastBorder},r.localize(7,null)),e.editorMarkerNavigationErrorHeader=(0,a.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,a.transparent)(e.editorMarkerNavigationError,.1),light:(0,a.transparent)(e.editorMarkerNavigationError,.1),hcDark:null,hcLight:null},r.localize(8,null)),e.editorMarkerNavigationWarning=(0,a.registerColor)("editorMarkerNavigationWarning.background",{dark:m,light:m,hcDark:a.contrastBorder,hcLight:a.contrastBorder},r.localize(9,null)),e.editorMarkerNavigationWarningHeader=(0,a.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,a.transparent)(e.editorMarkerNavigationWarning,.1),light:(0,a.transparent)(e.editorMarkerNavigationWarning,.1),hcDark:"#0C141F",hcLight:(0,a.transparent)(e.editorMarkerNavigationWarning,.2)},r.localize(10,null)),e.editorMarkerNavigationInfo=(0,a.registerColor)("editorMarkerNavigationInfo.background",{dark:w,light:w,hcDark:a.contrastBorder,hcLight:a.contrastBorder},r.localize(11,null)),e.editorMarkerNavigationInfoHeader=(0,a.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,a.transparent)(e.editorMarkerNavigationInfo,.1),light:(0,a.transparent)(e.editorMarkerNavigationInfo,.1),hcDark:null,hcLight:null},r.localize(12,null)),e.editorMarkerNavigationBackground=(0,a.registerColor)("editorMarkerNavigation.background",{dark:a.editorBackground,light:a.editorBackground,hcDark:a.editorBackground,hcLight:a.editorBackground},r.localize(13,null))}),define(ae[619],le([1,0,29,2,40,75,50,20,59,799,1353,15,7,5,63,2235]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let c=class ar{static get(v){return v.getContribution(ar.ID)}constructor(v,m,w,D,y){this._markerNavigationService=m,this._contextKeyService=w,this._editorService=D,this._instantiationService=y,this._sessionDispoables=new p.DisposableStore,this._editor=v,this._widgetVisible=o.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(v){if(this._model&&this._model.matches(v))return this._model;let m=!1;return this._model&&(m=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(v),m&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(f.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(w=>{(!this._model?.selected||!E.Range.containsPosition(this._model?.selected.marker,w.position))&&this._model?.resetIndex()})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const w=this._model.find(this._editor.getModel().uri,this._widget.position);w?this._widget.updateMarker(w.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(w=>{this._editorService.openCodeEditor({resource:w.resource,options:{pinned:!0,revealIfOpened:!0,selection:E.Range.lift(w).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(v=!0){this._cleanUp(),v&&this._editor.focus()}showAtMarker(v){if(this._editor.hasModel()){const m=this._getOrCreateModel(this._editor.getModel().uri);m.resetIndex(),m.move(!0,this._editor.getModel(),new k.Position(v.startLineNumber,v.startColumn)),m.selected&&this._widget.showAtMarker(m.selected.marker,m.selected.index,m.selected.total)}}async nagivate(v,m){if(this._editor.hasModel()){const w=this._getOrCreateModel(m?void 0:this._editor.getModel().uri);if(w.move(v,this._editor.getModel(),this._editor.getPosition()),!w.selected)return;if(w.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const D=await this._editorService.openCodeEditor({resource:w.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:w.selected.marker}},this._editor);D&&(ar.get(D)?.close(),ar.get(D)?.nagivate(v,m))}else this._widget.showAtMarker(w.selected.marker,w.selected.index,w.selected.total)}}};c.ID="editor.contrib.markerController",c=we([F(1,b.IMarkerNavigationService),F(2,r.IContextKeyService),F(3,A.ICodeEditorService),F(4,u.IInstantiationService)],c),e.MarkerController=c;class l extends R.EditorAction{constructor(v,m,w){super(w),this._next=v,this._multiFile=m}async run(v,m){m.hasModel()&&c.get(m)?.nagivate(this._next,this._multiFile)}}class s extends l{constructor(){super(!0,!1,{id:s.ID,label:s.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:f.MarkerNavigationWidget.TitleMenu,title:s.LABEL,icon:(0,i.registerIcon)("marker-navigation-next",t.Codicon.arrowDown,S.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=s,s.ID="editor.action.marker.next",s.LABEL=S.localize(0,null);class d extends l{constructor(){super(!1,!1,{id:d.ID,label:d.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:f.MarkerNavigationWidget.TitleMenu,title:d.LABEL,icon:(0,i.registerIcon)("marker-navigation-previous",t.Codicon.arrowUp,S.localize(3,null)),group:"navigation",order:2}})}}d.ID="editor.action.marker.prev",d.LABEL=S.localize(2,null);class n extends l{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:S.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:S.localize(5,null),group:"6_problem_nav",order:1}})}}class a extends l{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:S.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:I.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:C.MenuId.MenubarGoMenu,title:S.localize(7,null),group:"6_problem_nav",order:2}})}}(0,R.registerEditorContribution)(c.ID,c),(0,R.registerEditorAction)(s),(0,R.registerEditorAction)(d),(0,R.registerEditorAction)(n),(0,R.registerEditorAction)(a);const o=new r.RawContextKey("markersNavigationVisible",!1),g=R.EditorCommand.bindToContribution(c.get);(0,R.registerEditorCommand)(new g({id:"closeMarkersNavigation",precondition:o,handler:h=>h.close(),kbOpts:{weight:100+50,kbExpr:I.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(ae[2236],le([1,0,10,221,65,6,2,22,18,226,20,94,122,125,42,62,2165,174,1359,5,38,49,76,12,156,425,1086]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class m{constructor(_,L){this._editor=_,this._model=L,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 _=this._editor.getModel();if(!!_){for(const L of this._model.references)if(L.uri.toString()===_.uri.toString()){this._addDecorations(L.parent);return}}}_addDecorations(_){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const L=[],M=[];for(let O=0,N=_.children.length;O<N;O++){const P=_.children[O];this._decorationIgnoreSet.has(P.id)||P.uri.toString()===this._editor.getModel().uri.toString()&&(L.push({range:P.range,options:m.DecorationOptions}),M.push(O))}this._editor.changeDecorations(O=>{const N=O.deltaDecorations([],L);for(let P=0;P<N.length;P++)this._decorations.set(N[P],_.children[M[P]])})}_onDecorationChanged(){const _=[],L=this._editor.getModel();if(!!L){for(const[M,O]of this._decorations){const N=L.getDecorationRange(M);if(!N)continue;let P=!1;if(!S.Range.equalsRange(N,O.range)){if(S.Range.spansMultipleLines(N))P=!0;else{const B=O.range.endColumn-O.range.startColumn,V=N.endColumn-N.startColumn;B!==V&&(P=!0)}P?(this._decorationIgnoreSet.add(O.id),_.push(M)):O.range=N}}for(let M=0,O=_.length;M<O;M++)this._decorations.delete(_[M]);this._editor.removeDecorations(_)}}removeDecorations(){this._editor.removeDecorations([...this._decorations.keys()]),this._decorations.clear()}}m.DecorationOptions=C.ModelDecorationOptions.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class w{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(_){let L,M;try{const O=JSON.parse(_);L=O.ratio,M=O.heightInLines}catch{}return{ratio:L||.7,heightInLines:M||18}}}e.LayoutData=w;class D extends o.WorkbenchAsyncDataTree{}let y=class extends l.PeekViewWidget{constructor(_,L,M,O,N,P,B,V,z,x,H,W){super(_,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},P),this._defaultTreeKeyboardSupport=L,this.layoutData=M,this._textModelResolverService=N,this._instantiationService=P,this._peekViewService=B,this._uriLabel=V,this._undoRedoService=z,this._keybindingService=x,this._languageService=H,this._languageConfigurationService=W,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(O.getColorTheme()),this._callOnDispose.add(O.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(_,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(_){const L=_.getColor(l.peekViewBorder)||R.Color.transparent;this.style({arrowColor:L,frameColor:L,headerBackgroundColor:_.getColor(l.peekViewTitleBackground)||R.Color.transparent,primaryHeadingColor:_.getColor(l.peekViewTitleForeground),secondaryHeadingColor:_.getColor(l.peekViewTitleInfoForeground)})}show(_){super.show(_,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(_){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:_.ctrlKey||_.metaKey||_.altKey?"side":"open",source:"title"})}_fillBody(_){this.setCssClass("reference-zone-widget"),this._messageContainer=t.append(_,t.$("div.messages")),t.hide(this._messageContainer),this._splitView=new p.SplitView(_,{orientation:1}),this._previewContainer=t.append(_,t.$("div.preview.inline"));const L={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(b.EmbeddedCodeEditorWidget,this._previewContainer,L,this.editor),t.hide(this._previewContainer),this._previewNotAvailableMessage=new C.TextModel(s.localize(0,null),u.PLAINTEXT_LANGUAGE_ID,C.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),this._treeContainer=t.append(_,t.$("div.ref-tree.inline"));const M={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new c.AccessibilityProvider,keyboardNavigationLabelProvider:this._instantiationService.createInstance(c.StringRepresentationProvider),identityProvider:new c.IdentityProvider,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:l.peekViewResultsBackground}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(t.addStandardDisposableListener(this._treeContainer,"keydown",N=>{N.equals(9)&&(this._keybindingService.dispatchEvent(N,N.target),N.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(D,"ReferencesWidget",this._treeContainer,new c.Delegate,[this._instantiationService.createInstance(c.FileReferencesRenderer),this._instantiationService.createInstance(c.OneReferenceRenderer)],this._instantiationService.createInstance(c.DataSource),M),this._splitView.addView({onDidChange:A.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:N=>{this._preview.layout({height:this._dim.height,width:N})}},p.Sizing.Distribute),this._splitView.addView({onDidChange:A.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:N=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${N}px`,this._tree.layout(this._dim.height,N)}},p.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const O=(N,P)=>{N instanceof v.OneReference&&(P==="show"&&this._revealReference(N,!1),this._onDidSelectReference.fire({element:N,kind:P,source:"tree"}))};this._tree.onDidOpen(N=>{N.sideBySide?O(N.element,"side"):N.editorOptions.pinned?O(N.element,"goto"):O(N.element,"show")}),t.hide(this._treeContainer)}_onWidth(_){this._dim&&this._doLayoutBody(this._dim.height,_)}_doLayoutBody(_,L){super._doLayoutBody(_,L),this._dim=new t.Dimension(L,_),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(L),this._splitView.resizeView(0,L*this.layoutData.ratio)}setSelection(_){return this._revealReference(_,!0).then(()=>{!this._model||(this._tree.setSelection([_]),this._tree.setFocus([_]))})}setModel(_){return this._disposeOnNewModel.clear(),this._model=_,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=s.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(_=>this._tree.rerender(_))),this._disposeOnNewModel.add(this._preview.onMouseDown(_=>{const{event:L,target:M}=_;if(L.detail!==2)return;const O=this._getFocusedReference();!O||this._onDidSelectReference.fire({element:{uri:O.uri,range:M.range},kind:L.ctrlKey||L.metaKey||L.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[_]=this._tree.getFocus();if(_ instanceof v.OneReference)return _;if(_ instanceof v.FileReferences&&_.children.length>0)return _.children[0]}async revealReference(_){await this._revealReference(_,!1),this._onDidSelectReference.fire({element:_,kind:"goto",source:"tree"})}async _revealReference(_,L){if(this._revealedReference===_)return;this._revealedReference=_,_.uri.scheme!==E.Schemas.inMemory?this.setTitle((0,I.basenameOrAuthority)(_.uri),this._uriLabel.getUriLabel((0,I.dirname)(_.uri))):this.setTitle(s.localize(2,null));const M=this._textModelResolverService.createModelReference(_.uri);this._tree.getInput()===_.parent?this._tree.reveal(_):(L&&this._tree.reveal(_.parent),await this._tree.expand(_.parent),this._tree.reveal(_));const O=await M;if(!this._model){O.dispose();return}(0,k.dispose)(this._previewModelReference);const N=O.object;if(N){const P=this._preview.getModel()===N.textEditorModel?0:1,B=S.Range.lift(_.range).collapseToStart();this._previewModelReference=O,this._preview.setModel(N.textEditorModel),this._preview.setSelection(B),this._preview.revealRangeInCenter(B,P)}else this._preview.setModel(this._previewNotAvailableMessage),O.dispose()}};y=we([F(3,g.IThemeService),F(4,f.ITextModelService),F(5,d.IInstantiationService),F(6,l.IPeekViewService),F(7,a.ILabelService),F(8,h.IUndoRedoService),F(9,n.IKeybindingService),F(10,i.ILanguageService),F(11,r.ILanguageConfigurationService)],y),e.ReferenceWidget=y}),define(ae[620],le([1,0,11,21,99,2,75,50,20,174,1357,31,8,7,5,98,76,26,23,425,2236]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new u.RawContextKey("referenceSearchVisible",!1,S.localize(0,null));let a=class ms{static get(h){return h.getContribution(ms.ID)}constructor(h,v,m,w,D,y,T,_){this._defaultTreeKeyboardSupport=h,this._editor=v,this._editorService=w,this._notificationService=D,this._instantiationService=y,this._storageService=T,this._configurationService=_,this._disposables=new A.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(m)}dispose(){this._referenceSearchVisible.reset(),this._disposables.dispose(),this._widget?.dispose(),this._model?.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(h,v,m){let w;if(this._widget&&(w=this._widget.position),this.closeWidget(),!!w&&h.containsPosition(w))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 D="peekViewLayout",y=n.LayoutData.fromJSON(this._storageService.get(D,0,"{}"));this._widget=this._instantiationService.createInstance(n.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,y),this._widget.setTitle(S.localize(1,null)),this._widget.show(h),this._disposables.add(this._widget.onDidClose(()=>{v.cancel(),this._widget&&(this._storageService.store(D,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(_=>{const{element:L,kind:M}=_;if(!!L)switch(M){case"open":(_.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(L,!1,!1);break;case"side":this.openReference(L,!0,!1);break;case"goto":m?this._gotoReference(L):this.openReference(L,!1,!0);break}}));const T=++this._requestIdPool;v.then(_=>{if(T!==this._requestIdPool||!this._widget){_.dispose();return}return this._model?.dispose(),this._model=_,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(S.localize(2,null,this._model.title,this._model.references.length));const L=this._editor.getModel().uri,M=new E.Position(h.startLineNumber,h.startColumn),O=this._model.nearestReference(L,M);if(O)return this._widget.setSelection(O).then(()=>{this._widget&&this._editor.getOption(78)==="editor"&&this._widget.focusOnPreviewEditor()})}})},_=>{this._notificationService.error(_)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}async goToNextOrPreviousReference(h){if(!this._editor.hasModel()||!this._model||!this._widget)return;const v=this._widget.position;if(!v)return;const m=this._model.nearestReference(this._editor.getModel().uri,v);if(!m)return;const w=this._model.nextOrPreviousReference(m,h),D=this._editor.hasTextFocus(),y=this._widget.isPreviewEditorFocused();await this._widget.setSelection(w),await this._gotoReference(w),D?this._editor.focus():this._widget&&y&&this._widget.focusOnPreviewEditor()}async revealReference(h){!this._editor.hasModel()||!this._model||!this._widget||await this._widget.revealReference(h)}closeWidget(h=!0){this._widget?.dispose(),this._model?.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,h&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(h){this._widget?.hide(),this._ignoreModelChangeEvent=!0;const v=I.Range.lift(h.range).collapseToStart();return this._editorService.openCodeEditor({resource:h.uri,options:{selection:v,selectionSource:"code.jump"}},this._editor).then(m=>{if(this._ignoreModelChangeEvent=!1,!m||!this._widget){this.closeWidget();return}if(this._editor===m)this._widget.show(v),this._widget.focusOnReferenceTree();else{const w=ms.get(m),D=this._model.clone();this.closeWidget(),m.focus(),w?.toggleWidget(v,(0,t.createCancelablePromise)(y=>Promise.resolve(D)),this._peekMode??!1)}},m=>{this._ignoreModelChangeEvent=!1,(0,p.onUnexpectedError)(m)})}openReference(h,v,m){v||this.closeWidget();const{uri:w,range:D}=h;this._editorService.openCodeEditor({resource:w,options:{selection:D,selectionSource:"code.jump",pinned:m}},this._editor,v)}};a.ID="editor.contrib.referencesController",a=we([F(2,u.IContextKeyService),F(3,k.ICodeEditorService),F(4,l.INotificationService),F(5,i.IInstantiationService),F(6,s.IStorageService),F(7,r.IConfigurationService)],a),e.ReferencesController=a;function o(g,h){const v=(0,b.getOuterEditor)(g);if(!v)return;const m=a.get(v);m&&h(m)}f.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,R.KeyChord)(2089,60),when:u.ContextKeyExpr.or(e.ctxReferenceSearchVisible,b.PeekContext.inPeekEditor),handler(g){o(g,h=>{h.changeFocusBetweenPreviewAndReferences()})}}),f.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:u.ContextKeyExpr.or(e.ctxReferenceSearchVisible,b.PeekContext.inPeekEditor),handler(g){o(g,h=>{h.goToNextOrPreviousReference(!0)})}}),f.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:u.ContextKeyExpr.or(e.ctxReferenceSearchVisible,b.PeekContext.inPeekEditor),handler(g){o(g,h=>{h.goToNextOrPreviousReference(!1)})}}),C.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),C.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),C.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),C.CommandsRegistry.registerCommand("closeReferenceSearch",g=>o(g,h=>h.closeWidget())),f.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:u.ContextKeyExpr.and(b.PeekContext.inPeekEditor,u.ContextKeyExpr.not("config.editor.stablePeek"))}),f.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:u.ContextKeyExpr.and(e.ctxReferenceSearchVisible,u.ContextKeyExpr.not("config.editor.stablePeek"))}),f.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:u.ContextKeyExpr.and(e.ctxReferenceSearchVisible,c.WorkbenchListFocusContextKey,c.WorkbenchTreeElementCanCollapse.negate(),c.WorkbenchTreeElementCanExpand.negate()),handler(g){const v=g.get(c.IListService).lastFocusedList?.getFocus();Array.isArray(v)&&v[0]instanceof d.OneReference&&o(g,m=>m.revealReference(v[0]))}}),f.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:u.ContextKeyExpr.and(e.ctxReferenceSearchVisible,c.WorkbenchListFocusContextKey,c.WorkbenchTreeElementCanCollapse.negate(),c.WorkbenchTreeElementCanExpand.negate()),handler(g){const v=g.get(c.IListService).lastFocusedList?.getFocus();Array.isArray(v)&&v[0]instanceof d.OneReference&&o(g,m=>m.openReference(v[0],!0,!0))}}),C.CommandsRegistry.registerCommand("openReference",g=>{const v=g.get(c.IListService).lastFocusedList?.getFocus();Array.isArray(v)&&v[0]instanceof d.OneReference&&o(g,m=>m.openReference(v[0],!1,!0))})}),define(ae[621],le([1,0,86,110,11,99,14,13,9,266,105,40,75,226,50,20,59,92,620,425,2184,334,174,1355,15,31,7,5,26,66,613,61,88]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";var M,O,N,P,B,V,z,x;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,h.MenuRegistry.appendMenuItem(h.MenuId.EditorContext,{submenu:h.MenuId.EditorContextPeek,title:g.localize(0,null),group:"navigation",order:100});class H{static is(Y){return!Y||typeof Y!="object"?!1:!!(Y instanceof H||i.Position.isIPosition(Y.position)&&Y.model)}constructor(Y,ee){this.model=Y,this.position=ee}}e.SymbolNavigationAnchor=H;class W extends C.EditorAction2{static all(){return W._allSymbolNavigationCommands.values()}static _patchConfig(Y){const ee={...Y,f1:!0};if(ee.menu)for(const ie of L.Iterable.wrap(ee.menu))(ie.id===h.MenuId.EditorContext||ie.id===h.MenuId.EditorContextPeek)&&(ie.when=m.ContextKeyExpr.and(Y.precondition,ie.when));return ee}constructor(Y,ee){super(W._patchConfig(ee)),this.configuration=Y,W._allSymbolNavigationCommands.set(ee.id,this)}runEditorCommand(Y,ee,ie,re){if(!ee.hasModel())return Promise.resolve(void 0);const oe=Y.get(D.INotificationService),se=Y.get(r.ICodeEditorService),te=Y.get(y.IEditorProgressService),Z=Y.get(n.ISymbolNavigationService),ne=Y.get(_.ILanguageFeaturesService),ce=Y.get(w.IInstantiationService),de=ee.getModel(),he=ee.getPosition(),pe=H.is(ie)?ie:new H(de,he),me=new b.EditorStateCancellationTokenSource(ee,5),Se=(0,R.raceCancellation)(this._getLocationModel(ne,pe.model,pe.position,me.token),me.token).then(async Ie=>{if(!Ie||me.token.isCancellationRequested)return;(0,p.alert)(Ie.ariaMessage);let ve;if(Ie.referenceAt(de.uri,he)){const ge=this._getAlternativeCommand(ee);!W._activeAlternativeCommands.has(ge)&&W._allSymbolNavigationCommands.has(ge)&&(ve=W._allSymbolNavigationCommands.get(ge))}const be=Ie.references.length;if(be===0){if(!this.configuration.muteMessage){const ge=de.getWordAtPosition(he);a.MessageController.get(ee)?.showMessage(this._getNoResultFoundMessage(ge),he)}}else if(be===1&&ve)W._activeAlternativeCommands.add(this.desc.id),ce.invokeFunction(ge=>ve.runEditorCommand(ge,ee,ie,re).finally(()=>{W._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(se,Z,ee,Ie,re)},Ie=>{oe.error(Ie)}).finally(()=>{me.dispose()});return te.showWhile(Se,250),Se}async _onResult(Y,ee,ie,re,oe){const se=this._getGoToPreference(ie);if(!(ie instanceof u.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||se==="peek"&&re.references.length>1))this._openInPeek(ie,re,oe);else{const te=re.firstReference(),Z=re.references.length>1&&se==="gotoAndPeek",ne=await this._openReference(ie,Y,te,this.configuration.openToSide,!Z);Z&&ne?this._openInPeek(ne,re,oe):re.dispose(),se==="goto"&&ee.put(te)}}async _openReference(Y,ee,ie,re,oe){let se;if((0,l.isLocationLink)(ie)&&(se=ie.targetSelectionRange),se||(se=ie.range),!se)return;const te=await ee.openCodeEditor({resource:ie.uri,options:{selection:f.Range.collapseToStart(se),selectionRevealType:3,selectionSource:"code.jump"}},Y,re);if(!!te){if(oe){const Z=te.getModel(),ne=te.createDecorationsCollection([{range:se,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{te.getModel()===Z&&ne.clear()},350)}return te}}_openInPeek(Y,ee,ie){const re=s.ReferencesController.get(Y);re&&Y.hasModel()?re.toggleWidget(ie??Y.getSelection(),(0,R.createCancelablePromise)(oe=>Promise.resolve(ee)),this.configuration.openInPeek):ee.dispose()}}e.SymbolNavigationAction=W,W._allSymbolNavigationCommands=new Map,W._activeAlternativeCommands=new Set;class U extends W{async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(await(0,T.getDefinitionsAtPosition)(Y.definitionProvider,ee,ie,re),g.localize(1,null))}_getNoResultFoundMessage(Y){return Y&&Y.word?g.localize(2,null,Y.word):g.localize(3,null)}_getAlternativeCommand(Y){return Y.getOption(52).alternativeDefinitionCommand}_getGoToPreference(Y){return Y.getOption(52).multipleDefinitions}}e.DefinitionAction=U;const $=k.isWeb&&!(0,t.isStandalone)()?2118:70;(0,h.registerAction2)((M=class vs extends U{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:vs.id,title:{value:g.localize(4,null),original:"Go to Definition",mnemonicTitle:g.localize(5,null)},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:$,weight:100},menu:[{id:h.MenuId.EditorContext,group:"navigation",order:1.1},{id:h.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:2}]}),v.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",vs.id)}},M.id="editor.action.revealDefinition",M)),(0,h.registerAction2)((O=class Ss extends U{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:Ss.id,title:{value:g.localize(6,null),original:"Open Definition to the Side"},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2089,$),weight:100}}),v.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",Ss.id)}},O.id="editor.action.revealDefinitionAside",O)),(0,h.registerAction2)((N=class bs extends U{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:bs.id,title:{value:g.localize(7,null),original:"Peek Definition"},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasDefinitionProvider,o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:h.MenuId.EditorContextPeek,group:"peek",order:2}}),v.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",bs.id)}},N.id="editor.action.peekDefinition",N));class q extends W{async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(await(0,T.getDeclarationsAtPosition)(Y.declarationProvider,ee,ie,re),g.localize(8,null))}_getNoResultFoundMessage(Y){return Y&&Y.word?g.localize(9,null,Y.word):g.localize(10,null)}_getAlternativeCommand(Y){return Y.getOption(52).alternativeDeclarationCommand}_getGoToPreference(Y){return Y.getOption(52).multipleDeclarations}}(0,h.registerAction2)((P=class ua extends q{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ua.id,title:{value:g.localize(11,null),original:"Go to Declaration",mnemonicTitle:g.localize(12,null)},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasDeclarationProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:[{id:h.MenuId.EditorContext,group:"navigation",order:1.3},{id:h.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(Y){return Y&&Y.word?g.localize(13,null,Y.word):g.localize(14,null)}},P.id="editor.action.revealDeclaration",P)),(0,h.registerAction2)(class extends q{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:g.localize(15,null),original:"Peek Declaration"},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasDeclarationProvider,o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:h.MenuId.EditorContextPeek,group:"peek",order:3}})}});class X extends W{async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(await(0,T.getTypeDefinitionsAtPosition)(Y.typeDefinitionProvider,ee,ie,re),g.localize(16,null))}_getNoResultFoundMessage(Y){return Y&&Y.word?g.localize(17,null,Y.word):g.localize(18,null)}_getAlternativeCommand(Y){return Y.getOption(52).alternativeTypeDefinitionCommand}_getGoToPreference(Y){return Y.getOption(52).multipleTypeDefinitions}}(0,h.registerAction2)((B=class ha extends X{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:ha.ID,title:{value:g.localize(19,null),original:"Go to Type Definition",mnemonicTitle:g.localize(20,null)},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasTypeDefinitionProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:0,weight:100},menu:[{id:h.MenuId.EditorContext,group:"navigation",order:1.4},{id:h.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:3}]})}},B.ID="editor.action.goToTypeDefinition",B)),(0,h.registerAction2)((V=class ga extends X{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:ga.ID,title:{value:g.localize(21,null),original:"Peek Type Definition"},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasTypeDefinitionProvider,o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:h.MenuId.EditorContextPeek,group:"peek",order:4}})}},V.ID="editor.action.peekTypeDefinition",V));class G extends W{async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(await(0,T.getImplementationsAtPosition)(Y.implementationProvider,ee,ie,re),g.localize(22,null))}_getNoResultFoundMessage(Y){return Y&&Y.word?g.localize(23,null,Y.word):g.localize(24,null)}_getAlternativeCommand(Y){return Y.getOption(52).alternativeImplementationCommand}_getGoToPreference(Y){return Y.getOption(52).multipleImplementations}}(0,h.registerAction2)((z=class fa extends G{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:fa.ID,title:{value:g.localize(25,null),original:"Go to Implementations",mnemonicTitle:g.localize(26,null)},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasImplementationProvider,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menu:[{id:h.MenuId.EditorContext,group:"navigation",order:1.45},{id:h.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:4}]})}},z.ID="editor.action.goToImplementation",z)),(0,h.registerAction2)((x=class pa extends G{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:pa.ID,title:{value:g.localize(27,null),original:"Peek Implementations"},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasImplementationProvider,o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:h.MenuId.EditorContextPeek,group:"peek",order:5}})}},x.ID="editor.action.peekImplementation",x));class Q extends W{_getNoResultFoundMessage(Y){return Y?g.localize(28,null,Y.word):g.localize(29,null)}_getAlternativeCommand(Y){return Y.getOption(52).alternativeReferenceCommand}_getGoToPreference(Y){return Y.getOption(52).multipleReferences}}(0,h.registerAction2)(class extends Q{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:g.localize(30,null),original:"Go to References",mnemonicTitle:g.localize(31,null)},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasReferenceProvider,o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:c.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:h.MenuId.EditorContext,group:"navigation",order:1.45},{id:h.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:5}]})}async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(await(0,T.getReferencesAtPosition)(Y.referenceProvider,ee,ie,!0,re),g.localize(32,null))}}),(0,h.registerAction2)(class extends Q{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:g.localize(33,null),original:"Peek References"},precondition:m.ContextKeyExpr.and(c.EditorContextKeys.hasReferenceProvider,o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:h.MenuId.EditorContextPeek,group:"peek",order:6}})}async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(await(0,T.getReferencesAtPosition)(Y.referenceProvider,ee,ie,!1,re),g.localize(34,null))}});class j extends W{constructor(Y,ee,ie){super(Y,{id:"editor.action.goToLocation",title:{value:g.localize(35,null),original:"Go to Any Symbol"},precondition:m.ContextKeyExpr.and(o.PeekContext.notInPeekEditor,c.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=ee,this._gotoMultipleBehaviour=ie}async _getLocationModel(Y,ee,ie,re){return new d.ReferencesModel(this._references,g.localize(36,null))}_getNoResultFoundMessage(Y){return Y&&g.localize(37,null,Y.word)||""}_getGoToPreference(Y){return this._gotoMultipleBehaviour??Y.getOption(52).multipleReferences}_getAlternativeCommand(){return""}}v.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(K,Y,ee,ie,re,oe,se)=>{(0,E.assertType)(I.URI.isUri(Y)),(0,E.assertType)(i.Position.isIPosition(ee)),(0,E.assertType)(Array.isArray(ie)),(0,E.assertType)(typeof re>"u"||typeof re=="string"),(0,E.assertType)(typeof se>"u"||typeof se=="boolean");const te=K.get(r.ICodeEditorService),Z=await te.openCodeEditor({resource:Y},te.getFocusedCodeEditor());if((0,S.isCodeEditor)(Z))return Z.setPosition(ee),Z.revealPositionInCenterIfOutsideViewport(ee,0),Z.invokeWithinContext(ne=>{const ce=new class extends j{_getNoResultFoundMessage(de){return oe||super._getNoResultFoundMessage(de)}}({muteMessage:!Boolean(oe),openInPeek:Boolean(se),openToSide:!1},ie,re);ne.get(w.IInstantiationService).invokeFunction(ce.run.bind(ce),Z)})}}),v.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(K,Y,ee,ie,re)=>{K.get(v.ICommandService).executeCommand("editor.action.goToLocations",Y,ee,ie,re,void 0,!0)}}),v.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(K,Y,ee)=>{(0,E.assertType)(I.URI.isUri(Y)),(0,E.assertType)(i.Position.isIPosition(ee));const ie=K.get(_.ILanguageFeaturesService),re=K.get(r.ICodeEditorService);return re.openCodeEditor({resource:Y},re.getFocusedCodeEditor()).then(oe=>{if(!(0,S.isCodeEditor)(oe)||!oe.hasModel())return;const se=s.ReferencesController.get(oe);if(!se)return;const te=(0,R.createCancelablePromise)(ne=>(0,T.getReferencesAtPosition)(ie.referenceProvider,oe.getModel(),i.Position.lift(ee),!1,ne).then(ce=>new d.ReferencesModel(ce,g.localize(38,null)))),Z=new f.Range(ee.lineNumber,ee.column,ee.lineNumber,ee.column);return Promise.resolve(se.toggleWidget(Z,te,!1))})}}),v.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(ae[837],le([1,0,11,21,113,2,13,266,40,20,42,62,495,174,1356,7,33,12,621,613,61,1085]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let a=class lr{constructor(g,h,v,m){this.textModelResolverService=h,this.languageService=v,this.languageFeaturesService=m,this.toUnhook=new A.DisposableStore,this.toUnhookForKeyboard=new A.DisposableStore,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=g,this.linkDecorations=this.editor.createDecorationsCollection();const w=new r.ClickLinkGesture(g);this.toUnhook.add(w),this.toUnhook.add(w.onMouseMoveOrRelevantKeyDown(([D,y])=>{this.startFindDefinitionFromMouse(D,(0,k.withNullAsUndefined)(y))})),this.toUnhook.add(w.onExecute(D=>{this.isEnabled(D)&&this.gotoDefinition(D.target.position,D.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},y=>{this.removeLinkDecorations(),(0,p.onUnexpectedError)(y)})})),this.toUnhook.add(w.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(g){return g.getContribution(lr.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(h=>{h&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(g,h){if(g.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(g,h)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const v=g.target.position;this.startFindDefinition(v)}startFindDefinition(g){this.toUnhookForKeyboard.clear();const h=g?this.editor.getModel()?.getWordAtPosition(g):null;if(!h)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===h.startColumn&&this.currentWordAtPosition.endColumn===h.endColumn&&this.currentWordAtPosition.word===h.word)return Promise.resolve(0);this.currentWordAtPosition=h;const v=new E.EditorState(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,t.createCancelablePromise)(m=>this.findDefinition(g,m)),this.previousPromise.then(m=>{if(!m||!m.length||!v.validate(this.editor)){this.removeLinkDecorations();return}if(m.length>1)this.addDecoration(new b.Range(g.lineNumber,h.startColumn,g.lineNumber,h.endColumn),new R.MarkdownString().appendText(i.localize(0,null,m.length)));else{const w=m[0];if(!w.uri)return;this.textModelResolverService.createModelReference(w.uri).then(D=>{if(!D.object||!D.object.textEditorModel){D.dispose();return}const{object:{textEditorModel:y}}=D,{startLineNumber:T}=w.range;if(T<1||T>y.getLineCount()){D.dispose();return}const _=this.getPreviewValue(y,T,w);let L;w.originSelectionRange?L=b.Range.lift(w.originSelectionRange):L=new b.Range(g.lineNumber,h.startColumn,g.lineNumber,h.endColumn);const M=this.languageService.guessLanguageIdByFilepathOrFirstLine(y.uri);this.addDecoration(L,new R.MarkdownString().appendCodeblock(M||"",_)),D.dispose()})}}).then(void 0,p.onUnexpectedError)}getPreviewValue(g,h,v){let m=v.range;return m.endLineNumber-m.startLineNumber>=lr.MAX_SOURCE_PREVIEW_LINES&&(m=this.getPreviewRangeBasedOnIndentation(g,h)),this.stripIndentationFromPreviewRange(g,h,m)}stripIndentationFromPreviewRange(g,h,v){let w=g.getLineFirstNonWhitespaceColumn(h);for(let y=h+1;y<v.endLineNumber;y++){const T=g.getLineFirstNonWhitespaceColumn(y);w=Math.min(w,T)}return g.getValueInRange(v).replace(new RegExp(`^\\s{${w-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(g,h){const v=g.getLineFirstNonWhitespaceColumn(h),m=Math.min(g.getLineCount(),h+lr.MAX_SOURCE_PREVIEW_LINES);let w=h+1;for(;w<m;w++){const D=g.getLineFirstNonWhitespaceColumn(w);if(v===D)break}return new b.Range(h,1,w+1,1)}addDecoration(g,h){const v={range:g,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:h}};this.linkDecorations.set([v])}removeLinkDecorations(){this.linkDecorations.clear()}isEnabled(g,h){return this.editor.hasModel()&&g.isLeftClick&&g.isNoneOrSingleMouseDown&&g.target.type===6&&(g.hasTriggerModifier||(h?h.keyCodeIsTriggerKey:!1))&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(g,h){const v=this.editor.getModel();return v?(0,d.getDefinitionsAtPosition)(this.languageFeaturesService.definitionProvider,v,g,h):Promise.resolve(null)}gotoDefinition(g,h){return this.editor.setPosition(g),this.editor.invokeWithinContext(v=>{const m=!h&&this.editor.getOption(79)&&!this.isInPeekEditor(v);return new s.DefinitionAction({openToSide:h,openInPeek:m,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(v,this.editor)})}isInPeekEditor(g){const h=g.get(f.IContextKeyService);return u.PeekContext.inPeekEditor.getValue(h)}dispose(){this.toUnhook.dispose()}};a.ID="editor.contrib.gotodefinitionatposition",a.MAX_SOURCE_PREVIEW_LINES=8,a=we([F(1,C.ITextModelService),F(2,S.ILanguageService),F(3,n.ILanguageFeaturesService)],a),e.GotoDefinitionAtPositionEditorContribution=a,(0,I.registerEditorContribution)(a.ID,a),(0,l.registerThemingParticipant)((o,g)=>{const h=o.getColor(c.editorActiveLinkForeground);h&&g.addRule(`.monaco-editor .goto-definition-link { color: ${h} !important; }`)})}),define(ae[2237],le([1,0,10,16,11,21,2,18,20,497,309,820,236,619,1364,124,41,66,33,12,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const a=t.$;class o{constructor(m,w,D){this.owner=m,this.range=w,this.marker=D}isValidForHoverAnchor(m){return m.type===1&&this.range.startColumn<=m.range.startColumn&&this.range.endColumn>=m.range.endColumn}}e.MarkerHover=o;const g={type:1,filter:{include:r.CodeActionKind.QuickFix},triggerAction:r.CodeActionTriggerSource.QuickFixHover};let h=class{constructor(m,w,D,y){this._editor=m,this._markerDecorationsService=w,this._openerService=D,this._languageFeaturesService=y,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(m,w){if(!this._editor.hasModel()||m.type!==1)return[];const D=this._editor.getModel(),y=m.range.startLineNumber,T=D.getLineMaxColumn(y),_=[];for(const L of w){const M=L.range.startLineNumber===y?L.range.startColumn:1,O=L.range.endLineNumber===y?L.range.endColumn:T,N=this._markerDecorationsService.getMarker(D.uri,L);if(!N)continue;const P=new I.Range(m.range.startLineNumber,M,m.range.startLineNumber,O);_.push(new o(this,P,N))}return _}renderHoverParts(m,w){if(!w.length)return k.Disposable.None;const D=new k.DisposableStore;w.forEach(T=>m.fragment.appendChild(this.renderMarkerHover(T,D)));const y=w.length===1?w[0]:w.sort((T,_)=>f.MarkerSeverity.compare(T.marker.severity,_.marker.severity))[0];return this.renderMarkerStatusbar(m,y,D),D}renderMarkerHover(m,w){const D=a("div.hover-row"),y=t.append(D,a("div.marker.hover-contents")),{source:T,message:_,code:L,relatedInformation:M}=m.marker;this._editor.applyFontInfo(y);const O=t.append(y,a("span"));if(O.style.whiteSpace="pre-wrap",O.innerText=_,T||L)if(L&&typeof L!="string"){const N=a("span");if(T){const z=t.append(N,a("span"));z.innerText=T}const P=t.append(N,a("a.code-link"));P.setAttribute("href",L.target.toString()),w.add(t.addDisposableListener(P,"click",z=>{this._openerService.open(L.target,{allowCommands:!0}),z.preventDefault(),z.stopPropagation()}));const B=t.append(P,a("span"));B.innerText=L.value;const V=t.append(y,N);V.style.opacity="0.6",V.style.paddingLeft="6px"}else{const N=t.append(y,a("span"));N.style.opacity="0.6",N.style.paddingLeft="6px",N.innerText=T&&L?`${T}(${L})`:T||`(${L})`}if((0,p.isNonEmptyArray)(M))for(const{message:N,resource:P,startLineNumber:B,startColumn:V}of M){const z=t.append(y,a("div"));z.style.marginTop="8px";const x=t.append(z,a("a"));x.innerText=`${(0,E.basename)(P)}(${B}, ${V}): `,x.style.cursor="pointer",w.add(t.addDisposableListener(x,"click",W=>{W.stopPropagation(),W.preventDefault(),this._openerService&&this._openerService.open(P,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:B,startColumn:V}}}).catch(A.onUnexpectedError)}));const H=t.append(z,a("span"));H.innerText=N,this._editor.applyFontInfo(H)}return D}renderMarkerStatusbar(m,w,D){if((w.marker.severity===f.MarkerSeverity.Error||w.marker.severity===f.MarkerSeverity.Warning||w.marker.severity===f.MarkerSeverity.Info)&&m.statusBar.addAction({label:i.localize(0,null),commandId:u.NextMarkerAction.ID,run:()=>{m.hide(),u.MarkerController.get(this._editor)?.showAtMarker(w.marker),this._editor.focus()}}),!this._editor.getOption(82)){const y=m.statusBar.append(a("div"));this.recentMarkerCodeActionsInfo&&(f.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===f.IMarkerData.makeKey(w.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(y.textContent=i.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const T=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?k.Disposable.None:D.add((0,R.disposableTimeout)(()=>y.textContent=i.localize(2,null),200));y.textContent||(y.textContent=String.fromCharCode(160));const _=this.getCodeActions(w.marker);D.add((0,k.toDisposable)(()=>_.cancel())),_.then(L=>{if(T.dispose(),this.recentMarkerCodeActionsInfo={marker:w.marker,hasCodeActions:L.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){L.dispose(),y.textContent=i.localize(3,null);return}y.style.display="none";let M=!1;D.add((0,k.toDisposable)(()=>{M||L.dispose()})),m.statusBar.addAction({label:i.localize(4,null),commandId:C.QuickFixAction.Id,run:O=>{M=!0;const N=C.CodeActionController.get(this._editor),P=t.getDomNodePagePosition(O);m.hide(),N?.showCodeActions(g,L,{x:P.left+6,y:P.top+P.height+6,width:P.width,height:P.height})}})},A.onUnexpectedError)}}getCodeActions(m){return(0,R.createCancelablePromise)(w=>(0,S.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new I.Range(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn),g,l.Progress.None,w))}};h=we([F(1,b.IMarkerDecorationsService),F(2,c.IOpenerService),F(3,n.ILanguageFeaturesService)],h),e.MarkerHoverParticipant=h,(0,d.registerThemingParticipant)((v,m)=>{const w=v.getColor(s.textLinkForeground);w&&m.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${w}; }`);const D=v.getColor(s.textLinkActiveForeground);D&&m.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${D}; }`)})}),define(ae[439],le([1,0,99,2,40,20,59,42,837,2211,2117,1362,7,5,41,33,12,302,614,2237]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;let n=class ma{static get(h){return h.getContribution(ma.ID)}constructor(h,v,m,w,D){this._editor=h,this._instantiationService=v,this._openerService=m,this._languageService=w,this._toUnhook=new p.DisposableStore,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(y=>{y.hasChanged(54)&&(this._unhookEvents(),this._hookEvents())})}_hookEvents(){const h=()=>this._hideWidgets(),v=this._editor.getOption(54);this._isHoverEnabled=v.enabled,this._isHoverSticky=v.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(h)),this._toUnhook.add(this._editor.onDidScrollChange(m=>this._onEditorScrollChanged(m)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(h){(h.scrollTopChanged||h.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(h){this._isMouseDown=!0;const v=h.target;if(v.type===9&&v.detail===b.ContentHoverWidget.ID){this._hoverClicked=!0;return}v.type===12&&v.detail===S.MarginHoverWidget.ID||(v.type!==12&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(h){this._isMouseDown=!1}_onEditorMouseLeave(h){const v=h.event.browserEvent.relatedTarget;this._contentWidget?.containsNode(v)||this._hideWidgets()}_onEditorMouseMove(h){const v=h.target;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&v.type===9&&v.detail===b.ContentHoverWidget.ID||this._isHoverSticky&&!h.event.browserEvent.view?.getSelection()?.isCollapsed||!this._isHoverSticky&&v.type===9&&v.detail===b.ContentHoverWidget.ID&&this._contentWidget?.isColorPickerVisible()||this._isHoverSticky&&v.type===12&&v.detail===S.MarginHoverWidget.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}const m=this._getOrCreateContentWidget();if(!(this._isHoverSticky&&m.isVisibleFromKeyboard())){if(m.maybeShowAt(h)){this._glyphWidget?.hide();return}if(v.type===2&&v.position){this._contentWidget?.hide(),this._glyphWidget||(this._glyphWidget=new S.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(v.position.lineNumber);return}this._hideWidgets()}}_onKeyDown(h){h.keyCode!==5&&h.keyCode!==6&&h.keyCode!==57&&h.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(b.ContentHoverController,this._editor)),this._contentWidget}isColorPickerVisible(){return this._contentWidget?.isColorPickerVisible()||!1}showContentHover(h,v,m,w){this._getOrCreateContentWidget().startShowingAtRange(h,v,m,w)}dispose(){this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),this._glyphWidget?.dispose(),this._contentWidget?.dispose()}};n.ID="editor.contrib.hover",n=we([F(1,u.IInstantiationService),F(2,i.IOpenerService),F(3,E.ILanguageService),F(4,r.IContextKeyService)],n),e.ModesHoverController=n;class a extends R.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)(2089,2087),weight:100}})}run(h,v){if(!v.hasModel())return;const m=n.get(v);if(!m)return;const w=v.getPosition(),D=new A.Range(w.lineNumber,w.column,w.lineNumber,w.column),y=v.getOption(2)===2;m.showContentHover(D,1,1,y)}}class o extends R.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:C.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(h,v){const m=n.get(v);if(!m)return;const w=v.getPosition();if(!w)return;const D=new A.Range(w.lineNumber,w.column,w.lineNumber,w.column),y=I.GotoDefinitionAtPositionEditorContribution.get(v);if(!y)return;y.startFindDefinitionFromCursor(w).then(()=>{m.showContentHover(D,1,1,!0)})}}(0,R.registerEditorContribution)(n.ID,n),(0,R.registerEditorAction)(a),(0,R.registerEditorAction)(o),l.HoverParticipantRegistry.register(s.MarkdownHoverParticipant),l.HoverParticipantRegistry.register(d.MarkerHoverParticipant),(0,c.registerThemingParticipant)((g,h)=>{const v=g.getColor(f.editorHoverHighlight);v&&h.addRule(`.monaco-editor .hoverHighlight { background-color: ${v}; }`);const m=g.getColor(f.editorHoverBackground);m&&h.addRule(`.monaco-editor .monaco-hover { background-color: ${m}; }`);const w=g.getColor(f.editorHoverBorder);w&&(h.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${w}; }`),h.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${w.transparent(.5)}; }`),h.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${w.transparent(.5)}; }`),h.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${w.transparent(.5)}; }`));const D=g.getColor(f.textLinkForeground);D&&h.addRule(`.monaco-editor .monaco-hover a { color: ${D}; }`);const y=g.getColor(f.textLinkActiveForeground);y&&h.addRule(`.monaco-editor .monaco-hover a:hover { color: ${y}; }`);const T=g.getColor(f.editorHoverForeground);T&&h.addRule(`.monaco-editor .monaco-hover { color: ${T}; }`);const _=g.getColor(f.editorHoverStatusBarBackground);_&&h.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${_}; }`);const L=g.getColor(f.textCodeBlockBackground);L&&h.addRule(`.monaco-editor .monaco-hover code { background-color: ${L}; }`)})}),define(ae[2238],le([1,0,2,40,20,617,2208,439,302]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class b extends t.Disposable{constructor(C){super(),this._editor=C,this._register(C.onMouseDown(r=>this.onMouseDown(r)))}dispose(){super.dispose()}onMouseDown(C){const r=C.target;if(r.type!==6||!r.detail.injectedText||r.detail.injectedText.options.attachedData!==A.ColorDecorationInjectedTextMarker||!r.range)return;const u=this._editor.getContribution(E.ModesHoverController.ID);if(!!u&&!u.isColorPickerVisible()){const i=new R.Range(r.range.startLineNumber,r.range.startColumn+1,r.range.endLineNumber,r.range.endColumn+1);u.showContentHover(i,1,0,!1)}}}e.ColorContribution=b,b.ID="editor.contrib.colorContribution",b.RECOMPUTE_TIME=1e3,(0,p.registerEditorContribution)(b.ID,b),I.HoverParticipantRegistry.register(k.ColorHoverParticipant)}),define(ae[838],le([1,0,10,36,32,20,62,621,174,15,31,7,37,5,26]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;async function f(l,s,d,n){const a=l.get(k.ITextModelService),o=l.get(r.IContextMenuService),g=l.get(S.ICommandService),h=l.get(u.IInstantiationService),v=l.get(i.INotificationService);if(await n.item.resolve(R.CancellationToken.None),!n.part.location)return;const m=n.part.location,w=[],D=new Set(b.MenuRegistry.getMenuItems(b.MenuId.EditorContext).map(T=>(0,b.isIMenuItem)(T)?T.command.id:""));for(const T of E.SymbolNavigationAction.all())D.has(T.desc.id)&&w.push(new p.Action(T.desc.id,b.MenuItemAction.label(T.desc,{renderShortTitle:!0}),void 0,!0,async()=>{const _=await a.createModelReference(m.uri);try{await h.invokeFunction(T.run.bind(T),s,new E.SymbolNavigationAnchor(_.object.textEditorModel,A.Range.getStartPosition(m.range)))}finally{_.dispose()}}));if(n.part.command){const{command:T}=n.part;w.push(new p.Separator),w.push(new p.Action(T.id,T.title,void 0,!0,async()=>{try{await g.executeCommand(T.id,...T.arguments??[])}catch(_){v.notify({severity:i.Severity.Error,source:n.item.provider.displayName,message:_})}}))}const y=s.getOption(117);o.showContextMenu({domForShadowRoot:y?s.getDomNode()??void 0:void 0,getAnchor:()=>{const T=t.getDomNodePagePosition(d);return{x:T.left,y:T.top+T.height+8}},getActions:()=>w,onHide:()=>{s.focus()},autoSelectFirstItem:!0})}e.showGoToContextMenu=f;async function c(l,s,d,n){const o=await l.get(k.ITextModelService).createModelReference(n.uri);await d.invokeWithinContext(async g=>{const h=s.hasSideBySideModifier,v=g.get(C.IContextKeyService),m=I.PeekContext.inPeekEditor.getValue(v),w=!h&&d.getOption(79)&&!m;return new E.DefinitionAction({openToSide:h,openInPeek:w,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(g,d,{model:o.object.textEditorModel,position:A.Range.getStartPosition(n.range)},A.Range.lift(n.range))}),o.dispose()}e.goToDefinitionWithLocation=c}),define(ae[622],le([1,0,10,16,11,32,21,2,60,13,9,430,134,138,20,92,116,94,242,61,62,495,595,838,31,35,5,26,33,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class T{constructor(){this._entries=new I.LRUCache(50)}get(V){const z=T._key(V);return this._entries.get(z)}set(V,z){const x=T._key(V);this._entries.set(x,z)}static _key(V){return`${V.uri.toString()}/${V.getVersionId()}`}}const _=(0,m.createDecorator)("IInlayHintsCache");(0,v.registerSingleton)(_,T,1);class L{constructor(V,z){this.item=V,this.index=z}get part(){const V=this.item.hint.label;return typeof V=="string"?{label:V}:V[this.index]}}e.RenderedInlayHintLabelPart=L;class M{constructor(V,z){this.part=V,this.hasTriggerModifier=z}}var O;(function(B){B[B.Normal=0]="Normal",B[B.Invisible=1]="Invisible"})(O||(O={}));let N=class Cs{static get(V){return V.getContribution(Cs.ID)??void 0}constructor(V,z,x,H,W,U,$){this._editor=V,this._languageFeaturesService=z,this._inlayHintsCache=H,this._commandService=W,this._notificationService=U,this._instaService=$,this._disposables=new E.DisposableStore,this._sessionDisposables=new E.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new C.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=x.for(z.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(z.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(V.onDidChangeModel(()=>this._update())),this._disposables.add(V.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(V.onDidChangeConfiguration(q=>{q.hasChanged(129)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const V=this._editor.getOption(129);if(V.enabled==="off")return;const z=this._editor.getModel();if(!z||!this._languageFeaturesService.inlayHintsProvider.has(z))return;const x=this._inlayHintsCache.get(z);x&&this._updateHintsDecorators([z.getFullModelRange()],x),this._sessionDisposables.add((0,E.toDisposable)(()=>{z.isDisposed()||this._cacheHintsForFastRestore(z)}));let H;const W=new Set,U=new R.RunOnceScheduler(async()=>{const $=Date.now();H?.dispose(!0),H=new A.CancellationTokenSource;const q=z.onWillDispose(()=>H?.cancel());try{const X=H.token,G=await o.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,z,this._getHintsRanges(),X);if(U.delay=this._debounceInfo.update(z,Date.now()-$),X.isCancellationRequested){G.dispose();return}for(const Q of G.provider)typeof Q.onDidChangeInlayHints=="function"&&!W.has(Q)&&(W.add(Q),this._sessionDisposables.add(Q.onDidChangeInlayHints(()=>{U.isScheduled()||U.schedule()})));this._sessionDisposables.add(G),this._updateHintsDecorators(G.ranges,G.items),this._cacheHintsForFastRestore(z)}catch(X){(0,k.onUnexpectedError)(X)}finally{H.dispose(),q.dispose()}},this._debounceInfo.get(z));if(this._sessionDisposables.add(U),this._sessionDisposables.add((0,E.toDisposable)(()=>H?.dispose(!0))),U.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange($=>{($.scrollTopChanged||!U.isScheduled())&&U.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent($=>{const q=Math.max(U.delay,1250);U.schedule(q)})),V.enabled==="on")this._activeRenderMode=0;else{let $,q;V.enabled==="onUnlessPressed"?($=0,q=1):($=1,q=0),this._activeRenderMode=$,this._sessionDisposables.add(t.ModifierKeyEmitter.getInstance().event(X=>{if(!this._editor.hasModel())return;const G=X.altKey&&X.ctrlKey?q:$;if(G!==this._activeRenderMode){this._activeRenderMode=G;const Q=this._editor.getModel(),j=this._copyInlayHintsWithCurrentAnchor(Q);this._updateHintsDecorators([Q.getFullModelRange()],j),U.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>U.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const V=new E.DisposableStore,z=V.add(new a.ClickLinkGesture(this._editor)),x=new E.DisposableStore;return V.add(x),V.add(z.onMouseMoveOrRelevantKeyDown(H=>{const[W]=H,U=this._getInlayHintLabelPart(W),$=this._editor.getModel();if(!U||!$){x.clear();return}const q=new A.CancellationTokenSource;x.add((0,E.toDisposable)(()=>q.dispose(!0))),U.item.resolve(q.token),this._activeInlayHintPart=U.part.command||U.part.location?new M(U,W.hasTriggerModifier):void 0;const X=U.item.hint.position.lineNumber,G=new i.Range(X,1,X,$.getLineMaxColumn(X)),Q=this._getInlineHintsForRange(G);this._updateHintsDecorators([G],Q),x.add((0,E.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([G],Q)}))})),V.add(z.onCancel(()=>x.clear())),V.add(z.onExecute(async H=>{const W=this._getInlayHintLabelPart(H);if(W){const U=W.part;U.location?this._instaService.invokeFunction(g.goToDefinitionWithLocation,H,this._editor,U.location):f.Command.is(U.command)&&await this._invokeCommand(U.command,W.item)}})),V}_getInlineHintsForRange(V){const z=new Set;for(const x of this._decorationsMetadata.values())V.containsRange(x.item.anchor.range)&&z.add(x.item);return Array.from(z)}_installDblClickGesture(V){return this._editor.onMouseUp(async z=>{if(z.event.detail!==2)return;const x=this._getInlayHintLabelPart(z);if(!!x&&(z.event.preventDefault(),await x.item.resolve(A.CancellationToken.None),(0,p.isNonEmptyArray)(x.item.hint.textEdits))){const H=x.item.hint.textEdits.map(W=>u.EditOperation.replace(i.Range.lift(W.range),W.text));this._editor.executeEdits("inlayHint.default",H),V()}})}_installContextMenu(){return this._editor.onContextMenu(async V=>{if(!(V.event.target instanceof HTMLElement))return;const z=this._getInlayHintLabelPart(V);z&&await this._instaService.invokeFunction(g.showGoToContextMenu,this._editor,V.event.target,z)})}_getInlayHintLabelPart(V){if(V.target.type!==6)return;const z=V.target.detail.injectedText?.options;if(z instanceof l.ModelDecorationInjectedTextOptions&&z?.attachedData instanceof L)return z.attachedData}async _invokeCommand(V,z){try{await this._commandService.executeCommand(V.id,...V.arguments??[])}catch(x){this._notificationService.notify({severity:w.Severity.Error,source:z.provider.displayName,message:x})}}_cacheHintsForFastRestore(V){const z=this._copyInlayHintsWithCurrentAnchor(V);this._inlayHintsCache.set(V,z)}_copyInlayHintsWithCurrentAnchor(V){const z=new Map;for(const[x,H]of this._decorationsMetadata){if(z.has(H.item))continue;const W=V.getDecorationRange(x);if(W){const U=new o.InlayHintAnchor(W,H.item.anchor.direction),$=H.item.with({anchor:U});z.set(H.item,$)}}return Array.from(z.values())}_getHintsRanges(){const z=this._editor.getModel(),x=this._editor.getVisibleRangesPlusViewportAboveBelow(),H=[];for(const W of x.sort(i.Range.compareRangesUsingStarts)){const U=z.validateRange(new i.Range(W.startLineNumber-30,W.startColumn,W.endLineNumber+30,W.endColumn));H.length===0||!i.Range.areIntersectingOrTouching(H[H.length-1],U)?H.push(U):H[H.length-1]=i.Range.plusRange(H[H.length-1],U)}return H}_updateHintsDecorators(V,z){const x=[],H=(j,K,Y,ee,ie)=>{const re={content:Y,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:K.className,cursorStops:ee,attachedData:ie};x.push({item:j,classNameRef:K,decoration:{range:j.anchor.range,options:{description:"InlayHint",showIfCollapsed:j.anchor.range.isEmpty(),collapseOnReplaceEdit:!j.anchor.range.isEmpty(),stickiness:0,[j.anchor.direction]:this._activeRenderMode===0?re:void 0}}})},W=(j,K)=>{const Y=this._ruleFactory.createClassNameRef({width:`${U/3|0}px`,display:"inline-block"});H(j,Y,"\u200A",K?c.InjectedTextCursorStops.Right:c.InjectedTextCursorStops.None)},{fontSize:U,fontFamily:$,padding:q,isUniform:X}=this._getLayoutInfo(),G="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(G,$);for(const j of z){j.hint.paddingLeft&&W(j,!1);const K=typeof j.hint.label=="string"?[{label:j.hint.label}]:j.hint.label;for(let Y=0;Y<K.length;Y++){const ee=K[Y],ie=Y===0,re=Y===K.length-1,oe={fontSize:`${U}px`,fontFamily:`var(${G}), ${r.EDITOR_FONT_DEFAULTS.fontFamily}`,verticalAlign:X?"baseline":"middle"};(0,p.isNonEmptyArray)(j.hint.textEdits)&&(oe.cursor="default"),this._fillInColors(oe,j.hint),(ee.command||ee.location)&&this._activeInlayHintPart?.part.item===j&&this._activeInlayHintPart.part.index===Y&&(oe.textDecoration="underline",this._activeInlayHintPart.hasTriggerModifier&&(oe.color=(0,y.themeColorFromId)(D.editorActiveLinkForeground),oe.cursor="pointer")),q&&(ie&&re?(oe.padding=`1px ${Math.max(1,U/4)|0}px`,oe.borderRadius=`${U/4|0}px`):ie?(oe.padding=`1px 0 1px ${Math.max(1,U/4)|0}px`,oe.borderRadius=`${U/4|0}px 0 0 ${U/4|0}px`):re?(oe.padding=`1px ${Math.max(1,U/4)|0}px 1px 0`,oe.borderRadius=`0 ${U/4|0}px ${U/4|0}px 0`):oe.padding="1px 0 1px 0"),H(j,this._ruleFactory.createClassNameRef(oe),P(ee.label),re&&!j.hint.paddingRight?c.InjectedTextCursorStops.Right:c.InjectedTextCursorStops.None,new L(j,Y))}if(j.hint.paddingRight&&W(j,!0),x.length>Cs._MAX_DECORATORS)break}const Q=[];for(const j of V)for(const{id:K}of this._editor.getDecorationsInRange(j)??[]){const Y=this._decorationsMetadata.get(K);Y&&(Q.push(K),Y.classNameRef.dispose(),this._decorationsMetadata.delete(K))}this._editor.changeDecorations(j=>{const K=j.deltaDecorations(Q,x.map(Y=>Y.decoration));for(let Y=0;Y<K.length;Y++){const ee=x[Y];this._decorationsMetadata.set(K[Y],ee)}})}_fillInColors(V,z){z.kind===f.InlayHintKind.Parameter?(V.backgroundColor=(0,y.themeColorFromId)(D.editorInlayHintParameterBackground),V.color=(0,y.themeColorFromId)(D.editorInlayHintParameterForeground)):z.kind===f.InlayHintKind.Type?(V.backgroundColor=(0,y.themeColorFromId)(D.editorInlayHintTypeBackground),V.color=(0,y.themeColorFromId)(D.editorInlayHintTypeForeground)):(V.backgroundColor=(0,y.themeColorFromId)(D.editorInlayHintBackground),V.color=(0,y.themeColorFromId)(D.editorInlayHintForeground))}_getLayoutInfo(){const V=this._editor.getOption(129),z=V.padding,x=this._editor.getOption(47),H=this._editor.getOption(44);let W=V.fontSize;(!W||W<5||W>x)&&(W=x);const U=V.fontFamily||H;return{fontSize:W,fontFamily:U,padding:z,isUniform:!z&&U===H&&W===x}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const V of this._decorationsMetadata.values())V.classNameRef.dispose();this._decorationsMetadata.clear()}getInlayHintsForLine(V){if(!this._editor.hasModel())return[];const z=new Set,x=[];for(const H of this._editor.getLineDecorations(V)){const W=this._decorationsMetadata.get(H.id);W&&!z.has(W.item.hint)&&(z.add(W.item.hint),x.push(W.item))}return x}};N.ID="editor.contrib.InlayHints",N._MAX_DECORATORS=1500,N=we([F(1,d.ILanguageFeaturesService),F(2,s.ILanguageFeatureDebounceService),F(3,_),F(4,h.ICommandService),F(5,w.INotificationService),F(6,m.IInstantiationService)],N),e.InlayHintsController=N;function P(B){const V="\xA0";return B.replace(/[ \t]/g,V)}h.CommandsRegistry.registerCommand("_executeInlayHintProvider",async(B,...V)=>{const[z,x]=V;(0,b.assertType)(S.URI.isUri(z)),(0,b.assertType)(i.Range.isIRange(x));const{inlayHintsProvider:H}=B.get(d.ILanguageFeaturesService),W=await B.get(n.ITextModelService).createModelReference(z);try{const U=await o.InlayHintsFragments.create(H,W.object.textEditorModel,[i.Range.lift(x)],A.CancellationToken.None),$=U.items.map(q=>q.hint);return setTimeout(()=>U.dispose(),0),$}finally{W.dispose()}})}),define(ae[2239],le([1,0,11,113,50,94,302,42,62,817,614,622,8,41,61,1367,14,595,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class d extends k.HoverForeignElementAnchor{constructor(o,g,h,v){super(10,g,o.item.anchor.range,h,v),this.part=o}}let n=class extends S.MarkdownHoverParticipant{constructor(o,g,h,v,m,w){super(o,g,h,v,w),this._resolverService=m,this.hoverOrdinal=6}suggestHoverAnchor(o){if(!C.InlayHintsController.get(this._editor)||o.target.type!==6)return null;const h=o.target.detail.injectedText?.options;return h instanceof A.ModelDecorationInjectedTextOptions&&h.attachedData instanceof C.RenderedInlayHintLabelPart?new d(h.attachedData,this,o.event.posx,o.event.posy):null}computeSync(){return[]}computeAsync(o,g,h){return o instanceof d?new t.AsyncIterableObject(async v=>{const{part:m}=o;if(await m.item.resolve(h),h.isCancellationRequested)return;let w;typeof m.item.hint.tooltip=="string"?w=new p.MarkdownString().appendText(m.item.hint.tooltip):m.item.hint.tooltip&&(w=m.item.hint.tooltip),w&&v.emitOne(new S.MarkdownHover(this,o.range,[w],!1,0)),(0,s.isNonEmptyArray)(m.item.hint.textEdits)&&v.emitOne(new S.MarkdownHover(this,o.range,[new p.MarkdownString().appendText((0,f.localize)(0,null))],!1,10001));let D;if(typeof m.part.tooltip=="string"?D=new p.MarkdownString().appendText(m.part.tooltip):m.part.tooltip&&(D=m.part.tooltip),D&&v.emitOne(new S.MarkdownHover(this,o.range,[D],!1,1)),m.part.location||m.part.command){let T;const L=this._editor.getOption(71)==="altKey"?c.isMacintosh?(0,f.localize)(1,null):(0,f.localize)(2,null):c.isMacintosh?(0,f.localize)(3,null):(0,f.localize)(4,null);m.part.location&&m.part.command?T=new p.MarkdownString().appendText((0,f.localize)(5,null,L)):m.part.location?T=new p.MarkdownString().appendText((0,f.localize)(6,null,L)):m.part.command&&(T=new p.MarkdownString(`[${(0,f.localize)(7,null)}](${(0,l.asCommandLink)(m.part.command)} "${m.part.command.title}") (${L})`,{isTrusted:!0})),T&&v.emitOne(new S.MarkdownHover(this,o.range,[T],!1,1e4))}const y=await this._resolveInlayHintLabelPartHover(m,h);for await(const T of y)v.emitOne(T)}):t.AsyncIterableObject.EMPTY}async _resolveInlayHintLabelPartHover(o,g){if(!o.part.location)return t.AsyncIterableObject.EMPTY;const{uri:h,range:v}=o.part.location,m=await this._resolverService.createModelReference(h);try{const w=m.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(w)?(0,b.getHover)(this._languageFeaturesService.hoverProvider,w,new R.Position(v.startLineNumber,v.startColumn),g).filter(D=>!(0,p.isEmptyMarkdownString)(D.hover.contents)).map(D=>new S.MarkdownHover(this,o.item.anchor.range,D.hover.contents,!1,2+D.ordinal)):t.AsyncIterableObject.EMPTY}finally{m.dispose()}}};n=we([F(1,E.ILanguageService),F(2,u.IOpenerService),F(3,r.IConfigurationService),F(4,I.ITextModelService),F(5,i.ILanguageFeaturesService)],n),e.InlayHintsHover=n}),define(ae[2240],le([1,0,40,302,622,2239]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(R.InlayHintsController.ID,R.InlayHintsController),p.HoverParticipantRegistry.register(A.InlayHintsHover)}),define(ae[2241],le([1,0,2,10,280,424,421,50,495,613,61,838,5,32,20,139,1094]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class c{constructor(n,a){this.lineNumbers=n,this.lastLineRelativePosition=a}}e.StickyScrollWidgetState=c;const l=window.trustedTypes?.createPolicy("stickyScrollViewLayer",{createHTML:d=>d});let s=class extends t.Disposable{constructor(n,a,o){super(),this._editor=n,this._languageFeatureService=a,this._instaService=o,this._rootDomNode=document.createElement("div"),this._disposableStore=this._register(new t.DisposableStore),this._layoutInfo=this._editor.getLayoutInfo(),this._rootDomNode=document.createElement("div"),this._rootDomNode.className="sticky-widget",this._rootDomNode.style.width=`${this._layoutInfo.width-this._layoutInfo.minimap.minimapCanvasOuterWidth-this._layoutInfo.verticalScrollbarWidth}px`,this._lineNumbers=[],this._lastLineRelativePosition=0,this._hoverOnLine=-1,this._hoverOnColumn=-1,this._stickyRangeProjectedOnEditor=null,this._candidateDefinitionsLength=-1,this._lineHeight=this._editor.getOption(60),this._register(this._editor.onDidChangeConfiguration(g=>{g.hasChanged(60)&&(this._lineHeight=this._editor.getOption(60))})),this._register(this.updateLinkGesture())}updateLinkGesture(){const n=new t.DisposableStore,a=new t.DisposableStore;n.add(a);const o=new I.ClickLinkGesture(this._editor,!0);return n.add(o),n.add(o.onMouseMoveOrRelevantKeyDown(([g,h])=>{if(!this._editor.hasModel()||!g.hasTriggerModifier){a.clear();return}const v=g.target;if(v.detail===this.getId()&&v.element.innerText===v.element.innerHTML){const m=v.element.innerText;if(this._hoverOnColumn===-1)return;const w=this._hoverOnLine,D=this._hoverOnColumn,y=new i.Range(w,D,w,D+m.length);if(!y.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=y,a.clear();else if(v.element.style.textDecoration==="underline")return;const T=new u.CancellationTokenSource;a.add((0,t.toDisposable)(()=>T.dispose(!0)));let _;(0,b.getDefinitionsAtPosition)(this._languageFeatureService.definitionProvider,this._editor.getModel(),new E.Position(w,D+1),T.token).then(L=>{if(!T.token.isCancellationRequested)if(L.length!==0){this._candidateDefinitionsLength=L.length;const M=v.element;_!==M?(a.clear(),_=M,_.style.textDecoration="underline",a.add((0,t.toDisposable)(()=>{_.style.textDecoration="none"}))):_||(_=M,_.style.textDecoration="underline",a.add((0,t.toDisposable)(()=>{_.style.textDecoration="none"})))}else a.clear()})}else a.clear()})),n.add(o.onCancel(()=>{a.clear()})),n.add(o.onExecute(async g=>{g.target.detail===this.getId()&&(g.hasTriggerModifier?(this._candidateDefinitionsLength>1&&this._editor.revealPosition({lineNumber:this._hoverOnLine,column:1}),this._instaService.invokeFunction(C.goToDefinitionWithLocation,g,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor})):g.isRightClick||this._editor.revealPosition({lineNumber:this._hoverOnLine,column:1}))})),n}get lineNumbers(){return this._lineNumbers}get codeLineCount(){return this._lineNumbers.length}getCurrentLines(){return this._lineNumbers}setState(n){this._disposableStore.clear(),this._lineNumbers.length=0,p.clearNode(this._rootDomNode),this._lastLineRelativePosition=n.lastLineRelativePosition,this._lineNumbers=n.lineNumbers,this.renderRootNode()}getChildNode(n,a){const o=document.createElement("div"),g=this._editor._getViewModel(),h=g.coordinatesConverter.convertModelPositionToViewPosition(new E.Position(a,1)).lineNumber,v=g.getViewLineRenderingData(h),m=this._editor.getLayoutInfo(),w=m.width-m.minimap.minimapCanvasOuterWidth-m.verticalScrollbarWidth,D=this._editor.getOption(66).side,y=this._editor.getOption(60),T=this._editor.getOption(61);let _;try{_=k.LineDecoration.filter(v.inlineDecorations,h,v.minColumn,v.maxColumn)}catch{_=[]}const L=new A.RenderLineInput(!0,!0,v.content,v.continuesWithWrappedLine,v.isBasicASCII,v.containsRTL,0,v.tokens,_,v.tabSize,v.startVisibleColumn,1,1,1,500,"none",!0,!0,null),M=new R.StringBuilder(2e3);(0,A.renderViewLine)(L,M);let O;l?O=l.createHTML(M.build()):O=M.build();const N=document.createElement("span");N.className="sticky-line",N.classList.add(`stickyLine${a}`),N.style.lineHeight=`${y}px`,N.innerHTML=O;const P=document.createElement("span");P.className="sticky-line",P.style.lineHeight=`${y}px`,D==="left"?P.style.width=`${m.contentLeft-m.minimap.minimapCanvasOuterWidth}px`:D==="right"&&(P.style.width=`${m.contentLeft}px`);const B=document.createElement("span");return T.renderType===1||T.renderType===3&&a%10===0?B.innerText=a.toString():T.renderType===2&&(B.innerText=Math.abs(a-this._editor.getPosition().lineNumber).toString()),B.className="sticky-line-number",B.style.lineHeight=`${y}px`,B.style.width=`${m.lineNumbersWidth}px`,D==="left"?B.style.paddingLeft=`${m.lineNumbersLeft-m.minimap.minimapCanvasOuterWidth}px`:D==="right"&&(B.style.paddingLeft=`${m.lineNumbersLeft}px`),P.appendChild(B),this._editor.applyFontInfo(N),this._editor.applyFontInfo(B),o.appendChild(P),o.appendChild(N),o.className="sticky-line-root",o.style.lineHeight=`${y}px`,o.style.width=`${w}px`,o.style.height=`${y}px`,o.style.zIndex="0",n===this._lineNumbers.length-1&&(o.style.position="relative",o.style.zIndex="-1",o.style.top=this._lastLineRelativePosition+"px"),this._disposableStore.add(p.addDisposableListener(o,"mouseover",V=>{if(this._editor.hasModel()){const x=new f.StandardMouseEvent(V).target.innerText;this._hoverOnLine=a,this._hoverOnColumn=this._editor.getModel().getLineContent(a).indexOf(x)+1||-1}})),o}renderRootNode(){if(!this._editor._getViewModel())return;for(const[o,g]of this._lineNumbers.entries())this._rootDomNode.appendChild(this.getChildNode(o,g));const n=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;this._rootDomNode.style.height=n.toString()+"px";const a=this._editor.getOption(66).side;a==="left"?this._rootDomNode.style.marginLeft=this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth+"px":a==="right"&&(this._rootDomNode.style.marginLeft="1px"),this._rootDomNode.style.zIndex="11"}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}dispose(){super.dispose()}};s=we([F(1,S.ILanguageFeaturesService),F(2,r.IInstantiationService)],s),e.StickyScrollWidget=s}),define(ae[2242],le([1,0,2,61,2241,2214,5,10,37,15]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let S=class extends t.Disposable{constructor(r,u,i,f){super(),this._contextMenuService=f,this._sessionStore=new t.DisposableStore,this._editor=r,this._stickyScrollWidget=new R.StickyScrollWidget(this._editor,u,i),this._stickyLineCandidateProvider=new A.StickyLineCandidateProvider(this._editor,u),this._widgetState=new R.StickyScrollWidgetState([],0),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._register(this._editor.onDidChangeConfiguration(c=>{c.hasChanged(105)&&this.readConfiguration()})),this.readConfiguration(),this._register(E.addDisposableListener(this._stickyScrollWidget.getDomNode(),E.EventType.CONTEXT_MENU,async c=>{this.onContextMenu(c)}))}get stickyScrollCandidateProvider(){return this._stickyLineCandidateProvider}get stickyScrollWidgetState(){return this._widgetState}onContextMenu(r){this._contextMenuService.showContextMenu({menuId:b.MenuId.StickyScrollContext,getAnchor:()=>r})}readConfiguration(){if(this._editor.getOption(105).enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear();return}else this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(()=>this.renderStickyScroll())),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this.onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(i=>this.onTokensChange(i))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>this.renderStickyScroll())),this._editor.getOption(61).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>this.renderStickyScroll()))}needsUpdate(r){const u=this._stickyScrollWidget.getCurrentLines();for(const i of u)for(const f of r.ranges)if(i>=f.fromLineNumber&&i<=f.toLineNumber)return!0;return!1}onTokensChange(r){this.needsUpdate(r)&&this.renderStickyScroll()}onDidResize(){const r=this._editor.getLayoutInfo().width-this._editor.getLayoutInfo().minimap.minimapCanvasOuterWidth-this._editor.getLayoutInfo().verticalScrollbarWidth;this._stickyScrollWidget.getDomNode().style.width=`${r}px`}renderStickyScroll(){if(!this._editor.hasModel())return;const r=this._editor.getModel();this._stickyLineCandidateProvider.getVersionId()===r.getVersionId()&&(this._widgetState=this.getScrollWidgetState(),this._stickyScrollWidget.setState(this._widgetState))}getScrollWidgetState(){const r=this._editor.getOption(60),u=this._editor.getOption(105).maxLineCount,i=this._editor.getScrollTop();let f=0;const c=[],l=this._editor.getVisibleRanges();if(l.length!==0){const s=new A.StickyRange(l[0].startLineNumber,l[l.length-1].endLineNumber),d=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(s);for(const n of d){const a=n.startLineNumber,o=n.endLineNumber,g=n.nestingDepth;if(o-a>0){const h=(g-1)*r,v=g*r,m=this._editor.getBottomForLineNumber(a)-i,w=this._editor.getTopForLineNumber(o)-i,D=this._editor.getBottomForLineNumber(o)-i;if(h>w&&h<=D){c.push(a),f=D-v;break}else v>m&&v<=D&&c.push(a);if(c.length===u)break}}}return new R.StickyScrollWidgetState(c,f)}dispose(){super.dispose(),this._sessionStore.dispose()}};S.ID="store.contrib.stickyScrollController",S=we([F(1,p.ILanguageFeaturesService),F(2,k.IInstantiationService),F(3,I.IContextMenuService)],S),e.StickyScrollController=S}),define(ae[2243],le([1,0,40,2192,2242,15]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerEditorContribution)(R.StickyScrollController.ID,R.StickyScrollController),(0,A.registerAction2)(p.ToggleStickyScroll)}),define(ae[2244],le([1,0,10,79,2,224,1393,84,15,7,5]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class C extends E.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 r=class{constructor(i,f,c,l){this._menuService=c,this._contextKeyService=l,this._menuDisposables=new R.DisposableStore,this.element=t.append(i,t.$(".suggest-status-bar"));const s=d=>d instanceof I.MenuItemAction?f.createInstance(C,d,void 0):void 0;this._leftActions=new p.ActionBar(this.element,{actionViewItemProvider:s}),this._rightActions=new p.ActionBar(this.element,{actionViewItemProvider:s}),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),f=()=>{const c=[],l=[];for(const[s,d]of i.getActions())s==="left"?c.push(...d):l.push(...d);this._leftActions.clear(),this._leftActions.push(c),this._rightActions.clear(),this._rightActions.push(l)};this._menuDisposables.add(i.onDidChange(()=>f())),this._menuDisposables.add(i)}hide(){this._menuDisposables.clear()}};r=we([F(1,S.IInstantiationService),F(2,I.IMenuService),F(3,b.IContextKeyService)],r),e.SuggestWidgetStatus=r}),define(ae[2245],le([1,0,10,196,11,21,6,2,194,28,226,2244,1390,7,5,23,33,73,126,12,750,224,803,2200,480,1095,612]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"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,c.registerColor)("editorSuggestWidget.background",{dark:c.editorWidgetBackground,light:c.editorWidgetBackground,hcDark:c.editorWidgetBackground,hcLight:c.editorWidgetBackground},r.localize(0,null)),e.editorSuggestWidgetBorder=(0,c.registerColor)("editorSuggestWidget.border",{dark:c.editorWidgetBorder,light:c.editorWidgetBorder,hcDark:c.editorWidgetBorder,hcLight:c.editorWidgetBorder},r.localize(1,null)),e.editorSuggestWidgetForeground=(0,c.registerColor)("editorSuggestWidget.foreground",{dark:c.editorForeground,light:c.editorForeground,hcDark:c.editorForeground,hcLight:c.editorForeground},r.localize(2,null)),e.editorSuggestWidgetSelectedForeground=(0,c.registerColor)("editorSuggestWidget.selectedForeground",{dark:c.quickInputListFocusForeground,light:c.quickInputListFocusForeground,hcDark:c.quickInputListFocusForeground,hcLight:c.quickInputListFocusForeground},r.localize(3,null)),e.editorSuggestWidgetSelectedIconForeground=(0,c.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:c.quickInputListFocusIconForeground,light:c.quickInputListFocusIconForeground,hcDark:c.quickInputListFocusIconForeground,hcLight:c.quickInputListFocusIconForeground},r.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,c.registerColor)("editorSuggestWidget.selectedBackground",{dark:c.quickInputListFocusBackground,light:c.quickInputListFocusBackground,hcDark:c.quickInputListFocusBackground,hcLight:c.quickInputListFocusBackground},r.localize(5,null)),e.editorSuggestWidgetHighlightForeground=(0,c.registerColor)("editorSuggestWidget.highlightForeground",{dark:c.listHighlightForeground,light:c.listHighlightForeground,hcDark:c.listHighlightForeground,hcLight:c.listHighlightForeground},r.localize(6,null)),e.editorSuggestWidgetHighlightFocusForeground=(0,c.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:c.listFocusHighlightForeground,light:c.listFocusHighlightForeground,hcDark:c.listFocusHighlightForeground,hcLight:c.listFocusHighlightForeground},r.localize(7,null)),e.editorSuggestWidgetStatusForeground=(0,c.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,c.transparent)(e.editorSuggestWidgetForeground,.5),light:(0,c.transparent)(e.editorSuggestWidgetForeground,.5),hcDark:(0,c.transparent)(e.editorSuggestWidgetForeground,.5),hcLight:(0,c.transparent)(e.editorSuggestWidgetForeground,.5)},r.localize(8,null));var h;(function(D){D[D.Hidden=0]="Hidden",D[D.Loading=1]="Loading",D[D.Empty=2]="Empty",D[D.Open=3]="Open",D[D.Frozen=4]="Frozen",D[D.Details=5]="Details"})(h||(h={}));class v{constructor(y,T){this._service=y,this._key=`suggestWidget.size/${T.getEditorType()}/${T instanceof S.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 ws{constructor(y,T,_,L,M){this.editor=y,this._storageService=T,this._state=0,this._isAuto=!1,this._pendingLayout=new E.MutableDisposable,this._pendingShowDetails=new E.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new R.TimeoutTimer,this._disposables=new E.DisposableStore,this._onDidSelect=new k.PauseableEmitter,this._onDidFocus=new k.PauseableEmitter,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 n.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new w(this,y),this._persistedSize=new v(T,y);class O{constructor(H,W,U=!1,$=!1){this.persistedSize=H,this.currentSize=W,this.persistHeight=U,this.persistWidth=$}}let N;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),N=new O(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(x=>{if(this._resize(x.dimension.width,x.dimension.height),N&&(N.persistHeight=N.persistHeight||!!x.north||!!x.south,N.persistWidth=N.persistWidth||!!x.east||!!x.west),!!x.done){if(N){const{itemHeight:H,defaultSize:W}=this.getLayoutInfo(),U=Math.round(H/2);let{width:$,height:q}=this.element.size;(!N.persistHeight||Math.abs(N.currentSize.height-q)<=U)&&(q=N.persistedSize?.height??W.height),(!N.persistWidth||Math.abs(N.currentSize.width-$)<=U)&&($=N.persistedSize?.width??W.width),this._persistedSize.store(new t.Dimension($,q))}this._contentWidget.unlockPreference(),N=void 0}})),this._messageElement=t.append(this.element.domNode,t.$(".message")),this._listElement=t.append(this.element.domNode,t.$(".tree"));const P=M.createInstance(o.SuggestDetailsWidget,this.editor);P.onDidClose(this.toggleDetails,this,this._disposables),this._details=new o.SuggestDetailsOverlay(P,this.editor);const B=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(108).showIcons);B();const V=M.createInstance(g.ItemRenderer,this.editor);this._disposables.add(V),this._disposables.add(V.onDidToggleDetails(()=>this.toggleDetails())),this._list=new p.List("SuggestWidget",this._listElement,{getHeight:x=>this.getLayoutInfo().itemHeight,getTemplateId:x=>"suggestion"},[V],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>r.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:x=>{let H=x.textLabel;if(typeof x.completion.label!="string"){const{detail:q,description:X}=x.completion.label;q&&X?H=r.localize(12,null,H,q,X):q?H=r.localize(13,null,H,q):X&&(H=r.localize(14,null,H,X))}if(!x.isResolved||!this._isDetailsVisible())return H;const{documentation:W,detail:U}=x.completion,$=b.format("{0}{1}",U||"",W?typeof W=="string"?W:W.value:"");return r.localize(15,null,H,$)}}}),this._status=M.createInstance(C.SuggestWidgetStatus,this.element.domNode);const z=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(108).showStatusBar);z(),this._disposables.add((0,l.attachListStyler)(this._list,L,{listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:c.activeContrastBorder})),this._disposables.add(L.onDidColorThemeChange(x=>this._onThemeChange(x))),this._onThemeChange(L.getColorTheme()),this._disposables.add(this._list.onMouseDown(x=>this._onListMouseDownOrTap(x))),this._disposables.add(this._list.onTap(x=>this._onListMouseDownOrTap(x))),this._disposables.add(this._list.onDidChangeSelection(x=>this._onListSelection(x))),this._disposables.add(this._list.onDidChangeFocus(x=>this._onListFocus(x))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(x=>{x.hasChanged(108)&&(z(),B())})),this._ctxSuggestWidgetVisible=a.Context.Visible.bindTo(_),this._ctxSuggestWidgetDetailsVisible=a.Context.DetailsVisible.bindTo(_),this._ctxSuggestWidgetMultipleSuggestions=a.Context.MultipleSuggestions.bindTo(_),this._ctxSuggestWidgetHasFocusedSuggestion=a.Context.HasFocusedSuggestion.bindTo(_),this._disposables.add(t.addStandardDisposableListener(this._details.widget.domNode,"keydown",x=>{this._onDetailsKeydown.fire(x)})),this._disposables.add(this.editor.onMouseDown(x=>this._onEditorMouseDown(x)))}dispose(){this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),this._loadingTimeout?.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.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>"u"||typeof y.index>"u"||(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 _=this._completionModel;_&&(this._onDidSelect.fire({item:y,index:T,model:_}),this.editor.focus())}_onThemeChange(y){this._details.widget.borderWidth=(0,s.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}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const T=y.elements[0],_=y.indexes[0];T!==this._focusedItem&&(this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=T,this._list.reveal(_),this._currentSuggestionDetails=(0,R.createCancelablePromise)(async L=>{const M=(0,R.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),O=L.onCancellationRequested(()=>M.dispose()),N=await T.resolve(L);return M.dispose(),O.dispose(),N}),this._currentSuggestionDetails.then(()=>{_>=this._list.length||T!==this._list.element(_)||(this._ignoreFocusEvents=!0,this._list.splice(_,1,[T]),this._list.setFocus([_]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,g.getAriaId)(_)}))}).catch(A.onUnexpectedError)),this._onDidFocus.fire({item:T,index:_,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._ctxSuggestWidgetHasFocusedSuggestion.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=ws.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=ws.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,R.disposableTimeout)(()=>this._setState(1),T)))}showSuggestions(y,T,_,L){if(this._contentWidget.setPosition(this.editor.getPosition()),this._loadingTimeout?.dispose(),this._currentSuggestionDetails?.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==y&&(this._completionModel=y),_&&this._state!==2&&this._state!==0){this._setState(4);return}const M=this._completionModel.items.length,O=M===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(M>1),O){this._setState(L?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(_?4:3),T>=0&&(this._list.reveal(T,0),this._list.setFocus([T]))}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=t.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingLayout.clear(),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._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,o.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._pendingShowDetails.value=t.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingShowDetails.clear(),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._pendingLayout.clear(),this._pendingShowDetails.clear(),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),_=this.getLayoutInfo();y||(y=_.defaultSize);let L=y.height,M=y.width;if(this._status.element.style.height=`${_.itemHeight}px`,this._state===2||this._state===1)L=_.itemHeight+_.borderHeight,M=_.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new t.Dimension(M,L),this._contentWidget.setPreference(2);else{const O=T.width-_.borderHeight-2*_.horizontalPadding;M>O&&(M=O);const N=this._completionModel?this._completionModel.stats.pLabelLen*_.typicalHalfwidthCharacterWidth:M,P=_.statusBarHeight+this._list.contentHeight+_.borderHeight,B=_.itemHeight+_.statusBarHeight,V=t.getDomNodePagePosition(this.editor.getDomNode()),z=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),x=V.top+z.top+z.height,H=Math.min(T.height-x-_.verticalPadding,P),W=V.top+z.top-_.verticalPadding,U=Math.min(W,P);let $=Math.min(Math.max(U,H)+_.borderHeight,P);L===this._cappedHeight?.capped&&(L=this._cappedHeight.wanted),L<B&&(L=B),L>$&&(L=$);const q=150;L>H||this._forceRenderingAbove&&W>q?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),$=U):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),$=H),this.element.preferredSize=new t.Dimension(N,_.defaultSize.height),this.element.maxSize=new t.Dimension(O,$),this.element.minSize=new t.Dimension(220,B),this._cappedHeight=L===P?{wanted:this._cappedHeight?.wanted??y.height,capped:L}:void 0}this._resize(M,L)}_resize(y,T){const{width:_,height:L}=this.element.maxSize;y=Math.min(_,y),T=Math.min(L,T);const{statusBarHeight:M}=this.getLayoutInfo();this._list.layout(T-M,y),this._listElement.style.height=`${T-M}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(45),T=(0,I.clamp)(this.editor.getOption(110)||y.lineHeight,8,1e3),_=!this.editor.getOption(108).showStatusBar||this._state===2||this._state===1?0:T,L=this._details.widget.borderWidth,M=2*L;return{itemHeight:T,statusBarHeight:_,borderWidth:L,borderHeight:M,typicalHalfwidthCharacterWidth:y.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new t.Dimension(430,_+12*T+M)}}_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=r.localize(9,null),m.NO_SUGGESTIONS_MESSAGE=r.localize(10,null),m=we([F(1,f.IStorageService),F(2,u.IContextKeyService),F(3,d.IThemeService),F(4,i.IInstantiationService)],m),e.SuggestWidget=m;class w{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:_,horizontalPadding:L}=this._widget.getLayoutInfo();return new t.Dimension(T+2*_+L,y+2*_)}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=w}),define(ae[244],le([1,0,110,16,11,32,21,6,234,2,14,146,13,483,40,138,50,20,59,168,207,836,2088,1389,31,7,5,25,224,2087,1231,2231,1232,2245,27,18,108]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const B=!1;class V{constructor(X,G){if(this._model=X,this._position=G,X.getLineMaxColumn(G.lineNumber)!==G.column){const j=X.getOffsetAt(G),K=X.getPositionAt(j+1);this._marker=X.deltaDecorations([],[{range:l.Range.fromPositions(G,K),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(X){if(this._model.isDisposed()||this._position.lineNumber!==X.lineNumber)return 0;if(this._marker){const G=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(G.getStartPosition())-this._model.getOffsetAt(X)}else return this._model.getLineMaxColumn(X.lineNumber)-X.column}}var z;(function(q){q[q.NoBeforeUndoStop=1]="NoBeforeUndoStop",q[q.NoAfterUndoStop=2]="NoAfterUndoStop",q[q.KeepAlternativeSuggestions=4]="KeepAlternativeSuggestions",q[q.AlternativeOverwriteConfig=8]="AlternativeOverwriteConfig"})(z||(z={}));let x=class va{static get(X){return X.getContribution(va.ID)}constructor(X,G,Q,j,K,Y,ee){this._memoryService=G,this._commandService=Q,this._contextKeyService=j,this._instantiationService=K,this._logService=Y,this._telemetryService=ee,this._lineSuffix=new b.MutableDisposable,this._toDispose=new b.DisposableStore,this._selectors=new H(se=>se.priority),this._telemetryGate=0,this.editor=X,this.model=K.createInstance(_.SuggestModel,this.editor);const ie=D.Context.InsertMode.bindTo(j);ie.set(X.getOption(108).insertMode),this.model.onDidTrigger(()=>ie.set(X.getOption(108).insertMode)),this.widget=this._toDispose.add(new R.IdleValue(()=>{const se=this._instantiationService.createInstance(M.SuggestWidget,this.editor);this._toDispose.add(se),this._toDispose.add(se.onDidSelect(de=>this._insertSuggestion(de,0),this));const te=new T.CommitCharacterController(this.editor,se,this.model,de=>this._insertSuggestion(de,2));this._toDispose.add(te);const Z=D.Context.MakesTextEdit.bindTo(this._contextKeyService),ne=D.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),ce=D.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,b.toDisposable)(()=>{Z.reset(),ne.reset(),ce.reset()})),this._toDispose.add(se.onDidFocus(({item:de})=>{const he=this.editor.getPosition(),pe=de.editStart.column,me=he.column;let Se=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!de.completion.additionalTextEdits&&!(de.completion.insertTextRules&4)&&me-pe===de.completion.insertText.length&&(Se=this.editor.getModel().getValueInRange({startLineNumber:he.lineNumber,startColumn:pe,endLineNumber:he.lineNumber,endColumn:me})!==de.completion.insertText),Z.set(Se),ne.set(!c.Position.equals(de.editInsertEnd,de.editReplaceEnd)),ce.set(Boolean(de.provider.resolveCompletionItem)||Boolean(de.completion.documentation)||de.completion.detail!==de.completion.label)})),this._toDispose.add(se.onDetailsKeyDown(de=>{if(de.toKeybinding().equals(new I.SimpleKeybinding(!0,!1,!1,!1,33))||S.isMacintosh&&de.toKeybinding().equals(new I.SimpleKeybinding(!1,!1,!1,!0,33))){de.stopPropagation();return}de.toKeybinding().isModifierKey()||this.editor.focus()})),se})),this._overtypingCapturer=this._toDispose.add(new R.IdleValue(()=>this._toDispose.add(new L.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new R.IdleValue(()=>this._toDispose.add(new y.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(K.createInstance(o.WordContextKey,X)),this._toDispose.add(this.model.onDidTrigger(se=>{this.widget.value.showTriggered(se.auto,se.shy?250:50),this._lineSuffix.value=new V(this.editor.getModel(),se.position)})),this._toDispose.add(this.model.onDidSuggest(se=>{if(se.shy)return;let te=-1;if(!se.noSelect){for(const Z of this._selectors.itemsOrderedByPriorityDesc)if(te=Z.select(this.editor.getModel(),this.editor.getPosition(),se.completionModel.items),te!==-1)break;te===-1&&(te=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),se.completionModel.items))}this.widget.value.showSuggestions(se.completionModel,te,se.isFrozen,se.auto)})),this._toDispose.add(this.model.onDidCancel(se=>{se.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{B||(this.model.cancel(),this.model.clear())}));const re=D.Context.AcceptSuggestionsOnEnter.bindTo(j),oe=()=>{const se=this.editor.getOption(1);re.set(se==="on"||se==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>oe())),oe()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(X,G){if(!X||!X.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const Q=d.SnippetController2.get(this.editor);if(!Q)return;const j=this.editor.getModel(),K=j.getAlternativeVersionId(),{item:Y}=X,ee=[],ie=new A.CancellationTokenSource;G&1||this.editor.pushUndoStop();const re=this.getOverwriteInfo(Y,Boolean(G&8));if(this._memoryService.memorize(j,this.editor.getPosition(),Y),Array.isArray(Y.completion.additionalTextEdits)){const se=u.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",Y.completion.additionalTextEdits.map(te=>f.EditOperation.replaceMove(l.Range.lift(te.range),te.text))),se.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!Y.isResolved){const se=new C.StopWatch(!0);let te;const Z=j.onDidChangeContent(he=>{if(he.isFlush){ie.cancel(),Z.dispose();return}for(const pe of he.changes){const me=l.Range.getEndPosition(pe.range);(!te||c.Position.isBefore(me,te))&&(te=me)}}),ne=G;G|=2;let ce=!1;const de=this.editor.onWillType(()=>{de.dispose(),ce=!0,ne&2||this.editor.pushUndoStop()});ee.push(Y.resolve(ie.token).then(()=>{if(!Y.completion.additionalTextEdits||ie.token.isCancellationRequested||te&&Y.completion.additionalTextEdits.some(pe=>c.Position.isBefore(te,l.Range.getStartPosition(pe.range))))return!1;ce&&this.editor.pushUndoStop();const he=u.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",Y.completion.additionalTextEdits.map(pe=>f.EditOperation.replaceMove(l.Range.lift(pe.range),pe.text))),he.restoreRelativeVerticalPositionOfCursor(this.editor),(ce||!(ne&2))&&this.editor.pushUndoStop(),!0}).then(he=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",se.elapsed(),he),Z.dispose(),de.dispose()}))}let{insertText:oe}=Y.completion;Y.completion.insertTextRules&4||(oe=n.SnippetParser.escape(oe)),this.model.cancel(),Q.insert(oe,{overwriteBefore:re.overwriteBefore,overwriteAfter:re.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(Y.completion.insertTextRules&1),clipboardText:X.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),G&2||this.editor.pushUndoStop(),Y.completion.command&&(Y.completion.command.id===W.id?this.model.trigger({auto:!0,shy:!1,noSelect:!1},!0):ee.push(this._commandService.executeCommand(Y.completion.command.id,...Y.completion.command.arguments?[...Y.completion.command.arguments]:[]).catch(k.onUnexpectedError))),G&4&&this._alternatives.value.set(X,se=>{for(ie.cancel();j.canUndo();){K!==j.getAlternativeVersionId()&&j.undo(),this._insertSuggestion(se,3|(G&8?8:0));break}}),this._alertCompletionItem(Y),Promise.all(ee).finally(()=>{this._reportSuggestionAcceptedTelemetry(Y,j,X),this.model.clear(),ie.dispose()})}_reportSuggestionAcceptedTelemetry(X,G,Q){if(this._telemetryGate++%100!==0)return;const j=X.extensionId?X.extensionId.value:(Q.item.provider._debugDisplayName??"unknown").split("(",1)[0].toLowerCase();this._telemetryService.publicLog2("suggest.acceptedSuggestion",{providerId:j,kind:X.completion.kind,basenameHash:(0,P.hash)((0,N.basename)(G.uri)).toString(16),languageId:G.getLanguageId(),fileExtension:(0,N.extname)(G.uri)})}getOverwriteInfo(X,G){(0,r.assertType)(this.editor.hasModel());let Q=this.editor.getOption(108).insertMode==="replace";G&&(Q=!Q);const j=X.position.column-X.editStart.column,K=(Q?X.editReplaceEnd.column:X.editInsertEnd.column)-X.position.column,Y=this.editor.getPosition().column-X.position.column,ee=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:j+Y,overwriteAfter:K+ee}}_alertCompletionItem(X){if((0,p.isNonEmptyArray)(X.completion.additionalTextEdits)){const G=g.localize(0,null,X.textLabel,X.completion.additionalTextEdits.length);(0,t.alert)(G)}}triggerSuggest(X,G,Q,j){this.editor.hasModel()&&(this.model.trigger({auto:G??!1,shy:!1,noSelect:j??!1},!1,X,void 0,Q),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(X){if(!this.editor.hasModel())return;const G=this.editor.getPosition(),Q=()=>{G.equals(this.editor.getPosition())&&this._commandService.executeCommand(X.fallback)},j=K=>{if(K.completion.insertTextRules&4||K.completion.additionalTextEdits)return!0;const Y=this.editor.getPosition(),ee=K.editStart.column,ie=Y.column;return ie-ee!==K.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:Y.lineNumber,startColumn:ee,endLineNumber:Y.lineNumber,endColumn:ie})!==K.completion.insertText};E.Event.once(this.model.onDidTrigger)(K=>{const Y=[];E.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,b.dispose)(Y),Q()},void 0,Y),this.model.onDidSuggest(({completionModel:ee})=>{if((0,b.dispose)(Y),ee.items.length===0){Q();return}const ie=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),ee.items),re=ee.items[ie];if(!j(re)){Q();return}this.editor.pushUndoStop(),this._insertSuggestion({index:ie,item:re,model:ee},7)},void 0,Y)}),this.model.trigger({auto:!1,shy:!0,noSelect:!1}),this.editor.revealPosition(G,0),this.editor.focus()}acceptSelectedSuggestion(X,G){const Q=this.widget.value.getFocusedItem();let j=0;X&&(j|=4),G&&(j|=8),this._insertSuggestion(Q,j)}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(X){return this._selectors.register(X)}};x.ID="editor.contrib.suggestController",x=we([F(1,a.ISuggestMemoryService),F(2,h.ICommandService),F(3,v.IContextKeyService),F(4,m.IInstantiationService),F(5,w.ILogService),F(6,O.ITelemetryService)],x),e.SuggestController=x;class H{constructor(X){this.prioritySelector=X,this._items=new Array}register(X){if(this._items.indexOf(X)!==-1)throw new Error("Value is already registered");return this._items.push(X),this._items.sort((G,Q)=>this.prioritySelector(Q)-this.prioritySelector(G)),{dispose:()=>{const G=this._items.indexOf(X);G>=0&&this._items.splice(G,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class W extends i.EditorAction{constructor(){super({id:W.id,label:g.localize(1,null),alias:"Trigger Suggest",precondition:v.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.hasCompletionItemProvider),kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(X,G,Q){const j=x.get(G);if(!j)return;let K,Y;Q&&typeof Q=="object"&&(Q.auto===!0&&(K=!0),Q.noSelection===!0&&(Y=!0)),j.triggerSuggest(void 0,K,void 0,Y)}}e.TriggerSuggestAction=W,W.id="editor.action.triggerSuggest",(0,i.registerEditorContribution)(x.ID,x),(0,i.registerEditorAction)(W);const U=100+90,$=i.EditorCommand.bindToContribution(x.get);(0,i.registerEditorCommand)(new $({id:"acceptSelectedSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.HasFocusedSuggestion),handler(q){q.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:v.ContextKeyExpr.and(D.Context.Visible,s.EditorContextKeys.textInputFocus),weight:U},{primary:3,kbExpr:v.ContextKeyExpr.and(D.Context.Visible,s.EditorContextKeys.textInputFocus,D.Context.AcceptSuggestionsOnEnter,D.Context.MakesTextEdit),weight:U}],menuOpts:[{menuId:D.suggestWidgetStatusbarMenu,title:g.localize(2,null),group:"left",order:1,when:D.Context.HasInsertAndReplaceRange.toNegated()},{menuId:D.suggestWidgetStatusbarMenu,title:g.localize(3,null),group:"left",order:1,when:v.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("insert"))},{menuId:D.suggestWidgetStatusbarMenu,title:g.localize(4,null),group:"left",order:1,when:v.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("replace"))}]})),(0,i.registerEditorCommand)(new $({id:"acceptAlternativeSelectedSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,s.EditorContextKeys.textInputFocus,D.Context.HasFocusedSuggestion),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(q){q.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:D.suggestWidgetStatusbarMenu,group:"left",order:2,when:v.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("insert")),title:g.localize(5,null)},{menuId:D.suggestWidgetStatusbarMenu,group:"left",order:2,when:v.ContextKeyExpr.and(D.Context.HasInsertAndReplaceRange,D.Context.InsertMode.isEqualTo("replace")),title:g.localize(6,null)}]})),h.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,i.registerEditorCommand)(new $({id:"hideSuggestWidget",precondition:D.Context.Visible,handler:q=>q.cancelSuggestWidget(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,i.registerEditorCommand)(new $({id:"selectNextSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.MultipleSuggestions),handler:q=>q.selectNextSuggestion(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,i.registerEditorCommand)(new $({id:"selectNextPageSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.MultipleSuggestions),handler:q=>q.selectNextPageSuggestion(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,i.registerEditorCommand)(new $({id:"selectLastSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.MultipleSuggestions),handler:q=>q.selectLastSuggestion()})),(0,i.registerEditorCommand)(new $({id:"selectPrevSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.MultipleSuggestions),handler:q=>q.selectPrevSuggestion(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,i.registerEditorCommand)(new $({id:"selectPrevPageSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.MultipleSuggestions),handler:q=>q.selectPrevPageSuggestion(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,i.registerEditorCommand)(new $({id:"selectFirstSuggestion",precondition:v.ContextKeyExpr.and(D.Context.Visible,D.Context.MultipleSuggestions),handler:q=>q.selectFirstSuggestion()})),(0,i.registerEditorCommand)(new $({id:"toggleSuggestionDetails",precondition:D.Context.Visible,handler:q=>q.toggleSuggestionDetails(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:D.suggestWidgetStatusbarMenu,group:"right",order:1,when:v.ContextKeyExpr.and(D.Context.DetailsVisible,D.Context.CanResolve),title:g.localize(7,null)},{menuId:D.suggestWidgetStatusbarMenu,group:"right",order:1,when:v.ContextKeyExpr.and(D.Context.DetailsVisible.toNegated(),D.Context.CanResolve),title:g.localize(8,null)}]})),(0,i.registerEditorCommand)(new $({id:"toggleExplainMode",precondition:D.Context.Visible,handler:q=>q.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,i.registerEditorCommand)(new $({id:"toggleSuggestionFocus",precondition:D.Context.Visible,handler:q=>q.toggleSuggestionFocus(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,i.registerEditorCommand)(new $({id:"insertBestCompletion",precondition:v.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),o.WordContextKey.AtEnd,D.Context.Visible.toNegated(),y.SuggestAlternatives.OtherSuggestions.toNegated(),d.SnippetController2.InSnippetMode.toNegated()),handler:(q,X)=>{q.triggerSuggestAndAcceptBest((0,r.isObject)(X)?{fallback:"tab",...X}:{fallback:"tab"})},kbOpts:{weight:U,primary:2}})),(0,i.registerEditorCommand)(new $({id:"insertNextSuggestion",precondition:v.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),y.SuggestAlternatives.OtherSuggestions,D.Context.Visible.toNegated(),d.SnippetController2.InSnippetMode.toNegated()),handler:q=>q.acceptNextSuggestion(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:2}})),(0,i.registerEditorCommand)(new $({id:"insertPrevSuggestion",precondition:v.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,v.ContextKeyExpr.equals("config.editor.tabCompletion","on"),y.SuggestAlternatives.OtherSuggestions,D.Context.Visible.toNegated(),d.SnippetController2.InSnippetMode.toNegated()),handler:q=>q.acceptPrevSuggestion(),kbOpts:{weight:U,kbExpr:s.EditorContextKeys.textInputFocus,primary:1026}})),(0,i.registerEditorAction)(class extends i.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:g.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(q,X){x.get(X)?.resetWidgetSize()}})}),define(ae[2246],le([1,0,16,11,6,2,50,20,207,832,244,596]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rangeStartsWith=e.SuggestWidgetInlineCompletionProvider=void 0;class r extends A.Disposable{get state(){if(!!this._isActive)return{selectedItem:this._currentSuggestItemInfo}}constructor(l,s){super(),this.editor=l,this.suggestControllerPreselector=s,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new R.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new p.RunOnceScheduler(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(l.onKeyDown(n=>{n.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(l.onKeyUp(n=>{n.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const d=S.SuggestController.get(this.editor);if(d){this._register(d.registerSelector({priority:100,select:(o,g,h)=>{const v=this.editor.getModel(),m=(0,C.minimizeInlineCompletion)(v,this.suggestControllerPreselector());if(!m)return-1;const w=k.Position.lift(g),D=h.map((T,_)=>{const L=f(d,w,T,this.isShiftKeyPressed),M=(0,C.minimizeInlineCompletion)(v,L?.normalizedInlineCompletion);if(!M)return;const O=u(m.range,M.range)&&m.insertText.startsWith(M.insertText);return{index:_,valid:O,prefixLength:M.insertText.length,suggestItem:T}}).filter(T=>T&&T.valid),y=(0,t.findMaxBy)(D,(0,t.compareBy)(T=>T.prefixLength,t.numberComparator));return y?y.index:-1}}));let n=!1;const a=()=>{n||(n=!0,this._register(d.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(d.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(d.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(R.Event.once(d.model.onDidTrigger)(o=>{a()}))}this.update(this._isActive)}update(l){const s=this.getSuggestItemInfo();let d=!1;i(this._currentSuggestItemInfo,s)||(this._currentSuggestItemInfo=s,d=!0),this._isActive!==l&&(this._isActive=l,d=!0),d&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const l=S.SuggestController.get(this.editor);if(!l||!this.isSuggestWidgetVisible)return;const s=l.widget.value.getFocusedItem();if(!!s)return f(l,this.editor.getPosition(),s.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){S.SuggestController.get(this.editor)?.stopForceRenderingAbove()}forceRenderingAbove(){S.SuggestController.get(this.editor)?.forceRenderingAbove()}}e.SuggestWidgetInlineCompletionProvider=r;function u(c,l){return l.startLineNumber===c.startLineNumber&&l.startColumn===c.startColumn&&(l.endLineNumber<c.endLineNumber||l.endLineNumber===c.endLineNumber&&l.endColumn<=c.endColumn)}e.rangeStartsWith=u;function i(c,l){return c===l?!0:!c||!l?!1:c.completionItemKind===l.completionItemKind&&c.isSnippetText===l.isSnippetText&&(0,C.normalizedInlineCompletionsEquals)(c.normalizedInlineCompletion,l.normalizedInlineCompletion)}function f(c,l,s,d){if(Array.isArray(s.completion.additionalTextEdits)&&s.completion.additionalTextEdits.length>0)return{completionItemKind:s.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:E.Range.fromPositions(l,l),insertText:"",filterText:"",snippetInfo:void 0,additionalTextEdits:[]}};let{insertText:n}=s.completion,a=!1;if(s.completion.insertTextRules&4){const g=new I.SnippetParser().parse(n),h=c.editor.getModel();if(g.children.length>100)return;b.SnippetSession.adjustWhitespace(h,l,g,!0,!0),n=g.toString(),a=!0}const o=c.getOverwriteInfo(s,d);return{isSnippetText:a,completionItemKind:s.completion.kind,normalizedInlineCompletion:{insertText:n,filterText:n,range:E.Range.fromPositions(l.delta(0,-o.overwriteBefore),l.delta(0,Math.max(o.overwriteAfter,0))),snippetInfo:void 0,additionalTextEdits:[]}}}}),define(ae[2247],le([1,0,11,21,2,92,61,496,833,596,2246]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetPreviewModel=void 0;let C=class extends E.BaseGhostTextWidgetModel{get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}constructor(i,f,c){super(i),this.cache=f,this.languageFeaturesService=c,this.suggestionInlineCompletionSource=this._register(new S.SuggestWidgetInlineCompletionProvider(this.editor,()=>this.cache.value?.completions[0]?.toLiveInlineCompletion())),this.updateOperation=this._register(new R.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 s=this.ghostText;s&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,r(s.parts.map(d=>d.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,R.toDisposable)(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}isSuggestionPreviewEnabled(){return this.editor.getOption(108).preview}async updateCache(){const i=this.suggestionInlineCompletionSource.state;if(!i||!i.selectedItem)return;const f={text:i.selectedItem.normalizedInlineCompletion.insertText,range:i.selectedItem.normalizedInlineCompletion.range,isSnippetText:i.selectedItem.isSnippetText,completionKind:i.selectedItem.completionItemKind},c=this.editor.getPosition();if(i.selectedItem.isSnippetText||i.selectedItem.completionItemKind===27||i.selectedItem.completionItemKind===20||i.selectedItem.completionItemKind===23){this.cache.clear();return}const l=(0,t.createCancelablePromise)(async d=>{let n;try{n=await(0,I.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,c,this.editor.getModel(),{triggerKind:A.InlineCompletionTriggerKind.Automatic,selectedSuggestionInfo:f},d)}catch(a){(0,p.onUnexpectedError)(a);return}if(d.isCancellationRequested){n.dispose();return}this.cache.setValue(this.editor,n,A.InlineCompletionTriggerKind.Automatic),this.onDidChangeEmitter.fire()}),s=new I.UpdateOperation(l,A.InlineCompletionTriggerKind.Automatic);this.updateOperation.value=s,await l,this.updateOperation.value===s&&this.updateOperation.clear()}get ghostText(){const i=this.isSuggestionPreviewEnabled(),f=this.editor.getModel(),c=(0,b.minimizeInlineCompletion)(f,this.cache.value?.completions[0]?.toLiveInlineCompletion()),l=this.suggestionInlineCompletionSource.state,s=(0,b.minimizeInlineCompletion)(f,l?.selectedItem?.normalizedInlineCompletion),d=c&&s&&c.insertText.startsWith(s.insertText)&&c.range.equalsRange(s.range);if(!i&&!d)return;const n=d?c:s||c,a=d?n.insertText.length-s.insertText.length:0;return this.toGhostText(n,a)}toGhostText(i,f){const c=this.editor.getOptions().get(108).previewMode;return i?(0,b.inlineCompletionToGhostText)(i,this.editor.getModel(),c,this.editor.getPosition(),f)||new E.GhostText(i.range.endLineNumber,[],this.minReservedLineCount):void 0}};C=we([F(2,k.ILanguageFeaturesService)],C),e.SuggestWidgetPreviewModel=C;function r(u){return u.reduce((i,f)=>i+f,0)}}),define(ae[2248],le([1,0,6,2,50,92,833,2247,572,5]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedInlineCompletionCache=e.GhostTextModel=e.DelegatingModel=void 0;class S extends p.Disposable{constructor(){super(...arguments),this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new p.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=S;let C=class extends S{get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}constructor(i,f){super(),this.editor=i,this.instantiationService=f,this.sharedCache=this._register(new r),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(E.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()}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(i){const f=this.activeInlineCompletionsModel?.ghostText;return f?f.parts.some(c=>i.containsPosition(new R.Position(f.lineNumber,c.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=we([F(1,b.IInstantiationService)],C),e.GhostTextModel=C;class r extends p.Disposable{constructor(){super(...arguments),this.onDidChangeEmitter=new t.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new p.MutableDisposable)}get value(){return this.cache.value}setValue(i,f,c){this.cache.value=new k.SynchronizedInlineCompletionsCache(f,i,()=>this.onDidChangeEmitter.fire(),c)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}e.SharedInlineCompletionCache=r}),define(ae[623],le([1,0,6,2,28,40,251,59,2248,2166,1368,7,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=e.ActiveGhostTextController=e.GhostTextController=void 0;let u=class Sa extends p.Disposable{static get(n){return n.getContribution(Sa.ID)}get activeModel(){return this.activeController.value?.model}constructor(n,a){super(),this.editor=n,this.instantiationService=a,this.triggeredExplicitly=!1,this.activeController=this._register(new p.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(o=>{o.hasChanged(108)&&this.updateModelController(),o.hasChanged(56)&&this.updateModelController()})),this.updateModelController()}updateModelController(){const n=this.editor.getOption(108),a=this.editor.getOption(56);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(n.preview||a.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(f,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(n){return this.activeModel?.shouldShowHoverAt(n)||!1}shouldShowHoverAtViewZone(n){return this.activeController.value?.widget?.shouldShowHoverAtViewZone(n)||!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 n=await this.activeModel?.hasMultipleInlineCompletions();return n!==void 0?n:!1}};u.inlineSuggestionVisible=new C.RawContextKey("inlineSuggestionVisible",!1,S.localize(0,null)),u.inlineSuggestionHasIndentation=new C.RawContextKey("inlineSuggestionHasIndentation",!1,S.localize(1,null)),u.inlineSuggestionHasIndentationLessThanTabSize=new C.RawContextKey("inlineSuggestionHasIndentationLessThanTabSize",!0,S.localize(2,null)),u.ID="editor.contrib.ghostTextController",u=we([F(1,r.IInstantiationService)],u),e.GhostTextController=u;class i{constructor(n){this.contextKeyService=n,this.inlineCompletionVisible=u.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=u.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=u.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let f=class extends p.Disposable{constructor(n,a,o){super(),this.editor=n,this.instantiationService=a,this.contextKeyService=o,this.contextKeys=new i(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(I.GhostTextModel,this.editor)),this.widget=this._register(this.instantiationService.createInstance(b.GhostTextWidget,this.editor,this.model)),this._register((0,p.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 n=!1,a=!0;const o=this.model.inlineCompletionsModel.ghostText;if(!!this.model.activeInlineCompletionsModel&&o&&o.parts.length>0){const{column:g,lines:h}=o.parts[0],v=h[0],m=this.editor.getModel().getLineIndentColumn(o.lineNumber);if(g<=m){let D=(0,R.firstNonWhitespaceIndex)(v);D===-1&&(D=v.length-1),n=D>0;const y=this.editor.getModel().getOptions().tabSize;a=k.CursorColumns.visibleColumnFromColumn(v,D+1,y)<y}}this.contextKeys.inlineCompletionSuggestsIndentation.set(n),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(a)}};f=we([F(1,r.IInstantiationService),F(2,C.IContextKeyService)],f),e.ActiveGhostTextController=f;class c extends A.EditorAction{constructor(){super({id:c.ID,label:S.localize(3,null),alias:"Show Next Inline Suggestion",precondition:C.ContextKeyExpr.and(E.EditorContextKeys.writable,u.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}async run(n,a){const o=u.get(a);o&&(o.showNextInlineCompletion(),a.focus())}}e.ShowNextInlineSuggestionAction=c,c.ID="editor.action.inlineSuggest.showNext";class l extends A.EditorAction{constructor(){super({id:l.ID,label:S.localize(4,null),alias:"Show Previous Inline Suggestion",precondition:C.ContextKeyExpr.and(E.EditorContextKeys.writable,u.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}async run(n,a){const o=u.get(a);o&&(o.showPreviousInlineCompletion(),a.focus())}}e.ShowPreviousInlineSuggestionAction=l,l.ID="editor.action.inlineSuggest.showPrevious";class s extends A.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:S.localize(5,null),alias:"Trigger Inline Suggestion",precondition:E.EditorContextKeys.writable})}async run(n,a){u.get(a)?.trigger()}}e.TriggerInlineSuggestionAction=s}),define(ae[2249],le([1,0,10,113,2,184,20,42,302,623,1369,111,15,31,7,41,571]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class l{constructor(n,a,o){this.owner=n,this.range=a,this.controller=o}isValidForHoverAnchor(n){return n.type===1&&this.range.startColumn<=n.range.startColumn&&this.range.endColumn>=n.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}get commands(){return this.controller.activeModel?.activeInlineCompletionsModel?.completionSession.value?.commands||[]}}e.InlineCompletionsHover=l;let s=class{constructor(n,a,o,g,h,v,m){this._editor=n,this._commandService=a,this._menuService=o,this._contextKeyService=g,this._languageService=h,this._openerService=v,this.accessibilityService=m,this.hoverOrdinal=3}suggestHoverAnchor(n){const a=b.GhostTextController.get(this._editor);if(!a)return null;const o=n.target;if(o.type===8){const g=o.detail;if(a.shouldShowHoverAtViewZone(g.viewZoneId))return new I.HoverForeignElementAnchor(1e3,this,k.Range.fromPositions(g.positionBefore||g.position,g.positionBefore||g.position),n.event.posx,n.event.posy)}return o.type===7&&a.shouldShowHoverAt(o.range)?new I.HoverForeignElementAnchor(1e3,this,o.range,n.event.posx,n.event.posy):o.type===6&&o.detail.mightBeForeignElement&&a.shouldShowHoverAt(o.range)?new I.HoverForeignElementAnchor(1e3,this,o.range,n.event.posx,n.event.posy):null}computeSync(n,a){const o=b.GhostTextController.get(this._editor);return o&&o.shouldShowHoverAt(n.range)?[new l(this,n.range,o)]:[]}renderHoverParts(n,a){const o=new R.DisposableStore,g=a[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(n,g,o);const h=o.add(this._menuService.createMenu(r.MenuId.InlineCompletionsActions,this._contextKeyService)),v=n.statusBar.addAction({label:S.localize(0,null),commandId:b.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(b.ShowNextInlineSuggestionAction.ID)}),m=n.statusBar.addAction({label:S.localize(1,null),commandId:b.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(b.ShowPreviousInlineSuggestionAction.ID)});n.statusBar.addAction({label:S.localize(2,null),commandId:c.inlineSuggestCommitId,run:()=>this._commandService.executeCommand(c.inlineSuggestCommitId)});const w=[v,m];for(const D of w)D.setEnabled(!1);g.hasMultipleSuggestions().then(D=>{for(const y of w)y.setEnabled(D)});for(const D of g.commands)n.statusBar.addAction({label:D.title,commandId:D.id,run:()=>this._commandService.executeCommand(D.id,...D.arguments||[])});for(const[D,y]of h.getActions())for(const T of y)T instanceof r.MenuItemAction&&n.statusBar.addAction({label:T.label,commandId:T.item.id,run:()=>this._commandService.executeCommand(T.item.id)});return o}renderScreenReaderText(n,a,o){const g=t.$,h=g("div.hover-row.markdown-hover"),v=t.append(h,g("div.hover-contents")),m=o.add(new A.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),w=y=>{o.add(m.onDidRenderAsync(()=>{v.className="hover-contents code-hover-contents",n.onContentsChanged()}));const T=S.localize(3,null),_=o.add(m.render(new p.MarkdownString().appendText(T).appendCodeblock("text",y)));v.replaceChildren(_.element)},D=a.controller.activeModel?.inlineCompletionsModel?.ghostText;if(D){const y=this._editor.getModel().getLineContent(D.lineNumber);w(D.renderForScreenReader(y))}n.fragment.appendChild(h)}};s=we([F(1,u.ICommandService),F(2,r.IMenuService),F(3,i.IContextKeyService),F(4,E.ILanguageService),F(5,f.IOpenerService),F(6,C.IAccessibilityService)],s),e.InlineCompletionsHoverParticipant=s}),define(ae[2250],le([1,0,40,59,302,571,623,2249,7,98]),function(J,e,t,p,R,A,k,E,I,b){"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),R.HoverParticipantRegistry.register(E.InlineCompletionsHoverParticipant);const S=t.EditorCommand.bindToContribution(k.GhostTextController.get);e.commitInlineSuggestionAction=new S({id:A.inlineSuggestCommitId,precondition:k.GhostTextController.inlineSuggestionVisible,handler(C){C.commit(),C.editor.focus()}}),(0,t.registerEditorCommand)(e.commitInlineSuggestionAction),b.KeybindingsRegistry.registerKeybindingRule({primary:2,weight:200,id:e.commitInlineSuggestionAction.id,when:I.ContextKeyExpr.and(e.commitInlineSuggestionAction.precondition,p.EditorContextKeys.tabMovesFocus.toNegated(),k.GhostTextController.inlineSuggestionHasIndentationLessThanTabSize)}),(0,t.registerEditorCommand)(new S({id:"editor.action.inlineSuggest.hide",precondition:k.GhostTextController.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(C){C.hide()}}))}),define(ae[440],le([1,0,10,90,137,279,84,7,38,26,12]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownWithPrimaryActionViewItem=void 0;let C=class extends R.BaseActionViewItem{get onDidChangeDropdownVisibility(){return this._dropdown.onDidChangeVisibility}constructor(u,i,f,c,l,s,d,n,a,o){super(null,u),this._contextMenuProvider=l,this._options=s,this._container=null,this._dropdownContainer=null,this._primaryAction=new k.MenuEntryActionViewItem(u,void 0,d,n,a,o,l),this._dropdown=new A.DropdownMenuActionViewItem(i,f,this._contextMenuProvider,{menuAsChild:!0,classNames:["codicon","codicon-chevron-down"],keybindingProvider:this._options?.getKeyBinding})}setActionContext(u){super.setActionContext(u),this._primaryAction.setActionContext(u),this._dropdown.setActionContext(u)}render(u){this._container=u,super.render(this._container),this._container.classList.add("monaco-dropdown-with-primary");const i=t.$(".action-container");this._primaryAction.render(t.append(this._container,i)),this._dropdownContainer=t.$(".dropdown-action-container"),this._dropdown.render(t.append(this._container,this._dropdownContainer)),this._register(t.addDisposableListener(i,t.EventType.KEY_DOWN,f=>{const c=new p.StandardKeyboardEvent(f);c.equals(17)&&(this._primaryAction.element.tabIndex=-1,this._dropdown.focus(),c.stopPropagation())})),this._register(t.addDisposableListener(this._dropdownContainer,t.EventType.KEY_DOWN,f=>{const c=new p.StandardKeyboardEvent(f);c.equals(15)&&(this._primaryAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._primaryAction.element?.focus(),c.stopPropagation())}))}focus(u){u?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(u){u?this._primaryAction.element.tabIndex=0:(this._primaryAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}update(u,i,f){this._dropdown.dispose(),this._dropdown=new A.DropdownMenuActionViewItem(u,i,this._contextMenuProvider,{menuAsChild:!0,classNames:["codicon",f||"codicon-chevron-down"]}),this._dropdownContainer&&this._dropdown.render(this._dropdownContainer)}dispose(){this._primaryAction.dispose(),this._dropdown.dispose(),super.dispose()}};C=we([F(6,I.IKeybindingService),F(7,b.INotificationService),F(8,E.IContextKeyService),F(9,S.IThemeService)],C),e.DropdownWithPrimaryActionViewItem=C}),define(ae[245],le([1,0,10,263,36,16,21,2,1403,84,15,7,37,38,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuWorkbenchToolBar=e.WorkbenchToolBar=e.HiddenItemStrategy=void 0;var f;(function(s){s[s.NoHide=-1]="NoHide",s[s.Ignore=0]="Ignore",s[s.RenderInSecondaryGroup=1]="RenderInSecondaryGroup"})(f=e.HiddenItemStrategy||(e.HiddenItemStrategy={}));let c=class extends p.ToolBar{constructor(d,n,a,o,g,h,v){super(d,g,{getKeyBinding:m=>h.lookupKeybinding(m.id)??void 0,...n,allowContextMenu:!0}),this._options=n,this._menuService=a,this._contextKeyService=o,this._contextMenuService=g,this._sessionDisposables=this._store.add(new E.DisposableStore),n?.telemetrySource&&this._store.add(this.actionBar.onDidRun(m=>v.publicLog2("workbenchActionExecuted",{id:m.action.id,from:n.telemetrySource})))}setActions(d,n=[],a){this._sessionDisposables.clear();const o=d.slice(),g=n.slice(),h=[];let v=!1;if(this._options?.hiddenItemStrategy!==-1){let m=g.length>0;for(let w=0;w<o.length;w++){const D=o[w];!(D instanceof S.MenuItemAction)&&!(D instanceof S.SubmenuItemAction)||!D.hideActions||(h.push(D.hideActions.toggle),D.hideActions.isHidden&&(v=!0,o[w]=void 0,this._options?.hiddenItemStrategy!==0&&(m&&(m=!1,g.unshift(new R.Separator)),g.unshift(D))))}}(0,A.coalesceInPlace)(o),super.setActions(o,g),h.length>0&&this._sessionDisposables.add((0,t.addDisposableListener)(this.getElement(),"contextmenu",m=>{const w=this.getItemAction(m.target);if(!w)return;m.preventDefault(),m.stopPropagation();let D=h,y;if(w instanceof S.MenuItemAction||w instanceof S.SubmenuItemAction){if(!w.hideActions)return;y=w.hideActions.hide}else y=(0,R.toAction)({id:"label",label:(0,I.localize)(0,null),enabled:!1,run(){}});D=[y,new R.Separator,...h],this._options?.resetMenu&&!a&&(a=[this._options.resetMenu]),v&&a&&(D.push(new R.Separator),D.push((0,R.toAction)({id:"resetThisMenu",label:(0,I.localize)(1,null),run:()=>this._menuService.resetHiddenStates(a)}))),this._contextMenuService.showContextMenu({getAnchor:()=>m,getActions:()=>D,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},contextKeyService:this._contextKeyService})}))}};c=we([F(2,S.IMenuService),F(3,C.IContextKeyService),F(4,r.IContextMenuService),F(5,u.IKeybindingService),F(6,i.ITelemetryService)],c),e.WorkbenchToolBar=c;let l=class extends c{constructor(d,n,a,o,g,h,v,m){super(d,{resetMenu:n,...a},o,g,h,v,m);const w=this._store.add(o.createMenu(n,g,{emitEventsForSubmenuChanges:!0})),D=()=>{const y=[],T=[];(0,b.createAndFillInActionBarActions)(w,a?.menuOptions,{primary:y,secondary:T},a?.toolbarOptions?.primaryGroup,a?.toolbarOptions?.primaryMaxCount,a?.toolbarOptions?.shouldInlineSubmenu,a?.toolbarOptions?.useSeparatorsInPrimaryActions),super.setActions(y,T)};this._store.add(w.onDidChange(D)),D()}setActions(){throw new k.BugIndicatingError("This toolbar is populated from a menu.")}};l=we([F(3,S.IMenuService),F(4,C.IContextKeyService),F(5,r.IContextMenuService),F(6,u.IKeybindingService),F(7,i.ITelemetryService)],l),e.MenuWorkbenchToolBar=l}),define(ae[2251],le([1,0,11,6,2,15,31,7,36,23,16,1405]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let r=class{constructor(s,d){this._commandService=s,this._hiddenStates=new u(d)}createMenu(s,d,n){return new f(s,this._hiddenStates,{emitEventsForSubmenuChanges:!1,eventDebounceDelay:50,...n},this._commandService,d)}resetHiddenStates(s){this._hiddenStates.reset(s)}};r=we([F(0,k.ICommandService),F(1,b.IStorageService)],r),e.MenuService=r;let u=class Pn{constructor(s){this._storageService=s,this._disposables=new R.DisposableStore,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1;try{const d=s.get(Pn._key,0,"{}");this._data=JSON.parse(d)}catch{this._data=Object.create(null)}this._disposables.add(s.onDidChangeValue(d=>{if(d.key===Pn._key){if(!this._ignoreChangeEvent)try{const n=s.get(Pn._key,0,"{}");this._data=JSON.parse(n)}catch(n){console.log("FAILED to read storage after UPDATE",n)}this._onDidChange.fire()}}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}isHidden(s,d){return this._data[s.id]?.includes(d)??!1}updateHidden(s,d,n){const a=this._data[s.id];if(n)a?a.indexOf(d)<0&&a.push(d):this._data[s.id]=[d];else if(a){const o=a.indexOf(d);o>=0&&(0,S.removeFastWithoutKeepingOrder)(a,o),a.length===0&&delete this._data[s.id]}this._persist()}reset(s){if(s===void 0)this._data=Object.create(null),this._persist();else{for(const{id:d}of s)this._data[d]&&delete this._data[d];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const s=JSON.stringify(this._data);this._storageService.store(Pn._key,s,0,0)}finally{this._ignoreChangeEvent=!1}}};u._key="menu.hiddenCommands",u=we([F(0,b.IStorageService)],u);let i=class Yi{constructor(s,d,n,a,o){this._id=s,this._hiddenStates=d,this._collectContextKeysForSubmenus=n,this._commandService=a,this._contextKeyService=o,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const s=A.MenuRegistry.getMenuItems(this._id);let d;s.sort(Yi._compareMenuItems);for(const n of s){const a=n.group||"";(!d||d[0]!==a)&&(d=[a,[]],this._menuGroups.push(d)),d[1].push(n),this._collectContextKeys(n)}}_collectContextKeys(s){if(Yi._fillInKbExprKeys(s.when,this._structureContextKeys),(0,A.isIMenuItem)(s)){if(s.command.precondition&&Yi._fillInKbExprKeys(s.command.precondition,this._preconditionContextKeys),s.command.toggled){const d=s.command.toggled.condition||s.command.toggled;Yi._fillInKbExprKeys(d,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&A.MenuRegistry.getMenuItems(s.submenu).forEach(this._collectContextKeys,this)}createActionGroups(s){const d=[];for(const n of this._menuGroups){const[a,o]=n,g=[];for(const h of o)if(this._contextKeyService.contextMatchesRules(h.when)){const v=(0,A.isIMenuItem)(h),m=c(this._id,v?h.command:h,this._hiddenStates);if(v)g.push(new A.MenuItemAction(h.command,h.alt,s,m,this._contextKeyService,this._commandService));else{const w=new Yi(h.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(s),D=I.Separator.join(...w.map(y=>y[1]));D.length>0&&g.push(new A.SubmenuItemAction(h,m,D))}}g.length>0&&d.push([a,g])}return d}static _fillInKbExprKeys(s,d){if(s)for(const n of s.keys())d.add(n)}static _compareMenuItems(s,d){const n=s.group,a=d.group;if(n!==a){if(n){if(!a)return-1}else return 1;if(n==="navigation")return-1;if(a==="navigation")return 1;const h=n.localeCompare(a);if(h!==0)return h}const o=s.order||0,g=d.order||0;return o<g?-1:o>g?1:Yi._compareTitles((0,A.isIMenuItem)(s)?s.command.title:s.title,(0,A.isIMenuItem)(d)?d.command.title:d.title)}static _compareTitles(s,d){const n=typeof s=="string"?s:s.original,a=typeof d=="string"?d:d.original;return n.localeCompare(a)}};i=we([F(3,k.ICommandService),F(4,E.IContextKeyService)],i);let f=class{constructor(s,d,n,a,o){this._disposables=new R.DisposableStore,this._menuInfo=new i(s,d,n.emitEventsForSubmenuChanges,a,o);const g=new t.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},n.eventDebounceDelay);this._disposables.add(g),this._disposables.add(A.MenuRegistry.onDidChangeMenu(w=>{w.has(s)&&g.schedule()}));const h=this._disposables.add(new R.DisposableStore),v=w=>{let D=!1,y=!1,T=!1;for(const _ of w)if(D=D||_.isStructuralChange,y=y||_.isEnablementChange,T=T||_.isToggleChange,D&&y&&T)break;return{menu:this,isStructuralChange:D,isEnablementChange:y,isToggleChange:T}},m=()=>{h.add(o.onDidChangeContext(w=>{const D=w.affectsSome(this._menuInfo.structureContextKeys),y=w.affectsSome(this._menuInfo.preconditionContextKeys),T=w.affectsSome(this._menuInfo.toggledContextKeys);(D||y||T)&&this._onDidChange.fire({menu:this,isStructuralChange:D,isEnablementChange:y,isToggleChange:T})})),h.add(d.onDidChange(w=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new p.DebounceEmitter({onFirstListenerAdd:m,onLastListenerRemove:h.clear.bind(h),delay:n.eventDebounceDelay,merge:v}),this.onDidChange=this._onDidChange.event}getActions(s){return this._menuInfo.createActionGroups(s)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};f=we([F(3,k.ICommandService),F(4,E.IContextKeyService)],f);function c(l,s,d){const n=(0,A.isISubmenuItem)(s)?s.submenu.id:s.id,a=typeof s.title=="string"?s.title:s.title.value,o=(0,I.toAction)({id:`hide/${l.id}/${n}`,label:(0,C.localize)(0,null,a),run(){d.updateHidden(l,n,!0)}}),g=(0,I.toAction)({id:`toggle/${l.id}/${n}`,label:a,get checked(){return!d.isHidden(l,n)},run(){const h=!d.isHidden(l,n);d.updateHidden(l,n,h)}});return{hide:o,toggle:g,get isHidden(){return!g.checked}}}}),define(ae[2252],le([1,0,15,2195,2251,35]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,A.registerSingleton)(t.IMenuService,R.MenuService,1),(0,t.registerAction2)(p.MenuHiddenStatesReset)}),define(ae[2253],le([1,0,10,36,6,2,84,15,7,38,26,27,12,2149,37]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let f=class extends A.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new u.ContextMenuHandler(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService,this.themeService)),this._contextMenuHandler}constructor(s,d,n,a,o,g,h){super(),this.telemetryService=s,this.notificationService=d,this.contextViewService=n,this.keybindingService=a,this.themeService=o,this.menuService=g,this.contextKeyService=h,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new R.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new R.Emitter),this.onDidHideContextMenu=this._onDidHideContextMenu.event}configure(s){this.contextMenuHandler.configure(s)}showContextMenu(s){s=c.transform(s,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu({...s,onHide:d=>{s.onHide?.(d),this._onDidHideContextMenu.fire()}}),t.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};f=we([F(0,C.ITelemetryService),F(1,S.INotificationService),F(2,i.IContextViewService),F(3,b.IKeybindingService),F(4,r.IThemeService),F(5,E.IMenuService),F(6,I.IContextKeyService)],f),e.ContextMenuService=f;var c;(function(l){function s(n){return n&&n.menuId instanceof E.MenuId}function d(n,a,o){if(!s(n))return n;const{menuId:g,menuActionOptions:h,contextKeyService:v}=n;return{...n,getActions:()=>{const m=[];if(g){const w=a.createMenu(g,v??o);(0,k.createAndFillInContextMenuActions)(w,h,m),w.dispose()}return n.getActions?p.Separator.join(n.getActions(),m):m}}}l.transform=d})(c=e.ContextMenuMenuDelegate||(e.ContextMenuMenuDelegate={}))}),define(ae[624],le([1,0,6,2,13,82,100,23]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StorageManager=e.GlobalExtensionEnablementService=void 0;let I=class extends p.Disposable{constructor(C,r){super(),this._onDidChangeEnablement=new t.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this.storageManger=this._register(new b(C)),this._register(this.storageManger.onDidChange(u=>this._onDidChangeEnablement.fire({extensions:u,source:"storage"}))),this._register(r.onDidInstallExtensions(u=>u.forEach(({local:i,operation:f})=>{i&&f===4&&this._removeFromDisabledExtensions(i.identifier)})))}async enableExtension(C,r){return this._removeFromDisabledExtensions(C)?(this._onDidChangeEnablement.fire({extensions:[C],source:r}),!0):!1}async disableExtension(C,r){return this._addToDisabledExtensions(C)?(this._onDidChangeEnablement.fire({extensions:[C],source:r}),!0):!1}getDisabledExtensions(){return this._getExtensions(A.DISABLED_EXTENSIONS_STORAGE_PATH)}async getDisabledExtensionsAsync(){return this.getDisabledExtensions()}_addToDisabledExtensions(C){const r=this.getDisabledExtensions();return r.every(u=>!(0,k.areSameExtensions)(u,C))?(r.push(C),this._setDisabledExtensions(r),!0):!1}_removeFromDisabledExtensions(C){const r=this.getDisabledExtensions();for(let u=0;u<r.length;u++){const i=r[u];if((0,k.areSameExtensions)(i,C))return r.splice(u,1),this._setDisabledExtensions(r),!0}return!1}_setDisabledExtensions(C){this._setExtensions(A.DISABLED_EXTENSIONS_STORAGE_PATH,C)}_getExtensions(C){return this.storageManger.get(C,0)}_setExtensions(C,r){this.storageManger.set(C,r,0)}};I=we([F(0,E.IStorageService),F(1,A.IExtensionManagementService)],I),e.GlobalExtensionEnablementService=I;class b extends p.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(r=>this.onDidStorageChange(r)))}get(C,r){let u;return r===0?((0,R.isUndefinedOrNull)(this.storage[C])&&(this.storage[C]=this._get(C,r)),u=this.storage[C]):u=this._get(C,r),JSON.parse(u)}set(C,r,u){const i=JSON.stringify(r.map(({id:c,uuid:l})=>({id:c,uuid:l})));this._get(C,u)!==i&&(u===0&&(r.length?this.storage[C]=i:delete this.storage[C]),this._set(C,r.length?i:void 0,u))}onDidStorageChange(C){if(C.scope===0&&!(0,R.isUndefinedOrNull)(this.storage[C.key])&&this._get(C.key,C.scope)!==this.storage[C.key]){const u=this.get(C.key,C.scope);delete this.storage[C.key];const i=this.get(C.key,C.scope),f=u.filter(l=>!i.some(s=>(0,k.areSameExtensions)(l,s))),c=i.filter(l=>!u.some(s=>(0,k.areSameExtensions)(s,l)));(f.length||c.length)&&this._onDidChange.fire([...f,...c])}}_get(C,r){return this.storageService.get(C,r,"[]")}_set(C,r,u){r?this.storageService.store(C,r,u,1):this.storageService.remove(C,u)}}e.StorageManager=b}),define(ae[2254],le([1,0,16,32,21,14,209,13,9,8,81,82,100,786,19,25,46,172,2135,23,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionGalleryServiceWithNoStorageService=e.ExtensionGalleryService=e.sortExtensionVersions=void 0;const a=A.isWeb?"web":(0,C.getTargetPlatform)(A.platform,k.arch);var o;(function(j){j[j.None=0]="None",j[j.IncludeVersions=1]="IncludeVersions",j[j.IncludeFiles=2]="IncludeFiles",j[j.IncludeCategoryAndTags=4]="IncludeCategoryAndTags",j[j.IncludeSharedAccounts=8]="IncludeSharedAccounts",j[j.IncludeVersionProperties=16]="IncludeVersionProperties",j[j.ExcludeNonValidated=32]="ExcludeNonValidated",j[j.IncludeInstallationTargets=64]="IncludeInstallationTargets",j[j.IncludeAssetUri=128]="IncludeAssetUri",j[j.IncludeStatistics=256]="IncludeStatistics",j[j.IncludeLatestVersionOnly=512]="IncludeLatestVersionOnly",j[j.Unpublished=4096]="Unpublished",j[j.IncludeNameConflictInfo=32768]="IncludeNameConflictInfo"})(o||(o={}));function g(...j){return String(j.reduce((K,Y)=>K|Y,0))}var h;(function(j){j[j.Tag=1]="Tag",j[j.ExtensionId=4]="ExtensionId",j[j.Category=5]="Category",j[j.ExtensionName=7]="ExtensionName",j[j.Target=8]="Target",j[j.Featured=9]="Featured",j[j.SearchText=10]="SearchText",j[j.ExcludeWithFlags=12]="ExcludeWithFlags"})(h||(h={}));const v={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",Signature:"Microsoft.VisualStudio.Services.VsixSignature"},m={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",SponsorLink:"Microsoft.VisualStudio.Code.SponsorLink"},D={pageNumber:1,pageSize:10,sortBy:0,sortOrder:0,flags:o.None,criteria:[],assetTypes:[]};class y{constructor(K=D){this.state=K}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}get criteria(){return this.state.criteria}withPage(K,Y=this.state.pageSize){return new y({...this.state,pageNumber:K,pageSize:Y})}withFilter(K,...Y){const ee=[...this.state.criteria,...Y.length?Y.map(ie=>({filterType:K,value:ie})):[{filterType:K}]];return new y({...this.state,criteria:ee})}withSortBy(K){return new y({...this.state,sortBy:K})}withSortOrder(K){return new y({...this.state,sortOrder:K})}withFlags(...K){return new y({...this.state,flags:K.reduce((Y,ee)=>Y|ee,0)})}withAssetTypes(...K){return new y({...this.state,assetTypes:K})}withSource(K){return new y({...this.state,source:K})}get raw(){const{criteria:K,pageNumber:Y,pageSize:ee,sortBy:ie,sortOrder:re,flags:oe,assetTypes:se}=this.state;return{filters:[{criteria:K,pageNumber:Y,pageSize:ee,sortBy:ie,sortOrder:re}],assetTypes:se,flags:oe}}get searchText(){const K=this.state.criteria.filter(Y=>Y.filterType===h.SearchText)[0];return K&&K.value?K.value:""}get telemetryData(){return{filterTypes:this.state.criteria.map(K=>String(K.filterType)),flags:this.state.flags,sortBy:String(this.sortBy),sortOrder:String(this.sortOrder),pageNumber:String(this.pageNumber),source:this.state.source,searchTextLength:this.searchText.length}}}function T(j,K){const Y=(j||[]).filter(ee=>ee.statisticName===K)[0];return Y?Y.value:0}function _(j){const K="Microsoft.VisualStudio.Code.Translation.";return j.files.filter(ee=>ee.assetType.indexOf(K)===0).reduce((ee,ie)=>{const re=O(j,ie.assetType);return re&&ee.push([ie.assetType.substring(K.length),re]),ee},[])}function L(j){if(j.properties){const K=j.properties.filter(ie=>ie.key===v.Repository),Y=new RegExp("((git|ssh|http(s)?)|(git@[\\w.]+))(:(//)?)([\\w.@:/\\-~]+)(.git)(/)?"),ee=K.filter(ie=>Y.test(ie.value))[0];return ee?{uri:ee.value,fallbackUri:ee.value}:null}return O(j,v.Repository)}function M(j){return{uri:`${j.fallbackAssetUri}/${v.VSIX}?redirect=true${j.targetPlatform?`&targetPlatform=${j.targetPlatform}`:""}`,fallbackUri:`${j.fallbackAssetUri}/${v.VSIX}${j.targetPlatform?`?targetPlatform=${j.targetPlatform}`:""}`}}function O(j,K){return j.files.filter(ee=>ee.assetType===K)[0]?{uri:`${j.assetUri}/${K}${j.targetPlatform?`?targetPlatform=${j.targetPlatform}`:""}`,fallbackUri:`${j.fallbackAssetUri}/${K}${j.targetPlatform?`?targetPlatform=${j.targetPlatform}`:""}`}:null}function N(j,K){const Y=j.properties?j.properties.filter(ie=>ie.key===K):[],ee=Y.length>0&&Y[0].value;return ee?ee.split(",").map(ie=>(0,r.adoptToGalleryExtensionId)(ie)):[]}function P(j){const K=j.properties?j.properties.filter(Y=>Y.key===m.Engine):[];return K.length>0&&K[0].value||""}function B(j){const K=j.properties?j.properties.filter(Y=>Y.key===m.PreRelease):[];return K.length>0&&K[0].value==="true"}function V(j){const K=j.properties?j.properties.filter(ee=>ee.key===m.LocalizedLanguages):[],Y=K.length>0&&K[0].value||"";return Y?Y.split(","):[]}function z(j){return j.properties?.find(K=>K.key===m.SponsorLink)?.value}function x(j){return j.indexOf("preview")!==-1}function H(j){return j.targetPlatform?(0,C.toTargetPlatform)(j.targetPlatform):"undefined"}function W(j){const K=(0,t.distinct)(j.versions.map(H)),Y=!!j.tags?.includes(C.WEB_EXTENSION_TAG),ee=K.indexOf("web");return Y?ee===-1&&K.push("web"):ee!==-1&&K.splice(ee,1),K}function U(j,K){const Y=(0,C.getFallbackTargetPlarforms)(K);for(let ee=0;ee<j.length;ee++){const ie=j[ee];if(ie.version===j[ee-1]?.version){let re=ee;const oe=H(ie);if(oe===K)for(;re>0&&j[re-1].version===ie.version;)re--;else if(Y.includes(oe))for(;re>0&&j[re-1].version===ie.version&&H(j[re-1])!==K;)re--;re!==ee&&(j.splice(ee,1),j.splice(re,0,ie))}}return j}e.sortExtensionVersions=U;function $(j,K,Y){j.telemetryData={index:K,querySource:Y}}function q(j,K,Y){const ee=j.versions[0],ie={manifest:O(K,v.Manifest),readme:O(K,v.Details),changelog:O(K,v.Changelog),license:O(K,v.License),repository:L(K),download:M(K),icon:O(K,v.Icon),signature:O(K,v.Signature),coreTranslations:_(K)};return{identifier:{id:(0,r.getGalleryExtensionId)(j.publisher.publisherName,j.extensionName),uuid:j.extensionId},name:j.extensionName,version:K.version,displayName:j.displayName,publisherId:j.publisher.publisherId,publisher:j.publisher.publisherName,publisherDisplayName:j.publisher.displayName,publisherDomain:j.publisher.domain?{link:j.publisher.domain,verified:!!j.publisher.isDomainVerified}:void 0,publisherSponsorLink:z(ee),description:j.shortDescription||"",installCount:T(j.statistics,"install"),rating:T(j.statistics,"averagerating"),ratingCount:T(j.statistics,"ratingcount"),categories:j.categories||[],tags:j.tags||[],releaseDate:Date.parse(j.releaseDate),lastUpdated:Date.parse(j.lastUpdated),allTargetPlatforms:Y,assets:ie,properties:{dependencies:N(K,m.Dependency),extensionPack:N(K,m.ExtensionPack),engine:P(K),localizedLanguages:V(K),targetPlatform:H(K),isPreReleaseVersion:B(K)},hasPreReleaseVersion:B(ee),hasReleaseVersion:!0,preview:x(j.flags),isSigned:!!ie.signature}}let X=class{constructor(K,Y,ee,ie,re,oe,se,te){this.requestService=Y,this.logService=ee,this.environmentService=ie,this.telemetryService=re,this.fileService=oe,this.productService=se,this.configurationService=te;const Z=se.extensionsGallery,ne=Z?.servicePPEUrl&&te.getValue("_extensionsGallery.enablePPE");this.extensionsGalleryUrl=ne?Z.servicePPEUrl:Z?.serviceUrl,this.extensionsGallerySearchUrl=ne?void 0:Z?.searchUrl,this.extensionsControlUrl=Z?.controlUrl,this.commonHeadersPromise=(0,s.resolveMarketplaceHeaders)(se.version,se,this.environmentService,this.configurationService,this.fileService,K,this.telemetryService)}api(K=""){return`${this.extensionsGalleryUrl}${K}`}isEnabled(){return!!this.extensionsGalleryUrl}async getExtensions(K,Y,ee){const ie=p.CancellationToken.isCancellationToken(Y)?{}:Y,re=p.CancellationToken.isCancellationToken(Y)?Y:ee,oe=[],se=[],te=[],Z=[];let ne=!0;for(const he of K){he.uuid?se.push(he.uuid):oe.push(he.id);const pe=!!(he.version||he.preRelease);te.push({id:he.id,uuid:he.uuid,includePreRelease:pe}),he.version&&Z.push({id:he.id,uuid:he.uuid,version:he.version}),ne=ne&&!!he.hasPreRelease&&!pe}if(!se.length&&!oe.length)return[];let ce=new y().withPage(1,K.length);se.length&&(ce=ce.withFilter(h.ExtensionId,...se)),oe.length&&(ce=ce.withFilter(h.ExtensionName,...oe)),(ie.queryAllVersions||ne)&&(ce=ce.withFlags(ce.flags,o.IncludeVersions)),ie.source&&(ce=ce.withSource(ie.source));const{extensions:de}=await this.queryGalleryExtensions(ce,{targetPlatform:ie.targetPlatform??a,includePreRelease:te,versions:Z,compatible:!!ie.compatible},re);return ie.source&&de.forEach((he,pe)=>$(he,pe,ie.source)),de}async getCompatibleExtension(K,Y,ee){if((0,C.isNotWebExtensionInWebTargetPlatform)(K.allTargetPlatforms,ee))return null;if(await this.isExtensionCompatible(K,Y,ee))return K;const ie=new y().withFlags(o.IncludeVersions).withPage(1,1).withFilter(h.ExtensionId,K.identifier.uuid),{extensions:re}=await this.queryGalleryExtensions(ie,{targetPlatform:ee,compatible:!0,includePreRelease:Y},p.CancellationToken.None);return re[0]||null}async isExtensionCompatible(K,Y,ee){if(!(0,C.isTargetPlatformCompatible)(K.properties.targetPlatform,K.allTargetPlatforms,ee)||!Y&&K.properties.isPreReleaseVersion)return!1;let ie=K.properties.engine;if(!ie){const re=await this.getManifest(K,p.CancellationToken.None);if(!re)throw new Error("Manifest was not found");ie=re.engines.vscode}return(0,u.isEngineValid)(ie,this.productService.version,this.productService.date)}async isValidVersion(K,Y,ee,ie,re){if(!(0,C.isTargetPlatformCompatible)(H(K),ie,re)||Y!=="any"&&B(K)!==(Y==="prerelease"))return!1;if(ee)try{const oe=await this.getEngine(K);if(!(0,u.isEngineValid)(oe,this.productService.version,this.productService.date))return!1}catch(oe){return this.logService.error(`Error while getting the engine for the version ${K.version}.`,(0,R.getErrorMessage)(oe)),!1}return!0}async query(K,Y){let ee=K.text||"";const ie=K.pageSize??50;let re=new y().withPage(1,ie);ee?(ee=ee.replace(/\bcategory:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(ne,ce,de)=>(re=re.withFilter(h.Category,de||ce),"")),ee=ee.replace(/\btag:("([^"]*)"|([^"]\S*))(\s+|\b|$)/g,(ne,ce,de)=>(re=re.withFilter(h.Tag,de||ce),"")),ee=ee.replace(/\bfeatured(\s+|\b|$)/g,()=>(re=re.withFilter(h.Featured),"")),ee=ee.trim(),ee&&(ee=ee.length<200?ee:ee.substring(0,200),re=re.withFilter(h.SearchText,ee)),re=re.withSortBy(0)):K.ids?re=re.withFilter(h.ExtensionId,...K.ids):K.names?re=re.withFilter(h.ExtensionName,...K.names):re=re.withSortBy(4),typeof K.sortBy=="number"&&(re=re.withSortBy(K.sortBy)),typeof K.sortOrder=="number"&&(re=re.withSortOrder(K.sortOrder)),K.source&&(re=re.withSource(K.source));const oe=async(ne,ce)=>{const{extensions:de,total:he}=await this.queryGalleryExtensions(ne,{targetPlatform:a,compatible:!1,includePreRelease:!!K.includePreRelease},ce);return de.forEach((pe,me)=>$(pe,(ne.pageNumber-1)*ne.pageSize+me,K.source)),{extensions:de,total:he}},{extensions:se,total:te}=await oe(re,Y),Z=async(ne,ce)=>{if(ce.isCancellationRequested)throw new R.CancellationError;const{extensions:de}=await oe(re.withPage(ne+1),ce);return de};return{firstPage:se,total:te,pageSize:re.pageSize,getPage:Z}}async queryGalleryExtensions(K,Y,ee){const ie=K.flags;!!(K.flags&o.IncludeLatestVersionOnly)&&!!(K.flags&o.IncludeVersions)&&(K=K.withFlags(K.flags&~o.IncludeVersions,o.IncludeLatestVersionOnly)),!(K.flags&o.IncludeLatestVersionOnly)&&!(K.flags&o.IncludeVersions)&&(K=K.withFlags(K.flags,o.IncludeLatestVersionOnly)),Y.versions?.length&&(K=K.withFlags(K.flags&~o.IncludeLatestVersionOnly,o.IncludeVersions)),K=K.withFlags(K.flags,o.IncludeAssetUri,o.IncludeCategoryAndTags,o.IncludeFiles,o.IncludeStatistics,o.IncludeVersionProperties);const{galleryExtensions:re,total:oe}=await this.queryRawGalleryExtensions(K,ee);if(!(K.flags&o.IncludeLatestVersionOnly)){const ne=[];for(const ce of re){const de=await this.toGalleryExtensionWithCriteria(ce,Y);de&&ne.push(de)}return{extensions:ne,total:oe}}const te=[],Z=new Map;for(let ne=0;ne<re.length;ne++){const ce=re[ne],de={id:(0,r.getGalleryExtensionId)(ce.publisher.publisherName,ce.extensionName),uuid:ce.extensionId},he=(0,E.isBoolean)(Y.includePreRelease)?Y.includePreRelease:!!Y.includePreRelease.find(me=>(0,r.areSameExtensions)(me,de))?.includePreRelease;if(Y.compatible&&(0,C.isNotWebExtensionInWebTargetPlatform)(W(ce),Y.targetPlatform))continue;const pe=await this.toGalleryExtensionWithCriteria(ce,Y);!pe||pe.properties.isPreReleaseVersion&&(!he||!pe.hasReleaseVersion)||!pe.properties.isPreReleaseVersion&&pe.properties.targetPlatform!==Y.targetPlatform&&pe.hasPreReleaseVersion?Z.set(ce.extensionId,ne):te.push([ne,pe])}if(Z.size){const ne=new Date().getTime(),ce=new y().withFlags(ie&~o.IncludeLatestVersionOnly,o.IncludeVersions).withPage(1,Z.size).withFilter(h.ExtensionId,...Z.keys()),{extensions:de}=await this.queryGalleryExtensions(ce,Y,ee);this.telemetryService.publicLog2("galleryService:additionalQuery",{duration:new Date().getTime()-ne,count:Z.size});for(const he of de){const pe=Z.get(he.identifier.uuid);te.push([pe,he])}}return{extensions:te.sort((ne,ce)=>ne[0]-ce[0]).map(([,ne])=>ne),total:oe}}async toGalleryExtensionWithCriteria(K,Y){const ee={id:(0,r.getGalleryExtensionId)(K.publisher.publisherName,K.extensionName),uuid:K.extensionId},ie=Y.versions?.find(te=>(0,r.areSameExtensions)(te,ee))?.version,re=(0,E.isBoolean)(Y.includePreRelease)?Y.includePreRelease:!!Y.includePreRelease.find(te=>(0,r.areSameExtensions)(te,ee))?.includePreRelease,oe=W(K),se=U(K.versions,Y.targetPlatform);if(Y.compatible&&(0,C.isNotWebExtensionInWebTargetPlatform)(oe,Y.targetPlatform))return null;for(let te=0;te<se.length;te++){const Z=se[te];if(!(ie&&Z.version!==ie)){if(await this.isValidVersion(Z,re?"any":"release",Y.compatible,oe,Y.targetPlatform))return q(K,Z,oe);if(ie&&Z.version===ie)return null}}return ie||Y.compatible?null:q(K,K.versions[0],oe)}async queryRawGalleryExtensions(K,Y){if(!this.isEnabled())throw new Error("No extension gallery service configured.");K=K.withFlags(K.flags,o.ExcludeNonValidated).withFilter(h.Target,"Microsoft.VisualStudio.Code").withFilter(h.ExcludeWithFlags,g(o.Unpublished));const ee=await this.commonHeadersPromise,ie=JSON.stringify(K.raw),re={...ee,"Content-Type":"application/json",Accept:"application/json;api-version=3.0-preview.1","Accept-Encoding":"gzip","Content-Length":String(ie.length)},oe=new Date().getTime();let se,te,Z=0;try{if(se=await this.requestService.request({type:"POST",url:this.extensionsGallerySearchUrl&&K.criteria.some(ce=>ce.filterType===h.SearchText)?this.extensionsGallerySearchUrl:this.api("/extensionquery"),data:ie,headers:re},Y),se.res.statusCode&&se.res.statusCode>=400&&se.res.statusCode<500)return{galleryExtensions:[],total:Z};const ne=await(0,l.asJson)(se);if(ne){const ce=ne.results[0],de=ce.extensions,he=ce.resultMetadata&&ce.resultMetadata.filter(pe=>pe.metadataType==="ResultCount")[0];return Z=he&&he.metadataItems.filter(pe=>pe.name==="TotalCount")[0].count||0,{galleryExtensions:de,total:Z}}return{galleryExtensions:[],total:Z}}catch(ne){throw te=ne,ne}finally{this.telemetryService.publicLog2("galleryService:query",{...K.telemetryData,requestBodySize:String(ie.length),duration:new Date().getTime()-oe,success:!!se&&(0,l.isSuccess)(se),responseBodySize:se?.res.headers["Content-Length"],statusCode:se?String(se.res.statusCode):void 0,errorCode:te?(0,R.isCancellationError)(te)?"canceled":(0,R.getErrorMessage)(te).startsWith("XHR timeout")?"timeout":"failed":void 0,count:String(Z)})}}async reportStatistic(K,Y,ee,ie){if(!this.isEnabled())return;const re=A.isWeb?this.api(`/itemName/${K}.${Y}/version/${ee}/statType/${ie==="install"?"1":"3"}/vscodewebextension`):this.api(`/publishers/${K}/extensions/${Y}/${ee}/stats?statType=${ie}`),oe=A.isWeb?"api-version=6.1-preview.1":"*/*;api-version=4.0-preview.1",te={...await this.commonHeadersPromise,Accept:oe};try{await this.requestService.request({type:"POST",url:re,headers:te},p.CancellationToken.None)}catch{}}async download(K,Y,ee){this.logService.trace("ExtensionGalleryService#download",K.identifier.id);const ie=(0,r.getGalleryExtensionTelemetryData)(K),re=new Date().getTime(),oe=ne=>this.telemetryService.publicLog("galleryService:downloadVSIX",{...ie,duration:ne}),se=ee===2?"install":ee===3?"update":"",te=se?{uri:`${K.assets.download.uri}${I.URI.parse(K.assets.download.uri).query?"&":"?"}${se}=true`,fallbackUri:`${K.assets.download.fallbackUri}${I.URI.parse(K.assets.download.fallbackUri).query?"&":"?"}${se}=true`}:K.assets.download,Z=await this.getAsset(te);await this.fileService.writeFile(Y,Z.stream),oe(new Date().getTime()-re)}async downloadSignatureArchive(K,Y){if(!K.assets.signature)throw new Error("No signature asset found");this.logService.trace("ExtensionGalleryService#downloadSignatureArchive",K.identifier.id);const ee=await this.getAsset(K.assets.signature);await this.fileService.writeFile(Y,ee.stream)}async getReadme(K,Y){if(K.assets.readme){const ee=await this.getAsset(K.assets.readme,{},Y);return await(0,l.asTextOrError)(ee)||""}return""}async getManifest(K,Y){if(K.assets.manifest){const ee=await this.getAsset(K.assets.manifest,{},Y),ie=await(0,l.asTextOrError)(ee);return ie?JSON.parse(ie):null}return null}async getManifestFromRawExtensionVersion(K,Y){const ee=O(K,v.Manifest);if(!ee)throw new Error("Manifest was not found");const ie={"Accept-Encoding":"gzip"},re=await this.getAsset(ee,{headers:ie});return await(0,l.asJson)(re)}async getCoreTranslation(K,Y){const ee=K.assets.coreTranslations.filter(ie=>ie[0]===Y.toUpperCase())[0];if(ee){const ie=await this.getAsset(ee[1]),re=await(0,l.asTextOrError)(ie);return re?JSON.parse(re):null}return null}async getChangelog(K,Y){if(K.assets.changelog){const ee=await this.getAsset(K.assets.changelog,{},Y);return await(0,l.asTextOrError)(ee)||""}return""}async getAllCompatibleVersions(K,Y,ee){let ie=new y().withFlags(o.IncludeVersions,o.IncludeCategoryAndTags,o.IncludeFiles,o.IncludeVersionProperties).withPage(1,1);K.identifier.uuid?ie=ie.withFilter(h.ExtensionId,K.identifier.uuid):ie=ie.withFilter(h.ExtensionName,K.identifier.id);const{galleryExtensions:re}=await this.queryRawGalleryExtensions(ie,p.CancellationToken.None);if(!re.length)return[];const oe=W(re[0]);if((0,C.isNotWebExtensionInWebTargetPlatform)(oe,ee))return[];const se=[];await Promise.all(re[0].versions.map(async ne=>{try{await this.isValidVersion(ne,Y?"any":"release",!0,oe,ee)&&se.push(ne)}catch{}}));const te=[],Z=new Set;for(const ne of U(se,ee))Z.has(ne.version)||(Z.add(ne.version),te.push({version:ne.version,date:ne.lastUpdated,isPreReleaseVersion:B(ne)}));return te}async getAsset(K,Y={},ee=p.CancellationToken.None){const ie=await this.commonHeadersPromise,re={type:"GET"},oe={...ie,...Y.headers||{}};Y={...Y,...re,headers:oe};const se=K.uri,te=K.fallbackUri,Z={...Y,url:se};try{const ne=await this.requestService.request(Z,ee);if(ne.res.statusCode===200)return ne;const ce=await(0,l.asTextOrError)(ne);throw new Error(`Expected 200, got back ${ne.res.statusCode} instead. ${ce}`)}catch(ne){if((0,R.isCancellationError)(ne))throw ne;const ce=(0,R.getErrorMessage)(ne);this.telemetryService.publicLog2("galleryService:cdnFallback",{url:se,message:ce});const de={...Y,url:te};return this.requestService.request(de,ee)}}async getEngine(K){let Y=P(K);if(!Y){const ee=await this.getManifestFromRawExtensionVersion(K,p.CancellationToken.None);if(!ee)throw new Error("Manifest was not found");Y=ee.engines.vscode}return Y}async getExtensionsControlManifest(){if(!this.isEnabled())throw new Error("No extension gallery service configured.");if(!this.extensionsControlUrl)return{malicious:[],deprecated:{}};const K=await this.requestService.request({type:"GET",url:this.extensionsControlUrl},p.CancellationToken.None);if(K.res.statusCode!==200)throw new Error("Could not get extensions report.");const Y=await(0,l.asJson)(K),ee=[],ie={};if(Y){for(const re of Y.malicious)ee.push({id:re});if(Y.migrateToPreRelease)for(const[re,oe]of Object.entries(Y.migrateToPreRelease))(!oe.engine||(0,u.isEngineValid)(oe.engine,this.productService.version,this.productService.date))&&(ie[re.toLowerCase()]={disallowInstall:!0,extension:{id:oe.id,displayName:oe.displayName,autoMigrate:{storage:!!oe.migrateStorage},preRelease:!0}});if(Y.deprecated)for(const[re,oe]of Object.entries(Y.deprecated))oe&&(ie[re.toLowerCase()]=(0,E.isBoolean)(oe)?{}:oe)}return{malicious:ee,deprecated:ie}}};X=we([F(1,l.IRequestService),F(2,f.ILogService),F(3,S.IEnvironmentService),F(4,n.ITelemetryService),F(5,i.IFileService),F(6,c.IProductService),F(7,b.IConfigurationService)],X);let G=class extends X{constructor(K,Y,ee,ie,re,oe,se,te){super(K,Y,ee,ie,re,oe,se,te)}};G=we([F(0,d.IStorageService),F(1,l.IRequestService),F(2,f.ILogService),F(3,S.IEnvironmentService),F(4,n.ITelemetryService),F(5,i.IFileService),F(6,c.IProductService),F(7,b.IConfigurationService)],G),e.ExtensionGalleryService=G;let Q=class extends X{constructor(K,Y,ee,ie,re,oe,se){super(void 0,K,Y,ee,ie,re,oe,se)}};Q=we([F(0,l.IRequestService),F(1,f.ILogService),F(2,S.IEnvironmentService),F(3,n.ITelemetryService),F(4,i.IFileService),F(5,c.IProductService),F(6,b.IConfigurationService)],Q),e.ExtensionGalleryServiceWithNoStorageService=Q}),define(ae[335],le([1,0,5,6,2,23,100,46,16,25,13]),function(J,e,t,p,R,A,k,E,I,b,S){"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 r=class xi extends R.Disposable{static toKey(i){return`extensionKeys/${(0,k.adoptToGalleryExtensionId)(i.id)}@${i.version}`}static fromKey(i){const f=C.exec(i);if(f&&f[1])return{id:f[1],version:f[2]}}static async removeOutdatedExtensionVersions(i,f){const c=await i.getInstalled(),l=[];for(const[s,d]of xi.readAllExtensionsWithKeysForSync(f)){const n=c.find(a=>(0,k.areSameExtensions)(a.identifier,{id:s}))?.manifest.version;for(const a of d)n!==a&&l.push(xi.toKey({id:s,version:a}))}for(const s of l)f.remove(s,0)}static readAllExtensionsWithKeysForSync(i){const f=new Map,c=i.keys(0,1);for(const l of c){const s=xi.fromKey(l);if(s){let d=f.get(s.id.toLowerCase());d||f.set(s.id.toLowerCase(),d=[]),d.push(s.version)}}return f}constructor(i,f,c){super(),this.storageService=i,this.productService=f,this.logService=c,this._onDidChangeExtensionStorageToSync=this._register(new p.Emitter),this.onDidChangeExtensionStorageToSync=this._onDidChangeExtensionStorageToSync.event,this.extensionsWithKeysForSync=xi.readAllExtensionsWithKeysForSync(i),this._register(this.storageService.onDidChangeValue(l=>this.onDidChangeStorageValue(l)))}onDidChangeStorageValue(i){if(i.scope!==0)return;if(this.extensionsWithKeysForSync.has(i.key.toLowerCase())){this._onDidChangeExtensionStorageToSync.fire();return}const f=xi.fromKey(i.key);if(f){if(this.storageService.get(i.key,0)===void 0)this.extensionsWithKeysForSync.delete(f.id.toLowerCase());else{let c=this.extensionsWithKeysForSync.get(f.id.toLowerCase());c||this.extensionsWithKeysForSync.set(f.id.toLowerCase(),c=[]),c.push(f.version),this._onDidChangeExtensionStorageToSync.fire()}return}}getExtensionId(i){if((0,S.isString)(i))return i;const f=i.manifest?i.manifest.publisher:i.publisher,c=i.manifest?i.manifest.name:i.name;return(0,k.getExtensionId)(f,c)}getExtensionState(i,f){const c=this.getExtensionId(i),l=this.storageService.get(c,f?0:1);if(l)try{return JSON.parse(l)}catch(s){this.logService.error(`[mainThreadStorage] unexpected error parsing storage contents (extensionId: ${c}, global: ${f}): ${s}`)}}setExtensionState(i,f,c){const l=this.getExtensionId(i);f===void 0?this.storageService.remove(l,c?0:1):this.storageService.store(l,JSON.stringify(f),c?0:1,1)}setKeysForSync(i,f){this.storageService.store(xi.toKey(i),JSON.stringify(f),0,1)}getKeysForSync(i){const f=this.productService.extensionSyncedKeys?.[i.id.toLowerCase()],c=this.storageService.get(xi.toKey(i),0),l=c?JSON.parse(c):void 0;return l&&f?(0,I.distinct)([...l,...f]):l||f}addToMigrationList(i,f){if(i!==f){const c=this.migrationList.filter(l=>!l.includes(i)&&!l.includes(f));c.push([i,f]),this.migrationList=c}}getSourceExtensionToMigrate(i){const f=this.migrationList.find(([,c])=>i===c);return f?f[0]:void 0}get migrationList(){const i=this.storageService.get("extensionStorage.migrationList",-1,"[]");try{const f=JSON.parse(i);if(Array.isArray(f))return f}catch{}return[]}set migrationList(i){i.length?this.storageService.store("extensionStorage.migrationList",JSON.stringify(i),-1,1):this.storageService.remove("extensionStorage.migrationList",-1)}};r=we([F(0,A.IStorageService),F(1,E.IProductService),F(2,b.ILogService)],r),e.ExtensionStorageService=r}),define(ae[2255],le([1,0,35,19,46,172,23,81,8,32,308]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionResourceLoaderService=void 0;let C=class extends S.AbstractExtensionResourceLoaderService{constructor(u,i,f,c,l,s){super(u,i,f,c,l),this._requestService=s}async readExtensionResource(u){if(this.isExtensionGalleryResource(u)){const f=await this.getExtensionGalleryRequestHeaders(),c=await this._requestService.request({url:u.toString(),headers:f},b.CancellationToken.None);return await(0,A.asTextOrError)(c)||""}return(await this._fileService.readFile(u)).value.toString()}};C=we([F(0,p.IFileService),F(1,k.IStorageService),F(2,R.IProductService),F(3,E.IEnvironmentService),F(4,I.IConfigurationService),F(5,A.IRequestService)],C),e.ExtensionResourceLoaderService=C,(0,t.registerSingleton)(S.IExtensionResourceLoaderService,C,1)}),define(ae[839],le([1,0,117,21,96,2,60,68,13,1426,31,8,47,5,38,252,23,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let s=class cr extends f.PickerQuickAccessProvider{constructor(a,o,g,h,v,m){super(cr.PREFIX,a),this.instantiationService=o,this.keybindingService=g,this.commandService=h,this.telemetryService=v,this.dialogService=m,this.commandsHistory=this._register(this.instantiationService.createInstance(d)),this.options=a}async _getPicks(a,o,g){const h=await this.getCommandPicks(g);if(g.isCancellationRequested)return[];const v=[];for(const y of h){const T=(0,I.withNullAsUndefined)(cr.WORD_FILTER(a,y.label)),_=y.commandAlias?(0,I.withNullAsUndefined)(cr.WORD_FILTER(a,y.commandAlias)):void 0;T||_?(y.highlights={label:T,detail:this.options.showAlias?_:void 0},v.push(y)):a===y.commandId&&v.push(y)}const m=new Map;for(const y of v){const T=m.get(y.label);T?(y.description=y.commandId,T.description=T.commandId):m.set(y.label,y)}v.sort((y,T)=>{const _=this.commandsHistory.peek(y.commandId),L=this.commandsHistory.peek(T.commandId);return _&&L?_>L?-1:1:_?-1:L?1:y.label.localeCompare(T.label)});const w=[];let D=!1;for(let y=0;y<v.length;y++){const T=v[y],_=this.keybindingService.lookupKeybinding(T.commandId),L=_?(0,b.localize)(0,null,T.label,_.getAriaLabel()):T.label;y===0&&this.commandsHistory.peek(T.commandId)&&(w.push({type:"separator",label:(0,b.localize)(1,null)}),D=!0),y!==0&&D&&!this.commandsHistory.peek(T.commandId)&&(w.push({type:"separator",label:(0,b.localize)(2,null)}),D=!1),w.push({...T,ariaLabel:L,detail:this.options.showAlias&&T.commandAlias!==T.label?T.commandAlias:void 0,keybinding:_,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(M){(0,p.isCancellationError)(M)||this.dialogService.show(E.default.Error,(0,b.localize)(3,null,T.label,(0,t.toErrorMessage)(M)))}}})}return w}};s.PREFIX=">",s.WORD_FILTER=(0,R.or)(R.matchesPrefix,R.matchesWords,R.matchesContiguousSubString),s=we([F(1,u.IInstantiationService),F(2,i.IKeybindingService),F(3,S.ICommandService),F(4,l.ITelemetryService),F(5,r.IDialogService)],s),e.AbstractCommandsQuickAccessProvider=s;let d=class Jt extends A.Disposable{constructor(a,o){super(),this.storageService=a,this.configurationService=o,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Jt.getConfiguredCommandHistoryLength(this.configurationService),Jt.cache&&Jt.cache.limit!==this.configuredCommandsHistoryLength&&(Jt.cache.limit=this.configuredCommandsHistoryLength,Jt.saveState(this.storageService))}load(){const a=this.storageService.get(Jt.PREF_KEY_CACHE,0);let o;if(a)try{o=JSON.parse(a)}catch{}const g=Jt.cache=new k.LRUCache(this.configuredCommandsHistoryLength,1);if(o){let h;o.usesLRU?h=o.entries:h=o.entries.sort((v,m)=>v.value-m.value),h.forEach(v=>g.set(v.key,v.value))}Jt.counter=this.storageService.getNumber(Jt.PREF_KEY_COUNTER,0,Jt.counter)}push(a){!Jt.cache||(Jt.cache.set(a,Jt.counter++),Jt.saveState(this.storageService))}peek(a){return Jt.cache?.peek(a)}static saveState(a){if(!Jt.cache)return;const o={usesLRU:!0,entries:[]};Jt.cache.forEach((g,h)=>o.entries.push({key:h,value:g})),a.store(Jt.PREF_KEY_CACHE,JSON.stringify(o),0,0),a.store(Jt.PREF_KEY_COUNTER,Jt.counter,0,0)}static getConfiguredCommandHistoryLength(a){const g=a.getValue().workbench?.commandPalette?.history;return typeof g=="number"?g:Jt.DEFAULT_COMMANDS_HISTORY_LENGTH}static clearHistory(a,o){const g=Jt.getConfiguredCommandHistoryLength(a);Jt.cache=new k.LRUCache(g),Jt.counter=1,Jt.saveState(o)}};d.DEFAULT_COMMANDS_HISTORY_LENGTH=50,d.PREF_KEY_CACHE="commandPalette.mru.cache",d.PREF_KEY_COUNTER="commandPalette.mru.counter",d.counter=1,d=we([F(0,c.IStorageService),F(1,C.IConfigurationService)],d),e.CommandsHistory=d}),define(ae[2256],le([1,0,210,839]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class R extends p.AbstractCommandsQuickAccessProvider{constructor(k,E,I,b,S,C){super(k,E,I,b,S,C)}getCodeEditorCommandPicks(){const k=this.activeTextEditorControl;if(!k)return[];const E=[];for(const I of k.getSupportedActions())E.push({commandId:I.id,commandAlias:I.alias,label:(0,t.stripIcons)(I.label)||I.id});return E}}e.AbstractEditorCommandsQuickAccessProvider=R}),define(ae[2257],le([1,0,11,2,18,583,23,2129,103]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeStorageService=void 0;class b extends k.AbstractStorageService{constructor(C,r,u,i){super(),this.initialWorkspace=C,this.initialProfiles=r,this.mainProcessService=u,this.environmentService=i,this.applicationStorageProfile=this.initialProfiles.defaultProfile,this.applicationStorage=this.createApplicationStorage(),this.profileStorageProfile=this.initialProfiles.currentProfile,this.profileStorageDisposables=this._register(new p.DisposableStore),this.profileStorage=this.createProfileStorage(this.profileStorageProfile),this.workspaceStorageId=this.initialWorkspace?.id,this.workspaceStorageDisposables=this._register(new p.DisposableStore),this.workspaceStorage=this.createWorkspaceStorage(this.initialWorkspace)}createApplicationStorage(){const C=this._register(new E.ApplicationStorageDatabaseClient(this.mainProcessService.getChannel("storage"))),r=this._register(new A.Storage(C));return this._register(r.onDidChangeStorage(u=>this.emitDidChangeValue(-1,u))),r}createProfileStorage(C){this.profileStorageDisposables.clear(),this.profileStorageProfile=C;let r;if((0,k.isProfileUsingDefaultStorage)(C))r=this.applicationStorage;else{const u=this.profileStorageDisposables.add(new E.ProfileStorageDatabaseClient(this.mainProcessService.getChannel("storage"),C));r=this.profileStorageDisposables.add(new A.Storage(u))}return this.profileStorageDisposables.add(r.onDidChangeStorage(u=>this.emitDidChangeValue(0,u))),r}createWorkspaceStorage(C){this.workspaceStorageDisposables.clear(),this.workspaceStorageId=C?.id;let r;if(C){const u=this.workspaceStorageDisposables.add(new E.WorkspaceStorageDatabaseClient(this.mainProcessService.getChannel("storage"),C));r=this.workspaceStorageDisposables.add(new A.Storage(u)),this.workspaceStorageDisposables.add(r.onDidChangeStorage(i=>this.emitDidChangeValue(1,i)))}return r}async doInitialize(){await t.Promises.settled([this.applicationStorage.init(),this.profileStorage.init(),this.workspaceStorage?.init()??Promise.resolve()])}getStorage(C){switch(C){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}getLogDetails(C){switch(C){case-1:return this.applicationStorageProfile.globalStorageHome.fsPath;case 0:return this.profileStorageProfile?.globalStorageHome.fsPath;default:return this.workspaceStorageId?`${(0,R.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.applicationStorage.close(),this.profileStorage.close(),this.workspaceStorage?.close()??Promise.resolve()])}async switchToProfile(C,r){if(!this.canSwitchProfile(this.profileStorageProfile,C))return;const u=this.profileStorage,i=u.items;u!==this.applicationStorage&&await u.close(),this.profileStorage=this.createProfileStorage(C),await this.profileStorage.init(),this.switchData(i,this.profileStorage,0,r)}async switchToWorkspace(C,r){const u=this.workspaceStorage,i=u?.items??new Map;await u?.close(),this.workspaceStorage=this.createWorkspaceStorage(C),await this.workspaceStorage.init(),this.switchData(i,this.workspaceStorage,1,r)}hasScope(C){return(0,I.isUserDataProfile)(C)?this.profileStorageProfile.id===C.id:this.workspaceStorageId===C.id}}e.NativeStorageService=b}),define(ae[2258],le([1,0,6,2,18,81,102,103]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesNativeService=void 0;let I=class extends p.Disposable{get defaultProfile(){return this.profiles[0]}get profiles(){return this._profiles}constructor(S,C,r){super(),this._profiles=[],this._onDidChangeProfiles=this._register(new t.Emitter),this.onDidChangeProfiles=this._onDidChangeProfiles.event,this.enabled=!0,this.channel=C.getChannel("userDataProfiles"),this.profilesHome=(0,R.joinPath)(r.userRoamingDataHome,"profiles"),this._profiles=S.map(u=>(0,E.reviveProfile)(u,this.profilesHome.scheme)),this._register(this.channel.listen("onDidChangeProfiles")(u=>{const i=u.added.map(l=>(0,E.reviveProfile)(l,this.profilesHome.scheme)),f=u.removed.map(l=>(0,E.reviveProfile)(l,this.profilesHome.scheme)),c=u.updated.map(l=>(0,E.reviveProfile)(l,this.profilesHome.scheme));this._profiles=u.all.map(l=>(0,E.reviveProfile)(l,this.profilesHome.scheme)),this._onDidChangeProfiles.fire({added:i,removed:f,updated:c,all:this.profiles})})),this.onDidResetWorkspaces=this.channel.listen("onDidResetWorkspaces")}setEnablement(S){this.enabled=S}isEnabled(){return this.enabled}async createNamedProfile(S,C,r){const u=await this.channel.call("createNamedProfile",[S,C,r]);return(0,E.reviveProfile)(u,this.profilesHome.scheme)}async createProfile(S,C,r,u){const i=await this.channel.call("createProfile",[S,C,r,u]);return(0,E.reviveProfile)(i,this.profilesHome.scheme)}async createTransientProfile(S){const C=await this.channel.call("createTransientProfile",[S]);return(0,E.reviveProfile)(C,this.profilesHome.scheme)}async setProfileForWorkspace(S,C){await this.channel.call("setProfileForWorkspace",[S,C])}removeProfile(S){return this.channel.call("removeProfile",[S])}async updateProfile(S,C){const r=await this.channel.call("updateProfile",[S,C]);return(0,E.reviveProfile)(r,this.profilesHome.scheme)}resetWorkspaces(){return this.channel.call("resetWorkspaces")}cleanUp(){return this.channel.call("cleanUp")}cleanUpTransientProfiles(){return this.channel.call("cleanUpTransientProfiles")}};I=we([F(1,k.IMainProcessService),F(2,A.IEnvironmentService)],I),e.UserDataProfilesNativeService=I}),define(ae[378],le([1,0,16,11,56,32,6,123,2,28,13,1439,8,81,19,25,371,23,27,57,95,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractInitializer=e.AbstractJsonFileSynchroniser=e.AbstractFileSynchroniser=e.AbstractSynchroniser=e.getSyncResourceLogLabel=e.isSyncData=void 0;function o(D){return!!(D&&D.version!==void 0&&typeof D.version=="number"&&D.content!==void 0&&typeof D.content=="string"&&(Object.keys(D).length===2||Object.keys(D).length===3&&D.machineId!==void 0&&typeof D.machineId=="string"))}e.isSyncData=o;function g(D,y){return`${(0,b.uppercaseFirstLetter)(D)}${y.isDefault?"":` (${y.name})`}`}e.getSyncResourceLogLabel=g;let h=class extends I.Disposable{get status(){return this._status}get conflicts(){return{...this.syncResource,conflicts:this._conflicts}}constructor(y,T,_,L,M,O,N,P,B,V,z,x){super(),this.syncResource=y,this.collection=T,this.fileService=_,this.environmentService=L,this.userDataSyncStoreService=O,this.userDataSyncBackupStoreService=N,this.userDataSyncEnablementService=P,this.telemetryService=B,this.logService=V,this.configurationService=z,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 p.ThrottledDelayer(50),this._onDidChangeLocal=this._register(new k.Emitter),this.onDidChangeLocal=this._onDidChangeLocal.event,this.hasSyncResourceStateVersionChanged=!1,this.syncHeaders={},this.resource=this.syncResource.syncResource,this.syncResourceLogLabel=g(y.syncResource,y.profile),this.extUri=x.extUri,this.syncFolder=this.extUri.joinPath(L.userDataSyncHome,...(0,n.getPathSegments)(y.profile.isDefault?void 0:y.profile.id,y.syncResource)),this.syncPreviewFolder=this.extUri.joinPath(this.syncFolder,n.PREVIEW_DIR_NAME),this.lastSyncResource=(0,n.getLastSyncResourceUri)(y.profile.isDefault?void 0:y.profile.id,y.syncResource,L,this.extUri),this.currentMachineIdPromise=(0,c.getServiceMachineId)(L,_,M)}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 y=await this.syncPreviewPromise;this.syncPreviewPromise=null;const T=await this.performSync(y.remoteUserData,y.lastSyncUserData,!0,this.getUserDataSyncConfiguration());this.setStatus(T)}else{this.logService.trace(`${this.syncResourceLogLabel}: Checking for local changes...`);const y=await this.getLastSyncUserData();(y?await this.hasRemoteChanged(y):!0)&&this._onDidChangeLocal.fire()}}setStatus(y){this._status!==y&&(this._status=y,this._onDidChangStatus.fire(y))}async sync(y,T={}){await this._sync(y,!0,this.getUserDataSyncConfiguration(),T)}async preview(y,T,_={}){return this._sync(y,!1,T,_)}async apply(y,T={}){try{this.syncHeaders={...T};const _=await this.doApply(y);return this.setStatus(_),this.syncPreviewPromise}finally{this.syncHeaders={}}}async _sync(y,T,_,L){try{if(this.syncHeaders={...L},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 M="idle";try{const O=await this.getLastSyncUserData(),N=await this.getLatestRemoteUserData(y,O);return M=await this.performSync(N,O,T,_),M==="hasConflicts"?this.logService.info(`${this.syncResourceLogLabel}: Detected conflicts while synchronizing ${this.resource.toLowerCase()}.`):M==="idle"&&this.logService.trace(`${this.syncResourceLogLabel}: Finished synchronizing ${this.resource.toLowerCase()}.`),this.syncPreviewPromise||null}finally{this.setStatus(M)}}finally{this.syncHeaders={}}}async replace(y){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 _=await this.getLastSyncUserData(),L=await this.getLatestRemoteUserData(null,_),M=await this.isRemoteDataFromCurrentMachine(L),O=await this.generateSyncPreview({ref:L.ref,syncData:T},_,M,this.getUserDataSyncConfiguration(),A.CancellationToken.None),N=[];for(const P of O){const B=await this.getAcceptResult(P,P.remoteResource,void 0,A.CancellationToken.None),{remoteChange:V}=await this.getAcceptResult(P,P.previewResource,P.remoteContent,A.CancellationToken.None);N.push([P,{...B,remoteChange:V!==0?V:2}])}await this.applyResult(L,_,N,!1),this.logService.info(`${this.syncResourceLogLabel}: Finished resetting ${this.resource.toLowerCase()}.`)}finally{this.setStatus("idle")}return!0}async isRemoteDataFromCurrentMachine(y){const T=await this.currentMachineIdPromise;return!!y.syncData?.machineId&&y.syncData.machineId===T}async getLatestRemoteUserData(y,T){if(T){const _=y?y[this.resource]:void 0;if(T.ref===_||_===void 0&&T.syncData===null)return T}return this.getRemoteUserData(T)}async performSync(y,T,_,L){if(y.syncData&&y.syncData.version>this.version)throw this.telemetryService.publicLog2("sync/incompatible",{source:this.resource}),new n.UserDataSyncError((0,C.localize)(0,null,this.resource,this.version,y.syncData.version),"IncompatibleLocalContent",this.resource);try{return await this.doSync(y,T,_,L)}catch(M){if(M instanceof n.UserDataSyncError)switch(M.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(y,T,_,L);case"Conflict":case"PreconditionFailed":return this.logService.info(`${this.syncResourceLogLabel}: Failed to synchronize as there is a new remote version available. Synchronizing again...`),y=await this.getRemoteUserData(null),T=await this.getLastSyncUserData(),this.performSync(y,T,_,L)}throw M}}async doSync(y,T,_,L){try{this.syncPreviewPromise||(this.syncPreviewPromise=(0,p.createCancelablePromise)(O=>this.doGenerateSyncResourcePreview(y,T,_,L,O)));const M=await this.syncPreviewPromise;return this.updateConflicts(M.resourcePreviews),M.resourcePreviews.some(({mergeState:O})=>O==="conflict")?"hasConflicts":_?await this.doApply(!1):"syncing"}catch(M){throw this.syncPreviewPromise=null,M}}async merge(y){return await this.updateSyncResourcePreview(y,async T=>{const _=await this.getMergeResult(T,A.CancellationToken.None);await this.fileService.writeFile(T.previewResource,R.VSBuffer.fromString(_?.content||""));const L=_&&!_.hasConflicts?await this.getAcceptResult(T,T.previewResource,void 0,A.CancellationToken.None):void 0;return T.acceptResult=L,T.mergeState=_.hasConflicts?"conflict":L?"accepted":"preview",T.localChange=L?L.localChange:_.localChange,T.remoteChange=L?L.remoteChange:_.remoteChange,T}),this.syncPreviewPromise}async accept(y,T){return await this.updateSyncResourcePreview(y,async _=>{const L=await this.getAcceptResult(_,y,T,A.CancellationToken.None);return _.acceptResult=L,_.mergeState="accepted",_.localChange=L.localChange,_.remoteChange=L.remoteChange,_}),this.syncPreviewPromise}async discard(y){return await this.updateSyncResourcePreview(y,async T=>{const _=await this.getMergeResult(T,A.CancellationToken.None);return await this.fileService.writeFile(T.previewResource,R.VSBuffer.fromString(_.content||"")),T.acceptResult=void 0,T.mergeState="preview",T.localChange=_.localChange,T.remoteChange=_.remoteChange,T}),this.syncPreviewPromise}async updateSyncResourcePreview(y,T){if(!this.syncPreviewPromise)return;let _=await this.syncPreviewPromise;const L=_.resourcePreviews.findIndex(({localResource:M,remoteResource:O,previewResource:N})=>this.extUri.isEqual(M,y)||this.extUri.isEqual(O,y)||this.extUri.isEqual(N,y));L!==-1&&(this.syncPreviewPromise=(0,p.createCancelablePromise)(async M=>{const O=[..._.resourcePreviews];return O[L]=await T(O[L]),{..._,resourcePreviews:O}}),_=await this.syncPreviewPromise,this.updateConflicts(_.resourcePreviews),_.resourcePreviews.some(({mergeState:M})=>M==="conflict")?this.setStatus("hasConflicts"):this.setStatus("syncing"))}async doApply(y){if(!this.syncPreviewPromise)return"idle";const T=await this.syncPreviewPromise;return T.resourcePreviews.some(({mergeState:_})=>_==="conflict")?"hasConflicts":T.resourcePreviews.some(({mergeState:_})=>_!=="accepted")?"syncing":(await this.applyResult(T.remoteUserData,T.lastSyncUserData,T.resourcePreviews.map(_=>[_,_.acceptResult]),y),this.syncPreviewPromise=null,await this.clearPreviewFolder(),"idle")}async clearPreviewFolder(){try{await this.fileService.del(this.syncPreviewFolder,{recursive:!0})}catch{}}updateConflicts(y){const T=y.filter(({mergeState:_})=>_==="conflict");(0,t.equals)(this._conflicts,T,(_,L)=>this.extUri.isEqual(_.previewResource,L.previewResource))||(this._conflicts=T,this._onDidChangeConflicts.fire(this.conflicts))}async hasPreviouslySynced(){const y=await this.getLastSyncUserData();return!!y&&y.syncData!==null}async resolvePreviewContent(y){const T=this.syncPreviewPromise?await this.syncPreviewPromise:null;if(T)for(const _ of T.resourcePreviews){if(this.extUri.isEqual(_.acceptedResource,y))return _.acceptResult?_.acceptResult.content:null;if(this.extUri.isEqual(_.remoteResource,y))return _.remoteContent;if(this.extUri.isEqual(_.localResource,y))return _.localContent;if(this.extUri.isEqual(_.baseResource,y))return _.baseContent}return null}async resetLocal(){try{await this.fileService.del(this.lastSyncResource)}catch{}}async doGenerateSyncResourcePreview(y,T,_,L,M){const O=await this.isRemoteDataFromCurrentMachine(y),N=await this.generateSyncPreview(y,T,O,L,M),P=[];for(const B of N){const V=B.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"accepted"});if(B.localChange===0&&B.remoteChange===0)P.push({...B,acceptedResource:V,acceptResult:{content:null,localChange:0,remoteChange:0},mergeState:"accepted"});else{const z=_?await this.getMergeResult(B,M):void 0;if(M.isCancellationRequested)break;await this.fileService.writeFile(B.previewResource,R.VSBuffer.fromString(z?.content||""));const x=z&&!z.hasConflicts?await this.getAcceptResult(B,B.previewResource,void 0,M):void 0;P.push({...B,acceptResult:x,mergeState:z?.hasConflicts?"conflict":x?"accepted":"preview",localChange:x?x.localChange:z?z.localChange:B.localChange,remoteChange:x?x.remoteChange:z?z.remoteChange:B.remoteChange})}}return{syncResource:this.resource,profile:this.syncResource.profile,remoteUserData:y,lastSyncUserData:T,resourcePreviews:P,isLastSyncFromCurrentMachine:O}}async getLastSyncUserData(){try{const y=await this.fileService.readFile(this.lastSyncResource),T=JSON.parse(y.value.toString()),_=this.userDataSyncEnablementService.getResourceSyncStateVersion(this.resource);if(this.hasSyncResourceStateVersionChanged=T.version&&_&&T.version!==_,this.hasSyncResourceStateVersionChanged)return this.logService.info(`${this.syncResourceLogLabel}: Reset last sync state because last sync state version ${T.version} is not compatible with current sync state version ${_}.`),await this.resetLocal(),null;const L=T;if(L.content===null)return{ref:T.ref,syncData:null};const M=JSON.parse(L.content);if(o(M))return{...T,syncData:M,content:void 0}}catch(y){y instanceof i.FileOperationError&&y.fileOperationResult===1?this.logService.info(`${this.syncResourceLogLabel}: Not synced yet. Last sync resource does not exist.`):this.logService.error(y)}return null}async updateLastSyncUserData(y,T={}){if(T.ref||T.content||T.version)throw new Error("Cannot have core properties as additional");const _=this.userDataSyncEnablementService.getResourceSyncStateVersion(this.resource),L={ref:y.ref,content:y.syncData?JSON.stringify(y.syncData):null,version:_,...T};await this.fileService.writeFile(this.lastSyncResource,R.VSBuffer.fromString(JSON.stringify(L)))}async getRemoteUserData(y){const{ref:T,content:_}=await this.getUserData(y);let L=null;return _!==null&&(L=this.parseSyncData(_)),{ref:T,syncData:L}}parseSyncData(y){try{const T=JSON.parse(y);if(o(T))return T}catch(T){this.logService.error(T)}throw new n.UserDataSyncError((0,C.localize)(1,null),"IncompatibleRemoteContent",this.resource)}async getUserData(y){const T=y?{ref:y.ref,content:y.syncData?JSON.stringify(y.syncData):null}:null;return this.userDataSyncStoreService.readResource(this.resource,T,this.collection,this.syncHeaders)}async updateRemoteUserData(y,T){const _=await this.currentMachineIdPromise,L={version:this.version,machineId:_,content:y};try{return T=await this.userDataSyncStoreService.writeResource(this.resource,JSON.stringify(L),T,this.collection,this.syncHeaders),{ref:T,syncData:L}}catch(M){throw M instanceof n.UserDataSyncError&&M.code==="TooLarge"&&(M=new n.UserDataSyncError(M.message,M.code,this.resource)),M}}async backupLocal(y){const T={version:this.version,content:y};return this.userDataSyncBackupStoreService.backup(this.syncResource.profile,this.resource,JSON.stringify(T))}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(n.USER_DATA_SYNC_CONFIGURATION_SCOPE)}};h=we([F(2,i.IFileService),F(3,u.IEnvironmentService),F(4,l.IStorageService),F(5,n.IUserDataSyncStoreService),F(6,n.IUserDataSyncBackupStoreService),F(7,n.IUserDataSyncEnablementService),F(8,s.ITelemetryService),F(9,n.IUserDataSyncLogService),F(10,r.IConfigurationService),F(11,d.IUriIdentityService)],h),e.AbstractSynchroniser=h;let v=class extends h{constructor(y,T,_,L,M,O,N,P,B,V,z,x,H){super(T,_,L,M,O,N,P,B,V,z,x,H),this.file=y,this._register(this.fileService.watch(this.extUri.dirname(y))),this._register(this.fileService.onDidFilesChange(W=>this.onFileChanges(W)))}async getLocalFileContent(){try{return await this.fileService.readFile(this.file)}catch{return null}}async updateLocalFileContent(y,T,_){try{T?await this.fileService.writeFile(this.file,R.VSBuffer.fromString(y),_?void 0:T):await this.fileService.createFile(this.file,R.VSBuffer.fromString(y),{overwrite:_})}catch(L){throw L instanceof i.FileOperationError&&L.fileOperationResult===1||L instanceof i.FileOperationError&&L.fileOperationResult===3?new n.UserDataSyncError(L.message,"LocalPreconditionFailed"):L}}async deleteLocalFile(){try{await this.fileService.del(this.file)}catch(y){if(!(y instanceof i.FileOperationError&&y.fileOperationResult===1))throw y}}onFileChanges(y){!y.contains(this.file)||this.triggerLocalChange()}};v=we([F(3,i.IFileService),F(4,u.IEnvironmentService),F(5,l.IStorageService),F(6,n.IUserDataSyncStoreService),F(7,n.IUserDataSyncBackupStoreService),F(8,n.IUserDataSyncEnablementService),F(9,s.ITelemetryService),F(10,n.IUserDataSyncLogService),F(11,r.IConfigurationService),F(12,d.IUriIdentityService)],v),e.AbstractFileSynchroniser=v;let m=class extends v{constructor(y,T,_,L,M,O,N,P,B,V,z,x,H,W){super(y,T,_,L,M,O,N,P,B,V,z,H,W),this.userDataSyncUtilService=x,this._formattingOptions=void 0}hasErrors(y,T){const _=[],L=(0,E.parse)(y,_,{allowEmptyContent:!0,allowTrailingComma:!0});return _.length>0||!(0,S.isUndefined)(L)&&T!==Array.isArray(L)}getFormattingOptions(){return this._formattingOptions||(this._formattingOptions=this.userDataSyncUtilService.resolveFormattingOptions(this.file)),this._formattingOptions}};m=we([F(3,i.IFileService),F(4,u.IEnvironmentService),F(5,l.IStorageService),F(6,n.IUserDataSyncStoreService),F(7,n.IUserDataSyncBackupStoreService),F(8,n.IUserDataSyncEnablementService),F(9,s.ITelemetryService),F(10,n.IUserDataSyncLogService),F(11,n.IUserDataSyncUtilService),F(12,r.IConfigurationService),F(13,d.IUriIdentityService)],m),e.AbstractJsonFileSynchroniser=m;let w=class{constructor(y,T,_,L,M,O){this.resource=y,this.userDataProfilesService=T,this.environmentService=_,this.logService=L,this.fileService=M,this.extUri=O.extUri,this.lastSyncResource=(0,n.getLastSyncResourceUri)(void 0,this.resource,_,this.extUri)}async initialize({ref:y,content:T}){if(!T){this.logService.info("Remote content does not exist.",this.resource);return}const _=this.parseSyncData(T);if(!!_)try{await this.doInitialize({ref:y,syncData:_})}catch(L){this.logService.error(L)}}parseSyncData(y){try{const T=JSON.parse(y);if(o(T))return T}catch(T){this.logService.error(T)}this.logService.info("Cannot parse sync data as it is not compatible with the current version.",this.resource)}async updateLastSyncUserData(y,T={}){const _={ref:y.ref,content:y.syncData?JSON.stringify(y.syncData):null,...T};await this.fileService.writeFile(this.lastSyncResource,R.VSBuffer.fromString(JSON.stringify(_)))}};w=we([F(1,a.IUserDataProfilesService),F(2,u.IEnvironmentService),F(3,f.ILogService),F(4,i.IFileService),F(5,d.IUriIdentityService)],w),e.AbstractInitializer=w}),define(ae[2259],le([1,0,16,56,6,123,14,13,1440,8,81,19,23,27,57,103,378,2225,95]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsInitializer=e.KeybindingsSynchroniser=e.getKeybindingsContentFromSyncContent=void 0;function d(o,g,h){try{const v=JSON.parse(o);if(!g)return(0,E.isUndefined)(v.all)?null:v.all;switch(k.OS){case 2:return(0,E.isUndefined)(v.mac)?null:v.mac;case 3:return(0,E.isUndefined)(v.linux)?null:v.linux;case 1:return(0,E.isUndefined)(v.windows)?null:v.windows}}catch(v){return h.error(v),null}}e.getKeybindingsContentFromSyncContent=d;let n=class extends c.AbstractJsonFileSynchroniser{constructor(g,h,v,m,w,D,y,T,_,L,M,O,N){super(g.keybindingsResource,{syncResource:"keybindings",profile:g},h,T,_,L,v,m,y,O,w,M,D,N),this.version=2,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"keybindings.json"),this.baseResource=this.previewResource.with({scheme:s.USER_DATA_SYNC_SCHEME,authority:"base"}),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._register(R.Event.filter(D.onDidChangeConfiguration,P=>P.affectsConfiguration("settingsSync.keybindingsPerPlatform"))(()=>this.triggerLocalChange()))}async generateSyncPreview(g,h,v,m){const w=g.syncData?d(g.syncData.content,m.keybindingsPerPlatform??this.syncKeybindingsPerPlatform(),this.logService):null;h=h===null&&v?g:h;const D=h?this.getKeybindingsContentFromLastSyncUserData(h):null,y=await this.getLocalFileContent(),T=await this.getFormattingOptions();let _=null,L=!1,M=!1,O=!1;if(w){let B=y?y.value.toString():"[]";if(B=B||"[]",this.hasErrors(B,!0))throw new s.UserDataSyncError((0,I.localize)(0,null),"LocalInvalidContent",this.resource);if(!D||D!==B||D!==w){this.logService.trace(`${this.syncResourceLogLabel}: Merging remote keybindings with local keybindings...`);const V=await(0,l.merge)(B,w,D,T,this.userDataSyncUtilService);V.hasChanges&&(_=V.mergeContent,O=V.hasConflicts,L=O||V.mergeContent!==B,M=O||V.mergeContent!==w)}}else y&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote keybindings does not exist. Synchronizing keybindings for the first time.`),_=y.value.toString(),M=!0);const N={content:O?D:_,localChange:L?y?2:1:0,remoteChange:M?2:0,hasConflicts:O},P=y?y.value.toString():null;return[{fileContent:y,baseResource:this.baseResource,baseContent:D,localResource:this.localResource,localContent:P,localChange:N.localChange,remoteResource:this.remoteResource,remoteContent:w,remoteChange:N.remoteChange,previewResource:this.previewResource,previewResult:N,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(g){const h=this.getKeybindingsContentFromLastSyncUserData(g);if(h===null)return!0;const v=await this.getLocalFileContent(),m=v?v.value.toString():"",w=await this.getFormattingOptions(),D=await(0,l.merge)(m||"[]",h,h,w,this.userDataSyncUtilService);return D.hasConflicts||D.mergeContent!==h}async getMergeResult(g,h){return g.previewResult}async getAcceptResult(g,h,v,m){if(this.extUri.isEqual(h,this.localResource))return{content:g.fileContent?g.fileContent.value.toString():null,localChange:0,remoteChange:2};if(this.extUri.isEqual(h,this.remoteResource))return{content:g.remoteContent,localChange:2,remoteChange:0};if(this.extUri.isEqual(h,this.previewResource))return v===void 0?{content:g.previewResult.content,localChange:g.previewResult.localChange,remoteChange:g.previewResult.remoteChange}:{content:v,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${h.toString()}`)}async applyResult(g,h,v,m){const{fileContent:w}=v[0][0];let{content:D,localChange:y,remoteChange:T}=v[0][1];if(y===0&&T===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing keybindings.`),D!==null&&(D=D.trim(),D=D||"[]",this.hasErrors(D,!0)))throw new s.UserDataSyncError((0,I.localize)(1,null),"LocalInvalidContent",this.resource);if(y!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local keybindings...`),w&&await this.backupLocal(this.toSyncContent(w.value.toString())),await this.updateLocalFileContent(D||"[]",w,m),this.logService.info(`${this.syncResourceLogLabel}: Updated local keybindings`)),T!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote keybindings...`);const _=this.toSyncContent(D||"[]",g.syncData?.content);g=await this.updateRemoteUserData(_,m?null:g.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote keybindings`)}try{await this.fileService.del(this.previewResource)}catch{}h?.ref!==g.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized keybindings...`),await this.updateLastSyncUserData(g,{platformSpecific:this.syncKeybindingsPerPlatform()}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized keybindings`))}async hasLocalData(){try{const g=await this.getLocalFileContent();if(g){const h=(0,A.parse)(g.value.toString());if((0,t.isNonEmptyArray)(h))return!0}}catch(g){if(g.fileOperationResult!==1)return!0}return!1}async resolveContent(g){return this.extUri.isEqual(this.remoteResource,g)||this.extUri.isEqual(this.baseResource,g)||this.extUri.isEqual(this.localResource,g)||this.extUri.isEqual(this.acceptedResource,g)?this.resolvePreviewContent(g):null}getKeybindingsContentFromLastSyncUserData(g){return!g.syncData||g.platformSpecific!==void 0&&g.platformSpecific!==this.syncKeybindingsPerPlatform()?null:d(g.syncData.content,this.syncKeybindingsPerPlatform(),this.logService)}toSyncContent(g,h){let v={};try{v=JSON.parse(h||"{}")}catch(m){this.logService.error(m)}switch(this.syncKeybindingsPerPlatform()?delete v.all:v.all=g,k.OS){case 2:v.mac=g;break;case 3:v.linux=g;break;case 1:v.windows=g;break}return JSON.stringify(v)}syncKeybindingsPerPlatform(){return!!this.configurationService.getValue(s.CONFIG_SYNC_KEYBINDINGS_PER_PLATFORM)}};n=we([F(2,s.IUserDataSyncStoreService),F(3,s.IUserDataSyncBackupStoreService),F(4,s.IUserDataSyncLogService),F(5,b.IConfigurationService),F(6,s.IUserDataSyncEnablementService),F(7,C.IFileService),F(8,S.IEnvironmentService),F(9,r.IStorageService),F(10,s.IUserDataSyncUtilService),F(11,u.ITelemetryService),F(12,i.IUriIdentityService)],n),e.KeybindingsSynchroniser=n;let a=class extends c.AbstractInitializer{constructor(g,h,v,m,w){super("keybindings",h,v,m,g,w)}async doInitialize(g){const h=g.syncData?this.getKeybindingsContentFromSyncContent(g.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.userDataProfilesService.defaultProfile.keybindingsResource,p.VSBuffer.fromString(h)),await this.updateLastSyncUserData(g)}async isEmpty(){try{const g=await this.fileService.readFile(this.userDataProfilesService.defaultProfile.settingsResource),h=(0,A.parse)(g.value.toString());return!(0,t.isNonEmptyArray)(h)}catch(g){return g.fileOperationResult===1}}getKeybindingsContentFromSyncContent(g){try{return d(g,!0,this.logService)}catch(h){return this.logService.error(h),null}}};a=we([F(0,C.IFileService),F(1,f.IUserDataProfilesService),F(2,S.IEnvironmentService),F(3,s.IUserDataSyncLogService),F(4,i.IUriIdentityService)],a),e.KeybindingsInitializer=a}),define(ae[2260],le([1,0,56,6,1441,8,429,81,82,19,23,27,57,103,378,513,437,95]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsInitializer=e.SettingsSynchroniser=e.parseSettingsSyncContent=void 0;function s(o){return o&&o.settings&&typeof o.settings=="string"&&Object.keys(o).length===1}function d(o){const g=JSON.parse(o);return s(g)?g:{settings:o}}e.parseSettingsSyncContent=d;let n=class extends i.AbstractJsonFileSynchroniser{constructor(g,h,v,m,w,D,y,T,_,L,M,O,N,P){super(g.settingsResource,{syncResource:"settings",profile:g},h,v,m,w,D,y,M,O,T,_,L,P),this.extensionManagementService=N,this.version=2,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"settings.json"),this.baseResource=this.previewResource.with({scheme:l.USER_DATA_SYNC_SCHEME,authority:"base"}),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._defaultIgnoredSettings=void 0}async getRemoteUserDataSyncConfiguration(g){const h=await this.getLastSyncUserData(),v=await this.getLatestRemoteUserData(g,h),m=this.getSettingsSyncContent(v),w=new k.ConfigurationModelParser(l.USER_DATA_SYNC_CONFIGURATION_SCOPE);return m?.settings&&w.parse(m.settings),w.configurationModel.getValue(l.USER_DATA_SYNC_CONFIGURATION_SCOPE)||{}}async generateSyncPreview(g,h,v){const m=await this.getLocalFileContent(),w=await this.getFormattingOptions(),D=this.getSettingsSyncContent(g);h=h===null&&v?g:h;const y=h?this.getSettingsSyncContent(h):null,T=await this.getIgnoredSettings();let _=null,L=!1,M=!1,O=!1;if(D){let V=m?m.value.toString().trim():"{}";V=V||"{}",this.validateContent(V),this.logService.trace(`${this.syncResourceLogLabel}: Merging remote settings with local settings...`);const z=(0,c.merge)(V,D.settings,y?y.settings:null,T,[],w);_=z.localContent||z.remoteContent,L=z.localContent!==null,M=z.remoteContent!==null,O=z.hasConflicts}else m&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote settings does not exist. Synchronizing settings for the first time.`),_=m.value.toString().trim()||"{}",this.validateContent(_),M=!0);const N=m?m.value.toString():null,P=y?.settings??null,B={content:O?P:_,localChange:L?2:0,remoteChange:M?2:0,hasConflicts:O};return[{fileContent:m,baseResource:this.baseResource,baseContent:P,localResource:this.localResource,localContent:N,localChange:B.localChange,remoteResource:this.remoteResource,remoteContent:D?D.settings:null,remoteChange:B.remoteChange,previewResource:this.previewResource,previewResult:B,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(g){const h=this.getSettingsSyncContent(g);if(h===null)return!0;const v=await this.getLocalFileContent(),m=v?v.value.toString().trim():"",w=await this.getIgnoredSettings(),D=await this.getFormattingOptions();return(0,c.merge)(m||"{}",h.settings,h.settings,w,[],D).remoteContent!==null}async getMergeResult(g,h){const v=await this.getFormattingOptions(),m=await this.getIgnoredSettings();return{...g.previewResult,content:g.previewResult.content?(0,c.updateIgnoredSettings)(g.previewResult.content,"{}",m,v):null}}async getAcceptResult(g,h,v,m){const w=await this.getFormattingOptions(),D=await this.getIgnoredSettings();if(this.extUri.isEqual(h,this.localResource))return{content:g.fileContent?(0,c.updateIgnoredSettings)(g.fileContent.value.toString(),"{}",D,w):null,localChange:0,remoteChange:2};if(this.extUri.isEqual(h,this.remoteResource))return{content:g.remoteContent!==null?(0,c.updateIgnoredSettings)(g.remoteContent,g.fileContent?g.fileContent.value.toString():"{}",D,w):null,localChange:2,remoteChange:0};if(this.extUri.isEqual(h,this.previewResource))return v===void 0?{content:g.previewResult.content,localChange:g.previewResult.localChange,remoteChange:g.previewResult.remoteChange}:{content:v!==null?(0,c.updateIgnoredSettings)(v,g.fileContent?g.fileContent.value.toString():"{}",D,w):null,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${h.toString()}`)}async applyResult(g,h,v,m){const{fileContent:w}=v[0][0];let{content:D,localChange:y,remoteChange:T}=v[0][1];if(y===0&&T===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing settings.`),D=D?D.trim():"{}",D=D||"{}",this.validateContent(D),y!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local settings...`),w&&await this.backupLocal(JSON.stringify(this.toSettingsSyncContent(w.value.toString()))),await this.updateLocalFileContent(D,w,m),await this.configurationService.reloadConfiguration(3),this.logService.info(`${this.syncResourceLogLabel}: Updated local settings`)),T!==0){const _=await this.getFormattingOptions(),L=this.getSettingsSyncContent(g),M=await this.getIgnoredSettings(D);D=(0,c.updateIgnoredSettings)(D,L?L.settings:"{}",M,_),this.logService.trace(`${this.syncResourceLogLabel}: Updating remote settings...`),g=await this.updateRemoteUserData(JSON.stringify(this.toSettingsSyncContent(D)),m?null:g.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote settings`)}try{await this.fileService.del(this.previewResource)}catch{}h?.ref!==g.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized settings...`),await this.updateLastSyncUserData(g),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized settings`))}async hasLocalData(){try{const g=await this.getLocalFileContent();if(g){const h=await this.getFormattingOptions(),v=(0,f.edit)(g.value.toString(),[l.CONFIGURATION_SYNC_STORE_KEY],void 0,h);return!(0,c.isEmpty)(v)}}catch(g){if(g.fileOperationResult!==1)return!0}return!1}async resolveContent(g){return this.extUri.isEqual(this.remoteResource,g)||this.extUri.isEqual(this.localResource,g)||this.extUri.isEqual(this.acceptedResource,g)||this.extUri.isEqual(this.baseResource,g)?this.resolvePreviewContent(g):null}async resolvePreviewContent(g){let h=await super.resolvePreviewContent(g);if(h){const v=await this.getFormattingOptions(),m=await this.getIgnoredSettings();h=(0,c.updateIgnoredSettings)(h,"{}",m,v)}return h}getSettingsSyncContent(g){return g.syncData?this.parseSettingsSyncContent(g.syncData.content):null}parseSettingsSyncContent(g){try{return d(g)}catch(h){this.logService.error(h)}return null}toSettingsSyncContent(g){return{settings:g}}async getIgnoredSettings(g){if(!this._defaultIgnoredSettings){this._defaultIgnoredSettings=this.userDataSyncUtilService.resolveDefaultIgnoredSettings();const v=p.Event.any(p.Event.filter(this.extensionManagementService.onDidInstallExtensions,m=>m.some(({local:w})=>!!w)),p.Event.filter(this.extensionManagementService.onDidUninstallExtension,m=>!m.error))(()=>{v.dispose(),this._defaultIgnoredSettings=void 0})}const h=await this._defaultIgnoredSettings;return(0,c.getIgnoredSettings)(h,this.configurationService,g)}validateContent(g){if(this.hasErrors(g,!1))throw new l.UserDataSyncError((0,R.localize)(0,null),"LocalInvalidContent",this.resource)}};n=we([F(2,b.IFileService),F(3,E.IEnvironmentService),F(4,S.IStorageService),F(5,l.IUserDataSyncStoreService),F(6,l.IUserDataSyncBackupStoreService),F(7,l.IUserDataSyncLogService),F(8,l.IUserDataSyncUtilService),F(9,A.IConfigurationService),F(10,l.IUserDataSyncEnablementService),F(11,C.ITelemetryService),F(12,I.IExtensionManagementService),F(13,r.IUriIdentityService)],n),e.SettingsSynchroniser=n;let a=class extends i.AbstractInitializer{constructor(g,h,v,m,w){super("settings",h,v,m,g,w)}async doInitialize(g){const h=g.syncData?this.parseSettingsSyncContent(g.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.userDataProfilesService.defaultProfile.settingsResource,t.VSBuffer.fromString(h.settings)),await this.updateLastSyncUserData(g)}async isEmpty(){try{const g=await this.fileService.readFile(this.userDataProfilesService.defaultProfile.settingsResource);return(0,c.isEmpty)(g.value.toString().trim())}catch(g){return g.fileOperationResult===1}}parseSettingsSyncContent(g){try{return d(g)}catch(h){this.logService.error(h)}return null}};a=we([F(0,b.IFileService),F(1,u.IUserDataProfilesService),F(2,E.IEnvironmentService),F(3,l.IUserDataSyncLogService),F(4,r.IUriIdentityService)],a),e.SettingsInitializer=a}),define(ae[2261],le([1,0,56,6,52,8,81,19,23,27,57,103,378,2226,95]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetsInitializer=e.SnippetsSynchroniser=e.parseSnippets=void 0;function f(s){return JSON.parse(s.content)}e.parseSnippets=f;let c=class extends r.AbstractSynchroniser{constructor(d,n,a,o,g,h,v,m,w,D,y,T){super({syncResource:"snippets",profile:d},n,o,a,g,h,v,D,y,m,w,T),this.version=1,this.snippetsFolder=d.snippetsHome,this._register(this.fileService.watch(a.userRoamingDataHome)),this._register(this.fileService.watch(this.snippetsFolder)),this._register(p.Event.filter(this.fileService.onDidFilesChange,_=>_.affects(this.snippetsFolder))(()=>this.triggerLocalChange()))}async generateSyncPreview(d,n,a){const o=await this.getSnippetsFileContents(),g=this.toSnippetsContents(o),h=d.syncData?this.parseSnippets(d.syncData):null;n=n===null&&a?d:n;const v=n&&n.syncData?this.parseSnippets(n.syncData):null;h?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 m=(0,u.merge)(g,h,v);return this.getResourcePreviews(m,o,h||{},v||{})}async hasRemoteChanged(d){const n=d.syncData?this.parseSnippets(d.syncData):null;if(n===null)return!0;const a=await this.getSnippetsFileContents(),o=this.toSnippetsContents(a),g=(0,u.merge)(o,n,n);return Object.keys(g.remote.added).length>0||Object.keys(g.remote.updated).length>0||g.remote.removed.length>0||g.conflicts.length>0}async getMergeResult(d,n){return d.previewResult}async getAcceptResult(d,n,a,o){if(this.extUri.isEqualOrParent(n,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"})))return{content:d.fileContent?d.fileContent.value.toString():null,localChange:0,remoteChange:d.fileContent?d.remoteContent!==null?2:1:3};if(this.extUri.isEqualOrParent(n,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"})))return{content:d.remoteContent,localChange:d.remoteContent!==null?d.fileContent?2:1:3,remoteChange:0};if(this.extUri.isEqualOrParent(n,this.syncPreviewFolder))return a===void 0?{content:d.previewResult.content,localChange:d.previewResult.localChange,remoteChange:d.previewResult.remoteChange}:{content:a,localChange:a===null?d.fileContent!==null?3:0:2,remoteChange:a===null?d.remoteContent!==null?3:0:2};throw new Error(`Invalid Resource: ${n.toString()}`)}async applyResult(d,n,a,o){const g=a.map(([h,v])=>({...h,acceptResult:v}));g.every(({localChange:h,remoteChange:v})=>h===0&&v===0)&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing snippets.`),g.some(({localChange:h})=>h!==0)&&(await this.updateLocalBackup(g),await this.updateLocalSnippets(g,o)),g.some(({remoteChange:h})=>h!==0)&&(d=await this.updateRemoteSnippets(g,d,o)),n?.ref!==d.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized snippets...`),await this.updateLastSyncUserData(d),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized snippets`));for(const{previewResource:h}of g)try{await this.fileService.del(h)}catch{}}getResourcePreviews(d,n,a,o){const g=new Map;for(const h of Object.keys(d.local.added)){const v={content:d.local.added[h],hasConflicts:!1,localChange:1,remoteChange:0};g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:null,fileContent:null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),localContent:null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:a[h],previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of Object.keys(d.local.updated)){const v={content:d.local.updated[h],hasConflicts:!1,localChange:2,remoteChange:0},m=n[h]?n[h].value.toString():null;g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:n[h],localContent:m,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:a[h],previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of d.local.removed){const v={content:null,hasConflicts:!1,localChange:3,remoteChange:0},m=n[h]?n[h].value.toString():null;g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:n[h],localContent:m,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of Object.keys(d.remote.added)){const v={content:d.remote.added[h],hasConflicts:!1,localChange:0,remoteChange:1},m=n[h]?n[h].value.toString():null;g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:n[h],localContent:m,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of Object.keys(d.remote.updated)){const v={content:d.remote.updated[h],hasConflicts:!1,localChange:0,remoteChange:2},m=n[h]?n[h].value.toString():null;g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:n[h],localContent:m,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:a[h],previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of d.remote.removed){const v={content:null,hasConflicts:!1,localChange:0,remoteChange:3};g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:null,localContent:null,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:a[h],previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of d.conflicts){const v={content:o[h]??null,hasConflicts:!0,localChange:n[h]?2:1,remoteChange:a[h]?2:1},m=n[h]?n[h].value.toString():null;g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:n[h]||null,localContent:m,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:a[h]||null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}for(const h of Object.keys(n))if(!g.has(h)){const v={content:n[h]?n[h].value.toString():null,hasConflicts:!1,localChange:0,remoteChange:0},m=n[h]?n[h].value.toString():null;g.set(h,{baseResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}),baseContent:o[h]??null,localResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}),fileContent:n[h]||null,localContent:m,remoteResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}),remoteContent:a[h]||null,previewResource:this.extUri.joinPath(this.syncPreviewFolder,h),previewResult:v,localChange:v.localChange,remoteChange:v.remoteChange,acceptedResource:this.extUri.joinPath(this.syncPreviewFolder,h).with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"})})}return[...g.values()]}async resolveContent(d){return this.extUri.isEqualOrParent(d,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"remote"}))||this.extUri.isEqualOrParent(d,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"local"}))||this.extUri.isEqualOrParent(d,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"base"}))||this.extUri.isEqualOrParent(d,this.syncPreviewFolder.with({scheme:i.USER_DATA_SYNC_SCHEME,authority:"accepted"}))?this.resolvePreviewContent(d):null}async hasLocalData(){try{const d=await this.getSnippetsFileContents();if(Object.keys(d).length)return!0}catch{}return!1}async updateLocalBackup(d){const n={};for(const a of d)a.fileContent&&(n[this.extUri.basename(a.localResource)]=a.fileContent);await this.backupLocal(JSON.stringify(this.toSnippetsContents(n)))}async updateLocalSnippets(d,n){for(const{fileContent:a,acceptResult:o,localResource:g,remoteResource:h,localChange:v}of d)if(v!==0){const m=h?this.extUri.basename(h):this.extUri.basename(g),w=this.extUri.joinPath(this.snippetsFolder,m);v===3?(this.logService.trace(`${this.syncResourceLogLabel}: Deleting snippet...`,this.extUri.basename(w)),await this.fileService.del(w),this.logService.info(`${this.syncResourceLogLabel}: Deleted snippet`,this.extUri.basename(w))):v===1?(this.logService.trace(`${this.syncResourceLogLabel}: Creating snippet...`,this.extUri.basename(w)),await this.fileService.createFile(w,t.VSBuffer.fromString(o.content),{overwrite:n}),this.logService.info(`${this.syncResourceLogLabel}: Created snippet`,this.extUri.basename(w))):(this.logService.trace(`${this.syncResourceLogLabel}: Updating snippet...`,this.extUri.basename(w)),await this.fileService.writeFile(w,t.VSBuffer.fromString(o.content),n?void 0:a),this.logService.info(`${this.syncResourceLogLabel}: Updated snippet`,this.extUri.basename(w)))}}async updateRemoteSnippets(d,n,a){const o=n.syncData?this.parseSnippets(n.syncData):{},g=(0,R.deepClone)(o);for(const{acceptResult:h,localResource:v,remoteResource:m,remoteChange:w}of d)if(w!==0){const D=v?this.extUri.basename(v):this.extUri.basename(m);w===3?delete g[D]:g[D]=h.content}return(0,u.areSame)(o,g)||(this.logService.trace(`${this.syncResourceLogLabel}: Updating remote snippets...`),n=await this.updateRemoteUserData(JSON.stringify(g),a?null:n.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote snippets`)),n}parseSnippets(d){return f(d)}toSnippetsContents(d){const n={};for(const a of Object.keys(d))n[a]=d[a].value.toString();return n}async getSnippetsFileContents(){const d={};let n;try{n=await this.fileService.resolve(this.snippetsFolder)}catch(a){if(a instanceof E.FileOperationError&&a.fileOperationResult===1)return d;throw a}for(const a of n.children||[]){const o=a.resource,g=this.extUri.extname(o);if(g===".json"||g===".code-snippets"){const h=this.extUri.relativePath(this.snippetsFolder,o),v=await this.fileService.readFile(o);d[h]=v}}return d}};c=we([F(2,k.IEnvironmentService),F(3,E.IFileService),F(4,I.IStorageService),F(5,i.IUserDataSyncStoreService),F(6,i.IUserDataSyncBackupStoreService),F(7,i.IUserDataSyncLogService),F(8,A.IConfigurationService),F(9,i.IUserDataSyncEnablementService),F(10,b.ITelemetryService),F(11,S.IUriIdentityService)],c),e.SnippetsSynchroniser=c;let l=class extends r.AbstractInitializer{constructor(d,n,a,o,g){super("snippets",n,a,o,d,g)}async doInitialize(d){const n=d.syncData?JSON.parse(d.syncData.content):null;if(!n){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 o of Object.keys(n)){const g=n[o];if(g){const h=this.extUri.joinPath(this.userDataProfilesService.defaultProfile.snippetsHome,o);await this.fileService.createFile(h,t.VSBuffer.fromString(g)),this.logService.info("Created snippet",this.extUri.basename(h))}}await this.updateLastSyncUserData(d)}async isEmpty(){try{return!(await this.fileService.resolve(this.userDataProfilesService.defaultProfile.snippetsHome)).children?.length}catch(d){return d.fileOperationResult===1}}};l=we([F(0,E.IFileService),F(1,C.IUserDataProfilesService),F(2,k.IEnvironmentService),F(3,i.IUserDataSyncLogService),F(4,S.IUriIdentityService)],l),e.SnippetsInitializer=l}),define(ae[2262],le([1,0,56,8,81,19,23,27,57,103,378,95]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TasksInitializer=e.TasksSynchroniser=e.getTasksContentFromSyncContent=void 0;function r(c,l){try{return JSON.parse(c).tasks??null}catch(s){return l.error(s),null}}e.getTasksContentFromSyncContent=r;let u=class extends S.AbstractFileSynchroniser{constructor(l,s,d,n,a,o,g,h,v,m,w,D){super(l.tasksResource,{syncResource:"tasks",profile:l},s,h,v,m,d,n,g,w,a,o,D),this.version=1,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"tasks.json"),this.baseResource=this.previewResource.with({scheme:C.USER_DATA_SYNC_SCHEME,authority:"base"}),this.localResource=this.previewResource.with({scheme:C.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:C.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:C.USER_DATA_SYNC_SCHEME,authority:"accepted"})}async generateSyncPreview(l,s,d,n){const a=l.syncData?r(l.syncData.content,this.logService):null;s=s===null&&d?l:s;const o=s?.syncData?r(s.syncData.content,this.logService):null,g=await this.getLocalFileContent();let h=null,v=!1,m=!1,w=!1;if(l.syncData){const T=g?g.value.toString():null;if(!o||o!==T||o!==a){this.logService.trace(`${this.syncResourceLogLabel}: Merging remote tasks with local tasks...`);const _=f(T,a,o);h=_.content,w=_.hasConflicts,v=_.hasLocalChanged,m=_.hasRemoteChanged}}else g&&(this.logService.trace(`${this.syncResourceLogLabel}: Remote tasks does not exist. Synchronizing tasks for the first time.`),h=g.value.toString(),m=!0);const D={content:w?o:h,localChange:v?g?2:1:0,remoteChange:m?2:0,hasConflicts:w},y=g?g.value.toString():null;return[{fileContent:g,baseResource:this.baseResource,baseContent:o,localResource:this.localResource,localContent:y,localChange:D.localChange,remoteResource:this.remoteResource,remoteContent:a,remoteChange:D.remoteChange,previewResource:this.previewResource,previewResult:D,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(l){const s=l?.syncData?r(l.syncData.content,this.logService):null;if(s===null)return!0;const d=await this.getLocalFileContent(),n=d?d.value.toString():null,a=f(n,s,s);return a.hasLocalChanged||a.hasRemoteChanged}async getMergeResult(l,s){return l.previewResult}async getAcceptResult(l,s,d,n){if(this.extUri.isEqual(s,this.localResource))return{content:l.fileContent?l.fileContent.value.toString():null,localChange:0,remoteChange:2};if(this.extUri.isEqual(s,this.remoteResource))return{content:l.remoteContent,localChange:2,remoteChange:0};if(this.extUri.isEqual(s,this.previewResource))return d===void 0?{content:l.previewResult.content,localChange:l.previewResult.localChange,remoteChange:l.previewResult.remoteChange}:{content:d,localChange:2,remoteChange:2};throw new Error(`Invalid Resource: ${s.toString()}`)}async applyResult(l,s,d,n){const{fileContent:a}=d[0][0],{content:o,localChange:g,remoteChange:h}=d[0][1];if(g===0&&h===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing tasks.`),g!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local tasks...`),a&&await this.backupLocal(JSON.stringify(this.toTasksSyncContent(a.value.toString()))),o?await this.updateLocalFileContent(o,a,n):await this.deleteLocalFile(),this.logService.info(`${this.syncResourceLogLabel}: Updated local tasks`)),h!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote tasks...`);const v=JSON.stringify(this.toTasksSyncContent(o));l=await this.updateRemoteUserData(v,n?null:l.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote tasks`)}try{await this.fileService.del(this.previewResource)}catch{}s?.ref!==l.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized tasks...`),await this.updateLastSyncUserData(l),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized tasks`))}async hasLocalData(){return this.fileService.exists(this.file)}async resolveContent(l){return this.extUri.isEqual(this.remoteResource,l)||this.extUri.isEqual(this.baseResource,l)||this.extUri.isEqual(this.localResource,l)||this.extUri.isEqual(this.acceptedResource,l)?this.resolvePreviewContent(l):null}toTasksSyncContent(l){return l?{tasks:l}:{}}};u=we([F(2,C.IUserDataSyncStoreService),F(3,C.IUserDataSyncBackupStoreService),F(4,C.IUserDataSyncLogService),F(5,p.IConfigurationService),F(6,C.IUserDataSyncEnablementService),F(7,A.IFileService),F(8,R.IEnvironmentService),F(9,k.IStorageService),F(10,E.ITelemetryService),F(11,I.IUriIdentityService)],u),e.TasksSynchroniser=u;let i=class extends S.AbstractInitializer{constructor(l,s,d,n,a){super("tasks",s,d,n,l,a),this.tasksResource=this.userDataProfilesService.defaultProfile.tasksResource}async doInitialize(l){const s=l.syncData?r(l.syncData.content,this.logService):null;if(!s){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(s)),await this.updateLastSyncUserData(l)}async isEmpty(){return this.fileService.exists(this.tasksResource)}};i=we([F(0,A.IFileService),F(1,b.IUserDataProfilesService),F(2,R.IEnvironmentService),F(3,C.IUserDataSyncLogService),F(4,I.IUriIdentityService)],i),e.TasksInitializer=i;function f(c,l,s){if(c===null&&l===null&&s===null)return{content:null,hasLocalChanged:!1,hasRemoteChanged:!1,hasConflicts:!1};if(c===l)return{content:null,hasLocalChanged:!1,hasRemoteChanged:!1,hasConflicts:!1};const d=s!==c,n=s!==l;return!d&&!n?{content:null,hasLocalChanged:!1,hasRemoteChanged:!1,hasConflicts:!1}:d&&!n?{content:c,hasRemoteChanged:!0,hasLocalChanged:!1,hasConflicts:!1}:n&&!d?{content:l,hasLocalChanged:!0,hasRemoteChanged:!1,hasConflicts:!1}:{content:c,hasLocalChanged:!0,hasRemoteChanged:!0,hasConflicts:!0}}}),define(ae[2263],le([1,0,6,2,14,81,23,27,95]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncEnablementService=void 0;const b="sync.enable";let S=class extends p.Disposable{constructor(r,u,i,f){super(),this.storageService=r,this.telemetryService=u,this.environmentService=i,this.userDataSyncStoreManagementService=f,this._onDidChangeEnablement=new t.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this._onDidChangeResourceEnablement=new t.Emitter,this.onDidChangeResourceEnablement=this._onDidChangeResourceEnablement.event,this._register(r.onDidChangeValue(c=>this.onDidStorageChange(c)))}isEnabled(){switch(this.environmentService.sync){case"on":return!0;case"off":return!1}return this.storageService.getBoolean(b,-1,!1)}canToggleEnablement(){return this.userDataSyncStoreManagementService.userDataSyncStore!==void 0&&this.environmentService.sync===void 0}setEnablement(r){r&&!this.canToggleEnablement()||(this.telemetryService.publicLog2(b,{enabled:r}),this.storageService.store(b,r,-1,1))}isResourceEnabled(r){return this.storageService.getBoolean((0,I.getEnablementKey)(r),-1,!0)}setResourceEnablement(r,u){if(this.isResourceEnabled(r)!==u){const i=(0,I.getEnablementKey)(r);this.storeResourceEnablement(i,u)}}getResourceSyncStateVersion(r){}storeResourceEnablement(r,u){this.storageService.store(r,u,-1,R.isWeb?0:1)}onDidStorageChange(r){if(r.scope!==-1)return;if(b===r.key){this._onDidChangeEnablement.fire(this.isEnabled());return}const u=I.ALL_SYNC_RESOURCES.filter(i=>(0,I.getEnablementKey)(i)===r.key)[0];if(u){this._onDidChangeResourceEnablement.fire([u,this.isResourceEnabled(u)]);return}}};S=we([F(0,k.IStorageService),F(1,E.ITelemetryService),F(2,A.IEnvironmentService),F(3,I.IUserDataSyncStoreManagementService)],S),e.UserDataSyncEnablementService=S}),define(ae[625],le([1,0,6,2,14,28,1443,81,19,5,46,371,23,95]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncMachinesService=e.isWebPlatform=e.IUserDataSyncMachinesService=void 0,e.IUserDataSyncMachinesService=(0,b.createDecorator)("IUserDataSyncMachinesService");const i="sync.currentMachineName",f="Safari",c="Chrome",l="Edge",s="Firefox",d="Android";function n(g){switch(g){case f:case c:case l:case s:case d:case(0,R.PlatformToString)(0):return!0}return!1}e.isWebPlatform=n;function a(){return R.isSafari?f:R.isChrome?c:R.isEdge?l:R.isFirefox?s:R.isAndroid?d:(0,R.PlatformToString)(R.isWeb?0:R.platform)}let o=class an extends p.Disposable{constructor(h,v,m,w,D,y){super(),this.storageService=m,this.userDataSyncStoreService=w,this.logService=D,this.productService=y,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.userData=null,this.currentMachineIdPromise=(0,C.getServiceMachineId)(h,v,m)}async getMachines(h){const v=await this.currentMachineIdPromise;return(await this.readMachinesData(h)).machines.map(w=>({...w,isCurrent:w.id===v}))}async addCurrentMachine(h){const v=await this.currentMachineIdPromise,m=await this.readMachinesData(h);m.machines.some(({id:w})=>w===v)||(m.machines.push({id:v,name:this.computeCurrentMachineName(m.machines),platform:a()}),await this.writeMachinesData(m))}async removeCurrentMachine(h){const v=await this.currentMachineIdPromise,m=await this.readMachinesData(h),w=m.machines.filter(({id:D})=>D!==v);w.length!==m.machines.length&&(m.machines=w,await this.writeMachinesData(m))}async renameMachine(h,v,m){const w=await this.readMachinesData(m),D=w.machines.find(({id:y})=>y===h);if(D){D.name=v,await this.writeMachinesData(w);const y=await this.currentMachineIdPromise;h===y&&this.storageService.store(i,v,-1,1)}}async setEnablements(h){const v=await this.readMachinesData();for(const[m,w]of h){const D=v.machines.find(y=>y.id===m);D&&(D.disabled=w?void 0:!0)}await this.writeMachinesData(v)}computeCurrentMachineName(h){const v=this.storageService.get(i,-1);if(v)return v;const m=`${this.productService.embedderIdentifier?`${this.productService.embedderIdentifier} - `:""}${a()} (${this.productService.nameShort})`,w=new RegExp(`${(0,A.escapeRegExpCharacters)(m)}\\s#(\\d+)`);let D=0;for(const y of h){const T=w.exec(y.name),_=T?parseInt(T[1]):0;D=_>D?_:D}return`${m} #${D+1}`}async readMachinesData(h){this.userData=await this.readUserData(h);const v=this.parse(this.userData);if(v.version!==an.VERSION)throw new Error((0,k.localize)(0,null,this.productService.nameLong));return v}async writeMachinesData(h){const v=JSON.stringify(h),m=await this.userDataSyncStoreService.writeResource(an.RESOURCE,v,this.userData?.ref||null);this.userData={ref:m,content:v},this._onDidChange.fire()}async readUserData(h){if(this.userData){const v=h&&h.latest?h.latest[an.RESOURCE]:void 0;if(this.userData.ref===v)return this.userData;if(v===void 0&&this.userData.content===null)return this.userData}return this.userDataSyncStoreService.readResource(an.RESOURCE,this.userData)}parse(h){if(h.content!==null)try{return JSON.parse(h.content)}catch(v){this.logService.error(v)}return{version:an.VERSION,machines:[]}}};o.VERSION=1,o.RESOURCE="machines",o=we([F(0,E.IEnvironmentService),F(1,I.IFileService),F(2,r.IStorageService),F(3,u.IUserDataSyncStoreService),F(4,u.IUserDataSyncLogService),F(5,S.IProductService)],o),e.UserDataSyncMachinesService=o}),define(ae[840],le([1,0,2,583,5,23]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractUserDataSyncProfilesStorageService=e.IUserDataSyncProfilesStorageService=void 0,e.IUserDataSyncProfilesStorageService=(0,R.createDecorator)("IUserDataSyncProfilesStorageService");let k=class extends t.Disposable{constructor(b){super(),this.storageService=b}async readStorageData(b){return this.withProfileScopedStorageService(b,async S=>this.getItems(S))}async updateStorageData(b,S,C){return this.withProfileScopedStorageService(b,async r=>this.writeItems(r,S,C))}async withProfileScopedStorageService(b,S){if(this.storageService.hasScope(b))return S(this.storageService);const C=await this.createStorageDatabase(b),r=new E(C);try{await r.initialize();const u=await S(r);return await r.flush(),u}finally{r.dispose(),await this.closeAndDispose(C)}}getItems(b){const S=new Map,C=r=>{for(const u of b.keys(0,r))S.set(u,{value:b.get(u,0),target:r})};return C(0),C(1),S}writeItems(b,S,C){for(const[r,u]of S)b.store(r,u,0,C)}async closeAndDispose(b){try{await b.close()}finally{(0,t.isDisposable)(b)&&b.dispose()}}};k=we([F(0,A.IStorageService)],k),e.AbstractUserDataSyncProfilesStorageService=k;class E extends A.AbstractStorageService{constructor(b){super({flushInterval:100}),this.profileStorage=this._register(new p.Storage(b))}doInitialize(){return this.profileStorage.init()}getStorage(b){return b===0?this.profileStorage:void 0}getLogDetails(){}async switchToProfile(){}async switchToWorkspace(){}hasScope(){return!1}}}),define(ae[841],le([1,0,11,32,21,6,321,2,28,8,81,624,82,100,335,19,5,151,25,23,27,57,103,378,2224,436,95,840]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractExtensionsInitializer=e.LocalExtensionsProvider=e.ExtensionsSynchroniser=e.stringify=e.parseExtensions=void 0;async function D(O,N){const P=JSON.parse(O.content);if(O.version===1||O.version===2){const B=(await N.getInstalled(0)).filter(V=>V.isBuiltin);for(const V of P)O.version===1&&(V.enabled===!1&&(V.disabled=!0),delete V.enabled),O.version===2&&B.every(z=>!(0,u.areSameExtensions)(z.identifier,V.identifier))&&(V.installed=!0)}return P}function y(O){return JSON.parse(O.content)}e.parseExtensions=y;function T(O,N){return O.sort((P,B)=>!P.identifier.uuid&&B.identifier.uuid?-1:P.identifier.uuid&&!B.identifier.uuid?1:(0,I.compare)(P.identifier.id,B.identifier.id)),N?(0,k.toFormattedString)(O,{}):JSON.stringify(O)}e.stringify=T;let _=class extends g.AbstractSynchroniser{constructor(N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y){super({syncResource:"extensions",profile:N},P,V,B,z,x,H,X,G,$,q,j),this.profile=N,this.extensionManagementService=W,this.ignoredExtensionsManagementService=U,this.instantiationService=Y,this.version=5,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"extensions.json"),this.baseResource=this.previewResource.with({scheme:m.USER_DATA_SYNC_SCHEME,authority:"base"}),this.localResource=this.previewResource.with({scheme:m.USER_DATA_SYNC_SCHEME,authority:"local"}),this.remoteResource=this.previewResource.with({scheme:m.USER_DATA_SYNC_SCHEME,authority:"remote"}),this.acceptedResource=this.previewResource.with({scheme:m.USER_DATA_SYNC_SCHEME,authority:"accepted"}),this.localExtensionsProvider=this.instantiationService.createInstance(L),this._register(A.Event.any(A.Event.filter(this.extensionManagementService.onDidInstallExtensions,ee=>ee.some(({local:ie})=>!!ie)),A.Event.filter(this.extensionManagementService.onDidUninstallExtension,ee=>!ee.error),A.Event.filter(K.onDidChange,ee=>ee.valueChanges.some(({profile:ie,changes:re})=>this.syncResource.profile.id===ie.id&&re.some(oe=>oe.key===r.DISABLED_EXTENSIONS_STORAGE_PATH))),Q.onDidChangeExtensionStorageToSync)(()=>this.triggerLocalChange()))}async generateSyncPreview(N,P){const B=N.syncData?await D(N.syncData,this.extensionManagementService):null,V=P?.skippedExtensions||[],z=P?.builtinExtensions||[],x=P?.syncData?await D(P.syncData,this.extensionManagementService):null,{localExtensions:H,ignoredExtensions:W}=await this.localExtensionsProvider.getLocalExtensions(this.profile);B?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:U,remote:$}=(0,h.merge)(H,B,x,V,W,z),q={local:U,remote:$,content:this.getPreviewContent(H,U.added,U.updated,U.removed),localChange:U.added.length>0||U.removed.length>0||U.updated.length>0?2:0,remoteChange:$!==null?2:0},X=this.stringify(H,!1);return[{skippedExtensions:V,builtinExtensions:z,baseResource:this.baseResource,baseContent:x?this.stringify(x,!1):X,localResource:this.localResource,localContent:X,localExtensions:H,remoteResource:this.remoteResource,remoteExtensions:B,remoteContent:B?this.stringify(B,!1):null,previewResource:this.previewResource,previewResult:q,localChange:q.localChange,remoteChange:q.remoteChange,acceptedResource:this.acceptedResource}]}async hasRemoteChanged(N){const P=N.syncData?await D(N.syncData,this.extensionManagementService):null,{localExtensions:B,ignoredExtensions:V}=await this.localExtensionsProvider.getLocalExtensions(this.profile),{remote:z}=(0,h.merge)(B,P,P,N.skippedExtensions||[],V,N.builtinExtensions||[]);return z!==null}getPreviewContent(N,P,B,V){const z=[...P,...B],x=new Set,H=W=>{x.add(W.id.toLowerCase()),W.uuid&&x.add(W.uuid)};z.forEach(({identifier:W})=>H(W)),V.forEach(H);for(const W of N)x.has(W.identifier.id.toLowerCase())||W.identifier.uuid&&x.has(W.identifier.uuid)||z.push(W);return this.stringify(z,!1)}async getMergeResult(N,P){return{...N.previewResult,hasConflicts:!1}}async getAcceptResult(N,P,B,V){if(this.extUri.isEqual(P,this.localResource))return this.acceptLocal(N);if(this.extUri.isEqual(P,this.remoteResource))return this.acceptRemote(N);if(this.extUri.isEqual(P,this.previewResource))return N.previewResult;throw new Error(`Invalid Resource: ${P.toString()}`)}async acceptLocal(N){const P=await this.extensionManagementService.getInstalled(void 0,this.profile.location),B=this.ignoredExtensionsManagementService.getIgnoredExtensions(P),V=(0,h.merge)(N.localExtensions,null,null,N.skippedExtensions,B,N.builtinExtensions),{local:z,remote:x}=V;return{content:N.localContent,local:z,remote:x,localChange:z.added.length>0||z.removed.length>0||z.updated.length>0?2:0,remoteChange:x!==null?2:0}}async acceptRemote(N){const P=await this.extensionManagementService.getInstalled(void 0,this.profile.location),B=this.ignoredExtensionsManagementService.getIgnoredExtensions(P),V=N.remoteContent?JSON.parse(N.remoteContent):null;if(V!==null){const z=(0,h.merge)(N.localExtensions,V,N.localExtensions,[],B,N.builtinExtensions),{local:x,remote:H}=z;return{content:N.remoteContent,local:x,remote:H,localChange:x.added.length>0||x.removed.length>0||x.updated.length>0?2:0,remoteChange:H!==null?2:0}}else return{content:N.remoteContent,local:{added:[],removed:[],updated:[]},remote:null,localChange:0,remoteChange:0}}async applyResult(N,P,B,V){let{skippedExtensions:z,localExtensions:x}=B[0][0];const{local:H,remote:W,localChange:U,remoteChange:$}=B[0][1];if(U===0&&$===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing extensions.`),U!==0&&(await this.backupLocal(JSON.stringify(x)),z=await this.localExtensionsProvider.updateLocalExtensions(H.added,H.removed,H.updated,z,this.profile)),W){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote extensions...`);const q=JSON.stringify(W.all);N=await this.updateRemoteUserData(q,V?null:N.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote extensions.${W.added.length?` Added: ${JSON.stringify(W.added.map(X=>X.identifier.id))}.`:""}${W.updated.length?` Updated: ${JSON.stringify(W.updated.map(X=>X.identifier.id))}.`:""}${W.removed.length?` Removed: ${JSON.stringify(W.removed.map(X=>X.identifier.id))}.`:""}`)}if(P?.ref!==N.ref){this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized extensions...`);const q=x.filter(X=>!X.installed).map(X=>X.identifier);await this.updateLastSyncUserData(N,{skippedExtensions:z,builtinExtensions:q}),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized extensions.${z.length?` Skipped: ${JSON.stringify(z.map(X=>X.identifier.id))}.`:""}`)}}async resolveContent(N){if(this.extUri.isEqual(this.remoteResource,N)||this.extUri.isEqual(this.baseResource,N)||this.extUri.isEqual(this.localResource,N)||this.extUri.isEqual(this.acceptedResource,N)){const P=await this.resolvePreviewContent(N);return P&&this.stringify(JSON.parse(P),!0)}return null}stringify(N,P){return T(N,P)}async hasLocalData(){try{const{localExtensions:N}=await this.localExtensionsProvider.getLocalExtensions(this.profile);if(N.some(P=>P.installed||P.disabled))return!0}catch{}return!1}};_=we([F(2,S.IEnvironmentService),F(3,f.IFileService),F(4,d.IStorageService),F(5,m.IUserDataSyncStoreService),F(6,m.IUserDataSyncBackupStoreService),F(7,r.IExtensionManagementService),F(8,v.IIgnoredExtensionsManagementService),F(9,m.IUserDataSyncLogService),F(10,b.IConfigurationService),F(11,m.IUserDataSyncEnablementService),F(12,n.ITelemetryService),F(13,i.IExtensionStorageService),F(14,a.IUriIdentityService),F(15,w.IUserDataSyncProfilesStorageService),F(16,c.IInstantiationService)],_),e.ExtensionsSynchroniser=_;let L=class{constructor(N,P,B,V,z,x){this.extensionManagementService=N,this.userDataSyncProfilesStorageService=P,this.extensionGalleryService=B,this.ignoredExtensionsManagementService=V,this.instantiationService=z,this.logService=x}async getLocalExtensions(N){const P=await this.extensionManagementService.getInstalled(void 0,N.extensionsResource),B=this.ignoredExtensionsManagementService.getIgnoredExtensions(P);return{localExtensions:await this.withProfileScopedServices(N,async(z,x)=>{const H=z.getDisabledExtensions();return P.map(W=>{const{identifier:U,isBuiltin:$,manifest:q,preRelease:X}=W,G={identifier:U,preRelease:X,version:q.version};H.some(Q=>(0,u.areSameExtensions)(Q,U))&&(G.disabled=!0),$||(G.installed=!0);try{const Q=x.getKeysForSync({id:U.id,version:q.version});if(Q){const j=x.getExtensionState(W,!0)||{};G.state=Object.keys(j).reduce((K,Y)=>(Q.includes(Y)&&(K[Y]=j[Y]),K),{})}}catch(Q){this.logService.info(`${(0,g.getSyncResourceLogLabel)("extensions",N)}: Error while parsing extension state`,(0,R.getErrorMessage)(Q))}return G})}),ignoredExtensions:B}}async updateLocalExtensions(N,P,B,V,z){const x=(0,g.getSyncResourceLogLabel)("extensions",z);return this.withProfileScopedServices(z,async(H,W)=>{const U=[],$=[],q=await this.extensionManagementService.getInstalled(void 0,z.extensionsResource);if(P.length){const G=q.filter(({identifier:Q,isBuiltin:j})=>!j&&P.some(K=>(0,u.areSameExtensions)(Q,K)));await t.Promises.settled(G.map(async Q=>{this.logService.trace(`${x}: Uninstalling local extension...`,Q.identifier.id),await this.extensionManagementService.uninstall(Q,{donotIncludePack:!0,donotCheckDependents:!0,profileLocation:z.extensionsResource}),this.logService.info(`${x}: Uninstalled local extension.`,Q.identifier.id),U.push(Q.identifier)}))}(N.length||B.length)&&await t.Promises.settled([...N,...B].map(async G=>{const Q=q.find(K=>(0,u.areSameExtensions)(K.identifier,G.identifier));if(Q&&Q.isBuiltin){G.state&&Q.manifest.version===G.version&&this.updateExtensionState(G.state,Q,Q.manifest.version,W),H.getDisabledExtensions().some(Y=>(0,u.areSameExtensions)(Y,G.identifier))!==!!G.disabled&&(G.disabled?(this.logService.trace(`${x}: Disabling extension...`,G.identifier.id),await H.disableExtension(G.identifier),this.logService.info(`${x}: Disabled extension`,G.identifier.id)):(this.logService.trace(`${x}: Enabling extension...`,G.identifier.id),await H.enableExtension(G.identifier),this.logService.info(`${x}: Enabled extension`,G.identifier.id))),U.push(G.identifier);return}const j=(await this.extensionGalleryService.getExtensions([{...G.identifier,preRelease:G.preRelease}],p.CancellationToken.None))[0];if(G.state&&(Q?Q.manifest.version===G.version:!!j)&&this.updateExtensionState(G.state,Q||j,Q?.manifest.version,W),j)try{H.getDisabledExtensions().some(Y=>(0,u.areSameExtensions)(Y,G.identifier))!==!!G.disabled&&(G.disabled?(this.logService.trace(`${x}: Disabling extension...`,G.identifier.id,j.version),await H.disableExtension(j.identifier),this.logService.info(`${x}: Disabled extension`,G.identifier.id,j.version)):(this.logService.trace(`${x}: Enabling extension...`,G.identifier.id,j.version),await H.enableExtension(j.identifier),this.logService.info(`${x}: Enabled extension`,G.identifier.id,j.version))),(!Q||Q.preRelease!==G.preRelease)&&(await this.extensionManagementService.canInstall(j)?(this.logService.trace(`${x}: Installing extension...`,G.identifier.id,j.version),await this.extensionManagementService.installFromGallery(j,{isMachineScoped:!1,donotIncludePackAndDependencies:!0,installPreReleaseVersion:G.preRelease,profileLocation:z.extensionsResource}),this.logService.info(`${x}: Installed extension.`,G.identifier.id,j.version),U.push(j.identifier)):(this.logService.info(`${x}: Skipped synchronizing extension because it cannot be installed.`,j.displayName||j.identifier.id),$.push(G)))}catch(K){$.push(G),K instanceof r.ExtensionManagementError&&[r.ExtensionManagementErrorCode.Incompatible,r.ExtensionManagementErrorCode.IncompatiblePreRelease,r.ExtensionManagementErrorCode.IncompatibleTargetPlatform].includes(K.code)?this.logService.info(`${x}: Skipped synchronizing extension because the compatible extension is not found.`,j.displayName||j.identifier.id):(this.logService.error(K),this.logService.info(`${x}: Skipped synchronizing extension`,j.displayName||j.identifier.id))}else $.push(G),this.logService.info(`${x}: Skipped synchronizing extension because the extension is not found.`,G.identifier.id)}));const X=[];for(const G of V)U.some(Q=>(0,u.areSameExtensions)(Q,G.identifier))||X.push(G);for(const G of $)X.some(Q=>(0,u.areSameExtensions)(Q.identifier,G.identifier))||X.push(G);return X})}updateExtensionState(N,P,B,V){const z=V.getExtensionState(P,!0)||{},x=B?V.getKeysForSync({id:P.identifier.id,version:B}):void 0;x?x.forEach(H=>{z[H]=N[H]}):Object.keys(N).forEach(H=>z[H]=N[H]),V.setExtensionState(P,z,!0)}async withProfileScopedServices(N,P){return this.userDataSyncProfilesStorageService.withProfileScopedStorageService(N,async B=>{const V=new E.DisposableStore,z=this.instantiationService.createChild(new l.ServiceCollection([d.IStorageService,B])),x=V.add(z.createInstance(C.GlobalExtensionEnablementService)),H=V.add(z.createInstance(i.ExtensionStorageService));try{return await P(x,H)}finally{V.dispose()}})}};L=we([F(0,r.IExtensionManagementService),F(1,w.IUserDataSyncProfilesStorageService),F(2,r.IExtensionGalleryService),F(3,v.IIgnoredExtensionsManagementService),F(4,c.IInstantiationService),F(5,m.IUserDataSyncLogService)],L),e.LocalExtensionsProvider=L;let M=class extends g.AbstractInitializer{constructor(N,P,B,V,z,x,H){super("extensions",V,z,x,B,H),this.extensionManagementService=N,this.ignoredExtensionsManagementService=P}async parseExtensions(N){return N.syncData?await D(N.syncData,this.extensionManagementService):null}generatePreview(N,P){const B=[],V=[],z=[];for(const x of N){if(this.ignoredExtensionsManagementService.hasToNeverSyncExtension(x.identifier.id))continue;const H=P.find(W=>(0,u.areSameExtensions)(W.identifier,x.identifier));H?(B.push(H),x.disabled&&z.push(x.identifier)):x.installed&&(V.push({...x.identifier,preRelease:!!x.preRelease}),x.disabled&&z.push(x.identifier))}return{installedExtensions:B,newExtensions:V,disabledExtensions:z,remoteExtensions:N}}};M=we([F(0,r.IExtensionManagementService),F(1,v.IIgnoredExtensionsManagementService),F(2,f.IFileService),F(3,o.IUserDataProfilesService),F(4,S.IEnvironmentService),F(5,s.ILogService),F(6,a.IUriIdentityService)],M),e.AbstractExtensionsInitializer=M}),define(ae[842],le([1,0,56,21,6,123,321,14,72,8,81,19,25,371,23,27,57,378,513,2227,95,103,840,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncStoreTypeSynchronizer=e.GlobalStateInitializer=e.LocalGlobalStateProvider=e.GlobalStateSynchroniser=e.stringify=void 0;const h="globalState.argv.",v=["locale"];function m(L,M){const O=L.storage?Object.keys(L.storage).sort():[],N={};return O.forEach(P=>N[P]=L.storage[P]),L.storage=N,M?(0,k.toFormattedString)(L,{}):JSON.stringify(L)}e.stringify=m;const w=1;let D=class extends l.AbstractSynchroniser{constructor(M,O,N,P,B,V,z,x,H,W,U,$,q,X){super({syncResource:"globalState",profile:M},O,P,x,$,B,V,H,W,z,U,q),this.userDataSyncProfilesStorageService=N,this.version=w,this.previewResource=this.extUri.joinPath(this.syncPreviewFolder,"globalState.json"),this.baseResource=this.previewResource.with({scheme:n.USER_DATA_SYNC_SCHEME,authority:"base"}),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.localGlobalStateProvider=X.createInstance(y),this._register(P.watch(this.extUri.dirname(this.environmentService.argvResource))),this._register(R.Event.any(R.Event.filter(P.onDidFilesChange,G=>G.contains(this.environmentService.argvResource)),R.Event.filter(N.onDidChange,G=>!!(G.targetChanges.some(Q=>this.syncResource.profile.id===Q.id)||G.valueChanges.some(({profile:Q,changes:j})=>this.syncResource.profile.id===Q.id&&j.some(K=>K.target===0)))))(()=>this.triggerLocalChange()))}async generateSyncPreview(M,O,N){const P=M.syncData?JSON.parse(M.syncData.content):null;O=O===null&&N?M:O;const B=O&&O.syncData?JSON.parse(O.syncData.content):null,V=await this.localGlobalStateProvider.getLocalGlobalState(this.syncResource.profile);P?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 z=await this.getStorageKeys(B),{local:x,remote:H}=(0,d.merge)(V.storage,P?P.storage:null,B?B.storage:null,z,this.logService),W={content:null,local:x,remote:H,localChange:Object.keys(x.added).length>0||Object.keys(x.updated).length>0||x.removed.length>0?2:0,remoteChange:H.all!==null?2:0},U=m(V,!1);return[{baseResource:this.baseResource,baseContent:B?m(B,!1):U,localResource:this.localResource,localContent:U,localUserData:V,remoteResource:this.remoteResource,remoteContent:P?m(P,!1):null,previewResource:this.previewResource,previewResult:W,localChange:W.localChange,remoteChange:W.remoteChange,acceptedResource:this.acceptedResource,storageKeys:z}]}async hasRemoteChanged(M){const O=M.syncData?JSON.parse(M.syncData.content):null;if(O===null)return!0;const N=await this.localGlobalStateProvider.getLocalGlobalState(this.syncResource.profile),P=await this.getStorageKeys(O),{remote:B}=(0,d.merge)(N.storage,O.storage,O.storage,P,this.logService);return B.all!==null}async getMergeResult(M,O){return{...M.previewResult,hasConflicts:!1}}async getAcceptResult(M,O,N,P){if(this.extUri.isEqual(O,this.localResource))return this.acceptLocal(M);if(this.extUri.isEqual(O,this.remoteResource))return this.acceptRemote(M);if(this.extUri.isEqual(O,this.previewResource))return M.previewResult;throw new Error(`Invalid Resource: ${O.toString()}`)}async acceptLocal(M){return{content:M.localContent,local:{added:{},removed:[],updated:{}},remote:{added:Object.keys(M.localUserData.storage),removed:[],updated:[],all:M.localUserData.storage},localChange:0,remoteChange:2}}async acceptRemote(M){if(M.remoteContent!==null){const O=JSON.parse(M.remoteContent),{local:N,remote:P}=(0,d.merge)(M.localUserData.storage,O.storage,null,M.storageKeys,this.logService);return{content:M.remoteContent,local:N,remote:P,localChange:Object.keys(N.added).length>0||Object.keys(N.updated).length>0||N.removed.length>0?2:0,remoteChange:P!==null?2:0}}else return{content:M.remoteContent,local:{added:{},removed:[],updated:{}},remote:{added:[],removed:[],updated:[],all:null},localChange:0,remoteChange:0}}async applyResult(M,O,N,P){const{localUserData:B}=N[0][0],{local:V,remote:z,localChange:x,remoteChange:H}=N[0][1];if(x===0&&H===0&&this.logService.info(`${this.syncResourceLogLabel}: No changes found during synchronizing ui state.`),x!==0&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating local ui state...`),await this.backupLocal(JSON.stringify(B)),await this.localGlobalStateProvider.writeLocalGlobalState(V,this.syncResource.profile),this.logService.info(`${this.syncResourceLogLabel}: Updated local ui state`)),H!==0){this.logService.trace(`${this.syncResourceLogLabel}: Updating remote ui state...`);const W=JSON.stringify({storage:z.all});M=await this.updateRemoteUserData(W,P?null:M.ref),this.logService.info(`${this.syncResourceLogLabel}: Updated remote ui state.${z.added.length?` Added: ${z.added}.`:""}${z.updated.length?` Updated: ${z.updated}.`:""}${z.removed.length?` Removed: ${z.removed}.`:""}`)}O?.ref!==M.ref&&(this.logService.trace(`${this.syncResourceLogLabel}: Updating last synchronized ui state...`),await this.updateLastSyncUserData(M),this.logService.info(`${this.syncResourceLogLabel}: Updated last synchronized ui state`))}async resolveContent(M){if(this.extUri.isEqual(this.remoteResource,M)||this.extUri.isEqual(this.baseResource,M)||this.extUri.isEqual(this.localResource,M)||this.extUri.isEqual(this.acceptedResource,M)){const O=await this.resolvePreviewContent(M);return O&&m(JSON.parse(O),!0)}return null}async hasLocalData(){try{const{storage:M}=await this.localGlobalStateProvider.getLocalGlobalState(this.syncResource.profile);if(Object.keys(M).length>1||M[`${h}.locale`]?.value!=="en")return!0}catch{}return!1}async getStorageKeys(M){const O=await this.userDataSyncProfilesStorageService.readStorageData(this.syncResource.profile),N=[],P=[];for(const[z,x]of O)x.target===0?N.push(z):x.target===1&&P.push(z);const B=[...N,...P],V=M?.storage?Object.keys(M.storage).filter(z=>!z.startsWith(h)&&!B.includes(z)&&O.get(z)!==void 0):[];if(!E.isWeb){const z=[...n.ALL_SYNC_RESOURCES.map(x=>(0,n.getEnablementKey)(x)),n.SYNC_SERVICE_URL_TYPE];V.push(...z),P.push(...z)}return{user:N,machine:P,unregistered:V}}};D=we([F(2,o.IUserDataSyncProfilesStorageService),F(3,C.IFileService),F(4,n.IUserDataSyncStoreService),F(5,n.IUserDataSyncBackupStoreService),F(6,n.IUserDataSyncLogService),F(7,S.IEnvironmentService),F(8,n.IUserDataSyncEnablementService),F(9,f.ITelemetryService),F(10,b.IConfigurationService),F(11,i.IStorageService),F(12,c.IUriIdentityService),F(13,g.IInstantiationService)],D),e.GlobalStateSynchroniser=D;let y=class{constructor(M,O,N,P){this.fileService=M,this.environmentService=O,this.userDataSyncProfilesStorageService=N,this.logService=P}async getLocalGlobalState(M){const O={};if(M.isDefault){const P=await this.getLocalArgvContent(),B=(0,A.parse)(P);for(const V of v)B[V]!==void 0&&(O[`${h}${V}`]={version:1,value:B[V]})}const N=await this.userDataSyncProfilesStorageService.readStorageData(M);for(const[P,B]of N)B.value&&B.target===0&&(O[P]={version:1,value:B.value});return{storage:O}}async getLocalArgvContent(){try{this.logService.debug("GlobalStateSync#getLocalArgvContent",this.environmentService.argvResource);const M=await this.fileService.readFile(this.environmentService.argvResource);return this.logService.debug("GlobalStateSync#getLocalArgvContent - Resolved",this.environmentService.argvResource),M.value.toString()}catch(M){this.logService.debug((0,p.getErrorMessage)(M))}return"{}"}async writeLocalGlobalState({added:M,removed:O,updated:N},P){const B=(0,l.getSyncResourceLogLabel)("globalState",P),V={},z=new Map,x=await this.userDataSyncProfilesStorageService.readStorageData(P),H=(W,U)=>{for(const $ of W){if($.startsWith(h)){V[$.substring(h.length)]=U?U[$].value:void 0;continue}if(U){const q=U[$];q.value!==x.get($)?.value&&z.set($,q.value)}else x.get($)!==void 0&&z.set($,void 0)}};if(H(Object.keys(M),M),H(Object.keys(N),N),H(O),Object.keys(V).length){this.logService.trace(`${B}: Updating locale...`);const W=await this.getLocalArgvContent();let U=W;for(const $ of Object.keys(V))U=(0,s.edit)(U,[$],V[$],{});W!==U&&(this.logService.trace(`${B}: Updating locale...`),await this.fileService.writeFile(this.environmentService.argvResource,t.VSBuffer.fromString(U)),this.logService.info(`${B}: Updated locale.`)),this.logService.info(`${B}: Updated locale`)}z.size&&(this.logService.trace(`${B}: Updating global state...`),await this.userDataSyncProfilesStorageService.updateStorageData(P,z,0),this.logService.info(`${B}: Updated global state`,[...z.keys()]))}};y=we([F(0,C.IFileService),F(1,S.IEnvironmentService),F(2,o.IUserDataSyncProfilesStorageService),F(3,n.IUserDataSyncLogService)],y),e.LocalGlobalStateProvider=y;let T=class extends l.AbstractInitializer{constructor(M,O,N,P,B,V){super("globalState",N,P,B,O,V),this.storageService=M}async doInitialize(M){const O=M.syncData?JSON.parse(M.syncData.content):null;if(!O){this.logService.info("Skipping initializing global state because remote global state does not exist.");return}const N={},P={};for(const B of Object.keys(O.storage))B.startsWith(h)?N[B.substring(h.length)]=O.storage[B].value:this.storageService.get(B,0)===void 0&&(P[B]=O.storage[B].value);if(Object.keys(N).length){let B="{}";try{B=(await this.fileService.readFile(this.environmentService.argvResource)).value.toString()}catch{}for(const V of Object.keys(N))B=(0,s.edit)(B,[V],N[V],{});await this.fileService.writeFile(this.environmentService.argvResource,t.VSBuffer.fromString(B))}if(Object.keys(P).length)for(const B of Object.keys(P))this.storageService.store(B,P[B],0,0)}};T=we([F(0,i.IStorageService),F(1,C.IFileService),F(2,a.IUserDataProfilesService),F(3,S.IEnvironmentService),F(4,n.IUserDataSyncLogService),F(5,c.IUriIdentityService)],T),e.GlobalStateInitializer=T;let _=class{constructor(M,O,N,P,B){this.userDataSyncStoreClient=M,this.storageService=O,this.environmentService=N,this.fileService=P,this.logService=B}getSyncStoreType(M){return this.parseGlobalState(M)?.storage[n.SYNC_SERVICE_URL_TYPE]?.value}async sync(M){const O=(0,n.createSyncHeaders)((0,I.generateUuid)());try{return await this.doSync(M,O)}catch(N){if(N instanceof n.UserDataSyncError)switch(N.code){case"PreconditionFailed":return this.logService.info("Failed to synchronize UserDataSyncStoreType as there is a new remote version available. Synchronizing again..."),this.doSync(M,O)}throw N}}async doSync(M,O){const N=await this.userDataSyncStoreClient.readResource("globalState",null,void 0,O),P=this.parseGlobalState(N)||{storage:{}};P.storage[n.SYNC_SERVICE_URL_TYPE]={value:M,version:w};const B=await(0,u.getServiceMachineId)(this.environmentService,this.fileService,this.storageService),V={version:w,machineId:B,content:m(P,!1)};await this.userDataSyncStoreClient.writeResource("globalState",JSON.stringify(V),N.ref,void 0,O)}parseGlobalState({content:M}){if(!M)return null;const O=JSON.parse(M);if((0,l.isSyncData)(O))return O?JSON.parse(O.content):null;throw new Error("Invalid remote data")}};_=we([F(1,i.IStorageService),F(2,S.IEnvironmentService),F(3,C.IFileService),F(4,r.ILogService)],_),e.UserDataSyncStoreTypeSynchronizer=_}),define(ae[2264],le([1,0,6,2,9,103,95]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncChannelClient=e.UserDataSyncChannel=void 0;function E(r,u){return{...r,profile:(0,A.reviveProfile)(r.profile,u.profilesHome.scheme)}}function I(r){return{created:r.created,uri:R.URI.revive(r.uri)}}class b{constructor(u,i,f){this.service=u,this.userDataProfilesService=i,this.logService=f,this.manualSyncTasks=new Map,this.onManualSynchronizeResources=new t.Emitter}listen(u,i){switch(i){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: ${i}`)}async call(u,i,f){try{return await this._call(u,i,f)}catch(c){throw this.logService.error(c),c}}async _call(u,i,f){switch(i){case"_getInitialData":return Promise.resolve([this.service.status,this.service.conflicts,this.service.lastSyncTime]);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"resolveContent":return this.service.resolveContent(R.URI.revive(f[0]));case"accept":return this.service.accept(E(f[0],this.userDataProfilesService),R.URI.revive(f[1]),f[2],f[3]);case"getRemoteProfiles":return this.service.getRemoteProfiles();case"getLocalSyncResourceHandles":return this.service.getLocalSyncResourceHandles(f[0],(0,A.reviveProfile)(f[1],this.userDataProfilesService.profilesHome.scheme));case"getRemoteSyncResourceHandles":return this.service.getRemoteSyncResourceHandles(f[0],f[1]);case"replace":return this.service.replace(I(f[0]));case"getAssociatedResources":return this.service.getAssociatedResources(I(f[0]));case"getMachineId":return this.service.getMachineId(I(f[0]));case"createManualSyncTask":return this.createManualSyncTask()}if(i.startsWith("manualSync/")){const c=i.substring(11),l=f[0],s=this.getManualSyncTask(l);switch(f=f.slice(1),c){case"merge":return s.merge();case"apply":return s.apply();case"stop":return s.stop();case"dispose":return this.disposeManualSyncTask(s)}}throw new Error("Invalid call")}getManualSyncTask(u){const i=this.manualSyncTasks.get(this.createKey(u));if(!i)throw new Error(`Manual sync taks not found: ${u}`);return i.manualSyncTask}async createManualSyncTask(){const u=new p.DisposableStore,i=u.add(await this.service.createManualSyncTask());return this.manualSyncTasks.set(this.createKey(i.id),{manualSyncTask:i,disposables:u}),i.id}disposeManualSyncTask(u){u.dispose();const i=this.createKey(u.id);this.manualSyncTasks.get(i)?.disposables.dispose(),this.manualSyncTasks.delete(i)}createKey(u){return`manualSyncTask-${u}`}}e.UserDataSyncChannel=b;let S=class extends p.Disposable{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")}constructor(u,i){super(),this.userDataProfilesService=i,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(f,c,l){return u.call(f,c,l).then(null,s=>{throw k.UserDataSyncError.toUserDataSyncError(s)})},listen(f,c){return u.listen(f,c)}},this.channel.call("_getInitialData").then(([f,c,l])=>{this.updateStatus(f),this.updateConflicts(c),l&&this.updateLastSyncTime(l),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")(f=>this.updateConflicts(f))),this._register(this.channel.listen("onSyncErrors")(f=>this._onSyncErrors.fire(f.map(c=>({...c,error:k.UserDataSyncError.toUserDataSyncError(c.error)})))))}createSyncTask(){throw new Error("not supported")}async createManualSyncTask(){const u=await this.channel.call("createManualSyncTask"),i=this;return new C(u,{async call(c,l,s){return i.channel.call(`manualSync/${c}`,[u,...Array.isArray(l)?l:[l]],s)},listen(){throw new Error("not supported")}})}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(u,i,f,c){return this.channel.call("accept",[u,i,f,c])}resolveContent(u){return this.channel.call("resolveContent",[u])}getRemoteProfiles(){return this.channel.call("getRemoteProfiles")}async getLocalSyncResourceHandles(u,i){return(await this.channel.call("getLocalSyncResourceHandles",[u,i])).map(({created:c,uri:l})=>({created:c,uri:R.URI.revive(l)}))}async getRemoteSyncResourceHandles(u,i){return(await this.channel.call("getRemoteSyncResourceHandles",[u,i])).map(({created:c,uri:l})=>({created:c,uri:R.URI.revive(l)}))}async getAssociatedResources(u){return(await this.channel.call("getAssociatedResources",[u])).map(({resource:f,comparableResource:c})=>({resource:R.URI.revive(f),comparableResource:R.URI.revive(c)}))}getMachineId(u){return this.channel.call("getMachineId",[u])}replace(u){return this.channel.call("replace",[u])}async updateStatus(u){this._status=u,this._onDidChangeStatus.fire(u)}async updateConflicts(u){this._conflicts=u.map(i=>({syncResource:i.syncResource,profile:(0,A.reviveProfile)(i.profile,this.userDataProfilesService.profilesHome.scheme),conflicts:i.conflicts.map(f=>({...f,baseResource:R.URI.revive(f.baseResource),localResource:R.URI.revive(f.localResource),remoteResource:R.URI.revive(f.remoteResource),previewResource:R.URI.revive(f.previewResource)}))})),this._onDidChangeConflicts.fire(this._conflicts)}updateLastSyncTime(u){this._lastSyncTime!==u&&(this._lastSyncTime=u,this._onDidChangeLastSyncTime.fire(u))}};S=we([F(1,A.IUserDataProfilesService)],S),e.UserDataSyncChannelClient=S;class C extends p.Disposable{constructor(u,i){super(),this.id=u,this.channel=i}async merge(){return this.channel.call("merge")}async apply(){return this.channel.call("apply")}stop(){return this.channel.call("stop")}dispose(){this.channel.call("dispose")}}}),define(ae[441],le([1,0,11,32,21,6,2,160,14,18,13,9,72,8,81,19,46,172,371,23,95]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"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",o="sync.donot-make-requests-until",g="sync.user-session-id",h="sync.machine-session-id",v=100,m=1e3*60*5;let w=class extends k.Disposable{get userDataSyncStore(){return this._userDataSyncStore}get userDataSyncStoreType(){return this.storageService.get(n.SYNC_SERVICE_URL_TYPE,-1)}set userDataSyncStoreType(M){this.storageService.store(n.SYNC_SERVICE_URL_TYPE,M,-1,I.isWeb?0:1)}constructor(M,O,N){super(),this.productService=M,this.configurationService=O,this.storageService=N,this._onDidChangeUserDataSyncStore=this._register(new A.Emitter),this.onDidChangeUserDataSyncStore=this._onDidChangeUserDataSyncStore.event,this.updateUserDataSyncStore(),this._register(A.Event.filter(N.onDidChangeValue,P=>P.key===n.SYNC_SERVICE_URL_TYPE&&P.scope===-1&&this.userDataSyncStoreType!==this.userDataSyncStore?.type)(()=>this.updateUserDataSyncStore()))}updateUserDataSyncStore(){this._userDataSyncStore=this.toUserDataSyncStore(this.productService[n.CONFIGURATION_SYNC_STORE_KEY],this.configurationService.getValue(n.CONFIGURATION_SYNC_STORE_KEY)),this._onDidChangeUserDataSyncStore.fire()}toUserDataSyncStore(M,O){M=I.isWeb&&M?.web?{...M,...M.web}:M;const N={...M||{},...O||{}};if(N&&(0,S.isString)(N.url)&&(0,S.isObject)(N.authenticationProviders)&&Object.keys(N.authenticationProviders).every(P=>Array.isArray(N.authenticationProviders[P].scopes))){const P=N,B=!!P.canSwitch&&!O?.url,V=P.url===P.insidersUrl?"insiders":"stable",z=(B?this.userDataSyncStoreType:void 0)||V,x=O?.url||(z==="insiders"?P.insidersUrl:z==="stable"?P.stableUrl:P.url);return{url:C.URI.parse(x),type:z,defaultType:V,defaultUrl:C.URI.parse(P.url),stableUrl:C.URI.parse(P.stableUrl),insidersUrl:C.URI.parse(P.insidersUrl),canSwitch:B,authenticationProviders:Object.keys(P.authenticationProviders).reduce((H,W)=>(H.push({id:W,scopes:P.authenticationProviders[W].scopes}),H),[])}}}};w=we([F(0,c.IProductService),F(1,u.IConfigurationService),F(2,d.IStorageService)],w),e.AbstractUserDataSyncStoreManagementService=w;let D=class extends w{constructor(M,O,N){super(M,O,N);const P=this.storageService.get(a,-1);P&&(this.previousConfigurationSyncStore=JSON.parse(P));const B=this.productService[n.CONFIGURATION_SYNC_STORE_KEY];B?this.storageService.store(a,JSON.stringify(B),-1,1):this.storageService.remove(a,-1)}async switch(M){M!==this.userDataSyncStoreType&&(this.userDataSyncStoreType=M,this.updateUserDataSyncStore())}async getPreviousUserDataSyncStore(){return this.toUserDataSyncStore(this.previousConfigurationSyncStore)}};D=we([F(0,c.IProductService),F(1,u.IConfigurationService),F(2,d.IStorageService)],D),e.UserDataSyncStoreManagementService=D;let y=class extends k.Disposable{get donotMakeRequestsUntil(){return this._donotMakeRequestsUntil}constructor(M,O,N,P,B,V,z){super(),this.requestService=N,this.logService=P,this.storageService=z,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(M),this.commonHeadersPromise=(0,s.getServiceMachineId)(B,V,z).then(x=>{const H={"X-Client-Name":`${O.applicationName}${I.isWeb?"-web":""}`,"X-Client-Version":O.version};return O.commit&&(H["X-Client-Commit"]=O.commit),H}),this.session=new _(v,m,this.requestService,this.logService),this.initDonotMakeRequestsUntil(),this._register((0,k.toDisposable)(()=>{this.resetDonotMakeRequestsUntilPromise&&(this.resetDonotMakeRequestsUntilPromise.cancel(),this.resetDonotMakeRequestsUntilPromise=void 0)}))}setAuthToken(M,O){this.authToken={token:M,type:O}}updateUserDataSyncStoreUrl(M){this.userDataSyncStoreUrl=M?(0,b.joinPath)(M,"v1"):void 0}initDonotMakeRequestsUntil(){const M=this.storageService.getNumber(o,-1);M&&Date.now()<M&&this.setDonotMakeRequestsUntil(new Date(M))}setDonotMakeRequestsUntil(M){this._donotMakeRequestsUntil?.getTime()!==M?.getTime()&&(this._donotMakeRequestsUntil=M,this.resetDonotMakeRequestsUntilPromise&&(this.resetDonotMakeRequestsUntilPromise.cancel(),this.resetDonotMakeRequestsUntilPromise=void 0),this._donotMakeRequestsUntil?(this.storageService.store(o,this._donotMakeRequestsUntil.getTime(),-1,1),this.resetDonotMakeRequestsUntilPromise=(0,t.createCancelablePromise)(O=>(0,t.timeout)(this._donotMakeRequestsUntil.getTime()-Date.now(),O).then(()=>this.setDonotMakeRequestsUntil(void 0))),this.resetDonotMakeRequestsUntilPromise.then(null,O=>null)):this.storageService.remove(o,-1),this._onDidChangeDonotMakeRequestsUntil.fire())}async getAllCollections(M={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const O=(0,b.joinPath)(this.userDataSyncStoreUrl,"collection").toString();M={...M},M["Content-Type"]="application/json";const N=await this.request(O,{type:"GET",headers:M},[],p.CancellationToken.None);return await(0,l.asJson)(N)||[]}async createCollection(M={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const O=(0,b.joinPath)(this.userDataSyncStoreUrl,"collection").toString();M={...M},M["Content-Type"]=E.Mimes.text;const N=await this.request(O,{type:"POST",headers:M},[],p.CancellationToken.None),P=await(0,l.asTextOrError)(N);if(!P)throw new n.UserDataSyncStoreError("Server did not return the collection id",O,"NoCollection",N.res.statusCode,N.res.headers[n.HEADER_OPERATION_ID]);return P}async deleteCollection(M,O={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const N=M?(0,b.joinPath)(this.userDataSyncStoreUrl,"collection",M).toString():(0,b.joinPath)(this.userDataSyncStoreUrl,"collection").toString();O={...O},await this.request(N,{type:"DELETE",headers:O},[],p.CancellationToken.None)}async getAllResourceRefs(M,O){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const N=this.getResourceUrl(this.userDataSyncStoreUrl,O,M),P={},B=await this.request(N.toString(),{type:"GET",headers:P},[],p.CancellationToken.None);return(await(0,l.asJson)(B)||[]).map(({url:z,created:x})=>({ref:(0,b.relativePath)(N,N.with({path:z})),created:x*1e3}))}async resolveResourceContent(M,O,N,P={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const B=(0,b.joinPath)(this.getResourceUrl(this.userDataSyncStoreUrl,N,M),O).toString();P={...P},P["Cache-Control"]="no-cache";const V=await this.request(B,{type:"GET",headers:P},[],p.CancellationToken.None);return await(0,l.asTextOrError)(V)}async deleteResource(M,O,N){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const P=O!==null?(0,b.joinPath)(this.getResourceUrl(this.userDataSyncStoreUrl,N,M),O).toString():this.getResourceUrl(this.userDataSyncStoreUrl,N,M).toString(),B={};await this.request(P,{type:"DELETE",headers:B},[],p.CancellationToken.None)}async deleteResources(){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const M=(0,b.joinPath)(this.userDataSyncStoreUrl,"resource").toString(),O={"Content-Type":E.Mimes.text};await this.request(M,{type:"DELETE",headers:O},[],p.CancellationToken.None)}async readResource(M,O,N,P={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const B=(0,b.joinPath)(this.getResourceUrl(this.userDataSyncStoreUrl,N,M),"latest").toString();P={...P},P["Cache-Control"]="no-cache",O&&(P["If-None-Match"]=O.ref);const V=await this.request(B,{type:"GET",headers:P},[304],p.CancellationToken.None);let z=null;if(V.res.statusCode===304&&(z=O),z===null){const x=V.res.headers.etag;if(!x)throw new n.UserDataSyncStoreError("Server did not return the ref",B,"NoRef",V.res.statusCode,V.res.headers[n.HEADER_OPERATION_ID]);const H=await(0,l.asTextOrError)(V);if(!H&&V.res.statusCode===304)throw new n.UserDataSyncStoreError("Empty response",B,"EmptyResponse",V.res.statusCode,V.res.headers[n.HEADER_OPERATION_ID]);z={ref:x,content:H}}return z}async writeResource(M,O,N,P,B={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const V=this.getResourceUrl(this.userDataSyncStoreUrl,P,M).toString();B={...B},B["Content-Type"]=E.Mimes.text,N&&(B["If-Match"]=N);const z=await this.request(V,{type:"POST",data:O,headers:B},[],p.CancellationToken.None),x=z.res.headers.etag;if(!x)throw new n.UserDataSyncStoreError("Server did not return the ref",V,"NoRef",z.res.statusCode,z.res.headers[n.HEADER_OPERATION_ID]);return x}async manifest(M,O={}){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");const N=(0,b.joinPath)(this.userDataSyncStoreUrl,"manifest").toString();O={...O},O["Content-Type"]="application/json",M&&(O["If-None-Match"]=M.ref);const P=await this.request(N,{type:"GET",headers:O},[304],p.CancellationToken.None);let B=null;if(P.res.statusCode===304&&(B=M),!B){const z=P.res.headers.etag;if(!z)throw new n.UserDataSyncStoreError("Server did not return the ref",N,"NoRef",P.res.statusCode,P.res.headers[n.HEADER_OPERATION_ID]);const x=await(0,l.asTextOrError)(P);if(!x&&P.res.statusCode===304)throw new n.UserDataSyncStoreError("Empty response",N,"EmptyResponse",P.res.statusCode,P.res.headers[n.HEADER_OPERATION_ID]);x&&(B={...JSON.parse(x),ref:z})}const V=this.storageService.get(g,-1);return V&&B&&V!==B.session&&this.clearSession(),B===null&&V&&this.clearSession(),B&&this.storageService.store(g,B.session,-1,1),B}async clear(){if(!this.userDataSyncStoreUrl)throw new Error("No settings sync store url configured.");await this.deleteResources(),await this.deleteCollection(),this.clearSession()}getResourceUrl(M,O,N){return O?(0,b.joinPath)(M,"collection",O,"resource",N):(0,b.joinPath)(M,"resource",N)}clearSession(){this.storageService.remove(g,-1),this.storageService.remove(h,-1)}async request(M,O,N,P){if(!this.authToken)throw new n.UserDataSyncStoreError("No Auth Token Available",M,"Unauthorized",void 0,void 0);if(this._donotMakeRequestsUntil&&Date.now()<this._donotMakeRequestsUntil.getTime())throw new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because of too many requests (429).`,M,"TooManyRequestsAndRetryAfter",void 0,void 0);this.setDonotMakeRequestsUntil(void 0);const B=await this.commonHeadersPromise;O.headers={...O.headers||{},...B,"X-Account-Type":this.authToken.type,authorization:`Bearer ${this.authToken.token}`},this.addSessionHeaders(O.headers),this.logService.trace("Sending request to server",{url:M,type:O.type,headers:{...O.headers,authorization:void 0}});let V;try{V=await this.session.request(M,O,P)}catch(W){if(!(W instanceof n.UserDataSyncStoreError)){let U="RequestFailed";const $=(0,R.getErrorMessage)(W).toLowerCase();$.includes("xhr timeout")?U="RequestTimeout":$.includes("protocol")&&$.includes("not supported")?U="RequestProtocolNotSupported":$.includes("request path contains unescaped characters")?U="RequestPathNotEscaped":$.includes("headers must be an object")?U="RequestHeadersNotObject":(0,R.isCancellationError)(W)&&(U="RequestCanceled"),W=new n.UserDataSyncStoreError(`Connection refused for the request '${M}'.`,M,U,void 0,void 0)}throw this.logService.info("Request failed",M),W}const z=V.res.headers[n.HEADER_OPERATION_ID],x={url:M,status:V.res.statusCode,"execution-id":O.headers[n.HEADER_EXECUTION_ID],"operation-id":z},H=(0,l.isSuccess)(V)||V.res.statusCode&&N.indexOf(V.res.statusCode)!==-1;if(H?this.logService.trace("Request succeeded",x):this.logService.info("Request failed",x),V.res.statusCode===401)throw this.authToken=void 0,this._onTokenFailed.fire(),new n.UserDataSyncStoreError(`Request '${M}' failed because of Unauthorized (401).`,M,"Unauthorized",V.res.statusCode,z);if(this._onTokenSucceed.fire(),V.res.statusCode===409)throw new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because of Conflict (409). There is new data for this resource. Make the request again with latest data.`,M,"Conflict",V.res.statusCode,z);if(V.res.statusCode===410)throw new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because the requested resource is not longer available (410).`,M,"Gone",V.res.statusCode,z);if(V.res.statusCode===412)throw new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because of Precondition Failed (412). There is new data for this resource. Make the request again with latest data.`,M,"PreconditionFailed",V.res.statusCode,z);if(V.res.statusCode===413)throw new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because of too large payload (413).`,M,"TooLarge",V.res.statusCode,z);if(V.res.statusCode===426)throw new n.UserDataSyncStoreError(`${O.type} request '${M}' failed with status Upgrade Required (426). Please upgrade the client and try again.`,M,"UpgradeRequired",V.res.statusCode,z);if(V.res.statusCode===429){const W=V.res.headers["retry-after"];throw W?(this.setDonotMakeRequestsUntil(new Date(Date.now()+parseInt(W)*1e3)),new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because of too many requests (429).`,M,"TooManyRequestsAndRetryAfter",V.res.statusCode,z)):new n.UserDataSyncStoreError(`${O.type} request '${M}' failed because of too many requests (429).`,M,"RemoteTooManyRequests",V.res.statusCode,z)}if(!H)throw new n.UserDataSyncStoreError("Server returned "+V.res.statusCode,M,"Unknown",V.res.statusCode,z);return V}addSessionHeaders(M){let O=this.storageService.get(h,-1);O===void 0&&(O=(0,r.generateUuid)(),this.storageService.store(h,O,-1,1)),M["X-Machine-Session-Id"]=O;const N=this.storageService.get(g,-1);N!==void 0&&(M["X-User-Session-Id"]=N)}};y=we([F(1,c.IProductService),F(2,l.IRequestService),F(3,n.IUserDataSyncLogService),F(4,i.IEnvironmentService),F(5,f.IFileService),F(6,d.IStorageService)],y),e.UserDataSyncStoreClient=y;let T=class extends y{constructor(M,O,N,P,B,V,z){super(M.userDataSyncStore?.url,O,N,P,B,V,z),this._register(M.onDidChangeUserDataSyncStore(()=>this.updateUserDataSyncStoreUrl(M.userDataSyncStore?.url)))}};T=we([F(0,n.IUserDataSyncStoreManagementService),F(1,c.IProductService),F(2,l.IRequestService),F(3,n.IUserDataSyncLogService),F(4,i.IEnvironmentService),F(5,f.IFileService),F(6,d.IStorageService)],T),e.UserDataSyncStoreService=T;class _{constructor(M,O,N,P){this.limit=M,this.interval=O,this.requestService=N,this.logService=P,this.requests=[],this.startTime=void 0}request(M,O,N){if(this.isExpired()&&this.reset(),O.url=M,this.requests.length>=this.limit)throw this.logService.info("Too many requests",...this.requests),new n.UserDataSyncStoreError(`Too many requests. Only ${this.limit} requests allowed in ${this.interval/(1e3*60)} minutes.`,M,"LocalTooManyRequests",void 0,void 0);return this.startTime=this.startTime||new Date,this.requests.push(M),this.requestService.request(O,N)}isExpired(){return this.startTime!==void 0&&new Date().getTime()-this.startTime.getTime()>this.interval}reset(){this.requests=[],this.startTime=void 0}}e.RequestsSession=_}),define(ae[118],le([1,0,1445,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustRequestService=e.WorkspaceTrustUriResponse=e.IWorkspaceTrustManagementService=e.IWorkspaceTrustEnablementService=e.workspaceTrustToString=e.WorkspaceTrustScope=void 0;var R;(function(E){E[E.Local=0]="Local",E[E.Remote=1]="Remote"})(R=e.WorkspaceTrustScope||(e.WorkspaceTrustScope={}));function A(E){return E?(0,t.localize)(0,null):(0,t.localize)(1,null)}e.workspaceTrustToString=A,e.IWorkspaceTrustEnablementService=(0,p.createDecorator)("workspaceTrustEnablementService"),e.IWorkspaceTrustManagementService=(0,p.createDecorator)("workspaceTrustManagementService");var k;(function(E){E[E.Open=1]="Open",E[E.OpenInNewWindow=2]="OpenInNewWindow",E[E.Cancel=3]="Cancel"})(k=e.WorkspaceTrustUriResponse||(e.WorkspaceTrustUriResponse={})),e.IWorkspaceTrustRequestService=(0,p.createDecorator)("workspaceTrustRequestService")}),define(ae[2265],le([1,0,11,29,113,2,14,28,40,134,94,777,212,42,782,302,614,2201,1397,8,5,41,48,63,118,1097]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,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,g.registerIcon)("extensions-warning-message",p.Codicon.warning,s.localize(0,null));let v=class extends A.Disposable{constructor(X,G,Q,j){super(),this._editor=X,this._editorWorkerService=G,this._workspaceTrustService=Q,this._highlighter=null,this._bannerClosed=!1,this._updateState=K=>{if(K&&K.hasMore){if(this._bannerClosed)return;const Y=Math.max(K.ambiguousCharacterCount,K.nonBasicAsciiCharacterCount,K.invisibleCharacterCount);let ee;if(K.nonBasicAsciiCharacterCount>=Y)ee={message:s.localize(1,null),command:new x};else if(K.ambiguousCharacterCount>=Y)ee={message:s.localize(2,null),command:new V};else if(K.invisibleCharacterCount>=Y)ee={message:s.localize(3,null),command:new z};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:ee.message,icon:e.warningIcon,actions:[{label:ee.command.shortLabel,href:`command:${ee.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(j.createInstance(l.BannerController,X)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=X.getOption(115),this._register(Q.onDidChangeTrust(K=>{this._updateHighlighter()})),this._register(X.onDidChangeConfiguration(K=>{K.hasChanged(115)&&(this._options=X.getOption(115),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 X=m(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([X.nonBasicASCII,X.ambiguousCharacters,X.invisibleCharacters].every(Q=>Q===!1))return;const G={nonBasicASCII:X.nonBasicASCII,ambiguousCharacters:X.ambiguousCharacters,invisibleCharacters:X.invisibleCharacters,includeComments:X.includeComments,includeStrings:X.includeStrings,allowedCodePoints:Object.keys(X.allowedCharacters).map(Q=>Q.codePointAt(0)),allowedLocales:Object.keys(X.allowedLocales).map(Q=>Q==="_os"?new Intl.NumberFormat().resolvedOptions().locale:Q==="_vscode"?k.language:Q)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new w(this._editor,G,this._updateState,this._editorWorkerService):this._highlighter=new D(this._editor,G,this._updateState)}getDecorationInfo(X){return this._highlighter?this._highlighter.getDecorationInfo(X):null}};v.ID="editor.contrib.unicodeHighlighter",v=we([F(1,r.IEditorWorkerService),F(2,h.IWorkspaceTrustManagementService),F(3,n.IInstantiationService)],v),e.UnicodeHighlighter=v;function m(q,X){return{nonBasicASCII:X.nonBasicASCII===b.inUntrustedWorkspace?!q:X.nonBasicASCII,ambiguousCharacters:X.ambiguousCharacters,invisibleCharacters:X.invisibleCharacters,includeComments:X.includeComments===b.inUntrustedWorkspace?!q:X.includeComments,includeStrings:X.includeStrings===b.inUntrustedWorkspace?!q:X.includeStrings,allowedCharacters:X.allowedCharacters,allowedLocales:X.allowedLocales}}let w=class extends A.Disposable{constructor(X,G,Q,j){super(),this._editor=X,this._options=G,this._updateState=Q,this._editorWorkerService=j,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new t.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const X=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(G=>{if(this._model.isDisposed()||this._model.getVersionId()!==X)return;this._updateState(G);const Q=[];if(!G.hasMore)for(const j of G.ranges)Q.push({range:j,options:N.instance.getDecorationFromOptions(this._options)});this._decorations.set(Q)})}getDecorationInfo(X){if(!this._decorations.has(X))return null;const G=this._editor.getModel();if(!(0,i.isModelDecorationVisible)(G,X))return null;const Q=G.getValueInRange(X.range);return{reason:O(Q,this._options),inComment:(0,i.isModelDecorationInComment)(G,X),inString:(0,i.isModelDecorationInString)(G,X)}}};w=we([F(3,r.IEditorWorkerService)],w);class D extends A.Disposable{constructor(X,G,Q){super(),this._editor=X,this._options=G,this._updateState=Q,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),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._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const X=this._editor.getVisibleRanges(),G=[],Q={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const j of X){const K=C.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,j);for(const Y of K.ranges)Q.ranges.push(Y);Q.ambiguousCharacterCount+=Q.ambiguousCharacterCount,Q.invisibleCharacterCount+=Q.invisibleCharacterCount,Q.nonBasicAsciiCharacterCount+=Q.nonBasicAsciiCharacterCount,Q.hasMore=Q.hasMore||K.hasMore}if(!Q.hasMore)for(const j of Q.ranges)G.push({range:j,options:N.instance.getDecorationFromOptions(this._options)});this._updateState(Q),this._decorations.set(G)}getDecorationInfo(X){if(!this._decorations.has(X))return null;const G=this._editor.getModel(),Q=G.getValueInRange(X.range);return(0,i.isModelDecorationVisible)(G,X)?{reason:O(Q,this._options),inComment:(0,i.isModelDecorationInComment)(G,X),inString:(0,i.isModelDecorationInString)(G,X)}:null}}class y{constructor(X,G,Q){this.owner=X,this.range=G,this.decoration=Q}isValidForHoverAnchor(X){return X.type===1&&this.range.startColumn<=X.range.startColumn&&this.range.endColumn>=X.range.endColumn}}e.UnicodeHighlighterHover=y;let T=class{constructor(X,G,Q){this._editor=X,this._languageService=G,this._openerService=Q,this.hoverOrdinal=4}computeSync(X,G){if(!this._editor.hasModel()||X.type!==1)return[];const Q=this._editor.getModel(),j=this._editor.getContribution(v.ID);if(!j)return[];const K=[];let Y=300;for(const ee of G){const ie=j.getDecorationInfo(ee);if(!ie)continue;const oe=Q.getValueInRange(ee.range).codePointAt(0),se=L(oe);let te;switch(ie.reason.kind){case 0:te=s.localize(4,null,se,L(ie.reason.confusableWith.codePointAt(0)));break;case 1:te=s.localize(5,null,se);break;case 2:te=s.localize(6,null,se);break}const Z={codePoint:oe,reason:ie.reason,inComment:ie.inComment,inString:ie.inString},ne=s.localize(7,null),ce=`command:${H.ID}?${encodeURIComponent(JSON.stringify(Z))}`,de=new R.MarkdownString("",!0).appendMarkdown(te).appendText(" ").appendLink(ce,ne);K.push(new c.MarkdownHover(this,ee.range,[de],!1,Y++))}return K}renderHoverParts(X,G){return(0,c.renderMarkdownHovers)(X,G,this._editor,this._languageService,this._openerService)}};T=we([F(1,u.ILanguageService),F(2,a.IOpenerService)],T),e.UnicodeHighlighterHoverParticipant=T;function _(q){return`U+${q.toString(16).padStart(4,"0")}`}function L(q){let X=`\`${_(q)}\``;return E.InvisibleCharacters.isInvisibleCharacter(q)||(X+=` "${`${M(q)}`}"`),X}function M(q){return q===96?"`` ` ``":"`"+String.fromCodePoint(q)+"`"}function O(q,X){return C.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(q,X)}class N{constructor(){this.map=new Map}getDecorationFromOptions(X){return this.getDecoration(!X.includeComments,!X.includeStrings)}getDecoration(X,G){const Q=`${X}${G}`;let j=this.map.get(Q);return j||(j=S.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:X,hideInStringTokens:G}),this.map.set(Q,j)),j}}N.instance=new N;class P extends I.EditorAction{constructor(){super({id:V.ID,label:s.localize(9,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=s.localize(8,null)}async run(X,G,Q){const j=X?.get(d.IConfigurationService);j&&this.runAction(j)}async runAction(X){await X.updateValue(b.unicodeHighlightConfigKeys.includeComments,!1,2)}}e.DisableHighlightingInCommentsAction=P,P.ID="editor.action.unicodeHighlight.disableHighlightingInComments";class B extends I.EditorAction{constructor(){super({id:V.ID,label:s.localize(11,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=s.localize(10,null)}async run(X,G,Q){const j=X?.get(d.IConfigurationService);j&&this.runAction(j)}async runAction(X){await X.updateValue(b.unicodeHighlightConfigKeys.includeStrings,!1,2)}}e.DisableHighlightingInStringsAction=B,B.ID="editor.action.unicodeHighlight.disableHighlightingInStrings";class V extends I.EditorAction{constructor(){super({id:V.ID,label:s.localize(13,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=s.localize(12,null)}async run(X,G,Q){const j=X?.get(d.IConfigurationService);j&&this.runAction(j)}async runAction(X){await X.updateValue(b.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)}}e.DisableHighlightingOfAmbiguousCharactersAction=V,V.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class z extends I.EditorAction{constructor(){super({id:z.ID,label:s.localize(15,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=s.localize(14,null)}async run(X,G,Q){const j=X?.get(d.IConfigurationService);j&&this.runAction(j)}async runAction(X){await X.updateValue(b.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)}}e.DisableHighlightingOfInvisibleCharactersAction=z,z.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class x extends I.EditorAction{constructor(){super({id:x.ID,label:s.localize(17,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=s.localize(16,null)}async run(X,G,Q){const j=X?.get(d.IConfigurationService);j&&this.runAction(j)}async runAction(X){await X.updateValue(b.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=x,x.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class H extends I.EditorAction{constructor(){super({id:H.ID,label:s.localize(18,null),alias:"Show Exclude Options",precondition:void 0})}async run(X,G,Q){const{codePoint:j,reason:K,inString:Y,inComment:ee}=Q,ie=String.fromCodePoint(j),re=X.get(o.IQuickInputService),oe=X.get(d.IConfigurationService);function se(ne){return E.InvisibleCharacters.isInvisibleCharacter(ne)?s.localize(19,null,_(ne)):s.localize(20,null,`${_(ne)} "${ie}"`)}const te=[];if(K.kind===0)for(const ne of K.notAmbiguousInLocales)te.push({label:s.localize(21,null,ne),run:async()=>{U(oe,[ne])}});if(te.push({label:se(j),run:()=>W(oe,[j])}),ee){const ne=new P;te.push({label:ne.label,run:async()=>ne.runAction(oe)})}else if(Y){const ne=new B;te.push({label:ne.label,run:async()=>ne.runAction(oe)})}if(K.kind===0){const ne=new V;te.push({label:ne.label,run:async()=>ne.runAction(oe)})}else if(K.kind===1){const ne=new z;te.push({label:ne.label,run:async()=>ne.runAction(oe)})}else if(K.kind===2){const ne=new x;te.push({label:ne.label,run:async()=>ne.runAction(oe)})}else $(K);const Z=await re.pick(te,{title:s.localize(22,null)});Z&&await Z.run()}}e.ShowExcludeOptions=H,H.ID="editor.action.unicodeHighlight.showExcludeOptions";async function W(q,X){const G=q.getValue(b.unicodeHighlightConfigKeys.allowedCharacters);let Q;typeof G=="object"&&G?Q=G:Q={};for(const j of X)Q[String.fromCodePoint(j)]=!0;await q.updateValue(b.unicodeHighlightConfigKeys.allowedCharacters,Q,2)}async function U(q,X){const G=q.inspect(b.unicodeHighlightConfigKeys.allowedLocales).user?.value;let Q;typeof G=="object"&&G?Q=Object.assign({},G):Q={};for(const j of X)Q[j]=!0;await q.updateValue(b.unicodeHighlightConfigKeys.allowedLocales,Q,2)}function $(q){throw new Error(`Unexpected value: ${q}`)}(0,I.registerEditorAction)(V),(0,I.registerEditorAction)(z),(0,I.registerEditorAction)(x),(0,I.registerEditorAction)(H),(0,I.registerEditorContribution)(v.ID,v),f.HoverParticipantRegistry.register(T)}),define(ae[2266],le([1,0,332,173,377,765,2172,2206,2173,2174,508,2188,515,2238,2181,2175,333,2176,825,830,438,511,2182,2183,2110,2250,621,837,619,439,818,2240,2212,2185,819,2213,827,2186,835,2199,2190,2243,2191,168,244,2234,2193,821,2265,822,2215,2216,823,2194,2189,1325,480]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ae[200],le([1,0,164,123,322,130,22,53,14,18,9,5,223,34]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toStoreData=e.restoreRecentlyOpened=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 f(T){return T.hasOwnProperty("folderUri")}e.isRecentFolder=f;function c(T){return T.hasOwnProperty("fileUri")}e.isRecentFile=c;function l(T){return s(T)||d(T)}e.isStoredWorkspaceFolder=l;function s(T){const _=T;return typeof _?.path=="string"&&(!_.name||typeof _.name=="string")}function d(T){const _=T;return typeof _?.uri=="string"&&(!_.name||typeof _.name=="string")}function n(T,_,L,M,O){if(T.scheme!==M.scheme)return{name:L,uri:T.toString(!0)};let N=_?void 0:O.relativePath(M,T);if(N!==void 0)N.length===0?N=".":I.isWindows&&(N=a(N));else if(T.scheme===k.Schemas.file)N=T.fsPath,I.isWindows&&(N=a(N));else if(O.isEqualAuthority(T.authority,M.authority))N=T.path;else return{name:L,uri:T.toString(!0)};return{name:L,path:N}}e.getStoredWorkspaceFolder=n;function a(T){return T=(0,A.normalizeDriveLetter)(T),(0,t.isUNC)(T)||(T=(0,t.toSlashes)(T)),T}function o(T,_,L){const M=[],O=new Set,N=L.dirname(_);for(const P of T){let B;if(s(P))P.path&&(B=L.resolvePath(N,P.path));else if(d(P))try{B=S.URI.parse(P.uri),B.path[0]!==E.posix.sep&&(B=B.with({path:E.posix.sep+B.path}))}catch(V){console.warn(V)}if(B){const V=L.getComparisonKey(B);if(!O.has(V)){O.add(V);const z=P.name||L.basenameOrAuthority(B);M.push(new u.WorkspaceFolder({uri:B,name:z,index:M.length},P))}}}return M}e.toWorkspaceFolders=o;function g(T,_,L,M,O){const N=h(_,T),P=O.dirname(_),B=O.dirname(M),V=[];for(const W of N.folders){const U=s(W)?O.resolvePath(P,W.path):S.URI.parse(W.uri);let $;L?$=!1:$=!s(W)||(0,E.isAbsolute)(W.path),V.push(n(U,$,W.name,B,O))}const z={insertSpaces:!1,tabSize:4,eol:I.isLinux||I.isMacintosh?` `:`\r `},x=R.setProperty(T,["folders"],V,z);let H=R.applyEdits(T,x);return(0,b.isEqualAuthority)(N.remoteAuthority,(0,r.getRemoteAuthority)(M))&&(H=R.applyEdits(H,R.removeProperty(H,["remoteAuthority"],z))),H}e.rewriteWorkspaceFileForNewLocation=g;function h(T,_){const L=p.parse(_);if(L&&Array.isArray(L.folders))L.folders=L.folders.filter(M=>l(M));else throw new Error(`${T} looks like an invalid workspace file.`);return L}function v(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 w(T){return typeof T.fileUri=="string"}function D(T,_){const L={workspaces:[],files:[]};if(T){const M=function(N,P){for(let B=0;B<N.length;B++)try{P(N[B],B)}catch(V){_.warn(`Error restoring recent entry ${JSON.stringify(N[B])}: ${V.toString()}. Skip entry.`)}},O=T;Array.isArray(O.entries)&&M(O.entries,N=>{const P=N.label,B=N.remoteAuthority;v(N)?L.workspaces.push({label:P,remoteAuthority:B,workspace:{id:N.workspace.id,configPath:S.URI.parse(N.workspace.configPath)}}):m(N)?L.workspaces.push({label:P,remoteAuthority:B,folderUri:S.URI.parse(N.folderUri)}):w(N)&&L.files.push({label:P,remoteAuthority:B,fileUri:S.URI.parse(N.fileUri)})})}return L}e.restoreRecentlyOpened=D;function y(T){const _={entries:[]};for(const L of T.workspaces)f(L)?_.entries.push({folderUri:L.folderUri.toString(),label:L.label,remoteAuthority:L.remoteAuthority}):_.entries.push({workspace:{id:L.workspace.id,configPath:L.workspace.configPath.toString()},label:L.label,remoteAuthority:L.remoteAuthority});for(const L of T.files)_.entries.push({fileUri:L.fileUri.toString(),label:L.label,remoteAuthority:L.remoteAuthority});return _}e.toStoreData=y}),define(ae[2267],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostRpcService=e.IExtHostRpcService=void 0,e.IExtHostRpcService=(0,t.createDecorator)("IExtHostRpcService");class p{constructor(A){this.getProxy=A.getProxy.bind(A),this.set=A.set.bind(A),this.dispose=A.dispose.bind(A),this.assertRegistered=A.assertRegistered.bind(A),this.drain=A.drain.bind(A)}}e.ExtHostRpcService=p}),define(ae[2268],le([1,0,5,225,6,2267]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostTunnelService=e.IExtHostTunnelService=e.TunnelDtoConverter=void 0;var k;(function(I){function b(C){return{remoteAddress:C.remoteAddress,localAddress:C.localAddress,public:!!C.public,privacy:C.privacy??(C.public?p.TunnelPrivacyId.Public:p.TunnelPrivacyId.Private),protocol:C.protocol}}I.fromApiTunnel=b;function S(C){return{remoteAddress:{host:C.tunnelRemoteHost,port:C.tunnelRemotePort},localAddress:C.localAddress,public:C.privacy!==p.TunnelPrivacyId.ConstantPrivate&&C.privacy!==p.TunnelPrivacyId.ConstantPrivate,privacy:C.privacy,protocol:C.protocol}}I.fromServiceTunnel=S})(k=e.TunnelDtoConverter||(e.TunnelDtoConverter={})),e.IExtHostTunnelService=(0,t.createDecorator)("IExtHostTunnelService");let E=class{constructor(b){this.onDidChangeTunnels=new R.Emitter().event}async $applyCandidateFilter(b){return b}async openTunnel(b,S){}async getTunnels(){return[]}async setTunnelFactory(b){return{dispose:()=>{}}}registerPortsAttributesProvider(b,S){return{dispose:()=>{}}}async $providePortAttributes(b,S,C,r,u){return[]}async $forwardPort(b,S){}async $closeTunnel(b){}async $onDidTunnelsChange(){}async $registerCandidateFinder(){}};E=we([F(0,A.IExtHostRpcService)],E),e.ExtHostTunnelService=E}),define(ae[2269],le([1,0,56]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeWebviewMessage=e.serializeWebviewMessage=void 0;class p{constructor(){this.buffers=[]}add(I){let b=this.buffers.indexOf(I);return b<0&&(b=this.buffers.length,this.buffers.push(I)),b}}function R(E,I){if(I.serializeBuffersForPostMessage){const b=new p,S=(u,i)=>{if(i instanceof ArrayBuffer){const f=b.add(i);return{$$vscode_array_buffer_reference$$:!0,index:f}}else if(ArrayBuffer.isView(i)){const f=A(i);if(f){const c=b.add(i.buffer);return{$$vscode_array_buffer_reference$$:!0,index:c,view:{type:f,byteLength:i.byteLength,byteOffset:i.byteOffset}}}}return i},C=JSON.stringify(E,S),r=b.buffers.map(u=>{const i=new Uint8Array(u);return t.VSBuffer.wrap(i)});return{message:C,buffers:r}}else return{message:JSON.stringify(E),buffers:[]}}e.serializeWebviewMessage=R;function A(E){switch(E.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(E,I){const b=I.map(r=>{const u=new ArrayBuffer(r.byteLength);return new Uint8Array(u).set(r.buffer),u}),S=I.length?(r,u)=>{if(u&&typeof u=="object"&&u.$$vscode_array_buffer_reference$$){const i=u,{index:f}=i,c=b[f];if(i.view)switch(i.view.type){case 1:return new Int8Array(c,i.view.byteOffset,i.view.byteLength/Int8Array.BYTES_PER_ELEMENT);case 2:return new Uint8Array(c,i.view.byteOffset,i.view.byteLength/Uint8Array.BYTES_PER_ELEMENT);case 3:return new Uint8ClampedArray(c,i.view.byteOffset,i.view.byteLength/Uint8ClampedArray.BYTES_PER_ELEMENT);case 4:return new Int16Array(c,i.view.byteOffset,i.view.byteLength/Int16Array.BYTES_PER_ELEMENT);case 5:return new Uint16Array(c,i.view.byteOffset,i.view.byteLength/Uint16Array.BYTES_PER_ELEMENT);case 6:return new Int32Array(c,i.view.byteOffset,i.view.byteLength/Int32Array.BYTES_PER_ELEMENT);case 7:return new Uint32Array(c,i.view.byteOffset,i.view.byteLength/Uint32Array.BYTES_PER_ELEMENT);case 8:return new Float32Array(c,i.view.byteOffset,i.view.byteLength/Float32Array.BYTES_PER_ELEMENT);case 9:return new Float64Array(c,i.view.byteOffset,i.view.byteLength/Float64Array.BYTES_PER_ELEMENT);case 10:return new BigInt64Array(c,i.view.byteOffset,i.view.byteLength/BigInt64Array.BYTES_PER_ELEMENT);case 11:return new BigUint64Array(c,i.view.byteOffset,i.view.byteLength/BigUint64Array.BYTES_PER_ELEMENT);default:throw new Error("Unknown array buffer view type")}return c}return u}:void 0;return{message:JSON.parse(E,S),arrayBuffers:b}}e.deserializeWebviewMessage=k}),define(ae[843],le([1,0,56]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransferCache=void 0;class p{constructor(){this.requestIdPool=0,this.dataTransfers=new Map}add(A){const k=this.requestIdPool++;return this.dataTransfers.set(k,[...A.values()]),{id:k,dispose:()=>{this.dataTransfers.delete(k)}}}async resolveDropFileData(A,k){const E=this.dataTransfers.get(A);if(!E)throw new Error("No data transfer found");const I=E.find(S=>S.id===k);if(!I)throw new Error("No item found in data transfer");const b=I.asFile();if(!b)throw new Error("Found data transfer item is not a file");return t.VSBuffer.wrap(await b.data())}dispose(){this.dataTransfers.clear()}}e.DataTransferCache=p}),define(ae[626],le([1,0,2,6,15,7,84]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeMenuActions=void 0;class E extends t.Disposable{get primaryActions(){return this._primaryActions}get secondaryActions(){return this._secondaryActions}constructor(S,C,r,u){super(),this.options=C,this.menuService=r,this.contextKeyService=u,this._primaryActions=[],this._secondaryActions=[],this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.disposables=this._register(new t.DisposableStore),this.menu=this._register(r.createMenu(S,u)),this._register(this.menu.onDidChange(()=>this.updateActions())),this.updateActions()}updateActions(){this.disposables.clear(),this._primaryActions=[],this._secondaryActions=[],(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(S,C){const r=new t.DisposableStore;for(const u of S)if(u instanceof R.SubmenuItemAction&&!C[u.item.submenu.id]){const i=C[u.item.submenu.id]=r.add(this.menuService.createMenu(u.item.submenu,this.contextKeyService));r.add(i.onDidChange(()=>this.updateActions())),r.add(this.updateSubmenus(u.actions,C))}return r}}let I=class extends t.Disposable{constructor(S,C,r,u,i){super(),this.menuId=S,this.contextMenuId=C,this.options=r,this.contextKeyService=u,this.menuService=i,this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.menuActions=this._register(new E(S,this.options,i,u)),this._register(this.menuActions.onDidChange(()=>this._onDidChange.fire()))}getPrimaryActions(){return this.menuActions.primaryActions}getSecondaryActions(){return this.menuActions.secondaryActions}getContextMenuActions(){const S=[];if(this.contextMenuId){const C=this.menuService.createMenu(this.contextMenuId,this.contextKeyService);(0,k.createAndFillInActionBarActions)(C,this.options,{primary:[],secondary:S}),C.dispose()}return S}};I=we([F(3,A.IContextKeyService),F(4,R.IMenuService)],I),e.CompositeMenuActions=I}),define(ae[2270],le([1,0,1464,307,14,27,41,9,15,99,46,70]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class r extends I.Action2{constructor(){super({id:r.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,b.KeyChord)(2089,2096)},menu:{id:I.MenuId.MenubarHelpMenu,group:"2_reference",order:1}})}run(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService),v=R.isLinux?g.keyboardShortcutsUrlLinux:R.isMacintosh?g.keyboardShortcutsUrlMac:g.keyboardShortcutsUrlWin;v&&h.open(E.URI.parse(v))}}r.ID="workbench.action.keybindingsReference",r.AVAILABLE=!!(R.isLinux?p.default.keyboardShortcutsUrlLinux:R.isMacintosh?p.default.keyboardShortcutsUrlMac:p.default.keyboardShortcutsUrlWin);class u extends I.Action2{constructor(){super({id:u.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);g.introductoryVideosUrl&&h.open(E.URI.parse(g.introductoryVideosUrl))}}u.ID="workbench.action.openVideoTutorialsUrl",u.AVAILABLE=!!p.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);g.tipsAndTricksUrl&&h.open(E.URI.parse(g.tipsAndTricksUrl))}}i.ID="workbench.action.openTipsAndTricksUrl",i.AVAILABLE=!!p.default.tipsAndTricksUrl;class f extends I.Action2{constructor(){super({id:f.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);g.documentationUrl&&h.open(E.URI.parse(g.documentationUrl))}}f.ID="workbench.action.openDocumentationUrl",f.AVAILABLE=!!p.default.documentationUrl;class c extends I.Action2{constructor(){super({id:c.ID,title:{value:(0,t.localize)(8,null),original:"Signup for the VS Code Newsletter"},category:C.Categories.Help,f1:!0})}async run(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService),m=await o.get(A.ITelemetryService).getTelemetryInfo();h.open(E.URI.parse(`${g.newsletterSignupUrl}?machineId=${encodeURIComponent(m.machineId)}`))}}c.ID="workbench.action.openNewsletterSignupUrl",c.AVAILABLE=!!p.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);g.twitterUrl&&h.open(E.URI.parse(g.twitterUrl))}}l.ID="workbench.action.openTwitterUrl",l.AVAILABLE=!!p.default.twitterUrl;class s extends I.Action2{constructor(){super({id:s.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);g.requestFeatureUrl&&h.open(E.URI.parse(g.requestFeatureUrl))}}s.ID="workbench.action.openRequestFeatureUrl",s.AVAILABLE=!!p.default.requestFeatureUrl;class d extends I.Action2{constructor(){super({id:d.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);if(g.licenseUrl)if(R.language){const v=g.licenseUrl.indexOf("?")>0?"&":"?";h.open(E.URI.parse(`${g.licenseUrl}${v}lang=${R.language}`))}else h.open(E.URI.parse(g.licenseUrl))}}d.ID="workbench.action.openLicenseUrl",d.AVAILABLE=!!p.default.licenseUrl;class n extends I.Action2{constructor(){super({id:n.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(o){const g=o.get(S.IProductService),h=o.get(k.IOpenerService);g.privacyStatementUrl&&h.open(E.URI.parse(g.privacyStatementUrl))}}n.ID="workbench.action.openPrivacyStatementUrl",n.AVAILABE=!!p.default.privacyStatementUrl,r.AVAILABLE&&(0,I.registerAction2)(r),u.AVAILABLE&&(0,I.registerAction2)(u),i.AVAILABLE&&(0,I.registerAction2)(i),f.AVAILABLE&&(0,I.registerAction2)(f),c.AVAILABLE&&(0,I.registerAction2)(c),l.AVAILABLE&&(0,I.registerAction2)(l),s.AVAILABLE&&(0,I.registerAction2)(s),d.AVAILABLE&&(0,I.registerAction2)(d),n.AVAILABE&&(0,I.registerAction2)(n)}),define(ae[2271],le([1,0,98,196,76,752,16,7,580,489,757,31,755,305]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function i(d){d&&d.getHTMLElement()!==document.activeElement&&d.domFocus()}async function f(d,n){if(!R.WorkbenchListSelectionNavigation.getValue(d.contextKeyService))return n(d);const a=d.getFocus(),o=d.getSelection();await n(d);const g=d.getFocus();if(o.length>1||!(0,k.equals)(a,o)||(0,k.equals)(a,g))return;const h=new KeyboardEvent("keydown");d.setSelection(g,h)}async function c(d,n){if(!d)return;await f(d,n);const a=d.getFocus();a.length&&d.reveal(a[0]),d.setAnchor(a[0]),i(d)}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusDown",weight:200,when:R.WorkbenchListFocusContextKey,primary:18,mac:{primary:18,secondary:[300]},handler:(d,n)=>{c(d.get(R.IListService).lastFocusedList,async a=>{const o=new KeyboardEvent("keydown");await a.focusNext(typeof n=="number"?n:1,!1,o)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusUp",weight:200,when:R.WorkbenchListFocusContextKey,primary:16,mac:{primary:16,secondary:[302]},handler:(d,n)=>{c(d.get(R.IListService).lastFocusedList,async a=>{const o=new KeyboardEvent("keydown");await a.focusPrevious(typeof n=="number"?n:1,!1,o)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageDown",weight:200,when:R.WorkbenchListFocusContextKey,primary:12,handler:d=>{c(d.get(R.IListService).lastFocusedList,async n=>{const a=new KeyboardEvent("keydown");await n.focusNextPage(a)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusPageUp",weight:200,when:R.WorkbenchListFocusContextKey,primary:11,handler:d=>{c(d.get(R.IListService).lastFocusedList,async n=>{const a=new KeyboardEvent("keydown");await n.focusPreviousPage(a)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusFirst",weight:200,when:R.WorkbenchListFocusContextKey,primary:14,handler:d=>{c(d.get(R.IListService).lastFocusedList,async n=>{const a=new KeyboardEvent("keydown");await n.focusFirst(a)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusLast",weight:200,when:R.WorkbenchListFocusContextKey,primary:13,handler:d=>{c(d.get(R.IListService).lastFocusedList,async n=>{const a=new KeyboardEvent("keydown");await n.focusLast(a)})}});function l(d,n){if(d instanceof p.List||d instanceof A.PagedList||d instanceof r.Table){const a=d,o=a.getFocus()?a.getFocus()[0]:void 0,g=a.getSelection();g&&typeof o=="number"&&g.indexOf(o)>=0?a.setSelection(g.filter(h=>h!==n)):typeof o=="number"&&a.setSelection(g.concat(o))}else if(d instanceof I.ObjectTree||d instanceof S.DataTree||d instanceof b.AsyncDataTree){const a=d,o=a.getFocus()?a.getFocus()[0]:void 0;if(n===o)return;const g=a.getSelection(),h=new KeyboardEvent("keydown",{shiftKey:!0});g&&g.indexOf(o)>=0?a.setSelection(g.filter(v=>v!==n),h):a.setSelection(g.concat(o),h)}}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionDown",weight:200,when:E.ContextKeyExpr.and(R.WorkbenchListFocusContextKey,R.WorkbenchListSupportsMultiSelectContextKey),primary:1042,handler:(d,n)=>{const a=d.get(R.IListService).lastFocusedList;if(!a)return;const o=a.getFocus()?a.getFocus()[0]:void 0,g=new KeyboardEvent("keydown");a.focusNext(typeof n=="number"?n:1,!1,g),l(a,o);const h=a.getFocus();h.length&&a.reveal(h[0]),i(a)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expandSelectionUp",weight:200,when:E.ContextKeyExpr.and(R.WorkbenchListFocusContextKey,R.WorkbenchListSupportsMultiSelectContextKey),primary:1040,handler:(d,n)=>{const a=d.get(R.IListService).lastFocusedList;if(!a)return;const o=a.getFocus()?a.getFocus()[0]:void 0,g=new KeyboardEvent("keydown");a.focusPrevious(typeof n=="number"?n:1,!1,g),l(a,o);const h=a.getFocus();h.length&&a.reveal(h[0]),i(a)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapse",weight:200,when:E.ContextKeyExpr.and(R.WorkbenchListFocusContextKey,E.ContextKeyExpr.or(R.WorkbenchTreeElementCanCollapse,R.WorkbenchTreeElementHasParent)),primary:15,mac:{primary:15,secondary:[2064]},handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(!n||!(n instanceof I.ObjectTree||n instanceof S.DataTree||n instanceof b.AsyncDataTree))return;const a=n,o=a.getFocus();if(o.length===0)return;const g=o[0];if(!a.collapse(g)){const h=a.getParentElement(g);h&&c(n,v=>{const m=new KeyboardEvent("keydown");v.setFocus([h],m)})}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapseAll",weight:200,when:R.WorkbenchListFocusContextKey,primary:2063,mac:{primary:2063,secondary:[3088]},handler:d=>{const n=d.get(R.IListService).lastFocusedList;n&&!(n instanceof p.List||n instanceof A.PagedList||n instanceof r.Table)&&n.collapseAll()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.collapseAllToFocus",weight:200,when:R.WorkbenchListFocusContextKey,handler:d=>{const n=d.get(R.IListService).lastFocusedList,a=(0,R.getSelectionKeyboardEvent)("keydown",!0);if(n instanceof I.ObjectTree||n instanceof S.DataTree||n instanceof b.AsyncDataTree){const o=n,g=o.getFocus();g.length>0&&o.collapse(g[0],!0),o.setSelection(g,a),o.setAnchor(g[0])}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.focusParent",weight:200,when:R.WorkbenchListFocusContextKey,handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(!n||!(n instanceof I.ObjectTree||n instanceof S.DataTree||n instanceof b.AsyncDataTree))return;const a=n,o=a.getFocus();if(o.length===0)return;const g=o[0],h=a.getParentElement(g);h&&c(n,v=>{const m=new KeyboardEvent("keydown");v.setFocus([h],m)})}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.expand",weight:200,when:E.ContextKeyExpr.and(R.WorkbenchListFocusContextKey,E.ContextKeyExpr.or(R.WorkbenchTreeElementCanExpand,R.WorkbenchTreeElementHasChild)),primary:17,handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(!!n){if(n instanceof I.ObjectTree||n instanceof S.DataTree){const a=n.getFocus();if(a.length===0)return;const o=a[0];if(!n.expand(o)){const g=n.getFirstElementChild(o);g&&n.getNode(g).visible&&c(n,v=>{const m=new KeyboardEvent("keydown");v.setFocus([g],m)})}}else if(n instanceof b.AsyncDataTree){const a=n.getFocus();if(a.length===0)return;const o=a[0];n.expand(o).then(g=>{if(o&&!g){const h=n.getFirstElementChild(o);h&&n.getNode(h).visible&&c(n,m=>{const w=new KeyboardEvent("keydown");m.setFocus([h],w)})}})}}}});function s(d,n){const a=d.get(R.IListService).lastFocusedList,o=(0,R.getSelectionKeyboardEvent)("keydown",n);if(a instanceof p.List||a instanceof A.PagedList||a instanceof r.Table){const g=a;g.setSelection(g.getFocus(),o),g.setAnchor(g.getFocus()[0])}else if(a instanceof I.ObjectTree||a instanceof S.DataTree||a instanceof b.AsyncDataTree){const g=a,h=g.getFocus();if(h.length>0){let v=!0;(g.expandOnlyOnTwistieClick===!0||typeof g.expandOnlyOnTwistieClick!="boolean"&&g.expandOnlyOnTwistieClick(h[0]))&&(v=!1),v&&g.toggleCollapsed(h[0])}g.setSelection(h,o),g.setAnchor(h[0])}}t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.select",weight:200,when:R.WorkbenchListFocusContextKey,primary:3,mac:{primary:3,secondary:[2066]},handler:d=>{s(d,!1)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAndPreserveFocus",weight:200,when:R.WorkbenchListFocusContextKey,handler:d=>{s(d,!0)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.selectAll",weight:200,when:E.ContextKeyExpr.and(R.WorkbenchListFocusContextKey,R.WorkbenchListSupportsMultiSelectContextKey),primary:2079,handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(n instanceof p.List||n instanceof A.PagedList||n instanceof r.Table){const a=n,o=new KeyboardEvent("keydown");a.setSelection((0,k.range)(a.length),o)}else if(n instanceof I.ObjectTree||n instanceof S.DataTree||n instanceof b.AsyncDataTree){const a=n,o=a.getFocus(),g=a.getSelection();let h;o.length>0&&(g.length===0||!g.includes(o[0]))&&(h=o[0]),!h&&g.length>0&&(h=g[0]);let v;h?v=a.getParentElement(h):v=void 0;const m=[],w=y=>{for(const T of y.children)T.visible&&(m.push(T.element),T.collapsed||w(T))};w(a.getNode(v)),v&&g.length===m.length&&m.unshift(v);const D=new KeyboardEvent("keydown");a.setSelection(m,D)}}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleSelection",weight:200,when:R.WorkbenchListFocusContextKey,primary:3075,handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(!n)return;const a=n.getFocus();if(a.length===0)return;const o=n.getSelection(),g=o.indexOf(a[0]);g>-1?n.setSelection([...o.slice(0,g),...o.slice(g+1)]):n.setSelection([...o,a[0]])}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.toggleExpand",weight:200,when:R.WorkbenchListFocusContextKey,primary:10,handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(n instanceof I.ObjectTree||n instanceof S.DataTree||n instanceof b.AsyncDataTree){const a=n,o=a.getFocus();if(o.length>0&&a.isCollapsible(o[0])){a.toggleCollapsed(o[0]);return}}s(d,!0)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.clear",weight:200,when:E.ContextKeyExpr.and(R.WorkbenchListFocusContextKey,R.WorkbenchListHasSelectionOrFocus),primary:9,handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(!n)return;const a=n.getSelection(),o=new KeyboardEvent("keydown");if(a.length>1)if(R.WorkbenchListSelectionNavigation.getValue(n.contextKeyService)){const h=n.getFocus();n.setSelection([h[0]],o)}else n.setSelection([],o);else n.setSelection([],o),n.setFocus([],o);n.setAnchor(void 0)}}),C.CommandsRegistry.registerCommand({id:"list.triggerTypeNavigation",handler:d=>{d.get(R.IListService).lastFocusedList?.triggerTypeNavigation()}}),C.CommandsRegistry.registerCommand({id:"list.toggleFindMode",handler:d=>{const n=d.get(R.IListService).lastFocusedList;if(n instanceof u.AbstractTree||n instanceof b.AsyncDataTree){const a=n;a.findMode=a.findMode===u.TreeFindMode.Filter?u.TreeFindMode.Highlight:u.TreeFindMode.Filter}}}),C.CommandsRegistry.registerCommandAlias("list.toggleKeyboardNavigation","list.triggerTypeNavigation"),C.CommandsRegistry.registerCommandAlias("list.toggleFilterOnType","list.toggleFindMode"),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.find",weight:200,when:E.ContextKeyExpr.and(R.RawWorkbenchListFocusContextKey,R.WorkbenchListSupportsFind),primary:2084,secondary:[61],handler:d=>{const n=d.get(R.IListService).lastFocusedList;n instanceof p.List||n instanceof A.PagedList||n instanceof r.Table||(n instanceof u.AbstractTree||n instanceof b.AsyncDataTree)&&n.openFind()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.closeFind",weight:200,when:E.ContextKeyExpr.and(R.RawWorkbenchListFocusContextKey,R.WorkbenchTreeFindOpen),primary:9,handler:d=>{const n=d.get(R.IListService).lastFocusedList;(n instanceof u.AbstractTree||n instanceof b.AsyncDataTree)&&n.closeFind()}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollUp",weight:200,when:R.WorkbenchListFocusContextKey,primary:2064,handler:d=>{const n=d.get(R.IListService).lastFocusedList;!n||(n.scrollTop-=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollDown",weight:200,when:R.WorkbenchListFocusContextKey,primary:2066,handler:d=>{const n=d.get(R.IListService).lastFocusedList;!n||(n.scrollTop+=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollLeft",weight:200,when:R.WorkbenchListFocusContextKey,handler:d=>{const n=d.get(R.IListService).lastFocusedList;!n||(n.scrollLeft-=10)}}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"list.scrollRight",weight:200,when:R.WorkbenchListFocusContextKey,handler:d=>{const n=d.get(R.IListService).lastFocusedList;!n||(n.scrollLeft+=10)}})}),define(ae[2272],le([1,0,1481,198,25,68,758,12,73,2,10,38,46,93,208,5,184]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserDialogHandler=void 0;let l=class ba{constructor(d,n,a,o,g,h,v){this.logService=d,this.layoutService=n,this.themeService=a,this.keybindingService=o,this.instantiationService=g,this.productService=h,this.clipboardService=v,this.markdownRenderer=this.instantiationService.createInstance(c.MarkdownRenderer,{})}async confirm(d){this.logService.trace("DialogService#confirm",d.message);const n=[];d.primaryButton?n.push(d.primaryButton):n.push((0,t.localize)(0,null)),d.secondaryButton?n.push(d.secondaryButton):typeof d.secondaryButton>"u"&&n.push((0,t.localize)(1,null));const a=await this.doShow(d.type,d.message,n,d.detail,1,d.checkbox);return{confirmed:a.button===0,checkboxChecked:a.checkboxChecked}}getDialogType(d){return d===A.default.Info?"question":d===A.default.Error?"error":d===A.default.Warning?"warning":"none"}async show(d,n,a,o){this.logService.trace("DialogService#show",n);const g=await this.doShow(this.getDialogType(d),n,a,o?.detail,o?.cancelId,o?.checkbox,void 0,typeof o?.custom=="object"?o.custom:void 0);return{choice:g.button,checkboxChecked:g.checkboxChecked}}async doShow(d,n,a,o,g,h,v,m){const w=new b.DisposableStore,D=m?_=>{_.classList.add(...m.classes||[]),m.markdownDetails?.forEach(L=>{const M=this.markdownRenderer.render(L.markdown);_.appendChild(M.element),M.element.classList.add(...L.classes||[]),w.add(M)})}:void 0,y=new k.Dialog(this.layoutService.container,n,a,{detail:o,cancelId:g,type:d,keyEventProcessor:_=>{const L=this.keybindingService.softDispatch(_,this.layoutService.container);L?.commandId&&ba.ALLOWABLE_COMMANDS.indexOf(L.commandId)===-1&&S.EventHelper.stop(_,!0)},renderBody:D,icon:m?.icon,disableCloseAction:m?.disableCloseAction,buttonDetails:m?.buttonDetails,checkboxLabel:h?.label,checkboxChecked:h?.checked,inputs:v});w.add(y),w.add((0,I.attachDialogStyler)(y,this.themeService));const T=await y.show();return w.dispose(),T}async input(d,n,a,o,g){this.logService.trace("DialogService#input",n);const h=await this.doShow(this.getDialogType(d),n,a,g?.detail,g?.cancelId,g?.checkbox,o);return{choice:h.button,checkboxChecked:h.checkboxChecked,values:h.values}}async about(){const d=g=>(0,t.localize)(2,null,this.productService.version||"Unknown",this.productService.commit||"Unknown",this.productService.date?`${this.productService.date}${g?" ("+(0,i.fromNow)(new Date(this.productService.date),!0)+")":""}`:"Unknown",navigator.userAgent),n=d(!0),a=d(!1),{choice:o}=await this.show(A.default.Info,this.productService.nameLong,[(0,t.localize)(3,null),(0,t.localize)(4,null)],{detail:n,cancelId:1});o===0&&this.clipboardService.writeText(a)}};l.ALLOWABLE_COMMANDS=["copy","cut","editor.action.selectAll","editor.action.clipboardCopyAction","editor.action.clipboardCutAction","editor.action.clipboardPasteAction"],l=we([F(0,R.ILogService),F(1,p.ILayoutService),F(2,E.IThemeService),F(3,C.IKeybindingService),F(4,f.IInstantiationService),F(5,r.IProductService),F(6,u.IClipboardService)],l),e.BrowserDialogHandler=l}),define(ae[516],le([1,0,6,1484,55,35,5,17]),function(J,e,t,p,R,A,k,E){"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,r){if(this._map.has(C))throw new Error(`group (${C}) has already a widget`);return this._map.set(C,r),{dispose:()=>this._map.delete(C)}}getWidget(C){return this._map.get(C)}}e.BreadcrumbsService=I,(0,A.registerSingleton)(e.IBreadcrumbsService,I,1);class b{constructor(){}static _stub(C){return{bindTo(r){const u=new t.Emitter,i=r.onDidChangeConfiguration(f=>{f.affectsConfiguration(C)&&u.fire(void 0)});return new class{constructor(){this.name=C,this.onDidChange=u.event}getValue(f){return f?r.getValue(C,f):r.getValue(C)}updateValue(f,c){return c?r.updateValue(C,f,c):r.updateValue(C,f)}dispose(){i.dispose(),u.dispose()}}}}}}e.BreadcrumbsConfig=b,b.IsEnabled=b._stub("breadcrumbs.enabled"),b.UseQuickPick=b._stub("breadcrumbs.useQuickPick"),b.FilePath=b._stub("breadcrumbs.filePath"),b.SymbolPath=b._stub("breadcrumbs.symbolPath"),b.SymbolSortOrder=b._stub("breadcrumbs.symbolSortOrder"),b.Icons=b._stub("breadcrumbs.icons"),b.TitleScrollbarSizing=b._stub("workbench.editor.titleScrollbarSizing"),b.FileExcludes=b._stub("files.exclude"),E.Registry.as(R.Extensions.Configuration).registerConfiguration({id:"breadcrumbs",title:(0,p.localize)(0,null),order:101,type:"object",properties:{"breadcrumbs.enabled":{description:(0,p.localize)(1,null),type:"boolean",default:!0},"breadcrumbs.filePath":{description:(0,p.localize)(2,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[(0,p.localize)(3,null),(0,p.localize)(4,null),(0,p.localize)(5,null)]},"breadcrumbs.symbolPath":{description:(0,p.localize)(6,null),type:"string",default:"on",enum:["on","off","last"],enumDescriptions:[(0,p.localize)(7,null),(0,p.localize)(8,null),(0,p.localize)(9,null)]},"breadcrumbs.symbolSortOrder":{description:(0,p.localize)(10,null),type:"string",default:"position",scope:5,enum:["position","name","type"],enumDescriptions:[(0,p.localize)(11,null),(0,p.localize)(12,null),(0,p.localize)(13,null)]},"breadcrumbs.icons":{description:(0,p.localize)(14,null),type:"boolean",default:!0},"breadcrumbs.showFiles":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(15,null)},"breadcrumbs.showModules":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(16,null)},"breadcrumbs.showNamespaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(17,null)},"breadcrumbs.showPackages":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(18,null)},"breadcrumbs.showClasses":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(19,null)},"breadcrumbs.showMethods":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(20,null)},"breadcrumbs.showProperties":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(21,null)},"breadcrumbs.showFields":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(22,null)},"breadcrumbs.showConstructors":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(23,null)},"breadcrumbs.showEnums":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(24,null)},"breadcrumbs.showInterfaces":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(25,null)},"breadcrumbs.showFunctions":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(26,null)},"breadcrumbs.showVariables":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(27,null)},"breadcrumbs.showConstants":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(28,null)},"breadcrumbs.showStrings":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(29,null)},"breadcrumbs.showNumbers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(30,null)},"breadcrumbs.showBooleans":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(31,null)},"breadcrumbs.showArrays":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(32,null)},"breadcrumbs.showObjects":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(33,null)},"breadcrumbs.showKeys":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(34,null)},"breadcrumbs.showNull":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(35,null)},"breadcrumbs.showEnumMembers":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(36,null)},"breadcrumbs.showStructs":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(37,null)},"breadcrumbs.showEvents":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(38,null)},"breadcrumbs.showOperators":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(39,null)},"breadcrumbs.showTypeParameters":{type:"boolean",default:!0,scope:5,markdownDescription:(0,p.localize)(40,null)}}})}),define(ae[311],le([1,0,10,13]),function(J,e,t,p){"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 R(E){return E.affectsConfiguration("workbench.editor")||E.affectsConfiguration("workbench.iconTheme")}e.impactsEditorPartOptions=R;function A(E,I){const b={...e.DEFAULT_EDITOR_PART_OPTIONS,hasIcons:I.getFileIconTheme().hasFileIcons},S=E.getValue();if(S?.workbench?.editor)if(Object.assign(b,S.workbench.editor),(0,p.isObject)(S.workbench.editor.autoLockGroups)){b.autoLockGroups=new Set;for(const[C,r]of Object.entries(S.workbench.editor.autoLockGroups))r===!0&&b.autoLockGroups.add(C)}else b.autoLockGroups=void 0;return b}e.getEditorPartOptions=A;function k(E,I,b){return!I||!E.activeEditor||I.matches(E.activeEditor)?{...b,viewState:E.activeEditorPane?.getViewState()}:b||Object.create(null)}e.fillActiveEditorViewState=k}),define(ae[2273],le([1,0,110,1504,2,117,26,6]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsAlerts=void 0;class I extends R.Disposable{constructor(S){super(),this.model=S;for(const C of S.notifications)this.triggerAriaAlert(C);this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(S=>this.onDidChangeNotification(S)))}onDidChangeNotification(S){S.kind===0&&(this.triggerAriaAlert(S.item),S.item.severity===k.Severity.Error&&(S.item.message.original instanceof Error?console.error(S.item.message.original):console.error((0,A.toErrorMessage)(S.item.message.linkedText.toString(),!0))))}triggerAriaAlert(S){if(S.silent)return;const C=S.onDidChangeContent(r=>{r.kind===1&&this.doTriggerAriaAlert(S)});E.Event.once(S.onDidClose)(()=>C.dispose()),this.doTriggerAriaAlert(S)}doTriggerAriaAlert(S){let C;S.severity===k.Severity.Error?C=(0,p.localize)(0,null,S.message.linkedText.toString()):S.severity===k.Severity.Warning?C=(0,p.localize)(1,null,S.message.linkedText.toString()):C=(0,p.localize)(2,null,S.message.linkedText.toString()),(0,t.alert)(C)}}e.NotificationsAlerts=I}),define(ae[844],le([1,0,2,26,27,108]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsTelemetry=e.notificationToMetrics=void 0;function k(I,b,S){return{id:(0,A.hash)(I.toString()).toString(),silent:S,source:b||"core"}}e.notificationToMetrics=k;let E=class extends t.Disposable{constructor(b,S){super(),this.telemetryService=b,this.notificationService=S,this.registerListeners()}registerListeners(){this._register(this.notificationService.onDidAddNotification(b=>{const S=b.source&&typeof b.source!="string"?b.source.id:b.source;this.telemetryService.publicLog2("notification:show",k(b.message,S,!!b.silent))})),this._register(this.notificationService.onDidRemoveNotification(b=>{const S=b.source&&typeof b.source!="string"?b.source.id:b.source;this.telemetryService.publicLog2("notification:close",k(b.message,S,!!b.silent))}))}};E=we([F(0,R.ITelemetryService),F(1,p.INotificationService)],E),e.NotificationsTelemetry=E}),define(ae[2274],le([1,0,10,197,29,6,2,1521,73]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TreeItemCheckbox=e.CheckboxStateHandler=void 0;class b extends k.Disposable{constructor(){super(...arguments),this._onDidChangeCheckboxState=this._register(new A.Emitter),this.onDidChangeCheckboxState=this._onDidChangeCheckboxState.event}setCheckboxState(r){this._onDidChangeCheckboxState.fire([r])}}e.CheckboxStateHandler=b;class S extends k.Disposable{constructor(r,u,i){super(),this.checkboxStateHandler=u,this.themeService=i,this.isDisposed=!1,this._onDidChangeState=new A.Emitter,this.onDidChangeState=this._onDidChangeState.event,this.checkboxContainer=r}render(r){r.checkbox&&(this.toggle?(this.toggle.checked=r.checkbox.isChecked,this.toggle.setIcon(this.toggle.checked?R.Codicon.check:void 0)):this.createCheckbox(r))}createCheckbox(r){r.checkbox&&(this.toggle=new p.Toggle({isChecked:r.checkbox.isChecked,title:this.createCheckboxTitle(r.checkbox),icon:r.checkbox.isChecked?R.Codicon.check:void 0}),this.toggle.domNode.classList.add(S.checkboxClass),t.append(this.checkboxContainer,this.toggle.domNode),this.registerListener(r))}registerListener(r){this.toggle&&(this._register({dispose:()=>this.removeCheckbox()}),this._register(this.toggle),this._register(this.toggle.onChange(()=>{this.setCheckbox(r)})),this._register((0,I.attachToggleStyler)(this.toggle,this.themeService)))}setCheckbox(r){this.toggle&&r.checkbox&&(r.checkbox.isChecked=this.toggle.checked,this.toggle.setIcon(this.toggle.checked?R.Codicon.check:void 0),this.toggle.setTitle(this.createCheckboxTitle(r.checkbox)),this.checkboxStateHandler.setCheckboxState(r))}createCheckboxTitle(r){return r.tooltip?r.tooltip:r.isChecked?(0,E.localize)(0,null):(0,E.localize)(1,null)}removeCheckbox(){const r=this.checkboxContainer.children;for(const u of r)this.checkboxContainer.removeChild(u)}}e.TreeItemCheckbox=S,S.checkboxClass="custom-view-tree-node-item-checkbox"}),define(ae[627],le([1,0,11,10,37,12,73,2,33,1523,5,265,7,29,38,372,15,245,84,140,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterWidget=e.viewFilterSubmenu=void 0;const a=new c.MenuId("menu.view.filter");e.viewFilterSubmenu=new c.MenuId("submenu.view.filter"),c.MenuRegistry.appendMenuItem(a,{submenu:e.viewFilterSubmenu,title:(0,b.localize)(0,null),group:"navigation",icon:u.Codicon.filter});class o extends s.SubmenuEntryActionViewItem{constructor(){super(...arguments),this._checked=!1}set checked(v){this._checked!==v&&(this._checked=v,this.updateChecked())}updateChecked(){this.element&&this.element.classList.toggle("checked",this._checked)}render(v){super.render(v),this.updateChecked()}}let g=class extends d.Widget{constructor(v,m,w,D,y,T){super(),this.options=v,this.instantiationService=m,this.contextViewService=w,this.themeService=D,this.keybindingService=T,this._onDidChangeFilterText=this._register(new n.Emitter),this.onDidChangeFilterText=this._onDidChangeFilterText.event,this.isMoreFiltersChecked=!1,this.delayedFilterUpdate=new t.Delayer(400),this._register((0,E.toDisposable)(()=>this.delayedFilterUpdate.cancel())),v.focusContextKey&&(this.focusContextKey=new r.RawContextKey(v.focusContextKey,!1).bindTo(y)),this.element=p.$(".viewpane-filter"),this.filterInputBox=this.createInput(this.element);const _=p.append(this.element,p.$(".viewpane-filter-controls"));this.filterBadge=this.createBadge(_),this.toolbar=this._register(this.createToolBar(_)),this.adjustInputBox()}focus(){this.filterInputBox.focus()}blur(){this.filterInputBox.blur()}updateBadge(v){this.filterBadge.classList.toggle("hidden",!v),this.filterBadge.textContent=v||"",this.adjustInputBox()}setFilterText(v){this.filterInputBox.value=v}getFilterText(){return this.filterInputBox.value}getHistory(){return this.filterInputBox.getHistory()}layout(v){this.element.parentElement?.classList.toggle("grow",v>700),this.element.classList.toggle("small",v<400),this.adjustInputBox()}checkMoreFilters(v){this.isMoreFiltersChecked=v,this.moreFiltersActionViewItem&&(this.moreFiltersActionViewItem.checked=v)}createInput(v){const m=this._register(this.instantiationService.createInstance(C.ContextScopedHistoryInputBox,v,this.contextViewService,{placeholder:this.options.placeholder,ariaLabel:this.options.ariaLabel,history:this.options.history||[],showHistoryHint:()=>(0,f.showHistoryKeybindingHint)(this.keybindingService)}));this._register((0,k.attachInputBoxStyler)(m,this.themeService)),this.options.text&&(m.value=this.options.text),this._register(m.onDidChange(D=>this.delayedFilterUpdate.trigger(()=>this.onDidInputChange(m)))),this._register(p.addStandardDisposableListener(m.inputElement,p.EventType.KEY_DOWN,D=>this.onInputKeyDown(D,m))),this._register(p.addStandardDisposableListener(v,p.EventType.KEY_DOWN,this.handleKeyboardEvent)),this._register(p.addStandardDisposableListener(v,p.EventType.KEY_UP,this.handleKeyboardEvent)),this._register(p.addStandardDisposableListener(m.inputElement,p.EventType.CLICK,D=>{D.stopPropagation(),D.preventDefault()}));const w=this._register(p.trackFocus(m.inputElement));return this.focusContextKey&&(this._register(w.onDidFocus(()=>this.focusContextKey.set(!0))),this._register(w.onDidBlur(()=>this.focusContextKey.set(!1))),this._register((0,E.toDisposable)(()=>this.focusContextKey.reset()))),m}createBadge(v){const m=p.append(v,p.$(".viewpane-filter-badge.hidden"));return this._register((0,k.attachStylerCallback)(this.themeService,{badgeBackground:I.badgeBackground,badgeForeground:I.badgeForeground,contrastBorder:I.contrastBorder},w=>{const D=w.badgeBackground?w.badgeBackground.toString():"",y=w.badgeForeground?w.badgeForeground.toString():"",T=w.contrastBorder?w.contrastBorder.toString():"";m.style.backgroundColor=D,m.style.borderWidth=T?"1px":"",m.style.borderStyle=T?"solid":"",m.style.borderColor=T,m.style.color=y})),m}createToolBar(v){return this.instantiationService.createInstance(l.MenuWorkbenchToolBar,v,a,{hiddenItemStrategy:-1,actionViewItemProvider:m=>{if(m instanceof c.SubmenuItemAction&&m.item.submenu.id===e.viewFilterSubmenu.id)return this.moreFiltersActionViewItem=this.instantiationService.createInstance(o,m,void 0),this.moreFiltersActionViewItem.checked=this.isMoreFiltersChecked,this.moreFiltersActionViewItem}})}onDidInputChange(v){v.addToHistory(),this._onDidChangeFilterText.fire(v.value)}adjustInputBox(){this.filterInputBox.inputElement.style.paddingRight=this.element.classList.contains("small")||this.filterBadge.classList.contains("hidden")?"25px":"150px"}handleKeyboardEvent(v){(v.equals(10)||v.equals(15)||v.equals(17))&&v.stopPropagation()}onInputKeyDown(v,m){let w=!1;v.equals(2)&&(this.toolbar.focus(),w=!0),w&&(v.stopPropagation(),v.preventDefault())}};g=we([F(1,S.IInstantiationService),F(2,R.IContextViewService),F(3,A.IThemeService),F(4,r.IContextKeyService),F(5,i.IKeybindingService)],g),e.FilterWidget=g,(0,A.registerThemingParticipant)((h,v)=>{const m=h.getColor(I.inputActiveOptionBorder);m&&v.addRule(`.viewpane-filter > .viewpane-filter-controls .monaco-action-bar .action-label.codicon.codicon-filter.checked { border-color: ${m}; }`);const w=h.getColor(I.inputActiveOptionForeground);w&&v.addRule(`.viewpane-filter > .viewpane-filter-controls .monaco-action-bar .action-label.codicon.codicon-filter.checked { color: ${w}; }`);const D=h.getColor(I.inputActiveOptionBackground);D&&v.addRule(`.viewpane-filter > .viewpane-filter-controls .monaco-action-bar .action-label.codicon.codicon-filter.checked { background-color: ${D}; }`)})}),define(ae[336],le([1,0,1527,7,38,48]),function(J,e,t,p,R,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 p.RawContextKey(e.inQuickPickContextKeyValue,!1,(0,t.localize)(0,null)),e.inQuickPickContext=p.ContextKeyExpr.has(e.inQuickPickContextKeyValue),e.defaultQuickAccessContextKeyValue="inFilesPicker",e.defaultQuickAccessContext=p.ContextKeyExpr.and(e.inQuickPickContext,p.ContextKeyExpr.has(e.defaultQuickAccessContextKeyValue));function k(E,I){return b=>{const S=b.get(R.IKeybindingService),C=b.get(A.IQuickInputService),u={keybindings:S.lookupKeybindings(E)};C.navigate(!!I,u)}}e.getQuickNavigateHandler=k}),define(ae[2275],le([1,0,1467,15,98,48,38,31,336]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const b={primary:2094,secondary:[2083],mac:{primary:2094,secondary:void 0}};R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.closeQuickOpen",weight:200,when:I.inQuickPickContext,primary:9,secondary:[1033],handler:l=>l.get(A.IQuickInputService).cancel()}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.acceptSelectedQuickOpenItem",weight:200,when:I.inQuickPickContext,primary:0,handler:l=>l.get(A.IQuickInputService).accept()}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.alternativeAcceptSelectedQuickOpenItem",weight:200,when:I.inQuickPickContext,primary:0,handler:l=>l.get(A.IQuickInputService).accept({ctrlCmd:!0,alt:!1})}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.focusQuickOpen",weight:200,when:I.inQuickPickContext,primary:0,handler:l=>{l.get(A.IQuickInputService).focus()}});const S="workbench.action.quickOpenNavigateNextInFilePicker";R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:S,weight:200+50,handler:(0,I.getQuickNavigateHandler)(S,!0),when:I.defaultQuickAccessContext,primary:b.primary,secondary:b.secondary,mac:b.mac});const C="workbench.action.quickOpenNavigatePreviousInFilePicker";R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:C,weight:200+50,handler:(0,I.getQuickNavigateHandler)(C,!1),when:I.defaultQuickAccessContext,primary:b.primary|1024,secondary:[b.secondary[0]|1024],mac:{primary:b.mac.primary|1024,secondary:void 0}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickPickManyToggle",weight:200,when:I.inQuickPickContext,primary:0,handler:l=>{l.get(A.IQuickInputService).toggle()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.quickInputBack",weight:200+50,when:I.inQuickPickContext,primary:0,win:{primary:527},mac:{primary:339},linux:{primary:2643},handler:l=>{l.get(A.IQuickInputService).back()}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"workbench.action.quickOpen",title:{value:(0,t.localize)(0,null),original:"Go to File..."},description:{description:"Quick access",args:[{name:"prefix",schema:{type:"string"}}]},keybinding:{weight:200,primary:b.primary,secondary:b.secondary,mac:b.mac},f1:!0})}run(s,d){s.get(A.IQuickInputService).quickAccess.show(typeof d=="string"?d:void 0,{preserveValue:typeof d=="string"})}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"workbench.action.quickOpenWithModes",title:{value:(0,t.localize)(1,null),original:"Launch Command Center"},f1:!0,menu:{id:p.MenuId.CommandCenter,order:100}})}run(s){s.get(A.IQuickInputService).quickAccess.show(void 0,{providerOptions:{includeHelp:!0}})}}),E.CommandsRegistry.registerCommand("workbench.action.quickOpenPreviousEditor",async l=>{l.get(A.IQuickInputService).quickAccess.show("",{itemActivation:A.ItemActivation.SECOND})});class r extends p.Action2{constructor(s,d,n,a,o){super({id:s,title:d,f1:!0,keybinding:o}),this.id=s,this.next=n,this.quickNavigate=a}async run(s){const d=s.get(k.IKeybindingService),n=s.get(A.IQuickInputService),a=d.lookupKeybindings(this.id),o=this.quickNavigate?{keybindings:a}:void 0;n.navigate(this.next,o)}}class u extends r{constructor(){super("workbench.action.quickOpenNavigateNext",{value:(0,t.localize)(2,null),original:"Navigate Next in Quick Open"},!0,!0)}}class i extends r{constructor(){super("workbench.action.quickOpenNavigatePrevious",{value:(0,t.localize)(3,null),original:"Navigate Previous in Quick Open"},!1,!0)}}class f extends r{constructor(){super("workbench.action.quickOpenSelectNext",{value:(0,t.localize)(4,null),original:"Select Next in Quick Open"},!0,!1,{weight:200+50,when:I.inQuickPickContext,primary:0,mac:{primary:300}})}}class c extends r{constructor(){super("workbench.action.quickOpenSelectPrevious",{value:(0,t.localize)(5,null),original:"Select Previous in Quick Open"},!1,!1,{weight:200+50,when:I.inQuickPickContext,primary:0,mac:{primary:302}})}}(0,p.registerAction2)(f),(0,p.registerAction2)(c),(0,p.registerAction2)(u),(0,p.registerAction2)(i)}),define(ae[845],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parentOriginHash=void 0;async function t(R,A){if(!crypto.subtle)throw new Error("'crypto.subtle' is not available so webviews will not work. This is likely because the editor is not running in a secure context (https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts).");const k=JSON.stringify({parentOrigin:R,salt:A}),I=new TextEncoder().encode(k),b=await crypto.subtle.digest("sha-256",I);return p(b)}e.parentOriginHash=t;function p(R){const k=Array.from(new Uint8Array(R)).map(E=>E.toString(16).padStart(2,"0")).join("");return BigInt(`0x${k}`).toString(32).padStart(52,"0")}}),define(ae[846],le([1,0]),function(J,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(ae[214],le([1,0,1530,17,34,8,2,6]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationMigrationWorkbenchContribution=e.Extensions=e.workbenchConfigurationNodeBase=void 0,e.workbenchConfigurationNodeBase=Object.freeze({id:"workbench",order:7,title:(0,t.localize)(0,null),type:"object"}),e.Extensions={ConfigurationMigration:"base.contributions.configuration.migration"};class I{constructor(){this.migrations=[],this._onDidRegisterConfigurationMigrations=new E.Emitter,this.onDidRegisterConfigurationMigration=this._onDidRegisterConfigurationMigrations.event}registerConfigurationMigrations(r){this.migrations.push(...r)}}const b=new I;p.Registry.add(e.Extensions.ConfigurationMigration,b);let S=class extends k.Disposable{constructor(r,u){super(),this.configurationService=r,this.workspaceService=u,this._register(this.workspaceService.onDidChangeWorkspaceFolders(async i=>{for(const f of i.added)await this.migrateConfigurationsForFolder(f,b.migrations)})),this.migrateConfigurations(b.migrations),this._register(b.onDidRegisterConfigurationMigration(i=>this.migrateConfigurations(i)))}async migrateConfigurations(r){await this.migrateConfigurationsForFolder(void 0,r);for(const u of this.workspaceService.getWorkspace().folders)await this.migrateConfigurationsForFolder(u,r)}async migrateConfigurationsForFolder(r,u){await Promise.all(u.map(i=>this.migrateConfigurationsForFolderAndOverride(i,{resource:r?.uri})))}async migrateConfigurationsForFolderAndOverride(r,u){const i=this.configurationService.inspect(r.key,u);if(await this.migrateConfigurationForFolderOverrideAndTarget(r,u,i,"userValue",2),await this.migrateConfigurationForFolderOverrideAndTarget(r,u,i,"userLocalValue",3),await this.migrateConfigurationForFolderOverrideAndTarget(r,u,i,"userRemoteValue",4),await this.migrateConfigurationForFolderOverrideAndTarget(r,u,i,"workspaceFolderValue",6),await this.migrateConfigurationForFolderOverrideAndTarget(r,u,i,"workspaceValue",5),typeof u.overrideIdentifier>"u"&&typeof i.overrideIdentifiers<"u")for(const f of i.overrideIdentifiers)await this.migrateConfigurationsForFolderAndOverride(r,{resource:u.resource,overrideIdentifier:f})}async migrateConfigurationForFolderOverrideAndTarget(r,u,i,f,c){const l=i[f];if(typeof l>"u")return;const s=a=>this.configurationService.inspect(a,u)[f],d=await r.migrateFn(l,s),n=Array.isArray(d)?d:[[r.key,d]];await Promise.allSettled(n.map(async([a,o])=>this.configurationService.updateValue(a,o.value,u,c)))}};S=we([F(0,A.IConfigurationService),F(1,R.IWorkspaceContextService)],S),e.ConfigurationMigrationWorkbenchContribution=S}),define(ae[71],le([1,0,2,1531,7,18,42,19,54]),function(J,e,t,p,R,A,k,E,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.TemporaryWorkspaceContext=e.VirtualWorkspaceContext=e.RemoteNameContext=e.DirtyWorkingCopiesContext=e.EmptyWorkspaceSupportContext=e.EnterMultiRootWorkspaceSupportContext=e.OpenFolderWorkspaceSupportContext=e.WorkspaceFolderCountContext=e.WorkbenchStateContext=void 0,e.WorkbenchStateContext=new R.RawContextKey("workbenchState",void 0,{type:"string",description:(0,p.localize)(0,null)}),e.WorkspaceFolderCountContext=new R.RawContextKey("workspaceFolderCount",0,(0,p.localize)(1,null)),e.OpenFolderWorkspaceSupportContext=new R.RawContextKey("openFolderWorkspaceSupport",!0,!0),e.EnterMultiRootWorkspaceSupportContext=new R.RawContextKey("enterMultiRootWorkspaceSupport",!0,!0),e.EmptyWorkspaceSupportContext=new R.RawContextKey("emptyWorkspaceSupport",!0,!0),e.DirtyWorkingCopiesContext=new R.RawContextKey("dirtyWorkingCopies",!1,(0,p.localize)(2,null)),e.RemoteNameContext=new R.RawContextKey("remoteName","",(0,p.localize)(3,null)),e.VirtualWorkspaceContext=new R.RawContextKey("virtualWorkspace","",(0,p.localize)(4,null)),e.TemporaryWorkspaceContext=new R.RawContextKey("temporaryWorkspace",!1,(0,p.localize)(5,null)),e.IsFullscreenContext=new R.RawContextKey("isFullscreen",!1,(0,p.localize)(6,null)),e.HasWebFileSystemAccess=new R.RawContextKey("hasWebFileSystemAccess",!1,!0),e.ActiveEditorDirtyContext=new R.RawContextKey("activeEditorIsDirty",!1,(0,p.localize)(7,null)),e.ActiveEditorPinnedContext=new R.RawContextKey("activeEditorIsNotPreview",!1,(0,p.localize)(8,null)),e.ActiveEditorFirstInGroupContext=new R.RawContextKey("activeEditorIsFirstInGroup",!1,(0,p.localize)(9,null)),e.ActiveEditorLastInGroupContext=new R.RawContextKey("activeEditorIsLastInGroup",!1,(0,p.localize)(10,null)),e.ActiveEditorStickyContext=new R.RawContextKey("activeEditorIsPinned",!1,(0,p.localize)(11,null)),e.ActiveEditorReadonlyContext=new R.RawContextKey("activeEditorIsReadonly",!1,(0,p.localize)(12,null)),e.ActiveEditorCanRevertContext=new R.RawContextKey("activeEditorCanRevert",!1,(0,p.localize)(13,null)),e.ActiveEditorCanSplitInGroupContext=new R.RawContextKey("activeEditorCanSplitInGroup",!0),e.ActiveEditorContext=new R.RawContextKey("activeEditor",null,{type:"string",description:(0,p.localize)(14,null)}),e.ActiveEditorAvailableEditorIdsContext=new R.RawContextKey("activeEditorAvailableEditorIds","",(0,p.localize)(15,null)),e.TextCompareEditorVisibleContext=new R.RawContextKey("textCompareEditorVisible",!1,(0,p.localize)(16,null)),e.TextCompareEditorActiveContext=new R.RawContextKey("textCompareEditorActive",!1,(0,p.localize)(17,null)),e.SideBySideEditorActiveContext=new R.RawContextKey("sideBySideEditorActive",!1,(0,p.localize)(18,null)),e.EditorGroupEditorsCountContext=new R.RawContextKey("groupEditorsCount",0,(0,p.localize)(19,null)),e.ActiveEditorGroupEmptyContext=new R.RawContextKey("activeEditorGroupEmpty",!1,(0,p.localize)(20,null)),e.ActiveEditorGroupIndexContext=new R.RawContextKey("activeEditorGroupIndex",0,(0,p.localize)(21,null)),e.ActiveEditorGroupLastContext=new R.RawContextKey("activeEditorGroupLast",!1,(0,p.localize)(22,null)),e.ActiveEditorGroupLockedContext=new R.RawContextKey("activeEditorGroupLocked",!1,(0,p.localize)(23,null)),e.MultipleEditorGroupsContext=new R.RawContextKey("multipleEditorGroups",!1,(0,p.localize)(24,null)),e.SingleEditorGroupsContext=e.MultipleEditorGroupsContext.toNegated(),e.EditorsVisibleContext=new R.RawContextKey("editorIsOpen",!1,(0,p.localize)(25,null)),e.InEditorZenModeContext=new R.RawContextKey("inZenMode",!1,(0,p.localize)(26,null)),e.IsCenteredLayoutContext=new R.RawContextKey("isCenteredLayout",!1,(0,p.localize)(27,null)),e.SplitEditorsVertically=new R.RawContextKey("splitEditorsVertically",!1,(0,p.localize)(28,null)),e.EditorAreaVisibleContext=new R.RawContextKey("editorAreaVisible",!0,(0,p.localize)(29,null)),e.EditorTabsVisibleContext=new R.RawContextKey("editorTabsVisible",!0,(0,p.localize)(30,null)),e.SideBarVisibleContext=new R.RawContextKey("sideBarVisible",!1,(0,p.localize)(31,null)),e.SidebarFocusContext=new R.RawContextKey("sideBarFocus",!1,(0,p.localize)(32,null)),e.ActiveViewletContext=new R.RawContextKey("activeViewlet","",(0,p.localize)(33,null)),e.StatusBarFocused=new R.RawContextKey("statusBarFocused",!1,(0,p.localize)(34,null)),e.BannerFocused=new R.RawContextKey("bannerFocused",!1,(0,p.localize)(35,null)),e.NotificationFocusedContext=new R.RawContextKey("notificationFocus",!0,(0,p.localize)(36,null)),e.NotificationsCenterVisibleContext=new R.RawContextKey("notificationCenterVisible",!1,(0,p.localize)(37,null)),e.NotificationsToastsVisibleContext=new R.RawContextKey("notificationToastsVisible",!1,(0,p.localize)(38,null)),e.ActiveAuxiliaryContext=new R.RawContextKey("activeAuxiliary","",(0,p.localize)(39,null)),e.AuxiliaryBarFocusContext=new R.RawContextKey("auxiliaryBarFocus",!1,(0,p.localize)(40,null)),e.AuxiliaryBarVisibleContext=new R.RawContextKey("auxiliaryBarVisible",!1,(0,p.localize)(41,null)),e.ActivePanelContext=new R.RawContextKey("activePanel","",(0,p.localize)(42,null)),e.PanelFocusContext=new R.RawContextKey("panelFocus",!1,(0,p.localize)(43,null)),e.PanelPositionContext=new R.RawContextKey("panelPosition","bottom",(0,p.localize)(44,null)),e.PanelAlignmentContext=new R.RawContextKey("panelAlignment","center",(0,p.localize)(45,null)),e.PanelVisibleContext=new R.RawContextKey("panelVisible",!1,(0,p.localize)(46,null)),e.PanelMaximizedContext=new R.RawContextKey("panelMaximized",!1,(0,p.localize)(47,null)),e.FocusedViewContext=new R.RawContextKey("focusedView","",(0,p.localize)(48,null));function b(r){return`view.${r}.visible`}e.getVisbileViewContextKey=b;function S(r){return`viewContainer.${r}.enabled`}e.getEnabledViewContainerContextKey=S;let C=class bi{constructor(u,i,f,c){this._contextKeyService=u,this._fileService=i,this._languageService=f,this._modelService=c,this._disposables=new t.DisposableStore,this._schemeKey=bi.Scheme.bindTo(this._contextKeyService),this._filenameKey=bi.Filename.bindTo(this._contextKeyService),this._dirnameKey=bi.Dirname.bindTo(this._contextKeyService),this._pathKey=bi.Path.bindTo(this._contextKeyService),this._langIdKey=bi.LangId.bindTo(this._contextKeyService),this._resourceKey=bi.Resource.bindTo(this._contextKeyService),this._extensionKey=bi.Extension.bindTo(this._contextKeyService),this._hasResource=bi.HasResource.bindTo(this._contextKeyService),this._isFileSystemResource=bi.IsFileSystemResource.bindTo(this._contextKeyService),this._disposables.add(i.onDidChangeFileSystemProviderRegistrations(()=>{const l=this.get();this._isFileSystemResource.set(Boolean(l&&i.hasProvider(l)))})),this._disposables.add(c.onModelAdded(l=>{(0,A.isEqual)(l.uri,this.get())&&this._setLangId()})),this._disposables.add(c.onModelLanguageChanged(l=>{(0,A.isEqual)(l.model.uri,this.get())&&this._setLangId()}))}dispose(){this._disposables.dispose()}_setLangId(){const u=this.get();if(!u){this._langIdKey.set(null);return}const i=this._modelService.getModel(u)?.getLanguageId()??this._languageService.guessLanguageIdByFilepathOrFirstLine(u);this._langIdKey.set(i)}set(u){u=u??void 0,!(0,A.isEqual)(this._value,u)&&(this._value=u,this._contextKeyService.bufferChangeEvents(()=>{this._resourceKey.set(u?u.toString():null),this._schemeKey.set(u?u.scheme:null),this._filenameKey.set(u?(0,A.basename)(u):null),this._dirnameKey.set(u?(0,A.dirname)(u).fsPath:null),this._pathKey.set(u?u.fsPath:null),this._setLangId(),this._extensionKey.set(u?(0,A.extname)(u):null),this._hasResource.set(Boolean(u)),this._isFileSystemResource.set(u?this._fileService.hasProvider(u):!1)}))}reset(){this._value=void 0,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._value}};C.Scheme=new R.RawContextKey("resourceScheme",void 0,{type:"string",description:(0,p.localize)(49,null)}),C.Filename=new R.RawContextKey("resourceFilename",void 0,{type:"string",description:(0,p.localize)(50,null)}),C.Dirname=new R.RawContextKey("resourceDirname",void 0,{type:"string",description:(0,p.localize)(51,null)}),C.Path=new R.RawContextKey("resourcePath",void 0,{type:"string",description:(0,p.localize)(52,null)}),C.LangId=new R.RawContextKey("resourceLangId",void 0,{type:"string",description:(0,p.localize)(53,null)}),C.Resource=new R.RawContextKey("resource",void 0,{type:"URI",description:(0,p.localize)(54,null)}),C.Extension=new R.RawContextKey("resourceExtname",void 0,{type:"string",description:(0,p.localize)(55,null)}),C.HasResource=new R.RawContextKey("resourceSet",void 0,{type:"boolean",description:(0,p.localize)(56,null)}),C.IsFileSystemResource=new R.RawContextKey("isFileSystemResource",void 0,{type:"boolean",description:(0,p.localize)(57,null)}),C=we([F(0,R.IContextKeyService),F(1,E.IFileService),F(2,k.ILanguageService),F(3,I.IModelService)],C),e.ResourceContextKey=C}),define(ae[2276],le([1,0,11,6,2]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogsModel=void 0;class A extends R.Disposable{constructor(){super(...arguments),this.dialogs=[],this._onWillShowDialog=this._register(new p.Emitter),this.onWillShowDialog=this._onWillShowDialog.event,this._onDidShowDialog=this._register(new p.Emitter),this.onDidShowDialog=this._onDidShowDialog.event}show(E){const I=new t.DeferredPromise,b={args:E,close:S=>{this.dialogs.splice(0,1),I.complete(S),this._onDidShowDialog.fire()}};return this.dialogs.push(b),this._onWillShowDialog.fire(),{item:b,result:I.p}}}e.DialogsModel=A}),define(ae[43],le([1,0,1532,13,9,2,5,17,19,22]),function(J,e,t,p,R,A,k,E,I,b){"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.isResourceMergeEditorInput=e.isUntitledWithAssociatedResource=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 S;(function(W){W[W.PROGRAMMATIC=1]="PROGRAMMATIC",W[W.USER=2]="USER",W[W.EDIT=3]="EDIT",W[W.NAVIGATION=4]="NAVIGATION",W[W.JUMP=5]="JUMP"})(S=e.EditorPaneSelectionChangeReason||(e.EditorPaneSelectionChangeReason={}));var C;(function(W){W[W.IDENTICAL=1]="IDENTICAL",W[W.SIMILAR=2]="SIMILAR",W[W.DIFFERENT=3]="DIFFERENT"})(C=e.EditorPaneSelectionCompareResult||(e.EditorPaneSelectionCompareResult={}));function r(W){const U=W;return!!U&&typeof U.getSelection=="function"&&!!U.onDidChangeSelection}e.isEditorPaneWithSelection=r;function u(W,U,$){for(const q of $.visibleEditorPanes)if(q.group.id===U&&W.matches(q.input))return q.getViewState()}e.findViewStateForEditor=u;function i(W){if(m(W))return!1;const U=W;return R.URI.isUri(U?.resource)}e.isResourceEditorInput=i;function f(W){if(m(W))return!1;const U=W;return U?.original!==void 0&&U.modified!==void 0}e.isResourceDiffEditorInput=f;function c(W){if(m(W)||f(W))return!1;const U=W;return U?.primary!==void 0&&U.secondary!==void 0}e.isResourceSideBySideEditorInput=c;function l(W){if(m(W))return!1;const U=W;return U?U.resource===void 0||U.resource.scheme===b.Schemas.untitled||U.forceUntitled===!0:!1}e.isUntitledResourceEditorInput=l;const s=/Untitled-\d+/;function d(W){return W.scheme===b.Schemas.untitled&&W.path.length>1&&!s.test(W.path)}e.isUntitledWithAssociatedResource=d;function n(W){if(m(W))return!1;const U=W;return R.URI.isUri(U?.base?.resource)&&R.URI.isUri(U?.input1?.resource)&&R.URI.isUri(U?.input2?.resource)&&R.URI.isUri(U?.result?.resource)}e.isResourceMergeEditorInput=n;var a;(function(W){W[W.SHORT=0]="SHORT",W[W.MEDIUM=1]="MEDIUM",W[W.LONG=2]="LONG"})(a=e.Verbosity||(e.Verbosity={}));var o;(function(W){W[W.EXPLICIT=1]="EXPLICIT",W[W.AUTO=2]="AUTO",W[W.FOCUS_CHANGE=3]="FOCUS_CHANGE",W[W.WINDOW_CHANGE=4]="WINDOW_CHANGE"})(o=e.SaveReason||(e.SaveReason={}));class g{constructor(){this.mapIdToSaveSource=new Map}registerSource(U,$){let q=this.mapIdToSaveSource.get(U);return q||(q={source:U,label:$},this.mapIdToSaveSource.set(U,q)),q.source}getSourceLabel(U){return this.mapIdToSaveSource.get(U)?.label??U}}e.SaveSourceRegistry=new g;var h;(function(W){W[W.None=0]="None",W[W.Readonly=2]="Readonly",W[W.Untitled=4]="Untitled",W[W.Singleton=8]="Singleton",W[W.RequiresTrust=16]="RequiresTrust",W[W.CanSplitInGroup=32]="CanSplitInGroup",W[W.ForceDescription=64]="ForceDescription",W[W.CanDropIntoEditor=128]="CanDropIntoEditor",W[W.MultipleEditors=256]="MultipleEditors"})(h=e.EditorInputCapabilities||(e.EditorInputCapabilities={}));class v extends A.Disposable{}e.AbstractEditorInput=v;function m(W){return W instanceof v}e.isEditorInput=m;function w(W){const U=W;return R.URI.isUri(U?.preferredResource)}function D(W){const U=W;return m(U?.primary)&&m(U?.secondary)}e.isSideBySideEditorInput=D;function y(W){const U=W;return m(U?.modified)&&m(U?.original)}e.isDiffEditorInput=y;function T(W){return m(W?.editor)}e.isEditorInputWithOptions=T;function _(W){const U=W;return T(W)&&U?.group!==void 0}e.isEditorInputWithOptionsAndGroup=_;function L(W){const U=W;return typeof U?.groupId=="number"&&m(U.editor)}e.isEditorIdentifier=L;var M;(function(W){W[W.UNKNOWN=0]="UNKNOWN",W[W.REPLACE=1]="REPLACE",W[W.MOVE=2]="MOVE",W[W.UNPIN=3]="UNPIN"})(M=e.EditorCloseContext||(e.EditorCloseContext={}));var O;(function(W){W[W.GROUP_ACTIVE=0]="GROUP_ACTIVE",W[W.GROUP_INDEX=1]="GROUP_INDEX",W[W.GROUP_LOCKED=2]="GROUP_LOCKED",W[W.EDITOR_OPEN=3]="EDITOR_OPEN",W[W.EDITOR_CLOSE=4]="EDITOR_CLOSE",W[W.EDITOR_MOVE=5]="EDITOR_MOVE",W[W.EDITOR_ACTIVE=6]="EDITOR_ACTIVE",W[W.EDITOR_LABEL=7]="EDITOR_LABEL",W[W.EDITOR_CAPABILITIES=8]="EDITOR_CAPABILITIES",W[W.EDITOR_PIN=9]="EDITOR_PIN",W[W.EDITOR_STICKY=10]="EDITOR_STICKY",W[W.EDITOR_DIRTY=11]="EDITOR_DIRTY",W[W.EDITOR_WILL_DISPOSE=12]="EDITOR_WILL_DISPOSE"})(O=e.GroupModelChangeKind||(e.GroupModelChangeKind={}));var N;(function(W){W[W.PRIMARY=1]="PRIMARY",W[W.SECONDARY=2]="SECONDARY",W[W.BOTH=3]="BOTH",W[W.ANY=4]="ANY"})(N=e.SideBySideEditor||(e.SideBySideEditor={}));class P{getOriginalUri(U,$){if(!U)return;if(n(U))return e.EditorResourceAccessor.getOriginalUri(U.result,$);if($?.supportSideBySide){const{primary:X,secondary:G}=this.getSideEditors(U);if(X&&G){if($?.supportSideBySide===N.BOTH)return{primary:this.getOriginalUri(X,{filterByScheme:$.filterByScheme}),secondary:this.getOriginalUri(G,{filterByScheme:$.filterByScheme})};if($?.supportSideBySide===N.ANY)return this.getOriginalUri(X,{filterByScheme:$.filterByScheme})??this.getOriginalUri(G,{filterByScheme:$.filterByScheme});U=$.supportSideBySide===N.PRIMARY?X:G}}if(f(U)||c(U)||n(U))return;const q=w(U)?U.preferredResource:U.resource;return!q||!$||!$.filterByScheme?q:this.filterUri(q,$.filterByScheme)}getSideEditors(U){return D(U)||c(U)?{primary:U.primary,secondary:U.secondary}:y(U)||f(U)?{primary:U.modified,secondary:U.original}:{primary:void 0,secondary:void 0}}getCanonicalUri(U,$){if(!U)return;if(n(U))return e.EditorResourceAccessor.getCanonicalUri(U.result,$);if($?.supportSideBySide){const{primary:X,secondary:G}=this.getSideEditors(U);if(X&&G){if($?.supportSideBySide===N.BOTH)return{primary:this.getCanonicalUri(X,{filterByScheme:$.filterByScheme}),secondary:this.getCanonicalUri(G,{filterByScheme:$.filterByScheme})};if($?.supportSideBySide===N.ANY)return this.getCanonicalUri(X,{filterByScheme:$.filterByScheme})??this.getCanonicalUri(G,{filterByScheme:$.filterByScheme});U=$.supportSideBySide===N.PRIMARY?X:G}}if(f(U)||c(U)||n(U))return;const q=U.resource;return!q||!$||!$.filterByScheme?q:this.filterUri(q,$.filterByScheme)}filterUri(U,$){if(Array.isArray($)){if($.some(q=>U.scheme===q))return U}else if($===U.scheme)return U}}e.EditorResourceAccessor=new P;var B;(function(W){W[W.LEFT=0]="LEFT",W[W.RIGHT=1]="RIGHT"})(B=e.CloseDirection||(e.CloseDirection={}));class V{constructor(){this.editorSerializerConstructors=new Map,this.editorSerializerInstances=new Map}start(U){const $=this.instantiationService=U.get(k.IInstantiationService);for(const[q,X]of this.editorSerializerConstructors)this.createEditorSerializer(q,X,$);this.editorSerializerConstructors.clear()}createEditorSerializer(U,$,q){const X=q.createInstance($);this.editorSerializerInstances.set(U,X)}registerFileEditorFactory(U){if(this.fileEditorFactory)throw new Error("Can only register one file editor factory.");this.fileEditorFactory=U}getFileEditorFactory(){return(0,p.assertIsDefined)(this.fileEditorFactory)}registerEditorSerializer(U,$){if(this.editorSerializerConstructors.has(U)||this.editorSerializerInstances.has(U))throw new Error(`A editor serializer with type ID '${U}' was already registered.`);return this.instantiationService?this.createEditorSerializer(U,$,this.instantiationService):this.editorSerializerConstructors.set(U,$),(0,A.toDisposable)(()=>{this.editorSerializerConstructors.delete(U),this.editorSerializerInstances.delete(U)})}getEditorSerializer(U){return this.editorSerializerInstances.get(typeof U=="string"?U:U.typeId)}}E.Registry.add(e.EditorExtensions.EditorFactory,new V);async function z(W,U,$){return!W||!W.length?[]:await Promise.all(W.map(async q=>{const X=R.URI.revive(q.fileUri);if(!X){$.info("Cannot resolve the path because it is not valid.",q);return}if(!await U.canHandleResource(X)){$.info("Cannot resolve the path because it cannot be handled",q);return}let Q=q.exists,j=q.type;if(typeof Q!="boolean"||typeof j!="number")try{j=(await U.stat(X)).isDirectory?I.FileType.Directory:I.FileType.Unknown,Q=!0}catch(Y){$.error(Y),Q=!1}if(!Q&&q.openOnlyIfExists){$.info("Cannot resolve the path because it does not exist",q);return}if(j===I.FileType.Directory){$.info("Cannot resolve the path because it is a directory",q);return}const K={...q.options,pinned:!0};return Q?{resource:X,options:K}:{resource:X,options:K,forceUntitled:!0}}))}e.pathsToEditors=z;var x;(function(W){W[W.MOST_RECENTLY_ACTIVE=0]="MOST_RECENTLY_ACTIVE",W[W.SEQUENTIAL=1]="SEQUENTIAL"})(x=e.EditorsOrder||(e.EditorsOrder={}));function H(W){const U=W;if(!U)return!1;const $=U;if($.modified)return H($.modified);const q=U;return!!(q.contributionsState&&q.viewState&&Array.isArray(q.cursorState))}e.isTextEditorViewState=H}),define(ae[186],le([1,0,6,16,43,18]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorInput=void 0;class k extends R.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,b){return this}async saveAs(I,b){return this}async revert(I,b){}async rename(I,b){}copy(){return this}matches(I){if((0,R.isEditorInput)(I))return this===I;const b=I.options?.override;return this.editorId!==b&&b!==void 0&&this.editorId!==void 0?!1:(0,A.isEqual)(this.resource,R.EditorResourceAccessor.getCanonicalUri(I))}prefersEditorPane(I){return(0,p.firstOrDefault)(I)}toUntyped(I){}isDisposed(){return this.disposed}dispose(){this.disposed||(this.disposed=!0,this._onWillDispose.fire()),super.dispose()}}e.EditorInput=k}),define(ae[255],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorModel=void 0;class R extends p.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=R}),define(ae[628],le([1,0,255,19,160]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryEditorModel=void 0;let A=class extends t.EditorModel{constructor(E,I,b){super(),this.resource=E,this.name=I,this.fileService=b,this.mime=R.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 E=await this.fileService.stat(this.resource);this.etag=E.etag,typeof E.size=="number"&&(this.size=E.size)}return super.resolve()}};A=we([F(2,p.IFileService)],A),e.BinaryEditorModel=A}),define(ae[847],le([1,0,255]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorModel=void 0;class p extends t.EditorModel{get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}constructor(A,k){super(),this._originalModel=A,this._modifiedModel=k}async resolve(){await Promise.all([this._originalModel?.resolve(),this._modifiedModel?.resolve()])}isResolved(){return!!(this.originalModel?.isResolved()&&this.modifiedModel?.isResolved())}dispose(){super.dispose()}}e.DiffEditorModel=p}),define(ae[379],le([1,0,43]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyTextEditorOptions=void 0;function p(A,k,E){let I=!1;const b=R(A);if((0,t.isTextEditorViewState)(b)&&(k.restoreViewState(b),I=!0),A.selection){const S={startLineNumber:A.selection.startLineNumber,startColumn:A.selection.startColumn,endLineNumber:A.selection.endLineNumber??A.selection.startLineNumber,endColumn:A.selection.endColumn??A.selection.startColumn};k.setSelection(S,A.selectionSource??"code.navigation"),A.selectionRevealType===2?k.revealRangeNearTop(S,E):A.selectionRevealType===3?k.revealRangeNearTopIfOutsideViewport(S,E):A.selectionRevealType===1?k.revealRangeInCenterIfOutsideViewport(S,E):k.revealRangeInCenter(S,E),I=!0}return I}e.applyTextEditorOptions=p;function R(A){if(!A.selection||!A.viewState)return A.viewState;const k=A.viewState;if(k.modified)return k.modified.cursorState=[],k;const E=A.viewState;return E.cursorState&&(E.cursorState=[]),E}}),define(ae[848],le([1,0,186,19,49,18]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractResourceEditorInput=void 0;let k=class extends t.EditorInput{get capabilities(){let I=32;return this.fileService.hasProvider(this.resource)?this.fileService.hasCapability(this.resource,2048)&&(I|=2):I|=4,I&2||(I|=128),I}get preferredResource(){return this._preferredResource}constructor(I,b,S,C){super(),this.resource=I,this.labelService=S,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=b||I,this.registerListeners()}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=we([F(2,R.ILabelService),F(3,p.IFileService)],k),e.AbstractResourceEditorInput=k}),define(ae[849],le([1,0,847]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDiffEditorModel=void 0;class p extends t.DiffEditorModel{get originalModel(){return this._originalModel}get modifiedModel(){return this._modifiedModel}get textDiffEditorModel(){return this._textDiffEditorModel}constructor(A,k){super(A,k),this._textDiffEditorModel=void 0,this._originalModel=A,this._modifiedModel=k,this.updateTextDiffEditorModel()}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=p}),define(ae[187],le([1,0,13,21]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Memento=void 0;class R{constructor(E,I){this.storageService=I,this.id=R.COMMON_PREFIX+E}getMemento(E,I){switch(E){case 1:{let b=R.workspaceMementos.get(this.id);return b||(b=new A(this.id,E,I,this.storageService),R.workspaceMementos.set(this.id,b)),b.getMemento()}case 0:{let b=R.profileMementos.get(this.id);return b||(b=new A(this.id,E,I,this.storageService),R.profileMementos.set(this.id,b)),b.getMemento()}case-1:{let b=R.applicationMementos.get(this.id);return b||(b=new A(this.id,E,I,this.storageService),R.applicationMementos.set(this.id,b)),b.getMemento()}}}saveMemento(){R.workspaceMementos.get(this.id)?.save(),R.profileMementos.get(this.id)?.save(),R.applicationMementos.get(this.id)?.save()}static clear(E){switch(E){case 1:R.workspaceMementos.clear();break;case 0:R.profileMementos.clear();break;case-1:R.applicationMementos.clear();break}}}e.Memento=R,R.applicationMementos=new Map,R.profileMementos=new Map,R.workspaceMementos=new Map,R.COMMON_PREFIX="memento/";class A{constructor(E,I,b,S){this.id=E,this.scope=I,this.target=b,this.storageService=S,this.mementoObj=this.load()}getMemento(){return this.mementoObj}load(){const E=this.storageService.get(this.id,this.scope);if(E)try{return JSON.parse(E)}catch(I){(0,p.onUnexpectedError)(`[memento]: failed to parse contents: ${I} (id: ${this.id}, scope: ${this.scope}, contents: ${E})`)}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(ae[629],le([1,0,187,12]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Component=void 0;class R extends p.Themable{constructor(k,E,I){super(E),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,E){return this.memento.getMemento(k,E)}saveState(){}}e.Component=R}),define(ae[850],le([1,0,36,629,6,10,2,13]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeRegistry=e.CompositeDescriptor=e.Composite=void 0;class I extends p.Component{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 r=(0,E.assertIsDefined)(this.getContainer()),u=this._register((0,A.trackFocus)(r)),i=this._onDidFocus=this._register(new R.Emitter);this._register(u.onDidFocus(()=>{this._hasFocus=!0,i.fire()}));const f=this._onDidBlur=this._register(new R.Emitter);return this._register(u.onDidBlur(()=>{this._hasFocus=!1,f.fire()})),{onDidFocus:i,onDidBlur:f}}get telemetryService(){return this._telemetryService}constructor(r,u,i,f){super(r,i,f),this._onTitleAreaUpdate=this._register(new R.Emitter),this.onTitleAreaUpdate=this._onTitleAreaUpdate.event,this._hasFocus=!1,this._telemetryService=u,this.visible=!1}getTitle(){}create(r){this.parent=r}getContainer(){return this.parent}setVisible(r){this.visible!==!!r&&(this.visible=r)}focus(){}updateStyles(){super.updateStyles()}getMenuIds(){return[]}getActions(){return[]}getSecondaryActions(){return[]}getContextMenuActions(){return[]}getActionViewItem(r){}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 b{constructor(r,u,i,f,c,l){this.ctor=r,this.id=u,this.name=i,this.cssClass=f,this.order=c,this.requestedIndex=l}instantiate(r){return r.createInstance(this.ctor)}}e.CompositeDescriptor=b;class S extends k.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new R.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidDeregister=this._register(new R.Emitter),this.onDidDeregister=this._onDidDeregister.event,this.composites=[]}registerComposite(r){this.compositeById(r.id)||(this.composites.push(r),this._onDidRegister.fire(r))}deregisterComposite(r){const u=this.compositeById(r);!u||(this.composites.splice(this.composites.indexOf(u),1),this._onDidDeregister.fire(u))}getComposite(r){return this.compositeById(r)}getComposites(){return this.composites.slice(0)}compositeById(r){return this.composites.find(u=>u.id===r)}}e.CompositeRegistry=S}),define(ae[380],le([1,0,629,10,6,13,1101]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Part=void 0;class k extends t.Component{get dimension(){return this._dimension}constructor(b,S,C,r,u){super(b,C,r),this.options=S,this.layoutService=u,this._onDidVisibilityChange=this._register(new R.Emitter),this.onDidVisibilityChange=this._onDidVisibilityChange.event,this._onDidChange=this._register(new R.Emitter),u.registerPart(this)}onThemeChange(b){this.parent&&super.onThemeChange(b)}updateStyles(){super.updateStyles()}create(b,S){this.parent=b,this.titleArea=this.createTitleArea(b,S),this.contentArea=this.createContentArea(b,S),this.partLayout=new E(this.options,this.contentArea),this.updateStyles()}getContainer(){return this.parent}createTitleArea(b,S){}getTitleArea(){return this.titleArea}createContentArea(b,S){}getContentArea(){return this.contentArea}layoutContents(b,S){return(0,A.assertIsDefined)(this.partLayout).layout(b,S)}get onDidChange(){return this._onDidChange.event}layout(b,S,C,r){this._dimension=new p.Dimension(b,S)}setVisible(b){this._onDidVisibilityChange.fire(b)}}e.Part=k;class E{constructor(b,S){this.options=b,this.contentArea=S}layout(b,S){let C;this.options.hasTitle?C=new p.Dimension(b,Math.min(S,E.TITLE_HEIGHT)):C=p.Dimension.None;let r=b;this.options&&typeof this.options.borderWidth=="function"&&(r-=this.options.borderWidth());const u=new p.Dimension(r,S-C.height);return this.contentArea&&(0,p.size)(this.contentArea,u.width,u.height),{titleSize:C,contentSize:u}}}E.TITLE_HEIGHT=35}),define(ae[188],le([1,0,850,43,60,9,6,13,311,18,164,2]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorMemento=e.EditorPane=void 0;class r extends t.Composite{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(){}constructor(f,c,l,s){super(f,c,l,s),this.onDidChangeSizeConstraints=k.Event.None,this._onDidChangeControl=this._register(new k.Emitter),this.onDidChangeControl=this._onDidChangeControl.event}create(f){super.create(f),this.createEditor(f)}async setInput(f,c,l,s){this._input=f,this._options=c}clearInput(){this._input=void 0,this._options=void 0}setOptions(f){this._options=f}setVisible(f,c){super.setVisible(f),this.setEditorVisible(f,c)}setEditorVisible(f,c){this._group=c}getEditorMemento(f,c,l,s=10){const d=`${this.getId()}${l}`;let n=r.EDITOR_MEMENTOS.get(d);return n||(n=this._register(new u(this.getId(),l,this.getMemento(1,1),s,f,c)),r.EDITOR_MEMENTOS.set(d,n)),n}getViewState(){}saveState(){for(const[,f]of r.EDITOR_MEMENTOS)f.id===this.getId()&&f.saveState();super.saveState()}dispose(){this._input=void 0,this._options=void 0,super.dispose()}}e.EditorPane=r,r.EDITOR_MEMENTOS=new Map;class u extends C.Disposable{constructor(f,c,l,s,d,n){super(),this.id=f,this.key=c,this.memento=l,this.limit=s,this.editorGroupService=d,this.configurationService=n,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(f,c,l){const s=this.doGetResource(c);if(!s||!f)return;const d=this.doLoad();let n=d.get(s.toString());n||(n=Object.create(null),d.set(s.toString(),n)),n[f.id]=l,this.shareEditorState&&(n[u.SHARED_EDITOR_STATE]=l),(0,p.isEditorInput)(c)&&this.clearEditorStateOnDispose(s,c)}loadEditorState(f,c){const l=this.doGetResource(c);if(!l||!f)return;const d=this.doLoad().get(l.toString());if(d){const n=d[f.id];if(n)return n;if(this.shareEditorState)return d[u.SHARED_EDITOR_STATE]}}clearEditorState(f,c){(0,p.isEditorInput)(f)&&this.editorDisposables?.delete(f);const l=this.doGetResource(f);if(l){const s=this.doLoad();if(c){const d=s.get(l.toString());d&&(delete d[c.id],(0,E.isEmptyObject)(d)&&s.delete(l.toString()))}else s.delete(l.toString())}}clearEditorStateOnDispose(f,c){this.editorDisposables||(this.editorDisposables=new Map),this.editorDisposables.has(c)||this.editorDisposables.set(c,k.Event.once(c.onWillDispose)(()=>{this.clearEditorState(f),this.editorDisposables?.delete(c)}))}moveEditorState(f,c,l){const s=this.doLoad(),d=[...s.keys()];for(const n of d){const a=A.URI.parse(n);if(!l.isEqualOrParent(a,f))continue;let o;if((0,b.isEqual)(f,a))o=c;else{const h=(0,S.indexOfPath)(a.path,f.path);o=(0,b.joinPath)(c,a.path.substr(h+f.path.length+1))}const g=s.get(n,0);g&&(s.delete(n),s.set(o.toString(),g))}}doGetResource(f){return(0,p.isEditorInput)(f)?f.resource:f}doLoad(){if(!this.cache){this.cache=new R.LRUCache(this.limit);const f=this.memento[this.key];Array.isArray(f)&&this.cache.fromJSON(f)}return this.cache}saveState(){const f=this.doLoad();this.cleanedUp||(this.cleanUp(),this.cleanedUp=!0),this.memento[this.key]=f.toJSON()}cleanUp(){const f=this.doLoad(),c=[...f.entries()];for(const[l,s]of c)for(const d of Object.keys(s)){const n=Number(d);n===u.SHARED_EDITOR_STATE&&this.shareEditorState||this.editorGroupService.getGroup(n)||(delete s[n],(0,E.isEmptyObject)(s)&&f.delete(l))}}}e.EditorMemento=u,u.SHARED_EDITOR_STATE=-1}),define(ae[442],le([1,0,26,117,6,2,21,36,16,323]),function(J,e,t,p,R,A,k,E,I,b){"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 S;(function(n){n[n.ADD=0]="ADD",n[n.CHANGE=1]="CHANGE",n[n.EXPAND_COLLAPSE=2]="EXPAND_COLLAPSE",n[n.REMOVE=3]="REMOVE"})(S=e.NotificationChangeType||(e.NotificationChangeType={}));var C;(function(n){n[n.ADD=0]="ADD",n[n.REMOVE=1]="REMOVE"})(C=e.StatusMessageChangeType||(e.StatusMessageChangeType={}));class r extends A.Disposable{constructor(a,o){super(),this.item=a,this.onClose=o,this._onDidClose=this._register(new R.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeVisibility=this._register(new R.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.registerListeners()}registerListeners(){this._register(this.item.onDidChangeVisibility(a=>this._onDidChangeVisibility.fire(a))),R.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=r;class u extends A.Disposable{constructor(){super(...arguments),this._onDidChangeNotification=this._register(new R.Emitter),this.onDidChangeNotification=this._onDidChangeNotification.event,this._onDidChangeStatusMessage=this._register(new R.Emitter),this.onDidChangeStatusMessage=this._onDidChangeStatusMessage.event,this._onDidChangeFilter=this._register(new R.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 o=this.createViewItem(a);return o?(this.findNotification(o)?.close(),this._notifications.splice(0,0,o),this._onDidChangeNotification.fire({item:o,index:0,kind:0}),new r(o,h=>this.onClose(h))):u.NO_OP_NOTIFICATION}onClose(a){const o=this.findNotification(a);o&&o!==a?o.close():a.close()}findNotification(a){return this._notifications.find(o=>o.equals(a))}createViewItem(a){const o=l.create(a,this.filter);if(!o)return;const g=(m,w)=>{const D=this._notifications.indexOf(o);D>=0&&this._onDidChangeNotification.fire({item:o,index:D,kind:m,detail:w})},h=o.onDidChangeExpansion(()=>g(2)),v=o.onDidChangeContent(m=>g(1,m.kind));return R.Event.once(o.onDidClose)(()=>{h.dispose(),v.dispose();const m=this._notifications.indexOf(o);m>=0&&(this._notifications.splice(m,1),this._onDidChangeNotification.fire({item:o,index:m,kind:3}))}),o}showStatusMessage(a,o){const g=d.create(a,o);return g?(this._statusMessage=g,this._onDidChangeStatusMessage.fire({kind:0,item:g}),(0,A.toDisposable)(()=>{this._statusMessage===g&&(this._statusMessage=void 0,this._onDidChangeStatusMessage.fire({kind:1,item:g}))})):A.Disposable.None}}e.NotificationsModel=u,u.NO_OP_NOTIFICATION=new t.NoOpNotification;function i(n){return n instanceof l}e.isNotificationViewItem=i;var f;(function(n){n[n.SEVERITY=0]="SEVERITY",n[n.MESSAGE=1]="MESSAGE",n[n.ACTIONS=2]="ACTIONS",n[n.PROGRESS=3]="PROGRESS"})(f=e.NotificationViewItemContentChangeKind||(e.NotificationViewItemContentChangeKind={}));class c extends A.Disposable{constructor(){super(),this._onDidChange=this._register(new R.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=c;class l extends A.Disposable{static create(a,o=t.NotificationsFilter.OFF){if(!a||!a.message||(0,k.isCancellationError)(a.message))return;let g;typeof a.severity=="number"?g=a.severity:g=t.Severity.Info;const h=l.parseNotificationMessage(a.message);if(!h)return;let v;return a.actions?v=a.actions:(0,p.isErrorWithActions)(a.message)&&(v={primary:a.message.actions}),new l(a.id,g,a.sticky,a.silent||o===t.NotificationsFilter.SILENT||o===t.NotificationsFilter.ERROR&&a.severity!==t.Severity.Error,h,a.source,a.progress,v)}static parseNotificationMessage(a){let o;if(a instanceof Error?o=(0,p.toErrorMessage)(a,!1):typeof a=="string"&&(o=a),!o)return;const g=o;o.length>l.MAX_MESSAGE_LENGTH&&(o=`${o.substr(0,l.MAX_MESSAGE_LENGTH)}...`),o=o.replace(/(\r\n|\n|\r)/gm," ").trim();const h=(0,b.parseLinkedText)(o);return{raw:g,linkedText:h,original:a}}constructor(a,o,g,h,v,m,w,D){super(),this.id=a,this._severity=o,this._sticky=g,this._silent=h,this._message=v,this._source=m,this._visible=!1,this._onDidChangeExpansion=this._register(new R.Emitter),this.onDidChangeExpansion=this._onDidChangeExpansion.event,this._onDidClose=this._register(new R.Emitter),this.onDidClose=this._onDidClose.event,this._onDidChangeContent=this._register(new R.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidChangeVisibility=this._register(new R.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,w&&this.setProgress(w),this.setActions(D)}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 c),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 o=l.parseNotificationMessage(a);!o||o.raw===this._message.raw||(this._message=o,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 o=this._actions&&this._actions.primary||[],g=a.actions&&a.actions.primary||[];return(0,I.equals)(o,g,(h,v)=>h.id+h.label===v.id+v.label)}}e.NotificationViewItem=l,l.MAX_MESSAGE_LENGTH=1e3;class s extends E.Action{constructor(a,o){super(a,o.label,void 0,!0,async()=>{o.run(),this._onDidRun.fire()}),this._onDidRun=this._register(new R.Emitter),this.onDidRun=this._onDidRun.event,this._keepOpen=!!o.keepOpen,this._menu=!o.isSecondary&&o.menu?o.menu.map((g,h)=>new s(`${a}.${h}`,g)):void 0}get menu(){return this._menu}get keepOpen(){return this._keepOpen}}e.ChoiceAction=s;class d{static create(a,o){if(!a||(0,k.isCancellationError)(a))return;let g;if(a instanceof Error?g=(0,p.toErrorMessage)(a,!1):typeof a=="string"&&(g=a),!!g)return{message:g,options:o}}}}),define(ae[517],le([1,0,31,7,98,442,15,1506,76,27,844,71,26]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerNotificationCommands=e.TOGGLE_DO_NOT_DISTURB_MODE=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 u="notifications.toggleList";e.HIDE_NOTIFICATION_TOAST="notifications.hideToasts";const i="notifications.focusToasts",f="notifications.focusNextToast",c="notifications.focusPreviousToast",l="notifications.focusFirstToast",s="notifications.focusLastToast";e.COLLAPSE_NOTIFICATION="notification.collapse",e.EXPAND_NOTIFICATION="notification.expand";const d="notification.toggle";e.CLEAR_NOTIFICATION="notification.clear",e.CLEAR_ALL_NOTIFICATIONS="notifications.clearAll",e.TOGGLE_DO_NOT_DISTURB_MODE="notifications.toggleDoNotDisturbMode";function n(a,o,g){function h(m,w){if((0,A.isNotificationViewItem)(w))return w;const D=m.lastFocusedList;if(D instanceof I.WorkbenchList){const y=D.getFocusedElements()[0];if((0,A.isNotificationViewItem)(y))return y}}t.CommandsRegistry.registerCommand(e.SHOW_NOTIFICATIONS_CENTER,()=>{o.hide(),a.show()}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.HIDE_NOTIFICATIONS_CENTER,weight:200+50,when:C.NotificationsCenterVisibleContext,primary:9,handler:m=>{const w=m.get(b.ITelemetryService);for(const D of g.notifications)D.visible&&w.publicLog2("notification:hide",(0,S.notificationToMetrics)(D.message.original,D.sourceId,D.silent));a.hide()}}),t.CommandsRegistry.registerCommand(u,m=>{a.isVisible?a.hide():(o.hide(),a.show())}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLEAR_NOTIFICATION,weight:200,when:C.NotificationFocusedContext,primary:20,mac:{primary:2049},handler:(m,w)=>{const D=h(m.get(I.IListService),w);D&&!D.hasProgress&&D.close()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.EXPAND_NOTIFICATION,weight:200,when:C.NotificationFocusedContext,primary:17,handler:(m,w)=>{h(m.get(I.IListService),w)?.expand()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.COLLAPSE_NOTIFICATION,weight:200,when:C.NotificationFocusedContext,primary:15,handler:(m,w)=>{h(m.get(I.IListService),w)?.collapse()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:d,weight:200,when:C.NotificationFocusedContext,primary:10,secondary:[3],handler:m=>{h(m.get(I.IListService))?.toggle()}}),t.CommandsRegistry.registerCommand(e.HIDE_NOTIFICATION_TOAST,m=>{const w=m.get(b.ITelemetryService);for(const D of g.notifications)D.visible&&w.publicLog2("notification:hide",(0,S.notificationToMetrics)(D.message.original,D.sourceId,D.silent));o.hide()}),R.KeybindingsRegistry.registerKeybindingRule({id:e.HIDE_NOTIFICATION_TOAST,weight:200-50,when:C.NotificationsToastsVisibleContext,primary:9}),R.KeybindingsRegistry.registerKeybindingRule({id:e.HIDE_NOTIFICATION_TOAST,weight:200+100,when:p.ContextKeyExpr.and(C.NotificationsToastsVisibleContext,C.NotificationFocusedContext),primary:9}),t.CommandsRegistry.registerCommand(i,()=>o.focus()),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:f,weight:200,when:p.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:18,handler:m=>{o.focusNext()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c,weight:200,when:p.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:16,handler:m=>{o.focusPrevious()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:l,weight:200,when:p.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:11,secondary:[14],handler:m=>{o.focusFirst()}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:s,weight:200,when:p.ContextKeyExpr.and(C.NotificationFocusedContext,C.NotificationsToastsVisibleContext),primary:12,secondary:[13],handler:m=>{o.focusLast()}}),t.CommandsRegistry.registerCommand(e.CLEAR_ALL_NOTIFICATIONS,()=>a.clearAll()),t.CommandsRegistry.registerCommand(e.TOGGLE_DO_NOT_DISTURB_MODE,m=>{const w=m.get(r.INotificationService);w.doNotDisturbMode=!w.doNotDisturbMode});const v={value:(0,E.localize)(0,null),original:"Notifications"};k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.SHOW_NOTIFICATIONS_CENTER,title:{value:(0,E.localize)(1,null),original:"Show Notifications"},category:v}}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.HIDE_NOTIFICATIONS_CENTER,title:{value:(0,E.localize)(2,null),original:"Hide Notifications"},category:v},when:C.NotificationsCenterVisibleContext}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.CLEAR_ALL_NOTIFICATIONS,title:{value:(0,E.localize)(3,null),original:"Clear All Notifications"},category:v}}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:e.TOGGLE_DO_NOT_DISTURB_MODE,title:{value:(0,E.localize)(4,null),original:"Toggle Do Not Disturb Mode"},category:v}}),k.MenuRegistry.appendMenuItem(k.MenuId.CommandPalette,{command:{id:i,title:{value:(0,E.localize)(5,null),original:"Focus Notification Toast"},category:v},when:C.NotificationsToastsVisibleContext})}e.registerNotificationCommands=n}),define(ae[630],le([1,0,442,1503,36,27,26,517,31,93,29,63,12,108,718]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationActionRunner=e.CopyNotificationMessageAction=e.ConfigureNotificationAction=e.CollapseNotificationAction=e.ExpandNotificationAction=e.HideNotificationsCenterAction=e.ToggleDoNotDisturbAction=e.ClearAllNotificationsAction=e.ClearNotificationAction=void 0;const i=(0,C.registerIcon)("notifications-clear",S.Codicon.close,(0,p.localize)(0,null)),f=(0,C.registerIcon)("notifications-clear-all",S.Codicon.clearAll,(0,p.localize)(1,null)),c=(0,C.registerIcon)("notifications-hide",S.Codicon.chevronDown,(0,p.localize)(2,null)),l=(0,C.registerIcon)("notifications-expand",S.Codicon.chevronUp,(0,p.localize)(3,null)),s=(0,C.registerIcon)("notifications-collapse",S.Codicon.chevronDown,(0,p.localize)(4,null)),d=(0,C.registerIcon)("notifications-configure",S.Codicon.gear,(0,p.localize)(5,null)),n=(0,C.registerIcon)("notifications-do-not-disturb",S.Codicon.bellSlash,(0,p.localize)(6,null));let a=class extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(i)),this.commandService=M}async run(_){this.commandService.executeCommand(E.CLEAR_NOTIFICATION,_)}};a.ID=E.CLEAR_NOTIFICATION,a.LABEL=(0,p.localize)(7,null),a=we([F(2,I.ICommandService)],a),e.ClearNotificationAction=a;let o=class extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(f)),this.commandService=M}async run(){this.commandService.executeCommand(E.CLEAR_ALL_NOTIFICATIONS)}};o.ID=E.CLEAR_ALL_NOTIFICATIONS,o.LABEL=(0,p.localize)(8,null),o=we([F(2,I.ICommandService)],o),e.ClearAllNotificationsAction=o;let g=class extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(n)),this.commandService=M}async run(){this.commandService.executeCommand(E.TOGGLE_DO_NOT_DISTURB_MODE)}};g.ID=E.TOGGLE_DO_NOT_DISTURB_MODE,g.LABEL=(0,p.localize)(9,null),g=we([F(2,I.ICommandService)],g),e.ToggleDoNotDisturbAction=g;let h=class extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(c)),this.commandService=M}async run(){this.commandService.executeCommand(E.HIDE_NOTIFICATIONS_CENTER)}};h.ID=E.HIDE_NOTIFICATIONS_CENTER,h.LABEL=(0,p.localize)(10,null),h=we([F(2,I.ICommandService)],h),e.HideNotificationsCenterAction=h;let v=class extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(l)),this.commandService=M}async run(_){this.commandService.executeCommand(E.EXPAND_NOTIFICATION,_)}};v.ID=E.EXPAND_NOTIFICATION,v.LABEL=(0,p.localize)(11,null),v=we([F(2,I.ICommandService)],v),e.ExpandNotificationAction=v;let m=class extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(s)),this.commandService=M}async run(_){this.commandService.executeCommand(E.COLLAPSE_NOTIFICATION,_)}};m.ID=E.COLLAPSE_NOTIFICATION,m.LABEL=(0,p.localize)(12,null),m=we([F(2,I.ICommandService)],m),e.CollapseNotificationAction=m;class w extends R.Action{constructor(_,L,M){super(_,L,r.ThemeIcon.asClassName(d)),this.configurationActions=M}}e.ConfigureNotificationAction=w,w.ID="workbench.action.configureNotification",w.LABEL=(0,p.localize)(13,null);let D=class extends R.Action{constructor(_,L,M){super(_,L),this.clipboardService=M}run(_){return this.clipboardService.writeText(_.message.raw)}};D.ID="workbench.action.copyNotificationMessage",D.LABEL=(0,p.localize)(14,null),D=we([F(2,b.IClipboardService)],D),e.CopyNotificationMessageAction=D;let y=class extends R.ActionRunner{constructor(_,L){super(),this.telemetryService=_,this.notificationService=L}async runAction(_,L){this.telemetryService.publicLog2("workbenchActionExecuted",{id:_.id,from:"message"}),(0,t.isNotificationViewItem)(L)&&this.telemetryService.publicLog2("notification:actionExecuted",{id:(0,u.hash)(L.message.original.toString()).toString(),actionLabel:_.label,source:L.sourceId||"core",silent:L.silent});try{await super.runAction(_,L)}catch(M){this.notificationService.error(M)}}};y=we([F(0,A.ITelemetryService),F(1,k.INotificationService)],y),e.NotificationActionRunner=y}),define(ae[2277],le([1,0,10,41,9,1510,182,73,12,79,36,5,2,37,442,630,38,303,26,16,29,279,195,133,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationTemplateRenderer=e.NotificationRenderer=e.NotificationsListDelegate=void 0;class v{constructor(T){this.offsetHelper=this.createOffsetHelper(T)}createOffsetHelper(T){const _=document.createElement("div");return _.classList.add("notification-offset-helper"),T.appendChild(_),_}getHeight(T){if(!T.expanded)return v.ROW_HEIGHT;let _=v.ROW_HEIGHT;const L=this.computePreferredHeight(T);return v.LINE_HEIGHT<L&&(_+=L-v.LINE_HEIGHT),(T.source||(0,d.isNonEmptyArray)(T.actions&&T.actions.primary))&&(_+=v.ROW_HEIGHT),_===v.ROW_HEIGHT&&T.collapse(!0),_}computePreferredHeight(T){let _=1;T.canCollapse&&_++,(0,d.isNonEmptyArray)(T.actions&&T.actions.secondary)&&_++,this.offsetHelper.style.width=`${450-(10+26+_*(24+8)-4)}px`;const L=m.render(T.message);this.offsetHelper.appendChild(L);const M=Math.max(this.offsetHelper.offsetHeight,this.offsetHelper.scrollHeight);return(0,t.clearNode)(this.offsetHelper),M}getTemplateId(T){if(T instanceof i.NotificationViewItem)return w.TEMPLATE_ID;throw new Error("unknown element type: "+T)}}e.NotificationsListDelegate=v,v.ROW_HEIGHT=42,v.LINE_HEIGHT=22;class m{static render(T,_){const L=document.createElement("span");for(const M of T.linkedText.nodes)if(typeof M=="string")L.appendChild(document.createTextNode(M));else{let O=M.title;!O&&M.href.startsWith("command:")?O=(0,A.localize)(0,null,M.href.substr(8)):O||(O=M.href);const N=(0,t.$)("a",{href:M.href,title:O},M.label);if(_){const P=z=>{t.EventHelper.stop(z,!0),_.callback(M.href)},B=_.toDispose.add(new o.DomEmitter(N,"click")).event;_.toDispose.add(g.Gesture.addTarget(N));const V=_.toDispose.add(new o.DomEmitter(N,g.EventType.Tap)).event;h.Event.any(B,V)(P,null,_.toDispose)}L.appendChild(N)}return L}}let w=class Ca{constructor(T,_,L,M){this.actionRunner=T,this.themeService=_,this.contextMenuService=L,this.instantiationService=M}get templateId(){return Ca.TEMPLATE_ID}renderTemplate(T){const _=Object.create(null);_.toDispose=new r.DisposableStore,_.container=document.createElement("div"),_.container.classList.add("notification-list-item"),_.mainRow=document.createElement("div"),_.mainRow.classList.add("notification-list-item-main-row"),_.icon=document.createElement("div"),_.icon.classList.add("notification-list-item-icon","codicon"),_.message=document.createElement("div"),_.message.classList.add("notification-list-item-message");const L=document.createElement("div");return L.classList.add("notification-list-item-toolbar-container"),_.toolbar=new b.ActionBar(L,{ariaLabel:(0,A.localize)(1,null),actionViewItemProvider:M=>{if(M&&M instanceof f.ConfigureNotificationAction){const O=new a.DropdownMenuActionViewItem(M,M.configurationActions,this.contextMenuService,{actionRunner:this.actionRunner,classNames:M.class});return _.toDispose.add(O),O}},actionRunner:this.actionRunner}),_.toDispose.add(_.toolbar),_.detailsRow=document.createElement("div"),_.detailsRow.classList.add("notification-list-item-details-row"),_.source=document.createElement("div"),_.source.classList.add("notification-list-item-source"),_.buttonsContainer=document.createElement("div"),_.buttonsContainer.classList.add("notification-list-item-buttons-container"),T.appendChild(_.container),_.container.appendChild(_.detailsRow),_.detailsRow.appendChild(_.source),_.detailsRow.appendChild(_.buttonsContainer),_.container.appendChild(_.mainRow),_.mainRow.appendChild(_.icon),_.mainRow.appendChild(_.message),_.mainRow.appendChild(L),_.progress=new l.ProgressBar(T),_.toDispose.add((0,E.attachProgressBarStyler)(_.progress,this.themeService)),_.toDispose.add(_.progress),_.renderer=this.instantiationService.createInstance(D,_,this.actionRunner),_.toDispose.add(_.renderer),_}renderElement(T,_,L){L.renderer.setInput(T)}disposeTemplate(T){(0,r.dispose)(T.toDispose)}};w.TEMPLATE_ID="notification",w=we([F(1,I.IThemeService),F(2,u.IContextMenuService),F(3,C.IInstantiationService)],w),e.NotificationRenderer=w;let D=class Ri extends r.Disposable{constructor(T,_,L,M,O,N,P){super(),this.template=T,this.actionRunner=_,this.openerService=L,this.instantiationService=M,this.themeService=O,this.keybindingService=N,this.contextMenuService=P,this.inputDisposables=this._register(new r.DisposableStore),Ri.closeNotificationAction||(Ri.closeNotificationAction=M.createInstance(f.ClearNotificationAction,f.ClearNotificationAction.ID,f.ClearNotificationAction.LABEL),Ri.expandNotificationAction=M.createInstance(f.ExpandNotificationAction,f.ExpandNotificationAction.ID,f.ExpandNotificationAction.LABEL),Ri.collapseNotificationAction=M.createInstance(f.CollapseNotificationAction,f.CollapseNotificationAction.ID,f.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,L=>{L.button===1&&t.EventHelper.stop(L,!0)})),this.inputDisposables.add((0,t.addDisposableListener)(this.template.container,t.EventType.AUXCLICK,L=>{!T.hasProgress&&L.button===1&&(t.EventHelper.stop(L,!0),T.close())})),this.renderSeverity(T);const _=this.renderMessage(T);this.renderSecondaryActions(T,_),this.renderSource(T),this.renderButtons(T),this.renderProgress(T),this.inputDisposables.add(T.onDidChangeContent(L=>{switch(L.kind){case 0:this.renderSeverity(T);break;case 3:this.renderProgress(T);break;case 1:this.renderMessage(T);break}}))}renderSeverity(T){Ri.SEVERITIES.forEach(_=>{T.severity!==_&&this.template.icon.classList.remove(...this.toSeverityIcon(_).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:M=>this.openerService.open(R.URI.parse(M),{allowCommands:!0}),toDispose:this.inputDisposables}));const _=T.canCollapse&&!T.expanded&&this.template.message.scrollWidth>this.template.message.clientWidth;_?this.template.message.title=this.template.message.textContent+"":this.template.message.removeAttribute("title");const L=this.template.message.querySelectorAll("a");for(let M=0;M<L.length;M++)L.item(M).tabIndex=-1;return _}renderSecondaryActions(T,_){const L=[],M=T.actions?T.actions.secondary:void 0;if((0,d.isNonEmptyArray)(M)){const N=this.instantiationService.createInstance(f.ConfigureNotificationAction,f.ConfigureNotificationAction.ID,f.ConfigureNotificationAction.LABEL,M);L.push(N),this.inputDisposables.add(N)}let O=!1;T.canCollapse&&(T.expanded||T.source||_)&&(O=!0),O&&L.push(T.expanded?Ri.collapseNotificationAction:Ri.expandNotificationAction),T.hasProgress||L.push(Ri.closeNotificationAction),this.template.toolbar.clear(),this.template.toolbar.context=T,L.forEach(N=>this.template.toolbar.push(N,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(N)}))}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 _=T.actions?T.actions.primary:void 0;if(T.expanded&&(0,d.isNonEmptyArray)(_)){const L=this,M=new class extends S.ActionRunner{async runAction(N){L.actionRunner.run(N,T),(!(N instanceof i.ChoiceAction)||!N.keepOpen)&&T.close()}},O=this.inputDisposables.add(new k.ButtonBar(this.template.buttonsContainer));for(let N=0;N<_.length;N++){const P=_[N],B={title:!0,secondary:N>0},V=P instanceof i.ChoiceAction?P.menu:void 0,z=this.inputDisposables.add(V?O.addButtonWithDropdown({...B,contextMenuProvider:this.contextMenuService,actions:V,actionRunner:M}):O.addButton(B));z.label=P.label,this.inputDisposables.add(z.onDidClick(x=>{x&&t.EventHelper.stop(x,!0),M.run(P)})),this.inputDisposables.add((0,E.attachButtonStyler)(z,this.themeService))}}}renderProgress(T){if(!T.hasProgress){this.template.progress.stop().hide();return}const _=T.progress.state;_.infinite?this.template.progress.infinite().show():typeof _.total=="number"||typeof _.worked=="number"?(typeof _.total=="number"&&!this.template.progress.hasTotal()&&this.template.progress.total(_.total),typeof _.worked=="number"&&this.template.progress.setWorked(_.worked).show()):this.template.progress.done().hide()}toSeverityIcon(T){switch(T){case s.Severity.Warning:return n.Codicon.warning;case s.Severity.Error:return n.Codicon.error}return n.Codicon.info}getKeybindingLabel(T){const _=this.keybindingService.lookupKeybinding(T.id);return _?_.getLabel():null}};D.SEVERITIES=[s.Severity.Info,s.Severity.Warning,s.Severity.Error],D=we([F(2,p.IOpenerService),F(3,C.IInstantiationService),F(4,I.IThemeService),F(5,c.IKeybindingService),F(6,u.IContextMenuService)],D),e.NotificationTemplateRenderer=D}),define(ae[851],le([1,0,9,52,6,18,2,144,34,8]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceGlobMatcher=void 0;let S=class Xi extends k.Disposable{constructor(r,u,i,f){super(),this.globFn=r,this.shouldUpdate=u,this.contextService=i,this.configurationService=f,this._onExpressionChange=this._register(new R.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(r=>{this.shouldUpdate(r)&&this.updateExcludes(!0)})),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.updateExcludes(!0)))}updateExcludes(r){let u=!1;this.contextService.getWorkspace().folders.forEach(f=>{const c=this.globFn(f.uri);(!this.mapRootToExpressionConfig.has(f.uri.toString())||!(0,p.equals)(this.mapRootToExpressionConfig.get(f.uri.toString()),c))&&(u=!0,this.mapRootToParsedExpression.set(f.uri.toString(),(0,E.parse)(c)),this.mapRootToExpressionConfig.set(f.uri.toString(),(0,p.deepClone)(c)))}),this.mapRootToExpressionConfig.forEach((f,c)=>{c!==Xi.NO_ROOT&&c&&!this.contextService.getWorkspaceFolder(t.URI.parse(c))&&(this.mapRootToParsedExpression.delete(c),this.mapRootToExpressionConfig.delete(c),u=!0)});const i=this.globFn();(!this.mapRootToExpressionConfig.has(Xi.NO_ROOT)||!(0,p.equals)(this.mapRootToExpressionConfig.get(Xi.NO_ROOT),i))&&(u=!0,this.mapRootToParsedExpression.set(Xi.NO_ROOT,(0,E.parse)(i)),this.mapRootToExpressionConfig.set(Xi.NO_ROOT,(0,p.deepClone)(i))),r&&u&&this._onExpressionChange.fire()}matches(r){const u=this.contextService.getWorkspaceFolder(r);let i;u&&this.mapRootToParsedExpression.has(u.uri.toString())?i=this.mapRootToParsedExpression.get(u.uri.toString()):i=this.mapRootToParsedExpression.get(Xi.NO_ROOT);let f;return u?f=(0,A.relativePath)(u.uri,r):f=r.fsPath,!!i&&typeof f=="string"&&!!i(f)}};S.NO_ROOT=null,S=we([F(2,I.IWorkspaceContextService),F(3,b.IConfigurationService)],S),e.ResourceGlobMatcher=S}),define(ae[80],le([1,0,1536,33,65,126]),function(J,e,t,p,R,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_SETTINGS_PROFILE_BACKGROUND=e.ACTIVITY_BAR_SETTINGS_PROFILE_HOVER_FOREGROUND=e.ACTIVITY_BAR_SETTINGS_PROFILE_FOREGROUND=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_DROP_INTO_PROMPT_BORDER=e.EDITOR_DROP_INTO_PROMPT_BACKGROUND=e.EDITOR_DROP_INTO_PROMPT_FOREGROUND=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(E){switch(E.type){case A.ColorScheme.LIGHT:return R.Color.fromHex("#F3F3F3");case A.ColorScheme.HIGH_CONTRAST_LIGHT:return R.Color.fromHex("#FFFFFF");case A.ColorScheme.HIGH_CONTRAST_DARK:return R.Color.fromHex("#000000");default:return R.Color.fromHex("#252526")}}e.WORKBENCH_BACKGROUND=k,e.TAB_ACTIVE_BACKGROUND=(0,p.registerColor)("tab.activeBackground",{dark:p.editorBackground,light:p.editorBackground,hcDark:p.editorBackground,hcLight:p.editorBackground},(0,t.localize)(0,null)),e.TAB_UNFOCUSED_ACTIVE_BACKGROUND=(0,p.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,p.registerColor)("tab.inactiveBackground",{dark:"#2D2D2D",light:"#ECECEC",hcDark:null,hcLight:null},(0,t.localize)(2,null)),e.TAB_UNFOCUSED_INACTIVE_BACKGROUND=(0,p.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,p.registerColor)("tab.activeForeground",{dark:R.Color.white,light:"#333333",hcDark:R.Color.white,hcLight:"#292929"},(0,t.localize)(4,null)),e.TAB_INACTIVE_FOREGROUND=(0,p.registerColor)("tab.inactiveForeground",{dark:(0,p.transparent)(e.TAB_ACTIVE_FOREGROUND,.5),light:(0,p.transparent)(e.TAB_ACTIVE_FOREGROUND,.7),hcDark:R.Color.white,hcLight:"#292929"},(0,t.localize)(5,null)),e.TAB_UNFOCUSED_ACTIVE_FOREGROUND=(0,p.registerColor)("tab.unfocusedActiveForeground",{dark:(0,p.transparent)(e.TAB_ACTIVE_FOREGROUND,.5),light:(0,p.transparent)(e.TAB_ACTIVE_FOREGROUND,.7),hcDark:R.Color.white,hcLight:"#292929"},(0,t.localize)(6,null)),e.TAB_UNFOCUSED_INACTIVE_FOREGROUND=(0,p.registerColor)("tab.unfocusedInactiveForeground",{dark:(0,p.transparent)(e.TAB_INACTIVE_FOREGROUND,.5),light:(0,p.transparent)(e.TAB_INACTIVE_FOREGROUND,.5),hcDark:R.Color.white,hcLight:"#292929"},(0,t.localize)(7,null)),e.TAB_HOVER_BACKGROUND=(0,p.registerColor)("tab.hoverBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(8,null)),e.TAB_UNFOCUSED_HOVER_BACKGROUND=(0,p.registerColor)("tab.unfocusedHoverBackground",{dark:(0,p.transparent)(e.TAB_HOVER_BACKGROUND,.5),light:(0,p.transparent)(e.TAB_HOVER_BACKGROUND,.7),hcDark:null,hcLight:null},(0,t.localize)(9,null)),e.TAB_HOVER_FOREGROUND=(0,p.registerColor)("tab.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(10,null)),e.TAB_UNFOCUSED_HOVER_FOREGROUND=(0,p.registerColor)("tab.unfocusedHoverForeground",{dark:(0,p.transparent)(e.TAB_HOVER_FOREGROUND,.5),light:(0,p.transparent)(e.TAB_HOVER_FOREGROUND,.5),hcDark:null,hcLight:null},(0,t.localize)(11,null)),e.TAB_BORDER=(0,p.registerColor)("tab.border",{dark:"#252526",light:"#F3F3F3",hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(12,null)),e.TAB_LAST_PINNED_BORDER=(0,p.registerColor)("tab.lastPinnedBorder",{dark:p.treeIndentGuidesStroke,light:p.treeIndentGuidesStroke,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(13,null)),e.TAB_ACTIVE_BORDER=(0,p.registerColor)("tab.activeBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(14,null)),e.TAB_UNFOCUSED_ACTIVE_BORDER=(0,p.registerColor)("tab.unfocusedActiveBorder",{dark:(0,p.transparent)(e.TAB_ACTIVE_BORDER,.5),light:(0,p.transparent)(e.TAB_ACTIVE_BORDER,.7),hcDark:null,hcLight:null},(0,t.localize)(15,null)),e.TAB_ACTIVE_BORDER_TOP=(0,p.registerColor)("tab.activeBorderTop",{dark:null,light:null,hcDark:null,hcLight:"#B5200D"},(0,t.localize)(16,null)),e.TAB_UNFOCUSED_ACTIVE_BORDER_TOP=(0,p.registerColor)("tab.unfocusedActiveBorderTop",{dark:(0,p.transparent)(e.TAB_ACTIVE_BORDER_TOP,.5),light:(0,p.transparent)(e.TAB_ACTIVE_BORDER_TOP,.7),hcDark:null,hcLight:"#B5200D"},(0,t.localize)(17,null)),e.TAB_HOVER_BORDER=(0,p.registerColor)("tab.hoverBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(18,null)),e.TAB_UNFOCUSED_HOVER_BORDER=(0,p.registerColor)("tab.unfocusedHoverBorder",{dark:(0,p.transparent)(e.TAB_HOVER_BORDER,.5),light:(0,p.transparent)(e.TAB_HOVER_BORDER,.7),hcDark:null,hcLight:p.contrastBorder},(0,t.localize)(19,null)),e.TAB_ACTIVE_MODIFIED_BORDER=(0,p.registerColor)("tab.activeModifiedBorder",{dark:"#3399CC",light:"#33AAEE",hcDark:null,hcLight:p.contrastBorder},(0,t.localize)(20,null)),e.TAB_INACTIVE_MODIFIED_BORDER=(0,p.registerColor)("tab.inactiveModifiedBorder",{dark:(0,p.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),light:(0,p.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),hcDark:R.Color.white,hcLight:p.contrastBorder},(0,t.localize)(21,null)),e.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER=(0,p.registerColor)("tab.unfocusedActiveModifiedBorder",{dark:(0,p.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.5),light:(0,p.transparent)(e.TAB_ACTIVE_MODIFIED_BORDER,.7),hcDark:R.Color.white,hcLight:p.contrastBorder},(0,t.localize)(22,null)),e.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER=(0,p.registerColor)("tab.unfocusedInactiveModifiedBorder",{dark:(0,p.transparent)(e.TAB_INACTIVE_MODIFIED_BORDER,.5),light:(0,p.transparent)(e.TAB_INACTIVE_MODIFIED_BORDER,.5),hcDark:R.Color.white,hcLight:p.contrastBorder},(0,t.localize)(23,null)),e.EDITOR_PANE_BACKGROUND=(0,p.registerColor)("editorPane.background",{dark:p.editorBackground,light:p.editorBackground,hcDark:p.editorBackground,hcLight:p.editorBackground},(0,t.localize)(24,null)),e.EDITOR_GROUP_EMPTY_BACKGROUND=(0,p.registerColor)("editorGroup.emptyBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(25,null)),e.EDITOR_GROUP_FOCUSED_EMPTY_BORDER=(0,p.registerColor)("editorGroup.focusedEmptyBorder",{dark:null,light:null,hcDark:p.focusBorder,hcLight:p.focusBorder},(0,t.localize)(26,null)),e.EDITOR_GROUP_HEADER_TABS_BACKGROUND=(0,p.registerColor)("editorGroupHeader.tabsBackground",{dark:"#252526",light:"#F3F3F3",hcDark:null,hcLight:null},(0,t.localize)(27,null)),e.EDITOR_GROUP_HEADER_TABS_BORDER=(0,p.registerColor)("editorGroupHeader.tabsBorder",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(28,null)),e.EDITOR_GROUP_HEADER_NO_TABS_BACKGROUND=(0,p.registerColor)("editorGroupHeader.noTabsBackground",{dark:p.editorBackground,light:p.editorBackground,hcDark:p.editorBackground,hcLight:p.editorBackground},(0,t.localize)(29,null)),e.EDITOR_GROUP_HEADER_BORDER=(0,p.registerColor)("editorGroupHeader.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(30,null)),e.EDITOR_GROUP_BORDER=(0,p.registerColor)("editorGroup.border",{dark:"#444444",light:"#E7E7E7",hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(31,null)),e.EDITOR_DRAG_AND_DROP_BACKGROUND=(0,p.registerColor)("editorGroup.dropBackground",{dark:R.Color.fromHex("#53595D").transparent(.5),light:R.Color.fromHex("#2677CB").transparent(.18),hcDark:null,hcLight:R.Color.fromHex("#0F4A85").transparent(.5)},(0,t.localize)(32,null)),e.EDITOR_DROP_INTO_PROMPT_FOREGROUND=(0,p.registerColor)("editorGroup.dropIntoPromptForeground",{dark:p.editorWidgetForeground,light:p.editorWidgetForeground,hcDark:p.editorWidgetForeground,hcLight:p.editorWidgetForeground},(0,t.localize)(33,null)),e.EDITOR_DROP_INTO_PROMPT_BACKGROUND=(0,p.registerColor)("editorGroup.dropIntoPromptBackground",{dark:p.editorWidgetBackground,light:p.editorWidgetBackground,hcDark:p.editorWidgetBackground,hcLight:p.editorWidgetBackground},(0,t.localize)(34,null)),e.EDITOR_DROP_INTO_PROMPT_BORDER=(0,p.registerColor)("editorGroup.dropIntoPromptBorder",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(35,null)),e.SIDE_BY_SIDE_EDITOR_HORIZONTAL_BORDER=(0,p.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)(36,null)),e.SIDE_BY_SIDE_EDITOR_VERTICAL_BORDER=(0,p.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)(37,null)),e.PANEL_BACKGROUND=(0,p.registerColor)("panel.background",{dark:p.editorBackground,light:p.editorBackground,hcDark:p.editorBackground,hcLight:p.editorBackground},(0,t.localize)(38,null)),e.PANEL_BORDER=(0,p.registerColor)("panel.border",{dark:R.Color.fromHex("#808080").transparent(.35),light:R.Color.fromHex("#808080").transparent(.35),hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(39,null)),e.PANEL_ACTIVE_TITLE_FOREGROUND=(0,p.registerColor)("panelTitle.activeForeground",{dark:"#E7E7E7",light:"#424242",hcDark:R.Color.white,hcLight:p.editorForeground},(0,t.localize)(40,null)),e.PANEL_INACTIVE_TITLE_FOREGROUND=(0,p.registerColor)("panelTitle.inactiveForeground",{dark:(0,p.transparent)(e.PANEL_ACTIVE_TITLE_FOREGROUND,.6),light:(0,p.transparent)(e.PANEL_ACTIVE_TITLE_FOREGROUND,.75),hcDark:R.Color.white,hcLight:p.editorForeground},(0,t.localize)(41,null)),e.PANEL_ACTIVE_TITLE_BORDER=(0,p.registerColor)("panelTitle.activeBorder",{dark:e.PANEL_ACTIVE_TITLE_FOREGROUND,light:e.PANEL_ACTIVE_TITLE_FOREGROUND,hcDark:p.contrastBorder,hcLight:"#B5200D"},(0,t.localize)(42,null)),e.PANEL_INPUT_BORDER=(0,p.registerColor)("panelInput.border",{dark:null,light:R.Color.fromHex("#ddd"),hcDark:null,hcLight:null},(0,t.localize)(43,null)),e.PANEL_DRAG_AND_DROP_BORDER=(0,p.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)(44,null)),e.PANEL_SECTION_DRAG_AND_DROP_BACKGROUND=(0,p.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)(45,null)),e.PANEL_SECTION_HEADER_BACKGROUND=(0,p.registerColor)("panelSectionHeader.background",{dark:R.Color.fromHex("#808080").transparent(.2),light:R.Color.fromHex("#808080").transparent(.2),hcDark:null,hcLight:null},(0,t.localize)(46,null)),e.PANEL_SECTION_HEADER_FOREGROUND=(0,p.registerColor)("panelSectionHeader.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(47,null)),e.PANEL_SECTION_HEADER_BORDER=(0,p.registerColor)("panelSectionHeader.border",{dark:p.contrastBorder,light:p.contrastBorder,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(48,null)),e.PANEL_SECTION_BORDER=(0,p.registerColor)("panelSection.border",{dark:e.PANEL_BORDER,light:e.PANEL_BORDER,hcDark:e.PANEL_BORDER,hcLight:e.PANEL_BORDER},(0,t.localize)(49,null)),e.BANNER_BACKGROUND=(0,p.registerColor)("banner.background",{dark:p.listActiveSelectionBackground,light:(0,p.darken)(p.listActiveSelectionBackground,.3),hcDark:p.listActiveSelectionBackground,hcLight:p.listActiveSelectionBackground},(0,t.localize)(50,null)),e.BANNER_FOREGROUND=(0,p.registerColor)("banner.foreground",{dark:p.listActiveSelectionForeground,light:p.listActiveSelectionForeground,hcDark:p.listActiveSelectionForeground,hcLight:p.listActiveSelectionForeground},(0,t.localize)(51,null)),e.BANNER_ICON_FOREGROUND=(0,p.registerColor)("banner.iconForeground",{dark:p.editorInfoForeground,light:p.editorInfoForeground,hcDark:p.editorInfoForeground,hcLight:p.editorInfoForeground},(0,t.localize)(52,null)),e.STATUS_BAR_FOREGROUND=(0,p.registerColor)("statusBar.foreground",{dark:"#FFFFFF",light:"#FFFFFF",hcDark:"#FFFFFF",hcLight:p.editorForeground},(0,t.localize)(53,null)),e.STATUS_BAR_NO_FOLDER_FOREGROUND=(0,p.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)(54,null)),e.STATUS_BAR_BACKGROUND=(0,p.registerColor)("statusBar.background",{dark:"#007ACC",light:"#007ACC",hcDark:null,hcLight:null},(0,t.localize)(55,null)),e.STATUS_BAR_NO_FOLDER_BACKGROUND=(0,p.registerColor)("statusBar.noFolderBackground",{dark:"#68217A",light:"#68217A",hcDark:null,hcLight:null},(0,t.localize)(56,null)),e.STATUS_BAR_BORDER=(0,p.registerColor)("statusBar.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(57,null)),e.STATUS_BAR_FOCUS_BORDER=(0,p.registerColor)("statusBar.focusBorder",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:null,hcLight:e.STATUS_BAR_FOREGROUND},(0,t.localize)(58,null)),e.STATUS_BAR_NO_FOLDER_BORDER=(0,p.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)(59,null)),e.STATUS_BAR_ITEM_ACTIVE_BACKGROUND=(0,p.registerColor)("statusBarItem.activeBackground",{dark:R.Color.white.transparent(.18),light:R.Color.white.transparent(.18),hcDark:R.Color.white.transparent(.18),hcLight:R.Color.black.transparent(.18)},(0,t.localize)(60,null)),e.STATUS_BAR_ITEM_FOCUS_BORDER=(0,p.registerColor)("statusBarItem.focusBorder",{dark:e.STATUS_BAR_FOREGROUND,light:e.STATUS_BAR_FOREGROUND,hcDark:null,hcLight:p.activeContrastBorder},(0,t.localize)(61,null)),e.STATUS_BAR_ITEM_HOVER_BACKGROUND=(0,p.registerColor)("statusBarItem.hoverBackground",{dark:R.Color.white.transparent(.12),light:R.Color.white.transparent(.12),hcDark:R.Color.white.transparent(.12),hcLight:R.Color.black.transparent(.12)},(0,t.localize)(62,null)),e.STATUS_BAR_ITEM_COMPACT_HOVER_BACKGROUND=(0,p.registerColor)("statusBarItem.compactHoverBackground",{dark:R.Color.white.transparent(.2),light:R.Color.white.transparent(.2),hcDark:R.Color.white.transparent(.2),hcLight:R.Color.black.transparent(.2)},(0,t.localize)(63,null)),e.STATUS_BAR_PROMINENT_ITEM_FOREGROUND=(0,p.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)(64,null)),e.STATUS_BAR_PROMINENT_ITEM_BACKGROUND=(0,p.registerColor)("statusBarItem.prominentBackground",{dark:R.Color.black.transparent(.5),light:R.Color.black.transparent(.5),hcDark:R.Color.black.transparent(.5),hcLight:R.Color.black.transparent(.5)},(0,t.localize)(65,null)),e.STATUS_BAR_PROMINENT_ITEM_HOVER_BACKGROUND=(0,p.registerColor)("statusBarItem.prominentHoverBackground",{dark:R.Color.black.transparent(.3),light:R.Color.black.transparent(.3),hcDark:R.Color.black.transparent(.3),hcLight:null},(0,t.localize)(66,null)),e.STATUS_BAR_ERROR_ITEM_BACKGROUND=(0,p.registerColor)("statusBarItem.errorBackground",{dark:(0,p.darken)(p.errorForeground,.4),light:(0,p.darken)(p.errorForeground,.4),hcDark:null,hcLight:"#B5200D"},(0,t.localize)(67,null)),e.STATUS_BAR_ERROR_ITEM_FOREGROUND=(0,p.registerColor)("statusBarItem.errorForeground",{dark:R.Color.white,light:R.Color.white,hcDark:R.Color.white,hcLight:R.Color.white},(0,t.localize)(68,null)),e.STATUS_BAR_WARNING_ITEM_BACKGROUND=(0,p.registerColor)("statusBarItem.warningBackground",{dark:(0,p.darken)(p.editorWarningForeground,.4),light:(0,p.darken)(p.editorWarningForeground,.4),hcDark:null,hcLight:"#895503"},(0,t.localize)(69,null)),e.STATUS_BAR_WARNING_ITEM_FOREGROUND=(0,p.registerColor)("statusBarItem.warningForeground",{dark:R.Color.white,light:R.Color.white,hcDark:R.Color.white,hcLight:R.Color.white},(0,t.localize)(70,null)),e.ACTIVITY_BAR_BACKGROUND=(0,p.registerColor)("activityBar.background",{dark:"#333333",light:"#2C2C2C",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(71,null)),e.ACTIVITY_BAR_FOREGROUND=(0,p.registerColor)("activityBar.foreground",{dark:R.Color.white,light:R.Color.white,hcDark:R.Color.white,hcLight:p.editorForeground},(0,t.localize)(72,null)),e.ACTIVITY_BAR_INACTIVE_FOREGROUND=(0,p.registerColor)("activityBar.inactiveForeground",{dark:(0,p.transparent)(e.ACTIVITY_BAR_FOREGROUND,.4),light:(0,p.transparent)(e.ACTIVITY_BAR_FOREGROUND,.4),hcDark:R.Color.white,hcLight:p.editorForeground},(0,t.localize)(73,null)),e.ACTIVITY_BAR_BORDER=(0,p.registerColor)("activityBar.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(74,null)),e.ACTIVITY_BAR_ACTIVE_BORDER=(0,p.registerColor)("activityBar.activeBorder",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:null,hcLight:p.contrastBorder},(0,t.localize)(75,null)),e.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER=(0,p.registerColor)("activityBar.activeFocusBorder",{dark:null,light:null,hcDark:null,hcLight:"#B5200D"},(0,t.localize)(76,null)),e.ACTIVITY_BAR_ACTIVE_BACKGROUND=(0,p.registerColor)("activityBar.activeBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(77,null)),e.ACTIVITY_BAR_DRAG_AND_DROP_BORDER=(0,p.registerColor)("activityBar.dropBorder",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:null,hcLight:null},(0,t.localize)(78,null)),e.ACTIVITY_BAR_BADGE_BACKGROUND=(0,p.registerColor)("activityBarBadge.background",{dark:"#007ACC",light:"#007ACC",hcDark:"#000000",hcLight:"#0F4A85"},(0,t.localize)(79,null)),e.ACTIVITY_BAR_BADGE_FOREGROUND=(0,p.registerColor)("activityBarBadge.foreground",{dark:R.Color.white,light:R.Color.white,hcDark:R.Color.white,hcLight:R.Color.white},(0,t.localize)(80,null)),e.ACTIVITY_BAR_SETTINGS_PROFILE_FOREGROUND=(0,p.registerColor)("activityBarItem.settingsProfilesForeground",{dark:e.ACTIVITY_BAR_INACTIVE_FOREGROUND,light:e.ACTIVITY_BAR_INACTIVE_FOREGROUND,hcDark:e.ACTIVITY_BAR_INACTIVE_FOREGROUND,hcLight:e.ACTIVITY_BAR_INACTIVE_FOREGROUND},(0,t.localize)(81,null)),e.ACTIVITY_BAR_SETTINGS_PROFILE_HOVER_FOREGROUND=(0,p.registerColor)("activityBarItem.settingsProfilesHoverForeground",{dark:e.ACTIVITY_BAR_FOREGROUND,light:e.ACTIVITY_BAR_FOREGROUND,hcDark:e.ACTIVITY_BAR_FOREGROUND,hcLight:e.ACTIVITY_BAR_FOREGROUND},(0,t.localize)(82,null)),e.ACTIVITY_BAR_SETTINGS_PROFILE_BACKGROUND=(0,p.registerColor)("activityBarItem.settingsProfilesBackground",{dark:(0,p.lighten)(e.ACTIVITY_BAR_BACKGROUND,.5),light:(0,p.darken)(e.ACTIVITY_BAR_BACKGROUND,.12),hcDark:null,hcLight:null},(0,t.localize)(83,null)),e.STATUS_BAR_HOST_NAME_BACKGROUND=(0,p.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)(84,null)),e.STATUS_BAR_HOST_NAME_FOREGROUND=(0,p.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)(85,null)),e.EXTENSION_BADGE_REMOTE_BACKGROUND=(0,p.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)(86,null)),e.EXTENSION_BADGE_REMOTE_FOREGROUND=(0,p.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)(87,null)),e.SIDE_BAR_BACKGROUND=(0,p.registerColor)("sideBar.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(88,null)),e.SIDE_BAR_FOREGROUND=(0,p.registerColor)("sideBar.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(89,null)),e.SIDE_BAR_BORDER=(0,p.registerColor)("sideBar.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(90,null)),e.SIDE_BAR_TITLE_FOREGROUND=(0,p.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)(91,null)),e.SIDE_BAR_DRAG_AND_DROP_BACKGROUND=(0,p.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)(92,null)),e.SIDE_BAR_SECTION_HEADER_BACKGROUND=(0,p.registerColor)("sideBarSectionHeader.background",{dark:R.Color.fromHex("#808080").transparent(.2),light:R.Color.fromHex("#808080").transparent(.2),hcDark:null,hcLight:null},(0,t.localize)(93,null)),e.SIDE_BAR_SECTION_HEADER_FOREGROUND=(0,p.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)(94,null)),e.SIDE_BAR_SECTION_HEADER_BORDER=(0,p.registerColor)("sideBarSectionHeader.border",{dark:p.contrastBorder,light:p.contrastBorder,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(95,null)),e.TITLE_BAR_ACTIVE_FOREGROUND=(0,p.registerColor)("titleBar.activeForeground",{dark:"#CCCCCC",light:"#333333",hcDark:"#FFFFFF",hcLight:"#292929"},(0,t.localize)(96,null)),e.TITLE_BAR_INACTIVE_FOREGROUND=(0,p.registerColor)("titleBar.inactiveForeground",{dark:(0,p.transparent)(e.TITLE_BAR_ACTIVE_FOREGROUND,.6),light:(0,p.transparent)(e.TITLE_BAR_ACTIVE_FOREGROUND,.6),hcDark:null,hcLight:"#292929"},(0,t.localize)(97,null)),e.TITLE_BAR_ACTIVE_BACKGROUND=(0,p.registerColor)("titleBar.activeBackground",{dark:"#3C3C3C",light:"#DDDDDD",hcDark:"#000000",hcLight:"#FFFFFF"},(0,t.localize)(98,null)),e.TITLE_BAR_INACTIVE_BACKGROUND=(0,p.registerColor)("titleBar.inactiveBackground",{dark:(0,p.transparent)(e.TITLE_BAR_ACTIVE_BACKGROUND,.6),light:(0,p.transparent)(e.TITLE_BAR_ACTIVE_BACKGROUND,.6),hcDark:null,hcLight:null},(0,t.localize)(99,null)),e.TITLE_BAR_BORDER=(0,p.registerColor)("titleBar.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(100,null)),e.MENUBAR_SELECTION_FOREGROUND=(0,p.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)(101,null)),e.MENUBAR_SELECTION_BACKGROUND=(0,p.registerColor)("menubar.selectionBackground",{dark:p.toolbarHoverBackground,light:p.toolbarHoverBackground,hcDark:null,hcLight:null},(0,t.localize)(102,null)),e.MENUBAR_SELECTION_BORDER=(0,p.registerColor)("menubar.selectionBorder",{dark:null,light:null,hcDark:p.activeContrastBorder,hcLight:p.activeContrastBorder},(0,t.localize)(103,null)),e.NOTIFICATIONS_CENTER_BORDER=(0,p.registerColor)("notificationCenter.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(104,null)),e.NOTIFICATIONS_TOAST_BORDER=(0,p.registerColor)("notificationToast.border",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(105,null)),e.NOTIFICATIONS_FOREGROUND=(0,p.registerColor)("notifications.foreground",{dark:p.editorWidgetForeground,light:p.editorWidgetForeground,hcDark:p.editorWidgetForeground,hcLight:p.editorWidgetForeground},(0,t.localize)(106,null)),e.NOTIFICATIONS_BACKGROUND=(0,p.registerColor)("notifications.background",{dark:p.editorWidgetBackground,light:p.editorWidgetBackground,hcDark:p.editorWidgetBackground,hcLight:p.editorWidgetBackground},(0,t.localize)(107,null)),e.NOTIFICATIONS_LINKS=(0,p.registerColor)("notificationLink.foreground",{dark:p.textLinkForeground,light:p.textLinkForeground,hcDark:p.textLinkForeground,hcLight:p.textLinkForeground},(0,t.localize)(108,null)),e.NOTIFICATIONS_CENTER_HEADER_FOREGROUND=(0,p.registerColor)("notificationCenterHeader.foreground",{dark:null,light:null,hcDark:null,hcLight:null},(0,t.localize)(109,null)),e.NOTIFICATIONS_CENTER_HEADER_BACKGROUND=(0,p.registerColor)("notificationCenterHeader.background",{dark:(0,p.lighten)(e.NOTIFICATIONS_BACKGROUND,.3),light:(0,p.darken)(e.NOTIFICATIONS_BACKGROUND,.05),hcDark:e.NOTIFICATIONS_BACKGROUND,hcLight:e.NOTIFICATIONS_BACKGROUND},(0,t.localize)(110,null)),e.NOTIFICATIONS_BORDER=(0,p.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)(111,null)),e.NOTIFICATIONS_ERROR_ICON_FOREGROUND=(0,p.registerColor)("notificationsErrorIcon.foreground",{dark:p.editorErrorForeground,light:p.editorErrorForeground,hcDark:p.editorErrorForeground,hcLight:p.editorErrorForeground},(0,t.localize)(112,null)),e.NOTIFICATIONS_WARNING_ICON_FOREGROUND=(0,p.registerColor)("notificationsWarningIcon.foreground",{dark:p.editorWarningForeground,light:p.editorWarningForeground,hcDark:p.editorWarningForeground,hcLight:p.editorWarningForeground},(0,t.localize)(113,null)),e.NOTIFICATIONS_INFO_ICON_FOREGROUND=(0,p.registerColor)("notificationsInfoIcon.foreground",{dark:p.editorInfoForeground,light:p.editorInfoForeground,hcDark:p.editorInfoForeground,hcLight:p.editorInfoForeground},(0,t.localize)(114,null)),e.WINDOW_ACTIVE_BORDER=(0,p.registerColor)("window.activeBorder",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(115,null)),e.WINDOW_INACTIVE_BORDER=(0,p.registerColor)("window.inactiveBorder",{dark:null,light:null,hcDark:p.contrastBorder,hcLight:p.contrastBorder},(0,t.localize)(116,null))}),define(ae[852],le([1,0,1507,10,76,5,80,12,33,2277,630,37,13,29,71,1118]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsList=void 0;let f=class extends E.Themable{constructor(l,s,d,n,a){super(n),this.container=l,this.options=s,this.instantiationService=d,this.contextMenuService=a,this.viewModel=[]}show(l){if(this.isVisible){l&&(0,r.assertIsDefined)(this.list).domFocus();return}this.list||this.createNotificationsList(),this.isVisible=!0,l&&(0,r.assertIsDefined)(this.list).domFocus()}createNotificationsList(){this.listContainer=document.createElement("div"),this.listContainer.classList.add("notifications-list-container");const l=this._register(this.instantiationService.createInstance(S.NotificationActionRunner)),s=this.instantiationService.createInstance(b.NotificationRenderer,l),d=this.listDelegate=new b.NotificationsListDelegate(this.listContainer),n=this.options,a=this.list=this._register(this.instantiationService.createInstance(R.WorkbenchList,"NotificationsList",this.listContainer,d,[s],{...n,setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:k.NOTIFICATIONS_BACKGROUND},accessibilityProvider:{getAriaLabel(h){return h.source?(0,t.localize)(1,null,h.message.raw,h.source):(0,t.localize)(0,null,h.message.raw)},getWidgetAriaLabel(){return n.widgetAriaLabel??(0,t.localize)(2,null)},getRole(){return"dialog"}}})),o=this._register(this.instantiationService.createInstance(S.CopyNotificationMessageAction,S.CopyNotificationMessageAction.ID,S.CopyNotificationMessageAction.LABEL));this._register(a.onContextMenu(h=>{!h.element||this.contextMenuService.showContextMenu({getAnchor:()=>h.anchor,getActions:()=>[o],getActionsContext:()=>h.element,actionRunner:l})})),this._register(a.onMouseDblClick(h=>h.element.toggle()));const g=this._register((0,p.trackFocus)(a.getHTMLElement()));this._register(g.onDidBlur(()=>{document.hasFocus()&&a.setFocus([])})),i.NotificationFocusedContext.bindTo(a.contextKeyService),this._register(a.onDidChangeSelection(h=>{h.indexes.length>0&&a.setSelection([])})),this.container.appendChild(this.listContainer),this.updateStyles()}updateNotificationsList(l,s,d=[]){const[n,a]=(0,r.assertAllDefined)(this.list,this.listContainer),o=(0,p.isAncestor)(document.activeElement,a),g=n.getFocus()[0],h=this.viewModel[g];let v=null;if(typeof g=="number"&&(v=n.getRelativeTop(g)),this.viewModel.splice(l,s,...d),n.splice(l,s,d),n.layout(),this.viewModel.length===0)this.hide();else if(typeof g=="number"){let m=0;if(h){let w=this.viewModel.indexOf(h);w===-1&&(w=g-1),w<this.viewModel.length&&w>=0&&(m=w)}typeof v=="number"&&n.reveal(m,v),n.setFocus([m])}this.isVisible&&o&&n.domFocus()}updateNotificationHeight(l){const s=this.viewModel.indexOf(l);if(s===-1)return;const[d,n]=(0,r.assertAllDefined)(this.list,this.listDelegate);d.updateElementHeight(s,n.getHeight(l)),d.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,p.isAncestor)(document.activeElement,this.listContainer)}updateStyles(){if(this.listContainer){const l=this.getColor(k.NOTIFICATIONS_FOREGROUND);this.listContainer.style.color=l||"";const s=this.getColor(k.NOTIFICATIONS_BACKGROUND);this.listContainer.style.background=s||"";const d=this.getColor(I.contrastBorder);this.listContainer.style.outlineColor=d||""}}layout(l,s){this.listContainer&&this.list&&(this.listContainer.style.width=`${l}px`,typeof s=="number"&&(this.list.getHTMLElement().style.maxHeight=`${s}px`),this.list.layout())}dispose(){this.hide(),super.dispose()}};f=we([F(2,A.IInstantiationService),F(3,E.IThemeService),F(4,C.IContextMenuService)],f),e.NotificationsList=f,(0,E.registerThemingParticipant)((c,l)=>{const s=c.getColor(k.NOTIFICATIONS_LINKS);s&&l.addRule(`.monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a { color: ${s}; }`);const d=c.getColor(I.focusBorder);d&&l.addRule(` .monaco-workbench .notifications-list-container .notification-list-item .notification-list-item-message a:focus { outline-color: ${d}; }`);const n=c.getColor(k.NOTIFICATIONS_ERROR_ICON_FOREGROUND);n&&l.addRule(` .monaco-workbench .notifications-center ${u.Codicon.error.cssSelector}, .monaco-workbench .notifications-toasts ${u.Codicon.error.cssSelector} { color: ${n}; }`);const a=c.getColor(k.NOTIFICATIONS_WARNING_ICON_FOREGROUND);a&&l.addRule(` .monaco-workbench .notifications-center ${u.Codicon.warning.cssSelector}, .monaco-workbench .notifications-toasts ${u.Codicon.warning.cssSelector} { color: ${a}; }`);const o=c.getColor(k.NOTIFICATIONS_INFO_ICON_FOREGROUND);o&&l.addRule(` .monaco-workbench .notifications-center ${u.Codicon.info.cssSelector}, .monaco-workbench .notifications-toasts ${u.Codicon.info.cssSelector} { color: ${o}; }`)})}),define(ae[2278],le([1,0,10,137,369,143,29,6,2,1517,84,245,15,5,38,48,33,80]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandCenterControl=void 0;let s=class{constructor(n,a,o,g,h){this._disposables=new I.DisposableStore,this._onDidChangeVisibility=new E.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.element=document.createElement("div"),this.element.classList.add("command-center");const v=o.createInstance(C.MenuWorkbenchToolBar,this.element,r.MenuId.CommandCenter,{contextMenu:r.MenuId.TitleBarContext,hiddenItemStrategy:0,toolbarOptions:{primaryGroup:()=>!0},telemetrySource:"commandCenter",actionViewItemProvider:m=>{if(m instanceof r.MenuItemAction&&m.id==="workbench.action.quickOpenWithModes"){class w extends p.BaseActionViewItem{constructor(y,T){super(void 0,y,T)}render(y){super.render(y),y.classList.add("command-center");const T=document.createElement("span");T.classList.add("left");const _=(0,A.renderIcon)(k.Codicon.search);_.classList.add("search-icon");const L=this._getLabel(),M=document.createElement("span");M.classList.add("search-label"),M.innerText=L,(0,t.reset)(T,_,M);const O=document.createElement("span");O.classList.add("right");const N=(0,A.renderIcon)(k.Codicon.chevronDown);(0,t.reset)(O,N),(0,t.reset)(y,T,O),this._store.add((0,R.setupCustomHover)(a,O,(0,b.localize)(0,null)));const P=this._store.add((0,R.setupCustomHover)(a,T,this.getTooltip()));this._store.add(n.onDidChange(()=>{P.update(this.getTooltip()),M.innerText=this._getLabel()}))}_getLabel(){const{prefix:y,suffix:T}=n.getTitleDecorations();let _=n.isCustomTitleFormat()?n.getWindowTitle():n.workspaceName;return _||(_=(0,b.localize)(1,null)),y&&(_=(0,b.localize)(2,null,y,_)),T&&(_=(0,b.localize)(3,null,_,T)),_}getTooltip(){const y=h.lookupKeybinding(m.id)?.getLabel();return y?(0,b.localize)(4,null,n.workspaceName,y,n.value):(0,b.localize)(5,null,n.workspaceName,n.value)}onClick(y,T=!1){if(y instanceof MouseEvent){let _=y.target;for(;_ instanceof HTMLElement;){if(_.classList.contains("right")){g.quickAccess.show("?");return}_=_.parentElement}}super.onClick(y,T)}}return o.createInstance(w,m,{})}else return(0,S.createActionViewItem)(o,m,{hoverDelegate:a})}});this._disposables.add(g.onShow(this._setVisibility.bind(this,!1))),this._disposables.add(g.onHide(this._setVisibility.bind(this,!0))),this._disposables.add(v)}_setVisibility(n){this.element.classList.toggle("hide",!n),this._onDidChangeVisibility.fire()}dispose(){this._disposables.dispose()}};s=we([F(2,u.IInstantiationService),F(3,f.IQuickInputService),F(4,i.IKeybindingService)],s),e.CommandCenterControl=s,c.registerColor("commandCenter.foreground",{dark:l.TITLE_BAR_ACTIVE_FOREGROUND,hcDark:l.TITLE_BAR_ACTIVE_FOREGROUND,light:l.TITLE_BAR_ACTIVE_FOREGROUND,hcLight:l.TITLE_BAR_ACTIVE_FOREGROUND},(0,b.localize)(6,null),!1),c.registerColor("commandCenter.activeForeground",{dark:l.MENUBAR_SELECTION_FOREGROUND,hcDark:l.MENUBAR_SELECTION_FOREGROUND,light:l.MENUBAR_SELECTION_FOREGROUND,hcLight:l.MENUBAR_SELECTION_FOREGROUND},(0,b.localize)(7,null),!1),c.registerColor("commandCenter.inactiveForeground",{dark:l.TITLE_BAR_INACTIVE_FOREGROUND,hcDark:l.TITLE_BAR_INACTIVE_FOREGROUND,light:l.TITLE_BAR_INACTIVE_FOREGROUND,hcLight:l.TITLE_BAR_INACTIVE_FOREGROUND},(0,b.localize)(8,null),!1),c.registerColor("commandCenter.background",{dark:null,hcDark:null,light:null,hcLight:null},(0,b.localize)(9,null),!1),c.registerColor("commandCenter.activeBackground",{dark:l.MENUBAR_SELECTION_BACKGROUND,hcDark:l.MENUBAR_SELECTION_BACKGROUND,light:l.MENUBAR_SELECTION_BACKGROUND,hcLight:l.MENUBAR_SELECTION_BACKGROUND},(0,b.localize)(10,null),!1),c.registerColor("commandCenter.border",{dark:c.transparent(l.TITLE_BAR_ACTIVE_FOREGROUND,.25),hcDark:c.transparent(l.TITLE_BAR_ACTIVE_FOREGROUND,.25),light:c.transparent(l.TITLE_BAR_ACTIVE_FOREGROUND,.25),hcLight:c.transparent(l.TITLE_BAR_ACTIVE_FOREGROUND,.25)},(0,b.localize)(11,null),!1),c.registerColor("commandCenter.inactiveBorder",{dark:c.transparent(l.TITLE_BAR_INACTIVE_FOREGROUND,.25),hcDark:c.transparent(l.TITLE_BAR_INACTIVE_FOREGROUND,.25),light:c.transparent(l.TITLE_BAR_INACTIVE_FOREGROUND,.25),hcLight:c.transparent(l.TITLE_BAR_INACTIVE_FOREGROUND,.25)},(0,b.localize)(12,null),!1)}),define(ae[518],le([1,0,12,33,80,14,10,86,126,1102]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FONT_FAMILY=void 0,(0,t.registerThemingParticipant)((b,S)=>{const C=b.getColor(p.foreground);C&&S.addRule(`.monaco-workbench { color: ${C}; }`);const r=(0,R.WORKBENCH_BACKGROUND)(b);S.addRule(`.monaco-workbench { background-color: ${r}; }`);const u=b.getColor(p.iconForeground);u&&S.addRule(`.codicon { color: ${u}; }`);const i=b.getColor(p.selectionBackground);i&&S.addRule(`.monaco-workbench ::selection { background-color: ${i}; }`);const f=b.getColor(p.inputPlaceholderForeground);f&&(S.addRule(` .monaco-workbench input::placeholder { color: ${f}; } .monaco-workbench input::-webkit-input-placeholder { color: ${f}; } .monaco-workbench input::-moz-placeholder { color: ${f}; } `),S.addRule(` .monaco-workbench textarea::placeholder { color: ${f}; } .monaco-workbench textarea::-webkit-input-placeholder { color: ${f}; } .monaco-workbench textarea::-moz-placeholder { color: ${f}; } `));const c=b.getColor(p.listHighlightForeground);c&&S.addRule(` .monaco-workbench .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${c}; } `);const l=b.getColor(p.listFocusHighlightForeground);l&&S.addRule(` .monaco-workbench .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${l}; } `);const s=b.getColor(p.focusBorder);if(s&&S.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: ${s}; } `),(0,I.isHighContrast)(b.type)&&S.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 o=b.getColor(R.TITLE_BAR_ACTIVE_BACKGROUND);if(o){const g="monaco-workbench-meta-theme-color";let h=document.getElementById(g);h||(h=(0,k.createMetaElement)(),h.name="theme-color",h.id=g),h.content=o.toString()}}E.isSafari&&S.addRule(` body.web { touch-action: none; } .monaco-workbench .monaco-editor .view-lines { user-select: text; -webkit-user-select: text; } `),A.isIOS&&(0,E.isStandalone)()&&S.addRule(`body { background-color: ${r}; }`);const d=b.getColor(p.toolbarHoverBackground);d&&S.addRule(` .monaco-action-bar:not(.vertical) .action-label:not(.disabled):hover { background-color: ${d}; } .monaco-action-bar:not(.vertical) .monaco-dropdown-with-primary:not(.disabled):hover { background-color: ${d}; } `);const n=b.getColor(p.toolbarActiveBackground);n&&S.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: ${n}; } `);const a=b.getColor(p.toolbarHoverOutline);a&&S.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(ae[45],le([1,0,6,1537,5,2,60,17,16,298,52,29,63]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"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,r.registerIcon)("default-view-icon",C.Codicon.window,(0,p.localize)(0,null));var u;(function(g){g.ViewContainersRegistry="workbench.registry.view.containers",g.ViewsRegistry="workbench.registry.view"})(u=e.Extensions||(e.Extensions={}));var i;(function(g){g[g.Sidebar=0]="Sidebar",g[g.Panel=1]="Panel",g[g.AuxiliaryBar=2]="AuxiliaryBar"})(i=e.ViewContainerLocation||(e.ViewContainerLocation={})),e.ViewContainerLocations=[0,1,2];function f(g){switch(g){case 0:return"sidebar";case 1:return"panel";case 2:return"auxiliarybar"}}e.ViewContainerLocationToString=f;class c 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(h,v,m){const w=this.get(h.id);if(w)return w;const D=h;return D.openCommandActionDescriptor=m?.doNotRegisterOpenCommand?void 0:D.openCommandActionDescriptor??{id:D.id},(0,k.getOrSet)(this.viewContainers,v,[]).push(D),m?.isDefault&&this.defaultViewContainers.push(D),this._onDidRegister.fire({viewContainer:D,viewContainerLocation:v}),D}deregisterViewContainer(h){for(const v of this.viewContainers.keys()){const m=this.viewContainers.get(v),w=m?.indexOf(h);if(w!==-1){m?.splice(w,1),m.length===0&&this.viewContainers.delete(v),this._onDidDeregister.fire({viewContainer:h,viewContainerLocation:v});return}}}get(h){return this.all.filter(v=>v.id===h)[0]}getViewContainers(h){return[...this.viewContainers.get(h)||[]]}getViewContainerLocation(h){return[...this.viewContainers.keys()].filter(v=>this.getViewContainers(v).filter(m=>m?.id===h.id).length>0)[0]}getDefaultViewContainer(h){return this.defaultViewContainers.find(v=>this.getViewContainerLocation(v)===h)}}E.Registry.add(u.ViewContainersRegistry,new c);var l;(function(g){g.Open="2_open",g.Debug="4_debug",g.SCM="5_scm",g.More="9_more"})(l=e.ViewContentGroups||(e.ViewContentGroups={}));function s(g,h){const v=g.group??l.More,m=h.group??l.More;return v!==m?v.localeCompare(m):(g.order??5)-(h.order??5)}class d 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 b.SetMap}registerViews(h,v){this.registerViews2([{views:h,viewContainer:v}])}registerViews2(h){h.forEach(({views:v,viewContainer:m})=>this.addViews(v,m)),this._onViewsRegistered.fire(h)}deregisterViews(h,v){const m=this.removeViews(h,v);m.length&&this._onViewsDeregistered.fire({views:m,viewContainer:v})}moveViews(h,v){for(const m of this._views.keys())if(m!==v){const w=this.removeViews(h,m);w.length&&(this.addViews(w,v),this._onDidChangeContainer.fire({views:w,from:m,to:v}))}}getViews(h){return this._views.get(h)||[]}getView(h){for(const v of this._viewContainers){const m=(this._views.get(v)||[]).filter(w=>w.id===h)[0];if(m)return m}return null}getViewContainer(h){for(const v of this._viewContainers)if((this._views.get(v)||[]).filter(w=>w.id===h)[0])return v;return null}registerViewWelcomeContent(h,v){return this._viewWelcomeContents.add(h,v),this._onDidChangeViewWelcomeContent.fire(h),(0,A.toDisposable)(()=>{this._viewWelcomeContents.delete(h,v),this._onDidChangeViewWelcomeContent.fire(h)})}registerViewWelcomeContent2(h,v){const m=new Map;for(const[w,D]of v)this._viewWelcomeContents.add(h,D),m.set(w,(0,A.toDisposable)(()=>{this._viewWelcomeContents.delete(h,D),this._onDidChangeViewWelcomeContent.fire(h)}));return this._onDidChangeViewWelcomeContent.fire(h),m}getViewWelcomeContent(h){const v=[];return this._viewWelcomeContents.forEach(h,m=>v.push(m)),v.sort(s)}addViews(h,v){let m=this._views.get(v);m||(m=[],this._views.set(v,m),this._viewContainers.push(v));for(const w of h){if(this.getView(w.id)!==null)throw new Error((0,p.localize)(1,null,w.id));m.push(w)}}removeViews(h,v){const m=this._views.get(v);if(!m)return[];const w=[],D=[];for(const y of m)h.includes(y)?w.push(y):D.push(y);return w.length&&(D.length?this._views.set(v,D):(this._views.delete(v),this._viewContainers.splice(this._viewContainers.indexOf(v),1))),w}}E.Registry.add(u.ViewsRegistry,new d),e.IViewsService=(0,R.createDecorator)("viewsService"),e.IViewDescriptorService=(0,R.createDecorator)("viewDescriptorService");var n;(function(g){g[g.Default=0]="Default",g[g.Expand=1]="Expand"})(n=e.ViewVisibilityState||(e.ViewVisibilityState={}));var a;(function(g){g[g.None=0]="None",g[g.Collapsed=1]="Collapsed",g[g.Expanded=2]="Expanded"})(a=e.TreeItemCollapsibleState||(e.TreeItemCollapsibleState={}));class o{constructor(h,v){this.resolved=!1,this._hasResolve=!1,(0,S.mixin)(this,h),this._hasResolve=!!v,this.resolve=async m=>{if(v&&!this.resolved){const w=await v(m);w&&(this.tooltip=this.tooltip??w.tooltip,this.command=this.command??w.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=o}),define(ae[631],le([1,0,22,9]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeAuthority=e.asWebviewUri=e.webviewGenericCspSource=e.webviewRootResourceAuthority=e.webviewResourceBaseHost=void 0,e.webviewResourceBaseHost="vscode-cdn.net",e.webviewRootResourceAuthority=`vscode-resource.${e.webviewResourceBaseHost}`,e.webviewGenericCspSource=`'self' https://*.${e.webviewResourceBaseHost}`;function R(E,I){return E.scheme===t.Schemas.http||E.scheme===t.Schemas.https?E:(I&&I.authority&&I.isRemote&&E.scheme===t.Schemas.file&&(E=p.URI.from({scheme:t.Schemas.vscodeRemote,authority:I.authority,path:E.path})),p.URI.from({scheme:t.Schemas.https,authority:`${E.scheme}+${A(E.authority)}.${e.webviewRootResourceAuthority}`,path:E.path,fragment:E.fragment,query:E.query}))}e.asWebviewUri=R;function A(E){return E.replace(/./g,I=>{const b=I.charCodeAt(0);return b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57?I:"-"+b.toString(16).padStart(4,"0")})}function k(E){return E.replace(/-([0-9a-f]{4})/g,(I,b)=>String.fromCharCode(parseInt(b,16)))}e.decodeAuthority=k}),define(ae[284],le([1,0,11,2,22,111,8,5,6,1538,159]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.Sound=e.AudioCueService=e.IAudioCueService=void 0,e.IAudioCueService=(0,E.createDecorator)("audioCue");let C=class extends p.Disposable{constructor(c,l){super(),this.configurationService=c,this.accessibilityService=l,this.screenReaderAttached=(0,S.observableFromEvent)(this.accessibilityService.onDidChangeScreenReaderOptimized,()=>this.accessibilityService.isScreenReaderOptimized()),this.obsoleteAudioCuesEnabled=(0,S.observableFromEvent)(I.Event.filter(this.configurationService.onDidChangeConfiguration,s=>s.affectsConfiguration("audioCues.enabled")),()=>this.configurationService.getValue("audioCues.enabled")),this.isEnabledCache=new r(s=>{const d=(0,S.observableFromEvent)(I.Event.filter(this.configurationService.onDidChangeConfiguration,n=>n.affectsConfiguration(s.settingsKey)),()=>this.configurationService.getValue(s.settingsKey));return(0,S.derived)("audio cue enabled",n=>{const a=d.read(n);if(a==="on"||a==="auto"&&this.screenReaderAttached.read(n))return!0;const o=this.obsoleteAudioCuesEnabled.read(n);return!!(o==="on"||o==="auto"&&this.screenReaderAttached.read(n))})})}async playAudioCue(c){this.isEnabled(c).get()&&await this.playSound(c.sound)}async playAudioCues(c){const l=new Set(c.filter(s=>this.isEnabled(s).get()).map(s=>s.sound));await Promise.all(Array.from(l).map(s=>this.playSound(s)))}getVolumeInPercent(){const c=this.configurationService.getValue("audioCues.volume");return typeof c!="number"?50:Math.max(Math.min(c,100),0)}async playSound(c){const l=R.FileAccess.asBrowserUri(`vs/workbench/contrib/audioCues/browser/media/${c.fileName}`,J).toString(),s=new Audio(l);s.volume=this.getVolumeInPercent()/100;try{try{await(0,t.raceTimeout)(s.play(),1e3)}catch(d){console.error("Error while playing sound",d)}}finally{s.remove()}}isEnabled(c){return this.isEnabledCache.get(c)}};C=we([F(0,k.IConfigurationService),F(1,A.IAccessibilityService)],C),e.AudioCueService=C;class r{constructor(c){this.getValue=c,this.map=new Map}get(c){if(this.map.has(c))return this.map.get(c);const l=this.getValue(c);return this.map.set(c,l),l}}class u{static register(c){return new u(c.fileName)}constructor(c){this.fileName=c}}e.Sound=u,u.error=u.register({fileName:"error.mp3"}),u.warning=u.register({fileName:"warning.mp3"}),u.foldedArea=u.register({fileName:"foldedAreas.mp3"}),u.break=u.register({fileName:"break.mp3"}),u.quickFixes=u.register({fileName:"quickFixes.mp3"}),u.taskCompleted=u.register({fileName:"taskCompleted.mp3"}),u.taskFailed=u.register({fileName:"taskFailed.mp3"}),u.terminalBell=u.register({fileName:"terminalBell.mp3"});class i{static register(c){const l=new i(c.sound,c.name,c.settingsKey);return i._audioCues.add(l),l}static get allAudioCues(){return[...this._audioCues]}constructor(c,l,s){this.sound=c,this.name=l,this.settingsKey=s}}e.AudioCue=i,i._audioCues=new Set,i.error=i.register({name:(0,b.localize)(0,null),sound:u.error,settingsKey:"audioCues.lineHasError"}),i.warning=i.register({name:(0,b.localize)(1,null),sound:u.warning,settingsKey:"audioCues.lineHasWarning"}),i.foldedArea=i.register({name:(0,b.localize)(2,null),sound:u.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),i.break=i.register({name:(0,b.localize)(3,null),sound:u.break,settingsKey:"audioCues.lineHasBreakpoint"}),i.inlineSuggestion=i.register({name:(0,b.localize)(4,null),sound:u.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),i.terminalQuickFix=i.register({name:(0,b.localize)(5,null),sound:u.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),i.onDebugBreak=i.register({name:(0,b.localize)(6,null),sound:u.break,settingsKey:"audioCues.onDebugBreak"}),i.noInlayHints=i.register({name:(0,b.localize)(7,null),sound:u.error,settingsKey:"audioCues.noInlayHints"}),i.taskCompleted=i.register({name:(0,b.localize)(8,null),sound:u.taskCompleted,settingsKey:"audioCues.taskCompleted"}),i.taskFailed=i.register({name:(0,b.localize)(9,null),sound:u.taskFailed,settingsKey:"audioCues.taskFailed"}),i.terminalBell=i.register({name:(0,b.localize)(10,null),sound:u.terminalBell,settingsKey:"audioCues.terminalBell"})}),define(ae[2279],le([1,0,2,138,20,62,212,156,423,60,54,145,168,207]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkTextEdits=void 0;class i{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:d}=s;if(typeof d.eol=="number"&&(this._newEol=d.eol),!d.range&&!d.text||R.Range.isEmpty(d.range)&&!d.text)return;let n;d.range?n=R.Range.lift(d.range):n=this.model.getFullModelRange(),this._edits.push({...p.EditOperation.replaceMove(n,d.text),insertAsSnippet:d.insertAsSnippet})}validate(){return typeof this._expectedModelVersionId>"u"||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.map(this._transformSnippetStringToInsertText,this).sort((s,d)=>R.Range.compareRangesUsingStarts(s.range,d.range)),this.model.pushEditOperations(null,this._edits,()=>null)),this._newEol!==void 0&&this.model.pushEOL(this._newEol)}_transformSnippetStringToInsertText(s){if(!s.insertAsSnippet||!s.text)return s;const d=u.SnippetParser.asInsertText(s.text);return{...s,insertAsSnippet:!1,text:d}}}class f extends i{constructor(s,d){super(s),this._editor=d}getBeforeCursorState(){return this._canUseEditor()?this._editor.getSelections():null}apply(){if(!this._canUseEditor()){super.apply();return}if(this._edits.length>0){const s=r.SnippetController2.get(this._editor);if(s&&this._edits.some(d=>d.insertAsSnippet)){const d=[];for(const n of this._edits)n.range&&n.text!==null&&d.push({range:R.Range.lift(n.range),template:n.insertAsSnippet?n.text:u.SnippetParser.escape(n.text)});s.apply(d)}else this._edits=this._edits.map(this._transformSnippetStringToInsertText,this).sort((d,n)=>R.Range.compareRangesUsingStarts(d.range,n.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 c=class{constructor(s,d,n,a,o,g,h,v,m,w,D,y){this._label=s,this._code=d,this._editor=n,this._undoRedoGroup=a,this._undoRedoSource=o,this._progress=g,this._token=h,this._editorWorker=m,this._modelService=w,this._textModelResolverService=D,this._undoRedoService=y,this._edits=new b.ResourceMap;for(const T of v){let _=this._edits.get(T.resource);_||(_=[],this._edits.set(T.resource,_)),_.push(T)}}_validateBeforePrepare(){for(const s of this._edits.values())for(const d of s)if(typeof d.versionId=="number"){const n=this._modelService.getModel(d.resource);if(n&&n.getVersionId()!==d.versionId)throw new Error(`${n.uri.toString()} has changed in the meantime`)}}async _createEditsTasks(){const s=[],d=[];for(const[n,a]of this._edits){const o=this._textModelResolverService.createModelReference(n).then(async g=>{let h,v=!1;this._editor?.getModel()?.uri.toString()===g.object.textEditorModel.uri.toString()?(h=new f(g,this._editor),v=!0):h=new i(g);for(const m of a)if(v&&!m.textEdit.insertAsSnippet){const w=await this._editorWorker.computeMoreMinimalEdits(m.resource,[m.textEdit]);if(!w)h.addEdit(m);else for(const D of w)h.addEdit(new C.ResourceTextEdit(m.resource,D,m.versionId,m.metadata))}else h.addEdit(m);s.push(h)});d.push(o)}return await Promise.all(d),s}_validateTasks(s){for(const d of s){const n=d.validate();if(!n.canApply)return n}return{canApply:!0}}async apply(){this._validateBeforePrepare();const s=await this._createEditsTasks();try{if(this._token.isCancellationRequested)return[];const d=[],n=this._validateTasks(s);if(!n.canApply)throw new Error(`${n.reason.toString()} has changed in the meantime`);if(s.length===1){const a=s[0];if(!a.isNoOp()){const o=new I.SingleModelEditStackElement(this._label,this._code,a.model,a.getBeforeCursorState());this._undoRedoService.pushElement(o,this._undoRedoGroup,this._undoRedoSource),a.apply(),o.close(),d.push(a.model.uri)}this._progress.report(void 0)}else{const a=new I.MultiModelEditStackElement(this._label,this._code,s.map(o=>new I.SingleModelEditStackElement(this._label,this._code,o.model,o.getBeforeCursorState())));this._undoRedoService.pushElement(a,this._undoRedoGroup,this._undoRedoSource);for(const o of s)o.apply(),this._progress.report(void 0),d.push(o.model.uri);a.close()}return d}finally{(0,t.dispose)(s)}}};c=we([F(8,k.IEditorWorkerService),F(9,S.IModelService),F(10,A.ITextModelService),F(11,E.IUndoRedoService)],c),e.BulkTextEdits=c}),define(ae[632],le([1,0,32,493,9,50,16,21,2,31,13,54,62]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyModel=e.CallHierarchyProviderRegistry=e.CallHierarchyDirection=void 0;var u;(function(l){l.CallsTo="incomingCalls",l.CallsFrom="outgoingCalls"})(u=e.CallHierarchyDirection||(e.CallHierarchyDirection={})),e.CallHierarchyProviderRegistry=new p.LanguageFeatureRegistry;class i{static async create(s,d,n){const[a]=e.CallHierarchyProviderRegistry.ordered(s);if(!a)return;const o=await a.prepareCallHierarchy(s,d,n);if(!!o)return new i(o.roots.reduce((g,h)=>g+h._sessionId,""),a,o.roots,new I.RefCountedDisposable(o))}constructor(s,d,n,a){this.id=s,this.provider=d,this.roots=n,this.ref=a,this.root=n[0]}dispose(){this.ref.release()}fork(s){const d=this;return new class extends i{constructor(){super(d.id,d.provider,[s],d.ref.acquire())}}}async resolveIncomingCalls(s,d){try{const n=await this.provider.provideIncomingCalls(s,d);if((0,k.isNonEmptyArray)(n))return n}catch(n){(0,E.onUnexpectedExternalError)(n)}return[]}async resolveOutgoingCalls(s,d){try{const n=await this.provider.provideOutgoingCalls(s,d);if((0,k.isNonEmptyArray)(n))return n}catch(n){(0,E.onUnexpectedExternalError)(n)}return[]}}e.CallHierarchyModel=i;const f=new Map;b.CommandsRegistry.registerCommand("_executePrepareCallHierarchy",async(l,...s)=>{const[d,n]=s;(0,S.assertType)(R.URI.isUri(d)),(0,S.assertType)(A.Position.isIPosition(n));let o=l.get(C.IModelService).getModel(d),g;if(!o){const v=await l.get(r.ITextModelService).createModelReference(d);o=v.object.textEditorModel,g=v}try{const h=await i.create(o,n,t.CancellationToken.None);return h?(f.set(h.id,h),f.forEach((v,m,w)=>{w.size>10&&(v.dispose(),f.delete(m))}),[h.root]):[]}finally{g?.dispose()}});function c(l){return!0}b.CommandsRegistry.registerCommand("_executeProvideIncomingCalls",async(l,...s)=>{const[d]=s;(0,S.assertType)(c(d));const n=f.get(d._sessionId);if(!!n)return n.resolveIncomingCalls(d,t.CancellationToken.None)}),b.CommandsRegistry.registerCommand("_executeProvideOutgoingCalls",async(l,...s)=>{const[d]=s;(0,S.assertType)(c(d));const n=f.get(d._sessionId);if(!!n)return n.resolveOutgoingCalls(d,t.CancellationToken.None)})}),define(ae[2280],le([1,0,632,32,96,239,92,28,20,1548,29]),function(J,e,t,p,R,A,k,E,I,b,S){"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(n,a,o,g){this.item=n,this.locations=a,this.model=o,this.parent=g}static compare(n,a){let o=(0,E.compare)(n.item.uri.toString(),a.item.uri.toString());return o===0&&(o=I.Range.compareRangesUsingStarts(n.item.range,a.item.range)),o}}e.Call=C;class r{constructor(n){this.getDirection=n}hasChildren(){return!0}async getChildren(n){if(n instanceof t.CallHierarchyModel)return n.roots.map(g=>new C(g,void 0,n,void 0));const{model:a,item:o}=n;return this.getDirection()==="outgoingCalls"?(await a.resolveOutgoingCalls(o,p.CancellationToken.None)).map(g=>new C(g.to,g.fromRanges.map(h=>({range:h,uri:o.uri})),a,n)):(await a.resolveIncomingCalls(o,p.CancellationToken.None)).map(g=>new C(g.from,g.fromRanges.map(h=>({range:h,uri:g.from.uri})),a,n))}}e.DataSource=r;class u{compare(n,a){return C.compare(n,a)}}e.Sorter=u;class i{constructor(n){this.getDirection=n}getId(n){let a=this.getDirection()+JSON.stringify(n.item.uri)+JSON.stringify(n.item.range);return n.parent&&(a+=this.getId(n.parent)),a}}e.IdentityProvider=i;class f{constructor(n,a){this.icon=n,this.label=a}}class c{constructor(){this.templateId=c.id}renderTemplate(n){n.classList.add("callhierarchy-element");const a=document.createElement("div");n.appendChild(a);const o=new A.IconLabel(n,{supportHighlights:!0});return new f(a,o)}renderElement(n,a,o){const{element:g,filterData:h}=n,v=g.item.tags?.includes(1);o.icon.className="",o.icon.classList.add("inline",...S.CSSIcon.asClassNameArray(k.SymbolKinds.toIcon(g.item.kind))),o.label.setLabel(g.item.name,g.item.detail,{labelEscapeNewLines:!0,matches:(0,R.createMatches)(h),strikethrough:v})}disposeTemplate(n){n.label.dispose()}}e.CallRenderer=c,c.id="CallRenderer";class l{getHeight(n){return 22}getTemplateId(n){return c.id}}e.VirtualDelegate=l;class s{constructor(n){this.getDirection=n}getWidgetAriaLabel(){return(0,b.localize)(0,null)}getAriaLabel(n){return this.getDirection()==="outgoingCalls"?(0,b.localize)(1,null,n.item.name):(0,b.localize)(2,null,n.item.name)}}e.AccessibilityProvider=s}),define(ae[2281],le([1,0,6,2,331,309,236,1549,55,38,17]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionsContribution=e.editorConfiguration=void 0;const C=Object.freeze({"source.fixAll":{type:"boolean",description:E.localize(0,null)}}),r={oneOf:[{type:"object",properties:C,additionalProperties:{type:"boolean"}},{type:"array",items:{type:"string"}}],default:{},description:E.localize(1,null),scope:5};e.editorConfiguration=Object.freeze({...R.editorConfigurationBaseNode,properties:{"editor.codeActionsOnSave":r}});let u=class extends p.Disposable{constructor(f,c){super(),this._contributedCodeActions=[],this._onDidChangeContributions=this._register(new t.Emitter),f.setHandler(l=>{this._contributedCodeActions=l.map(s=>s.value).flat(),this.updateConfigurationSchema(this._contributedCodeActions),this._onDidChangeContributions.fire()}),c.registerSchemaContribution({getSchemaAdditions:()=>this.getSchemaAdditions(),onDidChange:this._onDidChangeContributions.event})}updateConfigurationSchema(f){const c={...C};for(const[l,s]of this.getSourceActions(f))c[l]={type:"boolean",description:E.localize(2,null,s.title)};r.properties=c,S.Registry.as(I.Extensions.Configuration).notifyConfigurationSchemaUpdated(e.editorConfiguration)}getSourceActions(f){const c=Object.keys(C).map(s=>new k.CodeActionKind(s)),l=new Map;for(const s of f)for(const d of s.actions){const n=new k.CodeActionKind(d.kind);k.CodeActionKind.Source.contains(n)&&!c.some(a=>a.contains(n))&&l.set(n.value,d)}return l}getSchemaAdditions(){const f=(l,s)=>({if:{properties:{command:{const:l}}},then:{properties:{args:{required:["kind"],properties:{kind:{anyOf:[{enum:s.map(d=>d.kind),enumDescriptions:s.map(d=>d.description??d.title)},{type:"string"}]}}}}}}),c=l=>{const s=this._contributedCodeActions.map(n=>n.actions).flat(),d=new Map;for(const n of s)!d.has(n.kind)&&l.contains(new k.CodeActionKind(n.kind))&&d.set(n.kind,n);return Array.from(d.values())};return[f(A.codeActionCommandId,c(k.CodeActionKind.Empty)),f(A.refactorCommandId,c(k.CodeActionKind.Refactor)),f(A.sourceActionCommandId,c(k.CodeActionKind.Source))]}};u=we([F(1,b.IKeybindingService)],u),e.CodeActionsContribution=u}),define(ae[2282],le([1,0,2,61,236,7]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionDocumentationContribution=void 0;let k=class extends t.Disposable{constructor(I,b,S){super(),this.contextKeyService=b,this.contributions=[],this.emptyCodeActionsList={actions:[],dispose:()=>{}},this._register(S.codeActionProvider.register("*",this)),I.setHandler(C=>{this.contributions=[];for(const r of C)if(!!r.value.refactoring)for(const u of r.value.refactoring){const i=A.ContextKeyExpr.deserialize(u.when);!i||this.contributions.push({title:u.title,when:i,command:u.command})}})}async provideCodeActions(I,b,S,C){return this.emptyCodeActionsList}_getAdditionalMenuItems(I,b){return I.only!==R.CodeActionKind.Refactor.value&&!b.some(S=>S.kind&&R.CodeActionKind.Refactor.contains(new R.CodeActionKind(S.kind)))?[]:this.contributions.filter(S=>this.contextKeyService.contextMatchesRules(S.when)).map(S=>({id:S.command,title:S.title}))}};k=we([F(1,A.IContextKeyService),F(2,p.ILanguageFeaturesService)],k),e.CodeActionDocumentationContribution=k}),define(ae[2283],le([1,0,17,724,214]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(R.Extensions.ConfigurationMigration).registerConfigurationMigrations(p.EditorSettingMigration.items.map(A=>({key:`editor.${A.key}`,migrateFn:(k,E)=>{const I=[],b=(S,C)=>I.push([`editor.${S}`,{value:C}]);return A.migrate(k,S=>E(`editor.${S}`),b),I}})))}),define(ae[853],le([1,0,1554,10,140,11,434,510,33,12,265,63,28,372,110,1127]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFindWidget=void 0;const f=t.localize(0,null),c=t.localize(1,null),l=t.localize(2,null),s=t.localize(3,null),d=t.localize(4,null),n=310,a=68;class o extends R.Widget{constructor(h=new k.FindReplaceState,v,m,w,D){super(),this._keybindingService=D,this._isVisible=!1,this._foundMatch=!1,this._width=0,this._findInput=this._register(new S.ContextScopedFindInput(null,m,{label:f,placeholder:c,validation:T=>{if(T.length===0||!this._findInput.getRegex())return null;try{return new RegExp(T),null}catch(_){return this._foundMatch=!1,this.updateButtons(this._foundMatch),{content:_.message}}},showCommonFindToggles:v.showCommonFindToggles,appendCaseSensitiveLabel:v.appendCaseSensitiveLabel&&v.type==="Terminal"?this._getKeybinding("workbench.action.terminal.toggleFindCaseSensitive"):void 0,appendRegexLabel:v.appendRegexLabel&&v.type==="Terminal"?this._getKeybinding("workbench.action.terminal.toggleFindRegex"):void 0,appendWholeWordsLabel:v.appendWholeWordsLabel&&v.type==="Terminal"?this._getKeybinding("workbench.action.terminal.toggleFindWholeWord"):void 0,showHistoryHint:()=>(0,u.showHistoryKeybindingHint)(D)},w)),this._updateHistoryDelayer=new A.Delayer(500),this._register(this._findInput.onInput(async T=>{(!v.checkImeCompletionState||!this._findInput.isImeSessionInProgress)&&(this._foundMatch=this._onInputChanged(),v.showResultCount&&await this.updateResultCount(),this.updateButtons(this._foundMatch),this.focusFindBox(),this._delayedUpdateHistory())})),this._findInput.setRegex(!!h.isRegex),this._findInput.setCaseSensitive(!!h.matchCase),this._findInput.setWholeWords(!!h.wholeWord),this._register(this._findInput.onDidOptionChange(()=>{h.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(h.onFindReplaceStateChange(()=>{this._findInput.setRegex(h.isRegex),this._findInput.setWholeWords(h.wholeWord),this._findInput.setCaseSensitive(h.matchCase),this.findFirst()})),this.prevBtn=this._register(new E.SimpleButton({label:l,icon:E.findPreviousMatchIcon,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new E.SimpleButton({label:s,icon:E.findNextMatchIcon,onTrigger:()=>{this.find(!1)}}));const y=this._register(new E.SimpleButton({label:d,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(y.domNode),this._domNode=document.createElement("div"),this._domNode.classList.add("simple-find-part-wrapper"),this._domNode.appendChild(this._innerDomNode),this.onkeyup(this._innerDomNode,T=>{if(T.equals(9)){this.hide(),T.preventDefault();return}}),this._focusTracker=this._register(p.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(p.trackFocus(this._findInput.domNode)),this._register(this._findInputFocusTracker.onDidFocus(this._onFindInputFocusTrackerFocus.bind(this))),this._register(this._findInputFocusTracker.onDidBlur(this._onFindInputFocusTrackerBlur.bind(this))),this._register(p.addDisposableListener(this._innerDomNode,"click",T=>{T.stopPropagation()})),v?.showResultCount&&(this._domNode.classList.add("result-count"),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._findInput.domNode.insertAdjacentElement("afterend",this._matchesCount),this._register(this._findInput.onDidChange(()=>{this.updateResultCount(),this.updateButtons(this._foundMatch)})))}get inputValue(){return this._findInput.getValue()}get focusTracker(){return this._focusTracker}updateTheme(h){const v={inputActiveOptionBorder:h.getColor(I.inputActiveOptionBorder),inputActiveOptionForeground:h.getColor(I.inputActiveOptionForeground),inputActiveOptionBackground:h.getColor(I.inputActiveOptionBackground),inputBackground:h.getColor(I.inputBackground),inputForeground:h.getColor(I.inputForeground),inputBorder:h.getColor(I.inputBorder),inputValidationInfoBackground:h.getColor(I.inputValidationInfoBackground),inputValidationInfoForeground:h.getColor(I.inputValidationInfoForeground),inputValidationInfoBorder:h.getColor(I.inputValidationInfoBorder),inputValidationWarningBackground:h.getColor(I.inputValidationWarningBackground),inputValidationWarningForeground:h.getColor(I.inputValidationWarningForeground),inputValidationWarningBorder:h.getColor(I.inputValidationWarningBorder),inputValidationErrorBackground:h.getColor(I.inputValidationErrorBackground),inputValidationErrorForeground:h.getColor(I.inputValidationErrorForeground),inputValidationErrorBorder:h.getColor(I.inputValidationErrorBorder)};this._findInput.style(v)}_getKeybinding(h){const v=this._keybindingService?.lookupKeybinding(h);return v?` (${v.getLabel()})`:""}dispose(){super.dispose(),this._domNode&&this._domNode.parentElement&&this._domNode.parentElement.removeChild(this._domNode)}isVisible(){return this._isVisible}getDomNode(){return this._domNode}reveal(h,v=!0){if(h&&this._findInput.setValue(h),this._isVisible){this._findInput.select();return}this._isVisible=!0,this.updateButtons(this._foundMatch),this.layout(),setTimeout(()=>{this._innerDomNode.classList.toggle("suppress-transition",!v),this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false"),this._findInput.select(),v||setTimeout(()=>{this._innerDomNode.classList.remove("suppress-transition")},0)},0)}show(h){h&&!this._isVisible&&this._findInput.setValue(h),this._isVisible=!0,this.layout(),setTimeout(()=>{this._innerDomNode.classList.add("visible","visible-transition"),this._innerDomNode.setAttribute("aria-hidden","false")},0)}hide(h=!0){this._isVisible&&(this._innerDomNode.classList.toggle("suppress-transition",!h),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","suppress-transition")},h?200:0))}layout(h=this._width){if(this._width=h,!!this._isVisible&&this._matchesCount){let v=!1;n+a+28>=h&&(v=!0),this._innerDomNode.classList.toggle("reduced-find-widget",v)}}_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(h){const v=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&v&&h),this.nextBtn.setEnabled(this._isVisible&&v&&h)}focusFindBox(){this.nextBtn.focus(),this._findInput.inputBox.focus()}async updateResultCount(){if(!this._matchesCount)return;const h=await this._getResultCount();this._matchesCount.innerText="";let v="";this._matchesCount.classList.toggle("no-results",!1),h?.resultCount!==void 0&&h?.resultCount===0?(v=E.NLS_NO_RESULTS,this.inputValue&&this._matchesCount.classList.toggle("no-results",!0)):h?.resultCount&&(v=r.format(E.NLS_MATCHES_LOCATION,h.resultIndex+1,h?.resultCount)),(0,i.alert)(this._announceSearchResults(v,this.inputValue)),this._matchesCount.appendChild(document.createTextNode(v)),this._foundMatch=!!h&&h.resultCount>0}_announceSearchResults(h,v){return v?h===E.NLS_NO_RESULTS?v===""?t.localize(6,null,h):t.localize(7,null,h,v):t.localize(8,null,h,v):t.localize(5,null)}}e.SimpleFindWidget=o,(0,b.registerThemingParticipant)((g,h)=>{const v=g.getColor(I.editorWidgetBackground);v&&h.addRule(`.monaco-workbench .simple-find-part { background-color: ${v} !important; }`);const m=g.getColor(I.editorWidgetForeground);m&&h.addRule(`.monaco-workbench .simple-find-part { color: ${m}; }`);const w=g.getColor(I.widgetShadow);w&&h.addRule(`.monaco-workbench .simple-find-part { box-shadow: 0 0 8px 2px ${w}; }`);const D=g.getColor(I.contrastBorder);D&&h.addRule(`.monaco-workbench .simple-find-part { border: 1px solid ${D}; }`);const y=g.getColor(I.errorForeground);y&&h.addRule(`.no-results.matchesCount { color: ${y}; }`);const T=g.getColor(I.toolbarHoverBackground);T&&h.addRule(` div.simple-find-part-wrapper div.button:hover:not(.disabled) { background-color: ${T}; } `);const _=g.getColor(I.toolbarHoverOutline);_&&h.addRule(` div.simple-find-part-wrapper div.button:hover:not(.disabled) { outline: 1px dashed ${_}; outline-offset: -1px; } `)})}),define(ae[2284],le([1,0,1558,53,2,40,8,26]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LargeFileOptimizationsWarner=void 0;let I=class extends R.Disposable{constructor(S,C,r){super(),this._editor=S,this._notificationService=C,this._configurationService=r,this._register(this._editor.onDidChangeModel(u=>{const i=this._editor.getModel();if(!!i&&i.isTooLargeForTokenization()){const f=t.localize(0,null,p.basename(i.uri.path));this._notificationService.prompt(E.Severity.Info,f,[{label:t.localize(1,null),run:()=>{this._configurationService.updateValue("editor.largeFileOptimizations",!1).then(()=>{this._notificationService.info(t.localize(2,null))},c=>{this._notificationService.error(c)})}}],{neverShowAgain:{id:"editor.contrib.largeFileOptimizationsWarner"}})}}))}};I.ID="editor.contrib.largeFileOptimizationsWarner",I=we([F(1,E.INotificationService),F(2,k.IConfigurationService)],I),e.LargeFileOptimizationsWarner=I,(0,A.registerEditorContribution)(I.ID,I)}),define(ae[337],le([1,0,2,40]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MenuPreventer=void 0;class R extends t.Disposable{constructor(k){super(),this._editor=k,this._altListeningMouse=!1,this._altMouseTriggered=!1,this._register(this._editor.onMouseDown(E=>{this._altListeningMouse&&(this._altMouseTriggered=!0)})),this._register(this._editor.onKeyDown(E=>{E.equals(512)&&(this._altListeningMouse||(this._altMouseTriggered=!1),this._altListeningMouse=!0)})),this._register(this._editor.onKeyUp(E=>{E.equals(512)&&(this._altMouseTriggered&&E.preventDefault(),this._altListeningMouse=!1,this._altMouseTriggered=!1)}))}}e.MenuPreventer=R,R.ID="editor.contrib.menuPreventer",(0,p.registerEditorContribution)(R.ID,R)}),define(ae[2285],le([1,0,10,250,96,20,92,375,1560,239,8,124,12,33,11,114,29,1129,612]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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(D){return D instanceof E.OutlineGroup?D.label:D.symbol.name}}e.DocumentSymbolNavigationLabelProvider=l;class s{constructor(D){this._ariaLabel=D}getWidgetAriaLabel(){return this._ariaLabel}getAriaLabel(D){return D instanceof E.OutlineGroup?D.label:D.symbol.name}}e.DocumentSymbolAccessibilityProvider=s;class d{getId(D){return D.id}}e.DocumentSymbolIdentityProvider=d;class n{constructor(D,y){this.labelContainer=D,this.label=y}}n.id="DocumentSymbolGroupTemplate";class a{constructor(D,y,T,_){this.container=D,this.iconLabel=y,this.iconClass=T,this.decoration=_}}a.id="DocumentSymbolTemplate";class o{getHeight(D){return 22}getTemplateId(D){return D instanceof E.OutlineGroup?n.id:a.id}}e.DocumentSymbolVirtualDelegate=o;class g{constructor(){this.templateId=n.id}renderTemplate(D){const y=t.$(".outline-element-label");return D.classList.add("outline-element"),t.append(D,y),new n(y,new p.HighlightedLabel(y))}renderElement(D,y,T){T.label.set(D.element.label,(0,R.createMatches)(D.filterData))}disposeTemplate(D){}}e.DocumentSymbolGroupRenderer=g;let h=class wa{constructor(D,y,T){this._renderMarker=D,this._configurationService=y,this._themeService=T,this.templateId=a.id}renderTemplate(D){D.classList.add("outline-element");const y=new b.IconLabel(D,{supportHighlights:!0}),T=t.$(".outline-element-icon"),_=t.$(".outline-element-decoration");return D.prepend(T),D.appendChild(_),new a(D,y,T,_)}renderElement(D,y,T){const{element:_}=D,L=["nowrap"],M={matches:(0,R.createMatches)(D.filterData),labelEscapeNewLines:!0,extraClasses:L,title:(0,I.localize)(0,null,_.symbol.name,wa._symbolKindNames[_.symbol.kind])};this._configurationService.getValue("outline.icons")&&(T.iconClass.className="",T.iconClass.classList.add("outline-element-icon","inline",...c.CSSIcon.asClassNameArray(k.SymbolKinds.toIcon(_.symbol.kind)))),_.symbol.tags.indexOf(1)>=0&&(L.push("deprecated"),M.matches=[]),T.iconLabel.setLabel(_.symbol.name,_.symbol.detail,M),this._renderMarker&&this._renderMarkerInfo(_,T)}_renderMarkerInfo(D,y){if(!D.marker){t.hide(y.decoration),y.container.style.removeProperty("--outline-element-color");return}const{count:T,topSev:_}=D.marker,L=this._themeService.getColorTheme().getColor(_===C.MarkerSeverity.Error?u.listErrorForeground:u.listWarningForeground),M=L?L.toString():"inherit";this._configurationService.getValue("outline.problems.colors")?y.container.style.setProperty("--outline-element-color",M):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",M)):(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",M)):t.hide(y.decoration)}disposeTemplate(D){D.iconLabel.dispose()}};h._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)},h=we([F(1,S.IConfigurationService),F(2,r.IThemeService)],h),e.DocumentSymbolRenderer=h;let v=class Ea{constructor(D,y){this._prefix=D,this._textResourceConfigService=y}filter(D){const y=E.OutlineModel.get(D);if(!(D instanceof E.OutlineElement))return!0;const T=Ea.kindToConfigName[D.symbol.kind],_=`${this._prefix}.${T}`;return this._textResourceConfigService.getValue(y?.uri,_)}};v.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"}),v=we([F(1,f.ITextResourceConfigurationService)],v),e.DocumentSymbolFilter=v;class m{constructor(){this._collator=new i.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0}))}compareByPosition(D,y){return D instanceof E.OutlineGroup&&y instanceof E.OutlineGroup?D.order-y.order:D instanceof E.OutlineElement&&y instanceof E.OutlineElement?A.Range.compareRangesUsingStarts(D.symbol.range,y.symbol.range)||this._collator.value.compare(D.symbol.name,y.symbol.name):0}compareByType(D,y){return D instanceof E.OutlineGroup&&y instanceof E.OutlineGroup?D.order-y.order:D instanceof E.OutlineElement&&y instanceof E.OutlineElement?D.symbol.kind-y.symbol.kind||this._collator.value.compare(D.symbol.name,y.symbol.name):0}compareByName(D,y){return D instanceof E.OutlineGroup&&y instanceof E.OutlineGroup?D.order-y.order:D instanceof E.OutlineElement&&y instanceof E.OutlineElement?this._collator.value.compare(D.symbol.name,y.symbol.name)||A.Range.compareRangesUsingStarts(D.symbol.range,y.symbol.range):0}}e.DocumentSymbolComparator=m}),define(ae[381],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionClipboardContributionID=void 0,e.SelectionClipboardContributionID="editor.contrib.selectionClipboard"}),define(ae[2286],le([1,0,1564,15,8,7,75,332,50,85]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleColumnSelectionAction=void 0;class S extends p.Action2{constructor(){super({id:S.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:p.MenuId.MenubarSelectionMenu,group:"4_config",order:2}})}async run(r){const u=r.get(R.IConfigurationService),i=r.get(k.ICodeEditorService),f=u.getValue("editor.columnSelection"),c=this._getCodeEditor(i);await u.updateValue("editor.columnSelection",!f);const l=u.getValue("editor.columnSelection");if(!c||c!==this._getCodeEditor(i)||f===l||!c.hasModel()||typeof f!="boolean"||typeof l!="boolean")return;const s=c._getViewModel();if(c.getOption(18)){const d=c.getSelection(),n=new I.Position(d.selectionStartLineNumber,d.selectionStartColumn),a=s.coordinatesConverter.convertModelPositionToViewPosition(n),o=new I.Position(d.positionLineNumber,d.positionColumn),g=s.coordinatesConverter.convertModelPositionToViewPosition(o);E.CoreNavigationCommands.MoveTo.runCoreEditorCommand(s,{position:n,viewPosition:a});const h=s.cursorConfig.visibleColumnFromColumn(s,g);E.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(s,{position:o,viewPosition:g,doColumnSelect:!0,mouseColumn:h+1})}else{const d=s.getCursorColumnSelectData(),n=s.cursorConfig.columnFromVisibleColumn(s,d.fromViewLineNumber,d.fromViewVisualColumn),a=s.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(d.fromViewLineNumber,n)),o=s.cursorConfig.columnFromVisibleColumn(s,d.toViewLineNumber,d.toViewVisualColumn),g=s.coordinatesConverter.convertViewPositionToModelPosition(new I.Position(d.toViewLineNumber,o));c.setSelection(new b.Selection(a.lineNumber,a.column,g.lineNumber,g.column))}}_getCodeEditor(r){const u=r.getFocusedCodeEditor();return u||r.getActiveCodeEditor()}}e.ToggleColumnSelectionAction=S,S.ID="editor.action.toggleColumnSelection",(0,p.registerAction2)(S)}),define(ae[2287],le([1,0,1565,15,8,7,70]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMinimapAction=void 0;class E extends p.Action2{constructor(){super({id:E.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:p.MenuId.MenubarAppearanceMenu,group:"4_editor",order:1}})}async run(b){const S=b.get(R.IConfigurationService),C=!S.getValue("editor.minimap.enabled");return S.updateValue("editor.minimap.enabled",C)}}e.ToggleMinimapAction=E,E.ID="editor.action.toggleMinimap",(0,p.registerAction2)(E)}),define(ae[2288],le([1,0,1567,15,8,7,70]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleRenderControlCharacterAction=void 0;class E extends p.Action2{constructor(){super({id:E.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:p.MenuId.MenubarAppearanceMenu,group:"4_editor",order:4}})}run(b){const S=b.get(R.IConfigurationService),C=!S.getValue("editor.renderControlCharacters");return S.updateValue("editor.renderControlCharacters",C)}}e.ToggleRenderControlCharacterAction=E,E.ID="editor.action.toggleRenderControlCharacter",(0,p.registerAction2)(E)}),define(ae[2289],le([1,0,1568,15,8,7,70]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E extends p.Action2{constructor(){super({id:E.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:p.MenuId.MenubarAppearanceMenu,group:"4_editor",order:3}})}run(b){const S=b.get(R.IConfigurationService),C=S.getValue("editor.renderWhitespace");let r;return C==="none"?r="all":r="none",S.updateValue("editor.renderWhitespace",r)}}E.ID="editor.action.toggleRenderWhitespace",(0,p.registerAction2)(E)}),define(ae[2290],le([1,0,40,75,620,8,7,5,26,23]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchReferencesController=void 0;let S=class extends R.ReferencesController{constructor(r,u,i,f,c,l,s){super(!1,r,u,i,f,c,l,s)}};S=we([F(1,k.IContextKeyService),F(2,p.ICodeEditorService),F(3,I.INotificationService),F(4,E.IInstantiationService),F(5,b.IStorageService),F(6,A.IConfigurationService)],S),e.WorkbenchReferencesController=S,(0,t.registerEditorContribution)(R.ReferencesController.ID,S)}),define(ae[2291],le([1,0,98,14]),function(J,e,t,p){"use strict";if(Object.defineProperty(e,"__esModule",{value:!0}),p.isMacintosh){let R=function(A){return()=>{document.execCommand(A)}};t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execCut",primary:2102,handler:R("cut"),weight:0,when:void 0}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execCopy",primary:2081,handler:R("copy"),weight:0,when:void 0}),t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"execPaste",primary:2100,handler:R("paste"),weight:0,when:void 0})}}),define(ae[519],le([1,0,92,174,1573,33]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCommentThreadStateColor=e.commentThreadStateBackgroundColorVar=e.commentViewThreadStateColorVar=e.commentThreadStateColorVar=e.commentThreadRangeActiveBorder=e.commentThreadRangeActiveBackground=e.commentThreadRangeBorder=e.commentThreadRangeBackground=void 0;const k=(0,A.registerColor)("editorCommentsWidget.resolvedBorder",{dark:A.disabledForeground,light:A.disabledForeground,hcDark:A.contrastBorder,hcLight:A.contrastBorder},R.localize(0,null)),E=(0,A.registerColor)("editorCommentsWidget.unresolvedBorder",{dark:p.peekViewBorder,light:p.peekViewBorder,hcDark:A.contrastBorder,hcLight:A.contrastBorder},R.localize(1,null));e.commentThreadRangeBackground=(0,A.registerColor)("editorCommentsWidget.rangeBackground",{dark:(0,A.transparent)(E,.1),light:(0,A.transparent)(E,.1),hcDark:(0,A.transparent)(E,.1),hcLight:(0,A.transparent)(E,.1)},R.localize(2,null)),e.commentThreadRangeBorder=(0,A.registerColor)("editorCommentsWidget.rangeBorder",{dark:(0,A.transparent)(E,.4),light:(0,A.transparent)(E,.4),hcDark:(0,A.transparent)(E,.4),hcLight:(0,A.transparent)(E,.4)},R.localize(3,null)),e.commentThreadRangeActiveBackground=(0,A.registerColor)("editorCommentsWidget.rangeActiveBackground",{dark:(0,A.transparent)(E,.1),light:(0,A.transparent)(E,.1),hcDark:(0,A.transparent)(E,.1),hcLight:(0,A.transparent)(E,.1)},R.localize(4,null)),e.commentThreadRangeActiveBorder=(0,A.registerColor)("editorCommentsWidget.rangeActiveBorder",{dark:(0,A.transparent)(E,.4),light:(0,A.transparent)(E,.4),hcDark:(0,A.transparent)(E,.4),hcLight:(0,A.transparent)(E,.2)},R.localize(5,null));const I=new Map([[t.CommentThreadState.Unresolved,E],[t.CommentThreadState.Resolved,k]]);e.commentThreadStateColorVar="--comment-thread-state-color",e.commentViewThreadStateColorVar="--comment-view-thread-state-color",e.commentThreadStateBackgroundColorVar="--comment-thread-state-background-color";function b(S,C){const r=S!==void 0?I.get(S):void 0;return r!==void 0?C.getColor(r):void 0}e.getCommentThreadStateColor=b}),define(ae[854],le([1,0,182,2,73]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentFormActions=void 0;class A{constructor(E,I,b){this.container=E,this.actionHandler=I,this.themeService=b,this._buttonElements=[],this._toDispose=new p.DisposableStore,this._actions=[]}setActions(E){this._toDispose.clear(),this._buttonElements.forEach(S=>S.remove());const I=E.getActions({shouldForwardArgs:!0});let b=!0;for(const S of I){const[,C]=S;this._actions=C;for(const r of C){const u=new t.Button(this.container,{secondary:!b});b=!1,this._buttonElements.push(u.element),this._toDispose.add(u),this._toDispose.add((0,R.attachButtonStyler)(u,this.themeService)),this._toDispose.add(u.onDidClick(()=>this.actionHandler(r))),u.enabled=r.enabled,u.label=r.label}}}triggerDefaultAction(){if(this._actions.length){const E=this._actions[0];E.enabled&&this.actionHandler(E)}}dispose(){this._toDispose.dispose()}}e.CommentFormActions=A}),define(ae[855],le([1,0,1574,65,116,94,33,12]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentGlyphWidget=e.overviewRulerCommentingRangeForeground=void 0,e.overviewRulerCommentingRangeForeground=(0,k.registerColor)("editorGutter.commentRangeForeground",{dark:k.listInactiveSelectionBackground,light:(0,k.darken)(k.listInactiveSelectionBackground,.05),hcDark:p.Color.white,hcLight:p.Color.black},t.localize(0,null));class I{constructor(S,C){this._commentsOptions=this.createDecorationOptions(),this._editor=S,this._commentsDecorations=this._editor.createDecorationsCollection(),this.setLineNumber(C)}createDecorationOptions(){const S={description:I.description,isWholeLine:!0,overviewRuler:{color:(0,E.themeColorFromId)(e.overviewRulerCommentingRangeForeground),position:R.OverviewRulerLane.Center},collapseOnReplaceEdit:!0,linesDecorationsClassName:"comment-range-glyph comment-thread"};return A.ModelDecorationOptions.createDynamic(S)}setLineNumber(S){this._lineNumber=S;const C=[{range:{startLineNumber:S,startColumn:1,endLineNumber:S,endColumn:1},options:this._commentsOptions}];this._commentsDecorations.set(C)}getPosition(){const S=this._commentsDecorations.length>0?this._commentsDecorations.getRange(0):null;return{position:{lineNumber:S?S.endLineNumber:this._lineNumber,column:1},preference:[0]}}dispose(){this._commentsDecorations.clear()}}e.CommentGlyphWidget=I,I.description="comment-glyph-widget"}),define(ae[2292],le([1,0,15,84]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentMenus=void 0;let R=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,E){return this.getMenu(t.MenuId.CommentTitle,E)}getCommentActions(k,E){return this.getMenu(t.MenuId.CommentActions,E)}getCommentThreadTitleContextActions(k){return this.getMenu(t.MenuId.CommentThreadTitleContext,k)}getMenu(k,E){const I=this.menuService.createMenu(k,E),C={primary:[],secondary:[]};return(0,p.createAndFillInContextMenuActions)(I,{shouldForwardArgs:!0},C,"inline"),I}dispose(){}};R=we([F(0,t.IMenuService)],R),e.CommentMenus=R}),define(ae[2293],le([1,0,10,79,36,29,2,28,1578,84,63,12]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadHeader=void 0;const r=(0,S.registerIcon)("review-comment-collapse",A.Codicon.chevronUp,I.localize(0,null)),u="expand-review-action "+C.ThemeIcon.asClassName(r);class i extends k.Disposable{constructor(c,l,s,d,n,a,o){super(),this._delegate=l,this._commentMenus=s,this._commentThread=d,this._contextKeyService=n,this.instantiationService=a,this._contextMenuService=o,this._headElement=t.$(".head"),c.appendChild(this._headElement),this._fillHead()}_fillHead(){const c=t.append(this._headElement,t.$(".review-title"));this._headingLabel=t.append(c,t.$("span.filename")),this.createThreadLabel();const l=t.append(this._headElement,t.$(".review-actions"));this._actionbarWidget=new p.ActionBar(l,{actionViewItemProvider:b.createActionViewItem.bind(void 0,this.instantiationService)}),this._register(this._actionbarWidget),this._collapseAction=new R.Action("review.expand",I.localize(1,null),u,!0,()=>this._delegate.collapse());const s=this._commentMenus.getCommentThreadTitleActions(this._contextKeyService);this.setActionBarActions(s),this._register(s),this._register(s.onDidChange(d=>{this.setActionBarActions(s)})),this._register(t.addDisposableListener(this._headElement,t.EventType.CONTEXT_MENU,d=>this.onContextMenu(d))),this._actionbarWidget.context=this._commentThread}setActionBarActions(c){const l=c.getActions({shouldForwardArgs:!0}).reduce((s,[,d])=>[...s,...d],[]);this._actionbarWidget.clear(),this._actionbarWidget.push([...l,this._collapseAction],{label:!1,icon:!0})}updateCommentThread(c){this._commentThread=c,this._actionbarWidget.context=this._commentThread,this.createThreadLabel()}createThreadLabel(){let c;c=this._commentThread.label,c===void 0&&(this._commentThread.comments&&this._commentThread.comments.length||(c=I.localize(2,null))),c&&(this._headingLabel.textContent=E.escape(c),this._headingLabel.setAttribute("aria-label",c))}updateHeight(c){this._headElement.style.height=`${c}px`,this._headElement.style.lineHeight=this._headElement.style.height}onContextMenu(c){const l=this._commentMenus.getCommentThreadTitleContextActions(this._contextKeyService).getActions({shouldForwardArgs:!0}).map(s=>s[1]).flat();!l.length||this._contextMenuService.showContextMenu({getAnchor:()=>c,getActions:()=>l,actionRunner:new R.ActionRunner,getActionsContext:()=>({commentControlHandle:this._commentThread.controllerHandle,commentThreadHandle:this._commentThread.commentThreadHandle,$mid:7})})}}e.CommentThreadHeader=i}),define(ae[2294],le([1,0,2,92,94]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadRangeDecorator=void 0;class A{get id(){return this._decorationId}set id(I){this._decorationId=I}constructor(I,b){this.range=I,this.options=b}}class k extends t.Disposable{constructor(I){super(),this.decorationIds=[],this.activeDecorationIds=[],this.threadCollapseStateListeners=[];const b={description:k.description,isWholeLine:!1,zIndex:20,className:"comment-thread-range"};this.decorationOptions=R.ModelDecorationOptions.createDynamic(b);const S={description:k.description,isWholeLine:!1,zIndex:20,className:"comment-thread-range-current"};this.activeDecorationOptions=R.ModelDecorationOptions.createDynamic(S),this._register(I.onDidChangeCurrentCommentThread(C=>{this.updateCurrent(C)})),this._register(I.onDidUpdateCommentThreads(()=>{this.updateCurrent(void 0)}))}updateCurrent(I){if(!this.editor)return;this.currentThreadCollapseStateListener?.dispose();const b=[];if(I){const S=I.range;S.startLineNumber===S.endLineNumber&&S.startColumn===S.endColumn||I.collapsibleState===p.CommentThreadCollapsibleState.Expanded&&(this.currentThreadCollapseStateListener=I.onDidChangeCollapsibleState(C=>{C===p.CommentThreadCollapsibleState.Collapsed&&this.updateCurrent(void 0)}),b.push(new A(S,this.activeDecorationOptions)))}this.editor.changeDecorations(S=>{this.activeDecorationIds=S.deltaDecorations(this.activeDecorationIds,b),b.forEach((C,r)=>C.id=this.decorationIds[r])})}update(I,b){const S=I?.getModel();if(!I||!S)return;(0,t.dispose)(this.threadCollapseStateListeners),this.editor=I;const C=[];for(const r of b)r.threads.forEach(u=>{if(u.isDisposed)return;const i=u.range;i.startLineNumber===i.endLineNumber&&i.startColumn===i.endColumn||(this.threadCollapseStateListeners.push(u.onDidChangeCollapsibleState(()=>{this.update(I,b)})),u.collapsibleState!==p.CommentThreadCollapsibleState.Collapsed&&C.push(new A(i,this.decorationOptions)))});I.changeDecorations(r=>{this.decorationIds=r.deltaDecorations(this.decorationIds,C),C.forEach((u,i)=>u.id=this.decorationIds[i])})}dispose(){(0,t.dispose)(this.threadCollapseStateListeners),this.currentThreadCollapseStateListener?.dispose(),super.dispose()}}e.CommentThreadRangeDecorator=k,k.description="comment-thread-range-decorator"}),define(ae[856],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsViewFilterFocusContextKey=void 0,e.CommentsViewFilterFocusContextKey=new t.RawContextKey("commentsFilterFocus",!1)}),define(ae[857],le([1,0,96,28]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterOptions=void 0;class R{constructor(k,E,I){this.filter=k,this.showResolved=!0,this.showUnresolved=!0,k=k.trim(),this.showResolved=E,this.showUnresolved=I;const b=k.startsWith("!");this.textFilter={text:(b?p.ltrim(k,"!"):k).trim(),negate:b}}}e.FilterOptions=R,R._filter=t.matchesFuzzy2,R._messageFilter=t.matchesFuzzy}),define(ae[2295],le([1,0,1584,10,36,9,137]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReactionAction=e.ReactionActionViewItem=e.ToggleReactionsAction=void 0;class E extends R.Action{constructor(C,r){super(E.ID,r||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=E,E.ID="toolbar.toggle.pickReactions";class I extends k.ActionViewItem{constructor(C){super(null,C,{})}updateLabel(){if(!this.label)return;const C=this.action;if(C.class&&this.label.classList.add(C.class),C.icon){const r=p.append(this.label,p.$(".reaction-icon"));r.style.display="";const u=A.URI.revive(C.icon);r.style.backgroundImage=p.asCSSUrl(u),r.title=C.label}else{const r=p.append(this.label,p.$("span.reaction-label"));r.innerText=C.label}if(C.count){const r=p.append(this.label,p.$("span.reaction-count"));r.innerText=`${C.count}`}}}e.ReactionActionViewItem=I;class b extends R.Action{constructor(C,r="",u="",i=!0,f,c,l){super(b.ID,r,u,i,f),this.icon=c,this.count=l}}e.ReactionAction=b,b.ID="toolbar.toggle.reaction"}),define(ae[633],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentContextKeys=void 0;var p;(function(R){R.commentThreadIsEmpty=new t.RawContextKey("commentThreadIsEmpty",!1),R.commentIsEmpty=new t.RawContextKey("commentIsEmpty",!1)})(p=e.CommentContextKeys||(e.CommentContextKeys={}))}),define(ae[858],le([1,0,9,16,1585]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsModel=e.ResourceWithCommentThreads=e.CommentNode=void 0;class A{constructor(b,S,C,r,u,i){this.replies=[],this.owner=b,this.threadId=S,this.comment=r,this.resource=C,this.range=u,this.isRoot=!1,this.threadState=i}hasReply(){return this.replies&&this.replies.length!==0}}e.CommentNode=A;class k{constructor(b,S,C){this.owner=b,this.id=S.toString(),this.resource=S,this.commentThreads=C.filter(r=>r.comments&&r.comments.length).map(r=>k.createCommentNode(b,S,r))}static createCommentNode(b,S,C){const{threadId:r,comments:u,range:i}=C,f=u.map(c=>new A(b,r,S,c,i,C.state));return f.length>1&&(f[0].replies=f.slice(1,f.length)),f[0].isRoot=!0,f[0]}}e.ResourceWithCommentThreads=k;class E{constructor(){this.resourceCommentThreads=[],this.commentThreadsMap=new Map}updateResourceCommentThreads(){this.resourceCommentThreads=[...this.commentThreadsMap.values()].flat(),this.resourceCommentThreads.sort((b,S)=>b.resource.toString()>S.resource.toString()?1:-1)}setCommentThreads(b,S){this.commentThreadsMap.set(b,this.groupByResource(b,S)),this.updateResourceCommentThreads()}updateCommentThreads(b){const{owner:S,removed:C,changed:r,added:u}=b,i=this.commentThreadsMap.get(S)||[];return C.forEach(f=>{const c=i.findIndex(d=>d.id===f.resource),l=c>=0?i[c]:void 0,s=l?.commentThreads.findIndex(d=>d.threadId===f.threadId)??0;l?.commentThreads.splice(s,1),l?.commentThreads.length===0&&i.splice(c,1)}),r.forEach(f=>{const c=i.findIndex(d=>d.id===f.resource),l=i[c],s=l.commentThreads.findIndex(d=>d.threadId===f.threadId);s>=0?l.commentThreads[s]=k.createCommentNode(S,t.URI.parse(l.id),f):f.comments&&f.comments.length&&l.commentThreads.push(k.createCommentNode(S,t.URI.parse(l.id),f))}),u.forEach(f=>{const c=i.filter(l=>l.resource.toString()===f.resource);if(c.length){const l=c[0];f.comments&&f.comments.length&&l.commentThreads.push(k.createCommentNode(S,l.resource,f))}else i.push(new k(S,t.URI.parse(f.resource),[f]))}),this.commentThreadsMap.set(S,i),this.updateResourceCommentThreads(),C.length>0||r.length>0||u.length>0}hasCommentThreads(){return!!this.resourceCommentThreads.length}getMessage(){return this.resourceCommentThreads.length?"":(0,R.localize)(0,null)}groupByResource(b,S){const C=[],r=new Map;for(const u of(0,p.groupBy)(S,E._compareURIs))r.set(u[0].resource,new k(b,t.URI.parse(u[0].resource),u));return r.forEach((u,i,f)=>{C.push(u)}),C}static _compareURIs(b,S){const C=b.resource.toString(),r=S.resource.toString();return C<r?-1:C>r?1:0}}e.CommentsModel=E}),define(ae[859],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COMMENTS_SECTION=void 0,e.COMMENTS_SECTION="comments"}),define(ae[860],le([1,0,10,208,2,859]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimestampWidget=void 0;class k extends R.Disposable{constructor(I,b,S){super(),this.configurationService=I,this._date=t.append(b,t.$("span.timestamp")),this._date.style.display="none",this._useRelativeTime=this.useRelativeTimeSetting,this.setTimestamp(S)}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 b,S;this.useRelativeTimeSetting?(b=this.getRelative(I),S=this.getDateString(I)):b=this.getDateString(I),this._date.textContent=b,S&&(this._date.title=S)}}getRelative(I){return(0,p.fromNow)(I,!0,!0)}getDateString(I){return I.toLocaleString()}}e.TimestampWidget=k}),define(ae[520],le([1,0,10,1581,238,2,41,858,8,7,76,12,5,860,29,519,92,857,18,184]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsList=e.Filter=e.CommentNodeRenderer=e.ResourceWithCommentsRenderer=e.CommentsModelVirualDelegate=e.CommentsAsyncDataSource=e.COMMENTS_VIEW_TITLE=e.COMMENTS_VIEW_STORAGE_ID=e.COMMENTS_VIEW_ID=void 0,e.COMMENTS_VIEW_ID="workbench.panel.comments",e.COMMENTS_VIEW_STORAGE_ID="Comments",e.COMMENTS_VIEW_TITLE=p.localize(0,null);class n{hasChildren(D){return(D instanceof E.CommentsModel||D instanceof E.ResourceWithCommentThreads)&&!(D instanceof E.CommentNode)}getChildren(D){return D instanceof E.CommentsModel?Promise.resolve(D.resourceCommentThreads):D instanceof E.ResourceWithCommentThreads?Promise.resolve(D.commentThreads):Promise.resolve([])}}e.CommentsAsyncDataSource=n;class a{getHeight(D){return D instanceof E.CommentNode&&D.hasReply()?44:22}getTemplateId(D){return D instanceof E.ResourceWithCommentThreads?a.RESOURCE_ID:D instanceof E.CommentNode?a.COMMENT_ID:""}}e.CommentsModelVirualDelegate=a,a.RESOURCE_ID="resource-with-comments",a.COMMENT_ID="comment-node";class o{constructor(D){this.labels=D,this.templateId="resource-with-comments"}renderTemplate(D){const y=Object.create(null),T=t.append(D,t.$(".resource-container"));return y.resourceLabel=this.labels.create(T),y}renderElement(D,y,T,_){T.resourceLabel.setFile(D.element.resource)}disposeTemplate(D){D.resourceLabel.dispose()}}e.ResourceWithCommentsRenderer=o;let g=class{constructor(D,y,T){this.openerService=D,this.configurationService=y,this.themeService=T,this.templateId="comment-node"}renderTemplate(D){const y=Object.create(null),T=t.append(D,t.$(".comment-thread-container")),_=t.append(T,t.$(".comment-metadata-container"));y.threadMetadata={icon:t.append(_,t.$(".icon")),userNames:t.append(_,t.$(".user")),timestamp:new u.TimestampWidget(this.configurationService,t.append(_,t.$(".timestamp-container"))),separator:t.append(_,t.$(".separator")),commentPreview:t.append(_,t.$(".text")),range:t.append(_,t.$(".range"))},y.threadMetadata.separator.innerText="\xB7";const L=t.append(T,t.$(".comment-snippet-container"));return y.repliesMetadata={container:L,icon:t.append(L,t.$(".icon")),count:t.append(L,t.$(".count")),lastReplyDetail:t.append(L,t.$(".reply-detail")),separator:t.append(L,t.$(".separator")),timestamp:new u.TimestampWidget(this.configurationService,t.append(L,t.$(".timestamp-container")))},y.repliesMetadata.separator.innerText="\xB7",y.repliesMetadata.icon.classList.add(...C.ThemeIcon.asClassNameArray(i.Codicon.indent)),y.disposables=[y.threadMetadata.timestamp,y.repliesMetadata.timestamp],y}getCountString(D){return D>1?p.localize(1,null,D):p.localize(2,null)}getRenderedComment(D,y){const T=(0,R.renderMarkdown)(D,{inline:!0,actionHandler:{callback:L=>(0,d.openLinkFromMarkdown)(this.openerService,L,D.isTrusted),disposables:y}}),_=T.element.getElementsByTagName("img");for(let L=0;L<_.length;L++){const M=_[L],O=t.$("");O.textContent=M.alt?p.localize(3,null,M.alt):p.localize(4,null),M.parentNode.replaceChild(O,M)}return T}getIcon(D){return D===c.CommentThreadState.Unresolved?i.Codicon.commentUnresolved:i.Codicon.comment}renderElement(D,y,T,_){const L=D.element.replies.length+1;if(T.threadMetadata.icon.classList.remove(...Array.from(T.threadMetadata.icon.classList.values()).filter(N=>N.startsWith("codicon"))),T.threadMetadata.icon.classList.add(...C.ThemeIcon.asClassNameArray(this.getIcon(D.element.threadState))),D.element.threadState!==void 0){const N=this.getCommentThreadWidgetStateColor(D.element.threadState,this.themeService.getColorTheme());T.threadMetadata.icon.style.setProperty(f.commentViewThreadStateColorVar,`${N}`),T.threadMetadata.icon.style.color=`var(${f.commentViewThreadStateColorVar}`}T.threadMetadata.userNames.textContent=D.element.comment.userName,T.threadMetadata.timestamp.setTimestamp(D.element.comment.timestamp?new Date(D.element.comment.timestamp):void 0);const M=D.element;if(T.threadMetadata.commentPreview.innerText="",T.threadMetadata.commentPreview.style.height="22px",typeof M.comment.body=="string")T.threadMetadata.commentPreview.innerText=M.comment.body;else{const N=new A.DisposableStore;T.disposables.push(N);const P=this.getRenderedComment(M.comment.body,N);T.disposables.push(P),T.threadMetadata.commentPreview.appendChild(P.element.firstElementChild??P.element),T.threadMetadata.commentPreview.title=P.element.textContent??""}if(D.element.range.startLineNumber===D.element.range.endLineNumber?T.threadMetadata.range.textContent=p.localize(5,null,D.element.range.startLineNumber):T.threadMetadata.range.textContent=p.localize(6,null,D.element.range.startLineNumber,D.element.range.endLineNumber),!D.element.hasReply()){T.repliesMetadata.container.style.display="none";return}T.repliesMetadata.container.style.display="",T.repliesMetadata.count.textContent=this.getCountString(L);const O=D.element.replies[D.element.replies.length-1].comment;T.repliesMetadata.lastReplyDetail.textContent=p.localize(7,null,O.userName),T.repliesMetadata.timestamp.setTimestamp(O.timestamp?new Date(O.timestamp):void 0)}getCommentThreadWidgetStateColor(D,y){return D!==void 0?(0,f.getCommentThreadStateColor)(D,y):void 0}disposeTemplate(D){D.disposables.forEach(y=>y.dispose())}};g=we([F(0,k.IOpenerService),F(1,I.IConfigurationService),F(2,C.IThemeService)],g),e.CommentNodeRenderer=g;var h;(function(w){w[w.Resource=0]="Resource",w[w.Comment=1]="Comment"})(h||(h={}));class v{constructor(D){this.options=D}filter(D,y){return D instanceof E.ResourceWithCommentThreads?this.filterResourceMarkers(D):this.filterCommentNode(D,y)}filterResourceMarkers(D){if(this.options.textFilter.text&&!this.options.textFilter.negate){const y=l.FilterOptions._filter(this.options.textFilter.text,(0,s.basename)(D.resource));if(y)return{visibility:!0,data:{type:0,uriMatches:y||[]}}}return 2}filterCommentNode(D,y){if(!(D.threadState===void 0||this.options.showResolved&&c.CommentThreadState.Resolved===D.threadState||this.options.showUnresolved&&c.CommentThreadState.Unresolved===D.threadState))return!1;if(!this.options.textFilter.text)return!0;const _=l.FilterOptions._messageFilter(this.options.textFilter.text,typeof D.comment.body=="string"?D.comment.body:D.comment.body.value)||l.FilterOptions._messageFilter(this.options.textFilter.text,D.comment.userName)||D.replies.map(L=>l.FilterOptions._messageFilter(this.options.textFilter.text,L.comment.userName)||l.FilterOptions._messageFilter(this.options.textFilter.text,typeof L.comment.body=="string"?L.comment.body:L.comment.body.value)).filter(L=>!!L).flat();return _.length&&!this.options.textFilter.negate?{visibility:!0,data:{type:1,textMatches:_}}:_.length&&this.options.textFilter.negate&&y===2?!1:_.length===0&&this.options.textFilter.negate&&y===2?!0:y}}e.Filter=v;let m=class extends S.WorkbenchAsyncDataTree{constructor(D,y,T,_,L,M,O,N){const P=new a,B=new n,V=[O.createInstance(o,D),O.createInstance(g)];super("CommentsTree",y,P,V,B,{accessibilityProvider:T.accessibilityProvider,identityProvider:{getId:z=>z instanceof E.CommentsModel?"root":z instanceof E.ResourceWithCommentThreads?`${z.owner}-${z.id}`:z instanceof E.CommentNode?`${z.owner}-${z.resource.toString()}-${z.threadId}-${z.comment.uniqueIdInThread}`+(z.isRoot?"-root":""):""},expandOnlyOnTwistieClick:z=>!(z instanceof E.CommentsModel||z instanceof E.ResourceWithCommentThreads),collapseByDefault:()=>!1,overrideStyles:T.overrideStyles,filter:T.filter,findWidgetEnabled:!1},O,_,L,M,N)}filterComments(){this.refilter()}getVisibleItemCount(){let D=0;const y=this.getNode();for(const T of y.children)for(const _ of T.children)_.visible&&T.visible&&D++;return D}};m=we([F(3,b.IContextKeyService),F(4,S.IListService),F(5,C.IThemeService),F(6,r.IInstantiationService),F(7,I.IConfigurationService)],m),e.CommentsList=m}),define(ae[2296],le([1,0,154]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorModelManager=void 0;class p{constructor(){this._references=new Map}async getAllModels(A){const k=`${A.toString()}@@@`,E=[];for(const[I,b]of this._references)I.startsWith(k)&&b.model&&E.push(await b.model);return E}async get(A,k){const E=this.key(A,k);return this._references.get(E)?.model}tryRetain(A,k){const E=this.key(A,k),I=this._references.get(E);if(!!I)return I.counter++,I.model.then(b=>({object:b,dispose:(0,t.once)(()=>{--I.counter<=0&&(I.model.then(S=>S.dispose()),this._references.delete(E))})}))}add(A,k,E){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:E,counter:0}),this.tryRetain(A,k)}disposeAllModelsForView(A){for(const[k,E]of this._references)E.viewType===A&&(E.model.then(I=>I.dispose()),this._references.delete(k))}key(A,k){return`${A.toString()}@@@${k}`}}e.CustomEditorModelManager=p}),define(ae[201],le([1,0,29,1605,63]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.debugInspectMemory=e.debugConsoleEvaluationPrompt=e.debugConsoleEvaluationInput=e.breakpointsActivate=e.breakpointsRemoveAll=e.watchExpressionsAddFuncBreakpoint=e.watchExpressionsAdd=e.watchExpressionRemove=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,R.registerIcon)("debug-console-view-icon",t.Codicon.debugConsole,(0,p.localize)(0,null)),e.runViewIcon=(0,R.registerIcon)("run-view-icon",t.Codicon.debugAlt,(0,p.localize)(1,null)),e.variablesViewIcon=(0,R.registerIcon)("variables-view-icon",t.Codicon.debugAlt,(0,p.localize)(2,null)),e.watchViewIcon=(0,R.registerIcon)("watch-view-icon",t.Codicon.debugAlt,(0,p.localize)(3,null)),e.callStackViewIcon=(0,R.registerIcon)("callstack-view-icon",t.Codicon.debugAlt,(0,p.localize)(4,null)),e.breakpointsViewIcon=(0,R.registerIcon)("breakpoints-view-icon",t.Codicon.debugAlt,(0,p.localize)(5,null)),e.loadedScriptsViewIcon=(0,R.registerIcon)("loaded-scripts-view-icon",t.Codicon.debugAlt,(0,p.localize)(6,null)),e.breakpoint={regular:(0,R.registerIcon)("debug-breakpoint",t.Codicon.debugBreakpoint,(0,p.localize)(7,null)),disabled:(0,R.registerIcon)("debug-breakpoint-disabled",t.Codicon.debugBreakpointDisabled,(0,p.localize)(8,null)),unverified:(0,R.registerIcon)("debug-breakpoint-unverified",t.Codicon.debugBreakpointUnverified,(0,p.localize)(9,null))},e.functionBreakpoint={regular:(0,R.registerIcon)("debug-breakpoint-function",t.Codicon.debugBreakpointFunction,(0,p.localize)(10,null)),disabled:(0,R.registerIcon)("debug-breakpoint-function-disabled",t.Codicon.debugBreakpointFunctionDisabled,(0,p.localize)(11,null)),unverified:(0,R.registerIcon)("debug-breakpoint-function-unverified",t.Codicon.debugBreakpointFunctionUnverified,(0,p.localize)(12,null))},e.conditionalBreakpoint={regular:(0,R.registerIcon)("debug-breakpoint-conditional",t.Codicon.debugBreakpointConditional,(0,p.localize)(13,null)),disabled:(0,R.registerIcon)("debug-breakpoint-conditional-disabled",t.Codicon.debugBreakpointConditionalDisabled,(0,p.localize)(14,null)),unverified:(0,R.registerIcon)("debug-breakpoint-conditional-unverified",t.Codicon.debugBreakpointConditionalUnverified,(0,p.localize)(15,null))},e.dataBreakpoint={regular:(0,R.registerIcon)("debug-breakpoint-data",t.Codicon.debugBreakpointData,(0,p.localize)(16,null)),disabled:(0,R.registerIcon)("debug-breakpoint-data-disabled",t.Codicon.debugBreakpointDataDisabled,(0,p.localize)(17,null)),unverified:(0,R.registerIcon)("debug-breakpoint-data-unverified",t.Codicon.debugBreakpointDataUnverified,(0,p.localize)(18,null))},e.logBreakpoint={regular:(0,R.registerIcon)("debug-breakpoint-log",t.Codicon.debugBreakpointLog,(0,p.localize)(19,null)),disabled:(0,R.registerIcon)("debug-breakpoint-log-disabled",t.Codicon.debugBreakpointLogDisabled,(0,p.localize)(20,null)),unverified:(0,R.registerIcon)("debug-breakpoint-log-unverified",t.Codicon.debugBreakpointLogUnverified,(0,p.localize)(21,null))},e.debugBreakpointHint=(0,R.registerIcon)("debug-hint",t.Codicon.debugHint,(0,p.localize)(22,null)),e.debugBreakpointUnsupported=(0,R.registerIcon)("debug-breakpoint-unsupported",t.Codicon.debugBreakpointUnsupported,(0,p.localize)(23,null)),e.allBreakpoints=[e.breakpoint,e.functionBreakpoint,e.conditionalBreakpoint,e.dataBreakpoint,e.logBreakpoint],e.debugStackframe=(0,R.registerIcon)("debug-stackframe",t.Codicon.debugStackframe,(0,p.localize)(24,null)),e.debugStackframeFocused=(0,R.registerIcon)("debug-stackframe-focused",t.Codicon.debugStackframeFocused,(0,p.localize)(25,null)),e.debugGripper=(0,R.registerIcon)("debug-gripper",t.Codicon.gripper,(0,p.localize)(26,null)),e.debugRestartFrame=(0,R.registerIcon)("debug-restart-frame",t.Codicon.debugRestartFrame,(0,p.localize)(27,null)),e.debugStop=(0,R.registerIcon)("debug-stop",t.Codicon.debugStop,(0,p.localize)(28,null)),e.debugDisconnect=(0,R.registerIcon)("debug-disconnect",t.Codicon.debugDisconnect,(0,p.localize)(29,null)),e.debugRestart=(0,R.registerIcon)("debug-restart",t.Codicon.debugRestart,(0,p.localize)(30,null)),e.debugStepOver=(0,R.registerIcon)("debug-step-over",t.Codicon.debugStepOver,(0,p.localize)(31,null)),e.debugStepInto=(0,R.registerIcon)("debug-step-into",t.Codicon.debugStepInto,(0,p.localize)(32,null)),e.debugStepOut=(0,R.registerIcon)("debug-step-out",t.Codicon.debugStepOut,(0,p.localize)(33,null)),e.debugStepBack=(0,R.registerIcon)("debug-step-back",t.Codicon.debugStepBack,(0,p.localize)(34,null)),e.debugPause=(0,R.registerIcon)("debug-pause",t.Codicon.debugPause,(0,p.localize)(35,null)),e.debugContinue=(0,R.registerIcon)("debug-continue",t.Codicon.debugContinue,(0,p.localize)(36,null)),e.debugReverseContinue=(0,R.registerIcon)("debug-reverse-continue",t.Codicon.debugReverseContinue,(0,p.localize)(37,null)),e.debugRun=(0,R.registerIcon)("debug-run",t.Codicon.run,(0,p.localize)(38,null)),e.debugStart=(0,R.registerIcon)("debug-start",t.Codicon.debugStart,(0,p.localize)(39,null)),e.debugConfigure=(0,R.registerIcon)("debug-configure",t.Codicon.gear,(0,p.localize)(40,null)),e.debugConsole=(0,R.registerIcon)("debug-console",t.Codicon.gear,(0,p.localize)(41,null)),e.debugRemoveConfig=(0,R.registerIcon)("debug-remove-config",t.Codicon.trash,(0,p.localize)(42,null)),e.debugCollapseAll=(0,R.registerIcon)("debug-collapse-all",t.Codicon.collapseAll,(0,p.localize)(43,null)),e.callstackViewSession=(0,R.registerIcon)("callstack-view-session",t.Codicon.bug,(0,p.localize)(44,null)),e.debugConsoleClearAll=(0,R.registerIcon)("debug-console-clear-all",t.Codicon.clearAll,(0,p.localize)(45,null)),e.watchExpressionsRemoveAll=(0,R.registerIcon)("watch-expressions-remove-all",t.Codicon.closeAll,(0,p.localize)(46,null)),e.watchExpressionRemove=(0,R.registerIcon)("watch-expression-remove",t.Codicon.removeClose,(0,p.localize)(47,null)),e.watchExpressionsAdd=(0,R.registerIcon)("watch-expressions-add",t.Codicon.add,(0,p.localize)(48,null)),e.watchExpressionsAddFuncBreakpoint=(0,R.registerIcon)("watch-expressions-add-function-breakpoint",t.Codicon.add,(0,p.localize)(49,null)),e.breakpointsRemoveAll=(0,R.registerIcon)("breakpoints-remove-all",t.Codicon.closeAll,(0,p.localize)(50,null)),e.breakpointsActivate=(0,R.registerIcon)("breakpoints-activate",t.Codicon.activateBreakpoints,(0,p.localize)(51,null)),e.debugConsoleEvaluationInput=(0,R.registerIcon)("debug-console-evaluation-input",t.Codicon.arrowSmallRight,(0,p.localize)(52,null)),e.debugConsoleEvaluationPrompt=(0,R.registerIcon)("debug-console-evaluation-prompt",t.Codicon.chevronRight,(0,p.localize)(53,null)),e.debugInspectMemory=(0,R.registerIcon)("debug-inspect-memory",t.Codicon.fileBinary,(0,p.localize)(54,null))}),define(ae[521],le([1,0,33,12,65,1598,201,126]),function(J,e,t,p,R,A,k,E){"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 b=(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)."),S=(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)."),r=(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)."),u=(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."),f=(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."),c=(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."),s=(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."),d=(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)."),n=(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."),o=(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."),g=(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."),h=(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."),v=(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)),w=(0,t.registerColor)("debugIcon.disconnectForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#A1260D"},(0,A.localize)(5,null)),D=(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)),_=(0,t.registerColor)("debugIcon.stepOutForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(9,null)),L=(0,t.registerColor)("debugIcon.continueForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(10,null)),M=(0,t.registerColor)("debugIcon.stepBackForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,A.localize)(11,null));(0,p.registerThemingParticipant)((O,N)=>{const P=O.getColor(t.badgeBackground),B=O.getColor(t.badgeForeground),V=O.getColor(t.listDeemphasizedForeground),z=O.getColor(f),x=O.getColor(c),H=O.getColor(l),W=O.getColor(s),U=O.getColor(d),$=O.getColor(t.toolbarHoverBackground);N.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: ${V} } /* Line & column number "badge" for selected call stack row */ .debug-pane .monaco-list-row.selected .line-number { background-color: ${P}; color: ${B}; } /* Line & column number "badge" for unselected call stack row (basically all other rows) */ .debug-pane .line-number { background-color: ${P.transparent(.6)}; color: ${B.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: ${W}; color: ${H}; } /* 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: ${x}; color: ${z}; } /* Info "badge" shown when the debugger pauses due to a thrown exception. */ .debug-pane .call-stack-state-message > .label.exception { background-color: ${x}; color: ${z}; } /* Animation of changed values in Debug viewlet */ @keyframes debugViewletValueChanged { 0% { background-color: ${U.transparent(0)} } 5% { background-color: ${U.transparent(.9)} } 100% { background-color: ${U.transparent(.3)} } } .debug-pane .monaco-list-row .expression .value.changed { background-color: ${U.transparent(.3)}; animation-name: debugViewletValueChanged; animation-duration: 1s; animation-fill-mode: forwards; } .monaco-list-row .expression .lazy-button:hover { background-color: ${$} } `);const q=O.getColor(t.contrastBorder);q&&N.addRule(` .debug-pane .line-number { border: 1px solid ${q}; } `),(0,E.isHighContrast)(O.type)&&N.addRule(` .debug-pane .line-number { background-color: ${P}; color: ${B}; }`);const X=O.getColor(b),G=O.getColor(S),Q=O.getColor(C),j=O.getColor(r),K=O.getColor(i),Y=O.getColor(u);N.addRule(` .monaco-workbench .monaco-list-row .expression .name { color: ${X}; } .monaco-workbench .monaco-list-row .expression .value, .monaco-workbench .debug-hover-widget .value { color: ${G}; } .monaco-workbench .monaco-list-row .expression .value.string, .monaco-workbench .debug-hover-widget .value.string { color: ${Q}; } .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: ${K}; } .monaco-workbench .monaco-list-row .expression .value.number, .monaco-workbench .debug-hover-widget .value.number { color: ${Y}; } `);const ee=O.getColor(t.inputBorder)||R.Color.fromHex("#80808060"),ie=O.getColor(n),re=O.getColor(a),oe=O.getColor(o),se=O.getColor(g),te=O.getColor(h);N.addRule(` .repl .repl-input-wrapper { border-top: 1px solid ${ee}; } .monaco-workbench .repl .repl-tree .output .expression .value.info { color: ${ie}; } .monaco-workbench .repl .repl-tree .output .expression .value.warn { color: ${re}; } .monaco-workbench .repl .repl-tree .output .expression .value.error { color: ${oe}; } .monaco-workbench .repl .repl-tree .output .expression .source { color: ${se}; } .monaco-workbench .repl .repl-tree .monaco-tl-contents .arrow { color: ${te}; } `),O.defines(h)||N.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 Z=O.getColor(e.debugIconStartForeground);Z&&N.addRule(`.monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugStart)} { color: ${Z}; }`);const ne=O.getColor(v);ne&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugPause)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugPause)} { color: ${ne}; }`);const ce=O.getColor(m);ce&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStop)},.monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugStop)} { color: ${ce}; }`);const de=O.getColor(w);de&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugDisconnect)},.monaco-workbench .debug-view-content ${p.ThemeIcon.asCSSSelector(k.debugDisconnect)}, .monaco-workbench .debug-toolbar ${p.ThemeIcon.asCSSSelector(k.debugDisconnect)} { color: ${de}; }`);const he=O.getColor(D);he&&N.addRule(`.monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugRestart)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugRestartFrame)}, .monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugRestart)}, .monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugRestartFrame)} { color: ${he}; }`);const pe=O.getColor(y);pe&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStepOver)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugStepOver)} { color: ${pe}; }`);const me=O.getColor(T);me&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStepInto)}, .monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStepInto)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugStepInto)} { color: ${me}; }`);const Se=O.getColor(_);Se&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStepOut)}, .monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStepOut)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugStepOut)} { color: ${Se}; }`);const Ie=O.getColor(L);Ie&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugContinue)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugContinue)}, .monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugReverseContinue)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugReverseContinue)} { color: ${Ie}; }`);const ve=O.getColor(M);ve&&N.addRule(`.monaco-workbench .part > .title > .title-actions .action-label${p.ThemeIcon.asCSSSelector(k.debugStepBack)}, .monaco-workbench ${p.ThemeIcon.asCSSSelector(k.debugStepBack)} { color: ${ve}; }`)})}e.registerColors=I}),define(ae[2297],le([1,0,6,11,1625]),function(J,e,t,p,R){"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(E){this.messageCallback&&this._onError.fire(new Error("attempt to set more than one 'Message' callback")),this.messageCallback=E}onEvent(E){this.eventCallback&&this._onError.fire(new Error("attempt to set more than one 'Event' callback")),this.eventCallback=E}onRequest(E){this.requestCallback&&this._onError.fire(new Error("attempt to set more than one 'Request' callback")),this.requestCallback=E}sendResponse(E){E.seq>0?this._onError.fire(new Error(`attempt to send more than one response for command ${E.command}`)):this.internalSend("response",E)}sendRequest(E,I,b,S){const C={command:E};if(I&&Object.keys(I).length>0&&(C.arguments=I),this.internalSend("request",C),typeof S=="number"){const r=setTimeout(()=>{clearTimeout(r);const u=this.pendingRequests.get(C.seq);if(u){this.pendingRequests.delete(C.seq);const i={type:"response",seq:0,request_seq:C.seq,success:!1,command:E,message:(0,R.localize)(0,null,S,E)};u(i)}},S)}return b&&this.pendingRequests.set(C.seq,b),C.seq}acceptMessage(E){this.messageCallback?this.messageCallback(E):(this.queue.push(E),this.queue.length===1&&this.processQueue())}needsTaskBoundaryBetween(E,I){return E.type!=="event"||I.type!=="event"}async processQueue(){let E;for(;this.queue.length;){if((!E||this.needsTaskBoundaryBetween(this.queue[0],E))&&await(0,p.timeout)(0),E=this.queue.shift(),!E)return;switch(E.type){case"event":this.eventCallback?.(E);break;case"request":this.requestCallback?.(E);break;case"response":{const I=E,b=this.pendingRequests.get(I.request_seq);b&&(this.pendingRequests.delete(I.request_seq),b(I));break}}}}internalSend(E,I){I.type=E,I.seq=this.sequence++,this.sendMessage(I)}async cancelPendingRequests(){if(this.pendingRequests.size===0)return Promise.resolve();const E=new Map;this.pendingRequests.forEach((I,b)=>E.set(b,I)),await(0,p.timeout)(500),E.forEach((I,b)=>{I({type:"response",seq:0,request_seq:b,success:!1,command:"canceled",message:"canceled"}),this.pendingRequests.delete(b)})}getPendingRequestIds(){return Array.from(this.pendingRequests.keys())}dispose(){this.queue=[]}}e.AbstractDebugAdapter=A}),define(ae[2298],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Breakpoints=void 0;let p=class{constructor(A,k){this.breakpointContribution=A,this.contextKeyService=k,this.breakpointsWhen=typeof A.when=="string"?t.ContextKeyExpr.deserialize(A.when):void 0}get language(){return this.breakpointContribution.language}get enabled(){return!this.breakpointsWhen||this.contextKeyService.contextMatchesRules(this.breakpointsWhen)}};p=we([F(1,t.IContextKeyService)],p),e.Breakpoints=p}),define(ae[87],le([1,0,1626,7,5]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidgetContext=e.IDebugService=e.DebuggerString=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_SUSPEND_DEBUGGEE_SUPPORTED=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 p.RawContextKey("debugType",void 0,{type:"string",description:t.localize(0,null)}),e.CONTEXT_DEBUG_CONFIGURATION_TYPE=new p.RawContextKey("debugConfigurationType",void 0,{type:"string",description:t.localize(1,null)}),e.CONTEXT_DEBUG_STATE=new p.RawContextKey("debugState","inactive",{type:"string",description:t.localize(2,null)}),e.CONTEXT_DEBUG_UX_KEY="debugUx",e.CONTEXT_DEBUG_UX=new p.RawContextKey(e.CONTEXT_DEBUG_UX_KEY,"default",{type:"string",description:t.localize(3,null)}),e.CONTEXT_IN_DEBUG_MODE=new p.RawContextKey("inDebugMode",!1,{type:"boolean",description:t.localize(4,null)}),e.CONTEXT_IN_DEBUG_REPL=new p.RawContextKey("inDebugRepl",!1,{type:"boolean",description:t.localize(5,null)}),e.CONTEXT_BREAKPOINT_WIDGET_VISIBLE=new p.RawContextKey("breakpointWidgetVisible",!1,{type:"boolean",description:t.localize(6,null)}),e.CONTEXT_IN_BREAKPOINT_WIDGET=new p.RawContextKey("inBreakpointWidget",!1,{type:"boolean",description:t.localize(7,null)}),e.CONTEXT_BREAKPOINTS_FOCUSED=new p.RawContextKey("breakpointsFocused",!0,{type:"boolean",description:t.localize(8,null)}),e.CONTEXT_WATCH_EXPRESSIONS_FOCUSED=new p.RawContextKey("watchExpressionsFocused",!0,{type:"boolean",description:t.localize(9,null)}),e.CONTEXT_WATCH_EXPRESSIONS_EXIST=new p.RawContextKey("watchExpressionsExist",!1,{type:"boolean",description:t.localize(10,null)}),e.CONTEXT_VARIABLES_FOCUSED=new p.RawContextKey("variablesFocused",!0,{type:"boolean",description:t.localize(11,null)}),e.CONTEXT_EXPRESSION_SELECTED=new p.RawContextKey("expressionSelected",!1,{type:"boolean",description:t.localize(12,null)}),e.CONTEXT_BREAKPOINT_INPUT_FOCUSED=new p.RawContextKey("breakpointInputFocused",!1,{type:"boolean",description:t.localize(13,null)}),e.CONTEXT_CALLSTACK_ITEM_TYPE=new p.RawContextKey("callStackItemType",void 0,{type:"string",description:t.localize(14,null)}),e.CONTEXT_CALLSTACK_SESSION_IS_ATTACH=new p.RawContextKey("callStackSessionIsAttach",!1,{type:"boolean",description:t.localize(15,null)}),e.CONTEXT_CALLSTACK_ITEM_STOPPED=new p.RawContextKey("callStackItemStopped",!1,{type:"boolean",description:t.localize(16,null)}),e.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD=new p.RawContextKey("callStackSessionHasOneThread",!1,{type:"boolean",description:t.localize(17,null)}),e.CONTEXT_WATCH_ITEM_TYPE=new p.RawContextKey("watchItemType",void 0,{type:"string",description:t.localize(18,null)}),e.CONTEXT_CAN_VIEW_MEMORY=new p.RawContextKey("canViewMemory",void 0,{type:"boolean",description:t.localize(19,null)}),e.CONTEXT_BREAKPOINT_ITEM_TYPE=new p.RawContextKey("breakpointItemType",void 0,{type:"string",description:t.localize(20,null)}),e.CONTEXT_BREAKPOINT_ACCESS_TYPE=new p.RawContextKey("breakpointAccessType",void 0,{type:"string",description:t.localize(21,null)}),e.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION=new p.RawContextKey("breakpointSupportsCondition",!1,{type:"boolean",description:t.localize(22,null)}),e.CONTEXT_LOADED_SCRIPTS_SUPPORTED=new p.RawContextKey("loadedScriptsSupported",!1,{type:"boolean",description:t.localize(23,null)}),e.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE=new p.RawContextKey("loadedScriptsItemType",void 0,{type:"string",description:t.localize(24,null)}),e.CONTEXT_FOCUSED_SESSION_IS_ATTACH=new p.RawContextKey("focusedSessionIsAttach",!1,{type:"boolean",description:t.localize(25,null)}),e.CONTEXT_STEP_BACK_SUPPORTED=new p.RawContextKey("stepBackSupported",!1,{type:"boolean",description:t.localize(26,null)}),e.CONTEXT_RESTART_FRAME_SUPPORTED=new p.RawContextKey("restartFrameSupported",!1,{type:"boolean",description:t.localize(27,null)}),e.CONTEXT_STACK_FRAME_SUPPORTS_RESTART=new p.RawContextKey("stackFrameSupportsRestart",!1,{type:"boolean",description:t.localize(28,null)}),e.CONTEXT_JUMP_TO_CURSOR_SUPPORTED=new p.RawContextKey("jumpToCursorSupported",!1,{type:"boolean",description:t.localize(29,null)}),e.CONTEXT_STEP_INTO_TARGETS_SUPPORTED=new p.RawContextKey("stepIntoTargetsSupported",!1,{type:"boolean",description:t.localize(30,null)}),e.CONTEXT_BREAKPOINTS_EXIST=new p.RawContextKey("breakpointsExist",!1,{type:"boolean",description:t.localize(31,null)}),e.CONTEXT_DEBUGGERS_AVAILABLE=new p.RawContextKey("debuggersAvailable",!1,{type:"boolean",description:t.localize(32,null)}),e.CONTEXT_DEBUG_EXTENSION_AVAILABLE=new p.RawContextKey("debugExtensionAvailable",!0,{type:"boolean",description:t.localize(33,null)}),e.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT=new p.RawContextKey("debugProtocolVariableMenuContext",void 0,{type:"string",description:t.localize(34,null)}),e.CONTEXT_SET_VARIABLE_SUPPORTED=new p.RawContextKey("debugSetVariableSupported",!1,{type:"boolean",description:t.localize(35,null)}),e.CONTEXT_SET_EXPRESSION_SUPPORTED=new p.RawContextKey("debugSetExpressionSupported",!1,{type:"boolean",description:t.localize(36,null)}),e.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED=new p.RawContextKey("breakWhenValueChangesSupported",!1,{type:"boolean",description:t.localize(37,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED=new p.RawContextKey("breakWhenValueIsAccessedSupported",!1,{type:"boolean",description:t.localize(38,null)}),e.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED=new p.RawContextKey("breakWhenValueIsReadSupported",!1,{type:"boolean",description:t.localize(39,null)}),e.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED=new p.RawContextKey("terminateDebuggeeSupported",!1,{type:"boolean",description:t.localize(40,null)}),e.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED=new p.RawContextKey("suspendDebuggeeSupported",!1,{type:"boolean",description:t.localize(41,null)}),e.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT=new p.RawContextKey("variableEvaluateNamePresent",!1,{type:"boolean",description:t.localize(42,null)}),e.CONTEXT_VARIABLE_IS_READONLY=new p.RawContextKey("variableIsReadonly",!1,{type:"boolean",description:t.localize(43,null)}),e.CONTEXT_EXCEPTION_WIDGET_VISIBLE=new p.RawContextKey("exceptionWidgetVisible",!1,{type:"boolean",description:t.localize(44,null)}),e.CONTEXT_MULTI_SESSION_REPL=new p.RawContextKey("multiSessionRepl",!1,{type:"boolean",description:t.localize(45,null)}),e.CONTEXT_MULTI_SESSION_DEBUG=new p.RawContextKey("multiSessionDebug",!1,{type:"boolean",description:t.localize(46,null)}),e.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED=new p.RawContextKey("disassembleRequestSupported",!1,{type:"boolean",description:t.localize(47,null)}),e.CONTEXT_DISASSEMBLY_VIEW_FOCUS=new p.RawContextKey("disassemblyViewFocus",!1,{type:"boolean",description:t.localize(48,null)}),e.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST=new p.RawContextKey("languageSupportsDisassembleRequest",!1,{type:"boolean",description:t.localize(49,null)}),e.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE=new p.RawContextKey("focusedStackFrameHasInstructionReference",!1,{type:"boolean",description:t.localize(50,null)});const A=r=>t.localize(51,null,r);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(52,null)};var k;(function(r){r[r.Inactive=0]="Inactive",r[r.Initializing=1]="Initializing",r[r.Stopped=2]="Stopped",r[r.Running=3]="Running"})(k=e.State||(e.State={}));function E(r){switch(r){case 1:return"initializing";case 2:return"stopped";case 3:return"running";default:return"inactive"}}e.getStateLabel=E;var I;(function(r){r[r.Valid=0]="Valid",r[r.Unreadable=1]="Unreadable",r[r.Error=2]="Error"})(I=e.MemoryRangeType||(e.MemoryRangeType={})),e.DEBUG_MEMORY_SCHEME="vscode-debug-memory";var b;(function(r){r[r.Initial=1]="Initial",r[r.Dynamic=2]="Dynamic"})(b=e.DebugConfigurationProviderTriggerKind||(e.DebugConfigurationProviderTriggerKind={}));var S;(function(r){r.UnverifiedBreakpoints="unverifiedBreakpoints"})(S=e.DebuggerString||(e.DebuggerString={})),e.IDebugService=(0,R.createDecorator)(e.DEBUG_SERVICE_ID);var C;(function(r){r[r.CONDITION=0]="CONDITION",r[r.HIT_COUNT=1]="HIT_COUNT",r[r.LOG_MESSAGE=2]="LOG_MESSAGE"})(C=e.BreakpointWidgetContext||(e.BreakpointWidgetContext={}))}),define(ae[2299],le([1,0,2,159,284,87]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCueLineDebuggerContribution=void 0;let k=class extends t.Disposable{constructor(I,b){super(),this.audioCueService=b,this._register((0,p.autorunWithStore)((S,C)=>{if(!b.isEnabled(R.AudioCue.onDebugBreak).read(S))return;const r=new Map;C.add((0,t.toDisposable)(()=>{r.forEach(u=>u.dispose()),r.clear()})),C.add(I.onDidNewSession(u=>r.set(u,this.handleSession(u)))),C.add(I.onDidEndSession(u=>{r.get(u)?.dispose(),r.delete(u)})),I.getModel().getSessions().forEach(u=>r.set(u,this.handleSession(u)))},"subscribe to debug sessions"))}handleSession(I){return I.onDidChangeState(b=>{const S=I.getStoppedDetails(),C="breakpoint";S&&S.reason===C&&this.audioCueService.playAudioCue(R.AudioCue.onDebugBreak)})}};k=we([F(0,A.IDebugService),F(1,R.IAudioCueService)],k),e.AudioCueLineDebuggerContribution=k}),define(ae[634],le([1,0,16,6,2,20,116,1593,5,25,33,12,57,201,87]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LazyCallStackEditorContribution=e.createDecorationsForStackFrame=e.focusedStackFrameColor=e.topStackFrameColor=void 0,e.topStackFrameColor=(0,S.registerColor)("editor.stackFrameHighlightBackground",{dark:"#ffff0033",light:"#ffff6673",hcDark:"#ffff0033",hcLight:"#ffff6673"},(0,E.localize)(0,null)),e.focusedStackFrameColor=(0,S.registerColor)("editor.focusedStackFrameHighlightBackground",{dark:"#7abd7a4d",light:"#cee7ce73",hcDark:"#7abd7a4d",hcLight:"#cee7ce73"},(0,E.localize)(1,null));const f=1,c={description:"top-stack-frame-margin",glyphMarginClassName:C.ThemeIcon.asClassName(u.debugStackframe),stickiness:f,overviewRuler:{position:k.OverviewRulerLane.Full,color:(0,C.themeColorFromId)(e.topStackFrameColor)}},l={description:"focused-stack-frame-margin",glyphMarginClassName:C.ThemeIcon.asClassName(u.debugStackframeFocused),stickiness:f,overviewRuler:{position:k.OverviewRulerLane.Full,color:(0,C.themeColorFromId)(e.focusedStackFrameColor)}},s={description:"top-stack-frame-decoration",isWholeLine:!0,className:"debug-top-stack-frame-line",stickiness:f},d={description:"focused-stack-frame-decoration",isWholeLine:!0,className:"debug-focused-stack-frame-line",stickiness:f};function n(g,h,v){const m=[],w=new A.Range(g.range.startLineNumber,g.range.startColumn,g.range.startLineNumber,1073741824),D=new A.Range(g.range.startLineNumber,g.range.startColumn,g.range.startLineNumber,g.range.startColumn+1),y=g.thread.getTopStackFrame();return g.getId()===y?.getId()?(h&&m.push({options:c,range:D}),m.push({options:s,range:w}),g.range.startColumn>1&&m.push({options:{description:"top-stack-frame-inline-decoration",before:{content:"\uEB8B",inlineClassName:v?"debug-top-stack-frame-column start-of-line":"debug-top-stack-frame-column",inlineClassNameAffectsLetterSpacing:!0}},range:w})):(h&&m.push({options:l,range:D}),m.push({options:d,range:w})),m}e.createDecorationsForStackFrame=n;let a=class extends R.Disposable{constructor(h,v){super();const m=h.onDidChangeModel(()=>{h.hasModel()&&(m.dispose(),this._register(v.createInstance(o,h)))})}};a=we([F(1,I.IInstantiationService)],a),e.LazyCallStackEditorContribution=a;let o=class extends R.Disposable{constructor(h,v,m,w){super(),this.editor=h,this.debugService=v,this.uriIdentityService=m,this.logService=w,this.decorations=this.editor.createDecorationsCollection();const D=()=>this.decorations.set(this.createCallStackDecorations());this._register(p.Event.any(this.debugService.getViewModel().onDidFocusStackFrame,this.debugService.getModel().onDidChangeCallStack)(()=>{D()})),this._register(this.editor.onDidChangeModel(y=>{y.newModelUrl&&D()})),D()}createCallStackDecorations(){const h=this.editor;if(!h.hasModel())return[];const v=this.debugService.getViewModel().focusedStackFrame,m=[];return this.debugService.getModel().getSessions().forEach(w=>{const D=w===v?.thread.session;w.getAllThreads().forEach(y=>{if(y.stopped){const T=y.getCallStack(),_=[];T.length>0&&(v&&!v.equals(T[0])&&_.push(v),_.push(T[0])),_.forEach(L=>{if(L&&this.uriIdentityService.extUri.isEqual(L.source.uri,h.getModel()?.uri)){if(L.range.startLineNumber>h.getModel()?.getLineCount()||L.range.startLineNumber<1){this.logService.warn(`CallStackEditorContribution: invalid stack frame line number: ${L.range.startLineNumber}`);return}const M=h.getModel().getLineFirstNonWhitespaceColumn(L.range.startLineNumber)>=L.range.startColumn;m.push(...n(L,D,M))}})}})}),(0,t.distinct)(m,w=>`${w.options.className} ${w.options.glyphMarginClassName} ${w.range.startLineNumber} ${w.range.startColumn}`)}dispose(){super.dispose(),this.decorations.clear()}};o=we([F(1,i.IDebugService),F(2,r.IUriIdentityService),F(3,b.ILogService)],o),(0,C.registerThemingParticipant)((g,h)=>{const v=g.getColor(e.topStackFrameColor);v&&h.addRule(`.monaco-editor .view-overlays .debug-top-stack-frame-line { background: ${v}; }`);const m=g.getColor(e.focusedStackFrameColor);m&&h.addRule(`.monaco-editor .view-overlays .debug-focused-stack-frame-line { background: ${m}; }`)})}),define(ae[2300],le([1,0,56,6,2,194,171,19,87]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugMemoryFileSystemProvider=void 0;const b=/range=([0-9]+):([0-9]+)/;class S{constructor(u){this.debugService=u,this.memoryFdCounter=0,this.fdMemory=new Map,this.changeEmitter=new p.Emitter,this.onDidChangeCapabilities=p.Event.None,this.onDidChangeFile=this.changeEmitter.event,this.capabilities=1028,u.onDidEndSession(i=>{for(const[f,c]of this.fdMemory)c.session===i&&this.close(f)})}watch(u,i){if(i.recursive)return(0,R.toDisposable)(()=>{});const{session:f,memoryReference:c,offset:l}=this.parseUri(u),s=new R.DisposableStore;return s.add(f.onDidChangeState(()=>{(f.state===3||f.state===0)&&this.changeEmitter.fire([{type:2,resource:u}])})),s.add(f.onDidInvalidateMemory(d=>{d.body.memoryReference===c&&(l&&(d.body.offset>=l.toOffset||d.body.offset+d.body.count<l.fromOffset)||this.changeEmitter.fire([{resource:u,type:0}]))})),s}stat(u){const{readOnly:i}=this.parseUri(u);return Promise.resolve({type:E.FileType.File,mtime:0,ctime:0,size:0,permissions:i?E.FilePermission.Readonly:void 0})}mkdir(){throw new E.FileSystemProviderError("Not allowed",E.FileSystemProviderErrorCode.NoPermissions)}readdir(){throw new E.FileSystemProviderError("Not allowed",E.FileSystemProviderErrorCode.NoPermissions)}delete(){throw new E.FileSystemProviderError("Not allowed",E.FileSystemProviderErrorCode.NoPermissions)}rename(){throw new E.FileSystemProviderError("Not allowed",E.FileSystemProviderErrorCode.NoPermissions)}open(u,i){const{session:f,memoryReference:c,offset:l}=this.parseUri(u),s=this.memoryFdCounter++;let d=f.getMemory(c);return l&&(d=new C(d,l)),this.fdMemory.set(s,{session:f,region:d}),Promise.resolve(s)}close(u){return this.fdMemory.get(u)?.region.dispose(),this.fdMemory.delete(u),Promise.resolve()}async writeFile(u,i){const{offset:f}=this.parseUri(u);if(!f)throw new E.FileSystemProviderError("Range must be present to read a file",E.FileSystemProviderErrorCode.FileNotFound);const c=await this.open(u,{create:!1});try{await this.write(c,f.fromOffset,i,0,i.length)}finally{this.close(c)}}async readFile(u){const{offset:i}=this.parseUri(u);if(!i)throw new E.FileSystemProviderError("Range must be present to read a file",E.FileSystemProviderErrorCode.FileNotFound);const f=new Uint8Array(i.toOffset-i.fromOffset),c=await this.open(u,{create:!1});try{return await this.read(c,i.fromOffset,f,0,f.length),f}finally{this.close(c)}}async read(u,i,f,c,l){const s=this.fdMemory.get(u);if(!s)throw new E.FileSystemProviderError("No file with that descriptor open",E.FileSystemProviderErrorCode.Unavailable);const d=await s.region.read(i,l);let n=0;for(const a of d)switch(a.type){case 1:return n;case 2:if(n>0)return n;throw new E.FileSystemProviderError(a.error,E.FileSystemProviderErrorCode.Unknown);case 0:{const o=Math.max(0,i-a.offset),g=a.data.slice(o,Math.min(a.data.byteLength,o+(l-n)));f.set(g.buffer,c+n),n+=g.byteLength;break}default:(0,k.assertNever)(a)}return n}write(u,i,f,c,l){const s=this.fdMemory.get(u);if(!s)throw new E.FileSystemProviderError("No file with that descriptor open",E.FileSystemProviderErrorCode.Unavailable);return s.region.write(i,t.VSBuffer.wrap(f).slice(c,c+l))}parseUri(u){if(u.scheme!==I.DEBUG_MEMORY_SCHEME)throw new E.FileSystemProviderError(`Cannot open file with scheme ${u.scheme}`,E.FileSystemProviderErrorCode.FileNotFound);const i=this.debugService.getModel().getSession(u.authority);if(!i)throw new E.FileSystemProviderError("Debug session not found",E.FileSystemProviderErrorCode.FileNotFound);let f;const c=b.exec(u.query);c&&(f={fromOffset:Number(c[1]),toOffset:Number(c[2])});const[,l]=u.path.split("/");return{session:i,offset:f,readOnly:!i.capabilities.supportsWriteMemoryRequest,sessionId:u.authority,memoryReference:decodeURIComponent(l)}}}e.DebugMemoryFileSystemProvider=S;class C extends R.Disposable{constructor(u,i){super(),this.parent=u,this.range=i,this.invalidateEmitter=new p.Emitter,this.onDidInvalidate=this.invalidateEmitter.event,this.width=this.range.toOffset-this.range.fromOffset,this.writable=u.writable,this._register(u),this._register(u.onDidInvalidate(f=>{const c=(0,A.clamp)(f.fromOffset-i.fromOffset,0,this.width),l=(0,A.clamp)(f.toOffset-i.fromOffset,0,this.width);l>c&&this.invalidateEmitter.fire({fromOffset:c,toOffset:l})}))}read(u,i){if(u<0)throw new RangeError(`Invalid fromOffset: ${u}`);return this.parent.read(this.range.fromOffset+u,this.range.fromOffset+Math.min(i,this.width))}write(u,i){return this.parent.write(this.range.fromOffset+u,i)}}}),define(ae[2301],le([1,0,6,87,66,2,45]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugProgressContribution=void 0;let E=class{constructor(b,S,C){this.toDispose=[];let r;const u=i=>{r&&(r.dispose(),r=void 0),i&&(r=i.onDidProgressStart(async f=>{const c=new Promise(s=>{const d=t.Event.any(t.Event.filter(i.onDidProgressEnd,n=>n.body.progressId===f.body.progressId),i.onDidEndAdapter)(()=>{d.dispose(),s()})});C.isViewContainerVisible(p.VIEWLET_ID)&&S.withProgress({location:p.VIEWLET_ID},()=>c);const l=b.getAdapterManager().getDebuggerLabel(i.configuration.type);S.withProgress({location:15,title:f.body.title,cancellable:f.body.cancellable,silent:!0,source:l,delay:500},s=>{let d=0;const n=o=>{let g;typeof o.percentage=="number"&&(g=o.percentage-d,d+=g),s.report({message:o.message,increment:g,total:typeof g=="number"?100:void 0})};f.body.message&&n(f.body);const a=i.onDidProgressUpdate(o=>{o.body.progressId===f.body.progressId&&n(o.body)});return c.then(()=>a.dispose())},()=>i.cancel(f.body.progressId))}))};this.toDispose.push(b.getViewModel().onDidFocusSession(u)),u(b.getViewModel().focusedSession),this.toDispose.push(b.onWillNewSession(i=>{r||u(i)}))}dispose(){(0,A.dispose)(this.toDispose)}};E=we([F(0,p.IDebugService),F(1,R.IProgressService),F(2,k.IViewsService)],E),e.DebugProgressContribution=E}),define(ae[2302],le([1,0,1609,96,2,87,48,45,31]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showDebugSessionMenu=void 0;async function b(u,i){const f=u.get(k.IQuickInputService),c=u.get(A.IDebugService),l=u.get(E.IViewsService),s=u.get(I.ICommandService),d=new R.DisposableStore,n=f.createQuickPick();d.add(n),n.matchOnLabel=n.matchOnDescription=n.matchOnDetail=n.sortByLabel=!1,n.placeholder=t.localize(0,null);const a=S(n.value,i,c,l,s);n.items=a.picks,n.activeItems=a.activeItems,d.add(n.onDidChangeValue(async()=>{n.items=S(n.value,i,c,l,s).picks})),d.add(n.onDidAccept(()=>{n.selectedItems[0].accept(),n.hide(),d.dispose()})),n.show()}e.showDebugSessionMenu=b;function S(u,i,f,c,l){const s=[],d=[],n=f.getViewModel().focusedSession,a=f.getModel().getSessions(!1),o=[];a.forEach(h=>{h.compact&&h.parentSession&&d.push(h.parentSession)}),a.forEach(h=>{const v=d.includes(h);if(h.parentSession||s.push({type:"separator",label:v?h.name:void 0}),!v){const m=r(h,u,f,c,l);m&&(s.push(m),h.getId()===n?.getId()&&o.push(m))}}),s.length&&s.push({type:"separator"});const g=t.localize(1,null);return s.push({label:`$(plus) ${g}`,ariaLabel:g,accept:()=>l.executeCommand(i)}),{picks:s,activeItems:o}}function C(u){const i=u.configuration.name.length?u.configuration.name:u.name,f=u.compact?void 0:u.parentSession?.configuration.name;let c="",l="";return f&&(l=t.localize(2,null,i,f),c=f),{label:i,description:c,ariaLabel:l}}function r(u,i,f,c,l){const s=C(u),d=(0,p.matchesFuzzy)(i,s.label,!0);if(d)return{label:s.label,description:s.description,ariaLabel:s.ariaLabel,highlights:{label:d},accept:()=>{f.focusStackFrame(void 0,void 0,u,{explicit:!0}),c.isViewVisible(A.REPL_VIEW_ID)||c.openView(A.REPL_VIEW_ID,!0)}}}}),define(ae[2303],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugCompoundRoot=void 0;class p{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=p}),define(ae[2304],le([1,0,27]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugTelemetry=void 0;let p=class{constructor(A,k){this.model=A,this.telemetryService=k}logDebugSessionStart(A,k){const E=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:E.identifier.value,isBuiltin:E.isBuiltin,launchJsonExists:k})}logDebugSessionStop(A,k){const E=this.model.getBreakpoints();return this.telemetryService.publicLog("debugSessionStop",{type:A&&A.configuration.type,success:k.emittedStopped||E.length===0,sessionLengthInSeconds:k.sessionLengthInSeconds,breakpointCount:E.length,watchExpressionsCount:this.model.getWatchExpressions().length})}};p=we([F(1,t.ITelemetryService)],p),e.DebugTelemetry=p}),define(ae[246],le([1,0,28,9,53,52,22]),function(J,e,t,p,R,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 E=/{([^}]+)}/g;function I(h,v,m){return h.replace(E,function(w,D){return v&&D.length>0&&D[0]!=="_"?w:m&&m.hasOwnProperty(D)?m[D]:w})}e.formatPII=I;function b(h){const v={};for(const m of Object.keys(h))m.startsWith("!")||(v[m]=h[m]);return v}e.filterExceptionsFromTelemetry=b;function S(h){return h.configuration.request==="attach"&&!C(h)&&(!h.parentSession||S(h.parentSession))}e.isSessionAttach=S;function C(h){let v=h.configuration.type;if(!!v)return v==="vslsShare"&&(v=h.configuration.adapterProxy.configuration.type),(0,t.equalsIgnoreCase)(v,"extensionhost")||(0,t.equalsIgnoreCase)(v,"pwa-extensionhost")?h:h.parentSession?C(h.parentSession):void 0}e.getExtensionHostDebugSession=C;function r(h){return h.type&&(h.label||h.program||h.runtime)}e.isDebuggerMainContribution=r;function u(h,v,m){let w,D=0;const y=/([^()\[\]{}<>\s+\-/%~#^;=|,`!]|\->)+/g;let T=null;for(;T=y.exec(h);){const _=T.index+1,L=_+T[0].length;if(_<=v&&L>=m){w=T[0],D=_;break}}if(w){const _=/\w+/g;let L=null;for(;(L=_.exec(w))&&!(L.index+1+D+L[0].length>=m););L&&(w=w.substring(0,_.lastIndex))}return w?{start:D,end:D+w.length-1}:{start:0,end:0}}e.getExactExpressionStartAndEnd=u;const i=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;function f(h){return!!(h&&h.match(i))}e.isUri=f;function c(h){if(typeof h.path=="string"&&!(typeof h.sourceReference=="number"&&h.sourceReference>0)){if(f(h.path))return p.URI.parse(h.path);if((0,R.isAbsolute)(h.path))return p.URI.file(h.path)}return h.path}function l(h){if(typeof h.path=="object"){const v=p.URI.revive(h.path);if(v)return v.scheme===k.Schemas.file?v.fsPath:v.toString()}return h.path}function s(h,v){const m=v?c:l,w=(0,A.deepClone)(h);return n(w,(D,y)=>{D&&y&&(y.path=m(y))}),w}e.convertToDAPaths=s;function d(h,v){const m=v?c:l,w=(0,A.deepClone)(h);return n(w,(D,y)=>{!D&&y&&(y.path=m(y))}),w}e.convertToVSCPaths=d;function n(h,v){switch(h.type){case"event":{const m=h;switch(m.event){case"output":v(!1,m.body.source);break;case"loadedSource":v(!1,m.body.source);break;case"breakpoint":v(!1,m.body.breakpoint.source);break;default:break}break}case"request":{const m=h;switch(m.command){case"setBreakpoints":v(!0,m.arguments.source);break;case"breakpointLocations":v(!0,m.arguments.source);break;case"source":v(!0,m.arguments.source);break;case"gotoTargets":v(!0,m.arguments.source);break;case"launchVSCode":m.arguments.args.forEach(w=>v(!1,w));break;default:break}break}case"response":{const m=h;if(m.success&&m.body)switch(m.command){case"stackTrace":m.body.stackFrames.forEach(w=>v(!1,w.source));break;case"loadedSources":m.body.sources.forEach(w=>v(!1,w));break;case"scopes":m.body.scopes.forEach(w=>v(!1,w.source));break;case"setFunctionBreakpoints":m.body.breakpoints.forEach(w=>v(!1,w.source));break;case"setBreakpoints":m.body.breakpoints.forEach(w=>v(!1,w.source));break;case"disassemble":m.body?.instructions.forEach(D=>v(!1,D.location));break;default:break}break}}}function a(h){return h.filter(v=>!v.presentation?.hidden).sort((v,m)=>v.presentation?m.presentation?v.presentation.group?m.presentation.group?v.presentation.group!==m.presentation.group?v.presentation.group.localeCompare(m.presentation.group):o(v.presentation.order,m.presentation.order):-1:m.presentation.group?1:o(v.presentation.order,m.presentation.order):-1:m.presentation?1:0)}e.getVisibleAndSorted=a;function o(h,v){return typeof h!="number"?typeof v!="number"?0:1:typeof v!="number"?-1:h-v}async function g(h,v){const m=h.getValue("debug.saveBeforeStart",{overrideIdentifier:v.activeTextEditorLanguageId});if(m!=="none"&&(await v.saveAll(),m==="allEditorsInActiveGroup")){const w=v.activeEditorPane;w&&w.input.resource?.scheme===k.Schemas.untitled&&await v.save({editor:w.input,groupId:w.group.id})}await h.reloadConfiguration()}e.saveAllBeforeDebugStart=g}),define(ae[2305],le([1,0,1618,6,52,36,21,117,246,427,9,41,2,26,47,22]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RawDebugSession=void 0;let c=class{constructor(s,d,n,a,o,g,h,v){this.dbgr=d,this.sessionId=n,this.name=a,this.extensionHostDebugService=o,this.openerService=g,this.notificationService=h,this.dialogSerivce=v,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 p.Emitter,this._onDidStop=new p.Emitter,this._onDidContinued=new p.Emitter,this._onDidTerminateDebugee=new p.Emitter,this._onDidExitDebugee=new p.Emitter,this._onDidThread=new p.Emitter,this._onDidOutput=new p.Emitter,this._onDidBreakpoint=new p.Emitter,this._onDidLoadedSource=new p.Emitter,this._onDidProgressStart=new p.Emitter,this._onDidProgressUpdate=new p.Emitter,this._onDidProgressEnd=new p.Emitter,this._onDidInvalidated=new p.Emitter,this._onDidInvalidateMemory=new p.Emitter,this._onDidCustomEvent=new p.Emitter,this._onDidEvent=new p.Emitter,this._onDidExitAdapter=new p.Emitter,this.toDispose=[],this.debugAdapter=s,this._capabilities=Object.create(null),this.toDispose.push(this.debugAdapter.onError(m=>{this.shutdown(m)})),this.toDispose.push(this.debugAdapter.onExit(m=>{m!==0?this.shutdown(new Error(`exit code: ${m}`)):this.shutdown()})),this.debugAdapter.onEvent(m=>{switch(m.event){case"initialized":this._readyForBreakpoints=!0,this._onDidInitialize.fire(m);break;case"loadedSource":this._onDidLoadedSource.fire(m);break;case"capabilities":if(m.body){const w=m.body.capabilities;this.mergeCapabilities(w)}break;case"stopped":this.didReceiveStoppedEvent=!0,this._onDidStop.fire(m);break;case"continued":this.allThreadsContinued=m.body.allThreadsContinued!==!1,this._onDidContinued.fire(m);break;case"thread":this._onDidThread.fire(m);break;case"output":this._onDidOutput.fire(m);break;case"breakpoint":this._onDidBreakpoint.fire(m);break;case"terminated":this._onDidTerminateDebugee.fire(m);break;case"exit":this._onDidExitDebugee.fire(m);break;case"progressStart":this._onDidProgressStart.fire(m);break;case"progressUpdate":this._onDidProgressUpdate.fire(m);break;case"progressEnd":this._onDidProgressEnd.fire(m);break;case"invalidated":this._onDidInvalidated.fire(m);break;case"memory":this._onDidInvalidateMemory.fire(m);break;case"process":break;case"module":break;default:this._onDidCustomEvent.fire(m);break}this._onDidEvent.fire(m)}),this.debugAdapter.onRequest(m=>this.dispatchRequest(m))}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(s){const d=await this.send("initialize",s,void 0,void 0,!1);return d&&this.mergeCapabilities(d.body),d}disconnect(s){const d=this.capabilities.supportTerminateDebuggee?s.terminateDebuggee:void 0,n=this.capabilities.supportTerminateDebuggee&&this.capabilities.supportSuspendDebuggee?s.suspendDebuggee:void 0;return this.shutdown(void 0,s.restart,d,n)}async launchOrAttach(s){const d=await this.send(s.request,s,void 0,void 0,!1);return d&&this.mergeCapabilities(d.body),d}terminate(s=!1){return this.capabilities.supportsTerminateRequest?this.terminated?this.disconnect({terminateDebuggee:!0,restart:s}):(this.terminated=!0,this.send("terminate",{restart:s},void 0,2e3)):Promise.reject(new Error("terminated not supported"))}restart(s){return this.capabilities.supportsRestartRequest?this.send("restart",s):Promise.reject(new Error("restart not supported"))}async next(s){const d=await this.send("next",s);return this.fireSimulatedContinuedEvent(s.threadId),d}async stepIn(s){const d=await this.send("stepIn",s);return this.fireSimulatedContinuedEvent(s.threadId),d}async stepOut(s){const d=await this.send("stepOut",s);return this.fireSimulatedContinuedEvent(s.threadId),d}async continue(s){const d=await this.send("continue",s);return d&&d.body&&d.body.allThreadsContinued!==void 0&&(this.allThreadsContinued=d.body.allThreadsContinued),this.fireSimulatedContinuedEvent(s.threadId,this.allThreadsContinued),d}pause(s){return this.send("pause",s)}terminateThreads(s){return this.capabilities.supportsTerminateThreadsRequest?this.send("terminateThreads",s):Promise.reject(new Error("terminateThreads not supported"))}setVariable(s){return this.capabilities.supportsSetVariable?this.send("setVariable",s):Promise.reject(new Error("setVariable not supported"))}setExpression(s){return this.capabilities.supportsSetExpression?this.send("setExpression",s):Promise.reject(new Error("setExpression not supported"))}async restartFrame(s,d){if(this.capabilities.supportsRestartFrame){const n=await this.send("restartFrame",s);return this.fireSimulatedContinuedEvent(d),n}return Promise.reject(new Error("restartFrame not supported"))}stepInTargets(s){return this.capabilities.supportsStepInTargetsRequest?this.send("stepInTargets",s):Promise.reject(new Error("stepInTargets not supported"))}completions(s,d){return this.capabilities.supportsCompletionsRequest?this.send("completions",s,d):Promise.reject(new Error("completions not supported"))}setBreakpoints(s){return this.send("setBreakpoints",s)}setFunctionBreakpoints(s){return this.capabilities.supportsFunctionBreakpoints?this.send("setFunctionBreakpoints",s):Promise.reject(new Error("setFunctionBreakpoints not supported"))}dataBreakpointInfo(s){return this.capabilities.supportsDataBreakpoints?this.send("dataBreakpointInfo",s):Promise.reject(new Error("dataBreakpointInfo not supported"))}setDataBreakpoints(s){return this.capabilities.supportsDataBreakpoints?this.send("setDataBreakpoints",s):Promise.reject(new Error("setDataBreakpoints not supported"))}setExceptionBreakpoints(s){return this.send("setExceptionBreakpoints",s)}breakpointLocations(s){return this.capabilities.supportsBreakpointLocationsRequest?this.send("breakpointLocations",s):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(s,d){return this.send("stackTrace",s,d)}exceptionInfo(s){return this.capabilities.supportsExceptionInfoRequest?this.send("exceptionInfo",s):Promise.reject(new Error("exceptionInfo not supported"))}scopes(s,d){return this.send("scopes",s,d)}variables(s,d){return this.send("variables",s,d)}source(s){return this.send("source",s)}loadedSources(s){return this.capabilities.supportsLoadedSourcesRequest?this.send("loadedSources",s):Promise.reject(new Error("loadedSources not supported"))}threads(){return this.send("threads",null)}evaluate(s){return this.send("evaluate",s)}async stepBack(s){if(this.capabilities.supportsStepBack){const d=await this.send("stepBack",s);return this.fireSimulatedContinuedEvent(s.threadId),d}return Promise.reject(new Error("stepBack not supported"))}async reverseContinue(s){if(this.capabilities.supportsStepBack){const d=await this.send("reverseContinue",s);return this.fireSimulatedContinuedEvent(s.threadId),d}return Promise.reject(new Error("reverseContinue not supported"))}gotoTargets(s){return this.capabilities.supportsGotoTargetsRequest?this.send("gotoTargets",s):Promise.reject(new Error("gotoTargets is not supported"))}async goto(s){if(this.capabilities.supportsGotoTargetsRequest){const d=await this.send("goto",s);return this.fireSimulatedContinuedEvent(s.threadId),d}return Promise.reject(new Error("goto is not supported"))}async setInstructionBreakpoints(s){return this.capabilities.supportsInstructionBreakpoints?await this.send("setInstructionBreakpoints",s):Promise.reject(new Error("setInstructionBreakpoints is not supported"))}async disassemble(s){return this.capabilities.supportsDisassembleRequest?await this.send("disassemble",s):Promise.reject(new Error("disassemble is not supported"))}async readMemory(s){return this.capabilities.supportsReadMemoryRequest?await this.send("readMemory",s):Promise.reject(new Error("readMemory is not supported"))}async writeMemory(s){return this.capabilities.supportsWriteMemoryRequest?await this.send("writeMemory",s):Promise.reject(new Error("writeMemory is not supported"))}cancel(s){return this.send("cancel",s)}custom(s,d){return this.send(s,d)}async shutdown(s,d=!1,n=void 0,a=void 0){if(!this.inShutdown)if(this.inShutdown=!0,this.debugAdapter)try{const o={restart:d};typeof n=="boolean"&&(o.terminateDebuggee=n),typeof a=="boolean"&&(o.suspendDebuggee=a),this.send("disconnect",o,void 0,2e3)}catch{}finally{this.stopAdapter(s)}else return this.stopAdapter(s)}async stopAdapter(s){try{if(this.debugAdapter){const d=this.debugAdapter;this.debugAdapter=null,await d.stopSession(),this.debugAdapterStopped=!0}}finally{this.fireAdapterExitEvent(s)}}fireAdapterExitEvent(s){if(!this.firedAdapterExitEvent){this.firedAdapterExitEvent=!0;const d={emittedStopped:this.didReceiveStoppedEvent,sessionLengthInSeconds:(new Date().getTime()-this.startTime)/1e3};s&&!this.debugAdapterStopped&&(d.error=s),this._onDidExitAdapter.fire(d)}}async dispatchRequest(s){const d={type:"response",seq:0,command:s.command,request_seq:s.seq,success:!0},n=a=>this.debugAdapter&&this.debugAdapter.sendResponse(a);switch(s.command){case"launchVSCode":try{let a=await this.launchVsCode(s.arguments);a.success||((await this.dialogSerivce.show(u.Severity.Warning,t.localize(1,null),[t.localize(2,null),t.localize(3,null)],{cancelId:1})).choice===0?a=await this.launchVsCode(s.arguments):(d.success=!1,n(d),await this.shutdown())),d.body={rendererDebugPort:a.rendererDebugPort},n(d)}catch(a){d.success=!1,d.message=a.message,n(d)}break;case"runInTerminal":try{const a=await this.dbgr.runInTerminal(s.arguments,this.sessionId),o=d;o.body={},typeof a=="number"&&(o.body.shellProcessId=a),n(o)}catch(a){d.success=!1,d.message=a.message,n(d)}break;case"startDebugging":try{const a=s.arguments,o={...a.configuration,request:a.request,type:this.dbgr.type,name:this.name};await this.dbgr.startDebugging(o,this.sessionId)||(d.success=!1,d.message="Failed to start debugging",n(d))}catch(a){d.success=!1,d.message=a.message,n(d)}default:d.success=!1,d.message=`unknown request '${s.command}'`,n(d);break}}launchVsCode(s){const d=[];for(const n of s.args){const a=(n.prefix||"")+(n.path||""),o=/^--(.+)=(.+)$/.exec(a);if(o&&o.length===3){const g=o[1];let h=o[2];(g==="file-uri"||g==="folder-uri")&&!(0,I.isUri)(n.path)&&(h=(0,I.isUri)(h)?h:S.URI.file(h).toString()),d.push(`--${g}=${h}`)}else d.push(a)}return s.env&&d.push(`--extensionEnvironment=${JSON.stringify(s.env)}`),this.extensionHostDebugService.openExtensionDevelopmentHostWindow(d,!!s.debugRenderer)}send(s,d,n,a,o=!0){return new Promise((g,h)=>{if(!this.debugAdapter){this.inShutdown?g(void 0):h(new Error(t.localize(4,null,s)));return}let v;const m=this.debugAdapter.sendRequest(s,d,w=>{v?.dispose(),w.success?g(w):h(w)},a);n&&(v=n.onCancellationRequested(()=>{v.dispose(),this.capabilities.supportsCancelRequest&&this.cancel({requestId:m})}))}).then(void 0,g=>Promise.reject(this.handleErrorResponse(g,o)))}handleErrorResponse(s,d){if(s.command==="canceled"&&s.message==="canceled")return new k.CancellationError;const n=s?.body?.error,a=s?.message||"",o=n?(0,I.formatPII)(n.format,!1,n.variables):a,g=n?.url;if(n&&g){const v=n.urlLabel?n.urlLabel:t.localize(5,null),m=S.URI.parse(g),w=m.scheme===f.Schemas.command?"debug.moreInfo.command":"debug.moreInfo";return(0,E.createErrorWithActions)(o,[(0,A.toAction)({id:w,label:v,run:()=>this.openerService.open(m,{allowCommands:!0})})])}d&&n&&n.format&&n.showUser&&this.notificationService.error(o);const h=new k.ErrorNoTelemetry(o);return h.showUser=n?.showUser,h}mergeCapabilities(s){s&&(this._capabilities=R.mixin(this._capabilities,s))}fireSimulatedContinuedEvent(s,d=!1){this._onDidContinued.fire({type:"event",event:"continued",body:{threadId:s,allThreadsContinued:d},seq:void 0})}dispose(){(0,r.dispose)(this.toDispose)}};c=we([F(4,b.IExtensionHostDebugService),F(5,C.IOpenerService),F(6,u.INotificationService),F(7,i.IDialogService)],c),e.RawDebugSession=c}),define(ae[2306],le([1,0,6,87,246]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;class A{constructor(E){this.contextKeyService=E,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,E.bufferChangeEvents(()=>{this.expressionSelectedContextKey=p.CONTEXT_EXPRESSION_SELECTED.bindTo(E),this.loadedScriptsSupportedContextKey=p.CONTEXT_LOADED_SCRIPTS_SUPPORTED.bindTo(E),this.stepBackSupportedContextKey=p.CONTEXT_STEP_BACK_SUPPORTED.bindTo(E),this.focusedSessionIsAttach=p.CONTEXT_FOCUSED_SESSION_IS_ATTACH.bindTo(E),this.restartFrameSupportedContextKey=p.CONTEXT_RESTART_FRAME_SUPPORTED.bindTo(E),this.stepIntoTargetsSupported=p.CONTEXT_STEP_INTO_TARGETS_SUPPORTED.bindTo(E),this.jumpToCursorSupported=p.CONTEXT_JUMP_TO_CURSOR_SUPPORTED.bindTo(E),this.setVariableSupported=p.CONTEXT_SET_VARIABLE_SUPPORTED.bindTo(E),this.setExpressionSupported=p.CONTEXT_SET_EXPRESSION_SUPPORTED.bindTo(E),this.multiSessionDebug=p.CONTEXT_MULTI_SESSION_DEBUG.bindTo(E),this.terminateDebuggeeSupported=p.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED.bindTo(E),this.suspendDebuggeeSupported=p.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED.bindTo(E),this.disassembleRequestSupported=p.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED.bindTo(E),this.focusedStackFrameHasInstructionPointerReference=p.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE.bindTo(E)})}getId(){return"root"}get focusedSession(){return this._focusedSession}get focusedThread(){return this._focusedThread}get focusedStackFrame(){return this._focusedStackFrame}setFocus(E,I,b,S){const C=this._focusedStackFrame!==E,r=this._focusedSession!==b;this._focusedStackFrame=E,this._focusedThread=I,this._focusedSession=b,this.contextKeyService.bufferChangeEvents(()=>{this.loadedScriptsSupportedContextKey.set(b?!!b.capabilities.supportsLoadedSourcesRequest:!1),this.stepBackSupportedContextKey.set(b?!!b.capabilities.supportsStepBack:!1),this.restartFrameSupportedContextKey.set(b?!!b.capabilities.supportsRestartFrame:!1),this.stepIntoTargetsSupported.set(b?!!b.capabilities.supportsStepInTargetsRequest:!1),this.jumpToCursorSupported.set(b?!!b.capabilities.supportsGotoTargetsRequest:!1),this.setVariableSupported.set(b?!!b.capabilities.supportsSetVariable:!1),this.setExpressionSupported.set(b?!!b.capabilities.supportsSetExpression:!1),this.terminateDebuggeeSupported.set(b?!!b.capabilities.supportTerminateDebuggee:!1),this.suspendDebuggeeSupported.set(b?!!b.capabilities.supportSuspendDebuggee:!1),this.disassembleRequestSupported.set(!!b?.capabilities.supportsDisassembleRequest),this.focusedStackFrameHasInstructionPointerReference.set(!!E?.instructionPointerReference);const u=!!b&&(0,R.isSessionAttach)(b);this.focusedSessionIsAttach.set(u)}),r&&this._onDidFocusSession.fire(b),C&&this._onDidFocusStackFrame.fire({stackFrame:E,explicit:S})}get onDidFocusSession(){return this._onDidFocusSession.event}get onDidFocusStackFrame(){return this._onDidFocusStackFrame.event}getSelectedExpression(){return this.selectedExpression}setSelectedExpression(E,I){this.selectedExpression=E?{expression:E,settingWatch:I}:void 0,this.expressionSelectedContextKey.set(!!E),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(E){this.multiSessionDebug.set(E)}async evaluateLazyExpression(E){await E.evaluateLazy(),this._onDidEvaluateLazyExpression.fire(E)}}e.ViewModel=A}),define(ae[443],le([1,0,186,1633]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisassemblyViewInput=void 0;class R extends t.EditorInput{constructor(){super(...arguments),this.resource=void 0}get typeId(){return R.ID}static get instance(){return(!R._instance||R._instance.isDisposed())&&(R._instance=new R),R._instance}getName(){return(0,p.localize)(0,null)}matches(k){return k instanceof R}}e.DisassemblyViewInput=R,R.ID="debug.disassemblyView.input"}),define(ae[2307],le([1,0,427,102,2079]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerMainProcessRemoteService)(t.IExtensionHostDebugService,R.ExtensionHostDebugBroadcastChannel.ChannelName,{channelClientCtor:R.ExtensionHostDebugChannelClient})}),define(ae[522],le([1,0,56,29,1640,7,5,63]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeEditSessionFileContent=e.EDIT_SESSIONS_SCHEME=e.EDIT_SESSIONS_SHOW_VIEW=e.EDIT_SESSIONS_VIEW_ICON=e.EDIT_SESSIONS_TITLE=e.EDIT_SESSIONS_DATA_VIEW_ID=e.EDIT_SESSIONS_CONTAINER_ID=e.EDIT_SESSIONS_SIGNED_IN=e.EDIT_SESSIONS_SIGNED_IN_KEY=e.EditSessionSchemaVersion=e.FileType=e.ChangeType=e.IEditSessionsLogService=e.IEditSessionsStorageService=e.EDIT_SESSION_SYNC_CATEGORY=void 0,e.EDIT_SESSION_SYNC_CATEGORY={original:"Edit Sessions",value:(0,R.localize)(0,null)},e.IEditSessionsStorageService=(0,k.createDecorator)("IEditSessionsStorageService"),e.IEditSessionsLogService=(0,k.createDecorator)("IEditSessionsLogService");var I;(function(C){C[C.Addition=1]="Addition",C[C.Deletion=2]="Deletion"})(I=e.ChangeType||(e.ChangeType={}));var b;(function(C){C[C.File=1]="File"})(b=e.FileType||(e.FileType={})),e.EditSessionSchemaVersion=2,e.EDIT_SESSIONS_SIGNED_IN_KEY="editSessionsSignedIn",e.EDIT_SESSIONS_SIGNED_IN=new A.RawContextKey(e.EDIT_SESSIONS_SIGNED_IN_KEY,!1),e.EDIT_SESSIONS_CONTAINER_ID="workbench.view.editSessions",e.EDIT_SESSIONS_DATA_VIEW_ID="workbench.views.editSessions.data",e.EDIT_SESSIONS_TITLE=(0,R.localize)(1,null),e.EDIT_SESSIONS_VIEW_ICON=(0,E.registerIcon)("edit-sessions-view-icon",p.Codicon.cloudDownload,(0,R.localize)(2,null)),e.EDIT_SESSIONS_SHOW_VIEW=new A.RawContextKey("editSessionsShowView",!1),e.EDIT_SESSIONS_SCHEME="vscode-edit-sessions";function S(C,r){switch(C){case 1:return t.VSBuffer.fromString(r);case 2:return(0,t.decodeBase64)(r);default:throw new Error("Upgrade to a newer version to decode this content.")}}e.decodeEditSessionFileContent=S}),define(ae[2308],le([1,0,2,6,19,522,21]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsFileSystemProvider=void 0;let E=class{constructor(b){this.editSessionsStorageService=b,this.capabilities=2048+2,this.onDidChangeCapabilities=p.Event.None,this.onDidChangeFile=p.Event.None}async readFile(b){const S=/(?<ref>[^/]+)\/(?<folderName>[^/]+)\/(?<filePath>.*)/.exec(b.path.substring(1));if(!S?.groups)throw R.FileSystemProviderErrorCode.FileNotFound;const{ref:C,folderName:r,filePath:u}=S.groups,i=await this.editSessionsStorageService.read(C);if(!i)throw R.FileSystemProviderErrorCode.FileNotFound;const f=i?.editSession.folders.find(c=>c.name===r)?.workingChanges.find(c=>c.relativeFilePath===u);if(!f||f.type===A.ChangeType.Deletion)throw R.FileSystemProviderErrorCode.FileNotFound;return(0,A.decodeEditSessionFileContent)(i.editSession.version,f.contents).buffer}async stat(b){const S=await this.readFile(b),C=Date.now();return{type:R.FileType.File,permissions:R.FilePermission.Readonly,mtime:C,ctime:C,size:S.byteLength}}watch(b,S){return t.Disposable.None}async mkdir(b){}async readdir(b){return[]}async rename(b,S,C){}async delete(b,S){}async writeFile(){throw new k.NotSupportedError}};E.SCHEMA=A.EDIT_SESSIONS_SCHEME,E=we([F(0,A.IEditSessionsStorageService)],E),e.EditSessionsFileSystemProvider=E}),define(ae[2309],le([1,0,81,25]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsLogService=void 0;let R=class extends p.AbstractLogger{constructor(k,E){super(),this.logger=this._register(k.createLogger(E.editSessionsLogResource,{name:"editsessions"}))}trace(k,...E){this.logger.trace(k,...E)}debug(k,...E){this.logger.debug(k,...E)}info(k,...E){this.logger.info(k,...E)}warn(k,...E){this.logger.warn(k,...E)}error(k,...E){this.logger.error(k,...E)}critical(k,...E){this.logger.critical(k,...E)}flush(){this.logger.flush()}};R=we([F(0,p.ILoggerService),F(1,t.IEnvironmentService)],R),e.EditSessionsLogService=R}),define(ae[285],le([1,0,2]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendations=void 0;class p 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=p}),define(ae[2310],le([1,0,82,285,1644,34,6]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigBasedRecommendations=void 0;let E=class extends p.ExtensionRecommendations{get otherRecommendations(){return this._otherRecommendations}get importantRecommendations(){return this._importantRecommendations}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}constructor(b,S){super(),this.extensionTipsService=b,this.workspaceContextService=S,this.importantTips=[],this.otherTips=[],this._onDidChangeRecommendations=this._register(new k.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._otherRecommendations=[],this._importantRecommendations=[]}async doActivate(){await this.fetch(),this._register(this.workspaceContextService.onDidChangeWorkspaceFolders(b=>this.onWorkspaceFoldersChanged(b)))}async fetch(){const b=this.workspaceContextService.getWorkspace(),S=new Map,C=new Map;for(const r of b.folders){const u=await this.extensionTipsService.getConfigBasedTips(r.uri);for(const i of u)i.important?S.set(i.extensionId,i):C.set(i.extensionId,i)}this.importantTips=[...S.values()],this.otherTips=[...C.values()].filter(r=>!S.has(r.extensionId)),this._otherRecommendations=this.otherTips.map(r=>this.toExtensionRecommendation(r)),this._importantRecommendations=this.importantTips.map(r=>this.toExtensionRecommendation(r))}async onWorkspaceFoldersChanged(b){if(b.added.length){const S=this.importantTips;await this.fetch(),this.importantTips.some(C=>S.every(r=>C.extensionId!==r.extensionId))&&this._onDidChangeRecommendations.fire()}}toExtensionRecommendation(b){return{extensionId:b.extensionId,reason:{reasonId:3,reasonText:(0,R.localize)(0,null)},whenNotInstalled:b.whenNotInstalled}}};E=we([F(0,t.IExtensionTipsService),F(1,A.IWorkspaceContextService)],E),e.ConfigBasedRecommendations=E}),define(ae[2311],le([1,0,82,285,1646]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExeBasedRecommendations=void 0;let A=class extends p.ExtensionRecommendations{get otherRecommendations(){return this._otherTips.map(E=>this.toExtensionRecommendation(E))}get importantRecommendations(){return this._importantTips.map(E=>this.toExtensionRecommendation(E))}get recommendations(){return[...this.importantRecommendations,...this.otherRecommendations]}constructor(E){super(),this.extensionTipsService=E,this._otherTips=[],this._importantTips=[]}getRecommendations(E){const I=this._importantTips.filter(S=>S.exeName.toLowerCase()===E.toLowerCase()).map(S=>this.toExtensionRecommendation(S)),b=this._otherTips.filter(S=>S.exeName.toLowerCase()===E.toLowerCase()).map(S=>this.toExtensionRecommendation(S));return{important:I,others:b}}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 E=new Map;return this._importantTips=await this.extensionTipsService.getImportantExecutableBasedTips(),this._importantTips.forEach(I=>E.set(I.extensionId.toLowerCase(),I)),E}toExtensionRecommendation(E){return{extensionId:E.extensionId.toLowerCase(),reason:{reasonId:2,reasonText:(0,R.localize)(0,null,E.exeFriendlyName)}}}};A=we([F(0,t.IExtensionTipsService)],A),e.ExeBasedRecommendations=A}),define(ae[2312],le([1,0,1652,123,2,82,20,61]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsCompletionItemsProvider=void 0;let I=class extends R.Disposable{constructor(S,C){super(),this.extensionManagementService=S,this._register(C.completionProvider.register({language:"jsonc",pattern:"**/settings.json"},{provideCompletionItems:async(r,u,i,f)=>{const c=(d,n)=>{const a=d.getWordAtPosition(n);return a?new k.Range(n.lineNumber,a.startColumn,n.lineNumber,a.endColumn):null},l=(0,p.getLocation)(r.getValue(),r.getOffsetAt(u)),s=c(r,u)??k.Range.fromPositions(u,u);if(l.path[0]==="extensions.supportUntrustedWorkspaces"&&l.path.length===2&&l.isAtPropertyKey){let d=[];try{d=Object.keys((0,p.parse)(r.getValue())["extensions.supportUntrustedWorkspaces"])}catch{}return{suggestions:await this.provideSupportUntrustedWorkspacesExtensionProposals(d,s)}}return{suggestions:[]}}}))}async provideSupportUntrustedWorkspacesExtensionProposals(S,C){const r=[],i=(await this.extensionManagementService.getInstalled()).filter(f=>f.manifest.main).filter(f=>S.indexOf(f.identifier.id)===-1);if(i.length)r.push(...i.map(f=>{const c=`"${f.identifier.id}": { "supported": true, "version": "${f.manifest.version}" },`;return{label:f.identifier.id,kind:13,insertText:c,filterText:c,range:C}}));else{const f=`"vscode.csharp": { "supported": true, "version": "0.0.0" },`;r.push({label:(0,t.localize)(0,null),kind:13,insertText:f,filterText:f,range:C})}return r}};I=we([F(0,A.IExtensionManagementService),F(1,E.ILanguageFeaturesService)],I),e.ExtensionsCompletionItemsProvider=I}),define(ae[338],le([1,0,29,1654,63]),function(J,e,t,p,R){"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.sponsorIcon=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,R.registerIcon)("extensions-view-icon",t.Codicon.extensions,(0,p.localize)(0,null)),e.manageExtensionIcon=(0,R.registerIcon)("extensions-manage",t.Codicon.gear,(0,p.localize)(1,null)),e.clearSearchResultsIcon=(0,R.registerIcon)("extensions-clear-search-results",t.Codicon.clearAll,(0,p.localize)(2,null)),e.refreshIcon=(0,R.registerIcon)("extensions-refresh",t.Codicon.refresh,(0,p.localize)(3,null)),e.filterIcon=(0,R.registerIcon)("extensions-filter",t.Codicon.filter,(0,p.localize)(4,null)),e.installLocalInRemoteIcon=(0,R.registerIcon)("extensions-install-local-in-remote",t.Codicon.cloudDownload,(0,p.localize)(5,null)),e.installWorkspaceRecommendedIcon=(0,R.registerIcon)("extensions-install-workspace-recommended",t.Codicon.cloudDownload,(0,p.localize)(6,null)),e.configureRecommendedIcon=(0,R.registerIcon)("extensions-configure-recommended",t.Codicon.pencil,(0,p.localize)(7,null)),e.syncEnabledIcon=(0,R.registerIcon)("extensions-sync-enabled",t.Codicon.sync,(0,p.localize)(8,null)),e.syncIgnoredIcon=(0,R.registerIcon)("extensions-sync-ignored",t.Codicon.syncIgnored,(0,p.localize)(9,null)),e.remoteIcon=(0,R.registerIcon)("extensions-remote",t.Codicon.remote,(0,p.localize)(10,null)),e.installCountIcon=(0,R.registerIcon)("extensions-install-count",t.Codicon.cloudDownload,(0,p.localize)(11,null)),e.ratingIcon=(0,R.registerIcon)("extensions-rating",t.Codicon.star,(0,p.localize)(12,null)),e.verifiedPublisherIcon=(0,R.registerIcon)("extensions-verified-publisher",t.Codicon.verifiedFilled,(0,p.localize)(13,null)),e.preReleaseIcon=(0,R.registerIcon)("extensions-pre-release",t.Codicon.versions,(0,p.localize)(14,null)),e.sponsorIcon=(0,R.registerIcon)("extensions-sponsor",t.Codicon.heartFilled,(0,p.localize)(15,null)),e.starFullIcon=(0,R.registerIcon)("extensions-star-full",t.Codicon.starFull,(0,p.localize)(16,null)),e.starHalfIcon=(0,R.registerIcon)("extensions-star-half",t.Codicon.starHalf,(0,p.localize)(17,null)),e.starEmptyIcon=(0,R.registerIcon)("extensions-star-empty",t.Codicon.starEmpty,(0,p.localize)(18,null)),e.errorIcon=(0,R.registerIcon)("extensions-error-message",t.Codicon.error,(0,p.localize)(19,null)),e.warningIcon=(0,R.registerIcon)("extensions-warning-message",t.Codicon.warning,(0,p.localize)(20,null)),e.infoIcon=(0,R.registerIcon)("extensions-info-message",t.Codicon.info,(0,p.localize)(21,null)),e.trustIcon=(0,R.registerIcon)("extension-workspace-trust",t.Codicon.shield,(0,p.localize)(22,null)),e.activationTimeIcon=(0,R.registerIcon)("extension-activation-time",t.Codicon.history,(0,p.localize)(23,null))}),define(ae[2313],le([1,0,285,46]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeymapRecommendations=void 0;let R=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(k){super(),this.productService=k,this._recommendations=[]}async doActivate(){this.productService.keymapExtensionTips&&(this._recommendations=this.productService.keymapExtensionTips.map(k=>({extensionId:k.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};R=we([F(0,p.IProductService)],R),e.KeymapRecommendations=R}),define(ae[2314],le([1,0,285,46]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageRecommendations=void 0;let R=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(k){super(),this.productService=k,this._recommendations=[]}async doActivate(){this.productService.languageExtensionTips&&(this._recommendations=this.productService.languageExtensionTips.map(k=>({extensionId:k.toLowerCase(),reason:{reasonId:6,reasonText:""}})))}};R=we([F(0,p.IProductService)],R),e.LanguageRecommendations=R}),define(ae[635],le([1,0,16,115]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Query=void 0;class R{constructor(k,E,I){this.value=k,this.sortBy=E,this.groupBy=I,this.value=k.trim()}static suggestions(k){const E=["installed","updates","enabled","disabled","builtin","featured","popular","recommended","recentlyPublished","workspaceUnsupported","deprecated","sort","category","tag","ext","id"],I={sort:["installs","rating","name","publishedDate","updateDate"],category:p.EXTENSION_CATEGORIES.map(r=>`"${r.toLowerCase()}"`),tag:[""],ext:[""],id:[""]},b=r=>k.indexOf(r)>-1,S=I.sort.some(r=>b(`@sort:${r}`)),C=I.category.some(r=>b(`@category:${r}`));return(0,t.flatten)(E.map(r=>S&&r==="sort"||C&&r==="category"?[]:r in I?I[r].map(u=>`@${r}:${u}${u===""?"":" "}`):b(`@${r}`)?[]:[`@${r} `]))}static parse(k){let E="";k=k.replace(/@sort:(\w+)(-\w*)?/g,(b,S,C)=>(E=S,""));let I="";return k=k.replace(/@group:(\w+)(-\w*)?/g,(b,S,C)=>(I=S,"")),new R(k,E,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=R}),define(ae[119],le([1,0,5,2,100,7]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INSTALL_ACTIONS_GROUP=e.THEME_ACTIONS_GROUP=e.CONTEXT_HAS_GALLERY=e.HasOutdatedExtensionsContext=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.OUTDATED_EXTENSIONS_VIEW_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(b){b[b.Installing=0]="Installing",b[b.Installed=1]="Installed",b[b.Uninstalling=2]="Uninstalling",b[b.Uninstalled=3]="Uninstalled"})(k=e.ExtensionState||(e.ExtensionState={})),e.SERVICE_ID="extensionsWorkbenchService",e.IExtensionsWorkbenchService=(0,t.createDecorator)(e.SERVICE_ID);var E;(function(b){b.Readme="readme",b.Contributions="contributions",b.Changelog="changelog",b.Dependencies="dependencies",b.ExtensionPack="extensionPack",b.RuntimeStatus="runtimeStatus"})(E=e.ExtensionEditorTab||(e.ExtensionEditorTab={})),e.ConfigurationKey="extensions",e.AutoUpdateConfigurationKey="extensions.autoUpdate",e.AutoCheckUpdatesConfigurationKey="extensions.autoCheckUpdates",e.CloseExtensionDetailsOnViewChangeKey="extensions.closeExtensionDetailsOnViewChange";let I=class extends p.Disposable{constructor(S,C){super(),this.containers=S,this._register(C.onChange(this.update,this))}set extension(S){this.containers.forEach(C=>C.extension=S)}update(S){for(const C of this.containers)S&&C.extension?(0,R.areSameExtensions)(C.extension.identifier,S.identifier)&&(C.extension.server&&S.server&&C.extension.server!==S.server?C.updateWhenCounterExtensionChanges&&C.update():C.extension=S):C.update()}};I=we([F(1,e.IExtensionsWorkbenchService)],I),e.ExtensionContainers=I,e.WORKSPACE_RECOMMENDATIONS_VIEW_ID="workbench.views.extensions.workspaceRecommendations",e.OUTDATED_EXTENSIONS_VIEW_ID="workbench.views.extensions.searchOutdated",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.HasOutdatedExtensionsContext=new A.RawContextKey("hasOutdatedExtensions",!1),e.CONTEXT_HAS_GALLERY=new A.RawContextKey("hasGallery",!1),e.THEME_ACTIONS_GROUP="_theme_",e.INSTALL_ACTIONS_GROUP="0_install"}),define(ae[861],le([1,0,1664,82]),function(J,e,t,p){"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:p.EXTENSION_IDENTIFIER_PATTERN,errorMessage:(0,t.localize)(2,null)}},unwantedRecommendations:{type:"array",description:(0,t.localize)(3,null),items:{type:"string",pattern:p.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(ae[523],le([1,0,22,9,1665,186,100,53]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsInput=void 0;class I extends A.EditorInput{get typeId(){return I.ID}get capabilities(){return 10}get resource(){return p.URI.from({scheme:t.Schemas.extension,path:(0,E.join)(this._extension.identifier.id,"extension")})}constructor(S){super(),this._extension=S}get extension(){return this._extension}getName(){return(0,R.localize)(0,null,this._extension.displayName)}matches(S){return super.matches(S)?!0:S instanceof I&&(0,k.areSameExtensions)(this._extension.identifier,S._extension.identifier)}}e.ExtensionsInput=I,I.ID="workbench.extensions.input2"}),define(ae[524],le([1,0,1668,9,186]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RuntimeExtensionsInput=void 0;class A extends R.EditorInput{constructor(){super(...arguments),this.resource=p.URI.from({scheme:"runtime-extensions",path:"default"})}get typeId(){return A.ID}get capabilities(){return 10}static get instance(){return(!A._instance||A._instance.isDisposed())&&(A._instance=new A),A._instance}getName(){return t.localize(0,null)}matches(E){return super.matches(E)?!0:E instanceof A}}e.RuntimeExtensionsInput=A,A.ID="workbench.runtimeExtensions.input"}),define(ae[525],le([1,0,55,214,1678,17]),function(J,e,t,p,R,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:[]},E="\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={...p.workbenchConfigurationNodeBase,properties:{[e.externalUriOpenersSettingId]:{type:"object",markdownDescription:R.localize(0,null),defaultSnippets:[{body:{"example.com":"$1"}}],additionalProperties:{anyOf:[{type:"string",markdownDescription:R.localize(1,null,E)},{type:"string",markdownDescription:R.localize(2,null,E),enum:[e.defaultExternalUriOpenerId],enumDescriptions:[R.localize(3,null)]},k]}}}};function I(b,S){k.enum=b,k.enumDescriptions=S,A.Registry.as(t.Extensions.Configuration).notifyConfigurationSchemaUpdated(e.externalUriOpenersConfigurationNode)}e.updateContributedOpeners=I}),define(ae[312],le([1,0,1689,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NEW_FILE_COMMAND_ID=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 p.RawContextKey("groupFocusedInOpenEditors",!1),e.OpenEditorsDirtyEditorContext=new p.RawContextKey("dirtyEditorFocusedInOpenEditors",!1),e.OpenEditorsReadonlyEditorContext=new p.RawContextKey("readonlyEditorFocusedInOpenEditors",!1),e.ResourceSelectedForCompareContext=new p.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),e.NEW_FILE_COMMAND_ID="workbench.action.files.newFile"}),define(ae[862],le([1,0,1552,10,121,367,110,140,2,14,28,9,40,59,821,8,7,5,38,41,33,12,15,31,312,75,1126]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityHelpController=void 0;const m=new c.RawContextKey("accessibilityHelpWidgetVisible",!1);let w=class ya extends I.Disposable{static get(L){return L.getContribution(ya.ID)}constructor(L,M){super(),this.instantiationService=M,this._editor=L}show(){this._widget||(this._widget=this._register(this.instantiationService.createInstance(D,this._editor))),this._widget.show()}hide(){this._widget?.hide()}};w.ID="editor.contrib.accessibilityHelpController",w=we([F(1,l.IInstantiationService)],w),e.AccessibilityHelpController=w;let D=class ln extends E.Widget{constructor(L,M,O,N,P){super(),this._contextKeyService=M,this._keybindingService=O,this._configurationService=N,this._openerService=P,this._editor=L,this._isVisibleKey=m.bindTo(this._contextKeyService),this._domNode=(0,R.createFastDomNode)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setWidth(ln.WIDTH),this._domNode.setHeight(ln.HEIGHT),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,R.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(p.addStandardDisposableListener(this._contentDomNode.domNode,"keydown",B=>{!this._isVisible||(B.equals(2083)&&((0,k.alert)(t.localize(0,null)),this._configurationService.updateValue("editor.accessibilitySupport","on"),B.preventDefault(),B.stopPropagation()),B.equals(2086)&&((0,k.alert)(t.localize(1,null)),this._openerService.open(C.URI.parse("https://go.microsoft.com/fwlink/?linkid=851010")),B.preventDefault(),B.stopPropagation()))})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ln.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(L,M,O){const N=this._keybindingService.lookupKeybinding(L);return N?S.format(M,N.getAriaLabel()):S.format(O,L)}_buildContent(){const L=this._editor.getOptions();let M=t.localize(2,null);M+=` `+t.localize(3,null);const O=this._configurationService.getValue("editor").accessibilitySupport,N=L.get(2),P=b.isMacintosh?t.localize(4,null):t.localize(5,null);switch(O){case"auto":switch(N){case 0:M+=` - `+t.localize(6,null);break;case 2:M+=` - `+t.localize(7,null);break;case 1:M+=` - `+t.localize(8,null),M+=" "+P;break}break;case"on":M+=` - `+t.localize(9,null);break;case"off":M+=` - `+t.localize(10,null),M+=" "+P;break}const B=t.localize(11,null),V=t.localize(12,null),z=t.localize(13,null),x=t.localize(14,null);L.get(132)?M+=` - `+this._descriptionForCommand(i.ToggleTabFocusModeAction.ID,B,V):M+=` - `+this._descriptionForCommand(i.ToggleTabFocusModeAction.ID,z,x);const H=b.isMacintosh?t.localize(15,null):t.localize(16,null);M+=` `+H,M+=` `+t.localize(17,null),this._contentDomNode.domNode.appendChild((0,A.renderFormattedText)(M)),this._contentDomNode.domNode.setAttribute("aria-label",M)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,p.clearNode(this._contentDomNode.domNode),this._editor.focus())}_layout(){const L=this._editor.getLayoutInfo(),M=Math.min(L.width-40,ln.WIDTH),O=Math.min(L.height-40,ln.HEIGHT);this._domNode.setTop(Math.round((L.height-O)/2)),this._domNode.setLeft(Math.round((L.width-M)/2)),this._domNode.setWidth(M),this._domNode.setHeight(O)}};D.ID="editor.contrib.accessibilityHelpWidget",D.WIDTH=500,D.HEIGHT=300,D=we([F(1,c.IContextKeyService),F(2,s.IKeybindingService),F(3,f.IConfigurationService),F(4,d.IOpenerService)],D);class y extends o.Action2{constructor(){super({id:"editor.action.showAccessibilityHelp",title:{value:t.localize(18,null),original:"Show Accessibility Help"},f1:!0,keybinding:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}async run(L){const M=L.get(g.ICommandService),O=L.get(v.ICodeEditorService);let N=O.getActiveCodeEditor();N||await M.executeCommand(h.NEW_UNTITLED_FILE_COMMAND_ID),N=O.getActiveCodeEditor(),N&&w.get(N)?.show()}}(0,r.registerEditorContribution)(w.ID,w),(0,o.registerAction2)(y);const T=r.EditorCommand.bindToContribution(w.get);(0,r.registerEditorCommand)(new T({id:"closeAccessibilityHelp",precondition:m,handler:_=>_.hide(),kbOpts:{weight:100+100,kbExpr:u.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,a.registerThemingParticipant)((_,L)=>{const M=_.getColor(n.editorWidgetBackground);M&&L.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${M}; }`);const O=_.getColor(n.editorWidgetForeground);M&&L.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${O}; }`);const N=_.getColor(n.widgetShadow);N&&L.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${N}; }`);const P=_.getColor(n.contrastBorder);P&&L.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${P}; }`)})}),define(ae[2315],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SufTrie=e.PreTrie=e.ExplorerFileNestingTrie=void 0;class t{constructor(b){this.root=new p;for(const[S,C]of b)for(const r of C)this.root.add(S,r)}toString(){return this.root.toString()}getAttributes(b,S){const C=b.lastIndexOf(".");return C<1?{dirname:S,basename:b,extname:""}:{dirname:S,basename:b.substring(0,C),extname:b.substring(C+1)}}nest(b,S){const C=new p;for(const i of b){const f=this.getAttributes(i,S),c=this.root.get(i,f);for(const l of c)C.add(l,i)}const r=(i,f=new Set)=>{if(f.has(i))return[];f.add(i);const c=this.getAttributes(i,S),l=C.get(i,c);return l.length===0?[i]:l.length===1&&l[0]===i?[i]:l.flatMap(s=>r(s,f))},u=new Map;for(const i of b){let f=r(i);f.length===0&&(f=[i]);for(const c of f){let l=u.get(c);l||u.set(c,l=new Set),i!==c&&l.add(i)}}return u}}e.ExplorerFileNestingTrie=t;class p{constructor(){this.value=new R,this.map=new Map}add(b,S){if(b==="")this.value.add(b,S);else if(b[0]==="*")this.value.add(b,S);else{const C=b[0],r=b.slice(1);let u=this.map.get(C);u||this.map.set(C,u=new p),u.add(r,S)}}get(b,S){const C=[];C.push(...this.value.get(b,S));const r=b[0],u=b.slice(1),i=this.map.get(r);return i&&C.push(...i.get(u,S)),C}toString(b=""){const S=[];return this.value.hasItems&&S.push(`* => `+this.value.toString(b+" ")),[...this.map.entries()].map(([C,r])=>S.push("^"+C+` => `+r.toString(b+" "))),S.map(C=>b+C).join(` `)}}e.PreTrie=p;class R{constructor(){this.star=[],this.epsilon=[],this.map=new Map,this.hasItems=!1}add(b,S){if(this.hasItems=!0,b==="*")this.star.push(new E(S));else if(b==="")this.epsilon.push(new E(S));else{const C=b[b.length-1],r=b.slice(0,b.length-1);if(C==="*")throw Error("Unexpected star in SufTrie key: "+b);{let u=this.map.get(C);u||this.map.set(C,u=new R),u.add(r,S)}}}get(b,S){const C=[];b===""&&C.push(...this.epsilon.map(f=>f.substitute(S))),this.star.length&&C.push(...this.star.map(f=>f.substitute(S,b)));const r=b[b.length-1],u=b.slice(0,b.length-1),i=this.map.get(r);return i&&C.push(...i.get(u,S)),C}toString(b=""){const S=[];return this.star.length&&S.push("* => "+this.star.join("; ")),this.epsilon.length&&S.push("\u03B5 => "+this.epsilon.join("; ")),[...this.map.entries()].map(([C,r])=>S.push(C+`$ => `+r.toString(b+" "))),S.map(C=>b+C).join(` `)}}e.SufTrie=R;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 E{constructor(b){this.tokens=[],k.lastIndex=0;let S,C=0;for(;S=k.exec(b);){const r=b.slice(C,S.index);this.tokens.push(r);const u=S[1];switch(u){case"basename":case"dirname":case"extname":case"capture":this.tokens.push({capture:u});break;default:throw Error("unknown substitution type: "+u)}C=S.index+S[0].length}if(C!==b.length){const r=b.slice(C,b.length);this.tokens.push(r)}}substitute(b,S){return this.tokens.map(C=>{if(typeof C=="string")return C;switch(C.capture){case"basename":return b.basename;case"dirname":return b.dirname;case"extname":return b.extname;case"capture":return S||""}}).join("")}}}),define(ae[382],le([1,0,9,164,53,60,28,16,2,112,6,18,2315,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NewExplorerItem=e.ExplorerItem=e.ExplorerModel=void 0;class i{constructor(s,d,n,a){this.contextService=s,this.uriIdentityService=d,this._onDidChangeRoots=new S.Emitter;const o=()=>this._roots=this.contextService.getWorkspace().folders.map(g=>new f(g.uri,n,a,void 0,!0,!1,!1,g.name));o(),this._listener=this.contextService.onDidChangeWorkspaceFolders(()=>{o(),this._onDidChangeRoots.fire()})}get roots(){return this._roots}get onDidChangeRoots(){return this._onDidChangeRoots.event}findAll(s){return(0,E.coalesce)(this.roots.map(d=>d.find(s)))}findClosest(s){const d=this.contextService.getWorkspaceFolder(s);if(d){const n=this.roots.find(a=>this.uriIdentityService.extUri.isEqual(a.resource,d.uri));if(n)return n.find(s)}return null}dispose(){(0,I.dispose)(this._listener)}}e.ExplorerModel=i;class f{constructor(s,d,n,a,o,g,h,v=(0,C.basenameOrAuthority)(s),m,w=!1){this.resource=s,this.fileService=d,this.configService=n,this._parent=a,this._isDirectory=o,this._isSymbolicLink=g,this._readonly=h,this._name=v,this._mtime=m,this._unknown=w,this.isError=!1,this._isExcluded=!1,this._isDirectoryResolved=!1}get isExcluded(){return this._isExcluded?!0:this._parent?this._parent.isExcluded:!1}set isExcluded(s){this._isExcluded=s}hasChildren(s){return this.hasNests?this.nestedChildren?.some(d=>s(d))??!1:this.isDirectory}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(s){this._parent?.removeChild(this),this._name=s,this._parent?.addChild(this)}getId(){return this.root.resource.toString()+"::"+this.resource.toString()}toString(){return`ExplorerItem: ${this.name}`}get isRoot(){return this===this.root}static create(s,d,n,a,o){const g=new f(n.resource,s,d,a,n.isDirectory,n.isSymbolicLink,n.readonly,n.name,n.mtime,!n.isFile&&!n.isDirectory);if(g.isDirectory&&(g._isDirectoryResolved=!!n.children||!!o&&o.some(h=>(0,C.isEqualOrParent)(h,g.resource)),n.children))for(let h=0,v=n.children.length;h<v;h++){const m=f.create(s,d,n.children[h],g,o);g.addChild(m)}return g}static mergeLocalWithDisk(s,d){if(s.resource.toString()!==d.resource.toString())return;const n=s.isDirectory||d.isDirectory;if(!(n&&d._isDirectoryResolved&&!s._isDirectoryResolved)&&(d.resource=s.resource,d.isRoot||d.updateName(s.name),d._isDirectory=s.isDirectory,d._mtime=s.mtime,d._isDirectoryResolved=s._isDirectoryResolved,d._isSymbolicLink=s.isSymbolicLink,d.isError=s.isError,n&&s._isDirectoryResolved)){const a=new A.ResourceMap;d.children.forEach(o=>{a.set(o.resource,o)}),d.children.clear(),s.children.forEach(o=>{const g=a.get(o.resource);g?(f.mergeLocalWithDisk(o,g),d.addChild(g),a.delete(o.resource)):d.addChild(o)}),a.forEach(o=>{o instanceof c&&d.addChild(o)})}}addChild(s){s._parent=this,s.updateResource(!1),this.children.set(this.getPlatformAwareName(s.name),s)}getChild(s){return this.children.get(this.getPlatformAwareName(s))}fetchChildren(s){const d=this.configService.getValue({resource:this.root.resource}).explorer.fileNesting;return d.enabled&&this.nestedChildren?this.nestedChildren:(async()=>{if(!this._isDirectoryResolved){const a=s==="modified";this.isError=!1;try{const o=await this.fileService.resolve(this.resource,{resolveSingleChildDescendants:!0,resolveMetadata:a}),g=f.create(this.fileService,this.configService,o,this);f.mergeLocalWithDisk(g,this)}catch(o){throw this.isError=!0,o}this._isDirectoryResolved=!0}const n=[];if(d.enabled){const a=[],o=[];for(const h of this.children.entries())h[1].nestedParent=void 0,h[1].isDirectory?o.push(h):a.push(h);const g=this.fileNester.nest(a.map(([h])=>h),this.getPlatformAwareName(this.name));for(const[h,v]of a){const m=g.get(h);if(m!==void 0){v.nestedChildren=[];for(const w of m.keys()){const D=(0,u.assertIsDefined)(this.children.get(w));v.nestedChildren.push(D),D.nestedParent=v}n.push(v)}else v.nestedChildren=void 0}for(const[h,v]of o.values())n.push(v)}else this.children.forEach(a=>{n.push(a)});return n})()}get fileNester(){if(!this.root._fileNester){const s=this.configService.getValue({resource:this.root.resource}).explorer.fileNesting,d=Object.entries(s.patterns).filter(n=>typeof n[0]=="string"&&typeof n[1]=="string"&&n[0]&&n[1]).map(([n,a])=>[this.getPlatformAwareName(n.trim()),a.split(",").map(o=>this.getPlatformAwareName(o.trim().replace(/\u200b/g,"")))]);this.root._fileNester=new r.ExplorerFileNestingTrie(d)}return this.root._fileNester}removeChild(s){this.nestedChildren=void 0,this.children.delete(this.getPlatformAwareName(s.name))}forgetChildren(){this.children.clear(),this.nestedChildren=void 0,this._isDirectoryResolved=!1,this._fileNester=void 0}getPlatformAwareName(s){return this.fileService.hasCapability(this.resource,1024)?s:s.toLowerCase()}move(s){this.nestedParent?.removeChild(this),this._parent?.removeChild(this),s.removeChild(this),s.addChild(this),this.updateResource(!0)}updateResource(s){this._parent&&(this.resource=(0,C.joinPath)(this._parent.resource,this.name)),s&&this.isDirectory&&this.children.forEach(d=>{d.updateResource(!0)})}rename(s){this.updateName(s.name),this._mtime=s.mtime,this.updateResource(!0)}find(s){const d=!this.fileService.hasCapability(s,1024);return s&&this.resource.scheme===s.scheme&&(0,k.equalsIgnoreCase)(this.resource.authority,s.authority)&&(d?(0,k.startsWithIgnoreCase)(s.path,this.resource.path):s.path.startsWith(this.resource.path))?this.findByPath((0,k.rtrim)(s.path,R.posix.sep),this.resource.path.length,d):null}findByPath(s,d,n){if((0,p.isEqual)((0,k.rtrim)(this.resource.path,R.posix.sep),s,n))return this;if(this.isDirectory){for(;d<s.length&&s[d]===R.posix.sep;)d++;let a=s.indexOf(R.posix.sep,d);a===-1&&(a=s.length);const o=s.substring(d,a),g=this.children.get(this.getPlatformAwareName(o));if(g)return g.findByPath(s,a,n)}return null}}we([b.memoize],f.prototype,"children",null),e.ExplorerItem=f;class c extends f{constructor(s,d,n,a){super(t.URI.file(""),s,d,n,a),this._isDirectoryResolved=!0}}e.NewExplorerItem=c}),define(ae[2316],le([1,0,11,22]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revealResourcesInOS=void 0;function R(A,k,E){if(A.length)(0,t.sequence)(A.map(I=>async()=>{(I.scheme===p.Schemas.file||I.scheme===p.Schemas.vscodeUserData)&&k.showItemInFolder(I.fsPath)}));else if(E.getWorkspace().folders.length){const I=E.getWorkspace().folders[0].uri;I.scheme===p.Schemas.file&&k.showItemInFolder(I.fsPath)}}e.revealResourcesInOS=R}),define(ae[2317],le([1,0,10,32,2,40,59,595,622,1707,15,7,5,254,284]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsAccessibility=void 0;let f=class Es{static get(l){return l.getContribution(Es.ID)??void 0}constructor(l,s,d,n){this._editor=l,this._audioCueService=d,this._instaService=n,this._sessionDispoosables=new R.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,b.localize)(1,null)),this._ctxIsReading=Es.IsReading.bindTo(s)}dispose(){this._sessionDispoosables.dispose(),this._ctxIsReading.reset(),this._ariaElement.remove()}_reset(){t.clearNode(this._ariaElement),this._sessionDispoosables.clear(),this._ctxIsReading.reset()}async _read(l,s){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 d=new p.CancellationTokenSource;this._sessionDispoosables.add(d);for(const h of s)await h.resolve(d.token);if(d.token.isCancellationRequested)return;const n=this._editor.getModel(),a=[];let o=0,g=!1;for(const h of s){const v=n.getValueInRange({startLineNumber:l,startColumn:o+1,endLineNumber:l,endColumn:h.hint.position.column});if(v.length>0&&(a.push(v),o=h.hint.position.column-1),o>750){a.push("\u2026"),g=!0;break}const m=document.createElement("em"),{label:w}=h.hint;if(typeof w=="string")m.innerText=w;else for(const D of w)if(D.command){const y=this._instaService.createInstance(u.Link,m,{href:(0,E.asCommandLink)(D.command),label:D.label,title:D.command.title},void 0);this._sessionDispoosables.add(y)}else m.innerText+=D.label;a.push(m)}g||a.push(n.getValueInRange({startLineNumber:l,startColumn:o+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,s=I.InlayHintsController.get(this._editor)?.getInlayHintsForLine(l);!s||s.length===0?this._audioCueService.playAudioCue(i.AudioCue.noInlayHints):this._read(l,s)}stopInlayHintsReading(){this._reset(),this._editor.focus()}};f.IsReading=new C.RawContextKey("isReadingLineWithInlayHints",!1,{type:"boolean",description:(0,b.localize)(0,null)}),f.ID="editor.contrib.InlayHintsAccessibility",f=we([F(1,C.IContextKeyService),F(2,i.IAudioCueService),F(3,r.IInstantiationService)],f),e.InlayHintsAccessibility=f,(0,S.registerAction2)(class extends A.EditorAction2{constructor(){super({id:"inlayHints.startReadingLineWithHint",title:{value:(0,b.localize)(2,null),original:"Read Line With Inline Hints"},precondition:k.EditorContextKeys.hasInlayHintsProvider,f1:!0})}runEditorCommand(l,s){f.get(s)?.startInlayHintsReading()}}),(0,S.registerAction2)(class extends A.EditorAction2{constructor(){super({id:"inlayHints.stopReadingLineWithHint",title:{value:(0,b.localize)(3,null),original:"Stop Inlay Hints Reading"},precondition:f.IsReading,f1:!0,keybinding:{weight:100,primary:9}})}runEditorCommand(l,s){f.get(s)?.stopInlayHintsReading()}}),(0,A.registerEditorContribution)(f.ID,f)}),define(ae[863],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveWindowSetting=e.INTERACTIVE_INPUT_CURSOR_BOUNDARY=void 0,e.INTERACTIVE_INPUT_CURSOR_BOUNDARY=new t.RawContextKey("interactiveInputCursorAtBoundary","none"),e.InteractiveWindowSetting={interactiveWindowAlwaysScrollOnNewCell:"interactiveWindow.alwaysScrollOnNewCell",interactiveWindowRestore:"interactiveWindow.restore"}}),define(ae[636],le([1,0,6,2,5]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveDocumentService=e.IInteractiveDocumentService=void 0,e.IInteractiveDocumentService=(0,R.createDecorator)("IInteractiveDocumentService");class A extends p.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(E,I,b){this._onWillAddInteractiveDocument.fire({notebookUri:E,inputUri:I,languageId:b})}willRemoveInteractiveDocument(E,I){this._onWillRemoveInteractiveDocument.fire({notebookUri:E,inputUri:I})}}e.InteractiveDocumentService=A});var Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t},yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)};define(ae[864],le([1,0,405,2,60,5]),function(J,e,t,p,R,A){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveHistoryService=e.IInteractiveHistoryService=void 0,e.IInteractiveHistoryService=(0,A.createDecorator)("IInteractiveHistoryService");class E extends p.Disposable{constructor(){super(),k.set(this,void 0),Ut(this,k,new R.ResourceMap,"f")}addToHistory(b,S){if(!yt(this,k,"f").has(b)){yt(this,k,"f").set(b,new t.HistoryNavigator2([S],50));return}const C=yt(this,k,"f").get(b);C.resetCursor(),C?.current()!==S&&C?.add(S)}getPreviousValue(b){return yt(this,k,"f").get(b)?.previous()??null}getNextValue(b){return yt(this,k,"f").get(b)?.next()??null}replaceLast(b,S){if(yt(this,k,"f").has(b)){const C=yt(this,k,"f").get(b);C?.current()!==S&&C?.replaceLast(S)}else{yt(this,k,"f").set(b,new t.HistoryNavigator2([S],50));return}}clearHistory(b){yt(this,k,"f").delete(b)}has(b){return!!yt(this,k,"f").has(b)}}e.InteractiveHistoryService=E,k=new WeakMap}),define(ae[2318],le([1,0]),function(J,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(ae[637],le([1,0,1715,29,14,7,63]),function(J,e,t,p,R,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.getLocalHistoryDateFormatter=void 0;let E;function I(){if(!E){const b={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"};let S;try{S=new Intl.DateTimeFormat(R.language,b)}catch{S=new Intl.DateTimeFormat(void 0,b)}E={format:C=>S.format(C)}}return E}e.getLocalHistoryDateFormatter=I,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",p.Codicon.circleOutline,(0,t.localize)(0,null)),e.LOCAL_HISTORY_ICON_RESTORE=(0,k.registerIcon)("localHistory-restore",p.Codicon.check,(0,t.localize)(1,null))}),define(ae[865],le([1,0,6,2,9,19,18,56]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalHistoryFileSystemProvider=void 0;class I{static toLocalHistoryFileSystem(S){const C={location:S.location.toString(!0),associatedResource:S.associatedResource.toString(!0)};return S.associatedResource.with({scheme:I.SCHEMA,query:JSON.stringify(C)})}static fromLocalHistoryFileSystem(S){const C=JSON.parse(S.query);return{location:R.URI.parse(C.location),associatedResource:R.URI.parse(C.associatedResource)}}get capabilities(){return 2050}constructor(S){this.fileService=S,this.mapSchemeToProvider=new Map,this.onDidChangeCapabilities=t.Event.None,this.onDidChangeFile=t.Event.None}async withProvider(S){const C=S.scheme;let r=this.mapSchemeToProvider.get(C);if(!r){const u=this.fileService.getProvider(C);u?r=Promise.resolve(u):r=new Promise(i=>{const f=this.fileService.onDidChangeFileSystemProviderRegistrations(c=>{c.added&&c.provider&&c.scheme===C&&(f.dispose(),i(c.provider))})}),this.mapSchemeToProvider.set(C,r)}return r}async stat(S){const C=I.fromLocalHistoryFileSystem(S).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(S){const C=I.fromLocalHistoryFileSystem(S).location;if((0,k.isEqual)(I.EMPTY_RESOURCE,C))return E.VSBuffer.fromString("").buffer;const r=await this.withProvider(C);if((0,A.hasReadWriteCapability)(r))return r.readFile(C);throw new Error("Unsupported")}async writeFile(S,C,r){}async mkdir(S){}async readdir(S){return[]}async rename(S,C,r){}async delete(S,C){}watch(S,C){return p.Disposable.None}}e.LocalHistoryFileSystemProvider=I,I.SCHEMA="vscode-local-history",I.EMPTY_RESOURCE=R.URI.from({scheme:I.SCHEMA,path:"/empty"}),I.EMPTY={location:I.EMPTY_RESOURCE,associatedResource:I.EMPTY_RESOURCE}}),define(ae[526],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILocaleService=void 0,e.ILocaleService=(0,t.createDecorator)("localizationService")}),define(ae[2319],le([1,0,1719,48,32,2,15,374,526]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClearDisplayLanguageAction=e.ConfigureDisplayLanguageAction=void 0;class b extends k.Action2{constructor(){super({id:b.ID,title:{original:"Configure Display Language",value:b.LABEL},menu:{id:k.MenuId.CommandPalette}})}async run(r){const u=r.get(E.ILanguagePackService),i=r.get(p.IQuickInputService),f=r.get(I.ILocaleService),c=await u.getInstalledLanguages(),l=i.createQuickPick();if(l.placeholder=(0,t.localize)(1,null),c?.length){const a=[{type:"separator",label:(0,t.localize)(2,null)}];l.items=a.concat(c)}const s=new A.DisposableStore,d=new R.CancellationTokenSource;s.add(l.onDispose(()=>{d.cancel(),s.dispose()}));const n=new Set(c?.map(a=>a.id)??[]);u.getAvailableLanguages().then(a=>{const o=a.filter(g=>g.id&&!n.has(g.id));o.length&&(l.items=[...l.items,{type:"separator",label:(0,t.localize)(3,null)},...o]),l.busy=!1}),s.add(l.onDidAccept(async()=>{const a=l.activeItems[0];l.hide(),await f.setLocale(a)})),l.show(),l.busy=!0}}e.ConfigureDisplayLanguageAction=b,b.ID="workbench.action.configureLocale",b.LABEL=(0,t.localize)(0,null);class S extends k.Action2{constructor(){super({id:S.ID,title:{original:"Clear Display Language Preference",value:S.LABEL},menu:{id:k.MenuId.CommandPalette}})}async run(r){await r.get(I.ILocaleService).clearLocalePreference()}}e.ClearDisplayLanguageAction=S,S.ID="workbench.action.clearLocalePreference",S.LABEL=(0,t.localize)(4,null)}),define(ae[2320],le([1,0,1722]),function(J,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(ae[256],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showWindowLogActionId=e.remotePtyHostLog=e.remoteServerLog=e.remoteTunnelLogChannelId=e.editSessionsLogChannelId=e.userDataSyncLogChannelId=e.extensionTelemetryLogChannelId=e.telemetryLogChannelId=e.rendererLogChannelId=e.sharedLogChannelId=e.mainLogChannelId=void 0,e.mainLogChannelId="mainLog",e.sharedLogChannelId="sharedLog",e.rendererLogChannelId="rendererLog",e.telemetryLogChannelId="telemetryLog",e.extensionTelemetryLogChannelId="extensionTelemetryLog",e.userDataSyncLogChannelId="userDataSyncLog",e.editSessionsLogChannelId="editSessionsSyncLog",e.remoteTunnelLogChannelId="remoteTunnelLog",e.remoteServerLog="remoteServerLog",e.remotePtyHostLog="remotePtyHostLog",e.showWindowLogActionId="workbench.action.showWindowLog"}),define(ae[638],le([1,0,10,748,238,357,22,329]),function(J,e,t,p,R,A,k,E){"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: var(--vscode-textCodeBlock-background); } .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 I=[k.Schemas.http,k.Schemas.https,k.Schemas.command];function b(C,r){const u=(0,t.hookDomPurifyHrefAndSrcSanitizer)(I,!0);try{return p.sanitize(C,{ALLOWED_TAGS:[...t.basicMarkupHtmlTags,"checkbox","checklist"],ALLOWED_ATTR:[...R.allowedMarkdownAttr,"data-command","name","id","role","tabindex","x-dispatch","required","checked","placeholder","when-checked","checked-on"],...r?{ALLOW_UNKNOWN_PROTOCOLS:!0}:{}})}finally{u.dispose()}}async function S(C,r,u,i=!0,f=!1,c){const l=(s,d,n)=>n?typeof d!="string"?(n(null,`<code>${s}</code>`),""):(r.whenInstalledExtensionsRegistered().then(async()=>{if(c?.isCancellationRequested){n(null,"");return}const a=u.getLanguageIdByLanguageName(d),o=await(0,E.tokenizeToString)(u,s,a);n(null,`<code>${o}</code>`)}),""):s;return new Promise((s,d)=>{(0,A.marked)(C,{highlight:l},(n,a)=>n?d(n):s(a))}).then(s=>i?b(s,f):s)}e.renderMarkdownDocument=S}),define(ae[639],le([1,0,96,144,28,18,220]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FilterOptions=e.ResourceGlobMatcher=void 0;class E{constructor(S,C,r){this.globalExpression=(0,p.parse)(S),this.expressionsByRoot=k.TernarySearchTree.forUris(u=>r.extUri.ignorePathCasing(u));for(const u of C)this.expressionsByRoot.set(u.root,{root:u.root,expression:(0,p.parse)(u.expression)})}matches(S){const C=this.expressionsByRoot.findSubstr(S);if(C){const r=(0,A.relativePath)(C.root,S);if(r&&!!C.expression(r))return!0}return!!this.globalExpression(S.path)}}e.ResourceGlobMatcher=E;class I{static EMPTY(S){return new I("",[],!1,!1,!1,S)}constructor(S,C,r,u,i,f){this.filter=S,this.showWarnings=!1,this.showErrors=!1,this.showInfos=!1,S=S.trim(),this.showWarnings=r,this.showErrors=u,this.showInfos=i;const c=Array.isArray(C)?C:[],l=Array.isArray(C)?(0,p.getEmptyExpression)():C;for(const{expression:n}of c)for(const a of Object.keys(n))a.endsWith("/**")||(n[`${R.rtrim(a,"/")}/**`]=n[a]);const s=S.startsWith("!");this.textFilter={text:(s?R.ltrim(S,"!"):S).trim(),negate:s};const d=(0,p.getEmptyExpression)();if(S){const n=(0,p.splitGlobAware)(S,",").map(a=>a.trim()).filter(a=>!!a.length);for(const a of n)if(a.startsWith("!")){const o=R.ltrim(a,"!");o&&this.setPattern(l,o)}else this.setPattern(d,a)}this.excludesMatcher=new E(l,c,f),this.includesMatcher=new E(d,[],f)}setPattern(S,C){C[0]==="."&&(C="*"+C),S[`**/${C}/**`]=!0,S[`**/${C}`]=!0}}e.FilterOptions=I,I._filter=t.matchesFuzzy2,I._messageFilter=t.matchesFuzzy}),define(ae[527],le([1,0,18,20,124,16,60,6,108,13,28,500]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersModel=e.RelatedInformation=e.MarkerTableItem=e.Marker=e.ResourceMarkers=e.compareMarkersByUri=void 0;function r(d,n){return t.extUri.compare(d.resource,n.resource)}e.compareMarkersByUri=r;function u(d,n){const[a]=d.markers,[o]=n.markers;let g=0;return a&&o&&(g=R.MarkerSeverity.compare(a.marker.severity,o.marker.severity)),g===0&&(g=d.path.localeCompare(n.path)||d.name.localeCompare(n.name)),g}class i{constructor(n,a){this.id=n,this.resource=a,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(i._compareMarkers)),this._cachedMarkers}has(n){return this._markersMap.has(n)}set(n,a){this.delete(n),(0,A.isNonEmptyArray)(a)&&(this._markersMap.set(n,a),this._total+=a.length,this._cachedMarkers=void 0)}delete(n){const a=this._markersMap.get(n);a&&(this._total-=a.length,this._cachedMarkers=void 0,this._markersMap.delete(n))}get total(){return this._total}static _compareMarkers(n,a){return R.MarkerSeverity.compare(n.marker.severity,a.marker.severity)||t.extUri.compare(n.resource,a.resource)||p.Range.compareRangesUsingStarts(n.marker,a.marker)}}e.ResourceMarkers=i;class f{get resource(){return this.marker.resource}get range(){return this.marker}get lines(){return this._lines||(this._lines=(0,S.splitLines)(this.marker.message)),this._lines}constructor(n,a,o=[]){this.id=n,this.marker=a,this.relatedInformation=o}toString(){return JSON.stringify({...this.marker,resource:this.marker.resource.path,relatedInformation:this.relatedInformation.length?this.relatedInformation.map(n=>({...n.raw,resource:n.raw.resource.path})):void 0},null," ")}}e.Marker=f;class c extends f{constructor(n,a,o,g,h,v){super(n.id,n.marker,n.relatedInformation),this.sourceMatches=a,this.codeMatches=o,this.messageMatches=g,this.fileMatches=h,this.ownerMatches=v}}e.MarkerTableItem=c;class l{constructor(n,a,o){this.id=n,this.marker=a,this.raw=o}}e.RelatedInformation=l;class s{get resourceMarkers(){return this.cachedSortedResources||(this.cachedSortedResources=[...this.resourcesByUri.values()].sort(u)),this.cachedSortedResources}constructor(){this.cachedSortedResources=void 0,this._onDidChange=new E.Emitter,this.onDidChange=this._onDidChange.event,this._total=0,this.resourcesByUri=new Map}reset(){const n=new Set;for(const a of this.resourcesByUri.values())n.add(a);this.resourcesByUri.clear(),this._total=0,this._onDidChange.fire({removed:n,added:new Set,updated:new Set})}get total(){return this._total}getResourceMarkers(n){return(0,b.withUndefinedAsNull)(this.resourcesByUri.get(t.extUri.getComparisonKey(n,!0)))}setResourceMarkers(n){const a={added:new Set,removed:new Set,updated:new Set};for(const[o,g]of n){if(C.unsupportedSchemas.has(o.scheme))continue;const h=t.extUri.getComparisonKey(o,!0);let v=this.resourcesByUri.get(h);if((0,A.isNonEmptyArray)(g)){if(v)a.updated.add(v);else{const D=this.id(o.toString());v=new i(D,o.with({fragment:null})),this.resourcesByUri.set(h,v),a.added.add(v)}const m=new Map,w=g.map(D=>{const y=R.IMarkerData.makeKey(D),T=m.get(y)||0;m.set(y,T+1);const _=this.id(v.id,y,T,D.resource.toString());let L;return D.relatedInformation&&(L=D.relatedInformation.map((M,O)=>new l(this.id(_,M.resource.toString(),M.startLineNumber,M.startColumn,M.endLineNumber,M.endColumn,O),D,M))),new f(_,D,L)});this._total-=v.total,v.set(o,w),this._total+=v.total}else v&&(this._total-=v.total,v.delete(o),this._total+=v.total,v.total===0?(this.resourcesByUri.delete(h),a.removed.add(v)):a.updated.add(v))}this.cachedSortedResources=void 0,(a.added.size||a.removed.size||a.updated.size)&&this._onDidChange.fire(a)}id(...n){const a=new I.Hasher;for(const o of n)a.hash(o);return`${a.value}`}dispose(){this._onDidChange.dispose(),this.resourcesByUri.clear()}}e.MarkersModel=s}),define(ae[444],le([1,0,1732,18,124]),function(J,e,t,p,R){"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_VIEW_MODE=t.localize(4,null),A.PROBLEMS_PANEL_CONFIGURATION_SHOW_CURRENT_STATUS=t.localize(5,null),A.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER=t.localize(6,null),A.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_SEVERITY=t.localize(7,null),A.PROBLEMS_PANEL_CONFIGURATION_COMPARE_ORDER_POSITION=t.localize(8,null),A.MARKERS_PANEL_TITLE_PROBLEMS=t.localize(9,null),A.MARKERS_PANEL_NO_PROBLEMS_BUILT=t.localize(10,null),A.MARKERS_PANEL_NO_PROBLEMS_ACTIVE_FILE_BUILT=t.localize(11,null),A.MARKERS_PANEL_NO_PROBLEMS_FILTERS=t.localize(12,null),A.MARKERS_PANEL_ACTION_TOOLTIP_MORE_FILTERS=t.localize(13,null),A.MARKERS_PANEL_FILTER_LABEL_SHOW_ERRORS=t.localize(14,null),A.MARKERS_PANEL_FILTER_LABEL_SHOW_WARNINGS=t.localize(15,null),A.MARKERS_PANEL_FILTER_LABEL_SHOW_INFOS=t.localize(16,null),A.MARKERS_PANEL_FILTER_LABEL_EXCLUDED_FILES=t.localize(17,null),A.MARKERS_PANEL_FILTER_LABEL_ACTIVE_FILE=t.localize(18,null),A.MARKERS_PANEL_ACTION_TOOLTIP_FILTER=t.localize(19,null),A.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX=t.localize(20,null),A.MARKERS_PANEL_FILTER_ARIA_LABEL=t.localize(21,null),A.MARKERS_PANEL_FILTER_PLACEHOLDER=t.localize(22,null),A.MARKERS_PANEL_FILTER_ERRORS=t.localize(23,null),A.MARKERS_PANEL_FILTER_WARNINGS=t.localize(24,null),A.MARKERS_PANEL_FILTER_INFOS=t.localize(25,null),A.MARKERS_PANEL_SINGLE_ERROR_LABEL=t.localize(26,null),A.MARKERS_PANEL_MULTIPLE_ERRORS_LABEL=k=>t.localize(27,null,""+k),A.MARKERS_PANEL_SINGLE_WARNING_LABEL=t.localize(28,null),A.MARKERS_PANEL_MULTIPLE_WARNINGS_LABEL=k=>t.localize(29,null,""+k),A.MARKERS_PANEL_SINGLE_INFO_LABEL=t.localize(30,null),A.MARKERS_PANEL_MULTIPLE_INFOS_LABEL=k=>t.localize(31,null,""+k),A.MARKERS_PANEL_SINGLE_UNKNOWN_LABEL=t.localize(32,null),A.MARKERS_PANEL_MULTIPLE_UNKNOWNS_LABEL=k=>t.localize(33,null,""+k),A.MARKERS_PANEL_AT_LINE_COL_NUMBER=(k,E)=>t.localize(34,null,""+k,""+E),A.MARKERS_TREE_ARIA_LABEL_RESOURCE=(k,E,I)=>t.localize(35,null,k,E,I),A.MARKERS_TREE_ARIA_LABEL_MARKER=k=>{const E=k.relatedInformation.length?t.localize(36,null,k.relatedInformation.length):"";switch(k.marker.severity){case R.MarkerSeverity.Error:return k.marker.source?t.localize(37,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E):t.localize(38,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E);case R.MarkerSeverity.Warning:return k.marker.source?t.localize(39,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E):t.localize(40,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E,E);case R.MarkerSeverity.Info:return k.marker.source?t.localize(41,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E):t.localize(42,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E);default:return k.marker.source?t.localize(43,null,k.marker.source,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E):t.localize(44,null,k.marker.message,k.marker.startLineNumber,k.marker.startColumn,E)}},A.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION=k=>t.localize(45,null,k.message,k.startLineNumber,k.startColumn,(0,p.basename)(k.resource)),A.SHOW_ERRORS_WARNINGS_ACTION_LABEL=t.localize(46,null)}),define(ae[339],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersContextKeys=e.Markers=e.MarkersViewMode=void 0;var p;(function(k){k.Table="table",k.Tree="tree"})(p=e.MarkersViewMode||(e.MarkersViewMode={}));var R;(function(k){k.MARKERS_CONTAINER_ID="workbench.panel.markers",k.MARKERS_VIEW_ID="workbench.panel.markers.view",k.MARKERS_VIEW_STORAGE_ID="workbench.panel.markers",k.MARKER_COPY_ACTION_ID="problems.action.copy",k.MARKER_COPY_MESSAGE_ACTION_ID="problems.action.copyMessage",k.RELATED_INFORMATION_COPY_MESSAGE_ACTION_ID="problems.action.copyRelatedInformationMessage",k.FOCUS_PROBLEMS_FROM_FILTER="problems.action.focusProblemsFromFilter",k.MARKERS_VIEW_FOCUS_FILTER="problems.action.focusFilter",k.MARKERS_VIEW_CLEAR_FILTER_TEXT="problems.action.clearFilterText",k.MARKERS_VIEW_SHOW_MULTILINE_MESSAGE="problems.action.showMultilineMessage",k.MARKERS_VIEW_SHOW_SINGLELINE_MESSAGE="problems.action.showSinglelineMessage",k.MARKER_OPEN_ACTION_ID="problems.action.open",k.MARKER_OPEN_SIDE_ACTION_ID="problems.action.openToSide",k.MARKER_SHOW_PANEL_ID="workbench.action.showErrorsWarnings",k.MARKER_SHOW_QUICK_FIX="problems.action.showQuickFixes",k.TOGGLE_MARKERS_VIEW_ACTION_ID="workbench.actions.view.toggleProblems"})(R=e.Markers||(e.Markers={}));var A;(function(k){k.MarkersViewModeContextKey=new t.RawContextKey("problemsViewMode","tree"),k.MarkersTreeVisibilityContextKey=new t.RawContextKey("problemsVisibility",!1),k.MarkerFocusContextKey=new t.RawContextKey("problemFocus",!1),k.MarkerViewFilterFocusContextKey=new t.RawContextKey("problemsFilterFocus",!1),k.RelatedInformationFocusContextKey=new t.RawContextKey("relatedInformationFocus",!1),k.ShowErrorsFilterContextKey=new t.RawContextKey("problems.filter.errors",!0),k.ShowWarningsFilterContextKey=new t.RawContextKey("problems.filter.warnings",!0),k.ShowInfoFilterContextKey=new t.RawContextKey("problems.filter.info",!0),k.ShowActiveFileFilterContextKey=new t.RawContextKey("problems.filter.activeFile",!1),k.ShowExcludedFilesFilterContextKey=new t.RawContextKey("problems.filter.excludedFiles",!0)})(A=e.MarkersContextKeys||(e.MarkersContextKeys={}))}),define(ae[640],le([1,0,10,36,37,444,12,2,33,6,29,137,339]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickFixActionViewItem=e.QuickFixAction=e.MarkersFilters=void 0;class u extends E.Disposable{constructor(l,s){super(),this.contextKeyService=s,this._onDidChange=this._register(new b.Emitter),this.onDidChange=this._onDidChange.event,this._excludedFiles=r.MarkersContextKeys.ShowExcludedFilesFilterContextKey.bindTo(this.contextKeyService),this._activeFile=r.MarkersContextKeys.ShowActiveFileFilterContextKey.bindTo(this.contextKeyService),this._showWarnings=r.MarkersContextKeys.ShowWarningsFilterContextKey.bindTo(this.contextKeyService),this._showErrors=r.MarkersContextKeys.ShowErrorsFilterContextKey.bindTo(this.contextKeyService),this._showInfos=r.MarkersContextKeys.ShowInfoFilterContextKey.bindTo(this.contextKeyService),this._showErrors.set(l.showErrors),this._showWarnings.set(l.showWarnings),this._showInfos.set(l.showInfos),this._excludedFiles.set(l.excludedFiles),this._activeFile.set(l.activeFile),this.filterHistory=l.filterHistory}get excludedFiles(){return!!this._excludedFiles.get()}set excludedFiles(l){this._excludedFiles.get()!==l&&(this._excludedFiles.set(l),this._onDidChange.fire({excludedFiles:!0}))}get activeFile(){return!!this._activeFile.get()}set activeFile(l){this._activeFile.get()!==l&&(this._activeFile.set(l),this._onDidChange.fire({activeFile:!0}))}get showWarnings(){return!!this._showWarnings.get()}set showWarnings(l){this._showWarnings.get()!==l&&(this._showWarnings.set(l),this._onDidChange.fire({showWarnings:!0}))}get showErrors(){return!!this._showErrors.get()}set showErrors(l){this._showErrors.get()!==l&&(this._showErrors.set(l),this._onDidChange.fire({showErrors:!0}))}get showInfos(){return!!this._showInfos.get()}set showInfos(l){this._showInfos.get()!==l&&(this._showInfos.set(l),this._onDidChange.fire({showInfos:!0}))}}e.MarkersFilters=u;class i extends p.Action{get quickFixes(){return this._quickFixes}set quickFixes(l){this._quickFixes=l,this.enabled=this._quickFixes.length>0}autoFixable(l){this.class=l?i.AUTO_FIX_CLASS:i.CLASS}constructor(l){super(i.ID,A.default.MARKERS_PANEL_ACTION_TOOLTIP_QUICKFIX,i.CLASS,!1),this.marker=l,this._onShowQuickFixes=this._register(new b.Emitter),this.onShowQuickFixes=this._onShowQuickFixes.event,this._quickFixes=[]}run(){return this._onShowQuickFixes.fire(),Promise.resolve()}}e.QuickFixAction=i,i.ID="workbench.actions.problems.quickfix",i.CLASS="markers-panel-action-quickfix "+S.Codicon.lightBulb.classNames,i.AUTO_FIX_CLASS=i.CLASS+" autofixable";let f=class extends C.ActionViewItem{constructor(l,s){super(null,l,{icon:!0,label:!1}),this.contextMenuService=s}onClick(l){t.EventHelper.stop(l,!0),this.showQuickFixes()}showQuickFixes(){if(!this.element||!this.isEnabled())return;const l=t.getDomNodePagePosition(this.element),s=this.action.quickFixes;s.length&&this.contextMenuService.showContextMenu({getAnchor:()=>({x:l.left+10,y:l.top+l.height+4}),getActions:()=>s})}};f=we([F(1,R.IContextMenuService)],f),e.QuickFixActionViewItem=f,(0,k.registerThemingParticipant)((c,l)=>{const s=c.getColor(I.inputActiveOptionBorder);s&&l.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { border-color: ${s}; }`);const d=c.getColor(I.inputActiveOptionForeground);d&&l.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { color: ${d}; }`);const n=c.getColor(I.inputActiveOptionBackground);n&&l.addRule(`.markers-panel-action-filter > .markers-panel-filter-controls > .monaco-action-bar .action-label.markers-filters.checked { background-color: ${n}; }`)})}),define(ae[2321],le([1,0,1729,10,6,2,5,76,250,527,124,432,79,49,639,254,41,640,195,444,13,20,500]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkersTable=void 0;const g=p.$;let h=class Ia{constructor(L,M){this.markersViewModel=L,this.instantiationService=M,this.templateId=Ia.TEMPLATE_ID}renderTemplate(L){const M=p.append(L,g(".severity")),O=p.append(M,g("")),N=p.append(L,g(".actions"));return{actionBar:new r.ActionBar(N,{actionViewItemProvider:B=>B.id===l.QuickFixAction.ID?this.instantiationService.createInstance(l.QuickFixActionViewItem,B):void 0,animated:!1}),icon:O}}renderElement(L,M,O,N){const P=V=>{(0,n.isUndefinedOrNull)(V)||p.findParentWithClass(O.icon,"monaco-table-td").classList.toggle("quickFix",V)};O.icon.title=S.MarkerSeverity.toString(L.marker.severity),O.icon.className=`marker-icon codicon ${C.SeverityIcon.className(S.MarkerSeverity.toSeverity(L.marker.severity))}`,O.actionBar.clear();const B=this.markersViewModel.getViewModel(L);if(B){const V=B.quickFixAction;O.actionBar.push([V],{icon:!0,label:!1}),P(B.quickFixAction.enabled),V.onDidChange(({enabled:z})=>P(z)),V.onShowQuickFixes(()=>{const z=O.actionBar.viewItems[0];z&&z.showQuickFixes()})}}disposeTemplate(L){}};h.TEMPLATE_ID="severity",h=we([F(1,k.IInstantiationService)],h);let v=class Da{constructor(L){this.openerService=L,this.templateId=Da.TEMPLATE_ID}renderTemplate(L){const M=p.append(L,g(".code")),O=new I.HighlightedLabel(M);O.element.classList.add("source-label");const N=new I.HighlightedLabel(M);N.element.classList.add("code-label");const P=new f.Link(M,{href:"",label:""},{},this.openerService);return{codeColumn:M,sourceLabel:O,codeLabel:N,codeLink:P}}renderElement(L,M,O,N){if(O.codeColumn.classList.remove("code-label"),O.codeColumn.classList.remove("code-link"),L.marker.source&&L.marker.code)if(typeof L.marker.code=="string")O.codeColumn.classList.add("code-label"),O.codeColumn.title=`${L.marker.source} (${L.marker.code})`,O.sourceLabel.set(L.marker.source,L.sourceMatches),O.codeLabel.set(L.marker.code,L.codeMatches);else{O.codeColumn.classList.add("code-link"),O.codeColumn.title=`${L.marker.source} (${L.marker.code.value})`,O.sourceLabel.set(L.marker.source,L.sourceMatches);const P=new I.HighlightedLabel(g(".code-link-label"));P.set(L.marker.code.value,L.codeMatches),O.codeLink.link={href:L.marker.code.target.toString(),title:L.marker.code.target.toString(),label:P.element}}else O.codeColumn.title="",O.sourceLabel.set("-")}disposeTemplate(L){}};v.TEMPLATE_ID="code",v=we([F(0,c.IOpenerService)],v);class m{constructor(){this.templateId=m.TEMPLATE_ID}renderTemplate(L){const M=p.append(L,g(".message")),O=new I.HighlightedLabel(M);return{columnElement:M,highlightedLabel:O}}renderElement(L,M,O,N){O.columnElement.title=L.marker.message,O.highlightedLabel.set(L.marker.message,L.messageMatches)}disposeTemplate(L){}}m.TEMPLATE_ID="message";let w=class Ta{constructor(L){this.labelService=L,this.templateId=Ta.TEMPLATE_ID}renderTemplate(L){const M=p.append(L,g(".file")),O=new I.HighlightedLabel(M);O.element.classList.add("file-label");const N=new I.HighlightedLabel(M);return N.element.classList.add("file-position"),{columnElement:M,fileLabel:O,positionLabel:N}}renderElement(L,M,O,N){const P=d.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(L.marker.startLineNumber,L.marker.startColumn);O.columnElement.title=`${this.labelService.getUriLabel(L.marker.resource,{relative:!1})} ${P}`,O.fileLabel.set(this.labelService.getUriLabel(L.marker.resource,{relative:!0}),L.fileMatches),O.positionLabel.set(P,void 0)}disposeTemplate(L){}};w.TEMPLATE_ID="file",w=we([F(0,u.ILabelService)],w);class D{constructor(){this.templateId=D.TEMPLATE_ID}renderTemplate(L){const M=p.append(L,g(".owner")),O=new I.HighlightedLabel(M);return{columnElement:M,highlightedLabel:O}}renderElement(L,M,O,N){O.columnElement.title=L.marker.owner,O.highlightedLabel.set(L.marker.owner,L.ownerMatches)}disposeTemplate(L){}}D.TEMPLATE_ID="owner";class y{constructor(){this.headerRowHeight=y.HEADER_ROW_HEIGHT}getHeight(L){return y.ROW_HEIGHT}}y.HEADER_ROW_HEIGHT=24,y.ROW_HEIGHT=24;let T=class extends A.Disposable{constructor(L,M,O,N,P,B,V){super(),this.container=L,this.markersViewModel=M,this.resourceMarkers=O,this.filterOptions=N,this.instantiationService=B,this.labelService=V,this._itemCount=0,this.table=this.instantiationService.createInstance(E.WorkbenchTable,"Markers",this.container,new y,[{label:"",tooltip:"",weight:0,minimumWidth:36,maximumWidth:36,templateId:h.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(0,null),tooltip:"",weight:1,minimumWidth:100,maximumWidth:300,templateId:v.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(1,null),tooltip:"",weight:4,templateId:m.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(2,null),tooltip:"",weight:2,templateId:w.TEMPLATE_ID,project($){return $}},{label:(0,t.localize)(3,null),tooltip:"",weight:1,minimumWidth:100,maximumWidth:300,templateId:D.TEMPLATE_ID,project($){return $}}],[this.instantiationService.createInstance(h,this.markersViewModel),this.instantiationService.createInstance(v),this.instantiationService.createInstance(m),this.instantiationService.createInstance(w),this.instantiationService.createInstance(D)],P);const z=this.table.domNode.querySelector(".monaco-list-rows"),x=R.Event.chain(this._register(new s.DomEmitter(z,"mouseover")).event).map($=>p.findParentWithClass($.target,"monaco-list-row","monaco-list-rows")).filter($=>!!$).map($=>parseInt($.getAttribute("data-index"))).event,H=R.Event.map(this._register(new s.DomEmitter(z,"mouseleave")).event,()=>-1),W=R.Event.latch(R.Event.any(x,H)),U=R.Event.debounce(W,($,q)=>q,500);this._register(U($=>{$!==-1&&this.table.row($)&&this.markersViewModel.onMarkerMouseHover(this.table.row($))}))}get contextKeyService(){return this.table.contextKeyService}get onContextMenu(){return this.table.onContextMenu}get onDidOpen(){return this.table.onDidOpen}get onDidChangeFocus(){return this.table.onDidChangeFocus}get onDidChangeSelection(){return this.table.onDidChangeSelection}collapseMarkers(){}domFocus(){this.table.domFocus()}filterMarkers(L,M){this.filterOptions=M,this.reset(L)}getFocus(){const L=this.table.getFocus();return L.length>0?[...L.map(M=>this.table.row(M))]:[]}getHTMLElement(){return this.table.getHTMLElement()}getRelativeTop(L){return L?this.table.getRelativeTop(this.table.indexOf(L)):null}getSelection(){const L=this.table.getSelection();return L.length>0?[...L.map(M=>this.table.row(M))]:[]}getVisibleItemCount(){return this._itemCount}isVisible(){return!this.container.classList.contains("hidden")}layout(L,M){this.container.style.height=`${L}px`,this.table.layout(L,M)}reset(L){this.resourceMarkers=L;const M=[];for(const O of this.resourceMarkers)for(const N of O.markers){if(o.unsupportedSchemas.has(N.resource.scheme)||this.filterOptions.excludesMatcher.matches(N.resource))continue;if(this.filterOptions.includesMatcher.matches(N.resource)){M.push(new b.MarkerTableItem(N));continue}if(!!(this.filterOptions.showErrors&&S.MarkerSeverity.Error===N.marker.severity||this.filterOptions.showWarnings&&S.MarkerSeverity.Warning===N.marker.severity||this.filterOptions.showInfos&&S.MarkerSeverity.Info===N.marker.severity)){if(this.filterOptions.textFilter.text){const B=N.marker.source?i.FilterOptions._filter(this.filterOptions.textFilter.text,N.marker.source)??void 0:void 0,V=N.marker.code?i.FilterOptions._filter(this.filterOptions.textFilter.text,typeof N.marker.code=="string"?N.marker.code:N.marker.code.value)??void 0:void 0,z=i.FilterOptions._messageFilter(this.filterOptions.textFilter.text,N.marker.message)??void 0,x=i.FilterOptions._messageFilter(this.filterOptions.textFilter.text,this.labelService.getUriLabel(N.resource,{relative:!0}))??void 0,H=i.FilterOptions._messageFilter(this.filterOptions.textFilter.text,N.marker.owner)??void 0,W=B||V||z||x||H;(W&&!this.filterOptions.textFilter.negate||!W&&this.filterOptions.textFilter.negate)&&M.push(new b.MarkerTableItem(N,B,V,z,x,H));continue}M.push(new b.MarkerTableItem(N))}}this._itemCount=M.length,this.table.splice(0,Number.POSITIVE_INFINITY,M.sort((O,N)=>{let P=S.MarkerSeverity.compare(O.marker.severity,N.marker.severity);return P===0&&(P=(0,b.compareMarkersByUri)(O.marker,N.marker)),P===0&&(P=a.Range.compareRangesUsingStarts(O.marker,N.marker)),P}))}revealMarkers(L,M,O){if(L){const N=this.resourceMarkers.indexOf(L);if(N!==-1)if(this.hasSelectedMarkerFor(L)){const P=this.table.getSelection();this.table.reveal(P[0],O),M&&this.table.setFocus(P)}else this.table.reveal(N,0),M&&(this.table.setFocus([N]),this.table.setSelection([N]))}else M&&(this.table.setSelection([]),this.table.focusFirst())}setAriaLabel(L){this.table.domNode.ariaLabel=L}setMarkerSelection(L,M){this.isVisible()&&(L&&L.length>0?(this.table.setSelection(L.map(O=>this.findMarkerIndex(O))),M&&M.length>0?this.table.setFocus(M.map(O=>this.findMarkerIndex(O))):this.table.setFocus([this.findMarkerIndex(L[0])]),this.table.reveal(this.findMarkerIndex(L[0]))):this.getSelection().length===0&&this.getVisibleItemCount()>0&&(this.table.setSelection([0]),this.table.setFocus([0]),this.table.reveal(0)))}toggleVisibility(L){this.container.classList.toggle("hidden",L)}update(L){for(const M of L){const O=this.resourceMarkers.indexOf(M);this.resourceMarkers.splice(O,1,M)}this.reset(this.resourceMarkers)}updateMarker(L){this.table.rerender()}findMarkerIndex(L){for(let M=0;M<this.table.length;M++)if(this.table.row(M).marker===L.marker)return M;return-1}hasSelectedMarkerFor(L){const M=this.getSelection();return!!(M&&M.length>0&&M[0]instanceof b.Marker&&L.has(M[0].marker.resource))}};T=we([F(5,k.IInstantiationService),F(6,u.ILabelService)],T),e.MarkersTable=T}),define(ae[641],le([1,0,16,20]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineEdits=e.RangeEdit=e.LineRangeEdit=void 0;class R{constructor(I,b){this.range=I,this.newLines=b}equals(I){return this.range.equals(I.range)&&(0,t.equals)(this.newLines,I.newLines)}apply(I){new k([this]).apply(I)}}e.LineRangeEdit=R;class A{constructor(I,b){this.range=I,this.newText=b}equals(I){return p.Range.equalsRange(this.range,I.range)&&this.newText===I.newText}}e.RangeEdit=A;class k{constructor(I){this.edits=I}apply(I){I.pushEditOperations(null,this.edits.map(b=>b.range.endLineNumberExclusive<=I.getLineCount()?{range:new p.Range(b.range.startLineNumber,1,b.range.endLineNumberExclusive,1),text:b.newLines.map(S=>S+` `).join("")}:b.range.startLineNumber===1?{range:new p.Range(1,1,I.getLineCount(),Number.MAX_SAFE_INTEGER),text:b.newLines.join(` `)}:{range:new p.Range(b.range.startLineNumber-1,Number.MAX_SAFE_INTEGER,I.getLineCount(),Number.MAX_SAFE_INTEGER),text:b.newLines.map(S=>` `+S).join("")}),()=>null)}}e.LineEdits=k}),define(ae[286],le([1,0,16,21,20]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineRange=void 0;class A{static join(E){if(E.length===0)return;let I=Number.MAX_SAFE_INTEGER,b=0;for(const S of E)I=Math.min(I,S.startLineNumber),b=Math.max(b,S.startLineNumber+S.lineCount);return new A(I,b-I)}static fromLineNumbers(E,I){return new A(E,I-E)}constructor(E,I){if(this.startLineNumber=E,this.lineCount=I,I<0)throw new p.BugIndicatingError}join(E){return new A(Math.min(this.startLineNumber,E.startLineNumber),Math.max(this.endLineNumberExclusive,E.endLineNumberExclusive)-this.startLineNumber)}get endLineNumberExclusive(){return this.startLineNumber+this.lineCount}get isEmpty(){return this.lineCount===0}touches(E){return this.endLineNumberExclusive>=E.startLineNumber&&E.endLineNumberExclusive>=this.startLineNumber}isAfter(E){return this.startLineNumber>=E.endLineNumberExclusive}isBefore(E){return E.startLineNumber>=this.endLineNumberExclusive}delta(E){return new A(this.startLineNumber+E,this.lineCount)}toString(){return`[${this.startLineNumber},${this.endLineNumberExclusive})`}equals(E){return this.startLineNumber===E.startLineNumber&&this.lineCount===E.lineCount}contains(E){return this.startLineNumber<=E&&E<this.endLineNumberExclusive}deltaEnd(E){return new A(this.startLineNumber,this.lineCount+E)}deltaStart(E){return new A(this.startLineNumber+E,this.lineCount-E)}getLines(E){const I=new Array(this.lineCount);for(let b=0;b<this.lineCount;b++)I[b]=E.getLineContent(this.startLineNumber+b);return I}containsRange(E){return this.startLineNumber<=E.startLineNumber&&E.endLineNumberExclusive<=this.endLineNumberExclusive}toRange(){return new R.Range(this.startLineNumber,1,this.endLineNumberExclusive,1)}toInclusiveRange(){if(!this.isEmpty)return new R.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,1073741824)}toInclusiveRangeOrEmpty(){return this.isEmpty?new R.Range(this.startLineNumber,1,this.startLineNumber,1):new R.Range(this.startLineNumber,1,this.endLineNumberExclusive-1,1073741824)}intersects(E){return this.startLineNumber<=E.endLineNumberExclusive&&E.startLineNumber<=this.endLineNumberExclusive}}e.LineRange=A,A.compareByStart=(0,t.compareBy)(k=>k.startLineNumber,t.numberComparator)}),define(ae[2322],le([1,0,10,2,159,286,1738]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeMarkersController=e.conflictMarkers=void 0,e.conflictMarkers={start:"<<<<<<<",end:">>>>>>>"};class E extends p.Disposable{constructor(C,r){super(),this.editor=C,this.mergeEditorViewModel=r,this.viewZoneIds=[],this.disposableStore=new p.DisposableStore,this._register(C.onDidChangeModelContent(u=>{this.updateDecorations()})),this._register(C.onDidChangeModel(u=>{this.updateDecorations()})),this.updateDecorations()}updateDecorations(){const C=this.editor.getModel(),r=C?I(C,{blockToRemoveStartLinePrefix:e.conflictMarkers.start,blockToRemoveEndLinePrefix:e.conflictMarkers.end}):{blocks:[]};this.editor.setHiddenAreas(r.blocks.map(u=>u.lineRange.deltaEnd(-1).toRange()),this),this.editor.changeViewZones(u=>{this.disposableStore.clear();for(const i of this.viewZoneIds)u.removeZone(i);this.viewZoneIds.length=0;for(const i of r.blocks){const f=C.getLineContent(i.lineRange.startLineNumber).substring(0,20),c=C.getLineContent(i.lineRange.endLineNumberExclusive-1).substring(0,20),l=i.lineRange.lineCount-2,s=(0,t.h)("div",[(0,t.h)("div.conflict-zone-root",[(0,t.h)("pre",[f]),(0,t.h)("span.dots",["..."]),(0,t.h)("pre",[c]),(0,t.h)("span.text",[l===1?k.localize(0,null):k.localize(1,null,l)])])]).root;this.viewZoneIds.push(u.addZone({afterLineNumber:i.lineRange.endLineNumberExclusive-1,domNode:s,heightInLines:1.5}));const d=()=>{const n=this.editor.getLayoutInfo();s.style.width=`${n.contentWidth-n.verticalScrollbarWidth}px`};this.disposableStore.add(this.editor.onDidLayoutChange(()=>{d()})),d(),this.disposableStore.add((0,R.autorun)("update classname",n=>{const a=this.mergeEditorViewModel.read(n);if(!a)return;const o=a.activeModifiedBaseRange.read(n),g=[];g.push("conflict-zone"),o&&a.model.getLineRangeInResult(o.baseRange,n).intersects(i.lineRange)&&g.push("focused"),s.className=g.join(" ")}))}})}}e.MergeMarkersController=E;function I(S,C){const r=[],u=[];let i=!1,f=-1,c=0;for(const l of S.getLinesContent())c++,i?l.startsWith(C.blockToRemoveEndLinePrefix)&&(i=!1,r.push(new b(new A.LineRange(f,c-f+1))),u.push("")):l.startsWith(C.blockToRemoveStartLinePrefix)?(i=!0,f=c):u.push(l);return{blocks:r,transformedContent:u.join(` `)}}class b{constructor(C){this.lineRange=C}}}),define(ae[866],le([1,0,50,264]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rangeIsBeforeOrTouching=e.addLength=e.lengthBetweenPositions=e.lengthOfRange=e.rangeContainsPosition=void 0;function R(b,S){return!(S.lineNumber<b.startLineNumber||S.lineNumber>b.endLineNumber||S.lineNumber===b.startLineNumber&&S.column<b.startColumn||S.lineNumber===b.endLineNumber&&S.column>=b.endColumn)}e.rangeContainsPosition=R;function A(b){return b.startLineNumber===b.endLineNumber?new p.LengthObj(0,b.endColumn-b.startColumn):new p.LengthObj(b.endLineNumber-b.startLineNumber,b.endColumn-1)}e.lengthOfRange=A;function k(b,S){return b.lineNumber===S.lineNumber?new p.LengthObj(0,S.column-b.column):new p.LengthObj(S.lineNumber-b.lineNumber,S.column-1)}e.lengthBetweenPositions=k;function E(b,S){return S.lineCount===0?new t.Position(b.lineNumber,b.column+S.columnCount):new t.Position(b.lineNumber+S.lineCount,S.columnCount+1)}e.addLength=E;function I(b,S){return b.endLineNumber<S.startLineNumber||b.endLineNumber===S.startLineNumber&&b.endColumn<=S.startColumn}e.rangeIsBeforeOrTouching=I}),define(ae[2323],le([1,0,27]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorTelemetry=void 0;let p=class{constructor(A){this.telemetryService=A}reportMergeEditorOpened(A){this.telemetryService.publicLog2("mergeEditor.opened",{conflictCount:A.conflictCount,combinableConflictCount:A.combinableConflictCount,baseVisible:A.baseVisible,isColumnView:A.isColumnView,baseTop:A.baseTop})}reportLayoutChange(A){this.telemetryService.publicLog2("mergeEditor.layoutChanged",{baseVisible:A.baseVisible,isColumnView:A.isColumnView,baseTop:A.baseTop})}reportMergeEditorClosed(A){this.telemetryService.publicLog2("mergeEditor.closed",{conflictCount:A.conflictCount,combinableConflictCount:A.combinableConflictCount,durationOpenedSecs:A.durationOpenedSecs,remainingConflictCount:A.remainingConflictCount,accepted:A.accepted,conflictsResolvedWithBase:A.conflictsResolvedWithBase,conflictsResolvedWithInput1:A.conflictsResolvedWithInput1,conflictsResolvedWithInput2:A.conflictsResolvedWithInput2,conflictsResolvedWithSmartCombination:A.conflictsResolvedWithSmartCombination,manuallySolvedConflictCountThatEqualNone:A.manuallySolvedConflictCountThatEqualNone,manuallySolvedConflictCountThatEqualSmartCombine:A.manuallySolvedConflictCountThatEqualSmartCombine,manuallySolvedConflictCountThatEqualInput1:A.manuallySolvedConflictCountThatEqualInput1,manuallySolvedConflictCountThatEqualInput2:A.manuallySolvedConflictCountThatEqualInput2,manuallySolvedConflictCountThatEqualNoneAndStartedWithBase:A.manuallySolvedConflictCountThatEqualNoneAndStartedWithBase,manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1:A.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1,manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2:A.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2,manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart:A.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart,manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart:A.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart})}reportAcceptInvoked(A,k){this.telemetryService.publicLog2("mergeEditor.action.accept",{otherAccepted:k,isInput1:A===1})}reportSmartCombinationInvoked(A){this.telemetryService.publicLog2("mergeEditor.action.smartCombination",{otherAccepted:A})}reportRemoveInvoked(A,k){this.telemetryService.publicLog2("mergeEditor.action.remove",{otherAccepted:k,isInput1:A===1})}reportResetToBaseInvoked(){this.telemetryService.publicLog2("mergeEditor.action.resetToBase",{})}reportNavigationToNextConflict(){this.telemetryService.publicLog2("mergeEditor.action.goToNextConflict",{})}reportNavigationToPreviousConflict(){this.telemetryService.publicLog2("mergeEditor.action.goToPreviousConflict",{})}reportConflictCounterClicked(){this.telemetryService.publicLog2("mergeEditor.action.conflictCounterClicked",{})}};p=we([F(0,t.ITelemetryService)],p),e.MergeEditorTelemetry=p}),define(ae[257],le([1,0,16,21,2,159,23]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PersistentStore=e.deepMerge=e.setFields=e.thenIfNotDisposed=e.elementAtOrUndefined=e.concatArrays=e.join=e.leftJoin=e.applyObservableDecorations=e.setStyle=e.ReentrancyBarrier=void 0;class E{constructor(){this.isActive=!1}makeExclusive(n){return(...a)=>{if(!this.isActive){this.isActive=!0;try{return n(...a)}finally{this.isActive=!1}}}}runExclusively(n){if(!this.isActive){this.isActive=!0;try{n()}finally{this.isActive=!1}}}runExclusivelyOrThrow(n){if(this.isActive)throw new p.BugIndicatingError;this.isActive=!0;try{n()}finally{this.isActive=!1}}}e.ReentrancyBarrier=E;function I(d,n){Object.entries(n).forEach(([a,o])=>{d.style.setProperty(a,b(o))})}e.setStyle=I;function b(d){return typeof d=="number"?`${d}px`:d}function S(d,n){const a=new R.DisposableStore;let o=[];return a.add((0,A.autorun)(`Apply decorations from ${n.debugName}`,g=>{const h=n.read(g);d.changeDecorations(v=>{o=v.deltaDecorations(o,h)})})),a.add({dispose:()=>{d.changeDecorations(g=>{o=g.deltaDecorations(o,[])})}}),a}e.applyObservableDecorations=S;function*C(d,n,a){const o=new t.ArrayQueue(n);for(const g of d){o.takeWhile(v=>t.CompareResult.isGreaterThan(a(g,v)));const h=o.takeWhile(v=>t.CompareResult.isNeitherLessOrGreaterThan(a(g,v)));yield{left:g,rights:h||[]}}}e.leftJoin=C;function*r(d,n,a){const o=new t.ArrayQueue(n);for(const g of d){const h=o.takeWhile(m=>t.CompareResult.isGreaterThan(a(g,m)));h&&(yield{rights:h});const v=o.takeWhile(m=>t.CompareResult.isNeitherLessOrGreaterThan(a(g,m)));yield{left:g,rights:v||[]}}}e.join=r;function u(...d){return[].concat(...d)}e.concatArrays=u;function i(d,n){return d[n]}e.elementAtOrUndefined=i;function f(d,n){let a=!1;return d.then(()=>{a||n()}),(0,R.toDisposable)(()=>{a=!0})}e.thenIfNotDisposed=f;function c(d,n){return Object.assign(d,n)}e.setFields=c;function l(d,n){const a={};for(const o in d)a[o]=d[o];for(const o in n){const g=n[o];typeof a[o]=="object"&&g&&typeof g=="object"?a[o]=l(a[o],g):a[o]=g}return a}e.deepMerge=l;let s=class{constructor(n,a){this.key=n,this.storageService=a,this.hasValue=!1,this.value=void 0}get(){if(!this.hasValue){const n=this.storageService.get(this.key,0);if(n!==void 0)try{this.value=JSON.parse(n)}catch(a){(0,p.onUnexpectedError)(a)}this.hasValue=!0}return this.value}set(n){this.value=n,this.storageService.store(this.key,JSON.stringify(this.value),0,0)}};s=we([F(1,k.IStorageService)],s),e.PersistentStore=s}),define(ae[383],le([1,0,16,171,21,20,257,641,286,866]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentRangeMap=e.RangeMapping=e.DetailedLineRangeMapping=e.MappingAlignment=e.DocumentLineRangeMap=e.LineRangeMapping=void 0;class S{static join(l){return l.reduce((s,d)=>s?s.join(d):d,void 0)}constructor(l,s){this.inputRange=l,this.outputRange=s}extendInputRange(l){if(!l.containsRange(this.inputRange))throw new R.BugIndicatingError;const s=l.startLineNumber-this.inputRange.startLineNumber,d=l.endLineNumberExclusive-this.inputRange.endLineNumberExclusive;return new S(l,new I.LineRange(this.outputRange.startLineNumber+s,this.outputRange.lineCount-s+d))}join(l){return new S(this.inputRange.join(l.inputRange),this.outputRange.join(l.outputRange))}get resultingDeltaFromOriginalToModified(){return this.outputRange.endLineNumberExclusive-this.inputRange.endLineNumberExclusive}toString(){return`${this.inputRange.toString()} -> ${this.outputRange.toString()}`}addOutputLineDelta(l){return new S(this.inputRange,this.outputRange.delta(l))}addInputLineDelta(l){return new S(this.inputRange.delta(l),this.outputRange)}reverse(){return new S(this.outputRange,this.inputRange)}}e.LineRangeMapping=S;class C{static betweenOutputs(l,s,d){const a=r.compute(l,s).map(o=>new S(o.output1Range,o.output2Range));return new C(a,d)}constructor(l,s){this.lineRangeMappings=l,this.inputLineCount=s,(0,p.assertFn)(()=>(0,p.checkAdjacentItems)(l,(d,n)=>d.inputRange.isBefore(n.inputRange)&&d.outputRange.isBefore(n.outputRange)&&n.inputRange.startLineNumber-d.inputRange.endLineNumberExclusive===n.outputRange.startLineNumber-d.outputRange.endLineNumberExclusive))}project(l){const s=(0,t.findLast)(this.lineRangeMappings,a=>a.inputRange.startLineNumber<=l);if(!s)return new S(new I.LineRange(l,1),new I.LineRange(l,1));if(s.inputRange.contains(l))return s;const d=new I.LineRange(l,1),n=new I.LineRange(l+s.outputRange.endLineNumberExclusive-s.inputRange.endLineNumberExclusive,1);return new S(d,n)}get outputLineCount(){const l=(0,t.lastOrDefault)(this.lineRangeMappings),s=l?l.outputRange.endLineNumberExclusive-l.inputRange.endLineNumberExclusive:0;return this.inputLineCount+s}reverse(){return new C(this.lineRangeMappings.map(l=>l.reverse()),this.outputLineCount)}}e.DocumentLineRangeMap=C;class r{static compute(l,s){const d=(0,t.compareBy)(m=>m.inputRange.startLineNumber,t.numberComparator),n=(0,k.concatArrays)(l.map(m=>({source:0,diff:m})),s.map(m=>({source:1,diff:m}))).sort((0,t.compareBy)(m=>m.diff,d)),a=[new Array,new Array],o=[0,0],g=new Array;function h(m){const w=S.join(a[0])||new S(m,m.delta(o[0])),D=S.join(a[1])||new S(m,m.delta(o[1]));g.push(new r(v,w.extendInputRange(v).outputRange,a[0],D.extendInputRange(v).outputRange,a[1])),a[0]=[],a[1]=[]}let v;for(const m of n){const w=m.diff.inputRange;v&&!v.touches(w)&&(h(v),v=void 0),o[m.source]=m.diff.resultingDeltaFromOriginalToModified,v=v?v.join(w):w,a[m.source].push(m.diff)}return v&&h(v),g}constructor(l,s,d,n,a){this.inputRange=l,this.output1Range=s,this.output1LineMappings=d,this.output2Range=n,this.output2LineMappings=a}toString(){return`${this.output1Range} <- ${this.inputRange} -> ${this.output2Range}`}}e.MappingAlignment=r;class u extends S{static join(l){return l.reduce((s,d)=>s?s.join(d):d,void 0)}constructor(l,s,d,n,a){super(l,d),this.inputTextModel=s,this.outputTextModel=n,this.rangeMappings=a||[new i(this.inputRange.toRange(),this.outputRange.toRange())],(0,p.assertFn)(()=>{for(const o of this.rangeMappings){const g=l.startLineNumber<=o.inputRange.startLineNumber&&o.inputRange.endLineNumber<=l.endLineNumberExclusive&&(o.inputRange.endLineNumber!==l.endLineNumberExclusive||o.inputRange.endColumn===1),h=d.startLineNumber<=o.outputRange.startLineNumber&&o.outputRange.endLineNumber<=d.endLineNumberExclusive&&(o.outputRange.endLineNumber!==d.endLineNumberExclusive||o.outputRange.endColumn===1);if(!g||!h)return!1}return!0})}addOutputLineDelta(l){return new u(this.inputRange,this.inputTextModel,this.outputRange.delta(l),this.outputTextModel,this.rangeMappings.map(s=>s.addOutputLineDelta(l)))}addInputLineDelta(l){return new u(this.inputRange.delta(l),this.inputTextModel,this.outputRange,this.outputTextModel,this.rangeMappings.map(s=>s.addInputLineDelta(l)))}join(l){return new u(this.inputRange.join(l.inputRange),this.inputTextModel,this.outputRange.join(l.outputRange),this.outputTextModel)}getLineEdit(){return new E.LineRangeEdit(this.inputRange,this.getOutputLines())}getReverseLineEdit(){return new E.LineRangeEdit(this.outputRange,this.getInputLines())}getOutputLines(){return this.outputRange.getLines(this.outputTextModel)}getInputLines(){return this.inputRange.getLines(this.inputTextModel)}}e.DetailedLineRangeMapping=u;class i{constructor(l,s){this.inputRange=l,this.outputRange=s}toString(){function l(s){return`[${s.startLineNumber}:${s.startColumn}, ${s.endLineNumber}:${s.endColumn})`}return`${l(this.inputRange)} -> ${l(this.outputRange)}`}addOutputLineDelta(l){return new i(this.inputRange,new A.Range(this.outputRange.startLineNumber+l,this.outputRange.startColumn,this.outputRange.endLineNumber+l,this.outputRange.endColumn))}addInputLineDelta(l){return new i(new A.Range(this.inputRange.startLineNumber+l,this.inputRange.startColumn,this.inputRange.endLineNumber+l,this.inputRange.endColumn),this.outputRange)}reverse(){return new i(this.outputRange,this.inputRange)}}e.RangeMapping=i;class f{constructor(l,s){this.rangeMappings=l,this.inputLineCount=s,(0,p.assertFn)(()=>(0,p.checkAdjacentItems)(l,(d,n)=>(0,b.rangeIsBeforeOrTouching)(d.inputRange,n.inputRange)&&(0,b.rangeIsBeforeOrTouching)(d.outputRange,n.outputRange)))}project(l){const s=(0,t.findLast)(this.rangeMappings,a=>a.inputRange.getStartPosition().isBeforeOrEqual(l));if(!s)return new i(A.Range.fromPositions(l,l),A.Range.fromPositions(l,l));if((0,b.rangeContainsPosition)(s.inputRange,l))return s;const d=(0,b.lengthBetweenPositions)(s.inputRange.getEndPosition(),l),n=(0,b.addLength)(s.outputRange.getEndPosition(),d);return new i(A.Range.fromPositions(l),A.Range.fromPositions(n))}projectRange(l){const s=this.project(l.getStartPosition()),d=this.project(l.getEndPosition());return new i(s.inputRange.plusRange(d.inputRange),s.outputRange.plusRange(d.outputRange))}get outputLineCount(){const l=(0,t.lastOrDefault)(this.rangeMappings),s=l?l.outputRange.endLineNumber-l.inputRange.endLineNumber:0;return this.inputLineCount+s}reverse(){return new f(this.rangeMappings.map(l=>l.reverse()),this.outputLineCount)}}e.DocumentRangeMap=f}),define(ae[2324],le([1,0,171,159,13,20,8,286,383]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeDiffComputer=void 0;let b=class{constructor(l,s){this.documentDiffProvider=l,this.configurationService=s,this.mergeAlgorithm=(0,p.observableFromEvent)(this.configurationService.onDidChangeConfiguration,()=>this.configurationService.getValue("mergeEditor.diffAlgorithm"))}async computeDiff(l,s,d){const n=this.mergeAlgorithm.read(d),a=await this.documentDiffProvider.computeDiff(l,s,{ignoreTrimWhitespace:!1,maxComputationTime:0,diffAlgorithm:n});if(l.isDisposed()||s.isDisposed())return{diffs:null};const o=a.changes.map(g=>new I.DetailedLineRangeMapping(S(g.originalRange),l,S(g.modifiedRange),s,g.innerChanges?.map(h=>r(C(h),l,s)).filter(R.isDefined)));return(0,t.assertFn)(()=>(0,t.checkAdjacentItems)(o,(g,h)=>h.inputRange.startLineNumber-g.inputRange.endLineNumberExclusive===h.outputRange.startLineNumber-g.outputRange.endLineNumberExclusive&&g.inputRange.endLineNumberExclusive<h.inputRange.startLineNumber&&g.outputRange.endLineNumberExclusive<h.outputRange.startLineNumber)),{diffs:o}}};b=we([F(1,k.IConfigurationService)],b),e.MergeDiffComputer=b;function S(c){return new E.LineRange(c.startLineNumber,c.length)}function C(c){return new I.RangeMapping(c.originalRange,c.modifiedRange)}function r(c,l,s){const d=c.inputRange.isEmpty(),n=c.outputRange.isEmpty();if(d&&n)return;if(c.inputRange.startLineNumber>l.getLineCount()||c.outputRange.startLineNumber>s.getLineCount())return c;const a=u(c.inputRange.startLineNumber,c.inputRange.startColumn,l),o=u(c.outputRange.startLineNumber,c.outputRange.startColumn,s);return!d&&!n&&a&&o?new I.RangeMapping(c.inputRange.setStartPosition(c.inputRange.startLineNumber+1,1),c.outputRange.setStartPosition(c.outputRange.startLineNumber+1,1)):o&&a&&(d&&i(c.outputRange,s)||n&&i(c.inputRange,l))?new I.RangeMapping(f(c.inputRange),f(c.outputRange)):c}function u(c,l,s){return l>=s.getLineMaxColumn(c)}function i(c,l){return u(c.endLineNumber,c.endColumn,l)}function f(c){return new A.Range(c.startLineNumber+1,1,c.endLineNumber+1,1)}}),define(ae[867],le([1,0,16,21,28,50,20,641,383,257]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputState=e.ModifiedBaseRangeState=e.ModifiedBaseRangeStateUnrecognized=e.ModifiedBaseRangeStateBoth=e.ModifiedBaseRangeStateInput2=e.ModifiedBaseRangeStateInput1=e.ModifiedBaseRangeStateBase=e.AbstractModifiedBaseRangeState=e.getOtherInputNumber=e.ModifiedBaseRangeStateKind=e.ModifiedBaseRange=void 0;class S{static fromDiffs(g,h,v,m,w){return I.MappingAlignment.compute(g,h).map(y=>new S(y.inputRange,v,y.output1Range,m,y.output1LineMappings,y.output2Range,w,y.output2LineMappings))}constructor(g,h,v,m,w,D,y,T){if(this.baseRange=g,this.baseTextModel=h,this.input1Range=v,this.input1TextModel=m,this.input1Diffs=w,this.input2Range=D,this.input2TextModel=y,this.input2Diffs=T,this.input1CombinedDiff=I.DetailedLineRangeMapping.join(this.input1Diffs),this.input2CombinedDiff=I.DetailedLineRangeMapping.join(this.input2Diffs),this.smartInput1LineRangeEdit=null,this.smartInput2LineRangeEdit=null,this.dumbInput1LineRangeEdit=null,this.dumbInput2LineRangeEdit=null,this.input1Diffs.length===0&&this.input2Diffs.length===0)throw new p.BugIndicatingError("must have at least one diff")}getInputRange(g){return g===1?this.input1Range:this.input2Range}getInputCombinedDiff(g){return g===1?this.input1CombinedDiff:this.input2CombinedDiff}getInputDiffs(g){return g===1?this.input1Diffs:this.input2Diffs}get isConflicting(){return this.input1Diffs.length>0&&this.input2Diffs.length>0}get canBeCombined(){return this.smartCombineInputs(1)!==void 0}get isOrderRelevant(){const g=this.smartCombineInputs(1),h=this.smartCombineInputs(2);return!g||!h?!1:!g.equals(h)}getEditForBase(g){const h=[];if(g.includesInput1&&this.input1CombinedDiff&&h.push({diff:this.input1CombinedDiff,inputNumber:1}),g.includesInput2&&this.input2CombinedDiff&&h.push({diff:this.input2CombinedDiff,inputNumber:2}),h.length===0)return{edit:void 0,effectiveState:n.base};if(h.length===1)return{edit:h[0].diff.getLineEdit(),effectiveState:n.base.withInputValue(h[0].inputNumber,!0,!1)};if(g.kind!==r.both)throw new p.BugIndicatingError;const v=g.smartCombination?this.smartCombineInputs(g.firstInput):this.dumbCombineInputs(g.firstInput);return v?{edit:v,effectiveState:g}:{edit:h[u(g.firstInput)-1].diff.getLineEdit(),effectiveState:n.base.withInputValue(u(g.firstInput),!0,!1)}}smartCombineInputs(g){if(g===1&&this.smartInput1LineRangeEdit!==null)return this.smartInput1LineRangeEdit;if(g===2&&this.smartInput2LineRangeEdit!==null)return this.smartInput2LineRangeEdit;const v=(0,b.concatArrays)(this.input1Diffs.flatMap(w=>w.rangeMappings.map(D=>({diff:D,input:1}))),this.input2Diffs.flatMap(w=>w.rangeMappings.map(D=>({diff:D,input:2})))).sort((0,t.tieBreakComparators)((0,t.compareBy)(w=>w.diff.inputRange,k.Range.compareRangesUsingStarts),(0,t.compareBy)(w=>w.input===g?1:2,t.numberComparator))).map(w=>{const D=w.input===1?this.input1TextModel:this.input2TextModel;return new E.RangeEdit(w.diff.inputRange,D.getValueInRange(w.diff.outputRange))}),m=C(this.baseRange,v,this.baseTextModel);return g===1?this.smartInput1LineRangeEdit=m:this.smartInput2LineRangeEdit=m,m}dumbCombineInputs(g){if(g===1&&this.dumbInput1LineRangeEdit!==null)return this.dumbInput1LineRangeEdit;if(g===2&&this.dumbInput2LineRangeEdit!==null)return this.dumbInput2LineRangeEdit;let h=this.input1Range.getLines(this.input1TextModel),v=this.input2Range.getLines(this.input2TextModel);g===2&&([h,v]=[v,h]);const m=new E.LineRangeEdit(this.baseRange,h.concat(v));return g===1?this.dumbInput1LineRangeEdit=m:this.dumbInput2LineRangeEdit=m,m}}e.ModifiedBaseRange=S;function C(o,g,h){let v="";const m=o.startLineNumber>1;let w=m?new A.Position(o.startLineNumber-1,1073741824):new A.Position(o.startLineNumber,1);for(const L of g){const M=L.range.getStartPosition();if(!w.isBeforeOrEqual(M))return;let O=h.getValueInRange(k.Range.fromPositions(w,M));M.lineNumber>h.getLineCount()&&(O+=` `),v+=O,v+=L.newText,w=L.range.getEndPosition()}const D=o.endLineNumberExclusive<=h.getLineCount(),y=D?new A.Position(o.endLineNumberExclusive,1):new A.Position(o.endLineNumberExclusive-1,1073741824);v+=h.getValueInRange(k.Range.fromPositions(w,y));const _=(0,R.splitLines)(v);if(m){if(_[0]!=="")return;_.shift()}if(D){if(_[_.length-1]!=="")return;_.pop()}return new E.LineRangeEdit(o,_)}var r;(function(o){o[o.base=0]="base",o[o.input1=1]="input1",o[o.input2=2]="input2",o[o.both=3]="both",o[o.unrecognized=4]="unrecognized"})(r=e.ModifiedBaseRangeStateKind||(e.ModifiedBaseRangeStateKind={}));function u(o){return o===1?2:1}e.getOtherInputNumber=u;class i{constructor(){}get includesInput1(){return!1}get includesInput2(){return!1}includesInput(g){return g===1?this.includesInput1:this.includesInput2}isInputIncluded(g){return g===1?this.includesInput1:this.includesInput2}toggle(g){return this.withInputValue(g,!this.includesInput(g),!0)}getInput(g){return this.isInputIncluded(g)?1:0}}e.AbstractModifiedBaseRangeState=i;class f extends i{get kind(){return r.base}toString(){return"base"}swap(){return this}withInputValue(g,h,v=!1){return g===1?h?new c:this:h?new l:this}equals(g){return g.kind===r.base}}e.ModifiedBaseRangeStateBase=f;class c extends i{get kind(){return r.input1}get includesInput1(){return!0}toString(){return"1\u2713"}swap(){return new l}withInputValue(g,h,v=!1){return g===1?h?this:new f:h?new s(1,v):new l}equals(g){return g.kind===r.input1}}e.ModifiedBaseRangeStateInput1=c;class l extends i{get kind(){return r.input2}get includesInput2(){return!0}toString(){return"2\u2713"}swap(){return new c}withInputValue(g,h,v=!1){return g===2?h?this:new f:h?new s(2,v):new l}equals(g){return g.kind===r.input2}}e.ModifiedBaseRangeStateInput2=l;class s extends i{constructor(g,h){super(),this.firstInput=g,this.smartCombination=h}get kind(){return r.both}get includesInput1(){return!0}get includesInput2(){return!0}toString(){return"2\u2713"}swap(){return new s(u(this.firstInput),this.smartCombination)}withInputValue(g,h,v=!1){return h?this:g===1?new l:new c}equals(g){return g.kind===r.both&&this.firstInput===g.firstInput&&this.smartCombination===g.smartCombination}getInput(g){return g===this.firstInput?1:2}}e.ModifiedBaseRangeStateBoth=s;class d extends i{get kind(){return r.unrecognized}toString(){return"unrecognized"}swap(){return this}withInputValue(g,h,v=!1){return h?g===1?new c:new l:this}equals(g){return g.kind===r.unrecognized}}e.ModifiedBaseRangeStateUnrecognized=d;var n;(function(o){o.base=new f,o.unrecognized=new d})(n=e.ModifiedBaseRangeState||(e.ModifiedBaseRangeState={}));var a;(function(o){o[o.excluded=0]="excluded",o[o.first=1]="first",o[o.second=2]="second",o[o.unrecognized=3]="unrecognized"})(a=e.InputState||(e.InputState={}))}),define(ae[2325],le([1,0,16,21,2,383,641,286,257,159]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelDiffState=e.TextModelDiffChangeReason=e.TextModelDiffs=void 0;class S extends R.Disposable{constructor(i,f,c){super(),this.baseTextModel=i,this.textModel=f,this.diffComputer=c,this.recomputeCount=0,this._state=(0,b.observableValue)("LiveDiffState",1),this._diffs=(0,b.observableValue)("LiveDiffs",[]),this.barrier=new I.ReentrancyBarrier,this.isDisposed=!1,this.isInitializing=!0;const l=(0,b.observableSignal)("recompute");this._register((0,b.autorun)("Update diff state",s=>{l.read(s),this.recompute(s)})),this._register(i.onDidChangeContent(this.barrier.makeExclusive(()=>{l.trigger(void 0)}))),this._register(f.onDidChangeContent(this.barrier.makeExclusive(()=>{l.trigger(void 0)}))),this._register((0,R.toDisposable)(()=>{this.isDisposed=!0}))}get state(){return this._state}get diffs(){return this._diffs}recompute(i){this.recomputeCount++;const f=this.recomputeCount;this._state.get()===1&&(this.isInitializing=!0),(0,b.transaction)(l=>{this._state.set(this.isInitializing?1:3,l,0)}),this.diffComputer.computeDiff(this.baseTextModel,this.textModel,i).then(l=>{this.isDisposed||f===this.recomputeCount&&(0,b.transaction)(s=>{l.diffs?(this._state.set(2,s,1),this._diffs.set(l.diffs,s,1)):this._state.set(4,s,1),this.isInitializing=!1})})}ensureUpToDate(){if(this.state.get()!==2)throw new p.BugIndicatingError("Cannot remove diffs when the model is not up to date")}removeDiffs(i,f){this.ensureUpToDate(),i.sort((0,t.compareBy)(l=>l.inputRange.startLineNumber,t.numberComparator)),i.reverse();let c=this._diffs.get();for(const l of i){const s=c.length;if(c=c.filter(d=>d!==l),s===c.length)throw new p.BugIndicatingError;this.barrier.runExclusivelyOrThrow(()=>{l.getReverseLineEdit().apply(this.textModel)}),c=c.map(d=>d.outputRange.isAfter(l.outputRange)?d.addOutputLineDelta(l.inputRange.lineCount-l.outputRange.lineCount):d)}this._diffs.set(c,f,0)}applyEditRelativeToOriginal(i,f){this.ensureUpToDate();const c=new A.DetailedLineRangeMapping(i.range,this.baseTextModel,new E.LineRange(i.range.startLineNumber,i.newLines.length),this.textModel);let l=!1,s=0;const d=new Array;for(const n of this.diffs.get()){if(n.inputRange.touches(i.range))throw new p.BugIndicatingError("Edit must be conflict free.");n.inputRange.isAfter(i.range)?(l||(l=!0,d.push(c.addOutputLineDelta(s))),d.push(n.addOutputLineDelta(i.newLines.length-i.range.lineCount))):d.push(n),l||(s+=n.outputRange.lineCount-n.inputRange.lineCount)}l||(l=!0,d.push(c.addOutputLineDelta(s))),this.barrier.runExclusivelyOrThrow(()=>{new k.LineRangeEdit(i.range.delta(s),i.newLines).apply(this.textModel)}),this._diffs.set(d,f,0)}findTouchingDiffs(i){return this.diffs.get().filter(f=>f.inputRange.touches(i))}getResultLine(i,f){let c=0;const l=f?this.diffs.read(f):this.diffs.get();for(const s of l){if(s.inputRange.contains(i)||s.inputRange.endLineNumberExclusive===i)return s;if(s.inputRange.endLineNumberExclusive<i)c=s.resultingDeltaFromOriginalToModified;else break}return i+c}getResultLineRange(i,f){let c=this.getResultLine(i.startLineNumber,f);typeof c!="number"&&(c=c.outputRange.startLineNumber);let l=this.getResultLine(i.endLineNumberExclusive,f);return typeof l!="number"&&(l=l.outputRange.endLineNumberExclusive),E.LineRange.fromLineNumbers(c,l)}}e.TextModelDiffs=S;var C;(function(u){u[u.other=0]="other",u[u.textChange=1]="textChange"})(C=e.TextModelDiffChangeReason||(e.TextModelDiffChangeReason={}));var r;(function(u){u[u.initializing=1]="initializing",u[u.upToDate=2]="upToDate",u[u.updating=3]="updating",u[u.error=4]="error"})(r=e.TextModelDiffState||(e.TextModelDiffState={}))}),define(ae[2326],le([1,0,16,21,159,42,54,255,286,383,2325,257,867]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorModelState=e.MergeEditorModel=void 0;let u=class extends E.EditorModel{constructor(l,s,d,n,a,o,g,h,v,m){super(),this.base=l,this.input1=s,this.input2=d,this.resultTextModel=n,this.diffComputer=a,this.diffComputerConflictProjection=o,this.options=g,this.telemetry=h,this.modelService=v,this.languageService=m,this.input1TextModelDiffs=this._register(new S.TextModelDiffs(this.base,this.input1.textModel,this.diffComputer)),this.input2TextModelDiffs=this._register(new S.TextModelDiffs(this.base,this.input2.textModel,this.diffComputer)),this.resultTextModelDiffs=this._register(new S.TextModelDiffs(this.base,this.resultTextModel,this.diffComputerConflictProjection)),this.modifiedBaseRanges=(0,R.derived)("modifiedBaseRanges",D=>{const y=this.input1TextModelDiffs.diffs.read(D),T=this.input2TextModelDiffs.diffs.read(D);return r.ModifiedBaseRange.fromDiffs(y,T,this.base,this.input1.textModel,this.input2.textModel)}),this.modifiedBaseRangeResultStates=(0,R.derived)("modifiedBaseRangeResultStates",D=>new Map(this.modifiedBaseRanges.read(D).map(T=>[T,{accepted:(0,R.observableValue)(`BaseRangeState${T.baseRange}`,r.ModifiedBaseRangeState.base),handled:(0,R.observableValue)(`BaseRangeHandledState${T.baseRange}`,!1),computedFromDiffing:!1,previousNonDiffingState:void 0}]))),this.resultSnapshot=this.resultTextModel.createSnapshot(),this.baseInput1Diffs=this.input1TextModelDiffs.diffs,this.baseInput2Diffs=this.input2TextModelDiffs.diffs,this.baseResultDiffs=this.resultTextModelDiffs.diffs,this.input1ResultMapping=(0,R.derived)("input1ResultMapping",D=>this.getInputResultMapping(this.baseInput1Diffs.read(D),this.baseResultDiffs.read(D),this.input1.textModel.getLineCount())),this.resultInput1Mapping=(0,R.derived)("resultInput1Mapping",D=>this.input1ResultMapping.read(D).reverse()),this.input2ResultMapping=(0,R.derived)("input2ResultMapping",D=>this.getInputResultMapping(this.baseInput2Diffs.read(D),this.baseResultDiffs.read(D),this.input2.textModel.getLineCount())),this.resultInput2Mapping=(0,R.derived)("resultInput2Mapping",D=>this.input2ResultMapping.read(D).reverse()),this.baseResultMapping=(0,R.derived)("baseResultMapping",D=>{const y=new b.DocumentLineRangeMap(this.baseResultDiffs.read(D),-1);return new b.DocumentLineRangeMap(y.lineRangeMappings.map(T=>T.inputRange.isEmpty||T.outputRange.isEmpty?new b.LineRangeMapping(T.inputRange.deltaStart(-1),T.outputRange.deltaStart(-1)):T),y.inputLineCount)}),this.resultBaseMapping=(0,R.derived)("resultBaseMapping",D=>this.baseResultMapping.read(D).reverse()),this.diffComputingState=(0,R.derived)("diffComputingState",D=>{const y=[this.input1TextModelDiffs,this.input2TextModelDiffs,this.resultTextModelDiffs].map(T=>T.state.read(D));return y.some(T=>T===1)?1:y.some(T=>T===3)?3:2}),this.inputDiffComputingState=(0,R.derived)("inputDiffComputingState",D=>{const y=[this.input1TextModelDiffs,this.input2TextModelDiffs].map(T=>T.state.read(D));return y.some(T=>T===1)?1:y.some(T=>T===3)?3:2}),this.isUpToDate=(0,R.derived)("isUpToDate",D=>this.diffComputingState.read(D)===2),this.onInitialized=(0,R.waitForState)(this.diffComputingState,D=>D===2).then(()=>{}),this.firstRun=!0,this.unhandledConflictsCount=(0,R.derived)("unhandledConflictsCount",D=>{const y=this.modifiedBaseRangeResultStates.read(D);let T=0;for(const[_,L]of y)L.handled.read(D)||T++;return T}),this.hasUnhandledConflicts=this.unhandledConflictsCount.map(D=>D>0),this._register((0,R.keepAlive)(this.modifiedBaseRangeResultStates)),this._register((0,R.keepAlive)(this.input1ResultMapping)),this._register((0,R.keepAlive)(this.input2ResultMapping));const w=this.initialize();this.onInitialized=this.onInitialized.then(async()=>{await w}),w.then(()=>{let D=!0;this._register((0,R.autorunHandleChanges)("Merge Editor Model: Recompute State From Result",{handleChange:y=>(y.didChange(this.modifiedBaseRangeResultStates)&&(D=!0),y.didChange(this.resultTextModelDiffs.diffs)?y.change===1:!0)},y=>{const T=this.modifiedBaseRangeResultStates.read(y);if(!this.isUpToDate.read(y))return;const _=this.resultTextModelDiffs.diffs.read(y);(0,R.transaction)(L=>{if(this.updateBaseRangeAcceptedState(_,T,L),D){D=!1;for(const[M,O]of T){const N=O.accepted.get();O.handled.set(!(N.kind===r.ModifiedBaseRangeStateKind.base||N.kind===r.ModifiedBaseRangeStateKind.unrecognized),L)}}})}))})}async initialize(){this.options.resetResult&&await this.reset()}async reset(){await(0,R.waitForState)(this.inputDiffComputingState,s=>s===2);const l=this.modifiedBaseRangeResultStates.get();(0,R.transaction)(s=>{for(const[d,n]of l){let a,o=!1;d.input1Diffs.length===0?(a=r.ModifiedBaseRangeState.base.withInputValue(2,!0),o=!0):d.input2Diffs.length===0?(a=r.ModifiedBaseRangeState.base.withInputValue(1,!0),o=!0):(a=r.ModifiedBaseRangeState.base,o=!1),n.accepted.set(a,s),n.computedFromDiffing=!1,n.previousNonDiffingState=void 0,n.handled.set(o,s)}this.resultTextModel.setValue(this.computeAutoMergedResult())})}computeAutoMergedResult(){const l=this.modifiedBaseRanges.get(),s=this.base.getLinesContent(),d=this.input1.textModel.getLinesContent(),n=this.input2.textModel.getLinesContent(),a=[];function o(h,v){for(let m=v.startLineNumber;m<v.endLineNumberExclusive;m++)a.push(h[m-1])}let g=1;for(const h of l)o(s,I.LineRange.fromLineNumbers(g,h.baseRange.startLineNumber)),g=h.baseRange.endLineNumberExclusive,h.input1Diffs.length===0?o(n,h.input2Range):h.input2Diffs.length===0?o(d,h.input1Range):o(s,h.baseRange);return o(s,I.LineRange.fromLineNumbers(g,s.length+1)),a.join(this.resultTextModel.getEOL())}hasBaseRange(l){return this.modifiedBaseRangeResultStates.get().has(l)}getInputResultMapping(l,s,d){const n=b.DocumentLineRangeMap.betweenOutputs(l,s,d);return new b.DocumentLineRangeMap(n.lineRangeMappings.map(a=>a.inputRange.isEmpty||a.outputRange.isEmpty?new b.LineRangeMapping(a.inputRange.deltaStart(-1),a.outputRange.deltaStart(-1)):a),n.inputLineCount)}translateInputRangeToBase(l,s){const d=l===1?this.baseInput1Diffs.get():this.baseInput2Diffs.get();return new b.DocumentRangeMap(d.flatMap(a=>a.rangeMappings),0).reverse().projectRange(s).outputRange}translateBaseRangeToInput(l,s){const d=l===1?this.baseInput1Diffs.get():this.baseInput2Diffs.get();return new b.DocumentRangeMap(d.flatMap(a=>a.rangeMappings),0).projectRange(s).outputRange}getLineRangeInResult(l,s){return this.resultTextModelDiffs.getResultLineRange(l,s)}translateResultRangeToBase(l){return new b.DocumentRangeMap(this.baseResultDiffs.get().flatMap(d=>d.rangeMappings),0).reverse().projectRange(l).outputRange}translateBaseRangeToResult(l){return new b.DocumentRangeMap(this.baseResultDiffs.get().flatMap(d=>d.rangeMappings),0).projectRange(l).outputRange}findModifiedBaseRangesInRange(l){return this.modifiedBaseRanges.get().filter(s=>s.baseRange.intersects(l))}updateBaseRangeAcceptedState(l,s,d){const n=(0,C.leftJoin)(s,l,(a,o)=>a[0].baseRange.touches(o.inputRange)?t.CompareResult.neitherLessOrGreaterThan:I.LineRange.compareByStart(a[0].baseRange,o.inputRange));for(const a of n){const o=this.computeState(a.left[0],a.rights),g=a.left[1],h=g.accepted.get();h.equals(o)||(!this.firstRun&&!g.computedFromDiffing&&(g.computedFromDiffing=!0,g.previousNonDiffingState=h),g.accepted.set(o,d))}this.firstRun&&(this.firstRun=!1)}computeState(l,s){if(s.length===0)return r.ModifiedBaseRangeState.base;const d=s.map(o=>o.getLineEdit());function n(o){return(0,t.equals)(d,o.map(g=>g.getLineEdit()),(g,h)=>g.equals(h))}if(n(l.input1Diffs))return r.ModifiedBaseRangeState.base.withInputValue(1,!0);if(n(l.input2Diffs))return r.ModifiedBaseRangeState.base.withInputValue(2,!0);const a=[r.ModifiedBaseRangeState.base.withInputValue(1,!0).withInputValue(2,!0,!0),r.ModifiedBaseRangeState.base.withInputValue(2,!0).withInputValue(1,!0,!0),r.ModifiedBaseRangeState.base.withInputValue(1,!0).withInputValue(2,!0,!1),r.ModifiedBaseRangeState.base.withInputValue(2,!0).withInputValue(1,!0,!1)];for(const o of a){const{edit:g}=l.getEditForBase(o);if(g){const v=this.resultTextModelDiffs.getResultLineRange(l.baseRange).getLines(this.resultTextModel);if((0,t.equals)(g.newLines,v,(m,w)=>m===w))return o}}return r.ModifiedBaseRangeState.unrecognized}getState(l){const s=this.modifiedBaseRangeResultStates.get().get(l);if(!s)throw new p.BugIndicatingError("object must be from this instance");return s.accepted}setState(l,s,d,n,a=!1){if(!this.isUpToDate.get())throw new p.BugIndicatingError("Cannot set state while updating");const o=this.modifiedBaseRangeResultStates.get().get(l);if(!o)throw new p.BugIndicatingError("object must be from this instance");const g=this.resultTextModelDiffs.findTouchingDiffs(l.baseRange);g&&this.resultTextModelDiffs.removeDiffs(g,n);const{edit:h,effectiveState:v}=l.getEditForBase(s);o.accepted.set(v,n),o.previousNonDiffingState=void 0,o.computedFromDiffing=!1,h&&(a&&this.resultTextModel.pushStackElement(),this.resultTextModelDiffs.applyEditRelativeToOriginal(h,n),a&&this.resultTextModel.pushStackElement()),d&&o.handled.set(!0,n)}resetDirtyConflictsToBase(){(0,R.transaction)(l=>{this.resultTextModel.pushStackElement();for(const s of this.modifiedBaseRanges.get())this.getState(s).get().kind===r.ModifiedBaseRangeStateKind.unrecognized&&this.setState(s,r.ModifiedBaseRangeState.base,!1,l,!1);this.resultTextModel.pushStackElement()})}isHandled(l){return this.modifiedBaseRangeResultStates.get().get(l).handled}setHandled(l,s,d){const n=this.modifiedBaseRangeResultStates.get().get(l);n.handled.get()!==s&&n.handled.set(s,d)}setLanguageId(l,s){const d=this.languageService.createById(l);this.modelService.setMode(this.base,d,s),this.modelService.setMode(this.input1.textModel,d,s),this.modelService.setMode(this.input2.textModel,d,s),this.modelService.setMode(this.resultTextModel,d,s)}getInitialResultValue(){const l=[];for(;;){const s=this.resultSnapshot.read();if(s===null)break;l.push(s)}return l.join()}async getResultValueWithConflictMarkers(){if(await(0,R.waitForState)(this.diffComputingState,h=>h===2),this.unhandledConflictsCount.get()===0)return this.resultTextModel.getValue();const l=this.resultTextModel.getLinesContent(),s=this.input1.textModel.getLinesContent(),d=this.input2.textModel.getLinesContent(),n=this.modifiedBaseRangeResultStates.get(),a=[];function o(h,v){for(let m=v.startLineNumber;m<v.endLineNumberExclusive;m++)a.push(h[m-1])}let g=1;for(const[h,v]of n){if(v.handled.get())continue;const m=this.resultTextModelDiffs.getResultLineRange(h.baseRange);o(l,I.LineRange.fromLineNumbers(g,Math.max(g,m.startLineNumber))),g=m.endLineNumberExclusive,a.push("<<<<<<<"),v.accepted.get().kind===r.ModifiedBaseRangeStateKind.unrecognized?o(l,m):o(s,h.input1Range),a.push("======="),o(d,h.input2Range),a.push(">>>>>>>")}return o(l,I.LineRange.fromLineNumbers(g,l.length+1)),a.join(` `)}get conflictCount(){return i(this.modifiedBaseRanges.get(),l=>l.isConflicting)}get combinableConflictCount(){return i(this.modifiedBaseRanges.get(),l=>l.isConflicting&&l.canBeCombined)}get conflictsResolvedWithBase(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>l.isConflicting&&s.accepted.get().kind===r.ModifiedBaseRangeStateKind.base)}get conflictsResolvedWithInput1(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>l.isConflicting&&s.accepted.get().kind===r.ModifiedBaseRangeStateKind.input1)}get conflictsResolvedWithInput2(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>l.isConflicting&&s.accepted.get().kind===r.ModifiedBaseRangeStateKind.input2)}get conflictsResolvedWithSmartCombination(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&d.kind===r.ModifiedBaseRangeStateKind.both&&d.smartCombination})}get manuallySolvedConflictCountThatEqualNone(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>l.isConflicting&&s.accepted.get().kind===r.ModifiedBaseRangeStateKind.unrecognized)}get manuallySolvedConflictCountThatEqualSmartCombine(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&s.computedFromDiffing&&d.kind===r.ModifiedBaseRangeStateKind.both&&d.smartCombination})}get manuallySolvedConflictCountThatEqualInput1(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&s.computedFromDiffing&&d.kind===r.ModifiedBaseRangeStateKind.input1})}get manuallySolvedConflictCountThatEqualInput2(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&s.computedFromDiffing&&d.kind===r.ModifiedBaseRangeStateKind.input2})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithBase(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&d.kind===r.ModifiedBaseRangeStateKind.unrecognized&&s.previousNonDiffingState?.kind===r.ModifiedBaseRangeStateKind.base})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&d.kind===r.ModifiedBaseRangeStateKind.unrecognized&&s.previousNonDiffingState?.kind===r.ModifiedBaseRangeStateKind.input1})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&d.kind===r.ModifiedBaseRangeStateKind.unrecognized&&s.previousNonDiffingState?.kind===r.ModifiedBaseRangeStateKind.input2})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&d.kind===r.ModifiedBaseRangeStateKind.unrecognized&&s.previousNonDiffingState?.kind===r.ModifiedBaseRangeStateKind.both&&!s.previousNonDiffingState?.smartCombination})}get manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart(){return i(this.modifiedBaseRangeResultStates.get().entries(),([l,s])=>{const d=s.accepted.get();return l.isConflicting&&d.kind===r.ModifiedBaseRangeStateKind.unrecognized&&s.previousNonDiffingState?.kind===r.ModifiedBaseRangeStateKind.both&&s.previousNonDiffingState?.smartCombination})}};u=we([F(8,k.IModelService),F(9,A.ILanguageService)],u),e.MergeEditorModel=u;function i(c,l){let s=0;for(const d of c)l(d)&&s++;return s}var f;(function(c){c[c.initializing=1]="initializing",c[c.upToDate=2]="upToDate",c[c.updating=3]="updating"})(f=e.MergeEditorModelState||(e.MergeEditorModelState={}))}),define(ae[528],le([1,0,1739,33]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.conflictInput2Background=e.conflictInput1Background=e.conflictingLinesBackground=e.unhandledConflictMinimapOverViewRulerColor=e.handledConflictMinimapOverViewRulerColor=e.conflictBorderHandledFocused=e.conflictBorderHandledUnfocused=e.conflictBorderUnhandledFocused=e.conflictBorderUnhandledUnfocused=e.diffWordBase=e.diffBase=e.diffWord=e.diff=void 0,e.diff=(0,p.registerColor)("mergeEditor.change.background",{dark:"#9bb95533",light:"#9bb95533",hcDark:"#9bb95533",hcLight:"#9bb95533"},(0,t.localize)(0,null)),e.diffWord=(0,p.registerColor)("mergeEditor.change.word.background",{dark:"#9ccc2c33",light:"#9ccc2c66",hcDark:"#9ccc2c33",hcLight:"#9ccc2c66"},(0,t.localize)(1,null)),e.diffBase=(0,p.registerColor)("mergeEditor.changeBase.background",{dark:"#4B1818FF",light:"#FFCCCCFF",hcDark:"#4B1818FF",hcLight:"#FFCCCCFF"},(0,t.localize)(2,null)),e.diffWordBase=(0,p.registerColor)("mergeEditor.changeBase.word.background",{dark:"#6F1313FF",light:"#FFA3A3FF",hcDark:"#6F1313FF",hcLight:"#FFA3A3FF"},(0,t.localize)(3,null)),e.conflictBorderUnhandledUnfocused=(0,p.registerColor)("mergeEditor.conflict.unhandledUnfocused.border",{dark:"#ffa6007a",light:"#ffa600FF",hcDark:"#ffa6007a",hcLight:"#ffa6007a"},(0,t.localize)(4,null)),e.conflictBorderUnhandledFocused=(0,p.registerColor)("mergeEditor.conflict.unhandledFocused.border",{dark:"#ffa600",light:"#ffa600",hcDark:"#ffa600",hcLight:"#ffa600"},(0,t.localize)(5,null)),e.conflictBorderHandledUnfocused=(0,p.registerColor)("mergeEditor.conflict.handledUnfocused.border",{dark:"#86868649",light:"#86868649",hcDark:"#86868649",hcLight:"#86868649"},(0,t.localize)(6,null)),e.conflictBorderHandledFocused=(0,p.registerColor)("mergeEditor.conflict.handledFocused.border",{dark:"#c1c1c1cc",light:"#c1c1c1cc",hcDark:"#c1c1c1cc",hcLight:"#c1c1c1cc"},(0,t.localize)(7,null)),e.handledConflictMinimapOverViewRulerColor=(0,p.registerColor)("mergeEditor.conflict.handled.minimapOverViewRuler",{dark:"#adaca8ee",light:"#adaca8ee",hcDark:"#adaca8ee",hcLight:"#adaca8ee"},(0,t.localize)(8,null)),e.unhandledConflictMinimapOverViewRulerColor=(0,p.registerColor)("mergeEditor.conflict.unhandled.minimapOverViewRuler",{dark:"#fcba03FF",light:"#fcba03FF",hcDark:"#fcba03FF",hcLight:"#fcba03FF"},(0,t.localize)(9,null)),e.conflictingLinesBackground=(0,p.registerColor)("mergeEditor.conflictingLines.background",{dark:"#ffea0047",light:"#ffea0047",hcDark:"#ffea0047",hcLight:"#ffea0047"},(0,t.localize)(10,null));const R=.4;e.conflictInput1Background=(0,p.registerColor)("mergeEditor.conflict.input1.background",{dark:(0,p.transparent)(p.mergeCurrentHeaderBackground,R),light:(0,p.transparent)(p.mergeCurrentHeaderBackground,R),hcDark:(0,p.transparent)(p.mergeCurrentHeaderBackground,R),hcLight:(0,p.transparent)(p.mergeCurrentHeaderBackground,R)},(0,t.localize)(11,null)),e.conflictInput2Background=(0,p.registerColor)("mergeEditor.conflict.input2.background",{dark:(0,p.transparent)(p.mergeIncomingHeaderBackground,R),light:(0,p.transparent)(p.mergeIncomingHeaderBackground,R),hcDark:(0,p.transparent)(p.mergeIncomingHeaderBackground,R),hcLight:(0,p.transparent)(p.mergeIncomingHeaderBackground,R)},(0,t.localize)(12,null))}),define(ae[642],le([1,0,10,2,159,286]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGutter=void 0;class k extends p.Disposable{constructor(b,S,C){super(),this._editor=b,this._domNode=S,this.itemProvider=C,this.scrollTop=(0,R.observableFromEvent)(this._editor.onDidScrollChange,i=>this._editor.getScrollTop()),this.isScrollTopZero=this.scrollTop.map(i=>i===0),this.modelAttached=(0,R.observableFromEvent)(this._editor.onDidChangeModel,i=>this._editor.hasModel()),this.editorOnDidChangeViewZones=(0,R.observableSignalFromEvent)("onDidChangeViewZones",this._editor.onDidChangeViewZones),this.editorOnDidContentSizeChange=(0,R.observableSignalFromEvent)("onDidContentSizeChange",this._editor.onDidContentSizeChange),this.domNodeSizeChanged=(0,R.observableSignal)("domNodeSizeChanged"),this.views=new Map,this._domNode.className="gutter monaco-editor";const r=this._domNode.appendChild((0,t.h)("div.scroll-decoration",{role:"presentation",ariaHidden:"true",style:{width:"100%"}}).root),u=new ResizeObserver(()=>{(0,R.transaction)(i=>{this.domNodeSizeChanged.trigger(i)})});u.observe(this._domNode),this._register((0,p.toDisposable)(()=>u.disconnect())),this._register((0,R.autorun)("update scroll decoration",i=>{r.className=this.isScrollTopZero.read(i)?"":"scroll-decoration"})),this._register((0,R.autorun)("EditorGutter.Render",i=>this.render(i)))}dispose(){super.dispose(),(0,t.reset)(this._domNode)}render(b){if(!this.modelAttached.read(b))return;this.domNodeSizeChanged.read(b),this.editorOnDidChangeViewZones.read(b),this.editorOnDidContentSizeChange.read(b);const S=this.scrollTop.read(b),C=this._editor.getVisibleRanges(),r=new Set(this.views.keys());if(C.length>0){const u=C[0],i=new A.LineRange(u.startLineNumber,u.endLineNumber-u.startLineNumber).deltaEnd(1),f=this.itemProvider.getIntersectingGutterItems(i,b);for(const c of f){if(!c.range.touches(i))continue;r.delete(c.id);let l=this.views.get(c.id);if(l)l.gutterItemView.update(c);else{const a=document.createElement("div");this._domNode.appendChild(a);const o=this.itemProvider.createView(c,a);l=new E(o,a),this.views.set(c.id,l)}const s=c.range.startLineNumber<=this._editor.getModel().getLineCount()?this._editor.getTopForLineNumber(c.range.startLineNumber,!0)-S:this._editor.getBottomForLineNumber(c.range.startLineNumber-1,!1)-S,n=this._editor.getBottomForLineNumber(c.range.endLineNumberExclusive-1,!0)-S-s;l.domNode.style.top=`${s}px`,l.domNode.style.height=`${n}px`,l.gutterItemView.layout(s,n,0,this._domNode.clientHeight)}}for(const u of r){const i=this.views.get(u);i.gutterItemView.dispose(),this._domNode.removeChild(i.domNode),this.views.delete(u)}}}e.EditorGutter=k;class E{constructor(b,S){this.gutterItemView=b,this.domNode=S}}}),define(ae[643],le([1,0,10,6,2,159,173,85,245,5,311,257]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitleMenu=e.createSelectionsAutorun=e.CodeEditorView=void 0;class r extends R.Disposable{updateOptions(c){this.editor.updateOptions(c)}constructor(c,l,s){super(),this.instantiationService=c,this.viewModel=l,this.configurationService=s,this.model=this.viewModel.map(d=>d?.model),this.htmlElements=(0,t.h)("div.code-view",[(0,t.h)("div.title@header",[(0,t.h)("span.title@title"),(0,t.h)("span.description@description"),(0,t.h)("span.detail@detail"),(0,t.h)("span.toolbar@toolbar")]),(0,t.h)("div.container",[(0,t.h)("div.gutter@gutterDiv"),(0,t.h)("div@editor")])]),this._onDidViewChange=new p.Emitter,this.view={element:this.htmlElements.root,minimumWidth:S.DEFAULT_EDITOR_MIN_DIMENSIONS.width,maximumWidth:S.DEFAULT_EDITOR_MAX_DIMENSIONS.width,minimumHeight:S.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumHeight:S.DEFAULT_EDITOR_MAX_DIMENSIONS.height,onDidChange:this._onDidViewChange.event,layout:(d,n,a,o)=>{(0,C.setStyle)(this.htmlElements.root,{width:d,height:n,top:a,left:o}),this.editor.layout({width:d-this.htmlElements.gutterDiv.clientWidth,height:n-this.htmlElements.header.clientHeight})}},this.checkboxesVisible=(0,A.observableFromEvent)(this.configurationService.onDidChangeConfiguration,()=>this.configurationService.getValue("mergeEditor.showCheckboxes")??!1),this.showDeletionMarkers=(0,A.observableFromEvent)(this.configurationService.onDidChangeConfiguration,()=>this.configurationService.getValue("mergeEditor.showDeletionMarkers")??!0),this.useSimplifiedDecorations=(0,A.observableFromEvent)(this.configurationService.onDidChangeConfiguration,()=>this.configurationService.getValue("mergeEditor.useSimplifiedDecorations")??!1),this.editor=this.instantiationService.createInstance(k.CodeEditorWidget,this.htmlElements.editor,{},{contributions:this.getEditorContributions()}),this.isFocused=(0,A.observableFromEvent)(p.Event.any(this.editor.onDidBlurEditorWidget,this.editor.onDidFocusEditorWidget),()=>this.editor.hasWidgetFocus()),this.cursorPosition=(0,A.observableFromEvent)(this.editor.onDidChangeCursorPosition,()=>this.editor.getPosition()),this.selection=(0,A.observableFromEvent)(this.editor.onDidChangeCursorSelection,()=>this.editor.getSelections()),this.cursorLineNumber=this.cursorPosition.map(d=>d?.lineNumber)}getEditorContributions(){}}e.CodeEditorView=r;function u(f,c){const l=(0,A.derived)("selections",s=>{const d=f.viewModel.read(s);if(!d)return[];const n=d.selectionInBase.read(s);return!n||n.sourceEditor===f?[]:n.rangesInBase.map(a=>c(a,d))});return(0,A.autorun)("set selections",s=>{const d=l.read(s);d.length!==0&&f.editor.setSelections(d.map(n=>new E.Selection(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)))})}e.createSelectionsAutorun=u;let i=class extends R.Disposable{constructor(c,l,s){super();const d=s.createInstance(I.MenuWorkbenchToolBar,l,c,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:()=>!1}});this._store.add(d)}};i=we([F(2,b.IInstantiationService)],i),e.TitleMenu=i}),define(ae[2327],le([1,0,10,143,21,159,40,116,515,1741,15,8,5,257,528,642,643]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCodeEditorView=void 0;let l=class extends c.CodeEditorView{constructor(d,n,a){super(n,d,a),this.decorations=(0,A.derived)("base.decorations",o=>{const g=this.viewModel.read(o);if(!g)return[];const h=g.model,v=h.base,m=g.activeModifiedBaseRange.read(o),w=g.showNonConflictingChanges.read(o),D=this.showDeletionMarkers.read(o),y=[];for(const T of h.modifiedBaseRanges.read(o)){const _=T.baseRange;if(!_)continue;const L=h.isHandled(T).read(o);if(!T.isConflicting&&L&&!w)continue;const M=["merge-editor-block"];L&&M.push("handled"),T===m&&M.push("focused"),M.push("base");const O=g.baseShowDiffAgainst.read(o);if(O)for(const N of T.getInputDiffs(O)){const P=N.inputRange.toInclusiveRange();P&&y.push({range:P,options:{className:"merge-editor-diff base",description:"Merge Editor",isWholeLine:!0}});for(const B of N.rangeMappings)(D||!B.inputRange.isEmpty())&&y.push({range:B.inputRange,options:{className:B.inputRange.isEmpty()?"merge-editor-diff-empty-word base":"merge-editor-diff-word base",description:"Merge Editor",showIfCollapsed:!0}})}y.push({range:_.toInclusiveRangeOrEmpty(),options:{showIfCollapsed:!0,blockClassName:M.join(" "),blockIsAfterEnd:_.startLineNumber>v.getLineCount(),description:"Merge Editor",minimap:{position:E.MinimapPosition.Gutter,color:{id:L?i.handledConflictMinimapOverViewRulerColor:i.unhandledConflictMinimapOverViewRulerColor}},overviewRuler:T.isConflicting?{position:E.OverviewRulerLane.Center,color:{id:L?i.handledConflictMinimapOverViewRulerColor:i.unhandledConflictMinimapOverViewRulerColor}}:void 0}})}return y}),this._register((0,c.createSelectionsAutorun)(this,(o,g)=>o)),this._register(n.createInstance(c.TitleMenu,S.MenuId.MergeBaseToolbar,this.htmlElements.title)),this._register((0,A.autorunWithStore)((o,g)=>{this.checkboxesVisible.read(o)&&g.add(new f.EditorGutter(this.editor,this.htmlElements.gutterDiv,{getIntersectingGutterItems:(h,v)=>[],createView:(h,v)=>{throw new R.BugIndicatingError}}))},"update checkboxes")),this._register((0,A.autorun)("update labels & text model",o=>{const g=this.viewModel.read(o);if(!g)return;this.editor.setModel(g.model.base),(0,t.reset)(this.htmlElements.title,...(0,p.renderLabelWithIcons)((0,b.localize)(0,null)));const h=g.baseShowDiffAgainst.read(o);let v;if(h){const m=(0,b.localize)(1,null,h===1?g.model.input1.title:g.model.input2.title),w=(0,b.localize)(2,null);v=(0,t.h)("span",{title:w},[m]).root}(0,t.reset)(this.htmlElements.description,...v?[v]:[])})),this._register((0,u.applyObservableDecorations)(this.editor,this.decorations))}getEditorContributions(){return k.EditorExtensionsRegistry.getEditorContributions().filter(d=>d.id!==I.CodeLensContribution.ID)}};l=we([F(1,r.IInstantiationService),F(2,C.IConfigurationService)],l),e.BaseCodeEditorView=l}),define(ae[2328],le([1,0,10,143,197,36,29,2,194,159,28,13,40,116,515,1742,15,8,37,5,73,12,257,528,642,643]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeConflictGutterItemView=e.ModifiedBaseRangeGutterItemModel=e.InputCodeEditorView=void 0;let m=class extends v.CodeEditorView{constructor(T,_,L,M,O,N){super(L,_,N),this.inputNumber=T,this.otherInputNumber=this.inputNumber===1?2:1,this.modifiedBaseRangeGutterItemInfos=(0,b.derived)(`input${this.inputNumber}.modifiedBaseRangeGutterItemInfos`,P=>{const B=this.viewModel.read(P);if(!B)return[];const V=B.model,z=this.inputNumber,x=B.showNonConflictingChanges.read(P);return V.modifiedBaseRanges.read(P).filter(H=>H.getInputDiffs(this.inputNumber).length>0&&(x||H.isConflicting||!V.isHandled(H).read(P))).map((H,W)=>new w(W.toString(),H,z,B))}),this.decorations=(0,b.derived)(`input${this.inputNumber}.decorations`,P=>{const B=this.viewModel.read(P);if(!B)return[];const V=B.model,z=(this.inputNumber===1?V.input1:V.input2).textModel,x=B.activeModifiedBaseRange.read(P),H=new Array,W=B.showNonConflictingChanges.read(P),U=this.showDeletionMarkers.read(P),q=!(B.baseCodeEditorView.read(P)!==void 0&&B.baseShowDiffAgainst.read(P)===this.inputNumber)&&this.useSimplifiedDecorations.read(P);for(const X of V.modifiedBaseRanges.read(P)){const G=X.getInputRange(this.inputNumber);if(!G)continue;const Q=["merge-editor-block"],j=V.isHandled(X).read(P);j&&Q.push("handled"),X===x&&Q.push("focused"),X.isConflicting&&Q.push("conflicting");const K=this.inputNumber===1?"input i1":"input i2";if(Q.push(K),!(!X.isConflicting&&!W&&j)&&(q&&!j&&Q.push("use-simplified-decorations"),H.push({range:G.toInclusiveRangeOrEmpty(),options:{showIfCollapsed:!0,blockClassName:Q.join(" "),blockIsAfterEnd:G.startLineNumber>z.getLineCount(),description:"Merge Editor",minimap:{position:u.MinimapPosition.Gutter,color:{id:j?g.handledConflictMinimapOverViewRulerColor:g.unhandledConflictMinimapOverViewRulerColor}},overviewRuler:X.isConflicting?{position:u.OverviewRulerLane.Center,color:{id:j?g.handledConflictMinimapOverViewRulerColor:g.unhandledConflictMinimapOverViewRulerColor}}:void 0}}),!q&&(X.isConflicting||!V.isHandled(X).read(P)))){const Y=X.getInputDiffs(this.inputNumber);for(const ee of Y){const ie=ee.outputRange.toInclusiveRange();if(ie&&H.push({range:ie,options:{className:`merge-editor-diff ${K}`,description:"Merge Editor",isWholeLine:!0}}),ee.rangeMappings)for(const re of ee.rangeMappings)(U||!re.outputRange.isEmpty())&&H.push({range:re.outputRange,options:{className:re.outputRange.isEmpty()?`merge-editor-diff-empty-word ${K}`:`merge-editor-diff-word ${K}`,description:"Merge Editor",showIfCollapsed:!0}})}}}return H}),this.htmlElements.root.classList.add("input"),this._register((0,b.autorunWithStore)((P,B)=>{this.checkboxesVisible.read(P)&&B.add(new h.EditorGutter(this.editor,this.htmlElements.gutterDiv,{getIntersectingGutterItems:(V,z)=>this.modifiedBaseRangeGutterItemInfos.read(z),createView:(V,z)=>new D(V,z,M,O)}))},"update checkboxes")),this._register((0,v.createSelectionsAutorun)(this,(P,B)=>B.model.translateBaseRangeToInput(this.inputNumber,P))),this._register(L.createInstance(v.TitleMenu,T===1?c.MenuId.MergeInput1Toolbar:c.MenuId.MergeInput2Toolbar,this.htmlElements.toolbar)),this._register((0,b.autorun)("input${this.inputNumber}: update labels & text model",P=>{const B=this.viewModel.read(P);if(!B)return;this.editor.setModel(this.inputNumber===1?B.model.input1.textModel:B.model.input2.textModel);const V=this.inputNumber===1?B.model.input1.title||(0,f.localize)(0,null):B.model.input2.title||(0,f.localize)(1,null),z=this.inputNumber===1?B.model.input1.description:B.model.input2.description,x=this.inputNumber===1?B.model.input1.detail:B.model.input2.detail;(0,t.reset)(this.htmlElements.title,...(0,p.renderLabelWithIcons)(V)),(0,t.reset)(this.htmlElements.description,...z?(0,p.renderLabelWithIcons)(z):[]),(0,t.reset)(this.htmlElements.detail,...x?(0,p.renderLabelWithIcons)(x):[])})),this._register((0,o.applyObservableDecorations)(this.editor,this.decorations))}getEditorContributions(){return r.EditorExtensionsRegistry.getEditorContributions().filter(T=>T.id!==i.CodeLensContribution.ID)}};m=we([F(2,d.IInstantiationService),F(3,s.IContextMenuService),F(4,a.IThemeService),F(5,l.IConfigurationService)],m),e.InputCodeEditorView=m;class w{constructor(T,_,L,M){this.id=T,this.baseRange=_,this.inputNumber=L,this.viewModel=M,this.model=this.viewModel.model,this.range=this.baseRange.getInputRange(this.inputNumber),this.enabled=this.model.isUpToDate,this.toggleState=(0,b.derived)("checkbox is checked",O=>{const N=this.model.getState(this.baseRange).read(O).getInput(this.inputNumber);return N===2&&!this.baseRange.isOrderRelevant?1:N}),this.state=(0,b.derived)("checkbox state",O=>{const N=this.viewModel.activeModifiedBaseRange.read(O);return this.model.hasBaseRange(this.baseRange)?{handled:this.model.isHandled(this.baseRange).read(O),focused:this.baseRange===N}:{handled:!1,focused:!1}})}setState(T,_){this.viewModel.setState(this.baseRange,this.model.getState(this.baseRange).get().withInputValue(this.inputNumber,T),_)}toggleBothSides(){(0,b.transaction)(T=>{const _=this.model.getState(this.baseRange).get();this.model.setState(this.baseRange,_.toggle(this.inputNumber).toggle(this.inputNumber===1?2:1),!0,T)})}getContextMenuActions(){const T=this.model.getState(this.baseRange).get(),_=this.model.isHandled(this.baseRange).get(),L=N=>{(0,b.transaction)(P=>this.viewModel.setState(this.baseRange,N,P))};function M(N,P,B,V){const z=new A.Action(N,P,void 0,!0,()=>{L(B)});return z.checked=V,z}const O=T.includesInput1&&T.includesInput2;return[this.baseRange.input1Diffs.length>0?M("mergeEditor.acceptInput1",(0,f.localize)(2,null,this.model.input1.title),T.toggle(1),T.includesInput1):void 0,this.baseRange.input2Diffs.length>0?M("mergeEditor.acceptInput2",(0,f.localize)(3,null,this.model.input2.title),T.toggle(2),T.includesInput2):void 0,this.baseRange.isConflicting?(0,o.setFields)(M("mergeEditor.acceptBoth",(0,f.localize)(4,null),T.withInputValue(1,!O).withInputValue(2,!O),O),{enabled:this.baseRange.canBeCombined}):void 0,new A.Separator,this.baseRange.isConflicting?(0,o.setFields)(M("mergeEditor.swap",(0,f.localize)(5,null),T.swap(),!1),{enabled:!T.kind&&(!O||this.baseRange.isOrderRelevant)}):void 0,(0,o.setFields)(new A.Action("mergeEditor.markAsHandled",(0,f.localize)(6,null),void 0,!0,()=>{(0,b.transaction)(N=>{this.model.setHandled(this.baseRange,!_,N)})}),{checked:_})].filter(C.isDefined)}}e.ModifiedBaseRangeGutterItemModel=w;class D extends E.Disposable{constructor(T,_,L,M){super(),this.isMultiLine=(0,b.observableValue)("isMultiLine",!1),this.item=(0,b.observableValue)("item",T);const O=new R.Toggle({isChecked:!1,title:"",icon:k.Codicon.check});O.domNode.classList.add("accept-conflict-group"),this._register((0,n.attachToggleStyler)(O,M)),this._register((0,t.addDisposableListener)(O.domNode,t.EventType.MOUSE_DOWN,N=>{const P=this.item.get();!P||(N.button===2?(N.stopPropagation(),N.preventDefault(),L.showContextMenu({getAnchor:()=>O.domNode,getActions:()=>P.getContextMenuActions()})):N.button===1&&(N.stopPropagation(),N.preventDefault(),P.toggleBothSides()))})),this._register((0,b.autorun)("Update Checkbox",N=>{const P=this.item.read(N),B=P.toggleState.read(N),z={[0]:{icon:void 0,checked:!1,title:(0,f.localize)(7,null)},[3]:{icon:k.Codicon.circleFilled,checked:!1,title:(0,f.localize)(8,null)},[1]:{icon:k.Codicon.check,checked:!0,title:(0,f.localize)(9,null)},[2]:{icon:k.Codicon.checkAll,checked:!0,title:(0,f.localize)(10,null)}}[B];O.setIcon(z.icon),O.checked=z.checked,O.setTitle(z.title),P.enabled.read(N)?O.enable():O.disable()})),this._register((0,b.autorun)("Update Checkbox CSS ClassNames",N=>{const P=this.item.read(N).state.read(N),B=["merge-accept-gutter-marker",P.handled&&"handled",P.focused&&"focused",this.isMultiLine.read(N)?"multi-line":"single-line"];_.className=B.filter(V=>typeof V=="string").join(" ")})),this._register(O.onChange(()=>{(0,b.transaction)(N=>{this.item.get().setState(O.checked,N)})})),_.appendChild((0,t.h)("div.background",[S.noBreakWhitespace]).root),_.appendChild(this.checkboxDiv=(0,t.h)("div.checkbox",[(0,t.h)("div.checkbox-background",[O.domNode])]).root)}layout(T,_,L,M){const O=this.checkboxDiv.clientHeight,N=_/2-O/2,P=O;let B=T+N;const V=[P,L+M-P-O],z=[T+P,T+_-O-P];z[0]<z[1]&&(B=(0,I.clamp)(B,V[0],V[1]),B=(0,I.clamp)(B,z[0],z[1])),this.checkboxDiv.style.top=`${B-T}px`,(0,b.transaction)(x=>{this.isMultiLine.set(_>30,x)})}update(T){(0,b.transaction)(_=>{this.item.set(T,_)})}}e.MergeConflictGutterItemView=D}),define(ae[2329],le([1,0,10,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedZoneWidget=void 0;class R extends p.Disposable{constructor(k,E,I,b,S){super(),this.editor=k,this.overlayWidgetId=`fixedZoneWidget-${R.counter++}`,this.widgetDomNode=(0,t.h)("div.fixed-zone-widget").root,this.overlayWidget={getId:()=>this.overlayWidgetId,getDomNode:()=>this.widgetDomNode,getPosition:()=>null},this.viewZoneId=E.addZone({domNode:document.createElement("div"),afterLineNumber:I,heightInPx:b,onComputedHeight:C=>{this.widgetDomNode.style.height=`${C}px`},onDomNodeTop:C=>{this.widgetDomNode.style.top=`${C}px`}}),S.push(this.viewZoneId),this.widgetDomNode.style.left=this.editor.getLayoutInfo().contentLeft+"px",this.editor.addOverlayWidget(this.overlayWidget),this._register({dispose:()=>{this.editor.removeOverlayWidget(this.overlayWidget)}})}}e.FixedZoneWidget=R,R.counter=0}),define(ae[2330],le([1,0,10,143,108,2,159,134,1740,867,2329]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionsSource=e.ConflictActionsFactory=void 0;class C extends A.Disposable{constructor(c){super(),this._editor=c,this._register(this._editor.onDidChangeConfiguration(l=>{(l.hasChanged(45)||l.hasChanged(16)||l.hasChanged(15))&&this._updateLensStyle()})),this._styleClassName="_conflictActionsFactory_"+(0,R.hash)(this._editor.getId()).toString(16),this._styleElement=(0,t.createStyleSheet)((0,t.isInShadowDOM)(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._register((0,A.toDisposable)(()=>{this._styleElement.remove()})),this._updateLensStyle()}_updateLensStyle(){const{codeLensHeight:c,fontSize:l}=this._getLayoutInfo(),s=this._editor.getOption(15),d=this._editor.getOption(45),n=`--codelens-font-family${this._styleClassName}`,a=`--codelens-font-features${this._styleClassName}`;let o=` .${this._styleClassName} { line-height: ${c}px; font-size: ${l}px; padding-right: ${Math.round(l*.5)}px; font-feature-settings: var(${a}) } .monaco-workbench .${this._styleClassName} span.codicon { line-height: ${c}px; font-size: ${l}px; } `;s&&(o+=`${this._styleClassName} { font-family: var(${n}), ${E.EDITOR_FONT_DEFAULTS.fontFamily}}`),this._styleElement.textContent=o,this._editor.getContainerDomNode().style.setProperty(n,s??"inherit"),this._editor.getContainerDomNode().style.setProperty(a,d.fontFeatureSettings)}_getLayoutInfo(){const c=Math.max(1.3,this._editor.getOption(60)/this._editor.getOption(47));let l=this._editor.getOption(16);return(!l||l<5)&&(l=this._editor.getOption(47)*.9|0),{fontSize:l,codeLensHeight:l*c|0}}createWidget(c,l,s,d){const n=this._getLayoutInfo();return new i(this._editor,c,l,n.codeLensHeight+2,this._styleClassName,s,d)}}e.ConflictActionsFactory=C;class r{constructor(c,l){this.viewModel=c,this.modifiedBaseRange=l,this.itemsInput1=this.getItemsInput(1),this.itemsInput2=this.getItemsInput(2),this.resultItems=(0,k.derived)("items",s=>{const d=this.viewModel,n=this.modifiedBaseRange,a=d.model.getState(n).read(s),o=d.model,g=[];if(a.kind===b.ModifiedBaseRangeStateKind.unrecognized)g.push({text:(0,I.localize)(8,null),tooltip:(0,I.localize)(9,null)});else if(a.kind===b.ModifiedBaseRangeStateKind.base)g.push({text:(0,I.localize)(10,null),tooltip:(0,I.localize)(11,null)});else{const v=[];a.includesInput1&&v.push(o.input1.title),a.includesInput2&&v.push(o.input2.title),a.kind===b.ModifiedBaseRangeStateKind.both&&a.firstInput===2&&v.reverse(),g.push({text:`${v.join(" + ")}`})}const h=[];return a.includesInput1&&h.push(u((0,I.localize)(12,null,o.input1.title),async()=>{(0,k.transaction)(v=>{o.setState(n,a.withInputValue(1,!1),!0,v),o.telemetry.reportRemoveInvoked(1,a.includesInput(2))})},(0,I.localize)(13,null,o.input1.title))),a.includesInput2&&h.push(u((0,I.localize)(14,null,o.input2.title),async()=>{(0,k.transaction)(v=>{o.setState(n,a.withInputValue(2,!1),!0,v),o.telemetry.reportRemoveInvoked(2,a.includesInput(1))})},(0,I.localize)(15,null,o.input2.title))),a.kind===b.ModifiedBaseRangeStateKind.both&&a.firstInput===2&&h.reverse(),g.push(...h),a.kind===b.ModifiedBaseRangeStateKind.unrecognized&&g.push(u((0,I.localize)(16,null),async()=>{(0,k.transaction)(v=>{o.setState(n,b.ModifiedBaseRangeState.base,!0,v),o.telemetry.reportResetToBaseInvoked()})},(0,I.localize)(17,null))),a.kind===b.ModifiedBaseRangeStateKind.base&&!o.isHandled(n).read(s)&&g.push(u((0,I.localize)(18,null),async()=>{(0,k.transaction)(v=>{o.setHandled(n,!0,v)})},(0,I.localize)(19,null))),g}),this.isEmpty=(0,k.derived)("isEmpty",s=>this.itemsInput1.read(s).length+this.itemsInput2.read(s).length+this.resultItems.read(s).length===0),this.inputIsEmpty=(0,k.derived)("inputIsEmpty",s=>this.itemsInput1.read(s).length+this.itemsInput2.read(s).length===0)}getItemsInput(c){return(0,k.derived)("items",l=>{const s=this.viewModel,d=this.modifiedBaseRange;if(!s.model.hasBaseRange(d))return[];const n=s.model.getState(d).read(l),a=s.model.isHandled(d).read(l),o=s.model,g=[],h=c===1?s.model.input1:s.model.input2,v=s.showNonConflictingChanges.read(l);if(!d.isConflicting&&a&&!v)return[];const m=c===1?2:1;return n.kind!==b.ModifiedBaseRangeStateKind.unrecognized&&!n.isInputIncluded(c)&&(!n.isInputIncluded(m)||!this.viewModel.shouldUseAppendInsteadOfAccept.read(l)?(g.push(u((0,I.localize)(0,null,h.title),async()=>{(0,k.transaction)(w=>{o.setState(d,n.withInputValue(c,!0,!1),!0,w),o.telemetry.reportAcceptInvoked(c,n.includesInput(m))})},(0,I.localize)(1,null,h.title))),d.canBeCombined&&g.push(u((0,I.localize)(2,null),async()=>{(0,k.transaction)(w=>{o.setState(d,b.ModifiedBaseRangeState.base.withInputValue(c,!0).withInputValue(m,!0,!0),!0,w),o.telemetry.reportSmartCombinationInvoked(n.includesInput(m))})},(0,I.localize)(3,null)))):(g.push(u((0,I.localize)(4,null,h.title),async()=>{(0,k.transaction)(w=>{o.setState(d,n.withInputValue(c,!0,!1),!0,w),o.telemetry.reportAcceptInvoked(c,n.includesInput(m))})},(0,I.localize)(5,null,h.title))),d.canBeCombined&&g.push(u((0,I.localize)(6,null,h.title),async()=>{(0,k.transaction)(w=>{o.setState(d,n.withInputValue(c,!0,!0),!0,w),o.telemetry.reportSmartCombinationInvoked(n.includesInput(m))})},(0,I.localize)(7,null))))),g})}}e.ActionsSource=r;function u(f,c,l){return{text:f,action:c,tooltip:l}}class i extends S.FixedZoneWidget{constructor(c,l,s,d,n,a,o){super(c,l,s,d,o),this._domNode=(0,t.h)("div.merge-editor-conflict-actions").root,this.widgetDomNode.appendChild(this._domNode),this._domNode.classList.add(n),this._register((0,k.autorun)("update commands",g=>{const h=a.read(g);this.setState(h)}))}setState(c){const l=[];let s=!0;for(const d of c){s?s=!1:l.push((0,t.$)("span",void 0,"\xA0|\xA0"));const n=(0,p.renderLabelWithIcons)(d.text);d.action?l.push((0,t.$)("a",{title:d.tooltip,role:"button",onclick:()=>d.action()},...n)):l.push((0,t.$)("span",{title:d.tooltip},...n))}(0,t.reset)(this._domNode,...l)}}}),define(ae[2331],le([1,0,16,171,13,50,20,264,383,866]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAlignments=void 0;function S(u){const i=C(u.input1Diffs.flatMap(d=>d.rangeMappings),u.baseRange.toRange(),u.input1Range.toRange()),f=C(u.input2Diffs.flatMap(d=>d.rangeMappings),u.baseRange.toRange(),u.input2Range.toRange()),c=r(i,f);let l=[];l.push([u.input1Range.startLineNumber-1,u.baseRange.startLineNumber-1,u.input2Range.startLineNumber-1]);function s(d){return d.every(n=>n!==void 0)}for(const d of c){const n=[d.output1Pos?.lineNumber,d.inputPos.lineNumber,d.output2Pos?.lineNumber],a=s(n);let o=!0;if(a){const g=!l.some(h=>s(h)&&h.some((v,m)=>v!==void 0&&v===n[m]));g&&(l=l.filter(h=>!h.some((v,m)=>v!==void 0&&v===n[m]))),o=g}else o=!l.some(h=>h.some((v,m)=>v!==void 0&&v===n[m]));o?l.push(n):d.length.isGreaterThan(new E.LengthObj(1,0))&&l.push([d.output1Pos?d.output1Pos.lineNumber+1:void 0,d.inputPos.lineNumber+1,d.output2Pos?d.output2Pos.lineNumber+1:void 0])}return l.push([u.input1Range.endLineNumberExclusive,u.baseRange.endLineNumberExclusive,u.input2Range.endLineNumberExclusive]),(0,p.assertFn)(()=>(0,p.checkAdjacentItems)(l.map(d=>d[0]).filter(R.isDefined),(d,n)=>d<n)&&(0,p.checkAdjacentItems)(l.map(d=>d[1]).filter(R.isDefined),(d,n)=>d<=n)&&(0,p.checkAdjacentItems)(l.map(d=>d[2]).filter(R.isDefined),(d,n)=>d<n)&&l.every(d=>d.filter(R.isDefined).length>=2)),l}e.getAlignments=S;function C(u,i,f){const c=[];let l=i.getStartPosition(),s=f.getStartPosition();for(const n of u){const a=new I.RangeMapping(k.Range.fromPositions(l,n.inputRange.getStartPosition()),k.Range.fromPositions(s,n.outputRange.getStartPosition()));(0,p.assertFn)(()=>(0,b.lengthOfRange)(a.inputRange).equals((0,b.lengthOfRange)(a.outputRange))),a.inputRange.isEmpty()||c.push(a),l=n.inputRange.getEndPosition(),s=n.outputRange.getEndPosition()}const d=new I.RangeMapping(k.Range.fromPositions(l,i.getEndPosition()),k.Range.fromPositions(s,f.getEndPosition()));return(0,p.assertFn)(()=>(0,b.lengthOfRange)(d.inputRange).equals((0,b.lengthOfRange)(d.outputRange))),d.inputRange.isEmpty()||c.push(d),c}function r(u,i){const f=[],c=[];for(const[d,n]of[[0,u],[1,i]])for(const a of n)c.push({input:d,start:!0,inputPos:a.inputRange.getStartPosition(),outputPos:a.outputRange.getStartPosition()}),c.push({input:d,start:!1,inputPos:a.inputRange.getEndPosition(),outputPos:a.outputRange.getEndPosition()});c.sort((0,t.compareBy)(d=>d.inputPos,A.Position.compare));const l=[void 0,void 0];let s;for(const d of c){if(s&&l.some(n=>!!n)){const n=(0,b.lengthBetweenPositions)(s,d.inputPos);n.isZero()||(f.push({inputPos:s,length:n,output1Pos:l[0],output2Pos:l[1]}),l[0]&&(l[0]=(0,b.addLength)(l[0],n)),l[1]&&(l[1]=(0,b.addLength)(l[1],n)))}l[d.input]=d.start?d.outputPos:void 0,s=d.inputPos}return f}}),define(ae[2332],le([1,0,2,159,383,257]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollSynchronizer=void 0;class k extends t.Disposable{get model(){return this.viewModel.get()?.model}get shouldAlignResult(){return this.layout.get().kind==="columns"}get shouldAlignBase(){return this.layout.get().kind==="mixed"&&!this.layout.get().showBaseAtTop}constructor(I,b,S,C,r,u){super(),this.viewModel=I,this.input1View=b,this.input2View=S,this.baseView=C,this.inputResultView=r,this.layout=u,this.reentrancyBarrier=new A.ReentrancyBarrier;const i=this.updateScrolling=()=>{if(!this.model)return;if(this.input2View.editor.setScrollTop(this.input1View.editor.getScrollTop(),1),this.shouldAlignResult)this.inputResultView.editor.setScrollTop(this.input1View.editor.getScrollTop(),1);else{const c=this.model.input1ResultMapping.get();this.synchronizeScrolling(this.input1View.editor,this.inputResultView.editor,c)}const f=this.baseView.get();if(f)if(this.shouldAlignBase)this.baseView.get()?.editor.setScrollTop(this.input1View.editor.getScrollTop(),1);else{const c=new R.DocumentLineRangeMap(this.model.baseInput1Diffs.get(),-1).reverse();this.synchronizeScrolling(this.input1View.editor,f.editor,c)}};this._store.add(this.input1View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(f=>{f.scrollTopChanged&&i(),f.scrollLeftChanged&&(this.baseView.get()?.editor.setScrollLeft(f.scrollLeft,1),this.input2View.editor.setScrollLeft(f.scrollLeft,1),this.inputResultView.editor.setScrollLeft(f.scrollLeft,1))}))),this._store.add(this.input2View.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(f=>{if(!!this.model){if(f.scrollTopChanged){if(this.input1View.editor.setScrollTop(f.scrollTop,1),this.shouldAlignResult)this.inputResultView.editor.setScrollTop(this.input2View.editor.getScrollTop(),1);else{const l=this.model.input2ResultMapping.get();this.synchronizeScrolling(this.input2View.editor,this.inputResultView.editor,l)}const c=this.baseView.get();if(c&&this.model)if(this.shouldAlignBase)this.baseView.get()?.editor.setScrollTop(f.scrollTop,1);else{const l=new R.DocumentLineRangeMap(this.model.baseInput2Diffs.get(),-1).reverse();this.synchronizeScrolling(this.input2View.editor,c.editor,l)}}f.scrollLeftChanged&&(this.baseView.get()?.editor.setScrollLeft(f.scrollLeft,1),this.input1View.editor.setScrollLeft(f.scrollLeft,1),this.inputResultView.editor.setScrollLeft(f.scrollLeft,1))}}))),this._store.add(this.inputResultView.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(f=>{if(f.scrollTopChanged){if(this.shouldAlignResult)this.input1View.editor.setScrollTop(f.scrollTop,1),this.input2View.editor.setScrollTop(f.scrollTop,1);else{const s=this.model?.resultInput1Mapping.get();this.synchronizeScrolling(this.inputResultView.editor,this.input1View.editor,s);const d=this.model?.resultInput2Mapping.get();this.synchronizeScrolling(this.inputResultView.editor,this.input2View.editor,d)}const c=this.model?.resultBaseMapping.get(),l=this.baseView.get();l&&this.model&&this.synchronizeScrolling(this.inputResultView.editor,l.editor,c)}f.scrollLeftChanged&&(this.baseView.get()?.editor?.setScrollLeft(f.scrollLeft,1),this.input1View.editor.setScrollLeft(f.scrollLeft,1),this.input2View.editor.setScrollLeft(f.scrollLeft,1))}))),this._store.add((0,p.autorunWithStore)((f,c)=>{const l=this.baseView.read(f);l&&c.add(l.editor.onDidScrollChange(this.reentrancyBarrier.makeExclusive(s=>{if(s.scrollTopChanged){if(!this.model)return;if(this.shouldAlignBase)this.input1View.editor.setScrollTop(s.scrollTop,1),this.input2View.editor.setScrollTop(s.scrollTop,1);else{const n=new R.DocumentLineRangeMap(this.model.baseInput1Diffs.get(),-1);this.synchronizeScrolling(l.editor,this.input1View.editor,n);const a=new R.DocumentLineRangeMap(this.model.baseInput2Diffs.get(),-1);this.synchronizeScrolling(l.editor,this.input2View.editor,a)}const d=this.model?.baseResultMapping.get();this.synchronizeScrolling(l.editor,this.inputResultView.editor,d)}s.scrollLeftChanged&&(this.inputResultView.editor.setScrollLeft(s.scrollLeft,1),this.input1View.editor.setScrollLeft(s.scrollLeft,1),this.input2View.editor.setScrollLeft(s.scrollLeft,1))})))},"set baseViewEditor.onDidScrollChange"))}synchronizeScrolling(I,b,S){if(!S)return;const C=I.getVisibleRanges();if(C.length===0)return;const r=C[0].startLineNumber-1,u=S.project(r),i=u.inputRange,f=u.outputRange,c=b.getTopForLineNumber(f.startLineNumber),l=b.getTopForLineNumber(f.endLineNumberExclusive),s=I.getTopForLineNumber(i.startLineNumber),d=I.getTopForLineNumber(i.endLineNumberExclusive),n=Math.min((I.getScrollTop()-s)/(d-s),1),a=c+(l-c)*n;b.setScrollTop(a,1)}}e.ScrollSynchronizer=k}),define(ae[2333],le([1,0,16,2,159,20,1745,8,26,286]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorViewModel=void 0;let S=class extends p.Disposable{constructor(r,u,i,f,c,l,s,d){super(),this.model=r,this.inputCodeEditorView1=u,this.inputCodeEditorView2=i,this.resultCodeEditorView=f,this.baseCodeEditorView=c,this.showNonConflictingChanges=l,this.configurationService=s,this.notificationService=d,this.manuallySetActiveModifiedBaseRange=(0,R.observableValue)("manuallySetActiveModifiedBaseRange",{range:void 0,counter:0}),this.shouldUseAppendInsteadOfAccept=(0,R.observableFromEvent)(this.configurationService.onDidChangeConfiguration,()=>this.configurationService.getValue("mergeEditor.shouldUseAppendInsteadOfAccept")??!1),this.counter=0,this.lastFocusedEditor=(0,R.derivedObservableWithWritableCache)("lastFocusedEditor",(n,a)=>{const g=[this.inputCodeEditorView1,this.inputCodeEditorView2,this.resultCodeEditorView,this.baseCodeEditorView.read(n)].find(h=>h&&h.isFocused.read(n));return g?{view:g,counter:this.counter++}:a||{view:void 0,counter:this.counter++}}),this.baseShowDiffAgainst=(0,R.derived)("baseShowDiffAgainst",n=>{const a=this.lastFocusedEditor.read(n);if(a.view===this.inputCodeEditorView1)return 1;if(a.view===this.inputCodeEditorView2)return 2}),this.selectionInBase=(0,R.derived)("selectionInBase",n=>{const a=this.lastFocusedEditor.read(n).view;return a?{rangesInBase:(a.selection.read(n)||[]).map(h=>a===this.inputCodeEditorView1?this.model.translateInputRangeToBase(1,h):a===this.inputCodeEditorView2?this.model.translateInputRangeToBase(2,h):a===this.resultCodeEditorView?this.model.translateResultRangeToBase(h):(a===this.baseCodeEditorView.read(n),h)),sourceEditor:a}:void 0}),this.activeModifiedBaseRange=(0,R.derived)("activeModifiedBaseRange",n=>{const a=this.lastFocusedEditor.read(n),o=this.manuallySetActiveModifiedBaseRange.read(n);if(o.counter>a.counter)return o.range;if(!a.view)return;const g=a.view.cursorLineNumber.read(n);return g?this.model.modifiedBaseRanges.read(n).find(v=>{const m=this.getRangeOfModifiedBaseRange(a.view,v,n);return m.isEmpty?m.startLineNumber===g:m.contains(g)}):void 0}),this._register(f.editor.onDidChangeModelContent(n=>{(0,R.transaction)(a=>{for(const o of n.changes){const g=this.model.translateResultRangeToBase(A.Range.lift(o.range)),h=this.model.findModifiedBaseRangesInRange(new b.LineRange(g.startLineNumber,g.endLineNumber-g.startLineNumber));h.length===1&&this.model.setHandled(h[0],!0,a)}})}))}getRangeOfModifiedBaseRange(r,u,i){if(r===this.resultCodeEditorView)return this.model.getLineRangeInResult(u.baseRange,i);if(r===this.baseCodeEditorView.get())return u.baseRange;{const f=r===this.inputCodeEditorView1?1:2;return u.getInputRange(f)}}setActiveModifiedBaseRange(r,u){this.manuallySetActiveModifiedBaseRange.set({range:r,counter:this.counter++},u)}setState(r,u,i){this.manuallySetActiveModifiedBaseRange.set({range:r,counter:this.counter++},i),this.model.setState(r,u,!0,i)}goToConflict(r){let u=this.lastFocusedEditor.get().view;u||(u=this.resultCodeEditorView);const i=u.editor.getPosition()?.lineNumber;if(i===void 0)return;const f=r(u,i);if(f){const c=this.getRangeOfModifiedBaseRange(u,f,void 0);u.editor.focus();let l=c.startLineNumber,s=c.endLineNumberExclusive;c.startLineNumber>u.editor.getModel().getLineCount()&&((0,R.transaction)(d=>{this.setActiveModifiedBaseRange(f,d)}),l=s=u.editor.getModel().getLineCount()),u.editor.setPosition({lineNumber:l,column:u.editor.getModel().getLineFirstNonWhitespaceColumn(l)}),u.editor.revealLinesNearTop(l,s,0)}}goToNextModifiedBaseRange(r){this.goToConflict((u,i)=>this.model.modifiedBaseRanges.get().find(f=>r(f)&&this.getRangeOfModifiedBaseRange(u,f,void 0).startLineNumber>i)||this.model.modifiedBaseRanges.get().find(f=>r(f)))}goToPreviousModifiedBaseRange(r){this.goToConflict((u,i)=>(0,t.findLast)(this.model.modifiedBaseRanges.get(),f=>r(f)&&this.getRangeOfModifiedBaseRange(u,f,void 0).endLineNumberExclusive<i)||(0,t.findLast)(this.model.modifiedBaseRanges.get(),f=>r(f)))}toggleActiveConflict(r){const u=this.activeModifiedBaseRange.get();if(!u){this.notificationService.error((0,k.localize)(0,null));return}(0,R.transaction)(i=>{this.setState(u,this.model.getState(u).get().toggle(r),i)})}acceptAll(r){(0,R.transaction)(u=>{for(const i of this.model.modifiedBaseRanges.get())this.setState(i,this.model.getState(i).get().withInputValue(r,!0),u)})}};S=we([F(6,E.IConfigurationService),F(7,I.INotificationService)],S),e.MergeEditorViewModel=S}),define(ae[2334],le([1,0,10,16,286,257,2330,2331]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorViewZone=e.MergeEditorViewZones=e.ViewZoneComputer=void 0;class I{constructor(f,c,l){this.input1Editor=f,this.input2Editor=c,this.resultEditor=l,this.conflictActionsFactoryInput1=new k.ConflictActionsFactory(this.input1Editor),this.conflictActionsFactoryInput2=new k.ConflictActionsFactory(this.input2Editor),this.conflictActionsFactoryResult=new k.ConflictActionsFactory(this.resultEditor)}computeViewZones(f,c,l){let s=0,d=0,n=0,a=0;const o=[],g=[],h=[],v=[],m=c.model,w=m.baseResultDiffs.read(f),D=(0,A.join)(m.modifiedBaseRanges.read(f),w,(M,O)=>M.baseRange.touches(O.inputRange)?p.CompareResult.neitherLessOrGreaterThan:R.LineRange.compareByStart(M.baseRange,O.inputRange)),y=l.codeLensesVisible,T=l.showNonConflictingChanges;let _,L;for(const M of D){if(y&&M.left&&(M.left.isConflicting||T||!m.isHandled(M.left).read(f))){const P=new k.ActionsSource(c,M.left);(l.shouldAlignResult||!P.inputIsEmpty.read(f))&&(o.push(new u(this.conflictActionsFactoryInput1,M.left.input1Range.startLineNumber-1,P.itemsInput1)),g.push(new u(this.conflictActionsFactoryInput2,M.left.input2Range.startLineNumber-1,P.itemsInput2)),l.shouldAlignBase&&h.push(new r(M.left.baseRange.startLineNumber-1,16)));const B=M.left.baseRange.startLineNumber+(L?.resultingDeltaFromOriginalToModified??0)-1;v.push(new u(this.conflictActionsFactoryResult,B,P.resultItems))}const O=(0,p.lastOrDefault)(M.rights);O&&(L=O);let N;M.left?(N=(0,E.getAlignments)(M.left).map(P=>({input1Line:P[0],baseLine:P[1],input2Line:P[2],resultLine:void 0})),_=M.left,N[N.length-1].resultLine=M.left.baseRange.endLineNumberExclusive+(L?L.resultingDeltaFromOriginalToModified:0)):N=[{baseLine:O.inputRange.endLineNumberExclusive,input1Line:O.inputRange.endLineNumberExclusive+(_?_.input1Range.endLineNumberExclusive-_.baseRange.endLineNumberExclusive:0),input2Line:O.inputRange.endLineNumberExclusive+(_?_.input2Range.endLineNumberExclusive-_.baseRange.endLineNumberExclusive:0),resultLine:O.outputRange.endLineNumberExclusive}];for(const{input1Line:P,baseLine:B,input2Line:V,resultLine:z}of N){if(!l.shouldAlignBase&&(P===void 0||V===void 0))continue;const x=P!==void 0?P+s:-1,H=V!==void 0?V+d:-1,W=B+n,U=z!==void 0?z+a:-1,$=Math.max(l.shouldAlignBase?W:0,x,H,l.shouldAlignResult?U:0);if(P!==void 0){const q=$-x;q>0&&(o.push(new C(P-1,q)),s+=q)}if(V!==void 0){const q=$-H;q>0&&(g.push(new C(V-1,q)),d+=q)}if(l.shouldAlignBase){const q=$-W;q>0&&(h.push(new C(B-1,q)),n+=q)}if(l.shouldAlignResult&&z!==void 0){const q=$-U;q>0&&(v.push(new C(z-1,q)),a+=q)}}}return new b(o,g,h,v)}}e.ViewZoneComputer=I;class b{constructor(f,c,l,s){this.input1ViewZones=f,this.input2ViewZones=c,this.baseViewZones=l,this.resultViewZones=s}}e.MergeEditorViewZones=b;class S{}e.MergeEditorViewZone=S;class C extends S{constructor(f,c){super(),this.afterLineNumber=f,this.heightInLines=c}create(f,c,l){c.push(f.addZone({afterLineNumber:this.afterLineNumber,heightInLines:this.heightInLines,domNode:(0,t.$)("div.diagonal-fill")}))}}class r extends S{constructor(f,c){super(),this.afterLineNumber=f,this.heightPx=c}create(f,c,l){c.push(f.addZone({afterLineNumber:this.afterLineNumber,heightInPx:this.heightPx,domNode:(0,t.$)("div.conflict-actions-placeholder")}))}}class u extends S{constructor(f,c,l){super(),this.conflictActionsFactory=f,this.lineNumber=c,this.items=l}create(f,c,l){l.add(this.conflictActionsFactory.createWidget(f,this.lineNumber,this.items,c))}}}),define(ae[445],le([1,0,1746,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ctxMergeResultUri=e.ctxMergeBaseUri=e.ctxMergeEditorShowNonConflictingChanges=e.ctxMergeEditorShowBaseAtTop=e.ctxMergeEditorShowBase=e.ctxMergeEditorLayout=e.ctxIsMergeResultEditor=e.ctxIsMergeEditor=void 0,e.ctxIsMergeEditor=new p.RawContextKey("isMergeEditor",!1,{type:"boolean",description:(0,t.localize)(0,null)}),e.ctxIsMergeResultEditor=new p.RawContextKey("isMergeResultEditor",!1,{type:"boolean",description:(0,t.localize)(1,null)}),e.ctxMergeEditorLayout=new p.RawContextKey("mergeEditorLayout","mixed",{type:"string",description:(0,t.localize)(2,null)}),e.ctxMergeEditorShowBase=new p.RawContextKey("mergeEditorShowBase",!1,{type:"boolean",description:(0,t.localize)(3,null)}),e.ctxMergeEditorShowBaseAtTop=new p.RawContextKey("mergeEditorShowBaseAtTop",!1,{type:"boolean",description:(0,t.localize)(4,null)}),e.ctxMergeEditorShowNonConflictingChanges=new p.RawContextKey("mergeEditorShowNonConflictingChanges",!1,{type:"boolean",description:(0,t.localize)(5,null)}),e.ctxMergeBaseUri=new p.RawContextKey("mergeEditorBaseUri","",{type:"string",description:(0,t.localize)(6,null)}),e.ctxMergeResultUri=new p.RawContextKey("mergeEditorResultUri","",{type:"string",description:(0,t.localize)(7,null)})}),define(ae[2335],le([1,0,10,79,143,16,21,2,159,40,116,515,1743,15,8,7,5,49,286,257,528,642,445,643]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResultCodeEditorView=void 0;let h=class extends g.CodeEditorView{constructor(m,w,D,y){super(w,m,y),this._labelService=D,this.decorations=(0,I.derived)("result.decorations",_=>{const L=this.viewModel.read(_);if(!L)return[];const M=L.model,O=M.resultTextModel,N=new Array,P=(0,d.join)(M.modifiedBaseRanges.read(_),M.baseResultDiffs.read(_),(z,x)=>z.baseRange.touches(x.inputRange)?A.CompareResult.neitherLessOrGreaterThan:s.LineRange.compareByStart(z.baseRange,x.inputRange)),B=L.activeModifiedBaseRange.read(_),V=L.showNonConflictingChanges.read(_);for(const z of P){const x=z.left;if(x){const H=["merge-editor-block"],W=M.isHandled(x).read(_);if(W&&H.push("handled"),x===B&&H.push("focused"),x.isConflicting&&H.push("conflicting"),H.push("result"),!x.isConflicting&&!V&&W)continue;const U=M.getLineRangeInResult(x.baseRange,_);N.push({range:U.toInclusiveRangeOrEmpty(),options:{showIfCollapsed:!0,blockClassName:H.join(" "),blockIsAfterEnd:U.startLineNumber>O.getLineCount(),description:"Result Diff",minimap:{position:S.MinimapPosition.Gutter,color:{id:W?n.handledConflictMinimapOverViewRulerColor:n.unhandledConflictMinimapOverViewRulerColor}},overviewRuler:x.isConflicting?{position:S.OverviewRulerLane.Center,color:{id:W?n.handledConflictMinimapOverViewRulerColor:n.unhandledConflictMinimapOverViewRulerColor}}:void 0}})}if(!x||x.isConflicting)for(const H of z.rights){const W=H.outputRange.toInclusiveRange();if(W&&N.push({range:W,options:{className:"merge-editor-diff result",description:"Merge Editor",isWholeLine:!0}}),H.rangeMappings)for(const U of H.rangeMappings)N.push({range:U.outputRange,options:{className:"merge-editor-diff-word result",description:"Merge Editor"}})}}return N}),this.editor.invokeWithinContext(_=>{const L=_.get(f.IContextKeyService),M=o.ctxIsMergeResultEditor.bindTo(L);M.set(!0),this._register((0,E.toDisposable)(()=>M.reset()))}),this.htmlElements.gutterDiv.style.width="5px",this._register((0,I.autorunWithStore)((_,L)=>{this.checkboxesVisible.read(_)&&L.add(new a.EditorGutter(this.editor,this.htmlElements.gutterDiv,{getIntersectingGutterItems:(M,O)=>[],createView:(M,O)=>{throw new k.BugIndicatingError}}))},"update checkboxes")),this._register((0,I.autorun)("update labels & text model",_=>{const L=this.viewModel.read(_);!L||(this.editor.setModel(L.model.resultTextModel),(0,t.reset)(this.htmlElements.title,...(0,R.renderLabelWithIcons)((0,r.localize)(0,null))),(0,t.reset)(this.htmlElements.description,...(0,R.renderLabelWithIcons)(this._labelService.getUriLabel(L.model.resultTextModel.uri,{relative:!0}))))}));const T=this._register(new p.ActionBar(this.htmlElements.detail));this._register((0,I.autorun)("update remainingConflicts label",_=>{const L=this.viewModel.read(_);if(!L)return;const M=L.model;if(!M)return;const O=M.unhandledConflictsCount.read(_),N=O===1?(0,r.localize)(1,null,O):(0,r.localize)(2,null,O);T.clear(),T.push({class:void 0,enabled:O>0,id:"nextConflict",label:N,run(){L.model.telemetry.reportConflictCounterClicked(),L.goToNextModifiedBaseRange(P=>!M.isHandled(P).get())},tooltip:O>0?(0,r.localize)(3,null):(0,r.localize)(4,null)})})),this._register((0,d.applyObservableDecorations)(this.editor,this.decorations)),this._register((0,g.createSelectionsAutorun)(this,(_,L)=>L.model.translateBaseRangeToResult(_))),this._register(w.createInstance(g.TitleMenu,u.MenuId.MergeInputResultToolbar,this.htmlElements.toolbar))}getEditorContributions(){return b.EditorExtensionsRegistry.getEditorContributions().filter(m=>m.id!==C.CodeLensContribution.ID)}};h=we([F(1,c.IInstantiationService),F(2,l.ILabelService),F(3,i.IConfigurationService)],h),e.ResultCodeEditorView=h}),define(ae[2336],le([1,0,2,6]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindFilters=void 0;class R extends t.Disposable{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}))}constructor(k,E,I,b){super(),this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this._markupInput=!0,this._markupPreview=!0,this._codeInput=!0,this._codeOutput=!0,this._markupInput=k,this._markupPreview=E,this._codeInput=I,this._codeOutput=b}update(k){this._markupInput=k.markupInput,this._markupPreview=k.markupPreview,this._codeInput=k.codeInput,this._codeOutput=k.codeOutput}}e.NotebookFindFilters=R}),define(ae[2337],le([1,0,10,488,303,140,11,434,510,1754,265,7,37,33,63,73,12,779,29,8,36,5,15,84,279,79,338,2336,14,278,1153]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleFindReplaceWidget=e.findFilterButton=void 0;const T=b.localize(0,null),_=b.localize(1,null),L=b.localize(2,null),M=b.localize(3,null),O=b.localize(4,null),N=b.localize(5,null),P=b.localize(6,null),B=b.localize(7,null),V=b.localize(8,null),z=b.localize(9,null);e.findFilterButton=(0,i.registerIcon)("find-filter",s.Codicon.filter,b.localize(10,null));const x=b.localize(11,null),H=b.localize(12,null),W=b.localize(13,null),U=b.localize(14,null),$=b.localize(15,null),q=318,X=4;let G=class extends h.DropdownMenuActionViewItem{constructor(Y,ee,ie,re){super(ee,{getActions:()=>this.getActions()},re,{actionRunner:ie,classNames:ee.class,anchorAlignmentProvider:()=>1}),this.filters=Y}render(Y){super.render(Y),this.updateChecked()}getActions(){const Y={checked:this.filters.markupInput,class:void 0,enabled:!this.filters.markupPreview,id:"findInMarkdownInput",label:H,run:async()=>{this.filters.markupInput=!this.filters.markupInput},tooltip:""},ee={checked:this.filters.markupPreview,class:void 0,enabled:!0,id:"findInMarkdownInput",label:W,run:async()=>{this.filters.markupPreview=!this.filters.markupPreview},tooltip:""},ie={checked:this.filters.codeInput,class:void 0,enabled:!0,id:"findInCodeInput",label:U,run:async()=>{this.filters.codeInput=!this.filters.codeInput},tooltip:""},re={checked:this.filters.codeOutput,class:void 0,enabled:!0,id:"findInCodeOutput",label:$,run:async()=>{this.filters.codeOutput=!this.filters.codeOutput},tooltip:"",dispose:()=>null};return D.isSafari?[Y,ie]:[Y,ee,new n.Separator,ie,re]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};G=we([F(3,r.IContextMenuService)],G);class Q extends p.FindInput{constructor(Y,ee,ie,re,oe,se,te){super(oe,se,te),this.filters=Y,this.contextMenuService=ie,this.instantiationService=re,this._actionbar=null,this._filterChecked=!1,this._register((0,S.registerAndCreateHistoryNavigationContext)(ee,this.inputBox)),this._filtersAction=new n.Action("notebookFindFilterAction",x,"notebook-filters "+c.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()??0)+(this.wholeWords?.width()??0)+(this.regex?.width()??0)+this.getFilterWidth()}getFilterWidth(){return 2+2+2+16}createFilters(Y){this._actionbar=this._register(new v.ActionBar(Y,{actionViewItemProvider:ee=>{if(ee.id===this._filtersAction.id)return this.instantiationService.createInstance(G,this.filters,ee,new n.ActionRunner)}})),this._actionbar.push(this._filtersAction,{icon:!0,label:!1})}setEnabled(Y){super.setEnabled(Y),Y&&!this._filterChecked?this.regex?.enable():this.regex?.disable()}updateFilterState(Y){this._filterChecked=Y,this.regex&&(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(Y){const re={primary:[],secondary:[]};return(0,g.createAndFillInActionBarActions)(Y,{shouldForwardArgs:!0},re,oe=>/^inline/.test(oe)),re}}let j=class extends A.Widget{constructor(Y,ee,ie,re,oe,se,te,Z=new E.FindReplaceState,ne){super(),this._contextViewService=Y,this._themeService=ie,this._configurationService=re,this.menuService=oe,this.contextMenuService=se,this.instantiationService=te,this._state=Z,this._notebookEditor=ne,this._resizeOriginalWidth=q,this._isVisible=!1,this._isReplaceVisible=!1,this.foundMatch=!1,this._filters=new w.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(pe=>this._onStateChanged(pe))),this._scopedContextKeyService=ee.createScoped(this._domNode);const ce=t.$(".find-replace-progress");this._progressBar=new R.ProgressBar(ce),this._register((0,f.attachProgressBarStyler)(this._progressBar,this._themeService)),this._domNode.appendChild(ce);const de=ee.getContextKeyValue("notebookType")==="interactive";this._toggleReplaceBtn=this._register(new I.SimpleButton({label:N,className:"codicon toggle left",onTrigger:de?()=>{}:()=>{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.setEnabled(!de),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 Q(this._filters,this._scopedContextKeyService,this.contextMenuService,this.instantiationService,null,this._contextViewService,{label:T,placeholder:_,validation:pe=>{if(pe.length===0||!this._findInput.getRegex())return null;try{return new RegExp(pe),null}catch(me){return this.foundMatch=!1,this.updateButtons(this.foundMatch),{content:me.message}}},flexibleWidth:!0,showCommonFindToggles:!0})),this._updateHistoryDelayer=new k.Delayer(500),this.oninput(this._findInput.domNode,pe=>{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:L,icon:I.findPreviousMatchIcon,onTrigger:()=>{this.find(!0)}})),this.nextBtn=this._register(new I.SimpleButton({label:M,icon:I.findNextMatchIcon,onTrigger:()=>{this.find(!1)}}));const he=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(he.domNode),this._domNode.appendChild(this._innerFindDomNode),this.onkeyup(this._innerFindDomNode,pe=>{if(pe.equals(9)){this.hide(),pe.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",pe=>{pe.stopPropagation()})),this._innerReplaceDomNode=document.createElement("div"),this._innerReplaceDomNode.classList.add("simple-fr-replace-part"),this._replaceInput=this._register(new S.ContextScopedReplaceInput(null,void 0,{label:P,placeholder:B,history:[]},ee,!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:V,icon:I.findReplaceIcon,onTrigger:()=>{this.replaceOne()}})),this._replaceAllBtn=this._register(new I.SimpleButton({label:z,icon:I.findReplaceAllIcon,onTrigger:()=>{this.replaceAll()}})),this._innerReplaceDomNode.appendChild(this._replaceBtn.domNode),this._innerReplaceDomNode.appendChild(this._replaceAllBtn.domNode),this._resizeSash=this._register(new y.Sash(this._domNode,{getVerticalSashLeft:()=>0},{orientation:0,size:2})),this._register(this._resizeSash.onDidStart(()=>{this._resizeOriginalWidth=this._getDomWidth()})),this._register(this._resizeSash.onDidChange(pe=>{let me=this._resizeOriginalWidth+pe.startX-pe.currentX;me<q&&(me=q);const Se=this._getMaxWidth();me>Se&&(me=Se),this._domNode.style.width=`${me}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()})),this._register(this._resizeSash.onDidReset(()=>{const pe=this._getDomWidth();let me=q;pe<=q&&(me=this._getMaxWidth()),this._domNode.style.width=`${me}px`,this._isReplaceVisible&&(this._replaceInput.width=t.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout()}))}_getMaxWidth(){return this._notebookEditor.getLayoutInfo().width-64}_getDomWidth(){return t.getTotalWidth(this._domNode)-X*2}getCellToolbarActions(Y){const re={primary:[],secondary:[]};return(0,g.createAndFillInActionBarActions)(Y,{shouldForwardArgs:!0},re,oe=>/^inline/.test(oe)),re}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(Y){const ee={inputActiveOptionBorder:Y.getColor(u.inputActiveOptionBorder),inputActiveOptionForeground:Y.getColor(u.inputActiveOptionForeground),inputActiveOptionBackground:Y.getColor(u.inputActiveOptionBackground),inputBackground:Y.getColor(u.inputBackground),inputForeground:Y.getColor(u.inputForeground),inputBorder:Y.getColor(u.inputBorder),inputValidationInfoBackground:Y.getColor(u.inputValidationInfoBackground),inputValidationInfoForeground:Y.getColor(u.inputValidationInfoForeground),inputValidationInfoBorder:Y.getColor(u.inputValidationInfoBorder),inputValidationWarningBackground:Y.getColor(u.inputValidationWarningBackground),inputValidationWarningForeground:Y.getColor(u.inputValidationWarningForeground),inputValidationWarningBorder:Y.getColor(u.inputValidationWarningBorder),inputValidationErrorBackground:Y.getColor(u.inputValidationErrorBackground),inputValidationErrorForeground:Y.getColor(u.inputValidationErrorForeground),inputValidationErrorBorder:Y.getColor(u.inputValidationErrorBorder)};this._findInput.style(ee);const ie={inputActiveOptionBorder:Y.getColor(u.inputActiveOptionBorder),inputActiveOptionForeground:Y.getColor(u.inputActiveOptionForeground),inputActiveOptionBackground:Y.getColor(u.inputActiveOptionBackground),inputBackground:Y.getColor(u.inputBackground),inputForeground:Y.getColor(u.inputForeground),inputBorder:Y.getColor(u.inputBorder),inputValidationInfoBackground:Y.getColor(u.inputValidationInfoBackground),inputValidationInfoForeground:Y.getColor(u.inputValidationInfoForeground),inputValidationInfoBorder:Y.getColor(u.inputValidationInfoBorder),inputValidationWarningBackground:Y.getColor(u.inputValidationWarningBackground),inputValidationWarningForeground:Y.getColor(u.inputValidationWarningForeground),inputValidationWarningBorder:Y.getColor(u.inputValidationWarningBorder),inputValidationErrorBackground:Y.getColor(u.inputValidationErrorBackground),inputValidationErrorForeground:Y.getColor(u.inputValidationErrorForeground),inputValidationErrorBorder:Y.getColor(u.inputValidationErrorBorder)};this._replaceInput.style(ie)}_onStateChanged(Y){this._updateButtons(),this._updateMatchesCount()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible);const Y=this._state.searchString.length>0;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),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(Y){if(Y&&this._findInput.setValue(Y),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(Y,ee){Y&&this._findInput.setValue(Y),this._isVisible=!0,setTimeout(()=>{this._domNode.classList.add("visible","visible-transition"),this._domNode.setAttribute("aria-hidden","false"),(ee?.focus??!0)&&this.focus()},0)}showWithReplace(Y,ee){Y&&this._findInput.setValue(Y),ee&&this._replaceInput.setValue(ee),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(Y){const ee=this.inputValue.length>0;this.prevBtn.setEnabled(this._isVisible&&ee&&Y),this.nextBtn.setEnabled(this._isVisible&&ee&&Y)}};j=we([F(0,r.IContextViewService),F(1,C.IContextKeyService),F(2,c.IThemeService),F(3,d.IConfigurationService),F(4,o.IMenuService),F(5,r.IContextMenuService),F(6,a.IInstantiationService)],j),e.SimpleFindReplaceWidget=j,(0,c.registerThemingParticipant)((K,Y)=>{const ee=K.getColor(u.editorWidgetBackground);ee&&Y.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { background-color: ${ee} !important; }`);const ie=K.getColor(u.editorWidgetForeground);ie&&Y.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { color: ${ie}; }`);const re=K.getColor(u.widgetShadow);re&&Y.addRule(`.monaco-workbench .simple-fr-find-part-wrapper { box-shadow: 0 0 8px 2px ${re}; }`);const oe=K.getColor(u.inputActiveOptionBorder);oe&&Y.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { border-color: ${oe}; }`);const se=K.getColor(u.inputActiveOptionForeground);se&&Y.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { color: ${se}; }`);const te=K.getColor(u.inputActiveOptionBackground);te&&Y.addRule(`.simple-fr-find-part .find-filter-button > .monaco-action-bar .action-label.notebook-filters.checked { background-color: ${te}; }`);const Z=K.getColor(u.editorWidgetResizeBorder)??K.getColor(u.editorWidgetBorder);Z&&Y.addRule(`.monaco-workbench .simple-fr-find-part-wrapper .monaco-sash { background-color: ${Z}; }`),Y.addRule(` :root { --notebook-find-width: ${q}px; --notebook-find-horizontal-padding: ${X}px; } `)})}),define(ae[868],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffEditorEventDispatcher=e.NotebookCellLayoutChangedEvent=e.NotebookDiffLayoutChangedEvent=e.NotebookDiffViewEventType=void 0;var R;(function(I){I[I.LayoutChanged=1]="LayoutChanged",I[I.CellLayoutChanged=2]="CellLayoutChanged"})(R=e.NotebookDiffViewEventType||(e.NotebookDiffViewEventType={}));class A{constructor(b,S){this.source=b,this.value=S,this.type=R.LayoutChanged}}e.NotebookDiffLayoutChangedEvent=A;class k{constructor(b){this.source=b,this.type=R.CellLayoutChanged}}e.NotebookCellLayoutChangedEvent=k;class E extends p.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(b){for(let S=0,C=b.length;S<C;S++){const r=b[S];switch(r.type){case R.LayoutChanged:this._onDidChangeLayout.fire(r);break;case R.CellLayoutChanged:this._onDidChangeCellLayout.fire(r);break}}}}e.NotebookDiffEditorEventDispatcher=E}),define(ae[384],le([1,0,7]),function(J,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 p;(function(R){R[R.Original=0]="Original",R[R.Modified=1]="Modified"})(p=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(ae[2338],le([1,0,86,10,121,65,2,33,12]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffOverviewRuler=void 0;let b=class extends I.Themable{constructor(C,r,u,i){super(i),this.notebookEditor=C,this.width=r,this._diffElementViewModels=[],this._lanes=2,this._insertColor=null,this._removeColor=null,this._insertColorHex=null,this._removeColorHex=null,this._disposables=this._register(new k.DisposableStore),this._renderAnimationFrame=null,this._domNode=(0,R.createFastDomNode)(document.createElement("canvas")),this._domNode.setPosition("relative"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),u.appendChild(this._domNode.domNode),this._overviewViewportDomElement=(0,R.createFastDomNode)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewViewportDomElement.setWidth(r),u.appendChild(this._overviewViewportDomElement.domNode),this._register(t.PixelRatio.onDidChange(()=>{this._scheduleRender()})),this._register(this.themeService.onDidColorThemeChange(f=>{this.applyColors(f)&&this._scheduleRender()})),this.applyColors(this.themeService.getColorTheme()),this._register(this.notebookEditor.onDidScroll(()=>{this._renderOverviewViewport()})),this._register(p.addStandardDisposableListener(u,p.EventType.POINTER_DOWN,f=>{this.notebookEditor.delegateVerticalScrollbarPointerDown(f)}))}applyColors(C){const r=C.getColor(E.diffOverviewRulerInserted)||(C.getColor(E.diffInserted)||E.defaultInsertColor).transparent(2),u=C.getColor(E.diffOverviewRulerRemoved)||(C.getColor(E.diffRemoved)||E.defaultRemoveColor).transparent(2),i=!r.equals(this._insertColor)||!u.equals(this._removeColor);return this._insertColor=r,this._removeColor=u,this._insertColor&&(this._insertColorHex=A.Color.Format.CSS.formatHexA(this._insertColor)),this._removeColor&&(this._removeColorHex=A.Color.Format.CSS.formatHexA(this._removeColor)),i}layout(){this._layoutNow()}updateViewModels(C,r){this._disposables.clear(),this._diffElementViewModels=C,r&&(this._disposables.add(r.onDidChangeLayout(()=>{this._scheduleRender()})),this._disposables.add(r.onDidChangeCellLayout(()=>{this._scheduleRender()}))),this._scheduleRender()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=p.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._layoutNow()}_layoutNow(){const C=this.notebookEditor.getLayoutInfo(),r=C.height,u=C.scrollHeight,i=t.PixelRatio.value;this._domNode.setWidth(this.width),this._domNode.setHeight(r),this._domNode.domNode.width=this.width*i,this._domNode.domNode.height=r*i;const f=this._domNode.domNode.getContext("2d");f.clearRect(0,0,this.width*i,r*i),this._renderCanvas(f,this.width*i,r*i,u*i,i),this._renderOverviewViewport()}_renderOverviewViewport(){const C=this._computeOverviewViewport();C?(this._overviewViewportDomElement.setTop(C.top),this._overviewViewportDomElement.setHeight(C.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const C=this.notebookEditor.getLayoutInfo();if(!C)return null;const r=this.notebookEditor.getScrollTop(),u=this.notebookEditor.getScrollHeight(),i=Math.max(0,C.height),f=Math.max(0,i-2*0),c=u>0?f/u:0,l=Math.max(0,Math.floor(C.height*c)),s=Math.floor(r*c);return{height:l,top:s}}_renderCanvas(C,r,u,i,f){if(!this._insertColorHex||!this._removeColorHex)return;const c=r/this._lanes;let l=0;for(let s=0;s<this._diffElementViewModels.length;s++){const d=this._diffElementViewModels[s],n=d.layoutInfo.totalHeight/i*f*u;switch(d.type){case"insert":C.fillStyle=this._insertColorHex,C.fillRect(c,l,c,n);break;case"delete":C.fillStyle=this._removeColorHex,C.fillRect(0,l,c,n);break;case"unchanged":break;case"modified":C.fillStyle=this._removeColorHex,C.fillRect(0,l,c,n),C.fillStyle=this._insertColorHex,C.fillRect(c,l,c,n);break}l+=n}}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),super.dispose()}};b=we([F(3,I.IThemeService)],b),e.NotebookDiffOverviewRuler=b,(0,I.registerThemingParticipant)((S,C)=>{const r=S.getColor(E.scrollbarSliderBackground);r&&C.addRule(` .notebook-text-diff-editor .diffViewport { background: ${r}; } `);const u=S.getColor(E.scrollbarSliderHoverBackground);u&&C.addRule(` .notebook-text-diff-editor .diffViewport:hover { background: ${u}; } `);const i=S.getColor(E.scrollbarSliderActiveBackground);i&&C.addRule(` .notebook-text-diff-editor .diffViewport:active { background: ${i}; } `)})}),define(ae[287],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorExtensionsRegistry=e.registerNotebookContribution=void 0;class t{constructor(){this.editorContributions=[]}registerEditorContribution(k,E){this.editorContributions.push({id:k,ctor:E})}getEditorContributions(){return this.editorContributions.slice(0)}}t.INSTANCE=new t;function p(A,k){t.INSTANCE.registerEditorContribution(A,k)}e.registerNotebookContribution=p;var R;(function(A){function k(){return t.INSTANCE.getEditorContributions()}A.getEditorContributions=k;function E(I){return t.INSTANCE.getEditorContributions().filter(b=>I.indexOf(b.id)>=0)}A.getSomeEditorContributions=E})(R=e.NotebookEditorExtensionsRegistry||(e.NotebookEditorExtensionsRegistry={}))}),define(ae[215],le([1,0,29,1776,63]),function(J,e,t,p,R){"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.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=void 0,e.selectKernelIcon=(0,R.registerIcon)("notebook-kernel-select",t.Codicon.serverEnvironment,(0,p.localize)(0,null)),e.executeIcon=(0,R.registerIcon)("notebook-execute",t.Codicon.play,(0,p.localize)(1,null)),e.executeAboveIcon=(0,R.registerIcon)("notebook-execute-above",t.Codicon.runAbove,(0,p.localize)(2,null)),e.executeBelowIcon=(0,R.registerIcon)("notebook-execute-below",t.Codicon.runBelow,(0,p.localize)(3,null)),e.stopIcon=(0,R.registerIcon)("notebook-stop",t.Codicon.primitiveSquare,(0,p.localize)(4,null)),e.deleteCellIcon=(0,R.registerIcon)("notebook-delete-cell",t.Codicon.trash,(0,p.localize)(5,null)),e.executeAllIcon=(0,R.registerIcon)("notebook-execute-all",t.Codicon.runAll,(0,p.localize)(6,null)),e.editIcon=(0,R.registerIcon)("notebook-edit",t.Codicon.pencil,(0,p.localize)(7,null)),e.stopEditIcon=(0,R.registerIcon)("notebook-stop-edit",t.Codicon.check,(0,p.localize)(8,null)),e.moveUpIcon=(0,R.registerIcon)("notebook-move-up",t.Codicon.arrowUp,(0,p.localize)(9,null)),e.moveDownIcon=(0,R.registerIcon)("notebook-move-down",t.Codicon.arrowDown,(0,p.localize)(10,null)),e.clearIcon=(0,R.registerIcon)("notebook-clear",t.Codicon.clearAll,(0,p.localize)(11,null)),e.splitCellIcon=(0,R.registerIcon)("notebook-split-cell",t.Codicon.splitVertical,(0,p.localize)(12,null)),e.successStateIcon=(0,R.registerIcon)("notebook-state-success",t.Codicon.check,(0,p.localize)(13,null)),e.errorStateIcon=(0,R.registerIcon)("notebook-state-error",t.Codicon.error,(0,p.localize)(14,null)),e.pendingStateIcon=(0,R.registerIcon)("notebook-state-pending",t.Codicon.clock,(0,p.localize)(15,null)),e.executingStateIcon=(0,R.registerIcon)("notebook-state-executing",t.Codicon.sync,(0,p.localize)(16,null)),e.collapsedIcon=(0,R.registerIcon)("notebook-collapsed",t.Codicon.chevronRight,(0,p.localize)(17,null)),e.expandedIcon=(0,R.registerIcon)("notebook-expanded",t.Codicon.chevronDown,(0,p.localize)(18,null)),e.openAsTextIcon=(0,R.registerIcon)("notebook-open-as-text",t.Codicon.fileCode,(0,p.localize)(19,null)),e.revertIcon=(0,R.registerIcon)("notebook-revert",t.Codicon.discard,(0,p.localize)(20,null)),e.renderOutputIcon=(0,R.registerIcon)("notebook-render-output",t.Codicon.preview,(0,p.localize)(21,null)),e.mimetypeIcon=(0,R.registerIcon)("notebook-mimetype",t.Codicon.code,(0,p.localize)(22,null))}),define(ae[2339],le([1,0]),function(J,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 E=new Date;console.log(`${E.getSeconds()}:${E.getMilliseconds().toString().padStart(3,"0")}`,`frame #${this._frameId}: `,...k)}}const p=new t;function R(...A){p.debug(...A)}e.notebookDebug=R}),define(ae[529],le([1,0]),function(J,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 p{constructor(E,I){this.source=E,this.value=I,this.type=t.LayoutChanged}}e.NotebookLayoutChangedEvent=p;class R{constructor(E){this.source=E,this.type=t.MetadataChanged}}e.NotebookMetadataChangedEvent=R;class A{constructor(E,I){this.source=E,this.cell=I,this.type=t.CellStateChanged}}e.NotebookCellStateChangedEvent=A}),define(ae[2340],le([1,0,21,6,2]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellStatusBarService=void 0;class A extends R.Disposable{constructor(){super(...arguments),this._onDidChangeProviders=this._register(new p.Emitter),this.onDidChangeProviders=this._onDidChangeProviders.event,this._onDidChangeItems=this._register(new p.Emitter),this.onDidChangeItems=this._onDidChangeItems.event,this._providers=[]}registerCellStatusBarItemProvider(E){this._providers.push(E);let I;return E.onDidChangeStatusBarItems&&(I=E.onDidChangeStatusBarItems(()=>this._onDidChangeItems.fire())),this._onDidChangeProviders.fire(),(0,R.toDisposable)(()=>{I?.dispose();const b=this._providers.findIndex(S=>S===E);this._providers.splice(b,1)})}async getStatusBarItemsForCell(E,I,b,S){const C=this._providers.filter(r=>r.viewType===b||r.viewType==="*");return await Promise.all(C.map(async r=>{try{return await r.provideCellStatusBarItems(E,I,S)??{items:[]}}catch(u){return(0,t.onUnexpectedExternalError)(u),{items:[]}}}))}}e.NotebookCellStatusBarService=A}),define(ae[267],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorService=void 0,e.INotebookEditorService=(0,t.createDecorator)("INotebookEditorWidgetService")}),define(ae[175],le([1,0,2]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellPartsCollection=e.CellPart=void 0;class p extends t.Disposable{constructor(){super(),this.cellDisposables=new t.DisposableStore}renderCell(k){this.currentCell=k,this.didRenderCell(k)}didRenderCell(k){}unrenderCell(k){this.currentCell=void 0,this.cellDisposables.clear()}prepareLayout(){}updateInternalLayoutNow(k){}updateState(k,E){}updateForExecutionState(k,E){}}e.CellPart=p;class R{constructor(k){this.parts=k}concat(k){return new R(this.parts.concat(k))}renderCell(k){for(const E of this.parts)E.renderCell(k)}unrenderCell(k){for(const E of this.parts)E.unrenderCell(k)}updateInternalLayoutNow(k){for(const E of this.parts)E.updateInternalLayoutNow(k)}prepareLayout(){for(const k of this.parts)k.prepareLayout()}updateState(k,E){for(const I of this.parts)I.updateState(k,E)}updateForExecutionState(k,E){for(const I of this.parts)I.updateForExecutionState(k,E)}}e.CellPartsCollection=R}),define(ae[446],le([1,0,143,10,84]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionViewWithLabel=e.CodiconActionViewItem=void 0;class A extends R.MenuEntryActionViewItem{updateLabel(){this.options.label&&this.label&&p.reset(this.label,...(0,t.renderLabelWithIcons)(this._commandAction.label??""))}}e.CodiconActionViewItem=A;class k extends R.MenuEntryActionViewItem{render(I){super.render(I),I.classList.add("notebook-action-view-item"),this._actionLabel=document.createElement("a"),I.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)}}e.ActionViewWithLabel=k}),define(ae[2341],le([1,0,10,175]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellDecorations=void 0;class R extends p.CellPart{constructor(k,E){super(),this.rootContainer=k,this.decorationContainer=E}didRenderCell(k){const E=[];this.rootContainer.classList.forEach(b=>{/^nb\-.*$/.test(b)&&E.push(b)}),E.forEach(b=>{this.rootContainer.classList.remove(b)}),this.decorationContainer.innerText="";const I=()=>{this.decorationContainer.innerText="",k.getCellDecorations().filter(b=>b.topClassName!==void 0).forEach(b=>{this.decorationContainer.append(t.$(`.${b.topClassName}`))})};this.cellDisposables.add(k.onCellDecorationsChanged(b=>{(b.added.find(C=>C.topClassName)||b.removed.find(C=>C.topClassName))&&I()})),I()}}e.CellDecorations=R}),define(ae[2342],le([1,0,10,65,14,20,92,329]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellDragImageRenderer=void 0;class I{getRichText(C,r){const u=C.getModel();if(!u)return null;const i=this.getDefaultColorMap(),f=C.getOptions().get(45),c="--notebook-editor-font-family",l="--notebook-editor-font-size",s="--notebook-editor-font-weight",d=`color: ${i[1]};background-color: ${i[2]};font-family: var(${c});font-weight: var(${s});font-size: var(${l});line-height: ${f.lineHeight}px;white-space: pre;`,n=t.$("div",{style:d}),a=f.fontSize,o=f.fontWeight;n.style.setProperty(c,f.fontFamily),n.style.setProperty(l,`${a}px`),n.style.setProperty(s,o);const g=this.getRichTextLinesAsHtml(u,r,i);return n.innerHTML=g,n}getRichTextLinesAsHtml(C,r,u){const i=r.startLineNumber,f=r.startColumn,c=r.endLineNumber,l=r.endColumn,s=C.getOptions().tabSize;let d="";for(let n=i;n<=c;n++){const a=C.tokenization.getLineTokens(n),o=a.getLineContent(),g=n===i?f-1:0,h=n===c?l-1:o.length;o===""?d+="<br>":d+=(0,E.tokenizeLineToHTML)(o,a.inflate(),u,g,h,s,R.isWindows)}return I._ttPolicy?.createHTML(d)??d}getDefaultColorMap(){const C=k.TokenizationRegistry.getColorMap(),r=["#000000"];if(C)for(let u=1,i=C.length;u<i;u++)r[u]=p.Color.Format.CSS.formatHex(C[u]);return r}}I._ttPolicy=window.trustedTypes?.createPolicy("cellRendererEditorText",{createHTML(S){return S}});class b{getDragImage(C,r,u){let i=this.getDragImageImpl(C,r,u);return i||(i=document.createElement("div"),i.textContent="1 cell"),i}getDragImageImpl(C,r,u){const i=C.container.cloneNode(!0);i.classList.forEach(l=>i.classList.remove(l)),i.classList.add("cell-drag-image","monaco-list-row","focused",`${u}-cell-row`);const f=i.querySelector(".cell-editor-container");if(!f)return null;const c=new I().getRichText(r,new A.Range(1,1,1,1e3));return c?(t.reset(f,c),i):null}}e.CodeCellDragImageRenderer=b}),define(ae[2343],le([1,0,10,175]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFocusPart=void 0;class R extends p.CellPart{constructor(k,E,I){super(),this._register(t.addDisposableListener(k,t.EventType.FOCUS,()=>{this.currentCell&&I.focusElement(this.currentCell)},!0)),E&&this._register(t.addDisposableListener(E,t.EventType.FOCUS,()=>{this.currentCell&&this.currentCell.outputsViewModels.length&&I.focusNotebookCell(this.currentCell,"output")}))}}e.CellFocusPart=R}),define(ae[2344],le([1,0,10,175]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCellInput=void 0;class R extends p.CellPart{constructor(k,E){super(),this.notebookEditor=k,this._register(t.addDisposableListener(E,t.EventType.DBLCLICK,I=>{!this.currentCell||!this.notebookEditor.hasModel()||(this.currentCell.isInputCollapsed?this.currentCell.isInputCollapsed=!1:this.currentCell.isOutputCollapsed=!1)})),this._register(t.addDisposableListener(E,t.EventType.CLICK,I=>{if(!this.currentCell||!this.notebookEditor.hasModel())return;const b=I.target;b&&b.classList&&b.classList.contains("expandInputIcon")&&(this.currentCell.isInputCollapsed=!1)}))}}e.CollapsedCellInput=R}),define(ae[869],le([1,0,194]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerStickyScroll=void 0;function p(R,A,k,E){const I=E?.extraOffset??0,b=E?.min??0,S=()=>{if(A.isInputCollapsed)k.style.top="";else{const C=R.notebookOptions.computeTopInsertToolbarHeight(R.textModel?.viewType),r=R.scrollTop-C,u=R.getAbsoluteTopOfElement(A),i=r-u+I,f=A.layoutInfo.editorHeight+A.layoutInfo.statusBarHeight-45,c=f>20?(0,t.clamp)(b,i,f):b;k.style.top=`${c}px`}};return S(),R.onDidScroll(()=>S())}e.registerStickyScroll=p}),define(ae[2345],le([1,0,10,263,11,6,84,15,7,37,5,38,446,175,869,245]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellTitleToolbarPart=e.BetweenCellToolbar=void 0;let c=class extends u.CellPart{constructor(a,o,g,h,v,m,w){super(),this._notebookEditor=a,this._bottomCellToolbarContainer=g,this._betweenCellToolbar=this._register(new p.ToolBar(this._bottomCellToolbarContainer,v,{actionViewItemProvider:T=>{if(T instanceof E.MenuItemAction)return this._notebookEditor.notebookOptions.getLayoutConfiguration().insertToolbarAlignment==="center"?h.createInstance(r.CodiconActionViewItem,T,void 0):h.createInstance(k.MenuEntryActionViewItem,T,void 0)}}));const D=this._register(w.createMenu(this._notebookEditor.creationOptions.menuIds.cellInsertToolbar,m)),y=()=>{const T=s(D);this._betweenCellToolbar.setActions(T.primary,T.secondary)};this._register(D.onDidChange(()=>y())),this._register(this._notebookEditor.notebookOptions.onDidChangeOptions(T=>{T.insertToolbarAlignment&&y()})),y()}updateContext(a){this._betweenCellToolbar.context=a}didRenderCell(a){this._betweenCellToolbar.context={ui:!0,cell:a,notebookEditor:this._notebookEditor,$mid:12}}updateInternalLayoutNow(a){const o=a.layoutInfo.bottomToolbarOffset;this._bottomCellToolbarContainer.style.transform=`translateY(${o}px)`}};c=we([F(3,S.IInstantiationService),F(4,b.IContextMenuService),F(5,I.IContextKeyService),F(6,E.IMenuService)],c),e.BetweenCellToolbar=c;let l=class extends u.CellPart{get hasActions(){return this._toolbar.getItemsLength()+this._deleteToolbar.getItemsLength()>0}constructor(a,o,g,h,v,m,w,D){if(super(),this.toolbarContainer=a,this._rootClassDelegate=o,this._notebookEditor=v,this._onDidUpdateActions=this._register(new A.Emitter),this.onDidUpdateActions=this._onDidUpdateActions.event,this._toolbar=D.createInstance(f.WorkbenchToolBar,a,{actionViewItemProvider:y=>(0,k.createActionViewItem)(D,y),renderDropdownAsChildElement:!0}),this._titleMenu=this._register(w.createMenu(g,m)),this._deleteToolbar=this._register(D.invokeFunction(y=>d(y,a,"cell-delete-toolbar"))),this._deleteMenu=this._register(w.createMenu(h,m)),!this._notebookEditor.creationOptions.isReadOnly){const y=s(this._deleteMenu);this._deleteToolbar.setActions(y.primary,y.secondary)}this.setupChangeListeners(this._toolbar,this._titleMenu),this.setupChangeListeners(this._deleteToolbar,this._deleteMenu)}didRenderCell(a){this.cellDisposables.add((0,i.registerStickyScroll)(this._notebookEditor,a,this.toolbarContainer,{extraOffset:4,min:-14})),this.updateContext({ui:!0,cell:a,notebookEditor:this._notebookEditor,$mid:12})}updateContext(a){this._toolbar.context=a,this._deleteToolbar.context=a}setupChangeListeners(a,o){let g=!1,h;this.updateActions(a,o),this._register(o.onDidChange(()=>{if(g){h=()=>this.updateActions(a,o);return}this.updateActions(a,o)})),this._rootClassDelegate.toggle("cell-toolbar-dropdown-active",!1),this._register(a.onDidChangeDropdownVisibility(v=>{g=v,this._rootClassDelegate.toggle("cell-toolbar-dropdown-active",v),h&&!v&&(this._register((0,R.disposableTimeout)(()=>{h?.()})),h=void 0)}))}updateActions(a,o){const g=s(o),h=t.isAncestor(document.activeElement,a.getElement());a.setActions(g.primary,g.secondary),h&&this._notebookEditor.focus(),g.primary.length||g.secondary.length?(this._rootClassDelegate.toggle("cell-has-toolbar-actions",!0),this._onDidUpdateActions.fire()):(this._rootClassDelegate.toggle("cell-has-toolbar-actions",!1),this._onDidUpdateActions.fire())}};l=we([F(5,I.IContextKeyService),F(6,E.IMenuService),F(7,S.IInstantiationService)],l),e.CellTitleToolbarPart=l;function s(n){const g={primary:[],secondary:[]};return(0,k.createAndFillInActionBarActions)(n,{shouldForwardArgs:!0},g,h=>/^inline/.test(h)),g}function d(n,a,o){const g=n.get(b.IContextMenuService),h=n.get(C.IKeybindingService),v=n.get(S.IInstantiationService),m=new p.ToolBar(a,g,{getKeyBinding:w=>h.lookupKeybinding(w.id),actionViewItemProvider:w=>(0,k.createActionViewItem)(v,w),renderDropdownAsChildElement:!0});return o&&m.getElement().classList.add(o),m}}),define(ae[2346],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preloadsScriptStr=void 0;async function t(R){const A=new TextEncoder,k=new TextDecoder;let E=R.options,I=R.isWorkspaceTrusted;const b=R.lineLimit,S=globalThis.acquireVsCodeApi,C=S();delete globalThis.acquireVsCodeApi;const r=document.querySelector("style#vscode-tokenization-styles"),u=Z=>{if(!(!Z||!Z.view||!Z.view.document)){for(const ne of Z.composedPath())if(ne instanceof HTMLElement&&ne.classList.contains("output")){oe("outputFocus",{id:ne.id});break}for(const ne of Z.composedPath())if(ne instanceof HTMLAnchorElement&&ne.href){if(ne.href.startsWith("blob:"))f(ne.href,ne.download);else if(ne.href.startsWith("data:"))i(ne.href,ne.download);else if(ne.getAttribute("href")?.trim().startsWith("#")){if(!ne.hash){oe("scroll-to-reveal",{scrollTop:0});return}const ce=ne.hash.substring(1);let de=Z.view.document.getElementById(ce);if(!de){for(const he of Z.view.document.querySelectorAll(".preview"))if(de=he.shadowRoot?.getElementById(ce),de)break}if(de){const he=de.getBoundingClientRect().top+Z.view.scrollY;oe("scroll-to-reveal",{scrollTop:he});return}}else{const ce=ne.getAttribute("href");ce&&oe("clicked-link",{href:ce})}Z.preventDefault(),Z.stopPropagation();return}}},i=async(Z,ne)=>{oe("clicked-data-url",{data:Z,downloadName:ne})},f=async(Z,ne)=>{try{const de=await(await fetch(Z)).blob(),he=new FileReader;he.addEventListener("load",()=>{i(he.result,ne)}),he.readAsDataURL(de)}catch(ce){console.error(ce.message)}};document.body.addEventListener("click",u);const c=["type","src","nonce","noModule","async"],l=Z=>{const ne=Array.from(Z.getElementsByTagName("script"));for(let ce=0;ce<ne.length;ce++){const de=ne[ce],he=document.createElement("script"),pe=z?.createScript(de.innerText)??de.innerText;he.text=pe;for(const me of c){const Se=de[me]||de.getAttribute&&de.getAttribute(me);Se&&he.setAttribute(me,Se)}Z.appendChild(he).parentNode.removeChild(he)}};async function s(Z,ne){const ce=await fetch(Z),de=await ce.text();if(!ce.ok)throw new Error(`Unexpected ${ce.status} requesting ${ne}: ${de||ce.statusText}`);return de}function d(){return Object.freeze({onDidReceiveKernelMessage:B.event,postKernelMessage:Z=>oe("customKernelMessage",{message:Z})})}const n=(Z,ne)=>{const ce=Object.entries(ne);return new Function(...ce.map(([de])=>de),Z)(...ce.map(([,de])=>de))};async function a(Z,ne,ce){if(ce)return o(Z);const de=await s(Z,ne),he=/\bexport\b.*\bactivate\b/.test(de);try{return he?o(Z):n(de,{...V,scriptUrl:Z})}catch(pe){throw console.error(pe),pe}}async function o(Z){const ne=await __import(Z);if(!ne.activate){console.error(`Notebook preload '${Z}' was expected to be a module but it does not export an 'activate' function`);return}return ne.activate(d())}const g=new class{constructor(){this.pending=new Map}updateHeight(Z,ne,ce){this.pending.size||setTimeout(()=>{this.updateImmediately()},0);const de=this.pending.get(Z);de&&de.isOutput?this.pending.set(Z,{id:Z,height:ne,init:de.init,isOutput:de.isOutput}):this.pending.set(Z,{id:Z,height:ne,...ce})}updateImmediately(){!this.pending.size||(oe("dimension",{updates:Array.from(this.pending.values())}),this.pending.clear())}},h=new class{constructor(){this._observedElements=new WeakMap,this._observer=new ResizeObserver(Z=>{for(const ne of Z){if(!document.body.contains(ne.target))continue;const ce=this._observedElements.get(ne.target);if(!ce||(this.postResizeMessage(ce.cellId),ne.target.id!==ce.id)||!ne.contentRect)continue;if(!ce.output){this.updateHeight(ce,ne.target.offsetHeight);continue}const de=ne.contentRect.height;de!==0&&ce.lastKnownPadding===0||de===0&&ce.lastKnownPadding!==0?window.requestAnimationFrame(()=>{de!==0?ne.target.style.padding=`${R.style.outputNodePadding}px ${R.style.outputNodePadding}px ${R.style.outputNodePadding}px ${R.style.outputNodeLeftPadding}px`:ne.target.style.padding="0px",this.updateHeight(ce,ne.target.offsetHeight)}):this.updateHeight(ce,ne.target.offsetHeight)}})}updateHeight(Z,ne){Z.lastKnownHeight!==ne&&(Z.lastKnownHeight=ne,g.updateHeight(Z.id,ne,{isOutput:Z.output}))}observe(Z,ne,ce,de){this._observedElements.has(Z)||(this._observedElements.set(Z,{id:ne,output:ce,lastKnownPadding:R.style.outputNodePadding,lastKnownHeight:-1,cellId:de}),this._observer.observe(Z))}postResizeMessage(Z){clearTimeout(this._outputResizeTimer),this._outputResizeTimer=setTimeout(()=>{oe("outputResized",{cellId:Z})},250)}};function v(Z){for(let ne=Z.target;ne;ne=ne.parentNode){if(!(ne instanceof Element)||ne.id==="container"||ne.classList.contains("cell_container")||ne.classList.contains("markup")||ne.classList.contains("output_container"))return!1;if(Z.deltaY<0&&ne.scrollTop>0||Z.deltaY>0&&ne.scrollTop+ne.clientHeight<ne.scrollHeight)return!0}return!1}const m=Z=>{Z.defaultPrevented||v(Z)||oe("did-scroll-wheel",{payload:{deltaMode:Z.deltaMode,deltaX:Z.deltaX,deltaY:Z.deltaY,deltaZ:Z.deltaZ,wheelDelta:Z.wheelDelta,wheelDeltaX:Z.wheelDeltaX,wheelDeltaY:Z.wheelDeltaY,detail:Z.detail,shiftKey:Z.shiftKey,type:Z.type}})};function w(Z){const ne=document.getElementById(Z);if(ne){if(ne.contains(document.activeElement))return;ne.querySelector('[tabindex="0"], [href], button, input, option, select, textarea')?.focus()}}function D(Z,ne){const ce=document.createElement("div");return ce.id=`focus-sink-${Z}`,ce.tabIndex=0,ce.addEventListener("focus",()=>{oe("focus-editor",{cellId:Z,focusNext:ne})}),ce}function y(Z,ne="mark",ce={}){function de(ge){if(!ge.startContainer.ownerDocument)return[];if(ge.startContainer.nodeType===Node.TEXT_NODE&&ge.startOffset>0){const De=ge.startContainer,Ae=ge.endOffset,Pe=De.splitText(ge.startOffset);ge.endContainer===De&&ge.setEnd(Pe,Ae-ge.startOffset),ge.setStart(Pe,0)}ge.endContainer.nodeType===Node.TEXT_NODE&&ge.endOffset<ge.endContainer.length&&ge.endContainer.splitText(ge.endOffset);const ue=ge.startContainer.ownerDocument.createTreeWalker(ge.commonAncestorContainer,NodeFilter.SHOW_TEXT,De=>ge.intersectsNode(De)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT);ue.currentNode=ge.startContainer;const Ce=[];for(ue.currentNode.nodeType===Node.TEXT_NODE&&Ce.push(ue.currentNode);ue.nextNode()&&ge.comparePoint(ue.currentNode,0)!==1;)ue.currentNode.nodeType===Node.TEXT_NODE&&Ce.push(ue.currentNode);return Ce}function he(ge,ue,Ce){const De=ge.ownerDocument.createElement(ue);Object.keys(Ce).forEach(Pe=>{De.setAttribute(Pe,Ce[Pe])});const Ae=ge.ownerDocument.createRange();return Ae.selectNode(ge),Ae.surroundContents(De),De}if(Z.collapsed)return{remove:()=>{},update:()=>{}};const pe=de(Z),me=[];for(const ge in pe){const ue=he(pe[ge],ne,ce);me.push(ue)}function Se(ge){if(ge.childNodes.length===1)ge.parentNode?.replaceChild(ge.firstChild,ge);else{for(;ge.firstChild;)ge.parentNode?.insertBefore(ge.firstChild,ge);ge.remove()}}function Ie(){for(const ge in me)Se(me[ge])}function ve(ge,ue={}){Object.keys(ue).forEach(Ce=>{ge.setAttribute(Ce,ue[Ce])})}function be(ge){for(const ue in me)ve(me[ue],ge)}return{remove:Ie,update:be}}function T(Z){const ne=window.getSelection();if(ne)try{ne.removeAllRanges();const ce=document.createRange();ce.setStart(Z.startContainer,Z.startOffset),ce.setEnd(Z.endContainer,Z.endOffset),ne.addRange(ce)}catch(ce){console.log(ce)}}function _(Z,ne,ce="mark",de={}){if(ne){const he=y(Z,ce,de);return{range:Z,dispose:he.remove,update:(pe,me)=>{me===void 0?he.update({style:`background-color: ${pe}`}):he.update({class:me})}}}else{window.document.execCommand("hiliteColor",!1,H);const he=window.getSelection().getRangeAt(0).cloneRange(),pe={collapsed:he.collapsed,commonAncestorContainer:he.commonAncestorContainer,endContainer:he.endContainer,endOffset:he.endOffset,startContainer:he.startContainer,startOffset:he.startOffset};return{range:pe,dispose:()=>{T(pe);try{document.designMode="On",document.execCommand("removeFormat",!1,void 0),document.designMode="Off",window.getSelection()?.removeAllRanges()}catch(me){console.log(me)}},update:(me,Se)=>{T(pe);try{document.designMode="On",document.execCommand("removeFormat",!1,void 0),window.document.execCommand("hiliteColor",!1,me),document.designMode="Off",window.getSelection()?.removeAllRanges()}catch(Ie){console.log(Ie)}}}}}function L(Z=()=>{}){const ne=new Set;return{fire(ce){for(const de of[...ne])de.fn.call(de.thisArg,ce)},event(ce,de,he){const pe={fn:ce,thisArg:de},me={dispose:()=>{ne.delete(pe),Z(ne)}};return ne.add(pe),Z(ne),he instanceof Array?he.push(me):he&&he.add(me),me}}}function M(Z,ne,ce){ne.innerText=Z;const de=document.createElement("ul");for(const he of ce){console.error(he);const pe=document.createElement("li");pe.innerText=he.message,de.appendChild(pe)}ne.appendChild(de)}const O=new class{constructor(){this._requestPool=0,this._requests=new Map}getOutputItem(Z,ne){const ce=this._requestPool++;let de;const he=new Promise(pe=>de=pe);return this._requests.set(ce,{resolve:de}),oe("getOutputItem",{requestId:ce,outputId:Z,mime:ne}),he}resolveOutputItem(Z,ne){const ce=this._requests.get(Z);!ce||(this._requests.delete(Z),ce.resolve(ne))}};let N=!1;function P(Z,ne,ce,de,he){function pe(ve,be,ge,ue){return Object.freeze({id:ve,mime:be,metadata:ge,data(){return ue},text(){return k.decode(ue)},json(){return JSON.parse(this.text())},blob(){return new Blob([ue],{type:this.mime})},get _allOutputItems(){return N||(N=!0,console.warn("'_allOutputItems' is proposed API. DO NOT ship an extension that depends on it!")),Se}})}const me=new Map,Se=Object.freeze(he.map(ve=>{const be=ve.mime;return Object.freeze({mime:be,getItem(){const ge=me.get(be);if(ge)return ge;const ue=O.getOutputItem(Z,be).then(Ce=>Ce?pe(Z,Ce.mime,ce,Ce.valueBytes):void 0);return me.set(be,ue),ue}})})),Ie=pe(Z,ne,ce,de);return me.set(ne,Promise.resolve(Ie)),Ie}const B=L(),V={acquireVsCodeApi:S,onDidReceiveKernelMessage:B.event,postKernelMessage:Z=>oe("customKernelMessage",{message:Z})},z=window.trustedTypes?.createPolicy("notebookRenderer",{createHTML:Z=>Z,createScript:Z=>Z});window.addEventListener("wheel",m);let x=null;const H=window.getComputedStyle(document.getElementById("_defaultColorPalatte")).color,W=window.getComputedStyle(document.getElementById("_defaultColorPalatte")).backgroundColor;class U{constructor(ne){this.matches=ne,this._findMatchIndex=-1;for(let ce=ne.length-1;ce>=0;ce--){const de=ne[ce],he=_(de.originalRange,!0,"mark",de.isShadow?{style:"background-color: "+H+";"}:{class:"find-match"});de.highlightResult=he}}highlightCurrentMatch(ne){const ce=this.matches[this._findMatchIndex];ce?.highlightResult?.update(H,ce.isShadow?void 0:"find-match");const de=this.matches[ne];this._findMatchIndex=ne;const he=window.getSelection();if(!!de&&!!he&&de.highlightResult){let pe=0;try{const me=document.getElementById(de.id).getBoundingClientRect().top,Se=document.createRange();Se.selectNode(de.highlightResult.range.startContainer);const Ie=Se.getBoundingClientRect().top;Se.detach(),pe=Ie-me}catch{}de.highlightResult?.update(W,de.isShadow?void 0:"current-find-match"),document.getSelection()?.removeAllRanges(),oe("didFindHighlight",{offset:pe})}}unHighlightCurrentMatch(ne){const ce=this.matches[ne];ce&&ce.highlightResult&&ce.highlightResult.update(H,ce.isShadow?void 0:"find-match")}dispose(){document.getSelection()?.removeAllRanges(),this.matches.forEach(ne=>{ne.highlightResult?.dispose()})}}class ${constructor(ne){this.matches=ne,this._findMatchIndex=-1,this._matchesHighlight=new Highlight,this._matchesHighlight.priority=1,this._currentMatchesHighlight=new Highlight,this._currentMatchesHighlight.priority=2;for(let ce=0;ce<ne.length;ce++)this._matchesHighlight.add(ne[ce].originalRange);CSS.highlights?.set("find-highlight",this._matchesHighlight),CSS.highlights?.set("current-find-highlight",this._currentMatchesHighlight)}highlightCurrentMatch(ne){this._findMatchIndex=ne;const ce=this.matches[this._findMatchIndex],de=ce.originalRange;if(ce){let he=0;try{const pe=document.getElementById(ce.id).getBoundingClientRect().top;he=ce.originalRange.getBoundingClientRect().top-pe,oe("didFindHighlight",{offset:he})}catch{}}this._currentMatchesHighlight.clear(),this._currentMatchesHighlight.add(de)}unHighlightCurrentMatch(ne){this._currentMatchesHighlight.clear()}dispose(){document.getSelection()?.removeAllRanges(),this._currentMatchesHighlight.clear(),this._matchesHighlight.clear()}}const q=(Z,ne)=>{let ce=!0;const de=[],he=document.createRange();he.selectNodeContents(document.getElementById("findStart"));const pe=window.getSelection();pe?.removeAllRanges(),pe?.addRange(he),K.toggleDragDropEnabled(!1);try{for(document.designMode="On";ce&&de.length<500;)if(ce=window.find(Z,!!ne.caseSensitive,!1,!1,!!ne.wholeWord,!0,!1),ce){const me=window.getSelection();if(!me){console.log("no selection");break}if(ne.includeMarkup&&me.rangeCount>0&&me.getRangeAt(0).startContainer.nodeType===1&&me.getRangeAt(0).startContainer.classList.contains("markup")){const Ie=me.anchorNode?.firstChild,ve=Ie.shadowRoot,be=ve?.getSelection?ve?.getSelection():null;be&&be.anchorNode&&de.push({type:"preview",id:Ie.id,cellId:Ie.id,container:Ie,isShadow:!0,originalRange:be.getRangeAt(0)})}if(ne.includeOutput&&me.rangeCount>0&&me.getRangeAt(0).startContainer.nodeType===1&&me.getRangeAt(0).startContainer.classList.contains("output_container")){const Ie=me.getRangeAt(0).startContainer.parentElement.id,ve=me.anchorNode?.firstChild,be=ve.shadowRoot,ge=be?.getSelection?be?.getSelection():null;ge&&ge.anchorNode&&de.push({type:"output",id:ve.id,cellId:Ie,container:ve,isShadow:!0,originalRange:ge.getRangeAt(0)})}const Se=me?.anchorNode?.parentElement;if(Se){const Ie=de.length?de[de.length-1]:null;if(Ie&&Ie.container.contains(Se)&&ne.includeOutput)de.push({type:Ie.type,id:Ie.id,cellId:Ie.cellId,container:Ie.container,isShadow:!1,originalRange:window.getSelection().getRangeAt(0)});else for(let ve=Se;ve&&ve instanceof Element;ve=ve.parentElement){if(ve.classList.contains("output")&&ne.includeOutput){const be=ve.parentElement?.parentElement?.id;be&&de.push({type:"output",id:ve.id,cellId:be,container:ve,isShadow:!1,originalRange:window.getSelection().getRangeAt(0)});break}if(ve.id==="container"||ve===document.body)break}}else break}}catch(me){console.log(me)}de.length&&CSS.highlights?x=new $(de):x=new U(de),document.getSelection()?.removeAllRanges(),K.toggleDragDropEnabled(E.dragAndDropEnabled),oe("didFind",{matches:de.map((me,Se)=>({type:me.type,id:me.id,cellId:me.cellId,index:Se}))})};window.addEventListener("message",async Z=>{const ne=Z;switch(ne.data.type){case"initializeMarkup":{try{await Promise.all(ne.data.cells.map(ce=>K.ensureMarkupCell(ce)))}finally{g.updateImmediately(),oe("initializedMarkup",{requestId:ne.data.requestId})}break}case"createMarkupCell":K.ensureMarkupCell(ne.data.cell);break;case"showMarkupCell":K.showMarkupCell(ne.data.id,ne.data.top,ne.data.content,ne.data.metadata);break;case"hideMarkupCells":for(const ce of ne.data.ids)K.hideMarkupCell(ce);break;case"unhideMarkupCells":for(const ce of ne.data.ids)K.unhideMarkupCell(ce);break;case"deleteMarkupCell":for(const ce of ne.data.ids)K.deleteMarkupCell(ce);break;case"updateSelectedMarkupCells":K.updateSelectedCells(ne.data.selectedCellIds);break;case"html":{const ce=ne.data;Q.enqueue(ce.outputId,de=>K.renderOutputCell(ce,de));break}case"view-scroll":{ne.data.widgets.forEach(ce=>{Q.enqueue(ce.outputId,()=>{K.updateOutputsScroll([ce])})}),K.updateMarkupScrolls(ne.data.markupCells);break}case"clear":j.clearAll(),K.clearAll(),document.getElementById("container").innerText="";break;case"clearOutput":{const{cellId:ce,rendererId:de,outputId:he}=ne.data;Q.cancelOutput(he),K.clearOutput(ce,he,de);break}case"hideOutput":{const{cellId:ce,outputId:de}=ne.data;Q.enqueue(de,()=>{K.hideOutput(ce)});break}case"showOutput":{const{outputId:ce,cellTop:de,cellId:he,content:pe}=ne.data;Q.enqueue(ce,()=>{K.showOutput(he,ce,de),pe&&K.updateAndRerender(he,ce,pe)});break}case"ack-dimension":{for(const{cellId:ce,outputId:de,height:he}of ne.data.updates)K.updateOutputHeight(ce,de,he);break}case"preload":{const ce=ne.data.resources;for(const{uri:de,originalUri:he}of ce)G.load(de,he,!1);break}case"updateRenderers":{const{rendererData:ce}=ne.data;j.updateRendererData(ce);break}case"focus-output":w(ne.data.cellId);break;case"decorations":{let ce=document.getElementById(ne.data.cellId);ce||(K.ensureOutputCell(ne.data.cellId,-1e5,!0),ce=document.getElementById(ne.data.cellId)),ce?.classList.add(...ne.data.addedClassNames),ce?.classList.remove(...ne.data.removedClassNames);break}case"customKernelMessage":B.fire(ne.data.message);break;case"customRendererMessage":j.getRenderer(ne.data.rendererId)?.receiveMessage(ne.data.message);break;case"notebookStyles":{const ce=document.documentElement.style;for(let de=ce.length-1;de>=0;de--){const he=ce[de];he&&he.startsWith("--notebook-")&&ce.removeProperty(he)}for(const[de,he]of Object.entries(ne.data.styles))ce.setProperty(`--${de}`,he);break}case"notebookOptions":E=ne.data.options,K.toggleDragDropEnabled(E.dragAndDropEnabled);break;case"updateWorkspaceTrust":{I=ne.data.isTrusted,K.rerender();break}case"tokenizedCodeBlock":{const{codeBlockId:ce,html:de}=ne.data;Y.highlightCodeBlock(ce,de);break}case"tokenizedStylesChanged":{r&&(r.textContent=ne.data.css);break}case"find":{x?.dispose(),q(ne.data.query,ne.data.options);break}case"findHighlight":{x?.highlightCurrentMatch(ne.data.index);break}case"findUnHighlight":{x?.unHighlightCurrentMatch(ne.data.index);break}case"findStop":{x?.dispose();break}case"returnOutputItem":O.resolveOutputItem(ne.data.requestId,ne.data.output)}});class X{constructor(ne){this.data=ne,this._onMessageEvent=L()}receiveMessage(ne){this._onMessageEvent.fire(ne)}async renderOutputItem(ne,ce,de){try{await this.load()}catch(he){de.aborted||M(`Error loading renderer '${this.data.id}'`,ce,he instanceof Error?[he]:[]);return}if(!this._api){de.aborted||M(`Renderer '${this.data.id}' does not implement renderOutputItem`,ce,[]);return}try{await this._api.renderOutputItem(ne,ce,de)}catch(he){de.aborted||M(`Error rendering output item using '${this.data.id}'`,ce,he instanceof Error?[he]:[])}}disposeOutputItem(ne){this._api?.disposeOutputItem?.(ne)}createRendererContext(){const{id:ne,messaging:ce}=this.data,de={setState:he=>C.setState({...C.getState(),[ne]:he}),getState:()=>{const he=C.getState();return typeof he=="object"&&he?he[ne]:void 0},getRenderer:async he=>{const pe=j.getRenderer(he);if(!!pe)return pe._api?pe._api:pe.load()},workspace:{get isTrusted(){return I}},settings:{get lineLimit(){return b}}};return ce&&(de.onDidReceiveMessage=this._onMessageEvent.event,de.postMessage=he=>oe("customRendererMessage",{rendererId:ne,message:he})),Object.freeze(de)}load(){return this._loadPromise??=this._load(),this._loadPromise}async _load(){await G.waitForAllCurrent();const ne=await __import(this.data.entrypoint.path);if(!!ne)return this._api=await ne.activate(this.createRendererContext()),await Promise.all(R.rendererData.filter(ce=>ce.entrypoint.extends===this.data.id).map(async ce=>{const de=j.getRenderer(ce.id);if(!de)throw new Error(`Could not find extending renderer: ${ce.id}`);try{return await de.load()}catch(he){console.error(he);return}})),this._api}}const G=new class{constructor(){this.preloads=new Map}waitFor(Z){return this.preloads.get(Z)||Promise.resolve(new Error(`Preload not ready: ${Z}`))}load(Z,ne,ce){const de=Promise.all([a(Z,ne,ce),this.waitForAllCurrent()]);return this.preloads.set(Z,de),de}waitForAllCurrent(){return Promise.all([...this.preloads.values()].map(Z=>Z.catch(ne=>ne)))}},Q=new class{constructor(){this.outputs=new Map}enqueue(Z,ne){const ce=this.outputs.get(Z);if(ce)ce.queue=ce.queue.then(de=>{if(!ce.abort.signal.aborted)return ne(ce.abort.signal)});else{const de=new AbortController;this.outputs.set(Z,{abort:de,queue:new Promise(he=>he(ne(de.signal)))})}}cancelAll(){for(const{abort:Z}of this.outputs.values())Z.abort();this.outputs.clear()}cancelOutput(Z){const ne=this.outputs.get(Z);ne&&(ne.abort.abort(),this.outputs.delete(Z))}},j=new class{constructor(){this._renderers=new Map;for(const Z of R.rendererData)this.addRenderer(Z)}getRenderer(Z){return this._renderers.get(Z)}rendererEqual(Z,ne){if(Z.id!==ne.id||Z.entrypoint.path!==ne.entrypoint.path||Z.entrypoint.extends!==ne.entrypoint.extends||Z.messaging!==ne.messaging||Z.mimeTypes.length!==ne.mimeTypes.length)return!1;for(let ce=0;ce<Z.mimeTypes.length;ce++)if(Z.mimeTypes[ce]!==ne.mimeTypes[ce])return!1;return!0}updateRendererData(Z){const ne=new Set(this._renderers.keys()),ce=new Set(Z.map(de=>de.id));for(const de of Z){const he=this._renderers.get(de.id);he&&this.rendererEqual(he.data,de)||this.addRenderer(de)}for(const de of ne)ce.has(de)||this._renderers.delete(de)}addRenderer(Z){this._renderers.set(Z.id,new X(Z))}clearAll(){Q.cancelAll();for(const Z of this._renderers.values())Z.disposeOutputItem()}clearOutput(Z,ne){Q.cancelOutput(ne),this._renderers.get(Z)?.disposeOutputItem(ne)}async render(Z,ne,ce,de){let he;if(typeof ne=="string")he=Array.from(this._renderers.values()).find(pe=>pe.data.id===ne);else{const pe=Array.from(this._renderers.values()).filter(me=>me.data.mimeTypes.includes(Z.mime)&&!me.data.entrypoint.extends);pe.length&&(pe.sort((me,Se)=>+me.data.isBuiltin-+Se.data.isBuiltin),he=pe[0])}if(he)await he.renderOutputItem(Z,ce,de);else{const pe=document.createElement("div"),me=document.createElement("div");me.className="no-renderer-error";const Se=(document.documentElement.style.getPropertyValue("--notebook-cell-renderer-not-found-error")||"").replace("$0",Z.mime);me.innerText=Se;const Ie=document.createElement("div");Ie.innerText=Z.text(),pe.appendChild(me),pe.appendChild(Ie),ce.innerText="",ce.appendChild(pe)}}},K=new class{constructor(){this._markupCells=new Map,this._outputCells=new Map}clearAll(){for(const ne of this._markupCells.values())ne.dispose();this._markupCells.clear();for(const ne of this._outputCells.values())ne.dispose();this._outputCells.clear()}rerender(){this.rerenderMarkupCells(),this.renderOutputCells()}async createMarkupCell(ne,ce,de){const he=this._markupCells.get(ne.cellId);if(he)return console.error(`Trying to create markup that already exists: ${ne.cellId}`),he;const pe=new ee(ne.cellId,ne.mime,ne.content,ce,ne.metadata);return pe.element.style.visibility=de?"":"hidden",this._markupCells.set(ne.cellId,pe),await pe.ready,pe}async ensureMarkupCell(ne){let ce=this._markupCells.get(ne.cellId);ce?(ce.element.style.visibility=ne.visible?"":"hidden",await ce.updateContentAndRender(ne.content,ne.metadata)):ce=await this.createMarkupCell(ne,ne.offset,ne.visible)}deleteMarkupCell(ne){const ce=this.getExpectedMarkupCell(ne);ce&&(ce.remove(),ce.dispose(),this._markupCells.delete(ne))}async updateMarkupContent(ne,ce,de){await this.getExpectedMarkupCell(ne)?.updateContentAndRender(ce,de)}showMarkupCell(ne,ce,de,he){this.getExpectedMarkupCell(ne)?.show(ce,de,he)}hideMarkupCell(ne){this.getExpectedMarkupCell(ne)?.hide()}unhideMarkupCell(ne){this.getExpectedMarkupCell(ne)?.unhide()}rerenderMarkupCells(){for(const ne of this._markupCells.values())ne.rerender()}getExpectedMarkupCell(ne){const ce=this._markupCells.get(ne);if(!ce){console.log(`Could not find markup cell '${ne}'`);return}return ce}updateSelectedCells(ne){const ce=new Set(ne);for(const de of this._markupCells.values())de.setSelected(ce.has(de.id))}toggleDragDropEnabled(ne){for(const ce of this._markupCells.values())ce.toggleDragDropEnabled(ne)}updateMarkupScrolls(ne){for(const{id:ce,top:de}of ne){const he=this._markupCells.get(ce);he&&(he.element.style.top=`${de}px`)}}renderOutputCells(){for(const ne of this._outputCells.values())ne.rerender()}async renderOutputCell(ne,ce){const de=await Promise.all(ne.requiredPreloads.map(pe=>G.waitFor(pe.uri).then(()=>{},me=>me)));return ce.aborted?void 0:this.ensureOutputCell(ne.cellId,ne.cellTop,!1).renderOutputElement(ne,de,ce)}ensureOutputCell(ne,ce,de){let he=this._outputCells.get(ne);const pe=!!he;return he||(he=new ie(ne),this._outputCells.set(ne,he)),pe&&de||(he.element.style.top=ce+"px"),he}clearOutput(ne,ce,de){this._outputCells.get(ne)?.clearOutput(ce,de)}showOutput(ne,ce,de){this._outputCells.get(ne)?.show(ce,de)}updateAndRerender(ne,ce,de){this._outputCells.get(ne)?.updateContentAndRerender(ce,de)}hideOutput(ne){this._outputCells.get(ne)?.hide()}updateOutputHeight(ne,ce,de){this._outputCells.get(ne)?.updateOutputHeight(ce,de)}updateOutputsScroll(ne){for(const ce of ne)this._outputCells.get(ce.cellId)?.updateScroll(ce)}};class Y{static highlightCodeBlock(ne,ce){const de=Y.pendingCodeBlocksToHighlight.get(ne);if(!de)return;const he=z?.createHTML(ce)??ce;de.innerHTML=he,r&&de.insertAdjacentElement("beforebegin",r.cloneNode(!0))}static requestHighlightCodeBlock(ne){const ce=[];let de=0;for(const he of ne.querySelectorAll(".vscode-code-block")){const pe=he.getAttribute("data-vscode-code-block-lang");if(he.textContent&&pe){const me=`${Date.now()}-${de++}`;ce.push({value:he.textContent,lang:pe,id:me}),Y.pendingCodeBlocksToHighlight.set(me,he)}}return ce}}Y.pendingCodeBlocksToHighlight=new Map;class ee{constructor(ne,ce,de,he,pe){this._isDisposed=!1;const me=this;this.id=ne,this._content={value:de,version:0,metadata:pe};let Se,Ie;this.ready=new Promise((ue,Ce)=>{Se=ue,Ie=Ce});let ve;this.outputItem=Object.freeze({id:ne,mime:ce,get metadata(){return me._content.metadata},text:()=>this._content.value,json:()=>{},data:()=>{if(ve?.version===this._content.version)return ve.value;const ue=A.encode(this._content.value);return ve={version:this._content.version,value:ue},ue},blob(){return new Blob([this.data()],{type:this.mime})}});const be=document.getElementById("container"),ge=document.createElement("div");ge.className="markup",ge.style.position="absolute",ge.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=he+"px",this.toggleDragDropEnabled(E.dragAndDropEnabled),ge.appendChild(this.element),be.appendChild(ge),this.addEventListeners(),this.updateContentAndRender(this._content.value,this._content.metadata).then(()=>{this._isDisposed||h.observe(this.element,this.id,!1,this.id),Se()},()=>Ie())}dispose(){this._isDisposed=!0,this.renderTaskAbort?.abort(),this.renderTaskAbort=void 0}addEventListeners(){this.element.addEventListener("dblclick",()=>{oe("toggleMarkupPreview",{cellId:this.id})}),this.element.addEventListener("click",ne=>{oe("clickMarkupCell",{cellId:this.id,altKey:ne.altKey,ctrlKey:ne.ctrlKey,metaKey:ne.metaKey,shiftKey:ne.shiftKey})}),this.element.addEventListener("contextmenu",ne=>{oe("contextMenuMarkupCell",{cellId:this.id,clientX:ne.clientX,clientY:ne.clientY})}),this.element.addEventListener("mouseenter",()=>{oe("mouseEnterMarkupCell",{cellId:this.id})}),this.element.addEventListener("mouseleave",()=>{oe("mouseLeaveMarkupCell",{cellId:this.id})}),this.element.addEventListener("dragstart",ne=>{te.startDrag(ne,this.id)}),this.element.addEventListener("drag",ne=>{te.updateDrag(ne,this.id)}),this.element.addEventListener("dragend",ne=>{te.endDrag(ne,this.id)})}async updateContentAndRender(ne,ce){this._content={value:ne,version:this._content.version+1,metadata:ce},this.renderTaskAbort?.abort();const de=new AbortController;this.renderTaskAbort=de;try{await j.render(this.outputItem,void 0,this.element,this.renderTaskAbort.signal)}finally{this.renderTaskAbort===de&&(this.renderTaskAbort=void 0)}const he=this.element.shadowRoot??this.element,pe=[];for(const Se of he.children)switch(Se.tagName){case"LINK":case"SCRIPT":case"STYLE":break;default:pe.push(Se.outerHTML);break}const me=Y.requestHighlightCodeBlock(he);oe("renderedMarkup",{cellId:this.id,html:pe.join(""),codeBlocks:me}),g.updateHeight(this.id,this.element.offsetHeight,{isOutput:!1})}show(ne,ce,de){this.element.style.visibility="",this.element.style.top=`${ne}px`,typeof ce=="string"||de?this.updateContentAndRender(ce??this._content.value,de??this._content.metadata):this.updateMarkupDimensions()}hide(){this.element.style.visibility="hidden"}unhide(){this.element.style.visibility="",this.updateMarkupDimensions()}rerender(){this.updateContentAndRender(this._content.value,this._content.metadata)}remove(){this.element.remove()}async updateMarkupDimensions(){g.updateHeight(this.id,this.element.offsetHeight,{isOutput:!1})}setSelected(ne){this.element.classList.toggle("selected",ne)}toggleDragDropEnabled(ne){ne?(this.element.classList.add("draggable"),this.element.setAttribute("draggable","true")):(this.element.classList.remove("draggable"),this.element.removeAttribute("draggable"))}}class ie{constructor(ne){this.outputElements=new Map;const ce=document.getElementById("container"),de=D(ne);ce.appendChild(de),this.element=document.createElement("div"),this.element.style.position="absolute",this.element.id=ne,this.element.classList.add("cell_container"),ce.appendChild(this.element),this.element=this.element;const he=D(ne,!0);ce.appendChild(he)}dispose(){for(const ne of this.outputElements.values())ne.dispose();this.outputElements.clear()}createOutputElement(ne){let ce=this.outputElements.get(ne.outputId);return ce||(ce=new re(ne.outputId),this.element.appendChild(ce.element),this.outputElements.set(ne.outputId,ce)),ce.createOutputElement(ne.outputId,ne.outputOffset,ne.left,ne.cellId)}async renderOutputElement(ne,ce,de){const he=this.createOutputElement(ne);await he.render(ne.content,ne.rendererId,ce,de),he.element.style.visibility=ne.initiallyHidden?"hidden":""}clearOutput(ne,ce){const de=this.outputElements.get(ne);de?.clear(ce),de?.dispose(),this.outputElements.delete(ne)}show(ne,ce){const de=this.outputElements.get(ne);!de||(this.element.style.visibility="",this.element.style.top=`${ce}px`,g.updateHeight(ne,de.element.offsetHeight,{isOutput:!0}))}hide(){this.element.style.visibility="hidden"}updateContentAndRerender(ne,ce){this.outputElements.get(ne)?.updateContentAndRender(ce)}rerender(){for(const ne of this.outputElements.values())ne.rerender()}updateOutputHeight(ne,ce){this.outputElements.get(ne)?.updateHeight(ce)}updateScroll(ne){this.element.style.top=`${ne.cellTop}px`,this.outputElements.get(ne.outputId)?.updateScroll(ne.outputOffset),ne.forceDisplay&&(this.element.style.visibility="")}}class re{constructor(ne){this.outputId=ne,this.element=document.createElement("div"),this.element.classList.add("output_container"),this.element.style.position="absolute",this.element.style.overflow="hidden"}dispose(){this._outputNode?.dispose()}clear(ne){ne&&j.clearOutput(ne,this.outputId),this.element.remove()}updateHeight(ne){this.element.style.maxHeight=`${ne}px`,this.element.style.height=`${ne}px`}updateScroll(ne){this.element.style.top=`${ne}px`}createOutputElement(ne,ce,de,he){return this.element.innerText="",this.element.style.maxHeight="0px",this.element.style.top=`${ce}px`,this._outputNode?.dispose(),this._outputNode=new se(ne,de,he),this.element.appendChild(this._outputNode.element),this._outputNode}rerender(){this._outputNode?.rerender()}updateContentAndRender(ne){this._outputNode?.updateAndRerender(ne)}}C.postMessage({__vscode_notebook_message:!0,type:"initialized"});for(const Z of R.staticPreloadsData)G.load(Z.entrypoint,Z.entrypoint,!0);function oe(Z,ne){C.postMessage({__vscode_notebook_message:!0,type:Z,...ne})}class se{constructor(ne,ce,de){this.outputId=ne,this.cellId=de,this.hasResizeObserver=!1,this.element=document.createElement("div"),this.element.id=ne,this.element.classList.add("output"),this.element.style.position="absolute",this.element.style.top="0px",this.element.style.left=ce+"px",this.element.style.padding=`${R.style.outputNodePadding}px ${R.style.outputNodePadding}px ${R.style.outputNodePadding}px ${R.style.outputNodeLeftPadding}`,this.element.addEventListener("mouseenter",()=>{oe("mouseenter",{id:ne})}),this.element.addEventListener("mouseleave",()=>{oe("mouseleave",{id:ne})})}dispose(){this.renderTaskAbort?.abort(),this.renderTaskAbort=void 0}async render(ne,ce,de,he){if(this.renderTaskAbort?.abort(),this.renderTaskAbort=void 0,this._content={content:ne,preferredRendererId:ce,preloadErrors:de},ne.type===0){const ve=z?.createHTML(ne.htmlContent)??ne.htmlContent;this.element.innerHTML=ve,l(this.element)}else if(de.some(ve=>ve instanceof Error)){const ve=de.filter(be=>be instanceof Error);M("Error loading preloads",this.element,ve)}else{const ve=P(this.outputId,ne.output.mime,ne.metadata,ne.output.valueBytes,ne.allOutputs),be=new AbortController;this.renderTaskAbort=be,he?.addEventListener("abort",()=>be.abort());try{await j.render(ve,ce,this.element,be.signal)}finally{this.renderTaskAbort===be&&(this.renderTaskAbort=void 0)}}this.hasResizeObserver||(this.hasResizeObserver=!0,h.observe(this.element,this.outputId,!0,this.cellId));const pe=this.element.offsetHeight,me=document.defaultView.getComputedStyle(this.element);pe!==0&&me.padding==="0px"?(g.updateHeight(this.outputId,pe+R.style.outputNodePadding*2,{isOutput:!0,init:!0}),this.element.style.padding=`${R.style.outputNodePadding}px ${R.style.outputNodePadding}px ${R.style.outputNodePadding}px ${R.style.outputNodeLeftPadding}`):g.updateHeight(this.outputId,this.element.offsetHeight,{isOutput:!0,init:!0});const Se=this.element.shadowRoot??this.element,Ie=Y.requestHighlightCodeBlock(Se);Ie.length>0&&oe("renderedCellOutput",{codeBlocks:Ie})}rerender(){this._content&&this.render(this._content.content,this._content.preferredRendererId,this._content.preloadErrors)}updateAndRerender(ne){this._content&&(this._content={content:ne,preferredRendererId:this._content.preferredRendererId,preloadErrors:this._content.preloadErrors},this.rerender())}}const te=new class{constructor(){document.addEventListener("dragover",ne=>{ne.preventDefault()}),document.addEventListener("drop",ne=>{ne.preventDefault();const ce=this.currentDrag;!ce||(this.currentDrag=void 0,oe("cell-drop",{cellId:ce.cellId,ctrlKey:ne.ctrlKey,altKey:ne.altKey,dragOffsetY:ne.clientY}))})}startDrag(ne,ce){if(!ne.dataTransfer||!E.dragAndDropEnabled)return;this.currentDrag={cellId:ce,clientY:ne.clientY};const de=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=`${de}`,this.dragOverlay.style.width="100%",this.dragOverlay.style.height="100%",this.dragOverlay.style.background="transparent",document.body.appendChild(this.dragOverlay)),ne.target.style.zIndex=`${de+1}`,ne.target.classList.add("dragging"),oe("cell-drag-start",{cellId:ce,dragOffsetY:ne.clientY});const he=()=>{this.currentDrag?.cellId===ce&&(oe("cell-drag",{cellId:ce,dragOffsetY:this.currentDrag.clientY}),requestAnimationFrame(he))};requestAnimationFrame(he)}updateDrag(ne,ce){ce!==this.currentDrag?.cellId?this.currentDrag=void 0:this.currentDrag={cellId:ce,clientY:ne.clientY}}endDrag(ne,ce){this.currentDrag=void 0,ne.target.classList.remove("dragging"),oe("cell-drag-end",{cellId:ce}),this.dragOverlay&&(document.body.removeChild(this.dragOverlay),this.dragOverlay=void 0),ne.target.style.zIndex=""}}}function p(R,A,k,E,I,b,S){const C={style:R,options:A,rendererData:k,staticPreloadsData:E,isWorkspaceTrusted:I,lineLimit:b,nonce:S};return` const __import = (x) => import(x); (${t})( JSON.parse(decodeURIComponent("${encodeURIComponent(JSON.stringify(C))}")) ) //# sourceURL=notebookWebviewPreloads.js `}e.preloadsScriptStr=p}),define(ae[2347],le([1,0]),function(J,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"]]),p={"theme-input-border-width":"1px","theme-button-primary-hover-shadow":"none","theme-button-secondary-hover-shadow":"none","theme-input-border-color":"transparent"},R=A=>{const k={...A,...p};for(const[E,I]of t)k[E]=A[I];return k};e.transformWebviewThemeVars=R}),define(ae[2348],le([1,0,6,2,52]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCellEditorOptions=void 0;class A extends p.Disposable{get value(){return this._value}constructor(E,I,b,S){super(),this.notebookEditor=E,this.notebookOptions=I,this.configurationService=b,this.language=S,this._localDisposableStore=this._register(new p.DisposableStore),this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(b.onDidChangeConfiguration(C=>{(C.affectsConfiguration("editor")||C.affectsConfiguration("notebook"))&&this._recomputeOptions()})),this._register(I.onDidChangeOptions(C=>{(C.cellStatusBarVisibility||C.editorTopPadding||C.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()}_recomputeOptions(){this._value=this._computeEditorOptions(),this._onDidChange.fire()}_computeEditorOptions(){const E=(0,R.deepClone)(this.configurationService.getValue("editor",{overrideIdentifier:this.language})),b=this.notebookOptions.getLayoutConfiguration().editorOptionsCustomizations??{},S={};for(const r in b)r.indexOf("editor.")===0&&(S[r.substring(7)]=b[r]);return Object.freeze({...E,...A.fixedEditorOptions,...S,padding:{top:12,bottom:12},readOnly:this.notebookEditor.isReadOnly})}}e.BaseCellEditorOptions=A,A.fixedEditorOptions={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},renderLineHighlightOnlyWhenFocus:!0,overviewRulerLanes:0,lineNumbers:"off",lineDecorationsWidth:0,folding:!0,fixedOverflowWidgets:!0,minimap:{enabled:!1},renderValidationDecorations:"on",lineNumbersMinChars:3}}),define(ae[2349],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellSelectionCollection=void 0;function R(k,E){if(k.length!==E.length)return!1;for(let I=0;I<k.length;I++)if(k[I].start!==E[I].start||k[I].end!==E[I].end)return!1;return!0}class A extends p.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 focus(){return this._primary??{start:0,end:0}}setState(E,I,b,S){const C=E!==this._primary||!R(this._selections,I);this._primary=E,this._selections=I,(C||b)&&this._onDidChangeSelection.fire(S)}setSelections(E,I,b){this.setState(this._primary,E,I,b)}}e.NotebookCellSelectionCollection=A}),define(ae[2350],le([1,0,6,2,529]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEventDispatcher=void 0;class A extends p.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(E){for(let I=0,b=E.length;I<b;I++){const S=E[I];switch(S.type){case R.NotebookViewEventType.LayoutChanged:this._onDidChangeLayout.fire(S);break;case R.NotebookViewEventType.MetadataChanged:this._onDidChangeMetadata.fire(S);break;case R.NotebookViewEventType.CellStateChanged:this._onDidChangeCellState.fire(S);break}}}}e.NotebookEventDispatcher=A}),define(ae[2351],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class t{constructor(R,A,k){this.notebookOptions=R,this.eventDispatcher=A,this.getBaseCellEditorOptions=k}}e.ViewContext=t}),define(ae[2352],le([1,0,86,121,12]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookOverviewRuler=void 0;let A=class extends R.Themable{constructor(E,I,b){super(b),this.notebookEditor=E,this._lanes=3,this._domNode=(0,p.createFastDomNode)(document.createElement("canvas")),this._domNode.setPosition("relative"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),I.appendChild(this._domNode.domNode),this._register(E.onDidChangeDecorations(()=>{this.layout()})),this._register(t.PixelRatio.onDidChange(()=>{this.layout()}))}layout(){const I=this.notebookEditor.getLayoutInfo(),b=I.scrollHeight,S=I.height,C=t.PixelRatio.value;this._domNode.setWidth(10),this._domNode.setHeight(S),this._domNode.domNode.width=10*C,this._domNode.domNode.height=S*C;const r=this._domNode.domNode.getContext("2d");r.clearRect(0,0,10*C,S*C),this._render(r,10*C,S*C,b*C,C)}_render(E,I,b,S,C){const r=this.notebookEditor._getViewModel(),u=this.notebookEditor.getLayoutInfo().fontInfo,i=I/this._lanes;let f=0;if(r)for(let c=0;c<r.viewCells.length;c++){const l=r.viewCells[c],s=l.textBuffer,d=l.getCellDecorations(),n=l.layoutInfo.totalHeight/S*C*b;d.filter(a=>a.overviewRuler).forEach(a=>{const o=a.overviewRuler,g=this.getColor(o.color)?.toString()||"#000000",h=Math.min(u.lineHeight,l.layoutInfo.editorHeight/S/s.getLineCount()*C*b),v=o.modelRanges.map(m=>m.startLineNumber).reduce((m,w)=>((m.length===0||m[m.length-1]!==w)&&m.push(w),m),[]);for(let m=0;m<v.length;m++){E.fillStyle=g;const D=(v[m]-1)*h;E.fillRect(i,f+D,i,h)}if(o.includeOutput){E.fillStyle=g;const m=l.layoutInfo.editorHeight/S*C*b,w=u.lineHeight/S*C*b;E.fillRect(i,f+m,i,w)}}),f+=n}}};A=we([F(2,R.IThemeService)],A),e.NotebookOverviewRuler=A}),define(ae[2353],le([1,0,10,2,245,15,37,5,446]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListTopCellToolbar=void 0;let b=class extends p.Disposable{constructor(C,r,u,i,f,c){super(),this.notebookEditor=C,this.instantiationService=i,this.contextMenuService=f,this.menuService=c,this._modelDisposables=this._register(new p.DisposableStore),this.topCellToolbar=t.append(u,t.$(".cell-list-top-cell-toolbar-container")),this.toolbar=this._register(i.createInstance(R.MenuWorkbenchToolBar,this.topCellToolbar,this.notebookEditor.creationOptions.menuIds.cellTopInsertToolbar,{actionViewItemProvider:l=>{if(l instanceof A.MenuItemAction)return this.instantiationService.createInstance(I.CodiconActionViewItem,l,void 0)},menuOptions:{shouldForwardArgs:!0},toolbarOptions:{primaryGroup:l=>/^inline/.test(l)},hiddenItemStrategy:0})),this.toolbar.context={notebookEditor:C},this._register(this.notebookEditor.onDidChangeModel(()=>{this._modelDisposables.clear(),this.notebookEditor.hasModel()&&(this._modelDisposables.add(this.notebookEditor.onDidChangeViewCells(()=>{this.updateClass()})),this.updateClass())})),this.updateClass()}updateClass(){this.notebookEditor.hasModel()&&this.notebookEditor.getLength()===0?this.topCellToolbar.classList.add("emptyNotebook"):this.topCellToolbar.classList.remove("emptyNotebook")}};b=we([F(3,E.IInstantiationService),F(4,k.IContextMenuService),F(5,A.IMenuService)],b),e.ListTopCellToolbar=b}),define(ae[2354],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellMetadataEdit=e.SpliceCellsEdit=e.MoveCellEdit=void 0;class t{constructor(k,E,I,b,S,C,r){this.resource=k,this.fromIndex=E,this.length=I,this.toIndex=b,this.editingDelegate=S,this.beforedSelections=C,this.endSelections=r,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 p{constructor(k,E,I,b,S){this.resource=k,this.diffs=E,this.editingDelegate=I,this.beforeHandles=b,this.endHandles=S,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=p;class R{constructor(k,E,I,b,S){this.resource=k,this.index=E,this.oldMetadata=I,this.newMetadata=b,this.editingDelegate=S,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=R}),define(ae[870],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellOutputTextModel=void 0;class R extends p.Disposable{get outputs(){return this._rawOutput.outputs||[]}get metadata(){return this._rawOutput.metadata}get outputId(){return this._rawOutput.outputId}constructor(k){super(),this._rawOutput=k,this._onDidChangeData=this._register(new t.Emitter),this.onDidChangeData=this._onDidChangeData.event}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=R}),define(ae[385],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookCellStatusBarService=void 0,e.INotebookCellStatusBarService=(0,t.createDecorator)("notebookCellStatusBarService")}),define(ae[64],le([1,0,56,144,88,160,22,53,14,7]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressOutputItemStreams=e.isTextStreamMime=e.NotebookWorkingCopyTypeIdentifier=e.CellStatusbarAlignment=e.NotebookSetting=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.INTERACTIVE_WINDOW_EDITOR_ID=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",e.INTERACTIVE_WINDOW_EDITOR_ID="workbench.editor.interactive";var S;(function(z){z[z.Markup=1]="Markup",z[z.Code=2]="Code"})(S=e.CellKind||(e.CellKind={})),e.NOTEBOOK_DISPLAY_ORDER=["application/json","application/javascript","text/html","image/svg+xml",A.Mimes.latex,A.Mimes.markdown,"image/png","image/jpeg",A.Mimes.text],e.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER=[A.Mimes.latex,A.Mimes.markdown,"application/json",A.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 C;(function(z){z[z.Running=1]="Running",z[z.Idle=2]="Idle"})(C=e.NotebookRunState||(e.NotebookRunState={}));var r;(function(z){z[z.Unconfirmed=1]="Unconfirmed",z[z.Pending=2]="Pending",z[z.Executing=3]="Executing"})(r=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var u;(function(z){z[z.WithHardKernelDependency=0]="WithHardKernelDependency",z[z.WithOptionalKernelDependency=1]="WithOptionalKernelDependency",z[z.Pure=2]="Pure",z[z.Never=3]="Never"})(u=e.NotebookRendererMatch||(e.NotebookRendererMatch={}));var i;(function(z){z.Always="always",z.Never="never",z.Optional="optional"})(i=e.RendererMessagingSpec||(e.RendererMessagingSpec={}));var f;(function(z){z[z.ModelChange=1]="ModelChange",z[z.Move=2]="Move",z[z.ChangeCellLanguage=5]="ChangeCellLanguage",z[z.Initialize=6]="Initialize",z[z.ChangeCellMetadata=7]="ChangeCellMetadata",z[z.Output=8]="Output",z[z.OutputItem=9]="OutputItem",z[z.ChangeCellContent=10]="ChangeCellContent",z[z.ChangeDocumentMetadata=11]="ChangeDocumentMetadata",z[z.ChangeCellInternalMetadata=12]="ChangeCellInternalMetadata",z[z.ChangeCellMime=13]="ChangeCellMime",z[z.Unknown=100]="Unknown"})(f=e.NotebookCellsChangeType||(e.NotebookCellsChangeType={}));var c;(function(z){z[z.Handle=0]="Handle",z[z.Index=1]="Index"})(c=e.SelectionStateType||(e.SelectionStateType={}));var l;(function(z){z[z.Replace=1]="Replace",z[z.Output=2]="Output",z[z.Metadata=3]="Metadata",z[z.CellLanguage=4]="CellLanguage",z[z.DocumentMetadata=5]="DocumentMetadata",z[z.Move=6]="Move",z[z.OutputItems=7]="OutputItems",z[z.PartialMetadata=8]="PartialMetadata",z[z.PartialInternalMetadata=9]="PartialInternalMetadata"})(l=e.CellEditType||(e.CellEditType={}));var s;(function(z){z.scheme=k.Schemas.vscodeNotebookCell;const x=["W","X","Y","Z","a","b","c","d","e","f"],H=new RegExp(`^[${x.join("")}]+`),W=7;function U(j,K){const Y=K.toString(W),ie=`${Y.length<x.length?x[Y.length-1]:"z"}${Y}s${(0,t.encodeBase64)(t.VSBuffer.fromString(j.scheme),!0,!0)}`;return j.with({scheme:z.scheme,fragment:ie})}z.generate=U;function $(j){if(j.scheme!==z.scheme)return;const K=j.fragment.indexOf("s");if(K<0)return;const Y=parseInt(j.fragment.substring(0,K).replace(H,""),W),ee=(0,t.decodeBase64)(j.fragment.substring(K+1)).toString();if(!isNaN(Y))return{handle:Y,notebook:j.with({scheme:ee,fragment:null})}}z.parse=$;function q(j,K){return j.with({scheme:k.Schemas.vscodeNotebookCellOutput,fragment:`op${K??""},${j.scheme!==k.Schemas.file?j.scheme:""}`})}z.generateCellOutputUri=q;function X(j){if(j.scheme!==k.Schemas.vscodeNotebookCellOutput)return;const K=/^op([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})?\,(.*)$/i.exec(j.fragment);if(!K)return;const Y=K[1]&&K[1]!==""?K[1]:void 0,ee=K[2];return{outputId:Y,notebook:j.with({scheme:ee||k.Schemas.file,fragment:null})}}z.parseCellOutputUri=X;function G(j,K,Y){return z.generate(j,K).with({scheme:Y})}z.generateCellPropertyUri=G;function Q(j,K){if(j.scheme===K)return z.parse(j.with({scheme:z.scheme}))}z.parseCellPropertyUri=Q})(s=e.CellUri||(e.CellUri={}));const d=z=>I.isWindows?z.replace(/\//g,"\\"):z;class n{constructor(x=[],H=e.NOTEBOOK_DISPLAY_ORDER){this.defaultOrder=H,this.order=[...new Set(x)].map(W=>({pattern:W,matches:p.parse(d(W))}))}sort(x){const H=new Map(R.Iterable.map(x,U=>[U,d(U)]));let W=[];for(const{matches:U}of this.order)for(const[$,q]of H)if(U(q)){W.push($),H.delete($);break}return H.size&&(W=W.concat([...H.keys()].sort((U,$)=>this.defaultOrder.indexOf(U)-this.defaultOrder.indexOf($)))),W}prioritize(x,H){const W=this.findIndex(x);if(W===-1){this.order.unshift({pattern:x,matches:p.parse(d(x))});return}const U=new Set(H.map(q=>this.findIndex(q,W)));U.delete(-1);const $=Array.from(U).sort();this.order.splice(W+1,0,...$.map(q=>this.order[q]));for(let q=$.length-1;q>=0;q--)this.order.splice($[q],1)}toArray(){return this.order.map(x=>x.pattern)}findIndex(x,H=this.order.length){const W=d(x);for(let U=0;U<H;U++)if(this.order[U].matches(W))return U;return-1}}e.MimeTypeDisplayOrder=n;function a(z,x,H,W=(U,$)=>U===$){const U=[];function $(G,Q,j){if(Q===0&&j.length===0)return;const K=U[U.length-1];K&&K.start+K.deleteCount===G?(K.deleteCount+=Q,K.toInsert.push(...j)):U.push({start:G,deleteCount:Q,toInsert:j})}let q=0,X=0;for(;;){if(q===z.length){$(q,0,x.slice(X));break}if(X===x.length){$(q,z.length-q,[]);break}const G=z[q],Q=x[X];if(W(G,Q)){q+=1,X+=1;continue}H(Q)?($(q,1,[]),q+=1):($(q,0,[Q]),X+=1)}return U}e.diff=a,e.NOTEBOOK_EDITOR_CURSOR_BOUNDARY=new b.RawContextKey("notebookEditorCursorAtBoundary","none");var o;(function(z){z.default="default",z.option="option"})(o=e.NotebookEditorPriority||(e.NotebookEditorPriority={}));function g(z){const x=z;return!!((typeof x.include=="string"||p.isRelativePattern(x.include))&&(typeof x.exclude=="string"||p.isRelativePattern(x.exclude)))}e.isDocumentExcludePattern=g;function h(z,x,H){if(Array.isArray(z.viewType)&&z.viewType.indexOf(x)>=0||z.viewType===x)return!0;if(z.filenamePattern){const W=g(z.filenamePattern)?z.filenamePattern.include:z.filenamePattern,U=g(z.filenamePattern)?z.filenamePattern.exclude:void 0;if(p.match(W,(0,E.basename)(H.fsPath).toLowerCase()))return!(U&&p.match(U,(0,E.basename)(H.fsPath).toLowerCase()))}return!1}e.notebookDocumentFilterMatch=h,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",outputLineHeight:"notebook.outputLineHeight",outputFontSize:"notebook.outputFontSize",outputFontFamily:"notebook.outputFontFamily"};var v;(function(z){z[z.Left=1]="Left",z[z.Right=2]="Right"})(v=e.CellStatusbarAlignment||(e.CellStatusbarAlignment={}));class m{static create(x){return`${m._prefix}${x}`}static parse(x){if(x.startsWith(m._prefix))return x.substring(m._prefix.length)}}e.NotebookWorkingCopyTypeIdentifier=m,m._prefix="notebook/";function w(z){return["application/vnd.code.notebook.stdout","application/vnd.code.notebook.stderr"].includes(z)}e.isTextStreamMime=w;const D=new TextDecoder;function y(z){const x=[];let H=!1;for(const W of z)(x.length===0||H)&&(x.push(W),H=!0);return M(x),V(t.VSBuffer.concat(x.map(W=>t.VSBuffer.wrap(W))))}e.compressOutputItemStreams=y;const T=`${String.fromCharCode(27)}[A`,_=T.split("").map(z=>z.charCodeAt(0)),L=10;function M(z){z.forEach((x,H)=>{if(H===0||x.length<T.length)return;const W=z[H-1],U=x.subarray(0,T.length);if(U[0]===_[0]&&U[1]===_[1]&&U[2]===_[2]){const $=W.lastIndexOf(L);if($===-1)return;z[H-1]=W.subarray(0,$),z[H]=x.subarray(T.length)}})}function O(z){let x=z;do z=x,x=z.replace(/[^\n]\x08/gm,"");while(x.length<z.length);return z}function N(z){for(z=z.replace(/\r+\n/gm,` `);z.search(/\r[^$]/g)>-1;){const x=z.match(/^(.*)\r+/m)[1];let H=z.match(/\r+(.*)$/m)[1];H=H+x.slice(H.length,x.length),z=z.replace(/\r+.*$/m,"\r").replace(/^.*\r/m,H)}return z}const P="\b".charCodeAt(0),B="\r".charCodeAt(0);function V(z){return!z.buffer.includes(P)&&!z.buffer.includes(B)?z:t.VSBuffer.fromString(N(O(D.decode(z.buffer))))}}),define(ae[2355],le([1,0,10,121,175,64]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFocusIndicator=void 0;class k extends R.CellPart{constructor(I,b,S,C,r,u){super(),this.notebookEditor=I,this.titleToolbar=b,this.top=S,this.left=C,this.right=r,this.bottom=u,this.codeFocusIndicator=new p.FastDomNode(t.append(this.left.domNode,t.$(".codeOutput-focus-indicator-container",void 0,t.$(".codeOutput-focus-indicator.code-focus-indicator")))),this.outputFocusIndicator=new p.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 b=this.notebookEditor.notebookOptions.computeIndicatorPosition(I.layoutInfo.totalHeight,I.layoutInfo.foldHintHeight,this.notebookEditor.textModel?.viewType);this.bottom.domNode.style.transform=`translateY(${b.bottomIndicatorTop}px)`,this.left.setHeight(b.verticalIndicatorHeight),this.right.setHeight(b.verticalIndicatorHeight),this.codeFocusIndicator.setHeight(b.verticalIndicatorHeight-this.getIndicatorTopMargin()*2)}else{const b=I,S=this.notebookEditor.notebookOptions.getLayoutConfiguration(),C=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),r=b.layoutInfo.codeIndicatorHeight+b.layoutInfo.outputIndicatorHeight+b.layoutInfo.commentHeight;this.left.setHeight(r),this.right.setHeight(r),this.codeFocusIndicator.setHeight(b.layoutInfo.codeIndicatorHeight),this.outputFocusIndicator.setHeight(Math.max(b.layoutInfo.outputIndicatorHeight-b.viewContext.notebookOptions.getLayoutConfiguration().focusIndicatorGap,0)),this.bottom.domNode.style.transform=`translateY(${b.layoutInfo.totalHeight-C.bottomToolbarGap-S.cellBottomMargin}px)`}this.updateFocusIndicatorsForTitleMenu()}updateFocusIndicatorsForTitleMenu(){this.left.domNode.style.transform=`translateY(${this.getIndicatorTopMargin()}px)`,this.right.domNode.style.transform=`translateY(${this.getIndicatorTopMargin()}px)`}getIndicatorTopMargin(){const I=this.notebookEditor.notebookOptions.getLayoutConfiguration();return this.titleToolbar.hasActions?I.editorToolbarHeight+I.cellTopMargin:I.cellTopMargin}}e.CellFocusIndicator=k}),define(ae[871],le([1,0,6,2,64]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellOutputViewModel=void 0;let A=0;class k extends p.Disposable{get model(){return this._outputRawData}get pickedMimeType(){return this._pickedMimeType}set pickedMimeType(I){this._pickedMimeType=I}constructor(I,b,S){super(),this.cellViewModel=I,this._outputRawData=b,this._notebookService=S,this._onDidResetRendererEmitter=this._register(new t.Emitter),this.onDidResetRenderer=this._onDidResetRendererEmitter.event,this.outputHandle=A++}hasMultiMimeType(){if(this._outputRawData.outputs.length<2)return!1;const I=this._outputRawData.outputs[0].mime;return this._outputRawData.outputs.some(b=>b.mime!==I)}resolveMimeTypes(I,b){const S=this._notebookService.getOutputMimeTypeInfo(I,b,this.model);let C=-1;return this._pickedMimeType&&(C=S.findIndex(r=>r.rendererId===this._pickedMimeType.rendererId&&r.mimeType===this._pickedMimeType.mimeType&&r.isTrusted)),C===-1&&(C=S.findIndex(r=>r.rendererId!==R.RENDERER_NOT_AVAILABLE&&r.isTrusted)),[S,Math.max(C,0)]}resetRenderer(){this._pickedMimeType=void 0,this._onDidResetRendererEmitter.fire()}toRawJSON(){return{outputs:this._outputRawData.outputs}}}e.CellOutputViewModel=k}),define(ae[530],le([1,0,6,108,2,72,20,592,775,125,870,64]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cloneNotebookCellTextModel=e.NotebookCellTextModel=void 0;class r extends R.Disposable{get outputs(){return this._outputs}get metadata(){return this._metadata}set metadata(c){this._metadata=c,this._hash=null,this._onDidChangeMetadata.fire()}get internalMetadata(){return this._internalMetadata}set internalMetadata(c){const l=this._internalMetadata.lastRunSuccess!==c.lastRunSuccess;c={...c,runStartTimeAdjustment:i(this._internalMetadata,c)},this._internalMetadata=c,this._hash=null,this._onDidChangeInternalMetadata.fire({lastRunSuccessChanged:l})}get language(){return this._language}set language(c){if(this._textModel&&this._textModel.getLanguageId()===this._languageService.getLanguageIdByLanguageName(c)&&this._textModel.getLanguageId()===this._languageService.getLanguageIdByLanguageName(this.language))return;const l=this._languageService.getLanguageIdByLanguageName(c);if(l!==null){if(this._textModel){const s=this._languageService.createById(l);this._textModel.setMode(s.languageId)}this._language!==c&&(this._language=c,this._hash=null,this._onDidChangeLanguage.fire(c),this._onDidChangeContent.fire("language"))}}get mime(){return this._mime}set mime(c){this._mime!==c&&(this._mime=c,this._hash=null,this._onDidChangeContent.fire("mime"))}get textBuffer(){if(this._textBuffer)return this._textBuffer;const c=new I.PieceTreeTextBufferBuilder;c.acceptChunk(this._source);const l=c.finish(!0),{textBuffer:s,disposable:d}=l.create(1);return this._textBuffer=s,this._register(d),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(c){this._textModel!==c&&(this._textModelDisposables.clear(),this._textModel=c,this._textModel&&(this._languageService.isRegisteredLanguageId(this.language)===!1&&(this._textModel.getLanguageId()===b.PLAINTEXT_LANGUAGE_ID||this._textModel.getLanguageId()==="jupyter")||(this.language=this._textModel.getLanguageId()),this._textModelDisposables.add(this._textModel.onDidChangeLanguage(l=>{this.language=l.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)))}constructor(c,l,s,d,n,a,o,g,h,v,m,w){super(),this.uri=c,this.handle=l,this._source=s,this._language=d,this._mime=n,this.cellKind=a,this.collapseState=v,this.transientOptions=m,this._languageService=w,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._textBufferHash=null,this._hash=null,this._versionId=1,this._alternativeId=1,this._textModelDisposables=this._register(new R.DisposableStore),this._textModel=void 0,this._outputs=o.map(D=>new S.NotebookCellOutputTextModel(D)),this._metadata=g??{},this._internalMetadata=h??{}}resetTextBuffer(c){this._textBuffer=c}getValue(){const c=this.getFullModelRange();return this.textBuffer.getEOL()===` `?this.textBuffer.getValueInRange(c,1):this.textBuffer.getValueInRange(c,2)}getTextBufferHash(){if(this._textBufferHash!==null)return this._textBufferHash;const c=new p.StringSHA1,l=this.textBuffer.createSnapshot(!1);let s;for(;s=l.read();)c.update(s);return this._textBufferHash=c.digest(),this._textBufferHash}getHashValue(){return this._hash!==null?this._hash:(this._hash=(0,p.hash)([(0,p.hash)(this.language),this.getTextBufferHash(),this._getPersisentMetadata(),this.transientOptions.transientOutputs?[]:this._outputs.map(c=>({outputs:c.outputs.map(l=>({mime:l.mime,data:Array.from(l.data.buffer)})),metadata:c.metadata}))]),this._hash)}_getPersisentMetadata(){const c={},l=this.transientOptions.transientCellMetadata,s=new Set([...Object.keys(this.metadata)]);for(const d of s)l[d]||(c[d]=this.metadata[d]);return c}getTextLength(){return this.textBuffer.getLength()}getFullModelRange(){const c=this.textBuffer.getLineCount();return new k.Range(1,1,c,this.textBuffer.getLineLength(c)+1)}spliceNotebookCellOutputs(c){this.outputs.splice(c.start,c.deleteCount,...c.newOutputs),this._onDidChangeOutputs.fire(c)}changeOutputItems(c,l,s){const d=this.outputs.findIndex(a=>a.outputId===c);if(d<0)return!1;const n=this.outputs[d];if(l?n.appendData(s):n.replaceData(s),n.outputs.length>1&&n.outputs.every(a=>(0,C.isTextStreamMime)(a.mime))){const a=new Map,o=[];n.outputs.forEach(g=>{let h;a.has(g.mime)?h=a.get(g.mime):(h=[],a.set(g.mime,h),o.push(g.mime)),h.push(g.data.buffer)}),n.outputs.length=0,o.forEach(g=>{const h=(0,C.compressOutputItemStreams)(a.get(g));n.outputs.push({mime:g,data:h})})}return this._onDidChangeOutputItems.fire(),!0}_outputNotEqualFastCheck(c,l){if(c.length!==l.length)return!1;for(let s=0;s<this.outputs.length;s++){const d=c[s],n=l[s];if(d.outputs.length!==n.outputs.length)return!1;for(let a=0;a<d.outputs.length;a++)if(d.outputs[a].mime!==n.outputs[a].mime||d.outputs[a].data.byteLength!==n.outputs[a].data.byteLength)return!1}return!0}equal(c){return this.language!==c.language||this.getTextLength()!==c.getTextLength()||!this.transientOptions.transientOutputs&&!this._outputNotEqualFastCheck(this.outputs,c.outputs)?!1:this.getHashValue()===c.getHashValue()}fastEqual(c){return!(this.language!==c.language||this.mime!==c.mime||this.cellKind!==c.cellKind||this.internalMetadata?.executionOrder!==c.internalMetadata?.executionOrder||this.internalMetadata?.lastRunSuccess!==c.internalMetadata?.lastRunSuccess||this.internalMetadata?.runStartTime!==c.internalMetadata?.runStartTime||this.internalMetadata?.runStartTimeAdjustment!==c.internalMetadata?.runStartTimeAdjustment||this.internalMetadata?.runEndTime!==c.internalMetadata?.runEndTime||this._source!==c.source)}dispose(){(0,R.dispose)(this._outputs);const c=new E.PieceTreeTextBuffer([],"",` `,!1,!1,!0,!0);c.dispose(),this._textBuffer=c,super.dispose()}}e.NotebookCellTextModel=r;function u(f){return{source:f.getValue(),language:f.language,mime:f.mime,cellKind:f.cellKind,outputs:f.outputs.map(c=>({outputs:c.outputs,outputId:A.generateUuid()})),metadata:{...f.metadata}}}e.cloneNotebookCellTextModel=u;function i(f,c){if(f.runStartTime!==c.runStartTime&&typeof c.runStartTime=="number"){const l=Date.now()-c.runStartTime;return l<0?Math.abs(l):0}else return c.runStartTimeAdjustment}}),define(ae[2356],le([1,0,6,2,530,64,156,2354,414,108,870,54,22,18,42,94,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextModel=e.NotebookEventEmitter=e.NotebookOperationManager=void 0;class l{constructor(g,h,v,m,w,D,y){this.textModel=g,this.label=h,this.undoRedoGroup=v,this._pauseableEmitter=m,this._postUndoRedo=w,this.code="undoredo.notebooks.stackOperation",this._operations=[],this._beginSelectionState=void 0,this._resultSelectionState=void 0,this.type=1,this._beginSelectionState=D,this._beginAlternativeVersionId=y,this._resultAlternativeVersionId=y}get resources(){return[this.textModel.uri]}get isEmpty(){return this._operations.length===0}pushEndState(g,h){this._resultAlternativeVersionId=g,this._resultSelectionState=h}pushEditOperation(g,h,v){this._operations.length===0&&(this._beginSelectionState=this._beginSelectionState??h),this._operations.push(g),this._resultSelectionState=v}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 s{constructor(g,h,v,m){this._textModel=g,this._undoService=h,this._pauseableEmitter=v,this._postUndoRedo=m,this._pendingStackOperation=null}isUndoStackEmpty(){return this._pendingStackOperation===null||this._pendingStackOperation.isEmpty}pushStackElement(g,h,v,m){if(this._pendingStackOperation){this._pendingStackOperation.pushEndState(m,h),this._pendingStackOperation.isEmpty||this._undoService.pushElement(this._pendingStackOperation,this._pendingStackOperation.undoRedoGroup),this._pendingStackOperation=null;return}this._pendingStackOperation=new l(this._textModel,g,v,this._pauseableEmitter,this._postUndoRedo,h,m)}pushEditOperation(g,h,v){if(this._pendingStackOperation){this._pendingStackOperation.pushEditOperation(g,h,v);return}this._undoService.pushElement(g)}}e.NotebookOperationManager=s;class d extends t.PauseableEmitter{isDirtyEvent(){for(const g of this._eventQueue)for(let h=0;h<g.rawEvents.length;h++)if(!g.rawEvents[h].transient)return!0;return!1}}e.NotebookEventEmitter=d;let n=class ka extends p.Disposable{get length(){return this._cells.length}get cells(){return this._cells}get versionId(){return this._versionId}get alternativeVersionId(){return this._alternativeVersionId}constructor(g,h,v,m,w,D,y,T){super(),this.viewType=g,this.uri=h,this._undoService=D,this._modelService=y,this._languageService=T,this._isDisposed=!1,this._onWillDispose=this._register(new t.Emitter),this._onWillAddRemoveCells=this._register(new t.Emitter),this._onDidChangeContent=this._register(new t.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,cellContentMetadata:{}},this._versionId=0,this._notebookSpecificAlternativeId=0,this._alternativeVersionId="1",this.transientOptions=w,this.metadata=m,this._initialize(v);const _=L=>{if(L.uri.scheme===r.Schemas.vscodeNotebookCell&&L instanceof f.TextModel){const M=A.CellUri.parse(L.uri);if(M&&(0,u.isEqual)(M.notebook,this.uri)){const O=this._getCellIndexByHandle(M.handle);if(O>=0){const N=this.cells[O];N&&(N.textModel=L)}}}};this._register(y.onModelAdded(L=>_(L))),this._pauseableEmitter=new d({merge:L=>{const M=L[0],O=M.rawEvents;let N=M.versionId,P=M.endSelectionState,B=M.synchronous;for(let V=1;V<L.length;V++)O.push(...L[V].rawEvents),N=L[V].versionId,P=L[V].endSelectionState!==void 0?L[V].endSelectionState:P,B=L[V].synchronous!==void 0?L[V].synchronous:B;return{rawEvents:O,versionId:N,endSelectionState:P,synchronous:B}}}),this._register(this._pauseableEmitter.event(L=>{L.rawEvents.length&&this._onDidChangeContent.fire(L)})),this._operationManager=new s(this,this._undoService,this._pauseableEmitter,L=>{this._increaseVersionId(!0),this._overwriteAlternativeVersionId(L)})}setCellCollapseDefault(g){this._defaultCollapseConfig=g}_initialize(g,h){this._cells=[],this._versionId=0,this._notebookSpecificAlternativeId=0;const v=g.map(m=>{const w=this._cellhandlePool++,D=A.CellUri.generate(this.uri,w),y=this._getDefaultCollapseState(m);return new R.NotebookCellTextModel(D,w,m.source,m.language,m.mime,m.cellKind,m.outputs,m.metadata,m.internalMetadata,y,this.transientOptions,this._languageService)});for(let m=0;m<v.length;m++){const w=v[m].onDidChangeContent(D=>{this._bindCellContentHandler(v[m],D)});this._cellListeners.set(v[m].handle,w)}this._cells.splice(0,0,...v),this._alternativeVersionId=this._generateAlternativeId(),h&&this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.Unknown,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_bindCellContentHandler(g,h){switch(this._increaseVersionId(h==="content"),h){case"content":this._pauseableEmitter.fire({rawEvents:[{kind:A.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:A.NotebookCellsChangeType.ChangeCellLanguage,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:A.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,p.dispose)(this._cellListeners.values()),this._cellListeners.clear(),(0,p.dispose)(this._cells),this._cells=[],super.dispose())}pushStackElement(g,h,v){this._operationManager.pushStackElement(g,h,v,this.alternativeVersionId)}_getCellIndexByHandle(g){return this.cells.findIndex(h=>h.handle===g)}_getCellIndexWithOutputIdHandleFromEdits(g,h){const v=h.find(m=>"outputs"in m&&m.outputs.some(w=>w.outputId===g));if(v){if("index"in v)return v.index;if("handle"in v){const m=this._getCellIndexByHandle(v.handle);return this._assertIndex(m),m}}return-1}_getCellIndexWithOutputIdHandle(g){return this.cells.findIndex(h=>!!h.outputs.find(v=>v.outputId===g))}reset(g,h,v){this.transientOptions=v;const m=ka.computeEdits(this,g);this.applyEdits([...m,{editType:5,metadata:h}],!0,void 0,()=>{},void 0,!1)}static computeEdits(g,h){const v=[],m=this._commonPrefix(g.cells,g.cells.length,0,h,h.length,0);if(m>0)for(let D=0;D<m;D++)v.push({editType:3,index:D,metadata:h[D].metadata??{}},...this._computeOutputEdit(D,g.cells[D].outputs,h[D].outputs));if(g.cells.length===h.length&&m===g.cells.length)return v;const w=this._commonSuffix(g.cells,g.cells.length-m,m,h,h.length-m,m);if(w>0?v.push({editType:1,index:m,count:g.cells.length-m-w,cells:h.slice(m,h.length-w)}):m>0?v.push({editType:1,index:m,count:g.cells.length-m,cells:h.slice(m)}):v.push({editType:1,index:0,count:g.cells.length,cells:h}),w>0)for(let D=w;D>0;D--)v.push({editType:3,index:g.cells.length-D,metadata:h[h.length-D].metadata??{}},...this._computeOutputEdit(g.cells.length-D,g.cells[g.cells.length-D].outputs,h[h.length-D].outputs));return v}static _computeOutputEdit(g,h,v){return h.length!==v.length?[{editType:2,index:g,outputs:v,append:!1}]:h.length===0?[]:v.map((m,w)=>({editType:7,outputId:h[w].outputId,items:m.outputs,append:!1}))}static _commonPrefix(g,h,v,m,w,D){const y=Math.min(h,w);let T=0;for(let _=0;_<y&&g[v+_].fastEqual(m[D+_]);_++)T++;return T}static _commonSuffix(g,h,v,m,w,D){const y=Math.min(h,w);let T=0;for(let _=0;_<y&&g[v+h-_-1].fastEqual(m[D+w-_-1]);_++)T++;return T}applyEdits(g,h,v,m,w,D){this._pauseableEmitter.pause(),this.pushStackElement("edit",v,w);try{return this._doApplyEdits(g,h,D),!0}finally{const y=m();this._increaseVersionId(this._operationManager.isUndoStackEmpty()&&!this._pauseableEmitter.isDirtyEvent()),this.pushStackElement("edit",y,void 0),this._pauseableEmitter.fire({rawEvents:[],versionId:this.versionId,synchronous:h,endSelectionState:y}),this._pauseableEmitter.resume()}}_doApplyEdits(g,h,v){const m=g.map((y,T)=>{let _=-1;if("index"in y)_=y.index;else if("handle"in y)_=this._getCellIndexByHandle(y.handle),this._assertIndex(_);else if("outputId"in y){if(_=this._getCellIndexWithOutputIdHandle(y.outputId),this._indexIsInvalid(_)&&(_=this._getCellIndexWithOutputIdHandleFromEdits(y.outputId,g.slice(0,T))),this._indexIsInvalid(_))return null}else if(y.editType!==5)throw new Error("Invalid cell edit");return{edit:y,cellIndex:_,end:y.editType===5?void 0:y.editType===1?y.index+y.count:_,originalIndex:T}}).filter(c.isDefined),D=this._mergeCellEdits(m).sort((y,T)=>y.end===void 0||T.end===void 0?-1:T.end-y.end||T.originalIndex-y.originalIndex).reduce((y,T)=>{if(!y.length)y.push([T]);else{const _=y[y.length-1],L=_[0].cellIndex;T.cellIndex===L?_.push(T):y.push([T])}return y},[]).map(y=>{const T=[],_=[];return y.forEach(L=>{L.edit.editType===1?T.push(L):_.push(L)}),[..._.reverse(),...T]}).flat();for(const{edit:y,cellIndex:T}of D)switch(y.editType){case 1:this._replaceCells(y.index,y.count,y.cells,h,v);break;case 2:{this._assertIndex(T);const _=this._cells[T];y.append?this._spliceNotebookCellOutputs(_,{start:_.outputs.length,deleteCount:0,newOutputs:y.outputs.map(L=>new S.NotebookCellOutputTextModel(L))},!0,v):this._spliceNotebookCellOutputs2(_,y.outputs.map(L=>new S.NotebookCellOutputTextModel(L)),v);break}case 7:{this._assertIndex(T);const _=this._cells[T];y.append?this._appendNotebookCellOutputItems(_,y.outputId,y.items):this._replaceNotebookCellOutputItems(_,y.outputId,y.items)}break;case 3:this._assertIndex(y.index),this._changeCellMetadata(this._cells[y.index],y.metadata,v);break;case 8:this._assertIndex(T),this._changeCellMetadataPartial(this._cells[T],y.metadata,v);break;case 9:this._assertIndex(T),this._changeCellInternalMetadataPartial(this._cells[T],y.internalMetadata);break;case 4:this._assertIndex(y.index),this._changeCellLanguage(this._cells[y.index],y.language,v);break;case 5:this._updateNotebookMetadata(y.metadata,v);break;case 6:this._moveCellToIdx(y.index,y.length,y.newIdx,h,v,void 0,void 0);break}}_mergeCellEdits(g){const h=[];return g.forEach(v=>{if(h.length){const m=h[h.length-1];m.edit.editType===2&&m.edit.append&&v.edit.editType===2&&v.edit.append&&m.cellIndex===v.cellIndex?m.edit.outputs=[...m.edit.outputs,...v.edit.outputs]:m.edit.editType===2&&!m.edit.append&&m.edit.outputs.length===0&&v.edit.editType===2&&v.edit.append&&m.cellIndex===v.cellIndex?(m.edit.append=!1,m.edit.outputs=v.edit.outputs):h.push(v)}else h.push(v)}),h}_getDefaultCollapseState(g){const h=g.cellKind===A.CellKind.Code?this._defaultCollapseConfig?.codeCell:this._defaultCollapseConfig?.markupCell;return g.collapseState??h??void 0}_replaceCells(g,h,v,m,w){if(h===0&&v.length===0)return;const D=this._cells.slice(0),y=new Set;D.forEach(O=>{y.add(O.handle)});for(let O=g;O<Math.min(g+h,this._cells.length);O++){const N=this._cells[O];this._cellListeners.get(N.handle)?.dispose(),this._cellListeners.delete(N.handle)}const T=v.map(O=>{const N=this._cellhandlePool++,P=A.CellUri.generate(this.uri,N),B=this._getDefaultCollapseState(O),V=new R.NotebookCellTextModel(P,N,O.source,O.language,O.mime,O.cellKind,O.outputs||[],O.metadata,O.internalMetadata,B,this.transientOptions,this._languageService),z=this._modelService.getModel(P);z&&z instanceof f.TextModel&&(V.textModel=z,V.language=O.language,V.textModel.setValue(O.source),V.resetTextBuffer(V.textModel.getTextBuffer()));const x=V.onDidChangeContent(H=>{this._bindCellContentHandler(V,H)});return this._cellListeners.set(V.handle,x),V}),_=this._cells.slice(0);_.splice(g,h,...T);const L=(0,A.diff)(this._cells,_,O=>y.has(O.handle)).map(O=>[O.start,O.deleteCount,O.toInsert]);this._onWillAddRemoveCells.fire({rawEvent:{kind:A.NotebookCellsChangeType.ModelChange,changes:L}}),this._cells=_;const M=L.map(O=>{const N=D.slice(O[0],O[0]+O[1]);return[O[0],N,O[2]]});w&&this._operationManager.pushEditOperation(new E.SpliceCellsEdit(this.uri,M,{insertCell:(O,N,P)=>{this._insertNewCell(O,[N],!0,P)},deleteCell:(O,N)=>{this._removeCell(O,1,!0,N)},replaceCell:(O,N,P,B)=>{this._replaceNewCells(O,N,P,!0,B)}},void 0,void 0),void 0,void 0),this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ModelChange,changes:L,transient:!1}],versionId:this.versionId,synchronous:m,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,h){const v=this.metadata,m=this._isDocumentMetadataChanged(this.metadata,g);if(m&&h){const w=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Notebook Metadata",this.code="undoredo.notebooks.updateCellMetadata"}get resource(){return w.uri}undo(){w._updateNotebookMetadata(v,!1)}redo(){w._updateNotebookMetadata(g,!1)}},void 0,void 0)}this.metadata=g,this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ChangeDocumentMetadata,metadata:this.metadata,transient:!m}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_insertNewCell(g,h,v,m){for(let D=0;D<h.length;D++){const y=h[D].onDidChangeContent(T=>{this._bindCellContentHandler(h[D],T)});this._cellListeners.set(h[D].handle,y)}const w=[[g,0,h]];this._onWillAddRemoveCells.fire({rawEvent:{kind:A.NotebookCellsChangeType.ModelChange,changes:w}}),this._cells.splice(g,0,...h),this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ModelChange,changes:w,transient:!1}],versionId:this.versionId,synchronous:v,endSelectionState:m})}_removeCell(g,h,v,m){for(let D=g;D<g+h;D++){const y=this._cells[D];this._cellListeners.get(y.handle)?.dispose(),this._cellListeners.delete(y.handle)}const w=[[g,h,[]]];this._onWillAddRemoveCells.fire({rawEvent:{kind:A.NotebookCellsChangeType.ModelChange,changes:w}}),this._cells.splice(g,h),this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ModelChange,changes:w,transient:!1}],versionId:this.versionId,synchronous:v,endSelectionState:m})}_replaceNewCells(g,h,v,m,w){for(let y=g;y<g+h;y++){const T=this._cells[y];this._cellListeners.get(T.handle)?.dispose(),this._cellListeners.delete(T.handle)}for(let y=0;y<v.length;y++){const T=v[y].onDidChangeContent(_=>{this._bindCellContentHandler(v[y],_)});this._cellListeners.set(v[y].handle,T)}const D=[[g,h,v]];this._onWillAddRemoveCells.fire({rawEvent:{kind:A.NotebookCellsChangeType.ModelChange,changes:D}}),this._cells.splice(g,h,...v),this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ModelChange,changes:D,transient:!1}],versionId:this.versionId,synchronous:m,endSelectionState:w})}_isDocumentMetadataChanged(g,h){const v=new Set([...Object.keys(g||{}),...Object.keys(h||{})]);for(const m of v)if(m==="custom"){if(!this._customMetadataEqual(g[m],h[m])&&!this.transientOptions.transientDocumentMetadata[m])return!0}else if(g[m]!==h[m]&&!this.transientOptions.transientDocumentMetadata[m])return!0;return!1}_isCellMetadataChanged(g,h){const v=new Set([...Object.keys(g||{}),...Object.keys(h||{})]);for(const m of v)if(g[m]!==h[m]&&!this.transientOptions.transientCellMetadata[m])return!0;return!1}_customMetadataEqual(g,h){if(!g&&!h)return!0;if(!g||!h)return!1;const v=Object.getOwnPropertyNames(g),m=Object.getOwnPropertyNames(h);if(v.length!==m.length)return!1;for(let w=0;w<v.length;w++){const D=v[w];if(g[D]!==h[D])return!1}return!0}_changeCellMetadataPartial(g,h,v){const m={...g.metadata};let w;for(w in h){const D=h[w]??void 0;m[w]=D}return this._changeCellMetadata(g,m,v)}_changeCellMetadata(g,h,v){const m=this._isCellMetadataChanged(g.metadata,h);if(m&&v){const w=this._cells.indexOf(g);this._operationManager.pushEditOperation(new E.CellMetadataEdit(this.uri,w,Object.freeze(g.metadata),Object.freeze(h),{updateCellMetadata:(D,y)=>{const T=this._cells[D];!T||this._changeCellMetadata(T,y,!1)}}),void 0,void 0)}g.metadata=h,this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ChangeCellMetadata,index:this._cells.indexOf(g),metadata:g.metadata,transient:!m}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_changeCellInternalMetadataPartial(g,h){const v={...g.internalMetadata};let m;for(m in h){const w=h[m]??void 0;v[m]=w}g.internalMetadata=v,this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ChangeCellInternalMetadata,index:this._cells.indexOf(g),internalMetadata:g.internalMetadata,transient:!0}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_changeCellLanguage(g,h,v){if(g.language===h)return;const m=g.language;if(g.language=h,v){const w=this;this._operationManager.pushEditOperation(new class{constructor(){this.type=0,this.label="Update Cell Language",this.code="undoredo.notebooks.updateCellLanguage"}get resource(){return w.uri}undo(){w._changeCellLanguage(g,m,!1)}redo(){w._changeCellLanguage(g,h,!1)}},void 0,void 0)}this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.ChangeCellLanguage,index:this._cells.indexOf(g),language:h,transient:!1}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_spliceNotebookCellOutputs2(g,h,v){if(h.length===0&&g.outputs.length===0)return;if(h.length<=1){this._spliceNotebookCellOutputs(g,{start:0,deleteCount:g.outputs.length,newOutputs:h},!1,v);return}new I.LcsDiff(new a(g.outputs),new a(h)).ComputeDiff(!1).changes.map(y=>({start:y.originalStart,deleteCount:y.originalLength,newOutputs:h.slice(y.modifiedStart,y.modifiedStart+y.modifiedLength)})).reverse().forEach(y=>{this._spliceNotebookCellOutputs(g,y,!1,v)})}_spliceNotebookCellOutputs(g,h,v,m){g.spliceNotebookCellOutputs(h),this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.Output,index:this._cells.indexOf(g),outputs:g.outputs??[],append:v,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_appendNotebookCellOutputItems(g,h,v){g.changeOutputItems(h,!0,v)&&this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.OutputItem,index:this._cells.indexOf(g),outputId:h,outputItems:v,append:!0,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_replaceNotebookCellOutputItems(g,h,v){g.changeOutputItems(h,!1,v)&&this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.OutputItem,index:this._cells.indexOf(g),outputId:h,outputItems:v,append:!1,transient:this.transientOptions.transientOutputs}],versionId:this.versionId,synchronous:!0,endSelectionState:void 0})}_moveCellToIdx(g,h,v,m,w,D,y){w&&this._operationManager.pushEditOperation(new E.MoveCellEdit(this.uri,g,h,v,{moveCell:(_,L,M,O,N)=>{this._moveCellToIdx(_,L,M,!0,!1,O,N)}},D,y),D,y),this._assertIndex(g),this._assertIndex(v);const T=this._cells.splice(g,h);return this._cells.splice(v,0,...T),this._pauseableEmitter.fire({rawEvents:[{kind:A.NotebookCellsChangeType.Move,index:g,length:h,newIdx:v,cells:T,transient:!1}],versionId:this.versionId,synchronous:m,endSelectionState:y}),!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}};n=we([F(5,k.IUndoRedoService),F(6,C.IModelService),F(7,i.ILanguageService)],n),e.NotebookTextModel=n;class a{constructor(g){this.outputs=g}getElements(){return this.outputs.map(g=>(0,b.hash)(g.outputs.map(h=>({mime:h.mime,data:h.data}))))}}}),define(ae[152],le([1,0,7,64]),function(J,e,t,p){"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_SOURCE_COUNT=e.NOTEBOOK_KERNEL_COUNT=e.NOTEBOOK_KERNEL=e.NOTEBOOK_CELL_RESOURCE=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_LAST_CELL_FAILED=e.NOTEBOOK_CURSOR_NAVIGATION_MODE=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.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR=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",p.NOTEBOOK_EDITOR_ID),e.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR=t.ContextKeyExpr.equals("activeEditor",p.INTERACTIVE_WINDOW_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_CURSOR_NAVIGATION_MODE=new t.RawContextKey("notebookCursorNavigationMode",!1),e.NOTEBOOK_LAST_CELL_FAILED=new t.RawContextKey("notebookLastCellFailed",!1),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_CELL_RESOURCE=new t.RawContextKey("notebookCellResource",""),e.NOTEBOOK_KERNEL=new t.RawContextKey("notebookKernel",void 0),e.NOTEBOOK_KERNEL_COUNT=new t.RawContextKey("notebookKernelCount",0),e.NOTEBOOK_KERNEL_SOURCE_COUNT=new t.RawContextKey("notebookKernelSourceCount",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(ae[2357],le([1,0,263,36,2,59,1783,440,84,15,141,37,5,38,175,869,152]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeCellExecutionContextKeyService=e.RunToolbar=void 0;let l=class extends i.CellPart{constructor(n,a,o,g,h,v,m,w){super(),this.notebookEditor=n,this.contextKeyService=a,this.cellContainer=o,this.runButtonContainer=g,this.menuService=h,this.keybindingService=v,this.contextMenuService=m,this.instantiationService=w,this.primaryMenu=this._register(h.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecutePrimary,a)),this.secondaryMenu=this._register(h.createMenu(this.notebookEditor.creationOptions.menuIds.cellExecuteToolbar,a)),this.createRunCellToolbar(g,o,a);const D=()=>{const T=this.getCellToolbarActions(this.primaryMenu).primary[0];this.toolbar.setActions(T?[T]:[])};D(),this._register(this.primaryMenu.onDidChange(D)),this._register(this.secondaryMenu.onDidChange(D)),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(D))}didRenderCell(n){this.cellDisposables.add((0,f.registerStickyScroll)(this.notebookEditor,n,this.runButtonContainer)),this.toolbar.context={ui:!0,cell:n,notebookEditor:this.notebookEditor,$mid:12}}getCellToolbarActions(n){const g={primary:[],secondary:[]};return(0,I.createAndFillInActionBarActions)(n,{shouldForwardArgs:!0},g,h=>/^inline/.test(h)),g}createRunCellToolbar(n,a,o){const g=this._register(new R.DisposableStore),h=this._register(new p.Action("notebook.moreRunActions",(0,k.localize)(0,null),"codicon-chevron-down",!0)),v=w=>this.keybindingService.lookupKeybinding(w.id,m),m=this._register(s(o));this.toolbar=this._register(new t.ToolBar(n,this.contextMenuService,{getKeyBinding:v,actionViewItemProvider:w=>{g.clear();const D=this.getCellToolbarActions(this.primaryMenu).primary[0];if(!(D instanceof b.MenuItemAction))return;const y=this.getCellToolbarActions(this.secondaryMenu).secondary;if(!y.length)return;const T=this.instantiationService.createInstance(E.DropdownWithPrimaryActionViewItem,D,h,y,"notebook-cell-run-toolbar",this.contextMenuService,{getKeyBinding:v});return g.add(T.onDidChangeDropdownVisibility(_=>{a.classList.toggle("cell-run-toolbar-dropdown-active",_)})),T},renderDropdownAsChildElement:!0}))}};l=we([F(4,b.IMenuService),F(5,u.IKeybindingService),F(6,C.IContextMenuService),F(7,r.IInstantiationService)],l),e.RunToolbar=l;function s(d){const n=d.createScoped(document.createElement("div"));return S.InputFocusedContext.bindTo(n).set(!0),A.EditorContextKeys.editorTextFocus.bindTo(n).set(!0),A.EditorContextKeys.focus.bindTo(n).set(!0),A.EditorContextKeys.textInputFocus.bindTo(n).set(!0),c.NOTEBOOK_CELL_EXECUTION_STATE.bindTo(n).set("idle"),c.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(n).set(!0),c.NOTEBOOK_EDITOR_FOCUSED.bindTo(n).set(!0),c.NOTEBOOK_CELL_TYPE.bindTo(n).set("code"),n}e.getCodeCellExecutionContextKeyService=s}),define(ae[447],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookEditorModelResolverService=void 0,e.INotebookEditorModelResolverService=(0,t.createDecorator)("INotebookModelResolverService")}),define(ae[386],le([1,0,16,28,13,9,145,447]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkCellEdits=e.ResourceNotebookCellEdit=void 0;class I extends k.ResourceEdit{static is(C){return C instanceof I?!0:A.URI.isUri(C.resource)&&(0,R.isObject)(C.cellEdit)}static lift(C){return C instanceof I?C:new I(C.resource,C.cellEdit,C.notebookVersionId,C.metadata)}constructor(C,r,u=void 0,i){super(i),this.resource=C,this.cellEdit=r,this.notebookVersionId=u}}e.ResourceNotebookCellEdit=I;let b=class{constructor(C,r,u,i,f,c){this._undoRedoGroup=C,this._progress=u,this._token=i,this._edits=f,this._notebookModelService=c}async apply(){const C=[],r=(0,t.groupBy)(this._edits,(u,i)=>(0,p.compare)(u.resource.toString(),i.resource.toString()));for(const u of r){if(this._token.isCancellationRequested)break;const[i]=u,f=await this._notebookModelService.resolve(i.resource);if(typeof i.notebookVersionId=="number"&&f.object.notebook.versionId!==i.notebookVersionId)throw f.dispose(),new Error(`Notebook '${i.resource}' has changed in the meantime`);const c=u.map(s=>s.cellEdit),l=!f.object.isReadonly;f.object.notebook.applyEdits(c,!0,void 0,()=>{},this._undoRedoGroup,l),f.dispose(),this._progress.report(void 0),C.push(i.resource)}return C}};b=we([F(5,E.INotebookEditorModelResolverService)],b),e.BulkCellEdits=b}),define(ae[2358],le([1,0,19,54,60,2,6,145,386,25]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConflictDetector=void 0;let S=class{constructor(r,u,i,f){this._conflicts=new R.ResourceMap,this._disposables=new A.DisposableStore,this._onDidConflict=new k.Emitter,this.onDidConflict=this._onDidConflict.event;const c=new R.ResourceMap;for(const s of r)if(s instanceof E.ResourceTextEdit){if(c.set(s.resource,!0),typeof s.versionId=="number"){const d=i.getModel(s.resource);d&&d.getVersionId()!==s.versionId&&(this._conflicts.set(s.resource,!0),this._onDidConflict.fire(this))}}else s instanceof E.ResourceFileEdit?s.newResource?c.set(s.newResource,!0):s.oldResource&&c.set(s.oldResource,!0):s instanceof I.ResourceNotebookCellEdit?c.set(s.resource,!0):f.warn("UNKNOWN edit type",s);this._disposables.add(u.onDidFilesChange(s=>{for(const d of c.keys())if(!i.getModel(d)&&s.contains(d)){this._conflicts.set(d,!0),this._onDidConflict.fire(this);break}}));const l=s=>{c.has(s.uri)&&(this._conflicts.set(s.uri,!0),this._onDidConflict.fire(this))};for(const s of i.getModels())this._disposables.add(s.onDidChangeContent(()=>l(s)))}dispose(){this._disposables.dispose(),this._onDidConflict.dispose()}list(){return[...this._conflicts.keys()]}hasConflicts(){return this._conflicts.size>0}};S=we([F(1,t.IFileService),F(2,p.IModelService),F(3,b.ILogService)],S),e.ConflictDetector=S}),define(ae[644],le([1,0,62,9,42,54,94,2,16,20,138,5,19,6,2358,60,1544,18,145,29,72,207]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"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 o{constructor(){this._states=new WeakMap,this._checkedCount=0,this._onDidChange=new u.Emitter,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}get checkedCount(){return this._checkedCount}isChecked(T){return this._states.get(T)??!1}updateChecked(T,_){const L=this._states.get(T);L!==_&&(L===void 0?_&&(this._checkedCount+=1):_?this._checkedCount+=1:this._checkedCount-=1,this._states.set(T,_),this._onDidChange.fire(T))}}e.CheckedStates=o;class g{constructor(T,_){this.parent=T,this.textEdit=_}}e.BulkTextEdit=g;var h;(function(y){y[y.TextEdit=1]="TextEdit",y[y.Create=2]="Create",y[y.Delete=4]="Delete",y[y.Rename=8]="Rename"})(h=e.BulkFileOperationType||(e.BulkFileOperationType={}));class v{constructor(T,_){this.uri=T,this.parent=_,this.type=0,this.textEdits=[],this.originalEdits=new Map}addEdit(T,_,L){this.type|=_,this.originalEdits.set(T,L),L instanceof s.ResourceTextEdit?this.textEdits.push(new g(this,L)):_===8&&(this.newUri=L.newResource)}needsConfirmation(){for(const[,T]of this.originalEdits)if(!this.parent.checked.isChecked(T))return!0;return!1}}e.BulkFileOperation=v;class m{static keyOf(T){return T?.label||"<default>"}constructor(T=m._defaultMetadata){this.metadata=T,this.operationByResource=new Map}get fileOperations(){return this.operationByResource.values()}}e.BulkCategory=m,m._defaultMetadata=Object.freeze({label:(0,c.localize)(0,null),icon:d.Codicon.symbolFile,needsConfirmation:!1});let w=class Ra{static async create(T,_){return await T.get(C.IInstantiationService).createInstance(Ra,_)._init()}constructor(T,_,L){this._bulkEdit=T,this._fileService=_,this.checked=new o,this.fileOperations=[],this.categories=[],this.conflicts=L.createInstance(i.ConflictDetector,T)}dispose(){this.checked.dispose(),this.conflicts.dispose()}async _init(){const T=new Map,_=new Map,L=new f.ResourceMap;for(let M=0;M<this._bulkEdit.length;M++){const O=this._bulkEdit[M];let N,P;if(this.checked.updateChecked(O,!O.metadata?.needsConfirmation),O instanceof s.ResourceTextEdit)P=1,N=O.resource;else if(O instanceof s.ResourceFileEdit)if(O.newResource&&O.oldResource){if(P=8,N=O.oldResource,O.options?.overwrite===void 0&&O.options?.ignoreIfExists&&await this._fileService.exists(N))continue;L.set(O.newResource,N)}else if(O.oldResource){if(P=4,N=O.oldResource,O.options?.ignoreIfNotExists&&!await this._fileService.exists(N))continue}else if(O.newResource){if(P=2,N=O.newResource,O.options?.overwrite===void 0&&O.options?.ignoreIfExists&&await this._fileService.exists(N))continue}else continue;else continue;const B=(x,H)=>{let W=l.extUri.getComparisonKey(x,!0),U=H.get(W);!U&&L.has(x)&&(x=L.get(x),W=l.extUri.getComparisonKey(x,!0),U=H.get(W)),U||(U=new v(x,this),H.set(W,U)),U.addEdit(M,P,O)};B(N,T);const V=m.keyOf(O.metadata);let z=_.get(V);z||(z=new m(O.metadata),_.set(V,z)),B(N,z.operationByResource)}T.forEach(M=>this.fileOperations.push(M)),_.forEach(M=>this.categories.push(M));for(const M of this.fileOperations)if(M.type!==1){let O=!0;for(const N of M.originalEdits.values())N instanceof s.ResourceFileEdit&&(O=O&&this.checked.isChecked(N));if(!O)for(const N of M.originalEdits.values())this.checked.updateChecked(N,O)}return this.categories.sort((M,O)=>M.metadata.needsConfirmation===O.metadata.needsConfirmation?M.metadata.label.localeCompare(O.metadata.label):M.metadata.needsConfirmation?-1:1),this}getWorkspaceEdit(){const T=[];let _=!0;for(let L=0;L<this._bulkEdit.length;L++){const M=this._bulkEdit[L];if(this.checked.isChecked(M)){T[L]=M;continue}_=!1}return _?this._bulkEdit:((0,I.coalesceInPlace)(T),T)}getFileEdits(T){for(const _ of this.fileOperations)if(_.uri.toString()===T.toString()){const L=[];let M=!1;for(const O of _.originalEdits.values())O instanceof s.ResourceTextEdit?this.checked.isChecked(O)&&L.push(S.EditOperation.replaceMove(b.Range.lift(O.textEdit.range),O.textEdit.insertAsSnippet?a.SnippetParser.asInsertText(O.textEdit.text):O.textEdit.text)):this.checked.isChecked(O)||(M=!0);return M?[]:L.sort((O,N)=>b.Range.compareRangesUsingStarts(O.range,N.range))}return[]}getUriOfEdit(T){for(const _ of this.fileOperations)for(const L of _.originalEdits.values())if(L===T)return _.uri;throw new Error("invalid edit")}};w=we([F(1,r.IFileService),F(2,C.IInstantiationService)],w),e.BulkFileOperations=w;let D=class dr{static fromPreviewUri(T){return p.URI.parse(T.query)}constructor(T,_,L,M){this._operations=T,this._languageService=_,this._modelService=L,this._textModelResolverService=M,this._disposables=new E.DisposableStore,this._modelPreviewEdits=new Map,this._instanceId=(0,n.generateUuid)(),this._disposables.add(this._textModelResolverService.registerTextModelContentProvider(dr.Schema,this)),this._ready=this._init()}dispose(){this._disposables.dispose()}asPreviewUri(T){return p.URI.from({scheme:dr.Schema,authority:this._instanceId,path:T.path,query:T.toString()})}async _init(){for(const T of this._operations.fileOperations)await this._applyTextEditsToPreviewModel(T.uri);this._disposables.add(this._operations.checked.onDidChange(T=>{const _=this._operations.getUriOfEdit(T);this._applyTextEditsToPreviewModel(_)}))}async _applyTextEditsToPreviewModel(T){const _=await this._getOrCreatePreviewModel(T),L=this._modelPreviewEdits.get(_.id);L&&_.applyEdits(L);const M=this._operations.getFileEdits(T),O=_.applyEdits(M,!0);this._modelPreviewEdits.set(_.id,O)}async _getOrCreatePreviewModel(T){const _=this.asPreviewUri(T);let L=this._modelService.getModel(_);if(!L){try{const M=await this._textModelResolverService.createModelReference(T),O=M.object.textEditorModel;L=this._modelService.createModel((0,k.createTextBufferFactoryFromSnapshot)(O.createSnapshot()),this._languageService.createById(O.getLanguageId()),_),M.dispose()}catch{L=this._modelService.createModel("",this._languageService.createByFilepathOrFirstLine(_),_)}queueMicrotask(async()=>{this._disposables.add(await this._textModelResolverService.createModelReference(L.uri))})}return L}async provideTextContent(T){return T.toString()===dr.emptyPreview.toString()?this._modelService.createModel("",null,T):(await this._ready,this._modelService.getModel(T))}};D.Schema="vscode-bulkeditpreview",D.emptyPreview=p.URI.from({scheme:D.Schema,fragment:"empty"}),D=we([F(1,R.ILanguageService),F(2,A.IModelService),F(3,t.ITextModelService)],D),e.BulkEditPreviewProvider=D}),define(ae[2359],le([1,0,62,96,250,20,10,2,94,644,19,1545,49,239,18,12,28,9,156,145,122,42,125,207]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"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 h{constructor(x,H){this.parent=x,this.category=H}}e.CategoryElement=h;class v{constructor(x,H){this.parent=x,this.edit=H}isChecked(){const x=this.parent instanceof h?this.parent.parent:this.parent;let H=!0;this.edit.type===1&&(H=!this.edit.textEdits.every(W=>!x.checked.isChecked(W.textEdit)));for(const W of this.edit.originalEdits.values())W instanceof d.ResourceFileEdit&&(H=H&&x.checked.isChecked(W));if(this.parent instanceof h&&this.edit.type===1){for(const W of x.categories)for(const U of W.fileOperations)if(U.uri.toString()===this.edit.uri.toString())for(const $ of U.originalEdits.values())$ instanceof d.ResourceFileEdit&&(H=H&&x.checked.isChecked($))}return H}setChecked(x){const H=this.parent instanceof h?this.parent.parent:this.parent;for(const W of this.edit.originalEdits.values())H.checked.updateChecked(W,x);if(this.parent instanceof h&&this.edit.type!==1){for(const W of H.categories)for(const U of W.fileOperations)if(U.uri.toString()===this.edit.uri.toString())for(const $ of U.originalEdits.values())H.checked.updateChecked($,x)}}isDisabled(){if(this.parent instanceof h&&this.edit.type===1){const x=this.parent.parent;let H=!0;for(const W of x.categories)for(const U of W.fileOperations)if(U.uri.toString()===this.edit.uri.toString())for(const $ of U.originalEdits.values())$ instanceof d.ResourceFileEdit&&(H=H&&x.checked.isChecked($));return!H}return!1}}e.FileElement=v;class m{constructor(x,H,W,U,$,q,X){this.parent=x,this.idx=H,this.edit=W,this.prefix=U,this.selecting=$,this.inserting=q,this.suffix=X}isChecked(){let x=this.parent.parent;return x instanceof h&&(x=x.parent),x.checked.isChecked(this.edit.textEdit)}setChecked(x){let H=this.parent.parent;if(H instanceof h&&(H=H.parent),H.checked.updateChecked(this.edit.textEdit,x),x)for(const W of this.parent.edit.originalEdits.values())W instanceof d.ResourceFileEdit&&H.checked.updateChecked(W,x)}isDisabled(){return this.parent.isDisabled()}}e.TextEditElement=m;let w=class{constructor(x,H,W,U){this._textModelService=x,this._undoRedoService=H,this._languageService=W,this._languageConfigurationService=U,this.groupByFile=!0}hasChildren(x){return x instanceof v?x.edit.textEdits.length>0:!(x instanceof m)}async getChildren(x){if(x instanceof b.BulkFileOperations)return this.groupByFile?x.fileOperations.map(H=>new v(x,H)):x.categories.map(H=>new h(x,H));if(x instanceof h)return Array.from(x.category.fileOperations,H=>new v(x,H));if(x instanceof v&&x.edit.textEdits.length>0){let H,W;try{const $=await this._textModelService.createModelReference(x.edit.uri);H=$.object.textEditorModel,W=$}catch{H=new I.TextModel("",o.PLAINTEXT_LANGUAGE_ID,I.TextModel.DEFAULT_CREATION_OPTIONS,null,this._undoRedoService,this._languageService,this._languageConfigurationService),W=H}const U=x.edit.textEdits.map(($,q)=>{const X=A.Range.lift($.textEdit.textEdit.range),G=H.tokenization.getLineTokens(X.startLineNumber);let Q=23;for(let Y=G.findTokenIndexAtOffset(X.startColumn-1)-1;Q<50&&Y>=0;Y--)Q=X.startColumn-G.getStartOffset(Y);const j=H.tokenization.getLineTokens(X.endLineNumber);let K=0;for(let Y=j.findTokenIndexAtOffset(X.endColumn-1);K<50&&Y<j.getCount();Y++)K+=j.getEndOffset(Y)-j.getStartOffset(Y);return new m(x,q,$,H.getValueInRange(new A.Range(X.startLineNumber,X.startColumn-Q,X.startLineNumber,X.startColumn)),H.getValueInRange(X),$.textEdit.textEdit.insertAsSnippet?g.SnippetParser.asInsertText($.textEdit.textEdit.text):$.textEdit.textEdit.text,H.getValueInRange(new A.Range(X.endLineNumber,X.endColumn,X.endLineNumber,X.endColumn+K)))});return W.dispose(),U}return[]}};w=we([F(0,t.ITextModelService),F(1,s.IUndoRedoService),F(2,a.ILanguageService),F(3,n.ILanguageConfigurationService)],w),e.BulkEditDataSource=w;class D{compare(x,H){return x instanceof v&&H instanceof v?(0,c.compare)(x.edit.uri.toString(),H.edit.uri.toString()):x instanceof m&&H instanceof m?A.Range.compareRangesUsingStarts(x.edit.textEdit.textEdit.range,H.edit.textEdit.textEdit.range):0}}e.BulkEditSorter=D;let y=class{constructor(x){this._labelService=x}getWidgetAriaLabel(){return(0,C.localize)(0,null)}getRole(x){return"checkbox"}getAriaLabel(x){if(x instanceof v){if(x.edit.textEdits.length>0)return x.edit.type&8&&x.edit.newUri?(0,C.localize)(1,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0}),this._labelService.getUriLabel(x.edit.newUri,{relative:!0})):x.edit.type&2?(0,C.localize)(2,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0})):x.edit.type&4?(0,C.localize)(3,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0})):(0,C.localize)(4,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0}));if(x.edit.type&8&&x.edit.newUri)return(0,C.localize)(5,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0}),this._labelService.getUriLabel(x.edit.newUri,{relative:!0}));if(x.edit.type&2)return(0,C.localize)(6,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0}));if(x.edit.type&4)return(0,C.localize)(7,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0}))}if(x instanceof m){if(x.selecting.length>0&&x.inserting.length>0)return(0,C.localize)(8,null,x.edit.textEdit.textEdit.range.startLineNumber,x.selecting,x.inserting);if(x.selecting.length>0&&x.inserting.length===0)return(0,C.localize)(9,null,x.edit.textEdit.textEdit.range.startLineNumber,x.selecting);if(x.selecting.length===0&&x.inserting.length>0)return(0,C.localize)(10,null,x.edit.textEdit.textEdit.range.startLineNumber,x.selecting)}return null}};y=we([F(0,r.ILabelService)],y),e.BulkEditAccessibilityProvider=y;class T{getId(x){return x instanceof v?x.edit.uri+(x.parent instanceof h?JSON.stringify(x.parent.category.metadata):""):x instanceof m?x.parent.edit.uri.toString()+x.idx:JSON.stringify(x.category.metadata)}}e.BulkEditIdentityProvider=T;class _{constructor(x){x.classList.add("category"),this.icon=document.createElement("div"),x.appendChild(this.icon),this.label=new u.IconLabel(x)}}let L=class _a{constructor(x){this._themeService=x,this.templateId=_a.id}renderTemplate(x){return new _(x)}renderElement(x,H,W){W.icon.style.setProperty("--background-dark",null),W.icon.style.setProperty("--background-light",null),W.icon.style.color="";const{metadata:U}=x.element.category;if(f.ThemeIcon.isThemeIcon(U.iconPath)){const $=f.ThemeIcon.asClassName(U.iconPath);W.icon.className=$?`theme-icon ${$}`:"",W.icon.style.color=U.iconPath.color?this._themeService.getColorTheme().getColor(U.iconPath.color.id)?.toString()??"":""}else l.URI.isUri(U.iconPath)?(W.icon.className="uri-icon",W.icon.style.setProperty("--background-dark",k.asCSSUrl(U.iconPath)),W.icon.style.setProperty("--background-light",k.asCSSUrl(U.iconPath))):U.iconPath&&(W.icon.className="uri-icon",W.icon.style.setProperty("--background-dark",k.asCSSUrl(U.iconPath.dark)),W.icon.style.setProperty("--background-light",k.asCSSUrl(U.iconPath.light)));W.label.setLabel(U.label,U.description,{descriptionMatches:(0,p.createMatches)(x.filterData)})}disposeTemplate(x){x.label.dispose()}};L.id="CategoryElementRenderer",L=we([F(0,f.IThemeService)],L),e.CategoryElementRenderer=L;let M=class{constructor(x,H,W){this._labelService=W,this._disposables=new E.DisposableStore,this._localDisposables=new E.DisposableStore,this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),x.appendChild(this._checkbox),this._label=H.create(x,{supportHighlights:!0}),this._details=document.createElement("span"),this._details.className="details",x.appendChild(this._details)}dispose(){this._localDisposables.dispose(),this._disposables.dispose(),this._label.dispose()}set(x,H){if(this._localDisposables.clear(),this._checkbox.checked=x.isChecked(),this._checkbox.disabled=x.isDisabled(),this._localDisposables.add(k.addDisposableListener(this._checkbox,"change",()=>{x.setChecked(this._checkbox.checked)})),x.edit.type&8&&x.edit.newUri)this._label.setResource({resource:x.edit.uri,name:(0,C.localize)(11,null,this._labelService.getUriLabel(x.edit.uri,{relative:!0}),this._labelService.getUriLabel(x.edit.newUri,{relative:!0}))},{fileDecorations:{colors:!0,badges:!1}}),this._details.innerText=(0,C.localize)(12,null);else{const W={matches:(0,p.createMatches)(H),fileKind:S.FileKind.FILE,fileDecorations:{colors:!0,badges:!1},extraClasses:[]};x.edit.type&2?this._details.innerText=(0,C.localize)(13,null):x.edit.type&4?(this._details.innerText=(0,C.localize)(14,null),W.extraClasses.push("delete")):this._details.innerText="",this._label.setFile(x.edit.uri,W)}}};M=we([F(2,r.ILabelService)],M);let O=class Aa{constructor(x,H){this._resourceLabels=x,this._labelService=H,this.templateId=Aa.id}renderTemplate(x){return new M(x,this._resourceLabels,this._labelService)}renderElement(x,H,W){W.set(x.element,x.filterData)}disposeTemplate(x){x.dispose()}};O.id="FileElementRenderer",O=we([F(1,r.ILabelService)],O),e.FileElementRenderer=O;let N=class{constructor(x,H){this._themeService=H,this._disposables=new E.DisposableStore,this._localDisposables=new E.DisposableStore,x.classList.add("textedit"),this._checkbox=document.createElement("input"),this._checkbox.className="edit-checkbox",this._checkbox.type="checkbox",this._checkbox.setAttribute("role","checkbox"),x.appendChild(this._checkbox),this._icon=document.createElement("div"),x.appendChild(this._icon),this._label=new R.HighlightedLabel(x)}dispose(){this._localDisposables.dispose(),this._disposables.dispose()}set(x){this._localDisposables.clear(),this._localDisposables.add(k.addDisposableListener(this._checkbox,"change",G=>{x.setChecked(this._checkbox.checked),G.preventDefault()})),x.parent.isChecked()?(this._checkbox.checked=x.isChecked(),this._checkbox.disabled=x.isDisabled()):(this._checkbox.checked=x.isChecked(),this._checkbox.disabled=x.isDisabled());let H="";H+=x.prefix,H+=x.selecting,H+=x.inserting,H+=x.suffix;const W={start:x.prefix.length,end:x.prefix.length+x.selecting.length,extraClasses:["remove"]},U={start:W.end,end:W.end+x.inserting.length,extraClasses:["insert"]};let $;const{metadata:q}=x.edit.textEdit;q&&q.description?$=(0,C.localize)(15,null,q.label,q.description):q&&($=q.label);const X=q?.iconPath;if(!X)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),f.ThemeIcon.isThemeIcon(X)){const G=f.ThemeIcon.asClassName(X);this._icon.className=G?`theme-icon ${G}`:"",this._icon.style.color=X.color?this._themeService.getColorTheme().getColor(X.color.id)?.toString()??"":""}else l.URI.isUri(X)?(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",k.asCSSUrl(X)),this._icon.style.setProperty("--background-light",k.asCSSUrl(X))):(this._icon.className="uri-icon",this._icon.style.setProperty("--background-dark",k.asCSSUrl(X.dark)),this._icon.style.setProperty("--background-light",k.asCSSUrl(X.light)));this._label.set(H,[W,U],$,!0),this._icon.title=$||""}};N=we([F(1,f.IThemeService)],N);let P=class La{constructor(x){this._themeService=x,this.templateId=La.id}renderTemplate(x){return new N(x,this._themeService)}renderElement({element:x},H,W){W.set(x)}disposeTemplate(x){}};P.id="TextEditElementRenderer",P=we([F(0,f.IThemeService)],P),e.TextEditElementRenderer=P;class B{getHeight(){return 23}getTemplateId(x){return x instanceof v?O.id:x instanceof m?P.id:L.id}}e.BulkEditDelegate=B;class V{getKeyboardNavigationLabel(x){if(x instanceof v)return(0,i.basename)(x.edit.uri);if(x instanceof h)return x.category.metadata.label}}e.BulkEditNaviLabelProvider=V}),define(ae[448],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionService=e.CellExecutionUpdateType=void 0;var p;(function(R){R[R.Output=1]="Output",R[R.OutputItems=2]="OutputItems",R[R.ExecutionState=3]="ExecutionState"})(p=e.CellExecutionUpdateType||(e.CellExecutionUpdateType={})),e.INotebookExecutionService=(0,t.createDecorator)("INotebookExecutionService")}),define(ae[531],le([1,0,448]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDto=void 0;var p;(function(R){function A(l){return{mime:l.mime,valueBytes:l.data}}R.toNotebookOutputItemDto=A;function k(l){return{outputId:l.outputId,metadata:l.metadata,items:l.outputs.map(A)}}R.toNotebookOutputDto=k;function E(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)}}R.toNotebookCellDataDto=E;function I(l){return{metadata:l.metadata,cells:l.cells.map(E)}}R.toNotebookDataDto=I;function b(l){return{mime:l.mime,data:l.valueBytes}}R.fromNotebookOutputItemDto=b;function S(l){return{outputId:l.outputId,metadata:l.metadata,outputs:l.items.map(b)}}R.fromNotebookOutputDto=S;function C(l){return{cellKind:l.cellKind,language:l.language,mime:l.mime,source:l.source,outputs:l.outputs.map(S),metadata:l.metadata,internalMetadata:l.internalMetadata}}R.fromNotebookCellDataDto=C;function r(l){return{metadata:l.metadata,cells:l.cells.map(C)}}R.fromNotebookDataDto=r;function u(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}}R.toNotebookCellDto=u;function i(l){return l.editType===t.CellExecutionUpdateType.Output?{editType:l.editType,cellHandle:l.cellHandle,append:l.append,outputs:l.outputs.map(S)}:l.editType===t.CellExecutionUpdateType.OutputItems?{editType:l.editType,append:l.append,outputId:l.outputId,items:l.items.map(b)}:l}R.fromCellExecuteUpdateDto=i;function f(l){return l}R.fromCellExecuteCompleteDto=f;function c(l){return l.editType===1?{editType:l.editType,index:l.index,count:l.count,cells:l.cells.map(C)}:l}R.fromCellEditOperationDto=c})(p=e.NotebookDto||(e.NotebookDto={}))}),define(ae[162],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookExecutionStateService=void 0,e.INotebookExecutionStateService=(0,t.createDecorator)("INotebookExecutionStateService")}),define(ae[2360],le([1,0,112,2,287,64,162]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExecutionEditorProgressController=void 0;let E=class extends p.Disposable{constructor(b,S){super(),this._notebookEditor=b,this._notebookExecutionStateService=S,this._register(b.onDidScroll(()=>this._update())),this._register(S.onDidChangeCellExecution(C=>{C.notebook.toString()===this._notebookEditor.textModel?.uri.toString()&&this._update()})),this._register(b.onDidChangeModel(()=>this._update()))}_update(){if(!this._notebookEditor.hasModel())return;const b=this._notebookExecutionStateService.getCellExecutionsForNotebook(this._notebookEditor.textModel?.uri).filter(C=>C.state===A.NotebookCellExecutionState.Executing),S=C=>{for(const r of this._notebookEditor.visibleRanges)for(const u of this._notebookEditor.getCellsInRange(r))if(u.handle===C.cellHandle){const i=this._notebookEditor.getAbsoluteTopOfElement(u);if(this._notebookEditor.scrollTop<i+30)return!0}return!1};!b.length||b.some(S)||b.some(C=>C.isPaused)?this._notebookEditor.hideProgress():this._notebookEditor.showProgress()}};E.id="workbench.notebook.executionEditorProgress",we([(0,t.throttle)(100)],E.prototype,"_update",null),E=we([F(1,k.INotebookExecutionStateService)],E),e.ExecutionEditorProgressController=E,(0,R.registerNotebookContribution)(E.id,E)}),define(ae[2361],le([1,0,10,11,2,175,162]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellExecutionPart=void 0;const E=200;let I=class extends A.CellPart{constructor(S,C,r){super(),this._notebookEditor=S,this._executionOrderLabel=C,this._notebookExecutionStateService=r,this.kernelDisposables=this._register(new R.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(S){this.updateExecutionOrder(S.internalMetadata,!0)}updateExecutionOrder(S,C=!1){if(this._notebookEditor.activeKernel?.implementsExecutionOrder||!this._notebookEditor.activeKernel&&typeof S.executionOrder=="number"){if(typeof S.executionOrder!="number"&&!C&&!!this._notebookExecutionStateService.getCellExecution(this.currentCell.uri)){const u=this.currentCell;this.cellDisposables.add((0,p.disposableTimeout)(()=>{this.currentCell===u&&this.updateExecutionOrder(this.currentCell.internalMetadata,!0)},E));return}const r=typeof S.executionOrder=="number"?`[${S.executionOrder}]`:"[ ]";this._executionOrderLabel.innerText=r}else this._executionOrderLabel.innerText=""}updateState(S,C){C.internalMetadataChanged&&this.updateExecutionOrder(S.internalMetadata)}updateInternalLayoutNow(S){if(S.isInputCollapsed)t.hide(this._executionOrderLabel);else{t.show(this._executionOrderLabel);const C=S.layoutInfo.editorHeight-22+S.layoutInfo.statusBarHeight;this._executionOrderLabel.style.top=`${C}px`}}};I=we([F(2,k.INotebookExecutionStateService)],I),e.CellExecutionPart=I}),define(ae[2362],le([1,0,303,175,64,162]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellProgressBar=void 0;let k=class extends p.CellPart{constructor(b,S,C){super(),this._notebookExecutionStateService=C,this._progressBar=this._register(new t.ProgressBar(b)),this._progressBar.hide(),this._collapsedProgressBar=this._register(new t.ProgressBar(S)),this._collapsedProgressBar.hide()}didRenderCell(b){this._updateForExecutionState(b)}updateForExecutionState(b,S){this._updateForExecutionState(b,S)}updateState(b,S){if((S.metadataChanged||S.internalMetadataChanged)&&this._updateForExecutionState(b),S.inputCollapsedChanged){const C=this._notebookExecutionStateService.getCellExecution(b.uri);b.isInputCollapsed?(this._progressBar.hide(),C?.state===R.NotebookCellExecutionState.Executing&&this._updateForExecutionState(b)):(this._collapsedProgressBar.hide(),C?.state===R.NotebookCellExecutionState.Executing&&this._updateForExecutionState(b))}}_updateForExecutionState(b,S){const C=S?.changed??this._notebookExecutionStateService.getCellExecution(b.uri),r=b.isInputCollapsed?this._collapsedProgressBar:this._progressBar;C?.state===R.NotebookCellExecutionState.Executing&&(!C.didPause||b.isInputCollapsed)?E(r):r.hide()}};k=we([F(2,A.INotebookExecutionStateService)],k),e.CellProgressBar=k;function E(I){I.infinite().show(500)}}),define(ae[2363],le([1,0,10,143,2,1782,12,215,64,162]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCodeCellExecutionIcon=void 0;let S=class extends R.Disposable{constructor(r,u,i,f){super(),this._cell=u,this._element=i,this._executionStateService=f,this._visible=!1,this._update(),this._register(this._executionStateService.onDidChangeCellExecution(c=>{c.affectsCell(this._cell.uri)&&this._update()})),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._update()))}setVisibility(r){this._visible=r,this._update()}_update(){if(!this._visible)return;const r=this._executionStateService.getCellExecution(this._cell.uri),u=this._getItemForState(r,this._cell.model.internalMetadata);u?(this._element.style.display="",t.reset(this._element,...(0,p.renderLabelWithIcons)(u.text)),this._element.title=u.tooltip??""):(this._element.style.display="none",t.reset(this._element))}_getItemForState(r,u){const i=r?.state,{lastRunSuccess:f}=u;if(!i&&f)return{text:`$(${E.successStateIcon.id})`,tooltip:(0,A.localize)(0,null)};if(!i&&f===!1)return{text:`$(${E.errorStateIcon.id})`,tooltip:(0,A.localize)(1,null)};if(i===I.NotebookCellExecutionState.Pending||i===I.NotebookCellExecutionState.Unconfirmed)return{text:`$(${E.pendingStateIcon.id})`,tooltip:(0,A.localize)(2,null)};if(i===I.NotebookCellExecutionState.Executing)return{text:`$(${k.ThemeIcon.modify(E.executingStateIcon,"spin").id})`,tooltip:(0,A.localize)(3,null)}}};S=we([F(3,b.INotebookExecutionStateService)],S),e.CollapsedCodeCellExecutionIcon=S}),define(ae[228],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookKernelService=e.ProxyKernelState=void 0;var p;(function(R){R[R.Disconnected=1]="Disconnected",R[R.Connected=2]="Connected",R[R.Initializing=3]="Initializing"})(p=e.ProxyKernelState||(e.ProxyKernelState={})),e.INotebookKernelService=(0,t.createDecorator)("INotebookKernelService")}),define(ae[872],le([1,0,137,36,1789,12,215,228,1162]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebooKernelActionViewItem=void 0;let I=class extends t.ActionViewItem{constructor(S,C,r){super(void 0,new p.Action("fakeAction",void 0,A.ThemeIcon.asClassName(k.selectKernelIcon),!0,u=>S.run(u)),{label:!1,icon:!0}),this._editor=C,this._notebookKernelService=r,this._register(C.onDidChangeModel(this._update,this)),this._register(r.onDidChangeNotebookAffinity(this._update,this)),this._register(r.onDidChangeSelectedNotebooks(this._update,this)),this._register(r.onDidChangeSourceActions(this._update,this))}render(S){this._update(),super.render(S),S.classList.add("kernel-action-view-item"),this._kernelLabel=document.createElement("a"),S.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 S=this._editor.textModel;if(!S){this._resetAction();return}const C=this._notebookKernelService.getRunningSourceActions(S);if(C.length)return this._updateActionFromSourceAction(C[0],!0);const r=this._notebookKernelService.getMatchingKernel(S);if(r.all.length===0)return this._updateActionsFromSourceActions();this._updateActionFromKernelInfo(r)}_updateActionFromSourceAction(S,C){const r=S.action;this.action.class=C?A.ThemeIcon.asClassName(A.ThemeIcon.modify(k.executingStateIcon,"spin")):A.ThemeIcon.asClassName(k.selectKernelIcon),this.updateClass(),this._action.label=r.label,this._action.enabled=!0}_updateActionsFromSourceActions(){this._action.enabled=!0;const S=this._editor.textModel?this._notebookKernelService.getSourceActions(this._editor.textModel,this._editor.scopedContextKeyService):[];S.length===1?this._updateActionFromSourceAction(S[0],!1):S.filter(C=>C.isPrimary).length===1?this._updateActionFromSourceAction(S.filter(C=>C.isPrimary)[0],!1):(this._action.class=A.ThemeIcon.asClassName(k.selectKernelIcon),this._action.label=(0,R.localize)(0,null),this._action.tooltip="")}_updateActionFromKernelInfo(S){this._action.enabled=!0,this._action.class=A.ThemeIcon.asClassName(k.selectKernelIcon);const C=S.selected??(S.suggestions.length===1?S.suggestions[0]:void 0)??(S.all.length===1?S.all[0]:void 0);C?(this._action.label=this._generateKenrelLabel(C),this._action.tooltip=C.description??C.detail??"",S.selected):(this._action.label=(0,R.localize)(1,null),this._action.tooltip="")}_generateKenrelLabel(S){return S.label}_resetAction(){this._action.enabled=!1,this._action.label="",this._action.class=""}};I=we([F(2,E.INotebookKernelService)],I),e.NotebooKernelActionViewItem=I}),define(ae[2364],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookKeymapService=void 0,e.INotebookKeymapService=(0,t.createDecorator)("notebookKeymapService")}),define(ae[449],le([1,0,6,2,64]),function(J,e,t,p,R){"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 E=new t.Emitter;e.EditorTopPaddingChangeEvent=E.event;function I(u){k=u,E.fire()}e.updateEditorTopPadding=I;function b(){return k}e.getEditorTopPadding=b,e.OutputInnerContainerTopPadding=4;const S=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 r extends p.Disposable{constructor(i,f,c){super(),this.configurationService=i,this.notebookExecutionStateService=f,this.overrides=c,this._onDidChangeOptions=this._register(new t.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event;const l=this.configurationService.getValue(R.NotebookSetting.showCellStatusBar),s=c?.globalToolbar??this.configurationService.getValue(R.NotebookSetting.globalToolbar)??!0,d=this.configurationService.getValue(R.NotebookSetting.consolidatedOutputButton)??!0,n=this.configurationService.getValue(R.NotebookSetting.consolidatedRunButton)??!1,a=this.configurationService.getValue(R.NotebookSetting.dragAndDropEnabled)??!0,o=this.configurationService.getValue(R.NotebookSetting.cellToolbarLocation)??{default:"right"},g=c?.cellToolbarInteraction??this.configurationService.getValue(R.NotebookSetting.cellToolbarVisibility),h=this.configurationService.getValue(R.NotebookSetting.compactView)??!0,v=this._computeFocusIndicatorOption(),m=this._computeInsertToolbarPositionOption(),w=this._computeInsertToolbarAlignmentOption(),D=this._computeShowFoldingControlsOption(),y=this.configurationService.getValue("editor.fontSize"),T=this.configurationService.getValue(R.NotebookSetting.outputFontSize),_=this.configurationService.getValue(R.NotebookSetting.outputFontFamily),L=this.configurationService.getValue(R.NotebookSetting.markupFontSize),M=this.configurationService.getValue(R.NotebookSetting.cellEditorOptionsCustomizations),O=this.configurationService.getValue(R.NotebookSetting.interactiveWindowCollapseCodeCells),N=this._computeOutputLineHeight();this._layoutConfiguration={...h?C:S,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:s,consolidatedOutputButton:d,consolidatedRunButton:n,dragAndDropEnabled:a,cellToolbarLocation:o,cellToolbarInteraction:g,compactView:h,focusIndicator:v,insertToolbarPosition:m,insertToolbarAlignment:w,showFoldingControls:D,fontSize:y,outputFontSize:T,outputFontFamily:_,outputLineHeight:N,markupFontSize:L,editorOptionsCustomizations:M,focusIndicatorGap:3,interactiveWindowCollapseCodeCells:O,markdownFoldHintHeight:22},this._register(this.configurationService.onDidChangeConfiguration(P=>{this._updateConfiguration(P)})),this._register((0,e.EditorTopPaddingChangeEvent)(()=>{const P=Object.assign({},this._layoutConfiguration);P.editorTopPadding=b(),this._layoutConfiguration=P,this._onDidChangeOptions.fire({editorTopPadding:!0})}))}_computeOutputLineHeight(){let f=this.configurationService.getValue(R.NotebookSetting.outputLineHeight);if(f<8){let c=this.configurationService.getValue(R.NotebookSetting.outputFontSize);c===0&&(c=this.configurationService.getValue("editor.fontSize")),f=f*c}return f=Math.round(f),f<8&&(f=8),f}_updateConfiguration(i){const f=i.affectsConfiguration(R.NotebookSetting.showCellStatusBar),c=i.affectsConfiguration(R.NotebookSetting.cellToolbarLocation),l=i.affectsConfiguration(R.NotebookSetting.cellToolbarVisibility),s=i.affectsConfiguration(R.NotebookSetting.compactView),d=i.affectsConfiguration(R.NotebookSetting.focusIndicator),n=i.affectsConfiguration(R.NotebookSetting.insertToolbarLocation),a=i.affectsConfiguration(R.NotebookSetting.experimentalInsertToolbarAlignment),o=i.affectsConfiguration(R.NotebookSetting.globalToolbar),g=i.affectsConfiguration(R.NotebookSetting.consolidatedOutputButton),h=i.affectsConfiguration(R.NotebookSetting.consolidatedRunButton),v=i.affectsConfiguration(R.NotebookSetting.showFoldingControls),m=i.affectsConfiguration(R.NotebookSetting.dragAndDropEnabled),w=i.affectsConfiguration("editor.fontSize"),D=i.affectsConfiguration(R.NotebookSetting.outputFontSize),y=i.affectsConfiguration(R.NotebookSetting.markupFontSize),T=i.affectsConfiguration("editor.fontFamily"),_=i.affectsConfiguration(R.NotebookSetting.outputFontFamily),L=i.affectsConfiguration(R.NotebookSetting.cellEditorOptionsCustomizations),M=i.affectsConfiguration(R.NotebookSetting.interactiveWindowCollapseCodeCells),O=i.affectsConfiguration(R.NotebookSetting.outputLineHeight);if(!f&&!c&&!l&&!s&&!d&&!n&&!a&&!o&&!g&&!h&&!v&&!m&&!w&&!D&&!y&&!T&&!_&&!L&&!M&&!O)return;let N=Object.assign({},this._layoutConfiguration);if(f&&(N.showCellStatusBar=this.configurationService.getValue(R.NotebookSetting.showCellStatusBar)),c&&(N.cellToolbarLocation=this.configurationService.getValue(R.NotebookSetting.cellToolbarLocation)??{default:"right"}),l&&!this.overrides?.cellToolbarInteraction&&(N.cellToolbarInteraction=this.configurationService.getValue(R.NotebookSetting.cellToolbarVisibility)),d&&(N.focusIndicator=this._computeFocusIndicatorOption()),s){const P=this.configurationService.getValue(R.NotebookSetting.compactView)??!0;N=Object.assign(N,{...P?C:S}),N.compactView=P}a&&(N.insertToolbarAlignment=this._computeInsertToolbarAlignmentOption()),n&&(N.insertToolbarPosition=this._computeInsertToolbarPositionOption()),o&&this.overrides?.globalToolbar===void 0&&(N.globalToolbar=this.configurationService.getValue(R.NotebookSetting.globalToolbar)??!0),g&&(N.consolidatedOutputButton=this.configurationService.getValue(R.NotebookSetting.consolidatedOutputButton)??!0),h&&(N.consolidatedRunButton=this.configurationService.getValue(R.NotebookSetting.consolidatedRunButton)??!0),v&&(N.showFoldingControls=this._computeShowFoldingControlsOption()),m&&(N.dragAndDropEnabled=this.configurationService.getValue(R.NotebookSetting.dragAndDropEnabled)??!0),w&&(N.fontSize=this.configurationService.getValue("editor.fontSize")),D&&(N.outputFontSize=this.configurationService.getValue(R.NotebookSetting.outputFontSize)??N.fontSize),y&&(N.markupFontSize=this.configurationService.getValue(R.NotebookSetting.markupFontSize)),_&&(N.outputFontFamily=this.configurationService.getValue(R.NotebookSetting.outputFontFamily)),L&&(N.editorOptionsCustomizations=this.configurationService.getValue(R.NotebookSetting.cellEditorOptionsCustomizations)),M&&(N.interactiveWindowCollapseCodeCells=this.configurationService.getValue(R.NotebookSetting.interactiveWindowCollapseCodeCells)),(O||w||D)&&(N.outputLineHeight=this._computeOutputLineHeight()),this._layoutConfiguration=Object.freeze(N),this._onDidChangeOptions.fire({cellStatusBarVisibility:f,cellToolbarLocation:c,cellToolbarInteraction:l,compactView:s,focusIndicator:d,insertToolbarPosition:n,insertToolbarAlignment:a,globalToolbar:o,showFoldingControls:v,consolidatedOutputButton:g,consolidatedRunButton:h,dragAndDropEnabled:m,fontSize:w,outputFontSize:D,markupFontSize:y,fontFamily:T,outputFontFamily:_,editorOptionsCustomizations:L,interactiveWindowCollapseCodeCells:M,outputLineHeight:O})}_computeInsertToolbarPositionOption(){return this.configurationService.getValue(R.NotebookSetting.insertToolbarLocation)??"both"}_computeInsertToolbarAlignmentOption(){return this.configurationService.getValue(R.NotebookSetting.experimentalInsertToolbarAlignment)??"center"}_computeShowFoldingControlsOption(){return this.configurationService.getValue(R.NotebookSetting.showFoldingControls)??"mouseover"}_computeFocusIndicatorOption(){return this.configurationService.getValue(R.NotebookSetting.focusIndicator)??"gutter"}getCellCollapseDefault(){return this._layoutConfiguration.interactiveWindowCollapseCodeCells==="never"?{codeCell:{inputCollapsed:!1}}:{codeCell:{inputCollapsed:!0}}}getLayoutConfiguration(){return this._layoutConfiguration}computeCollapsedMarkdownCellHeight(i){const{bottomToolbarGap:f}=this.computeBottomToolbarDimensions(i);return this._layoutConfiguration.markdownCellTopMargin+this._layoutConfiguration.collapsedIndicatorHeight+f+this._layoutConfiguration.markdownCellBottomMargin}computeBottomToolbarOffset(i,f){const{bottomToolbarGap:c,bottomToolbarHeight:l}=this.computeBottomToolbarDimensions(f);return i-c-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,f,c,l){return c==="left"||l!=="hidden"?{bottomToolbarGap:18,bottomToolbarHeight:18}:f==="betweenCells"||f==="both"?i?{bottomToolbarGap:12,bottomToolbarHeight:20}:{bottomToolbarGap:20,bottomToolbarHeight:20}:{bottomToolbarGap:0,bottomToolbarHeight:0}}computeBottomToolbarDimensions(i){const f=this._layoutConfiguration,c=this.computeCellToolbarLocation(i),{bottomToolbarGap:l,bottomToolbarHeight:s}=this._computeBottomToolbarDimensions(f.compactView,f.insertToolbarPosition,f.insertToolbarAlignment,c);return{bottomToolbarGap:l,bottomToolbarHeight:s}}computeCellToolbarLocation(i){const f=this._layoutConfiguration.cellToolbarLocation;if(typeof f=="string"){if(f==="left"||f==="right"||f==="hidden")return f}else if(i){const c=f[i]??f.default;let l="right";switch(c){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 f=this.computeCellToolbarLocation(i);return f==="left"||f==="right"?A:0}computeEditorPadding(i,f){return{top:b(),bottom:this.statusBarIsVisible(i,f)?this._layoutConfiguration.editorBottomPadding:this._layoutConfiguration.editorBottomPaddingWithoutStatusBar}}computeEditorStatusbarHeight(i,f){return this.statusBarIsVisible(i,f)?this.computeStatusBarHeight():0}statusBarIsVisible(i,f){const c=this.notebookExecutionStateService.getCellExecution(f);return this._layoutConfiguration.showCellStatusBar==="visible"?!0:this._layoutConfiguration.showCellStatusBar==="visibleAfterExecute"?typeof i.lastRunSuccess=="boolean"||c!==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,outputFontSize:this._layoutConfiguration.outputFontSize,outputFontFamily:this._layoutConfiguration.outputFontFamily,markupFontSize:this._layoutConfiguration.markupFontSize,outputLineHeight:this._layoutConfiguration.outputLineHeight}}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,outputFontSize:this._layoutConfiguration.outputFontSize,outputFontFamily:this._layoutConfiguration.outputFontFamily,markupFontSize:this._layoutConfiguration.markupFontSize,outputLineHeight:this._layoutConfiguration.outputLineHeight}}computeIndicatorPosition(i,f,c){const{bottomToolbarGap:l}=this.computeBottomToolbarDimensions(c);return{bottomIndicatorTop:i-l-this._layoutConfiguration.cellBottomMargin-f,verticalIndicatorHeight:i-l-f}}}e.NotebookOptions=r}),define(ae[2365],le([1,0,144,88,18]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookStaticPreloadInfo=e.NotebookOutputRendererInfo=void 0;class A{constructor(b){this.value=new Set(b),this.defined=this.value.size>0}matches(b){return b.some(S=>this.value.has(S))}}class k{constructor(b){this.id=b.id,this.extensionId=b.extension.identifier,this.extensionLocation=b.extension.extensionLocation,this.isBuiltin=b.extension.isBuiltin,typeof b.entrypoint=="string"?this.entrypoint={extends:void 0,path:(0,R.joinPath)(this.extensionLocation,b.entrypoint)}:this.entrypoint={extends:b.entrypoint.extends,path:(0,R.joinPath)(this.extensionLocation,b.entrypoint.path)},this.displayName=b.displayName,this.mimeTypes=b.mimeTypes,this.mimeTypeGlobs=this.mimeTypes.map(S=>t.parse(S)),this.hardDependencies=new A(b.dependencies??p.Iterable.empty()),this.optionalDependencies=new A(b.optionalDependencies??p.Iterable.empty()),this.messaging=b.requiresMessaging??"never"}matchesWithoutKernel(b){return this.matchesMimeTypeOnly(b)?this.hardDependencies.defined?0:this.optionalDependencies.defined?1:2:3}matches(b,S){return this.matchesMimeTypeOnly(b)?this.hardDependencies.defined?this.hardDependencies.matches(S)?0:3:this.optionalDependencies.matches(S)?1:2:3}matchesMimeTypeOnly(b){return this.entrypoint.extends?!1:this.mimeTypeGlobs.some(S=>S(b))||this.mimeTypes.some(S=>S===b)}}e.NotebookOutputRendererInfo=k;class E{constructor(b){this.type=b.type,this.entrypoint=(0,R.joinPath)(b.extension.extensionLocation,b.entrypoint),this.extensionLocation=b.extension.extensionLocation}}e.NotebookStaticPreloadInfo=E}),define(ae[2366],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookPerfMarks=void 0;class t{constructor(){this._marks={}}get value(){return{...this._marks}}mark(R){if(this._marks[R]){console.error(`Skipping overwrite of notebook perf value: ${R}`);return}this._marks[R]=Date.now()}}e.NotebookPerfMarks=t}),define(ae[873],le([1,0,144,53,64]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookProviderInfo=void 0;class A{get selectors(){return this._selectors}get options(){return this._options}constructor(E){this.extension=E.extension,this.id=E.id,this.displayName=E.displayName,this._selectors=E.selectors?.map(I=>({include:I.filenamePattern,exclude:I.excludeFileNamePattern||""}))||[],this.priority=E.priority,this.providerDisplayName=E.providerDisplayName,this.exclusive=E.exclusive,this._options={transientCellMetadata:{},transientDocumentMetadata:{},transientOutputs:!1,cellContentMetadata:{}}}update(E){E.selectors&&(this._selectors=E.selectors),E.options&&(this._options=E.options)}matches(E){return this.selectors?.some(I=>A.selectorMatches(I,E))}static selectorMatches(E,I){if(typeof E=="string"&&t.match(E.toLowerCase(),(0,p.basename)(I.fsPath).toLowerCase())||t.isRelativePattern(E)&&t.match(E,(0,p.basename)(I.fsPath).toLowerCase()))return!0;if(!(0,R.isDocumentExcludePattern)(E))return!1;const b=E.include,S=E.exclude;return t.match(b,(0,p.basename)(I.fsPath).toLowerCase())?!(S&&t.match(S,(0,p.basename)(I.fsPath).toLowerCase())):!1}static possibleFileEnding(E){for(const I of E){const b=A._possibleFileEnding(I);if(b)return b}}static _possibleFileEnding(E){const I=/^.*(\.[a-zA-Z0-9_-]+)$/;let b;if(typeof E=="string")b=E;else if(t.isRelativePattern(E))b=E.pattern;else if(E.include)return A._possibleFileEnding(E.include);if(b){const S=I.exec(b);if(S)return S[1]}}}e.NotebookProviderInfo=A}),define(ae[268],le([1,0]),function(J,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 p(I){I.sort((S,C)=>S-C);const b=I.shift();return b===void 0?[]:I.reduce(function(S,C){return C<=S[0][1]?S[0][1]=C+1:S.unshift([C,C+1]),S},[[b,b+1]]).reverse().map(S=>({start:S[0],end:S[1]}))}e.cellIndexesToRanges=p;function R(I){return I.reduce((S,C)=>{for(let r=C.start;r<C.end;r++)S.push(r);return S},[])}e.cellRangesToIndexes=R;function A(I){const b=I.sort((C,r)=>C.start-r.start),S=b[0];return S?b.reduce((C,r)=>{const u=C[C.length-1];return u.end>=r.start?u.end=Math.max(u.end,r.end):C.push(r),C},[S]):[]}e.reduceCellRanges=A;function k(I,b){if(I=A(I),b=A(b),I.length!==b.length)return!1;for(let S=0;S<I.length;S++)if(I[S].start!==b[S].start||I[S].end!==b[S].end)return!1;return!0}e.cellRangesEqual=k;function E(I,b){return b.start>=I.start&&b.end<=I.end}e.cellRangeContains=E}),define(ae[874],le([1,0,298,6,2,13,268]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookVisibleCellObserver=void 0;class E extends R.Disposable{get visibleCells(){return this._visibleCells}constructor(b){super(),this._notebookEditor=b,this._onDidChangeVisibleCells=this._register(new p.Emitter),this.onDidChangeVisibleCells=this._onDidChangeVisibleCells.event,this._viewModelDisposables=this._register(new R.DisposableStore),this._visibleCells=[],this._register(this._notebookEditor.onDidChangeVisibleRanges(this._updateVisibleCells,this)),this._register(this._notebookEditor.onDidChangeModel(this._onModelChange,this)),this._updateVisibleCells()}_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 b=(0,k.cellRangesToIndexes)(this._notebookEditor.visibleRanges).map(f=>this._notebookEditor.cellAt(f)).filter(A.isDefined),S=new Set(b.map(f=>f.handle)),C=new Set(this._visibleCells.map(f=>f.handle)),r=(0,t.diffSets)(C,S),u=r.added.map(f=>this._notebookEditor.getCellByHandle(f)).filter(A.isDefined),i=r.removed.map(f=>this._notebookEditor.getCellByHandle(f)).filter(A.isDefined);this._visibleCells=b,this._onDidChangeVisibleCells.fire({added:u,removed:i})}}e.NotebookVisibleCellObserver=E}),define(ae[2367],le([1,0,11,32,2,874,287,385]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedStatusBarItemController=void 0;let I=class extends R.Disposable{constructor(C,r){super(),this._notebookEditor=C,this._notebookCellStatusBarService=r,this._visibleCells=new Map,this._observer=this._register(new A.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 C=this._observer.visibleCells.filter(c=>!this._visibleCells.has(c.handle)),r=new Set(this._observer.visibleCells.map(c=>c.handle)),u=Array.from(this._visibleCells.keys()),i=u.filter(c=>!r.has(c)),f=u.filter(c=>r.has(c));this._updateVisibleCells({added:C,removed:i.map(c=>({handle:c}))}),f.forEach(c=>this._visibleCells.get(c)?.update())}_updateVisibleCells(C){const r=this._notebookEditor._getViewModel();if(!!r){for(const u of C.added){const i=new b(r,u,this._notebookCellStatusBarService);this._visibleCells.set(u.handle,i)}for(const u of C.removed)this._visibleCells.get(u.handle)?.dispose(),this._visibleCells.delete(u.handle)}}dispose(){super.dispose(),this._visibleCells.forEach(C=>C.dispose()),this._visibleCells.clear()}};I.id="workbench.notebook.statusBar.contributed",I=we([F(1,E.INotebookCellStatusBarService)],I),e.ContributedStatusBarItemController=I;class b extends R.Disposable{constructor(C,r,u){super(),this._notebookViewModel=C,this._cell=r,this._notebookCellStatusBarService=u,this._currentItemIds=[],this._currentItemLists=[],this._updateThrottler=new t.Throttler,this._register((0,R.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,t.disposableTimeout)(()=>{this._updateThrottler.queue(()=>this._update())},0))}async _update(){const C=this._notebookViewModel.getCellIndex(this._cell),r=this._notebookViewModel.notebookDocument.uri,u=this._notebookViewModel.notebookDocument.viewType;this._activeToken?.dispose(!0);const i=this._activeToken=new p.CancellationTokenSource,f=await this._notebookCellStatusBarService.getStatusBarItemsForCell(r,C,u,i.token);if(i.token.isCancellationRequested){f.forEach(s=>s.dispose&&s.dispose());return}const c=f.map(s=>s.items).flat(),l=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:c}]);this._currentItemLists.forEach(s=>s.dispose&&s.dispose()),this._currentItemLists=f,this._currentItemIds=l}dispose(){super.dispose(),this._activeToken?.dispose(!0),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}]),this._currentItemLists.forEach(C=>C.dispose&&C.dispose())}}(0,k.registerNotebookContribution)(I.id,I)}),define(ae[2368],le([1,0,6,2,412,738,64,268]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateFoldingStateAtIndex=e.FoldingModel=void 0;const I={limit:5e3,report:()=>{}};class b{get regions(){return this._regions}constructor(){this._viewModel=null,this._viewModelStore=new p.DisposableStore,this._onDidFoldingRegionChanges=new t.Emitter,this.onDidFoldingRegionChanged=this._onDidFoldingRegionChanges.event,this._foldingRangeDecorationIds=[],this._regions=new R.FoldingRegions(new Uint32Array(0),new Uint32Array(0))}dispose(){this._onDidFoldingRegionChanges.dispose(),this._viewModelStore.dispose()}detachViewModel(){this._viewModelStore.clear(),this._viewModel=null}attachViewModel(r){this._viewModel=r,this._viewModelStore.add(this._viewModel.onDidChangeViewCells(()=>{this.recompute()})),this._viewModelStore.add(this._viewModel.onDidChangeSelection(()=>{if(!this._viewModel)return;const u=(0,E.cellRangesToIndexes)(this._viewModel.getSelections());let i=!1;u.forEach(f=>{let c=this.regions.findRange(f+1);for(;c!==-1;)this._regions.isCollapsed(c)&&f>this._regions.getStartLineNumber(c)-1&&(this._regions.setCollapsed(c,!1),i=!0),c=this._regions.getParentIndex(c)}),i&&this._onDidFoldingRegionChanges.fire()})),this.recompute()}getRegionAtLine(r){if(this._regions){const u=this._regions.findRange(r);if(u>=0)return this._regions.toRegion(u)}return null}getRegionsInside(r,u){const i=[],f=r?r.regionIndex+1:0,c=r?r.endLineNumber:Number.MAX_VALUE;if(u&&u.length===2){const l=[];for(let s=f,d=this._regions.length;s<d;s++){const n=this._regions.toRegion(s);if(this._regions.getStartLineNumber(s)<c){for(;l.length>0&&!n.containedBy(l[l.length-1]);)l.pop();l.push(n),u(n,l.length)&&i.push(n)}else break}}else for(let l=f,s=this._regions.length;l<s;l++){const d=this._regions.toRegion(l);if(this._regions.getStartLineNumber(l)<c)(!u||u(d))&&i.push(d);else break}return i}getAllRegionsAtLine(r,u){const i=[];if(this._regions){let f=this._regions.findRange(r),c=1;for(;f>=0;){const l=this._regions.toRegion(f);(!u||u(l,c))&&i.push(l),c++,f=l.parentIndex}}return i}setCollapsed(r,u){this._regions.setCollapsed(r,u)}recompute(){if(!this._viewModel)return;const r=this._viewModel,u=r.viewCells,i=[];for(let o=0;o<u.length;o++){const g=u[o];if(g.cellKind===k.CellKind.Code)continue;const v=g.getText().match(/^[ \t]*(\#+) /gm);let m=7;if(v&&v.length)for(let w=0;w<v.length;w++)m=Math.min(m,v[w].length);m<7&&i.push({index:o,level:m,endIndex:0})}const f=i.map((o,g)=>{let h;for(let m=g+1;m<i.length;++m)if(i[m].level<=o.level){h=i[m].index-1;break}const v=h!==void 0?h:u.length-1;return{start:o.index+1,end:v+1,rank:1}}).filter(o=>o.start!==o.end),c=(0,A.sanitizeRanges)(f,I);let l=0;const s=()=>{for(;l<this._regions.length;){const o=this._regions.isCollapsed(l);if(l++,o)return l-1}return-1};let d=0,n=s();for(;n!==-1&&d<c.length;){const o=r.getTrackedRange(this._foldingRangeDecorationIds[n]);if(o){const g=o.start;for(;d<c.length;){const h=c.getStartLineNumber(d)-1;if(g>=h)c.setCollapsed(d,g===h),d++;else break}}n=s()}for(;d<c.length;)c.setCollapsed(d,!1),d++;const a=[];for(let o=0;o<c.length;o++){const g=c.toRegion(o);a.push({start:g.startLineNumber-1,end:g.endLineNumber-1})}this._foldingRangeDecorationIds.forEach(o=>r.setTrackedRange(o,null,3)),this._foldingRangeDecorationIds=a.map(o=>r.setTrackedRange(null,o,3)).filter(o=>o!==null),this._regions=c,this._onDidFoldingRegionChanges.fire()}getMemento(){const r=[];let u=0;for(;u<this._regions.length;){if(this._regions.isCollapsed(u)){const f=this._regions.toRegion(u);r.push({start:f.startLineNumber-1,end:f.endLineNumber-1})}u++}return r}applyMemento(r){if(!this._viewModel)return!1;let u=0,i=0;for(;i<r.length&&u<this._regions.length;){if(this._viewModel.getTrackedRange(this._foldingRangeDecorationIds[u])){const c=r[i].start;for(;u<this._regions.length;){const l=this._regions.getStartLineNumber(u)-1;if(c>=l)this._regions.setCollapsed(u,c===l),u++;else break}}i++}for(;u<this._regions.length;)this._regions.setCollapsed(u,!1),u++;return!0}}e.FoldingModel=b;function S(C,r,u){const i=C.regions.findRange(r+1);C.setCollapsed(i,u)}e.updateFoldingStateAtIndex=S}),define(ae[645],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INotebookRendererMessagingService=void 0,e.INotebookRendererMessagingService=(0,t.createDecorator)("INotebookRendererMessagingService")}),define(ae[142],le([1,0,5]),function(J,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 p{constructor(k,E,I){this.viewType=k,this.controller=E,this.extensionData=I}}e.ComplexNotebookProviderInfo=p;class R{constructor(k,E,I){this.viewType=k,this.serializer=E,this.extensionData=I}}e.SimpleNotebookProviderInfo=R}),define(ae[2369],le([1,0,144,9,31,64,228,142]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),R.CommandsRegistry.registerCommand("_resolveNotebookContentProvider",I=>I.get(E.INotebookService).getContributedNotebookTypes().map(C=>{const r=C.selectors.map(u=>typeof u=="string"||t.isRelativePattern(u)?u:(0,A.isDocumentExcludePattern)(u)?{include:u.include,exclude:u.exclude}:null).filter(u=>u!==null);return{viewType:C.id,displayName:C.displayName,filenamePattern:r,options:{transientCellMetadata:C.options.transientCellMetadata,transientDocumentMetadata:C.options.transientDocumentMetadata,transientOutputs:C.options.transientOutputs}}})),R.CommandsRegistry.registerCommand("_resolveNotebookKernels",async(I,b)=>{const S=I.get(k.INotebookKernelService),C=p.URI.revive(b.uri);return S.getMatchingKernel({uri:C,viewType:b.viewType}).all.map(u=>({id:u.id,label:u.label,kind:u.kind,description:u.description,detail:u.detail,isPreferred:!1,preloads:u.preloadUris}))})}),define(ae[2370],le([1,0,6,2,72,365,871,142]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffNestedCellViewModel=void 0;let I=class extends p.Disposable{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(S){this._hoveringOutput=S,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(S){this._focusOnOutput=S,this._onDidChangeState.fire({outputIsFocusedChanged:!0})}get outputsViewModels(){return this._outputViewModels}constructor(S,C){super(),this.textModel=S,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,R.generateUuid)(),this._outputViewModels=this.textModel.outputs.map(r=>new k.CellOutputViewModel(this,r,this._notebookService)),this._register(this.textModel.onDidChangeOutputs(r=>{this._outputCollection.splice(r.start,r.deleteCount,...r.newOutputs.map(()=>0)),this._outputViewModels.splice(r.start,r.deleteCount,...r.newOutputs.map(u=>new k.CellOutputViewModel(this,u,this._notebookService))),this._outputsTop=null,this._onDidChangeOutputLayout.fire()})),this._outputCollection=new Array(this.textModel.outputs.length)}_ensureOutputsTop(){if(!this._outputsTop){const S=new Uint32Array(this._outputCollection.length);for(let C=0;C<this._outputCollection.length;C++)S[C]=this._outputCollection[C];this._outputsTop=new A.PrefixSumComputer(S)}}getOutputOffset(S){if(this._ensureOutputsTop(),S>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getPrefixSum(S-1)}updateOutputHeight(S,C){if(S>=this._outputCollection.length)throw new Error("Output index out of range!");this._ensureOutputsTop(),this._outputCollection[S]=C,this._outputsTop.setValue(S,C)&&this._onDidChangeOutputLayout.fire()}getOutputTotalHeight(){return this._ensureOutputsTop(),this._outputsTop?.getTotalSum()??0}};I=we([F(1,E.INotebookService)],I),e.DiffNestedCellViewModel=I}),define(ae[2371],le([1,0,6,2,60,18,13,5,25,64,448,162,228,142]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExecutionStateService=void 0;let i=class extends p.Disposable{constructor(n,a,o){super(),this._instantiationService=n,this._logService=a,this._notebookService=o,this._executions=new R.ResourceMap,this._notebookListeners=new R.ResourceMap,this._cellListeners=new R.ResourceMap,this._lastFailedCells=new R.ResourceMap,this._onDidChangeCellExecution=this._register(new t.Emitter),this.onDidChangeCellExecution=this._onDidChangeCellExecution.event,this._onDidChangeLastRunFailState=this._register(new t.Emitter),this.onDidChangeLastRunFailState=this._onDidChangeLastRunFailState.event}getLastFailedCellForNotebook(n){const a=this._lastFailedCells.get(n);return a?.visible?a.cellHandle:void 0}forceCancelNotebookExecutions(n){const a=this._executions.get(n);if(!!a)for(const o of a.values())this._onCellExecutionDidComplete(n,o.cellHandle,o)}getCellExecution(n){const a=b.CellUri.parse(n);if(!a)throw new Error(`Not a cell URI: ${n}`);const o=this._executions.get(a.notebook);if(o)return o.get(a.handle)}getCellExecutionsForNotebook(n){const a=this._executions.get(n);return a?Array.from(a.values()):[]}getCellExecutionsByHandleForNotebook(n){const a=this._executions.get(n);return(0,k.withNullAsUndefined)(a)}_onCellExecutionDidChange(n,a,o){this._onDidChangeCellExecution.fire(new f(n,a,o))}_onCellExecutionDidComplete(n,a,o,g){const h=this._executions.get(n);if(!h){this._logService.debug(`NotebookExecutionStateService#_onCellExecutionDidComplete - unknown notebook ${n.toString()}`);return}o.dispose();const v=b.CellUri.generate(n,a);this._cellListeners.get(v)?.dispose(),this._cellListeners.delete(v),h.delete(a),h.size===0&&(this._executions.delete(n),this._notebookListeners.get(n)?.dispose(),this._notebookListeners.delete(n)),g!==void 0&&(g?this._clearLastFailedCell(n):this._setLastFailedCell(n,a)),this._onDidChangeCellExecution.fire(new f(n,a))}createCellExecution(n,a){const o=this._notebookService.getNotebookTextModel(n);if(!o)throw new Error(`Notebook not found: ${n.toString()}`);let g=this._executions.get(n);if(!g){const v=this._instantiationService.createInstance(c,n);this._notebookListeners.set(n,v),g=new Map,this._executions.set(n,g)}let h=g.get(a);return h||(h=this._createNotebookCellExecution(o,a),g.set(a,h),h.initialize(),this._onDidChangeCellExecution.fire(new f(n,a,h))),h}_createNotebookCellExecution(n,a){const o=n.uri,g=this._instantiationService.createInstance(s,a,n),h=(0,p.combinedDisposable)(g.onDidUpdate(()=>this._onCellExecutionDidChange(o,a,g)),g.onDidComplete(v=>this._onCellExecutionDidComplete(o,a,g,v)));return this._cellListeners.set(b.CellUri.generate(o,a),h),g}_setLastFailedCell(n,a){const o=this._lastFailedCells.get(n),g=this._notebookService.getNotebookTextModel(n);if(!g)return;const h={cellHandle:a,disposable:o?o.disposable:this._getFailedCellListener(g),visible:!0};this._lastFailedCells.set(n,h),this._onDidChangeLastRunFailState.fire({visible:!0,notebook:n})}_setLastFailedCellVisibility(n,a){const o=this._lastFailedCells.get(n);o&&this._lastFailedCells.set(n,{cellHandle:o.cellHandle,disposable:o.disposable,visible:a}),this._onDidChangeLastRunFailState.fire({visible:a,notebook:n})}_clearLastFailedCell(n){const a=this._lastFailedCells.get(n);a&&(a.disposable?.dispose(),this._lastFailedCells.delete(n)),this._onDidChangeLastRunFailState.fire({visible:!1,notebook:n})}_getFailedCellListener(n){return n.onWillAddRemoveCells(a=>{const o=this._lastFailedCells.get(n.uri)?.cellHandle;if(o!==void 0){const g=n.cells.findIndex(h=>h.handle===o);a.rawEvent.changes.forEach(([h,v,m])=>{v&&g>=h&&g<h+v&&this._setLastFailedCellVisibility(n.uri,!1),m.some(w=>w.handle===o)&&this._setLastFailedCellVisibility(n.uri,!0)})}})}dispose(){super.dispose(),this._executions.forEach(n=>{n.forEach(a=>a.dispose()),n.clear()}),this._executions.clear(),this._cellListeners.forEach(n=>n.dispose()),this._notebookListeners.forEach(n=>n.dispose()),this._lastFailedCells.forEach(n=>n.disposable.dispose())}};i=we([F(0,E.IInstantiationService),F(1,I.ILogService),F(2,u.INotebookService)],i),e.NotebookExecutionStateService=i;class f{constructor(n,a,o){this.notebook=n,this.cellHandle=a,this.changed=o}affectsCell(n){const a=b.CellUri.parse(n);return!!a&&(0,A.isEqual)(this.notebook,a.notebook)&&this.cellHandle===a.handle}affectsNotebook(n){return(0,A.isEqual)(this.notebook,n)}}let c=class extends p.Disposable{constructor(n,a,o,g,h,v){super(),this._notebookService=a,this._notebookKernelService=o,this._notebookExecutionService=g,this._notebookExecutionStateService=h,this._logService=v,this._logService.debug(`NotebookExecution#ctor ${n.toString()}`);const m=this._notebookService.getNotebookTextModel(n);if(!m)throw new Error("Notebook not found: "+n);this._notebookModel=m,this._register(this._notebookModel.onWillAddRemoveCells(w=>this.onWillAddRemoveCells(w))),this._register(this._notebookModel.onWillDispose(()=>this.onWillDisposeDocument()))}cancelAll(){this._logService.debug("NotebookExecutionListeners#cancelAll");const n=this._notebookExecutionStateService.getCellExecutionsForNotebook(this._notebookModel.uri);this._notebookExecutionService.cancelNotebookCellHandles(this._notebookModel,n.map(a=>a.cellHandle))}onWillDisposeDocument(){this._logService.debug("NotebookExecution#onWillDisposeDocument"),this.cancelAll()}onWillAddRemoveCells(n){const a=this._notebookExecutionStateService.getCellExecutionsByHandleForNotebook(this._notebookModel.uri),o=new Set,g=new Set;if(a&&n.rawEvent.changes.forEach(([h,v])=>{v&&this._notebookModel.cells.slice(h,h+v).map(w=>w.handle).forEach(w=>{const D=a.get(w);D?.state===b.NotebookCellExecutionState.Executing?o.add(w):D&&g.add(w)})}),o.size||g.size){const h=this._notebookKernelService.getSelectedOrSuggestedKernel(this._notebookModel);if(h){const m=h.implementsInterrupt?[...o]:[...o,...g];this._logService.debug(`NotebookExecution#onWillAddRemoveCells, ${JSON.stringify([...m])}`),m.length&&h.cancelNotebookCellExecution(this._notebookModel.uri,m)}}}};c=we([F(1,u.INotebookService),F(2,r.INotebookKernelService),F(3,S.INotebookExecutionService),F(4,C.INotebookExecutionStateService),F(5,I.ILogService)],c);function l(d,n){if(d.editType===S.CellExecutionUpdateType.Output)return{editType:2,handle:d.cellHandle,append:d.append,outputs:d.outputs};if(d.editType===S.CellExecutionUpdateType.OutputItems)return{editType:7,items:d.items,append:d.append,outputId:d.outputId};if(d.editType===S.CellExecutionUpdateType.ExecutionState){const a={};return typeof d.executionOrder<"u"&&(a.executionOrder=d.executionOrder),typeof d.runStartTime<"u"&&(a.runStartTime=d.runStartTime),{editType:9,handle:n,internalMetadata:a}}throw new Error("Unknown cell update type")}let s=class extends p.Disposable{get state(){return this._state}get notebook(){return this._notebookModel.uri}get didPause(){return this._didPause}get isPaused(){return this._isPaused}constructor(n,a,o){super(),this.cellHandle=n,this._notebookModel=a,this._logService=o,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=b.NotebookCellExecutionState.Unconfirmed,this._didPause=!1,this._isPaused=!1,this._logService.debug(`CellExecution#ctor ${this.getCellLog()}`)}initialize(){const n={editType:9,handle:this.cellHandle,internalMetadata:{runStartTime:null,runEndTime:null,lastRunSuccess:null,executionOrder:null}};this._applyExecutionEdits([n])}getCellLog(){return`${this._notebookModel.uri.toString()}, ${this.cellHandle}`}logUpdates(n){const a=n.map(o=>S.CellExecutionUpdateType[o.editType]).join(", ");this._logService.debug(`CellExecution#updateExecution ${this.getCellLog()}, [${a}]`)}confirm(){this._logService.debug(`CellExecution#confirm ${this.getCellLog()}`),this._state=b.NotebookCellExecutionState.Pending,this._onDidUpdate.fire()}update(n){this.logUpdates(n),n.some(g=>g.editType===S.CellExecutionUpdateType.ExecutionState)&&(this._state=b.NotebookCellExecutionState.Executing),!this._didPause&&n.some(g=>g.editType===S.CellExecutionUpdateType.ExecutionState&&g.didPause)&&(this._didPause=!0);const a=[...n].reverse().find(g=>g.editType===S.CellExecutionUpdateType.ExecutionState&&typeof g.isPaused=="boolean");if(a&&(this._isPaused=a.isPaused),!this._notebookModel.cells.find(g=>g.handle===this.cellHandle))this._logService.debug(`CellExecution#update, updating cell not in notebook: ${this._notebookModel.uri.toString()}, ${this.cellHandle}`);else{const g=n.map(h=>l(h,this.cellHandle));this._applyExecutionEdits(g)}n.some(g=>g.editType===S.CellExecutionUpdateType.ExecutionState)&&this._onDidUpdate.fire()}complete(n){const a=this._notebookModel.cells.find(o=>o.handle===this.cellHandle);if(!a)this._logService.debug(`CellExecution#complete, completing cell not in notebook: ${this._notebookModel.uri.toString()}, ${this.cellHandle}`);else{const o={editType:9,handle:this.cellHandle,internalMetadata:{lastRunSuccess:n.lastRunSuccess,runStartTime:this._didPause?null:a.internalMetadata.runStartTime,runEndTime:this._didPause?null:n.runEndTime}};this._applyExecutionEdits([o])}this._onDidComplete.fire(n.lastRunSuccess)}_applyExecutionEdits(n){this._notebookModel.applyEdits(n,!0,void 0,()=>{},void 0,!1)}};s=we([F(2,I.ILogService)],s)}),define(ae[2372],le([1,0,6,2,60,23,9,142,11,15,7]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookKernelService=void 0;class C{constructor(c){this.notebookPriorities=new R.ResourceMap,this.kernel=c,this.score=-1,this.time=C._logicClock++}}C._logicClock=0;class r{static str(c){return`${c.viewType}/${c.uri.toString()}`}static obj(c){const l=c.indexOf("/");return{viewType:c.substring(0,l),uri:k.URI.parse(c.substring(l+1))}}}class u extends p.Disposable{constructor(c,l,s){super(),this.action=c,this.model=l,this.isPrimary=s,this._onDidChangeState=this._register(new t.Emitter),this.onDidChangeState=this._onDidChangeState.event}async runAction(){if(this.execution)return this.execution;this.execution=this._runAction(),this._onDidChangeState.fire(),await this.execution,this.execution=void 0,this._onDidChangeState.fire()}async _runAction(){try{await this.action.run({uri:this.model.uri,$mid:13})}catch(c){console.warn(`Kernel source command failed: ${c}`)}}}let i=class On extends p.Disposable{constructor(c,l,s,d){super(),this._notebookService=c,this._storageService=l,this._menuService=s,this._contextKeyService=d,this._kernels=new Map,this._notebookBindings=new R.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._onDidChangeSourceActions=this._register(new t.Emitter),this._kernelSources=new Map,this.onDidChangeSelectedNotebooks=this._onDidChangeNotebookKernelBinding.event,this.onDidAddKernel=this._onDidAddKernel.event,this.onDidRemoveKernel=this._onDidRemoveKernel.event,this.onDidChangeNotebookAffinity=this._onDidChangeNotebookAffinity.event,this.onDidChangeSourceActions=this._onDidChangeSourceActions.event,this._register(c.onDidAddNotebookDocument(this._tryAutoBindNotebook,this)),this._register(c.onWillRemoveNotebookDocument(n=>{this._notebookBindings.get(r.str(n))&&this.selectKernelForNotebook(void 0,n)}));try{const n=JSON.parse(this._storageService.get(On._storageNotebookBinding,1,"[]"));this._notebookBindings.fromJSON(n)}catch{}}dispose(){this._kernels.clear(),this._kernelSources.forEach(c=>{c.menu.dispose(),c.actions.forEach(l=>l[1].dispose())}),super.dispose()}_persistMementos(){this._persistSoonHandle?.dispose(),this._persistSoonHandle=(0,I.runWhenIdle)(()=>{this._storageService.store(On._storageNotebookBinding,JSON.stringify(this._notebookBindings),1,1)},100)}static _score(c,l){return c.viewType==="*"?5:c.viewType===l.viewType?10:0}_tryAutoBindNotebook(c,l){const s=this._notebookBindings.get(r.str(c));if(!s)return;const d=this._kernels.get(s);!d||!On._score(d.kernel,c)||(!l||d.kernel===l)&&this._onDidChangeNotebookKernelBinding.fire({notebook:c.uri,oldKernel:void 0,newKernel:d.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 C(c)),this._onDidAddKernel.fire(c);for(const l of this._notebookService.getNotebookTextModels())this._tryAutoBindNotebook(l,c);return(0,p.toDisposable)(()=>{this._kernels.delete(c.id)&&this._onDidRemoveKernel.fire(c);for(const[l,s]of Array.from(this._notebookBindings))s===c.id&&this._onDidChangeNotebookKernelBinding.fire({notebook:r.obj(l).uri,oldKernel:c.id,newKernel:void 0})})}getMatchingKernel(c){const l=[];for(const g of this._kernels.values()){const h=On._score(g.kernel,c);h&&l.push({score:h,kernel:g.kernel,instanceAffinity:g.notebookPriorities.get(c.uri)??1})}l.sort((g,h)=>h.instanceAffinity-g.instanceAffinity||g.score-h.score||g.kernel.label.localeCompare(h.kernel.label));const s=l.map(g=>g.kernel),d=this._notebookBindings.get(r.str(c)),n=d?this._kernels.get(d)?.kernel:void 0,a=l.filter(g=>g.instanceAffinity>1).map(g=>g.kernel),o=l.filter(g=>g.instanceAffinity<0).map(g=>g.kernel);return{all:s,selected:n,suggestions:a,hidden:o}}getSelectedOrSuggestedKernel(c){const l=this.getMatchingKernel(c);if(l.selected)return l.selected;const s=l.all.filter(d=>this._kernels.get(d.id)?.notebookPriorities.get(c.uri)===2);return s.length===1?s[0]:l.all.length===1?l.all[0]:void 0}selectKernelForNotebook(c,l){const s=r.str(l),d=this._notebookBindings.get(s);d!==c?.id&&(c?this._notebookBindings.set(s,c.id):this._notebookBindings.delete(s),this._onDidChangeNotebookKernelBinding.fire({notebook:l.uri,oldKernel:d,newKernel:c?.id}),this._persistMementos())}preselectKernelForNotebook(c,l){const s=r.str(l);this._notebookBindings.get(s)!==c?.id&&(this._notebookBindings.set(s,c.id),this._persistMementos())}updateKernelNotebookAffinity(c,l,s){const d=this._kernels.get(c.id);if(!d)throw new Error(`UNKNOWN kernel '${c.id}'`);s===void 0?d.notebookPriorities.delete(l):d.notebookPriorities.set(l,s),this._onDidChangeNotebookAffinity.fire()}getRunningSourceActions(c){const l=r.str(c),s=this._kernelSources.get(l);return s?s.actions.filter(d=>d[0].execution).map(d=>d[0]):[]}getSourceActions(c,l){l=l??this._contextKeyService;const s=r.str(c),d=this._kernelSources.get(s);if(d)return d.actions.map(g=>g[0]);const n=this._register(this._menuService.createMenu(b.MenuId.NotebookKernelSource,l)),a={menu:n,actions:[]},o=g=>{const h=g.getActions({shouldForwardArgs:!0}),v=[];h.forEach(m=>{const w=/^primary/.test(m[0]);m[1].forEach(D=>{const y=new u(D,c,w),T=y.onDidChangeState(()=>{this._onDidChangeSourceActions.fire({notebook:c.uri})});v.push([y,T])})}),a.actions=v,this._kernelSources.set(s,a),this._onDidChangeSourceActions.fire({notebook:c.uri})};return this._register(n.onDidChange(()=>{o(n)})),o(n),a.actions.map(g=>g[0])}};i._storageNotebookBinding="notebook.controller2NotebookBindings",i=we([F(0,E.INotebookService),F(1,A.IStorageService),F(2,b.IMenuService),F(3,S.IContextKeyService)],i),e.NotebookKernelService=i}),define(ae[2373],le([1,0,2,419,581,64,142]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookWorkerClient=e.NotebookEditorModelManager=e.WorkerManager=e.NotebookEditorWorkerServiceImpl=void 0;let E=class extends t.Disposable{constructor(u){super(),this._workerManager=this._register(new I(u))}canComputeDiff(u,i){throw new Error("Method not implemented.")}computeDiff(u,i){return this._workerManager.withWorker().then(f=>f.computeDiff(u,i))}};E=we([F(0,k.INotebookService)],E),e.NotebookEditorWorkerServiceImpl=E;class I extends t.Disposable{constructor(u){super(),this._notebookService=u,this._editorWorkerClient=null}withWorker(){return this._editorWorkerClient||(this._editorWorkerClient=new C(this._notebookService,"notebookEditorWorkerService")),Promise.resolve(this._editorWorkerClient)}}e.WorkerManager=I;class b extends t.Disposable{constructor(u,i){super(),this._proxy=u,this._notebookService=i,this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null)}ensureSyncedResources(u){for(const i of u){const f=i.toString();this._syncedModels[f]||this._beginModelSync(i),this._syncedModels[f]&&(this._syncedModelsLastUsedTime[f]=new Date().getTime())}}_beginModelSync(u){const i=this._notebookService.listNotebookDocuments().find(s=>s.uri.toString()===u.toString());if(!i)return;const f=u.toString();this._proxy.acceptNewModel(i.uri.toString(),{cells:i.cells.map(s=>({handle:s.handle,uri:s.uri,source:s.getValue(),eol:s.textBuffer.getEOL(),language:s.language,mime:s.mime,cellKind:s.cellKind,outputs:s.outputs.map(d=>({outputId:d.outputId,outputs:d.outputs})),metadata:s.metadata,internalMetadata:s.internalMetadata})),metadata:i.metadata});const c=new t.DisposableStore,l=s=>({handle:s.handle,uri:s.uri,source:s.textBuffer.getLinesContent(),eol:s.textBuffer.getEOL(),language:s.language,cellKind:s.cellKind,outputs:s.outputs,metadata:s.metadata,internalMetadata:s.internalMetadata});c.add(i.onDidChangeContent(s=>{const d=s.rawEvents.map(n=>n.kind===A.NotebookCellsChangeType.ModelChange||n.kind===A.NotebookCellsChangeType.Initialize?{kind:n.kind,versionId:s.versionId,changes:n.changes.map(o=>[o[0],o[1],o[2].map(g=>l(g))])}:n.kind===A.NotebookCellsChangeType.Move?{kind:n.kind,index:n.index,length:n.length,newIdx:n.newIdx,versionId:s.versionId,cells:n.cells.map(o=>l(o))}:n);this._proxy.acceptModelChanged(f.toString(),{rawEvents:d,versionId:s.versionId})})),c.add(i.onWillDispose(()=>{this._stopModelSync(f)})),c.add((0,t.toDisposable)(()=>{this._proxy.acceptRemovedModel(f)})),this._syncedModels[f]=c}_stopModelSync(u){const i=this._syncedModels[u];delete this._syncedModels[u],delete this._syncedModelsLastUsedTime[u],(0,t.dispose)(i)}}e.NotebookEditorModelManager=b;class S{constructor(u){this._workerClient=u}fhr(u,i){return this._workerClient.fhr(u,i)}}class C extends t.Disposable{constructor(u,i){super(),this._notebookService=u,this._workerFactory=new R.DefaultWorkerFactory(i),this._worker=null,this._modelManager=null}fhr(u,i){throw new Error("Not implemented!")}computeDiff(u,i){return this._withSyncedResources([u,i]).then(f=>f.computeDiff(u.toString(),i.toString()))}_getOrCreateModelManager(u){return this._modelManager||(this._modelManager=this._register(new b(u,this._notebookService))),this._modelManager}_withSyncedResources(u){return this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(u),i))}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new p.SimpleWorkerClient(this._workerFactory,"vs/workbench/contrib/notebook/common/services/notebookSimpleWorker",new S(this)))}catch(u){throw u}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,u=>{throw u})}}e.NotebookWorkerClient=C}),define(ae[258],le([1,0,144,142,18,5,47,447,49,22,19,848,21,56]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompositeNotebookEditorInput=e.NotebookEditorInput=void 0;let i=class Nn extends C.AbstractResourceEditorInput{static create(l,s,d,n={}){return l.createInstance(Nn,s,d,n)}constructor(l,s,d,n,a,o,g,h,v){super(l,void 0,h,v),this.viewType=s,this.options=d,this._notebookService=n,this._notebookModelResolverService=a,this._fileDialogService=o,this._instantiationService=g,this._editorModelReference=null,this._defaultDirtyState=!1,this._defaultDirtyState=!!d.startDirty,this._sideLoadedListener=n.onDidAddNotebookDocument(m=>{m.viewType===this.viewType&&m.uri.toString()===this.resource.toString()&&this.resolve().catch(r.onUnexpectedError)})}dispose(){this._sideLoadedListener.dispose(),this._editorModelReference?.dispose(),this._editorModelReference=null,super.dispose()}get typeId(){return Nn.ID}get editorId(){return this.viewType}get capabilities(){let l=0;return this.resource.scheme===b.Schemas.untitled&&(l|=4),this._editorModelReference?this._editorModelReference.object.isReadonly()&&(l|=2):this.fileService.hasCapability(this.resource,2048)&&(l|=2),l&2||(l|=128),l}getDescription(l=1){if(!this.hasCapability(4)||this._editorModelReference?.object.hasAssociatedFilePath())return super.getDescription(l)}isDirty(){return this._editorModelReference?this._editorModelReference.object.isDirty():this._defaultDirtyState}async save(l,s){if(this._editorModelReference)return this.hasCapability(4)?this.saveAs(l,s):(await this._editorModelReference.object.save(s),this)}async saveAs(l,s){if(!this._editorModelReference)return;const d=this._notebookService.getContributedNotebookType(this.viewType);if(!d)return;const n=this.hasCapability(4)?await this._suggestName(d,this.labelService.getUriBasenameLabel(this.resource)):this._editorModelReference.object.resource;let a;if(this._editorModelReference.object.hasAssociatedFilePath())a=n;else if(a=await this._fileDialogService.pickFileToSave(n,s?.availableFileSystems),!a)return;if(!d.matches(a)){const o=d.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 ${a} is not supported by ${d.providerDisplayName}. Please make sure the file name matches following patterns: ${o}`)}return await this._editorModelReference.object.saveAs(a)}async _suggestName(l,s){const d=l.selectors[0];let n=d&&typeof d=="string"?d:void 0;if(!n&&d){const a=d.include;typeof a=="string"&&(n=a)}if(n){const a=/^\*\.([A-Za-z_-]*)$/.exec(n);if(a&&a.length>1){const o=a[1];if(!s.endsWith(o))return(0,R.joinPath)(await this._fileDialogService.defaultFilePath(),s+"."+o)}}return(0,R.joinPath)(await this._fileDialogService.defaultFilePath(),s)}async rename(l,s){if(this._editorModelReference&&this._notebookService.getContributedNotebookTypes(s).find(n=>n.id===this._editorModelReference.object.viewType))return this._move(l,s)}_move(l,s){return{editor:Nn.create(this._instantiationService,s,this.viewType)}}async revert(l,s){this._editorModelReference&&this._editorModelReference.object.isDirty()&&await this._editorModelReference.object.revert(s)}async resolve(l){if(!await this._notebookService.canResolve(this.viewType))return null;if(l?.mark("extensionActivated"),this._sideLoadedListener.dispose(),this._editorModelReference)this._editorModelReference.object.load();else{const s=await this._notebookModelResolverService.resolve(this.resource,this.viewType);if(this._editorModelReference)return s.dispose(),this._editorModelReference.object;if(this._editorModelReference=s,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 s=await this._notebookService.withNotebookDataProvider(this._editorModelReference.object.notebook.viewType);if(!(s instanceof p.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");const d=await s.serializer.dataToNotebook(u.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:d.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(l){return super.matches(l)?!0:l instanceof Nn?this.viewType===l.viewType&&(0,R.isEqual)(this.resource,l.resource):!1}};i.ID="workbench.input.notebook",i=we([F(3,p.INotebookService),F(4,E.INotebookEditorModelResolverService),F(5,k.IFileDialogService),F(6,A.IInstantiationService),F(7,I.ILabelService),F(8,S.IFileService)],i),e.NotebookEditorInput=i;function f(c){return!!c&&typeof c=="object"&&Array.isArray(c.editorInputs)&&c.editorInputs.every(l=>l instanceof i)}e.isCompositeNotebookEditorInput=f}),define(ae[646],le([1,0,56,6,53,18,62,5,186,636,864,258]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditorInput=void 0;let r=class xn extends I.EditorInput{static create(s,d,n,a){return s.createInstance(xn,d,n,a)}get editorId(){return xn.ID}get typeId(){return xn.ID}get notebookEditorInput(){return this._notebookEditorInput}get editorInputs(){return[this._notebookEditorInput]}get resource(){return this._resource}get inputResource(){return this._inputResource}get primary(){return this._notebookEditorInput}constructor(s,d,n,a,o,g,h){const v=C.NotebookEditorInput.create(a,s,"interactive",{});super(),this._notebookEditorInput=v,this._register(this._notebookEditorInput),this._initTitle=n,this._resource=s,this._inputResource=d,this._inputResolver=null,this._editorModelReference=null,this._inputModelRef=null,this._textModelService=o,this._interactiveDocumentService=g,this._historyService=h,this._registerListeners()}_registerListeners(){const s=p.Event.once(this.primary.onWillDispose);this._register(s(()=>{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().then(s=>(this._data&&s?.notebook.reset(this._data.notebookData.cells.map(d=>i(d)),this._data.notebookData.metadata,this._data.notebookData.transientOptions),s)),this._inputResolver)}async resolveInput(s){return this._inputModelRef?this._inputModelRef.object.textEditorModel:(this._interactiveDocumentService.willCreateInteractiveDocument(this.resource,this.inputResource,s),this._inputModelRef=await this._textModelService.createModelReference(this.inputResource),this._data&&this._data.inputData&&this._inputModelRef.object.textEditorModel.setValue(this._data.inputData.value),this._inputModelRef.object.textEditorModel)}matches(s){return super.matches(s)?!0:s instanceof xn?(0,A.isEqual)(this.resource,s.resource)&&(0,A.isEqual)(this.inputResource,s.inputResource):!1}getName(){if(this._initTitle)return this._initTitle;const s=this.primary.resource.path,d=R.basename(s);return d.substr(0,d.length-R.extname(s).length)}getSerialization(){return{notebookData:this._serializeNotebook(this._editorModelReference?.notebook),inputData:this._inputModelRef?{value:this._inputModelRef.object.textEditorModel.getValue(),language:this._inputModelRef.object.textEditorModel.getLanguageId()}:void 0}}async restoreSerialization(s){this._data=s}_serializeNotebook(s){return s?{cells:s.cells.map(n=>u(n)),metadata:s.metadata,transientOptions:s.transientOptions}:void 0}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}};r.ID="workbench.input.interactive",r=we([F(3,E.IInstantiationService),F(4,k.ITextModelService),F(5,b.IInteractiveDocumentService),F(6,S.IInteractiveHistoryService)],r),e.InteractiveEditorInput=r;function u(l){return{cellKind:l.cellKind,language:l.language,metadata:l.metadata,mime:l.mime,outputs:l.outputs.map(s=>f(s)),source:l.getValue()}}function i(l){return{cellKind:l.cellKind,source:l.source,language:l.language,metadata:l.metadata,mime:l.mime,outputs:l.outputs.map(s=>c(s))}}function f(l){return{outputId:l.outputId,outputs:l.outputs.map(s=>({mime:s.mime,data:s.data.buffer?Array.from(s.data.buffer):[]})),metadata:l.metadata}}function c(l){return{outputId:l.outputId,outputs:l.outputs.map(s=>({mime:s.mime,data:t.VSBuffer.fromByteArray(s.data)})),metadata:l.metadata}}}),define(ae[101],le([1,0,64,258,268]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellFoldingState=e.cellRangeToViewCells=e.expandCellRangesWithHiddenCells=e.getNotebookEditorFromEditorPane=e.CursorAtBoundary=e.CellFocusMode=e.CellEditState=e.CellRevealType=e.CellLayoutContext=e.CellLayoutState=e.RenderOutputType=e.KERNEL_RECOMMENDATIONS=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.DETECT_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.DETECT_CELL_LANGUAGE="notebook.cell.detectLanguage",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]]),e.KERNEL_RECOMMENDATIONS=new Map,e.KERNEL_RECOMMENDATIONS.set(e.IPYNB_VIEW_TYPE,new Map),e.KERNEL_RECOMMENDATIONS.get(e.IPYNB_VIEW_TYPE)?.set("python",{extensionId:"ms-python.python",displayName:"Python + Jupyter"});var A;(function(c){c[c.Html=0]="Html",c[c.Extension=1]="Extension"})(A=e.RenderOutputType||(e.RenderOutputType={}));var k;(function(c){c[c.Uninitialized=0]="Uninitialized",c[c.Estimated=1]="Estimated",c[c.FromCache=2]="FromCache",c[c.Measured=3]="Measured"})(k=e.CellLayoutState||(e.CellLayoutState={}));var E;(function(c){c[c.Fold=0]="Fold"})(E=e.CellLayoutContext||(e.CellLayoutContext={}));var I;(function(c){c[c.NearTopIfOutsideViewport=0]="NearTopIfOutsideViewport",c[c.CenterIfOutsideViewport=1]="CenterIfOutsideViewport"})(I=e.CellRevealType||(e.CellRevealType={}));var b;(function(c){c[c.Preview=0]="Preview",c[c.Editing=1]="Editing"})(b=e.CellEditState||(e.CellEditState={}));var S;(function(c){c[c.Container=0]="Container",c[c.Editor=1]="Editor",c[c.Output=2]="Output"})(S=e.CellFocusMode||(e.CellFocusMode={}));var C;(function(c){c[c.None=0]="None",c[c.Top=1]="Top",c[c.Bottom=2]="Bottom",c[c.Both=3]="Both"})(C=e.CursorAtBoundary||(e.CursorAtBoundary={}));function r(c){if(!c)return;if(c.getId()===t.NOTEBOOK_EDITOR_ID)return c.getControl();const l=c.input;if(l&&(0,p.isCompositeNotebookEditorInput)(l))return c.getControl().notebookEditor}e.getNotebookEditorFromEditorPane=r;function u(c,l){const s=(0,R.cellRangesToIndexes)(l),d=[];return s.forEach(n=>{if(!c.cellAt(n))return;const o=c.getViewIndexByModelIndex(n);if(o<0)return;const g=o+1,h=c.getCellRangeFromViewRange(o,g);h&&d.push(h)}),(0,R.reduceCellRanges)(d)}e.expandCellRangesWithHiddenCells=u;function i(c,l){const s=[];return(0,R.reduceCellRanges)(l).forEach(d=>{s.push(...c.getCellsInRange(d))}),s}e.cellRangeToViewCells=i;var f;(function(c){c[c.None=0]="None",c[c.Expanded=1]="Expanded",c[c.Collapsed=2]="Collapsed"})(f=e.CellFoldingState||(e.CellFoldingState={}))}),define(ae[2374],le([1,0,11,101,20,826,365,64,8,2,16,33]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindModel=void 0;let r=class extends b.Disposable{get findMatches(){return this._findMatches}get currentMatch(){return this._currentMatch}constructor(i,f,c){super(),this._notebookEditor=i,this._state=f,this._configurationService=c,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 b.DisposableStore),this._throttledDelayer=new t.Delayer(20),this._computePromise=null,this._register(f.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)}ensureFindMatches(){this._findMatchesStarts||this.set(this._findMatches,!0)}getCurrentMatch(){const i=this._findMatchesStarts.getIndexOf(this._currentMatch),f=this._findMatches[i.index].cell,c=this._findMatches[i.index].matches[i.remainder];return{cell:f,match:c,isModelMatch:i.remainder<this._findMatches[i.index].modelMatchCount}}refreshCurrentMatch(i){const f=this.findMatches.findIndex(d=>d.cell===i.cell);if(f===-1)return;const c=this.findMatches[f],l=c.matches.slice(0,c.modelMatchCount).findIndex(d=>d.range.intersectRanges(i.range)!==null);if(l===void 0)return;const s=f===0?0:this._findMatchesStarts?.getPrefixSum(f-1)??0;this._currentMatch=s+l,this.highlightCurrentFindMatchDecoration(f,l).then(d=>{this.revealCellRange(f,l,d),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((n,a)=>n+a.matches.length,0),void 0)})}find(i){if(!this.findMatches.length)return;if(!this._findMatchesStarts)this.set(this._findMatches,!0),"index"in i&&(this._currentMatch=i.index);else{const c=this._findMatchesStarts.getTotalSum();if("index"in i)this._currentMatch=i.index;else if(this._currentMatch===-1)this._currentMatch=i.previous?c-1:0;else{const l=(this._currentMatch+(i.previous?-1:1)+c)%c;this._currentMatch=l}}const f=this._findMatchesStarts.getIndexOf(this._currentMatch);this.highlightCurrentFindMatchDecoration(f.index,f.remainder).then(c=>{this.revealCellRange(f.index,f.remainder,c),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((l,s)=>l+s.matches.length,0),void 0)})}revealCellRange(i,f,c){const l=this._findMatches[i];if(f>=l.modelMatchCount)this._notebookEditor.focusElement(l.cell),this._notebookEditor.getCellIndex(l.cell)!==void 0&&this._notebookEditor.revealCellOffsetInCenterAsync(l.cell,c??0);else{const s=l.matches[f];l.cell.updateEditState(p.CellEditState.Editing,"find"),l.cell.isInputCollapsed=!1,this._notebookEditor.focusElement(l.cell),this._notebookEditor.setCellEditorSelection(l.cell,s.range),this._notebookEditor.revealRangeInCenterIfOutsideViewportAsync(l.cell,s.range)}}_registerModelListener(i){this._modelDisposable.clear(),i&&this._modelDisposable.add(i.onDidChangeContent(f=>{!f.rawEvents.some(c=>c.kind===E.NotebookCellsChangeType.ChangeCellContent||c.kind===E.NotebookCellsChangeType.ModelChange)||this.research()})),this.research()}async research(){return 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)(n=>this._compute(n));const i=await this._computePromise;if(!i){this.set([],!1);return}if(i.length===0){this.set([],!1);return}const f=n=>{const a=(0,S.findFirstInSorted)(i.map(o=>o.index),o=>o>=n);this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a))};if(this._currentMatch===-1)if(this._notebookEditor.getLength()===0){this.set(i,!1);return}else{const n=this._notebookEditor.getFocus().start;f(n),this.set(i,!1);return}const c=this._findMatchesStarts.getIndexOf(this._currentMatch),l=this._findMatches[c.index].cell,s=this._notebookEditor.getCellIndex(l);if(s<0){if(this._notebookEditor.getLength()===0){this.set(i,!1);return}f(s);return}const d=this._notebookEditor.cellAt(s);if(d.cellKind===E.CellKind.Markup&&d.getEditState()===p.CellEditState.Preview){f(s);return}if(!this._currentMatchDecorations){f(s);return}if(this._currentMatchDecorations.kind==="input"){const n=this._currentMatchDecorations.decorations.find(o=>o.ownerId===d.handle);if(!n){f(s);return}const a=(0,S.findFirstInSorted)(i,o=>o.index>=s)%i.length;if(i[a].index>s){this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a));return}else{let o=d.editorAttached&&n.decorations[0]?d.getCellDecorationRange(n.decorations[0]):null;if(o===null&&c.remainder<this._findMatches[c.index].modelMatchCount&&(o=this._findMatches[c.index].matches[c.remainder].range),o!==null){const g=i[a],h=(0,S.findFirstInSorted)(g.matches.slice(0,g.modelMatchCount),v=>R.Range.compareRangesUsingStarts(v.range,o)>=0);this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a)+h)}else{this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,a));return}}}else{const n=(0,S.findFirstInSorted)(i.map(a=>a.index),a=>a>=s)%i.length;this._updateCurrentMatch(i,this._matchesCountBeforeIndex(i,n))}}set(i,f){if(!i||!i.length){this._findMatches=[],this.setAllFindMatchesDecorations([]),this.constructFindMatchesStarts(),this._currentMatch=-1,this.clearCurrentFindMatchDecoration(),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((c,l)=>c+l.matches.length,0),void 0);return}this._findMatches=i,this.setAllFindMatchesDecorations(i||[]),this.constructFindMatchesStarts(),f&&(this._currentMatch=0,this.highlightCurrentFindMatchDecoration(0,0)),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((c,l)=>c+l.matches.length,0),void 0)}async _compute(i){this._state.change({isSearching:!0},!1);let f=null;const c=this._state.searchString,l=this._configurationService.inspect("editor.wordSeparators").value,s={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 c&&this._notebookEditor.hasModel()?f=await this._notebookEditor.find(c,s,i):f=null,this._state.change({isSearching:!1},!1),f}_updateCurrentMatch(i,f){this.set(i,!1),this._currentMatch=f%i.length;const c=this._findMatchesStarts.getIndexOf(this._currentMatch);this.highlightCurrentFindMatchDecoration(c.index,c.remainder),this._state.changeMatchInfo(this._currentMatch,this._findMatches.reduce((l,s)=>l+s.matches.length,0),void 0)}_matchesCountBeforeIndex(i,f){let c=0;for(let l=0;l<f;l++)c+=i[l].matches.length;return c}constructFindMatchesStarts(){if(this._findMatches&&this._findMatches.length){const i=new Uint32Array(this._findMatches.length);for(let f=0;f<this._findMatches.length;f++)i[f]=this._findMatches[f].matches.length;this._findMatchesStarts=new k.PrefixSumComputer(i)}else this._findMatchesStarts=null}async highlightCurrentFindMatchDecoration(i,f){const c=this._findMatches[i].cell;if(f<this._findMatches[i].modelMatchCount){this.clearCurrentFindMatchDecoration();const l=this._findMatches[i].matches[f];return this._notebookEditor.changeModelDecorations(s=>{const d=A.FindDecorations._CURRENT_FIND_MATCH_DECORATION,n=[{range:l.range,options:d}],a={ownerId:c.handle,decorations:n};this._currentMatchDecorations={kind:"input",decorations:s.deltaDecorations(this._currentMatchDecorations?.kind==="input"?this._currentMatchDecorations.decorations:[],[a])}}),this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[{ownerId:c.handle,handle:c.handle,options:{overviewRuler:{color:C.overviewRulerSelectionHighlightForeground,modelRanges:[l.range],includeOutput:!1}}}]),null}else{this.clearCurrentFindMatchDecoration();const l=this._findMatches[i].matches[f],s=await this._notebookEditor.highlightFind(c,l.index);return this._currentMatchDecorations={kind:"output",index:l.index},this._currentMatchCellDecorations=this._notebookEditor.deltaCellDecorations(this._currentMatchCellDecorations,[{ownerId:c.handle,handle:c.handle,options:{overviewRuler:{color:C.overviewRulerSelectionHighlightForeground,modelRanges:[],includeOutput:!0}}}]),s}}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(f=>{const c=A.FindDecorations._FIND_MATCH_DECORATION,l=i.map(s=>{const d=s.matches,n=new Array(d.length);for(let a=0,o=Math.min(d.length,s.modelMatchCount);a<o;a++)n[a]={range:d[a].range,options:c};return{ownerId:s.cell.handle,decorations:n}});this._allMatchesDecorations=f.deltaDecorations(this._allMatchesDecorations,l)}),this._allMatchesCellDecorations=this._notebookEditor.deltaCellDecorations(this._allMatchesCellDecorations,i.map(f=>({ownerId:f.cell.handle,handle:f.cell.handle,options:{overviewRuler:{color:C.overviewRulerFindMatchForeground,modelRanges:f.matches.slice(0,f.modelMatchCount).map(c=>c.range),includeOutput:f.modelMatchCount<f.matches.length}}})))}clear(){this._computePromise?.cancel(),this._throttledDelayer.cancel(),this.set([],!1)}};r=we([F(2,I.IConfigurationService)],r),e.FindModel=r}),define(ae[647],le([1,0,10,110,206,2,28,310,434,510,1755,15,8,7,37,5,12,2374,2337,101,152]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFindWidget=e.NotebookFindContrib=void 0;const a="find-hide-transition",o="find-show-transition";let g=69;const h=200;let v=class extends A.Disposable{constructor(D,y){super(),this.notebookEditor=D,this.instantiationService=y,this.widget=new R.Lazy(()=>this._register(this.instantiationService.createInstance(m,this.notebookEditor)))}show(D,y){return this.widget.getValue().show(D,y)}hide(){this.widget.rawValue?.hide()}replace(D){return this.widget.getValue().replace(D)}};v.id="workbench.notebook.find",v=we([F(1,f.IInstantiationService)],v),e.NotebookFindContrib=v;let m=class extends s.SimpleFindReplaceWidget{constructor(D,y,T,_,L,M,O,N){super(y,T,_,L,O,M,N,new I.FindReplaceState,D),this._showTimeout=null,this._hideTimeout=null,this._findModel=new l.FindModel(this._notebookEditor,this._state,this._configurationService),t.append(this._notebookEditor.getDomNode(),this.getDomNode()),this._findWidgetFocused=n.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED.bindTo(T),this._register(this._findInput.onKeyDown(P=>this._onFindInputKeyDown(P))),this.updateTheme(_.getColorTheme()),this._register(_.onDidColorThemeChange(()=>{this.updateTheme(_.getColorTheme())})),this._register(this._state.onFindReplaceStateChange(P=>{if(this.onInputChanged(),P.isSearching&&(this._state.isSearching?this._progressBar.infinite().show(h):this._progressBar.stop().hide()),this._findModel.currentMatch>=0){const V=this._findModel.getCurrentMatch();this._replaceBtn.setEnabled(V.isModelMatch)}const B=this._findModel.findMatches;this._replaceAllBtn.setEnabled(B.length>0&&B.find(V=>V.modelMatchCount<V.matches.length)===void 0),P.filters&&this._findInput.updateFilterState((this._state.filters?.markupPreview??!1)||(this._state.filters?.codeOutput??!1))})),this._register(t.addDisposableListener(this.getDomNode(),t.EventType.FOCUS,P=>{this._previousFocusElement=P.relatedTarget instanceof HTMLElement?P.relatedTarget:void 0},!0))}_onFindInputKeyDown(D){if(D.equals(3)){this.find(!1),D.preventDefault();return}else if(D.equals(1027)){this.find(!0),D.preventDefault();return}}onInputChanged(){this._state.change({searchString:this.inputValue},!1);const D=this._findModel.findMatches;return!!(D&&D.length)}findIndex(D){this._findModel.find({index:D})}find(D){this._findModel.find({previous:D})}replaceOne(){if(!this._notebookEditor.hasModel()||!this._findModel.findMatches.length)return;this._findModel.ensureFindMatches(),this._findModel.currentMatch<0&&this._findModel.find({previous:!1});const D=this._findModel.getCurrentMatch(),y=D.cell;if(D.isModelMatch){const T=D.match;this._progressBar.infinite().show(h);const L=this.replacePattern.buildReplaceString(T.matches,this._state.preserveCase);this._notebookEditor._getViewModel().replaceOne(y,T.range,L).then(()=>{this._progressBar.stop()})}else console.error("Replace does not work for output match")}replaceAll(){if(!this._notebookEditor.hasModel())return;this._progressBar.infinite().show(h);const D=this.replacePattern,y=this._findModel.findMatches,T=[];y.forEach(L=>{L.matches.forEach((O,N)=>{if(N<L.modelMatchCount){const B=O.matches;T.push(D.buildReplaceString(B,this._state.preserveCase))}})}),this._notebookEditor._getViewModel().replaceAll(this._findModel.findMatches,T).then(()=>{this._progressBar.stop()})}findFirst(){}onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}onFocusTrackerBlur(){this._previousFocusElement=void 0,this._findWidgetFocused.reset()}onReplaceInputFocusTrackerFocus(){}onReplaceInputFocusTrackerBlur(){}onFindInputFocusTrackerFocus(){}onFindInputFocusTrackerBlur(){}async show(D,y){const T=this._state.searchString!==D;super.show(D,y),this._state.change({searchString:D??"",isRevealed:!0},!1),typeof y?.matchIndex=="number"?(this._findModel.findMatches.length||await this._findModel.research(),this.findIndex(y.matchIndex)):this._findInput.select(),!T&&y?.searchStringSeededFrom&&this._findModel.refreshCurrentMatch(y.searchStringSeededFrom),this._showTimeout===null&&(this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null,this._notebookEditor.removeClassName(a)),this._notebookEditor.addClassName(o),this._showTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(o),this._showTimeout=null},200))}replace(D,y){super.showWithReplace(D,y),this._state.change({searchString:D??"",replaceString:y??"",isRevealed:!0},!1),this._replaceInput.select(),this._showTimeout===null&&(this._hideTimeout!==null&&(window.clearTimeout(this._hideTimeout),this._hideTimeout=null,this._notebookEditor.removeClassName(a)),this._notebookEditor.addClassName(o),this._showTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(o),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(o)),this._notebookEditor.addClassName(a),this._hideTimeout=window.setTimeout(()=>{this._notebookEditor.removeClassName(a)},200)),this._previousFocusElement&&this._previousFocusElement.offsetParent&&(this._previousFocusElement.focus(),this._previousFocusElement=void 0),this._notebookEditor.hasModel())for(let D=0;D<this._notebookEditor.getLength();D++){const y=this._notebookEditor.cellAt(D);y.getEditState()===d.CellEditState.Editing&&y.editStateSource==="find"&&y.updateEditState(d.CellEditState.Preview,"find")}}_updateMatchesCount(){if(!this._findModel||!this._findModel.findMatches)return;this._matchesCount.style.minWidth=g+"px",this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let D;if(this._state.matchesCount>0){let y=String(this._state.matchesCount);this._state.matchesCount>=E.MATCHES_LIMIT&&(y+="+");const T=this._findModel.currentMatch<0?"?":String(this._findModel.currentMatch+1);D=k.format(b.NLS_MATCHES_LOCATION,T,y)}else D=b.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(D)),(0,p.alert)(this._getAriaLabel(D,this._state.currentMatch,this._state.searchString)),g=Math.max(g,this._matchesCount.clientWidth)}_getAriaLabel(D,y,T){return D===b.NLS_NO_RESULTS?T===""?(0,S.localize)(0,null,D):(0,S.localize)(1,null,D,T):(0,S.localize)(2,null,D,T)}dispose(){this._notebookEditor?.removeClassName(o),this._notebookEditor?.removeClassName(a),this._findModel.dispose(),super.dispose()}};m=we([F(1,i.IContextViewService),F(2,u.IContextKeyService),F(3,c.IThemeService),F(4,r.IConfigurationService),F(5,i.IContextMenuService),F(6,C.IMenuService),F(7,f.IInstantiationService)],m),e.NotebookFindWidget=m}),define(ae[2375],le([1,0,11,2,111,101,287,64,268,142]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let S=class extends p.Disposable{constructor(r,u,i){super(),this._notebookEditor=r,this._notebookService=u,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 r=0;r<this._notebookEditor.getLength();r++){const u=this._notebookEditor.cellAt(r);u?.cellKind===E.CellKind.Markup&&u?.getEditState()===A.CellEditState.Preview&&!u.isInputCollapsed||u?.cellKind===E.CellKind.Code&&this._renderCell(u)}}_warmupViewportNow(){if(this._notebookEditor.isDisposed||!this._notebookEditor.hasModel())return;const r=this._notebookEditor.getVisibleRangesPlusViewportAboveAndBelow();(0,I.cellRangesToIndexes)(r).forEach(u=>{const i=this._notebookEditor.cellAt(u);i?.cellKind===E.CellKind.Markup&&i?.getEditState()===A.CellEditState.Preview&&!i.isInputCollapsed?this._notebookEditor.createMarkupPreview(i):i?.cellKind===E.CellKind.Code&&this._renderCell(i)})}_renderCell(r){if(r.isOutputCollapsed)return;const u=r.outputsViewModels;for(const i of u){const[f,c]=i.resolveMimeTypes(this._notebookEditor.textModel,void 0);if(!f.find(n=>n.isTrusted)||f.length===0)continue;const l=f[c];if(!l||!this._notebookEditor.hasModel())return;const s=this._notebookService.getRendererInfo(l.rendererId);if(!s)return;const d={type:1,renderer:s,source:i,mimeType:l.mimeType};this._notebookEditor.createOutput(r,d,0)}}};S.id="workbench.notebook.viewportCustomMarkdown",S=we([F(1,b.INotebookService),F(2,R.IAccessibilityService)],S),(0,k.registerNotebookContribution)(S.id,S)}),define(ae[532],le([1,0,145,50,20,125,386,101,530,64,268]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.insertCellAtIndex=e.insertCell=e.computeCellLinesContents=e.joinCellsWithSurrounds=e.joinNotebookCells=e.copyCellRange=e.moveCellRange=e.runDeleteAction=e.changeCellToKind=void 0;async function C(o,g,h,v){const{notebookEditor:m}=g;if(!!m.hasModel()&&!m.isReadOnly){if(g.ui&&g.cell){const{cell:w}=g;if(w.cellKind===o)return;const D=w.getText(),y=m.getCellIndex(w);h===void 0&&(h=(m.activeKernel?.supportedLanguages??[])[0]??A.PLAINTEXT_LANGUAGE_ID),m.textModel.applyEdits([{editType:1,index:y,count:1,cells:[{cellKind:o,source:D,language:h,mime:v??w.mime,outputs:w.model.outputs,metadata:w.metadata}]}],!0,{kind:b.SelectionStateType.Index,focus:m.getFocus(),selections:m.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:m.getFocus(),selections:m.getSelections()}),void 0,!0);const T=m.cellAt(y);await m.focusNotebookCell(T,w.getEditState()===E.CellEditState.Editing?"editor":"container")}else if(g.selectedCells){const w=g.selectedCells,D=[];w.forEach(y=>{if(y.cellKind===o)return;const T=y.getText(),_=m.getCellIndex(y);h===void 0&&(h=(m.activeKernel?.supportedLanguages??[])[0]??A.PLAINTEXT_LANGUAGE_ID),D.push({editType:1,index:_,count:1,cells:[{cellKind:o,source:T,language:h,mime:v??y.mime,outputs:y.model.outputs,metadata:y.metadata}]})}),m.textModel.applyEdits(D,!0,{kind:b.SelectionStateType.Index,focus:m.getFocus(),selections:m.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:m.getFocus(),selections:m.getSelections()}),void 0,!0)}}}e.changeCellToKind=C;function r(o,g){const h=o.textModel,v=o.getSelections(),m=o.getCellIndex(g),w=v.find(y=>y.start<=m&&m<y.end),D=!o.isReadOnly||h.viewType==="interactive";if(w){const y=v.reverse().map(_=>({editType:1,index:_.start,count:_.end-_.start,cells:[]})),T=w.end>=o.getLength()?void 0:o.cellAt(w.end);h.applyEdits(y,!0,{kind:b.SelectionStateType.Index,focus:o.getFocus(),selections:o.getSelections()},()=>{if(T){const _=h.cells.findIndex(L=>L.handle===T.handle);return{kind:b.SelectionStateType.Index,focus:{start:_,end:_+1},selections:[{start:_,end:_+1}]}}else if(h.length){const _=h.length-1;return{kind:b.SelectionStateType.Index,focus:{start:_,end:_+1},selections:[{start:_,end:_+1}]}}else return{kind:b.SelectionStateType.Index,focus:{start:0,end:0},selections:[{start:0,end:0}]}},void 0,D)}else{const y=o.getFocus(),T=[{editType:1,index:m,count:1,cells:[]}],_=[];for(let L=0;L<v.length;L++){const M=v[L];M.end<=m?_.push(M):M.start>m?_.push({start:M.start-1,end:M.end-1}):_.push({start:m,end:m+1})}if(o.cellAt(y.start)===g){const L=y.end===h.length?{start:y.start-1,end:y.end-1}:y;h.applyEdits(T,!0,{kind:b.SelectionStateType.Index,focus:o.getFocus(),selections:o.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:L,selections:_}),void 0,D)}else{const L=y.start>m?{start:y.start-1,end:y.end-1}:y;h.applyEdits(T,!0,{kind:b.SelectionStateType.Index,focus:o.getFocus(),selections:o.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:L,selections:_}),void 0,D)}}}e.runDeleteAction=r;async function u(o,g){if(!o.notebookEditor.hasModel())return;const h=o.notebookEditor,v=h.textModel;if(h.isReadOnly)return;const m=h.getSelections(),D=(0,E.expandCellRangesWithHiddenCells)(h,m)[0];if(!(!D||D.start===D.end))if(g==="up"){if(D.start===0)return;const y=D.start-1,T={start:D.start-1,end:D.end-1},_=o.notebookEditor.getFocus(),L=(0,S.cellRangeContains)(D,_)?{start:_.start-1,end:_.end-1}:{start:D.start-1,end:D.start};v.applyEdits([{editType:6,index:y,length:1,newIdx:D.end-1}],!0,{kind:b.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:L,selections:[T]}),void 0,!0);const M=h.getSelections()[0]??h.getFocus();h.revealCellRangeInView(M)}else{if(D.end>=v.length)return;const y=D.end,T={start:D.start+1,end:D.end+1},_=h.getFocus(),L=(0,S.cellRangeContains)(D,_)?{start:_.start+1,end:_.end+1}:{start:D.start+1,end:D.start+2};v.applyEdits([{editType:6,index:y,length:1,newIdx:D.start}],!0,{kind:b.SelectionStateType.Index,focus:h.getFocus(),selections:h.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:L,selections:[T]}),void 0,!0);const M=h.getSelections()[0]??h.getFocus();h.revealCellRangeInView(M)}}e.moveCellRange=u;async function i(o,g){const h=o.notebookEditor;if(!h.hasModel())return;const v=h.textModel;if(h.isReadOnly)return;let m;if(o.ui){const w=o.cell,D=h.getCellIndex(w);m={start:D,end:D+1}}else{const w=h.getSelections();m=(0,E.expandCellRangesWithHiddenCells)(h,w)[0]}if(!(!m||m.start===m.end))if(g==="up"){const w=h.getFocus(),D=h.getSelections();v.applyEdits([{editType:1,index:m.end,count:0,cells:(0,S.cellRangesToIndexes)([m]).map(y=>(0,I.cloneNotebookCellTextModel)(h.cellAt(y).model))}],!0,{kind:b.SelectionStateType.Index,focus:w,selections:D},()=>({kind:b.SelectionStateType.Index,focus:w,selections:D}),void 0,!0)}else{const w=h.getFocus(),D=h.getSelections(),T=(0,S.cellRangesToIndexes)([m]).map(O=>(0,I.cloneNotebookCellTextModel)(h.cellAt(O).model)).length,_=o.ui?w:{start:w.start+T,end:w.end+T},L=o.ui?D:[{start:m.start+T,end:m.end+T}];v.applyEdits([{editType:1,index:m.end,count:0,cells:(0,S.cellRangesToIndexes)([m]).map(O=>(0,I.cloneNotebookCellTextModel)(h.cellAt(O).model))}],!0,{kind:b.SelectionStateType.Index,focus:w,selections:D},()=>({kind:b.SelectionStateType.Index,focus:_,selections:L}),void 0,!0);const M=h.getSelections()[0]??h.getFocus();h.revealCellRangeInView(M)}}e.copyCellRange=i;async function f(o,g,h,v){if(o.isReadOnly)return null;const m=o.textModel,w=o.getCellsInRange(g);if(!w.length||g.start===0&&h==="above"||g.end===m.length&&h==="below")return null;for(let D=0;D<w.length;D++){const y=w[D];if(v&&y.cellKind!==v)return null}if(h==="above"){const D=o.cellAt(g.start-1);if(v&&D.cellKind!==v)return null;const y=w.map(L=>(L.textBuffer.getEOL()??"")+L.getText()).join(""),T=D.textBuffer.getLineCount(),_=D.textBuffer.getLineLength(T);return{edits:[new t.ResourceTextEdit(D.uri,{range:new R.Range(T,_+1,T,_+1),text:y}),new k.ResourceNotebookCellEdit(m.uri,{editType:1,index:g.start,count:g.end-g.start,cells:[]})],cell:D,endFocus:{start:g.start-1,end:g.start},endSelections:[{start:g.start-1,end:g.start}]}}else{const D=o.cellAt(g.end);if(v&&D.cellKind!==v)return null;const y=w[0],_=[...w.slice(1),D].map(O=>(O.textBuffer.getEOL()??"")+O.getText()).join(""),L=y.textBuffer.getLineCount(),M=y.textBuffer.getLineLength(L);return{edits:[new t.ResourceTextEdit(y.uri,{range:new R.Range(L,M+1,L,M+1),text:_}),new k.ResourceNotebookCellEdit(m.uri,{editType:1,index:g.start+1,count:g.end-g.start,cells:[]})],cell:y,endFocus:{start:g.start,end:g.start+1},endSelections:[{start:g.start,end:g.start+1}]}}}e.joinNotebookCells=f;async function c(o,g,h){const v=g.notebookEditor,m=v.textModel,w=v._getViewModel();let D=null;if(g.ui){const y=g.cell.focusMode,T=v.getCellIndex(g.cell);if(D=await f(v,{start:T,end:T+1},h),!D)return;await o.apply(D?.edits,{quotableLabel:"Join Notebook Cells"}),w.updateSelectionsState({kind:b.SelectionStateType.Index,focus:D.endFocus,selections:D.endSelections}),D.cell.updateEditState(E.CellEditState.Editing,"joinCellsWithSurrounds"),v.revealCellRangeInView(v.getFocus()),y===E.CellFocusMode.Editor&&(D.cell.focusMode=E.CellFocusMode.Editor)}else{const y=v.getSelections();if(!y.length)return;const T=v.getFocus(),_=v.cellAt(T.start)?.focusMode,L=[];let M=null;const O=[];for(let P=y.length-1;P>=0;P--){const B=y[P],V=(0,S.cellRangeContains)(B,T);if(B.end>=m.length&&h==="below"||B.start===0&&h==="above"){V&&(M=v.cellAt(T.start)),O.push(...v.getCellsInRange(B));continue}const z=await f(v,B,h);if(!z)return;L.push(...z.edits),O.push(z.cell),V&&(M=z.cell)}if(!L.length||!M||!O.length)return;await o.apply(L,{quotableLabel:"Join Notebook Cells"}),O.forEach(P=>{P.updateEditState(E.CellEditState.Editing,"joinCellsWithSurrounds")}),w.updateSelectionsState({kind:b.SelectionStateType.Handle,primary:M.handle,selections:O.map(P=>P.handle)}),v.revealCellRangeInView(v.getFocus());const N=v.cellAt(v.getFocus().start);_===E.CellFocusMode.Editor&&N&&(N.focusMode=E.CellFocusMode.Editor)}}e.joinCellsWithSurrounds=c;function l(o,g){const h=[],v=g.getLineCount(),m=y=>g.getLineLength(y);o=o.sort((y,T)=>{const _=y.lineNumber-T.lineNumber,L=y.column-T.column;return _!==0?_:L});for(let y of o)m(y.lineNumber)+1===y.column&&y.column!==1&&y.lineNumber<v&&(y=new p.Position(y.lineNumber+1,1)),s(h,y);if(h.length===0)return null;const w=new p.Position(1,1),D=new p.Position(v,m(v)+1);return[w,...h,D]}function s(o,g){const h=o.length>0?o[o.length-1]:void 0;(!h||h.lineNumber!==g.lineNumber||h.column!==g.column)&&o.push(g)}function d(o,g){const h=l(g,o.textBuffer);if(!h)return null;const v=[];for(let m=1;m<h.length;m++){const w=h[m-1],D=h[m];v.push(o.textBuffer.getValueInRange(new R.Range(w.lineNumber,w.column,D.lineNumber,D.column),0))}return v}e.computeCellLinesContents=d;function n(o,g,h,v,m="above",w="",D=!1){const y=g._getViewModel(),T=g.activeKernel;if(y.options.isReadOnly)return null;const _=g.cellAt(h),L=D?y.getNextVisibleCellIndex(h):h+1;let M;if(v===b.CellKind.Code){const N=T?.supportedLanguages??o.getRegisteredLanguageIds(),P=N[0]||A.PLAINTEXT_LANGUAGE_ID;if(_?.cellKind===b.CellKind.Code)M=_.language;else if(_?.cellKind===b.CellKind.Markup){const B=y.nearestCodeCellIndex(h);B>-1?M=y.cellAt(B).language:M=P}else _===void 0&&m==="above"?M=y.viewCells.find(B=>B.cellKind===b.CellKind.Code)?.language||P:M=P;N.includes(M)||(M=P)}else M="markdown";return a(y,_?m==="above"?h:L:h,w,M,v,void 0,[],!0,!0)}e.insertCell=n;function a(o,g,h,v,m,w,D,y,T){const _={kind:b.SelectionStateType.Index,focus:{start:g,end:g+1},selections:[{start:g,end:g+1}]};return o.notebookDocument.applyEdits([{editType:1,index:g,count:0,cells:[{cellKind:m,language:v,mime:void 0,outputs:D,metadata:w,source:h}]}],y,{kind:b.SelectionStateType.Index,focus:o.getFocus(),selections:o.getSelections()},()=>_,void 0,T&&!o.options.isReadOnly),o.cellAt(g)}e.insertCellAtIndex=a}),define(ae[533],le([1,0,6,2,384,101,377,108,321,868]),function(J,e,t,p,R,A,k,E,I,b){"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 S;(function(n){n[n.Expanded=0]="Expanded",n[n.Collapsed=1]="Collapsed"})(S=e.PropertyFoldingState||(e.PropertyFoldingState={})),e.OUTPUT_EDITOR_HEIGHT_MAGIC=1440;class C extends p.Disposable{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}constructor(a,o,g,h,v,m){super(),this.mainDocumentTextModel=a,this.original=o,this.modified=g,this.type=h,this.editorEventDispatcher=v,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=S.Collapsed,this.outputFoldingState=S.Collapsed,this._register(this.editorEventDispatcher.onDidChangeLayout(w=>{this._layoutInfoEmitter.fire({outerWidth:!0})}))}layoutChange(){this._layout({recomputeOutput:!0})}_layout(a){const o=a.width!==void 0?a.width:this._layoutInfo.width,g=a.editorHeight!==void 0?a.editorHeight:this._layoutInfo.editorHeight,h=a.editorMargin!==void 0?a.editorMargin:this._layoutInfo.editorMargin,v=a.metadataHeight!==void 0?a.metadataHeight:this._layoutInfo.metadataHeight,m=a.metadataStatusHeight!==void 0?a.metadataStatusHeight:this._layoutInfo.metadataStatusHeight,w=a.rawOutputHeight!==void 0?a.rawOutputHeight:this._layoutInfo.rawOutputHeight,D=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,_=a.recomputeOutput||a.rawOutputHeight!==void 0||a.outputMetadataHeight!==void 0?this._getOutputTotalHeight(w,T):this._layoutInfo.outputTotalHeight,L=g+h+v+m+_+D+y,M={width:o,editorHeight:g,editorMargin:h,metadataHeight:v,metadataStatusHeight:m,outputTotalHeight:_,outputStatusHeight:D,bodyMargin:y,rawOutputHeight:w,outputMetadataHeight:T,totalHeight:L,layoutState:A.CellLayoutState.Measured},O={};M.width!==this._layoutInfo.width&&(O.width=!0),M.editorHeight!==this._layoutInfo.editorHeight&&(O.editorHeight=!0),M.editorMargin!==this._layoutInfo.editorMargin&&(O.editorMargin=!0),M.metadataHeight!==this._layoutInfo.metadataHeight&&(O.metadataHeight=!0),M.metadataStatusHeight!==this._layoutInfo.metadataStatusHeight&&(O.metadataStatusHeight=!0),M.outputTotalHeight!==this._layoutInfo.outputTotalHeight&&(O.outputTotalHeight=!0),M.outputStatusHeight!==this._layoutInfo.outputStatusHeight&&(O.outputStatusHeight=!0),M.bodyMargin!==this._layoutInfo.bodyMargin&&(O.bodyMargin=!0),M.outputMetadataHeight!==this._layoutInfo.outputMetadataHeight&&(O.outputMetadataHeight=!0),M.totalHeight!==this._layoutInfo.totalHeight&&(O.totalHeight=!0),this._layoutInfo=M,this._fireLayoutChangeEvent(O)}getHeight(a){if(this._layoutInfo.layoutState===A.CellLayoutState.Uninitialized){const o=this.estimateEditorHeight(a);return this._computeTotalHeight(o)}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){return Math.max(this.original?.textModel.textBuffer.getLineCount()??1,this.modified?.textModel.textBuffer.getLineCount()??1)*a+24+12+0}_getOutputTotalHeight(a,o){return this.outputFoldingState===S.Collapsed?0:this.renderOutput?this.isOutputEmpty()?24:this.getRichOutputTotalHeight()+o:a}_fireLayoutChangeEvent(a){this._layoutInfoEmitter.fire(a),this.editorEventDispatcher.emit([{type:b.NotebookDiffViewEventType.CellLayoutChanged,source:this._layoutInfo}])}getComputedCellContainerWidth(a,o,g){return g?a.width-2*R.DIFF_CELL_MARGIN+(o?k.DiffEditorWidget.ENTIRE_DIFF_OVERVIEW_WIDTH:0)-2:(a.width-2*R.DIFF_CELL_MARGIN+(o?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 r extends C{get originalDocument(){return this.otherDocumentTextModel}get modifiedDocument(){return this.mainDocumentTextModel}constructor(a,o,g,h,v,m,w){super(a,g,h,v,m,w),this.otherDocumentTextModel=o,this.original=g,this.modified=h,this.type=v,this.metadataFoldingState=S.Collapsed,this.outputFoldingState=S.Collapsed,this.checkMetadataIfModified()&&(this.metadataFoldingState=S.Expanded),this.checkIfOutputsModified()&&(this.outputFoldingState=S.Expanded),this._register(this.original.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})})),this._register(this.modified.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})})),this._register(this.modified.textModel.onDidChangeContent(()=>{if(a.transientOptions.cellContentMetadata){const D=[...Object.keys(a.transientOptions.cellContentMetadata)],y=Object.assign({},this.modified.metadata),T=this.original.metadata;for(const _ of D)y[_]=T[_];this.modified.textModel.metadata=y}}))}checkIfOutputsModified(){if(this.mainDocumentTextModel.transientOptions.transientOutputs)return!1;const a=c(this.original?.outputs??[],this.modified?.outputs??[]);return a===0?!1:{reason:a===1?"Output metadata is changed":void 0,kind:a}}checkMetadataIfModified(){return(0,E.hash)(l(this.mainDocumentTextModel,this.original?.metadata||{},this.original?.language))!==(0,E.hash)(l(this.mainDocumentTextModel,this.modified?.metadata??{},this.modified?.language))?{reason:void 0}:!1}updateOutputHeight(a,o,g){a===R.DiffSide.Original?this.original.updateOutputHeight(o,g):this.modified.updateOutputHeight(o,g)}getOutputOffsetInContainer(a,o){return a===R.DiffSide.Original?this.original.getOutputOffset(o):this.modified.getOutputOffset(o)}getOutputOffsetInCell(a,o){const g=this.getOutputOffsetInContainer(a,o);return this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin/2+g}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===R.DiffSide.Original?this.original:this.modified}getCellByUri(a){return a.toString()===this.original.uri.toString()?this.original:this.modified}}e.SideBySideDiffElementViewModel=r;class u extends C{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}constructor(a,o,g,h,v,m,w){super(a,g,h,v,m,w),this.otherDocumentTextModel=o,this.type=v,this._register(this.cellViewModel.onDidChangeOutputLayout(()=>{this._layout({recomputeOutput:!0})}))}getNestedCellViewModel(a){return this.type==="insert"?this.modified:this.original}checkIfOutputsModified(){return!1}checkMetadataIfModified(){return!1}updateOutputHeight(a,o,g){this.cellViewModel?.updateOutputHeight(o,g)}getOutputOffsetInContainer(a,o){return this.cellViewModel.getOutputOffset(o)}getOutputOffsetInCell(a,o){const g=this.cellViewModel.getOutputOffset(o);return this._layoutInfo.editorHeight+this._layoutInfo.editorMargin+this._layoutInfo.metadataHeight+this._layoutInfo.metadataStatusHeight+this._layoutInfo.outputStatusHeight+this._layoutInfo.bodyMargin/2+g}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=u;var i;(function(n){n[n.Unchanged=0]="Unchanged",n[n.Metadata=1]="Metadata",n[n.Other=2]="Other"})(i=e.OutputComparison||(e.OutputComparison={}));function f(n,a){if((0,E.hash)(n.metadata)===(0,E.hash)(a.metadata))return 2;for(let o=0;o<n.outputs.length;o++){const g=n.outputs[o],h=a.outputs[o];if(g.mime!==h.mime||g.data.buffer.length!==h.data.buffer.length)return 2;for(let v=0;v<g.data.buffer.length;v++)if(g.data.buffer[v]!==h.data.buffer[v])return 2}return 1}e.outputEqual=f;function c(n,a){if(n.length!==a.length)return 2;const o=n.length;for(let g=0;g<o;g++){const h=n[g],v=a[g];if((0,E.hash)(h.metadata)!==(0,E.hash)(v.metadata))return 1;if(h.outputs.length!==v.outputs.length)return 2;for(let m=0;m<h.outputs.length;m++){const w=h.outputs[m],D=v.outputs[m];if(w.mime!==D.mime||w.data.buffer.length!==D.data.buffer.length)return 2;for(let y=0;y<w.data.buffer.length;y++)if(w.data.buffer[y]!==D.data.buffer[y])return 2}}return 0}function l(n,a,o){let g={};if(n){const m=n.transientOptions.transientCellMetadata,w=new Set([...Object.keys(a)]);for(const D of w)m[D]||(g[D]=a[D])}else g=a;const h={language:o,...g};return(0,I.toFormattedString)(h,{})}e.getFormattedMetadataJSON=l;function s(n){if(!n.length)return null;const o=n[0].mime;return n.find(h=>h.mime!==o)?null:n.map(h=>h.data.toString()).join("")}e.getStreamOutputData=s;function d(n){if(n.length===1){const a=s(n[0].outputs);if(a)return a}return JSON.stringify(n.map(a=>({metadata:a.metadata,outputItems:a.outputs.map(o=>({mimeType:o.mime,data:o.data.toString()}))})),void 0," ")}e.getFormattedOutputJSON=d}),define(ae[2376],le([1,0,10,1769,2,41,533,384,142,12,215,90,48]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputContainer=e.OutputElement=void 0;class u extends R.Disposable{constructor(c,l,s,d,n,a,o,g,h){super(),this._notebookEditor=c,this._notebookTextModel=l,this._notebookService=s,this._quickInputService=d,this._diffElementViewModel=n,this._diffSide=a,this._nestedCell=o,this._outputContainer=g,this.output=h,this.resizeListener=this._register(new R.DisposableStore)}render(c,l){const s=document.createElement("div");let d;const[n,a]=this.output.resolveMimeTypes(this._notebookTextModel,void 0),o=n[a];if(n.length>1){s.style.position="relative";const h=t.$(".multi-mimetype-output");h.classList.add(...b.ThemeIcon.asClassNameArray(S.mimetypeIcon)),h.tabIndex=0,h.title=p.localize(0,null,n.map(v=>v.mimeType).join(", ")),s.appendChild(h),this.resizeListener.add(t.addStandardDisposableListener(h,"mousedown",async v=>{v.leftButton&&(v.preventDefault(),v.stopPropagation(),await this.pickActiveMimeTypeRenderer(this._notebookTextModel,this.output))})),this.resizeListener.add(t.addDisposableListener(h,t.EventType.KEY_DOWN,async v=>{const m=new C.StandardKeyboardEvent(v);(m.equals(3)||m.equals(10))&&(v.preventDefault(),v.stopPropagation(),await this.pickActiveMimeTypeRenderer(this._notebookTextModel,this.output))}))}const g=t.$(".output-inner-container");if(t.append(s,g),n.length!==0){const h=this._notebookService.getRendererInfo(o.rendererId);d=h?{type:1,renderer:h,source:this.output,mimeType:o.mimeType}:this._renderMissingRenderer(this.output,o.mimeType),this.output.pickedMimeType=o}this.domNode=s,this.renderResult=d,d&&(l?this._outputContainer.insertBefore(s,l):this._outputContainer.appendChild(s),this._notebookEditor.createOutput(this._diffElementViewModel,this._nestedCell,d,()=>this.getOutputOffsetInCell(c),this._diffElementViewModel instanceof k.SideBySideDiffElementViewModel?this._diffSide:this._diffElementViewModel.type==="insert"?E.DiffSide.Modified:E.DiffSide.Original))}_renderMissingRenderer(c,l){if(!c.model.outputs.length)return this._renderMessage(c,p.localize(1,null));if(!l){const d=c.model.outputs.map(n=>n.mime).join(", ");return this._renderMessage(c,p.localize(2,null,d))}return this._renderSearchForMimetype(c,l)}_renderSearchForMimetype(c,l){const s=`@tag:notebookRenderer ${l}`;return{type:0,source:c,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${s}%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(c,l){return{type:0,source:c,htmlContent:`<p>${l}</p>`}}async pickActiveMimeTypeRenderer(c,l){const[s,d]=l.resolveMimeTypes(c,void 0),n=s.filter(g=>g.isTrusted).map((g,h)=>({label:g.mimeType,id:g.mimeType,index:h,picked:h===d,detail:this.generateRendererInfo(g.rendererId),description:h===d?p.localize(3,null):void 0})),a=this._quickInputService.createQuickPick();a.items=n,a.activeItems=n.filter(g=>!!g.picked),a.placeholder=n.length!==s.length?p.localize(4,null):p.localize(5,null);const o=await new Promise(g=>{a.onDidAccept(()=>{g(a.selectedItems.length===1?a.selectedItems[0].index:void 0),a.dispose()}),a.show()});if(o!==void 0&&o!==d){const g=this._nestedCell.outputsViewModels.indexOf(l),h=this.domNode.nextElementSibling;this.resizeListener.clear();const v=this.domNode;v&&(v.parentElement?.removeChild(v),this._notebookEditor.removeInset(this._diffElementViewModel,this._nestedCell,l,this._diffSide)),l.pickedMimeType=s[o],this.render(g,h)}}generateRendererInfo(c){const l=this._notebookService.getRendererInfo(c);return l?`${l.displayName!==""?l.displayName:l.id} (${l.extensionId.value})`:p.localize(6,null)}getCellOutputCurrentIndex(){return this._diffElementViewModel.getNestedCellViewModel(this._diffSide).outputs.indexOf(this.output.model)}updateHeight(c,l){this._diffElementViewModel.updateOutputHeight(this._diffSide,c,l)}getOutputOffsetInContainer(c){return this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide,c)}getOutputOffsetInCell(c){return this._diffElementViewModel.getOutputOffsetInCell(this._diffSide,c)}}e.OutputElement=u;let i=class extends R.Disposable{constructor(c,l,s,d,n,a,o,g,h){super(),this._editor=c,this._notebookTextModel=l,this._diffElementViewModel=s,this._nestedCellViewModel=d,this._diffSide=n,this._outputContainer=a,this._notebookService=o,this._quickInputService=g,this._openerService=h,this._outputEntries=new Map,this._register(this._diffElementViewModel.onDidLayoutChange(()=>{this._outputEntries.forEach((v,m)=>{const w=d.outputs.indexOf(m.model);if(w>=0){const D=this._diffElementViewModel.getOutputOffsetInContainer(this._diffSide,w);v.domNode.style.top=`${D}px`}})})),this._register(this._nestedCellViewModel.textModel.onDidChangeOutputs(v=>{this._updateOutputs(v)}))}_updateOutputs(c){const l=[];this._outputEntries.forEach((n,a)=>{this._nestedCellViewModel.outputsViewModels.indexOf(a)<0&&(l.push(a),this._outputContainer.removeChild(n.domNode),this._editor.removeInset(this._diffElementViewModel,this._nestedCellViewModel,a,this._diffSide))}),l.forEach(n=>{this._outputEntries.get(n)?.dispose(),this._outputEntries.delete(n)});let s;this._nestedCellViewModel.outputsViewModels.reverse().forEach(n=>{if(this._outputEntries.has(n)){s=this._outputEntries.get(n).domNode;return}const a=this._nestedCellViewModel.outputsViewModels.indexOf(n);this._renderOutput(n,a,s),s=this._outputEntries.get(n)?.domNode})}render(){for(let c=0;c<this._nestedCellViewModel.outputsViewModels.length;c++){const l=this._nestedCellViewModel.outputsViewModels[c];this._renderOutput(l,c,void 0)}}showOutputs(){for(let c=0;c<this._nestedCellViewModel.outputsViewModels.length;c++){const l=this._nestedCellViewModel.outputsViewModels[c];this._editor.showInset(this._diffElementViewModel,l.cellViewModel,l,this._diffSide)}}hideOutputs(){this._outputEntries.forEach((c,l)=>{this._editor.hideInset(this._diffElementViewModel,this._nestedCellViewModel,l)})}_renderOutput(c,l,s){this._outputEntries.has(c)||this._outputEntries.set(c,new u(this._editor,this._notebookTextModel,this._notebookService,this._quickInputService,this._diffElementViewModel,this._diffSide,this._nestedCellViewModel,this._outputContainer,c)),this._outputEntries.get(c).render(l,s)}};i=we([F(6,I.INotebookService),F(7,r.IQuickInputService),F(8,A.IOpenerService)],i),e.OutputContainer=i}),define(ae[875],le([1,0,10,11,2,14,101,175,530,64,268]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performCellDropEdits=e.CellDragAndDropController=e.CellDragAndDropPart=void 0;const C=t.$,r="cell-dragging",u="global-drag-active";class i extends E.CellPart{constructor(s){super(),this.container=s}didRenderCell(s){this.update(s)}updateState(s,d){d.dragStateChanged&&this.update(s)}update(s){this.container.classList.toggle(r,s.dragging)}}e.CellDragAndDropPart=i;class f extends R.Disposable{constructor(s,d){super(),this.notebookEditor=s,this.notebookListContainer=d,this.draggedCells=[],this.isScrolling=!1,this.listOnWillScrollListener=this._register(new R.MutableDisposable),this.listInsertionIndicator=t.append(d,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 n=(a,o,g=!1)=>{this._register(t.addDisposableListener(s.getDomNode(),a,h=>{const v=this.toCellDragEvent(h);v&&o(v)},g))};n(t.EventType.DRAG_OVER,a=>{!this.currentDraggedCell||(a.browserEvent.preventDefault(),this.onCellDragover(a))},!0),n(t.EventType.DROP,a=>{!this.currentDraggedCell||(a.browserEvent.preventDefault(),this.onCellDrop(a))}),n(t.EventType.DRAG_LEAVE,a=>{a.browserEvent.preventDefault(),this.onCellDragLeave(a)}),this.scrollingDelayer=this._register(new p.Delayer(200))}setList(s){this.list=s,this.listOnWillScrollListener.value=this.list.onWillScroll(d=>{!d.scrollTopChanged||(this.setInsertIndicatorVisibility(!1),this.isScrolling=!0,this.scrollingDelayer.trigger(()=>{this.isScrolling=!1}))})}setInsertIndicatorVisibility(s){this.listInsertionIndicator.style.opacity=s?"1":"0"}toCellDragEvent(s){const d=this.notebookListContainer.getBoundingClientRect().top,n=this.list.scrollTop+s.clientY-d,a=this.list.elementAt(n);if(!a)return;const o=this.list.getAbsoluteTopOfElement(a),g=this.list.elementHeight(a),v=(n-o)/g;return{browserEvent:s,draggedOverCell:a,cellTop:o,cellHeight:g,dragPosRatio:v}}clearGlobalDragState(){this.notebookEditor.getDomNode().classList.remove(u)}onGlobalDragStart(){this.notebookEditor.getDomNode().classList.add(u)}onGlobalDragEnd(){this.notebookEditor.getDomNode().classList.remove(u)}onCellDragover(s){if(!s.browserEvent.dataTransfer)return;if(!this.currentDraggedCell){s.browserEvent.dataTransfer.dropEffect="none";return}if(this.isScrolling||this.currentDraggedCell===s.draggedOverCell){this.setInsertIndicatorVisibility(!1);return}const d=this.getDropInsertDirection(s.dragPosRatio),n=d==="above"?s.cellTop:s.cellTop+s.cellHeight;this.updateInsertIndicator(d,n)}updateInsertIndicator(s,d){const{bottomToolbarGap:n}=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),a=d-this.list.scrollTop+n/2;a>=0?(this.listInsertionIndicator.style.top=`${a}px`,this.setInsertIndicatorVisibility(!0)):this.setInsertIndicatorVisibility(!1)}getDropInsertDirection(s){return s<.5?"above":"below"}onCellDrop(s){const d=this.currentDraggedCell;if(this.isScrolling||this.currentDraggedCell===s.draggedOverCell)return;this.dragCleanup();const n=this.getDropInsertDirection(s.dragPosRatio);this._dropImpl(d,n,s.browserEvent,s.draggedOverCell)}getCellRangeAroundDragTarget(s){const d=this.notebookEditor.getSelections(),a=(0,k.expandCellRangesWithHiddenCells)(this.notebookEditor,d).find(o=>o.start<=s&&s<o.end);return a||{start:s,end:s+1}}_dropImpl(s,d,n,a){const o=this.list.getAbsoluteTopOfElement(a),g=this.list.elementHeight(a),h=d==="above"?o:o+g,{bottomToolbarGap:v}=this.notebookEditor.notebookOptions.computeBottomToolbarDimensions(this.notebookEditor.textModel?.viewType),m=h-this.list.scrollTop+v/2,w=this.notebookEditor.getDomNode().getBoundingClientRect().height;if(m<0||m>w)return;const D=n.ctrlKey&&!A.isMacintosh||n.altKey&&A.isMacintosh;if(!this.notebookEditor.hasModel())return;const y=this.notebookEditor.textModel;if(D){const T=this.notebookEditor.getCellIndex(s),_=this.getCellRangeAroundDragTarget(T);let L=this.notebookEditor.getCellIndex(a);if(d==="below"){const N=this.notebookEditor.getCellIndex(a);L=this.notebookEditor.getNextVisibleCellIndex(N)}let M,O;if(L<=_.start)M={start:L,end:L+_.end-_.start},O={start:L+T-_.start,end:L+T-_.start+1};else{const N=L-_.start;M={start:_.start+N,end:_.end+N},O={start:T+N,end:T+N+1}}y.applyEdits([{editType:1,index:L,count:0,cells:(0,S.cellRangesToIndexes)([_]).map(N=>(0,I.cloneNotebookCellTextModel)(this.notebookEditor.cellAt(N).model))}],!0,{kind:b.SelectionStateType.Index,focus:this.notebookEditor.getFocus(),selections:this.notebookEditor.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:O,selections:[M]}),void 0,!0),this.notebookEditor.revealCellRangeInView(M)}else c(this.notebookEditor,s,d,a)}onCellDragLeave(s){(!s.browserEvent.relatedTarget||!t.isAncestor(s.browserEvent.relatedTarget,this.notebookEditor.getDomNode()))&&this.setInsertIndicatorVisibility(!1)}dragCleanup(){this.currentDraggedCell&&(this.draggedCells.forEach(s=>s.dragging=!1),this.currentDraggedCell=void 0,this.draggedCells=[]),this.setInsertIndicatorVisibility(!1)}registerDragHandle(s,d,n,a){const o=s.container;for(const v of n)v.setAttribute("draggable","true");const g=()=>{!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly||(o.classList.remove(r),this.dragCleanup())};for(const v of n)s.templateDisposables.add(t.addDisposableListener(v,t.EventType.DRAG_END,g));const h=v=>{if(!v.dataTransfer||!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly)return;this.currentDraggedCell=s.currentRenderedCell,this.draggedCells=this.notebookEditor.getSelections().map(w=>this.notebookEditor.getCellsInRange(w)).flat(),this.draggedCells.forEach(w=>w.dragging=!0);const m=a();d.parentElement.appendChild(m),v.dataTransfer.setDragImage(m,0,0),setTimeout(()=>d.parentElement.removeChild(m),0)};for(const v of n)s.templateDisposables.add(t.addDisposableListener(v,t.EventType.DRAG_START,h))}startExplicitDrag(s,d){!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly||(this.currentDraggedCell=s,this.setInsertIndicatorVisibility(!0))}explicitDrag(s,d){if(!this.notebookEditor.notebookOptions.getLayoutConfiguration().dragAndDropEnabled||!!this.notebookEditor.isReadOnly)return;const n=this.list.elementAt(d);if(n&&n!==s){const m=this.list.getAbsoluteTopOfElement(n),w=this.list.elementHeight(n),D=this.getExplicitDragDropDirection(d,m,w),y=D==="above"?m:m+w;this.updateInsertIndicator(D,y)}if(this.currentDraggedCell!==s)return;const a=this.notebookEditor.getDomNode().getBoundingClientRect(),o=d-this.list.scrollTop,g=.2,h=20,v=o/a.height;v<g?this.list.scrollTop-=h*(1-v/g):v>1-g&&(this.list.scrollTop+=h*(1-(1-v)/g))}endExplicitDrag(s){this.setInsertIndicatorVisibility(!1)}explicitDrop(s,d){this.currentDraggedCell=void 0,this.setInsertIndicatorVisibility(!1);const n=this.list.elementAt(d.dragOffsetY);if(!n||n===s)return;const a=this.list.getAbsoluteTopOfElement(n),o=this.list.elementHeight(n),g=this.getExplicitDragDropDirection(d.dragOffsetY,a,o);this._dropImpl(s,g,d,n)}getExplicitDragDropDirection(s,d,n){const o=(s-d)/n;return this.getDropInsertDirection(o)}dispose(){this.notebookEditor=null,super.dispose()}}e.CellDragAndDropController=f;function c(l,s,d,n){const a=l.getCellIndex(s);let o=l.getCellIndex(n);if(typeof a!="number"||typeof o!="number")return;d==="below"&&(o=l.getNextVisibleCellIndex(o)??o);let g=l.getSelections();g.length||(g=[l.getFocus()]);let h=l.getFocus().start;g.some(M=>M.start<=a&&M.end>a)||(g=[{start:a,end:a+1}],h=a);const v=g.find(M=>M.start<=o&&M.end>o);v&&(o=v.start);let m=0,w=o,D=o;g.sort((M,O)=>O.start-M.start);const y=g.map(M=>{const O=M.end-M.start;let N=0;M.end<=D&&(N=-O);const P=D+N;if(h>=M.start&&h<=M.end){const z=h-M.start;w=P+z}const B=M.start>=o?m:0,V={editType:6,index:M.start+B,length:O,newIdx:P};return m+=O,M.end<D&&(D-=O),V}),T=y[y.length-1],_={start:T.newIdx,end:T.newIdx+m},L={start:w,end:w+1};l.textModel.applyEdits(y,!0,{kind:b.SelectionStateType.Index,focus:l.getFocus(),selections:l.getSelections()},()=>({kind:b.SelectionStateType.Index,focus:L,selections:[_]}),void 0,!0),l.revealCellRangeInView(_)}e.performCellDropEdits=c}),define(ae[2377],le([1,0,10,29,1784,38,101,175]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollapsedCellOutput=void 0;const I=t.$;let b=class extends E.CellPart{constructor(C,r,u){super(),this.notebookEditor=C;const i=t.append(r,I("span.expandOutputPlaceholder"));i.textContent=(0,R.localize)(0,null);const f=t.append(r,I("span.expandOutputIcon"));f.classList.add(...p.CSSIcon.asClassNameArray(p.Codicon.more));const c=u.lookupKeybinding(k.EXPAND_CELL_OUTPUT_COMMAND_ID);c&&(i.title=(0,R.localize)(1,null,c.getLabel()),r.title=(0,R.localize)(2,null,c.getLabel())),t.hide(r),this._register(t.addDisposableListener(f,t.EventType.CLICK,()=>this.expand())),this._register(t.addDisposableListener(r,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)}};b=we([F(2,A.IKeybindingService)],b),e.CollapsedCellOutput=b}),define(ae[876],le([1,0,5]),function(J,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(ae[2378],le([1,0,6]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineViewState=e.OutlineSortOrder=void 0;var p;(function(A){A[A.ByPosition=0]="ByPosition",A[A.ByName=1]="ByName",A[A.ByKind=2]="ByKind"})(p=e.OutlineSortOrder||(e.OutlineSortOrder={}));class R{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){const E=k.get("outline/state",1);if(!E)return;let I;try{I=JSON.parse(E)}catch{return}this.followCursor=I.followCursor,this.sortBy=I.sortBy??0,typeof I.filterOnType=="boolean"&&(this.filterOnType=I.filterOnType)}}e.OutlineViewState=R}),define(ae[340],le([1,0,29,1805,63]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.preferencesOpenSettingsIcon=e.preferencesFilterIcon=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,R.registerIcon)("settings-group-expanded",t.Codicon.chevronDown,(0,p.localize)(0,null)),e.settingsGroupCollapsedIcon=(0,R.registerIcon)("settings-group-collapsed",t.Codicon.chevronRight,(0,p.localize)(1,null)),e.settingsScopeDropDownIcon=(0,R.registerIcon)("settings-folder-dropdown",t.Codicon.triangleDown,(0,p.localize)(2,null)),e.settingsMoreActionIcon=(0,R.registerIcon)("settings-more-action",t.Codicon.gear,(0,p.localize)(3,null)),e.keybindingsRecordKeysIcon=(0,R.registerIcon)("keybindings-record-keys",t.Codicon.recordKeys,(0,p.localize)(4,null)),e.keybindingsSortIcon=(0,R.registerIcon)("keybindings-sort",t.Codicon.sortPrecedence,(0,p.localize)(5,null)),e.keybindingsEditIcon=(0,R.registerIcon)("keybindings-edit",t.Codicon.edit,(0,p.localize)(6,null)),e.keybindingsAddIcon=(0,R.registerIcon)("keybindings-add",t.Codicon.add,(0,p.localize)(7,null)),e.settingsEditIcon=(0,R.registerIcon)("settings-edit",t.Codicon.edit,(0,p.localize)(8,null)),e.settingsAddIcon=(0,R.registerIcon)("settings-add",t.Codicon.add,(0,p.localize)(9,null)),e.settingsRemoveIcon=(0,R.registerIcon)("settings-remove",t.Codicon.close,(0,p.localize)(10,null)),e.settingsDiscardIcon=(0,R.registerIcon)("settings-discard",t.Codicon.discard,(0,p.localize)(11,null)),e.preferencesClearInputIcon=(0,R.registerIcon)("preferences-clear-input",t.Codicon.clearAll,(0,p.localize)(12,null)),e.preferencesFilterIcon=(0,R.registerIcon)("preferences-filter",t.Codicon.filter,(0,p.localize)(13,null)),e.preferencesOpenSettingsIcon=(0,R.registerIcon)("preferences-open-settings",t.Codicon.goToFile,(0,p.localize)(14,null))}),define(ae[877],le([1,0,1810]),function(J,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:"features/mergeEditor",label:(0,t.localize)(35,null),settings:["mergeEditor.*"]}]},{id:"application",label:(0,t.localize)(36,null),children:[{id:"application/http",label:(0,t.localize)(37,null),settings:["http.*"]},{id:"application/keyboard",label:(0,t.localize)(38,null),settings:["keyboard.*"]},{id:"application/update",label:(0,t.localize)(39,null),settings:["update.*"]},{id:"application/telemetry",label:(0,t.localize)(40,null),settings:["telemetry.*"]},{id:"application/settingsSync",label:(0,t.localize)(41,null),settings:["settingsSync.*"]}]},{id:"security",label:(0,t.localize)(42,null),children:[{id:"security/workspace",label:(0,t.localize)(43,null),settings:["security.workspace.*"]}]}]},e.knownAcronyms=new Set,["css","html","scss","less","json","js","ts","ie","id","php","scm"].forEach(p=>e.knownAcronyms.add(p)),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(ae[269],le([1,0,5,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MODIFIED_INDICATOR_USE_INLINE_ONLY=e.ENABLE_LANGUAGE_FILTER=e.KEYBOARD_LAYOUT_OPEN_PICKER=e.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG=e.WORKSPACE_TRUST_SETTING_TAG=e.POLICY_SETTING_TAG=e.GENERAL_TAG_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_HISTORY=e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS=e.KEYBINDINGS_EDITOR_COMMAND_SEARCH=e.CONTEXT_SETTINGS_EDITOR_IN_USER_TAB=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_SUGGEST_FILTERS=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.SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS="settings.action.suggestFilters",e.CONTEXT_SETTINGS_EDITOR=new p.RawContextKey("inSettingsEditor",!1),e.CONTEXT_SETTINGS_JSON_EDITOR=new p.RawContextKey("inSettingsJSONEditor",!1),e.CONTEXT_SETTINGS_SEARCH_FOCUS=new p.RawContextKey("inSettingsSearch",!1),e.CONTEXT_TOC_ROW_FOCUS=new p.RawContextKey("settingsTocRowFocus",!1),e.CONTEXT_SETTINGS_ROW_FOCUS=new p.RawContextKey("settingRowFocus",!1),e.CONTEXT_KEYBINDINGS_EDITOR=new p.RawContextKey("inKeybindings",!1),e.CONTEXT_KEYBINDINGS_SEARCH_FOCUS=new p.RawContextKey("inKeybindingsSearch",!1),e.CONTEXT_KEYBINDING_FOCUS=new p.RawContextKey("keybindingFocus",!1),e.CONTEXT_WHEN_FOCUS=new p.RawContextKey("whenFocus",!1),e.CONTEXT_SETTINGS_EDITOR_IN_USER_TAB=new p.RawContextKey("inSettingsEditorUserTab",!1),e.KEYBINDINGS_EDITOR_COMMAND_SEARCH="keybindings.editor.searchKeybindings",e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS="keybindings.editor.clearSearchResults",e.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_HISTORY="keybindings.editor.clearSearchHistory",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.GENERAL_TAG_SETTING_TAG="tag:",e.POLICY_SETTING_TAG="hasPolicy",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,e.MODIFIED_INDICATOR_USE_INLINE_ONLY=!1}),define(ae[2379],le([1,0,279,244,1811,37,269]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsSearchFilterDropdownMenuActionViewItem=void 0;let E=class extends t.DropdownMenuActionViewItem{constructor(b,S,C,r){super(b,{getActions:()=>this.getActions()},r,{actionRunner:S,classNames:b.class,anchorAlignmentProvider:()=>1,menuAsChild:!0}),this.searchWidget=C,this.suggestController=p.SuggestController.get(this.searchWidget.inputWidget)}render(b){super.render(b)}doSearchWidgetAction(b,S){this.searchWidget.setValue(this.searchWidget.getValue().trimEnd()+" "+b),this.searchWidget.focus(),S&&this.suggestController&&this.suggestController.triggerSuggest()}createAction(b,S,C,r,u){return{id:b,label:S,tooltip:C,class:void 0,enabled:!0,checked:!1,run:()=>{this.doSearchWidgetAction(r,u)}}}createToggleAction(b,S,C,r){const i=this.searchWidget.getValue().split(" ").includes(r);return{id:b,label:S,tooltip:C,class:void 0,enabled:!0,checked:i,run:()=>{if(i){const f=this.searchWidget.getValue().split(" ").filter(c=>c!==r).join(" ");this.searchWidget.setValue(f)}else{const f=this.searchWidget.getValue().trimEnd(),c=f?f+" "+r:r;this.searchWidget.setValue(c)}this.searchWidget.focus()}}}getActions(){return[this.createToggleAction("modifiedSettingsSearch",(0,R.localize)(0,null),(0,R.localize)(1,null),`@${k.MODIFIED_SETTING_TAG}`),this.createAction("extSettingsSearch",(0,R.localize)(2,null),(0,R.localize)(3,null),`@${k.EXTENSION_SETTING_TAG}`,!0),this.createAction("featuresSettingsSearch",(0,R.localize)(4,null),(0,R.localize)(5,null),`@${k.FEATURE_SETTING_TAG}`,!0),this.createAction("tagSettingsSearch",(0,R.localize)(6,null),(0,R.localize)(7,null),`@${k.GENERAL_TAG_SETTING_TAG}`,!0),this.createAction("langSettingsSearch",(0,R.localize)(8,null),(0,R.localize)(9,null),`@${k.LANGUAGE_SETTING_TAG}`,!0),this.createToggleAction("onlineSettingsSearch",(0,R.localize)(10,null),(0,R.localize)(11,null),"@tag:usesOnlineServices"),this.createToggleAction("policySettingsSearch",(0,R.localize)(12,null),(0,R.localize)(13,null),`@${k.POLICY_SETTING_TAG}`)]}};E=we([F(3,A.IContextMenuService)],E),e.SettingsSearchFilterDropdownMenuActionViewItem=E}),define(ae[450],le([1,0,65,1816,33,80]),function(J,e,t,p,R,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,R.registerColor)("settings.headerForeground",{light:"#444444",dark:"#e7e7e7",hcDark:"#ffffff",hcLight:"#292929"},(0,p.localize)(0,null)),e.modifiedItemIndicator=(0,R.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,p.localize)(1,null)),e.settingsHeaderBorder=(0,R.registerColor)("settings.headerBorder",{dark:A.PANEL_BORDER,light:A.PANEL_BORDER,hcDark:A.PANEL_BORDER,hcLight:A.PANEL_BORDER},(0,p.localize)(2,null)),e.settingsSashBorder=(0,R.registerColor)("settings.sashBorder",{dark:A.PANEL_BORDER,light:A.PANEL_BORDER,hcDark:A.PANEL_BORDER,hcLight:A.PANEL_BORDER},(0,p.localize)(3,null)),e.settingsSelectBackground=(0,R.registerColor)("settings.dropdownBackground",{dark:R.selectBackground,light:R.selectBackground,hcDark:R.selectBackground,hcLight:R.selectBackground},(0,p.localize)(4,null)),e.settingsSelectForeground=(0,R.registerColor)("settings.dropdownForeground",{dark:R.selectForeground,light:R.selectForeground,hcDark:R.selectForeground,hcLight:R.selectForeground},(0,p.localize)(5,null)),e.settingsSelectBorder=(0,R.registerColor)("settings.dropdownBorder",{dark:R.selectBorder,light:R.selectBorder,hcDark:R.selectBorder,hcLight:R.selectBorder},(0,p.localize)(6,null)),e.settingsSelectListBorder=(0,R.registerColor)("settings.dropdownListBorder",{dark:R.editorWidgetBorder,light:R.editorWidgetBorder,hcDark:R.editorWidgetBorder,hcLight:R.editorWidgetBorder},(0,p.localize)(7,null)),e.settingsCheckboxBackground=(0,R.registerColor)("settings.checkboxBackground",{dark:R.checkboxBackground,light:R.checkboxBackground,hcDark:R.checkboxBackground,hcLight:R.checkboxBackground},(0,p.localize)(8,null)),e.settingsCheckboxForeground=(0,R.registerColor)("settings.checkboxForeground",{dark:R.checkboxForeground,light:R.checkboxForeground,hcDark:R.checkboxForeground,hcLight:R.checkboxForeground},(0,p.localize)(9,null)),e.settingsCheckboxBorder=(0,R.registerColor)("settings.checkboxBorder",{dark:R.checkboxBorder,light:R.checkboxBorder,hcDark:R.checkboxBorder,hcLight:R.checkboxBorder},(0,p.localize)(10,null)),e.settingsTextInputBackground=(0,R.registerColor)("settings.textInputBackground",{dark:R.inputBackground,light:R.inputBackground,hcDark:R.inputBackground,hcLight:R.inputBackground},(0,p.localize)(11,null)),e.settingsTextInputForeground=(0,R.registerColor)("settings.textInputForeground",{dark:R.inputForeground,light:R.inputForeground,hcDark:R.inputForeground,hcLight:R.inputForeground},(0,p.localize)(12,null)),e.settingsTextInputBorder=(0,R.registerColor)("settings.textInputBorder",{dark:R.inputBorder,light:R.inputBorder,hcDark:R.inputBorder,hcLight:R.inputBorder},(0,p.localize)(13,null)),e.settingsNumberInputBackground=(0,R.registerColor)("settings.numberInputBackground",{dark:R.inputBackground,light:R.inputBackground,hcDark:R.inputBackground,hcLight:R.inputBackground},(0,p.localize)(14,null)),e.settingsNumberInputForeground=(0,R.registerColor)("settings.numberInputForeground",{dark:R.inputForeground,light:R.inputForeground,hcDark:R.inputForeground,hcLight:R.inputForeground},(0,p.localize)(15,null)),e.settingsNumberInputBorder=(0,R.registerColor)("settings.numberInputBorder",{dark:R.inputBorder,light:R.inputBorder,hcDark:R.inputBorder,hcLight:R.inputBorder},(0,p.localize)(16,null)),e.focusedRowBackground=(0,R.registerColor)("settings.focusedRowBackground",{dark:(0,R.transparent)(R.listHoverBackground,.6),light:(0,R.transparent)(R.listHoverBackground,.6),hcDark:null,hcLight:null},(0,p.localize)(17,null)),e.rowHoverBackground=(0,R.registerColor)("settings.rowHoverBackground",{dark:(0,R.transparent)(R.listHoverBackground,.3),light:(0,R.transparent)(R.listHoverBackground,.3),hcDark:null,hcLight:null},(0,p.localize)(18,null)),e.focusedRowBorder=(0,R.registerColor)("settings.focusedRowBorder",{dark:R.focusBorder,light:R.focusBorder,hcDark:R.focusBorder,hcLight:R.focusBorder},(0,p.localize)(19,null))}),define(ae[2380],le([1,0,237,10,79,182,197,211,418,11,29,65,6,2,14,13,1813,37,33,73,12,340,450,1168]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectSettingCheckboxWidget=e.ObjectSettingDropdownWidget=e.ExcludeSettingWidget=e.ListSettingWidget=e.AbstractListSettingWidget=e.ListSettingListModel=void 0;const g=p.$;(0,n.registerThemingParticipant)((T,_)=>{const L=T.getColor(o.settingsCheckboxBackground);L&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { background-color: ${L} !important; }`);const M=T.getColor(o.settingsCheckboxForeground);M&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { color: ${M} !important; }`);const O=T.getColor(o.settingsCheckboxBorder);O&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-bool .setting-value-checkbox { border-color: ${O} !important; }`);const N=T.getColor(s.textLinkForeground);if(N){_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a { color: ${N}; }`),_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a > code { color: ${N}; }`),_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a { color: ${N}; }`),_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a > code { color: ${N}; }`),_.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a { color: ${N}; }`),_.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown a > code { color: ${N}; }`);const Q=new C.Color(new C.RGBA(N.rgba.r,N.rgba.g,N.rgba.b,.8));_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-untrusted > .setting-item-contents .setting-item-markdown a { color: ${Q}; }`)}const P=T.getColor(s.textLinkActiveForeground);P&&(_.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: ${P}; }`),_.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: ${P}; }`),_.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: ${P}; }`),_.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: ${P}; }`),_.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: ${P}; }`),_.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: ${P}; }`));const B=T.getColor(o.settingsHeaderForeground);B&&_.addRule(`.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label.checked { color: ${B}; border-bottom-color: ${B}; }`);const V=T.getColor(s.foreground);V&&_.addRule(`.settings-editor > .settings-header > .settings-header-controls .settings-tabs-widget .action-label { color: ${V}; }`);const z=T.getColor(s.listHoverBackground);z&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { background-color: ${z}; }`);const x=T.getColor(s.listHoverForeground);x&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row:hover { color: ${x}; }`);const H=T.getColor(s.listDropBackground);H&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.drag-hover { background-color: ${H}; }`);const W=T.getColor(s.listActiveSelectionBackground);W&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { background-color: ${W}; }`);const U=T.getColor(s.listInactiveSelectionBackground);U&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { background-color: ${U}; }`);const $=T.getColor(s.listInactiveSelectionForeground);$&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:not(:focus) { color: ${$}; }`);const q=T.getColor(s.listActiveSelectionForeground);q&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-list .setting-list-row.selected:focus { color: ${q}; }`);const X=T.getColor(s.textPreformatForeground);if(X){_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item .setting-item-markdown code { color: ${X} }`),_.addRule(`.monaco-select-box-dropdown-container > .select-box-details-pane > .select-box-description-markdown code { color: ${X} }`);const Q=new C.Color(new C.RGBA(X.rgba.r,X.rgba.g,X.rgba.b,.8));_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-untrusted > .setting-item-contents .setting-item-description .setting-item-markdown code { color: ${Q} }`)}const G=T.getColor(o.modifiedItemIndicator);G&&_.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents > .setting-item-modified-indicator { border-color: ${G}; }`)});class h{get items(){const _=this._dataItems.map((L,M)=>{const O=typeof this._editKey=="number"&&this._editKey===M;return{...L,editing:O,selected:M===this._selectedIdx||O}});return this._editKey==="create"&&_.push({editing:!0,selected:!0,...this._newDataItem}),_}constructor(_){this._dataItems=[],this._editKey=null,this._selectedIdx=null,this._newDataItem=_}setEditKey(_){this._editKey=_}setValue(_){this._dataItems=_}select(_){this._selectedIdx=_}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=h;let v=class extends u.Disposable{get domNode(){return this.listElement}get items(){return this.model.items}get inReadMode(){return this.model.items.every(_=>!_.editing)}constructor(_,L,M){super(),this.container=_,this.themeService=L,this.contextViewService=M,this.rowElements=[],this._onDidChangeList=this._register(new r.Emitter),this.model=new h(this.getEmptyItem()),this.listDisposables=this._register(new u.DisposableStore),this.onDidChangeList=this._onDidChangeList.event,this.listElement=p.append(_,g("div")),this.listElement.setAttribute("role","list"),this.getContainerClasses().forEach(O=>this.listElement.classList.add(O)),this.listElement.setAttribute("tabindex","0"),p.append(_,this.renderAddButton()),this.renderList(),this._register(p.addDisposableListener(this.listElement,p.EventType.POINTER_DOWN,O=>this.onListClick(O))),this._register(p.addDisposableListener(this.listElement,p.EventType.DBLCLICK,O=>this.onListDoubleClick(O))),this._register(p.addStandardDisposableListener(this.listElement,"keydown",O=>{if(O.equals(16))this.selectPreviousRow();else if(O.equals(18))this.selectNextRow();else return;O.preventDefault(),O.stopPropagation()}))}setValue(_){this.model.setValue(_),this.renderList()}renderHeader(){}isAddButtonVisible(){return!0}renderList(){const _=p.isAncestor(document.activeElement,this.listElement);p.clearNode(this.listElement),this.listDisposables.clear();const L=this.model.items.some(P=>!!(P.editing&&this.isItemNew(P)));this.container.classList.toggle("setting-list-hide-add-button",!this.isAddButtonVisible()||L);const M=this.renderHeader(),O=24;let N=O*this.model.items.length;M&&(N+=O,this.listElement.appendChild(M)),this.rowElements=this.model.items.map((P,B)=>this.renderDataOrEditItem(P,B,_)),this.rowElements.forEach(P=>this.listElement.appendChild(P)),this.listElement.style.height=N+"px"}createBasicSelectBox(_){const L=_.options.map(({value:N,description:P})=>({text:N,description:P})),M=_.options.findIndex(N=>_.data===N.value),O=new I.SelectBox(L,M,this.contextViewService,void 0,{useCustomDrawn:!(i.isIOS&&t.BrowserFeatures.pointerEvents)});return this.listDisposables.add((0,d.attachSelectBoxStyler)(O,this.themeService,{selectBackground:o.settingsSelectBackground,selectForeground:o.settingsSelectForeground,selectBorder:o.settingsSelectBorder,selectListBorder:o.settingsSelectListBorder})),O}editSetting(_){this.model.setEditKey(_),this.renderList()}cancelEdit(){this.model.setEditKey("none"),this.renderList()}handleItemChange(_,L,M){this.model.setEditKey("none"),this._onDidChangeList.fire({originalItem:_,item:L,targetIndex:M}),this.renderList()}renderDataOrEditItem(_,L,M){const O=_.editing?this.renderEdit(_,L):this.renderDataItem(_,L,M);return O.setAttribute("role","listitem"),O}renderDataItem(_,L,M){const O=this.renderItem(_,L),N=O.rowElement;N.setAttribute("data-index",L+""),N.setAttribute("tabindex",_.selected?"0":"-1"),N.classList.toggle("selected",_.selected);const P=new R.ActionBar(N);return this.listDisposables.add(P),P.push(this.getActionsForItem(_,L),{icon:!0,label:!0}),this.addTooltipsToRow(O,_),_.selected&&M&&this.listDisposables.add((0,b.disposableTimeout)(()=>N.focus())),this.listDisposables.add(p.addDisposableListener(N,"click",B=>{B.stopPropagation()})),N}renderAddButton(){const _=g(".setting-list-new-row"),L=this._register(new A.Button(_));return L.label=this.getLocalizedStrings().addButtonLabel,L.element.classList.add("setting-list-addButton"),this._register((0,d.attachButtonStyler)(L,this.themeService)),this._register(L.onDidClick(()=>{this.model.setEditKey("create"),this.renderList()})),_}onListClick(_){const L=this.getClickedItemIndex(_);L<0||(_.preventDefault(),_.stopImmediatePropagation(),this.model.getSelected()!==L&&this.selectRow(L))}onListDoubleClick(_){const L=this.getClickedItemIndex(_);if(L<0)return;this.model.items[L]&&(this.editSetting(L),_.preventDefault(),_.stopPropagation())}getClickedItemIndex(_){if(!_.target||p.findParentWithClass(_.target,"monaco-action-bar"))return-1;const M=p.findParentWithClass(_.target,"setting-list-row");if(!M)return-1;const O=M.getAttribute("data-index");return O?parseInt(O):-1}selectRow(_){this.model.select(_),this.rowElements.forEach(M=>M.classList.remove("selected"));const L=this.rowElements[this.model.getSelected()];L.classList.add("selected"),L.focus()}selectNextRow(){this.model.selectNext(),this.selectRow(this.model.getSelected())}selectPreviousRow(){this.model.selectPrevious(),this.selectRow(this.model.getSelected())}};v=we([F(1,n.IThemeService),F(2,l.IContextViewService)],v),e.AbstractListSettingWidget=v;class m extends v{constructor(){super(...arguments),this.showAddButton=!0}setValue(_,L){this.keyValueSuggester=L?.keySuggester,this.showAddButton=L?.showAddButton??!0,super.setValue(_)}getEmptyItem(){return{value:{type:"string",data:""}}}isAddButtonVisible(){return this.showAddButton}getContainerClasses(){return["setting-list-widget"]}getActionsForItem(_,L){return[{class:n.ThemeIcon.asClassName(a.settingsEditIcon),enabled:!0,id:"workbench.action.editListItem",tooltip:this.getLocalizedStrings().editActionTooltip,run:()=>this.editSetting(L)},{class:n.ThemeIcon.asClassName(a.settingsRemoveIcon),enabled:!0,id:"workbench.action.removeListItem",tooltip:this.getLocalizedStrings().deleteActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:_,item:void 0,targetIndex:L})}]}getDragImage(_){const L=g(".monaco-drag-image");return L.textContent=_.value.data,L}renderItem(_,L){const M=g(".setting-list-row"),O=p.append(M,g(".setting-list-value")),N=p.append(M,g(".setting-list-sibling"));return O.textContent=_.value.data.toString(),N.textContent=_.sibling?`when: ${_.sibling}`:null,this.addDragAndDrop(M,_,L),{rowElement:M,keyElement:O,valueElement:N}}addDragAndDrop(_,L,M){this.inReadMode?(_.draggable=!0,_.classList.add("draggable")):(_.draggable=!1,_.classList.remove("draggable")),this.listDisposables.add(p.addDisposableListener(_,p.EventType.DRAG_START,N=>{if(this.dragDetails={element:_,item:L,itemIndex:M},N.dataTransfer){N.dataTransfer.dropEffect="move";const P=this.getDragImage(L);document.body.appendChild(P),N.dataTransfer.setDragImage(P,-10,-10),setTimeout(()=>document.body.removeChild(P),0)}})),this.listDisposables.add(p.addDisposableListener(_,p.EventType.DRAG_OVER,N=>this.dragDetails?(N.preventDefault(),N.dataTransfer&&(N.dataTransfer.dropEffect="move"),!0):!1));let O=0;this.listDisposables.add(p.addDisposableListener(_,p.EventType.DRAG_ENTER,N=>{O++,_.classList.add("drag-hover")})),this.listDisposables.add(p.addDisposableListener(_,p.EventType.DRAG_LEAVE,N=>{O--,O||_.classList.remove("drag-hover")})),this.listDisposables.add(p.addDisposableListener(_,p.EventType.DROP,N=>this.dragDetails?(N.preventDefault(),O=0,this.dragDetails.element!==_&&this._onDidChangeList.fire({originalItem:this.dragDetails.item,sourceIndex:this.dragDetails.itemIndex,item:L,targetIndex:M}),!0):!1)),this.listDisposables.add(p.addDisposableListener(_,p.EventType.DRAG_END,N=>{O=0,_.classList.remove("drag-hover"),N.dataTransfer?.clearData(),this.dragDetails&&(this.dragDetails=void 0)}))}renderEdit(_,L){const M=g(".setting-list-edit-row");let O,N,P;if(this.keyValueSuggester){const U=this.keyValueSuggester(this.model.items.map(({value:{data:$}})=>$),L);_={..._,value:{type:"enum",data:_.value.data,options:U?U.options:[]}}}switch(_.value.type){case"string":O=this.renderInputBox(_.value,M);break;case"enum":O=this.renderDropdown(_.value,M),P=_.value.options,_.value.options.length&&(N=this.isItemNew(_)?P[0].value:_.value.data);break}const B=()=>({value:{type:"string",data:O.value},sibling:x?.value}),V=U=>({value:{type:"enum",data:U,options:P??[]}}),z=U=>{U.equals(3)?this.handleItemChange(_,B(),L):U.equals(9)&&(this.cancelEdit(),U.preventDefault()),M?.focus()};if(_.value.type!=="string"){const U=O;this.listDisposables.add(U.onDidSelect(({selected:$})=>{N=$}))}else{const U=O;this.listDisposables.add(p.addStandardDisposableListener(U.inputElement,p.EventType.KEY_DOWN,z))}let x;(0,f.isUndefinedOrNull)(_.sibling)?O instanceof E.InputBox&&O.element.classList.add("no-sibling"):(x=new E.InputBox(M,this.contextViewService,{placeholder:this.getLocalizedStrings().siblingInputPlaceholder}),x.element.classList.add("setting-list-siblingInput"),this.listDisposables.add(x),this.listDisposables.add((0,d.attachInputBoxStyler)(x,this.themeService,{inputBackground:o.settingsTextInputBackground,inputForeground:o.settingsTextInputForeground,inputBorder:o.settingsTextInputBorder})),x.value=_.sibling,this.listDisposables.add(p.addStandardDisposableListener(x.inputElement,p.EventType.KEY_DOWN,z)));const H=this._register(new A.Button(M));H.label=(0,c.localize)(0,null),H.element.classList.add("setting-list-ok-button"),this.listDisposables.add((0,d.attachButtonStyler)(H,this.themeService)),this.listDisposables.add(H.onDidClick(()=>{_.value.type==="string"?this.handleItemChange(_,B(),L):this.handleItemChange(_,V(N),L)}));const W=this._register(new A.Button(M,{secondary:!0}));return W.label=(0,c.localize)(1,null),W.element.classList.add("setting-list-cancel-button"),this.listDisposables.add((0,d.attachButtonStyler)(W,this.themeService)),this.listDisposables.add(W.onDidClick(()=>this.cancelEdit())),this.listDisposables.add((0,b.disposableTimeout)(()=>{O.focus(),O instanceof E.InputBox&&O.select()})),M}isItemNew(_){return _.value.data===""}addTooltipsToRow(_,{value:L,sibling:M}){const O=(0,f.isUndefinedOrNull)(M)?(0,c.localize)(2,null,L.data):(0,c.localize)(3,null,L.data,M),{rowElement:N}=_;N.title=O,N.setAttribute("aria-label",N.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,c.localize)(4,null),editActionTooltip:(0,c.localize)(5,null),addButtonLabel:(0,c.localize)(6,null),inputPlaceholder:(0,c.localize)(7,null),siblingInputPlaceholder:(0,c.localize)(8,null)}}renderInputBox(_,L){const M=new E.InputBox(L,this.contextViewService,{placeholder:this.getLocalizedStrings().inputPlaceholder});return M.element.classList.add("setting-list-valueInput"),this.listDisposables.add((0,d.attachInputBoxStyler)(M,this.themeService,{inputBackground:o.settingsTextInputBackground,inputForeground:o.settingsTextInputForeground,inputBorder:o.settingsTextInputBorder})),this.listDisposables.add(M),M.value=_.data.toString(),M}renderDropdown(_,L){if(_.type!=="enum")throw new Error("Valuetype must be enum.");const M=this.createBasicSelectBox(_),O=g(".setting-list-object-list-row");return M.render(O),L.appendChild(O),M}}e.ListSettingWidget=m;class w extends m{getContainerClasses(){return["setting-list-exclude-widget"]}addDragAndDrop(_,L,M){}addTooltipsToRow(_,{value:L,sibling:M}){const O=(0,f.isUndefinedOrNull)(M)?(0,c.localize)(9,null,L.data):(0,c.localize)(10,null,L.data,M),{rowElement:N}=_;N.title=O,N.setAttribute("aria-label",N.title)}getLocalizedStrings(){return{deleteActionTooltip:(0,c.localize)(11,null),editActionTooltip:(0,c.localize)(12,null),addButtonLabel:(0,c.localize)(13,null),inputPlaceholder:(0,c.localize)(14,null),siblingInputPlaceholder:(0,c.localize)(15,null)}}}e.ExcludeSettingWidget=w;class D extends v{constructor(){super(...arguments),this.currentSettingKey="",this.showAddButton=!0,this.keySuggester=()=>{},this.valueSuggester=()=>{}}setValue(_,L){this.showAddButton=L?.showAddButton??this.showAddButton,this.keySuggester=L?.keySuggester??this.keySuggester,this.valueSuggester=L?.valueSuggester??this.valueSuggester,(0,f.isDefined)(L)&&L.settingKey!==this.currentSettingKey&&(this.model.setEditKey("none"),this.model.select(null),this.currentSettingKey=L.settingKey),super.setValue(_)}isItemNew(_){return _.key.data===""&&_.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(_,L){const M=[{class:n.ThemeIcon.asClassName(a.settingsEditIcon),enabled:!0,id:"workbench.action.editListItem",tooltip:this.getLocalizedStrings().editActionTooltip,run:()=>this.editSetting(L)}];return _.removable?M.push({class:n.ThemeIcon.asClassName(a.settingsRemoveIcon),enabled:!0,id:"workbench.action.removeListItem",tooltip:this.getLocalizedStrings().deleteActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:_,item:void 0,targetIndex:L})}):M.push({class:n.ThemeIcon.asClassName(a.settingsDiscardIcon),enabled:!0,id:"workbench.action.resetListItem",tooltip:this.getLocalizedStrings().resetActionTooltip,run:()=>this._onDidChangeList.fire({originalItem:_,item:void 0,targetIndex:L})}),M}renderHeader(){const _=g(".setting-list-row-header"),L=p.append(_,g(".setting-list-object-key")),M=p.append(_,g(".setting-list-object-value")),{keyHeaderText:O,valueHeaderText:N}=this.getLocalizedStrings();return L.textContent=O,M.textContent=N,_}renderItem(_,L){const M=g(".setting-list-row");M.classList.add("setting-list-object-row");const O=p.append(M,g(".setting-list-object-key")),N=p.append(M,g(".setting-list-object-value"));return O.textContent=_.key.data,N.textContent=_.value.data.toString(),{rowElement:M,keyElement:O,valueElement:N}}renderEdit(_,L){const M=g(".setting-list-edit-row.setting-list-object-row"),O={..._},N=$=>{O.key=$,W.enabled=$.data!=="";const q=this.valueSuggester($.data)??_.value;this.shouldUseSuggestion(_.value,O.value,q)&&(P(q),H())},P=$=>{O.value=$};let B,V;if(this.showAddButton){if(this.isItemNew(_)){const X=this.keySuggester(this.model.items.map(({key:{data:G}})=>G));if((0,f.isDefined)(X)){O.key=X;const G=this.valueSuggester(O.key.data);P(G??O.value)}}const{widget:$,element:q}=this.renderEditWidget(O.key,{idx:L,isKey:!0,originalItem:_,changedItem:O,update:N});B=$,V=q}else V=g(".setting-list-object-key"),V.textContent=_.key.data;let z;const x=g(".setting-list-object-value-container"),H=()=>{const{widget:$,element:q}=this.renderEditWidget(O.value,{idx:L,isKey:!1,originalItem:_,changedItem:O,update:P});z=$,p.clearNode(x),x.append(q)};H(),M.append(V,x);const W=this._register(new A.Button(M));W.enabled=O.key.data!=="",W.label=(0,c.localize)(16,null),W.element.classList.add("setting-list-ok-button"),this.listDisposables.add((0,d.attachButtonStyler)(W,this.themeService)),this.listDisposables.add(W.onDidClick(()=>this.handleItemChange(_,O,L)));const U=this._register(new A.Button(M,{secondary:!0}));return U.label=(0,c.localize)(17,null),U.element.classList.add("setting-list-cancel-button"),this.listDisposables.add((0,d.attachButtonStyler)(U,this.themeService)),this.listDisposables.add(U.onDidClick(()=>this.cancelEdit())),this.listDisposables.add((0,b.disposableTimeout)(()=>{const $=B??z;$.focus(),$ instanceof E.InputBox&&$.select()})),M}renderEditWidget(_,L){switch(_.type){case"string":return this.renderStringEditWidget(_,L);case"enum":return this.renderEnumEditWidget(_,L);case"boolean":return this.renderEnumEditWidget({type:"enum",data:_.data.toString(),options:[{value:"true"},{value:"false"}]},L)}}renderStringEditWidget(_,{idx:L,isKey:M,originalItem:O,changedItem:N,update:P}){const B=g(M?".setting-list-object-input-key":".setting-list-object-input-value"),V=new E.InputBox(B,this.contextViewService,{placeholder:M?(0,c.localize)(18,null):(0,c.localize)(19,null)});V.element.classList.add("setting-list-object-input"),this.listDisposables.add((0,d.attachInputBoxStyler)(V,this.themeService,{inputBackground:o.settingsTextInputBackground,inputForeground:o.settingsTextInputForeground,inputBorder:o.settingsTextInputBorder})),this.listDisposables.add(V),V.value=_.data,this.listDisposables.add(V.onDidChange(x=>P({..._,data:x})));const z=x=>{x.equals(3)?this.handleItemChange(O,N,L):x.equals(9)&&(this.cancelEdit(),x.preventDefault())};return this.listDisposables.add(p.addStandardDisposableListener(V.inputElement,p.EventType.KEY_DOWN,z)),{widget:V,element:B}}renderEnumEditWidget(_,{isKey:L,changedItem:M,update:O}){const N=this.createBasicSelectBox(_),P=L?M.key:M.value;this.listDisposables.add(N.onDidSelect(({selected:z})=>O(P.type==="boolean"?{...P,data:z==="true"}:{...P,data:z})));const B=g(".setting-list-object-input");return B.classList.add(L?"setting-list-object-input-key":"setting-list-object-input-value"),N.render(B),_.options.findIndex(z=>_.data===z.value)===-1&&_.options.length?O(P.type==="boolean"?{...P,data:!0}:{...P,data:_.options[0].value}):P.type==="boolean"&&O({...P,data:_.data==="true"}),{widget:N,element:B}}shouldUseSuggestion(_,L,M){if(M.type!=="enum"&&M.type===L.type&&M.data===L.data)return!1;if(_.data==="")return!0;if(L.type===M.type&&M.type!=="enum")return!1;if(L.type==="enum"&&M.type==="enum"){const O=new Set(L.options.map(({value:N})=>N));if(M.options.forEach(({value:N})=>O.delete(N)),O.size===0)return!1}return!0}addTooltipsToRow(_,L){const{keyElement:M,valueElement:O,rowElement:N}=_,P=(0,c.localize)(20,null,L.key.data,L.value.data),B=this.getEnumDescription(L.key)??L.keyDescription??P;M.title=B;const V=this.getEnumDescription(L.value)??P;O.title=V,N.setAttribute("aria-label",P)}getEnumDescription(_){return _.type==="enum"?_.options.find(({value:M})=>_.data===M)?.description:void 0}getLocalizedStrings(){return{deleteActionTooltip:(0,c.localize)(21,null),resetActionTooltip:(0,c.localize)(22,null),editActionTooltip:(0,c.localize)(23,null),addButtonLabel:(0,c.localize)(24,null),keyHeaderText:(0,c.localize)(25,null),valueHeaderText:(0,c.localize)(26,null)}}}e.ObjectSettingDropdownWidget=D;class y extends v{constructor(){super(...arguments),this.currentSettingKey=""}setValue(_,L){(0,f.isDefined)(L)&&L.settingKey!==this.currentSettingKey&&(this.model.setEditKey("none"),this.model.select(null),this.currentSettingKey=L.settingKey),super.setValue(_)}isItemNew(_){return!_.key.data&&!_.value.data}getEmptyItem(){return{key:{type:"string",data:""},value:{type:"boolean",data:!1},removable:!1}}getContainerClasses(){return["setting-list-object-widget"]}getActionsForItem(_,L){return[]}isAddButtonVisible(){return!1}renderHeader(){}renderDataOrEditItem(_,L,M){const O=this.renderEdit(_,L);return O.setAttribute("role","listitem"),O}renderItem(_,L){const M=g(".blank-row"),O=g(".blank-row-key");return{rowElement:M,keyElement:O}}renderEdit(_,L){const M=g(".setting-list-edit-row.setting-list-object-row.setting-item-bool"),O={..._},N=H=>{O.value.data=H,this.handleItemChange(_,O,L)},P=_.keyDescription?`${_.keyDescription} (${_.key.data})`:_.key.data,{element:B,widget:V}=this.renderEditWidget(O.value.data,P,N);M.appendChild(B);const z=p.append(M,g(".setting-list-object-value"));z.textContent=P;const x={rowElement:M,keyElement:z,valueElement:V.domNode};return this.addTooltipsToRow(x,_),this._register(p.addDisposableListener(z,p.EventType.MOUSE_DOWN,H=>{H.target.tagName.toLowerCase()!=="a"&&(V.checked=!V.checked,N(V.checked)),p.EventHelper.stop(H)})),M}renderEditWidget(_,L,M){const O=new k.Toggle({icon:S.Codicon.check,actionClassName:"setting-value-checkbox",isChecked:_,title:L});this.listDisposables.add(O);const N=g(".setting-list-object-input");return N.classList.add("setting-list-object-input-key-checkbox"),O.domNode.classList.add("setting-value-checkbox"),N.appendChild(O.domNode),this._register(p.addDisposableListener(N,p.EventType.MOUSE_DOWN,P=>{O.checked=!O.checked,M(O.checked),P.stopImmediatePropagation()})),{widget:O,element:N}}addTooltipsToRow(_,L){const M=(0,c.localize)(27,null,L.key.data,L.value.data),O=L.keyDescription??M,{rowElement:N,keyElement:P,valueElement:B}=_;P.title=O,B.setAttribute("aria-label",M),N.setAttribute("aria-label",M)}getLocalizedStrings(){return{deleteActionTooltip:(0,c.localize)(28,null),resetActionTooltip:(0,c.localize)(29,null),editActionTooltip:(0,c.localize)(30,null),addButtonLabel:(0,c.localize)(31,null),keyHeaderText:(0,c.localize)(32,null),valueHeaderText:(0,c.localize)(33,null)}}}e.ObjectSettingCheckboxWidget=y}),define(ae[2381],le([1,0,123,50,20]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmartSnippetInserter=void 0;class A{static hasOpenBrace(E){for(;E.scan()!==17;)if(E.getToken()===1)return!0;return!1}static offsetToPosition(E,I){let b=0;const S=E.getEOL().length,C=E.getLineCount();for(let r=1;r<=C;r++){const u=E.getLineContent(r).length+S,i=b+u;if(i>I)return new p.Position(r,I-b+1);b=i}return new p.Position(C,E.getLineMaxColumn(C))}static insertSnippet(E,I){const b=E.getValueLengthInRange(new R.Range(1,1,I.lineNumber,I.column));let S;(function(d){d[d.INVALID=0]="INVALID",d[d.AFTER_OBJECT=1]="AFTER_OBJECT",d[d.BEFORE_OBJECT=2]="BEFORE_OBJECT"})(S||(S={}));let C=S.INVALID,r=-1,u=S.INVALID;const i=(0,t.createScanner)(E.getValue());let f=0,c=0;const l=(d,n)=>{n!==S.INVALID&&f===1&&c===0?(C=n,r=d,u=n):C!==S.INVALID&&(C=S.INVALID,r=i.getTokenOffset())};for(;i.scan()!==17;){const d=i.getPosition(),n=i.getToken();let a=!1;switch(n){case 3:a=!0,f++,l(d,S.BEFORE_OBJECT);break;case 4:a=!0,f--,l(d,S.INVALID);break;case 5:a=!0,l(d,S.BEFORE_OBJECT);break;case 1:a=!0,c++,l(d,S.INVALID);break;case 2:a=!0,c--,l(d,S.AFTER_OBJECT);break;case 15:case 14:a=!0}if(d>=b&&(C!==S.INVALID||r!==-1)){let o,g;return C!==S.INVALID?(o=a?d:i.getTokenOffset(),g=C):(o=r,g=u),g===S.AFTER_OBJECT?{position:this.offsetToPosition(E,o),prepend:",",append:""}:(i.setPosition(o),{position:this.offsetToPosition(E,o),prepend:"",append:this.hasOpenBrace(i)?",":""})}}const s=E.getLineCount();return{position:new p.Position(s,E.getLineMaxColumn(s)),prepend:` [`,append:"]"}}}e.SmartSnippetInserter=A}),define(ae[648],le([1,0,1824,29,63]),function(J,e,t,p,R){"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,R.registerIcon)("remote-explorer-get-started",p.Codicon.star,t.localize(0,null)),e.documentationIcon=(0,R.registerIcon)("remote-explorer-documentation",p.Codicon.book,t.localize(1,null)),e.feedbackIcon=(0,R.registerIcon)("remote-explorer-feedback",p.Codicon.twitter,t.localize(2,null)),e.reviewIssuesIcon=(0,R.registerIcon)("remote-explorer-review-issues",p.Codicon.issues,t.localize(3,null)),e.reportIssuesIcon=(0,R.registerIcon)("remote-explorer-report-issues",p.Codicon.comment,t.localize(4,null)),e.remoteExplorerViewIcon=(0,R.registerIcon)("remote-explorer-view-icon",p.Codicon.remoteExplorer,t.localize(5,null)),e.portsViewIcon=(0,R.registerIcon)("ports-view-icon",p.Codicon.plug,t.localize(6,null)),e.portIcon=(0,R.registerIcon)("ports-view-icon",p.Codicon.plug,t.localize(7,null)),e.privatePortIcon=(0,R.registerIcon)("private-ports-view-icon",p.Codicon.lock,t.localize(8,null)),e.forwardPortIcon=(0,R.registerIcon)("ports-forward-icon",p.Codicon.plus,t.localize(9,null)),e.stopForwardIcon=(0,R.registerIcon)("ports-stop-forward-icon",p.Codicon.x,t.localize(10,null)),e.openBrowserIcon=(0,R.registerIcon)("ports-open-browser-icon",p.Codicon.globe,t.localize(11,null)),e.openPreviewIcon=(0,R.registerIcon)("ports-open-preview-icon",p.Codicon.openPreview,t.localize(12,null)),e.copyAddressIcon=(0,R.registerIcon)("ports-copy-address-icon",p.Codicon.clippy,t.localize(13,null)),e.labelPortIcon=(0,R.registerIcon)("ports-label-icon",p.Codicon.tag,t.localize(14,null)),e.forwardedPortWithoutProcessIcon=(0,R.registerIcon)("ports-forwarded-without-process-icon",p.Codicon.circleOutline,t.localize(15,null)),e.forwardedPortWithProcessIcon=(0,R.registerIcon)("ports-forwarded-with-process-icon",p.Codicon.circleFilled,t.localize(16,null))}),define(ae[2382],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UrlFinder=void 0;class R extends p.Disposable{constructor(k,E){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(E.onDidNewSession(I=>{(!I.parentSession||I.parentSession&&I.hasSeparateRepl())&&this.listeners.set(I.getId(),I.onDidChangeReplElements(()=>{this.processNewReplElements(I)}))})),this._register(E.onDidEndSession(I=>{this.listeners.has(I.getId())&&(this.listeners.get(I.getId())?.dispose(),this.listeners.delete(I.getId()))}))}registerTerminalInstance(k){R.excludeTerminals.includes(k.title)||this.listeners.set(k,k.onData(E=>{this.processData(E)}))}processNewReplElements(k){const E=this.replPositions.get(k.getId()),I=k.getReplElements();if(this.replPositions.set(k.getId(),{position:I.length-1,tail:I[I.length-1]}),!E&&I.length>0)I.forEach(b=>this.processData(b.toString()));else if(E&&I.length-1!==E.position)for(let b=I.length-1;b>=0;b--){const S=I[b];if(S===E.tail)break;this.processData(S.toString())}}dispose(){super.dispose();const k=this.listeners.values();for(const E of k)E.dispose()}processData(k){k=k.replace(R.terminalCodesRegex,"");const E=k.match(R.localUrlRegex)||[];if(E&&E.length>0)E.forEach(I=>{let b;try{b=new URL(I)}catch{}if(b){const S=I.match(R.extractPortRegex),C=parseFloat(b.port?b.port:S?S[2]:"NaN");if(!isNaN(C)&&Number.isInteger(C)&&C>0&&C<=65535){let r=b.hostname;if(r!=="0.0.0.0"&&r!=="127.0.0.1"&&(r="localhost"),C!==9229&&k.startsWith("Debugger listening on"))return;this._onDidMatchLocalUrl.fire({port:C,host:r})}}});else{const I=k.match(R.localPythonServerRegex);I&&I.length===3&&this._onDidMatchLocalUrl.fire({host:I[1],port:Number(I[2])})}}}e.UrlFinder=R,R.terminalCodesRegex=/(?:\u001B|\u009B)[\[\]()#;?]*(?:(?:(?:[a-zA-Z0-9]*(?:;[a-zA-Z0-9]*)*)?\u0007)|(?:(?:\d{1,4}(?:;\d{0,4})*)?[0-9A-PR-TZcf-ntqry=><~]))/g,R.localUrlRegex=/\b\w{2,20}:\/\/(?:localhost|127\.0\.0\.1|0\.0\.0\.0|:\d{2,5})[\w\-\.\~:\/\?\#[\]\@!\$&\(\)\*\+\,\;\=]*/gim,R.extractPortRegex=/(localhost|127\.0\.0\.1|0\.0\.0\.0):(\d{1,5})/,R.localPythonServerRegex=/HTTP\son\s(127\.0\.0\.1|0\.0\.0\.0)\sport\s(\d+)/,R.excludeTerminals=["Dev Containers"]}),define(ae[2383],le([1,0,194,278,6,2,8]),function(J,e,t,p,R,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 E=class{constructor(b){this.configurationService=b,this.disposables=new A.DisposableStore,R.Event.filter(b.onDidChangeConfiguration,r=>r.affectsConfiguration("workbench.sash.size"))(this.onDidChangeSize,this,this.disposables),this.onDidChangeSize(),R.Event.filter(b.onDidChangeConfiguration,r=>r.affectsConfiguration("workbench.sash.hoverDelay"))(this.onDidChangeHoverDelay,this,this.disposables),this.onDidChangeHoverDelay()}onDidChangeSize(){const b=this.configurationService.getValue("workbench.sash.size"),S=(0,t.clamp)(b,4,20),C=(0,t.clamp)(b,1,8);document.documentElement.style.setProperty("--sash-size",S+"px"),document.documentElement.style.setProperty("--sash-hover-size",C+"px"),(0,p.setGlobalSashSize)(S)}onDidChangeHoverDelay(){(0,p.setGlobalHoverDelay)(this.configurationService.getValue("workbench.sash.hoverDelay"))}dispose(){this.disposables.dispose()}};E=we([F(0,k.IConfigurationService)],E),e.SashSettingsController=E}),define(ae[649],le([1,0,36,84,16,137,143,10]),function(J,e,t,p,R,A,k,E){"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 I(n){return!!n.provider&&!!n.input}e.isSCMRepository=I;function b(n){return!!n.validateInput&&typeof n.value=="string"}e.isSCMInput=b;function S(n){return n.type==="actionButton"}e.isSCMActionButton=S;function C(n){return!!n.provider&&!!n.elements}e.isSCMResourceGroup=C;function r(n){return!!n.sourceUri&&C(n.resourceGroup)}e.isSCMResource=r;const u=(n,a)=>n.id===a.id&&n.enabled===a.enabled;function i(n,a,o){let g=[],h=[];const v=()=>{const m=[],w=[];(0,p.createAndFillInActionBarActions)(n,{shouldForwardArgs:!0},{primary:m,secondary:w},o),!((0,R.equals)(g,m,u)&&(0,R.equals)(h,w,u))&&(g=m,h=w,a(m,w))};return v(),n.onDidChange(v)}e.connectPrimaryMenu=i;function f(n,a){return i(n,o=>{a.clear(),a.push(o,{icon:!0,label:!1})},"inline")}e.connectPrimaryMenuToInlineActionBar=f;function c(n){const a=[],o=[];return(0,p.createAndFillInContextMenuActions)(n,{shouldForwardArgs:!0},{primary:a,secondary:o},"inline"),o}e.collectContextMenuActions=c;class l extends t.Action{constructor(a,o){super(`statusbaraction{${a.id}}`,a.title,"",!0),this.command=a,this.commandService=o,this.tooltip=a.tooltip||""}run(){return this.commandService.executeCommand(this.command.id,...this.command.arguments||[])}}e.StatusBarAction=l;class s extends A.ActionViewItem{constructor(a){super(null,a,{})}updateLabel(){this.options.label&&this.label&&(0,E.reset)(this.label,...(0,k.renderLabelWithIcons)(this.action.label))}}function d(n){return a=>a instanceof l?new s(a):(0,p.createActionViewItem)(n,a)}e.getActionViewItemProvider=d}),define(ae[216],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISCMViewService=e.ISCMRepositorySortKey=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 p;(function(k){k[k.Error=0]="Error",k[k.Warning=1]="Warning",k[k.Information=2]="Information"})(p=e.InputValidationType||(e.InputValidationType={}));var R;(function(k){k[k.HistoryPrevious=0]="HistoryPrevious",k[k.HistoryNext=1]="HistoryNext"})(R=e.SCMInputChangeReason||(e.SCMInputChangeReason={}));var A;(function(k){k.DiscoveryTime="discoveryTime",k.Name="name",k.Path="path"})(A=e.ISCMRepositorySortKey||(e.ISCMRepositorySortKey={})),e.ISCMViewService=(0,t.createDecorator)("scmView")}),define(ae[2384],le([1,0,6,2,7,15,84,216,16,5,151,407]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMMenus=e.SCMRepositoryMenus=e.SCMTitleMenu=void 0;function C(c,l){return c.id===l.id}let r=class{get actions(){return this._actions}get secondaryActions(){return this._secondaryActions}constructor(l,s){this._actions=[],this._secondaryActions=[],this._onDidChangeTitle=new t.Emitter,this.onDidChangeTitle=this._onDidChangeTitle.event,this.disposables=new p.DisposableStore,this.menu=l.createMenu(A.MenuId.SCMTitle,s),this.disposables.add(this.menu),this.menu.onDidChange(this.updateTitleActions,this,this.disposables),this.updateTitleActions()}updateTitleActions(){const l=[],s=[];(0,k.createAndFillInActionBarActions)(this.menu,{shouldForwardArgs:!0},{primary:l,secondary:s}),!((0,I.equals)(l,this._actions,C)&&(0,I.equals)(s,this._secondaryActions,C))&&(this._actions=l,this._secondaryActions=s,this._onDidChangeTitle.fire())}dispose(){this.disposables.dispose()}};r=we([F(0,A.IMenuService),F(1,R.IContextKeyService)],r),e.SCMTitleMenu=r;class u{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}constructor(l,s){this.contextKeyService=l,this.menuService=s}getResourceMenu(l){if(typeof l.contextValue>"u")return this.genericResourceMenu||(this.genericResourceMenu=this.menuService.createMenu(A.MenuId.SCMResourceContext,this.contextKeyService)),this.genericResourceMenu;this.contextualResourceMenus||(this.contextualResourceMenus=new Map);let s=this.contextualResourceMenus.get(l.contextValue);if(!s){const d=this.contextKeyService.createOverlay([["scmResourceState",l.contextValue]]),n=this.menuService.createMenu(A.MenuId.SCMResourceContext,d);s={menu:n,dispose(){n.dispose()}},this.contextualResourceMenus.set(l.contextValue,s)}return s.menu}dispose(){this._resourceGroupMenu?.dispose(),this._resourceFolderMenu?.dispose(),this.genericResourceMenu?.dispose(),this.contextualResourceMenus&&((0,p.dispose)(this.contextualResourceMenus.values()),this.contextualResourceMenus.clear(),this.contextualResourceMenus=void 0)}}let i=class{get repositoryMenu(){return this._repositoryMenu||(this._repositoryMenu=this.menuService.createMenu(A.MenuId.SCMSourceControl,this.contextKeyService),this.disposables.add(this._repositoryMenu)),this._repositoryMenu}constructor(l,s,d,n){this.menuService=n,this.resourceGroups=[],this.resourceGroupMenusItems=new Map,this.disposables=new p.DisposableStore,this.contextKeyService=s.createOverlay([["scmProvider",l.contextValue],["scmProviderRootUri",l.rootUri?.toString()],["scmProviderHasRootUri",!!l.rootUri]]);const a=new S.ServiceCollection([R.IContextKeyService,this.contextKeyService]);d=d.createChild(a),this.titleMenu=d.createInstance(r),l.groups.onDidSplice(this.onDidSpliceGroups,this,this.disposables),this.onDidSpliceGroups({start:0,deleteCount:0,toInsert:l.groups.elements})}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 s=this.resourceGroupMenusItems.get(l);if(!s){const d=this.contextKeyService.createOverlay([["scmResourceGroup",l.id]]);s=new u(d,this.menuService),this.resourceGroupMenusItems.set(l,s)}return s}onDidSpliceGroups({start:l,deleteCount:s,toInsert:d}){const n=this.resourceGroups.splice(l,s,...d);for(const a of n)this.resourceGroupMenusItems.get(a)?.dispose(),this.resourceGroupMenusItems.delete(a)}dispose(){this.disposables.dispose(),this.resourceGroupMenusItems.forEach(l=>l.dispose())}};i=we([F(1,R.IContextKeyService),F(2,b.IInstantiationService),F(3,A.IMenuService)],i),e.SCMRepositoryMenus=i;let f=class{constructor(l,s){this.instantiationService=s,this.disposables=new p.DisposableStore,this.menus=new Map,this.titleMenu=s.createInstance(r),l.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables)}onDidRemoveRepository(l){this.menus.get(l.provider)?.dispose(),this.menus.delete(l.provider)}getRepositoryMenus(l){let s=this.menus.get(l);if(!s){const d=this.instantiationService.createInstance(i,l);s={menus:d,dispose:()=>{d.dispose(),this.menus.delete(l)}},this.menus.set(l,s)}return s.menus}dispose(){this.disposables.dispose()}};f=we([F(0,E.ISCMService),F(1,b.IInstantiationService)],f),e.SCMMenus=f}),define(ae[878],le([1,0,2,10,216,277,37,31,12,649,73,263,34,18,407]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RepositoryRenderer=void 0;let i=class Ma{get templateId(){return Ma.TEMPLATE_ID}constructor(c,l,s,d,n,a){this.actionViewItemProvider=c,this.scmViewService=l,this.commandService=s,this.contextMenuService=d,this.themeService=n,this.workspaceContextService=a}renderTemplate(c){c.classList.contains("monaco-tl-contents")&&c.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-twistie");const l=(0,p.append)(c,(0,p.$)(".scm-provider")),s=(0,p.append)(l,(0,p.$)(".label")),d=(0,p.append)(s,(0,p.$)("span.name")),n=(0,p.append)(s,(0,p.$)("span.description")),a=(0,p.append)(l,(0,p.$)(".actions")),o=new C.ToolBar(a,this.contextMenuService,{actionViewItemProvider:this.actionViewItemProvider}),g=(0,p.append)(l,(0,p.$)(".count")),h=new A.CountBadge(g),v=(0,S.attachBadgeStyler)(h,this.themeService),m=o.onDidChangeDropdownVisibility(D=>l.classList.toggle("active",D)),w=(0,t.combinedDisposable)(m,o,v);return{label:s,name:d,description:n,countContainer:g,count:h,toolBar:o,elementDisposables:new t.DisposableStore,templateDisposable:w}}renderElement(c,l,s,d){const n=(0,b.isSCMRepository)(c)?c:c.element;if(n.provider.rootUri){const D=this.workspaceContextService.getWorkspaceFolder(n.provider.rootUri);D?.uri.toString()===n.provider.rootUri.toString()?s.name.textContent=D.name:s.name.textContent=(0,u.basename)(n.provider.rootUri),s.label.title=`${n.provider.label}: ${n.provider.rootUri.fsPath}`,s.description.textContent=n.provider.label}else s.label.title=n.provider.label,s.name.textContent=n.provider.label,s.description.textContent="";let a=[],o=[],g=[];const h=()=>{s.toolBar.setActions([...a,...o],g)},v=()=>{a=(n.provider.statusBarCommands||[]).map(T=>new b.StatusBarAction(T,this.commandService)),h();const y=n.provider.count||0;s.countContainer.setAttribute("data-count",String(y)),s.count.setCount(y)};let m=!1;s.elementDisposables.add((0,t.toDisposable)(()=>m=!0)),s.elementDisposables.add(n.provider.onDidChange(()=>{m||v()})),v();const w=this.scmViewService.menus.getRepositoryMenus(n.provider);s.elementDisposables.add((0,b.connectPrimaryMenu)(w.titleMenu.menu,(D,y)=>{o=D,g=y,h()})),s.toolBar.context=n.provider}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(c,l,s){s.elementDisposables.clear()}disposeTemplate(c){c.elementDisposables.dispose(),c.templateDisposable.dispose()}};i.TEMPLATE_ID="repository",i=we([F(1,R.ISCMViewService),F(2,E.ICommandService),F(3,k.IContextMenuService),F(4,I.IThemeService),F(5,r.IWorkspaceContextService)],i),e.RepositoryRenderer=i}),define(ae[879],le([1,0,2,6,216,88,5,2384,23,112,34,304,18,16,8,7]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMViewService=e.RepositoryContextKeys=void 0;function c(d){return`${d.contextValue}:${d.label}${d.rootUri?`:${d.rootUri.toString()}`:""}`}function l(d,n){if(!n.provider.rootUri)return n.provider.label;const a=d.getWorkspaceFolder(n.provider.rootUri);return a?.uri.toString()===n.provider.rootUri.toString()?a.name:(0,r.basename)(n.provider.rootUri)}e.RepositoryContextKeys={RepositorySortKey:new f.RawContextKey("scmRepositorySortKey","discoveryTime")};let s=class{get repositories(){return this._repositories.map(n=>n.repository)}get visibleRepositories(){return this._repositoriesSortKey==="discoveryTime"?this._repositories.filter(n=>n.selectionIndex!==-1).sort((n,a)=>n.selectionIndex-a.selectionIndex).map(n=>n.repository):this._repositories.filter(n=>n.selectionIndex!==-1).map(n=>n.repository)}set visibleRepositories(n){const a=new Set(n),o=new Set,g=new Set;for(const h of this._repositories)!a.has(h.repository)&&h.selectionIndex!==-1&&(h.selectionIndex=-1,g.add(h.repository)),a.has(h.repository)&&(h.selectionIndex===-1&&o.add(h.repository),h.selectionIndex=n.indexOf(h.repository));o.size===0&&g.size===0||(this._onDidSetVisibleRepositories.fire({added:o,removed:g}),this._repositories.find(h=>h.focused&&h.selectionIndex===-1)&&this.focus(this._repositories.find(h=>h.selectionIndex!==-1)?.repository))}get focusedRepository(){return this._repositories.find(n=>n.focused)?.repository}constructor(n,a,o,g,h,v){this.configurationService=g,this.storageService=h,this.workspaceContextService=v,this.didFinishLoading=!1,this.didSelectRepository=!1,this.disposables=new t.DisposableStore,this._repositories=[],this._onDidChangeRepositories=new p.Emitter,this.onDidChangeRepositories=this._onDidChangeRepositories.event,this._onDidSetVisibleRepositories=new p.Emitter,this.onDidChangeVisibleRepositories=p.Event.any(this._onDidSetVisibleRepositories.event,p.Event.debounce(this._onDidChangeRepositories.event,(m,w)=>{if(!m)return w;const D=new Set(m.added),y=new Set(m.removed);for(const T of w.added)y.has(T)?y.delete(T):D.add(T);for(const T of w.removed)D.has(T)?D.delete(T):y.add(T);return{added:D,removed:y}},0,void 0,void 0,this.disposables)),this._onDidFocusRepository=new p.Emitter,this.onDidFocusRepository=this._onDidFocusRepository.event,this.menus=o.createInstance(E.SCMMenus);try{this.previousState=JSON.parse(h.get("scm:view:visibleRepositories",1,""))}catch{}this._repositoriesSortKey=this.previousState?.sortKey??this.getViewSortOrder(),this._sortKeyContextKey=e.RepositoryContextKeys.RepositorySortKey.bindTo(a),this._sortKeyContextKey.set(this._repositoriesSortKey),n.onDidAddRepository(this.onDidAddRepository,this,this.disposables),n.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables);for(const m of n.repositories)this.onDidAddRepository(m);h.onWillSaveState(this.onWillSaveState,this,this.disposables)}onDidAddRepository(n){this.didFinishLoading||this.eventuallyFinishLoading();const a={repository:n,discoveryTime:Date.now(),focused:!1,selectionIndex:-1};let o=A.Iterable.empty();if(this.previousState){const h=this.previousState.all.indexOf(c(n.provider));if(h===-1){const v=[];this.insertRepositoryView(this._repositories,a),this._repositories.forEach((m,w)=>{m.selectionIndex===-1&&v.push(m.repository),m.selectionIndex=w}),this._onDidChangeRepositories.fire({added:v,removed:A.Iterable.empty()}),this.didSelectRepository=!1;return}if(this.previousState.visible.indexOf(h)===-1){if(this.didSelectRepository){this.insertRepositoryView(this._repositories,a),this._onDidChangeRepositories.fire({added:A.Iterable.empty(),removed:A.Iterable.empty()});return}}else this.didSelectRepository||(o=[...this.visibleRepositories],this._repositories.forEach(v=>{v.focused=!1,v.selectionIndex=-1}),this.didSelectRepository=!0)}const g=this.getMaxSelectionIndex();this.insertRepositoryView(this._repositories,{...a,selectionIndex:g+1}),this._onDidChangeRepositories.fire({added:[a.repository],removed:o}),this._repositories.find(h=>h.focused)||this.focus(n)}onDidRemoveRepository(n){this.didFinishLoading||this.eventuallyFinishLoading();const a=this._repositories.findIndex(h=>h.repository===n);if(a===-1)return;let o=A.Iterable.empty();const g=this._repositories.splice(a,1);this._repositories.length>0&&this.visibleRepositories.length===0&&(this._repositories[0].selectionIndex=0,o=[this._repositories[0].repository]),this._onDidChangeRepositories.fire({added:o,removed:g.map(h=>h.repository)}),g.length===1&&g[0].focused&&this.visibleRepositories.length>0&&this.focus(this.visibleRepositories[0])}isVisible(n){return this._repositories.find(a=>a.repository===n)?.selectionIndex!==-1}toggleVisibility(n,a){if(typeof a>"u")a=!this.isVisible(n);else if(this.isVisible(n)===a)return;if(a)this.visibleRepositories=[...this.visibleRepositories,n];else{const o=this.visibleRepositories.indexOf(n);o>-1&&(this.visibleRepositories=[...this.visibleRepositories.slice(0,o),...this.visibleRepositories.slice(o+1)])}}toggleSortKey(n){this._repositoriesSortKey=n,this._sortKeyContextKey.set(this._repositoriesSortKey),this._repositories.sort(this.compareRepositories.bind(this)),this._onDidChangeRepositories.fire({added:A.Iterable.empty(),removed:A.Iterable.empty()})}focus(n){n&&!this.isVisible(n)||(this._repositories.forEach(a=>a.focused=a.repository===n),this._repositories.find(a=>a.focused)&&this._onDidFocusRepository.fire(n))}compareRepositories(n,a){if(this._repositoriesSortKey==="discoveryTime")return n.discoveryTime-a.discoveryTime;if(this._repositoriesSortKey==="path"&&n.repository.provider.rootUri&&a.repository.provider.rootUri)return(0,C.comparePaths)(n.repository.provider.rootUri.fsPath,a.repository.provider.rootUri.fsPath);const o=l(this.workspaceContextService,n.repository),g=l(this.workspaceContextService,a.repository),h=(0,C.compareFileNames)(o,g);return h===0&&n.repository.provider.rootUri&&a.repository.provider.rootUri?(0,C.comparePaths)(n.repository.provider.rootUri.fsPath,a.repository.provider.rootUri.fsPath):h}getMaxSelectionIndex(){return this._repositories.length===0?-1:Math.max(...this._repositories.map(n=>n.selectionIndex))}getViewSortOrder(){switch(this.configurationService.getValue("scm.repositories.sortOrder")){case"discovery time":return"discoveryTime";case"name":return"name";case"path":return"path";default:return"discoveryTime"}}insertRepositoryView(n,a){const o=(0,u.binarySearch)(n,a,this.compareRepositories.bind(this));n.splice(o<0?~o:o,0,a)}onWillSaveState(){if(!this.didFinishLoading)return;const n=this.repositories.map(g=>c(g.provider)),a=this.visibleRepositories.map(g=>n.indexOf(c(g.provider))),o=JSON.stringify({all:n,sortKey:this._repositoriesSortKey,visible:a});this.storageService.store("scm:view:visibleRepositories",o,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()}};we([(0,b.debounce)(5e3)],s.prototype,"eventuallyFinishLoading",null),s=we([F(0,R.ISCMService),F(1,f.IContextKeyService),F(2,k.IInstantiationService),F(3,i.IConfigurationService),F(4,I.IStorageService),F(5,S.IWorkspaceContextService)],s),e.SCMViewService=s}),define(ae[2385],le([1,0,2,6,216,25,7,23,405,88]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMService=void 0;let S=class ur{get value(){return this._value}get placeholder(){return this._placeholder}set placeholder(i){this._placeholder=i,this._onDidChangePlaceholder.fire(i)}get enabled(){return this._enabled}set enabled(i){this._enabled=i,this._onDidChangeEnablement.fire(i)}get visible(){return this._visible}set visible(i){this._visible=i,this._onDidChangeVisibility.fire(i)}setFocus(){this._onDidChangeFocus.fire()}showValidationMessage(i,f){this._onDidChangeValidationMessage.fire({message:i,type:f})}get validateInput(){return this._validateInput}set validateInput(i){this._validateInput=i,this._onDidChangeValidateInput.fire()}static migrateAndGarbageCollectStorage(i){if(ur.didGarbageCollect)return;const f=b.Iterable.filter(i.keys(-1,0),l=>l.startsWith("scm/input:"));for(const l of f)try{const s=i.get(l,-1,""),d=JSON.parse(s);Array.isArray(d)?d.length===0||d.length===1&&d[0]===""?i.remove(l,-1):i.store(l,JSON.stringify({timestamp:new Date().getTime(),history:d}),-1,1):i.store(l,s,-1,1)}catch{i.remove(l,-1)}const c=b.Iterable.filter(i.keys(-1,1),l=>l.startsWith("scm/input:"));for(const l of c)try{const s=JSON.parse(i.get(l,-1,""));Array.isArray(s?.history)&&Number.isInteger(s?.timestamp)&&new Date().getTime()-s?.timestamp>2592e6&&i.remove(l,-1)}catch{i.remove(l,-1)}ur.didGarbageCollect=!0}constructor(i,f){this.repository=i,this.storageService=f,this._value="",this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._placeholder="",this._onDidChangePlaceholder=new p.Emitter,this.onDidChangePlaceholder=this._onDidChangePlaceholder.event,this._enabled=!0,this._onDidChangeEnablement=new p.Emitter,this.onDidChangeEnablement=this._onDidChangeEnablement.event,this._visible=!0,this._onDidChangeVisibility=new p.Emitter,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDidChangeFocus=new p.Emitter,this.onDidChangeFocus=this._onDidChangeFocus.event,this._onDidChangeValidationMessage=new p.Emitter,this.onDidChangeValidationMessage=this._onDidChangeValidationMessage.event,this._validateInput=()=>Promise.resolve(void 0),this._onDidChangeValidateInput=new p.Emitter,this.onDidChangeValidateInput=this._onDidChangeValidateInput.event,ur.migrateAndGarbageCollectStorage(f);const c=this.repository.provider.rootUri?`scm/input:${this.repository.provider.label}:${this.repository.provider.rootUri?.path}`:void 0;let l;if(c)try{l=JSON.parse(this.storageService.get(c,-1,"")).history,l=l?.map(s=>s??"")}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,c&&this.storageService.onWillSaveState(s=>{if(this.historyNavigator.isAtEnd()&&this.saveValue(),!this.didChangeHistory)return;const d=[...this.historyNavigator].map(n=>n??"");d.length===0||d.length===1&&d[0]===""?f.remove(c,-1):f.store(c,JSON.stringify({timestamp:new Date().getTime(),history:d}),-1,1),this.didChangeHistory=!1})}setValue(i,f,c){i!==this._value&&(f||(this.saveValue(),this.historyNavigator.add(i),this.didChangeHistory=!0),this._value=i,this._onDidChange.fire({value:i,reason:c}))}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,R.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,R.SCMInputChangeReason.HistoryPrevious)}saveValue(){const i=this.historyNavigator.replaceLast(this._value);this.didChangeHistory=this.didChangeHistory||i!==this._value}};S.didGarbageCollect=!1,S=we([F(1,E.IStorageService)],S);let C=class{get selected(){return this._selected}constructor(i,f,c,l){this.id=i,this.provider=f,this.disposable=c,this.storageService=l,this._selected=!1,this._onDidChangeSelection=new p.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.input=new S(this,this.storageService)}setSelected(i){this._selected!==i&&(this._selected=i,this._onDidChangeSelection.fire(i))}dispose(){this.disposable.dispose(),this.provider.dispose()}};C=we([F(3,E.IStorageService)],C);let r=class{get repositories(){return this._repositories.values()}get repositoryCount(){return this._repositories.size}constructor(i,f,c){this.logService=i,this.storageService=c,this._repositories=new Map,this._onDidAddProvider=new p.Emitter,this.onDidAddRepository=this._onDidAddProvider.event,this._onDidRemoveProvider=new p.Emitter,this.onDidRemoveRepository=this._onDidRemoveProvider.event,this.providerCount=f.createKey("scm.providerCount",0)}registerSCMProvider(i){if(this.logService.trace("SCMService#registerSCMProvider"),this._repositories.has(i.id))throw new Error(`SCM Provider ${i.id} already exists.`);const f=(0,t.toDisposable)(()=>{this._repositories.delete(i.id),this._onDidRemoveProvider.fire(c),this.providerCount.set(this._repositories.size)}),c=new C(i.id,i,f,this.storageService);return this._repositories.set(i.id,c),this._onDidAddProvider.fire(c),this.providerCount.set(this._repositories.size),c}getRepository(i){return this._repositories.get(i)}};r=we([F(0,A.ILogService),F(1,k.IContextKeyService),F(2,E.IStorageService)],r),e.SCMService=r}),define(ae[880],le([1,0,10,197,140,29,6,1839,265,372,8,7,38,73,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExcludePatternInputWidget=e.IncludePatternInputWidget=e.PatternInputWidget=void 0;let f=class extends R.Widget{constructor(d,n,a=Object.create(null),o,g,h,v){super(),this.contextViewProvider=n,this.themeService=o,this.contextKeyService=g,this.configurationService=h,this.keybindingService=v,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:E.localize(0,null),...a},this.width=a.width??100,this.render(a),d.appendChild(this.domNode)}dispose(){super.dispose(),this.inputFocusTracker?.dispose()}setWidth(d){this.width=d,this.domNode.style.width=this.width+"px",this.contextViewProvider.layout(),this.setInputWidth()}getValue(){return this.inputBox.value}setValue(d){this.inputBox.value!==d&&(this.inputBox.value=d)}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(d){this.inputBox.style(d)}render(d){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:d.placeholder,showPlaceholderOnFocus:d.showPlaceholderOnFocus,tooltip:d.tooltip,ariaLabel:d.ariaLabel,validationOptions:{validation:void 0},history:d.history||[],showHistoryHint:()=>(0,b.showHistoryKeybindingHint)(this.keybindingService)},this.contextKeyService),this._register((0,u.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 n=document.createElement("div");n.className="controls",this.renderSubcontrols(n),this.domNode.appendChild(n),this.setInputWidth()}renderSubcontrols(d){}onInputKeyUp(d){switch(d.keyCode){case 3:this.onSearchSubmit(),this._onSubmit.fire(!1);return;case 9:this._onCancel.fire();return}}};f.OPTION_CHANGE="optionChange",f=we([F(3,i.IThemeService),F(4,C.IContextKeyService),F(5,S.IConfigurationService),F(6,r.IKeybindingService)],f),e.PatternInputWidget=f;let c=class extends f{constructor(d,n,a=Object.create(null),o,g,h,v){super(d,n,a,o,g,h,v),this._onChangeSearchInEditorsBoxEmitter=this._register(new k.Emitter),this.onChangeSearchInEditorsBox=this._onChangeSearchInEditorsBoxEmitter.event}dispose(){super.dispose(),this.useSearchInEditorsBox.dispose()}onlySearchInOpenEditors(){return this.useSearchInEditorsBox.checked}setOnlySearchInOpenEditors(d){this.useSearchInEditorsBox.checked=d,this._onChangeSearchInEditorsBoxEmitter.fire()}getSubcontrolsWidth(){return super.getSubcontrolsWidth()+this.useSearchInEditorsBox.width()}renderSubcontrols(d){this.useSearchInEditorsBox=this._register(new p.Toggle({icon:A.Codicon.book,title:E.localize(1,null),isChecked:!1})),this._register(this.useSearchInEditorsBox.onChange(n=>{this._onChangeSearchInEditorsBoxEmitter.fire(),n||this.inputBox.focus()})),this._register((0,u.attachToggleStyler)(this.useSearchInEditorsBox,this.themeService)),d.appendChild(this.useSearchInEditorsBox.domNode),super.renderSubcontrols(d)}};c=we([F(3,i.IThemeService),F(4,C.IContextKeyService),F(5,S.IConfigurationService),F(6,r.IKeybindingService)],c),e.IncludePatternInputWidget=c;let l=class extends f{constructor(d,n,a=Object.create(null),o,g,h,v){super(d,n,a,o,g,h,v),this._onChangeIgnoreBoxEmitter=this._register(new k.Emitter),this.onChangeIgnoreBox=this._onChangeIgnoreBoxEmitter.event}dispose(){super.dispose(),this.useExcludesAndIgnoreFilesBox.dispose()}useExcludesAndIgnoreFiles(){return this.useExcludesAndIgnoreFilesBox.checked}setUseExcludesAndIgnoreFiles(d){this.useExcludesAndIgnoreFilesBox.checked=d,this._onChangeIgnoreBoxEmitter.fire()}getSubcontrolsWidth(){return super.getSubcontrolsWidth()+this.useExcludesAndIgnoreFilesBox.width()}renderSubcontrols(d){this.useExcludesAndIgnoreFilesBox=this._register(new p.Toggle({icon:A.Codicon.exclude,actionClassName:"useExcludesAndIgnoreFiles",title:E.localize(2,null),isChecked:!0})),this._register(this.useExcludesAndIgnoreFilesBox.onChange(n=>{this._onChangeIgnoreBoxEmitter.fire(),n||this.inputBox.focus()})),this._register((0,u.attachToggleStyler)(this.useExcludesAndIgnoreFilesBox,this.themeService)),d.appendChild(this.useExcludesAndIgnoreFilesBox.domNode),super.renderSubcontrols(d)}};l=we([F(3,i.IThemeService),F(4,C.IContextKeyService),F(5,S.IConfigurationService),F(6,r.IKeybindingService)],l),e.ExcludePatternInputWidget=l}),define(ae[387],le([1,0,29,1843,63]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchNewEditorIcon=e.searchViewIcon=e.searchStopIcon=e.searchClearIcon=e.searchShowAsList=e.searchShowAsTree=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,R.registerIcon)("search-details",t.Codicon.ellipsis,(0,p.localize)(0,null)),e.searchShowContextIcon=(0,R.registerIcon)("search-show-context",t.Codicon.listSelection,(0,p.localize)(1,null)),e.searchHideReplaceIcon=(0,R.registerIcon)("search-hide-replace",t.Codicon.chevronRight,(0,p.localize)(2,null)),e.searchShowReplaceIcon=(0,R.registerIcon)("search-show-replace",t.Codicon.chevronDown,(0,p.localize)(3,null)),e.searchReplaceAllIcon=(0,R.registerIcon)("search-replace-all",t.Codicon.replaceAll,(0,p.localize)(4,null)),e.searchReplaceIcon=(0,R.registerIcon)("search-replace",t.Codicon.replace,(0,p.localize)(5,null)),e.searchRemoveIcon=(0,R.registerIcon)("search-remove",t.Codicon.close,(0,p.localize)(6,null)),e.searchRefreshIcon=(0,R.registerIcon)("search-refresh",t.Codicon.refresh,(0,p.localize)(7,null)),e.searchCollapseAllIcon=(0,R.registerIcon)("search-collapse-results",t.Codicon.collapseAll,(0,p.localize)(8,null)),e.searchExpandAllIcon=(0,R.registerIcon)("search-expand-results",t.Codicon.expandAll,(0,p.localize)(9,null)),e.searchShowAsTree=(0,R.registerIcon)("search-tree",t.Codicon.listTree,(0,p.localize)(10,null)),e.searchShowAsList=(0,R.registerIcon)("search-list",t.Codicon.listFlat,(0,p.localize)(11,null)),e.searchClearIcon=(0,R.registerIcon)("search-clear-results",t.Codicon.clearAll,(0,p.localize)(12,null)),e.searchStopIcon=(0,R.registerIcon)("search-stop",t.Codicon.searchStop,(0,p.localize)(13,null)),e.searchViewIcon=(0,R.registerIcon)("search-view-icon",t.Codicon.search,(0,p.localize)(14,null)),e.searchNewEditorIcon=(0,R.registerIcon)("search-new-editor",t.Codicon.newFile,(0,p.localize)(15,null))}),define(ae[2386],le([1,0,356,52]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileQueryCacheState=void 0;var R;(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"})(R||(R={}));class A{get cacheKey(){return this.loadingPhase===R.Loaded||!this.previousCacheState?this._cacheKey:this.previousCacheState.cacheKey}get isLoaded(){const E=this.loadingPhase===R.Loaded;return E||!this.previousCacheState?E:this.previousCacheState.isLoaded}get isUpdating(){const E=this.loadingPhase===R.Loading;return E||!this.previousCacheState?E:this.previousCacheState.isUpdating}constructor(E,I,b,S){if(this.cacheQuery=E,this.loadFn=I,this.disposeFn=b,this.previousCacheState=S,this._cacheKey=t.defaultGenerator.nextId(),this.query=this.cacheQuery(this._cacheKey),this.loadingPhase=R.Created,this.previousCacheState){const C=Object.assign({},this.query,{cacheKey:null}),r=Object.assign({},this.previousCacheState.query,{cacheKey:null});(0,p.equals)(C,r)||(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}load(){return this.isUpdating?this:(this.loadingPhase=R.Loading,this.loadPromise=(async()=>{try{await this.loadFn(this.query),this.loadingPhase=R.Loaded,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}catch(E){throw this.loadingPhase=R.Errored,E}})(),this)}dispose(){this.loadPromise?(async()=>{try{await this.loadPromise}catch{}this.loadingPhase=R.Disposed,this.disposeFn(this._cacheKey)})():this.loadingPhase=R.Disposed,this.previousCacheState&&(this.previousCacheState.dispose(),this.previousCacheState=void 0)}}e.FileQueryCacheState=A}),define(ae[341],le([1,0,7]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InTreeViewKey=e.ViewHasSomeCollapsibleKey=e.ViewHasFilePatternKey=e.ViewHasReplacePatternKey=e.ViewHasSearchPatternKey=e.MatchFocusKey=e.ResourceFolderFocusKey=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.ExcludeFolderFromSearchId=e.ToggleQueryDetailsActionId=e.ViewAsListActionId=e.ViewAsTreeActionId=e.ClearSearchResultsActionId=e.ExpandSearchResultsActionId=e.CollapseSearchResultsActionId=e.ToggleSearchOnTypeActionId=e.FocusPreviousSearchResultActionId=e.FocusNextSearchResultActionId=e.RefreshSearchResultsActionId=e.CancelSearchActionId=e.ShowAllSymbolsActionId=e.ReplaceInFilesActionId=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.ReplaceInFilesActionId="workbench.action.replaceInFiles",e.ShowAllSymbolsActionId="workbench.action.showAllSymbols",e.CancelSearchActionId="search.action.cancel",e.RefreshSearchResultsActionId="search.action.refreshSearchResults",e.FocusNextSearchResultActionId="search.action.focusNextSearchResult",e.FocusPreviousSearchResultActionId="search.action.focusPreviousSearchResult",e.ToggleSearchOnTypeActionId="workbench.action.toggleSearchOnType",e.CollapseSearchResultsActionId="search.action.collapseSearchResults",e.ExpandSearchResultsActionId="search.action.expandSearchResults",e.ClearSearchResultsActionId="search.action.clearSearchResults",e.ViewAsTreeActionId="search.action.viewAsTree",e.ViewAsListActionId="search.action.viewAsList",e.ToggleQueryDetailsActionId="workbench.action.search.toggleQueryDetails",e.ExcludeFolderFromSearchId="search.action.excludeFromSearch",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.ResourceFolderFocusKey=new t.RawContextKey("folderMatchWithResourceFocus",!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),e.InTreeViewKey=new t.RawContextKey("inTreeView",!1)}),define(ae[451],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IReplaceService=void 0,e.IReplaceService=(0,t.createDecorator)("replaceService")}),define(ae[650],le([1,0,6,23,13,5]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchHistoryService=e.ISearchHistoryService=void 0,e.ISearchHistoryService=(0,A.createDecorator)("searchHistoryService");let k=class Fn{constructor(I){this.storageService=I,this._onDidClearHistory=new t.Emitter,this.onDidClearHistory=this._onDidClearHistory.event}clearHistory(){this.storageService.remove(Fn.SEARCH_HISTORY_KEY,1),this._onDidClearHistory.fire()}load(){let I;const b=this.storageService.get(Fn.SEARCH_HISTORY_KEY,1);if(b)try{I=JSON.parse(b)}catch{}return I||{}}save(I){(0,R.isEmptyObject)(I)?this.storageService.remove(Fn.SEARCH_HISTORY_KEY,1):this.storageService.store(Fn.SEARCH_HISTORY_KEY,JSON.stringify(I),1,0)}};k.SEARCH_HISTORY_KEY="workbench.search.history",k=we([F(0,p.IStorageService)],k),e.SearchHistoryService=k}),define(ae[342],le([1,0,7]),function(J,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(ae[534],le([1,0,40,1853,15]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetEditorAction=e.SnippetsAction=void 0;const A={category:{value:(0,p.localize)(0,null),original:"Snippets"}};class k extends R.Action2{constructor(b){super({...A,...b})}}e.SnippetsAction=k;class E extends t.EditorAction2{constructor(b){super({...A,...b})}}e.SnippetEditorAction=E}),define(ae[288],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISnippetsService=void 0,e.ISnippetsService=(0,t.createDecorator)("snippetService")}),define(ae[881],le([1,0,1860,288,48,29,6]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pickSnippet=void 0;async function E(I,b){const S=I.get(p.ISnippetsService),C=I.get(R.IQuickInputService);let r;Array.isArray(b)?r=b:r=await S.getSnippets(b,{includeDisabledSnippets:!0,includeNoPrefixSnippets:!0}),r.sort((c,l)=>c.snippetSource-l.snippetSource);const u=()=>{const c=[];let l;for(const s of r){const d={label:s.prefix||s.name,detail:s.description,snippet:s};if(!l||l.snippetSource!==s.snippetSource||l.source!==s.source){let n="";switch(s.snippetSource){case 1:n=t.localize(0,null);break;case 3:n=s.source;break;case 2:n=t.localize(1,null);break}c.push({type:"separator",label:n})}s.snippetSource===3&&(S.isEnabled(s)?d.buttons=[{iconClass:A.Codicon.eyeClosed.classNames,tooltip:t.localize(2,null)}]:(d.description=t.localize(3,null),d.buttons=[{iconClass:A.Codicon.eye.classNames,tooltip:t.localize(4,null)}])),c.push(d),l=s}return c},i=C.createQuickPick();i.placeholder=t.localize(5,null),i.matchOnDetail=!0,i.ignoreFocusOut=!1,i.keepScrollPosition=!0,i.onDidTriggerItemButton(c=>{const l=S.isEnabled(c.item.snippet);S.updateEnablement(c.item.snippet,!l),i.items=u()}),i.items=u(),i.items.length||(i.validationMessage=t.localize(6,null)),i.show(),await Promise.race([k.Event.toPromise(i.onDidAccept),k.Event.toPromise(i.onDidHide)]);const f=i.selectedItems[0]?.snippet;return i.dispose(),f}e.pickSnippet=E}),define(ae[882],le([1,0,59,168,1857,93,7,5,534,881,288]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SurroundWithSnippetEditorAction=e.getSurroundableSnippets=void 0;async function C(u,i,f,c){const{lineNumber:l,column:s}=f;i.tokenization.tokenizeIfCheap(l);const d=i.getLanguageIdAtPosition(l,s);return(await u.getSnippets(d,{includeNoPrefixSnippets:!0,includeDisabledSnippets:c})).filter(a=>a.usesSelection)}e.getSurroundableSnippets=C;class r extends I.SnippetEditorAction{constructor(){super({...r.options,precondition:k.ContextKeyExpr.and(t.EditorContextKeys.writable,t.EditorContextKeys.hasNonEmptySelection),f1:!0})}async runEditorCommand(i,f){if(!f.hasModel())return;const c=i.get(E.IInstantiationService),l=i.get(S.ISnippetsService),s=i.get(A.IClipboardService),d=await C(l,f.getModel(),f.getPosition(),!0);if(!d.length)return;const n=await c.invokeFunction(b.pickSnippet,d);if(!n)return;let a;n.needsClipboard&&(a=await s.readText()),f.focus(),p.SnippetController2.get(f)?.insert(n.codeSnippet,{clipboardText:a}),l.updateUsageTimestamp(n)}}e.SurroundWithSnippetEditorAction=r,r.options={id:"editor.action.surroundWithSnippet",title:{value:(0,R.localize)(0,null),original:"Surround With Snippet..."}}}),define(ae[651],le([1,0,123,1862,53,207,831,11,18,13,16,88]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetFile=e.SnippetSource=e.Snippet=void 0;class r{constructor(s){this.isBogous=!1,this.isTrivial=!1,this.usesClipboardVariable=!1,this.usesSelectionVariable=!1,this.codeSnippet=s;const d=new A.SnippetParser().parse(s,!1),n=new Map;let a=0;for(const g of d.placeholders)a=Math.max(a,g.index);if(d.placeholders.length===0)this.isTrivial=!0;else if(a===0){const g=(0,S.tail)(d.children);this.isTrivial=g instanceof A.Placeholder&&g.isFinalTabstop}const o=[...d.children];for(;o.length>0;){const g=o.shift();if(g instanceof A.Variable){if(g.children.length===0&&!k.KnownSnippetVariableNames[g.name]){const h=n.has(g.name)?n.get(g.name):++a;n.set(g.name,h);const v=new A.Placeholder(h).appendChild(new A.Text(g.name));d.replace(g,[v]),this.isBogous=!0}switch(g.name){case"CLIPBOARD":this.usesClipboardVariable=!0;break;case"SELECTION":case"TM_SELECTED_TEXT":this.usesSelectionVariable=!0;break}}else o.push(...g.children)}this.isBogous&&(this.codeSnippet=d.toTextmateString())}}class u{constructor(s,d,n,a,o,g,h,v,m,w){this.isFileTemplate=s,this.scopes=d,this.name=n,this.prefix=a,this.description=o,this.body=g,this.source=h,this.snippetSource=v,this.snippetIdentifier=m,this.extensionId=w,this.prefixLow=a.toLowerCase(),this._bodyInsights=new E.IdleValue(()=>new r(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}}e.Snippet=u;function i(l){return(0,b.isObject)(l)&&Boolean(l.body)}var f;(function(l){l[l.User=1]="User",l[l.Workspace=2]="Workspace",l[l.Extension=3]="Extension"})(f=e.SnippetSource||(e.SnippetSource={}));class c{constructor(s,d,n,a,o,g){this.source=s,this.location=d,this.defaultScopes=n,this._extension=a,this._fileService=o,this._extensionResourceLoaderService=g,this.data=[],this.isGlobalSnippets=(0,R.extname)(d.path)===".code-snippets",this.isUserSnippets=!this._extension}select(s,d){this.isGlobalSnippets||!this.isUserSnippets?this._scopeSelect(s,d):this._filepathSelect(s,d)}_filepathSelect(s,d){s+".json"===(0,R.basename)(this.location.path)&&d.push(...this.data)}_scopeSelect(s,d){for(const a of this.data){const o=a.scopes.length;if(o===0)d.push(a);else for(let g=0;g<o;g++)if(a.scopes[g]===s){d.push(a);break}}const n=s.lastIndexOf(".");n>=0&&this._scopeSelect(s.substring(0,n),d)}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(s=>{const d=(0,t.parse)(s);if((0,t.getNodeType)(d)==="object")for(const[n,a]of Object.entries(d))if(i(a))this._parseSnippet(n,a,this.data);else for(const[o,g]of Object.entries(a))this._parseSnippet(o,g,this.data);return this})),this._loadPromise}reset(){this._loadPromise=void 0,this.data.length=0}_parseSnippet(s,d,n){let{isFileTemplate:a,prefix:o,body:g,description:h}=d;if(o||(o=""),Array.isArray(g)&&(g=g.join(` `)),typeof g!="string")return;Array.isArray(h)&&(h=h.join(` `));let v;this.defaultScopes?v=this.defaultScopes:typeof d.scope=="string"?v=d.scope.split(",").map(w=>w.trim()).filter(Boolean):v=[];let m;this._extension?m=this._extension.displayName||this._extension.name:this.source===2?m=(0,p.localize)(0,null):this.isGlobalSnippets?m=(0,p.localize)(1,null):m=(0,p.localize)(2,null);for(const w of C.Iterable.wrap(o))n.push(new u(Boolean(a),v,s,w,h,g,m,this.source,this._extension?`${(0,I.relativePath)(this._extension.extensionLocation,this.location)}/${s}`:`${(0,R.basename)(this.location.path)}/${s}`,this._extension?.identifier))}}e.SnippetFile=c}),define(ae[2387],le([1,0,59,42,168,1856,93,5,534,881,288,651]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsertSnippetAction=void 0;class r{static fromUser(f){if(!f||typeof f!="object")return r._empty;let{snippet:c,name:l,langId:s}=f;return typeof c!="string"&&(c=void 0),typeof l!="string"&&(l=void 0),typeof s!="string"&&(s=void 0),new r(c,l,s)}constructor(f,c,l){this.snippet=f,this.name=c,this.langId=l}}r._empty=new r(void 0,void 0,void 0);class u extends I.SnippetEditorAction{constructor(){super({id:"editor.action.insertSnippet",title:{value:A.localize(0,null),original:"Insert Snippet"},f1:!0,precondition:t.EditorContextKeys.writable,description:{description:"Insert Snippet",args:[{name:"args",schema:{type:"object",properties:{snippet:{type:"string"},langId:{type:"string"},name:{type:"string"}}}}]}})}async runEditorCommand(f,c,l){const s=f.get(p.ILanguageService),d=f.get(S.ISnippetsService);if(!c.hasModel())return;const n=f.get(k.IClipboardService),a=f.get(E.IInstantiationService),o=await new Promise((h,v)=>{const{lineNumber:m,column:w}=c.getPosition(),{snippet:D,name:y,langId:T}=r.fromUser(l[0]);if(D)return h(new C.Snippet(!1,[],"","","",D,"",1,`random/${Math.random()}`));let _;if(T){if(!s.isRegisteredLanguageId(T))return h(void 0);_=T}else c.getModel().tokenization.tokenizeIfCheap(m),_=c.getModel().getLanguageIdAtPosition(m,w),s.getLanguageName(_)||(_=c.getModel().getLanguageId());y?d.getSnippets(_,{includeNoPrefixSnippets:!0}).then(L=>L.find(M=>M.name===y)).then(h,v):h(a.invokeFunction(b.pickSnippet,_))});if(!o)return;let g;o.needsClipboard&&(g=await n.readText()),c.focus(),R.SnippetController2.get(c)?.insert(o.codeSnippet,{clipboardText:g}),d.updateUsageTimestamp(o)}}e.InsertSnippetAction=u}),define(ae[883],le([1,0,113,28,20,42,207,1859,288,651,96,146,122,299,31]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetCompletionProvider=e.SnippetCompletion=void 0;const f="_snippet.markAsUsed";i.CommandsRegistry.registerCommand(f,(s,...d)=>{const n=s.get(I.ISnippetsService),[a]=d;a instanceof b.Snippet&&n.updateUsageTimestamp(a)});class c{constructor(d,n){this.snippet=d,this.label={label:d.prefix,description:d.name},this.detail=(0,E.localize)(0,null,d.description||d.name,d.source),this.insertText=d.codeSnippet,this.extensionId=d.extensionId,this.range=n,this.sortText=`${d.snippetSource===3?"z":"a"}-${d.prefix}`,this.kind=27,this.insertTextRules=4,this.command={id:f,title:"",arguments:[d]}}resolve(){return this.documentation=new t.MarkdownString().appendCodeblock("",k.SnippetParser.asInsertText(this.snippet.codeSnippet)),this}static compareByLabel(d,n){return(0,p.compare)(d.label.label,n.label.label)}}e.SnippetCompletion=c;let l=class{constructor(d,n,a){this._languageService=d,this._snippets=n,this._languageConfigurationService=a,this._debugDisplayName="snippetCompletions"}async provideCompletionItems(d,n,a){const o=new C.StopWatch(!0),g=this._getLanguageIdAtPosition(d,n),h=this._languageConfigurationService.getLanguageConfiguration(g),v=new Set(await this._snippets.getSnippets(g)),m=d.getLineContent(n.lineNumber).toLowerCase(),w=d.getWordUntilPosition(n).word.toLowerCase(),D=[],y=n.column-1,T=a.triggerCharacter?.toLowerCase()??"";e:for(const _ of v){if(a.triggerKind===1&&!_.prefixLow.startsWith(T))continue e;const L=(0,u.getWordAtText)(1,h.getWordDefinition(),_.prefixLow,0);if(w&&L&&!(0,S.isPatternInWord)(w,0,w.length,_.prefixLow,0,_.prefixLow.length))continue e;t:for(let M=Math.max(0,y-_.prefixLow.length);M<m.length;M++){if(!(0,S.isPatternInWord)(m,M,y,_.prefixLow,0,_.prefixLow.length))continue t;const O=_.prefixLow.length-(y-M),N=(0,p.compareSubstring)(m,_.prefixLow,y,y+O,y-M),P=n.with(void 0,M+1);if(w&&n.equals(P))continue e;let B=N===0?n.column+O:n.column;y<m.length&&h.getAutoClosingPairs().autoClosingPairsCloseSingleChar.get(m[y])?.some(W=>W.open===m[P.column-1]&&_.prefix.startsWith(W.open)&&_.prefix[_.prefix.length-1]===W.close)&&B++;const V=R.Range.fromPositions(P,{lineNumber:n.lineNumber,column:B}),z=V.setEndPosition(n.lineNumber,n.column);D.push(new c(_,{replace:V,insert:z})),v.delete(_);break}}if(!T&&(/\s/.test(m[n.column-2])||!m))for(const L of v){const M=R.Range.fromPositions(n),O=m.indexOf(L.prefixLow,y)===y?M.setEndPosition(n.lineNumber,n.column+L.prefixLow.length):M;D.push(new c(L,{replace:O,insert:M}))}D.sort(c.compareByLabel);for(let _=0;_<D.length;_++){const L=D[_];let M=_+1;for(;M<D.length&&L.label===D[M].label;M++)D[M].label.label=(0,E.localize)(1,null,D[M].label.label,D[M].snippet.name);M>_+1&&(D[_].label.label=(0,E.localize)(2,null,D[_].label.label,D[_].snippet.name),_=M)}return{suggestions:D,duration:o.elapsed()}}resolveCompletionItem(d){return d instanceof c?d.resolve():d}_getLanguageIdAtPosition(d,n){d.tokenization.tokenizeIfCheap(n.lineNumber);let a=d.getLanguageIdAtPosition(n.lineNumber,n.column);return this._languageService.getLanguageName(a)||(a=d.getLanguageId()),a}};l=we([F(0,A.ILanguageService),F(1,I.ISnippetsService),F(2,r.ILanguageConfigurationService)],l),e.SnippetCompletionProvider=l}),define(ae[884],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISplashStorageService=void 0,e.ISplashStorageService=(0,t.createDecorator)("ISplashStorageService")}),define(ae[2388],le([1,0]),function(J,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(ae[535],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTagsService=void 0,e.IWorkspaceTagsService=(0,t.createDecorator)("workspaceTagsService")}),define(ae[2389],le([1,0,82,23,34,19,27,16,535,13,285,1645]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicWorkspaceRecommendations=void 0;const r="extensionsAssistant/dynamicWorkspaceRecommendations",u=1e3*60*60*24;let i=class extends S.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(c,l,s,d,n,a){super(),this.extensionTipsService=c,this.workspaceTagsService=l,this.contextService=s,this.fileService=d,this.telemetryService=n,this.storageService=a,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 c=this.contextService.getWorkspace().folders[0],l=this.getCachedDynamicWorkspaceRecommendations();if(l){this._recommendations=l.map(o=>this.toExtensionRecommendation(o,c)),this.telemetryService.publicLog2("dynamicWorkspaceRecommendations",{count:this._recommendations.length,cache:1});return}const[s,d]=await Promise.all([this.workspaceTagsService.getHashedRemotesFromUri(c.uri,!1),this.workspaceTagsService.getHashedRemotesFromUri(c.uri,!0)]),n=(s||[]).concat(d||[]);if(!n.length)return;const a=await this.extensionTipsService.getAllWorkspacesTips();if(!!a.length)for(const o of n){const g=a.filter(h=>(0,E.isNonEmptyArray)(h.remoteSet)&&h.remoteSet.indexOf(o)>-1)[0];if(g){this._recommendations=g.recommendations.map(h=>this.toExtensionRecommendation(h,c)),this.storageService.store(r,JSON.stringify({recommendations:g.recommendations,timestamp:Date.now()}),1,1),this.telemetryService.publicLog2("dynamicWorkspaceRecommendations",{count:this._recommendations.length,cache:0});return}}}getCachedDynamicWorkspaceRecommendations(){try{const c=JSON.parse(this.storageService.get(r,1,"{}"));if((0,E.isNonEmptyArray)(c.recommendations)&&(0,b.isNumber)(c.timestamp)&&c.timestamp>0&&(Date.now()-c.timestamp)/u<14)return c.recommendations}catch{this.storageService.remove(r,1)}}toExtensionRecommendation(c,l){return{extensionId:c.toLowerCase(),reason:{reasonId:4,reasonText:(0,C.localize)(0,null,l.name)}}}};i=we([F(0,t.IExtensionTipsService),F(1,I.IWorkspaceTagsService),F(2,R.IWorkspaceContextService),F(3,A.IFileService),F(4,k.ITelemetryService),F(5,p.IStorageService)],i),e.DynamicWorkspaceRecommendations=i}),define(ae[270],le([1,0,1880,5,7]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITaskService=e.TaskExecutionSupportedContext=e.ServerlessWebContext=e.ProcessExecutionSupportedContext=e.TaskCommandsRegistered=e.ShellExecutionSupportedContext=e.CustomExecutionSupportedContext=void 0,e.CustomExecutionSupportedContext=new R.RawContextKey("customExecutionSupported",!1,t.localize(0,null)),e.ShellExecutionSupportedContext=new R.RawContextKey("shellExecutionSupported",!1,t.localize(1,null)),e.TaskCommandsRegistered=new R.RawContextKey("taskCommandsRegistered",!1,t.localize(2,null)),e.ProcessExecutionSupportedContext=new R.RawContextKey("processExecutionSupported",!1,t.localize(3,null)),e.ServerlessWebContext=new R.RawContextKey("serverlessWebContext",!1,t.localize(4,null)),e.TaskExecutionSupportedContext=R.ContextKeyExpr.or(R.ContextKeyExpr.and(e.ShellExecutionSupportedContext,e.ProcessExecutionSupportedContext),e.CustomExecutionSupportedContext),e.ITaskService=(0,p.createDecorator)("taskService")}),define(ae[885],le([1,0]),function(J,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 p{constructor(E,I,b){this.severity=E,this.message=I,this.code=b}}e.TaskError=p;var R;(function(k){k.shortcut="shortcut",k.command="command",k.reconnect="reconnect"})(R=e.Triggers||(e.Triggers={}));var A;(function(k){k[k.Started=1]="Started",k[k.Active=2]="Active"})(A=e.TaskExecuteKind||(e.TaskExecuteKind={}))}),define(ae[2390],le([1,0,1881]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTemplates=void 0;const p={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(` `)},R={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 E=null;function I(){return E||(E=[p,R,k].sort((b,S)=>(b.sort||b.label).localeCompare(S.sort||S.label)),E.push(A)),E}e.getTemplates=I}),define(ae[886],le([1,0,6,2,22,13,1884,26]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTerminalBackend=void 0;class I extends p.Disposable{constructor(S,C,r,u,i,f){super(),this._logService=C,this._workspaceContextService=f,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,S.onPtyHostExit&&this._register(S.onPtyHostExit(()=>{this._logService.error("The terminal's pty host process exited, the connection to all terminal processes was lost")}));let c;S.onPtyHostStart&&this._register(S.onPtyHostStart(()=>{this._logService.info("ptyHost restarted"),this._onPtyHostRestart.fire(),c?.close(),c=void 0,this._isPtyHostUnresponsive=!1})),S.onPtyHostUnresponsive&&this._register(S.onPtyHostUnresponsive(()=>{const l=[{label:(0,k.localize)(0,null),run:()=>S.restartPtyHost()}];c=r.prompt(E.Severity.Error,(0,k.localize)(1,null),l),this._isPtyHostUnresponsive=!0,this._onPtyHostUnresponsive.fire()})),S.onPtyHostResponsive&&this._register(S.onPtyHostResponsive(()=>{!this._isPtyHostUnresponsive||(this._logService.info("The pty host became responsive again"),c?.close(),c=void 0,this._isPtyHostUnresponsive=!1,this._onPtyHostResponsive.fire())})),S.onPtyHostRequestResolveVariables&&this._register(S.onPtyHostRequestResolveVariables(async l=>{if(l.workspaceId!==this._workspaceContextService.getWorkspace().id)return;const s=u.getLastActiveWorkspaceRoot(R.Schemas.file),d=s?(0,A.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(s)):void 0,n=l.originalText.map(o=>i.resolveAsync(d,o)),a=await Promise.all(n);S.acceptPtyHostResolvedVariables?.(l.requestId,a)}))}_deserializeTerminalState(S){if(S===void 0)return;const C=JSON.parse(S);if(!("version"in C)||!("state"in C)||!Array.isArray(C.state)){this._logService.warn("Could not revive serialized processes, wrong format",C);return}const r=C;if(r.version!==1){this._logService.warn(`Could not revive serialized processes, wrong version "${r.version}"`,r);return}return r.state}}e.BaseTerminalBackend=I}),define(ae[343],le([1,0,53]),function(J,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 p(b,S,C,r){const u={start:{x:C.startColumn,y:C.startLineNumber+r},end:{x:C.endColumn-1,y:C.endLineNumber+r}};let i=0;const f=Math.ceil(C.startColumn/S);for(let s=0;s<Math.min(f);s++){const d=Math.min(S,C.startColumn-s*S);let n=0;const a=b[s];if(!a)break;for(let o=0;o<Math.min(S,d+n);o++){const g=a.getCell(o);g.getWidth()===2&&n++;const v=g.getChars();v.length>1&&(n-=v.length-1)}i+=n}let c=0;const l=Math.ceil(C.endColumn/S);for(let s=Math.max(0,f-1);s<l;s++){const d=s===f-1?(C.startColumn+i)%S:0,n=Math.min(S,C.endColumn+i-s*S),a=s===f-1?i:0;let o=0;const g=b[s];if(!g)break;for(let h=d;h<Math.min(S,n+o+a);h++){const v=g.getCell(h);v.getWidth()===2&&o++,h===S-1&&v.getChars()===""&&o++}c+=o}for(u.start.x+=i,u.end.x+=i+c;u.start.x>S;)u.start.x-=S,u.start.y++;for(;u.end.x>S;)u.end.x-=S,u.end.y++;return u}e.convertLinkRangeToBuffer=p;function R(b,S){return{start:{x:b.start.x-1,y:b.start.y-S-1},end:{x:b.end.x-1,y:b.end.y-S-1}}}e.convertBufferRangeToViewport=R;function A(b,S,C,r){const u=Math.max(2048/r*2);C=Math.min(C,S+u);let i="";for(let f=S;f<=C;f++){const c=b.getLine(f);c&&(i+=c.translateToString(!0,0,r))}return i}e.getXtermLineContent=A;function k(b,S){return!(b.y<S.start.y||b.y>S.end.y||b.y===S.start.y&&b.x<S.start.x||b.y===S.end.y&&b.x>S.end.x)}e.positionIsInRange=k;function E(b,S,C,r){const u=b.get(2)?.getCwdForLine(S);if(!!u){if(!C.includes(r))C=u+r+C;else{let i=0,f=0;const c=u.split(r).reverse(),l=C.split(r);for(;f<c.length;)c[f]===l[f]&&i++,f++;C=u+r+l.slice(i).join(r)}return C}}e.updateLinkWithRelativeCwd=E;function I(b){return b===1?t.win32:t.posix}e.osPathModule=I}),define(ae[2391],le([1,0,343]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalExternalLinkDetector=void 0;class p{constructor(A,k,E){this.id=A,this.xterm=k,this._provideLinks=E,this.maxLinkLength=2e3}async detect(A,k,E){const I=(0,t.getXtermLineContent)(this.xterm.buffer.active,k,E,this.xterm.cols);if(I===""||I.length>this.maxLinkLength)return[];const b=await this._provideLinks(I);return b?b.map(C=>{const r=(0,t.convertLinkRangeToBuffer)(A,this.xterm.cols,{startColumn:C.startIndex+1,startLineNumber:1,endColumn:C.startIndex+C.length+1,endLineNumber:1},k);return{text:I.substring(C.startIndex,C.startIndex+C.length)||"",label:C.label,bufferRange:r,type:{id:this.id},activate:C.activate}}):[]}}e.TerminalExternalLinkDetector=p}),define(ae[2392],le([1,0,2,10,11,343,14,1886,6,8]),function(J,e,t,p,R,A,k,E,I,b){"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,E.localize)(0,null),e.FOLDER_IN_WORKSPACE_LABEL=(0,E.localize)(1,null),e.FOLDER_NOT_IN_WORKSPACE_LABEL=(0,E.localize)(2,null);let S=class extends t.DisposableStore{get onInvalidated(){return this._onInvalidated.event}get type(){return this._type}constructor(r,u,i,f,c,l,s,d,n,a,o){super(),this._xterm=r,this.range=u,this.text=i,this.actions=f,this._viewportY=c,this._activateCallback=l,this._tooltipCallback=s,this._isHighConfidenceLink=d,this.label=n,this._type=a,this._configurationService=o,this._onInvalidated=new I.Emitter,this.decorations={pointerCursor:!1,underline:this._isHighConfidenceLink}}dispose(){super.dispose(),this._hoverListeners?.dispose(),this._hoverListeners=void 0,this._tooltipScheduler?.dispose(),this._tooltipScheduler=void 0}activate(r,u){this.asyncActivate=this._activateCallback(r,u)}hover(r,u){this._hoverListeners=new t.DisposableStore,this._hoverListeners.add(p.addDisposableListener(document,"keydown",f=>{!f.repeat&&this._isModifierDown(f)&&this._enableDecorations()})),this._hoverListeners.add(p.addDisposableListener(document,"keyup",f=>{!f.repeat&&!this._isModifierDown(f)&&this._disableDecorations()})),this._hoverListeners.add(this._xterm.onRender(f=>{const c=this.range.start.y-this._viewportY;c>=f.start&&c<=f.end&&this._onInvalidated.fire()})),this._isHighConfidenceLink&&(this._tooltipScheduler=new R.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:r.pageX,y:r.pageY};this._hoverListeners.add(p.addDisposableListener(document,p.EventType.MOUSE_MOVE,f=>{this._isModifierDown(f)?this._enableDecorations():this._disableDecorations(),(Math.abs(f.pageX-i.x)>window.devicePixelRatio*2||Math.abs(f.pageY-i.y)>window.devicePixelRatio*2)&&(i.x=f.pageX,i.y=f.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(r){return this._configurationService.getValue("editor.multiCursorModifier")==="ctrlCmd"?!!r.altKey:k.isMacintosh?r.metaKey:r.ctrlKey}};S=we([F(10,b.IConfigurationService)],S),e.TerminalLink=S}),define(ae[2393],le([1,0,6,2,1887,5,2392]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkDetectorAdapter=void 0;let E=class extends p.Disposable{constructor(b,S){super(),this._detector=b,this._instantiationService=S,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(b,S){this._activeLinks?.forEach(C=>C.dispose()),this._activeLinks=await this._provideLinks(b),S(this._activeLinks)}async _provideLinks(b){const S=[];let C=b-1,r=C;const u=[this._detector.xterm.buffer.active.getLine(C)],i=Math.max(this._detector.maxLinkLength/this._detector.xterm.cols),f=Math.max(C-i,0),c=Math.min(r+i,this._detector.xterm.buffer.active.length);for(;C>=f&&this._detector.xterm.buffer.active.getLine(C)?.isWrapped;)u.unshift(this._detector.xterm.buffer.active.getLine(C-1)),C--;for(;r<c&&this._detector.xterm.buffer.active.getLine(r+1)?.isWrapped;)u.push(this._detector.xterm.buffer.active.getLine(r+1)),r++;const l=await this._detector.detect(u,C,r);for(const s of l)S.push(this._createTerminalLink(s,async d=>{this._onDidActivateLink.fire({link:s,event:d})}));return S}_createTerminalLink(b,S){return b.text.length>0&&b.text.charAt(b.text.length-1)===":"&&(b.text=b.text.slice(0,-1),b.bufferRange.end.x--),this._instantiationService.createInstance(k.TerminalLink,this._detector.xterm,b.bufferRange,b.text,b.actions,this._detector.xterm.buffer.active.viewportY,S,(C,r,u,i)=>this._onDidShowHover.fire({link:C,viewportRange:r,modifierDownCallback:u,modifierUpCallback:i}),b.type!=="Search",b.label||this._getLabel(b.type),b.type)}_getLabel(b){switch(b){case"Search":return(0,R.localize)(0,null);case"LocalFile":return(0,R.localize)(1,null);case"LocalFolderInWorkspace":return(0,R.localize)(2,null);case"LocalFolderOutsideWorkspace":return(0,R.localize)(3,null);case"Url":default:return(0,R.localize)(4,null)}}};E=we([F(1,A.IInstantiationService)],E),e.TerminalLinkDetectorAdapter=E}),define(ae[887],le([1,0,57,34,343]),function(J,e,t,p,R){"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="(\\.\\.?|\\~)",E="\\/",I="[^\\0\\s!`&*()\\[\\]'\":;\\\\]";e.unixLocalLinkClause="(("+k+"|("+I+")+)?("+E+"("+I+")+)+)",e.winDrivePrefix="(?:\\\\\\\\\\?\\\\)?[a-zA-Z]:";const b="("+e.winDrivePrefix+"|\\.\\.?|\\~)",S="(\\\\|\\/)",C="[^\\0<>\\?\\|\\/\\s!`&*()\\[\\]'\":;]";e.winLocalLinkClause="(("+b+"|("+C+")+)?("+S+"("+C+")+)+)",e.lineAndColumnClause=[`(([^:\\s\\(\\)<>'"\\[\\]]*) ((\\d+))(:(\\d+)))`,`((\\S*)['"], line ((\\d+)( column (\\d+))?))`,`((\\S*)['"],((\\d+)(:(\\d+))?))`,"((\\S*) on line ((\\d+)(, column (\\d+))?))","((\\S*):\\s?line ((\\d+)(, col(?:umn)? (\\d+))?))","(([^\\s\\(\\)]*)(\\s?[\\(\\[](\\d+)(,\\s?(\\d+))?)[\\)\\]])",`(([^:\\s\\(\\)<>'"\\[\\]]*)(:(\\d+))?(:(\\d+))?)`].join("|").replace(/ /g,"[\xA0 ]"),e.winLineAndColumnMatchIndex=12,e.unixLineAndColumnMatchIndex=11,e.lineAndColumnClauseGroupCount=6;let r=class{constructor(f,c,l,s,d,n){this.xterm=f,this._capabilities=c,this._os=l,this._resolvePath=s,this._uriIdentityService=d,this._workspaceContextService=n,this.maxLinkLength=500}async detect(f,c,l){const s=[],d=(0,R.getXtermLineContent)(this.xterm.buffer.active,c,l,this.xterm.cols);if(d===""||d.length>2e3)return[];const n=new RegExp(u(this._os),"g");let a,o=-1,g=0;for(;(a=n.exec(d))!==null;){let h=a[0];if(!h||(o=d.indexOf(h,o+1),n.lastIndex=o+h.length,o<0))break;((d.startsWith("--- a/")||d.startsWith("+++ b/"))&&o===4||d.startsWith("diff --git")&&(h.startsWith("a/")||h.startsWith("b/")))&&(h=h.substring(2),o+=2);const v=(0,R.convertLinkRangeToBuffer)(f,this.xterm.cols,{startColumn:o+1,startLineNumber:1,endColumn:o+h.length+1,endLineNumber:1},c);if(h.length>1024)continue;const m=[];if((0,R.osPathModule)(this._os).isAbsolute(h))m.push(h);else if(this._capabilities.has(2)){const D=(0,R.updateLinkWithRelativeCwd)(this._capabilities,v.start.y,h,(0,R.osPathModule)(this._os).sep);D&&m.push(D)}else m.push(h),h.match(/^(\.\.[\/\\])+/)&&m.push(h.replace(/^(\.\.[\/\\])+/,""));const w=await this._validateLinkCandidates(m);if(w){let D;if(w.isDirectory?this._isDirectoryInsideWorkspace(w.uri)?D="LocalFolderInWorkspace":D="LocalFolderOutsideWorkspace":D="LocalFile",s.push({text:w.link,uri:w.uri,bufferRange:v,type:D}),++g>=10)break}}return s}_isDirectoryInsideWorkspace(f){const c=this._workspaceContextService.getWorkspace().folders;for(let l=0;l<c.length;l++)if(this._uriIdentityService.extUri.isEqualOrParent(f,c[l].uri))return!0;return!1}async _validateLinkCandidates(f){for(const c of f){const l=await this._resolvePath(c);if(l)return l}}};r.id="local",r=we([F(4,t.IUriIdentityService),F(5,p.IWorkspaceContextService)],r),e.TerminalLocalLinkDetector=r;function u(i){const f=i===1?e.winLocalLinkClause:e.unixLocalLinkClause;return new RegExp(`${f}(${e.lineAndColumnClause})`)}e.getLocalLinkRegex=u}),define(ae[2394],le([1,0,22,9,728,57,34,343]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalUriLinkDetector=void 0;var I;(function(C){C[C.MaxResolvedLinksInLine=10]="MaxResolvedLinksInLine"})(I||(I={}));let b=class{constructor(r,u,i,f){this.xterm=r,this._resolvePath=u,this._uriIdentityService=i,this._workspaceContextService=f,this.maxLinkLength=2048}async detect(r,u,i){const f=[],c=new S(this.xterm,u,i),l=R.LinkComputer.computeLinks(c);let s=0;for(const d of l){const n=(0,E.convertLinkRangeToBuffer)(r,this.xterm.cols,d.range,u),a=d.url?typeof d.url=="string"?p.URI.parse(this._excludeLineAndColSuffix(d.url)):d.url:void 0;if(!a)continue;const o=d.url?.toString()||"";if(o.length>this.maxLinkLength)continue;if(a.scheme!==t.Schemas.file){f.push({text:o,uri:a,bufferRange:n,type:"Url"});continue}if(a.authority.length!==2&&a.authority.endsWith(":"))continue;const g=await this._resolvePath(o,a);if(g){let h;if(g.isDirectory?this._isDirectoryInsideWorkspace(g.uri)?h="LocalFolderInWorkspace":h="LocalFolderOutsideWorkspace":h="LocalFile",f.push({text:typeof d.url=="string"?d.url:g.link,uri:g.uri,bufferRange:n,type:h}),++s>=10)break}}return f}_isDirectoryInsideWorkspace(r){const u=this._workspaceContextService.getWorkspace().folders;for(let i=0;i<u.length;i++)if(this._uriIdentityService.extUri.isEqualOrParent(r,u[i].uri))return!0;return!1}_excludeLineAndColSuffix(r){return r.replace(/:\d+(:\d+)?$/,"")}};b.id="uri",b=we([F(2,A.IUriIdentityService),F(3,k.IWorkspaceContextService)],b),e.TerminalUriLinkDetector=b;class S{constructor(r,u,i){this._xterm=r,this._lineStart=u,this._lineEnd=i}getLineCount(){return 1}getLineContent(){return(0,E.getXtermLineContent)(this._xterm.buffer.active,this._lineStart,this._lineEnd,this._xterm.cols)}}}),define(ae[2395],le([1,0,11,6,2,9]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemotePty=void 0;class k extends R.Disposable{get id(){return this._id}constructor(I,b,S,C,r){super(),this._id=I,this.shouldPersist=b,this._remoteTerminalChannel=S,this._remoteAgentService=C,this._logService=r,this._onProcessData=this._register(new p.Emitter),this.onProcessData=this._onProcessData.event,this._onProcessReady=this._register(new p.Emitter),this.onProcessReady=this._onProcessReady.event,this._onDidChangeProperty=this._register(new p.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onProcessExit=this._register(new p.Emitter),this.onProcessExit=this._onProcessExit.event,this._onRestoreCommands=this._register(new p.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,failedShellIntegrationActivation:!1,usedShellIntegrationInjection:void 0},this._startBarrier=new t.Barrier}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 b=await this._remoteTerminalChannel.start(this._id);if(typeof b<"u")return b;this._startBarrier.open()}async detach(I){return await this._startBarrier.wait(),this._remoteTerminalChannel.detachFromProcess(this.id,I)}shutdown(I){this._startBarrier.wait().then(b=>{this._remoteTerminalChannel.shutdown(this._id,I)})}input(I){this._inReplay||this._startBarrier.wait().then(b=>{this._remoteTerminalChannel.input(this._id,I)})}resize(I,b){this._inReplay||this._startBarrier.wait().then(S=>{this._remoteTerminalChannel.resize(this._id,I,b)})}freePortKillProcess(I){if(!this._remoteTerminalChannel.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the local pty service");return this._remoteTerminalChannel.freePortKillProcess(I)}acknowledgeDataEvent(I){this._inReplay||this._startBarrier.wait().then(b=>{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,b){return this._remoteTerminalChannel.updateProperty(this._id,I,b)}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:b}){switch(I){case"cwd":this._properties.cwd=b;break;case"initialCwd":this._properties.initialCwd=b;break;case"resolvedShellLaunchConfig":b.cwd&&typeof b.cwd!="string"&&(b.cwd=A.URI.revive(b.cwd))}this._onDidChangeProperty.fire({type:I,value:b})}async handleReplay(I){try{this._inReplay=!0;for(const b of I.events){(b.cols!==0||b.rows!==0)&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:b.cols,rows:b.rows,forceExactSize:!0}});const S={data:b.data,trackCommit:!0};this._onProcessData.fire(S),await S.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(ae[109],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDataTransfers=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 p;(function(I){I[I.Left=0]="Left",I[I.Right=1]="Right",I[I.Up=2]="Up",I[I.Down=3]="Down"})(p=e.Direction||(e.Direction={}));var R;(function(I){I[I.Connecting=0]="Connecting",I[I.Connected=1]="Connected"})(R=e.TerminalConnectionState||(e.TerminalConnectionState={}));class A extends MouseEvent{}e.TerminalLinkQuickPickEvent=A,e.terminalEditorId="terminalEditor";var k;(function(I){I[I.Unknown=1]="Unknown",I[I.Fedora=2]="Fedora",I[I.Ubuntu=3]="Ubuntu"})(k=e.LinuxDistro||(e.LinuxDistro={}));var E;(function(I){I.Terminals="Terminals"})(E=e.TerminalDataTransfers||(e.TerminalDataTransfers={}))}),define(ae[2396],le([1,0,10,6,1889,48,109]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkQuickpick=void 0;let E=class{constructor(b){this._quickInputService=b,this._onDidRequestMoreLinks=new p.Emitter,this.onDidRequestMoreLinks=this._onDidRequestMoreLinks.event}async show(b){const S=b.wordLinks?await this._generatePicks(b.wordLinks):void 0,C=b.fileLinks?await this._generatePicks(b.fileLinks):void 0,r=b.webLinks?await this._generatePicks(b.webLinks):void 0,u={placeHolder:(0,R.localize)(0,null),canPickMany:!1},i=[];if(r&&(i.push({type:"separator",label:(0,R.localize)(1,null)}),i.push(...r)),C&&(i.push({type:"separator",label:(0,R.localize)(2,null)}),i.push(...C)),S&&(i.push({type:"separator",label:(0,R.localize)(3,null)}),i.push(...S)),i.push({type:"separator"}),!b.noMoreResults){const l={label:(0,R.localize)(4,null)};i.push(l)}const f=await this._quickInputService.pick(i,u);if(!f)return;const c=new k.TerminalLinkQuickPickEvent(t.EventType.CLICK);"link"in f?f.link.activate(c,f.label):this._onDidRequestMoreLinks.fire()}async _generatePicks(b){if(!b)return;const S=new Set,C=[];for(const r of b){const u=r.text;S.has(u)||(S.add(u),C.push({label:u,link:r}))}return C.length>0?C:void 0}};E=we([F(0,A.IQuickInputService)],E),e.TerminalLinkQuickpick=E}),define(ae[2397],le([1,0,98,109]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupTerminalCommands=void 0;function R(){A()}e.setupTerminalCommands=R;function A(){for(let k=0;k<9;k++){const E=k,I=k+1;t.KeybindingsRegistry.registerCommandAndKeybindingRule({id:`workbench.action.terminal.focusAtIndex${I}`,weight:200,when:void 0,primary:0,handler:b=>(b.get(p.ITerminalGroupService).setActiveInstanceByIndex(E),b.get(p.ITerminalGroupService).showPanel(!0))})}}}),define(ae[888],le([1,0,139,84]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.openContextMenu=void 0;function R(A,k,E,I,b){const S=new t.StandardMouseEvent(A),C={x:S.posx,y:S.posy},r=[];(0,p.createAndFillInContextMenuActions)(E,void 0,r),b&&r.push(...b),I.showContextMenu({getAnchor:()=>C,getActions:()=>r,getActionsContext:()=>k})}e.openContextMenu=R}),define(ae[2398],le([1,0,9,109]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalInputSerializer=void 0;let R=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,E){const I=JSON.parse(E);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,isFeatureTerminal:k.shellLaunchConfig.isFeatureTerminal,hideFromUser:k.shellLaunchConfig.hideFromUser,reconnectionProperties:k.shellLaunchConfig.reconnectionProperties}}};R=we([F(0,p.ITerminalEditorService)],R),e.TerminalInputSerializer=R}),define(ae[2399],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITermSequence=e.VSCodeSequence=e.ITermOscPt=e.VSCodeOscProperty=e.VSCodeOscPt=void 0;var t;(function(I){I[I.FinalTerm=133]="FinalTerm",I[I.VSCode=633]="VSCode",I[I.ITerm=1337]="ITerm"})(t||(t={}));var p;(function(I){I.PromptStart="A",I.CommandStart="B",I.CommandExecuted="C",I.CommandFinished="D",I.CommandLine="E",I.ContinuationStart="F",I.ContinuationEnd="G",I.RightPromptStart="H",I.RightPromptEnd="I",I.Property="P"})(p=e.VSCodeOscPt||(e.VSCodeOscPt={}));var R;(function(I){I.Task="Task"})(R=e.VSCodeOscProperty||(e.VSCodeOscProperty={}));var A;(function(I){I.SetMark="SetMark"})(A=e.ITermOscPt||(e.ITermOscPt={}));function k(I,b){return`\x1B]${633};${I};${b}\x07`}e.VSCodeSequence=k;function E(I,b){return`\x1B]${1337};${I};${b}\x07`}e.ITermSequence=E}),define(ae[452],le([1,0,29,1895,63]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commandHistoryFuzzySearchIcon=e.commandHistoryOutputIcon=e.commandHistoryRemoveIcon=e.terminalDecorationSuccess=e.terminalDecorationError=e.terminalDecorationIncomplete=e.terminalDecorationMark=e.configureTerminalProfileIcon=e.newTerminalIcon=e.killTerminalIcon=e.renameTerminalIcon=e.terminalViewIcon=void 0,e.terminalViewIcon=(0,R.registerIcon)("terminal-view-icon",t.Codicon.terminal,(0,p.localize)(0,null)),e.renameTerminalIcon=(0,R.registerIcon)("terminal-rename",t.Codicon.gear,(0,p.localize)(1,null)),e.killTerminalIcon=(0,R.registerIcon)("terminal-kill",t.Codicon.trash,(0,p.localize)(2,null)),e.newTerminalIcon=(0,R.registerIcon)("terminal-new",t.Codicon.add,(0,p.localize)(3,null)),e.configureTerminalProfileIcon=(0,R.registerIcon)("terminal-configure-profile",t.Codicon.gear,(0,p.localize)(4,null)),e.terminalDecorationMark=(0,R.registerIcon)("terminal-decoration-mark",t.Codicon.circleSmallFilled,(0,p.localize)(5,null)),e.terminalDecorationIncomplete=(0,R.registerIcon)("terminal-decoration-incomplete",t.Codicon.circle,(0,p.localize)(6,null)),e.terminalDecorationError=(0,R.registerIcon)("terminal-decoration-error",t.Codicon.errorSmall,(0,p.localize)(7,null)),e.terminalDecorationSuccess=(0,R.registerIcon)("terminal-decoration-success",t.Codicon.circleFilled,(0,p.localize)(8,null)),e.commandHistoryRemoveIcon=(0,R.registerIcon)("terminal-command-history-remove",t.Codicon.close,(0,p.localize)(9,null)),e.commandHistoryOutputIcon=(0,R.registerIcon)("terminal-command-history-output",t.Codicon.output,(0,p.localize)(10,null)),e.commandHistoryFuzzySearchIcon=(0,R.registerIcon)("terminal-command-history-fuzzy-search",t.Codicon.searchFuzzy,(0,p.localize)(11,null))}),define(ae[889],le([1,0,6,2,109]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcessExtHostProxy=void 0;let A=class extends p.Disposable{get onProcessReady(){return this._onProcessReady.event}constructor(E,I,b,S){super(),this.instanceId=E,this._cols=I,this._rows=b,this._terminalService=S,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=[]}emitData(E){this._onProcessData.fire(E)}emitTitle(E){this._onDidChangeProperty.fire({type:"title",value:E})}emitReady(E,I){this._onProcessReady.fire({pid:E,cwd:I})}emitProcessProperty({type:E,value:I}){switch(E){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(E){this._onProcessExit.fire(E),this.dispose()}emitOverrideDimensions(E){this._onDidChangeProperty.fire({type:"overrideDimensions",value:E})}emitResolvedShellLaunchConfig(E){this._onDidChangeProperty.fire({type:"resolvedShellLaunchConfig",value:E})}emitInitialCwd(E){for(;this._pendingInitialCwdRequests.length>0;)this._pendingInitialCwdRequests.pop()(E)}emitCwd(E){for(;this._pendingCwdRequests.length>0;)this._pendingCwdRequests.pop()(E)}emitLatency(E){for(;this._pendingLatencyRequests.length>0;)this._pendingLatencyRequests.pop()(E)}async start(){return this._terminalService.requestStartExtensionTerminal(this,this._cols,this._rows)}shutdown(E){this._onShutdown.fire(E)}input(E){this._onInput.fire(E)}resize(E,I){this._onResize.fire({cols:E,rows:I})}acknowledgeDataEvent(){}async setUnicodeVersion(E){}async processBinary(E){this._onBinary.fire(E)}getInitialCwd(){return new Promise(E=>{this._onRequestInitialCwd.fire(),this._pendingInitialCwdRequests.push(E)})}getCwd(){return new Promise(E=>{this._onRequestCwd.fire(),this._pendingCwdRequests.push(E)})}getLatency(){return new Promise(E=>{this._onRequestLatency.fire(),this._pendingLatencyRequests.push(E)})}async refreshProperty(E){}async updateProperty(E,I){}};A=we([F(3,R.ITerminalService)],A),e.TerminalProcessExtHostProxy=A}),define(ae[890],le([1,0,1903]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gitCreatePr=e.gitPushSetUpstream=e.freePort=e.gitTwoDashes=e.gitSimilar=e.GitCreatePrOutputRegex=e.GitPushOutputRegex=e.FreePortOutputRegex=e.GitSimilarOutputRegex=e.AnyCommandLineRegex=e.GitTwoDashesRegex=e.GitPushCommandLineRegex=e.GitCommandLineRegex=void 0,e.GitCommandLineRegex=/git/,e.GitPushCommandLineRegex=/git\s+push/,e.GitTwoDashesRegex=/error: did you mean `--(.+)` \(with two dashes\)\?/,e.AnyCommandLineRegex=/.+/,e.GitSimilarOutputRegex=/(?:(most similar (command|commands) (is|are)))((\n\s*(?<fixedCommand>[^\s]+))+)/m,e.FreePortOutputRegex=/address already in use (0\.0\.0\.0|127\.0\.0\.1|localhost|::):(?<portNumber>\d{4,5})|Unable to bind [^ ]*:(\d{4,5})|can't listen on port (\d{4,5})|listen EADDRINUSE [^ ]*:(\d{4,5})/,e.GitPushOutputRegex=/git push --set-upstream origin (?<branchName>[^\s]+)/,e.GitCreatePrOutputRegex=/remote:\s*(?<link>https:\/\/github\.com\/.+\/.+\/pull\/new\/.+)/;function p(){return{source:"builtin",id:"Git Similar",commandLineMatcher:e.GitCommandLineRegex,outputMatcher:{lineMatcher:e.GitSimilarOutputRegex,anchor:"bottom",offset:0,length:10},exitStatus:!1,getQuickFixes:(I,b)=>{if(!I?.outputMatch)return;const S=[],C=I.outputMatch[0].split(` `).map(r=>r.trim());for(let r=1;r<C.length;r++){const u=C[r];u&&S.push({type:"command",command:b.command.replace(/git\s+[^\s]+/,`git ${u}`),addNewLine:!0})}return S}}}e.gitSimilar=p;function R(){return{source:"builtin",id:"Git Two Dashes",commandLineMatcher:e.GitCommandLineRegex,outputMatcher:{lineMatcher:e.GitTwoDashesRegex,anchor:"bottom",offset:0,length:2},exitStatus:!1,getQuickFixes:(I,b)=>{const S=I?.outputMatch?.[1];if(!!S)return{type:"command",command:b.command.replace(` -${S}`,` --${S}`),addNewLine:!0}}}}e.gitTwoDashes=R;function A(I){return{source:"builtin",id:"Free Port",commandLineMatcher:e.AnyCommandLineRegex,outputMatcher:{lineMatcher:e.FreePortOutputRegex,anchor:"bottom",offset:0,length:30},exitStatus:!1,getQuickFixes:(b,S)=>{const C=b?.outputMatch?.groups?.portNumber;if(!C)return;const r=(0,t.localize)(0,null,C);return{class:void 0,tooltip:r,id:"terminal.freePort",label:r,enabled:!0,run:async()=>{await I?.freePortKillProcess?.(C,S.command)}}}}}e.freePort=A;function k(){return{id:"Git Push Set Upstream",commandLineMatcher:e.GitPushCommandLineRegex,outputMatcher:{lineMatcher:e.GitPushOutputRegex,anchor:"bottom",offset:0,length:5},exitStatus:!1,commandToRun:"git push --set-upstream origin ${group:branchName}",extensionIdentifier:"git"}}e.gitPushSetUpstream=k;function E(){return{id:"Git Create Pr",commandLineMatcher:e.GitPushCommandLineRegex,outputMatcher:{lineMatcher:e.GitCreatePrOutputRegex,anchor:"bottom",offset:0,length:5},exitStatus:!0,linkToOpen:"${group:link}",extensionIdentifier:"git"}}e.gitCreatePr=E}),define(ae[652],le([1,0,29,6,2,68,8,33,63,12]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorForSeverity=e.TerminalStatusList=e.TerminalStatus=void 0;var S;(function(u){u.Bell="bell",u.Disconnected="disconnected",u.RelaunchNeeded="relaunch-needed",u.ShellIntegrationAttentionNeeded="shell-integration-attention-needed"})(S=e.TerminalStatus||(e.TerminalStatus={}));let C=class extends R.Disposable{get onDidAddStatus(){return this._onDidAddStatus.event}get onDidRemoveStatus(){return this._onDidRemoveStatus.event}get onDidChangePrimaryStatus(){return this._onDidChangePrimaryStatus.event}constructor(i){super(),this._configurationService=i,this._statuses=new Map,this._statusTimeouts=new Map,this._onDidAddStatus=this._register(new p.Emitter),this._onDidRemoveStatus=this._register(new p.Emitter),this._onDidChangePrimaryStatus=this._register(new p.Emitter)}get primary(){let i;for(const f of this._statuses.values())(!i||f.severity>=i.severity)&&(i=f);return i}get statuses(){return Array.from(this._statuses.values())}add(i,f){i=this._applyAnimationSetting(i);const c=this._statusTimeouts.get(i.id);if(c&&(window.clearTimeout(c),this._statusTimeouts.delete(i.id)),f&&f>0){const l=window.setTimeout(()=>this.remove(i),f);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 s=this.primary;l!==s&&this._onDidChangePrimaryStatus.fire(s)}}remove(i){const f=typeof i=="string"?this._statuses.get(i):i;if(f&&this._statuses.get(f.id)){const c=this.primary?.id===f.id;this._statuses.delete(f.id),this._onDidRemoveStatus.fire(f),c&&this._onDidChangePrimaryStatus.fire(this.primary)}}toggle(i,f){f?this.add(i):this.remove(i)}_applyAnimationSetting(i){if(!i.icon||b.ThemeIcon.getModifier(i.icon)!=="spin"||this._configurationService.getValue("terminal.integrated.tabs.enableAnimation"))return i;let f;return i.icon.id===I.spinningLoading.id?f=t.Codicon.play:f=b.ThemeIcon.modify(i.icon,void 0),{...i,icon:f}}};C=we([F(0,k.IConfigurationService)],C),e.TerminalStatusList=C;function r(u){switch(u){case A.default.Error:return E.listErrorForeground;case A.default.Warning:return E.listWarningForeground;default:return""}}e.getColorForSeverity=r}),define(ae[2400],le([1,0,1893,109,6,22,652]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalDecorationsProvider=void 0;let E=class{constructor(b){this._terminalService=b,this.label=(0,t.localize)(0,null),this._onDidChange=new R.Emitter,this._terminalService.onDidChangeInstancePrimaryStatus(S=>this._onDidChange.fire([S.resource]))}get onDidChange(){return this._onDidChange.event}provideDecorations(b){if(b.scheme!==A.Schemas.vscodeTerminal)return;const S=this._terminalService.getInstanceFromResource(b);if(!S)return;const C=S?.statusList?.primary;if(!!C?.icon)return{color:(0,k.getColorForSeverity)(C.severity),letter:C.icon,tooltip:C.tooltip}}dispose(){this.dispose()}};E=we([F(0,p.ITerminalService)],E),e.TerminalDecorationsProvider=E}),define(ae[891],le([1,0,1908]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getShellIntegrationTooltip=void 0;function p(R,A){const k=[];R.capabilities.has(2)&&k.push(2),R.capabilities.has(0)&&k.push(0);let E="";return k.length>0?E+=`${A?` --- `:` `} ${(0,t.localize)(0,null)}`:R.shellLaunchConfig.ignoreShellIntegration?E+=`${A?` --- `:` `} ${(0,t.localize)(1,null)}`:R.usedShellIntegrationInjection&&(E+=`${A?` --- `:` `} ${(0,t.localize)(2,null)}`),E}e.getShellIntegrationTooltip=p}),define(ae[453],le([1,0,22,9]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInstanceFromResource=e.getTerminalResourcesFromDragEvent=e.getTerminalUri=e.parseTerminalUri=void 0;function R(I){const[,b,S]=I.path.split("/");if(!b||!Number.parseInt(S))throw new Error(`Could not parse terminal uri for resource ${I}`);return{workspaceId:b,instanceId:Number.parseInt(S)}}e.parseTerminalUri=R;function A(I,b,S){return p.URI.from({scheme:t.Schemas.vscodeTerminal,path:`/${I}/${b}`,fragment:S||void 0})}e.getTerminalUri=A;function k(I){const b=I.dataTransfer?.getData("Terminals");if(b){const S=JSON.parse(b),C=[];for(const r of S)C.push(p.URI.parse(r));return C.length===0?void 0:C}}e.getTerminalResourcesFromDragEvent=k;function E(I,b){if(b){for(const S of I)if(S.resource.path===b.path)return S}}e.getInstanceFromResource=E}),define(ae[2401],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalWidgetManager=void 0;class t{constructor(){this._attached=new Map}attachToElement(R){this._container||(this._container=document.createElement("div"),this._container.classList.add("terminal-widget-container"),R.appendChild(this._container))}dispose(){this._container&&this._container.parentElement&&(this._container.parentElement.removeChild(this._container),this._container=void 0)}attachWidget(R){if(!!this._container)return this._attached.get(R.id)?.dispose(),R.attach(this._container),this._attached.set(R.id,R),{dispose:()=>{this._attached.get(R.id)===R&&(this._attached.delete(R.id),R.dispose())}}}}e.TerminalWidgetManager=t}),define(ae[2402],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineDataEventAddon=void 0;class R extends p.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 E=k.buffer,I=E.active.getLine(E.active.baseY+E.active.cursorY);I&&!I.isWrapped&&this._sendLineData(E.active,E.active.baseY+E.active.cursorY-1)})),this._register((0,p.toDisposable)(()=>{const E=k.buffer;this._sendLineData(E.active,E.active.baseY+E.active.cursorY)}))}setOperatingSystem(k){if(!(this._isOsSet||!this._xterm)&&(this._isOsSet=!0,k===1)){const E=this._xterm;this._register(E.parser.registerCsiHandler({final:"H"},()=>{const I=E.buffer;return this._sendLineData(I.active,I.active.baseY+I.active.cursorY),!1}))}}_sendLineData(k,E){let I=k.getLine(E);if(!I)return;let b=I.translateToString(!0);for(;E>0&&I.isWrapped&&(I=k.getLine(--E),!!I);)b=I.translateToString(!1)+b;this._onLineData.fire(b)}}e.LineDataEventAddon=R}),define(ae[2403],le([1,0,10]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NavigationModeAddon=void 0;class p{constructor(A,k){this._navigationModeContextKey=A,this._navigationModeActiveContextKey=k}activate(A){this._terminal=A}dispose(){}exitNavigationMode(){!this._terminal||(this._terminal.scrollToBottom(),this._terminal.focus(),this._navigationModeActiveContextKey.set(!1))}focusPreviousPage(){!this._terminal?.buffer.active||(this._navigationModeActiveContextKey.set(!0),this._terminal?.buffer.active.viewportY<this._terminal.rows?(this._terminal.scrollToTop(),this._focusRow(0)):(this._terminal.scrollLines(-this._terminal.rows),this._focusLine("current")))}focusNextPage(){!this._terminal?.buffer.active||(this._navigationModeActiveContextKey.set(!0),this._terminal.buffer.active.viewportY===this._terminal.buffer.active.baseY?this._focusRow(this._terminal.rows-1):(this._terminal.scrollLines(this._terminal.rows),this._focusLine("current")))}focusPreviousLine(){this._navigationModeActiveContextKey.set(!0),this._focusLine("previous")}focusNextLine(){this._navigationModeActiveContextKey.set(!0),this._focusLine("next")}_focusLine(A){if(!this._terminal?.element)return;if(document.activeElement&&document.activeElement.parentElement&&document.activeElement.parentElement.classList.contains("xterm-accessibility-tree")){let E=document.activeElement;if(A!=="current"&&(E=A==="previous"?document.activeElement.previousElementSibling:document.activeElement.nextElementSibling),E){E.focus();const I=(0,t.addDisposableListener)(E,"blur",()=>{this._navigationModeContextKey.set(!1),I.dispose()});this._navigationModeContextKey.set(!0)}return}let k;A==="previous"?k=Math.max(this._terminal.buffer.active.cursorY-1,0):k=this._terminal.buffer.active.cursorY,this._focusRow(k)}_focusRow(A){if(!this._terminal||!this._terminal?.element)return;const k=this._terminal.element.querySelector(".xterm-accessibility-tree");if(!k||k.childElementCount<A||A<0)return;const E=k.childNodes.item(A);E.focus();const I=(0,t.addDisposableListener)(E,"blur",()=>{this._navigationModeContextKey.set(!1),I.dispose()});this._navigationModeContextKey.set(!0)}}e.NavigationModeAddon=p}),define(ae[344],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableMutatorType=e.IEnvironmentVariableService=void 0,e.IEnvironmentVariableService=(0,t.createDecorator)("environmentVariableService");var p;(function(R){R[R.Replace=1]="Replace",R[R.Append=2]="Append",R[R.Prepend=3]="Prepend"})(p=e.EnvironmentVariableMutatorType||(e.EnvironmentVariableMutatorType={}))}),define(ae[2404],le([1,0,344,109,1885,29]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableInfoChangesActive=e.EnvironmentVariableInfoStale=void 0;let k=class{constructor(S,C,r){this._diff=S,this._terminalId=C,this._terminalService=r,this.requiresAction=!0}getInfo(){const S=[],C=[];this._diff.added.forEach((u,i)=>{u.forEach(f=>S.push(I(f.type,f.value,i)))}),this._diff.changed.forEach((u,i)=>{u.forEach(f=>S.push(I(f.type,f.value,i)))}),this._diff.removed.forEach((u,i)=>{u.forEach(f=>C.push(I(f.type,f.value,i)))});let r="";return S.length>0&&(r=(0,R.localize)(0,null),r+=` `,r+="```\n",r+=S.join(` `),r+="\n```"),C.length>0&&(r+=r.length>0?` `:"",r+=(0,R.localize)(1,null),r+=` `,r+="```\n",r+=C.join(` `),r+="\n```"),r}getIcon(){return A.Codicon.warning}getActions(){return[{label:(0,R.localize)(2,null),run:()=>this._terminalService.getInstanceFromId(this._terminalId)?.relaunch(),commandId:"workbench.action.terminal.relaunch"}]}};k=we([F(2,p.ITerminalService)],k),e.EnvironmentVariableInfoStale=k;class E{constructor(S){this._collection=S,this.requiresAction=!1}getInfo(){const S=[];return this._collection.map.forEach((r,u)=>{r.forEach(i=>S.push(I(i.type,i.value,u)))}),(0,R.localize)(3,null)+"\n\n```\n"+S.join(` `)+"\n```"}getIcon(){return A.Codicon.info}}e.EnvironmentVariableInfoChangesActive=E;function I(b,S,C){switch(b){case t.EnvironmentVariableMutatorType.Prepend:return`${C}=${S}\${env:${C}}`;case t.EnvironmentVariableMutatorType.Append:return`${C}=\${env:${C}}${S}`;default:return`${C}=${S}`}}}),define(ae[892],le([1,0,14,344]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergedEnvironmentVariableCollection=void 0;class R{constructor(I){this.collections=I,this.map=new Map,I.forEach((b,S)=>{const C=b.map.entries();let r=C.next();for(;!r.done;){const u=r.value[0];let i=this.map.get(u);if(i||(i=[],this.map.set(u,i)),i.length>0&&i[0].type===p.EnvironmentVariableMutatorType.Replace){r=C.next();continue}const f=r.value[1];i.unshift({extensionIdentifier:S,value:f.value,type:f.type}),r=C.next()}})}async applyToProcessEnvironment(I,b){let S;t.isWindows&&(S={},Object.keys(I).forEach(C=>S[C.toLowerCase()]=C));for(const[C,r]of this.map){const u=t.isWindows&&S[C.toLowerCase()]||C;for(const i of r){const f=b?await b(i.value):i.value;switch(i.type){case p.EnvironmentVariableMutatorType.Append:I[u]=(I[u]||"")+f;break;case p.EnvironmentVariableMutatorType.Prepend:I[u]=f+(I[u]||"");break;case p.EnvironmentVariableMutatorType.Replace:I[u]=f;break}}}}diff(I){const b=new Map,S=new Map,C=new Map;if(I.map.forEach((r,u)=>{const i=this.map.get(u),f=A(r,i);f&&b.set(u,f)}),this.map.forEach((r,u)=>{const i=I.map.get(u),f=A(r,i);f&&C.set(u,f)}),this.map.forEach((r,u)=>{const i=I.map.get(u),f=k(r,i);f&&S.set(u,f)}),!(b.size===0&&S.size===0&&C.size===0))return{added:b,changed:S,removed:C}}}e.MergedEnvironmentVariableCollection=R;function A(E,I){if(!I)return E;const b=new Set;I.forEach(C=>b.add(C.extensionIdentifier));const S=[];return E.forEach(C=>{b.has(C.extensionIdentifier)||S.push(C)}),S.length===0?void 0:S}function k(E,I){if(!I)return;const b=new Map;I.forEach(C=>b.set(C.extensionIdentifier,C));const S=[];return E.forEach(C=>{const r=b.get(C.extensionIdentifier);r&&(C.type!==r.type||C.value!==r.value)&&S.push(r)}),S.length===0?void 0:S}}),define(ae[454],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeEnvironmentVariableCollections=e.serializeEnvironmentVariableCollections=e.deserializeEnvironmentVariableCollection=e.serializeEnvironmentVariableCollection=void 0;function t(k){return[...k.entries()]}e.serializeEnvironmentVariableCollection=t;function p(k){return new Map(k)}e.deserializeEnvironmentVariableCollection=p;function R(k){return Array.from(k.entries()).map(E=>[E[0],t(E[1].map)])}e.serializeEnvironmentVariableCollections=R;function A(k){return new Map(k.map(E=>[E[0],{map:p(E[1])}]))}e.deserializeEnvironmentVariableCollections=A}),define(ae[127],le([1,0,1914,5,17]),function(J,e,t,p,R){"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,p.createDecorator)("terminalProfileResolverService"),e.ShellIntegrationExitCode=633,e.ITerminalProfileService=(0,p.createDecorator)("terminalProfileService"),e.TerminalExtensions={Backend:"workbench.contributions.terminal.processBackend"};class A{constructor(){this._backends=new Map}registerTerminalBackend(b){const S=this._sanitizeRemoteAuthority(b.remoteAuthority);if(this._backends.has(S))throw new Error(`A terminal backend with remote authority '${S}' was already registered.`);this._backends.set(S,b)}getTerminalBackend(b){return this._backends.get(this._sanitizeRemoteAuthority(b))}_sanitizeRemoteAuthority(b){return b?.toLowerCase()??""}}R.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 E;(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.ShellIntegrationLearnMore="workbench.action.terminal.learnMore",I.OpenFileLink="workbench.action.terminal.openFileLink",I.OpenWebLink="workbench.action.terminal.openUrlLink",I.RunRecentCommand="workbench.action.terminal.runRecentCommand",I.CopyLastCommand="workbench.action.terminal.copyLastCommand",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.gitCreateProfileButton",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.QuickFix="workbench.action.terminal.quickFix",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.NavigationModeFocusNextPage="workbench.action.terminal.navigationModeFocusNextPage",I.NavigationModeFocusPrevious="workbench.action.terminal.navigationModeFocusPrevious",I.NavigationModeFocusPreviousPage="workbench.action.terminal.navigationModeFocusPreviousPage",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",I.WriteDataToTerminal="workbench.action.terminal.writeDataToTerminal",I.ShowTextureAtlas="workbench.action.terminal.showTextureAtlas"})(E=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.copyLastCommand","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.quickFix","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.closeQuickOpen","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:{quickFixes:{type:"array",description:t.localize(2,null),items:{type:"object",required:["id","commandLineMatcher","outputMatcher"],defaultSnippets:[{body:{id:"$1",commandLineMatcher:"$2",outputMatcher:"$3",commandToRun:"$4",linkToOpen:"$5"}}],properties:{id:{description:t.localize(3,null),type:"string"},commandLineMatcher:{description:t.localize(4,null),type:"string"},outputMatcher:{description:t.localize(5,null),type:"object",required:["lineMatcher","anchor","offset","length"],properties:{lineMatcher:{description:"The command line to match",type:"string"},anchor:{description:"Which side of the output to anchor the offset and length against",enum:["top","bottom"]},offset:{description:"How far from either the top or the bottom of the butter to start matching against.",type:"number"},length:{description:"The number of rows to match against, this should be as small as possible for performance reasons",type:"number"}}},commandToRun:{description:"The command to run in the terminal for this match. Refer to a group found in the outputMatcher via ${group:group_name}. When provided, will take precedence over linkToOpen.",type:"string"},linkToOpen:{description:"The link to open for this match. Refer to a group found in the outputMatcher via ${group:group_name}. If a commandToRun is provided, this will be ignored.",type:"string"}}}},profiles:{type:"array",description:t.localize(6,null),items:{type:"object",required:["id","title"],defaultSnippets:[{body:{id:"$1",title:"$2"}}],properties:{id:{description:t.localize(7,null),type:"string"},title:{description:t.localize(8,null),type:"string"},icon:{description:t.localize(9,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:t.localize(10,null),type:"string"},dark:{description:t.localize(11,null),type:"string"}}}]}}}}}}}}),define(ae[2405],le([1,0,8,343,127]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalWordLinkDetector=void 0;var A;(function(E){E[E.MaxLineLength=2e3]="MaxLineLength"})(A||(A={}));let k=class{constructor(I,b){this.xterm=I,this._configurationService=b,this.maxLinkLength=100}detect(I,b,S){const C=[],r=this._configurationService.getValue(R.TERMINAL_CONFIG_SECTION).wordSeparators,u=(0,p.getXtermLineContent)(this.xterm.buffer.active,b,S,this.xterm.cols);if(u===""||u.length>2e3)return[];const i=this._parseWords(u,r);for(const f of i){if(f.text==="")continue;f.text.length>0&&f.text.charAt(f.text.length-1)===":"&&(f.text=f.text.slice(0,-1),f.endIndex--);const c=(0,p.convertLinkRangeToBuffer)(I,this.xterm.cols,{startColumn:f.startIndex+1,startLineNumber:1,endColumn:f.endIndex+1,endLineNumber:1},b);C.push({text:f.text,bufferRange:c,type:"Search"})}return C}_parseWords(I,b){const S=[],C=b.split(""),r=I.split("");let u=0;for(let i=0;i<I.length;i++)C.includes(r[i])&&(S.push({startIndex:u,endIndex:i,text:I.substring(u,i)}),u=i+1);return u<I.length&&S.push({startIndex:u,endIndex:I.length,text:I.substring(u)}),S}};k.id="word",k=we([F(1,t.IConfigurationService)],k),e.TerminalWordLinkDetector=k}),define(ae[2406],le([1,0,11,65,112,6,2,28,27,127]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeAheadAddon=e.CharPredictState=e.PredictionTimeline=e.PredictionStats=e.isTenativeCharacterPrediction=void 0;const S="\x1B",C=`${S}[`,r=`${C}?25h`,u=`${C}?25l`,i=`${C}X`,f=`${C}K`,c=/^\x1b\[[0-9;]*m/,l=/^\x1b\[?([0-9]*)(;[35])?O?([DC])/,s=/[^a-z0-9]/i,d=24,n=1e3*60*5,a=5,o=.3,g=.5,h=/^(\x1b\[(\??25[hl]|\??[0-9;]+n))+/,v=K=>K._core,m=K=>{};var w;(function(K){K.Back="D",K.Forwards="C"})(w||(w={}));class D{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}}constructor(Y,ee,ie){this.rows=Y,this.cols=ee,this._buffer=ie,this._x=0,this._y=1,this._baseY=1,this._x=ie.cursorX,this._y=ie.cursorY,this._baseY=ie.baseY}getLine(){return this._buffer.getLine(this._y+this._baseY)}getCell(Y){return this.getLine()?.getCell(this._x,Y)}moveTo(Y){return this._x=Y.x,this._y=Y.y+Y.baseY-this._baseY,this.moveInstruction()}clone(){const Y=new D(this.rows,this.cols,this._buffer);return Y.moveTo(this),Y}move(Y,ee){return this._x=Y,this._y=ee,this.moveInstruction()}shift(Y=0,ee=0){return this._x+=Y,this._y+=ee,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=(K,Y,ee)=>{let ie=!1;ee<0&&Y.shift(-1);let re;for(;Y.x>=0;){if(re=Y.getCell(re),!re?.getCode())return;const oe=re.getChars();if(s.test(oe)){if(ie)break}else ie=!0;Y.shift(ee)}ee<0&&Y.shift(1)};var T;(function(K){K[K.Success=0]="Success",K[K.Failure=1]="Failure",K[K.Buffer=2]="Buffer"})(T||(T={}));class _{get remaining(){return this._input.length-this.index}get eof(){return this.index===this._input.length}get rest(){return this._input.slice(this.index)}constructor(Y){this._input=Y,this.index=0}eatChar(Y){if(this._input[this.index]===Y)return this.index++,Y}eatStr(Y){if(this._input.slice(this.index,Y.length)===Y)return this.index+=Y.length,Y}eatGradually(Y){const ee=this.index;for(let ie=0;ie<Y.length;ie++){if(ie>0&&this.eof)return 2;if(!this.eatChar(Y[ie]))return this.index=ee,1}return 0}eatRe(Y){const ee=Y.exec(this._input.slice(this.index));if(!!ee)return this.index+=ee[0].length,ee}eatCharCode(Y=0,ee=Y+1){const ie=this._input.charCodeAt(this.index);if(!(ie<Y||ie>=ee))return this.index++,ie}}class L{constructor(){this.clearAfterTimeout=!1}apply(){return""}rollback(){return""}rollForwards(){return""}matches(){return 1}}class M{constructor(Y){this.inner=Y}apply(Y,ee){return this._appliedCursor=ee.clone(),this.inner.apply(Y,this._appliedCursor),""}rollback(Y){return this.inner.rollback(Y.clone()),""}rollForwards(Y,ee){return this._appliedCursor&&Y.moveTo(this._appliedCursor),ee}matches(Y){return this.inner.matches(Y)}}const O=K=>K instanceof M&&K.inner instanceof N;e.isTenativeCharacterPrediction=O;class N{constructor(Y,ee){this._style=Y,this._char=ee,this.affectsStyle=!0}apply(Y,ee){const ie=ee.getCell();return this.appliedAt=ie?{pos:ee.coordinate,oldAttributes:U(ie),oldChar:ie.getChars()}:{pos:ee.coordinate,oldAttributes:"",oldChar:""},ee.shift(1),this._style.apply+this._char+this._style.undo}rollback(Y){if(!this.appliedAt)return"";const{oldAttributes:ee,oldChar:ie,pos:re}=this.appliedAt;return Y.moveTo(re)+(ie?`${ee}${ie}${Y.moveTo(re)}`:i)}rollForwards(Y,ee){return this.appliedAt?Y.clone().moveTo(this.appliedAt.pos)+ee:""}matches(Y,ee){const ie=Y.index;for(;Y.eatRe(c););if(Y.eof)return 2;if(Y.eatChar(this._char))return 0;if(ee instanceof N){const re=Y.eatGradually(`\b${ee._char}${this._char}`);if(re!==1)return re}return Y.index=ie,1}}class P{constructor(Y){this._terminal=Y}apply(Y,ee){const ie=!ee.getLine()?.translateToString(void 0,ee.x).trim(),re=ee.coordinate,oe=ee.shift(-1),se=ee.getCell();return this._appliedAt=se?{isLastChar:ie,pos:re,oldAttributes:U(se),oldChar:se.getChars()}:{isLastChar:ie,pos:re,oldAttributes:"",oldChar:""},oe+i}rollback(Y){if(!this._appliedAt)return"";const{oldAttributes:ee,oldChar:ie,pos:re}=this._appliedAt;return ie?ee+ie+Y.moveTo(re)+U(v(this._terminal)._inputHandler._curAttrData):Y.moveTo(re)+i}rollForwards(){return""}matches(Y){if(this._appliedAt?.isLastChar){const ee=Y.eatGradually(`\b${C}K`);if(ee!==1)return ee;const ie=Y.eatGradually("\b \b");if(ie!==1)return ie}return 1}}class B{apply(Y,ee){return this._prevPosition=ee.coordinate,ee.move(0,ee.y+1),`\r `}rollback(Y){return this._prevPosition?Y.moveTo(this._prevPosition):""}rollForwards(){return""}matches(Y){return Y.eatGradually(`\r `)}}class V extends B{apply(Y,ee){return this._prevPosition=ee.coordinate,ee.move(0,ee.y+1)," \r"}matches(Y){const ee=Y.eatGradually(" \r");return ee!==1?Y.eatGradually(f)===2?2:ee:Y.eatGradually(`\r `)}}class z{constructor(Y,ee,ie){this._direction=Y,this._moveByWords=ee,this._amount=ie}apply(Y,ee){const ie=ee.x,re=ee.getCell(),oe=re?U(re):"",{_amount:se,_direction:te,_moveByWords:Z}=this,ne=te==="D"?-1:1,ce=ee.clone();if(Z)for(let de=0;de<se;de++)y(Y,ce,ne);else ce.shift(ne*se);return this._applied={amount:Math.abs(ee.x-ce.x),prevPosition:ie,prevAttrs:oe,rollForward:ee.moveTo(ce)},this._applied.rollForward}rollback(Y){return this._applied?Y.move(this._applied.prevPosition,Y.y)+this._applied.prevAttrs:""}rollForwards(){return""}matches(Y){if(!this._applied)return 1;const ee=this._direction,{amount:ie,rollForward:re}=this._applied;if(Y.eatStr(`${C}${ee}`.repeat(ie))||ee==="D"&&Y.eatStr("\b".repeat(ie)))return 0;if(re){const oe=Y.eatGradually(re);if(oe!==1)return oe}return Y.eatGradually(`${C}${ie}${ee}`)}}class x extends k.Disposable{get accuracy(){let Y=0;for(const[,ee]of this._stats)ee&&Y++;return Y/(this._stats.length||1)}get sampleSize(){return this._stats.length}get latency(){const Y=this._stats.filter(([,ee])=>ee).map(([ee])=>ee).sort();return{count:Y.length,min:Y[0],median:Y[Math.floor(Y.length/2)],max:Y[Y.length-1]}}get maxLatency(){let Y=-1/0;for(const[ee,ie]of this._stats)ie&&(Y=Math.max(ee,Y));return Y}constructor(Y){super(),this._stats=[],this._index=0,this._addedAtTime=new WeakMap,this._changeEmitter=new A.Emitter,this.onChange=this._changeEmitter.event,this._register(Y.onPredictionAdded(ee=>this._addedAtTime.set(ee,Date.now()))),this._register(Y.onPredictionSucceeded(this._pushStat.bind(this,!0))),this._register(Y.onPredictionFailed(this._pushStat.bind(this,!1)))}_pushStat(Y,ee){const ie=this._addedAtTime.get(ee);this._stats[this._index]=[Date.now()-ie,Y],this._index=(this._index+1)%d,this._changeEmitter.fire()}}e.PredictionStats=x;class H{get _currentGenerationPredictions(){return this._expected.filter(({gen:Y})=>Y===this._expected[0].gen).map(({p:Y})=>Y)}get isShowingPredictions(){return this._showPredictions}get length(){return this._expected.length}constructor(Y,ee){this.terminal=Y,this._style=ee,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}setShowPredictions(Y){if(Y===this._showPredictions)return;this._showPredictions=Y;const ee=this._getActiveBuffer();if(!ee)return;const ie=this._currentGenerationPredictions;Y?(this.clearCursor(),this._style.expectIncomingStyle(ie.reduce((re,oe)=>oe.affectsStyle?re+1:re,0)),this.terminal.write(ie.map(re=>re.apply(ee,this.physicalCursor(ee))).join(""))):this.terminal.write(ie.reverse().map(re=>re.rollback(this.physicalCursor(ee))).join(""))}undoAllPredictions(){const Y=this._getActiveBuffer();this._showPredictions&&Y&&this.terminal.write(this._currentGenerationPredictions.reverse().map(ee=>ee.rollback(this.physicalCursor(Y))).join("")),this._expected=[]}beforeServerInput(Y){const ee=Y;if(this._inputBuffer&&(Y=this._inputBuffer+Y,this._inputBuffer=void 0),!this._expected.length)return this._clearPredictionState(),Y;const ie=this._getActiveBuffer();if(!ie)return this._clearPredictionState(),Y;let re="";const oe=new _(Y),se=this._expected[0].gen,te=()=>{const Z=oe.eatRe(h);Z&&(re+=Z[0])};e:for(;this._expected.length&&oe.remaining>0;){te();const{p:Z,gen:ne}=this._expected[0],ce=this.physicalCursor(ie),de=oe.index;switch(Z.matches(oe,this._lookBehind)){case 0:{const he=Y.slice(de,oe.index);ne===se?re+=Z.rollForwards?.(ce,he):(Z.apply(ie,this.physicalCursor(ie)),re+=he),this._succeededEmitter.fire(Z),this._lookBehind=Z,this._expected.shift();break}case 2:this._inputBuffer=Y.slice(de),oe.index=Y.length;break e;case 1:{const he=this._expected.filter(pe=>pe.gen===se).reverse();re+=he.map(({p:pe})=>pe.rollback(this.physicalCursor(ie))).join(""),he.some(pe=>pe.p.affectsStyle)&&(re+=U(v(this.terminal)._inputHandler._curAttrData)),this._clearPredictionState(),this._failedEmitter.fire(Z);break e}}}if(te(),oe.eof||(re+=oe.rest,this._clearPredictionState()),this._expected.length&&se!==this._expected[0].gen)for(const{p:Z,gen:ne}of this._expected){if(ne!==this._expected[0].gen)break;Z.affectsStyle&&this._style.expectIncomingStyle(),re+=Z.apply(ie,this.physicalCursor(ie))}return this._showPredictions?(re.length===0||re===Y||(this._physicalCursor&&(re+=this._physicalCursor.moveInstruction()),re=u+re+r),re):ee}_clearPredictionState(){this._expected=[],this.clearCursor(),this._lookBehind=void 0}addPrediction(Y,ee){if(this._expected.push({gen:this._currentGen,p:ee}),this._addedEmitter.fire(ee),this._currentGen!==this._expected[0].gen)return ee.apply(Y,this.tentativeCursor(Y)),!1;const ie=ee.apply(Y,this.physicalCursor(Y));return this._tenativeCursor=void 0,this._showPredictions&&ie&&(ee.affectsStyle&&this._style.expectIncomingStyle(),this.terminal.write(ie)),!0}addBoundary(Y,ee){let ie=!1;return Y&&ee&&(ie=this.addPrediction(Y,new M(ee)),ee.apply(Y,this.tentativeCursor(Y))),this._currentGen++,ie}peekEnd(){return this._expected[this._expected.length-1]?.p}peekStart(){return this._expected[0]?.p}physicalCursor(Y){return this._physicalCursor||(this._showPredictions&&m(this.terminal),this._physicalCursor=new D(this.terminal.rows,this.terminal.cols,Y)),this._physicalCursor}tentativeCursor(Y){return this._tenativeCursor||(this._tenativeCursor=this.physicalCursor(Y).clone()),this._tenativeCursor}clearCursor(){this._physicalCursor=void 0,this._tenativeCursor=void 0}_getActiveBuffer(){const Y=this.terminal.buffer.active;return Y.type==="normal"?Y:void 0}}e.PredictionTimeline=H;const W=K=>{if(K.isAttributeDefault())return[0];const Y=[];return K.isBold()&&Y.push(1),K.isDim()&&Y.push(2),K.isItalic()&&Y.push(3),K.isUnderline()&&Y.push(4),K.isBlink()&&Y.push(5),K.isInverse()&&Y.push(7),K.isInvisible()&&Y.push(8),K.isFgRGB()&&Y.push(38,2,K.getFgColor()>>>24,K.getFgColor()>>>16&255,K.getFgColor()&255),K.isFgPalette()&&Y.push(38,5,K.getFgColor()),K.isFgDefault()&&Y.push(39),K.isBgRGB()&&Y.push(48,2,K.getBgColor()>>>24,K.getBgColor()>>>16&255,K.getBgColor()&255),K.isBgPalette()&&Y.push(48,5,K.getBgColor()),K.isBgDefault()&&Y.push(49),Y},U=K=>`${C}${W(K).join(";")}m`,$=(K,Y,ee)=>{if(K.length-Y>ee.length)return!1;for(let ie=0;ie<ee.length;ie++,Y++)if(ee[Y]!==K[Y])return!1;return!0},q=(K,Y)=>{const ee=[0,0,-1,0,0,0];let ie=0,re=0;do{const oe=K[Y+re];if(ee[re+ie]=typeof oe=="number"?oe:oe[0],typeof oe!="number"){let se=0;do ee[1]===5&&(ie=1),ee[re+se+1+ie]=oe[se];while(++se<oe.length&&se+re+1+ie<ee.length);break}if(ee[1]===5&&re+ie>=2||ee[1]===2&&re+ie>=5)break;ee[1]&&(ie=1)}while(++re+Y<K.length&&re+ie<ee.length);return re};class X{static _compileArgs(Y){return`${C}${Y.join(";")}m`}constructor(Y,ee){this._terminal=ee,this._expectedIncomingStyles=0,this.onUpdate(Y)}expectIncomingStyle(Y=1){this._expectedIncomingStyles+=Y*2}startTracking(){this._expectedIncomingStyles=0,this._onDidWriteSGR(W(v(this._terminal)._inputHandler._curAttrData)),this._csiHandler=this._terminal.parser.registerCsiHandler({final:"m"},Y=>(this._onDidWriteSGR(Y),!1))}debounceStopTracking(){this._stopTracking()}dispose(){this._stopTracking()}_stopTracking(){this._csiHandler?.dispose(),this._csiHandler=void 0}_onDidWriteSGR(Y){const ee=this._undoArgs;for(let ie=0;ie<Y.length;){const re=Y[ie],oe=typeof re=="number"?re:re[0];if(this._expectedIncomingStyles){if($(Y,ie,this._undoArgs)){this._expectedIncomingStyles--,ie+=this._undoArgs.length;continue}if($(Y,ie,this._applyArgs)){this._expectedIncomingStyles--,ie+=this._applyArgs.length;continue}}const se=oe===38||oe===48||oe===58?q(Y,ie):1;switch(this._applyArgs[0]){case 1:oe===2?this._undoArgs=[22,2]:(oe===22||oe===0)&&(this._undoArgs=[22]);break;case 2:oe===1?this._undoArgs=[22,1]:(oe===22||oe===0)&&(this._undoArgs=[22]);break;case 38:oe===0||oe===39||oe===100?this._undoArgs=[39]:(oe>=30&&oe<=38||oe>=90&&oe<=97)&&(this._undoArgs=Y.slice(ie,ie+se));break;default:oe===this._applyArgs[0]?this._undoArgs=this._applyArgs:oe===0&&(this._undoArgs=this._originalUndoArgs)}ie+=se}ee!==this._undoArgs&&(this.undo=X._compileArgs(this._undoArgs))}onUpdate(Y){const{applyArgs:ee,undoArgs:ie}=this._getArgs(Y);this._applyArgs=ee,this._undoArgs=this._originalUndoArgs=ie,this.apply=X._compileArgs(this._applyArgs),this.undo=X._compileArgs(this._undoArgs)}_getArgs(Y){switch(Y){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 ee;try{ee=p.Color.fromHex(Y)}catch{ee=new p.Color(new p.RGBA(255,0,0,1))}const{r:ie,g:re,b:oe}=ee.rgba;return{applyArgs:[38,2,ie,re,oe],undoArgs:[39]}}}}}we([(0,R.debounce)(2e3)],X.prototype,"debounceStopTracking",null);const G=(K=b.DEFAULT_LOCAL_ECHO_EXCLUDE)=>new RegExp(`\\b(${K.map(E.escapeRegExpCharacters).join("|")})\\b`,"i");var Q;(function(K){K[K.Unknown=0]="Unknown",K[K.HasPendingChar=1]="HasPendingChar",K[K.Validated=2]="Validated"})(Q=e.CharPredictState||(e.CharPredictState={}));let j=class extends k.Disposable{constructor(Y,ee,ie){super(),this._processManager=Y,this._config=ee,this._telemetryService=ie,this._typeaheadThreshold=this._config.config.localEchoLatencyThreshold,this._excludeProgramRe=G(this._config.config.localEchoExcludePrograms),this._terminalTitle="",this._register((0,k.toDisposable)(()=>this._clearPredictionDebounce?.dispose()))}activate(Y){const ee=this._typeaheadStyle=this._register(new X(this._config.config.localEchoStyle,Y)),ie=this._timeline=new H(Y,this._typeaheadStyle),re=this.stats=this._register(new x(this._timeline));ie.setShowPredictions(this._typeaheadThreshold===0),this._register(Y.onData(se=>this._onUserData(se))),this._register(Y.onTitleChange(se=>{this._terminalTitle=se,this._reevaluatePredictorState(re,ie)})),this._register(Y.onResize(()=>{ie.setShowPredictions(!1),ie.clearCursor(),this._reevaluatePredictorState(re,ie)})),this._register(this._config.onConfigChanged(()=>{ee.onUpdate(this._config.config.localEchoStyle),this._typeaheadThreshold=this._config.config.localEchoLatencyThreshold,this._excludeProgramRe=G(this._config.config.localEchoExcludePrograms),this._reevaluatePredictorState(re,ie)})),this._register(this._timeline.onPredictionSucceeded(se=>{this._lastRow?.charState===1&&(0,e.isTenativeCharacterPrediction)(se)&&se.inner.appliedAt&&se.inner.appliedAt.pos.y+se.inner.appliedAt.pos.baseY===this._lastRow.y&&(this._lastRow.charState=2)})),this._register(this._processManager.onBeforeProcessData(se=>this._onBeforeProcessData(se)));let oe;this._register(re.onChange(()=>{oe||(oe=setTimeout(()=>{this._sendLatencyStats(re),oe=void 0},n)),ie.length===0&&ee.debounceStopTracking(),this._reevaluatePredictorState(re,ie)}))}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(Y,ee){this._reevaluatePredictorStateNow(Y,ee)}_reevaluatePredictorStateNow(Y,ee){if(this._excludeProgramRe.test(this._terminalTitle))ee.setShowPredictions(!1);else if(this._typeaheadThreshold<0)ee.setShowPredictions(!1);else if(this._typeaheadThreshold===0)ee.setShowPredictions(!0);else if(Y.sampleSize>a&&Y.accuracy>o){const ie=Y.latency.median;ie>=this._typeaheadThreshold?ee.setShowPredictions(!0):ie<this._typeaheadThreshold/g&&ee.setShowPredictions(!1)}}_sendLatencyStats(Y){this._telemetryService.publicLog("terminalLatencyStats",{...Y.latency,predictionAccuracy:Y.accuracy})}_onUserData(Y){if(this._timeline?.terminal.buffer.active.type!=="normal")return;const ee=this._timeline.terminal,ie=ee.buffer.active;if(ie.cursorX===1&&ie.cursorY===ee.rows-1&&ie.getLine(ie.cursorY+ie.baseY)?.getCell(0)?.getChars()===":")return;const re=ie.baseY+ie.cursorY;re!==this._lastRow?.y?this._lastRow={y:re,startingX:ie.cursorX,endingX:ie.cursorX,charState:0}:(this._lastRow.startingX=Math.min(this._lastRow.startingX,ie.cursorX),this._lastRow.endingX=Math.max(this._lastRow.endingX,this._timeline.physicalCursor(ie).x));const oe=Z=>this._timeline.tentativeCursor(ie).x<=this._lastRow.startingX?this._timeline.addBoundary(ie,Z):this._timeline.addPrediction(ie,Z),se=Z=>this._timeline.tentativeCursor(ie).x>=this._lastRow.endingX-1?this._timeline.addBoundary(ie,Z):this._timeline.addPrediction(ie,Z),te=new _(Y);for(;te.remaining>0;){if(te.eatCharCode(127)){const ne=this._timeline.peekEnd();ne&&ne instanceof N&&this._timeline.addBoundary(),this._timeline.isShowingPredictions&&m(this._timeline.terminal),this._timeline.tentativeCursor(ie).x<=this._lastRow.startingX?this._timeline.addBoundary(ie,new P(this._timeline.terminal)):(this._lastRow.endingX--,this._timeline.addPrediction(ie,new P(this._timeline.terminal)));continue}if(te.eatCharCode(32,126)){const ne=Y[te.index-1],ce=new N(this._typeaheadStyle,ne);this._lastRow.charState===0?(this._timeline.addBoundary(ie,ce),this._lastRow.charState=1):this._timeline.addPrediction(ie,ce),this._timeline.tentativeCursor(ie).x>=ee.cols&&this._timeline.addBoundary(ie,new V);continue}const Z=te.eatRe(l);if(Z){const ne=Z[3],ce=new z(ne,!!Z[2],Number(Z[1])||1);ne==="D"?oe(ce):se(ce);continue}if(te.eatStr(`${S}f`)){se(new z("C",!0,1));continue}if(te.eatStr(`${S}b`)){oe(new z("D",!0,1));continue}if(te.eatChar("\r")&&ie.cursorY<ee.rows-1){this._timeline.addPrediction(ie,new B);continue}this._timeline.addBoundary(ie,new L);break}this._timeline.length===1&&(this._deferClearingPredictions(),this._typeaheadStyle.startTracking())}_onBeforeProcessData(Y){!this._timeline||(Y.data=this._timeline.beforeServerInput(Y.data),this._deferClearingPredictions())}};we([(0,R.debounce)(100)],j.prototype,"_reevaluatePredictorState",null),j=we([F(2,I.ITelemetryService)],j),e.TypeAheadAddon=j}),define(ae[289],le([1,0,1915,33,80]),function(J,e,t,p,R){"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_FOREGROUND_COLOR=e.TERMINAL_INACTIVE_SELECTION_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,p.registerColor)("terminal.background",null,t.localize(0,null)),e.TERMINAL_FOREGROUND_COLOR=(0,p.registerColor)("terminal.foreground",{light:"#333333",dark:"#CCCCCC",hcDark:"#FFFFFF",hcLight:"#292929"},t.localize(1,null)),e.TERMINAL_CURSOR_FOREGROUND_COLOR=(0,p.registerColor)("terminalCursor.foreground",null,t.localize(2,null)),e.TERMINAL_CURSOR_BACKGROUND_COLOR=(0,p.registerColor)("terminalCursor.background",null,t.localize(3,null)),e.TERMINAL_SELECTION_BACKGROUND_COLOR=(0,p.registerColor)("terminal.selectionBackground",{light:p.editorSelectionBackground,dark:p.editorSelectionBackground,hcDark:p.editorSelectionBackground,hcLight:p.editorSelectionBackground},t.localize(4,null)),e.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR=(0,p.registerColor)("terminal.inactiveSelectionBackground",{light:(0,p.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.5),dark:(0,p.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.5),hcDark:(0,p.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.7),hcLight:(0,p.transparent)(e.TERMINAL_SELECTION_BACKGROUND_COLOR,.5)},t.localize(5,null)),e.TERMINAL_SELECTION_FOREGROUND_COLOR=(0,p.registerColor)("terminal.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:"#ffffff"},t.localize(6,null)),e.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR=(0,p.registerColor)("terminalCommandDecoration.defaultBackground",{light:"#00000040",dark:"#ffffff40",hcDark:"#ffffff80",hcLight:"#00000040"},t.localize(7,null)),e.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR=(0,p.registerColor)("terminalCommandDecoration.successBackground",{dark:"#1B81A8",light:"#2090D3",hcDark:"#1B81A8",hcLight:"#007100"},t.localize(8,null)),e.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR=(0,p.registerColor)("terminalCommandDecoration.errorBackground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F14C4C",hcLight:"#B5200D"},t.localize(9,null)),e.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR=(0,p.registerColor)("terminalOverviewRuler.cursorForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},t.localize(10,null)),e.TERMINAL_BORDER_COLOR=(0,p.registerColor)("terminal.border",{dark:R.PANEL_BORDER,light:R.PANEL_BORDER,hcDark:R.PANEL_BORDER,hcLight:R.PANEL_BORDER},t.localize(11,null)),e.TERMINAL_FIND_MATCH_BACKGROUND_COLOR=(0,p.registerColor)("terminal.findMatchBackground",{dark:p.editorFindMatch,light:p.editorFindMatch,hcDark:null,hcLight:"#0F4A85"},t.localize(12,null)),e.TERMINAL_FIND_MATCH_BORDER_COLOR=(0,p.registerColor)("terminal.findMatchBorder",{dark:null,light:null,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(13,null)),e.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR=(0,p.registerColor)("terminal.findMatchHighlightBackground",{dark:p.editorFindMatchHighlight,light:p.editorFindMatchHighlight,hcDark:null,hcLight:null},t.localize(14,null)),e.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR=(0,p.registerColor)("terminal.findMatchHighlightBorder",{dark:null,light:null,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(15,null)),e.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR=(0,p.registerColor)("terminalOverviewRuler.findMatchForeground",{dark:p.overviewRulerFindMatchForeground,light:p.overviewRulerFindMatchForeground,hcDark:"#f38518",hcLight:"#0F4A85"},t.localize(16,null)),e.TERMINAL_DRAG_AND_DROP_BACKGROUND=(0,p.registerColor)("terminal.dropBackground",{dark:R.EDITOR_DRAG_AND_DROP_BACKGROUND,light:R.EDITOR_DRAG_AND_DROP_BACKGROUND,hcDark:R.EDITOR_DRAG_AND_DROP_BACKGROUND,hcLight:R.EDITOR_DRAG_AND_DROP_BACKGROUND},t.localize(17,null)),e.TERMINAL_TAB_ACTIVE_BORDER=(0,p.registerColor)("terminal.tab.activeBorder",{dark:R.TAB_ACTIVE_BORDER,light:R.TAB_ACTIVE_BORDER,hcDark:R.TAB_ACTIVE_BORDER,hcLight:R.TAB_ACTIVE_BORDER},t.localize(18,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 E=e.ansiColorMap[k],I=k.substring(13);e.ansiColorIdentifiers[E.index]=(0,p.registerColor)(k,E.defaults,t.localize(19,null,I))}}e.registerColors=A}),define(ae[2407],le([1,0,65,289]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.calcANSI8bitColor=e.appendStylizedStringToContainer=e.handleANSIOutput=void 0;function R(E,I,b,S){const C=document.createElement("span"),r=E.length;let u=[],i,f,c,l=!1,s=0,d="";for(;s<r;){let m=!1;if(E.charCodeAt(s)===27&&E.charAt(s+1)==="["){const w=s;s+=2;let D="";for(;s<r;){const y=E.charAt(s);if(D+=y,s++,y.match(/^[ABCDHIJKfhmpsu]$/)){m=!0;break}}if(m){if(A(C,d,u,I,S,i,f,c),d="",D.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=D.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?h(y,T):y[1]===2&&g(y,T)}else o(y)}}else s=w}m===!1&&(d+=E.charAt(s),s++)}return d&&A(C,d,u,I,S,i,f,c),C;function n(m,w){m==="foreground"?i=w:m==="background"?f=w:m==="underline"&&(c=w),u=u.filter(D=>D!==`code-${m}-colored`),w!==void 0&&u.push(`code-${m}-colored`)}function a(){const m=i;n("foreground",f),n("background",m)}function o(m){for(const w of m)switch(w){case 0:{u=[],i=void 0,f=void 0;break}case 1:{u=u.filter(D=>D!=="code-bold"),u.push("code-bold");break}case 2:{u=u.filter(D=>D!=="code-dim"),u.push("code-dim");break}case 3:{u=u.filter(D=>D!=="code-italic"),u.push("code-italic");break}case 4:{u=u.filter(D=>D!=="code-underline"&&D!=="code-double-underline"),u.push("code-underline");break}case 5:{u=u.filter(D=>D!=="code-blink"),u.push("code-blink");break}case 6:{u=u.filter(D=>D!=="code-rapid-blink"),u.push("code-rapid-blink");break}case 7:{l||(l=!0,a());break}case 8:{u=u.filter(D=>D!=="code-hidden"),u.push("code-hidden");break}case 9:{u=u.filter(D=>D!=="code-strike-through"),u.push("code-strike-through");break}case 10:{u=u.filter(D=>!D.startsWith("code-font"));break}case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:{u=u.filter(D=>!D.startsWith("code-font")),u.push(`code-font-${w-10}`);break}case 21:{u=u.filter(D=>D!=="code-underline"&&D!=="code-double-underline"),u.push("code-double-underline");break}case 22:{u=u.filter(D=>D!=="code-bold"&&D!=="code-dim");break}case 23:{u=u.filter(D=>D!=="code-italic"&&D!=="code-font-10");break}case 24:{u=u.filter(D=>D!=="code-underline"&&D!=="code-double-underline");break}case 25:{u=u.filter(D=>D!=="code-blink"&&D!=="code-rapid-blink");break}case 27:{l&&(l=!1,a());break}case 28:{u=u.filter(D=>D!=="code-hidden");break}case 29:{u=u.filter(D=>D!=="code-strike-through");break}case 53:{u=u.filter(D=>D!=="code-overline"),u.push("code-overline");break}case 55:{u=u.filter(D=>D!=="code-overline");break}case 39:{n("foreground",void 0);break}case 49:{n("background",void 0);break}case 59:{n("underline",void 0);break}case 73:{u=u.filter(D=>D!=="code-superscript"&&D!=="code-subscript"),u.push("code-superscript");break}case 74:{u=u.filter(D=>D!=="code-superscript"&&D!=="code-subscript"),u.push("code-subscript");break}case 75:{u=u.filter(D=>D!=="code-superscript"&&D!=="code-subscript");break}default:{v(w);break}}}function g(m,w){if(m.length>=5&&m[2]>=0&&m[2]<=255&&m[3]>=0&&m[3]<=255&&m[4]>=0&&m[4]<=255){const D=new t.RGBA(m[2],m[3],m[4]);n(w,D)}}function h(m,w){let D=m[2];const y=k(D);if(y)n(w,y);else if(D>=0&&D<=15){if(w==="underline"){const T=b.getColorTheme(),_=p.ansiColorIdentifiers[D],L=T.getColor(_);L&&n(w,L.rgba);return}D+=30,D>=38&&(D+=52),w==="background"&&(D+=10),v(D)}}function v(m){const w=b.getColorTheme();let D,y;if(m>=30&&m<=37?(y=m-30,D="foreground"):m>=90&&m<=97?(y=m-90+8,D="foreground"):m>=40&&m<=47?(y=m-40,D="background"):m>=100&&m<=107&&(y=m-100+8,D="background"),y!==void 0&&D){const T=p.ansiColorIdentifiers[y],_=w.getColor(T);_&&n(D,_.rgba)}}}e.handleANSIOutput=R;function A(E,I,b,S,C,r,u,i){if(!E||!I)return;const f=S.linkify(I,!0,C);f.className=b.join(" "),r&&(f.style.color=t.Color.Format.CSS.formatRGB(new t.Color(r))),u&&(f.style.backgroundColor=t.Color.Format.CSS.formatRGB(new t.Color(u))),i&&(f.style.textDecorationColor=t.Color.Format.CSS.formatRGB(new t.Color(i))),E.appendChild(f)}e.appendStylizedStringToContainer=A;function k(E){if(E%1===0)if(E>=16&&E<=231){E-=16;let I=E%6;E=(E-I)/6;let b=E%6;E=(E-b)/6;let S=E;const C=255/5;return I=Math.round(I*C),b=Math.round(b*C),S=Math.round(S*C),new t.RGBA(S,b,I)}else if(E>=232&&E<=255){E-=232;const I=Math.round(E/23*255);return new t.RGBA(I,I,I)}else return}e.calcANSI8bitColor=k}),define(ae[290],le([1,0,108,9,63,126,12,127,289]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIconId=e.getUriClasses=e.getColorStyleContent=e.getColorStyleElement=e.getStandardColors=e.getColorClass=void 0;function b(f){let c;if(typeof f=="string"?c=f:f.color?c=f.color.replace(/\./g,"_"):k.ThemeIcon.isThemeIcon(f.icon)&&f.icon.color&&(c=f.icon.color.id.replace(/\./g,"_")),c)return`terminal-icon-${c.replace(/\./g,"_")}`}e.getColorClass=b;function S(f){const c=[];for(const l in I.ansiColorMap)f.getColor(l)&&!l.toLowerCase().includes("bright")&&c.push(l);return c}e.getStandardColors=S;function C(f){const c=S(f),l=document.createElement("style");let s="";for(const d of c){const n=b(d),a=f.getColor(d);a&&(s+=`.monaco-workbench .${n} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${a} !important; }`)}return l.textContent=s,l}e.getColorStyleElement=C;function r(f,c){const l=S(f);let s="";for(const d of l){const n=b(d),a=f.getColor(d);a&&(c?s+=`.monaco-workbench .show-file-icons .file-icon.terminal-tab.${n}::before{ color: ${a} !important; }`:s+=`.monaco-workbench .${n} .codicon:first-child:not(.codicon-split-horizontal):not(.codicon-trashcan):not(.file-icon){ color: ${a} !important; }`)}return s}e.getColorStyleContent=r;function u(f,c,l){const s=f.icon;if(!s)return;const d=[];let n;if(l){if(typeof s=="string"&&(s.startsWith("$(")||(0,R.getIconRegistry)().getIcon(s)))return d;typeof s=="string"&&(n=p.URI.parse(s))}if(s instanceof p.URI?n=s:s instanceof Object&&"light"in s&&"dark"in s&&(n=c===A.ColorScheme.LIGHT?s.light:s.dark),n instanceof p.URI){const o=`terminal-uri-icon-${(0,t.hash)(n.path).toString(36)}`;d.push(o),d.push("terminal-uri-icon")}return d}e.getUriClasses=u;function i(f,c){return!c.icon||c.icon instanceof Object&&!("id"in c.icon)?f.get(E.ITerminalProfileResolverService).getDefaultIcon().id:typeof c.icon=="string"?c.icon:c.icon.id}e.getIconId=i}),define(ae[2408],le([1,0,29,8,48,290,452,1900,12,127,63,53]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProfileQuickpick=void 0;let r=class{constructor(i,f,c,l,s){this._terminalProfileService=i,this._terminalProfileResolverService=f,this._configurationService=c,this._quickInputService=l,this._themeService=s}async showAndGetResult(i){const f=await this._terminalProfileService.getPlatformKey(),c="terminal.integrated.profiles."+f,l=await this._createAndShow(i),s=`terminal.integrated.defaultProfile.${f}`;if(!!l){if(i==="setDefault"){if("command"in l.profile)return;if("id"in l.profile)return await this._configurationService.updateValue(s,l.profile.title,2),{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 d=await this._configurationService.getValue(c);if(typeof d=="object"){const n={path:l.profile.path};l.profile.args&&(n.args=l.profile.args),d[l.profile.profileName]=n}await this._configurationService.updateValue(c,d,2)}await this._configurationService.updateValue(s,l.profileName,2)}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 f=await this._terminalProfileService.getPlatformKey(),c=this._terminalProfileService.availableProfiles,l="terminal.integrated.profiles."+f,s=this._terminalProfileService.getDefaultProfileName();let d;const n={placeHolder:i==="createInstance"?E.localize(0,null):E.localize(1,null),onDidTriggerItemButton:async w=>{if("command"in w.item.profile||"id"in w.item.profile)return;const D=this._configurationService.getValue("terminal.integrated.profiles."+f),y=D?Object.keys(D):[],T=await this._quickInputService.input({prompt:E.localize(2,null),value:w.item.profile.profileName,validateInput:async L=>{if(y.includes(L))return E.localize(3,null)}});if(!T)return;const _={...D};_[T]={path:w.item.profile.path,args:w.item.profile.args},await this._configurationService.updateValue(l,_,2)},onKeyMods:w=>d=w},a=[],o=c.filter(w=>!w.isAutoDetected),g=c.filter(w=>w.isAutoDetected);o.length>0&&(a.push({type:"separator",label:E.localize(4,null)}),a.push(...this._sortProfileQuickPickItems(o.map(w=>this._createProfileQuickPickItem(w)),s))),a.push({type:"separator",label:E.localize(5,null)});const h=[];for(const w of this._terminalProfileService.contributedProfiles){let D;typeof w.icon=="string"&&(w.icon.startsWith("$(")?D=I.ThemeIcon.fromString(w.icon):D=I.ThemeIcon.fromId(w.icon)),(!D||!(0,S.getIconRegistry)().getIcon(D.id))&&(D=this._terminalProfileResolverService.getDefaultIcon());const y=(0,A.getUriClasses)(w,this._themeService.getColorTheme().type,!0),T=(0,A.getColorClass)(w),_=[];y&&_.push(...y),T&&_.push(T),h.push({label:`$(${D.id}) ${w.title}`,profile:{extensionIdentifier:w.extensionIdentifier,title:w.title,icon:w.icon,id:w.id,color:w.color},profileName:w.title,iconClasses:_})}h.length>0&&a.push(...this._sortProfileQuickPickItems(h,s)),g.length>0&&(a.push({type:"separator",label:E.localize(6,null)}),a.push(...this._sortProfileQuickPickItems(g.map(w=>this._createProfileQuickPickItem(w)),s)));const v=(0,A.getColorStyleElement)(this._themeService.getColorTheme());document.body.appendChild(v);const m=await this._quickInputService.pick(a,n);if(document.body.removeChild(v),!!m)return d&&(m.keyMods=d),m}_createProfileQuickPickItem(i){const f=[{iconClass:I.ThemeIcon.asClassName(k.configureTerminalProfileIcon),tooltip:E.localize(7,null)}],l=`$(${(i.icon&&I.ThemeIcon.isThemeIcon(i.icon)?i.icon:t.Codicon.terminal).id}) ${i.profileName}`,s=i.isFromPath?(0,C.basename)(i.path):i.path,d=(0,A.getColorClass)(i),n=[];if(d&&n.push(d),i.args){if(typeof i.args=="string")return{label:l,description:`${i.path} ${i.args}`,profile:i,profileName:i.profileName,buttons:f,iconClasses:n};const a=i.args.map(o=>o.includes(" ")?`"${o.replace(/"/g,'\\"')}"`:o).join(" ");return{label:l,description:`${s} ${a}`,profile:i,profileName:i.profileName,buttons:f,iconClasses:n}}return{label:l,description:s,profile:i,profileName:i.profileName,buttons:f,iconClasses:n}}_sortProfileQuickPickItems(i,f){return i.sort((c,l)=>l.profileName===f?1:c.profileName===f?-1:c.profileName.localeCompare(l.profileName))}};r=we([F(0,b.ITerminalProfileService),F(1,b.ITerminalProfileResolverService),F(2,p.IConfigurationService),F(3,R.IQuickInputService),F(4,I.IThemeService)],r),e.TerminalProfileQuickpick=r}),define(ae[2409],le([1,0,16,2,11,12,33,289]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.selectLines=e.getLine=e.MarkNavigationAddon=e.ScrollPosition=void 0;var I;(function(u){u[u.Top=0]="Top",u[u.Bottom=1]="Bottom"})(I||(I={}));var b;(function(u){u[u.Top=0]="Top",u[u.Middle=1]="Middle"})(b=e.ScrollPosition||(e.ScrollPosition={}));let S=class extends p.Disposable{activate(i){this._terminal=i,this._register(this._terminal.onData(()=>{this._currentMarker=I.Bottom}))}constructor(i,f){super(),this._capabilities=i,this._themeService=f,this._currentMarker=I.Bottom,this._selectionStart=null,this._isDisposable=!1}_getMarkers(i){const f=this._capabilities.get(2),c=this._capabilities.get(3),l=this._capabilities.get(4);let s=[];if(f?s=(0,t.coalesce)(f.commands.map(d=>d.marker)):c&&s.push(...c.commands),l&&!i){let d=l.markers().next()?.value;const n=[];for(;d;)n.push(d),d=l.markers().next()?.value;s=n}return s}clearMarker(){this._currentMarker=I.Bottom,this._resetNavigationDecorations(),this._selectionStart=null}_resetNavigationDecorations(){this._navigationDecorations&&(0,p.dispose)(this._navigationDecorations),this._navigationDecorations=[]}_isEmptyCommand(i){return i===I.Bottom?!0:i===I.Top?this._getMarkers(!0).map(f=>f.line).indexOf(0)===-1:this._getMarkers(!0).indexOf(i)===-1}scrollToPreviousMark(i=1,f=!1,c){if(!this._terminal)return;f||(this._selectionStart=null);let l;const s=typeof this._currentMarker=="object"?this._getTargetScrollLine(this._terminal,this._currentMarker,i):Math.min(C(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),d=this._terminal.buffer.active.viewportY;if(typeof this._currentMarker=="object"?!this._isMarkerInViewport(this._terminal,this._currentMarker):s!==d){const n=this._getMarkers(c).filter(a=>a.line>=d).length;l=this._getMarkers(c).length-n-1}else this._currentMarker===I.Bottom?l=this._getMarkers(c).length-1:this._currentMarker===I.Top?l=-1:this._isDisposable?(l=this._findPreviousMarker(this._terminal,c),this._currentMarker.dispose(),this._isDisposable=!1):c&&this._isEmptyCommand(this._currentMarker)?l=this._findPreviousMarker(this._terminal,!0):l=this._getMarkers(c).indexOf(this._currentMarker)-1;if(l<0){this._currentMarker=I.Top,this._terminal.scrollToTop(),this._resetNavigationDecorations();return}this._currentMarker=this._getMarkers(c)[l],this._scrollToMarker(this._currentMarker,i)}scrollToNextMark(i=1,f=!1,c=!0){if(!this._terminal)return;f||(this._selectionStart=null);let l;const s=typeof this._currentMarker=="object"?this._getTargetScrollLine(this._terminal,this._currentMarker,i):Math.min(C(this._terminal,this._currentMarker),this._terminal.buffer.active.baseY),d=this._terminal.buffer.active.viewportY;if((typeof this._currentMarker=="object"?!this._isMarkerInViewport(this._terminal,this._currentMarker):s!==d)?l=this._getMarkers(c).filter(a=>a.line<=d).length:this._currentMarker===I.Bottom?l=this._getMarkers(c).length:this._currentMarker===I.Top?l=0:this._isDisposable?(l=this._findNextMarker(this._terminal,c),this._currentMarker.dispose(),this._isDisposable=!1):c&&this._isEmptyCommand(this._currentMarker)?l=this._findNextMarker(this._terminal,!0):l=this._getMarkers(c).indexOf(this._currentMarker)+1,l>=this._getMarkers(c).length){this._currentMarker=I.Bottom,this._terminal.scrollToBottom(),this._resetNavigationDecorations();return}this._currentMarker=this._getMarkers(c)[l],this._scrollToMarker(this._currentMarker,i)}_scrollToMarker(i,f,c,l){if(!!this._terminal){if(!this._isMarkerInViewport(this._terminal,i)){const s=this._getTargetScrollLine(this._terminal,i,f);this._terminal.scrollToLine(s)}l||this._registerTemporaryDecoration(i,c)}}_createMarkerForOffset(i,f){if(f===0)return i;{const c=this._terminal?.registerMarker(-this._terminal.buffer.active.cursorY+i.line-this._terminal.buffer.active.baseY+f);if(c)return c;throw new Error(`Could not register marker with offset ${i.line}, ${f}`)}}_registerTemporaryDecoration(i,f){if(!this._terminal)return;this._resetNavigationDecorations();const c=this._themeService.getColorTheme().getColor(E.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),l=i.line,s=f?f.line-l+1:1;for(let d=0;d<s;d++){const n=this._terminal.registerDecoration({marker:this._createMarkerForOffset(i,d),width:this._terminal.cols,overviewRulerOptions:{color:c?.toString()||"#a0a0a0cc"}});if(n){this._navigationDecorations?.push(n);let a;n.onRender(o=>{a||(a=o,s>1?o.classList.add("terminal-scroll-highlight"):o.classList.add("terminal-scroll-highlight","terminal-scroll-highlight-outline"),this._terminal?.element&&(o.style.marginLeft=`-${getComputedStyle(this._terminal.element).paddingLeft}`))}),n.onDispose(()=>{this._navigationDecorations=this._navigationDecorations?.filter(o=>o!==n)}),(0,R.timeout)(350).then(()=>{a&&a.classList.remove("terminal-scroll-highlight-outline")})}}}_getTargetScrollLine(i,f,c){return c===1?Math.max(f.line-Math.floor(i.rows/4),0):f.line}_isMarkerInViewport(i,f){const c=i.buffer.active.viewportY;return f.line>=c&&f.line<c+i.rows}scrollToClosestMarker(i,f,c){const l=this._capabilities.get(4);if(!l)return;const s=l.getMark(i);if(!s)return;const d=f?l.getMark(f):s;this._scrollToMarker(s,0,d,!c)}selectToPreviousMark(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this._capabilities.has(2)?this.scrollToPreviousMark(1,!0,!0):this.scrollToPreviousMark(1,!0,!1),r(this._terminal,this._currentMarker,this._selectionStart))}selectToNextMark(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this._capabilities.has(2)?this.scrollToNextMark(1,!0,!0):this.scrollToNextMark(1,!0,!1),r(this._terminal,this._currentMarker,this._selectionStart))}selectToPreviousLine(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToPreviousLine(this._terminal,1,!0),r(this._terminal,this._currentMarker,this._selectionStart))}selectToNextLine(){!this._terminal||(this._selectionStart===null&&(this._selectionStart=this._currentMarker),this.scrollToNextLine(this._terminal,1,!0),r(this._terminal,this._currentMarker,this._selectionStart))}scrollToPreviousLine(i,f=1,c=!1){if(c||(this._selectionStart=null),this._currentMarker===I.Top){i.scrollToTop();return}if(this._currentMarker===I.Bottom)this._currentMarker=this._registerMarkerOrThrow(i,this._getOffset(i)-1);else{const l=this._getOffset(i);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._registerMarkerOrThrow(i,l-1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,f)}scrollToNextLine(i,f=1,c=!1){if(c||(this._selectionStart=null),this._currentMarker===I.Bottom){i.scrollToBottom();return}if(this._currentMarker===I.Top)this._currentMarker=this._registerMarkerOrThrow(i,this._getOffset(i)+1);else{const l=this._getOffset(i);this._isDisposable&&this._currentMarker.dispose(),this._currentMarker=this._registerMarkerOrThrow(i,l+1)}this._isDisposable=!0,this._scrollToMarker(this._currentMarker,f)}_registerMarkerOrThrow(i,f){const c=i.registerMarker(f);if(!c)throw new Error(`Could not create marker for ${f}`);return c}_getOffset(i){if(this._currentMarker===I.Bottom)return 0;if(this._currentMarker===I.Top)return 0-(i.buffer.active.baseY+i.buffer.active.cursorY);{let f=C(i,this._currentMarker);return f-=i.buffer.active.baseY+i.buffer.active.cursorY,f}}_findPreviousMarker(i,f=!1){if(this._currentMarker===I.Top)return 0;if(this._currentMarker===I.Bottom)return this._getMarkers(f).length-1;let c;for(c=this._getMarkers(f).length-1;c>=0;c--)if(this._getMarkers(f)[c].line<this._currentMarker.line)return c;return-1}_findNextMarker(i,f=!1){if(this._currentMarker===I.Top)return 0;if(this._currentMarker===I.Bottom)return this._getMarkers(f).length-1;let c;for(c=0;c<this._getMarkers(f).length;c++)if(this._getMarkers(f)[c].line>this._currentMarker.line)return c;return this._getMarkers(f).length}};S=we([F(1,A.IThemeService)],S),e.MarkNavigationAddon=S,(0,A.registerThemingParticipant)((u,i)=>{const f=u.getColor(k.focusBorder);f&&i.addRule(`.terminal-scroll-highlight { border-color: ${f.toString()}; } `)});function C(u,i){return i===I.Bottom?u.buffer.active.baseY+u.rows-1:i===I.Top?0:i.line}e.getLine=C;function r(u,i,f){f===null&&(f=I.Bottom);let c=C(u,i),l=C(u,f);if(c>l){const s=c;c=l,l=s}l-=1,u.selectLines(c,l)}e.selectLines=r}),define(ae[2410],le([1,0,55,1916,127,14,17,29,615]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerTerminalConfiguration=void 0;const b=` - `+["`${cwd}`: "+(0,p.localize)(0,null),"`${cwdFolder}`: "+(0,p.localize)(1,null),"`${workspaceFolder}`: "+(0,p.localize)(2,null),"`${local}`: "+(0,p.localize)(3,null),"`${process}`: "+(0,p.localize)(4,null),"`${separator}`: "+(0,p.localize)(5,null),"`${sequence}`: "+(0,p.localize)(6,null),"`${task}`: "+(0,p.localize)(7,null)].join(` - `);let S=(0,p.localize)(8,null);S+=b;let C=(0,p.localize)(9,null);C+=b;const r={id:"terminal",order:100,title:(0,p.localize)(10,null),type:"object",properties:{["terminal.integrated.sendKeybindingsToShell"]:{markdownDescription:(0,p.localize)(11,null,"`#terminal.integrated.commandsToSkipShell#`"),type:"boolean",default:!1},["terminal.integrated.tabs.defaultColor"]:{description:(0,p.localize)(12,null),...I.terminalColorSchema,scope:4},["terminal.integrated.tabs.defaultIcon"]:{description:(0,p.localize)(13,null),...I.terminalIconSchema,default:E.Codicon.terminal.id,scope:4},["terminal.integrated.tabs.enabled"]:{description:(0,p.localize)(14,null),type:"boolean",default:!0},["terminal.integrated.tabs.enableAnimation"]:{description:(0,p.localize)(15,null),type:"boolean",default:!0},["terminal.integrated.tabs.hideCondition"]:{description:(0,p.localize)(16,null),type:"string",enum:["never","singleTerminal","singleGroup"],enumDescriptions:[(0,p.localize)(17,null),(0,p.localize)(18,null),(0,p.localize)(19,null)],default:"singleTerminal"},["terminal.integrated.tabs.showActiveTerminal"]:{description:(0,p.localize)(20,null),type:"string",enum:["always","singleTerminal","singleTerminalOrNarrow","never"],enumDescriptions:[(0,p.localize)(21,null),(0,p.localize)(22,null),(0,p.localize)(23,null),(0,p.localize)(24,null)],default:"singleTerminalOrNarrow"},["terminal.integrated.tabs.showActions"]:{description:(0,p.localize)(25,null),type:"string",enum:["always","singleTerminal","singleTerminalOrNarrow","never"],enumDescriptions:[(0,p.localize)(26,null),(0,p.localize)(27,null),(0,p.localize)(28,null),(0,p.localize)(29,null)],default:"singleTerminalOrNarrow"},["terminal.integrated.tabs.location"]:{type:"string",enum:["left","right"],enumDescriptions:[(0,p.localize)(30,null),(0,p.localize)(31,null)],default:"right",description:(0,p.localize)(32,null)},["terminal.integrated.defaultLocation"]:{type:"string",enum:["editor","view"],enumDescriptions:[(0,p.localize)(33,null),(0,p.localize)(34,null)],default:"view",description:(0,p.localize)(35,null)},["terminal.integrated.tabs.focusMode"]:{type:"string",enum:["singleClick","doubleClick"],enumDescriptions:[(0,p.localize)(36,null),(0,p.localize)(37,null)],default:"doubleClick",description:(0,p.localize)(38,null)},["terminal.integrated.macOptionIsMeta"]:{description:(0,p.localize)(39,null),type:"boolean",default:!1},["terminal.integrated.macOptionClickForcesSelection"]:{description:(0,p.localize)(40,null),type:"boolean",default:!1},["terminal.integrated.altClickMovesCursor"]:{markdownDescription:(0,p.localize)(41,null,"`#editor.multiCursorModifier#`","`'alt'`"),type:"boolean",default:!0},["terminal.integrated.copyOnSelection"]:{description:(0,p.localize)(42,null),type:"boolean",default:!1},["terminal.integrated.enableMultiLinePasteWarning"]:{markdownDescription:(0,p.localize)(43,null),type:"boolean",default:!0},["terminal.integrated.drawBoldTextInBrightColors"]:{description:(0,p.localize)(44,null),type:"boolean",default:!0},["terminal.integrated.fontFamily"]:{markdownDescription:(0,p.localize)(45,null,"`#editor.fontFamily#`"),type:"string"},["terminal.integrated.fontSize"]:{description:(0,p.localize)(46,null),type:"number",default:A.isMacintosh?12:14,minimum:6,maximum:100},["terminal.integrated.letterSpacing"]:{description:(0,p.localize)(47,null),type:"number",default:R.DEFAULT_LETTER_SPACING},["terminal.integrated.lineHeight"]:{description:(0,p.localize)(48,null),type:"number",default:R.DEFAULT_LINE_HEIGHT},["terminal.integrated.minimumContrastRatio"]:{markdownDescription:(0,p.localize)(49,null),type:"number",default:4.5,tags:["accessibility"]},["terminal.integrated.fastScrollSensitivity"]:{markdownDescription:(0,p.localize)(50,null),type:"number",default:5},["terminal.integrated.mouseWheelScrollSensitivity"]:{markdownDescription:(0,p.localize)(51,null),type:"number",default:1},["terminal.integrated.bellDuration"]:{markdownDescription:(0,p.localize)(52,null),type:"number",default:1e3},["terminal.integrated.fontWeight"]:{anyOf:[{type:"number",minimum:R.MINIMUM_FONT_WEIGHT,maximum:R.MAXIMUM_FONT_WEIGHT,errorMessage:(0,p.localize)(53,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:R.SUGGESTIONS_FONT_WEIGHT}],description:(0,p.localize)(54,null),default:"normal"},["terminal.integrated.fontWeightBold"]:{anyOf:[{type:"number",minimum:R.MINIMUM_FONT_WEIGHT,maximum:R.MAXIMUM_FONT_WEIGHT,errorMessage:(0,p.localize)(55,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:R.SUGGESTIONS_FONT_WEIGHT}],description:(0,p.localize)(56,null),default:"bold"},["terminal.integrated.cursorBlinking"]:{description:(0,p.localize)(57,null),type:"boolean",default:!1},["terminal.integrated.cursorStyle"]:{description:(0,p.localize)(58,null),enum:[R.TerminalCursorStyle.BLOCK,R.TerminalCursorStyle.LINE,R.TerminalCursorStyle.UNDERLINE],default:R.TerminalCursorStyle.BLOCK},["terminal.integrated.cursorWidth"]:{markdownDescription:(0,p.localize)(59,null,"`#terminal.integrated.cursorStyle#`","`line`"),type:"number",default:1},["terminal.integrated.scrollback"]:{description:(0,p.localize)(60,null),type:"number",default:1e3},["terminal.integrated.detectLocale"]:{markdownDescription:(0,p.localize)(61,null),type:"string",enum:["auto","off","on"],markdownEnumDescriptions:[(0,p.localize)(62,null),(0,p.localize)(63,null),(0,p.localize)(64,null)],default:"auto"},["terminal.integrated.gpuAcceleration"]:{type:"string",enum:["auto","on","off","canvas"],markdownEnumDescriptions:[(0,p.localize)(65,null),(0,p.localize)(66,null),(0,p.localize)(67,null),(0,p.localize)(68,null)],default:"auto",description:(0,p.localize)(69,null)},["terminal.integrated.tabs.separator"]:{type:"string",default:" - ",markdownDescription:(0,p.localize)(70,null,"`terminal.integrated.tabs.title`","`terminal.integrated.tabs.description`")},["terminal.integrated.tabs.title"]:{type:"string",default:"${process}",markdownDescription:S},["terminal.integrated.tabs.description"]:{type:"string",default:"${task}${separator}${local}${separator}${cwdFolder}",markdownDescription:C},["terminal.integrated.rightClickBehavior"]:{type:"string",enum:["default","copyPaste","paste","selectWord","nothing"],enumDescriptions:[(0,p.localize)(71,null),(0,p.localize)(72,null),(0,p.localize)(73,null),(0,p.localize)(74,null),(0,p.localize)(75,null)],default:A.isMacintosh?"selectWord":A.isWindows?"copyPaste":"default",description:(0,p.localize)(76,null)},["terminal.integrated.cwd"]:{restricted:!0,description:(0,p.localize)(77,null),type:"string",default:void 0,scope:4},["terminal.integrated.confirmOnExit"]:{description:(0,p.localize)(78,null),type:"string",enum:["never","always","hasChildProcesses"],enumDescriptions:[(0,p.localize)(79,null),(0,p.localize)(80,null),(0,p.localize)(81,null)],default:"never"},["terminal.integrated.confirmOnKill"]:{description:(0,p.localize)(82,null),type:"string",enum:["never","editor","panel","always"],enumDescriptions:[(0,p.localize)(83,null),(0,p.localize)(84,null),(0,p.localize)(85,null),(0,p.localize)(86,null)],default:"editor"},["terminal.integrated.enableBell"]:{description:(0,p.localize)(87,null),type:"boolean",default:!1},["terminal.integrated.commandsToSkipShell"]:{markdownDescription:(0,p.localize)(88,null,R.DEFAULT_COMMANDS_TO_SKIP_SHELL.sort().map(i=>`- ${i}`).join(` `),`[${(0,p.localize)(89,null)}](command:workbench.action.openRawDefaultSettings '${(0,p.localize)(90,null)}')`),type:"array",items:{type:"string"},default:[]},["terminal.integrated.allowChords"]:{markdownDescription:(0,p.localize)(91,null,"`#terminal.integrated.commandsToSkipShell#`"),type:"boolean",default:!0},["terminal.integrated.allowMnemonics"]:{markdownDescription:(0,p.localize)(92,null),type:"boolean",default:!1},["terminal.integrated.env.osx"]:{restricted:!0,markdownDescription:(0,p.localize)(93,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.env.linux"]:{restricted:!0,markdownDescription:(0,p.localize)(94,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.env.windows"]:{restricted:!0,markdownDescription:(0,p.localize)(95,null),type:"object",additionalProperties:{type:["string","null"]},default:{}},["terminal.integrated.environmentChangesIndicator"]:{markdownDescription:(0,p.localize)(96,null),type:"string",enum:["off","on","warnonly"],enumDescriptions:[(0,p.localize)(97,null),(0,p.localize)(98,null),(0,p.localize)(99,null)],default:"warnonly"},["terminal.integrated.environmentChangesRelaunch"]:{markdownDescription:(0,p.localize)(100,null),type:"boolean",default:!0},["terminal.integrated.showExitAlert"]:{description:(0,p.localize)(101,null),type:"boolean",default:!0},["terminal.integrated.splitCwd"]:{description:(0,p.localize)(102,null),type:"string",enum:["workspaceRoot","initial","inherited"],enumDescriptions:[(0,p.localize)(103,null),(0,p.localize)(104,null),(0,p.localize)(105,null)],default:"inherited"},["terminal.integrated.windowsEnableConpty"]:{description:(0,p.localize)(106,null),type:"boolean",default:!0},["terminal.integrated.wordSeparators"]:{description:(0,p.localize)(107,null),type:"string",default:" ()[]{}',\"`\u2500\u2018\u2019"},["terminal.integrated.enableFileLinks"]:{description:(0,p.localize)(108,null),type:"boolean",default:!0},["terminal.integrated.unicodeVersion"]:{type:"string",enum:["6","11"],enumDescriptions:[(0,p.localize)(109,null),(0,p.localize)(110,null)],default:"11",description:(0,p.localize)(111,null)},["terminal.integrated.localEchoLatencyThreshold"]:{description:(0,p.localize)(112,null),type:"integer",minimum:-1,default:30},["terminal.integrated.localEchoEnabled"]:{markdownDescription:(0,p.localize)(113,null,"`#terminal.integrated.localEchoLatencyThreshold#`"),type:"string",enum:["on","off","auto"],enumDescriptions:[(0,p.localize)(114,null),(0,p.localize)(115,null),(0,p.localize)(116,null)],default:"auto"},["terminal.integrated.localEchoExcludePrograms"]:{description:(0,p.localize)(117,null),type:"array",items:{type:"string",uniqueItems:!0},default:R.DEFAULT_LOCAL_ECHO_EXCLUDE},["terminal.integrated.localEchoStyle"]:{description:(0,p.localize)(118,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,p.localize)(119,null),type:"boolean",default:!0},["terminal.integrated.persistentSessionReviveProcess"]:{markdownDescription:(0,p.localize)(120,null),type:"string",enum:["onExit","onExitAndWindowClose","never"],markdownEnumDescriptions:[(0,p.localize)(121,null),(0,p.localize)(122,null),(0,p.localize)(123,null)],default:"onExit"},["terminal.integrated.customGlyphs"]:{description:(0,p.localize)(124,null),type:"boolean",default:!0},["terminal.integrated.autoReplies"]:{markdownDescription:(0,p.localize)(125,null,'`"Terminate batch job (Y/N)": "Y\\r"`','`"\\r"`'),type:"object",additionalProperties:{oneOf:[{type:"string",description:(0,p.localize)(126,null)},{type:"null"}]},default:{}},["terminal.integrated.shellIntegration.enabled"]:{restricted:!0,markdownDescription:(0,p.localize)(127,null,"`#terminal.integrated.shellIntegrations.decorationsEnabled#`"),type:"boolean",default:!0},["terminal.integrated.shellIntegration.decorationsEnabled"]:{restricted:!0,markdownDescription:(0,p.localize)(128,null),type:"string",enum:["both","gutter","overviewRuler","never"],enumDescriptions:[(0,p.localize)(129,null),(0,p.localize)(130,null),(0,p.localize)(131,null),(0,p.localize)(132,null)],default:"both"},["terminal.integrated.shellIntegration.history"]:{restricted:!0,markdownDescription:(0,p.localize)(133,null),type:"number",default:100},["terminal.integrated.smoothScrolling"]:{markdownDescription:(0,p.localize)(134,null),type:"boolean",default:!1}}};function u(){k.Registry.as(t.Extensions.Configuration).registerConfiguration(r)}e.registerTerminalConfiguration=u}),define(ae[189],le([1,0,1917,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalContextKeys=e.TerminalContextKeyStrings=void 0;var R;(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.NavigationModeActive="terminalNavigationModeActive",k.ViewShowing="terminalViewShowing",k.TextSelected="terminalTextSelected",k.FindVisible="terminalFindVisible",k.FindInputFocused="terminalFindInputFocused",k.FindFocused="terminalFindFocused",k.TabsSingularSelection="terminalTabsSingularSelection",k.SplitTerminal="terminalSplitTerminal",k.ShellType="terminalShellType",k.InTerminalRunCommandPicker="inTerminalRunCommandPicker",k.TerminalShellIntegrationEnabled="terminalShellIntegrationEnabled"})(R=e.TerminalContextKeyStrings||(e.TerminalContextKeyStrings={}));var A;(function(k){k.isOpen=new p.RawContextKey("terminalIsOpen",!1,!0),k.focus=new p.RawContextKey("terminalFocus",!1,(0,t.localize)(0,null)),k.editorFocus=new p.RawContextKey("terminalEditorFocus",!1,(0,t.localize)(1,null)),k.count=new p.RawContextKey("terminalCount",0,(0,t.localize)(2,null)),k.groupCount=new p.RawContextKey("terminalGroupCount",0,!0),k.tabsNarrow=new p.RawContextKey("isTerminalTabsNarrow",!1,!0),k.terminalHasFixedWidth=new p.RawContextKey("terminalHasFixedWidth",!1,!0),k.tabsFocus=new p.RawContextKey("terminalTabsFocus",!1,(0,t.localize)(3,null)),k.webExtensionContributedProfile=new p.RawContextKey("terminalWebExtensionContributedProfile",!1,!0),k.terminalHasBeenCreated=new p.RawContextKey("terminalHasBeenCreated",!1,!0),k.terminalEditorActive=new p.RawContextKey("terminalEditorActive",!1,!0),k.tabsMouse=new p.RawContextKey("terminalTabsMouse",!1,!0),k.shellType=new p.RawContextKey("terminalShellType",void 0,{type:"string",description:(0,t.localize)(4,null)}),k.altBufferActive=new p.RawContextKey("terminalAltBufferActive",!1,(0,t.localize)(5,null)),k.notFocus=k.focus.toNegated(),k.viewShowing=new p.RawContextKey("terminalViewShowing",!1,(0,t.localize)(6,null)),k.a11yTreeFocus=new p.RawContextKey("terminalA11yTreeFocus",!1,!0),k.navigationModeActive=new p.RawContextKey("terminalNavigationModeActive",!1,!0),k.textSelected=new p.RawContextKey("terminalTextSelected",!1,(0,t.localize)(7,null)),k.notTextSelected=k.textSelected.toNegated(),k.findVisible=new p.RawContextKey("terminalFindVisible",!1,!0),k.notFindVisible=k.findVisible.toNegated(),k.findInputFocus=new p.RawContextKey("terminalFindInputFocused",!1,!0),k.findFocus=new p.RawContextKey("terminalFindFocused",!1,!0),k.notFindFocus=k.findInputFocus.toNegated(),k.processSupported=new p.RawContextKey("terminalProcessSupported",!1,(0,t.localize)(8,null)),k.tabsSingularSelection=new p.RawContextKey("terminalTabsSingularSelection",!1,(0,t.localize)(9,null)),k.splitTerminal=new p.RawContextKey("terminalSplitTerminal",!1,(0,t.localize)(10,null)),k.inTerminalRunCommandPicker=new p.RawContextKey("inTerminalRunCommandPicker",!1,(0,t.localize)(11,null)),k.terminalShellIntegrationEnabled=new p.RawContextKey("terminalShellIntegrationEnabled",!1,(0,t.localize)(12,null))})(A=e.TerminalContextKeys||(e.TerminalContextKeys={}))}),define(ae[2411],le([1,0,853,37,7,189,12,8,38,6]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalFindWidget=void 0;let S=class extends t.SimpleFindWidget{constructor(r,u,i,f,c,l,s){super(r,{showCommonFindToggles:!0,showResultCount:!0,type:"Terminal"},i,c,f),this.findState=r,this._instance=u,this._contextKeyService=c,this._themeService=l,this._configurationService=s,this._register(r.onFindReplaceStateChange(()=>{this.show()})),this._findInputFocused=A.TerminalContextKeys.findInputFocus.bindTo(this._contextKeyService),this._findWidgetFocused=A.TerminalContextKeys.findFocus.bindTo(this._contextKeyService),this._findWidgetVisible=A.TerminalContextKeys.findVisible.bindTo(this._contextKeyService),this.updateTheme(this._themeService.getColorTheme()),this._register(this._themeService.onDidColorThemeChange(d=>{this.updateTheme(d??this._themeService.getColorTheme()),this.isVisible()&&this.find(!0,!0)})),this._register(this._configurationService.onDidChangeConfiguration(d=>{d.affectsConfiguration("workbench.colorCustomizations")&&this.isVisible()&&this.find(!0,!0)}))}find(r,u){const i=this._instance.xterm;!i||(r?this._findPreviousWithEvent(i,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue(),incremental:u}):this._findNextWithEvent(i,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}))}reveal(){const r=this._instance.hasSelection()&&this._instance.selection.indexOf(` `)===-1?this._instance.selection:void 0,u=this._instance.xterm;u&&this.inputValue&&this.inputValue!==""&&this._findPreviousWithEvent(u,this.inputValue,{incremental:!0,regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()}).then(i=>{this.updateButtons(i),this._register(b.Event.once(u.onDidChangeSelection)(()=>u.clearActiveSearchDecoration()))}),this.updateButtons(!1),super.reveal(r),this._findWidgetVisible.set(!0)}show(){const r=this._instance.hasSelection()&&this._instance.selection.indexOf(` `)===-1?this._instance.selection:void 0;super.show(r),this._findWidgetVisible.set(!0)}hide(){super.hide(),this._findWidgetVisible.reset(),this._instance.focus(),this._instance.xterm?.clearSearchDecorations()}async _getResultCount(){return this._instance.xterm?.findResult}_onInputChanged(){const r=this._instance.xterm;return r&&this._findPreviousWithEvent(r,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue(),incremental:!0}).then(u=>{this.updateButtons(u)}),!1}_onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}_onFocusTrackerBlur(){this._instance.xterm?.clearActiveSearchDecoration(),this._findWidgetFocused.reset()}_onFindInputFocusTrackerFocus(){this._findInputFocused.set(!0)}_onFindInputFocusTrackerBlur(){this._findInputFocused.reset()}findFirst(){const r=this._instance;r.hasSelection()&&r.clearSelection();const u=r.xterm;u&&this._findPreviousWithEvent(u,this.inputValue,{regex:this._getRegexValue(),wholeWord:this._getWholeWordValue(),caseSensitive:this._getCaseSensitiveValue()})}async _findNextWithEvent(r,u,i){return r.findNext(u,i).then(f=>(this._register(b.Event.once(r.onDidChangeSelection)(()=>r.clearActiveSearchDecoration())),f))}async _findPreviousWithEvent(r,u,i){return r.findPrevious(u,i).then(f=>(this._register(b.Event.once(r.onDidChangeSelection)(()=>r.clearActiveSearchDecoration())),f))}};S=we([F(2,p.IContextViewService),F(3,I.IKeybindingService),F(4,R.IContextKeyService),F(5,k.IThemeService),F(6,E.IConfigurationService)],S),e.TerminalFindWidget=S}),define(ae[893],le([1,0,53,743,14,506]),function(J,e,t,p,R,A){"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 k(n,a){if(!!a)if(R.isWindows)for(const o in a){let g=o;for(const v in n)if(o.toLowerCase()===v.toLowerCase()){g=v;break}const h=a[o];h!==void 0&&E(n,g,h)}else Object.keys(a).forEach(o=>{const g=a[o];g!==void 0&&E(n,o,g)})}e.mergeEnvironments=k;function E(n,a,o){typeof o=="string"?n[a]=o:delete n[a]}function I(n,a,o,g){n.TERM_PROGRAM="vscode",a&&(n.TERM_PROGRAM_VERSION=a),C(n,g)&&(n.LANG=r(o)),n.COLORTERM="truecolor"}e.addTerminalEnvironmentKeys=I;function b(n,a){if(!!a)for(const o of Object.keys(a)){const g=a[o];g&&(n[o]=g)}}async function S(n,a){return await Promise.all(Object.entries(a).map(async([o,g])=>{if(typeof g=="string")try{a[o]=await n(g)}catch{a[o]=g}})),a}function C(n,a){if(a==="on")return!0;if(a==="auto"){const o=n.LANG;return!o||o.search(/\.UTF\-8$/)===-1&&o.search(/\.utf8$/)===-1&&o.search(/\.euc.+/)===-1}return!1}e.shouldSetLangEnvVariable=C;function r(n){const a=n?n.split("-"):[],o=a.length;if(o===0)return"en_US.UTF-8";if(o===1){const g={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 g&&a.push(g[a[0]])}else a[1]=a[1].toUpperCase();return a.join("_")+".UTF-8"}e.getLangEnvVariable=r;async function u(n,a,o,g,h,v){if(n.cwd){const w=typeof n.cwd=="object"?n.cwd.fsPath:n.cwd,D=await i(w,o);return(0,A.sanitizeCwd)(D||w)}let m;return!n.ignoreConfigurationCwd&&h&&(o&&(h=await i(h,o,v)),h&&(t.isAbsolute(h)?m=h:g&&(m=t.join(g.fsPath,h)))),m||(m=g?g.fsPath:a||""),(0,A.sanitizeCwd)(m)}e.getCwd=u;async function i(n,a,o){if(a)try{return await a(n)}catch(g){o?.error("Could not resolve terminal cwd",g);return}return n}function f(n,a,o){if(!!o)return g=>o.resolveWithEnvironment(a,n,g)}e.createVariableResolver=f;async function c(n,a,o,g,h,v,m,w=R.platform){let D;m&&(D=s(n,"automationShell",w)),D||(D=s(n,"shell",w));let y=D||a;if(w===3&&!o&&g){const T=t.join(g,"Sysnative").replace(/\//g,"\\").toLowerCase();y&&y.toLowerCase().indexOf(T)===0&&(y=t.join(g,"System32",y.substr(T.length+1)))}if(y&&w===3&&(y=y.replace(/\//g,"\\")),h)try{y=await h(y)}catch(T){v.error("Could not resolve shell",T)}return y}e.getDefaultShell=c;async function l(n,a,o,g,h=R.platform){if(a&&s(n,"automationShell",h))return[];const v=h===3?"windows":h===1?"osx":"linux";let m=n(`terminal.integrated.shellArgs.${v}`);if(!m)return[];if(typeof m=="string"&&h===3)return o?await o(m):m;if(o){const w=[];for(const D of m)try{w.push(await o(D))}catch(y){g.error(`Could not resolve terminal.integrated.shellArgs.${v}`,y),w.push(D)}m=w}return m}e.getDefaultShellArgs=l;function s(n,a,o=R.platform){return n(`terminal.integrated.${a}.${o===3?"windows":o===1?"osx":"linux"}`)}async function d(n,a,o,g,h,v){const m={};if(n.strictEnv)b(m,n.env);else{b(m,v);const w={...a};o&&(w&&await S(o,w),n.env&&await S(o,n.env)),(0,p.sanitizeProcessEnvironment)(m,"VSCODE_IPC_HOOK_CLI"),k(m,w),k(m,n.env),I(m,g,R.locale,h)}return m}e.createTerminalEnvironment=d}),define(ae[345],le([1,0,1918]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.terminalStrings=void 0,e.terminalStrings={terminal:(0,t.localize)(0,null),new:(0,t.localize)(1,null),doNotShowAgain:(0,t.localize)(2,null),currentSessionCategory:(0,t.localize)(3,null),previousSessionCategory:(0,t.localize)(4,null),focus:{value:(0,t.localize)(5,null),original:"Focus Terminal"},kill:{value:(0,t.localize)(6,null),original:"Kill Terminal",short:(0,t.localize)(7,null)},moveToEditor:{value:(0,t.localize)(8,null),original:"Move Terminal into Editor Area"},moveToTerminalPanel:{value:(0,t.localize)(9,null),original:"Move Terminal into Panel"},changeIcon:{value:(0,t.localize)(10,null),original:"Change Icon..."},changeColor:{value:(0,t.localize)(11,null),original:"Change Color..."},split:{value:(0,t.localize)(12,null),original:"Split Terminal",short:(0,t.localize)(13,null)},unsplit:{value:(0,t.localize)(14,null),original:"Unsplit Terminal"},rename:{value:(0,t.localize)(15,null),original:"Rename..."},toggleSizeToContentWidth:{value:(0,t.localize)(16,null),original:"Toggle Size to Content Width"}}}),define(ae[2412],le([1,0,6,2,611,9]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalPty=void 0;let k=class extends p.Disposable{constructor(I,b,S){super(),this.id=I,this.shouldPersist=b,this._localPtyService=S,this._inReplay=!1,this._properties={cwd:"",initialCwd:"",fixedDimensions:{cols:void 0,rows:void 0},title:"",shellType:void 0,hasChildProcesses:!0,resolvedShellLaunchConfig:{},overrideDimensions:void 0,failedShellIntegrationActivation:!1,usedShellIntegrationInjection: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(I){return this._localPtyService.detachFromProcess(this.id,I)}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,b){this._inReplay||this._localPtyService.resize(this.id,I,b)}freePortKillProcess(I){if(!this._localPtyService.freePortKillProcess)throw new Error("freePortKillProcess does not exist on the local pty service");return this._localPtyService.freePortKillProcess(I)}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,b){return this._localPtyService.updateProperty(this.id,I,b)}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:b}){switch(I){case"cwd":this._properties.cwd=b;break;case"initialCwd":this._properties.initialCwd=b;break;case"resolvedShellLaunchConfig":b.cwd&&typeof b.cwd!="string"&&(b.cwd=A.URI.revive(b.cwd))}this._onDidChangeProperty.fire({type:I,value:b})}async handleReplay(I){try{this._inReplay=!0;for(const b of I.events){(b.cols!==0||b.rows!==0)&&this._onDidChangeProperty.fire({type:"overrideDimensions",value:{cols:b.cols,rows:b.rows,forceExactSize:!0}});const S={data:b.data,trackCommit:!0};this._onProcessData.fire(S),await S.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=we([F(2,R.ILocalPtyService)],k),e.LocalPty=k}),define(ae[894],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.flatTestItemDelimiter=void 0,e.flatTestItemDelimiter=" \u203A "}),define(ae[653],le([1,0,65,1931,33,12,80]),function(J,e,t,p,R,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,R.registerColor)("testing.iconFailed",{dark:"#f14c4c",light:"#f14c4c",hcDark:"#f14c4c",hcLight:"#B5200D"},(0,p.localize)(0,null)),e.testingColorIconErrored=(0,R.registerColor)("testing.iconErrored",{dark:"#f14c4c",light:"#f14c4c",hcDark:"#f14c4c",hcLight:"#B5200D"},(0,p.localize)(1,null)),e.testingColorIconPassed=(0,R.registerColor)("testing.iconPassed",{dark:"#73c991",light:"#73c991",hcDark:"#73c991",hcLight:"#007100"},(0,p.localize)(2,null)),e.testingColorRunAction=(0,R.registerColor)("testing.runAction",{dark:e.testingColorIconPassed,light:e.testingColorIconPassed,hcDark:e.testingColorIconPassed,hcLight:e.testingColorIconPassed},(0,p.localize)(3,null)),e.testingColorIconQueued=(0,R.registerColor)("testing.iconQueued",{dark:"#cca700",light:"#cca700",hcDark:"#cca700",hcLight:"#cca700"},(0,p.localize)(4,null)),e.testingColorIconUnset=(0,R.registerColor)("testing.iconUnset",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},(0,p.localize)(5,null)),e.testingColorIconSkipped=(0,R.registerColor)("testing.iconSkipped",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},(0,p.localize)(6,null)),e.testingPeekBorder=(0,R.registerColor)("testing.peekBorder",{dark:R.editorErrorForeground,light:R.editorErrorForeground,hcDark:R.contrastBorder,hcLight:R.contrastBorder},(0,p.localize)(7,null)),e.testingPeekHeaderBackground=(0,R.registerColor)("testing.peekHeaderBackground",{dark:(0,R.transparent)(R.editorErrorForeground,.1),light:(0,R.transparent)(R.editorErrorForeground,.1),hcDark:null,hcLight:null},(0,p.localize)(8,null)),e.testMessageSeverityColors={[0]:{decorationForeground:(0,R.registerColor)("testing.message.error.decorationForeground",{dark:R.editorErrorForeground,light:R.editorErrorForeground,hcDark:R.editorForeground,hcLight:R.editorForeground},(0,p.localize)(9,null)),marginBackground:(0,R.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,p.localize)(10,null))},[1]:{decorationForeground:(0,R.registerColor)("testing.message.info.decorationForeground",{dark:(0,R.transparent)(R.editorForeground,.5),light:(0,R.transparent)(R.editorForeground,.5),hcDark:(0,R.transparent)(R.editorForeground,.5),hcLight:(0,R.transparent)(R.editorForeground,.5)},(0,p.localize)(11,null)),marginBackground:(0,R.registerColor)("testing.message.info.lineBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,p.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)((E,I)=>{for(const[u,{marginBackground:i}]of Object.entries(e.testMessageSeverityColors))I.addRule(`.monaco-editor .testing-inline-message-severity-${u} { background: ${E.getColor(i)}; }`);const b=E.getColor(R.inputActiveOptionBorder);b&&I.addRule(`.testing-filter-action-item > .monaco-action-bar .testing-filter-button.checked { border-color: ${b}; }`);const S=E.getColor(R.inputActiveOptionForeground);S&&I.addRule(`.testing-filter-action-item > .monaco-action-bar .testing-filter-button.checked { color: ${S}; }`);const C=E.getColor(R.inputActiveOptionBackground);C&&I.addRule(`.testing-filter-action-item > .monaco-action-bar .testing-filter-button.checked { background-color: ${C}; }`);const r=E.getColor(k.ACTIVITY_BAR_BADGE_BACKGROUND);I.addRule(`.monaco-workbench .part > .title > .title-actions .action-label.codicon-testing-autorun::after { background-color: ${r}; }`)})}),define(ae[313],le([1,0,29,1920,63,12,653]),function(J,e,t,p,R,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.testingFilterIcon=e.testingCancelIcon=e.testingDebugIcon=e.testingDebugAllIcon=e.testingRunAllIcon=e.testingRunIcon=e.testingViewIcon=void 0,e.testingViewIcon=(0,R.registerIcon)("test-view-icon",t.Codicon.beaker,(0,p.localize)(0,null)),e.testingRunIcon=(0,R.registerIcon)("testing-run-icon",t.Codicon.run,(0,p.localize)(1,null)),e.testingRunAllIcon=(0,R.registerIcon)("testing-run-all-icon",t.Codicon.runAll,(0,p.localize)(2,null)),e.testingDebugAllIcon=(0,R.registerIcon)("testing-debug-all-icon",t.Codicon.debugAltSmall,(0,p.localize)(3,null)),e.testingDebugIcon=(0,R.registerIcon)("testing-debug-icon",t.Codicon.debugAltSmall,(0,p.localize)(4,null)),e.testingCancelIcon=(0,R.registerIcon)("testing-cancel-icon",t.Codicon.debugStop,(0,p.localize)(5,null)),e.testingFilterIcon=(0,R.registerIcon)("testing-filter",t.Codicon.filter,(0,p.localize)(6,null)),e.testingHiddenIcon=(0,R.registerIcon)("testing-hidden",t.Codicon.eyeClosed,(0,p.localize)(7,null)),e.testingShowAsList=(0,R.registerIcon)("testing-show-as-list-icon",t.Codicon.listTree,(0,p.localize)(8,null)),e.testingShowAsTree=(0,R.registerIcon)("testing-show-as-list-icon",t.Codicon.listFlat,(0,p.localize)(9,null)),e.testingUpdateProfiles=(0,R.registerIcon)("testing-update-profiles",t.Codicon.gear,(0,p.localize)(10,null)),e.testingRefreshTests=(0,R.registerIcon)("testing-refresh-tests",t.Codicon.refresh,(0,p.localize)(11,null)),e.testingCancelRefreshTests=(0,R.registerIcon)("testing-cancel-refresh-tests",t.Codicon.stop,(0,p.localize)(12,null)),e.testingStatesToIcons=new Map([[6,(0,R.registerIcon)("testing-error-icon",t.Codicon.issues,(0,p.localize)(13,null))],[4,(0,R.registerIcon)("testing-failed-icon",t.Codicon.error,(0,p.localize)(14,null))],[3,(0,R.registerIcon)("testing-passed-icon",t.Codicon.pass,(0,p.localize)(15,null))],[1,(0,R.registerIcon)("testing-queued-icon",t.Codicon.history,(0,p.localize)(16,null))],[2,R.spinningLoading],[5,(0,R.registerIcon)("testing-skipped-icon",t.Codicon.debugStepOver,(0,p.localize)(17,null))],[0,(0,R.registerIcon)("testing-unset-icon",t.Codicon.circleOutline,(0,p.localize)(18,null))]]),(0,A.registerThemingParticipant)((E,I)=>{for(const[b,S]of e.testingStatesToIcons.entries()){const C=k.testStatesToIconColors[b];!C||I.addRule(`.monaco-workbench ${A.ThemeIcon.asCSSSelector(S)} { color: ${E.getColor(C)} !important; }`)}I.addRule(` .monaco-editor ${A.ThemeIcon.asCSSSelector(e.testingRunIcon)}, .monaco-editor ${A.ThemeIcon.asCSSSelector(e.testingRunAllIcon)} { color: ${E.getColor(k.testingColorRunAction)}; } `)})}),define(ae[346],le([1,0,1932]),function(J,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 p;(function(b){b.AutoRunDelay="testing.autoRun.delay",b.AutoRunMode="testing.autoRun.mode",b.AutoOpenPeekView="testing.automaticallyOpenPeekView",b.AutoOpenPeekViewDuringAutoRun="testing.automaticallyOpenPeekViewDuringAutoRun",b.OpenTesting="testing.openTesting",b.FollowRunningTest="testing.followRunningTest",b.DefaultGutterClickAction="testing.defaultGutterClickAction",b.GutterEnabled="testing.gutterEnabled",b.SaveBeforeTest="testing.saveBeforeTest",b.AlwaysRevealTestOnStateChange="testing.alwaysRevealTestOnStateChange"})(p=e.TestingConfigKeys||(e.TestingConfigKeys={}));var R;(function(b){b.NeverOpen="neverOpen",b.OpenOnTestStart="openOnTestStart",b.OpenOnTestFailure="openOnTestFailure"})(R=e.AutoOpenTesting||(e.AutoOpenTesting={}));var A;(function(b){b.FailureVisible="failureInVisibleDocument",b.FailureAnywhere="failureAnywhere",b.Never="never"})(A=e.AutoOpenPeekViewWhen||(e.AutoOpenPeekViewWhen={}));var k;(function(b){b.AllInWorkspace="all",b.OnlyPreviouslyRun="rerun"})(k=e.AutoRunMode||(e.AutoRunMode={}));var E;(function(b){b.Run="run",b.Debug="debug",b.ContextMenu="contextMenu"})(E=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)},["testing.alwaysRevealTestOnStateChange"]:{markdownDescription:(0,t.localize)(21,null),type:"boolean",default:!1}}};const I=(b,S)=>b.getValue(S);e.getTestingConfiguration=I}),define(ae[654],le([1,0,210,1933]),function(J,e,t,p){"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 R;(function(S){S.ViewletId="workbench.view.extension.test",S.ExplorerViewId="workbench.view.testing",S.OutputPeekContributionId="editor.contrib.testingOutputPeek",S.DecorationsContributionId="editor.contrib.testingDecorations"})(R=e.Testing||(e.Testing={}));var A;(function(S){S.List="list",S.Tree="true"})(A=e.TestExplorerViewMode||(e.TestExplorerViewMode={}));var k;(function(S){S.ByLocation="location",S.ByStatus="status",S.ByDuration="duration"})(k=e.TestExplorerViewSorting||(e.TestExplorerViewSorting={}));var E;(function(S){S.OnlyFailed="failed",S.OnlyExecuted="excuted",S.All="all"})(E=e.TestExplorerStateFilter||(e.TestExplorerStateFilter={})),e.testStateNames={[6]:(0,p.localize)(0,null),[4]:(0,p.localize)(1,null),[3]:(0,p.localize)(2,null),[1]:(0,p.localize)(3,null),[2]:(0,p.localize)(4,null),[5]:(0,p.localize)(5,null),[0]:(0,p.localize)(6,null)};const I=(S,C)=>(0,p.localize)(7,null,(0,t.stripIcons)(S),e.testStateNames[C]);e.labelForTestInState=I,e.testConfigurationGroupNames={[4]:(0,p.localize)(8,null),[2]:(0,p.localize)(9,null),[8]:(0,p.localize)(10,null)};var b;(function(S){S.CancelTestRefreshAction="testing.cancelTestRefresh",S.CancelTestRunAction="testing.cancelRun",S.ClearTestResultsAction="testing.clearTestResults",S.CollapseAllAction="testing.collapseAll",S.ConfigureTestProfilesAction="testing.configureProfile",S.DebugAction="testing.debug",S.DebugAllAction="testing.debugAll",S.DebugAtCursor="testing.debugAtCursor",S.DebugCurrentFile="testing.debugCurrentFile",S.DebugFailedTests="testing.debugFailTests",S.DebugLastRun="testing.debugLastRun",S.DebugSelectedAction="testing.debugSelected",S.FilterAction="workbench.actions.treeView.testExplorer.filter",S.GoToTest="testing.editFocusedTest",S.HideTestAction="testing.hideTest",S.OpenOutputPeek="testing.openOutputPeek",S.RefreshTestsAction="testing.refreshTests",S.ReRunFailedTests="testing.reRunFailTests",S.ReRunLastRun="testing.reRunLastRun",S.RunAction="testing.run",S.RunAllAction="testing.runAll",S.RunAtCursor="testing.runAtCursor",S.RunCurrentFile="testing.runCurrentFile",S.RunSelectedAction="testing.runSelected",S.RunUsingProfileAction="testing.runUsing",S.SearchForTestExtension="testing.searchForTestExtension",S.SelectDefaultTestProfiles="testing.selectDefaultTestProfiles",S.ShowMostRecentOutputAction="testing.showMostRecentOutput",S.TestingSortByDurationAction="testing.sortByDuration",S.TestingSortByLocationAction="testing.sortByLocation",S.TestingSortByStatusAction="testing.sortByStatus",S.TestingViewAsListAction="testing.viewAsList",S.TestingViewAsTreeAction="testing.viewAsTree",S.ToggleAutoRun="testing.toggleautoRun",S.ToggleInlineTestOutput="testing.toggleInlineTestOutput",S.UnhideTestAction="testing.unhideTest",S.UnhideAllTestsAction="testing.unhideAllTests"})(b=e.TestCommandId||(e.TestCommandId={}))}),define(ae[388],le([1,0,6,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MutableObservableValue=e.staticObservableValue=void 0;const R=k=>({onDidChange:t.Event.None,value:k});e.staticObservableValue=R;class A extends p.Disposable{get value(){return this._value}set value(E){E!==this._value&&(this._value=E,this.changeEmitter.fire(E))}static stored(E,I){const b=new A(E.get(I));return b.onDidChange(S=>E.store(S)),b}constructor(E){super(),this._value=E,this.changeEmitter=this._register(new t.Emitter),this.onDidChange=this.changeEmitter.event}}e.MutableObservableValue=A}),define(ae[314],le([1,0,6,23]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredValue=void 0;const R={deserialize:k=>JSON.parse(k),serialize:k=>JSON.stringify(k)};let A=class{constructor(E,I){this.storage=I,this.onDidChange=t.Event.filter(this.storage.onDidChangeValue,b=>b.key===this.key),this.key=E.key,this.scope=E.scope,this.target=E.target,this.serialization=E.serialization??R}get(E){const I=this.storage.get(this.key,this.scope);return I===void 0?E:this.serialization.deserialize(I)}store(E){this.storage.store(this.key,this.serialization.serialize(E),this.scope,this.target)}delete(){this.storage.remove(this.key,this.scope)}};A=we([F(1,p.IStorageService)],A),e.StoredValue=A}),define(ae[2413],le([1,0,32,9]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileCoverage=e.TestCoverage=void 0;class R{constructor(E){this.accessor=E}async getAllFiles(E=t.CancellationToken.None){this.fileCoverage||(this.fileCoverage=this.accessor.provideFileCoverage(E));try{return await this.fileCoverage}catch(I){throw this.fileCoverage=void 0,I}}async getUri(E,I=t.CancellationToken.None){return(await this.getAllFiles(I)).find(S=>S.uri.toString()===E.toString())}}e.TestCoverage=R;class A{get tpc(){let E=this.statement.covered,I=this.statement.total;return this.branch&&(E+=this.branch.covered,I+=this.branch.total),this.function&&(E+=this.function.covered,I+=this.function.total),I===0?1:E/I}constructor(E,I,b){this.index=I,this.accessor=b,this.uri=p.URI.revive(E.uri),this.statement=E.statement,this.branch=E.branch,this.function=E.branch,this._details=E.details}async details(E=t.CancellationToken.None){this._details||(this._details=this.accessor.resolveFileCoverage(this.index,E));try{return await this._details}catch(I){throw this._details=void 0,I}}}e.FileCoverage=A}),define(ae[2414],le([1,0,88,2,23,388,314]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestExclusions=void 0;let E=class extends p.Disposable{constructor(b){super(),this.storageService=b,this.excluded=this._register(A.MutableObservableValue.stored(new k.StoredValue({key:"excludedTestItems",scope:1,target:0,serialization:{deserialize:S=>new Set(JSON.parse(S)),serialize:S=>JSON.stringify([...S])}},this.storageService),new Set)),this.onTestExclusionsChanged=this.excluded.onDidChange}get hasAny(){return this.excluded.value.size>0}get all(){return this.excluded.value}toggle(b,S){S!==!0&&this.excluded.value.has(b.item.extId)?this.excluded.value=new Set(t.Iterable.filter(this.excluded.value,C=>C!==b.item.extId)):S!==!1&&!this.excluded.value.has(b.item.extId)&&(this.excluded.value=new Set([...this.excluded.value,b.item.extId]))}contains(b){return this.excluded.value.has(b.item.extId)}clear(){this.excluded.value=new Set}};E=we([F(0,R.IStorageService)],E),e.TestExclusions=E}),define(ae[229],le([1,0]),function(J,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 p;(function(A){A[A.IsSame=0]="IsSame",A[A.Disconnected=1]="Disconnected",A[A.IsChild=2]="IsChild",A[A.IsParent=3]="IsParent"})(p=e.TestPosition||(e.TestPosition={}));class R{static fromExtHostTestItem(k,E,I=k.parent){if(k._isRoot)return new R([E]);const b=[k.id];for(let S=I;S&&S.id!==E;S=S.parent)b.push(S.id);return b.push(E),new R(b.reverse())}static isRoot(k){return!k.includes("\0")}static root(k){const E=k.indexOf("\0");return E===-1?k:k.slice(0,E)}static fromString(k){return new R(k.split("\0"))}static join(k,E){return new R([...k.path,E])}static joinToString(k,E){return k.toString()+"\0"+E}static parentId(k){const E=k.lastIndexOf("\0");return E===-1?void 0:k.slice(0,E)}static compare(k,E){return k===E?0:E.startsWith(k+"\0")?2:k.startsWith(E+"\0")?3:1}constructor(k,E=k.length){if(this.path=k,this.viewEnd=E,k.length===0||E<1)throw new Error("cannot create test with empty path")}get parentId(){return this.viewEnd>1?new R(this.path,this.viewEnd-1):void 0}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 R(this.path,k)}*idsToRoot(){for(let k=this.viewEnd;k>0;k--)yield new R(this.path,k)}compare(k){if(typeof k=="string")return R.compare(this.toString(),k);for(let E=0;E<k.viewEnd&&E<this.viewEnd;E++)if(k.path[E]!==this.path[E])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=R}),define(ae[291],le([1,0,32,88,5,229]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testsInFile=e.waitForTestToBeIdle=e.getAllTestsInHierarchy=e.expandAndGetTestById=e.getContextForTestItem=e.testCollectionIsEmpty=e.getCollectionItemParents=e.ITestService=void 0,e.ITestService=(0,R.createDecorator)("testService");const k=function*(u,i){for(const f of A.TestId.fromString(i.item.extId).idsToRoot())yield u.getNodeById(f.toString())};e.getCollectionItemParents=k;const E=u=>!p.Iterable.some(u.rootItems,i=>i.children.size>0);e.testCollectionIsEmpty=E;const I=(u,i)=>{if(typeof i=="string"&&(i=A.TestId.fromString(i)),i.isRoot)return{controller:i.toString()};const f={$mid:14,tests:[]};for(const c of i.idsFromRoot())if(!c.isRoot){const l=u.getNodeById(c.toString());l&&f.tests.push(l)}return f};e.getContextForTestItem=I;const b=async(u,i,f=t.CancellationToken.None)=>{const c=[...A.TestId.fromString(i).idsFromRoot()];let l=0;for(let s=c.length-1;!f.isCancellationRequested&&s>=l;){const d=c[s].toString(),n=u.getNodeById(d);if(!n){s--;continue}if(s===c.length-1)return n;n.children.has(c[s+1].toString())||await u.expand(d,0),l=s+1,s=c.length-1}};e.expandAndGetTestById=b;const S=async(u,i=t.CancellationToken.None)=>{if(i.isCancellationRequested)return;let f;await Promise.race([Promise.all([...u.rootItems].map(c=>u.expand(c.item.extId,1/0))),new Promise(c=>{f=i.onCancellationRequested(c)})]).finally(()=>f?.dispose())};e.getAllTestsInHierarchy=S;const C=(u,i)=>{if(!!i.item.busy)return new Promise(f=>{const c=u.onDidProcessDiff(()=>{u.collection.getNodeById(i.item.extId)?.item.busy!==!0&&(f(),c.dispose())})})};e.waitForTestToBeIdle=C;const r=async function*(u,i,f,c=!0){for(const l of u.collection.all)!l.item.uri||(i.extUri.isEqual(f,l.item.uri)&&(yield l),i.extUri.isEqualOrParent(f,l.item.uri)&&(l.expand===1&&await u.collection.expand(l.item.extId,1),c&&await(0,e.waitForTestToBeIdle)(u,l)))};e.testsInFile=r}),define(ae[259],le([1,0,9,20,229]),function(J,e,t,p,R){"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.getMarkId=e.ITestErrorMessage=e.TestMessageType=e.IRichLocation=e.testRunProfileBitsetList=e.TestRunProfileBitset=e.TestResultState=void 0;var A;(function(D){D[D.Unset=0]="Unset",D[D.Queued=1]="Queued",D[D.Running=2]="Running",D[D.Passed=3]="Passed",D[D.Failed=4]="Failed",D[D.Skipped=5]="Skipped",D[D.Errored=6]="Errored"})(A=e.TestResultState||(e.TestResultState={}));var k;(function(D){D[D.Run=2]="Run",D[D.Debug=4]="Debug",D[D.Coverage=8]="Coverage",D[D.HasNonDefaultProfile=16]="HasNonDefaultProfile",D[D.HasConfigurable=32]="HasConfigurable"})(k=e.TestRunProfileBitset||(e.TestRunProfileBitset={})),e.testRunProfileBitsetList=[2,4,8,16];var E;(function(D){D.serialize=y=>({range:y.range.toJSON(),uri:y.uri.toJSON()}),D.deserialize=y=>({range:p.Range.lift(y.range),uri:t.URI.revive(y.uri)})})(E=e.IRichLocation||(e.IRichLocation={}));var I;(function(D){D[D.Error=0]="Error",D[D.Output=1]="Output"})(I=e.TestMessageType||(e.TestMessageType={}));var b;(function(D){D.serialize=y=>({message:y.message,type:0,expected:y.expected,actual:y.actual,location:y.location&&E.serialize(y.location)}),D.deserialize=y=>({message:y.message,type:0,expected:y.expected,actual:y.actual,location:y.location&&E.deserialize(y.location)})})(b=e.ITestErrorMessage||(e.ITestErrorMessage={}));const S=(D,y)=>`${y?"s":"e"}${D}`;e.getMarkId=S;var C;(function(D){D.serialize=y=>({message:y.message,type:1,offset:y.offset,length:y.length,location:y.location&&E.serialize(y.location)}),D.deserialize=y=>({message:y.message,type:1,offset:y.offset,length:y.length,location:y.location&&E.deserialize(y.location)})})(C=e.ITestOutputMessage||(e.ITestOutputMessage={}));var r;(function(D){D.serialize=y=>y.type===0?b.serialize(y):C.serialize(y),D.deserialize=y=>y.type===0?b.deserialize(y):C.deserialize(y)})(r=e.ITestMessage||(e.ITestMessage={}));var u;(function(D){D.serializeWithoutMessages=y=>({state:y.state,duration:y.duration,messages:[]}),D.serialize=y=>({state:y.state,duration:y.duration,messages:y.messages.map(r.serialize)}),D.deserialize=y=>({state:y.state,duration:y.duration,messages:y.messages.map(r.deserialize)})})(u=e.ITestTaskState||(e.ITestTaskState={}));const i="\0",f=(D,y)=>D+i+y;e.namespaceTestTag=f;const c=D=>{const y=D.indexOf(i);return{ctrlId:D.slice(0,y),tagId:D.slice(y+1)}};e.denamespaceTestTag=c;var l;(function(D){D.serialize=y=>({extId:y.extId,label:y.label,tags:y.tags,busy:y.busy,children:void 0,uri:y.uri?.toJSON(),range:y.range?.toJSON()||null,description:y.description,error:y.error,sortText:y.sortText}),D.deserialize=y=>({extId:y.extId,label:y.label,tags:y.tags,busy:y.busy,children:void 0,uri:y.uri?t.URI.revive(y.uri):void 0,range:y.range?p.Range.lift(y.range):null,description:y.description,error:y.error,sortText:y.sortText})})(l=e.ITestItem||(e.ITestItem={}));var s;(function(D){D[D.NotExpandable=0]="NotExpandable",D[D.Expandable=1]="Expandable",D[D.BusyExpanding=2]="BusyExpanding",D[D.Expanded=3]="Expanded"})(s=e.TestItemExpandState||(e.TestItemExpandState={}));var d;(function(D){D.serialize=y=>({expand:y.expand,item:l.serialize(y.item)}),D.deserialize=y=>({controllerId:R.TestId.root(y.item.extId),expand:y.expand,item:l.deserialize(y.item)})})(d=e.InternalTestItem||(e.InternalTestItem={}));var n;(function(D){D.serialize=y=>{let T;return y.item&&(T={},y.item.label!==void 0&&(T.label=y.item.label),y.item.tags!==void 0&&(T.tags=y.item.tags),y.item.busy!==void 0&&(T.busy=y.item.busy),y.item.uri!==void 0&&(T.uri=y.item.uri?.toJSON()),y.item.range!==void 0&&(T.range=y.item.range?.toJSON()),y.item.description!==void 0&&(T.description=y.item.description),y.item.error!==void 0&&(T.error=y.item.error),y.item.sortText!==void 0&&(T.sortText=y.item.sortText)),{extId:y.extId,expand:y.expand,item:T}},D.deserialize=y=>{let T;return y.item&&(T={},y.item.label!==void 0&&(T.label=y.item.label),y.item.tags!==void 0&&(T.tags=y.item.tags),y.item.busy!==void 0&&(T.busy=y.item.busy),y.item.range!==void 0&&(T.range=y.item.range?p.Range.lift(y.item.range):null),y.item.description!==void 0&&(T.description=y.item.description),y.item.error!==void 0&&(T.error=y.item.error),y.item.sortText!==void 0&&(T.sortText=y.item.sortText)),{extId:y.extId,expand:y.expand,item:T}}})(n=e.ITestItemUpdate||(e.ITestItemUpdate={}));const a=(D,y)=>{y.expand!==void 0&&(D.expand=y.expand),y.item!==void 0&&(D.item=D.item?Object.assign(D.item,y.item):y.item)};e.applyTestItemUpdate=a;var o;(function(D){D.serializeWithoutMessages=y=>({...d.serialize(y),ownComputedState:y.ownComputedState,computedState:y.computedState,tasks:y.tasks.map(u.serializeWithoutMessages),retired:y.retired}),D.serialize=y=>({...d.serialize(y),ownComputedState:y.ownComputedState,computedState:y.computedState,tasks:y.tasks.map(u.serialize),retired:y.retired}),D.deserialize=y=>({...d.deserialize(y),ownComputedState:y.ownComputedState,computedState:y.computedState,tasks:y.tasks.map(u.deserialize),retired:!0})})(o=e.TestResultItem||(e.TestResultItem={}));var g;(function(D){D[D.Function=0]="Function",D[D.Statement=1]="Statement"})(g=e.DetailType||(e.DetailType={}));var h;(function(D){D[D.Add=0]="Add",D[D.Update=1]="Update",D[D.DocumentSynced=2]="DocumentSynced",D[D.Remove=3]="Remove",D[D.IncrementPendingExtHosts=4]="IncrementPendingExtHosts",D[D.Retire=5]="Retire",D[D.AddTag=6]="AddTag",D[D.RemoveTag=7]="RemoveTag"})(h=e.TestDiffOpType||(e.TestDiffOpType={}));var v;(function(D){D.deserialize=y=>y.op===0?{op:y.op,item:d.deserialize(y.item)}:y.op===1?{op:y.op,item:n.deserialize(y.item)}:y.op===2?{op:y.op,uri:t.URI.revive(y.uri),docv:y.docv}:y,D.serialize=y=>y.op===0?{op:y.op,item:d.serialize(y.item)}:y.op===1?{op:y.op,item:n.serialize(y.item)}:y})(v=e.TestsDiffOp||(e.TestsDiffOp={}));class m{add(y){}update(y){}remove(y,T){}complete(){}}e.IncrementalChangeCollector=m;class w{constructor(){this._tags=new Map,this.items=new Map,this.roots=new Set,this.busyControllerCount=0,this.pendingRootCount=0,this.tags=this._tags}apply(y){const T=this.createChangeCollector();for(const _ of y)switch(_.op){case 0:{const L=d.deserialize(_.item),M=R.TestId.parentId(L.item.extId)?.toString();if(M){if(this.items.has(M)){const O=this.items.get(M);O.children.add(L.item.extId);const N=this.createItem(L,O);this.items.set(L.item.extId,N),T.add(N)}}else{const O=this.createItem(L);this.roots.add(O),this.items.set(L.item.extId,O),T.add(O)}L.expand===2&&this.busyControllerCount++;break}case 1:{const L=n.deserialize(_.item),M=this.items.get(L.extId);if(!M)break;L.expand!==void 0&&(M.expand===2&&this.busyControllerCount--,L.expand===2&&this.busyControllerCount++),(0,e.applyTestItemUpdate)(M,L),T.update(M);break}case 3:{const L=this.items.get(_.itemId);if(!L)break;const M=R.TestId.parentId(L.item.extId)?.toString();M?this.items.get(M).children.delete(L.item.extId):this.roots.delete(L);const O=[[_.itemId]];for(;O.length;)for(const N of O.pop()){const P=this.items.get(N);P&&(O.push(P.children),this.items.delete(N),T.remove(P,P!==L),P.expand===2&&this.busyControllerCount--)}break}case 5:this.retireTest(_.itemId);break;case 4:this.updatePendingRoots(_.amount);break;case 6:this._tags.set(_.tag.id,_.tag);break;case 7:this._tags.delete(_.id);break}T.complete()}retireTest(y){}updatePendingRoots(y){this.pendingRootCount+=y}createChangeCollector(){return new m}}e.AbstractIncrementalTestCollection=w}),define(ae[455],le([1,0,88,259]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestTreeErrorMessage=e.TestItemTreeElement=void 0;let R=0;const A=()=>String(R++);class k{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}constructor(b,S=null){this.test=b,this.parent=S,this.children=new Set,this.treeId=A(),this.depth=this.parent?this.parent.depth+1:0,this.retired=!1,this.state=0,this.ownState=0}toJSON(){if(this.depth===0)return{controllerId:this.test.controllerId};const b={$mid:14,tests:[p.InternalTestItem.serialize(this.test)]};for(let S=this.parent;S&&S.depth>0;S=S.parent)b.tests.unshift(p.InternalTestItem.serialize(S.test));return b}}e.TestItemTreeElement=k;class E{get description(){return typeof this.message=="string"?this.message:this.message.value}constructor(b,S){this.message=b,this.parent=S,this.treeId=A(),this.children=new Set}}e.TestTreeErrorMessage=E}),define(ae[895],le([1,0,455,259]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ByLocationTestItemElement=void 0;class R extends t.TestItemTreeElement{constructor(k,E,I){super({...k,item:{...k.item}},E),this.addedOrRemoved=I,this.updateErrorVisiblity()}update(k){(0,p.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=R}),define(ae[2415],le([1,0,455]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeChangeList=e.NodeRenderDirective=e.peersHaveChildren=e.pruneNodesWithParentsNotInTree=e.testIdentityProvider=void 0,e.testIdentityProvider={getId(I){return I.treeId+"\0"+(I instanceof t.TestTreeErrorMessage?"error":I.test.expand)}};const p=(I,b)=>{for(const S of I)S&&S.parent&&!b.hasElement(S.parent)&&I.delete(S)};e.pruneNodesWithParentsNotInTree=p;const R=(I,b)=>{for(const S of I.parent?I.parent.children:b())if(S!==I&&S.children.size)return!0;return!1};e.peersHaveChildren=R;var A;(function(I){I[I.Omit=0]="Omit",I[I.Concat=1]="Concat"})(A=e.NodeRenderDirective||(e.NodeRenderDirective={}));const k=(I,b)=>{for(const S of I)S&&!b.hasElement(S)&&I.delete(S)};class E{constructor(){this.changedParents=new Set,this.updatedNodes=new Set,this.omittedNodes=new WeakSet,this.isFirstApply=!0}updated(b){this.updatedNodes.add(b)}addedOrRemoved(b){this.changedParents.add(this.getNearestNotOmittedParent(b))}applyTo(b,S,C){k(this.changedParents,b),k(this.updatedNodes,b);const r=this.isFirstApply?1/0:0;this.isFirstApply=!1;for(let u of this.changedParents){for(;u&&typeof S(u,()=>[])!="object";)u=u.parent;(u===null||b.hasElement(u))&&b.setChildren(u,this.renderNodeList(S,u===null?C():u.children),{diffIdentityProvider:e.testIdentityProvider,diffDepth:r})}for(const u of this.updatedNodes)b.hasElement(u)&&b.rerender(u);this.changedParents.clear(),this.updatedNodes.clear()}getNearestNotOmittedParent(b){let S=b&&b.parent;for(;S&&this.omittedNodes.has(S);)S=S.parent;return S}*renderNodeList(b,S){for(const C of S){const r=b(C,this.renderNodeList.bind(this,b));if(r===0)this.omittedNodes.add(C);else if(r===1){if(this.omittedNodes.add(C),"children"in C)for(const u of this.renderNodeList(b,C.children))yield u}else this.omittedNodes.delete(C),yield r}}}e.NodeChangeList=E}),define(ae[2416],le([1,0,6,88,259]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTestCollection=void 0;class A extends R.AbstractIncrementalTestCollection{get busyProviders(){return this.busyControllerCount}get rootItems(){return this.roots}get all(){return this.getIterator()}get rootIds(){return p.Iterable.map(this.roots.values(),E=>E.item.extId)}constructor(E){super(),this.expandActual=E,this.busyProvidersChangeEmitter=new t.Emitter,this.expandPromises=new WeakMap,this.onBusyProvidersChange=this.busyProvidersChangeEmitter.event}expand(E,I){const b=this.items.get(E);if(!b)return Promise.resolve();const S=this.expandPromises.get(b);if(S&&S.pendingLvl>=I)return S.prom;const C=this.expandActual(b.item.extId,I),r={doneLvl:S?S.doneLvl:-1,pendingLvl:I,prom:C};return this.expandPromises.set(b,r),C.then(()=>{r.doneLvl=I})}getNodeById(E){return this.items.get(E)}getReviverDiff(){const E=[{op:4,amount:this.pendingRootCount}],I=[this.rootIds];for(;I.length;)for(const b of I.pop()){const S=this.items.get(b);E.push({op:0,item:{controllerId:S.controllerId,expand:S.expand,item:S.item}}),I.push(S.children)}return E}apply(E){const I=this.busyControllerCount;super.apply(E),I!==this.busyControllerCount&&this.busyProvidersChangeEmitter.fire(this.busyControllerCount)}clear(){const E=[];for(const I of this.roots)E.push({op:3,itemId:I.item.extId});return this.roots.clear(),this.items.clear(),E}createItem(E){return{...E,children:new Set}}*getIterator(){const E=[this.rootIds];for(;E.length;)for(const I of E.pop()){const b=this.getNodeById(I);yield b,E.push(b.children)}}}e.MainThreadTestCollection=A}),define(ae[536],le([1,0,6,144,5,23,388,314,259]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.allTestFilterTerms=e.TestFilterTerm=e.TestExplorerFilterState=e.ITestExplorerFilterState=void 0,e.ITestExplorerFilterState=(0,R.createDecorator)("testingFilterState");const b=/!?@([^ ,:]+)/g,S=u=>u.replace(/\s\s+/g," ").trim();let C=class{constructor(i){this.storageService=i,this.focusEmitter=new t.Emitter,this.termFilterState={},this.globList=[],this.includeTags=new Set,this.excludeTags=new Set,this.text=new k.MutableObservableValue(""),this.fuzzy=k.MutableObservableValue.stored(new E.StoredValue({key:"testHistoryFuzzy",scope:0,target:0},this.storageService),!1),this.reveal=new k.MutableObservableValue(void 0),this.onDidRequestInputFocus=this.focusEmitter.event}focusInput(){this.focusEmitter.fire()}setText(i){if(i===this.text.value)return;this.termFilterState={},this.globList=[],this.includeTags.clear(),this.excludeTags.clear();let f="",c=0;for(const l of i.matchAll(b)){let s=l.index+l[0].length;const d=l[0];if(e.allTestFilterTerms.includes(d)&&(this.termFilterState[d]=!0),i[s]===":"){s++;let n=i[s];n!=='"'&&n!=="'"?n=" ":s++;let a="";for(;s<i.length&&i[s]!==n;)i[s]==="\\"?(a+=i[s+1],s+=2):(a+=i[s],s++);l[0].startsWith("!")?this.excludeTags.add((0,I.namespaceTestTag)(l[1],a)):this.includeTags.add((0,I.namespaceTestTag)(l[1],a)),s++}f+=i.slice(c,l.index),c=s}if(f+=i.slice(c).trim(),f.length)for(const l of(0,p.splitGlobAware)(f,",").map(s=>s.trim()).filter(s=>!!s.length))l.startsWith("!")?this.globList.push({include:!1,text:l.slice(1).toLowerCase()}):this.globList.push({include:!0,text:l.toLowerCase()});this.text.value=i}isFilteringFor(i){return!!this.termFilterState[i]}toggleFilteringFor(i,f){const c=this.text.value.trim();f!==!1&&!this.termFilterState[i]?this.setText(c?`${c} ${i}`:i):f!==!0&&this.termFilterState[i]&&this.setText(S(c.replace(i,"")))}};C=we([F(0,A.IStorageService)],C),e.TestExplorerFilterState=C;var r;(function(u){u.Failed="@failed",u.Executed="@executed",u.CurrentDoc="@doc",u.Hidden="@hidden"})(r=e.TestFilterTerm||(e.TestFilterTerm={})),e.allTestFilterTerms=["@failed","@executed","@doc","@hidden"]}),define(ae[2417],le([1,0,11,6,2,171,259,229]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTestItemChildren=e.MixedTestItemController=e.InvalidTestItemError=e.DuplicateTestItemError=e.TestItemCollection=e.TestItemEventOp=void 0;var I;(function(l){l[l.Upsert=0]="Upsert",l[l.SetTags=1]="SetTags",l[l.UpdateCanResolveChildren=2]="UpdateCanResolveChildren",l[l.RemoveChild=3]="RemoveChild",l[l.SetProp=4]="SetProp",l[l.Bulk=5]="Bulk",l[l.DocumentSynced=6]="DocumentSynced"})(I=e.TestItemEventOp||(e.TestItemEventOp={}));const b=(l,s)=>l===s,S={range:(l,s)=>l===s?!0:!l||!s?!1:l.equalsRange(s),busy:b,label:b,description:b,error:b,tags:(l,s)=>!(l.length!==s.length||l.some(d=>!s.includes(d)))},C=(l,s)=>{let d;for(const[n,a]of Object.entries(S))a(l[n],s[n])||(d?d[n]=s[n]:d={[n]:s[n]});return d};class r extends R.Disposable{get root(){return this.options.root}constructor(s){super(),this.options=s,this.debounceSendDiff=this._register(new t.RunOnceScheduler(()=>this.flushDiff(),200)),this.diffOpEmitter=this._register(new p.Emitter),this.tree=new Map,this.tags=new Map,this.diff=[],this.onDidGenerateDiff=this.diffOpEmitter.event,this.root.canResolveChildren=!0,this.upsertItem(this.root,void 0)}set resolveHandler(s){this._resolveHandler=s;for(const d of this.tree.values())this.updateExpandability(d)}collectDiff(){const s=this.diff;return this.diff=[],s}pushDiff(s){switch(s.op){case 2:{for(const d of this.diff)if(d.op===2&&d.uri===s.uri){d.docv=s.docv;return}break}case 1:{const d=this.diff[this.diff.length-1];if(d){if(d.op===1&&d.item.extId===s.item.extId){(0,k.applyTestItemUpdate)(d.item,s.item);return}if(d.op===0&&d.item.item.extId===s.item.extId){(0,k.applyTestItemUpdate)(d.item,s.item);return}}break}}this.diff.push(s),this.debounceSendDiff.isScheduled()||this.debounceSendDiff.schedule()}expand(s,d){const n=this.tree.get(s);if(!!n){if((n.expandLevels===void 0||d>n.expandLevels)&&(n.expandLevels=d),n.expand===1){const a=this.resolveChildren(n);return a.isOpen()?this.expandChildren(n,d-1):a.wait().then(()=>this.expandChildren(n,d-1))}else if(n.expand===3)return n.resolveBarrier?.isOpen()===!1?n.resolveBarrier.wait().then(()=>this.expandChildren(n,d-1)):this.expandChildren(n,d-1)}}dispose(){for(const s of this.tree.values())this.options.getApiFor(s.actual).listener=void 0;this.tree.clear(),this.diff=[],super.dispose()}onTestItemEvent(s,d){switch(d.op){case 3:this.removeItem(E.TestId.joinToString(s.fullId,d.id));break;case 0:this.upsertItem(d.item,s);break;case 5:for(const n of d.ops)this.onTestItemEvent(s,n);break;case 1:this.diffTagRefs(d.new,d.old,s.fullId.toString());break;case 2:this.updateExpandability(s);break;case 4:this.pushDiff({op:1,item:{extId:s.fullId.toString(),item:d.update}});break;case 6:this.documentSynced(s.actual.uri);break;default:(0,A.assertNever)(d)}}documentSynced(s){s&&this.pushDiff({op:2,uri:s,docv:this.options.getDocumentVersion(s)})}upsertItem(s,d){const n=E.TestId.fromExtHostTestItem(s,this.root.id,d?.actual),a=this.options.getApiFor(s);a.parent&&a.parent!==d?.actual&&this.options.getChildren(a.parent).delete(s.id);let o=this.tree.get(n.toString());if(!o){o={fullId:n,actual:s,expandLevels:d?.expandLevels?d.expandLevels-1:void 0,expand:0},s.tags.forEach(this.incrementTagRefs,this),this.tree.set(o.fullId.toString(),o),this.setItemParent(s,d),this.pushDiff({op:0,item:{controllerId:this.options.controllerId,expand:o.expand,item:this.options.toITestItem(s)}}),this.connectItemAndChildren(s,o,d);return}if(o.actual===s){this.connectItem(s,o,d);return}const g=this.options.getChildren(o.actual),h=o.actual,v=C(this.options.toITestItem(h),this.options.toITestItem(s));this.options.getApiFor(h).listener=void 0,o.actual=s,o.expand=0,v&&(v.hasOwnProperty("tags")&&(this.diffTagRefs(s.tags,h.tags,n.toString()),delete v.tags),this.onTestItemEvent(o,{op:4,update:v})),this.connectItemAndChildren(s,o,d);for(const[m,w]of g)this.options.getChildren(s).get(w.id)||this.removeItem(E.TestId.joinToString(n,w.id));this.documentSynced(o.actual.uri)}diffTagRefs(s,d,n){const a=new Set(d.map(o=>o.id));for(const o of s)a.delete(o.id)||this.incrementTagRefs(o);this.pushDiff({op:1,item:{extId:n,item:{tags:s.map(o=>(0,k.namespaceTestTag)(this.options.controllerId,o.id))}}}),a.forEach(this.decrementTagRefs,this)}incrementTagRefs(s){const d=this.tags.get(s.id);d?d.refCount++:(this.tags.set(s.id,{refCount:1}),this.pushDiff({op:6,tag:{id:(0,k.namespaceTestTag)(this.options.controllerId,s.id)}}))}decrementTagRefs(s){const d=this.tags.get(s);d&&!--d.refCount&&(this.tags.delete(s),this.pushDiff({op:7,id:(0,k.namespaceTestTag)(this.options.controllerId,s)}))}setItemParent(s,d){this.options.getApiFor(s).parent=d&&d.actual!==this.root?d.actual:void 0}connectItem(s,d,n){this.setItemParent(s,n);const a=this.options.getApiFor(s);a.parent=n?.actual,a.listener=o=>this.onTestItemEvent(d,o),this.updateExpandability(d)}connectItemAndChildren(s,d,n){this.connectItem(s,d,n);for(const[a,o]of this.options.getChildren(s))this.upsertItem(o,d)}updateExpandability(s){let d;this._resolveHandler?s.resolveBarrier?d=s.resolveBarrier.isOpen()?3:2:d=s.actual.canResolveChildren?1:0:d=0,d!==s.expand&&(s.expand=d,this.pushDiff({op:1,item:{extId:s.fullId.toString(),expand:d}}),d===1&&s.expandLevels!==void 0&&this.resolveChildren(s))}expandChildren(s,d){if(d<0)return;const n=[];for(const[a,o]of this.options.getChildren(s.actual)){const g=this.expand(E.TestId.joinToString(s.fullId,o.id),d);(0,t.isThenable)(g)&&n.push(g)}if(n.length)return Promise.all(n).then(()=>{})}resolveChildren(s){if(s.resolveBarrier)return s.resolveBarrier;if(!this._resolveHandler){const o=new t.Barrier;return o.open(),o}s.expand=2,this.pushExpandStateUpdate(s);const d=s.resolveBarrier=new t.Barrier,n=o=>{console.error(`Unhandled error in resolveHandler of test controller "${this.options.controllerId}"`,o)};let a;try{a=this._resolveHandler(s.actual===this.root?void 0:s.actual)}catch(o){n(o)}return(0,t.isThenable)(a)?a.catch(n).then(()=>{d.open(),this.updateExpandability(s)}):(d.open(),this.updateExpandability(s)),s.resolveBarrier}pushExpandStateUpdate(s){this.pushDiff({op:1,item:{extId:s.fullId.toString(),expand:s.expand}})}removeItem(s){const d=this.tree.get(s);if(!d)throw new Error("attempting to remove non-existent child");this.pushDiff({op:3,itemId:s});const n=[d];for(;n.length;){const a=n.pop();if(!!a){this.options.getApiFor(a.actual).listener=void 0;for(const o of a.actual.tags)this.decrementTagRefs(o.id);this.tree.delete(a.fullId.toString());for(const[o,g]of this.options.getChildren(a.actual))n.push(this.tree.get(E.TestId.joinToString(a.fullId,g.id)))}}}flushDiff(){const s=this.collectDiff();s.length&&this.diffOpEmitter.fire(s)}}e.TestItemCollection=r;class u extends Error{constructor(s){super(`Attempted to insert a duplicate test item ID ${s}`)}}e.DuplicateTestItemError=u;class i extends Error{constructor(s){super(`TestItem with ID "${s}" is invalid. Make sure to create it from the createTestItem method.`)}}e.InvalidTestItemError=i;class f extends Error{constructor(s,d,n){super(`TestItem with ID "${s}" is from controller "${d}" and cannot be added as a child of an item from controller "${n}".`)}}e.MixedTestItemController=f;const c=(l,s,d)=>{let n=new Map;return{get size(){return n.size},forEach(a,o){for(const g of n.values())a.call(o,g,this)},[Symbol.iterator](){return n.entries()},replace(a){const o=new Map,g=new Set(n.keys()),h={op:5,ops:[]};for(const v of a){if(!(v instanceof d))throw new i(v.id);const m=s(v).controllerId;if(m!==l.controllerId)throw new f(v.id,m,l.controllerId);if(o.has(v.id))throw new u(v.id);o.set(v.id,v),g.delete(v.id),h.ops.push({op:0,item:v})}for(const v of g.keys())h.ops.push({op:3,id:v});l.listener?.(h),n=o},add(a){if(!(a instanceof d))throw new i(a.id);n.set(a.id,a),l.listener?.({op:0,item:a})},delete(a){n.delete(a)&&l.listener?.({op:3,id:a})},get(a){return n.get(a)},toJSON(){return Array.from(n.values())}}};e.createTestItemChildren=c}),define(ae[2418],le([1,0,2417]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getPrivateApiFor=e.createPrivateApiFor=void 0;const p=new WeakMap,R=(k,E)=>{const I={controllerId:E};return p.set(k,I),I};e.createPrivateApiFor=R;const A=k=>{const E=p.get(k);if(!E)throw new t.InvalidTestItemError(k?.id||"<unknown>");return E};e.getPrivateApiFor=A}),define(ae[315],le([1,0,1936,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContextKeys=void 0;var R;(function(A){A.providerCount=new p.RawContextKey("testing.providerCount",0),A.canRefreshTests=new p.RawContextKey("testing.canRefresh",!1,{type:"boolean",description:(0,t.localize)(0,null)}),A.isRefreshingTests=new p.RawContextKey("testing.isRefreshing",!1,{type:"boolean",description:(0,t.localize)(1,null)}),A.hasDebuggableTests=new p.RawContextKey("testing.hasDebuggableTests",!1,{type:"boolean",description:(0,t.localize)(2,null)}),A.hasRunnableTests=new p.RawContextKey("testing.hasRunnableTests",!1,{type:"boolean",description:(0,t.localize)(3,null)}),A.hasCoverableTests=new p.RawContextKey("testing.hasCoverableTests",!1,{type:"boolean",description:(0,t.localize)(4,null)}),A.hasNonDefaultProfile=new p.RawContextKey("testing.hasNonDefaultProfile",!1,{type:"boolean",description:(0,t.localize)(5,null)}),A.hasConfigurableProfile=new p.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 p.RawContextKey("testing.hasAnyResults",!1),A.viewMode=new p.RawContextKey("testing.explorerViewMode","list"),A.viewSorting=new p.RawContextKey("testing.explorerViewSorting","location"),A.isRunning=new p.RawContextKey("testing.isRunning",!1),A.isInPeek=new p.RawContextKey("testing.isInPeek",!0),A.isPeekVisible=new p.RawContextKey("testing.isPeekVisible",!1),A.autoRun=new p.RawContextKey("testing.autoRun",!1),A.peekItemType=new p.RawContextKey("peekItemType",void 0,{type:"string",description:(0,t.localize)(7,null)}),A.controllerId=new p.RawContextKey("controllerId",void 0,{type:"string",description:(0,t.localize)(8,null)}),A.testItemExtId=new p.RawContextKey("testId",void 0,{type:"string",description:(0,t.localize)(9,null)}),A.testItemHasUri=new p.RawContextKey("testing.testItemHasUri",!1,{type:"boolean",description:(0,t.localize)(10,null)}),A.testItemIsHidden=new p.RawContextKey("testing.testItemIsHidden",!1,{type:"boolean",description:(0,t.localize)(11,null)})})(R=e.TestingContextKeys||(e.TestingContextKeys={}))}),define(ae[271],le([1,0,6,13,7,5,23,314,259,229,315]),function(J,e,t,p,R,A,k,E,I,b,S){"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=(f,c)=>f.controllerId===c.controllerId&&(b.TestId.isRoot(c.item.extId)||!f.tag||c.item.tags.includes(f.tag));e.canUseProfileWithTest=C;const r=(f,c)=>f.isDefault!==c.isDefault?f.isDefault?-1:1:f.label.localeCompare(c.label),u=f=>[[S.TestingContextKeys.hasRunnableTests.key,(f&2)!==0],[S.TestingContextKeys.hasDebuggableTests.key,(f&4)!==0],[S.TestingContextKeys.hasCoverableTests.key,(f&8)!==0]];e.capabilityContextKeys=u;let i=class{constructor(c,l){this.changeEmitter=new t.Emitter,this.controllerProfiles=new Map,this.onDidChange=this.changeEmitter.event,this.preferredDefaults=new E.StoredValue({key:"testingPreferredProfiles",scope:1,target:0},l),this.capabilitiesContexts={[2]:S.TestingContextKeys.hasRunnableTests.bindTo(c),[4]:S.TestingContextKeys.hasDebuggableTests.bindTo(c),[8]:S.TestingContextKeys.hasCoverableTests.bindTo(c),[16]:S.TestingContextKeys.hasNonDefaultProfile.bindTo(c),[32]:S.TestingContextKeys.hasConfigurableProfile.bindTo(c)},this.refreshContextKeys()}addProfile(c,l){let s=this.controllerProfiles.get(l.controllerId);s?(s.profiles.push(l),s.profiles.sort(r)):(s={profiles:[l],controller:c},this.controllerProfiles.set(l.controllerId,s)),this.refreshContextKeys(),this.changeEmitter.fire()}updateProfile(c,l,s){const d=this.controllerProfiles.get(c);if(!d)return;const n=d.profiles.find(a=>a.controllerId===c&&a.profileId===l);!n||(Object.assign(n,s),d.profiles.sort(r),this.changeEmitter.fire())}configure(c,l){this.controllerProfiles.get(c)?.controller.configureRunProfile(l)}removeProfile(c,l){const s=this.controllerProfiles.get(c);if(!s)return;if(!l){this.controllerProfiles.delete(c),this.changeEmitter.fire();return}const d=s.profiles.findIndex(n=>n.profileId===l);d!==-1&&(s.profiles.splice(d,1),this.refreshContextKeys(),this.changeEmitter.fire())}capabilitiesForTest(c){const l=this.controllerProfiles.get(c.controllerId);if(!l)return 0;let s=0;for(const d of l.profiles)(!d.tag||c.item.tags.includes(d.tag))&&(s|=s&d.group?16:d.group);return s}all(){return this.controllerProfiles.values()}getControllerProfiles(c){return this.controllerProfiles.get(c)?.profiles??[]}getGroupDefaultProfiles(c){const l=this.preferredDefaults.get();if(!l)return this.getBaseDefaults(c);const s=l[c]?.map(d=>this.controllerProfiles.get(d.controllerId)?.profiles.find(n=>n.profileId===d.profileId&&n.group===c)).filter(p.isDefined);return s?.length?s:this.getBaseDefaults(c)}setGroupDefaultProfiles(c,l){this.preferredDefaults.store({...this.preferredDefaults.get(),[c]:l.map(s=>({profileId:s.profileId,controllerId:s.controllerId}))}),this.changeEmitter.fire()}getBaseDefaults(c){const l=[];for(const{profiles:s}of this.controllerProfiles.values()){const d=s.find(n=>n.group===c);d&&l.push(d)}return l}refreshContextKeys(){let c=0;for(const{profiles:l}of this.controllerProfiles.values())for(const s of l)c|=c&s.group?16:s.group;for(const l of I.testRunProfileBitsetList)this.capabilitiesContexts[l].set((c&l)!==0)}};i=we([F(0,R.IContextKeyService),F(1,k.IStorageService)],i),e.TestProfileService=i}),define(ae[655],le([1,0,271,229,315]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTestItemContextOverlay=void 0;const A=(k,E)=>{if(!k)return[];const I=p.TestId.fromString(k.item.extId);return[[R.TestingContextKeys.testItemExtId.key,I.localId],[R.TestingContextKeys.controllerId.key,k.controllerId],[R.TestingContextKeys.testItemHasUri.key,!!k.item.uri],...(0,t.capabilityContextKeys)(E)]};e.getTestItemContextOverlay=A}),define(ae[2419],le([1,0,16,13,1923,31,48,12,313,654,271]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function C(u,{onlyGroup:i,showConfigureButtons:f=!0,onlyForTest:c,onlyConfigurable:l,placeholder:s=(0,R.localize)(0,null)}){const d=u.get(S.ITestProfileService),n=[],a=(g,h)=>{for(const v of(0,t.groupBy)(g,(m,w)=>m.group-w.group)){let m=!1;if(i){if(v[0].group!==i)continue;m=!0}for(const w of v)l&&!w.hasConfigurationHandler||(m||(n.push({type:"separator",label:b.testConfigurationGroupNames[v[0].group]}),m=!0),n.push({type:"item",profile:w,label:w.label,description:h,alwaysShow:!0,buttons:w.hasConfigurationHandler&&f?[{iconClass:E.ThemeIcon.asClassName(I.testingUpdateProfiles),tooltip:(0,R.localize)(1,null)}]:[]}))}};if(c!==void 0)a(d.getControllerProfiles(c.controllerId).filter(g=>(0,S.canUseProfileWithTest)(g,c)));else for(const{profiles:g,controller:h}of d.all())a(g,h.label.value);const o=u.get(k.IQuickInputService).createQuickPick();return o.items=n,o.placeholder=s,o}const r=(u,i)=>f=>{const c=f.item.profile;c&&(u.configure(c.controllerId,c.profileId),i(void 0))};A.CommandsRegistry.registerCommand({id:"vscode.pickMultipleTestProfiles",handler:async(u,i)=>{const f=u.get(S.ITestProfileService),c=C(u,i);if(!c)return;c.canSelectMany=!0,i.selected&&(c.selectedItems=c.items.filter(s=>s.type==="item").filter(s=>i.selected.some(d=>d.controllerId===s.profile.controllerId&&d.profileId===s.profile.profileId)));const l=await new Promise(s=>{c.onDidAccept(()=>{const d=c.selectedItems;s(d.map(n=>n.profile).filter(p.isDefined))}),c.onDidHide(()=>s(void 0)),c.onDidTriggerItemButton(r(f,s)),c.show()});return c.dispose(),l}}),A.CommandsRegistry.registerCommand({id:"vscode.pickTestProfile",handler:async(u,i)=>{const f=u.get(S.ITestProfileService),c=C(u,i);if(!c)return;const l=await new Promise(s=>{c.onDidAccept(()=>s(c.selectedItems[0]?.profile)),c.onDidHide(()=>s(void 0)),c.onDidTriggerItemButton(r(f,s)),c.show()});return c.dispose(),l}})}),define(ae[896],le([1,0,16,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITestingDecorationsService=e.TestDecorations=void 0;class R{constructor(){this.value=[]}push(k){const E=(0,t.binarySearch)(this.value,k,(I,b)=>I.line-b.line);this.value.splice(E<0?~E:E,0,k)}*lines(){if(!this.value.length)return;let k=0,E=this.value[0].line;for(let I=1;I<this.value.length;I++){const b=this.value[I];b.line!==E&&(yield[E,this.value.slice(k,I)],E=b.line,k=I)}yield[E,this.value.slice(k)]}}e.TestDecorations=R,e.ITestingDecorationsService=(0,p.createDecorator)("testingDecorationService")}),define(ae[537],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITestingPeekOpener=void 0,e.ITestingPeekOpener=(0,t.createDecorator)("testingPeekOpener")}),define(ae[347],le([1,0]),function(J,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,[1]:3,[3]:2,[0]:1,[5]:0};const t=E=>E===6||E===4;e.isFailedState=t;const p=E=>E===6||E===4||E===3;e.isStateWithResult=p,e.stateNodes=Object.entries(e.statePriority).reduce((E,[I,b])=>{const S=Number(I);return E[S]={statusNode:!0,state:S,priority:b},E},{});const R=(E,I)=>e.statePriority[I]-e.statePriority[E];e.cmpPriority=R;const A=(...E)=>{switch(E.length){case 0:return 0;case 1:return E[0];case 2:return e.statePriority[E[0]]>e.statePriority[E[1]]?E[0]:E[1];default:{let I=E[0];for(let b=1;b<E.length;b++)e.statePriority[I]<e.statePriority[E[b]]&&(I=E[b]);return I}}};e.maxPriority=A,e.statesInOrder=Object.keys(e.statePriority).map(E=>Number(E)).sort(e.cmpPriority);const k=E=>E===1||E===2;e.isRunningState=k,e.terminalStatePriorities={[3]:0,[5]:1,[4]:2,[6]:3}}),define(ae[897],le([1,0,88,347]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refreshComputedState=e.getComputedDuration=e.getComputedState=e.isDurationAccessor=void 0;const R=I=>"getOwnDuration"in I;e.isDurationAccessor=R;const A=(I,b,S=!1)=>{let C=I.getCurrentComputedState(b);if(C===void 0||S){C=I.getOwnState(b)??0;for(const r of I.getChildren(b)){const u=(0,e.getComputedState)(I,r);C=u===5&&C===0?5:(0,p.maxPriority)(C,u)}I.setComputedState(b,C)}return C};e.getComputedState=A;const k=(I,b,S=!1)=>{let C=I.getCurrentComputedDuration(b);if(C===void 0||S){const r=I.getOwnDuration(b);if(r!==void 0)C=r;else{C=void 0;for(const u of I.getChildren(b)){const i=(0,e.getComputedDuration)(I,u);i!==void 0&&(C=(C||0)+i)}}I.setComputedDuration(b,C)}return C};e.getComputedDuration=k;const E=(I,b,S,C=!0)=>{const r=I.getCurrentComputedState(b),u=p.statePriority[r],i=S??(0,e.getComputedState)(I,b,!0),f=p.statePriority[i],c=new Set;if(f!==u){if(I.setComputedState(b,i),c.add(b),f>u)for(const l of I.getParents(b)){const s=I.getCurrentComputedState(l);if(s!==void 0&&p.statePriority[s]>=f)break;I.setComputedState(l,i),c.add(l)}else if(f<u)for(const l of I.getParents(b)){const s=I.getCurrentComputedState(l);if(s===void 0||p.statePriority[s]>u)break;I.setComputedState(l,(0,e.getComputedState)(I,l,!0)),c.add(l)}}if((0,e.isDurationAccessor)(I)&&C)for(const l of t.Iterable.concat(t.Iterable.single(b),I.getParents(b))){const s=I.getCurrentComputedDuration(l),d=(0,e.getComputedDuration)(I,l,!0);if(s===d)break;I.setComputedDuration(l,d),c.add(l)}return c};e.refreshComputedState=E}),define(ae[456],le([1,0,56,6,206,2,1934,897,388,259,347,28,229]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"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 u=function*(g,h){for(const v of r.TestId.fromString(h.item.extId).idsToRoot())yield g.getStateById(v.toString())};e.resultItemParents=u;const i=()=>{const g={};for(const h of S.statesInOrder)g[h]=0;return g};e.makeEmptyCounts=i;const f=g=>{const h=(0,e.makeEmptyCounts)();for(const v of g)for(const m of S.statesInOrder)h[m]+=v[m];return h};e.sumCounts=f;const c=g=>{for(const h of S.statesInOrder)if(g[h]>0)return h;return 0};e.maxCountPriority=c;const l=(g,h)=>`\x1B]633;SetMark;Id=${(0,b.getMarkId)(g,h)};Hidden\x07`;class s{get offset(){return this._offset}constructor(h,v,m){this.writer=h,this.reader=v,this.rangeReader=m,this.previouslyWritten=[],this.dataEmitter=new p.Emitter,this.endEmitter=new p.Emitter,this._offset=0}append(h,v){return this.closed?this.closed:(v!==void 0&&(h=t.VSBuffer.concat([t.VSBuffer.fromString(l(v,!0)),h,t.VSBuffer.fromString(l(v,!1))])),this.previouslyWritten?.push(h),this.dataEmitter.fire(h),this._offset+=h.byteLength,this.writer.getValue()[0].write(h))}getRange(h,v){if(!this.previouslyWritten)return this.rangeReader(h,v);const m=t.VSBuffer.alloc(v);let w=0;for(const y of this.previouslyWritten){if(!(w+y.byteLength<h)){if(w>h+v)break;{const T=Math.max(0,h-w),_=Math.max(0,w-h);m.set(y.slice(T,T+Math.min(v-_,y.byteLength-T)),_)}}w+=y.byteLength}const D=h+v-w;return Promise.resolve(D>0?m.slice(0,-D):m)}read(){if(!this.previouslyWritten)return this.reader();const h=(0,t.newWriteableBufferStream)();for(const m of this.previouslyWritten)h.write(m);const v=new A.DisposableStore;return v.add(this.dataEmitter.event(m=>h.write(m))),v.add(this.endEmitter.event(()=>h.end())),h.on("end",()=>v.dispose()),Promise.resolve(h)}close(){if(this.closed)return this.closed;if(!this.writer.hasValue())this.closed=Promise.resolve();else{const[h,v]=this.writer.getValue();h.end(),this.closed=v}return this.endEmitter.fire(),this.closed.then(()=>{this.previouslyWritten=void 0,this.dataEmitter.dispose(),this.endEmitter.dispose()}),this.closed}}e.LiveOutputController=s;const d=(g,h,v)=>({controllerId:g,expand:0,item:{...h},children:[],tasks:[],ownComputedState:0,computedState:0});var n;(function(g){g[g.ComputedStateChange=0]="ComputedStateChange",g[g.OwnStateChange=1]="OwnStateChange"})(n=e.TestResultItemChangeReason||(e.TestResultItemChangeReason={}));class a{get completedAt(){return this._completedAt}get tests(){return this.testById.values()}constructor(h,v,m,w){this.id=h,this.output=v,this.persist=m,this.request=w,this.completeEmitter=new p.Emitter,this.changeEmitter=new p.Emitter,this.testById=new Map,this.testMarkerCounter=0,this.onChange=this.changeEmitter.event,this.onComplete=this.completeEmitter.event,this.tasks=[],this.name=(0,k.localize)(0,null,new Date().toLocaleString()),this.counts=(0,e.makeEmptyCounts)(),this.computedStateAccessor={getOwnState:D=>D.ownComputedState,getCurrentComputedState:D=>D.computedState,setComputedState:(D,y)=>D.computedState=y,getChildren:D=>D.children,getParents:D=>{const{testById:y}=this;return function*(){const T=r.TestId.fromString(D.item.extId).parentId;if(T)for(const _ of T.idsToRoot())yield y.get(_.toString())}()}},this.doSerialize=new R.Lazy(()=>({id:this.id,completedAt:this.completedAt,tasks:this.tasks.map(D=>({id:D.id,name:D.name})),name:this.name,request:this.request,items:[...this.testById.values()].map(b.TestResultItem.serializeWithoutMessages)}))}getStateById(h){return this.testById.get(h)}appendOutput(h,v,m,w){const D=h.byteLength>100?h.slice(0,100).toString()+"\u2026":h.toString();let y;(w||m)&&(y=this.testMarkerCounter++);const T={location:m,message:(0,C.removeAnsiEscapeCodes)(D),offset:this.output.offset,length:h.byteLength,marker:y,type:1};this.output.append(h,y);const _=this.mustGetTaskIndex(v);w?this.testById.get(w)?.tasks[_].messages.push(T):this.tasks[_].otherMessages.push(T)}addTask(h){const v=this.tasks.length;this.tasks.push({...h,coverage:new I.MutableObservableValue(void 0),otherMessages:[]});for(const m of this.tests)m.tasks.push({duration:void 0,messages:[],state:0}),this.fireUpdateAndRefresh(m,v,1)}addTestChainToRun(h,v){let m=this.testById.get(v[0].extId);m||(m=this.addTestToRun(h,v[0],null));for(let w=1;w<v.length;w++)m=this.addTestToRun(h,v[w],m.item.extId);for(let w=0;w<this.tasks.length;w++)this.fireUpdateAndRefresh(m,w,1)}updateState(h,v,m,w){const D=this.testById.get(h);if(!D)return;const y=this.mustGetTaskIndex(v),T=S.terminalStatePriorities[D.tasks[y].state],_=S.terminalStatePriorities[m];T!==void 0&&(_===void 0||_<T)||this.fireUpdateAndRefresh(D,y,m,w)}appendMessage(h,v,m){const w=this.testById.get(h);!w||(w.tasks[this.mustGetTaskIndex(v)].messages.push(m),this.changeEmitter.fire({item:w,result:this,reason:1,previousState:w.ownComputedState,previousOwnDuration:w.ownDuration}))}getOutput(){return this.output.read()}getOutputRange(h,v){return this.output.getRange(h,v)}markTaskComplete(h){this.tasks[this.mustGetTaskIndex(h)].running=!1,this.setAllToState(0,h,v=>v.state===1||v.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,v,m){const w=this.mustGetTaskIndex(v);for(const D of this.testById.values())m(D.tasks[w],D)&&this.fireUpdateAndRefresh(D,w,h)}fireUpdateAndRefresh(h,v,m,w){const D=h.ownComputedState,y=h.ownDuration,T={item:h,result:this,reason:1,previousState:D,previousOwnDuration:y};h.tasks[v].state=m,w!==void 0&&(h.tasks[v].duration=w,h.ownDuration=Math.max(h.ownDuration||0,w));const _=(0,S.maxPriority)(...h.tasks.map(L=>L.state));if(_===D){w!==y&&this.changeEmitter.fire(T);return}h.ownComputedState=_,this.counts[D]--,this.counts[_]++,(0,E.refreshComputedState)(this.computedStateAccessor,h).forEach(L=>this.changeEmitter.fire(L===h?T:{item:L,result:this,reason:0}))}addTestToRun(h,v,m){const w=d(h,v,m);if(this.testById.set(v.extId,w),this.counts[0]++,m&&this.testById.get(m)?.children.push(w),this.tasks.length)for(let D=0;D<this.tasks.length;D++)w.tasks.push({duration:void 0,messages:[],state:1});return w}mustGetTaskIndex(h){const v=this.tasks.findIndex(m=>m.id===h);if(v===-1)throw new Error(`Unknown task ${h} in updateState`);return v}}e.LiveTestResult=a;class o{get tests(){return this.testById.values()}constructor(h,v,m,w=!0){this.serialized=h,this.outputLoader=v,this.outputRangeLoader=m,this.persist=w,this.counts=(0,e.makeEmptyCounts)(),this.testById=new Map,this.id=h.id,this.completedAt=h.completedAt,this.tasks=h.tasks.map((D,y)=>({id:D.id,name:D.name,running:!1,coverage:(0,I.staticObservableValue)(void 0),otherMessages:[]})),this.name=h.name,this.request=h.request;for(const D of h.items){const y=b.TestResultItem.deserialize(D);this.counts[y.ownComputedState]++,this.testById.set(D.item.extId,y)}}getOutputRange(h,v){return this.outputRangeLoader(h,v)}getStateById(h){return this.testById.get(h)}getOutput(){return this.outputLoader()}toJSON(){return this.persist?this.serialized:void 0}}e.HydratedTestResult=o}),define(ae[898],le([1,0,56,206,13,9,81,19,5,25,23,34,314,456]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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,f=1024*128,c=.2;e.ITestResultStorage=(0,I.createDecorator)("ITestResultStorage");const l=1;let s=class{constructor(o,g){this.storageService=o,this.logService=g,this.stored=new r.StoredValue({key:"storedTestResults",scope:1,target:1},this.storageService)}async read(){return(await Promise.all(this.stored.get([]).map(async({id:g,rev:h})=>{if(h===l)try{const v=await this.readForResultId(g);return v?new u.HydratedTestResult(v,()=>this.readOutputForResultId(g),(m,w)=>this.readOutputRangeForResultId(g,m,w)):void 0}catch(v){this.logService.warn(`Error deserializing stored test result ${g}`,v);return}}))).filter(R.isDefined)}getOutputController(o){return new u.LiveOutputController(new p.Lazy(()=>{const g=(0,t.newWriteableBufferStream)(),h=this.storeOutputForResultId(o,g);return[g,h]}),()=>this.readOutputForResultId(o),(g,h)=>this.readOutputRangeForResultId(o,g,h))}getResultOutputWriter(o){const g=(0,t.newWriteableBufferStream)();return this.storeOutputForResultId(o,g),g}async persist(o){const g=new Map(this.stored.get([]).map(({id:w,bytes:D})=>[w,D])),h=[],v=[];let m=f;for(let w=0;w<o.length&&w<e.RETAIN_MAX_RESULTS&&(m>0||h.length<i);w++){const D=o[w],y=g.get(D.id);if(y!==void 0){g.delete(D.id),h.push({id:D.id,rev:l,bytes:y}),m-=y;continue}const T=D.toJSON();if(!T)continue;const _=t.VSBuffer.fromString(JSON.stringify(T));v.push(this.storeForResultId(D.id,T)),h.push({id:D.id,rev:l,bytes:_.byteLength}),m-=_.byteLength,D instanceof u.LiveTestResult&&D.completedAt!==void 0&&v.push(D.output.close())}for(const w of g.keys())v.push(this.deleteForResultId(w).catch(()=>{}));this.stored.store(h),await Promise.all(v)}};s=we([F(0,S.IStorageService),F(1,b.ILogService)],s),e.BaseTestResultStorage=s;class d extends s{constructor(){super(...arguments),this.cache=new Map}async readForResultId(o){return Promise.resolve(this.cache.get(o))}storeForResultId(o,g){return this.cache.set(o,g),Promise.resolve()}deleteForResultId(o){return this.cache.delete(o),Promise.resolve()}readOutputForResultId(o){throw new Error("Method not implemented.")}storeOutputForResultId(o,g){throw new Error("Method not implemented.")}readOutputRangeForResultId(o,g,h){throw new Error("Method not implemented.")}}e.InMemoryResultStorage=d;let n=class extends s{constructor(o,g,h,v,m){super(o,g),this.fileService=v,this.directory=A.URI.joinPath(m.workspaceStorageHome,h.getWorkspace().id,"testResults")}async readForResultId(o){const g=await this.fileService.readFile(this.getResultJsonPath(o));return JSON.parse(g.value.toString())}storeForResultId(o,g){return this.fileService.writeFile(this.getResultJsonPath(o),t.VSBuffer.fromString(JSON.stringify(g)))}deleteForResultId(o){return this.fileService.del(this.getResultJsonPath(o)).catch(()=>{})}async readOutputRangeForResultId(o,g,h){try{const{value:v}=await this.fileService.readFile(this.getResultOutputPath(o),{position:g,length:h});return v}catch{return t.VSBuffer.alloc(0)}}async readOutputForResultId(o){try{const{value:g}=await this.fileService.readFileStream(this.getResultOutputPath(o));return g}catch{return(0,t.bufferToStream)(t.VSBuffer.alloc(0))}}async storeOutputForResultId(o,g){await this.fileService.createFile(this.getResultOutputPath(o),g)}async persist(o){await super.persist(o),Math.random()<c&&await this.cleanupDereferenced()}async cleanupDereferenced(){const{children:o}=await this.fileService.resolve(this.directory);if(!o)return;const g=new Set(this.stored.get([]).filter(h=>h.rev===l).map(h=>h.id));await Promise.all(o.filter(h=>!g.has(h.name.replace(/\.[a-z]+$/,""))).map(h=>this.fileService.del(h.resource).catch(()=>{})))}getResultJsonPath(o){return A.URI.joinPath(this.directory,`${o}.json`)}getResultOutputPath(o){return A.URI.joinPath(this.directory,`${o}.output`)}};n=we([F(0,S.IStorageService),F(1,b.ILogService),F(2,C.IWorkspaceContextService),F(3,E.IFileService),F(4,k.IEnvironmentService)],n),e.TestResultStorage=n}),define(ae[247],le([1,0,16,11,6,154,88,72,7,5,315,271,456,898]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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 f=l=>l.results.length>0&&l.results[0].completedAt===void 0;e.isRunningTests=f,e.ITestResultService=(0,b.createDecorator)("testResultService");let c=class{get results(){return this.loadResults(),this._results}constructor(s,d,n){this.storage=d,this.testProfiles=n,this.changeResultEmitter=new R.Emitter,this._results=[],this.testChangeEmitter=new R.Emitter,this.onResultsChanged=this.changeResultEmitter.event,this.onTestChanged=this.testChangeEmitter.event,this.loadResults=(0,A.once)(()=>this.storage.read().then(a=>{for(let o=a.length-1;o>=0;o--)this.push(a[o])})),this.persistScheduler=new p.RunOnceScheduler(()=>this.persistImmediately(),500),this.isRunning=S.TestingContextKeys.isRunning.bindTo(s),this.hasAnyResults=S.TestingContextKeys.hasAnyResults.bindTo(s)}getStateById(s){for(const d of this.results){const n=d.getStateById(s);if(n&&n.computedState!==0)return[d,n]}}createLiveResult(s){if("targets"in s){const a=(0,E.generateUuid)();return this.push(new r.LiveTestResult(a,this.storage.getOutputController(a),!0,s))}let d;s.profile&&(d=this.testProfiles.getControllerProfiles(s.controllerId).find(o=>o.profileId===s.profile.id));const n={isUiTriggered:!1,targets:[],exclude:s.exclude,isAutoRun:!1};return d&&n.targets.push({profileGroup:d.group,profileId:d.profileId,controllerId:s.controllerId,testIds:s.include}),this.push(new r.LiveTestResult(s.id,this.storage.getOutputController(s.id),s.persist,n))}push(s){if(s.completedAt===void 0)this.results.unshift(s);else{const d=(0,t.findFirstInSorted)(this.results,n=>n.completedAt!==void 0&&n.completedAt<=s.completedAt);this.results.splice(d,0,s),this.persistScheduler.schedule()}if(this.hasAnyResults.set(!0),this.results.length>u.RETAIN_MAX_RESULTS&&this.results.pop(),s instanceof r.LiveTestResult)s.onComplete(()=>this.onComplete(s)),s.onChange(this.testChangeEmitter.fire,this.testChangeEmitter),this.isRunning.set(!0),this.changeResultEmitter.fire({started:s});else{this.changeResultEmitter.fire({inserted:s});for(const d of s.tests)for(const n of this.results)if(n===s){this.testChangeEmitter.fire({item:d,result:s,reason:0});break}else if(n.getStateById(d.item.extId)!==void 0)break}return s}getResult(s){return this.results.find(d=>d.id===s)}clear(){const s=[],d=[];for(const n of this.results)n.completedAt!==void 0?d.push(n):s.push(n);this._results=s,this.persistScheduler.schedule(),s.length===0&&this.hasAnyResults.set(!1),this.changeResultEmitter.fire({removed:d})}onComplete(s){this.resort(),this.updateIsRunning(),this.persistScheduler.schedule(),this.changeResultEmitter.fire({completed:s})}resort(){this.results.sort((s,d)=>(d.completedAt??Number.MAX_SAFE_INTEGER)-(s.completedAt??Number.MAX_SAFE_INTEGER))}updateIsRunning(){this.isRunning.set((0,e.isRunningTests)(this))}async persistImmediately(){await this.loadResults(),this.storage.persist(this.results)}};c=we([F(0,I.IContextKeyService),F(1,u.ITestResultStorage),F(2,C.ITestProfileService)],c),e.TestResultService=c}),define(ae[899],le([1,0,6,88,2,13,895,455,2415,897,247,291,229]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HierarchicalByLocationProjection=void 0;const u={getOwnState:f=>f instanceof E.TestItemTreeElement?f.ownState:0,getCurrentComputedState:f=>f.state,setComputedState:(f,c)=>f.state=c,getCurrentComputedDuration:f=>f.duration,getOwnDuration:f=>f instanceof E.TestItemTreeElement?f.ownDuration:void 0,setComputedDuration:(f,c)=>f.duration=c,getChildren:f=>p.Iterable.filter(f.children.values(),c=>c instanceof E.TestItemTreeElement),*getParents(f){for(let c=f.parent;c;c=c.parent)yield c}};let i=class extends R.Disposable{get roots(){const c=p.Iterable.map(this.testService.collection.rootItems,l=>this.items.get(l.item.extId));return p.Iterable.filter(c,A.isDefined)}constructor(c,l,s){super(),this.lastState=c,this.testService=l,this.results=s,this.updateEmitter=new t.Emitter,this.changes=new I.NodeChangeList,this.items=new Map,this.onUpdate=this.updateEmitter.event,this.addUpdated=d=>{const n=d;this.changes.updated(n)},this.renderNode=(d,n)=>{if(d instanceof E.TestTreeErrorMessage)return{element:d};if(d.depth===0){if(!(0,I.peersHaveChildren)(d,()=>this.roots))return 1;if(d.children.size===0)return 0}return{element:d,collapsible:d.test.expand!==0,collapsed:this.lastState.expanded[d.test.item.extId]!==void 0?!this.lastState.expanded[d.test.item.extId]:d.depth>0,children:n(d.children)}},this._register(l.onDidProcessDiff(d=>this.applyDiff(d))),this._register(s.onResultsChanged(d=>{if("removed"in d){for(const n of[...this.items.values()].sort((a,o)=>o.depth-a.depth)){const a=this.results.getStateById(n.test.item.extId)?.[1];n.ownDuration=a?.ownDuration,(0,b.refreshComputedState)(u,n,a?.ownComputedState??0).forEach(this.addUpdated)}this.updateEmitter.fire()}})),this._register(s.onTestChanged(d=>{let n=d.item;if(n.ownComputedState===0){const h=s.getStateById(n.item.extId);h&&(n=h[1])}const a=this.items.get(n.item.extId);if(!a)return;const o=d.reason===1&&d.previousOwnDuration!==n.ownDuration,g=a.children.size?void 0:n.computedState;a.retired=!!n.retired,a.ownState=n.ownComputedState,a.ownDuration=n.ownDuration,(0,b.refreshComputedState)(u,a,g,o).forEach(this.addUpdated),this.addUpdated(a),this.updateEmitter.fire()}));for(const d of l.collection.all)this.storeItem(this.createItem(d))}getRevealDepth(c){return c.depth===0?0:void 0}getElementByTestId(c){return this.items.get(c)}applyDiff(c){for(const l of c)switch(l.op){case 0:{const s=this.createItem(l.item);this.storeItem(s);break}case 1:{const s=l.item,d=this.items.get(s.extId);if(!d)break;const n=d.test.expand===0&&s.expand;d.update(s),n?this.changes.addedOrRemoved(d):this.changes.updated(d);break}case 3:{const s=this.items.get(l.itemId);if(!s)break;this.changes.addedOrRemoved(s);const d=[[s]];for(;d.length;)for(const n of d.pop())n instanceof k.ByLocationTestItemElement&&d.push(this.unstoreItem(this.items,n))}}c.length!==0&&this.updateEmitter.fire()}applyTo(c){this.changes.applyTo(c,this.renderNode,()=>this.roots)}expandElement(c,l){c instanceof k.ByLocationTestItemElement&&c.test.expand!==0&&this.testService.collection.expand(c.test.item.extId,l)}createItem(c){const l=r.TestId.parentId(c.item.extId),s=l?this.items.get(l):null;return new k.ByLocationTestItemElement(c,s,d=>this.changes.addedOrRemoved(d))}unstoreItem(c,l){const s=l.parent;return s?.children.delete(l),c.delete(l.test.item.extId),s instanceof k.ByLocationTestItemElement&&(0,b.refreshComputedState)(u,s,void 0,!!l.duration).forEach(this.addUpdated),l.children}storeItem(c){c.parent?.children.add(c),this.items.set(c.test.item.extId,c),this.changes.addedOrRemoved(c);const l=this.getRevealDepth(c);(l!==void 0||this.lastState.expanded[c.test.item.extId])&&this.expandElement(c,l||0);const s=this.results.getStateById(c.test.item.extId)?.[1];s&&(c.retired=!!s.retired,c.ownState=s.computedState,c.ownDuration=s.ownDuration,(0,b.refreshComputedState)(u,c,void 0,!!c.ownDuration).forEach(this.addUpdated))}};i=we([F(1,C.ITestService),F(2,S.ITestResultService)],i),e.HierarchicalByLocationProjection=i}),define(ae[2420],le([1,0,894,899,895,247,291,229]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HierarchicalByNameProjection=e.ByNameTestItemElement=e.ListElementType=void 0;var I;(function(C){C[C.Leaf=0]="Leaf",C[C.Branch=1]="Branch"})(I=e.ListElementType||(e.ListElementType={}));class b extends R.ByLocationTestItemElement{get description(){let r=null;for(let u=this.actualParent;u&&!u.isTestRoot;u=u.actualParent)r=r?u.label+t.flatTestItemDelimiter+r:u.label;return r}constructor(r,u,i,f){super(r,u,i),this.actualParent=f,this.elementType=0,this.isTestRoot=!this.actualParent,this.actualChildren=new Set,f?.addChild(this)}remove(){this.actualParent?.removeChild(this)}removeChild(r){this.actualChildren.delete(r)}addChild(r){this.actualChildren.add(r)}}e.ByNameTestItemElement=b;let S=class extends p.HierarchicalByLocationProjection{constructor(r,u,i){super(r,u,i);const f=this.renderNode.bind(this);this.renderNode=(c,l)=>{if(c instanceof b&&c.elementType!==0&&!c.isTestRoot)return 1;const s=f(c,l);return typeof s!="number"&&(s.collapsible=!1),s}}createItem(r){const u=E.TestId.parentId(r.item.extId),i=u?this.items.get(u.toString()):void 0;return i?(i.elementType===0&&(i.elementType=1,this.changes.addedOrRemoved(i)),new b(r,i.parent||i,f=>this.changes.addedOrRemoved(f),i)):new b(r,null,f=>this.changes.addedOrRemoved(f))}unstoreItem(r,u){const i=super.unstoreItem(r,u);return u instanceof b?(u.actualParent&&u.actualParent.actualChildren.size===1&&(u.actualParent.elementType=0,this.changes.addedOrRemoved(u.actualParent)),u.remove(),u.actualChildren):i}getRevealDepth(r){return r.depth===0?1/0:void 0}};S=we([F(1,k.ITestService),F(2,A.ITestResultService)],S),e.HierarchicalByNameProjection=S}),define(ae[656],le([1,0,11,6,2,219,13,1928,5,185,45,109,127,313,247,259]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingOutputTerminalService=e.ITestingOutputTerminalService=void 0;const c=a=>{const o=new Date(a);return o.getHours()+":"+String(o.getMinutes()).padStart(2,"0")+":"+String(o.getSeconds()).padStart(2,"0")},l=a=>a?(0,E.localize)(0,null,c(a.completedAt??Date.now())):s,s=(0,E.localize)(1,null);e.ITestingOutputTerminalService=(0,I.createDecorator)("ITestingOutputTerminalService");let d=class{constructor(o,g,h,v,m){this.terminalService=o,this.terminalGroupService=g,this.terminalEditorService=h,this.viewsService=m,this.outputTerminals=new WeakMap,v.onResultsChanged(w=>{const D=this.terminalService.activeInstance;if(!("started"in w)||!D||!this.viewsService.getActiveViewWithId(r.TERMINAL_VIEW_ID))return;const T=this.outputTerminals.get(D);T&&T.ended&&this.showResultsInTerminal(D,T,w.started)})}async open(o,g){const h=this.terminalService.instances.map(D=>{const y=this.outputTerminals.get(D);return y?[D,y]:void 0}).filter(k.isDefined),v=h.find(([,D])=>D.resultId===o?.id);if(v){this.terminalService.setActiveInstance(v[0]),v[0].target===b.TerminalLocation.Editor?this.terminalEditorService.revealActiveEditor():this.terminalGroupService.showPanel(),this.revealMarker(v[0],g);return}const m=h.find(([,D])=>D.ended);if(m){m[1].clear(),this.showResultsInTerminal(m[0],m[1],o);return}const w=new n;this.showResultsInTerminal(await this.terminalService.createTerminal({config:{isFeatureTerminal:!0,icon:u.testingViewIcon,customPtyImplementation:()=>w,name:l(o)}}),w,o,g)}async showResultsInTerminal(o,g,h,v){if(this.outputTerminals.set(o,g),g.resetFor(h?.id,l(h)),this.terminalService.setActiveInstance(o),o.target===b.TerminalLocation.Editor?this.terminalEditorService.revealActiveEditor():this.terminalGroupService.showPanel(),!h){g.ended=!0,setTimeout(()=>g.pushData((0,E.localize)(2,null)));return}const[m]=await Promise.all([h.getOutput(),g.started]);let w=!1;(0,A.listenStream)(m,{onData:D=>{w=!0,g.pushData(D.toString())},onError:D=>g.pushData(`\r \r ${D.stack||D.message}`),onEnd:()=>{w||g.pushData(`\x1B[2m${(0,E.localize)(3,null)}\x1B[0m`);const D=h.completedAt?new Date(h.completedAt):new Date,y=(0,E.localize)(4,null,D.toLocaleString());g.pushData(`\r \r \x1B[1m> ${y} <\x1B[0m\r \r `),g.ended=!0,this.revealMarker(o,v)}})}revealMarker(o,g){g!==void 0&&o.scrollToMark((0,f.getMarkId)(g,!0),(0,f.getMarkId)(g,!1),!0)}};d=we([F(0,C.ITerminalService),F(1,C.ITerminalGroupService),F(2,C.ITerminalEditorService),F(3,i.ITestResultService),F(4,S.IViewsService)],d),e.TestingOutputTerminalService=d;class n extends R.Disposable{constructor(){super(...arguments),this.onDidChangeProperty=p.Event.None,this.processDataEmitter=this._register(new p.Emitter),this.titleEmitter=this._register(new p.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 p.Emitter).event,this._onProcessReady=this._register(new p.Emitter),this.onProcessReady=this._onProcessReady.event,this.onProcessTitleChanged=this.titleEmitter.event,this.onProcessShellTypeChanged=this._register(new p.Emitter).event}pushData(o){this.processDataEmitter.fire(o)}clear(){this.processDataEmitter.fire("\x1Bc")}resetFor(o,g){this.ended=!1,this.resultId=o,this.titleEmitter.fire(g)}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(o){throw new Error(`refreshProperty is not suppported in TestOutputProcesses. property: ${o}`)}updateProperty(o,g){throw new Error(`updateProperty is not suppported in TestOutputProcesses. property: ${o}, value: ${g}`)}}}),define(ae[657],le([1,0,9]),function(J,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 p;(function(E){E[E.ResultMessage=0]="ResultMessage",E[E.ResultActualOutput=1]="ResultActualOutput",E[E.ResultExpectedOutput=2]="ResultExpectedOutput"})(p=e.TestUriType||(e.TestUriType={}));var R;(function(E){E.Results="results",E.Messages="message",E.Text="TestFailureMessage",E.ActualOutput="ActualOutput",E.ExpectedOutput="ExpectedOutput"})(R||(R={}));const A=E=>{const I=E.authority,[b,...S]=E.path.slice(1).split("/");if(S[0]==="message"){const C=Number(S[1]),r=Number(S[2]),u=S[3],i=E.query;if(I==="results")switch(u){case"TestFailureMessage":return{resultId:b,taskIndex:C,testExtId:i,messageIndex:r,type:0};case"ActualOutput":return{resultId:b,taskIndex:C,testExtId:i,messageIndex:r,type:1};case"ExpectedOutput":return{resultId:b,taskIndex:C,testExtId:i,messageIndex:r,type:2}}}};e.parseTestUri=A;const k=E=>{const I={scheme:e.TEST_DATA_SCHEME,authority:"results"},b=(S,...C)=>t.URI.from({...I,query:E.testExtId,path:["",S,"message",...C].join("/")});switch(E.type){case 1:return b(E.resultId,E.taskIndex,E.messageIndex,"ActualOutput");case 2:return b(E.resultId,E.taskIndex,E.messageIndex,"ExpectedOutput");case 0:return b(E.resultId,E.taskIndex,E.messageIndex,"TestFailureMessage");default:throw new Error("Invalid test uri")}};e.buildTestUri=k}),define(ae[2421],le([1,0,10,238,36,16,11,6,113,210,88,2,60,72,75,167,20,116,54,1924,84,15,31,8,7,37,5,12,57,87,655,313,653,346,654,229,896,537,347,657,271,456,247,291]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingDecorations=e.TestingDecorationService=void 0;const $=128;function q(ne,ce){const de=ne.listDiffEditors();for(const he of de)if(he.getOriginalEditor()===ce)return!0;return!1}let X=class extends C.Disposable{constructor(ce,de,he,pe,me,Se){super(),this.configurationService=de,this.testService=he,this.results=pe,this.instantiationService=me,this.modelService=Se,this.generation=0,this.changeEmitter=new E.Emitter,this.decorationCache=new r.ResourceMap,this.invalidatedMessages=new WeakSet,this.onDidChange=this.changeEmitter.event,ce.registerDecorationType("test-message-decoration",Z.decorationId,{},void 0),Se.onModelRemoved(ve=>this.decorationCache.delete(ve.uri));const Ie=this._register(new k.RunOnceScheduler(()=>this.invalidate(),100));this._register(this.testService.onWillProcessDiff(ve=>{for(const be of ve){if(be.op!==2)continue;const ge=this.decorationCache.get(be.uri);ge&&(ge.rangeUpdateVersionId=be.docv)}Ie.isScheduled()||Ie.schedule()})),this._register(E.Event.any(this.results.onResultsChanged,this.results.onTestChanged,this.testService.excluded.onTestExclusionsChanged,this.testService.showInlineOutput.onDidChange,E.Event.filter(de.onDidChangeConfiguration,ve=>ve.affectsConfiguration("testing.gutterEnabled")))(()=>{Ie.isScheduled()||Ie.schedule()}))}invalidateResultMessage(ce){this.invalidatedMessages.add(ce),this.invalidate()}syncDecorations(ce){const de=this.modelService.getModel(ce);if(!de)return new Map;const he=this.decorationCache.get(ce);return he&&he.generation===this.generation&&(he.rangeUpdateVersionId===void 0||he.rangeUpdateVersionId!==de.getVersionId())?he.map:this.applyDecorations(de)}getDecoratedRangeForTest(ce,de){const he=this.modelService.getModel(ce);if(!he)return;const pe=S.Iterable.find(this.syncDecorations(ce).values(),me=>me instanceof re&&me.isForTest(de));if(!!pe)return he.getDecorationRange(pe.id)||void 0}invalidate(){this.generation++,this.changeEmitter.fire()}applyDecorations(ce){const de=(0,M.getTestingConfiguration)(this.configurationService,"testing.gutterEnabled"),he=ce.uri.toString(),pe=this.decorationCache.get(ce.uri),me=pe?.rangeUpdateVersionId===ce.getVersionId(),Se=pe?.value??[];return ce.changeDecorations(ve=>{const be=[],ge=new P.TestDecorations;for(const Ae of this.testService.collection.all){if(!Ae.item.range||Ae.item.uri?.toString()!==he)continue;const Pe=this.results.getStateById(Ae.item.extId),fe=Ae.item.range.startLineNumber;ge.push({line:fe,id:"",test:Ae,resultItem:Pe?.[1]})}for(const[Ae,Pe]of ge.lines()){const fe=Pe.length>1;let ye=Se.find(ke=>ke instanceof re&&ke.exactlyContainsTests(Pe));ye&&me&&ce.getDecorationRange(ye.id)?.startLineNumber!==Ae&&(ye=void 0),ye?(ye.replaceOptions(Pe,de)&&ve.changeDecorationOptions(ye.id,ye.editorDecoration.options),be.push(ye)):be.push(fe?this.instantiationService.createInstance(oe,Pe,de,ce):this.instantiationService.createInstance(se,Pe[0].test,Pe[0].resultItem,ce,de))}const ue=this.results.results[0];if(this.testService.showInlineOutput.value&&ue instanceof H.LiveTestResult){for(const Pe of ue.tasks)for(const fe of Pe.otherMessages)if(!this.invalidatedMessages.has(fe)&&fe.location?.uri.toString()===he){const ye=Se.find(ke=>ke instanceof Z&&ke.testMessage===fe)||this.instantiationService.createInstance(Z,fe,void 0,ce);be.push(ye)}const Ae=new Map;for(const Pe of ue.tests)for(let fe=0;fe<Pe.tasks.length;fe++){const ye=Pe.tasks[fe];for(let ke=0;ke<ye.messages.length;ke++){const Ee=ye.messages[ke];if(this.invalidatedMessages.has(Ee)||Ee.location?.uri.toString()!==he)continue;const Te=Ee.location.range.startLineNumber;let _e;Ae.has(Te)?_e=Ae.get(Te):(_e=be.length,Ae.set(Te,_e));const Re=Se.find(Me=>Me instanceof Z&&Me.testMessage===Ee);if(Re){be[_e]=Re;continue}const Le=(0,z.buildTestUri)({type:1,messageIndex:ke,taskIndex:fe,resultId:ue.id,testExtId:Pe.item.extId});be.push(this.instantiationService.createInstance(Z,Ee,Le,ce))}}}const Ce=new Set;for(const Ae of be)Ae.id===""?Ae.id=ve.addDecoration(Ae.editorDecoration.range,Ae.editorDecoration.options):Ce.add(Ae.id);for(const Ae of Se)Ce.has(Ae.id)||ve.removeDecoration(Ae.id);const De=new Map(be.map(Ae=>[Ae.id,Ae]));return this.decorationCache.set(ce.uri,{generation:this.generation,rangeUpdateVersionId:pe?.rangeUpdateVersionId,value:be,map:De}),De})||new Map}};X=we([F(0,i.ICodeEditorService),F(1,g.IConfigurationService),F(2,U.ITestService),F(3,W.ITestResultService),F(4,m.IInstantiationService),F(5,s.IModelService)],X),e.TestingDecorationService=X;let G=class extends C.Disposable{static get(ce){return ce.getContribution("editor.contrib.testingDecorations")}constructor(ce,de,he,pe,me){super(),this.editor=ce,this.codeEditorService=de,this.testService=he,this.decorations=pe,this.uriIdentityService=me,this.expectedWidget=new C.MutableDisposable,this.actualWidget=new C.MutableDisposable,de.registerDecorationType("test-message-decoration",Z.decorationId,{},void 0,ce),this.attachModel(ce.getModel()?.uri),this._register(pe.onDidChange(()=>{this.currentUri&&pe.syncDecorations(this.currentUri)})),this._register(this.editor.onDidChangeModel(Ie=>this.attachModel(Ie.newModelUrl||void 0))),this._register(this.editor.onMouseDown(Ie=>{if(Ie.target.position&&this.currentUri){const ve=ce.getModel()?.getDecorationsInRange(c.Range.fromPositions(Ie.target.position))??[];for(const{id:be}of ve)if(pe.syncDecorations(this.currentUri).get(be)?.click(Ie)){Ie.event.stopPropagation();return}}})),this._register(this.editor.onDidChangeModelContent(Ie=>{const ve=ce.getModel();if(!this.currentUri||!ve)return;const be=pe.syncDecorations(this.currentUri);for(const ge of Ie.changes){const ue=ve.getLinesDecorations(ge.range.startLineNumber,ge.range.endLineNumber);for(const{id:Ce}of ue){const De=be.get(Ce);De instanceof Z&&pe.invalidateResultMessage(De.testMessage)}}}));const Se=()=>{this.editor.getContainerDomNode().style.setProperty("--testMessageDecorationFontFamily",ce.getOption(44)),this.editor.getContainerDomNode().style.setProperty("--testMessageDecorationFontSize",`${ce.getOption(47)}px`)};this._register(this.editor.onDidChangeConfiguration(Ie=>{Ie.hasChanged(44)&&Se()})),Se()}attachModel(ce){switch(ce&&(0,z.parseTestUri)(ce)?.type){case 2:this.expectedWidget.value=new ee(this.editor),this.actualWidget.clear();break;case 1:this.expectedWidget.clear(),this.actualWidget.value=new ie(this.editor);break;default:this.expectedWidget.clear(),this.actualWidget.clear()}q(this.codeEditorService,this.editor)&&(ce=void 0),this.currentUri=ce,ce&&(this.decorations.syncDecorations(ce),(async()=>{for await(const de of(0,U.testsInFile)(this.testService,this.uriIdentityService,ce,!1))if(this.currentUri!==ce)break})())}};G=we([F(1,i.ICodeEditorService),F(2,U.ITestService),F(3,P.ITestingDecorationsService),F(4,D.IUriIdentityService)],G),e.TestingDecorations=G;const Q=ne=>({startLineNumber:ne.startLineNumber,endLineNumber:ne.startLineNumber,startColumn:0,endColumn:1}),j=(ne,ce,de)=>{const he=ne[0]?.item.range;if(!he)throw new Error("Test decorations can only be created for tests with a range");if(!de)return{range:Q(he),options:{isWholeLine:!0,description:"run-test-decoration"}};let pe=0;const me=[];let Se,Ie=!1;for(let Ce=0;Ce<ne.length;Ce++){const De=ne[Ce],Ae=ce[Ce],Pe=Ae?.computedState??0;me.length<10&&me.push((0,O.labelForTestInState)(De.item.label,Pe)),pe=(0,V.maxPriority)(pe,Pe),Ie=Ie||!!Ae?.retired,!Se&&Ae?.tasks.some(fe=>fe.messages.length)&&(Se=De.item.extId)}const ve=ne.length>1||ne[0].children.size>0,be=pe===0?ve?_.testingRunAllIcon:_.testingRunIcon:_.testingStatesToIcons.get(pe);let ge,ue=w.ThemeIcon.asClassName(be)+" testing-run-glyph";return Ie&&(ue+=" retired"),{range:Q(he),options:{description:"run-test-decoration",isWholeLine:!0,get hoverMessage(){if(!ge){const Ce=ge=new I.MarkdownString("",!0).appendText(me.join(", ")+".");if(Se){const De=encodeURIComponent(JSON.stringify([Se]));Ce.appendMarkdown(`[${(0,d.localize)(0,null)}](command:vscode.peekTestError?${De})`)}}return ge},glyphMarginClassName:ue,stickiness:1}}};var K;(function(ne){ne.FontFamily="testingDiffLensFontFamily",ne.FontFeatures="testingDiffLensFontFeatures"})(K||(K={}));class Y{constructor(ce){this.editor=ce,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._domNode=t.$("span"),queueMicrotask(()=>{this.applyStyling(),this.editor.addContentWidget(this)})}applyStyling(){let ce=this.editor.getOption(16),de;!ce||ce<5?(ce=this.editor.getOption(47)*.9|0,de=this.editor.getOption(60)):de=ce*Math.max(1.3,this.editor.getOption(60)/this.editor.getOption(47))|0;const he=this.editor.getOption(45),pe=this._domNode;pe.classList.add("testing-diff-lens-widget"),pe.textContent=this.getText(),pe.style.lineHeight=`${de}px`,pe.style.fontSize=`${ce}px`,pe.style.fontFamily="var(--testingDiffLensFontFamily)",pe.style.fontFeatureSettings="var(--testingDiffLensFontFeatures)";const me=this.editor.getContainerDomNode().style;me.setProperty("testingDiffLensFontFamily",this.editor.getOption(15)??"inherit"),me.setProperty("testingDiffLensFontFeatures",he.fontFeatureSettings),this.editor.changeViewZones(Se=>{this.viewZoneId&&Se.removeZone(this.viewZoneId),this.viewZoneId=Se.addZone({afterLineNumber:0,afterColumn:1073741824,domNode:document.createElement("div"),heightInPx:20})})}getDomNode(){return this._domNode}dispose(){this.editor.changeViewZones(ce=>{this.viewZoneId&&ce.removeZone(this.viewZoneId)}),this.editor.removeContentWidget(this)}getPosition(){return{position:{column:0,lineNumber:0},preference:[1]}}}class ee extends Y{getId(){return"expectedTestingLens"}getText(){return(0,d.localize)(1,null)}}class ie extends Y{getId(){return"actualTestingLens"}getText(){return(0,d.localize)(2,null)}}let re=class{get line(){return this.editorDecoration.range.startLineNumber}constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue){this.tests=ce,this.visible=de,this.model=he,this.codeEditorService=pe,this.testService=me,this.contextMenuService=Se,this.commandService=Ie,this.configurationService=ve,this.testProfileService=be,this.contextKeyService=ge,this.menuService=ue,this.id="",this.editorDecoration=j(ce.map(Ce=>Ce.test),ce.map(Ce=>Ce.resultItem),de),this.editorDecoration.options.glyphMarginHoverMessage=new I.MarkdownString().appendText(this.getGutterLabel())}click(ce){if(ce.target.type!==2)return!1;if(ce.event.rightButton)return this.showContextMenu(ce),!0;switch((0,M.getTestingConfiguration)(this.configurationService,"testing.defaultGutterClickAction")){case"contextMenu":this.showContextMenu(ce);break;case"debug":this.defaultDebug();break;case"run":default:this.defaultRun();break}return!0}exactlyContainsTests(ce){if(ce.length!==this.tests.length)return!1;if(ce.length===1)return ce[0].test.item.extId===this.tests[0].test.item.extId;const de=new Set;for(const he of this.tests)de.add(he.test.item.extId);for(const he of ce)if(!de.delete(he.test.item.extId))return!1;return!0}replaceOptions(ce,de){return de===this.visible&&(0,A.equals)(this.tests.map(he=>he.test.item.extId),ce.map(he=>he.test.item.extId))&&this.tests.map(he=>he.resultItem?.computedState)===ce.map(he=>he.resultItem?.computedState)?!1:(this.tests=ce,this.visible=de,this.editorDecoration.options=j(ce.map(he=>he.test),ce.map(he=>he.resultItem),de).options,!0)}isForTest(ce){return this.tests.some(de=>de.test.item.extId===ce)}defaultRun(){return this.testService.runTests({tests:this.tests.map(({test:ce})=>ce),group:2})}defaultDebug(){return this.testService.runTests({tests:this.tests.map(({test:ce})=>ce),group:4})}showContextMenu(ce){let de=this.getContextMenuActions();const he=this.codeEditorService.listCodeEditors().find(pe=>pe.getModel()===this.model);if(he){const pe=he.getContribution(y.BREAKPOINT_EDITOR_CONTRIBUTION_ID);pe&&(de={dispose:de.dispose,object:R.Separator.join(de.object,pe.getContextMenuActionsAtPosition(this.line,this.model))})}this.contextMenuService.showContextMenu({getAnchor:()=>({x:ce.event.posx,y:ce.event.posy}),getActions:()=>de.object,onHide:()=>de.dispose})}getGutterLabel(){switch((0,M.getTestingConfiguration)(this.configurationService,"testing.defaultGutterClickAction")){case"contextMenu":return(0,d.localize)(3,null);case"debug":return(0,d.localize)(4,null);case"run":default:return(0,d.localize)(5,null)}}getTestContextMenuActions(ce,de){const he=[],pe=this.testProfileService.capabilitiesForTest(ce);pe&2&&he.push(new R.Action("testing.gutter.run",(0,d.localize)(6,null),void 0,void 0,()=>this.testService.runTests({group:2,tests:[ce]}))),pe&4&&he.push(new R.Action("testing.gutter.debug",(0,d.localize)(7,null),void 0,void 0,()=>this.testService.runTests({group:4,tests:[ce]}))),pe&16&&he.push(new R.Action("testing.runUsing",(0,d.localize)(8,null),void 0,void 0,async()=>{const Se=await this.commandService.executeCommand("vscode.pickTestProfile",{onlyForTest:ce});!Se||this.testService.runResolvedTests({targets:[{profileGroup:Se.group,profileId:Se.profileId,controllerId:Se.controllerId,testIds:[ce.item.extId]}]})})),de&&(0,V.isFailedState)(de.computedState)&&he.push(new R.Action("testing.gutter.peekFailure",(0,d.localize)(9,null),void 0,void 0,()=>this.commandService.executeCommand("vscode.peekTestError",ce.item.extId))),he.push(new R.Action("testing.gutter.reveal",(0,d.localize)(10,null),void 0,void 0,()=>this.commandService.executeCommand("_revealTestInExplorer",ce.item.extId)));const me=this.getContributedTestActions(ce,pe);return{object:R.Separator.join(he,me),dispose(){}}}getContributedTestActions(ce,de){const he=this.contextKeyService.createOverlay((0,T.getTestItemContextOverlay)(ce,de)),pe=this.menuService.createMenu(a.MenuId.TestItemGutter,he);try{const me=[],Se=(0,U.getContextForTestItem)(this.testService.collection,ce.item.extId);return(0,n.createAndFillInContextMenuActions)(pe,{shouldForwardArgs:!0,arg:Se},me),me}finally{pe.dispose()}}};re=we([F(3,i.ICodeEditorService),F(4,U.ITestService),F(5,v.IContextMenuService),F(6,o.ICommandService),F(7,g.IConfigurationService),F(8,x.ITestProfileService),F(9,h.IContextKeyService),F(10,a.IMenuService)],re);class oe extends re{get testIds(){return this.tests.map(ce=>ce.test.item.extId)}get displayedStates(){return this.tests.map(ce=>ce.resultItem?.computedState)}getContextMenuActions(){const ce=[];this.tests.some(({test:ve})=>this.testProfileService.capabilitiesForTest(ve)&2)&&ce.push(new R.Action("testing.gutter.runAll",(0,d.localize)(11,null),void 0,void 0,()=>this.defaultRun())),this.tests.some(({test:ve})=>this.testProfileService.capabilitiesForTest(ve)&4)&&ce.push(new R.Action("testing.gutter.debugAll",(0,d.localize)(12,null),void 0,void 0,()=>this.defaultDebug()));const de=this.tests.map(ve=>({currentLabel:ve.test.item.label,testItem:ve,parent:N.TestId.fromString(ve.test.item.extId).parentId})),he=ve=>{const be=new Map;for(const ge of ve)be.set(ge.currentLabel,(be.get(ge.currentLabel)||0)+1);return ve.filter(ge=>be.get(ge.currentLabel)>1)};let pe,me=!0;for(;(pe=he(de)).length&&me;)for(const ve of pe)if(ve.parent){const be=this.testService.collection.getNodeById(ve.parent.toString());ve.currentLabel=be?.item.label+" > "+ve.currentLabel,ve.parent=ve.parent.parentId}else me=!1;const Se=new C.DisposableStore,Ie=de.map(({currentLabel:ve,testItem:be})=>{const ge=this.getTestContextMenuActions(be.test,be.resultItem);return Se.add(ge),new R.SubmenuAction(be.test.item.extId,(0,b.stripIcons)(ve),ge.object)});return{object:R.Separator.join(ce,Ie),dispose:()=>Se.dispose()}}}let se=class extends re{constructor(ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce){super([{test:ce,resultItem:de}],pe,he,me,Se,ve,Ie,be,ge,ue,Ce)}getContextMenuActions(){return this.getTestContextMenuActions(this.tests[0].test,this.tests[0].resultItem)}};se=we([F(4,i.ICodeEditorService),F(5,U.ITestService),F(6,o.ICommandService),F(7,v.IContextMenuService),F(8,g.IConfigurationService),F(9,x.ITestProfileService),F(10,h.IContextKeyService),F(11,a.IMenuService)],se);const te=/\r?\n\s*/g;let Z=class Pa{constructor(ce,de,he,pe,me){this.testMessage=ce,this.messageUri=de,this.peekOpener=pe,this.id="",this.contentIdClass=`test-message-inline-content-id${(0,u.generateUuid)()}`,this.location=ce.location,this.line=this.location.range.startLineNumber;const Se=ce.type,Ie=ce.message,ve=me.resolveDecorationOptions(Pa.decorationId,!0);ve.hoverMessage=typeof Ie=="string"?new I.MarkdownString().appendText(Ie):Ie,ve.zIndex=10,ve.className=`testing-inline-message-severity-${Se}`,ve.isWholeLine=!0,ve.stickiness=1,ve.collapseOnReplaceEdit=!0;let be=(0,p.renderStringAsPlaintext)(Ie).replace(te," ");be.length>$&&(be=be.slice(0,$-1)+"\u2026"),ve.after={content:" ".repeat(4)+be,inlineClassName:`test-message-inline-content test-message-inline-content-s${Se} ${this.contentIdClass} ${de?"test-message-inline-content-clickable":""}`},ve.showIfCollapsed=!0;const ge=Se===0?f.overviewRulerError:f.overviewRulerInfo;ge&&(ve.overviewRuler={color:(0,w.themeColorFromId)(ge),position:l.OverviewRulerLane.Right});const ue=he.getLineLength(this.location.range.startLineNumber),Ce=ue?ue+1:this.location.range.endColumn;this.editorDecoration={options:ve,range:{startLineNumber:this.location.range.startLineNumber,startColumn:Ce,endColumn:Ce,endLineNumber:this.location.range.startLineNumber}}}click(ce){return ce.event.rightButton||!this.messageUri||ce.target.element?.className.includes(this.contentIdClass)&&this.peekOpener.peekUri(this.messageUri),!1}};Z.inlineClassName="test-message-inline-content",Z.decorationId=`testmessage-${(0,u.generateUuid)()}`,Z=we([F(3,B.ITestingPeekOpener),F(4,i.ICodeEditorService)],Z),(0,w.registerThemingParticipant)((ne,ce)=>{const de=ne.getColor(f.editorCodeLensForeground);de&&ce.addRule(`.testing-diff-lens-widget { color: ${de}; }`);for(const[he,{decorationForeground:pe}]of Object.entries(L.testMessageSeverityColors))ce.addRule(`.test-message-inline-content-s${he} { color: ${ne.getColor(pe)} !important }`)})}),define(ae[2422],le([1,0,54,42,62,657,247,28]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingContentProvider=void 0;let I=class{constructor(S,C,r,u){this.languageService=C,this.modelService=r,this.resultService=u,S.registerTextModelContentProvider(A.TEST_DATA_SCHEME,this)}async provideTextContent(S){const C=this.modelService.getModel(S);if(C&&!C.isDisposed())return C;const r=(0,A.parseTestUri)(S);if(!r)return null;const u=this.resultService.getResult(r.resultId),i=u?.getStateById(r.testExtId);if(!i)return null;let f,c=null;switch(r.type){case 1:{const l=i.tasks[r.taskIndex].messages[r.messageIndex];l?.type===0&&(f=l.actual);break}case 2:{const l=i.tasks[r.taskIndex].messages[r.messageIndex];l?.type===0&&(f=l.expected);break}case 0:{const l=i.tasks[r.taskIndex].messages[r.messageIndex];if(!l)break;if(l.type===1){const s=await u.getOutputRange(l.offset,l.length);f=(0,E.removeAnsiEscapeCodes)(s.toString())}else typeof l.message=="string"?f=l.message:(f=l.message.value,c=this.languageService.createById("markdown"))}}return f===void 0?null:this.modelService.createModel(f,c,S,!1)}};I=we([F(0,R.ITextModelService),F(1,p.ILanguageService),F(2,t.IModelService),F(3,k.ITestResultService)],I),e.TestingContentProvider=I}),define(ae[457],le([1,0,115,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITimelineService=e.TimelinePaneId=e.toKey=void 0;function R(k,E){return`${typeof k=="string"?k:t.ExtensionIdentifier.toKey(k)}|${E}`}e.toKey=R,e.TimelinePaneId="timeline";const A="timeline";e.ITimelineService=(0,p.createDecorator)(A)}),define(ae[2423],le([1,0,6,25,457,45,8,7]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineService=e.TimelineHasProviderContext=void 0,e.TimelineHasProviderContext=new E.RawContextKey("timelineHasProvider",!1);let I=class{constructor(S,C,r,u){this.logService=S,this.viewsService=C,this.configurationService=r,this.contextKeyService=u,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(S=>({id:S.id,label:S.label}))}getTimeline(S,C,r,u){this.logService.trace(`TimelineService#getTimeline(${S}): uri=${C.toString()}`);const i=this.providers.get(S);if(i!==void 0){if(typeof i.scheme=="string"){if(i.scheme!=="*"&&i.scheme!==C.scheme)return}else if(!i.scheme.includes(C.scheme))return;return{result:i.provideTimeline(C,r,u.token).then(f=>{if(f!==void 0)return f.items=f.items.map(c=>({...c,source:i.id})),f.items.sort((c,l)=>l.timestamp-c.timestamp||l.source.localeCompare(c.source,void 0,{numeric:!0,sensitivity:"base"})),f}),options:r,source:i.id,tokenSource:u,uri:C}}}registerTimelineProvider(S){this.logService.trace(`TimelineService#registerTimelineProvider: id=${S.id}`);const C=S.id,r=this.providers.get(C);if(r)try{r?.dispose()}catch{}return this.providers.set(C,S),this.updateHasProviderContext(),S.onDidChange&&this.providerSubscriptions.set(C,S.onDidChange(u=>this._onDidChangeTimeline.fire(u))),this._onDidChangeProviders.fire({added:[C]}),{dispose:()=>{this.providers.delete(C),this._onDidChangeProviders.fire({removed:[C]})}}}unregisterTimelineProvider(S){this.logService.trace(`TimelineService#unregisterTimelineProvider: id=${S}`),this.providers.has(S)&&(this.providers.delete(S),this.providerSubscriptions.delete(S),this.updateHasProviderContext(),this._onDidChangeProviders.fire({removed:[S]}))}setUri(S){this.viewsService.openView(R.TimelinePaneId,!0),this._onDidChangeUri.fire(S)}updateHasProviderContext(){this.hasProviderContext.set(this.providers.size!==0)}};I=we([F(0,p.ILogService),F(1,A.IViewsService),F(2,k.IConfigurationService),F(3,E.IContextKeyService)],I),e.TimelineService=I}),define(ae[658],le([1,0,20,32,493,9,50,16,21,2,31,13,54,62]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyModel=e.TypeHierarchyProviderRegistry=e.TypeHierarchyDirection=void 0;var i;(function(s){s.Subtypes="subtypes",s.Supertypes="supertypes"})(i=e.TypeHierarchyDirection||(e.TypeHierarchyDirection={})),e.TypeHierarchyProviderRegistry=new R.LanguageFeatureRegistry;class f{static async create(d,n,a){const[o]=e.TypeHierarchyProviderRegistry.ordered(d);if(!o)return;const g=await o.prepareTypeHierarchy(d,n,a);if(!!g)return new f(g.roots.reduce((h,v)=>h+v._sessionId,""),o,g.roots,new b.RefCountedDisposable(g))}constructor(d,n,a,o){this.id=d,this.provider=n,this.roots=a,this.ref=o,this.root=a[0]}dispose(){this.ref.release()}fork(d){const n=this;return new class extends f{constructor(){super(n.id,n.provider,[d],n.ref.acquire())}}}async provideSupertypes(d,n){try{const a=await this.provider.provideSupertypes(d,n);if((0,E.isNonEmptyArray)(a))return a}catch(a){(0,I.onUnexpectedExternalError)(a)}return[]}async provideSubtypes(d,n){try{const a=await this.provider.provideSubtypes(d,n);if((0,E.isNonEmptyArray)(a))return a}catch(a){(0,I.onUnexpectedExternalError)(a)}return[]}}e.TypeHierarchyModel=f;const c=new Map;S.CommandsRegistry.registerCommand("_executePrepareTypeHierarchy",async(s,...d)=>{const[n,a]=d;(0,C.assertType)(A.URI.isUri(n)),(0,C.assertType)(k.Position.isIPosition(a));let g=s.get(r.IModelService).getModel(n),h;if(!g){const m=await s.get(u.ITextModelService).createModelReference(n);g=m.object.textEditorModel,h=m}try{const v=await f.create(g,a,p.CancellationToken.None);return v?(c.set(v.id,v),c.forEach((m,w,D)=>{D.size>10&&(m.dispose(),c.delete(w))}),[v.root]):[]}finally{h?.dispose()}});function l(s){const d=s;return typeof s=="object"&&typeof d.name=="string"&&typeof d.kind=="number"&&A.URI.isUri(d.uri)&&t.Range.isIRange(d.range)&&t.Range.isIRange(d.selectionRange)}S.CommandsRegistry.registerCommand("_executeProvideSupertypes",async(s,...d)=>{const[n]=d;(0,C.assertType)(l(n));const a=c.get(n._sessionId);if(!!a)return a.provideSupertypes(n,p.CancellationToken.None)}),S.CommandsRegistry.registerCommand("_executeProvideSubtypes",async(s,...d)=>{const[n]=d;(0,C.assertType)(l(n));const a=c.get(n._sessionId);if(!!a)return a.provideSubtypes(n,p.CancellationToken.None)})}),define(ae[2424],le([1,0,658,32,96,239,92,28,20,1942,29]),function(J,e,t,p,R,A,k,E,I,b,S){"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(n,a,o){this.item=n,this.model=a,this.parent=o}static compare(n,a){let o=(0,E.compare)(n.item.uri.toString(),a.item.uri.toString());return o===0&&(o=I.Range.compareRangesUsingStarts(n.item.range,a.item.range)),o}}e.Type=C;class r{constructor(n){this.getDirection=n}hasChildren(){return!0}async getChildren(n){if(n instanceof t.TypeHierarchyModel)return n.roots.map(g=>new C(g,n,void 0));const{model:a,item:o}=n;return this.getDirection()==="supertypes"?(await a.provideSupertypes(o,p.CancellationToken.None)).map(g=>new C(g,a,n)):(await a.provideSubtypes(o,p.CancellationToken.None)).map(g=>new C(g,a,n))}}e.DataSource=r;class u{compare(n,a){return C.compare(n,a)}}e.Sorter=u;class i{constructor(n){this.getDirection=n}getId(n){let a=this.getDirection()+JSON.stringify(n.item.uri)+JSON.stringify(n.item.range);return n.parent&&(a+=this.getId(n.parent)),a}}e.IdentityProvider=i;class f{constructor(n,a){this.icon=n,this.label=a}}class c{constructor(){this.templateId=c.id}renderTemplate(n){n.classList.add("typehierarchy-element");const a=document.createElement("div");n.appendChild(a);const o=new A.IconLabel(n,{supportHighlights:!0});return new f(a,o)}renderElement(n,a,o){const{element:g,filterData:h}=n,v=g.item.tags?.includes(1);o.icon.classList.add("inline",...S.CSSIcon.asClassNameArray(k.SymbolKinds.toIcon(g.item.kind))),o.label.setLabel(g.item.name,g.item.detail,{labelEscapeNewLines:!0,matches:(0,R.createMatches)(h),strikethrough:v})}disposeTemplate(n){n.label.dispose()}}e.TypeRenderer=c,c.id="TypeRenderer";class l{getHeight(n){return 22}getTemplateId(n){return c.id}}e.VirtualDelegate=l;class s{constructor(n){this.getDirection=n}getWidgetAriaLabel(){return(0,b.localize)(0,null)}getAriaLabel(n){return this.getDirection()==="supertypes"?(0,b.localize)(1,null,n.item.name):(0,b.localize)(2,null,n.item.name)}}e.AccessibilityProvider=s}),define(ae[900],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowCurrentReleaseNotesActionId=void 0,e.ShowCurrentReleaseNotesActionId="update.showCurrentReleaseNotes"}),define(ae[901],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testUrlMatchesGlob=void 0;const t=(R,A)=>{let k=R.with({query:null,fragment:null}).toString(!0);const E=S=>S.replace(/\/+$/,"");A=E(A),k=E(k);const I=Array.from({length:k.length+1}).map(()=>Array.from({length:A.length+1}).map(()=>{}));if(/^[^./:]*:\/\//.test(A))return p(I,k,A,0,0);const b=/^(https?):\/\//.exec(k)?.[1];return b?p(I,k,`${b}://${A}`,0,0):!1};e.testUrlMatchesGlob=t;const p=(R,A,k,E,I)=>{if(R[E]?.[I]!==void 0)return R[E][I];const b=[];if(E===A.length)return I===k.length;if(I===k.length)return A.slice(E)[0]==="/";if(A[E]===k[I]&&b.push(p(R,A,k,E+1,I+1)),k[I]+k[I+1]==="*."&&(["/",":"].includes(A[E])||b.push(p(R,A,k,E+1,I)),b.push(p(R,A,k,E,I+2))),k[I]==="*"&&(E+1===A.length?b.push(p(R,A,k,E+1,I+1)):b.push(p(R,A,k,E+1,I)),b.push(p(R,A,k,E,I+1))),k[I]+k[I+1]===":*")if(A[E]===":"){let S=E+1;do S++;while(/[0-9]/.test(A[S]));b.push(p(R,A,k,S,I+2))}else b.push(p(R,A,k,E,I+2));return R[E][I]=b.some(S=>S===!0)}}),define(ae[2425],le([1,0,164,22,53,9,19,2229]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadLocalResource=e.WebviewResourceResponse=void 0;var I;(function(u){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=u.Type||(u.Type={}));class f{constructor(s,d,n,a){this.stream=s,this.etag=d,this.mtime=n,this.mimeType=a,this.type=i.Success}}u.StreamSuccess=f,u.Failed={type:i.Failed},u.AccessDenied={type:i.AccessDenied};class c{constructor(s,d){this.mimeType=s,this.mtime=d,this.type=i.NotModified}}u.NotModified=c})(I=e.WebviewResourceResponse||(e.WebviewResourceResponse={}));async function b(u,i,f,c,l){c.debug(`loadLocalResource - begin. requestUri=${u}`);const s=S(u,i.roots);if(c.debug(`loadLocalResource - found resource to load. requestUri=${u}, resourceToLoad=${s}`),!s)return I.AccessDenied;const d=(0,E.getWebviewContentMimeType)(u);try{const n=await f.readFileStream(s,{etag:i.ifNoneMatch},l);return new I.StreamSuccess(n.value,n.etag,n.mtime,d)}catch(n){return n instanceof k.FileOperationError&&n.fileOperationResult===2?new I.NotModified(d,n.options?.mtime):(c.debug(`loadLocalResource - Error using fileReader. requestUri=${u}`),console.log(n),I.Failed)}}e.loadLocalResource=b;function S(u,i){for(const f of i)if(C(f,u))return r(u)}function C(u,i){if(u.scheme!==i.scheme)return!1;let f=(0,R.normalize)(i.fsPath),c=(0,R.normalize)(u.fsPath+(u.fsPath.endsWith(R.sep)?"":R.sep));return(0,t.isUNC)(u.fsPath)&&(0,t.isUNC)(i.fsPath)&&(c=c.toLowerCase(),f=f.toLowerCase()),f.startsWith(c)}function r(u){return u.scheme===p.Schemas.vscodeRemote?A.URI.from({scheme:p.Schemas.vscodeRemote,authority:u.authority,path:"/vscode-resource",query:JSON.stringify({requestResourcePath:u.path})}):u}}),define(ae[202],le([1,0,16,18,72,7,5,23,187]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionKeyedWebviewOriginStore=e.WebviewOriginStore=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 A.RawContextKey("webviewFindWidgetVisible",!1),e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED=new A.RawContextKey("webviewFindWidgetFocused",!1),e.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED=new A.RawContextKey("webviewFindWidgetEnabled",!1),e.IWebviewService=(0,k.createDecorator)("webviewService");var b;(function(i){i.NotebookRenderer="notebookRenderer",i.CustomEditor="customEditor",i.WebviewView="webviewView"})(b=e.WebviewContentPurpose||(e.WebviewContentPurpose={}));function S(i,f){return i.allowMultipleAPIAcquire===f.allowMultipleAPIAcquire&&i.allowScripts===f.allowScripts&&i.allowForms===f.allowForms&&(0,t.equals)(i.localResourceRoots,f.localResourceRoots,p.isEqual)&&(0,t.equals)(i.portMapping,f.portMapping,(c,l)=>c.extensionHostPort===l.extensionHostPort&&c.webviewPort===l.webviewPort)&&C(i,f)}e.areWebviewContentOptionsEqual=S;function C(i,f){return i.enableCommandUris===f.enableCommandUris?!0:Array.isArray(i.enableCommandUris)&&Array.isArray(f.enableCommandUris)?(0,t.equals)(i.enableCommandUris,f.enableCommandUris):!1}let r=class{constructor(f,c){this.memento=new I.Memento(f,c),this.state=this.memento.getMemento(-1,1)}getOrigin(f,c){const l=this.getKey(f,c),s=this.state[l];if(s&&typeof s=="string")return s;const d=(0,R.generateUuid)();return this.state[l]=d,this.memento.saveMemento(),d}getKey(f,c){return JSON.stringify({viewType:f,key:c})}};r=we([F(1,E.IStorageService)],r),e.WebviewOriginStore=r;let u=class{constructor(f,c){this.store=new r(f,c)}getOrigin(f,c){return this.store.getOrigin(f,c.value)}};u=we([F(1,E.IStorageService)],u),e.ExtensionKeyedWebviewOriginStore=u}),define(ae[2426],le([1,0,121,6,2,72,7,198,202]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayWebview=void 0;let b=class extends R.Disposable{constructor(r,u,i,f){super(),this._layoutService=u,this._webviewService=i,this._baseContextKeyService=f,this._onDidWheel=this._register(new p.Emitter),this.onDidWheel=this._onDidWheel.event,this._isFirstLoad=!0,this._firstLoadPendingMessages=new Set,this._webview=this._register(new R.MutableDisposable),this._webviewEvents=this._register(new R.DisposableStore),this._html="",this._initialScrollProgress=0,this._state=void 0,this._owner=void 0,this._scopedContextKeyService=this._register(new R.MutableDisposable),this._shouldShowFindWidgetOnRestore=!1,this._isDisposed=!1,this._onDidDispose=this._register(new p.Emitter),this.onDidDispose=this._onDidDispose.event,this._onDidFocus=this._register(new p.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new p.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidClickLink=this._register(new p.Emitter),this.onDidClickLink=this._onDidClickLink.event,this._onDidReload=this._register(new p.Emitter),this.onDidReload=this._onDidReload.event,this._onDidScroll=this._register(new p.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidUpdateState=this._register(new p.Emitter),this.onDidUpdateState=this._onDidUpdateState.event,this._onMessage=this._register(new p.Emitter),this.onMessage=this._onMessage.event,this._onMissingCsp=this._register(new p.Emitter),this.onMissingCsp=this._onMissingCsp.event,this.id=r.id,this.providedViewType=r.providedViewType,this.origin=r.origin??(0,A.generateUuid)(),this._extension=r.extension,this._options=r.options,this._contentOptions=r.contentOptions}get isFocused(){return!!this._webview.value?.isFocused}dispose(){this._isDisposed=!0,this._container?.domNode.remove(),this._container=void 0;for(const r of this._firstLoadPendingMessages)r.resolve(!1);this._firstLoadPendingMessages.clear(),this._onDidDispose.fire(),super.dispose()}get container(){if(this._isDisposed)throw new Error("DynamicWebviewEditorOverlay has been disposed");if(!this._container){const r=document.createElement("div");r.id=`webview-${this.id}`,r.style.position="absolute",r.style.overflow="hidden",this._container=new t.FastDomNode(r),this._container.setVisibility("hidden"),this._layoutService.container.appendChild(r)}return this._container.domNode}claim(r,u){const i=this._owner;if(this._owner=r,this.show(),i!==r){const f=u||this._baseContextKeyService;this._scopedContextKeyService.clear(),this._scopedContextKeyService.value=f.createScoped(this.container);const c=this._findWidgetVisible?.get();this._findWidgetVisible?.reset(),this._findWidgetVisible=I.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE.bindTo(f),this._findWidgetVisible.set(!!c),this._findWidgetEnabled?.reset(),this._findWidgetEnabled=I.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED.bindTo(f),this._findWidgetEnabled.set(!!this.options.enableFindWidget),this._webview.value?.setContextKeyService(this._scopedContextKeyService.value)}}release(r){this._owner===r&&(this._scopedContextKeyService.clear(),this._owner=void 0,this._container&&this._container.setVisibility("hidden"),this._options.retainContextWhenHidden?(this._shouldShowFindWidgetOnRestore=!!this._findWidgetVisible?.get(),this.hideFind(!1)):(this._webview.clear(),this._webviewEvents.clear()))}layoutWebviewOverElement(r,u,i){if(!this._container||!this._container.domNode.parentElement)return;const f=r.getBoundingClientRect(),c=this._container.domNode.parentElement.getBoundingClientRect(),l=(c.height-this._container.domNode.parentElement.clientHeight)/2,s=(c.width-this._container.domNode.parentElement.clientWidth)/2;if(this._container.setTop(f.top-c.top-l),this._container.setLeft(f.left-c.left-s),this._container.setWidth(u?u.width:f.width),this._container.setHeight(u?u.height:f.height),i){const{top:d,left:n,right:a,bottom:o}=S(f,i);this._container.domNode.style.clipPath=`polygon(${n}px ${d}px, ${a}px ${d}px, ${a}px ${o}px, ${n}px ${o}px)`}}show(){if(this._isDisposed)throw new Error("Webview overlay is disposed");if(!this._webview.value){const r=this._webviewService.createWebviewElement({id:this.id,providedViewType:this.providedViewType,origin:this.origin,options:this._options,contentOptions:this._contentOptions,extension:this.extension});this._webview.value=r,r.state=this._state,this._scopedContextKeyService.value&&this._webview.value.setContextKeyService(this._scopedContextKeyService.value),this._html&&(r.html=this._html),this._options.tryRestoreScrollPosition&&(r.initialScrollProgress=this._initialScrollProgress),this._findWidgetEnabled?.set(!!this.options.enableFindWidget),r.mountTo(this.container),this._webviewEvents.clear(),this._webviewEvents.add(r.onDidFocus(()=>{this._onDidFocus.fire()})),this._webviewEvents.add(r.onDidBlur(()=>{this._onDidBlur.fire()})),this._webviewEvents.add(r.onDidClickLink(u=>{this._onDidClickLink.fire(u)})),this._webviewEvents.add(r.onMessage(u=>{this._onMessage.fire(u)})),this._webviewEvents.add(r.onMissingCsp(u=>{this._onMissingCsp.fire(u)})),this._webviewEvents.add(r.onDidWheel(u=>{this._onDidWheel.fire(u)})),this._webviewEvents.add(r.onDidReload(()=>{this._onDidReload.fire()})),this._webviewEvents.add(r.onDidScroll(u=>{this._initialScrollProgress=u.scrollYPercentage,this._onDidScroll.fire(u)})),this._webviewEvents.add(r.onDidUpdateState(u=>{this._state=u,this._onDidUpdateState.fire(u)})),this._isFirstLoad&&this._firstLoadPendingMessages.forEach(async u=>{u.resolve(await r.postMessage(u.message,u.transfer))}),this._isFirstLoad=!1,this._firstLoadPendingMessages.clear()}this.options.retainContextWhenHidden&&this._shouldShowFindWidgetOnRestore&&(this.showFind(!1),this._shouldShowFindWidgetOnRestore=!1),this._container?.setVisibility("visible")}get html(){return this._html}set html(r){this._html=r,this.withWebview(u=>u.html=r)}get initialScrollProgress(){return this._initialScrollProgress}set initialScrollProgress(r){this._initialScrollProgress=r,this.withWebview(u=>u.initialScrollProgress=r)}get state(){return this._state}set state(r){this._state=r,this.withWebview(u=>u.state=r)}get extension(){return this._extension}set extension(r){this._extension=r,this.withWebview(u=>u.extension=r)}get options(){return this._options}set options(r){this._options={customClasses:this._options.customClasses,...r}}get contentOptions(){return this._contentOptions}set contentOptions(r){this._contentOptions=r,this.withWebview(u=>u.contentOptions=r)}set localResourcesRoot(r){this.withWebview(u=>u.localResourcesRoot=r)}async postMessage(r,u){if(this._webview.value)return this._webview.value.postMessage(r,u);if(this._isFirstLoad){let i;const f=new Promise(c=>i=c);return this._firstLoadPendingMessages.add({message:r,transfer:u,resolve:i}),f}return!1}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(r=!0){this._webview.value&&(this._webview.value.showFind(r),this._findWidgetVisible?.set(!0))}hideFind(r=!0){this._findWidgetVisible?.reset(),this._webview.value?.hideFind(r)}runFindAction(r){this._webview.value?.runFindAction(r)}withWebview(r){this._webview.value&&r(this._webview.value)}windowDidDragStart(){this._webview.value?.windowDidDragStart()}windowDidDragEnd(){this._webview.value?.windowDidDragEnd()}setContextKeyService(r){this._webview.value?.setContextKeyService(r)}};b=we([F(1,E.ILayoutService),F(2,I.IWebviewService),F(3,k.IContextKeyService)],b),e.OverlayWebview=b;function S(C,r){const u=r.getBoundingClientRect(),i=Math.max(u.top-C.top,0),f=Math.max(C.width-(C.right-u.right),0),c=Math.max(C.height-(C.bottom-u.bottom),0),l=Math.max(u.left-C.left,0);return{top:i,right:f,bottom:c,left:l}}}),define(ae[2427],le([1,0,7,37,38,853,202]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewFindWidget=void 0;let E=class extends A.SimpleFindWidget{async _getResultCount(b){}constructor(b,S,C,r){super(void 0,{showCommonFindToggles:!1,checkImeCompletionState:b.checkImeCompletionState},S,C,r),this._delegate=b,this._findWidgetFocused=k.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(C),this._register(b.hasFindResult(u=>{this.updateButtons(u),this.focusFindBox()})),this._register(b.onDidStopFind(()=>{this.updateButtons(!1)}))}find(b){const S=this.inputValue;S&&this._delegate.find(S,b)}hide(b=!0){super.hide(b),this._delegate.stopFind(!0),this._delegate.focus()}_onInputChanged(){const b=this.inputValue;return b?this._delegate.updateFind(b):this._delegate.stopFind(!1),!1}_onFocusTrackerFocus(){this._findWidgetFocused.set(!0)}_onFocusTrackerBlur(){this._findWidgetFocused.reset()}_onFindInputFocusTrackerFocus(){}_onFindInputFocusTrackerBlur(){}findFirst(){}};E=we([F(1,p.IContextViewService),F(2,t.IContextKeyService),F(3,R.IKeybindingService)],E),e.WebviewFindWidget=E}),define(ae[659],le([1,0,10,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewWindowDragMonitor=void 0;class R extends p.Disposable{constructor(k){super(),this._register(t.addDisposableListener(window,t.EventType.DRAG_START,()=>{k()?.windowDidDragStart()}));const E=()=>{k()?.windowDidDragEnd()};this._register(t.addDisposableListener(window,t.EventType.DRAG_END,E)),this._register(t.addDisposableListener(window,t.EventType.MOUSE_MOVE,I=>{I.buttons===0&&E()}))}}e.WebviewWindowDragMonitor=R}),define(ae[2428],le([1,0,1959,15,89,70]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWebviewDeveloperToolsAction=void 0;class k extends p.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 b=I.get(R.INativeHostService);document.querySelectorAll("iframe.webview.ready").length&&(console.info(t.localize(1,null)),b.openDevTools())}}e.OpenWebviewDeveloperToolsAction=k}),define(ae[2429],le([1,0,14,183]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowIgnoreMenuShortcutsManager=void 0;class R{constructor(k,E,I){this.nativeHostService=I,this._isUsingNativeTitleBars=k.getValue("window.titleBarStyle")==="native",this.webviewMainService=p.ProxyChannel.toService(E.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=R}),define(ae[316],le([1,0,22,9,186]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewInput=void 0;class A extends R.EditorInput{get typeId(){return A.typeId}get editorId(){return this.viewType}get capabilities(){return 138}get resource(){return p.URI.from({scheme:t.Schemas.webviewPanel,path:`webview-panel/webview-${this.id}`})}constructor(E,I,b){super(),this._iconManager=b,this._hasTransfered=!1,this.id=E.id,this.viewType=E.viewType,this.providedId=E.providedId,this._name=E.name,this._webview=I}dispose(){this.isDisposed()||this._hasTransfered||this._webview?.dispose(),super.dispose()}getName(){return this._name}getTitle(E){return this.getName()}getDescription(){}setName(E){this._name=E,this._onDidChangeLabel.fire()}get webview(){return this._webview}get extension(){return this.webview.extension}get iconPath(){return this._iconPath}set iconPath(E){this._iconPath=E,this._iconManager.setIcons(this.id,E)}matches(E){return super.matches(E)||E===this}get group(){return this._group}updateGroup(E){this._group=E}transfer(E){if(!this._hasTransfered)return this._hasTransfered=!0,E._webview=this._webview,E}}e.WebviewInput=A,A.typeId="workbench.editors.webviewInput"}),define(ae[660],le([1,0,32,6,2,5]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewViewService=e.IWebviewViewService=void 0,e.IWebviewViewService=(0,A.createDecorator)("webviewViewService");class k extends R.Disposable{constructor(){super(...arguments),this._resolvers=new Map,this._awaitingRevival=new Map,this._onNewResolverRegistered=this._register(new p.Emitter),this.onNewResolverRegistered=this._onNewResolverRegistered.event}register(I,b){if(this._resolvers.has(I))throw new Error(`View resolver already registered for ${I}`);this._resolvers.set(I,b),this._onNewResolverRegistered.fire({viewType:I});const S=this._awaitingRevival.get(I);return S&&b.resolve(S.webview,t.CancellationToken.None).then(()=>{this._awaitingRevival.delete(I),S.resolve()}),(0,R.toDisposable)(()=>{this._resolvers.delete(I)})}resolve(I,b,S){const C=this._resolvers.get(I);if(!C){if(this._awaitingRevival.has(I))throw new Error("View already awaiting revival");let r;const u=new Promise(i=>r=i);return this._awaitingRevival.set(I,{webview:b,resolve:r}),u}return C.resolve(b,S)}}e.WebviewViewService=k}),define(ae[2430],le([1,0,35,660]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(p.IWebviewViewService,p.WebviewViewService,1)}),define(ae[2431],le([1,0,33,1965]),function(J,e,t,p){"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,p.localize)(0,null)),e.welcomePageTileBackground=(0,t.registerColor)("welcomePage.tileBackground",{dark:t.editorWidgetBackground,light:t.editorWidgetBackground,hcDark:"#000",hcLight:t.editorWidgetBackground},(0,p.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,p.localize)(2,null)),e.welcomePageTileShadow=(0,t.registerColor)("welcomePage.tileShadow",{light:t.widgetShadow,dark:t.widgetShadow,hcDark:null,hcLight:null},(0,p.localize)(3,null)),e.welcomePageProgressBackground=(0,t.registerColor)("welcomePage.progress.background",{light:t.inputBackground,dark:t.inputBackground,hcDark:t.inputBackground,hcLight:t.inputBackground},(0,p.localize)(4,null)),e.welcomePageProgressForeground=(0,t.registerColor)("welcomePage.progress.foreground",{light:t.textLinkForeground,dark:t.textLinkForeground,hcDark:t.textLinkForeground,hcLight:t.textLinkForeground},(0,p.localize)(5,null))}),define(ae[902],le([1,0,1967,29,63]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.gettingStartedCheckedCodicon=e.gettingStartedUncheckedCodicon=void 0,e.gettingStartedUncheckedCodicon=(0,R.registerIcon)("getting-started-step-unchecked",p.Codicon.circleLargeOutline,(0,t.localize)(0,null)),e.gettingStartedCheckedCodicon=(0,R.registerIcon)("getting-started-step-checked",p.Codicon.passFilled,(0,t.localize)(1,null))}),define(ae[661],le([1,0,1968,186,9,22,723]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedInput=e.gettingStartedInputTypeId=void 0,e.gettingStartedInputTypeId="workbench.editors.gettingStartedInput";class k extends p.EditorInput{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}constructor(I){super(),this.selectedCategory=I.selectedCategory,this.selectedStep=I.selectedStep,this.showTelemetryNotice=!!I.showTelemetryNotice}getName(){return(0,t.localize)(0,null)}}e.GettingStartedInput=k,k.ID=e.gettingStartedInputTypeId,k.RESOURCE=R.URI.from({scheme:A.Schemas.walkThrough,authority:"vscode_getting_started_page"})}),define(ae[2432],le([1,0,2,10,147,6,16]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedIndexList=void 0;class E extends t.Disposable{constructor(b){super(),this.options=b,this._onDidChangeEntries=new A.Emitter,this.onDidChangeEntries=this._onDidChangeEntries.event,this.isDisposed=!1,this.contextKeysToWatch=new Set,this.contextService=b.contextService,this.entries=void 0,this.itemCount=0,this.list=(0,p.$)("ul"),this.scrollbar=this._register(new R.DomScrollableElement(this.list,{})),this._register(this.onDidChangeEntries(()=>this.scrollbar.scanDomNode())),this.domElement=(0,p.$)(".index-list."+b.klass,{},(0,p.$)("h2",{},b.title),this.scrollbar.getDomNode()),this._register(this.contextService.onDidChangeContext(S=>{S.affectsSome(this.contextKeysToWatch)&&this.rerender()}))}getDomElement(){return this.domElement}layout(b){this.scrollbar.scanDomNode()}onDidChange(b){this._register(this.onDidChangeEntries(b))}register(b){this.isDisposed?b.dispose():this._register(b)}dispose(){this.isDisposed=!0,super.dispose()}setLimit(b){this.options.limit=b,this.setEntries(this.entries)}rerender(){this.setEntries(this.entries)}setEntries(b){let S=b??[];this.itemCount=0;const C=this.options.rankElement;C&&(S=S.filter(f=>C(f)!==null),S.sort((f,c)=>C(c)-C(f)));const r=S.filter(f=>!f.when||this.contextService.contextMatchesRules(f.when)),u=r.slice(0,this.options.limit),i=u.map(f=>f.id);if(!(this.entries===b&&(0,k.equals)(i,this.lastRendered))){for(this.entries=b,this.contextKeysToWatch.clear(),S.forEach(f=>{f.when?.keys()?.forEach(l=>this.contextKeysToWatch.add(l))}),this.lastRendered=i,this.itemCount=u.length;this.list.firstChild;)this.list.removeChild(this.list.firstChild);this.itemCount=u.length;for(const f of u){const c=this.options.renderElement(f);this.list.appendChild(c)}r.length>u.length&&this.options.more?this.list.appendChild(this.options.more):b!==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=E}),define(ae[2433],le([1,0,28,1971]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const R=k=>encodeURIComponent(JSON.stringify({profile:k})),A=400;e.default=()=>` <vertically-centered> <checklist> <checkbox on-checked="command:notebook.setProfile?${R("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,p.localize)(0,null))} </checkbox> <checkbox on-checked="command:notebook.setProfile?${R("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,p.localize)(1,null))} </checkbox> <checkbox on-checked="command:notebook.setProfile?${R("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,p.localize)(2,null))} </checkbox> </checklist> </vertically-centered> `}),define(ae[2434],le([1,0,28,1972]),function(J,e,t,p){"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,p.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,p.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,p.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,p.localize)(3,null))} </checkbox> </checklist> <checkbox when-checked="command:workbench.action.selectTheme" checked-on="false"> ${(0,t.escape)((0,p.localize)(4,null))} </checkbox> `}),define(ae[903],le([1,0,1970,29,63,64,2434,2433]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walkthroughs=e.startEntries=void 0;const k=(0,R.registerIcon)("getting-started-setup",p.Codicon.zap,(0,t.localize)(0,null)),E=(0,R.registerIcon)("getting-started-beginner",p.Codicon.lightbulb,(0,t.localize)(1,null)),I=(0,R.registerIcon)("getting-started-intermediate",p.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:p.Codicon.newFile,content:{type:"startEntry",command:"command:welcome.showNewFileEntries"}},{id:"topLevelOpenMac",title:(0,t.localize)(5,null),description:(0,t.localize)(6,null),icon:p.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:p.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:p.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:p.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:p.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:p.Codicon.sourceControl,content:{type:"startEntry",command:"command:remoteHub.openRepository"}},{id:"topLevelShowWalkthroughs",title:(0,t.localize)(17,null),description:(0,t.localize)(18,null),icon:p.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:p.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:p.Codicon.playCircle,content:{type:"startEntry",command:"https://aka.ms/vscode-videos"}}];const b=(S,C)=>`[${S}](${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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((0,t.localize)(71,null),"command:workbench.action.addRootFolder"),b((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,b((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:E,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,b((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,b((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,b((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,b((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,b((0,t.localize)(92,null),"https://github.com/microsoft/vscode-docs/blob/workspaceTrust/docs/editor/workspace-trust.md"),b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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,b((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(ae[904],le([1,0,1976]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.viewsWelcomeExtensionPointDescriptor=e.ViewIdentifierMap=e.ViewsWelcomeExtensionPointFields=void 0;var p;(function(A){A.view="view",A.contents="contents",A.when="when",A.group="group",A.enablement="enablement"})(p=e.ViewsWelcomeExtensionPointFields||(e.ViewsWelcomeExtensionPointFields={})),e.ViewIdentifierMap={explorer:"workbench.explorer.emptyView",debug:"workbench.debug.welcome",scm:"workbench.scm",testing:"workbench.view.testing"};const R=Object.freeze({type:"array",description:t.localize(0,null),items:{type:"object",description:t.localize(1,null),required:[p.view,p.contents],properties:{[p.view]:{anyOf:[{type:"string",description:t.localize(2,null)},{type:"string",description:t.localize(3,null),enum:Object.keys(e.ViewIdentifierMap)}]},[p.contents]:{type:"string",description:t.localize(4,null)},[p.when]:{type:"string",description:t.localize(5,null)},[p.group]:{type:"string",description:t.localize(6,null)},[p.enablement]:{type:"string",description:t.localize(7,null)}}}});e.viewsWelcomeExtensionPointDescriptor={extensionPoint:"viewsWelcome",jsonSchema:R}}),define(ae[905],le([1,0,62,54,42,357,22,20,94,13,5]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughSnippetContentProvider=e.requireToContent=void 0;function C(u,i){if(!i.query)throw new Error("Welcome: invalid resource");const f=JSON.parse(i.query);if(!f.moduleId)throw new Error("Welcome: invalid resource");return new Promise((l,s)=>{J([f.moduleId],d=>{try{l(u.invokeFunction(d.default))}catch(n){s(n)}})})}e.requireToContent=C;let r=class{constructor(i,f,c,l){this.textModelResolverService=i,this.languageService=f,this.modelService=c,this.instantiationService=l,this.loads=new Map,this.textModelResolverService.registerTextModelContentProvider(k.Schemas.walkThroughSnippet,this)}async textBufferFactoryFromResource(i){let f=this.loads.get(i.toString());return f||(f=C(this.instantiationService,i).then(c=>(0,I.createTextBufferFactory)(c)).finally(()=>this.loads.delete(i.toString())),this.loads.set(i.toString(),f)),f}async provideTextContent(i){const f=await this.textBufferFactoryFromResource(i.with({fragment:""}));let c=this.modelService.getModel(i);if(!c){const l=parseInt(i.fragment);let s=0;const d=new A.marked.Renderer;d.code=(h,v)=>{s++;const m=typeof v=="string"&&this.languageService.getLanguageIdByLanguageName(v)||"",w=this.languageService.createById(m),D=this.modelService.createModel(h,w,i.with({fragment:`${s}.${v}`}));return s===l&&(c=D),""};const n=f.create(1).textBuffer,a=n.getLineCount(),o=new E.Range(1,1,a,n.getLineLength(a)+1),g=n.getValueInRange(o,0);(0,A.marked)(g,{renderer:d})}return(0,b.assertIsDefined)(c)}};r=we([F(0,t.ITextModelService),F(1,R.ILanguageService),F(2,p.IModelService),F(3,S.IInstantiationService)],r),e.WalkThroughSnippetContentProvider=r}),define(ae[662],le([1,0,186,255,62,357,22,18,905,5]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalkThroughInput=e.WalkThroughModel=void 0;class S extends p.EditorModel{constructor(u,i){super(),this.mainRef=u,this.snippetRefs=i}get main(){return this.mainRef}get snippets(){return this.snippetRefs.map(u=>u.object)}dispose(){this.snippetRefs.forEach(u=>u.dispose()),super.dispose()}}e.WalkThroughModel=S;let C=class Oa extends t.EditorInput{get capabilities(){return 8|super.capabilities}get resource(){return this.options.resource}constructor(u,i,f){super(),this.options=u,this.instantiationService=i,this.textModelResolverService=f,this.promise=null,this.maxTopScroll=0,this.maxBottomScroll=0}get typeId(){return this.options.typeId}getName(){return this.options.name}getDescription(){return this.options.description||""}getTelemetryFrom(){return this.options.telemetryFrom}getTelemetryDescriptor(){const u=super.getTelemetryDescriptor();return u.target=this.getTelemetryFrom(),u}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(u=>{if(this.resource.path.endsWith(".html"))return new S(u,[]);const i=[];let f=0;const c=new A.marked.Renderer;return c.code=(l,s)=>{f++;const d=this.options.resource.with({scheme:k.Schemas.walkThroughSnippet,fragment:`${f}.${s}`});return i.push(this.textModelResolverService.createModelReference(d)),`<div id="snippet-${d.fragment}" class="walkThroughEditorContainer" ></div>`},u=(0,A.marked)(u,{renderer:c}),Promise.all(i).then(l=>new S(u,l))})),this.promise}matches(u){return super.matches(u)?!0:u instanceof Oa?(0,E.isEqual)(u.options.resource,this.options.resource):!1}dispose(){this.promise&&(this.promise.then(u=>u.dispose()),this.promise=null),super.dispose()}relativeScrollPosition(u,i){this.maxTopScroll=Math.max(this.maxTopScroll,u),this.maxBottomScroll=Math.max(this.maxBottomScroll,i)}};C=we([F(1,b.IInstantiationService),F(2,R.ITextModelService)],C),e.WalkThroughInput=C}),define(ae[2435],le([1,0,33]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getExtraColor=void 0;function p(R,A,k){const E=R.getColor(A);if(E)return E;if(R.type==="dark"){const I=R.getColor(t.editorBackground);if(I&&I.getRelativeLuminance()<.004)return k.extra_dark}return k[R.type]}e.getExtraColor=p}),define(ae[906],le([1,0,1982,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MANAGE_TRUST_COMMAND_ID=e.WorkspaceTrustContext=void 0,e.WorkspaceTrustContext={IsEnabled:new p.RawContextKey("isWorkspaceTrustEnabled",!1,(0,t.localize)(0,null)),IsTrusted:new p.RawContextKey("isWorkspaceTrusted",!1,(0,t.localize)(1,null))},e.MANAGE_TRUST_COMMAND_ID="workbench.trust.manage"}),define(ae[2436],le([1,0,1985,68,15,307,47,89,117,46]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UninstallShellScriptAction=e.InstallShellScriptAction=void 0;const S={value:(0,t.localize)(0,null),original:"Shell Command"};class C extends R.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:S,f1:!0})}async run(i){const f=i.get(E.INativeHostService),c=i.get(k.IDialogService),l=i.get(b.IProductService);try{await f.installShellCommand(),c.show(p.default.Info,(0,t.localize)(2,null,l.applicationName))}catch(s){c.show(p.default.Error,(0,I.toErrorMessage)(s))}}}e.InstallShellScriptAction=C;class r extends R.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:S,f1:!0})}async run(i){const f=i.get(E.INativeHostService),c=i.get(k.IDialogService),l=i.get(b.IProductService);try{await f.uninstallShellCommand(),c.show(p.default.Info,(0,t.localize)(4,null,l.applicationName))}catch(s){c.show(p.default.Error,(0,I.toErrorMessage)(s))}}}e.UninstallShellScriptAction=r}),define(ae[2437],le([1,0,9,1986,829,38,86,19,54,42,48,199,8,89,29,34,15,70,1187]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,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 s extends c.Action2{constructor(){super({id:s.ID,title:{value:(0,p.localize)(0,null),mnemonicTitle:(0,p.localize)(1,null),original:"Close Window"},f1:!0,keybinding:{weight:200,mac:{primary:3125},linux:{primary:574,secondary:[3125]},win:{primary:574,secondary:[3125]}},menu:{id:c.MenuId.MenubarFileMenu,group:"6_close",order:4}})}async run(M){return M.get(u.INativeHostService).closeWindow()}}e.CloseWindowAction=s,s.ID="workbench.action.closeWindow";class d extends c.Action2{constructor(M){super(M)}async setConfiguredZoomLevel(M,O){const N=M.get(r.IConfigurationService);O=Math.round(O),!(O>d.MAX_ZOOM_LEVEL||O<d.MIN_ZOOM_LEVEL)&&(await N.updateValue(d.SETTING_KEY,O),(0,R.applyZoom)(O))}}d.SETTING_KEY="window.zoomLevel",d.MAX_ZOOM_LEVEL=8,d.MIN_ZOOM_LEVEL=-8;class n extends d{constructor(){super({id:"workbench.action.zoomIn",title:{value:(0,p.localize)(2,null),mnemonicTitle:(0,p.localize)(3,null),original:"Zoom In"},category:l.Categories.View,f1:!0,keybinding:{weight:200,primary:2129,secondary:[3153,2152]},menu:{id:c.MenuId.MenubarAppearanceMenu,group:"5_zoom",order:1}})}run(M){return super.setConfiguredZoomLevel(M,(0,k.getZoomLevel)()+1)}}e.ZoomInAction=n;class a extends d{constructor(){super({id:"workbench.action.zoomOut",title:{value:(0,p.localize)(4,null),mnemonicTitle:(0,p.localize)(5,null),original:"Zoom Out"},category:l.Categories.View,f1:!0,keybinding:{weight:200,primary:2131,secondary:[3155,2154],linux:{primary:2131,secondary:[2154]}},menu:{id:c.MenuId.MenubarAppearanceMenu,group:"5_zoom",order:2}})}run(M){return super.setConfiguredZoomLevel(M,(0,k.getZoomLevel)()-1)}}e.ZoomOutAction=a;class o extends d{constructor(){super({id:"workbench.action.zoomReset",title:{value:(0,p.localize)(6,null),mnemonicTitle:(0,p.localize)(7,null),original:"Reset Zoom"},category:l.Categories.View,f1:!0,keybinding:{weight:200,primary:2141},menu:{id:c.MenuId.MenubarAppearanceMenu,group:"5_zoom",order:3}})}run(M){return super.setConfiguredZoomLevel(M,0)}}e.ZoomResetAction=o;class g extends c.Action2{constructor(M){super(M),this.closeWindowAction={iconClass:i.Codicon.removeClose.classNames,tooltip:(0,p.localize)(8,null)},this.closeDirtyWindowAction={iconClass:"dirty-window "+i.Codicon.closeDirty,tooltip:(0,p.localize)(9,null),alwaysVisible:!0}}async run(M){const O=M.get(S.IQuickInputService),N=M.get(A.IKeybindingService),P=M.get(I.IModelService),B=M.get(b.ILanguageService),V=M.get(u.INativeHostService),z=V.windowId,x=await V.getWindows(),H=(0,p.localize)(10,null),W=x.map(q=>{const X=q.filename?t.URI.file(q.filename):(0,f.isSingleFolderWorkspaceIdentifier)(q.workspace)?q.workspace.uri:(0,f.isWorkspaceIdentifier)(q.workspace)?q.workspace.configPath:void 0,G=q.filename?E.FileKind.FILE:(0,f.isSingleFolderWorkspaceIdentifier)(q.workspace)?E.FileKind.FOLDER:(0,f.isWorkspaceIdentifier)(q.workspace)?E.FileKind.ROOT_FOLDER:E.FileKind.FILE;return{payload:q.id,label:q.title,ariaLabel:q.dirty?(0,p.localize)(11,null,q.title):q.title,iconClasses:(0,C.getIconClasses)(P,B,X,G),description:z===q.id?(0,p.localize)(12,null):void 0,buttons:z!==q.id?q.dirty?[this.closeDirtyWindowAction]:[this.closeWindowAction]:void 0}}),U=(W.indexOf(W.filter(q=>q.payload===z)[0])+1)%W.length,$=await O.pick(W,{contextKey:"inWindowsPicker",activeItem:W[U],placeHolder:H,quickNavigate:this.isQuickNavigate()?{keybindings:N.lookupKeybindings(this.desc.id)}:void 0,hideInput:this.isQuickNavigate(),onDidTriggerItemButton:async q=>{await V.closeWindowById(q.item.payload),q.removeItem()}});$&&V.focusWindow({windowId:$.payload})}}class h extends g{constructor(){super({id:"workbench.action.switchWindow",title:{value:(0,p.localize)(13,null),original:"Switch Window..."},f1:!0,keybinding:{weight:200,primary:0,mac:{primary:309}}})}isQuickNavigate(){return!1}}e.SwitchWindowAction=h;class v extends g{constructor(){super({id:"workbench.action.quickSwitchWindow",title:{value:(0,p.localize)(14,null),original:"Quick Switch Window..."},f1:!1})}isQuickNavigate(){return!0}}e.QuickSwitchWindowAction=v;const m=function(L){return L.get(u.INativeHostService).newWindowTab()};e.NewWindowTabHandler=m;const w=function(L){return L.get(u.INativeHostService).showPreviousWindowTab()};e.ShowPreviousWindowTabHandler=w;const D=function(L){return L.get(u.INativeHostService).showNextWindowTab()};e.ShowNextWindowTabHandler=D;const y=function(L){return L.get(u.INativeHostService).moveWindowTabToNewWindow()};e.MoveWindowTabToNewWindowHandler=y;const T=function(L){return L.get(u.INativeHostService).mergeAllWindowTabs()};e.MergeWindowTabsHandlerHandler=T;const _=function(L){return L.get(u.INativeHostService).toggleWindowTabsBar()};e.ToggleWindowTabsBarHandler=_}),define(ae[2438],le([1,0,1989,208,130,14,68,93,25,89,46,166]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeDialogHandler=void 0;let r=class{constructor(i,f,c,l){this.logService=i,this.nativeHostService=f,this.productService=c,this.clipboardService=l}async confirm(i){this.logService.trace("DialogService#confirm",i.message);const{options:f,buttonIndexMap:c}=this.massageMessageBoxOptions(this.getConfirmOptions(i)),l=await this.nativeHostService.showMessageBox(f);return{confirmed:c[l.response]===0,checkboxChecked:l.checkboxChecked}}getConfirmOptions(i){const f=[];i.primaryButton?f.push(i.primaryButton):f.push((0,t.localize)(0,null)),i.secondaryButton?f.push(i.secondaryButton):typeof i.secondaryButton>"u"&&f.push((0,t.localize)(1,null));const c={title:i.title,message:i.message,buttons:f,cancelId:1};return i.detail&&(c.detail=i.detail),i.type&&(c.type=i.type),i.checkbox&&(c.checkboxLabel=i.checkbox.label,c.checkboxChecked=i.checkbox.checked),c}async show(i,f,c,l){this.logService.trace("DialogService#show",f);const{options:s,buttonIndexMap:d}=this.massageMessageBoxOptions({message:f,buttons:c,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}),n=await this.nativeHostService.showMessageBox(s);return{choice:d[n.response],checkboxChecked:n.checkboxChecked}}massageMessageBoxOptions(i){let f=(i.buttons||[]).map((s,d)=>d),c=(i.buttons||[]).map(s=>(0,R.mnemonicButtonLabel)(s)),l=i.cancelId;if(A.isLinux&&(c=c.reverse(),f=f.reverse()),i.defaultId=f[0],typeof l=="number"&&(l=f[l],!A.isWindows&&c.length>2&&l!==1)){const s=c[l];c.splice(l,1),c.splice(1,0,s);const d=f[l];f.splice(l,1),f.splice(1,0,d),l=1}return i.buttons=c,i.cancelId=l,i.noLink=!0,i.title=i.title||this.productService.nameLong,{options:i,buttonIndexMap:f}}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 f=await this.nativeHostService.getOSProperties(),c=g=>(0,t.localize)(2,null,i,this.productService.commit||"Unknown",this.productService.date?`${this.productService.date}${g?" ("+(0,p.fromNow)(new Date(this.productService.date),!0)+")":""}`:"Unknown",C.process.versions.electron,C.process.versions.chrome,C.process.versions.node,C.process.versions.v8,`${f.type} ${f.arch} ${f.release}${A.isLinuxSnap?" snap":""}`,C.process.sandboxed?"Yes":"No"),l=c(!0),s=c(!1),d=(0,t.localize)(3,null),n=(0,R.mnemonicButtonLabel)((0,t.localize)(4,null));let a;A.isLinux?a=[n,d]:a=[d,n];const o=await this.nativeHostService.showMessageBox({title:this.productService.nameLong,type:"info",message:this.productService.nameLong,detail:` ${l}`,buttons:a,noLink:!0,defaultId:a.indexOf(d),cancelId:a.indexOf(d)});a[o.response]===n&&this.clipboardService.writeText(s)}};r=we([F(0,I.ILogService),F(1,b.INativeHostService),F(2,S.IProductService),F(3,E.IClipboardService)],r),e.NativeDialogHandler=r}),define(ae[190],le([1,0,5]),function(J,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 p{constructor(b){this.descriptorFn=b,this.descriptorFn=b}getDescription(){return this.descriptorFn(null)}}class R extends p{constructor(b,S){super(S),this.number=b,this.number=b}getDescription(){return this.descriptorFn(this.number)}}e.NumberBadge=R;class A extends p{constructor(b,S){super(S),this.text=b}}e.TextBadge=A;class k extends p{constructor(b,S){super(S),this.icon=b}}e.IconBadge=k;class E extends p{}e.ProgressBadge=E}),define(ae[317],le([1,0,5,187,27,23,35,8,46,2134]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchAssignmentService=e.IWorkbenchAssignmentService=void 0,e.IWorkbenchAssignmentService=(0,t.createDecorator)("WorkbenchAssignmentService");class S{constructor(i){this.memento=i,this.mementoObj=i.getMemento(-1,1)}async getValue(i,f){return await this.mementoObj[i]||f}setValue(i,f){this.mementoObj[i]=f,this.memento.saveMemento()}}class C{constructor(i,f){this.telemetryService=i,this.productService=f}get assignmentContext(){return this._lastAssignmentContext?.split(";")}setSharedProperty(i,f){i===this.productService.tasConfig?.assignmentContextTelemetryPropertyName&&(this._lastAssignmentContext=f),this.telemetryService.setExperimentProperty(i,f)}postEvent(i,f){const c={};for(const[l,s]of f.entries())c[l]=s;this.telemetryService.publicLog(i,c)}}let r=class extends b.BaseAssignmentService{constructor(i,f,c,l){super(()=>i.getTelemetryInfo().then(s=>s.machineId),c,l,new C(i,l),new S(new p.Memento("experiment.service.memento",f))),this.telemetryService=i}get experimentsEnabled(){return this.configurationService.getValue("workbench.enableExperiments")===!0}async getTreatment(i){const f=await super.getTreatment(i);return this.telemetryService.publicLog2("tasClientReadTreatmentComplete",{treatmentName:i,treatmentValue:JSON.stringify(f)}),f}async getCurrentExperiments(){if(!!this.tasClient&&!!this.experimentsEnabled)return await this.tasClient,this.telemetry?.assignmentContext}};r=we([F(0,R.ITelemetryService),F(1,A.IStorageService),F(2,E.IConfigurationService),F(3,I.IProductService)],r),e.WorkbenchAssignmentService=r,(0,k.registerSingleton)(e.IWorkbenchAssignmentService,r,1)}),define(ae[260],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IAuthenticationService=void 0,e.IAuthenticationService=(0,t.createDecorator)("IAuthenticationService")}),define(ae[538],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IBannerService=void 0,e.IBannerService=(0,t.createDecorator)("bannerService")}),define(ae[2439],le([1,0,788,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSharedProcessRemoteService)(t.IChecksumService,"checksum")}),define(ae[2440],le([1,0,93,9,14,35,89,56]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeClipboardService=void 0;let I=class hr{constructor(S){this.nativeHostService=S}async writeText(S,C){return this.nativeHostService.writeClipboardText(S,C)}async readText(S){return this.nativeHostService.readClipboardText(S)}async readFindText(){return R.isMacintosh?this.nativeHostService.readClipboardFindText():""}async writeFindText(S){if(R.isMacintosh)return this.nativeHostService.writeClipboardFindText(S)}async writeResources(S){if(S.length)return this.nativeHostService.writeClipboardBuffer(hr.FILE_FORMAT,this.resourcesToBuffer(S))}async readResources(){return this.bufferToResources(await this.nativeHostService.readClipboardBuffer(hr.FILE_FORMAT))}async hasResources(){return this.nativeHostService.hasClipboard(hr.FILE_FORMAT)}resourcesToBuffer(S){return E.VSBuffer.fromString(S.map(C=>C.toString()).join(` `))}bufferToResources(S){if(!S)return[];const C=S.toString();if(!C)return[];try{return C.split(` `).map(r=>p.URI.parse(r))}catch{return[]}}};I.FILE_FORMAT="code/file-list",I=we([F(0,k.INativeHostService)],I),e.NativeClipboardService=I,(0,A.registerSingleton)(t.IClipboardService,I,1)}),define(ae[176],le([1,0,8,5]),function(J,e,t,p){"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.LOCAL_MACHINE_PROFILE_SCOPES=e.PROFILE_SCOPES=e.APPLICATION_SCOPES=e.tasksSchemaId=e.launchSchemaId=e.folderSettingsSchemaId=e.workspaceSettingsSchemaId=e.machineSettingsSchemaId=e.profileSettingsSchemaId=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.profileSettingsSchemaId="vscode://schemas/settings/profile",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.APPLICATION_SCOPES=[1],e.PROFILE_SCOPES=[2,3,4,5],e.LOCAL_MACHINE_PROFILE_SCOPES=[3,4,5],e.LOCAL_MACHINE_SCOPES=[1,...e.LOCAL_MACHINE_PROFILE_SCOPES],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,p.refineServiceDecorator)(t.IConfigurationService),e.TASKS_DEFAULT=`{ "version": "2.0.0", "tasks": [] }`}),define(ae[2441],le([1,0,18,56,11]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationCache=void 0;class A{constructor(I,b,S){this.donotCacheResourcesWithSchemes=I,this.fileService=S,this.cachedConfigurations=new Map,this.cacheHome=b.cacheHome}needsCaching(I){return!this.donotCacheResourcesWithSchemes.includes(I.scheme)}read(I){return this.getCachedConfiguration(I).read()}write(I,b){return this.getCachedConfiguration(I).save(b)}remove(I){return this.getCachedConfiguration(I).remove()}getCachedConfiguration({type:I,key:b}){const S=`${I}:${b}`;let C=this.cachedConfigurations.get(S);return C||(C=new k({type:I,key:b},this.cacheHome,this.fileService),this.cachedConfigurations.set(S,C)),C}}e.ConfigurationCache=A;class k{constructor({type:I,key:b},S,C){this.fileService=C,this.cachedConfigurationFolderResource=(0,t.joinPath)(S,"CachedConfigurations",I,b),this.cachedConfigurationFileResource=(0,t.joinPath)(this.cachedConfigurationFolderResource,I==="workspaces"?"workspace.json":"configuration.json"),this.queue=new R.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,p.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(ae[907],le([1,0,52,8,429,13,16]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=e.StandaloneConfigurationModelParser=e.WorkspaceConfigurationModelParser=void 0;class E extends R.ConfigurationModelParser{constructor(C){super(C),this._folders=[],this._transient=!1,this._settingsModelParser=new R.ConfigurationModelParser(C),this._launchModel=new R.ConfigurationModel,this._tasksModel=new R.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,r){return this._folders=C.folders||[],this._transient=(0,A.isBoolean)(C.transient)&&C.transient,this._settingsModelParser.parseRaw(C.settings,r),this._launchModel=this.createConfigurationModelFrom(C,"launch"),this._tasksModel=this.createConfigurationModelFrom(C,"tasks"),super.doParseRaw(C,r)}createConfigurationModelFrom(C,r){const u=C[r];if(u){const i=(0,p.toValuesTree)(u,l=>console.error(`Conflict in settings file ${this._name}: ${l}`)),f=Object.create(null);f[r]=i;const c=Object.keys(u).map(l=>`${r}.${l}`);return new R.ConfigurationModel(f,c,[])}return new R.ConfigurationModel}}e.WorkspaceConfigurationModelParser=E;class I extends R.ConfigurationModelParser{constructor(C,r){super(C),this.scope=r}doParseRaw(C,r){const u=(0,p.toValuesTree)(C,c=>console.error(`Conflict in settings file ${this._name}: ${c}`)),i=Object.create(null);i[this.scope]=u;const f=Object.keys(C).map(c=>`${this.scope}.${c}`);return{contents:i,keys:f,overrides:[]}}}e.StandaloneConfigurationModelParser=I;class b extends R.Configuration{constructor(C,r,u,i,f,c,l,s,d,n){super(C,r,u,i,f,c,l,s,d),this._workspace=n}getValue(C,r={}){return super.getValue(C,r,this._workspace)}inspect(C,r={}){return super.inspect(C,r,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 r=(c,l,s)=>{const d=[];return d.push(...l.filter(n=>c.indexOf(n)===-1)),d.push(...c.filter(n=>l.indexOf(n)===-1)),d.push(...c.filter(n=>l.indexOf(n)===-1?!1:(0,t.equals)(this.getValue(n,{overrideIdentifier:s}),C.getValue(n,{overrideIdentifier:s}))?this._workspace&&this._workspace.folders.some(a=>!(0,t.equals)(this.getValue(n,{resource:a.uri,overrideIdentifier:s}),C.getValue(n,{resource:a.uri,overrideIdentifier:s}))):!0)),d},u=r(this.allKeys(),C.allKeys()),i=[],f=(0,k.distinct)([...this.allOverrideIdentifiers(),...C.allOverrideIdentifiers()]);for(const c of f){const l=r(this.getAllKeysForOverrideIdentifier(c),C.getAllKeysForOverrideIdentifier(c),c);l.length&&i.push([c,l])}return{keys:u,overrides:i}}}e.Configuration=b}),define(ae[2442],le([1,0,6,21,2,11,19,429,907,176,55,52,108,18,17,13,804]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FolderConfiguration=e.WorkspaceConfiguration=e.RemoteUserConfiguration=e.UserConfiguration=e.DefaultConfiguration=void 0;class l extends c.DefaultConfiguration{constructor(y,T){super(),this.configurationCache=y,this.configurationRegistry=i.Registry.as(S.Extensions.Configuration),this.cachedConfigurationDefaultsOverrides={},this.cacheKey={type:"defaults",key:"configurationDefaultsOverrides"},this.updateCache=!1,T.options?.configurationDefaults&&this.configurationRegistry.registerDefaultConfigurations([{overrides:T.options.configurationDefaults}])}getConfigurationDefaultOverrides(){return this.cachedConfigurationDefaultsOverrides}async initialize(){return await this.initializeCachedConfigurationDefaultsOverrides(),super.initialize()}reload(){return this.updateCache=!0,this.cachedConfigurationDefaultsOverrides={},this.updateCachedConfigurationDefaultsOverrides(),super.reload()}initializeCachedConfigurationDefaultsOverrides(){return this.initiaizeCachedConfigurationDefaultsOverridesPromise||(this.initiaizeCachedConfigurationDefaultsOverridesPromise=(async()=>{try{if(window.localStorage.getItem(l.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY)){const y=await this.configurationCache.read(this.cacheKey);y&&(this.cachedConfigurationDefaultsOverrides=JSON.parse(y))}}catch{}this.cachedConfigurationDefaultsOverrides=(0,f.isObject)(this.cachedConfigurationDefaultsOverrides)?this.cachedConfigurationDefaultsOverrides:{}})()),this.initiaizeCachedConfigurationDefaultsOverridesPromise}onDidUpdateConfiguration(y,T){super.onDidUpdateConfiguration(y,T),T&&this.updateCachedConfigurationDefaultsOverrides()}async updateCachedConfigurationDefaultsOverrides(){if(!this.updateCache)return;const y={},T=this.configurationRegistry.getConfigurationDefaultsOverrides();for(const[_,L]of T)!S.OVERRIDE_PROPERTY_REGEX.test(_)&&L.value!==void 0&&(y[_]=L.value);try{Object.keys(y).length?(window.localStorage.setItem(l.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY,"yes"),await this.configurationCache.write(this.cacheKey,JSON.stringify(y))):(window.localStorage.removeItem(l.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY),await this.configurationCache.remove(this.cacheKey))}catch{}}}e.DefaultConfiguration=l,l.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY="DefaultOverridesCacheExists";class s extends R.Disposable{get hasTasksLoaded(){return this.userConfiguration.value instanceof d}constructor(y,T,_,L,M,O){super(),this.settingsResource=y,this.tasksResource=T,this.fileService=L,this.uriIdentityService=M,this.logService=O,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.userConfiguration=this._register(new R.MutableDisposable),this.userConfigurationChangeDisposable=this._register(new R.MutableDisposable),this.configurationParseOptions={scopes:_,skipRestricted:!1},this.userConfiguration.value=new E.UserSettings(y,_,M.extUri,this.fileService),this.userConfigurationChangeDisposable.value=this.userConfiguration.value.onDidChange(()=>this.reloadConfigurationScheduler.schedule()),this.reloadConfigurationScheduler=this._register(new A.RunOnceScheduler(()=>this.userConfiguration.value.loadConfiguration().then(N=>this._onDidChangeConfiguration.fire(N)),50))}async reset(y,T,_){this.settingsResource=y,this.tasksResource=T,this.configurationParseOptions={scopes:_,skipRestricted:!1};const L=this.uriIdentityService.extUri.dirname(this.settingsResource),M=this.tasksResource?[[b.TASKS_CONFIGURATION_KEY,this.tasksResource]]:[],O=new d(L.toString(),this.settingsResource,M,this.configurationParseOptions,this.fileService,this.uriIdentityService,this.logService),N=await O.loadConfiguration();return this.userConfiguration.value=O,this.userConfigurationChangeDisposable.value&&(this.userConfigurationChangeDisposable.value=this.userConfiguration.value.onDidChange(()=>this.reloadConfigurationScheduler.schedule())),N}async initialize(){return this.userConfiguration.value.loadConfiguration()}async reload(){return this.hasTasksLoaded?this.userConfiguration.value.loadConfiguration():this.reset(this.settingsResource,this.tasksResource,this.configurationParseOptions.scopes)}reparse(){return this.userConfiguration.value.reparse(this.configurationParseOptions)}getRestrictedSettings(){return this.userConfiguration.value.getRestrictedSettings()}}e.UserConfiguration=s;class d extends R.Disposable{constructor(y,T,_,L,M,O,N){super(),this.settingsResource=T,this.standAloneConfigurationResources=_,this.fileService=M,this.uriIdentityService=O,this.logService=N,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.allResources=[this.settingsResource,...this.standAloneConfigurationResources.map(([,P])=>P)],this._register((0,R.combinedDisposable)(...this.allResources.map(P=>(0,R.combinedDisposable)(this.fileService.watch(O.extUri.dirname(P)),this.fileService.watch(P))))),this._folderSettingsModelParser=new E.ConfigurationModelParser(y),this._folderSettingsParseOptions=L,this._standAloneConfigurations=[],this._cache=new E.ConfigurationModel,this._register(t.Event.debounce(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,P=>this.handleFileChangesEvent(P)),t.Event.filter(this.fileService.onDidRunOperation,P=>this.handleFileOperationEvent(P))),()=>{},100)(()=>this._onDidChange.fire()))}async resolveContents(){const y=async L=>Promise.all(L.map(async M=>{try{return(await this.fileService.readFile(M)).value.toString()}catch(O){this.logService.trace(`Error while resolving configuration file '${M.toString()}': ${p.getErrorMessage(O)}`),O.fileOperationResult!==1&&O.fileOperationResult!==10&&this.logService.error(O)}return"{}"})),[[T],_]=await Promise.all([y([this.settingsResource]),y(this.standAloneConfigurationResources.map(([,L])=>L))]);return[T,_.map((L,M)=>[this.standAloneConfigurationResources[M][0],L])]}async loadConfiguration(){const[y,T]=await this.resolveContents();this._standAloneConfigurations=[],this._folderSettingsModelParser.parse("",this._folderSettingsParseOptions),y!==void 0&&this._folderSettingsModelParser.parse(y,this._folderSettingsParseOptions);for(let _=0;_<T.length;_++){const L=T[_][1];if(L!==void 0){const M=new I.StandaloneConfigurationModelParser(this.standAloneConfigurationResources[_][1].toString(),this.standAloneConfigurationResources[_][0]);M.parse(L),this._standAloneConfigurations.push(M.configurationModel)}}return this.consolidate(),this._cache}getRestrictedSettings(){return this._folderSettingsModelParser.restrictedConfigurations}reparse(y){const T=this._folderSettingsModelParser.configurationModel.contents;return this._folderSettingsParseOptions=y,this._folderSettingsModelParser.reparse(this._folderSettingsParseOptions),(0,C.equals)(T,this._folderSettingsModelParser.configurationModel.contents)||this.consolidate(),this._cache}consolidate(){this._cache=this._folderSettingsModelParser.configurationModel.merge(...this._standAloneConfigurations)}handleFileChangesEvent(y){return!!(this.allResources.some(T=>y.contains(T))||this.allResources.some(T=>y.contains(this.uriIdentityService.extUri.dirname(T),2)))}handleFileOperationEvent(y){return!!((y.isOperation(0)||y.isOperation(3)||y.isOperation(1)||y.isOperation(4))&&this.allResources.some(T=>this.uriIdentityService.extUri.isEqual(y.resource,T))||y.isOperation(1)&&this.allResources.some(T=>this.uriIdentityService.extUri.isEqual(y.resource,this.uriIdentityService.extUri.dirname(T))))}}class n extends R.Disposable{constructor(y,T,_,L,M){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=_,this._userConfiguration=this._cachedConfiguration=new o(y,T,{scopes:b.REMOTE_MACHINE_SCOPES}),M.getEnvironment().then(async O=>{if(O){const N=this._register(new a(O.settingsPath,{scopes:b.REMOTE_MACHINE_SCOPES},this._fileService,L));this._register(N.onDidChangeConfiguration(B=>this.onDidUserConfigurationChange(B))),this._userConfigurationInitializationPromise=N.initialize();const P=await this._userConfigurationInitializationPromise;this._userConfiguration.dispose(),this._userConfiguration=N,this.onDidUserConfigurationChange(P),this._onDidInitialize.fire(P)}})}async initialize(){if(this._userConfiguration instanceof a)return this._userConfiguration.initialize();let y=await this._userConfiguration.initialize();return this._userConfigurationInitializationPromise&&(y=await this._userConfigurationInitializationPromise,this._userConfigurationInitializationPromise=null),y}reload(){return this._userConfiguration.reload()}reparse(){return this._userConfiguration.reparse({scopes:b.REMOTE_MACHINE_SCOPES})}getRestrictedSettings(){return this._userConfiguration.getRestrictedSettings()}onDidUserConfigurationChange(y){this.updateCache(),this._onDidChangeConfiguration.fire(y)}async updateCache(){if(this._userConfiguration instanceof a){let y;try{y=await this._userConfiguration.resolveContent()}catch(T){if(T.fileOperationResult!==1)return}await this._cachedConfiguration.updateConfiguration(y)}}}e.RemoteUserConfiguration=n;class a extends R.Disposable{constructor(y,T,_,L){super(),this.configurationResource=y,this.fileService=_,this.uriIdentityService=L,this._onDidChangeConfiguration=this._register(new t.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this.fileWatcherDisposable=R.Disposable.None,this.directoryWatcherDisposable=R.Disposable.None,this.parser=new E.ConfigurationModelParser(this.configurationResource.toString()),this.parseOptions=T,this._register(_.onDidFilesChange(M=>this.handleFileChangesEvent(M))),this._register(_.onDidRunOperation(M=>this.handleFileOperationEvent(M))),this.reloadConfigurationScheduler=this._register(new A.RunOnceScheduler(()=>this.reload().then(M=>this._onDidChangeConfiguration.fire(M)),50)),this._register((0,R.toDisposable)(()=>{this.stopWatchingResource(),this.stopWatchingDirectory()}))}watchResource(){this.fileWatcherDisposable=this.fileService.watch(this.configurationResource)}stopWatchingResource(){this.fileWatcherDisposable.dispose(),this.fileWatcherDisposable=R.Disposable.None}watchDirectory(){const y=this.uriIdentityService.extUri.dirname(this.configurationResource);this.directoryWatcherDisposable=this.fileService.watch(y)}stopWatchingDirectory(){this.directoryWatcherDisposable.dispose(),this.directoryWatcherDisposable=R.Disposable.None}async initialize(){const y=await this.fileService.exists(this.configurationResource);return this.onResourceExists(y),this.reload()}async resolveContent(){return(await this.fileService.readFile(this.configurationResource)).value.toString()}async reload(){try{const y=await this.resolveContent();return this.parser.parse(y,this.parseOptions),this.parser.configurationModel}catch{return new E.ConfigurationModel}}reparse(y){return this.parseOptions=y,this.parser.reparse(this.parseOptions),this.parser.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}handleFileChangesEvent(y){let T=y.contains(this.configurationResource,0);y.contains(this.configurationResource,1)?(T=!0,this.onResourceExists(!0)):y.contains(this.configurationResource,2)&&(T=!0,this.onResourceExists(!1)),T&&this.reloadConfigurationScheduler.schedule()}handleFileOperationEvent(y){(y.isOperation(0)||y.isOperation(3)||y.isOperation(1)||y.isOperation(4))&&this.uriIdentityService.extUri.isEqual(y.resource,this.configurationResource)&&this.reloadConfigurationScheduler.schedule()}onResourceExists(y){y?(this.stopWatchingDirectory(),this.watchResource()):(this.stopWatchingResource(),this.watchDirectory())}}class o extends R.Disposable{constructor(y,T,_){super(),this.configurationCache=T,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.key={type:"user",key:y},this.parser=new E.ConfigurationModelParser("CachedRemoteUserConfiguration"),this.parseOptions=_,this.configurationModel=new E.ConfigurationModel}getConfigurationModel(){return this.configurationModel}initialize(){return this.reload()}reparse(y){return this.parseOptions=y,this.parser.reparse(this.parseOptions),this.configurationModel=this.parser.configurationModel,this.configurationModel}getRestrictedSettings(){return this.parser.restrictedConfigurations}async reload(){try{const y=await this.configurationCache.read(this.key),T=JSON.parse(y);T.content&&(this.parser.parse(T.content,this.parseOptions),this.configurationModel=this.parser.configurationModel)}catch{}return this.configurationModel}async updateConfiguration(y){return y?this.configurationCache.write(this.key,JSON.stringify({content:y})):this.configurationCache.remove(this.key)}}class g extends R.Disposable{get initialized(){return this._initialized}constructor(y,T,_,L){super(),this.configurationCache=y,this.fileService=T,this.uriIdentityService=_,this.logService=L,this._workspaceConfigurationDisposables=this._register(new R.DisposableStore),this._workspaceIdentifier=null,this._isWorkspaceTrusted=!1,this._onDidUpdateConfiguration=this._register(new t.Emitter),this.onDidUpdateConfiguration=this._onDidUpdateConfiguration.event,this._initialized=!1,this.fileService=T,this._workspaceConfiguration=this._cachedConfiguration=new v(y)}async initialize(y,T){this._workspaceIdentifier=y,this._isWorkspaceTrusted=T,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:b.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()})}getFolders(){return this._workspaceConfiguration.getFolders()}setFolders(y,T){return this._workspaceIdentifier?T.write(this._workspaceIdentifier.configPath,[{path:["folders"],value:y}],!0).then(()=>this.reload()):Promise.resolve()}isTransient(){return this._workspaceConfiguration.isTransient()}getConfiguration(){return this._workspaceConfiguration.getWorkspaceSettings()}updateWorkspaceTrust(y){return this._isWorkspaceTrusted=y,this.reparseWorkspaceSettings()}reparseWorkspaceSettings(){return this._workspaceConfiguration.reparseWorkspaceSettings({scopes:b.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()}),this.getConfiguration()}getRestrictedSettings(){return this._workspaceConfiguration.getRestrictedSettings()}async waitAndInitialize(y){if(await(0,k.whenProviderRegistered)(y.configPath,this.fileService),!(this._workspaceConfiguration instanceof h)){const T=this._register(new h(this.fileService,this.uriIdentityService,this.logService));await T.load(y,{scopes:b.WORKSPACE_SCOPES,skipRestricted:this.isUntrusted()}),this.doInitialize(T),this.onDidWorkspaceConfigurationChange(!1,!0)}}doInitialize(y){this._workspaceConfigurationDisposables.clear(),this._workspaceConfiguration=this._workspaceConfigurationDisposables.add(y),this._workspaceConfigurationDisposables.add(this._workspaceConfiguration.onDidChange(T=>this.onDidWorkspaceConfigurationChange(!0,!1))),this._initialized=!0}isUntrusted(){return!this._isWorkspaceTrusted}async onDidWorkspaceConfigurationChange(y,T){y&&await this.reload(),this.updateCache(),this._onDidUpdateConfiguration.fire(T)}async updateCache(){if(this._workspaceIdentifier&&this.configurationCache.needsCaching(this._workspaceIdentifier.configPath)&&this._workspaceConfiguration instanceof h){const y=await this._workspaceConfiguration.resolveContent(this._workspaceIdentifier);await this._cachedConfiguration.updateWorkspace(this._workspaceIdentifier,y)}}}e.WorkspaceConfiguration=g;class h extends R.Disposable{constructor(y,T,_){super(),this.fileService=y,this.logService=_,this._workspaceIdentifier=null,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(""),this.workspaceSettings=new E.ConfigurationModel,this._register(t.Event.any(t.Event.filter(this.fileService.onDidFilesChange,L=>!!this._workspaceIdentifier&&L.contains(this._workspaceIdentifier.configPath)),t.Event.filter(this.fileService.onDidRunOperation,L=>!!this._workspaceIdentifier&&(L.isOperation(0)||L.isOperation(3)||L.isOperation(1)||L.isOperation(4))&&T.extUri.isEqual(L.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(y){return(await this.fileService.readFile(y.configPath)).value.toString()}async load(y,T){(!this._workspaceIdentifier||this._workspaceIdentifier.id!==y.id)&&(this._workspaceIdentifier=y,this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(this._workspaceIdentifier.id),(0,R.dispose)(this.workspaceConfigWatcher),this.workspaceConfigWatcher=this._register(this.watchWorkspaceConfigurationFile()));let _="";try{_=await this.resolveContent(this._workspaceIdentifier)}catch(L){await this.fileService.exists(this._workspaceIdentifier.configPath)&&this.logService.error(L)}this.workspaceConfigurationModelParser.parse(_,T),this.consolidate()}getConfigurationModel(){return this.workspaceConfigurationModelParser.configurationModel}getFolders(){return this.workspaceConfigurationModelParser.folders}isTransient(){return this.workspaceConfigurationModelParser.transient}getWorkspaceSettings(){return this.workspaceSettings}reparseWorkspaceSettings(y){return this.workspaceConfigurationModelParser.reparseWorkspaceSettings(y),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):R.Disposable.None}}class v{constructor(y){this.configurationCache=y,this.onDidChange=t.Event.None,this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(""),this.workspaceSettings=new E.ConfigurationModel}async load(y,T){try{const _=this.getKey(y),L=await this.configurationCache.read(_),M=JSON.parse(L);M.content&&(this.workspaceConfigurationModelParser=new I.WorkspaceConfigurationModelParser(_.key),this.workspaceConfigurationModelParser.parse(M.content,T),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(y){return this.workspaceConfigurationModelParser.reparseWorkspaceSettings(y),this.consolidate(),this.getWorkspaceSettings()}getRestrictedSettings(){return this.workspaceConfigurationModelParser.getRestrictedWorkspaceSettings()}consolidate(){this.workspaceSettings=this.workspaceConfigurationModelParser.settingsModel.merge(this.workspaceConfigurationModelParser.launchModel,this.workspaceConfigurationModelParser.tasksModel)}async updateWorkspace(y,T){try{const _=this.getKey(y);T?await this.configurationCache.write(_,JSON.stringify({content:T})):await this.configurationCache.remove(_)}catch{}}getKey(y){return{type:"workspaces",key:y.id}}}class m{constructor(y,T,_,L){this.configurationCache=L,this.onDidChange=t.Event.None,this.key={type:"folder",key:(0,r.hash)((0,u.joinPath)(y,T).toString()).toString(16)},this._folderSettingsModelParser=new E.ConfigurationModelParser("CachedFolderConfiguration"),this._folderSettingsParseOptions=_,this._standAloneConfigurations=[],this.configurationModel=new E.ConfigurationModel}async loadConfiguration(){try{const y=await this.configurationCache.read(this.key),{content:T}=JSON.parse(y.toString());if(T)for(const _ of Object.keys(T))if(_===b.FOLDER_SETTINGS_NAME)this._folderSettingsModelParser.parse(T[_],this._folderSettingsParseOptions);else{const L=new I.StandaloneConfigurationModelParser(_,_);L.parse(T[_]),this._standAloneConfigurations.push(L.configurationModel)}this.consolidate()}catch{}return this.configurationModel}async updateConfiguration(y,T){const _={};y&&(_[b.FOLDER_SETTINGS_NAME]=y),T.forEach(([L,M])=>{M&&(_[L]=M)}),Object.keys(_).length?await this.configurationCache.write(this.key,JSON.stringify({content:_})):await this.configurationCache.remove(this.key)}getRestrictedSettings(){return this._folderSettingsModelParser.restrictedConfigurations}reparse(y){return this._folderSettingsParseOptions=y,this._folderSettingsModelParser.reparse(this._folderSettingsParseOptions),this.consolidate(),this.configurationModel}consolidate(){this.configurationModel=this._folderSettingsModelParser.configurationModel.merge(...this._standAloneConfigurations)}getUnsupportedKeys(){return[]}}class w extends R.Disposable{constructor(y,T,_,L,M,O,N,P,B){super(),this.workspaceFolder=T,this.workbenchState=L,this.workspaceTrusted=M,this.configurationCache=B,this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this.scopes=this.workbenchState===3?b.FOLDER_SCOPES:b.WORKSPACE_SCOPES,this.configurationFolder=N.extUri.joinPath(T.uri,_),this.cachedFolderConfiguration=new m(T.uri,_,{scopes:this.scopes,skipRestricted:this.isUntrusted()},B),y&&this.configurationCache.needsCaching(T.uri)?(this.folderConfiguration=this.cachedFolderConfiguration,(0,k.whenProviderRegistered)(T.uri,O).then(()=>{this.folderConfiguration=this._register(this.createFileServiceBasedConfiguration(O,N,P)),this._register(this.folderConfiguration.onDidChange(V=>this.onDidFolderConfigurationChange())),this.onDidFolderConfigurationChange()})):(this.folderConfiguration=this._register(this.createFileServiceBasedConfiguration(O,N,P)),this._register(this.folderConfiguration.onDidChange(V=>this.onDidFolderConfigurationChange())))}loadConfiguration(){return this.folderConfiguration.loadConfiguration()}updateWorkspaceTrust(y){return this.workspaceTrusted=y,this.reparse()}reparse(){const y=this.folderConfiguration.reparse({scopes:this.scopes,skipRestricted:this.isUntrusted()});return this.updateCache(),y}getRestrictedSettings(){return this.folderConfiguration.getRestrictedSettings()}isUntrusted(){return!this.workspaceTrusted}onDidFolderConfigurationChange(){this.updateCache(),this._onDidChange.fire()}createFileServiceBasedConfiguration(y,T,_){const L=T.extUri.joinPath(this.configurationFolder,`${b.FOLDER_SETTINGS_NAME}.json`),M=[b.TASKS_CONFIGURATION_KEY,b.LAUNCH_CONFIGURATION_KEY].map(O=>[O,T.extUri.joinPath(this.configurationFolder,`${O}.json`)]);return new d(this.configurationFolder.toString(),L,M,{scopes:this.scopes,skipRestricted:this.isUntrusted()},y,T,_)}async updateCache(){if(this.configurationCache.needsCaching(this.configurationFolder)&&this.folderConfiguration instanceof d){const[y,T]=await this.folderConfiguration.resolveContents();this.cachedFolderConfiguration.updateConfiguration(y,T)}}}e.FolderConfiguration=w}),define(ae[272],le([1,0,5]),function(J,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 p;(function(A){A[A.ERROR_FILE_DIRTY=0]="ERROR_FILE_DIRTY",A[A.ERROR_INVALID_FILE=1]="ERROR_INVALID_FILE"})(p=e.JSONEditingErrorCode||(e.JSONEditingErrorCode={}));class R extends Error{constructor(k,E){super(k),this.code=E}}e.JSONEditingError=R}),define(ae[217],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VariableError=e.VariableKind=e.IConfigurationResolverService=void 0,e.IConfigurationResolverService=(0,t.createDecorator)("configurationResolverService");var p;(function(A){A.Unknown="unknown",A.Env="env",A.Config="config",A.Command="command",A.Input="input",A.ExtensionInstallFolder="extensionInstallFolder",A.WorkspaceFolder="workspaceFolder",A.Cwd="cwd",A.WorkspaceFolderBasename="workspaceFolderBasename",A.UserHome="userHome",A.LineNumber="lineNumber",A.SelectedText="selectedText",A.File="file",A.FileWorkspaceFolder="fileWorkspaceFolder",A.RelativeFile="relativeFile",A.RelativeFileDirname="relativeFileDirname",A.FileDirname="fileDirname",A.FileExtname="fileExtname",A.FileBasename="fileBasename",A.FileBasenameNoExtension="fileBasenameNoExtension",A.FileDirnameBasename="fileDirnameBasename",A.ExecPath="execPath",A.ExecInstallFolder="execInstallFolder",A.PathSeparator="pathSeparator"})(p=e.VariableKind||(e.VariableKind={}));class R extends Error{constructor(k,E){super(E),this.variable=k}}e.VariableError=R}),define(ae[908],le([1,0,1997]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputsSchema=void 0;const p=t.localize(0,null),R=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:p},type:{type:"string",description:R,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:p},type:{type:"string",description:R,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:p},type:{type:"string",description:R,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(ae[909],le([1,0,1998]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyDeprecatedVariableMessage=void 0;function p(R){R.pattern=R.pattern||"^(?!.*\\$\\{(env|config|command)\\.)",R.patternErrorMessage=R.patternErrorMessage||t.localize(0,null)}e.applyDeprecatedVariableMessage=p}),define(ae[910],le([1,0,53,209,13,52,14,130,1999,217,28]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractVariableResolverService=void 0;class C{constructor(u,i,f,c){this._contributedVariables=new Map,this._context=u,this._labelService=i,this._userHomePromise=f,c&&(this._envVariablesPromise=c.then(l=>this.prepareEnv(l)))}prepareEnv(u){if(k.isWindows){const i=Object.create(null);return Object.keys(u).forEach(f=>{i[f.toLowerCase()]=u[f]}),i}return u}resolveWithEnvironment(u,i,f){return this.recursiveResolve({env:this.prepareEnv(u),userHome:void 0},i?i.uri:void 0,f)}async resolveAsync(u,i){const f={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(f,u?u.uri:void 0,i)}async resolveAnyBase(u,i,f,c){const l=A.deepClone(i);k.isWindows&&l.windows?Object.keys(l.windows).forEach(d=>l[d]=l.windows[d]):k.isMacintosh&&l.osx?Object.keys(l.osx).forEach(d=>l[d]=l.osx[d]):k.isLinux&&l.linux&&Object.keys(l.linux).forEach(d=>l[d]=l.linux[d]),delete l.windows,delete l.osx,delete l.linux;const s={env:await this._envVariablesPromise,userHome:await this._userHomePromise};return this.recursiveResolve(s,u?u.uri:void 0,l,f,c)}async resolveAnyAsync(u,i,f){return this.resolveAnyBase(u,i,f)}async resolveAnyMap(u,i,f){const c=new Map;return{newConfig:await this.resolveAnyBase(u,i,f,c),resolvedVariables:c}}resolveWithInteractionReplace(u,i,f,c){throw new Error("resolveWithInteractionReplace not implemented.")}resolveWithInteraction(u,i,f,c){throw new Error("resolveWithInteraction not implemented.")}contributeVariable(u,i){if(this._contributedVariables.has(u))throw new Error("Variable "+u+" is contributed twice.");this._contributedVariables.set(u,i)}async recursiveResolve(u,i,f,c,l){if(R.isString(f))return this.resolveString(u,i,f,c,l);if(Array.isArray(f))return Promise.all(f.map(s=>this.recursiveResolve(u,i,s,c,l)));if(R.isObject(f)){const s=Object.create(null),d=await Promise.all(Object.keys(f).map(async n=>[await this.resolveString(u,i,n,c,l),await this.recursiveResolve(u,i,f[n],c,l)]));for(const[n,a]of d)s[n]=a;return s}return f}resolveString(u,i,f,c,l){return(0,S.replaceAsync)(f,C.VARIABLE_REGEXP,async(s,d)=>{if(d.includes(C.VARIABLE_LHS))return s;let n=await this.evaluateSingleVariable(u,s,d,i,c);return l?.set(d,n),n!==s&&R.isString(n)&&n.match(C.VARIABLE_REGEXP)&&(n=await this.resolveString(u,i,n,c,l)),n})}fsPath(u){return this._labelService?this._labelService.getUriLabel(u,{noPrefix:!0}):u.fsPath}async evaluateSingleVariable(u,i,f,c,l){let s;const d=f.split(":");d.length>1&&(f=d[0],s=d[1]);const n=g=>{const h=this._context.getFilePath();if(h)return h;throw new b.VariableError(g,(0,I.localize)(0,null,i))},a=g=>{const h=n(g);if(this._context.getWorkspaceFolderPathForFile){const v=this._context.getWorkspaceFolderPathForFile();if(v)return v}throw new b.VariableError(g,(0,I.localize)(1,null,i,t.basename(h)))},o=g=>{if(s){const h=this._context.getFolderUri(s);if(h)return h;throw new b.VariableError(g,(0,I.localize)(2,null,i,s))}if(c)return c;throw this._context.getWorkspaceFolderCount()>1?new b.VariableError(g,(0,I.localize)(3,null,i)):new b.VariableError(g,(0,I.localize)(4,null,i))};switch(f){case"env":if(s){if(u.env){const g=u.env[k.isWindows?s.toLowerCase():s];if(R.isString(g))return g}return""}throw new b.VariableError(b.VariableKind.Env,(0,I.localize)(5,null,i));case"config":if(s){const g=this._context.getConfigurationValue(c,s);if(R.isUndefinedOrNull(g))throw new b.VariableError(b.VariableKind.Config,(0,I.localize)(6,null,i,s));if(R.isObject(g))throw new b.VariableError(b.VariableKind.Config,(0,I.localize)(7,null,i,s));return g}throw new b.VariableError(b.VariableKind.Config,(0,I.localize)(8,null,i));case"command":return this.resolveFromMap(b.VariableKind.Command,i,s,l,"command");case"input":return this.resolveFromMap(b.VariableKind.Input,i,s,l,"input");case"extensionInstallFolder":if(s){const g=await this._context.getExtension(s);if(!g)throw new b.VariableError(b.VariableKind.ExtensionInstallFolder,(0,I.localize)(9,null,i,s));return this.fsPath(g.extensionLocation)}throw new b.VariableError(b.VariableKind.ExtensionInstallFolder,(0,I.localize)(10,null,i));default:switch(f){case"workspaceRoot":case"workspaceFolder":return(0,E.normalizeDriveLetter)(this.fsPath(o(b.VariableKind.WorkspaceFolder)));case"cwd":return c||s?(0,E.normalizeDriveLetter)(this.fsPath(o(b.VariableKind.Cwd))):p.cwd();case"workspaceRootFolderName":case"workspaceFolderBasename":return t.basename(this.fsPath(o(b.VariableKind.WorkspaceFolderBasename)));case"userHome":{if(u.userHome)return u.userHome;throw new b.VariableError(b.VariableKind.UserHome,(0,I.localize)(11,null,i))}case"lineNumber":{const g=this._context.getLineNumber();if(g)return g;throw new b.VariableError(b.VariableKind.LineNumber,(0,I.localize)(12,null,i))}case"selectedText":{const g=this._context.getSelectedText();if(g)return g;throw new b.VariableError(b.VariableKind.SelectedText,(0,I.localize)(13,null,i))}case"file":return n(b.VariableKind.File);case"fileWorkspaceFolder":return a(b.VariableKind.FileWorkspaceFolder);case"relativeFile":return c||s?t.relative(this.fsPath(o(b.VariableKind.RelativeFile)),n(b.VariableKind.RelativeFile)):n(b.VariableKind.RelativeFile);case"relativeFileDirname":{const g=t.dirname(n(b.VariableKind.RelativeFileDirname));if(c||s){const h=t.relative(this.fsPath(o(b.VariableKind.RelativeFileDirname)),g);return h.length===0?".":h}return g}case"fileDirname":return t.dirname(n(b.VariableKind.FileDirname));case"fileExtname":return t.extname(n(b.VariableKind.FileExtname));case"fileBasename":return t.basename(n(b.VariableKind.FileBasename));case"fileBasenameNoExtension":{const g=t.basename(n(b.VariableKind.FileBasenameNoExtension));return g.slice(0,g.length-t.extname(g).length)}case"fileDirnameBasename":return t.basename(t.dirname(n(b.VariableKind.FileDirnameBasename)));case"execPath":{const g=this._context.getExecPath();return g||i}case"execInstallFolder":{const g=this._context.getAppRoot();return g||i}case"pathSeparator":return t.sep;default:try{const g=s?`${f}:${s}`:f;return this.resolveFromMap(b.VariableKind.Unknown,i,g,l,void 0)}catch{return i}}}}resolveFromMap(u,i,f,c,l){if(f&&c){const s=l===void 0?c[f]:c[l+":"+f];if(typeof s=="string")return s;throw new b.VariableError(u,(0,I.localize)(14,null,i))}return i}}e.AbstractVariableResolverService=C,C.VARIABLE_LHS="${",C.VARIABLE_REGEXP=/\$\{(.*?)\}/g}),define(ae[2443],le([1,0,11,22,13,105,1996,43,910]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseConfigurationResolverService=void 0;class b extends I.AbstractVariableResolverService{constructor(C,r,u,i,f,c,l,s,d,n){super({getFolderUri:a=>{const o=c.getWorkspace().folders.filter(g=>g.name===a).pop();return o?o.uri:void 0},getWorkspaceFolderCount:()=>c.getWorkspace().folders.length,getConfigurationValue:(a,o)=>i.getValue(o,a?{resource:a}:{}),getAppRoot:()=>C.getAppRoot(),getExecPath:()=>C.getExecPath(),getFilePath:()=>{const a=E.EditorResourceAccessor.getOriginalUri(u.activeEditor,{supportSideBySide:E.SideBySideEditor.PRIMARY,filterByScheme:[p.Schemas.file,p.Schemas.vscodeUserData,this.pathService.defaultUriScheme]});if(!!a)return this.labelService.getUriLabel(a,{noPrefix:!0})},getWorkspaceFolderPathForFile:()=>{const a=E.EditorResourceAccessor.getOriginalUri(u.activeEditor,{supportSideBySide:E.SideBySideEditor.PRIMARY,filterByScheme:[p.Schemas.file,p.Schemas.vscodeUserData,this.pathService.defaultUriScheme]});if(!a)return;const o=c.getWorkspaceFolder(a);if(!!o)return this.labelService.getUriLabel(o.uri,{noPrefix:!0})},getSelectedText:()=>{const a=u.activeTextEditorControl;let o=null;if((0,A.isCodeEditor)(a))o=a;else if((0,A.isDiffEditor)(a)){const v=a.getOriginalEditor(),m=a.getModifiedEditor();o=v.hasWidgetFocus()?v:m}const g=o?.getModel(),h=o?.getSelection();if(g&&h)return g.getValueInRange(h)},getLineNumber:()=>{const a=u.activeTextEditorControl;if((0,A.isCodeEditor)(a)){const o=a.getSelection();if(o){const g=o.positionLineNumber;return String(g)}}},getExtension:a=>n.getExtension(a)},s,d.userHome().then(a=>a.path),r),this.configurationService=i,this.commandService=f,this.workspaceContextService=c,this.quickInputService=l,this.labelService=s,this.pathService=d,this.userInputAccessQueue=new t.Queue}async resolveWithInteractionReplace(C,r,u,i,f){return r=await this.resolveAnyAsync(C,r),this.resolveWithInteraction(C,r,u,i,f).then(c=>c?c.size>0?this.resolveAnyAsync(C,r,Object.fromEntries(c)):r:null)}async resolveWithInteraction(C,r,u,i,f){const c=await this.resolveAnyMap(C,r);r=c.newConfig;const l=c.resolvedVariables;return this.resolveWithInputAndCommands(C,r,i,u,f).then(s=>{if(this.updateMapping(s,l))return l})}updateMapping(C,r){if(!C)return!1;for(const[u,i]of Object.entries(C))r.set(u,i);return!0}async resolveWithInputAndCommands(C,r,u,i,f){if(!r)return Promise.resolve(void 0);let c=[];if(this.workspaceContextService.getWorkbenchState()!==1&&i){const d=C?{resource:C.uri}:{},n=this.configurationService.inspect(i,d);if(n&&(n.userValue||n.workspaceValue||n.workspaceFolderValue))switch(f){case 2:c=n.userValue?.inputs;break;case 5:c=n.workspaceValue?.inputs;break;default:c=n.workspaceFolderValue?.inputs}else{const a=this.configurationService.getValue(i,d);a&&(c=a.inputs)}}const l=[];this.findVariables(r,l);const s=Object.create(null);for(const d of l){const[n,a]=d.split(":",2);let o;switch(n){case"input":o=await this.showUserInput(a,c);break;case"command":{const g=(u?u[a]:void 0)||a;if(o=await this.commandService.executeCommand(g,r),typeof o!="string"&&!R.isUndefinedOrNull(o))throw new Error(k.localize(0,null,g));break}default:this._contributedVariables.has(d)&&(o=await this._contributedVariables.get(d)())}if(typeof o=="string")s[d]=o;else return}return s}findVariables(C,r){if(typeof C=="string"){let u;for(;(u=b.INPUT_OR_COMMAND_VARIABLES_PATTERN.exec(C))!==null;)if(u.length===4){const i=u[1];r.indexOf(i)<0&&r.push(i)}for(const i of this._contributedVariables.keys())r.indexOf(i)<0&&C.indexOf("${"+i+"}")>=0&&r.push(i)}else if(Array.isArray(C))for(const u of C)this.findVariables(u,r);else if(C)for(const u of Object.values(C))this.findVariables(u,r)}showUserInput(C,r){if(!r)return Promise.reject(new Error(k.localize(1,null,C,"input")));const u=r.filter(i=>i.id===C).pop();if(u){const i=f=>{throw new Error(k.localize(2,null,C,u.type,f))};switch(u.type){case"promptString":{R.isString(u.description)||i("description");const f={prompt:u.description,ignoreFocusLost:!0};return u.default&&(f.value=u.default),u.password&&(f.password=u.password),this.userInputAccessQueue.queue(()=>this.quickInputService.input(f)).then(c=>c)}case"pickString":{if(R.isString(u.description)||i("description"),Array.isArray(u.options))for(const l of u.options)!R.isString(l)&&!R.isString(l.value)&&i("value");else i("options");const f=new Array;for(const l of u.options){const s=R.isString(l)?l:l.value,d=R.isString(l)?void 0:l.label,n={label:d?`${d}: ${s}`:s,value:s};s===u.default?(n.description=k.localize(3,null),f.unshift(n)):f.push(n)}const c={placeHolder:u.description,matchOnDetail:!0,ignoreFocusLost:!0};return this.userInputAccessQueue.queue(()=>this.quickInputService.pick(f,c,void 0)).then(l=>{if(l)return l.value})}case"command":return R.isString(u.command)||i("command"),this.userInputAccessQueue.queue(()=>this.commandService.executeCommand(u.command,u.args)).then(f=>{if(typeof f=="string"||R.isUndefinedOrNull(f))return f;throw new Error(k.localize(4,null,C,u.command))});default:throw new Error(k.localize(5,null,C))}}return Promise.reject(new Error(k.localize(6,null,C)))}}e.BaseConfigurationResolverService=b,b.INPUT_OR_COMMAND_VARIABLES_PATTERN=/\${((input|command):(.*?))}/g}),define(ae[2444],le([1,0,36,10,37,27,38,86,130,26,154,1272,243,14,8,2253,12,35,210,16,6,15,7,2]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuService=void 0;let h=class{get onDidShowContextMenu(){return this.impl.onDidShowContextMenu}get onDidHideContextMenu(){return this.impl.onDidHideContextMenu}constructor(w,D,y,T,_,L,M,O){!u.isMacintosh&&(0,r.getTitleBarStyle)(T)==="custom"?this.impl=new f.ContextMenuService(D,w,_,y,L,M,O):this.impl=new v(w,D,y,M,O)}dispose(){this.impl.dispose()}showContextMenu(w){this.impl.showContextMenu(w)}};h=we([F(0,b.INotificationService),F(1,A.ITelemetryService),F(2,k.IKeybindingService),F(3,i.IConfigurationService),F(4,R.IContextViewService),F(5,c.IThemeService),F(6,a.IMenuService),F(7,o.IContextKeyService)],h),e.ContextMenuService=h;let v=class extends g.Disposable{constructor(w,D,y,T,_){super(),this.notificationService=w,this.telemetryService=D,this.keybindingService=y,this.menuService=T,this.contextKeyService=_,this._onDidShowContextMenu=this._store.add(new n.Emitter),this.onDidShowContextMenu=this._onDidShowContextMenu.event,this._onDidHideContextMenu=this._store.add(new n.Emitter),this.onDidHideContextMenu=this._onDidHideContextMenu.event}showContextMenu(w){w=f.ContextMenuMenuDelegate.transform(w,this.menuService,this.contextKeyService);const D=w.getActions();if(D.length){const y=(0,S.once)(()=>{w.onHide?.(!1),p.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidHideContextMenu.fire()}),T=this.createMenu(w,D,y),_=w.getAnchor();let L,M,O=(0,E.getZoomFactor)();if(p.isHTMLElement(_)){const N=p.getDomNodePagePosition(_);O*=p.getDomNodeZoomLevel(_),w.anchorAxisAlignment===1?(w.anchorAlignment===0?(L=N.left,M=N.top):(L=N.left+N.width,M=N.top),u.isMacintosh||window.screen.height-M<D.length*(u.isWindows?45:32)&&(M+=N.height)):w.anchorAlignment===0?(L=N.left,M=N.top+N.height):(L=N.left+N.width,M=N.top+N.height),u.isMacintosh&&(M+=4/O)}else{const N=_;L=N.x+1,M=N.y}L*=O,M*=O,(0,C.popup)(T,{x:Math.floor(L),y:Math.floor(M),positioningItem:w.autoSelectFirstItem?0:void 0},()=>y()),this._onDidShowContextMenu.fire()}}createMenu(w,D,y,T=new Set){const _=w.actionRunner||new t.ActionRunner;return(0,d.coalesce)(D.map(L=>this.createMenuItem(w,L,_,y,T)))}createMenuItem(w,D,y,T,_){if(D instanceof t.Separator)return{type:"separator"};if(D instanceof t.SubmenuAction){if(_.has(D.id)){console.warn(`Found submenu cycle: ${D.id}`);return}return{label:(0,I.unmnemonicLabel)((0,s.stripIcons)(D.label)).trim(),submenu:this.createMenu(w,D.actions,T,new Set([..._,D.id]))}}else{let L;D.checked&&(typeof w.getCheckedActionsRepresentation=="function"?L=w.getCheckedActionsRepresentation(D):L="checkbox");const M={label:(0,I.unmnemonicLabel)((0,s.stripIcons)(D.label)).trim(),checked:!!D.checked,type:L,enabled:!!D.enabled,click:N=>{T(),this.runAction(y,D,w,N)}},O=w.getKeyBinding?w.getKeyBinding(D):this.keybindingService.lookupKeybinding(D.id);if(O){const N=O.getElectronAccelerator();if(N)M.accelerator=N;else{const P=O.getLabel();P&&(M.label=`${M.label} [${P}]`)}}return M}}async runAction(w,D,y,T){this.telemetryService.publicLog2("workbenchActionExecuted",{id:D.id,from:"contextMenu"});const _=y.getActionsContext?y.getActionsContext(T):void 0,L=w.run(D,_);try{await L}catch(M){this.notificationService.error(M)}}};v=we([F(0,b.INotificationService),F(1,A.ITelemetryService),F(2,k.IKeybindingService),F(3,a.IMenuService),F(4,o.IContextKeyService)],v),(0,l.registerSingleton)(R.IContextMenuService,h,1)}),define(ae[2445],le([1,0,330,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerMainProcessRemoteService)(t.ICredentialsService,"credentials")}),define(ae[292],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDecorationsService=void 0,e.IDecorationsService=(0,t.createDecorator)("IFileDecorationsService")}),define(ae[2446],le([1,0,6,292,220,2,11,158,10,12,28,2e3,21,32,35,108,57,16,33,63]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsService=void 0;class n{static keyOf(w){if(Array.isArray(w))return w.map(n.keyOf).join(",");{const{color:D,letter:y}=w;return b.ThemeIcon.isThemeIcon(y)?`${D}+${y.id}`:`${D}/${y}`}}constructor(w,D,y){this.themeService=w,this._refCounter=0,this.data=D;const T=(0,f.hash)(y).toString(36);this.itemColorClassName=`${n._classNamesPrefix}-itemColor-${T}`,this.itemBadgeClassName=`${n._classNamesPrefix}-itemBadge-${T}`,this.bubbleBadgeClassName=`${n._classNamesPrefix}-bubbleBadge-${T}`,this.iconBadgeClassName=`${n._classNamesPrefix}-iconBadge-${T}`}acquire(){this._refCounter+=1}release(){return--this._refCounter===0}appendCSSRules(w){Array.isArray(this.data)?this._appendForMany(this.data,w):this._appendForOne(this.data,w)}_appendForOne(w,D){const{color:y,letter:T}=w;(0,I.createCSSRule)(`.${this.itemColorClassName}`,`color: ${h(y)};`,D),b.ThemeIcon.isThemeIcon(T)?this._createIconCSSRule(T,y,D):T&&(0,I.createCSSRule)(`.${this.itemBadgeClassName}::after`,`content: "${T}"; color: ${h(y)};`,D)}_appendForMany(w,D){const{color:y}=w[0];(0,I.createCSSRule)(`.${this.itemColorClassName}`,`color: ${h(y)};`,D);const T=[];let _;for(const L of w)if(b.ThemeIcon.isThemeIcon(L.letter)){_=L.letter;break}else L.letter&&T.push(L.letter);_?this._createIconCSSRule(_,y,D):(T.length&&(0,I.createCSSRule)(`.${this.itemBadgeClassName}::after`,`content: "${T.join(", ")}"; color: ${h(y)};`,D),(0,I.createCSSRule)(`.${this.bubbleBadgeClassName}::after`,`content: "\uEA71"; color: ${h(y)}; font-family: codicon; font-size: 14px; margin-right: 14px; opacity: 0.4;`,D))}_createIconCSSRule(w,D,y){const T=b.ThemeIcon.getModifier(w);T&&(w=b.ThemeIcon.modify(w,void 0));const _=(0,d.getIconRegistry)().getIcon(w.id);if(!_)return;const L=this.themeService.getProductIconTheme().getIcon(_);!L||(0,I.createCSSRule)(`.${this.iconBadgeClassName}::after`,`content: '${L.fontCharacter}'; color: ${h(D)}; font-family: ${(0,I.asCSSPropertyValue)(L.font?.id??"codicon")}; font-size: 16px; margin-right: 14px; font-weight: normal; ${T==="spin"?"animation: codicon-spin 1.5s steps(30) infinite":""}; `,y)}removeCSSRules(w){(0,I.removeCSSRulesContainingSelector)(this.itemColorClassName,w),(0,I.removeCSSRulesContainingSelector)(this.itemBadgeClassName,w),(0,I.removeCSSRulesContainingSelector)(this.bubbleBadgeClassName,w),(0,I.removeCSSRulesContainingSelector)(this.iconBadgeClassName,w)}}n._classNamesPrefix="monaco-decoration";class a{constructor(w){this._themeService=w,this._styleElement=(0,I.createStyleSheet)(),this._decorationRules=new Map,this._dispoables=new A.DisposableStore}dispose(){this._dispoables.dispose(),this._styleElement.remove()}asDecoration(w,D){w.sort((P,B)=>(B.weight||0)-(P.weight||0));const y=n.keyOf(w);let T=this._decorationRules.get(y);T||(T=new n(this._themeService,w,y),this._decorationRules.set(y,T),T.appendCSSRules(this._styleElement)),T.acquire();const _=T.itemColorClassName;let L=T.itemBadgeClassName;const M=T.iconBadgeClassName;let O=(0,l.distinct)(w.filter(P=>!(0,S.isFalsyOrWhitespace)(P.tooltip)).map(P=>P.tooltip)).join(" \u2022 ");const N=w.some(P=>P.strikethrough);return D&&(L=T.bubbleBadgeClassName,O=(0,C.localize)(0,null)),{labelClassName:_,badgeClassName:L,iconClassName:M,strikethrough:N,tooltip:O,dispose:()=>{T?.release()&&(this._decorationRules.delete(y),T.removeCSSRules(this._styleElement),T=void 0)}}}}class o{constructor(w){this._data=R.TernarySearchTree.forUris(D=>!0),this._data.fill(!0,(0,l.asArray)(w))}affectsResource(w){return this._data.get(w)??this._data.findSuperstr(w)!==void 0}}class g{constructor(w,D){this.source=w,this.thenable=D}}function h(m){return m?`var(${(0,s.asCssVariableName)(m)})`:"inherit"}let v=class{constructor(w,D){this._onDidChangeDecorationsDelayed=new t.DebounceEmitter({merge:y=>y.flat()}),this._onDidChangeDecorations=new t.Emitter,this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._provider=new E.LinkedList,this._decorationStyles=new a(D),this._data=R.TernarySearchTree.forUris(y=>w.extUri.ignorePathCasing(y)),this._onDidChangeDecorationsDelayed.event(y=>{this._onDidChangeDecorations.fire(new o(y))})}dispose(){this._onDidChangeDecorations.dispose(),this._onDidChangeDecorationsDelayed.dispose()}registerDecorationsProvider(w){const D=this._provider.unshift(w);this._onDidChangeDecorations.fire({affectsResource(){return!0}});const y=()=>{const _=[];for(const[L,M]of this._data)M.delete(w)&&_.push(L);_.length>0&&this._onDidChangeDecorationsDelayed.fire(_)},T=w.onDidChange(_=>{if(!_)y();else for(const L of _){const M=this._ensureEntry(L);this._fetchData(M,L,w)}});return(0,A.toDisposable)(()=>{D(),T.dispose(),y()})}_ensureEntry(w){let D=this._data.get(w);return D||(D=new Map,this._data.set(w,D)),D}getDecoration(w,D){const y=[];let T=!1;const _=this._ensureEntry(w);for(const L of this._provider){let M=_.get(L);M===void 0&&(M=this._fetchData(_,w,L)),M&&!(M instanceof g)&&y.push(M)}if(D){const L=this._data.findSuperstr(w);if(L)for(const M of L)for(const O of M[1].values())O&&!(O instanceof g)&&O.bubble&&(y.push(O),T=!0)}return y.length===0?void 0:this._decorationStyles.asDecoration(y,T)}_fetchData(w,D,y){const T=w.get(y);T instanceof g&&(T.source.cancel(),w.delete(y));const _=new u.CancellationTokenSource,L=y.provideDecorations(D,_.token);if((0,k.isThenable)(L)){const M=new g(_,Promise.resolve(L).then(O=>{w.get(y)===M&&this._keepItem(w,y,D,O)}).catch(O=>{!(0,r.isCancellationError)(O)&&w.get(y)===M&&w.delete(y)}));return w.set(y,M),null}else return this._keepItem(w,y,D,L)}_keepItem(w,D,y,T){const _=T||null,L=w.get(D);return w.set(D,_),(_||L)&&this._onDidChangeDecorationsDelayed.fire(y),_}};v=we([F(0,c.IUriIdentityService),F(1,b.IThemeService)],v),e.DecorationsService=v,(0,i.registerSingleton)(p.IDecorationsService,v,1)}),define(ae[663],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorDropService=void 0,e.IEditorDropService=(0,t.createDecorator)("editorDropService")}),define(ae[58],le([1,0,5,43]),function(J,e,t,p){"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 R;(function(i){i[i.UP=0]="UP",i[i.DOWN=1]="DOWN",i[i.LEFT=2]="LEFT",i[i.RIGHT=3]="RIGHT"})(R=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 E;(function(i){i[i.MAXIMIZE=0]="MAXIMIZE",i[i.EVEN=1]="EVEN",i[i.TOGGLE=2]="TOGGLE"})(E=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 b(i){const f=i;return(0,p.isEditorInput)(f?.editor)&&(0,p.isEditorInput)(f?.replacement)}e.isEditorReplacement=b;var S;(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"})(S=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 r(i){const f=i;return!!f&&typeof f.id=="number"&&Array.isArray(f.editors)}e.isEditorGroup=r;function u(i){return i.getValue("workbench.editor.openSideBySideDirection")==="down"?1:3}e.preferredSideBySideGroupDirection=u}),define(ae[169],le([1,0,144,22,53,18,2004,214,55,5,17]),function(J,e,t,p,R,A,k,E,I,b,S){"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,b.createDecorator)("editorResolverService"),e.editorsAssociationsSettingId="workbench.editorAssociations";const C=S.Registry.as(I.Extensions.Configuration),r={...E.workbenchConfigurationNodeBase,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:(0,k.localize)(0,null),additionalProperties:{type:"string"}}}};C.registerConfiguration(r);var u;(function(l){l.builtin="builtin",l.option="option",l.exclusive="exclusive",l.default="default"})(u=e.RegisteredEditorPriority||(e.RegisteredEditorPriority={}));var i;(function(l){l[l.ABORT=1]="ABORT",l[l.NONE=2]="NONE"})(i=e.ResolvedStatus||(e.ResolvedStatus={}));function f(l){switch(l){case u.exclusive:return 5;case u.default:return 4;case u.builtin:return 3;case u.option:default:return 1}}e.priorityToRank=f;function c(l,s){if(new Set([p.Schemas.extension,p.Schemas.webviewPanel,p.Schemas.vscodeWorkspaceTrust,p.Schemas.walkThrough,p.Schemas.vscodeSettings]).has(s.scheme))return!1;const a=typeof l=="string"&&l.indexOf(R.posix.sep)>=0?`${s.scheme}:${s.path}`:(0,A.basename)(s);return t.match(typeof l=="string"?l.toLowerCase():l,a.toLowerCase())}e.globMatchesResource=c}),define(ae[389],le([1,0,16,1587,7,5,169]),function(J,e,t,p,R,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 R.RawContextKey("activeCustomEditorId","",{type:"string",description:p.localize(0,null)}),e.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE=new R.RawContextKey("focusedCustomEditorIsEditable",!1);var E;(function(C){C.default="default",C.builtin="builtin",C.option="option"})(E=e.CustomEditorPriority||(e.CustomEditorPriority={}));class I{constructor(r){this.id=r.id,this.displayName=r.displayName,this.providerDisplayName=r.providerDisplayName,this.priority=r.priority,this.selector=r.selector}matches(r){return this.selector.some(u=>u.filenamePattern&&(0,k.globMatchesResource)(u.filenamePattern,r))}}e.CustomEditorInfo=I;class b{constructor(r){this.allEditors=(0,t.distinct)(r,u=>u.id)}get length(){return this.allEditors.length}get defaultEditor(){return this.allEditors.find(r=>{switch(r.priority){case k.RegisteredEditorPriority.default:case k.RegisteredEditorPriority.builtin:return this.allEditors.every(u=>u===r||S(u,r));default:return!1}})}get bestAvailableEditor(){return Array.from(this.allEditors).sort((u,i)=>(0,k.priorityToRank)(u.priority)-(0,k.priorityToRank)(i.priority))[0]}}e.CustomEditorInfoCollection=b;function S(C,r){return(0,k.priorityToRank)(C.priority)<(0,k.priorityToRank)(r.priority)}}),define(ae[24],le([1,0,5,58]),function(J,e,t,p){"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 R(A){const k=A;return typeof A=="number"||(0,p.isEditorGroup)(k)}e.isPreferredGroup=R}),define(ae[348],le([1,0,140,105,6,38,12,10,73,33,5,2,18,24,94,15,84,7,226]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FloatingClickMenu=e.FloatingClickWidget=e.RangeHighlightDecorations=void 0;let d=class ys extends C.Disposable{constructor(g){super(),this.editorService=g,this._onHighlightRemoved=this._register(new R.Emitter),this.onHighlightRemoved=this._onHighlightRemoved.event,this.rangeHighlightDecorationId=null,this.editor=null,this.editorDisposables=this._register(new C.DisposableStore)}removeHighlightRange(){if(this.editor&&this.rangeHighlightDecorationId){const g=this.rangeHighlightDecorationId;this.editor.changeDecorations(h=>{h.removeDecoration(g)}),this._onHighlightRemoved.fire()}this.rangeHighlightDecorationId=null}highlightRange(g,h){h=h??this.getEditor(g),(0,p.isCodeEditor)(h)?this.doHighlightRange(h,g):(0,p.isCompositeEditor)(h)&&(0,p.isCodeEditor)(h.activeCodeEditor)&&this.doHighlightRange(h.activeCodeEditor,g)}doHighlightRange(g,h){this.removeHighlightRange(),g.changeDecorations(v=>{this.rangeHighlightDecorationId=v.addDecoration(h.range,this.createRangeHighlightDecoration(h.isWholeLine))}),this.setEditor(g)}getEditor(g){const h=this.editorService.activeEditor?.resource;if(h&&(0,r.isEqual)(h,g.resource)&&(0,p.isCodeEditor)(this.editorService.activeTextEditorControl))return this.editorService.activeTextEditorControl}setEditor(g){this.editor!==g&&(this.editorDisposables.clear(),this.editor=g,this.editorDisposables.add(this.editor.onDidChangeCursorPosition(h=>{(h.reason===0||h.reason===3||h.reason===5||h.reason===6)&&this.removeHighlightRange()})),this.editorDisposables.add(this.editor.onDidChangeModel(()=>{this.removeHighlightRange()})),this.editorDisposables.add(this.editor.onDidDispose(()=>{this.removeHighlightRange(),this.editor=null})))}createRangeHighlightDecoration(g=!0){return g?ys._WHOLE_LINE_RANGE_HIGHLIGHT:ys._RANGE_HIGHLIGHT}dispose(){super.dispose(),this.editor?.getModel()&&(this.removeHighlightRange(),this.editor=null)}};d._WHOLE_LINE_RANGE_HIGHLIGHT=i.ModelDecorationOptions.register({description:"codeeditor-range-highlight-whole",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),d._RANGE_HIGHLIGHT=i.ModelDecorationOptions.register({description:"codeeditor-range-highlight",stickiness:1,className:"rangeHighlight"}),d=we([F(0,u.IEditorService)],d),e.RangeHighlightDecorations=d;let n=class extends t.Widget{constructor(g,h,v,m,w){if(super(),this.editor=g,this.label=h,this.themeService=w,this._onClick=this._register(new R.Emitter),this.onClick=this._onClick.event,this._domNode=(0,E.$)(".floating-click-widget"),this._domNode.style.padding="6px 11px",this._domNode.style.borderRadius="2px",this._domNode.style.cursor="pointer",v){const D=m.lookupKeybinding(v);D&&(this.label+=` (${D.getLabel()})`)}}getId(){return"editor.overlayWidget.floatingClickWidget"}getDomNode(){return this._domNode}getPosition(){return{preference:1}}render(){(0,E.clearNode)(this._domNode),this._register((0,I.attachStylerCallback)(this.themeService,{buttonBackground:b.buttonBackground,buttonForeground:b.buttonForeground,editorBackground:b.editorBackground,editorForeground:b.editorForeground,contrastBorder:b.contrastBorder},g=>{const h=g.buttonBackground?g.buttonBackground:g.editorBackground;h&&(this._domNode.style.backgroundColor=h.toString());const v=g.buttonForeground?g.buttonForeground:g.editorForeground;v&&(this._domNode.style.color=v.toString());const m=g.contrastBorder?g.contrastBorder.toString():"";this._domNode.style.borderWidth=m?"1px":"",this._domNode.style.borderStyle=m?"solid":"",this._domNode.style.borderColor=m})),(0,E.append)(this._domNode,(0,E.$)("")).textContent=this.label,this.onclick(this._domNode,g=>this._onClick.fire()),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}};n=we([F(3,A.IKeybindingService),F(4,k.IThemeService)],n),e.FloatingClickWidget=n;let a=class extends C.Disposable{constructor(g,h,v,m){if(super(),!(g instanceof s.EmbeddedCodeEditorWidget)){const w=v.createMenu(f.MenuId.EditorContent,m),D=new C.DisposableStore,y=()=>{if(D.clear(),!g.hasModel()||g.getOption(55))return;const T=[];if((0,c.createAndFillInActionBarActions)(w,{renderShortTitle:!0,shouldForwardArgs:!0},T),T.length===0)return;const[_]=T,L=h.createInstance(n,g,_.label,_.id);D.add(L),D.add(L.onClick(()=>_.run(g.getModel().uri))),L.render()};this._store.add(w),this._store.add(D),this._store.add(w.onDidChange(y)),y()}}};a.ID="editor.contrib.floatingClickMenu",a=we([F(1,S.IInstantiationService),F(2,f.IMenuService),F(3,l.IContextKeyService)],a),e.FloatingClickMenu=a}),define(ae[664],le([1,0,1495,48,252,58,43,24,54,42,199,417,29,1110]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AllEditorsByMostRecentlyUsedQuickAccess=e.AllEditorsByAppearanceQuickAccess=e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=e.BaseEditorQuickAccessProvider=void 0;let u=class extends R.PickerQuickAccessProvider{constructor(s,d,n,a,o){super(s,{canAcceptInBackground:!0,noResultsPick:{label:(0,t.localize)(0,null),groupId:-1}}),this.editorGroupService=d,this.editorService=n,this.modelService=a,this.languageService=o,this.pickState=new class{constructor(){this.scorerCache=Object.create(null),this.isQuickNavigating=void 0}reset(g){g||(this.scorerCache=Object.create(null)),this.isQuickNavigating=g}}}provide(s,d){return this.pickState.reset(!!s.quickNavigate),super.provide(s,d)}_getPicks(s){const d=(0,C.prepareQuery)(s),n=this.doGetEditorPickItems().filter(o=>{if(!d.normalized)return!0;const g=(0,C.scoreItemFuzzy)(o,d,!0,p.quickPickItemScorerAccessor,this.pickState.scorerCache);return g.score?(o.highlights={label:g.labelMatch,description:g.descriptionMatch},!0):!1});if(d.normalized){const o=this.editorGroupService.getGroups(2).map(g=>g.id);n.sort((g,h)=>g.groupId!==h.groupId?o.indexOf(g.groupId)-o.indexOf(h.groupId):(0,C.compareItemsByFuzzyScore)(g,h,d,!0,p.quickPickItemScorerAccessor,this.pickState.scorerCache))}const a=[];if(this.editorGroupService.count>1){let o;for(const g of n){if(typeof o!="number"||o!==g.groupId){const h=this.editorGroupService.getGroup(g.groupId);h&&a.push({type:"separator",label:h.label}),o=g.groupId}a.push(g)}}else a.push(...n);return a}doGetEditorPickItems(){const s=this.doGetEditors(),d=new Map;for(const{groupId:n}of s)if(!d.has(n)){const a=this.editorGroupService.getGroup(n);a&&d.set(n,a.ariaLabel)}return this.doGetEditors().map(({editor:n,groupId:a})=>{const o=k.EditorResourceAccessor.getOriginalUri(n,{supportSideBySide:k.SideBySideEditor.PRIMARY}),g=n.isDirty()&&!n.isSaving(),h=n.getDescription(),v=h?`${n.getName()} ${h}`:n.getName();return{groupId:a,resource:o,label:n.getName(),ariaLabel:(()=>d.size>1?g?(0,t.localize)(1,null,v,d.get(a)):(0,t.localize)(2,null,v,d.get(a)):g?(0,t.localize)(3,null,v):v)(),description:h,iconClasses:(0,S.getIconClasses)(this.modelService,this.languageService,o).concat(n.getLabelExtraClasses()),italic:!this.editorGroupService.getGroup(a)?.isPinned(n),buttons:(()=>[{iconClass:g?"dirty-editor "+r.Codicon.closeDirty.classNames:r.Codicon.close.classNames,tooltip:(0,t.localize)(4,null),alwaysVisible:g}])(),trigger:async()=>{const m=this.editorGroupService.getGroup(a);return m&&(await m.closeEditor(n,{preserveFocus:!0}),!m.contains(n))?R.TriggerAction.REMOVE_ITEM:R.TriggerAction.NO_ACTION},accept:(m,w)=>this.editorGroupService.getGroup(a)?.openEditor(n,{preserveFocus:w.inBackground})}})}};u=we([F(1,A.IEditorGroupsService),F(2,E.IEditorService),F(3,I.IModelService),F(4,b.ILanguageService)],u),e.BaseEditorQuickAccessProvider=u;let i=class Na extends u{constructor(s,d,n,a){super(Na.PREFIX,s,d,n,a)}doGetEditors(){const s=this.editorGroupService.activeGroup;return s.getEditors(0).map(d=>({editor:d,groupId:s.id}))}};i.PREFIX="edt active ",i=we([F(0,A.IEditorGroupsService),F(1,E.IEditorService),F(2,I.IModelService),F(3,b.ILanguageService)],i),e.ActiveGroupEditorsByMostRecentlyUsedQuickAccess=i;let f=class xa extends u{constructor(s,d,n,a){super(xa.PREFIX,s,d,n,a)}doGetEditors(){const s=[];for(const d of this.editorGroupService.getGroups(2))for(const n of d.getEditors(1))s.push({editor:n,groupId:d.id});return s}};f.PREFIX="edt ",f=we([F(0,A.IEditorGroupsService),F(1,E.IEditorService),F(2,I.IModelService),F(3,b.ILanguageService)],f),e.AllEditorsByAppearanceQuickAccess=f;let c=class Fa extends u{constructor(s,d,n,a){super(Fa.PREFIX,s,d,n,a)}doGetEditors(){const s=[];for(const d of this.editorService.getEditors(0))s.push(d);return s}};c.PREFIX="edt mru ",c=we([F(0,A.IEditorGroupsService),F(1,E.IEditorService),F(2,I.IModelService),F(3,b.ILanguageService)],c),e.AllEditorsByMostRecentlyUsedQuickAccess=c}),define(ae[911],le([1,0,6,43,188,23,5,27,12,114,58,24,2]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorWithViewState=void 0;let u=class extends R.EditorPane{constructor(f,c,l,s,d,n,a,o,g){super(f,l,a,d),this.instantiationService=s,this.textResourceConfigurationService=n,this.editorService=o,this.editorGroupService=g,this.groupListener=this._register(new r.MutableDisposable),this.viewState=this.getEditorMemento(g,n,c,100)}setEditorVisible(f,c){this.groupListener.value=c?.onWillCloseEditor(l=>this.onWillCloseEditor(l)),super.setEditorVisible(f,c)}onWillCloseEditor(f){const c=f.editor;c===this.input&&this.updateEditorViewState(c)}clearInput(){this.updateEditorViewState(this.input),super.clearInput()}saveState(){this.updateEditorViewState(this.input),super.saveState()}updateEditorViewState(f){if(!f||!this.tracksEditorViewState(f))return;const c=this.toEditorViewStateResource(f);!c||(this.tracksDisposedEditorViewState()||(this.editorViewStateDisposables||(this.editorViewStateDisposables=new Map),this.editorViewStateDisposables.has(f)||this.editorViewStateDisposables.set(f,t.Event.once(f.onWillDispose)(()=>{this.clearEditorViewState(c,this.group),this.editorViewStateDisposables?.delete(f)}))),f.isDisposed()&&!this.tracksDisposedEditorViewState()||!this.shouldRestoreEditorViewState(f)&&(!this.group||!this.group.contains(f))?this.clearEditorViewState(c,this.group):f.isDisposed()||this.saveEditorViewState(c))}shouldRestoreEditorViewState(f,c){return c?.newInGroup?this.textResourceConfigurationService.getValue(p.EditorResourceAccessor.getOriginalUri(f,{supportSideBySide:p.SideBySideEditor.PRIMARY}),"workbench.editor.restoreViewState")!==!1:!0}getViewState(){const f=this.input;if(!f||!this.tracksEditorViewState(f))return;const c=this.toEditorViewStateResource(f);if(!!c)return this.computeEditorViewState(c)}saveEditorViewState(f){if(!this.group)return;const c=this.computeEditorViewState(f);!c||this.viewState.saveEditorState(this.group,f,c)}loadEditorViewState(f,c){if(!f||!this.group||!this.tracksEditorViewState(f)||!this.shouldRestoreEditorViewState(f,c))return;const l=this.toEditorViewStateResource(f);if(!!l)return this.viewState.loadEditorState(this.group,l)}moveEditorViewState(f,c,l){return this.viewState.moveEditorState(f,c,l)}clearEditorViewState(f,c){this.viewState.clearEditorState(f,c)}dispose(){if(super.dispose(),this.editorViewStateDisposables){for(const[,f]of this.editorViewStateDisposables)f.dispose();this.editorViewStateDisposables=void 0}}tracksDisposedEditorViewState(){return!1}};u=we([F(2,E.ITelemetryService),F(3,k.IInstantiationService),F(4,A.IStorageService),F(5,b.ITextResourceConfigurationService),F(6,I.IThemeService),F(7,C.IEditorService),F(8,S.IEditorGroupsService)],u),e.AbstractEditorWithViewState=u}),define(ae[177],le([1,0,6,1534,17,43,186,24]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SideBySideEditorInputSerializer=e.AbstractSideBySideEditorInputSerializer=e.SideBySideEditorInput=void 0;let I=class Bn extends k.EditorInput{get typeId(){return Bn.ID}get capabilities(){let r=this.primary.capabilities;return r&=-33,this.secondary.hasCapability(16)&&(r|=16),this.secondary.hasCapability(8)&&(r|=8),r|=256,r}get resource(){if(this.hasIdenticalSides)return this.primary.resource}constructor(r,u,i,f,c){super(),this.preferredName=r,this.preferredDescription=u,this.secondary=i,this.primary=f,this.editorService=c,this.hasIdenticalSides=this.primary.matches(this.secondary),this.registerListeners()}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 r=this.getPreferredName();return r||(this.hasIdenticalSides?this.primary.getName():(0,p.localize)(0,null,this.secondary.getName(),this.primary.getName()))}getPreferredName(){return this.preferredName}getDescription(r){const u=this.getPreferredDescription();return u||(this.hasIdenticalSides?this.primary.getDescription(r):super.getDescription(r))}getPreferredDescription(){return this.preferredDescription}getTitle(r){return this.hasIdenticalSides?this.primary.getTitle(r)??this.getName():super.getTitle(r)}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(r,u){const i=await this.primary.save(r,u);return this.saveResultToEditor(i)}async saveAs(r,u){const i=await this.primary.saveAs(r,u);return this.saveResultToEditor(i)}saveResultToEditor(r){if(!r||!this.hasIdenticalSides)return r;if(this.primary.matches(r))return this;if(r instanceof k.EditorInput)return new Bn(this.preferredName,this.preferredDescription,r,r,this.editorService);if(!(0,A.isResourceDiffEditorInput)(r)&&!(0,A.isResourceSideBySideEditorInput)(r)&&!(0,A.isResourceMergeEditorInput)(r))return{primary:r,secondary:r,label:this.preferredName,description:this.preferredDescription}}revert(r,u){return this.primary.revert(r,u)}async rename(r,u){if(!this.hasIdenticalSides)return;const i=await this.primary.rename(r,u);if(!!i){if((0,A.isEditorInput)(i.editor))return{editor:new Bn(this.preferredName,this.preferredDescription,i.editor,i.editor,this.editorService),options:{...i.options,viewState:(0,A.findViewStateForEditor)(this,r,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,r,this.editorService)}}}}}toUntyped(r){const u=this.primary.toUntyped(r),i=this.secondary.toUntyped(r);if(u&&i&&!(0,A.isResourceDiffEditorInput)(u)&&!(0,A.isResourceDiffEditorInput)(i)&&!(0,A.isResourceSideBySideEditorInput)(u)&&!(0,A.isResourceSideBySideEditorInput)(i)&&!(0,A.isResourceMergeEditorInput)(u)&&!(0,A.isResourceMergeEditorInput)(i)){const f={label:this.preferredName,description:this.preferredDescription,primary:u,secondary:i};return typeof r?.preserveViewState=="number"&&(f.options={viewState:(0,A.findViewStateForEditor)(this,r.preserveViewState,this.editorService)}),f}}matches(r){return this===r?!0:(0,A.isDiffEditorInput)(r)||(0,A.isResourceDiffEditorInput)(r)?!1:r instanceof Bn?this.primary.matches(r.primary)&&this.secondary.matches(r.secondary):(0,A.isResourceSideBySideEditorInput)(r)?this.primary.matches(r.primary)&&this.secondary.matches(r.secondary):!1}};I.ID="workbench.editorinputs.sidebysideEditorInput",I=we([F(4,E.IEditorService)],I),e.SideBySideEditorInput=I;class b{canSerialize(r){const u=r;if(u.primary&&u.secondary){const[i,f]=this.getSerializers(u.secondary.typeId,u.primary.typeId);return!!(i?.canSerialize(u.secondary)&&f?.canSerialize(u.primary))}return!1}serialize(r){const u=r;if(u.primary&&u.secondary){const[i,f]=this.getSerializers(u.secondary.typeId,u.primary.typeId);if(f&&i){const c=f.serialize(u.primary),l=i.serialize(u.secondary);if(c&&l){const s={name:u.getPreferredName(),description:u.getPreferredDescription(),primarySerialized:c,secondarySerialized:l,primaryTypeId:u.primary.typeId,secondaryTypeId:u.secondary.typeId};return JSON.stringify(s)}}}}deserialize(r,u){const i=JSON.parse(u),[f,c]=this.getSerializers(i.secondaryTypeId,i.primaryTypeId);if(c&&f){const l=c.deserialize(r,i.primarySerialized),s=f.deserialize(r,i.secondarySerialized);if(l instanceof k.EditorInput&&s instanceof k.EditorInput)return this.createEditorInput(r,i.name,i.description,s,l)}}getSerializers(r,u){const i=R.Registry.as(A.EditorExtensions.EditorFactory);return[i.getEditorSerializer(r),i.getEditorSerializer(u)]}}e.AbstractSideBySideEditorInputSerializer=b;class S extends b{createEditorInput(r,u,i,f,c){return r.createInstance(I,u,i,f,c)}}e.SideBySideEditorInputSerializer=S}),define(ae[2447],le([1,0,43,177,2,23,17,6,58,16,60,52]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorsObserver=void 0;let r=class gr extends R.Disposable{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,f){return typeof i!="string"?this.toIdentifier(i.typeId,i.editorId):f?`${i}/${f}`:i}constructor(i,f){super(),this.editorGroupsService=i,this.storageService=f,this.keyMap=new Map,this.mostRecentEditorsMap=new S.LinkedMap,this.editorsPerResourceCounter=new S.ResourceMap,this._onDidMostRecentlyActiveEditorsChange=this._register(new E.Emitter),this.onDidMostRecentlyActiveEditorsChange=this._onDidMostRecentlyActiveEditorsChange.event,this.registerListeners()}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 f=i.getEditors(0);for(let c=f.length-1;c>=0;c--)this.addMostRecentEditor(i,f[c],!1,!0);this.editorGroupsService.activeGroup===i&&i.activeEditor&&this.addMostRecentEditor(i,i.activeEditor,!0,!1),this.registerGroupListeners(i)}registerGroupListeners(i){const f=new R.DisposableStore;f.add(i.onDidModelChange(c=>{switch(c.kind){case 0:{this.editorGroupsService.activeGroup===i&&i.activeEditor&&this.addMostRecentEditor(i,i.activeEditor,!0,!1);break}case 3:{c.editor&&(this.addMostRecentEditor(i,c.editor,!1,!0),this.ensureOpenedEditorsLimit({groupId:i.id,editor:c.editor},i.id));break}}})),f.add(i.onDidCloseEditor(c=>{this.removeMostRecentEditor(i,c.editor)})),f.add(i.onDidActiveEditorChange(c=>{c.editor&&this.addMostRecentEditor(i,c.editor,this.editorGroupsService.activeGroup===i,!1)})),E.Event.once(i.onWillDispose)(()=>(0,R.dispose)(f))}onDidChangeEditorPartOptions(i){if(!(0,C.equals)(i.newPartOptions.limit,i.oldPartOptions.limit)){const f=this.editorGroupsService.activeGroup;let c;f.activeEditor&&(c={editor:f.activeEditor,groupId:f.id}),this.ensureOpenedEditorsLimit(c)}}addMostRecentEditor(i,f,c,l){const s=this.ensureKey(i,f),d=this.mostRecentEditorsMap.first;c||!d?this.mostRecentEditorsMap.set(s,s,d?1:void 0):(this.mostRecentEditorsMap.set(s,s,1),this.mostRecentEditorsMap.set(d,d,1)),l&&this.updateEditorResourcesMap(f,!0),this._onDidMostRecentlyActiveEditorsChange.fire()}updateEditorResourcesMap(i,f){let c,l,s;if(i instanceof p.SideBySideEditorInput?(c=i.primary.resource,l=i.primary.typeId,s=i.primary.editorId):(c=i.resource,l=i.typeId,s=i.editorId),!c)return;const d=this.toIdentifier(l,s);if(f){let n=this.editorsPerResourceCounter.get(c);n||(n=new Map,this.editorsPerResourceCounter.set(c,n)),n.set(d,(n.get(d)??0)+1)}else{const n=this.editorsPerResourceCounter.get(c);if(n){const a=n.get(d)??0;a>1?n.set(d,a-1):(n.delete(d),n.size===0&&this.editorsPerResourceCounter.delete(c))}}}removeMostRecentEditor(i,f){this.updateEditorResourcesMap(f,!1);const c=this.findKey(i,f);if(c){this.mostRecentEditorsMap.delete(c);const l=this.keyMap.get(i.id);l&&l.delete(c.editor)&&l.size===0&&this.keyMap.delete(i.id),this._onDidMostRecentlyActiveEditorsChange.fire()}}findKey(i,f){const c=this.keyMap.get(i.id);if(!!c)return c.get(f)}ensureKey(i,f){let c=this.keyMap.get(i.id);c||(c=new Map,this.keyMap.set(i.id,c));let l=c.get(f);return l||(l={groupId:i.id,editor:f},c.set(f,l)),l}async ensureOpenedEditorsLimit(i,f){if(!this.editorGroupsService.partOptions.limit?.enabled||typeof this.editorGroupsService.partOptions.limit.value!="number"||this.editorGroupsService.partOptions.limit.value<=0)return;const c=this.editorGroupsService.partOptions.limit.value;if(this.editorGroupsService.partOptions.limit?.perEditorGroup)if(typeof f=="number"){const l=this.editorGroupsService.getGroup(f);l&&await this.doEnsureOpenedEditorsLimit(c,l.getEditors(0).map(s=>({editor:s,groupId:f})),i)}else for(const l of this.editorGroupsService.groups)await this.ensureOpenedEditorsLimit(i,l.id);else await this.doEnsureOpenedEditorsLimit(c,[...this.mostRecentEditorsMap.values()],i)}async doEnsureOpenedEditorsLimit(i,f,c){let l;if(this.editorGroupsService.partOptions.limit?.excludeDirty?l=f.filter(({editor:a})=>!(a.isDirty()&&!a.isSaving())):l=f,i>=l.length)return;const s=l.reverse().filter(({editor:a,groupId:o})=>!(a.isDirty()&&!a.isSaving()||c&&a===c.editor&&o===c.groupId||this.editorGroupsService.getGroup(o)?.isSticky(a)));let d=l.length-i;const n=new Map;for(const{groupId:a,editor:o}of s){let g=n.get(a);if(g||(g=[],n.set(a,g)),g.push(o),d--,d===0)break}for(const[a,o]of n){const g=this.editorGroupsService.getGroup(a);g&&await g.closeEditors(o,{preserveFocus:!0})}}saveState(){this.mostRecentEditorsMap.isEmpty()?this.storageService.remove(gr.STORAGE_KEY,1):this.storageService.store(gr.STORAGE_KEY,JSON.stringify(this.serialize()),1,1)}serialize(){const i=k.Registry.as(t.EditorExtensions.EditorFactory),f=[...this.mostRecentEditorsMap.values()],c=new Map;return{entries:(0,b.coalesce)(f.map(({editor:l,groupId:s})=>{const d=this.editorGroupsService.getGroup(s);if(!d)return;let n=c.get(d);n||(n=d.getEditors(1).filter(o=>i.getEditorSerializer(o)?.canSerialize(o)),c.set(d,n));const a=n.indexOf(l);if(a!==-1)return{groupId:s,index:a}}))}}loadState(){const i=this.storageService.get(gr.STORAGE_KEY,1);if(i)this.deserialize(JSON.parse(i));else{const f=this.editorGroupsService.getGroups(1);for(let c=f.length-1;c>=0;c--){const l=f[c],s=l.getEditors(0);for(let d=s.length-1;d>=0;d--)this.addMostRecentEditor(l,s[d],!0,!0)}}for(const f of this.editorGroupsService.groups)this.registerGroupListeners(f)}deserialize(i){const f=[];for(const{groupId:c,index:l}of i.entries){const s=this.editorGroupsService.getGroup(c);if(!s)continue;const d=s.getEditorByIndex(l);if(!d)continue;const n=this.ensureKey(s,d);f.push([n,n]),this.updateEditorResourcesMap(d,!0)}this.mostRecentEditorsMap.fromJSON(f)}};r.STORAGE_KEY="editors.mru",r=we([F(0,I.IEditorGroupsService),F(1,A.IStorageService)],r),e.EditorsObserver=r}),define(ae[665],le([1,0,1497,10,17,43,177,27,5,12,58,221,6,23,13,8,311,2,80,911,114,24,18,9,1113]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SideBySideEditor=void 0;function h(w){const D=w;return typeof D?.primary=="object"&&typeof D.secondary=="object"}let v=class cn extends d.AbstractEditorWithViewState{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(D){}set maximumWidth(D){}set minimumHeight(D){}set maximumHeight(D){}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}constructor(D,y,T,_,L,M,O,N){super(cn.ID,cn.VIEW_STATE_PREFERENCE_KEY,D,y,_,M,T,O,N),this.configurationService=L,this.onDidCreateEditors=this._register(new r.Emitter),this._onDidChangeSizeConstraints=this._register(new r.Relay),this.onDidChangeSizeConstraints=r.Event.any(this.onDidCreateEditors.event,this._onDidChangeSizeConstraints.event),this._onDidChangeSelection=this._register(new r.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(cn.SIDE_BY_SIDE_LAYOUT_SETTING)==="vertical"?0:1,this.dimension=new p.Dimension(0,0),this.lastFocusedSide=void 0,this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(D=>this.onConfigurationUpdated(D)))}onConfigurationUpdated(D){D.affectsConfiguration(cn.SIDE_BY_SIDE_LAYOUT_SETTING)&&(this.orientation=this.configurationService.getValue(cn.SIDE_BY_SIDE_LAYOUT_SETTING)==="vertical"?0:1,this.splitview&&this.recreateSplitview())}recreateSplitview(){const D=(0,i.assertIsDefined)(this.getContainer()),y=this.getSplitViewRatio();this.splitview&&(D.removeChild(this.splitview.el),this.splitviewDisposables.clear()),this.createSplitView(D,y),this.layout(this.dimension)}getSplitViewRatio(){let D;if(this.splitview){const y=this.splitview.getViewSize(0),T=this.splitview.getViewSize(1);if(Math.abs(y-T)>1){const _=this.splitview.orientation===1?this.dimension.width:this.dimension.height;D=y/_}}return D}createEditor(D){D.classList.add("side-by-side-editor"),this.secondaryEditorContainer=(0,p.$)(".side-by-side-editor-container.editor-instance"),this.primaryEditorContainer=(0,p.$)(".side-by-side-editor-container.editor-instance"),this.createSplitView(D)}createSplitView(D,y){this.splitview=this.splitviewDisposables.add(new C.SplitView(D,{orientation:this.orientation})),this.splitviewDisposables.add(this.splitview.onDidSashReset(()=>this.splitview?.distributeViewSizes()));let T=C.Sizing.Distribute,_=C.Sizing.Distribute;if(y){const O=this.splitview.orientation===1?this.dimension.width:this.dimension.height;T=Math.round(O*y),_=O-T,this.splitview.layout(this.orientation===1?this.dimension.width:this.dimension.height)}const L=(0,i.assertIsDefined)(this.secondaryEditorContainer);this.splitview.addView({element:L,layout:O=>this.layoutPane(this.secondaryEditorPane,O),minimumSize:this.orientation===1?c.DEFAULT_EDITOR_MIN_DIMENSIONS.width:c.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumSize:Number.POSITIVE_INFINITY,onDidChange:r.Event.None},T);const M=(0,i.assertIsDefined)(this.primaryEditorContainer);this.splitview.addView({element:M,layout:O=>this.layoutPane(this.primaryEditorPane,O),minimumSize:this.orientation===1?c.DEFAULT_EDITOR_MIN_DIMENSIONS.width:c.DEFAULT_EDITOR_MIN_DIMENSIONS.height,maximumSize:Number.POSITIVE_INFINITY,onDidChange:r.Event.None},_),this.updateStyles()}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}async setInput(D,y,T,_){const L=this.input;await super.setInput(D,y,T,_),(!L||!D.matches(L))&&(L&&this.disposeEditors(),this.createEditors(D));const{primary:M,secondary:O,viewState:N}=this.loadViewState(D,y,T);if(this.lastFocusedSide=N?.focus,typeof N?.ratio=="number"&&this.splitview){const P=this.splitview.orientation===1?this.dimension.width:this.dimension.height;this.splitview.resizeView(0,Math.round(P*N.ratio))}else this.splitview?.distributeViewSizes();await Promise.all([this.secondaryEditorPane?.setInput(D.secondary,O,T,_),this.primaryEditorPane?.setInput(D.primary,M,T,_)]),typeof y?.target=="number"&&(this.lastFocusedSide=y.target)}loadViewState(D,y,T){const _=h(y?.viewState)?y?.viewState:this.loadEditorViewState(D,T);let L=Object.create(null),M;return y?.target===A.SideBySideEditor.SECONDARY?M={...y}:L={...y},L.viewState=_?.primary,_?.secondary&&(M?M.viewState=_?.secondary:M={viewState:_.secondary}),{primary:L,secondary:M,viewState:_}}createEditors(D){this.secondaryEditorPane=this.doCreateEditor(D.secondary,(0,i.assertIsDefined)(this.secondaryEditorContainer)),this.primaryEditorPane=this.doCreateEditor(D.primary,(0,i.assertIsDefined)(this.primaryEditorContainer)),this.layout(this.dimension),this._onDidChangeSizeConstraints.input=r.Event.any(r.Event.map(this.secondaryEditorPane.onDidChangeSizeConstraints,()=>{}),r.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(D,y){const T=R.Registry.as(A.EditorExtensions.EditorPane).getEditorPane(D);if(!T)throw new Error("No editor pane descriptor for editor found");const _=T.instantiate(this.instantiationService);return _.create(y),_.setVisible(this.isVisible(),this.group),(0,A.isEditorPaneWithSelection)(_)&&this.editorDisposables.add(_.onDidChangeSelection(L=>this._onDidChangeSelection.fire(L))),this.editorDisposables.add(_),_}onDidFocusChange(D){this.lastFocusedSide=D,this._onDidChangeControl.fire()}getSelection(){const D=this.getLastFocusedEditorPane();if((0,A.isEditorPaneWithSelection)(D)){const y=D.getSelection();if(y)return new m(y,D===this.primaryEditorPane?A.SideBySideEditor.PRIMARY:A.SideBySideEditor.SECONDARY)}}setOptions(D){super.setOptions(D),typeof D?.target=="number"&&(this.lastFocusedSide=D.target),this.getLastFocusedEditorPane()?.setOptions(D)}setEditorVisible(D,y){this.primaryEditorPane?.setVisible(D,y),this.secondaryEditorPane?.setVisible(D,y),super.setEditorVisible(D,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(D){this.dimension=D,(0,i.assertIsDefined)(this.splitview).layout(this.orientation===1?D.width:D.height)}layoutPane(D,y){D?.layout(this.orientation===1?new p.Dimension(y,this.dimension.height):new p.Dimension(this.dimension.width,y))}getControl(){return this.getLastFocusedEditorPane()?.getControl()}getPrimaryEditorPane(){return this.primaryEditorPane}getSecondaryEditorPane(){return this.secondaryEditorPane}tracksEditorViewState(D){return D instanceof k.SideBySideEditorInput}computeEditorViewState(D){if(!this.input||!(0,o.isEqual)(D,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(D){let y,T;if(D instanceof k.SideBySideEditorInput&&(y=D.primary.resource,T=D.secondary.resource),!(!T||!y))return g.URI.from({scheme:"sideBySide",path:`${(0,p.multibyteAwareBtoa)(T.toString())}${(0,p.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(s.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(s.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,p.clearNode)(this.secondaryEditorContainer),this.primaryEditorContainer&&(0,p.clearNode)(this.primaryEditorContainer)}};v.ID=A.SIDE_BY_SIDE_EDITOR_ID,v.SIDE_BY_SIDE_LAYOUT_SETTING="workbench.editor.splitInGroupLayout",v.VIEW_STATE_PREFERENCE_KEY="sideBySideEditorViewState",v=we([F(0,E.ITelemetryService),F(1,I.IInstantiationService),F(2,b.IThemeService),F(3,u.IStorageService),F(4,f.IConfigurationService),F(5,n.ITextResourceConfigurationService),F(6,a.IEditorService),F(7,S.IEditorGroupsService)],v),e.SideBySideEditor=v;class m{constructor(D,y){this.selection=D,this.side=y}compare(D){return!(D instanceof m)||this.side!==D.side?3:this.selection.compare(D.selection)}restore(D){const y={...D,target:this.side};return this.selection.restore(y)}}}),define(ae[666],le([1,0,6,43,186,177,5,8,2,17,16]),function(J,e,t,p,R,A,k,E,I,b,S){"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 r(s){const d=s;return!!(d&&typeof d=="object"&&Array.isArray(d.editors)&&Array.isArray(d.mru))}e.isSerializedEditorGroupModel=r;function u(s){const d=s;return d.editor&&d.editorIndex!==void 0}e.isGroupEditorChangeEvent=u;function i(s){const d=s;return d.kind===3&&d.editorIndex!==void 0}e.isGroupEditorOpenEvent=i;function f(s){const d=s;return d.kind===5&&d.editorIndex!==void 0&&d.oldEditorIndex!==void 0}e.isGroupEditorMoveEvent=f;function c(s){const d=s;return d.kind===4&&d.editorIndex!==void 0&&d.context!==void 0&&d.sticky!==void 0}e.isGroupEditorCloseEvent=c;let l=class dn extends I.Disposable{get id(){return this._id}constructor(d,n,a){super(),this.instantiationService=n,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,r(d)?this._id=this.deserialize(d):this._id=dn.IDS++,this.onConfigurationUpdated(),this.registerListeners()}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(d,n){const a=d===0?this.mru.slice(0):this.editors.slice(0);return n?.excludeSticky?d===0?a.filter(o=>!this.isSticky(o)):a.slice(this.sticky+1):a}getEditorByIndex(d){return this.editors[d]}get activeEditor(){return this.active}isActive(d){return this.matches(this.active,d)}get previewEditor(){return this.preview}openEditor(d,n){const a=n?.sticky||typeof n?.index=="number"&&this.isSticky(n.index),o=n?.pinned||n?.sticky,g=n?.active||!this.activeEditor||!o&&this.matches(this.preview,this.activeEditor),h=this.findEditor(d,n);if(h){const[v,m]=h;return o&&this.doPin(v,m),g&&this.doSetActive(v,m),n&&typeof n.index=="number"&&this.moveEditor(v,n.index),a&&this.doStick(v,this.indexOf(v)),{editor:v,isNew:!1}}else{const v=d,m=this.indexOf(this.active);let w;if(n&&typeof n.index=="number"?w=n.index:this.editorOpenPositioning===C.FIRST?(w=0,!a&&this.isSticky(w)&&(w=this.sticky+1)):this.editorOpenPositioning===C.LAST?w=this.editors.length:(this.editorOpenPositioning===C.LEFT?m===0||!this.editors.length?w=0:w=m:w=m+1,!a&&this.isSticky(w)&&(w=this.sticky+1)),a&&(this.sticky++,this.isSticky(w)||(w=this.sticky)),(o||!this.preview)&&this.splice(w,!1,v),!o){if(this.preview){const y=this.indexOf(this.preview);w>y&&w--,this.replaceEditor(this.preview,v,w,!g)}this.preview=v}this.registerEditorListeners(v);const D={kind:3,editor:v,editorIndex:w};return this._onDidModelChange.fire(D),g&&this.doSetActive(v,w),{editor:v,isNew:!0}}}registerEditorListeners(d){const n=new I.DisposableStore;n.add(t.Event.once(d.onWillDispose)(()=>{const a=this.editors.indexOf(d);if(a>=0){const o={kind:12,editor:d,editorIndex:a};this._onDidModelChange.fire(o)}})),n.add(d.onDidChangeDirty(()=>{const a={kind:11,editor:d,editorIndex:this.editors.indexOf(d)};this._onDidModelChange.fire(a)})),n.add(d.onDidChangeLabel(()=>{const a={kind:7,editor:d,editorIndex:this.editors.indexOf(d)};this._onDidModelChange.fire(a)})),n.add(d.onDidChangeCapabilities(()=>{const a={kind:8,editor:d,editorIndex:this.editors.indexOf(d)};this._onDidModelChange.fire(a)})),n.add(this.onDidModelChange(a=>{a.kind===4&&a.editor?.matches(d)&&(0,I.dispose)(n)}))}replaceEditor(d,n,a,o=!0){const g=this.doCloseEditor(d,p.EditorCloseContext.REPLACE,o);if(this.splice(a,!1,n),g){const h={kind:4,...g};this._onDidModelChange.fire(h)}}closeEditor(d,n=p.EditorCloseContext.UNKNOWN,a=!0){const o=this.doCloseEditor(d,n,a);if(o){const g={kind:4,...o};return this._onDidModelChange.fire(g),o}}doCloseEditor(d,n,a){const o=this.indexOf(d);if(o===-1)return;const g=this.editors[o],h=this.isSticky(o);if(a&&this.matches(this.active,g))if(this.mru.length>1){let v;this.focusRecentEditorAfterClose?v=this.mru[1]:o===this.editors.length-1?v=this.editors[o-1]:v=this.editors[o+1],this.doSetActive(v,this.editors.indexOf(v))}else this.active=null;return this.matches(this.preview,g)&&(this.preview=null),this.splice(o,!0),{editor:g,sticky:h,editorIndex:o,context:n}}moveEditor(d,n){n>=this.editors.length?n=this.editors.length-1:n<0&&(n=0);const a=this.indexOf(d);if(a<0||n===a)return;const o=this.editors[a];this.isSticky(a)&&n>this.sticky?this.sticky--:!this.isSticky(a)&&n<=this.sticky&&this.sticky++,this.editors.splice(a,1),this.editors.splice(n,0,o);const g={kind:5,editor:o,oldEditorIndex:a,editorIndex:n};return this._onDidModelChange.fire(g),o}setActive(d){let n;return d?n=this.setEditorActive(d):this.setGroupActive(),n}setGroupActive(){this._onDidModelChange.fire({kind:0})}setEditorActive(d){const n=this.findEditor(d);if(!n)return;const[a,o]=n;return this.doSetActive(a,o),a}doSetActive(d,n){if(this.matches(this.active,d))return;this.active=d;const a=this.indexOf(d,this.mru);this.mru.splice(a,1),this.mru.unshift(d);const o={kind:6,editor:d,editorIndex:n};this._onDidModelChange.fire(o)}setIndex(d){this._onDidModelChange.fire({kind:1})}pin(d){const n=this.findEditor(d);if(!n)return;const[a,o]=n;return this.doPin(a,o),a}doPin(d,n){if(this.isPinned(d))return;this.preview=null;const a={kind:9,editor:d,editorIndex:n};this._onDidModelChange.fire(a)}unpin(d){const n=this.findEditor(d);if(!n)return;const[a,o]=n;return this.doUnpin(a,o),a}doUnpin(d,n){if(!this.isPinned(d))return;const a=this.preview;this.preview=d;const o={kind:9,editor:d,editorIndex:n};this._onDidModelChange.fire(o),a&&this.closeEditor(a,p.EditorCloseContext.UNPIN)}isPinned(d){let n;return typeof d=="number"?n=this.editors[d]:n=d,!this.matches(this.preview,n)}stick(d){const n=this.findEditor(d);if(!n)return;const[a,o]=n;return this.doStick(a,o),a}doStick(d,n){if(this.isSticky(n))return;this.pin(d);const a=this.sticky+1;this.moveEditor(d,a),this.sticky++;const o={kind:10,editor:d,editorIndex:a};this._onDidModelChange.fire(o)}unstick(d){const n=this.findEditor(d);if(!n)return;const[a,o]=n;return this.doUnstick(a,o),a}doUnstick(d,n){if(!this.isSticky(n))return;const a=this.sticky;this.moveEditor(d,a),this.sticky--;const o={kind:10,editor:d,editorIndex:a};this._onDidModelChange.fire(o)}isSticky(d){if(this.sticky<0)return!1;let n;return typeof d=="number"?n=d:n=this.indexOf(d),n<0?!1:n<=this.sticky}splice(d,n,a){const o=this.editors[d];if(n&&this.isSticky(d)&&this.sticky--,a?this.editors.splice(d,n?1:0,a):this.editors.splice(d,n?1:0),!n&&a)this.mru.length===0?this.mru.push(a):this.mru.splice(1,0,a);else{const g=this.indexOf(o,this.mru);n&&!a?this.mru.splice(g,1):n&&a&&this.mru.splice(g,1,a)}}indexOf(d,n=this.editors,a){let o=-1;if(!d)return o;for(let g=0;g<n.length;g++){const h=n[g];if(this.matches(h,d,a))if(a?.supportSideBySide&&h instanceof A.SideBySideEditorInput&&!(d instanceof A.SideBySideEditorInput))o=g;else{o=g;break}}return o}findEditor(d,n){const a=this.indexOf(d,this.editors,n);if(a!==-1)return[this.editors[a],a]}isFirst(d){return this.matches(this.editors[0],d)}isLast(d){return this.matches(this.editors[this.editors.length-1],d)}contains(d,n){for(const a of this.editors)if(this.matches(a,d,n))return!0;return!1}matches(d,n,a){if(!d||!n)return!1;if(a?.supportSideBySide&&d instanceof A.SideBySideEditorInput&&!(n instanceof A.SideBySideEditorInput))switch(a.supportSideBySide){case p.SideBySideEditor.ANY:if(this.matches(d.primary,n,a)||this.matches(d.secondary,n,a))return!0;break;case p.SideBySideEditor.BOTH:if(this.matches(d.primary,n,a)&&this.matches(d.secondary,n,a))return!0;break}const o=d===n;return a?.strictEquals?o:o||d.matches(n)}get isLocked(){return this.locked}lock(d){this.isLocked!==d&&(this.locked=d,this._onDidModelChange.fire({kind:2}))}clone(){const d=this.instantiationService.createInstance(dn,void 0);d.editors=this.editors.slice(0),d.mru=this.mru.slice(0),d.preview=this.preview,d.active=this.active,d.sticky=this.sticky;for(const n of d.editors)d.registerEditorListeners(n);return d}serialize(){const d=b.Registry.as(p.EditorExtensions.EditorFactory),n=[],a=[];let o,g=this.sticky;for(let v=0;v<this.editors.length;v++){const m=this.editors[v];let w=!1;const D=d.getEditorSerializer(m);if(D){const y=D.serialize(m);typeof y=="string"?(w=!0,a.push({id:m.typeId,value:y}),n.push(m),this.preview===m&&(o=n.length-1)):w=!1}!w&&this.isSticky(v)&&g--}const h=this.mru.map(v=>this.indexOf(v,n)).filter(v=>v>=0);return{id:this.id,locked:this.locked?!0:void 0,editors:a,mru:h,preview:o,sticky:g>=0?g:void 0}}deserialize(d){const n=b.Registry.as(p.EditorExtensions.EditorFactory);return typeof d.id=="number"?(this._id=d.id,dn.IDS=Math.max(d.id+1,dn.IDS)):this._id=dn.IDS++,d.locked&&(this.locked=!0),this.editors=(0,S.coalesce)(d.editors.map((a,o)=>{let g;const h=n.getEditorSerializer(a.id);if(h){const v=h.deserialize(this.instantiationService,a.value);v instanceof R.EditorInput&&(g=v,this.registerEditorListeners(g))}return!g&&typeof d.sticky=="number"&&o<=d.sticky&&d.sticky--,g})),this.mru=(0,S.coalesce)(d.mru.map(a=>this.editors[a])),this.active=this.mru[0],typeof d.preview=="number"&&(this.preview=this.editors[d.preview]),typeof d.sticky=="number"&&(this.sticky=d.sticky),this._id}};l.IDS=0,l=we([F(1,k.IInstantiationService),F(2,E.IConfigurationService)],l),e.EditorGroupModel=l}),define(ae[2448],le([1,0,87,2,24,6,105,124,511,5,623,284,159]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCueLineFeatureContribution=void 0;let u=class extends p.Disposable{constructor(d,n,a){super(),this.editorService=d,this.instantiationService=n,this.audioCueService=a,this.store=this._register(new p.DisposableStore),this.features=[this.instantiationService.createInstance(i,C.AudioCue.error,E.MarkerSeverity.Error),this.instantiationService.createInstance(i,C.AudioCue.warning,E.MarkerSeverity.Warning),this.instantiationService.createInstance(f),this.instantiationService.createInstance(c),this.instantiationService.createInstance(l)];const o=(0,r.derived)("someAudioCueFeatureIsEnabled",h=>this.features.some(v=>this.audioCueService.isEnabled(v.audioCue).read(h))),g=(0,r.observableFromEvent)(this.editorService.onDidActiveEditorChange,h=>{const v=this.editorService.activeTextEditorControl,m=(0,k.isDiffEditor)(v)?v.getOriginalEditor():(0,k.isCodeEditor)(v)?v:void 0;return m&&m.hasModel()?{editor:m,model:m.getModel()}:void 0});this._register((0,r.autorun)("updateAudioCuesEnabled",h=>{if(this.store.clear(),!o.read(h))return;const v=g.read(h);v&&this.registerAudioCuesForEditor(v.editor,v.model,this.store)}))}registerAudioCuesForEditor(d,n,a){const o=(0,r.observableFromEvent)(d.onDidChangeCursorPosition,w=>{if(!(w&&w.reason!==3&&w.reason!==0))return d.getPosition()?.lineNumber}),g=(0,r.debouncedObservable)(o,300,a),h=(0,r.wasEventTriggeredRecently)(n.onDidChangeContent.bind(n),1e3,a),v=this.features.map(w=>{const D=w.getObservableState(d,n),y=(0,r.derived)(`isPresentInLine:${w.audioCue.name}`,T=>{if(!this.audioCueService.isEnabled(w.audioCue).read(T))return!1;const _=g.read(T);return _===void 0?!1:D.read(T).isPresent(_)});return(0,r.derived)(`typingDebouncedFeatureState: ${w.audioCue.name}`,T=>w.debounceWhileTyping&&h.read(T)?(g.read(T),y.get()):y.read(T))}),m=(0,r.derived)("states",w=>({lineNumber:g.read(w),featureStates:new Map(this.features.map((D,y)=>[D,v[y].read(w)]))}));a.add((0,r.autorunDelta)("Play Audio Cue",m,({lastValue:w,newValue:D})=>{const y=this.features.filter(T=>D?.featureStates.get(T)&&(!w?.featureStates?.get(T)||D.lineNumber!==w.lineNumber));this.audioCueService.playAudioCues(y.map(T=>T.audioCue))}))}};u=we([F(0,R.IEditorService),F(1,b.IInstantiationService),F(2,C.IAudioCueService)],u),e.AudioCueLineFeatureContribution=u;let i=class{constructor(d,n,a){this.audioCue=d,this.severity=n,this.markerService=a,this.debounceWhileTyping=!0}getObservableState(d,n){return(0,r.observableFromEvent)(A.Event.filter(this.markerService.onMarkerChanged,a=>a.some(o=>o.toString()===n.uri.toString())),()=>({isPresent:a=>this.markerService.read({resource:n.uri}).some(g=>g.severity===this.severity&&g.startLineNumber<=a&&a<=g.endLineNumber)}))}};i=we([F(2,E.IMarkerService)],i);class f{constructor(){this.audioCue=C.AudioCue.foldedArea}getObservableState(d,n){const a=I.FoldingController.get(d);return a?(0,r.observableFromPromise)(a.getFoldingModel()??Promise.resolve(void 0)).map(g=>({isPresent:h=>{const v=g.value?.getRegionAtLine(h);return v?v.isCollapsed&&v.startLineNumber===h:!1}})):(0,r.constObservable)({isPresent:()=>!1})}}let c=class{constructor(d){this.debugService=d,this.audioCue=C.AudioCue.break}getObservableState(d,n){return(0,r.observableFromEvent)(this.debugService.getModel().onDidChangeBreakpoints,()=>({isPresent:a=>this.debugService.getModel().getBreakpoints({uri:n.uri,lineNumber:a}).length>0}))}};c=we([F(0,t.IDebugService)],c);class l{constructor(){this.audioCue=C.AudioCue.inlineSuggestion}getObservableState(d,n){const a=S.GhostTextController.get(d);if(!a)return(0,r.constObservable)({isPresent:()=>!1});const o=(0,r.observableFromEvent)(a.onActiveModelDidChange,()=>a.activeModel).map(g=>g?(0,r.observableFromEvent)(g.inlineCompletionsModel.onDidChange,()=>g.inlineCompletionsModel.ghostText):void 0);return(0,r.derived)("ghostText",g=>{const h=o.read(g)?.read(g);return{isPresent(v){return h?.lineNumber===v}}})}}}),define(ae[2449],le([1,0,174,5,76,2280,1547,20,221,10,6,24,226,62,2,116,12,23,65,297,15,7,84,1125]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyTreePeekWidget=void 0;var g;(function(w){w.Loading="loading",w.Message="message",w.Data="data"})(g||(g={}));class h{static store(D,y){y.store("callHierarchyPeekLayout",JSON.stringify(D),0,1)}static retrieve(D){const y=D.get("callHierarchyPeekLayout",0,"{}"),T={ratio:.7,height:17};try{return{...T,...JSON.parse(y)}}catch{return T}}constructor(D,y){this.ratio=D,this.height=y}}class v extends R.WorkbenchAsyncDataTree{}let m=class Ba extends t.PeekViewWidget{constructor(D,y,T,_,L,M,O,N,P,B,V){super(D,{showFrame:!0,showArrow:!0,isResizeable:!0,isAccessible:!0},V),this._where=y,this._direction=T,this._peekViewService=L,this._editorService=M,this._textModelService=O,this._storageService=N,this._menuService=P,this._contextKeyService=B,this._instantiationService=V,this._treeViewStates=new Map,this._previewDisposable=new i.DisposableStore,this.create(),this._peekViewService.addExclusiveWidget(D,this),this._applyTheme(_.getColorTheme()),this._disposables.add(_.onDidColorThemeChange(this._applyTheme,this)),this._disposables.add(this._previewDisposable)}dispose(){h.store(this._layoutInfo,this._storageService),this._splitView.dispose(),this._tree.dispose(),this._editor.dispose(),super.dispose()}get direction(){return this._direction}_applyTheme(D){const y=D.getColor(t.peekViewBorder)||s.Color.transparent;this.style({arrowColor:y,frameColor:y,headerBackgroundColor:D.getColor(t.peekViewTitleBackground)||s.Color.transparent,primaryHeadingColor:D.getColor(t.peekViewTitleForeground),secondaryHeadingColor:D.getColor(t.peekViewTitleInfoForeground)})}_fillHead(D){super._fillHead(D,!0);const y=this._menuService.createMenu(Ba.TitleMenu,this._contextKeyService),T=()=>{const _=[];(0,o.createAndFillInActionBarActions)(y,void 0,_),this._actionbarWidget.clear(),this._actionbarWidget.push(_,{label:!1,icon:!0})};this._disposables.add(y),this._disposables.add(y.onDidChange(T)),T()}_fillBody(D){this._layoutInfo=h.retrieve(this._storageService),this._dim=new b.Dimension(0,0),this._parent=D,D.classList.add("call-hierarchy");const y=document.createElement("div");y.classList.add("message"),D.appendChild(y),this._message=y,this._message.tabIndex=0;const T=document.createElement("div");T.classList.add("results"),D.appendChild(T),this._splitView=new I.SplitView(T,{orientation:1});const _=document.createElement("div");_.classList.add("editor"),T.appendChild(_);const L={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(r.EmbeddedCodeEditorWidget,_,L,this.editor);const M=document.createElement("div");M.classList.add("tree"),T.appendChild(M);const O={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(v,"CallHierarchyPeek",M,new A.VirtualDelegate,[this._instantiationService.createInstance(A.CallRenderer)],this._instantiationService.createInstance(A.DataSource,()=>this._direction),O),this._splitView.addView({onDidChange:S.Event.None,element:_,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:N=>{this._dim.height&&this._editor.layout({height:this._dim.height,width:N})}},I.Sizing.Distribute),this._splitView.addView({onDidChange:S.Event.None,element:M,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:N=>{this._dim.height&&this._tree.layout(this._dim.height,N)}},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(N=>{const{event:P,target:B}=N;if(P.detail!==2)return;const[V]=this._tree.getFocus();!V||(this.dispose(),this._editorService.openEditor({resource:V.item.uri,options:{selection:B.range}}))})),this._disposables.add(this._tree.onMouseDblClick(N=>{N.target!==d.TreeMouseEventTarget.Twistie&&N.element&&(this.dispose(),this._editorService.openEditor({resource:N.element.item.uri,options:{selection:N.element.item.selectionRange,pinned:!0}}))})),this._disposables.add(this._tree.onDidChangeSelection(N=>{const[P]=N.elements;P&&N.browserEvent instanceof KeyboardEvent&&(this.dispose(),this._editorService.openEditor({resource:P.item.uri,options:{selection:P.item.selectionRange,pinned:!0}}))}))}async _updatePreview(){const[D]=this._tree.getFocus();if(!D)return;this._previewDisposable.clear();const y={description:"call-hierarchy-decoration",stickiness:1,className:"call-decoration",overviewRuler:{color:(0,c.themeColorFromId)(t.peekViewEditorMatchHighlight),position:f.OverviewRulerLane.Center}};let T;this._direction==="outgoingCalls"?T=D.parent?D.parent.item.uri:D.model.root.uri:T=D.item.uri;const _=await this._textModelService.createModelReference(T);this._editor.setModel(_.object.textEditorModel);const L=[];let M,O=D.locations;O||(O=[{uri:D.item.uri,range:D.item.selectionRange}]);for(const P of O)P.uri.toString()===T.toString()&&(L.push({range:P.range,options:y}),M=M?E.Range.plusRange(P.range,M):P.range);if(M){this._editor.revealRangeInCenter(M,1);const P=this._editor.createDecorationsCollection(L);this._previewDisposable.add((0,i.toDisposable)(()=>P.clear()))}this._previewDisposable.add(_);const N=this._direction==="outgoingCalls"?(0,k.localize)(0,null,D.model.root.name):(0,k.localize)(1,null,D.model.root.name);this.setTitle(N)}showLoading(){this._parent.dataset.state="loading",this.setTitle((0,k.localize)(2,null)),this._show()}showMessage(D){this._parent.dataset.state="message",this.setTitle(""),this.setMetaTitle(""),this._message.innerText=D,this._show(),this._message.focus()}async showModel(D){this._show();const y=this._treeViewStates.get(this._direction);await this._tree.setInput(D,y);const T=this._tree.getNode(D).children[0];await this._tree.expand(T.element),T.children.length===0?this.showMessage(this._direction==="outgoingCalls"?(0,k.localize)(3,null,D.root.name):(0,k.localize)(4,null,D.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(D){const y=this._tree.getInput();y&&D!==this._direction&&(this._treeViewStates.set(this._direction,this._tree.getViewState()),this._direction=D,await this.showModel(y))}_show(){this._isShowing||(this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber,0),super.show(E.Range.fromPositions(this._where),this._layoutInfo.height))}_onWidth(D){this._dim&&this._doLayoutBody(this._dim.height,D)}_doLayoutBody(D,y){(this._dim.height!==D||this._dim.width!==y)&&(super._doLayoutBody(D,y),this._dim=new b.Dimension(y,D),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 n.MenuId("callhierarchy/title"),m=we([F(3,c.IThemeService),F(4,t.IPeekViewService),F(5,C.IEditorService),F(6,u.ITextModelService),F(7,l.IStorageService),F(8,n.IMenuService),F(9,a.IContextKeyService),F(10,p.IInstantiationService)],m),e.CallHierarchyTreePeekWidget=m}),define(ae[2450],le([1,0,1546,632,32,5,2449,6,40,7,2,59,174,23,75,20,15,29,63,21]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=new b.RawContextKey("editorHasCallHierarchyProvider",!1,(0,t.localize)(0,null)),a=new b.RawContextKey("callHierarchyVisible",!1,(0,t.localize)(1,null)),o=new b.RawContextKey("callHierarchyDirection",void 0,{type:"string",description:(0,t.localize)(2,null)});function g(v){return v==="outgoingCalls"||v==="incomingCalls"?v:"incomingCalls"}let h=class Vn{static get(m){return m.getContribution(Vn.Id)}constructor(m,w,D,y,T){this._editor=m,this._contextKeyService=w,this._storageService=D,this._editorService=y,this._instantiationService=T,this._dispoables=new S.DisposableStore,this._sessionDisposables=new S.DisposableStore,this._ctxIsVisible=a.bindTo(this._contextKeyService),this._ctxHasProvider=n.bindTo(this._contextKeyService),this._ctxDirection=o.bindTo(this._contextKeyService),this._dispoables.add(E.Event.any(m.onDidChangeModel,m.onDidChangeModelLanguage,p.CallHierarchyProviderRegistry.onDidChange)(()=>{this._ctxHasProvider.set(m.hasModel()&&p.CallHierarchyProviderRegistry.has(m.getModel()))})),this._dispoables.add(this._sessionDisposables)}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(),w=this._editor.getPosition();if(!p.CallHierarchyProviderRegistry.has(m))return;const D=new R.CancellationTokenSource,y=p.CallHierarchyModel.create(m,w,D.token),T=g(this._storageService.get(Vn._StorageDirection,0,"incomingCalls"));this._showCallHierarchyWidget(w,T,y,D)}async startCallHierarchyFromCallHierarchy(){if(!this._widget)return;const m=this._widget.getModel(),w=this._widget.getFocused();if(!w||!m)return;const D=await this._editorService.openCodeEditor({resource:w.item.uri},this._editor);if(!D)return;const y=m.fork(w.item);this._sessionDisposables.clear(),Vn.get(D)?._showCallHierarchyWidget(f.Range.lift(y.root.selectionRange).getStartPosition(),this._widget.direction,Promise.resolve(y),new R.CancellationTokenSource)}_showCallHierarchyWidget(m,w,D,y){this._ctxIsVisible.set(!0),this._ctxDirection.set(w),E.Event.any(this._editor.onDidChangeModel,this._editor.onDidChangeModelLanguage)(this.endCallHierarchy,this,this._sessionDisposables),this._widget=this._instantiationService.createInstance(k.CallHierarchyTreePeekWidget,this._editor,m,w),this._widget.showLoading(),this._sessionDisposables.add(this._widget.onDidClose(()=>{this.endCallHierarchy(),this._storageService.store(Vn._StorageDirection,this._widget.direction,0,0)})),this._sessionDisposables.add({dispose(){y.dispose(!0)}}),this._sessionDisposables.add(this._widget),D.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,d.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()}};h.Id="callHierarchy",h._StorageDirection="callHierarchy/defaultDirection",h=we([F(1,b.IContextKeyService),F(2,u.IStorageService),F(3,i.ICodeEditorService),F(4,A.IInstantiationService)],h),(0,I.registerEditorContribution)(h.Id,h),(0,c.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.showCallHierarchy",title:{value:(0,t.localize)(5,null),original:"Peek Call Hierarchy"},menu:{id:c.MenuId.EditorContextPeek,group:"navigation",order:1e3,when:b.ContextKeyExpr.and(n,r.PeekContext.notInPeekEditor)},keybinding:{when:C.EditorContextKeys.editorTextFocus,weight:200,primary:1024+512+38},precondition:b.ContextKeyExpr.and(n,r.PeekContext.notInPeekEditor)})}async runEditorCommand(v,m){return h.get(m)?.startCallHierarchyFromEditor()}}),(0,c.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.showIncomingCalls",title:{value:(0,t.localize)(6,null),original:"Show Incoming Calls"},icon:(0,s.registerIcon)("callhierarchy-incoming",l.Codicon.callIncoming,(0,t.localize)(7,null)),precondition:b.ContextKeyExpr.and(a,o.isEqualTo("outgoingCalls")),keybinding:{weight:200,primary:1024+512+38},menu:{id:k.CallHierarchyTreePeekWidget.TitleMenu,when:o.isEqualTo("outgoingCalls"),order:1}})}runEditorCommand(v,m){return h.get(m)?.showIncomingCalls()}}),(0,c.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.showOutgoingCalls",title:{value:(0,t.localize)(8,null),original:"Show Outgoing Calls"},icon:(0,s.registerIcon)("callhierarchy-outgoing",l.Codicon.callOutgoing,(0,t.localize)(9,null)),precondition:b.ContextKeyExpr.and(a,o.isEqualTo("incomingCalls")),keybinding:{weight:200,primary:1024+512+38},menu:{id:k.CallHierarchyTreePeekWidget.TitleMenu,when:o.isEqualTo("incomingCalls"),order:1}})}runEditorCommand(v,m){return h.get(m)?.showOutgoingCalls()}}),(0,c.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(v,m){return h.get(m)?.startCallHierarchyFromCallHierarchy()}}),(0,c.registerAction2)(class extends I.EditorAction2{constructor(){super({id:"editor.closeCallHierarchy",title:(0,t.localize)(11,null),icon:l.Codicon.close,precondition:b.ContextKeyExpr.and(a,b.ContextKeyExpr.not("config.editor.stablePeek")),keybinding:{weight:200+10,primary:9},menu:{id:k.CallHierarchyTreePeekWidget.TitleMenu,order:1e3}})}runEditorCommand(v,m){return h.get(m)?.endCallHierarchy()}})}),define(ae[2451],le([1,0,1553,40,2,348,5,8,26,226]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var S;(function(r){r[r.Hidden=0]="Hidden",r[r.HintWhitespace=1]="HintWhitespace"})(S||(S={}));let C=class extends R.Disposable{constructor(u,i,f,c){super(),this._diffEditor=u,this._instantiationService=i,this._configurationService=f,this._notificationService=c,this._helperWidget=null,this._helperWidgetListener=null,this._state=0,this._diffEditor instanceof b.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(u){return u&&this._diffEditor.ignoreTrimWhitespace&&u.changes.length===0&&!u.identical?1:0}_setState(u){this._state!==u&&(this._state=u,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=we([F(1,k.IInstantiationService),F(2,E.IConfigurationService),F(3,I.INotificationService)],C),(0,p.registerDiffEditorContribution)(C.ID,C)}),define(ae[2452],le([1,0,1556,38,24,70,15]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E 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(S,C){const r=S.get(p.IKeybindingService);S.get(R.IEditorService).openEditor({resource:void 0,contents:r._dumpDebugInfo(),options:{pinned:!0}})}}(0,k.registerAction2)(E);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(S){const C=S.get(R.IEditorService),r=S.get(p.IKeybindingService);await C.openEditor({resource:void 0,contents:r._dumpDebugInfoJSON(),options:{pinned:!0}})}}(0,k.registerAction2)(I)}),define(ae[2453],le([1,0,1561,48,24,815,17,222,8,15,58]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineQuickAccessProvider=void 0;let C=class extends A.AbstractGotoLineQuickAccessProvider{constructor(i,f,c){super(),this.editorService=i,this.editorGroupService=f,this.configurationService=c,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,f){if((f.keyMods.alt||this.configuration.openEditorPinned&&f.keyMods.ctrlCmd||f.forceSideBySide)&&this.editorService.activeEditor){i.restoreViewState?.();const c={selection:f.range,pinned:f.keyMods.ctrlCmd||this.configuration.openEditorPinned,preserveFocus:f.preserveFocus};this.editorGroupService.sideGroup.openEditor(this.editorService.activeEditor,c)}else super.gotoLocation(i,f)}};C=we([F(0,R.IEditorService),F(1,S.IEditorGroupsService),F(2,I.IConfigurationService)],C),e.GotoLineQuickAccessProvider=C;class r extends b.Action2{constructor(){super({id:r.ID,title:{value:(0,t.localize)(0,null),original:"Go to Line/Column..."},f1:!0,keybinding:{weight:200,when:null,primary:2085,mac:{primary:293}}})}async run(i){i.get(p.IQuickInputService).quickAccess.show(C.PREFIX)}}r.ID="workbench.action.gotoLine",(0,b.registerAction2)(r),k.Registry.as(E.Extensions.Quickaccess).registerQuickAccessProvider({ctor:C,prefix:A.AbstractGotoLineQuickAccessProvider.PREFIX,placeholder:(0,t.localize)(1,null),helpEntries:[{description:(0,t.localize)(2,null),commandId:r.ID}]})}),define(ae[539],le([1,0,1631,9,53,18,87,24,22,246]),function(J,e,t,p,R,A,k,E,I,b){"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 S{constructor(u,i,f){let c;u?(this.raw=u,c=this.raw.path||this.raw.name||"",this.available=!0):(this.raw={name:e.UNKNOWN_SOURCE_LABEL},this.available=!1,c=`${k.DEBUG_SCHEME}:${e.UNKNOWN_SOURCE_LABEL}`),this.uri=C(this.raw,c,i,f)}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(u,i,f,c,l){return this.available?u.openEditor({resource:this.uri,description:this.origin,options:{preserveFocus:f,selection:i,revealIfOpened:!0,selectionRevealType:1,pinned:l||!f&&!this.inMemory}},c?E.SIDE_GROUP:E.ACTIVE_GROUP):Promise.resolve(void 0)}static getEncodedDebugData(u){let i,f,c;switch(u.scheme){case I.Schemas.file:i=(0,R.normalize)(u.fsPath);break;case k.DEBUG_SCHEME:if(i=u.path,u.query){const l=u.query.split("&");for(const s of l){const d=s.split("=");if(d.length===2)switch(d[0]){case"session":c=d[1];break;case"ref":f=parseInt(d[1]);break}}}break;default:i=u.toString();break}return{name:A.basenameOrAuthority(u),path:i,sourceReference:f,sessionId:c}}}e.Source=S;function C(r,u,i,f){return typeof r.sourceReference=="number"&&r.sourceReference>0?p.URI.from({scheme:k.DEBUG_SCHEME,path:u,query:`session=${i}&ref=${r.sourceReference}`}):u&&(0,b.isUri)(u)?f.asCanonicalUri(p.URI.parse(u)):u&&(0,R.isAbsolute)(u)?f.asCanonicalUri(p.URI.file(u)):f.asCanonicalUri(p.URI.from({scheme:k.DEBUG_SCHEME,path:u,query:`session=${i}`}))}e.getUriFromSource=C}),define(ae[912],le([1,0,1627,376,54,42,62,87,539,212,138,20,32,125,21]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugContentProvider=void 0;let f=class Is{constructor(l,s,d,n,a){this.debugService=s,this.modelService=d,this.languageService=n,this.editorWorkerService=a,this.pendingUpdates=new Map,l.registerTextModelContentProvider(E.DEBUG_SCHEME,this),Is.INSTANCE=this}dispose(){this.pendingUpdates.forEach(l=>l.dispose())}provideTextContent(l){return this.createOrUpdateContentModel(l,!0)}static refreshDebugContent(l){Is.INSTANCE?.createOrUpdateContentModel(l,!1)}createOrUpdateContentModel(l,s){const d=this.modelService.getModel(l);if(!d&&!s)return null;let n;if(l.query){const o=I.Source.getEncodedDebugData(l);n=this.debugService.getModel().getSession(o.sessionId)}if(n||(n=this.debugService.getViewModel().focusedSession),!n)return Promise.reject(new i.ErrorNoTelemetry((0,t.localize)(0,null)));const a=o=>{this.debugService.sourceIsNotAvailable(l);const g=this.languageService.createById(u.PLAINTEXT_LANGUAGE_ID),h=o?(0,t.localize)(1,null,l.path,o):(0,t.localize)(2,null,l.path);return this.modelService.createModel(h,g,l)};return n.loadSource(l).then(o=>{if(o&&o.body)if(d){const g=o.body.content;this.pendingUpdates.get(d.id)?.cancel();const v=new r.CancellationTokenSource;return this.pendingUpdates.set(d.id,v),this.editorWorkerService.computeMoreMinimalEdits(d.uri,[{text:g,range:d.getFullModelRange()}]).then(m=>(this.pendingUpdates.delete(d.id),!v.token.isCancellationRequested&&m&&m.length>0&&d.applyEdits(m.map(w=>S.EditOperation.replace(C.Range.lift(w.range),w.text))),d))}else{const g=o.body.mimeType||(0,p.getMimeTypes)(l)[0],h=this.languageService.createByMimeType(g);return this.modelService.createModel(o.body.content,h,l)}return a()},o=>a(o.message))}};f=we([F(0,k.ITextModelService),F(1,E.IDebugService),F(2,R.IModelService),F(3,A.ILanguageService),F(4,b.IEditorWorkerService)],f),e.DebugContentProvider=f}),define(ae[2454],le([1,0,1634,96,48,87,24,199,54,42,2,18,49]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showLoadedScriptMenu=void 0;async function u(l){const s=l.get(R.IQuickInputService),d=l.get(A.IDebugService),n=l.get(k.IEditorService),a=d.getModel().getSessions(!1),o=l.get(I.IModelService),g=l.get(b.ILanguageService),h=l.get(r.ILabelService),v=new S.DisposableStore,m=s.createQuickPick();v.add(m),m.matchOnLabel=m.matchOnDescription=m.matchOnDetail=m.sortByLabel=!1,m.placeholder=t.localize(0,null),m.items=await f(m.value,a,n,o,g,h),v.add(m.onDidChangeValue(async()=>{m.items=await f(m.value,a,n,o,g,h)})),v.add(m.onDidAccept(()=>{m.selectedItems[0].accept(),m.hide(),v.dispose()})),m.show()}e.showLoadedScriptMenu=u;async function i(l,s,d,n,a,o){const g=[];return g.push({type:"separator",label:l.name}),(await l.getLoadedSources()).forEach(v=>{const m=c(v,s,d,n,a,o);m&&g.push(m)}),g}async function f(l,s,d,n,a,o){const g=[],h=await Promise.all(s.map(v=>i(v,l,d,n,a,o)));for(const v of h)for(const m of v)g.push(m);return g}function c(l,s,d,n,a,o){const g=o.getUriBasenameLabel(l.uri),h=o.getUriLabel((0,C.dirname)(l.uri)),v=(0,p.matchesFuzzy)(s,g,!0),m=(0,p.matchesFuzzy)(s,h,!0);if(v||m)return{label:g,description:h==="."?void 0:h,highlights:{label:v??void 0,description:m??void 0},iconClasses:(0,E.getIconClasses)(n,a,l.uri),accept:()=>{l.available&&l.openInEditor(d,{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0})}}}}),define(ae[2455],le([1,0,10,22,53,277,250,124,527,444,5,73,12,2,79,640,49,18,639,6,13,36,1730,11,54,20,309,236,24,432,41,19,66,137,29,63,254,61,7,339,500]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x){"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.MarkersWidgetAccessibilityProvider=void 0;let H=class{constructor(Z){this.labelService=Z}getWidgetAriaLabel(){return(0,o.localize)(0,null)}getAriaLabel(Z){if(Z instanceof I.ResourceMarkers){const ne=this.labelService.getUriLabel(Z.resource,{relative:!0})||Z.resource.fsPath;return b.default.MARKERS_TREE_ARIA_LABEL_RESOURCE(Z.markers.length,Z.name,R.dirname(ne))}return Z instanceof I.Marker||Z instanceof I.MarkerTableItem?b.default.MARKERS_TREE_ARIA_LABEL_MARKER(Z):Z instanceof I.RelatedInformation?b.default.MARKERS_TREE_ARIA_LABEL_RELATED_INFORMATION(Z.raw):null}};H=we([F(0,c.ILabelService)],H),e.MarkersWidgetAccessibilityProvider=H;var W;(function(te){te.ResourceMarkers="rm",te.Marker="m",te.RelatedInformation="ri"})(W||(W={}));class U{constructor(Z){this.markersViewState=Z}getHeight(Z){if(Z instanceof I.Marker){const ne=this.markersViewState.getViewModel(Z);return(!ne||ne.multiline?Z.lines.length:1)*U.LINE_HEIGHT}return U.LINE_HEIGHT}getTemplateId(Z){return Z instanceof I.ResourceMarkers?"rm":Z instanceof I.Marker?"m":"ri"}}e.VirtualDelegate=U,U.LINE_HEIGHT=22;var $;(function(te){te[te.ResourceMarkers=0]="ResourceMarkers",te[te.Marker=1]="Marker",te[te.RelatedInformation=2]="RelatedInformation"})($||($={}));let q=class{constructor(Z,ne,ce,de,he){this.labels=Z,this.themeService=ce,this.labelService=de,this.fileService=he,this.renderedNodes=new Map,this.disposables=new u.DisposableStore,this.templateId="rm",ne(this.onDidChangeRenderNodeCount,this,this.disposables)}renderTemplate(Z){const ne=Object.create(null),ce=t.append(Z,t.$(".resource-label-container"));ne.resourceLabel=this.labels.create(ce,{supportHighlights:!0});const de=t.append(Z,t.$(".count-badge-wrapper"));return ne.count=new A.CountBadge(de),ne.styler=(0,C.attachBadgeStyler)(ne.count,this.themeService),ne}renderElement(Z,ne,ce){const de=Z.element,he=Z.filterData&&Z.filterData.uriMatches||[];this.fileService.hasProvider(de.resource)||de.resource.scheme===p.Schemas.untitled?ce.resourceLabel.setFile(de.resource,{matches:he}):ce.resourceLabel.setResource({name:de.name,description:this.labelService.getUriLabel((0,l.dirname)(de.resource),{relative:!0}),resource:de.resource},{matches:he}),this.updateCount(Z,ce),this.renderedNodes.set(Z,ce)}disposeElement(Z){this.renderedNodes.delete(Z)}disposeTemplate(Z){Z.resourceLabel.dispose(),Z.styler.dispose()}onDidChangeRenderNodeCount(Z){const ne=this.renderedNodes.get(Z);!ne||this.updateCount(Z,ne)}updateCount(Z,ne){ne.count.setCount(Z.children.reduce((ce,de)=>ce+(de.visible?1:0),0))}dispose(){this.disposables.dispose()}};q=we([F(2,r.IThemeService),F(3,c.ILabelService),F(4,_.IFileService)],q),e.ResourceMarkersRenderer=q;class X extends q{}e.FileResourceMarkersRenderer=X;let G=class{constructor(Z,ne,ce){this.markersViewState=Z,this.instantiationService=ne,this.openerService=ce,this.templateId="m"}renderTemplate(Z){const ne=Object.create(null);return ne.markerWidget=new ee(Z,this.markersViewState,this.openerService,this.instantiationService),ne}renderElement(Z,ne,ce){ce.markerWidget.render(Z.element,Z.filterData)}disposeTemplate(Z){Z.markerWidget.dispose()}};G=we([F(1,S.IInstantiationService),F(2,T.IOpenerService)],G),e.MarkerRenderer=G;const Q=(0,N.registerIcon)("markers-view-multi-line-expanded",O.Codicon.chevronUp,(0,o.localize)(1,null)),j=(0,N.registerIcon)("markers-view-multi-line-collapsed",O.Codicon.chevronDown,(0,o.localize)(2,null)),K="problems.action.toggleMultiline";class Y extends M.ActionViewItem{render(Z){super.render(Z),this.updateExpandedAttribute()}updateClass(){super.updateClass(),this.updateExpandedAttribute()}updateExpandedAttribute(){this.element?.setAttribute("aria-expanded",`${this._action.class===r.ThemeIcon.asClassName(Q)}`)}}class ee extends u.Disposable{constructor(Z,ne,ce,de){super(),this.parent=Z,this.markersViewModel=ne,this._openerService=ce,this.disposables=this._register(new u.DisposableStore),this.actionBar=this._register(new i.ActionBar(t.append(Z,t.$(".actions")),{actionViewItemProvider:he=>he.id===f.QuickFixAction.ID?de.createInstance(f.QuickFixActionViewItem,he):void 0})),this.icon=t.append(Z,t.$("")),this.messageAndDetailsContainer=t.append(Z,t.$(".marker-message-details-container"))}render(Z,ne){this.actionBar.clear(),this.disposables.clear(),t.clearNode(this.messageAndDetailsContainer),this.icon.className=`marker-icon codicon ${y.SeverityIcon.className(E.MarkerSeverity.toSeverity(Z.marker.severity))}`,this.renderQuickfixActionbar(Z),this.renderMessageAndDetails(Z,ne),this.disposables.add(t.addDisposableListener(this.parent,t.EventType.MOUSE_OVER,()=>this.markersViewModel.onMarkerMouseHover(Z))),this.disposables.add(t.addDisposableListener(this.parent,t.EventType.MOUSE_LEAVE,()=>this.markersViewModel.onMarkerMouseLeave(Z)))}renderQuickfixActionbar(Z){const ne=this.markersViewModel.getViewModel(Z);if(ne){const ce=ne.quickFixAction;this.actionBar.push([ce],{icon:!0,label:!1}),this.icon.classList.toggle("quickFix",ce.enabled),ce.onDidChange(({enabled:de})=>{(0,n.isUndefinedOrNull)(de)||this.icon.classList.toggle("quickFix",de)},this,this.disposables),ce.onShowQuickFixes(()=>{const de=this.actionBar.viewItems[0];de&&de.showQuickFixes()},this,this.disposables)}}renderMultilineActionbar(Z,ne){const ce=this.disposables.add(new i.ActionBar(t.append(ne,t.$(".multiline-actions")),{actionViewItemProvider:me=>{if(me.id===K)return new Y(void 0,me,{icon:!0})}}));this.disposables.add((0,u.toDisposable)(()=>ce.dispose()));const de=this.markersViewModel.getViewModel(Z),he=de&&de.multiline,pe=new a.Action(K);pe.enabled=!!de&&Z.lines.length>1,pe.tooltip=he?(0,o.localize)(3,null):(0,o.localize)(4,null),pe.class=r.ThemeIcon.asClassName(he?Q:j),pe.run=()=>(de&&(de.multiline=!de.multiline),Promise.resolve()),ce.push([pe],{icon:!0,label:!1})}renderMessageAndDetails(Z,ne){const{marker:ce,lines:de}=Z,he=this.markersViewModel.getViewModel(Z),pe=!he||he.multiline,me=ne&&ne.lineMatches||[];this.messageAndDetailsContainer.title=Z.marker.message;const Se=[];for(let Ie=0;Ie<(pe?de.length:1);Ie++){const ve=t.append(this.messageAndDetailsContainer,t.$(".marker-message-line")),be=t.append(ve,t.$(".marker-message"));new k.HighlightedLabel(be).set(de[Ie].length>1e3?`${de[Ie].substring(0,1e3)}...`:de[Ie],me[Ie]),de[Ie]===""&&(ve.style.height=`${U.LINE_HEIGHT}px`),Se.push(ve)}this.renderDetails(ce,ne,Se[0]),this.renderMultilineActionbar(Z,Se[0])}renderDetails(Z,ne,ce){if(ce.classList.add("details-container"),Z.source||Z.code){const he=new k.HighlightedLabel(t.append(ce,t.$(".marker-source"))),pe=ne&&ne.sourceMatches||[];if(he.set(Z.source,pe),Z.code)if(typeof Z.code=="string"){const me=new k.HighlightedLabel(t.append(ce,t.$(".marker-code"))),Se=ne&&ne.codeMatches||[];me.set(Z.code,Se)}else{const me=t.$(".marker-code"),Se=new k.HighlightedLabel(me);new P.Link(ce,{href:Z.code.target.toString(),label:me,title:Z.code.target.toString()},void 0,this._openerService);const Ie=ne&&ne.codeMatches||[];Se.set(Z.code.value,Ie)}}const de=t.append(ce,t.$("span.marker-line"));de.textContent=b.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(Z.startLineNumber,Z.startColumn)}}let ie=class{constructor(Z){this.labelService=Z,this.templateId="ri"}renderTemplate(Z){const ne=Object.create(null);t.append(Z,t.$(".actions")),t.append(Z,t.$(".icon")),ne.resourceLabel=new k.HighlightedLabel(t.append(Z,t.$(".related-info-resource"))),ne.lnCol=t.append(Z,t.$("span.marker-line"));const ce=t.append(Z,t.$("span.related-info-resource-separator"));return ce.textContent=":",ce.style.paddingRight="4px",ne.description=new k.HighlightedLabel(t.append(Z,t.$(".marker-description"))),ne}renderElement(Z,ne,ce){const de=Z.element.raw,he=Z.filterData&&Z.filterData.uriMatches||[],pe=Z.filterData&&Z.filterData.messageMatches||[];ce.resourceLabel.set((0,l.basename)(de.resource),he),ce.resourceLabel.element.title=this.labelService.getUriLabel(de.resource,{relative:!0}),ce.lnCol.textContent=b.default.MARKERS_PANEL_AT_LINE_COL_NUMBER(de.startLineNumber,de.startColumn),ce.description.set(de.message,pe),ce.description.element.title=de.message}disposeTemplate(Z){}};ie=we([F(0,c.ILabelService)],ie),e.RelatedInformationRenderer=ie;class re{constructor(Z){this.options=Z}filter(Z,ne){return Z instanceof I.ResourceMarkers?this.filterResourceMarkers(Z):Z instanceof I.Marker?this.filterMarker(Z,ne):this.filterRelatedInformation(Z,ne)}filterResourceMarkers(Z){if(x.unsupportedSchemas.has(Z.resource.scheme)||this.options.excludesMatcher.matches(Z.resource))return!1;if(this.options.includesMatcher.matches(Z.resource))return!0;if(this.options.textFilter.text&&!this.options.textFilter.negate){const ne=s.FilterOptions._filter(this.options.textFilter.text,(0,l.basename)(Z.resource));if(ne)return{visibility:!0,data:{type:0,uriMatches:ne||[]}}}return 2}filterMarker(Z,ne){if(!(this.options.showErrors&&E.MarkerSeverity.Error===Z.marker.severity||this.options.showWarnings&&E.MarkerSeverity.Warning===Z.marker.severity||this.options.showInfos&&E.MarkerSeverity.Info===Z.marker.severity))return!1;if(!this.options.textFilter.text)return!0;const de=[];for(const Se of Z.lines){const Ie=s.FilterOptions._messageFilter(this.options.textFilter.text,Se);de.push(Ie||[])}const he=Z.marker.source?s.FilterOptions._filter(this.options.textFilter.text,Z.marker.source):void 0,pe=Z.marker.code?s.FilterOptions._filter(this.options.textFilter.text,typeof Z.marker.code=="string"?Z.marker.code:Z.marker.code.value):void 0,me=he||pe||de.some(Se=>Se.length>0);return me&&!this.options.textFilter.negate?{visibility:!0,data:{type:1,lineMatches:de,sourceMatches:he||[],codeMatches:pe||[]}}:me&&this.options.textFilter.negate&&ne===2?!1:!me&&this.options.textFilter.negate&&ne===2?!0:ne}filterRelatedInformation(Z,ne){if(!this.options.textFilter.text)return!0;const ce=s.FilterOptions._filter(this.options.textFilter.text,(0,l.basename)(Z.raw.resource)),de=s.FilterOptions._messageFilter(this.options.textFilter.text,R.basename(Z.raw.message)),he=ce||de;return he&&!this.options.textFilter.negate?{visibility:!0,data:{type:2,uriMatches:ce||[],messageMatches:de||[]}}:he&&this.options.textFilter.negate&&ne===2?!1:!he&&this.options.textFilter.negate&&ne===2?!0:ne}}e.Filter=re;let oe=class extends u.Disposable{constructor(Z,ne,ce,de,he){super(),this.marker=Z,this.modelService=ne,this.instantiationService=ce,this.editorService=de,this.languageFeaturesService=he,this._onDidChange=this._register(new d.Emitter),this.onDidChange=this._onDidChange.event,this.modelPromise=null,this.codeActionsPromise=null,this._multiline=!0,this._quickFixAction=null,this._register((0,u.toDisposable)(()=>{this.modelPromise&&this.modelPromise.cancel(),this.codeActionsPromise&&this.codeActionsPromise.cancel()}))}get multiline(){return this._multiline}set multiline(Z){this._multiline!==Z&&(this._multiline=Z,this._onDidChange.fire())}get quickFixAction(){return this._quickFixAction||(this._quickFixAction=this._register(this.instantiationService.createInstance(f.QuickFixAction,this.marker))),this._quickFixAction}showLightBulb(){this.setQuickFixes(!0)}async setQuickFixes(Z){const ne=await this.getCodeActions(Z);this.quickFixAction.quickFixes=ne?this.toActions(ne):[],this.quickFixAction.autoFixable(!!ne&&ne.hasAutoFix)}getCodeActions(Z){return this.codeActionsPromise!==null?this.codeActionsPromise:this.getModel(Z).then(ne=>ne?(this.codeActionsPromise||(this.codeActionsPromise=(0,g.createCancelablePromise)(ce=>(0,m.getCodeActions)(this.languageFeaturesService.codeActionProvider,ne,new v.Range(this.marker.range.startLineNumber,this.marker.range.startColumn,this.marker.range.endLineNumber,this.marker.range.endColumn),{type:1,triggerAction:w.CodeActionTriggerSource.ProblemsView,filter:{include:w.CodeActionKind.QuickFix}},L.Progress.None,ce).then(de=>this._register(de)))),this.codeActionsPromise):null)}toActions(Z){return Z.validActions.map(ne=>new a.Action(ne.action.command?ne.action.command.id:ne.action.title,ne.action.title,void 0,!0,()=>this.openFileAtMarker(this.marker).then(()=>this.instantiationService.invokeFunction(m.applyCodeAction,ne,m.ApplyCodeActionReason.FromProblemsView))))}openFileAtMarker(Z){const{resource:ne,selection:ce}={resource:Z.resource,selection:Z.range};return this.editorService.openEditor({resource:ne,options:{selection:ce,preserveFocus:!0,pinned:!1,revealIfVisible:!0}},D.ACTIVE_GROUP).then(()=>{})}getModel(Z){const ne=this.modelService.getModel(this.marker.resource);return ne?Promise.resolve(ne):Z?(this.modelPromise||(this.modelPromise=(0,g.createCancelablePromise)(ce=>new Promise(de=>{this._register(this.modelService.onModelAdded(he=>{(0,l.isEqual)(he.uri,this.marker.resource)&&de(he)}))}))),this.modelPromise):Promise.resolve(null)}};oe=we([F(1,h.IModelService),F(2,S.IInstantiationService),F(3,D.IEditorService),F(4,B.ILanguageFeaturesService)],oe),e.MarkerViewModel=oe;let se=class extends u.Disposable{constructor(Z=!0,ne="tree",ce,de){super(),this.contextKeyService=ce,this.instantiationService=de,this._onDidChange=this._register(new d.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeViewMode=this._register(new d.Emitter),this.onDidChangeViewMode=this._onDidChangeViewMode.event,this.markersViewStates=new Map,this.markersPerResource=new Map,this.bulkUpdate=!1,this.hoveredMarker=null,this.hoverDelayer=new g.Delayer(300),this._multiline=!0,this._viewMode="tree",this._multiline=Z,this._viewMode=ne,this.viewModeContextKey=z.MarkersContextKeys.MarkersViewModeContextKey.bindTo(this.contextKeyService),this.viewModeContextKey.set(ne)}add(Z){if(!this.markersViewStates.has(Z.id)){const ne=this.instantiationService.createInstance(oe,Z),ce=[ne];ne.multiline=this.multiline,ne.onDidChange(()=>{this.bulkUpdate||this._onDidChange.fire(Z)},this,ce),this.markersViewStates.set(Z.id,{viewModel:ne,disposables:ce});const de=this.markersPerResource.get(Z.resource.toString())||[];de.push(Z),this.markersPerResource.set(Z.resource.toString(),de)}}remove(Z){const ne=this.markersPerResource.get(Z.toString())||[];for(const ce of ne){const de=this.markersViewStates.get(ce.id);de&&(0,u.dispose)(de.disposables),this.markersViewStates.delete(ce.id),this.hoveredMarker===ce&&(this.hoveredMarker=null)}this.markersPerResource.delete(Z.toString())}getViewModel(Z){const ne=this.markersViewStates.get(Z.id);return ne?ne.viewModel:null}onMarkerMouseHover(Z){this.hoveredMarker=Z,this.hoverDelayer.trigger(()=>{if(this.hoveredMarker){const ne=this.getViewModel(this.hoveredMarker);ne&&ne.showLightBulb()}})}onMarkerMouseLeave(Z){this.hoveredMarker===Z&&(this.hoveredMarker=null)}get multiline(){return this._multiline}set multiline(Z){let ne=!1;this._multiline!==Z&&(this._multiline=Z,ne=!0),this.bulkUpdate=!0,this.markersViewStates.forEach(({viewModel:ce})=>{ce.multiline!==Z&&(ce.multiline=Z,ne=!0)}),this.bulkUpdate=!1,ne&&this._onDidChange.fire(void 0)}get viewMode(){return this._viewMode}set viewMode(Z){this._viewMode!==Z&&(this._viewMode=Z,this._onDidChangeViewMode.fire(Z),this.viewModeContextKey.set(Z))}dispose(){this.markersViewStates.forEach(({disposables:Z})=>(0,u.dispose)(Z)),this.markersViewStates.clear(),this.markersPerResource.clear(),super.dispose()}};se=we([F(2,V.IContextKeyService),F(3,S.IInstantiationService)],se),e.MarkersViewModel=se}),define(ae[2456],le([1,0,22,18,75,59,438,1753,15,7,647,101,287,64,152,24,1152]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,r.registerNotebookContribution)(S.NotebookFindContrib.id,S.NotebookFindContrib),(0,I.registerAction2)(class extends I.Action2{constructor(){super({id:"notebook.hideFind",title:{value:(0,E.localize)(0,null),original:"Hide Find in Notebook"},keybinding:{when:b.ContextKeyExpr.and(i.NOTEBOOK_EDITOR_FOCUSED,i.KEYBINDING_CONTEXT_NOTEBOOK_FIND_WIDGET_FOCUSED),primary:9,weight:200}})}async run(s){const d=s.get(f.IEditorService),n=(0,C.getNotebookEditorFromEditorPane)(d.activeEditorPane);if(!n)return;n.getContribution(S.NotebookFindContrib.id).hide(),n.focus()}}),(0,I.registerAction2)(class extends I.Action2{constructor(){super({id:"notebook.find",title:{value:(0,E.localize)(1,null),original:"Find in Notebook"},keybinding:{when:b.ContextKeyExpr.and(i.NOTEBOOK_EDITOR_FOCUSED,b.ContextKeyExpr.or(i.NOTEBOOK_IS_ACTIVE_EDITOR,i.INTERACTIVE_WINDOW_IS_ACTIVE_EDITOR),A.EditorContextKeys.focus.toNegated()),primary:2084,weight:200}})}async run(s){const d=s.get(f.IEditorService),n=(0,C.getNotebookEditorFromEditorPane)(d.activeEditorPane);if(!n)return;n.getContribution(S.NotebookFindContrib.id).show()}});function c(s,d){if(d.uri.scheme===t.Schemas.vscodeNotebookCell){const n=u.CellUri.parse(d.uri);if(n&&(0,p.isEqual)(n.notebook,s))return!0}return!1}function l(s,d){if(d.seedSearchStringFromSelection==="single"){const n=(0,k.getSelectionSearchString)(s,d.seedSearchStringFromSelection,d.seedSearchStringFromNonEmptySelection);if(n)return{searchString:n,selection:s.getSelection()}}else if(d.seedSearchStringFromSelection==="multiple"&&!d.updateSearchScope){const n=(0,k.getSelectionSearchString)(s,d.seedSearchStringFromSelection);if(n)return{searchString:n,selection:s.getSelection()}}}k.StartFindAction.addImplementation(100,(s,d,n)=>{const a=s.get(f.IEditorService),o=(0,C.getNotebookEditorFromEditorPane)(a.activeEditorPane);if(!o||!d.hasModel())return!1;if(!o.hasEditorFocus()&&!o.hasWebviewFocus()){const D=s.get(R.ICodeEditorService),y=D.getFocusedCodeEditor()||D.getActiveCodeEditor();if(!(o.hasModel()&&y&&y.hasModel()&&c(o.textModel.uri,y.getModel())))return!1}const g=o.getContribution(S.NotebookFindContrib.id),h=l(d,{forceRevealReplace:!1,seedSearchStringFromSelection:d.getOption(36).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:d.getOption(36).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:d.getOption(36).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:d.getOption(36).loop});let v;const m=d.getModel().uri,w=u.CellUri.parse(m);if(h?.selection&&w){const D=o.getCellByHandle(w.handle);D&&(v={searchStringSeededFrom:{cell:D,range:h.selection}})}return g.show(h?.searchString,v),!0}),k.StartFindReplaceAction.addImplementation(100,(s,d,n)=>{const a=s.get(f.IEditorService),o=(0,C.getNotebookEditorFromEditorPane)(a.activeEditorPane);if(!o||!d.hasModel())return!1;const g=o.getContribution(S.NotebookFindContrib.id),h=l(d,{forceRevealReplace:!1,seedSearchStringFromSelection:d.getOption(36).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:d.getOption(36).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:d.getOption(36).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:d.getOption(36).loop});return g?(g.replace(h?.searchString),!0):!1})}),define(ae[2457],le([1,0,2,1762,15,70,101,287,142,24]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TroubleshootController=void 0;class S extends t.Disposable{constructor(r){super(),this._notebookEditor=r,this._localStore=this._register(new t.DisposableStore),this._cellStateListeners=[],this._enabled=!1,this._cellStatusItems=[],this._register(this._notebookEditor.onDidChangeModel(()=>{this._update()})),this._update()}toggle(){this._enabled=!this._enabled,this._update()}_update(){this._localStore.clear(),this._cellStateListeners.forEach(r=>r.dispose()),this._notebookEditor.hasModel()&&this._updateListener()}_log(r,u){if(this._enabled){const i=this._notebookEditor.getViewHeight(r);console.log(`cell#${r.handle}`,u,`${i} -> ${r.layoutInfo.totalHeight}`)}}_updateListener(){if(!this._notebookEditor.hasModel())return;for(let i=0;i<this._notebookEditor.getLength();i++){const f=this._notebookEditor.cellAt(i);this._cellStateListeners.push(f.onDidChangeLayout(c=>{this._log(f,c)}))}this._localStore.add(this._notebookEditor.onDidChangeViewCells(i=>{[...i.splices].reverse().forEach(f=>{const[c,l,s]=f,d=this._cellStateListeners.splice(c,l,...s.map(n=>n.onDidChangeLayout(a=>{this._log(n,a)})));(0,t.dispose)(d)})}));const r=this._notebookEditor._getViewModel();let u=[];this._enabled&&(u=this._getItemsForCells()),this._cellStatusItems=r.deltaCellStatusBarItems(this._cellStatusItems,u)}_getItemsForCells(){const r=[];for(let u=0;u<this._notebookEditor.getLength();u++)r.push({handle:u,items:[{text:`index: ${u}`,alignment:1,priority:Number.MAX_SAFE_INTEGER}]});return r}dispose(){(0,t.dispose)(this._cellStateListeners),super.dispose()}}e.TroubleshootController=S,S.id="workbench.notebook.troubleshoot",(0,E.registerNotebookContribution)(S.id,S),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.toggleLayoutTroubleshoot",title:{value:(0,p.localize)(0,null),original:"Toggle Notebook Layout Troubleshoot"},category:A.Categories.Developer,f1:!0})}async run(C){const r=C.get(b.IEditorService),u=(0,k.getNotebookEditorFromEditorPane)(r.activeEditorPane);if(!u)return;u.getContribution(S.id)?.toggle()}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.inspectLayout",title:{value:(0,p.localize)(1,null),original:"Inspect Notebook Layout"},category:A.Categories.Developer,f1:!0})}async run(C){const r=C.get(b.IEditorService),u=(0,k.getNotebookEditorFromEditorPane)(r.activeEditorPane);if(!(!u||!u.hasModel()))for(let i=0;i<u.getLength();i++){const f=u.cellAt(i);console.log(`cell#${f.handle}`,f.layoutInfo)}}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.clearNotebookEdtitorTypeCache",title:{value:(0,p.localize)(2,null),original:"Clear Notebook Editor Cache"},category:A.Categories.Developer,f1:!0})}async run(C){C.get(I.INotebookService).clearEditorCache()}})}),define(ae[178],le([1,0,9,1763,15,7,101,152,268,24,267,27]),function(J,e,t,p,R,A,k,E,I,b,S,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,p.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 r;(function(g){g[g.EditCell=0]="EditCell",g[g.ExecuteAboveCells=1]="ExecuteAboveCells",g[g.ExecuteCellAndBelow=2]="ExecuteCellAndBelow",g[g.SaveCell=3]="SaveCell",g[g.SplitCell=4]="SplitCell",g[g.ClearCellOutput=5]="ClearCellOutput"})(r=e.CellToolbarOrder||(e.CellToolbarOrder={}));var u;(function(g){g.Copy="1_copy",g.Insert="2_insert",g.Edit="3_edit",g.Share="4_share"})(u=e.CellOverflowToolbarGroups||(e.CellOverflowToolbarGroups={}));function i(g){const h=(0,k.getNotebookEditorFromEditorPane)(g.activeEditorPane);if(!h||!h.hasModel())return;const v=h.getActiveCell(),m=h.getSelectionViewModels();return{cell:v,selectedCells:m,notebookEditor:h}}e.getContextFromActiveEditor=i;function f(g,h){const m=g.get(S.INotebookEditorService).listNotebookEditors().find(w=>w.hasModel()&&w.textModel.uri.toString()===h.toString());if(m&&m.hasModel())return m}function c(g,h){const v=t.URI.revive(h);if(v){const m=f(g,v);if(m)return{notebookEditor:m}}}e.getContextFromUri=c;class l extends R.Action2{constructor(h){if(h.f1!==!1){h.f1=!1;const v={id:R.MenuId.CommandPalette,when:E.NOTEBOOK_IS_ACTIVE_EDITOR};h.menu?Array.isArray(h.menu)||(h.menu=[h.menu]):h.menu=[],h.menu=[...h.menu,v]}h.category=e.NOTEBOOK_ACTIONS_CATEGORY,super(h)}async run(h,v,...m){const D=!!v?this.isNotebookActionContext(v)?"notebookToolbar":"editorToolbar":void 0;if(!(!this.isNotebookActionContext(v)&&(v=this.getEditorContextFromArgsOrActive(h,v,...m),!v)))return D!==void 0&&h.get(C.ITelemetryService).publicLog2("workbenchActionExecuted",{id:this.desc.id,from:D}),this.runWithContext(h,v)}isNotebookActionContext(h){return!!h&&!!h.notebookEditor}getEditorContextFromArgsOrActive(h,v,...m){return i(h.get(b.IEditorService))}}e.NotebookAction=l;class s extends R.Action2{constructor(h){if(h.f1!==!1){h.f1=!1;const v={id:R.MenuId.CommandPalette,when:E.NOTEBOOK_IS_ACTIVE_EDITOR};h.menu?Array.isArray(h.menu)||(h.menu=[h.menu]):h.menu=[],h.menu=[...h.menu,v]}h.category=e.NOTEBOOK_ACTIONS_CATEGORY,super(h)}parseArgs(h,...v){}isCellToolbarContext(h){return!!h&&!!h.notebookEditor&&h.$mid===12}isEditorContext(h){return!!h&&h.groupId!==void 0}async run(h,...v){const m=v[0],w=this.isCellToolbarContext(m),D=this.isEditorContext(m),y=w?"cellToolbar":D?"editorToolbar":"other",T=h.get(C.ITelemetryService);if(w)return T.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:y}),this.runWithContext(h,m);const _=this.parseArgs(h,...v);if(_)return T.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:y}),this.runWithContext(h,_);const L=a(h);if(L)return T.publicLog2("workbenchActionExecuted",{id:this.desc.id,from:y}),this.runWithContext(h,{ui:!1,notebookEditor:L,selectedCells:(0,k.cellRangeToViewCells)(L,L.getSelections())})}}e.NotebookMultiCellAction=s;class d extends l{isCellActionContext(h){return!!h&&!!h.notebookEditor&&!!h.cell}getCellContextFromArgs(h,v,...m){}async run(h,v,...m){if(this.isCellActionContext(v))return h.get(C.ITelemetryService).publicLog2("workbenchActionExecuted",{id:this.desc.id,from:"cellToolbar"}),this.runWithContext(h,v);const w=this.getCellContextFromArgs(h,v,...m);if(w)return this.runWithContext(h,w);const D=this.getEditorContextFromArgsOrActive(h);if(this.isCellActionContext(D))return this.runWithContext(h,D)}}e.NotebookCellAction=d,e.executeNotebookCondition=A.ContextKeyExpr.or(A.ContextKeyExpr.greater(E.NOTEBOOK_KERNEL_COUNT.key,0),A.ContextKeyExpr.greater(E.NOTEBOOK_KERNEL_SOURCE_COUNT.key,0));function n(g){if(g===void 0)return!1;const h=g.ranges;return!(!h||!Array.isArray(h)||h.some(v=>!(0,I.isICellRange)(v))||g.document&&!t.URI.revive(g.document))}function a(g,h){const v=c(g,h)?.notebookEditor;if(v)return v;const m=(0,k.getNotebookEditorFromEditorPane)(g.get(b.IEditorService).activeEditorPane);if(!(!m||!m.hasModel()))return m}e.getEditorFromArgsOrActivePane=a;function o(g,...h){const v=h[0];if(n(v)){const w=a(g,v.document);if(!w)return;const y=v.ranges.map(_=>w.getCellsInRange(_).slice(0)).flat(),T=v.autoReveal;return{ui:!1,notebookEditor:w,selectedCells:y,autoReveal:T}}if((0,I.isICellRange)(v)){const w=h[1],D=a(g,w);return D?{ui:!1,notebookEditor:D,selectedCells:D.getCellsInRange(v)}:void 0}const m=i(g.get(b.IEditorService));return m?{ui:!1,notebookEditor:m.notebookEditor,selectedCells:m.selectedCells??[]}:void 0}e.parseMultiCellExecutionArgs=o,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"}}}}],R.MenuRegistry.appendMenuItem(R.MenuId.NotebookCellTitle,{submenu:R.MenuId.NotebookCellInsert,title:(0,p.localize)(1,null),group:"2_insert",when:E.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0)}),R.MenuRegistry.appendMenuItem(R.MenuId.EditorContext,{submenu:R.MenuId.NotebookCellTitle,title:(0,p.localize)(2,null),group:"2_insert",when:E.NOTEBOOK_EDITOR_FOCUSED}),R.MenuRegistry.appendMenuItem(R.MenuId.NotebookCellTitle,{title:(0,p.localize)(3,null),submenu:R.MenuId.EditorContextShare,group:"4_share"})}),define(ae[2458],le([1,0,99,160,145,1748,15,7,141,386,532,178,101,152,215,64]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const c="notebook.cell.moveUp",l="notebook.cell.moveDown",s="notebook.cell.copyUp",d="notebook.cell.copyDown";(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:c,title:{value:(0,A.localize)(0,null),original:"Move Cell Up"},icon:i.moveUpIcon,keybinding:{primary:528,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.equals("config.notebook.dragAndDropEnabled",!1),group:"3_edit",order:13}})}async runWithContext(M,O){return(0,S.moveCellRange)(O,"up")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:l,title:{value:(0,A.localize)(1,null),original:"Move Cell Down"},icon:i.moveDownIcon,keybinding:{primary:530,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.equals("config.notebook.dragAndDropEnabled",!1),group:"3_edit",order:14}})}async runWithContext(M,O){return(0,S.moveCellRange)(O,"down")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:s,title:{value:(0,A.localize)(2,null),original:"Copy Cell Up"},keybinding:{primary:1552,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200}})}async runWithContext(M,O){return(0,S.copyCellRange)(O,"up")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:d,title:{value:(0,A.localize)(3,null),original:"Copy Cell Down"},keybinding:{primary:1554,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,I.InputFocusedContext.toNegated()),weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_EDITOR_EDITABLE,u.NOTEBOOK_CELL_EDITABLE),group:"3_edit",order:12}})}async runWithContext(M,O){return(0,S.copyCellRange)(O,"down")}});const n="notebook.cell.split",a="notebook.cell.joinAbove",o="notebook.cell.joinBelow";(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:n,title:{value:(0,A.localize)(4,null),original:"Split Cell"},menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_EDITABLE,u.NOTEBOOK_CELL_EDITABLE,u.NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated()),order:4,group:C.CELL_TITLE_CELL_GROUP_ID},icon:i.splitCellIcon,keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_EDITOR_EDITABLE,u.NOTEBOOK_CELL_EDITABLE),primary:(0,t.KeyChord)(2089,3160),weight:200}})}async runWithContext(M,O){if(O.notebookEditor.isReadOnly)return;const N=M.get(R.IBulkEditService),P=O.cell,B=O.notebookEditor.getCellIndex(P),V=P.focusMode===r.CellFocusMode.Container?[{lineNumber:1,column:1}]:P.getSelectionsStartPosition();if(V&&V.length>0){if(await P.resolveTextModel(),!P.hasModel())return;const z=(0,S.computeCellLinesContents)(P,V);if(z){const x=P.language,H=P.cellKind,W=P.mime,U=await P.resolveTextModel();await N.apply([new R.ResourceTextEdit(P.uri,{range:U.getFullModelRange(),text:z[0]}),new b.ResourceNotebookCellEdit(O.notebookEditor.textModel.uri,{editType:1,index:B+1,count:0,cells:z.slice(1).map($=>({cellKind:H,language:x,mime:W,source:$,outputs:[],metadata:{}}))})],{quotableLabel:"Split Notebook Cell"})}}}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:a,title:{value:(0,A.localize)(5,null),original:"Join With Previous Cell"},keybinding:{when:u.NOTEBOOK_EDITOR_FOCUSED,primary:1832,weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:10}})}async runWithContext(M,O){const N=M.get(R.IBulkEditService);return(0,S.joinCellsWithSurrounds)(N,O,"above")}}),(0,k.registerAction2)(class extends C.NotebookCellAction{constructor(){super({id:o,title:{value:(0,A.localize)(6,null),original:"Join With Next Cell"},keybinding:{when:u.NOTEBOOK_EDITOR_FOCUSED,primary:808,weight:200},menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_EDITOR_EDITABLE),group:"3_edit",order:11}})}async runWithContext(M,O){const N=M.get(R.IBulkEditService);return(0,S.joinCellsWithSurrounds)(N,O,"below")}});const g="notebook.cell.changeToCode",h="notebook.cell.changeToMarkdown";(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:g,title:{value:(0,A.localize)(7,null),original:"Change Cell to Code"},keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.not(I.InputFocusedContextKey)),primary:55,weight:200},precondition:E.ContextKeyExpr.and(u.NOTEBOOK_IS_ACTIVE_EDITOR,u.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_EDITOR_EDITABLE,u.NOTEBOOK_CELL_EDITABLE,u.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),group:"3_edit"}})}async runWithContext(O,N){await(0,S.changeCellToKind)(f.CellKind.Code,N)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:h,title:{value:(0,A.localize)(8,null),original:"Change Cell to Markdown"},keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.not(I.InputFocusedContextKey)),primary:43,weight:200},precondition:E.ContextKeyExpr.and(u.NOTEBOOK_IS_ACTIVE_EDITOR,u.NOTEBOOK_CELL_TYPE.isEqualTo("code")),menu:{id:k.MenuId.NotebookCellTitle,when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_EDITOR_EDITABLE,u.NOTEBOOK_CELL_EDITABLE,u.NOTEBOOK_CELL_TYPE.isEqualTo("code")),group:"3_edit"}})}async runWithContext(O,N){await(0,S.changeCellToKind)(f.CellKind.Markup,N,"markdown",p.Mimes.markdown)}});const v="notebook.cell.collapseCellInput",m="notebook.cell.collapseCellOutput",w="notebook.cell.collapseAllCellInputs",D="notebook.cell.expandAllCellInputs",y="notebook.cell.collapseAllCellOutputs",T="notebook.cell.expandAllCellOutputs",_="notebook.cell.toggleOutputs";(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:v,title:{value:(0,A.localize)(9,null),original:"Collapse Cell Input"},keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_CELL_LIST_FOCUSED,u.NOTEBOOK_CELL_INPUT_COLLAPSED.toNegated(),I.InputFocusedContext.toNegated()),primary:(0,t.KeyChord)(2089,2081),weight:200}})}parseArgs(O,...N){return(0,C.parseMultiCellExecutionArgs)(O,...N)}async runWithContext(O,N){N.ui?N.cell.isInputCollapsed=!0:N.selectedCells.forEach(P=>P.isInputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:r.EXPAND_CELL_INPUT_COMMAND_ID,title:{value:(0,A.localize)(10,null),original:"Expand Cell Input"},keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_CELL_LIST_FOCUSED,u.NOTEBOOK_CELL_INPUT_COLLAPSED),primary:(0,t.KeyChord)(2089,2081),weight:200}})}parseArgs(O,...N){return(0,C.parseMultiCellExecutionArgs)(O,...N)}async runWithContext(O,N){N.ui?N.cell.isInputCollapsed=!1:N.selectedCells.forEach(P=>P.isInputCollapsed=!1)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:m,title:{value:(0,A.localize)(11,null),original:"Collapse Cell Output"},keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_CELL_LIST_FOCUSED,u.NOTEBOOK_CELL_OUTPUT_COLLAPSED.toNegated(),I.InputFocusedContext.toNegated(),u.NOTEBOOK_CELL_HAS_OUTPUTS),primary:(0,t.KeyChord)(2089,50),weight:200}})}async runWithContext(O,N){N.ui?N.cell.isOutputCollapsed=!0:N.selectedCells.forEach(P=>P.isOutputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:r.EXPAND_CELL_OUTPUT_COMMAND_ID,title:{value:(0,A.localize)(12,null),original:"Expand Cell Output"},keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_CELL_LIST_FOCUSED,u.NOTEBOOK_CELL_OUTPUT_COLLAPSED),primary:(0,t.KeyChord)(2089,50),weight:200}})}async runWithContext(O,N){N.ui?N.cell.isOutputCollapsed=!1:N.selectedCells.forEach(P=>P.isOutputCollapsed=!1)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:_,precondition:u.NOTEBOOK_CELL_LIST_FOCUSED,title:{value:(0,A.localize)(13,null),original:"Toggle Outputs"},description:{description:(0,A.localize)(14,null),args:C.cellExecutionArgs}})}parseArgs(M,...O){return(0,C.parseMultiCellExecutionArgs)(M,...O)}async runWithContext(M,O){let N=[];O.ui?N=[O.cell]:O.selectedCells&&(N=O.selectedCells);for(const P of N)P.isOutputCollapsed=!P.isOutputCollapsed}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:w,title:{value:(0,A.localize)(15,null),original:"Collapse All Cell Inputs"},f1:!0})}async runWithContext(O,N){L(N.notebookEditor,P=>P.isInputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:D,title:{value:(0,A.localize)(16,null),original:"Expand All Cell Inputs"},f1:!0})}async runWithContext(O,N){L(N.notebookEditor,P=>P.isInputCollapsed=!1)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:y,title:{value:(0,A.localize)(17,null),original:"Collapse All Cell Outputs"},f1:!0})}async runWithContext(O,N){L(N.notebookEditor,P=>P.isOutputCollapsed=!0)}}),(0,k.registerAction2)(class extends C.NotebookMultiCellAction{constructor(){super({id:T,title:{value:(0,A.localize)(18,null),original:"Expand All Cell Outputs"},f1:!0})}async runWithContext(O,N){L(N.notebookEditor,P=>P.isOutputCollapsed=!1)}});function L(M,O){for(let N=0;N<M.getLength();N++){const P=M.cellAt(N);O(P,N)}}}),define(ae[2459],le([1,0,15,7,1756,152,101,5,178,24,62,2,431,212,32,145,59,40,66,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerAction2)(class extends t.Action2{constructor(){super({id:"notebook.format",title:{value:(0,R.localize)(0,null),original:"Format Notebook"},category:I.NOTEBOOK_ACTIONS_CATEGORY,precondition:p.ContextKeyExpr.and(A.NOTEBOOK_IS_ACTIVE_EDITOR,A.NOTEBOOK_EDITOR_EDITABLE),keybinding:{when:c.EditorContextKeys.editorTextFocus.toNegated(),primary:1572,linux:{primary:3111},weight:200},f1:!0,menu:{id:t.MenuId.EditorContext,when:p.ContextKeyExpr.and(c.EditorContextKeys.inCompositeEditor,c.EditorContextKeys.hasDocumentFormattingProvider),group:"1_modification",order:1.3}})}async run(n){const a=n.get(b.IEditorService),o=n.get(S.ITextModelService),g=n.get(u.IEditorWorkerService),h=n.get(d.ILanguageFeaturesService),v=n.get(f.IBulkEditService),m=(0,k.getNotebookEditorFromEditorPane)(a.activeEditorPane);if(!m||!m.hasModel())return;const w=m.textModel,D=new C.DisposableStore;try{const y=await Promise.all(w.cells.map(async T=>{const _=await o.createModelReference(T.uri);D.add(_);const L=_.object.textEditorModel,M=await(0,r.getDocumentFormattingEditsUntilResult)(g,h,L,L.getOptions(),i.CancellationToken.None),O=[];if(M){for(const N of M)O.push(new f.ResourceTextEdit(L.uri,N,L.getVersionId()));return O}return[]}));await v.apply(y.flat(),{label:(0,R.localize)(1,null),code:"undoredo.formatNotebook"})}finally{D.dispose()}}}),(0,l.registerEditorAction)(class extends l.EditorAction{constructor(){super({id:"notebook.formatCell",label:(0,R.localize)(2,null),alias:"Format Cell",precondition:p.ContextKeyExpr.and(A.NOTEBOOK_IS_ACTIVE_EDITOR,A.NOTEBOOK_EDITOR_EDITABLE,c.EditorContextKeys.inCompositeEditor,c.EditorContextKeys.writable,c.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:p.ContextKeyExpr.and(c.EditorContextKeys.editorTextFocus),primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.301}})}async run(a,o){o.hasModel()&&await a.get(E.IInstantiationService).invokeFunction(r.formatDocumentWithSelectedProvider,o,1,s.Progress.None,i.CancellationToken.None)}})}),define(ae[2460],le([1,0,1758,15,8,178,64]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleCellToolbarPositionAction=void 0;const E="notebook.toggleCellToolbarPosition";class I extends p.Action2{constructor(){super({id:E,title:{value:(0,t.localize)(0,null),original:"Toggle Cell Toolbar Position"},menu:[{id:p.MenuId.NotebookCellTitle,group:"View",order:1}],category:A.NOTEBOOK_ACTIONS_CATEGORY,f1:!1})}async run(S,C){const r=C&&C.ui?C.notebookEditor:void 0;if(r&&r.hasModel()){const u=r.textModel.viewType,i=S.get(R.IConfigurationService),f=i.getValue(k.NotebookSetting.cellToolbarLocation),c=this.togglePosition(u,f);await i.updateValue(k.NotebookSetting.cellToolbarLocation,c)}}togglePosition(S,C){if(typeof C=="string")if(["left","right","hidden"].indexOf(C)>=0){const r=C==="right"?"left":"right",u={default:C};return u[S]=r,u}else{const r={default:"right"};return r[S]="left",r}else{const u=(C[S]??C.default??"right")==="right"?"left":"right",i={...C};return i[S]=u,i}}}e.ToggleCellToolbarPositionAction=I,(0,p.registerAction2)(I)}),define(ae[913],le([1,0,40,59,1759,15,55,7,141,17,178,101,64,152]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CENTER_ACTIVE_CELL=void 0;const i="notebook.focusTop",f="notebook.focusBottom",c="notebook.focusPreviousEditor",l="notebook.focusNextEditor",s="notebook.cell.focusInOutput",d="notebook.cell.focusOutOutput";e.CENTER_ACTIVE_CELL="notebook.centerActiveCell";const n="notebook.cell.cursorPageUp",a="notebook.cell.cursorPageUpSelect",o="notebook.cell.cursorPageDown",g="notebook.cell.cursorPageDownSelect";(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:l,title:(0,R.localize)(0,null),keybinding:[{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells",!0),E.ContextKeyExpr.and(E.ContextKeyExpr.has(I.InputFocusedContextKey),p.EditorContextKeys.editorTextFocus,r.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("top"),r.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("none"))),primary:18,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells",!0),E.ContextKeyExpr.and(u.NOTEBOOK_CELL_TYPE.isEqualTo("markup"),u.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(!1),u.NOTEBOOK_CURSOR_NAVIGATION_MODE)),primary:18,weight:200},{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_OUTPUT_FOCUSED),primary:2066,mac:{primary:2322},weight:200}]})}async runWithContext(m,w){const D=w.notebookEditor,y=w.cell,T=D.getCellIndex(y);if(typeof T!="number"||T>=D.getLength()-1)return;const _=D.cellAt(T+1),L=_.cellKind===r.CellKind.Markup&&_.getEditState()===C.CellEditState.Preview?"container":"editor";await D.focusNotebookCell(_,L,{focusEditorLine:1})}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:c,title:(0,R.localize)(1,null),keybinding:[{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells",!0),E.ContextKeyExpr.and(E.ContextKeyExpr.has(I.InputFocusedContextKey),p.EditorContextKeys.editorTextFocus,r.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("bottom"),r.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.notEqualsTo("none"))),primary:16,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.equals("config.notebook.navigation.allowNavigateToSurroundingCells",!0),E.ContextKeyExpr.and(u.NOTEBOOK_CELL_TYPE.isEqualTo("markup"),u.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.isEqualTo(!1),u.NOTEBOOK_CURSOR_NAVIGATION_MODE)),primary:16,weight:200}]})}async runWithContext(m,w){const D=w.notebookEditor,y=w.cell,T=D.getCellIndex(y);if(typeof T!="number"||T<1||D.getLength()===0)return;const _=D.cellAt(T-1),L=_.cellKind===r.CellKind.Markup&&_.getEditState()===C.CellEditState.Preview?"container":"editor";await D.focusNotebookCell(_,L,{focusEditorLine:_.textBuffer.getLineCount()})}}),(0,A.registerAction2)(class extends S.NotebookAction{constructor(){super({id:i,title:(0,R.localize)(2,null),keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.not(I.InputFocusedContextKey)),primary:2062,mac:{primary:2064},weight:200}})}async runWithContext(v,m){const w=m.notebookEditor;if(w.getLength()===0)return;const D=w.cellAt(0);await w.focusNotebookCell(D,"container")}}),(0,A.registerAction2)(class extends S.NotebookAction{constructor(){super({id:f,title:(0,R.localize)(3,null),keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.not(I.InputFocusedContextKey)),primary:2061,mac:{primary:2066},weight:200}})}async runWithContext(v,m){const w=m.notebookEditor;if(!w.hasModel()||w.getLength()===0)return;const D=w.getLength()-1,y=w.getPreviousVisibleCellIndex(D);if(y){const T=w.cellAt(y);await w.focusNotebookCell(T,"container")}}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:s,title:(0,R.localize)(4,null),keybinding:{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,u.NOTEBOOK_CELL_HAS_OUTPUTS),primary:2066,mac:{primary:2322},weight:200}})}async runWithContext(v,m){const w=m.notebookEditor,D=m.cell;await w.focusNotebookCell(D,"output")}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:d,title:(0,R.localize)(5,null),keybinding:{when:u.NOTEBOOK_EDITOR_FOCUSED,primary:2064,mac:{primary:2320},weight:200}})}async runWithContext(v,m){const w=m.notebookEditor,D=m.cell;await w.focusNotebookCell(D,"editor")}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:e.CENTER_ACTIVE_CELL,title:(0,R.localize)(6,null),keybinding:{when:u.NOTEBOOK_EDITOR_FOCUSED,primary:2090,mac:{primary:298},weight:200}})}async runWithContext(m,w){return w.notebookEditor.revealInCenter(w.cell)}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:n,title:(0,R.localize)(7,null),keybinding:[{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.has(I.InputFocusedContextKey),p.EditorContextKeys.editorTextFocus),primary:11,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(v,m){t.EditorExtensionsRegistry.getEditorCommand("cursorPageUp").runCommand(v,{pageSize:h(m)})}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:a,title:(0,R.localize)(8,null),keybinding:[{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.has(I.InputFocusedContextKey),p.EditorContextKeys.editorTextFocus),primary:1035,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(v,m){t.EditorExtensionsRegistry.getEditorCommand("cursorPageUpSelect").runCommand(v,{pageSize:h(m)})}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:o,title:(0,R.localize)(9,null),keybinding:[{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.has(I.InputFocusedContextKey),p.EditorContextKeys.editorTextFocus),primary:12,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(v,m){t.EditorExtensionsRegistry.getEditorCommand("cursorPageDown").runCommand(v,{pageSize:h(m)})}}),(0,A.registerAction2)(class extends S.NotebookCellAction{constructor(){super({id:g,title:(0,R.localize)(10,null),keybinding:[{when:E.ContextKeyExpr.and(u.NOTEBOOK_EDITOR_FOCUSED,E.ContextKeyExpr.has(I.InputFocusedContextKey),p.EditorContextKeys.editorTextFocus),primary:1036,weight:S.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}]})}async runWithContext(v,m){t.EditorExtensionsRegistry.getEditorCommand("cursorPageDownSelect").runCommand(v,{pageSize:h(m)})}});function h(v){const w=v.notebookEditor._getViewModel().layoutInfo,D=w?.fontInfo.lineHeight||17;return Math.max(1,Math.floor((w?.height||0)/D)-2)}b.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.navigation.allowNavigateToSurroundingCells":{type:"boolean",default:!0,markdownDescription:(0,R.localize)(11,null)}}})}),define(ae[2461],le([1,0,88,42,1765,15,7,12,532,178,152,101,215,64,258,162,58,24,22]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.executeThisCellCondition=e.executeCondition=void 0;const d="notebook.execute",n="notebook.cancelExecution",a="notebook.interruptExecution",o="notebook.cell.cancelExecution",g="notebook.cell.executeAndFocusContainer",h="notebook.cell.executeAndSelectBelow",v="notebook.cell.executeAndInsertBelow",m="notebook.cell.executeCellAndBelow",w="notebook.cell.executeCellsAbove",D="notebook.renderAllMarkdownCells",y="notebook.revealRunningCell",T="notebook.revealLastFailedCell";e.executeCondition=k.ContextKeyExpr.and(S.NOTEBOOK_CELL_TYPE.isEqualTo("code"),k.ContextKeyExpr.or(k.ContextKeyExpr.greater(S.NOTEBOOK_KERNEL_COUNT.key,0),k.ContextKeyExpr.greater(S.NOTEBOOK_KERNEL_SOURCE_COUNT.key,0),S.NOTEBOOK_MISSING_KERNEL_EXTENSION)),e.executeThisCellCondition=k.ContextKeyExpr.and(e.executeCondition,S.NOTEBOOK_CELL_EXECUTING.toNegated());function _(N){for(let P=0;P<N.notebookEditor.getLength();P++){const B=N.notebookEditor.cellAt(P);B.cellKind===u.CellKind.Markup&&B.updateEditState(C.CellEditState.Preview,"renderAllMarkdownCells")}}async function L(N,P){const B=N.activeGroup;if(B&&B.activeEditor&&B.pinEditor(B.activeEditor),P.ui&&P.cell){if(await P.notebookEditor.executeNotebookCells(t.Iterable.single(P.cell)),P.autoReveal){const V=P.notebookEditor.getCellIndex(P.cell);P.notebookEditor.revealCellRangeInView({start:V,end:V+1})}}else if(P.selectedCells){await P.notebookEditor.executeNotebookCells(P.selectedCells);const V=P.selectedCells[0];if(V&&P.autoReveal){const z=P.notebookEditor.getCellIndex(V);P.notebookEditor.revealCellRangeInView({start:z,end:z+1})}}}(0,A.registerAction2)(class extends b.NotebookAction{constructor(){super({id:D,title:(0,R.localize)(0,null)})}async runWithContext(P,B){_(B)}}),(0,A.registerAction2)(class extends b.NotebookAction{constructor(){super({id:d,title:(0,R.localize)(1,null),icon:r.executeAllIcon,description:{description:(0,R.localize)(2,null),args:[{name:"uri",description:"The document uri"}]},menu:[{id:A.MenuId.EditorTitle,order:-1,group:"navigation",when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,b.executeNotebookCondition,k.ContextKeyExpr.or(S.NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(),S.NOTEBOOK_HAS_RUNNING_CELL.toNegated()),k.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0))},{id:A.MenuId.NotebookToolbar,order:-1,group:"navigation/execute",when:k.ContextKeyExpr.and(b.executeNotebookCondition,k.ContextKeyExpr.or(S.NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(),S.NOTEBOOK_HAS_RUNNING_CELL.toNegated()),k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0))}]})}getEditorContextFromArgsOrActive(P,B){return(0,b.getContextFromUri)(P,B)??(0,b.getContextFromActiveEditor)(P.get(l.IEditorService))}async runWithContext(P,B){_(B);const z=P.get(l.IEditorService).getEditors(0).find(H=>H.editor instanceof i.NotebookEditorInput&&H.editor.viewType===B.notebookEditor.textModel.viewType&&H.editor.resource.toString()===B.notebookEditor.textModel.uri.toString()),x=P.get(c.IEditorGroupsService);return z&&x.getGroup(z.groupId)?.pinEditor(z.editor),B.notebookEditor.executeNotebookCells()}}),(0,A.registerAction2)(class extends b.NotebookMultiCellAction{constructor(){super({id:C.EXECUTE_CELL_COMMAND_ID,precondition:e.executeThisCellCondition,title:(0,R.localize)(3,null),keybinding:{when:S.NOTEBOOK_CELL_LIST_FOCUSED,primary:259,win:{primary:2563},weight:b.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},menu:{id:A.MenuId.NotebookCellExecutePrimary,when:e.executeThisCellCondition,group:"inline"},description:{description:(0,R.localize)(4,null),args:b.cellExecutionArgs},icon:r.executeIcon})}parseArgs(P,...B){return(0,b.parseMultiCellExecutionArgs)(P,...B)}async runWithContext(P,B){const V=P.get(c.IEditorGroupsService);return B.ui&&await B.notebookEditor.focusNotebookCell(B.cell,"container",{skipReveal:!0}),L(V,B)}}),(0,A.registerAction2)(class extends b.NotebookMultiCellAction{constructor(){super({id:w,precondition:e.executeCondition,title:(0,R.localize)(5,null),menu:[{id:A.MenuId.NotebookCellExecute,when:k.ContextKeyExpr.and(e.executeCondition,k.ContextKeyExpr.equals(`config.${u.NotebookSetting.consolidatedRunButton}`,!0))},{id:A.MenuId.NotebookCellTitle,order:1,group:b.CELL_TITLE_CELL_GROUP_ID,when:k.ContextKeyExpr.and(e.executeCondition,k.ContextKeyExpr.equals(`config.${u.NotebookSetting.consolidatedRunButton}`,!1))}],icon:r.executeAboveIcon})}parseArgs(P,...B){return(0,b.parseMultiCellExecutionArgs)(P,...B)}async runWithContext(P,B){let V;if(B.ui?(V=B.notebookEditor.getCellIndex(B.cell),await B.notebookEditor.focusNotebookCell(B.cell,"container",{skipReveal:!0})):V=Math.min(...B.selectedCells.map(z=>B.notebookEditor.getCellIndex(z))),typeof V=="number"){const z={start:0,end:V},x=B.notebookEditor.getCellsInRange(z);B.notebookEditor.executeNotebookCells(x)}}}),(0,A.registerAction2)(class extends b.NotebookMultiCellAction{constructor(){super({id:m,precondition:e.executeCondition,title:(0,R.localize)(6,null),menu:[{id:A.MenuId.NotebookCellExecute,when:k.ContextKeyExpr.and(e.executeCondition,k.ContextKeyExpr.equals(`config.${u.NotebookSetting.consolidatedRunButton}`,!0))},{id:A.MenuId.NotebookCellTitle,order:2,group:b.CELL_TITLE_CELL_GROUP_ID,when:k.ContextKeyExpr.and(e.executeCondition,k.ContextKeyExpr.equals(`config.${u.NotebookSetting.consolidatedRunButton}`,!1))}],icon:r.executeBelowIcon})}parseArgs(P,...B){return(0,b.parseMultiCellExecutionArgs)(P,...B)}async runWithContext(P,B){let V;if(B.ui?(V=B.notebookEditor.getCellIndex(B.cell),await B.notebookEditor.focusNotebookCell(B.cell,"container",{skipReveal:!0})):V=Math.min(...B.selectedCells.map(z=>B.notebookEditor.getCellIndex(z))),typeof V=="number"){const z={start:V,end:B.notebookEditor.getLength()},x=B.notebookEditor.getCellsInRange(z);B.notebookEditor.executeNotebookCells(x)}}}),(0,A.registerAction2)(class extends b.NotebookMultiCellAction{constructor(){super({id:g,precondition:e.executeThisCellCondition,title:(0,R.localize)(7,null),description:{description:(0,R.localize)(8,null),args:b.cellExecutionArgs},icon:r.executeIcon})}parseArgs(P,...B){return(0,b.parseMultiCellExecutionArgs)(P,...B)}async runWithContext(P,B){const V=P.get(c.IEditorGroupsService);if(B.ui)await B.notebookEditor.focusNotebookCell(B.cell,"container",{skipReveal:!0});else{const z=B.selectedCells[0];z&&await B.notebookEditor.focusNotebookCell(z,"container",{skipReveal:!0})}await L(V,B)}});const M=k.ContextKeyExpr.or(k.ContextKeyExpr.equals(S.NOTEBOOK_CELL_EXECUTION_STATE.key,"executing"),k.ContextKeyExpr.equals(S.NOTEBOOK_CELL_EXECUTION_STATE.key,"pending"));(0,A.registerAction2)(class extends b.NotebookMultiCellAction{constructor(){super({id:o,precondition:M,title:(0,R.localize)(9,null),icon:r.stopIcon,menu:{id:A.MenuId.NotebookCellExecutePrimary,when:M,group:"inline"},description:{description:(0,R.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(P,...B){return(0,b.parseMultiCellExecutionArgs)(P,...B)}async runWithContext(P,B){return B.ui?(await B.notebookEditor.focusNotebookCell(B.cell,"container",{skipReveal:!0}),B.notebookEditor.cancelNotebookCells(t.Iterable.single(B.cell))):B.notebookEditor.cancelNotebookCells(B.selectedCells)}}),(0,A.registerAction2)(class extends b.NotebookCellAction{constructor(){super({id:h,precondition:k.ContextKeyExpr.or(e.executeThisCellCondition,S.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),title:(0,R.localize)(11,null),keybinding:{when:S.NOTEBOOK_CELL_LIST_FOCUSED,primary:1027,weight:b.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(P,B){const V=P.get(c.IEditorGroupsService),z=B.notebookEditor.getCellIndex(B.cell);if(typeof z!="number")return;const x=P.get(p.ILanguageService);if(B.cell.cellKind===u.CellKind.Markup){const H=B.notebookEditor.cellAt(z+1);if(B.cell.updateEditState(C.CellEditState.Preview,h),H)await B.notebookEditor.focusNotebookCell(H,"container");else{const W=(0,I.insertCell)(x,B.notebookEditor,z,u.CellKind.Markup,"below");W&&await B.notebookEditor.focusNotebookCell(W,"editor")}return}else{const H=B.notebookEditor.cellAt(z+1);if(H)await B.notebookEditor.focusNotebookCell(H,"container");else{const W=(0,I.insertCell)(x,B.notebookEditor,z,u.CellKind.Code,"below");W&&await B.notebookEditor.focusNotebookCell(W,"editor")}return L(V,B)}}}),(0,A.registerAction2)(class extends b.NotebookCellAction{constructor(){super({id:v,precondition:k.ContextKeyExpr.or(e.executeThisCellCondition,S.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),title:(0,R.localize)(12,null),keybinding:{when:S.NOTEBOOK_CELL_LIST_FOCUSED,primary:515,weight:b.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(P,B){const V=P.get(c.IEditorGroupsService),z=B.notebookEditor.getCellIndex(B.cell),x=P.get(p.ILanguageService),H=B.cell.focusMode===C.CellFocusMode.Editor?"editor":"container",W=(0,I.insertCell)(x,B.notebookEditor,z,B.cell.cellKind,"below");W&&await B.notebookEditor.focusNotebookCell(W,H),B.cell.cellKind===u.CellKind.Markup?B.cell.updateEditState(C.CellEditState.Preview,v):L(V,B)}});class O extends b.NotebookAction{getEditorContextFromArgsOrActive(P,B){return(0,b.getContextFromUri)(P,B)??(0,b.getContextFromActiveEditor)(P.get(l.IEditorService))}async runWithContext(P,B){return B.notebookEditor.cancelNotebookCells()}}(0,A.registerAction2)(class extends O{constructor(){super({id:n,title:{value:(0,R.localize)(13,null),original:"Stop Execution"},icon:r.stopIcon,menu:[{id:A.MenuId.EditorTitle,order:-1,group:"navigation",when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,S.NOTEBOOK_HAS_RUNNING_CELL,S.NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(),k.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0))},{id:A.MenuId.NotebookToolbar,order:-1,group:"navigation/execute",when:k.ContextKeyExpr.and(S.NOTEBOOK_HAS_RUNNING_CELL,S.NOTEBOOK_INTERRUPTIBLE_KERNEL.toNegated(),k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0))}]})}}),(0,A.registerAction2)(class extends O{constructor(){super({id:a,title:{value:(0,R.localize)(14,null),original:"Interrupt"},icon:r.stopIcon,menu:[{id:A.MenuId.EditorTitle,order:-1,group:"navigation",when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,S.NOTEBOOK_HAS_RUNNING_CELL,S.NOTEBOOK_INTERRUPTIBLE_KERNEL,k.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0))},{id:A.MenuId.NotebookToolbar,order:-1,group:"navigation/execute",when:k.ContextKeyExpr.and(S.NOTEBOOK_HAS_RUNNING_CELL,S.NOTEBOOK_INTERRUPTIBLE_KERNEL,k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0))}]})}}),(0,A.registerAction2)(class extends b.NotebookAction{constructor(){super({id:y,title:(0,R.localize)(15,null),tooltip:(0,R.localize)(16,null),shortTitle:(0,R.localize)(17,null),precondition:S.NOTEBOOK_HAS_RUNNING_CELL,menu:[{id:A.MenuId.EditorTitle,when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,S.NOTEBOOK_HAS_RUNNING_CELL,k.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:0},{id:A.MenuId.NotebookToolbar,when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,S.NOTEBOOK_HAS_RUNNING_CELL,k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)),group:"navigation/execute",order:0},{id:A.MenuId.InteractiveToolbar,when:k.ContextKeyExpr.and(S.NOTEBOOK_HAS_RUNNING_CELL,k.ContextKeyExpr.equals("resourceScheme",s.Schemas.vscodeInteractive)),group:"navigation",order:10}],icon:E.ThemeIcon.modify(r.executingStateIcon,"spin")})}async runWithContext(P,B){const V=P.get(f.INotebookExecutionStateService),z=B.notebookEditor.textModel.uri,x=V.getCellExecutionsForNotebook(z);if(x[0]){const H=B.notebookEditor.getCellByHandle(x[0].cellHandle);H&&B.notebookEditor.focusNotebookCell(H,"container")}}}),(0,A.registerAction2)(class extends b.NotebookAction{constructor(){super({id:T,title:(0,R.localize)(18,null),tooltip:(0,R.localize)(19,null),shortTitle:(0,R.localize)(20,null),precondition:S.NOTEBOOK_LAST_CELL_FAILED,menu:[{id:A.MenuId.EditorTitle,when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,S.NOTEBOOK_LAST_CELL_FAILED,S.NOTEBOOK_HAS_RUNNING_CELL.toNegated(),k.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:0},{id:A.MenuId.NotebookToolbar,when:k.ContextKeyExpr.and(S.NOTEBOOK_IS_ACTIVE_EDITOR,S.NOTEBOOK_LAST_CELL_FAILED,S.NOTEBOOK_HAS_RUNNING_CELL.toNegated(),k.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)),group:"navigation/execute",order:0}],icon:r.errorStateIcon})}async runWithContext(P,B){const V=P.get(f.INotebookExecutionStateService),z=B.notebookEditor.textModel.uri,x=V.getLastFailedCellForNotebook(z);if(x!==void 0){const H=B.notebookEditor.getCellByHandle(x);H&&B.notebookEditor.focusNotebookCell(H,"container")}}})}),define(ae[914],le([1,0,2,152,101,2368,64,287,15,7,141,24,178,1766]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingController=void 0;class i extends t.Disposable{constructor(d){super(),this._notebookEditor=d,this._foldingModel=null,this._localStore=this._register(new t.DisposableStore),this._register(this._notebookEditor.onMouseUp(n=>{this.onMouseUp(n)})),this._register(this._notebookEditor.onDidChangeModel(()=>{this._localStore.clear(),this._notebookEditor.hasModel()&&(this._localStore.add(this._notebookEditor.onDidChangeCellState(n=>{n.source.editStateChanged&&n.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(d){this._foldingModel?.applyMemento(d||[]),this._updateEditorFoldingRanges()}setFoldingStateDown(d,n,a){const o=n===2,g=this._foldingModel.getRegionAtLine(d+1),h=[];if(g&&(g.isCollapsed!==o&&h.push(g),a>1)){const v=this._foldingModel.getRegionsInside(g,(m,w)=>m.isCollapsed!==o&&w<a);h.push(...v)}h.forEach(v=>this._foldingModel.setCollapsed(v.regionIndex,n===2)),this._updateEditorFoldingRanges()}setFoldingStateUp(d,n,a){if(!this._foldingModel)return;this._foldingModel.getAllRegionsAtLine(d+1,(g,h)=>g.isCollapsed!==(n===2)&&h<=a).forEach(g=>this._foldingModel.setCollapsed(g.regionIndex,n===2)),this._updateEditorFoldingRanges()}_updateEditorFoldingRanges(){if(!this._foldingModel||!this._notebookEditor.hasModel())return;const d=this._notebookEditor._getViewModel();d.updateFoldingRanges(this._foldingModel.regions);const n=d.getHiddenRanges();this._notebookEditor.setHiddenAreas(n)}onMouseUp(d){if(!d.event.target||!this._notebookEditor.hasModel())return;const n=this._notebookEditor._getViewModel(),a=d.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 g=d.target,h=n.getCellIndex(g),v=n.getFoldingState(h);if(v===0)return;this.setFoldingStateUp(h,v===2?1:2,1),this._notebookEditor.focusElement(g)}}}e.FoldingController=i,i.id="workbench.notebook.findController",(0,E.registerNotebookContribution)(i.id,i);const f=(0,u.localize)(0,null),c=(0,u.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,u.localize)(2,null),original:"Fold Cell"},category:r.NOTEBOOK_ACTIONS_CATEGORY,keybinding:{when:b.ContextKeyExpr.and(p.NOTEBOOK_EDITOR_FOCUSED,b.ContextKeyExpr.not(S.InputFocusedContextKey)),primary:3159,mac:{primary:2647,secondary:[15]},secondary:[15],weight:200},description:{description:f,args:l.args},precondition:p.NOTEBOOK_IS_ACTIVE_EDITOR,f1:!0})}async run(s,d){const n=s.get(C.IEditorService),a=(0,R.getNotebookEditorFromEditorPane)(n.activeEditorPane);if(!a||!a.hasModel())return;const o=d&&d.levels||1,g=d&&d.direction==="up"?"up":"down";let h;if(d)h=d.index;else{const m=a.getActiveCell();if(!m)return;h=a.getCellIndex(m)}const v=a.getContribution(i.id);if(h!==void 0){if((h<0||h>=a.getLength()?void 0:a.cellAt(h))?.cellKind===k.CellKind.Code&&g==="down")return;g==="up"?v.setFoldingStateUp(h,2,o):v.setFoldingStateDown(h,2,o);const w=a._getViewModel().getNearestVisibleCellIndexUpwards(h);a.focusElement(a.cellAt(w))}}}),(0,I.registerAction2)(class extends I.Action2{constructor(){super({id:"notebook.unfold",title:{value:c,original:"Unfold Cell"},category:r.NOTEBOOK_ACTIONS_CATEGORY,keybinding:{when:b.ContextKeyExpr.and(p.NOTEBOOK_EDITOR_FOCUSED,b.ContextKeyExpr.not(S.InputFocusedContextKey)),primary:3161,mac:{primary:2649,secondary:[17]},secondary:[17],weight:200},description:{description:c,args:l.args},precondition:p.NOTEBOOK_IS_ACTIVE_EDITOR,f1:!0})}async run(s,d){const n=s.get(C.IEditorService),a=(0,R.getNotebookEditorFromEditorPane)(n.activeEditorPane);if(!a)return;const o=d&&d.levels||1,g=d&&d.direction==="up"?"up":"down";let h;if(d)h=d.index;else{const m=a.getActiveCell();if(!m)return;h=a.getCellIndex(m)}const v=a.getContribution(i.id);h!==void 0&&(g==="up"?v.setFoldingStateUp(h,1,o):v.setFoldingStateDown(h,1,o))}})}),define(ae[2462],le([1,0,29,42,1767,15,7,141,532,178,152,64]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r="notebook.cell.insertCodeCellAbove",u="notebook.cell.insertCodeCellBelow",i="notebook.cell.insertCodeCellAboveAndFocusContainer",f="notebook.cell.insertCodeCellBelowAndFocusContainer",c="notebook.cell.insertCodeCellAtTop",l="notebook.cell.insertMarkdownCellAbove",s="notebook.cell.insertMarkdownCellBelow",d="notebook.cell.insertMarkdownCellAtTop";class n extends b.NotebookAction{constructor(o,g,h,v){super(o),this.kind=g,this.direction=h,this.focusEditor=v}async runWithContext(o,g){let h=null;g.ui&&g.notebookEditor.focus();const v=o.get(p.ILanguageService);if(g.cell){const m=g.notebookEditor.getCellIndex(g.cell);h=(0,I.insertCell)(v,g.notebookEditor,m,this.kind,this.direction,void 0,!0)}else{const m=g.notebookEditor.getFocus(),w=Math.max(m.end-1,0);h=(0,I.insertCell)(v,g.notebookEditor,w,this.kind,this.direction,void 0,!0)}h&&await g.notebookEditor.focusNotebookCell(h,this.focusEditor?"editor":"container")}}(0,A.registerAction2)(class extends n{constructor(){super({id:r,title:(0,R.localize)(0,null),keybinding:{primary:3075,when:k.ContextKeyExpr.and(S.NOTEBOOK_CELL_LIST_FOCUSED,E.InputFocusedContext.toNegated()),weight:200},menu:{id:A.MenuId.NotebookCellInsert,order:0}},C.CellKind.Code,"above",!0)}}),(0,A.registerAction2)(class extends n{constructor(){super({id:i,title:(0,R.localize)(1,null)},C.CellKind.Code,"above",!1)}}),(0,A.registerAction2)(class extends n{constructor(){super({id:u,title:(0,R.localize)(2,null),keybinding:{primary:2051,when:k.ContextKeyExpr.and(S.NOTEBOOK_CELL_LIST_FOCUSED,E.InputFocusedContext.toNegated()),weight:200},menu:{id:A.MenuId.NotebookCellInsert,order:1}},C.CellKind.Code,"below",!0)}}),(0,A.registerAction2)(class extends n{constructor(){super({id:f,title:(0,R.localize)(3,null)},C.CellKind.Code,"below",!1)}}),(0,A.registerAction2)(class extends n{constructor(){super({id:l,title:(0,R.localize)(4,null),menu:{id:A.MenuId.NotebookCellInsert,order:2}},C.CellKind.Markup,"above",!0)}}),(0,A.registerAction2)(class extends n{constructor(){super({id:s,title:(0,R.localize)(5,null),menu:{id:A.MenuId.NotebookCellInsert,order:3}},C.CellKind.Markup,"below",!0)}}),(0,A.registerAction2)(class extends b.NotebookAction{constructor(){super({id:c,title:(0,R.localize)(6,null),f1:!1})}async run(o,g){g=g??this.getEditorContextFromArgsOrActive(o),g&&this.runWithContext(o,g)}async runWithContext(o,g){const h=o.get(p.ILanguageService),v=(0,I.insertCell)(h,g.notebookEditor,0,C.CellKind.Code,"above",void 0,!0);v&&await g.notebookEditor.focusNotebookCell(v,"editor")}}),(0,A.registerAction2)(class extends b.NotebookAction{constructor(){super({id:d,title:(0,R.localize)(7,null),f1:!1})}async run(o,g){g=g??this.getEditorContextFromArgsOrActive(o),g&&this.runWithContext(o,g)}async runWithContext(o,g){const h=o.get(p.ILanguageService),v=(0,I.insertCell)(h,g.notebookEditor,0,C.CellKind.Markup,"above",void 0,!0);v&&await g.notebookEditor.focusNotebookCell(v,"editor")}}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellBetween,{command:{id:u,title:"$(add) "+(0,R.localize)(8,null),tooltip:(0,R.localize)(9,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellBetween,{command:{id:u,title:(0,R.localize)(10,null),icon:t.Codicon.add,tooltip:(0,R.localize)(11,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookToolbar,{command:{id:u,icon:t.Codicon.add,title:(0,R.localize)(12,null),tooltip:(0,R.localize)(13,null)},order:-5,group:"navigation/add",when:k.ContextKeyExpr.and(S.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:c,title:"$(add) "+(0,R.localize)(14,null),tooltip:(0,R.localize)(15,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellListTop,{command:{id:c,title:(0,R.localize)(16,null),icon:t.Codicon.add,tooltip:(0,R.localize)(17,null)},order:0,group:"inline",when:k.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.equals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookCellBetween,{command:{id:s,title:"$(add) "+(0,R.localize)(18,null),tooltip:(0,R.localize)(19,null)},order:1,group:"inline",when:k.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))}),A.MenuRegistry.appendMenuItem(A.MenuId.NotebookToolbar,{command:{id:s,icon:t.Codicon.add,title:(0,R.localize)(20,null),tooltip:(0,R.localize)(21,null)},order:-5,group:"navigation/add",when:k.ContextKeyExpr.and(S.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:d,title:"$(add) "+(0,R.localize)(22,null),tooltip:(0,R.localize)(23,null)},order:1,group:"inline",when:k.ContextKeyExpr.and(S.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),k.ContextKeyExpr.notEquals("config.notebook.experimental.insertToolbarAlignment","left"))})}),define(ae[667],le([1,0,10,36,117,6,2,18,72,114,1773,7,19,5,23,27,12,188,43,178,267,872,64,258,2366,663,58,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditor=void 0;const D="NotebookEditorViewState";let y=class Ds extends l.EditorPane{get onDidFocus(){return this._onDidFocusWidget.event}get onDidBlur(){return this._onDidBlurWidget.event}constructor(L,M,O,N,P,B,V,z,x,H,W){super(Ds.ID,L,M,N),this._instantiationService=O,this._editorService=P,this._editorGroupService=B,this._editorDropService=V,this._notebookWidgetService=z,this._contextKeyService=x,this._fileService=H,this._groupListener=this._register(new k.DisposableStore),this._widgetDisposableStore=this._register(new k.DisposableStore),this._widget={value:void 0},this._inputListener=this._register(new k.MutableDisposable),this._onDidFocusWidget=this._register(new A.Emitter),this._onDidBlurWidget=this._register(new A.Emitter),this._onDidChangeModel=this._register(new A.Emitter),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeSelection=this._register(new A.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._editorMemento=this.getEditorMemento(B,W,D),this._register(this._fileService.onDidChangeFileSystemProviderCapabilities(U=>this._onDidChangeFileSystemProvider(U.scheme))),this._register(this._fileService.onDidChangeFileSystemProviderRegistrations(U=>this._onDidChangeFileSystemProvider(U.scheme)))}_onDidChangeFileSystemProvider(L){this.input instanceof g.NotebookEditorInput&&this.input.resource?.scheme===L&&this._updateReadonly(this.input)}_onDidChangeInputCapabilities(L){this.input===L&&this._updateReadonly(L)}_updateReadonly(L){this._widget.value?.setOptions({isReadOnly:L.hasCapability(2)})}get textModel(){return this._widget.value?.textModel}get minimumWidth(){return 220}get maximumWidth(){return Number.POSITIVE_INFINITY}set minimumWidth(L){}set maximumWidth(L){}get scopedContextKeyService(){return this._widget.value?.scopedContextKeyService}createEditor(L){this._rootElement=t.append(L,t.$(".notebook-editor")),this._rootElement.id=`notebook-editor-element-${(0,I.generateUuid)()}`}getActionViewItem(L){if(L.id===d.SELECT_KERNEL_ID)return this._instantiationService.createInstance(a.NotebooKernelActionViewItem,L,this)}getControl(){return this._widget.value}setEditorVisible(L,M){super.setEditorVisible(L,M),M&&(this._groupListener.clear(),this._groupListener.add(M.onWillCloseEditor(O=>this._saveEditorViewState(O.editor))),this._groupListener.add(M.onDidModelChange(()=>{this._editorGroupService.activeGroup!==M&&this._widget?.value?.updateEditorFocus()}))),L||(this._saveEditorViewState(this.input),this.input&&this._widget.value&&this._widget.value.onWillHide())}focus(){super.focus(),this._widget.value?.focus()}hasFocus(){const L=document.activeElement,M=this._widget.value;return!!M&&t.isAncestor(L,M.getDomNode()||t.isAncestor(L,M.getOverflowContainerDomNode()))}async setInput(L,M,O,N,P){try{const B=new h.NotebookPerfMarks;B.mark("startTime");const V=this.group;this._inputListener.value=L.onDidChangeCapabilities(()=>this._onDidChangeInputCapabilities(L)),this._widgetDisposableStore.clear(),this._widget.value?.onWillHide(),this._widget=this._instantiationService.invokeFunction(this._notebookWidgetService.retrieveWidget,V,L,void 0,this._dimension),this._rootElement&&this._widget.value.getDomNode()&&(this._rootElement.setAttribute("aria-flowto",this._widget.value.getDomNode().id||""),t.setParentFlowTo(this._widget.value.getDomNode(),this._rootElement)),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(L,M,O,N);const z=await L.resolve(B);if(B.mark("inputLoaded"),N.isCancellationRequested)return;if(!this._widget.value)return P?void 0:this.setInput(L,M,O,N,!0);if(z===null)throw new Error((0,S.localize)(0,null,L.viewType));this._widgetDisposableStore.add(z.notebook.onDidChangeContent(()=>this._onDidChangeSelection.fire({reason:3})));const x=M?.viewState??this._loadNotebookEditorViewState(L);this._widget.value?.setParentContextKeyService(this._contextKeyService),await this._widget.value.setModel(z.notebook,x,B);const H=L.hasCapability(2);await this._widget.value.setOptions({...M,isReadOnly:H}),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:U=>this.group?.id===U.id})),B.mark("editorLoaded");const W=B.value;if(W){const U=W.startTime,$=W.extensionActivated,q=W.inputLoaded,X=W.customMarkdownLoaded,G=W.editorLoaded;U!==void 0&&$!==void 0&&q!==void 0&&X!==void 0&&G!==void 0?this.telemetryService.publicLog2("notebook/editorOpenPerf",{scheme:z.notebook.uri.scheme,ext:(0,E.extname)(z.notebook.uri),viewType:z.notebook.viewType,extensionActivated:$-U,inputLoaded:q-U,webviewCommLoaded:q-U,customMarkdownLoaded:X-U,editorLoaded:G-U}):console.warn(`notebook file open perf marks are broken: startTime ${U}, extensionActiviated ${$}, inputLoaded ${q}, customMarkdownLoaded ${X}, editorLoaded ${G}`)}}catch(B){throw console.warn(B),(0,R.createErrorWithActions)(B instanceof Error?B:new Error(B?B.message:""),[(0,p.toAction)({id:"workbench.notebook.action.openInTextEditor",label:(0,S.localize)(1,null),run:async()=>{const z=this._editorService.activeEditorPane;if(!z)return;const x=s.EditorResourceAccessor.getCanonicalUri(z.input);if(!!x&&x.toString()===L.resource?.toString())return this._editorService.openEditor({resource:x,options:{override:s.DEFAULT_EDITOR_ASSOCIATION.id,pinned:!0}})}})])}}clearInput(){this._inputListener.clear(),this._widget.value&&(this._saveEditorViewState(this.input),this._widget.value.onWillHide()),super.clearInput()}setOptions(L){this._widget.value?.setOptions(L),super.setOptions(L)}saveState(){this._saveEditorViewState(this.input),super.saveState()}getViewState(){const L=this.input;if(L instanceof g.NotebookEditorInput)return this._saveEditorViewState(L),this._loadNotebookEditorViewState(L)}getSelection(){if(this._widget.value){const L=this._widget.value.getActiveCell()?.uri;if(L)return new T(L)}}_saveEditorViewState(L){if(this.group&&this._widget.value&&L instanceof g.NotebookEditorInput){if(this._widget.value.isDisposed)return;const M=this._widget.value.getEditorViewState();this._editorMemento.saveEditorState(this.group,L.resource,M)}}_loadNotebookEditorViewState(L){let M;if(this.group&&(M=this._editorMemento.loadEditorState(this.group,L.resource)),M)return M;for(const O of this._editorGroupService.getGroups(1))if(O.activeEditorPane!==this&&O.activeEditorPane instanceof Ds&&O.activeEditor?.matches(L))return O.activeEditorPane._widget.value?.getEditorViewState()}layout(L){this._rootElement.classList.toggle("mid-width",L.width<1e3&&L.width>=600),this._rootElement.classList.toggle("narrow-width",L.width<600),this._dimension=L,!(!this._widget.value||!(this._input instanceof g.NotebookEditorInput))&&(this._input.resource.toString()!==this.textModel?.uri.toString()&&this._widget.value?.hasModel()||this._widget.value.layout(this._dimension,this._rootElement))}};y.ID=o.NOTEBOOK_EDITOR_ID,y=we([F(0,f.ITelemetryService),F(1,c.IThemeService),F(2,u.IInstantiationService),F(3,i.IStorageService),F(4,w.IEditorService),F(5,m.IEditorGroupsService),F(6,v.IEditorDropService),F(7,n.INotebookEditorService),F(8,C.IContextKeyService),F(9,r.IFileService),F(10,b.ITextResourceConfigurationService)],y),e.NotebookEditor=y;class T{constructor(L){this.cellUri=L}compare(L){return L instanceof T&&(0,E.isEqual)(this.cellUri,L.cellUri)?1:3}restore(L){const M={cellOptions:{resource:this.cellUri}};return Object.assign(M,L),M}log(){return this.cellUri.fragment}}}),define(ae[2463],le([1,0,1777,31,25,118,178,64,162,228]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookExecutionService=void 0;let S=class{constructor(r,u,i,f,c){this._commandService=r,this._notebookKernelService=u,this._workspaceTrustRequestService=i,this._logService=f,this._notebookExecutionStateService=c}async executeNotebookCells(r,u,i){const f=Array.from(u);this._logService.debug(`NotebookExecutionService#executeNotebookCells ${JSON.stringify(f.map(a=>a.handle))}`);const c=t.localize(0,null);if(!await this._workspaceTrustRequestService.requestWorkspaceTrust({message:c}))return;const s=[];for(const a of f){const o=this._notebookExecutionStateService.getCellExecution(a.uri);a.cellKind!==E.CellKind.Code||!!o||s.push([a,this._notebookExecutionStateService.createCellExecution(r.uri,a.handle)])}let d=this._notebookKernelService.getSelectedOrSuggestedKernel(r);if(d||(d=await this.resolveSourceActions(r,i)),d||(d=await this.resolveKernelFromKernelPicker(r)),!d){s.forEach(a=>a[1].complete({}));return}const n=[];for(const[a,o]of s)d.supportedLanguages.includes(a.language)?n.push(o):o.complete({});if(n.length>0){this._notebookKernelService.selectKernelForNotebook(d,r),await d.executeNotebookCellsRequest(r.uri,n.map(o=>o.cellHandle));const a=n.filter(o=>o.state===E.NotebookCellExecutionState.Unconfirmed);a.length&&(this._logService.debug(`NotebookExecutionService#executeNotebookCells completing unconfirmed executions ${JSON.stringify(a.map(o=>o.cellHandle))}`),a.forEach(o=>o.complete({})))}}async resolveKernelFromKernelPicker(r,u=1){if(u>3)return;await this._commandService.executeCommand(k.SELECT_KERNEL_ID);const i=this._notebookKernelService.getRunningSourceActions(r);if(i.length){await Promise.all(i.map(c=>c.runAction()));const f=this._notebookKernelService.getSelectedOrSuggestedKernel(r);return f||(u+=1,this.resolveKernelFromKernelPicker(r,u))}else return this._notebookKernelService.getSelectedOrSuggestedKernel(r)}async resolveSourceActions(r,u){let i;if(this._notebookKernelService.getMatchingKernel(r).all.length===0){const c=this._notebookKernelService.getSourceActions(r,u),l=c.filter(d=>d.isPrimary),s=c.length===1?c[0]:l.length===1?l[0]:void 0;s&&(await s.runAction(),i=this._notebookKernelService.getSelectedOrSuggestedKernel(r))}return i}async cancelNotebookCellHandles(r,u){const i=Array.from(u);this._logService.debug(`NotebookExecutionService#cancelNotebookCellHandles ${JSON.stringify(i)}`);const f=this._notebookKernelService.getSelectedOrSuggestedKernel(r);f&&await f.cancelNotebookCellExecution(r.uri,i)}async cancelNotebookCells(r,u){this.cancelNotebookCellHandles(r,Array.from(u,i=>i.handle))}dispose(){this._activeProxyKernelExecutionToken?.dispose(!0)}};S=we([F(0,p.ICommandService),F(1,b.INotebookKernelService),F(2,A.IWorkspaceTrustRequestService),F(3,R.ILogService),F(4,I.INotebookExecutionStateService)],S),e.NotebookExecutionService=S}),define(ae[668],le([1,0,6,1779,15,8,55,7,17,71,178,152,175,64]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditorOptions=void 0;class i extends r.CellPart{constructor(c,l,s){super(),this.base=c,this.notebookOptions=l,this.configurationService=s,this._lineNumbers="inherit",this._onDidChange=this._register(new t.Emitter),this.onDidChange=this._onDidChange.event,this._register(c.onDidChange(()=>{this._recomputeOptions()})),this._value=this._computeEditorOptions()}updateState(c,l){l.cellLineNumberChanged&&this.setLineNumbers(c.lineNumbers)}_recomputeOptions(){this._value=this._computeEditorOptions(),this._onDidChange.fire()}_computeEditorOptions(){const l=this.configurationService.getValue("notebook.lineNumbers")==="on"?"on":"off",s=this.base.value;return s.lineNumbers!==l?{...s,lineNumbers:l}:Object.assign({},s)}getUpdatedValue(c,l){const s=this.getValue(c,l);return delete s.hover,s}getValue(c,l){return{...this._value,padding:this.notebookOptions.computeEditorPadding(c,l)}}getDefaultValue(){return{...this._value,padding:{top:12,bottom:12}}}setLineNumbers(c){if(this._lineNumbers=c,this._lineNumbers==="inherit"){const s=this.configurationService.getValue("notebook.lineNumbers")==="on"?"on":"off";this._value.lineNumbers=s}else this._value.lineNumbers=c;this._onDidChange.fire()}}e.CellEditorOptions=i,I.Registry.as(k.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.lineNumbers":{type:"string",enum:["off","on"],default:"off",markdownDescription:(0,p.localize)(0,null)}}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.toggleLineNumbers",title:{value:(0,p.localize)(1,null),original:"Toggle Notebook Line Numbers"},precondition:C.NOTEBOOK_EDITOR_FOCUSED,menu:[{id:R.MenuId.NotebookToolbar,group:"notebookLayout",order:2,when:E.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)}],category:S.NOTEBOOK_ACTIONS_CATEGORY,f1:!0,toggled:{condition:E.ContextKeyExpr.notEquals("config.notebook.lineNumbers","off"),title:(0,p.localize)(2,null)}})}async run(c){const l=c.get(A.IConfigurationService);l.getValue("notebook.lineNumbers")==="on"?l.updateValue("notebook.lineNumbers","off"):l.updateValue("notebook.lineNumbers","on")}}),(0,R.registerAction2)(class extends S.NotebookMultiCellAction{constructor(){super({id:"notebook.cell.toggleLineNumbers",title:(0,p.localize)(3,null),precondition:b.ActiveEditorContext.isEqualTo(u.NOTEBOOK_EDITOR_ID),menu:[{id:R.MenuId.NotebookCellTitle,group:"View",order:1}],toggled:E.ContextKeyExpr.or(C.NOTEBOOK_CELL_LINE_NUMBERS.isEqualTo("on"),E.ContextKeyExpr.and(C.NOTEBOOK_CELL_LINE_NUMBERS.isEqualTo("inherit"),E.ContextKeyExpr.equals("config.notebook.lineNumbers","on")))})}async runWithContext(c,l){if(l.ui)this.updateCell(c.get(A.IConfigurationService),l.cell);else{const s=c.get(A.IConfigurationService);l.selectedCells.forEach(d=>{this.updateCell(s,d)})}}updateCell(c,l){const s=c.getValue("notebook.lineNumbers")==="on",d=l.lineNumbers;d==="on"||d==="inherit"&&s?l.lineNumbers="off":l.lineNumbers="on"}})}),define(ae[2464],le([1,0,10,29,1785,914,101,175]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldedCellHint=void 0;class I extends E.CellPart{constructor(S,C){super(),this._notebookEditor=S,this._container=C}didRenderCell(S){this.update(S)}update(S){if(!!this._notebookEditor.hasModel())if(S.isInputCollapsed||S.getEditState()===k.CellEditState.Editing)t.hide(this._container);else if(S.foldingState===2){const C=this._notebookEditor._getViewModel().getCellIndex(S),r=this._notebookEditor._getViewModel().getFoldedLength(C);t.reset(this._container,this.getHiddenCellsLabel(r),this.getHiddenCellHintButton(S)),t.show(this._container);const u=S.layoutInfo.previewHeight;this._container.style.top=`${u}px`}else t.hide(this._container)}getHiddenCellsLabel(S){const C=S===1?(0,R.localize)(0,null):(0,R.localize)(1,null,S);return t.$("span.notebook-folded-hint-label",void 0,C)}getHiddenCellHintButton(S){const C=t.$("span.cell-expand-part-button");return C.classList.add(...p.CSSIcon.asClassNameArray(p.Codicon.more)),this._register(t.addDisposableListener(C,t.EventType.CLICK,()=>{const r=this._notebookEditor.getContribution(A.FoldingController.id),u=this._notebookEditor.getCellIndex(S);typeof u=="number"&&r.setFoldingStateDown(u,1,1)})),C}updateInternalLayoutNow(S){this.update(S)}}e.FoldedCellHint=I}),define(ae[2465],le([1,0,10,143,11,32,29,2,173,59,42,329,1786,111,8,7,5,151,38,101,215,668,385]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupCell=void 0;let g=class extends E.Disposable{constructor(v,m,w,D,y,T,_,L,M,O,N){super(),this.notebookEditor=v,this.viewCell=m,this.templateData=w,this.renderedEditors=D,this.accessibilityService=y,this.contextKeyService=T,this.notebookCellStatusBarService=_,this.instantiationService=L,this.languageService=M,this.configurationService=O,this.keybindingService=N,this.editor=null,this.localDisposables=this._register(new E.DisposableStore),this.focusSwitchDisposable=this._register(new E.MutableDisposable),this.editorDisposables=this._register(new E.DisposableStore),this.constructDOM(),this.editorPart=w.editorPart,this.cellEditorOptions=this._register(new a.CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(m.language),this.notebookEditor.notebookOptions,this.configurationService)),this.cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers),this.editorOptions=this.cellEditorOptions.getValue(this.viewCell.internalMetadata,this.viewCell.uri),this._register((0,E.toDisposable)(()=>D.delete(this.viewCell))),this.registerListeners(),this.templateData.cellParts.renderCell(this.viewCell),this._register((0,E.toDisposable)(()=>{this.templateData.cellParts.unrenderCell(this.viewCell)})),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>{this.viewUpdate()})),this.updateForHover(),this.updateForFocusModeChange(),this.foldingState=m.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.updateInternalLayoutNow(this.viewCell)}constructDOM(){const v=`aria-markup-cell-${this.viewCell.id}`;this.markdownAccessibilityContainer=this.templateData.cellContainer,this.markdownAccessibilityContainer.id=v,this.markdownAccessibilityContainer.style.height="1px",this.markdownAccessibilityContainer.style.overflow="hidden",this.markdownAccessibilityContainer.style.position="absolute",this.markdownAccessibilityContainer.style.top="100000px",this.markdownAccessibilityContainer.style.left="10000px",this.markdownAccessibilityContainer.ariaHidden="false",this.templateData.rootContainer.setAttribute("aria-describedby",v),this.templateData.container.classList.toggle("webview-backed-markdown-cell",!0)}registerListeners(){this._register(this.viewCell.onDidChangeState(v=>{this.templateData.cellParts.updateState(this.viewCell,v)})),this._register(this.viewCell.model.onDidChangeMetadata(()=>{this.viewUpdate()})),this._register(this.viewCell.onDidChangeState(v=>{if((v.editStateChanged||v.contentChanged)&&this.viewUpdate(),v.focusModeChanged&&this.updateForFocusModeChange(),v.foldingStateChanged){const m=this.viewCell.foldingState;m!==this.foldingState&&(this.foldingState=m,this.layoutFoldingIndicator())}v.cellIsHoveredChanged&&this.updateForHover(),v.inputCollapsedChanged&&(this.updateCollapsedState(),this.viewUpdate()),v.cellLineNumberChanged&&this.cellEditorOptions.setLineNumbers(this.viewCell.lineNumbers)})),this._register(this.notebookEditor.notebookOptions.onDidChangeOptions(v=>{v.showFoldingControls&&this.updateFoldingIconShowClass()})),this._register(this.viewCell.onDidChangeLayout(v=>{const m=this.editor?.getLayoutInfo();v.outerWidth&&this.viewCell.getEditState()===d.CellEditState.Editing&&m&&m.width!==this.viewCell.layoutInfo.editorWidth?this.onCellEditorWidthChange():(v.totalHeight||v.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===d.CellFocusMode.Editor&&this.focusEditorIfNeeded(),this.templateData.container.classList.toggle("cell-editor-focus",this.viewCell.focusMode===d.CellFocusMode.Editor)}applyDecorations(){this._register(this.viewCell.onCellDecorationsChanged(v=>{v.added.forEach(m=>{m.className&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[m.className],[])}),v.removed.forEach(m=>{m.className&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[],[m.className])})})),this.viewCell.getCellDecorations().forEach(v=>{v.className&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[v.className],[])})}dispose(){this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===d.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)&&this.notebookEditor.focusContainer(),this.viewCell.detachTextEditor(),super.dispose()}updateFoldingIconShowClass(){const v=this.notebookEditor.notebookOptions.getLayoutConfiguration().showFoldingControls;this.templateData.foldingIndicator.classList.remove("mouseover","always"),this.templateData.foldingIndicator.classList.add(v)}viewUpdate(){this.viewCell.isInputCollapsed?this.viewUpdateCollapsed():this.viewCell.getEditState()===d.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 m=t.$("div");m.classList.add("cell-collapse-preview");const w=this.getRichText(this.viewCell.textBuffer,this.viewCell.language);t.safeInnerHtml(m,w),this.templateData.cellInputCollapsedContainer.appendChild(m);const D=t.append(m,t.$("span.expandInputIcon"));D.classList.add(...k.CSSIcon.asClassNameArray(k.Codicon.more));const y=this.keybindingService.lookupKeybinding(d.EXPAND_CELL_INPUT_COMMAND_ID);y&&(m.title=(0,r.localize)(0,null,y.getLabel()),D.title=(0,r.localize)(1,null,y.getLabel())),this.markdownAccessibilityContainer.ariaHidden="true",this.templateData.container.classList.toggle("input-collapsed",!0),this.viewCell.renderedMarkdownHeight=0,this.viewCell.layoutChange({})}getRichText(v,m){return(0,C.tokenizeToStringSync)(this.languageService,v.getLineContent(1),m)}viewUpdateEditing(){let v;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())v=this.editor.getContentHeight(),this.viewCell.attachTextEditor(this.editor),this.focusEditorIfNeeded(),this.bindEditorListeners(this.editor),this.editor.layout({width:this.viewCell.layoutInfo.editorWidth,height:v});else{this.editorDisposables.clear();const m=this.notebookEditor.notebookOptions.computeMarkdownCellEditorWidth(this.notebookEditor.getLayoutInfo().width),w=this.viewCell.lineCount,D=this.viewCell.layoutInfo.fontInfo?.lineHeight||17,y=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri);v=Math.max(w,1)*D+y.top+y.bottom,this.templateData.editorContainer.innerText="";const T=this.contextKeyService.createScoped(this.templateData.editorPart);b.EditorContextKeys.inCompositeEditor.bindTo(T).set(!0);const _=this.instantiationService.createChild(new l.ServiceCollection([f.IContextKeyService,T]));this.editorDisposables.add(T),this.editor=this.editorDisposables.add(_.createInstance(I.CodeEditorWidget,this.templateData.editorContainer,{...this.editorOptions,dimension:{width:m,height:v}},{contributions:this.notebookEditor.creationOptions.cellEditorContributions})),this.templateData.currentEditor=this.editor;const L=new A.CancellationTokenSource;this.editorDisposables.add({dispose(){L.dispose(!0)}}),(0,R.raceCancellation)(this.viewCell.resolveTextModel(),L.token).then(M=>{if(!M)return;this.editor.setModel(M);const O=this.editor.getContentHeight();O!==v&&(this.editor.layout({width:m,height:O}),v=O),this.viewCell.attachTextEditor(this.editor),this.viewCell.getEditState()===d.CellEditState.Editing&&this.focusEditorIfNeeded(),this.bindEditorListeners(this.editor),this.viewCell.editorHeight=v})}this.viewCell.editorHeight=v,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&&(this.accessibilityService.isScreenReaderOptimized()?t.safeInnerHtml(this.markdownAccessibilityContainer,this.viewCell.renderedHtml):t.clearNode(this.markdownAccessibilityContainer)),this.notebookEditor.createMarkupPreview(this.viewCell)}focusEditorIfNeeded(){if(this.viewCell.focusMode===d.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)){if(!this.editor)return;this.editor.focus();const v=this.editor.getSelection();if(!v)return;this.notebookEditor.revealRangeInViewAsync(this.viewCell,v)}}layoutEditor(v){this.editor?.layout(v)}onCellEditorWidthChange(){const v=this.editor.getContentHeight();this.layoutEditor({width:this.viewCell.layoutInfo.editorWidth,height:v})}relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight),this.layoutFoldingIndicator()}updateEditorOptions(v){this.editorOptions=v,this.editor?.updateOptions(this.editorOptions)}layoutFoldingIndicator(){switch(this.foldingState){case 0:this.templateData.foldingIndicator.innerText="";break;case 2:t.reset(this.templateData.foldingIndicator,(0,p.renderIcon)(n.collapsedIcon));break;case 1:t.reset(this.templateData.foldingIndicator,(0,p.renderIcon)(n.expandedIcon));break;default:break}}bindEditorListeners(v){this.localDisposables.clear(),this.focusSwitchDisposable.clear(),this.localDisposables.add(v.onDidContentSizeChange(w=>{const D=v.getLayoutInfo();w.contentHeightChanged&&(this.viewCell.editorHeight=w.contentHeight,v.layout({width:D.width,height:w.contentHeight}))})),this.localDisposables.add(v.onDidChangeCursorSelection(w=>{if(w.source==="restoreState")return;const D=v.getSelections();if(D?.length){const y=D[D.length-1];this.notebookEditor.revealRangeInViewAsync(this.viewCell,y)}}));const m=()=>this.viewCell.focusMode=v.hasWidgetFocus()?d.CellFocusMode.Editor:d.CellFocusMode.Container;this.localDisposables.add(v.onDidFocusEditorWidget(()=>{m()})),this.localDisposables.add(v.onDidBlurEditorWidget(()=>{document.activeElement?.contains(this.templateData.container)?this.focusSwitchDisposable.value=(0,R.disposableTimeout)(()=>m(),300):m()})),m()}};g=we([F(4,u.IAccessibilityService),F(5,f.IContextKeyService),F(6,o.INotebookCellStatusBarService),F(7,c.IInstantiationService),F(8,S.ILanguageService),F(9,i.IConfigurationService),F(10,s.IKeybindingService)],g),e.MarkupCell=g}),define(ae[2466],le([1,0,10,147,263,36,6,2,84,15,8,37,5,38,33,12,178,64,872,446,24,317]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorToolbar=void 0;var o;(function(T){T[T.Always=0]="Always",T[T.Never=1]="Never",T[T.Dynamic=2]="Dynamic"})(o||(o={}));const g=21,h=21,v=8;class m{constructor(_,L,M){this.notebookEditor=_,this.editorToolbar=L,this.instantiationService=M}actionProvider(_){if(_.id===c.SELECT_KERNEL_ID)return this.instantiationService.createInstance(s.NotebooKernelActionViewItem,_,this.notebookEditor);const L=this.editorToolbar.primaryActions.find(M=>M.action.id===_.id);return L&&L.renderLabel?_ instanceof b.MenuItemAction?this.instantiationService.createInstance(d.ActionViewWithLabel,_,void 0):void 0:_ instanceof b.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,_,void 0):void 0}_calculateFixedActions(_){const L=this.editorToolbar.primaryActions,O=L[L.length-1].action.id===R.ToggleMenuAction.ID;let N=0;const P=[];for(let B=0;B<L.length-(O?1:0);B++){const V=L[B],z=V.size;if(N+z<=_)N+=v+z,P.push(V);else break}return P.forEach(B=>B.visible=!0),L.slice(P.length).forEach(B=>B.visible=!1),{primaryActions:P.filter(B=>B.visible&&B.action.id!==R.ToggleMenuAction.ID).map(B=>B.action),secondaryActions:[...L.slice(P.length).filter(B=>!B.visible&&B.action.id!==R.ToggleMenuAction.ID).map(B=>B.action),...this.editorToolbar.secondaryActions]}}calculateActions(_){return this._calculateFixedActions(_)}}class w extends m{constructor(_,L,M){super(_,L,M)}actionProvider(_){return _.id===c.SELECT_KERNEL_ID?this.instantiationService.createInstance(s.NotebooKernelActionViewItem,_,this.notebookEditor):_ instanceof b.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,_,void 0):void 0}}class D{constructor(_,L,M){this.notebookEditor=_,this.editorToolbar=L,this.instantiationService=M}actionProvider(_){if(_.id===c.SELECT_KERNEL_ID)return this.instantiationService.createInstance(s.NotebooKernelActionViewItem,_,this.notebookEditor);const L=this.editorToolbar.primaryActions.find(M=>M.action.id===_.id);return L&&L.renderLabel?_ instanceof b.MenuItemAction?this.instantiationService.createInstance(d.ActionViewWithLabel,_,void 0):void 0:_ instanceof b.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,_,void 0):void 0}calculateActions(_){const L=this.editorToolbar.primaryActions,M=this.editorToolbar.secondaryActions,N=L[L.length-1].action.id===R.ToggleMenuAction.ID,P=L.slice(0,L.length-(N?1:0));if(P.length===0)return{primaryActions:L.filter(W=>W.visible&&W.action.id!==R.ToggleMenuAction.ID).map(W=>W.action),secondaryActions:M};if(P.map(W=>W.size).reduce((W,U)=>W+U,0)+(P.length-1)*v<=_)return L.forEach(W=>{W.visible=!0,W.renderLabel=!0}),{primaryActions:L.filter(W=>W.visible&&W.action.id!==R.ToggleMenuAction.ID).map(W=>W.action),secondaryActions:M};if(P.length*g+(P.length-1)*v>_)return this._calcuateWithAlllabelsHidden(P,_);const V=[];let z=0,x=-1;for(let W=0;W<P.length;W++)if(z+=P[W].size+v,V.push(z),P[W].action instanceof A.Separator){const U=P.slice(W+1);z+(U.length===0?0:U.length*g+(U.length-1)*v)<=_&&(x=W)}else continue;if(x<0)return this._calcuateWithAlllabelsHidden(P,_);const H=P.slice(0,x+1);return H.forEach(W=>{W.visible=!0,W.renderLabel=!0}),L.slice(H.length).forEach(W=>{W.visible=!0,W.renderLabel=!1}),{primaryActions:L.filter(W=>W.visible&&W.action.id!==R.ToggleMenuAction.ID).map(W=>W.action),secondaryActions:M}}_calcuateWithAlllabelsHidden(_,L){const M=this.editorToolbar.primaryActions,O=this.editorToolbar.secondaryActions;M.forEach(B=>{B.renderLabel=!1});let N=0;const P=[];for(let B=0;B<_.length;B++){const V=_[B];if(V.action.id==="notebook.cell.insertMarkdownCellBelow"){P.push(V);continue}const z=g;if(N+z<=L)N+=v+z,P.push(V);else break}return P.forEach(B=>{B.action.id==="notebook.cell.insertMarkdownCellBelow"?B.visible=!1:B.visible=!0}),M.slice(P.length).forEach(B=>B.visible=!1),{primaryActions:P.filter(B=>B.visible&&B.action.id!==R.ToggleMenuAction.ID).map(B=>B.action),secondaryActions:[...M.slice(_.length).filter(B=>!B.visible&&B.action.id!==R.ToggleMenuAction.ID).map(B=>B.action),...O]}}}let y=class extends E.Disposable{get primaryActions(){return this._primaryActions}get secondaryActions(){return this._secondaryActions}get useGlobalToolbar(){return this._useGlobalToolbar}constructor(_,L,M,O,N,P,B,V,z,x,H){super(),this.notebookEditor=_,this.contextKeyService=L,this.notebookOptions=M,this.domNode=O,this.instantiationService=N,this.configurationService=P,this.contextMenuService=B,this.menuService=V,this.editorService=z,this.keybindingService=x,this.experimentService=H,this._useGlobalToolbar=!1,this._renderLabel=o.Always,this._onDidChangeState=this._register(new k.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._dimension=null,this._primaryActions=[],this._secondaryActions=[],this._buildBody(),this._register(k.Event.debounce(this.editorService.onDidActiveEditorChange,(W,U)=>W,200)(this._updatePerEditorChange,this)),this._registerNotebookActionsToolbar()}_buildBody(){this._notebookTopLeftToolbarContainer=document.createElement("div"),this._notebookTopLeftToolbarContainer.classList.add("notebook-toolbar-left"),this._leftToolbarScrollable=new p.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)}_updatePerEditorChange(){if(this.editorService.activeEditorPane?.getId()===l.NOTEBOOK_EDITOR_ID&&this.editorService.activeEditorPane.getControl()===this.notebookEditor){this._showNotebookActionsinEditorToolbar();return}}_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 _={ui:!0,notebookEditor:this.notebookEditor},L=N=>{if(N.id===c.SELECT_KERNEL_ID)return this.instantiationService.createInstance(s.NotebooKernelActionViewItem,N,this.notebookEditor);if(this._renderLabel!==o.Never){const P=this._primaryActions.find(B=>B.action.id===N.id);return P&&P.renderLabel?N instanceof b.MenuItemAction?this.instantiationService.createInstance(d.ActionViewWithLabel,N,void 0):void 0:N instanceof b.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,N,void 0):void 0}else return N instanceof b.MenuItemAction?this.instantiationService.createInstance(I.MenuEntryActionViewItem,N,void 0):void 0};this._notebookLeftToolbar=new R.ToolBar(this._notebookTopLeftToolbarContainer,this.contextMenuService,{getKeyBinding:N=>this.keybindingService.lookupKeybinding(N.id),actionViewItemProvider:N=>this._strategy.actionProvider(N),renderDropdownAsChildElement:!0}),this._register(this._notebookLeftToolbar),this._notebookLeftToolbar.context=_,this._notebookRightToolbar=new R.ToolBar(this._notebookTopRightToolbarContainer,this.contextMenuService,{getKeyBinding:N=>this.keybindingService.lookupKeybinding(N.id),actionViewItemProvider:L,renderDropdownAsChildElement:!0}),this._register(this._notebookRightToolbar),this._notebookRightToolbar.context=_,this._showNotebookActionsinEditorToolbar();let M=!1,O;this._register(this._notebookGlobalActionsMenu.onDidChange(()=>{if(M){O=()=>this._showNotebookActionsinEditorToolbar();return}this._showNotebookActionsinEditorToolbar()})),this._register(this._notebookLeftToolbar.onDidChangeDropdownVisibility(N=>{M=N,O&&!N&&(setTimeout(()=>{O?.()},0),O=void 0)})),this._register(this.notebookOptions.onDidChangeOptions(N=>{N.globalToolbar!==void 0&&(this._useGlobalToolbar=this.notebookOptions.getLayoutConfiguration().globalToolbar,this._showNotebookActionsinEditorToolbar())})),this._register(this.configurationService.onDidChangeConfiguration(N=>{if(N.affectsConfiguration(l.NotebookSetting.globalToolbarShowLabel)){this._renderLabel=this._convertConfiguration(this.configurationService.getValue(l.NotebookSetting.globalToolbarShowLabel)),this._updateStrategy();const P=this._notebookLeftToolbar.getElement();P.parentElement?.removeChild(P),this._notebookLeftToolbar.dispose(),this._notebookLeftToolbar=new R.ToolBar(this._notebookTopLeftToolbarContainer,this.contextMenuService,{getKeyBinding:B=>this.keybindingService.lookupKeybinding(B.id),actionViewItemProvider:L,renderDropdownAsChildElement:!0}),this._register(this._notebookLeftToolbar),this._notebookLeftToolbar.context=_,this._showNotebookActionsinEditorToolbar();return}})),this.experimentService&&this.experimentService.getTreatment("nbtoolbarineditor").then(N=>{N!==void 0&&this._useGlobalToolbar!==N&&(this._useGlobalToolbar=N,this._showNotebookActionsinEditorToolbar())})}_updateStrategy(){switch(this._renderLabel){case o.Always:this._strategy=new m(this.notebookEditor,this,this.instantiationService);break;case o.Never:this._strategy=new w(this.notebookEditor,this,this.instantiationService);break;case o.Dynamic:this._strategy=new D(this.notebookEditor,this,this.instantiationService);break}}_convertConfiguration(_){switch(_){case!0:return o.Always;case!1:return o.Never;case"always":return o.Always;case"never":return o.Never;case"dynamic":return o.Dynamic}}_showNotebookActionsinEditorToolbar(){!this.notebookEditor.hasModel()||(this._useGlobalToolbar?this._setNotebookActions():this.domNode.style.display="none",this._onDidChangeState.fire())}_setNotebookActions(){const _=this._notebookGlobalActionsMenu.getActions({shouldForwardArgs:!0,renderShortTitle:!0});this.domNode.style.display="flex";const L=_.filter(B=>/^navigation/.test(B[0])),M=[];L.sort((B,V)=>B[0]==="navigation"?1:V[0]==="navigation"?-1:0).forEach((B,V)=>{M.push(...B[1]),V<L.length-1&&M.push(new A.Separator)});const O=_.find(B=>/^status/.test(B[0])),N=O?O[1]:[],P=_.filter(B=>!/^navigation/.test(B[0])&&!/^status/.test(B[0])).reduce((B,V)=>(B.push(...V[1]),B),[]);this._notebookLeftToolbar.setActions([],[]),this._primaryActions.forEach(B=>B.renderLabel=!0),this._notebookLeftToolbar.setActions(M,P),this._notebookRightToolbar.setActions(N,[]),this._secondaryActions=P,this._primaryActions=[],this._dimension&&this._dimension.width>=0&&this._dimension.height>=0&&this._cacheItemSizes(this._notebookLeftToolbar),this._computeSizes()}_cacheItemSizes(_){const L=[];for(let M=0;M<_.getItemsLength();M++){const O=_.getItemAction(M);O&&L.push({action:O,size:_.getItemWidth(M),visible:!0,renderLabel:!0})}this._primaryActions=L}_canBeVisible(_){let L=0;for(let M=0;M<this._primaryActions.length;M++)L+=this._primaryActions[M].size+8;return L<=_}_computeSizes(){const _=this._notebookLeftToolbar,L=this._notebookRightToolbar;if(_&&L&&this._dimension&&this._dimension.height>=0&&this._dimension.width>=0){if(this._primaryActions.length===0&&_.getItemsLength()!==this._primaryActions.length&&this._cacheItemSizes(this._notebookLeftToolbar),this._primaryActions.length===0)return;const M=(L.getItemsLength()?L.getItemWidth(0):0)+v;if(this._canBeVisible(this._dimension.width-M-v)){this._primaryActions.forEach(P=>{P.visible=!0,P.renderLabel=!0}),_.setActions(this._primaryActions.filter(P=>P.action.id!==R.ToggleMenuAction.ID).map(P=>P.action),this._secondaryActions);return}const O=this._dimension.width-M-(h+v)-v,N=this._strategy.calculateActions(O);this._notebookLeftToolbar.setActions(N.primaryActions,N.secondaryActions)}}layout(_){this._dimension=_,this._useGlobalToolbar?this.domNode.style.display="flex":this.domNode.style.display="none",this._computeSizes()}dispose(){this._notebookLeftToolbar.context=void 0,this._notebookRightToolbar.context=void 0,this._notebookLeftToolbar.dispose(),this._notebookRightToolbar.dispose(),this._notebookLeftToolbar=null,this._notebookRightToolbar=null,super.dispose()}};y=we([F(4,r.IInstantiationService),F(5,S.IConfigurationService),F(6,C.IContextMenuService),F(7,b.IMenuService),F(8,n.IEditorService),F(9,u.IKeybindingService),F(10,a.IWorkbenchAssignmentService)],y),e.NotebookEditorToolbar=y,(0,f.registerThemingParticipant)((T,_)=>{const L=T.getColor(i.toolbarActiveBackground);L&&_.addRule(` .monaco-workbench .notebookOverlay .notebook-toolbar-container .monaco-action-bar:not(.vertical) .action-item.active { background-color: ${L}; } `)})}),define(ae[390],le([1,0,21,34,43,24,32,19,20,13,7,28,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"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 u;(function(n){const a=[];function o(h){let v=h;return v&&a.push(v),{dispose(){if(v){const m=a.indexOf(v);m>=0&&(a.splice(m,1),v=void 0)}}}}n.register=o;function g(){return a.slice(0)}n.all=g})(u=e.WorkspaceSymbolProviderRegistry||(e.WorkspaceSymbolProviderRegistry={}));class i{constructor(a,o){this.symbol=a,this.provider=o}}e.WorkspaceSymbolItem=i;async function f(n,a=k.CancellationToken.None){const o=[],g=u.all().map(async v=>{try{const m=await v.provideWorkspaceSymbols(n,a);if(!m)return;for(const w of m)o.push(new i(w,v))}catch(m){(0,t.onUnexpectedExternalError)(m)}});if(await Promise.all(g),a.isCancellationRequested)return[];function h(v,m){let w=(0,C.compare)(v.symbol.name,m.symbol.name);return w===0&&(w=v.symbol.kind-m.symbol.kind),w===0&&(w=(0,C.compare)(v.symbol.location.uri.toString(),m.symbol.location.uri.toString())),w===0&&(v.symbol.location.range&&m.symbol.location.range?I.Range.areIntersecting(v.symbol.location.range,m.symbol.location.range)||(w=I.Range.compareRangesUsingStarts(v.symbol.location.range,m.symbol.location.range)):v.provider.resolveWorkspaceSymbol&&!m.provider.resolveWorkspaceSymbol?w=-1:!v.provider.resolveWorkspaceSymbol&&m.provider.resolveWorkspaceSymbol&&(w=1)),w===0&&(w=(0,C.compare)(v.symbol.containerName??"",m.symbol.containerName??"")),w}return(0,r.groupBy)(o,h).map(v=>v[0]).flat()}e.getWorkspaceSymbols=f;function c(n){const a=n.get(A.IEditorService),o=n.get(p.IWorkspaceContextService),g=n.get(E.IFileService);return a.editors.map(v=>R.EditorResourceAccessor.getOriginalUri(v,{supportSideBySide:R.SideBySideEditor.PRIMARY})).filter(v=>!!v&&!o.isInsideWorkspace(v)&&g.hasProvider(v))}e.getOutOfWorkspaceEditorResources=c;const l=/\s?[#:\(](?:line )?(\d*)(?:[#:,](\d*))?\)?\s*$/;function s(n,a){if(!n||a?.some(h=>n.indexOf(h)!==-1))return;let o;const g=l.exec(n);if(g){const h=parseInt(g[1]??"",10);if((0,b.isNumber)(h)){o={startLineNumber:h,startColumn:1,endLineNumber:h,endColumn:1};const v=parseInt(g[2]??"",10);(0,b.isNumber)(v)&&(o={startLineNumber:o.startLineNumber,startColumn:v,endLineNumber:o.endLineNumber,endColumn:v})}else g[1]===""&&(o={startLineNumber:1,startColumn:1,endLineNumber:1,endColumn:1})}if(g&&o)return{filter:n.substr(0,g.index),range:o}}e.extractRangeFromFilter=s;var d;(function(n){n[n.Idle=0]="Idle",n[n.Searching=1]="Searching",n[n.SlowSearch=2]="SlowSearch"})(d=e.SearchUIState||(e.SearchUIState={})),e.SearchStateKey=new S.RawContextKey("searchState",d.Idle)}),define(ae[915],le([1,0,1848,252,11,390,92,49,22,41,24,20,8,75,438,13,417,29]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SymbolsQuickAccessProvider=void 0;let s=class fr extends p.PickerQuickAccessProvider{get defaultFilterValue(){const n=this.codeEditorService.getFocusedCodeEditor();if(n)return(0,f.withNullAsUndefined)((0,i.getSelectionSearchString)(n))}constructor(n,a,o,g,h){super(fr.PREFIX,{canAcceptInBackground:!0,noResultsPick:{label:(0,t.localize)(0,null)}}),this.labelService=n,this.openerService=a,this.editorService=o,this.configurationService=g,this.codeEditorService=h,this.delayer=this._register(new R.ThrottledDelayer(fr.TYPING_SEARCH_DELAY))}get configuration(){const n=this.configurationService.getValue().workbench?.editor;return{openEditorPinned:!n?.enablePreviewFromQuickOpen||!n?.enablePreview,openSideBySideDirection:n?.openSideBySideDirection}}_getPicks(n,a,o){return this.getSymbolPicks(n,void 0,o)}async getSymbolPicks(n,a,o){return this.delayer.trigger(async()=>o.isCancellationRequested?[]:this.doGetSymbolPicks((0,c.prepareQuery)(n),a,o),a?.delay)}async doGetSymbolPicks(n,a,o){let g,h;n.values&&n.values.length>1?(g=(0,c.pieceToQuery)(n.values[0]),h=(0,c.pieceToQuery)(n.values.slice(1))):g=n;const v=await(0,A.getWorkspaceSymbols)(g.original,o);if(o.isCancellationRequested)return[];const m=[],w=this.configuration.openSideBySideDirection;for(const{symbol:D,provider:y}of v){if(a?.skipLocal&&!fr.TREAT_AS_GLOBAL_SYMBOL_TYPES.has(D.kind)&&!!D.containerName)continue;const T=D.name,_=`$(${k.SymbolKinds.toIcon(D.kind).id}) ${T}`,L=_.length-T.length;let M,O,N=!1;if(g.original.length>0&&(g!==n&&([M,O]=(0,c.scoreFuzzy2)(_,{...n,values:void 0},0,L),typeof M=="number"&&(N=!0)),typeof M!="number"&&([M,O]=(0,c.scoreFuzzy2)(_,g,0,L),typeof M!="number")))continue;const P=D.location.uri;let B;if(P){const H=this.labelService.getUriLabel(P,{relative:!0});D.containerName?B=`${D.containerName} \u2022 ${H}`:B=H}let V,z;if(!N&&h&&h.original.length>0){if(B&&([V,z]=(0,c.scoreFuzzy2)(B,h)),typeof V!="number")continue;typeof M=="number"&&(M+=V)}const x=D.tags?D.tags.indexOf(1)>=0:!1;m.push({symbol:D,resource:P,score:M,label:_,ariaLabel:T,highlights:x?void 0:{label:O,description:z},description:B,strikethrough:x,buttons:[{iconClass:w==="right"?l.Codicon.splitHorizontal.classNames:l.Codicon.splitVertical.classNames,tooltip:w==="right"?(0,t.localize)(1,null):(0,t.localize)(2,null)}],trigger:(H,W)=>(this.openSymbol(y,D,o,{keyMods:W,forceOpenSideBySide:!0}),p.TriggerAction.CLOSE_PICKER),accept:async(H,W)=>this.openSymbol(y,D,o,{keyMods:H,preserveFocus:W.inBackground,forcePinned:W.inBackground})})}return a?.skipSorting||m.sort((D,y)=>this.compareSymbols(D,y)),m}async openSymbol(n,a,o,g){let h=a;typeof n.resolveWorkspaceSymbol=="function"&&(h=await n.resolveWorkspaceSymbol(a,o)||a,o.isCancellationRequested)||(h.location.uri.scheme===I.Schemas.http||h.location.uri.scheme===I.Schemas.https?await this.openerService.open(h.location.uri,{fromUserGesture:!0,allowContributedOpeners:!0}):await this.editorService.openEditor({resource:h.location.uri,options:{preserveFocus:g?.preserveFocus,pinned:g.keyMods.ctrlCmd||g.forcePinned||this.configuration.openEditorPinned,selection:h.location.range?C.Range.collapseToStart(h.location.range):void 0}},g.keyMods.alt||this.configuration.openEditorPinned&&g.keyMods.ctrlCmd||g?.forceOpenSideBySide?S.SIDE_GROUP:S.ACTIVE_GROUP))}compareSymbols(n,a){if(typeof n.score=="number"&&typeof a.score=="number"){if(n.score>a.score)return-1;if(n.score<a.score)return 1}if(n.symbol&&a.symbol){const o=n.symbol.name.toLowerCase(),g=a.symbol.name.toLowerCase(),h=o.localeCompare(g);if(h!==0)return h}if(n.symbol&&a.symbol){const o=k.SymbolKinds.toIcon(n.symbol.kind).id,g=k.SymbolKinds.toIcon(a.symbol.kind).id;return o.localeCompare(g)}return 0}};s.PREFIX="#",s.TYPING_SEARCH_DELAY=200,s.TREAT_AS_GLOBAL_SYMBOL_TYPES=new Set([4,9,0,10,2,3,1]),s=we([F(0,E.ILabelService),F(1,b.IOpenerService),F(2,S.IEditorService),F(3,r.IConfigurationService),F(4,u.ICodeEditorService)],s),e.SymbolsQuickAccessProvider=s}),define(ae[669],le([1,0,16,28,105,42,54,168,1855,48,534,288,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApplyFileSnippetAction=void 0;class u extends S.SnippetsAction{constructor(){super({id:u.Id,title:{value:(0,I.localize)(0,null),original:"Populate File from Snippet"},f1:!0})}async run(f){const c=f.get(C.ISnippetsService),l=f.get(b.IQuickInputService),s=f.get(r.IEditorService),d=f.get(A.ILanguageService),n=f.get(k.IModelService),a=(0,R.getCodeEditor)(s.activeTextEditorControl);if(!a||!a.hasModel())return;const o=await c.getSnippets(void 0,{fileTemplateSnippets:!0,noRecencySort:!0,includeNoPrefixSnippets:!0});if(o.length===0)return;const g=await this._pick(l,d,o);!g||a.hasModel()&&(E.SnippetController2.get(a)?.apply([{range:a.getModel().getFullModelRange(),template:g.snippet.body}]),n.setMode(a.getModel(),d.createById(g.langId),u.Id))}async _pick(f,c,l){const s=[];for(const o of l)if((0,t.isFalsyOrEmpty)(o.scopes))s.push({langId:"",snippet:o});else for(const g of o.scopes)s.push({langId:g,snippet:o});const d=[],n=(0,t.groupBy)(s,(o,g)=>(0,p.compare)(o.langId,g.langId));for(const o of n){let g=!0;for(const h of o)g&&(d.push({type:"separator",label:c.getLanguageName(h.langId)??h.langId}),g=!1),d.push({snippet:h,label:h.snippet.prefix||h.snippet.name,detail:h.snippet.description})}return(await f.pick(d,{placeHolder:(0,I.localize)(1,null),matchOnDetail:!0}))?.snippet}}e.ApplyFileSnippetAction=u,u.Id="workbench.action.populateFileFromSnippet"}),define(ae[2467],le([1,0,2,85,61,236,1858,8,5,669,882,288]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetCodeActions=void 0;let r=class Ts{constructor(l){this._snippetService=l}async provideCodeActions(l,s){if(s.isEmpty())return;const d=p.Selection.isISelection(s)?s.getPosition():s.getStartPosition(),n=await(0,S.getSurroundableSnippets)(this._snippetService,l,d,!1);if(!n.length)return;const a=[];for(const o of n){if(a.length>=Ts._MAX_CODE_ACTIONS){a.push(Ts._overflowCommandCodeAction);break}a.push({title:(0,k.localize)(0,null,o.name),kind:A.CodeActionKind.SurroundWith.value,edit:i(l,s,o)})}return{actions:a,dispose(){}}}};r._MAX_CODE_ACTIONS=4,r._overflowCommandCodeAction={kind:A.CodeActionKind.SurroundWith.value,title:S.SurroundWithSnippetEditorAction.options.title.value,command:{id:S.SurroundWithSnippetEditorAction.options.id,title:S.SurroundWithSnippetEditorAction.options.title.value}},r=we([F(0,C.ISnippetsService)],r);let u=class ks{constructor(l){this._snippetService=l,this.providedCodeActionKinds=[A.CodeActionKind.SurroundWith.value]}async provideCodeActions(l){if(l.getValueLength()!==0)return;const s=await this._snippetService.getSnippets(l.getLanguageId(),{fileTemplateSnippets:!0,includeNoPrefixSnippets:!0}),d=[];for(const n of s){if(d.length>=ks._MAX_CODE_ACTIONS){d.push(ks._overflowCommandCodeAction);break}d.push({title:(0,k.localize)(2,null,n.name),kind:A.CodeActionKind.SurroundWith.value,edit:i(l,l.getFullModelRange(),n)})}return{actions:d,dispose(){}}}};u._MAX_CODE_ACTIONS=4,u._overflowCommandCodeAction={title:(0,k.localize)(1,null),kind:A.CodeActionKind.SurroundWith.value,command:{id:b.ApplyFileSnippetAction.Id,title:""}},u=we([F(0,C.ISnippetsService)],u);function i(c,l,s){return{edits:[{versionId:c.getVersionId(),resource:c.uri,textEdit:{range:l,text:s.body,insertAsSnippet:!0}}]}}let f=class{constructor(l,s,d){this._store=new t.DisposableStore;const n="editor.snippets.codeActions.enabled",a=new t.DisposableStore,o=()=>{a.clear(),d.getValue(n)&&(a.add(s.codeActionProvider.register("*",l.createInstance(r))),a.add(s.codeActionProvider.register("*",l.createInstance(u))))};o(),this._store.add(d.onDidChangeConfiguration(g=>g.affectsConfiguration(n)&&o())),this._store.add(a)}dispose(){this._store.dispose()}};f=we([F(0,I.IInstantiationService),F(1,R.ILanguageFeaturesService),F(2,E.IConfigurationService)],f),e.SnippetCodeActions=f}),define(ae[670],le([1,0,36,29,22,1898,15,7,185,71,127,189,345,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getTerminalActionBarArgs=e.setupTerminalMenus=e.TerminalMenuBarGroup=e.TerminalTabContextMenuGroup=void 0;var i;(function(d){d.Create="1_create",d.Edit="2_edit",d.Clear="3_clear",d.Kill="4_kill",d.Config="5_config"})(i||(i={}));var f;(function(d){d.Default="1_create_default",d.Profile="2_create_profile",d.Configure="3_configure"})(f=e.TerminalTabContextMenuGroup||(e.TerminalTabContextMenuGroup={}));var c;(function(d){d.Create="1_create",d.Run="2_run",d.Manage="3_manage",d.Configure="4_configure"})(c=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:E.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:r.terminalStrings.split.value}}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new},group:"1_create"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.kill",title:r.terminalStrings.kill.value},group:"4_kill"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.copySelection",title:(0,A.localize)(4,null)},group:"2_edit",order:1}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.copySelectionAsHtml",title:(0,A.localize)(5,null)},group:"2_edit",order:2}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.paste",title:(0,A.localize)(6,null)},group:"2_edit",order:3}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.clear",title:(0,A.localize)(7,null)},group:"3_clear"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.showTabs",title:(0,A.localize)(8,null)},when:E.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),group:"5_config"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidth",title:r.terminalStrings.toggleSizeToContentWidth},group:"5_config"}},{id:k.MenuId.TerminalInstanceContext,item:{command:{id:"workbench.action.terminal.selectAll",title:(0,A.localize)(9,null)},group:"2_edit",order:3}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalEditorInstanceContext,item:{group:"1_create",command:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value}}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new},group:"1_create"}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.killEditor",title:r.terminalStrings.kill.value},group:"4_kill"}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.copySelection",title:(0,A.localize)(10,null)},group:"2_edit",order:1}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.copySelectionAsHtml",title:(0,A.localize)(11,null)},group:"2_edit",order:2}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.paste",title:(0,A.localize)(12,null)},group:"2_edit",order:3}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.clear",title:(0,A.localize)(13,null)},group:"3_clear"}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.selectAll",title:(0,A.localize)(14,null)},group:"2_edit",order:3}},{id:k.MenuId.TerminalEditorInstanceContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidth",title:r.terminalStrings.toggleSizeToContentWidth},group:"5_config"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalTabEmptyAreaContext,item:{command:{id:"workbench.action.terminal.newWithProfile",title:(0,A.localize)(15,null)},group:"1_create"}},{id:k.MenuId.TerminalTabEmptyAreaContext,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new},group:"1_create"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.terminal.selectDefaultShell",title:{value:(0,A.localize)(16,null),original:"Select Default Profile"}},group:"3_configure"}},{id:k.MenuId.TerminalNewDropdownContext,item:{command:{id:"workbench.action.terminal.openSettings",title:(0,A.localize)(17,null)},group:"3_configure"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.switchTerminal",title:{value:(0,A.localize)(18,null),original:"Switch Terminal"}},group:"navigation",order:0,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("view",S.TERMINAL_VIEW_ID),E.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.focus",title:r.terminalStrings.focus},alt:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value,icon:p.Codicon.splitHorizontal},group:"navigation",order:0,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("view",S.TERMINAL_VIEW_ID),E.ContextKeyExpr.has("config.terminal.integrated.tabs.enabled"),E.ContextKeyExpr.or(E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleTerminal"),E.ContextKeyExpr.equals("terminalCount",1)),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleTerminalOrNarrow"),E.ContextKeyExpr.or(E.ContextKeyExpr.equals("terminalCount",1),E.ContextKeyExpr.has("isTerminalTabsNarrow"))),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","singleGroup"),E.ContextKeyExpr.equals("terminalGroupCount",1)),E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActiveTerminal","always")))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.split",title:r.terminalStrings.split,icon:p.Codicon.splitHorizontal},group:"navigation",order:2,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("view",S.TERMINAL_VIEW_ID),E.ContextKeyExpr.notEquals("config.terminal.integrated.tabs.hideCondition","never"),E.ContextKeyExpr.or(E.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminal"),E.ContextKeyExpr.equals("terminalCount",1)),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminalOrNarrow"),E.ContextKeyExpr.or(E.ContextKeyExpr.equals("terminalCount",1),E.ContextKeyExpr.has("isTerminalTabsNarrow"))),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleGroup"),E.ContextKeyExpr.equals("terminalGroupCount",1)),E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","always")))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.kill",title:r.terminalStrings.kill,icon:p.Codicon.trash},group:"navigation",order:3,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("view",S.TERMINAL_VIEW_ID),E.ContextKeyExpr.notEquals("config.terminal.integrated.tabs.hideCondition","never"),E.ContextKeyExpr.or(E.ContextKeyExpr.not("config.terminal.integrated.tabs.enabled"),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminal"),E.ContextKeyExpr.equals("terminalCount",1)),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleTerminalOrNarrow"),E.ContextKeyExpr.or(E.ContextKeyExpr.equals("terminalCount",1),E.ContextKeyExpr.has("isTerminalTabsNarrow"))),E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","singleGroup"),E.ContextKeyExpr.equals("terminalGroupCount",1)),E.ContextKeyExpr.equals("config.terminal.integrated.tabs.showActions","always")))}},{id:k.MenuId.ViewTitle,item:{command:{id:"workbench.action.terminal.new",title:r.terminalStrings.new,icon:p.Codicon.plus},alt:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value,icon:p.Codicon.splitHorizontal},group:"navigation",order:0,when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("view",S.TERMINAL_VIEW_ID),E.ContextKeyExpr.or(C.TerminalContextKeys.webExtensionContributedProfile,C.TerminalContextKeys.processSupported))}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value},group:"1_create",order:1}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.moveToEditor",title:r.terminalStrings.moveToEditor.value},group:"1_create",order:2}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.changeIconPanel",title:r.terminalStrings.changeIcon.value},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.changeColorPanel",title:r.terminalStrings.changeColor.value},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.renamePanel",title:r.terminalStrings.rename.value},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidthInstance",title:(0,A.localize)(19,null)},group:"2_edit"}},{id:k.MenuId.TerminalInlineTabContext,item:{command:{id:"workbench.action.terminal.kill",title:r.terminalStrings.kill.value},group:"4_kill"}}]),k.MenuRegistry.appendMenuItems([{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.splitInstance",title:r.terminalStrings.split.value},group:"1_create",order:1}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.moveToEditorInstance",title:r.terminalStrings.moveToEditor.value},group:"1_create",order:2}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.renameInstance",title:(0,A.localize)(20,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.changeIconInstance",title:(0,A.localize)(21,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.changeColorInstance",title:(0,A.localize)(22,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.sizeToContentWidthInstance",title:(0,A.localize)(23,null)},group:"2_edit"}},{id:k.MenuId.TerminalTabContext,item:{group:"5_config",command:{id:"workbench.action.terminal.joinInstance",title:(0,A.localize)(24,null)},when:C.TerminalContextKeys.tabsSingularSelection.toNegated()}},{id:k.MenuId.TerminalTabContext,item:{group:"5_config",command:{id:"workbench.action.terminal.unsplitInstance",title:r.terminalStrings.unsplit.value},when:E.ContextKeyExpr.and(C.TerminalContextKeys.tabsSingularSelection,C.TerminalContextKeys.splitTerminal)}},{id:k.MenuId.TerminalTabContext,item:{command:{id:"workbench.action.terminal.killInstance",title:r.terminalStrings.kill.value},group:"4_kill"}}]),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.moveToTerminalPanel",title:r.terminalStrings.moveToTerminalPanel},when:b.ResourceContextKey.Scheme.isEqualTo(R.Schemas.vscodeTerminal),group:"2_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.rename",title:r.terminalStrings.rename},when:b.ResourceContextKey.Scheme.isEqualTo(R.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.changeColor",title:r.terminalStrings.changeColor},when:b.ResourceContextKey.Scheme.isEqualTo(R.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.changeIcon",title:r.terminalStrings.changeIcon},when:b.ResourceContextKey.Scheme.isEqualTo(R.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitleContext,{command:{id:"workbench.action.terminal.sizeToContentWidth",title:r.terminalStrings.toggleSizeToContentWidth},when:b.ResourceContextKey.Scheme.isEqualTo(R.Schemas.vscodeTerminal),group:"3_files"}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:"workbench.action.createTerminalEditor",title:r.terminalStrings.new,icon:p.Codicon.plus},alt:{id:"workbench.action.terminal.split",title:r.terminalStrings.split.value,icon:p.Codicon.splitHorizontal},group:"navigation",order:0,when:b.ResourceContextKey.Scheme.isEqualTo(R.Schemas.vscodeTerminal)})}e.setupTerminalMenus=l;function s(d,n,a,o,g,h){let v=[],m=[];n=n.filter(_=>!_.isAutoDetected);const w=d===I.TerminalLocation.Editor||typeof d=="object"&&"viewColumn"in d&&d.viewColumn===u.ACTIVE_GROUP?{viewColumn:u.SIDE_GROUP}:{splitActiveTerminal:!0};for(const _ of n){const L=_.profileName===a,M={config:_,location:d},O={config:_,location:w},N=_.profileName.replace(/[\n\r\t]/g,"");v.push(new t.Action("workbench.action.terminal.newWithProfile",L?(0,A.localize)(25,null,N):N,void 0,!0,async()=>{const P=await g.createTerminal(M);g.setActiveInstance(P),await g.focusActiveInstance()})),m.push(new t.Action("workbench.action.terminal.split",L?(0,A.localize)(26,null,N):N,void 0,!0,async()=>{const P=await g.createTerminal(O);g.setActiveInstance(P),await g.focusActiveInstance()}))}for(const _ of o){const M=_.title===a?(0,A.localize)(27,null,_.title.replace(/[\n\r\t]/g,"")):_.title.replace(/[\n\r\t]/g,"");v.push(new t.Action("contributed",M,void 0,!0,()=>g.createTerminal({config:{extensionIdentifier:_.extensionIdentifier,id:_.id,title:M},location:d}))),m.push(new t.Action("contributed-split",M,void 0,!0,()=>g.createTerminal({config:{extensionIdentifier:_.extensionIdentifier,id:_.id,title:M},location:w})))}const D=v.find(_=>_.label.endsWith("(Default)"));D&&(v=v.filter(_=>_!==D).sort((_,L)=>_.label.localeCompare(L.label)),v.unshift(D)),v.length>0&&(v.push(new t.SubmenuAction("split.profile",(0,A.localize)(28,null),m)),v.push(new t.Separator));for(const[,_]of h.getActions())for(const L of _)"alt"in L&&v.push(L);const y=m.find(_=>_.label.endsWith("(Default)"));return y&&(m=m.filter(_=>_!==y).sort((_,L)=>_.label.localeCompare(L.label)),m.unshift(y)),{dropdownAction:new t.Action("refresh profiles","Launch Profile...","codicon-chevron-down",!0),dropdownMenuActions:v,className:`terminal-tab-actions-${g.resolveLocation(d)}`}}e.getTerminalActionBarArgs=s}),define(ae[916],le([1,0,1902,252,96,109,31,12,452,290,345,185,24,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalQuickAccessProvider=void 0;let i=[],f=class Va extends p.PickerQuickAccessProvider{constructor(l,s,d,n,a,o,g){super(Va.PREFIX,{canAcceptInBackground:!0}),this._editorService=l,this._terminalService=s,this._terminalEditorService=d,this._terminalGroupService=n,this._commandService=a,this._themeService=o,this._instantiationService=g}_getPicks(l){i=[],i.push({type:"separator",label:"panel"});const s=this._terminalGroupService.groups;for(let o=0;o<s.length;o++){const g=s[o];for(let h=0;h<g.terminalInstances.length;h++){const v=g.terminalInstances[h],m=this._createPick(v,h,l,{groupIndex:o,groupSize:g.terminalInstances.length});m&&i.push(m)}}i.length>0&&i.push({type:"separator",label:"editor"});const d=this._terminalEditorService.instances;for(let o=0;o<d.length;o++){const g=d[o];g.target=C.TerminalLocation.Editor;const h=this._createPick(g,o,l);h&&i.push(h)}i.length>0&&i.push({type:"separator"});const n=(0,t.localize)(0,null);i.push({label:`$(plus) ${n}`,ariaLabel:n,accept:()=>this._commandService.executeCommand("workbench.action.terminal.new")});const a=(0,t.localize)(1,null);return i.push({label:`$(plus) ${a}`,ariaLabel:a,accept:()=>this._commandService.executeCommand("workbench.action.terminal.newWithProfile")}),i}_createPick(l,s,d,n){const a=this._instantiationService.invokeFunction(b.getIconId,l),o=n?n.groupSize>1?`${n.groupIndex+1}.${s+1}`:`${n.groupIndex+1}`:`${s+1}`,g=`$(${a}) ${o}: ${l.title}`,h=[],v=(0,b.getColorClass)(l);v&&h.push(v);const m=(0,b.getUriClasses)(l,this._themeService.getColorTheme().type);m&&h.push(...m);const w=(0,R.matchesFuzzy)(d,g,!0);if(w)return{label:g,description:l.description,highlights:{label:w},buttons:[{iconClass:E.ThemeIcon.asClassName(I.renameTerminalIcon),tooltip:(0,t.localize)(2,null)},{iconClass:E.ThemeIcon.asClassName(I.killTerminalIcon),tooltip:S.terminalStrings.kill.value}],iconClasses:h,trigger:D=>{switch(D){case 0:return this._commandService.executeCommand("workbench.action.terminal.rename",l),p.TriggerAction.NO_ACTION;case 1:return this._terminalService.safeDisposeTerminal(l),p.TriggerAction.REMOVE_ITEM}return p.TriggerAction.NO_ACTION},accept:(D,y)=>{if(l.target===C.TerminalLocation.Editor){const T=this._editorService.findEditors(l.resource);this._terminalEditorService.openEditor(l,{viewColumn:T?.[0].groupId}),this._terminalEditorService.setActiveInstance(l)}else this._terminalGroupService.showPanel(!y.inBackground),this._terminalGroupService.setActiveInstance(l)}}}};f.PREFIX="term ",f=we([F(0,r.IEditorService),F(1,A.ITerminalEditorService),F(2,A.ITerminalEditorService),F(3,A.ITerminalGroupService),F(4,k.ICommandService),F(5,E.IThemeService),F(6,u.IInstantiationService)],f),e.TerminalQuickAccessProvider=f}),define(ae[2468],le([1,0,13,176,25,148,34,454,217,43,24,22,49,344]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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{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")}constructor(c,l,s,d,n,a,o,g,h,v){this._remoteAuthority=c,this._channel=l,this._configurationService=s,this._workspaceContextService=d,this._resolverService=n,this._environmentVariableService=a,this._remoteAuthorityResolverService=o,this._logService=g,this._editorService=h,this._labelService=v}restartPtyHost(){return this._channel.call("$restartPtyHost",[])}async createProcess(c,l,s,d,n,a,o,g){await this._configurationService.whenRemoteConfigurationLoaded();const h=Object.create(null),v=s?(0,t.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(s)):void 0;let m;try{m=(await this._resolverService.resolveAnyMap(v,{shellLaunchConfig:c,configuration:l})).resolvedVariables}catch(N){this._logService.error(N)}if(m)for(const[N,P]of m.entries())(/^config:/.test(N)||N==="selectedText"||N==="lineNumber")&&(h[N]=P);const w=[];for(const[N,P]of this._environmentVariableService.collections.entries())w.push([N,(0,E.serializeEnvironmentVariableCollection)(P.map)]);const D=await this._remoteAuthorityResolverService.resolveAuthority(this._remoteAuthority),y=D.options&&D.options.extensionHostEnv,T=this._workspaceContextService.getWorkspace(),_=T.folders,L=s?this._workspaceContextService.getWorkspaceFolder(s):null,M=b.EditorResourceAccessor.getOriginalUri(this._editorService.activeEditor,{supportSideBySide:b.SideBySideEditor.PRIMARY,filterByScheme:[C.Schemas.file,C.Schemas.vscodeUserData,C.Schemas.vscodeRemote]}),O={configuration:l,resolvedVariables:h,envVariableCollections:w,shellLaunchConfig:c,workspaceId:T.id,workspaceName:this._labelService.getWorkspaceLabel(T),workspaceFolders:_,activeWorkspaceFolder:L,activeFileResource:M,shouldPersistTerminal:n,options:d,cols:a,rows:o,unicodeVersion:g,resolverEnv:y};return await this._channel.call("$createProcess",O)}requestDetachInstance(c,l){return this._channel.call("$requestDetachInstance",[c,l])}acceptDetachInstanceReply(c,l){return this._channel.call("$acceptDetachInstanceReply",[c,l])}attachToProcess(c){return this._channel.call("$attachToProcess",[c])}detachFromProcess(c,l){return this._channel.call("$detachFromProcess",[c,l])}listProcesses(){return this._channel.call("$listProcesses")}reduceConnectionGraceTime(){return this._channel.call("$reduceConnectionGraceTime")}processBinary(c,l){return this._channel.call("$processBinary",[c,l])}start(c){return this._channel.call("$start",[c])}input(c,l){return this._channel.call("$input",[c,l])}acknowledgeDataEvent(c,l){return this._channel.call("$acknowledgeDataEvent",[c,l])}setUnicodeVersion(c,l){return this._channel.call("$setUnicodeVersion",[c,l])}shutdown(c,l){return this._channel.call("$shutdown",[c,l])}resize(c,l,s){return this._channel.call("$resize",[c,l,s])}getInitialCwd(c){return this._channel.call("$getInitialCwd",[c])}getCwd(c){return this._channel.call("$getCwd",[c])}orphanQuestionReply(c){return this._channel.call("$orphanQuestionReply",[c])}sendCommandResult(c,l,s){return this._channel.call("$sendCommandResult",[c,l,s])}freePortKillProcess(c){return this._channel.call("$freePortKillProcess",[c])}installAutoReply(c,l){return this._channel.call("$installAutoReply",[c,l])}uninstallAllAutoReplies(){return this._channel.call("$uninstallAllAutoReplies",[])}getDefaultSystemShell(c){return this._channel.call("$getDefaultSystemShell",[c])}getProfiles(c,l,s){return this._channel.call("$getProfiles",[this._workspaceContextService.getWorkspace().id,c,l,s])}acceptPtyHostResolvedVariables(c,l){return this._channel.call("$acceptPtyHostResolvedVariables",[c,l])}getEnvironment(){return this._channel.call("$getEnvironment")}getWslPath(c){return this._channel.call("$getWslPath",[c])}setTerminalLayoutInfo(c){const s={workspaceId:this._workspaceContextService.getWorkspace().id,tabs:c?c.tabs:[]};return this._channel.call("$setTerminalLayoutInfo",s)}updateTitle(c,l,s){return this._channel.call("$updateTitle",[c,l,s])}updateIcon(c,l,s,d){return this._channel.call("$updateIcon",[c,l,s,d])}refreshProperty(c,l){return this._channel.call("$refreshProperty",[c,l])}updateProperty(c,l,s){return this._channel.call("$updateProperty",[c,l,s])}getTerminalLayoutInfo(){const l={workspaceId:this._workspaceContextService.getWorkspace().id};return this._channel.call("$getTerminalLayoutInfo",l)}reviveTerminalProcesses(c,l){return this._channel.call("$reviveTerminalProcesses",[c,l])}getRevivedPtyNewId(c){return this._channel.call("$getRevivedPtyNewId",[c])}serializeTerminalState(c){return this._channel.call("$serializeTerminalState",[c])}};i=we([F(2,p.IWorkbenchConfigurationService),F(3,k.IWorkspaceContextService),F(4,I.IConfigurationResolverService),F(5,u.IEnvironmentVariableService),F(6,A.IRemoteAuthorityResolverService),F(7,R.ILogService),F(8,S.IEditorService),F(9,r.ILabelService)],i),e.RemoteTerminalChannelClient=i}),define(ae[2469],le([1,0,10,238,79,110,143,147,221,36,11,29,65,6,210,88,206,2,194,28,105,40,75,226,20,59,62,184,174,1927,84,15,31,8,7,37,5,76,23,33,12,70,255,894,655,313,656,653,346,388,314,536,315,347,657,271,456,247,291,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne){"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 ce{get isDiffable(){const Be=this.messages[this.messageIndex];return Be.type===0&&be(Be)}constructor(Be,ze,nt,ut){this.resultId=Be,this.taskIndex=nt,this.messageIndex=ut,this.test=ze.item,this.messages=ze.tasks[nt].messages,this.messageIndex=ut;const ot={messageIndex:ut,resultId:Be,taskIndex:nt,testExtId:ze.item.extId};this.expectedUri=(0,re.buildTestUri)({...ot,type:2}),this.actualUri=(0,re.buildTestUri)({...ot,type:1}),this.messageUri=(0,re.buildTestUri)({...ot,type:0});const at=this.messages[this.messageIndex];this.revealLocation=at.location??(ze.item.uri&&ze.item.range?{uri:ze.item.uri,range:h.Range.lift(ze.item.range)}:void 0)}}function*de(He){for(const Be of He)for(const ze of Be.tests)for(let nt=0;nt<ze.tasks.length;nt++)for(let ut=0;ut<ze.tasks[nt].messages.length;ut++)yield{result:Be,test:ze,taskIndex:nt,messageIndex:ut}}let he=class extends l.Disposable{constructor(Be,ze,nt,ut,ot){super(),this.configuration=Be,this.editorService=ze,this.codeEditorService=nt,this.testResults=ut,this.testService=ot,this._register(ut.onTestChanged(this.openPeekOnFailure,this))}async open(){let Be;const ze=this.editorService.activeTextEditorControl;if((0,n.isCodeEditor)(ze)&&ze.getModel()?.uri){const nt=ze.getModel()?.uri;nt&&(Be=await this.getFileCandidateMessage(nt,ze.getPosition()))}return Be||(Be=this.lastUri),Be||(Be=this.getAnyCandidateMessage()),Be?this.showPeekFromUri(Be):!1}tryPeekFirstError(Be,ze,nt){const ut=this.getFailedCandidateMessage(ze);if(!ut)return!1;const ot=ut.message;return this.showPeekFromUri({type:0,documentUri:ot.location.uri,taskIndex:ut.taskId,messageIndex:ut.index,resultId:Be.id,testExtId:ze.item.extId},{selection:ot.location.range,...nt}),!0}peekUri(Be,ze){const nt=(0,re.parseTestUri)(Be),ut=nt&&this.testResults.getResult(nt.resultId);if(!nt||!ut)return!1;const ot=ut.getStateById(nt.testExtId)?.tasks[nt.taskIndex].messages[nt.messageIndex];return ot?.location?(this.showPeekFromUri({type:0,documentUri:ot.location.uri,taskIndex:nt.taskIndex,messageIndex:nt.messageIndex,resultId:ut.id,testExtId:nt.testExtId},{selection:ot.location.range,...ze}),!0):!1}closeAllPeeks(){for(const Be of this.codeEditorService.listCodeEditors())me.get(Be)?.removePeek()}async showPeekFromUri(Be,ze){const ut=(await this.editorService.openEditor({resource:Be.documentUri,options:{revealIfOpened:!0,...ze}}))?.getControl();return(0,n.isCodeEditor)(ut)?(this.lastUri=Be,me.get(ut)?.show((0,re.buildTestUri)(this.lastUri)),!0):!1}openPeekOnFailure(Be){if(Be.reason!==1||!this.getFailedCandidateMessage(Be.item)||Be.result.request.isAutoRun&&!(0,Q.getTestingConfiguration)(this.configuration,"testing.automaticallyOpenPeekViewDuringAutoRun"))return;const nt=this.codeEditorService.listCodeEditors();switch((0,Q.getTestingConfiguration)(this.configuration,"testing.automaticallyOpenPeekView")){case"failureInVisibleDocument":{const at=new Set(nt.map(wt=>wt.getModel()?.uri.toString()));if(!f.Iterable.some((0,se.resultItemParents)(Be.result,Be.item),wt=>wt.item.uri&&at.has(wt.item.uri.toString())))return;break}case"failureAnywhere":break;default:return}nt.map(me.get).some(at=>at?.isVisible)||this.tryPeekFirstError(Be.result,Be.item)}async getFileCandidateMessage(Be,ze){let nt,ut=1/0;const ot=Be.toString();for(const at of this.testService.collection.all){const wt=this.testResults.getStateById(at.item.extId);!wt||pe(wt[1],(It,_t,lt,pt)=>{if(!_t.location||_t.location.uri.toString()!==ot)return;const st=ze?Math.abs(ze.lineNumber-_t.location.range.startLineNumber):0;(!nt||st<=ut)&&(ut=st,nt={type:0,testExtId:wt[1].item.extId,resultId:wt[0].id,taskIndex:pt,messageIndex:lt,documentUri:Be})})}return nt}getAnyCandidateMessage(){const Be=new Set;for(const ze of this.testResults.results)for(const nt of ze.tests){if(Be.has(nt.item.extId))continue;Be.add(nt.item.extId);const ut=pe(nt,(ot,at,wt,It)=>at.location&&{type:0,testExtId:nt.item.extId,resultId:ze.id,taskIndex:It,messageIndex:wt,documentUri:at.location.uri});if(ut)return ut}}getFailedCandidateMessage(Be){let ze;return pe(Be,(nt,ut,ot,at)=>{!(0,ie.isFailedState)(nt.state)||!ut.location||ze&&ut.type!==0||(ze={taskId:at,index:ot,message:ut})}),ze}};he=we([F(0,M.IConfigurationService),F(1,ne.IEditorService),F(2,o.ICodeEditorService),F(3,te.ITestResultService),F(4,Z.ITestService)],he),e.TestingPeekOpener=he;const pe=(He,Be)=>{for(let ze=0;ze<He.tasks.length;ze++){const nt=He.tasks[ze];for(let ut=0;ut<nt.messages.length;ut++){const ot=Be(nt,nt.messages[ut],ut,ze);if(ot!==void 0)return ot}}};let me=class Rs extends l.Disposable{static get(Be){return Be.getContribution("editor.contrib.testingOutputPeek")}get isVisible(){return this.peek.value}constructor(Be,ze,nt,ut,ot,at,wt,It){super(),this.editor=Be,this.editorService=ze,this.codeEditorService=nt,this.instantiationService=ut,this.testResults=ot,this.storageService=at,this.commandService=It,this.peek=this._register(new l.MutableDisposable),this.historyVisible=j.MutableObservableValue.stored(new K.StoredValue({key:"testHistoryVisibleInPeek",scope:0,target:0},this.storageService),!0),this.visible=ee.TestingContextKeys.isPeekVisible.bindTo(wt),this._register(Be.onDidChangeModel(()=>this.peek.clear())),this._register(ot.onResultsChanged(this.closePeekOnCertainResultEvents,this)),this._register(ot.onTestChanged(this.closePeekOnTestChange,this))}toggle(Be){this.currentPeekUri?.toString()===Be.toString()?this.peek.clear():this.show(Be)}openCurrentInEditor(){const Be=this.peek.value?.current;if(!Be)return;const ze={pinned:!1,revealIfOpened:!0},nt=Be.messages[Be.messageIndex];Be.isDiffable?this.editorService.openEditor({original:{resource:Be.expectedUri},modified:{resource:Be.actualUri},options:ze}):typeof nt.message=="string"?this.editorService.openEditor({resource:Be.messageUri,options:ze}):this.commandService.executeCommand("markdown.showPreview",Be.messageUri)}async show(Be){const ze=this.retrieveTest(Be);if(!ze)return;const nt=ze.messages[ze.messageIndex];this.peek.value||(this.peek.value=this.instantiationService.createInstance(Se,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,p.renderStringAsPlaintext)(nt.message)),this.peek.value.setModel(ze),this.currentPeekUri=Be}async openAndShow(Be){const ze=this.retrieveTest(Be);if(!ze)return;if(!ze.revealLocation||ze.revealLocation.uri.toString()===this.editor.getModel()?.uri.toString())return this.show(Be);const nt=await this.codeEditorService.openCodeEditor({resource:ze.revealLocation.uri,options:{pinned:!1,revealIfOpened:!0}},this.editor);if(nt)return Rs.get(nt)?.removePeek(),Rs.get(nt)?.show(Be)}removePeek(){this.peek.clear()}next(){const Be=this.peek.value?.current;if(!Be)return;let ze=!1;for(const{messageIndex:nt,taskIndex:ut,result:ot,test:at}of de(this.testResults.results))if(ze){this.openAndShow((0,re.buildTestUri)({type:0,messageIndex:nt,taskIndex:ut,resultId:ot.id,testExtId:at.item.extId}));return}else Be.test.extId===at.item.extId&&Be.messageIndex===nt&&Be.taskIndex===ut&&Be.resultId===ot.id&&(ze=!0)}previous(){const Be=this.peek.value?.current;if(!Be)return;let ze;for(const nt of de(this.testResults.results)){if(Be.test.extId===nt.test.item.extId&&Be.messageIndex===nt.messageIndex&&Be.taskIndex===nt.taskIndex&&Be.resultId===nt.result.id){if(!ze)return;this.openAndShow((0,re.buildTestUri)({type:0,messageIndex:ze.messageIndex,taskIndex:ze.taskIndex,resultId:ze.result.id,testExtId:ze.test.item.extId}));return}ze=nt}}removeIfPeekingForTest(Be){this.peek.value?.current?.test.extId===Be&&this.peek.clear()}closePeekOnTestChange(Be){Be.reason!==1||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 ze=(0,re.parseTestUri)(Be);if(!ze)return;const{resultId:nt,testExtId:ut,taskIndex:ot,messageIndex:at}=ze,wt=this.testResults.getResult(ze.resultId)?.getStateById(ut);if(!(!wt||!wt.tasks[ze.taskIndex]))return new ce(nt,wt,ot,at)}};me=we([F(1,ne.IEditorService),F(2,o.ICodeEditorService),F(3,P.IInstantiationService),F(4,te.ITestResultService),F(5,V.IStorageService),F(6,O.IContextKeyService),F(7,L.ICommandService)],me),e.TestingOutputPeekController=me;let Se=class Wn extends D.PeekViewWidget{constructor(Be,ze,nt,ut,ot,at,wt,It){super(Be,{showFrame:!0,frameWidth:1,showArrow:!0,isResizeable:!0,isAccessible:!0,className:"test-output-peek"},wt),this.historyVisible=ze,this.contextKeyService=ot,this.menuService=at,this.modelService=It,this.visibilityChange=this._disposables.add(new u.Emitter),this.didReveal=this._disposables.add(new u.Emitter),ee.TestingContextKeys.isInPeek.bindTo(ot),this._disposables.add(nt.onDidColorThemeChange(this.applyTheme,this)),this._disposables.add(this.onDidClose(()=>this.visibilityChange.fire(!1))),this.applyTheme(nt.getColorTheme()),ut.addExclusiveWidget(Be,this)}applyTheme(Be){const ze=Be.getColor(G.testingPeekBorder)||r.Color.transparent,nt=Be.getColor(G.testingPeekHeaderBackground)||r.Color.transparent;this.style({arrowColor:ze,frameColor:ze,headerBackgroundColor:nt,primaryHeadingColor:Be.getColor(D.peekViewTitleForeground),secondaryHeadingColor:Be.getColor(D.peekViewTitleInfoForeground)})}_fillHead(Be){super._fillHead(Be);const ze=[],nt=this.menuService.createMenu(_.MenuId.TestPeekTitle,this.contextKeyService);(0,T.createAndFillInActionBarActions)(nt,void 0,ze),this._actionbarWidget.push(ze,{label:!1,icon:!0,index:0}),nt.dispose()}_fillBody(Be){const ze=Wn.lastSplitWidth;this.splitView=new I.SplitView(Be,{orientation:1});const nt=t.append(Be,t.$(".test-output-peek-message-container"));this.contentProviders=[this._disposables.add(this.instantiationService.createInstance(ge,this.editor,nt)),this._disposables.add(this.instantiationService.createInstance(Ce,nt)),this._disposables.add(this.instantiationService.createInstance(De,this.editor,nt))];const ut=t.append(Be,t.$(".test-output-peek-tree")),ot=this._disposables.add(this.instantiationService.createInstance(Oe,this.editor,ut,this.visibilityChange.event,this.didReveal.event));this.splitView.addView({onDidChange:u.Event.None,element:nt,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:wt=>{if(Wn.lastSplitWidth=wt,this.dimension)for(const It of this.contentProviders)It.layout({height:this.dimension.height,width:wt})}},I.Sizing.Distribute),this.splitView.addView({onDidChange:u.Event.None,element:ut,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:wt=>{this.dimension&&ot.layout(this.dimension.height,wt)}},I.Sizing.Distribute);const at=1;this.splitView.setViewVisible(at,this.historyVisible.value),this._disposables.add(this.historyVisible.onDidChange(wt=>{this.splitView.setViewVisible(at,wt)})),ze&&queueMicrotask(()=>this.splitView.resizeView(0,ze))}setModel(Be){const ze=Be.messages[Be.messageIndex],nt=this.current;return!Be.revealLocation&&!nt?Promise.resolve():(this.current=Be,Be.revealLocation?(this.show(Be.revealLocation.range,Wn.lastHeightInLines||Ae(ze)),this.editor.revealPositionNearTop(Be.revealLocation.range.getStartPosition(),0),this.showInPlace(Be)):this.showInPlace(Be))}async showInPlace(Be){const ze=Be.messages[Be.messageIndex];this.setTitle(Pe((0,p.renderStringAsPlaintext)(ze.message)),(0,i.stripIcons)(Be.test.label)),this.didReveal.fire(Be),this.visibilityChange.fire(!0),await Promise.all(this.contentProviders.map(nt=>nt.update(Be,ze)))}_relayout(Be){super._relayout(Be),Wn.lastHeightInLines=Be}_doLayoutBody(Be,ze){super._doLayoutBody(Be,ze),this.dimension=new t.Dimension(ze,Be),this.splitView.layout(ze)}_onWidth(Be){super._onWidth(Be),this.dimension&&(this.dimension=new t.Dimension(Be,this.dimension.height)),this.splitView.layout(Be)}};Se=we([F(2,x.IThemeService),F(3,D.IPeekViewService),F(4,O.IContextKeyService),F(5,_.IMenuService),F(6,P.IInstantiationService),F(7,m.ITextModelService)],Se);const Ie={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"},ve={...Ie,enableSplitViewResizing:!0,isInEmbeddedEditor:!0,renderOverviewRuler:!1,ignoreTrimWhitespace:!1,renderSideBySide:!0,originalAriaLabel:(0,y.localize)(0,null),modifiedAriaLabel:(0,y.localize)(1,null),diffAlgorithm:"smart"},be=He=>He.type===0&&He.actual!==void 0&&He.expected!==void 0;let ge=class extends l.Disposable{constructor(Be,ze,nt,ut){super(),this.editor=Be,this.container=ze,this.instantiationService=nt,this.modelService=ut,this.widget=this._register(new l.MutableDisposable),this.model=this._register(new l.MutableDisposable)}async update({expectedUri:Be,actualUri:ze},nt){if(!be(nt))return this.clear();const[ut,ot]=await Promise.all([this.modelService.createModelReference(Be),this.modelService.createModelReference(ze)]),at=this.model.value=new ke(ut,ot);this.widget.value||(this.widget.value=this.instantiationService.createInstance(g.EmbeddedDiffEditorWidget,this.container,ve,this.editor),this.dimension&&this.widget.value.layout(this.dimension)),this.widget.value.setModel(at),this.widget.value.updateOptions(this.getOptions(fe(nt.expected)||fe(nt.actual)))}clear(){this.model.clear(),this.widget.clear()}layout(Be){this.dimension=Be,this.widget.value?.layout(Be)}getOptions(Be){return Be?{...ve,lineNumbers:"on"}:{...ve,lineNumbers:"off"}}};ge=we([F(2,P.IInstantiationService),F(3,m.ITextModelService)],ge);class ue extends l.Disposable{constructor(Be,ze,nt){super();const ut=this._register(ze.render(nt,{}));ut.element.style.height="100%",ut.element.style.userSelect="text",Be.appendChild(ut.element),this.element=ut.element,this.scrollable=this._register(new E.DomScrollableElement(ut.element,{className:"preview-text"})),Be.appendChild(this.scrollable.getDomNode()),this._register((0,l.toDisposable)(()=>{Be.removeChild(this.scrollable.getDomNode())})),this.scrollable.scanDomNode()}layout(Be,ze){this.scrollable.setScrollDimensions({width:ze-32,height:Be-16,scrollWidth:this.element.scrollWidth,scrollHeight:this.element.scrollHeight})}}let Ce=class extends l.Disposable{constructor(Be,ze){super(),this.container=Be,this.instantiationService=ze,this.markdown=new c.Lazy(()=>this._register(this.instantiationService.createInstance(w.MarkdownRenderer,{}))),this.textPreview=this._register(new l.MutableDisposable)}update(Be,ze){if(be(ze)||typeof ze.message=="string")return this.textPreview.clear();this.textPreview.value=new ue(this.container,this.markdown.getValue(),ze.message)}layout(Be){this.textPreview.value?.layout(Be.height,Be.width)}};Ce=we([F(1,P.IInstantiationService)],Ce);let De=class extends l.Disposable{constructor(Be,ze,nt,ut){super(),this.editor=Be,this.container=ze,this.instantiationService=nt,this.modelService=ut,this.widget=this._register(new l.MutableDisposable),this.model=this._register(new l.MutableDisposable)}async update({messageUri:Be},ze){if(be(ze)||typeof ze.message!="string")return this.clear();const nt=this.model.value=await this.modelService.createModelReference(Be);this.widget.value||(this.widget.value=this.instantiationService.createInstance(g.EmbeddedCodeEditorWidget,this.container,Ie,this.editor),this.dimension&&this.widget.value.layout(this.dimension)),this.widget.value.setModel(nt.object.textEditorModel),this.widget.value.updateOptions(this.getOptions(fe(ze.message)))}clear(){this.model.clear(),this.widget.clear()}layout(Be){this.dimension=Be,this.widget.value?.layout(Be)}getOptions(Be){return Be?{...ve,lineNumbers:"on"}:{...ve,lineNumbers:"off"}}};De=we([F(2,P.IInstantiationService),F(3,m.ITextModelService)],De);const Ae=He=>be(He)?Math.max(ye(He.actual),ye(He.expected)):ye(typeof He.message=="string"?He.message:He.message.value),Pe=He=>{const Be=He.indexOf(` `);return Be===-1?He:He.slice(0,Be)},fe=He=>!!He&&He.includes(` `),ye=He=>(0,s.clamp)(He?Math.max((0,d.count)(He,` `),Math.ceil(He.length/80))+3:0,14,24);class ke extends W.EditorModel{constructor(Be,ze){super(),this._original=Be,this._modified=ze,this.original=this._original.object.textEditorModel,this.modified=this._modified.object.textEditorModel}dispose(){super.dispose(),this._original.dispose(),this._modified.dispose()}}function Ee(He){const Be=He.get(o.ICodeEditorService).listDiffEditors();for(const ze of Be)if(ze.hasTextFocus()&&ze instanceof g.EmbeddedDiffEditorWidget)return ze.getParentEditor();return(0,D.getOuterEditor)(He)}class Te extends a.EditorAction2{constructor(){super({id:"editor.closeTestPeek",title:(0,y.localize)(2,null),icon:C.Codicon.close,precondition:O.ContextKeyExpr.and(O.ContextKeyExpr.or(ee.TestingContextKeys.isInPeek,ee.TestingContextKeys.isPeekVisible),O.ContextKeyExpr.not("config.editor.stablePeek")),keybinding:{weight:100-101,primary:9}})}runEditorCommand(Be,ze){const nt=Ee(Be);me.get(nt??ze)?.removePeek()}}e.CloseTestPeek=Te;class _e{get icon(){return q.testingStatesToIcons.get(this.value.completedAt===void 0?2:(0,se.maxCountPriority)(this.value.counts))}constructor(Be){this.value=Be,this.type="result",this.context=this.value.id,this.id=this.value.id,this.label=this.value.name}}e.TestResultElement=_e;class Re{get icon(){return q.testingStatesToIcons.get(this.test.computedState)}constructor(Be,ze){this.results=Be,this.test=ze,this.type="test",this.context=this.test.item.extId,this.id=`${this.results.id}/${this.test.item.extId}`,this.label=this.test.item.label,this.labelWithIcons=(0,k.renderLabelWithIcons)(this.label);for(const nt of(0,se.resultItemParents)(Be,ze))nt!==ze&&(this.description=this.description?nt.item.label+U.flatTestItemDelimiter+this.description:nt.item.label)}}e.TestCaseElement=Re;class Le{constructor(Be,ze,nt){this.test=ze,this.type="task",this.icon=void 0,this.id=`${Be.id}/${ze.item.extId}/${nt}`,this.task=Be.tasks[nt],this.context=String(nt),this.label=this.task.name??(0,y.localize)(3,null)}}class Me{constructor(Be,ze,nt,ut){this.result=Be,this.test=ze,this.taskIndex=nt,this.messageIndex=ut,this.type="message";const ot=ze.tasks[nt].messages[ut];this.location=ot.location,this.marker=ot.type===1?ot.marker:void 0,this.uri=this.context=(0,re.buildTestUri)({type:0,messageIndex:ut,resultId:Be.id,taskIndex:nt,testExtId:ze.item.extId}),this.id=this.uri.toString();const at=(0,p.renderStringAsPlaintext)(ot.message),wt=(0,d.count)(at.trimRight(),` `);this.label=Pe(at),wt>0&&(this.description=wt>1?(0,y.localize)(4,null,wt):(0,y.localize)(5,null))}}let Oe=class extends l.Disposable{constructor(Be,ze,nt,ut,ot,at,wt,It,_t){super(),this.contextMenuService=at,this.disposed=!1,this.treeActions=It.createInstance(We);const lt={getId(kt){return kt.id}};this.tree=this._register(It.createInstance(B.WorkbenchCompressibleObjectTree,"Test Output Peek",ze,{getHeight:()=>22,getTemplateId:()=>Ke.ID},[It.createInstance(Ke,this.treeActions)],{compressionEnabled:!0,hideTwistiesOfChildlessElements:!0,identityProvider:lt,accessibilityProvider:{getAriaLabel(kt){return kt.ariaLabel||kt.label},getWidgetAriaLabel(){return(0,y.localize)(6,null)}}}));const pt=new WeakMap,st=(kt,Ne)=>{const Ge=pt.get(kt);if(Ge)return Ge;const Ze=Ne();return pt.set(kt,Ze),Ze},qe=(kt,Ne,Ge)=>f.Iterable.map(Ne.tasks[0].messages,(Ze,ft)=>({element:st(Ze,()=>new Me(kt,Ne,Ge,ft)),incompressible:!0})),Et=(kt,Ne)=>{const Ge=f.Iterable.filter(Ne.tasks,Ze=>Ze.messages.length>0);return f.Iterable.map(Ge,(Ze,ft)=>({element:st(Ze,()=>new Le(kt,Ne,ft)),incompressible:!1,children:qe(kt,Ne,ft)}))},Tt=kt=>{const Ne=f.Iterable.filter(kt.tests,Ge=>Ge.tasks.some(Ze=>Ze.messages.length>0));return f.Iterable.map(Ne,Ge=>({element:st(Ge,()=>new Re(kt,Ge)),incompressible:!0,children:Et(kt,Ge)}))},xt=()=>wt.results.map(kt=>{const Ne=st(kt,()=>new _e(kt));return{element:Ne,incompressible:!0,collapsed:this.tree.hasElement(Ne)?this.tree.isCollapsed(Ne):!0,children:Tt(kt)}}),At=new Set,Nt=this._register(new S.RunOnceScheduler(()=>{for(const kt of At){const Ne=pt.get(kt);Ne&&this.tree.hasElement(Ne)&&this.tree.setChildren(Ne,Tt(kt),{diffIdentityProvider:lt})}At.clear()},300));this._register(wt.onTestChanged(kt=>{const Ne=pt.get(kt.item);if(Ne&&this.tree.hasElement(Ne)){this.tree.setChildren(Ne,Et(kt.result,kt.item));return}const Ge=pt.get(kt.result);if(Ge&&this.tree.hasElement(Ge)){Nt.isScheduled||(At.add(kt.result),Nt.schedule());return}this.tree.setChildren(null,xt(),{diffIdentityProvider:lt})})),this._register(wt.onResultsChanged(kt=>{if(!this.disposed){if("completed"in kt){const Ne=pt.get(kt.completed);if(Ne&&this.tree.hasElement(Ne)){this.tree.setChildren(Ne,Tt(kt.completed));return}}this.tree.setChildren(null,xt(),{diffIdentityProvider:lt})}})),this._register(ut(kt=>{const Ne=pt.get(kt.messages[kt.messageIndex]);if(!Ne||!this.tree.hasElement(Ne))return;const Ge=[];for(let Ze=this.tree.getParentElement(Ne);Ze;Ze=this.tree.getParentElement(Ze))Ge.unshift(Ze);for(const Ze of Ge)this.tree.expand(Ze);this.tree.getRelativeTop(Ne)===null&&this.tree.reveal(Ne,.5),this.tree.setFocus([Ne]),this.tree.setSelection([Ne]),this.tree.domFocus()})),this._register(this.tree.onDidOpen(async kt=>{if(!(kt.element instanceof Me))return;const Ne=new ce(kt.element.result.id,kt.element.test,kt.element.taskIndex,kt.element.messageIndex);Ne.revealLocation?me.get(Be)?.openAndShow(Ne.messageUri):ot.showInPlace(Ne)})),this._register(this.tree.onDidChangeSelection(kt=>{for(const Ne of kt.elements)if(Ne&&"test"in Ne){_t.reveal.value=Ne.test.item.extId;break}})),this._register(this.tree.onContextMenu(kt=>this.onContextMenu(kt))),this.tree.setChildren(null,xt())}layout(Be,ze){this.tree.layout(Be,ze)}onContextMenu(Be){if(!Be.element)return;const ze=this.treeActions.provideActionBar(Be.element);this.contextMenuService.showContextMenu({getAnchor:()=>Be.anchor,getActions:()=>ze.secondary.length?[...ze.primary,new b.Separator,...ze.secondary]:ze.primary,getActionsContext:()=>Be.element?.context})}dispose(){super.dispose(),this.disposed=!0}};Oe=we([F(5,N.IContextMenuService),F(6,te.ITestResultService),F(7,P.IInstantiationService),F(8,Y.ITestExplorerFilterState)],Oe);let Ke=class Wa{constructor(Be,ze){this.treeActions=Be,this.instantiationService=ze,this.templateId=Wa.ID}renderCompressedElements(Be,ze,nt){const ut=Be.element.elements,ot=ut[ut.length-1];ot instanceof Le&&ut.length>=2?this.doRender(ut[ut.length-2],nt):this.doRender(ot,nt)}renderTemplate(Be){const ze=new l.DisposableStore,nt=t.append(Be,t.$(".test-peek-item")),ut=t.append(nt,t.$(".state")),ot=t.append(nt,t.$(".name")),at=new R.ActionBar(nt,{actionViewItemProvider:wt=>wt instanceof _.MenuItemAction?this.instantiationService.createInstance(T.MenuEntryActionViewItem,wt,void 0):void 0});return ze.add(at),{icon:ut,label:ot,actionBar:at,elementDisposable:new l.DisposableStore,templateDisposable:ze}}renderElement(Be,ze,nt){this.doRender(Be.element,nt)}disposeTemplate(Be){Be.templateDisposable.dispose()}doRender(Be,ze){ze.elementDisposable.clear(),Be.labelWithIcons?t.reset(ze.label,...Be.labelWithIcons):Be.description?t.reset(ze.label,Be.label,t.$("span.test-label-description",{},Be.description)):t.reset(ze.label,Be.label);const nt=Be.icon;ze.icon.className=`computed-state ${nt?x.ThemeIcon.asClassName(nt):""}`;const ut=this.treeActions.provideActionBar(Be);ze.actionBar.clear(),ze.actionBar.context=Be,ze.actionBar.push(ut.primary,{icon:!0,label:!1})}};Ke.ID="testRunElementRenderer",Ke=we([F(1,P.IInstantiationService)],Ke);let We=class{constructor(Be,ze,nt,ut,ot){this.contextKeyService=Be,this.testTerminalService=ze,this.menuService=nt,this.commandService=ut,this.testProfileService=ot}provideActionBar(Be){const ze=Be instanceof Re?Be.test:void 0,nt=ze?this.testProfileService.capabilitiesForTest(ze):0,ut=this.contextKeyService.createOverlay([["peek","editor.contrib.testingOutputPeek"],[ee.TestingContextKeys.peekItemType.key,Be.type],...(0,$.getTestItemContextOverlay)(ze,nt)]),ot=this.menuService.createMenu(_.MenuId.TestPeekElement,ut);try{const at=[],wt=[];if(Be instanceof _e&&(at.push(new b.Action("testing.outputPeek.showResultOutput",(0,y.localize)(7,null),C.Codicon.terminal.classNames,void 0,()=>this.testTerminalService.open(Be.value))),at.push(new b.Action("testing.outputPeek.reRunLastRun",(0,y.localize)(8,null),x.ThemeIcon.asClassName(q.testingRunIcon),void 0,()=>this.commandService.executeCommand("testing.reRunLastRun",Be.value.id))),nt&4&&at.push(new b.Action("testing.outputPeek.debugLastRun",(0,y.localize)(9,null),x.ThemeIcon.asClassName(q.testingDebugIcon),void 0,()=>this.commandService.executeCommand("testing.debugLastRun",Be.value.id)))),Be instanceof Re||Be instanceof Le){const _t=Be.test.item.extId;at.push(new b.Action("testing.outputPeek.goToFile",(0,y.localize)(10,null),C.Codicon.goToFile.classNames,void 0,()=>this.commandService.executeCommand("vscode.revealTest",_t))),wt.push(new b.Action("testing.outputPeek.revealInExplorer",(0,y.localize)(11,null),C.Codicon.listTree.classNames,void 0,()=>this.commandService.executeCommand("_revealTestInExplorer",_t))),nt&2&&at.push(new b.Action("testing.outputPeek.runTest",(0,y.localize)(12,null),x.ThemeIcon.asClassName(q.testingRunIcon),void 0,()=>this.commandService.executeCommand("vscode.runTestsById",2,_t))),nt&4&&at.push(new b.Action("testing.outputPeek.debugTest",(0,y.localize)(13,null),x.ThemeIcon.asClassName(q.testingDebugIcon),void 0,()=>this.commandService.executeCommand("vscode.runTestsById",4,_t)))}Be instanceof Me&&Be.marker!==void 0&&at.push(new b.Action("testing.outputPeek.showMessageInTerminal",(0,y.localize)(14,null),C.Codicon.terminal.classNames,void 0,()=>this.testTerminalService.open(Be.result,Be.marker)));const It={primary:at,secondary:wt};return(0,T.createAndFillInActionBarActions)(ot,{shouldForwardArgs:!0},It,"inline"),It}finally{ot.dispose()}}};We=we([F(0,O.IContextKeyService),F(1,X.ITestingOutputTerminalService),F(2,_.IMenuService),F(3,L.ICommandService),F(4,oe.ITestProfileService)],We),(0,x.registerThemingParticipant)((He,Be)=>{const ze=He.getColor(D.peekViewResultsBackground);ze&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree { background-color: ${ze}; }`);const nt=He.getColor(D.peekViewResultsMatchForeground);nt&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree { color: ${nt}; }`);const ut=He.getColor(D.peekViewResultsSelectionBackground);ut&&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: ${ut}; }`);const ot=He.getColor(D.peekViewResultsSelectionForeground);ot&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${ot} !important; }`);const at=He.getColor(z.textLinkForeground);at&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-message-container a { color: ${at}; }`);const wt=He.getColor(z.textLinkActiveForeground);wt&&Be.addRule(`.monaco-editor .test-output-peek .test-output-peek-message-container a :hover { color: ${wt}; }`)});const Xe=O.ContextKeyExpr.and(v.EditorContextKeys.focus,ee.TestingContextKeys.isPeekVisible),Je=(He,Be)=>{if(me.get(Be)?.isVisible)return Be;if(Be instanceof g.EmbeddedCodeEditorWidget)return Be.getParentEditor();const ze=Ee(He);return ze||Be};class rt extends a.EditorAction2{constructor(){super({id:rt.ID,f1:!0,title:{value:(0,y.localize)(15,null),original:"Go to Next Test Failure"},icon:C.Codicon.arrowDown,category:H.Categories.Test,keybinding:{primary:578,weight:100+1,when:Xe},menu:[{id:_.MenuId.TestPeekTitle,group:"navigation",order:2},{id:_.MenuId.CommandPalette,when:Xe}]})}runEditorCommand(Be,ze){me.get(Je(Be,ze))?.next()}}e.GoToNextMessageAction=rt,rt.ID="testing.goToNextMessage";class je extends a.EditorAction2{constructor(){super({id:je.ID,f1:!0,title:{value:(0,y.localize)(16,null),original:"Go to Previous Test Failure"},icon:C.Codicon.arrowUp,category:H.Categories.Test,keybinding:{primary:1602,weight:100+1,when:Xe},menu:[{id:_.MenuId.TestPeekTitle,group:"navigation",order:1},{id:_.MenuId.CommandPalette,when:Xe}]})}runEditorCommand(Be,ze){me.get(Je(Be,ze))?.previous()}}e.GoToPreviousMessageAction=je,je.ID="testing.goToPreviousMessage";class Ue extends a.EditorAction2{constructor(){super({id:Ue.ID,f1:!1,title:{value:(0,y.localize)(17,null),original:"Open in Editor"},icon:C.Codicon.linkExternal,category:H.Categories.Test,menu:[{id:_.MenuId.TestPeekTitle}]})}runEditorCommand(Be,ze){me.get(Je(Be,ze))?.openCurrentInEditor()}}e.OpenMessageInEditorAction=Ue,Ue.ID="testing.openMessageInEditor";class Fe extends a.EditorAction2{constructor(){super({id:Fe.ID,f1:!0,title:{value:(0,y.localize)(18,null),original:"Toggle Test History in Peek"},icon:C.Codicon.history,category:H.Categories.Test,menu:[{id:_.MenuId.TestPeekTitle,group:"navigation",order:3}],keybinding:{weight:200,primary:550,when:ee.TestingContextKeys.isPeekVisible.isEqualTo(!0)}})}runEditorCommand(Be,ze){const nt=me.get(Je(Be,ze));nt&&(nt.historyVisible.value=!nt.historyVisible.value)}}e.ToggleTestingPeekHistory=Fe,Fe.ID="testing.toggleTestingPeekHistory"}),define(ae[2470],le([1,0,16,32,6,88,2,1935,7,5,26,23,118,2416,388,314,2414,229,315,271,247,24,8,346,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestService=void 0;let v=class extends k.Disposable{constructor(w,D,y,T,_,L,M,O,N){super(),this.storage=y,this.editorService=T,this.testProfiles=_,this.notificationService=L,this.configurationService=M,this.testResults=O,this.workspaceTrustRequestService=N,this.testControllers=new Map,this.cancelExtensionTestRunEmitter=new R.Emitter,this.willProcessDiffEmitter=new R.Emitter,this.didProcessDiffEmitter=new R.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 u.MainThreadTestCollection(this.expandTest.bind(this)),this.showInlineOutput=i.MutableObservableValue.stored(new f.StoredValue({key:"inlineTestOutputVisible",scope:1,target:0},this.storage),!0),this.excluded=D.createInstance(c.TestExclusions),this.providerCount=s.TestingContextKeys.providerCount.bindTo(w),this.canRefreshTests=s.TestingContextKeys.canRefreshTests.bindTo(w),this.isRefreshingTests=s.TestingContextKeys.isRefreshingTests.bindTo(w)}async expandTest(w,D){await this.testControllers.get(l.TestId.fromString(w).controllerId)?.expandTest(w,D)}cancelTestRun(w){if(this.cancelExtensionTestRunEmitter.fire({runId:w}),w===void 0)for(const D of this.uiRunningTests.values())D.cancel();else this.uiRunningTests.get(w)?.cancel()}async runTests(w,D=p.CancellationToken.None){const y={targets:[],exclude:w.exclude?.map(T=>T.item.extId),isAutoRun:w.isAutoRun};for(const T of this.testProfiles.getGroupDefaultProfiles(w.group)){const _=w.tests.filter(L=>(0,d.canUseProfileWithTest)(T,L)).map(L=>L.item.extId);_.length&&y.targets.push({testIds:_,profileGroup:T.group,profileId:T.profileId,controllerId:T.controllerId})}if(y.targets.length===0)for(const T of(0,t.groupBy)(w.tests,(_,L)=>_.controllerId===L.controllerId?0:1)){const _=this.testProfiles.getControllerProfiles(T[0].controllerId),L=T.map(M=>({profile:_.find(O=>O.group===w.group&&(0,d.canUseProfileWithTest)(O,M)),test:M}));for(const M of(0,t.groupBy)(L,(O,N)=>O.profile===N.profile?0:1)){const O=M[0].profile;O&&y.targets.push({testIds:M.map(N=>N.test.item.extId),profileGroup:w.group,profileId:O.profileId,controllerId:O.controllerId})}}return this.runResolvedTests(y,D)}async runResolvedTests(w,D=p.CancellationToken.None){w.exclude||(w.exclude=[...this.excluded.all]);const y=this.testResults.createLiveResult(w);if(!await this.workspaceTrustRequestService.requestWorkspaceTrust({message:(0,E.localize)(0,null)}))return y.markComplete(),y;try{const _=new p.CancellationTokenSource(D);this.uiRunningTests.set(y.id,_);const M=(0,t.groupBy)(w.targets,(O,N)=>O.controllerId.localeCompare(N.controllerId)).map(O=>this.testControllers.get(O[0].controllerId)?.runTests(O.map(N=>({runId:y.id,excludeExtIds:w.exclude.filter(P=>!N.testIds.includes(P)),profileId:N.profileId,controllerId:N.controllerId,testIds:N.testIds})),_.token).then(N=>{const P=N.map(B=>B.error).filter(h.isDefined);P.length&&this.notificationService.error((0,E.localize)(1,null,P.join(" ")))}));return await this.saveAllBeforeTest(w),await Promise.all(M),y}finally{this.uiRunningTests.delete(y.id),y.markComplete()}}publishDiff(w,D){this.willProcessDiffEmitter.fire(D),this.collection.apply(D),this.didProcessDiffEmitter.fire(D)}getTestController(w){return this.testControllers.get(w)}async syncTests(){const w=new p.CancellationTokenSource;try{await Promise.all([...this.testControllers.values()].map(D=>D.syncTests(w.token)))}finally{w.dispose(!0)}}async refreshTests(w){const D=new p.CancellationTokenSource;this.testRefreshCancellations.add(D),this.isRefreshingTests.set(!0);try{w?await this.testControllers.get(w)?.refreshTests(D.token):await Promise.all([...this.testControllers.values()].map(y=>y.refreshTests(D.token)))}finally{this.testRefreshCancellations.delete(D),this.isRefreshingTests.set(this.testRefreshCancellations.size>0),D.dispose(!0)}}cancelRefreshTests(){for(const w of this.testRefreshCancellations)w.cancel();this.testRefreshCancellations.clear(),this.isRefreshingTests.set(!1)}registerTestController(w,D){this.testControllers.set(w,D),this.providerCount.set(this.testControllers.size),this.updateCanRefresh();const y=new k.DisposableStore;return y.add((0,k.toDisposable)(()=>{const T=[];for(const _ of this.collection.rootItems)_.controllerId===w&&T.push({op:3,itemId:_.item.extId});this.publishDiff(w,T),this.testControllers.delete(w)&&(this.providerCount.set(this.testControllers.size),this.updateCanRefresh())})),y.add(D.canRefresh.onDidChange(this.updateCanRefresh,this)),y}async saveAllBeforeTest(w,D=this.configurationService,y=this.editorService){if(w.isUiTriggered===!1)return;(0,g.getTestingConfiguration)(this.configurationService,"testing.saveBeforeTest")&&await y.saveAll()}updateCanRefresh(){this.canRefreshTests.set(A.Iterable.some(this.testControllers.values(),w=>w.canRefresh.value))}};v=we([F(0,I.IContextKeyService),F(1,b.IInstantiationService),F(2,C.IStorageService),F(3,a.IEditorService),F(4,d.ITestProfileService),F(5,S.INotificationService),F(6,o.IConfigurationService),F(7,n.ITestResultService),F(8,r.IWorkspaceTrustRequestService)],v),e.TestService=v}),define(ae[2471],le([1,0,10,221,297,65,6,2,226,20,116,62,174,1941,84,15,7,5,76,23,12,2424,24,1180]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchyTreePeekWidget=void 0;var g;(function(w){w.Loading="loading",w.Message="message",w.Data="data"})(g||(g={}));class h{static store(D,y){y.store("typeHierarchyPeekLayout",JSON.stringify(D),0,1)}static retrieve(D){const y=D.get("typeHierarchyPeekLayout",0,"{}"),T={ratio:.7,height:17};try{return{...T,...JSON.parse(y)}}catch{return T}}constructor(D,y){this.ratio=D,this.height=y}}class v extends s.WorkbenchAsyncDataTree{}let m=class za extends r.PeekViewWidget{constructor(D,y,T,_,L,M,O,N,P,B,V){super(D,{showFrame:!0,showArrow:!0,isResizeable:!0,isAccessible:!0},V),this._where=y,this._direction=T,this._peekViewService=L,this._editorService=M,this._textModelService=O,this._storageService=N,this._menuService=P,this._contextKeyService=B,this._instantiationService=V,this._treeViewStates=new Map,this._previewDisposable=new E.DisposableStore,this.create(),this._peekViewService.addExclusiveWidget(D,this),this._applyTheme(_.getColorTheme()),this._disposables.add(_.onDidColorThemeChange(this._applyTheme,this)),this._disposables.add(this._previewDisposable)}dispose(){h.store(this._layoutInfo,this._storageService),this._splitView.dispose(),this._tree.dispose(),this._editor.dispose(),super.dispose()}get direction(){return this._direction}_applyTheme(D){const y=D.getColor(r.peekViewBorder)||A.Color.transparent;this.style({arrowColor:y,frameColor:y,headerBackgroundColor:D.getColor(r.peekViewTitleBackground)||A.Color.transparent,primaryHeadingColor:D.getColor(r.peekViewTitleForeground),secondaryHeadingColor:D.getColor(r.peekViewTitleInfoForeground)})}_fillHead(D){super._fillHead(D,!0);const y=this._menuService.createMenu(za.TitleMenu,this._contextKeyService),T=()=>{const _=[];(0,i.createAndFillInActionBarActions)(y,void 0,_),this._actionbarWidget.clear(),this._actionbarWidget.push(_,{label:!1,icon:!0})};this._disposables.add(y),this._disposables.add(y.onDidChange(T)),T()}_fillBody(D){this._layoutInfo=h.retrieve(this._storageService),this._dim=new t.Dimension(0,0),this._parent=D,D.classList.add("type-hierarchy");const y=document.createElement("div");y.classList.add("message"),D.appendChild(y),this._message=y,this._message.tabIndex=0;const T=document.createElement("div");T.classList.add("results"),D.appendChild(T),this._splitView=new p.SplitView(T,{orientation:1});const _=document.createElement("div");_.classList.add("editor"),T.appendChild(_);const L={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,_,L,this.editor);const M=document.createElement("div");M.classList.add("tree"),T.appendChild(M);const O={sorter:new a.Sorter,accessibilityProvider:new a.AccessibilityProvider(()=>this._direction),identityProvider:new a.IdentityProvider(()=>this._direction),expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:r.peekViewResultsBackground}};this._tree=this._instantiationService.createInstance(v,"TypeHierarchyPeek",M,new a.VirtualDelegate,[this._instantiationService.createInstance(a.TypeRenderer)],this._instantiationService.createInstance(a.DataSource,()=>this._direction),O),this._splitView.addView({onDidChange:k.Event.None,element:_,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:N=>{this._dim.height&&this._editor.layout({height:this._dim.height,width:N})}},p.Sizing.Distribute),this._splitView.addView({onDidChange:k.Event.None,element:M,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:N=>{this._dim.height&&this._tree.layout(this._dim.height,N)}},p.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(N=>{const{event:P,target:B}=N;if(P.detail!==2)return;const[V]=this._tree.getFocus();!V||(this.dispose(),this._editorService.openEditor({resource:V.item.uri,options:{selection:B.range}}))})),this._disposables.add(this._tree.onMouseDblClick(N=>{N.target!==R.TreeMouseEventTarget.Twistie&&N.element&&(this.dispose(),this._editorService.openEditor({resource:N.element.item.uri,options:{selection:N.element.item.selectionRange,pinned:!0}}))})),this._disposables.add(this._tree.onDidChangeSelection(N=>{const[P]=N.elements;P&&N.browserEvent instanceof KeyboardEvent&&(this.dispose(),this._editorService.openEditor({resource:P.item.uri,options:{selection:P.item.selectionRange,pinned:!0}}))}))}async _updatePreview(){const[D]=this._tree.getFocus();if(!D)return;this._previewDisposable.clear();const y={description:"type-hierarchy-decoration",stickiness:1,className:"type-decoration",overviewRuler:{color:(0,n.themeColorFromId)(r.peekViewEditorMatchHighlight),position:S.OverviewRulerLane.Center}};let T;this._direction==="supertypes"?T=D.parent?D.parent.item.uri:D.model.root.uri:T=D.item.uri;const _=await this._textModelService.createModelReference(T);this._editor.setModel(_.object.textEditorModel);const L=[];let M;const O={uri:D.item.uri,range:D.item.selectionRange};if(O.uri.toString()===T.toString()&&(L.push({range:O.range,options:y}),M=M?b.Range.plusRange(O.range,M):O.range),M){this._editor.revealRangeInCenter(M,1);const P=this._editor.createDecorationsCollection(L);this._previewDisposable.add((0,E.toDisposable)(()=>P.clear()))}this._previewDisposable.add(_);const N=this._direction==="supertypes"?(0,u.localize)(0,null,D.model.root.name):(0,u.localize)(1,null,D.model.root.name);this.setTitle(N)}showLoading(){this._parent.dataset.state="loading",this.setTitle((0,u.localize)(2,null)),this._show()}showMessage(D){this._parent.dataset.state="message",this.setTitle(""),this.setMetaTitle(""),this._message.innerText=D,this._show(),this._message.focus()}async showModel(D){this._show();const y=this._treeViewStates.get(this._direction);await this._tree.setInput(D,y);const T=this._tree.getNode(D).children[0];await this._tree.expand(T.element),T.children.length===0?this.showMessage(this._direction==="supertypes"?(0,u.localize)(3,null,D.root.name):(0,u.localize)(4,null,D.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(D){const y=this._tree.getInput();y&&D!==this._direction&&(this._treeViewStates.set(this._direction,this._tree.getViewState()),this._direction=D,await this.showModel(y))}_show(){this._isShowing||(this.editor.revealLineInCenterIfOutsideViewport(this._where.lineNumber,0),super.show(b.Range.fromPositions(this._where),this._layoutInfo.height))}_onWidth(D){this._dim&&this._doLayoutBody(this._dim.height,D)}_doLayoutBody(D,y){(this._dim.height!==D||this._dim.width!==y)&&(super._doLayoutBody(D,y),this._dim=new t.Dimension(y,D),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 f.MenuId("typehierarchy/title"),m=we([F(3,n.IThemeService),F(4,r.IPeekViewService),F(5,o.IEditorService),F(6,C.ITextModelService),F(7,d.IStorageService),F(8,f.IMenuService),F(9,c.IContextKeyService),F(10,l.IInstantiationService)],m),e.TypeHierarchyTreePeekWidget=m,(0,n.registerThemingParticipant)((w,D)=>{const y=w.getColor(r.peekViewEditorMatchHighlight);y&&D.addRule(`.monaco-editor .type-hierarchy .type-decoration { background-color: ${y}; }`);const T=w.getColor(r.peekViewEditorMatchHighlightBorder);T&&D.addRule(`.monaco-editor .type-hierarchy .type-decoration { border: 2px solid ${T}; box-sizing: border-box; }`);const _=w.getColor(r.peekViewResultsBackground);_&&D.addRule(`.monaco-editor .type-hierarchy .tree { background-color: ${_}; }`);const L=w.getColor(r.peekViewResultsFileForeground);L&&D.addRule(`.monaco-editor .type-hierarchy .tree { color: ${L}; }`);const M=w.getColor(r.peekViewResultsSelectionBackground);M&&D.addRule(`.monaco-editor .type-hierarchy .tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${M}; }`);const O=w.getColor(r.peekViewResultsSelectionForeground);O&&D.addRule(`.monaco-editor .type-hierarchy .tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${O} !important; }`);const N=w.getColor(r.peekViewEditorBackground);N&&D.addRule(`.monaco-editor .type-hierarchy .editor .monaco-editor .monaco-editor-background,.monaco-editor .type-hierarchy .editor .monaco-editor .inputarea.ime-input { background-color: ${N};}`);const P=w.getColor(r.peekViewEditorGutterBackground);P&&D.addRule(`.monaco-editor .type-hierarchy .editor .monaco-editor .margin { background-color: ${P};}`)})}),define(ae[2472],le([1,0,32,29,21,6,2,40,75,20,174,1940,15,7,5,23,2471,658]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=new u.RawContextKey("editorHasTypeHierarchyProvider",!1,(0,C.localize)(0,null)),d=new u.RawContextKey("typeHierarchyVisible",!1,(0,C.localize)(1,null)),n=new u.RawContextKey("typeHierarchyDirection",void 0,{type:"string",description:(0,C.localize)(2,null)});function a(g){return g==="subtypes"||g==="supertypes"?g:"subtypes"}let o=class zn{static get(h){return h.getContribution(zn.Id)}constructor(h,v,m,w,D){this._editor=h,this._contextKeyService=v,this._storageService=m,this._editorService=w,this._instantiationService=D,this._disposables=new k.DisposableStore,this._sessionDisposables=new k.DisposableStore,this._ctxHasProvider=s.bindTo(this._contextKeyService),this._ctxIsVisible=d.bindTo(this._contextKeyService),this._ctxDirection=n.bindTo(this._contextKeyService),this._disposables.add(A.Event.any(h.onDidChangeModel,h.onDidChangeModelLanguage,l.TypeHierarchyProviderRegistry.onDidChange)(()=>{this._ctxHasProvider.set(h.hasModel()&&l.TypeHierarchyProviderRegistry.has(h.getModel()))})),this._disposables.add(this._sessionDisposables)}dispose(){this._disposables.dispose()}async startTypeHierarchyFromEditor(){if(this._sessionDisposables.clear(),!this._editor.hasModel())return;const h=this._editor.getModel(),v=this._editor.getPosition();if(!l.TypeHierarchyProviderRegistry.has(h))return;const m=new t.CancellationTokenSource,w=l.TypeHierarchyModel.create(h,v,m.token),D=a(this._storageService.get(zn._storageDirectionKey,0,"subtypes"));this._showTypeHierarchyWidget(v,D,w,m)}_showTypeHierarchyWidget(h,v,m,w){this._ctxIsVisible.set(!0),this._ctxDirection.set(v),A.Event.any(this._editor.onDidChangeModel,this._editor.onDidChangeModelLanguage)(this.endTypeHierarchy,this,this._sessionDisposables),this._widget=this._instantiationService.createInstance(c.TypeHierarchyTreePeekWidget,this._editor,h,v),this._widget.showLoading(),this._sessionDisposables.add(this._widget.onDidClose(()=>{this.endTypeHierarchy(),this._storageService.store(zn._storageDirectionKey,this._widget.direction,0,0)})),this._sessionDisposables.add({dispose(){w.dispose(!0)}}),this._sessionDisposables.add(this._widget),m.then(D=>{w.token.isCancellationRequested||(D?(this._sessionDisposables.add(D),this._widget.showModel(D)):this._widget.showMessage((0,C.localize)(3,null)))}).catch(D=>{if((0,R.isCancellationError)(D)){this.endTypeHierarchy();return}this._widget.showMessage((0,C.localize)(4,null))})}async startTypeHierarchyFromTypeHierarchy(){if(!this._widget)return;const h=this._widget.getModel(),v=this._widget.getFocused();if(!v||!h)return;const m=await this._editorService.openCodeEditor({resource:v.item.uri},this._editor);if(!m)return;const w=h.fork(v.item);this._sessionDisposables.clear(),zn.get(m)?._showTypeHierarchyWidget(b.Range.lift(w.root.selectionRange).getStartPosition(),this._widget.direction,Promise.resolve(w),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()}};o.Id="typeHierarchy",o._storageDirectionKey="typeHierarchy/defaultDirection",o=we([F(1,u.IContextKeyService),F(2,f.IStorageService),F(3,I.ICodeEditorService),F(4,i.IInstantiationService)],o),(0,E.registerEditorContribution)(o.Id,o),(0,r.registerAction2)(class extends E.EditorAction2{constructor(){super({id:"editor.showTypeHierarchy",title:{value:(0,C.localize)(5,null),original:"Peek Type Hierarchy"},menu:{id:r.MenuId.EditorContextPeek,group:"navigation",order:1e3,when:u.ContextKeyExpr.and(s,S.PeekContext.notInPeekEditor)},precondition:u.ContextKeyExpr.and(s,S.PeekContext.notInPeekEditor)})}async runEditorCommand(g,h){return o.get(h)?.startTypeHierarchyFromEditor()}}),(0,r.registerAction2)(class extends E.EditorAction2{constructor(){super({id:"editor.showSupertypes",title:{value:(0,C.localize)(6,null),original:"Show Supertypes"},icon:p.Codicon.typeHierarchySuper,precondition:u.ContextKeyExpr.and(d,n.isEqualTo("subtypes")),keybinding:{weight:200,primary:1024+512+38},menu:{id:c.TypeHierarchyTreePeekWidget.TitleMenu,when:n.isEqualTo("subtypes"),order:1}})}runEditorCommand(g,h){return o.get(h)?.showSupertypes()}}),(0,r.registerAction2)(class extends E.EditorAction2{constructor(){super({id:"editor.showSubtypes",title:{value:(0,C.localize)(7,null),original:"Show Subtypes"},icon:p.Codicon.typeHierarchySub,precondition:u.ContextKeyExpr.and(d,n.isEqualTo("supertypes")),keybinding:{weight:200,primary:1024+512+38},menu:{id:c.TypeHierarchyTreePeekWidget.TitleMenu,when:n.isEqualTo("supertypes"),order:1}})}runEditorCommand(g,h){return o.get(h)?.showSubtypes()}}),(0,r.registerAction2)(class extends E.EditorAction2{constructor(){super({id:"editor.refocusTypeHierarchy",title:{value:(0,C.localize)(8,null),original:"Refocus Type Hierarchy"},precondition:d,keybinding:{weight:200,primary:1024+3}})}async runEditorCommand(g,h){return o.get(h)?.startTypeHierarchyFromTypeHierarchy()}}),(0,r.registerAction2)(class extends E.EditorAction2{constructor(){super({id:"editor.closeTypeHierarchy",title:(0,C.localize)(9,null),icon:p.Codicon.close,precondition:u.ContextKeyExpr.and(d,u.ContextKeyExpr.not("config.editor.stablePeek")),keybinding:{weight:200+10,primary:9},menu:{id:c.TypeHierarchyTreePeekWidget.TitleMenu,order:1e3}})}runEditorCommand(g,h){return o.get(h)?.endTypeHierarchy()}})}),define(ae[2473],le([1,0,40,508,1957,15,7,202,316,24]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreventDefaultContextMenuItemsContextKeyName=void 0;const S=100;function C(r,u){r?.addImplementation(S,"webview",i=>{const c=i.get(E.IWebviewService).activeWebview;if(c?.isFocused)return u(c),!0;if(document.activeElement?.classList.contains("action-menu-item")){const l=i.get(b.IEditorService);if(l.activeEditor instanceof I.WebviewInput)return u(l.activeEditor.webview),!0}return!1})}C(t.UndoCommand,r=>r.undo()),C(t.RedoCommand,r=>r.redo()),C(t.SelectAllCommand,r=>r.selectAll()),C(p.CopyAction,r=>r.copy()),C(p.PasteAction,r=>r.paste()),C(p.CutAction,r=>r.cut()),e.PreventDefaultContextMenuItemsContextKeyName="preventDefaultContextMenuItems",p.CutAction&&A.MenuRegistry.appendMenuItem(A.MenuId.WebviewContext,{command:{id:p.CutAction.id,title:R.localize(0,null)},group:"5_cutcopypaste",order:1,when:k.ContextKeyExpr.not(e.PreventDefaultContextMenuItemsContextKeyName)}),p.CopyAction&&A.MenuRegistry.appendMenuItem(A.MenuId.WebviewContext,{command:{id:p.CopyAction.id,title:R.localize(1,null)},group:"5_cutcopypaste",order:2,when:k.ContextKeyExpr.not(e.PreventDefaultContextMenuItemsContextKeyName)}),p.PasteAction&&A.MenuRegistry.appendMenuItem(A.MenuId.WebviewContext,{command:{id:p.PasteAction.id,title:R.localize(2,null)},group:"5_cutcopypaste",order:3,when:k.ContextKeyExpr.not(e.PreventDefaultContextMenuItemsContextKeyName)})}),define(ae[2474],le([1,0,105,2150,12,24,75,35,18,8,379]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorService=void 0;let C=class extends p.AbstractCodeEditorService{constructor(u,i,f){super(i),this.editorService=u,this.configurationService=f,this.registerCodeEditorOpenHandler(this.doOpenCodeEditor.bind(this)),this.registerCodeEditorOpenHandler(this.doOpenCodeEditorFromDiff.bind(this))}getActiveCodeEditor(){const u=this.editorService.activeTextEditorControl;if((0,t.isCodeEditor)(u))return u;if((0,t.isDiffEditor)(u))return u.getModifiedEditor();const i=this.editorService.activeEditorPane?.getControl();return(0,t.isCompositeEditor)(i)&&(0,t.isCodeEditor)(i.activeCodeEditor)?i.activeCodeEditor:null}async doOpenCodeEditorFromDiff(u,i,f){const c=this.editorService.activeTextEditorControl;if(!f&&(0,t.isDiffEditor)(c)&&u.options&&u.resource&&i===c.getModifiedEditor()&&c.getModel()&&(0,I.isEqual)(u.resource,c.getModel()?.modified.uri)){const l=c.getModifiedEditor();return(0,S.applyTextEditorOptions)(u.options,l,0),l}return null}async doOpenCodeEditor(u,i,f){if(!this.configurationService.getValue().workbench?.editor?.enablePreviewFromCodeNavigation&&i&&!u.options?.pinned&&!f&&!(0,I.isEqual)(i.getModel()?.uri,u.resource)){for(const s of this.editorService.visibleEditorPanes)if((0,t.getCodeEditor)(s.getControl())===i){s.group.pinEditor();break}}const l=await this.editorService.openEditor(u,f?A.SIDE_GROUP:A.ACTIVE_GROUP);if(l){const s=l.getControl();if((0,t.isCodeEditor)(s))return s;if((0,t.isCompositeEditor)(s)&&(0,t.isCodeEditor)(s.activeCodeEditor))return s.activeCodeEditor}return null}};C=we([F(0,A.IEditorService),F(1,R.IThemeService),F(2,b.IConfigurationService)],C),e.CodeEditorService=C,(0,E.registerSingleton)(k.ICodeEditorService,C,1)}),define(ae[273],le([1,0,58,24]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorGroupToColumn=e.columnToEditorGroup=void 0;function R(k,E,I=p.ACTIVE_GROUP){if(I===p.ACTIVE_GROUP||I===p.SIDE_GROUP)return I;let b=k.getGroups(2)[I];if(!b&&I<9){for(let S=0;S<=I;S++){const C=k.getGroups(2);C[S]||k.addGroup(C[S-1],(0,t.preferredSideBySideGroupDirection)(E))}b=k.getGroups(2)[I]}return b?.id??p.SIDE_GROUP}e.columnToEditorGroup=R;function A(k,E){const I=typeof E=="number"?k.getGroup(E):E;return k.getGroups(2).indexOf(I??k.activeGroup)}e.editorGroupToColumn=A}),define(ae[671],le([1,0,8,161,43,58,24]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findGroup=void 0;function E(r,u,i){const f=r.get(A.IEditorGroupsService),c=r.get(t.IConfigurationService),l=I(u,i,f,c);let s;return f.activeGroup!==l&&u.options&&!u.options.inactive&&u.options.preserveFocus&&typeof u.options.activation!="number"&&i!==k.SIDE_GROUP&&(s=p.EditorActivation.ACTIVATE),[l,s]}e.findGroup=E;function I(r,u,i,f){let c;const l=(0,R.isEditorInputWithOptions)(r)?r.editor:r,s=r.options;if(u&&typeof u!="number")c=u;else if(typeof u=="number"&&u>=0)c=i.getGroup(u);else if(u===k.SIDE_GROUP){const d=(0,A.preferredSideBySideGroupDirection)(f);let n=i.findGroup({direction:d});(!n||b(n,l))&&(n=i.addGroup(i.activeGroup,d)),c=n}else if(!s||typeof s.index!="number"){const d=i.getGroups(1);if(s?.revealIfVisible){for(const n of d)if(S(n,l)){c=n;break}}if(!c&&(s?.revealIfOpened||f.getValue("workbench.editor.revealIfOpen")||(0,R.isEditorInput)(l)&&l.hasCapability(8))){let n,a;for(const o of d)if(C(o,l)&&(a||(a=o),!n&&o.isActive(l)&&(n=o)),a&&n)break;c=n||a}}if(!c){let d=i.activeGroup;if(b(d,l)){for(const n of i.getGroups(1))if(!b(n,l)){d=n;break}b(d,l)?c=i.addGroup(d,(0,A.preferredSideBySideGroupDirection)(f)):c=d}else c=d}return c}function b(r,u){return!(!r.isLocked||C(r,u))}function S(r,u){return r.activeEditor?r.activeEditor.matches(u):!1}function C(r,u){for(const i of r.editors)if(i.matches(u))return!0;return!1}}),define(ae[917],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEncryptionService=void 0,e.IEncryptionService=(0,t.createDecorator)("encryptionService")}),define(ae[2475],le([1,0,102,917]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(p.IEncryptionService,"encryption")}),define(ae[248],le([1,0,22,18,9,81,112,21,164,25,13,5,783]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserWorkbenchEnvironmentService=e.IBrowserWorkbenchEnvironmentService=void 0,e.IBrowserWorkbenchEnvironmentService=(0,C.refineServiceDecorator)(A.IEnvironmentService);class u{get remoteAuthority(){return this.options.remoteAuthority}get isBuilt(){return!!this.productService.commit}get logsPath(){return this.logsHome.path}get logLevel(){const f=this.payload?.get("logLevel");return f?f.split(",").find(c=>!r.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.test(c)):this.options.developmentOptions?.logLevel!==void 0?(0,b.LogLevelToString)(this.options.developmentOptions?.logLevel):void 0}get extensionLogLevel(){const f=this.payload?.get("logLevel");if(f){const c=[];for(const l of f.split(",")){const s=r.EXTENSION_IDENTIFIER_WITH_LOG_REGEX.exec(l);s&&s[1]&&s[2]&&c.push([s[1],s[2]])}return c.length?c:void 0}return this.options.developmentOptions?.extensionLogLevel!==void 0?this.options.developmentOptions?.extensionLogLevel.map(([c,l])=>[c,(0,b.LogLevelToString)(l)]):void 0}get windowLogsPath(){return this.logsHome}get logFile(){return(0,p.joinPath)(this.windowLogsPath,"window.log")}get userRoamingDataHome(){return R.URI.file("/User").with({scheme:t.Schemas.vscodeUserData})}get argvResource(){return(0,p.joinPath)(this.userRoamingDataHome,"argv.json")}get cacheHome(){return(0,p.joinPath)(this.userRoamingDataHome,"caches")}get workspaceStorageHome(){return(0,p.joinPath)(this.userRoamingDataHome,"workspaceStorage")}get localHistoryHome(){return(0,p.joinPath)(this.userRoamingDataHome,"History")}get stateResource(){return(0,p.joinPath)(this.userRoamingDataHome,"State","storage.json")}get userDataSyncHome(){return(0,p.joinPath)(this.userRoamingDataHome,"sync",this.workspaceId)}get userDataSyncLogResource(){return(0,p.joinPath)(this.logsHome,"userDataSync.log")}get editSessionsLogResource(){return(0,p.joinPath)(this.logsHome,"editSessions.log")}get remoteTunnelLogResource(){return(0,p.joinPath)(this.logsHome,"remoteTunnel.log")}get sync(){}get keyboardLayoutResource(){return(0,p.joinPath)(this.userRoamingDataHome,"keyboardLayout.json")}get untitledWorkspacesHome(){return(0,p.joinPath)(this.userRoamingDataHome,"Workspaces")}get serviceMachineIdResource(){return(0,p.joinPath)(this.userRoamingDataHome,"machineid")}get extHostLogsPath(){return(0,p.joinPath)(this.logsHome,"exthost")}get extHostTelemetryLogFile(){return(0,p.joinPath)(this.extHostLogsPath,"extensionTelemetry.log")}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 enableSmokeTestDriver(){return this.options.developmentOptions?.enableSmokeTestDriver}get disableExtensions(){return this.payload?.get("disableExtensions")==="true"}get enableExtensions(){return this.options.enabledExtensions}get webviewExternalEndpoint(){const f=this.options.webviewEndpoint||this.productService.webviewContentExternalBaseUrlTemplate||"https://{{uuid}}.vscode-cdn.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/",c=this.payload?.get("webviewExternalEndpointCommit");return f.replace("{{commit}}",c??this.productService.commit??"ef65ac1ba57f57f2a3961bfe94aa20481caca4c6").replace("{{quality}}",(c?"insider":this.productService.quality)??"insider")}get telemetryLogResource(){return(0,p.joinPath)(this.logsHome,"telemetry.log")}get extensionTelemetryLogResource(){return(0,p.joinPath)(this.logsHome,"extensionTelemetry.log")}get disableTelemetry(){return!1}get verbose(){return this.payload?.get("verbose")==="true"}get logExtensionHostCommunication(){return this.payload?.get("logExtensionHostCommunication")==="true"}get skipReleaseNotes(){return this.payload?.get("skipReleaseNotes")==="true"}get skipWelcome(){return this.payload?.get("skipWelcome")==="true"}get disableWorkspaceTrust(){return!this.options.enableWorkspaceTrust}get lastActiveProfile(){return this.payload?.get("lastActiveProfile")}constructor(f,c,l,s){if(this.workspaceId=f,this.logsHome=c,this.options=l,this.productService=s,this.extensionHostDebugEnvironment=void 0,this.editSessionId=this.options.editSessionId,l.workspaceProvider&&Array.isArray(l.workspaceProvider.payload))try{this.payload=new Map(l.workspaceProvider.payload)}catch(d){(0,E.onUnexpectedError)(d)}}resolveExtensionHostDebugEnvironment(){const f={params:{port:null,break:!1},debugRenderer:!1,isExtensionDevelopment:!1,extensionDevelopmentLocationURI:void 0,extensionDevelopmentKind:void 0};if(this.payload)for(const[l,s]of this.payload)switch(l){case"extensionDevelopmentPath":f.extensionDevelopmentLocationURI||(f.extensionDevelopmentLocationURI=[]),f.extensionDevelopmentLocationURI.push(R.URI.parse(s)),f.isExtensionDevelopment=!0;break;case"extensionDevelopmentKind":f.extensionDevelopmentKind=[s];break;case"extensionTestsPath":f.extensionTestsLocationURI=R.URI.parse(s);break;case"debugRenderer":f.debugRenderer=s==="true";break;case"debugId":f.params.debugId=s;break;case"inspect-brk-extensions":f.params.port=parseInt(s),f.params.break=!0;break;case"inspect-extensions":f.params.port=parseInt(s);break;case"enableProposedApi":f.extensionEnabledProposedApi=[];break}const c=this.options.developmentOptions;return c&&!f.isExtensionDevelopment&&(c.extensions?.length&&(f.extensionDevelopmentLocationURI=c.extensions.map(l=>R.URI.revive(l)),f.isExtensionDevelopment=!0),c.extensionTestsPath&&(f.extensionTestsLocationURI=R.URI.revive(c.extensionTestsPath))),f}get filesToOpenOrCreate(){if(this.payload){const f=this.payload.get("openFile");if(f){const c=R.URI.parse(f);if(this.payload.has("gotoLineMode")){const l=(0,I.parseLineAndColumnAware)(c.path);return[{fileUri:c.with({path:l.path}),options:{selection:(0,S.isUndefined)(l.line)?void 0:{startLineNumber:l.line,startColumn:l.column||1}}}]}return[{fileUri:c}]}}}get filesToDiff(){if(this.payload){const f=this.payload.get("diffFilePrimary"),c=this.payload.get("diffFileSecondary");if(f&&c)return[{fileUri:R.URI.parse(c)},{fileUri:R.URI.parse(f)}]}}get filesToMerge(){if(this.payload){const f=this.payload.get("mergeFile1"),c=this.payload.get("mergeFile2"),l=this.payload.get("mergeFileBase"),s=this.payload.get("mergeFileResult");if(f&&c&&l&&s)return[{fileUri:R.URI.parse(f)},{fileUri:R.URI.parse(c)},{fileUri:R.URI.parse(l)},{fileUri:R.URI.parse(s)}]}}}we([k.memoize],u.prototype,"remoteAuthority",null),we([k.memoize],u.prototype,"isBuilt",null),we([k.memoize],u.prototype,"logsPath",null),we([k.memoize],u.prototype,"logLevel",null),we([k.memoize],u.prototype,"windowLogsPath",null),we([k.memoize],u.prototype,"logFile",null),we([k.memoize],u.prototype,"userRoamingDataHome",null),we([k.memoize],u.prototype,"argvResource",null),we([k.memoize],u.prototype,"cacheHome",null),we([k.memoize],u.prototype,"workspaceStorageHome",null),we([k.memoize],u.prototype,"localHistoryHome",null),we([k.memoize],u.prototype,"stateResource",null),we([k.memoize],u.prototype,"userDataSyncHome",null),we([k.memoize],u.prototype,"userDataSyncLogResource",null),we([k.memoize],u.prototype,"editSessionsLogResource",null),we([k.memoize],u.prototype,"remoteTunnelLogResource",null),we([k.memoize],u.prototype,"sync",null),we([k.memoize],u.prototype,"keyboardLayoutResource",null),we([k.memoize],u.prototype,"untitledWorkspacesHome",null),we([k.memoize],u.prototype,"serviceMachineIdResource",null),we([k.memoize],u.prototype,"extHostLogsPath",null),we([k.memoize],u.prototype,"extHostTelemetryLogFile",null),we([k.memoize],u.prototype,"debugExtensionHost",null),we([k.memoize],u.prototype,"isExtensionDevelopment",null),we([k.memoize],u.prototype,"extensionDevelopmentLocationURI",null),we([k.memoize],u.prototype,"extensionDevelopmentLocationKind",null),we([k.memoize],u.prototype,"extensionTestsLocationURI",null),we([k.memoize],u.prototype,"extensionEnabledProposedApi",null),we([k.memoize],u.prototype,"debugRenderer",null),we([k.memoize],u.prototype,"enableSmokeTestDriver",null),we([k.memoize],u.prototype,"disableExtensions",null),we([k.memoize],u.prototype,"enableExtensions",null),we([k.memoize],u.prototype,"webviewExternalEndpoint",null),we([k.memoize],u.prototype,"telemetryLogResource",null),we([k.memoize],u.prototype,"disableTelemetry",null),we([k.memoize],u.prototype,"verbose",null),we([k.memoize],u.prototype,"logExtensionHostCommunication",null),we([k.memoize],u.prototype,"skipReleaseNotes",null),we([k.memoize],u.prototype,"skipWelcome",null),we([k.memoize],u.prototype,"disableWorkspaceTrust",null),we([k.memoize],u.prototype,"lastActiveProfile",null),we([k.memoize],u.prototype,"filesToOpenOrCreate",null),we([k.memoize],u.prototype,"filesToDiff",null),we([k.memoize],u.prototype,"filesToMerge",null),e.BrowserWorkbenchEnvironmentService=u}),define(ae[2476],le([1,0,1520,18,8,24,2,43,248,34,14,28,5,130,49,6,11,46,22,13,227]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowTitle=void 0;var a;(function(g){g.titleSeparator="window.titleSeparator",g.title="window.title"})(a||(a={}));let o=class Un extends k.Disposable{constructor(h,v,m,w,D,y,T){super(),this.configurationService=h,this.editorService=v,this.environmentService=m,this.contextService=w,this.instantiationService=D,this.labelService=y,this.productService=T,this.properties={isPure:!0,isAdmin:!1,prefix:void 0},this.activeEditorListeners=this._register(new k.DisposableStore),this.titleUpdater=this._register(new c.RunOnceScheduler(()=>this.doUpdateTitle(),0)),this.onDidChangeEmitter=new f.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.registerListeners()}get value(){return this.title??""}get workspaceName(){return this.labelService.getWorkspaceLabel(this.contextService.getWorkspace())}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(h=>this.onConfigurationChanged(h))),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()))}onConfigurationChanged(h){(h.affectsConfiguration("window.title")||h.affectsConfiguration("window.titleSeparator"))&&this.titleUpdater.schedule()}onActiveEditorChange(){this.activeEditorListeners.clear(),this.titleUpdater.schedule();const h=this.editorService.activeEditor;h&&(this.activeEditorListeners.add(h.onDidChangeDirty(()=>this.titleUpdater.schedule())),this.activeEditorListeners.add(h.onDidChangeLabel(()=>this.titleUpdater.schedule())))}doUpdateTitle(){const h=this.getFullWindowTitle();if(h!==this.title){let v=h;(0,C.trim)(v)||(v=this.productService.nameLong),window.document.title=v,this.title=h,this.onDidChangeEmitter.fire()}}getFullWindowTitle(){let h=this.getWindowTitle()||this.productService.nameLong;const{prefix:v,suffix:m}=this.getTitleDecorations();return v&&(h=`${v} ${h}`),m&&(h=`${h} ${m}`),h=h.replace(/[^\S ]/g," "),h}getTitleDecorations(){let h,v;return this.properties.prefix&&(h=this.properties.prefix),this.environmentService.isExtensionDevelopment&&(h=h?`${Un.NLS_EXTENSION_HOST} - ${h}`:Un.NLS_EXTENSION_HOST),this.properties.isAdmin&&(v=Un.NLS_USER_IS_ADMIN),{prefix:h,suffix:v}}updateProperties(h){const v=typeof h.isAdmin=="boolean"?h.isAdmin:this.properties.isAdmin,m=typeof h.isPure=="boolean"?h.isPure:this.properties.isPure,w=typeof h.prefix=="string"?h.prefix:this.properties.prefix;(v!==this.properties.isAdmin||m!==this.properties.isPure||w!==this.properties.prefix)&&(this.properties.isAdmin=v,this.properties.isPure=m,this.properties.prefix=w,this.titleUpdater.schedule())}getWindowTitle(){const h=this.editorService.activeEditor,v=this.contextService.getWorkspace();let m;v.configuration?m=v.configuration:v.folders.length&&(m=v.folders[0].uri);const w=E.EditorResourceAccessor.getOriginalUri(h,{supportSideBySide:E.SideBySideEditor.PRIMARY});let D=w?(0,p.dirname)(w):void 0;D?.path==="."&&(D=void 0);let y;this.contextService.getWorkbenchState()===2?y=v.folders[0]:w&&(y=(0,d.withNullAsUndefined)(this.contextService.getWorkspaceFolder(w)));let T;if(this.environmentService.remoteAuthority&&!S.isWeb)T=this.labelService.getHostLabel(s.Schemas.vscodeRemote,this.environmentService.remoteAuthority);else{const q=(0,n.getVirtualWorkspaceLocation)(v);q&&(T=this.labelService.getHostLabel(q.scheme,q.authority))}const _=h?h.getTitle(0):"",L=h?h.getTitle(1):_,M=h?h.getTitle(2):L,O=D?(0,p.basename)(D):"",N=D?this.labelService.getUriLabel(D,{relative:!0}):"",P=D?this.labelService.getUriLabel(D):"",B=this.labelService.getWorkspaceLabel(v),V=m?this.labelService.getUriLabel(m):"",z=y?y.name:"",x=y?this.labelService.getUriLabel(y.uri):"",H=h?.isDirty()&&!h.isSaving()?Un.TITLE_DIRTY:"",W=this.productService.nameLong,U=this.configurationService.getValue("window.titleSeparator"),$=this.configurationService.getValue("window.title");return(0,u.template)($,{activeEditorShort:_,activeEditorLong:M,activeEditorMedium:L,activeFolderShort:O,activeFolderMedium:N,activeFolderLong:P,rootName:B,rootPath:V,folderName:z,folderPath:x,dirty:H,appName:W,remoteName:T,separator:{label:U}})}isCustomTitleFormat(){const h=this.configurationService.inspect("window.title"),v=this.configurationService.inspect("window.titleSeparator");return h.value!==h.defaultValue||v.value!==v.defaultValue}};o.NLS_USER_IS_ADMIN=S.isWindows?(0,t.localize)(0,null):(0,t.localize)(1,null),o.NLS_EXTENSION_HOST=(0,t.localize)(2,null),o.TITLE_DIRTY="\u25CF ",o=we([F(0,R.IConfigurationService),F(1,A.IEditorService),F(2,I.IBrowserWorkbenchEnvironmentService),F(3,b.IWorkspaceContextService),F(4,r.IInstantiationService),F(5,i.ILabelService),F(6,l.IProductService)],o),e.WindowTitle=o}),define(ae[2477],le([1,0,2,41,248]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriResolverContribution=void 0;let A=class extends t.Disposable{constructor(E,I){super(),I.options&&I.options.resolveExternalUri&&this._register(E.registerExternalUriResolver({resolveExternalUri:async b=>({resolved:await I.options.resolveExternalUri(b),dispose:()=>{}})}))}};A=we([F(0,p.IOpenerService),F(1,R.IBrowserWorkbenchEnvironmentService)],A),e.ExternalUriResolverContribution=A}),define(ae[51],le([1,0,5,81]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchEnvironmentService=void 0,e.IWorkbenchEnvironmentService=(0,t.refineServiceDecorator)(p.IEnvironmentService)}),define(ae[2478],le([1,0,1632,13,87,8,217,909,114,9,22,246,213,51,7]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Debugger=void 0;let f=class{constructor(l,s,d,n,a,o,g,h,v){this.adapterManager=l,this.configurationService=n,this.resourcePropertiesService=a,this.configurationResolverService=o,this.environmentService=g,this.debugService=h,this.contextKeyService=v,this.mergedExtensionDescriptions=[],this.debuggerContribution={type:s.type},this.merge(s,d),this.debuggerWhen=typeof this.debuggerContribution.when=="string"?i.ContextKeyExpr.deserialize(this.debuggerContribution.when):void 0}merge(l,s){function d(n,a,o,g=0){return(0,p.isObject)(n)?((0,p.isObject)(a)&&Object.keys(a).forEach(h=>{h!=="__proto__"&&((0,p.isObject)(n[h])&&(0,p.isObject)(a[h])?d(n[h],a[h],o,g+1):h in n?o&&(g===0&&h==="type"||(n[h]=a[h])):n[h]=a[h])}),n):a}this.mergedExtensionDescriptions.indexOf(s)<0&&(this.mergedExtensionDescriptions.push(s),d(this.debuggerContribution,l,s.isBuiltin),(0,C.isDebuggerMainContribution)(l)&&(this.mainExtensionDescription=s))}async startDebugging(l,s){const d=this.debugService.getModel().getSession(s);return await this.debugService.startDebugging(void 0,l,{parentSession:d},void 0)}async createDebugAdapter(l){await this.adapterManager.activateDebuggers("onDebugAdapterProtocolTracker",this.type);const s=this.adapterManager.createDebugAdapter(l);if(s)return Promise.resolve(s);throw new Error(t.localize(0,null,this.type))}async substituteVariables(l,s){const d=await this.adapterManager.substituteVariables(this.type,l,s);return await this.configurationResolverService.resolveWithInteractionReplace(l,d,"launch",this.variables,d.__configurationTarget)}runInTerminal(l,s){return this.adapterManager.runInTerminal(this.type,l,s)}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)}get strings(){return this.debuggerContribution.strings??this.debuggerContribution.uiMessages}interestedInLanguage(l){return!!(this.languages&&this.languages.indexOf(l)>=0)}hasInitialConfiguration(){return!!this.debuggerContribution.initialConfigurations}hasConfigurationProvider(){return this.debugService.getConfigurationManager().hasDebugConfigurationProvider(this.type)}getInitialConfigurationContent(l){let s=this.debuggerContribution.initialConfigurations||[];l&&(s=s.concat(l));const d=this.resourcePropertiesService.getEOL(b.URI.from({scheme:S.Schemas.untitled,path:"1"}))===`\r `?`\r `:` `,n=JSON.stringify(s,null," ").split(` `).map(m=>" "+m).join(d).trim(),a=t.localize(1,null),o=t.localize(2,null),g=t.localize(3,null,"https://go.microsoft.com/fwlink/?linkid=830387");let h=["{",` // ${a}`,` // ${o}`,` // ${g}`,' "version": "0.2.0",',` "configurations": ${n}`,"}"].join(d);const v=this.configurationService.getValue();return v.editor&&v.editor.insertSpaces&&(h=h.replace(new RegExp(" ","g")," ".repeat(v.editor.tabSize))),Promise.resolve(h)}getMainExtensionDescriptor(){return this.mainExtensionDescription||this.mergedExtensionDescriptions[0]}getCustomTelemetryEndpoint(){const l=this.debuggerContribution.aiKey;if(!l)return;const s=(0,r.cleanRemoteAuthority)(this.environmentService.remoteAuthority)!=="other";return{id:`${this.getMainExtensionDescriptor().publisher}.${this.type}`,aiKey:l,sendErrorTelemetry:s}}getSchemaAttributes(l){return this.debuggerContribution.configurationAttributes?Object.keys(this.debuggerContribution.configurationAttributes).map(s=>{const d=`${this.type}:${s}`,n=this.debuggerContribution.configurationAttributes[s],a=["name","type","request"];n.required=n.required&&n.required.length?a.concat(n.required):a,n.additionalProperties=!1,n.type="object",n.properties||(n.properties={});const o=n.properties;o.type={enum:[this.type],enumDescriptions:[this.label],description:t.localize(4,null),pattern:"^(?!node2)",deprecationMessage:this.debuggerContribution.deprecated||(this.enabled?void 0:(0,R.debuggerDisabledMessage)(this.type)),doNotSuggest:!!this.debuggerContribution.deprecated,errorMessage:t.localize(5,null),patternErrorMessage:t.localize(6,null)},o.request={enum:[s],description:t.localize(7,null)};for(const h in l.common.properties)o[h]={$ref:`#/definitions/common/properties/${h}`};Object.keys(o).forEach(h=>{E.applyDeprecatedVariableMessage(o[h])}),l[d]={...n};const g={...n};return g.properties={...o,windows:{$ref:`#/definitions/${d}`,description:t.localize(8,null),required:[]},osx:{$ref:`#/definitions/${d}`,description:t.localize(9,null),required:[]},linux:{$ref:`#/definitions/${d}`,description:t.localize(10,null),required:[]}},g}):null}};f=we([F(3,A.IConfigurationService),F(4,I.ITextResourcePropertiesService),F(5,k.IConfigurationResolverService),F(6,u.IWorkbenchEnvironmentService),F(7,R.IDebugService),F(8,i.IContextKeyService)],f),e.Debugger=f}),define(ae[918],le([1,0,86,10,11,56,32,6,2,22,9,72,1958,111,15,8,37,19,5,25,26,148,27,225,2230,845,631,2425,202,2427,51]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewElement=void 0;var _;(function(N){N.onmessage="onmessage",N.didClickLink="did-click-link",N.didScroll="did-scroll",N.didFocus="did-focus",N.didBlur="did-blur",N.didLoad="did-load",N.didFind="did-find",N.doUpdateState="do-update-state",N.doReload="do-reload",N.setConfirmBeforeClose="set-confirm-before-close",N.loadResource="load-resource",N.loadLocalhost="load-localhost",N.webviewReady="webview-ready",N.wheel="did-scroll-wheel",N.fatalError="fatal-error",N.noCspFound="no-csp-found",N.didKeydown="did-keydown",N.didKeyup="did-keyup",N.didContextMenu="did-context-menu",N.dragStart="drag-start"})(_||(_={}));var L;(function(N){let P;(function(V){V[V.Initializing=0]="Initializing",V[V.Ready=1]="Ready"})(P=N.Type||(N.Type={}));class B{constructor(z){this.pendingMessages=z,this.type=0}}N.Initializing=B,N.Ready={type:1}})(L||(L={}));const M="webviewId";let O=class extends I.Disposable{get platform(){return"browser"}get element(){return this._element}get isFocused(){return!(!this._focused||document.activeElement&&document.activeElement!==this.element)}constructor(P,B,V,z,x,H,W,U,$,q,X,G,Q,j){super(),this.webviewThemeDataProvider=B,this._environmentService=W,this._fileService=U,this._logService=$,this._remoteAuthorityResolverService=q,this._telemetryService=X,this._tunnelService=G,this._accessibilityService=j,this._expectedServiceWorkerVersion=4,this._state=new L.Initializing([]),this._resourceLoadingCts=this._register(new k.CancellationTokenSource),this._focusDelayer=this._register(new R.ThrottledDelayer(50)),this._onDidHtmlChange=this._register(new E.Emitter),this.onDidHtmlChange=this._onDidHtmlChange.event,this._messageHandlers=new Map,this.checkImeCompletionState=!0,this._disposed=!1,this._onMissingCsp=this._register(new E.Emitter),this.onMissingCsp=this._onMissingCsp.event,this._onDidClickLink=this._register(new E.Emitter),this.onDidClickLink=this._onDidClickLink.event,this._onDidReload=this._register(new E.Emitter),this.onDidReload=this._onDidReload.event,this._onMessage=this._register(new E.Emitter),this.onMessage=this._onMessage.event,this._onDidScroll=this._register(new E.Emitter),this.onDidScroll=this._onDidScroll.event,this._onDidWheel=this._register(new E.Emitter),this.onDidWheel=this._onDidWheel.event,this._onDidUpdateState=this._register(new E.Emitter),this.onDidUpdateState=this._onDidUpdateState.event,this._onDidFocus=this._register(new E.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new E.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidDispose=this._register(new E.Emitter),this.onDidDispose=this._onDidDispose.event,this._hasAlertedAboutMissingCsp=!1,this._hasFindResult=this._register(new E.Emitter),this.hasFindResult=this._hasFindResult.event,this._onDidStopFind=this._register(new E.Emitter),this.onDidStopFind=this._onDidStopFind.event,this.id=P.id,this.providedViewType=P.providedViewType,this.iframeId=(0,C.generateUuid)(),this.origin=P.origin??this.iframeId,this.encodedWebviewOriginPromise=(0,v.parentOriginHash)(window.origin,this.origin).then(Y=>this.encodedWebviewOrigin=Y),this.options=P.options,this.extension=P.extension,this.content={html:"",options:P.contentOptions,state:void 0},this._portMappingManager=this._register(new h.WebviewPortMappingManager(()=>this.extension?.location,()=>this.content.options.portMapping||[],this._tunnelService)),this._element=this.createElement(P.options,P.contentOptions);const K=this._register((0,p.addDisposableListener)(window,"message",Y=>{if(!(!this.encodedWebviewOrigin||Y?.data?.target!==this.iframeId)){if(Y.origin!==this.webviewContentOrigin(this.encodedWebviewOrigin)){console.log(`Skipped renderer receiving message due to mismatched origins: ${Y.origin} ${this.webviewContentOrigin}`);return}if(Y.data.channel==="webview-ready"){if(this.messagePort)return;this._logService.debug(`Webview(${this.id}): webview ready`),this.messagePort=Y.ports[0],this.messagePort.onmessage=ee=>{const ie=this._messageHandlers.get(ee.data.channel);if(!ie){console.log(`No handlers found for '${ee.data.channel}'`);return}ie?.forEach(re=>re(ee.data.data,ee))},this.element?.classList.add("ready"),this._state.type===0&&this._state.pendingMessages.forEach(({channel:ee,data:ie})=>this.doPostMessage(ee,ie)),this._state=L.Ready,K.dispose()}}}));this._register(this.on("no-csp-found",()=>{this.handleNoCspFound()})),this._register(this.on("did-click-link",Y=>{this._onDidClickLink.fire(Y)})),this._register(this.on("onmessage",Y=>{this._onMessage.fire({message:Y.message,transfer:Y.transfer})})),this._register(this.on("did-scroll",Y=>{this._onDidScroll.fire({scrollYPercentage:Y})})),this._register(this.on("do-reload",()=>{this.reload()})),this._register(this.on("do-update-state",Y=>{this.state=Y,this._onDidUpdateState.fire(Y)})),this._register(this.on("did-focus",()=>{this.handleFocusChange(!0)})),this._register(this.on("did-blur",()=>{this.handleFocusChange(!1)})),this._register(this.on("did-scroll-wheel",Y=>{this._onDidWheel.fire(Y)})),this._register(this.on("did-find",Y=>{this._hasFindResult.fire(Y)})),this._register(this.on("fatal-error",Y=>{H.error((0,r.localize)(0,null,Y.message))})),this._register(this.on("did-keydown",Y=>{this.handleKeyEvent("keydown",Y)})),this._register(this.on("did-keyup",Y=>{this.handleKeyEvent("keyup",Y)})),this._register(this.on("did-context-menu",Y=>{if(!this.element||!this._contextKeyService)return;const ee=this.element.getBoundingClientRect(),ie=this._contextKeyService.createOverlay([...Object.entries(Y.context),[M,this.providedViewType]]);z.showContextMenu({menuId:i.MenuId.WebviewContext,menuActionOptions:{shouldForwardArgs:!0},contextKeyService:ie,getActionsContext:()=>({...Y.context,webview:this.providedViewType}),getAnchor:()=>({x:ee.x+Y.clientX,y:ee.y+Y.clientY})})})),this._register(this.on("load-resource",async Y=>{try{const ee=(0,m.decodeAuthority)(Y.authority),ie=S.URI.from({scheme:Y.scheme,authority:ee,path:decodeURIComponent(Y.path),query:Y.query?decodeURIComponent(Y.query):Y.query});this.loadResource(Y.id,ie,Y.ifNoneMatch)}catch{this._send("did-load-resource",{id:Y.id,status:404,path:Y.path})}})),this._register(this.on("load-localhost",Y=>{this.localLocalhost(Y.id,Y.origin)})),this._register(E.Event.runAndSubscribe(B.onThemeDataChanged,()=>this.style())),this._register(j.onDidChangeReducedMotion(()=>this.style())),this._register(j.onDidChangeScreenReaderOptimized(()=>this.style())),this._confirmBeforeClose=V.getValue("window.confirmBeforeClose"),this._register(V.onDidChangeConfiguration(Y=>{Y.affectsConfiguration("window.confirmBeforeClose")&&(this._confirmBeforeClose=V.getValue("window.confirmBeforeClose"),this._send("set-confirm-before-close",this._confirmBeforeClose))})),this._register(this.on("drag-start",()=>{this.startBlockingIframeDragEvents()})),P.options.enableFindWidget&&(this._webviewFindWidget=this._register(Q.createInstance(y.WebviewFindWidget,this)),this.styledFindWidget()),this.encodedWebviewOriginPromise.then(Y=>{this._disposed||this.initElement(Y,this.extension,this.options)})}dispose(){if(this._disposed=!0,this.element?.remove(),this._element=void 0,this.messagePort=void 0,this._state.type===0){for(const P of this._state.pendingMessages)P.resolve(!1);this._state.pendingMessages=[]}this._onDidDispose.fire(),this._resourceLoadingCts.dispose(!0),super.dispose()}setContextKeyService(P){this._contextKeyService=P}postMessage(P,B){return this._send("message",{message:P,transfer:B})}async _send(P,B,V=[]){if(this._state.type===0){let z;const x=new Promise(H=>z=H);return this._state.pendingMessages.push({channel:P,data:B,transferable:V,resolve:z}),x}else return this.doPostMessage(P,B,V)}createElement(P,B){const V=document.createElement("iframe");V.name=this.id,V.className=`webview ${P.customClasses||""}`,V.sandbox.add("allow-scripts","allow-same-origin","allow-forms","allow-pointer-lock","allow-downloads");const z=["cross-origin-isolated;"];return t.isFirefox||(z.push("clipboard-read;","clipboard-write;"),V.setAttribute("allow","clipboard-read; clipboard-write; cross-origin-isolated;")),V.setAttribute("allow",z.join(" ")),V.style.border="none",V.style.width="100%",V.style.height="100%",V.focus=()=>{this.doFocus()},V}initElement(P,B,V){const z={id:this.iframeId,origin:this.origin,swVersion:String(this._expectedServiceWorkerVersion),extensionId:B?.id.value??"",platform:this.platform,"vscode-resource-base-authority":m.webviewRootResourceAuthority,parentOrigin:window.origin};this._environmentService.remoteAuthority&&(z.remoteAuthority=this._environmentService.remoteAuthority),V.purpose&&(z.purpose=V.purpose),b.COI.addSearchParam(z,!0,!0);const x=new URLSearchParams(z).toString(),H=t.isFirefox?"index-no-csp.html":"index.html";this.element.setAttribute("src",`${this.webviewContentEndpoint(P)}/${H}?${x}`)}mountTo(P){if(!!this.element){this._webviewFindWidget&&P.appendChild(this._webviewFindWidget.getDomNode());for(const B of[p.EventType.MOUSE_DOWN,p.EventType.MOUSE_MOVE,p.EventType.DROP])this._register((0,p.addDisposableListener)(P,B,()=>{this.stopBlockingIframeDragEvents()}));for(const B of[P,window])this._register((0,p.addDisposableListener)(B,p.EventType.DRAG_END,()=>{this.stopBlockingIframeDragEvents()}));P.appendChild(this.element)}}startBlockingIframeDragEvents(){this.element&&(this.element.style.pointerEvents="none")}stopBlockingIframeDragEvents(){this.element&&(this.element.style.pointerEvents="auto")}webviewContentEndpoint(P){const B=this._environmentService.webviewExternalEndpoint;if(!B)throw new Error("'webviewExternalEndpoint' has not been configured. Webviews will not work!");const V=B.replace("{{uuid}}",P);return V[V.length-1]==="/"?V.slice(0,V.length-1):V}webviewContentOrigin(P){const B=S.URI.parse(this.webviewContentEndpoint(P));return B.scheme+"://"+B.authority.toLowerCase()}doPostMessage(P,B,V=[]){return this.element&&this.messagePort?(this.messagePort.postMessage({channel:P,args:B},V),!0):!1}on(P,B){let V=this._messageHandlers.get(P);return V||(V=new Set,this._messageHandlers.set(P,V)),V.add(B),(0,I.toDisposable)(()=>{this._messageHandlers.get(P)?.delete(B)})}handleNoCspFound(){if(!this._hasAlertedAboutMissingCsp&&(this._hasAlertedAboutMissingCsp=!0,this.extension?.id)){this._environmentService.isExtensionDevelopment&&this._onMissingCsp.fire(this.extension.id);const P={extension:this.extension.id.value};this._telemetryService.publicLog2("webviewMissingCsp",P)}}reload(){this.doUpdateContent(this.content);const P=this._register(this.on("did-load",()=>{this._onDidReload.fire(),P.dispose()}))}set html(P){this.doUpdateContent({html:P,options:this.content.options,state:this.content.state}),this._onDidHtmlChange.fire(P)}set contentOptions(P){if(this._logService.debug(`Webview(${this.id}): will update content options`),(0,D.areWebviewContentOptionsEqual)(P,this.content.options)){this._logService.debug(`Webview(${this.id}): skipping content options update`);return}this.doUpdateContent({html:this.content.html,options:P,state:this.content.state})}set localResourcesRoot(P){this.content={...this.content,options:{...this.content.options,localResourceRoots:P}}}set state(P){this.content={html:this.content.html,options:this.content.options,state:P}}set initialScrollProgress(P){this._send("initial-scroll-position",P)}doUpdateContent(P){this._logService.debug(`Webview(${this.id}): will update content`),this.content=P;const B=!!this.content.options.allowScripts;this._send("content",{contents:this.content.html,options:{allowMultipleAPIAcquire:!!this.content.options.allowMultipleAPIAcquire,allowScripts:B,allowForms:this.content.options.allowForms??B},state:this.content.state,cspSource:m.webviewGenericCspSource,confirmBeforeClose:this._confirmBeforeClose})}style(){let{styles:P,activeTheme:B,themeLabel:V,themeId:z}=this.webviewThemeDataProvider.getWebviewThemeData();this.options.transformCssVariables&&(P=this.options.transformCssVariables(P));const x=this._accessibilityService.isMotionReduced(),H=this._accessibilityService.isScreenReaderOptimized();this._send("styles",{styles:P,activeTheme:B,themeId:z,themeLabel:V,reduceMotion:x,screenReader:H}),this.styledFindWidget()}styledFindWidget(){this._webviewFindWidget?.updateTheme(this.webviewThemeDataProvider.getTheme())}handleFocusChange(P){this._focused=P,P?this._onDidFocus.fire():this._onDidBlur.fire()}handleKeyEvent(P,B){const V=new KeyboardEvent(P,B);Object.defineProperty(V,"target",{get:()=>this.element}),window.dispatchEvent(V)}windowDidDragStart(){this.startBlockingIframeDragEvents()}windowDidDragEnd(){this.stopBlockingIframeDragEvents()}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(P){this.element&&this._send("execCommand",P)}async loadResource(P,B,V){try{const z=await(0,w.loadLocalResource)(B,{ifNoneMatch:V,roots:this.content.options.localResourceRoots||[]},this._fileService,this._logService,this._resourceLoadingCts.token);switch(z.type){case w.WebviewResourceResponse.Type.Success:{const x=await this.streamToBuffer(z.stream);return this._send("did-load-resource",{id:P,status:200,path:B.path,mime:z.mimeType,data:x,etag:z.etag,mtime:z.mtime},[x])}case w.WebviewResourceResponse.Type.NotModified:return this._send("did-load-resource",{id:P,status:304,path:B.path,mime:z.mimeType,mtime:z.mtime});case w.WebviewResourceResponse.Type.AccessDenied:return this._send("did-load-resource",{id:P,status:401,path:B.path})}}catch{}return this._send("did-load-resource",{id:P,status:404,path:B.path})}async streamToBuffer(P){return(await(0,A.streamToBuffer)(P)).buffer.buffer}async localLocalhost(P,B){const V=this._environmentService.remoteAuthority,z=V?await this._remoteAuthorityResolverService.resolveAuthority(V):void 0,x=z?await this._portMappingManager.getRedirect(z.authority,B):void 0;return this._send("did-load-localhost",{id:P,origin:B,location:x})}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(P,B){!this.element||this._send("find",{value:P,previous:B})}updateFind(P){!P||!this.element||this._send("find",{value:P})}stopFind(P){!this.element||(this._send("find-stop",{keepSelection:P}),this._onDidStopFind.fire())}showFind(P=!0){this._webviewFindWidget?.reveal(void 0,P)}hideFind(P=!0){this._webviewFindWidget?.hide(P)}runFindAction(P){this._webviewFindWidget?.find(P)}};O=we([F(2,f.IConfigurationService),F(3,c.IContextMenuService),F(4,i.IMenuService),F(5,n.INotificationService),F(6,T.IWorkbenchEnvironmentService),F(7,l.IFileService),F(8,d.ILogService),F(9,a.IRemoteAuthorityResolverService),F(10,o.ITelemetryService),F(11,g.ITunnelService),F(12,s.IInstantiationService),F(13,u.IAccessibilityService)],O),e.WebviewElement=O}),define(ae[2479],le([1,0,11,22,219,183,111,15,8,37,19,5,102,25,89,26,148,27,225,918,2429,51]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronWebviewElement=void 0;let o=class extends d.WebviewElement{get platform(){return"electron"}constructor(h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z){super(h,v,O,m,L,P,T,D,M,_,y,w,V,z),this.nativeHostService=B,this._findStarted=!1,this._iframeDelayer=this._register(new t.Delayer(200)),this._webviewKeyboardHandler=new n.WindowIgnoreMenuShortcutsManager(O,N,B),this._webviewMainService=A.ProxyChannel.toService(N.getChannel("webview")),h.options.enableFindWidget&&(this._register(this.onDidHtmlChange(x=>{this._findStarted&&this._cachedHtmlContent!==x&&(this.stopFind(!1),this._cachedHtmlContent=x)})),this._register(this._webviewMainService.onFoundInFrame(x=>{this._hasFindResult.fire(x.matches>0)})))}dispose(){this._webviewKeyboardHandler.didBlur(),super.dispose()}webviewContentEndpoint(h){return`${p.Schemas.vscodeWebview}://${h}`}streamToBuffer(h){return(0,R.consumeStream)(h,v=>{const m=v.reduce((T,_)=>T+_.byteLength,0),w=new ArrayBuffer(m),D=new Uint8Array(w);let y=0;for(const T of v)D.set(T.buffer,y),y+=T.byteLength;return w})}find(h,v){if(!!this.element)if(!this._findStarted)this.updateFind(h);else{const m={forward:!v,findNext:!1,matchCase:!1};this._webviewMainService.findInFrame({windowId:this.nativeHostService.windowId},this.id,h,m)}}updateFind(h){if(!h||!this.element)return;const v={forward:!0,findNext:!0,matchCase:!1};this._iframeDelayer.trigger(()=>{this._findStarted=!0,this._webviewMainService.findInFrame({windowId:this.nativeHostService.windowId},this.id,h,v)})}stopFind(h){!this.element||(this._iframeDelayer.cancel(),this._findStarted=!1,this._webviewMainService.stopFindInFrame({windowId:this.nativeHostService.windowId},this.id,{keepSelection:h}),this._onDidStopFind.fire())}handleFocusChange(h){super.handleFocusChange(h),h?this._webviewKeyboardHandler.didFocus():this._webviewKeyboardHandler.didBlur()}};o=we([F(2,b.IContextMenuService),F(3,s.ITunnelService),F(4,S.IFileService),F(5,l.ITelemetryService),F(6,a.IWorkbenchEnvironmentService),F(7,c.IRemoteAuthorityResolverService),F(8,E.IMenuService),F(9,u.ILogService),F(10,I.IConfigurationService),F(11,r.IMainProcessService),F(12,f.INotificationService),F(13,i.INativeHostService),F(14,C.IInstantiationService),F(15,k.IAccessibilityService)],o),e.ElectronWebviewElement=o}),define(ae[2480],le([1,0,14,51]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});function R(A){const k=t.isWeb&&!A.get(p.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=R}),define(ae[2481],le([1,0,1977,24,5,662,22,15,70,2480]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWalkThroughInputSerializer=e.EditorWalkThroughAction=void 0;const b="workbench.editors.walkThroughInput",S={typeId:b,name:(0,t.localize)(0,null),resource:k.FileAccess.asBrowserUri("./vs_code_editor_walkthrough.md",J).with({scheme:k.Schemas.walkThrough,query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeWalkthrough/browser/editor/vs_code_editor_walkthrough"})}),telemetryFrom:"walkThrough"};class C extends E.Action2{constructor(){super({id:C.ID,title:C.LABEL,category:I.Categories.Help,f1:!0})}run(i){const f=i.get(p.IEditorService),l=i.get(R.IInstantiationService).createInstance(A.WalkThroughInput,S);return f.openEditor(l,{pinned:!0}).then(()=>{})}}e.EditorWalkThroughAction=C,C.ID="workbench.action.showInteractivePlayground",C.LABEL={value:(0,t.localize)(1,null),original:"Interactive Editor Playground"};class r{canSerialize(i){return!0}serialize(i){return""}deserialize(i){return i.createInstance(A.WalkThroughInput,S)}}e.EditorWalkThroughInputSerializer=r,r.ID=b}),define(ae[2482],le([1,0,1984,89,24,15,70,51,141]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReloadWindowWithExtensionsDisabledAction=e.ToggleSharedProcessAction=e.ConfigureRuntimeArgumentsAction=e.ToggleDevToolsAction=void 0;class b 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:3111,mac:{primary:2599}},menu:{id:A.MenuId.MenubarHelpMenu,group:"5_tools",order:1}})}async run(i){return i.get(p.INativeHostService).toggleDevTools()}}e.ToggleDevToolsAction=b;class S 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 f=i.get(R.IEditorService),c=i.get(E.IWorkbenchEnvironmentService);await f.openEditor({resource:c.argvResource,options:{pinned:!0}})}}e.ConfigureRuntimeArgumentsAction=S;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(p.INativeHostService).toggleSharedProcessWindow()}}e.ToggleSharedProcessAction=C;class r 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(p.INativeHostService).reload({disableExtensions:!0})}}e.ReloadWindowWithExtensionsDisabledAction=r}),define(ae[2483],le([1,0,2,47,2276,35,51,25]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogService=void 0;let I=class extends t.Disposable{constructor(S,C){super(),this.environmentService=S,this.logService=C,this.model=this._register(new R.DialogsModel),this.onWillShowDialog=this.model.onWillShowDialog,this.onDidShowDialog=this.model.onDidShowDialog}skipDialogs(){return this.environmentService.isExtensionDevelopment&&this.environmentService.extensionTestsLocationURI?!0:!!this.environmentService.enableSmokeTestDriver}async confirm(S){return this.skipDialogs()?(this.logService.trace("DialogService: refused to show confirmation dialog in tests."),{confirmed:!0}):await this.model.show({confirmArgs:{confirmation:S}}).result}async show(S,C,r,u){if(this.skipDialogs())throw new Error("DialogService: refused to show dialog in tests.");return await this.model.show({showArgs:{severity:S,message:C,buttons:r,options:u}}).result}async input(S,C,r,u,i){if(this.skipDialogs())throw new Error("DialogService: refused to show input dialog in tests.");return await this.model.show({inputArgs:{severity:S,message:C,buttons:r,inputs:u,options:i}}).result}async about(){if(this.skipDialogs())throw new Error("DialogService: refused to show about dialog in tests.");await this.model.show({}).result}};I=we([F(0,k.IWorkbenchEnvironmentService),F(1,E.ILogService)],I),e.DialogService=I,(0,A.registerSingleton)(p.IDialogService,I,1)}),define(ae[128],le([1,0,81,5,783,112,9,22,53,18]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkbenchEnvironmentService=e.INativeWorkbenchEnvironmentService=void 0,e.INativeWorkbenchEnvironmentService=(0,p.refineServiceDecorator)(t.IEnvironmentService);class S extends R.AbstractNativeEnvironmentService{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:E.Schemas.vscodeUserData})}get windowLogsPath(){return k.URI.file((0,I.join)(this.logsPath,`window${this.configuration.windowId}`))}get logFile(){return(0,b.joinPath)(this.windowLogsPath,"renderer.log")}get extHostLogsPath(){return(0,b.joinPath)(this.windowLogsPath,"exthost")}get extHostTelemetryLogFile(){return(0,b.joinPath)(this.extHostLogsPath,"extensionTelemetry.log")}get webviewExternalEndpoint(){return`${E.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 enableSmokeTestDriver(){return!!this.args["enable-smoke-test-driver"]}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 filesToMerge(){return this.configuration.filesToMerge}get filesToWait(){return this.configuration.filesToWait}constructor(r,u){super(r,{homeDir:r.homeDir,tmpDir:r.tmpDir,userDataDir:r.userDataDir},u),this.configuration=r}}we([A.memoize],S.prototype,"mainPid",null),we([A.memoize],S.prototype,"machineId",null),we([A.memoize],S.prototype,"remoteAuthority",null),we([A.memoize],S.prototype,"execPath",null),we([A.memoize],S.prototype,"backupPath",null),we([A.memoize],S.prototype,"window",null),we([A.memoize],S.prototype,"userRoamingDataHome",null),we([A.memoize],S.prototype,"windowLogsPath",null),we([A.memoize],S.prototype,"logFile",null),we([A.memoize],S.prototype,"extHostLogsPath",null),we([A.memoize],S.prototype,"extHostTelemetryLogFile",null),we([A.memoize],S.prototype,"webviewExternalEndpoint",null),we([A.memoize],S.prototype,"skipReleaseNotes",null),we([A.memoize],S.prototype,"skipWelcome",null),we([A.memoize],S.prototype,"logExtensionHostCommunication",null),we([A.memoize],S.prototype,"enableSmokeTestDriver",null),we([A.memoize],S.prototype,"extensionEnabledProposedApi",null),we([A.memoize],S.prototype,"os",null),we([A.memoize],S.prototype,"filesToOpenOrCreate",null),we([A.memoize],S.prototype,"filesToDiff",null),we([A.memoize],S.prototype,"filesToMerge",null),we([A.memoize],S.prototype,"filesToWait",null),e.NativeWorkbenchEnvironmentService=S}),define(ae[2484],le([1,0,1672,19,9,128,89,22,15,82]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenExtensionsFolderAction=void 0;class S extends I.Action2{constructor(){super({id:"workbench.extensions.action.openExtensionsFolder",title:{value:(0,t.localize)(0,null),original:"Open Extensions Folder"},category:b.ExtensionsLocalizedLabel,f1:!0})}async run(r){const u=r.get(k.INativeHostService),i=r.get(p.IFileService),f=r.get(A.INativeWorkbenchEnvironmentService),c=R.URI.file(f.extensionsPath),l=await i.resolve(c);let s;if(l.children&&l.children.length>0?s=l.children[0].resource:s=c,s.scheme===E.Schemas.file)return u.showItemInFolder(s.fsPath)}}e.OpenExtensionsFolderAction=S}),define(ae[919],le([1,0,46,36,9,5,1674,32,172,18,47,68,41,89,128,502,19,56]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createSlowExtensionAction=e.SlowExtensionAction=void 0;class s{static fromExtension(h){let v;if(h.bugs&&typeof h.bugs.url=="string"){const m=R.URI.parse(h.bugs.url),w=/\/([^/]+)\/([^/]+)\/issues\/?$/.exec(h.bugs.url);w&&(v={base:m.with({path:null,fragment:null,query:null}).toString(!0),owner:w[1],repo:w[2]})}if(!v&&h.repository&&typeof h.repository.url=="string"){const m=R.URI.parse(h.repository.url),w=/\/([^/]+)\/([^/]+)(\.git)?$/.exec(h.repository.url);w&&(v={base:m.with({path:null,fragment:null,query:null}).toString(!0),owner:w[1],repo:w[2]})}return v&&v.base.indexOf("github")===-1&&(v=void 0),v}}let d=class extends p.Action{constructor(h,v,m){super("report.slow",(0,k.localize)(0,null),"extension-action report-issue"),this.extension=h,this.profile=v,this._instantiationService=m,this.enabled=Boolean(s.fromExtension(h))}async run(){const h=await this._instantiationService.invokeFunction(n,this.extension,this.profile);h&&await h.run()}};d=we([F(2,A.IInstantiationService)],d),e.SlowExtensionAction=d;async function n(g,h,v){const m=s.fromExtension(h);if(!m)return;const w=g.get(I.IRequestService),D=g.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 w.request({url:y},E.CancellationToken.None),_=await(0,I.asText)(T);if(!_)return;const L=JSON.parse(_);if(!(!L||typeof L.total_count!="number"))return L.total_count===0?D.createInstance(a,h,m,v):D.createInstance(o,h,m,v)}e.createSlowExtensionAction=n;let a=class extends p.Action{constructor(h,v,m,w,D,y,T,_,L){super("report.slow",(0,k.localize)(1,null)),this.extension=h,this.repoInfo=v,this.profile=m,this._dialogService=w,this._openerService=D,this._productService=y,this._nativeHostService=T,this._environmentService=_,this._fileService=L}async run(){const h=f.Utils.rewriteAbsolutePaths(this.profile.data,"pii_removed"),v=(0,b.joinPath)(this._environmentService.tmpDir,`${this.extension.identifier.value}-unresponsive.cpuprofile.txt`);await this._fileService.writeFile(v,l.VSBuffer.fromString(JSON.stringify(h,void 0,4)));const m=await this._nativeHostService.getOSProperties(),w=encodeURIComponent("Extension causes high cpu load"),D=`${m.type} ${m.arch} ${m.release}`,y=`:warning: Make sure to **attach** this file from your *home*-directory: :warning:\`${v}\` 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: \`${D}\` - VS Code version: \`${this._productService.version}\` ${y}`),_=`${this.repoInfo.base}/${this.repoInfo.owner}/${this.repoInfo.repo}/issues/new/?body=${T}&title=${w}`;this._openerService.open(R.URI.parse(_)),this._dialogService.show(C.default.Info,(0,k.localize)(2,null),void 0,{detail:(0,k.localize)(3,null,v.fsPath)})}};a=we([F(3,S.IDialogService),F(4,r.IOpenerService),F(5,t.IProductService),F(6,u.INativeHostService),F(7,i.INativeWorkbenchEnvironmentService),F(8,c.IFileService)],a);let o=class extends p.Action{constructor(h,v,m,w,D,y,T){super("show.slow",(0,k.localize)(4,null)),this.extension=h,this.repoInfo=v,this.profile=m,this._dialogService=w,this._openerService=D,this._environmentService=y,this._fileService=T}async run(){const h=f.Utils.rewriteAbsolutePaths(this.profile.data,"pii_removed"),v=(0,b.joinPath)(this._environmentService.tmpDir,`${this.extension.identifier.value}-unresponsive.cpuprofile.txt`);await this._fileService.writeFile(v,l.VSBuffer.fromString(JSON.stringify(h,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(R.URI.parse(m)),this._dialogService.show(C.default.Info,(0,k.localize)(5,null),void 0,{detail:(0,k.localize)(6,null,v.fsPath)})}};o=we([F(3,S.IDialogService),F(4,r.IOpenerService),F(5,i.INativeWorkbenchEnvironmentService),F(6,c.IFileService)],o)}),define(ae[2485],le([1,0,36,53,9,1726,89,128,19]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenExtensionLogsFolderAction=e.OpenLogsFolderAction=void 0;let b=class extends t.Action{constructor(r,u,i,f){super(r,u),this.environmentService=i,this.nativeHostService=f}run(){return this.nativeHostService.showItemInFolder(R.URI.file((0,p.join)(this.environmentService.logsPath,"main.log")).fsPath)}};b.ID="workbench.action.openLogsFolder",b.TITLE={value:A.localize(0,null),original:"Open Logs Folder"},b=we([F(2,E.INativeWorkbenchEnvironmentService),F(3,k.INativeHostService)],b),e.OpenLogsFolderAction=b;let S=class extends t.Action{constructor(r,u,i,f,c){super(r,u),this.environmentSerice=i,this.fileService=f,this.nativeHostService=c}async run(){const r=await this.fileService.resolve(this.environmentSerice.extHostLogsPath);if(r.children&&r.children[0])return this.nativeHostService.showItemInFolder(r.children[0].resource.fsPath)}};S.ID="workbench.action.openExtensionLogsFolder",S.TITLE={value:A.localize(1,null),original:"Open Extension Logs Folder"},S=we([F(2,E.INativeWorkbenchEnvironmentService),F(3,I.IFileService),F(4,k.INativeHostService)],S),e.OpenExtensionLogsFolderAction=S}),define(ae[540],le([1,0,5,166,35]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShellEnvironmentService=e.IShellEnvironmentService=void 0,e.IShellEnvironmentService=(0,t.createDecorator)("shellEnvironmentService");class A{getShellEnv(){return p.process.shellEnv()}}e.ShellEnvironmentService=A,(0,R.registerSingleton)(e.IShellEnvironmentService,A,1)}),define(ae[2486],le([1,0,115,14,51,57,35,100,22,9,308,46,785,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BuiltinExtensionsScannerService=void 0;let i=class{constructor(c,l,s,d,n){if(this.extensionResourceLoaderService=s,this.logService=n,this.builtinExtensionsPromises=[],p.isWeb){const a=d.extensionsGallery?.nlsBaseUrl;a&&d.commit&&!p.Language.isDefaultVariant()&&(this.nlsUrl=b.URI.joinPath(b.URI.parse(a),d.commit,d.version,p.Language.value()));const o=I.FileAccess.asBrowserUri("../../../../../../extensions",J);if(o){let g=[];if(c.isBuilt)g=[];else{const h=document.getElementById("vscode-workbench-builtin-extensions"),v=h?h.getAttribute("data-settings"):void 0;if(v)try{g=JSON.parse(v)}catch{}}this.builtinExtensionsPromises=g.map(async h=>{const v=(0,E.getGalleryExtensionId)(h.packageJSON.publisher,h.packageJSON.name),m={};return h.browserNlsMetadataPath&&(this.nlsUrl&&(m[p.Language.value()]=l.extUri.joinPath(this.nlsUrl,v,"main")),m.en=l.extUri.resolvePath(o,h.browserNlsMetadataPath)),{identifier:{id:v},location:l.extUri.joinPath(o,h.extensionPath),type:0,isBuiltin:!0,browserNlsBundleUris:m,manifest:h.packageNLS?await this.localizeManifest(v,h.packageJSON,h.packageNLS):h.packageJSON,readmeUrl:h.readmePath?l.extUri.joinPath(o,h.readmePath):void 0,changelogUrl:h.changelogPath?l.extUri.joinPath(o,h.changelogPath):void 0,targetPlatform:"web",validations:[],isValid:!0}})}}}async scanBuiltinExtensions(){return[...await Promise.all(this.builtinExtensionsPromises)]}async localizeManifest(c,l,s){if(!this.nlsUrl)return(0,r.localizeManifest)(l,s);const d=b.URI.joinPath(this.nlsUrl,c,"package");try{const n=await this.extensionResourceLoaderService.readExtensionResource(d),a=JSON.parse(n.toString());return(0,r.localizeManifest)(l,a,s)}catch(n){return this.logService.error(n),(0,r.localizeManifest)(l,s)}}};i=we([F(0,R.IWorkbenchEnvironmentService),F(1,A.IUriIdentityService),F(2,S.IExtensionResourceLoaderService),F(3,C.IProductService),F(4,u.ILogService)],i),e.BuiltinExtensionsScannerService=i,(0,k.registerSingleton)(t.IBuiltinExtensionsScannerService,i,1)}),define(ae[120],le([1,0,5,82,22]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWebExtensionsScannerService=e.IWorkbenchExtensionEnablementService=e.EnablementState=e.IWorkbenchExtensionManagementService=e.DefaultIconPath=e.IExtensionManagementServerService=e.ExtensionInstallLocation=e.IProfileAwareExtensionManagementService=void 0,e.IProfileAwareExtensionManagementService=(0,t.refineServiceDecorator)(p.IExtensionManagementService);var A;(function(E){E[E.Local=1]="Local",E[E.Remote=2]="Remote",E[E.Web=3]="Web"})(A=e.ExtensionInstallLocation||(e.ExtensionInstallLocation={})),e.IExtensionManagementServerService=(0,t.createDecorator)("extensionManagementServerService"),e.DefaultIconPath=R.FileAccess.asBrowserUri("./media/defaultIcon.png",J).toString(!0),e.IWorkbenchExtensionManagementService=(0,t.refineServiceDecorator)(e.IProfileAwareExtensionManagementService);var k;(function(E){E[E.DisabledByTrustRequirement=0]="DisabledByTrustRequirement",E[E.DisabledByExtensionKind=1]="DisabledByExtensionKind",E[E.DisabledByEnvironment=2]="DisabledByEnvironment",E[E.EnabledByEnvironment=3]="EnabledByEnvironment",E[E.DisabledByVirtualWorkspace=4]="DisabledByVirtualWorkspace",E[E.DisabledByExtensionDependency=5]="DisabledByExtensionDependency",E[E.DisabledGlobally=6]="DisabledGlobally",E[E.DisabledWorkspace=7]="DisabledWorkspace",E[E.EnabledGlobally=8]="EnabledGlobally",E[E.EnabledWorkspace=9]="EnabledWorkspace"})(k=e.EnablementState||(e.EnablementState={})),e.IWorkbenchExtensionEnablementService=(0,t.createDecorator)("extensionEnablementService"),e.IWebExtensionsScannerService=(0,t.createDecorator)("IWebExtensionsScannerService")}),define(ae[2487],le([1,0,82,335,2121,25,120]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedExtensionsMigrationContrib=void 0;let E=class{constructor(b,S,C,r,u){b.remoteExtensionManagementServer&&(0,R.migrateUnsupportedExtensions)(b.remoteExtensionManagementServer.extensionManagementService,S,C,r,u),b.webExtensionManagementServer&&(0,R.migrateUnsupportedExtensions)(b.webExtensionManagementServer.extensionManagementService,S,C,r,u)}};E=we([F(0,k.IExtensionManagementServerService),F(1,t.IExtensionGalleryService),F(2,p.IExtensionStorageService),F(3,t.IGlobalExtensionEnablementService),F(4,A.ILogService)],E),e.UnsupportedExtensionsMigrationContrib=E}),define(ae[2488],le([1,0,285,46,1662,120]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebRecommendations=void 0;let k=class extends t.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(I,b){super(),this.productService=I,this.extensionManagementServerService=b,this._recommendations=[]}async doActivate(){this.extensionManagementServerService.webExtensionManagementServer&&!this.extensionManagementServerService.localExtensionManagementServer&&!this.extensionManagementServerService.remoteExtensionManagementServer&&Array.isArray(this.productService.webExtensionTips)&&(this._recommendations=this.productService.webExtensionTips.map(b=>({extensionId:b.toLowerCase(),reason:{reasonId:6,reasonText:(0,R.localize)(0,null,this.productService.nameLong)}})))}};k=we([F(0,p.IProductService),F(1,A.IExtensionManagementServerService)],k),e.WebRecommendations=k}),define(ae[2489],le([1,0,35,102,82,2127,19,46,172,25,22]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let C=class extends A.ExtensionTipsService{constructor(u,i,f,c,l){super(u,i,f,c),this.channel=l.getChannel("extensionTipsService")}getConfigBasedTips(u){return u.scheme===S.Schemas.file?this.channel.call("getConfigBasedTips",[u]):super.getConfigBasedTips(u)}getImportantExecutableBasedTips(){return this.channel.call("getImportantExecutableBasedTips")}getOtherExecutableBasedTips(){return this.channel.call("getOtherExecutableBasedTips")}getAllWorkspacesTips(){return this.channel.call("getAllWorkspacesTips")}};C=we([F(0,k.IFileService),F(1,E.IProductService),F(2,I.IRequestService),F(3,b.ILogService),F(4,p.ISharedProcessService)],C),(0,t.registerSingleton)(R.IExtensionTipsService,C,1)}),define(ae[2490],le([1,0,793,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerMainProcessRemoteService)(t.IExtensionUrlTrustService,"extensionUrlTrust")}),define(ae[274],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionIgnoredRecommendationsService=e.IExtensionRecommendationsService=e.ExtensionRecommendationReason=void 0;var p;(function(R){R[R.Workspace=0]="Workspace",R[R.File=1]="File",R[R.Executable=2]="Executable",R[R.WorkspaceConfig=3]="WorkspaceConfig",R[R.DynamicWorkspace=4]="DynamicWorkspace",R[R.Experimental=5]="Experimental",R[R.Application=6]="Application"})(p=e.ExtensionRecommendationReason||(e.ExtensionRecommendationReason={})),e.IExtensionRecommendationsService=(0,t.createDecorator)("extensionRecommendationsService"),e.IExtensionIgnoredRecommendationsService=(0,t.createDecorator)("IExtensionIgnoredRecommendationsService")}),define(ae[458],le([1,0,16,6,123,2,199,19,35,5,34,48,54,42,2010,272,60]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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,b.createDecorator)("IWorkspaceExtensionsConfigService");let l=class extends A.Disposable{constructor(d,n,a,o,g,h){super(),this.workspaceContextService=d,this.fileService=n,this.quickInputService=a,this.modelService=o,this.languageService=g,this.jsonEditingService=h,this._onDidChangeExtensionsConfigs=this._register(new p.Emitter),this.onDidChangeExtensionsConfigs=this._onDidChangeExtensionsConfigs.event,this._register(d.onDidChangeWorkspaceFolders(v=>this._onDidChangeExtensionsConfigs.fire())),this._register(n.onDidFilesChange(v=>{const m=d.getWorkspace();(m.configuration&&v.affects(m.configuration)||m.folders.some(w=>v.affects(w.toResource(e.EXTENSIONS_CONFIG))))&&this._onDidChangeExtensionsConfigs.fire()}))}async getExtensionsConfigs(){const d=this.workspaceContextService.getWorkspace(),n=[],a=d.configuration?await this.resolveWorkspaceExtensionConfig(d.configuration):void 0;return a&&n.push(a),n.push(...await Promise.all(d.folders.map(o=>this.resolveWorkspaceFolderExtensionConfig(o)))),n}async getRecommendations(){const d=await this.getExtensionsConfigs();return(0,t.distinct)((0,t.flatten)(d.map(n=>n.recommendations?n.recommendations.map(a=>a.toLowerCase()):[])))}async getUnwantedRecommendations(){const d=await this.getExtensionsConfigs();return(0,t.distinct)((0,t.flatten)(d.map(n=>n.unwantedRecommendations?n.unwantedRecommendations.map(a=>a.toLowerCase()):[])))}async toggleRecommendation(d){d=d.toLowerCase();const n=this.workspaceContextService.getWorkspace(),a=n.configuration?await this.resolveWorkspaceExtensionConfig(n.configuration):void 0,o=new c.ResourceMap;await Promise.all(n.folders.map(async w=>{const D=await this.resolveWorkspaceFolderExtensionConfig(w);o.set(w.uri,D)}));const g=a&&a.recommendations?.some(w=>w.toLowerCase()===d),h=n.folders.filter(w=>o.get(w.uri)?.recommendations?.some(D=>D.toLowerCase()===d)),v=g||h.length>0,m=v?await this.pickWorkspaceOrFolders(h,g?n:void 0,(0,i.localize)(0,null)):await this.pickWorkspaceOrFolders(n.folders,n.configuration?n:void 0,(0,i.localize)(1,null));for(const w of m)(0,S.isWorkspace)(w)?await this.addOrRemoveWorkspaceRecommendation(d,w,a,!v):await this.addOrRemoveWorkspaceFolderRecommendation(d,w,o.get(w.uri),!v)}async toggleUnwantedRecommendation(d){const n=this.workspaceContextService.getWorkspace(),a=n.configuration?await this.resolveWorkspaceExtensionConfig(n.configuration):void 0,o=new c.ResourceMap;await Promise.all(n.folders.map(async w=>{const D=await this.resolveWorkspaceFolderExtensionConfig(w);o.set(w.uri,D)}));const g=a&&a.unwantedRecommendations?.some(w=>w===d),h=n.folders.filter(w=>o.get(w.uri)?.unwantedRecommendations?.some(D=>D===d)),v=g||h.length>0,m=v?await this.pickWorkspaceOrFolders(h,g?n:void 0,(0,i.localize)(2,null)):await this.pickWorkspaceOrFolders(n.folders,n.configuration?n:void 0,(0,i.localize)(3,null));for(const w of m)(0,S.isWorkspace)(w)?await this.addOrRemoveWorkspaceUnwantedRecommendation(d,w,a,!v):await this.addOrRemoveWorkspaceFolderUnwantedRecommendation(d,w,o.get(w.uri),!v)}async addOrRemoveWorkspaceFolderRecommendation(d,n,a,o){const g=[];if(o?(g.push({path:["recommendations"],value:[...a.recommendations||[],d]}),a.unwantedRecommendations&&a.unwantedRecommendations.some(h=>h===d)&&g.push({path:["unwantedRecommendations"],value:a.unwantedRecommendations.filter(h=>h!==d)})):a.recommendations&&g.push({path:["recommendations"],value:a.recommendations.filter(h=>h!==d)}),g.length)return this.jsonEditingService.write(n.toResource(e.EXTENSIONS_CONFIG),g,!0)}async addOrRemoveWorkspaceRecommendation(d,n,a,o){const g=[];if(a?o?(g.push({path:["extensions","recommendations"],value:[...a.recommendations||[],d]}),a.unwantedRecommendations&&a.unwantedRecommendations.some(h=>h===d)&&g.push({path:["extensions","unwantedRecommendations"],value:a.unwantedRecommendations.filter(h=>h!==d)})):a.recommendations&&g.push({path:["extensions","recommendations"],value:a.recommendations.filter(h=>h!==d)}):o&&g.push({path:["extensions"],value:{recommendations:[d]}}),g.length)return this.jsonEditingService.write(n.configuration,g,!0)}async addOrRemoveWorkspaceFolderUnwantedRecommendation(d,n,a,o){const g=[];if(o?(g.push({path:["unwantedRecommendations"],value:[...a.unwantedRecommendations||[],d]}),a.recommendations&&a.recommendations.some(h=>h===d)&&g.push({path:["recommendations"],value:a.recommendations.filter(h=>h!==d)})):a.unwantedRecommendations&&g.push({path:["unwantedRecommendations"],value:a.unwantedRecommendations.filter(h=>h!==d)}),g.length)return this.jsonEditingService.write(n.toResource(e.EXTENSIONS_CONFIG),g,!0)}async addOrRemoveWorkspaceUnwantedRecommendation(d,n,a,o){const g=[];if(a?o?(g.push({path:["extensions","unwantedRecommendations"],value:[...a.unwantedRecommendations||[],d]}),a.recommendations&&a.recommendations.some(h=>h===d)&&g.push({path:["extensions","recommendations"],value:a.recommendations.filter(h=>h!==d)})):a.unwantedRecommendations&&g.push({path:["extensions","unwantedRecommendations"],value:a.unwantedRecommendations.filter(h=>h!==d)}):o&&g.push({path:["extensions"],value:{unwantedRecommendations:[d]}}),g.length)return this.jsonEditingService.write(n.configuration,g,!0)}async pickWorkspaceOrFolders(d,n,a){const o=n?[...d,n]:[...d];if(o.length===1)return o;const g=d.map(v=>({label:v.name,description:(0,i.localize)(4,null),workspaceOrFolder:v,iconClasses:(0,k.getIconClasses)(this.modelService,this.languageService,v.uri,E.FileKind.ROOT_FOLDER)}));return n&&(g.push({type:"separator"}),g.push({label:(0,i.localize)(5,null),workspaceOrFolder:n})),(await this.quickInputService.pick(g,{placeHolder:a,canPickMany:!0})||[]).map(v=>v.workspaceOrFolder)}async resolveWorkspaceExtensionConfig(d){try{const n=await this.fileService.readFile(d),a=(0,R.parse)(n.value.toString()).extensions;return a?this.parseExtensionConfig(a):void 0}catch{}}async resolveWorkspaceFolderExtensionConfig(d){try{const n=await this.fileService.readFile(d.toResource(e.EXTENSIONS_CONFIG)),a=(0,R.parse)(n.value.toString());return this.parseExtensionConfig(a)}catch{}return{}}parseExtensionConfig(d){return{recommendations:(0,t.distinct)((d.recommendations||[]).map(n=>n.toLowerCase())),unwantedRecommendations:(0,t.distinct)((d.unwantedRecommendations||[]).map(n=>n.toLowerCase()))}}};l=we([F(0,S.IWorkspaceContextService),F(1,E.IFileService),F(2,C.IQuickInputService),F(3,r.IModelService),F(4,u.ILanguageService),F(5,f.IJSONEditingService)],l),e.WorkspaceExtensionsConfigService=l,(0,I.registerSingleton)(e.IWorkspaceExtensionsConfigService,l,1)}),define(ae[2491],le([1,0,82,16,285,26,25,32,1663,6,458]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceRecommendations=void 0;let C=class extends R.ExtensionRecommendations{get recommendations(){return this._recommendations}get ignoredRecommendations(){return this._ignoredRecommendations}constructor(u,i,f,c){super(),this.workspaceExtensionsConfigService=u,this.galleryService=i,this.logService=f,this.notificationService=c,this._recommendations=[],this._onDidChangeRecommendations=this._register(new b.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this._ignoredRecommendations=[]}async doActivate(){await this.fetch(),this._register(this.workspaceExtensionsConfigService.onDidChangeExtensionsConfigs(()=>this.onDidChangeExtensionsConfigs()))}async fetch(){const u=await this.workspaceExtensionsConfigService.getExtensionsConfigs(),{invalidRecommendations:i,message:f}=await this.validateExtensions(u);i.length&&this.notificationService.warn(`The ${i.length} extension(s) below, in workspace recommendations have issues: ${f}`),this._recommendations=[],this._ignoredRecommendations=[];for(const c of u){if(c.unwantedRecommendations)for(const l of c.unwantedRecommendations)i.indexOf(l)===-1&&this._ignoredRecommendations.push(l);if(c.recommendations)for(const l of c.recommendations)i.indexOf(l)===-1&&this._recommendations.push({extensionId:l,reason:{reasonId:0,reasonText:(0,I.localize)(0,null)}})}}async validateExtensions(u){const i=[],f=[],c=[];let l="";const s=(0,p.distinct)((0,p.flatten)(u.map(({recommendations:n})=>n||[]))),d=new RegExp(t.EXTENSION_IDENTIFIER_PATTERN);for(const n of s)d.test(n)?c.push(n):(f.push(n),l+=`${n} (bad format) Expected: <provider>.<name> `);if(c.length)try{const a=(await this.galleryService.getExtensions(c.map(o=>({id:o})),E.CancellationToken.None)).map(o=>o.identifier.id.toLowerCase());for(const o of c)a.indexOf(o)===-1?(f.push(o),l+=`${o} (not found in marketplace) `):i.push(o)}catch(n){this.logService.warn("Error querying extensions gallery",n)}return{validRecommendations:i,invalidRecommendations:f,message:l}}async onDidChangeExtensionsConfigs(){await this.fetch(),this._onDidChangeRecommendations.fire()}};C=we([F(0,S.IWorkspaceExtensionsConfigService),F(1,t.IExtensionGalleryService),F(2,k.ILogService),F(3,A.INotificationService)],C),e.WorkspaceRecommendations=C}),define(ae[2492],le([1,0,16,6,2,35,23,274,458]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIgnoredRecommendationsService=void 0;const b="extensionsAssistant/ignored_recommendations";let S=class extends R.Disposable{get globalIgnoredRecommendations(){return[...this._globalIgnoredRecommendations]}get ignoredRecommendations(){return(0,t.distinct)([...this.globalIgnoredRecommendations,...this.ignoredWorkspaceRecommendations])}constructor(r,u){super(),this.workspaceExtensionsConfigService=r,this.storageService=u,this._onDidChangeIgnoredRecommendations=this._register(new p.Emitter),this.onDidChangeIgnoredRecommendations=this._onDidChangeIgnoredRecommendations.event,this._globalIgnoredRecommendations=[],this._onDidChangeGlobalIgnoredRecommendation=this._register(new p.Emitter),this.onDidChangeGlobalIgnoredRecommendation=this._onDidChangeGlobalIgnoredRecommendation.event,this.ignoredWorkspaceRecommendations=[],this._globalIgnoredRecommendations=this.getCachedIgnoredRecommendations(),this._register(this.storageService.onDidChangeValue(i=>this.onDidStorageChange(i))),this.initIgnoredWorkspaceRecommendations()}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(r,u){r=r.toLowerCase(),this._globalIgnoredRecommendations.indexOf(r)!==-1!==u&&(this._globalIgnoredRecommendations=u?[...this._globalIgnoredRecommendations,r]:this._globalIgnoredRecommendations.filter(f=>f!==r),this.storeCachedIgnoredRecommendations(this._globalIgnoredRecommendations),this._onDidChangeGlobalIgnoredRecommendation.fire({extensionId:r,isRecommended:!u}),this._onDidChangeIgnoredRecommendations.fire())}getCachedIgnoredRecommendations(){return JSON.parse(this.ignoredRecommendationsValue).map(u=>u.toLowerCase())}onDidStorageChange(r){r.key===b&&r.scope===0&&this.ignoredRecommendationsValue!==this.getStoredIgnoredRecommendationsValue()&&(this._ignoredRecommendationsValue=void 0,this._globalIgnoredRecommendations=this.getCachedIgnoredRecommendations(),this._onDidChangeIgnoredRecommendations.fire())}storeCachedIgnoredRecommendations(r){this.ignoredRecommendationsValue=JSON.stringify(r)}get ignoredRecommendationsValue(){return this._ignoredRecommendationsValue||(this._ignoredRecommendationsValue=this.getStoredIgnoredRecommendationsValue()),this._ignoredRecommendationsValue}set ignoredRecommendationsValue(r){this.ignoredRecommendationsValue!==r&&(this._ignoredRecommendationsValue=r,this.setStoredIgnoredRecommendationsValue(r))}getStoredIgnoredRecommendationsValue(){return this.storageService.get(b,0,"[]")}setStoredIgnoredRecommendationsValue(r){this.storageService.store(b,r,0,0)}};S=we([F(0,I.IWorkspaceExtensionsConfigService),F(1,k.IStorageService)],S),e.ExtensionIgnoredRecommendationsService=S,(0,A.registerSingleton)(E.IExtensionIgnoredRecommendationsService,S,1)}),define(ae[77],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostCustomersRegistry=e.extHostCustomer=e.extHostNamedCustomer=void 0;function t(k){return function(E){A.INSTANCE.registerNamedCustomer(k,E)}}e.extHostNamedCustomer=t;function p(k){A.INSTANCE.registerCustomer(k)}e.extHostCustomer=p;var R;(function(k){function E(){return A.INSTANCE.getNamedCustomers()}k.getNamedCustomers=E;function I(){return A.INSTANCE.getCustomers()}k.getCustomers=I})(R=e.ExtHostCustomersRegistry||(e.ExtHostCustomersRegistry={}));class A{constructor(){this._namedCustomers=[],this._customers=[]}registerNamedCustomer(E,I){const b=[E,I];this._namedCustomers.push(b)}getNamedCustomers(){return this._namedCustomers}registerCustomer(E){this._customers.push(E)}getCustomers(){return this._customers}}A.INSTANCE=new A}),define(ae[2493],le([1,0,115,6,53]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDescriptionRegistry=e.DeltaExtensionsResult=void 0;class A{constructor(C){this.removedDueToLooping=C}}e.DeltaExtensionsResult=A;class k{constructor(C){this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._extensionDescriptions=C,this._initialize()}_initialize(){this._extensionDescriptions.sort(I),this._extensionsMap=new Map,this._extensionsArr=[],this._activationMap=new Map;for(const C of this._extensionDescriptions){if(this._extensionsMap.has(t.ExtensionIdentifier.toKey(C.identifier))){console.error("Extension `"+C.identifier.value+"` is already registered");continue}if(this._extensionsMap.set(t.ExtensionIdentifier.toKey(C.identifier),C),this._extensionsArr.push(C),Array.isArray(C.activationEvents))for(let r of C.activationEvents)r==="onUri"&&(r=`onUri:${t.ExtensionIdentifier.toKey(C.identifier)}`),this._activationMap.has(r)||this._activationMap.set(r,[]),this._activationMap.get(r).push(C)}}set(C){this._extensionDescriptions=C,this._initialize(),this._onDidChange.fire(void 0)}deltaExtensions(C,r){this._extensionDescriptions=b(this._extensionDescriptions,r),this._extensionDescriptions=this._extensionDescriptions.concat(C);const u=k._findLoopingExtensions(this._extensionDescriptions);return this._extensionDescriptions=b(this._extensionDescriptions,u.map(i=>i.identifier)),this._initialize(),this._onDidChange.fire(void 0),new A(u)}static _findLoopingExtensions(C){const r=new class{constructor(){this._arcs=new Map,this._nodesSet=new Set,this._nodesArr=[]}addNode(l){this._nodesSet.has(l)||(this._nodesSet.add(l),this._nodesArr.push(l))}addArc(l,s){this.addNode(l),this.addNode(s),this._arcs.has(l)?this._arcs.get(l).push(s):this._arcs.set(l,[s])}getArcs(l){return this._arcs.has(l)?this._arcs.get(l):[]}hasOnlyGoodArcs(l,s){const d=r.getArcs(l);for(let n=0;n<d.length;n++)if(!s.has(d[n]))return!1;return!0}getNodes(){return this._nodesArr}},u=new Map;for(const l of C){const s=t.ExtensionIdentifier.toKey(l.identifier);if(u.set(s,l),l.extensionDependencies)for(const d of l.extensionDependencies){const n=t.ExtensionIdentifier.toKey(d);r.addArc(s,n)}}const i=new Set;r.getNodes().filter(l=>r.getArcs(l).length===0).forEach(l=>i.add(l));const f=r.getNodes().filter(l=>!i.has(l));let c;do{c=!1;for(let l=0;l<f.length;l++){const s=f[l];r.hasOnlyGoodArcs(s,i)&&(f.splice(l,1),l--,i.add(s),c=!0)}}while(c);return f.map(l=>u.get(l))}containsActivationEvent(C){return this._activationMap.has(C)}containsExtension(C){return this._extensionsMap.has(t.ExtensionIdentifier.toKey(C))}getExtensionDescriptionsForActivationEvent(C){const r=this._activationMap.get(C);return r?r.slice(0):[]}getAllExtensionDescriptions(){return this._extensionsArr.slice(0)}getExtensionDescription(C){const r=this._extensionsMap.get(t.ExtensionIdentifier.toKey(C));return r||void 0}getExtensionDescriptionByUUID(C){for(const r of this._extensionsArr)if(r.uuid===C)return r}getExtensionDescriptionByIdOrUUID(C,r){return this.getExtensionDescription(C)??(r?this.getExtensionDescriptionByUUID(r):void 0)}}e.ExtensionDescriptionRegistry=k;var E;(function(S){S[S.Builtin=0]="Builtin",S[S.User=1]="User",S[S.Dev=2]="Dev"})(E||(E={}));function I(S,C){const r=S.isBuiltin?0:S.isUnderDevelopment?2:1,u=C.isBuiltin?0:C.isUnderDevelopment?2:1;if(r!==u)return r-u;const i=R.posix.basename(S.extensionLocation.path),f=R.posix.basename(C.extensionLocation.path);return i<f?-1:i>f?1:0}function b(S,C){const r=new Set;return C.forEach(u=>r.add(t.ExtensionIdentifier.toKey(u))),S.filter(u=>!r.has(t.ExtensionIdentifier.toKey(u.identifier)))}}),define(ae[459],le([1,0,22]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseExtensionDevOptions=void 0;function p(R){const A=R.isExtensionDevelopment;let k=!0;const E=R.extensionDevelopmentLocationURI;if(E)for(const C of E)C.scheme!==t.Schemas.file&&(k=!1);const I=k&&typeof R.debugExtensionHost.port=="number",b=k&&!!R.debugExtensionHost.break,S=A&&!!R.extensionTestsLocationURI&&!R.debugExtensionHost.debugId;return{isExtensionDevHost:A,isExtensionDevDebug:I,isExtensionDevDebugBrk:b,isExtensionDevTestFromCli:S}}e.parseExtensionDevOptions=p}),define(ae[920],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readExtHostConnection=e.writeExtHostConnection=e.MessagePortExtHostConnection=e.SocketExtHostConnection=e.IPCExtHostConnection=e.ExtHostConnectionType=void 0;var t;(function(S){S[S.IPC=1]="IPC",S[S.Socket=2]="Socket",S[S.MessagePort=3]="MessagePort"})(t=e.ExtHostConnectionType||(e.ExtHostConnectionType={}));class p{constructor(C){this.pipeName=C,this.type=1}serialize(C){C[p.ENV_KEY]=this.pipeName}}e.IPCExtHostConnection=p,p.ENV_KEY="VSCODE_EXTHOST_IPC_HOOK";class R{constructor(){this.type=2}serialize(C){C[R.ENV_KEY]="1"}}e.SocketExtHostConnection=R,R.ENV_KEY="VSCODE_EXTHOST_WILL_SEND_SOCKET";class A{constructor(){this.type=3}serialize(C){C[A.ENV_KEY]="1"}}e.MessagePortExtHostConnection=A,A.ENV_KEY="VSCODE_WILL_SEND_MESSAGE_PORT";function k(S){delete S[p.ENV_KEY],delete S[R.ENV_KEY],delete S[A.ENV_KEY]}function E(S,C){k(C),S.serialize(C)}e.writeExtHostConnection=E;function I(S){if(S[p.ENV_KEY])return b(S,new p(S[p.ENV_KEY]));if(S[R.ENV_KEY])return b(S,new R);if(S[A.ENV_KEY])return b(S,new A);throw new Error("No connection information defined in environment!")}e.readExtHostConnection=I;function b(S,C){return k(S),C}}),define(ae[541],le([1,0,56]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLogMarkers=e.isMessageOfType=e.createMessageOfType=e.MessageType=e.ExtensionHostExitCode=e.UIKind=void 0;var p;(function(b){b[b.Desktop=1]="Desktop",b[b.Web=2]="Web"})(p=e.UIKind||(e.UIKind={}));var R;(function(b){b[b.VersionMismatch=55]="VersionMismatch",b[b.UnexpectedError=81]="UnexpectedError"})(R=e.ExtensionHostExitCode||(e.ExtensionHostExitCode={}));var A;(function(b){b[b.Initialized=0]="Initialized",b[b.Ready=1]="Ready",b[b.Terminate=2]="Terminate"})(A=e.MessageType||(e.MessageType={}));function k(b){const S=t.VSBuffer.alloc(1);switch(b){case 0:S.writeUInt8(1,0);break;case 1:S.writeUInt8(2,0);break;case 2:S.writeUInt8(3,0);break}return S}e.createMessageOfType=k;function E(b,S){if(b.byteLength!==1)return!1;switch(b.readUInt8(0)){case 1:return S===0;case 2:return S===1;case 3:return S===2;default:return!1}}e.isMessageOfType=E;var I;(function(b){b.Start="START_NATIVE_LOG",b.End="END_NATIVE_LOG"})(I=e.NativeLogMarkers||(e.NativeLogMarkers={}))}),define(ae[2494],le([1,0,21,81,335,19,25,23,57,103,34]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateExtensionStorage=void 0;async function C(r,u,i,f){return f.invokeFunction(async c=>{const l=c.get(p.IEnvironmentService),s=c.get(b.IUserDataProfilesService),d=c.get(R.IExtensionStorageService),n=c.get(E.IStorageService),a=c.get(I.IUriIdentityService),o=c.get(A.IFileService),g=c.get(S.IWorkspaceContextService),h=c.get(k.ILogService),v=`extensionStorage.migrate.${r}-${u}`,m=r.toLowerCase()===u.toLowerCase()?`extension.storage.migrateFromLowerCaseKey.${r.toLowerCase()}`:void 0;if(r===u)return;const w=(y,T)=>T?a.extUri.joinPath(s.defaultProfile.globalStorageHome,y.toLowerCase()):a.extUri.joinPath(l.workspaceStorageHome,g.getWorkspace().id,y),D=i?0:1;if(!n.getBoolean(v,D,!1)&&!(m&&n.getBoolean(m,D,!1))){h.info(`Migrating ${i?"global":"workspace"} extension storage from ${r} to ${u}...`);const y=d.getExtensionState(r,i);y&&(d.setExtensionState(u,y,i),d.setExtensionState(r,void 0,i));const T=w(r,i),_=w(u,i);if(!a.extUri.isEqual(T,_))try{await o.move(T,_,!0)}catch(L){L.code!==A.FileSystemProviderErrorCode.FileNotFound&&h.info(`Error while migrating ${i?"global":"workspace"} file storage from '${r}' to '${u}'`,(0,t.getErrorMessage)(L))}h.info(`Migrated ${i?"global":"workspace"} extension storage from ${r} to ${u}`),n.store(v,!0,D,1)}})}e.migrateExtensionStorage=C}),define(ae[39],le([1,0,6,9,5,115,100]),function(J,e,t,p,R,A,k){"use strict";var E;Object.defineProperty(e,"__esModule",{value:!0}),e.NullExtensionService=e.toExtensionDescription=e.toExtension=e.ActivationKind=e.webWorkerExtHostLog=e.remoteExtHostLog=e.localExtHostLog=e.ExtensionHostLogFileName=e.ExtensionPointContribution=e.ActivationTimes=e.checkProposedApiEnabled=e.isProposedApiEnabled=e.extensionIdentifiersArrayToSet=e.ExtensionIdentifierSet=e.ExtensionHostExtensions=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:p.URI.parse("void:location"),isBuiltin:!1,targetPlatform:"undefined",isUserBuiltin:!1,isUnderDevelopment:!1}),e.webWorkerExtHostConfig="extensions.webWorker",e.IExtensionService=(0,R.createDecorator)("extensionService");class I{constructor(w){this.affinity=w,this.kind=1}equals(w){return this.kind===w.kind&&this.affinity===w.affinity}asString(){return this.affinity===0?"LocalProcess":`LocalProcess${this.affinity}`}}e.LocalProcessRunningLocation=I;class b{constructor(w){this.affinity=w,this.kind=2}equals(w){return this.kind===w.kind&&this.affinity===w.affinity}asString(){return this.affinity===0?"LocalWebWorker":`LocalWebWorker${this.affinity}`}}e.LocalWebWorkerRunningLocation=b;class S{constructor(){this.kind=3,this.affinity=0}equals(w){return this.kind===w.kind}asString(){return"Remote"}}e.RemoteRunningLocation=S;class C{constructor(w){this.dependency=w}}e.MissingExtensionDependency=C;var r;(function(m){m[m.LocalProcess=1]="LocalProcess",m[m.LocalWebWorker=2]="LocalWebWorker",m[m.Remote=3]="Remote"})(r=e.ExtensionHostKind||(e.ExtensionHostKind={}));function u(m){if(m===null)return"None";switch(m){case 1:return"LocalProcess";case 2:return"LocalWebWorker";case 3:return"Remote"}}e.extensionHostKindToString=u;class i{constructor(){this._allExtensions=[],this._myExtensions=[]}toDelta(){return{toRemove:[],toAdd:this._allExtensions,myToRemove:[],myToAdd:this._myExtensions}}set(w,D){const y=[],T=[],_=[],L=[],M=l(this._allExtensions),O=l(w),N=(z,x)=>z.extensionLocation.toString()===x.extensionLocation.toString()||z.isBuiltin===x.isBuiltin||z.isUserBuiltin===x.isUserBuiltin||z.isUnderDevelopment===x.isUnderDevelopment;for(const z of this._allExtensions){const x=O.get(A.ExtensionIdentifier.toKey(z.identifier));if(!x){y.push(z.identifier),M.delete(A.ExtensionIdentifier.toKey(z.identifier));continue}if(!N(z,x)){y.push(z.identifier),M.delete(A.ExtensionIdentifier.toKey(z.identifier));continue}}for(const z of w){const x=M.get(A.ExtensionIdentifier.toKey(z.identifier));if(!x){T.push(z);continue}if(!N(x,z)){y.push(x.identifier),M.delete(A.ExtensionIdentifier.toKey(x.identifier));continue}}const P=c(this._myExtensions),B=c(D);for(const z of this._myExtensions)B.has(A.ExtensionIdentifier.toKey(z))||_.push(z);for(const z of D)P.has(A.ExtensionIdentifier.toKey(z))||L.push(z);const V={toRemove:y,toAdd:T,myToRemove:_,myToAdd:L};return this.delta(V),V}delta(w){const{toRemove:D,toAdd:y,myToRemove:T,myToAdd:_}=w,L=c(D),M=c(T);for(let O=0;O<this._allExtensions.length;O++)L.has(A.ExtensionIdentifier.toKey(this._allExtensions[O].identifier))&&(this._allExtensions.splice(O,1),O--);for(let O=0;O<this._myExtensions.length;O++)M.has(A.ExtensionIdentifier.toKey(this._myExtensions[O]))&&(this._myExtensions.splice(O,1),O--);for(const O of y)this._allExtensions.push(O);for(const O of _)this._myExtensions.push(O)}containsExtension(w){for(const D of this._myExtensions)if(A.ExtensionIdentifier.equals(D,w))return!0;return!1}}e.ExtensionHostExtensions=i;class f{constructor(w){if(this[E]="ExtensionIdentifierSet",this._map=new Map,this._toKey=A.ExtensionIdentifier.toKey,w)for(const D of w)this.add(D)}get size(){return this._map.size}add(w){return this._map.set(this._toKey(w),w),this}clear(){this._map.clear()}delete(w){return this._map.delete(this._toKey(w))}has(w){return this._map.has(this._toKey(w))}forEach(w,D){this._map.forEach(y=>w.call(D,y,y,this))}*entries(){for(const[w,D]of this._map)yield[D,D]}keys(){return this._map.values()}values(){return this._map.values()}[(E=Symbol.toStringTag,Symbol.iterator)](){return this._map.values()}}e.ExtensionIdentifierSet=f;function c(m){const w=new Set;for(const D of m)w.add(A.ExtensionIdentifier.toKey(D));return w}e.extensionIdentifiersArrayToSet=c;function l(m){const w=new Map;for(const D of m)w.set(A.ExtensionIdentifier.toKey(D.identifier),D);return w}function s(m,w){return m.enabledApiProposals?m.enabledApiProposals.includes(w):!1}e.isProposedApiEnabled=s;function d(m,w){if(!s(m,w))throw new Error(`Extension '${m.identifier.value}' CANNOT use API proposal: ${w}. Its package.json#enabledApiProposals-property declares: ${m.enabledApiProposals?.join(", ")??"[]"} but NOT ${w}. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ${m.identifier.value}`)}e.checkProposedApiEnabled=d;class n{constructor(w,D,y,T){this.codeLoadingTime=w,this.activateCallTime=D,this.activateResolvedTime=y,this.activationReason=T}}e.ActivationTimes=n;class a{constructor(w,D){this.description=w,this.value=D}}e.ExtensionPointContribution=a,e.ExtensionHostLogFileName="exthost",e.localExtHostLog="extHostLog",e.remoteExtHostLog="remoteExtHostLog",e.webWorkerExtHostLog="webWorkerExtHostLog";var o;(function(m){m[m.Normal=0]="Normal",m[m.Immediate=1]="Immediate"})(o=e.ActivationKind||(e.ActivationKind={}));function g(m){return{type:m.isBuiltin?0:1,isBuiltin:m.isBuiltin||m.isUserBuiltin,identifier:{id:(0,k.getGalleryExtensionId)(m.publisher,m.name),uuid:m.uuid},manifest:m,location:m.extensionLocation,targetPlatform:m.targetPlatform,validations:[],isValid:!0}}e.toExtension=g;function h(m,w){return{identifier:new A.ExtensionIdentifier((0,k.getExtensionId)(m.manifest.publisher,m.manifest.name)),isBuiltin:m.type===0,isUserBuiltin:m.type===1&&m.isBuiltin,isUnderDevelopment:!!w,extensionLocation:m.location,...m.manifest,uuid:m.identifier.uuid,targetPlatform:m.targetPlatform,browserNlsBundleUris:m.browserNlsBundleUris}}e.toExtensionDescription=h;class v{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,this.extensions=[]}activateByEvent(w){return Promise.resolve(void 0)}activationEventIsDone(w){return!1}whenInstalledExtensionsRegistered(){return Promise.resolve(!0)}getExtension(){return Promise.resolve(void 0)}readExtensionPointContributions(w){return Promise.resolve(Object.create(null))}getExtensionsStatus(){return Object.create(null)}getInspectPort(w,D){return Promise.resolve(0)}getInspectPorts(w,D){return Promise.resolve([])}stopExtensionHosts(){}async restartExtensionHost(){}async startExtensionHosts(){}async setRemoteEnvironment(w){}canAddExtension(){return!1}canRemoveExtension(){return!1}_activateById(w,D){return Promise.resolve()}}e.NullExtensionService=v});var Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t},yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)};define(ae[2495],le([1,0,16,21,113,60,160,28,13,9,72,19,148,64,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";var f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveWindowInput=e.TerminalEditorTabInput=e.NotebookDiffEditorTabInput=e.NotebookEditorTabInput=e.WebviewEditorTabInput=e.CustomEditorTabInput=e.TextMergeTabInput=e.TextDiffTabInput=e.TextTabInput=e.TypeHierarchyItem=e.PortAutoForwardAction=e.WorkspaceTrustState=e.ExternalUriOpenerPriority=e.FunctionCoverage=e.BranchCoverage=e.StatementCoverage=e.FileCoverage=e.CoveredCount=e.TestTag=e.TestMessage=e.TestRunRequest=e.TestRunProfileKind=e.TestResultState=e.PortAttributes=e.LinkedEditingRanges=e.StandardTokenType=e.ExtensionRuntime=e.ExtensionMode=e.TimelineItem=e.NotebookRendererScript=e.NotebookControllerAffinity2=e.NotebookControllerAffinity=e.NotebookCellStatusBarItem=e.NotebookEditorRevealType=e.NotebookCellStatusBarAlignment=e.NotebookCellExecutionState=e.NotebookCellKind=e.NotebookCellOutput=e.NotebookCellOutputItem=e.NotebookData=e.NotebookCellData=e.NotebookRange=e.ColorThemeKind=e.ColorTheme=e.FileDecoration=e.ExtensionKind=e.InputBoxValidationSeverity=e.QuickPickItemKind=e.QuickInputButtons=e.DebugConsoleMode=e.SemanticTokensEdits=e.SemanticTokensEdit=e.SemanticTokens=e.SemanticTokensBuilder=e.SemanticTokensLegend=e.CommentThreadState=e.CommentMode=e.CommentThreadCollapsibleState=e.FoldingRangeKind=e.FoldingRange=e.FileSystemError=e.FileChangeType=e.InlineValueContext=e.InlineValueEvaluatableExpression=e.InlineValueVariableLookup=e.InlineValueText=e.InlineCompletionTriggerKindNew=e.InlineCompletionTriggerKind=e.EvaluatableExpression=e.DebugAdapterInlineImplementation=e.DebugAdapterNamedPipeServer=e.DebugAdapterServer=e.DebugAdapterExecutable=e.DataBreakpoint=e.FunctionBreakpoint=e.SourceBreakpoint=e.Breakpoint=e.RelativePattern=e.ConfigurationTarget=e.ThemeColor=e.ThemeIcon=e.DocumentPasteEdit=e.DocumentDropEdit=e.DataTransfer=e.DataTransferItem=e.TreeItemCheckboxState=e.TreeItemCollapsibleState=e.TreeItem=e.ViewBadge=e.ProgressLocation=e.Task=e.CustomExecution=e.TaskScope=e.ShellQuoting=e.ShellExecution=e.ProcessExecution=e.TaskGroup=e.TaskPanelKind=e.TaskRevealKind=e.TerminalProfile=e.TerminalLocation=e.TerminalLink=e.TerminalExitReason=e.SourceControlInputBoxValidationType=e.ColorFormat=e.ColorPresentation=e.ColorInformation=e.Color=e.DocumentLink=e.DecorationRangeBehavior=e.TextDocumentChangeReason=e.TextEditorSelectionChangeKind=e.TextEditorRevealType=e.TextDocumentSaveReason=e.TextEditorLineNumbersStyle=e.StatusBarAlignment=e.ViewColumn=e.InlineSuggestionsNew=e.InlineSuggestionNew=e.InlineSuggestionList=e.InlineSuggestion=e.CompletionList=e.CompletionItem=e.CompletionItemTag=e.CompletionItemKind=e.CompletionTriggerKind=e.InlayHint=e.InlayHintLabelPart=e.InlayHintKind=e.SignatureHelpTriggerKind=e.SignatureHelp=e.SignatureInformation=e.ParameterInformation=e.MarkdownString=e.CodeLens=e.LanguageStatusSeverity=e.CallHierarchyOutgoingCall=e.CallHierarchyIncomingCall=e.CallHierarchyItem=e.SelectionRange=e.CodeActionKind=e.CodeAction=e.CodeActionTriggerKind=e.DocumentSymbol=e.SymbolInformation=e.SymbolTag=e.SymbolKind=e.DocumentHighlight=e.DocumentHighlightKind=e.Hover=e.Diagnostic=e.DiagnosticRelatedInformation=e.Location=e.DiagnosticSeverity=e.DiagnosticTag=e.SnippetString=e.WorkspaceEdit=e.FileEditType=e.SnippetTextEdit=e.NotebookEdit=e.TextEdit=e.EnvironmentVariableMutatorType=e.EndOfLine=e.RemoteAuthorityResolverError=e.ResolvedAuthority=e.Selection=e.Range=e.Position=e.Disposable=void 0;function V(Ve){return Object.assign(Ve,{apply:function(){const et=arguments.length===1?[]:arguments[1];return Reflect.construct(Ve,et,arguments[0].constructor)},call:function(){if(arguments.length===0)return Reflect.construct(Ve,[]);{const[et,...vt]=arguments;return Reflect.construct(Ve,vt,et.constructor)}}})}let z=n=class{static from(...xe){let et=xe;return new n(function(){if(et){for(const vt of et)vt&&typeof vt.dispose=="function"&&vt.dispose();et=void 0}})}constructor(xe){f.set(this,void 0),Ut(this,f,xe,"f")}dispose(){typeof yt(this,f,"f")=="function"&&(yt(this,f,"f").call(this),Ut(this,f,void 0,"f"))}};f=new WeakMap,z=n=we([V],z),e.Disposable=z;let x=a=class{static Min(...xe){if(xe.length===0)throw new TypeError;let et=xe[0];for(let vt=1;vt<xe.length;vt++){const Pt=xe[vt];Pt.isBefore(et)&&(et=Pt)}return et}static Max(...xe){if(xe.length===0)throw new TypeError;let et=xe[0];for(let vt=1;vt<xe.length;vt++){const Pt=xe[vt];Pt.isAfter(et)&&(et=Pt)}return et}static isPosition(xe){if(!xe)return!1;if(xe instanceof a)return!0;const{line:et,character:vt}=xe;return typeof et=="number"&&typeof vt=="number"}static of(xe){if(xe instanceof a)return xe;if(this.isPosition(xe))return new a(xe.line,xe.character);throw new Error("Invalid argument, is NOT a position-like object")}get line(){return this._line}get character(){return this._character}constructor(xe,et){if(xe<0)throw(0,p.illegalArgument)("line must be non-negative");if(et<0)throw(0,p.illegalArgument)("character must be non-negative");this._line=xe,this._character=et}isBefore(xe){return this._line<xe._line?!0:xe._line<this._line?!1:this._character<xe._character}isBeforeOrEqual(xe){return this._line<xe._line?!0:xe._line<this._line?!1:this._character<=xe._character}isAfter(xe){return!this.isBeforeOrEqual(xe)}isAfterOrEqual(xe){return!this.isBefore(xe)}isEqual(xe){return this._line===xe._line&&this._character===xe._character}compareTo(xe){return this._line<xe._line?-1:this._line>xe.line?1:this._character<xe._character?-1:this._character>xe._character?1:0}translate(xe,et=0){if(xe===null||et===null)throw(0,p.illegalArgument)();let vt;return typeof xe>"u"?vt=0:typeof xe=="number"?vt=xe:(vt=typeof xe.lineDelta=="number"?xe.lineDelta:0,et=typeof xe.characterDelta=="number"?xe.characterDelta:0),vt===0&&et===0?this:new a(this.line+vt,this.character+et)}with(xe,et=this.character){if(xe===null||et===null)throw(0,p.illegalArgument)();let vt;return typeof xe>"u"?vt=this.line:typeof xe=="number"?vt=xe:(vt=typeof xe.line=="number"?xe.line:this.line,et=typeof xe.character=="number"?xe.character:this.character),vt===this.line&&et===this.character?this:new a(vt,et)}toJSON(){return{line:this.line,character:this.character}}};x=a=we([V],x),e.Position=x;let H=o=class{static isRange(xe){return xe instanceof o?!0:xe?x.isPosition(xe.start)&&x.isPosition(xe.end):!1}static of(xe){if(xe instanceof o)return xe;if(this.isRange(xe))return new o(xe.start,xe.end);throw new Error("Invalid argument, is NOT a range-like object")}get start(){return this._start}get end(){return this._end}constructor(xe,et,vt,Pt){let Vt,Ht;if(typeof xe=="number"&&typeof et=="number"&&typeof vt=="number"&&typeof Pt=="number"?(Vt=new x(xe,et),Ht=new x(vt,Pt)):x.isPosition(xe)&&x.isPosition(et)&&(Vt=x.of(xe),Ht=x.of(et)),!Vt||!Ht)throw new Error("Invalid arguments");Vt.isBefore(Ht)?(this._start=Vt,this._end=Ht):(this._start=Ht,this._end=Vt)}contains(xe){return o.isRange(xe)?this.contains(xe.start)&&this.contains(xe.end):x.isPosition(xe)?!(x.of(xe).isBefore(this._start)||this._end.isBefore(xe)):!1}isEqual(xe){return this._start.isEqual(xe._start)&&this._end.isEqual(xe._end)}intersection(xe){const et=x.Max(xe.start,this._start),vt=x.Min(xe.end,this._end);if(!et.isAfter(vt))return new o(et,vt)}union(xe){if(this.contains(xe))return this;if(xe.contains(this))return xe;const et=x.Min(xe.start,this._start),vt=x.Max(xe.end,this.end);return new o(et,vt)}get isEmpty(){return this._start.isEqual(this._end)}get isSingleLine(){return this._start.line===this._end.line}with(xe,et=this.end){if(xe===null||et===null)throw(0,p.illegalArgument)();let vt;return xe?x.isPosition(xe)?vt=xe:(vt=xe.start||this.start,et=xe.end||this.end):vt=this.start,vt.isEqual(this._start)&&et.isEqual(this.end)?this:new o(vt,et)}toJSON(){return[this.start,this.end]}};H=o=we([V],H),e.Range=H;let W=g=class extends H{static isSelection(xe){return xe instanceof g?!0:xe?H.isRange(xe)&&x.isPosition(xe.anchor)&&x.isPosition(xe.active)&&typeof xe.isReversed=="boolean":!1}get anchor(){return this._anchor}get active(){return this._active}constructor(xe,et,vt,Pt){let Vt,Ht;if(typeof xe=="number"&&typeof et=="number"&&typeof vt=="number"&&typeof Pt=="number"?(Vt=new x(xe,et),Ht=new x(vt,Pt)):x.isPosition(xe)&&x.isPosition(et)&&(Vt=x.of(xe),Ht=x.of(et)),!Vt||!Ht)throw new Error("Invalid arguments");super(Vt,Ht),this._anchor=Vt,this._active=Ht}get isReversed(){return this._anchor===this._end}toJSON(){return{start:this.start,end:this.end,active:this.active,anchor:this.anchor}}};W=g=we([V],W),e.Selection=W;class U{constructor(xe,et,vt){if(typeof xe!="string"||xe.length===0)throw(0,p.illegalArgument)("host");if(typeof et!="number"||et===0||Math.round(et)!==et)throw(0,p.illegalArgument)("port");if(typeof vt<"u"&&(typeof vt!="string"||vt.length===0||!/^[0-9A-Za-z\-]+$/.test(vt)))throw(0,p.illegalArgument)("connectionToken");this.host=xe,this.port=Math.round(et),this.connectionToken=vt}}e.ResolvedAuthority=U;class $ extends Error{static NotAvailable(xe,et){return new $(xe,r.RemoteAuthorityResolverErrorCode.NotAvailable,et)}static TemporarilyNotAvailable(xe){return new $(xe,r.RemoteAuthorityResolverErrorCode.TemporarilyNotAvailable)}constructor(xe,et=r.RemoteAuthorityResolverErrorCode.Unknown,vt){super(xe),this._message=xe,this._code=et,this._detail=vt,typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,$.prototype)}}e.RemoteAuthorityResolverError=$;var q;(function(Ve){Ve[Ve.LF=1]="LF",Ve[Ve.CRLF=2]="CRLF"})(q=e.EndOfLine||(e.EndOfLine={}));var X;(function(Ve){Ve[Ve.Replace=1]="Replace",Ve[Ve.Append=2]="Append",Ve[Ve.Prepend=3]="Prepend"})(X=e.EnvironmentVariableMutatorType||(e.EnvironmentVariableMutatorType={}));let G=h=class{static isTextEdit(xe){return xe instanceof h?!0:xe?H.isRange(xe)&&typeof xe.newText=="string":!1}static replace(xe,et){return new h(xe,et)}static insert(xe,et){return h.replace(new H(xe,xe),et)}static delete(xe){return h.replace(xe,"")}static setEndOfLine(xe){const et=new h(new H(new x(0,0),new x(0,0)),"");return et.newEol=xe,et}get range(){return this._range}set range(xe){if(xe&&!H.isRange(xe))throw(0,p.illegalArgument)("range");this._range=xe}get newText(){return this._newText||""}set newText(xe){if(xe&&typeof xe!="string")throw(0,p.illegalArgument)("newText");this._newText=xe}get newEol(){return this._newEol}set newEol(xe){if(xe&&typeof xe!="number")throw(0,p.illegalArgument)("newEol");this._newEol=xe}constructor(xe,et){this._range=xe,this._newText=et}toJSON(){return{range:this.range,newText:this.newText,newEol:this._newEol}}};G=h=we([V],G),e.TextEdit=G;let Q=v=class{static isNotebookCellEdit(xe){return xe instanceof v?!0:xe?Ni.isNotebookRange(xe)&&Array.isArray(xe.newCells):!1}static replaceCells(xe,et){return new v(xe,et)}static insertCells(xe,et){return new v(new Ni(xe,xe),et)}static deleteCells(xe){return new v(xe,[])}static updateCellMetadata(xe,et){const vt=new v(new Ni(xe,xe),[]);return vt.newCellMetadata=et,vt}static updateNotebookMetadata(xe){const et=new v(new Ni(0,0),[]);return et.newNotebookMetadata=xe,et}constructor(xe,et){this.range=xe,this.newCells=et}};Q=v=we([V],Q),e.NotebookEdit=Q;class j{static isSnippetTextEdit(xe){return xe instanceof j?!0:xe?H.isRange(xe.range)&&ee.isSnippetString(xe.snippet):!1}static replace(xe,et){return new j(xe,et)}static insert(xe,et){return j.replace(new H(xe,xe),et)}constructor(xe,et){this.range=xe,this.snippet=et}}e.SnippetTextEdit=j;var K;(function(Ve){Ve[Ve.File=1]="File",Ve[Ve.Text=2]="Text",Ve[Ve.Cell=3]="Cell",Ve[Ve.CellReplace=5]="CellReplace",Ve[Ve.Snippet=6]="Snippet"})(K=e.FileEditType||(e.FileEditType={}));let Y=class{constructor(){this._edits=[]}_allEntries(){return this._edits}renameFile(xe,et,vt,Pt){this._edits.push({_type:1,from:xe,to:et,options:vt,metadata:Pt})}createFile(xe,et,vt){this._edits.push({_type:1,from:void 0,to:xe,options:et,metadata:vt})}deleteFile(xe,et,vt){this._edits.push({_type:1,from:xe,to:void 0,options:et,metadata:vt})}replaceNotebookMetadata(xe,et,vt){this._edits.push({_type:3,metadata:vt,uri:xe,edit:{editType:5,metadata:et},notebookMetadata:et})}replaceNotebookCells(xe,et,vt,Pt){const Vt=et.start,Ht=et.end;(Vt!==Ht||vt.length>0)&&this._edits.push({_type:5,uri:xe,index:Vt,count:Ht-Vt,cells:vt,metadata:Pt})}replaceNotebookCellMetadata(xe,et,vt,Pt){this._edits.push({_type:3,metadata:Pt,uri:xe,edit:{editType:8,index:et,metadata:vt}})}replace(xe,et,vt,Pt){this._edits.push({_type:2,uri:xe,edit:new G(et,vt),metadata:Pt})}insert(xe,et,vt,Pt){this.replace(xe,new H(et,et),vt,Pt)}delete(xe,et,vt){this.replace(xe,et,"",vt)}has(xe){return this._edits.some(et=>et._type===2&&et.uri.toString()===xe.toString())}set(xe,et){if(et)for(const vt of et){if(!vt)continue;let Pt,Vt;Array.isArray(vt)?(Pt=vt[0],Vt=vt[1]):Pt=vt,Q.isNotebookCellEdit(Pt)?Pt.newCellMetadata?this.replaceNotebookCellMetadata(xe,Pt.range.start,Pt.newCellMetadata,Vt):Pt.newNotebookMetadata?this.replaceNotebookMetadata(xe,Pt.newNotebookMetadata,Vt):this.replaceNotebookCells(xe,Pt.range,Pt.newCells,Vt):j.isSnippetTextEdit(Pt)?this._edits.push({_type:6,uri:xe,range:Pt.range,edit:Pt.snippet,metadata:Vt}):this._edits.push({_type:2,uri:xe,edit:Pt,metadata:Vt})}else{for(let vt=0;vt<this._edits.length;vt++){const Pt=this._edits[vt];switch(Pt._type){case 2:case 6:case 3:case 5:Pt.uri.toString()===xe.toString()&&(this._edits[vt]=void 0);break}}(0,t.coalesceInPlace)(this._edits)}}get(xe){const et=[];for(const vt of this._edits)vt._type===2&&vt.uri.toString()===xe.toString()&&et.push(vt.edit);return et}entries(){const xe=new A.ResourceMap;for(const et of this._edits)if(et._type===2){let vt=xe.get(et.uri);vt||(vt=[et.uri,[]],xe.set(et.uri,vt)),vt[1].push(et.edit)}return[...xe.values()]}get size(){return this.entries().length}toJSON(){return this.entries()}};Y=we([V],Y),e.WorkspaceEdit=Y;let ee=m=class{static isSnippetString(xe){return xe instanceof m?!0:xe?typeof xe.value=="string":!1}static _escape(xe){return xe.replace(/\$|}|\\/g,"\\$&")}constructor(xe){this._tabstop=1,this.value=xe||""}appendText(xe){return this.value+=m._escape(xe),this}appendTabstop(xe=this._tabstop++){return this.value+="$",this.value+=xe,this}appendPlaceholder(xe,et=this._tabstop++){if(typeof xe=="function"){const vt=new m;vt._tabstop=this._tabstop,xe(vt),this._tabstop=vt._tabstop,xe=vt.value}else xe=m._escape(xe);return this.value+="${",this.value+=et,this.value+=":",this.value+=xe,this.value+="}",this}appendChoice(xe,et=this._tabstop++){const vt=xe.map(Pt=>Pt.replace(/\$|}|\\|,/g,"\\$&")).join(",");return this.value+="${",this.value+=et,this.value+="|",this.value+=vt,this.value+="|}",this}appendVariable(xe,et){if(typeof et=="function"){const vt=new m;vt._tabstop=this._tabstop,et(vt),this._tabstop=vt._tabstop,et=vt.value}else typeof et=="string"&&(et=et.replace(/\$|}/g,"\\$&"));return this.value+="${",this.value+=xe,et&&(this.value+=":",this.value+=et),this.value+="}",this}};ee=m=we([V],ee),e.SnippetString=ee;var ie;(function(Ve){Ve[Ve.Unnecessary=1]="Unnecessary",Ve[Ve.Deprecated=2]="Deprecated"})(ie=e.DiagnosticTag||(e.DiagnosticTag={}));var re;(function(Ve){Ve[Ve.Hint=3]="Hint",Ve[Ve.Information=2]="Information",Ve[Ve.Warning=1]="Warning",Ve[Ve.Error=0]="Error"})(re=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));let oe=w=class{static isLocation(xe){return xe instanceof w?!0:xe?H.isRange(xe.range)&&b.URI.isUri(xe.uri):!1}constructor(xe,et){if(this.uri=xe,et)if(H.isRange(et))this.range=H.of(et);else if(x.isPosition(et))this.range=new H(et,et);else throw new Error("Illegal argument")}toJSON(){return{uri:this.uri,range:this.range}}};oe=w=we([V],oe),e.Location=oe;let se=class{static is(xe){return xe?typeof xe.message=="string"&&xe.location&&H.isRange(xe.location.range)&&b.URI.isUri(xe.location.uri):!1}constructor(xe,et){this.location=xe,this.message=et}static isEqual(xe,et){return xe===et?!0:!xe||!et?!1:xe.message===et.message&&xe.location.range.isEqual(et.location.range)&&xe.location.uri.toString()===et.location.uri.toString()}};se=we([V],se),e.DiagnosticRelatedInformation=se;let te=class{constructor(xe,et,vt=re.Error){if(!H.isRange(xe))throw new TypeError("range must be set");if(!et)throw new TypeError("message must be set");this.range=xe,this.message=et,this.severity=vt}toJSON(){return{severity:re[this.severity],message:this.message,range:this.range,source:this.source,code:this.code}}static isEqual(xe,et){return xe===et?!0:!xe||!et?!1:xe.message===et.message&&xe.severity===et.severity&&xe.code===et.code&&xe.severity===et.severity&&xe.source===et.source&&xe.range.isEqual(et.range)&&(0,t.equals)(xe.tags,et.tags)&&(0,t.equals)(xe.relatedInformation,et.relatedInformation,se.isEqual)}};te=we([V],te),e.Diagnostic=te;let Z=class{constructor(xe,et){if(!xe)throw new Error("Illegal argument, contents must be defined");Array.isArray(xe)?this.contents=xe:this.contents=[xe],this.range=et}};Z=we([V],Z),e.Hover=Z;var ne;(function(Ve){Ve[Ve.Text=0]="Text",Ve[Ve.Read=1]="Read",Ve[Ve.Write=2]="Write"})(ne=e.DocumentHighlightKind||(e.DocumentHighlightKind={}));let ce=class{constructor(xe,et=ne.Text){this.range=xe,this.kind=et}toJSON(){return{range:this.range,kind:ne[this.kind]}}};ce=we([V],ce),e.DocumentHighlight=ce;var de;(function(Ve){Ve[Ve.File=0]="File",Ve[Ve.Module=1]="Module",Ve[Ve.Namespace=2]="Namespace",Ve[Ve.Package=3]="Package",Ve[Ve.Class=4]="Class",Ve[Ve.Method=5]="Method",Ve[Ve.Property=6]="Property",Ve[Ve.Field=7]="Field",Ve[Ve.Constructor=8]="Constructor",Ve[Ve.Enum=9]="Enum",Ve[Ve.Interface=10]="Interface",Ve[Ve.Function=11]="Function",Ve[Ve.Variable=12]="Variable",Ve[Ve.Constant=13]="Constant",Ve[Ve.String=14]="String",Ve[Ve.Number=15]="Number",Ve[Ve.Boolean=16]="Boolean",Ve[Ve.Array=17]="Array",Ve[Ve.Object=18]="Object",Ve[Ve.Key=19]="Key",Ve[Ve.Null=20]="Null",Ve[Ve.EnumMember=21]="EnumMember",Ve[Ve.Struct=22]="Struct",Ve[Ve.Event=23]="Event",Ve[Ve.Operator=24]="Operator",Ve[Ve.TypeParameter=25]="TypeParameter"})(de=e.SymbolKind||(e.SymbolKind={}));var he;(function(Ve){Ve[Ve.Deprecated=1]="Deprecated"})(he=e.SymbolTag||(e.SymbolTag={}));let pe=D=class{static validate(xe){if(!xe.name)throw new Error("name must not be falsy")}constructor(xe,et,vt,Pt,Vt){this.name=xe,this.kind=et,this.containerName=Vt,typeof vt=="string"&&(this.containerName=vt),Pt instanceof oe?this.location=Pt:vt instanceof H&&(this.location=new oe(Pt,vt)),D.validate(this)}toJSON(){return{name:this.name,kind:de[this.kind],location:this.location,containerName:this.containerName}}};pe=D=we([V],pe),e.SymbolInformation=pe;let me=y=class{static validate(xe){if(!xe.name)throw new Error("name must not be falsy");if(!xe.range.contains(xe.selectionRange))throw new Error("selectionRange must be contained in fullRange");xe.children?.forEach(y.validate)}constructor(xe,et,vt,Pt,Vt){this.name=xe,this.detail=et,this.kind=vt,this.range=Pt,this.selectionRange=Vt,this.children=[],y.validate(this)}};me=y=we([V],me),e.DocumentSymbol=me;var Se;(function(Ve){Ve[Ve.Invoke=1]="Invoke",Ve[Ve.Automatic=2]="Automatic"})(Se=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));let Ie=class{constructor(xe,et){this.title=xe,this.kind=et}};Ie=we([V],Ie),e.CodeAction=Ie;let ve=T=class{constructor(xe){this.value=xe}append(xe){return new T(this.value?this.value+T.sep+xe:xe)}intersects(xe){return this.contains(xe)||xe.contains(this)}contains(xe){return this.value===xe.value||xe.value.startsWith(this.value+T.sep)}};ve.sep=".",ve=T=we([V],ve),e.CodeActionKind=ve,ve.Empty=new ve(""),ve.QuickFix=ve.Empty.append("quickfix"),ve.Refactor=ve.Empty.append("refactor"),ve.RefactorExtract=ve.Refactor.append("extract"),ve.RefactorInline=ve.Refactor.append("inline"),ve.RefactorMove=ve.Refactor.append("move"),ve.RefactorRewrite=ve.Refactor.append("rewrite"),ve.Source=ve.Empty.append("source"),ve.SourceOrganizeImports=ve.Source.append("organizeImports"),ve.SourceFixAll=ve.Source.append("fixAll");let be=class{constructor(xe,et){if(this.range=xe,this.parent=et,et&&!et.range.contains(this.range))throw new Error("Invalid argument: parent must contain this range")}};be=we([V],be),e.SelectionRange=be;class ge{constructor(xe,et,vt,Pt,Vt,Ht){this.kind=xe,this.name=et,this.detail=vt,this.uri=Pt,this.range=Vt,this.selectionRange=Ht}}e.CallHierarchyItem=ge;class ue{constructor(xe,et){this.fromRanges=et,this.from=xe}}e.CallHierarchyIncomingCall=ue;class Ce{constructor(xe,et){this.fromRanges=et,this.to=xe}}e.CallHierarchyOutgoingCall=Ce;var De;(function(Ve){Ve[Ve.Information=0]="Information",Ve[Ve.Warning=1]="Warning",Ve[Ve.Error=2]="Error"})(De=e.LanguageStatusSeverity||(e.LanguageStatusSeverity={}));let Ae=class{constructor(xe,et){this.range=xe,this.command=et}get isResolved(){return!!this.command}};Ae=we([V],Ae),e.CodeLens=Ae;let Pe=_=class{static isMarkdownString(xe){return xe instanceof _?!0:xe&&xe.appendCodeblock&&xe.appendMarkdown&&xe.appendText&&xe.value!==void 0}constructor(xe,et=!1){c.set(this,void 0),Ut(this,c,new R.MarkdownString(xe,{supportThemeIcons:et}),"f")}get value(){return yt(this,c,"f").value}set value(xe){yt(this,c,"f").value=xe}get isTrusted(){return yt(this,c,"f").isTrusted}set isTrusted(xe){yt(this,c,"f").isTrusted=xe}get supportThemeIcons(){return yt(this,c,"f").supportThemeIcons}set supportThemeIcons(xe){yt(this,c,"f").supportThemeIcons=xe}get supportHtml(){return yt(this,c,"f").supportHtml}set supportHtml(xe){yt(this,c,"f").supportHtml=xe}get baseUri(){return yt(this,c,"f").baseUri}set baseUri(xe){yt(this,c,"f").baseUri=xe}appendText(xe){return yt(this,c,"f").appendText(xe),this}appendMarkdown(xe){return yt(this,c,"f").appendMarkdown(xe),this}appendCodeblock(xe,et){return yt(this,c,"f").appendCodeblock(et??"",xe),this}};c=new WeakMap,Pe=_=we([V],Pe),e.MarkdownString=Pe;let fe=class{constructor(xe,et){this.label=xe,this.documentation=et}};fe=we([V],fe),e.ParameterInformation=fe;let ye=class{constructor(xe,et){this.label=xe,this.documentation=et,this.parameters=[]}};ye=we([V],ye),e.SignatureInformation=ye;let ke=class{constructor(){this.activeSignature=0,this.activeParameter=0,this.signatures=[]}};ke=we([V],ke),e.SignatureHelp=ke;var Ee;(function(Ve){Ve[Ve.Invoke=1]="Invoke",Ve[Ve.TriggerCharacter=2]="TriggerCharacter",Ve[Ve.ContentChange=3]="ContentChange"})(Ee=e.SignatureHelpTriggerKind||(e.SignatureHelpTriggerKind={}));var Te;(function(Ve){Ve[Ve.Type=1]="Type",Ve[Ve.Parameter=2]="Parameter"})(Te=e.InlayHintKind||(e.InlayHintKind={}));let _e=class{constructor(xe){this.value=xe}};_e=we([V],_e),e.InlayHintLabelPart=_e;let Re=class{constructor(xe,et,vt){this.position=xe,this.label=et,this.kind=vt}};Re=we([V],Re),e.InlayHint=Re;var Le;(function(Ve){Ve[Ve.Invoke=0]="Invoke",Ve[Ve.TriggerCharacter=1]="TriggerCharacter",Ve[Ve.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Le=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var Me;(function(Ve){Ve[Ve.Text=0]="Text",Ve[Ve.Method=1]="Method",Ve[Ve.Function=2]="Function",Ve[Ve.Constructor=3]="Constructor",Ve[Ve.Field=4]="Field",Ve[Ve.Variable=5]="Variable",Ve[Ve.Class=6]="Class",Ve[Ve.Interface=7]="Interface",Ve[Ve.Module=8]="Module",Ve[Ve.Property=9]="Property",Ve[Ve.Unit=10]="Unit",Ve[Ve.Value=11]="Value",Ve[Ve.Enum=12]="Enum",Ve[Ve.Keyword=13]="Keyword",Ve[Ve.Snippet=14]="Snippet",Ve[Ve.Color=15]="Color",Ve[Ve.File=16]="File",Ve[Ve.Reference=17]="Reference",Ve[Ve.Folder=18]="Folder",Ve[Ve.EnumMember=19]="EnumMember",Ve[Ve.Constant=20]="Constant",Ve[Ve.Struct=21]="Struct",Ve[Ve.Event=22]="Event",Ve[Ve.Operator=23]="Operator",Ve[Ve.TypeParameter=24]="TypeParameter",Ve[Ve.User=25]="User",Ve[Ve.Issue=26]="Issue"})(Me=e.CompletionItemKind||(e.CompletionItemKind={}));var Oe;(function(Ve){Ve[Ve.Deprecated=1]="Deprecated"})(Oe=e.CompletionItemTag||(e.CompletionItemTag={}));let Ke=class{constructor(xe,et){this.label=xe,this.kind=et}toJSON(){return{label:this.label,kind:this.kind&&Me[this.kind],detail:this.detail,documentation:this.documentation,sortText:this.sortText,filterText:this.filterText,preselect:this.preselect,insertText:this.insertText,textEdit:this.textEdit}}};Ke=we([V],Ke),e.CompletionItem=Ke;let We=class{constructor(xe=[],et=!1){this.items=xe,this.isIncomplete=et}};We=we([V],We),e.CompletionList=We;let Xe=class{constructor(xe,et,vt){this.insertText=xe,this.range=et,this.command=vt}};Xe=we([V],Xe),e.InlineSuggestion=Xe;let Je=class{constructor(xe){this.commands=void 0,this.items=xe}};Je=we([V],Je),e.InlineSuggestionList=Je;let rt=class{constructor(xe,et,vt){this.insertText=xe,this.range=et,this.command=vt}};rt=we([V],rt),e.InlineSuggestionNew=rt;let je=class{constructor(xe,et){this.items=xe,this.commands=et}};je=we([V],je),e.InlineSuggestionsNew=je;var Ue;(function(Ve){Ve[Ve.Active=-1]="Active",Ve[Ve.Beside=-2]="Beside",Ve[Ve.One=1]="One",Ve[Ve.Two=2]="Two",Ve[Ve.Three=3]="Three",Ve[Ve.Four=4]="Four",Ve[Ve.Five=5]="Five",Ve[Ve.Six=6]="Six",Ve[Ve.Seven=7]="Seven",Ve[Ve.Eight=8]="Eight",Ve[Ve.Nine=9]="Nine"})(Ue=e.ViewColumn||(e.ViewColumn={}));var Fe;(function(Ve){Ve[Ve.Left=1]="Left",Ve[Ve.Right=2]="Right"})(Fe=e.StatusBarAlignment||(e.StatusBarAlignment={}));var He;(function(Ve){Ve[Ve.Off=0]="Off",Ve[Ve.On=1]="On",Ve[Ve.Relative=2]="Relative"})(He=e.TextEditorLineNumbersStyle||(e.TextEditorLineNumbersStyle={}));var Be;(function(Ve){Ve[Ve.Manual=1]="Manual",Ve[Ve.AfterDelay=2]="AfterDelay",Ve[Ve.FocusOut=3]="FocusOut"})(Be=e.TextDocumentSaveReason||(e.TextDocumentSaveReason={}));var ze;(function(Ve){Ve[Ve.Default=0]="Default",Ve[Ve.InCenter=1]="InCenter",Ve[Ve.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",Ve[Ve.AtTop=3]="AtTop"})(ze=e.TextEditorRevealType||(e.TextEditorRevealType={}));var nt;(function(Ve){Ve[Ve.Keyboard=1]="Keyboard",Ve[Ve.Mouse=2]="Mouse",Ve[Ve.Command=3]="Command"})(nt=e.TextEditorSelectionChangeKind||(e.TextEditorSelectionChangeKind={}));var ut;(function(Ve){Ve[Ve.Undo=1]="Undo",Ve[Ve.Redo=2]="Redo"})(ut=e.TextDocumentChangeReason||(e.TextDocumentChangeReason={}));var ot;(function(Ve){Ve[Ve.OpenOpen=0]="OpenOpen",Ve[Ve.ClosedClosed=1]="ClosedClosed",Ve[Ve.OpenClosed=2]="OpenClosed",Ve[Ve.ClosedOpen=3]="ClosedOpen"})(ot=e.DecorationRangeBehavior||(e.DecorationRangeBehavior={})),function(Ve){function xe(et){switch(et){case"keyboard":return Ve.Keyboard;case"mouse":return Ve.Mouse;case"api":return Ve.Command}}Ve.fromValue=xe}(nt=e.TextEditorSelectionChangeKind||(e.TextEditorSelectionChangeKind={}));let at=class{constructor(xe,et){if(et&&!b.URI.isUri(et))throw(0,p.illegalArgument)("target");if(!H.isRange(xe)||xe.isEmpty)throw(0,p.illegalArgument)("range");this.range=xe,this.target=et}};at=we([V],at),e.DocumentLink=at;let wt=class{constructor(xe,et,vt,Pt){this.red=xe,this.green=et,this.blue=vt,this.alpha=Pt}};wt=we([V],wt),e.Color=wt;let It=class{constructor(xe,et){if(et&&!(et instanceof wt))throw(0,p.illegalArgument)("color");if(!H.isRange(xe)||xe.isEmpty)throw(0,p.illegalArgument)("range");this.range=xe,this.color=et}};It=we([V],It),e.ColorInformation=It;let _t=class{constructor(xe){if(!xe||typeof xe!="string")throw(0,p.illegalArgument)("label");this.label=xe}};_t=we([V],_t),e.ColorPresentation=_t;var lt;(function(Ve){Ve[Ve.RGB=0]="RGB",Ve[Ve.HEX=1]="HEX",Ve[Ve.HSL=2]="HSL"})(lt=e.ColorFormat||(e.ColorFormat={}));var pt;(function(Ve){Ve[Ve.Error=0]="Error",Ve[Ve.Warning=1]="Warning",Ve[Ve.Information=2]="Information"})(pt=e.SourceControlInputBoxValidationType||(e.SourceControlInputBoxValidationType={}));var st;(function(Ve){Ve[Ve.Unknown=0]="Unknown",Ve[Ve.Shutdown=1]="Shutdown",Ve[Ve.Process=2]="Process",Ve[Ve.User=3]="User",Ve[Ve.Extension=4]="Extension"})(st=e.TerminalExitReason||(e.TerminalExitReason={}));class qe{constructor(xe,et,vt){if(this.startIndex=xe,this.length=et,this.tooltip=vt,typeof xe!="number"||xe<0)throw(0,p.illegalArgument)("startIndex");if(typeof et!="number"||et<1)throw(0,p.illegalArgument)("length");if(vt!==void 0&&typeof vt!="string")throw(0,p.illegalArgument)("tooltip")}}e.TerminalLink=qe;var Et;(function(Ve){Ve[Ve.Panel=1]="Panel",Ve[Ve.Editor=2]="Editor"})(Et=e.TerminalLocation||(e.TerminalLocation={}));class Tt{constructor(xe){if(this.options=xe,typeof xe!="object")throw(0,p.illegalArgument)("options")}}e.TerminalProfile=Tt;var xt;(function(Ve){Ve[Ve.Always=1]="Always",Ve[Ve.Silent=2]="Silent",Ve[Ve.Never=3]="Never"})(xt=e.TaskRevealKind||(e.TaskRevealKind={}));var At;(function(Ve){Ve[Ve.Shared=1]="Shared",Ve[Ve.Dedicated=2]="Dedicated",Ve[Ve.New=3]="New"})(At=e.TaskPanelKind||(e.TaskPanelKind={}));let Nt=L=class{static from(xe){switch(xe){case"clean":return L.Clean;case"build":return L.Build;case"rebuild":return L.Rebuild;case"test":return L.Test;default:return}}constructor(xe,et){if(this.label=et,typeof xe!="string"||typeof et!="string")throw(0,p.illegalArgument)("name");this._id=xe}get id(){return this._id}};Nt.Clean=new L("clean","Clean"),Nt.Build=new L("build","Build"),Nt.Rebuild=new L("rebuild","Rebuild"),Nt.Test=new L("test","Test"),Nt=L=we([V],Nt),e.TaskGroup=Nt;function kt(Ve){let xe="";for(let et=0;et<Ve.length;et++)xe+=Ve[et].replace(/,/g,",,")+",";return xe}let Ne=class{constructor(xe,et,vt){if(typeof xe!="string")throw(0,p.illegalArgument)("process");this._args=[],this._process=xe,et!==void 0&&(Array.isArray(et)?(this._args=et,this._options=vt):this._options=et)}get process(){return this._process}set process(xe){if(typeof xe!="string")throw(0,p.illegalArgument)("process");this._process=xe}get args(){return this._args}set args(xe){Array.isArray(xe)||(xe=[]),this._args=xe}get options(){return this._options}set options(xe){this._options=xe}computeId(){const xe=[];if(xe.push("process"),this._process!==void 0&&xe.push(this._process),this._args&&this._args.length>0)for(const et of this._args)xe.push(et);return kt(xe)}};Ne=we([V],Ne),e.ProcessExecution=Ne;let Ge=class{constructor(xe,et,vt){if(this._args=[],Array.isArray(et)){if(!xe)throw(0,p.illegalArgument)("command can't be undefined or null");if(typeof xe!="string"&&typeof xe.value!="string")throw(0,p.illegalArgument)("command");this._command=xe,this._args=et,this._options=vt}else{if(typeof xe!="string")throw(0,p.illegalArgument)("commandLine");this._commandLine=xe,this._options=et}}get commandLine(){return this._commandLine}set commandLine(xe){if(typeof xe!="string")throw(0,p.illegalArgument)("commandLine");this._commandLine=xe}get command(){return this._command?this._command:""}set command(xe){if(typeof xe!="string"&&typeof xe.value!="string")throw(0,p.illegalArgument)("command");this._command=xe}get args(){return this._args}set args(xe){this._args=xe||[]}get options(){return this._options}set options(xe){this._options=xe}computeId(){const xe=[];if(xe.push("shell"),this._commandLine!==void 0&&xe.push(this._commandLine),this._command!==void 0&&xe.push(typeof this._command=="string"?this._command:this._command.value),this._args&&this._args.length>0)for(const et of this._args)xe.push(typeof et=="string"?et:et.value);return kt(xe)}};Ge=we([V],Ge),e.ShellExecution=Ge;var Ze;(function(Ve){Ve[Ve.Escape=1]="Escape",Ve[Ve.Strong=2]="Strong",Ve[Ve.Weak=3]="Weak"})(Ze=e.ShellQuoting||(e.ShellQuoting={}));var ft;(function(Ve){Ve[Ve.Global=1]="Global",Ve[Ve.Workspace=2]="Workspace"})(ft=e.TaskScope||(e.TaskScope={}));class Dt{constructor(xe){this._callback=xe}computeId(){return"customExecution"+(0,S.generateUuid)()}set callback(xe){this._callback=xe}get callback(){return this._callback}}e.CustomExecution=Dt;let St=M=class{constructor(xe,et,vt,Pt,Vt,Ht){this.__deprecated=!1,this._definition=this.definition=xe;let Gt;typeof et=="string"?(this._name=this.name=et,this._source=this.source=vt,this.execution=Pt,Gt=Vt,this.__deprecated=!0):et===ft.Global||et===ft.Workspace?(this.target=et,this._name=this.name=vt,this._source=this.source=Pt,this.execution=Vt,Gt=Ht):(this.target=et,this._name=this.name=vt,this._source=this.source=Pt,this.execution=Vt,Gt=Ht),typeof Gt=="string"?(this._problemMatchers=[Gt],this._hasDefinedMatchers=!0):Array.isArray(Gt)?(this._problemMatchers=Gt,this._hasDefinedMatchers=!0):(this._problemMatchers=[],this._hasDefinedMatchers=!1),this._isBackground=!1,this._presentationOptions=Object.create(null),this._runOptions=Object.create(null)}get _id(){return this.__id}set _id(xe){this.__id=xe}get _deprecated(){return this.__deprecated}clear(){this.__id!==void 0&&(this.__id=void 0,this._scope=void 0,this.computeDefinitionBasedOnExecution())}computeDefinitionBasedOnExecution(){this._execution instanceof Ne?this._definition={type:M.ProcessType,id:this._execution.computeId()}:this._execution instanceof Ge?this._definition={type:M.ShellType,id:this._execution.computeId()}:this._execution instanceof Dt?this._definition={type:M.ExtensionCallbackType,id:this._execution.computeId()}:this._definition={type:M.EmptyType,id:(0,S.generateUuid)()}}get definition(){return this._definition}set definition(xe){if(xe==null)throw(0,p.illegalArgument)("Kind can't be undefined or null");this.clear(),this._definition=xe}get scope(){return this._scope}set target(xe){this.clear(),this._scope=xe}get name(){return this._name}set name(xe){if(typeof xe!="string")throw(0,p.illegalArgument)("name");this.clear(),this._name=xe}get execution(){return this._execution}set execution(xe){xe===null&&(xe=void 0),this.clear(),this._execution=xe;const et=this._definition.type;(M.EmptyType===et||M.ProcessType===et||M.ShellType===et||M.ExtensionCallbackType===et)&&this.computeDefinitionBasedOnExecution()}get problemMatchers(){return this._problemMatchers}set problemMatchers(xe){if(Array.isArray(xe))this.clear(),this._problemMatchers=xe,this._hasDefinedMatchers=!0;else{this.clear(),this._problemMatchers=[],this._hasDefinedMatchers=!1;return}}get hasDefinedMatchers(){return this._hasDefinedMatchers}get isBackground(){return this._isBackground}set isBackground(xe){xe!==!0&&xe!==!1&&(xe=!1),this.clear(),this._isBackground=xe}get source(){return this._source}set source(xe){if(typeof xe!="string"||xe.length===0)throw(0,p.illegalArgument)("source must be a string of length > 0");this.clear(),this._source=xe}get group(){return this._group}set group(xe){xe===null&&(xe=void 0),this.clear(),this._group=xe}get detail(){return this._detail}set detail(xe){xe===null&&(xe=void 0),this._detail=xe}get presentationOptions(){return this._presentationOptions}set presentationOptions(xe){xe==null&&(xe=Object.create(null)),this.clear(),this._presentationOptions=xe}get runOptions(){return this._runOptions}set runOptions(xe){xe==null&&(xe=Object.create(null)),this.clear(),this._runOptions=xe}};St.ExtensionCallbackType="customExecution",St.ProcessType="process",St.ShellType="shell",St.EmptyType="$empty",St=M=we([V],St),e.Task=St;var Ye;(function(Ve){Ve[Ve.SourceControl=1]="SourceControl",Ve[Ve.Window=10]="Window",Ve[Ve.Notification=15]="Notification"})(Ye=e.ProgressLocation||(e.ProgressLocation={}));var it;(function(Ve){function xe(et){const vt=et;return(0,I.isNumber)(vt.value)?vt.tooltip&&!(0,I.isString)(vt.tooltip)?(console.log("INVALID view badge, invalid tooltip",vt.tooltip),!1):!0:(console.log("INVALID view badge, invalid value",vt.value),!1)}Ve.isViewBadge=xe})(it=e.ViewBadge||(e.ViewBadge={}));let ct=O=class{static isTreeItem(xe,et){if(xe instanceof O)return!0;const vt=xe;if(vt.label!==void 0&&!(0,I.isString)(vt.label)&&!vt.label?.label)return console.log("INVALID tree item, invalid label",vt.label),!1;if(vt.id!==void 0&&!(0,I.isString)(vt.id))return console.log("INVALID tree item, invalid id",vt.id),!1;if(vt.iconPath!==void 0&&!(0,I.isString)(vt.iconPath)&&!b.URI.isUri(vt.iconPath)&&(!vt.iconPath||!(0,I.isString)(vt.iconPath.id))){const Pt=vt.iconPath;if(!Pt||!(0,I.isString)(Pt.light)&&!b.URI.isUri(Pt.light)&&!(0,I.isString)(Pt.dark)&&!b.URI.isUri(Pt.dark))return console.log("INVALID tree item, invalid iconPath",vt.iconPath),!1}if(vt.description!==void 0&&!(0,I.isString)(vt.description)&&typeof vt.description!="boolean")return console.log("INVALID tree item, invalid description",vt.description),!1;if(vt.resourceUri!==void 0&&!b.URI.isUri(vt.resourceUri))return console.log("INVALID tree item, invalid resourceUri",vt.resourceUri),!1;if(vt.tooltip!==void 0&&!(0,I.isString)(vt.tooltip)&&!(vt.tooltip instanceof Pe))return console.log("INVALID tree item, invalid tooltip",vt.tooltip),!1;if(vt.command!==void 0&&!vt.command.command)return console.log("INVALID tree item, invalid command",vt.command),!1;if(vt.collapsibleState!==void 0&&vt.collapsibleState<gt.None&&vt.collapsibleState>gt.Expanded)return console.log("INVALID tree item, invalid collapsibleState",vt.collapsibleState),!1;if(vt.contextValue!==void 0&&!(0,I.isString)(vt.contextValue))return console.log("INVALID tree item, invalid contextValue",vt.contextValue),!1;if(vt.accessibilityInformation!==void 0&&!vt.accessibilityInformation?.label)return console.log("INVALID tree item, invalid accessibilityInformation",vt.accessibilityInformation),!1;if(vt.checkboxState!==void 0){(0,i.checkProposedApiEnabled)(et,"treeItemCheckbox");const Pt=(0,I.isNumber)(vt.checkboxState)?vt.checkboxState:(0,I.isObject)(vt.checkboxState)&&(0,I.isNumber)(vt.checkboxState.state)?vt.checkboxState.state:void 0,Vt=!(0,I.isNumber)(vt.checkboxState)&&(0,I.isObject)(vt.checkboxState)?vt.checkboxState.tooltip:void 0;if(Pt===void 0||Pt!==$e.Checked&&Pt!==$e.Unchecked||Vt!==void 0&&!(0,I.isString)(Vt))return console.log("INVALID tree item, invalid checkboxState",vt.checkboxState),!1}return!0}constructor(xe,et=gt.None){this.collapsibleState=et,b.URI.isUri(xe)?this.resourceUri=xe:this.label=xe}};ct=O=we([V],ct),e.TreeItem=ct;var gt;(function(Ve){Ve[Ve.None=0]="None",Ve[Ve.Collapsed=1]="Collapsed",Ve[Ve.Expanded=2]="Expanded"})(gt=e.TreeItemCollapsibleState||(e.TreeItemCollapsibleState={}));var $e;(function(Ve){Ve[Ve.Unchecked=0]="Unchecked",Ve[Ve.Checked=1]="Checked"})($e=e.TreeItemCheckboxState||(e.TreeItemCheckboxState={}));let Qe=class{async asString(){return typeof this.value=="string"?this.value:JSON.stringify(this.value)}asFile(){}constructor(xe,et){this.value=xe,this.id=et??(0,S.generateUuid)()}};Qe=we([V],Qe),e.DataTransferItem=Qe;let tt=class{constructor(xe){l.set(this,new Map);for(const[et,vt]of xe??[]){const Pt=yt(this,l,"f").get(et);Pt?Pt.push(vt):yt(this,l,"f").set(et,[vt])}}get(xe){return yt(this,l,"f").get(xe)?.[0]}set(xe,et){yt(this,l,"f").set(xe,[et])}forEach(xe,et){for(const[vt,Pt]of yt(this,l,"f"))for(const Vt of Pt)xe.call(et,Vt,vt,this)}*[(l=new WeakMap,Symbol.iterator)](){for(const[xe,et]of yt(this,l,"f"))for(const vt of et)yield[xe,vt]}};tt=we([V],tt),e.DataTransfer=tt;let Ct=class{constructor(xe){this.insertText=xe}};Ct=we([V],Ct),e.DocumentDropEdit=Ct;let bt=class{constructor(xe){this.insertText=xe}};bt=we([V],bt),e.DocumentPasteEdit=bt;let Rt=class{constructor(xe,et){this.id=xe,this.color=et}};Rt=we([V],Rt),e.ThemeIcon=Rt,Rt.File=new Rt("file"),Rt.Folder=new Rt("folder");let Mt=class{constructor(xe){this.id=xe}};Mt=we([V],Mt),e.ThemeColor=Mt;var Ft;(function(Ve){Ve[Ve.Global=1]="Global",Ve[Ve.Workspace=2]="Workspace",Ve[Ve.WorkspaceFolder=3]="WorkspaceFolder"})(Ft=e.ConfigurationTarget||(e.ConfigurationTarget={}));let zt=class{get base(){return this._base}set base(xe){this._base=xe,this._baseUri=b.URI.file(xe)}get baseUri(){return this._baseUri}set baseUri(xe){this._baseUri=xe,this._base=xe.fsPath}constructor(xe,et){if(typeof xe!="string"&&(!xe||!b.URI.isUri(xe)&&!b.URI.isUri(xe.uri)))throw(0,p.illegalArgument)("base");if(typeof et!="string")throw(0,p.illegalArgument)("pattern");typeof xe=="string"?this.baseUri=b.URI.file(xe):b.URI.isUri(xe)?this.baseUri=xe:this.baseUri=xe.uri,this.pattern=et}toJSON(){return{pattern:this.pattern,base:this.base,baseUri:this.baseUri.toJSON()}}};zt=we([V],zt),e.RelativePattern=zt;let Bt=class{constructor(xe,et,vt,Pt){this.enabled=typeof xe=="boolean"?xe:!0,typeof et=="string"&&(this.condition=et),typeof vt=="string"&&(this.hitCondition=vt),typeof Pt=="string"&&(this.logMessage=Pt)}get id(){return this._id||(this._id=(0,S.generateUuid)()),this._id}};Bt=we([V],Bt),e.Breakpoint=Bt;let qt=class extends Bt{constructor(xe,et,vt,Pt,Vt){if(super(et,vt,Pt,Vt),xe===null)throw(0,p.illegalArgument)("location");this.location=xe}};qt=we([V],qt),e.SourceBreakpoint=qt;let Xt=class extends Bt{constructor(xe,et,vt,Pt,Vt){super(et,vt,Pt,Vt),this.functionName=xe}};Xt=we([V],Xt),e.FunctionBreakpoint=Xt;let Yt=class extends Bt{constructor(xe,et,vt,Pt,Vt,Ht,Gt){if(super(Pt,Vt,Ht,Gt),!et)throw(0,p.illegalArgument)("dataId");this.label=xe,this.dataId=et,this.canPersist=vt}};Yt=we([V],Yt),e.DataBreakpoint=Yt;let ei=class{constructor(xe,et,vt){this.command=xe,this.args=et||[],this.options=vt}};ei=we([V],ei),e.DebugAdapterExecutable=ei;let Qt=class{constructor(xe,et){this.port=xe,this.host=et}};Qt=we([V],Qt),e.DebugAdapterServer=Qt;let $t=class{constructor(xe){this.path=xe}};$t=we([V],$t),e.DebugAdapterNamedPipeServer=$t;let ii=class{constructor(xe){this.implementation=xe}};ii=we([V],ii),e.DebugAdapterInlineImplementation=ii;let Lt=class{constructor(xe,et){this.range=xe,this.expression=et}};Lt=we([V],Lt),e.EvaluatableExpression=Lt;var dt;(function(Ve){Ve[Ve.Invoke=0]="Invoke",Ve[Ve.Automatic=1]="Automatic"})(dt=e.InlineCompletionTriggerKind||(e.InlineCompletionTriggerKind={}));var ht;(function(Ve){Ve[Ve.Invoke=0]="Invoke",Ve[Ve.Automatic=1]="Automatic"})(ht=e.InlineCompletionTriggerKindNew||(e.InlineCompletionTriggerKindNew={}));let mt=class{constructor(xe,et){this.range=xe,this.text=et}};mt=we([V],mt),e.InlineValueText=mt;let Ot=class{constructor(xe,et,vt=!0){this.range=xe,this.variableName=et,this.caseSensitiveLookup=vt}};Ot=we([V],Ot),e.InlineValueVariableLookup=Ot;let Wt=class{constructor(xe,et){this.range=xe,this.expression=et}};Wt=we([V],Wt),e.InlineValueEvaluatableExpression=Wt;let jt=class{constructor(xe,et){this.frameId=xe,this.stoppedLocation=et}};jt=we([V],jt),e.InlineValueContext=jt;var ci;(function(Ve){Ve[Ve.Changed=1]="Changed",Ve[Ve.Created=2]="Created",Ve[Ve.Deleted=3]="Deleted"})(ci=e.FileChangeType||(e.FileChangeType={}));let Oi=N=class extends Error{static FileExists(xe){return new N(xe,C.FileSystemProviderErrorCode.FileExists,N.FileExists)}static FileNotFound(xe){return new N(xe,C.FileSystemProviderErrorCode.FileNotFound,N.FileNotFound)}static FileNotADirectory(xe){return new N(xe,C.FileSystemProviderErrorCode.FileNotADirectory,N.FileNotADirectory)}static FileIsADirectory(xe){return new N(xe,C.FileSystemProviderErrorCode.FileIsADirectory,N.FileIsADirectory)}static NoPermissions(xe){return new N(xe,C.FileSystemProviderErrorCode.NoPermissions,N.NoPermissions)}static Unavailable(xe){return new N(xe,C.FileSystemProviderErrorCode.Unavailable,N.Unavailable)}constructor(xe,et=C.FileSystemProviderErrorCode.Unknown,vt){super(b.URI.isUri(xe)?xe.toString(!0):xe),this.code=vt?.name??"Unknown",(0,C.markAsFileSystemProviderError)(this,et),typeof Object.setPrototypeOf=="function"&&Object.setPrototypeOf(this,N.prototype),typeof Error.captureStackTrace=="function"&&typeof vt=="function"&&Error.captureStackTrace(this,vt)}};Oi=N=we([V],Oi),e.FileSystemError=Oi;let Qr=class{constructor(xe,et,vt){this.start=xe,this.end=et,this.kind=vt}};Qr=we([V],Qr),e.FoldingRange=Qr;var md;(function(Ve){Ve[Ve.Comment=1]="Comment",Ve[Ve.Imports=2]="Imports",Ve[Ve.Region=3]="Region"})(md=e.FoldingRangeKind||(e.FoldingRangeKind={}));var vd;(function(Ve){Ve[Ve.Collapsed=0]="Collapsed",Ve[Ve.Expanded=1]="Expanded"})(vd=e.CommentThreadCollapsibleState||(e.CommentThreadCollapsibleState={}));var Sd;(function(Ve){Ve[Ve.Editing=0]="Editing",Ve[Ve.Preview=1]="Preview"})(Sd=e.CommentMode||(e.CommentMode={}));var bd;(function(Ve){Ve[Ve.Unresolved=0]="Unresolved",Ve[Ve.Resolved=1]="Resolved"})(bd=e.CommentThreadState||(e.CommentThreadState={}));class Cd{constructor(xe,et=[]){this.tokenTypes=xe,this.tokenModifiers=et}}e.SemanticTokensLegend=Cd;function wd(Ve){return typeof Ve>"u"||(0,I.isStringArray)(Ve)}class Jr{constructor(xe){if(this._prevLine=0,this._prevChar=0,this._dataIsSortedAndDeltaEncoded=!0,this._data=[],this._dataLen=0,this._tokenTypeStrToInt=new Map,this._tokenModifierStrToInt=new Map,this._hasLegend=!1,xe){this._hasLegend=!0;for(let et=0,vt=xe.tokenTypes.length;et<vt;et++)this._tokenTypeStrToInt.set(xe.tokenTypes[et],et);for(let et=0,vt=xe.tokenModifiers.length;et<vt;et++)this._tokenModifierStrToInt.set(xe.tokenModifiers[et],et)}}push(xe,et,vt,Pt,Vt){if(typeof xe=="number"&&typeof et=="number"&&typeof vt=="number"&&typeof Pt=="number"&&(typeof Vt=="number"||typeof Vt>"u"))return typeof Vt>"u"&&(Vt=0),this._pushEncoded(xe,et,vt,Pt,Vt);if(H.isRange(xe)&&typeof et=="string"&&wd(vt))return this._push(xe,et,vt);throw(0,p.illegalArgument)()}_push(xe,et,vt){if(!this._hasLegend)throw new Error("Legend must be provided in constructor");if(xe.start.line!==xe.end.line)throw new Error("`range` cannot span multiple lines");if(!this._tokenTypeStrToInt.has(et))throw new Error("`tokenType` is not in the provided legend");const Pt=xe.start.line,Vt=xe.start.character,Ht=xe.end.character-xe.start.character,Gt=this._tokenTypeStrToInt.get(et);let ai=0;if(vt)for(const gi of vt){if(!this._tokenModifierStrToInt.has(gi))throw new Error("`tokenModifier` is not in the provided legend");const mi=this._tokenModifierStrToInt.get(gi);ai|=1<<mi>>>0}this._pushEncoded(Pt,Vt,Ht,Gt,ai)}_pushEncoded(xe,et,vt,Pt,Vt){if(this._dataIsSortedAndDeltaEncoded&&(xe<this._prevLine||xe===this._prevLine&&et<this._prevChar)){this._dataIsSortedAndDeltaEncoded=!1;const ai=this._data.length/5|0;let gi=0,mi=0;for(let Si=0;Si<ai;Si++){let Ti=this._data[5*Si],Rn=this._data[5*Si+1];Ti===0?(Ti=gi,Rn+=mi):Ti+=gi,this._data[5*Si]=Ti,this._data[5*Si+1]=Rn,gi=Ti,mi=Rn}}let Ht=xe,Gt=et;this._dataIsSortedAndDeltaEncoded&&this._dataLen>0&&(Ht-=this._prevLine,Ht===0&&(Gt-=this._prevChar)),this._data[this._dataLen++]=Ht,this._data[this._dataLen++]=Gt,this._data[this._dataLen++]=vt,this._data[this._dataLen++]=Pt,this._data[this._dataLen++]=Vt,this._prevLine=xe,this._prevChar=et}static _sortAndDeltaEncode(xe){const et=[],vt=xe.length/5|0;for(let Gt=0;Gt<vt;Gt++)et[Gt]=Gt;et.sort((Gt,ai)=>{const gi=xe[5*Gt],mi=xe[5*ai];if(gi===mi){const Si=xe[5*Gt+1],Ti=xe[5*ai+1];return Si-Ti}return gi-mi});const Pt=new Uint32Array(xe.length);let Vt=0,Ht=0;for(let Gt=0;Gt<vt;Gt++){const ai=5*et[Gt],gi=xe[ai+0],mi=xe[ai+1],Si=xe[ai+2],Ti=xe[ai+3],Rn=xe[ai+4],Ho=gi-Vt,su=Ho===0?mi-Ht:mi,_n=5*Gt;Pt[_n+0]=Ho,Pt[_n+1]=su,Pt[_n+2]=Si,Pt[_n+3]=Ti,Pt[_n+4]=Rn,Vt=gi,Ht=mi}return Pt}build(xe){return this._dataIsSortedAndDeltaEncoded?new Zr(new Uint32Array(this._data),xe):new Zr(Jr._sortAndDeltaEncode(this._data),xe)}}e.SemanticTokensBuilder=Jr;class Zr{constructor(xe,et){this.resultId=et,this.data=xe}}e.SemanticTokens=Zr;class Ed{constructor(xe,et,vt){this.start=xe,this.deleteCount=et,this.data=vt}}e.SemanticTokensEdit=Ed;class yd{constructor(xe,et){this.resultId=et,this.edits=xe}}e.SemanticTokensEdits=yd;var Id;(function(Ve){Ve[Ve.Separate=0]="Separate",Ve[Ve.MergeWithParent=1]="MergeWithParent"})(Id=e.DebugConsoleMode||(e.DebugConsoleMode={}));let Zn=class{constructor(){}};Zn.Back={iconPath:new Rt("arrow-left")},Zn=we([V],Zn),e.QuickInputButtons=Zn;var Dd;(function(Ve){Ve[Ve.Separator=-1]="Separator",Ve[Ve.Default=0]="Default"})(Dd=e.QuickPickItemKind||(e.QuickPickItemKind={}));var Td;(function(Ve){Ve[Ve.Info=1]="Info",Ve[Ve.Warning=2]="Warning",Ve[Ve.Error=3]="Error"})(Td=e.InputBoxValidationSeverity||(e.InputBoxValidationSeverity={}));var kd;(function(Ve){Ve[Ve.UI=1]="UI",Ve[Ve.Workspace=2]="Workspace"})(kd=e.ExtensionKind||(e.ExtensionKind={}));class Rd{static validate(xe){if(xe.badge){let et=(0,E.nextCharLength)(xe.badge,0);if(et<xe.badge.length&&(et+=(0,E.nextCharLength)(xe.badge,et)),xe.badge.length>et)throw new Error("The 'badge'-property must be undefined or a short character")}if(!xe.color&&!xe.badge&&!xe.tooltip)throw new Error("The decoration is empty");return!0}constructor(xe,et,vt){this.badge=xe,this.tooltip=et,this.color=vt}}e.FileDecoration=Rd;let es=class{constructor(xe){this.kind=xe}};es=we([V],es),e.ColorTheme=es;var _d;(function(Ve){Ve[Ve.Light=1]="Light",Ve[Ve.Dark=2]="Dark",Ve[Ve.HighContrast=3]="HighContrast",Ve[Ve.HighContrastLight=4]="HighContrastLight"})(_d=e.ColorThemeKind||(e.ColorThemeKind={}));class Ni{static isNotebookRange(xe){return xe instanceof Ni?!0:xe?typeof xe.start=="number"&&typeof xe.end=="number":!1}get start(){return this._start}get end(){return this._end}get isEmpty(){return this._start===this._end}constructor(xe,et){if(xe<0)throw(0,p.illegalArgument)("start must be positive");if(et<0)throw(0,p.illegalArgument)("end must be positive");xe<=et?(this._start=xe,this._end=et):(this._start=et,this._end=xe)}with(xe){let et=this._start,vt=this._end;return xe.start!==void 0&&(et=xe.start),xe.end!==void 0&&(vt=xe.end),et===this._start&&vt===this._end?this:new Ni(et,vt)}}e.NotebookRange=Ni;class er{static validate(xe){if(typeof xe.kind!="number")throw new Error("NotebookCellData MUST have 'kind' property");if(typeof xe.value!="string")throw new Error("NotebookCellData MUST have 'value' property");if(typeof xe.languageId!="string")throw new Error("NotebookCellData MUST have 'languageId' property")}static isNotebookCellDataArray(xe){return Array.isArray(xe)&&xe.every(et=>er.isNotebookCellData(et))}static isNotebookCellData(xe){return!0}constructor(xe,et,vt,Pt,Vt,Ht,Gt){this.kind=xe,this.value=et,this.languageId=vt,this.mime=Pt,this.outputs=Vt??[],this.metadata=Ht,this.executionSummary=Gt,er.validate(this)}}e.NotebookCellData=er;class Ad{constructor(xe){this.cells=xe}}e.NotebookData=Ad;class pi{static isNotebookCellOutputItem(xe){return xe instanceof pi?!0:xe?typeof xe.mime=="string"&&xe.data instanceof Uint8Array:!1}static error(xe){const et={name:xe.name,message:xe.message,stack:xe.stack};return pi.json(et,"application/vnd.code.notebook.error")}static stdout(xe){return pi.text(xe,"application/vnd.code.notebook.stdout")}static stderr(xe){return pi.text(xe,"application/vnd.code.notebook.stderr")}static bytes(xe,et="application/octet-stream"){return new pi(xe,et)}static text(xe,et=k.Mimes.text){const vt=yt(pi,s,"f",d).encode(String(xe));return new pi(vt,et)}static json(xe,et="text/x-json"){const vt=JSON.stringify(xe,void 0," ");return pi.text(vt,et)}constructor(xe,et){this.data=xe,this.mime=et;const vt=(0,k.normalizeMimeType)(et,!0);if(!vt)throw new Error(`INVALID mime type: ${et}. Must be in the format "type/subtype[;optionalparameter]"`);this.mime=vt}}e.NotebookCellOutputItem=pi,s=pi,d={value:new TextEncoder};class tr{static isNotebookCellOutput(xe){return xe instanceof tr?!0:!xe||typeof xe!="object"?!1:typeof xe.id=="string"&&Array.isArray(xe.items)}static ensureUniqueMimeTypes(xe,et=!1){const vt=new Set,Pt=new Set;for(let Vt=0;Vt<xe.length;Vt++){const Ht=xe[Vt],Gt=(0,k.normalizeMimeType)(Ht.mime);if(!vt.has(Gt)||(0,u.isTextStreamMime)(Gt)){vt.add(Gt);continue}Pt.add(Vt),et&&console.warn(`DUPLICATED mime type '${Ht.mime}' will be dropped`)}return Pt.size===0?xe:xe.filter((Vt,Ht)=>!Pt.has(Ht))}constructor(xe,et,vt){this.items=tr.ensureUniqueMimeTypes(xe,!0),typeof et=="string"?(this.id=et,this.metadata=vt):(this.id=(0,S.generateUuid)(),this.metadata=et??vt)}}e.NotebookCellOutput=tr;var Ld;(function(Ve){Ve[Ve.Markup=1]="Markup",Ve[Ve.Code=2]="Code"})(Ld=e.NotebookCellKind||(e.NotebookCellKind={}));var Md;(function(Ve){Ve[Ve.Idle=1]="Idle",Ve[Ve.Pending=2]="Pending",Ve[Ve.Executing=3]="Executing"})(Md=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var Pd;(function(Ve){Ve[Ve.Left=1]="Left",Ve[Ve.Right=2]="Right"})(Pd=e.NotebookCellStatusBarAlignment||(e.NotebookCellStatusBarAlignment={}));var Od;(function(Ve){Ve[Ve.Default=0]="Default",Ve[Ve.InCenter=1]="InCenter",Ve[Ve.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",Ve[Ve.AtTop=3]="AtTop"})(Od=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));class Nd{constructor(xe,et){this.text=xe,this.alignment=et}}e.NotebookCellStatusBarItem=Nd;var xd;(function(Ve){Ve[Ve.Default=1]="Default",Ve[Ve.Preferred=2]="Preferred"})(xd=e.NotebookControllerAffinity||(e.NotebookControllerAffinity={}));var Fd;(function(Ve){Ve[Ve.Default=1]="Default",Ve[Ve.Preferred=2]="Preferred",Ve[Ve.Hidden=-1]="Hidden"})(Fd=e.NotebookControllerAffinity2||(e.NotebookControllerAffinity2={}));class Bd{constructor(xe,et=[]){this.uri=xe,this.provides=(0,t.asArray)(et)}}e.NotebookRendererScript=Bd;let ts=class{constructor(xe,et){this.label=xe,this.timestamp=et}};ts=we([V],ts),e.TimelineItem=ts;var Vd;(function(Ve){Ve[Ve.Production=1]="Production",Ve[Ve.Development=2]="Development",Ve[Ve.Test=3]="Test"})(Vd=e.ExtensionMode||(e.ExtensionMode={}));var Wd;(function(Ve){Ve[Ve.Node=1]="Node",Ve[Ve.Webworker=2]="Webworker"})(Wd=e.ExtensionRuntime||(e.ExtensionRuntime={}));var zd;(function(Ve){Ve[Ve.Other=0]="Other",Ve[Ve.Comment=1]="Comment",Ve[Ve.String=2]="String",Ve[Ve.RegEx=3]="RegEx"})(zd=e.StandardTokenType||(e.StandardTokenType={}));class Ud{constructor(xe,et){this.ranges=xe,this.wordPattern=et}}e.LinkedEditingRanges=Ud;class Hd{constructor(xe,et){this._port=xe,this._autoForwardAction=et}get port(){return this._port}get autoForwardAction(){return this._autoForwardAction}}e.PortAttributes=Hd;var Kd;(function(Ve){Ve[Ve.Queued=1]="Queued",Ve[Ve.Running=2]="Running",Ve[Ve.Passed=3]="Passed",Ve[Ve.Failed=4]="Failed",Ve[Ve.Skipped=5]="Skipped",Ve[Ve.Errored=6]="Errored"})(Kd=e.TestResultState||(e.TestResultState={}));var Gd;(function(Ve){Ve[Ve.Run=1]="Run",Ve[Ve.Debug=2]="Debug",Ve[Ve.Coverage=3]="Coverage"})(Gd=e.TestRunProfileKind||(e.TestRunProfileKind={}));let is=class{constructor(xe=void 0,et=void 0,vt=void 0){this.include=xe,this.exclude=et,this.profile=vt}};is=we([V],is),e.TestRunRequest=is;let ns=P=class{static diff(xe,et,vt){const Pt=new P(xe);return Pt.expectedOutput=et,Pt.actualOutput=vt,Pt}constructor(xe){this.message=xe}};ns=P=we([V],ns),e.TestMessage=ns;let rs=class{constructor(xe){this.id=xe}};rs=we([V],rs),e.TestTag=rs;let nn=class{constructor(xe,et){this.covered=xe,this.total=et}};nn=we([V],nn),e.CoveredCount=nn;let ss=B=class{static fromDetails(xe,et){const vt=new nn(0,0),Pt=new nn(0,0),Vt=new nn(0,0);for(const Gt of et)if("branches"in Gt){vt.total+=1,vt.covered+=Gt.executionCount>0?1:0;for(const ai of Gt.branches)Pt.total+=1,Pt.covered+=ai.executionCount>0?1:0}else Vt.total+=1,Vt.covered+=Gt.executionCount>0?1:0;const Ht=new B(xe,vt,Pt.total>0?Pt:void 0,Vt.total>0?Vt:void 0);return Ht.detailedCoverage=et,Ht}constructor(xe,et,vt,Pt){this.uri=xe,this.statementCoverage=et,this.branchCoverage=vt,this.functionCoverage=Pt}};ss=B=we([V],ss),e.FileCoverage=ss;let os=class{constructor(xe,et,vt=[]){this.executionCount=xe,this.location=et,this.branches=vt}};os=we([V],os),e.StatementCoverage=os;let as=class{constructor(xe,et){this.executionCount=xe,this.location=et}};as=we([V],as),e.BranchCoverage=as;let ls=class{constructor(xe,et){this.executionCount=xe,this.location=et}};ls=we([V],ls),e.FunctionCoverage=ls;var $d;(function(Ve){Ve[Ve.None=0]="None",Ve[Ve.Option=1]="Option",Ve[Ve.Default=2]="Default",Ve[Ve.Preferred=3]="Preferred"})($d=e.ExternalUriOpenerPriority||(e.ExternalUriOpenerPriority={}));var qd;(function(Ve){Ve[Ve.Untrusted=0]="Untrusted",Ve[Ve.Trusted=1]="Trusted",Ve[Ve.Unspecified=2]="Unspecified"})(qd=e.WorkspaceTrustState||(e.WorkspaceTrustState={}));var jd;(function(Ve){Ve[Ve.Notify=1]="Notify",Ve[Ve.OpenBrowser=2]="OpenBrowser",Ve[Ve.OpenPreview=3]="OpenPreview",Ve[Ve.Silent=4]="Silent",Ve[Ve.Ignore=5]="Ignore",Ve[Ve.OpenBrowserOnce=6]="OpenBrowserOnce"})(jd=e.PortAutoForwardAction||(e.PortAutoForwardAction={}));class Yd{constructor(xe,et,vt,Pt,Vt,Ht){this.kind=xe,this.name=et,this.detail=vt,this.uri=Pt,this.range=Vt,this.selectionRange=Ht}}e.TypeHierarchyItem=Yd;class Xd{constructor(xe){this.uri=xe}}e.TextTabInput=Xd;class Qd{constructor(xe,et){this.original=xe,this.modified=et}}e.TextDiffTabInput=Qd;class Jd{constructor(xe,et,vt,Pt){this.base=xe,this.input1=et,this.input2=vt,this.result=Pt}}e.TextMergeTabInput=Jd;class Zd{constructor(xe,et){this.uri=xe,this.viewType=et}}e.CustomEditorTabInput=Zd;class eu{constructor(xe){this.viewType=xe}}e.WebviewEditorTabInput=eu;class tu{constructor(xe,et){this.uri=xe,this.notebookType=et}}e.NotebookEditorTabInput=tu;class iu{constructor(xe,et,vt){this.original=xe,this.modified=et,this.notebookType=vt}}e.NotebookDiffEditorTabInput=iu;class nu{constructor(){}}e.TerminalEditorTabInput=nu;class ru{constructor(xe,et){this.uri=xe,this.inputBoxUri=et}}e.InteractiveWindowInput=ru}),define(ae[921],le([1,0,16,56,113,60,357,165,52,13,9,20,92,124,2418,43,64,229,259,24,2495,154]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransfer=e.DataTransferItem=e.ViewBadge=e.TypeHierarchyItem=e.CodeActionTriggerKind=e.TestCoverage=e.TestResults=e.TestItem=e.TestTag=e.TestMessage=e.NotebookRendererScript=e.NotebookDocumentContentOptions=e.NotebookStatusBarItem=e.NotebookExclusiveDocumentPattern=e.NotebookCellOutput=e.NotebookCellOutputItem=e.NotebookCellData=e.NotebookData=e.NotebookCellKind=e.NotebookCellExecutionState=e.NotebookCellExecutionSummary=e.NotebookRange=e.LanguageSelector=e.GlobPattern=e.TextEditorOpenOptions=e.FoldingRangeKind=e.FoldingRange=e.ProgressLocation=e.EndOfLine=e.TextEditorLineNumbersStyle=e.TextDocumentSaveReason=e.SelectionRange=e.Color=e.ColorPresentation=e.DocumentLink=e.InlayHintKind=e.InlayHintLabelPart=e.InlayHint=e.SignatureHelp=e.SignatureInformation=e.ParameterInformation=e.CompletionItem=e.CompletionItemKind=e.CompletionItemTag=e.CompletionContext=e.CompletionTriggerKind=e.DocumentHighlight=e.InlineValueContext=e.InlineValue=e.EvaluatableExpression=e.Hover=e.DefinitionLink=e.location=e.CallHierarchyOutgoingCall=e.CallHierarchyIncomingCall=e.CallHierarchyItem=e.DocumentSymbol=e.WorkspaceSymbol=e.SymbolTag=e.SymbolKind=e.WorkspaceEdit=e.TextEdit=e.DecorationRenderOptions=e.DecorationRangeBehavior=e.ThemableDecorationRenderOptions=e.ThemableDecorationAttachmentRenderOptions=e.pathOrURIToURI=e.fromRangeOrRangeWithMessage=e.MarkdownString=e.isDecorationOptionsArr=e.ViewColumn=e.DiagnosticSeverity=e.DiagnosticRelatedInformation=e.Diagnostic=e.DiagnosticTag=e.DocumentSelector=e.Position=e.TokenType=e.Range=e.Selection=void 0;var o;(function(lt){function pt(qe){const{selectionStartLineNumber:Et,selectionStartColumn:Tt,positionLineNumber:xt,positionColumn:At}=qe,Nt=new n.Position(Et-1,Tt-1),kt=new n.Position(xt-1,At-1);return new n.Selection(Nt,kt)}lt.to=pt;function st(qe){const{anchor:Et,active:Tt}=qe;return{selectionStartLineNumber:Et.line+1,selectionStartColumn:Et.character+1,positionLineNumber:Tt.line+1,positionColumn:Tt.character+1}}lt.from=st})(o=e.Selection||(e.Selection={}));var g;(function(lt){function pt(qe){if(!qe)return;const{start:Et,end:Tt}=qe;return{startLineNumber:Et.line+1,startColumn:Et.character+1,endLineNumber:Tt.line+1,endColumn:Tt.character+1}}lt.from=pt;function st(qe){if(!qe)return;const{startLineNumber:Et,startColumn:Tt,endLineNumber:xt,endColumn:At}=qe;return new n.Range(Et-1,Tt-1,xt-1,At-1)}lt.to=st})(g=e.Range||(e.Range={}));var h;(function(lt){function pt(st){switch(st){case 1:return n.StandardTokenType.Comment;case 0:return n.StandardTokenType.Other;case 3:return n.StandardTokenType.RegEx;case 2:return n.StandardTokenType.String}}lt.to=pt})(h=e.TokenType||(e.TokenType={}));var v;(function(lt){function pt(qe){return new n.Position(qe.lineNumber-1,qe.column-1)}lt.to=pt;function st(qe){return{lineNumber:qe.line+1,column:qe.character+1}}lt.from=st})(v=e.Position||(e.Position={}));var m;(function(lt){function pt(Et,Tt){return(0,t.coalesce)((0,t.asArray)(Et).map(xt=>st(xt,Tt)))}lt.from=pt;function st(Et,Tt){if(typeof Et=="string")return{$serialized:!0,language:Et};if(Et)return{$serialized:!0,language:Et.language,scheme:qe(Et.scheme,Tt),pattern:Te.from(Et.pattern)??void 0,exclusive:Et.exclusive,notebookType:Et.notebookType}}function qe(Et,Tt){return Tt&&typeof Et=="string"?Tt.transformOutgoingScheme(Et):Et}})(m=e.DocumentSelector||(e.DocumentSelector={}));var w;(function(lt){function pt(qe){switch(qe){case n.DiagnosticTag.Unnecessary:return 1;case n.DiagnosticTag.Deprecated:return 2}}lt.from=pt;function st(qe){switch(qe){case 1:return n.DiagnosticTag.Unnecessary;case 2:return n.DiagnosticTag.Deprecated;default:return}}lt.to=st})(w=e.DiagnosticTag||(e.DiagnosticTag={}));var D;(function(lt){function pt(qe){let Et;return qe.code&&((0,b.isString)(qe.code)||(0,b.isNumber)(qe.code)?Et=String(qe.code):Et={value:String(qe.code.value),target:qe.code.target}),{...g.from(qe.range),message:qe.message,source:qe.source,code:Et,severity:T.from(qe.severity),relatedInformation:qe.relatedInformation&&qe.relatedInformation.map(y.from),tags:Array.isArray(qe.tags)?(0,t.coalesce)(qe.tags.map(w.from)):void 0}}lt.from=pt;function st(qe){const Et=new n.Diagnostic(g.to(qe),qe.message,T.to(qe.severity));return Et.source=qe.source,Et.code=(0,b.isString)(qe.code)?qe.code:qe.code?.value,Et.relatedInformation=qe.relatedInformation&&qe.relatedInformation.map(y.to),Et.tags=qe.tags&&(0,t.coalesce)(qe.tags.map(w.to)),Et}lt.to=st})(D=e.Diagnostic||(e.Diagnostic={}));var y;(function(lt){function pt(qe){return{...g.from(qe.location.range),message:qe.message,resource:qe.location.uri}}lt.from=pt;function st(qe){return new n.DiagnosticRelatedInformation(new n.Location(qe.resource,g.to(qe)),qe.message)}lt.to=st})(y=e.DiagnosticRelatedInformation||(e.DiagnosticRelatedInformation={}));var T;(function(lt){function pt(qe){switch(qe){case n.DiagnosticSeverity.Error:return u.MarkerSeverity.Error;case n.DiagnosticSeverity.Warning:return u.MarkerSeverity.Warning;case n.DiagnosticSeverity.Information:return u.MarkerSeverity.Info;case n.DiagnosticSeverity.Hint:return u.MarkerSeverity.Hint}return u.MarkerSeverity.Error}lt.from=pt;function st(qe){switch(qe){case u.MarkerSeverity.Info:return n.DiagnosticSeverity.Information;case u.MarkerSeverity.Warning:return n.DiagnosticSeverity.Warning;case u.MarkerSeverity.Error:return n.DiagnosticSeverity.Error;case u.MarkerSeverity.Hint:return n.DiagnosticSeverity.Hint;default:return n.DiagnosticSeverity.Error}}lt.to=st})(T=e.DiagnosticSeverity||(e.DiagnosticSeverity={}));var _;(function(lt){function pt(qe){return typeof qe=="number"&&qe>=n.ViewColumn.One?qe-1:qe===n.ViewColumn.Beside?d.SIDE_GROUP:d.ACTIVE_GROUP}lt.from=pt;function st(qe){if(typeof qe=="number"&&qe>=0)return qe+1;throw new Error("invalid 'EditorGroupColumn'")}lt.to=st})(_=e.ViewColumn||(e.ViewColumn={}));function L(lt){return typeof lt.range<"u"}function M(lt){return lt.length===0?!0:!!L(lt[0])}e.isDecorationOptionsArr=M;var O;(function(lt){function pt(At){return At.map(lt.from)}lt.fromMany=pt;function st(At){return At&&typeof At=="object"&&typeof At.language=="string"&&typeof At.value=="string"}function qe(At){let Nt;if(st(At)){const{language:Ze,value:ft}=At;Nt={value:"```"+Ze+` `+ft+"\n```\n"}}else n.MarkdownString.isMarkdownString(At)?Nt={value:At.value,isTrusted:At.isTrusted,supportThemeIcons:At.supportThemeIcons,supportHtml:At.supportHtml,baseUri:At.baseUri}:typeof At=="string"?Nt={value:At}:Nt={value:""};const kt=Object.create(null);Nt.uris=kt;const Ne=Ze=>{try{let ft=S.URI.parse(Ze,!0);ft=ft.with({query:Et(ft.query,kt)}),kt[Ze]=ft}catch{}return""},Ge=new k.marked.Renderer;return Ge.link=Ne,Ge.image=Ze=>typeof Ze=="string"?Ne(R.parseHrefAndDimensions(Ze).href):"",(0,k.marked)(Nt.value,{renderer:Ge}),Nt}lt.from=qe;function Et(At,Nt){if(!At)return At;let kt;try{kt=(0,E.parse)(At)}catch{}if(!kt)return At;let Ne=!1;return kt=(0,I.cloneAndChange)(kt,Ge=>{if(S.URI.isUri(Ge)){const Ze=`__uri_${Math.random().toString(16).slice(2,8)}`;return Nt[Ze]=Ge,Ne=!0,Ze}else return}),Ne?JSON.stringify(kt):At}function Tt(At){const Nt=new n.MarkdownString(At.value,At.supportThemeIcons);return Nt.isTrusted=At.isTrusted,Nt.supportHtml=At.supportHtml,Nt.baseUri=At.baseUri?S.URI.from(At.baseUri):void 0,Nt}lt.to=Tt;function xt(At){if(!!At)return typeof At=="string"?At:lt.from(At)}lt.fromStrict=xt})(O=e.MarkdownString||(e.MarkdownString={}));function N(lt){return M(lt)?lt.map(pt=>({range:g.from(pt.range),hoverMessage:Array.isArray(pt.hoverMessage)?O.fromMany(pt.hoverMessage):pt.hoverMessage?O.from(pt.hoverMessage):void 0,renderOptions:pt.renderOptions})):lt.map(pt=>({range:g.from(pt)}))}e.fromRangeOrRangeWithMessage=N;function P(lt){return typeof lt>"u"?lt:typeof lt=="string"?S.URI.file(lt):lt}e.pathOrURIToURI=P;var B;(function(lt){function pt(st){return typeof st>"u"?st:{contentText:st.contentText,contentIconPath:st.contentIconPath?P(st.contentIconPath):void 0,border:st.border,borderColor:st.borderColor,fontStyle:st.fontStyle,fontWeight:st.fontWeight,textDecoration:st.textDecoration,color:st.color,backgroundColor:st.backgroundColor,margin:st.margin,width:st.width,height:st.height}}lt.from=pt})(B=e.ThemableDecorationAttachmentRenderOptions||(e.ThemableDecorationAttachmentRenderOptions={}));var V;(function(lt){function pt(st){return typeof st>"u"?st:{backgroundColor:st.backgroundColor,outline:st.outline,outlineColor:st.outlineColor,outlineStyle:st.outlineStyle,outlineWidth:st.outlineWidth,border:st.border,borderColor:st.borderColor,borderRadius:st.borderRadius,borderSpacing:st.borderSpacing,borderStyle:st.borderStyle,borderWidth:st.borderWidth,fontStyle:st.fontStyle,fontWeight:st.fontWeight,textDecoration:st.textDecoration,cursor:st.cursor,color:st.color,opacity:st.opacity,letterSpacing:st.letterSpacing,gutterIconPath:st.gutterIconPath?P(st.gutterIconPath):void 0,gutterIconSize:st.gutterIconSize,overviewRulerColor:st.overviewRulerColor,before:st.before?B.from(st.before):void 0,after:st.after?B.from(st.after):void 0}}lt.from=pt})(V=e.ThemableDecorationRenderOptions||(e.ThemableDecorationRenderOptions={}));var z;(function(lt){function pt(st){if(typeof st>"u")return st;switch(st){case n.DecorationRangeBehavior.OpenOpen:return 0;case n.DecorationRangeBehavior.ClosedClosed:return 1;case n.DecorationRangeBehavior.OpenClosed:return 2;case n.DecorationRangeBehavior.ClosedOpen:return 3}}lt.from=pt})(z=e.DecorationRangeBehavior||(e.DecorationRangeBehavior={}));var x;(function(lt){function pt(st){return{isWholeLine:st.isWholeLine,rangeBehavior:st.rangeBehavior?z.from(st.rangeBehavior):void 0,overviewRulerLane:st.overviewRulerLane,light:st.light?V.from(st.light):void 0,dark:st.dark?V.from(st.dark):void 0,backgroundColor:st.backgroundColor,outline:st.outline,outlineColor:st.outlineColor,outlineStyle:st.outlineStyle,outlineWidth:st.outlineWidth,border:st.border,borderColor:st.borderColor,borderRadius:st.borderRadius,borderSpacing:st.borderSpacing,borderStyle:st.borderStyle,borderWidth:st.borderWidth,fontStyle:st.fontStyle,fontWeight:st.fontWeight,textDecoration:st.textDecoration,cursor:st.cursor,color:st.color,opacity:st.opacity,letterSpacing:st.letterSpacing,gutterIconPath:st.gutterIconPath?P(st.gutterIconPath):void 0,gutterIconSize:st.gutterIconSize,overviewRulerColor:st.overviewRulerColor,before:st.before?B.from(st.before):void 0,after:st.after?B.from(st.after):void 0}}lt.from=pt})(x=e.DecorationRenderOptions||(e.DecorationRenderOptions={}));var H;(function(lt){function pt(qe){return{text:qe.newText,eol:qe.newEol&&Pe.from(qe.newEol),range:g.from(qe.range)}}lt.from=pt;function st(qe){const Et=new n.TextEdit(g.to(qe.range),qe.text);return Et.newEol=typeof qe.eol>"u"?void 0:Pe.to(qe.eol),Et}lt.to=st})(H=e.TextEdit||(e.TextEdit={}));var W;(function(lt){function pt(qe,Et){const Tt={edits:[]};if(qe instanceof n.WorkspaceEdit){const xt=new A.ResourceSet;for(const At of qe._allEntries())At._type===1&&S.URI.isUri(At.to)&&At.from===void 0&&xt.add(At.to);for(const At of qe._allEntries())At._type===1?Tt.edits.push({oldResource:At.from,newResource:At.to,options:{...At.options,contentsBase64:At.options?.contents&&(0,p.encodeBase64)(p.VSBuffer.wrap(At.options.contents))},metadata:At.metadata}):At._type===2?Tt.edits.push({resource:At.uri,textEdit:H.from(At.edit),versionId:xt.has(At.uri)?void 0:Et?.getTextDocumentVersion(At.uri),metadata:At.metadata}):At._type===6?Tt.edits.push({resource:At.uri,textEdit:{range:g.from(At.range),text:At.edit.value,insertAsSnippet:!0},versionId:xt.has(At.uri)?void 0:Et?.getTextDocumentVersion(At.uri),metadata:At.metadata}):At._type===3?Tt.edits.push({metadata:At.metadata,resource:At.uri,cellEdit:At.edit,notebookMetadata:At.notebookMetadata,notebookVersionId:Et?.getNotebookDocumentVersion(At.uri)}):At._type===5&&Tt.edits.push({metadata:At.metadata,resource:At.uri,notebookVersionId:Et?.getNotebookDocumentVersion(At.uri),cellEdit:{editType:1,index:At.index,count:At.count,cells:At.cells.map(We.from)}})}return Tt}lt.from=pt;function st(qe){const Et=new n.WorkspaceEdit;for(const Tt of qe.edits)Tt.textEdit?Et.replace(S.URI.revive(Tt.resource),g.to(Tt.textEdit.range),Tt.textEdit.text):Et.renameFile(S.URI.revive(Tt.oldResource),S.URI.revive(Tt.newResource),Tt.options);return Et}lt.to=st})(W=e.WorkspaceEdit||(e.WorkspaceEdit={}));var U;(function(lt){const pt=Object.create(null);pt[n.SymbolKind.File]=0,pt[n.SymbolKind.Module]=1,pt[n.SymbolKind.Namespace]=2,pt[n.SymbolKind.Package]=3,pt[n.SymbolKind.Class]=4,pt[n.SymbolKind.Method]=5,pt[n.SymbolKind.Property]=6,pt[n.SymbolKind.Field]=7,pt[n.SymbolKind.Constructor]=8,pt[n.SymbolKind.Enum]=9,pt[n.SymbolKind.Interface]=10,pt[n.SymbolKind.Function]=11,pt[n.SymbolKind.Variable]=12,pt[n.SymbolKind.Constant]=13,pt[n.SymbolKind.String]=14,pt[n.SymbolKind.Number]=15,pt[n.SymbolKind.Boolean]=16,pt[n.SymbolKind.Array]=17,pt[n.SymbolKind.Object]=18,pt[n.SymbolKind.Key]=19,pt[n.SymbolKind.Null]=20,pt[n.SymbolKind.EnumMember]=21,pt[n.SymbolKind.Struct]=22,pt[n.SymbolKind.Event]=23,pt[n.SymbolKind.Operator]=24,pt[n.SymbolKind.TypeParameter]=25;function st(Et){return typeof pt[Et]=="number"?pt[Et]:6}lt.from=st;function qe(Et){for(const Tt in pt)if(pt[Tt]===Et)return Number(Tt);return n.SymbolKind.Property}lt.to=qe})(U=e.SymbolKind||(e.SymbolKind={}));var $;(function(lt){function pt(qe){switch(qe){case n.SymbolTag.Deprecated:return 1}}lt.from=pt;function st(qe){switch(qe){case 1:return n.SymbolTag.Deprecated}}lt.to=st})($=e.SymbolTag||(e.SymbolTag={}));var q;(function(lt){function pt(qe){return{name:qe.name,kind:U.from(qe.kind),tags:qe.tags&&qe.tags.map($.from),containerName:qe.containerName,location:K.from(qe.location)}}lt.from=pt;function st(qe){const Et=new n.SymbolInformation(qe.name,U.to(qe.kind),qe.containerName,K.to(qe.location));return Et.tags=qe.tags&&qe.tags.map($.to),Et}lt.to=st})(q=e.WorkspaceSymbol||(e.WorkspaceSymbol={}));var X;(function(lt){function pt(qe){const Et={name:qe.name||"!!MISSING: name!!",detail:qe.detail,range:g.from(qe.range),selectionRange:g.from(qe.selectionRange),kind:U.from(qe.kind),tags:qe.tags?.map($.from)??[]};return qe.children&&(Et.children=qe.children.map(pt)),Et}lt.from=pt;function st(qe){const Et=new n.DocumentSymbol(qe.name,qe.detail,U.to(qe.kind),g.to(qe.range),g.to(qe.selectionRange));return(0,t.isNonEmptyArray)(qe.tags)&&(Et.tags=qe.tags.map($.to)),qe.children&&(Et.children=qe.children.map(st)),Et}lt.to=st})(X=e.DocumentSymbol||(e.DocumentSymbol={}));var G;(function(lt){function pt(qe){const Et=new n.CallHierarchyItem(U.to(qe.kind),qe.name,qe.detail||"",S.URI.revive(qe.uri),g.to(qe.range),g.to(qe.selectionRange));return Et._sessionId=qe._sessionId,Et._itemId=qe._itemId,Et}lt.to=pt;function st(qe,Et,Tt){if(Et=Et??qe._sessionId,Tt=Tt??qe._itemId,Et===void 0||Tt===void 0)throw new Error("invalid item");return{_sessionId:Et,_itemId:Tt,name:qe.name,detail:qe.detail,kind:U.from(qe.kind),uri:qe.uri,range:g.from(qe.range),selectionRange:g.from(qe.selectionRange),tags:qe.tags?.map($.from)}}lt.from=st})(G=e.CallHierarchyItem||(e.CallHierarchyItem={}));var Q;(function(lt){function pt(st){return new n.CallHierarchyIncomingCall(G.to(st.from),st.fromRanges.map(qe=>g.to(qe)))}lt.to=pt})(Q=e.CallHierarchyIncomingCall||(e.CallHierarchyIncomingCall={}));var j;(function(lt){function pt(st){return new n.CallHierarchyOutgoingCall(G.to(st.to),st.fromRanges.map(qe=>g.to(qe)))}lt.to=pt})(j=e.CallHierarchyOutgoingCall||(e.CallHierarchyOutgoingCall={}));var K;(function(lt){function pt(qe){return{range:qe.range&&g.from(qe.range),uri:qe.uri}}lt.from=pt;function st(qe){return new n.Location(S.URI.revive(qe.uri),g.to(qe.range))}lt.to=st})(K=e.location||(e.location={}));var Y;(function(lt){function pt(qe){const Et=qe,Tt=qe;return{originSelectionRange:Et.originSelectionRange?g.from(Et.originSelectionRange):void 0,uri:Et.targetUri?Et.targetUri:Tt.uri,range:g.from(Et.targetRange?Et.targetRange:Tt.range),targetSelectionRange:Et.targetSelectionRange?g.from(Et.targetSelectionRange):void 0}}lt.from=pt;function st(qe){return{targetUri:S.URI.revive(qe.uri),targetRange:g.to(qe.range),targetSelectionRange:qe.targetSelectionRange?g.to(qe.targetSelectionRange):void 0,originSelectionRange:qe.originSelectionRange?g.to(qe.originSelectionRange):void 0}}lt.to=st})(Y=e.DefinitionLink||(e.DefinitionLink={}));var ee;(function(lt){function pt(qe){return{range:g.from(qe.range),contents:O.fromMany(qe.contents)}}lt.from=pt;function st(qe){return new n.Hover(qe.contents.map(O.to),g.to(qe.range))}lt.to=st})(ee=e.Hover||(e.Hover={}));var ie;(function(lt){function pt(qe){return{range:g.from(qe.range),expression:qe.expression}}lt.from=pt;function st(qe){return new n.EvaluatableExpression(g.to(qe.range),qe.expression)}lt.to=st})(ie=e.EvaluatableExpression||(e.EvaluatableExpression={}));var re;(function(lt){function pt(qe){if(qe instanceof n.InlineValueText)return{type:"text",range:g.from(qe.range),text:qe.text};if(qe instanceof n.InlineValueVariableLookup)return{type:"variable",range:g.from(qe.range),variableName:qe.variableName,caseSensitiveLookup:qe.caseSensitiveLookup};if(qe instanceof n.InlineValueEvaluatableExpression)return{type:"expression",range:g.from(qe.range),expression:qe.expression};throw new Error("Unknown 'InlineValue' type")}lt.from=pt;function st(qe){switch(qe.type){case"text":return{range:g.to(qe.range),text:qe.text};case"variable":return{range:g.to(qe.range),variableName:qe.variableName,caseSensitiveLookup:qe.caseSensitiveLookup};case"expression":return{range:g.to(qe.range),expression:qe.expression}}}lt.to=st})(re=e.InlineValue||(e.InlineValue={}));var oe;(function(lt){function pt(qe){return{frameId:qe.frameId,stoppedLocation:g.from(qe.stoppedLocation)}}lt.from=pt;function st(qe){return new n.InlineValueContext(qe.frameId,g.to(qe.stoppedLocation))}lt.to=st})(oe=e.InlineValueContext||(e.InlineValueContext={}));var se;(function(lt){function pt(qe){return{range:g.from(qe.range),kind:qe.kind}}lt.from=pt;function st(qe){return new n.DocumentHighlight(g.to(qe.range),qe.kind)}lt.to=st})(se=e.DocumentHighlight||(e.DocumentHighlight={}));var te;(function(lt){function pt(st){switch(st){case 1:return n.CompletionTriggerKind.TriggerCharacter;case 2:return n.CompletionTriggerKind.TriggerForIncompleteCompletions;case 0:default:return n.CompletionTriggerKind.Invoke}}lt.to=pt})(te=e.CompletionTriggerKind||(e.CompletionTriggerKind={}));var Z;(function(lt){function pt(st){return{triggerKind:te.to(st.triggerKind),triggerCharacter:st.triggerCharacter}}lt.to=pt})(Z=e.CompletionContext||(e.CompletionContext={}));var ne;(function(lt){function pt(qe){switch(qe){case n.CompletionItemTag.Deprecated:return 1}}lt.from=pt;function st(qe){switch(qe){case 1:return n.CompletionItemTag.Deprecated}}lt.to=st})(ne=e.CompletionItemTag||(e.CompletionItemTag={}));var ce;(function(lt){const pt=new Map([[n.CompletionItemKind.Method,0],[n.CompletionItemKind.Function,1],[n.CompletionItemKind.Constructor,2],[n.CompletionItemKind.Field,3],[n.CompletionItemKind.Variable,4],[n.CompletionItemKind.Class,5],[n.CompletionItemKind.Interface,7],[n.CompletionItemKind.Struct,6],[n.CompletionItemKind.Module,8],[n.CompletionItemKind.Property,9],[n.CompletionItemKind.Unit,12],[n.CompletionItemKind.Value,13],[n.CompletionItemKind.Constant,14],[n.CompletionItemKind.Enum,15],[n.CompletionItemKind.EnumMember,16],[n.CompletionItemKind.Keyword,17],[n.CompletionItemKind.Snippet,27],[n.CompletionItemKind.Text,18],[n.CompletionItemKind.Color,19],[n.CompletionItemKind.File,20],[n.CompletionItemKind.Reference,21],[n.CompletionItemKind.Folder,23],[n.CompletionItemKind.Event,10],[n.CompletionItemKind.Operator,11],[n.CompletionItemKind.TypeParameter,24],[n.CompletionItemKind.Issue,26],[n.CompletionItemKind.User,25]]);function st(Tt){return pt.get(Tt)??9}lt.from=st;const qe=new Map([[0,n.CompletionItemKind.Method],[1,n.CompletionItemKind.Function],[2,n.CompletionItemKind.Constructor],[3,n.CompletionItemKind.Field],[4,n.CompletionItemKind.Variable],[5,n.CompletionItemKind.Class],[7,n.CompletionItemKind.Interface],[6,n.CompletionItemKind.Struct],[8,n.CompletionItemKind.Module],[9,n.CompletionItemKind.Property],[12,n.CompletionItemKind.Unit],[13,n.CompletionItemKind.Value],[14,n.CompletionItemKind.Constant],[15,n.CompletionItemKind.Enum],[16,n.CompletionItemKind.EnumMember],[17,n.CompletionItemKind.Keyword],[27,n.CompletionItemKind.Snippet],[18,n.CompletionItemKind.Text],[19,n.CompletionItemKind.Color],[20,n.CompletionItemKind.File],[21,n.CompletionItemKind.Reference],[23,n.CompletionItemKind.Folder],[10,n.CompletionItemKind.Event],[11,n.CompletionItemKind.Operator],[24,n.CompletionItemKind.TypeParameter],[25,n.CompletionItemKind.User],[26,n.CompletionItemKind.Issue]]);function Et(Tt){return qe.get(Tt)??n.CompletionItemKind.Property}lt.to=Et})(ce=e.CompletionItemKind||(e.CompletionItemKind={}));var de;(function(lt){function pt(st,qe){const Et=new n.CompletionItem(st.label);return Et.insertText=st.insertText,Et.kind=ce.to(st.kind),Et.tags=st.tags?.map(ne.to),Et.detail=st.detail,Et.documentation=R.isMarkdownString(st.documentation)?O.to(st.documentation):st.documentation,Et.sortText=st.sortText,Et.filterText=st.filterText,Et.preselect=st.preselect,Et.commitCharacters=st.commitCharacters,C.Range.isIRange(st.range)?Et.range=g.to(st.range):typeof st.range=="object"&&(Et.range={inserting:g.to(st.range.insert),replacing:g.to(st.range.replace)}),Et.keepWhitespace=typeof st.insertTextRules>"u"?!1:Boolean(st.insertTextRules&1),typeof st.insertTextRules<"u"&&st.insertTextRules&4?Et.insertText=new n.SnippetString(st.insertText):(Et.insertText=st.insertText,Et.textEdit=Et.range instanceof n.Range?new n.TextEdit(Et.range,Et.insertText):void 0),st.additionalTextEdits&&st.additionalTextEdits.length>0&&(Et.additionalTextEdits=st.additionalTextEdits.map(Tt=>H.to(Tt))),Et.command=qe&&st.command?qe.fromInternal(st.command):void 0,Et}lt.to=pt})(de=e.CompletionItem||(e.CompletionItem={}));var he;(function(lt){function pt(qe){if(typeof qe.label!="string"&&!Array.isArray(qe.label))throw new TypeError("Invalid label");return{label:qe.label,documentation:O.fromStrict(qe.documentation)}}lt.from=pt;function st(qe){return{label:qe.label,documentation:R.isMarkdownString(qe.documentation)?O.to(qe.documentation):qe.documentation}}lt.to=st})(he=e.ParameterInformation||(e.ParameterInformation={}));var pe;(function(lt){function pt(qe){return{label:qe.label,documentation:O.fromStrict(qe.documentation),parameters:Array.isArray(qe.parameters)?qe.parameters.map(he.from):[],activeParameter:qe.activeParameter}}lt.from=pt;function st(qe){return{label:qe.label,documentation:R.isMarkdownString(qe.documentation)?O.to(qe.documentation):qe.documentation,parameters:Array.isArray(qe.parameters)?qe.parameters.map(he.to):[],activeParameter:qe.activeParameter}}lt.to=st})(pe=e.SignatureInformation||(e.SignatureInformation={}));var me;(function(lt){function pt(qe){return{activeSignature:qe.activeSignature,activeParameter:qe.activeParameter,signatures:Array.isArray(qe.signatures)?qe.signatures.map(pe.from):[]}}lt.from=pt;function st(qe){return{activeSignature:qe.activeSignature,activeParameter:qe.activeParameter,signatures:Array.isArray(qe.signatures)?qe.signatures.map(pe.to):[]}}lt.to=st})(me=e.SignatureHelp||(e.SignatureHelp={}));var Se;(function(lt){function pt(st,qe){const Et=new n.InlayHint(v.to(qe.position),typeof qe.label=="string"?qe.label:qe.label.map(Ie.to.bind(void 0,st)),qe.kind&&ve.to(qe.kind));return Et.textEdits=qe.textEdits&&qe.textEdits.map(H.to),Et.tooltip=R.isMarkdownString(qe.tooltip)?O.to(qe.tooltip):qe.tooltip,Et.paddingLeft=qe.paddingLeft,Et.paddingRight=qe.paddingRight,Et}lt.to=pt})(Se=e.InlayHint||(e.InlayHint={}));var Ie;(function(lt){function pt(st,qe){const Et=new n.InlayHintLabelPart(qe.label);return Et.tooltip=R.isMarkdownString(qe.tooltip)?O.to(qe.tooltip):qe.tooltip,r.Command.is(qe.command)&&(Et.command=st.fromInternal(qe.command)),qe.location&&(Et.location=K.to(qe.location)),Et}lt.to=pt})(Ie=e.InlayHintLabelPart||(e.InlayHintLabelPart={}));var ve;(function(lt){function pt(qe){return qe}lt.from=pt;function st(qe){return qe}lt.to=st})(ve=e.InlayHintKind||(e.InlayHintKind={}));var be;(function(lt){function pt(qe){return{range:g.from(qe.range),url:qe.target,tooltip:qe.tooltip}}lt.from=pt;function st(qe){let Et;if(qe.url)try{Et=typeof qe.url=="string"?S.URI.parse(qe.url,!0):S.URI.revive(qe.url)}catch{}return new n.DocumentLink(g.to(qe.range),Et)}lt.to=st})(be=e.DocumentLink||(e.DocumentLink={}));var ge;(function(lt){function pt(qe){const Et=new n.ColorPresentation(qe.label);return qe.textEdit&&(Et.textEdit=H.to(qe.textEdit)),qe.additionalTextEdits&&(Et.additionalTextEdits=qe.additionalTextEdits.map(Tt=>H.to(Tt))),Et}lt.to=pt;function st(qe){return{label:qe.label,textEdit:qe.textEdit?H.from(qe.textEdit):void 0,additionalTextEdits:qe.additionalTextEdits?qe.additionalTextEdits.map(Et=>H.from(Et)):void 0}}lt.from=st})(ge=e.ColorPresentation||(e.ColorPresentation={}));var ue;(function(lt){function pt(qe){return new n.Color(qe[0],qe[1],qe[2],qe[3])}lt.to=pt;function st(qe){return[qe.red,qe.green,qe.blue,qe.alpha]}lt.from=st})(ue=e.Color||(e.Color={}));var Ce;(function(lt){function pt(qe){return{range:g.from(qe.range)}}lt.from=pt;function st(qe){return new n.SelectionRange(g.to(qe.range))}lt.to=st})(Ce=e.SelectionRange||(e.SelectionRange={}));var De;(function(lt){function pt(st){switch(st){case 2:return n.TextDocumentSaveReason.AfterDelay;case 1:return n.TextDocumentSaveReason.Manual;case 3:case 4:return n.TextDocumentSaveReason.FocusOut}}lt.to=pt})(De=e.TextDocumentSaveReason||(e.TextDocumentSaveReason={}));var Ae;(function(lt){function pt(qe){switch(qe){case n.TextEditorLineNumbersStyle.Off:return 0;case n.TextEditorLineNumbersStyle.Relative:return 2;case n.TextEditorLineNumbersStyle.On:default:return 1}}lt.from=pt;function st(qe){switch(qe){case 0:return n.TextEditorLineNumbersStyle.Off;case 2:return n.TextEditorLineNumbersStyle.Relative;case 1:default:return n.TextEditorLineNumbersStyle.On}}lt.to=st})(Ae=e.TextEditorLineNumbersStyle||(e.TextEditorLineNumbersStyle={}));var Pe;(function(lt){function pt(qe){if(qe===n.EndOfLine.CRLF)return 1;if(qe===n.EndOfLine.LF)return 0}lt.from=pt;function st(qe){if(qe===1)return n.EndOfLine.CRLF;if(qe===0)return n.EndOfLine.LF}lt.to=st})(Pe=e.EndOfLine||(e.EndOfLine={}));var fe;(function(lt){function pt(st){if(typeof st=="object")return st.viewId;switch(st){case n.ProgressLocation.SourceControl:return 3;case n.ProgressLocation.Window:return 10;case n.ProgressLocation.Notification:return 15}throw new Error("Unknown 'ProgressLocation'")}lt.from=pt})(fe=e.ProgressLocation||(e.ProgressLocation={}));var ye;(function(lt){function pt(st){const qe={start:st.start+1,end:st.end+1};return st.kind&&(qe.kind=ke.from(st.kind)),qe}lt.from=pt})(ye=e.FoldingRange||(e.FoldingRange={}));var ke;(function(lt){function pt(st){if(st)switch(st){case n.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case n.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case n.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}lt.from=pt})(ke=e.FoldingRangeKind||(e.FoldingRangeKind={}));var Ee;(function(lt){function pt(st){if(st)return{pinned:typeof st.preview=="boolean"?!st.preview:void 0,inactive:st.background,preserveFocus:st.preserveFocus,selection:typeof st.selection=="object"?g.from(st.selection):void 0,override:typeof st.override=="boolean"?f.DEFAULT_EDITOR_ASSOCIATION.id:void 0}}lt.from=pt})(Ee=e.TextEditorOpenOptions||(e.TextEditorOpenOptions={}));var Te;(function(lt){function pt(Tt){return Tt instanceof n.RelativePattern?Tt.toJSON():typeof Tt=="string"?Tt:st(Tt)||qe(Tt)?new n.RelativePattern(Tt.baseUri??Tt.base,Tt.pattern).toJSON():Tt}lt.from=pt;function st(Tt){const xt=Tt;return xt?S.URI.isUri(xt.baseUri)&&typeof xt.pattern=="string":!1}function qe(Tt){const xt=Tt;return xt?typeof xt.base=="string"&&typeof xt.pattern=="string":!1}function Et(Tt){return typeof Tt=="string"?Tt:new n.RelativePattern(S.URI.revive(Tt.baseUri),Tt.pattern)}lt.to=Et})(Te=e.GlobPattern||(e.GlobPattern={}));var _e;(function(lt){function pt(st){if(st){if(Array.isArray(st))return st.map(pt);if(typeof st=="string")return st;{const qe=st;return{language:qe.language,scheme:qe.scheme,pattern:Te.from(qe.pattern),exclusive:qe.exclusive,notebookType:qe.notebookType}}}else return}lt.from=pt})(_e=e.LanguageSelector||(e.LanguageSelector={}));var Re;(function(lt){function pt(qe){return{start:qe.start,end:qe.end}}lt.from=pt;function st(qe){return new n.NotebookRange(qe.start,qe.end)}lt.to=st})(Re=e.NotebookRange||(e.NotebookRange={}));var Le;(function(lt){function pt(qe){return{timing:typeof qe.runStartTime=="number"&&typeof qe.runEndTime=="number"?{startTime:qe.runStartTime,endTime:qe.runEndTime}:void 0,executionOrder:qe.executionOrder,success:qe.lastRunSuccess}}lt.to=pt;function st(qe){return{lastRunSuccess:qe.success,runStartTime:qe.timing?.startTime,runEndTime:qe.timing?.endTime,executionOrder:qe.executionOrder}}lt.from=st})(Le=e.NotebookCellExecutionSummary||(e.NotebookCellExecutionSummary={}));var Me;(function(lt){function pt(st){if(st===c.NotebookCellExecutionState.Unconfirmed)return n.NotebookCellExecutionState.Pending;if(st===c.NotebookCellExecutionState.Pending)return;if(st===c.NotebookCellExecutionState.Executing)return n.NotebookCellExecutionState.Executing;throw new Error(`Unknown state: ${st}`)}lt.to=pt})(Me=e.NotebookCellExecutionState||(e.NotebookCellExecutionState={}));var Oe;(function(lt){function pt(qe){switch(qe){case n.NotebookCellKind.Markup:return c.CellKind.Markup;case n.NotebookCellKind.Code:default:return c.CellKind.Code}}lt.from=pt;function st(qe){switch(qe){case c.CellKind.Markup:return n.NotebookCellKind.Markup;case c.CellKind.Code:default:return n.NotebookCellKind.Code}}lt.to=st})(Oe=e.NotebookCellKind||(e.NotebookCellKind={}));var Ke;(function(lt){function pt(qe){const Et={metadata:qe.metadata??Object.create(null),cells:[]};for(const Tt of qe.cells)n.NotebookCellData.validate(Tt),Et.cells.push(We.from(Tt));return Et}lt.from=pt;function st(qe){const Et=new n.NotebookData(qe.cells.map(We.to));return(0,b.isEmptyObject)(qe.metadata)||(Et.metadata=qe.metadata),Et}lt.to=st})(Ke=e.NotebookData||(e.NotebookData={}));var We;(function(lt){function pt(qe){return{cellKind:Oe.from(qe.kind),language:qe.languageId,mime:qe.mime,source:qe.value,metadata:qe.metadata,internalMetadata:Le.from(qe.executionSummary??{}),outputs:qe.outputs?qe.outputs.map(Je.from):[]}}lt.from=pt;function st(qe){return new n.NotebookCellData(Oe.to(qe.cellKind),qe.source,qe.language,qe.mime,qe.outputs?qe.outputs.map(Je.to):void 0,qe.metadata,qe.internalMetadata?Le.to(qe.internalMetadata):void 0)}lt.to=st})(We=e.NotebookCellData||(e.NotebookCellData={}));var Xe;(function(lt){function pt(qe){return{mime:qe.mime,valueBytes:p.VSBuffer.wrap(qe.data)}}lt.from=pt;function st(qe){return new n.NotebookCellOutputItem(qe.valueBytes.buffer,qe.mime)}lt.to=st})(Xe=e.NotebookCellOutputItem||(e.NotebookCellOutputItem={}));var Je;(function(lt){function pt(qe){return{outputId:qe.id,items:qe.items.map(Xe.from),metadata:qe.metadata}}lt.from=pt;function st(qe){const Et=qe.items.map(Xe.to);return new n.NotebookCellOutput(Et,qe.outputId,qe.metadata)}lt.to=st})(Je=e.NotebookCellOutput||(e.NotebookCellOutput={}));var rt;(function(lt){function pt(Et){return qe(Et)?{include:(0,b.withNullAsUndefined)(Te.from(Et.include)),exclude:(0,b.withNullAsUndefined)(Te.from(Et.exclude))}:(0,b.withNullAsUndefined)(Te.from(Et))}lt.from=pt;function st(Et){return qe(Et)?{include:Te.to(Et.include),exclude:Te.to(Et.exclude)}:Te.to(Et)}lt.to=st;function qe(Et){const Tt=Et;return Tt?!(0,b.isUndefinedOrNull)(Tt.include)&&!(0,b.isUndefinedOrNull)(Tt.exclude):!1}})(rt=e.NotebookExclusiveDocumentPattern||(e.NotebookExclusiveDocumentPattern={}));var je;(function(lt){function pt(st,qe,Et){const Tt=typeof st.command=="string"?{title:"",command:st.command}:st.command;return{alignment:st.alignment===n.NotebookCellStatusBarAlignment.Left?1:2,command:qe.toInternal(Tt,Et),text:st.text,tooltip:st.tooltip,accessibilityInformation:st.accessibilityInformation,priority:st.priority}}lt.from=pt})(je=e.NotebookStatusBarItem||(e.NotebookStatusBarItem={}));var Ue;(function(lt){function pt(st){return{transientOutputs:st?.transientOutputs??!1,transientCellMetadata:st?.transientCellMetadata??{},transientDocumentMetadata:st?.transientDocumentMetadata??{},cellContentMetadata:st?.cellContentMetadata??{}}}lt.from=pt})(Ue=e.NotebookDocumentContentOptions||(e.NotebookDocumentContentOptions={}));var Fe;(function(lt){function pt(qe){return{uri:qe.uri,provides:qe.provides}}lt.from=pt;function st(qe){return new n.NotebookRendererScript(S.URI.revive(qe.uri),qe.provides)}lt.to=st})(Fe=e.NotebookRendererScript||(e.NotebookRendererScript={}));var He;(function(lt){function pt(qe){return{message:O.fromStrict(qe.message)||"",type:0,expected:qe.expectedOutput,actual:qe.actualOutput,location:qe.location&&{range:g.from(qe.location.range),uri:qe.location.uri}}}lt.from=pt;function st(qe){const Et=new n.TestMessage(typeof qe.message=="string"?qe.message:O.to(qe.message));return Et.actualOutput=qe.actual,Et.expectedOutput=qe.expected,Et.location=qe.location?K.to(qe.location):void 0,Et}lt.to=st})(He=e.TestMessage||(e.TestMessage={}));var Be;(function(lt){lt.namespace=s.namespaceTestTag,lt.denamespace=s.denamespaceTestTag})(Be=e.TestTag||(e.TestTag={}));var ze;(function(lt){function pt(qe){const Et=(0,i.getPrivateApiFor)(qe).controllerId;return{extId:l.TestId.fromExtHostTestItem(qe,Et).toString(),label:qe.label,uri:S.URI.revive(qe.uri),busy:qe.busy,tags:qe.tags.map(Tt=>Be.namespace(Et,Tt.id)),range:C.Range.lift(g.from(qe.range)),description:qe.description||null,sortText:qe.sortText||null,error:qe.error&&O.fromStrict(qe.error)||null}}lt.from=pt;function st(qe){return{parent:void 0,error:void 0,id:l.TestId.fromString(qe.extId).localId,label:qe.label,uri:S.URI.revive(qe.uri),tags:(qe.tags||[]).map(Et=>{const{tagId:Tt}=Be.denamespace(Et);return new n.TestTag(Tt)}),children:{add:()=>{},delete:()=>{},forEach:()=>{},*[Symbol.iterator](){},get:()=>{},replace:()=>{},size:0},range:g.to(qe.range||void 0),canResolveChildren:!1,busy:qe.busy,description:qe.description||void 0,sortText:qe.sortText||void 0}}lt.toPlain=st})(ze=e.TestItem||(e.TestItem={})),function(lt){function pt(qe){return{id:qe.id}}lt.from=pt;function st(qe){return new n.TestTag(qe.id)}lt.to=st}(Be=e.TestTag||(e.TestTag={}));var nt;(function(lt){const pt=(qe,Et)=>{const Tt=[];for(const[At,Nt]of Et)l.TestId.compare(Nt.item.extId,At)===2&&(Et.delete(At),Tt.push(Nt));const xt={...ze.toPlain(qe.item),parent:void 0,taskStates:qe.tasks.map(At=>({state:At.state,duration:At.duration,messages:At.messages.filter(Nt=>Nt.type===0).map(He.to)})),children:Tt.map(At=>pt(At,Et))};for(const At of xt.children)At.parent=xt;return xt};function st(qe){const Et=[],Tt=new Map;for(const xt of qe.items){Tt.set(xt.item.extId,xt);const At=l.TestId.root(xt.item.extId);qe.request.targets.some(Nt=>Nt.controllerId===At&&Nt.testIds.includes(xt.item.extId))&&Et.push(xt)}return{completedAt:qe.completedAt,results:Et.map(xt=>pt(xt,Tt))}}lt.to=st})(nt=e.TestResults||(e.TestResults={}));var ut;(function(lt){function pt(Tt){return{covered:Tt.covered,total:Tt.covered}}function st(Tt){return"line"in Tt?v.from(Tt):g.from(Tt)}function qe(Tt){return"branches"in Tt?{count:Tt.executionCount,location:st(Tt.location),type:1,branches:Tt.branches.length?Tt.branches.map(xt=>({count:xt.executionCount,location:xt.location&&st(xt.location)})):void 0}:{type:0,count:Tt.executionCount,location:st(Tt.location)}}lt.fromDetailed=qe;function Et(Tt){return{uri:Tt.uri,statement:pt(Tt.statementCoverage),branch:Tt.branchCoverage&&pt(Tt.branchCoverage),function:Tt.functionCoverage&&pt(Tt.functionCoverage),details:Tt.detailedCoverage?.map(qe)}}lt.fromFile=Et})(ut=e.TestCoverage||(e.TestCoverage={}));var ot;(function(lt){function pt(st){switch(st){case 1:return n.CodeActionTriggerKind.Invoke;case 2:return n.CodeActionTriggerKind.Automatic}}lt.to=pt})(ot=e.CodeActionTriggerKind||(e.CodeActionTriggerKind={}));var at;(function(lt){function pt(qe){const Et=new n.TypeHierarchyItem(U.to(qe.kind),qe.name,qe.detail||"",S.URI.revive(qe.uri),g.to(qe.range),g.to(qe.selectionRange));return Et._sessionId=qe._sessionId,Et._itemId=qe._itemId,Et}lt.to=pt;function st(qe,Et,Tt){if(Et=Et??qe._sessionId,Tt=Tt??qe._itemId,Et===void 0||Tt===void 0)throw new Error("invalid item");return{_sessionId:Et,_itemId:Tt,kind:U.from(qe.kind),name:qe.name,detail:qe.detail??"",uri:qe.uri,range:g.from(qe.range),selectionRange:g.from(qe.selectionRange),tags:qe.tags?.map($.from)}}lt.from=st})(at=e.TypeHierarchyItem||(e.TypeHierarchyItem={}));var wt;(function(lt){function pt(st){if(!!st)return{value:st.value,tooltip:st.tooltip}}lt.from=pt})(wt=e.ViewBadge||(e.ViewBadge={}));var It;(function(lt){function pt(st,qe){const Et=st.fileData;return Et?new class extends n.DataTransferItem{asFile(){return{name:Et.name,uri:S.URI.revive(Et.uri),data:(0,a.once)(()=>qe())}}}("",st.id):new n.DataTransferItem(st.asString)}lt.toDataTransferItem=pt})(It=e.DataTransferItem||(e.DataTransferItem={}));var _t;(function(lt){function pt(qe,Et){const Tt=qe.items.map(([xt,At])=>[xt,It.toDataTransferItem(At,()=>Et(At.id))]);return new n.DataTransfer(Tt)}lt.toDataTransfer=pt;async function st(qe){const Et={items:[]},Tt=[];return qe.forEach((xt,At)=>{Tt.push((async()=>{const Nt=await xt.asString(),kt=xt.asFile();Et.items.push([At,{id:xt.id,asString:Nt,fileData:kt?{name:kt.name,uri:kt.uri}:void 0}])})())}),await Promise.all(Tt),Et}lt.toDataTransferDTO=st})(_t=e.DataTransfer||(e.DataTransfer={}))}),define(ae[2496],le([1,0,1490,17,2,55,214,169,39,16,6]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicEditorConfigurations=void 0;let C=class pr extends R.Disposable{constructor(u,i){super(),this.editorResolverService=u,this.configurationRegistry=p.Registry.as(A.Extensions.Configuration),(async()=>(await i.whenInstalledExtensionsRegistered(),this.updateDynamicEditorConfigurations(),this.registerListeners()))()}registerListeners(){S.Event.debounce(this.editorResolverService.onDidChangeEditorRegistrations,(u,i)=>i)(()=>this.updateDynamicEditorConfigurations())}updateDynamicEditorConfigurations(){const u=[...this.editorResolverService.getEditors(),...pr.AUTO_LOCK_EXTRA_EDITORS],i=this.editorResolverService.getEditors().filter(n=>n.priority!==E.RegisteredEditorPriority.exclusive).map(n=>n.id),f=Object.create(null);for(const n of u)f[n.id]={type:"boolean",default:pr.AUTO_LOCK_DEFAULT_ENABLED.has(n.id),description:n.label};const c=Object.create(null);for(const n of u)c[n.id]=pr.AUTO_LOCK_DEFAULT_ENABLED.has(n.id);const l=this.autoLockConfigurationNode;this.autoLockConfigurationNode={...k.workbenchConfigurationNodeBase,properties:{"workbench.editor.autoLockGroups":{type:"object",description:(0,t.localize)(1,null),properties:f,default:c,additionalProperties:!1}}};const s=this.defaultBinaryEditorConfigurationNode;this.defaultBinaryEditorConfigurationNode={...k.workbenchConfigurationNodeBase,properties:{"workbench.editor.defaultBinaryEditor":{type:"string",default:"",enum:[...i,""],description:(0,t.localize)(2,null)}}};const d=this.editorAssociationsConfigurationNode;this.editorAssociationsConfigurationNode={...k.workbenchConfigurationNodeBase,properties:{"workbench.editorAssociations":{type:"object",markdownDescription:(0,t.localize)(3,null),patternProperties:{".*":{type:"string",enum:i}}}}},this.configurationRegistry.updateConfigurations({add:[this.autoLockConfigurationNode,this.defaultBinaryEditorConfigurationNode,this.editorAssociationsConfigurationNode],remove:(0,b.coalesce)([l,s,d])})}};C.AUTO_LOCK_DEFAULT_ENABLED=new Set(["terminalEditor"]),C.AUTO_LOCK_EXTRA_EDITORS=[{id:"mainThreadWebview-markdown.preview",label:(0,t.localize)(0,null),priority:E.RegisteredEditorPriority.builtin}],C=we([F(0,E.IEditorResolverService),F(1,I.IExtensionService)],C),e.DynamicEditorConfigurations=C}),define(ae[2497],le([1,0,128,17,55,39,31,19,56,9,46]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfigurationExportHelper=void 0;let C=class{constructor(u,i,f,c,l){this.extensionService=i,this.commandService=f,this.fileService=c,this.productService=l;const s=u.args["export-default-configuration"];s&&this.writeConfigModelAndQuit(b.URI.file(s))}async writeConfigModelAndQuit(u){try{await this.extensionService.whenInstalledExtensionsRegistered(),await this.writeConfigModel(u)}finally{this.commandService.executeCommand("workbench.action.quit")}}async writeConfigModel(u){const i=this.getConfigModel(),f=JSON.stringify(i,void 0," ");await this.fileService.writeFile(u,I.VSBuffer.fromString(f))}getConfigModel(){const u=p.Registry.as(R.Extensions.Configuration),i=u.getConfigurations().slice(),f=[],c=new Set,l=(a,o)=>{if(c.has(a)){console.warn("Setting is registered twice: "+a);return}c.add(a);const g={name:a,description:o.description||o.markdownDescription||"",default:o.default,type:o.type};o.enum&&(g.enum=o.enum),(o.enumDescriptions||o.markdownEnumDescriptions)&&(g.enumDescriptions=o.enumDescriptions||o.markdownEnumDescriptions),f.push(g)},s=a=>{if(a.properties)for(const o in a.properties)l(o,a.properties[o]);a.allOf?.forEach(s)};i.forEach(s);const d=u.getExcludedConfigurationProperties();for(const a in d)l(a,d[a]);return{settings:f.sort((a,o)=>a.name.localeCompare(o.name)),buildTime:Date.now(),commit:this.productService.commit,buildNumber:this.productService.settingsSearchBuildId}}};C=we([F(0,t.INativeWorkbenchEnvironmentService),F(1,A.IExtensionService),F(2,k.ICommandService),F(3,E.IFileService),F(4,S.IProductService)],C),e.DefaultConfigurationExportHelper=C}),define(ae[922],le([1,0,1643,36,188,27,5,119,12,39,76,10,79,2,11,120,37,112,16,26,7,23,49,143,115,22,51,33,24,524,15,70,93,1144]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowRuntimeExtensionsAction=e.AbstractRuntimeExtensionsEditor=void 0;let M=class Ua extends R.EditorPane{constructor(P,B,V,z,x,H,W,U,$,q,X,G){super(Ua.ID,P,B,$),this._extensionsWorkbenchService=z,this._extensionService=x,this._notificationService=H,this._contextMenuService=W,this._instantiationService=U,this._labelService=q,this._environmentService=X,this._clipboardService=G,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?.splice(0,this._list.length,this._elements)}async _resolveExtensions(){await this._extensionService.whenInstalledExtensionsRegistered();const P=this._extensionService.extensions.filter(X=>Boolean(X.main)||Boolean(X.browser)),B=Object.create(null),V=await this._extensionsWorkbenchService.queryLocal();for(const X of V)B[h.ExtensionIdentifier.toKey(X.identifier.id)]=X;const z=this._extensionService.getExtensionsStatus(),x=Object.create(null),H=this._getProfileInfo();if(H){let X=H.startTime;for(let G=0,Q=H.deltas.length;G<Q;G++){const j=H.ids[G],K=H.deltas[G];let Y=x[h.ExtensionIdentifier.toKey(j)];Y||(Y=[],x[h.ExtensionIdentifier.toKey(j)]=Y),Y.push(X),X=X+K,Y.push(X)}}let W=[];for(let X=0,G=P.length;X<G;X++){const Q=P[X];let j=null;if(H){const K=x[h.ExtensionIdentifier.toKey(Q.identifier)]||[];let Y=0;for(let ee=0,ie=K.length/2;ee<ie;ee++){const re=K[2*ee];Y+=K[2*ee+1]-re}j={segments:K,totalTime:Y}}W[X]={originalIndex:X,description:Q,marketplaceInfo:B[h.ExtensionIdentifier.toKey(Q.identifier)],status:z[Q.identifier.value],profileInfo:j||void 0,unresponsiveProfile:this._getUnresponsiveProfile(Q.identifier)}}W=W.filter(X=>X.status.activationTimes);const U=X=>X.unresponsiveProfile===H,$=X=>X.profileInfo?.totalTime??0,q=X=>(X.status.activationTimes?.codeLoadingTime??0)+(X.status.activationTimes?.activateCallTime??0);return W=W.sort((X,G)=>U(X)||U(G)?+U(G)-+U(X):$(X)||$(G)?$(G)-$(X):q(X)||q(G)?q(G)-q(X):X.originalIndex-G.originalIndex),W}createEditor(P){P.classList.add("runtime-extensions-editor");const B="runtimeExtensionElementTemplate",V=new class{getHeight(x){return 62}getTemplateId(x){return B}},z={templateId:B,renderTemplate:x=>{const H=(0,C.append)(x,(0,C.$)(".extension")),W=(0,C.append)(H,(0,C.$)(".icon-container")),U=(0,C.append)(W,(0,C.$)("img.icon")),$=(0,C.append)(H,(0,C.$)("div.desc")),q=(0,C.append)($,(0,C.$)(".header-container")),X=(0,C.append)(q,(0,C.$)(".header")),G=(0,C.append)(X,(0,C.$)("div.name")),Q=(0,C.append)(X,(0,C.$)("span.version")),j=(0,C.append)($,(0,C.$)("div.msg")),K=new r.ActionBar($,{animated:!1});K.onDidRun(({error:oe})=>oe&&this._notificationService.error(oe));const Y=(0,C.append)(H,(0,C.$)(".time")),ee=(0,C.append)(Y,(0,C.$)("div.activation-time")),ie=(0,C.append)(Y,(0,C.$)("div.profile-time"));return{root:x,element:H,icon:U,name:G,version:Q,actionbar:K,activationTime:ee,profileTime:ie,msgContainer:j,disposables:[K],elementDisposables:[]}},renderElement:(x,H,W)=>{W.elementDisposables=(0,u.dispose)(W.elementDisposables),W.root.classList.toggle("odd",H%2===1),W.elementDisposables.push((0,C.addDisposableListener)(W.icon,"error",()=>W.icon.src=x.marketplaceInfo?.iconUrlFallback||f.DefaultIconPath,{once:!0})),W.icon.src=x.marketplaceInfo?.iconUrl||f.DefaultIconPath,W.icon.complete?W.icon.style.visibility="inherit":(W.icon.style.visibility="hidden",W.icon.onload=()=>W.icon.style.visibility="inherit"),W.name.textContent=(x.marketplaceInfo?.displayName||x.description.identifier.value).substr(0,50),W.version.textContent=x.description.version;const U=x.status.activationTimes,$=U.codeLoadingTime+U.activateCallTime;W.activationTime.textContent=U.activationReason.startup?`Startup Activation: ${$}ms`:`Activation: ${$}ms`,W.actionbar.clear();const q=this._createSlowExtensionAction(x);if(q&&W.actionbar.push(q,{icon:!0,label:!0}),(0,s.isNonEmptyArray)(x.status.runtimeErrors)){const K=this._createReportExtensionIssueAction(x);K&&W.actionbar.push(K,{icon:!0,label:!0})}let X;const G=U.activationReason.extensionId.value,Q=U.activationReason.activationEvent;if(Q==="*")X=t.localize(0,null,G);else if(/^workspaceContains:/.test(Q)){const K=Q.substr(18);K.indexOf("*")>=0||K.indexOf("?")>=0?X=t.localize(1,null,K,G):X=t.localize(2,null,K,G)}else if(/^workspaceContainsTimeout:/.test(Q)){const K=Q.substr(25);X=t.localize(3,null,K,G)}else if(Q==="onStartupFinished")X=t.localize(4,null,G);else if(/^onLanguage:/.test(Q)){const K=Q.substr(11);X=t.localize(5,null,K,G)}else X=t.localize(6,null,Q,G);if(W.activationTime.title=X,(0,C.clearNode)(W.msgContainer),this._getUnresponsiveProfile(x.description.identifier)){const K=(0,C.$)("span",void 0,...(0,g.renderLabelWithIcons)(" $(alert) Unresponsive"));K.title=t.localize(7,null),W.msgContainer.appendChild(K)}if((0,s.isNonEmptyArray)(x.status.runtimeErrors)){const K=(0,C.$)("span",void 0,...(0,g.renderLabelWithIcons)(`$(bug) ${t.localize(8,null,x.status.runtimeErrors.length)}`));W.msgContainer.appendChild(K)}if(x.status.messages&&x.status.messages.length>0){const K=(0,C.$)("span",void 0,...(0,g.renderLabelWithIcons)(`$(alert) ${x.status.messages[0].message}`));W.msgContainer.appendChild(K)}let j=null;if(x.status.runningLocation&&x.status.runningLocation.equals(new b.LocalWebWorkerRunningLocation(0)))j="$(globe) web worker";else if(x.description.extensionLocation.scheme===v.Schemas.vscodeRemote){const K=this._labelService.getHostLabel(v.Schemas.vscodeRemote,this._environmentService.remoteAuthority);K?j=`$(remote) ${K}`:j=`$(remote) ${x.description.extensionLocation.authority}`}else x.status.runningLocation&&x.status.runningLocation.affinity>0&&(j=x.status.runningLocation instanceof b.LocalWebWorkerRunningLocation?`$(globe) web worker ${x.status.runningLocation.affinity+1}`:`$(server-process) local process ${x.status.runningLocation.affinity+1}`);if(j){const K=(0,C.$)("span",void 0,...(0,g.renderLabelWithIcons)(j));W.msgContainer.appendChild(K)}x.profileInfo?W.profileTime.textContent=`Profile: ${(x.profileInfo.totalTime/1e3).toFixed(2)}ms`:W.profileTime.textContent=""},disposeTemplate:x=>{x.disposables=(0,u.dispose)(x.disposables)}};this._list=this._instantiationService.createInstance(S.WorkbenchList,"RuntimeExtensions",P,V,[z],{multipleSelectionSupport:!1,setRowLineHeight:!1,horizontalScrolling:!1,overrideStyles:{listBackground:w.editorBackground},accessibilityProvider:new class{getWidgetAriaLabel(){return t.localize(9,null)}getAriaLabel(x){return x.description.name}}}),this._list.splice(0,this._list.length,this._elements||void 0),this._list.onContextMenu(x=>{if(!x.element)return;const H=[];H.push(new p.Action("runtimeExtensionsEditor.action.copyId",t.localize(10,null,x.element.description.identifier.value),void 0,!0,()=>{this._clipboardService.writeText(x.element.description.identifier.value)}));const W=this._createReportExtensionIssueAction(x.element);W&&H.push(W),H.push(new p.Separator),x.element.marketplaceInfo&&(H.push(new p.Action("runtimeExtensionsEditor.action.disableWorkspace",t.localize(11,null),void 0,!0,()=>this._extensionsWorkbenchService.setEnablement(x.element.marketplaceInfo,7))),H.push(new p.Action("runtimeExtensionsEditor.action.disable",t.localize(12,null),void 0,!0,()=>this._extensionsWorkbenchService.setEnablement(x.element.marketplaceInfo,6)))),H.push(new p.Separator);const U=this._createProfileAction();U&&H.push(U);const $=this.saveExtensionHostProfileAction;$&&H.push($),this._contextMenuService.showContextMenu({getAnchor:()=>x.anchor,getActions:()=>H})})}get saveExtensionHostProfileAction(){return this._createSaveExtensionHostProfileAction()}layout(P){this._list?.layout(P.height)}};M.ID="workbench.editor.runtimeExtensions",we([l.memoize],M.prototype,"saveExtensionHostProfileAction",null),M=we([F(0,A.ITelemetryService),F(1,I.IThemeService),F(2,n.IContextKeyService),F(3,E.IExtensionsWorkbenchService),F(4,b.IExtensionService),F(5,d.INotificationService),F(6,c.IContextMenuService),F(7,k.IInstantiationService),F(8,a.IStorageService),F(9,o.ILabelService),F(10,m.IWorkbenchEnvironmentService),F(11,L.IClipboardService)],M),e.AbstractRuntimeExtensionsEditor=M;class O extends T.Action2{constructor(){super({id:"workbench.action.showRuntimeExtensions",title:{value:t.localize(13,null),original:"Show Running Extensions"},category:_.Categories.Developer,f1:!0,menu:{id:T.MenuId.ViewContainerTitle,when:n.ContextKeyExpr.equals("viewContainer","workbench.view.extensions"),group:"2_enablement",order:3}})}async run(P){await P.get(D.IEditorService).openEditor(y.RuntimeExtensionsInput.instance,{pinned:!0})}}e.ShowRuntimeExtensionsAction=O}),define(ae[2498],le([1,0,39,66,1651,11,25]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionActivationProgress=void 0;let E=class{constructor(b,S,C){const r={location:10,title:(0,R.localize)(0,null)};let u,i=0;this._listener=b.onWillActivateByEvent(f=>{C.trace("onWillActivateByEvent: ",f.event),u||(u=new A.DeferredPromise,S.withProgress(r,c=>u.p)),i++,Promise.race([f.activation,(0,A.timeout)(5e3)]).finally(()=>{--i===0&&(u.complete(void 0),u=void 0)})})}dispose(){this._listener.dispose()}};E=we([F(0,t.IExtensionService),F(1,p.IProgressService),F(2,k.ILogService)],E),e.ExtensionActivationProgress=E}),define(ae[2499],le([1,0,1669,46,36,39,89,87,47,710]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugExtensionHostAction=void 0;let S=class mr extends R.Action{constructor(r,u,i,f,c){super(mr.ID,mr.LABEL,mr.CSS_CLASS),this._debugService=r,this._nativeHostService=u,this._dialogService=i,this._extensionService=f,this.productService=c}async run(){const r=await this._extensionService.getInspectPorts(1,!1);if(r.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,b.randomPort)()}`]});return}return r.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:r[0]})}};S.ID="workbench.extensions.action.debugExtensionHost",S.LABEL=t.localize(0,null),S.CSS_CLASS="debug-extension-host",S=we([F(0,E.IDebugService),F(1,k.INativeHostService),F(2,I.IDialogService),F(3,A.IExtensionService),F(4,p.IProductService)],S),e.DebugExtensionHostAction=S}),define(ae[2500],le([1,0,2,23,187,525,39]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedExternalUriOpenersStore=void 0;let E=class Ha extends t.Disposable{constructor(b,S){super(),this._extensionService=S,this._openers=new Map,this._memento=new R.Memento(Ha.STORAGE_ID,b),this._mementoObject=this._memento.getMemento(0,1);for(const[C,r]of Object.entries(this._mementoObject||{}))this.add(C,r.extensionId,{isCurrentlyRegistered:!1});this.invalidateOpenersOnExtensionsChanged(),this._register(this._extensionService.onDidChangeExtensions(()=>this.invalidateOpenersOnExtensionsChanged())),this._register(this._extensionService.onDidChangeExtensionsStatus(()=>this.invalidateOpenersOnExtensionsChanged()))}didRegisterOpener(b,S){this.add(b,S,{isCurrentlyRegistered:!0})}add(b,S,C){const r=this._openers.get(b);if(r){r.isCurrentlyRegistered=r.isCurrentlyRegistered||C.isCurrentlyRegistered;return}const u={extensionId:S,isCurrentlyRegistered:C.isCurrentlyRegistered};this._openers.set(b,u),this._mementoObject[b]=u,this._memento.saveMemento(),this.updateSchema()}delete(b){this._openers.delete(b),delete this._mementoObject[b],this._memento.saveMemento(),this.updateSchema()}async invalidateOpenersOnExtensionsChanged(){await this._extensionService.whenInstalledExtensionsRegistered();const b=this._extensionService.extensions;for(const[S,C]of this._openers){const r=b.find(u=>u.identifier.value===C.extensionId);r?this._extensionService.canRemoveExtension(r)||C.isCurrentlyRegistered||this.delete(S):this.delete(S)}}updateSchema(){const b=[],S=[];for(const[C,r]of this._openers)b.push(C),S.push(r.extensionId);(0,A.updateContributedOpeners)(b,S)}};E.STORAGE_ID="externalUriOpeners",E=we([F(0,p.IStorageService),F(1,k.IExtensionService)],E),e.ContributedExternalUriOpenersStore=E}),define(ae[2501],le([1,0,6,2,39]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookRendererMessagingService=void 0;let A=class extends p.Disposable{constructor(E){super(),this.extensionService=E,this.activations=new Map,this.scopedMessaging=new Map,this.postMessageEmitter=this._register(new t.Emitter),this.onShouldPostMessage=this.postMessageEmitter.event}receiveMessage(E,I,b){if(E===void 0){const S=[...this.scopedMessaging.values()].map(C=>C.receiveMessageHandler?.(I,b));return Promise.all(S).then(C=>C.some(r=>!!r))}return this.scopedMessaging.get(E)?.receiveMessageHandler?.(I,b)??Promise.resolve(!1)}prepare(E){if(this.activations.has(E))return;const I=[];this.activations.set(E,I),this.extensionService.activateByEvent(`onRenderer:${E}`).then(()=>{for(const b of I)this.postMessageEmitter.fire(b);this.activations.set(E,void 0)})}getScoped(E){const I=this.scopedMessaging.get(E);if(I)return I;const b={postMessage:(S,C)=>this.postMessage(E,S,C),dispose:()=>this.scopedMessaging.delete(E)};return this.scopedMessaging.set(E,b),b}postMessage(E,I,b){this.activations.has(I)||this.prepare(I);const S=this.activations.get(I),C={rendererId:I,editorId:E,message:b};S===void 0?this.postMessageEmitter.fire(C):S.push(C)}};A=we([F(0,R.IExtensionService)],A),e.NotebookRendererMessagingService=A}),define(ae[2502],le([1,0,10,2,7,101,152,162,228,39]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorContextKeys=void 0;let S=class{constructor(r,u,i,f,c){this._editor=r,this._notebookKernelService=u,this._extensionService=f,this._notebookExecutionStateService=c,this._disposables=new p.DisposableStore,this._viewModelDisposables=new p.DisposableStore,this._cellOutputsListeners=[],this._selectedKernelDisposables=new p.DisposableStore,this._notebookKernel=k.NOTEBOOK_KERNEL.bindTo(i),this._notebookKernelCount=k.NOTEBOOK_KERNEL_COUNT.bindTo(i),this._notebookKernelSelected=k.NOTEBOOK_KERNEL_SELECTED.bindTo(i),this._interruptibleKernel=k.NOTEBOOK_INTERRUPTIBLE_KERNEL.bindTo(i),this._someCellRunning=k.NOTEBOOK_HAS_RUNNING_CELL.bindTo(i),this._useConsolidatedOutputButton=k.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.bindTo(i),this._hasOutputs=k.NOTEBOOK_HAS_OUTPUTS.bindTo(i),this._viewType=k.NOTEBOOK_VIEW_TYPE.bindTo(i),this._missingKernelExtension=k.NOTEBOOK_MISSING_KERNEL_EXTENSION.bindTo(i),this._notebookKernelSourceCount=k.NOTEBOOK_KERNEL_SOURCE_COUNT.bindTo(i),this._cellToolbarLocation=k.NOTEBOOK_CELL_TOOLBAR_LOCATION.bindTo(i),this._lastCellFailed=k.NOTEBOOK_LAST_CELL_FAILED.bindTo(i),this._handleDidChangeModel(),this._updateForNotebookOptions(),this._disposables.add(r.onDidChangeModel(this._handleDidChangeModel,this)),this._disposables.add(u.onDidAddKernel(this._updateKernelContext,this)),this._disposables.add(u.onDidChangeSelectedNotebooks(this._updateKernelContext,this)),this._disposables.add(u.onDidChangeSourceActions(this._updateKernelContext,this)),this._disposables.add(r.notebookOptions.onDidChangeOptions(this._updateForNotebookOptions,this)),this._disposables.add(f.onDidChangeExtensions(this._updateForInstalledExtension,this)),this._disposables.add(c.onDidChangeCellExecution(this._updateForCellExecution,this)),this._disposables.add(c.onDidChangeLastRunFailState(this._updateForLastRunFailState,this))}dispose(){this._disposables.dispose(),this._viewModelDisposables.dispose(),this._notebookKernelCount.reset(),this._notebookKernelSourceCount.reset(),this._interruptibleKernel.reset(),this._someCellRunning.reset(),this._viewType.reset(),(0,p.dispose)(this._cellOutputsListeners),this._cellOutputsListeners.length=0}_handleDidChangeModel(){if(this._updateKernelContext(),this._updateForNotebookOptions(),this._viewModelDisposables.clear(),(0,p.dispose)(this._cellOutputsListeners),this._cellOutputsListeners.length=0,!this._editor.hasModel())return;const r=()=>{let f=!1;if(this._editor.hasModel()){for(let c=0;c<this._editor.getLength();c++)if(this._editor.cellAt(c).outputsViewModels.length>0){f=!0;break}}this._hasOutputs.set(f)},u=this._viewModelDisposables.add(new p.DisposableStore),i=f=>f.model.onDidChangeOutputs(()=>{u.clear(),u.add(t.scheduleAtNextAnimationFrame(()=>{r()}))});for(let f=0;f<this._editor.getLength();f++){const c=this._editor.cellAt(f);this._cellOutputsListeners.push(i(c))}r(),this._updateForInstalledExtension(),this._viewModelDisposables.add(this._editor.onDidChangeViewCells(f=>{[...f.splices].reverse().forEach(c=>{const[l,s,d]=c,n=this._cellOutputsListeners.splice(l,s,...d.map(i));(0,p.dispose)(n)})})),this._viewType.set(this._editor.textModel.viewType)}_updateForCellExecution(){if(this._editor.textModel){const r=this._notebookExecutionStateService.getCellExecutionsForNotebook(this._editor.textModel.uri);this._someCellRunning.set(r.length>0)}else this._someCellRunning.set(!1)}_updateForLastRunFailState(r){r.notebook===this._editor.textModel?.uri&&this._lastCellFailed.set(r.visible)}async _updateForInstalledExtension(){if(!this._editor.hasModel())return;const r=this._editor.textModel.viewType,u=A.KERNEL_EXTENSIONS.get(r);this._missingKernelExtension.set(!!u&&!await this._extensionService.getExtension(u))}_updateKernelContext(){if(!this._editor.hasModel()){this._notebookKernelCount.reset(),this._notebookKernelSourceCount.reset(),this._interruptibleKernel.reset();return}const{selected:r,all:u}=this._notebookKernelService.getMatchingKernel(this._editor.textModel),i=this._notebookKernelService.getSourceActions(this._editor.textModel,this._editor.scopedContextKeyService);this._notebookKernelCount.set(u.length),this._notebookKernelSourceCount.set(i.length),this._interruptibleKernel.set(r?.implementsInterrupt??!1),this._notebookKernelSelected.set(Boolean(r)),this._notebookKernel.set(r?.id??""),this._selectedKernelDisposables.clear(),r&&this._selectedKernelDisposables.add(r.onDidChange(()=>{this._interruptibleKernel.set(r?.implementsInterrupt??!1)}))}_updateForNotebookOptions(){const r=this._editor.notebookOptions.getLayoutConfiguration();this._useConsolidatedOutputButton.set(r.consolidatedOutputButton),this._cellToolbarLocation.set(this._editor.notebookOptions.computeCellToolbarLocation(this._editor.textModel?.viewType))}};S=we([F(1,I.INotebookKernelService),F(2,R.IContextKeyService),F(3,b.IExtensionService),F(4,E.INotebookExecutionStateService)],S),e.NotebookEditorContextKeys=S}),define(ae[2503],le([1,0,6,112,23,39,892,454]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableService=void 0;let I=class{get onDidChangeCollections(){return this._onDidChangeCollections.event}constructor(S,C){this._extensionService=S,this._storageService=C,this.collections=new Map,this._onDidChangeCollections=new t.Emitter;const r=this._storageService.get("terminal.integrated.environmentVariableCollections",1);r&&(JSON.parse(r).forEach(i=>this.collections.set(i.extensionIdentifier,{persistent:!0,map:(0,E.deserializeEnvironmentVariableCollection)(i.collection)})),this._invalidateExtensionCollections()),this.mergedCollection=this._resolveMergedCollection(),this._extensionService.onDidChangeExtensions(()=>this._invalidateExtensionCollections())}set(S,C){this.collections.set(S,C),this._updateCollections()}delete(S){this.collections.delete(S),this._updateCollections()}_updateCollections(){this._persistCollectionsEventually(),this.mergedCollection=this._resolveMergedCollection(),this._notifyCollectionUpdatesEventually()}_persistCollectionsEventually(){this._persistCollections()}_persistCollections(){const S=[];this.collections.forEach((r,u)=>{r.persistent&&S.push({extensionIdentifier:u,collection:(0,E.serializeEnvironmentVariableCollection)(this.collections.get(u).map)})});const C=JSON.stringify(S);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 S=this._extensionService.extensions;let C=!1;this.collections.forEach((r,u)=>{S.some(f=>f.identifier.value===u)||(this.collections.delete(u),C=!0)}),C&&this._updateCollections()}};we([(0,p.throttle)(1e3)],I.prototype,"_persistCollectionsEventually",null),we([(0,p.debounce)(1e3)],I.prototype,"_notifyCollectionUpdatesEventually",null),I=we([F(0,A.IExtensionService),F(1,R.IStorageService)],I),e.EnvironmentVariableService=I}),define(ae[2504],le([1,0,2503,35,344]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSingleton)(R.IEnvironmentVariableService,t.EnvironmentVariableService,1)}),define(ae[2505],le([1,0,72,410,92,638,14,18,13,631,60,19,26,42,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GettingStartedDetailsRenderer=void 0;let f=class{constructor(d,n,a,o){this.fileService=d,this.notificationService=n,this.extensionService=a,this.languageService=o,this.mdCache=new S.ResourceMap,this.svgCache=new S.ResourceMap}async renderMarkdown(d,n){const a=await this.readAndCacheStepMarkdown(d,n),o=(0,t.generateUuid)(),g=R.TokenizationRegistry.getColorMap(),h=g?(0,p.generateTokensCSSForColorMap)(g):"";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-${o}'; style-src 'nonce-${o}';"> <style nonce="${o}"> ${A.DEFAULT_MARKDOWN_STYLES} ${h} 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 > img { margin-bottom: 4px; } checkbox.checked > img { box-sizing: border-box; } 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="${o}"> 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(d){const n=await this.readAndCacheSVGFile(d),a=(0,t.generateUuid)(),o=R.TokenizationRegistry.getColorMap(),g=o?(0,p.generateTokensCSSForColorMap)(o):"";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} ${g} svg { position: fixed; height: 100%; width: 80%; left: 50%; top: 50%; max-width: 530px; min-width: 350px; transform: translate(-50%,-50%); } </style> </head> <body> ${n} </body> </html>`}readAndCacheSVGFile(d){return this.svgCache.has(d)||this.svgCache.set(d,this.readContentsOfPath(d,!1)),(0,I.assertIsDefined)(this.svgCache.get(d))}readAndCacheStepMarkdown(d,n){return this.mdCache.has(d)||this.mdCache.set(d,this.readContentsOfPath(d).then(a=>(0,A.renderMarkdownDocument)(l(a,n),this.extensionService,this.languageService,!0,!0))),(0,I.assertIsDefined)(this.mdCache.get(d))}async readContentsOfPath(d,n=!0){try{const a=JSON.parse(d.query).moduleId;if(n&&a)return await new Promise(g=>{J([a],h=>{g(h.default())})})}catch{}try{const a=d.with({path:d.path.replace(/\.md$/,`.nls.${k.locale}.md`)}),o=k.locale?.replace(/-.*$/,""),g=d.with({path:d.path.replace(/\.md$/,`.nls.${o}.md`)}),h=D=>this.fileService.stat(D).then(y=>!!y.size).catch(()=>!1),[v,m]=await Promise.all([h(a),h(g)]);return(await this.fileService.readFile(v?a:m?g:d)).value.toString()}catch(a){return this.notificationService.error("Error reading markdown document at `"+d+"`: "+a),""}}};f=we([F(0,C.IFileService),F(1,r.INotificationService),F(2,i.IExtensionService),F(3,u.ILanguageService)],f),e.GettingStartedDetailsRenderer=f;const c=(s,d)=>{const n=(0,E.joinPath)(d,s);return(0,b.asWebviewUri)(n).toString(!0)},l=(s,d)=>s.replace(/src="([^"]*)"/g,(n,a)=>a.startsWith("https://")?`src="${a}"`:`src="${c(a,d)}"`).replace(/!\[([^\]]*)\]\(([^)]*)\)/g,(n,a,o)=>o.startsWith("https://")?``:`})`)}),define(ae[2506],le([1,0,1975,2,7,904,17,45,39]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewsWelcomeContribution=void 0;const b=k.Registry.as(E.Extensions.ViewsRegistry);class S extends p.Disposable{constructor(u){super(),this.viewWelcomeContents=new Map,u.setHandler((i,{added:f,removed:c})=>{for(const s of c)for(const d of s.value)this.viewWelcomeContents.get(d)?.dispose();const l=new Map;for(const s of f)for(const d of s.value){const{group:n,order:a}=C(d,s),o=R.ContextKeyExpr.deserialize(d.enablement),g=A.ViewIdentifierMap[d.view]??d.view;let h=l.get(g);h||(h=new Map,l.set(g,h)),h.set(d,{content:d.contents,when:R.ContextKeyExpr.deserialize(d.when),precondition:o,group:n,order:a})}for(const[s,d]of l){const n=b.registerViewWelcomeContent2(s,d);for(const[a,o]of n)this.viewWelcomeContents.set(a,o)}})}}e.ViewsWelcomeContribution=S;function C(r,u){let i,f;if(r.group){if(!(0,I.isProposedApiEnabled)(u.description,"contribViewsWelcome"))return u.collector.warn(t.localize(0,null,u.description.identifier.value)),{group:i,order:f};const c=r.group.lastIndexOf("@");c>0?(i=r.group.substr(0,c),f=Number(r.group.substr(c+1))||void 0):i=r.group}return{group:i,order:f}}}),define(ae[923],le([1,0,147,133,28,9,2,188,27,662,41,114,173,5,38,1979,23,7,8,13,31,12,33,2435,327,14,52,26,10,58,39,1185]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,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 _=(0,f.localize)(0,null),L="walkThroughEditorViewState";let M=class Ka extends E.EditorPane{constructor(N,P,B,V,z,x,H,W,U,$,q,X){super(Ka.ID,N,P,H),this.instantiationService=V,this.openerService=z,this.keybindingService=x,this.contextKeyService=W,this.configurationService=U,this.notificationService=$,this.extensionService=q,this.disposables=new k.DisposableStore,this.contentDisposables=[],this.editorFocus=e.WALK_THROUGH_FOCUS.bindTo(this.contextKeyService),this.editorMemento=this.getEditorMemento(X,B,L)}createEditor(N){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),N.appendChild(this.scrollbar.getDomNode()),this.registerFocusHandlers(),this.registerClickHandler(),this.disposables.add(this.scrollbar.onScroll(P=>this.updatedScrollPosition()))}updatedScrollPosition(){const N=this.scrollbar.getScrollDimensions(),P=this.scrollbar.getScrollPosition(),B=N.scrollHeight;if(B&&this.input instanceof b.WalkThroughInput){const V=P.scrollTop,z=N.height;this.input.relativeScrollPosition(V/B,(V+z)/B)}}onTouchChange(N){N.preventDefault(),N.stopPropagation();const P=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:P.scrollTop-N.translationY})}addEventListener(N,P,B,V){return N.addEventListener(P,B,V),(0,k.toDisposable)(()=>{N.removeEventListener(P,B,V)})}registerFocusHandlers(){this.disposables.add(this.addEventListener(this.content,"mousedown",N=>{this.focus()})),this.disposables.add(this.addEventListener(this.content,"focus",N=>{this.editorFocus.set(!0)})),this.disposables.add(this.addEventListener(this.content,"blur",N=>{this.editorFocus.reset()})),this.disposables.add(this.addEventListener(this.content,"focusin",N=>{if(N.target instanceof HTMLElement&&N.target.classList.contains("zone-widget-container")){const P=this.scrollbar.getScrollPosition();this.content.scrollTop=P.scrollTop,this.content.scrollLeft=P.scrollLeft}N.target instanceof HTMLElement&&(this.lastFocus=N.target)}))}registerClickHandler(){this.content.addEventListener("click",N=>{for(let P=N.target;P;P=P.parentNode)if(P instanceof HTMLAnchorElement&&P.href){const B=window.document.getElementsByTagName("base")[0]||window.location;if(B&&P.href.indexOf(B.href)>=0&&P.hash){const V=this.content.querySelector(P.hash),z=this.content.firstElementChild;if(V&&z){const x=V.getBoundingClientRect().top-20,H=z.getBoundingClientRect().top;this.scrollbar.setScrollPosition({scrollTop:x-H})}}else this.open(A.URI.parse(P.href));N.preventDefault();break}else if(P instanceof HTMLButtonElement){const B=P.getAttribute("data-href");B&&this.open(A.URI.parse(B));break}else if(P===N.currentTarget)break})}open(N){if(N.scheme==="command"&&N.path==="git.clone"&&!n.CommandsRegistry.getCommand("git.clone")){this.notificationService.info((0,f.localize)(1,null));return}this.openerService.open(this.addFrom(N),{allowCommands:!0})}addFrom(N){if(N.scheme!=="command"||!(this.input instanceof b.WalkThroughInput))return N;const P=N.query?JSON.parse(N.query):{};return P.from=this.input.getTelemetryFrom(),N.with({query:JSON.stringify(P)})}layout(N){this.size=N,(0,D.size)(this.content,N.width,N.height),this.updateSizeClasses(),this.contentDisposables.forEach(B=>{B instanceof r.CodeEditorWidget&&B.layout()});const P=this.input instanceof b.WalkThroughInput&&this.input;P&&P.layout&&P.layout(N),this.scrollbar.scanDomNode()}updateSizeClasses(){const N=this.content.firstElementChild;this.size&&N&&N.classList.toggle("max-height-685px",this.size.height<=685)}focus(){let N=document.activeElement;for(;N&&N!==this.content;)N=N.parentElement;N||(this.lastFocus||this.content).focus(),this.editorFocus.set(!0)}arrowUp(){const N=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:N.scrollTop-this.getArrowScrollHeight()})}arrowDown(){const N=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:N.scrollTop+this.getArrowScrollHeight()})}getArrowScrollHeight(){let N=this.configurationService.getValue("editor.fontSize");return(typeof N!="number"||N<1)&&(N=12),3*N}pageUp(){const N=this.scrollbar.getScrollDimensions(),P=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:P.scrollTop-N.height})}pageDown(){const N=this.scrollbar.getScrollDimensions(),P=this.scrollbar.getScrollPosition();this.scrollbar.setScrollPosition({scrollTop:P.scrollTop+N.height})}setInput(N,P,B,V){const z=new k.DisposableStore;return this.contentDisposables.push(z),this.content.innerText="",super.setInput(N,P,B,V).then(async()=>(N.resource.path.endsWith(".md")&&await this.extensionService.whenInstalledExtensionsRegistered(),N.resolve())).then(x=>{if(V.isCancellationRequested)return;const H=x.main;if(!N.resource.path.endsWith(".md")){(0,D.safeInnerHtml)(this.content,H),this.updateSizeClasses(),this.decorateContent(),this.contentDisposables.push(this.keybindingService.onDidUpdateKeybindings(()=>this.decorateContent())),N.onReady?.(this.content.firstElementChild,z),this.scrollbar.scanDomNode(),this.loadTextEditorViewState(N),this.updatedScrollPosition();return}const W=document.createElement("div");W.classList.add("walkThroughContent");const U=this.expandMacros(H);(0,D.safeInnerHtml)(W,U),this.content.appendChild(W),x.snippets.forEach(($,q)=>{const X=$.textEditorModel;if(!X)return;const G=`snippet-${X.uri.fragment}`,Q=W.querySelector(`#${G.replace(/[\\.]/g,"\\$&")}`),j=this.getEditorOptions(X.getLanguageId()),K={target:this.input instanceof b.WalkThroughInput?this.input.getTelemetryFrom():void 0,snippet:q},Y=this.instantiationService.createInstance(r.CodeEditorWidget,Q,j,{telemetryData:K});Y.setModel(X),this.contentDisposables.push(Y);const ee=ie=>{const re=Y.getOption(60),oe=`${Math.max(X.getLineCount()+1,4)*re}px`;Q.style.height!==oe&&(Q.style.height=oe,Y.layout(),ie||this.scrollbar.scanDomNode())};ee(!0),this.contentDisposables.push(Y.onDidChangeModelContent(()=>ee(!1))),this.contentDisposables.push(Y.onDidChangeCursorPosition(ie=>{const re=this.content.firstElementChild;if(re){const oe=Q.getBoundingClientRect().top,se=re.getBoundingClientRect().top,te=Y.getOption(60),Z=oe+(ie.position.lineNumber-1)*te-se,ne=Z+te,ce=this.scrollbar.getScrollDimensions(),he=this.scrollbar.getScrollPosition().scrollTop,pe=ce.height;he>Z?this.scrollbar.setScrollPosition({scrollTop:Z}):he<ne-pe&&this.scrollbar.setScrollPosition({scrollTop:ne-pe})}})),this.contentDisposables.push(this.configurationService.onDidChangeConfiguration(()=>{$.textEditorModel&&Y.updateOptions(this.getEditorOptions($.textEditorModel.getLanguageId()))}))}),this.updateSizeClasses(),this.multiCursorModifier(),this.contentDisposables.push(this.configurationService.onDidChangeConfiguration($=>{$.affectsConfiguration("editor.multiCursorModifier")&&this.multiCursorModifier()})),N.onReady?.(W,z),this.scrollbar.scanDomNode(),this.loadTextEditorViewState(N),this.updatedScrollPosition(),this.contentDisposables.push(p.Gesture.addTarget(W)),this.contentDisposables.push((0,D.addDisposableListener)(W,p.EventType.Change,$=>this.onTouchChange($)))})}getEditorOptions(N){const P=(0,m.deepClone)(this.configurationService.getValue("editor",{overrideIdentifier:N}));return{...(0,d.isObject)(P)?P: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(N){return N.replace(/kb\(([a-z.\d\-]+)\)/gi,(P,B)=>{const V=this.keybindingService.lookupKeybinding(B),z=V?V.getLabel()||"":_;return`<span class="shortcut">${R.escape(z)}</span>`})}decorateContent(){const N=this.content.querySelectorAll(".shortcut[data-command]");Array.prototype.forEach.call(N,B=>{const V=B.getAttribute("data-command"),z=V&&this.keybindingService.lookupKeybinding(V),x=z?z.getLabel()||"":_;for(;B.firstChild;)B.removeChild(B.firstChild);B.appendChild(document.createTextNode(x))});const P=this.content.querySelectorAll(".if_shortcut[data-command]");Array.prototype.forEach.call(P,B=>{const V=B.getAttribute("data-command"),z=V&&this.keybindingService.lookupKeybinding(V);B.style.display=z?"":"none"})}multiCursorModifier(){const N=h.UILabelProvider.modifierLabels[v.OS],P=this.configurationService.getValue("editor.multiCursorModifier"),B=N[P==="ctrlCmd"?v.OS===2?"metaKey":"ctrlKey":"altKey"],V=this.content.querySelectorAll(".multi-cursor-modifier");Array.prototype.forEach.call(V,z=>{for(;z.firstChild;)z.removeChild(z.firstChild);z.appendChild(document.createTextNode(B))})}saveTextEditorViewState(N){const P=this.scrollbar.getScrollPosition();this.group&&this.editorMemento.saveEditorState(this.group,N,{viewState:{scrollTop:P.scrollTop,scrollLeft:P.scrollLeft}})}loadTextEditorViewState(N){if(this.group){const P=this.editorMemento.loadEditorState(this.group,N);P&&this.scrollbar.setScrollPosition(P.viewState)}}clearInput(){this.input instanceof b.WalkThroughInput&&this.saveTextEditorViewState(this.input),this.contentDisposables=(0,k.dispose)(this.contentDisposables),super.clearInput()}saveState(){this.input instanceof b.WalkThroughInput&&this.saveTextEditorViewState(this.input),super.saveState()}dispose(){this.editorFocus.reset(),this.contentDisposables=(0,k.dispose)(this.contentDisposables),this.disposables.dispose(),super.dispose()}};M.ID="workbench.editor.walkThroughPart",M=we([F(0,I.ITelemetryService),F(1,a.IThemeService),F(2,C.ITextResourceConfigurationService),F(3,u.IInstantiationService),F(4,S.IOpenerService),F(5,i.IKeybindingService),F(6,c.IStorageService),F(7,l.IContextKeyService),F(8,s.IConfigurationService),F(9,w.INotificationService),F(10,T.IExtensionService),F(11,y.IEditorGroupsService)],M),e.WalkThroughPart=M,e.embeddedEditorBackground=(0,o.registerColor)("walkThrough.embeddedEditorBackground",{dark:null,light:null,hcDark:null,hcLight:null},(0,f.localize)(2,null)),(0,a.registerThemingParticipant)((O,N)=>{const P=(0,g.getExtraColor)(O,e.embeddedEditorBackground,{dark:"rgba(0, 0, 0, .4)",extra_dark:"rgba(200, 235, 255, .064)",light:"#f4f4f4",hcDark:null,hcLight:null});P&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .monaco-editor-background, .monaco-workbench .part.editor > .content .walkThroughContent .margin-view-overlays { background: ${P}; }`);const B=O.getColor(o.textLinkForeground);B&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent a[href] { color: ${B}; }`);const V=O.getColor(o.textLinkActiveForeground);V&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent a:hover, .monaco-workbench .part.editor > .content .walkThroughContent a[href]:active { color: ${V}; }`);const z=O.getColor(o.focusBorder);z&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent a[href]:focus { outline-color: ${z}; }`);const x=O.getColor(o.textPreformatForeground);x&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent code, .monaco-workbench .part.editor > .content .walkThroughContent .shortcut { color: ${x}; }`);const H=O.getColor(o.contrastBorder);H&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent .monaco-editor { border-color: ${H}; }`);const W=O.getColor(o.textBlockQuoteBackground);W&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent blockquote { background: ${W}; }`);const U=O.getColor(o.textBlockQuoteBorder);U&&N.addRule(`.monaco-workbench .part.editor > .content .walkThroughContent blockquote { border-color: ${U}; }`)})}),define(ae[2507],le([1,0,24,923,59,7]),function(J,e,t,p,R,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(p.WALK_THROUGH_FOCUS,R.EditorContextKeys.editorTextFocus.toNegated()),primary:16,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof p.WalkThroughPart&&I.arrowUp()}},e.WalkThroughArrowDown={id:"workbench.action.interactivePlayground.arrowDown",weight:200,when:A.ContextKeyExpr.and(p.WALK_THROUGH_FOCUS,R.EditorContextKeys.editorTextFocus.toNegated()),primary:18,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof p.WalkThroughPart&&I.arrowDown()}},e.WalkThroughPageUp={id:"workbench.action.interactivePlayground.pageUp",weight:200,when:A.ContextKeyExpr.and(p.WALK_THROUGH_FOCUS,R.EditorContextKeys.editorTextFocus.toNegated()),primary:11,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof p.WalkThroughPart&&I.pageUp()}},e.WalkThroughPageDown={id:"workbench.action.interactivePlayground.pageDown",weight:200,when:A.ContextKeyExpr.and(p.WALK_THROUGH_FOCUS,R.EditorContextKeys.editorTextFocus.toNegated()),primary:12,handler:k=>{const I=k.get(t.IEditorService).activeEditorPane;I instanceof p.WalkThroughPart&&I.pageDown()}}}),define(ae[2508],le([1,0,5,31,39,6,2,25,35,11]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandService=void 0;let S=class extends k.Disposable{constructor(r,u,i){super(),this._instantiationService=r,this._extensionService=u,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(f=>this._extensionHostIsReady=f),this._starActivation=null}_activateStar(){return this._starActivation||(this._starActivation=Promise.race([this._extensionService.activateByEvent("*"),(0,b.timeout)(3e4)])),this._starActivation}async executeCommand(r,...u){this._logService.trace("CommandService#executeCommand",r);const i=`onCommand:${r}`;return p.CommandsRegistry.getCommand(r)?this._extensionService.activationEventIsDone(i)?this._tryExecuteCommand(r,u):this._extensionHostIsReady?(await this._extensionService.activateByEvent(i),this._tryExecuteCommand(r,u)):(this._extensionService.activateByEvent(i),this._tryExecuteCommand(r,u)):(await Promise.all([this._extensionService.activateByEvent(i),Promise.race([this._activateStar(),A.Event.toPromise(A.Event.filter(p.CommandsRegistry.onDidRegisterCommand,c=>c===r))])]),this._tryExecuteCommand(r,u))}_tryExecuteCommand(r,u){const i=p.CommandsRegistry.getCommand(r);if(!i)return Promise.reject(new Error(`command '${r}' not found`));try{this._onWillExecuteCommand.fire({commandId:r,args:u});const f=this._instantiationService.invokeFunction(i.handler,...u);return this._onDidExecuteCommand.fire({commandId:r,args:u}),Promise.resolve(f)}catch(f){return Promise.reject(f)}}};S=we([F(0,t.IInstantiationService),F(1,R.IExtensionService),F(2,E.ILogService)],S),e.CommandService=S,(0,I.registerSingleton)(p.ICommandService,S,1)}),define(ae[2509],le([1,0,144,16,2,18,9,8,161,43,58,22,169,48,2003,26,27,35,23,39,25,671,5,177,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorResolverService=void 0;let v=class Fi extends R.Disposable{constructor(w,D,y,T,_,L,M,O,N){super(),this.editorGroupService=w,this.instantiationService=D,this.configurationService=y,this.quickInputService=T,this.notificationService=_,this.telemetryService=L,this.storageService=M,this.extensionService=O,this.logService=N,this._onDidChangeEditorRegistrations=this._register(new h.PauseableEmitter),this.onDidChangeEditorRegistrations=this._onDidChangeEditorRegistrations.event,this._editors=new Map,this._flattenedEditors=new Map,this._shouldReFlattenEditors=!0,this.cache=new Set(JSON.parse(this.storageService.get(Fi.cacheStorageID,0,JSON.stringify([])))),this.storageService.remove(Fi.cacheStorageID,0),this._register(this.storageService.onWillSaveState(()=>{this.cacheEditors()})),this.extensionService.onDidRegisterExtensions(()=>{this.cache=void 0})}resolveUntypedInputAndGroup(w,D){const y=w,[T,_]=this.instantiationService.invokeFunction(a.findGroup,y,D);return[y,T,_]}async resolveEditor(w,D){if(this._flattenedEditors=this._flattenEditorsMap(),(0,b.isResourceSideBySideEditorInput)(w))return this.doResolveSideBySideEditor(w,D);const y=this.resolveUntypedInputAndGroup(w,D);if(!y)return 2;const[T,_,L]=y;L&&(T.options={...T.options,activation:L});let M=b.EditorResourceAccessor.getCanonicalUri(T,{supportSideBySide:b.SideBySideEditor.PRIMARY});const O=T.options;if(this.cache&&M&&this.resourceMatchesCache(M)&&await this.extensionService.whenInstalledExtensionsRegistered(),M===void 0)M=k.URI.from({scheme:C.Schemas.untitled});else if(M.scheme===void 0||M===null)return 2;if(T.options?.override===I.EditorResolution.PICK){const x=await this.doPickEditor(T);if(!x)return 1;T.options=x}let{editor:N,conflictingDefault:P}=this.getEditor(M,T.options?.override);if(!N&&(T.options?.override||(0,b.isEditorInputWithOptions)(w)))return 2;if(!N){const x=this.getEditor(M,b.DEFAULT_EDITOR_ASSOCIATION.id);if(N=x?.editor,P=x?.conflictingDefault,!N)return 2}if((0,b.isResourceDiffEditorInput)(T)&&T.options?.override===void 0){let x=b.EditorResourceAccessor.getCanonicalUri(T,{supportSideBySide:b.SideBySideEditor.SECONDARY});x||(x=k.URI.from({scheme:C.Schemas.untitled}));const{editor:H}=this.getEditor(x,void 0);if(!H||N.editorInfo.id!==H.editorInfo.id){const{editor:W,conflictingDefault:U}=this.getEditor(M,b.DEFAULT_EDITOR_ASSOCIATION.id);N=W,P=U}if(!N)return 2}if(T.options={override:N.editorInfo.id,...T.options},N.editorFactoryObject.createDiffEditorInput===void 0&&(0,b.isResourceDiffEditorInput)(T))return 2;const B=_.activeEditor,V=B?B.matches(T):!1;if(B&&V)return{editor:B,options:O,group:_};const z=await this.doResolveEditor(T,_,N);return P&&z&&await this.doHandleConflictingDefaults(M,N.editorInfo.label,T,z.editor,_),z?(this.sendEditorResolutionTelemetry(z.editor),z.editor.editorId!==N.editorInfo.id&&this.logService.warn(`Editor ID Mismatch: ${z.editor.editorId} !== ${N.editorInfo.id}. This will cause bugs. Please ensure editorInput.editorId matches the registered id`),{...z,group:_}):1}async doResolveSideBySideEditor(w,D){const y=await this.resolveEditor(w.primary,D);if(!(0,b.isEditorInputWithOptionsAndGroup)(y))return 2;const T=await this.resolveEditor(w.secondary,y.group??D);return(0,b.isEditorInputWithOptionsAndGroup)(T)?{group:y.group??T.group,editor:this.instantiationService.createInstance(g.SideBySideEditorInput,w.label,w.description,T.editor,y.editor),options:w.options}:2}bufferChangeEvents(w){this._onDidChangeEditorRegistrations.pause();try{w()}finally{this._onDidChangeEditorRegistrations.resume()}}registerEditor(w,D,y,T){let _=this._editors.get(w);_===void 0&&(_=new Map,this._editors.set(w,_));let L=_.get(D.id);L===void 0&&(L=[]);const M=(0,p.insert)(L,{globPattern:w,editorInfo:D,options:y,editorFactoryObject:T});return _.set(D.id,L),this._shouldReFlattenEditors=!0,this._onDidChangeEditorRegistrations.fire(),(0,R.toDisposable)(()=>{M(),L&&L.length===0&&_?.delete(D.id),this._shouldReFlattenEditors=!0,this._onDidChangeEditorRegistrations.fire()})}getAssociationsForResource(w){const y=this.getAllUserAssociations().filter(_=>_.filenamePattern&&(0,r.globMatchesResource)(_.filenamePattern,w)),T=this._registeredEditors;return y.filter(_=>T.find(L=>L.editorInfo.id===_.viewType))}getAllUserAssociations(){const w=this.configurationService.inspect(r.editorsAssociationsSettingId)||{},D=w.workspaceValue??{},y=w.userValue??{},T={...D};for(const[L,M]of Object.entries(y))T[L]===void 0&&(T[L]=M);const _=[];for(const[L,M]of Object.entries(T)){const O={filenamePattern:L,viewType:M};_.push(O)}return _}_flattenEditorsMap(){if(!this._shouldReFlattenEditors)return this._flattenedEditors;this._shouldReFlattenEditors=!1;const w=new Map;for(const[D,y]of this._editors){const T=[];for(const _ of y.values()){let L;for(const M of _)L||(L={editorInfo:M.editorInfo,globPattern:M.globPattern,options:{},editorFactoryObject:{}}),L.options={...L.options,...M.options},L.editorFactoryObject={...L.editorFactoryObject,...M.editorFactoryObject};L&&T.push(L)}w.set(D,T)}return w}get _registeredEditors(){return(0,p.flatten)(Array.from(this._flattenedEditors.values()))}updateUserAssociations(w,D){const y={viewType:D,filenamePattern:w},T=this.getAllUserAssociations(),_=Object.create(null);for(const L of[...T,y])L.filenamePattern&&(_[L.filenamePattern]=L.viewType);this.configurationService.updateValue(r.editorsAssociationsSettingId,_)}findMatchingEditors(w){const D=this.getAssociationsForResource(w),y=[];for(const[T,_]of this._flattenedEditors)for(const L of _)(D.find(O=>O.viewType===L.editorInfo.id)&&L.editorInfo.priority!==r.RegisteredEditorPriority.exclusive||(0,r.globMatchesResource)(T,w))&&y.push(L);return y.sort((T,_)=>(0,r.priorityToRank)(_.editorInfo.priority)===(0,r.priorityToRank)(T.editorInfo.priority)&&typeof _.globPattern=="string"&&typeof T.globPattern=="string"?_.globPattern.length-T.globPattern.length:(0,r.priorityToRank)(_.editorInfo.priority)-(0,r.priorityToRank)(T.editorInfo.priority))}getEditors(w){if(this._flattenedEditors=this._flattenEditorsMap(),k.URI.isUri(w)){const D=this.findMatchingEditors(w);return D.find(y=>y.editorInfo.priority===r.RegisteredEditorPriority.exclusive)?[]:D.map(y=>y.editorInfo)}return(0,p.distinct)(this._registeredEditors.map(D=>D.editorInfo),D=>D.id)}getEditor(w,D){const y=(P,B)=>P.find(V=>V.options&&V.options.canSupportResource!==void 0?V.editorInfo.id===B&&V.options.canSupportResource(w):V.editorInfo.id===B);if(D&&D!==I.EditorResolution.EXCLUSIVE_ONLY){const P=this._registeredEditors;return{editor:y(P,D),conflictingDefault:!1}}const T=this.findMatchingEditors(w),_=this.getAssociationsForResource(w),L=D===I.EditorResolution.EXCLUSIVE_ONLY?r.RegisteredEditorPriority.exclusive:r.RegisteredEditorPriority.builtin;let M=T.filter(P=>(0,r.priorityToRank)(P.editorInfo.priority)>=(0,r.priorityToRank)(L)&&P.editorInfo.id!==b.DEFAULT_EDITOR_ASSOCIATION.id);if(M.length===0)return{editor:_[0]&&L!==r.RegisteredEditorPriority.exclusive?y(T,_[0].viewType):void 0,conflictingDefault:!1};const O=M[0].editorInfo.priority===r.RegisteredEditorPriority.exclusive?M[0].editorInfo.id:_[0]?.viewType||M[0].editorInfo.id;let N=!1;return M=M.filter(P=>P.editorInfo.priority!==r.RegisteredEditorPriority.exclusive),_.length===0&&M.length>1&&(N=!0),{editor:y(T,O),conflictingDefault:N}}async doResolveEditor(w,D,y){let T=w.options;const _=b.EditorResourceAccessor.getCanonicalUri(w,{supportSideBySide:b.SideBySideEditor.PRIMARY});if(T&&typeof T.activation>"u"&&(T={...T,activation:T.preserveFocus?I.EditorActivation.RESTORE:void 0}),(0,b.isResourceMergeEditorInput)(w)){if(!y.editorFactoryObject.createMergeEditorInput)return;const N=await y.editorFactoryObject.createMergeEditorInput(w,D);return{editor:N.editor,options:N.options??T}}if((0,b.isResourceDiffEditorInput)(w)){if(!y.editorFactoryObject.createDiffEditorInput)return;const N=await y.editorFactoryObject.createDiffEditorInput(w,D);return{editor:N.editor,options:N.options??T}}if((0,b.isResourceSideBySideEditorInput)(w))throw new Error("Untyped side by side editor input not supported here.");if((0,b.isUntitledResourceEditorInput)(w)){if(!y.editorFactoryObject.createUntitledEditorInput)return;const N=await y.editorFactoryObject.createUntitledEditorInput(w,D);return{editor:N.editor,options:N.options??T}}if(_===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 N=await this.moveExistingEditorForResource(_,y.editorInfo.id,D);if(N)return{editor:N,options:T}}if(!y.editorFactoryObject.createEditorInput)return;const M=await y.editorFactoryObject.createEditorInput(w,D);return T=M.options??T,{editor:M.editor,options:T}}async moveExistingEditorForResource(w,D,y){const T=this.findExistingEditorsForResource(w,D);if(!T.length)return;const _=T[0];for(const{editor:L,group:M}of T)if(L!==_.editor&&!await M.closeEditor(L))return;if(y.id!==_.group.id)return _.group.moveEditor(_.editor,y),_.editor}findExistingEditorsForResource(w,D){const y=[],T=(0,p.distinct)([...this.editorGroupService.groups]);for(const _ of T)for(const L of _.editors)(0,A.isEqual)(L.resource,w)&&L.editorId===D&&y.push({editor:L,group:_});return y}async doHandleConflictingDefaults(w,D,y,T,_){const L=this.findMatchingEditors(w),M=JSON.parse(this.storageService.get(Fi.conflictingDefaultsStorageID,0,"{}")),O=`*${(0,A.extname)(w)}`,N=()=>{M[O]=[],L.forEach(V=>M[O].push(V.editorInfo.id)),this.storageService.store(Fi.conflictingDefaultsStorageID,JSON.stringify(M),0,1)};if(M[O]&&M[O].find(V=>V===T.editorId))return;const B=this.notificationService.prompt(f.Severity.Warning,(0,i.localize)(0,null),[{label:(0,i.localize)(1,null),run:async()=>{const V=await this.doPickEditor(y,!0);if(!V)return;y.options=V;const z=await this.resolveEditor(y,_);z===1||z===2||_.replaceEditors([{editor:T,replacement:z.editor,options:z.options??V}])}},{label:(0,i.localize)(2,null,D),run:N}]).onDidClose(()=>{N(),B.dispose()})}mapEditorsToQuickPickEntry(w,D){const y=(0,p.firstOrDefault)(this.editorGroupService.activeGroup.findEditors(w));let T=w.scheme===C.Schemas.untitled?this._registeredEditors.filter(B=>B.editorInfo.priority!==r.RegisteredEditorPriority.exclusive):this.findMatchingEditors(w);T=(0,p.distinct)(T,B=>B.editorInfo.id);const _=this.getAssociationsForResource(w)[0]?.viewType;T=T.sort((B,V)=>B.editorInfo.id===b.DEFAULT_EDITOR_ASSOCIATION.id?-1:V.editorInfo.id===b.DEFAULT_EDITOR_ASSOCIATION.id?1:(0,r.priorityToRank)(V.editorInfo.priority)-(0,r.priorityToRank)(B.editorInfo.priority));const L=[],M=(0,i.localize)(3,null),O=(0,i.localize)(4,null),N=(0,i.localize)(5,null);let P=_;if(!P&&T.length>2&&T[1]?.editorInfo.priority!==r.RegisteredEditorPriority.option&&(P=T[1]?.editorInfo.id),P||(P=b.DEFAULT_EDITOR_ASSOCIATION.id),T.forEach(B=>{const V=y?.editorId??b.DEFAULT_EDITOR_ASSOCIATION.id,z=y?B.editorInfo.id===V:!1,x=B.editorInfo.id===P,H={id:B.editorInfo.id,label:B.editorInfo.label,description:z&&x?N:z?M:x?O:void 0,detail:B.editorInfo.detail??B.editorInfo.priority};L.push(H)}),!D&&(0,A.extname)(w)!==""){const B={type:"separator"};L.push(B);const V={id:Fi.configureDefaultID,label:(0,i.localize)(6,null,`*${(0,A.extname)(w)}`)};L.push(V)}return L}async doPickEditor(w,D){let y=b.EditorResourceAccessor.getOriginalUri(w,{supportSideBySide:b.SideBySideEditor.PRIMARY});y===void 0&&(y=k.URI.from({scheme:C.Schemas.untitled}));const T=this.mapEditorsToQuickPickEntry(y,D),_=this.quickInputService.createQuickPick(),L=D?(0,i.localize)(7,null,`*${(0,A.extname)(y)}`):(0,i.localize)(8,null,(0,A.basename)(y));_.placeholder=L,_.canAcceptInBackground=!0,_.items=T;const M=_.items.find(N=>N.type==="item");M&&(_.selectedItems=[M]);const O=await new Promise(N=>{_.onDidAccept(P=>{let B;_.selectedItems.length===1&&(B={item:_.selectedItems[0],keyMods:_.keyMods,openInBackground:P.inBackground}),y&&D&&B?.item.id&&this.updateUserAssociations(`*${(0,A.extname)(y)}`,B.item.id),N(B)}),_.onDidHide(()=>N(void 0)),_.onDidTriggerItemButton(P=>{N({item:P.item,openInBackground:!1}),y&&P.item&&P.item.id&&this.updateUserAssociations(`*${(0,A.extname)(y)}`,P.item.id)}),_.show()});if(_.dispose(),O)return O.item.id===Fi.configureDefaultID?this.doPickEditor(w,!0):{...w.options,override:O.item.id,preserveFocus:O.openInBackground||w.options?.preserveFocus}}sendEditorResolutionTelemetry(w){w.editorId&&this.telemetryService.publicLog2("override.viewType",{viewType:w.editorId})}cacheEditors(){const w=new Set;for(const[y,T]of this._flattenedEditors)!T.find(L=>L.editorInfo.priority!==r.RegisteredEditorPriority.option&&L.editorInfo.id!==b.DEFAULT_EDITOR_ASSOCIATION.id)||(t.isRelativePattern(y)?w.add(`${y.pattern}`):w.add(y));const D=this.getAllUserAssociations();for(const y of D)y.filenamePattern&&w.add(y.filenamePattern);this.storageService.store(Fi.cacheStorageID,JSON.stringify(Array.from(w)),0,1)}resourceMatchesCache(w){if(!this.cache)return!1;for(const D of this.cache)if((0,r.globMatchesResource)(D,w))return!0;return!1}};v.configureDefaultID="promptOpenWith.configureDefault",v.cacheStorageID="editorOverrideService.cache",v.conflictingDefaultsStorageID="editorOverrideService.conflictingDefaults",v=we([F(0,S.IEditorGroupsService),F(1,o.IInstantiationService),F(2,E.IConfigurationService),F(3,u.IQuickInputService),F(4,f.INotificationService),F(5,c.ITelemetryService),F(6,s.IStorageService),F(7,d.IExtensionService),F(8,n.ILogService)],v),e.EditorResolverService=v,(0,l.registerSingleton)(r.IEditorResolverService,v,0)}),define(ae[924],le([1,0]),function(J,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",commentsResolvedState:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.commentsResolvedState.d.ts",contribCommentPeekContext:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribCommentPeekContext.d.ts",contribEditSessions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditSessions.d.ts",contribEditorContentMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribEditorContentMenu.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",contribMergeEditorMenus:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribMergeEditorMenus.d.ts",contribNotebookStaticPreloads:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribNotebookStaticPreloads.d.ts",contribRemoteHelp:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribRemoteHelp.d.ts",contribShareMenu:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribShareMenu.d.ts",contribTerminalQuickFixes:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.contribTerminalQuickFixes.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",diffContentOptions:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.diffContentOptions.d.ts",documentFiltersExclusive:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentFiltersExclusive.d.ts",documentPaste:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.documentPaste.d.ts",editSessionIdentityProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts",editorInsets:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts",envShellEvent:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.envShellEvent.d.ts",extensionLog:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionLog.d.ts",extensionRuntime:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionRuntime.d.ts",extensionsAny:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.extensionsAny.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",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",interactiveWindow:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.interactiveWindow.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",notebookContentProvider:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookContentProvider.d.ts",notebookControllerAffinityHidden:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerAffinityHidden.d.ts",notebookControllerKind:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookControllerKind.d.ts",notebookDeprecated:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookDeprecated.d.ts",notebookEditor:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookEditor.d.ts",notebookKernelSource:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.notebookKernelSource.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",tabInputTextMerge:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.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",telemetryLogger:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetryLogger.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",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",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",treeItemCheckbox:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts",treeViewReveal:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.treeViewReveal.d.ts",tunnels:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tunnels.d.ts",workspaceTrust:"https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.workspaceTrust.d.ts"})}),define(ae[131],le([1,0,2015,21,68,82,155,17,115,924,46]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsRegistry=e.ExtensionsRegistryImpl=e.schema=e.ExtensionPoint=e.ExtensionPointUserDelta=e.ExtensionMessageCollector=void 0;const C=E.Registry.as(k.Extensions.JSONContribution);class r{constructor(n,a,o){this._messageHandler=n,this._extension=a,this._extensionPointId=o}_msg(n,a){this._messageHandler({type:n,message:a,extensionId:this._extension.identifier,extensionPointId:this._extensionPointId})}error(n){this._msg(R.default.Error,n)}warn(n){this._msg(R.default.Warning,n)}info(n){this._msg(R.default.Info,n)}}e.ExtensionMessageCollector=r;class u{static _toSet(n){const a=new Set;for(let o=0,g=n.length;o<g;o++)a.add(I.ExtensionIdentifier.toKey(n[o].description.identifier));return a}static compute(n,a){if(!n||!n.length)return new u(a,[]);if(!a||!a.length)return new u([],n);const o=this._toSet(n),g=this._toSet(a),h=a.filter(m=>!o.has(I.ExtensionIdentifier.toKey(m.description.identifier))),v=n.filter(m=>!g.has(I.ExtensionIdentifier.toKey(m.description.identifier)));return new u(h,v)}constructor(n,a){this.added=n,this.removed=a}}e.ExtensionPointUserDelta=u;class i{constructor(n,a){this.name=n,this.defaultExtensionKind=a,this._handler=null,this._users=null,this._delta=null}setHandler(n){if(this._handler!==null)throw new Error("Handler already set!");this._handler=n,this._handle()}acceptUsers(n){this._delta=u.compute(this._users,n),this._users=n,this._handle()}_handle(){if(!(this._handler===null||this._users===null||this._delta===null))try{this._handler(this._users,this._delta)}catch(n){(0,p.onUnexpectedError)(n)}}}e.ExtensionPoint=i;const f={type:"string",enum:["ui","workspace"],enumDescriptions:[t.localize(0,null),t.localize(1,null)]},c="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(b.allApiProposals),markdownEnumDescriptions:Object.values(b.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:"onEditSession",description:t.localize(28,null),body:"onEditSession:${1:scheme}"},{label:"onSearch",description:t.localize(29,null),body:"onSearch:${7:scheme}"},{label:"onView",body:"onView:${5:viewId}",description:t.localize(30,null)},{label:"onIdentity",body:"onIdentity:${8:identity}",description:t.localize(31,null)},{label:"onUri",body:"onUri",description:t.localize(32,null)},{label:"onOpenExternalUri",body:"onOpenExternalUri",description:t.localize(33,null)},{label:"onCustomEditor",body:"onCustomEditor:${9:viewType}",description:t.localize(34,null)},{label:"onNotebook",body:"onNotebook:${1:type}",description:t.localize(35,null)},{label:"onAuthenticationRequest",body:"onAuthenticationRequest:${11:authenticationProviderId}",description:t.localize(36,null)},{label:"onRenderer",description:t.localize(37,null),body:"onRenderer:${11:rendererId}"},{label:"onTerminalProfile",body:"onTerminalProfile:${1:terminalId}",description:t.localize(38,null)},{label:"onWalkthrough",body:"onWalkthrough:${1:walkthroughID}",description:t.localize(39,null)},{label:"*",description:t.localize(40,null),body:"*"}]}},badges:{type:"array",description:t.localize(41,null),items:{type:"object",required:["url","href","description"],properties:{url:{type:"string",description:t.localize(42,null)},href:{type:"string",description:t.localize(43,null)},description:{type:"string",description:t.localize(44,null)}}}},markdown:{type:"string",description:t.localize(45,null),enum:["github","standard"],default:"github"},qna:{default:"marketplace",description:t.localize(46,null),anyOf:[{type:["string","boolean"],enum:["marketplace",!1]},{type:"string"}]},extensionDependencies:{description:t.localize(47,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:A.EXTENSION_IDENTIFIER_PATTERN}},extensionPack:{description:t.localize(48,null),type:"array",uniqueItems:!0,items:{type:"string",pattern:A.EXTENSION_IDENTIFIER_PATTERN}},extensionKind:{description:t.localize(49,null),type:"array",items:f,default:["workspace"],defaultSnippets:[{body:["ui"],description:t.localize(50,null)},{body:["workspace"],description:t.localize(51,null)},{body:["ui","workspace"],description:t.localize(52,null)},{body:["workspace","ui"],description:t.localize(53,null)},{body:[],description:t.localize(54,null)}]},capabilities:{description:t.localize(55,null),type:"object",properties:{virtualWorkspaces:{description:t.localize(56,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(57,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[t.localize(58,null),t.localize(59,null),t.localize(60,null)]},description:{type:"string",markdownDescription:t.localize(61,null)}}},untrustedWorkspaces:{description:t.localize(62,null),type:"object",required:["supported"],defaultSnippets:[{body:{supported:"${1:limited}",description:"${2}"}}],properties:{supported:{markdownDescription:t.localize(63,null),type:["string","boolean"],enum:["limited",!0,!1],enumDescriptions:[t.localize(64,null),t.localize(65,null),t.localize(66,null)]},restrictedConfigurations:{description:t.localize(67,null),type:"array",items:{type:"string"}},description:{type:"string",markdownDescription:t.localize(68,null)}}}}},sponsor:{description:t.localize(69,null),type:"object",defaultSnippets:[{body:{url:"${1:https:}"}}],properties:{url:{description:t.localize(70,null),type:"string"}}},scripts:{type:"object",properties:{"vscode:prepublish":{description:t.localize(71,null),type:"string"},"vscode:uninstall":{description:t.localize(72,null),type:"string"}}},icon:{type:"string",description:t.localize(73,null)},l10n:{type:"string",description:t.localize(74,null)}}};class l{constructor(){this._extensionPoints=new Map}registerExtensionPoint(n){if(this._extensionPoints.has(n.extensionPoint))throw new Error("Duplicate extension point: "+n.extensionPoint);const a=new i(n.extensionPoint,n.defaultExtensionKind);return this._extensionPoints.set(n.extensionPoint,a),e.schema.properties.contributes.properties[n.extensionPoint]=n.jsonSchema,C.registerSchema(c,e.schema),a}getExtensionPoints(){return Array.from(this._extensionPoints.values())}}e.ExtensionsRegistryImpl=l;const s={ExtensionsRegistry:"ExtensionsRegistry"};E.Registry.add(s.ExtensionsRegistry,new l),e.ExtensionsRegistry=E.Registry.as(s.ExtensionsRegistry),C.registerSchema(c,e.schema),C.registerSchema(S.productSchemaId,{properties:{extensionEnabledApiProposals:{description:t.localize(75,null),type:"object",properties:{},additionalProperties:{anyOf:[{type:"array",uniqueItems:!0,items:{type:"string",enum:Object.keys(b.allApiProposals),markdownEnumDescriptions:Object.values(b.allApiProposals)}}]}}}})}),define(ae[2510],le([1,0,1461,52,17,131,55,155,176,13,115]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C=R.Registry.as(E.Extensions.JSONContribution),r=R.Registry.as(k.Extensions.Configuration),u={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)},enumItemLabels:{type:"array",items:{type:"string"},markdownDescription:t.localize(14,null,"`enum`")},markdownDescription:{type:"string",description:t.localize(15,null)},deprecationMessage:{type:"string",description:t.localize(16,null)},markdownDeprecationMessage:{type:"string",description:t.localize(17,null)},editPresentation:{type:"string",enum:["singlelineText","multilineText"],enumDescriptions:[t.localize(18,null),t.localize(19,null)],default:"singlelineText",description:t.localize(20,null)},order:{type:"integer",description:t.localize(21,null)}}}]}}}},i=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"configurationDefaults",jsonSchema:{$ref:k.configurationDefaultsSchemaId}});i.setHandler((l,{added:s,removed:d})=>{if(d.length){const n=d.map(a=>({overrides:p.deepClone(a.value),source:{id:a.description.identifier.value,displayName:a.description.displayName}}));r.deregisterDefaultConfigurations(n)}if(s.length){const n=r.getConfigurationProperties(),a=[6,3,4,5],o=s.map(g=>{const h=p.deepClone(g.value);for(const v of Object.keys(h))if(!k.OVERRIDE_PROPERTY_REGEX.test(v)){const m=n[v];m?.scope&&!a.includes(m.scope)&&(g.collector.warn(t.localize(22,null,v)),delete h[v])}return{overrides:h,source:{id:g.description.identifier.value,displayName:g.description.displayName}}});r.registerDefaultConfigurations(o)}});const f=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"configuration",deps:[i],jsonSchema:{description:t.localize(23,null),oneOf:[u,{type:"array",items:u}]}}),c=new Map;f.setHandler((l,{added:s,removed:d})=>{if(d.length){const g=[];for(const h of d){const v=S.ExtensionIdentifier.toKey(h.description.identifier);g.push(...c.get(v)||[]),c.delete(v)}r.deregisterConfigurations(g)}const n=new Set;function a(g,h){const v=[],m=p.deepClone(g);return m.title&&typeof m.title!="string"&&h.collector.error(t.localize(24,null)),o(m,h),m.id=g.id||h.description.identifier.value,m.extensionInfo={id:h.description.identifier.value,displayName:h.description.displayName},m.restrictedProperties=h.description.capabilities?.untrustedWorkspaces?.supported==="limited"?h.description.capabilities?.untrustedWorkspaces.restrictedConfigurations:void 0,m.title=m.title||h.description.displayName||h.description.identifier.value,v.push(m),v}function o(g,h){const v=g.properties;if(v){typeof v!="object"&&(h.collector.error(t.localize(25,null)),g.properties={});for(const w in v){const D=v[w],y=(0,k.validateProperty)(w,D);if(y){delete v[w],h.collector.warn(y);continue}if(n.has(w)){delete v[w],h.collector.warn(t.localize(26,null,w));continue}if(!(0,b.isObject)(D)){delete v[w],h.collector.error(t.localize(27,null,w));continue}n.add(w),D.scope?D.scope.toString()==="application"?D.scope=1:D.scope.toString()==="machine"?D.scope=2:D.scope.toString()==="resource"?D.scope=4:D.scope.toString()==="machine-overridable"?D.scope=6:D.scope.toString()==="language-overridable"?D.scope=5:D.scope=3:D.scope=3}}const m=g.allOf;if(m){h.collector.error(t.localize(28,null));for(const w of m)o(w,h)}}if(s.length){const g=[];for(const h of s){const v=[],m=h.value;Array.isArray(m)?m.forEach(w=>v.push(...a(w,h))):v.push(...a(m,h)),c.set(S.ExtensionIdentifier.toKey(h.description.identifier),v),g.push(...v)}r.registerConfigurations(g,!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(29,null),items:{type:"object",defaultSnippets:[{body:{path:"$1"}}],oneOf:[{properties:{path:{type:"string",description:t.localize(30,null)},name:{type:"string",description:t.localize(31,null)}},required:["path"]},{properties:{uri:{type:"string",description:t.localize(32,null)},name:{type:"string",description:t.localize(33,null)}},required:["uri"]}]}},settings:{type:"object",default:{},description:t.localize(34,null),$ref:I.workspaceSettingsSchemaId},launch:{type:"object",default:{configurations:[],compounds:[]},description:t.localize(35,null),$ref:I.launchSchemaId},tasks:{type:"object",default:{version:"2.0.0",tasks:[]},description:t.localize(36,null),$ref:I.tasksSchemaId},extensions:{type:"object",default:{},description:t.localize(37,null),$ref:"vscode://schemas/extensions"},remoteAuthority:{type:"string",doNotSuggest:!0,description:t.localize(38,null)},transient:{type:"boolean",doNotSuggest:!0,description:t.localize(39,null)}},errorMessage:t.localize(40,null)})}),define(ae[2511],le([1,0,1462,131,18,13]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONValidationExtensionPoint=void 0;const k=p.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 E{constructor(){k.setHandler(b=>{for(const S of b){const C=S.value,r=S.collector,u=S.description.extensionLocation;if(!C||!Array.isArray(C)){r.error(t.localize(3,null));return}C.forEach(i=>{if(!(0,A.isString)(i.fileMatch)&&!(Array.isArray(i.fileMatch)&&i.fileMatch.every(A.isString))){r.error(t.localize(4,null));return}const f=i.url;if(!(0,A.isString)(f)){r.error(t.localize(5,null));return}if(f.startsWith("./"))try{const c=R.joinPath(u,f);R.isEqualOrParent(c,u)||r.warn(t.localize(6,null,k.name,c.toString(),u.path))}catch(c){r.error(t.localize(7,null,c.message))}else if(!/^[^:/?#]+:\/\//.test(f)){r.error(t.localize(8,null));return}})}})}}e.JSONValidationExtensionPoint=E}),define(ae[925],le([1,0,131,1630,176,908]),function(J,e,t,p,R,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:p.localize(0,null),type:"array",defaultSnippets:[{body:[{type:""}]}],items:{additionalProperties:!1,type:"object",defaultSnippets:[{body:{type:"",program:"",runtime:""}}],properties:{type:{description:p.localize(1,null),type:"string"},label:{description:p.localize(2,null),type:"string"},program:{description:p.localize(3,null),type:"string"},args:{description:p.localize(4,null),type:"array"},runtime:{description:p.localize(5,null),type:"string"},runtimeArgs:{description:p.localize(6,null),type:"array"},variables:{description:p.localize(7,null),type:"object"},initialConfigurations:{description:p.localize(8,null),type:["array","string"]},languages:{description:p.localize(9,null),type:"array"},configurationSnippets:{description:p.localize(10,null),type:"array"},configurationAttributes:{description:p.localize(11,null),type:"object"},when:{description:p.localize(12,null),type:"string",default:""},deprecated:{description:p.localize(13,null),type:"string",default:""},windows:{description:p.localize(14,null),type:"object",properties:{runtime:{description:p.localize(15,null),type:"string"}}},osx:{description:p.localize(16,null),type:"object",properties:{runtime:{description:p.localize(17,null),type:"string"}}},linux:{description:p.localize(18,null),type:"object",properties:{runtime:{description:p.localize(19,null),type:"string"}}},strings:{description:p.localize(20,null),type:"object",properties:{unverifiedBreakpoints:{description:p.localize(21,null),type:"string"}}}}}}}),e.breakpointsExtPoint=t.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"breakpoints",jsonSchema:{description:p.localize(22,null),type:"array",defaultSnippets:[{body:[{language:""}]}],items:{type:"object",additionalProperties:!1,defaultSnippets:[{body:{language:""}}],properties:{language:{description:p.localize(23,null),type:"string"},when:{description:p.localize(24,null),type:"string",default:""}}}}}),e.presentationSchema={type:"object",description:p.localize(25,null),properties:{hidden:{type:"boolean",default:!1,description:p.localize(26,null)},group:{type:"string",default:"",description:p.localize(27,null)},order:{type:"number",default:1,description:p.localize(28,null)}},default:{hidden:!1,group:"",order:1}};const k={name:"Compound",configurations:[]};e.launchSchema={id:R.launchSchemaId,type:"object",title:p.localize(29,null),allowTrailingCommas:!0,allowComments:!0,required:[],default:{version:"0.2.0",configurations:[],compounds:[]},properties:{version:{type:"string",description:p.localize(30,null),default:"0.2.0"},configurations:{type:"array",description:p.localize(31,null),items:{defaultSnippets:[],type:"object",oneOf:[]}},compounds:{type:"array",description:p.localize(32,null),items:{type:"object",required:["name","configurations"],properties:{name:{type:"string",description:p.localize(33,null)},presentation:e.presentationSchema,configurations:{type:"array",default:[],items:{oneOf:[{enum:[],description:p.localize(34,null)},{type:"object",required:["name"],properties:{name:{enum:[],description:p.localize(35,null)},folder:{enum:[],description:p.localize(36,null)}}}]},description:p.localize(37,null)},stopAll:{type:"boolean",default:!1,description:p.localize(38,null)},preLaunchTask:{type:"string",default:"",description:p.localize(39,null)}},default:k},default:[k]},inputs:A.inputsSchema.definitions.inputs}}}),define(ae[2512],le([1,0,1775,131,64]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookPreloadExtensionPoint=e.notebookRendererExtensionPoint=e.notebooksExtensionPoint=void 0;const A=Object.freeze({type:"type",displayName:"displayName",selector:"selector",priority:"priority"}),k=Object.freeze({id:"id",displayName:"displayName",mimeTypes:"mimeTypes",entrypoint:"entrypoint",hardDependencies:"dependencies",optionalDependencies:"optionalDependencies",requiresMessaging:"requiresMessaging"}),E=Object.freeze({type:"type",entrypoint:"entrypoint"}),I={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:[R.NotebookEditorPriority.default,R.NotebookEditorPriority.option],markdownEnumDescriptions:[t.localize(7,null),t.localize(8,null)],default:"default"}}}},b=Object.freeze({id:"",displayName:"",mimeTypes:[""],entrypoint:""}),S={description:t.localize(9,null),type:"array",defaultSnippets:[{body:[b]}],items:{defaultSnippets:[{body:b}],allOf:[{type:"object",required:[k.id,k.displayName],properties:{[k.id]:{type:"string",description:t.localize(10,null)},[k.displayName]:{type:"string",description:t.localize(11,null)},[k.hardDependencies]:{type:"array",uniqueItems:!0,items:{type:"string"},markdownDescription:t.localize(12,null)},[k.optionalDependencies]:{type:"array",uniqueItems:!0,items:{type:"string"},markdownDescription:t.localize(13,null)},[k.requiresMessaging]:{default:"never",enum:["always","optional","never"],enumDescriptions:[t.localize(14,null),t.localize(15,null),t.localize(16,null)],description:t.localize(17,null)}}},{oneOf:[{required:[k.entrypoint,k.mimeTypes],properties:{[k.mimeTypes]:{type:"array",description:t.localize(18,null),items:{type:"string"}},[k.entrypoint]:{description:t.localize(19,null),type:"string"}}},{required:[k.entrypoint],properties:{[k.entrypoint]:{description:t.localize(20,null),type:"object",required:["extends","path"],properties:{extends:{type:"string",description:t.localize(21,null)},path:{type:"string",description:t.localize(22,null)}}}}}]}]}},C={description:t.localize(23,null),type:"array",defaultSnippets:[{body:[{type:"",entrypoint:""}]}],items:{type:"object",required:[E.type,E.entrypoint],properties:{[E.type]:{type:"string",description:t.localize(24,null)},[E.entrypoint]:{type:"string",description:t.localize(25,null)}}}};e.notebooksExtensionPoint=p.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebooks",jsonSchema:I}),e.notebookRendererExtensionPoint=p.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebookRenderer",jsonSchema:S}),e.notebookPreloadExtensionPoint=p.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"notebookPreload",jsonSchema:C})}),define(ae[318],le([1,0,1877,52,28,171,53,13,72,14,68,9,709,124,131,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"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 c;(function(N){N[N.Default=0]="Default",N[N.Relative=1]="Relative",N[N.Absolute=2]="Absolute",N[N.AutoDetect=3]="AutoDetect"})(c=e.FileLocationKind||(e.FileLocationKind={})),function(N){function P(B){return B=B.toLowerCase(),B==="absolute"?N.Absolute:B==="relative"?N.Relative:B==="autodetect"?N.AutoDetect:void 0}N.fromString=P}(c=e.FileLocationKind||(e.FileLocationKind={}));var l;(function(N){N[N.File=0]="File",N[N.Location=1]="Location"})(l=e.ProblemLocationKind||(e.ProblemLocationKind={})),function(N){function P(B){return B=B.toLowerCase(),B==="file"?N.File:B==="location"?N.Location:void 0}N.fromString=P}(l=e.ProblemLocationKind||(e.ProblemLocationKind={}));var s;(function(N){N[N.allDocuments=0]="allDocuments",N[N.openDocuments=1]="openDocuments",N[N.closedDocuments=2]="closedDocuments"})(s=e.ApplyToKind||(e.ApplyToKind={})),function(N){function P(B){return B=B.toLowerCase(),B==="alldocuments"?N.allDocuments:B==="opendocuments"?N.openDocuments:B==="closeddocuments"?N.closedDocuments:void 0}N.fromString=P}(s=e.ApplyToKind||(e.ApplyToKind={}));function d(N){return!!(N&&E.isString(N.name))}e.isNamedProblemMatcher=d;async function n(N,P,B){const V=P.fileLocation;let z;if(V===c.Absolute)z=N;else if(V===c.Relative&&P.filePrefix)z=(0,k.join)(P.filePrefix,N);else if(V===c.AutoDetect){const x=p.deepClone(P);if(x.fileLocation=c.Relative,B){const H=await n(N,x);let W;try{W=await B.stat(H)}catch{}if(W)return H}return x.fileLocation=c.Absolute,n(N,x)}if(z===void 0)throw new Error("FileLocationKind is not actionable. Does the matcher have a filePrefix? This should never happen.");return z=(0,k.normalize)(z),z=z.replace(/\\/g,"/"),z[0]!=="/"&&(z="/"+z),P.uriProvider!==void 0?P.uriProvider(z):C.URI.file(z)}e.getResource=n;function a(N,P){const B=N.pattern;return Array.isArray(B)?new v(N,P):new h(N,P)}e.createLineMatcher=a;const o=b.OS===1?`\r `:` `;class g{constructor(P,B){this.matcher=P,this.fileService=B}handle(P,B=0){return{match:null,continue:!1}}next(P){return null}fillProblemData(P,B,V){return P?(this.fillProperty(P,"file",B,V,!0),this.appendProperty(P,"message",B,V,!0),this.fillProperty(P,"code",B,V,!0),this.fillProperty(P,"severity",B,V,!0),this.fillProperty(P,"location",B,V,!0),this.fillProperty(P,"line",B,V),this.fillProperty(P,"character",B,V),this.fillProperty(P,"endLine",B,V),this.fillProperty(P,"endCharacter",B,V),!0):!1}appendProperty(P,B,V,z,x=!1){const H=V[B];if(E.isUndefined(P[B]))this.fillProperty(P,B,V,z,x);else if(!E.isUndefined(H)&&H<z.length){let W=z[H];x&&(W=R.trim(W)),P[B]+=o+W}}fillProperty(P,B,V,z,x=!1){const H=V[B];if(E.isUndefined(P[B])&&!E.isUndefined(H)&&H<z.length){let W=z[H];W!==void 0&&(x&&(W=R.trim(W)),P[B]=W)}}getMarkerMatch(P){try{const B=this.getLocation(P);if(P.file&&B&&P.message){const V={severity:this.getSeverity(P),startLineNumber:B.startLineNumber,startColumn:B.startCharacter,endLineNumber:B.endLineNumber,endColumn:B.endCharacter,message:P.message};return P.code!==void 0&&(V.code=P.code),this.matcher.source!==void 0&&(V.source=this.matcher.source),{description:this.matcher,resource:this.getResource(P.file),marker:V}}}catch{console.error(`Failed to convert problem data into match: ${JSON.stringify(P)}`)}}getResource(P){return n(P,this.matcher,this.fileService)}getLocation(P){if(P.kind===l.File)return this.createLocation(0,0,0,0);if(P.location)return this.parseLocationInfo(P.location);if(!P.line)return null;const B=parseInt(P.line),V=P.character?parseInt(P.character):void 0,z=P.endLine?parseInt(P.endLine):void 0,x=P.endCharacter?parseInt(P.endCharacter):void 0;return this.createLocation(B,V,z,x)}parseLocationInfo(P){if(!P||!P.match(/(\d+|\d+,\d+|\d+,\d+,\d+,\d+)/))return null;const B=P.split(","),V=parseInt(B[0]),z=B.length>1?parseInt(B[1]):void 0;return B.length>3?this.createLocation(V,z,parseInt(B[2]),parseInt(B[3])):this.createLocation(V,z,void 0,void 0)}createLocation(P,B,V,z){return B!==void 0&&z!==void 0?{startLineNumber:P,startCharacter:B,endLineNumber:V||P,endCharacter:z}:B!==void 0?{startLineNumber:P,startCharacter:B,endLineNumber:P,endCharacter:B}:{startLineNumber:P,startCharacter:1,endLineNumber:P,endCharacter:2**31-1}}getSeverity(P){let B=null;if(P.severity){const V=P.severity;V&&(B=S.default.fromValue(V),B===S.default.Ignore&&(V==="E"?B=S.default.Error:V==="W"?B=S.default.Warning:(V==="I"||R.equalsIgnoreCase(V,"hint")||R.equalsIgnoreCase(V,"note"))&&(B=S.default.Info)))}return(B===null||B===S.default.Ignore)&&(B=this.matcher.severity||S.default.Error),u.MarkerSeverity.fromSeverity(B)}}class h extends g{constructor(P,B){super(P,B),this.pattern=P.pattern}get matchLength(){return 1}handle(P,B=0){A.ok(P.length-B===1);const V=Object.create(null);this.pattern.kind!==void 0&&(V.kind=this.pattern.kind);const z=this.pattern.regexp.exec(P[B]);if(z){this.fillProblemData(V,this.pattern,z);const x=this.getMarkerMatch(V);if(x)return{match:x,continue:!1}}return{match:null,continue:!1}}next(P){return null}}class v extends g{constructor(P,B){super(P,B),this.patterns=P.pattern}get matchLength(){return this.patterns.length}handle(P,B=0){A.ok(P.length-B===this.patterns.length),this.data=Object.create(null);let V=this.data;V.kind=this.patterns[0].kind;for(let H=0;H<this.patterns.length;H++){const W=this.patterns[H],U=W.regexp.exec(P[H+B]);if(U)W.loop&&H===this.patterns.length-1&&(V=p.deepClone(V)),this.fillProblemData(V,W,U);else return{match:null,continue:!1}}const z=!!this.patterns[this.patterns.length-1].loop;z||(this.data=void 0);const x=V?this.getMarkerMatch(V):null;return{match:x||null,continue:z}}next(P){const B=this.patterns[this.patterns.length-1];A.ok(B.loop===!0&&this.data!==null);const V=B.regexp.exec(P);if(!V)return this.data=void 0,null;const z=p.deepClone(this.data);let x;return this.fillProblemData(z,B,V)&&(x=this.getMarkerMatch(z)),x||null}}var m;(function(N){let P;(function(U){function $(q){const X=q;return X&&E.isString(X.regexp)}U.is=$})(P=N.CheckedProblemPattern||(N.CheckedProblemPattern={}));let B;(function(U){function $(q){const X=q;return X&&E.isString(X.name)}U.is=$})(B=N.NamedProblemPattern||(N.NamedProblemPattern={}));let V;(function(U){function $(q){const X=q;return X&&B.is(X)&&E.isString(X.regexp)}U.is=$})(V=N.NamedCheckedProblemPattern||(N.NamedCheckedProblemPattern={}));let z;(function(U){function $(q){return q&&Array.isArray(q)}U.is=$})(z=N.MultiLineProblemPattern||(N.MultiLineProblemPattern={}));let x;(function(U){function $(q){if(!z.is(q))return!1;for(const X of q)if(!N.CheckedProblemPattern.is(X))return!1;return!0}U.is=$})(x=N.MultiLineCheckedProblemPattern||(N.MultiLineCheckedProblemPattern={}));let H;(function(U){function $(q){const X=q;return X&&E.isString(X.name)&&Array.isArray(X.patterns)&&x.is(X.patterns)}U.is=$})(H=N.NamedMultiLineCheckedProblemPattern||(N.NamedMultiLineCheckedProblemPattern={}));function W(U){return E.isString(U.name)}N.isNamedProblemMatcher=W})(m=e.Config||(e.Config={}));class w extends r.Parser{constructor(P){super(P)}parse(P){if(m.NamedMultiLineCheckedProblemPattern.is(P))return this.createNamedMultiLineProblemPattern(P);if(m.MultiLineCheckedProblemPattern.is(P))return this.createMultiLineProblemPattern(P);if(m.NamedCheckedProblemPattern.is(P)){const B=this.createSingleProblemPattern(P);return B.name=P.name,B}else return m.CheckedProblemPattern.is(P)?this.createSingleProblemPattern(P):(this.error((0,t.localize)(0,null)),null)}createSingleProblemPattern(P){const B=this.doCreateSingleProblemPattern(P,!0);return B===void 0?null:(B.kind===void 0&&(B.kind=l.Location),this.validateProblemPattern([B])?B:null)}createNamedMultiLineProblemPattern(P){const B=this.createMultiLineProblemPattern(P.patterns);return B?{name:P.name,label:P.label?P.label:P.name,patterns:B}:null}createMultiLineProblemPattern(P){const B=[];for(let V=0;V<P.length;V++){const z=this.doCreateSingleProblemPattern(P[V],!1);if(z===void 0)return null;V<P.length-1&&!E.isUndefined(z.loop)&&z.loop&&(z.loop=!1,this.error((0,t.localize)(1,null))),B.push(z)}return B[0].kind===void 0&&(B[0].kind=l.Location),this.validateProblemPattern(B)?B:null}doCreateSingleProblemPattern(P,B){const V=this.createRegularExpression(P.regexp);if(V===void 0)return;let z={regexp:V};P.kind&&(z.kind=l.fromString(P.kind));function x(H,W,U,$){const q=W[$];typeof q=="number"&&(H[U]=q)}if(x(z,P,"file","file"),x(z,P,"location","location"),x(z,P,"line","line"),x(z,P,"character","column"),x(z,P,"endLine","endLine"),x(z,P,"endCharacter","endColumn"),x(z,P,"severity","severity"),x(z,P,"code","code"),x(z,P,"message","message"),(P.loop===!0||P.loop===!1)&&(z.loop=P.loop),B)if(z.location||z.kind===l.File){const H={file:1,message:0};z=p.mixin(z,H,!1)}else{const H={file:1,line:2,character:3,message:0};z=p.mixin(z,H,!1)}return z}validateProblemPattern(P){let B=!1,V=!1,z=!1,x=!1;const H=P[0].kind===void 0?l.Location:P[0].kind;return P.forEach((W,U)=>{U!==0&&W.kind&&this.error((0,t.localize)(2,null)),B=B||!E.isUndefined(W.file),V=V||!E.isUndefined(W.message),z=z||!E.isUndefined(W.location),x=x||!E.isUndefined(W.line)}),B&&V?H===l.Location&&!(z||x)?(this.error((0,t.localize)(4,null)),!1):!0:(this.error((0,t.localize)(3,null)),!1)}createRegularExpression(P){let B;try{B=new RegExp(P)}catch{this.error((0,t.localize)(5,null,P))}return B}}e.ProblemPatternParser=w;class D{constructor(P,B=new r.ValidationStatus){this._collector=P,this._validationStatus=B}info(P){this._validationStatus.state=1,this._collector.info(P)}warn(P){this._validationStatus.state=2,this._collector.warn(P)}error(P){this._validationStatus.state=3,this._collector.error(P)}fatal(P){this._validationStatus.state=4,this._collector.error(P)}get status(){return this._validationStatus}}e.ExtensionRegistryReporter=D;var y;(function(N){N.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)}}},N.NamedProblemPattern=p.deepClone(N.ProblemPattern),N.NamedProblemPattern.properties=p.deepClone(N.NamedProblemPattern.properties)||{},N.NamedProblemPattern.properties.name={type:"string",description:(0,t.localize)(18,null)},N.MultiLineProblemPattern={type:"array",items:N.ProblemPattern},N.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:N.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 _{constructor(){this.patterns=Object.create(null),this.fillDefaults(),this.readyPromise=new Promise((P,B)=>{T.setHandler((V,z)=>{try{z.removed.forEach(x=>{const H=x.value;for(const W of H)this.patterns[W.name]&&delete this.patterns[W.name]}),z.added.forEach(x=>{const H=x.value,W=new w(new D(x.collector));for(const U of H){if(m.NamedMultiLineCheckedProblemPattern.is(U)){const $=W.parse(U);W.problemReporter.status.state<3?this.add($.name,$.patterns):(x.collector.error((0,t.localize)(22,null)),x.collector.error(JSON.stringify(U,void 0,4)))}else if(m.NamedProblemPattern.is(U)){const $=W.parse(U);W.problemReporter.status.state<3?this.add(U.name,$):(x.collector.error((0,t.localize)(23,null)),x.collector.error(JSON.stringify(U,void 0,4)))}W.reset()}})}catch{}P(void 0)})})}onReady(){return this.readyPromise}add(P,B){this.patterns[P]=B}get(P){return this.patterns[P]}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 _;class L extends r.Parser{constructor(P){super(P)}parse(P){const B=this.createProblemMatcher(P);if(!!this.checkProblemMatcherValid(P,B))return this.addWatchingMatcher(P,B),B}checkProblemMatcherValid(P,B){return B?B.pattern?B.owner?E.isUndefined(B.fileLocation)?(this.error((0,t.localize)(27,null,JSON.stringify(P,null,4))),!1):!0:(this.error((0,t.localize)(26,null,JSON.stringify(P,null,4))),!1):(this.error((0,t.localize)(25,null,JSON.stringify(P,null,4))),!1):(this.error((0,t.localize)(24,null,JSON.stringify(P,null,4))),!1)}createProblemMatcher(P){let B=null;const V=E.isString(P.owner)?P.owner:I.generateUuid(),z=E.isString(P.source)?P.source:void 0;let x=E.isString(P.applyTo)?s.fromString(P.applyTo):s.allDocuments;x||(x=s.allDocuments);let H,W,U;if(E.isUndefined(P.fileLocation))H=c.Relative,W="${workspaceFolder}";else if(E.isString(P.fileLocation))U=c.fromString(P.fileLocation),U&&(H=U,(U===c.Relative||U===c.AutoDetect)&&(W="${workspaceFolder}"));else if(E.isStringArray(P.fileLocation)){const X=P.fileLocation;X.length>0&&(U=c.fromString(X[0]),X.length===1&&U===c.Absolute?H=U:X.length===2&&(U===c.Relative||U===c.AutoDetect)&&X[1]&&(H=U,W=X[1]))}const $=P.pattern?this.createProblemPattern(P.pattern):void 0;let q=P.severity?S.default.fromValue(P.severity):void 0;if(q===S.default.Ignore&&(this.info((0,t.localize)(28,null,P.severity)),q=S.default.Error),E.isString(P.base)){const X=P.base;if(X.length>1&&X[0]==="$"){const G=e.ProblemMatcherRegistry.get(X.substring(1));G&&(B=p.deepClone(G),P.owner!==void 0&&V!==void 0&&(B.owner=V),P.source!==void 0&&z!==void 0&&(B.source=z),P.fileLocation!==void 0&&H!==void 0&&(B.fileLocation=H,B.filePrefix=W),P.pattern!==void 0&&$!==void 0&&$!==null&&(B.pattern=$),P.severity!==void 0&&q!==void 0&&(B.severity=q),P.applyTo!==void 0&&x!==void 0&&(B.applyTo=x))}}else H&&$&&(B={owner:V,applyTo:x,fileLocation:H,pattern:$},z&&(B.source=z),W&&(B.filePrefix=W),q&&(B.severity=q));return m.isNamedProblemMatcher(P)&&(B.name=P.name,B.label=E.isString(P.label)?P.label:P.name),B}createProblemPattern(P){if(E.isString(P)){const B=P;if(B.length>1&&B[0]==="$"){const V=e.ProblemPatternRegistry.get(B.substring(1));return V||this.error((0,t.localize)(29,null,B)),V}else B.length===0?this.error((0,t.localize)(30,null)):this.error((0,t.localize)(31,null,B))}else if(P){const B=new w(this.problemReporter);return Array.isArray(P),B.parse(P)}return null}addWatchingMatcher(P,B){const V=this.createRegularExpression(P.watchedTaskBeginsRegExp),z=this.createRegularExpression(P.watchedTaskEndsRegExp);if(V&&z){B.watching={activeOnStart:!1,beginsPattern:{regexp:V},endsPattern:{regexp:z}};return}const x=P.background||P.watching;if(E.isUndefinedOrNull(x))return;const H=this.createWatchingPattern(x.beginsPattern),W=this.createWatchingPattern(x.endsPattern);if(H&&W){B.watching={activeOnStart:E.isBoolean(x.activeOnStart)?x.activeOnStart:!1,beginsPattern:H,endsPattern:W};return}(H||W)&&this.error((0,t.localize)(32,null))}createWatchingPattern(P){if(E.isUndefinedOrNull(P))return null;let B,V;return E.isString(P)?B=this.createRegularExpression(P):(B=this.createRegularExpression(P.regexp),E.isNumber(P.file)&&(V=P.file)),B?V?{regexp:B,file:V}:{regexp:B,file:1}:null}createRegularExpression(P){let B=null;if(!P)return B;try{B=new RegExp(P)}catch{this.error((0,t.localize)(33,null,P))}return B}}e.ProblemMatcherParser=L,function(N){N.WatchingPattern={type:"object",additionalProperties:!1,properties:{regexp:{type:"string",description:(0,t.localize)(34,null)},file:{type:"integer",description:(0,t.localize)(35,null)}}},N.PatternType={anyOf:[{type:"string",description:(0,t.localize)(36,null)},N.ProblemPattern,N.MultiLineProblemPattern],description:(0,t.localize)(37,null)},N.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:N.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"},N.WatchingPattern],description:(0,t.localize)(46,null)},endsPattern:{oneOf:[{type:"string"},N.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"},N.WatchingPattern],description:(0,t.localize)(51,null)},endsPattern:{oneOf:[{type:"string"},N.WatchingPattern],description:(0,t.localize)(52,null)}}}}},N.LegacyProblemMatcher=p.deepClone(N.ProblemMatcher),N.LegacyProblemMatcher.properties=p.deepClone(N.LegacyProblemMatcher.properties)||{},N.LegacyProblemMatcher.properties.watchedTaskBeginsRegExp={type:"string",deprecationMessage:(0,t.localize)(53,null),description:(0,t.localize)(54,null)},N.LegacyProblemMatcher.properties.watchedTaskEndsRegExp={type:"string",deprecationMessage:(0,t.localize)(55,null),description:(0,t.localize)(56,null)},N.NamedProblemMatcher=p.deepClone(N.ProblemMatcher),N.NamedProblemMatcher.properties=p.deepClone(N.NamedProblemMatcher.properties)||{},N.NamedProblemMatcher.properties.name={type:"string",description:(0,t.localize)(57,null)},N.NamedProblemMatcher.properties.label={type:"string",description:(0,t.localize)(58,null)}}(y=e.Schemas||(e.Schemas={}));const M=i.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"problemMatchers",deps:[T],jsonSchema:{description:(0,t.localize)(59,null),type:"array",items:y.NamedProblemMatcher}});class O{constructor(){this._onMatchersChanged=new f.Emitter,this.onMatcherChanged=this._onMatchersChanged.event,this.matchers=Object.create(null),this.fillDefaults(),this.readyPromise=new Promise((P,B)=>{M.setHandler((V,z)=>{try{z.removed.forEach(H=>{const W=H.value;for(const U of W)this.matchers[U.name]&&delete this.matchers[U.name]}),z.added.forEach(H=>{const W=H.value,U=new L(new D(H.collector));for(const $ of W){const q=U.parse($);q&&d(q)&&this.add(q)}}),(z.removed.length>0||z.added.length>0)&&this._onMatchersChanged.fire()}catch{}const x=this.get("tsc-watch");x&&(x.tscWatch=!0),P(void 0)})})}onReady(){return e.ProblemPatternRegistry.onReady(),this.readyPromise}add(P){this.matchers[P.name]=P}get(P){return this.matchers[P]}keys(){return Object.keys(this.matchers)}fillDefaults(){this.add({name:"msCompile",label:(0,t.localize)(60,null),owner:"msCompile",applyTo:s.allDocuments,fileLocation:c.Absolute,pattern:e.ProblemPatternRegistry.get("msCompile")}),this.add({name:"lessCompile",label:(0,t.localize)(61,null),deprecated:!0,owner:"lessCompile",source:"less",applyTo:s.allDocuments,fileLocation:c.Absolute,pattern:e.ProblemPatternRegistry.get("lessCompile"),severity:S.default.Error}),this.add({name:"gulp-tsc",label:(0,t.localize)(62,null),owner:"typescript",source:"ts",applyTo:s.closedDocuments,fileLocation:c.Relative,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("gulp-tsc")}),this.add({name:"jshint",label:(0,t.localize)(63,null),owner:"jshint",source:"jshint",applyTo:s.allDocuments,fileLocation:c.Absolute,pattern:e.ProblemPatternRegistry.get("jshint")}),this.add({name:"jshint-stylish",label:(0,t.localize)(64,null),owner:"jshint",source:"jshint",applyTo:s.allDocuments,fileLocation:c.Absolute,pattern:e.ProblemPatternRegistry.get("jshint-stylish")}),this.add({name:"eslint-compact",label:(0,t.localize)(65,null),owner:"eslint",source:"eslint",applyTo:s.allDocuments,fileLocation:c.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:s.allDocuments,fileLocation:c.Absolute,pattern:e.ProblemPatternRegistry.get("eslint-stylish")}),this.add({name:"go",label:(0,t.localize)(67,null),owner:"go",source:"go",applyTo:s.allDocuments,fileLocation:c.Relative,filePrefix:"${workspaceFolder}",pattern:e.ProblemPatternRegistry.get("go")})}}e.ProblemMatcherRegistry=new O}),define(ae[926],le([1,0,1874,318]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const R={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)},p.Schemas.LegacyProblemMatcher,{type:"array",items:{anyOf:[{type:"string",errorMessage:t.localize(4,null)},p.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=R}),define(ae[2513],le([1,0,1875,52,318,926]),function(J,e,t,p,R,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"}]}]},E={type:"boolean",default:!0,description:t.localize(7,null)};k.definitions=p.deepClone(A.default.definitions);const I=k.definitions;I.commandConfiguration.properties.isShellCommand=p.deepClone(E),I.taskDescription.properties.isShellCommand=p.deepClone(E),I.taskRunnerConfiguration.properties.isShellCommand=p.deepClone(E),Object.getOwnPropertyNames(I).forEach(S=>{const C=S+"1";I[C]=I[S],delete I[S]});function b(S){Array.isArray(S)?S.forEach(b):typeof S=="object"&&(S.$ref&&(S.$ref=S.$ref+"1"),Object.getOwnPropertyNames(S).forEach(C=>{const r=S[C];(Array.isArray(r)||typeof r=="object")&&b(r)}))}b(k),R.ProblemMatcherRegistry.onReady().then(()=>{try{const S=R.ProblemMatcherRegistry.keys().map(C=>"$"+C);I.problemMatcherType1.oneOf[0].enum=S,I.problemMatcherType1.oneOf[2].items.anyOf[1].enum=S}catch{console.log("Installing problem matcher ids failed")}}),e.default=k}),define(ae[927],le([1,0,9,6,2,318,124,72,14]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WatchingProblemCollector=e.StartStopProblemCollector=e.ProblemHandlingStrategy=e.AbstractProblemCollector=e.ProblemCollectorEventKind=void 0;var b;(function(f){f.BackgroundProcessingBegins="backgroundProcessingBegins",f.BackgroundProcessingEnds="backgroundProcessingEnds"})(b=e.ProblemCollectorEventKind||(e.ProblemCollectorEventKind={}));var S;(function(f){function c(l){return Object.freeze({kind:l})}f.create=c})(S||(S={}));class C{constructor(c,l,s,d){this.problemMatchers=c,this.markerService=l,this.modelService=s,this.modelListeners=new R.DisposableStore,this._onDidFindFirstMatch=new p.Emitter,this.onDidFindFirstMatch=this._onDidFindFirstMatch.event,this._onDidFindErrors=new p.Emitter,this.onDidFindErrors=this._onDidFindErrors.event,this._onDidRequestInvalidateLastMarker=new p.Emitter,this.onDidRequestInvalidateLastMarker=this._onDidRequestInvalidateLastMarker.event,this.matchers=Object.create(null),this.bufferLength=1,c.map(n=>(0,A.createLineMatcher)(n,d)).forEach(n=>{const a=n.matchLength;a>this.bufferLength&&(this.bufferLength=a);let o=this.matchers[a];o||(o=[],this.matchers[a]=o),o.push(n)}),this.buffer=[],this.activeMatcher=null,this._numberOfMatches=0,this._maxMarkerSeverity=void 0,this.openModels=Object.create(null),this.applyToByOwner=new Map;for(const n of c){const a=this.applyToByOwner.get(n.owner);a===void 0?this.applyToByOwner.set(n.owner,n.applyTo):this.applyToByOwner.set(n.owner,this.mergeApplyTo(a,n.applyTo))}this.resourcesToClean=new Map,this.markers=new Map,this.deliveredMarkers=new Map,this.modelService.onModelAdded(n=>{this.openModels[n.uri.toString()]=!0},this,this.modelListeners),this.modelService.onModelRemoved(n=>{delete this.openModels[n.uri.toString()]},this,this.modelListeners),this.modelService.getModels().forEach(n=>this.openModels[n.uri.toString()]=!0),this._onDidStateChange=new p.Emitter}get onDidStateChange(){return this._onDidStateChange.event}processLine(c){if(this.tail){const l=this.tail;this.tail=l.then(()=>this.processLineInternal(c))}else this.tail=this.processLineInternal(c)}dispose(){this.modelListeners.dispose()}get numberOfMatches(){return this._numberOfMatches}get maxMarkerSeverity(){return this._maxMarkerSeverity}tryFindMarker(c){let l=null;if(this.activeMatcher){if(l=this.activeMatcher.next(c),l)return this.captureMatch(l),l;this.clearBuffer(),this.activeMatcher=null}if(this.buffer.length<this.bufferLength)this.buffer.push(c);else{const s=this.buffer.length-1;for(let d=0;d<s;d++)this.buffer[d]=this.buffer[d+1];this.buffer[s]=c}return l=this.tryMatchers(),l&&this.clearBuffer(),l}async shouldApplyMatch(c){switch(c.description.applyTo){case A.ApplyToKind.allDocuments:return!0;case A.ApplyToKind.openDocuments:return!!this.openModels[(await c.resource).toString()];case A.ApplyToKind.closedDocuments:return!this.openModels[(await c.resource).toString()];default:return!0}}mergeApplyTo(c,l){return c===l||c===A.ApplyToKind.allDocuments?c:A.ApplyToKind.allDocuments}tryMatchers(){this.activeMatcher=null;const c=this.buffer.length;for(let l=0;l<c;l++){const s=this.matchers[c-l];if(!!s)for(const d of s){const n=d.handle(this.buffer,l);if(n.match)return this.captureMatch(n.match),n.continue&&(this.activeMatcher=d),n.match}}return null}captureMatch(c){this._numberOfMatches++,(this._maxMarkerSeverity===void 0||c.marker.severity>this._maxMarkerSeverity)&&(this._maxMarkerSeverity=c.marker.severity)}clearBuffer(){this.buffer.length>0&&(this.buffer=[])}recordResourcesToClean(c){const l=this.getResourceSetToClean(c);this.markerService.read({owner:c}).forEach(s=>l.set(s.resource.toString(),s.resource))}recordResourceToClean(c,l){this.getResourceSetToClean(c).set(l.toString(),l)}removeResourceToClean(c,l){this.resourcesToClean.get(c)?.delete(l)}getResourceSetToClean(c){let l=this.resourcesToClean.get(c);return l||(l=new Map,this.resourcesToClean.set(c,l)),l}cleanAllMarkers(){this.resourcesToClean.forEach((c,l)=>{this._cleanMarkers(l,c)}),this.resourcesToClean=new Map}cleanMarkers(c){const l=this.resourcesToClean.get(c);l&&(this._cleanMarkers(c,l),this.resourcesToClean.delete(c))}_cleanMarkers(c,l){const s=[],d=this.applyToByOwner.get(c);l.forEach((n,a)=>{(d===A.ApplyToKind.allDocuments||d===A.ApplyToKind.openDocuments&&this.openModels[a]||d===A.ApplyToKind.closedDocuments&&!this.openModels[a])&&s.push(n)}),this.markerService.remove(c,s)}recordMarker(c,l,s){let d=this.markers.get(l);d||(d=new Map,this.markers.set(l,d));let n=d.get(s);n||(n=new Map,d.set(s,n));const a=k.IMarkerData.makeKeyOptionalMessage(c,!1);let o;n.has(a)?(o=n.get(a))!==void 0&&o.message.length<c.message.length&&I.isWindows&&n.set(a,c):n.set(a,c)}reportMarkers(){this.markers.forEach((c,l)=>{const s=this.getDeliveredMarkersPerOwner(l);c.forEach((d,n)=>{this.deliverMarkersPerOwnerAndResourceResolved(l,n,d,s)})})}deliverMarkersPerOwnerAndResource(c,l){const s=this.markers.get(c);if(!s)return;const d=this.getDeliveredMarkersPerOwner(c),n=s.get(l);!n||this.deliverMarkersPerOwnerAndResourceResolved(c,l,n,d)}deliverMarkersPerOwnerAndResourceResolved(c,l,s,d){if(s.size!==d.get(l)){const n=[];s.forEach(a=>n.push(a)),this.markerService.changeOne(c,t.URI.parse(l),n),d.set(l,s.size)}}getDeliveredMarkersPerOwner(c){let l=this.deliveredMarkers.get(c);return l||(l=new Map,this.deliveredMarkers.set(c,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 r;(function(f){f[f.Clean=0]="Clean"})(r=e.ProblemHandlingStrategy||(e.ProblemHandlingStrategy={}));class u extends C{constructor(c,l,s,d=0,n){super(c,l,s,n);const a=Object.create(null);c.forEach(o=>a[o.owner]=!0),this.owners=Object.keys(a),this.owners.forEach(o=>{this.recordResourcesToClean(o)})}async processLineInternal(c){const l=this.tryFindMarker(c);if(!l)return;const s=l.description.owner,n=(await l.resource).toString();this.removeResourceToClean(s,n),await this.shouldApplyMatch(l)&&(this.recordMarker(l.marker,s,n),(this.currentOwner!==s||this.currentResource!==n)&&(this.currentOwner&&this.currentResource&&this.deliverMarkersPerOwnerAndResource(this.currentOwner,this.currentResource),this.currentOwner=s,this.currentResource=n))}}e.StartStopProblemCollector=u;class i extends C{constructor(c,l,s,d){super(c,l,s,d),this.lines=[],this.beginPatterns=[],this.resetCurrentResource(),this.backgroundPatterns=[],this._activeBackgroundMatchers=new Set,this.problemMatchers.forEach(n=>{if(n.watching){const a=(0,E.generateUuid)();this.backgroundPatterns.push({key:a,matcher:n,begin:n.watching.beginsPattern,end:n.watching.endsPattern}),this.beginPatterns.push(n.watching.beginsPattern.regexp)}}),this.modelListeners.add(this.modelService.onModelRemoved(n=>{let a=p.Event.debounce(this.markerService.onMarkerChanged,(o,g)=>(o??[]).concat(g),500)(async o=>{if(a?.dispose(),a=void 0,!o.includes(n.uri)||this.markerService.read({resource:n.uri}).length!==0)return;const g=Array.from(this.lines);for(const h of g)await this.processLineInternal(h)});setTimeout(async()=>{a?.dispose(),a=void 0},600)}))}aboutToStart(){for(const c of this.backgroundPatterns)c.matcher.watching&&c.matcher.watching.activeOnStart&&(this._activeBackgroundMatchers.add(c.key),this._onDidStateChange.fire(S.create("backgroundProcessingBegins")),this.recordResourcesToClean(c.matcher.owner))}async processLineInternal(c){if(await this.tryBegin(c)||this.tryFinish(c))return;this.lines.push(c);const l=this.tryFindMarker(c);if(!l)return;const s=await l.resource,d=l.description.owner,n=s.toString();this.removeResourceToClean(d,n),await this.shouldApplyMatch(l)&&(this.recordMarker(l.marker,d,n),(this.currentOwner!==d||this.currentResource!==n)&&(this.reportMarkersForCurrentResource(),this.currentOwner=d,this.currentResource=n))}forceDelivery(){this.reportMarkersForCurrentResource()}async tryBegin(c){let l=!1;for(const s of this.backgroundPatterns){const d=s.begin.regexp.exec(c);if(d){if(this._activeBackgroundMatchers.has(s.key))continue;this._activeBackgroundMatchers.add(s.key),l=!0,this._onDidFindFirstMatch.fire(),this.lines=[],this.lines.push(c),this._onDidStateChange.fire(S.create("backgroundProcessingBegins")),this.cleanMarkerCaches(),this.resetCurrentResource();const n=s.matcher.owner,a=d[s.begin.file];if(a){const o=(0,A.getResource)(a,s.matcher);this.recordResourceToClean(n,await o)}else this.recordResourcesToClean(n)}}return l}tryFinish(c){let l=!1;for(const s of this.backgroundPatterns)if(s.end.regexp.exec(c)&&(this._numberOfMatches>0?this._onDidFindErrors.fire():this._onDidRequestInvalidateLastMarker.fire(),this._activeBackgroundMatchers.has(s.key))){this._activeBackgroundMatchers.delete(s.key),this.resetCurrentResource(),this._onDidStateChange.fire(S.create("backgroundProcessingEnds")),l=!0,this.lines.push(c);const n=s.matcher.owner;this.cleanMarkers(n),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(c=>{this.recordResourcesToClean(c)}),super.done()}isWatching(){return this.backgroundPatterns.length>0}}e.WatchingProblemCollector=i}),define(ae[2514],le([1,0,1871,29,2,68,927,270,124,63,284]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskTerminalStatus=e.FAILED_TASK_STATUS=e.SUCCEEDED_TASK_STATUS=e.ACTIVE_TASK_STATUS=void 0;const C="task_terminal_status";e.ACTIVE_TASK_STATUS={id:C,icon:b.spinningLoading,severity:A.default.Info,tooltip:t.localize(0,null)},e.SUCCEEDED_TASK_STATUS={id:C,icon:p.Codicon.check,severity:A.default.Info,tooltip:t.localize(1,null)};const r={id:C,icon:p.Codicon.check,severity:A.default.Info,tooltip:t.localize(2,null)};e.FAILED_TASK_STATUS={id:C,icon:p.Codicon.error,severity:A.default.Error,tooltip:t.localize(3,null)};const u={id:C,icon:p.Codicon.error,severity:A.default.Error,tooltip:t.localize(4,null)},i={id:C,icon:p.Codicon.warning,severity:A.default.Warning,tooltip:t.localize(5,null)},f={id:C,icon:p.Codicon.warning,severity:A.default.Warning,tooltip:t.localize(6,null)},c={id:C,icon:p.Codicon.info,severity:A.default.Info,tooltip:t.localize(7,null)},l={id:C,icon:p.Codicon.info,severity:A.default.Info,tooltip:t.localize(8,null)};let s=class extends R.Disposable{constructor(n,a){super(),this._audioCueService=a,this.terminalMap=new Map,this._register(n.onDidStateChange(o=>{switch(o.kind){case"processStarted":case"active":this.eventActive(o);break;case"inactive":this.eventInactive(o);break;case"processEnded":this.eventEnd(o);break}}))}addTerminal(n,a,o){const g={id:C,severity:A.default.Info};a.statusList.add(g),o.onDidFindFirstMatch(()=>{this._marker=a.registerMarker()}),o.onDidFindErrors(()=>{this._marker&&a.addBufferMarker({marker:this._marker,hoverMessage:t.localize(9,null),disableCommandStorage:!0})}),o.onDidRequestInvalidateLastMarker(()=>{this._marker?.dispose(),this._marker=void 0}),this.terminalMap.set(n._id,{terminal:a,task:n,status:g,problemMatcher:o,taskRunEnded:!1})}terminalFromEvent(n){if(!!n.__task)return this.terminalMap.get(n.__task._id)}eventEnd(n){const a=this.terminalFromEvent(n);if(!!a)if(a.taskRunEnded=!0,a.terminal.statusList.remove(a.status),n.exitCode===0&&a.problemMatcher.numberOfMatches===0)if(this._audioCueService.playAudioCue(S.AudioCue.taskCompleted),a.task.configurationProperties.isBackground)for(const o of a.terminal.statusList.statuses)a.terminal.statusList.remove(o);else a.terminal.statusList.add(e.SUCCEEDED_TASK_STATUS);else n.exitCode||a.problemMatcher.maxMarkerSeverity===I.MarkerSeverity.Error?(this._audioCueService.playAudioCue(S.AudioCue.taskFailed),a.terminal.statusList.add(e.FAILED_TASK_STATUS)):a.problemMatcher.maxMarkerSeverity===I.MarkerSeverity.Warning?a.terminal.statusList.add(i):a.problemMatcher.maxMarkerSeverity===I.MarkerSeverity.Info&&a.terminal.statusList.add(c)}eventInactive(n){const a=this.terminalFromEvent(n);!a||!a.problemMatcher||a.taskRunEnded||(a.terminal.statusList.remove(a.status),a.problemMatcher.numberOfMatches===0?(this._audioCueService.playAudioCue(S.AudioCue.taskCompleted),a.terminal.statusList.add(r)):a.problemMatcher.maxMarkerSeverity===I.MarkerSeverity.Error?(this._audioCueService.playAudioCue(S.AudioCue.taskFailed),a.terminal.statusList.add(u)):a.problemMatcher.maxMarkerSeverity===I.MarkerSeverity.Warning?a.terminal.statusList.add(f):a.problemMatcher.maxMarkerSeverity===I.MarkerSeverity.Info&&a.terminal.statusList.add(l))}eventActive(n){const a=this.terminalFromEvent(n);!a||(a.disposeListener||(a.disposeListener=a.terminal.onDisposed(()=>{this.terminalMap.delete(n.__task?._id),a.disposeListener?.dispose()})),a.taskRunEnded=!1,a.terminal.statusList.remove(a.status),(a.problemMatcher instanceof k.StartStopProblemCollector||a.problemMatcher?.problemMatchers.length>0||n.runType==="singleRun")&&a.terminal.statusList.add(e.ACTIVE_TASK_STATUS))}};s=we([F(0,E.ITaskService),F(1,S.IAudioCueService)],s),e.TaskTerminalStatus=s}),define(ae[391],le([1,0,1879,13,52,131,7,6]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinitionRegistry=e.TaskDefinitionRegistryImpl=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 b;(function(r){function u(i,f,c){if(!i)return;const l=p.isString(i.type)?i.type:void 0;if(!l||l.length===0){c.error(t.localize(3,null));return}const s=[];if(Array.isArray(i.required))for(const d of i.required)p.isString(d)&&s.push(d);return{extensionId:f.value,taskType:l,required:s,properties:i.properties?R.deepClone(i.properties):{},when:i.when?k.ContextKeyExpr.deserialize(i.when):void 0}}r.from=u})(b||(b={}));const S=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"taskDefinitions",jsonSchema:{description:t.localize(4,null),type:"array",items:I}});class C{constructor(){this._onDefinitionsChanged=new E.Emitter,this.onDefinitionsChanged=this._onDefinitionsChanged.event,this.taskTypes=Object.create(null),this.readyPromise=new Promise((u,i)=>{S.setHandler((f,c)=>{this._schema=void 0;try{for(const l of c.removed){const s=l.value;for(const d of s)this.taskTypes&&d.type&&this.taskTypes[d.type]&&delete this.taskTypes[d.type]}for(const l of c.added){const s=l.value;for(const d of s){const n=b.from(d,l.description.identifier,l.collector);n&&(this.taskTypes[n.taskType]=n)}}(c.removed.length>0||c.added.length>0)&&this._onDefinitionsChanged.fire()}catch{}u(void 0)})})}onReady(){return this.readyPromise}get(u){return this.taskTypes[u]}all(){return Object.keys(this.taskTypes).map(u=>this.taskTypes[u])}getJsonSchema(){if(this._schema===void 0){const u=[];for(const i of this.all()){const f={type:"object",additionalProperties:!1};i.required.length>0&&(f.required=i.required.slice(0)),i.properties!==void 0?f.properties=R.deepClone(i.properties):f.properties=Object.create(null),f.properties.type={type:"string",enum:[i.taskType]},u.push(f)}this._schema={oneOf:u}}return this._schema}}e.TaskDefinitionRegistryImpl=C,e.TaskDefinitionRegistry=new C}),define(ae[2515],le([1,0,1876,52,926,318,391,909,908,29]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateProblemMatchers=e.updateTaskDefinitions=void 0;function S(X){Array.isArray(X)?X.forEach(S):typeof X=="object"&&(X.$ref&&(X.$ref=X.$ref+"2"),Object.getOwnPropertyNames(X).forEach(G=>{const Q=X[G];(Array.isArray(Q)||typeof Q=="object")&&S(Q)}))}const C={anyOf:[{type:"boolean",default:!0,description:t.localize(0,null)},{$ref:"#/definitions/shellConfiguration"}],deprecationMessage:t.localize(1,null)},r={type:"boolean",description:t.localize(2,null),default:!0},u={type:"object",additionalProperties:!0,properties:{type:{type:"string",description:t.localize(3,null)}}},i={anyOf:[{type:"string",description:t.localize(4,null)},u,{type:"array",description:t.localize(5,null),items:{anyOf:[{type:"string"},u]}}],description:t.localize(6,null)},f={type:"string",enum:["parallel","sequence"],enumDescriptions:[t.localize(7,null),t.localize(8,null)],default:"parallel",description:t.localize(9,null)},c={type:"string",description:t.localize(10,null)},l={type:"object",description:t.localize(11,null),properties:{id:{description:t.localize(12,null),type:["string","null"],enum:Array.from(b.Codicon.getAll(),X=>X.id),markdownEnumDescriptions:Array.from(b.Codicon.getAll(),X=>`$(${X.id})`)},color:{description:t.localize(13,null),type:["string","null"],enum:["terminal.ansiBlack","terminal.ansiRed","terminal.ansiGreen","terminal.ansiYellow","terminal.ansiBlue","terminal.ansiMagenta","terminal.ansiCyan","terminal.ansiWhite"]}}},s={type:"object",default:{echo:!0,reveal:"always",focus:!1,panel:"shared",showReuseMessage:!0,clear:!1},description:t.localize(14,null),additionalProperties:!1,properties:{echo:{type:"boolean",default:!0,description:t.localize(15,null)},focus:{type:"boolean",default:!1,description:t.localize(16,null)},revealProblems:{type:"string",enum:["always","onProblem","never"],enumDescriptions:[t.localize(17,null),t.localize(18,null),t.localize(19,null)],default:"never",description:t.localize(20,null)},reveal:{type:"string",enum:["always","silent","never"],enumDescriptions:[t.localize(21,null),t.localize(22,null),t.localize(23,null)],default:"always",description:t.localize(24,null)},panel:{type:"string",enum:["shared","dedicated","new"],default:"shared",description:t.localize(25,null)},showReuseMessage:{type:"boolean",default:!0,description:t.localize(26,null)},clear:{type:"boolean",default:!1,description:t.localize(27,null)},group:{type:"string",description:t.localize(28,null)},close:{type:"boolean",description:t.localize(29,null)}}},d=p.deepClone(s);d.deprecationMessage=t.localize(30,null);const n={type:"string",enum:["build","test","none"],enumDescriptions:[t.localize(31,null),t.localize(32,null),t.localize(33,null)],description:t.localize(34,null)},a={oneOf:[n,{type:"object",properties:{kind:n,isDefault:{type:["boolean","string"],default:!1,description:t.localize(35,null)}}}],defaultSnippets:[{body:{kind:"build",isDefault:!0},description:t.localize(36,null)},{body:{kind:"test",isDefault:!0},description:t.localize(37,null)}],description:t.localize(38,null)},o={type:"string",enum:["shell"],default:"process",description:t.localize(39,null)},g={oneOf:[{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:t.localize(40,null)}]},{type:"object",required:["value","quoting"],properties:{value:{oneOf:[{type:"string"},{type:"array",items:{type:"string"},description:t.localize(41,null)}],description:t.localize(42,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[t.localize(43,null),t.localize(44,null),t.localize(45,null)],default:"strong",description:t.localize(46,null)}}}],description:t.localize(47,null)},h={type:"array",items:{oneOf:[{type:"string"},{type:"object",required:["value","quoting"],properties:{value:{type:"string",description:t.localize(48,null)},quoting:{type:"string",enum:["escape","strong","weak"],enumDescriptions:[t.localize(49,null),t.localize(50,null),t.localize(51,null)],default:"strong",description:t.localize(52,null)}}}]},description:t.localize(53,null)},v={type:"string",description:t.localize(54,null)},m={type:"string",enum:["2.0.0"],description:t.localize(55,null)},w={type:"string",description:t.localize(56,null),deprecationMessage:t.localize(57,null)},D={type:"object",additionalProperties:!1,properties:{reevaluateOnRerun:{type:"boolean",description:t.localize(58,null),default:!0},runOn:{type:"string",enum:["default","folderOpen"],description:t.localize(59,null),default:"default"},instanceLimit:{type:"number",description:t.localize(60,null),default:1}},description:t.localize(61,null)},y=R.default.definitions,T=p.deepClone(y.options),_=T.properties;_.shell=p.deepClone(y.shellConfiguration);const L={type:"object",additionalProperties:!1,properties:{label:{type:"string",description:t.localize(62,null)},taskName:{type:"string",description:t.localize(63,null),deprecationMessage:t.localize(64,null)},identifier:p.deepClone(w),group:p.deepClone(a),isBackground:{type:"boolean",description:t.localize(65,null),default:!0},promptOnClose:{type:"boolean",description:t.localize(66,null),default:!1},presentation:p.deepClone(s),icon:p.deepClone(l),hide:p.deepClone(r),options:T,problemMatcher:{$ref:"#/definitions/problemMatcherType",description:t.localize(67,null)},runOptions:p.deepClone(D),dependsOn:p.deepClone(i),dependsOrder:p.deepClone(f),detail:p.deepClone(c)}},M=[];k.TaskDefinitionRegistry.onReady().then(()=>{O()});function O(){for(const X of k.TaskDefinitionRegistry.all()){if(M.find(j=>j.properties?.type?.enum?.find?j.properties?.type.enum.find(K=>K===X.taskType):void 0))continue;const G=p.deepClone(L),Q=G.properties;if(Q.type={type:"string",description:t.localize(68,null),enum:[X.taskType]},X.required?G.required=X.required.slice():G.required=[],G.required.push("type"),X.properties)for(const j of Object.keys(X.properties)){const K=X.properties[j];Q[j]=p.deepClone(K)}S(G),M.push(G)}}e.updateTaskDefinitions=O;const N=p.deepClone(L);N.properties.customize={type:"string",deprecationMessage:t.localize(69,null)},N.required||(N.required=[]),N.required.push("customize"),M.push(N);const P=p.deepClone(y),B=P.taskDescription;B.required=["label"];const V=B.properties;V.label=p.deepClone(v),V.command=p.deepClone(g),V.args=p.deepClone(h),V.isShellCommand=p.deepClone(C),V.dependsOn=i,V.hide=p.deepClone(r),V.dependsOrder=f,V.identifier=p.deepClone(w),V.type=p.deepClone(o),V.presentation=p.deepClone(s),V.terminal=d,V.icon=p.deepClone(l),V.group=p.deepClone(a),V.runOptions=p.deepClone(D),V.detail=c,V.taskName.deprecationMessage=t.localize(70,null);const z=p.deepClone(B);B.default={label:"My Task",type:"shell",command:"echo Hello",problemMatcher:[]},P.showOutputType.deprecationMessage=t.localize(71,null),V.echoCommand.deprecationMessage=t.localize(72,null),V.suppressTaskName.deprecationMessage=t.localize(73,null),V.isBuildCommand.deprecationMessage=t.localize(74,null),V.isTestCommand.deprecationMessage=t.localize(75,null),z.properties.type={type:"string",enum:["process"],default:"process",description:t.localize(76,null)},z.required.push("command"),z.required.push("type"),M.push(z),M.push({$ref:"#/definitions/taskDescription"});const x=P.taskRunnerConfiguration.properties,H=x.tasks;H.items={oneOf:M},x.inputs=I.inputsSchema.definitions.inputs,P.commandConfiguration.properties.isShellCommand=p.deepClone(C),P.commandConfiguration.properties.args=p.deepClone(h),P.options.properties.shell={$ref:"#/definitions/shellConfiguration"},x.isShellCommand=p.deepClone(C),x.type=p.deepClone(o),x.group=p.deepClone(a),x.presentation=p.deepClone(s),x.suppressTaskName.deprecationMessage=t.localize(77,null),x.taskSelector.deprecationMessage=t.localize(78,null);const W=p.deepClone(P.taskRunnerConfiguration);delete W.properties.tasks,W.additionalProperties=!1,P.osSpecificTaskRunnerConfiguration=W,x.version=p.deepClone(m);const U={oneOf:[{allOf:[{type:"object",required:["version"],properties:{version:p.deepClone(m),windows:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(79,null)},osx:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(80,null)},linux:{$ref:"#/definitions/osSpecificTaskRunnerConfiguration",description:t.localize(81,null)}}},{$ref:"#/definitions/taskRunnerConfiguration"}]}]};U.definitions=P;function $(X,G){const Q=X[G].properties;Q?Object.keys(Q).forEach(j=>{$(Q,j)}):E.applyDeprecatedVariableMessage(X[G])}Object.getOwnPropertyNames(P).forEach(X=>{const G=X+"2";P[G]=P[X],delete P[X],$(P,G)}),S(U);function q(){try{const X=A.ProblemMatcherRegistry.keys().map(G=>"$"+G);P.problemMatcherType2.oneOf[0].enum=X,P.problemMatcherType2.oneOf[2].items.anyOf[0].enum=X}catch{console.log("Installing problem matcher ids failed")}}e.updateProblemMatchers=q,A.ProblemMatcherRegistry.onReady().then(()=>{q()}),e.default=U}),define(ae[293],le([1,0,1882,13,18,52,7,391]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskDefinition=e.TasksSchemaProperties=e.TaskSettingId=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=e.USER_TASKS_GROUP_KEY=void 0,e.USER_TASKS_GROUP_KEY="settings",e.TASK_RUNNING_STATE=new k.RawContextKey("taskRunning",!1,t.localize(0,null)),e.TASKS_CATEGORY={value:t.localize(1,null),original:"Tasks"};var I;(function(V){V[V.Escape=1]="Escape",V[V.Strong=2]="Strong",V[V.Weak=3]="Weak"})(I=e.ShellQuoting||(e.ShellQuoting={})),e.CUSTOMIZED_TASK_TYPE="$customized",function(V){function z(x){if(!x)return V.Strong;switch(x.toLowerCase()){case"escape":return V.Escape;case"strong":return V.Strong;case"weak":return V.Weak;default:return V.Strong}}V.from=z}(I=e.ShellQuoting||(e.ShellQuoting={}));var b;(function(V){V.defaults={cwd:"${workspaceFolder}"}})(b=e.CommandOptions||(e.CommandOptions={}));var S;(function(V){V[V.Always=1]="Always",V[V.Silent=2]="Silent",V[V.Never=3]="Never"})(S=e.RevealKind||(e.RevealKind={})),function(V){function z(x){switch(x.toLowerCase()){case"always":return V.Always;case"silent":return V.Silent;case"never":return V.Never;default:return V.Always}}V.fromString=z}(S=e.RevealKind||(e.RevealKind={}));var C;(function(V){V[V.Never=1]="Never",V[V.OnProblem=2]="OnProblem",V[V.Always=3]="Always"})(C=e.RevealProblemKind||(e.RevealProblemKind={})),function(V){function z(x){switch(x.toLowerCase()){case"always":return V.Always;case"never":return V.Never;case"onproblem":return V.OnProblem;default:return V.OnProblem}}V.fromString=z}(C=e.RevealProblemKind||(e.RevealProblemKind={}));var r;(function(V){V[V.Shared=1]="Shared",V[V.Dedicated=2]="Dedicated",V[V.New=3]="New"})(r=e.PanelKind||(e.PanelKind={})),function(V){function z(x){switch(x.toLowerCase()){case"shared":return V.Shared;case"dedicated":return V.Dedicated;case"new":return V.New;default:return V.Shared}}V.fromString=z}(r=e.PanelKind||(e.PanelKind={}));var u;(function(V){V.defaults={echo:!0,reveal:S.Always,revealProblems:C.Never,focus:!1,panel:r.Shared,showReuseMessage:!0,clear:!1}})(u=e.PresentationOptions||(e.PresentationOptions={}));var i;(function(V){V[V.Shell=1]="Shell",V[V.Process=2]="Process",V[V.CustomExecution=3]="CustomExecution"})(i=e.RuntimeType||(e.RuntimeType={})),function(V){function z(H){switch(H.toLowerCase()){case"shell":return V.Shell;case"process":return V.Process;case"customExecution":return V.CustomExecution;default:return V.Process}}V.fromString=z;function x(H){switch(H){case V.Shell:return"shell";case V.Process:return"process";case V.CustomExecution:return"customExecution";default:return"process"}}V.toString=x}(i=e.RuntimeType||(e.RuntimeType={}));var f;(function(V){function z(x){return p.isString(x)?x:x.value}V.value=z})(f=e.CommandString||(e.CommandString={}));var c;(function(V){V.Clean={_id:"clean",isDefault:!1},V.Build={_id:"build",isDefault:!1},V.Rebuild={_id:"rebuild",isDefault:!1},V.Test={_id:"test",isDefault:!1};function z(H){return H===V.Clean._id||H===V.Build._id||H===V.Rebuild._id||H===V.Test._id}V.is=z;function x(H){if(H!==void 0)return p.isString(H)?z(H)?{_id:H,isDefault:!1}:void 0:H}V.from=x})(c=e.TaskGroup||(e.TaskGroup={}));var l;(function(V){V[V.Global=1]="Global",V[V.Workspace=2]="Workspace",V[V.Folder=3]="Folder"})(l=e.TaskScope||(e.TaskScope={}));var s;(function(V){V.Workspace="workspace",V.Extension="extension",V.InMemory="inMemory",V.WorkspaceFile="workspaceFile",V.User="user";function z(x){switch(x){case V.User:return 2;case V.WorkspaceFile:return 5;default:return 6}}V.toConfigurationTarget=z})(s=e.TaskSourceKind||(e.TaskSourceKind={}));var d;(function(V){V.parallel="parallel",V.sequence="sequence"})(d=e.DependsOrder||(e.DependsOrder={}));var n;(function(V){V[V.default=1]="default",V[V.folderOpen=2]="folderOpen"})(n=e.RunOnOptions||(e.RunOnOptions={}));var a;(function(V){V.defaults={reevaluateOnRerun:!0,runOn:n.default,instanceLimit:1}})(a=e.RunOptions||(e.RunOptions={}));class o{constructor(z,x,H,W,U,$){this._label="",this._id=z,x&&(this._label=x),H&&(this.type=H),this.runOptions=W,this.configurationProperties=U,this._source=$}getDefinition(z){}getMapKey(){return this._id}getRecentlyUsedKey(){}getCommonTaskId(){const z={folder:this.getFolderId(),id:this._id};return JSON.stringify(z)}clone(){return this.fromObject(Object.assign({},this))}getWorkspaceFolder(){}getWorkspaceFileName(){}getTelemetryKind(){return"unknown"}matches(z,x=!1){if(z===void 0)return!1;if(p.isString(z))return z===this._label||z===this.configurationProperties.identifier||x&&z===this._id;const H=this.getDefinition(!0);return H!==void 0&&H._key===z._key}getQualifiedLabel(){const z=this.getWorkspaceFolder();return z?`${this._label} (${z.name})`:this._label}getTaskExecution(){return{id:this._id,task:this}}addTaskLoadMessages(z){this._taskLoadMessages===void 0&&(this._taskLoadMessages=[]),z&&(this._taskLoadMessages=this._taskLoadMessages.concat(z))}get taskLoadMessages(){return this._taskLoadMessages}}e.CommonTask=o;class g extends o{constructor(z,x,H,W,U,$,q,X){super(z,H,void 0,q,X,x),this.command={},this._source=x,this.hasDefinedMatchers=$,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(z=!1){if(z&&this._source.customizes!==void 0)return this._source.customizes;{let x;switch(this.command?this.command.runtime:void 0){case i.Shell:x="shell";break;case i.Process:x="process";break;case i.CustomExecution:x="customExecution";break;case void 0:x="$composite";break;default:throw new Error("Unexpected task runtime")}return{type:x,_key:this._id,id:this._id}}}static is(z){return z instanceof g}getMapKey(){const z=this._source.config.workspaceFolder;return z?`${z.uri.toString()}|${this._id}|${this.instance}`:`${this._id}|${this.instance}`}getFolderId(){return this._source.kind===s.User?e.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getCommonTaskId(){return this._source.customizes?super.getCommonTaskId():this.getRecentlyUsedKey()??super.getCommonTaskId()}getRecentlyUsedKey(){const z=this.getFolderId();if(!z)return;let x=this.configurationProperties.identifier;this._source.kind!==s.Workspace&&(x+=this._source.kind);const H={type:e.CUSTOMIZED_TASK_TYPE,folder:z,id:x};return JSON.stringify(H)}getWorkspaceFolder(){return this._source.config.workspaceFolder}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?R.basename(this._source.config.workspace.configuration):void 0}getTelemetryKind(){return this._source.customizes?"workspace>extension":"workspace"}fromObject(z){return new g(z._id,z._source,z._label,z.type,z.command,z.hasDefinedMatchers,z.runOptions,z.configurationProperties)}}e.CustomTask=g;class h extends o{constructor(z,x,H,W,U,$,q){super(z,H,W,$,q,x),this._source=x,this.configures=U}static is(z){return z instanceof h}fromObject(z){return z}getDefinition(){return this.configures}getWorkspaceFileName(){return this._source.config.workspace&&this._source.config.workspace.configuration?R.basename(this._source.config.workspace.configuration):void 0}getWorkspaceFolder(){return this._source.config.workspaceFolder}getFolderId(){return this._source.kind===s.User?e.USER_TASKS_GROUP_KEY:this._source.config.workspaceFolder?.uri.toString()}getRecentlyUsedKey(){const z=this.getFolderId();if(!z)return;let x=this.configurationProperties.identifier;this._source.kind!==s.Workspace&&(x+=this._source.kind);const H={type:e.CUSTOMIZED_TASK_TYPE,folder:z,id:x};return JSON.stringify(H)}}e.ConfiguringTask=h;class v extends o{constructor(z,x,H,W,U,$,q,X,G){super(z,H,W,X,G,x),this.defines=U,this.hasDefinedMatchers=q,this.command=$,this.icon=G.icon,this.hide=G.hide}clone(){return new v(this._id,this._source,this._label,this.type,this.defines,this.command,this.hasDefinedMatchers,this.runOptions,this.configurationProperties)}getDefinition(){return this.defines}static is(z){return z instanceof v}getMapKey(){const z=this._source.workspaceFolder;return z?`${this._source.scope.toString()}|${z.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(){const z={type:"contributed",scope:this._source.scope,id:this._id};return z.folder=this.getFolderId(),JSON.stringify(z)}getWorkspaceFolder(){return this._source.workspaceFolder}getTelemetryKind(){return"extension"}fromObject(z){return new v(z._id,z._source,z._label,z.type,z.defines,z.command,z.hasDefinedMatchers,z.runOptions,z.configurationProperties)}}e.ContributedTask=v;class m extends o{constructor(z,x,H,W,U,$){super(z,H,W,U,$,x),this._source=x}clone(){return new m(this._id,this._source,this._label,this.type,this.runOptions,this.configurationProperties)}static is(z){return z instanceof m}getTelemetryKind(){return"composite"}getMapKey(){return`${this._id}|${this.instance}`}getFolderId(){}fromObject(z){return new m(z._id,z._source,z._label,z.type,z.runOptions,z.configurationProperties)}}e.InMemoryTask=m;var w;(function(V){V[V.Process=1]="Process",V[V.Terminal=2]="Terminal"})(w=e.ExecutionEngine||(e.ExecutionEngine={})),function(V){V._default=V.Terminal}(w=e.ExecutionEngine||(e.ExecutionEngine={}));var D;(function(V){V[V.V0_1_0=1]="V0_1_0",V[V.V2_0_0=2]="V2_0_0"})(D=e.JsonSchemaVersion||(e.JsonSchemaVersion={}));class y{constructor(z){this._order=new Map;for(let x=0;x<z.length;x++)this._order.set(z[x].uri.toString(),x)}compare(z,x){const H=z.getWorkspaceFolder(),W=x.getWorkspaceFolder();if(H&&W){let U=this._order.get(H.uri.toString());U=U===void 0?0:U+1;let $=this._order.get(W.uri.toString());return $=$===void 0?0:$+1,U===$?z._label.localeCompare(x._label):U-$}else return!H&&W?-1:H&&!W?1:0}}e.TaskSorter=y;var T;(function(V){V.DependsOnStarted="dependsOnStarted",V.AcquiredInput="acquiredInput",V.Start="start",V.ProcessStarted="processStarted",V.Active="active",V.Inactive="inactive",V.Changed="changed",V.Terminated="terminated",V.ProcessEnded="processEnded",V.End="end"})(T=e.TaskEventKind||(e.TaskEventKind={}));var _;(function(V){V.SingleRun="singleRun",V.Background="background"})(_=e.TaskRunType||(e.TaskRunType={}));var L;(function(V){V[V.System=0]="System",V[V.User=1]="User",V[V.FolderOpen=2]="FolderOpen",V[V.ConfigurationChange=3]="ConfigurationChange",V[V.Reconnect=4]="Reconnect"})(L=e.TaskRunSource||(e.TaskRunSource={}));var M;(function(V){function z(x,H,W,U,$){if(H){const q={kind:x,taskId:H._id,taskName:H.configurationProperties.name,runType:H.configurationProperties.isBackground?"background":"singleRun",group:H.configurationProperties.group,processId:void 0,exitCode:void 0,terminalId:void 0,__task:H};return x==="start"?(q.terminalId=W,q.resolvedVariables=U):x==="processStarted"?q.processId=W:x==="processEnded"&&(q.exitCode=W),Object.freeze(q)}else return Object.freeze({kind:"changed"})}V.create=z})(M=e.TaskEvent||(e.TaskEvent={}));var O;(function(V){function z(H){const W=Object.keys(H).sort();let U="";for(const $ of W){let q=H[$];q instanceof Object?q=z(q):typeof q=="string"&&(q=q.replace(/,/g,",,")),U+=$+","+q+","}return U}function x(H){const U={_key:z(H),type:H.taskType};return Object.assign(U,H),U}V.create=x})(O=e.KeyedTaskIdentifier||(e.KeyedTaskIdentifier={}));var N;(function(V){V.AutoDetect="task.autoDetect",V.SaveBeforeRun="task.saveBeforeRun",V.ShowDecorations="task.showDecorations",V.ProblemMatchersNeverPrompt="task.problemMatchers.neverPrompt",V.SlowProviderWarning="task.slowProviderWarning",V.QuickOpenHistory="task.quickOpen.history",V.QuickOpenDetail="task.quickOpen.detail",V.QuickOpenSkip="task.quickOpen.skip",V.QuickOpenShowAll="task.quickOpen.showAll",V.AllowAutomaticTasks="task.allowAutomaticTasks",V.Reconnection="task.reconnection"})(N=e.TaskSettingId||(e.TaskSettingId={}));var P;(function(V){V.Tasks="tasks",V.SuppressTaskName="tasks.suppressTaskName",V.Windows="tasks.windows",V.Osx="tasks.osx",V.Linux="tasks.linux",V.ShowOutput="tasks.showOutput",V.IsShellCommand="tasks.isShellCommand",V.ServiceTestSetting="tasks.service.testSetting"})(P=e.TasksSchemaProperties||(e.TasksSchemaProperties={}));var B;(function(V){function z(x,H){const W=E.TaskDefinitionRegistry.get(x.type);if(W===void 0){const X=A.deepClone(x);return delete X._key,O.create(X)}const U=Object.create(null);U.type=W.taskType;const $=new Set;W.required.forEach(X=>$.add(X));const q=W.properties;for(const X of Object.keys(q)){const G=x[X];if(G!=null)U[X]=G;else if($.has(X)){const Q=q[X];if(Q.default!==void 0)U[X]=A.deepClone(Q.default);else switch(Q.type){case"boolean":U[X]=!1;break;case"number":case"integer":U[X]=0;break;case"string":U[X]="";break;default:H.error(t.localize(2,null,JSON.stringify(x,void 0,0),X));return}}}return O.create(U)}V.createTaskIdentifier=z})(B=e.TaskDefinition||(e.TaskDefinition={}))}),define(ae[2516],le([1,0,1868,18,2,270,293,23,26,48,15,118,8,41,6,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManageAutomaticTaskRunning=e.RunAutomaticTasks=void 0;const c="task.hasPromptedForAutomaticTasks",l="task.allowAutomaticTasks";let s=class extends R.Disposable{constructor(a,o,g,h,v,m,w){super(),this._taskService=a,this._configurationService=o,this._workspaceTrustManagementService=g,this._logService=h,this._storageService=v,this._openerService=m,this._notificationService=w,this._hasRunTasks=!1,this._workspaceTrustManagementService.isWorkspaceTrusted()&&this._tryRunTasks(),this._register(this._workspaceTrustManagementService.onDidChangeTrust(async D=>{D&&await this._tryRunTasks()}))}async _tryRunTasks(){if(this._hasRunTasks||this._configurationService.getValue(l)==="off")return;this._hasRunTasks=!0,this._logService.trace("RunAutomaticTasks: Trying to run tasks."),this._taskService.hasTaskSystemInfo||(this._logService.trace("RunAutomaticTasks: Awaiting task system info."),await i.Event.toPromise(i.Event.once(this._taskService.onDidChangeTaskSystemInfo)));const a=await this._taskService.getWorkspaceTasks(2);this._logService.trace(`RunAutomaticTasks: Found ${a.size} automatic tasks`),await this._runWithPermission(this._taskService,this._storageService,this._notificationService,this._workspaceTrustManagementService,this._openerService,this._configurationService,a)}_runTasks(a,o){o.forEach(g=>{g instanceof Promise?g.then(h=>{h&&a.run(h)}):a.run(g)})}_getTaskSource(a){switch(k.TaskSourceKind.toConfigurationTarget(a.kind)){case 6:return p.joinPath(a.config.workspaceFolder.uri,a.config.file);case 5:return a.config.workspace?.configuration??void 0}}_findAutoTasks(a,o){const g=new Array,h=new Array,v=new Map;return o&&o.forEach(m=>{if(m.set&&m.set.tasks.forEach(w=>{if(w.runOptions.runOn===k.RunOnOptions.folderOpen){g.push(w),h.push(w._label);const D=this._getTaskSource(w._source);D&&v.set(D.fsPath,D)}}),m.configurations){for(const w of Object.values(m.configurations.byIdentifier))if(w.runOptions.runOn===k.RunOnOptions.folderOpen){g.push(new Promise(y=>{a.getTask(m.workspaceFolder,w._id,!0).then(T=>y(T))})),w._label?h.push(w._label):h.push(w.configures.task);const D=this._getTaskSource(w._source);D&&v.set(D.fsPath,D)}}}),{tasks:g,taskNames:h,locations:v}}async _runWithPermission(a,o,g,h,v,m,w){const D=o.getBoolean(c,1,!1),{tasks:y,taskNames:T,locations:_}=this._findAutoTasks(a,w);T.length!==0&&(m.getValue(l)==="on"?this._runTasks(a,y):m.getValue(l)==="auto"&&!D&&this._showPrompt(g,o,v,m,T,_).then(L=>{L&&(o.store(c,!0,1,0),this._runTasks(a,y))}))}_showPrompt(a,o,g,h,v,m){return new Promise(w=>{a.prompt(I.Severity.Info,t.localize(0,null,v.join(", "),Array.from(m.keys()).join(", ")),[{label:t.localize(1,null),run:()=>{w(!0),h.updateValue(l,"on",5)}},{label:t.localize(2,null),run:()=>{w(!1),h.updateValue(l,"off",5)}},{label:m.size===1?t.localize(3,null):t.localize(4,null),run:async()=>{for(const D of m)await g.open(D[1]);w(!1)}}]),o.store(c,!0,1,1)})}};s=we([F(0,A.ITaskService),F(1,r.IConfigurationService),F(2,C.IWorkspaceTrustManagementService),F(3,f.ILogService),F(4,E.IStorageService),F(5,u.IOpenerService),F(6,I.INotificationService)],s),e.RunAutomaticTasks=s;class d extends S.Action2{constructor(){super({id:d.ID,title:d.LABEL,category:k.TASKS_CATEGORY})}async run(a){const o=a.get(b.IQuickInputService),g=a.get(r.IConfigurationService),h={label:t.localize(6,null)},v={label:t.localize(7,null)},m=await o.pick([h,v],{canPickMany:!1});!m||g.updateValue(l,m===h?"on":"off",5)}}e.ManageAutomaticTaskRunning=d,d.ID="workbench.action.tasks.manageAutomaticRunning",d.LABEL=t.localize(5,null)}),define(ae[928],le([1,0,1870,52,293,13,270,8,48,2,6,26,29,12,63,47,290,824,23]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"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 d(h){return"uri"in h}e.isWorkspaceFolder=d;const n=t.localize(0,null);e.configureTaskIcon=(0,i.registerIcon)("tasks-list-configure",r.Codicon.gear,t.localize(1,null));const a=(0,i.registerIcon)("tasks-remove",r.Codicon.close,t.localize(2,null)),o="runTaskStorageKey";let g=class Bi extends b.Disposable{constructor(v,m,w,D,y,T,_){super(),this._taskService=v,this._configurationService=m,this._quickInputService=w,this._notificationService=D,this._themeService=y,this._dialogService=T,this._storageService=_,this._sorter=this._taskService.createSorter()}_showDetail(){return!!this._configurationService.getValue(e.QUICKOPEN_DETAIL_CONFIG)}_guessTaskLabel(v){if(v._label)return v._label;if(R.ConfiguringTask.is(v)){let m=v.configures.type;const w=p.deepClone(v.configures);return delete w._key,delete w.type,Object.keys(w).forEach(D=>m+=`: ${w[D]}`),m}return""}static getTaskLabelWithIcon(v,m){const w=m||v._label,D=v.configurationProperties.icon;return D?D.id?`$(${D.id}) ${w}`:`$(${r.Codicon.tools.id}) ${w}`:`${w}`}static applyColorStyles(v,m,w){if(v.configurationProperties.icon?.color){const D=w.getColorTheme(),y=(0,c.getColorStyleElement)(D);m.iconClasses=[(0,c.getColorClass)(v.configurationProperties.icon.color)],document.body.appendChild(y)}}_createTaskEntry(v,m=[]){const w=[{iconClass:u.ThemeIcon.asClassName(e.configureTaskIcon),tooltip:t.localize(3,null)},...m],D={label:Bi.getTaskLabelWithIcon(v,this._guessTaskLabel(v)),description:this._taskService.getTaskDescription(v),task:v,detail:this._showDetail()?v.configurationProperties.detail:void 0,buttons:w};return Bi.applyColorStyles(v,D,this._themeService),D}_createEntriesForGroup(v,m,w,D=[]){v.push({type:"separator",label:w}),m.forEach(y=>{y.configurationProperties.hide||v.push(this._createTaskEntry(y,D))})}_createTypeEntries(v,m){v.push({type:"separator",label:t.localize(4,null)}),m.forEach(w=>{v.push({label:`$(folder) ${w}`,task:w,ariaLabel:t.localize(5,null,w)})}),v.push({label:n,task:n,alwaysShow:!0})}_handleFolderTaskResult(v){const m=[];return Array.from(v).forEach(([w,D])=>{if(D.set&&m.push(...D.set.tasks),D.configurations)for(const y in D.configurations.byIdentifier)m.push(D.configurations.byIdentifier[y])}),m}_dedupeConfiguredAndRecent(v,m){let w=[];const D=Array(v.length).fill(!1);for(let T=0;T<m.length;T++){const _=m[T].getWorkspaceFolder()?.uri.toString(),L=m[T].getDefinition()?._key,M=m[T].type,O=m[T]._label,N=m[T].getRecentlyUsedKey(),P=v.findIndex(B=>_&&L&&B.getWorkspaceFolder()?.uri.toString()===_&&(B.getDefinition()?._key===L||B.type===M&&B._label===O)||N&&B.getRecentlyUsedKey()===N);P===-1?w.push(m[T]):(v[P]=m[T],D[P]=!0)}w=w.sort((T,_)=>this._sorter.compare(T,_));const y=[];for(let T=0;T<v.length;T++)(D[T]||R.ConfiguringTask.is(v[T]))&&y.push(v[T]);return{configuredTasks:w,recentTasks:y}}async getTopLevelEntries(v){if(this._topLevelEntries!==void 0)return{entries:this._topLevelEntries};let m=(await this._taskService.getSavedTasks("historical")).reverse();const w=this._handleFolderTaskResult(await this._taskService.getWorkspaceTasks()),D=this._taskService.taskTypes();this._topLevelEntries=[];const y=this._dedupeConfiguredAndRecent(m,w),T=y.configuredTasks;if(m=y.recentTasks,m.length>0){const _={iconClass:u.ThemeIcon.asClassName(a),tooltip:t.localize(6,null)};this._createEntriesForGroup(this._topLevelEntries,m,t.localize(7,null),[_])}return w.length>0&&T.length>0&&this._createEntriesForGroup(this._topLevelEntries,T,t.localize(8,null)),v&&w.length===0&&(this._topLevelEntries.push({type:"separator",label:t.localize(9,null)}),this._topLevelEntries.push(v)),D.length>0&&this._createTypeEntries(this._topLevelEntries,D),{entries:this._topLevelEntries,isSingleConfigured:w.length===1?w[0]:void 0}}async handleSettingOption(v){const m=t.localize(10,null),w=t.localize(11,null);if((await this._dialogService.show(C.Severity.Warning,t.localize(12,null,v),[m,w],{cancelId:1})).choice===1)return await this._configurationService.updateValue(`${v}.autoDetect`,"on"),await new Promise(y=>setTimeout(()=>y(),100)),this.show(t.localize(13,null),void 0,v)}async show(v,m,w,D){const y=this._quickInputService.createQuickPick();y.placeholder=v,y.matchOnDescription=!0,y.ignoreFocusOut=!1,y.onDidTriggerItemButton(async _=>{const L=_.item.task;if(_.button.iconClass===u.ThemeIcon.asClassName(a)){const M=L&&!A.isString(L)?L.getRecentlyUsedKey():void 0;M&&this._taskService.removeRecentlyUsedTask(M);const O=y.items.indexOf(_.item);O>=0&&(y.items=[...y.items.slice(0,O),...y.items.slice(O+1)])}else if(_.button.iconClass===u.ThemeIcon.asClassName(e.configureTaskIcon)){if(this._quickInputService.cancel(),R.ContributedTask.is(L))this._taskService.customize(L,void 0,!0);else if(R.CustomTask.is(L)||R.ConfiguringTask.is(L)){let M=!1;try{M=await this._taskService.openConfig(L)}catch{}M||this._taskService.customize(L,void 0,!0)}}}),D&&(y.value=D);let T=w;if(!T){const _=await this.getTopLevelEntries(m);if(_.isSingleConfigured&&this._configurationService.getValue(e.QUICKOPEN_SKIP_CONFIG))return y.dispose(),this._toTask(_.isSingleConfigured);const L=_.entries;T=await this._doPickerFirstLevel(y,L)}do if(A.isString(T)){if(D){await this._doPickerFirstLevel(y,(await this.getTopLevelEntries(m)).entries),y.dispose();return}const _=await this.doPickerSecondLevel(y,T);if(_&&!_.settingType&&_.task===null)T=await this._doPickerFirstLevel(y,(await this.getTopLevelEntries(m)).entries),y.value="";else return _&&A.isString(_.settingType)?(y.dispose(),this.handleSettingOption(_.settingType)):(y.dispose(),_?.task&&!A.isString(_?.task)?this._toTask(_?.task):void 0)}else return T?(y.dispose(),this._toTask(T)):(y.dispose(),T);while(1)}async _doPickerFirstLevel(v,m){return v.items=m,(0,l.showWithPinnedItems)(this._storageService,o,v,!0),(await new Promise(D=>{S.Event.once(v.onDidAccept)(async()=>{D(v.selectedItems?v.selectedItems[0]:void 0)})}))?.task}async doPickerSecondLevel(v,m,w){if(v.busy=!0,m===n){const y=(await this._taskService.tasks()).filter(T=>!T.configurationProperties.hide).sort((T,_)=>this._sorter.compare(T,_)).map(T=>this._createTaskEntry(T));y.push(...Bi.allSettingEntries(this._configurationService)),v.items=y}else v.value=w||"",v.items=await this._getEntriesForProvider(m);return await v.show(),v.busy=!1,await new Promise(y=>{S.Event.once(v.onDidAccept)(async()=>{y(v.selectedItems?v.selectedItems[0]:void 0)})})}static allSettingEntries(v){const m=[],w=Bi.getSettingEntry(v,"grunt");w&&m.push(w);const D=Bi.getSettingEntry(v,"gulp");D&&m.push(D);const y=Bi.getSettingEntry(v,"jake");return y&&m.push(y),m}static getSettingEntry(v,m){if(v.getValue(`${m}.autoDetect`)==="off")return{label:t.localize(14,null,m[0].toUpperCase()+m.slice(1),m),task:null,settingType:m,alwaysShow:!0}}async _getEntriesForProvider(v){const m=(await this._taskService.tasks({type:v})).sort((y,T)=>this._sorter.compare(y,T));let w=[];if(m.length>0){for(const y of m)y.configurationProperties.hide||w.push(this._createTaskEntry(y));w.push({type:"separator"},{label:t.localize(15,null),task:null,alwaysShow:!0})}else w=[{label:t.localize(16,null,v),task:null,alwaysShow:!0}];const D=Bi.getSettingEntry(this._configurationService,v);return D&&w.push(D),w}async _toTask(v){if(!R.ConfiguringTask.is(v))return v;const m=await this._taskService.tryResolveTask(v);return m||this._notificationService.error(t.localize(17,null,v.type)),m}};g=we([F(0,k.ITaskService),F(1,E.IConfigurationService),F(2,I.IQuickInputService),F(3,C.INotificationService),F(4,u.IThemeService),F(5,f.IDialogService),F(6,s.IStorageService)],g),e.TaskQuickPick=g}),define(ae[929],le([1,0,1872,48,252,96,39,270,293,928,8,13,26,47,12,23]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TasksQuickAccessProvider=void 0;let c=class Ga extends R.PickerQuickAccessProvider{constructor(s,d,n,a,o,g,h,v){super(Ga.PREFIX,{noResultsPick:{label:(0,t.localize)(0,null)}}),this._taskService=d,this._configurationService=n,this._quickInputService=a,this._notificationService=o,this._dialogService=g,this._themeService=h,this._storageService=v}async _getPicks(s,d,n){if(n.isCancellationRequested)return[];const a=new b.TaskQuickPick(this._taskService,this._configurationService,this._quickInputService,this._notificationService,this._themeService,this._dialogService,this._storageService),o=await a.getTopLevelEntries(),g=[];for(const h of o.entries){const v=(0,A.matchesFuzzy)(s,h.label);if(!v)continue;h.type==="separator"&&g.push(h);const m=h.task,w=h;w.highlights={label:v},w.trigger=D=>{if(D===1&&w.buttons?.length===2){const y=m&&!(0,C.isString)(m)?m.getRecentlyUsedKey():void 0;return y&&this._taskService.removeRecentlyUsedTask(y),R.TriggerAction.REFRESH_PICKER}else return I.ContributedTask.is(m)?this._taskService.customize(m,void 0,!0):I.CustomTask.is(m)&&this._taskService.openConfig(m),R.TriggerAction.CLOSE_PICKER},w.accept=async()=>{if((0,C.isString)(m)){const D=await a.show((0,t.localize)(1,null),void 0,m);D&&this._taskService.run(D,{attachProblemMatcher:!0})}else this._taskService.run(await this._toTask(m),{attachProblemMatcher:!0})},g.push(w)}return g}async _toTask(s){return I.ConfiguringTask.is(s)?this._taskService.tryResolveTask(s):s}};c.PREFIX="task ",c=we([F(0,k.IExtensionService),F(1,E.ITaskService),F(2,S.IConfigurationService),F(3,p.IQuickInputService),F(4,r.INotificationService),F(5,u.IDialogService),F(6,i.IThemeService),F(7,f.IStorageService)],c),e.TasksQuickAccessProvider=c}),define(ae[930],le([1,0,1878,52,13,72,318,293,391,270]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCustomTask=e.parse=e.TaskConfigSource=e.UUIDMap=e.JsonSchemaVersion=e.ExecutionEngine=e.TaskParser=e.GroupKind=e.ProblemMatcherConverter=e.RunOptions=e.RunOnOptions=e.CommandString=e.ITaskIdentifier=e.ShellQuoting=void 0;var S;(function(X){X[X.escape=1]="escape",X[X.strong=2]="strong",X[X.weak=3]="weak"})(S=e.ShellQuoting||(e.ShellQuoting={}));var C;(function(X){function G(Q){return Q!==void 0&&R.isString(Q.type)}X.is=G})(C=e.ITaskIdentifier||(e.ITaskIdentifier={}));var r;(function(X){function G(Q){return R.isString(Q)?Q:R.isStringArray(Q)?Q.join(" "):R.isString(Q.value)?Q.value:Q.value.join(" ")}X.value=G})(r=e.CommandString||(e.CommandString={}));var u;(function(X){X[X.Unknown=0]="Unknown",X[X.String=1]="String",X[X.ProblemMatcher=2]="ProblemMatcher",X[X.Array=3]="Array"})(u||(u={}));const i=[];Object.freeze(i);function f(X,G,Q){const j=G[Q];j!==void 0&&(X[Q]=j)}function c(X,G,Q){const j=G[Q];X[Q]===void 0&&j!==void 0&&(X[Q]=j)}function l(X,G,Q=!1){if(X==null||G===void 0)return!0;for(const j of G){const K=X[j.property];if(K!=null){if(j.type!==void 0&&!j.type.isEmpty(K))return!1;if(!Array.isArray(K)||K.length>0||Q)return!1}}return!0}function s(X,G,Q){if(!G||l(G,Q))return X;if(!X||l(X,Q))return G;for(const j of Q){const K=j.property;let Y;j.type!==void 0?Y=j.type.assignProperties(X[K],G[K]):Y=G[K],Y!=null&&(X[K]=Y)}return X}function d(X,G,Q,j=!1){if(!G||l(G,Q))return X;if(!X||l(X,Q,j))return G;for(const K of Q){const Y=K.property;let ee;K.type?ee=K.type.fillProperties(X[Y],G[Y]):X[Y]===void 0&&(ee=G[Y]),ee!=null&&(X[Y]=ee)}return X}function n(X,G,Q,j){if(X&&Object.isFrozen(X))return X;if(X==null||G===void 0||G===null)return G!=null?p.deepClone(G):void 0;for(const K of Q){const Y=K.property;if(X[Y]!==void 0)continue;let ee;K.type?ee=K.type.fillDefaults(X[Y],j):ee=G[Y],ee!=null&&(X[Y]=ee)}return X}function a(X,G){if(X!=null){if(Object.isFrozen(X))return X;for(const Q of G)if(Q.type){const j=X[Q.property];j&&Q.type.freeze(j)}return Object.freeze(X),X}}var o;(function(X){function G(Q){if(!Q)return E.RunOnOptions.default;switch(Q.toLowerCase()){case"folderopen":return E.RunOnOptions.folderOpen;case"default":default:return E.RunOnOptions.default}}X.fromString=G})(o=e.RunOnOptions||(e.RunOnOptions={}));var g;(function(X){const G=[{property:"reevaluateOnRerun"},{property:"runOn"},{property:"instanceLimit"}];function Q(Y){return{reevaluateOnRerun:Y?Y.reevaluateOnRerun:!0,runOn:Y?o.fromString(Y.runOn):E.RunOnOptions.default,instanceLimit:Y?Y.instanceLimit:1}}X.fromConfiguration=Q;function j(Y,ee){return s(Y,ee,G)}X.assignProperties=j;function K(Y,ee){return d(Y,ee,G)}X.fillProperties=K})(g=e.RunOptions||(e.RunOptions={}));var h;(function(X){const G=[{property:"executable"},{property:"args"},{property:"quoting"}];function Q(oe){const se=oe;return se&&(R.isString(se.executable)||R.isStringArray(se.args))}X.is=Q;function j(oe,se){if(!Q(oe))return;const te={};return oe.executable!==void 0&&(te.executable=oe.executable),oe.args!==void 0&&(te.args=oe.args.slice()),oe.quoting!==void 0&&(te.quoting=p.deepClone(oe.quoting)),te}X.from=j;function K(oe){return l(oe,G,!0)}X.isEmpty=K;function Y(oe,se){return s(oe,se,G)}X.assignProperties=Y;function ee(oe,se){return d(oe,se,G,!0)}X.fillProperties=ee;function ie(oe,se){return oe}X.fillDefaults=ie;function re(oe){if(!!oe)return Object.freeze(oe)}X.freeze=re})(h||(h={}));var v;(function(X){const G=[{property:"cwd"},{property:"env"},{property:"shell",type:h}],Q={cwd:"${workspaceFolder}"};function j(oe,se){const te={};return oe.cwd!==void 0&&(R.isString(oe.cwd)?te.cwd=oe.cwd:se.taskLoadIssues.push(t.localize(0,null,oe.cwd))),oe.env!==void 0&&(te.env=p.deepClone(oe.env)),te.shell=h.from(oe.shell,se),K(te)?void 0:te}X.from=j;function K(oe){return l(oe,G)}X.isEmpty=K;function Y(oe,se){if(se===void 0||K(se))return oe;if(oe===void 0||K(oe))return se;if(f(oe,se,"cwd"),oe.env===void 0)oe.env=se.env;else if(se.env!==void 0){const te=Object.create(null);oe.env!==void 0&&Object.keys(oe.env).forEach(Z=>te[Z]=oe.env[Z]),se.env!==void 0&&Object.keys(se.env).forEach(Z=>te[Z]=se.env[Z]),oe.env=te}return oe.shell=h.assignProperties(oe.shell,se.shell),oe}X.assignProperties=Y;function ee(oe,se){return d(oe,se,G)}X.fillProperties=ee;function ie(oe,se){return n(oe,Q,G,se)}X.fillDefaults=ie;function re(oe){return a(oe,G)}X.freeze=re})(v||(v={}));var m;(function(X){let G;(function(ne){const ce=[{property:"echo"},{property:"reveal"},{property:"revealProblems"},{property:"focus"},{property:"panel"},{property:"showReuseMessage"},{property:"clear"},{property:"group"},{property:"close"}];function de(ve,be){let ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee=!1;R.isBoolean(ve.echoCommand)&&(ge=ve.echoCommand,Ee=!0),R.isString(ve.showOutput)&&(ue=E.RevealKind.fromString(ve.showOutput),Ee=!0);const Te=ve.presentation||ve.terminal;if(Te&&(R.isBoolean(Te.echo)&&(ge=Te.echo),R.isString(Te.reveal)&&(ue=E.RevealKind.fromString(Te.reveal)),R.isString(Te.revealProblems)&&(Ce=E.RevealProblemKind.fromString(Te.revealProblems)),R.isBoolean(Te.focus)&&(De=Te.focus),R.isString(Te.panel)&&(Ae=E.PanelKind.fromString(Te.panel)),R.isBoolean(Te.showReuseMessage)&&(Pe=Te.showReuseMessage),R.isBoolean(Te.clear)&&(fe=Te.clear),R.isString(Te.group)&&(ye=Te.group),R.isBoolean(Te.close)&&(ke=Te.close),Ee=!0),!!Ee)return{echo:ge,reveal:ue,revealProblems:Ce,focus:De,panel:Ae,showReuseMessage:Pe,clear:fe,group:ye,close:ke}}ne.from=de;function he(ve,be){return s(ve,be,ce)}ne.assignProperties=he;function pe(ve,be){return d(ve,be,ce)}ne.fillProperties=pe;function me(ve,be){const ge=be.engine===E.ExecutionEngine.Terminal;return n(ve,{echo:ge,reveal:E.RevealKind.Always,revealProblems:E.RevealProblemKind.Never,focus:!1,panel:E.PanelKind.Shared,showReuseMessage:!0,clear:!1},ce,be)}ne.fillDefaults=me;function Se(ve){return a(ve,ce)}ne.freeze=Se;function Ie(ve){return l(ve,ce)}ne.isEmpty=Ie})(G=X.PresentationOptions||(X.PresentationOptions={}));let Q;(function(ne){function ce(de){if(de!=null){if(R.isString(de))return de;if(R.isStringArray(de))return de.join(" ");{const he=E.ShellQuoting.from(de.quoting),pe=R.isString(de.value)?de.value:R.isStringArray(de.value)?de.value.join(" "):void 0;return pe?{value:pe,quoting:he}:void 0}}}ne.from=ce})(Q||(Q={}));const j=[{property:"runtime"},{property:"name"},{property:"options",type:v},{property:"args"},{property:"taskSelector"},{property:"suppressTaskName"},{property:"presentation",type:G}];function K(ne,ce){let de=Y(ne,ce),he;return ne.windows&&ce.platform===3?he=Y(ne.windows,ce):ne.osx&&ce.platform===1?he=Y(ne.osx,ce):ne.linux&&ce.platform===2&&(he=Y(ne.linux,ce)),he&&(de=re(de,he,ce.schemaVersion===2)),ie(de)?void 0:de}X.from=K;function Y(ne,ce){const de=Q.from(ne.command);let he;R.isString(ne.type)&&(ne.type==="shell"||ne.type==="process")&&(he=E.RuntimeType.fromString(ne.type));const pe=h.is(ne.isShellCommand);R.isBoolean(ne.isShellCommand)||pe?he=E.RuntimeType.Shell:ne.isShellCommand!==void 0&&(he=ne.isShellCommand?E.RuntimeType.Shell:E.RuntimeType.Process);const me={name:de,runtime:he,presentation:G.from(ne,ce)};if(ne.args!==void 0){me.args=[];for(const Se of ne.args){const Ie=Q.from(Se);Ie!==void 0?me.args.push(Ie):ce.taskLoadIssues.push(t.localize(1,null,Se?JSON.stringify(Se,void 0,4):"undefined"))}}return ne.options!==void 0&&(me.options=v.from(ne.options,ce),me.options&&me.options.shell===void 0&&pe&&(me.options.shell=h.from(ne.isShellCommand,ce),ce.engine!==E.ExecutionEngine.Terminal&&ce.taskLoadIssues.push(t.localize(2,null)))),R.isString(ne.taskSelector)&&(me.taskSelector=ne.taskSelector),R.isBoolean(ne.suppressTaskName)&&(me.suppressTaskName=ne.suppressTaskName),ie(me)?void 0:me}function ee(ne){return ne&&!!ne.name}X.hasCommand=ee;function ie(ne){return l(ne,j)}X.isEmpty=ie;function re(ne,ce,de){return ie(ce)?ne:ie(ne)?ce:(f(ne,ce,"name"),f(ne,ce,"runtime"),f(ne,ce,"taskSelector"),f(ne,ce,"suppressTaskName"),ce.args!==void 0&&(ne.args===void 0||de?ne.args=ce.args:ne.args=ne.args.concat(ce.args)),ne.presentation=G.assignProperties(ne.presentation,ce.presentation),ne.options=v.assignProperties(ne.options,ce.options),ne)}X.assignProperties=re;function oe(ne,ce){return d(ne,ce,j)}X.fillProperties=oe;function se(ne,ce,de){if(ce===void 0||ie(ce))return ne;if(ne=ne||{name:void 0,runtime:void 0,presentation:void 0},ne.name===void 0){c(ne,ce,"name"),c(ne,ce,"taskSelector"),c(ne,ce,"suppressTaskName");let he=ce.args?ce.args.slice():[];!ne.suppressTaskName&&de&&(ne.taskSelector!==void 0?he.push(ne.taskSelector+de):he.push(de)),ne.args&&(he=he.concat(ne.args)),ne.args=he}return c(ne,ce,"runtime"),ne.presentation=G.fillProperties(ne.presentation,ce.presentation),ne.options=v.fillProperties(ne.options,ce.options),ne}X.fillGlobals=se;function te(ne,ce){!ne||Object.isFrozen(ne)||(ne.name!==void 0&&ne.runtime===void 0&&(ne.runtime=E.RuntimeType.Process),ne.presentation=G.fillDefaults(ne.presentation,ce),ie(ne)||(ne.options=v.fillDefaults(ne.options,ce)),ne.args===void 0&&(ne.args=i),ne.suppressTaskName===void 0&&(ne.suppressTaskName=ce.schemaVersion===2))}X.fillDefaults=te;function Z(ne){return a(ne,j)}X.freeze=Z})(m||(m={}));var w;(function(X){function G(ee,ie){const re=Object.create(null);return Array.isArray(ee)&&ee.forEach(oe=>{const se=new k.ProblemMatcherParser(ie.problemReporter).parse(oe);(0,k.isNamedProblemMatcher)(se)?re[se.name]=se:ie.problemReporter.error(t.localize(3,null,JSON.stringify(oe,void 0,4)))}),re}X.namedFrom=G;function Q(ee,ie){let re={};return ee.windows&&ee.windows.problemMatcher&&ie.platform===3?re=j(ee.windows.problemMatcher,ie):ee.osx&&ee.osx.problemMatcher&&ie.platform===1?re=j(ee.osx.problemMatcher,ie):ee.linux&&ee.linux.problemMatcher&&ie.platform===2?re=j(ee.linux.problemMatcher,ie):ee.problemMatcher&&(re=j(ee.problemMatcher,ie)),re}X.fromWithOsConfig=Q;function j(ee,ie){const re=[];if(ee===void 0)return{value:re};const oe=[];function se(Z){Z.value&&re.push(Z.value),Z.errors&&oe.push(...Z.errors)}const te=K(ee);if(te===u.Unknown){const Z=t.localize(4,null,JSON.stringify(ee,null,4));ie.problemReporter.warn(Z)}else te===u.String||te===u.ProblemMatcher?se(Y(ee,ie)):te===u.Array&&ee.forEach(ne=>{se(Y(ne,ie))});return{value:re,errors:oe}}X.from=j;function K(ee){return R.isString(ee)?u.String:Array.isArray(ee)?u.Array:R.isUndefined(ee)?u.Unknown:u.ProblemMatcher}function Y(ee,ie){if(R.isString(ee)){let re=ee;if(re.length>1&&re[0]==="$"){re=re.substring(1);const oe=k.ProblemMatcherRegistry.get(re);if(oe)return{value:p.deepClone(oe)};let se=ie.namedProblemMatchers[re];if(se)return se=p.deepClone(se),delete se.name,{value:se}}return{errors:[t.localize(5,null,ee)]}}else{const re=ee;return{value:new k.ProblemMatcherParser(ie.problemReporter).parse(re)}}}})(w=e.ProblemMatcherConverter||(e.ProblemMatcherConverter={}));const D={label:"Workspace",config:void 0};var y;(function(X){function G(j){if(j!==void 0){if(R.isString(j)&&E.TaskGroup.is(j))return{_id:j,isDefault:!1};if(R.isString(j.kind)&&E.TaskGroup.is(j.kind)){const K=j.kind,Y=R.isUndefined(j.isDefault)?!1:j.isDefault;return{_id:K,isDefault:Y}}}}X.from=G;function Q(j){return R.isString(j)?j:j.isDefault?{kind:j._id,isDefault:j.isDefault}:j._id}X.to=Q})(y=e.GroupKind||(e.GroupKind={}));var T;(function(X){function G(j,K){switch(K){case x.User:return E.USER_TASKS_GROUP_KEY;case x.TasksJson:return j.workspaceFolder.uri;default:return j.workspace&&j.workspace.configuration?j.workspace.configuration:j.workspaceFolder.uri}}function Q(j,K,Y){return R.isString(j)?{uri:G(K,Y),task:j}:C.is(j)?{uri:G(K,Y),task:E.TaskDefinition.createTaskIdentifier(j,K.problemReporter)}:void 0}X.from=Q})(T||(T={}));var _;(function(X){function G(Q){switch(Q){case"sequence":return"sequence";case"parallel":default:return"parallel"}}X.from=G})(_||(_={}));var L;(function(X){const G=[{property:"name"},{property:"identifier"},{property:"group"},{property:"isBackground"},{property:"promptOnClose"},{property:"dependsOn"},{property:"presentation",type:m.PresentationOptions},{property:"problemMatchers"},{property:"options"},{property:"icon"},{property:"hide"}];function Q(K,Y,ee,ie,re){if(!K)return{};const oe={};if(re)for(const te of Object.keys(re))K[te]!==void 0&&(oe[te]=p.deepClone(K[te]));if(R.isString(K.taskName)&&(oe.name=K.taskName),R.isString(K.label)&&Y.schemaVersion===2&&(oe.name=K.label),R.isString(K.identifier)&&(oe.identifier=K.identifier),oe.icon=K.icon,oe.hide=K.hide,K.isBackground!==void 0&&(oe.isBackground=!!K.isBackground),K.promptOnClose!==void 0&&(oe.promptOnClose=!!K.promptOnClose),oe.group=y.from(K.group),K.dependsOn!==void 0)if(Array.isArray(K.dependsOn))oe.dependsOn=K.dependsOn.reduce((te,Z)=>{const ne=T.from(Z,Y,ie);return ne&&te.push(ne),te},[]);else{const te=T.from(K.dependsOn,Y,ie);oe.dependsOn=te?[te]:void 0}oe.dependsOrder=_.from(K.dependsOrder),ee&&(K.presentation!==void 0||K.terminal!==void 0)&&(oe.presentation=m.PresentationOptions.from(K,Y)),ee&&K.options!==void 0&&(oe.options=v.from(K.options,Y));const se=w.fromWithOsConfig(K,Y);return se.value!==void 0&&(oe.problemMatchers=se.value),K.detail&&(oe.detail=K.detail),j(oe)?{}:{value:oe,errors:se.errors}}X.from=Q;function j(K){return l(K,G)}X.isEmpty=j})(L||(L={}));var M;(function(X){const G="grunt.",Q="jake.",j="gulp.",K="vscode.npm.",Y="vscode.typescript.";function ee(ie,re,oe,se,te){if(!ie)return;const Z=ie.type,ne=ie.customize;if(!Z&&!ne){re.problemReporter.error(t.localize(6,null,JSON.stringify(ie,null,4)));return}const ce=Z?te?.get?.(Z)||I.TaskDefinitionRegistry.get(Z):void 0;if(!ce){const ve=t.localize(7,null,Z);re.problemReporter.error(ve);return}let de;if(R.isString(ne)?ne.indexOf(G)===0?de={type:"grunt",task:ne.substring(G.length)}:ne.indexOf(Q)===0?de={type:"jake",task:ne.substring(Q.length)}:ne.indexOf(j)===0?de={type:"gulp",task:ne.substring(j.length)}:ne.indexOf(K)===0?de={type:"npm",script:ne.substring(K.length+4)}:ne.indexOf(Y)===0&&(de={type:"typescript",tsconfig:ne.substring(Y.length+6)}):R.isString(ie.type)&&(de=ie),de===void 0){re.problemReporter.error(t.localize(8,null,JSON.stringify(ie,void 0,0)));return}const he=E.TaskDefinition.createTaskIdentifier(de,re.problemReporter);if(he===void 0){re.problemReporter.error(t.localize(9,null,JSON.stringify(ie,void 0,0)));return}const pe={workspaceFolder:re.workspaceFolder,file:".vscode/tasks.json",index:oe,element:ie};let me;switch(se){case x.User:{me=Object.assign({},D,{kind:E.TaskSourceKind.User,config:pe});break}case x.WorkspaceFile:{me=Object.assign({},D,{kind:E.TaskSourceKind.WorkspaceFile,config:pe});break}default:{me=Object.assign({},D,{kind:E.TaskSourceKind.Workspace,config:pe});break}}const Se=new E.ConfiguringTask(`${ce.extensionId}.${he._key}`,me,void 0,Z,he,g.fromConfiguration(ie.runOptions),{hide:ie.hide}),Ie=L.from(ie,re,!0,se,ce.properties);if(Se.addTaskLoadMessages(Ie.errors),Ie.value){if(Se.configurationProperties=Object.assign(Se.configurationProperties,Ie.value),Se.configurationProperties.name)Se._label=Se.configurationProperties.name;else{let ve=Se.configures.type;if(ce.required&&ce.required.length>0)for(const be of ce.required){const ge=Se.configures[be];if(ge){ve=ve+": "+ge;break}}Se._label=ve}Se.configurationProperties.identifier||(Se.configurationProperties.identifier=he._key)}return Se}X.from=ee})(M||(M={}));var O;(function(X){function G(Y,ee,ie,re){if(!Y)return;let oe=Y.type;if(oe==null&&(oe=E.CUSTOMIZED_TASK_TYPE),oe!==E.CUSTOMIZED_TASK_TYPE&&oe!=="shell"&&oe!=="process"){ee.problemReporter.error(t.localize(10,null,JSON.stringify(Y,null,4)));return}let se=Y.taskName;if(R.isString(Y.label)&&ee.schemaVersion===2&&(se=Y.label),!se){ee.problemReporter.error(t.localize(11,null,JSON.stringify(Y,null,4)));return}let te;switch(re){case x.User:{te=Object.assign({},D,{kind:E.TaskSourceKind.User,config:{index:ie,element:Y,file:".vscode/tasks.json",workspaceFolder:ee.workspaceFolder}});break}case x.WorkspaceFile:{te=Object.assign({},D,{kind:E.TaskSourceKind.WorkspaceFile,config:{index:ie,element:Y,file:".vscode/tasks.json",workspaceFolder:ee.workspaceFolder,workspace:ee.workspace}});break}default:{te=Object.assign({},D,{kind:E.TaskSourceKind.Workspace,config:{index:ie,element:Y,file:".vscode/tasks.json",workspaceFolder:ee.workspaceFolder}});break}}const Z=new E.CustomTask(ee.uuidMap.getUUID(se),te,se,E.CUSTOMIZED_TASK_TYPE,void 0,!1,g.fromConfiguration(Y.runOptions),{name:se,identifier:se}),ne=L.from(Y,ee,!1,re);if(Z.addTaskLoadMessages(ne.errors),ne.value&&(Z.configurationProperties=Object.assign(Z.configurationProperties,ne.value)),!0){const he=Y;Z.configurationProperties.isBackground===void 0&&he.isWatching!==void 0&&(Z.configurationProperties.isBackground=!!he.isWatching),Z.configurationProperties.group===void 0&&(he.isBuildCommand===!0?Z.configurationProperties.group=E.TaskGroup.Build:he.isTestCommand===!0&&(Z.configurationProperties.group=E.TaskGroup.Test))}const de=m.from(Y,ee);return de&&(Z.command=de),Y.command!==void 0&&(de.suppressTaskName=!0),Z}X.from=G;function Q(Y,ee){(m.hasCommand(Y.command)||Y.configurationProperties.dependsOn===void 0)&&(Y.command=m.fillGlobals(Y.command,ee.command,Y.configurationProperties.name)),Y.configurationProperties.problemMatchers===void 0&&ee.problemMatcher!==void 0&&(Y.configurationProperties.problemMatchers=p.deepClone(ee.problemMatcher),Y.hasDefinedMatchers=!0),Y.configurationProperties.promptOnClose===void 0&&Y.configurationProperties.isBackground===void 0&&ee.promptOnClose!==void 0&&(Y.configurationProperties.promptOnClose=ee.promptOnClose)}X.fillGlobals=Q;function j(Y,ee){m.fillDefaults(Y.command,ee),Y.configurationProperties.promptOnClose===void 0&&(Y.configurationProperties.promptOnClose=Y.configurationProperties.isBackground!==void 0?!Y.configurationProperties.isBackground:!0),Y.configurationProperties.isBackground===void 0&&(Y.configurationProperties.isBackground=!1),Y.configurationProperties.problemMatchers===void 0&&(Y.configurationProperties.problemMatchers=i)}X.fillDefaults=j;function K(Y,ee){const ie=new E.CustomTask(ee._id,Object.assign({},ee._source,{customizes:Y.defines}),ee.configurationProperties.name||Y._label,E.CUSTOMIZED_TASK_TYPE,Y.command,!1,Y.runOptions,{name:ee.configurationProperties.name||Y.configurationProperties.name,identifier:ee.configurationProperties.identifier||Y.configurationProperties.identifier,icon:ee.configurationProperties.icon,hide:ee.configurationProperties.hide});ie.addTaskLoadMessages(ee.taskLoadMessages);const re=ie.configurationProperties;f(re,ee.configurationProperties,"group"),f(re,ee.configurationProperties,"isBackground"),f(re,ee.configurationProperties,"dependsOn"),f(re,ee.configurationProperties,"problemMatchers"),f(re,ee.configurationProperties,"promptOnClose"),f(re,ee.configurationProperties,"detail"),ie.command.presentation=m.PresentationOptions.assignProperties(ie.command.presentation,ee.configurationProperties.presentation),ie.command.options=v.assignProperties(ie.command.options,ee.configurationProperties.options),ie.runOptions=g.assignProperties(ie.runOptions,ee.runOptions);const oe=Y.configurationProperties;return c(re,oe,"group"),c(re,oe,"isBackground"),c(re,oe,"dependsOn"),c(re,oe,"problemMatchers"),c(re,oe,"promptOnClose"),c(re,oe,"detail"),ie.command.presentation=m.PresentationOptions.fillProperties(ie.command.presentation,oe.presentation),ie.command.options=v.fillProperties(ie.command.options,oe.options),ie.runOptions=g.fillProperties(ie.runOptions,Y.runOptions),Y.hasDefinedMatchers===!0&&(ie.hasDefinedMatchers=!0),ie}X.createCustomTask=K})(O||(O={}));var N;(function(X){function G(Y){const ee=Y.type;return Y.customize===void 0&&(ee==null||ee===E.CUSTOMIZED_TASK_TYPE||ee==="shell"||ee==="process")}const Q={shell:b.ShellExecutionSupportedContext,process:b.ProcessExecutionSupportedContext};function j(Y,ee,ie,re,oe){const se={custom:[],configured:[]};if(!Y)return se;const te={task:void 0,rank:-1},Z={task:void 0,rank:-1},ne=ie.schemaVersion===2,ce=p.deepClone(ie.taskLoadIssues);for(let pe=0;pe<Y.length;pe++){const me=Y[pe],Se=me.type?oe?.get?.(me.type)||I.TaskDefinitionRegistry.get(me.type):void 0;let Ie=!1;if(Se&&Se.when&&!ie.contextKeyService.contextMatchesRules(Se.when))Ie=!0;else if(!Se&&me.type){for(const ve of Object.keys(Q))if(me.type===ve){Ie=!b.ShellExecutionSupportedContext.evaluate(ie.contextKeyService.getContext(null));break}}if(Ie){ie.problemReporter.info(t.localize(12,null,me.type));continue}if(G(me)){const ve=O.from(me,ie,pe,re);if(ve){if(O.fillGlobals(ve,ee),O.fillDefaults(ve,ie),ne){if((ve.command===void 0||ve.command.name===void 0)&&(ve.configurationProperties.dependsOn===void 0||ve.configurationProperties.dependsOn.length===0)){ie.problemReporter.error(t.localize(13,null,ve.configurationProperties.name,JSON.stringify(me,void 0,4)));continue}}else if(ve.command===void 0||ve.command.name===void 0){ie.problemReporter.warn(t.localize(14,null,ve.configurationProperties.name,JSON.stringify(me,void 0,4)));continue}ve.configurationProperties.group===E.TaskGroup.Build&&te.rank<2?(te.task=ve,te.rank=2):ve.configurationProperties.group===E.TaskGroup.Test&&Z.rank<2?(Z.task=ve,Z.rank=2):ve.configurationProperties.name==="build"&&te.rank<1?(te.task=ve,te.rank=1):ve.configurationProperties.name==="test"&&Z.rank<1&&(Z.task=ve,Z.rank=1),ve.addTaskLoadMessages(ie.taskLoadIssues),se.custom.push(ve)}}else{const ve=M.from(me,ie,pe,re,oe);ve&&(ve.addTaskLoadMessages(ie.taskLoadIssues),se.configured.push(ve))}ie.taskLoadIssues=p.deepClone(ce)}const de=R.isString(te.task?.configurationProperties.group)?te.task?.configurationProperties.group:te.task?.configurationProperties.group?._id,he=R.isString(Z.task?.configurationProperties.group)?Z.task?.configurationProperties.group:Z.task?.configurationProperties.group?._id;return de!==E.TaskGroup.Build._id&&te.rank>-1&&te.rank<2&&te.task?te.task.configurationProperties.group=E.TaskGroup.Build:he!==E.TaskGroup.Test._id&&Z.rank>-1&&Z.rank<2&&Z.task&&(Z.task.configurationProperties.group=E.TaskGroup.Test),se}X.from=j;function K(Y,ee){if(ee===void 0||ee.length===0)return Y;if(Y===void 0||Y.length===0)return ee;if(ee){const ie=Object.create(null);Y.forEach(oe=>{ie[oe.configurationProperties.name]=oe}),ee.forEach(oe=>{ie[oe.configurationProperties.name]=oe});const re=[];Y.forEach(oe=>{re.push(ie[oe.configurationProperties.name]),delete ie[oe.configurationProperties.name]}),Object.keys(ie).forEach(oe=>re.push(ie[oe])),Y=re}return Y}X.assignTasks=K})(N=e.TaskParser||(e.TaskParser={}));var P;(function(X){function G(ie,re){let oe=Q(ie,re),se;ie.windows&&re.platform===3?se=Q(ie.windows,re):ie.osx&&re.platform===1?se=Q(ie.osx,re):ie.linux&&re.platform===2&&(se=Q(ie.linux,re)),se&&(oe=X.assignProperties(oe,se));const te=m.from(ie,re);return te&&(oe.command=te),X.fillDefaults(oe,re),X.freeze(oe),oe}X.from=G;function Q(ie,re){const oe={};return ie.suppressTaskName!==void 0&&(oe.suppressTaskName=!!ie.suppressTaskName),ie.promptOnClose!==void 0&&(oe.promptOnClose=!!ie.promptOnClose),ie.problemMatcher&&(oe.problemMatcher=w.from(ie.problemMatcher,re).value),oe}X.fromBase=Q;function j(ie){return!ie||ie.command===void 0&&ie.promptOnClose===void 0&&ie.suppressTaskName===void 0}X.isEmpty=j;function K(ie,re){return j(re)?ie:j(ie)?re:(f(ie,re,"promptOnClose"),f(ie,re,"suppressTaskName"),ie)}X.assignProperties=K;function Y(ie,re){!ie||(m.fillDefaults(ie.command,re),ie.suppressTaskName===void 0&&(ie.suppressTaskName=re.schemaVersion===2),ie.promptOnClose===void 0&&(ie.promptOnClose=!0))}X.fillDefaults=Y;function ee(ie){Object.freeze(ie),ie.command&&m.freeze(ie.command)}X.freeze=ee})(P||(P={}));var B;(function(X){function G(Q){const j=Q.runner||Q._runner;let K;if(j)switch(j){case"terminal":K=E.ExecutionEngine.Terminal;break;case"process":K=E.ExecutionEngine.Process;break}const Y=V.from(Q);if(Y===1)return K||E.ExecutionEngine.Process;if(Y===2)return E.ExecutionEngine.Terminal;throw new Error("Shouldn't happen.")}X.from=G})(B=e.ExecutionEngine||(e.ExecutionEngine={}));var V;(function(X){function Q(j){const K=j.version;if(!K)return 2;switch(K){case"0.1.0":return 1;case"2.0.0":return 2;default:return 2}}X.from=Q})(V=e.JsonSchemaVersion||(e.JsonSchemaVersion={}));class z{constructor(G){if(this.current=Object.create(null),G)for(const Q of Object.keys(G.current)){const j=G.current[Q];Array.isArray(j)?this.current[Q]=j.slice():this.current[Q]=j}}start(){this.last=this.current,this.current=Object.create(null)}getUUID(G){const Q=this.last?this.last[G]:void 0;let j;Q!==void 0&&(Array.isArray(Q)?(j=Q.shift(),Q.length===0&&delete this.last[G]):(j=Q,delete this.last[G])),j===void 0&&(j=A.generateUuid());const K=this.current[G];if(K===void 0)this.current[G]=j;else if(Array.isArray(K))K.push(j);else{const Y=[K];Y.push(j),this.current[G]=Y}return j}finish(){this.last=void 0}}e.UUIDMap=z;var x;(function(X){X[X.TasksJson=0]="TasksJson",X[X.WorkspaceFile=1]="WorkspaceFile",X[X.User=2]="User"})(x=e.TaskConfigSource||(e.TaskConfigSource={}));class H{constructor(G,Q,j,K,Y){this.workspaceFolder=G,this.workspace=Q,this.platform=j,this.problemReporter=K,this.uuidMap=Y}run(G,Q,j){const K=B.from(G),Y=V.from(G),ee={workspaceFolder:this.workspaceFolder,workspace:this.workspace,problemReporter:this.problemReporter,uuidMap:this.uuidMap,namedProblemMatchers:{},engine:K,schemaVersion:Y,platform:this.platform,taskLoadIssues:[],contextKeyService:j},ie=this.createTaskRunnerConfiguration(G,ee,Q);return{validationStatus:this.problemReporter.status,custom:ie.custom,configured:ie.configured,engine:K}}createTaskRunnerConfiguration(G,Q,j){const K=P.from(G,Q);if(this.problemReporter.status.isFatal())return{custom:[],configured:[]};Q.namedProblemMatchers=w.namedFrom(G.declares,Q);let Y,ee;if(G.windows&&Q.platform===3?(Y=N.from(G.windows.tasks,K,Q,j).custom,ee=G.windows.tasks):G.osx&&Q.platform===1?(Y=N.from(G.osx.tasks,K,Q,j).custom,ee=G.osx.tasks):G.linux&&Q.platform===2&&(Y=N.from(G.linux.tasks,K,Q,j).custom,ee=G.linux.tasks),Q.schemaVersion===2&&Y&&Y.length>0&&ee&&ee.length>0){const re=[];for(const oe of ee)re.push(JSON.stringify(oe,null,4));Q.problemReporter.error(t.localize(15,null,re.join(` `)))}let ie={custom:[],configured:[]};if(G.tasks&&(ie=N.from(G.tasks,K,Q,j)),Y&&(ie.custom=N.assignTasks(ie.custom,Y)),(!ie.custom||ie.custom.length===0)&&K.command&&K.command.name){const re=w.from(G.problemMatcher,Q).value??[],oe=G.isBackground?!!G.isBackground:G.isWatching?!!G.isWatching:void 0,se=E.CommandString.value(K.command.name),te=new E.CustomTask(Q.uuidMap.getUUID(se),Object.assign({},j,{config:{index:-1,element:G,workspaceFolder:Q.workspaceFolder}}),se,E.CUSTOMIZED_TASK_TYPE,{name:void 0,runtime:void 0,presentation:void 0,suppressTaskName:!0},!1,{reevaluateOnRerun:!0},{name:se,identifier:se,group:E.TaskGroup.Build,isBackground:oe,problemMatchers:re}),Z=y.from(G.group);Z!==void 0?te.configurationProperties.group=Z:G.group==="none"&&(te.configurationProperties.group=void 0),O.fillGlobals(te,K),O.fillDefaults(te,Q),ie.custom=[te]}return ie.custom=ie.custom||[],ie.configured=ie.configured||[],ie}}const W=new Map,U=new Map;function $(X,G,Q,j,K,Y,ee,ie=!1){const re=ie?U:W;let oe=re.get(Y);oe||(re.set(Y,new Map),oe=re.get(Y));let se=oe.get(X.uri.toString());se||(se=new z,oe.set(X.uri.toString(),se));try{return se.start(),new H(X,G,Q,K,se).run(j,Y,ee)}finally{se.finish()}}e.parse=$;function q(X,G){return O.createCustomTask(X,G)}e.createCustomTask=q}),define(ae[931],le([1,0,11,6,164,2,60,52,53,14,18,68,13,1873,124,339,318,29,22,9,25,185,507,12,2514,927,930,293,885,2399,889,127]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTaskSystem=e.VerifiedTask=void 0;const L="Task";class M{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 O{constructor(x,H,W,U){this.workspaceFolder=x,this.taskSystemInfo=H,this.values=W,this._service=U}async resolve(x){const H=[];x.replace(O._regex,(U,...$)=>(H.push(this._replacer(U,$)),U));const W=await Promise.all(H);return x.replace(O._regex,()=>W.shift())}async _replacer(x,H){const W=this.values.get(x.substring(2,x.length-1));return W??(this._service?this._service.resolveAsync(this.workspaceFolder,x):x)}}O._regex=/\$\{(.*?)\}/g;class N{constructor(x,H,W){this.task=x,this.resolver=H,this.trigger=W}verify(){let x=!1;return this.trigger&&this.resolvedVariables&&this.workspaceFolder&&this.shellLaunchConfig!==void 0&&(x=!0),x}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=N;class P extends A.Disposable{get taskShellIntegrationStartSequence(){return this._configurationService.getValue("task.showDecorations")?(0,y.VSCodeSequence)("A")+(0,y.VSCodeSequence)("P","Task=True")+(0,y.VSCodeSequence)("B"):""}get taskShellIntegrationOutputSequence(){return this._configurationService.getValue("task.showDecorations")?(0,y.VSCodeSequence)("C"):""}constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce){super(),this._terminalService=x,this._terminalGroupService=H,this._outputService=W,this._paneCompositeService=U,this._viewsService=$,this._markerService=q,this._modelService=X,this._configurationResolverService=G,this._contextService=Q,this._environmentService=j,this._outputChannelId=K,this._fileService=Y,this._terminalProfileResolverService=ee,this._pathService=ie,this._viewDescriptorService=re,this._logService=oe,this._configurationService=se,this._notificationService=te,this._isRerun=!1,this._terminalCreationQueue=Promise.resolve(),this._hasReconnected=!1,this._onDidReconnectToTerminals=new p.Emitter,this._activeTasks=Object.create(null),this._instances=Object.create(null),this._busyTasks=Object.create(null),this._terminals=Object.create(null),this._idleTaskTerminals=new k.LinkedMap,this._sameTaskTerminals=Object.create(null),this._onDidStateChange=new p.Emitter,this._taskSystemInfoResolver=ce,this._register(this._terminalStatusManager=ne.createInstance(h.TaskTerminalStatus))}get onDidStateChange(){return this._onDidStateChange.event}get onDidReconnectToTerminals(){return this._onDidReconnectToTerminals.event}_log(x){this._appendOutput(x+` `)}_showOutput(){this._outputService.showChannel(this._outputChannelId,!0)}reconnect(x,H){return this._hasReconnected||this._reconnectToTerminals(),this.run(x,H,D.Triggers.reconnect)}run(x,H,W=D.Triggers.command){x=x.clone();const U=x.getRecentlyUsedKey()??"",$=x.runOptions&&x.runOptions.instanceLimit&&this._instances[U]&&this._instances[U].instances<x.runOptions.instanceLimit,q=this._instances[U]?this._instances[U].instances:0;this._currentTask=new N(x,H,W),q>0&&(x.instance=this._instances[U].counter);const X=this.getLastInstance(x),G=X?this._activeTasks[X.getMapKey()]:void 0;if(G&&G.promise&&!$)return this._lastTask=this._currentTask,{kind:2,task:G.task,active:{same:!0,background:x.configurationProperties.isBackground},promise:G.promise};try{const Q={kind:1,task:x,started:{},promise:this._executeTask(x,H,W,new Set,void 0)};return Q.promise.then(j=>{this._lastTask=this._currentTask}),(w.InMemoryTask.is(x)||!this._isTaskEmpty(x))&&(this._instances[U]||(this._instances[U]=new M),this._instances[U].addInstance()),Q}catch(Q){throw Q instanceof D.TaskError?Q:Q instanceof Error?(this._log(Q.message),new D.TaskError(C.default.Error,Q.message,7)):(this._log(Q.toString()),new D.TaskError(C.default.Error,u.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 x=this.run(this._lastTask.task,this._lastTask.resolver);return x.promise.then(H=>{this._isRerun=!1}),x}else return}_showTaskLoadErrors(x){if(x.taskLoadMessages&&x.taskLoadMessages.length>0){x.taskLoadMessages.forEach(W=>{this._log(W+` `)});const H="Show Output";this._notificationService.prompt(C.default.Warning,u.localize(1,null,x._label),[{label:H,run:()=>this._showOutput()}])}}isTaskVisible(x){const H=this._activeTasks[x.getMapKey()];if(!H)return!1;const W=this._terminalService.activeInstance;return!!this._viewsService.getActiveViewWithId(_.TERMINAL_VIEW_ID)&&W?.instanceId===H.terminal.instanceId}revealTask(x){const H=this._activeTasks[x.getMapKey()];if(!H)return!1;const W=this._viewDescriptorService.getViewLocationById(_.TERMINAL_VIEW_ID)===1;return W&&this.isTaskVisible(x)?(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):(W&&(this._previousPanelId=this._paneCompositeService.getActivePaneComposite(1)?.getId(),this._previousPanelId===_.TERMINAL_VIEW_ID&&(this._previousTerminalInstance=this._terminalService.activeInstance??void 0)),this._terminalService.setActiveInstance(H.terminal),(w.CustomTask.is(x)||w.ContributedTask.is(x))&&this._terminalGroupService.showPanel(x.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(x=>!this._activeTasks[x].task.configurationProperties.promptOnClose)}getActiveTasks(){return Object.keys(this._activeTasks).map(x=>this._activeTasks[x].task)}getLastInstance(x){let H;const W=x.getRecentlyUsedKey();return Object.keys(this._activeTasks).forEach(U=>{W&&W===this._activeTasks[U].task.getRecentlyUsedKey()&&(H=this._activeTasks[U].task)}),H}getBusyTasks(){return Object.keys(this._busyTasks).map(x=>this._busyTasks[x])}customExecutionComplete(x,H){return this._activeTasks[x.getMapKey()]?new Promise(U=>{U()}):Promise.reject(new Error("Expected to have a terminal for an custom execution task"))}_removeInstances(x){const H=x.getRecentlyUsedKey()??"";this._instances[H]&&(this._instances[H].removeInstance(),this._instances[H].instances===0&&delete this._instances[H])}_removeFromActiveTasks(x){const H=typeof x=="string"?x:x.getMapKey();if(!this._activeTasks[H])return;const W=this._activeTasks[H];delete this._activeTasks[H],this._removeInstances(W.task)}_fireTaskEvent(x){if(x.__task){const H=this._activeTasks[x.__task.getMapKey()];H&&(H.state=x.kind)}this._onDidStateChange.fire(x)}terminate(x){const H=this._activeTasks[x.getMapKey()];return H?new Promise((W,U)=>{const $=H.terminal;$.onDisposed(X=>{this._fireTaskEvent({kind:"terminated",__task:x,exitReason:X.exitReason})});const q=$.onExit(()=>{const X=H.task;try{q.dispose(),this._fireTaskEvent(w.TaskEvent.create("terminated",X))}catch{}W({success:!0,task:X})});$.dispose()}):Promise.resolve({success:!1,task:void 0})}terminateAll(){const x=[];return Object.keys(this._activeTasks).forEach(H=>{const W=this._activeTasks[H],U=W.terminal;x.push(new Promise(($,q)=>{const X=U.onExit(()=>{const G=W.task;try{X.dispose(),this._fireTaskEvent(w.TaskEvent.create("terminated",G))}catch{}$({success:!0,task:W.task})})})),U.dispose()}),this._activeTasks=Object.create(null),Promise.all(x)}_showDependencyCycleMessage(x){this._log(u.localize(2,null,x._label)),this._showOutput()}async _executeTask(x,H,W,U,$){if(U.has(x.getCommonTaskId()))return this._showDependencyCycleMessage(x),{};this._showTaskLoadErrors(x),$=$??new Map;const q=[];if(x.configurationProperties.dependsOn)for(const X of x.configurationProperties.dependsOn){const G=await H.resolve(X.uri,X.task);if(G){this._adoptConfigurationForDependencyTask(G,x);const Q=G.getMapKey();let j=this._activeTasks[Q]?this._getDependencyPromise(this._activeTasks[Q]):void 0;if(j||(this._fireTaskEvent(w.TaskEvent.create("dependsOnStarted",x)),U.add(x.getCommonTaskId()),j=this._executeDependencyTask(G,H,W,U,$)),q.push(j),x.configurationProperties.dependsOrder==="sequence"){const K=await j;if(K.exitCode===0)j=Promise.resolve(K);else{j=Promise.reject(K);break}}q.push(j)}else this._log(u.localize(3,null,r.isString(X.task)?X.task:JSON.stringify(X.task,void 0,0),X.uri.toString())),this._showOutput()}return(w.ContributedTask.is(x)||w.CustomTask.is(x))&&x.command?Promise.all(q).then(X=>{U.delete(x.getCommonTaskId());for(const G of X)if(G.exitCode!==0)return this._removeInstances(x),{exitCode:G.exitCode};return this._isRerun?this._reexecuteCommand(x,W,$):this._executeCommand(x,W,$)}):Promise.all(q).then(X=>{U.delete(x.getCommonTaskId());for(const G of X)if(G.exitCode!==0)return{exitCode:G.exitCode};return{exitCode:0}})}_createInactiveDependencyPromise(x){return new Promise(H=>{const W=this.onDidStateChange(U=>{U.kind==="inactive"&&U.__task===x&&(W.dispose(),H({exitCode:0}))})})}_adoptConfigurationForDependencyTask(x,H){x.configurationProperties.icon?(x.configurationProperties.icon.id||=H.configurationProperties.icon?.id,x.configurationProperties.icon.color||=H.configurationProperties.icon?.color):x.configurationProperties.icon=H.configurationProperties.icon,x.configurationProperties.hide?x.configurationProperties.hide||=H.configurationProperties.hide:x.configurationProperties.hide=H.configurationProperties.hide}async _getDependencyPromise(x){return!x.task.configurationProperties.isBackground||!x.task.configurationProperties.problemMatchers||x.task.configurationProperties.problemMatchers.length===0?x.promise:x.state==="inactive"?{exitCode:0}:this._createInactiveDependencyPromise(x.task)}async _executeDependencyTask(x,H,W,U,$){if(!x.configurationProperties.isBackground)return this._executeTask(x,H,W,U,$);const q=this._createInactiveDependencyPromise(x);return Promise.race([q,this._executeTask(x,H,W,U,$)])}async _resolveAndFindExecutable(x,H,W,U,$){const q=await this._configurationResolverService.resolveAsync(H,w.CommandString.value(W.command.name));U=U?await this._configurationResolverService.resolveAsync(H,U):void 0;const X=$?await Promise.all($.split(I.delimiter).map(Q=>this._configurationResolverService.resolveAsync(H,Q))):void 0;let G=await x?.findExecutable(q,U,X);return G||(G=I.join(U??"",q)),G}_findUnresolvedVariables(x,H){if(H.size===0)return x;const W=new Set;for(const U of x)H.has(U.substring(2,U.length-1))||W.add(U);return W}_mergeMaps(x,H){for(const W of H)x.has(W[0])||x.set(W[0],W[1])}async _acquireInput(x,H,W,U,$){const q=await this._resolveVariablesFromSet(x,H,W,U,$);return this._fireTaskEvent(w.TaskEvent.create("acquiredInput",W)),q}_resolveVariablesFromSet(x,H,W,U,$){const q=W.command&&W.command.runtime===w.RuntimeType.Process,X=W.command&&W.command.options?W.command.options:void 0,G=X?X.cwd:void 0;let Q;if(X&&X.env){for(const Y of Object.keys(X.env))if(Y.toLowerCase()==="path"){r.isString(X.env[Y])&&(Q=X.env[Y]);break}}const j=this._findUnresolvedVariables(U,$);let K;if(x&&H){const Y={variables:j};return x.platform===3&&q&&(Y.process={name:w.CommandString.value(W.command.name)},G&&(Y.process.cwd=G),Q&&(Y.process.path=Q)),K=x.resolveVariables(H,Y,w.TaskSourceKind.toConfigurationTarget(W._source.kind)).then(async ee=>{if(!!ee){if(this._mergeMaps($,ee.variables),ee.variables=new Map($),q){let ie=w.CommandString.value(W.command.name);x.platform===3&&(ie=await this._resolveAndFindExecutable(x,H,W,G,Q)),ee.variables.set(P.ProcessVarName,ie)}return ee}}),K}else{const Y=new Array;return j.forEach(ee=>Y.push(ee)),new Promise((ee,ie)=>{this._configurationResolverService.resolveWithInteraction(H,Y,"tasks",void 0,w.TaskSourceKind.toConfigurationTarget(W._source.kind)).then(async re=>{if(re){if(this._mergeMaps($,re),re=new Map($),q){let se;b.isWindows?se=await this._resolveAndFindExecutable(x,H,W,G,Q):se=await this._configurationResolverService.resolveAsync(H,w.CommandString.value(W.command.name)),re.set(P.ProcessVarName,se)}ee({variables:re})}else ee(void 0)},re=>{ie(re)})})}}_executeCommand(x,H,W){const U=x.getWorkspaceFolder();let $;if(U)$=this._currentTask.workspaceFolder=U;else{const Q=this._contextService.getWorkspace().folders;$=Q.length>0?Q[0]:void 0}const q=this._currentTask.systemInfo=this._taskSystemInfoResolver($),X=new Set;return this._collectTaskVariables(X,x),this._acquireInput(q,$,x,X,W).then(Q=>Q&&!this._isTaskEmpty(x)?(this._currentTask.resolvedVariables=Q,this._executeInTerminal(x,H,new O($,q,Q.variables,this._configurationResolverService),$)):(this._fireTaskEvent(w.TaskEvent.create("end",x)),Promise.resolve({exitCode:0})),Q=>Promise.reject(Q))}_isTaskEmpty(x){const H=x.command.runtime===w.RuntimeType.CustomExecution;return!(x.command!==void 0&&x.command.runtime&&(H||x.command.name!==void 0))}_reexecuteCommand(x,H,W){const U=this._lastTask;if(!U)return Promise.reject(new Error("No task previously run"));const $=this._currentTask.workspaceFolder=U.workspaceFolder,q=new Set;this._collectTaskVariables(q,x);let X=!0;return q.forEach(G=>{G.substring(2,G.length-1)in U.getVerifiedTask().resolvedVariables&&(X=!1)}),X?(this._currentTask.resolvedVariables=U.getVerifiedTask().resolvedVariables,this._executeInTerminal(x,H,new O(U.getVerifiedTask().workspaceFolder,U.getVerifiedTask().systemInfo,U.getVerifiedTask().resolvedVariables.variables,this._configurationResolverService),$)):this._acquireInput(U.getVerifiedTask().systemInfo,U.getVerifiedTask().workspaceFolder,x,q,W).then(G=>G?(this._currentTask.resolvedVariables=G,this._executeInTerminal(x,H,new O(U.getVerifiedTask().workspaceFolder,U.getVerifiedTask().systemInfo,G.variables,this._configurationResolverService),$)):(this._fireTaskEvent(w.TaskEvent.create("end",x)),{exitCode:0}),G=>Promise.reject(G))}async _executeInTerminal(x,H,W,U){let $,q,X;if(x.configurationProperties.isBackground){const Q=await this._resolveMatchers(W,x.configurationProperties.problemMatchers),j=new v.WatchingProblemCollector(Q,this._markerService,this._modelService,this._fileService);Q.length>0&&!j.isWatching()&&(this._appendOutput(u.localize(4,null,x._label)),this._showOutput());const K=new A.DisposableStore;let Y=0;const ee=x.getMapKey();K.add(j.onDidStateChange(se=>{if(se.kind==="backgroundProcessingBegins")Y++,this._busyTasks[ee]=x,this._fireTaskEvent(w.TaskEvent.create("active",x));else if(se.kind==="backgroundProcessingEnds"&&(Y--,this._busyTasks[ee]&&delete this._busyTasks[ee],this._fireTaskEvent(w.TaskEvent.create("inactive",x)),Y===0&&j.numberOfMatches>0&&j.maxMarkerSeverity&&j.maxMarkerSeverity>=i.MarkerSeverity.Error)){const te=x.command.presentation.reveal;x.command.presentation.revealProblems===w.RevealProblemKind.OnProblem?this._viewsService.openView(f.Markers.MARKERS_VIEW_ID,!0):te===w.RevealKind.Silent&&(this._terminalService.setActiveInstance($),this._terminalGroupService.showPanel(!1))}})),j.aboutToStart();let ie;if([$,q]=await this._createTerminal(x,W,U),q)return Promise.reject(new Error(q.message));if(!$)return Promise.reject(new Error(`Failed to create terminal for task ${x._label}`));this._terminalStatusManager.addTerminal(x,$,j);let re=!1;$.processReady.then(()=>{re||(this._fireTaskEvent(w.TaskEvent.create("processStarted",x,$.processId)),re=!0)},se=>{this._logService.error("Task terminal process never got ready")}),this._fireTaskEvent(w.TaskEvent.create("start",x,$.instanceId));const oe=$.onLineData(se=>{j.processLine(se),ie||(ie=new t.Delayer(3e3)),ie.trigger(()=>{j.forceDelivery(),ie=void 0})});if(X=new Promise((se,te)=>{const Z=$.onExit(ne=>{const ce=typeof ne=="number"?ne:ne?.code;oe.dispose(),Z.dispose();const de=x.getMapKey();if(this._busyTasks[ee]&&delete this._busyTasks[ee],this._removeFromActiveTasks(x),this._fireTaskEvent(w.TaskEvent.create("changed")),ne!==void 0)switch(x.command.presentation.panel){case w.PanelKind.Dedicated:this._sameTaskTerminals[de]=$.instanceId.toString();break;case w.PanelKind.Shared:this._idleTaskTerminals.set(de,$.instanceId.toString(),1);break}if(x.command.presentation.reveal===w.RevealKind.Silent&&(ce!==0||j.numberOfMatches>0&&j.maxMarkerSeverity&&j.maxMarkerSeverity>=i.MarkerSeverity.Error))try{this._terminalService.setActiveInstance($),this._terminalGroupService.showPanel(!1)}catch{}j.done(),j.dispose(),re||(this._fireTaskEvent(w.TaskEvent.create("processStarted",x,$.processId)),re=!0),this._fireTaskEvent(w.TaskEvent.create("processEnded",x,ce??void 0));for(let pe=0;pe<Y;pe++)this._fireTaskEvent(w.TaskEvent.create("inactive",x));Y=0,this._fireTaskEvent(w.TaskEvent.create("end",x)),K.dispose(),se({exitCode:ce??void 0})})}),H===D.Triggers.reconnect&&!!$.xterm){const se=[],te=$.xterm.getBufferReverseIterator(),Z=new RegExp(j.beginPatterns.map(ne=>ne.source).join("|"));for(const ne of te)if(se.push(ne),Z.test(ne))break;for(let ne=se.length-1;ne>=0;ne--)j.processLine(se[ne])}}else{if([$,q]=await this._createTerminal(x,W,U),q)return Promise.reject(new Error(q.message));if(!$)return Promise.reject(new Error(`Failed to create terminal for task ${x._label}`));let Q=!1;$.processReady.then(()=>{Q||(this._fireTaskEvent(w.TaskEvent.create("processStarted",x,$.processId)),Q=!0)},ie=>{}),this._fireTaskEvent(w.TaskEvent.create("start",x,$.instanceId,W.values));const j=x.getMapKey();this._busyTasks[j]=x,this._fireTaskEvent(w.TaskEvent.create("active",x));const K=await this._resolveMatchers(W,x.configurationProperties.problemMatchers),Y=new v.StartStopProblemCollector(K,this._markerService,this._modelService,0,this._fileService);this._terminalStatusManager.addTerminal(x,$,Y);const ee=$.onLineData(ie=>{Y.processLine(ie)});X=new Promise((ie,re)=>{const oe=$.onExit(se=>{const te=typeof se=="number"?se:se?.code;oe.dispose();const Z=x.getMapKey();if(this._removeFromActiveTasks(x),this._fireTaskEvent(w.TaskEvent.create("changed")),se!==void 0)switch(x.command.presentation.panel){case w.PanelKind.Dedicated:this._sameTaskTerminals[Z]=$.instanceId.toString();break;case w.PanelKind.Shared:this._idleTaskTerminals.set(Z,$.instanceId.toString(),1);break}const ne=x.command.presentation.reveal,ce=x.command.presentation.revealProblems;if($&&ce===w.RevealProblemKind.OnProblem&&Y.numberOfMatches>0)this._viewsService.openView(f.Markers.MARKERS_VIEW_ID);else if($&&ne===w.RevealKind.Silent&&(te!==0||Y.numberOfMatches>0&&Y.maxMarkerSeverity&&Y.maxMarkerSeverity>=i.MarkerSeverity.Error))try{this._terminalService.setActiveInstance($),this._terminalGroupService.showPanel(!1)}catch{}setTimeout(()=>{ee.dispose(),Y.done(),Y.dispose()},100),!Q&&$&&(this._fireTaskEvent(w.TaskEvent.create("processStarted",x,$.processId)),Q=!0),this._fireTaskEvent(w.TaskEvent.create("processEnded",x,te??void 0)),this._busyTasks[j]&&delete this._busyTasks[j],this._fireTaskEvent(w.TaskEvent.create("inactive",x)),this._fireTaskEvent(w.TaskEvent.create("end",x)),ie({exitCode:te??void 0})})})}return x.command.presentation&&x.command.presentation.revealProblems===w.RevealProblemKind.Always?this._viewsService.openView(f.Markers.MARKERS_VIEW_ID):x.command.presentation&&x.command.presentation.reveal===w.RevealKind.Always&&(this._terminalService.setActiveInstance($),this._terminalGroupService.showPanel(x.command.presentation.focus)),this._activeTasks[x.getMapKey()]={terminal:$,task:x,promise:X},this._fireTaskEvent(w.TaskEvent.create("changed")),X}_createTerminalName(x){return this._contextService.getWorkbenchState()===3?x.getQualifiedLabel():x.configurationProperties.name||""}async _createShellLaunchConfig(x,H,W,U,$,q,X,G){let Q;const j=x.command.runtime===w.RuntimeType.Shell,K=this._contextService.getWorkbenchState()===3,Y=this._createTerminalName(x),ee=L,ie=x.command.name;if(j){let re;switch(U){case 3:re=1;break;case 1:re=2;break;case 2:default:re=3;break}const oe=await this._terminalProfileResolverService.getDefaultProfile({allowAutomationShell:!0,os:re,remoteAuthority:this._environmentService.remoteAuthority});let se;if(x.configurationProperties.icon?.id)se=g.ThemeIcon.fromId(x.configurationProperties.icon.id);else{const Se=x.configurationProperties.group?m.GroupKind.to(x.configurationProperties.group):void 0;se=(typeof Se=="string"?Se:Se?.kind)==="test"?g.ThemeIcon.fromId(l.Codicon.beaker.id):oe.icon}Q={name:Y,type:ee,executable:oe.path,args:oe.args,env:{...oe.env},icon:se,color:x.configurationProperties.icon?.color||void 0,waitOnExit:G};let te=!1;const Z=x.command.options&&x.command.options.shell;Z&&(Z.executable&&(Z.executable!==Q.executable&&(Q.args=void 0),Q.executable=await this._resolveVariable(W,Z.executable),te=!0),Z.args&&(Q.args=await this._resolveVariables(W,Z.args.slice()))),Q.args===void 0&&(Q.args=[]);const ne=Array.isArray(Q.args)?Q.args.slice(0):[Q.args],ce=[],de=I.posix.basename((await this._pathService.fileURI(Q.executable)).path).toLowerCase(),he=this._buildShellCommandLine(U,de,Z,q,ie,X);let pe=!1;if(U===3){pe=!0;const Se=await this._pathService.userHome();if(de==="cmd.exe"&&($.cwd&&(0,R.isUNC)($.cwd)||!$.cwd&&(0,R.isUNC)(Se.fsPath)))return;de==="powershell.exe"||de==="pwsh.exe"?te||ce.push("-Command"):de==="bash.exe"||de==="zsh.exe"?(pe=!1,te||ce.push("-c")):de==="wsl.exe"?te||ce.push("-e"):te||ce.push("/d","/c")}else if(!te){if(U===1){const Se=this._configurationService.inspect("terminal.integrated.shellArgs.osx");if(Se.user===void 0&&Se.userLocal===void 0&&Se.userLocalValue===void 0&&Se.userRemote===void 0&&Se.userRemoteValue===void 0&&Se.userValue===void 0&&Se.workspace===void 0&&Se.workspaceFolder===void 0&&Se.workspaceFolderValue===void 0&&Se.workspaceValue===void 0){const Ie=ne.indexOf("-l");Ie!==-1&&ne.splice(Ie,1)}}ce.push("-c")}const me=this._addAllArgument(ce,ne);me.push(he),Q.args=pe?me.join(" "):me,x.command.presentation&&x.command.presentation.echo?K&&H?Q.initialText=this.taskShellIntegrationStartSequence+(0,o.formatMessageForTerminal)(u.localize(5,null,H.name,he),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence:Q.initialText=this.taskShellIntegrationStartSequence+(0,o.formatMessageForTerminal)(u.localize(6,null,he),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence:Q.initialText={text:this.taskShellIntegrationStartSequence+this.taskShellIntegrationOutputSequence,trailingNewLine:!1}}else{const re=x.command.runtime!==w.RuntimeType.CustomExecution?w.CommandString.value(q):void 0,oe=j?re:await this._resolveVariable(W,await this._resolveVariable(W,"${"+P.ProcessVarName+"}"));if(Q={name:Y,type:ee,icon:x.configurationProperties.icon?.id?g.ThemeIcon.fromId(x.configurationProperties.icon.id):void 0,color:x.configurationProperties.icon?.color||void 0,executable:oe,args:X.map(se=>r.isString(se)?se:se.value),waitOnExit:G},x.command.presentation&&x.command.presentation.echo){const se=te=>!te||te.length===0?"":r.isString(te)?te:te.join(" ");K&&H?Q.initialText=this.taskShellIntegrationStartSequence+(0,o.formatMessageForTerminal)(u.localize(7,null,H.name,`${Q.executable} ${se(Q.args)}`),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence:Q.initialText=this.taskShellIntegrationStartSequence+(0,o.formatMessageForTerminal)(u.localize(8,null,`${Q.executable} ${se(Q.args)}`),{excludeLeadingNewLine:!0})+this.taskShellIntegrationOutputSequence}else Q.initialText={text:this.taskShellIntegrationStartSequence+this.taskShellIntegrationOutputSequence,trailingNewLine:!1}}if($.cwd){let re=$.cwd;I.isAbsolute(re)||H&&H.uri.scheme===s.Schemas.file&&(re=I.join(H.uri.fsPath,re)),Q.cwd=(0,R.isUNC)(re)?re:S.toLocalResource(d.URI.from({scheme:s.Schemas.file,path:re}),this._environmentService.remoteAuthority,this._pathService.defaultUriScheme)}return $.env&&(Q.env?Q.env={...Q.env,...$.env}:Q.env=$.env),Q.isFeatureTerminal=!0,Q.useShellEnvironment=!0,Q}_addAllArgument(x,H){const W=E.deepClone(H);return x.forEach(U=>{H.every((q,X)=>q.toLowerCase()===U&&H.length>X+1?!H.slice(X+1).every(G=>G.startsWith("-")):q.toLowerCase()!==U)&&W.push(U)}),W}async _reconnectToTerminal(x){if(!!this._reconnectedTerminals)for(let H=0;H<this._reconnectedTerminals.length;H++){const W=this._reconnectedTerminals[H];if((W.shellLaunchConfig.attachPersistentProcess?.reconnectionProperties?.data).lastTask===x.getCommonTaskId())return this._reconnectedTerminals.splice(H,1),W}}async _doCreateTerminal(x,H,W){const U=await this._reconnectToTerminal(x);if(U)return"command"in x&&x.command.presentation&&(U.waitOnExit=B(x.command.presentation,x.configurationProperties)),U.onDisposed(q=>this._fireTaskEvent({kind:"terminated",exitReason:q.exitReason,taskId:x.getRecentlyUsedKey()})),this._logService.trace("reconnected to task and terminal",x._id),U;if(H){for(const q of Object.values(this._terminals))if(q.group===H){this._logService.trace(`Found terminal to split for group ${H}`);const X=q.terminal,G=await this._terminalService.createTerminal({location:{parentTerminal:X},config:W});if(G.onDisposed(Q=>this._fireTaskEvent({kind:"terminated",exitReason:Q.exitReason,taskId:x.getRecentlyUsedKey()})),G)return G}this._logService.trace(`No terminal found to split for group ${H}`)}const $=await this._terminalService.createTerminal({location:a.TerminalLocation.Panel,config:W});return $.onDisposed(q=>this._fireTaskEvent({kind:"terminated",exitReason:q.exitReason,taskId:x.getRecentlyUsedKey()})),$}_reconnectToTerminals(){if(this._hasReconnected){this._logService.trace(`Already reconnected, to ${this._reconnectedTerminals?.length} terminals so returning`);return}if(this._reconnectedTerminals=this._terminalService.getReconnectedTerminals(L)?.filter(x=>!x.isDisposed),this._logService.trace(`Attempting reconnection of ${this._reconnectedTerminals?.length} terminals`),this._reconnectedTerminals?.length){for(const x of this._reconnectedTerminals){const H=x.shellLaunchConfig.attachPersistentProcess?.reconnectionProperties?.data;if(this._logService.getLevel()<=n.LogLevel.Trace&&this._logService.trace(`Reconnecting to task: ${JSON.stringify(H)}`),!H)continue;const W={lastTask:H.lastTask,group:H.group,terminal:x};this._terminals[x.instanceId]=W}this._hasReconnected=!0}else{this._logService.trace("No terminals to reconnect to so returning"),this._hasReconnected=!0;return}}_deleteTaskAndTerminal(x,H){delete this._terminals[x.instanceId],delete this._sameTaskTerminals[H.lastTask],this._idleTaskTerminals.delete(H.lastTask);const W=H.lastTask;this._removeFromActiveTasks(W),this._busyTasks[W]&&delete this._busyTasks[W]}async _createTerminal(x,H,W){const U=H.taskSystemInfo?H.taskSystemInfo.platform:b.platform,$=await this._resolveOptions(H,x.command.options),q=x.command.presentation;if(!q)throw new Error("Task presentation options should not be undefined here.");const X=B(q,x.configurationProperties);let G,Q,j;if(x.command.runtime===w.RuntimeType.CustomExecution)this._currentTask.shellLaunchConfig=j={customPtyImplementation:(Z,ne,ce)=>new T.TerminalProcessExtHostProxy(Z,ne,ce,this._terminalService),waitOnExit:X,name:this._createTerminalName(x),initialText:x.command.presentation&&x.command.presentation.echo?(0,o.formatMessageForTerminal)(u.localize(9,null,x._label),{excludeLeadingNewLine:!0}):void 0,isFeatureTerminal:!0,icon:x.configurationProperties.icon?.id?g.ThemeIcon.fromId(x.configurationProperties.icon.id):void 0,color:x.configurationProperties.icon?.color||void 0};else{const Z=await this._resolveCommandAndArgs(H,x.command);if(G=Z.command,Q=Z.args,this._currentTask.shellLaunchConfig=j=await this._createShellLaunchConfig(x,W,H,U,$,G,Q,X),j===void 0)return[void 0,new D.TaskError(C.default.Error,u.localize(10,null),7)]}const K=q.panel===w.PanelKind.Dedicated,Y=q.panel===w.PanelKind.Shared,ee=q.group,ie=x.getMapKey();let re;if(K){const Z=this._sameTaskTerminals[ie];Z&&(re=this._terminals[Z],delete this._sameTaskTerminals[ie])}else if(Y){let Z=this._idleTaskTerminals.remove(ie);if(!Z)for(const ne of this._idleTaskTerminals.keys()){const ce=this._idleTaskTerminals.get(ne);if(ce&&this._terminals[ce]&&this._terminals[ce].group===ee){Z=this._idleTaskTerminals.remove(ne);break}}Z&&(re=this._terminals[Z])}if(re){if(!j)throw new Error("Task shell launch configuration should not be undefined here.");return re.terminal.scrollToBottom(),await re.terminal.reuseTerminal(j),x.command.presentation&&x.command.presentation.clear&&re.terminal.clearBuffer(),this._terminals[re.terminal.instanceId.toString()].lastTask=ie,[re.terminal,void 0]}this._terminalCreationQueue=this._terminalCreationQueue.then(()=>this._doCreateTerminal(x,ee,j));const oe=await this._terminalCreationQueue;oe.shellLaunchConfig.reconnectionProperties={ownerId:L,data:{lastTask:x.getCommonTaskId(),group:ee,label:x._label,id:x._id}};const se=oe.instanceId.toString(),te={terminal:oe,lastTask:ie,group:ee};return oe.onDisposed(()=>this._deleteTaskAndTerminal(oe,te)),this._terminals[se]=te,[oe,void 0]}_buildShellCommandLine(x,H,W,U,$,q){const X=I.parse(H).name.toLowerCase(),G=this._getQuotingOptions(X,W,x);function Q(te){if(te.length>=2&&(te[0]===G.strong?G.strong:te[0]===G.weak?G.weak:void 0)===te[te.length-1])return!1;let Z;for(let ne=0;ne<te.length;ne++){const ce=te[ne];if(ce===Z)Z=void 0;else{if(Z!==void 0)continue;if(ce===G.escape)ne++;else if(ce===G.strong||ce===G.weak)Z=ce;else if(ce===" ")return!0}}return!1}function j(te,Z){if(Z===w.ShellQuoting.Strong&&G.strong)return[G.strong+te+G.strong,!0];if(Z===w.ShellQuoting.Weak&&G.weak)return[G.weak+te+G.weak,!0];if(Z===w.ShellQuoting.Escape&&G.escape){if(r.isString(G.escape))return[te.replace(/ /g,G.escape+" "),!0];{const ne=[];for(const he of G.escape.charsToEscape)ne.push(`\\${he}`);const ce=new RegExp("["+ne.join(",")+"]","g"),de=G.escape.escapeChar;return[te.replace(ce,he=>de+he),!0]}}return[te,!1]}function K(te){return r.isString(te)?Q(te)?j(te,w.ShellQuoting.Strong):[te,!1]:j(te.value,te.quoting)}if((!q||q.length===0)&&r.isString(U)&&(U===$||Q($)))return U;const Y=[];let ee=!1,ie=!1,re,oe;[re,oe]=K(U),Y.push(re),ee=oe;for(const te of q)[re,oe]=K(te),Y.push(re),ie=ie||oe;let se=Y.join(" ");return x===3&&(X==="cmd"&&ee&&ie?se='"'+se+'"':(X==="powershell"||X==="pwsh")&&ee&&(se="& "+se)),se}_getQuotingOptions(x,H,W){return H&&H.quoting?H.quoting:P._shellQuotes[x]||P._osShellQuotes[b.PlatformToString(W)]}_collectTaskVariables(x,H){if(H.command&&H.command.name&&this._collectCommandVariables(x,H.command,H),this._collectMatcherVariables(x,H.configurationProperties.problemMatchers),H.command.runtime===w.RuntimeType.CustomExecution&&(w.CustomTask.is(H)||w.ContributedTask.is(H))){let W;w.CustomTask.is(H)?W=H._source.config.element:(W=E.deepClone(H.defines),delete W._key,delete W.type),this._collectDefinitionVariables(x,W)}}_collectDefinitionVariables(x,H){if(r.isString(H))this._collectVariables(x,H);else if(Array.isArray(H))H.forEach(W=>this._collectDefinitionVariables(x,W));else if(r.isObject(H))for(const W in H)this._collectDefinitionVariables(x,H[W])}_collectCommandVariables(x,H,W){if(H.runtime===w.RuntimeType.CustomExecution)return;if(H.name===void 0)throw new Error("Command name should never be undefined here.");if(this._collectVariables(x,H.name),H.args?.forEach($=>this._collectVariables(x,$)),W._source.scope!==1&&x.add("${workspaceFolder}"),H.options){const $=H.options;$.cwd&&this._collectVariables(x,$.cwd);const q=$.env;q&&Object.keys(q).forEach(X=>{const G=q[X];r.isString(G)&&this._collectVariables(x,G)}),$.shell&&($.shell.executable&&this._collectVariables(x,$.shell.executable),$.shell.args?.forEach(X=>this._collectVariables(x,X)))}}_collectMatcherVariables(x,H){H==null||H.length===0||H.forEach(W=>{let U;r.isString(W)?W[0]==="$"?U=c.ProblemMatcherRegistry.get(W.substring(1)):U=c.ProblemMatcherRegistry.get(W):U=W,U&&U.filePrefix&&this._collectVariables(x,U.filePrefix)})}_collectVariables(x,H){const W=r.isString(H)?H:H.value,U=/\$\{(.*?)\}/g;let $;do $=U.exec(W),$&&x.add($[0]);while($)}async _resolveCommandAndArgs(x,H){let W=H.args?H.args.slice():[];return W=await this._resolveVariables(x,W),{command:await this._resolveVariable(x,H.name),args:W}}async _resolveVariables(x,H){return Promise.all(H.map(W=>this._resolveVariable(x,W)))}async _resolveMatchers(x,H){if(H==null||H.length===0)return[];const W=[];for(const U of H){let $;if(r.isString(U)?U[0]==="$"?$=c.ProblemMatcherRegistry.get(U.substring(1)):$=c.ProblemMatcherRegistry.get(U):$=U,!$){this._appendOutput(u.localize(11,null));continue}const q=x.taskSystemInfo,X=$.filePrefix!==void 0,G=q!==void 0&&q.uriProvider!==void 0;if(!X&&!G)W.push($);else{const Q=E.deepClone($);G&&q!==void 0&&(Q.uriProvider=q.uriProvider),X&&(Q.filePrefix=await this._resolveVariable(x,Q.filePrefix)),W.push(Q)}}return W}async _resolveVariable(x,H){if(r.isString(H))return x.resolve(H);if(H!==void 0)return{value:await x.resolve(H.value),quoting:H.quoting};throw new Error("Should never try to resolve undefined.")}async _resolveOptions(x,H){if(H==null){let U;try{U=await this._resolveVariable(x,"${workspaceFolder}")}catch{}return{cwd:U}}const W=r.isString(H.cwd)?{cwd:await this._resolveVariable(x,H.cwd)}:{cwd:await this._resolveVariable(x,"${workspaceFolder}")};if(H.env){W.env=Object.create(null);for(const U of Object.keys(H.env)){const $=H.env[U];r.isString($)?W.env[U]=await this._resolveVariable(x,$):W.env[U]=$.toString()}}return W}getSanitizedCommand(x){let H=x.toLowerCase();const W=H.lastIndexOf(I.sep);return W!==-1&&(H=H.substring(W+1)),P.WellKnownCommands[H]?H:"other"}_appendOutput(x){this._outputService.getChannel(this._outputChannelId)?.append(x)}}e.TerminalTaskSystem=P,P.TelemetryEventName="taskService",P.ProcessVarName="__process__",P._shellQuotes={cmd:{strong:'"'},powershell:{escape:{escapeChar:"`",charsToEscape:` "'()`},strong:"'",weak:'"'},bash:{escape:{escapeChar:"\\",charsToEscape:` "'`},strong:"'",weak:'"'},zsh:{escape:{escapeChar:"\\",charsToEscape:` "'`},strong:"'",weak:'"'}},P._osShellQuotes={Linux:P._shellQuotes.bash,Mac:P._shellQuotes.bash,Windows:P._shellQuotes.powershell},P.WellKnownCommands={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};function B(z,x){return(z.close===void 0||z.close===!1)&&(z.reveal!==w.RevealKind.Never||!x.isBackground||z.close===!1)?z.panel===w.PanelKind.New?V(u.localize(12,null)):z.showReuseMessage?V(u.localize(13,null)):!0:!z.close}function V(z){return x=>`${(0,y.VSCodeSequence)("D",x.toString())}${z}`}}),define(ae[672],le([1,0,131,127,16,5,9,39]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalContributionService=e.ITerminalContributionService=e.terminalsExtPoint=void 0,e.terminalsExtPoint=t.ExtensionsRegistry.registerExtensionPoint(p.terminalContributionsDescriptor),e.ITerminalContributionService=(0,A.createDecorator)("terminalContributionsService");class I{get terminalProfiles(){return this._terminalProfiles}get quickFixes(){return this._quickFixes}constructor(){this._terminalProfiles=[],this._quickFixes=[],e.terminalsExtPoint.setHandler(C=>{this._terminalProfiles=(0,R.flatten)(C.map(r=>r.value?.profiles?.filter(u=>b(u)).map(u=>({...u,extensionIdentifier:r.description.identifier.value}))||[])),this._quickFixes=(0,R.flatten)(C.filter(r=>(0,E.isProposedApiEnabled)(r.description,"contribTerminalQuickFixes")).map(r=>r.value.quickFixes?r.value.quickFixes.map(u=>({...u,extensionIdentifier:r.description.identifier.value})):[]))})}}e.TerminalContributionService=I;function b(S){return!S.icon||typeof S.icon=="string"||k.URI.isUri(S.icon)||"light"in S.icon&&"dark"in S.icon&&k.URI.isUri(S.icon.light)&&k.URI.isUri(S.icon.dark)}}),define(ae[2517],le([1,0,35,672]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(p.ITerminalContributionService,p.TerminalContributionService,1)}),define(ae[2518],le([1,0,1966,131]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.walkthroughsExtensionPoint=void 0;const R=(0,t.localize)(0,null);e.walkthroughsExtensionPoint=p.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)},icon:{type:"string",description:(0,t.localize)(4,null)},description:{type:"string",description:(0,t.localize)(5,null)},featuredFor:{type:"array",description:(0,t.localize)(6,null),items:{type:"string"}},when:{type:"string",description:(0,t.localize)(7,null)},steps:{type:"array",description:(0,t.localize)(8,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)(9,null)},title:{type:"string",description:(0,t.localize)(10,null)},description:{type:"string",description:(0,t.localize)(11,null,`[${R}](command:myext.command)`,`[${R}](command:toSide:myext.command)`,`[${R}](https://aka.ms)`)},button:{deprecationMessage:(0,t.localize)(12,null,`[${R}](command:myext.command)`,`[${R}](command:toSide:myext.command)`,`[${R}](https://aka.ms)`)},media:{type:"object",description:(0,t.localize)(13,null),oneOf:[{required:["image","altText"],additionalProperties:!1,properties:{path:{deprecationMessage:(0,t.localize)(14,null)},image:{description:(0,t.localize)(15,null),oneOf:[{type:"string"},{type:"object",required:["dark","light","hc","hcLight"],properties:{dark:{description:(0,t.localize)(16,null),type:"string"},light:{description:(0,t.localize)(17,null),type:"string"},hc:{description:(0,t.localize)(18,null),type:"string"},hcLight:{description:(0,t.localize)(19,null),type:"string"}}}]},altText:{type:"string",description:(0,t.localize)(20,null)}}},{required:["svg","altText"],additionalProperties:!1,properties:{svg:{description:(0,t.localize)(21,null),type:"string"},altText:{type:"string",description:(0,t.localize)(22,null)}}},{required:["markdown"],additionalProperties:!1,properties:{path:{deprecationMessage:(0,t.localize)(23,null)},markdown:{description:(0,t.localize)(24,null),type:"string"}}}]},completionEvents:{description:(0,t.localize)(25,null),type:"array",items:{type:"string",defaultSnippets:[{label:"onCommand",description:(0,t.localize)(26,null),body:"onCommand:${1:commandId}"},{label:"onLink",description:(0,t.localize)(27,null),body:"onLink:${2:linkId}"},{label:"onView",description:(0,t.localize)(28,null),body:"onView:${2:viewId}"},{label:"onSettingChanged",description:(0,t.localize)(29,null),body:"onSettingChanged:${2:settingName}"},{label:"onContext",description:(0,t.localize)(30,null),body:"onContext:${2:key}"},{label:"onExtensionInstalled",description:(0,t.localize)(31,null),body:"onExtensionInstalled:${3:extensionId}"},{label:"onStepSelected",description:(0,t.localize)(32,null),body:"onStepSelected"}]}},doneOn:{description:(0,t.localize)(33,null),deprecationMessage:(0,t.localize)(34,null),type:"object",required:["command"],defaultSnippets:[{body:{command:"$1"}}],properties:{command:{description:(0,t.localize)(35,null),type:"string"}}},when:{type:"string",description:(0,t.localize)(36,null)}}}}}}}})}),define(ae[932],le([1,0,1991,28,18,131,7,15,2,12,16,39]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.commandsExtensionPoint=void 0;const r=[{key:"commandPalette",id:E.MenuId.CommandPalette,description:(0,t.localize)(0,null),supportsSubmenus:!1},{key:"touchBar",id:E.MenuId.TouchBarContext,description:(0,t.localize)(1,null),supportsSubmenus:!1},{key:"editor/title",id:E.MenuId.EditorTitle,description:(0,t.localize)(2,null)},{key:"editor/title/run",id:E.MenuId.EditorTitleRun,description:(0,t.localize)(3,null)},{key:"editor/context",id:E.MenuId.EditorContext,description:(0,t.localize)(4,null)},{key:"editor/context/copy",id:E.MenuId.EditorContextCopy,description:(0,t.localize)(5,null)},{key:"editor/context/share",id:E.MenuId.EditorContextShare,description:(0,t.localize)(6,null),proposed:"contribShareMenu"},{key:"explorer/context",id:E.MenuId.ExplorerContext,description:(0,t.localize)(7,null)},{key:"editor/title/context",id:E.MenuId.EditorTitleContext,description:(0,t.localize)(8,null)},{key:"debug/callstack/context",id:E.MenuId.DebugCallStackContext,description:(0,t.localize)(9,null)},{key:"debug/variables/context",id:E.MenuId.DebugVariablesContext,description:(0,t.localize)(10,null)},{key:"debug/toolBar",id:E.MenuId.DebugToolBar,description:(0,t.localize)(11,null)},{key:"menuBar/home",id:E.MenuId.MenubarHomeMenu,description:(0,t.localize)(12,null),proposed:"contribMenuBarHome",supportsSubmenus:!1},{key:"menuBar/edit/copy",id:E.MenuId.MenubarCopy,description:(0,t.localize)(13,null)},{key:"scm/title",id:E.MenuId.SCMTitle,description:(0,t.localize)(14,null)},{key:"scm/sourceControl",id:E.MenuId.SCMSourceControl,description:(0,t.localize)(15,null)},{key:"scm/resourceState/context",id:E.MenuId.SCMResourceContext,description:(0,t.localize)(16,null)},{key:"scm/resourceFolder/context",id:E.MenuId.SCMResourceFolderContext,description:(0,t.localize)(17,null)},{key:"scm/resourceGroup/context",id:E.MenuId.SCMResourceGroupContext,description:(0,t.localize)(18,null)},{key:"scm/change/title",id:E.MenuId.SCMChangeContext,description:(0,t.localize)(19,null)},{key:"statusBar/remoteIndicator",id:E.MenuId.StatusBarRemoteIndicatorMenu,description:(0,t.localize)(20,null),supportsSubmenus:!1},{key:"view/title",id:E.MenuId.ViewTitle,description:(0,t.localize)(21,null)},{key:"view/item/context",id:E.MenuId.ViewItemContext,description:(0,t.localize)(22,null)},{key:"comments/commentThread/title",id:E.MenuId.CommentThreadTitle,description:(0,t.localize)(23,null)},{key:"comments/commentThread/context",id:E.MenuId.CommentThreadActions,description:(0,t.localize)(24,null),supportsSubmenus:!1},{key:"comments/commentThread/title/context",id:E.MenuId.CommentThreadTitleContext,description:(0,t.localize)(25,null),proposed:"contribCommentPeekContext"},{key:"comments/comment/title",id:E.MenuId.CommentTitle,description:(0,t.localize)(26,null)},{key:"comments/comment/context",id:E.MenuId.CommentActions,description:(0,t.localize)(27,null),supportsSubmenus:!1},{key:"comments/commentThread/comment/context",id:E.MenuId.CommentThreadCommentContext,description:(0,t.localize)(28,null),proposed:"contribCommentPeekContext"},{key:"notebook/toolbar",id:E.MenuId.NotebookToolbar,description:(0,t.localize)(29,null)},{key:"notebook/kernelSource",id:E.MenuId.NotebookKernelSource,description:(0,t.localize)(30,null),proposed:"notebookKernelSource"},{key:"notebook/cell/title",id:E.MenuId.NotebookCellTitle,description:(0,t.localize)(31,null)},{key:"notebook/cell/execute",id:E.MenuId.NotebookCellExecute,description:(0,t.localize)(32,null)},{key:"notebook/cell/executePrimary",id:E.MenuId.NotebookCellExecutePrimary,description:(0,t.localize)(33,null),proposed:"notebookEditor"},{key:"interactive/toolbar",id:E.MenuId.InteractiveToolbar,description:(0,t.localize)(34,null)},{key:"interactive/cell/title",id:E.MenuId.InteractiveCellTitle,description:(0,t.localize)(35,null)},{key:"testing/item/context",id:E.MenuId.TestItem,description:(0,t.localize)(36,null)},{key:"testing/item/gutter",id:E.MenuId.TestItemGutter,description:(0,t.localize)(37,null)},{key:"extension/context",id:E.MenuId.ExtensionContext,description:(0,t.localize)(38,null)},{key:"timeline/title",id:E.MenuId.TimelineTitle,description:(0,t.localize)(39,null)},{key:"timeline/item/context",id:E.MenuId.TimelineItemContext,description:(0,t.localize)(40,null)},{key:"ports/item/context",id:E.MenuId.TunnelContext,description:(0,t.localize)(41,null)},{key:"ports/item/origin/inline",id:E.MenuId.TunnelOriginInline,description:(0,t.localize)(42,null)},{key:"ports/item/port/inline",id:E.MenuId.TunnelPortInline,description:(0,t.localize)(43,null)},{key:"file/newFile",id:E.MenuId.NewFile,description:(0,t.localize)(44,null),supportsSubmenus:!1},{key:"webview/context",id:E.MenuId.WebviewContext,description:(0,t.localize)(45,null)},{key:"file/share",id:E.MenuId.MenubarShare,description:(0,t.localize)(46,null),proposed:"contribShareMenu"},{key:"editor/inlineCompletions/actions",id:E.MenuId.InlineCompletionsActions,description:(0,t.localize)(47,null),supportsSubmenus:!1,proposed:"inlineCompletionsAdditions"},{key:"editor/content",id:E.MenuId.EditorContent,description:(0,t.localize)(48,null),proposed:"contribEditorContentMenu"},{key:"mergeEditor/result/title",id:E.MenuId.MergeInputResultToolbar,description:(0,t.localize)(49,null),proposed:"contribMergeEditorMenus"}];var u;(function(a){function o(O){return typeof O.command=="string"}a.isMenuItem=o;function g(O,N){return typeof O.command!="string"?(N.error((0,t.localize)(50,null,"command")),!1):O.alt&&typeof O.alt!="string"?(N.error((0,t.localize)(51,null,"alt")),!1):O.when&&typeof O.when!="string"?(N.error((0,t.localize)(52,null,"when")),!1):O.group&&typeof O.group!="string"?(N.error((0,t.localize)(53,null,"group")),!1):!0}a.isValidMenuItem=g;function h(O,N){return typeof O.submenu!="string"?(N.error((0,t.localize)(54,null,"submenu")),!1):O.when&&typeof O.when!="string"?(N.error((0,t.localize)(55,null,"when")),!1):O.group&&typeof O.group!="string"?(N.error((0,t.localize)(56,null,"group")),!1):!0}a.isValidSubmenuItem=h;function v(O,N){if(!Array.isArray(O))return N.error((0,t.localize)(57,null)),!1;for(const P of O)if(o(P)){if(!g(P,N))return!1}else if(!h(P,N))return!1;return!0}a.isValidItems=v;function m(O,N){return typeof O!="object"?(N.error((0,t.localize)(58,null)),!1):typeof O.id!="string"?(N.error((0,t.localize)(59,null,"id")),!1):typeof O.label!="string"?(N.error((0,t.localize)(60,null,"label")),!1):!0}a.isValidSubmenu=m;const w={type:"object",required:["command"],properties:{command:{description:(0,t.localize)(61,null),type:"string"},alt:{description:(0,t.localize)(62,null),type:"string"},when:{description:(0,t.localize)(63,null),type:"string"},group:{description:(0,t.localize)(64,null),type:"string"}}},D={type:"object",required:["submenu"],properties:{submenu:{description:(0,t.localize)(65,null),type:"string"},when:{description:(0,t.localize)(66,null),type:"string"},group:{description:(0,t.localize)(67,null),type:"string"}}},y={type:"object",required:["id","label"],properties:{id:{description:(0,t.localize)(68,null),type:"string"},label:{description:(0,t.localize)(69,null),type:"string"},icon:{description:(0,t.localize)(70,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,t.localize)(71,null),type:"string"},dark:{description:(0,t.localize)(72,null),type:"string"}}}]}}};a.menusContribution={description:(0,t.localize)(73,null),type:"object",properties:(0,S.index)(r,O=>O.key,O=>({markdownDescription:O.proposed?(0,t.localize)(74,null,O.proposed,O.description):O.description,type:"array",items:O.supportsSubmenus===!1?w:{oneOf:[w,D]}})),additionalProperties:{description:"Submenu",type:"array",items:{oneOf:[w,D]}}},a.submenusContribution={description:(0,t.localize)(75,null),type:"array",items:y};function T(O,N){return O?(0,p.isFalsyOrWhitespace)(O.command)?(N.error((0,t.localize)(77,null,"command")),!1):!L(O.title,N,"title")||O.shortTitle&&!L(O.shortTitle,N,"shortTitle")?!1:O.enablement&&typeof O.enablement!="string"?(N.error((0,t.localize)(78,null,"precondition")),!1):!(O.category&&!L(O.category,N,"category")||!_(O.icon,N)):(N.error((0,t.localize)(76,null)),!1)}a.isValidCommand=T;function _(O,N){return typeof O>"u"||typeof O=="string"||typeof O.dark=="string"&&typeof O.light=="string"?!0:(N.error((0,t.localize)(79,null)),!1)}function L(O,N,P){return typeof O>"u"?(N.error((0,t.localize)(80,null,P)),!1):typeof O=="string"&&(0,p.isFalsyOrWhitespace)(O)?(N.error((0,t.localize)(81,null,P)),!1):typeof O!="string"&&((0,p.isFalsyOrWhitespace)(O.original)||(0,p.isFalsyOrWhitespace)(O.value))?(N.error((0,t.localize)(82,null,`${P}.value`,`${P}.original`)),!1):!0}const M={type:"object",required:["command","title"],properties:{command:{description:(0,t.localize)(83,null),type:"string"},title:{description:(0,t.localize)(84,null),type:"string"},shortTitle:{markdownDescription:(0,t.localize)(85,null),type:"string"},category:{description:(0,t.localize)(86,null),type:"string"},enablement:{description:(0,t.localize)(87,null),type:"string"},icon:{description:(0,t.localize)(88,null),anyOf:[{type:"string"},{type:"object",properties:{light:{description:(0,t.localize)(89,null),type:"string"},dark:{description:(0,t.localize)(90,null),type:"string"}}}]}}};a.commandsContribution={description:(0,t.localize)(91,null),oneOf:[M,{type:"array",items:M}]}})(u||(u={}));const i=new I.DisposableStore;e.commandsExtensionPoint=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"commands",jsonSchema:u.commandsContribution}),e.commandsExtensionPoint.setHandler(a=>{function o(g,h){if(!u.isValidCommand(g,h.collector))return;const{icon:v,enablement:m,category:w,title:D,shortTitle:y,command:T}=g;let _;v&&(typeof v=="string"?_=b.ThemeIcon.fromString(v)??{dark:R.joinPath(h.description.extensionLocation,v),light:R.joinPath(h.description.extensionLocation,v)}:_={dark:R.joinPath(h.description.extensionLocation,v.dark),light:R.joinPath(h.description.extensionLocation,v.light)}),E.MenuRegistry.getCommand(T)&&h.collector.info((0,t.localize)(92,null,g.command)),i.add(E.MenuRegistry.addCommand({id:T,title:D,source:h.description.displayName??h.description.name,shortTitle:y,tooltip:D,category:w,precondition:k.ContextKeyExpr.deserialize(m),icon:_}))}i.clear();for(const g of a){const{value:h}=g;if(Array.isArray(h))for(const v of h)o(v,g);else o(h,g)}});const f=new Map,c=A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"submenus",jsonSchema:u.submenusContribution});c.setHandler(a=>{f.clear();for(const o of a){const{value:g,collector:h}=o;for(const[,v]of Object.entries(g)){if(!u.isValidSubmenu(v,h))continue;if(!v.id){h.warn((0,t.localize)(93,null,v.id));continue}if(f.has(v.id)){h.info((0,t.localize)(94,null,v.id));continue}if(!v.label){h.warn((0,t.localize)(95,null,v.label));continue}let m;v.icon&&(typeof v.icon=="string"?m=b.ThemeIcon.fromString(v.icon)||{dark:R.joinPath(o.description.extensionLocation,v.icon)}:m={dark:R.joinPath(o.description.extensionLocation,v.icon.dark),light:R.joinPath(o.description.extensionLocation,v.icon.light)});const w={id:E.MenuId.for(`api:${v.id}`),label:v.label,icon:m};f.set(v.id,w)}}});const l=new Map(r.map(a=>[a.key,a])),s=new I.DisposableStore,d=new Map;A.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"menus",jsonSchema:u.menusContribution,deps:[c]}).setHandler(a=>{s.clear(),d.clear();for(const o of a){const{value:g,collector:h}=o;for(const v of Object.entries(g)){if(!u.isValidItems(v[1],h))continue;let m=l.get(v[0]);if(!m){const w=f.get(v[0]);w&&(m={key:v[0],id:w.id,description:""})}if(!!m){if(m.proposed&&!(0,C.isProposedApiEnabled)(o.description,m.proposed)){h.error((0,t.localize)(96,null,v[0],m.proposed,o.description.identifier.value));continue}for(const w of v[1]){let D;if(u.isMenuItem(w)){const y=E.MenuRegistry.getCommand(w.command),T=w.alt&&E.MenuRegistry.getCommand(w.alt)||void 0;if(!y){h.error((0,t.localize)(97,null,w.command));continue}w.alt&&!T&&h.warn((0,t.localize)(98,null,w.alt)),w.command===w.alt&&h.info((0,t.localize)(99,null)),D={command:y,alt:T,group:void 0,order:void 0,when:void 0}}else{if(m.supportsSubmenus===!1){h.error((0,t.localize)(100,null));continue}const y=f.get(w.submenu);if(!y){h.error((0,t.localize)(101,null,w.submenu));continue}let T=d.get(m.id.id);if(T||(T=new Set,d.set(m.id.id,T)),T.has(y.id.id)){h.warn((0,t.localize)(102,null,w.submenu,v[0]));continue}T.add(y.id.id),D={submenu:y.id,icon:y.icon,title:y.label,group:void 0,order:void 0,when:void 0}}if(w.group){const y=w.group.lastIndexOf("@");y>0?(D.group=w.group.substr(0,y),D.order=Number(w.group.substr(y+1))||void 0):D.group=w.group}D.when=k.ContextKeyExpr.deserialize(w.when),s.add(E.MenuRegistry.appendMenuItem(m.id,D))}}}}})}),define(ae[2519],le([1,0,115,2016,306]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dedupExtensions=void 0;function A(k,E,I,b){const S=new Map;k.forEach(r=>{const u=t.ExtensionIdentifier.toKey(r.identifier),i=S.get(u);i&&b.warn((0,p.localize)(0,null,i.extensionLocation.fsPath,r.extensionLocation.fsPath)),S.set(u,r)}),E.forEach(r=>{const u=t.ExtensionIdentifier.toKey(r.identifier),i=S.get(u);if(i)if(i.isBuiltin){if(R.gte(i.version,r.version)){b.warn(`Skipping extension ${r.extensionLocation.path} in favour of the builtin extension ${i.extensionLocation.path}.`);return}r.isBuiltin=!0}else b.warn((0,p.localize)(1,null,i.extensionLocation.fsPath,r.extensionLocation.fsPath));else if(r.isBuiltin){b.warn(`Skipping obsolete builtin extension ${r.extensionLocation.path}`);return}S.set(u,r)}),I.forEach(r=>{b.info((0,p.localize)(2,null,r.extensionLocation.fsPath));const u=t.ExtensionIdentifier.toKey(r.identifier),i=S.get(u);i&&i.isBuiltin&&(r.isBuiltin=!0),S.set(u,r)});const C=[];return S.forEach(r=>C.push(r)),C}e.dedupExtensions=A}),define(ae[2520],le([1,0,21]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CanceledLazyPromise=e.LazyPromise=void 0;class p{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((k,E)=>{this._actualOk=k,this._actualErr=E,this._hasValue&&this._actualOk(this._value),this._hasErr&&this._actualErr(this._err)})),this._actual}resolveOk(k){this._hasValue||this._hasErr||(this._hasValue=!0,this._value=k,this._actual&&this._actualOk(k))}resolveErr(k){this._hasValue||this._hasErr||(this._hasErr=!0,this._err=k,this._actual?this._actualErr(k):(0,t.onUnexpectedError)(k))}then(k,E){return this._ensureActual().then(k,E)}catch(k){return this._ensureActual().then(void 0,k)}finally(k){return this._ensureActual().finally(k)}}e.LazyPromise=p;class R extends p{constructor(){super(),this._hasErr=!0,this._err=new t.CancellationError}}e.CanceledLazyPromise=R}),define(ae[349],le([1,0]),function(J,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 p=[];function R(E){const I=new t(E);return p[I.nid]=I,I}e.createProxyIdentifier=R;function A(E){return p[E].sid}e.getStringIdentifierForProxy=A;class k{constructor(I){this.value=I}}e.SerializableObjectWithBuffers=k}),define(ae[67],le([1,0,349]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostContext=e.MainContext=e.ExtHostTestingResource=e.ISuggestResultDtoField=e.ISuggestDataDtoField=e.IdObject=e.CandidatePortSource=e.NotebookEditorRevealType=e.CellOutputKind=e.WebviewMessageArrayBufferViewType=e.WebviewEditorCapabilities=e.TabModelOperationKind=e.TabInputKind=e.TextEditorRevealType=void 0;var p;(function(f){f[f.Default=0]="Default",f[f.InCenter=1]="InCenter",f[f.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",f[f.AtTop=3]="AtTop"})(p=e.TextEditorRevealType||(e.TextEditorRevealType={}));var R;(function(f){f[f.UnknownInput=0]="UnknownInput",f[f.TextInput=1]="TextInput",f[f.TextDiffInput=2]="TextDiffInput",f[f.TextMergeInput=3]="TextMergeInput",f[f.NotebookInput=4]="NotebookInput",f[f.NotebookDiffInput=5]="NotebookDiffInput",f[f.CustomEditorInput=6]="CustomEditorInput",f[f.WebviewEditorInput=7]="WebviewEditorInput",f[f.TerminalEditorInput=8]="TerminalEditorInput",f[f.InteractiveEditorInput=9]="InteractiveEditorInput"})(R=e.TabInputKind||(e.TabInputKind={}));var A;(function(f){f[f.TAB_OPEN=0]="TAB_OPEN",f[f.TAB_CLOSE=1]="TAB_CLOSE",f[f.TAB_UPDATE=2]="TAB_UPDATE",f[f.TAB_MOVE=3]="TAB_MOVE"})(A=e.TabModelOperationKind||(e.TabModelOperationKind={}));var k;(function(f){f[f.Editable=0]="Editable",f[f.SupportsHotExit=1]="SupportsHotExit"})(k=e.WebviewEditorCapabilities||(e.WebviewEditorCapabilities={}));var E;(function(f){f[f.Int8Array=1]="Int8Array",f[f.Uint8Array=2]="Uint8Array",f[f.Uint8ClampedArray=3]="Uint8ClampedArray",f[f.Int16Array=4]="Int16Array",f[f.Uint16Array=5]="Uint16Array",f[f.Int32Array=6]="Int32Array",f[f.Uint32Array=7]="Uint32Array",f[f.Float32Array=8]="Float32Array",f[f.Float64Array=9]="Float64Array",f[f.BigInt64Array=10]="BigInt64Array",f[f.BigUint64Array=11]="BigUint64Array"})(E=e.WebviewMessageArrayBufferViewType||(e.WebviewMessageArrayBufferViewType={}));var I;(function(f){f[f.Text=1]="Text",f[f.Error=2]="Error",f[f.Rich=3]="Rich"})(I=e.CellOutputKind||(e.CellOutputKind={}));var b;(function(f){f[f.Default=0]="Default",f[f.InCenter=1]="InCenter",f[f.InCenterIfOutsideViewport=2]="InCenterIfOutsideViewport",f[f.AtTop=3]="AtTop"})(b=e.NotebookEditorRevealType||(e.NotebookEditorRevealType={}));var S;(function(f){f[f.None=0]="None",f[f.Process=1]="Process",f[f.Output=2]="Output"})(S=e.CandidatePortSource||(e.CandidatePortSource={}));class C{static mixin(c){return c._id=C._n++,c}}e.IdObject=C,C._n=0;var r;(function(f){f.label="a",f.kind="b",f.detail="c",f.documentation="d",f.sortText="e",f.filterText="f",f.preselect="g",f.insertText="h",f.insertTextRules="i",f.range="j",f.commitCharacters="k",f.additionalTextEdits="l",f.kindModifier="m",f.commandIdent="n",f.commandId="o",f.commandArguments="p"})(r=e.ISuggestDataDtoField||(e.ISuggestDataDtoField={}));var u;(function(f){f.defaultRanges="a",f.completions="b",f.isIncomplete="c",f.duration="d"})(u=e.ISuggestResultDtoField||(e.ISuggestResultDtoField={}));var i;(function(f){f[f.Workspace=0]="Workspace",f[f.TextDocument=1]="TextDocument"})(i=e.ExtHostTestingResource||(e.ExtHostTestingResource={})),e.MainContext={MainThreadAuthentication:(0,t.createProxyIdentifier)("MainThreadAuthentication"),MainThreadBulkEdits:(0,t.createProxyIdentifier)("MainThreadBulkEdits"),MainThreadClipboard:(0,t.createProxyIdentifier)("MainThreadClipboard"),MainThreadCommands:(0,t.createProxyIdentifier)("MainThreadCommands"),MainThreadComments:(0,t.createProxyIdentifier)("MainThreadComments"),MainThreadConfiguration:(0,t.createProxyIdentifier)("MainThreadConfiguration"),MainThreadConsole:(0,t.createProxyIdentifier)("MainThreadConsole"),MainThreadDebugService:(0,t.createProxyIdentifier)("MainThreadDebugService"),MainThreadDecorations:(0,t.createProxyIdentifier)("MainThreadDecorations"),MainThreadDiagnostics:(0,t.createProxyIdentifier)("MainThreadDiagnostics"),MainThreadDialogs:(0,t.createProxyIdentifier)("MainThreadDiaglogs"),MainThreadDocuments:(0,t.createProxyIdentifier)("MainThreadDocuments"),MainThreadDocumentContentProviders:(0,t.createProxyIdentifier)("MainThreadDocumentContentProviders"),MainThreadTextEditors:(0,t.createProxyIdentifier)("MainThreadTextEditors"),MainThreadEditorInsets:(0,t.createProxyIdentifier)("MainThreadEditorInsets"),MainThreadEditorTabs:(0,t.createProxyIdentifier)("MainThreadEditorTabs"),MainThreadErrors:(0,t.createProxyIdentifier)("MainThreadErrors"),MainThreadTreeViews:(0,t.createProxyIdentifier)("MainThreadTreeViews"),MainThreadDownloadService:(0,t.createProxyIdentifier)("MainThreadDownloadService"),MainThreadKeytar:(0,t.createProxyIdentifier)("MainThreadKeytar"),MainThreadLanguageFeatures:(0,t.createProxyIdentifier)("MainThreadLanguageFeatures"),MainThreadLanguages:(0,t.createProxyIdentifier)("MainThreadLanguages"),MainThreadLogger:(0,t.createProxyIdentifier)("MainThreadLogger"),MainThreadMessageService:(0,t.createProxyIdentifier)("MainThreadMessageService"),MainThreadOutputService:(0,t.createProxyIdentifier)("MainThreadOutputService"),MainThreadProgress:(0,t.createProxyIdentifier)("MainThreadProgress"),MainThreadQuickOpen:(0,t.createProxyIdentifier)("MainThreadQuickOpen"),MainThreadStatusBar:(0,t.createProxyIdentifier)("MainThreadStatusBar"),MainThreadSecretState:(0,t.createProxyIdentifier)("MainThreadSecretState"),MainThreadStorage:(0,t.createProxyIdentifier)("MainThreadStorage"),MainThreadTelemetry:(0,t.createProxyIdentifier)("MainThreadTelemetry"),MainThreadTerminalService:(0,t.createProxyIdentifier)("MainThreadTerminalService"),MainThreadWebviews:(0,t.createProxyIdentifier)("MainThreadWebviews"),MainThreadWebviewPanels:(0,t.createProxyIdentifier)("MainThreadWebviewPanels"),MainThreadWebviewViews:(0,t.createProxyIdentifier)("MainThreadWebviewViews"),MainThreadCustomEditors:(0,t.createProxyIdentifier)("MainThreadCustomEditors"),MainThreadUrls:(0,t.createProxyIdentifier)("MainThreadUrls"),MainThreadUriOpeners:(0,t.createProxyIdentifier)("MainThreadUriOpeners"),MainThreadWorkspace:(0,t.createProxyIdentifier)("MainThreadWorkspace"),MainThreadFileSystem:(0,t.createProxyIdentifier)("MainThreadFileSystem"),MainThreadExtensionService:(0,t.createProxyIdentifier)("MainThreadExtensionService"),MainThreadSCM:(0,t.createProxyIdentifier)("MainThreadSCM"),MainThreadSearch:(0,t.createProxyIdentifier)("MainThreadSearch"),MainThreadTask:(0,t.createProxyIdentifier)("MainThreadTask"),MainThreadWindow:(0,t.createProxyIdentifier)("MainThreadWindow"),MainThreadLabelService:(0,t.createProxyIdentifier)("MainThreadLabelService"),MainThreadNotebook:(0,t.createProxyIdentifier)("MainThreadNotebook"),MainThreadNotebookDocuments:(0,t.createProxyIdentifier)("MainThreadNotebookDocumentsShape"),MainThreadNotebookEditors:(0,t.createProxyIdentifier)("MainThreadNotebookEditorsShape"),MainThreadNotebookKernels:(0,t.createProxyIdentifier)("MainThreadNotebookKernels"),MainThreadNotebookRenderers:(0,t.createProxyIdentifier)("MainThreadNotebookRenderers"),MainThreadInteractive:(0,t.createProxyIdentifier)("MainThreadInteractive"),MainThreadTheming:(0,t.createProxyIdentifier)("MainThreadTheming"),MainThreadTunnelService:(0,t.createProxyIdentifier)("MainThreadTunnelService"),MainThreadTimeline:(0,t.createProxyIdentifier)("MainThreadTimeline"),MainThreadTesting:(0,t.createProxyIdentifier)("MainThreadTesting"),MainThreadLocalization:(0,t.createProxyIdentifier)("MainThreadLocalizationShape")},e.ExtHostContext={ExtHostCommands:(0,t.createProxyIdentifier)("ExtHostCommands"),ExtHostConfiguration:(0,t.createProxyIdentifier)("ExtHostConfiguration"),ExtHostDiagnostics:(0,t.createProxyIdentifier)("ExtHostDiagnostics"),ExtHostDebugService:(0,t.createProxyIdentifier)("ExtHostDebugService"),ExtHostDecorations:(0,t.createProxyIdentifier)("ExtHostDecorations"),ExtHostDocumentsAndEditors:(0,t.createProxyIdentifier)("ExtHostDocumentsAndEditors"),ExtHostDocuments:(0,t.createProxyIdentifier)("ExtHostDocuments"),ExtHostDocumentContentProviders:(0,t.createProxyIdentifier)("ExtHostDocumentContentProviders"),ExtHostDocumentSaveParticipant:(0,t.createProxyIdentifier)("ExtHostDocumentSaveParticipant"),ExtHostEditors:(0,t.createProxyIdentifier)("ExtHostEditors"),ExtHostTreeViews:(0,t.createProxyIdentifier)("ExtHostTreeViews"),ExtHostFileSystem:(0,t.createProxyIdentifier)("ExtHostFileSystem"),ExtHostFileSystemInfo:(0,t.createProxyIdentifier)("ExtHostFileSystemInfo"),ExtHostFileSystemEventService:(0,t.createProxyIdentifier)("ExtHostFileSystemEventService"),ExtHostLanguages:(0,t.createProxyIdentifier)("ExtHostLanguages"),ExtHostLanguageFeatures:(0,t.createProxyIdentifier)("ExtHostLanguageFeatures"),ExtHostQuickOpen:(0,t.createProxyIdentifier)("ExtHostQuickOpen"),ExtHostExtensionService:(0,t.createProxyIdentifier)("ExtHostExtensionService"),ExtHostLogLevelServiceShape:(0,t.createProxyIdentifier)("ExtHostLogLevelServiceShape"),ExtHostTerminalService:(0,t.createProxyIdentifier)("ExtHostTerminalService"),ExtHostSCM:(0,t.createProxyIdentifier)("ExtHostSCM"),ExtHostSearch:(0,t.createProxyIdentifier)("ExtHostSearch"),ExtHostTask:(0,t.createProxyIdentifier)("ExtHostTask"),ExtHostWorkspace:(0,t.createProxyIdentifier)("ExtHostWorkspace"),ExtHostWindow:(0,t.createProxyIdentifier)("ExtHostWindow"),ExtHostWebviews:(0,t.createProxyIdentifier)("ExtHostWebviews"),ExtHostWebviewPanels:(0,t.createProxyIdentifier)("ExtHostWebviewPanels"),ExtHostCustomEditors:(0,t.createProxyIdentifier)("ExtHostCustomEditors"),ExtHostWebviewViews:(0,t.createProxyIdentifier)("ExtHostWebviewViews"),ExtHostEditorInsets:(0,t.createProxyIdentifier)("ExtHostEditorInsets"),ExtHostEditorTabs:(0,t.createProxyIdentifier)("ExtHostEditorTabs"),ExtHostProgress:(0,t.createProxyIdentifier)("ExtHostProgress"),ExtHostComments:(0,t.createProxyIdentifier)("ExtHostComments"),ExtHostSecretState:(0,t.createProxyIdentifier)("ExtHostSecretState"),ExtHostStorage:(0,t.createProxyIdentifier)("ExtHostStorage"),ExtHostUrls:(0,t.createProxyIdentifier)("ExtHostUrls"),ExtHostUriOpeners:(0,t.createProxyIdentifier)("ExtHostUriOpeners"),ExtHostOutputService:(0,t.createProxyIdentifier)("ExtHostOutputService"),ExtHosLabelService:(0,t.createProxyIdentifier)("ExtHostLabelService"),ExtHostNotebook:(0,t.createProxyIdentifier)("ExtHostNotebook"),ExtHostNotebookDocuments:(0,t.createProxyIdentifier)("ExtHostNotebookDocuments"),ExtHostNotebookEditors:(0,t.createProxyIdentifier)("ExtHostNotebookEditors"),ExtHostNotebookKernels:(0,t.createProxyIdentifier)("ExtHostNotebookKernels"),ExtHostNotebookRenderers:(0,t.createProxyIdentifier)("ExtHostNotebookRenderers"),ExtHostInteractive:(0,t.createProxyIdentifier)("ExtHostInteractive"),ExtHostTheming:(0,t.createProxyIdentifier)("ExtHostTheming"),ExtHostTunnelService:(0,t.createProxyIdentifier)("ExtHostTunnelService"),ExtHostAuthentication:(0,t.createProxyIdentifier)("ExtHostAuthentication"),ExtHostTimeline:(0,t.createProxyIdentifier)("ExtHostTimeline"),ExtHostTesting:(0,t.createProxyIdentifier)("ExtHostTesting"),ExtHostTelemetry:(0,t.createProxyIdentifier)("ExtHostTelemetry"),ExtHostLocalization:(0,t.createProxyIdentifier)("ExtHostLocalization")}}),define(ae[673],le([1,0,165,145,25,57,67,386,77]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reviveWorkspaceEditDto=e.MainThreadBulkEdits=void 0;let b=class{constructor(r,u,i,f){this._bulkEditService=u,this._logService=i,this._uriIdentService=f}dispose(){}$tryApplyWorkspaceEdit(r,u,i){const f=S(r,this._uriIdentService);return this._bulkEditService.apply(f,{undoRedoGroupId:u,respectAutoSaveConfig:i}).then(c=>c.isApplied,c=>(this._logService.warn(`IGNORING workspace edit: ${c}`),!1))}};b=we([(0,I.extHostNamedCustomer)(k.MainContext.MainThreadBulkEdits),F(1,p.IBulkEditService),F(2,R.ILogService),F(3,A.IUriIdentityService)],b),e.MainThreadBulkEdits=b;function S(C,r){if(!C||!C.edits)return C;const u=(0,t.revive)(C);for(const i of u.edits)p.ResourceTextEdit.is(i)&&(i.resource=r.asCanonicalUri(i.resource)),p.ResourceFileEdit.is(i)&&(i.newResource=i.newResource&&r.asCanonicalUri(i.newResource),i.oldResource=i.oldResource&&r.asCanonicalUri(i.oldResource)),E.ResourceNotebookCellEdit.is(i)&&(i.resource=r.asCanonicalUri(i.resource));return C}e.reviveWorkspaceEditDto=S}),define(ae[2521],le([1,0,77,67,93]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadClipboard=void 0;let A=class{constructor(E,I){this._clipboardService=I}dispose(){}$readText(){return this._clipboardService.readText()}$writeText(E){return this._clipboardService.writeText(E)}};A=we([(0,t.extHostNamedCustomer)(p.MainContext.MainThreadClipboard),F(1,R.IClipboardService)],A),e.MainThreadClipboard=A}),define(ae[2522],le([1,0,2,165,31,39,77,349,67]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadCommands=void 0;let b=class{constructor(r,u,i){this._commandService=u,this._extensionService=i,this._commandRegistrations=new t.DisposableMap,this._proxy=r.getProxy(I.ExtHostContext.ExtHostCommands),this._generateCommandsDocumentationRegistration=R.CommandsRegistry.registerCommand("_generateCommandsDocumentation",()=>this._generateCommandsDocumentation())}dispose(){this._commandRegistrations.dispose(),this._generateCommandsDocumentationRegistration.dispose()}async _generateCommandsDocumentation(){const r=await this._proxy.$getContributedCommandHandlerDescriptions(),u=R.CommandsRegistry.getCommands();for(const[f,c]of u)c.description&&(r[f]=c.description);const i=[];for(const f in r)i.push("`"+f+"` - "+S(r[f]));console.log(i.join(` `))}$registerCommand(r){this._commandRegistrations.set(r,R.CommandsRegistry.registerCommand(r,(u,...i)=>this._proxy.$executeContributedCommand(r,...i).then(f=>(0,p.revive)(f))))}$unregisterCommand(r){this._commandRegistrations.deleteAndDispose(r)}$fireCommandActivationEvent(r){const u=`onCommand:${r}`;this._extensionService.activationEventIsDone(u)||this._extensionService.activateByEvent(u)}async $executeCommand(r,u,i){u instanceof E.SerializableObjectWithBuffers&&(u=u.value);for(let f=0;f<u.length;f++)u[f]=(0,p.revive)(u[f]);if(i&&u.length>0&&!R.CommandsRegistry.getCommand(r))throw await this._extensionService.activateByEvent(`onCommand:${r}`),new Error("$executeCommand:retry");return this._commandService.executeCommand(r,...u)}$getCommands(){return Promise.resolve([...R.CommandsRegistry.getCommands().keys()])}};b=we([(0,k.extHostNamedCustomer)(I.MainContext.MainThreadCommands),F(1,R.ICommandService),F(2,A.IExtensionService)],b),e.MainThreadCommands=b;function S(C){if(typeof C=="string")return C;{const r=[C.description];if(r.push(` `),C.args)for(const u of C.args)r.push(`* _${u.name}_ - ${u.description||""} `);return C.returns&&r.push(`* _(returns)_ - ${C.returns}`),r.push(` `),r.join("")}}}),define(ae[2523],le([1,0,9,17,55,34,67,77,8,81]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConfiguration=void 0;let S=class{constructor(r,u,i,f){this._workspaceContextService=u,this.configurationService=i,this._environmentService=f;const c=r.getProxy(k.ExtHostContext.ExtHostConfiguration);c.$initializeConfiguration(this._getConfigurationData()),this._configurationListener=i.onDidChangeConfiguration(l=>{c.$acceptConfigurationChanged(this._getConfigurationData(),l.change)})}_getConfigurationData(){const r={...this.configurationService.getConfigurationData(),configurationScopes:[]};return(!this._environmentService.isBuilt||this._environmentService.isExtensionDevelopment)&&(r.configurationScopes=(0,R.getScopes)()),r}dispose(){this._configurationListener.dispose()}$updateConfigurationOption(r,u,i,f,c){return f={resource:f?.resource?t.URI.revive(f.resource):void 0,overrideIdentifier:f?.overrideIdentifier},this.writeConfiguration(r,u,i,f,c)}$removeConfigurationOption(r,u,i,f){return i={resource:i?.resource?t.URI.revive(i.resource):void 0,overrideIdentifier:i?.overrideIdentifier},this.writeConfiguration(r,u,void 0,i,f)}writeConfiguration(r,u,i,f,c){r=r??this.deriveConfigurationTarget(u,f);const l=this.configurationService.inspect(u,f);switch(r){case 8:return this._updateValue(u,i,r,l?.memory?.override,f,c);case 6:return this._updateValue(u,i,r,l?.workspaceFolder?.override,f,c);case 5:return this._updateValue(u,i,r,l?.workspace?.override,f,c);case 4:return this._updateValue(u,i,r,l?.userRemote?.override,f,c);default:return this._updateValue(u,i,r,l?.userLocal?.override,f,c)}}_updateValue(r,u,i,f,c,l){return c=l===!0?c:l===!1?{resource:c.resource}:c.overrideIdentifier&&f!==void 0?c:{resource:c.resource},this.configurationService.updateValue(r,u,c,i,!0)}deriveConfigurationTarget(r,u){if(u.resource&&this._workspaceContextService.getWorkbenchState()===3){const i=p.Registry.as(R.Extensions.Configuration).getConfigurationProperties();if(i[r]&&(i[r].scope===4||i[r].scope===5))return 6}return 5}};S=we([(0,E.extHostNamedCustomer)(k.MainContext.MainThreadConfiguration),F(1,A.IWorkspaceContextService),F(2,I.IConfigurationService),F(3,b.IEnvironmentService)],S),e.MainThreadConfiguration=S}),define(ae[2524],le([1,0,2,9,87,67,77,68,2297,246,21]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDebugService=void 0;let C=class{constructor(i,f){this.debugService=f,this._toDispose=new t.DisposableStore,this._debugAdaptersHandleCounter=1,this._proxy=i.getProxy(A.ExtHostContext.ExtHostDebugService),this._toDispose.add(f.onDidNewSession(c=>{this._proxy.$acceptDebugSessionStarted(this.getSessionDto(c)),this._toDispose.add(c.onDidChangeName(l=>{this._proxy.$acceptDebugSessionNameChanged(this.getSessionDto(c),l)}))})),this._toDispose.add(f.onWillNewSession(c=>{this._toDispose.add(c.onDidCustomEvent(l=>this._proxy.$acceptDebugSessionCustomEvent(this.getSessionDto(c),l)))})),this._toDispose.add(f.onDidEndSession(c=>{this._proxy.$acceptDebugSessionTerminated(this.getSessionDto(c)),this._sessions.delete(c.getId())})),this._toDispose.add(f.getViewModel().onDidFocusSession(c=>{this._proxy.$acceptDebugSessionActiveChanged(this.getSessionDto(c))})),this._debugAdapters=new Map,this._debugConfigurationProviders=new Map,this._debugAdapterDescriptorFactories=new Map,this._sessions=new Set}dispose(){this._toDispose.dispose()}createDebugAdapter(i){const f=this._debugAdaptersHandleCounter++,c=new r(this,f,this._proxy,i);return this._debugAdapters.set(f,c),c}substituteVariables(i,f){return Promise.resolve(this._proxy.$substituteVariables(i?i.uri:void 0,f))}runInTerminal(i,f){return this._proxy.$runInTerminal(i,f)}$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 s={};l.added&&(s.added=this.convertToDto(l.added)),l.removed&&(s.removed=l.removed.map(d=>d.getId())),l.changed&&(s.changed=this.convertToDto(l.changed)),(s.added||s.removed||s.changed)&&this._proxy.$acceptBreakpointsDelta(s)}}));const i=this.debugService.getModel().getBreakpoints(),f=this.debugService.getModel().getFunctionBreakpoints(),c=this.debugService.getModel().getDataBreakpoints();(i.length>0||f.length>0)&&this._proxy.$acceptBreakpointsDelta({added:this.convertToDto(i).concat(this.convertToDto(f)).concat(this.convertToDto(c))})}}$registerBreakpoints(i){for(const f of i)if(f.type==="sourceMulti"){const c=f.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(p.URI.revive(f.uri),c)}else f.type==="function"?this.debugService.addFunctionBreakpoint(f.functionName,f.id):f.type==="data"&&this.debugService.addDataBreakpoint(f.label,f.dataId,f.canPersist,f.accessTypes,f.accessType);return Promise.resolve()}$unregisterBreakpoints(i,f,c){return i.forEach(l=>this.debugService.removeBreakpoints(l)),f.forEach(l=>this.debugService.removeFunctionBreakpoints(l)),c.forEach(l=>this.debugService.removeDataBreakpoints(l)),Promise.resolve()}$registerDebugConfigurationProvider(i,f,c,l,s,d){const n={type:i,triggerKind:f};return c&&(n.provideDebugConfigurations=(a,o)=>this._proxy.$provideDebugConfigurations(d,a,o)),l&&(n.resolveDebugConfiguration=(a,o,g)=>this._proxy.$resolveDebugConfiguration(d,a,o,g)),s&&(n.resolveDebugConfigurationWithSubstitutedVariables=(a,o,g)=>this._proxy.$resolveDebugConfigurationWithSubstitutedVariables(d,a,o,g)),this._debugConfigurationProviders.set(d,n),this._toDispose.add(this.debugService.getConfigurationManager().registerDebugConfigurationProvider(n)),Promise.resolve(void 0)}$unregisterDebugConfigurationProvider(i){const f=this._debugConfigurationProviders.get(i);f&&(this._debugConfigurationProviders.delete(i),this.debugService.getConfigurationManager().unregisterDebugConfigurationProvider(f))}$registerDebugAdapterDescriptorFactory(i,f){const c={type:i,createDebugAdapterDescriptor:l=>Promise.resolve(this._proxy.$provideDebugAdapter(f,this.getSessionDto(l)))};return this._debugAdapterDescriptorFactories.set(f,c),this._toDispose.add(this.debugService.getAdapterManager().registerDebugAdapterDescriptorFactory(c)),Promise.resolve(void 0)}$unregisterDebugAdapterDescriptorFactory(i){const f=this._debugAdapterDescriptorFactories.get(i);f&&(this._debugAdapterDescriptorFactories.delete(i),this.debugService.getAdapterManager().unregisterDebugAdapterDescriptorFactory(f))}getSession(i){if(i)return this.debugService.getModel().getSession(i,!0)}async $startDebugging(i,f,c){const l=i?p.URI.revive(i):void 0,s=this.debugService.getConfigurationManager().getLaunch(l),d=this.getSession(c.parentSessionID),n=typeof c.suppressSaveBeforeStart=="boolean"?!c.suppressSaveBeforeStart:void 0,a={noDebug:c.noDebug,parentSession:d,lifecycleManagedByParent:c.lifecycleManagedByParent,repl:c.repl,compact:c.compact,compoundRoot:d?.compoundRoot,saveBeforeRestart:n,suppressDebugStatusbar:c.suppressDebugStatusbar,suppressDebugToolbar:c.suppressDebugToolbar,suppressDebugView:c.suppressDebugView};try{return this.debugService.startDebugging(s,f,a,n)}catch(o){throw new S.ErrorNoTelemetry(o&&o.message?o.message:"cannot start debugging")}}$setDebugSessionName(i,f){this.debugService.getModel().getSession(i)?.setName(f)}$customDebugAdapterRequest(i,f,c){const l=this.debugService.getModel().getSession(i,!0);return l?l.customRequest(f,c).then(s=>s&&s.success?s.body:Promise.reject(new S.ErrorNoTelemetry(s?s.message:"custom request failed"))):Promise.reject(new S.ErrorNoTelemetry("debug session not found"))}$getDebugProtocolBreakpoint(i,f){const c=this.debugService.getModel().getSession(i,!0);return c?Promise.resolve(c.getDebugProtocolBreakpoint(f)):Promise.reject(new S.ErrorNoTelemetry("debug session not found"))}$stopDebugging(i){if(i){const f=this.debugService.getModel().getSession(i,!0);if(f)return this.debugService.stopSession(f,(0,b.isSessionAttach)(f))}else return this.debugService.stopSession(void 0);return Promise.reject(new S.ErrorNoTelemetry("debug session not found"))}$appendDebugConsole(i){this.debugService.getViewModel().focusedSession?.appendToRepl(i,E.default.Warning)}$acceptDAMessage(i,f){this.getDebugAdapter(i).acceptMessage((0,b.convertToVSCPaths)(f,!1))}$acceptDAError(i,f,c,l){this.getDebugAdapter(i).fireError(i,new Error(`${f}: ${c} ${l}`))}$acceptDAExit(i,f,c){this.getDebugAdapter(i).fireExit(i,f,c)}getDebugAdapter(i){const f=this._debugAdapters.get(i);if(!f)throw new Error("Invalid debug adapter");return f}$sessionCached(i){this._sessions.add(i)}getSessionDto(i){if(i){const f=i.getId();return this._sessions.has(f)?f:{id:f,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(f=>{if("name"in f){const c=f;return{type:"function",id:c.getId(),enabled:c.enabled,condition:c.condition,hitCondition:c.hitCondition,logMessage:c.logMessage,functionName:c.name}}else if("dataId"in f){const c=f;return{type:"data",id:c.getId(),dataId:c.dataId,enabled:c.enabled,condition:c.condition,hitCondition:c.hitCondition,logMessage:c.logMessage,label:c.description,canPersist:c.canPersist}}else{const c=f;return{type:"source",id:c.getId(),enabled:c.enabled,condition:c.condition,hitCondition:c.hitCondition,logMessage:c.logMessage,uri:c.uri,line:c.lineNumber>0?c.lineNumber-1:0,character:typeof c.column=="number"&&c.column>0?c.column-1:0}}})}};C=we([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadDebugService),F(1,R.IDebugService)],C),e.MainThreadDebugService=C;class r extends I.AbstractDebugAdapter{constructor(i,f,c,l){super(),this._ds=i,this._handle=f,this._proxy=c,this._session=l}fireError(i,f){this._onError.fire(f)}fireExit(i,f,c){this._onExit.fire(f)}startSession(){return Promise.resolve(this._proxy.$startDASession(this._handle,this._ds.getSessionDto(this._session)))}sendMessage(i){this._proxy.$sendDAMessage(this._handle,(0,b.convertToDAPaths)(i,!0))}async stopSession(){return await this.cancelPendingRequests(),Promise.resolve(this._proxy.$stopDASession(this._handle))}}}),define(ae[2525],le([1,0,9,6,2,67,77,292,32]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDecorations=void 0;class b{constructor(r,u){this._proxy=r,this._handle=u,this._idPool=0,this._requests=new Map,this._resolver=new Map}enqueue(r,u){const i=++this._idPool,f=new Promise(l=>{this._requests.set(i,{id:i,uri:r}),this._resolver.set(i,l),this._processQueue()}),c=u.onCancellationRequested(()=>{this._requests.delete(i),this._resolver.delete(i)});return f.finally(()=>c.dispose())}_processQueue(){typeof this._timer!="number"&&(this._timer=setTimeout(()=>{const r=this._requests,u=this._resolver;this._proxy.$provideDecorations(this._handle,[...r.values()],I.CancellationToken.None).then(i=>{for(const[f,c]of u)c(i[f])}),this._requests=new Map,this._resolver=new Map,this._timer=void 0},0))}}let S=class{constructor(r,u){this._decorationsService=u,this._provider=new Map,this._proxy=r.getProxy(A.ExtHostContext.ExtHostDecorations)}dispose(){this._provider.forEach(r=>(0,R.dispose)(r)),this._provider.clear()}$registerDecorationProvider(r,u){const i=new p.Emitter,f=new b(this._proxy,r),c=this._decorationsService.registerDecorationsProvider({label:u,onDidChange:i.event,provideDecorations:async(l,s)=>{const d=await f.enqueue(l,s);if(!d)return;const[n,a,o,g]=d;return{weight:10,bubble:n??!1,color:g?.id,tooltip:a,letter:o}}});this._provider.set(r,[i,c])}$onDidChange(r,u){const i=this._provider.get(r);if(i){const[f]=i;f.fire(u&&u.map(c=>t.URI.revive(c)))}}$unregisterDecorationProvider(r){const u=this._provider.get(r);u&&((0,R.dispose)(u),this._provider.delete(r))}};S=we([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadDecorations),F(1,E.IDecorationsService)],S),e.MainThreadDecorations=S}),define(ae[2526],le([1,0,124,9,67,77,57]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDiagnostics=void 0;let E=class{constructor(b,S,C){this._markerService=S,this._uriIdentService=C,this._activeOwners=new Set,this._proxy=b.getProxy(R.ExtHostContext.ExtHostDiagnostics),this._markerListener=this._markerService.onMarkerChanged(this._forwardMarkers,this)}dispose(){this._markerListener.dispose(),this._activeOwners.forEach(b=>this._markerService.changeAll(b,[])),this._activeOwners.clear()}_forwardMarkers(b){const S=[];for(const C of b){const r=this._markerService.read({resource:C});if(r.length===0)S.push([C,[]]);else{const u=r.filter(i=>!this._activeOwners.has(i.owner));u.length>0&&S.push([C,u])}}S.length>0&&this._proxy.$acceptMarkersChange(S)}$changeMany(b,S){for(const C of S){const[r,u]=C;if(u)for(const i of u){if(i.relatedInformation)for(const f of i.relatedInformation)f.resource=p.URI.revive(f.resource);i.code&&typeof i.code!="string"&&(i.code.target=p.URI.revive(i.code.target))}this._markerService.changeOne(b,this._uriIdentService.asCanonicalUri(p.URI.revive(r)),u)}this._activeOwners.add(b)}$clear(b){this._markerService.changeAll(b,[]),this._activeOwners.delete(b)}};E=we([(0,A.extHostNamedCustomer)(R.MainContext.MainThreadDiagnostics),F(1,t.IMarkerService),F(2,k.IUriIdentityService)],E),e.MainThreadDiagnostics=E}),define(ae[2527],le([1,0,9,67,77,47]),function(J,e,t,p,R,A){"use strict";var k;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDialogs=void 0;let E=k=class{constructor(b,S){this._fileDialogService=S}dispose(){}async $showOpenDialog(b){const S=k._convertOpenOptions(b);return S.defaultUri||(S.defaultUri=await this._fileDialogService.defaultFilePath()),Promise.resolve(this._fileDialogService.showOpenDialog(S))}async $showSaveDialog(b){const S=k._convertSaveOptions(b);return S.defaultUri||(S.defaultUri=await this._fileDialogService.defaultFilePath()),Promise.resolve(this._fileDialogService.showSaveDialog(S))}static _convertOpenOptions(b){const S={openLabel:b?.openLabel||void 0,canSelectFiles:b?.canSelectFiles||!b?.canSelectFiles&&!b?.canSelectFolders,canSelectFolders:b?.canSelectFolders,canSelectMany:b?.canSelectMany,defaultUri:b?.defaultUri?t.URI.revive(b.defaultUri):void 0,title:b?.title||void 0,availableFileSystems:[]};if(b?.filters){S.filters=[];for(const[C,r]of Object.entries(b.filters))S.filters.push({name:C,extensions:r})}return S}static _convertSaveOptions(b){const S={defaultUri:b?.defaultUri?t.URI.revive(b.defaultUri):void 0,saveLabel:b?.saveLabel||void 0,title:b?.title||void 0};if(b?.filters){S.filters=[];for(const[C,r]of Object.entries(b.filters))S.filters.push({name:C,extensions:r})}return S}};E=k=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadDialogs),F(1,A.IFileDialogService)],E),e.MainThreadDialogs=E}),define(ae[2528],le([1,0,21,2,9,138,20,212,54,42,62,77,67,32]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentContentProviders=void 0;let i=class{constructor(c,l,s,d,n){this._textModelResolverService=l,this._languageService=s,this._modelService=d,this._editorWorkerService=n,this._resourceContentProvider=new p.DisposableMap,this._pendingUpdate=new Map,this._proxy=c.getProxy(r.ExtHostContext.ExtHostDocumentContentProviders)}dispose(){this._resourceContentProvider.dispose(),(0,p.dispose)(this._pendingUpdate.values())}$registerTextContentProvider(c,l){const s=this._textModelResolverService.registerTextModelContentProvider(l,{provideTextContent:d=>this._proxy.$provideTextDocumentContent(c,d).then(n=>{if(typeof n=="string"){const a=n.substr(0,1+n.search(/\r?\n/)),o=this._languageService.createByFilepathOrFirstLine(d,a);return this._modelService.createModel(n,o,d)}return null})});this._resourceContentProvider.set(c,s)}$unregisterTextContentProvider(c){this._resourceContentProvider.deleteAndDispose(c)}$onVirtualDocumentChange(c,l){const s=this._modelService.getModel(R.URI.revive(c));if(!s)return;this._pendingUpdate.get(s.id)?.cancel();const n=new u.CancellationTokenSource;this._pendingUpdate.set(s.id,n),this._editorWorkerService.computeMoreMinimalEdits(s.uri,[{text:l,range:s.getFullModelRange()}]).then(a=>{this._pendingUpdate.delete(s.id),!n.token.isCancellationRequested&&a&&a.length>0&&s.applyEdits(a.map(o=>A.EditOperation.replace(k.Range.lift(o.range),o.text)))}).catch(t.onUnexpectedError)}};i=we([(0,C.extHostNamedCustomer)(r.MainContext.MainThreadDocumentContentProviders),F(1,S.ITextModelService),F(2,b.ILanguageService),F(3,I.IModelService),F(4,E.IEditorWorkerService)],i),e.MainThreadDocumentContentProviders=i}),define(ae[2529],le([1,0,2,67,77,373,9]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDownloadService=void 0;let E=class extends t.Disposable{constructor(b,S){super(),this.downloadService=S}$download(b,S){return this.downloadService.download(k.URI.revive(b),k.URI.revive(S))}};E=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadDownloadService),F(1,A.IDownloadService)],E),e.MainThreadDownloadService=E}),define(ae[933],le([1,0,6,2,134,20,85,168,67,13,16,266,207]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTextEditor=e.MainThreadTextEditorProperties=void 0;class u{static readFromEditor(c,l,s){const d=u._readSelectionsFromCodeEditor(c,s),n=u._readOptionsFromCodeEditor(c,l,s),a=u._readVisibleRangesFromCodeEditor(c,s);return new u(d,n,a)}static _readSelectionsFromCodeEditor(c,l){let s=null;return l&&(s=l.getSelections()),!s&&c&&(s=c.selections),s||(s=[new k.Selection(1,1,1,1)]),s}static _readOptionsFromCodeEditor(c,l,s){if(l.isDisposed()){if(c)return c.options;throw new Error("No valid properties")}let d,n;if(s){const o=s.getOptions(),g=o.get(61);d=o.get(24),n=g.renderType}else c?(d=c.options.cursorStyle,n=c.options.lineNumbers):(d=R.TextEditorCursorStyle.Line,n=1);const a=l.getOptions();return{insertSpaces:a.insertSpaces,tabSize:a.tabSize,cursorStyle:d,lineNumbers:n}}static _readVisibleRangesFromCodeEditor(c,l){return l?l.getVisibleRanges():[]}constructor(c,l,s){this.selections=c,this.options=l,this.visibleRanges=s}generateDelta(c,l){const s={options:null,selections:null,visibleRanges:null};return(!c||!u._selectionsEqual(c.selections,this.selections))&&(s.selections={selections:this.selections,source:(0,b.withNullAsUndefined)(l)}),(!c||!u._optionsEqual(c.options,this.options))&&(s.options=this.options),(!c||!u._rangesEqual(c.visibleRanges,this.visibleRanges))&&(s.visibleRanges=this.visibleRanges),s.selections||s.options||s.visibleRanges?s:null}static _selectionsEqual(c,l){return(0,S.equals)(c,l,(s,d)=>s.equalsSelection(d))}static _rangesEqual(c,l){return(0,S.equals)(c,l,(s,d)=>s.equalsRange(d))}static _optionsEqual(c,l){return c&&!l||!c&&l?!1:!c&&!l?!0:c.tabSize===l.tabSize&&c.insertSpaces===l.insertSpaces&&c.cursorStyle===l.cursorStyle&&c.lineNumbers===l.lineNumbers}}e.MainThreadTextEditorProperties=u;class i{constructor(c,l,s,d,n,a,o){this._modelListeners=new p.DisposableStore,this._codeEditorListeners=new p.DisposableStore,this._id=c,this._model=l,this._codeEditor=null,this._properties=null,this._focusTracker=d,this._mainThreadDocuments=n,this._modelService=a,this._clipboardService=o,this._onPropertiesChanged=new t.Emitter,this._modelListeners.add(this._model.onDidChangeOptions(g=>{this._updatePropertiesNow(null)})),this.setCodeEditor(s),this._updatePropertiesNow(null)}dispose(){this._modelListeners.dispose(),this._codeEditor=null,this._codeEditorListeners.dispose()}_updatePropertiesNow(c){this._setProperties(u.readFromEditor(this._properties,this._model,this._codeEditor),c)}_setProperties(c,l){const s=c.generateDelta(this._properties,l);this._properties=c,s&&this._onPropertiesChanged.fire(s)}getId(){return this._id}getModel(){return this._model}getCodeEditor(){return this._codeEditor}hasCodeEditor(c){return this._codeEditor===c}setCodeEditor(c){if(!this.hasCodeEditor(c)&&(this._codeEditorListeners.clear(),this._codeEditor=c,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(n=>{if(n.toString()===this._model.uri.toString()){const a=l;l=null,this._updatePropertiesNow(a)}}));const s=()=>this._codeEditor&&this._codeEditor.getModel()===this._model,d=n=>{this._mainThreadDocuments.isCaughtUpWithContentChanges(this._model.uri)?(l=null,this._updatePropertiesNow(n)):l=n};this._codeEditorListeners.add(this._codeEditor.onDidChangeCursorSelection(n=>{!s()||d(n.source)})),this._codeEditorListeners.add(this._codeEditor.onDidChangeConfiguration(n=>{!s()||d(null)})),this._codeEditorListeners.add(this._codeEditor.onDidLayoutChange(()=>{!s()||d(null)})),this._codeEditorListeners.add(this._codeEditor.onDidScrollChange(()=>{!s()||d(null)})),this._updatePropertiesNow(null)}}isVisible(){return!!this._codeEditor}getProperties(){return this._properties}get onPropertiesChanged(){return this._onPropertiesChanged.event}setSelections(c){if(this._codeEditor){this._codeEditor.setSelections(c);return}const l=c.map(k.Selection.liftSelection);this._setProperties(new u(l,this._properties.options,this._properties.visibleRanges),null)}_setIndentConfiguration(c){const l=this._modelService.getCreationOptions(this._model.getLanguageId(),this._model.uri,this._model.isForSimpleWidget);if(c.tabSize==="auto"||c.insertSpaces==="auto"){let d=l.insertSpaces,n=l.tabSize;c.insertSpaces!=="auto"&&typeof c.insertSpaces<"u"&&(d=c.insertSpaces),c.tabSize!=="auto"&&typeof c.tabSize<"u"&&(n=c.tabSize),this._model.detectIndentation(d,n);return}const s={};typeof c.insertSpaces<"u"&&(s.insertSpaces=c.insertSpaces),typeof c.tabSize<"u"&&(s.tabSize=c.tabSize),this._model.updateOptions(s)}setConfiguration(c){if(this._setIndentConfiguration(c),!!this._codeEditor){if(c.cursorStyle){const l=(0,R.cursorStyleToString)(c.cursorStyle);this._codeEditor.updateOptions({cursorStyle:l})}if(typeof c.lineNumbers<"u"){let l;switch(c.lineNumbers){case 1:l="on";break;case 2:l="relative";break;default:l="off"}this._codeEditor.updateOptions({lineNumbers:l})}}}setDecorations(c,l){!this._codeEditor||this._codeEditor.setDecorationsByType("exthost-api",c,l)}setDecorationsFast(c,l){if(!this._codeEditor)return;const s=[];for(let d=0,n=Math.floor(l.length/4);d<n;d++)s[d]=new A.Range(l[4*d],l[4*d+1],l[4*d+2],l[4*d+3]);this._codeEditor.setDecorationsByTypeFast(c,s)}revealRange(c,l){if(!!this._codeEditor)switch(l){case I.TextEditorRevealType.Default:this._codeEditor.revealRange(c,0);break;case I.TextEditorRevealType.InCenter:this._codeEditor.revealRangeInCenter(c,0);break;case I.TextEditorRevealType.InCenterIfOutsideViewport:this._codeEditor.revealRangeInCenterIfOutsideViewport(c,0);break;case I.TextEditorRevealType.AtTop:this._codeEditor.revealRangeAtTop(c,0);break;default:console.warn(`Unknown revealType: ${l}`);break}}isFocused(){return this._codeEditor?this._codeEditor.hasTextFocus():!1}matches(c){return c?c.getControl()===this._codeEditor:!1}applyEdits(c,l,s){if(this._model.getVersionId()!==c||!this._codeEditor)return!1;typeof s.setEndOfLine<"u"&&this._model.pushEOL(s.setEndOfLine);const d=l.map(n=>({range:A.Range.lift(n.range),text:n.text,forceMoveMarkers:n.forceMoveMarkers}));return s.undoStopBefore&&this._codeEditor.pushUndoStop(),this._codeEditor.executeEdits("MainThreadTextEditor",d),s.undoStopAfter&&this._codeEditor.pushUndoStop(),!0}async insertSnippet(c,l,s,d){if(!this._codeEditor||!this._codeEditor.hasModel())return!1;let n;if(r.SnippetParser.guessNeedsClipboard(l)){const h=new C.EditorState(this._codeEditor,5);if(n=await this._clipboardService.readText(),!h.validate(this._codeEditor))return!1}this._codeEditor.getModel().getVersionId();const o=E.SnippetController2.get(this._codeEditor);if(!o)return!1;const g=s.map(h=>new k.Selection(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn));return this._codeEditor.setSelections(g),this._codeEditor.focus(),o.insert(l,{overwriteBefore:0,overwriteAfter:0,undoStopBefore:d.undoStopBefore,undoStopAfter:d.undoStopAfter,clipboardText:n}),!0}}e.MainThreadTextEditor=i}),define(ae[2530],le([1,0,21,77,67]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadErrors=void 0;let A=class{dispose(){}$onUnexpectedError(E){if(E&&E.$isError){const{name:I,message:b,stack:S}=E;E=E.noTelemetry?new t.ErrorNoTelemetry:new Error,E.message=b,E.name=I,E.stack=S}(0,t.onUnexpectedError)(E)}};A=we([(0,p.extHostNamedCustomer)(R.MainContext.MainThreadErrors)],A),e.MainThreadErrors=A}),define(ae[2531],le([1,0,2,125,67,77,636]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadInteractive=void 0;let E=class{constructor(b,S){this._disposables=new t.DisposableStore,this._proxy=b.getProxy(R.ExtHostContext.ExtHostInteractive),this._disposables.add(S.onWillAddInteractiveDocument(C=>{this._proxy.$willAddInteractiveDocument(C.inputUri,` `,p.PLAINTEXT_LANGUAGE_ID,C.notebookUri)})),this._disposables.add(S.onWillRemoveInteractiveDocument(C=>{this._proxy.$willRemoveInteractiveDocument(C.inputUri,C.notebookUri)}))}dispose(){this._disposables.dispose()}};E=we([(0,A.extHostNamedCustomer)(R.MainContext.MainThreadInteractive),F(1,k.IInteractiveDocumentService)],E),e.MainThreadInteractive=E}),define(ae[2532],le([1,0,77,67,330]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadKeytar=void 0;let A=class{constructor(E,I){this._credentialsService=I}async $getPassword(E,I){return this._credentialsService.getPassword(E,I)}async $setPassword(E,I,b){return this._credentialsService.setPassword(E,I,b)}async $deletePassword(E,I){return this._credentialsService.deletePassword(E,I)}async $findPassword(E){return this._credentialsService.findPassword(E)}async $findCredentials(E){return this._credentialsService.findCredentials(E)}dispose(){}};A=we([(0,t.extHostNamedCustomer)(p.MainContext.MainThreadKeytar),F(1,R.ICredentialsService)],A),e.MainThreadKeytar=A}),define(ae[2533],le([1,0,2,49,67,77]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLabelService=void 0;let k=class extends t.Disposable{constructor(I,b){super(),this._labelService=b,this._resourceLabelFormatters=this._register(new t.DisposableMap)}$registerResourceLabelFormatter(I,b){b.priority=!0;const S=this._labelService.registerCachedFormatter(b);this._resourceLabelFormatters.set(I,S)}$unregisterResourceLabelFormatter(I){this._resourceLabelFormatters.deleteAndDispose(I)}};k=we([(0,A.extHostNamedCustomer)(R.MainContext.MainThreadLabelService),F(1,p.ILabelService)],k),e.MainThreadLabelService=k}),define(ae[2534],le([1,0,358,21,6,2,165,52,9,42,122,61,776,57,673,921,843,632,390,658,77,67]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentRangeSemanticTokensProvider=e.MainThreadDocumentSemanticTokensProvider=e.MainThreadLanguageFeatures=void 0;let g=o=class extends A.Disposable{constructor(y,T,_,L,M){if(super(),this._languageService=T,this._languageConfigurationService=_,this._languageFeaturesService=L,this._uriIdentService=M,this._registrations=this._register(new A.DisposableMap),this._pasteEditProviders=new Map,this._documentOnDropEditProviders=new Map,this._proxy=y.getProxy(a.ExtHostContext.ExtHostLanguageFeatures),this._languageService){const O=()=>{const N=[];for(const P of T.getRegisteredLanguageIds()){const B=this._languageConfigurationService.getLanguageConfiguration(P).getWordDefinition();N.push({languageId:P,regexSource:B.source,regexFlags:B.flags})}this._proxy.$setWordDefinitions(N)};this._languageConfigurationService.onDidChange(N=>{if(!N.languageId)O();else{const P=this._languageConfigurationService.getLanguageConfiguration(N.languageId).getWordDefinition();this._proxy.$setWordDefinitions([{languageId:N.languageId,regexSource:P.source,regexFlags:P.flags}])}}),O()}}$unregister(y){this._registrations.deleteAndDispose(y)}static _reviveLocationDto(y){return y&&(Array.isArray(y)?(y.forEach(T=>o._reviveLocationDto(T)),y):(y.uri=I.URI.revive(y.uri),y))}static _reviveLocationLinkDto(y){return y&&(Array.isArray(y)?(y.forEach(T=>o._reviveLocationLinkDto(T)),y):(y.uri=I.URI.revive(y.uri),y))}static _reviveWorkspaceSymbolDto(y){return y&&(Array.isArray(y)?(y.forEach(o._reviveWorkspaceSymbolDto),y):(y.location=o._reviveLocationDto(y.location),y))}static _reviveCodeActionDto(y,T){return y?.forEach(_=>(0,i.reviveWorkspaceEditDto)(_.edit,T)),y}static _reviveLinkDTO(y){return y.url&&typeof y.url!="string"&&(y.url=I.URI.revive(y.url)),y}static _reviveCallHierarchyItemDto(y){return y&&(y.uri=I.URI.revive(y.uri)),y}static _reviveTypeHierarchyItemDto(y){return y&&(y.uri=I.URI.revive(y.uri)),y}$registerDocumentSymbolProvider(y,T,_){this._registrations.set(y,this._languageFeaturesService.documentSymbolProvider.register(T,{displayName:_,provideDocumentSymbols:(L,M)=>this._proxy.$provideDocumentSymbols(y,L.uri,M)}))}$registerCodeLensSupport(y,T,_){const L={provideCodeLenses:async(M,O)=>{const N=await this._proxy.$provideCodeLenses(y,M.uri,O);if(!!N)return{lenses:N.lenses,dispose:()=>N.cacheId&&this._proxy.$releaseCodeLenses(y,N.cacheId)}},resolveCodeLens:(M,O,N)=>this._proxy.$resolveCodeLens(y,O,N)};if(typeof _=="number"){const M=new R.Emitter;this._registrations.set(_,M),L.onDidChange=M.event}this._registrations.set(y,this._languageFeaturesService.codeLensProvider.register(T,L))}$emitCodeLensEvent(y,T){const _=this._registrations.get(y);_ instanceof R.Emitter&&_.fire(T)}$registerDefinitionSupport(y,T){this._registrations.set(y,this._languageFeaturesService.definitionProvider.register(T,{provideDefinition:(_,L,M)=>this._proxy.$provideDefinition(y,_.uri,L,M).then(o._reviveLocationLinkDto)}))}$registerDeclarationSupport(y,T){this._registrations.set(y,this._languageFeaturesService.declarationProvider.register(T,{provideDeclaration:(_,L,M)=>this._proxy.$provideDeclaration(y,_.uri,L,M).then(o._reviveLocationLinkDto)}))}$registerImplementationSupport(y,T){this._registrations.set(y,this._languageFeaturesService.implementationProvider.register(T,{provideImplementation:(_,L,M)=>this._proxy.$provideImplementation(y,_.uri,L,M).then(o._reviveLocationLinkDto)}))}$registerTypeDefinitionSupport(y,T){this._registrations.set(y,this._languageFeaturesService.typeDefinitionProvider.register(T,{provideTypeDefinition:(_,L,M)=>this._proxy.$provideTypeDefinition(y,_.uri,L,M).then(o._reviveLocationLinkDto)}))}$registerHoverProvider(y,T){this._registrations.set(y,this._languageFeaturesService.hoverProvider.register(T,{provideHover:(_,L,M)=>this._proxy.$provideHover(y,_.uri,L,M)}))}$registerEvaluatableExpressionProvider(y,T){this._registrations.set(y,this._languageFeaturesService.evaluatableExpressionProvider.register(T,{provideEvaluatableExpression:(_,L,M)=>this._proxy.$provideEvaluatableExpression(y,_.uri,L,M)}))}$registerInlineValuesProvider(y,T,_){const L={provideInlineValues:(M,O,N,P)=>this._proxy.$provideInlineValues(y,M.uri,O,N,P)};if(typeof _=="number"){const M=new R.Emitter;this._registrations.set(_,M),L.onDidChangeInlineValues=M.event}this._registrations.set(y,this._languageFeaturesService.inlineValuesProvider.register(T,L))}$emitInlineValuesEvent(y,T){const _=this._registrations.get(y);_ instanceof R.Emitter&&_.fire(T)}$registerDocumentHighlightProvider(y,T){this._registrations.set(y,this._languageFeaturesService.documentHighlightProvider.register(T,{provideDocumentHighlights:(_,L,M)=>this._proxy.$provideDocumentHighlights(y,_.uri,L,M)}))}$registerLinkedEditingRangeProvider(y,T){this._registrations.set(y,this._languageFeaturesService.linkedEditingRangeProvider.register(T,{provideLinkedEditingRanges:async(_,L,M)=>{const O=await this._proxy.$provideLinkedEditingRanges(y,_.uri,L,M);if(O)return{ranges:O.ranges,wordPattern:O.wordPattern?o._reviveRegExp(O.wordPattern):void 0}}}))}$registerReferenceSupport(y,T){this._registrations.set(y,this._languageFeaturesService.referenceProvider.register(T,{provideReferences:(_,L,M,O)=>this._proxy.$provideReferences(y,_.uri,L,M,O).then(o._reviveLocationDto)}))}$registerQuickFixSupport(y,T,_,L,M){const O={provideCodeActions:async(N,P,B,V)=>{const z=await this._proxy.$provideCodeActions(y,N.uri,P,B,V);if(!!z)return{actions:o._reviveCodeActionDto(z.actions,this._uriIdentService),dispose:()=>{typeof z.cacheId=="number"&&this._proxy.$releaseCodeActions(y,z.cacheId)}}},providedCodeActionKinds:_.providedKinds,documentation:_.documentation,displayName:L};M&&(O.resolveCodeAction=async(N,P)=>{const B=await this._proxy.$resolveCodeAction(y,N.cacheId,P);return N.edit=(0,i.reviveWorkspaceEditDto)(B,this._uriIdentService),N}),this._registrations.set(y,this._languageFeaturesService.codeActionProvider.register(T,O))}$registerPasteEditProvider(y,T,_,L){const M=new h(y,this._proxy,_,L,this._uriIdentService);this._pasteEditProviders.set(y,M),this._registrations.set(y,(0,A.combinedDisposable)(this._languageFeaturesService.documentPasteEditProvider.register(T,M),(0,A.toDisposable)(()=>this._pasteEditProviders.delete(y))))}$resolvePasteFileData(y,T,_){const L=this._pasteEditProviders.get(y);if(!L)throw new Error("Could not find provider");return L.resolveFileData(T,_)}$registerDocumentFormattingSupport(y,T,_,L){this._registrations.set(y,this._languageFeaturesService.documentFormattingEditProvider.register(T,{extensionId:_,displayName:L,provideDocumentFormattingEdits:(M,O,N)=>this._proxy.$provideDocumentFormattingEdits(y,M.uri,O,N)}))}$registerRangeFormattingSupport(y,T,_,L){this._registrations.set(y,this._languageFeaturesService.documentRangeFormattingEditProvider.register(T,{extensionId:_,displayName:L,provideDocumentRangeFormattingEdits:(M,O,N,P)=>this._proxy.$provideDocumentRangeFormattingEdits(y,M.uri,O,N,P)}))}$registerOnTypeFormattingSupport(y,T,_,L){this._registrations.set(y,this._languageFeaturesService.onTypeFormattingEditProvider.register(T,{extensionId:L,autoFormatTriggerCharacters:_,provideOnTypeFormattingEdits:(M,O,N,P,B)=>this._proxy.$provideOnTypeFormattingEdits(y,M.uri,O,N,P,B)}))}$registerNavigateTypeSupport(y,T){let _;const L={provideWorkspaceSymbols:async(M,O)=>{const N=await this._proxy.$provideWorkspaceSymbols(y,M,O);return _!==void 0&&this._proxy.$releaseWorkspaceSymbols(y,_),_=N.cacheId,o._reviveWorkspaceSymbolDto(N.symbols)}};T&&(L.resolveWorkspaceSymbol=async(M,O)=>{const N=await this._proxy.$resolveWorkspaceSymbol(y,M,O);return N&&o._reviveWorkspaceSymbolDto(N)}),this._registrations.set(y,s.WorkspaceSymbolProviderRegistry.register(L))}$registerRenameSupport(y,T,_){this._registrations.set(y,this._languageFeaturesService.renameProvider.register(T,{provideRenameEdits:(L,M,O,N)=>this._proxy.$provideRenameEdits(y,L.uri,M,O,N).then(P=>(0,i.reviveWorkspaceEditDto)(P,this._uriIdentService)),resolveRenameLocation:_?(L,M,O)=>this._proxy.$resolveRenameLocation(y,L.uri,M,O):void 0}))}$registerDocumentSemanticTokensProvider(y,T,_,L){let M;if(typeof L=="number"){const O=new R.Emitter;this._registrations.set(L,O),M=O.event}this._registrations.set(y,this._languageFeaturesService.documentSemanticTokensProvider.register(T,new m(this._proxy,y,_,M)))}$emitDocumentSemanticTokensEvent(y){const T=this._registrations.get(y);T instanceof R.Emitter&&T.fire(void 0)}$registerDocumentRangeSemanticTokensProvider(y,T,_){this._registrations.set(y,this._languageFeaturesService.documentRangeSemanticTokensProvider.register(T,new w(this._proxy,y,_)))}static _inflateSuggestDto(y,T){const _=T.a,L=T.o,M=T.n,O=T.k;return{label:_,kind:T.b??9,tags:T.m,detail:T.c,documentation:T.d,sortText:T.e,filterText:T.f,preselect:T.g,insertText:T.h??(typeof _=="string"?_:_.label),range:T.j??y,insertTextRules:T.i,commitCharacters:O?Array.from(O):void 0,additionalTextEdits:T.l,command:L?{$ident:M,id:L,title:"",arguments:M?[M]:T.p}:void 0,_id:T.x}}$registerCompletionsProvider(y,T,_,L,M){const O={triggerCharacters:_,_debugDisplayName:M,provideCompletionItems:async(N,P,B,V)=>{const z=await this._proxy.$provideCompletionItems(y,N.uri,P,B,V);return z&&{suggestions:z.b.map(x=>o._inflateSuggestDto(z.a,x)),incomplete:z.c||!1,duration:z.d,dispose:()=>{typeof z.x=="number"&&this._proxy.$releaseCompletionItems(y,z.x)}}}};L&&(O.resolveCompletionItem=(N,P)=>this._proxy.$resolveCompletionItem(y,N._id,P).then(B=>{if(!B)return N;const V=o._inflateSuggestDto(N.range,B);return(0,E.mixin)(N,V,!0)})),this._registrations.set(y,this._languageFeaturesService.completionProvider.register(T,O))}$registerInlineCompletionsSupport(y,T,_){const L={provideInlineCompletions:async(M,O,N,P)=>this._proxy.$provideInlineCompletions(y,M.uri,O,N,P),handleItemDidShow:async(M,O)=>{_&&await this._proxy.$handleInlineCompletionDidShow(y,M.pid,O.idx)},freeInlineCompletions:M=>{this._proxy.$freeInlineCompletionsList(y,M.pid)}};this._registrations.set(y,this._languageFeaturesService.inlineCompletionsProvider.register(T,L))}$registerSignatureHelpProvider(y,T,_){this._registrations.set(y,this._languageFeaturesService.signatureHelpProvider.register(T,{signatureHelpTriggerCharacters:_.triggerCharacters,signatureHelpRetriggerCharacters:_.retriggerCharacters,provideSignatureHelp:async(L,M,O,N)=>{const P=await this._proxy.$provideSignatureHelp(y,L.uri,M,N,O);if(!!P)return{value:P,dispose:()=>{this._proxy.$releaseSignatureHelp(y,P.id)}}}}))}$registerInlayHintsProvider(y,T,_,L,M){const O={displayName:M,provideInlayHints:async(N,P,B)=>{const V=await this._proxy.$provideInlayHints(y,N.uri,P,B);if(!!V)return{hints:(0,k.revive)(V.hints),dispose:()=>{V.cacheId&&this._proxy.$releaseInlayHints(y,V.cacheId)}}}};if(_&&(O.resolveInlayHint=async(N,P)=>{const B=N;if(!B.cacheId)return N;const V=await this._proxy.$resolveInlayHint(y,B.cacheId,P);if(P.isCancellationRequested)throw new p.CancellationError;return V?{...N,tooltip:V.tooltip,label:(0,k.revive)(V.label)}:N}),typeof L=="number"){const N=new R.Emitter;this._registrations.set(L,N),O.onDidChangeInlayHints=N.event}this._registrations.set(y,this._languageFeaturesService.inlayHintsProvider.register(T,O))}$emitInlayHintsEvent(y){const T=this._registrations.get(y);T instanceof R.Emitter&&T.fire(void 0)}$registerDocumentLinkProvider(y,T,_){const L={provideLinks:(M,O)=>this._proxy.$provideDocumentLinks(y,M.uri,O).then(N=>{if(!!N)return{links:N.links.map(o._reviveLinkDTO),dispose:()=>{typeof N.cacheId=="number"&&this._proxy.$releaseDocumentLinks(y,N.cacheId)}}})};_&&(L.resolveLink=(M,O)=>{const N=M;return N.cacheId?this._proxy.$resolveDocumentLink(y,N.cacheId,O).then(P=>P&&o._reviveLinkDTO(P)):M}),this._registrations.set(y,this._languageFeaturesService.linkProvider.register(T,L))}$registerDocumentColorProvider(y,T){const _=this._proxy;this._registrations.set(y,this._languageFeaturesService.colorProvider.register(T,{provideDocumentColors:(L,M)=>_.$provideDocumentColors(y,L.uri,M).then(O=>O.map(N=>{const[P,B,V,z]=N.color;return{color:{red:P,green:B,blue:V,alpha:z},range:N.range}})),provideColorPresentations:(L,M,O)=>_.$provideColorPresentations(y,L.uri,{color:[M.color.red,M.color.green,M.color.blue,M.color.alpha],range:M.range},O)}))}$registerFoldingRangeProvider(y,T,_,L){const M={id:_.value,provideFoldingRanges:(O,N,P)=>this._proxy.$provideFoldingRanges(y,O.uri,N,P)};if(typeof L=="number"){const O=new R.Emitter;this._registrations.set(L,O),M.onDidChange=O.event}this._registrations.set(y,this._languageFeaturesService.foldingRangeProvider.register(T,M))}$emitFoldingRangeEvent(y,T){const _=this._registrations.get(y);_ instanceof R.Emitter&&_.fire(T)}$registerSelectionRangeProvider(y,T){this._registrations.set(y,this._languageFeaturesService.selectionRangeProvider.register(T,{provideSelectionRanges:(_,L,M)=>this._proxy.$provideSelectionRanges(y,_.uri,L,M)}))}$registerCallHierarchyProvider(y,T){this._registrations.set(y,l.CallHierarchyProviderRegistry.register(T,{prepareCallHierarchy:async(_,L,M)=>{const O=await this._proxy.$prepareCallHierarchy(y,_.uri,L,M);if(!(!O||O.length===0))return{dispose:()=>{for(const N of O)this._proxy.$releaseCallHierarchy(y,N._sessionId)},roots:O.map(o._reviveCallHierarchyItemDto)}},provideOutgoingCalls:async(_,L)=>{const M=await this._proxy.$provideCallHierarchyOutgoingCalls(y,_._sessionId,_._itemId,L);return M&&(M.forEach(O=>{O.to=o._reviveCallHierarchyItemDto(O.to)}),M)},provideIncomingCalls:async(_,L)=>{const M=await this._proxy.$provideCallHierarchyIncomingCalls(y,_._sessionId,_._itemId,L);return M&&(M.forEach(O=>{O.from=o._reviveCallHierarchyItemDto(O.from)}),M)}}))}static _reviveRegExp(y){return new RegExp(y.pattern,y.flags)}static _reviveIndentationRule(y){return{decreaseIndentPattern:o._reviveRegExp(y.decreaseIndentPattern),increaseIndentPattern:o._reviveRegExp(y.increaseIndentPattern),indentNextLinePattern:y.indentNextLinePattern?o._reviveRegExp(y.indentNextLinePattern):void 0,unIndentedLinePattern:y.unIndentedLinePattern?o._reviveRegExp(y.unIndentedLinePattern):void 0}}static _reviveOnEnterRule(y){return{beforeText:o._reviveRegExp(y.beforeText),afterText:y.afterText?o._reviveRegExp(y.afterText):void 0,previousLineText:y.previousLineText?o._reviveRegExp(y.previousLineText):void 0,action:y.action}}static _reviveOnEnterRules(y){return y.map(o._reviveOnEnterRule)}$setLanguageConfiguration(y,T,_){const L={comments:_.comments,brackets:_.brackets,wordPattern:_.wordPattern?o._reviveRegExp(_.wordPattern):void 0,indentationRules:_.indentationRules?o._reviveIndentationRule(_.indentationRules):void 0,onEnterRules:_.onEnterRules?o._reviveOnEnterRules(_.onEnterRules):void 0,autoClosingPairs:void 0,surroundingPairs:void 0,__electricCharacterSupport:void 0};_.__characterPairSupport&&(L.autoClosingPairs=_.__characterPairSupport.autoClosingPairs),_.__electricCharacterSupport&&_.__electricCharacterSupport.docComment&&(L.__electricCharacterSupport={docComment:{open:_.__electricCharacterSupport.docComment.open,close:_.__electricCharacterSupport.docComment.close}}),this._languageService.isRegisteredLanguageId(T)&&this._registrations.set(y,this._languageConfigurationService.register(T,L,100))}$registerTypeHierarchyProvider(y,T){this._registrations.set(y,d.TypeHierarchyProviderRegistry.register(T,{prepareTypeHierarchy:async(_,L,M)=>{const O=await this._proxy.$prepareTypeHierarchy(y,_.uri,L,M);if(!!O)return{dispose:()=>{for(const N of O)this._proxy.$releaseTypeHierarchy(y,N._sessionId)},roots:O.map(o._reviveTypeHierarchyItemDto)}},provideSupertypes:async(_,L)=>{const M=await this._proxy.$provideTypeHierarchySupertypes(y,_._sessionId,_._itemId,L);return M&&M.map(o._reviveTypeHierarchyItemDto)},provideSubtypes:async(_,L)=>{const M=await this._proxy.$provideTypeHierarchySubtypes(y,_._sessionId,_._itemId,L);return M&&M.map(o._reviveTypeHierarchyItemDto)}}))}$registerDocumentOnDropEditProvider(y,T){const _=new v(y,this._proxy,this._uriIdentService);this._documentOnDropEditProviders.set(y,_),this._registrations.set(y,(0,A.combinedDisposable)(this._languageFeaturesService.documentOnDropEditProvider.register(T,_),(0,A.toDisposable)(()=>this._documentOnDropEditProviders.delete(y))))}async $resolveDocumentOnDropFileData(y,T,_){const L=this._documentOnDropEditProviders.get(y);if(!L)throw new Error("Could not find provider");return L.resolveDocumentOnDropFileData(T,_)}};g=o=we([(0,n.extHostNamedCustomer)(a.MainContext.MainThreadLanguageFeatures),F(1,b.ILanguageService),F(2,S.ILanguageConfigurationService),F(3,C.ILanguageFeaturesService),F(4,u.IUriIdentityService)],g),e.MainThreadLanguageFeatures=g;let h=class{constructor(y,T,_,L,M){this.handle=y,this._proxy=T,this._uriIdentService=M,this.dataTransfers=new c.DataTransferCache,this.pasteMimeTypes=L,_&&(this.prepareDocumentPaste=async(O,N,P,B)=>{const V=await f.DataTransfer.toDataTransferDTO(P);if(B.isCancellationRequested)return;const z=await this._proxy.$prepareDocumentPaste(y,O.uri,N,V,B);if(!z)return;const x=new t.VSDataTransfer;return z.items.forEach(([H,W])=>{x.replace(H,(0,t.createStringDataTransferItem)(W.asString))}),x})}async provideDocumentPasteEdits(y,T,_,L){const M=this.dataTransfers.add(_);try{const O=await f.DataTransfer.toDataTransferDTO(_),N=await this._proxy.$providePasteEdits(this.handle,M.id,y.uri,T,O,L);return N?{insertText:N.insertText,additionalEdit:N.additionalEdit?(0,i.reviveWorkspaceEditDto)(N.additionalEdit,this._uriIdentService):void 0}:void 0}finally{M.dispose()}}resolveFileData(y,T){return this.dataTransfers.resolveDropFileData(y,T)}};h=we([F(4,u.IUriIdentityService)],h);let v=class{constructor(y,T,_){this.handle=y,this._proxy=T,this._uriIdentService=_,this.dataTransfers=new c.DataTransferCache}async provideDocumentOnDropEdits(y,T,_,L){const M=this.dataTransfers.add(_);try{const O=await f.DataTransfer.toDataTransferDTO(_),N=await this._proxy.$provideDocumentOnDropEdits(this.handle,M.id,y.uri,T,O,L);return N?{insertText:N.insertText,additionalEdit:(0,i.reviveWorkspaceEditDto)(N.additionalEdit,this._uriIdentService)}:void 0}finally{M.dispose()}}resolveDocumentOnDropFileData(y,T){return this.dataTransfers.resolveDropFileData(y,T)}};v=we([F(2,u.IUriIdentityService)],v);class m{constructor(y,T,_,L){this._proxy=y,this._handle=T,this._legend=_,this.onDidChange=L}releaseDocumentSemanticTokens(y){y&&this._proxy.$releaseDocumentSemanticTokens(this._handle,parseInt(y,10))}getLegend(){return this._legend}async provideDocumentSemanticTokens(y,T,_){const L=T?parseInt(T,10):0,M=await this._proxy.$provideDocumentSemanticTokens(this._handle,y.uri,L,_);if(!M||_.isCancellationRequested)return null;const O=(0,r.decodeSemanticTokensDto)(M);return O.type==="full"?{resultId:String(O.id),data:O.data}:{resultId:String(O.id),edits:O.deltas}}}e.MainThreadDocumentSemanticTokensProvider=m;class w{constructor(y,T,_){this._proxy=y,this._handle=T,this._legend=_}getLegend(){return this._legend}async provideDocumentRangeSemanticTokens(y,T,_){const L=await this._proxy.$provideDocumentRangeSemanticTokens(this._handle,y.uri,T,_);if(!L||_.isCancellationRequested)return null;const M=(0,r.decodeSemanticTokensDto)(L);if(M.type==="full")return{resultId:String(M.id),data:M.data};throw new Error("Unexpected")}}e.MainThreadDocumentRangeSemanticTokensProvider=w}),define(ae[2535],le([1,0,67,77,9,19,2,374]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLocalization=void 0;let I=class extends k.Disposable{constructor(S,C,r){super(),this.fileService=C,this.languagePackService=r}async $fetchBuiltInBundleUri(S){try{return await this.languagePackService.getBuiltInExtensionTranslationsUri(S)}catch{return}}async $fetchBundleContents(S){return(await this.fileService.readFile(R.URI.revive(S))).value.toString()}};I=we([(0,p.extHostNamedCustomer)(t.MainContext.MainThreadLocalization),F(1,A.IFileService),F(2,E.ILanguagePackService)],I),e.MainThreadLocalization=I}),define(ae[2536],le([1,0,1452,36,67,77,47,26,6,31]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadMessageService=void 0;let S=class{constructor(r,u,i,f){this._notificationService=u,this._commandService=i,this._dialogService=f}dispose(){}$showMessage(r,u,i,f){return i.modal?this._showModalMessage(r,u,i.detail,f,i.useCustom):this._showMessage(r,u,f,i)}_showMessage(r,u,i,f){return new Promise(c=>{const l=i.map(a=>(0,p.toAction)({id:`_extension_message_handle_${a.handle}`,label:a.title,enabled:!0,run:()=>(c(a.handle),Promise.resolve())}));let s;f.source&&(s={label:t.localize(0,null,f.source.label),id:f.source.identifier.value}),s||(s=t.localize(1,null));const d=[];f.source&&d.push((0,p.toAction)({id:f.source.identifier.value,label:t.localize(2,null),run:()=>this._commandService.executeCommand("_extensions.manage",f.source.identifier.value)}));const n=this._notificationService.notify({severity:r,message:u,actions:{primary:l,secondary:d},source:s});I.Event.once(n.onDidClose)(()=>{c(void 0)})})}async _showModalMessage(r,u,i,f,c){let l;const s=f.map((n,a)=>(n.isCloseAffordance===!0&&(l=a),n.title));l===void 0&&(s.length>0?s.push(t.localize(3,null)):s.push(t.localize(4,null)),l=s.length-1);const{choice:d}=await this._dialogService.show(r,u,s,{cancelId:l,custom:c,detail:i});return d===f.length?void 0:f[d].handle}};S=we([(0,A.extHostNamedCustomer)(R.MainContext.MainThreadMessageService),F(1,E.INotificationService),F(2,b.ICommandService),F(3,k.IDialogService)],S),e.MainThreadMessageService=S}),define(ae[2537],le([1,0,56,32,6,2,531,77,385,142,349,67,25,146,31,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebooks=void 0;let c=class{constructor(s,d,n,a){this._notebookService=d,this._cellStatusBarService=n,this._logService=a,this._disposables=new A.DisposableStore,this._notebookProviders=new Map,this._notebookSerializer=new Map,this._notebookCellStatusBarRegistrations=new Map,this._proxy=s.getProxy(C.ExtHostContext.ExtHostNotebook)}dispose(){this._disposables.dispose();for(const s of this._notebookProviders.values())s.disposable.dispose();(0,A.dispose)(this._notebookSerializer.values())}async $registerNotebookProvider(s,d,n,a){const o={...n},g={get options(){return o},set options(v){o.transientCellMetadata=v.transientCellMetadata,o.transientDocumentMetadata=v.transientDocumentMetadata,o.transientOutputs=v.transientOutputs},open:async(v,m,w,D)=>{const y=await this._proxy.$openNotebook(d,v,m,w,D);return{data:k.NotebookDto.fromNotebookDataDto(y.value),transientOptions:o}},backup:async(v,m)=>""},h=new A.DisposableStore;h.add(this._notebookService.registerNotebookController(d,s,g)),a&&h.add(this._notebookService.registerContributedNotebookType(d,a)),this._notebookProviders.set(d,{controller:g,disposable:h})}async $unregisterNotebookProvider(s){const d=this._notebookProviders.get(s);d&&(d.disposable.dispose(),this._notebookProviders.delete(s))}$registerNotebookSerializer(s,d,n,a,o){const g=this._notebookService.registerNotebookSerializer(n,d,{options:a,dataToNotebook:async v=>{const m=new u.StopWatch(!0),w=await this._proxy.$dataToNotebook(s,v,p.CancellationToken.None),D=k.NotebookDto.fromNotebookDataDto(w.value);return this._logService.trace("[NotebookSerializer] dataToNotebook DONE",d.id,m.elapsed()),D},notebookToData:v=>{const m=new u.StopWatch(!0),w=this._proxy.$notebookToData(s,new S.SerializableObjectWithBuffers(k.NotebookDto.toNotebookDataDto(v)),p.CancellationToken.None);return this._logService.trace("[NotebookSerializer] notebookToData DONE",d.id,m.elapsed()),w}}),h=new A.DisposableStore;h.add(g),o&&h.add(this._notebookService.registerContributedNotebookType(n,o)),this._notebookSerializer.set(s,h)}$unregisterNotebookSerializer(s){this._notebookSerializer.get(s)?.dispose(),this._notebookSerializer.delete(s)}$emitCellStatusBarEvent(s){const d=this._notebookCellStatusBarRegistrations.get(s);d instanceof R.Emitter&&d.fire(void 0)}async $registerNotebookCellStatusBarItemProvider(s,d,n){const a=this,o={async provideCellStatusBarItems(h,v,m){const w=await a._proxy.$provideNotebookCellStatusBarItems(s,h,v,m);return{items:w?.items??[],dispose(){w&&a._proxy.$releaseNotebookCellStatusBarItems(w.cacheId)}}},viewType:n};if(typeof d=="number"){const h=new R.Emitter;this._notebookCellStatusBarRegistrations.set(d,h),o.onDidChangeStatusBarItems=h.event}const g=this._cellStatusBarService.registerCellStatusBarItemProvider(o);this._notebookCellStatusBarRegistrations.set(s,g)}async $unregisterNotebookCellStatusBarItemProvider(s,d){const n=a=>{this._notebookCellStatusBarRegistrations.get(a)&&(this._notebookCellStatusBarRegistrations.get(a)?.dispose(),this._notebookCellStatusBarRegistrations.delete(a))};n(s),typeof d=="number"&&n(d)}};c=we([(0,E.extHostNamedCustomer)(C.MainContext.MainThreadNotebook),F(1,b.INotebookService),F(2,I.INotebookCellStatusBarService),F(3,r.ILogService)],c),e.MainThreadNotebooks=c,i.CommandsRegistry.registerCommand("_executeDataToNotebook",async(l,...s)=>{const[d,n]=s;(0,f.assertType)(typeof d=="string","string"),(0,f.assertType)(n instanceof t.VSBuffer,"VSBuffer");const o=await l.get(b.INotebookService).withNotebookDataProvider(d);if(!(o instanceof b.SimpleNotebookProviderInfo))return;const g=await o.serializer.dataToNotebook(n);return new S.SerializableObjectWithBuffers(k.NotebookDto.toNotebookDataDto(g))}),i.CommandsRegistry.registerCommand("_executeNotebookToData",async(l,...s)=>{const[d,n]=s;(0,f.assertType)(typeof d=="string","string"),(0,f.assertType)(typeof n=="object");const o=await l.get(b.INotebookService).withNotebookDataProvider(d);if(!(o instanceof b.SimpleNotebookProviderInfo))return;const g=k.NotebookDto.fromNotebookDataDto(n.value);return await o.serializer.notebookToData(g)})}),define(ae[2538],le([1,0,2,52,9,8,161,101,267,273,58,24,67]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookEditors=void 0;class u{constructor(c,l){this.editor=c,this.disposables=l}dispose(){this.disposables.dispose()}}let i=class{constructor(c,l,s,d,n){this._editorService=l,this._notebookEditorService=s,this._editorGroupService=d,this._configurationService=n,this._disposables=new t.DisposableStore,this._mainThreadEditors=new Map,this._proxy=c.getProxy(r.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(c){for(const l of c){const s=new t.DisposableStore;s.add(l.onDidChangeVisibleRanges(()=>{this._proxy.$acceptEditorPropertiesChanged(l.getId(),{visibleRanges:{ranges:l.visibleRanges}})})),s.add(l.onDidChangeSelection(()=>{this._proxy.$acceptEditorPropertiesChanged(l.getId(),{selections:{selections:l.getSelections()}})}));const d=new u(l,s);this._mainThreadEditors.set(l.getId(),d)}}handleEditorsRemoved(c){for(const l of c)this._mainThreadEditors.get(l)?.dispose(),this._mainThreadEditors.delete(l)}_updateEditorViewColumns(){const c=Object.create(null);for(const l of this._editorService.visibleEditorPanes){const s=(0,E.getNotebookEditorFromEditorPane)(l);s&&this._mainThreadEditors.has(s.getId())&&(c[s.getId()]=(0,b.editorGroupToColumn)(this._editorGroupService,l.group))}(0,p.equals)(c,this._currentViewColumnInfo)||(this._currentViewColumnInfo=c,this._proxy.$acceptEditorViewColumns(c))}async $tryShowNotebookDocument(c,l,s){const d={cellSelections:s.selections,preserveFocus:s.preserveFocus,pinned:s.pinned,activation:s.preserveFocus?k.EditorActivation.RESTORE:void 0,override:l},n=await this._editorService.openEditor({resource:R.URI.revive(c),options:d},(0,b.columnToEditorGroup)(this._editorGroupService,this._configurationService,s.position)),a=(0,E.getNotebookEditorFromEditorPane)(n);if(a)return a.getId();throw new Error(`Notebook Editor creation failure for document ${c}`)}async $tryRevealRange(c,l,s){const d=this._notebookEditorService.getNotebookEditor(c);if(!d)return;const n=d;if(!n.hasModel()||l.start>=n.getLength())return;const a=n.cellAt(l.start);switch(s){case r.NotebookEditorRevealType.Default:return n.revealCellRangeInView(l);case r.NotebookEditorRevealType.InCenter:return n.revealInCenter(a);case r.NotebookEditorRevealType.InCenterIfOutsideViewport:return n.revealInCenterIfOutsideViewport(a);case r.NotebookEditorRevealType.AtTop:return n.revealInViewAtTop(a)}}$trySetSelections(c,l){const s=this._notebookEditorService.getNotebookEditor(c);!s||(s.setSelections(l),l.length&&s.setFocus({start:l[0].start,end:l[0].start+1}))}};i=we([F(1,C.IEditorService),F(2,I.INotebookEditorService),F(3,S.IEditorGroupsService),F(4,A.IConfigurationService)],i),e.MainThreadNotebookEditors=i}),define(ae[2539],le([1,0,16,21,6,2,9,42,531,77,267,162,228,67,142]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookKernels=void 0;class f{get preloadUris(){return this.preloads.map(s=>s.uri)}get preloadProvides(){return this.preloads.map(s=>s.provides).flat()}constructor(s,d){this._languageService=d,this._onDidChange=new R.Emitter,this.onDidChange=this._onDidChange.event,this.id=s.id,this.viewType=s.notebookType,this.extension=s.extensionId,this.implementsInterrupt=s.supportsInterrupt??!1,this.label=s.label,this.description=s.description,this.detail=s.detail,this.kind=s.kind,this.supportedLanguages=(0,t.isNonEmptyArray)(s.supportedLanguages)?s.supportedLanguages:d.getRegisteredLanguageIds(),this.implementsExecutionOrder=s.supportsExecutionOrder??!1,this.localResourceRoot=k.URI.revive(s.extensionLocation),this.preloads=s.preloads?.map(n=>({uri:k.URI.revive(n.uri),provides:n.provides}))??[]}update(s){const d=Object.create(null);s.label!==void 0&&(this.label=s.label,d.label=!0),s.description!==void 0&&(this.description=s.description,d.description=!0),s.detail!==void 0&&(this.detail=s.detail,d.detail=!0),s.kind!==void 0&&(this.kind=s.kind,d.kind=!0),s.supportedLanguages!==void 0&&(this.supportedLanguages=(0,t.isNonEmptyArray)(s.supportedLanguages)?s.supportedLanguages:this._languageService.getRegisteredLanguageIds(),d.supportedLanguages=!0),s.supportsExecutionOrder!==void 0&&(this.implementsExecutionOrder=s.supportsExecutionOrder,d.hasExecutionOrder=!0),s.supportsInterrupt!==void 0&&(this.implementsInterrupt=s.supportsInterrupt,d.hasInterruptHandler=!0),this._onDidChange.fire(d)}}let c=class{constructor(s,d,n,a,o,g){this._languageService=d,this._notebookKernelService=n,this._notebookExecutionStateService=a,this._notebookService=o,this._editors=new A.DisposableMap,this._disposables=new A.DisposableStore,this._kernels=new Map,this._executions=new Map,this._proxy=s.getProxy(u.ExtHostContext.ExtHostNotebookKernels),g.listNotebookEditors().forEach(this._onEditorAdd,this),g.onDidAddNotebookEditor(this._onEditorAdd,this,this._disposables),g.onDidRemoveNotebookEditor(this._onEditorRemove,this,this._disposables),this._disposables.add((0,A.toDisposable)(()=>{this._executions.forEach(h=>{h.complete({})})})),this._disposables.add(this._notebookExecutionStateService.onDidChangeCellExecution(h=>{this._proxy.$cellExecutionChanged(h.notebook,h.cellHandle,h.changed?.state)}))}dispose(){this._disposables.dispose();for(const[,s]of this._kernels.values())s.dispose();this._editors.dispose()}_onEditorAdd(s){const d=s.onDidReceiveMessage(n=>{if(!s.hasModel())return;const{selected:a}=this._notebookKernelService.getMatchingKernel(s.textModel);if(!!a){for(const[o,g]of this._kernels)if(g[0]===a){this._proxy.$acceptKernelMessageFromRenderer(o,s.getId(),n.message);break}}});this._editors.set(s,d)}_onEditorRemove(s){this._editors.deleteAndDispose(s)}async $postMessage(s,d,n){const a=this._kernels.get(s);if(!a)throw new Error("kernel already disposed");const[o]=a;let g=!1;for(const[h]of this._editors)if(!!h.hasModel()&&this._notebookKernelService.getMatchingKernel(h.textModel).selected===o){if(d===void 0)h.postMessage(n),g=!0;else if(h.getId()===d){h.postMessage(n),g=!0;break}}return g}async $addKernel(s,d){const n=this,a=new class extends f{async executeNotebookCellsRequest(h,v){await n._proxy.$executeCells(s,h,v)}async cancelNotebookCellExecution(h,v){await n._proxy.$cancelCells(s,h,v)}}(d,this._languageService),o=this._notebookKernelService.onDidChangeSelectedNotebooks(h=>{h.oldKernel===a.id?this._proxy.$acceptNotebookAssociation(s,h.notebook,!1):h.newKernel===a.id&&this._proxy.$acceptNotebookAssociation(s,h.notebook,!0)}),g=this._notebookKernelService.registerKernel(a);this._kernels.set(s,[a,(0,A.combinedDisposable)(o,g)])}$updateKernel(s,d){const n=this._kernels.get(s);n&&n[0].update(d)}$removeKernel(s){const d=this._kernels.get(s);d&&(d[1].dispose(),this._kernels.delete(s))}$updateNotebookPriority(s,d,n){const a=this._kernels.get(s);a&&this._notebookKernelService.updateKernelNotebookAffinity(a[0],k.URI.revive(d),n)}$createExecution(s,d,n,a){const o=k.URI.revive(n),g=this._notebookService.getNotebookTextModel(o);if(!g)throw new Error(`Notebook not found: ${o.toString()}`);const h=this._notebookKernelService.getMatchingKernel(g);if(!h.selected||h.selected.id!==d)throw new Error(`Kernel is not selected: ${h.selected?.id} !== ${d}`);const v=this._notebookExecutionStateService.createCellExecution(o,a);v.confirm(),this._executions.set(s,v)}$updateExecution(s,d){const n=d.value;try{this._executions.get(s)?.update(n.map(I.NotebookDto.fromCellExecuteUpdateDto))}catch(a){(0,p.onUnexpectedError)(a)}}$completeExecution(s,d){try{this._executions.get(s)?.complete(I.NotebookDto.fromCellExecuteCompleteDto(d.value))}catch(n){(0,p.onUnexpectedError)(n)}finally{this._executions.delete(s)}}};c=we([(0,b.extHostNamedCustomer)(u.MainContext.MainThreadNotebookKernels),F(1,E.ILanguageService),F(2,r.INotebookKernelService),F(3,C.INotebookExecutionStateService),F(4,i.INotebookService),F(5,S.INotebookEditorService)],c),e.MainThreadNotebookKernels=c}),define(ae[2540],le([1,0,2,67,77,645]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookRenderers=void 0;let k=class extends t.Disposable{constructor(I,b){super(),this.messaging=b,this.proxy=I.getProxy(p.ExtHostContext.ExtHostNotebookRenderers),this._register(b.onShouldPostMessage(S=>{this.proxy.$postRendererMessage(S.editorId,S.rendererId,S.message)}))}$postMessage(I,b,S){return this.messaging.receiveMessage(I,b,S)}};k=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadNotebookRenderers),F(1,A.INotebookRendererMessagingService)],k),e.MainThreadNotebookRenderers=k}),define(ae[2541],le([1,0,66,67,77,36,31,1453]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadProgress=void 0;class I extends A.Action{constructor(C,r,u){super(C,r,void 0,!0,()=>u.executeCommand("_extensions.manage",C))}}let b=class{constructor(C,r,u){this._commandService=u,this._progress=new Map,this._proxy=C.getProxy(p.ExtHostContext.ExtHostProgress),this._progressService=r}dispose(){this._progress.forEach(C=>C.resolve()),this._progress.clear()}async $startProgress(C,r,u){const i=this._createTask(C);r.location===15&&u&&(r={...r,location:15,secondaryActions:[new I(u,(0,E.localize)(0,null),this._commandService)]}),this._progressService.withProgress(r,i,()=>this._proxy.$acceptProgressCanceled(C))}$progressReport(C,r){this._progress.get(C)?.progress.report(r)}$progressEnd(C){const r=this._progress.get(C);r&&(r.resolve(),this._progress.delete(C))}_createTask(C){return r=>new Promise(u=>{this._progress.set(C,{resolve:u,progress:r})})}};b=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadProgress),F(1,t.IProgressService),F(2,k.ICommandService)],b),e.MainThreadProgress=b}),define(ae[2542],le([1,0,48,67,77,9]),function(J,e,t,p,R,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 E=class{constructor(b,S){this._items={},this.sessions=new Map,this._proxy=b.getProxy(p.ExtHostContext.ExtHostQuickOpen),this._quickInputService=S}dispose(){}$show(b,S,C){const r=new Promise((u,i)=>{this._items[b]={resolve:u,reject:i}});return S={...S,onDidFocus:u=>{u&&this._proxy.$onItemSelected(u.handle)}},S.canPickMany?this._quickInputService.pick(r,S,C).then(u=>{if(u)return u.map(i=>i.handle)}):this._quickInputService.pick(r,S,C).then(u=>{if(u)return u.handle})}$setItems(b,S){return this._items[b]&&(this._items[b].resolve(S),delete this._items[b]),Promise.resolve()}$setError(b,S){return this._items[b]&&(this._items[b].reject(S),delete this._items[b]),Promise.resolve()}$input(b,S,C){const r=Object.create(null);return b&&(r.title=b.title,r.password=b.password,r.placeHolder=b.placeHolder,r.valueSelection=b.valueSelection,r.prompt=b.prompt,r.value=b.value,r.ignoreFocusLost=b.ignoreFocusOut),S&&(r.validateInput=u=>this._proxy.$validateInput(u)),this._quickInputService.input(r,C)}$createOrUpdate(b){const S=b.id;let C=this.sessions.get(S);if(!C){const i=b.type==="quickPick"?this._quickInputService.createQuickPick():this._quickInputService.createInputBox();if(i.onDidAccept(()=>{this._proxy.$onDidAccept(S)}),i.onDidTriggerButton(f=>{this._proxy.$onDidTriggerButton(S,f.handle)}),i.onDidChangeValue(f=>{this._proxy.$onDidChangeValue(S,f)}),i.onDidHide(()=>{this._proxy.$onDidHide(S)}),b.type==="quickPick"){const f=i;f.onDidChangeActive(c=>{this._proxy.$onDidChangeActive(S,c.map(l=>l.handle))}),f.onDidChangeSelection(c=>{this._proxy.$onDidChangeSelection(S,c.map(l=>l.handle))}),f.onDidTriggerItemButton(c=>{this._proxy.$onDidTriggerItemButton(S,c.item.handle,c.button.handle)})}C={input:i,handlesToItems:new Map},this.sessions.set(S,C)}const{input:r,handlesToItems:u}=C;for(const i in b)i==="id"||i==="type"||(i==="visible"?b.visible?r.show():r.hide():i==="items"?(u.clear(),b[i].forEach(f=>{f.type!=="separator"&&(f.buttons&&(f.buttons=f.buttons.map(c=>(c.iconPath&&k(c.iconPath),c))),u.set(f.handle,f))}),r[i]=b[i]):i==="activeItems"||i==="selectedItems"?r[i]=b[i].filter(f=>u.has(f)).map(f=>u.get(f)):i==="buttons"?r[i]=b.buttons.map(f=>f.handle===-1?this._quickInputService.backButton:(f.iconPath&&k(f.iconPath),f)):r[i]=b[i]);return Promise.resolve(void 0)}$dispose(b){const S=this.sessions.get(b);return S&&(S.input.dispose(),this.sessions.delete(b)),Promise.resolve(void 0)}};E=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadQuickOpen),F(1,t.IQuickInputService)],E),e.MainThreadQuickOpen=E}),define(ae[2543],le([1,0,77,67,148,2,51]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadRemoteConnectionData=void 0;let E=class extends A.Disposable{constructor(b,S,C){super(),this._environmentService=S,this._proxy=b.getProxy(p.ExtHostContext.ExtHostExtensionService);const r=this._environmentService.remoteAuthority;r&&this._register(C.onDidChangeConnectionData(()=>{const u=C.getConnectionData(r);u&&this._proxy.$updateRemoteConnectionData(u)}))}};E=we([t.extHostCustomer,F(1,k.IWorkbenchEnvironmentService),F(2,R.IRemoteAuthorityResolverService)],E),e.MainThreadRemoteConnectionData=E}),define(ae[2544],le([1,0,9,6,2,216,67,77,1256,32,12]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSCM=void 0;class C{get hideWhenEmpty(){return!!this.features.hideWhenEmpty}constructor(c,l,s,d,n,a){this.sourceControlHandle=c,this.handle=l,this.provider=s,this.features=d,this.label=n,this.id=a,this.elements=[],this._onDidSplice=new p.Emitter,this.onDidSplice=this._onDidSplice.event,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event}toJSON(){return{$mid:4,sourceControlHandle:this.sourceControlHandle,groupHandle:this.handle}}splice(c,l,s){this.elements.splice(c,l,...s),this._onDidSplice.fire({start:c,deleteCount:l,toInsert:s})}$updateGroup(c){this.features={...this.features,...c},this._onDidChange.fire()}$updateGroupLabel(c){this.label=c,this._onDidChange.fire()}}class r{constructor(c,l,s,d,n,a,o,g,h){this.proxy=c,this.sourceControlHandle=l,this.groupHandle=s,this.handle=d,this.sourceUri=n,this.resourceGroup=a,this.decorations=o,this.contextValue=g,this.command=h}open(c){return this.proxy.$executeResourceCommand(this.sourceControlHandle,this.groupHandle,this.handle,c)}toJSON(){return{$mid:3,sourceControlHandle:this.sourceControlHandle,groupHandle:this.groupHandle,handle:this.handle}}}class u{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}constructor(c,l,s,d,n){this.proxy=c,this._handle=l,this._contextValue=s,this._label=d,this._rootUri=n,this._id=`scm${u.ID_HANDLE++}`,this.groups=new I.Sequence,this._groupsByHandle=Object.create(null),this._onDidChangeResources=new p.Emitter,this.onDidChangeResources=this._onDidChangeResources.event,this.features={},this._onDidChangeCommitTemplate=new p.Emitter,this.onDidChangeCommitTemplate=this._onDidChangeCommitTemplate.event,this._onDidChangeStatusBarCommands=new p.Emitter,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event}$updateSourceControl(c){this.features={...this.features,...c},this._onDidChange.fire(),typeof c.commitTemplate<"u"&&this._onDidChangeCommitTemplate.fire(this.commitTemplate),typeof c.statusBarCommands<"u"&&this._onDidChangeStatusBarCommands.fire(this.statusBarCommands)}$registerGroups(c){const l=c.map(([s,d,n,a])=>{const o=new C(this.handle,s,this,a,n,d);return this._groupsByHandle[s]=o,o});this.groups.splice(this.groups.elements.length,0,l)}$updateGroup(c,l){const s=this._groupsByHandle[c];!s||s.$updateGroup(l)}$updateGroupLabel(c,l){const s=this._groupsByHandle[c];!s||s.$updateGroupLabel(l)}$spliceGroupResourceStates(c){for(const[l,s]of c){const d=this._groupsByHandle[l];if(!d){console.warn(`SCM group ${l} not found in provider ${this.label}`);continue}s.reverse();for(const[n,a,o]of s){const g=o.map(h=>{const[v,m,w,D,y,T,_,L]=h,[M,O]=w,N=S.ThemeIcon.isThemeIcon(M)?M:t.URI.revive(M),P=(S.ThemeIcon.isThemeIcon(O)?O:t.URI.revive(O))||N,B={icon:N,iconDark:P,tooltip:D,strikeThrough:y,faded:T};return new r(this.proxy,this.handle,l,v,t.URI.revive(m),d,B,_||void 0,L)});d.splice(n,a,g)}}this._onDidChangeResources.fire()}$unregisterGroup(c){const l=this._groupsByHandle[c];!l||(delete this._groupsByHandle[c],this.groups.splice(this.groups.elements.indexOf(l),1),this._onDidChangeResources.fire())}async getOriginalResource(c){if(!this.features.hasQuickDiffProvider)return null;const l=await this.proxy.$provideOriginalResource(this.handle,c,b.CancellationToken.None);return l&&t.URI.revive(l)}toJSON(){return{$mid:5,handle:this.handle}}dispose(){}}u.ID_HANDLE=0;let i=class{constructor(c,l,s){this.scmService=l,this.scmViewService=s,this._repositories=new Map,this._repositoryDisposables=new Map,this._disposables=new R.DisposableStore,this._proxy=c.getProxy(k.ExtHostContext.ExtHostSCM)}dispose(){(0,R.dispose)(this._repositories.values()),this._repositories.clear(),(0,R.dispose)(this._repositoryDisposables.values()),this._repositoryDisposables.clear(),this._disposables.dispose()}$registerSourceControl(c,l,s,d){const n=new u(this._proxy,c,l,s,d?t.URI.revive(d):void 0),a=this.scmService.registerSCMProvider(n);this._repositories.set(c,a);const o=(0,R.combinedDisposable)(p.Event.filter(this.scmViewService.onDidFocusRepository,g=>g===a)(g=>this._proxy.$setSelectedSourceControl(c)),a.input.onDidChange(({value:g})=>this._proxy.$onInputBoxValueChange(c,g)));this.scmViewService.focusedRepository===a&&setTimeout(()=>this._proxy.$setSelectedSourceControl(c),0),a.input.value&&setTimeout(()=>this._proxy.$onInputBoxValueChange(c,a.input.value),0),this._repositoryDisposables.set(c,o)}$updateSourceControl(c,l){const s=this._repositories.get(c);if(!s)return;s.provider.$updateSourceControl(l)}$unregisterSourceControl(c){const l=this._repositories.get(c);!l||(this._repositoryDisposables.get(c).dispose(),this._repositoryDisposables.delete(c),l.dispose(),this._repositories.delete(c))}$registerGroups(c,l,s){const d=this._repositories.get(c);if(!d)return;const n=d.provider;n.$registerGroups(l),n.$spliceGroupResourceStates(s)}$updateGroup(c,l,s){const d=this._repositories.get(c);if(!d)return;d.provider.$updateGroup(l,s)}$updateGroupLabel(c,l,s){const d=this._repositories.get(c);if(!d)return;d.provider.$updateGroupLabel(l,s)}$spliceResourceStates(c,l){const s=this._repositories.get(c);if(!s)return;s.provider.$spliceGroupResourceStates(l)}$unregisterGroup(c,l){const s=this._repositories.get(c);if(!s)return;s.provider.$unregisterGroup(l)}$setInputBoxValue(c,l){const s=this._repositories.get(c);!s||s.input.setValue(l,!1)}$setInputBoxPlaceholder(c,l){const s=this._repositories.get(c);!s||(s.input.placeholder=l)}$setInputBoxEnablement(c,l){const s=this._repositories.get(c);!s||(s.input.enabled=l)}$setInputBoxVisibility(c,l){const s=this._repositories.get(c);!s||(s.input.visible=l)}$showValidationMessage(c,l,s){const d=this._repositories.get(c);!d||d.input.showValidationMessage(l,s)}$setValidationProviderIsEnabled(c,l){const s=this._repositories.get(c);!s||(l?s.input.validateInput=async(d,n)=>{const a=await this._proxy.$validateInput(c,d,n);return a&&{message:a[0],type:a[1]}}:s.input.validateInput=async()=>{})}};i=we([(0,E.extHostNamedCustomer)(k.MainContext.MainThreadSCM),F(1,A.ISCMService),F(2,A.ISCMViewService)],i),e.MainThreadSCM=i}),define(ae[2545],le([1,0,2,77,330,917,67,25]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSecretState=void 0;let I=class extends t.Disposable{constructor(S,C,r,u){super(),this.credentialsService=C,this.encryptionService=r,this.logService=u,this.secretStoragePrefix=this.credentialsService.getSecretStoragePrefix(),this._proxy=S.getProxy(k.ExtHostContext.ExtHostSecretState),this._register(this.credentialsService.onDidChangePassword(async i=>{const f=i.service.substring((await this.secretStoragePrefix).length);this._proxy.$onDidChangePassword({extensionId:f,key:i.account})}))}async getFullKey(S){return`${await this.secretStoragePrefix}${S}`}async $getPassword(S,C){this.logService.trace(`Getting password for ${S} extension:`,C);const r=await this.getFullKey(S),u=await this.credentialsService.getPassword(r,C);if(!u){this.logService.trace("No password found for:",C);return}let i;try{i=await this.encryptionService.decrypt(u)}catch(f){this.logService.error(f);const c=await this.encryptionService.encrypt(u);await this.credentialsService.setPassword(r,C,c);const l=await this.credentialsService.getPassword(r,C);i=l&&await this.encryptionService.decrypt(l)}if(i)try{const f=JSON.parse(i);if(f.extensionId===S)return this.logService.trace("Password found for:",C),f.content}catch(f){this.logService.error(f);try{await this.credentialsService.deletePassword(r,C)}catch(c){this.logService.error(c)}throw new Error("Unable to parse decrypted password")}this.logService.trace("No password found for:",C)}async $setPassword(S,C,r){const u=await this.getFullKey(S),i=JSON.stringify({extensionId:S,content:r}),f=await this.encryptionService.encrypt(i);return await this.credentialsService.setPassword(u,C,f)}async $deletePassword(S,C){try{const r=await this.getFullKey(S);await this.credentialsService.deletePassword(r,C)}catch{throw new Error("Cannot delete password")}}};I=we([(0,p.extHostNamedCustomer)(k.MainContext.MainThreadSecretState),F(1,R.ICredentialsService),F(2,A.IEncryptionService),F(3,E.ILogService)],I),e.MainThreadSecretState=I}),define(ae[2546],le([1,0,23,67,77,14,335,2494,5,25]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadStorage=void 0;let S=class{constructor(r,u,i,f,c){this._extensionStorageService=u,this._storageService=i,this._instantiationService=f,this._logService=c,this._sharedStorageKeysToWatch=new Map,this._proxy=r.getProxy(p.ExtHostContext.ExtHostStorage),this._storageListener=this._storageService.onDidChangeValue(l=>{const s=l.scope===0;s&&this._sharedStorageKeysToWatch.has(l.key)&&this._proxy.$acceptValue(s,l.key,this._extensionStorageService.getExtensionState(l.key,s))})}dispose(){this._storageListener.dispose()}async $initializeExtensionStorage(r,u){return await this.checkAndMigrateExtensionStorage(u,r),r&&this._sharedStorageKeysToWatch.set(u,!0),this._extensionStorageService.getExtensionState(u,r)}async $setValue(r,u,i){this._extensionStorageService.setExtensionState(u,i,r)}$registerExtensionStorageKeysToSync(r,u){this._extensionStorageService.setKeysForSync(r,u)}async checkAndMigrateExtensionStorage(r,u){try{let i=this._extensionStorageService.getSourceExtensionToMigrate(r);!i&&A.isWeb&&r!==r.toLowerCase()&&(i=r.toLowerCase()),i&&(A.isWeb&&i!==i.toLowerCase()&&this._extensionStorageService.getExtensionState(i.toLowerCase(),u)&&!this._extensionStorageService.getExtensionState(i,u)&&(i=i.toLowerCase()),await(0,E.migrateExtensionStorage)(i,r,u,this._instantiationService))}catch(i){this._logService.error(i)}}};S=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadStorage),F(1,k.IExtensionStorageService),F(2,t.IStorageService),F(3,I.IInstantiationService),F(4,b.ILogService)],S),e.MainThreadStorage=S}),define(ae[2547],le([1,0,1455,9,72,13,14,34,293,270,77,67,217,21]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTask=void 0;var i;(function(_){function L(M){return{id:M.id,task:w.from(M.task)}}_.from=L})(i||(i={}));var f;(function(_){function L(M,O){return{id:M.id,processId:O}}_.from=L})(f||(f={}));var c;(function(_){function L(M,O){return{id:M.id,exitCode:O}}_.from=L})(c||(c={}));var l;(function(_){function L(O){const N=Object.assign(Object.create(null),O);return delete N._key,N}_.from=L;function M(O,N){let P=I.TaskDefinition.createTaskIdentifier(O,console);return P===void 0&&N&&(P={_key:(0,R.generateUuid)(),type:"$executeOnly"}),P}_.to=M})(l||(l={}));var s;(function(_){function L(O){if(O!=null)return Object.assign(Object.create(null),O)}_.from=L;function M(O){return O==null?I.PresentationOptions.defaults:Object.assign(Object.create(null),I.PresentationOptions.defaults,O)}_.to=M})(s||(s={}));var d;(function(_){function L(O){if(O!=null)return Object.assign(Object.create(null),O)}_.from=L;function M(O){return O==null?I.RunOptions.defaults:Object.assign(Object.create(null),I.RunOptions.defaults,O)}_.to=M})(d||(d={}));var n;(function(_){function L(O){if(O!=null)return{cwd:O.cwd,env:O.env}}_.from=L;function M(O){return O==null?I.CommandOptions.defaults:{cwd:O.cwd||I.CommandOptions.defaults.cwd,env:O.env}}_.to=M})(n||(n={}));var a;(function(_){function L(N){const P=N;return P&&!!P.process}_.is=L;function M(N){const P=A.isString(N.name)?N.name:N.name.value,B=N.args?N.args.map(z=>A.isString(z)?z:z.value):[],V={process:P,args:B};return N.options&&(V.options=n.from(N.options)),V}_.from=M;function O(N){const P={runtime:I.RuntimeType.Process,name:N.process,args:N.args,presentation:void 0};return P.options=n.to(N.options),P}_.to=O})(a||(a={}));var o;(function(_){function L(O){if(O==null)return;const N={cwd:O.cwd||I.CommandOptions.defaults.cwd,env:O.env};return O.shell&&(N.executable=O.shell.executable,N.shellArgs=O.shell.args,N.shellQuoting=O.shell.quoting),N}_.from=L;function M(O){if(O==null)return;const N={cwd:O.cwd,env:O.env};return O.executable&&(N.shell={executable:O.executable},O.shellArgs&&(N.shell.args=O.shellArgs),O.shellQuoting&&(N.shell.quoting=O.shellQuoting)),N}_.to=M})(o||(o={}));var g;(function(_){function L(N){const P=N;return P&&(!!P.commandLine||!!P.command)}_.is=L;function M(N){const P={};return N.name&&A.isString(N.name)&&(N.args===void 0||N.args===null||N.args.length===0)?P.commandLine=N.name:(P.command=N.name,P.args=N.args),N.options&&(P.options=o.from(N.options)),P}_.from=M;function O(N){const P={runtime:I.RuntimeType.Shell,name:N.commandLine?N.commandLine:N.command,args:N.args,presentation:void 0};return N.options&&(P.options=o.to(N.options)),P}_.to=O})(g||(g={}));var h;(function(_){function L(N){const P=N;return P&&P.customExecution==="customExecution"}_.is=L;function M(N){return{customExecution:"customExecution"}}_.from=M;function O(N){return{runtime:I.RuntimeType.CustomExecution,presentation:void 0}}_.to=O})(h||(h={}));var v;(function(_){function L(O){const N={label:O.label};return O.kind===I.TaskSourceKind.Extension?(N.extensionId=O.extension,O.workspaceFolder?N.scope=O.workspaceFolder.uri:N.scope=O.scope):O.kind===I.TaskSourceKind.Workspace&&(N.extensionId="$core",N.scope=O.config.workspaceFolder?O.config.workspaceFolder.uri:1),N}_.from=L;function M(O,N){let P,B;return O.scope===void 0||typeof O.scope=="number"&&O.scope!==1?N.getWorkspace().folders.length===0?(P=1,B=void 0):(P=3,B=N.getWorkspace().folders[0]):typeof O.scope=="number"?P=O.scope:(P=3,B=A.withNullAsUndefined(N.getWorkspaceFolder(p.URI.revive(O.scope)))),{kind:I.TaskSourceKind.Extension,label:O.label,extension:O.extensionId,scope:P,workspaceFolder:B}}_.to=M})(v||(v={}));var m;(function(_){function L(M){const O=M;return O&&A.isString(O.id)&&!!O.workspaceFolder}_.is=L})(m||(m={}));var w;(function(_){function L(O){if(O==null||!I.CustomTask.is(O)&&!I.ContributedTask.is(O)&&!I.ConfiguringTask.is(O))return;const N={_id:O._id,name:O.configurationProperties.name,definition:l.from(O.getDefinition(!0)),source:v.from(O._source),execution:void 0,presentationOptions:!I.ConfiguringTask.is(O)&&O.command?s.from(O.command.presentation):void 0,isBackground:O.configurationProperties.isBackground,problemMatchers:[],hasDefinedMatchers:I.ContributedTask.is(O)?O.hasDefinedMatchers:!1,runOptions:d.from(O.runOptions)};if(N.group=D.from(O.configurationProperties.group),O.configurationProperties.detail&&(N.detail=O.configurationProperties.detail),!I.ConfiguringTask.is(O)&&O.command)switch(O.command.runtime){case I.RuntimeType.Process:N.execution=a.from(O.command);break;case I.RuntimeType.Shell:N.execution=g.from(O.command);break;case I.RuntimeType.CustomExecution:N.execution=h.from(O.command);break}if(O.configurationProperties.problemMatchers)for(const P of O.configurationProperties.problemMatchers)A.isString(P)&&N.problemMatchers.push(P);return N}_.from=L;function M(O,N,P,B,V){if(!O||typeof O.name!="string")return;let z;if(O.execution&&(g.is(O.execution)?z=g.to(O.execution):a.is(O.execution)?z=a.to(O.execution):h.is(O.execution)&&(z=h.to(O.execution))),!z)return;z.presentation=s.to(O.presentationOptions);const x=v.to(O.source,N),H=t.localize(0,null,x.label,O.name),W=l.to(O.definition,P),U=h.is(O.execution)&&O._id?O._id:`${O.source.extensionId}.${W._key}`;return new I.ContributedTask(U,x,H,W.type,W,z,O.hasDefinedMatchers,d.to(O.runOptions),{name:O.name,identifier:H,group:O.group,isBackground:!!O.isBackground,problemMatchers:O.problemMatchers.slice(),detail:O.detail,icon:B,hide:V})}_.to=M})(w||(w={}));var D;(function(_){function L(M){if(M!==void 0)return{_id:typeof M=="string"?M:M._id,isDefault:typeof M=="string"||typeof M.isDefault=="string"?!1:M.isDefault}}_.from=L})(D||(D={}));var y;(function(_){function L(O){return O}_.from=L;function M(O){return O}_.to=M})(y||(y={}));let T=class{constructor(L,M,O,N){this._taskService=M,this._workspaceContextServer=O,this._configurationResolverService=N,this._proxy=L.getProxy(C.ExtHostContext.ExtHostTask),this._providers=new Map,this._taskService.onDidStateChange(async P=>{const B=P.__task;if(P.kind==="start"){const V=i.from(B.getTaskExecution());let z=V.task.definition;if(V.task?.execution&&h.is(V.task.execution)&&P.resolvedVariables){const x={};for(const[H,W]of P.resolvedVariables.entries())x[H]=W;z=await this._configurationResolverService.resolveAnyAsync(B.getWorkspaceFolder(),V.task.definition,x)}this._proxy.$onDidStartTask(V,P.terminalId,z)}else P.kind==="processStarted"?this._proxy.$onDidStartTaskProcess(f.from(B.getTaskExecution(),P.processId)):P.kind==="processEnded"?this._proxy.$onDidEndTaskProcess(c.from(B.getTaskExecution(),P.exitCode)):P.kind==="end"&&this._proxy.$OnDidEndTask(i.from(B.getTaskExecution()))})}dispose(){for(const L of this._providers.values())L.disposable.dispose();this._providers.clear()}$createTaskId(L){return new Promise((M,O)=>{const N=w.to(L,this._workspaceContextServer,!0);N?M(N._id):O(new Error("Task could not be created from DTO"))})}$registerTaskProvider(L,M){const O={provideTasks:P=>Promise.resolve(this._proxy.$provideTasks(L,P)).then(B=>{const V=[];for(const z of B.tasks){const x=w.to(z,this._workspaceContextServer,!0);x?V.push(x):console.error(`Task System: can not convert task: ${JSON.stringify(z.definition,void 0,0)}. Task will be dropped`)}return{tasks:V,extension:B.extension}}),resolveTask:P=>{const B=w.from(P);return B?(B.name=B.name===void 0?"":B.name,Promise.resolve(this._proxy.$resolveTask(L,B)).then(V=>{if(V)return w.to(V,this._workspaceContextServer,!0,P.configurationProperties.icon,P.configurationProperties.hide)})):Promise.resolve(void 0)}},N=this._taskService.registerTaskProvider(O,M);return this._providers.set(L,{disposable:N,provider:O}),Promise.resolve(void 0)}$unregisterTaskProvider(L){const M=this._providers.get(L);return M&&(M.disposable.dispose(),this._providers.delete(L)),Promise.resolve(void 0)}$fetchTasks(L){return this._taskService.tasks(y.to(L)).then(M=>{const O=[];for(const N of M){const P=w.from(N);P&&O.push(P)}return O})}getWorkspace(L){let M;if(typeof L=="string")M=L;else{const O=this._workspaceContextServer.getWorkspace(),N=p.URI.revive(L);O.configuration?.toString()===N.toString()?M=O:M=this._workspaceContextServer.getWorkspaceFolder(N)}return M}async $getTaskExecution(L){if(m.is(L)){const M=this.getWorkspace(L.workspaceFolder);if(M){const O=await this._taskService.getTask(M,L.id,!0);if(O)return{id:O._id,task:w.from(O)};throw new Error("Task not found")}else throw new Error("No workspace folder")}else{const M=w.to(L,this._workspaceContextServer,!0);return{id:M._id,task:w.from(M)}}}$executeTask(L){return new Promise((M,O)=>{if(m.is(L)){const N=this.getWorkspace(L.workspaceFolder);N?this._taskService.getTask(N,L.id,!0).then(P=>{if(!P)O(new Error("Task not found"));else{const B={id:L.id,task:w.from(P)};this._taskService.run(P).then(V=>{(V?.exitCode===void 0||V.exitCode!==0)&&this._proxy.$OnDidEndTask(B)},V=>{}),M(B)}},P=>{O(new Error("Task not found"))}):O(new Error("No workspace folder"))}else{const N=w.to(L,this._workspaceContextServer,!0);this._taskService.run(N).then(void 0,B=>{});const P={id:N._id,task:w.from(N)};M(P)}})}$customExecutionComplete(L,M){return new Promise((O,N)=>{this._taskService.getActiveTasks().then(P=>{for(const B of P)if(L===B._id){this._taskService.extensionCallbackTaskComplete(B,M).then(V=>{O(void 0)},V=>{N(V)});return}N(new Error("Task to mark as complete not found"))})})}$terminateTask(L){return new Promise((M,O)=>{this._taskService.getActiveTasks().then(N=>{for(const P of N)if(L===P._id){this._taskService.terminate(P).then(B=>{M(void 0)},B=>{O(void 0)});return}O(new u.ErrorNoTelemetry("Task to terminate not found"))})})}$registerTaskSystem(L,M){let O;switch(M.platform){case"Web":O=0;break;case"win32":O=3;break;case"darwin":O=1;break;case"linux":O=2;break;default:O=k.platform}this._taskService.registerTaskSystem(L,{platform:O,uriProvider:N=>p.URI.from({scheme:M.scheme,authority:M.authority,path:N}),context:this._extHostContext,resolveVariables:(N,P,B)=>{const V=[];return P.variables.forEach(z=>V.push(z)),Promise.resolve(this._proxy.$resolveVariables(N.uri,{process:P.process,variables:V})).then(z=>{const x=Array.from(Object.values(z.variables));return new Promise((H,W)=>{this._configurationResolverService.resolveWithInteraction(N,x,"tasks",void 0,B).then(U=>{U||H(void 0);const $={process:void 0,variables:new Map};for(let q=0;q<x.length;q++){const X=V[q].substring(2,V[q].length-1);if(U&&z.variables[V[q]]===V[q]){const G=U.get(X);typeof G=="string"&&$.variables.set(X,G)}else $.variables.set(X,x[q])}A.isString(z.process)&&($.process=z.process),H($)},U=>{W(U)})})})},findExecutable:(N,P,B)=>this._proxy.$findExecutable(N,P,B)})}async $registerSupportedExecutions(L,M,O){return this._taskService.registerSupportedExecutions(L,M,O)}};T=we([(0,S.extHostNamedCustomer)(C.MainContext.MainThreadTask),F(1,b.ITaskService),F(2,E.IWorkspaceContextService),F(3,r.IConfigurationResolverService)],T),e.MainThreadTask=T}),define(ae[2548],le([1,0,2,81,46,27,213,77,67]),function(J,e,t,p,R,A,k,E,I){"use strict";var b;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTelemetry=void 0;let S=b=class extends t.Disposable{constructor(r,u,i,f){super(),this._telemetryService=u,this._environmentService=i,this._productService=f,this._proxy=r.getProxy(I.ExtHostContext.ExtHostTelemetry),(0,k.supportsTelemetry)(this._productService,this._environmentService)&&this._register(u.telemetryLevel.onDidChange(c=>{this._proxy.$onDidChangeTelemetryLevel(c)})),this._proxy.$initializeTelemetryLevel(this.telemetryLevel,this._productService.enabledTelemetryLevels)}get telemetryLevel(){return(0,k.supportsTelemetry)(this._productService,this._environmentService)?this._telemetryService.telemetryLevel.value:0}$publicLog(r,u=Object.create(null)){u[b._name]=!0,this._telemetryService.publicLog(r,u)}$publicLog2(r,u){this.$publicLog(r,u)}};S._name="pluginHostTelemetry",S=b=we([(0,E.extHostNamedCustomer)(I.MainContext.MainThreadTelemetry),F(1,A.ITelemetryService),F(2,p.IEnvironmentService),F(3,R.IProductService)],S),e.MainThreadTelemetry=S}),define(ae[2549],le([1,0,2,165,9,20,388,259,2413,271,456,247,291,77,67]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTesting=void 0;let f=class extends t.Disposable{constructor(l,s,d,n){super(),this.testService=s,this.testProfiles=d,this.resultService=n,this.diffListener=this._register(new t.MutableDisposable),this.testProviderRegistrations=new Map,this.proxy=l.getProxy(i.ExtHostContext.ExtHostTesting),this._register(this.testService.onDidCancelTestRun(({runId:a})=>{this.proxy.$cancelExtensionTestRun(a)})),this._register(n.onResultsChanged(a=>{const g=("completed"in a?a.completed:"inserted"in a?a.inserted:void 0)?.toJSON();g&&this.proxy.$publishTestResults([g])}))}$publishTestRunProfile(l){const s=this.testProviderRegistrations.get(l.controllerId);s&&this.testProfiles.addProfile(s.instance,l)}$updateTestRunConfig(l,s,d){this.testProfiles.updateProfile(l,s,d)}$removeTestProfile(l,s){this.testProfiles.removeProfile(l,s)}$addTestsToRun(l,s,d){this.withLiveRun(s,n=>n.addTestChainToRun(l,d.map(E.ITestItem.deserialize)))}$signalCoverageAvailable(l,s){this.withLiveRun(l,d=>{const n=d.tasks.find(a=>a.id===s);!n||(n.coverage.value=new I.TestCoverage({provideFileCoverage:async a=>(0,p.revive)(await this.proxy.$provideFileCoverage(l,s,a)),resolveFileCoverage:(a,o)=>this.proxy.$resolveFileCoverage(l,s,a,o)}))})}$startedExtensionTestRun(l){this.resultService.createLiveResult(l)}$startedTestRunTask(l,s){this.withLiveRun(l,d=>d.addTask(s))}$finishedTestRunTask(l,s){this.withLiveRun(l,d=>d.markTaskComplete(s))}$finishedExtensionTestRun(l){this.withLiveRun(l,s=>s.markComplete())}$updateTestStateInRun(l,s,d,n,a){this.withLiveRun(l,o=>o.updateState(d,s,n,a))}$appendOutputToRun(l,s,d,n,a){const o=n&&{uri:R.URI.revive(n.uri),range:A.Range.lift(n.range)};this.withLiveRun(l,g=>g.appendOutput(d,s,o,a))}$appendTestMessagesInRun(l,s,d,n){const a=this.resultService.getResult(l);if(a&&a instanceof S.LiveTestResult)for(const o of n)a.appendMessage(d,s,E.ITestMessage.deserialize(o))}$registerTestController(l,s,d){const n=new t.DisposableStore,a=n.add(new k.MutableObservableValue(s)),o=n.add(new k.MutableObservableValue(d)),g={id:l,label:a,canRefresh:o,syncTests:()=>this.proxy.$syncTests(),refreshTests:h=>this.proxy.$refreshTests(l,h),configureRunProfile:h=>this.proxy.$configureRunProfile(l,h),runTests:(h,v)=>this.proxy.$runControllerTests(h,v),expandTest:(h,v)=>this.proxy.$expandTest(h,isFinite(v)?v:-1)};n.add((0,t.toDisposable)(()=>this.testProfiles.removeProfile(l))),n.add(this.testService.registerTestController(l,g)),this.testProviderRegistrations.set(l,{instance:g,label:a,canRefresh:o,disposable:n})}$updateController(l,s){const d=this.testProviderRegistrations.get(l);!d||(s.label!==void 0&&(d.label.value=s.label),s.canRefresh!==void 0&&(d.canRefresh.value=s.canRefresh))}$unregisterTestController(l){this.testProviderRegistrations.get(l)?.disposable.dispose(),this.testProviderRegistrations.delete(l)}$subscribeToDiffs(){this.proxy.$acceptDiff(this.testService.collection.getReviverDiff().map(E.TestsDiffOp.serialize)),this.diffListener.value=this.testService.onDidProcessDiff(this.proxy.$acceptDiff,this.proxy)}$unsubscribeFromDiffs(){this.diffListener.clear()}$publishDiff(l,s){this.testService.publishDiff(l,s.map(E.TestsDiffOp.deserialize))}async $runTests(l,s){return(await this.testService.runResolvedTests(l,s)).id}dispose(){super.dispose();for(const l of this.testProviderRegistrations.values())l.disposable.dispose();this.testProviderRegistrations.clear()}withLiveRun(l,s){const d=this.resultService.getResult(l);return d&&d instanceof S.LiveTestResult?s(d):void 0}};f=we([(0,u.extHostNamedCustomer)(i.MainContext.MainThreadTesting),F(1,r.ITestService),F(2,b.ITestProfileService),F(3,C.ITestResultService)],f),e.MainThreadTesting=f}),define(ae[2550],le([1,0,67,77,12]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTheming=void 0;let A=class{constructor(E,I){this._themeService=I,this._proxy=E.getProxy(t.ExtHostContext.ExtHostTheming),this._themeChangeListener=this._themeService.onDidColorThemeChange(b=>{this._proxy.$onColorThemeChange(this._themeService.getColorTheme().type)}),this._proxy.$onColorThemeChange(this._themeService.getColorTheme().type)}dispose(){this._themeChangeListener.dispose()}};A=we([(0,p.extHostNamedCustomer)(t.MainContext.MainThreadTheming),F(1,R.IThemeService)],A),e.MainThreadTheming=A}),define(ae[2551],le([1,0,6,25,67,77,457,165]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTimeline=void 0;let I=class{constructor(S,C,r){this.logService=C,this._timelineService=r,this._providerEmitters=new Map,this._proxy=S.getProxy(R.ExtHostContext.ExtHostTimeline)}$registerTimelineProvider(S){this.logService.trace(`MainThreadTimeline#registerTimelineProvider: id=${S.id}`);const C=this._proxy,r=this._providerEmitters;let u=r.get(S.id);u===void 0&&(u=new t.Emitter,r.set(S.id,u)),this._timelineService.registerTimelineProvider({...S,onDidChange:u.event,async provideTimeline(i,f,c){return(0,E.revive)(await C.$getTimeline(S.id,i,f,c))},dispose(){r.delete(S.id),u?.dispose()}})}$unregisterTimelineProvider(S){this.logService.trace(`MainThreadTimeline#unregisterTimelineProvider: id=${S}`),this._timelineService.unregisterTimelineProvider(S)}$emitTimelineChangeEvent(S){this.logService.trace(`MainThreadTimeline#emitChangeEvent: id=${S.id}, uri=${S.uri?.toString(!0)}`),this._providerEmitters.get(S.id)?.fire(S)}dispose(){}};I=we([(0,A.extHostNamedCustomer)(R.MainContext.MainThreadTimeline),F(1,p.ILogService),F(2,k.ITimelineService)],I),e.MainThreadTimeline=I}),define(ae[2552],le([1,0,2,67,45,77,16,26,13,17,39,25,358,843,921]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTreeViews=void 0;let f=class extends t.Disposable{constructor(d,n,a,o,g){super(),this.viewsService=n,this.notificationService=a,this.extensionService=o,this.logService=g,this._dataProviders=new Map,this._dndControllers=new Map,this._proxy=d.getProxy(p.ExtHostContext.ExtHostTreeViews)}async $registerTreeViewDataProvider(d,n){this.logService.trace("MainThreadTreeViews#$registerTreeViewDataProvider",d,n),this.extensionService.whenInstalledExtensionsRegistered().then(()=>{const a=new l(d,this._proxy,this.notificationService);this._dataProviders.set(d,a);const o=n.hasHandleDrag||n.hasHandleDrop?new c(d,n.dropMimeTypes,n.dragMimeTypes,n.hasHandleDrag,this._proxy):void 0,g=this.getTreeView(d);g?(g.showCollapseAllAction=!!n.showCollapseAll,g.canSelectMany=!!n.canSelectMany,g.dragAndDropController=o,o&&this._dndControllers.set(d,o),g.dataProvider=a,this.registerListeners(d,g),this._proxy.$setVisible(d,g.visible)):this.notificationService.error("No view is registered with id: "+d)})}$reveal(d,n,a){return this.logService.trace("MainThreadTreeViews#$reveal",d,n?.item,n?.parentChain,a),this.viewsService.openView(d,a.focus).then(()=>{const o=this.getTreeView(d);if(o&&n)return this.reveal(o,this._dataProviders.get(d),n.item,n.parentChain,a)})}$refresh(d,n){this.logService.trace("MainThreadTreeViews#$refresh",d,n);const a=this.getTreeView(d),o=this._dataProviders.get(d);if(a&&o){const g=o.getItemsToRefresh(n);return a.refresh(g.length?g:void 0)}return Promise.resolve()}$setMessage(d,n){this.logService.trace("MainThreadTreeViews#$setMessage",d,n);const a=this.getTreeView(d);a&&(a.message=n)}$setTitle(d,n,a){this.logService.trace("MainThreadTreeViews#$setTitle",d,n,a);const o=this.getTreeView(d);o&&(o.title=n,o.description=a)}$setBadge(d,n){this.logService.trace("MainThreadTreeViews#$setBadge",d,n?.value,n?.tooltip);const a=this.getTreeView(d);a&&(a.badge=n)}$resolveDropFileData(d,n,a){const o=this._dndControllers.get(d);if(!o)throw new Error("Unknown tree");return o.resolveDropFileData(n,a)}async reveal(d,n,a,o,g){g=g||{select:!1,focus:!1};const h=(0,I.isUndefinedOrNull)(g.select)?!1:g.select,v=(0,I.isUndefinedOrNull)(g.focus)?!1:g.focus;let m=Math.min((0,I.isNumber)(g.expand)?g.expand:g.expand===!0?1:0,3);n.isEmpty()&&await d.refresh();for(const D of o){const y=n.getItem(D.handle);y&&await d.expand(y)}const w=n.getItem(a.handle);if(w){await d.reveal(w),h&&d.setSelection([w]),v&&d.setFocus(w);let D=[w];for(;D.length>0&&m>0;m--)await d.expand(D),D=D.reduce((y,T)=>{const _=n.getItem(T.handle);return _&&_.children&&_.children.length&&y.push(..._.children),y},[])}}registerListeners(d,n){this._register(n.onDidExpandItem(a=>this._proxy.$setExpanded(d,a.handle,!0))),this._register(n.onDidCollapseItem(a=>this._proxy.$setExpanded(d,a.handle,!1))),this._register(n.onDidChangeSelection(a=>this._proxy.$setSelection(d,a.map(({handle:o})=>o)))),this._register(n.onDidChangeFocus(a=>this._proxy.$setFocus(d,a.handle))),this._register(n.onDidChangeVisibility(a=>this._proxy.$setVisible(d,a))),this._register(n.onDidChangeCheckboxState(a=>{this._proxy.$changeCheckboxState(d,a.map(o=>({treeItemHandle:o.handle,newState:o.checkbox?.isChecked??!1})))}))}getTreeView(d){const n=b.Registry.as(R.Extensions.ViewsRegistry).getView(d);return n?n.treeView:null}dispose(){this._dataProviders.forEach((d,n)=>{const a=this.getTreeView(n);a&&(a.dataProvider=void 0)}),this._dataProviders.clear(),this._dndControllers.clear(),super.dispose()}};f=we([(0,A.extHostNamedCustomer)(p.MainContext.MainThreadTreeViews),F(1,R.IViewsService),F(2,E.INotificationService),F(3,S.IExtensionService),F(4,C.ILogService)],f),e.MainThreadTreeViews=f;class c{constructor(d,n,a,o,g){this.treeViewId=d,this.dropMimeTypes=n,this.dragMimeTypes=a,this.hasWillDrop=o,this._proxy=g,this.dataTransfersCache=new u.DataTransferCache}async handleDrop(d,n,a,o,g,h){const v=this.dataTransfersCache.add(d);try{return await this._proxy.$handleDrop(this.treeViewId,v.id,await i.DataTransfer.toDataTransferDTO(d),n?.handle,a,o,g,h)}finally{v.dispose()}}async handleDrag(d,n,a){if(!this.hasWillDrop)return;const o=await this._proxy.$handleDrag(this.treeViewId,d,n,a);if(!o)return;const g=new r.VSDataTransfer;return o.items.forEach(([h,v])=>{g.replace(h,(0,r.createStringDataTransferItem)(v.asString))}),g}resolveDropFileData(d,n){return this.dataTransfersCache.resolveDropFileData(d,n)}}class l{constructor(d,n,a){this.treeViewId=d,this._proxy=n,this.notificationService=a,this.itemsMap=new Map,this.hasResolve=this._proxy.$hasResolve(this.treeViewId)}getChildren(d){return this._proxy.$getChildren(this.treeViewId,d?d.handle:void 0).then(n=>this.postGetChildren(n),n=>(this.notificationService.error(n),[]))}getItemsToRefresh(d){const n=[];if(d)for(const a of Object.keys(d)){const o=this.getItem(a);if(o){const g=d[a];if(this.updateTreeItem(o,g),a===g.handle)n.push(o);else{this.itemsMap.delete(a),this.itemsMap.set(o.handle,o);const h=g.parentHandle?this.itemsMap.get(g.parentHandle):null;h&&n.push(h)}}}return n}getItem(d){return this.itemsMap.get(d)}isEmpty(){return this.itemsMap.size===0}async postGetChildren(d){if(d===void 0)return;const n=[],a=await this.hasResolve;if(d)for(const o of d){const g=new R.ResolvableTreeItem(o,a?h=>this._proxy.$resolve(this.treeViewId,o.handle,h):void 0);this.itemsMap.set(o.handle,g),n.push(g)}return n}updateTreeItem(d,n){if(n.children=n.children?n.children:void 0,d){const a=(0,k.distinct)([...Object.keys(d instanceof R.ResolvableTreeItem?d.asTreeItem():d),...Object.keys(n)]);for(const o of a)d[o]=n[o];d instanceof R.ResolvableTreeItem&&d.resetResolve()}}}}),define(ae[460],le([1,0,2,22,14,28,9,1458,41,46,67,2269,349]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.reviveWebviewContentOptions=e.reviveWebviewExtension=e.MainThreadWebviews=void 0;let u=class $a extends t.Disposable{constructor(l,s,d){super(),this._openerService=s,this._productService=d,this._webviews=new Map,this._proxy=l.getProxy(S.ExtHostContext.ExtHostWebviews)}addWebview(l,s,d){if(this._webviews.has(l))throw new Error("Webview already registered");this._webviews.set(l,s),this.hookupWebviewEventDelegate(l,s,d)}$setHtml(l,s){const d=this.getWebview(l);d.html=s}$setOptions(l,s){const d=this.getWebview(l);d.contentOptions=f(s)}async $postMessage(l,s,...d){const n=this.getWebview(l),{message:a,arrayBuffers:o}=(0,C.deserializeWebviewMessage)(s,d);return n.postMessage(a,o)}hookupWebviewEventDelegate(l,s,d){const n=new t.DisposableStore;n.add(s.onDidClickLink(a=>this.onDidClickLink(l,a))),n.add(s.onMessage(a=>{const o=(0,C.serializeWebviewMessage)(a.message,d);this._proxy.$onMessage(l,o.message,new r.SerializableObjectWithBuffers(o.buffers))})),n.add(s.onMissingCsp(a=>this._proxy.$onMissingCsp(l,a.value))),n.add(s.onDidDispose(()=>{n.dispose(),this._webviews.delete(l)}))}onDidClickLink(l,s){const d=this.getWebview(l);this.isSupportedLink(d,k.URI.parse(s))&&this._openerService.open(s,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:Array.isArray(d.contentOptions.enableCommandUris)||d.contentOptions.enableCommandUris===!0,fromWorkspace:!0})}isSupportedLink(l,s){return $a.standardSupportedLinkSchemes.has(s.scheme)||!R.isWeb&&this._productService.urlProtocol===s.scheme?!0:s.scheme===p.Schemas.command?Array.isArray(l.contentOptions.enableCommandUris)?l.contentOptions.enableCommandUris.includes(s.path):l.contentOptions.enableCommandUris===!0:!1}getWebview(l){const s=this._webviews.get(l);if(!s)throw new Error(`Unknown webview handle:${l}`);return s}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,E.localize)(0,null,(0,A.escape)(l))}</body> </html>`}};u.standardSupportedLinkSchemes=new Set([p.Schemas.http,p.Schemas.https,p.Schemas.mailto,p.Schemas.vscode,"vscode-insider"]),u=we([F(1,I.IOpenerService),F(2,b.IProductService)],u),e.MainThreadWebviews=u;function i(c){return{id:c.id,location:k.URI.revive(c.location)}}e.reviveWebviewExtension=i;function f(c){return{allowScripts:c.enableScripts,allowForms:c.enableForms,enableCommandUris:c.enableCommandUris,localResourceRoots:Array.isArray(c.localResourceRoots)?c.localResourceRoots.map(l=>k.URI.revive(l)):void 0,portMapping:c.portMapping}}e.reviveWebviewContentOptions=f}),define(ae[2553],le([1,0,2,18,9,75,460,67,202,77]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadEditorInsets=void 0;class S{constructor(u,i,f,c){this.editor=u,this.line=i,this.height=f,this.webview=c,this.domNode=document.createElement("div"),this.domNode.style.zIndex="10",this.afterLineNumber=i,this.afterColumn=1,this.heightInLines=f,u.changeViewZones(l=>this._id=l.addZone(this)),c.mountTo(this.domNode)}dispose(){this.editor.changeViewZones(u=>this._id&&u.removeZone(this._id))}}let C=class{constructor(u,i,f){this._editorService=i,this._webviewService=f,this._disposables=new t.DisposableStore,this._insets=new Map,this._proxy=u.getProxy(E.ExtHostContext.ExtHostEditorInsets)}dispose(){this._disposables.dispose()}async $createEditorInset(u,i,f,c,l,s,d,n){let a;i=i.substr(0,i.indexOf(","));for(const m of this._editorService.listCodeEditors())if(m.getId()===i&&m.hasModel()&&(0,p.isEqual)(m.getModel().uri,R.URI.revive(f))){a=m;break}if(!a){setTimeout(()=>this._proxy.$onDidDispose(u));return}const o=new t.DisposableStore,g=this._webviewService.createWebviewElement({id:"mainThreadCodeInsets_"+u,options:{enableFindWidget:!1},contentOptions:(0,k.reviveWebviewContentOptions)(s),extension:{id:d,location:R.URI.revive(n)}}),h=new S(a,c,l,g),v=()=>{o.dispose(),this._proxy.$onDidDispose(u),this._insets.delete(u)};o.add(a.onDidChangeModel(v)),o.add(a.onDidDispose(v)),o.add(h),o.add(g),o.add(g.onMessage(m=>this._proxy.$onDidReceiveMessage(u,m.message))),this._insets.set(u,h)}$disposeEditorInset(u){const i=this.getInset(u);this._insets.delete(u),i.dispose()}$setHtml(u,i){const f=this.getInset(u);f.webview.html=i}$setOptions(u,i){const f=this.getInset(u);f.webview.contentOptions=(0,k.reviveWebviewContentOptions)(i)}async $postMessage(u,i){return this.getInset(u).webview.postMessage(i),!0}getInset(u){const i=this._insets.get(u);if(!i)throw new Error("Unknown inset");return i}};C=we([(0,b.extHostNamedCustomer)(E.MainContext.MainThreadEditorInsets),F(1,A.ICodeEditorService),F(2,I.IWebviewService)],C),e.MainThreadEditorInsets=C}),define(ae[2554],le([1,0,21,2,460,67,660]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewsViews=void 0;let E=class extends p.Disposable{constructor(b,S,C){super(),this.mainThreadWebviews=S,this._webviewViewService=C,this._webviewViews=this._register(new p.DisposableMap),this._webviewViewProviders=this._register(new p.DisposableMap),this._proxy=b.getProxy(A.ExtHostContext.ExtHostWebviewViews)}$setWebviewViewTitle(b,S){const C=this.getWebviewView(b);C.title=S}$setWebviewViewDescription(b,S){const C=this.getWebviewView(b);C.description=S}$setWebviewViewBadge(b,S){const C=this.getWebviewView(b);C.badge=S}$show(b,S){this.getWebviewView(b).show(S)}$registerWebviewViewProvider(b,S,C){if(this._webviewViewProviders.has(S))throw new Error(`View provider for ${S} already registered`);const r=(0,R.reviveWebviewExtension)(b),u=this._webviewViewService.register(S,{resolve:async(i,f)=>{const c=i.webview.id;this._webviewViews.set(c,i),this.mainThreadWebviews.addWebview(c,i.webview,{serializeBuffersForPostMessage:C.serializeBuffersForPostMessage});let l;if(i.webview.state)try{l=JSON.parse(i.webview.state)}catch(s){console.error("Could not load webview state",s,i.webview.state)}i.webview.extension=r,C&&(i.webview.options=C),i.onDidChangeVisibility(s=>{this._proxy.$onDidChangeWebviewViewVisibility(c,s)}),i.onDispose(()=>{this._proxy.$disposeWebviewView(c),this._webviewViews.deleteAndDispose(c)});try{await this._proxy.$resolveWebviewView(c,S,i.title,l,f)}catch(s){(0,t.onUnexpectedError)(s),i.webview.html=this.mainThreadWebviews.getWebviewResolvedFailedContent(S)}}});this._webviewViewProviders.set(S,u)}$unregisterWebviewViewProvider(b){if(!this._webviewViewProviders.has(b))throw new Error(`No view provider for ${b} registered`);this._webviewViewProviders.deleteAndDispose(b)}getWebviewView(b){const S=this._webviewViews.get(b);if(!S)throw new Error("unknown webview view");return S}};E=we([F(2,k.IWebviewViewService)],E),e.MainThreadWebviewsViews=E}),define(ae[2555],le([1,0,747]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.logRemoteEntryIfError=e.logRemoteEntry=void 0;function p(A,k,E=null){const I=(0,t.parse)(k).args;let b=I.shift();if(typeof b=="string")switch(k.severity||(k.severity="info"),E&&(/^\[/.test(E)||(E=`[${E}]`),/ $/.test(E)||(E=`${E} `),b=E+b),k.severity){case"log":case"info":A.info(b,...I);break;case"warn":A.warn(b,...I);break;case"error":A.error(b,...I);break}}e.logRemoteEntry=p;function R(A,k,E){const I=(0,t.parse)(k).args,b=I.shift();typeof b!="string"||k.severity!=="error"||(/^\[/.test(E)||(E=`[${E}]`),/ $/.test(E)||(E=`${E} `),A.error(E+b,...I))}e.logRemoteEntryIfError=R}),define(ae[2556],le([1,0,77,67,81,747,2555,459,25]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadConsole=void 0;let b=class{constructor(C,r,u){this._environmentService=r,this._logService=u;const i=(0,E.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"))}};b=we([(0,t.extHostNamedCustomer)(p.MainContext.MainThreadConsole),F(1,R.IEnvironmentService),F(2,I.ILogService)],b),e.MainThreadConsole=b}),define(ae[2557],le([1,0,11,56,32,21,6,2,759,2520,349]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.RPCProtocol=e.ResponsiveState=e.RequestInitiator=e.parseJsonAndRestoreBufferRefs=e.stringifyJsonWithBufferRefs=void 0;function r(_,L){try{return JSON.stringify(_,L)}catch{return"null"}}const u="$$ref$$",i={[u]:-1};class f{constructor(L,M){this.jsonString=L,this.referencedBuffers=M}}function c(_,L=null,M=!1){const O=[];return{jsonString:(M?r:JSON.stringify)(_,(P,B)=>{if(typeof B>"u")return i;if(typeof B=="object"){if(B instanceof p.VSBuffer){const V=O.push(B)-1;return{[u]:V}}if(L)return L(P,B)}return B}),referencedBuffers:O}}e.stringifyJsonWithBufferRefs=c;function l(_,L,M){return JSON.parse(_,(O,N)=>{if(N){const P=N[u];if(typeof P=="number")return L[P];if(M&&N.$mid===1)return M.transformIncoming(N)}return N})}e.parseJsonAndRestoreBufferRefs=l;function s(_,L){return JSON.stringify(_,L)}function d(_){return _?(L,M)=>M&&M.$mid===1?_.transformOutgoing(M):M:null}var n;(function(_){_[_.LocalSide=0]="LocalSide",_[_.OtherSide=1]="OtherSide"})(n=e.RequestInitiator||(e.RequestInitiator={}));var a;(function(_){_[_.Responsive=0]="Responsive",_[_.Unresponsive=1]="Unresponsive"})(a=e.ResponsiveState||(e.ResponsiveState={}));const o=()=>{},g=Symbol.for("rpcProtocol"),h=Symbol.for("rpcProxy");class v extends E.Disposable{constructor(L,M=null,O=null){super(),this[C]=!0,this._onDidChangeResponsiveState=this._register(new k.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._protocol=L,this._logger=M,this._uriTransformer=O,this._uriReplacer=d(this._uriTransformer),this._isDisposed=!1,this._locals=[],this._proxies=[];for(let N=0,P=S.ProxyIdentifier.count;N<P;N++)this._locals[N]=null,this._proxies[N]=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(N=>this._receiveOneMessage(N))}dispose(){this._isDisposed=!0,Object.keys(this._pendingRPCReplies).forEach(L=>{this._pendingRPCReplies[L].resolveErr(A.canceled())})}drain(){return typeof this._protocol.drain=="function"?this._protocol.drain():Promise.resolve()}_onWillSendRequest(L){this._unacknowledgedCount===0&&(this._unresponsiveTime=Date.now()+v.UNRESPONSIVE_TIME),this._unacknowledgedCount++,this._asyncCheckUresponsive.isScheduled()||this._asyncCheckUresponsive.schedule()}_onDidReceiveAcknowledge(L){this._unresponsiveTime=Date.now()+v.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(L){this._responsiveState!==L&&(this._responsiveState=L,this._onDidChangeResponsiveState.fire(this._responsiveState))}get responsiveState(){return this._responsiveState}transformIncomingURIs(L){return this._uriTransformer?(0,I.transformIncomingURIs)(L,this._uriTransformer):L}getProxy(L){const{nid:M,sid:O}=L;return this._proxies[M]||(this._proxies[M]=this._createProxy(M,O)),this._proxies[M]}_createProxy(L,M){const O={get:(N,P)=>(typeof P=="string"&&!N[P]&&P.charCodeAt(0)===36&&(N[P]=(...B)=>this._remoteCall(L,P,B)),P===h?M:N[P])};return new Proxy(Object.create(null),O)}set(L,M){return this._locals[L.nid]=M,M}assertRegistered(L){for(let M=0,O=L.length;M<O;M++){const N=L[M];if(!this._locals[N.nid])throw new Error(`Missing proxy instance ${N.sid}`)}}_receiveOneMessage(L){if(this._isDisposed)return;const M=L.byteLength,O=m.read(L,0),N=O.readUInt8(),P=O.readUInt32();switch(N){case 1:case 2:{let{rpcId:B,method:V,args:z}=D.deserializeRequestJSONArgs(O);this._uriTransformer&&(z=(0,I.transformIncomingURIs)(z,this._uriTransformer)),this._receiveRequest(M,P,B,V,z,N===2);break}case 3:case 4:{let{rpcId:B,method:V,args:z}=D.deserializeRequestMixedArgs(O);this._uriTransformer&&(z=(0,I.transformIncomingURIs)(z,this._uriTransformer)),this._receiveRequest(M,P,B,V,z,N===4);break}case 5:{this._logger?.logIncoming(M,P,0,"ack"),this._onDidReceiveAcknowledge(P);break}case 6:{this._receiveCancel(M,P);break}case 7:{this._receiveReply(M,P,void 0);break}case 9:{let B=D.deserializeReplyOKJSON(O);this._uriTransformer&&(B=(0,I.transformIncomingURIs)(B,this._uriTransformer)),this._receiveReply(M,P,B);break}case 10:{const B=D.deserializeReplyOKJSONWithBuffers(O,this._uriTransformer);this._receiveReply(M,P,B);break}case 8:{const B=D.deserializeReplyOKVSBuffer(O);this._receiveReply(M,P,B);break}case 11:{let B=D.deserializeReplyErrError(O);this._uriTransformer&&(B=(0,I.transformIncomingURIs)(B,this._uriTransformer)),this._receiveReplyErr(M,P,B);break}case 12:{this._receiveReplyErr(M,P,void 0);break}default:console.error("received unexpected message"),console.error(L)}}_receiveRequest(L,M,O,N,P,B){this._logger?.logIncoming(L,M,1,`receiveRequest ${(0,S.getStringIdentifierForProxy)(O)}.${N}(`,P);const V=String(M);let z,x;if(B){const W=new R.CancellationTokenSource;P.push(W.token),z=this._invokeHandler(O,N,P),x=()=>W.cancel()}else z=this._invokeHandler(O,N,P),x=o;this._cancelInvokedHandlers[V]=x;const H=D.serializeAcknowledged(M);this._logger?.logOutgoing(H.byteLength,M,1,"ack"),this._protocol.send(H),z.then(W=>{delete this._cancelInvokedHandlers[V];const U=D.serializeReplyOK(M,W,this._uriReplacer);this._logger?.logOutgoing(U.byteLength,M,1,"reply:",W),this._protocol.send(U)},W=>{delete this._cancelInvokedHandlers[V];const U=D.serializeReplyErr(M,W);this._logger?.logOutgoing(U.byteLength,M,1,"replyErr:",W),this._protocol.send(U)})}_receiveCancel(L,M){this._logger?.logIncoming(L,M,1,"receiveCancel");const O=String(M);this._cancelInvokedHandlers[O]?.()}_receiveReply(L,M,O){this._logger?.logIncoming(L,M,0,"receiveReply:",O);const N=String(M);if(!this._pendingRPCReplies.hasOwnProperty(N))return;const P=this._pendingRPCReplies[N];delete this._pendingRPCReplies[N],P.resolveOk(O)}_receiveReplyErr(L,M,O){this._logger?.logIncoming(L,M,0,"receiveReplyErr:",O);const N=String(M);if(!this._pendingRPCReplies.hasOwnProperty(N))return;const P=this._pendingRPCReplies[N];delete this._pendingRPCReplies[N];let B;O&&(O.$isError?(B=new Error,B.name=O.name,B.message=O.message,B.stack=O.stack):B=O),P.resolveErr(B)}_invokeHandler(L,M,O){try{return Promise.resolve(this._doInvokeHandler(L,M,O))}catch(N){return Promise.reject(N)}}_doInvokeHandler(L,M,O){const N=this._locals[L];if(!N)throw new Error("Unknown actor "+(0,S.getStringIdentifierForProxy)(L));const P=N[M];if(typeof P!="function")throw new Error("Unknown method "+M+" on actor "+(0,S.getStringIdentifierForProxy)(L));return P.apply(N,O)}_remoteCall(L,M,O){if(this._isDisposed)return new b.CanceledLazyPromise;let N=null;if(O.length>0&&R.CancellationToken.isCancellationToken(O[O.length-1])&&(N=O.pop()),N&&N.isCancellationRequested)return Promise.reject(A.canceled());const P=D.serializeRequestArguments(O,this._uriReplacer),B=++this._lastMessageId,V=String(B),z=new b.LazyPromise;N&&N.onCancellationRequested(()=>{const H=D.serializeCancel(B);this._logger?.logOutgoing(H.byteLength,B,0,"cancel"),this._protocol.send(D.serializeCancel(B))}),this._pendingRPCReplies[V]=z,this._onWillSendRequest(B);const x=D.serializeRequest(B,L,M,P,!!N);return this._logger?.logOutgoing(x.byteLength,B,0,`request: ${(0,S.getStringIdentifierForProxy)(L)}.${M}(`,O),this._protocol.send(x),z}}e.RPCProtocol=v,C=g,v.UNRESPONSIVE_TIME=3*1e3;class m{static alloc(L,M,O){const N=new m(p.VSBuffer.alloc(O+1+4),0);return N.writeUInt8(L),N.writeUInt32(M),N}static read(L,M){return new m(L,M)}get buffer(){return this._buff}constructor(L,M){this._buff=L,this._offset=M}static sizeUInt8(){return 1}writeUInt8(L){this._buff.writeUInt8(L,this._offset),this._offset+=1}readUInt8(){const L=this._buff.readUInt8(this._offset);return this._offset+=1,L}writeUInt32(L){this._buff.writeUInt32BE(L,this._offset),this._offset+=4}readUInt32(){const L=this._buff.readUInt32BE(this._offset);return this._offset+=4,L}static sizeShortString(L){return 1+L.byteLength}writeShortString(L){this._buff.writeUInt8(L.byteLength,this._offset),this._offset+=1,this._buff.set(L,this._offset),this._offset+=L.byteLength}readShortString(){const L=this._buff.readUInt8(this._offset);this._offset+=1;const O=this._buff.slice(this._offset,this._offset+L).toString();return this._offset+=L,O}static sizeLongString(L){return 4+L.byteLength}writeLongString(L){this._buff.writeUInt32BE(L.byteLength,this._offset),this._offset+=4,this._buff.set(L,this._offset),this._offset+=L.byteLength}readLongString(){const L=this._buff.readUInt32BE(this._offset);this._offset+=4;const O=this._buff.slice(this._offset,this._offset+L).toString();return this._offset+=L,O}writeBuffer(L){this._buff.writeUInt32BE(L.byteLength,this._offset),this._offset+=4,this._buff.set(L,this._offset),this._offset+=L.byteLength}static sizeVSBuffer(L){return 4+L.byteLength}writeVSBuffer(L){this._buff.writeUInt32BE(L.byteLength,this._offset),this._offset+=4,this._buff.set(L,this._offset),this._offset+=L.byteLength}readVSBuffer(){const L=this._buff.readUInt32BE(this._offset);this._offset+=4;const M=this._buff.slice(this._offset,this._offset+L);return this._offset+=L,M}static sizeMixedArray(L){let M=0;M+=1;for(let O=0,N=L.length;O<N;O++){const P=L[O];switch(M+=1,P.type){case 1:M+=this.sizeLongString(P.value);break;case 2:M+=this.sizeVSBuffer(P.value);break;case 3:M+=this.sizeUInt32,M+=this.sizeLongString(P.value);for(let B=0;B<P.buffers.length;++B)M+=this.sizeVSBuffer(P.buffers[B]);break;case 4:break}}return M}writeMixedArray(L){this._buff.writeUInt8(L.length,this._offset),this._offset+=1;for(let M=0,O=L.length;M<O;M++){const N=L[M];switch(N.type){case 1:this.writeUInt8(1),this.writeLongString(N.value);break;case 2:this.writeUInt8(2),this.writeVSBuffer(N.value);break;case 3:this.writeUInt8(3),this.writeUInt32(N.buffers.length),this.writeLongString(N.value);for(let P=0;P<N.buffers.length;++P)this.writeBuffer(N.buffers[P]);break;case 4:this.writeUInt8(4);break}}}readMixedArray(){const L=this._buff.readUInt8(this._offset);this._offset+=1;const M=new Array(L);for(let O=0;O<L;O++)switch(this.readUInt8()){case 1:M[O]=this.readLongString();break;case 2:M[O]=this.readVSBuffer();break;case 3:{const P=this.readUInt32(),B=this.readLongString(),V=[];for(let z=0;z<P;++z)V.push(this.readVSBuffer());M[O]=new S.SerializableObjectWithBuffers(l(B,V,null));break}case 4:M[O]=void 0;break}return M}}m.sizeUInt32=4;var w;(function(_){_[_.Simple=0]="Simple",_[_.Mixed=1]="Mixed"})(w||(w={}));class D{static _useMixedArgSerialization(L){for(let M=0,O=L.length;M<O;M++)if(L[M]instanceof p.VSBuffer||L[M]instanceof S.SerializableObjectWithBuffers||typeof L[M]>"u")return!0;return!1}static serializeRequestArguments(L,M){if(this._useMixedArgSerialization(L)){const O=[];for(let N=0,P=L.length;N<P;N++){const B=L[N];if(B instanceof p.VSBuffer)O[N]={type:2,value:B};else if(typeof B>"u")O[N]={type:4};else if(B instanceof S.SerializableObjectWithBuffers){const{jsonString:V,referencedBuffers:z}=c(B.value,M);O[N]={type:3,value:p.VSBuffer.fromString(V),buffers:z}}else O[N]={type:1,value:p.VSBuffer.fromString(s(B,M))}}return{type:1,args:O}}return{type:0,args:s(L,M)}}static serializeRequest(L,M,O,N,P){switch(N.type){case 0:return this._requestJSONArgs(L,M,O,N.args,P);case 1:return this._requestMixedArgs(L,M,O,N.args,P)}}static _requestJSONArgs(L,M,O,N,P){const B=p.VSBuffer.fromString(O),V=p.VSBuffer.fromString(N);let z=0;z+=m.sizeUInt8(),z+=m.sizeShortString(B),z+=m.sizeLongString(V);const x=m.alloc(P?2:1,L,z);return x.writeUInt8(M),x.writeShortString(B),x.writeLongString(V),x.buffer}static deserializeRequestJSONArgs(L){const M=L.readUInt8(),O=L.readShortString(),N=L.readLongString();return{rpcId:M,method:O,args:JSON.parse(N)}}static _requestMixedArgs(L,M,O,N,P){const B=p.VSBuffer.fromString(O);let V=0;V+=m.sizeUInt8(),V+=m.sizeShortString(B),V+=m.sizeMixedArray(N);const z=m.alloc(P?4:3,L,V);return z.writeUInt8(M),z.writeShortString(B),z.writeMixedArray(N),z.buffer}static deserializeRequestMixedArgs(L){const M=L.readUInt8(),O=L.readShortString(),N=L.readMixedArray(),P=new Array(N.length);for(let B=0,V=N.length;B<V;B++){const z=N[B];typeof z=="string"?P[B]=JSON.parse(z):P[B]=z}return{rpcId:M,method:O,args:P}}static serializeAcknowledged(L){return m.alloc(5,L,0).buffer}static serializeCancel(L){return m.alloc(6,L,0).buffer}static serializeReplyOK(L,M,O){if(typeof M>"u")return this._serializeReplyOKEmpty(L);if(M instanceof p.VSBuffer)return this._serializeReplyOKVSBuffer(L,M);if(M instanceof S.SerializableObjectWithBuffers){const{jsonString:N,referencedBuffers:P}=c(M.value,O,!0);return this._serializeReplyOKJSONWithBuffers(L,N,P)}else return this._serializeReplyOKJSON(L,r(M,O))}static _serializeReplyOKEmpty(L){return m.alloc(7,L,0).buffer}static _serializeReplyOKVSBuffer(L,M){let O=0;O+=m.sizeVSBuffer(M);const N=m.alloc(8,L,O);return N.writeVSBuffer(M),N.buffer}static deserializeReplyOKVSBuffer(L){return L.readVSBuffer()}static _serializeReplyOKJSON(L,M){const O=p.VSBuffer.fromString(M);let N=0;N+=m.sizeLongString(O);const P=m.alloc(9,L,N);return P.writeLongString(O),P.buffer}static _serializeReplyOKJSONWithBuffers(L,M,O){const N=p.VSBuffer.fromString(M);let P=0;P+=m.sizeUInt32,P+=m.sizeLongString(N);for(const V of O)P+=m.sizeVSBuffer(V);const B=m.alloc(10,L,P);B.writeUInt32(O.length),B.writeLongString(N);for(const V of O)B.writeBuffer(V);return B.buffer}static deserializeReplyOKJSON(L){const M=L.readLongString();return JSON.parse(M)}static deserializeReplyOKJSONWithBuffers(L,M){const O=L.readUInt32(),N=L.readLongString(),P=[];for(let B=0;B<O;++B)P.push(L.readVSBuffer());return new S.SerializableObjectWithBuffers(l(N,P,M))}static serializeReplyErr(L,M){const O=M?r(A.transformErrorForSerialization(M),null):void 0;if(typeof O!="string")return this._serializeReplyErrEmpty(L);const N=p.VSBuffer.fromString(O);let P=0;P+=m.sizeLongString(N);const B=m.alloc(11,L,P);return B.writeLongString(N),B.buffer}static deserializeReplyErrError(L){const M=L.readLongString();return JSON.parse(M)}static _serializeReplyErrEmpty(L){return m.alloc(12,L,0).buffer}}var y;(function(_){_[_.RequestJSONArgs=1]="RequestJSONArgs",_[_.RequestJSONArgsWithCancellation=2]="RequestJSONArgsWithCancellation",_[_.RequestMixedArgs=3]="RequestMixedArgs",_[_.RequestMixedArgsWithCancellation=4]="RequestMixedArgsWithCancellation",_[_.Acknowledged=5]="Acknowledged",_[_.Cancel=6]="Cancel",_[_.ReplyOKEmpty=7]="ReplyOKEmpty",_[_.ReplyOKVSBuffer=8]="ReplyOKVSBuffer",_[_.ReplyOKJSON=9]="ReplyOKJSON",_[_.ReplyOKJSONWithBuffers=10]="ReplyOKJSONWithBuffers",_[_.ReplyErrError=11]="ReplyErrError",_[_.ReplyErrEmpty=12]="ReplyErrEmpty"})(y||(y={}));var T;(function(_){_[_.String=1]="String",_[_.VSBuffer=2]="VSBuffer",_[_.SerializedObjectWithBuffers=3]="SerializedObjectWithBuffers",_[_.Undefined=4]="Undefined"})(T||(T={}))}),define(ae[2558],le([1,0,21,6,2,51,5,77,2557,148,2014,15,24,146,56,39,70,11,25,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createExtensionHostManager=void 0;const n=!1,a=!0;function o(L,M,O,N,P,B){return O.lazyStart&&N&&P.length===0?L.createInstance(h,M,O,B):L.createInstance(g,M,O,P,B)}e.createExtensionHostManager=o;let g=class _s extends R.Disposable{get kind(){return this._extensionHost.runningLocation.kind}constructor(M,O,N,P,B,V,z,x){super(),this.extensionHostId=M,this._internalExtensionService=P,this._instantiationService=B,this._environmentService=V,this._telemetryService=z,this._logService=x,this._onDidChangeResponsiveState=this._register(new p.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._hasStarted=!1,this._cachedActivationEvents=new Map,this._resolvedActivationEvents=new Set,this._rpcProtocol=null,this._customers=[],this._extensionHost=O,this.onDidExit=this._extensionHost.onExit;const H={time:Date.now(),action:"starting",kind:(0,f.extensionHostKindToString)(this.kind)};this._telemetryService.publicLog2("extensionHostStartup",H),this._proxy=this._extensionHost.start().then(W=>{this._hasStarted=!0;const U={time:Date.now(),action:"success",kind:(0,f.extensionHostKindToString)(this.kind)};return this._telemetryService.publicLog2("extensionHostStartup",U),this._createExtensionHostCustomers(W)},W=>{this._logService.error(`Error received from starting extension host (kind: ${(0,f.extensionHostKindToString)(this.kind)})`),this._logService.error(W);const U={time:Date.now(),action:"error",kind:(0,f.extensionHostKindToString)(this.kind)};return W&&W.name&&(U.errorName=W.name),W&&W.message&&(U.errorMessage=W.message),W&&W.stack&&(U.errorStack=W.stack),this._telemetryService.publicLog2("extensionHostStartup",U,!0),null}),this._proxy.then(()=>{N.forEach(W=>this.activateByEvent(W,0)),this._register(T({measure:()=>this.measure()}))})}dispose(){this._extensionHost&&this._extensionHost.dispose(),this._rpcProtocol&&this._rpcProtocol.dispose();for(let M=0,O=this._customers.length;M<O;M++){const N=this._customers[M];try{N.dispose()}catch(P){t.onUnexpectedError(P)}}this._proxy=null,super.dispose()}async measure(){const M=await this._proxy;if(!M)return null;const O=await this._measureLatency(M),N=await this._measureDown(M),P=await this._measureUp(M);return{remoteAuthority:this._extensionHost.remoteAuthority,latency:O,down:N,up:P}}async ready(){await this._proxy}async _measureLatency(M){let N=0;for(let P=0;P<10;P++){const B=u.StopWatch.create(!0);await M.test_latency(P),B.stop(),N+=B.elapsed()}return N/10}static _convert(M,O){return M*1e3*8/O}async _measureUp(M){const N=i.VSBuffer.alloc(10485760),P=Math.ceil(Math.random()*256);for(let V=0;V<N.byteLength;V++)N.writeUInt8(V,P);const B=u.StopWatch.create(!0);return await M.test_up(N),B.stop(),_s._convert(10485760,B.elapsed())}async _measureDown(M){const N=u.StopWatch.create(!0);return await M.test_down(10485760),N.stop(),_s._convert(10485760,N.elapsed())}_createExtensionHostCustomers(M){let O=null;(n||this._environmentService.logExtensionHostCommunication)&&(O=new D),this._rpcProtocol=new I.RPCProtocol(M,O),this._register(this._rpcProtocol.onDidChangeResponsiveState(x=>this._onDidChangeResponsiveState.fire(x)));let N=null,P=[];const B={remoteAuthority:this._extensionHost.remoteAuthority,extensionHostKind:this.kind,getProxy:x=>this._rpcProtocol.getProxy(x),set:(x,H)=>this._rpcProtocol.set(x,H),dispose:()=>this._rpcProtocol.dispose(),assertRegistered:x=>this._rpcProtocol.assertRegistered(x),drain:()=>this._rpcProtocol.drain(),internalExtensionService:this._internalExtensionService,_setExtensionHostProxy:x=>{N=x},_setAllMainProxyIdentifiers:x=>{P=x}},V=E.ExtHostCustomersRegistry.getNamedCustomers();for(let x=0,H=V.length;x<H;x++){const[W,U]=V[x];try{const $=this._instantiationService.createInstance(U,B);this._customers.push($),this._rpcProtocol.set(W,$)}catch($){this._logService.critical(`Cannot instantiate named customer: '${W.sid}'`),this._logService.critical($),t.onUnexpectedError($)}}const z=E.ExtHostCustomersRegistry.getCustomers();for(const x of z)try{const H=this._instantiationService.createInstance(x,B);this._customers.push(H)}catch(H){this._logService.critical(H),t.onUnexpectedError(H)}if(!N)throw new Error("Missing IExtensionHostProxy!");return this._rpcProtocol.assertRegistered(P),N}async activate(M,O){const N=await this._proxy;return N?N.activate(M,O):!1}activateByEvent(M,O){return O===1&&!this._hasStarted?Promise.resolve():(this._cachedActivationEvents.has(M)||this._cachedActivationEvents.set(M,this._activateByEvent(M,O)),this._cachedActivationEvents.get(M))}activationEventIsDone(M){return this._resolvedActivationEvents.has(M)}async _activateByEvent(M,O){if(!this._proxy)return;const N=await this._proxy;!N||(await N.activateByEvent(M,O),this._resolvedActivationEvents.add(M))}async getInspectPort(M){if(this._extensionHost){M&&await this._extensionHost.enableInspectPort();const O=this._extensionHost.getInspectPort();if(O)return O}return 0}async resolveAuthority(M,O){const N=await this._proxy;if(!N)return{type:"error",error:{message:"Cannot resolve authority",code:b.RemoteAuthorityResolverErrorCode.Unknown,detail:void 0}};try{return N.resolveAuthority(M,O)}catch(P){return{type:"error",error:{message:P.message,code:b.RemoteAuthorityResolverErrorCode.Unknown,detail:P}}}}async getCanonicalURI(M,O){const N=await this._proxy;if(!N)throw new Error("Cannot resolve canonical URI");return N.getCanonicalURI(M,O)}async start(M,O){const N=await this._proxy;if(!N)return;const P=this._extensionHost.extensions.set(M,O);return N.startExtensionHost(P)}async extensionTestsExecute(){const M=await this._proxy;if(!M)throw new Error("Could not obtain Extension Host Proxy");return M.extensionTestsExecute()}representsRunningLocation(M){return this._extensionHost.runningLocation.equals(M)}async deltaExtensions(M){const O=await this._proxy;if(!!O)return this._extensionHost.extensions.delta(M),O.deltaExtensions(M)}containsExtension(M){return this._extensionHost.extensions.containsExtension(M)}async setRemoteEnvironment(M){const O=await this._proxy;if(!!O)return O.setRemoteEnvironment(M)}};g=we([F(4,k.IInstantiationService),F(5,A.IWorkbenchEnvironmentService),F(6,d.ITelemetryService),F(7,s.ILogService)],g);let h=class extends R.Disposable{get kind(){return this._extensionHost.runningLocation.kind}constructor(M,O,N,P,B){super(),this.extensionHostId=M,this._internalExtensionService=N,this._instantiationService=P,this._logService=B,this._onDidChangeResponsiveState=this._register(new p.Emitter),this.onDidChangeResponsiveState=this._onDidChangeResponsiveState.event,this._extensionHost=O,this.onDidExit=O.onExit,this._startCalled=new l.Barrier,this._actual=null,this._lazyStartExtensions=null}_createActual(M){return this._logService.info(`Creating lazy extension host: ${M}`),this._actual=this._register(this._instantiationService.createInstance(g,this.extensionHostId,this._extensionHost,[],this._internalExtensionService)),this._register(this._actual.onDidChangeResponsiveState(O=>this._onDidChangeResponsiveState.fire(O))),this._actual}async _getOrCreateActualAndStart(M){if(this._actual)return this._actual;const O=this._createActual(M);return await O.start([],[]),O}async ready(){await this._startCalled.wait(),this._actual&&await this._actual.ready()}representsRunningLocation(M){return this._extensionHost.runningLocation.equals(M)}async deltaExtensions(M){if(await this._startCalled.wait(),this._actual)return this._actual.deltaExtensions(M);if(this._lazyStartExtensions.delta(M),M.myToAdd.length>0){const O=this._createActual(`contains ${M.myToAdd.length} new extension(s) (installed or enabled): ${M.myToAdd.map(B=>B.value)}`),{toAdd:N,myToAdd:P}=this._lazyStartExtensions.toDelta();O.start(N,P);return}}containsExtension(M){return this._extensionHost.extensions.containsExtension(M)}async activate(M,O){return await this._startCalled.wait(),this._actual?this._actual.activate(M,O):!1}async activateByEvent(M,O){if(O===1)return this._actual?this._actual.activateByEvent(M,O):void 0;if(await this._startCalled.wait(),this._actual)return this._actual.activateByEvent(M,O)}activationEventIsDone(M){return this._startCalled.isOpen()?this._actual?this._actual.activationEventIsDone(M):!0:!1}async getInspectPort(M){return await this._startCalled.wait(),this._actual?this._actual.getInspectPort(M):0}async resolveAuthority(M,O){return await this._startCalled.wait(),this._actual?this._actual.resolveAuthority(M,O):{type:"error",error:{message:"Cannot resolve authority",code:b.RemoteAuthorityResolverErrorCode.Unknown,detail:void 0}}}async getCanonicalURI(M,O){if(await this._startCalled.wait(),this._actual)return this._actual.getCanonicalURI(M,O);throw new Error("Cannot resolve canonical URI")}async start(M,O){if(O.length>0){const P=this._createActual(`contains ${O.length} extension(s): ${O.map(B=>B.value)}.`).start(M,O);return this._startCalled.open(),P}this._lazyStartExtensions=new f.ExtensionHostExtensions,this._lazyStartExtensions.set(M,O),this._startCalled.open()}async extensionTestsExecute(){return await this._startCalled.wait(),(await this._getOrCreateActualAndStart("execute tests.")).extensionTestsExecute()}async setRemoteEnvironment(M){if(await this._startCalled.wait(),this._actual)return this._actual.setRemoteEnvironment(M)}};h=we([F(3,k.IInstantiationService),F(4,s.ILogService)],h);const v=[["#2977B1","#FC802D","#34A13A","#D3282F","#9366BA"],["#8B564C","#E177C0","#7F7F7F","#BBBE3D","#2EBECD"]];function m(L){if(Array.isArray(L))return L;if(L&&typeof L=="object"&&typeof L.toString=="function"){const M=L.toString();if(M!=="[object Object]")return M}return L}function w(L){return Array.isArray(L)?L.map(m):m(L)}class D{constructor(){this._totalIncoming=0,this._totalOutgoing=0}_log(M,O,N,P,B,V,z){z=w(z);const x=v[B],H=a?x[P%x.length]:"#000000";let W=[`%c[${M}]%c[${String(O).padStart(7)}]%c[len: ${String(N).padStart(5)}]%c${String(P).padStart(5)} - ${V}`,"color: darkgreen","color: grey","color: grey",`color: ${H}`];/\($/.test(V)?(W=W.concat(z),W.push(")")):W.push(z),console.log.apply(console,W)}logIncoming(M,O,N,P,B){this._totalIncoming+=M,this._log("Ext \u2192 Win",this._totalIncoming,M,O,N,P,B)}logOutgoing(M,O,N,P,B){this._totalOutgoing+=M,this._log("Win \u2192 Ext",this._totalOutgoing,M,O,N,P,B)}}const y=[];function T(L){return y.push(L),{dispose:()=>{for(let M=0;M<y.length;M++)if(y[M]===L){y.splice(M,1);return}}}}function _(){return y.slice(0)}(0,C.registerAction2)(class vr extends C.Action2{constructor(){super({id:"editor.action.measureExtHostLatency",title:{value:S.localize(0,null),original:"Measure Extension Host Latency"},category:c.Categories.Developer,f1:!0})}async run(M){const O=M.get(r.IEditorService),N=await Promise.all(_().map(P=>P.measure()));O.openEditor({resource:void 0,contents:N.map(vr._print).join(` `),options:{pinned:!0}})}static _print(M){return M?`${M.remoteAuthority?`Authority: ${M.remoteAuthority} `:""}Roundtrip latency: ${M.latency.toFixed(3)}ms Up: ${vr._printSpeed(M.up)} Down: ${vr._printSpeed(M.down)} `:""}static _printSpeed(M){return M<=1024?`${M} bps`:M<1024*1024?`${(M/1024).toFixed(1)} kbps`:`${(M/1024/1024).toFixed(1)} Mbps`}})}),define(ae[934],le([1,0,220,39,13,22,9,502,154]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostProfiler=void 0;let b=class{constructor(C,r,u){this._port=C,this._extensionService=r,this._profilingService=u}async start(){const C=await this._profilingService.startProfiling({port:this._port});return{stop:(0,I.once)(async()=>{const r=await this._profilingService.stopProfiling(C);await this._extensionService.whenInstalledExtensionsRegistered();const u=this._extensionService.extensions;return this._distill(r,u)})}}_distill(C,r){const u=t.TernarySearchTree.forUris();for(const h of r)h.extensionLocation.scheme===A.Schemas.file&&u.set(k.URI.file(h.extensionLocation.fsPath),h);const i=C.nodes,f=new Map,c=new Map;for(const h of i)f.set(h.id,h);function l(h,v){if(v){if(v==="self"&&h.callFrame.url){let m;try{m=u.findSubstr(k.URI.parse(h.callFrame.url))}catch{}m&&(v=m.identifier.value)}}else switch(h.callFrame.functionName){case"(root)":break;case"(program)":v="program";break;case"(garbage collector)":v="gc";break;default:v="self";break}if(c.set(h.id,v),h.children)for(const m of h.children){const w=f.get(m);w&&l(w,v)}}l(i[0],null);const s=C.samples||[],d=C.timeDeltas||[],n=[],a=[];let o=0,g;for(let h=0;h<s.length;h++){const v=s[h],m=c.get(v);m!==g&&(g&&(a.push(g),n.push(o)),g=(0,R.withNullAsUndefined)(m),o=0),o+=d[h]}return g&&(a.push(g),n.push(o)),{startTime:C.startTime,endTime:C.endTime,deltas:n,ids:a,data:C,getAggregatedTimes:()=>{const h=new Map;for(let v=0;v<a.length;v++){const m=a[v];h.set(m,(h.get(m)||0)+n[v])}return h}}}};b=we([F(1,p.IExtensionService),F(2,E.IV8InspectProfilingService)],b),e.ExtensionHostProfiler=b}),define(ae[2559],le([1,0,102,794]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerMainProcessRemoteService)(p.IExtensionHostStarter,p.ipcExtensionHostStarterChannelName)}),define(ae[392],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IElevatedFileService=void 0,e.IElevatedFileService=(0,t.createDecorator)("elevatedFileService")}),define(ae[674],le([1,0,19,5]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchFileService=void 0,e.IWorkbenchFileService=(0,p.refineServiceDecorator)(t.IFileService)}),define(ae[2560],le([1,0,6,2,9,19,77,67,56,34,25,8,674,600,144,28]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadFileSystem=void 0;let l=c=class{constructor(n,a,o,g,h){this._fileService=a,this._contextService=o,this._logService=g,this._configurationService=h,this._fileProvider=new p.DisposableMap,this._disposables=new p.DisposableStore,this._watches=new p.DisposableMap,this._proxy=n.getProxy(E.ExtHostContext.ExtHostFileSystem);const v=n.getProxy(E.ExtHostContext.ExtHostFileSystemInfo);for(const m of a.listCapabilities())v.$acceptProviderInfos(R.URI.from({scheme:m.scheme,path:"/dummy"}),m.capabilities);this._disposables.add(a.onDidChangeFileSystemProviderRegistrations(m=>v.$acceptProviderInfos(R.URI.from({scheme:m.scheme,path:"/dummy"}),m.provider?.capabilities??null))),this._disposables.add(a.onDidChangeFileSystemProviderCapabilities(m=>v.$acceptProviderInfos(R.URI.from({scheme:m.scheme,path:"/dummy"}),m.provider.capabilities)))}dispose(){this._disposables.dispose(),this._fileProvider.dispose(),this._watches.dispose()}async $registerFileSystemProvider(n,a,o){this._fileProvider.set(n,new s(this._fileService,a,o,n,this._proxy))}$unregisterProvider(n){this._fileProvider.deleteAndDispose(n)}$onFileSystemChange(n,a){const o=this._fileProvider.get(n);if(!o)throw new Error("Unknown file provider");o.$onFileSystemChange(a)}$stat(n){return this._fileService.stat(R.URI.revive(n)).then(a=>({ctime:a.ctime,mtime:a.mtime,size:a.size,permissions:a.readonly?A.FilePermission.Readonly:void 0,type:c._asFileType(a)})).catch(c._handleError)}$readdir(n){return this._fileService.resolve(R.URI.revive(n),{resolveMetadata:!1}).then(a=>{if(!a.isDirectory){const o=new Error(a.name);throw o.name=A.FileSystemProviderErrorCode.FileNotADirectory,o}return a.children?a.children.map(o=>[o.name,c._asFileType(o)]):[]}).catch(c._handleError)}static _asFileType(n){let a=0;return n.isFile?a+=A.FileType.File:n.isDirectory&&(a+=A.FileType.Directory),n.isSymbolicLink&&(a+=A.FileType.SymbolicLink),a}$readFile(n){return this._fileService.readFile(R.URI.revive(n)).then(a=>a.value).catch(c._handleError)}$writeFile(n,a){return this._fileService.writeFile(R.URI.revive(n),a).then(()=>{}).catch(c._handleError)}$rename(n,a,o){return this._fileService.move(R.URI.revive(n),R.URI.revive(a),o.overwrite).then(()=>{}).catch(c._handleError)}$copy(n,a,o){return this._fileService.copy(R.URI.revive(n),R.URI.revive(a),o.overwrite).then(()=>{}).catch(c._handleError)}$mkdir(n){return this._fileService.createFolder(R.URI.revive(n)).then(()=>{}).catch(c._handleError)}$delete(n,a){return this._fileService.del(R.URI.revive(n),a).catch(c._handleError)}static _handleError(n){if(n instanceof A.FileOperationError)switch(n.fileOperationResult){case 1:n.name=A.FileSystemProviderErrorCode.FileNotFound;break;case 0:n.name=A.FileSystemProviderErrorCode.FileIsADirectory;break;case 6:n.name=A.FileSystemProviderErrorCode.NoPermissions;break;case 4:n.name=A.FileSystemProviderErrorCode.FileExists;break}else if(n instanceof Error){const a=(0,A.toFileSystemProviderErrorCode)(n);a!==A.FileSystemProviderErrorCode.Unknown&&(n.name=a)}throw n}$ensureActivation(n){return this._fileService.activateProvider(n)}async $watch(n,a,o,g){const h=R.URI.revive(o),v=this._contextService.getWorkspaceFolder(h),m={...g};if(m.recursive)try{(await this._fileService.stat(h)).isDirectory||(m.recursive=!1)}catch(D){this._logService.error(`MainThreadFileSystem#$watch(): failed to stat a resource for file watching (extension: ${n}, path: ${h.toString(!0)}, recursive: ${m.recursive}, session: ${a}): ${D}`)}if(v&&m.recursive){this._logService.trace(`MainThreadFileSystem#$watch(): ignoring request to start watching because path is inside workspace (extension: ${n}, path: ${h.toString(!0)}, recursive: ${m.recursive}, session: ${a})`);return}if(this._logService.trace(`MainThreadFileSystem#$watch(): request to start watching (extension: ${n}, path: ${h.toString(!0)}, recursive: ${m.recursive}, session: ${a})`),m.recursive){const D=this._configurationService.getValue();if(D.files?.watcherExclude)for(const y in D.files.watcherExclude)D.files.watcherExclude[y]===!0&&m.excludes.push(y)}else if(v){const D=this._configurationService.getValue();if(D.files?.watcherExclude){for(const y in D.files.watcherExclude)if(D.files.watcherExclude[y]===!0){m.includes||(m.includes=[]);const T=`${(0,f.rtrim)(y,"/")}/${i.GLOBSTAR}`;m.includes.push((0,u.normalizeWatcherPattern)(v.uri.fsPath,T))}}if(!m.includes||m.includes.length===0){this._logService.trace(`MainThreadFileSystem#$watch(): ignoring request to start watching because path is inside workspace and no excludes are configured (extension: ${n}, path: ${h.toString(!0)}, recursive: ${m.recursive}, session: ${a})`);return}}const w=this._fileService.watch(h,m);this._watches.set(a,w)}$unwatch(n){this._watches.has(n)&&(this._logService.trace(`MainThreadFileSystem#$unwatch(): request to stop watching (session: ${n})`),this._watches.deleteAndDispose(n))}};l=c=we([(0,k.extHostNamedCustomer)(E.MainContext.MainThreadFileSystem),F(1,r.IWorkbenchFileService),F(2,b.IWorkspaceContextService),F(3,S.ILogService),F(4,C.IConfigurationService)],l),e.MainThreadFileSystem=l;class s{constructor(n,a,o,g,h){this._handle=g,this._proxy=h,this._onDidChange=new t.Emitter,this.onDidChangeFile=this._onDidChange.event,this.onDidChangeCapabilities=t.Event.None,this.capabilities=o,this._registration=n.registerProvider(a,this)}dispose(){this._registration.dispose(),this._onDidChange.dispose()}watch(n,a){const o=Math.random();return this._proxy.$watch(this._handle,o,n,a),(0,p.toDisposable)(()=>{this._proxy.$unwatch(this._handle,o)})}$onFileSystemChange(n){this._onDidChange.fire(n.map(s._createFileChange))}static _createFileChange(n){return{resource:R.URI.revive(n.resource),type:n.type}}stat(n){return this._proxy.$stat(this._handle,n).then(void 0,a=>{throw a})}readFile(n){return this._proxy.$readFile(this._handle,n).then(a=>a.buffer)}writeFile(n,a,o){return this._proxy.$writeFile(this._handle,n,I.VSBuffer.wrap(a),o)}delete(n,a){return this._proxy.$delete(this._handle,n,a)}mkdir(n){return this._proxy.$mkdir(this._handle,n)}readdir(n){return this._proxy.$readdir(this._handle,n)}rename(n,a,o){return this._proxy.$rename(this._handle,n,a,o)}copy(n,a,o){return this._proxy.$copy(this._handle,n,a,o)}open(n,a){return this._proxy.$open(this._handle,n,a)}close(n){return this._proxy.$close(this._handle,n)}read(n,a,o,g,h){return this._proxy.$read(this._handle,n,a,h).then(v=>(o.set(v.buffer,g),v.byteLength))}write(n,a,o,g,h){return this._proxy.$write(this._handle,n,a,I.VSBuffer.wrap(o).slice(g,g+h))}}}),define(ae[2561],le([1,0,164,22,9,19,35,89,128,392]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeElevatedFileService=void 0;let S=class{constructor(r,u,i){this.nativeHostService=r,this.fileService=u,this.environmentService=i}isSupported(r){return r.scheme===p.Schemas.file}async writeFileElevated(r,u,i){const f=R.URI.file((0,t.randomPath)(this.environmentService.userDataPath,"code-elevated"));try{await this.fileService.writeFile(f,u,i),await this.nativeHostService.writeElevated(f,r,i)}finally{await this.fileService.del(f)}return this.fileService.resolve(r,{resolveMetadata:!0})}};S=we([F(0,E.INativeHostService),F(1,A.IFileService),F(2,I.INativeWorkbenchEnvironmentService)],S),e.NativeElevatedFileService=S,(0,k.registerSingleton)(b.IElevatedFileService,S,1)}),define(ae[2562],le([1,0,2,183,600]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UniversalWatcherClient=void 0;class A extends R.AbstractUniversalWatcherClient{constructor(E,I,b,S){super(E,I,b),this.sharedProcessWorkerWorkbenchService=S,this.init()}createWatcher(E){const I=p.ProxyChannel.toService((0,p.getDelayedChannel)((async()=>{const{client:b,onDidTerminate:S}=await this.sharedProcessWorkerWorkbenchService.createWorker({moduleId:"vs/platform/files/node/watcher/watcherMain",type:"fileWatcher"});return S.then(({reason:C})=>{C&&this.onError(`terminated by itself with code ${C.code}, signal: ${C.signal}`)}),b.getChannel("watcher")})()));return E.add((0,t.toDisposable)(()=>I.stop())),I}}e.UniversalWatcherClient=A}),define(ae[2563],le([1,0,14,2106,796,2562]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiskFileSystemProvider=void 0;class k extends p.AbstractDiskFileSystemProvider{constructor(I,b,S){super(S,{watcher:{forceUniversal:!0}}),this.mainProcessService=I,this.sharedProcessWorkerWorkbenchService=b,this.provider=this._register(new R.DiskFileSystemProviderClient(this.mainProcessService.getChannel(R.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,b){return this.provider.readFile(I,b)}readFileStream(I,b,S){return this.provider.readFileStream(I,b,S)}writeFile(I,b,S){return this.provider.writeFile(I,b,S)}open(I,b){return this.provider.open(I,b)}close(I){return this.provider.close(I)}read(I,b,S,C,r){return this.provider.read(I,b,S,C,r)}write(I,b,S,C,r){return this.provider.write(I,b,S,C,r)}mkdir(I){return this.provider.mkdir(I)}delete(I,b){return this.provider.delete(I,b)}rename(I,b,S){return this.provider.rename(I,b,S)}copy(I,b,S){return this.provider.copy(I,b,S)}cloneFile(I,b){return this.provider.cloneFile(I,b)}createUniversalWatcher(I,b,S){return new A.UniversalWatcherClient(C=>I(C),C=>b(C),S,this.sharedProcessWorkerWorkbenchService)}createNonRecursiveWatcher(){throw new Error("Method not implemented in sandbox.")}}e.DiskFileSystemProvider=k}),define(ae[157],le([1,0,5,35,6,2,7,8,19,52,14,34]),function(J,e,t,p,R,A,k,E,I,b,S,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 r;(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"})(r=e.AutoSaveMode||(e.AutoSaveMode={})),e.IFilesConfigurationService=(0,t.createDecorator)("filesConfigurationService");let u=class qa extends A.Disposable{constructor(f,c,l){super(),this.configurationService=c,this.contextService=l,this._onAutoSaveConfigurationChange=this._register(new R.Emitter),this.onAutoSaveConfigurationChange=this._onAutoSaveConfigurationChange.event,this._onFilesAssociationChange=this._register(new R.Emitter),this.onFilesAssociationChange=this._onFilesAssociationChange.event,this.autoSaveAfterShortDelayContext=e.AutoSaveAfterShortDelayContext.bindTo(f);const s=c.getValue();this.currentFilesAssociationConfig=s?.files?.associations,this.currentHotExitConfig=s?.files?.hotExit||I.HotExitConfiguration.ON_EXIT,this.onFilesConfigurationChange(s),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(f=>{f.affectsConfiguration("files")&&this.onFilesConfigurationChange(this.configurationService.getValue())}))}onFilesConfigurationChange(f){switch(f?.files?.autoSave||qa.DEFAULT_AUTO_SAVE_MODE){case I.AutoSaveConfiguration.AFTER_DELAY:this.configuredAutoSaveDelay=f?.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=f?.files?.associations;(0,b.equals)(this.currentFilesAssociationConfig,l)||(this.currentFilesAssociationConfig=l,this._onFilesAssociationChange.fire());const s=f?.files?.hotExit;s===I.HotExitConfiguration.OFF||s===I.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?this.currentHotExitConfig=s: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 f=this.configurationService.getValue("files.autoSave");let c;return[I.AutoSaveConfiguration.AFTER_DELAY,I.AutoSaveConfiguration.ON_FOCUS_CHANGE,I.AutoSaveConfiguration.ON_WINDOW_CHANGE].some(l=>l===f)?c=I.AutoSaveConfiguration.OFF:c=I.AutoSaveConfiguration.AFTER_DELAY,this.configurationService.updateValue("files.autoSave",c)}get isHotExitEnabled(){return this.contextService.getWorkspace().transient?!1:this.currentHotExitConfig!==I.HotExitConfiguration.OFF}get hotExitConfiguration(){return this.currentHotExitConfig}preventSaveConflicts(f,c){return this.configurationService.getValue("files.saveConflictResolution",{resource:f,overrideIdentifier:c})!=="overwriteFileOnDisk"}};u.DEFAULT_AUTO_SAVE_MODE=S.isWeb?I.AutoSaveConfiguration.AFTER_DELAY:I.AutoSaveConfiguration.OFF,u=we([F(0,k.IContextKeyService),F(1,E.IConfigurationService),F(2,C.IWorkspaceContextService)],u),e.FilesConfigurationService=u,(0,p.registerSingleton)(e.IFilesConfigurationService,u,0)}),define(ae[191],le([1,0,5]),function(J,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 p;(function(A){A[A.NONE=0]="NONE",A[A.EDITS=1]="EDITS",A[A.NAVIGATION=2]="NAVIGATION"})(p=e.GoFilter||(e.GoFilter={}));var R;(function(A){A[A.DEFAULT=0]="DEFAULT",A[A.EDITOR_GROUP=1]="EDITOR_GROUP",A[A.EDITOR=2]="EDITOR"})(R=e.GoScope||(e.GoScope={}))}),define(ae[2564],le([1,0,6,14,13,8,5,49,25,26,17,23,611,34,109,127,2412,217,540,191,893,46,344,886]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalTerminalBackendContribution=void 0;let h=class{constructor(w,D){const y=w.createInstance(v,void 0);S.Registry.as(f.TerminalExtensions.Backend).registerTerminalBackend(y),D.handleNewRegisteredBackend(y)}};h=we([F(0,k.IInstantiationService),F(1,i.ITerminalService)],h),e.LocalTerminalBackendContribution=h;let v=class extends g.BaseTerminalBackend{constructor(w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U){super(_,T,W,U,N,y),this.remoteAuthority=w,this._instantiationService=D,this._localPtyService=_,this._labelService=L,this._shellEnvironmentService=M,this._storageService=O,this._configurationResolverService=N,this._configurationService=B,this._productService=V,this._historyService=z,this._terminalProfileResolverService=x,this._environmentVariableService=H,this._ptys=new Map,this._onDidRequestDetach=this._register(new t.Emitter),this.onDidRequestDetach=this._onDidRequestDetach.event,this._localPtyService.onProcessData(q=>this._ptys.get(q.id)?.handleData(q.event)),this._localPtyService.onDidChangeProperty(q=>this._ptys.get(q.id)?.handleDidChangeProperty(q.property)),this._localPtyService.onProcessExit(q=>{const X=this._ptys.get(q.id);X&&(X.handleExit(q.event),this._ptys.delete(q.id))}),this._localPtyService.onProcessReady(q=>this._ptys.get(q.id)?.handleReady(q.event)),this._localPtyService.onProcessReplay(q=>this._ptys.get(q.id)?.handleReplay(q.event)),this._localPtyService.onProcessOrphanQuestion(q=>this._ptys.get(q.id)?.handleOrphanQuestion()),this._localPtyService.onDidRequestDetach(q=>this._onDidRequestDetach.fire(q));const $=P.getValue(f.TERMINAL_CONFIG_SECTION);for(const q of Object.keys($.autoReplies)){const X=$.autoReplies[q];X&&this._localPtyService.installAutoReply(q,X)}this._register(P.onDidChangeConfiguration(async q=>{if(q.affectsConfiguration("terminal.integrated.autoReplies")){this._localPtyService.uninstallAllAutoReplies();const X=P.getValue(f.TERMINAL_CONFIG_SECTION);for(const G of Object.keys(X.autoReplies)){const Q=X.autoReplies[G];Q&&await this._localPtyService.installAutoReply(G,Q)}}}))}async requestDetachInstance(w,D){return this._localPtyService.requestDetachInstance(w,D)}async acceptDetachInstanceReply(w,D){if(!D){this._logService.warn("Cannot attach to feature terminals, custom pty terminals, or those without a persistentProcessId");return}return this._localPtyService.acceptDetachInstanceReply(w,D)}async persistTerminalState(){const w=Array.from(this._ptys.keys()),D=await this._localPtyService.serializeTerminalState(w);this._storageService.store("terminal.integrated.bufferState",D,1,1)}async updateTitle(w,D,y){await this._localPtyService.updateTitle(w,D,y)}async updateIcon(w,D,y,T){await this._localPtyService.updateIcon(w,D,y,T)}updateProperty(w,D,y){return this._localPtyService.updateProperty(w,D,y)}async createProcess(w,D,y,T,_,L,M,O){const N=await this._shellEnvironmentService.getShellEnv(),P=await this._localPtyService.createProcess(w,D,y,T,_,L,N,M,O,this._getWorkspaceId(),this._getWorkspaceName()),B=this._instantiationService.createInstance(c.LocalPty,P,O);return this._ptys.set(P,B),B}async attachToProcess(w){try{await this._localPtyService.attachToProcess(w);const D=this._instantiationService.createInstance(c.LocalPty,w,!0);return this._ptys.set(w,D),D}catch(D){this._logService.warn(`Couldn't attach to process ${D.message}`)}}async attachToRevivedProcess(w){try{const D=await this._localPtyService.getRevivedPtyNewId(w)??w;return await this.attachToProcess(D)}catch(D){this._logService.warn(`Couldn't attach to process ${D.message}`)}}async listProcesses(){return this._localPtyService.listProcesses()}async reduceConnectionGraceTime(){this._localPtyService.reduceConnectionGraceTime()}async getDefaultSystemShell(w){return this._localPtyService.getDefaultSystemShell(w)}async getProfiles(w,D,y){return this._localPtyService.getProfiles?.(this._workspaceContextService.getWorkspace().id,w,D,y)||[]}async getEnvironment(){return this._localPtyService.getEnvironment()}async getShellEnvironment(){return this._shellEnvironmentService.getShellEnv()}async getWslPath(w){return this._localPtyService.getWslPath(w)}async setTerminalLayoutInfo(w){const D={workspaceId:this._getWorkspaceId(),tabs:w?w.tabs:[]};await this._localPtyService.setTerminalLayoutInfo(D),this._storageService.store("terminal.integrated.layoutInfo",JSON.stringify(D),1,1)}async getTerminalLayoutInfo(){const w={workspaceId:this._getWorkspaceId()},D=this._storageService.get("terminal.integrated.bufferState",1),y=this._deserializeTerminalState(D);if(y)try{const T=this._historyService.getLastActiveWorkspaceRoot(),_=T?(0,R.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(T)):void 0,L=n.createVariableResolver(_,await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority),this._configurationResolverService);for(const O of y){const N=await this._resolveEnvironmentForRevive(L,O.shellLaunchConfig);O.processLaunchConfig.env=N}await this._localPtyService.reviveTerminalProcesses(y,Intl.DateTimeFormat().resolvedOptions().locale),this._storageService.remove("terminal.integrated.bufferState",1);const M=this._storageService.get("terminal.integrated.layoutInfo",1);M&&(await this._localPtyService.setTerminalLayoutInfo(JSON.parse(M)),this._storageService.remove("terminal.integrated.layoutInfo",1))}catch{}return this._localPtyService.getTerminalLayoutInfo(w)}async _resolveEnvironmentForRevive(w,D){const y=p.isWindows?"windows":p.isMacintosh?"osx":"linux",T=this._configurationService.getValue(`terminal.integrated.env.${y}`),_=await(D.useShellEnvironment?this.getShellEnvironment():this.getEnvironment()),L=await n.createTerminalEnvironment(D,T,w,this._productService.version,this._configurationService.getValue("terminal.integrated.detectLocale"),_);return!D.strictEnv&&!D.hideFromUser&&await this._environmentVariableService.mergedCollection.applyToProcessEnvironment(L,w),L}_getWorkspaceId(){return this._workspaceContextService.getWorkspace().id}_getWorkspaceName(){return this._labelService.getWorkspaceLabel(this._workspaceContextService.getWorkspace())}};v=we([F(1,k.IInstantiationService),F(2,u.IWorkspaceContextService),F(3,I.ILogService),F(4,r.ILocalPtyService),F(5,E.ILabelService),F(6,s.IShellEnvironmentService),F(7,C.IStorageService),F(8,l.IConfigurationResolverService),F(9,A.IConfigurationService),F(10,A.IConfigurationService),F(11,a.IProductService),F(12,d.IHistoryService),F(13,f.ITerminalProfileResolverService),F(14,o.IEnvironmentVariableService),F(15,b.INotificationService),F(16,d.IHistoryService)],v)}),define(ae[2565],le([1,0,22,1919,15,81,148,109,191]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerRemoteContributions=void 0;function b(){(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"workbench.action.terminal.newLocal",title:{value:(0,p.localize)(0,null),original:"Create New Integrated Terminal (Local)"},f1:!0})}async run(S){const C=S.get(I.IHistoryService),r=S.get(k.IRemoteAuthorityResolverService),u=S.get(A.INativeEnvironmentService),i=S.get(E.ITerminalService),f=S.get(E.ITerminalGroupService);let c;try{const s=C.getLastActiveWorkspaceRoot(t.Schemas.vscodeRemote);if(s){const d=await r.getCanonicalURI(s);d.scheme===t.Schemas.file&&(c=d)}}catch{}c||(c=u.userHome);const l=await i.createTerminal({cwd:c});return l?(i.setActiveInstance(l),f.showPanel(!0)):Promise.resolve(void 0)}})}e.registerRemoteContributions=b}),define(ae[74],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHostService=void 0,e.IHostService=(0,t.createDecorator)("hostService")}),define(ae[2566],le([1,0,6,2,9,41,77,67,74]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWindow=void 0;let b=class{constructor(C,r,u){this.hostService=r,this.openerService=u,this.disposables=new p.DisposableStore,this.proxy=C.getProxy(E.ExtHostContext.ExtHostWindow),t.Event.latch(r.onDidChangeFocus)(this.proxy.$onDidChangeWindowFocus,this.proxy,this.disposables)}dispose(){this.disposables.dispose()}$getWindowVisibility(){return Promise.resolve(this.hostService.hasFocus)}async $openUri(C,r,u){const i=R.URI.from(C);let f;return r&&R.URI.parse(r).toString()===i.toString()?f=r:f=i,this.openerService.open(f,{openExternal:!0,allowTunneling:u.allowTunneling,allowContributedOpeners:u.allowContributedOpeners})}async $asExternalUri(C,r){return(await this.openerService.resolveExternalUri(R.URI.revive(C),r)).resolved}};b=we([(0,k.extHostNamedCustomer)(E.MainContext.MainThreadWindow),F(1,I.IHostService),F(2,A.IOpenerService)],b),e.MainThreadWindow=b}),define(ae[319],le([1,0,1469,47,15,99,71,141,70,98,48,34,49,38,54,42,200,199,19,130,14,7,336,74,60,29,10,31,8,2078]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,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 _ extends R.Action2{constructor(U){super(U),this.removeFromRecentlyOpened={iconClass:v.Codicon.removeClose.classNames,tooltip:(0,t.localize)(1,null)},this.dirtyRecentlyOpenedFolder={iconClass:"dirty-workspace "+v.Codicon.closeDirty.classNames,tooltip:(0,t.localize)(2,null),alwaysVisible:!0},this.dirtyRecentlyOpenedWorkspace={...this.dirtyRecentlyOpenedFolder,tooltip:(0,t.localize)(3,null)}}async run(U){const $=U.get(c.IWorkspacesService),q=U.get(S.IQuickInputService),X=U.get(C.IWorkspaceContextService),G=U.get(r.ILabelService),Q=U.get(u.IKeybindingService),j=U.get(i.IModelService),K=U.get(f.ILanguageService),Y=U.get(g.IHostService),ee=U.get(p.IDialogService),ie=await $.getRecentlyOpened(),re=await $.getDirtyWorkspaces();let oe=!1;const se=new h.ResourceMap,te=new h.ResourceMap;for(const ge of re)(0,y.isFolderBackupInfo)(ge)?se.set(ge.folderUri,!0):(te.set(ge.workspace.configPath,ge.workspace),oe=!0);const Z=new h.ResourceMap,ne=new h.ResourceMap;for(const ge of ie.workspaces)(0,c.isRecentFolder)(ge)?Z.set(ge.folderUri,!0):(ne.set(ge.workspace.configPath,ge.workspace),oe=!0);const ce=[];for(const ge of ie.workspaces){const ue=(0,c.isRecentFolder)(ge)?se.has(ge.folderUri):te.has(ge.workspace.configPath);ce.push(this.toQuickPick(j,K,G,ge,ue))}for(const ge of re)(0,y.isFolderBackupInfo)(ge)&&!Z.has(ge.folderUri)?ce.push(this.toQuickPick(j,K,G,ge,!0)):(0,y.isWorkspaceBackupInfo)(ge)&&!ne.has(ge.workspace.configPath)&&ce.push(this.toQuickPick(j,K,G,ge,!0));const de=ie.files.map(ge=>this.toQuickPick(j,K,G,ge,!1)),he=ie.workspaces[0],pe=he&&X.isCurrentWorkspace((0,c.isRecentWorkspace)(he)?he.workspace:he.folderUri);let me;const Se={type:"separator",label:oe?(0,t.localize)(4,null):(0,t.localize)(5,null)},Ie={type:"separator",label:(0,t.localize)(6,null)},ve=[Se,...ce,Ie,...de],be=await q.pick(ve,{contextKey:e.inRecentFilesPickerContextKey,activeItem:[...ce,...de][pe?1:0],placeHolder:n.isMacintosh?(0,t.localize)(7,null):(0,t.localize)(8,null),matchOnDescription:!0,onKeyMods:ge=>me=ge,quickNavigate:this.isQuickNavigate()?{keybindings:Q.lookupKeybindings(this.desc.id)}:void 0,hideInput:this.isQuickNavigate(),onDidTriggerItemButton:async ge=>{if(ge.button===this.removeFromRecentlyOpened)await $.removeRecentlyOpened([ge.item.resource]),ge.removeItem();else if(ge.button===this.dirtyRecentlyOpenedFolder||ge.button===this.dirtyRecentlyOpenedWorkspace){const ue=ge.button===this.dirtyRecentlyOpenedWorkspace;(await ee.confirm({type:"question",title:ue?(0,t.localize)(9,null):(0,t.localize)(10,null),message:ue?(0,t.localize)(11,null):(0,t.localize)(12,null),detail:ue?(0,t.localize)(13,null):(0,t.localize)(14,null)})).confirmed&&(Y.openWindow([ge.item.openable],{remoteAuthority:ge.item.remoteAuthority||null}),q.cancel())}}});if(be)return Y.openWindow([be.openable],{forceNewWindow:me?.ctrlCmd,forceReuseWindow:me?.alt,remoteAuthority:be.remoteAuthority||null})}toQuickPick(U,$,q,X,G){let Q,j,K,Y,ee=!1;(0,c.isRecentFolder)(X)?(Y=X.folderUri,j=(0,l.getIconClasses)(U,$,Y,s.FileKind.FOLDER),Q={folderUri:Y},K=X.label||q.getWorkspaceLabel(Y,{verbose:!0})):(0,c.isRecentWorkspace)(X)?(Y=X.workspace.configPath,j=(0,l.getIconClasses)(U,$,Y,s.FileKind.ROOT_FOLDER),Q={workspaceUri:Y},K=X.label||q.getWorkspaceLabel(X.workspace,{verbose:!0}),ee=!0):(Y=X.fileUri,j=(0,l.getIconClasses)(U,$,Y,s.FileKind.FILE),Q={fileUri:Y},K=X.label||q.getUriLabel(Y));const{name:ie,parentPath:re}=(0,d.splitName)(K);return{iconClasses:j,label:ie,ariaLabel:G?ee?(0,t.localize)(15,null,ie):(0,t.localize)(16,null,ie):ie,description:re,buttons:G?[ee?this.dirtyRecentlyOpenedWorkspace:this.dirtyRecentlyOpenedFolder]:[this.removeFromRecentlyOpened],openable:Q,resource:Y,remoteAuthority:X.remoteAuthority}}}class L extends _{constructor(){super({id:L.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:2096,mac:{primary:304}},menu:{id:R.MenuId.MenubarRecentMenu,group:"y_more",order:1}})}isQuickNavigate(){return!1}}e.OpenRecentAction=L,L.ID="workbench.action.openRecent";class M extends _{constructor(){super({id:"workbench.action.quickOpenRecent",title:{value:(0,t.localize)(19,null),original:"Quick Open Recent..."},category:T,f1:!1})}isQuickNavigate(){return!0}}class O extends R.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:2340}},precondition:E.IsIOSContext.toNegated(),toggled:k.IsFullscreenContext,menu:[{id:R.MenuId.MenubarAppearanceMenu,group:"1_toggle_view",order:1}]})}run(U){return U.get(g.IHostService).toggleFullScreen()}}class N extends R.Action2{constructor(){super({id:N.ID,title:{value:(0,t.localize)(22,null),original:"Reload Window"},category:I.Categories.Developer,f1:!0,keybinding:{weight:200+50,when:E.IsDevelopmentContext,primary:2096}})}run(U){return U.get(g.IHostService).reload()}}e.ReloadWindowAction=N,N.ID="workbench.action.reloadWindow";class P extends R.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:R.MenuId.MenubarHelpMenu,group:"z_about",order:1,when:E.IsMacNativeContext.toNegated()}})}run(U){return U.get(p.IDialogService).about()}}class B extends R.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:n.isWeb?n.isWindows?(0,A.KeyChord)(2089,1068):3628:3116,secondary:n.isWeb?[3116]:void 0},menu:{id:R.MenuId.MenubarFileMenu,group:"1_new",order:3}})}run(U){return U.get(g.IHostService).openWindow({remoteAuthority:null})}}class V extends R.Action2{constructor(){super({id:"workbench.action.blur",title:{value:(0,t.localize)(27,null),original:"Remove keyboard focus from focused element"}})}run(){const U=document.activeElement;(0,m.isHTMLElement)(U)&&U.blur()}}(0,R.registerAction2)(B),(0,R.registerAction2)(O),(0,R.registerAction2)(M),(0,R.registerAction2)(L),(0,R.registerAction2)(N),(0,R.registerAction2)(P),(0,R.registerAction2)(V);const z=a.ContextKeyExpr.and(o.inQuickPickContext,a.ContextKeyExpr.has(e.inRecentFilesPickerContextKey)),x="workbench.action.quickOpenNavigateNextInRecentFilesPicker";b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:x,weight:200+50,handler:(0,o.getQuickNavigateHandler)(x,!0),when:z,primary:2096,mac:{primary:304}});const H="workbench.action.quickOpenNavigatePreviousInRecentFilesPicker";b.KeybindingsRegistry.registerCommandAndKeybindingRule({id:H,weight:200+50,handler:(0,o.getQuickNavigateHandler)(H,!1),when:z,primary:3120,mac:{primary:1328}}),w.CommandsRegistry.registerCommand("workbench.action.toggleConfirmBeforeClose",W=>{const U=W.get(D.IConfigurationService),$=U.inspect("window.confirmBeforeClose").userValue;return U.updateValue("window.confirmBeforeClose",$==="never"?"keyboardOnly":"never")}),R.MenuRegistry.appendMenuItem(R.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:E.IsWebContext}),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarFileMenu,{title:(0,t.localize)(29,null),submenu:R.MenuId.MenubarRecentMenu,group:"2_open",order:4})}),define(ae[2567],le([1,0,2,118,51,120,39,74]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionEnablementWorkspaceTrustTransitionParticipant=void 0;let I=class extends t.Disposable{constructor(S,C,r,u,i,f){super(),i.isWorkspaceTrustEnabled()&&f.workspaceTrustInitialized.then(()=>{const c=new class{async participate(l){l?await u.updateExtensionsEnablementsWhenWorkspaceTrustChanges():r.remoteAuthority?C.reload():(S.stopExtensionHosts(),await u.updateExtensionsEnablementsWhenWorkspaceTrustChanges(),S.startExtensionHosts())}};this._register(f.addWorkspaceTrustTransitionParticipant(c))})}};I=we([F(0,k.IExtensionService),F(1,E.IHostService),F(2,R.IWorkbenchEnvironmentService),F(3,A.IWorkbenchExtensionEnablementService),F(4,p.IWorkspaceTrustEnablementService),F(5,p.IWorkspaceTrustManagementService)],I),e.ExtensionEnablementWorkspaceTrustTransitionParticipant=I}),define(ae[2568],le([1,0,119,39,31,15,1653,100,26,36,74,2,32,11]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionDependencyChecker=void 0;let i=class extends C.Disposable{constructor(c,l,s,d){super(),this.extensionService=c,this.extensionsWorkbenchService=l,this.notificationService=s,this.hostService=d,R.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 c=await this.getAllMissingDependencies(),l=await this.extensionsWorkbenchService.queryLocal();return c.filter(s=>l.every(d=>!(0,E.areSameExtensions)(d.identifier,{id:s})))}async getAllMissingDependencies(){await this.extensionService.whenInstalledExtensionsRegistered();const c=this.extensionService.extensions.reduce((s,d)=>(s.add(d.identifier.value.toLowerCase()),s),new Set),l=new Set;for(const s of this.extensionService.extensions)s.extensionDependencies&&s.extensionDependencies.forEach(d=>{c.has(d.toLowerCase())||l.add(d)});return[...l.values()]}async installMissingDependencies(){const c=await this.getUninstalledMissingDependencies();if(c.length){const l=await this.extensionsWorkbenchService.getExtensions(c.map(s=>({id:s})),r.CancellationToken.None);l.length&&(await u.Promises.settled(l.map(s=>this.extensionsWorkbenchService.install(s))),this.notificationService.notify({severity:I.Severity.Info,message:(0,k.localize)(2,null),actions:{primary:[new b.Action("realod",(0,k.localize)(3,null),"",!0,()=>this.hostService.reload())]}}))}else this.notificationService.info((0,k.localize)(4,null))}};i=we([F(0,p.IExtensionService),F(1,t.IExtensionsWorkbenchService),F(2,I.INotificationService),F(3,S.IHostService)],i),e.ExtensionDependencyChecker=i}),define(ae[2569],le([1,0,6,34,2,382,19,18,8,93,24,57,145,156,66,32,11,74]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplorerService=e.UNDO_REDO_SOURCE=void 0,e.UNDO_REDO_SOURCE=new u.UndoRedoSource;let s=class ja{constructor(a,o,g,h,v,m,w,D,y){this.fileService=a,this.configurationService=o,this.contextService=g,this.clipboardService=h,this.editorService=v,this.uriIdentityService=m,this.bulkEditService=w,this.progressService=D,this.disposables=new R.DisposableStore,this.fileChangeEvents=[],this.config=this.configurationService.getValue("explorer"),this.model=new A.ExplorerModel(this.contextService,this.uriIdentityService,this.fileService,this.configurationService),this.disposables.add(this.model),this.disposables.add(this.fileService.onDidRunOperation(T=>this.onDidRunOperation(T))),this.onFileChangesScheduler=new c.RunOnceScheduler(async()=>{const T=this.fileChangeEvents;this.fileChangeEvents=[];const _=[2];this.config.sortOrder==="modified"&&_.push(0);let L=!1;this.roots.forEach(M=>{this.view&&!L&&(L=d(M,this.view,T,_))}),T.forEach(M=>{if(!L)for(const O of M.rawAdded){const N=this.model.findClosest((0,E.dirname)(O));if(N&&!N.getChild((0,E.basename)(O))){L=!0;break}}}),L&&await this.refresh(!1)},ja.EXPLORER_FILE_CHANGES_REACT_DELAY),this.disposables.add(this.fileService.onDidFilesChange(T=>{this.fileChangeEvents.push(T),!this.editable&&(this.onFileChangesScheduler.isScheduled()||this.onFileChangesScheduler.schedule())})),this.disposables.add(this.configurationService.onDidChangeConfiguration(T=>this.onConfigurationUpdated(this.configurationService.getValue(),T))),this.disposables.add(t.Event.any(this.fileService.onDidChangeFileSystemProviderRegistrations,this.fileService.onDidChangeFileSystemProviderCapabilities)(async T=>{let _=!1;this.model.roots.forEach(L=>{L.resource.scheme===T.scheme&&(_=!0,L.forgetChildren())}),_&&this.view&&await this.view.setTreeInput()})),this.disposables.add(this.model.onDidChangeRoots(()=>{this.view?.setTreeInput()})),this.disposables.add(y.onDidChangeFocus(T=>{T&&this.refresh(!1)}))}get roots(){return this.model.roots}get sortOrderConfiguration(){return{sortOrder:this.config.sortOrder,lexicographicOptions:this.config.sortOrderLexicographicOptions}}registerView(a){this.view=a}getContext(a,o=!1){if(!this.view)return[];const g=new Set(this.view.getContext(a));return g.forEach(h=>{try{if(a&&!o&&this.view?.isItemCollapsed(h)&&h.nestedChildren)for(const v of h.nestedChildren)g.add(v)}catch{return}}),[...g]}async applyBulkEdit(a,o){const g=new f.CancellationTokenSource,h=this.progressService.withProgress({location:o.progressLocation||10,title:o.progressLabel,cancellable:a.length>1,delay:500},async v=>{await this.bulkEditService.apply(a,{undoRedoSource:e.UNDO_REDO_SOURCE,label:o.undoLabel,code:"undoredo.explorerOperation",progress:v,token:g.token,confirmBeforeUndo:o.confirmBeforeUndo})},()=>g.cancel());await this.progressService.withProgress({location:1,delay:500},()=>h),g.dispose()}hasViewFocus(){return!!this.view&&this.view.hasFocus()}findClosest(a){return this.model.findClosest(a)}findClosestRoot(a){const o=this.model.roots.filter(g=>this.uriIdentityService.extUri.isEqualOrParent(a,g.resource)).sort((g,h)=>h.resource.path.length-g.resource.path.length);return o.length?o[0]:null}async setEditable(a,o){if(!this.view)return;o?this.editable={stat:a,data:o}:this.editable=void 0;const g=this.isEditable(a);await this.view.setEditable(a,g),!this.editable&&this.fileChangeEvents.length&&!this.onFileChangesScheduler.isScheduled()&&this.onFileChangesScheduler.schedule()}async setToCopy(a,o){const g=this.cutItems;this.cutItems=o?a:void 0,await this.clipboardService.writeResources(a.map(h=>h.resource)),this.view?.itemsCopied(a,o,g)}isCut(a){return!!this.cutItems&&this.cutItems.some(o=>this.uriIdentityService.extUri.isEqual(o.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,o){if(!this.view)return;const g=this.findClosest(a);if(g)return await this.view.selectResource(g.resource,o),Promise.resolve(void 0);const h={resolveTo:[a],resolveMetadata:this.config.sortOrder==="modified"},v=this.findClosestRoot(a);if(!!v)try{const m=await this.fileService.resolve(v.resource,h),w=A.ExplorerItem.create(this.fileService,this.configurationService,m,void 0,h.resolveTo);A.ExplorerItem.mergeLocalWithDisk(w,v);const D=v.find(a);await this.view.refresh(!0,v),await this.view.selectResource(D?D.resource:void 0,o)}catch{v.isError=!0,await this.view.refresh(!1,v)}}async refresh(a=!0){if(this.model.roots.forEach(o=>o.forgetChildren()),this.view){await this.view.refresh(!0);const o=this.editorService.activeEditor?.resource,g=this.configurationService.getValue().explorer.autoReveal;a&&o&&g&&this.select(o,g)}}async onDidRunOperation(a){const o=this.config.fileNesting.enabled;if(a.isOperation(0)||a.isOperation(3)){const g=a.target,h=(0,E.dirname)(g.resource),v=this.model.findAll(h);v.length&&await Promise.all(v.map(async m=>{const w=this.config.sortOrder==="modified";if(!m.isDirectoryResolved){const y=await this.fileService.resolve(m.resource,{resolveMetadata:w});if(y){const T=A.ExplorerItem.create(this.fileService,this.configurationService,y,m.parent);A.ExplorerItem.mergeLocalWithDisk(T,m)}}const D=A.ExplorerItem.create(this.fileService,this.configurationService,g,m.parent);m.removeChild(D),m.addChild(D),await this.view?.refresh(o,m)}))}else if(a.isOperation(2)){const g=a.resource,h=a.target,v=(0,E.dirname)(g),m=(0,E.dirname)(h.resource),w=this.model.findAll(g);if(w.every(y=>!y.nestedParent)&&this.uriIdentityService.extUri.isEqual(v,m))await Promise.all(w.map(async y=>{y.rename(h),await this.view?.refresh(o,y.parent)}));else{const y=this.model.findAll(m);y.length&&w.length&&await Promise.all(w.map(async(T,_)=>{const L=T.parent,M=T.nestedParent;T.move(y[_]),M&&await this.view?.refresh(!1,M),await this.view?.refresh(!1,L),await this.view?.refresh(o,y[_])}))}}else if(a.isOperation(1)){const g=this.model.findAll(a.resource);await Promise.all(g.map(async h=>{if(h.parent){const v=h.parent;v.removeChild(h);const m=h.nestedParent;m&&(m.removeChild(h),await this.view?.refresh(!1,m)),await this.view?.refresh(o,v)}}))}}async onConfigurationUpdated(a,o){let g=!1;o?.affectedKeys.some(m=>m.startsWith("explorer.fileNesting."))&&(g=!0);const h=a?.explorer?.sortOrder||"default";this.config.sortOrder!==h&&(g=this.config.sortOrder!==void 0);const v=a?.explorer?.sortOrderLexicographicOptions||"default";this.config.sortOrderLexicographicOptions!==v&&(g=g||this.config.sortOrderLexicographicOptions!==void 0),this.config=a.explorer,g&&await this.refresh()}dispose(){this.disposables.dispose()}};s.EXPLORER_FILE_CHANGES_REACT_DELAY=500,s=we([F(0,k.IFileService),F(1,I.IConfigurationService),F(2,p.IWorkspaceContextService),F(3,b.IClipboardService),F(4,S.IEditorService),F(5,C.IUriIdentityService),F(6,r.IBulkEditService),F(7,i.IProgressService),F(8,l.IHostService)],s),e.ExplorerService=s;function d(n,a,o,g){for(const[h,v]of n.children)if(a.isItemVisible(v)&&(o.some(m=>m.contains(v.resource,...g))||v.isDirectory&&v.isDirectoryResolved&&d(v,a,o,g)))return!0;return!1}}),define(ae[2570],le([1,0,1697,2,9,8,34,60,26,41,53,57,74,674]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceWatcher=void 0;let i=class extends p.Disposable{constructor(c,l,s,d,n,a,o){super(),this.fileService=c,this.configurationService=l,this.contextService=s,this.notificationService=d,this.openerService=n,this.uriIdentityService=a,this.hostService=o,this.watchedWorkspaces=new E.ResourceMap(g=>this.uriIdentityService.extUri.getComparisonKey(g)),this.registerListeners(),this.refresh()}registerListeners(){this._register(this.contextService.onDidChangeWorkspaceFolders(c=>this.onDidChangeWorkspaceFolders(c))),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onDidChangeWorkbenchState())),this._register(this.configurationService.onDidChangeConfiguration(c=>this.onDidChangeConfiguration(c))),this._register(this.fileService.onDidWatchError(c=>this.onDidWatchError(c)))}onDidChangeWorkspaceFolders(c){for(const l of c.removed)this.unwatchWorkspace(l);for(const l of c.added)this.watchWorkspace(l)}onDidChangeWorkbenchState(){this.refresh()}onDidChangeConfiguration(c){(c.affectsConfiguration("files.watcherExclude")||c.affectsConfiguration("files.watcherInclude"))&&this.refresh()}onDidWatchError(c){const l=c.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(R.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(c){const l=[],s=this.configurationService.getValue({resource:c.uri});if(s.files?.watcherExclude)for(const a in s.files.watcherExclude)s.files.watcherExclude[a]===!0&&l.push(a);const d=new E.ResourceMap(a=>this.uriIdentityService.extUri.getComparisonKey(a));if(d.set(c.uri,c.uri),s.files?.watcherInclude){for(const a of s.files.watcherInclude)if(!!a)if((0,S.isAbsolute)(a)){const o=R.URI.file(a).with({scheme:c.uri.scheme});this.uriIdentityService.extUri.isEqualOrParent(o,c.uri)&&d.set(o,o)}else{const o=c.toResource(a);d.set(o,o)}}const n=new p.DisposableStore;for(const[,a]of d)n.add(this.fileService.watch(a,{recursive:!0,excludes:l}));this.watchedWorkspaces.set(c.uri,n)}unwatchWorkspace(c){this.watchedWorkspaces.has(c.uri)&&((0,p.dispose)(this.watchedWorkspaces.get(c.uri)),this.watchedWorkspaces.delete(c.uri))}refresh(){this.unwatchWorkspaces();for(const c of this.contextService.getWorkspace().folders)this.watchWorkspace(c)}unwatchWorkspaces(){for(const[,c]of this.watchedWorkspaces)c.dispose();this.watchedWorkspaces.clear()}dispose(){super.dispose(),this.unwatchWorkspaces()}};i=we([F(0,u.IWorkbenchFileService),F(1,A.IConfigurationService),F(2,k.IWorkspaceContextService),F(3,I.INotificationService),F(4,b.IOpenerService),F(5,C.IUriIdentityService),F(6,r.IHostService)],i),e.WorkspaceWatcher=i}),define(ae[2571],le([1,0,6,74,89,35,49,51,243,2,2108,128,102]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let u=class extends S.NativeHostService{constructor(c,l){super(c.window.id,l)}};u=we([F(0,C.INativeWorkbenchEnvironmentService),F(1,r.IMainProcessService)],u);let i=class extends b.Disposable{constructor(c,l,s){super(),this.nativeHostService=c,this.labelService=l,this.environmentService=s,this._onDidChangeFocus=t.Event.latch(t.Event.any(t.Event.map(t.Event.filter(this.nativeHostService.onDidFocusWindow,d=>d===this.nativeHostService.windowId),()=>this.hasFocus),t.Event.map(t.Event.filter(this.nativeHostService.onDidBlurWindow,d=>d===this.nativeHostService.windowId),()=>this.hasFocus)),void 0,this._store)}get onDidChangeFocus(){return this._onDidChangeFocus}get hasFocus(){return document.hasFocus()}async hadLastFocus(){const c=await this.nativeHostService.getActiveWindowId();return typeof c>"u"?!1:c===this.nativeHostService.windowId}openWindow(c,l){return Array.isArray(c)?this.doOpenWindow(c,l):this.doOpenEmptyWindow(c)}doOpenWindow(c,l){const s=this.environmentService.remoteAuthority;return s&&(c.forEach(d=>d.label=d.label||this.getRecentLabel(d)),l?.remoteAuthority===void 0&&(l=l?{...l,remoteAuthority:s}:{remoteAuthority:s})),this.nativeHostService.openWindow(c,l)}getRecentLabel(c){return(0,I.isFolderToOpen)(c)?this.labelService.getWorkspaceLabel(c.folderUri,{verbose:!0}):(0,I.isWorkspaceToOpen)(c)?this.labelService.getWorkspaceLabel({id:"",configPath:c.workspaceUri},{verbose:!0}):this.labelService.getUriLabel(c.fileUri)}doOpenEmptyWindow(c){const l=this.environmentService.remoteAuthority;return!!l&&c?.remoteAuthority===void 0&&(c=c?{...c,remoteAuthority:l}:{remoteAuthority:l}),this.nativeHostService.openWindow(c)}toggleFullScreen(){return this.nativeHostService.toggleFullScreen()}focus(c){return this.nativeHostService.focusWindow(c)}restart(){return this.nativeHostService.relaunch()}reload(c){return this.nativeHostService.reload(c)}close(){return this.nativeHostService.closeWindow()}};i=we([F(0,R.INativeHostService),F(1,k.ILabelService),F(2,E.IWorkbenchEnvironmentService)],i),(0,A.registerSingleton)(p.IHostService,i,1),(0,A.registerSingleton)(R.INativeHostService,u,1)}),define(ae[179],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHoverService=void 0,e.IHoverService=(0,t.createDecorator)("hoverService")}),define(ae[2572],le([1,0,10,369,416,2,42,1809,31,8,103,437,95,269,179]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndicatorsLabelAriaLabel=e.SettingsTreeIndicatorsLabel=void 0;const f=t.$;let c=class{constructor(o,g,h,v,m,w,D){this.userDataSyncEnablementService=v,this.languageService=m,this.userDataProfilesService=w,this.commandService=D,this.indicatorsContainerElement=t.append(o,f(".misc-label")),this.indicatorsContainerElement.style.display="inline",this.hoverDelegate={showHover:(T,_)=>h.showHover(T,_),onDidHideHover:()=>{},delay:g.getValue("workbench.hover.delay"),placement:"element"},this.simpleHoverStore=new A.DisposableStore;const y=this.createScopeOverridesIndicator();this.workspaceTrustElement=this.createWorkspaceTrustElement(),this.scopeOverridesElement=y.element,this.scopeOverridesLabel=y.label,this.syncIgnoredElement=this.createSyncIgnoredElement(),this.defaultOverrideIndicatorElement=this.createDefaultOverrideIndicator(),this.scopeOverridesHover=new A.MutableDisposable,this.profilesEnabled=this.userDataProfilesService.isEnabled()}createWorkspaceTrustElement(){const o=f("span.setting-item-workspace-trust"),g=new R.SimpleIconLabel(o);g.text="$(warning) "+(0,E.localize)(0,null);const h=(0,E.localize)(1,null),m={markdown:{value:h+` [${(0,E.localize)(2,null)}](manage-workspace-trust).`,isTrusted:!1,supportHtml:!1},markdownNotSupportedFallback:h},w={linkHandler:D=>{this.commandService.executeCommand("workbench.trust.manage"),this.scopeOverridesHover.value?.hide()}};return this.simpleHoverStore.add((0,p.setupCustomHover)(this.hoverDelegate,o,m,w)),o}createScopeOverridesIndicator(){const o=f("span.setting-item-overrides"),g=new R.SimpleIconLabel(o);return{element:o,label:g}}createSyncIgnoredElement(){const o=f("span.setting-item-ignored"),g=new R.SimpleIconLabel(o);g.text=(0,E.localize)(3,null);const h=(0,E.localize)(4,null);return this.simpleHoverStore.add((0,p.setupCustomHover)(this.hoverDelegate,o,h)),o}createDefaultOverrideIndicator(){const o=f("span.setting-item-default-overridden"),g=new R.SimpleIconLabel(o);return g.text=(0,E.localize)(5,null),o}render(){const o=[this.workspaceTrustElement,this.scopeOverridesElement,this.syncIgnoredElement,this.defaultOverrideIndicatorElement].filter(g=>g.style.display!=="none");if(this.indicatorsContainerElement.innerText="",this.indicatorsContainerElement.style.display="none",o.length){this.indicatorsContainerElement.style.display="inline",t.append(this.indicatorsContainerElement,f("span",void 0,"("));for(let g=0;g<o.length-1;g++)t.append(this.indicatorsContainerElement,o[g]),t.append(this.indicatorsContainerElement,f("span.comma",void 0," \u2022 "));t.append(this.indicatorsContainerElement,o[o.length-1]),t.append(this.indicatorsContainerElement,f("span",void 0,")"))}}updateWorkspaceTrust(o){this.workspaceTrustElement.style.display=o.isUntrusted?"inline":"none",this.render()}updateSyncIgnored(o,g){this.syncIgnoredElement.style.display=this.userDataSyncEnablementService.isEnabled()&&g.includes(o.setting.key)?"inline":"none",this.render()}getInlineScopeDisplayText(o){const[g,h]=o.split(":"),v=g==="user"?(0,E.localize)(6,null):g==="workspace"?(0,E.localize)(7,null):(0,E.localize)(8,null);return h?`${this.languageService.getLanguageName(h)} > ${v}`:v}dispose(){this.scopeOverridesHover.dispose(),this.simpleHoverStore.dispose()}updateScopeOverrides(o,g,h,v){if(this.scopeOverridesElement.innerText="",this.scopeOverridesElement.style.display="none",o.hasPolicyValue){this.scopeOverridesElement.style.display="inline",this.scopeOverridesElement.classList.add("with-custom-hover"),this.scopeOverridesLabel.text="$(warning) "+(0,E.localize)(9,null);const m=(0,E.localize)(10,null),D={markdown:{value:m+` [${(0,E.localize)(11,null)}](policy-settings).`,isTrusted:!1,supportHtml:!1},markdownNotSupportedFallback:m},y={linkHandler:T=>{v.fire(`@${u.POLICY_SETTING_TAG}`),this.scopeOverridesHover.value?.hide()}};this.scopeOverridesHover.value=(0,p.setupCustomHover)(this.hoverDelegate,this.scopeOverridesElement,D,y)}else if(this.profilesEnabled&&o.matchesScope(1,!1)){this.scopeOverridesElement.style.display="inline",this.scopeOverridesElement.classList.add("with-custom-hover");const m=(0,E.localize)(12,null);this.scopeOverridesLabel.text=m;const w=(0,E.localize)(13,null);this.scopeOverridesHover.value=(0,p.setupCustomHover)(this.hoverDelegate,this.scopeOverridesElement,w)}else if(o.overriddenScopeList.length||o.overriddenDefaultsLanguageList.length){if(u.MODIFIED_INDICATOR_USE_INLINE_ONLY&&o.overriddenScopeList.length||o.overriddenScopeList.length===1&&!o.overriddenDefaultsLanguageList.length){this.scopeOverridesElement.style.display="inline",this.scopeOverridesElement.classList.remove("with-custom-hover"),this.scopeOverridesHover.value=void 0;const m=o.isConfigured?(0,E.localize)(14,null):(0,E.localize)(15,null);this.scopeOverridesLabel.text=`${m} `;for(let w=0;w<o.overriddenScopeList.length;w++){const D=o.overriddenScopeList[w],y=t.append(this.scopeOverridesElement,f("a.modified-scope",void 0,this.getInlineScopeDisplayText(D)));w!==o.overriddenScopeList.length-1&&t.append(this.scopeOverridesElement,f("span.comma",void 0,", ")),g.add(t.addStandardDisposableListener(y,t.EventType.CLICK,T=>{const[_,L]=D.split(":");h.fire({settingKey:o.setting.key,scope:_,language:L}),T.preventDefault(),T.stopPropagation()}))}}else if(!u.MODIFIED_INDICATOR_USE_INLINE_ONLY){this.scopeOverridesElement.style.display="inline",this.scopeOverridesElement.classList.add("with-custom-hover");const m=o.isConfigured?(0,E.localize)(16,null):(0,E.localize)(17,null);this.scopeOverridesLabel.text=m;let w="",D="";if(o.overriddenScopeList.length){const _=o.isConfigured?(0,E.localize)(18,null):(0,E.localize)(19,null);w=_,D=_;for(const L of o.overriddenScopeList){const M=this.getInlineScopeDisplayText(L);w+=` - [${M}](${encodeURIComponent(L)} "${s(L,this.languageService)}")`,D+=` \u2022 ${M}`}}if(o.overriddenDefaultsLanguageList.length){w&&(w+=` `,D+=` `);const _=(0,E.localize)(20,null);w+=_,D+=_;for(const L of o.overriddenDefaultsLanguageList){const M=this.languageService.getLanguageName(L);w+=` - [${M}](${encodeURIComponent(`default:${L}`)} "${M}")`,D+=` \u2022 ${M}`}}const y={markdown:{value:w,isTrusted:!1,supportHtml:!1},markdownNotSupportedFallback:D},T={linkHandler:_=>{const[L,M]=decodeURIComponent(_).split(":");h.fire({settingKey:o.setting.key,scope:L,language:M}),this.scopeOverridesHover.value?.hide()}};this.scopeOverridesHover.value=(0,p.setupCustomHover)(this.hoverDelegate,this.scopeOverridesElement,y,T)}}this.render()}updateDefaultOverrideIndicator(o){this.defaultOverrideIndicatorElement.style.display="none";const g=l(o);if(g!==void 0){this.defaultOverrideIndicatorElement.style.display="inline";const h=(0,E.localize)(21,null,g);(0,p.setupCustomHover)(this.hoverDelegate,this.defaultOverrideIndicatorElement,h)}this.render()}};c=we([F(1,b.IConfigurationService),F(2,i.IHoverService),F(3,r.IUserDataSyncEnablementService),F(4,k.ILanguageService),F(5,S.IUserDataProfilesService),F(6,I.ICommandService)],c),e.SettingsTreeIndicatorsLabel=c;function l(a){let o;const g=a.defaultValueSource;return g&&(typeof g!="string"?o=g.displayName??g.id:typeof g=="string"&&(o=g)),o}function s(a,o){const[g,h]=a.split(":"),v=g==="user"?(0,E.localize)(22,null):g==="workspace"?(0,E.localize)(23,null):(0,E.localize)(24,null);return h?(0,E.localize)(25,null,v,o.getLanguageName(h)):v}function d(a,o){const[g,h]=a.split(":"),v=g==="user"?(0,E.localize)(26,null):g==="workspace"?(0,E.localize)(27,null):(0,E.localize)(28,null);return h?(0,E.localize)(29,null,v.toLowerCase(),o.getLanguageName(h)):v}function n(a,o,g,h){const v=[];a.isUntrusted&&v.push((0,E.localize)(30,null));const m=g.isEnabled();if(a.hasPolicyValue)v.push((0,E.localize)(31,null));else if(m&&a.matchesScope(1,!1))v.push((0,E.localize)(32,null));else{const _=a.isConfigured?(0,E.localize)(33,null):(0,E.localize)(34,null),L=a.overriddenScopeList.map(M=>d(M,h)).join(", ");a.overriddenScopeList.length&&v.push(`${_} ${L}`)}(0,C.getIgnoredSettings)((0,r.getDefaultIgnoredSettings)(),o).includes(a.setting.key)&&v.push((0,E.localize)(35,null));const D=l(a);D!==void 0&&v.push((0,E.localize)(36,null,D));const y=a.overriddenDefaultsLanguageList.map(_=>h.getLanguageName(_)).join(", ");if(a.overriddenDefaultsLanguageList.length){const _=(0,E.localize)(37,null,y);v.push(_)}return v.join(". ")}e.getIndicatorsLabelAriaLabel=n}),define(ae[2573],le([1,0,140,113,11,8,10,179,12]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EnvironmentVariableInfoWidget=void 0;let b=class extends t.Widget{get requiresAction(){return this._info.requiresAction}constructor(C,r,u){super(),this._info=C,this._configurationService=r,this._hoverService=u,this.id="env-var-info"}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 r=new R.RunOnceScheduler(()=>this._showHover(),this._configurationService.getValue("workbench.hover.delay"));this._register(r);const u={x:0,y:0};this.onmouseover(this._domNode,i=>{u.x=i.browserEvent.pageX,u.y=i.browserEvent.pageY,r.schedule(),this._mouseMoveListener=k.addDisposableListener(this._domNode,k.EventType.MOUSE_MOVE,f=>{(Math.abs(f.pageX-u.x)>window.devicePixelRatio*2||Math.abs(f.pageY-u.y)>window.devicePixelRatio*2)&&(u.x=f.pageX,u.y=f.pageY,r.schedule())})}),this.onmouseleave(this._domNode,()=>{r.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 r=this._info.getActions?this._info.getActions():void 0;this._hoverOptions={target:this._domNode,content:new p.MarkdownString(this._info.getInfo()),actions:r}}this._hoverService.showHover(this._hoverOptions,C)}}};b=we([F(1,A.IConfigurationService),F(2,E.IHoverService)],b),e.EnvironmentVariableInfoWidget=b}),define(ae[2574],le([1,0,2,140,10,179,12,33,8]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalHover=void 0;const b=R.$;let S=class extends t.Disposable{constructor(u,i,f,c,l,s){super(),this._targetOptions=u,this._text=i,this._actions=f,this._linkHandler=c,this._hoverService=l,this._configurationService=s,this.id="hover"}dispose(){super.dispose()}attach(u){if(!this._configurationService.getValue("terminal.integrated.showLinkHover"))return;const f=new C(u,this._targetOptions),c=this._hoverService.showHover({target:f,content:this._text,actions:this._actions,linkHandler:this._linkHandler,additionalClasses:["xterm-hover"]});c&&this._register(c)}};S=we([F(4,A.IHoverService),F(5,I.IConfigurationService)],S),e.TerminalHover=S;class C extends p.Widget{get targetElements(){return this._targetElements}constructor(u,i){super(),this._options=i,this._targetElements=[],this._domNode=b("div.terminal-hover-targets.xterm-hover");const f=this._options.viewportRange.end.y-this._options.viewportRange.start.y+1,c=(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=b("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=`${c}px`,l.style.height=`${this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(l)),f>2){const s=b("div.terminal-hover-target.hoverHighlight");s.style.left="0px",s.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.start.y-1-(f-2))*this._options.cellDimensions.height}px`,s.style.width=`${this._options.terminalDimensions.width*this._options.cellDimensions.width}px`,s.style.height=`${(f-2)*this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(s))}if(f>1){const s=b("div.terminal-hover-target.hoverHighlight");s.style.left="0px",s.style.bottom=`${(this._options.terminalDimensions.height-this._options.viewportRange.end.y-1)*this._options.cellDimensions.height}px`,s.style.width=`${(this._options.viewportRange.end.x+1)*this._options.cellDimensions.width}px`,s.style.height=`${this._options.cellDimensions.height}px`,this._targetElements.push(this._domNode.appendChild(s))}if(this._options.modifierDownCallback&&this._options.modifierUpCallback){let s=!1;this._register(R.addDisposableListener(document,"keydown",d=>{d.ctrlKey&&!s&&(s=!0,this._options.modifierDownCallback())})),this._register(R.addDisposableListener(document,"keyup",d=>{d.ctrlKey||(s=!1,this._options.modifierUpCallback())}))}u.appendChild(this._domNode)}dispose(){this._domNode?.parentElement?.removeChild(this._domNode),super.dispose()}}(0,k.registerThemingParticipant)((r,u)=>{let i=r.getColor(E.editorHoverHighlight);i&&(i.isOpaque()&&(i=i.transparent(.5)),u.addRule(`.integrated-terminal .hoverHighlight { background-color: ${i}; }`))})}),define(ae[935],le([1,0,10,11,208,113,2,1911,8,37,179]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updateLayout=e.TerminalDecorationHoverManager=e.DecorationSelector=void 0;var C;(function(f){f[f.DefaultDimension=16]="DefaultDimension",f[f.MarginLeft=-17]="MarginLeft"})(C||(C={}));var r;(function(f){f.CommandDecoration="terminal-command-decoration",f.Hide="hide",f.ErrorColor="error",f.DefaultColor="default-color",f.Default="default",f.Codicon="codicon",f.XtermDecoration="xterm-decoration",f.OverviewRuler=".xterm-decoration-overview-ruler",f.QuickFix="quick-fix",f.LightBulb="codicon-light-bulb"})(r=e.DecorationSelector||(e.DecorationSelector={}));let u=class extends k.Disposable{constructor(c,l,s){super(),this._hoverService=c,this._contextMenuVisible=!1,this._register(s.onDidShowContextMenu(()=>this._contextMenuVisible=!0)),this._register(s.onDidHideContextMenu(()=>this._contextMenuVisible=!1)),this._hoverDelayer=this._register(new p.Delayer(l.getValue("workbench.hover.delay")))}hideHover(){this._hoverDelayer.cancel(),this._hoverService.hideHover()}createHover(c,l,s){return(0,k.combinedDisposable)(t.addDisposableListener(c,t.EventType.MOUSE_ENTER,()=>{this._contextMenuVisible||this._hoverDelayer.trigger(()=>{let d=`${(0,E.localize)(0,null)}`;if(d+=` --- `,l)if(l.markProperties||s)if(l.markProperties?.hoverMessage||s)d=l.markProperties?.hoverMessage||s||"";else return;else l.exitCode?l.exitCode===-1?d+=(0,E.localize)(1,null,(0,R.fromNow)(l.timestamp,!0)):d+=(0,E.localize)(2,null,(0,R.fromNow)(l.timestamp,!0),l.exitCode):d+=(0,E.localize)(3,null,(0,R.fromNow)(l.timestamp,!0));else if(s)d=s;else return;this._hoverService.showHover({content:new A.MarkdownString(d),target:c})})}),t.addDisposableListener(c,t.EventType.MOUSE_LEAVE,()=>this.hideHover()),t.addDisposableListener(c,t.EventType.MOUSE_OUT,()=>this.hideHover()))}};u=we([F(0,S.IHoverService),F(1,I.IConfigurationService),F(2,b.IContextMenuService)],u),e.TerminalDecorationHoverManager=u;function i(f,c){if(!c)return;const l=f.inspect("terminal.integrated.fontSize").value,s=f.inspect("terminal.integrated.fontSize").defaultValue,d=f.inspect("terminal.integrated.lineHeight").value;if(typeof l=="number"&&typeof s=="number"&&typeof d=="number"){const n=l/s<=1?l/s:1;c.style.width=`${n*16}px`,c.style.height=`${n*16*d}px`,c.style.fontSize=`${n*16}px`,c.style.marginLeft=`${n*-17}px`}}e.updateLayout=i}),define(ae[2575],le([1,0,6,2,10,16,1912,8,37,41,12,80,284,935,289,5,38,27,25,672,9,890]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertToQuickFixOptions=e.getQuickFixesForCommand=e.TerminalQuickFixAddon=void 0;const o="terminal/quick-fix",g=["quick-fix","codicon-light-bulb","codicon","terminal-command-decoration","xterm-decoration"];let h=class extends p.Disposable{constructor(T,_,L,M,O,N,P,B,V,z){super(),this._capabilities=T,this._contextMenuService=_,this._configurationService=L,this._terminalContributionService=M,this._audioCueService=N,this._keybindingService=P,this._openerService=B,this._telemetryService=V,this._logService=z,this._onDidRequestRerunCommand=new t.Emitter,this.onDidRequestRerunCommand=this._onDidRequestRerunCommand.event,this._commandListeners=new Map,this._fixesShown=!1,this._capabilities.get(2)?this._registerCommandHandlers():this._capabilities.onDidAddCapability(H=>{H===2&&this._registerCommandHandlers()}),this._terminalDecorationHoverService=O.createInstance(u.TerminalDecorationHoverManager);for(const H of this._terminalContributionService.quickFixes)this.registerCommandFinishedListener(D(H));this.registerCommandFinishedListener((0,a.gitSimilar)()),this.registerCommandFinishedListener(D((0,a.gitCreatePr)())),this.registerCommandFinishedListener(D((0,a.gitPushSetUpstream)()))}activate(T){this._terminal=T}showMenu(){this._fixesShown=!0,this._decoration?.element?.click()}registerCommandFinishedListener(T){const _=T.commandLineMatcher.toString(),L=this._commandListeners.get(_)||[];L.push(T),this._commandListeners.set(_,L)}_registerCommandHandlers(){const T=this._terminal,_=this._capabilities.get(2);!T||!_||(this._register(_.onCommandFinished(L=>{if(this._expectedCommands){const M=this._expectedCommands.includes(L.command);this._logService.debug(o,{id:this._expectedCommands.join(" "),fixesShown:this._fixesShown,ranQuickFixCommand:M}),this._telemetryService?.publicLog2(o,{id:this._expectedCommands.join(" "),fixesShown:this._fixesShown,ranQuickFixCommand:M}),this._expectedCommands=void 0}this._resolveQuickFixes(L),this._fixesShown=!1})),this._register(_.onCommandStarted(()=>{this._registerQuickFixDecoration(),this._quickFixes=void 0})))}_resolveQuickFixes(T){T.command!==""&&this._disposeQuickFix();const _=v(T,this._commandListeners,this._openerService,this._onDidRequestRerunCommand);if(!_)return;const{fixes:L,onDidRunQuickFix:M,expectedCommands:O}=_;this._expectedCommands=O,this._quickFixes=L,this._register(M(N=>{const P=this._expectedCommands?.includes(T.command)||!1;this._logService.debug(o,{id:N,fixesShown:this._fixesShown,ranQuickFixCommand:P}),this._telemetryService?.publicLog2(o,{id:N,fixesShown:this._fixesShown,ranQuickFixCommand:P}),this._disposeQuickFix(),this._fixesShown=!1}))}_disposeQuickFix(){this._decoration?.dispose(),this._decoration=void 0,this._quickFixes=void 0}_registerQuickFixDecoration(){if(!this._terminal||!this._quickFixes)return;const T=this._terminal.registerMarker();if(!T)return;const _=this._terminal.registerDecoration({marker:T,layer:"top"});if(!_)return;this._decoration=_;const L=this._keybindingService.lookupKeybinding("workbench.action.terminal.quickFix"),M=L?(0,k.localize)(0,null,L.getLabel()):"",O=this._quickFixes;if(!O){_.dispose();return}_?.onRender(N=>{N.classList.contains("quick-fix")||(N.classList.add(...g),(0,u.updateLayout)(this._configurationService,N),this._audioCueService.playAudioCue(r.AudioCue.terminalQuickFix),this._register(R.addDisposableListener(N,R.EventType.CLICK,()=>{this._contextMenuService.showContextMenu({getAnchor:()=>N,getActions:()=>O,autoSelectFirstItem:!0})})),this._register(this._terminalDecorationHoverService.createHover(N,void 0,M)))})}};h=we([F(1,I.IContextMenuService),F(2,E.IConfigurationService),F(3,d.ITerminalContributionService),F(4,f.IInstantiationService),F(5,r.IAudioCueService),F(6,c.IKeybindingService),F(7,b.IOpenerService),F(8,l.ITelemetryService),F(9,s.ILogService)],h),e.TerminalQuickFixAddon=h;function v(y,T,_,L){const M=new t.Emitter,O=M.event,N=[],P=y.command,B=[];for(const V of T.values())for(const z of V){if(z.exitStatus!==void 0&&z.exitStatus!==(y.exitCode===0))continue;const x=P.match(z.commandLineMatcher);if(!x)continue;const H=z.outputMatcher;let W;H&&(W=y.getOutputMatch(H));const U=z.id,$=z.getQuickFixes({commandLineMatch:x,outputMatch:W},y);if($)for(const q of(0,A.asArray)($)){let X;if("type"in q)switch(q.type){case"command":{const G=(0,k.localize)(1,null,q.command);X={id:"quickFix.command",label:G,class:void 0,enabled:!0,run:()=>{L?.fire({command:q.command,addNewLine:q.addNewLine})},tooltip:G,command:q.command},B.push(q.command);break}case"opener":{const G=(0,k.localize)(2,null,q.uri.toString());X={id:"quickFix.opener",label:G,class:void 0,enabled:!0,run:()=>{_.open(q.uri),M.fire(U)},tooltip:G,uri:q.uri};break}}else X={id:q.id,label:q.label,class:q.class,enabled:q.enabled,run:()=>{q.run(),M.fire(U)},tooltip:q.tooltip};X&&N.push(X)}}return N.length>0?{fixes:N,onDidRunQuickFix:O,expectedCommands:B}:void 0}e.getQuickFixesForCommand=v;let m,w;(0,S.registerThemingParticipant)((y,T)=>{m=y.getColor("editorLightBulb.foreground"),w=y.getColor(i.TERMINAL_BACKGROUND_COLOR)||y.getColor(C.PANEL_BACKGROUND),m&&T.addRule(`.terminal-command-decoration.quick-fix { color: ${m.toString()} !important; } `),w&&T.addRule(`.terminal-command-decoration.quick-fix { background-color: ${w.toString()}; } `)});function D(y){const T=y.commandToRun?"command":y.linkToOpen?"opener":void 0;return{id:y.id,commandLineMatcher:y.commandLineMatcher,outputMatcher:y.outputMatcher,type:T,getQuickFixes:T==="command"?L=>{const M=L.outputMatch,O=y.commandToRun;if(!M||!O)return;const N=M.groups;if(!N)return;const P=[];let B=O;for(const[V,z]of Object.entries(N)){const x=`\${group:${V}}`;if(!O.includes(x))return[];B=B.replaceAll(x,z)}if(B)return P.push({type:"command",command:B,addNewLine:!0}),P}:L=>{const M=L.outputMatch,O=y.linkToOpen;if(!M||!O)return;const N=M.groups;if(!N)return;let P=O;for(const[B,V]of Object.entries(N)){const z=`\${group:${B}}`;if(!O?.includes(z))return[];P=P.replaceAll(z,V)}return P?{type:"opener",uri:n.URI.parse(P)}:[]},exitStatus:y.exitStatus,source:y.extensionIdentifier}}e.convertToQuickFixOptions=D}),define(ae[2576],le([1,0,2,6,10,38,8,134,577,140,41,5,184,113]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverWidget=void 0;const i=R.$;var f;(function(d){d[d.PointerSize=3]="PointerSize",d[d.HoverBorderWidth=2]="HoverBorderWidth",d[d.HoverWindowEdgeMargin=2]="HoverWindowEdgeMargin"})(f||(f={}));let c=class extends b.Widget{get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}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}get isLocked(){return this._isLocked}set isLocked(n){this._isLocked!==n&&(this._isLocked=n,this._hoverContainer.classList.toggle("locked",this._isLocked))}constructor(n,a,o,g,h){super(),this._keybindingService=a,this._configurationService=o,this._openerService=g,this._instantiationService=h,this._messageListeners=new t.DisposableStore,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._onDispose=this._register(new p.Emitter),this._onRequestLayout=this._register(new p.Emitter),this._linkHandler=n.linkHandler||(T=>(0,r.openLinkFromMarkdown)(this._openerService,T,(0,u.isMarkdownString)(n.content)?n.content.isTrusted:void 0)),this._target="targetElements"in n.target?n.target:new s(n.target),this._hoverPointer=n.showPointer?i("div.workbench-hover-pointer"):void 0,this._hover=this._register(new I.HoverWidget),this._hover.containerDomNode.classList.add("workbench-hover","fadeIn"),n.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),n.skipFadeInAnimation&&this._hover.containerDomNode.classList.add("skip-fade-in"),n.additionalClasses&&this._hover.containerDomNode.classList.add(...n.additionalClasses),n.forcePosition&&(this._forcePosition=!0),this._hoverPosition=n.hoverPosition??3,this.onmousedown(this._hover.containerDomNode,T=>T.stopPropagation()),this.onkeydown(this._hover.containerDomNode,T=>{T.equals(9)&&this.dispose()});const v=i("div.hover-row.markdown-hover"),m=i("div.hover-contents");if(typeof n.content=="string")m.textContent=n.content,m.style.whiteSpace="pre-wrap";else if(n.content instanceof HTMLElement)m.appendChild(n.content),m.classList.add("html-hover-contents");else{const T=n.content,_=this._instantiationService.createInstance(r.MarkdownRenderer,{codeBlockFontFamily:this._configurationService.getValue("editor").fontFamily||E.EDITOR_FONT_DEFAULTS.fontFamily}),{element:L}=_.render(T,{actionHandler:{callback:M=>this._linkHandler(M),disposables:this._messageListeners},asyncRenderCallback:()=>{m.classList.add("code-hover-contents"),this._onRequestLayout.fire()}});m.appendChild(L)}if(v.appendChild(m),this._hover.contentsDomNode.appendChild(v),n.actions&&n.actions.length>0){const T=i("div.hover-row.status-bar"),_=i("div.actions");n.actions.forEach(L=>{const M=this._keybindingService.lookupKeybinding(L.commandId),O=M?M.getLabel():null;I.HoverAction.render(_,{label:L.label,commandId:L.commandId,run:N=>{L.run(N),this.dispose()},iconClass:L.iconClass},O)}),T.appendChild(_),this._hover.containerDomNode.appendChild(T)}this._hoverContainer=i("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode);let w;n.actions&&n.actions.length>0?w=!1:n.hideOnHover===void 0?w=typeof n.content=="string":w=n.hideOnHover;const D=[...this._target.targetElements];w||D.push(this._hoverContainer);const y=this._register(new l(D));if(this._register(y.onMouseOut(()=>{this._isLocked||this.dispose()})),w){const T=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new l(T)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=y}render(n){n.appendChild(this._hoverContainer),this.layout()}layout(){this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";const n=y=>{const T=R.getDomNodeZoomLevel(y),_=y.getBoundingClientRect();return{top:_.top*T,bottom:_.bottom*T,right:_.right*T,left:_.left*T}},a=this._target.targetElements.map(y=>n(y)),o=Math.min(...a.map(y=>y.top)),g=Math.max(...a.map(y=>y.right)),h=Math.max(...a.map(y=>y.bottom)),v=Math.min(...a.map(y=>y.left)),m=g-v,w=h-o,D={top:o,right:g,bottom:h,left:v,width:m,height:w,center:{x:v+m/2,y:o+w/2}};if(this.adjustHorizontalHoverPosition(D),this.adjustVerticalHoverPosition(D),this.adjustHoverMaxHeight(D),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:D.left+=3,D.right+=3,this._hoverContainer.style.paddingLeft=`${3}px`,this._hoverContainer.style.marginLeft=`${-3}px`;break;case 0:D.left-=3,D.right-=3,this._hoverContainer.style.paddingRight=`${3}px`,this._hoverContainer.style.marginRight=`${-3}px`;break;case 2:D.top+=3,D.bottom+=3,this._hoverContainer.style.paddingTop=`${3}px`,this._hoverContainer.style.marginTop=`${-3}px`;break;case 3:D.top-=3,D.bottom-=3,this._hoverContainer.style.paddingBottom=`${3}px`,this._hoverContainer.style.marginBottom=`${-3}px`;break}D.center.x=D.left+m/2,D.center.y=D.top+w/2}this.computeXCordinate(D),this.computeYCordinate(D),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(D)),this._hover.onContentsChanged()}computeXCordinate(n){const a=this._hover.containerDomNode.clientWidth+2;this._target.x!==void 0?this._x=this._target.x:this._hoverPosition===1?this._x=n.right:this._hoverPosition===0?this._x=n.left-a:(this._hoverPointer?this._x=n.center.x-this._hover.containerDomNode.clientWidth/2:this._x=n.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=n.left+2)}computeYCordinate(n){this._target.y!==void 0?this._y=this._target.y:this._hoverPosition===3?this._y=n.top:this._hoverPosition===2?this._y=n.bottom-2:this._hoverPointer?this._y=n.center.y+this._hover.containerDomNode.clientHeight/2:this._y=n.bottom,this._y>window.innerHeight&&(this._y=n.bottom)}adjustHorizontalHoverPosition(n){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-n.right-a}px`:this._hoverPosition===0&&(this._hover.containerDomNode.style.maxWidth=`${n.left-a}px`);return}this._hoverPosition===1&&n.right+this._hover.containerDomNode.clientWidth>=document.documentElement.clientWidth&&(this._hoverPosition=0),this._hoverPosition===0&&n.left-this._hover.containerDomNode.clientWidth<=document.documentElement.clientLeft&&(this._hoverPosition=1)}}adjustVerticalHoverPosition(n){this._target.y!==void 0||this._forcePosition||(this._hoverPosition===3?n.top-this._hover.containerDomNode.clientHeight<0&&(this._hoverPosition=2):this._hoverPosition===2&&n.bottom+this._hover.containerDomNode.clientHeight>window.innerHeight&&(this._hoverPosition=3))}adjustHoverMaxHeight(n){let a=window.innerHeight/2;if(this._forcePosition){const o=(this._hoverPointer?3:0)+2;this._hoverPosition===3?a=Math.min(a,n.top-o):this._hoverPosition===2&&(a=Math.min(a,window.innerHeight-n.bottom-o))}a=Math.min(a,this._hover.containerDomNode.clientHeight),this._hover.containerDomNode.style.maxHeight=`${a}px`}setHoverPointerPosition(n){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>n.height?this._hoverPointer.style.top=`${n.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 o=Math.round(a/2)-3;const g=this._x+o;(g<n.left||g>n.right)&&(o=n.center.x-this._x-3),this._hoverPointer.style.left=`${o}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}};c=we([F(1,A.IKeybindingService),F(2,k.IConfigurationService),F(3,S.IOpenerService),F(4,C.IInstantiationService)],c),e.HoverWidget=c;class l extends b.Widget{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(n){super(),this._elements=n,this._isMouseIn=!0,this._onMouseOut=this._register(new p.Emitter),this._elements.forEach(a=>this.onmouseover(a,()=>this._onTargetMouseOver())),this._elements.forEach(a=>this.onmouseleave(a,()=>this._onTargetMouseLeave()))}_onTargetMouseOver(){this._isMouseIn=!0,this._clearEvaluateMouseStateTimeout()}_onTargetMouseLeave(){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 s{constructor(n){this._element=n,this.targetElements=[this._element]}dispose(){}}}),define(ae[2577],le([1,0,35,12,33,179,37,5,2576,2,10,38,90,1188]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverService=void 0;let u=class{constructor(c,l,s,d){this._instantiationService=c,this._contextViewService=l,this._keybindingService=d,s.onDidShowContextMenu(()=>this.hideHover())}showHover(c,l){if(this._currentHoverOptions===c)return;this._currentHoverOptions=c;const s=new b.DisposableStore,d=this._instantiationService.createInstance(I.HoverWidget,c);d.onDispose(()=>{this._currentHoverOptions===c&&(this._currentHoverOptions=void 0),s.dispose()});const n=this._contextViewService;if(n.showContextView(new i(d,l)),d.onRequestLayout(()=>n.layout()),"targetElements"in c.target)for(const o of c.target.targetElements)s.add((0,S.addDisposableListener)(o,S.EventType.CLICK,()=>this.hideHover()));else s.add((0,S.addDisposableListener)(c.target,S.EventType.CLICK,()=>this.hideHover()));const a=document.activeElement;if(a&&(s.add((0,S.addDisposableListener)(a,S.EventType.KEY_DOWN,o=>this._keyDown(o,d))),s.add((0,S.addDisposableListener)(document,S.EventType.KEY_DOWN,o=>this._keyDown(o,d))),s.add((0,S.addDisposableListener)(a,S.EventType.KEY_UP,o=>this._keyUp(o,d))),s.add((0,S.addDisposableListener)(document,S.EventType.KEY_UP,o=>this._keyUp(o,d)))),c.hideOnKeyDown){const o=document.activeElement;o&&s.add((0,S.addDisposableListener)(o,S.EventType.KEY_DOWN,()=>this.hideHover()))}if("IntersectionObserver"in window){const o=new IntersectionObserver(h=>this._intersectionChange(h,d),{threshold:0}),g="targetElements"in c.target?c.target.targetElements[0]:c.target;o.observe(g),s.add((0,b.toDisposable)(()=>o.disconnect()))}return this._currentHover=d,d}hideHover(){this._currentHover?.isLocked||!this._currentHoverOptions||(this._currentHover=void 0,this._currentHoverOptions=void 0,this._contextViewService.hideContextView())}_intersectionChange(c,l){c[c.length-1].isIntersecting||l.dispose()}_keyDown(c,l){if(c.key==="Alt"){l.isLocked=!0;return}const s=new r.StandardKeyboardEvent(c);this._keybindingService.resolveKeyboardEvent(s).getSingleModifierDispatchParts().some(n=>!!n)||this._keybindingService.softDispatch(s,s.target)||this.hideHover()}_keyUp(c,l){c.key==="Alt"&&(l.isLocked=!1,l.isMouseIn||this.hideHover())}};u=we([F(0,E.IInstantiationService),F(1,k.IContextViewService),F(2,k.IContextMenuService),F(3,C.IKeybindingService)],u),e.HoverService=u;class i{get anchorPosition(){return this._hover.anchor}constructor(c,l=!1){this._hover=c,this._focus=l}render(c){return this._hover.render(c),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,u,1),(0,p.registerThemingParticipant)((f,c)=>{const l=f.getColor(R.editorHoverBackground);l&&(c.addRule(`.monaco-workbench .workbench-hover { background-color: ${l}; }`),c.addRule(`.monaco-workbench .workbench-hover-pointer:after { background-color: ${l}; }`));const s=f.getColor(R.editorHoverBorder);s&&(c.addRule(`.monaco-workbench .workbench-hover { border: 1px solid ${s}; }`),c.addRule(`.monaco-workbench .workbench-hover-container.locked .workbench-hover { outline: 1px solid ${s}; }`),c.addRule(`.monaco-workbench .workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${s.transparent(.5)}; }`),c.addRule(`.monaco-workbench .workbench-hover hr { border-top: 1px solid ${s.transparent(.5)}; }`),c.addRule(`.monaco-workbench .workbench-hover hr { border-bottom: 0px solid ${s.transparent(.5)}; }`),c.addRule(`.monaco-workbench .workbench-hover-pointer:after { border-right: 1px solid ${s}; }`),c.addRule(`.monaco-workbench .workbench-hover-pointer:after { border-bottom: 1px solid ${s}; }`));const d=f.getColor(R.focusBorder);d&&(c.addRule(`.monaco-workbench .workbench-hover-container.locked .workbench-hover:focus { outline-color: ${d}; }`),c.addRule(`.monaco-workbench .workbench-hover-lock:focus { outline: 1px solid ${d}; }`));const n=f.getColor(R.toolbarHoverBackground);n&&c.addRule(`.monaco-workbench .workbench-hover-container.locked .workbench-hover-lock:hover { background-color: ${n}; }`);const a=f.getColor(R.textLinkForeground);a&&c.addRule(`.monaco-workbench .workbench-hover a { color: ${a}; }`);const o=f.getColor(R.textLinkActiveForeground);o&&c.addRule(`.monaco-workbench .workbench-hover a:hover { color: ${o}; }`);const g=f.getColor(R.editorHoverForeground);g&&c.addRule(`.monaco-workbench .workbench-hover { color: ${g}; }`);const h=f.getColor(R.editorHoverStatusBarBackground);h&&c.addRule(`.monaco-workbench .workbench-hover .hover-row .actions { background-color: ${h}; }`);const v=f.getColor(R.textCodeBlockBackground);v&&c.addRule(`.monaco-workbench .workbench-hover code { background-color: ${v}; }`)}),(0,p.registerThemingParticipant)((f,c)=>{const l=f.getColor(R.widgetShadow);l&&c.addRule(`.monaco-workbench .workbench-hover { box-shadow: 0 2px 8px ${l}; }`)})}),define(ae[542],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IIntegrityService=void 0,e.IIntegrityService=(0,t.createDecorator)("integrityService")}),define(ae[543],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkbenchIssueService=void 0,e.IWorkbenchIssueService=(0,t.createDecorator)("workbenchIssueService")}),define(ae[2578],le([1,0,1667,36,543]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReportExtensionIssueAction=void 0;let A=class As extends p.Action{constructor(E,I){super(As._id,As._label,"extension-action report-issue"),this.extension=E,this.issueService=I,this.enabled=E.isBuiltin||!!E.repository&&!!E.repository.url}async run(){await this.issueService.openReporter({extensionId:this.extension.id})}};A._id="workbench.extensions.action.reportExtensionIssue",A._label=t.localize(0,null),A=we([F(1,R.IWorkbenchIssueService)],A),e.ReportExtensionIssueAction=A}),define(ae[675],le([1,0,1675,36,27,5,119,12,39,37,26,7,23,49,919,51,2578,922,56,9,19,89,502,93]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"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 h;(function(y){y[y.None=0]="None",y[y.Starting=1]="Starting",y[y.Running=2]="Running",y[y.Stopping=3]="Stopping"})(h=e.ProfileSessionState||(e.ProfileSessionState={}));let v=class extends l.AbstractRuntimeExtensionsEditor{constructor(T,_,L,M,O,N,P,B,V,z,x,H,W){super(T,_,L,M,O,N,P,B,V,z,x,H),this._extensionHostProfileService=W,this._profileInfo=this._extensionHostProfileService.lastProfile,this._extensionsHostRecorded=e.CONTEXT_EXTENSION_HOST_PROFILE_RECORDED.bindTo(L),this._profileSessionState=e.CONTEXT_PROFILE_SESSION_STATE.bindTo(L),this._register(this._extensionHostProfileService.onDidChangeLastProfile(()=>{this._profileInfo=this._extensionHostProfileService.lastProfile,this._extensionsHostRecorded.set(!!this._profileInfo),this._updateExtensions()})),this._register(this._extensionHostProfileService.onDidChangeState(()=>{const U=this._extensionHostProfileService.state;this._profileSessionState.set(h[U].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(c.ReportExtensionIssueAction,T.description):null}_createSaveExtensionHostProfileAction(){return this._instantiationService.createInstance(D,D.ID,D.LABEL)}_createProfileAction(){return this._extensionHostProfileService.state===h.Running?this._instantiationService.createInstance(w,w.ID,w.LABEL):this._instantiationService.createInstance(m,m.ID,m.LABEL)}};v=we([F(0,R.ITelemetryService),F(1,E.IThemeService),F(2,C.IContextKeyService),F(3,k.IExtensionsWorkbenchService),F(4,I.IExtensionService),F(5,S.INotificationService),F(6,b.IContextMenuService),F(7,A.IInstantiationService),F(8,r.IStorageService),F(9,u.ILabelService),F(10,f.IWorkbenchEnvironmentService),F(11,g.IClipboardService),F(12,e.IExtensionHostProfileService)],v),e.RuntimeExtensionsEditor=v;let m=class Ls extends p.Action{constructor(T=Ls.ID,_=Ls.LABEL,L){super(T,_),this._extensionHostProfileService=L}run(){return this._extensionHostProfileService.startProfiling(),Promise.resolve()}};m.ID="workbench.extensions.action.extensionHostProfile",m.LABEL=t.localize(0,null),m=we([F(2,e.IExtensionHostProfileService)],m),e.StartExtensionHostProfileAction=m;let w=class extends p.Action{constructor(T=m.ID,_=m.LABEL,L){super(T,_),this._extensionHostProfileService=L}run(){return this._extensionHostProfileService.stopProfiling(),Promise.resolve()}};w.ID="workbench.extensions.action.stopExtensionHostProfile",w.LABEL=t.localize(1,null),w=we([F(2,e.IExtensionHostProfileService)],w),e.StopExtensionHostProfileAction=w;let D=class Ms extends p.Action{constructor(T=Ms.ID,_=Ms.LABEL,L,M,O,N){super(T,_,void 0,!1),this._nativeHostService=L,this._environmentService=M,this._extensionHostProfileService=O,this._fileService=N,this._extensionHostProfileService.onDidChangeLastProfile(()=>{this.enabled=this._extensionHostProfileService.lastProfile!==null})}run(){return Promise.resolve(this._asyncRun())}async _asyncRun(){const T=await this._nativeHostService.showSaveDialog({title:t.localize(3,null),buttonLabel:t.localize(4,null),defaultPath:`CPU-${new Date().toISOString().replace(/[\-:]/g,"")}.cpuprofile`,filters:[{name:"CPU Profiles",extensions:["cpuprofile","txt"]}]});if(!T||!T.filePath||T.canceled)return;const _=this._extensionHostProfileService.lastProfile;let L=_?_.data:{},M=T.filePath;return this._environmentService.isBuilt&&(L=o.Utils.rewriteAbsolutePaths(L,"piiRemoved"),M=M+".txt"),this._fileService.writeFile(d.URI.file(M),s.VSBuffer.fromString(JSON.stringify(_?_.data:{},null," ")))}};D.LABEL=t.localize(2,null),D.ID="workbench.extensions.action.saveExtensionHostProfile",D=we([F(2,a.INativeHostService),F(3,f.IWorkbenchEnvironmentService),F(4,e.IExtensionHostProfileService),F(5,n.IFileService)],D),e.SaveExtensionHostProfileAction=D}),define(ae[2579],le([1,0,68,1711,15,47,81,601,89,66,70,543]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StopTracing=e.ReportPerformanceIssueUsingReporterAction=e.OpenProcessExplorer=void 0;class r extends R.Action2{constructor(){super({id:r.ID,title:{value:(0,p.localize)(0,null),original:"Open Process Explorer"},category:S.Categories.Developer,f1:!0})}async run(c){return c.get(C.IWorkbenchIssueService).openProcessExplorer()}}e.OpenProcessExplorer=r,r.ID="workbench.action.openProcessExplorer";class u extends R.Action2{constructor(){super({id:u.ID,title:{value:(0,p.localize)(1,null),original:"Report Performance Issue"},category:S.Categories.Help,f1:!0})}async run(c){return c.get(C.IWorkbenchIssueService).openReporter({issueType:1})}}e.ReportPerformanceIssueUsingReporterAction=u,u.ID="workbench.action.reportPerformanceIssueUsingReporter";class i extends R.Action2{constructor(){super({id:i.ID,title:{value:(0,p.localize)(2,null),original:"Stop Tracing"},category:S.Categories.Developer,f1:!0})}async run(c){const l=c.get(E.IIssueService),s=c.get(k.INativeEnvironmentService),d=c.get(A.IDialogService),n=c.get(I.INativeHostService),a=c.get(b.IProgressService);if(!s.args.trace){const{choice:o}=await d.show(t.default.Info,(0,p.localize)(3,null),[(0,p.localize)(4,null),(0,p.localize)(5,null)],{cancelId:1});switch(o){case 0:return n.relaunch({addArgs:["--trace"]});case 1:return}}await a.withProgress({location:20,title:(0,p.localize)(6,null),cancellable:!1,detail:(0,p.localize)(7,null)},()=>l.stopTracing())}}e.StopTracing=i,i.ID="workbench.action.stopTracing"}),define(ae[936],le([1,0,601,12,33,80,82,120,86,128,209,46,317,260,102,118,542,166]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIssueReporterStyles=e.WorkbenchIssueService=void 0;let s=class{constructor(o,g,h,v,m,w,D,y,T,_){this.issueService=o,this.themeService=g,this.extensionManagementService=h,this.extensionEnablementService=v,this.environmentService=m,this.workspaceTrustManagementService=w,this.productService=D,this.experimentService=y,this.authenticationService=T,this.integrityService=_}async openReporter(o={}){const g=[];try{const T=(await this.extensionManagementService.getInstalled()).filter(_=>this.extensionEnablementService.isEnabled(_)||o.extensionId&&_.identifier.id===o.extensionId);g.push(...T.map(_=>{const{manifest:L}=_,M=L.contributes?Object.keys(L.contributes):[],O=!L.activationEvents&&M.length===1&&M[0]==="themes",N=_.type===0;return{name:L.name,publisher:L.publisher,version:L.version,repositoryUrl:L.repository&&L.repository.url,bugsUrl:L.bugs&&L.bugs.url,displayName:L.displayName,id:_.identifier.id,isTheme:O,isBuiltin:N}}))}catch(y){g.push({name:"Workbench Issue Service",publisher:"Unknown",version:"0.0.0",repositoryUrl:void 0,bugsUrl:void 0,displayName:`Extensions not loaded: ${y}`,id:"workbench.issue",isTheme:!1,isBuiltin:!0})}const h=await this.experimentService.getCurrentExperiments();let v="";try{v=(await this.authenticationService.getSessions("github")).filter(_=>_.scopes.includes("repo"))[0]?.accessToken}catch{}let m=!1;try{m=!(await this.integrityService.isPure()).isPure}catch{}const w=this.themeService.getColorTheme(),D=Object.assign({styles:d(w),zoomLevel:(0,I.getZoomLevel)(),enabledExtensions:g,experiments:h?.join(` `),restrictedMode:!this.workspaceTrustManagementService.isWorkspaceTrusted(),isUnsupported:m,githubAccessToken:v,isSandboxed:l.process.sandboxed},o);return this.issueService.openReporter(D)}openProcessExplorer(){const o=this.themeService.getColorTheme(),g={pid:this.environmentService.mainPid,zoomLevel:(0,I.getZoomLevel)(),styles:{backgroundColor:n(o,R.editorBackground),color:n(o,R.editorForeground),listHoverBackground:n(o,R.listHoverBackground),listHoverForeground:n(o,R.listHoverForeground),listFocusBackground:n(o,R.listFocusBackground),listFocusForeground:n(o,R.listFocusForeground),listFocusOutline:n(o,R.listFocusOutline),listActiveSelectionBackground:n(o,R.listActiveSelectionBackground),listActiveSelectionForeground:n(o,R.listActiveSelectionForeground),listHoverOutline:n(o,R.activeContrastBorder),scrollbarShadowColor:n(o,R.scrollbarShadow),scrollbarSliderActiveBackgroundColor:n(o,R.scrollbarSliderActiveBackground),scrollbarSliderBackgroundColor:n(o,R.scrollbarSliderBackground),scrollbarSliderHoverBackgroundColor:n(o,R.scrollbarSliderHoverBackground)},platform:S.platform,applicationName:this.productService.applicationName};return this.issueService.openProcessExplorer(g)}};s=we([F(0,t.IIssueService),F(1,p.IThemeService),F(2,k.IExtensionManagementService),F(3,E.IWorkbenchExtensionEnablementService),F(4,b.INativeWorkbenchEnvironmentService),F(5,f.IWorkspaceTrustManagementService),F(6,C.IProductService),F(7,r.IWorkbenchAssignmentService),F(8,u.IAuthenticationService),F(9,c.IIntegrityService)],s),e.WorkbenchIssueService=s;function d(a){return{backgroundColor:n(a,A.SIDE_BAR_BACKGROUND),color:n(a,R.foreground),textLinkColor:n(a,R.textLinkForeground),textLinkActiveForeground:n(a,R.textLinkActiveForeground),inputBackground:n(a,R.inputBackground),inputForeground:n(a,R.inputForeground),inputBorder:n(a,R.inputBorder),inputActiveBorder:n(a,R.inputActiveOptionBorder),inputErrorBorder:n(a,R.inputValidationErrorBorder),inputErrorBackground:n(a,R.inputValidationErrorBackground),inputErrorForeground:n(a,R.inputValidationErrorForeground),buttonBackground:n(a,R.buttonBackground),buttonForeground:n(a,R.buttonForeground),buttonHoverBackground:n(a,R.buttonHoverBackground),sliderActiveColor:n(a,R.scrollbarSliderActiveBackground),sliderBackgroundColor:n(a,R.scrollbarSliderBackground),sliderHoverColor:n(a,R.scrollbarSliderHoverBackground)}}e.getIssueReporterStyles=d;function n(a,o){const g=a.getColor(o);return g?g.toString():void 0}(0,i.registerMainProcessRemoteService)(t.IIssueService,"issue")}),define(ae[2580],le([1,0,1710,307,15,70,2579,35,543,936,31,601,2318]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";if(Object.defineProperty(e,"__esModule",{value:!0}),p.default.reportIssueUrl){(0,R.registerAction2)(k.ReportPerformanceIssueUsingReporterAction),S.CommandsRegistry.registerCommand(r.OpenIssueReporterActionId,function(i,f){const c=Array.isArray(f)?{extensionId:f[0]}:f||{};return i.get(I.IWorkbenchIssueService).openReporter(c)}),S.CommandsRegistry.registerCommand({id:r.OpenIssueReporterApiCommandId,handler:function(i,f){const c=Array.isArray(f)?{extensionId:f[0]}:f||{};return i.get(I.IWorkbenchIssueService).openReporter(c)},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 u={id:r.OpenIssueReporterActionId,title:{value:(0,t.localize)(0,null),original:"Report Issue..."},category:A.Categories.Help};R.MenuRegistry.appendMenuItem(R.MenuId.CommandPalette,{command:u}),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarHelpMenu,{group:"3_feedback",command:{id:r.OpenIssueReporterActionId,title:(0,t.localize)(1,null)},order:3})}R.MenuRegistry.appendMenuItem(R.MenuId.MenubarHelpMenu,{group:"5_tools",command:{id:"workbench.action.openProcessExplorer",title:(0,t.localize)(2,null)},order:2}),(0,R.registerAction2)(k.OpenProcessExplorer),(0,R.registerAction2)(k.StopTracing),(0,E.registerSingleton)(I.IWorkbenchIssueService,b.WorkbenchIssueService,1),S.CommandsRegistry.registerCommand("_issues.getSystemStatus",u=>u.get(C.IIssueService).getSystemStatus())}),define(ae[937],le([1,0,31,16,40,15]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAllUnboundCommands=void 0;function k(E){const I=[],b=new Map,S=(C,r)=>{if(!b.has(C)&&(b.set(C,!0),!(C[0]==="_"||C.indexOf("vscode.")===0)&&E.get(C)!==!0)){if(!r){const u=t.CommandsRegistry.getCommand(C);if(u&&typeof u.description=="object"&&(0,p.isNonEmptyArray)(u.description.args))return}I.push(C)}};for(const C of A.MenuRegistry.getMenuItems(A.MenuId.CommandPalette))(0,A.isIMenuItem)(C)&&S(C.command.id,!0);for(const C of R.EditorExtensionsRegistry.getEditorActions())S(C.id,!0);for(const C of t.CommandsRegistry.getCommands().keys())S(C,!1);return I}e.getAllUnboundCommands=k}),define(ae[2581],le([1,0,477,7]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputBuilder=e.KeybindingIO=void 0;class R{static writeKeybindingItem(I,b){if(!b.resolvedKeybinding)return;const S=JSON.stringify(b.resolvedKeybinding.getUserSettingsLabel());I.write(`{ "key": ${A(S+",",25)} "command": `);const C=b.when?JSON.stringify(b.when.serialize()):"",r=JSON.stringify(b.command);C.length>0?(I.write(`${r},`),I.writeLine(),I.write(` "when": ${C}`)):I.write(`${r}`),b.commandArgs&&(I.write(","),I.writeLine(),I.write(` "args": ${JSON.stringify(b.commandArgs)}`)),I.write(" }")}static readUserKeybindingItem(I){const b=typeof I.key=="string"?t.KeybindingParser.parseUserBinding(I.key):[],S=typeof I.when=="string"?p.ContextKeyExpr.deserialize(I.when):void 0,C=typeof I.command=="string"?I.command:null,r=typeof I.args<"u"?I.args:void 0;return{parts:b,command:C,commandArgs:r,when:S}}}e.KeybindingIO=R;function A(E,I){return E.length<I?E+new Array(I-E.length).join(" "):E}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(ae[2582],le([1,0,234,2097]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MacLinuxFallbackKeyboardMapper=void 0;class R{constructor(k){this._OS=k}dumpDebugInfo(){return"FallbackKeyboardMapper dispatching on keyCode"}resolveKeybinding(k){return[new p.USLayoutResolvedKeybinding(k,this._OS)]}resolveKeyboardEvent(k){const E=new t.SimpleKeybinding(k.ctrlKey,k.shiftKey,k.altKey,k.metaKey,k.keyCode);return new p.USLayoutResolvedKeybinding(E.toChord(),this._OS)}resolveUserBinding(k){return p.USLayoutResolvedKeybinding.resolveUserBinding(k,this._OS)}}e.MacLinuxFallbackKeyboardMapper=R}),define(ae[2583],le([1,0,99,234,602]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MacLinuxKeyboardMapper=e.NativeResolvedKeybinding=void 0;const A=[];class k extends R.BaseResolvedKeybinding{constructor(r,u,i){super(u,i),this._mapper=r}_getLabel(r){return this._mapper.getUILabelForScanCodeBinding(r)}_getAriaLabel(r){return this._mapper.getAriaLabelForScanCodeBinding(r)}_getElectronAccelerator(r){return this._mapper.getElectronAcceleratorLabelForScanCodeBinding(r)}_getUserSettingsLabel(r){return this._mapper.getUserSettingsLabelForScanCodeBinding(r)}_isWYSIWYG(r){if(!r||t.IMMUTABLE_CODE_TO_KEY_CODE[r.scanCode]!==-1)return!0;const u=this._mapper.getAriaLabelForScanCodeBinding(r),i=this._mapper.getUserSettingsLabelForScanCodeBinding(r);return!u&&!i?!0:!u||!i?!1:u.toLowerCase()===i.toLowerCase()}_getDispatchPart(r){return this._mapper.getDispatchStrForScanCodeBinding(r)}_getSingleModifierDispatchPart(r){return(r.scanCode===157||r.scanCode===161)&&!r.shiftKey&&!r.altKey&&!r.metaKey?"ctrl":(r.scanCode===159||r.scanCode===163)&&!r.ctrlKey&&!r.shiftKey&&!r.metaKey?"alt":(r.scanCode===158||r.scanCode===162)&&!r.ctrlKey&&!r.altKey&&!r.metaKey?"shift":(r.scanCode===160||r.scanCode===164)&&!r.ctrlKey&&!r.shiftKey&&!r.altKey?"meta":null}}e.NativeResolvedKeybinding=k;class E{constructor(r,u,i,f){this.ctrlKey=r,this.shiftKey=u,this.altKey=i,this.scanCode=f}toString(){return`${this.ctrlKey?"Ctrl+":""}${this.shiftKey?"Shift+":""}${this.altKey?"Alt+":""}${t.ScanCodeUtils.toString(this.scanCode)}`}equals(r){return this.ctrlKey===r.ctrlKey&&this.shiftKey===r.shiftKey&&this.altKey===r.altKey&&this.scanCode===r.scanCode}getProducedCharCode(r){return r?this.ctrlKey&&this.shiftKey&&this.altKey?r.withShiftAltGr:this.ctrlKey&&this.altKey?r.withAltGr:this.shiftKey?r.withShift:r.value:""}getProducedChar(r){const u=S.getCharCode(this.getProducedCharCode(r));return u===0?" --- ":u>=768&&u<=879?"U+"+u.toString(16):" "+String.fromCharCode(u)+" "}}class I{constructor(r,u,i,f){this.ctrlKey=r,this.shiftKey=u,this.altKey=i,this.keyCode=f}toString(){return`${this.ctrlKey?"Ctrl+":""}${this.shiftKey?"Shift+":""}${this.altKey?"Alt+":""}${t.KeyCodeUtils.toString(this.keyCode)}`}}class b{constructor(){this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[],this._scanCodeToKeyCode=[],this._keyCodeToScanCode=[]}registrationComplete(){this._moveToEnd(56),this._moveToEnd(106)}_moveToEnd(r){for(let u=0;u<8;u++){const i=this._scanCodeToKeyCode[(r<<3)+u];if(!!i)for(let f=0,c=i.length;f<c;f++){const l=this._keyCodeToScanCode[i[f]];if(l.length!==1)for(let s=0,d=l.length;s<d;s++){const n=l[s];if(n>>>3===r){for(let o=s+1;o<d;o++)l[o-1]=l[o];l[d-1]=n}}}}}registerIfUnknown(r,u){if(u.keyCode===0)return;const i=this._encodeScanCodeCombo(r),f=this._encodeKeyCodeCombo(u),c=u.keyCode>=21&&u.keyCode<=30,l=u.keyCode>=31&&u.keyCode<=56,s=this._scanCodeToKeyCode[i];if(c||l){if(s){for(let d=0,n=s.length;d<n;d++)if(s[d]===f)return}}else if(s&&s.length!==0)return;this._scanCodeToKeyCode[i]=this._scanCodeToKeyCode[i]||[],this._scanCodeToKeyCode[i].unshift(f),this._keyCodeToScanCode[f]=this._keyCodeToScanCode[f]||[],this._keyCodeToScanCode[f].unshift(i)}lookupKeyCodeCombo(r){const u=this._encodeKeyCodeCombo(r),i=this._keyCodeToScanCode[u];if(!i||i.length===0)return[];const f=[];for(let c=0,l=i.length;c<l;c++){const s=i[c],d=!!(s&1),n=!!(s&2),a=!!(s&4),o=s>>>3;f[c]=new E(d,n,a,o)}return f}lookupScanCodeCombo(r){const u=this._encodeScanCodeCombo(r),i=this._scanCodeToKeyCode[u];if(!i||i.length===0)return[];const f=[];for(let c=0,l=i.length;c<l;c++){const s=i[c],d=!!(s&1),n=!!(s&2),a=!!(s&4),o=s>>>3;f[c]=new I(d,n,a,o)}return f}guessStableKeyCode(r){if(r>=36&&r<=45)switch(r){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 u=this.lookupScanCodeCombo(new E(!1,!1,!1,r)),i=this.lookupScanCodeCombo(new E(!1,!0,!1,r));if(u.length===1&&i.length===1){const f=u[0].shiftKey,c=u[0].keyCode,l=i[0].shiftKey,s=i[0].keyCode;if(c===s&&f!==l)return c}return-1}_encodeScanCodeCombo(r){return this._encode(r.ctrlKey,r.shiftKey,r.altKey,r.scanCode)}_encodeKeyCodeCombo(r){return this._encode(r.ctrlKey,r.shiftKey,r.altKey,r.keyCode)}_encode(r,u,i,f){return((r?1:0)<<0|(u?1:0)<<1|(i?1:0)<<2|f<<3)>>>0}}class S{constructor(r,u,i){this._scanCodeToLabel=[],this._scanCodeToDispatch=[],this._isUSStandard=r,this._OS=i,this._codeInfo=[],this._scanCodeKeyCodeMapper=new b,this._scanCodeToLabel=[],this._scanCodeToDispatch=[];const f=(n,a,o,g,h,v,m,w)=>{this._scanCodeKeyCodeMapper.registerIfUnknown(new E(!!n,!!a,!!o,g),new I(!!h,!!v,!!m,w))},c=(n,a,o,g,h)=>{for(let v=n;v<=1;v++)for(let m=a;m<=1;m++)for(let w=o;w<=1;w++)f(v,m,w,g,v,m,w,h)};for(let n=0;n<193;n++)this._scanCodeToLabel[n]=null;for(let n=0;n<193;n++)this._scanCodeToDispatch[n]=null;for(let n=0;n<193;n++){const a=t.IMMUTABLE_CODE_TO_KEY_CODE[n];a!==-1&&(c(0,0,0,n,a),this._scanCodeToLabel[n]=t.KeyCodeUtils.toString(a),a===0||a===5||a===57||a===6||a===4?this._scanCodeToDispatch[n]=null:this._scanCodeToDispatch[n]=`[${t.ScanCodeUtils.toString(n)}]`)}const l={};{const n=[];for(const o in u)if(u.hasOwnProperty(o)){const g=t.ScanCodeUtils.toEnum(o);if(g===0||t.IMMUTABLE_CODE_TO_KEY_CODE[g]!==-1)continue;const h=u[o],v=S.getCharCode(h.value);if(v>=97&&v<=122){const m=65+(v-97);n[m]=!0}}const a=(o,g,h,v)=>{n[o]||(l[t.ScanCodeUtils.toString(g)]={value:h,withShift:v,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")}const s=[];let d=0;for(const n in u)if(u.hasOwnProperty(n)){const a=t.ScanCodeUtils.toEnum(n);if(a===0||t.IMMUTABLE_CODE_TO_KEY_CODE[a]!==-1)continue;this._codeInfo[a]=u[n];const o=l[n]||u[n],g=S.getCharCode(o.value),h=S.getCharCode(o.withShift),v=S.getCharCode(o.withAltGr),m=S.getCharCode(o.withShiftAltGr),w={scanCode:a,value:g,withShift:h,withAltGr:v,withShiftAltGr:m};if(s[d++]=w,this._scanCodeToDispatch[a]=`[${t.ScanCodeUtils.toString(a)}]`,g>=97&&g<=122){const D=65+(g-97);this._scanCodeToLabel[a]=String.fromCharCode(D)}else g>=65&&g<=90?this._scanCodeToLabel[a]=String.fromCharCode(g):g?this._scanCodeToLabel[a]=String.fromCharCode(g):this._scanCodeToLabel[a]=null}for(let n=s.length-1;n>=0;n--){const a=s[n],o=a.scanCode,g=a.withShiftAltGr;if(g===a.withAltGr||g===a.withShift||g===a.value)continue;const h=S._charCodeToKb(g);if(!h)continue;const v=h.shiftKey,m=h.keyCode;v?f(1,1,1,o,0,1,0,m):f(1,1,1,o,0,0,0,m)}for(let n=s.length-1;n>=0;n--){const a=s[n],o=a.scanCode,g=a.withAltGr;if(g===a.withShift||g===a.value)continue;const h=S._charCodeToKb(g);if(!h)continue;const v=h.shiftKey,m=h.keyCode;v?f(1,0,1,o,0,1,0,m):f(1,0,1,o,0,0,0,m)}for(let n=s.length-1;n>=0;n--){const a=s[n],o=a.scanCode,g=a.withShift;if(g===a.value)continue;const h=S._charCodeToKb(g);if(!h)continue;const v=h.shiftKey,m=h.keyCode;v?(f(0,1,0,o,0,1,0,m),f(0,1,1,o,0,1,1,m),f(1,1,0,o,1,1,0,m),f(1,1,1,o,1,1,1,m)):(f(0,1,0,o,0,0,0,m),f(0,1,0,o,0,1,0,m),f(0,1,1,o,0,0,1,m),f(0,1,1,o,0,1,1,m),f(1,1,0,o,1,0,0,m),f(1,1,0,o,1,1,0,m),f(1,1,1,o,1,0,1,m),f(1,1,1,o,1,1,1,m))}for(let n=s.length-1;n>=0;n--){const a=s[n],o=a.scanCode,g=S._charCodeToKb(a.value);if(!g)continue;const h=g.shiftKey,v=g.keyCode;h?(f(0,0,0,o,0,1,0,v),f(0,0,1,o,0,1,1,v),f(1,0,0,o,1,1,0,v),f(1,0,1,o,1,1,1,v)):(f(0,0,0,o,0,0,0,v),f(0,0,1,o,0,0,1,v),f(0,1,0,o,0,1,0,v),f(0,1,1,o,0,1,1,v),f(1,0,0,o,1,0,0,v),f(1,0,1,o,1,0,1,v),f(1,1,0,o,1,1,0,v),f(1,1,1,o,1,1,1,v))}c(0,0,0,36,22),c(0,0,0,37,23),c(0,0,0,38,24),c(0,0,0,39,25),c(0,0,0,40,26),c(0,0,0,41,27),c(0,0,0,42,28),c(0,0,0,43,29),c(0,0,0,44,30),c(0,0,0,45,21),this._scanCodeKeyCodeMapper.registrationComplete()}dumpDebugInfo(){const r=[],u=[88,104];let i=0;r.push(`isUSStandard: ${this._isUSStandard}`),r.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------");for(let f=0;f<193;f++){if(t.IMMUTABLE_CODE_TO_KEY_CODE[f]!==-1&&u.indexOf(f)===-1)continue;i%4===0&&(r.push("| HW Code combination | Key | KeyCode combination | Pri | UI label | User settings | Electron accelerator | Dispatching string | WYSIWYG |"),r.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")),i++;const c=this._codeInfo[f];for(let l=0;l<8;l++){const s=!!(l&1),d=!!(l&2),n=!!(l&4),a=new E(s,d,n,f),o=this.resolveKeyboardEvent({_standardKeyboardEventBrand:!0,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey,metaKey:!1,keyCode:-1,code:t.ScanCodeUtils.toString(f)}),g=a.toString(),h=a.getProducedChar(c),v=o.getAriaLabel(),m=v?v.replace(/Control\+/,"Ctrl+"):null,w=o.getUserSettingsLabel(),D=o.getElectronAccelerator(),y=o.getDispatchParts()[0],_=(o?o.isWYSIWYG():!1)?" ":" NO ",L=this._scanCodeKeyCodeMapper.lookupScanCodeCombo(a);if(L.length===0)r.push(`| ${this._leftPad(g,30)} | ${h} | ${this._leftPad("",25)} | ${this._leftPad("",3)} | ${this._leftPad(m,25)} | ${this._leftPad(w,30)} | ${this._leftPad(D,25)} | ${this._leftPad(y,30)} | ${_} |`);else for(let M=0,O=L.length;M<O;M++){const N=L[M];let P;const B=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(N);if(B.length===1)P="";else{let z=-1;for(let x=0;x<B.length;x++)if(B[x].equals(a)){z=x+1;break}P=String(z)}const V=N.toString();M===0?r.push(`| ${this._leftPad(g,30)} | ${h} | ${this._leftPad(V,25)} | ${this._leftPad(P,3)} | ${this._leftPad(m,25)} | ${this._leftPad(w,30)} | ${this._leftPad(D,25)} | ${this._leftPad(y,30)} | ${_} |`):r.push(`| ${this._leftPad("",30)} | | ${this._leftPad(V,25)} | ${this._leftPad(P,3)} | ${this._leftPad("",25)} | ${this._leftPad("",30)} | ${this._leftPad("",25)} | ${this._leftPad("",30)} | |`)}}r.push("----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------")}return r.join(` `)}_leftPad(r,u){for(r===null&&(r="null");r.length<u;)r=" "+r;return r}simpleKeybindingToScanCodeBinding(r){if(r.keyCode===3)return[new p.ScanCodeBinding(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,46)];const u=this._scanCodeKeyCodeMapper.lookupKeyCodeCombo(new I(r.ctrlKey,r.shiftKey,r.altKey,r.keyCode)),i=[];for(let f=0,c=u.length;f<c;f++){const l=u[f];i[f]=new p.ScanCodeBinding(l.ctrlKey,l.shiftKey,l.altKey,r.metaKey,l.scanCode)}return i}getUILabelForScanCodeBinding(r){if(!r)return null;if(r.isDuplicateModifierCase())return"";if(this._OS===2)switch(r.scanCode){case 86:return"\u2190";case 88:return"\u2191";case 85:return"\u2192";case 87:return"\u2193"}return this._scanCodeToLabel[r.scanCode]}getAriaLabelForScanCodeBinding(r){return r?r.isDuplicateModifierCase()?"":this._scanCodeToLabel[r.scanCode]:null}getDispatchStrForScanCodeBinding(r){const u=this._scanCodeToDispatch[r.scanCode];if(!u)return null;let i="";return r.ctrlKey&&(i+="ctrl+"),r.shiftKey&&(i+="shift+"),r.altKey&&(i+="alt+"),r.metaKey&&(i+="meta+"),i+=u,i}getUserSettingsLabelForScanCodeBinding(r){if(!r)return null;if(r.isDuplicateModifierCase())return"";const u=t.IMMUTABLE_CODE_TO_KEY_CODE[r.scanCode];if(u!==-1)return t.KeyCodeUtils.toUserSettingsUS(u).toLowerCase();const i=this._scanCodeKeyCodeMapper.guessStableKeyCode(r.scanCode);if(i!==-1){const f=this.simpleKeybindingToScanCodeBinding(new p.SimpleKeybinding(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,i));for(let c=0,l=f.length;c<l;c++)if(f[c].scanCode===r.scanCode)return t.KeyCodeUtils.toUserSettingsUS(i).toLowerCase()}return this._scanCodeToDispatch[r.scanCode]}getElectronAcceleratorLabelForScanCodeBinding(r){if(!r)return null;const u=t.IMMUTABLE_CODE_TO_KEY_CODE[r.scanCode];if(u!==-1)return t.KeyCodeUtils.toElectronAccelerator(u);const i=this._scanCodeKeyCodeMapper.guessStableKeyCode(r.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(r){const u=[];for(const i of r.parts)u.push(this.simpleKeybindingToScanCodeBinding(i));return this._toResolvedKeybinding(u)}_toResolvedKeybinding(r){if(r.length===0)return[];const u=[];return this._generateResolvedKeybindings(r,0,[],u),u}_generateResolvedKeybindings(r,u,i,f){const c=r[u],l=u===r.length-1;for(let s=0,d=c.length;s<d;s++){const n=[...i,c[s]];l?f.push(new k(this,this._OS,n)):this._generateResolvedKeybindings(r,u+1,n,f)}}resolveKeyboardEvent(r){let u=t.ScanCodeUtils.toEnum(r.code);u===94&&(u=46);const i=r.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 c=t.IMMUTABLE_KEY_CODE_TO_CODE[i];c!==-1&&(u=c)}else if((u===95||u===96||u===97||u===98||u===99||u===100||u===101||u===102||u===103||u===104||u===105)&&i>=0){const c=t.IMMUTABLE_KEY_CODE_TO_CODE[i];c!==-1&&(u=c)}const f=new p.ScanCodeBinding(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,u);return new k(this,this._OS,[f])}_resolveSimpleUserBinding(r){return r?r instanceof p.ScanCodeBinding?[r]:this.simpleKeybindingToScanCodeBinding(r):[]}resolveUserBinding(r){const u=r.map(i=>this._resolveSimpleUserBinding(i));return this._toResolvedKeybinding(u)}static _redirectCharCode(r){switch(r){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 r}static _charCodeToKb(r){return r=this._redirectCharCode(r),r<A.length?A[r]:null}static getCharCode(r){if(r.length===0)return 0;const u=r.charCodeAt(0);switch(u){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 u}}e.MacLinuxKeyboardMapper=S,function(){function C(r,u,i){for(let f=A.length;f<r;f++)A[f]=null;A[r]={keyCode:u,shiftKey:i}}for(let r=65;r<=90;r++)C(r,31+(r-65),!0);for(let r=97;r<=122;r++)C(r,31+(r-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(ae[938],le([1,0,99,234,327,602,498]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WindowsKeyboardMapper=e.WindowsNativeResolvedKeybinding=void 0;const E=!1;function I(C){E&&console.info(C)}class b extends A.BaseResolvedKeybinding{constructor(r,u){super(1,u),this._mapper=r}_getLabel(r){return r.isDuplicateModifierCase()?"":this._mapper.getUILabelForKeyCode(r.keyCode)}_getUSLabelForKeybinding(r){return r.isDuplicateModifierCase()?"":t.KeyCodeUtils.toString(r.keyCode)}getUSLabel(){return R.UILabelProvider.toLabel(this._os,this._parts,r=>this._getUSLabelForKeybinding(r))}_getAriaLabel(r){return r.isDuplicateModifierCase()?"":this._mapper.getAriaLabelForKeyCode(r.keyCode)}_getElectronAccelerator(r){return this._mapper.getElectronAcceleratorForKeyBinding(r)}_getUserSettingsLabel(r){if(r.isDuplicateModifierCase())return"";const u=this._mapper.getUserSettingsLabelForKeyCode(r.keyCode);return u&&u.toLowerCase()}_isWYSIWYG(r){return this.__isWYSIWYG(r.keyCode)}__isWYSIWYG(r){if(r===15||r===16||r===17||r===18)return!0;const u=this._mapper.getAriaLabelForKeyCode(r),i=this._mapper.getUserSettingsLabelForKeyCode(r);return u===i}_getDispatchPart(r){if(r.isModifierKey())return null;let u="";return r.ctrlKey&&(u+="ctrl+"),r.shiftKey&&(u+="shift+"),r.altKey&&(u+="alt+"),r.metaKey&&(u+="meta+"),u+=t.KeyCodeUtils.toString(r.keyCode),u}_getSingleModifierDispatchPart(r){return r.keyCode===5&&!r.shiftKey&&!r.altKey&&!r.metaKey?"ctrl":r.keyCode===4&&!r.ctrlKey&&!r.altKey&&!r.metaKey?"shift":r.keyCode===6&&!r.ctrlKey&&!r.shiftKey&&!r.metaKey?"alt":r.keyCode===57&&!r.ctrlKey&&!r.shiftKey&&!r.altKey?"meta":null}static getProducedCharCode(r,u){return u?r.ctrlKey&&r.shiftKey&&r.altKey?u.withShiftAltGr:r.ctrlKey&&r.altKey?u.withAltGr:r.shiftKey?u.withShift:u.value:null}static getProducedChar(r,u){const i=this.getProducedCharCode(r,u);return i===null||i.length===0?" --- ":" "+i+" "}}e.WindowsNativeResolvedKeybinding=b;class S{constructor(r,u){this._keyCodeToLabel=[],this.isUSStandard=r,this._scanCodeToKeyCode=[],this._keyCodeToLabel=[],this._keyCodeExists=[],this._keyCodeToLabel[0]=t.KeyCodeUtils.toString(0);for(let l=0;l<193;l++){const s=t.IMMUTABLE_CODE_TO_KEY_CODE[l];s!==-1&&(this._scanCodeToKeyCode[l]=s,this._keyCodeToLabel[s]=t.KeyCodeUtils.toString(s),this._keyCodeExists[s]=!0)}const i=[];let f=!1;this._codeInfo=[];for(const l in u)if(u.hasOwnProperty(l)){const s=t.ScanCodeUtils.toEnum(l);if(s===0){I(`Unknown scanCode ${l} in mapping.`);continue}const d=u[l],n=t.IMMUTABLE_CODE_TO_KEY_CODE[s];if(n!==-1){const w=t.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[d.vkey]||0;if(w===0||n===w||s!==134)continue}const a=d.value,o=d.withShift,g=d.withAltGr,h=d.withShiftAltGr,v=t.NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[d.vkey]||0,m={scanCode:s,keyCode:v,value:a,withShift:o,withAltGr:g,withShiftAltGr:h};if(this._codeInfo[s]=m,this._scanCodeToKeyCode[s]=v,v===0)continue;if(this._keyCodeExists[v]=!0,a.length===0)this._keyCodeToLabel[v]=null;else if(a.length>1)this._keyCodeToLabel[v]=a;else{const w=a.charCodeAt(0);if(w>=97&&w<=122){const D=65+(w-97);i[D]=!0,f=!0,this._keyCodeToLabel[v]=String.fromCharCode(65+(w-97))}else w>=65&&w<=90?(i[w]=!0,f=!0,this._keyCodeToLabel[v]=a):this._keyCodeToLabel[v]=a}}const c=(l,s)=>{i[l]||(this._keyCodeToLabel[s]=String.fromCharCode(l))};if(c(65,31),c(66,32),c(67,33),c(68,34),c(69,35),c(70,36),c(71,37),c(72,38),c(73,39),c(74,40),c(75,41),c(76,42),c(77,43),c(78,44),c(79,45),c(80,46),c(81,47),c(82,48),c(83,49),c(84,50),c(85,51),c(86,52),c(87,53),c(88,54),c(89,55),c(90,56),!f){const l=(s,d)=>{this._keyCodeToLabel[s]=String.fromCharCode(d)};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(){const r=[],u=[88,104];let i=0;r.push("-----------------------------------------------------------------------------------------------------------------------------------------");for(let f=0;f<193;f++){if(t.IMMUTABLE_CODE_TO_KEY_CODE[f]!==-1&&u.indexOf(f)===-1)continue;i%6===0&&(r.push("| HW Code combination | Key | KeyCode combination | UI label | User settings | WYSIWYG |"),r.push("-----------------------------------------------------------------------------------------------------------------------------------------")),i++;const c=this._codeInfo[f],l=t.ScanCodeUtils.toString(f),s=[0,2,5,7];for(const d of s){const n=!!(d&1),a=!!(d&2),o=!!(d&4),g=new p.ScanCodeBinding(n,a,o,!1,f),h=this._resolveSimpleUserBinding(g),v=h?t.KeyCodeUtils.toString(h.keyCode):null,m=h?new b(this,[h]):null,w=`${n?"Ctrl+":""}${a?"Shift+":""}${o?"Alt+":""}${l}`,D=m?m.getAriaLabel():null,y=D?D.replace(/Control\+/,"Ctrl+"):null,T=m?m.getUserSettingsLabel():null,_=b.getProducedChar(g,c),L=v?`${n?"Ctrl+":""}${a?"Shift+":""}${o?"Alt+":""}${v}`:null,O=(m?m.isWYSIWYG():!1)?" ":" NO ";r.push(`| ${this._leftPad(w,30)} | ${_} | ${this._leftPad(L,25)} | ${this._leftPad(y,25)} | ${this._leftPad(T,25)} | ${O} |`)}r.push("-----------------------------------------------------------------------------------------------------------------------------------------")}return r.join(` `)}_leftPad(r,u){for(r===null&&(r="null");r.length<u;)r=" "+r;return r}getUILabelForKeyCode(r){return this._getLabelForKeyCode(r)}getAriaLabelForKeyCode(r){return this._getLabelForKeyCode(r)}getUserSettingsLabelForKeyCode(r){return this.isUSStandard?t.KeyCodeUtils.toUserSettingsUS(r):t.KeyCodeUtils.toUserSettingsGeneral(r)}getElectronAcceleratorForKeyBinding(r){return t.KeyCodeUtils.toElectronAccelerator(r.keyCode)}_getLabelForKeyCode(r){return this._keyCodeToLabel[r]||t.KeyCodeUtils.toString(0)}resolveKeybinding(r){const u=r.parts;for(let i=0,f=u.length;i<f;i++){const c=u[i];if(!this._keyCodeExists[c.keyCode])return[]}return[new b(this,u)]}resolveKeyboardEvent(r){const u=new p.SimpleKeybinding(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,r.keyCode);return new b(this,[u])}_resolveSimpleUserBinding(r){if(!r)return null;if(r instanceof p.SimpleKeybinding)return this._keyCodeExists[r.keyCode]?r:null;const u=this._scanCodeToKeyCode[r.scanCode]||0;return u===0||!this._keyCodeExists[u]?null:new p.SimpleKeybinding(r.ctrlKey,r.shiftKey,r.altKey,r.metaKey,u)}resolveUserBinding(r){const u=(0,k.removeElementsAfterNulls)(r.map(i=>this._resolveSimpleUserBinding(i)));return u.length>0?[new b(this,u)]:[]}}e.WindowsKeyboardMapper=S}),define(ae[2584],le([1,0,2,603,6,14,2099,938,2582,2583,102,183]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeyboardLayoutService=void 0;let r=class extends t.Disposable{constructor(l){super(),this._onDidChangeKeyboardLayout=this._register(new R.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:s,keyboardMapping:d})=>{await this.initialize(),!u(this._keyboardMapping,d)&&(this._keyboardMapping=d,this._keyboardLayoutInfo=s,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:s,keyboardMapping:d}=l;this._keyboardMapping=d,this._keyboardLayoutInfo=s,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){}};r=we([F(0,S.IMainProcessService)],r),e.KeyboardLayoutService=r;function u(c,l){return A.OS===1?(0,p.windowsKeyboardMappingEquals)(c,l):(0,p.macLinuxKeyboardMappingEquals)(c,l)}function i(c,l){const s=f(c);return A.OS===1?new E.WindowsKeyboardMapper(s,l):!l||Object.keys(l).length===0?new I.MacLinuxFallbackKeyboardMapper(A.OS):A.OS===2&&c.id==="com.apple.keylayout.DVORAK-QWERTYCMD"?new I.MacLinuxFallbackKeyboardMapper(A.OS):new b.MacLinuxKeyboardMapper(s,l,A.OS)}function f(c){if(!c)return!1;if(A.OS===3){const l=c;return l.layout.split(/,/g)[l.group]==="us"}return A.OS===2?c.id==="com.apple.keylayout.US":A.OS===1?c.name==="00000409":!1}}),define(ae[393],le([1,0,2026,376,18,42,2115,8,81,19,39,131,35,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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 i=class extends k.LanguageService{constructor(s,d,n,a){super(n.verbose||n.isExtensionDevelopment||!n.isBuilt),this.logService=a,this._configurationService=d,this._extensionService=s,e.languagesExtPoint.setHandler(o=>{const g=[];for(let h=0,v=o.length;h<v;h++){const m=o[h];if(!Array.isArray(m.value)){m.collector.error((0,t.localize)(12,null,e.languagesExtPoint.name));continue}for(let w=0,D=m.value.length;w<D;w++){const y=m.value[w];if(c(y,m.description,m.collector)){let T;y.configuration&&(T=(0,R.joinPath)(m.description.extensionLocation,y.configuration)),g.push({id:y.id,extensions:y.extensions,filenames:y.filenames,filenamePatterns:y.filenamePatterns,firstLine:y.firstLine,aliases:y.aliases,mimetypes:y.mimetypes,configuration:T,icon:y.icon&&{light:(0,R.joinPath)(m.description.extensionLocation,y.icon.light),dark:(0,R.joinPath)(m.description.extensionLocation,y.icon.dark)}})}}}this._registry.setDynamicLanguages(g)}),this.updateMime(),this._configurationService.onDidChangeConfiguration(o=>{o.affectsConfiguration(b.FILES_ASSOCIATIONS_CONFIG)&&this.updateMime()}),this._extensionService.whenInstalledExtensionsRegistered().then(()=>{this.updateMime()}),this.onDidEncounterLanguage(o=>{this._extensionService.activateByEvent(`onLanguage:${o}`)})}updateMime(){const s=this._configurationService.getValue();(0,p.clearConfiguredLanguageAssociations)(),s.files?.associations&&Object.keys(s.files.associations).forEach(d=>{const n=s.files.associations[d];if(typeof n!="string"){this.logService.warn(`Ingnoing configured 'files.associations' for '${d}' because its type is not a string but '${typeof n}'`);return}const a=this.getMimeType(n)||`text/x-${n}`;(0,p.registerConfiguredLanguageAssociation)({id:n,mime:a,filepattern:d})}),this._onDidChange.fire()}};i=we([F(0,S.IExtensionService),F(1,E.IConfigurationService),F(2,I.IEnvironmentService),F(3,u.ILogService)],i),e.WorkbenchLanguageService=i;function f(l){return typeof l>"u"?!0:Array.isArray(l)?l.every(s=>typeof s=="string"):!1}function c(l,s,d){return l?typeof l.id!="string"?(d.error((0,t.localize)(14,null,"id")),!1):f(l.extensions)?f(l.filenames)?typeof l.firstLine<"u"&&typeof l.firstLine!="string"?(d.error((0,t.localize)(17,null,"firstLine")),!1):typeof l.configuration<"u"&&typeof l.configuration!="string"?(d.error((0,t.localize)(18,null,"configuration")),!1):f(l.aliases)?f(l.mimetypes)?typeof l.icon<"u"&&(typeof l.icon!="object"||typeof l.icon.light!="string"||typeof l.icon.dark!="string")?(d.error((0,t.localize)(21,null,"icon","light","dark")),!1):!0:(d.error((0,t.localize)(20,null,"mimetypes")),!1):(d.error((0,t.localize)(19,null,"aliases")),!1):(d.error((0,t.localize)(16,null,"filenames")),!1):(d.error((0,t.localize)(15,null,"extensions")),!1):(d.error((0,t.localize)(13,null,e.languagesExtPoint.name)),!1)}(0,r.registerSingleton)(A.ILanguageService,i,0)}),define(ae[2585],le([1,0,1550,393]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.codeActionsExtensionPointDescriptor=e.CodeActionExtensionPointFields=void 0;var R;(function(k){k.languages="languages",k.actions="actions",k.kind="kind",k.title="title",k.description="description"})(R=e.CodeActionExtensionPointFields||(e.CodeActionExtensionPointFields={}));const A=Object.freeze({type:"array",markdownDescription:t.localize(0,null),items:{type:"object",required:[R.languages,R.actions],properties:{[R.languages]:{type:"array",description:t.localize(1,null),items:{type:"string"}},[R.actions]:{type:"object",required:[R.kind,R.title],properties:{[R.kind]:{type:"string",markdownDescription:t.localize(2,null)},[R.title]:{type:"string",description:t.localize(3,null)},[R.description]:{type:"string",description:t.localize(4,null)}}}}}});e.codeActionsExtensionPointDescriptor={extensionPoint:"codeActions",deps:[p.languagesExtPoint],jsonSchema:A}}),define(ae[2586],le([1,0,1551,393]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.documentationExtensionPointDescriptor=e.DocumentationExtensionPointFields=void 0;var R;(function(k){k.when="when",k.title="title",k.command="command"})(R=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:[R.title,R.when,R.command],properties:{[R.title]:{type:"string",description:t.localize(3,null)},[R.when]:{type:"string",description:t.localize(4,null)},[R.command]:{type:"string",description:t.localize(5,null)}}}}}});e.documentationExtensionPointDescriptor={extensionPoint:"documentation",deps:[p.languagesExtPoint],jsonSchema:A}}),define(ae[2587],le([1,0,1588,131,393]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.customEditorsExtensionPoint=void 0;const A=Object.freeze({viewType:"viewType",displayName:"displayName",selector:"selector",priority:"priority"}),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=p.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"customEditors",deps:[R.languagesExtPoint],jsonSchema:k})}),define(ae[2588],le([1,0,6,2,1586,187,389,2587,169]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContributedCustomEditors=void 0;class b extends p.Disposable{constructor(r){super(),this._editors=new Map,this._onChange=this._register(new t.Emitter),this.onChange=this._onChange.event,this._memento=new A.Memento(b.CUSTOM_EDITORS_STORAGE_ID,r);const u=this._memento.getMemento(0,1);for(const i of u[b.CUSTOM_EDITORS_ENTRY_ID]||[])this.add(new k.CustomEditorInfo(i));E.customEditorsExtensionPoint.setHandler(i=>{this.update(i)})}update(r){this._editors.clear();for(const i of r)for(const f of i.value)this.add(new k.CustomEditorInfo({id:f.viewType,displayName:f.displayName,providerDisplayName:i.description.isBuiltin?R.localize(0,null):i.description.displayName||i.description.identifier.value,selector:f.selector||[],priority:S(f,i.description)}));const u=this._memento.getMemento(0,1);u[b.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._editors.values()),this._memento.saveMemento(),this._onChange.fire()}[Symbol.iterator](){return this._editors.values()}get(r){return this._editors.get(r)}getContributedEditors(r){return Array.from(this._editors.values()).filter(u=>u.matches(r))}add(r){if(this._editors.has(r.id)){console.error(`Custom editor with id '${r.id}' already registered`);return}this._editors.set(r.id,r)}}e.ContributedCustomEditors=b,b.CUSTOM_EDITORS_STORAGE_ID="customEditors",b.CUSTOM_EDITORS_ENTRY_ID="editors";function S(C,r){switch(C.priority){case I.RegisteredEditorPriority.default:case I.RegisteredEditorPriority.option:return C.priority;case I.RegisteredEditorPriority.builtin:return r.isBuiltin?I.RegisteredEditorPriority.builtin:I.RegisteredEditorPriority.default;default:return I.RegisteredEditorPriority.default}}}),define(ae[294],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageDetectionStatsId=e.AutomaticLanguageDetectionLikelyWrongId=e.LanguageDetectionLanguageEventSource=e.ILanguageDetectionService=void 0,e.ILanguageDetectionService=(0,t.createDecorator)("ILanguageDetectionService"),e.LanguageDetectionLanguageEventSource="languageDetection",e.AutomaticLanguageDetectionLikelyWrongId="automaticlanguagedetection.likelywrong",e.LanguageDetectionStatsId="automaticlanguagedetection.stats"}),define(ae[394],le([1,0,255,42,54,2,125,13,294,11,111,1535]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTextEditorModel=void 0;let r=class Ya extends t.EditorModel{constructor(i,f,c,l,s){super(),this.modelService=i,this.languageService=f,this.languageDetectionService=c,this.accessibilityService=l,this.textEditorModelHandle=void 0,this.modelDisposeListener=this._register(new A.MutableDisposable),this.autoDetectLanguageThrottler=this._register(new b.ThrottledDelayer(Ya.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY)),this._hasLanguageSetExplicitly=!1,s&&this.handleExistingModel(s)}handleExistingModel(i){const f=this.modelService.getModel(i);if(!f)throw new Error(`Document with resource ${i.toString(!0)} does not exist`);this.textEditorModelHandle=i,this.registerModelDisposeListener(f)}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,f){this._hasLanguageSetExplicitly=!0,this.setLanguageIdInternal(i,f)}setLanguageIdInternal(i,f){!this.isResolved()||!i||i===this.textEditorModel.getLanguageId()||this.modelService.setMode(this.textEditorModel,this.languageService.createById(i),f)}installModelListeners(i){const f=this._register(i.onDidChangeLanguage(c=>{c.source!==I.LanguageDetectionLanguageEventSource&&(this._hasLanguageSetExplicitly=!0,f.dispose())}))}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,I.LanguageDetectionLanguageEventSource);const f=this.languageService.getLanguageName(i);f&&this.accessibilityService.alert((0,C.localize)(0,null,f))}}createTextEditorModel(i,f,c){const l=this.getFirstLineText(i),s=this.getOrCreateLanguage(f,this.languageService,c,l);return this.doCreateTextEditorModel(i,s,f)}doCreateTextEditorModel(i,f,c){let l=c&&this.modelService.getModel(c);return l?this.updateTextEditorModel(i,f.languageId):(l=this.modelService.createModel(i,f,c),this.createdEditorModel=!0,this.registerModelDisposeListener(l)),this.textEditorModelHandle=l.uri,l}getFirstLineText(i){const f=i;return typeof f.getFirstLineText=="function"?f.getFirstLineText(1e3):i.getLineContent(1).substr(0,1e3)}getOrCreateLanguage(i,f,c,l){return!c||c===k.PLAINTEXT_LANGUAGE_ID?f.createByFilepathOrFirstLine((0,E.withUndefinedAsNull)(i),l):f.createById(c)}updateTextEditorModel(i,f){!this.isResolved()||(i&&this.modelService.updateModel(this.textEditorModel,i),f&&f!==k.PLAINTEXT_LANGUAGE_ID&&this.textEditorModel.getLanguageId()!==f&&this.modelService.setMode(this.textEditorModel,this.languageService.createById(f)))}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()}};r.AUTO_DETECT_LANGUAGE_THROTTLE_DELAY=600,r=we([F(0,R.IModelService),F(1,p.ILanguageService),F(2,I.ILanguageDetectionService),F(3,S.IAccessibilityService)],r),e.BaseTextEditorModel=r}),define(ae[230],le([1,0,1533,177,43,394,847,849,13,24,130]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorInputSerializer=e.DiffEditorInput=void 0;let C=class Ps extends p.SideBySideEditorInput{get typeId(){return Ps.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}constructor(i,f,c,l,s,d){super(i,f,c,l,d),this.original=c,this.modified=l,this.forceOpenAsBinary=s,this.cachedModel=void 0,this.labels=this.computeLabels()}computeLabels(){let i,f=!1;if(this.preferredName)i=this.preferredName;else{const o=this.original.getName(),g=this.modified.getName();i=(0,t.localize)(0,null,o,g),f=o===g}let c,l,s;if(this.preferredDescription)c=this.preferredDescription,l=this.preferredDescription,s=this.preferredDescription;else{c=this.computeLabel(this.original.getDescription(0),this.modified.getDescription(0)),s=this.computeLabel(this.original.getDescription(2),this.modified.getDescription(2));const o=this.original.getDescription(1),g=this.modified.getDescription(1);if(typeof o=="string"&&typeof g=="string"&&(o||g)){const[h,v]=(0,S.shorten)([o,g]);l=this.computeLabel(h,v)}}const d=this.computeLabel(this.original.getTitle(0)??this.original.getName(),this.modified.getTitle(0)??this.modified.getName()," \u2194 "),n=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:c,mediumDescription:l,longDescription:s,forceDescription:f,shortTitle:d,mediumTitle:n,longTitle:a}}computeLabel(i,f,c=" - "){if(!(!i||!f))return i===f?f:`${i}${c}${f}`}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?.dispose(),this.cachedModel=i,this.cachedModel}prefersEditorPane(i){return this.forceOpenAsBinary?i.find(f=>f.typeId===R.BINARY_DIFF_EDITOR_ID):i.find(f=>f.typeId===R.TEXT_DIFF_EDITOR_ID)}async createModel(){const[i,f]=await Promise.all([this.original.resolve(),this.modified.resolve()]);return f instanceof A.BaseTextEditorModel&&i instanceof A.BaseTextEditorModel?new E.TextDiffEditorModel(i,f):new k.DiffEditorModel((0,I.withNullAsUndefined)(i),(0,I.withNullAsUndefined)(f))}toUntyped(i){const f=super.toUntyped(i);if(f)return{...f,modified:f.primary,original:f.secondary}}matches(i){return this===i?!0:i instanceof Ps?this.modified.matches(i.modified)&&this.original.matches(i.original)&&i.forceOpenAsBinary===this.forceOpenAsBinary:(0,R.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=we([F(5,b.IEditorService)],C),e.DiffEditorInput=C;class r extends p.AbstractSideBySideEditorInputSerializer{createEditorInput(i,f,c,l,s){return i.createInstance(C,f,c,l,s,void 0)}}e.DiffEditorInputSerializer=r}),define(ae[939],le([1,0,394,42,54,294,111]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditorModel=void 0;let E=class extends t.BaseTextEditorModel{constructor(b,S,C,r,u){super(C,S,r,u,b)}dispose(){this.textEditorModelHandle&&this.modelService.destroyModel(this.textEditorModelHandle),super.dispose()}};E=we([F(1,p.ILanguageService),F(2,R.IModelService),F(3,A.ILanguageDetectionService),F(4,k.IAccessibilityService)],E),e.TextResourceEditorModel=E}),define(ae[2589],le([1,0,160,9,59,199,54,42,1764,15,7,141,48,532,178,152,101,215,64,294,162,26,228]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const g="notebook.clearAllCellsOutputs",h="notebook.cell.edit",v="notebook.cell.delete",m="notebook.cell.clearOutputs";(0,b.registerAction2)(class extends i.NotebookCellAction{constructor(){super({id:h,title:(0,I.localize)(0,null),keybinding:{when:S.ContextKeyExpr.and(f.NOTEBOOK_CELL_LIST_FOCUSED,S.ContextKeyExpr.not(C.InputFocusedContextKey),f.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0)),primary:3,weight:200},menu:{id:b.MenuId.NotebookCellTitle,when:S.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_EDITABLE.isEqualTo(!0),f.NOTEBOOK_CELL_TYPE.isEqualTo("markup"),f.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.toNegated(),f.NOTEBOOK_CELL_EDITABLE),order:0,group:i.CELL_TITLE_CELL_GROUP_ID},icon:l.editIcon})}async runWithContext(T,_){!_.notebookEditor.hasModel()||_.notebookEditor.isReadOnly||await _.notebookEditor.focusNotebookCell(_.cell,"editor")}});const w=S.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,C.InputFocusedContext);(0,b.registerAction2)(class extends i.NotebookCellAction{constructor(){super({id:c.QUIT_EDIT_CELL_COMMAND_ID,title:(0,I.localize)(1,null),menu:{id:b.MenuId.NotebookCellTitle,when:S.ContextKeyExpr.and(f.NOTEBOOK_CELL_TYPE.isEqualTo("markup"),f.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE,f.NOTEBOOK_CELL_EDITABLE),order:3,group:i.CELL_TITLE_CELL_GROUP_ID},icon:l.stopEditIcon,keybinding:[{when:S.ContextKeyExpr.and(w,R.EditorContextKeys.hoverVisible.toNegated(),R.EditorContextKeys.hasNonEmptySelection.toNegated(),R.EditorContextKeys.hasMultipleSelections.toNegated()),primary:9,weight:i.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT-5},{when:S.ContextKeyExpr.and(w,f.NOTEBOOK_CELL_TYPE.isEqualTo("markup")),primary:259,win:{primary:2563},weight:i.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT-5}]})}async runWithContext(T,_){_.cell.cellKind===s.CellKind.Markup&&_.cell.updateEditState(c.CellEditState.Preview,c.QUIT_EDIT_CELL_COMMAND_ID),await _.notebookEditor.focusNotebookCell(_.cell,"container",{skipReveal:!0})}}),(0,b.registerAction2)(class extends i.NotebookCellAction{constructor(){super({id:v,title:(0,I.localize)(2,null),keybinding:{primary:20,mac:{primary:2049},when:S.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,S.ContextKeyExpr.not(C.InputFocusedContextKey)),weight:200},menu:[{id:b.MenuId.NotebookCellDelete,when:f.NOTEBOOK_EDITOR_EDITABLE,group:i.CELL_TITLE_CELL_GROUP_ID},{id:b.MenuId.InteractiveCellDelete,group:i.CELL_TITLE_CELL_GROUP_ID}],icon:l.deleteCellIcon})}async runWithContext(T,_){!_.notebookEditor.hasModel()||(0,u.runDeleteAction)(_.notebookEditor,_.cell)}}),(0,b.registerAction2)(class extends i.NotebookCellAction{constructor(){super({id:m,title:(0,I.localize)(3,null),menu:[{id:b.MenuId.NotebookCellTitle,when:S.ContextKeyExpr.and(f.NOTEBOOK_CELL_TYPE.isEqualTo("code"),i.executeNotebookCondition,f.NOTEBOOK_CELL_HAS_OUTPUTS,f.NOTEBOOK_EDITOR_EDITABLE,f.NOTEBOOK_CELL_EDITABLE,f.NOTEBOOK_USE_CONSOLIDATED_OUTPUT_BUTTON.toNegated()),order:5,group:i.CELL_TITLE_OUTPUT_GROUP_ID},{id:b.MenuId.NotebookOutputToolbar,when:S.ContextKeyExpr.and(f.NOTEBOOK_CELL_HAS_OUTPUTS,f.NOTEBOOK_EDITOR_EDITABLE,f.NOTEBOOK_CELL_EDITABLE)}],keybinding:{when:S.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_FOCUSED,S.ContextKeyExpr.not(C.InputFocusedContextKey),f.NOTEBOOK_CELL_HAS_OUTPUTS,f.NOTEBOOK_EDITOR_EDITABLE,f.NOTEBOOK_CELL_EDITABLE),primary:532,weight:200},icon:l.clearIcon})}async runWithContext(T,_){const L=T.get(n.INotebookExecutionStateService),M=_.notebookEditor;if(!M.hasModel()||!M.textModel.length)return;const O=_.cell,N=M.textModel.cells.indexOf(O.model);if(N<0)return;const P=!M.isReadOnly;M.textModel.applyEdits([{editType:2,index:N,outputs:[]}],!0,void 0,()=>{},void 0,P),L.getCellExecution(_.cell.uri)?.state!==s.NotebookCellExecutionState.Executing&&_.notebookEditor.textModel.applyEdits([{editType:9,index:N,internalMetadata:{runStartTime:null,runStartTimeAdjustment:null,runEndTime:null,executionOrder:null,lastRunSuccess:null}}],!0,void 0,()=>{},void 0,P)}}),(0,b.registerAction2)(class extends i.NotebookAction{constructor(){super({id:g,title:(0,I.localize)(4,null),precondition:f.NOTEBOOK_HAS_OUTPUTS,menu:[{id:b.MenuId.EditorTitle,when:S.ContextKeyExpr.and(f.NOTEBOOK_IS_ACTIVE_EDITOR,S.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:0},{id:b.MenuId.NotebookToolbar,when:S.ContextKeyExpr.and(i.executeNotebookCondition,S.ContextKeyExpr.equals("config.notebook.globalToolbar",!0)),group:"navigation/execute",order:0}],icon:l.clearIcon})}async runWithContext(T,_){const L=T.get(n.INotebookExecutionStateService),M=_.notebookEditor;if(!M.hasModel()||!M.textModel.length)return;const O=!M.isReadOnly;M.textModel.applyEdits(M.textModel.cells.map((P,B)=>({editType:2,index:B,outputs:[]})),!0,void 0,()=>{},void 0,O);const N=M.textModel.cells.map((P,B)=>{if(L.getCellExecution(P.uri)?.state!==s.NotebookCellExecutionState.Executing)return{editType:9,index:B,internalMetadata:{runStartTime:null,runStartTimeAdjustment:null,runEndTime:null,executionOrder:null,lastRunSuccess:null}}}).filter(P=>!!P);N.length&&_.notebookEditor.textModel.applyEdits(N,!0,void 0,()=>{},void 0,O)}}),(0,b.registerAction2)(class extends i.NotebookCellAction{constructor(){super({id:c.CHANGE_CELL_LANGUAGE,title:(0,I.localize)(5,null),description:{description:(0,I.localize)(6,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(T,_,...L){if(!_||typeof _.start!="number"||typeof _.end!="number"||_.start>=_.end)return;const M=L.length&&typeof L[0]=="string"?L[0]:void 0,O=this.getEditorContextFromArgsOrActive(T);if(!(!O||!O.notebookEditor.hasModel()||_.start>=O.notebookEditor.getLength()))return{notebookEditor:O.notebookEditor,cell:O.notebookEditor.cellAt(_.start),language:M}}async runWithContext(T,_){_.language?await this.setLanguage(_,_.language):await this.showLanguagePicker(T,_)}async showLanguagePicker(T,_){const L=[],M=[],O=T.get(E.ILanguageService),N=T.get(k.IModelService),P=T.get(r.IQuickInputService),B=T.get(d.ILanguageDetectionService);new Set([..._.notebookEditor.activeKernel?.supportedLanguages??O.getRegisteredLanguageIds(),"markdown"]).forEach(U=>{let $;(_.cell.cellKind===s.CellKind.Markup?U==="markdown":U===_.cell.language)?$=(0,I.localize)(7,null,U):$=(0,I.localize)(8,null,U);const q=O.getLanguageName(U);if(!q)return;const X={label:q,iconClasses:(0,A.getIconClasses)(N,O,this.getFakeResource(q,O)),description:$,languageId:U};U==="markdown"||U===_.cell.language?L.push(X):M.push(X)}),M.sort((U,$)=>U.description.localeCompare($.description));const z={label:(0,I.localize)(9,null)},x=[z,{type:"separator",label:(0,I.localize)(10,null)},...L,{type:"separator"},...M],H=await P.pick(x,{placeHolder:(0,I.localize)(11,null)}),W=H===z?await B.detectLanguage(_.cell.uri):H?.languageId;W&&await this.setLanguage(_,W)}async setLanguage(T,_){await D(_,T)}getFakeResource(T,_){let L;const M=_.getLanguageIdByLanguageName(T);if(M){const O=_.getExtensions(M);if(O.length)L=p.URI.file(O[0]);else{const N=_.getFilenames(M);N.length&&(L=p.URI.file(N[0]))}}return L}}),(0,b.registerAction2)(class extends i.NotebookCellAction{constructor(){super({id:c.DETECT_CELL_LANGUAGE,title:{value:(0,I.localize)(12,null),original:"Accept Detected Language for Cell"},f1:!0,precondition:S.ContextKeyExpr.and(f.NOTEBOOK_EDITOR_EDITABLE,f.NOTEBOOK_CELL_EDITABLE),keybinding:{primary:1570,weight:200}})}async runWithContext(T,_){const L=T.get(d.ILanguageDetectionService),M=T.get(a.INotificationService),P=[...T.get(o.INotebookKernelService).getSelectedOrSuggestedKernel(_.notebookEditor.textModel)?.supportedLanguages??[]];P.push("markdown");const B=await L.detectLanguage(_.cell.uri,P);B?D(B,_):M.warn((0,I.localize)(13,null))}});async function D(y,T){if(y==="markdown"&&T.cell?.language!=="markdown"){const _=T.notebookEditor.getCellIndex(T.cell);await(0,u.changeCellToKind)(s.CellKind.Markup,{cell:T.cell,notebookEditor:T.notebookEditor,ui:!0},"markdown",t.Mimes.markdown);const L=T.notebookEditor.cellAt(_);L&&await T.notebookEditor.focusNotebookCell(L,"editor")}else if(y!=="markdown"&&T.cell?.cellKind===s.CellKind.Markup)await(0,u.changeCellToKind)(s.CellKind.Code,{cell:T.cell,notebookEditor:T.notebookEditor,ui:!0},y);else{const _=T.notebookEditor.textModel.cells.indexOf(T.cell.model);T.notebookEditor.textModel.applyEdits([{editType:4,index:_,language:y}],!0,void 0,()=>{},void 0,!T.notebookEditor.isReadOnly)}}}),define(ae[940],le([1,0,43,255,230,258,24]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookDiffEditorInput=void 0;class E extends p.EditorModel{constructor(S,C){super(),this.original=S,this.modified=C}}let I=class Sr extends R.DiffEditorInput{static create(S,C,r,u,i,f){const c=A.NotebookEditorInput.create(S,i,f),l=A.NotebookEditorInput.create(S,C,f);return S.createInstance(Sr,r,u,c,l,f)}get resource(){return this.modified.resource}get editorId(){return this.viewType}constructor(S,C,r,u,i,f){super(S,C,r,u,void 0,f),this.original=r,this.modified=u,this.viewType=i,this._modifiedTextModel=null,this._originalTextModel=null,this._cachedModel=void 0}get typeId(){return Sr.ID}async resolve(){const[S,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(!S)throw new Error(`Fail to resolve original editor model for resource ${this.original.resource} with notebookType ${this.viewType}`);return this._originalTextModel=S,this._modifiedTextModel=C,this._cachedModel=new E(this._originalTextModel,this._modifiedTextModel),this._cachedModel}toUntyped(){const S={resource:this.original.resource},C={resource:this.resource};return{original:S,modified:C,primary:C,secondary:S,options:{override:this.viewType}}}matches(S){return this===S?!0:S instanceof Sr?this.modified.matches(S.modified)&&this.original.matches(S.original)&&this.viewType===S.viewType:(0,t.isResourceDiffEditorInput)(S)?this.modified.matches(S.modified)&&this.original.matches(S.original)&&this.editorId!==void 0&&(this.editorId===S.options?.override||S.options?.override===void 0):!1}dispose(){super.dispose(),this._cachedModel?.dispose(),this._cachedModel=void 0,this.original.dispose(),this.modified.dispose(),this._originalTextModel=null,this._modifiedTextModel=null}};I.ID="workbench.input.diffNotebookInput",I=we([F(5,k.IEditorService)],I),e.NotebookDiffEditorInput=I}),define(ae[2590],le([1,0,86,6,88,206,2,60,22,13,9,75,282,111,8,19,5,23,187,2512,940,2356,64,258,447,449,2365,873,142,169,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookService=e.NotebookOutputRendererInfoStore=e.NotebookProviderInfoStore=void 0;let _=class Vi extends k.Disposable{constructor(P,B,V,z,x,H,W,U){super(),this._editorResolverService=V,this._configurationService=z,this._accessibilityService=x,this._instantiationService=H,this._fileService=W,this._notebookEditorModelResolverService=U,this._handled=!1,this._contributedEditors=new Map,this._contributedEditorDisposables=this._register(new k.DisposableStore),this._memento=new s.Memento(Vi.CUSTOM_EDITORS_STORAGE_ID,P);const $=this._memento.getMemento(0,1);this._editorResolverService.bufferChangeEvents(()=>{for(const q of $[Vi.CUSTOM_EDITORS_ENTRY_ID]||[])this.add(new w.NotebookProviderInfo(q))}),this._register(B.onDidRegisterExtensions(()=>{this._handled||(this._clear(),$[Vi.CUSTOM_EDITORS_ENTRY_ID]=[],this._memento.saveMemento())})),d.notebooksExtensionPoint.setHandler(q=>this._setupHandler(q))}dispose(){this._clear(),super.dispose()}_setupHandler(P){this._handled=!0;const B=[...this._contributedEditors.values()].filter(x=>!x.extension);this._clear();const V=new Map;B.forEach(x=>{V.set(x.id,this.add(x))});for(const x of P)for(const H of x.value){if(!H.type){x.collector.error("Notebook does not specify type-property");continue}const W=this.get(H.type);if(W)if(!W.extension&&x.description.isBuiltin&&B.find(U=>U.id===H.type))V.get(H.type)?.dispose();else{x.collector.error(`Notebook type '${H.type}' already used`);continue}this.add(new w.NotebookProviderInfo({extension:x.description.identifier,id:H.type,displayName:H.displayName,selectors:H.selector||[],priority:this._convertPriority(H.priority),providerDisplayName:x.description.displayName??x.description.identifier.value,exclusive:!1}))}const z=this._memento.getMemento(0,1);z[Vi.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._contributedEditors.values()),this._memento.saveMemento()}clearEditorCache(){const P=this._memento.getMemento(0,1);P[Vi.CUSTOM_EDITORS_ENTRY_ID]=[],this._memento.saveMemento()}_convertPriority(P){return!P||P===o.NotebookEditorPriority.default?y.RegisteredEditorPriority.default:y.RegisteredEditorPriority.option}_registerContributionPoint(P){const B=new k.DisposableStore;for(const V of P.selectors){const z=V.include||V,x={id:P.id,label:P.displayName,detail:P.providerDisplayName,priority:P.exclusive?y.RegisteredEditorPriority.exclusive:P.priority},H={canHandleDiff:()=>!!this._configurationService.getValue(o.NotebookSetting.textDiffEditorPreview)&&!this._accessibilityService.isScreenReaderOptimized(),canSupportResource:G=>G.scheme===I.Schemas.untitled||G.scheme===I.Schemas.vscodeNotebookCell||this._fileService.hasProvider(G)},W=({resource:G,options:Q})=>{const j=o.CellUri.parse(G);let K=G,Y;j&&(K=j.notebook,Y={resource:G,options:Q});const ee={...Q,cellOptions:Y};return{editor:g.NotebookEditorInput.create(this._instantiationService,K,P.id),options:ee}},U=async({resource:G,options:Q})=>{const j=await this._notebookEditorModelResolverService.resolve({untitledResource:G},P.id);return j.object.notebook.onWillDispose(()=>{j.dispose()}),{editor:g.NotebookEditorInput.create(this._instantiationService,j.object.resource,P.id),options:Q}},$=({modified:G,original:Q,label:j,description:K})=>({editor:n.NotebookDiffEditorInput.create(this._instantiationService,G.resource,j,K,Q.resource,P.id)}),q={createEditorInput:W,createDiffEditorInput:$,createUntitledEditorInput:U},X={createEditorInput:W,createDiffEditorInput:$};B.add(this._configurationService.onDidChangeConfiguration(G=>{G.affectsConfiguration(o.NotebookSetting.textDiffEditorPreview)&&(!!this._configurationService.getValue(o.NotebookSetting.textDiffEditorPreview)&&!this._accessibilityService.isScreenReaderOptimized()?(q.createDiffEditorInput=$,X.createDiffEditorInput=$):(q.createDiffEditorInput=void 0,X.createDiffEditorInput=void 0))})),B.add(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>{!!this._configurationService.getValue(o.NotebookSetting.textDiffEditorPreview)&&!this._accessibilityService.isScreenReaderOptimized()?(q.createDiffEditorInput=$,X.createDiffEditorInput=$):(q.createDiffEditorInput=void 0,X.createDiffEditorInput=void 0)})),B.add(this._editorResolverService.registerEditor(z,x,H,q)),B.add(this._editorResolverService.registerEditor(`${I.Schemas.vscodeNotebookCell}:/**/${z}`,{...x,priority:y.RegisteredEditorPriority.exclusive},H,X))}return B}_clear(){this._contributedEditors.clear(),this._contributedEditorDisposables.clear()}get(P){return this._contributedEditors.get(P)}add(P){if(this._contributedEditors.has(P.id))throw new Error(`notebook type '${P.id}' ALREADY EXISTS`);this._contributedEditors.set(P.id,P);const B=this._registerContributionPoint(P);this._contributedEditorDisposables.add(B);const V=this._memento.getMemento(0,1);return V[Vi.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._contributedEditors.values()),this._memento.saveMemento(),(0,k.toDisposable)(()=>{const z=this._memento.getMemento(0,1);z[Vi.CUSTOM_EDITORS_ENTRY_ID]=Array.from(this._contributedEditors.values()),this._memento.saveMemento(),B.dispose(),this._contributedEditors.delete(P.id)})}getContributedNotebook(P){const B=[];for(const V of this._contributedEditors.values())V.matches(P)&&B.push(V);return B.length===0&&P.scheme===I.Schemas.untitled?Array.from(this._contributedEditors.values()):B}[Symbol.iterator](){return this._contributedEditors.values()}};_.CUSTOM_EDITORS_STORAGE_ID="notebookEditors",_.CUSTOM_EDITORS_ENTRY_ID="editors",_=we([F(0,l.IStorageService),F(1,T.IExtensionService),F(2,y.IEditorResolverService),F(3,i.IConfigurationService),F(4,u.IAccessibilityService),F(5,c.IInstantiationService),F(6,f.IFileService),F(7,h.INotebookEditorModelResolverService)],_),e.NotebookProviderInfoStore=_;let L=class{constructor(P){this.contributedRenderers=new Map,this.preferredMimetype=new A.Lazy(()=>this.preferredMimetypeMemento.getMemento(1,0)),this.preferredMimetypeMemento=new s.Memento("workbench.editor.notebook.preferredRenderer2",P)}clear(){this.contributedRenderers.clear()}get(P){return this.contributedRenderers.get(P)}getAll(){return Array.from(this.contributedRenderers.values())}add(P){this.contributedRenderers.has(P.id)||this.contributedRenderers.set(P.id,P)}setPreferred(P,B,V){const z=this.preferredMimetype.getValue(),x=z[P.id];x?x[B]=V:z[P.id]={[B]:V},this.preferredMimetypeMemento.saveMemento()}findBestRenderers(P,B,V){let z;(function($){$[$.PreviouslySelected=256]="PreviouslySelected",$[$.SameExtensionAsNotebook=512]="SameExtensionAsNotebook",$[$.OtherRenderer=768]="OtherRenderer",$[$.BuiltIn=1024]="BuiltIn"})(z||(z={}));const x=P&&this.preferredMimetype.getValue()[P.id]?.[B],H=P?.extension?.value,W=P?.id,U=Array.from(this.contributedRenderers.values()).map($=>{const q=V===void 0?$.matchesWithoutKernel(B):$.matches(B,V);if(q===3)return;const X=$.extensionId.value,G=x===$.id?256:X===H||o.RENDERER_EQUIVALENT_EXTENSIONS.get(X)?.has(W)?512:$.isBuiltin?1024:768;return{ordered:{mimeType:B,rendererId:$.id,isTrusted:!0},score:G|q}}).filter(b.isDefined);return U.length===0?[{mimeType:B,rendererId:o.RENDERER_NOT_AVAILABLE,isTrusted:!0}]:U.sort(($,q)=>$.score-q.score).map($=>$.ordered)}};L=we([F(0,l.IStorageService)],L),e.NotebookOutputRendererInfoStore=L;class M{constructor(P,B){this.model=P,this._modelEventListeners=new k.DisposableStore,this._modelEventListeners.add(P.onWillDispose(()=>B(P)))}dispose(){this._modelEventListeners.dispose()}}let O=class extends k.Disposable{get notebookProviderInfoStore(){return this._notebookProviderInfoStore||(this._notebookProviderInfoStore=this._register(this._instantiationService.createInstance(_))),this._notebookProviderInfoStore}constructor(P,B,V,z,x,H){super(),this._extensionService=P,this._configurationService=B,this._accessibilityService=V,this._instantiationService=z,this._codeEditorService=x,this.configurationService=H,this._notebookProviders=new Map,this._notebookProviderInfoStore=void 0,this._notebookRenderersInfoStore=this._instantiationService.createInstance(L),this._onDidChangeOutputRenderers=this._register(new p.Emitter),this.onDidChangeOutputRenderers=this._onDidChangeOutputRenderers.event,this._notebookStaticPreloadInfoStore=new Set,this._models=new E.ResourceMap,this._onWillAddNotebookDocument=this._register(new p.Emitter),this._onDidAddNotebookDocument=this._register(new p.Emitter),this._onWillRemoveNotebookDocument=this._register(new p.Emitter),this._onDidRemoveNotebookDocument=this._register(new p.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 p.Emitter),this.onAddViewType=this._onAddViewType.event,this._onWillRemoveViewType=this._register(new p.Emitter),this.onWillRemoveViewType=this._onWillRemoveViewType.event,this._onDidChangeEditorTypes=this._register(new p.Emitter),this.onDidChangeEditorTypes=this._onDidChangeEditorTypes.event,this._lastClipboardIsCopy=!0,d.notebookRendererExtensionPoint.setHandler(X=>{this._notebookRenderersInfoStore.clear();for(const G of X)for(const Q of G.value){if(!Q.entrypoint){G.collector.error("Notebook renderer does not specify entry point");continue}const j=Q.id;if(!j){G.collector.error("Notebook renderer does not specify id-property");continue}this._notebookRenderersInfoStore.add(new m.NotebookOutputRendererInfo({id:j,extension:G.description,entrypoint:Q.entrypoint,displayName:Q.displayName,mimeTypes:Q.mimeTypes||[],dependencies:Q.dependencies,optionalDependencies:Q.optionalDependencies,requiresMessaging:Q.requiresMessaging}))}this._onDidChangeOutputRenderers.fire()}),d.notebookPreloadExtensionPoint.setHandler(X=>{this._notebookStaticPreloadInfoStore.clear();for(const G of X)if(!!(0,T.isProposedApiEnabled)(G.description,"contribNotebookStaticPreloads"))for(const Q of G.value){if(!Q.entrypoint){G.collector.error("Notebook preload does not specify entry point");continue}const j=Q.type;if(!j){G.collector.error("Notebook preload does not specify type-property");continue}this._notebookStaticPreloadInfoStore.add(new m.NotebookStaticPreloadInfo({type:j,extension:G.description,entrypoint:Q.entrypoint}))}});const W=()=>{this._displayOrder=new o.MimeTypeDisplayOrder(this._configurationService.getValue(o.NotebookSetting.displayOrder)||[],this._accessibilityService.isScreenReaderOptimized()?o.ACCESSIBLE_NOTEBOOK_DISPLAY_ORDER:o.NOTEBOOK_DISPLAY_ORDER)};W(),this._register(this._configurationService.onDidChangeConfiguration(X=>{X.affectedKeys.indexOf(o.NotebookSetting.displayOrder)>=0&&W()})),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>{W()}));let U=!1;const $=new Set,q=X=>{if(U||$.has(X))return;const G=this._codeEditorService.resolveDecorationOptions(X,!0);if(G.afterContentClassName||G.beforeContentClassName){const Q=this._codeEditorService.resolveDecorationCSSRules(X);if(Q!==null){for(let j=0;j<Q.length;j++)if((Q[j].selectorText.endsWith("::after")||Q[j].selectorText.endsWith("::after"))&&Q[j].cssText.indexOf("top:")>-1){const K=this.configurationService.getValue("editor");(0,v.updateEditorTopPadding)(r.BareFontInfo.createFromRawSettings(K,t.PixelRatio.value).lineHeight+2),U=!0;break}}}$.add(X)};this._register(this._codeEditorService.onDecorationTypeRegistered(q)),this._codeEditorService.listDecorationTypes().forEach(q)}getEditorTypes(){return[...this.notebookProviderInfoStore].map(P=>({id:P.id,displayName:P.displayName,providerDisplayName:P.providerDisplayName}))}clearEditorCache(){this.notebookProviderInfoStore.clearEditorCache()}_postDocumentOpenActivation(P){this._extensionService.activateByEvent(`onNotebook:${P}`),this._extensionService.activateByEvent("onNotebook:*")}async canResolve(P){if(this._notebookProviders.has(P))return!0;await this._extensionService.whenInstalledExtensionsRegistered();const B=this._notebookProviderInfoStore?.get(P),V=[p.Event.toPromise(p.Event.filter(this.onAddViewType,()=>this._notebookProviders.has(P)))];if(B&&B.extension){const z=await this._extensionService.getExtension(B.extension.value);z?.activationEvents&&z.activationEvents.indexOf(`onNotebook:${P}`)>=0&&V.push(this._extensionService._activateById(B.extension,{startup:!1,activationEvent:`onNotebook:${P}}`,extensionId:B.extension}))}return await Promise.race(V),this._notebookProviders.has(P)}registerContributedNotebookType(P,B){const V=new w.NotebookProviderInfo({extension:B.extension,id:P,displayName:B.displayName,providerDisplayName:B.providerDisplayName,exclusive:B.exclusive,priority:y.RegisteredEditorPriority.default,selectors:[]});V.update({selectors:B.filenamePattern});const z=this.notebookProviderInfoStore.add(V);return this._onDidChangeEditorTypes.fire(),(0,k.toDisposable)(()=>{z.dispose(),this._onDidChangeEditorTypes.fire()})}_registerProviderData(P,B){if(this._notebookProviders.has(P))throw new Error(`notebook provider for viewtype '${P}' already exists`);return this._notebookProviders.set(P,B),this._onAddViewType.fire(P),(0,k.toDisposable)(()=>{this._onWillRemoveViewType.fire(P),this._notebookProviders.delete(P)})}registerNotebookController(P,B,V){return this.notebookProviderInfoStore.get(P)?.update({options:V.options}),this._registerProviderData(P,new D.ComplexNotebookProviderInfo(P,V,B))}registerNotebookSerializer(P,B,V){return this.notebookProviderInfoStore.get(P)?.update({options:V.options}),this._registerProviderData(P,new D.SimpleNotebookProviderInfo(P,V,B))}async withNotebookDataProvider(P){const B=this.notebookProviderInfoStore.get(P);if(!B)throw new Error(`UNKNOWN notebook type '${P}'`);await this.canResolve(B.id);const V=this._notebookProviders.get(B.id);if(!V)throw new Error(`NO provider registered for view type: '${B.id}'`);return V}getRendererInfo(P){return this._notebookRenderersInfoStore.get(P)}updateMimePreferredRenderer(P,B,V,z){const x=this.notebookProviderInfoStore.get(P);x&&this._notebookRenderersInfoStore.setPreferred(x,B,V),this._displayOrder.prioritize(B,z)}saveMimeDisplayOrder(P){this._configurationService.updateValue(o.NotebookSetting.displayOrder,this._displayOrder.toArray(),P)}getRenderers(){return this._notebookRenderersInfoStore.getAll()}*getStaticPreloads(P){for(const B of this._notebookStaticPreloadInfoStore)B.type===P&&(yield B)}createNotebookTextModel(P,B,V,z){if(this._models.has(B))throw new Error(`notebook for ${B} already exists`);const x=this._instantiationService.createInstance(a.NotebookTextModel,P,B,V.cells,V.metadata,z);return this._models.set(B,new M(x,this._onWillDisposeDocument.bind(this))),this._onWillAddNotebookDocument.fire(x),this._onDidAddNotebookDocument.fire(x),this._postDocumentOpenActivation(P),x}getNotebookTextModel(P){return this._models.get(P)?.model}getNotebookTextModels(){return R.Iterable.map(this._models.values(),P=>P.model)}listNotebookDocuments(){return[...this._models].map(P=>P[1].model)}_onWillDisposeDocument(P){const B=this._models.get(P.uri);B&&(this._onWillRemoveNotebookDocument.fire(B.model),this._models.delete(P.uri),B.dispose(),this._onDidRemoveNotebookDocument.fire(B.model))}getOutputMimeTypeInfo(P,B,V){const z=this._displayOrder.sort(new Set(V.outputs.map(H=>H.mime))),x=this.notebookProviderInfoStore.get(P.viewType);return z.flatMap(H=>this._notebookRenderersInfoStore.findBestRenderers(x,H,B)).sort((H,W)=>(H.rendererId===o.RENDERER_NOT_AVAILABLE?1:0)-(W.rendererId===o.RENDERER_NOT_AVAILABLE?1:0))}getContributedNotebookTypes(P){return P?this.notebookProviderInfoStore.getContributedNotebook(P):[...this.notebookProviderInfoStore]}getContributedNotebookType(P){return this.notebookProviderInfoStore.get(P)}getNotebookProviderResourceRoots(){const P=[];return this._notebookProviders.forEach(B=>{B.extensionData.location&&P.push(S.URI.revive(B.extensionData.location))}),P}setToCopy(P,B){this._cutItems=P,this._lastClipboardIsCopy=B}getToCopy(){if(this._cutItems)return{items:this._cutItems,isCopy:this._lastClipboardIsCopy}}};O=we([F(0,T.IExtensionService),F(1,i.IConfigurationService),F(2,u.IAccessibilityService),F(3,c.IInstantiationService),F(4,C.ICodeEditorService),F(5,i.IConfigurationService)],O),e.NotebookService=O}),define(ae[2591],le([1,0,2,294,22,51,8,42,9,14,35,54,419,27,604,122,599,34,24,23,60,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageDetectionWorkerClient=e.LanguageDetectionWorkerHost=e.LanguageDetectionService=void 0;const o=12,g="../../../../../../node_modules/vscode-regexp-languagedetection",h="../../../../../../node_modules.asar/vscode-regexp-languagedetection",v="../../../../../../node_modules/@vscode/vscode-languagedetection",m="../../../../../../node_modules.asar/@vscode/vscode-languagedetection";let w=class Wi extends t.Disposable{constructor(_,L,M,O,N,P,B,V,z,x,H){super(),this._environmentService=_,this._configurationService=M,this._diagnosticsService=O,this._workspaceContextService=N,this._editorService=B,this._logService=x,this.hasResolvedWorkspaceLanguageIds=!1,this.workspaceLanguageIds=new Set,this.sessionOpenedLanguageIds=new Set,this.historicalGlobalOpenedLanguageIds=new n.LRUCache(o),this.historicalWorkspaceOpenedLanguageIds=new n.LRUCache(o),this.dirtyBiases=!0,this.langBiases={},this._languageDetectionWorkerClient=new y(P,L,V,this._environmentService.isBuilt&&!b.isWeb?R.FileAccess.asBrowserUri(`${m}/dist/lib/index.js`,J).toString(!0):R.FileAccess.asBrowserUri(`${v}/dist/lib/index.js`,J).toString(!0),this._environmentService.isBuilt&&!b.isWeb?R.FileAccess.asBrowserUri(`${m}/model/model.json`,J).toString(!0):R.FileAccess.asBrowserUri(`${v}/model/model.json`,J).toString(!0),this._environmentService.isBuilt&&!b.isWeb?R.FileAccess.asBrowserUri(`${m}/model/group1-shard1of1.bin`,J).toString(!0):R.FileAccess.asBrowserUri(`${v}/model/group1-shard1of1.bin`,J).toString(!0),this._environmentService.isBuilt&&!b.isWeb?R.FileAccess.asBrowserUri(`${h}/dist/index.js`,J).toString(!0):R.FileAccess.asBrowserUri(`${g}/dist/index.js`,J).toString(!0),H),this.initEditorOpenedListeners(z)}async resolveWorkspaceLanguageIds(){if(this.hasResolvedWorkspaceLanguageIds)return;this.hasResolvedWorkspaceLanguageIds=!0;const _=await this._diagnosticsService.getWorkspaceFileExtensions(this._workspaceContextService.getWorkspace());let L=0;for(const M of _.extensions){const O=this._languageDetectionWorkerClient.getLanguageId(M);if(O&&L<o&&(this.workspaceLanguageIds.add(O),L++,L>o))break}this.dirtyBiases=!0}isEnabledForLanguage(_){return!!_&&this._configurationService.getValue(Wi.enablementSettingKey,{overrideIdentifier:_})}getLanguageBiases(){if(!this.dirtyBiases)return this.langBiases;const _={};return this.sessionOpenedLanguageIds.forEach(L=>_[L]=(_[L]??0)+7),this.workspaceLanguageIds.forEach(L=>_[L]=(_[L]??0)+5),[...this.historicalWorkspaceOpenedLanguageIds.keys()].forEach(L=>_[L]=(_[L]??0)+3),[...this.historicalGlobalOpenedLanguageIds.keys()].forEach(L=>_[L]=(_[L]??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(_)),this.dirtyBiases=!1,this.langBiases=_,_}async detectLanguage(_,L){const M=this._configurationService.getValue(Wi.historyBasedEnablementConfig),O=this._configurationService.getValue(Wi.preferHistoryConfig);M&&await this.resolveWorkspaceLanguageIds();const N=M?this.getLanguageBiases():void 0;return this._languageDetectionWorkerClient.detectLanguage(_,N,O,L)}initEditorOpenedListeners(_){try{const L=JSON.parse(_.get(Wi.globalOpenedLanguagesStorageKey,0,"[]"));this.historicalGlobalOpenedLanguageIds.fromJSON(L)}catch(L){console.error(L)}try{const L=JSON.parse(_.get(Wi.workspaceOpenedLanguagesStorageKey,1,"[]"));this.historicalWorkspaceOpenedLanguageIds.fromJSON(L)}catch(L){console.error(L)}this._register(this._editorService.onDidActiveEditorChange(()=>{const L=this._editorService.activeTextEditorLanguageId;L&&this._editorService.activeEditor?.resource?.scheme!==R.Schemas.untitled&&(this.sessionOpenedLanguageIds.add(L),this.historicalGlobalOpenedLanguageIds.set(L,!0),this.historicalWorkspaceOpenedLanguageIds.set(L,!0),_.store(Wi.globalOpenedLanguagesStorageKey,JSON.stringify(this.historicalGlobalOpenedLanguageIds.toJSON()),0,1),_.store(Wi.workspaceOpenedLanguagesStorageKey,JSON.stringify(this.historicalWorkspaceOpenedLanguageIds.toJSON()),1,1),this.dirtyBiases=!0)}))}};w.enablementSettingKey="workbench.editor.languageDetection",w.historyBasedEnablementConfig="workbench.editor.historyBasedLanguageDetection",w.preferHistoryConfig="workbench.editor.preferHistoryBasedLanguageDetection",w.workspaceOpenedLanguagesStorageKey="workbench.editor.languageDetectionOpenedLanguages.workspace",w.globalOpenedLanguagesStorageKey="workbench.editor.languageDetectionOpenedLanguages.global",w=we([F(0,A.IWorkbenchEnvironmentService),F(1,E.ILanguageService),F(2,k.IConfigurationService),F(3,c.IDiagnosticsService),F(4,l.IWorkspaceContextService),F(5,C.IModelService),F(6,s.IEditorService),F(7,u.ITelemetryService),F(8,d.IStorageService),F(9,a.ILogService),F(10,f.ILanguageConfigurationService)],w),e.LanguageDetectionService=w;class D{constructor(_,L,M,O){this._indexJsUri=_,this._modelJsonUri=L,this._weightsUri=M,this._telemetryService=O}async getIndexJsUri(){return this._indexJsUri}async getModelJsonUri(){return this._modelJsonUri}async getWeightsUri(){return this._weightsUri}async sendTelemetryEvent(_,L,M){this._telemetryService.publicLog2("automaticlanguagedetection.stats",{languages:_.join(","),confidences:L.join(","),timeSpent:M})}}e.LanguageDetectionWorkerHost=D;class y extends i.EditorWorkerClient{constructor(_,L,M,O,N,P,B,V){super(_,!0,"languageDetectionWorkerService",V),this._languageService=L,this._telemetryService=M,this._indexJsUri=O,this._modelJsonUri=N,this._weightsUri=P,this._regexpModelUri=B}_getOrCreateLanguageDetectionWorker(){return this.workerPromise?this.workerPromise:(this.workerPromise=new Promise((_,L)=>{_(this._register(new r.SimpleWorkerClient(this._workerFactory,"vs/workbench/services/languageDetection/browser/languageDetectionSimpleWorker",new i.EditorWorkerHost(this))))}),this.workerPromise)}_guessLanguageIdByUri(_){const L=this._languageService.guessLanguageIdByFilepathOrFirstLine(_);if(L&&L!=="unknown")return L}async _getProxy(){return(await this._getOrCreateLanguageDetectionWorker()).getProxyObject()}async fhr(_,L){switch(_){case"getIndexJsUri":return this.getIndexJsUri();case"getModelJsonUri":return this.getModelJsonUri();case"getWeightsUri":return this.getWeightsUri();case"getRegexpModelUri":return this.getRegexpModelUri();case"getLanguageId":return this.getLanguageId(L[0]);case"sendTelemetryEvent":return this.sendTelemetryEvent(L[0],L[1],L[2]);default:return super.fhr(_,L)}}async getIndexJsUri(){return this._indexJsUri}getLanguageId(_){if(!_)return;if(this._languageService.isRegisteredLanguageId(_))return _;const L=this._guessLanguageIdByUri(I.URI.file(`file.${_}`));if(!(!L||L==="unknown"))return L}async getModelJsonUri(){return this._modelJsonUri}async getWeightsUri(){return this._weightsUri}async getRegexpModelUri(){return this._regexpModelUri}async sendTelemetryEvent(_,L,M){this._telemetryService.publicLog2(p.LanguageDetectionStatsId,{languages:_.join(","),confidences:L.join(","),timeSpent:M})}async detectLanguage(_,L,M,O){const N=Date.now(),P=this._guessLanguageIdByUri(_);if(P)return P;await this._withSyncedResources([_]);const B=await(await this._getProxy()).detectLanguage(_.toString(),L,M,O),V=this.getLanguageId(B),z="automaticlanguagedetection.perf";return this._telemetryService.publicLog2(z,{timeSpent:Date.now()-N,detection:V||"unknown"}),V}}e.LanguageDetectionWorkerClient=y,(0,S.registerSingleton)(p.ILanguageDetectionService,w,0)}),define(ae[544],le([1,0,28,493,35,5]),function(J,e,t,p,R,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 p.LanguageFeatureRegistry,this.onDidChange=this._provider.onDidChange}addStatus(I){return this._provider.register(I.selector,I)}getLanguageStatus(I){return this._provider.ordered(I).sort((b,S)=>{let C=S.severity-b.severity;return C===0&&(C=(0,t.compare)(b.source,S.source)),C===0&&(C=(0,t.compare)(b.id,S.id)),C})}}(0,R.registerSingleton)(e.ILanguageStatusService,k,1)}),define(ae[2592],le([1,0,9,42,54,67,77,20,62,544,2]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLanguages=void 0;let C=class{constructor(u,i,f,c,l){this._languageService=i,this._modelService=f,this._resolverService=c,this._languageStatusService=l,this._disposables=new S.DisposableStore,this._status=new S.DisposableMap,this._proxy=u.getProxy(A.ExtHostContext.ExtHostLanguages),this._proxy.$acceptLanguageIds(i.getRegisteredLanguageIds()),this._disposables.add(i.onDidChange(s=>{this._proxy.$acceptLanguageIds(i.getRegisteredLanguageIds())}))}dispose(){this._disposables.dispose(),this._status.dispose()}async $changeLanguage(u,i){if(!this._languageService.isRegisteredLanguageId(i))return Promise.reject(new Error(`Unknown language id: ${i}`));const f=t.URI.revive(u),c=await this._resolverService.createModelReference(f);try{this._modelService.setMode(c.object.textEditorModel,this._languageService.createById(i))}finally{c.dispose()}}async $tokensAtPosition(u,i){const f=t.URI.revive(u),c=this._modelService.getModel(f);if(!c)return;c.tokenization.tokenizeIfCheap(i.lineNumber);const l=c.tokenization.getLineTokens(i.lineNumber),s=l.findTokenIndexAtOffset(i.column-1);return{type:l.getStandardTokenType(s),range:new E.Range(i.lineNumber,1+l.getStartOffset(s),i.lineNumber,1+l.getEndOffset(s))}}$setLanguageStatus(u,i){this._status.get(u)?.dispose(),this._status.set(u,this._languageStatusService.addStatus(i))}$removeLanguageStatus(u){this._status.get(u)?.dispose()}};C=we([(0,k.extHostNamedCustomer)(A.MainContext.MainThreadLanguages),F(1,p.ILanguageService),F(2,R.IModelService),F(3,I.ITextModelService),F(4,b.ILanguageStatusService)],C),e.MainThreadLanguages=C}),define(ae[83],le([1,0,5,198]),function(J,e,t,p){"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)(p.ILayoutService);var R;(function(u){u.TITLEBAR_PART="workbench.parts.titlebar",u.BANNER_PART="workbench.parts.banner",u.ACTIVITYBAR_PART="workbench.parts.activitybar",u.SIDEBAR_PART="workbench.parts.sidebar",u.PANEL_PART="workbench.parts.panel",u.AUXILIARYBAR_PART="workbench.parts.auxiliarybar",u.EDITOR_PART="workbench.parts.editor",u.STATUSBAR_PART="workbench.parts.statusbar"})(R=e.Parts||(e.Parts={}));var A;(function(u){u[u.LEFT=0]="LEFT",u[u.RIGHT=1]="RIGHT",u[u.BOTTOM=2]="BOTTOM"})(A=e.Position||(e.Position={}));var k;(function(u){u[u.ALWAYS=0]="ALWAYS",u[u.NEVER=1]="NEVER",u[u.REMEMBER_LAST=2]="REMEMBER_LAST"})(k=e.PanelOpensMaximizedOptions||(e.PanelOpensMaximizedOptions={}));function E(u){switch(u){case 0:return"left";case 1:return"right";case 2:return"bottom";default:return"bottom"}}e.positionToString=E;const I={[E(0)]:0,[E(1)]:1,[E(2)]:2};function b(u){return I[u]}e.positionFromString=b;function S(u){switch(u){case 0:return"always";case 1:return"never";case 2:return"preserve";default:return"preserve"}}e.panelOpensMaximizedSettingToString=S;const C={[S(0)]:0,[S(1)]:1,[S(2)]:2};function r(u){return C[u]}e.panelOpensMaximizedFromString=r}),define(ae[2593],le([1,0,1477,10,79,29,35,5,23,12,380,83,36,254,6,538,184,80,15,70,98,7,9,63,71,1106]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerPart=void 0,(0,b.registerThemingParticipant)((w,D)=>{const y=w.getColor(l.BANNER_BACKGROUND);y&&D.addRule(`.monaco-workbench .part.banner { background-color: ${y}; }`);const T=w.getColor(l.BANNER_FOREGROUND);T&&D.addRule(` .monaco-workbench .part.banner, .monaco-workbench .part.banner .action-container .codicon, .monaco-workbench .part.banner .message-actions-container .monaco-link, .monaco-workbench .part.banner .message-container a { color: ${T}; } `);const _=w.getColor(l.BANNER_ICON_FOREGROUND);_&&D.addRule(`.monaco-workbench .part.banner .icon-container .codicon { color: ${_} }`)});let v=class extends S.Part{get minimumHeight(){return this.visible?this.height:0}get maximumHeight(){return this.visible?this.height:0}get onDidChange(){return this._onDidChangeSize.event}constructor(D,y,T,_,L){super("workbench.parts.banner",{hasTitle:!1},D,T,y),this.contextKeyService=_,this.instantiationService=L,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(c.MarkdownRenderer,{})}createContentArea(D){this.element=D,this.element.tabIndex=0,this._register((0,p.addDisposableListener)(this.element,p.EventType.FOCUS,()=>{this.focusedActionIndex!==-1&&this.focusActionLink()}));const y=this.contextKeyService.createScoped(this.element);return h.BannerFocused.bindTo(y).set(!0),this.element}close(D){this.setVisibility(!1),(0,p.clearNode)(this.element),typeof D.onClose=="function"&&D.onClose(),this.item=void 0}focusActionLink(){const D=this.item?.actions?.length??0;if(this.focusedActionIndex<D){const y=this.messageActionsContainer?.children[this.focusedActionIndex];y instanceof HTMLElement&&(this.actionBar?.setFocusable(!1),y.focus())}else this.actionBar?.focus(0)}getAriaLabel(D){if(D.ariaLabel)return D.ariaLabel;if(typeof D.message=="string")return D.message}getBannerMessage(D){if(typeof D=="string"){const y=(0,p.$)("span");return y.innerText=D,y}return this.markdownRenderer.render(D).element}setVisibility(D){D!==this.visible&&(this.visible=D,this.focusedActionIndex=-1,this.layoutService.setPartHidden(!D,"workbench.parts.banner"),this._onDidChangeSize.fire(void 0))}focus(){this.focusedActionIndex=-1,this.element.focus()}focusNextAction(){const D=this.item?.actions?.length??0;this.focusedActionIndex=this.focusedActionIndex<D?this.focusedActionIndex+1:0,this.focusActionLink()}focusPreviousAction(){const D=this.item?.actions?.length??0;this.focusedActionIndex=this.focusedActionIndex>0?this.focusedActionIndex-1:D,this.focusActionLink()}hide(D){this.item?.id===D&&this.setVisibility(!1)}show(D){if(D.id===this.item?.id){this.setVisibility(!0);return}(0,p.clearNode)(this.element);const y=this.getAriaLabel(D);y&&this.element.setAttribute("aria-label",y);const T=(0,p.append)(this.element,(0,p.$)("div.icon-container"));T.setAttribute("aria-hidden","true"),D.icon instanceof A.Codicon?T.appendChild((0,p.$)(`div${D.icon.cssSelector}`)):(T.classList.add("custom-icon"),o.URI.isUri(D.icon)&&(T.style.backgroundImage=(0,p.asCSSUrl)(D.icon)));const _=(0,p.append)(this.element,(0,p.$)("div.message-container"));if(_.setAttribute("aria-hidden","true"),_.appendChild(this.getBannerMessage(D.message)),this.messageActionsContainer=(0,p.append)(this.element,(0,p.$)("div.message-actions-container")),D.actions)for(const O of D.actions)this._register(this.instantiationService.createInstance(u.Link,this.messageActionsContainer,{...O,tabIndex:-1},{}));const L=(0,p.append)(this.element,(0,p.$)("div.action-container"));this.actionBar=this._register(new R.ActionBar(L));const M=this._register(new r.Action("banner.close","Close Banner",b.ThemeIcon.asClassName(g.widgetClose),!0,()=>this.close(D)));this.actionBar.push(M,{icon:!0,label:!1}),this.actionBar.setFocusable(!1),this.setVisibility(!0),this.item=D}toJSON(){return{type:"workbench.parts.banner"}}};v=we([F(0,b.IThemeService),F(1,C.IWorkbenchLayoutService),F(2,I.IStorageService),F(3,a.IContextKeyService),F(4,E.IInstantiationService)],v),e.BannerPart=v,(0,k.registerSingleton)(f.IBannerService,v,0),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusBanner",weight:200,primary:9,when:h.BannerFocused,handler:w=>{w.get(f.IBannerService).focus()}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusNextAction",weight:200,primary:17,secondary:[18],when:h.BannerFocused,handler:w=>{w.get(f.IBannerService).focusNextAction()}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.banner.focusPreviousAction",weight:200,primary:15,secondary:[16],when:h.BannerFocused,handler:w=>{w.get(f.IBannerService).focusPreviousAction()}});class m extends s.Action2{constructor(){super({id:m.ID,title:{value:m.LABEL,original:"Focus Banner"},category:d.Categories.View,f1:!0})}async run(D){D.get(C.IWorkbenchLayoutService).focusPart("workbench.parts.banner")}}m.ID="workbench.action.focusBanner",m.LABEL=(0,t.localize)(0,null),(0,s.registerAction2)(m)}),define(ae[2594],le([1,0,80,12,83,6,7,852,5,10,33,58,1505,79,630,38,13,71,26,1117,718]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsCenter=void 0;let d=class Os extends p.Themable{constructor(a,o,g,h,v,m,w,D,y){super(g),this.container=a,this.model=o,this.instantiationService=h,this.layoutService=v,this.contextKeyService=m,this.editorGroupService=w,this.keybindingService=D,this.notificationService=y,this._onDidChangeVisibility=this._register(new A.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.notificationsCenterVisibleContextKey=l.NotificationsCenterVisibleContext.bindTo(this.contextKeyService),this.notificationsCenterVisibleContextKey=l.NotificationsCenterVisibleContext.bindTo(m),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(a=>this.onDidChangeNotification(a))),this._register(this.layoutService.onDidLayout(a=>this.layout(b.Dimension.lift(a)))),this._register(this.notificationService.onDidChangeDoNotDisturbMode(()=>this.onDidChangeDoNotDisturbMode()))}onDidChangeDoNotDisturbMode(){this.hide()}get isVisible(){return!!this._isVisible}show(){if(this._isVisible){(0,c.assertIsDefined)(this.notificationsList).show(!0);return}this.notificationsCenterContainer||this.create(),this.updateTitle();const[a,o]=(0,c.assertAllDefined)(this.notificationsList,this.notificationsCenterContainer);this._isVisible=!0,o.classList.add("visible"),a.show(),this.layout(this.workbenchDimensions),a.updateNotificationsList(0,0,this.model.notifications),a.focusFirst(),this.updateStyles(),this.model.notifications.forEach(g=>g.updateVisibility(!0)),this.notificationsCenterVisibleContextKey.set(!0),this._onDidChangeVisibility.fire()}updateTitle(){const[a,o]=(0,c.assertAllDefined)(this.notificationsCenterTitle,this.clearAllAction);this.model.notifications.length===0?(a.textContent=(0,r.localize)(0,null),o.enabled=!1):(a.textContent=(0,r.localize)(1,null),o.enabled=this.model.notifications.some(g=>!g.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 a=document.createElement("div");a.classList.add("notifications-center-header-toolbar"),this.notificationsCenterHeader.appendChild(a);const o=this._register(this.instantiationService.createInstance(i.NotificationActionRunner)),g=this._register(new u.ActionBar(a,{ariaLabel:(0,r.localize)(2,null),actionRunner:o}));this.clearAllAction=this._register(this.instantiationService.createInstance(i.ClearAllNotificationsAction,i.ClearAllNotificationsAction.ID,i.ClearAllNotificationsAction.LABEL)),g.push(this.clearAllAction,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(this.clearAllAction)}),this.toggleDoNotDisturbAction=this._register(this.instantiationService.createInstance(i.ToggleDoNotDisturbAction,i.ToggleDoNotDisturbAction.ID,i.ToggleDoNotDisturbAction.LABEL)),g.push(this.toggleDoNotDisturbAction,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(this.toggleDoNotDisturbAction)});const h=this._register(this.instantiationService.createInstance(i.HideNotificationsCenterAction,i.HideNotificationsCenterAction.ID,i.HideNotificationsCenterAction.LABEL));g.push(h,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(h)}),this.notificationsList=this.instantiationService.createInstance(E.NotificationsList,this.notificationsCenterContainer,{widgetAriaLabel:(0,r.localize)(3,null)}),this.container.appendChild(this.notificationsCenterContainer)}getKeybindingLabel(a){const o=this.keybindingService.lookupKeybinding(a.id);return o?o.getLabel():null}onDidChangeNotification(a){if(!this._isVisible)return;let o=!1;const[g,h]=(0,c.assertAllDefined)(this.notificationsList,this.notificationsCenterContainer);switch(a.kind){case 0:g.updateNotificationsList(a.index,0,[a.item]),a.item.updateVisibility(!0);break;case 1:switch(a.detail){case 2:g.updateNotificationsList(a.index,1,[a.item]);break;case 1:a.item.expanded&&g.updateNotificationHeight(a.item);break}break;case 2:g.updateNotificationsList(a.index,1,[a.item]);break;case 3:o=(0,b.isAncestor)(document.activeElement,h),g.updateNotificationsList(a.index,1),a.item.updateVisibility(!1);break}this.updateTitle(),this.model.notifications.length===0&&(this.hide(),o&&this.editorGroupService.activeGroup.focus())}hide(){if(!this._isVisible||!this.notificationsCenterContainer||!this.notificationsList)return;const a=(0,b.isAncestor)(document.activeElement,this.notificationsCenterContainer);this._isVisible=!1,this.notificationsCenterContainer.classList.remove("visible"),this.notificationsList.hide(),this.model.notifications.forEach(o=>o.updateVisibility(!1)),this.notificationsCenterVisibleContextKey.set(!1),this._onDidChangeVisibility.fire(),a&&this.editorGroupService.activeGroup.focus()}updateStyles(){if(this.notificationsCenterContainer&&this.notificationsCenterHeader){const a=this.getColor(S.widgetShadow);this.notificationsCenterContainer.style.boxShadow=a?`0 0 8px 2px ${a}`:"";const o=this.getColor(t.NOTIFICATIONS_CENTER_BORDER);this.notificationsCenterContainer.style.border=o?`1px solid ${o}`:"";const g=this.getColor(t.NOTIFICATIONS_CENTER_HEADER_FOREGROUND);this.notificationsCenterHeader.style.color=g?g.toString():"";const h=this.getColor(t.NOTIFICATIONS_CENTER_HEADER_BACKGROUND);this.notificationsCenterHeader.style.background=h?h.toString():""}}layout(a){if(this.workbenchDimensions=a,this._isVisible&&this.notificationsCenterContainer){const o=Os.MAX_DIMENSIONS.width,g=Os.MAX_DIMENSIONS.height;let h=o,v=g;this.workbenchDimensions&&(h=this.workbenchDimensions.width,h-=2*8,v=this.workbenchDimensions.height-35,this.layoutService.isVisible("workbench.parts.statusbar")&&(v-=22),this.layoutService.isVisible("workbench.parts.titlebar")&&(v-=22),v-=2*12),(0,c.assertIsDefined)(this.notificationsList).layout(Math.min(o,h),Math.min(g,v))}}clearAll(){this.hide();for(const a of[...this.model.notifications])a.hasProgress||a.close()}};d.MAX_DIMENSIONS=new b.Dimension(450,400),d=we([F(2,p.IThemeService),F(3,I.IInstantiationService),F(4,R.IWorkbenchLayoutService),F(5,k.IContextKeyService),F(6,C.IEditorGroupsService),F(7,f.IKeybindingService),F(8,s.INotificationService)],d),e.NotificationsCenter=d,(0,p.registerThemingParticipant)((n,a)=>{const o=n.getColor(t.NOTIFICATIONS_BORDER);o&&a.addRule(`.monaco-workbench > .notifications-center .notifications-list-container .monaco-list-row[data-last-element="false"] > .notification-list-item { border-bottom: 1px solid ${o}; }`)})}),define(ae[275],le([1,0,5,6,2,32,2292,83]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentService=e.ICommentService=void 0,e.ICommentService=(0,t.createDecorator)("commentService");let I=class extends R.Disposable{constructor(S,C){super(),this.instantiationService=S,this._onDidSetDataProvider=this._register(new p.Emitter),this.onDidSetDataProvider=this._onDidSetDataProvider.event,this._onDidDeleteDataProvider=this._register(new p.Emitter),this.onDidDeleteDataProvider=this._onDidDeleteDataProvider.event,this._onDidSetResourceCommentInfos=this._register(new p.Emitter),this.onDidSetResourceCommentInfos=this._onDidSetResourceCommentInfos.event,this._onDidSetAllCommentThreads=this._register(new p.Emitter),this.onDidSetAllCommentThreads=this._onDidSetAllCommentThreads.event,this._onDidUpdateCommentThreads=this._register(new p.Emitter),this.onDidUpdateCommentThreads=this._onDidUpdateCommentThreads.event,this._onDidUpdateNotebookCommentThreads=this._register(new p.Emitter),this.onDidUpdateNotebookCommentThreads=this._onDidUpdateNotebookCommentThreads.event,this._onDidUpdateCommentingRanges=this._register(new p.Emitter),this.onDidUpdateCommentingRanges=this._onDidUpdateCommentingRanges.event,this._onDidChangeActiveCommentThread=this._register(new p.Emitter),this.onDidChangeActiveCommentThread=this._onDidChangeActiveCommentThread.event,this._onDidChangeCurrentCommentThread=this._register(new p.Emitter),this.onDidChangeCurrentCommentThread=this._onDidChangeCurrentCommentThread.event,this._onDidChangeCommentingEnabled=this._register(new p.Emitter),this.onDidChangeCommentingEnabled=this._onDidChangeCommentingEnabled.event,this._onDidChangeActiveCommentingRange=this._register(new p.Emitter),this.onDidChangeActiveCommentingRange=this._onDidChangeActiveCommentingRange.event,this._commentControls=new Map,this._commentMenus=new Map,this._isCommentingEnabled=!0,this._register(C.onDidChangeZenMode(r=>{this.enableCommenting(!r)}))}get isCommentingEnabled(){return this._isCommentingEnabled}enableCommenting(S){S!==this._isCommentingEnabled&&(this._isCommentingEnabled=S,this._onDidChangeCommentingEnabled.fire(S))}setCurrentCommentThread(S){this._onDidChangeCurrentCommentThread.fire(S)}setActiveCommentThread(S){this._onDidChangeActiveCommentThread.fire(S)}setDocumentComments(S,C){this._onDidSetResourceCommentInfos.fire({resource:S,commentInfos:C})}setWorkspaceComments(S,C){this._onDidSetAllCommentThreads.fire({ownerId:S,commentThreads:C})}removeWorkspaceComments(S){this._onDidSetAllCommentThreads.fire({ownerId:S,commentThreads:[]})}registerCommentController(S,C){this._commentControls.set(S,C),this._onDidSetDataProvider.fire()}unregisterCommentController(S){this._commentControls.delete(S),this._onDidDeleteDataProvider.fire(S)}getCommentController(S){return this._commentControls.get(S)}createCommentThreadTemplate(S,C,r){const u=this._commentControls.get(S);!u||u.createCommentThreadTemplate(C,r)}async updateCommentThreadTemplate(S,C,r){const u=this._commentControls.get(S);!u||await u.updateCommentThreadTemplate(C,r)}disposeCommentThread(S,C){this.getCommentController(S)?.deleteCommentThreadMain(C)}getCommentMenus(S){if(this._commentMenus.get(S))return this._commentMenus.get(S);const C=this.instantiationService.createInstance(k.CommentMenus);return this._commentMenus.set(S,C),C}updateComments(S,C){const r=Object.assign({},C,{owner:S});this._onDidUpdateCommentThreads.fire(r)}updateNotebookComments(S,C){const r=Object.assign({},C,{owner:S});this._onDidUpdateNotebookCommentThreads.fire(r)}updateCommentingRanges(S){this._onDidUpdateCommentingRanges.fire({owner:S})}async toggleReaction(S,C,r,u,i){const f=this._commentControls.get(S);if(f)return f.toggleReaction(C,r,u,i,A.CancellationToken.None);throw new Error("Not supported")}hasReactionHandler(S){const C=this._commentControls.get(S);return C?!!C.features.reactionHandler:!1}async getDocumentComments(S){const C=[];return this._commentControls.forEach(r=>{C.push(r.getDocumentComments(S,A.CancellationToken.None).catch(u=>null))}),Promise.all(C)}async getNotebookComments(S){const C=[];return this._commentControls.forEach(r=>{C.push(r.getNotebookComments(S,A.CancellationToken.None).catch(u=>null))}),Promise.all(C)}async getCommentingRanges(S){const C=[];return this._commentControls.forEach(u=>{C.push(u.getCommentingRanges(S,A.CancellationToken.None))}),(await Promise.all(C)).reduce((u,i)=>(u.push(...i),u),[])}};I=we([F(0,t.IInstantiationService),F(1,E.IWorkbenchLayoutService)],I),e.CommentService=I}),define(ae[2595],le([1,0,10,440,15,7,37,5,23,27,12,188,109,670,127,14,237,26,888,24,83,289,80]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditor=void 0;let g=class extends C.EditorPane{constructor(v,m,w,D,y,T,_,L,M,O,N,P,B){super(r.terminalEditorId,v,m,w),this._terminalEditorService=D,this._terminalProfileResolverService=y,this._terminalService=T,this._instantiationService=M,this._contextMenuService=O,this._notificationService=N,this._terminalProfileService=P,this._workbenchLayoutService=B,this._editorInput=void 0,this._cancelContextMenu=!1,this._dropdownMenu=this._register(L.createMenu(R.MenuId.TerminalNewDropdownContext,_)),this._instanceMenu=this._register(L.createMenu(R.MenuId.TerminalEditorInstanceContext,_))}async setInput(v,m,w,D){this._editorInput?.terminalInstance?.detachFromElement(),this._editorInput=v,await super.setInput(v,m,w,D),this._editorInput.terminalInstance?.attachToElement(this._overflowGuardElement),this._lastDimension&&this.layout(this._lastDimension),this._editorInput.terminalInstance?.setVisible(this.isVisible()&&this._workbenchLayoutService.isVisible("workbench.parts.editor")),this._editorInput.terminalInstance&&(this._register(this._editorInput.terminalInstance.onDidFocus(()=>this._setActiveInstance())),this._register(this._editorInput.terminalInstance.onDidFocusFindWidget(()=>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(v){this._editorInstanceElement=v,this._overflowGuardElement=t.$(".terminal-overflow-guard"),this._editorInstanceElement.appendChild(this._overflowGuardElement),this._registerListeners()}_registerListeners(){!this._editorInstanceElement||(this._register(t.addDisposableListener(this._editorInstanceElement,"mousedown",async v=>{if(this._terminalEditorService.instances.length!==0){if(v.which===2&&f.isLinux)this._terminalEditorService.activeInstance?.focus();else if(v.which===3){const m=this._terminalService.configHelper.config.rightClickBehavior;if(m==="nothing"){v.shiftKey||(this._cancelContextMenu=!0);return}else if(m==="copyPaste"||m==="paste"){const w=this._terminalEditorService.activeInstance;if(!w)return;if(m==="copyPaste"&&v.shiftKey){(0,s.openContextMenu)(v,this._editorInstanceElement,this._instanceMenu,this._contextMenuService);return}m==="copyPaste"&&w.hasSelection()?(await w.copySelection(),w.clearSelection()):c.BrowserFeatures.clipboard.readText?w.paste():this._notificationService.info(`This browser doesn't support the clipboard.readText API needed to trigger a paste, try ${f.isMacintosh?"\u2318":"Ctrl"}+V instead.`),f.isMacintosh&&setTimeout(()=>{w.clearSelection()},0),this._cancelContextMenu=!0}}}})),this._register(t.addDisposableListener(this._editorInstanceElement,"contextmenu",v=>{const m=this._terminalService.configHelper.config.rightClickBehavior;if(m==="nothing"&&!v.shiftKey){v.preventDefault(),v.stopImmediatePropagation(),this._cancelContextMenu=!1;return}else!this._cancelContextMenu&&m!=="copyPaste"&&m!=="paste"&&(this._cancelContextMenu||(0,s.openContextMenu)(v,this._editorInstanceElement,this._instanceMenu,this._contextMenuService),v.preventDefault(),v.stopImmediatePropagation(),this._cancelContextMenu=!1)})))}layout(v){this._editorInput?.terminalInstance?.layout(v),this._lastDimension=v}setVisible(v,m){super.setVisible(v,m),this._editorInput?.terminalInstance?.setVisible(v&&this._workbenchLayoutService.isVisible("workbench.parts.editor"))}getActionViewItem(v){switch(v.id){case"workbench.action.createTerminalEditor":if(v instanceof R.MenuItemAction){const m={viewColumn:d.ACTIVE_GROUP},w=(0,u.getTerminalActionBarArgs)(m,this._terminalProfileService.availableProfiles,this._getDefaultProfileName(),this._terminalProfileService.contributedProfiles,this._terminalService,this._dropdownMenu);return this._instantiationService.createInstance(p.DropdownWithPrimaryActionViewItem,v,w.dropdownAction,w.dropdownMenuActions,w.className,this._contextMenuService,{})}}return super.getActionViewItem(v)}_getDefaultProfileName(){let v;try{v=this._terminalProfileService.getDefaultProfileName()}catch{v=this._terminalProfileResolverService.defaultProfileName}return v}};g=we([F(0,b.ITelemetryService),F(1,S.IThemeService),F(2,I.IStorageService),F(3,r.ITerminalEditorService),F(4,i.ITerminalProfileResolverService),F(5,r.ITerminalService),F(6,A.IContextKeyService),F(7,R.IMenuService),F(8,E.IInstantiationService),F(9,k.IContextMenuService),F(10,l.INotificationService),F(11,i.ITerminalProfileService),F(12,n.IWorkbenchLayoutService)],g),e.TerminalEditor=g,(0,S.registerThemingParticipant)((h,v)=>{const m=h.getColor(a.TERMINAL_BACKGROUND_COLOR)||h.getColor(o.EDITOR_PANE_BACKGROUND);m&&v.addRule(`.monaco-workbench .editor-instance .terminal-wrapper { background-color: ${m.toString()}; }`)})}),define(ae[545],le([1,0,10,6,2,14,72,1961,7,23,27,12,188,659,316,663,58,24,74,83]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewEditor=e.CONTEXT_ACTIVE_WEBVIEW_PANEL_ID=void 0,e.CONTEXT_ACTIVE_WEBVIEW_PANEL_ID=new I.RawContextKey("activeWebviewPanelId","",{type:"string",description:E.localize(0,null)});let n=class Xa extends r.EditorPane{get onDidFocus(){return this._onDidFocusWebview.event}constructor(o,g,h,v,m,w,D,y,T){super(Xa.ID,o,g,h),this._editorService=m,this._workbenchLayoutService=w,this._editorDropService=D,this._hostService=y,this._contextKeyService=T,this._visible=!1,this._isDisposed=!1,this._webviewVisibleDisposables=this._register(new R.DisposableStore),this._onFocusWindowHandler=this._register(new R.MutableDisposable),this._onDidFocusWebview=this._register(new p.Emitter),this._scopedContextKeyService=this._register(new R.MutableDisposable),this._register(v.onDidScroll(()=>{this.webview&&this._visible&&this.synchronizeWebviewContainerDimensions(this.webview)}))}get webview(){return this.input instanceof i.WebviewInput?this.input.webview:void 0}get scopedContextKeyService(){return this._scopedContextKeyService.value}createEditor(o){const g=document.createElement("div");this._element=g,this._element.id=`webview-editor-element-${(0,k.generateUuid)()}`,o.appendChild(g),this._scopedContextKeyService.value=this._contextKeyService.createScoped(g)}dispose(){this._isDisposed=!0,this._element?.remove(),this._element=void 0,super.dispose()}layout(o){this._dimension=o,this.webview&&this._visible&&this.synchronizeWebviewContainerDimensions(this.webview,o)}focus(){super.focus(),!this._onFocusWindowHandler.value&&!A.isWeb&&(this._onFocusWindowHandler.value=this._hostService.onDidChangeFocus(o=>{o&&this._editorService.activeEditorPane===this&&this._workbenchLayoutService.hasFocus("workbench.parts.editor")&&this.focus()})),this.webview?.focus()}setEditorVisible(o,g){this._visible=o,this.input instanceof i.WebviewInput&&this.webview&&(o?this.claimWebview(this.input):this.webview.release(this)),super.setEditorVisible(o,g)}clearInput(){this.webview&&(this.webview.release(this),this._webviewVisibleDisposables.clear()),super.clearInput()}async setInput(o,g,h,v){if(this.input&&o.matches(this.input))return;const m=o instanceof i.WebviewInput&&o.webview===this.webview;this.webview&&!m&&this.webview.release(this),await super.setInput(o,g,h,v),await o.resolve(),!(v.isCancellationRequested||this._isDisposed)&&o instanceof i.WebviewInput&&(this.group&&o.updateGroup(this.group.id),m||this.claimWebview(o),this._dimension&&this.layout(this._dimension))}claimWebview(o){o.webview.claim(this,this.scopedContextKeyService),this._element&&(this._element.setAttribute("aria-flowto",o.webview.container.id),t.setParentFlowTo(o.webview.container,this._element)),this._webviewVisibleDisposables.clear(),this._webviewVisibleDisposables.add(this._editorDropService.createEditorDropTarget(o.webview.container,{containsGroup:g=>this.group?.id===g.id})),this._webviewVisibleDisposables.add(new u.WebviewWindowDragMonitor(()=>this.webview)),this.synchronizeWebviewContainerDimensions(o.webview),this._webviewVisibleDisposables.add(this.trackFocus(o.webview))}synchronizeWebviewContainerDimensions(o,g){if(!this._element)return;const h=this._workbenchLayoutService.getContainer("workbench.parts.editor");o.layoutWebviewOverElement(this._element.parentElement,g,h)}trackFocus(o){const g=new R.DisposableStore,h=t.trackFocus(o.container);return g.add(h),g.add(h.onDidFocus(()=>this._onDidFocusWebview.fire())),g.add(o.onDidFocus(()=>this._onDidFocusWebview.fire())),g}};n.ID="WebviewEditor",n=we([F(0,S.ITelemetryService),F(1,C.IThemeService),F(2,b.IStorageService),F(3,c.IEditorGroupsService),F(4,l.IEditorService),F(5,d.IWorkbenchLayoutService),F(6,f.IEditorDropService),F(7,s.IHostService),F(8,I.IContextKeyService)],n),e.WebviewEditor=n}),define(ae[2596],le([1,0,59,1960,15,7,70,202,545,316,24]),function(J,e,t,p,R,A,k,E,I,b,S){"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 r extends R.Action2{constructor(){super({id:r.ID,title:r.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,E.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED),primary:2084,weight:100}})}run(d){l(d)?.showFind()}}e.ShowWebViewEditorFindWidgetAction=r,r.ID="editor.action.webvieweditor.showFind",r.LABEL=p.localize(0,null);class u extends R.Action2{constructor(){super({id:u.ID,title:u.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,E.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE),primary:9,weight:100}})}run(d){l(d)?.hideFind()}}e.HideWebViewEditorFindCommand=u,u.ID="editor.action.webvieweditor.hideFind",u.LABEL=p.localize(1,null);class i extends R.Action2{constructor(){super({id:i.ID,title:i.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,E.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED),primary:3,weight:100}})}run(d){l(d)?.runFindAction(!1)}}e.WebViewEditorFindNextCommand=i,i.ID="editor.action.webvieweditor.findNext",i.LABEL=p.localize(2,null);class f extends R.Action2{constructor(){super({id:f.ID,title:f.LABEL,keybinding:{when:A.ContextKeyExpr.and(C,E.KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED),primary:1027,weight:100}})}run(d){l(d)?.runFindAction(!0)}}e.WebViewEditorFindPreviousCommand=f,f.ID="editor.action.webvieweditor.findPrevious",f.LABEL=p.localize(3,null);class c extends R.Action2{constructor(){super({id:c.ID,title:{value:c.LABEL,original:"Reload Webviews"},category:k.Categories.Developer,menu:[{id:R.MenuId.CommandPalette}]})}async run(d){const n=d.get(E.IWebviewService);for(const a of n.webviews)a.reload()}}e.ReloadWebviewAction=c,c.ID="workbench.action.webview.reloadWebviewAction",c.LABEL=p.localize(4,null);function l(s){const n=s.get(S.IEditorService).activeEditor;return n instanceof b.WebviewInput?n.webview:void 0}e.getActiveWebviewEditor=l}),define(ae[69],le([1,0,6,5]),function(J,e,t,p){"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,p.createDecorator)("lifecycleService");var R;(function(b){b[b.CLOSE=1]="CLOSE",b[b.QUIT=2]="QUIT",b[b.RELOAD=3]="RELOAD",b[b.LOAD=4]="LOAD"})(R=e.ShutdownReason||(e.ShutdownReason={}));var A;(function(b){b[b.NewWindow=1]="NewWindow",b[b.ReloadedWindow=3]="ReloadedWindow",b[b.ReopenedWindow=4]="ReopenedWindow"})(A=e.StartupKind||(e.StartupKind={}));function k(b){switch(b){case 1:return"NewWindow";case 3:return"ReloadedWindow";case 4:return"ReopenedWindow"}}e.StartupKindToString=k;var E;(function(b){b[b.Starting=1]="Starting",b[b.Ready=2]="Ready",b[b.Restored=3]="Restored",b[b.Eventually=4]="Eventually"})(E=e.LifecyclePhase||(e.LifecyclePhase={}));function I(b){switch(b){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(ae[2597],le([1,0,1509,2,10,5,852,6,83,80,12,33,58,7,26,69,74,11,13,71,1119]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsToasts=void 0;var n;(function(o){o[o.HIDDEN_OR_VISIBLE=0]="HIDDEN_OR_VISIBLE",o[o.HIDDEN=1]="HIDDEN",o[o.VISIBLE=2]="VISIBLE"})(n||(n={}));let a=class un extends S.Themable{get isVisible(){return!!this._isVisible}constructor(g,h,v,m,w,D,y,T,_){super(w),this.container=g,this.model=h,this.instantiationService=v,this.layoutService=m,this.editorGroupService=D,this.contextKeyService=y,this.lifecycleService=T,this.hostService=_,this._onDidChangeVisibility=this._register(new E.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._isVisible=!1,this.mapNotificationToToast=new Map,this.mapNotificationToDisposable=new Map,this.notificationsToastsVisibleContextKey=d.NotificationsToastsVisibleContext.bindTo(this.contextKeyService),this.addedToastsIntervalCounter=new l.IntervalCounter(un.SPAM_PROTECTION.interval),this.registerListeners()}registerListeners(){this._register(this.layoutService.onDidLayout(g=>this.layout(R.Dimension.lift(g)))),this.lifecycleService.when(3).then(()=>{this.model.notifications.forEach(g=>this.addToast(g)),this._register(this.model.onDidChangeNotification(g=>this.onDidChangeNotification(g)))}),this._register(this.model.onDidChangeFilter(g=>{(g===i.NotificationsFilter.SILENT||g===i.NotificationsFilter.ERROR)&&this.hide()}))}onDidChangeNotification(g){switch(g.kind){case 0:return this.addToast(g.item);case 3:return this.removeToast(g.item)}}addToast(g){if(this.isNotificationsCenterVisible||g.silent||this.addedToastsIntervalCounter.increment()>un.SPAM_PROTECTION.limit)return;const h=new p.DisposableStore;this.mapNotificationToDisposable.set(g,h),h.add((0,R.scheduleAtNextAnimationFrame)(()=>this.doAddToast(g,h)))}doAddToast(g,h){let v=this.notificationsToastsContainer;v||(v=this.notificationsToastsContainer=document.createElement("div"),v.classList.add("notifications-toasts"),this.container.appendChild(v)),v.classList.add("visible");const m=document.createElement("div");m.classList.add("notification-toast-container");const w=v.firstChild;w?v.insertBefore(m,w):v.appendChild(m);const D=document.createElement("div");D.classList.add("notification-toast"),m.appendChild(D);const y=this.instantiationService.createInstance(k.NotificationsList,D,{verticalScrollMode:2,widgetAriaLabel:(()=>g.source?(0,t.localize)(1,null,g.message.raw,g.source):(0,t.localize)(0,null,g.message.raw))()});h.add(y);const T={item:g,list:y,container:m,toast:D};this.mapNotificationToToast.set(g,T),h.add((0,p.toDisposable)(()=>this.updateToastVisibility(T,!1))),y.show();const _=this.computeMaxDimensions();this.layoutLists(_.width),y.updateNotificationsList(0,0,[g]),this.layoutContainer(_.height),h.add(g.onDidChangeExpansion(()=>{y.updateNotificationsList(0,1,[g])})),h.add(g.onDidChangeContent(L=>{switch(L.kind){case 2:y.updateNotificationsList(0,1,[g]);break;case 1:g.expanded&&y.updateNotificationHeight(g);break}})),E.Event.once(g.onDidClose)(()=>{this.removeToast(g)}),this.purgeNotification(g,m,y,h),this.updateStyles(),this.notificationsToastsVisibleContextKey.set(!0),D.classList.add("notification-fade-in"),h.add((0,R.addDisposableListener)(D,"transitionend",()=>{D.classList.remove("notification-fade-in"),D.classList.add("notification-fade-in-done")})),g.updateVisibility(!0),this._isVisible||(this._isVisible=!0,this._onDidChangeVisibility.fire())}purgeNotification(g,h,v,m){let w=!1;m.add((0,R.addDisposableListener)(h,R.EventType.MOUSE_OVER,()=>w=!0)),m.add((0,R.addDisposableListener)(h,R.EventType.MOUSE_OUT,()=>w=!1));let D,y;const T=()=>{D=setTimeout(()=>{this.hostService.hasFocus?g.sticky||v.hasFocus()||w?T():this.removeToast(g):y||(y=this.hostService.onDidChangeFocus(_=>{_&&T()}),m.add(y))},un.PURGE_TIMEOUT[g.severity])};T(),m.add((0,p.toDisposable)(()=>clearTimeout(D)))}removeToast(g){let h=!1;const v=this.mapNotificationToToast.get(g);v&&((0,R.isAncestor)(document.activeElement,v.container)&&(h=!(this.focusNext()||this.focusPrevious())),this.mapNotificationToToast.delete(g));const m=this.mapNotificationToDisposable.get(g);m&&((0,p.dispose)(m),this.mapNotificationToDisposable.delete(g)),this.mapNotificationToToast.size>0?this.layout(this.workbenchDimensions):(this.doHide(),h&&this.editorGroupService.activeGroup.focus())}removeToasts(){this.mapNotificationToToast.clear(),this.mapNotificationToDisposable.forEach(g=>(0,p.dispose)(g)),this.mapNotificationToDisposable.clear(),this.doHide()}doHide(){this.notificationsToastsContainer?.classList.remove("visible"),this.notificationsToastsVisibleContextKey.set(!1),this._isVisible&&(this._isVisible=!1,this._onDidChangeVisibility.fire())}hide(){const g=this.notificationsToastsContainer?(0,R.isAncestor)(document.activeElement,this.notificationsToastsContainer):!1;this.removeToasts(),g&&this.editorGroupService.activeGroup.focus()}focus(){const g=this.getToasts(n.VISIBLE);return g.length>0?(g[0].list.focusFirst(),!0):!1}focusNext(){const g=this.getToasts(n.VISIBLE);for(let h=0;h<g.length;h++)if(g[h].list.hasFocus()){const m=g[h+1];if(m)return m.list.focusFirst(),!0;break}return!1}focusPrevious(){const g=this.getToasts(n.VISIBLE);for(let h=0;h<g.length;h++)if(g[h].list.hasFocus()){const m=g[h-1];if(m)return m.list.focusFirst(),!0;break}return!1}focusFirst(){const g=this.getToasts(n.VISIBLE)[0];return g?(g.list.focusFirst(),!0):!1}focusLast(){const g=this.getToasts(n.VISIBLE);return g.length>0?(g[g.length-1].list.focusFirst(),!0):!1}update(g){this.isNotificationsCenterVisible!==g&&(this.isNotificationsCenterVisible=g,this.isNotificationsCenterVisible&&this.removeToasts())}updateStyles(){this.mapNotificationToToast.forEach(({toast:g})=>{const h=this.getColor(b.NOTIFICATIONS_BACKGROUND);g.style.background=h||"";const v=this.getColor(C.widgetShadow);g.style.boxShadow=v?`0 0 8px 2px ${v}`:"";const m=this.getColor(b.NOTIFICATIONS_TOAST_BORDER);g.style.border=m?`1px solid ${m}`:""})}getToasts(g){const h=[];return this.mapNotificationToToast.forEach(v=>{switch(g){case n.HIDDEN_OR_VISIBLE:h.push(v);break;case n.HIDDEN:this.isToastInDOM(v)||h.push(v);break;case n.VISIBLE:this.isToastInDOM(v)&&h.push(v);break}}),h.reverse()}layout(g){this.workbenchDimensions=g;const h=this.computeMaxDimensions();h.height&&this.layoutContainer(h.height),this.layoutLists(h.width)}computeMaxDimensions(){const g=un.MAX_WIDTH;let h=g,v;return this.workbenchDimensions&&(h=this.workbenchDimensions.width,h-=2*8,v=this.workbenchDimensions.height,this.layoutService.isVisible("workbench.parts.statusbar")&&(v-=22),this.layoutService.isVisible("workbench.parts.titlebar")&&(v-=22),v-=2*12),v=typeof v=="number"?Math.round(v*.618):0,new R.Dimension(Math.min(g,h),v)}layoutLists(g){this.mapNotificationToToast.forEach(({list:h})=>h.layout(g))}layoutContainer(g){let h=0;for(const v of this.getToasts(n.HIDDEN_OR_VISIBLE)){v.container.style.opacity="0",this.updateToastVisibility(v,!0),g-=v.container.offsetHeight;let m=!1;h===un.MAX_NOTIFICATIONS?m=!1:g>=0&&(m=!0),this.updateToastVisibility(v,m),v.container.style.opacity="",m&&h++}}updateToastVisibility(g,h){if(this.isToastInDOM(g)===h)return;const v=(0,s.assertIsDefined)(this.notificationsToastsContainer);h?v.appendChild(g.container):v.removeChild(g.container),g.item.updateVisibility(h)}isToastInDOM(g){return!!g.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=we([F(2,A.IInstantiationService),F(3,I.IWorkbenchLayoutService),F(4,S.IThemeService),F(5,r.IEditorGroupsService),F(6,u.IContextKeyService),F(7,f.ILifecycleService),F(8,c.IHostService)],a),e.NotificationsToasts=a}),define(ae[676],le([1,0,17,98,31,15,5,2,69,26,7]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={WorkbenchActions:"workbench.contributions.actions"},t.Registry.add(e.Extensions.WorkbenchActions,new class{registerWorkbenchAction(C,r,u,i){return this.registerWorkbenchCommandFromAction(C,r,u,i)}registerWorkbenchCommandFromAction(C,r,u,i){const f=new E.DisposableStore;f.add(R.CommandsRegistry.registerCommand(C.id,this.createCommandHandler(C)));const c=typeof C.keybindingWeight>"u"?200:C.keybindingWeight,l=C.keybindings;if(f.add(p.KeybindingsRegistry.registerKeybindingRule({id:C.id,weight:c,when:C.keybindingContext&&i?S.ContextKeyExpr.and(C.keybindingContext,i):C.keybindingContext||i||null,primary:l?l.primary:0,secondary:l?.secondary,win:l?.win,mac:l?.mac,linux:l?.linux})),C.label){const s=r.indexOf(": ");let d="";s>0&&(d=r.substr(0,s),r=r.substr(s+2));const n={id:C.id,title:{value:C.label,original:r},category:u?{value:u,original:d}:void 0};f.add(A.MenuRegistry.addCommand(n)),f.add(A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:n,when:i}))}return f}createCommandHandler(C){return async(r,u)=>{const i=r.get(b.INotificationService),f=r.get(k.IInstantiationService),c=r.get(I.ILifecycleService);try{await this.triggerAndDisposeAction(f,c,C,u)}catch(l){i.error(l)}}}async triggerAndDisposeAction(C,r,u,i){await r.when(2);const f=C.createInstance(u.syncDescriptor);if(f.label=u.label||f.label,!f.enabled){f.dispose();return}try{const c=i?.from||"keybinding";await f.run(void 0,{from:c})}finally{f.dispose()}}})}),define(ae[44],le([1,0,5,69,17,11,241,25,81]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0;var b;(function(C){C.Workbench="workbench.contributions.kind"})(b=e.Extensions||(e.Extensions={}));class S{constructor(){this.toBeInstantiated=new Map}registerWorkbenchContribution(r,u=1){if(this.instantiationService&&this.lifecycleService&&this.logService&&this.environmentService&&this.lifecycleService.phase>=u)this.safeCreateInstance(this.instantiationService,this.logService,this.environmentService,r,u);else{let i=this.toBeInstantiated.get(u);i||(i=[],this.toBeInstantiated.set(u,i)),i.push(r)}}start(r){const u=this.instantiationService=r.get(t.IInstantiationService),i=this.lifecycleService=r.get(p.ILifecycleService),f=this.logService=r.get(E.ILogService),c=this.environmentService=r.get(I.IEnvironmentService);for(const l of[1,2,3,4])this.instantiateByPhase(u,i,f,c,l)}instantiateByPhase(r,u,i,f,c){u.phase>=c?this.doInstantiateByPhase(r,i,f,c):u.when(c).then(()=>this.doInstantiateByPhase(r,i,f,c))}doInstantiateByPhase(r,u,i,f){const c=this.toBeInstantiated.get(f);if(c)if(this.toBeInstantiated.delete(f),f!==4){(0,k.mark)(`code/willCreateWorkbenchContributions/${f}`);for(const l of c)this.safeCreateInstance(r,u,i,l,f);(0,k.mark)(`code/didCreateWorkbenchContributions/${f}`)}else{let s=0;const d=n=>{for(;s<c.length;){const a=c[s++];if(this.safeCreateInstance(r,u,i,a,f),n.timeRemaining()<1){(0,A.runWhenIdle)(d,3e3);break}}};(0,A.runWhenIdle)(d,3e3)}}safeCreateInstance(r,u,i,f,c){const l=c<3?Date.now():void 0;try{r.createInstance(f)}catch(s){u.error(`Unable to instantiate workbench contribution ${f.name}.`,s)}if(typeof l=="number"&&!i.isBuilt){const s=Date.now()-l;s>20&&u.warn(`Workbench contribution ${f.name} blocked restore phase by ${s}ms.`)}}}R.Registry.add(b.Workbench,new S)}),define(ae[2598],le([1,0,36,1468,83,37,2,10,44,17,14,93]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextInputActionsProvider=void 0;let r=class extends k.Disposable{constructor(i,f,c){super(),this.layoutService=i,this.contextMenuService=f,this.clipboardService=c,this.textInputActions=[],this.createActions(),this.registerListeners()}createActions(){this.textInputActions.push(new t.Action("undo",(0,p.localize)(0,null),void 0,!0,async()=>document.execCommand("undo")),new t.Action("redo",(0,p.localize)(1,null),void 0,!0,async()=>document.execCommand("redo")),new t.Separator,new t.Action("editor.action.clipboardCutAction",(0,p.localize)(2,null),void 0,!0,async()=>document.execCommand("cut")),new t.Action("editor.action.clipboardCopyAction",(0,p.localize)(3,null),void 0,!0,async()=>document.execCommand("copy")),new t.Action("editor.action.clipboardPasteAction",(0,p.localize)(4,null),void 0,!0,async i=>{if(S.isNative)document.execCommand("paste");else{const f=await this.clipboardService.readText();if(i instanceof HTMLTextAreaElement||i instanceof HTMLInputElement){const c=i.selectionStart||0,l=i.selectionEnd||0;i.value=`${i.value.substring(0,c)}${f}${i.value.substring(l,i.value.length)}`,i.selectionStart=c+f.length,i.selectionEnd=i.selectionStart}}}),new t.Separator,new t.Action("editor.action.selectAll",(0,p.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 f=i.target;!(f instanceof HTMLElement)||f.nodeName.toLowerCase()!=="input"&&f.nodeName.toLowerCase()!=="textarea"||(E.EventHelper.stop(i,!0),this.contextMenuService.showContextMenu({getAnchor:()=>i,getActions:()=>this.textInputActions,getActionsContext:()=>f,onHide:()=>f.focus()}))}};r=we([F(0,R.IWorkbenchLayoutService),F(1,A.IContextMenuService),F(2,C.IClipboardService)],r),e.TextInputActionsProvider=r,b.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(r,2)}),define(ae[2599],le([1,0,17,1529,55,14,214,86,44]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const b=t.Registry.as(R.Extensions.Configuration);(function(){t.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(k.ConfigurationMigrationWorkbenchContribution,4),b.registerConfiguration({...k.workbenchConfigurationNodeBase,properties:{"workbench.editor.titleScrollbarSizing":{type:"string",enum:["default","large"],enumDescriptions:[(0,p.localize)(0,null),(0,p.localize)(1,null)],description:(0,p.localize)(2,null),default:"default"},"workbench.editor.showTabs":{type:"boolean",description:(0,p.localize)(3,null),default:!0},"workbench.editor.wrapTabs":{type:"boolean",markdownDescription:(0,p.localize)(4,null),default:!1},"workbench.editor.scrollToSwitchTabs":{type:"boolean",markdownDescription:(0,p.localize)(5,null),default:!1},"workbench.editor.highlightModifiedTabs":{type:"boolean",markdownDescription:(0,p.localize)(6,null),default:!1},"workbench.editor.decorations.badges":{type:"boolean",markdownDescription:(0,p.localize)(7,null),default:!0},"workbench.editor.decorations.colors":{type:"boolean",markdownDescription:(0,p.localize)(8,null),default:!0},"workbench.editor.labelFormat":{type:"string",enum:["default","short","medium","long"],enumDescriptions:[(0,p.localize)(9,null),(0,p.localize)(10,null),(0,p.localize)(11,null),(0,p.localize)(12,null)],default:"default",description:(0,p.localize)(13,null)},"workbench.editor.untitled.labelFormat":{type:"string",enum:["content","name"],enumDescriptions:[(0,p.localize)(14,null),(0,p.localize)(15,null)],default:"content",description:(0,p.localize)(16,null)},"workbench.editor.untitled.hint":{type:"string",enum:["text","hidden"],default:"text",markdownDescription:(0,p.localize)(17,null)},"workbench.editor.languageDetection":{type:"boolean",default:!0,description:(0,p.localize)(18,null),scope:5},"workbench.editor.historyBasedLanguageDetection":{type:"boolean",default:!0,tags:["experimental"],description:(0,p.localize)(19,null)},"workbench.editor.preferHistoryBasedLanguageDetection":{type:"boolean",default:!1,tags:["experimental"],description:(0,p.localize)(20,null)},"workbench.editor.languageDetectionHints":{type:"object",default:{untitledEditors:!0,notebookEditors:!0},tags:["experimental"],description:(0,p.localize)(21,null),additionalProperties:!1,properties:{untitledEditors:{type:"boolean",description:(0,p.localize)(22,null)},notebookEditors:{type:"boolean",description:(0,p.localize)(23,null)}}},"workbench.editor.tabCloseButton":{type:"string",enum:["left","right","off"],default:"right",markdownDescription:(0,p.localize)(24,null)},"workbench.editor.tabSizing":{type:"string",enum:["fit","shrink"],default:"fit",enumDescriptions:[(0,p.localize)(25,null),(0,p.localize)(26,null)],markdownDescription:(0,p.localize)(27,null)},"workbench.editor.pinnedTabSizing":{type:"string",enum:["normal","compact","shrink"],default:"normal",enumDescriptions:[(0,p.localize)(28,null),(0,p.localize)(29,null),(0,p.localize)(30,null)],markdownDescription:(0,p.localize)(31,null)},"workbench.editor.splitSizing":{type:"string",enum:["distribute","split"],default:"distribute",enumDescriptions:[(0,p.localize)(32,null),(0,p.localize)(33,null)],description:(0,p.localize)(34,null)},"workbench.editor.splitOnDragAndDrop":{type:"boolean",default:!0,description:(0,p.localize)(35,null)},"workbench.editor.focusRecentEditorAfterClose":{type:"boolean",description:(0,p.localize)(36,null),default:!0},"workbench.editor.showIcons":{type:"boolean",description:(0,p.localize)(37,null),default:!0},"workbench.editor.enablePreview":{type:"boolean",description:(0,p.localize)(38,null),default:!0},"workbench.editor.enablePreviewFromQuickOpen":{type:"boolean",markdownDescription:(0,p.localize)(39,null),default:!1},"workbench.editor.enablePreviewFromCodeNavigation":{type:"boolean",markdownDescription:(0,p.localize)(40,null),default:!1},"workbench.editor.closeOnFileDelete":{type:"boolean",description:(0,p.localize)(41,null),default:!1},"workbench.editor.openPositioning":{type:"string",enum:["left","right","first","last"],default:"right",markdownDescription:(0,p.localize)(42,null)},"workbench.editor.openSideBySideDirection":{type:"string",enum:["right","down"],default:"right",markdownDescription:(0,p.localize)(43,null)},"workbench.editor.closeEmptyGroups":{type:"boolean",description:(0,p.localize)(44,null),default:!0},"workbench.editor.revealIfOpen":{type:"boolean",description:(0,p.localize)(45,null),default:!1},"workbench.editor.mouseBackForwardToNavigate":{type:"boolean",description:(0,p.localize)(46,null),default:!0},"workbench.editor.navigationScope":{type:"string",enum:["default","editorGroup","editor"],default:"default",markdownDescription:(0,p.localize)(47,null),enumDescriptions:[(0,p.localize)(48,null),(0,p.localize)(49,null),(0,p.localize)(50,null)]},"workbench.editor.restoreViewState":{type:"boolean",markdownDescription:(0,p.localize)(51,null,"`#workbench.editor.sharedViewState#`"),default:!0,scope:5},"workbench.editor.sharedViewState":{type:"boolean",description:(0,p.localize)(52,null),default:!1},"workbench.editor.splitInGroupLayout":{type:"string",enum:["vertical","horizontal"],default:"horizontal",markdownDescription:(0,p.localize)(53,null),enumDescriptions:[(0,p.localize)(54,null),(0,p.localize)(55,null)]},"workbench.editor.centeredLayoutAutoResize":{type:"boolean",default:!0,description:(0,p.localize)(56,null)},"workbench.editor.limit.enabled":{type:"boolean",default:!1,description:(0,p.localize)(57,null)},"workbench.editor.limit.value":{type:"number",default:10,exclusiveMinimum:0,markdownDescription:(0,p.localize)(58,null,"`#workbench.editor.limit.perEditorGroup#`")},"workbench.editor.limit.excludeDirty":{type:"boolean",default:!1,description:(0,p.localize)(59,null)},"workbench.editor.limit.perEditorGroup":{type:"boolean",default:!1,description:(0,p.localize)(60,null)},"workbench.localHistory.enabled":{type:"boolean",default:!0,description:(0,p.localize)(61,null),scope:4},"workbench.localHistory.maxFileSize":{type:"number",default:256,minimum:1,description:(0,p.localize)(62,null),scope:4},"workbench.localHistory.maxFileEntries":{type:"number",default:50,minimum:0,description:(0,p.localize)(63,null),scope:4},"workbench.localHistory.exclude":{type:"object",markdownDescription:(0,p.localize)(64,null),scope:4},"workbench.localHistory.mergeWindow":{type:"number",default:10,minimum:1,markdownDescription:(0,p.localize)(65,null),scope:4},"workbench.commandPalette.history":{type:"number",description:(0,p.localize)(66,null),default:50,minimum:0},"workbench.commandPalette.preserveInput":{type:"boolean",description:(0,p.localize)(67,null),default:!1},"workbench.quickOpen.closeOnFocusLost":{type:"boolean",description:(0,p.localize)(68,null),default:!0},"workbench.quickOpen.preserveInput":{type:"boolean",description:(0,p.localize)(69,null),default:!1},"workbench.settings.openDefaultSettings":{type:"boolean",description:(0,p.localize)(70,null),default:!1},"workbench.settings.useSplitJSON":{type:"boolean",markdownDescription:(0,p.localize)(71,null),default:!1},"workbench.settings.openDefaultKeybindings":{type:"boolean",description:(0,p.localize)(72,null),default:!1},"workbench.sideBar.location":{type:"string",enum:["left","right"],default:"left",description:(0,p.localize)(73,null)},"workbench.panel.defaultLocation":{type:"string",enum:["left","bottom","right"],default:"bottom",description:(0,p.localize)(74,null)},"workbench.panel.opensMaximized":{type:"string",enum:["always","never","preserve"],default:"preserve",description:(0,p.localize)(75,null),enumDescriptions:[(0,p.localize)(76,null),(0,p.localize)(77,null),(0,p.localize)(78,null)]},"workbench.statusBar.visible":{type:"boolean",default:!0,description:(0,p.localize)(79,null)},"workbench.activityBar.visible":{type:"boolean",default:!0,description:(0,p.localize)(80,null)},"workbench.activityBar.iconClickBehavior":{type:"string",enum:["toggle","focus"],default:"toggle",description:(0,p.localize)(81,null),enumDescriptions:[(0,p.localize)(82,null),(0,p.localize)(83,null)]},"workbench.view.alwaysShowHeaderActions":{type:"boolean",default:!1,description:(0,p.localize)(84,null)},"workbench.fontAliasing":{type:"string",enum:["default","antialiased","none","auto"],default:"default",description:(0,p.localize)(85,null),enumDescriptions:[(0,p.localize)(86,null),(0,p.localize)(87,null),(0,p.localize)(88,null),(0,p.localize)(89,null)],included:A.isMacintosh},"workbench.settings.editor":{type:"string",enum:["ui","json"],enumDescriptions:[(0,p.localize)(90,null),(0,p.localize)(91,null)],description:(0,p.localize)(92,null),default:"ui",scope:3},"workbench.hover.delay":{type:"number",description:(0,p.localize)(93,null),default:A.isMacintosh?1500:500,minimum:0},"workbench.reduceMotion":{type:"string",description:(0,p.localize)(94,null),enumDescriptions:[(0,p.localize)(95,null),(0,p.localize)(96,null),(0,p.localize)(97,null)],default:"auto",tags:["accessibility"],enum:["on","off","auto"]},"workbench.layoutControl.enabled":{type:"boolean",default:!0,markdownDescription:(0,p.localize)(98,null,"`#window.titleBarStyle#`")},"workbench.layoutControl.type":{type:"string",enum:["menu","toggles","both"],enumDescriptions:[(0,p.localize)(99,null),(0,p.localize)(100,null),(0,p.localize)(101,null)],default:"both",description:(0,p.localize)(102,null)},"workbench.experimental.layoutControl.enabled":{type:"boolean",tags:["experimental"],default:!1,markdownDescription:(0,p.localize)(103,null,"`#window.titleBarStyle#`"),markdownDeprecationMessage:(0,p.localize)(104,null,"`#workbench.layoutControl.enabled#`")},"workbench.experimental.layoutControl.type":{type:"string",enum:["menu","toggles","both"],enumDescriptions:[(0,p.localize)(105,null),(0,p.localize)(106,null),(0,p.localize)(107,null)],tags:["experimental"],default:"both",description:(0,p.localize)(108,null),markdownDeprecationMessage:(0,p.localize)(109,null,"`#workbench.layoutControl.type#`")}}});let C=(0,p.localize)(110,null);C+=` - `+[(0,p.localize)(111,null),(0,p.localize)(112,null),(0,p.localize)(113,null),(0,p.localize)(114,null),(0,p.localize)(115,null),(0,p.localize)(116,null),(0,p.localize)(117,null),(0,p.localize)(118,null),(0,p.localize)(119,null),(0,p.localize)(120,null),(0,p.localize)(121,null),(0,p.localize)(122,null),(0,p.localize)(123,null),(0,p.localize)(124,null)].join(` - `),b.registerConfiguration({id:"window",order:8,title:(0,p.localize)(125,null),type:"object",properties:{"window.title":{type:"string",default:(()=>{if(A.isMacintosh&&A.isNative)return"${activeEditorShort}${separator}${rootName}";const r="${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}";return A.isWeb?r+"${separator}${remoteName}":r})(),markdownDescription:C},"window.titleSeparator":{type:"string",default:A.isMacintosh?" \u2014 ":" - ",markdownDescription:(0,p.localize)(126,null,"`#window.title#`")},"window.commandCenter":{type:"boolean",default:!1,tags:["experimental"],markdownDescription:(0,p.localize)(127,null,"`#window.titleBarStyle#`","`custom`")},"window.menuBarVisibility":{type:"string",enum:["classic","visible","toggle","hidden","compact"],markdownEnumDescriptions:[(0,p.localize)(128,null),(0,p.localize)(129,null),A.isMacintosh?(0,p.localize)(130,null):(0,p.localize)(131,null),(0,p.localize)(132,null),(0,p.localize)(133,null,"`#window.titleBarStyle#`","`native`")],default:A.isWeb?"compact":"classic",scope:1,markdownDescription:A.isMacintosh?(0,p.localize)(134,null):(0,p.localize)(135,null),included:A.isWindows||A.isLinux||A.isWeb},"window.enableMenuBarMnemonics":{type:"boolean",default:!0,scope:1,description:(0,p.localize)(136,null),included:A.isWindows||A.isLinux},"window.customMenuBarAltFocus":{type:"boolean",default:!0,scope:1,markdownDescription:(0,p.localize)(137,null),included:A.isWindows||A.isLinux},"window.openFilesInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[(0,p.localize)(138,null),(0,p.localize)(139,null),A.isMacintosh?(0,p.localize)(140,null):(0,p.localize)(141,null)],default:"off",scope:1,markdownDescription:A.isMacintosh?(0,p.localize)(142,null):(0,p.localize)(143,null)},"window.openFoldersInNewWindow":{type:"string",enum:["on","off","default"],enumDescriptions:[(0,p.localize)(144,null),(0,p.localize)(145,null),(0,p.localize)(146,null)],default:"default",scope:1,markdownDescription:(0,p.localize)(147,null)},"window.confirmBeforeClose":{type:"string",enum:["always","keyboardOnly","never"],enumDescriptions:[A.isWeb?(0,p.localize)(148,null):(0,p.localize)(149,null),A.isWeb?(0,p.localize)(150,null):(0,p.localize)(151,null),A.isWeb?(0,p.localize)(152,null):(0,p.localize)(153,null)],default:A.isWeb&&!(0,E.isStandalone)()?"keyboardOnly":"never",markdownDescription:A.isWeb?(0,p.localize)(154,null):(0,p.localize)(155,null),scope:1}}}),b.registerConfiguration({id:"zenMode",order:9,title:(0,p.localize)(156,null),type:"object",properties:{"zenMode.fullScreen":{type:"boolean",default:!0,description:(0,p.localize)(157,null)},"zenMode.centerLayout":{type:"boolean",default:!0,description:(0,p.localize)(158,null)},"zenMode.hideTabs":{type:"boolean",default:!0,description:(0,p.localize)(159,null)},"zenMode.hideStatusBar":{type:"boolean",default:!0,description:(0,p.localize)(160,null)},"zenMode.hideActivityBar":{type:"boolean",default:!0,description:(0,p.localize)(161,null)},"zenMode.hideLineNumbers":{type:"boolean",default:!0,description:(0,p.localize)(162,null)},"zenMode.restore":{type:"boolean",default:!0,description:(0,p.localize)(163,null)},"zenMode.silentNotifications":{type:"boolean",default:!0,description:(0,p.localize)(164,null)}}})})()}),define(ae[2600],le([1,0,21,8,17,27,44,119]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let I=class{constructor(S,C,r){this.configurationService=S,this.extensionsWorkbenchService=C,this.telemetryService=r,this.init().catch(t.onUnexpectedError)}async init(){const S="coenraads.bracket-pair-colorizer-2";await this.extensionsWorkbenchService.queryLocal();const C=this.extensionsWorkbenchService.installed.find(i=>i.identifier.id===S);if(!C||C.enablementState!==8&&C.enablementState!==9)return;const r="editor.bracketPairColorization.enabled",u=!!this.configurationService.getValue(r);this.telemetryService.publicLog2("bracketPairColorizerTwoUsage",{nativeColorizationEnabled:u})}};I=we([F(0,p.IConfigurationService),F(1,E.IExtensionsWorkbenchService),F(2,A.ITelemetryService)],I),R.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(I,3)}),define(ae[2601],le([1,0,55,5,17,44,2585,2586,131,2281,2282]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const C=I.ExtensionsRegistry.registerExtensionPoint(k.codeActionsExtensionPointDescriptor),r=I.ExtensionsRegistry.registerExtensionPoint(E.documentationExtensionPointDescriptor);R.Registry.as(t.Extensions.Configuration).registerConfiguration(b.editorConfiguration);let u=class{constructor(f){f.createInstance(b.CodeActionsContribution,C),f.createInstance(S.CodeActionDocumentationContribution,r)}};u=we([F(0,p.IInstantiationService)],u),R.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(u,4)}),define(ae[2602],le([1,0,1566,14,15,8,7,17,44]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMultiCursorModifierAction=void 0;class b extends R.Action2{constructor(){super({id:b.ID,title:{value:(0,t.localize)(0,null),original:"Toggle Multi-Cursor Modifier"},f1:!0})}run(u){const i=u.get(A.IConfigurationService),c=i.getValue("editor").multiCursorModifier==="ctrlCmd"?"alt":"ctrlCmd";return i.updateValue(b.multiCursorModifierConfigurationKey,c)}}e.ToggleMultiCursorModifierAction=b,b.ID="workbench.action.toggleMultiCursorModifier",b.multiCursorModifierConfigurationKey="editor.multiCursorModifier";const S=new k.RawContextKey("multiCursorModifier","altKey");let C=class{constructor(u,i){this.configurationService=u,this._multiCursorModifier=S.bindTo(i),this._update(),u.onDidChangeConfiguration(f=>{f.affectsConfiguration("editor.multiCursorModifier")&&this._update()})}_update(){const i=this.configurationService.getValue("editor").multiCursorModifier==="ctrlCmd"?"ctrlCmd":"altKey";this._multiCursorModifier.set(i)}};C=we([F(0,A.IConfigurationService),F(1,k.IContextKeyService)],C),E.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(C,3),(0,R.registerAction2)(b),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:b.ID,title:(0,t.localize)(1,null)},when:S.isEqualTo("ctrlCmd"),order:1}),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarSelectionMenu,{group:"4_config",command:{id:b.ID,title:p.isMacintosh?(0,t.localize)(2,null):(0,t.localize)(3,null)},when:S.isEqualTo("altKey"),order:1})}),define(ae[546],le([1,0,1569,2,40,75,15,7,59,29,17,44,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readTransientState=e.writeTransientState=void 0;const u="transientWordWrapState",i="isWordWrapMinified",f="isDominatedByLongLines",c=new E.RawContextKey("canToggleWordWrap",!1,!0),l=new E.RawContextKey("editorWordWrap",!1,t.localize(0,null));function s(D,y,T){T.setTransientModelProperty(D,u,y)}e.writeTransientState=s;function d(D,y){return y.getTransientModelProperty(D,u)}e.readTransientState=d;const n="editor.action.toggleWordWrap";class a extends R.EditorAction{constructor(){super({id:n,label:t.localize(1,null),alias:"View: Toggle Word Wrap",precondition:void 0,kbOpts:{kbExpr:null,primary:568,weight:100}})}run(y,T){const _=y.get(A.ICodeEditorService);if(!v(_,T))return;const L=T.getModel(),M=d(L,_);let O;M?O=null:O={wordWrapOverride:T.getOption(134).wrappingColumn===-1?"on":"off"},s(L,O,_);const N=o(T,_);if(N){const P=N.getOriginalEditor(),B=N.getModifiedEditor(),V=P===T?B:P;v(_,V)&&(s(V.getModel(),O,_),N.updateOptions({}))}}}function o(D,y){if(!D.getOption(55))return null;for(const T of y.listDiffEditors()){const _=T.getOriginalEditor(),L=T.getModifiedEditor();if(_===D||L===D)return T}return null}let g=class extends p.Disposable{constructor(y,T,_){super(),this._editor=y,this._contextKeyService=T,this._codeEditorService=_;const M=this._editor.getOptions().get(134),O=this._contextKeyService.createKey(i,M.isWordWrapMinified),N=this._contextKeyService.createKey(f,M.isDominatedByLongLines);let P=!1;this._register(y.onDidChangeConfiguration(V=>{if(!V.hasChanged(134))return;const x=this._editor.getOptions().get(134);O.set(x.isWordWrapMinified),N.set(x.isDominatedByLongLines),P||B()})),this._register(y.onDidChangeModel(V=>{B()})),this._register(_.onDidChangeTransientModelProperty(()=>{B()}));const B=()=>{if(!v(this._codeEditorService,this._editor))return;const V=d(this._editor.getModel(),this._codeEditorService);try{P=!0,this._applyWordWrapState(V)}finally{P=!1}}}_applyWordWrapState(y){const T=y?y.wordWrapOverride:"inherit";this._editor.updateOptions({wordWrapOverride2:T})}};g.ID="editor.contrib.toggleWordWrapController",g=we([F(1,E.IContextKeyService),F(2,A.ICodeEditorService)],g);let h=class extends p.Disposable{constructor(y,T){super(),this._diffEditor=y,this._codeEditorService=T,this._register(this._diffEditor.onDidChangeModel(()=>{this._ensureSyncedWordWrapToggle()}))}_ensureSyncedWordWrapToggle(){const y=this._diffEditor.getOriginalEditor(),T=this._diffEditor.getModifiedEditor();if(!y.hasModel()||!T.hasModel())return;const _=d(y.getModel(),this._codeEditorService),L=d(T.getModel(),this._codeEditorService);_&&!L&&v(this._codeEditorService,y)&&(s(T.getModel(),_,this._codeEditorService),this._diffEditor.updateOptions({})),!_&&L&&v(this._codeEditorService,T)&&(s(y.getModel(),L,this._codeEditorService),this._diffEditor.updateOptions({}))}};h.ID="diffeditor.contrib.toggleWordWrapController",h=we([F(1,A.ICodeEditorService)],h);function v(D,y){if(!y||y.isSimpleWidget)return!1;const T=y.getModel();if(!T||T.uri.scheme==="output")return!1;if(y.getOption(55)){for(const _ of D.listDiffEditors())if(_.getOriginalEditor()===y&&!_.renderSideBySide)return!1}return!0}let m=class{constructor(y,T,_){this._editorService=y,this._codeEditorService=T,this._contextService=_,window.addEventListener("focus",()=>this._update(),!0),window.addEventListener("blur",()=>this._update(),!0),this._editorService.onDidActiveEditorChange(()=>this._update()),this._canToggleWordWrap=c.bindTo(this._contextService),this._editorWordWrap=l.bindTo(this._contextService),this._activeEditor=null,this._activeEditorListener=new p.DisposableStore,this._update()}_update(){const y=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();this._activeEditor!==y&&(this._activeEditorListener.clear(),this._activeEditor=y,y&&(this._activeEditorListener.add(y.onDidChangeModel(()=>this._updateFromCodeEditor())),this._activeEditorListener.add(y.onDidChangeConfiguration(T=>{T.hasChanged(134)&&this._updateFromCodeEditor()})),this._updateFromCodeEditor()))}_updateFromCodeEditor(){if(v(this._codeEditorService,this._activeEditor)){const y=this._activeEditor.getOption(134);this._setValues(!0,y.wrappingColumn!==-1)}else return this._setValues(!1,!1)}_setValues(y,T){this._canToggleWordWrap.set(y),this._editorWordWrap.set(T)}};m=we([F(0,r.IEditorService),F(1,A.ICodeEditorService),F(2,E.IContextKeyService)],m),S.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(m,2),(0,R.registerEditorContribution)(g.ID,g),(0,R.registerDiffEditorContribution)(h.ID,h),(0,R.registerEditorAction)(a),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:n,title:t.localize(2,null),icon:b.Codicon.wordWrap},group:"navigation",order:1,when:E.ContextKeyExpr.and(E.ContextKeyExpr.has(f),E.ContextKeyExpr.has(i))}),k.MenuRegistry.appendMenuItem(k.MenuId.EditorTitle,{command:{id:n,title:t.localize(3,null),icon:b.Codicon.wordWrap},group:"navigation",order:1,when:E.ContextKeyExpr.and(I.EditorContextKeys.inDiffEditor.negate(),E.ContextKeyExpr.has(f),E.ContextKeyExpr.not(i))}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarViewMenu,{command:{id:n,title:t.localize(4,null),toggled:l,precondition:c},order:1,group:"5_editor"})}),define(ae[2603],le([1,0,2,422,89,17,44]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let E=class extends t.Disposable{constructor(b){super(),this._register(b.onDidChangeDisplay(()=>{p.FontMeasurements.clearAllFontInfos()}))}};E=we([F(0,R.INativeHostService)],E),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(E,4)}),define(ae[2604],le([1,0,1571,11,2,14,40,20,93,381,17,44,8,59]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionClipboard=void 0;let i=class Qa extends R.Disposable{constructor(s,d){if(super(),A.isLinux){let n=s.getOption(97);this._register(s.onDidChangeConfiguration(o=>{o.hasChanged(97)&&(n=s.getOption(97))}));const a=this._register(new p.RunOnceScheduler(()=>{if(!s.hasModel())return;const o=s.getModel();let g=s.getSelections();g=g.slice(0),g.sort(E.Range.compareRangesUsingStarts);let h=0;for(const w of g){if(w.isEmpty())return;h+=o.getValueLengthInRange(w)}if(h>Qa.SELECTION_LENGTH_LIMIT)return;const v=[];for(const w of g)v.push(o.getValueInRange(w,0));const m=v.join(o.getEOL());d.writeText(m,"selection")},100));this._register(s.onDidChangeCursorSelection(o=>{!n||o.source!=="restoreState"&&a.schedule()}))}}dispose(){super.dispose()}};i.SELECTION_LENGTH_LIMIT=65536,i=we([F(1,I.IClipboardService)],i),e.SelectionClipboard=i;let f=class{constructor(s){A.isLinux&&document.addEventListener("mouseup",d=>{d.button===1&&(s.getValue("editor").selectionClipboard||d.preventDefault())})}};f=we([F(0,r.IConfigurationService)],f);class c extends k.EditorAction{constructor(){super({id:"editor.action.selectionClipboardPaste",label:t.localize(0,null),alias:"Paste Selection Clipboard",precondition:u.EditorContextKeys.writable})}async run(s,d,n){const o=await s.get(I.IClipboardService).readText("selection");d.trigger("keyboard","paste",{text:o,pasteOnNewLine:!1,multicursorText:null})}}(0,k.registerEditorContribution)(b.SelectionClipboardContributionID,i),S.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(f,2),A.isLinux&&(0,k.registerEditorAction)(c)}),define(ae[2605],le([1,0,17,44,75,89,2]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let E=class extends k.Disposable{constructor(b,S){super(),this._register(S.onDidResumeOS(()=>{b.listCodeEditors().forEach(C=>C.render(!0))}))}};E=we([F(0,R.ICodeEditorService),F(1,A.INativeHostService)],E),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(E,4)}),define(ae[2606],le([1,0,44,17,5,128,2497]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionPoints=void 0;let E=class{constructor(b,S){S.args["export-default-configuration"]&&b.createInstance(k.DefaultConfigurationExportHelper)}};E=we([F(0,R.IInstantiationService),F(1,A.INativeWorkbenchEnvironmentService)],E),e.ExtensionPoints=E,p.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(E,3)}),define(ae[2607],le([1,0,2,37,198,17,44]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let E=class{constructor(b,S){this.disposables=new t.DisposableStore;const C=r=>b.container.classList.toggle("context-menu-visible",r);S.onDidShowContextMenu(()=>C(!0),null,this.disposables),S.onDidHideContextMenu(()=>C(!1),null,this.disposables)}};E=we([F(0,R.ILayoutService),F(1,p.IContextMenuService)],E),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(E,4)}),define(ae[2608],le([1,0,6,2,68,28,105,42,1597,31,8,7,47,5,155,48,17,2298,87,2478,925,391,176,24,39,69]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AdapterManager=void 0;const m=c.Registry.as(i.Extensions.JSONContribution);let w=class extends p.Disposable{constructor(y,T,_,L,M,O,N,P,B,V,z){super(),this.editorService=T,this.configurationService=_,this.quickInputService=L,this.instantiationService=M,this.commandService=O,this.extensionService=N,this.contextKeyService=P,this.languageService=B,this.dialogService=V,this.lifecycleService=z,this.debugAdapterFactories=new Map,this._onDidRegisterDebugger=new t.Emitter,this._onDidDebuggersExtPointRead=new t.Emitter,this.breakpointContributions=[],this.debuggerWhenKeys=new Set,this.usedDebugTypes=new Set,this.adapterDescriptorFactories=[],this.debuggers=[],this.registerListeners(),this.contextKeyService.bufferChangeEvents(()=>{this.debuggersAvailable=s.CONTEXT_DEBUGGERS_AVAILABLE.bindTo(P),this.debugExtensionsAvailable=s.CONTEXT_DEBUG_EXTENSION_AVAILABLE.bindTo(P)}),this._register(this.contextKeyService.onDidChangeContext(x=>{x.affectsSome(this.debuggerWhenKeys)&&(this.debuggersAvailable.set(this.hasEnabledDebuggers()),this.updateDebugAdapterSchema())})),this._register(this.onDidDebuggersExtPointRead(()=>{this.debugExtensionsAvailable.set(this.debuggers.length>0)})),this.lifecycleService.when(4).then(()=>this.debugExtensionsAvailable.set(this.debuggers.length>0)),this._register(y.onDidNewSession(x=>{this.usedDebugTypes.add(x.configuration.type)}))}registerListeners(){n.debuggersExtPoint.setHandler((y,T)=>{T.added.forEach(_=>{_.value.forEach(L=>{if((!L.type||typeof L.type!="string")&&_.collector.error(I.localize(0,null)),L.type!=="*"){const M=this.getDebugger(L.type);if(M)M.merge(L,_.description);else{const O=this.instantiationService.createInstance(d.Debugger,this,L,_.description);O.when?.keys().forEach(N=>this.debuggerWhenKeys.add(N)),this.debuggers.push(O)}}})}),y.forEach(_=>{_.value.forEach(L=>{L.type==="*"&&this.debuggers.forEach(M=>M.merge(L,_.description))})}),T.removed.forEach(_=>{const L=_.value.map(M=>M.type);this.debuggers=this.debuggers.filter(M=>L.indexOf(M.type)===-1)}),this.updateDebugAdapterSchema(),this._onDidDebuggersExtPointRead.fire()}),n.breakpointsExtPoint.setHandler(y=>{this.breakpointContributions=y.flatMap(T=>T.value.map(_=>this.instantiationService.createInstance(l.Breakpoints,_)))})}updateDebugAdapterSchema(){const y=n.launchSchema.properties.configurations.items,T=a.TaskDefinitionRegistry.getJsonSchema(),_={common:{properties:{name:{type:"string",description:I.localize(1,null),default:"Launch"},debugServer:{type:"number",description:I.localize(2,null),default:4711},preLaunchTask:{anyOf:[T,{type:["string"]}],default:"",defaultSnippets:[{body:{task:"",type:""}}],description:I.localize(3,null)},postDebugTask:{anyOf:[T,{type:["string"]}],default:"",defaultSnippets:[{body:{task:"",type:""}}],description:I.localize(4,null)},presentation:n.presentationSchema,internalConsoleOptions:s.INTERNAL_CONSOLE_OPTIONS_SCHEMA,suppressMultipleSessionWarning:{type:"boolean",description:I.localize(5,null),default:!0}}}};n.launchSchema.definitions=_,y.oneOf=[],y.defaultSnippets=[],this.debuggers.forEach(L=>{const M=L.getSchemaAttributes(_);M&&y.oneOf&&y.oneOf.push(...M);const O=L.configurationSnippets;O&&y.defaultSnippets&&y.defaultSnippets.push(...O)}),m.registerSchema(o.launchSchemaId,n.launchSchema)}registerDebugAdapterFactory(y,T){return y.forEach(_=>this.debugAdapterFactories.set(_,T)),this.debuggersAvailable.set(this.hasEnabledDebuggers()),this._onDidRegisterDebugger.fire(),{dispose:()=>{y.forEach(_=>this.debugAdapterFactories.delete(_))}}}hasEnabledDebuggers(){for(const[y]of this.debugAdapterFactories){const T=this.getDebugger(y);if(T&&T.enabled)return!0}return!1}createDebugAdapter(y){const T=this.debugAdapterFactories.get(y.configuration.type);if(T)return T.createDebugAdapter(y)}substituteVariables(y,T,_){const L=this.debugAdapterFactories.get(y);return L?L.substituteVariables(T,_):Promise.resolve(_)}runInTerminal(y,T,_){const L=this.debugAdapterFactories.get(y);return L?L.runInTerminal(T,_):Promise.resolve(void 0)}registerDebugAdapterDescriptorFactory(y){return this.adapterDescriptorFactories.push(y),{dispose:()=>{this.unregisterDebugAdapterDescriptorFactory(y)}}}unregisterDebugAdapterDescriptorFactory(y){const T=this.adapterDescriptorFactories.indexOf(y);T>=0&&this.adapterDescriptorFactories.splice(T,1)}getDebugAdapterDescriptor(y){const T=y.configuration,_=this.adapterDescriptorFactories.filter(L=>L.type===T.type&&L.createDebugAdapterDescriptor);return _.length===1?_[0].createDebugAdapterDescriptor(y):Promise.resolve(void 0)}getDebuggerLabel(y){const T=this.getDebugger(y);if(T)return T.label}get onDidRegisterDebugger(){return this._onDidRegisterDebugger.event}get onDidDebuggersExtPointRead(){return this._onDidDebuggersExtPointRead.event}canSetBreakpointsIn(y){const T=y.getLanguageId();return!T||T==="jsonc"||T==="log"?!1:this.configurationService.getValue("debug").allowBreakpointsEverywhere?!0:this.breakpointContributions.some(_=>_.language===T&&_.enabled)}getDebugger(y){return this.debuggers.find(T=>A.equalsIgnoreCase(T.type,y))}getEnabledDebugger(y){const T=this.getDebugger(y);return T&&T.enabled?T:void 0}someDebuggerInterestedInLanguage(y){return!!this.debuggers.filter(T=>T.enabled).find(T=>T.interestedInLanguage(y))}async guessDebugger(y){const T=this.editorService.activeTextEditorControl;let _=[],L=null,M=null;if((0,k.isCodeEditor)(T)){M=T.getModel();const V=M?M.getLanguageId():void 0;V&&(L=this.languageService.getLanguageName(V));const z=this.debuggers.filter(x=>x.enabled).filter(x=>V&&x.interestedInLanguage(V));if(z.length===1)return z[0];z.length>1&&(_=z)}if((!L||y||M&&this.canSetBreakpointsIn(M))&&_.length===0&&(await this.activateDebuggers("onDebugInitialConfigurations"),_=this.debuggers.filter(V=>V.enabled).filter(V=>V.hasInitialConfiguration()||V.hasConfigurationProvider())),_.length===0&&L){L.indexOf(" ")>=0&&(L=`'${L}'`);const V=I.localize(6,null,L),z=I.localize(7,null,L);(await this.dialogService.show(R.default.Warning,V,[z,I.localize(8,null)],{cancelId:1})).choice===0&&await this.commandService.executeCommand("debug.installAdditionalDebuggers",L);return}this.initExtensionActivationsIfNeeded(),_.sort((V,z)=>V.label.localeCompare(z.label));const O=[],N=[];_.forEach(V=>{const z=V.getMainExtensionDescriptor();z.id&&!!this.earlyActivatedExtensions?.has(z.id)||this.usedDebugTypes.has(V.type)?O.push(V):N.push(V)});const P=[];O.length>0&&P.push({type:"separator",label:I.localize(9,null)},...O.map(V=>({label:V.label,debugger:V}))),N.length>0&&(P.length>0&&P.push({type:"separator",label:""}),P.push(...N.map(V=>({label:V.label,debugger:V})))),P.push({type:"separator",label:""},{label:L?I.localize(10,null,L):I.localize(11,null)});const B=I.localize(12,null);return this.quickInputService.pick(P,{activeItem:P[0],placeHolder:B}).then(V=>{if(V&&V.debugger)return V.debugger;V&&this.commandService.executeCommand("debug.installAdditionalDebuggers",L)})}initExtensionActivationsIfNeeded(){if(!this.earlyActivatedExtensions){this.earlyActivatedExtensions=new Set;const y=this.extensionService.getExtensionsStatus();for(const T in y)y[T].activationTimes&&this.earlyActivatedExtensions.add(T)}}async activateDebuggers(y,T){this.initExtensionActivationsIfNeeded();const _=[this.extensionService.activateByEvent(y),this.extensionService.activateByEvent("onDebug")];T&&_.push(this.extensionService.activateByEvent(`${y}:${T}`)),await Promise.all(_)}};w=we([F(1,g.IEditorService),F(2,S.IConfigurationService),F(3,f.IQuickInputService),F(4,u.IInstantiationService),F(5,b.ICommandService),F(6,h.IExtensionService),F(7,C.IContextKeyService),F(8,E.ILanguageService),F(9,r.IDialogService),F(10,v.ILifecycleService)],w),e.AdapterManager=w}),define(ae[2609],le([1,0,1628,8,47,87,69]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugLifecycle=void 0;let E=class{constructor(b,S,C,r){this.debugService=S,this.configurationService=C,this.dialogService=r,b.onBeforeShutdown(async u=>u.veto(this.shouldVetoShutdown(u.reason),"veto.debug"))}shouldVetoShutdown(b){const S=this.debugService.getModel().getSessions().filter(r=>r.parentSession===void 0);return S.length===0||this.configurationService.getValue("debug").confirmOnExit==="never"?!1:this.showWindowCloseConfirmation(S.length)}async showWindowCloseConfirmation(b){let S;return b===1?S=t.localize(0,null):S=t.localize(1,null),!(await this.dialogService.confirm({message:S,type:"warning",primaryButton:t.localize(2,null)})).confirmed}};E=we([F(0,k.ILifecycleService),F(1,A.IDebugService),F(2,p.IConfigurationService),F(3,R.IDialogService)],E),e.DebugLifecycle=E}),define(ae[2610],le([1,0,36,21,13,1636,8,26,41,17,23,44,119]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let u=class{constructor(f,c,l,s,d){this.configurationService=f,this.extensionsWorkbenchService=c,this.storageService=l,this.notificationService=s,this.openerService=d,this.storageKey="deprecatedExtensionMigrator.state",this.init().catch(p.onUnexpectedError)}async init(){const f="coenraads.bracket-pair-colorizer";await this.extensionsWorkbenchService.queryLocal();const c=this.extensionsWorkbenchService.installed.find(a=>a.identifier.id===f);if(!c||c.enablementState!==8&&c.enablementState!==9)return;const l=await this.getState();if(l.disablementLog.some(a=>a.extensionId===f))return;l.disablementLog.push({extensionId:f,disablementDateTime:new Date().getTime()}),await this.setState(l),await this.extensionsWorkbenchService.setEnablement(c,6);const d="editor.bracketPairColorization.enabled",n=!!this.configurationService.inspect(d).user;this.notificationService.notify({message:(0,A.localize)(0,null),severity:E.Severity.Info,actions:{primary:[new t.Action("",(0,A.localize)(1,null),void 0,void 0,()=>{this.extensionsWorkbenchService.uninstall(c)})],secondary:[n?void 0:new t.Action("",(0,A.localize)(2,null),void 0,void 0,()=>{this.configurationService.updateValue(d,!0,2)}),new t.Action("",(0,A.localize)(3,null),void 0,void 0,()=>{this.openerService.open("https://github.com/microsoft/vscode/issues/155179")})].filter(R.isDefined)}})}async getState(){const f=await this.storageService.get(this.storageKey,-1,"");return f===""?{disablementLog:[]}:JSON.parse(f)}async setState(f){const c=JSON.stringify(f);await this.storageService.store(this.storageKey,c,-1,0)}};u=we([F(0,k.IConfigurationService),F(1,r.IExtensionsWorkbenchService),F(2,S.IStorageService),F(3,E.INotificationService),F(4,I.IOpenerService)],u),b.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(u,3)}),define(ae[941],le([1,0,1666,6,21,2,82,120,274,69,5,100,26]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isKeymapExtension=e.getInstalledExtensions=e.onExtensionChanged=e.KeymapExtensions=void 0;let u=class extends A.Disposable{constructor(s,d,n,a,o){super(),this.instantiationService=s,this.extensionEnablementService=d,this.tipsService=n,this.notificationService=o,this._register(a.onDidShutdown(()=>this.dispose())),this._register(s.invokeFunction(i)(g=>{Promise.all(g.map(h=>this.checkForOtherKeymaps(h))).then(void 0,R.onUnexpectedError)}))}checkForOtherKeymaps(s){return this.instantiationService.invokeFunction(f).then(d=>{const n=d.filter(o=>c(this.tipsService,o)),a=n.find(o=>(0,C.areSameExtensions)(o.identifier,s));if(a&&a.globallyEnabled){const o=n.filter(g=>!(0,C.areSameExtensions)(g.identifier,s)&&g.globallyEnabled);if(o.length)return this.promptForDisablingOtherKeymaps(a,o)}})}promptForDisablingOtherKeymaps(s,d){const n=a=>{a&&this.extensionEnablementService.setEnablement(d.map(o=>o.local),6)};this.notificationService.prompt(r.Severity.Info,(0,t.localize)(0,null,d.map(a=>`'${a.local.manifest.displayName}'`).join(", ")),[{label:(0,t.localize)(1,null),run:()=>n(!0)},{label:(0,t.localize)(2,null),run:()=>n(!1)}])}};u=we([F(0,S.IInstantiationService),F(1,E.IWorkbenchExtensionEnablementService),F(2,I.IExtensionRecommendationsService),F(3,b.ILifecycleService),F(4,r.INotificationService)],u),e.KeymapExtensions=u;function i(l){const s=l.get(k.IExtensionManagementService),d=l.get(E.IWorkbenchExtensionEnablementService),n=p.Event.chain(s.onDidInstallExtensions).filter(a=>a.some(({operation:o})=>o===2)).map(a=>a.map(({identifier:o})=>o)).event;return p.Event.debounce(p.Event.any(p.Event.chain(p.Event.any(n,p.Event.map(s.onDidUninstallExtension,a=>[a.identifier]))).event,p.Event.map(d.onEnablementChanged,a=>a.map(o=>o.identifier))),(a,o)=>{a=a||[];for(const g of o)a.some(h=>!(0,C.areSameExtensions)(h,g))&&a.push(g);return a})}e.onExtensionChanged=i;async function f(l){const s=l.get(k.IExtensionManagementService),d=l.get(E.IWorkbenchExtensionEnablementService);return(await s.getInstalled()).map(a=>({identifier:a.identifier,local:a,globallyEnabled:d.isEnabled(a)}))}e.getInstalledExtensions=f;function c(l,s){const d=s.local.manifest.categories;return d&&d.indexOf("Keymaps")!==-1||l.getKeymapRecommendations().some(n=>(0,C.areSameExtensions)({id:n},s.local.identifier))}e.isKeymapExtension=c}),define(ae[2611],le([1,0,1677,53,795,15,191,98,22,55,17,44,2094,8,189,148]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalTerminalContribution=void 0;const c="workbench.action.terminal.openNativeConsole";E.KeybindingsRegistry.registerCommandAndKeybindingRule({id:c,primary:3105,when:i.TerminalContextKeys.notFocus,weight:200,handler:async d=>{const n=d.get(k.IHistoryService),a=d.get(R.IExternalTerminalService),o=d.get(u.IConfigurationService),g=d.get(f.IRemoteAuthorityResolverService),h=n.getLastActiveWorkspaceRoot(),v=o.getValue("terminal.external");if(h?.scheme===I.Schemas.file){a.openTerminal(v,h.fsPath);return}try{if(h?.scheme===I.Schemas.vscodeRemote){const w=await g.getCanonicalURI(h);if(w.scheme===I.Schemas.file){a.openTerminal(v,w.fsPath);return}}}catch{}const m=n.getLastActiveFile(I.Schemas.file);if(m?.scheme===I.Schemas.file){a.openTerminal(v,p.dirname(m.fsPath));return}try{if(m?.scheme===I.Schemas.vscodeRemote){const w=await g.getCanonicalURI(m);if(w.scheme===I.Schemas.file){a.openTerminal(v,w.fsPath);return}}}catch{}a.openTerminal(v,void 0)}}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:c,title:{value:t.localize(0,null),original:"Open New External Terminal"}}});let l=class{constructor(n){this._externalTerminalService=n,this._updateConfiguration()}async _updateConfiguration(){const n=await this._externalTerminalService.getDefaultTerminalForPlatforms();S.Registry.as(b.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:n.windows,scope:1},"terminal.external.osxExec":{type:"string",description:t.localize(6,null),default:R.DEFAULT_TERMINAL_OSX,scope:1},"terminal.external.linuxExec":{type:"string",description:t.localize(7,null),default:n.linux,scope:1}}})}};l=we([F(0,r.IExternalTerminalMainService)],l),e.ExternalTerminalContribution=l,S.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(l,3)}),define(ae[2612],le([1,0,2,68,105,511,24,544,1703,17,44,55,331,39,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingLimitIndicatorContribution=void 0;const f="workbench.action.openSettings",c=I.localize(0,null),l="editor.foldingMaximumRegions";let s=class extends t.Disposable{constructor(a,o){super(),this.editorService=a,this.languageStatusService=o;let g,h;const v=()=>{const m=a.activeTextEditorControl;if(m===h)return;h=void 0,g&&(g.dispose(),g=void 0);const w=(0,R.getCodeEditor)(m);if(w){const D=A.FoldingController.get(w);if(D){const y=D.foldingLimitInfo;this.updateLimitInfo(y),h=m,g=D.onDidChangeFoldingLimit(T=>{this.updateLimitInfo(T)})}else this.updateLimitInfo(void 0)}else this.updateLimitInfo(void 0)};this._register(this.editorService.onDidActiveEditorChange(v)),v()}updateLimitInfo(a){if(this._limitStatusItem&&(this._limitStatusItem.dispose(),this._limitStatusItem=void 0),a&&a.limited!==!1){const o={id:"foldingLimitInfo",selector:"*",name:I.localize(1,null),severity:p.default.Warning,label:I.localize(2,null),detail:I.localize(3,null,a.limited),command:{id:f,arguments:[l],title:c},accessibilityInfo:void 0,source:I.localize(4,null),busy:!1};this._limitStatusItem=this.languageStatusService.addStatus(o)}}};s=we([F(0,k.IEditorService),F(1,E.ILanguageStatusService)],s),e.FoldingLimitIndicatorContribution=s,b.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(s,3);let d=class di extends t.Disposable{constructor(a,o){super(),this._extensionService=a,this._configurationService=o,this._store.add(this._extensionService.onDidChangeExtensions(this._updateConfigValues,this)),this._store.add(A.FoldingController.setFoldingRangeProviderSelector(this._selectFoldingRangeProvider.bind(this))),this._updateConfigValues()}async _updateConfigValues(){await this._extensionService.whenInstalledExtensionsRegistered(),di.extensionIds.length=0,di.extensionItemLabels.length=0,di.extensionDescriptions.length=0,di.extensionIds.push(null),di.extensionItemLabels.push(I.localize(5,null)),di.extensionDescriptions.push(I.localize(6,null));const a=[],o=[];for(const h of this._extensionService.extensions)(h.main||h.browser)&&(h.categories?.find(v=>v==="Programming Languages")?a.push(h):o.push(h));const g=(h,v)=>h.name.localeCompare(v.name);for(const h of a.sort(g))di.extensionIds.push(h.identifier.value),di.extensionItemLabels.push(h.displayName??""),di.extensionDescriptions.push(h.description??"");for(const h of o.sort(g))di.extensionIds.push(h.identifier.value),di.extensionItemLabels.push(h.displayName??""),di.extensionDescriptions.push(h.description??"")}_selectFoldingRangeProvider(a,o){const g=this._configurationService.getValue(di.configName,{overrideIdentifier:o.getLanguageId()});return g?a.filter(h=>h.id===g):a}};d.configName="editor.defaultFoldingRangeProvider",d.extensionIds=[],d.extensionItemLabels=[],d.extensionDescriptions=[],d=we([F(0,u.IExtensionService),F(1,i.IConfigurationService)],d),b.Registry.as(C.Extensions.Configuration).registerConfiguration({...r.editorConfigurationBaseNode,properties:{[d.configName]:{description:I.localize(7,null),type:["string","null"],default:null,enum:d.extensionIds,enumItemLabels:d.extensionItemLabels,markdownEnumDescriptions:d.extensionDescriptions}}}),b.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(d,3)}),define(ae[2613],le([1,0,105,40,59,1704,7,48,32,5,431,20,27,115,17,55,44,39,2,8,26,42,120,331,47,61,544,24,31,72]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let T=class li extends s.Disposable{constructor(O,N,P,B,V,z,x,H,W,U){super(),this._extensionService=O,this._extensionEnablementService=N,this._configService=P,this._notificationService=B,this._dialogService=V,this._quickInputService=z,this._languageService=x,this._languageFeaturesService=H,this._languageStatusService=W,this._editorService=U,this._languageStatusStore=this._store.add(new s.DisposableStore),this._store.add(this._extensionService.onDidChangeExtensions(this._updateConfigValues,this)),this._store.add(S.FormattingConflicts.setFormatterSelector(($,q,X)=>this._selectFormatter($,q,X))),this._store.add(U.onDidActiveEditorChange(this._updateStatus,this)),this._store.add(H.documentFormattingEditProvider.onDidChange(this._updateStatus,this)),this._store.add(H.documentRangeFormattingEditProvider.onDidChange(this._updateStatus,this)),this._store.add(P.onDidChangeConfiguration($=>$.affectsConfiguration(li.configName)&&this._updateStatus())),this._updateConfigValues()}async _updateConfigValues(){await this._extensionService.whenInstalledExtensionsRegistered();let O=[...this._extensionService.extensions];O=O.sort((N,P)=>{const B=N.categories?.find(z=>z==="Formatters"||z==="Programming Languages"),V=P.categories?.find(z=>z==="Formatters"||z==="Programming Languages");return B&&!V?-1:!B&&V?1:N.name.localeCompare(P.name)}),li.extensionIds.length=0,li.extensionItemLabels.length=0,li.extensionDescriptions.length=0,li.extensionIds.push(null),li.extensionItemLabels.push(A.localize(0,null)),li.extensionDescriptions.push(A.localize(1,null));for(const N of O)(N.main||N.browser)&&(li.extensionIds.push(N.identifier.value),li.extensionItemLabels.push(N.displayName??""),li.extensionDescriptions.push(N.description??""))}static _maybeQuotes(O){return O.match(/\s/)?`'${O}'`:O}async _analyzeFormatter(O,N){const P=this._configService.getValue(li.configName,{resource:N.uri,overrideIdentifier:N.getLanguageId()});if(P){const z=O.find(H=>u.ExtensionIdentifier.equals(H.extensionId,P));if(z)return z;const x=await this._extensionService.getExtension(P);if(x&&this._extensionEnablementService.isEnabled((0,l.toExtension)(x))){const H=this._languageService.getLanguageName(N.getLanguageId())||N.getLanguageId();return A.localize(2,null,x.displayName||x.name,H)}}else if(O.length===1)return O[0];const B=this._languageService.getLanguageName(N.getLanguageId())||N.getLanguageId();return P?A.localize(4,null,P):A.localize(3,null,li._maybeQuotes(B))}async _selectFormatter(O,N,P){const B=await this._analyzeFormatter(O,N);if(typeof B!="string")return B;if(P!==2){if((await this._dialogService.confirm({message:A.localize(5,null),detail:B,primaryButton:A.localize(6,null),secondaryButton:A.localize(7,null)})).confirmed)return this._pickAndPersistDefaultFormatter(O,N)}else this._notificationService.prompt(n.Severity.Info,B,[{label:A.localize(8,null),run:()=>this._pickAndPersistDefaultFormatter(O,N)}],{silent:!0})}async _pickAndPersistDefaultFormatter(O,N){const P=O.map((z,x)=>({index:x,label:z.displayName||(z.extensionId?z.extensionId.value:"?"),description:z.extensionId&&z.extensionId.value})),B=this._languageService.getLanguageName(N.getLanguageId())||N.getLanguageId(),V=await this._quickInputService.pick(P,{placeHolder:A.localize(9,null,li._maybeQuotes(B))});if(!(!V||!O[V.index].extensionId))return this._configService.updateValue(li.configName,O[V.index].extensionId.value,{resource:N.uri,overrideIdentifier:N.getLanguageId()}),O[V.index]}_updateStatus(){this._languageStatusStore.clear();const O=(0,t.getCodeEditor)(this._editorService.activeTextEditorControl);if(!O||!O.hasModel())return;const N=O.getModel(),P=(0,S.getRealAndSyntheticDocumentFormattersOrdered)(this._languageFeaturesService.documentFormattingEditProvider,this._languageFeaturesService.documentRangeFormattingEditProvider,N);if(P.length===0)return;const B=new I.CancellationTokenSource;this._languageStatusStore.add((0,s.toDisposable)(()=>B.dispose(!0))),this._analyzeFormatter(P,N).then(V=>{if(B.token.isCancellationRequested||typeof V!="string")return;const z={id:`formatter/configure/dfl/${(0,y.generateUuid)()}`,title:A.localize(10,null)};this._languageStatusStore.add(D.CommandsRegistry.registerCommand(z.id,()=>this._pickAndPersistDefaultFormatter(P,N))),this._languageStatusStore.add(this._languageStatusService.addStatus({id:"formatter.conflict",name:A.localize(11,null),selector:{language:N.getLanguageId(),pattern:N.uri.fsPath},severity:n.Severity.Error,label:A.localize(12,null),detail:V,busy:!1,source:"",command:z,accessibilityInfo:void 0}))})}};T.configName="editor.defaultFormatter",T.extensionIds=[],T.extensionItemLabels=[],T.extensionDescriptions=[],T=we([F(0,l.IExtensionService),F(1,o.IWorkbenchExtensionEnablementService),F(2,d.IConfigurationService),F(3,n.INotificationService),F(4,h.IDialogService),F(5,E.IQuickInputService),F(6,a.ILanguageService),F(7,v.ILanguageFeaturesService),F(8,m.ILanguageStatusService),F(9,w.IEditorService)],T),i.Registry.as(c.Extensions.Workbench).registerWorkbenchContribution(T,3),i.Registry.as(f.Extensions.Configuration).registerConfiguration({...g.editorConfigurationBaseNode,properties:{[T.configName]:{description:A.localize(13,null),type:["string","null"],default:null,enum:T.extensionIds,enumItemLabels:T.extensionItemLabels,markdownEnumDescriptions:T.extensionDescriptions}}});function _(M,O,N,P){function B(V){return V.extensionId?u.ExtensionIdentifier.toKey(V.extensionId):"unknown"}M.publicLog2("formatterpick",{mode:O,extensions:N.map(B),pick:P?B(P):"none"})}async function L(M,O,N){const P=M.get(E.IQuickInputService),B=M.get(d.IConfigurationService),V=M.get(a.ILanguageService),z={resource:O.uri,overrideIdentifier:O.getLanguageId()},x=B.getValue(T.configName,z);let H;const W=N.map((q,X)=>{const G=u.ExtensionIdentifier.equals(q.extensionId,x),Q={index:X,label:q.displayName||"",description:G?A.localize(14,null):void 0};return G&&(H=Q),Q}),U={label:A.localize(15,null)},$=await P.pick([...W,{type:"separator"},U],{placeHolder:A.localize(16,null),activeItem:H});if($)if($===U){const q=V.getLanguageName(O.getLanguageId())||O.getLanguageId(),X=await P.pick(W,{placeHolder:A.localize(17,null,T._maybeQuotes(q))});X&&N[X.index].extensionId&&B.updateValue(T.configName,N[X.index].extensionId.value,z);return}else return $.index;else return}(0,p.registerEditorAction)(class extends p.EditorAction{constructor(){super({id:"editor.action.formatDocument.multiple",label:A.localize(18,null),alias:"Format Document...",precondition:k.ContextKeyExpr.and(R.EditorContextKeys.writable,R.EditorContextKeys.hasMultipleDocumentFormattingProvider),contextMenuOpts:{group:"1_modification",order:1.3}})}async run(O,N,P){if(!N.hasModel())return;const B=O.get(b.IInstantiationService),V=O.get(r.ITelemetryService),z=O.get(v.ILanguageFeaturesService),x=N.getModel(),H=(0,S.getRealAndSyntheticDocumentFormattersOrdered)(z.documentFormattingEditProvider,z.documentRangeFormattingEditProvider,x),W=await B.invokeFunction(L,x,H);typeof W=="number"&&await B.invokeFunction(S.formatDocumentWithProvider,H[W],N,1,I.CancellationToken.None),_(V,"document",H,typeof W=="number"&&H[W]||void 0)}}),(0,p.registerEditorAction)(class extends p.EditorAction{constructor(){super({id:"editor.action.formatSelection.multiple",label:A.localize(19,null),alias:"Format Code...",precondition:k.ContextKeyExpr.and(k.ContextKeyExpr.and(R.EditorContextKeys.writable),R.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider),contextMenuOpts:{when:k.ContextKeyExpr.and(R.EditorContextKeys.hasNonEmptySelection),group:"1_modification",order:1.31}})}async run(O,N){if(!N.hasModel())return;const P=O.get(b.IInstantiationService),B=O.get(v.ILanguageFeaturesService),V=O.get(r.ITelemetryService),z=N.getModel();let x=N.getSelection();x.isEmpty()&&(x=new C.Range(x.startLineNumber,1,x.startLineNumber,z.getLineMaxColumn(x.startLineNumber)));const H=B.documentRangeFormattingEditProvider.ordered(z),W=await P.invokeFunction(L,z,H);typeof W=="number"&&await P.invokeFunction(S.formatDocumentRangesWithProvider,H[W],N,x,I.CancellationToken.None),_(V,"range",H,typeof W=="number"&&H[W]||void 0)}})}),define(ae[2614],le([1,0,7,17,44]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListContext=void 0;let A=class{constructor(E){E.createKey("listSupportsTypeNavigation",!0),E.createKey("listSupportsKeyboardNavigation",!0)}};A=we([F(0,t.IContextKeyService)],A),e.ListContext=A,p.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(A,1)}),define(ae[2615],le([1,0,44,124,292,2,1728,17,33,8,55]),function(J,e,t,p,R,A,k,E,I,b,S){"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){const f=this._markerService.read({resource:i,severities:p.MarkerSeverity.Error|p.MarkerSeverity.Warning});let c;for(const l of f)(!c||l.severity>c.severity)&&(c=l);if(!!c)return{weight:100*c.severity,bubble:!0,tooltip:f.length===1?(0,k.localize)(1,null):(0,k.localize)(2,null,f.length),letter:f.length<10?f.length.toString():"9+",color:c.severity===p.MarkerSeverity.Error?I.listErrorForeground:I.listWarningForeground}}}let r=class{constructor(i,f,c){this._markerService=i,this._decorationsService=f,this._configurationService=c,this._disposables=[this._configurationService.onDidChangeConfiguration(this._updateEnablement,this)],this._updateEnablement()}dispose(){(0,A.dispose)(this._provider),(0,A.dispose)(this._disposables)}_updateEnablement(){const i=this._configurationService.getValue("problems");if(i.decorations.enabled!==this._enabled)if(this._enabled=i.decorations.enabled,this._enabled){const f=new C(this._markerService);this._provider=this._decorationsService.registerDecorationsProvider(f)}else this._provider&&(this._enabled=i.decorations.enabled,this._provider.dispose())}};r=we([F(0,p.IMarkerService),F(1,R.IDecorationsService),F(2,b.IConfigurationService)],r),E.Registry.as(S.Extensions.Configuration).registerConfiguration({id:"problems",order:101,type:"object",properties:{"problems.decorations.enabled":{description:(0,k.localize)(3,null),type:"boolean",default:!0}}}),E.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(r,3)}),define(ae[2616],le([1,0,11,2,60,22,18,9,17,44,87,101,64,448,162,142,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class extends p.Disposable{constructor(n,a,o){super(),this._debugService=n,this._editorService=o;const g=new R.ResourceMap;this._register(a.onWillAddNotebookDocument(h=>{g.set(h.uri,h.onWillAddRemoveCells(v=>{const m=this._debugService.getModel();if(!!m.getBreakpoints().length&&v.rawEvent.kind===r.NotebookCellsChangeType.ModelChange)for(const w of v.rawEvent.changes){const[D,y]=w;if(y>0){const T=h.cells.slice(D,D+y);for(const _ of T)m.getBreakpoints({uri:_.uri}).forEach(M=>this._debugService.removeBreakpoints(M.getId()))}}}))})),this._register(a.onWillRemoveNotebookDocument(h=>{this.updateBreakpoints(h),g.get(h.uri)?.dispose(),g.delete(h.uri)})),this._register(this._debugService.getModel().onDidChangeBreakpoints(h=>{const v=h?.added?.find(m=>"uri"in m&&m.uri.scheme===A.Schemas.vscodeNotebookCell);if(v){const m=r.CellUri.parse(v.uri);if(!m)return;const w=(0,C.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);if(!w||!w.hasModel()||w.textModel.uri.toString()!==m.notebook.toString())return;const D=w.getCellByHandle(m.handle);if(!D)return;w.focusElement(D)}}))}updateBreakpoints(n){const a=this._debugService.getModel().getBreakpoints();if(!a.length||!n.cells.length)return;const o=new R.ResourceMap;n.cells.forEach((g,h)=>{o.set(g.uri,h)}),a.forEach(g=>{const h=o.get(g.uri);if(typeof h!="number")return;const v=r.CellUri.parse(g.uri)?.notebook;if(!v)return;const m=r.CellUri.generate(v,h);(0,k.isEqual)(m,g.uri)||(this._debugService.removeBreakpoints(g.getId()),this._debugService.addBreakpoints(m,[{column:g.column,condition:g.condition,enabled:g.enabled,hitCondition:g.hitCondition,logMessage:g.logMessage,lineNumber:g.lineNumber}]))})}};l=we([F(0,S.IDebugService),F(1,f.INotebookService),F(2,c.IEditorService)],l),I.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(l,3);let s=class extends p.Disposable{constructor(n,a){super(),this._debugService=n,this._notebookExecutionStateService=a,this._pausedCells=new Set,this._register(n.getModel().onDidChangeCallStack(()=>{this.onDidChangeCallStack(!0),this._scheduler.schedule()})),this._scheduler=this._register(new t.RunOnceScheduler(()=>this.onDidChangeCallStack(!1),2e3))}async onDidChangeCallStack(n){const a=new Set;for(const o of this._debugService.getModel().getSessions())for(const g of o.getAllThreads()){let h=g.getCallStack();n&&!h.length&&(h=g.getStaleCallStack()),h.forEach(v=>{r.CellUri.parse(v.source.uri)&&(a.add(v.source.uri.toString()),this.editIsPaused(v.source.uri,!0))})}for(const o of this._pausedCells)a.has(o)||(this.editIsPaused(E.URI.parse(o),!1),this._pausedCells.delete(o));a.forEach(o=>this._pausedCells.add(o))}editIsPaused(n,a){if(r.CellUri.parse(n)){const g=this._notebookExecutionStateService.getCellExecution(n);g&&(g.isPaused!==a||!g.didPause)&&g.update([{editType:u.CellExecutionUpdateType.ExecutionState,didPause:!0,isPaused:a}])}}};s=we([F(0,S.IDebugService),F(1,i.INotebookExecutionStateService)],s),I.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(s,3)}),define(ae[2617],le([1,0,2,60,42,1750,8,5,38,17,44,101,385,64,228,142,294]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let l=class{constructor(a,o){this._notebookService=a,this._languageService=o,this.viewType="*"}async provideCellStatusBarItems(a,o,g){const v=this._notebookService.getNotebookTextModel(a)?.cells[o];if(!v)return;const m=v.cellKind===u.CellKind.Markup?"markdown":this._languageService.getLanguageIdByLanguageName(v.language)||v.language;return{items:[{text:this._languageService.getLanguageName(m)||m,command:C.CHANGE_CELL_LANGUAGE,tooltip:(0,A.localize)(0,null),alignment:2,priority:-Number.MAX_SAFE_INTEGER}]}}};l=we([F(0,f.INotebookService),F(1,R.ILanguageService)],l);let s=class{constructor(a,o,g,h,v,m){this._notebookService=a,this._notebookKernelService=o,this._languageService=g,this._configurationService=h,this._languageDetectionService=v,this._keybindingService=m,this.viewType="*",this.cache=new p.ResourceMap}async provideCellStatusBarItems(a,o,g){const h=this._notebookService.getNotebookTextModel(a),v=h?.cells[o];if(!v)return;const m=this._configurationService.getValue("workbench.editor.languageDetectionHints");if(!(typeof m=="object"&&m?.notebookEditors))return;const D=v.uri,y=v.textModel?.getVersionId();if(!y)return;const T=v.cellKind===u.CellKind.Markup?"markdown":this._languageService.getLanguageIdByLanguageName(v.language)||v.language;this.cache.has(D)||this.cache.set(D,{cellLanguage:T,updateTimestamp:0,contentVersion:1});const _=this.cache.get(D);if(_.cellLanguage!==T||_.updateTimestamp<Date.now()-1e3&&_.contentVersion!==y){_.updateTimestamp=Date.now(),_.cellLanguage=T,_.contentVersion=y;const M=this._notebookKernelService.getSelectedOrSuggestedKernel(h);if(M){const O=[...M.supportedLanguages,"markdown"];_.guess=await this._languageDetectionService.detectLanguage(v.uri,O)}}const L=[];if(_.guess&&T!==_.guess){const M=this._languageService.getLanguageName(_.guess)||_.guess;let O=(0,A.localize)(1,null,M);const P=this._keybindingService.lookupKeybinding(C.DETECT_CELL_LANGUAGE)?.getLabel();P&&(O+=` (${P})`),L.push({text:"$(lightbulb-autofix)",command:C.DETECT_CELL_LANGUAGE,tooltip:O,alignment:2,priority:-Number.MAX_SAFE_INTEGER+1})}return{items:L}}};s=we([F(0,f.INotebookService),F(1,i.INotebookKernelService),F(2,R.ILanguageService),F(3,k.IConfigurationService),F(4,c.ILanguageDetectionService),F(5,I.IKeybindingService)],s);let d=class extends t.Disposable{constructor(a,o){super(),[l,s].forEach(h=>{this._register(o.registerCellStatusBarItemProvider(a.createInstance(h)))})}};d=we([F(0,E.IInstantiationService),F(1,r.INotebookCellStatusBarService)],d),b.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(d,3)}),define(ae[2618],le([1,0,2,1757,15,31,8,7,17,23,70,44,187,152,64,258,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookGettingStarted=void 0;const l="hasOpenedNotebook",s="hasShownNotebookGettingStarted";let d=class extends t.Disposable{constructor(a,o,g,h,v){super();const m=u.HAS_OPENED_NOTEBOOK.bindTo(g),w=new r.Memento("notebookGettingStarted2",o),D=w.getMemento(0,0);D[l]&&m.set(!0);const y=v.getValue(i.NotebookSetting.openGettingStarted)&&!D[s];if(!D[l]||y){const T=()=>{m.set(!0),D[l]=!0,y&&(h.executeCommand("workbench.action.openWalkthrough",{category:"notebooks",step:"notebookProfile"},!0),D[s]=!0),w.saveMemento()};if(a.activeEditor?.typeId===f.NotebookEditorInput.ID){T();return}const _=this._register(a.onDidActiveEditorChange(()=>{a.activeEditor?.typeId===f.NotebookEditorInput.ID&&(_.dispose(),T())}))}}};d=we([F(0,c.IEditorService),F(1,b.IStorageService),F(2,E.IContextKeyService),F(3,A.ICommandService),F(4,k.IConfigurationService)],d),e.NotebookGettingStarted=d,I.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(d,3),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"workbench.notebook.layout.gettingStarted",title:{value:(0,p.localize)(0,null),original:"Reset notebook getting started"},f1:!0,precondition:E.ContextKeyExpr.equals(`config.${i.NotebookSetting.openGettingStarted}`,!0),category:S.Categories.Developer})}run(a){const o=a.get(b.IStorageService),g=new r.Memento("notebookGettingStarted",o),h=g.getMemento(0,0);h[l]=void 0,g.saveMemento()}})}),define(ae[2619],le([1,0,17,44,799,64,124,8]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let I=class{constructor(S,C,r){this._markerService=S,this._configService=r,this._dispoables=C.registerProvider(this)}dispose(){this._dispoables.dispose()}getMarkerList(S){if(!S)return;const C=A.CellUri.parse(S);if(!!C)return new R.MarkerList(r=>A.CellUri.parse(r)?.notebook.toString()===C.notebook.toString(),this._markerService,this._configService)}};I=we([F(0,k.IMarkerService),F(1,R.IMarkerNavigationService),F(2,E.IConfigurationService)],I),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(I,2)}),define(ae[2620],le([1,0,2,17,1761,15,8,64,317,44]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookProfileContribution=e.NotebookProfileType=void 0;var S;(function(c){c.default="default",c.jupyter="jupyter",c.colab="colab"})(S=e.NotebookProfileType||(e.NotebookProfileType={}));const C={[S.default]:{[E.NotebookSetting.focusIndicator]:"gutter",[E.NotebookSetting.insertToolbarLocation]:"both",[E.NotebookSetting.globalToolbar]:!0,[E.NotebookSetting.cellToolbarLocation]:{default:"right"},[E.NotebookSetting.compactView]:!0,[E.NotebookSetting.showCellStatusBar]:"visible",[E.NotebookSetting.consolidatedRunButton]:!0,[E.NotebookSetting.undoRedoPerCell]:!1},[S.jupyter]:{[E.NotebookSetting.focusIndicator]:"gutter",[E.NotebookSetting.insertToolbarLocation]:"notebookToolbar",[E.NotebookSetting.globalToolbar]:!0,[E.NotebookSetting.cellToolbarLocation]:{default:"left"},[E.NotebookSetting.compactView]:!0,[E.NotebookSetting.showCellStatusBar]:"visible",[E.NotebookSetting.consolidatedRunButton]:!1,[E.NotebookSetting.undoRedoPerCell]:!0},[S.colab]:{[E.NotebookSetting.focusIndicator]:"border",[E.NotebookSetting.insertToolbarLocation]:"betweenCells",[E.NotebookSetting.globalToolbar]:!1,[E.NotebookSetting.cellToolbarLocation]:{default:"right"},[E.NotebookSetting.compactView]:!1,[E.NotebookSetting.showCellStatusBar]:"hidden",[E.NotebookSetting.consolidatedRunButton]:!0,[E.NotebookSetting.undoRedoPerCell]:!1}};async function r(c,l){const s=[];for(const d in l)s.push(c.updateValue(d,l[d]));await Promise.all(s)}(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"notebook.setProfile",title:(0,R.localize)(0,null)})}async run(c,l){if(!u(l))return;const s=c.get(k.IConfigurationService);return r(s,C[l.profile])}});function u(c){const l=c;return l.profile===S.colab||l.profile===S.default||l.profile===S.jupyter}let i=class extends t.Disposable{constructor(l,s){super(),this.experimentService=s,this.experimentService&&this.experimentService.getTreatment("notebookprofile").then(d=>{if(d!==void 0){const n=l.getValue(E.NotebookSetting.focusIndicator),a=l.getValue(E.NotebookSetting.insertToolbarLocation),o=l.getValue(E.NotebookSetting.globalToolbar),g=l.getValue(E.NotebookSetting.compactView),h=l.getValue(E.NotebookSetting.showCellStatusBar),v=l.getValue(E.NotebookSetting.consolidatedRunButton);n==="border"&&a==="both"&&o===!1&&g===!0&&h==="visible"&&v===!0&&r(l,C[d]??C[S.default])}})}};i=we([F(0,k.IConfigurationService),F(1,I.IWorkbenchAssignmentService)],i),e.NotebookProfileContribution=i,p.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(i,2)}),define(ae[2621],le([1,0,2,17,44,64,24,101,40]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let b=class extends t.Disposable{constructor(r){super(),this._editorService=r;const u=105;this._register(I.UndoCommand.addImplementation(u,"notebook-undo-redo",()=>{const i=(0,E.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),f=i?._getViewModel();return i&&i.hasModel()&&f?f.undo().then(c=>{if(c?.length){for(let l=0;l<i.getLength();l++){const s=i.cellAt(l);s.cellKind===A.CellKind.Markup&&c.find(d=>d.fragment===s.model.uri.fragment)&&s.updateEditState(E.CellEditState.Editing,"undo")}i?.setOptions({cellOptions:{resource:c[0]},preserveFocus:!0})}}):!1})),this._register(I.RedoCommand.addImplementation(u,"notebook-undo-redo",()=>{const i=(0,E.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),f=i?._getViewModel();return i&&i.hasModel()&&f?f.redo().then(c=>{if(c?.length){for(let l=0;l<i.getLength();l++){const s=i.cellAt(l);s.cellKind===A.CellKind.Markup&&c.find(d=>d.fragment===s.model.uri.fragment)&&s.updateEditState(E.CellEditState.Editing,"redo")}i?.setOptions({cellOptions:{resource:c[0]},preserveFocus:!0})}}):!1}))}};b=we([F(0,k.IEditorService)],b),p.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(b,2)}),define(ae[2622],le([1,0,21,6,2,1778,5,26,941,120,69,82,100,23,187,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isNotebookKeymapExtension=e.NotebookKeymapService=void 0;function c(n){const a=n.get(C.IExtensionManagementService),o=n.get(b.IWorkbenchExtensionEnablementService),g=p.Event.chain(a.onDidInstallExtensions).filter(h=>h.some(({operation:v})=>v===2)).map(h=>h.map(({identifier:v})=>v)).event;return p.Event.debounce(p.Event.any(p.Event.chain(p.Event.any(g,p.Event.map(a.onDidUninstallExtension,h=>[h.identifier]))).event,p.Event.map(o.onEnablementChanged,h=>h.map(v=>v.identifier))),(h,v)=>{h=h||(v.length?[v[0]]:[]);for(const m of v)h.some(w=>!(0,r.areSameExtensions)(w,m))&&h.push(m);return h})}const l="hasRecommendedKeymap";let s=class extends R.Disposable{constructor(a,o,g,h,v){super(),this.instantiationService=a,this.extensionEnablementService=o,this.notificationService=g,this.notebookKeymapMemento=new i.Memento("notebookKeymap",h),this.notebookKeymap=this.notebookKeymapMemento.getMemento(0,0),this._register(v.onDidShutdown(()=>this.dispose())),this._register(this.instantiationService.invokeFunction(c)(m=>{Promise.all(m.map(w=>this.checkForOtherKeymaps(w))).then(void 0,t.onUnexpectedError)}))}checkForOtherKeymaps(a){return this.instantiationService.invokeFunction(I.getInstalledExtensions).then(o=>{const g=o.filter(v=>d(v)),h=g.find(v=>(0,r.areSameExtensions)(v.identifier,a));if(h&&h.globallyEnabled){this.notebookKeymap[l]=!0,this.notebookKeymapMemento.saveMemento();const v=g.filter(m=>!(0,r.areSameExtensions)(m.identifier,a)&&m.globallyEnabled);if(v.length)return this.promptForDisablingOtherKeymaps(h,v)}})}promptForDisablingOtherKeymaps(a,o){const g=h=>{h&&this.extensionEnablementService.setEnablement(o.map(v=>v.local),6)};this.notificationService.prompt(E.Severity.Info,(0,A.localize)(0,null,(0,f.distinct)(o.map(h=>h.local.manifest.displayName)).map(h=>`'${h}'`).join(", ")),[{label:(0,A.localize)(1,null),run:()=>g(!0)},{label:(0,A.localize)(2,null),run:()=>g(!1)}])}};s=we([F(0,k.IInstantiationService),F(1,b.IWorkbenchExtensionEnablementService),F(2,E.INotificationService),F(3,u.IStorageService),F(4,S.ILifecycleService)],s),e.NotebookKeymapService=s;function d(n){if(n.local.manifest.extensionPack)return!1;const a=n.local.manifest.keywords;return a?a.indexOf("notebook-keymap")!==-1:!1}e.isNotebookKeymapExtension=d}),define(ae[942],le([1,0,6,2,160,20,370,546,101,449]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseCellViewModel=void 0;class S extends p.Disposable{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 R.Mimes.markdown;default:return R.Mimes.text}}get lineNumbers(){return this._lineNumbers}set lineNumbers(r){r!==this._lineNumbers&&(this._lineNumbers=r,this._onDidChangeState.fire({cellLineNumberChanged:!0}))}get focusMode(){return this._focusMode}set focusMode(r){this._focusMode!==r&&(this._focusMode=r,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(r){this._dragging=r,this._onDidChangeState.fire({dragStateChanged:!0})}get isInputCollapsed(){return this._inputCollapsed}set isInputCollapsed(r){this._inputCollapsed=r,this._onDidChangeState.fire({inputCollapsedChanged:!0})}get isOutputCollapsed(){return this._outputCollapsed}set isOutputCollapsed(r){this._outputCollapsed=r,this._onDidChangeState.fire({outputCollapsedChanged:!0})}constructor(r,u,i,f,c,l,s,d){super(),this.viewType=r,this.model=u,this.id=i,this._viewContext=f,this._configurationService=c,this._modelService=l,this._undoRedoService=s,this._codeEditorService=d,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._isDisposed=!1,this._editStateSource="",this._register(u.onDidChangeMetadata(()=>{this._onDidChangeState.fire({metadataChanged:!0})})),this._register(u.onDidChangeInternalMetadata(n=>{this._onDidChangeState.fire({internalMetadataChanged:!0}),n.lastRunSuccessChanged&&this.layoutChange({})})),this._register(this._configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration("notebook.lineNumbers")&&(this.lineNumbers="inherit")})),this.model.collapseState?.inputCollapsed&&(this._inputCollapsed=!0),this.model.collapseState?.outputCollapsed&&(this._outputCollapsed=!0)}assertTextModelAttached(){return!!(this.textModel&&this._textEditor&&this._textEditor.getModel()===this.textModel)}attachTextEditor(r,u){if(!r.hasModel())throw new Error("Invalid editor: model is missing");if(this._textEditor===r){this._editorListeners.length===0&&(this._editorListeners.push(this._textEditor.onDidChangeCursorSelection(()=>{this._onDidChangeState.fire({selectionChanged:!0})})),this._onDidChangeState.fire({selectionChanged:!0}));return}this._textEditor=r,this._editorViewStates?this._restoreViewState(this._editorViewStates):u&&this._restoreViewState({contributionsState:{},cursorState:[],viewState:{scrollLeft:0,firstPosition:{lineNumber:1,column:1},firstPositionDeltaTop:(0,b.getEditorTopPadding)()}}),this._editorTransientState&&(0,E.writeTransientState)(r.getModel(),this._editorTransientState,this._codeEditorService),this._textEditor.changeDecorations(i=>{this._resolvedDecorations.forEach((f,c)=>{if(c.startsWith("_lazy_")){const l=i.addDecoration(f.options.range,f.options.options);this._resolvedDecorations.get(c).id=l}else{const l=i.addDecoration(f.options.range,f.options.options);this._resolvedDecorations.get(c).id=l}})}),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._textEditor?.changeDecorations(r=>{this._resolvedDecorations.forEach(u=>{const i=u.id;i&&r.removeDecoration(i)})}),this._textEditor=void 0,(0,p.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,E.readTransientState)(this._textEditor.getModel(),this._codeEditorService))}saveEditorViewState(){return this._textEditor&&(this._editorViewStates=this._textEditor.saveViewState()),this._editorViewStates}restoreEditorViewState(r,u){this._editorViewStates=r}_restoreViewState(r){r&&this._textEditor?.restoreViewState(r)}addModelDecoration(r){if(!this._textEditor){const i=++this._lastDecorationId,f=`_lazy_${this.id};${i}`;return this._resolvedDecorations.set(f,{options:r}),f}let u;return this._textEditor.changeDecorations(i=>{u=i.addDecoration(r.range,r.options),this._resolvedDecorations.set(u,{id:u,options:r})}),u}removeModelDecoration(r){const u=this._resolvedDecorations.get(r);this._textEditor&&u&&u.id!==void 0&&this._textEditor.changeDecorations(i=>{i.removeDecoration(u.id)}),this._resolvedDecorations.delete(r)}deltaModelDecorations(r,u){return r.forEach(f=>{this.removeModelDecoration(f)}),u.map(f=>this.addModelDecoration(f))}_removeCellDecoration(r){const u=this._resolvedCellDecorations.get(r);u&&(this._cellDecorationsChanged.fire({added:[],removed:[u]}),this._resolvedCellDecorations.delete(r))}_addCellDecoration(r){const u=++this._lastDecorationId,i=`_cell_${this.id};${u}`;return this._resolvedCellDecorations.set(i,r),this._cellDecorationsChanged.fire({added:[r],removed:[]}),i}getCellDecorations(){return[...this._resolvedCellDecorations.values()]}getCellDecorationRange(r){return this._textEditor?this._textEditor.getModel()?.getDecorationRange(r)??null:null}deltaCellDecorations(r,u){return r.forEach(f=>{this._removeCellDecoration(f)}),u.map(f=>this._addCellDecoration(f))}deltaCellStatusBarItems(r,u){r.forEach(f=>{this._cellStatusBarItems.get(f)&&this._cellStatusBarItems.delete(f)});const i=u.map(f=>{const c=++this._lastStatusBarId,l=`_cell_${this.id};${c}`;return this._cellStatusBarItems.set(l,f),l});return this._onDidChangeCellStatusBarItems.fire(),i}getCellStatusBarItems(){return Array.from(this._cellStatusBarItems.values())}revealRangeInCenter(r){this._textEditor?.revealRangeInCenter(r,1)}setSelection(r){this._textEditor?.setSelection(r)}setSelections(r){r.length&&this._textEditor?.setSelections(r)}getSelections(){return this._textEditor?.getSelections()||[]}getSelectionsStartPosition(){return this._textEditor?this._textEditor.getSelections()?.map(u=>u.getStartPosition()):this._editorViewStates?.cursorState?.map(u=>u.selectionStart)}getLineScrollTopOffset(r){if(!this._textEditor)return 0;const u=this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this._textEditor.getTopForLineNumber(r)+u.top}getPositionScrollTopOffset(r,u){if(!this._textEditor)return 0;const i=this._viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return this._textEditor.getTopForPosition(r,u)+i.top}cursorAtBoundary(){if(!this._textEditor||!this.textModel)return I.CursorAtBoundary.None;const r=this._textEditor.getSelection();if(!r||!r.isEmpty())return I.CursorAtBoundary.None;const u=this._textEditor.getTopForPosition(1,1),i=this._textEditor.getTopForPosition(this.textModel.getLineCount(),this.textModel.getLineLength(this.textModel.getLineCount())),f=this._textEditor.getTopForPosition(r.startLineNumber,r.startColumn);return f===i?f===u?I.CursorAtBoundary.Both:I.CursorAtBoundary.Bottom:f===u?I.CursorAtBoundary.Top:I.CursorAtBoundary.None}get editStateSource(){return this._editStateSource}updateEditState(r,u){this._editStateSource=u,r!==this._editState&&(this._editState=r,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._isDisposed)return this.textModel;if(!this._textModelRef)throw new Error(`Cannot resolve text model for ${this.uri}`);this._register(this.textModel.onDidChangeContent(()=>this.onDidChangeTextModelContent()))}return this.textModel}cellStartFind(r,u){let i=[];if(this.assertTextModelAttached())i=this.textModel.findMatches(r,!1,u.regex||!1,u.caseSensitive||!1,u.wholeWord&&u.wordSeparators||null,u.regex||!1);else{const f=this.textBuffer.getLineCount(),c=new A.Range(1,1,f,this.textBuffer.getLineLength(f)+1),s=new k.SearchParams(r,u.regex||!1,u.caseSensitive||!1,u.wholeWord&&u.wordSeparators||null).parseSearchRequest();if(!s)return null;i=this.textBuffer.findMatchesLineByLine(c,s,u.regex||!1,1e3)}return i}dispose(){this._isDisposed=!0,super.dispose(),(0,p.dispose)(this._editorListeners),this._undoRedoService.getUriComparisonKey(this.uri)===this.uri.toString()&&this._undoRedoService.removeElements(this.uri),this._textModelRef?.dispose()}toJSON(){return{handle:this.handle}}}e.BaseCellViewModel=S}),define(ae[547],le([1,0,6,2,72,75,62,365,8,156,101,871,64,142,942]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellViewModel=void 0;let f=class extends i.BaseCellViewModel{set editorHeight(l){this._editorHeight=l,this.layoutChange({editorHeight:!0},"CodeCellViewModel#editorHeight")}get editorHeight(){throw new Error("editorHeight is write-only")}set commentHeight(l){this._commentHeight!==l&&(this._commentHeight=l,this.layoutChange({commentHeight:!0},"CodeCellViewModel#commentHeight"))}get outputIsHovered(){return this._hoveringOutput}set outputIsHovered(l){this._hoveringOutput=l,this._onDidChangeState.fire({outputIsHoveredChanged:!0})}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(l){this._focusOnOutput=l,this._onDidChangeState.fire({outputIsFocusedChanged:!0})}get outputMinHeight(){return this._outputMinHeight}set outputMinHeight(l){this._outputMinHeight=l}get layoutInfo(){return this._layoutInfo}get outputsViewModels(){return this._outputViewModels}constructor(l,s,d,n,a,o,g,h,v){super(l,s,R.generateUuid(),n,a,g,h,v),this.viewContext=n,this._notebookService=o,this.cellKind=r.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(m=>new C.CellOutputViewModel(this,m,this._notebookService)),this._register(this.model.onDidChangeOutputs(m=>{const w=[];let D=!1;for(let y=m.start;y<m.start+m.deleteCount;y++)this._outputCollection[y]!==void 0&&this._outputCollection[y]!==0&&(D=!0);this._outputCollection.splice(m.start,m.deleteCount,...m.newOutputs.map(()=>0)),w.push(...this._outputViewModels.splice(m.start,m.deleteCount,...m.newOutputs.map(y=>new C.CellOutputViewModel(this,y,this._notebookService)))),this._outputsTop=null,this._onDidChangeOutputs.fire(m),this._onDidRemoveOutputs.fire(w),D&&this.layoutChange({outputHeight:!0},"CodeCellViewModel#model.onDidChangeOutputs"),(0,p.dispose)(w)})),this._outputCollection=new Array(this.model.outputs.length),this._layoutInfo={fontInfo:d?.fontInfo||null,editorHeight:0,editorWidth:d?this.viewContext.notebookOptions.computeCodeCellEditorWidth(d.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:S.CellLayoutState.Uninitialized,estimatedHasHorizontalScrolling:!1}}updateOptions(l){(l.cellStatusBarVisibility||l.insertToolbarPosition||l.cellToolbarLocation)&&this.layoutChange({})}pauseLayout(){this._pauseableEmitter.pause()}resumeLayout(){this._pauseableEmitter.resume()}layoutChange(l,s){this._ensureOutputsTop();const d=this.viewContext.notebookOptions.getLayoutConfiguration(),n=this.viewContext.notebookOptions.computeBottomToolbarDimensions(),a=l.outputShowMoreContainerHeight?l.outputShowMoreContainerHeight:this._layoutInfo.outputShowMoreContainerHeight,o=Math.max(this._outputMinHeight,this.isOutputCollapsed?d.collapsedIndicatorHeight:this._outputsTop.getTotalSum()),g=l.commentHeight?this._commentHeight:this._layoutInfo.commentHeight,h=this.layoutInfo;if(this.isInputCollapsed){const v=d.collapsedIndicatorHeight,m=o+a,w=d.cellTopMargin+d.collapsedIndicatorHeight,D=d.cellTopMargin+d.collapsedIndicatorHeight+d.cellBottomMargin+n.bottomToolbarGap+g+o+a,y=D-n.bottomToolbarGap-n.bottomToolbarHeight/2-a,T=this.viewContext.notebookOptions.computeBottomToolbarOffset(D,this.viewType),_=l.outerWidth!==void 0?this.viewContext.notebookOptions.computeCodeCellEditorWidth(l.outerWidth):this._layoutInfo?.editorWidth;this._layoutInfo={fontInfo:l.font??this._layoutInfo.fontInfo??null,editorHeight:this._layoutInfo.editorHeight,editorWidth:_,statusBarHeight:0,commentHeight:g,outputContainerOffset:w,outputTotalHeight:o,outputShowMoreContainerHeight:a,outputShowMoreContainerOffset:y,totalHeight:D,codeIndicatorHeight:v,outputIndicatorHeight:m,bottomToolbarOffset:T,layoutState:this._layoutInfo.layoutState,estimatedHasHorizontalScrolling:!1}}else{let v,m,w,D=!1;if(!l.editorHeight&&this._layoutInfo.layoutState===S.CellLayoutState.FromCache&&!l.outputHeight){const P=this.estimateEditorHeight(l.font?.lineHeight??this._layoutInfo.fontInfo?.lineHeight);m=P.editorHeight,D=P.hasHorizontalScrolling,w=this._layoutInfo.totalHeight,v=S.CellLayoutState.FromCache}else if(l.editorHeight||this._layoutInfo.layoutState===S.CellLayoutState.Measured)m=this._editorHeight,w=this.computeTotalHeight(this._editorHeight,o,a),v=S.CellLayoutState.Measured,D=this._layoutInfo.estimatedHasHorizontalScrolling;else{const P=this.estimateEditorHeight(l.font?.lineHeight??this._layoutInfo.fontInfo?.lineHeight);m=P.editorHeight,D=P.hasHorizontalScrolling,w=this.computeTotalHeight(m,o,a),v=S.CellLayoutState.Estimated}const y=this.viewContext.notebookOptions.computeEditorStatusbarHeight(this.internalMetadata,this.uri),T=m+y,_=o+a,L=d.editorToolbarHeight+d.cellTopMargin+m+y,M=w-n.bottomToolbarGap-n.bottomToolbarHeight/2-a,O=this.viewContext.notebookOptions.computeBottomToolbarOffset(w,this.viewType),N=l.outerWidth!==void 0?this.viewContext.notebookOptions.computeCodeCellEditorWidth(l.outerWidth):this._layoutInfo?.editorWidth;this._layoutInfo={fontInfo:l.font??this._layoutInfo.fontInfo??null,editorHeight:m,editorWidth:N,statusBarHeight:y,commentHeight:g,outputContainerOffset:L,outputTotalHeight:o,outputShowMoreContainerHeight:a,outputShowMoreContainerOffset:M,totalHeight:w,codeIndicatorHeight:T,outputIndicatorHeight:_,bottomToolbarOffset:O,layoutState:v,estimatedHasHorizontalScrolling:D}}this._fireOnDidChangeLayout({...l,totalHeight:this.layoutInfo.totalHeight!==h.totalHeight,source:s})}_fireOnDidChangeLayout(l){this._pauseableEmitter.fire(l)}restoreEditorViewState(l,s){super.restoreEditorViewState(l),s!==void 0&&this._layoutInfo.layoutState!==S.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:s,codeIndicatorHeight:this._layoutInfo.codeIndicatorHeight,outputIndicatorHeight:this._layoutInfo.outputIndicatorHeight,bottomToolbarOffset:this._layoutInfo.bottomToolbarOffset,layoutState:S.CellLayoutState.FromCache,estimatedHasHorizontalScrolling:this._layoutInfo.estimatedHasHorizontalScrolling})}hasDynamicHeight(){return!1}getDynamicHeight(){return this._onLayoutInfoRead.fire(),this._layoutInfo.totalHeight}getHeight(l){if(this._layoutInfo.layoutState===S.CellLayoutState.Uninitialized){const s=this.estimateEditorHeight(l);return this.computeTotalHeight(s.editorHeight,0,0)}else return this._layoutInfo.totalHeight}estimateEditorHeight(l=20){let s=!1;const d=this.viewContext.getBaseCellEditorOptions(this.language);if(this.layoutInfo.fontInfo&&d.value.wordWrap==="off"){for(let g=0;g<this.lineCount;g++)if(this.textBuffer.getLineLastNonWhitespaceColumn(g+1)*(this.layoutInfo.fontInfo.typicalHalfwidthCharacterWidth+this.layoutInfo.fontInfo.letterSpacing)>this.layoutInfo.editorWidth){s=!0;break}}const n=s?12:0,a=this.viewContext.notebookOptions.computeEditorPadding(this.internalMetadata,this.uri);return{editorHeight:this.lineCount*l+a.top+a.bottom+n,hasHorizontalScrolling:s}}computeTotalHeight(l,s,d){const n=this.viewContext.notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:a}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);return n.editorToolbarHeight+n.cellTopMargin+l+this.viewContext.notebookOptions.computeEditorStatusbarHeight(this.internalMetadata,this.uri)+this._commentHeight+s+d+a+n.cellBottomMargin}onDidChangeTextModelContent(){this.getEditState()!==S.CellEditState.Editing&&(this.updateEditState(S.CellEditState.Editing,"onDidChangeTextModelContent"),this._onDidChangeState.fire({contentChanged:!0}))}onDeselect(){this.updateEditState(S.CellEditState.Preview,"onDeselect")}updateOutputShowMoreContainerHeight(l){this.layoutChange({outputShowMoreContainerHeight:l},"CodeCellViewModel#updateOutputShowMoreContainerHeight")}updateOutputMinHeight(l){this.outputMinHeight=l}unlockOutputHeight(){this.outputMinHeight=0,this.layoutChange({outputHeight:!0})}updateOutputHeight(l,s,d){if(l>=this._outputCollection.length)throw new Error("Output index out of range!");this._ensureOutputsTop(),s<28&&this._outputViewModels[l].hasMultiMimeType()&&(s=28),this._outputCollection[l]=s,this._outputsTop.setValue(l,s)&&this.layoutChange({outputHeight:!0},d)}getOutputOffsetInContainer(l){if(this._ensureOutputsTop(),l>=this._outputCollection.length)throw new Error("Output index out of range!");return this._outputsTop.getPrefixSum(l-1)}getOutputOffset(l){return this.layoutInfo.outputContainerOffset+this.getOutputOffsetInContainer(l)}spliceOutputHeights(l,s,d){if(this._ensureOutputsTop(),this._outputsTop.removeValues(l,s),d.length){const n=new Uint32Array(d.length);for(let a=0;a<d.length;a++)n[a]=d[a];this._outputsTop.insertValues(l,n)}this.layoutChange({outputHeight:!0},"CodeCellViewModel#spliceOutputs")}_ensureOutputsTop(){if(!this._outputsTop){const l=new Uint32Array(this._outputCollection.length);for(let s=0;s<this._outputCollection.length;s++)l[s]=this._outputCollection[s];this._outputsTop=new E.PrefixSumComputer(l)}}startFind(l,s){const d=super.cellStartFind(l,s);return d===null?null:{cell:this,matches:d,modelMatchCount:d.length}}dispose(){super.dispose(),this._outputCollection=[],this._outputsTop=null,(0,p.dispose)(this._outputViewModels)}};f=we([F(4,I.IConfigurationService),F(5,u.INotebookService),F(6,k.ITextModelService),F(7,b.IUndoRedoService),F(8,A.ICodeEditorService)],f),e.CodeCellViewModel=f}),define(ae[2623],le([1,0,10,90,416,117,6,210,2,362,31,5,26,27,12,101,175,547]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellEditorStatusBar=void 0;const s=t.$;let d=class extends c.CellPart{constructor(o,g,h,v,m,w){super(),this._notebookEditor=o,this._cellContainer=g,this._editor=v,this._instantiationService=m,this._themeService=w,this.leftItems=[],this.rightItems=[],this.width=0,this._onDidClick=this._register(new k.Emitter),this.onDidClick=this._onDidClick.event,this.statusBarContainer=t.append(h,s(".cell-statusbar-container")),this.statusBarContainer.tabIndex=-1;const D=t.append(this.statusBarContainer,s(".cell-status-left")),y=t.append(this.statusBarContainer,s(".cell-status-right"));this.leftItemsContainer=t.append(D,s(".cell-contributed-items.cell-contributed-items-left")),this.rightItemsContainer=t.append(y,s(".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===D||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(o){if(this.updateContext({ui:!0,cell:o,notebookEditor:this._notebookEditor,$mid:12}),this._editor){const g=()=>{o.focusMode=this._editor&&(this._editor.hasWidgetFocus()||document.activeElement&&this.statusBarContainer.contains(document.activeElement))?f.CellFocusMode.Editor:f.CellFocusMode.Container};this.cellDisposables.add(this._editor.onDidFocusEditorWidget(()=>{g()})),this.cellDisposables.add(this._editor.onDidBlurEditorWidget(()=>{this._notebookEditor.hasEditorFocus()&&!(document.activeElement&&this.statusBarContainer.contains(document.activeElement))&&g()})),this.cellDisposables.add(this.onDidClick(h=>{if(this.currentCell instanceof l.CodeCellViewModel&&h.type!==2&&this._editor){const v=this._editor.getTargetAtClientPoint(h.event.clientX,h.event.clientY-this._notebookEditor.notebookOptions.computeEditorStatusbarHeight(this.currentCell.internalMetadata,this.currentCell.uri));v?.position&&(this._editor.setPosition(v.position),this._editor.focus())}}))}}updateInternalLayoutNow(o){this._cellContainer.classList.toggle("cell-statusbar-hidden",this._notebookEditor.notebookOptions.computeEditorStatusbarHeight(o.internalMetadata,o.uri)===0);const h=o.layoutInfo.editorWidth;if(!h)return;this.width=h,this.statusBarContainer.style.width=`${h}px`;const v=this.getMaxItemWidth();this.leftItems.forEach(m=>m.maxWidth=v),this.rightItems.forEach(m=>m.maxWidth=v)}getMaxItemWidth(){return this.width/2}updateContext(o){this.currentContext=o,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 o=this.currentContext.notebookEditor.getActiveCell()===this.currentContext?.cell;this.statusBarContainer.classList.toggle("is-active-cell",o)}updateRenderedItems(){const o=this.currentContext.cell.getCellStatusBarItems();o.sort((w,D)=>(D.priority??0)-(w.priority??0));const g=this.getMaxItemWidth(),h=o.filter(w=>w.alignment===1),v=o.filter(w=>w.alignment===2).reverse(),m=(w,D,y)=>{if(w.length>D.length){const T=w.splice(D.length,w.length-D.length);for(const _ of T)y.removeChild(_.container),_.dispose()}D.forEach((T,_)=>{const L=w[_];if(L)L.updateItem(T,g);else{const M=this._instantiationService.createInstance(n,this.currentContext,T,g);w.push(M),y.appendChild(M.container)}})};m(this.leftItems,h,this.leftItemsContainer),m(this.rightItems,v,this.rightItemsContainer)}dispose(){super.dispose(),(0,I.dispose)(this.leftItems),(0,I.dispose)(this.rightItems)}};d=we([F(4,C.IInstantiationService),F(5,i.IThemeService)],d),e.CellEditorStatusBar=d;let n=class extends I.Disposable{set maxWidth(o){this.container.style.maxWidth=o+"px"}constructor(o,g,h,v,m,w,D){super(),this._context=o,this._telemetryService=v,this._commandService=m,this._notificationService=w,this._themeService=D,this.container=s(".cell-status-item"),this._itemDisposables=this._register(new I.DisposableStore),this.updateItem(g,h)}updateItem(o,g){this._itemDisposables.clear(),(!this._currentItem||this._currentItem.text!==o.text)&&(new R.SimpleIconLabel(this.container).text=o.text.replace(/\n/g," "));const h=w=>(0,b.isThemeColor)(w)?this._themeService.getColorTheme().getColor(w.id)?.toString()||"":w;this.container.style.color=o.color?h(o.color):"",this.container.style.backgroundColor=o.backgroundColor?h(o.backgroundColor):"",this.container.style.opacity=o.opacity?o.opacity:"",this.container.classList.toggle("cell-status-item-show-when-active",!!o.onlyShowWhenActive),typeof g=="number"&&(this.maxWidth=g);let v,m;o.accessibilityInformation?(v=o.accessibilityInformation.label,m=o.accessibilityInformation.role):v=o.text?(0,E.stripIcons)(o.text).trim():"",this.container.setAttribute("aria-label",v),this.container.setAttribute("role",m||""),this.container.title=o.tooltip??"",this.container.classList.toggle("cell-status-item-has-command",!!o.command),o.command?(this.container.tabIndex=0,this._itemDisposables.add(t.addDisposableListener(this.container,t.EventType.CLICK,w=>{this.executeCommand()})),this._itemDisposables.add(t.addDisposableListener(this.container,t.EventType.KEY_DOWN,w=>{const D=new p.StandardKeyboardEvent(w);(D.equals(10)||D.equals(3))&&this.executeCommand()}))):this.container.removeAttribute("tabIndex"),this._currentItem=o}async executeCommand(){const o=this._currentItem.command;if(!o)return;const g=typeof o=="string"?o:o.id,h=typeof o=="string"?[]:o.arguments??[];(typeof o=="string"||!o.arguments||!Array.isArray(o.arguments)||o.arguments.length===0)&&h.unshift(this._context),this._telemetryService.publicLog2("workbenchActionExecuted",{id:g,from:"cell status bar"});try{await this._commandService.executeCommand(g,...h)}catch(v){this._notificationService.error((0,A.toErrorMessage)(v))}}};n=we([F(3,u.ITelemetryService),F(4,S.ICommandService),F(5,r.INotificationService),F(6,i.IThemeService)],n)}),define(ae[461],le([1,0,6,72,8,101,942,64,62,156,75,529]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkupCellViewModel=void 0;let r=class extends k.BaseCellViewModel{get renderedHtml(){return this._renderedHtml}set renderedHtml(i){this._renderedHtml!==i&&(this._renderedHtml=i,this._onDidChangeState.fire({contentChanged:!0}))}get layoutInfo(){return this._layoutInfo}set renderedMarkdownHeight(i){this._previewHeight=i,this._updateTotalHeight(this._computeTotalHeight())}set editorHeight(i){this._editorHeight=i,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(i){this._hoveringOutput=i}get outputIsFocused(){return this._focusOnOutput}set outputIsFocused(i){this._focusOnOutput=i}get cellIsHovered(){return this._hoveringCell}set cellIsHovered(i){this._hoveringCell=i,this._onDidChangeState.fire({cellIsHoveredChanged:!0})}constructor(i,f,c,l,s,d,n,a,o){super(i,f,p.generateUuid(),s,d,n,a,o),this.foldingDelegate=l,this.viewContext=s,this.cellKind=E.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:g}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType);this._layoutInfo={editorHeight:0,previewHeight:0,fontInfo:c?.fontInfo||null,editorWidth:c?.width?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(c.width):0,bottomToolbarOffset:g,totalHeight:100,layoutState:A.CellLayoutState.Uninitialized,foldHintHeight:0,statusBarHeight:0},this._register(this.onDidChangeState(h=>{this.viewContext.eventDispatcher.emit([new C.NotebookCellStateChangedEvent(h,this.model)]),h.foldingStateChanged&&this._updateTotalHeight(this._computeTotalHeight(),A.CellLayoutContext.Fold)}))}_computeTotalHeight(){const i=this.viewContext.notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:f}=this.viewContext.notebookOptions.computeBottomToolbarDimensions(this.viewType),c=this._computeFoldHintHeight();return this.getEditState()===A.CellEditState.Editing?this._editorHeight+i.markdownCellTopMargin+i.markdownCellBottomMargin+f+this._statusBarHeight:Math.max(1,this._previewHeight+f+c)}_computeFoldHintHeight(){return this.getEditState()===A.CellEditState.Editing||this.foldingState!==2?0:this.viewContext.notebookOptions.getLayoutConfiguration().markdownFoldHintHeight}updateOptions(i){(i.cellStatusBarVisibility||i.insertToolbarPosition||i.cellToolbarLocation)&&this._updateTotalHeight(this._computeTotalHeight())}getOutputOffset(i){return-1}updateOutputHeight(i,f){}triggerFoldingStateChange(){this._onDidChangeState.fire({foldingStateChanged:!0})}_updateTotalHeight(i,f){i!==this.layoutInfo.totalHeight&&this.layoutChange({totalHeight:i,context:f})}layoutChange(i){const f=this._computeFoldHintHeight();if(this.isInputCollapsed){const c=i.outerWidth!==void 0?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(i.outerWidth):this._layoutInfo.editorWidth,l=this.viewContext.notebookOptions.computeCollapsedMarkdownCellHeight(this.viewType);i.totalHeight=l,this._layoutInfo={fontInfo:i.font||this._layoutInfo.fontInfo,editorWidth:c,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,previewHeight:this._previewHeight,bottomToolbarOffset:this.viewContext.notebookOptions.computeBottomToolbarOffset(l,this.viewType),totalHeight:l,layoutState:A.CellLayoutState.Measured,foldHintHeight:0}}else{const c=i.outerWidth!==void 0?this.viewContext.notebookOptions.computeMarkdownCellEditorWidth(i.outerWidth):this._layoutInfo.editorWidth,l=i.totalHeight===void 0?this._layoutInfo.layoutState===A.CellLayoutState.Uninitialized?100:this._layoutInfo.totalHeight:i.totalHeight,s=this._previewHeight;this._layoutInfo={fontInfo:i.font||this._layoutInfo.fontInfo,editorWidth:c,previewHeight:s,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,bottomToolbarOffset:this.viewContext.notebookOptions.computeBottomToolbarOffset(l,this.viewType),totalHeight:l,layoutState:A.CellLayoutState.Measured,foldHintHeight:f}}this._onDidChangeLayout.fire(i)}restoreEditorViewState(i,f){super.restoreEditorViewState(i),f!==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:f,editorHeight:this._editorHeight,statusBarHeight:this._statusBarHeight,layoutState:A.CellLayoutState.FromCache,foldHintHeight:this._layoutInfo.foldHintHeight},this.layoutChange({}))}hasDynamicHeight(){return!1}getDynamicHeight(){return null}getHeight(i){return this._layoutInfo.layoutState===A.CellLayoutState.Uninitialized?100:this._layoutInfo.totalHeight}onDidChangeTextModelContent(){this._onDidChangeState.fire({contentChanged:!0})}onDeselect(){}startFind(i,f){const c=super.cellStartFind(i,f);return c===null?null:{cell:this,matches:c,modelMatchCount:c.length}}dispose(){super.dispose(),this.foldingDelegate=null}};r=we([F(5,R.IConfigurationService),F(6,I.ITextModelService),F(7,b.IUndoRedoService),F(8,S.ICodeEditorService)],r),e.MarkupCellViewModel=r}),define(ae[943],le([1,0,2,7,5,101,175,547,461,64,152,162]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellContextKeyManager=e.CellContextKeyPart=void 0;let r=class extends k.CellPart{constructor(f,c){super(),this.instantiationService=c,this.cellContextKeyManager=this._register(this.instantiationService.createInstance(u,f,void 0))}didRenderCell(f){this.cellContextKeyManager.updateForElement(f)}};r=we([F(1,R.IInstantiationService)],r),e.CellContextKeyPart=r;let u=class extends t.Disposable{constructor(f,c,l,s){super(),this.notebookEditor=f,this.element=c,this._contextKeyService=l,this._notebookExecutionStateService=s,this.elementDisposables=this._register(new t.DisposableStore),this._contextKeyService.bufferChangeEvents(()=>{this.cellType=S.NOTEBOOK_CELL_TYPE.bindTo(this._contextKeyService),this.cellEditable=S.NOTEBOOK_CELL_EDITABLE.bindTo(this._contextKeyService),this.cellFocused=S.NOTEBOOK_CELL_FOCUSED.bindTo(this._contextKeyService),this.cellEditorFocused=S.NOTEBOOK_CELL_EDITOR_FOCUSED.bindTo(this._contextKeyService),this.markdownEditMode=S.NOTEBOOK_CELL_MARKDOWN_EDIT_MODE.bindTo(this._contextKeyService),this.cellRunState=S.NOTEBOOK_CELL_EXECUTION_STATE.bindTo(this._contextKeyService),this.cellExecuting=S.NOTEBOOK_CELL_EXECUTING.bindTo(this._contextKeyService),this.cellHasOutputs=S.NOTEBOOK_CELL_HAS_OUTPUTS.bindTo(this._contextKeyService),this.cellContentCollapsed=S.NOTEBOOK_CELL_INPUT_COLLAPSED.bindTo(this._contextKeyService),this.cellOutputCollapsed=S.NOTEBOOK_CELL_OUTPUT_COLLAPSED.bindTo(this._contextKeyService),this.cellLineNumbers=S.NOTEBOOK_CELL_LINE_NUMBERS.bindTo(this._contextKeyService),this.cellResource=S.NOTEBOOK_CELL_RESOURCE.bindTo(this._contextKeyService),c&&this.updateForElement(c)}),this._register(this._notebookExecutionStateService.onDidChangeCellExecution(d=>{this.element&&d.affectsCell(this.element.uri)&&this.updateForExecutionState()}))}updateForElement(f){this.elementDisposables.clear(),this.element=f,f&&(this.elementDisposables.add(f.onDidChangeState(c=>this.onDidChangeState(c))),f instanceof E.CodeCellViewModel&&this.elementDisposables.add(f.onDidChangeOutputs(()=>this.updateForOutputs())),this.elementDisposables.add(this.notebookEditor.onDidChangeActiveCell(()=>this.updateForFocusState())),this.element instanceof I.MarkupCellViewModel?this.cellType.set("markup"):this.element instanceof E.CodeCellViewModel&&this.cellType.set("code"),this._contextKeyService.bufferChangeEvents(()=>{this.updateForFocusState(),this.updateForExecutionState(),this.updateForEditState(),this.updateForCollapseState(),this.updateForOutputs(),this.cellLineNumbers.set(this.element.lineNumbers),this.cellResource.set(this.element.uri.toString())}))}onDidChangeState(f){this._contextKeyService.bufferChangeEvents(()=>{f.internalMetadataChanged&&this.updateForExecutionState(),f.editStateChanged&&this.updateForEditState(),f.focusModeChanged&&this.updateForFocusState(),f.cellLineNumberChanged&&this.cellLineNumbers.set(this.element.lineNumbers),(f.inputCollapsedChanged||f.outputCollapsedChanged)&&this.updateForCollapseState()})}updateForFocusState(){if(!this.element)return;const f=this.notebookEditor.getActiveCell();this.cellFocused.set(this.notebookEditor.getActiveCell()===this.element),f===this.element?this.cellEditorFocused.set(this.element.focusMode===A.CellFocusMode.Editor):this.cellEditorFocused.set(!1)}updateForExecutionState(){if(!this.element)return;const f=this.element.internalMetadata;this.cellEditable.set(!this.notebookEditor.isReadOnly);const c=this._notebookExecutionStateService.getCellExecution(this.element.uri);this.element instanceof I.MarkupCellViewModel?(this.cellRunState.reset(),this.cellExecuting.reset()):c?.state===b.NotebookCellExecutionState.Executing?(this.cellRunState.set("executing"),this.cellExecuting.set(!0)):c?.state===b.NotebookCellExecutionState.Pending||c?.state===b.NotebookCellExecutionState.Unconfirmed?(this.cellRunState.set("pending"),this.cellExecuting.set(!0)):f.lastRunSuccess===!0?(this.cellRunState.set("succeeded"),this.cellExecuting.set(!1)):f.lastRunSuccess===!1?(this.cellRunState.set("failed"),this.cellExecuting.set(!1)):(this.cellRunState.set("idle"),this.cellExecuting.set(!1))}updateForEditState(){!this.element||(this.element instanceof I.MarkupCellViewModel?this.markdownEditMode.set(this.element.getEditState()===A.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 E.CodeCellViewModel?this.cellHasOutputs.set(this.element.outputsViewModels.length>0):this.cellHasOutputs.set(!1)}};u=we([F(2,p.IContextKeyService),F(3,C.INotebookExecutionStateService)],u),e.CellContextKeyManager=u}),define(ae[944],le([1,0,10,476,6,2,14,20,365,8,76,12,101,64,268,152,194,121,461,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListViewInfoAccessor=e.NotebookCellList=e.NOTEBOOK_WEBVIEW_BOUNDARY=void 0;var n;(function(D){D[D.Line=0]="Line",D[D.Range=1]="Range"})(n||(n={}));var a;(function(D){D[D.Top=0]="Top",D[D.Center=1]="Center",D[D.Bottom=2]="Bottom",D[D.NearTop=3]="NearTop"})(a||(a={}));function o(D,y){if(!y.length)return D;let T=0,_=0;const L=[];for(;T<D.length&&_<y.length;)T<y[_].start&&L.push(...D.slice(T,y[_].start)),T=y[_].end+1,_++;return T<D.length&&L.push(...D.slice(T)),L}e.NOTEBOOK_WEBVIEW_BOUNDARY=5e3;function g(D){const y=0-(parseInt(D.style.top,10)||0);return y>=0&&y<=e.NOTEBOOK_WEBVIEW_BOUNDARY*2}let h=class extends S.WorkbenchList{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,i.cellRangesEqual)(this._visibleRanges,y)||(this._visibleRanges=y,this._onDidChangeVisibleRanges.fire())}get isDisposed(){return this._isDisposed}get webviewElement(){return this._webviewElement}constructor(y,T,_,L,M,O,N,P,B,V,z){super(y,T,L,M,N,O,P,B,V,z),this.listUser=y,this._previousFocusedElements=[],this._localDisposableStore=new A.DisposableStore,this._viewModelStore=new A.DisposableStore,this._onDidRemoveOutputs=this._localDisposableStore.add(new R.Emitter),this.onDidRemoveOutputs=this._onDidRemoveOutputs.event,this._onDidHideOutputs=this._localDisposableStore.add(new R.Emitter),this.onDidHideOutputs=this._onDidHideOutputs.event,this._onDidRemoveCellsFromView=this._localDisposableStore.add(new R.Emitter),this.onDidRemoveCellsFromView=this._onDidRemoveCellsFromView.event,this._viewModel=null,this._hiddenRangeIds=[],this.hiddenRangesPrefixSum=null,this._onDidChangeVisibleRanges=this._localDisposableStore.add(new R.Emitter),this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._visibleRanges=[],this._isDisposed=!1,this._isInLayout=!1,this._webviewElement=null,f.NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(!0),this._viewContext=_,this._previousFocusedElements=this.getFocusedElements(),this._localDisposableStore.add(this.onDidChangeFocus(q=>{this._previousFocusedElements.forEach(X=>{q.elements.indexOf(X)<0&&X.onDeselect()}),this._previousFocusedElements=q.elements}));const x=u.NOTEBOOK_EDITOR_CURSOR_BOUNDARY.bindTo(O);x.set("none");const H=this._localDisposableStore.add(new A.MutableDisposable),W=this._localDisposableStore.add(new A.MutableDisposable),U=q=>{switch(q.cursorAtBoundary()){case r.CursorAtBoundary.Both:x.set("both");break;case r.CursorAtBoundary.Top:x.set("top");break;case r.CursorAtBoundary.Bottom:x.set("bottom");break;default:x.set("none");break}};this._localDisposableStore.add(this.onDidChangeFocus(q=>{if(q.elements.length){const X=q.elements[0];H.value=X.onDidChangeState(G=>{G.selectionChanged&&U(X)}),W.value=X.onDidChangeEditorAttachState(()=>{X.editorAttached&&U(X)}),U(X);return}x.set("none")})),this._localDisposableStore.add(this.view.onMouseDblClick(()=>{const q=this.getFocusedElements()[0];q&&q.cellKind===u.CellKind.Markup&&!q.isInputCollapsed&&!this._viewModel?.options.isReadOnly&&(this.revealElementInView(q),q.updateEditState(r.CellEditState.Editing,"dbclick"),q.focusMode=r.CellFocusMode.Editor)}));const $=()=>{if(!this.view.length)return;const q=this.getViewScrollTop(),X=this.getViewScrollBottom();if(q>=X)return;const G=(0,c.clamp)(this.view.indexAt(q),0,this.view.length-1),Q=this.view.element(G),j=this._viewModel.getCellIndex(Q),K=(0,c.clamp)(this.view.indexAt(X),0,this.view.length-1),Y=this.view.element(K),ee=this._viewModel.getCellIndex(Y);ee-j===K-G?this.visibleRanges=[{start:j,end:ee+1}]:this.visibleRanges=this._getVisibleRangesFromIndex(G,j,K,ee)};this._localDisposableStore.add(this.view.onDidChangeContentHeight(()=>{this._isInLayout&&t.scheduleAtNextAnimationFrame(()=>{$()}),$()})),this._localDisposableStore.add(this.view.onDidScroll(()=>{this._isInLayout&&t.scheduleAtNextAnimationFrame(()=>{$()}),$()}))}attachWebview(y){y.style.top=`-${e.NOTEBOOK_WEBVIEW_BOUNDARY}px`,this.rowsContainer.insertAdjacentElement("afterbegin",y),this._webviewElement=new l.FastDomNode(y)}elementAt(y){if(!this.view.length)return;const T=this.view.indexAt(y),_=(0,c.clamp)(T,0,this.view.length-1);return this.element(_)}elementHeight(y){const T=this._getViewIndexUpperBound(y);if(T===void 0||T<0||T>=this.length)throw this._getViewIndexUpperBound(y),new p.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(M=>{if(this._isDisposed)return;const O=this._hiddenRangeIds.map(z=>this._viewModel.getTrackedRange(z)).filter(z=>z!==null),N=o(this._viewModel.viewCells,O),P=[],B=new Set;for(let z=0;z<this.length;z++)P.push(this.element(z)),B.add(this.element(z).uri.toString());const V=(0,u.diff)(P,N,z=>B.has(z.uri.toString()));M.synchronous?this._updateElementsInWebview(V):this._viewModelStore.add(t.scheduleAtNextAnimationFrame(()=>{this._isDisposed||this._updateElementsInWebview(V)}))})),this._viewModelStore.add(y.onDidChangeSelection(M=>{if(M==="view")return;const O=(0,i.cellRangesToIndexes)(y.getSelections()).map(P=>y.cellAt(P)).filter(P=>!!P).map(P=>this._getViewIndexUpperBound(P));this.setSelection(O,void 0,!0);const N=(0,i.cellRangesToIndexes)([y.getFocus()]).map(P=>y.cellAt(P)).filter(P=>!!P).map(P=>this._getViewIndexUpperBound(P));N.length&&this.setFocus(N,void 0,!0)}));const T=y.getHiddenRanges();this.setHiddenAreas(T,!1);const _=(0,i.reduceCellRanges)(T),L=y.viewCells.slice(0);_.reverse().forEach(M=>{const O=L.splice(M.start,M.end-M.start+1);this._onDidRemoveCellsFromView.fire(O)}),this.splice2(0,0,L)}_updateElementsInWebview(y){y.reverse().forEach(T=>{const _=[],L=[],M=[];for(let O=T.start;O<T.start+T.deleteCount;O++){const N=this.element(O);N.cellKind===u.CellKind.Code?this._viewModel.hasCell(N)?_.push(...N?.outputsViewModels):L.push(...N?.outputsViewModels):M.push(N)}this.splice2(T.start,T.deleteCount,T.toInsert),this._onDidHideOutputs.fire(_),this._onDidRemoveOutputs.fire(L),this._onDidRemoveCellsFromView.fire(M)})}clear(){super.splice(0,this.length)}setHiddenAreas(y,T){if(!this._viewModel)return!1;const _=(0,i.reduceCellRanges)(y),L=this._hiddenRangeIds.map(O=>this._viewModel.getTrackedRange(O)).filter(O=>O!==null);if(_.length===L.length){let O=!1;for(let N=0;N<_.length;N++)if(!(_[N].start===L[N].start&&_[N].end===L[N].end)){O=!0;break}if(!O)return this._updateHiddenRangePrefixSum(_),!1}this._hiddenRangeIds.forEach(O=>this._viewModel.setTrackedRange(O,null,3));const M=_.map(O=>this._viewModel.setTrackedRange(null,O,3)).filter(O=>O!==null);return this._hiddenRangeIds=M,this._updateHiddenRangePrefixSum(_),T&&this.updateHiddenAreasInView(L,_),!0}_updateHiddenRangePrefixSum(y){let T=0,_=0;const L=[];for(;_<y.length;){for(let O=T;O<y[_].start-1;O++)L.push(1);L.push(y[_].end-y[_].start+1+1),T=y[_].end+1,_++}for(let O=T;O<this._viewModel.length;O++)L.push(1);const M=new Uint32Array(L.length);for(let O=0;O<L.length;O++)M[O]=L[O];this.hiddenRangesPrefixSum=new I.PrefixSumComputer(M)}updateHiddenAreasInView(y,T){const _=o(this._viewModel.viewCells,y),L=new Set;_.forEach(N=>{L.add(N.uri.toString())});const M=o(this._viewModel.viewCells,T),O=(0,u.diff)(_,M,N=>L.has(N.uri.toString()));this._updateElementsInWebview(O)}splice2(y,T,_=[]){if(y<0||y>this.view.length)return;const L=t.isAncestor(document.activeElement,this.rowsContainer);super.splice(y,T,_),L&&this.domFocus();const M=[];this.getSelectedElements().forEach(O=>{this._viewModel.hasCell(O)&&M.push(O.handle)}),!M.length&&this._viewModel.viewCells.length&&this._viewModel.updateSelectionsState({kind:u.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,_,L){const M=[],O=[];let N=y,P=T;for(;N<=_;){const B=this.hiddenRangesPrefixSum.getPrefixSum(N);B===P+1?(M.length&&(M[M.length-1]===P-1?O.push({start:M[M.length-1],end:P+1}):O.push({start:M[M.length-1],end:M[M.length-1]+1})),M.push(P),N++,P++):(M.length&&(M[M.length-1]===P-1?O.push({start:M[M.length-1],end:P+1}):O.push({start:M[M.length-1],end:M[M.length-1]+1})),M.push(P),N++,P=B)}return M.length&&O.push({start:M[M.length-1],end:M[M.length-1]+1}),(0,i.reduceCellRanges)(O)}getVisibleRangesPlusViewportAboveAndBelow(){if(this.view.length<=0)return[];const y=Math.max(this.getViewScrollTop()-this.renderHeight,0),T=this.view.indexAt(y),_=this.view.element(T),L=this._viewModel.getCellIndex(_),M=(0,c.clamp)(this.getViewScrollBottom()+this.renderHeight,0,this.scrollHeight),O=(0,c.clamp)(this.view.indexAt(M),0,this.view.length-1),N=this.view.element(O),P=this._viewModel.getCellIndex(N);return P-L===O-T?[{start:L,end:P}]:this._getVisibleRangesFromIndex(T,L,O,P)}_getViewIndexUpperBound(y){if(!this._viewModel)return-1;const T=this._viewModel.getCellIndex(y);if(T===-1)return-1;if(!this.hiddenRangesPrefixSum)return T;const _=this.hiddenRangesPrefixSum.getIndexOf(T);return _.remainder!==0&&T>=this.hiddenRangesPrefixSum.getTotalSum()?T-(this.hiddenRangesPrefixSum.getTotalSum()-this.hiddenRangesPrefixSum.getCount()):_.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 _=this.element(T).handle;this._viewModel.updateSelectionsState({kind:u.SelectionStateType.Handle,primary:_,selections:[_]},"view"),this.setFocus([T],void 0,!1)}}selectElements(y){const T=y.map(_=>this._getViewIndexUpperBound(_)).filter(_=>_>=0);this.setSelection(T)}setFocus(y,T,_){if(_){super.setFocus(y,T);return}if(y.length){if(this._viewModel){const L=this.element(y[0]).handle;this._viewModel.updateSelectionsState({kind:u.SelectionStateType.Handle,primary:L,selections:this.getSelection().map(M=>this.element(M).handle)},"view")}}else if(this._viewModel){if(this.length)return;this._viewModel.updateSelectionsState({kind:u.SelectionStateType.Handle,primary:null,selections:[]},"view")}super.setFocus(y,T)}setSelection(y,T,_){if(_){super.setSelection(y,T);return}y.length?this._viewModel&&this._viewModel.updateSelectionsState({kind:u.SelectionStateType.Handle,primary:this.getFocusedElements()[0]?.handle??null,selections:y.map(L=>this.element(L)).map(L=>L.handle)},"view"):this._viewModel&&this._viewModel.updateSelectionsState({kind:u.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 _=this._getViewIndexUpperBound2(y.end-1),L=this.getViewScrollTop(),M=this.getViewScrollBottom(),O=this.view.elementTop(T);if(O>=L&&O<M){const N=this.view.elementTop(_),P=this.view.elementHeight(_);if(N+P<=M)return;if(N>=M)return this._revealInternal(_,!1,2);if(N<M)return N+P-M<O-L?this.view.setScrollTop(L+N+P-M):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),_=this.getViewScrollTop()+this.view.renderHeight;return T<=_}scrollToBottom(){const y=this.view.scrollHeight,T=this.getViewScrollTop(),_=this.getViewScrollBottom(),L=this._viewContext.notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);this.view.setScrollTop(y-(_-T)-L)}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._revealIfOutsideViewportAsync(T,1)}async revealNearTopIfOutsideViewportAync(y){const T=this._getViewIndexUpperBound(y);if(T>=0)return this._revealIfOutsideViewportAsync(T,3)}async revealElementLineInViewAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealLineInViewAsync(_,T)}async revealElementLineInCenterAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealLineInCenterAsync(_,T)}async revealElementLineInCenterIfOutsideViewportAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealLineInCenterIfOutsideViewportAsync(_,T)}async revealElementRangeInViewAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealRangeInView(_,T)}async revealElementRangeInCenterAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealRangeInCenterAsync(_,T)}async revealElementRangeInCenterIfOutsideViewportAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealRangeInCenterIfOutsideViewportAsync(_,T)}async revealElementOffsetInCenterAsync(y,T){const _=this._getViewIndexUpperBound(y);if(_>=0)return this._revealOffset(_,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 p.ListError(this.listUser,`Invalid index ${T}`);return this.view.elementTop(T)}triggerScrollFromMouseWheelEvent(y){this.view.delegateScrollFromMouseWheelEvent(y)}delegateVerticalScrollbarPointerDown(y){this.view.delegateVerticalScrollbarPointerDown(y)}isElementAboveViewport(y){return this.view.elementTop(y)+this.view.elementHeight(y)<this.scrollTop}updateElementHeight2(y,T){const _=this._getViewIndexUpperBound(y);if(_===void 0||_<0||_>=this.length)return;if(this.isElementAboveViewport(_)){const N=this.elementHeight(y)-T;this._webviewElement&&R.Event.once(this.view.onWillScroll)(()=>{const P=parseInt(this._webviewElement.domNode.style.top,10);g(this._webviewElement.domNode)?this._webviewElement.setTop(P-N):this._webviewElement.setTop(-e.NOTEBOOK_WEBVIEW_BOUNDARY)}),this.view.updateElementHeight(_,T,null);return}const L=this.getFocus();if(!L.length){this.view.updateElementHeight(_,T,null);return}const M=L[0];if(M<=_){this.view.updateElementHeight(_,T,M);return}if(this.view.elementTop(_)>=this.view.scrollTop){this.view.updateElementHeight(_,T,_);return}this.view.updateElementHeight(_,T,M)}domFocus(){const y=this.getFocusedElements()[0],T=y&&this.domElementOfElement(y);document.activeElement&&T&&T.contains(document.activeElement)||!k.isMacintosh&&document.activeElement&&w()||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 _=this.view.element(y),L=this.view.elementTop(y);if(_ instanceof s.MarkupCellViewModel)return this._revealInCenterIfOutsideViewport(y);{const M=_.layoutInfo.outputContainerOffset+T;this.view.setScrollTop(L-this.view.renderHeight/2),this.view.setScrollTop(L+M-this.view.renderHeight/2)}}_revealRange(y,T,_,L,M){const O=this.view.element(y),N=this.getViewScrollTop(),P=this.getViewScrollBottom(),B=O.getPositionScrollTopOffset(T.startLineNumber,T.startColumn),z=this.view.elementTop(y)+B;z<N?this.view.setScrollTop(z-30):z>P?this.view.setScrollTop(N+z-P+30):L&&(M?this.view.setScrollTop(N+z-P+30):this.view.setScrollTop(z-30)),_===1&&O.revealRangeInCenter(T)}async _revealRangeInternalAsync(y,T,_){const L=this.getViewScrollTop(),M=this.getViewScrollBottom(),O=this.view.elementTop(y),N=this.view.element(y);if(N.editorAttached)this._revealRange(y,T,_,!1,!1);else{const P=this.view.elementHeight(y);let B=!1;return O+P<L?(this.view.setScrollTop(O),B=!1):O>M&&(this.view.setScrollTop(O-this.view.renderHeight/2),B=!0),new Promise((z,x)=>{N.onDidChangeEditorAttachState(()=>{N.editorAttached?z():x()})}).then(()=>{this._revealRange(y,T,_,!0,B)})}}async _revealLineInViewAsync(y,T){return this._revealRangeInternalAsync(y,new E.Range(T,1,T,1),0)}async _revealRangeInView(y,T){return this._revealRangeInternalAsync(y,T,1)}async _revealRangeInCenterInternalAsync(y,T,_){const L=(P,B,V)=>{const z=this.view.element(P),x=z.getPositionScrollTopOffset(B.startLineNumber,B.startColumn),H=this.view.elementTop(P)+x;this.view.setScrollTop(H-this.view.renderHeight/2),V===1&&z.revealRangeInCenter(B)},O=this.view.elementTop(y);this.view.setScrollTop(O-this.view.renderHeight/2);const N=this.view.element(y);if(N.editorAttached)L(y,T,_);else return m(N).then(()=>L(y,T,_))}async _revealLineInCenterAsync(y,T){return this._revealRangeInCenterInternalAsync(y,new E.Range(T,1,T,1),0)}_revealRangeInCenterAsync(y,T){return this._revealRangeInCenterInternalAsync(y,T,1)}async _revealRangeInCenterIfOutsideViewportInternalAsync(y,T,_){const L=(z,x,H)=>{const W=this.view.element(z),U=W.getPositionScrollTopOffset(x.startLineNumber,x.startColumn),$=this.view.elementTop(z)+U;this.view.setScrollTop($-this.view.renderHeight/2),H===1&&W.revealRangeInCenter(x)},M=this.getViewScrollTop(),O=this.getViewScrollBottom(),P=this.view.elementTop(y),B=this.view.element(y),V=P+B.getPositionScrollTopOffset(T.startLineNumber,T.startColumn);if(V<M||V>O){this.view.setScrollTop(V-this.view.renderHeight/2);const z=this.view.elementTop(y)+B.getPositionScrollTopOffset(T.startLineNumber,T.startColumn);if(this.view.setScrollTop(z-this.view.renderHeight/2),!B.editorAttached)return m(B).then(()=>L(y,T,_))}else if(B.editorAttached)B.revealRangeInCenter(T);else return m(B).then(()=>L(y,T,_))}async _revealIfOutsideViewportAsync(y,T){this._revealInternal(y,!0,T);const _=this.view.element(y);if(_.getEditState()===r.CellEditState.Editing&&!_.editorAttached)return m(_)}async _revealLineInCenterIfOutsideViewportAsync(y,T){return this._revealRangeInCenterIfOutsideViewportInternalAsync(y,new E.Range(T,1,T,1),0)}async _revealRangeInCenterIfOutsideViewportAsync(y,T){return this._revealRangeInCenterIfOutsideViewportInternalAsync(y,T,1)}_revealInternal(y,T,_){if(y>=this.view.length)return;const L=this.getViewScrollTop(),M=this.getViewScrollBottom(),O=this.view.elementTop(y),N=this.view.elementHeight(y)+O;if(!(T&&O>=L&&N<M&&!(_===1&&N>M&&O>(L+M)/2)))switch(_){case 0:this.view.setScrollTop(O),this.view.setScrollTop(this.view.elementTop(y));break;case 1:case 3:{this.view.setScrollTop(O-this.view.renderHeight/2);const P=this.view.elementTop(y),B=this.view.elementHeight(y),V=this.getViewScrollBottom()-this.getViewScrollTop();B>=V?this.view.setScrollTop(P):_===1?this.view.setScrollTop(P+B/2-V/2):_===3&&this.view.setScrollTop(P-V/5)}break;case 2:this.view.setScrollTop(this.scrollTop+(N-M)),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 _=y;_.editorAttached?_.setSelection(T):m(_).then(()=>{_.setSelection(T)})}style(y){const T=this.view.domId;this.styleElement||(this.styleElement=t.createStyleSheet(this.view.domNode));const _=T&&`.${T}`,L=[];y.listBackground&&(y.listBackground.isOpaque()?L.push(`.monaco-list${_} > 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&&(L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${y.listFocusBackground}; }`),L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${y.listFocusBackground}; }`)),y.listFocusForeground&&L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${y.listFocusForeground}; }`),y.listActiveSelectionBackground&&(L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${y.listActiveSelectionBackground}; }`),L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${y.listActiveSelectionBackground}; }`)),y.listActiveSelectionForeground&&L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${y.listActiveSelectionForeground}; }`),y.listFocusAndSelectionBackground&&L.push(` .monaco-drag-image, .monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${y.listFocusAndSelectionBackground}; } `),y.listFocusAndSelectionForeground&&L.push(` .monaco-drag-image, .monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${y.listFocusAndSelectionForeground}; } `),y.listInactiveFocusBackground&&(L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${y.listInactiveFocusBackground}; }`),L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${y.listInactiveFocusBackground}; }`)),y.listInactiveSelectionBackground&&(L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${y.listInactiveSelectionBackground}; }`),L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${y.listInactiveSelectionBackground}; }`)),y.listInactiveSelectionForeground&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${y.listInactiveSelectionForeground}; }`),y.listHoverBackground&&L.push(`.monaco-list${_}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${y.listHoverBackground}; }`),y.listHoverForeground&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${y.listHoverForeground}; }`),y.listSelectionOutline&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${y.listSelectionOutline}; outline-offset: -1px; }`),y.listFocusOutline&&L.push(` .monaco-drag-image, .monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${y.listFocusOutline}; outline-offset: -1px; } `),y.listInactiveFocusOutline&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${y.listInactiveFocusOutline}; outline-offset: -1px; }`),y.listHoverOutline&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${y.listHoverOutline}; outline-offset: -1px; }`),y.listDropBackground&&L.push(` .monaco-list${_}.drop-target, .monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows.drop-target, .monaco-list${_} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${y.listDropBackground} !important; color: inherit !important; } `);const M=L.join(` `);M!==this.styleElement.textContent&&(this.styleElement.textContent=M)}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=[]}};h=we([F(7,S.IListService),F(8,C.IThemeService),F(9,b.IConfigurationService),F(10,d.IInstantiationService)],h),e.NotebookCellList=h;class v 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 revealNearTopIfOutsideViewportAync(y){return this.list.revealNearTopIfOutsideViewportAync(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 _=this.list.getModelIndex2(y);if(_===void 0)throw new Error(`startIndex ${y} out of boundary`);if(T>=this.list.length){const L=this.list.viewModel.length;return{start:_,end:L}}else{const L=this.list.getModelIndex2(T);if(L===void 0)throw new Error(`endIndex ${T} out of boundary`);return{start:_,end:L}}}getCellsFromViewRange(y,T){if(!this.list.viewModel)return[];const _=this.getCellRangeFromViewRange(y,T);return _?this.list.viewModel.getCellsInRange(_):[]}getCellsInRange(y){return this.list.viewModel?.getCellsInRange(y)??[]}setCellEditorSelection(y,T){this.list.setCellSelection(y,T)}setHiddenAreas(y){return this.list.setHiddenAreas(y,!0)}getVisibleRangesPlusViewportAboveAndBelow(){return this.list?.getVisibleRangesPlusViewportAboveAndBelow()??[]}triggerScroll(y){this.list.triggerScrollFromMouseWheelEvent(y)}}e.ListViewInfoAccessor=v;function m(D){return new Promise((y,T)=>{R.Event.once(D.onDidChangeEditorAttachState)(()=>D.editorAttached?y():T())})}function w(){return!!t.findParentWithClass(document.activeElement,"context-view")}}),define(ae[945],le([1,0,16,11,56,6,2,160,22,52,14,18,9,72,92,42,410,329,1787,15,8,7,37,47,19,41,23,34,118,631,101,944,2346,2347,461,64,142,202,659,58,51]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BackLayerWebView=void 0;let H=class Ja extends k.Disposable{static getOriginStore($){return this._originStore??=new B.WebviewOriginStore("notebook.backlayerWebview.origins",$),this._originStore}constructor($,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me){super(),this.notebookEditor=$,this.id=q,this.notebookViewType=X,this.documentUri=G,this.options=Q,this.rendererMessaging=j,this.webviewService=K,this.openerService=Y,this.notebookService=ee,this.contextService=ie,this.environmentService=re,this.fileDialogService=oe,this.fileService=se,this.contextMenuService=te,this.contextKeyService=Z,this.workspaceTrustManagementService=ne,this.configurationService=ce,this.languageService=de,this.workspaceContextService=he,this.editorGroupService=pe,this.storageService=me,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 A.Emitter),this._preloadsCache=new Set,this.onMessage=this._onMessage.event,this._disposed=!1,this.firstInit=!0,this.nonce=u.generateUuid(),this.element=document.createElement("div"),this.element.style.height="1400px",this.element.style.position="absolute",j&&(this._register(j),j.receiveMessageHandler=(Se,Ie)=>!this.webview||this._disposed?Promise.resolve(!1):(this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customRendererMessage",rendererId:Se,message:Ie}),Promise.resolve(!0))),this._register(ne.onDidChangeTrust(Se=>{this._sendMessageToWebview({type:"updateWorkspaceTrust",isTrusted:Se})})),this._register(i.TokenizationRegistry.onDidChange(()=>{this._sendMessageToWebview({type:"tokenizedStylesChanged",css:W()})}))}updateOptions($){this.options=$,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.outputFontSize||this.options.fontSize}px`,"notebook-cell-output-line-height":`${this.options.outputLineHeight}px`,"notebook-cell-output-font-family":this.options.outputFontFamily||this.options.fontFamily,"notebook-cell-markup-empty-content":s.localize(0,null),"notebook-cell-renderer-not-found-error":s.localize(1,null)}}generateContent($,q){const X=this.getRendererData(),G=this.getStaticPreloadsData(),Q=(0,L.preloadsScriptStr)(this.options,{dragAndDropEnabled:this.options.dragAndDropEnabled},X,G,this.workspaceTrustManagementService.isWorkspaceTrusted(),this.configurationService.getValue(N.NotebookSetting.textOutputLineLimit)??30,this.nonce),j=this.configurationService.getValue("notebook.experimental.enableCsp");return` <html lang="en"> <head> <meta charset="UTF-8"> <base href="${q}/" /> ${j?`<meta http-equiv="Content-Security-Policy" content=" default-src 'none'; script-src ${y.webviewGenericCspSource} 'unsafe-inline' 'unsafe-eval'; style-src ${y.webviewGenericCspSource} 'unsafe-inline'; img-src ${y.webviewGenericCspSource} https: http: data:; font-src ${y.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 .markup > 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}">${W()}</style> </head> <body style="overflow: hidden;"> <script> self.require = {}; <\/script> ${$} <div id='findStart' tabIndex=-1></div> <div id='container' class="widgetarea" style="position: absolute;width:100%;top: 0px"></div> <div id="_defaultColorPalatte"></div> <script type="module">${Q}<\/script> </body> </html>`}getRendererData(){return this.notebookService.getRenderers().map($=>{const q={extends:$.entrypoint.extends,path:this.asWebviewUri($.entrypoint.path,$.extensionLocation).toString()};return{id:$.id,entrypoint:q,mimeTypes:$.mimeTypes,messaging:$.messaging!=="never",isBuiltin:$.isBuiltin}})}getStaticPreloadsData(){return Array.from(this.notebookService.getStaticPreloads(this.notebookViewType),$=>({entrypoint:this.asWebviewUri($.entrypoint,$.extensionLocation).toString().toString()}))}asWebviewUri($,q){return(0,y.asWebviewUri)($,q?.scheme===I.Schemas.vscodeRemote?{isRemote:!0,authority:q.authority}:void 0)}postKernelMessage($){this._sendMessageToWebview({__vscode_notebook_message:!0,type:"customKernelMessage",message:$})}resolveOutputId($){const q=this.reversedInsetMapping.get($);return q?{cellInfo:this.insetMapping.get(q).cellInfo,output:q}:void 0}isResolved(){return!!this.webview}async createWebview(){const $=this.asWebviewUri(this.getNotebookBaseUri(),void 0);if(!this.documentUri.path.toLowerCase().endsWith(".ipynb")){const X=this.generateContent("",$.toString());this._initialize(X);return}let q="";if(this._initialized=new p.DeferredPromise,this._webviewPreloadInitialized=new p.DeferredPromise,S.isWeb){const X=I.FileAccess.asBrowserUri("vs/loader.js",J);fetch(X.toString(!0)).then(async G=>{if(G.status!==200)throw new Error(G.statusText);q=` <script> ${await G.text()} <\/script> <script> var requirejs = (function() { return require; }()); <\/script> `;const j=this.generateContent(q,$.toString());this._initialize(j),this._initialized.complete()},G=>{const Q=this.generateContent(q,$.toString());this._initialize(Q),this._initialized.complete()})}else{const X=I.FileAccess.asFileUri("vs/loader.js",J);q=`<script src="${this.asWebviewUri(X,void 0)}"><\/script><script> var requirejs = (function() { return require; }()); <\/script>`;const Q=this.generateContent(q,$.toString());this._initialize(Q),this._initialized.complete()}await this._initialized.p}getNotebookBaseUri(){if(this.documentUri.scheme===I.Schemas.untitled||this.documentUri.scheme===I.Schemas.vscodeInteractive){const $=this.workspaceContextService.getWorkspaceFolder(this.documentUri);if($)return $.uri;const q=this.workspaceContextService.getWorkspace().folders;if(q.length)return q[0].uri}return(0,C.dirname)(this.documentUri)}getBuiltinLocalResourceRoots(){return this.documentUri.path.toLowerCase().endsWith(".ipynb")?S.isWeb?[]:[(0,C.dirname)(I.FileAccess.asFileUri("vs/loader.js",J))]:[]}_initialize($){if(!document.body.contains(this.element))throw new Error("Element is already detached from the DOM tree");this.webview=this._createInset(this.webviewService,$),this.webview.mountTo(this.element),this._register(this.webview),this._register(new V.WebviewWindowDragMonitor(()=>this.webview)),this._register(this.webview.onMessage(async q=>{const X=q.message;if(!this._disposed&&!!X.__vscode_notebook_message)switch(X.type){case"initialized":{this._webviewPreloadInitialized?.complete(),this.initializeWebViewState();break}case"initializedMarkup":{this.initializeMarkupPromise?.requestId===X.requestId&&(this.initializeMarkupPromise?.p.complete(),this.initializeMarkupPromise=void 0);break}case"dimension":{for(const G of X.updates){const Q=G.height;if(G.isOutput){const j=this.resolveOutputId(G.id);if(j){const{cellInfo:K,output:Y}=j;this.notebookEditor.updateOutputHeight(K,Y,Q,!!G.init,"webview#dimension"),this.notebookEditor.scheduleOutputHeightAck(K,G.id,Q)}}else this.notebookEditor.updateMarkupCellHeight(G.id,Q,!!G.init)}break}case"mouseenter":{const G=this.resolveOutputId(X.id);if(G){const Q=this.notebookEditor.getCellByInfo(G.cellInfo);Q&&(Q.outputIsHovered=!0)}break}case"mouseleave":{const G=this.resolveOutputId(X.id);if(G){const Q=this.notebookEditor.getCellByInfo(G.cellInfo);Q&&(Q.outputIsHovered=!1)}break}case"outputFocus":{const G=this.resolveOutputId(X.id);if(G){const Q=this.notebookEditor.getCellByInfo(G.cellInfo);Q&&(Q.outputIsFocused=!0,this.notebookEditor.focusNotebookCell(Q,"output",{skipReveal:!0}))}break}case"outputBlur":{const G=this.resolveOutputId(X.id);if(G){const Q=this.notebookEditor.getCellByInfo(G.cellInfo);Q&&(Q.outputIsFocused=!1)}break}case"scroll-ack":break;case"scroll-to-reveal":{this.notebookEditor.setScrollTop(X.scrollTop-_.NOTEBOOK_WEBVIEW_BOUNDARY);break}case"did-scroll-wheel":{this.notebookEditor.triggerScroll({...X.payload,preventDefault:()=>{},stopPropagation:()=>{}});break}case"focus-editor":{const G=this.notebookEditor.getCellById(X.cellId);G&&(X.focusNext?this.notebookEditor.focusNextNotebookCell(G,"editor"):await this.notebookEditor.focusNotebookCell(G,"editor"));break}case"clicked-data-url":{this._onDidClickDataLink(X);break}case"clicked-link":{let G;if((0,v.matchesScheme)(X.href,I.Schemas.command)){const Q=r.URI.parse(X.href);switch(Q.path){case"workbench.action.openLargeOutput":{const j=Q.query,K=this.editorGroupService.activeGroup;K&&K.activeEditor&&K.pinEditor(K.activeEditor),this.openerService.open(N.CellUri.generateCellOutputUri(this.documentUri,j));return}case"github-issues.authNow":case"workbench.extensions.search":case"workbench.action.openSettings":{this.openerService.open(X.href,{fromUserGesture:!0,allowCommands:!0,fromWorkspace:!0});return}}return}if((0,v.matchesSomeScheme)(X.href,I.Schemas.http,I.Schemas.https,I.Schemas.mailto,I.Schemas.vscodeNotebookCell,I.Schemas.vscodeNotebook))G=X.href;else if(!/^[\w\-]+:/.test(X.href)){const Q=X.href.lastIndexOf("#"),j=decodeURI(Q>=0?X.href.slice(0,Q):X.href);if(this.documentUri.scheme===I.Schemas.untitled){const K=this.workspaceContextService.getWorkspace().folders;if(!K.length)return;G=r.URI.joinPath(K[0].uri,j)}else if(X.href.startsWith("/")){let K=this.workspaceContextService.getWorkspaceFolder(this.documentUri);if(!K){const Y=this.workspaceContextService.getWorkspace().folders;if(!Y.length)return;K=Y[0]}G=r.URI.joinPath(K.uri,j)}else G=r.URI.joinPath((0,C.dirname)(this.documentUri),j)}G&&this.openerService.open(G,{fromUserGesture:!0,allowCommands:!1,fromWorkspace:!0});break}case"customKernelMessage":{this._onMessage.fire({message:X.message});break}case"customRendererMessage":{this.rendererMessaging?.postMessage(X.rendererId,X.message);break}case"clickMarkupCell":{const G=this.notebookEditor.getCellById(X.cellId);G&&(X.shiftKey||(S.isMacintosh?X.metaKey:X.ctrlKey)?this.notebookEditor.toggleNotebookCellSelection(G,X.shiftKey):await this.notebookEditor.focusNotebookCell(G,"container",{skipReveal:!0}));break}case"contextMenuMarkupCell":{const G=this.notebookEditor.getCellById(X.cellId);if(G){await this.notebookEditor.focusNotebookCell(G,"container",{skipReveal:!0});const Q=this.element.getBoundingClientRect();this.contextMenuService.showContextMenu({menuId:d.MenuId.NotebookCellTitle,contextKeyService:this.contextKeyService,getAnchor:()=>({x:Q.x+X.clientX,y:Q.y+X.clientY})})}break}case"toggleMarkupPreview":{const G=this.notebookEditor.getCellById(X.cellId);G&&!this.notebookEditor.creationOptions.isReadOnly&&(this.notebookEditor.setMarkupCellEditState(X.cellId,T.CellEditState.Editing),await this.notebookEditor.focusNotebookCell(G,"editor",{skipReveal:!0}));break}case"mouseEnterMarkupCell":{const G=this.notebookEditor.getCellById(X.cellId);G instanceof O.MarkupCellViewModel&&(G.cellIsHovered=!0);break}case"mouseLeaveMarkupCell":{const G=this.notebookEditor.getCellById(X.cellId);G instanceof O.MarkupCellViewModel&&(G.cellIsHovered=!1);break}case"cell-drag-start":{this.notebookEditor.didStartDragMarkupCell(X.cellId,X);break}case"cell-drag":{this.notebookEditor.didDragMarkupCell(X.cellId,X);break}case"cell-drop":{this.notebookEditor.didDropMarkupCell(X.cellId,{dragOffsetY:X.dragOffsetY,ctrlKey:X.ctrlKey,altKey:X.altKey});break}case"cell-drag-end":{this.notebookEditor.didEndDragMarkupCell(X.cellId);break}case"renderedMarkup":{const G=this.notebookEditor.getCellById(X.cellId);G instanceof O.MarkupCellViewModel&&(G.renderedHtml=X.html),this._handleHighlightCodeBlock(X.codeBlocks);break}case"renderedCellOutput":{this._handleHighlightCodeBlock(X.codeBlocks);break}case"outputResized":{this.notebookEditor.didResizeOutput(X.cellId);break}case"getOutputItem":{const Q=this.resolveOutputId(X.outputId)?.output.model.outputs.find(j=>j.mime===X.mime);this._sendMessageToWebview({type:"returnOutputItem",requestId:X.requestId,output:Q?{mime:Q.mime,valueBytes:Q.data.buffer}:void 0});break}}}))}_handleHighlightCodeBlock($){for(const{id:q,value:X,lang:G}of $){const Q=this.languageService.getLanguageIdByLanguageName(G);!Q||(0,l.tokenizeToString)(this.languageService,X,Q).then(j=>{this._disposed||this._sendMessageToWebview({type:"tokenizedCodeBlock",html:j,codeBlockId:q})})}}async _onDidClickDataLink($){if(typeof $.data!="string")return;const[q,X]=$.data.split(";base64,");if(!X||!q)return;const G=this.documentUri.scheme===I.Schemas.vscodeInteractive?this.workspaceContextService.getWorkspace().folders[0]?.uri??await this.fileDialogService.defaultFilePath():(0,C.dirname)(this.documentUri);let Q;if($.downloadName)Q=$.downloadName;else{const ee=q.replace(/^data:/,""),ie=ee&&(0,E.getExtensionForMimeType)(ee);Q=ie?`download${ie}`:"download"}const j=(0,C.joinPath)(G,Q),K=await this.fileDialogService.showSaveDialog({defaultUri:j});if(!K)return;const Y=(0,R.decodeBase64)(X);await this.fileService.writeFile(K,Y),await this.openerService.open(K)}_createInset($,q){this.localResourceRootsCache=this._getResourceRootsCache();const X=$.createWebviewElement({id:this.id,origin:Ja.getOriginStore(this.storageService).getOrigin(this.notebookViewType,void 0),options:{purpose:"notebookRenderer",enableFindWidget:!1,transformCssVariables:M.transformWebviewThemeVars},contentOptions:{allowMultipleAPIAcquire:!0,allowScripts:!0,localResourceRoots:this.localResourceRootsCache},extension:void 0});return X.html=q,X}_getResourceRootsCache(){const $=this.contextService.getWorkspace().folders.map(X=>X.uri),q=this.getNotebookBaseUri();return[this.notebookService.getNotebookProviderResourceRoots(),this.notebookService.getRenderers().map(X=>(0,C.dirname)(X.entrypoint.path)),Array.from(this.notebookService.getStaticPreloads(this.notebookViewType),X=>(0,C.dirname)(X.entrypoint)),$,q,this.getBuiltinLocalResourceRoots()].flat()}initializeWebViewState(){this._preloadsCache.clear(),this._currentKernel&&this._updatePreloadsFromKernel(this._currentKernel);for(const[$,q]of this.insetMapping.entries())this._sendMessageToWebview({...q.cachedCreation,initiallyHidden:this.hiddenInsetMapping.has($)});if(!this.initializeMarkupPromise?.isFirstInit){const $=[...this.markupPreviewMapping.values()];this.markupPreviewMapping.clear(),this.initializeMarkup($)}this._updateStyles(),this._updateOptions()}shouldUpdateInset($,q,X,G){if(this._disposed||"isOutputCollapsed"in $&&$.isOutputCollapsed)return!1;if(this.hiddenInsetMapping.has(q))return!0;const Q=this.insetMapping.get(q);return!(!Q||G===Q.cachedCreation.outputOffset&&X===Q.cachedCreation.cellTop)}ackHeight($){this._sendMessageToWebview({type:"ack-dimension",updates:$})}updateScrollTops($,q){if(this._disposed)return;const X=(0,t.coalesce)($.map(G=>{const Q=this.insetMapping.get(G.output);if(!Q||!G.forceDisplay&&!this.shouldUpdateInset(G.cell,G.output,G.cellTop,G.outputOffset))return;const j=Q.outputId;return Q.cachedCreation.cellTop=G.cellTop,Q.cachedCreation.outputOffset=G.outputOffset,this.hiddenInsetMapping.delete(G.output),{cellId:G.cell.id,outputId:j,cellTop:G.cellTop,outputOffset:G.outputOffset,forceDisplay:G.forceDisplay}}));!X.length&&!q.length||this._sendMessageToWebview({type:"view-scroll",widgets:X,markupCells:q})}async createMarkupPreview($){if(!this._disposed){if(this.markupPreviewMapping.has($.cellId)){console.error("Trying to create markup preview that already exists");return}this.markupPreviewMapping.set($.cellId,$),this._sendMessageToWebview({type:"createMarkupCell",cell:$})}}async showMarkupPreview($){if(this._disposed)return;const q=this.markupPreviewMapping.get($.cellId);if(!q)return this.createMarkupPreview($);const X=$.content===q.content,G=(0,b.equals)($.metadata,q.metadata);(!X||!G||!q.visible)&&this._sendMessageToWebview({type:"showMarkupCell",id:$.cellId,handle:$.cellHandle,content:X?void 0:$.content,top:$.offset,metadata:G?void 0:$.metadata}),q.metadata=$.metadata,q.content=$.content,q.offset=$.offset,q.visible=!0}async hideMarkupPreviews($){if(this._disposed)return;const q=[];for(const X of $){const G=this.markupPreviewMapping.get(X);G&&G.visible&&(q.push(X),G.visible=!1)}q.length&&this._sendMessageToWebview({type:"hideMarkupCells",ids:q})}async unhideMarkupPreviews($){if(this._disposed)return;const q=[];for(const X of $){const G=this.markupPreviewMapping.get(X);G?G.visible||(G.visible=!0,q.push(X)):console.error(`Trying to unhide a preview that does not exist: ${X}`)}this._sendMessageToWebview({type:"unhideMarkupCells",ids:q})}async deleteMarkupPreviews($){if(!this._disposed){for(const q of $)this.markupPreviewMapping.has(q)||console.error(`Trying to delete a preview that does not exist: ${q}`),this.markupPreviewMapping.delete(q);$.length&&this._sendMessageToWebview({type:"deleteMarkupCell",ids:$})}}async updateMarkupPreviewSelections($){this._disposed||this._sendMessageToWebview({type:"updateSelectedMarkupCells",selectedCellIds:$.filter(q=>this.markupPreviewMapping.has(q))})}async initializeMarkup($){if(this._disposed)return;this.initializeMarkupPromise?.p.complete();const q=u.generateUuid();this.initializeMarkupPromise={p:new p.DeferredPromise,requestId:q,isFirstInit:this.firstInit},this._webviewPreloadInitialized&&await this._webviewPreloadInitialized.p,this.firstInit=!1;for(const X of $)this.markupPreviewMapping.set(X.cellId,X);return this._sendMessageToWebview({type:"initializeMarkup",cells:$,requestId:q}),this.initializeMarkupPromise.p.p}_cachedInsetEqual($,q){return q.type===1?$.renderer?.id===q.renderer.id:$.cachedCreation.type==="html"}async createOutput($,q,X,G){if(this._disposed)return;const Q=this.insetMapping.get(q.source);if(Q&&this._cachedInsetEqual(Q,q)){this.hiddenInsetMapping.delete(q.source),this._sendMessageToWebview({type:"showOutput",cellId:Q.cellInfo.cellId,outputId:Q.outputId,cellTop:X,outputOffset:G});return}const j={type:"html",cellId:$.cellId,cellTop:X,outputOffset:G,left:0,requiredPreloads:[]};let K,Y;if(q.type===1){const ee=q.source.model;Y=q.renderer;const ie=ee.outputs.find(re=>re.mime===q.mimeType);K={...j,outputId:ee.outputId,rendererId:q.renderer.id,content:{type:1,outputId:ee.outputId,metadata:ee.metadata,output:{mime:ie.mime,valueBytes:ie.data.buffer},allOutputs:ee.outputs.map(re=>({mime:re.mime}))}}}else K={...j,outputId:u.generateUuid(),content:{type:q.type,htmlContent:q.htmlContent}};this._sendMessageToWebview(K),this.insetMapping.set(q.source,{outputId:K.outputId,cellInfo:$,renderer:Y,cachedCreation:K}),this.hiddenInsetMapping.delete(q.source),this.reversedInsetMapping.set(K.outputId,q.source)}async updateOutput($,q,X,G){if(this._disposed)return;if(!this.insetMapping.has(q.source)){this.createOutput($,q,X,G);return}const Q=this.insetMapping.get(q.source);this.hiddenInsetMapping.delete(q.source);let j;if(q.type===1){const K=q.source.model,Y=K.outputs.find(ee=>ee.mime===q.mimeType);j={type:1,outputId:Q.outputId,metadata:K.metadata,output:{mime:q.mimeType,valueBytes:Y.data.buffer},allOutputs:K.outputs.map(ee=>({mime:ee.mime}))}}this._sendMessageToWebview({type:"showOutput",cellId:Q.cellInfo.cellId,outputId:Q.outputId,cellTop:X,outputOffset:G,content:j})}removeInsets($){if(!this._disposed)for(const q of $){const X=this.insetMapping.get(q);if(!X)continue;const G=X.outputId;this._sendMessageToWebview({type:"clearOutput",rendererId:X.cachedCreation.rendererId,cellUri:X.cellInfo.cellUri.toString(),outputId:G,cellId:X.cellInfo.cellId}),this.insetMapping.delete(q),this.reversedInsetMapping.delete(G)}}hideInset($){if(this._disposed)return;const q=this.insetMapping.get($);!q||(this.hiddenInsetMapping.add($),this._sendMessageToWebview({type:"hideOutput",outputId:q.outputId,cellId:q.cellInfo.cellId}))}focusWebview(){this._disposed||this.webview?.focus()}focusOutput($,q){this._disposed||(q||this.webview?.focus(),this._sendMessageToWebview({type:"focus-output",cellId:$}))}async find($,q){if($==="")return[];const X=new Promise(Q=>{const j=this.webview?.onMessage(K=>{K.message.type==="didFind"&&(Q(K.message.matches),j?.dispose())})});return this._sendMessageToWebview({type:"find",query:$,options:q}),await X}findStop(){this._sendMessageToWebview({type:"findStop"})}async findHighlight($){const q=new Promise(G=>{const Q=this.webview?.onMessage(j=>{j.message.type==="didFindHighlight"&&(G(j.message.offset),Q?.dispose())})});return this._sendMessageToWebview({type:"findHighlight",index:$}),await q}async findUnHighlight($){this._sendMessageToWebview({type:"findUnHighlight",index:$})}deltaCellContainerClassNames($,q,X){this._sendMessageToWebview({type:"decorations",cellId:$,addedClassNames:q,removedClassNames:X})}updateOutputRenderers(){if(!this.webview)return;const $=this.getRendererData();this.localResourceRootsCache=this._getResourceRootsCache();const q=[...this.localResourceRootsCache||[],...this._currentKernel?[this._currentKernel.localResourceRoot]:[]];this.webview.localResourcesRoot=q,this._sendMessageToWebview({type:"updateRenderers",rendererData:$})}async updateKernelPreloads($){if(this._disposed||$===this._currentKernel)return;const q=this._currentKernel;this._currentKernel=$,q&&q.preloadUris.length>0?this.webview?.reload():$&&this._updatePreloadsFromKernel($)}_updatePreloadsFromKernel($){const q=[];for(const X of $.preloadUris){const G=this.environmentService.isExtensionDevelopment&&(X.scheme==="http"||X.scheme==="https")?X:this.asWebviewUri(X,void 0);this._preloadsCache.has(G.toString())||(q.push({uri:G.toString(),originalUri:X.toString()}),this._preloadsCache.add(G.toString()))}!q.length||this._updatePreloads(q)}_updatePreloads($){if(!this.webview)return;const q=[...this.localResourceRootsCache||[],...this._currentKernel?[this._currentKernel.localResourceRoot]:[]];this.webview.localResourcesRoot=q,this._sendMessageToWebview({type:"preload",resources:$})}_sendMessageToWebview($){this._disposed||this.webview?.postMessage($)}dispose(){this._disposed=!0,this.webview?.dispose(),this.webview=void 0,this.notebookEditor=null,this.insetMapping.clear(),super.dispose()}};H=we([F(6,B.IWebviewService),F(7,v.IOpenerService),F(8,P.INotebookService),F(9,w.IWorkspaceContextService),F(10,x.IWorkbenchEnvironmentService),F(11,g.IFileDialogService),F(12,h.IFileService),F(13,o.IContextMenuService),F(14,a.IContextKeyService),F(15,D.IWorkspaceTrustManagementService),F(16,n.IConfigurationService),F(17,f.ILanguageService),F(18,w.IWorkspaceContextService),F(19,z.IEditorGroupsService),F(20,m.IStorageService)],H),e.BackLayerWebView=H;function W(){const U=i.TokenizationRegistry.getColorMap();return U?(0,c.generateTokensCSSForColorMap)(U):""}}),define(ae[2624],le([1,0,298,21,6,2,194,28,145,20,423,729,94,62,5,156,101,2349,547,461,64,268,529]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCellViewModel=e.NotebookViewModel=void 0;const g=()=>{throw new Error("Invalid change accessor")};class h{constructor(){this._decorationsTree=new C.IntervalTree}intervalSearch(_,L,M,O,N){return this._decorationsTree.intervalSearch(_,L,M,O,N)}search(_,L,M,O){return this._decorationsTree.search(_,L,O)}collectNodesFromOwner(_){return this._decorationsTree.collectNodesFromOwner(_)}collectNodesPostOrder(){return this._decorationsTree.collectNodesPostOrder()}insert(_){this._decorationsTree.insert(_)}delete(_){this._decorationsTree.delete(_)}resolveNode(_,L){this._decorationsTree.resolveNode(_,L)}acceptReplace(_,L,M,O){this._decorationsTree.acceptReplace(_,L,M,O)}}const v=[r.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-always-grows-when-typing-at-edges",stickiness:0}),r.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-never-grows-when-typing-at-edges",stickiness:1}),r.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-grows-only-when-typing-before",stickiness:2}),r.ModelDecorationOptions.register({description:"notebook-view-model-tracked-range-grows-only-when-typing-after",stickiness:3})];function m(T){return T instanceof r.ModelDecorationOptions?T:r.ModelDecorationOptions.createDynamic(T)}let w=0,D=class extends A.Disposable{get options(){return this._options}get onDidChangeOptions(){return this._onDidChangeOptions.event}get viewCells(){return this._viewCells}set viewCells(_){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 _=new Set,L=[];return(0,a.cellRangesToIndexes)(this._selectionCollection.selections).map(M=>M<this.length?this.cellAt(M):void 0).forEach(M=>{M&&!_.has(M.handle)&&L.push(M.handle)}),L}set selectionHandles(_){const L=_.map(M=>this._viewCells.findIndex(O=>O.handle===M));this._selectionCollection.setSelections((0,a.cellIndexesToRanges)(L),!0,"model")}get focused(){return this._focused}constructor(_,L,M,O,N,P,B,V,z){super(),this.viewType=_,this._notebook=L,this._viewContext=M,this._layoutInfo=O,this._options=N,this._instantiationService=P,this._bulkEditService=B,this._undoService=V,this._textModelService=z,this._localStore=this._register(new A.DisposableStore),this._handleToViewCellMapping=new Map,this._onDidChangeOptions=this._register(new R.Emitter),this._viewCells=[],this._onDidChangeViewCells=this._register(new R.Emitter),this._lastNotebookEditResource=[],this._onDidChangeSelection=this._register(new R.Emitter),this._selectionCollection=new l.NotebookCellSelectionCollection,this._decorationsTree=new h,this._decorations=Object.create(null),this._lastDecorationId=0,this._foldingRanges=null,this._hiddenRanges=[],this._focused=!0,this._decorationIdToCellMap=new Map,this._statusBarItemIdToCellMap=new Map,w++,this.id="$notebookViewModel"+w,this._instanceId=E.singleLetterHash(w);const x=(H,W)=>{const U=H.map(G=>[G[0],G[1],G[2].map(Q=>y(this._instantiationService,this,Q,this._viewContext))]);U.reverse().forEach(G=>{const Q=this._viewCells.splice(G[0],G[1],...G[2]);this._decorationsTree.acceptReplace(G[0],G[1],G[2].length,!0),Q.forEach(j=>{this._handleToViewCellMapping.delete(j.handle),j.dispose()}),G[2].forEach(j=>{this._handleToViewCellMapping.set(j.handle,j),this._localStore.add(j)})});const $=this.selectionHandles;this._onDidChangeViewCells.fire({synchronous:W,splices:U});let q=[];if($.length){const G=$[0],Q=this._viewCells.indexOf(this.getCellByHandle(G));q=[G];let j=0;for(let K=0;K<U.length;K++){const Y=U[0];if(Y[0]+Y[1]<=Q){j+=Y[2].length-Y[1];continue}if(Y[0]>Q){q=[G];break}if(Y[0]+Y[1]>Q){q=[this._viewCells[Y[0]+j].handle];break}}}const X=q.map(G=>this._viewCells.findIndex(Q=>Q.handle===G));this._selectionCollection.setState((0,a.cellIndexesToRanges)([X[0]])[0],(0,a.cellIndexesToRanges)(X),!0,"model")};this._register(this._notebook.onDidChangeContent(H=>{for(let W=0;W<H.rawEvents.length;W++){const U=H.rawEvents[W];let $=[];const q=H.synchronous??!0;if(U.kind===n.NotebookCellsChangeType.ModelChange||U.kind===n.NotebookCellsChangeType.Initialize){$=U.changes,x($,q);continue}else if(U.kind===n.NotebookCellsChangeType.Move)x([[U.index,U.length,[]]],q),x([[U.newIdx,0,U.cells]],q);else continue}})),this._register(this._notebook.onDidChangeContent(H=>{H.rawEvents.forEach(W=>{W.kind===n.NotebookCellsChangeType.ChangeDocumentMetadata&&this._viewContext.eventDispatcher.emit([new o.NotebookMetadataChangedEvent(this._notebook.metadata)])}),H.endSelectionState&&this.updateSelectionsState(H.endSelectionState)})),this._register(this._viewContext.eventDispatcher.onDidChangeLayout(H=>{this._layoutInfo=H.value,this._viewCells.forEach(W=>{W.cellKind===n.CellKind.Markup?(H.source.width||H.source.fontInfo)&&W.layoutChange({outerWidth:H.value.width,font:H.value.fontInfo}):H.source.width!==void 0&&W.layoutChange({outerWidth:H.value.width,font:H.value.fontInfo})})})),this._register(this._viewContext.notebookOptions.onDidChangeOptions(H=>{for(let W=0;W<this.length;W++)this._viewCells[W].updateOptions(H)})),this._register(this._selectionCollection.onDidChangeSelection(H=>{this._onDidChangeSelection.fire(H)})),this._viewCells=this._notebook.cells.map(H=>y(this._instantiationService,this,H,this._viewContext)),this._viewCells.forEach(H=>{this._handleToViewCellMapping.set(H.handle,H)})}updateOptions(_){this._options={...this._options,..._},this._onDidChangeOptions.fire()}getFocus(){return this._selectionCollection.focus}getSelections(){return this._selectionCollection.selections}setEditorFocus(_){this._focused=_}validateRange(_){if(!_)return null;const L=(0,k.clamp)(_.start,0,this.length),M=(0,k.clamp)(_.end,0,this.length);return L===M?null:L<M?{start:L,end:M}:{start:M,end:L}}updateSelectionsState(_,L="model"){if(this._focused||L==="model")if(_.kind===n.SelectionStateType.Handle){const M=_.primary!==null?this.getCellIndexByHandle(_.primary):null,O=M!==null?this.validateRange({start:M,end:M+1}):null,N=(0,a.cellIndexesToRanges)(_.selections.map(P=>this.getCellIndexByHandle(P))).map(P=>this.validateRange(P)).filter(P=>P!==null);this._selectionCollection.setState(O,(0,a.reduceCellRanges)(N),!0,L)}else{const M=this.validateRange(_.focus),O=_.selections.map(N=>this.validateRange(N)).filter(N=>N!==null);this._selectionCollection.setState(M,(0,a.reduceCellRanges)(O),!0,L)}}getFoldingStartIndex(_){if(!this._foldingRanges)return-1;const L=this._foldingRanges.findRange(_+1);return this._foldingRanges.getStartLineNumber(L)-1}getFoldingState(_){if(!this._foldingRanges)return 0;const L=this._foldingRanges.findRange(_+1);return this._foldingRanges.getStartLineNumber(L)-1!==_?0:this._foldingRanges.isCollapsed(L)?2:1}getFoldedLength(_){if(!this._foldingRanges)return 0;const L=this._foldingRanges.findRange(_+1),M=this._foldingRanges.getStartLineNumber(L)-1;return this._foldingRanges.getEndLineNumber(L)-1-M}updateFoldingRanges(_){this._foldingRanges=_;let L=!1;const M=[];let O=0,N=0,P=Number.MAX_VALUE,B=-1;for(;O<_.length;O++){if(!_.isCollapsed(O))continue;const V=_.getStartLineNumber(O)+1,z=_.getEndLineNumber(O);P<=V&&z<=B||(!L&&N<this._hiddenRanges.length&&this._hiddenRanges[N].start+1===V&&this._hiddenRanges[N].end+1===z?(M.push(this._hiddenRanges[N]),N++):(L=!0,M.push({start:V-1,end:z-1})),P=V,B=z)}(L||N<this._hiddenRanges.length)&&(this._hiddenRanges=M),this._viewCells.forEach(V=>{V.cellKind===n.CellKind.Markup&&V.triggerFoldingStateChange()})}getHiddenRanges(){return this._hiddenRanges}getCellByHandle(_){return this._handleToViewCellMapping.get(_)}getCellIndexByHandle(_){return this._viewCells.findIndex(L=>L.handle===_)}getCellIndex(_){return this._viewCells.indexOf(_)}cellAt(_){return this._viewCells[_]}getCellsInRange(_){if(!_)return this._viewCells.slice(0);const L=this.validateRange(_);if(L){const M=[];for(let O=L.start;O<L.end;O++)M.push(this._viewCells[O]);return M}return[]}getNearestVisibleCellIndexUpwards(_){for(let L=this._hiddenRanges.length-1;L>=0;L--){const M=this._hiddenRanges[L],O=M.start-1,N=M.end;if(!(O>_)){if(O<=_&&N>=_)return _;break}}return _}getNextVisibleCellIndex(_){for(let L=0;L<this._hiddenRanges.length;L++){const M=this._hiddenRanges[L],O=M.start-1,N=M.end;if(!(N<_)){if(O<=_)return N+1;break}}return _+1}getPreviousVisibleCellIndex(_){for(let L=this._hiddenRanges.length-1;L>=0;L--){const M=this._hiddenRanges[L],O=M.start-1;if(M.end<_)return _;if(O<=_)return O}return _}hasCell(_){return this._handleToViewCellMapping.has(_.handle)}getVersionId(){return this._notebook.versionId}getAlternativeId(){return this._notebook.alternativeVersionId}getTrackedRange(_){return this._getDecorationRange(_)}_getDecorationRange(_){const L=this._decorations[_];if(!L)return null;const M=this.getVersionId();return L.cachedVersionId!==M&&this._decorationsTree.resolveNode(L,M),L.range===null?{start:L.cachedAbsoluteStart-1,end:L.cachedAbsoluteEnd-1}:{start:L.range.startLineNumber-1,end:L.range.endLineNumber-1}}setTrackedRange(_,L,M){const O=_?this._decorations[_]:null;return O?L?(this._decorationsTree.delete(O),O.reset(this.getVersionId(),L.start,L.end+1,new b.Range(L.start+1,1,L.end+1,1)),O.setOptions(v[M]),this._decorationsTree.insert(O),O.id):(this._decorationsTree.delete(O),delete this._decorations[O.id],null):L?this._deltaCellDecorationsImpl(0,[],[{range:new b.Range(L.start+1,1,L.end+1,1),options:v[M]}])[0]:null}_deltaCellDecorationsImpl(_,L,M){const O=this.getVersionId(),N=L.length;let P=0;const B=M.length;let V=0;const z=new Array(B);for(;P<N||V<B;){let x=null;if(P<N){do x=this._decorations[L[P++]];while(!x&&P<N);x&&this._decorationsTree.delete(x)}if(V<B){if(!x){const $=++this._lastDecorationId,q=`${this._instanceId};${$}`;x=new C.IntervalNode(q,0,0),this._decorations[q]=x}const H=M[V],W=H.range,U=m(H.options);x.ownerId=_,x.reset(O,W.startLineNumber,W.endLineNumber,b.Range.lift(W)),x.setOptions(U),this._decorationsTree.insert(x),z[V]=x.id,V++}else x&&delete this._decorations[x.id]}return z}deltaCellDecorations(_,L){_.forEach(O=>{const N=this._decorationIdToCellMap.get(O);N!==void 0&&this.getCellByHandle(N)?.deltaCellDecorations([O],[])});const M=[];return L.forEach(O=>{const P=this.getCellByHandle(O.handle)?.deltaCellDecorations([],[O.options])||[];P.forEach(B=>{this._decorationIdToCellMap.set(B,O.handle)}),M.push(...P)}),M}deltaCellStatusBarItems(_,L){const M=(0,t.groupBy)(_,N=>this._statusBarItemIdToCellMap.get(N)??-1),O=[];L.forEach(N=>{const P=this.getCellByHandle(N.handle),B=M[N.handle]??[];delete M[N.handle];const V=P?.deltaCellStatusBarItems(B,N.items)||[];V.forEach(z=>{this._statusBarItemIdToCellMap.set(z,N.handle)}),O.push(...V)});for(const N in M){const P=parseInt(N),B=M[P];this.getCellByHandle(P)?.deltaCellStatusBarItems(B,[])}return O}nearestCodeCellIndex(_){const L=this.viewCells.slice(0,_).reverse().findIndex(M=>M.cellKind===n.CellKind.Code);if(L>-1)return _-L-1;{const M=this.viewCells.slice(_+1).findIndex(O=>O.cellKind===n.CellKind.Code);return M>-1?_+1+M:-1}}getEditorViewState(){const _={},L={},M={};this._viewCells.forEach((N,P)=>{N.getEditState()===c.CellEditState.Editing&&(_[P]=!0),N.isInputCollapsed&&(L[P]=!0),N instanceof s.CodeCellViewModel&&N.isOutputCollapsed&&(M[P]=!0)});const O={};return this._viewCells.map(N=>({handle:N.model.handle,state:N.saveEditorViewState()})).forEach((N,P)=>{N.state&&(O[P]=N.state)}),{editingCells:_,editorViewStates:O,collapsedInputCells:L,collapsedOutputCells:M}}restoreEditorViewState(_){!_||this._viewCells.forEach((L,M)=>{const O=_.editingCells&&_.editingCells[M],N=_.editorViewStates&&_.editorViewStates[M];L.updateEditState(O?c.CellEditState.Editing:c.CellEditState.Preview,"viewState");const P=_.cellTotalHeights?_.cellTotalHeights[M]:void 0;L.restoreEditorViewState(N,P),_.collapsedInputCells&&_.collapsedInputCells[M]&&(L.isInputCollapsed=!0),_.collapsedOutputCells&&_.collapsedOutputCells[M]&&L instanceof s.CodeCellViewModel&&(L.isOutputCollapsed=!0)})}changeModelDecorations(_){const L={deltaDecorations:(O,N)=>this._deltaModelDecorationsImpl(O,N)};let M=null;try{M=_(L)}catch(O){(0,p.onUnexpectedError)(O)}return L.deltaDecorations=g,M}_deltaModelDecorationsImpl(_,L){const M=new Map;_.forEach(N=>{const P=N.ownerId;if(!M.has(P)){const V=this._viewCells.find(z=>z.handle===P);V&&M.set(P,{cell:V,oldDecorations:[],newDecorations:[]})}const B=M.get(P);B&&(B.oldDecorations=N.decorations)}),L.forEach(N=>{const P=N.ownerId;if(!M.has(P)){const V=this._viewCells.find(z=>z.handle===P);V&&M.set(P,{cell:V,oldDecorations:[],newDecorations:[]})}const B=M.get(P);B&&(B.newDecorations=N.decorations)});const O=[];return M.forEach((N,P)=>{const B=N.cell.deltaModelDecorations(N.oldDecorations,N.newDecorations);O.push({ownerId:P,decorations:B})}),O}find(_,L){const M=[];return this._viewCells.forEach((O,N)=>{const P=O.startFind(_,L);P&&M.push({cell:P.cell,index:N,matches:P.matches,modelMatchCount:P.matches.length})}),M}replaceOne(_,L,M){const O=_;return this._lastNotebookEditResource.push(O.uri),O.resolveTextModel().then(()=>{this._bulkEditService.apply([new I.ResourceTextEdit(_.uri,{range:L,text:M})],{quotableLabel:"Notebook Replace"})})}async replaceAll(_,L){if(!_.length)return;const M=[];return this._lastNotebookEditResource.push(_[0].cell.uri),_.forEach(O=>{O.matches.forEach((N,P)=>{N.index===void 0&&M.push({versionId:void 0,textEdit:{range:N.range,text:L[P]},resource:O.cell.uri})})}),Promise.all(_.map(O=>O.cell.resolveTextModel())).then(async()=>{this._bulkEditService.apply({edits:M},{quotableLabel:"Notebook Replace All"})})}async _withElement(_,L){const M=this._viewCells.filter(N=>_.matchesResource(N.uri)),O=await Promise.all(M.map(N=>this._textModelService.createModelReference(N.uri)));await L(),O.forEach(N=>N.dispose())}async undo(){const _=this._undoService.getElements(this.uri),L=_.past.length?_.past[_.past.length-1]:void 0;return L&&L instanceof S.SingleModelEditStackElement||L instanceof S.MultiModelEditStackElement?(await this._withElement(L,async()=>{await this._undoService.undo(this.uri)}),L instanceof S.SingleModelEditStackElement?[L.resource]:L.resources):(await this._undoService.undo(this.uri),[])}async redo(){const L=this._undoService.getElements(this.uri).future[0];return L&&L instanceof S.SingleModelEditStackElement||L instanceof S.MultiModelEditStackElement?(await this._withElement(L,async()=>{await this._undoService.redo(this.uri)}),L instanceof S.SingleModelEditStackElement?[L.resource]:L.resources):(await this._undoService.redo(this.uri),[])}equal(_){return this._notebook===_}dispose(){this._localStore.clear(),this._viewCells.forEach(_=>{_.dispose()}),super.dispose()}};D=we([F(5,i.IInstantiationService),F(6,I.IBulkEditService),F(7,f.IUndoRedoService),F(8,u.ITextModelService)],D),e.NotebookViewModel=D;function y(T,_,L,M){return L.cellKind===n.CellKind.Code?T.createInstance(s.CodeCellViewModel,_.viewType,L,_.layoutInfo,M):T.createInstance(d.MarkupCellViewModel,_.viewType,L,_.layoutInfo,_,M)}e.createCellViewModel=y}),define(ae[2625],le([1,0,2,44,17,74,8,1820,34,39,11,18,14,47,51,46]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceChangeExtHostRelauncher=e.SettingsChangeRelauncher=void 0;let c=class extends t.Disposable{constructor(n,a,o,g){super(),this.hostService=n,this.configurationService=a,this.productService=o,this.dialogService=g,this.onConfigurationChange(a.getValue(),!1),this._register(this.configurationService.onDidChangeConfiguration(h=>this.onConfigurationChange(this.configurationService.getValue(),!0)))}onConfigurationChange(n,a){let o=!1;r.isNative&&(typeof n.window?.titleBarStyle=="string"&&n.window?.titleBarStyle!==this.titleBarStyle&&(n.window.titleBarStyle==="native"||n.window.titleBarStyle==="custom")&&(this.titleBarStyle=n.window.titleBarStyle,o=!0),r.isWindows&&typeof n.window?.experimental?.windowControlsOverlay?.enabled=="boolean"&&n.window.experimental.windowControlsOverlay.enabled!==this.windowControlsOverlayEnabled&&(this.windowControlsOverlayEnabled=n.window.experimental.windowControlsOverlay.enabled,o=!0),typeof n.window?.experimental?.useSandbox=="boolean"&&n.window.experimental.useSandbox!==this.windowSandboxEnabled&&(this.windowSandboxEnabled=n.window.experimental.useSandbox,o=!0),r.isMacintosh&&typeof n.window?.nativeTabs=="boolean"&&n.window.nativeTabs!==this.nativeTabs&&(this.nativeTabs=n.window.nativeTabs,o=!0),r.isMacintosh&&typeof n.window?.nativeFullScreen=="boolean"&&n.window.nativeFullScreen!==this.nativeFullScreen&&(this.nativeFullScreen=n.window.nativeFullScreen,o=!0),r.isMacintosh&&typeof n.window?.clickThroughInactive=="boolean"&&n.window.clickThroughInactive!==this.clickThroughInactive&&(this.clickThroughInactive=n.window.clickThroughInactive,o=!0),typeof n.update?.mode=="string"&&n.update.mode!==this.updateMode&&(this.updateMode=n.update.mode,o=!0),r.isLinux&&typeof n.editor?.accessibilitySupport=="string"&&n.editor.accessibilitySupport!==this.accessibilitySupport&&(this.accessibilitySupport=n.editor.accessibilitySupport,this.accessibilitySupport==="on"&&(o=!0)),typeof n?.security?.workspace?.trust?.enabled=="boolean"&&n.security?.workspace.trust.enabled!==this.workspaceTrustEnabled&&(this.workspaceTrustEnabled=n.security.workspace.trust.enabled,o=!0)),this.productService.quality==="stable"&&typeof n.workbench?.experimental?.settingsProfiles?.enabled=="boolean"&&n.workbench.experimental.settingsProfiles.enabled!==this.settingsProfilesEnabled&&(this.settingsProfilesEnabled=n.workbench.experimental.settingsProfiles.enabled,o=!0),typeof n.workbench?.enableExperiments=="boolean"&&n.workbench.enableExperiments!==this.experimentsEnabled&&(this.experimentsEnabled=n.workbench.enableExperiments,o=!0),this.productService.quality!=="stable"&&typeof n._extensionsGallery?.enablePPE=="boolean"&&n._extensionsGallery?.enablePPE!==this.enablePPEExtensionsGallery&&(this.enablePPEExtensionsGallery=n._extensionsGallery?.enablePPE,o=!0),a&&o&&this.doConfirm(r.isNative?(0,E.localize)(0,null):(0,E.localize)(1,null),r.isNative?(0,E.localize)(2,null,this.productService.nameLong):(0,E.localize)(3,null,this.productService.nameLong),r.isNative?(0,E.localize)(4,null):(0,E.localize)(5,null),()=>this.hostService.restart())}async doConfirm(n,a,o,g){this.hostService.hasFocus&&(await this.dialogService.confirm({type:"info",message:n,detail:a,primaryButton:o})).confirmed&&g()}};c=we([F(0,A.IHostService),F(1,k.IConfigurationService),F(2,f.IProductService),F(3,u.IDialogService)],c),e.SettingsChangeRelauncher=c;let l=class extends t.Disposable{constructor(n,a,o,g){super(),this.contextService=n,this.extensionHostRestarter=this._register(new S.RunOnceScheduler(()=>{g.extensionTestsLocationURI||(g.remoteAuthority?o.reload():r.isNative&&a.restartExtensionHost())},10)),this.contextService.getCompleteWorkspace().then(h=>{this.firstFolderResource=h.folders.length>0?h.folders[0].uri:void 0,this.handleWorkbenchState(),this._register(this.contextService.onDidChangeWorkbenchState(()=>setTimeout(()=>this.handleWorkbenchState())))}),this._register((0,t.toDisposable)(()=>{this.onDidChangeWorkspaceFoldersUnbind?.dispose()}))}handleWorkbenchState(){if(this.contextService.getWorkbenchState()===3){const n=this.contextService.getWorkspace();this.firstFolderResource=n.folders.length>0?n.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 n=this.contextService.getWorkspace(),a=n.folders.length>0?n.folders[0].uri:void 0;(0,C.isEqual)(this.firstFolderResource,a)||(this.firstFolderResource=a,this.extensionHostRestarter.schedule())}};l=we([F(0,I.IWorkspaceContextService),F(1,b.IExtensionService),F(2,A.IHostService),F(3,i.IWorkbenchEnvironmentService)],l),e.WorkspaceChangeExtHostRelauncher=l;const s=R.Registry.as(p.Extensions.Workbench);s.registerWorkbenchContribution(c,3),s.registerWorkbenchContribution(l,3)}),define(ae[2626],le([1,0,1831,55,17,214,44,2383,12,33,14]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),R.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(E.SashSettingsController,3),R.Registry.as(p.Extensions.Configuration).registerConfiguration({...A.workbenchConfigurationNodeBase,properties:{"workbench.sash.size":{type:"number",default:S.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,r)=>{const u=C.getColor(b.sashHoverBorder);r.addRule(` .monaco-sash.hover:before, .monaco-sash.active:before { background: ${u}; } `)})}),define(ae[2627],le([1,0,86,10,65,6,2,69,33,12,311,80,83,51,58,8,241,13,11,884]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartsSplash=void 0;let n=class Za{constructor(o,g,h,v,m,w,D){this._themeService=o,this._layoutService=g,this._environmentService=h,this._partSplashService=D,this._disposables=new k.DisposableStore,v.when(3).then(T=>{this._removePartsSplash(),c.mark("code/didRemovePartsSplash")});const y=new s.RunOnceScheduler(()=>this._savePartsSplash(),800);A.Event.any(t.onDidChangeFullscreen,m.onDidLayout)(()=>{y.schedule()},void 0,this._disposables),w.onDidChangeConfiguration(T=>{T.affectsConfiguration("window.titleBarStyle")&&(this._didChangeTitleBarStyle=!0,this._savePartsSplash())},this,this._disposables),o.onDidColorThemeChange(T=>{this._savePartsSplash()},this,this._disposables)}dispose(){this._disposables.dispose()}_savePartsSplash(){const o=this._themeService.getColorTheme();this._partSplashService.saveWindowSplash({baseTheme:(0,b.getThemeTypeSelector)(o.type),colorInfo:{foreground:o.getColor(I.foreground)?.toString(),background:R.Color.Format.CSS.formatHex(o.getColor(I.editorBackground)||C.WORKBENCH_BACKGROUND(o)),editorBackground:o.getColor(I.editorBackground)?.toString(),titleBarBackground:o.getColor(C.TITLE_BAR_ACTIVE_BACKGROUND)?.toString(),activityBarBackground:o.getColor(C.ACTIVITY_BAR_BACKGROUND)?.toString(),sideBarBackground:o.getColor(C.SIDE_BAR_BACKGROUND)?.toString(),statusBarBackground:o.getColor(C.STATUS_BAR_BACKGROUND)?.toString(),statusBarNoFolderBackground:o.getColor(C.STATUS_BAR_NO_FOLDER_BACKGROUND)?.toString(),windowBorder:o.getColor(C.WINDOW_ACTIVE_BORDER)?.toString()??o.getColor(C.WINDOW_INACTIVE_BORDER)?.toString()},layoutInfo:this._shouldSaveLayoutInfo()?{sideBarSide:this._layoutService.getSideBarPosition()===1?"right":"left",editorPartMinWidth:S.DEFAULT_EDITOR_MIN_DIMENSIONS.width,titleBarHeight:this._layoutService.isVisible("workbench.parts.titlebar")?(0,p.getTotalHeight)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.titlebar"))):0,activityBarWidth:this._layoutService.isVisible("workbench.parts.activitybar")?(0,p.getTotalWidth)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.activitybar"))):0,sideBarWidth:this._layoutService.isVisible("workbench.parts.sidebar")?(0,p.getTotalWidth)((0,l.assertIsDefined)(this._layoutService.getContainer("workbench.parts.sidebar"))):0,statusBarHeight:this._layoutService.isVisible("workbench.parts.statusbar")?(0,p.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 o=document.getElementById(Za._splashElementId);o&&(o.style.display="none");const g=document.head.getElementsByClassName("initialShellColors");g.length&&document.head.removeChild(g[0])}};n._splashElementId="monaco-parts-splash",n=we([F(0,b.IThemeService),F(1,r.IWorkbenchLayoutService),F(2,u.IWorkbenchEnvironmentService),F(3,E.ILifecycleService),F(4,i.IEditorGroupsService),F(5,f.IConfigurationService),F(6,d.ISplashStorageService)],n),e.PartsSplash=n}),define(ae[2628],le([1,0,17,44,884,89,35,2627]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let I=class{constructor(S){this.saveWindowSplash=S.saveWindowSplash.bind(S)}};I=we([F(0,A.INativeHostService)],I),(0,k.registerSingleton)(R.ISplashStorageService,I,1),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(E.PartsSplash,1)}),define(ae[2629],le([1,0,1864,14,44,17,27,23,46,26,41,317,9,209,11,2,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const l=1e3*60*60,s=1e3*60*2,d=1e3*60*60*24,n=1e3*60*60*4,a="ces/skipSurvey",o="ces/remindLaterDate";let g=class extends f.Disposable{constructor(v,m,w,D,y,T){super(),this.storageService=v,this.notificationService=m,this.telemetryService=w,this.openerService=D,this.productService=y,this.promptDelayer=this._register(new i.ThrottledDelayer(0)),this.tasExperimentService=T,!(!y.cesSurveyUrl||v.get(a,-1,""))&&this.schedulePrompt()}async promptUser(){if(!await this.tasExperimentService?.getTreatment("CESSurvey")){this.skipSurvey();return}const m=T=>{this.telemetryService.publicLog("cesSurvey:popup",{userReaction:T})},w=await this.tasExperimentService?.getTreatment("CESSurveyMessage")??t.localize(0,null),D=await this.tasExperimentService?.getTreatment("CESSurveyButton")??t.localize(1,null),y=this.notificationService.prompt(b.Severity.Info,w,[{label:D,run:()=>{m("accept"),this.telemetryService.getTelemetryInfo().then(T=>{let _=`${this.productService.cesSurveyUrl}?o=${encodeURIComponent(u.platform)}&v=${encodeURIComponent(this.productService.version)}&m=${encodeURIComponent(T.machineId)}`;const L=this.productService.surveys?.filter(M=>M.surveyId&&M.languageId).filter(M=>this.storageService.getNumber(`${M.surveyId}.editedCount`,-1,0)>0).map(M=>`${encodeURIComponent(M.languageId)}Lang=1`).join("&");L&&(_+=`&${L}`),this.openerService.open(r.URI.parse(_)),this.skipSurvey()})}},{label:t.localize(2,null),run:()=>{m("remindLater"),this.storageService.store(o,new Date().toUTCString(),-1,0),this.schedulePrompt()}}],{sticky:!0,onCancel:()=>{m("cancelled"),this.skipSurvey()}});await c.Event.toPromise(y.onDidClose)}async schedulePrompt(){let v=0;const m=this.storageService.get(o,-1,"");if(m){const w=new Date(m).getTime()+n-Date.now();w>0&&(v=w)}else{const w=await this.telemetryService.getTelemetryInfo(),D=Date.now()-new Date(w.firstSessionDate).getTime();if(!(!isNaN(D)&&D<d)){this.skipSurvey();return}D<l&&(v=l-D)}this.telemetryService.publicLog("cesSurvey:schedule"),this.promptDelayer.trigger(async()=>{await this.promptUser()},Math.max(v,s))}skipSurvey(){this.storageService.store(a,this.productService.version,-1,0)}};g=we([F(0,E.IStorageService),F(1,b.INotificationService),F(2,k.ITelemetryService),F(3,S.IOpenerService),F(4,I.IProductService),F(5,C.IWorkbenchAssignmentService)],g),p.language==="en"&&A.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(g,3)}),define(ae[2630],le([1,0,1866,14,44,17,27,23,46,26,41,9,209]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const u=.15,i="nps/sessionCount",f="nps/lastSessionDate",c="nps/skipVersion",l="nps/isCandidate";let s=class{constructor(n,a,o,g,h){if(!h.npsSurveyUrl||n.get(c,-1,""))return;const m=new Date().toDateString(),w=n.get(f,-1,new Date(0).toDateString());if(m===w)return;const D=(n.getNumber(i,-1,0)||0)+1;if(n.store(f,m,-1,0),n.store(i,D,-1,0),D<9)return;const y=n.getBoolean(l,-1,!1)||Math.random()<u;if(n.store(l,y,-1,0),!y){n.store(c,h.version,-1,0);return}a.prompt(b.Severity.Info,t.localize(0,null),[{label:t.localize(1,null),run:()=>{o.getTelemetryInfo().then(T=>{g.open(C.URI.parse(`${h.npsSurveyUrl}?o=${encodeURIComponent(r.platform)}&v=${encodeURIComponent(h.version)}&m=${encodeURIComponent(T.machineId)}`)),n.store(l,!1,-1,0),n.store(c,h.version,-1,0)})}},{label:t.localize(2,null),run:()=>n.store(i,D-3,-1,0)},{label:t.localize(3,null),run:()=>{n.store(l,!1,-1,0),n.store(c,h.version,-1,0)}}],{sticky:!0})}};s=we([F(0,E.IStorageService),F(1,b.INotificationService),F(2,k.ITelemetryService),F(3,S.IOpenerService),F(4,I.IProductService)],s),p.language==="en"&&A.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(s,3)}),define(ae[462],le([1,0,1894,68,2,12,186,109,290,5,185,69,7,8,189,47,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditorInput=void 0;let l=class Ns extends k.EditorInput{setGroup(d){this._group=d}get group(){return this._group}get typeId(){return Ns.ID}get editorId(){return E.terminalEditorId}get capabilities(){return 10}setTerminalInstance(d){if(this._terminalInstance)throw new Error("cannot set instance that has already been set");this._terminalInstance=d,this._setupInstanceListeners()}copy(){const d=this._terminalInstanceService.createInstance(this._copyLaunchConfig||{},S.TerminalLocation.Editor);return d.focusWhenReady(),this._copyLaunchConfig=void 0,this._instantiationService.createInstance(Ns,d.resource,d)}setCopyLaunchConfig(d){this._copyLaunchConfig=d}get terminalInstance(){return this._isDetached?void 0:this._terminalInstance}showConfirm(){if(this._isReverted)return!1;const d=this._configurationService.getValue("terminal.integrated.confirmOnKill");return(d==="editor"||d==="always")&&this._terminalInstance?.hasChildProcesses||!1}async confirm(d){const{choice:n}=await this._dialogService.show(p.default.Warning,(0,t.localize)(0,null),[(0,t.localize)(1,null),(0,t.localize)(2,null)],{cancelId:1,detail:d.length>1?d.map(a=>a.editor.getName()).join(` `)+` `+(0,t.localize)(3,null):(0,t.localize)(4,null)});switch(n){case 0:return 1;default:return 2}}async revert(){this._isReverted=!0}constructor(d,n,a,o,g,h,v,m,w){super(),this.resource=d,this._terminalInstance=n,this._themeService=a,this._terminalInstanceService=o,this._instantiationService=g,this._configurationService=h,this._lifecycleService=v,this._dialogService=w,this.closeHandler=this,this._isDetached=!1,this._isShuttingDown=!1,this._isReverted=!1,this._onDidRequestAttach=this._register(new c.Emitter),this.onDidRequestAttach=this._onDidRequestAttach.event,this._terminalEditorFocusContextKey=i.TerminalContextKeys.editorFocus.bindTo(m),n&&this._setupInstanceListeners()}_setupInstanceListeners(){const d=this._terminalInstance;if(!d)return;this._register((0,R.toDisposable)(()=>{!this._isDetached&&!this._isShuttingDown&&d.dispose(S.TerminalExitReason.User)}));const n=[d.onExit(()=>this.dispose()),d.onDisposed(()=>this.dispose()),d.onTitleChanged(()=>this._onDidChangeLabel.fire()),d.onIconChanged(()=>this._onDidChangeLabel.fire()),d.onDidFocus(()=>this._terminalEditorFocusContextKey.set(!0)),d.onDidBlur(()=>this._terminalEditorFocusContextKey.reset()),d.statusList.onDidChangePrimaryStatus(()=>this._onDidChangeLabel.fire())];this._lifecycleService.onWillShutdown(()=>{this._isShuttingDown=!0,(0,R.dispose)(n)})}getName(){return this._terminalInstance?.title||this.resource.fragment}getLabelExtraClasses(){if(!this._terminalInstance)return[];const d=["terminal-tab"],n=(0,I.getColorClass)(this._terminalInstance);n&&d.push(n);const a=(0,I.getUriClasses)(this._terminalInstance,this._themeService.getColorTheme().type);return a&&d.push(...a),A.ThemeIcon.isThemeIcon(this._terminalInstance.icon)&&d.push(`codicon-${this._terminalInstance.icon.id}`),d}detachInstance(){this._isShuttingDown||(this._terminalInstance?.detachFromElement(),this._isDetached=!0)}getDescription(){return this._terminalInstance?.description}toUntyped(){return{resource:this.resource,options:{override:E.terminalEditorId,pinned:!0,forceReload:!0}}}};l.ID="workbench.editors.terminal",l=we([F(2,A.IThemeService),F(3,E.ITerminalInstanceService),F(4,b.IInstantiationService),F(5,u.IConfigurationService),F(6,C.ILifecycleService),F(7,r.IContextKeyService),F(8,f.IDialogService)],l),e.TerminalEditorInput=l}),define(ae[2631],le([1,0,6,2,9,7,161,5,185,109,462,453,189,58,24,51,69]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalEditorService=void 0;let l=class extends p.Disposable{constructor(d,n,a,o,g,h,v){super(),this._editorService=d,this._editorGroupsService=n,this._terminalInstanceService=a,this._instantiationService=o,this._environmentService=h,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=r.TerminalContextKeys.terminalEditorActive.bindTo(v),this._register((0,p.toDisposable)(()=>{for(const m of this._instanceDisposables.values())(0,p.dispose)(m)})),this._register(g.onWillShutdown(()=>this._isShuttingDown=!0)),this._register(this._editorService.onDidActiveEditorChange(()=>{const m=this._editorService.activeEditor,w=m instanceof S.TerminalEditorInput?m?.terminalInstance:void 0,D=!!w&&m instanceof S.TerminalEditorInput;this._terminalEditorActive.set(D),D&&(m?.setGroup(this._editorService.activeEditorPane?.group),this._setActiveInstance(w))})),this._register(this._editorService.onDidVisibleEditorsChange(()=>{const m=this.instances.map(y=>y.instanceId),D=this._getActiveTerminalEditors().find(y=>{const T=y instanceof S.TerminalEditorInput?y.terminalInstance?.instanceId:void 0;return T===void 0?!1:!m.includes(T)});D instanceof S.TerminalEditorInput&&D.terminalInstance&&(this._editorInputs.set(D.terminalInstance.resource.path,D),this.instances.push(D.terminalInstance))})),this._register(this.onDidDisposeInstance(m=>this.detachInstance(m))),this._register(this._editorService.onDidCloseEditor(m=>{const w=m.editor instanceof S.TerminalEditorInput?m.editor.terminalInstance:void 0;if(w){const D=this.instances.findIndex(y=>y===w);D!==-1&&this.instances.splice(D,1)}})),this._register(this._editorService.onDidActiveEditorChange(()=>{if(!(this._editorService.activeEditor instanceof S.TerminalEditorInput?this._editorService.activeEditor:void 0))for(const w of this.instances)w.resetFocusContextKey()}))}_getActiveTerminalEditors(){return this._editorService.visibleEditors.filter(d=>d instanceof S.TerminalEditorInput&&d.terminalInstance?.instanceId)}get activeInstance(){if(!(this.instances.length===0||this._activeInstanceIndex===-1))return this.instances[this._activeInstanceIndex]}setActiveInstance(d){this._setActiveInstance(d)}async focusActiveInstance(){return this.activeInstance?.focusWhenReady(!0)}_setActiveInstance(d){d===void 0?this._activeInstanceIndex=-1:this._activeInstanceIndex=this.instances.findIndex(n=>n===d),this._onDidChangeActiveInstance.fire(this.activeInstance)}async openEditor(d,n){const a=this.resolveResource(d);a&&(await this._activeOpenEditorRequest?.promise,this._activeOpenEditorRequest={instanceId:d.instanceId,promise:this._editorService.openEditor({resource:a,description:d.description||d.shellLaunchConfig.type,options:{pinned:!0,forceReload:!0,preserveFocus:n?.preserveFocus}},n?.viewColumn||i.ACTIVE_GROUP)},await this._activeOpenEditorRequest?.promise,this._activeOpenEditorRequest=void 0)}resolveResource(d,n=!1){const a=R.URI.isUri(d)?d:d.resource,o=a.path,g=this._editorInputs.get(o);if(g)return g.resource;if(R.URI.isUri(d)){const v=(0,C.parseTerminalUri)(d);v.instanceId&&this._terminalInstanceService.getBackend(this._environmentService.remoteAuthority).then(m=>{m?.requestDetachInstance(v.workspaceId,v.instanceId).then(w=>{const D=this._terminalInstanceService.createInstance({attachPersistentProcess:w},I.TerminalLocation.Editor,a);return h=this._instantiationService.createInstance(S.TerminalEditorInput,a,D),this._editorService.openEditor(h,{pinned:!0,forceReload:!0},h.group),this._registerInstance(o,h,D),d})})}let h;return"instanceId"in d?(d.target=I.TerminalLocation.Editor,h=this._instantiationService.createInstance(S.TerminalEditorInput,a,d),this._registerInstance(o,h,d),h.resource):d}getInputFromResource(d){const n=this._editorInputs.get(d.path);if(!n)throw new Error(`Could not get input from resource: ${d.path}`);return n}_registerInstance(d,n,a){this._editorInputs.set(d,n),this._instanceDisposables.set(d,[a.onDidFocus(this._onDidFocusInstance.fire,this._onDidFocusInstance),a.onDisposed(this._onDidDisposeInstance.fire,this._onDidDisposeInstance),a.capabilities.onDidAddCapability(()=>this._onDidChangeInstanceCapability.fire(a)),a.capabilities.onDidRemoveCapability(()=>this._onDidChangeInstanceCapability.fire(a))]),this.instances.push(a),this._onDidChangeInstances.fire()}getInstanceFromResource(d){return(0,C.getInstanceFromResource)(this.instances,d)}splitInstance(d,n={}){if(d.target===I.TerminalLocation.Editor){const g=this._editorInputs.get(d.resource.path)?.group;g&&this._editorGroupsService.activateGroup(g)}const a=this._terminalInstanceService.createInstance(n,I.TerminalLocation.Editor),o=this.resolveResource(a);return o&&this._editorService.openEditor({resource:R.URI.revive(o),description:a.description,options:{pinned:!0,forceReload:!0}},i.SIDE_GROUP),a}reviveInput(d){const n=R.URI.isUri(d)?d:d.resource,a=n.path;if("pid"in d){const o={...d,findRevivedId:!0},g=this._terminalInstanceService.createInstance({attachPersistentProcess:o},I.TerminalLocation.Editor);g.target=I.TerminalLocation.Editor;const h=this._instantiationService.createInstance(S.TerminalEditorInput,n,g);return this._registerInstance(a,h,g),h}else throw new Error(`Could not revive terminal editor input, ${d}`)}detachActiveEditorInstance(){const d=this._editorService.activeEditor;if(!(d instanceof S.TerminalEditorInput))throw new Error("Active editor is not a terminal");const n=d.terminalInstance;if(!n)throw new Error("Terminal is already detached");return this.detachInstance(n),n}detachInstance(d){const n=d.resource.path,a=this._editorInputs.get(n);a?.detachInstance(),this._editorInputs.delete(n);const o=this.instances.findIndex(h=>h===d);o!==-1&&this.instances.splice(o,1),this._isShuttingDown||a?.dispose();const g=this._instanceDisposables.get(n);this._instanceDisposables.delete(n),g&&(0,p.dispose)(g),this._onDidChangeInstances.fire()}async revealActiveEditor(d){const n=this.activeInstance;if(!n||this._activeOpenEditorRequest?.instanceId===n.instanceId)return;const a=this._editorInputs.get(n.resource.path);this._editorService.openEditor(a,{pinned:!0,forceReload:!0,preserveFocus:d,activation:k.EditorActivation.PRESERVE})}};l=we([F(0,i.IEditorService),F(1,u.IEditorGroupsService),F(2,b.ITerminalInstanceService),F(3,E.IInstantiationService),F(4,c.ILifecycleService),F(5,f.IWorkbenchEnvironmentService),F(6,A.IContextKeyService)],l),e.TerminalEditorService=l}),define(ae[2632],le([1,0,10,36,6,2,1910,93,8,37,5,41,48,33,12,452,935,289,69]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationAddon=void 0;let d=class extends A.Disposable{constructor(h,v,m,w,D,y,T,_,L){super(),this._capabilities=h,this._clipboardService=v,this._contextMenuService=m,this._configurationService=w,this._themeService=D,this._openerService=y,this._quickInputService=T,this._capabilityDisposables=new Map,this._decorations=new Map,this._onDidRequestRunCommand=this._register(new R.Emitter),this.onDidRequestRunCommand=this._onDidRequestRunCommand.event,this._register((0,A.toDisposable)(()=>this._dispose())),this._register(this._configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration("terminal.integrated.fontSize")||M.affectsConfiguration("terminal.integrated.lineHeight")?this.refreshLayouts():M.affectsConfiguration("workbench.colorCustomizations")?this._refreshStyles(!0):M.affectsConfiguration("terminal.integrated.shellIntegration.decorationsEnabled")?(this._removeCapabilityDisposables(2),this._updateDecorationVisibility()):M.affectsConfiguration("task.showDecorations")&&this._updateDecorationVisibility()})),this._register(this._themeService.onDidColorThemeChange(()=>this._refreshStyles(!0))),this._updateDecorationVisibility(),this._register(this._capabilities.onDidAddCapability(M=>this._createCapabilityDisposables(M))),this._register(this._capabilities.onDidRemoveCapability(M=>this._removeCapabilityDisposables(M))),this._register(_.onWillShutdown(()=>this._disposeAllDecorations())),this._terminalDecorationHoverService=L.createInstance(c.TerminalDecorationHoverManager)}_removeCapabilityDisposables(h){const v=this._capabilityDisposables.get(h);v&&(0,A.dispose)(v),this._capabilityDisposables.delete(h)}_createCapabilityDisposables(h){let v=[];const m=this._capabilities.get(h);if(!(!m||this._capabilityDisposables.has(h))){switch(m.type){case 4:v=[m.onMarkAdded(w=>this.registerMarkDecoration(w))];break;case 2:v=this._getCommandDetectionListeners(m);break}this._capabilityDisposables.set(h,v)}}registerMarkDecoration(h){if(!(!this._terminal||!this._showGutterDecorations&&!this._showOverviewRulerDecorations)&&!h.hidden)return this.registerCommandDecoration(void 0,void 0,h)}_updateDecorationVisibility(){const h=this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled");this._showGutterDecorations=h==="both"||h==="gutter",this._showOverviewRulerDecorations=h==="both"||h==="overviewRuler",this._disposeAllDecorations(),(this._showGutterDecorations||this._showOverviewRulerDecorations)&&(this._attachToCommandCapability(),this._updateGutterDecorationVisibility());const v=this._capabilities.get(2)?.executingCommandObject;v&&this.registerCommandDecoration(v,!0)}_disposeAllDecorations(){this._placeholderDecoration?.dispose();for(const h of this._decorations.values())h.decoration.dispose(),(0,A.dispose)(h.disposables)}_updateGutterDecorationVisibility(){const h=document.querySelectorAll("terminal-command-decoration");for(const v of h)this._updateCommandDecorationVisibility(v)}_updateCommandDecorationVisibility(h){this._showGutterDecorations?h.classList.remove("hide"):h.classList.add("hide")}refreshLayouts(){(0,c.updateLayout)(this._configurationService,this._placeholderDecoration?.element);for(const h of this._decorations)(0,c.updateLayout)(this._configurationService,h[1].decoration.element)}_refreshStyles(h){if(h)for(const v of this._decorations.values()){let m=v.exitCode===void 0?o:v.exitCode?a:n;m&&typeof m!="string"?m=m.toString():m="",v.decoration.options?.overviewRulerOptions?v.decoration.options.overviewRulerOptions.color=m:v.decoration.options&&(v.decoration.options.overviewRulerOptions={color:m})}this._updateClasses(this._placeholderDecoration?.element);for(const v of this._decorations.values())this._updateClasses(v.decoration.element,v.exitCode,v.markProperties)}_dispose(){this._terminalDecorationHoverService.dispose();for(const h of this._capabilityDisposables.values())(0,A.dispose)(h);this.clearDecorations()}_clearPlaceholder(){this._placeholderDecoration?.dispose(),this._placeholderDecoration=void 0}clearDecorations(){this._placeholderDecoration?.marker.dispose(),this._clearPlaceholder(),this._disposeAllDecorations(),this._decorations.clear()}_attachToCommandCapability(){this._capabilities.has(2)&&this._getCommandDetectionListeners(this._capabilities.get(2))}_getCommandDetectionListeners(h){if(this._capabilityDisposables.has(2)){const m=this._capabilityDisposables.get(2);(0,A.dispose)(m),this._capabilityDisposables.delete(h.type)}const v=[];h.executingCommandObject?.marker&&this.registerCommandDecoration(h.executingCommandObject,!0),v.push(h.onCommandStarted(m=>this.registerCommandDecoration(m,!0)));for(const m of h.commands)this.registerCommandDecoration(m);return v.push(h.onCommandFinished(m=>this.registerCommandDecoration(m))),v.push(h.onCommandInvalidated(m=>{for(const w of m){const D=w.marker?.id;if(D){const y=this._decorations.get(D);y&&(y.decoration.dispose(),(0,A.dispose)(y.disposables))}}})),v.push(h.onCurrentCommandInvalidated(m=>{m.reason==="noProblemsReported"?Array.from(this._decorations.entries())[this._decorations.size-1]?.[1].decoration.dispose():m.reason==="windows"&&this._clearPlaceholder()})),v}activate(h){this._terminal=h,this._attachToCommandCapability()}registerCommandDecoration(h,v,m){if(!this._terminal||v&&!h||!this._showGutterDecorations&&!this._showOverviewRulerDecorations)return;const w=h?.marker||m?.marker;if(!w)throw new Error(`cannot add a decoration for a command ${JSON.stringify(h)} with no marker`);this._clearPlaceholder();let D=h?.exitCode===void 0?o:h.exitCode?a:n;D&&typeof D!="string"?D=D.toString():D="";const y=this._terminal.registerDecoration({marker:w,overviewRulerOptions:this._showOverviewRulerDecorations?v?{color:D,position:"left"}:{color:D,position:h?.exitCode?"right":"left"}:void 0});if(!!y)return v&&(this._placeholderDecoration=y),y.onRender(T=>{T.classList.contains(".xterm-decoration-overview-ruler")||(this._decorations.get(y.marker.id)||(y.onDispose(()=>this._decorations.delete(y.marker.id)),this._decorations.set(y.marker.id,{decoration:y,disposables:this._createDisposables(T,h,m),exitCode:h?.exitCode,markProperties:h?.markProperties})),(!T.classList.contains("codicon")||h?.marker?.line===0)&&((0,c.updateLayout)(this._configurationService,T),this._updateClasses(T,h?.exitCode,h?.markProperties||m)))}),y}_createDisposables(h,v,m){return v?.exitCode===void 0&&!v?.markProperties?[]:v?.markProperties||m?[this._terminalDecorationHoverService.createHover(h,v||m,m?.hoverMessage)]:[this._createContextMenu(h,v),this._terminalDecorationHoverService.createHover(h,v)]}_updateClasses(h,v,m){if(!!h){for(const w of h.classList)h.classList.remove(w);h.classList.add("terminal-command-decoration","codicon","xterm-decoration"),m?(h.classList.add("default-color",...i.ThemeIcon.asClassNameArray(f.terminalDecorationMark)),m.hoverMessage||h.classList.add("default")):(this._updateCommandDecorationVisibility(h),v===void 0?(h.classList.add("default-color","default"),h.classList.add(...i.ThemeIcon.asClassNameArray(f.terminalDecorationIncomplete))):v?(h.classList.add("error"),h.classList.add(...i.ThemeIcon.asClassNameArray(f.terminalDecorationError))):h.classList.add(...i.ThemeIcon.asClassNameArray(f.terminalDecorationSuccess)))}}_createContextMenu(h,v){return t.addDisposableListener(h,t.EventType.CLICK,async()=>{this._terminalDecorationHoverService.hideHover();const m=await this._getCommandActions(v);this._contextMenuService.showContextMenu({getAnchor:()=>h,getActions:()=>m})})}async _getCommandActions(h){const v=[];if(h.command!==""){const D=(0,k.localize)(0,null);v.push({class:void 0,tooltip:D,id:"terminal.rerunCommand",label:D,enabled:!0,run:()=>this._onDidRequestRunCommand.fire({command:h})});const y=(0,k.localize)(1,null);v.push({class:void 0,tooltip:y,id:"terminal.copyCommand",label:y,enabled:!0,run:()=>this._clipboardService.writeText(h.command)})}if(h.hasOutput()){v.length>0&&v.push(new p.Separator);const D=(0,k.localize)(2,null);v.push({class:void 0,tooltip:D,id:"terminal.copyOutput",label:D,enabled:!0,run:()=>{const T=h.getOutput();typeof T=="string"&&this._clipboardService.writeText(T)}});const y=(0,k.localize)(3,null);v.push({class:void 0,tooltip:y,id:"terminal.copyOutputAsHtml",label:y,enabled:!0,run:()=>this._onDidRequestRunCommand.fire({command:h,copyAsHtml:!0})})}v.length>0&&v.push(new p.Separator);const m=(0,k.localize)(4,null);v.push({class:void 0,tooltip:m,id:"terminal.configureCommandDecorations",label:m,enabled:!0,run:()=>this._showConfigureCommandDecorationsQuickPick()});const w=(0,k.localize)(5,null);return v.push({class:void 0,tooltip:w,id:"terminal.learnShellIntegration",label:w,enabled:!0,run:()=>this._openerService.open("https://code.visualstudio.com/docs/terminal/shell-integration")}),v}async _showConfigureCommandDecorationsQuickPick(){const h=this._quickInputService.createQuickPick();h.items=[{id:"a",label:(0,k.localize)(6,null)}],h.canSelectMany=!1,h.onDidAccept(async v=>{switch(h.hide(),h.activeItems[0].id){case"a":this._showToggleVisibilityQuickPick();break}}),h.show()}_showToggleVisibilityQuickPick(){const h=this._quickInputService.createQuickPick();h.hideInput=!0,h.hideCheckAll=!0,h.canSelectMany=!0,h.title=(0,k.localize)(7,null);const v=this._configurationService.getValue("terminal.integrated.shellIntegration.decorationsEnabled"),m={label:(0,k.localize)(8,null),picked:v!=="never"&&v!=="overviewRuler"},w={label:(0,k.localize)(9,null),picked:v!=="never"&&v!=="gutter"};h.items=[m,w];const D=[];v!=="never"&&(v!=="gutter"&&D.push(m),v!=="overviewRuler"&&D.push(w)),h.selectedItems=D,h.onDidChangeSelection(async y=>{let T="never";y.includes(m)?y.includes(w)?T="both":T="gutter":y.includes(w)&&(T="overviewRuler"),await this._configurationService.updateValue("terminal.integrated.shellIntegration.decorationsEnabled",T)}),h.ok=!1,h.show()}};d=we([F(1,E.IClipboardService),F(2,b.IContextMenuService),F(3,I.IConfigurationService),F(4,i.IThemeService),F(5,C.IOpenerService),F(6,r.IQuickInputService),F(7,s.ILifecycleService),F(8,S.IInstantiationService)],d),e.DecorationAddon=d;let n,a,o;(0,i.registerThemingParticipant)((g,h)=>{n=g.getColor(l.TERMINAL_COMMAND_DECORATION_SUCCESS_BACKGROUND_COLOR),a=g.getColor(l.TERMINAL_COMMAND_DECORATION_ERROR_BACKGROUND_COLOR),o=g.getColor(l.TERMINAL_COMMAND_DECORATION_DEFAULT_BACKGROUND_COLOR);const v=g.getColor(u.toolbarHoverBackground);n&&h.addRule(`.terminal-command-decoration { color: ${n.toString()}; } `),a&&h.addRule(`.terminal-command-decoration.error { color: ${a.toString()}; } `),o&&h.addRule(`.terminal-command-decoration.default-color { color: ${o.toString()};} `),v&&h.addRule(`.terminal-command-decoration:not(.default-color):hover { background-color: ${v.toString()}; }`)})}),define(ae[2633],le([1,0,8,2,185,127,86,25,23,26,2409,1913,12,45,33,80,289,2145,5,2632,6,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XtermTerminal=void 0;const o=50,g=20,h=125;let v,m,w,D,y;function T(L,M){let O=M.getLine(L);if(!O)return{lineData:void 0,lineIndex:L};let N=O.translateToString(!0);for(;L>0&&O.isWrapped&&(O=M.getLine(--L),!!O);)N=O.translateToString(!1)+N;return{lineData:N,lineIndex:L}}let _=class zi extends p.DisposableStore{*getBufferReverseIterator(){for(let M=this.raw.buffer.active.length;M>=0;M--){const{lineData:O,lineIndex:N}=T(M,this.raw.buffer.active);O&&(M=N,yield O)}}get findResult(){return this._lastFindResult}get markTracker(){return this._markNavigationAddon}get shellIntegration(){return this._shellIntegrationAddon}set target(M){this._target=M}get target(){return this._target}get textureAtlas(){const M=this._webglAddon?.textureAtlas||this._canvasAddon?.textureAtlas;if(!!M)return createImageBitmap(M)}constructor(M,O,N,P,B,V,z,x,H,W,U,$,q,X,G){super(),this._configHelper=O,this._capabilities=V,this._configurationService=x,this._instantiationService=H,this._logService=W,this._notificationService=U,this._storageService=$,this._themeService=q,this._viewDescriptorService=X,this._telemetryService=G,this._onDidRequestRunCommand=new n.Emitter,this.onDidRequestRunCommand=this._onDidRequestRunCommand.event,this._onDidRequestFreePort=new n.Emitter,this.onDidRequestFreePort=this._onDidRequestFreePort.event,this._onDidChangeFindResults=new n.Emitter,this.onDidChangeFindResults=this._onDidChangeFindResults.event,this._onDidChangeSelection=new n.Emitter,this.onDidChangeSelection=this._onDidChangeSelection.event,this.target=B;const Q=this._configHelper.getFont(void 0,!0),j=this._configHelper.config,K=this._configurationService.getValue("editor");this.raw=this.add(new M({allowProposedApi:!0,cols:N,rows:P,altClickMovesCursor:j.altClickMovesCursor&&K.multiCursorModifier==="alt",scrollback:j.scrollback,theme:this._getXtermTheme(),drawBoldTextInBrightColors:j.drawBoldTextInBrightColors,fontFamily:Q.fontFamily,fontWeight:j.fontWeight,fontWeightBold:j.fontWeightBold,fontSize:Q.fontSize,letterSpacing:Q.letterSpacing,lineHeight:Q.lineHeight,minimumContrastRatio:j.minimumContrastRatio,cursorBlink:j.cursorBlinking,cursorStyle:j.cursorStyle==="line"?"bar":j.cursorStyle,cursorWidth:j.cursorWidth,macOptionIsMeta:j.macOptionIsMeta,macOptionClickForcesSelection:j.macOptionClickForcesSelection,rightClickSelectsWord:j.rightClickBehavior==="selectWord",fastScrollModifier:"alt",fastScrollSensitivity:j.fastScrollSensitivity,scrollSensitivity:j.mouseWheelScrollSensitivity,wordSeparator:j.wordSeparators,overviewRulerWidth:10,smoothScrollDuration:j.smoothScrolling?h:0})),this._core=this.raw._core,this.add(this._configurationService.onDidChangeConfiguration(async Y=>{Y.affectsConfiguration("terminal.integrated.gpuAcceleration")&&(zi._suggestedRendererType=void 0),(Y.affectsConfiguration("terminal.integrated")||Y.affectsConfiguration("editor.fastScrollSensitivity")||Y.affectsConfiguration("editor.mouseWheelScrollSensitivity")||Y.affectsConfiguration("editor.multiCursorModifier"))&&this.updateConfig(),Y.affectsConfiguration("terminal.integrated.unicodeVersion")&&this._updateUnicodeVersion()})),this.add(this._themeService.onDidColorThemeChange(Y=>this._updateTheme(Y))),this.add(this._viewDescriptorService.onDidChangeLocation(({views:Y})=>{Y.some(ee=>ee.id===A.TERMINAL_VIEW_ID)&&(this._updateTheme(),this._decorationAddon.refreshLayouts())})),this.add(this.raw.onSelectionChange(()=>this._onDidChangeSelection.fire())),this._updateUnicodeVersion(),this._markNavigationAddon=this._instantiationService.createInstance(S.MarkNavigationAddon,V),this.raw.loadAddon(this._markNavigationAddon),this._decorationAddon=this._instantiationService.createInstance(d.DecorationAddon,this._capabilities),this._decorationAddon.onDidRequestRunCommand(Y=>this._onDidRequestRunCommand.fire(Y)),this.raw.loadAddon(this._decorationAddon),this._shellIntegrationAddon=this._instantiationService.createInstance(l.ShellIntegrationAddon,z,this._telemetryService),this.raw.loadAddon(this._shellIntegrationAddon)}async getSelectionAsHtml(M){if(!this._serializeAddon){const N=await this._getSerializeAddonConstructor();this._serializeAddon=new N,this.raw.loadAddon(this._serializeAddon)}if(M){const N=M.getOutput()?.length,P=M.marker?.line;if(!N||!P)throw new Error(`No row ${P} or output length ${N} for command ${M}`);await this.raw.select(0,P+1,N-Math.floor(N/this.raw.cols))}const O=this._serializeAddon.serializeAsHTML({onlySelection:!0});return M&&this.raw.clearSelection(),O}attachToElement(M){return this._updateTheme(),this._container||this.raw.open(M),this._shouldLoadWebgl()?this._enableWebglRenderer():this._shouldLoadCanvas()&&this._enableCanvasRenderer(),this._container=M,this._container.querySelector(".xterm-screen")}updateConfig(){const M=this._configHelper.config;this.raw.options.altClickMovesCursor=M.altClickMovesCursor,this._setCursorBlink(M.cursorBlinking),this._setCursorStyle(M.cursorStyle),this._setCursorWidth(M.cursorWidth),this.raw.options.scrollback=M.scrollback,this.raw.options.drawBoldTextInBrightColors=M.drawBoldTextInBrightColors,this.raw.options.minimumContrastRatio=M.minimumContrastRatio,this.raw.options.fastScrollSensitivity=M.fastScrollSensitivity,this.raw.options.scrollSensitivity=M.mouseWheelScrollSensitivity,this.raw.options.macOptionIsMeta=M.macOptionIsMeta;const O=this._configurationService.getValue("editor");this.raw.options.altClickMovesCursor=M.altClickMovesCursor&&O.multiCursorModifier==="alt",this.raw.options.macOptionClickForcesSelection=M.macOptionClickForcesSelection,this.raw.options.rightClickSelectsWord=M.rightClickBehavior==="selectWord",this.raw.options.wordSeparator=M.wordSeparators,this.raw.options.customGlyphs=M.customGlyphs,this.raw.options.smoothScrollDuration=M.smoothScrolling?h:0,this._shouldLoadWebgl()?this._enableWebglRenderer():(this._disposeOfWebglRenderer(),this._shouldLoadCanvas()?this._enableCanvasRenderer():this._disposeOfCanvasRenderer())}_shouldLoadWebgl(){return!k.isSafari&&this._configHelper.config.gpuAcceleration==="auto"&&zi._suggestedRendererType===void 0||this._configHelper.config.gpuAcceleration==="on"}_shouldLoadCanvas(){return this._configHelper.config.gpuAcceleration==="auto"&&(zi._suggestedRendererType===void 0||zi._suggestedRendererType==="canvas")||this._configHelper.config.gpuAcceleration==="canvas"}forceRedraw(){this.raw.clearTextureAtlas()}clearDecorations(){this._decorationAddon?.clearDecorations()}forceRefresh(){this._core.viewport?._innerRefresh()}forceUnpause(){this._canvasAddon&&(this._core._renderService?._onIntersectionChange({intersectionRatio:1}),this.raw.refresh(0,this.raw.rows-1))}async findNext(M,O){return this._updateFindColors(O),(await this._getSearchAddon()).findNext(M,O)}async findPrevious(M,O){return this._updateFindColors(O),(await this._getSearchAddon()).findPrevious(M,O)}_updateFindColors(M){const O=this._themeService.getColorTheme(),N=O.getColor(c.TERMINAL_BACKGROUND_COLOR)||O.getColor(f.PANEL_BACKGROUND),P=O.getColor(c.TERMINAL_FIND_MATCH_BACKGROUND_COLOR),B=O.getColor(c.TERMINAL_FIND_MATCH_BORDER_COLOR),V=O.getColor(c.TERMINAL_OVERVIEW_RULER_CURSOR_FOREGROUND_COLOR),z=O.getColor(c.TERMINAL_FIND_MATCH_HIGHLIGHT_BACKGROUND_COLOR),x=O.getColor(c.TERMINAL_FIND_MATCH_HIGHLIGHT_BORDER_COLOR),H=O.getColor(c.TERMINAL_OVERVIEW_RULER_FIND_MATCH_FOREGROUND_COLOR);M.decorations={activeMatchBackground:P?.toString(),activeMatchBorder:B?.toString()||"transparent",activeMatchColorOverviewRuler:V?.toString()||"transparent",matchBackground:N?z?.blend(N).toString():void 0,matchBorder:x?.toString()||"transparent",matchOverviewRuler:H?.toString()||"transparent"}}async _getSearchAddon(){if(this._searchAddon)return this._searchAddon;const M=await this._getSearchAddonConstructor();return this._searchAddon=new M,this.raw.loadAddon(this._searchAddon),this._searchAddon.onDidChangeResults(O=>{this._lastFindResult=O,this._onDidChangeFindResults.fire(O)}),this._searchAddon}clearSearchDecorations(){this._searchAddon?.clearDecorations()}clearActiveSearchDecoration(){this._searchAddon?.clearActiveDecoration()}getFont(){return this._configHelper.getFont(this._core)}getLongestViewportWrappedLineLength(){let M=0;for(let O=this.raw.buffer.active.length-1;O>=this.raw.buffer.active.viewportY;O--){const N=this._getWrappedLineCount(O,this.raw.buffer.active);M=Math.max(M,N.lineCount*this.raw.cols-N.endSpaces||0),O=N.currentIndex}return M}_getWrappedLineCount(M,O){let N=O.getLine(M);if(!N)throw new Error("Could not get line");let P=M,B=0;for(let V=Math.min(N.length,this.raw.cols)-1;V>=0&&!N?.getCell(V)?.getChars();V--)B++;for(;N?.isWrapped&&P>0;)P--,N=O.getLine(P);return{lineCount:M-P+1,currentIndex:P,endSpaces:B}}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._capabilities.get(2)?.handlePromptStart(),this._capabilities.get(2)?.handleCommandStart()}_setCursorBlink(M){this.raw.options.cursorBlink!==M&&(this.raw.options.cursorBlink=M,this.raw.refresh(0,this.raw.rows-1))}_setCursorStyle(M){this.raw.options.cursorStyle!==M&&(this.raw.options.cursorStyle=M==="line"?"bar":M)}_setCursorWidth(M){this.raw.options.cursorWidth!==M&&(this.raw.options.cursorWidth=M)}async _enableWebglRenderer(){if(!this.raw.element||this._webglAddon)return;const M=await this._getWebglAddonConstructor();this._webglAddon=new M,this._disposeOfCanvasRenderer();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()})}catch(O){this._logService.warn("Webgl could not be loaded. Falling back to the canvas renderer type.",O),!this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime",-1,!1)&&this._configHelper.config.gpuAcceleration!=="off"&&this._measureRenderTime(),zi._suggestedRendererType="canvas",this._disposeOfWebglRenderer(),this._enableCanvasRenderer()}}async _enableCanvasRenderer(){if(!this.raw.element||this._canvasAddon)return;const M=await this._getCanvasAddonConstructor();this._canvasAddon=new M,this._disposeOfWebglRenderer();try{this.raw.loadAddon(this._canvasAddon),this._logService.trace("Canvas was loaded")}catch(O){this._logService.warn("Canvas could not be loaded. Falling back to the dom renderer type.",O),!this._storageService.getBoolean("terminal.integrated.neverMeasureRenderTime",-1,!1)&&this._configHelper.config.gpuAcceleration!=="off"&&this._measureRenderTime(),zi._suggestedRendererType="dom",this._disposeOfCanvasRenderer()}}async _getCanvasAddonConstructor(){return v||(v=(await new Promise((M,O)=>{J(["xterm-addon-canvas"],M,O)})).CanvasAddon),v}async _getSearchAddonConstructor(){return m||(m=(await new Promise((M,O)=>{J(["xterm-addon-search"],M,O)})).SearchAddon),m}async _getUnicode11Constructor(){return D||(D=(await new Promise((M,O)=>{J(["xterm-addon-unicode11"],M,O)})).Unicode11Addon),D}async _getWebglAddonConstructor(){return y||(y=(await new Promise((M,O)=>{J(["xterm-addon-webgl"],M,O)})).WebglAddon),y}async _getSerializeAddonConstructor(){return w||(w=(await new Promise((M,O)=>{J(["xterm-addon-serialize"],M,O)})).SerializeAddon),w}_disposeOfCanvasRenderer(){try{this._canvasAddon?.dispose()}catch{}this._canvasAddon=void 0}_disposeOfWebglRenderer(){try{this._webglAddon?.dispose()}catch{}this._webglAddon=void 0}async _measureRenderTime(){const M=[];if(!this._core._renderService?._renderer._renderLayers)return;const O=this._core._renderService._renderer._renderLayers[0],N=O?.onGridChanged,P=()=>{if(M.shift(),M.sort((V,z)=>V-z)[Math.floor(M.length/2)]>o)if(this._configHelper.config.gpuAcceleration==="auto")zi._suggestedRendererType="dom",this.updateConfig();else{const V=[{label:(0,C.localize)(0,null),run:()=>this._configurationService.updateValue("terminal.integrated.gpuAcceleration","off",2)},{label:(0,C.localize)(1,null),run:()=>{}},{label:(0,C.localize)(2,null),isSecondary:!0,run:()=>this._storageService.store("terminal.integrated.neverMeasureRenderTime",!0,-1,1)}];this._notificationService.prompt(b.Severity.Warning,(0,C.localize)(3,null),V)}};O.onGridChanged=(B,V,z)=>{const x=performance.now();N.call(O,B,V,z),M.push(performance.now()-x),M.length===g&&(P(),O.onGridChanged=N)}}_getXtermTheme(M){M||(M=this._themeService.getColorTheme());const O=this._viewDescriptorService.getViewLocationById(A.TERMINAL_VIEW_ID),N=M.getColor(c.TERMINAL_FOREGROUND_COLOR);let P;this.target===R.TerminalLocation.Editor?P=M.getColor(c.TERMINAL_BACKGROUND_COLOR)||M.getColor(i.editorBackground):P=M.getColor(c.TERMINAL_BACKGROUND_COLOR)||(O===1?M.getColor(f.PANEL_BACKGROUND):M.getColor(f.SIDE_BAR_BACKGROUND));const B=M.getColor(c.TERMINAL_CURSOR_FOREGROUND_COLOR)||N,V=M.getColor(c.TERMINAL_CURSOR_BACKGROUND_COLOR)||P,z=M.getColor(c.TERMINAL_SELECTION_BACKGROUND_COLOR),x=M.getColor(c.TERMINAL_INACTIVE_SELECTION_BACKGROUND_COLOR),H=M.getColor(c.TERMINAL_SELECTION_FOREGROUND_COLOR)||void 0;return{background:P?.toString(),foreground:N?.toString(),cursor:B?.toString(),cursorAccent:V?.toString(),selectionBackground:z?.toString(),selectionInactiveBackground:x?.toString(),selectionForeground:H?.toString(),black:M.getColor(c.ansiColorIdentifiers[0])?.toString(),red:M.getColor(c.ansiColorIdentifiers[1])?.toString(),green:M.getColor(c.ansiColorIdentifiers[2])?.toString(),yellow:M.getColor(c.ansiColorIdentifiers[3])?.toString(),blue:M.getColor(c.ansiColorIdentifiers[4])?.toString(),magenta:M.getColor(c.ansiColorIdentifiers[5])?.toString(),cyan:M.getColor(c.ansiColorIdentifiers[6])?.toString(),white:M.getColor(c.ansiColorIdentifiers[7])?.toString(),brightBlack:M.getColor(c.ansiColorIdentifiers[8])?.toString(),brightRed:M.getColor(c.ansiColorIdentifiers[9])?.toString(),brightGreen:M.getColor(c.ansiColorIdentifiers[10])?.toString(),brightYellow:M.getColor(c.ansiColorIdentifiers[11])?.toString(),brightBlue:M.getColor(c.ansiColorIdentifiers[12])?.toString(),brightMagenta:M.getColor(c.ansiColorIdentifiers[13])?.toString(),brightCyan:M.getColor(c.ansiColorIdentifiers[14])?.toString(),brightWhite:M.getColor(c.ansiColorIdentifiers[15])?.toString()}}_updateTheme(M){this.raw.options.theme=this._getXtermTheme(M)}async _updateUnicodeVersion(){if(!this._unicode11Addon&&this._configHelper.config.unicodeVersion==="11"){const M=await this._getUnicode11Constructor();this._unicode11Addon=new M,this.raw.loadAddon(this._unicode11Addon)}this.raw.unicode.activeVersion!==this._configHelper.config.unicodeVersion&&(this.raw.unicode.activeVersion=this._configHelper.config.unicodeVersion)}_writeText(M){this.raw.write(M)}};_._suggestedRendererType=void 0,_=we([F(7,t.IConfigurationService),F(8,s.IInstantiationService),F(9,E.ILogService),F(10,b.INotificationService),F(11,I.IStorageService),F(12,r.IThemeService),F(13,u.IViewDescriptorService),F(14,a.ITelemetryService)],_),e.XtermTerminal=_}),define(ae[2634],le([1,0,10,8,69]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewIconManager=void 0;let A=class{constructor(E,I){this._lifecycleService=E,this._configService=I,this._icons=new Map,this._configService.onDidChangeConfiguration(b=>{b.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(E,I){I?this._icons.set(E,I):this._icons.delete(E),this.updateStyleSheet()}async updateStyleSheet(){await this._lifecycleService.when(1);const E=[];if(this._configService.getValue("workbench.iconTheme")!==null)for(const[I,b]of this._icons){const S=`.show-file-icons .webview-${I}-name-file-icon::before`;try{E.push(`.monaco-workbench.vs ${S}, .monaco-workbench.hc-light ${S} { content: ""; background-image: ${t.asCSSUrl(b.light)}; }`,`.monaco-workbench.vs-dark ${S}, .monaco-workbench.hc-black ${S} { content: ""; background-image: ${t.asCSSUrl(b.dark)}; }`)}catch{}}this.styleElement.textContent=E.join(` `)}};A=we([F(0,R.ILifecycleService),F(1,p.IConfigurationService)],A),e.WebviewIconManager=A});var yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)},Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t};define(ae[350],le([1,0,11,32,112,21,6,88,2,7,161,5,230,202,545,2634,24,316]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";var s,d;Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewEditorService=e.LazilyResolvedWebviewEditorInput=e.IWebviewWorkbenchService=void 0,e.IWebviewWorkbenchService=(0,C.createDecorator)("webviewEditorService");function n(h,v){return h.canResolve(v)}let a=class extends l.WebviewInput{constructor(v,m,w){super(v,m,w.iconManager),this._webviewWorkbenchService=w,s.set(this,!1),d.set(this,void 0)}dispose(){super.dispose(),yt(this,d,"f")?.cancel(),Ut(this,d,void 0,"f")}async resolve(){if(!yt(this,s,"f")){Ut(this,s,!0,"f"),Ut(this,d,(0,t.createCancelablePromise)(v=>this._webviewWorkbenchService.resolveWebview(this,v)),"f");try{await yt(this,d,"f")}catch(v){if(!(0,A.isCancellationError)(v))throw v}}return super.resolve()}transfer(v){if(!!super.transfer(v))return Ut(v,s,yt(this,s,"f"),"f"),v}};s=new WeakMap,d=new WeakMap,we([R.memoize],a.prototype,"resolve",null),a=we([F(2,e.IWebviewWorkbenchService)],a),e.LazilyResolvedWebviewEditorInput=a;class o{constructor(){this._awaitingRevival=[]}enqueueForRestoration(v,m){const w=new t.DeferredPromise,D=()=>{const T=this._awaitingRevival.findIndex(_=>v===_.input);T>=0&&this._awaitingRevival.splice(T,1)},y=(0,I.combinedDisposable)(v.webview.onDidDispose(D),m.onCancellationRequested(()=>{D(),w.cancel()}));return this._awaitingRevival.push({input:v,promise:w,disposable:y}),w.p}reviveFor(v,m){const w=this._awaitingRevival.filter(({input:D})=>n(v,D));this._awaitingRevival=this._awaitingRevival.filter(({input:D})=>!n(v,D));for(const{input:D,promise:y,disposable:T}of w)v.resolveWebview(D,m).then(_=>y.complete(_),_=>y.error(_)).finally(()=>{T.dispose()})}}let g=class extends I.Disposable{constructor(v,m,w,D){super(),this._editorService=m,this._instantiationService=w,this._webviewService=D,this._revivers=new Set,this._revivalPool=new o,this._onDidChangeActiveWebviewEditor=this._register(new k.Emitter),this.onDidChangeActiveWebviewEditor=this._onDidChangeActiveWebviewEditor.event,this._activeWebviewPanelIdContext=i.CONTEXT_ACTIVE_WEBVIEW_PANEL_ID.bindTo(v),this._iconManager=this._register(this._instantiationService.createInstance(f.WebviewIconManager)),this._register(m.onDidActiveEditorChange(()=>{this.updateActiveWebview()})),this._register(D.onDidChangeActiveWebview(()=>{this.updateActiveWebview()})),this.updateActiveWebview()}get iconManager(){return this._iconManager}updateActiveWebview(){const v=this._editorService.activeEditor;let m;v instanceof l.WebviewInput?m=v:v instanceof r.DiffEditorInput&&(v.primary instanceof l.WebviewInput&&v.primary.webview===this._webviewService.activeWebview?m=v.primary:v.secondary instanceof l.WebviewInput&&v.secondary.webview===this._webviewService.activeWebview&&(m=v.secondary)),m?this._activeWebviewPanelIdContext.set(m.webview.providedViewType??""):this._activeWebviewPanelIdContext.reset(),m!==this._activeWebview&&(this._activeWebview=m,this._onDidChangeActiveWebviewEditor.fire(m))}openWebview(v,m,w,D){const y=this._webviewService.createWebviewOverlay(v),T=this._instantiationService.createInstance(l.WebviewInput,{id:v.id,viewType:m,name:w,providedId:v.providedViewType},y,this.iconManager);return this._editorService.openEditor(T,{pinned:!0,preserveFocus:D.preserveFocus,activation:D.preserveFocus?S.EditorActivation.RESTORE:void 0},D.group),T}revealWebview(v,m,w){const D=this.findTopLevelEditorForWebview(v);this._editorService.openEditor(D,{preserveFocus:w,activation:w?S.EditorActivation.RESTORE:void 0},m)}findTopLevelEditorForWebview(v){for(const m of this._editorService.editors)if(m===v||m instanceof r.DiffEditorInput&&(v===m.primary||v===m.secondary))return m;return v}openRevivedWebview(v){const m=this._webviewService.createWebviewOverlay(v.webviewInitInfo);m.state=v.state;const w=this._instantiationService.createInstance(a,{id:v.webviewInitInfo.id,viewType:v.viewType,providedId:v.webviewInitInfo.providedViewType,name:v.title},m);return w.iconPath=v.iconPath,typeof v.group=="number"&&w.updateGroup(v.group),w}registerResolver(v){this._revivers.add(v);const m=new p.CancellationTokenSource;return this._revivalPool.reviveFor(v,m.token),(0,I.toDisposable)(()=>{this._revivers.delete(v),m.dispose(!0)})}shouldPersist(v){return v instanceof a?!0:E.Iterable.some(this._revivers.values(),m=>n(m,v))}async tryRevive(v,m){for(const w of this._revivers.values())if(n(w,v))return await w.resolveWebview(v,m),!0;return!1}async resolveWebview(v,m){if(!await this.tryRevive(v,m)&&!m.isCancellationRequested)return this._revivalPool.enqueueForRestoration(v,m)}setIcons(v,m){this._iconManager.setIcons(v,m)}};g=we([F(0,b.IContextKeyService),F(1,c.IEditorService),F(2,C.IInstantiationService),F(3,u.IWebviewService)],g),e.WebviewEditorService=g}),define(ae[2635],le([1,0,21,2,9,8,23,27,460,67,230,202,316,350,273,58,24,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewPanels=void 0;class s{constructor(){this._handlesToInputs=new Map,this._inputsToHandles=new Map}add(h,v){this._handlesToInputs.set(h,v),this._inputsToHandles.set(v,h)}getHandleForInput(h){return this._inputsToHandles.get(h)}getInputForHandle(h){return this._handlesToInputs.get(h)}delete(h){const v=this.getInputForHandle(h);this._handlesToInputs.delete(h),v&&this._inputsToHandles.delete(v)}get size(){return this._handlesToInputs.size}[Symbol.iterator](){return this._handlesToInputs.values()}}class d{constructor(h){this.prefix=h}fromExternal(h){return this.prefix+h}toExternal(h){return h.startsWith(this.prefix)?h.substr(this.prefix.length):void 0}}let n=class extends p.Disposable{constructor(h,v,m,w,D,y,T,_,L){super(),this._mainThreadWebviews=v,this._configurationService=m,this._editorGroupService=w,this._editorService=D,this._telemetryService=_,this._webviewWorkbenchService=L,this.webviewPanelViewType=new d("mainThreadWebview-"),this._webviewInputs=new s,this._revivers=this._register(new p.DisposableMap),this.webviewOriginStore=new C.ExtensionKeyedWebviewOriginStore("mainThreadWebviewPanel.origins",T),this._proxy=h.getProxy(b.ExtHostContext.ExtHostWebviewPanels),this._register(D.onDidActiveEditorChange(()=>{this.updateWebviewViewStates(this._editorService.activeEditor)})),this._register(D.onDidVisibleEditorsChange(()=>{this.updateWebviewViewStates(this._editorService.activeEditor)})),this._register(L.onDidChangeActiveWebviewEditor(M=>{this.updateWebviewViewStates(M)})),this._register(L.registerResolver({canResolve:M=>{const O=this.webviewPanelViewType.toExternal(M.viewType);return typeof O=="string"&&y.activateByEvent(`onWebviewPanel:${O}`),!1},resolveWebview:()=>{throw new Error("not implemented")}}))}get webviewInputs(){return this._webviewInputs}addWebviewInput(h,v,m){this._webviewInputs.add(h,v),this._mainThreadWebviews.addWebview(h,v.webview,m),v.webview.onDidDispose(()=>{this._proxy.$onDidDisposeWebviewPanel(h).finally(()=>{this._webviewInputs.delete(h)})})}$createWebviewPanel(h,v,m,w,D){const y=this.getTargetGroupFromShowOptions(D),T=D?{preserveFocus:!!D.preserveFocus,group:y}:{},_=(0,I.reviveWebviewExtension)(h),L=this.webviewOriginStore.getOrigin(m,_.id),M=this._webviewWorkbenchService.openWebview({id:v,origin:L,providedViewType:m,options:o(w.panelOptions),contentOptions:(0,I.reviveWebviewContentOptions)(w.webviewOptions),extension:_},this.webviewPanelViewType.fromExternal(m),w.title,T);this.addWebviewInput(v,M,{serializeBuffersForPostMessage:w.serializeBuffersForPostMessage});const O={extensionId:_.id.value,viewType:m};this._telemetryService.publicLog2("webviews:createWebviewPanel",O)}$disposeWebview(h){this.getWebviewInput(h).dispose()}$setTitle(h,v){this.getWebviewInput(h).setName(v)}$setIconPath(h,v){const m=this.getWebviewInput(h);m.iconPath=a(v)}$reveal(h,v){const m=this.getWebviewInput(h);if(m.isDisposed())return;const w=this.getTargetGroupFromShowOptions(v);this._webviewWorkbenchService.revealWebview(m,w,!!v.preserveFocus)}getTargetGroupFromShowOptions(h){if(typeof h.viewColumn>"u"||h.viewColumn===c.ACTIVE_GROUP||this._editorGroupService.count===1&&this._editorGroupService.activeGroup.isEmpty)return c.ACTIVE_GROUP;if(h.viewColumn===c.SIDE_GROUP)return c.SIDE_GROUP;if(h.viewColumn>=0){const v=this._editorGroupService.getGroups(2)[h.viewColumn];if(v)return v.id;const m=this._editorGroupService.findGroup({location:1});if(m){const w=(0,f.preferredSideBySideGroupDirection)(this._configurationService);return this._editorGroupService.addGroup(m,w)}}return c.ACTIVE_GROUP}$registerSerializer(h,v){if(this._revivers.has(h))throw new Error(`Reviver for ${h} already registered`);this._revivers.set(h,this._webviewWorkbenchService.registerResolver({canResolve:m=>m.viewType===this.webviewPanelViewType.fromExternal(h),resolveWebview:async m=>{const w=this.webviewPanelViewType.toExternal(m.viewType);if(!w){m.webview.html=this._mainThreadWebviews.getWebviewResolvedFailedContent(m.viewType);return}const D=m.id;this.addWebviewInput(D,m,v);let y;if(m.webview.state)try{y=JSON.parse(m.webview.state)}catch(T){console.error("Could not load webview state",T,m.webview.state)}try{await this._proxy.$deserializeWebviewPanel(D,w,{title:m.getTitle(),state:y,panelOptions:m.webview.options,webviewOptions:m.webview.contentOptions,active:m===this._editorService.activeEditor},(0,i.editorGroupToColumn)(this._editorGroupService,m.group||0))}catch(T){(0,t.onUnexpectedError)(T),m.webview.html=this._mainThreadWebviews.getWebviewResolvedFailedContent(w)}}}))}$unregisterSerializer(h){if(!this._revivers.has(h))throw new Error(`No reviver for ${h} registered`);this._revivers.deleteAndDispose(h)}updateWebviewViewStates(h){if(!this._webviewInputs.size)return;const v={},m=(w,D,y)=>{if(!(y instanceof r.WebviewInput))return;y.updateGroup(w.id);const T=this._webviewInputs.getHandleForInput(y);T&&(v[T]={visible:D===w.activeEditor,active:y===h,position:(0,i.editorGroupToColumn)(this._editorGroupService,w.id)})};for(const w of this._editorGroupService.groups)for(const D of w.editors)D instanceof S.DiffEditorInput?(m(w,D,D.primary),m(w,D,D.secondary)):m(w,D,D);Object.keys(v).length&&this._proxy.$onDidChangeWebviewPanelViewStates(v)}getWebviewInput(h){const v=this.tryGetWebviewInput(h);if(!v)throw new Error(`Unknown webview handle:${h}`);return v}tryGetWebviewInput(h){return this._webviewInputs.getInputForHandle(h)}};n=we([F(2,A.IConfigurationService),F(3,f.IEditorGroupsService),F(4,c.IEditorService),F(5,l.IExtensionService),F(6,k.IStorageService),F(7,E.ITelemetryService),F(8,u.IWebviewWorkbenchService)],n),e.MainThreadWebviewPanels=n;function a(g){if(!!g)return{light:R.URI.revive(g.light),dark:R.URI.revive(g.dark)}}function o(g){return{enableFindWidget:g.enableFindWidget,retainContextWhenHidden:g.retainContextWhenHidden}}}),define(ae[2636],le([1,0,32,21,113,477,14,28,9,72,92,410,42,1943,81,38,41,46,172,638,350,58,24,39,213,8,1181]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReleaseNotesManager=void 0;let m=class{constructor(D,y,T,_,L,M,O,N,P,B,V){this._environmentService=D,this._keybindingService=y,this._languageService=T,this._openerService=_,this._requestService=L,this._configurationService=M,this._editorService=O,this._editorGroupService=N,this._webviewWorkbenchService=P,this._extensionService=B,this._productService=V,this._releaseNotesCache=new Map,this._currentReleaseNotes=void 0,S.TokenizationRegistry.onDidChange(async()=>{if(!this._currentReleaseNotes||!this._lastText)return;const z=await this.renderBody(this._lastText);this._currentReleaseNotes&&(this._currentReleaseNotes.webview.html=z)})}async show(D){const y=await this.loadReleaseNotes(D);this._lastText=y;const T=await this.renderBody(y),_=u.localize(0,null,D),L=this._editorService.activeEditorPane;return this._currentReleaseNotes?(this._currentReleaseNotes.setName(_),this._currentReleaseNotes.webview.html=T,this._webviewWorkbenchService.revealWebview(this._currentReleaseNotes,L?L.group:this._editorGroupService.activeGroup,!1)):(this._currentReleaseNotes=this._webviewWorkbenchService.openWebview({id:(0,b.generateUuid)(),options:{tryRestoreScrollPosition:!0,enableFindWidget:!0},contentOptions:{localResourceRoots:[]},extension:void 0},"releaseNotes",_,{group:o.ACTIVE_GROUP,preserveFocus:!1}),this._currentReleaseNotes.webview.onDidClickLink(M=>this.onDidClickLink(I.URI.parse(M))),this._currentReleaseNotes.onWillDispose(()=>{this._currentReleaseNotes=void 0}),this._currentReleaseNotes.webview.html=T),!0}async loadReleaseNotes(D){const y=/^(\d+\.\d+)\./.exec(D);if(!y)throw new Error("not found");const L=`https://code.visualstudio.com/raw/v${y[1].replace(/\./g,"_")}.md`,M=u.localize(1,null),O=B=>(0,E.escape)(B).replace(/\\/g,"\\\\"),N=B=>{const V=(W,U)=>{const $=this._keybindingService.lookupKeybinding(U);return $&&$.getLabel()||M},z=(W,U)=>{const $=A.KeybindingParser.parseKeybinding(U,k.OS);if(!$)return M;const q=this._keybindingService.resolveKeybinding($);return q.length===0?M:q[0].getLabel()||M},x=(W,U)=>{const $=V(W,U);return $&&`<code title="${U}">${O($)}</code>`},H=(W,U)=>{const $=z(W,U);return $&&`<code title="${U}">${O($)}</code>`};return B.replace(/`kb\(([a-z.\d\-]+)\)`/gi,x).replace(/`kbstyle\(([^\)]+)\)`/gi,H).replace(/kb\(([a-z.\d\-]+)\)/gi,(W,U)=>(0,R.escapeMarkdownSyntaxTokens)(V(W,U))).replace(/kbstyle\(([^\)]+)\)/gi,(W,U)=>(0,R.escapeMarkdownSyntaxTokens)(z(W,U)))},P=async()=>{let B;try{B=await(0,s.asTextOrError)(await this._requestService.request({url:L},t.CancellationToken.None))}catch{throw new Error("Failed to fetch release notes")}if(!B||!/^#\s/.test(B))throw new Error("Invalid release notes");return N(B)};return this._releaseNotesCache.has(D)||this._releaseNotesCache.set(D,(async()=>{try{return await P()}catch(B){throw this._releaseNotesCache.delete(D),B}})()),this._releaseNotesCache.get(D)}onDidClickLink(D){this.addGAParameters(D,"ReleaseNotes").then(y=>this._openerService.open(y)).then(void 0,p.onUnexpectedError)}async addGAParameters(D,y,T="1"){return(0,h.supportsTelemetry)(this._productService,this._environmentService)&&(0,h.getTelemetryLevel)(this._configurationService)===3&&D.scheme==="https"&&D.authority==="code.visualstudio.com"?D.with({query:`${D.query?D.query+"&":""}utm_source=VsCode&utm_medium=${encodeURIComponent(y)}&utm_content=${encodeURIComponent(T)}`}):D}async renderBody(D){const y=(0,b.generateUuid)(),T=await(0,d.renderMarkdownDocument)(D,this._extensionService,this._languageService,!1),_=S.TokenizationRegistry.getColorMap(),L=_?(0,C.generateTokensCSSForColorMap)(_):"";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}"> ${d.DEFAULT_MARKDOWN_STYLES} ${L} </style> </head> <body>${T}</body> </html>`}};m=we([F(0,i.IEnvironmentService),F(1,f.IKeybindingService),F(2,r.ILanguageService),F(3,c.IOpenerService),F(4,s.IRequestService),F(5,v.IConfigurationService),F(6,o.IEditorService),F(7,a.IEditorGroupsService),F(8,n.IWebviewWorkbenchService),F(9,g.IExtensionService),F(10,l.IProductService)],m),e.ReleaseNotesManager=m}),define(ae[946],le([1,0,9,115,316,350]),function(J,e,t,p,R,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 f=this.toJson(i);try{return JSON.stringify(f)}catch{return}}deserialize(i,f){const c=this.fromJson(JSON.parse(f));return this._webviewWorkbenchService.openRevivedWebview({webviewInitInfo:{id:c.id,providedViewType:c.providedId,origin:c.origin,options:c.webviewOptions,contentOptions:c.contentOptions,extension:c.extension},viewType:c.viewType,title:c.title,iconPath:c.iconPath,state:c.state,group:c.group})}fromJson(i){return{...i,extension:E(i.extensionId,i.extensionLocation),iconPath:I(i.iconPath),state:S(i.state),webviewOptions:i.options,contentOptions:r(i.options)}}toJson(i){return{id:i.id,origin:i.webview.origin,viewType:i.viewType,providedId:i.providedId,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=R.WebviewInput.typeId,k=we([F(0,A.IWebviewWorkbenchService)],k),e.WebviewEditorInputSerializer=k;function E(u,i){if(!u)return;const f=b(i);if(!!f)return{id:new p.ExtensionIdentifier(u),location:f}}e.reviveWebviewExtensionDescription=E;function I(u){if(!u)return;const i=b(u.light),f=b(u.dark);return i&&f?{light:i,dark:f}:void 0}function b(u){if(!!u)try{return typeof u=="string"?t.URI.parse(u):t.URI.from(u)}catch{return}}function S(u){return typeof u=="string"?u:void 0}function C(u){return u}e.restoreWebviewOptions=C;function r(u){return{...u,localResourceRoots:u.localResourceRoots?.map(i=>b(i))}}e.restoreWebviewContentOptions=r}),define(ae[2637],le([1,0,2,13,1974,15,31,7,38,48,17,44]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const r=(0,R.localize)(0,null),u={value:(0,R.localize)(1,null),original:"Create"};(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"welcome.showNewFileEntries",title:{value:(0,R.localize)(2,null),original:"New File..."},category:u,f1:!0,keybinding:{primary:512+2048+256+44,weight:200},menu:{id:A.MenuId.MenubarFileMenu,group:"1_new",order:2}})}async run(f){return(0,p.assertIsDefined)(i.Instance).run()}});let i=class br extends t.Disposable{constructor(c,l,s,d,n){super(),this.quickInputService=c,this.contextKeyService=l,this.commandService=s,this.keybindingService=d,br.Instance=this,this._register({dispose(){br.Instance===this&&(br.Instance=void 0)}}),this.menu=n.createMenu(A.MenuId.NewFile,l)}allEntries(){const c=[];for(const[l,s]of this.menu.getActions({renderShortTitle:!0}))for(const d of s)d instanceof A.MenuItemAction&&c.push({commandID:d.item.id,from:d.item.source??r,title:d.label,group:l});return c}async run(){const c=this.allEntries();if(c.length===0)throw Error("Unexpected empty new items list");return c.length===1?(this.commandService.executeCommand(c[0].commandID),!0):this.selectNewEntry(c)}async selectNewEntry(c){let l;const s=new Promise(h=>{l=h}),d=new t.DisposableStore,n=this.quickInputService.createQuickPick();n.title=(0,R.localize)(3,null),n.placeholder=(0,R.localize)(4,null),n.sortByLabel=!1,n.matchOnDetail=!0,n.matchOnDescription=!0;const a=(h,v)=>{const m={file:1,notebook:2};if(m[h.group]&&m[v.group]){if(m[h.group]!==m[v.group])return m[v.group]-m[h.group]}else{if(m[h.group])return 1;if(m[v.group])return-1}return h.from===r?1:v.from===r?-1:h.from.localeCompare(v.from)},o={file:(0,R.localize)(5,null),notebook:(0,R.localize)(6,null)},g=h=>{const v=[];let m;h.sort((w,D)=>-a(w,D)).forEach(w=>{const D=w.commandID,y=this.keybindingService.lookupKeybinding(D||"",this.contextKeyService);m!==w.group&&(v.push({type:"separator",label:o[w.group]??w.group}),m=w.group),v.push({...w,label:w.title,type:"item",keybinding:y,buttons:D?[{iconClass:"codicon codicon-gear",tooltip:(0,R.localize)(7,null)}]:[],detail:"",description:w.from})}),n.items=v};return g(c),d.add(this.menu.onDidChange(()=>g(this.allEntries()))),d.add(n.onDidChangeValue(h=>{if(h===""){g(c);return}const v={commandID:"workbench.action.files.newFile",commandArgs:{languageId:void 0,viewType:void 0,fileName:h},title:(0,R.localize)(8,null,h),group:"file",from:r};g([v,...c])})),d.add(n.onDidAccept(async h=>{const v=n.selectedItems[0];l(!!v),n.hide(),v&&await this.commandService.executeCommand(v.commandID,v.commandArgs)})),d.add(n.onDidHide(()=>{n.dispose(),d.dispose(),l(!1)})),d.add(n.onDidTriggerItemButton(h=>{n.hide(),this.commandService.executeCommand("workbench.action.openGlobalKeybindings",h.item.commandID),l(!1)})),n.show(),s}};i=we([F(0,b.IQuickInputService),F(1,E.IContextKeyService),F(2,k.ICommandService),F(3,I.IKeybindingService),F(4,A.IMenuService)],i),S.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(i,3),A.MenuRegistry.appendMenuItem(A.MenuId.NewFile,{group:"file",command:{id:"workbench.action.files.newUntitledFile",title:(0,R.localize)(9,null)},order:1})}),define(ae[2638],le([1,0,5,17,44,2506,904,131]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const I=E.ExtensionsRegistry.registerExtensionPoint(k.viewsWelcomeExtensionPointDescriptor);let b=class{constructor(C){C.createInstance(A.ViewsWelcomeContribution,I)}};b=we([F(0,t.IInstantiationService)],b),p.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(b,3)}),define(ae[2639],le([1,0,93,8,47,38,198,25,89,46,17,12,44,2272,2438,2,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DialogHandlerContribution=void 0;let l=class extends f.Disposable{constructor(n,a,o,g,h,v,m,w,D,y){super(),this.configurationService=n,this.dialogService=a,this.browserImpl=new u.BrowserDialogHandler(o,g,h,v,m,w,D),this.nativeImpl=new i.NativeDialogHandler(o,y,w,D),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 n;if(this.currentDialog.args.confirmArgs){const a=this.currentDialog.args.confirmArgs;n=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;n=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;n=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(n),this.currentDialog=void 0}}get useCustomDialog(){return this.configurationService.getValue("window.dialogStyle")==="custom"}};l=we([F(0,p.IConfigurationService),F(1,R.IDialogService),F(2,E.ILogService),F(3,k.ILayoutService),F(4,C.IThemeService),F(5,A.IKeybindingService),F(6,c.IInstantiationService),F(7,b.IProductService),F(8,t.IClipboardService),F(9,I.INativeHostService)],l),e.DialogHandlerContribution=l,S.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(l,1)}),define(ae[2640],le([1,0,111,14,128,7,8,17,2103,35,27,272,44,89,198]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeAccessibilityService=void 0;let f=class extends I.AccessibilityService{constructor(s,d,n,a,o,g){super(d,a,n),this._telemetryService=o,this.nativeHostService=g,this.didSendTelemetry=!1,this.shouldAlwaysUnderlineAccessKeys=void 0,this.setAccessibilitySupport(s.window.accessibilitySupport?2:1)}async alwaysUnderlineAccessKeys(){if(!p.isWindows)return!1;if(typeof this.shouldAlwaysUnderlineAccessKeys!="boolean"){const s=await this.nativeHostService.windowsGetStringRegKey("HKEY_CURRENT_USER","Control Panel\\Accessibility\\Keyboard Preference","On");this.shouldAlwaysUnderlineAccessKeys=s==="1"}return this.shouldAlwaysUnderlineAccessKeys}setAccessibilitySupport(s){super.setAccessibilitySupport(s),!this.didSendTelemetry&&s===2&&(this._telemetryService.publicLog2("accessibility",{enabled:!0}),this.didSendTelemetry=!0)}};f=we([F(0,R.INativeWorkbenchEnvironmentService),F(1,A.IContextKeyService),F(2,k.IConfigurationService),F(3,i.ILayoutService),F(4,S.ITelemetryService),F(5,u.INativeHostService)],f),e.NativeAccessibilityService=f,(0,b.registerSingleton)(t.IAccessibilityService,f,1);let c=class{constructor(s,d,n){const a=()=>{d.isScreenReaderOptimized()&&s.write(n.argvResource,[{path:["force-renderer-accessibility"],value:!0}],!0)};a(),d.onDidChangeScreenReaderOptimized(a)}};c=we([F(0,C.IJSONEditingService),F(1,t.IAccessibilityService),F(2,R.INativeWorkbenchEnvironmentService)],c),p.isLinux&&E.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(c,2)}),define(ae[2641],le([1,0,2005,82,23,115,35,26,74,5,15,7,47,17,44,31,25,46,543,51,100,70]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionBisectService=void 0,e.IExtensionBisectService=(0,b.createDecorator)("IExtensionBisectService");class o{static fromJSON(m){if(!!m)try{const w=JSON.parse(m);return new o(w.extensions,w.low,w.high,w.mid)}catch{return}}constructor(m,w,D,y=(w+D)/2|0){this.extensions=m,this.low=w,this.high=D,this.mid=y}}let g=class Hn{constructor(m,w,D){this._storageService=w,this._envService=D,this._disabled=new Map;const y=w.get(Hn._storageKey,-1);if(this._state=o.fromJSON(y),this._state){const{mid:T,high:_}=this._state;for(let L=0;L<this._state.extensions.length;L++){const M=L>=T&&L<_;this._disabled.set(this._state.extensions[L],M)}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(w=>(0,n.areSameExtensions)({id:w},m.identifier))}async start(m){if(this._state)throw new Error("invalid state");const w=m.map(y=>y.identifier.id),D=new o(w,0,w.length,0);this._storageService.store(Hn._storageKey,JSON.stringify(D),-1,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 w=new o(this._state.extensions,m?this._state.low:this._state.mid,m?this._state.mid:this._state.high);this._storageService.store(Hn._storageKey,JSON.stringify(w),-1,1),await this._storageService.flush()}async reset(){this._storageService.remove(Hn._storageKey,-1),await this._storageService.flush()}};g._storageKey="extensionBisectState",g=we([F(0,c.ILogService),F(1,R.IStorageService),F(2,d.IWorkbenchEnvironmentService)],g),(0,k.registerSingleton)(e.IExtensionBisectService,g,1);let h=class el{constructor(m,w,D,y){this._extensionBisectService=w,this._notificationService=D,this._commandService=y,w.isActive&&(el.ctxIsBisectActive.bindTo(m).set(!0),this._showBisectPrompt())}_showBisectPrompt(){const m={label:"Good now",run:()=>this._commandService.executeCommand("extension.bisect.next",!1)},w={label:"This is bad",run:()=>this._commandService.executeCommand("extension.bisect.next",!0)},D={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(E.Severity.Info,y,[m,w,D],{sticky:!0})}};h.ctxIsBisectActive=new C.RawContextKey("isExtensionBisectActive",!1),h=we([F(0,C.IContextKeyService),F(1,e.IExtensionBisectService),F(2,E.INotificationService),F(3,f.ICommandService)],h),u.Registry.as(i.Extensions.Workbench).registerWorkbenchContribution(h,3),(0,S.registerAction2)(class extends S.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:h.ctxIsBisectActive.negate(),menu:{id:S.MenuId.ViewContainerTitle,when:C.ContextKeyExpr.equals("viewContainer","workbench.view.extensions"),group:"2_enablement",order:4}})}async run(v){const m=v.get(r.IDialogService),w=v.get(I.IHostService),D=v.get(p.IExtensionManagementService),y=v.get(p.IGlobalExtensionEnablementService),T=v.get(e.IExtensionBisectService),_=new Set(y.getDisabledExtensions().map(O=>O.id)),L=(await D.getInstalled(1)).filter(O=>!_.has(O.identifier.id));(await m.confirm({message:(0,t.localize)(3,null),detail:(0,t.localize)(4,null,2+Math.log2(L.length)|0),primaryButton:(0,t.localize)(5,null)})).confirmed&&(await T.start(L),w.reload())}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"extension.bisect.next",title:{value:(0,t.localize)(6,null),original:"Continue Extension Bisect"},category:a.Categories.Help,f1:!0,precondition:h.ctxIsBisectActive})}async run(v,m){const w=v.get(r.IDialogService),D=v.get(I.IHostService),y=v.get(e.IExtensionBisectService),T=v.get(l.IProductService),_=v.get(p.IGlobalExtensionEnablementService),L=v.get(s.IWorkbenchIssueService);if(!y.isActive)return;if(m===void 0){const O=await this._checkForBad(w,y);if(O===null)return;m=O}if(m===void 0){await y.reset(),D.reload();return}const M=await y.next(m);if(!M){D.reload();return}if(M.bad)await w.show(E.Severity.Info,(0,t.localize)(7,null),void 0,{detail:(0,t.localize)(8,null,T.nameShort)});else{const O=await w.show(E.Severity.Info,(0,t.localize)(9,null),[(0,t.localize)(10,null),(0,t.localize)(11,null)],{detail:(0,t.localize)(12,null,M.id),checkbox:{label:(0,t.localize)(13,null),checked:!0},cancelId:1});O.checkboxChecked&&await _.disableExtension({id:M.id},void 0),O.choice===0&&await L.openReporter({extensionId:M.id})}await y.reset(),D.reload()}async _checkForBad(v,m){const w={cancelId:3,detail:(0,t.localize)(14,null,m.disabledCount)};switch((await v.show(E.Severity.Info,(0,t.localize)(15,null),[(0,t.localize)(16,null),(0,t.localize)(17,null),(0,t.localize)(18,null),(0,t.localize)(19,null)],w)).choice){case 0:return!1;case 1:return!0;case 2:return}return null}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:"extension.bisect.stop",title:{value:(0,t.localize)(20,null),original:"Stop Extension Bisect"},category:a.Categories.Help,f1:!0,precondition:h.ctxIsBisectActive})}async run(v){const m=v.get(e.IExtensionBisectService),w=v.get(I.IHostService);await m.reset(),w.reload()}})}),define(ae[947],le([1,0,2011,2,9,8,47,82,120,100,5,26,23,435,74,39,115,35,17,44,15,48,66,141,793,32,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IExtensionUrlHandler=void 0;const w=5*60*1e3,D=30*1e3,y="extensionUrlHandler.urlToHandle",T="extensions.confirmedUriHandlerExtensionIds",_="extensionUrlHandler.confirmedExtensions";function L(V){return/^[a-z0-9][a-z0-9\-]*\.[a-z0-9][a-z0-9\-]*$/i.test(V)}class M{get extensions(){const z=this.storageService.get(_,0,"[]");try{return JSON.parse(z)}catch{return[]}}constructor(z){this.storageService=z}has(z){return this.extensions.indexOf(z)>-1}add(z){this.set([...this.extensions,z])}set(z){this.storageService.store(_,JSON.stringify(z),0,1)}}e.IExtensionUrlHandler=(0,S.createDecorator)("extensionUrlHandler");let O=class{constructor(z,x,H,W,U,$,q,X,G,Q,j,K,Y){this.extensionService=x,this.dialogService=H,this.notificationService=W,this.extensionManagementService=U,this.extensionEnablementService=$,this.hostService=q,this.galleryService=X,this.storageService=G,this.configurationService=Q,this.progressService=j,this.telemetryService=K,this.extensionUrlTrustService=Y,this.extensionHandlers=new Map,this.uriBuffer=new Map,this.userTrustedExtensionsStorage=new M(G);const ee=setInterval(()=>this.garbageCollect(),D),ie=this.storageService.get(y,1);ie&&(this.storageService.remove(y,1),this.handleURL(R.URI.revive(JSON.parse(ie)),{trusted:!0})),this.disposable=(0,p.combinedDisposable)(z.registerHandler(this),(0,p.toDisposable)(()=>clearInterval(ee)));const re=N.cache;setTimeout(()=>re.forEach(([oe,se])=>this.handleURL(oe,se)))}async handleURL(z,x){if(!L(z.authority))return!1;const H=z.authority;this.telemetryService.publicLog2("uri_invoked/start",{extensionId:H});const W=this.extensionHandlers.has(c.ExtensionIdentifier.toKey(H)),U=await this.extensionService.getExtension(H);if(!U)return await this.handleUnhandledURL(z,{id:H},x),!0;if(!(x?.trusted||(x?.originalUrl?await this.extensionUrlTrustService.isExtensionUrlTrusted(H,x.originalUrl):!1)||this.didUserTrustExtension(c.ExtensionIdentifier.toKey(H)))){let Q=z.toString(!1);Q.length>40&&(Q=`${Q.substring(0,30)}...${Q.substring(Q.length-5)}`);const j=await this.dialogService.confirm({message:(0,t.localize)(0,null,H),checkbox:{label:(0,t.localize)(1,null)},detail:`${U.displayName||U.name} (${H}) wants to open a URI: ${Q}`,primaryButton:(0,t.localize)(2,null),type:"question"});if(!j.confirmed)return this.telemetryService.publicLog2("uri_invoked/cancel",{extensionId:H}),!0;j.checkboxChecked&&this.userTrustedExtensionsStorage.add(c.ExtensionIdentifier.toKey(H))}const q=this.extensionHandlers.get(c.ExtensionIdentifier.toKey(H));if(q)return W?!1:await this.handleURLByExtension(H,q,z,x);const X=new Date().getTime();let G=this.uriBuffer.get(c.ExtensionIdentifier.toKey(H));return G||(G=[],this.uriBuffer.set(c.ExtensionIdentifier.toKey(H),G)),G.push({timestamp:X,uri:z}),await this.extensionService.activateByEvent(`onUri:${c.ExtensionIdentifier.toKey(H)}`),!0}registerExtensionHandler(z,x){this.extensionHandlers.set(c.ExtensionIdentifier.toKey(z),x);const H=this.uriBuffer.get(c.ExtensionIdentifier.toKey(z))||[];for(const{uri:W}of H)this.handleURLByExtension(z,x,W);this.uriBuffer.delete(c.ExtensionIdentifier.toKey(z))}unregisterExtensionHandler(z){this.extensionHandlers.delete(c.ExtensionIdentifier.toKey(z))}async handleURLByExtension(z,x,H,W){return this.telemetryService.publicLog2("uri_invoked/end",{extensionId:c.ExtensionIdentifier.toKey(z)}),await x.handleURL(H,W)}async handleUnhandledURL(z,x,H){let U=(await this.extensionManagementService.getInstalled()).find($=>(0,b.areSameExtensions)($.identifier,x));if(!U){let $;try{$=(await this.galleryService.getExtensions([x],v.CancellationToken.None))[0]??void 0}catch{return}if(!$)return;if(this.telemetryService.publicLog2("uri_invoked/install_extension/start",{extensionId:x.id}),!(await this.dialogService.confirm({message:(0,t.localize)(3,null,$.displayName||$.name),detail:`${$.displayName||$.name} (${x.id}) wants to open a URL: ${z.toString()}`,primaryButton:(0,t.localize)(4,null),type:"question"})).confirmed){this.telemetryService.publicLog2("uri_invoked/install_extension/cancel",{extensionId:x.id});return}this.telemetryService.publicLog2("uri_invoked/install_extension/accept",{extensionId:x.id});try{U=await this.progressService.withProgress({location:15,title:(0,t.localize)(5,null,$.displayName||$.name)},()=>this.extensionManagementService.installFromGallery($))}catch(X){this.notificationService.error(X);return}}if(!this.extensionEnablementService.isEnabled(U)){if(this.telemetryService.publicLog2("uri_invoked/enable_extension/start",{extensionId:x.id}),!(await this.dialogService.confirm({message:(0,t.localize)(6,null,U.manifest.displayName||U.manifest.name),detail:`${U.manifest.displayName||U.manifest.name} (${x.id}) wants to open a URL: ${z.toString()}`,primaryButton:(0,t.localize)(7,null),type:"question"})).confirmed){this.telemetryService.publicLog2("uri_invoked/enable_extension/cancel",{extensionId:x.id});return}this.telemetryService.publicLog2("uri_invoked/enable_extension/accept",{extensionId:x.id}),await this.extensionEnablementService.setEnablement([U],8)}if(this.extensionService.canAddExtension((0,f.toExtensionDescription)(U)))await this.waitUntilExtensionIsAdded(x),await this.handleURL(z,{...H,trusted:!0});else{if(this.telemetryService.publicLog2("uri_invoked/activate_extension/start",{extensionId:x.id}),!(await this.dialogService.confirm({message:(0,t.localize)(8,null,U.manifest.displayName||U.manifest.name),detail:`${U.manifest.displayName||U.manifest.name} (${x.id}) wants to open a URL: ${z.toString()}`,primaryButton:(0,t.localize)(9,null),type:"question"})).confirmed){this.telemetryService.publicLog2("uri_invoked/activate_extension/cancel",{extensionId:x.id});return}this.telemetryService.publicLog2("uri_invoked/activate_extension/accept",{extensionId:x.id}),this.storageService.store(y,JSON.stringify(z.toJSON()),1,1),await this.hostService.reload()}}async waitUntilExtensionIsAdded(z){await this.extensionService.getExtension(z.id)||await new Promise((x,H)=>{const W=this.extensionService.onDidChangeExtensions(async()=>{try{await this.extensionService.getExtension(z.id)&&(W.dispose(),x())}catch(U){H(U)}})})}garbageCollect(){const z=new Date().getTime(),x=new Map;this.uriBuffer.forEach((H,W)=>{H=H.filter(({timestamp:U})=>z-U<w),H.length>0&&x.set(W,H)}),this.uriBuffer=x}didUserTrustExtension(z){return this.userTrustedExtensionsStorage.has(z)?!0:this.getConfirmedTrustedExtensionIdsFromConfiguration().indexOf(z)>-1}getConfirmedTrustedExtensionIdsFromConfiguration(){const z=this.configurationService.getValue(T);return Array.isArray(z)?z:[]}dispose(){this.disposable.dispose(),this.extensionHandlers.clear(),this.uriBuffer.clear()}};O=we([F(0,u.IURLService),F(1,f.IExtensionService),F(2,k.IDialogService),F(3,C.INotificationService),F(4,E.IExtensionManagementService),F(5,I.IWorkbenchExtensionEnablementService),F(6,i.IHostService),F(7,E.IExtensionGalleryService),F(8,r.IStorageService),F(9,A.IConfigurationService),F(10,o.IProgressService),F(11,m.ITelemetryService),F(12,h.IExtensionUrlTrustService)],O),(0,l.registerSingleton)(e.IExtensionUrlHandler,O,0);let N=class hn{static get cache(){hn.disposable.dispose();const z=hn._cache;return hn._cache=[],z}constructor(z){hn.disposable=z.registerHandler(this)}async handleURL(z,x){return L(z.authority)?(hn._cache.push([z,x]),!0):!1}};N._cache=[],N=we([F(0,u.IURLService)],N),s.Registry.as(d.Extensions.Workbench).registerWorkbenchContribution(N,2);class B extends n.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:n.MenuId.CommandPalette,when:g.IsWebContext.toNegated()}})}async run(z){const x=z.get(r.IStorageService),H=z.get(a.IQuickInputService),W=new M(x),U=W.extensions.map(q=>({label:q,picked:!0}));if(U.length===0){await H.pick([{label:(0,t.localize)(12,null)}]);return}const $=await H.pick(U,{canPickMany:!0});!$||W.set($.map(q=>q.label))}}(0,n.registerAction2)(B)}),define(ae[2642],le([1,0,67,77,435,947,115]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadUrls=void 0;class E{constructor(S,C,r){this.proxy=S,this.handle=C,this.extensionId=r}handleURL(S,C){return k.ExtensionIdentifier.equals(this.extensionId,S.authority)?Promise.resolve(this.proxy.$handleExternalUri(this.handle,S)).then(()=>!0):Promise.resolve(!1)}}let I=class{constructor(S,C,r){this.urlService=C,this.extensionUrlHandler=r,this.handlers=new Map,this.proxy=S.getProxy(t.ExtHostContext.ExtHostUrls)}$registerUriHandler(S,C){const r=new E(this.proxy,S,C),u=this.urlService.registerHandler(r);return this.handlers.set(S,{extensionId:C,disposable:u}),this.extensionUrlHandler.registerExtensionHandler(C,r),Promise.resolve(void 0)}$unregisterUriHandler(S){const C=this.handlers.get(S);if(!C)return Promise.resolve(void 0);const{extensionId:r,disposable:u}=C;return this.extensionUrlHandler.unregisterExtensionHandler(r),this.handlers.delete(S),u.dispose(),Promise.resolve(void 0)}async $createAppUri(S){return this.urlService.create(S)}dispose(){this.handlers.forEach(({disposable:S})=>S.dispose()),this.handlers.clear()}};I=we([(0,p.extHostNamedCustomer)(t.MainContext.MainThreadUrls),F(1,R.IURLService),F(2,A.IExtensionUrlHandler)],I),e.MainThreadUrls=I}),define(ae[2643],le([1,0,2022,68,9,542,69,46,26,23,35,41,22,788]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IntegrityService=void 0;class i{constructor(l){this.storageService=l,this.value=this._read()}_read(){const l=this.storageService.get(i.KEY,-1);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),-1,1)}}i.KEY="integrityService";let f=class xs{constructor(l,s,d,n,a,o){this.notificationService=l,this.lifecycleService=d,this.openerService=n,this.productService=a,this.checksumService=o,this._storage=new i(s),this._isPurePromise=this._isPure(),this.isPure().then(g=>{g.isPure||this._prompt()})}_prompt(){const l=this._storage.get();if(l?.dontShowPrompt&&l.commit===this.productService.commit)return;const s=this.productService.checksumFailMoreInfoUrl,d=(0,t.localize)(0,null,this.productService.nameShort);s?this.notificationService.prompt(p.default.Warning,d,[{label:(0,t.localize)(1,null),run:()=>this.openerService.open(R.URI.parse(s))},{label:(0,t.localize)(2,null),isSecondary:!0,run:()=>this._storage.set({dontShowPrompt:!0,commit:this.productService.commit})}],{sticky:!0}):this.notificationService.notify({severity:p.default.Warning,message:d,sticky:!0})}isPure(){return this._isPurePromise}async _isPure(){const l=this.productService.checksums||{};await this.lifecycleService.when(4);const s=await Promise.all(Object.keys(l).map(n=>this._resolve(n,l[n])));let d=!0;for(let n=0,a=s.length;n<a;n++)if(!s[n].isPure){d=!1;break}return{isPure:d,proof:s}}async _resolve(l,s){const d=r.FileAccess.asFileUri(l,J);try{const n=await this.checksumService.checksum(d);return xs._createChecksumPair(d,n,s)}catch{return xs._createChecksumPair(d,"",s)}}static _createChecksumPair(l,s,d){return{uri:l,actual:s,expected:d,isPure:s===d}}};f=we([F(0,I.INotificationService),F(1,b.IStorageService),F(2,k.ILifecycleService),F(3,C.IOpenerService),F(4,E.IProductService),F(5,u.IChecksumService)],f),e.IntegrityService=f,(0,S.registerSingleton)(A.IIntegrityService,f,1)}),define(ae[2644],le([1,0,6,11,2,69,25,241,23]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractLifecycleService=void 0;let b=class Cr extends R.Disposable{get startupKind(){return this._startupKind}get phase(){return this._phase}constructor(C,r){super(),this.logService=C,this.storageService=r,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(u=>{u.reason===I.WillSaveStateReason.SHUTDOWN&&this.storageService.store(Cr.LAST_SHUTDOWN_REASON_KEY,this.shutdownReason,1,1)})}resolveStartupKind(){const C=this.storageService.getNumber(Cr.LAST_SHUTDOWN_REASON_KEY,1);this.storageService.remove(Cr.LAST_SHUTDOWN_REASON_KEY,1);let r;switch(C){case 3:r=3;break;case 4:r=4;break;default:r=1}return this.logService.trace(`[lifecycle] starting up (startup kind: ${r})`),r}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,E.mark)(`code/LifecyclePhase/${(0,A.LifecyclePhaseToString)(C)}`);const r=this.phaseWhen.get(this._phase);r&&(r.open(),this.phaseWhen.delete(this._phase))}async when(C){if(C<=this._phase)return;let r=this.phaseWhen.get(C);r||(r=new p.Barrier,this.phaseWhen.set(C,r)),await r.wait()}};b.LAST_SHUTDOWN_REASON_KEY="lifecyle.lastShutdownReason",b=we([F(0,k.ILogService),F(1,I.IStorageService)],b),e.AbstractLifecycleService=b}),define(ae[2645],le([1,0,2105,69,23,166,25,2644,35,89,11,117,32]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLifecycleService=void 0;let u=class Fs extends E.AbstractLifecycleService{constructor(f,c,l){super(l,c),this.nativeHostService=f,this.registerListeners()}registerListeners(){const f=this.nativeHostService.windowId;A.ipcRenderer.on("vscode:onBeforeUnload",async(c,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,f)):(this.logService.trace("[lifecycle] onBeforeUnload continues without veto"),this.shutdownReason=l.reason,A.ipcRenderer.send(l.okChannel,f))}),A.ipcRenderer.on("vscode:onWillUnload",async(c,l)=>{this.logService.trace(`[lifecycle] onWillUnload (reason: ${l.reason})`),await this.handleWillShutdown(l.reason),this._onDidShutdown.fire(),A.ipcRenderer.send(l.replyChannel,f)})}async handleBeforeShutdown(f){const c=this.logService,l=[],s=new Set;let d,n;this._onBeforeShutdown.fire({reason:f,veto(o,g){l.push(o),o===!0?c.info(`[lifecycle]: Shutdown was prevented (id: ${g})`):o instanceof Promise&&(s.add(g),o.then(h=>{h===!0&&c.info(`[lifecycle]: Shutdown was prevented (id: ${g})`)}).finally(()=>s.delete(g)))},finalVeto(o,g){if(!d)d=o,n=g;else throw new Error(`[lifecycle]: Final veto is already defined (id: ${g})`)}});const a=(0,S.disposableTimeout)(()=>{c.warn(`[lifecycle] onBeforeShutdown is taking a long time, pending operations: ${Array.from(s).join(", ")}`)},Fs.BEFORE_SHUTDOWN_WARNING_DELAY);try{let o=await(0,t.handleVetos)(l,g=>this.handleBeforeShutdownError(g,f));if(o)return o;if(d)try{s.add(n),o=await d(),o&&c.info(`[lifecycle]: Shutdown was prevented by final veto (id: ${n})`)}catch(g){o=!0,this.handleBeforeShutdownError(g,f)}return o}finally{a.dispose()}}handleBeforeShutdownError(f,c){this.logService.error(`[lifecycle]: Error during before-shutdown phase (error: ${(0,C.toErrorMessage)(f)})`),this._onBeforeShutdownError.fire({reason:c,error:f})}async handleWillShutdown(f){const c=[],l=new Set,s=new r.CancellationTokenSource;this._onWillShutdown.fire({reason:f,token:s.token,joiners:()=>Array.from(l.values()),join(n,a){c.push(n),l.add(a),n.finally(()=>l.delete(a))},force:()=>{s.dispose(!0)}});const d=(0,S.disposableTimeout)(()=>{this.logService.warn(`[lifecycle] onWillShutdown is taking a long time, pending operations: ${Array.from(l).map(n=>n.id).join(", ")}`)},Fs.WILL_SHUTDOWN_WARNING_DELAY);try{await(0,S.raceCancellation)(S.Promises.settled(c),s.token)}catch(n){this.logService.error(`[lifecycle]: Error during will-shutdown phase (error: ${(0,C.toErrorMessage)(n)})`)}finally{d.dispose()}}shutdown(){return this.nativeHostService.closeWindow()}};u.BEFORE_SHUTDOWN_WARNING_DELAY=5e3,u.WILL_SHUTDOWN_WARNING_DELAY=800,u=we([F(0,b.INativeHostService),F(1,R.IStorageService),F(2,k.ILogService)],u),e.NativeLifecycleService=u,(0,I.registerSingleton)(p.ILifecycleService,u,0)}),define(ae[2646],le([1,0,374,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSharedProcessRemoteService)(t.ILanguagePackService,"languagePacks")}),define(ae[2647],le([1,0,25,499,2]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLogService=void 0;class A extends t.LogService{constructor(E,I,b,S,C){const r=new R.DisposableStore,u=[];u.push(r.add(b.createLogger(C.logFile,{name:E}))),C.isExtensionDevelopment&&!!C.extensionTestsLocationURI?u.push(b.createConsoleMainLogger()):u.push(r.add(new t.ConsoleLogger(I)));const i=r.add(new t.MultiplexLogService(u)),f=r.add(new p.FollowerLogService(S,i));super(f),this._register(r)}}e.NativeLogService=A}),define(ae[2648],le([1,0,800,102]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerMainProcessRemoteService)(t.IMenubarService,"menubar")}),define(ae[2649],le([1,0,2027,26,442,2,6,35,36,23]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationService=void 0;let S=class Bs extends A.Disposable{constructor(r){super(),this.storageService=r,this.model=this._register(new R.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._onDidChangeDoNotDisturbMode=this._register(new k.Emitter),this.onDidChangeDoNotDisturbMode=this._onDidChangeDoNotDisturbMode.event,this._doNotDisturbMode=this.storageService.getBoolean(Bs.DND_SETTINGS_KEY,-1,!1),this.updateDoNotDisturbFilters(),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(r=>{switch(r.kind){case 0:case 3:{const u={message:r.item.message.original,severity:r.item.severity,source:typeof r.item.sourceId=="string"&&typeof r.item.source=="string"?{id:r.item.sourceId,label:r.item.source}:r.item.source,silent:r.item.silent};r.kind===0&&this._onDidAddNotification.fire(u),r.kind===3&&this._onDidRemoveNotification.fire(u);break}}}))}get doNotDisturbMode(){return this._doNotDisturbMode}set doNotDisturbMode(r){this._doNotDisturbMode!==r&&(this.storageService.store(Bs.DND_SETTINGS_KEY,r,-1,1),this._doNotDisturbMode=r,this.updateDoNotDisturbFilters(),this._onDidChangeDoNotDisturbMode.fire())}updateDoNotDisturbFilters(){let r;this._doNotDisturbMode?r=p.NotificationsFilter.ERROR:r=p.NotificationsFilter.OFF,this.model.setFilter(r)}info(r){if(Array.isArray(r)){r.forEach(u=>this.info(u));return}this.model.addNotification({severity:p.Severity.Info,message:r})}warn(r){if(Array.isArray(r)){r.forEach(u=>this.warn(u));return}this.model.addNotification({severity:p.Severity.Warning,message:r})}error(r){if(Array.isArray(r)){r.forEach(u=>this.error(u));return}this.model.addNotification({severity:p.Severity.Error,message:r})}notify(r){const u=new A.DisposableStore;if(r.neverShowAgain){const f=this.toStorageScope(r.neverShowAgain),c=r.neverShowAgain.id;if(this.storageService.getBoolean(c,f))return new p.NoOpNotification;const l=u.add(new I.Action("workbench.notification.neverShowAgain",(0,t.localize)(0,null),void 0,!0,async()=>{i.close(),this.storageService.store(c,!0,f,0)})),s={primary:r.actions?.primary||[],secondary:r.actions?.secondary||[]};r.neverShowAgain.isSecondary?s.secondary=[...s.secondary,l]:s.primary=[l,...s.primary],r.actions=s}const i=this.model.addNotification(r);return k.Event.once(i.onDidClose)(()=>u.dispose()),i}toStorageScope(r){switch(r.scope){case p.NeverShowAgainScope.APPLICATION:return-1;case p.NeverShowAgainScope.PROFILE:return 0;case p.NeverShowAgainScope.WORKSPACE:return 1;default:return-1}}prompt(r,u,i,f){const c=new A.DisposableStore;if(f?.neverShowAgain){const o=this.toStorageScope(f.neverShowAgain),g=f.neverShowAgain.id;if(this.storageService.getBoolean(g,o))return new p.NoOpNotification;const h={label:(0,t.localize)(1,null),run:()=>this.storageService.store(g,!0,o,0),isSecondary:f.neverShowAgain.isSecondary};f.neverShowAgain.isSecondary?i=[...i,h]:i=[h,...i]}let l=!1;const s=[],d=[];i.forEach((o,g)=>{const h=new R.ChoiceAction(`workbench.dialog.choice.${g}`,o);o.isSecondary?d.push(h):s.push(h),c.add(h.onDidRun(()=>{l=!0,o.keepOpen||a.close()})),c.add(h)});const n={primary:s,secondary:d},a=this.notify({severity:r,message:u,actions:n,sticky:f?.sticky,silent:f?.silent});return k.Event.once(a.onDidClose)(()=>{c.dispose(),f&&typeof f.onCancel=="function"&&!l&&f.onCancel()}),a}status(r,u){return this.model.showStatusMessage(r,u)}};S.DND_SETTINGS_KEY="notifications.doNotDisturbMode",S=we([F(0,b.IStorageService)],S),e.NotificationService=S,(0,E.registerSingleton)(p.INotificationService,S,1)}),define(ae[395],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineConfigCollapseItemsValues=e.OutlineConfigKeys=e.OutlineTarget=e.IOutlineService=void 0,e.IOutlineService=(0,t.createDecorator)("IOutlineService");var p;(function(k){k[k.OutlinePane=1]="OutlinePane",k[k.Breadcrumbs=2]="Breadcrumbs",k[k.QuickPick=4]="QuickPick"})(p=e.OutlineTarget||(e.OutlineTarget={}));var R;(function(k){k.icons="outline.icons",k.collapseItems="outline.collapseItems",k.problemsEnabled="outline.problems.enabled",k.problemsColors="outline.problems.colors",k.problemsBadges="outline.problems.badges"})(R=e.OutlineConfigKeys||(e.OutlineConfigKeys={}));var A;(function(k){k.Collapsed="alwaysCollapse",k.Expanded="alwaysExpand"})(A=e.OutlineConfigCollapseItemsValues||(e.OutlineConfigCollapseItemsValues={}))}),define(ae[2650],le([1,0,32,21,6,2,18,34,22,8,516,19,13,395,41]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsModel=e.OutlineElement2=e.FileElement=void 0;class f{constructor(d,n){this.uri=d,this.kind=n}}e.FileElement=f;class c{constructor(d,n){this.element=d,this.outline=n}}e.OutlineElement2=c;let l=class{constructor(d,n,a,o,g){this.resource=d,this._workspaceService=o,this._outlineService=g,this._disposables=new A.DisposableStore,this._currentOutline=new A.MutableDisposable,this._outlineDisposables=new A.DisposableStore,this._onDidUpdate=new R.Emitter,this.onDidUpdate=this._onDidUpdate.event,this._cfgFilePath=S.BreadcrumbsConfig.FilePath.bindTo(a),this._cfgSymbolPath=S.BreadcrumbsConfig.SymbolPath.bindTo(a),this._disposables.add(this._cfgFilePath.onDidChange(h=>this._onDidUpdate.fire(this))),this._disposables.add(this._cfgSymbolPath.onDidChange(h=>this._onDidUpdate.fire(this))),this._workspaceService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspaceFolders,this,this._disposables),this._fileInfo=this._initFilePathInfo(d),n&&(this._bindToEditor(n),this._disposables.add(g.onDidChange(()=>this._bindToEditor(n))),this._disposables.add(n.onDidChangeControl(()=>this._bindToEditor(n)))),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 d=[];if(this._cfgFilePath.getValue()==="on"?d=d.concat(this._fileInfo.path):this._cfgFilePath.getValue()==="last"&&this._fileInfo.path.length>0&&(d=d.concat(this._fileInfo.path.slice(-1))),this._cfgSymbolPath.getValue()==="off"||!this._currentOutline.value)return d;const n=this._currentOutline.value.config.breadcrumbsDataSource.getBreadcrumbElements();for(let a=this._cfgSymbolPath.getValue()==="last"&&n.length>0?n.length-1:0;a<n.length;a++)d.push(new c(n[a],this._currentOutline.value));return n.length===0&&!this._currentOutline.value.isEmpty&&d.push(new c(this._currentOutline.value,this._currentOutline.value)),d}_initFilePathInfo(d){if((0,i.matchesSomeScheme)(d,I.Schemas.untitled,I.Schemas.data))return{folder:void 0,path:[]};const n={folder:(0,r.withNullAsUndefined)(this._workspaceService.getWorkspaceFolder(d)),path:[]};let a=d;for(;a&&a.path!=="/"&&!(n.folder&&(0,k.isEqual)(n.folder.uri,a));){n.path.unshift(new f(a,n.path.length===0?C.FileKind.FILE:C.FileKind.FOLDER));const o=a.path.length;if(a=(0,k.dirname)(a),a.path.length===o)break}return n.folder&&this._workspaceService.getWorkbenchState()===3&&n.path.unshift(new f(n.folder.uri,C.FileKind.ROOT_FOLDER)),n}_onDidChangeWorkspaceFolders(){this._fileInfo=this._initFilePathInfo(this.resource),this._onDidUpdate.fire(this)}_bindToEditor(d){const n=new t.CancellationTokenSource;this._currentOutline.clear(),this._outlineDisposables.clear(),this._outlineDisposables.add((0,A.toDisposable)(()=>n.dispose(!0))),this._outlineService.createOutline(d,2,n.token).then(a=>{n.token.isCancellationRequested&&(a?.dispose(),a=void 0),this._currentOutline.value=a,this._onDidUpdate.fire(this),a&&this._outlineDisposables.add(a.onDidChange(()=>this._onDidUpdate.fire(this)))}).catch(a=>{this._onDidUpdate.fire(this),(0,p.onUnexpectedError)(a)})}};l=we([F(2,b.IConfigurationService),F(3,E.IWorkspaceContextService),F(4,u.IOutlineService)],l),e.BreadcrumbsModel=l}),define(ae[2651],le([1,0,6,2,395,44,17,2285,105,375,32,11,21,114,5,20,75,8,1559,497,124,18,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let g=class{constructor(w,D){this._editor=w,this._textResourceConfigurationService=D,this._breadcrumbs=[]}getBreadcrumbElements(){return this._breadcrumbs}clear(){this._breadcrumbs=[]}update(w,D){const y=this._computeBreadcrumbs(w,D);this._breadcrumbs=y}_computeBreadcrumbs(w,D){let y=w.getItemEnclosingPosition(D);if(!y)return[];const T=[];for(;y;){T.push(y);const L=y.parent;if(L instanceof b.OutlineModel||L instanceof b.OutlineGroup&&L.parent&&L.parent.children.size===1)break;y=L}const _=[];for(let L=T.length-1;L>=0;L--){const M=T[L];if(this._isFiltered(M))break;_.push(M)}return _.length===0?[]:_}_isFiltered(w){if(!(w instanceof b.OutlineElement))return!1;const D=`breadcrumbs.${E.DocumentSymbolFilter.kindToConfigName[w.symbol.kind]}`;let y;return this._editor&&this._editor.getModel()&&(y=this._editor.getModel().uri),!this._textResourceConfigurationService.getValue(y,D)}};g=we([F(1,u.ITextResourceConfigurationService)],g);let h=class{get activeElement(){const w=this._editor.getPosition();if(!(!w||!this._outlineModel))return this._outlineModel.getItemEnclosingPosition(w)}constructor(w,D,y,T,_,L,M,O,N,P){this._editor=w,this._languageFeaturesService=T,this._codeEditorService=_,this._outlineModelService=L,this._configurationService=M,this._markerDecorationsService=O,this._disposables=new p.DisposableStore,this._onDidChange=new t.Emitter,this.onDidChange=this._onDidChange.event,this._outlineDisposables=new p.DisposableStore,this.outlineKind="documentSymbols",this._breadcrumbsDataSource=new g(w,N);const B=new E.DocumentSymbolVirtualDelegate,V=[new E.DocumentSymbolGroupRenderer,P.createInstance(E.DocumentSymbolRenderer,!0)],z={getChildren:$=>$ instanceof b.OutlineElement||$ instanceof b.OutlineGroup?$.children.values():$===this&&this._outlineModel?this._outlineModel.children.values():[]},x=new E.DocumentSymbolComparator,H=N.getValue(w.getModel()?.uri,"outline.collapseItems"),W={collapseByDefault:D===2||D===1&&H==="alwaysCollapse",expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,identityProvider:new E.DocumentSymbolIdentityProvider,keyboardNavigationLabelProvider:new E.DocumentSymbolNavigationLabelProvider,accessibilityProvider:new E.DocumentSymbolAccessibilityProvider((0,s.localize)(0,null)),filter:D===1?P.createInstance(E.DocumentSymbolFilter,"outline"):D===2?P.createInstance(E.DocumentSymbolFilter,"breadcrumbs"):void 0};this.config={breadcrumbsDataSource:this._breadcrumbsDataSource,delegate:B,renderers:V,treeDataSource:z,comparator:x,options:W,quickPickDataSource:{getQuickPickElements:()=>{throw new Error("not implemented")}}},this._disposables.add(T.documentSymbolProvider.onDidChange($=>this._createOutline())),this._disposables.add(this._editor.onDidChangeModel($=>this._createOutline())),this._disposables.add(this._editor.onDidChangeModelLanguage($=>this._createOutline()));const U=new C.TimeoutTimer;this._disposables.add(U),this._disposables.add(this._editor.onDidChangeModelContent($=>{const q=this._editor.getModel();if(q){const X=L.getDebounceValue(q);U.cancelAndSet(()=>this._createOutline($),X)}})),this._disposables.add(this._editor.onDidDispose(()=>this._outlineDisposables.clear())),this._createOutline().finally(()=>y.open())}dispose(){this._disposables.dispose(),this._outlineDisposables.dispose()}get isEmpty(){return!this._outlineModel||b.TreeElement.empty(this._outlineModel)}get uri(){return this._outlineModel?.uri}async reveal(w,D,y){const T=b.OutlineModel.get(w);!T||!(w instanceof b.OutlineElement)||await this._codeEditorService.openCodeEditor({resource:T.uri,options:{...D,selection:f.Range.collapseToStart(w.symbol.selectionRange),selectionRevealType:3}},this._editor,y)}preview(w){if(!(w instanceof b.OutlineElement))return p.Disposable.None;const{symbol:D}=w;this._editor.revealRangeInCenterIfOutsideViewport(D.range,0);const y=this._editor.createDecorationsCollection([{range:D.range,options:{description:"document-symbols-outline-range-highlight",className:"rangeHighlight",isWholeLine:!0}}]);return(0,p.toDisposable)(()=>y.clear())}captureViewState(){const w=this._editor.saveViewState();return(0,p.toDisposable)(()=>{w&&this._editor.restoreViewState(w)})}async _createOutline(w){if(this._outlineDisposables.clear(),w||this._setOutlineModel(void 0),!this._editor.hasModel())return;const D=this._editor.getModel();if(!this._languageFeaturesService.documentSymbolProvider.has(D))return;const y=new S.CancellationTokenSource,T=D.getVersionId(),_=new C.TimeoutTimer;this._outlineDisposables.add(_),this._outlineDisposables.add((0,p.toDisposable)(()=>y.dispose(!0)));try{const L=await this._outlineModelService.getOrCreate(D,y.token);if(y.token.isCancellationRequested)return;if(b.TreeElement.empty(L)||!this._editor.hasModel()){this._setOutlineModel(L);return}if(w&&this._outlineModel&&D.getLineCount()>=25){const M=b.TreeElement.size(L),O=D.getValueLength(),N=M/O,P=b.TreeElement.size(this._outlineModel),B=O-w.changes.reduce((z,x)=>z+x.rangeLength,0),V=P/B;if((N<=V*.5||N>=V*1.5)&&!await(0,C.raceCancellation)((0,C.timeout)(2e3).then(()=>!0),y.token,!1))return}this._applyMarkersToOutline(L),this._outlineDisposables.add(this._markerDecorationsService.onDidChangeMarker(M=>{(0,a.isEqual)(L.uri,M.uri)&&(this._applyMarkersToOutline(L),this._onDidChange.fire({}))})),this._outlineDisposables.add(this._configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration("outline.problems.enabled")&&(this._configurationService.getValue("outline.problems.enabled")?this._applyMarkersToOutline(L):L.updateMarker([]),this._onDidChange.fire({})),M.affectsConfiguration("outline")&&this._onDidChange.fire({}),M.affectsConfiguration("breadcrumbs")&&this._editor.hasModel()&&(this._breadcrumbsDataSource.update(L,this._editor.getPosition()),this._onDidChange.fire({}))})),this._outlineDisposables.add(this._configurationService.onDidChangeConfiguration(M=>{M.affectsConfiguration("outline.icons")&&this._onDidChange.fire({}),M.affectsConfiguration("outline")&&this._onDidChange.fire({})})),this._outlineDisposables.add(this._editor.onDidChangeCursorPosition(M=>{_.cancelAndSet(()=>{!D.isDisposed()&&T===D.getVersionId()&&this._editor.hasModel()&&(this._breadcrumbsDataSource.update(L,this._editor.getPosition()),this._onDidChange.fire({affectOnlyActiveElement:!0}))},150)})),this._setOutlineModel(L)}catch(L){this._setOutlineModel(void 0),(0,r.onUnexpectedError)(L)}}_applyMarkersToOutline(w){if(!w||!this._configurationService.getValue("outline.problems.enabled"))return;const D=[];for(const[y,T]of this._markerDecorationsService.getLiveMarkers(w.uri))(T.severity===n.MarkerSeverity.Error||T.severity===n.MarkerSeverity.Warning)&&D.push({...y,severity:T.severity});w.updateMarker(D)}_setOutlineModel(w){const D=this._editor.getPosition();!D||!w?(this._outlineModel=void 0,this._breadcrumbsDataSource.clear()):(this._outlineModel?.merge(w)||(this._outlineModel=w),this._breadcrumbsDataSource.update(w,D)),this._onDidChange.fire({})}};h=we([F(3,o.ILanguageFeaturesService),F(4,c.ICodeEditorService),F(5,b.IOutlineModelService),F(6,l.IConfigurationService),F(7,d.IMarkerDecorationsService),F(8,u.ITextResourceConfigurationService),F(9,i.IInstantiationService)],h);let v=class{constructor(w){const D=w.registerOutlineCreator(this);this.dispose=()=>D.dispose()}matches(w){const D=w.getControl();return(0,I.isCodeEditor)(D)||(0,I.isDiffEditor)(D)}async createOutline(w,D,y){const T=w.getControl();let _;if((0,I.isCodeEditor)(T)?_=T:(0,I.isDiffEditor)(T)&&(_=T.getModifiedEditor()),!_)return;const L=new C.Barrier,M=_.invokeWithinContext(O=>O.get(i.IInstantiationService).createInstance(h,_,D,L));return await L.wait(),M}};v=we([F(0,R.IOutlineService)],v),k.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(v,4)}),define(ae[677],le([1,0,1562,48,24,17,222,2167,8,2,11,32,15,417,96,21,395,105,58,375,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolQuickAccessProvider=void 0;let a=class tl extends E.AbstractGotoSymbolQuickAccessProvider{constructor(h,v,m,w,D,y){super(w,y,{openSideBySideDirection:()=>this.configuration.openSideBySideDirection}),this.editorService=h,this.editorGroupService=v,this.configurationService=m,this.outlineService=D,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,v){if((v.keyMods.alt||this.configuration.openEditorPinned&&v.keyMods.ctrlCmd||v.forceSideBySide)&&this.editorService.activeEditor){h.restoreViewState?.();const m={selection:v.range,pinned:v.keyMods.ctrlCmd||this.configuration.openEditorPinned,preserveFocus:v.preserveFocus};this.editorGroupService.sideGroup.openEditor(this.editorService.activeEditor,m)}else super.gotoLocation(h,v)}async getSymbolPicks(h,v,m,w,D){return!await Promise.race([this.waitForLanguageSymbolRegistry(h,w),(0,S.timeout)(tl.SYMBOL_PICKS_TIMEOUT)])||D.isCancellationRequested?[]:this.doGetSymbolPicks(this.getDocumentSymbols(h,D),(0,u.prepareQuery)(v),m,D)}addDecorations(h,v){super.addDecorations(h,v)}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 v=this.editorService.activeEditorPane;if(!v)return b.Disposable.None;const m=new C.CancellationTokenSource,w=new b.DisposableStore;return w.add((0,b.toDisposable)(()=>m.dispose(!0))),h.busy=!0,this.outlineService.createOutline(v,4,m.token).then(D=>{if(!D)return;if(m.token.isCancellationRequested){D.dispose();return}w.add(D);const y=D.captureViewState();w.add((0,b.toDisposable)(()=>{h.selectedItems.length===0&&y.dispose()}));const T=D.config.quickPickDataSource.getQuickPickElements(),_=T.map((O,N)=>({kind:0,index:N,score:0,label:O.label,description:O.description,ariaLabel:O.ariaLabel,iconClasses:O.iconClasses}));w.add(h.onDidAccept(()=>{h.hide();const[O]=h.selectedItems;O&&T[O.index]&&D.reveal(T[O.index].element,{},!1)}));const L=()=>{const O=_.filter(N=>{if(h.value==="@")return N.score=0,N.highlights=void 0,!0;const P=(0,i.fuzzyScore)(h.value,h.value.toLowerCase(),1,N.label,N.label.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return P?(N.score=P[1],N.highlights={label:(0,i.createMatches)(P)},!0):!1});if(O.length===0){const N=(0,t.localize)(0,null);h.items=[{label:N,index:-1,kind:14}],h.ariaLabel=N}else h.items=O};L(),w.add(h.onDidChangeValue(L));const M=new b.MutableDisposable;w.add(M),w.add(h.onDidChangeActive(()=>{const[O]=h.activeItems;O&&T[O.index]?M.value=D.preview(T[O.index].element):M.clear()}))}).catch(D=>{(0,f.onUnexpectedError)(D),h.hide()}).finally(()=>{h.busy=!1}),w}};a.SYMBOL_PICKS_TIMEOUT=8e3,a=we([F(0,R.IEditorService),F(1,s.IEditorGroupsService),F(2,I.IConfigurationService),F(3,n.ILanguageFeaturesService),F(4,c.IOutlineService),F(5,d.IOutlineModelService)],a),e.GotoSymbolQuickAccessProvider=a;class o extends r.Action2{constructor(){super({id:o.ID,title:{value:(0,t.localize)(1,null),mnemonicTitle:(0,t.localize)(2,null),original:"Go to Symbol in Editor..."},f1:!0,keybinding:{when:void 0,weight:200,primary:3117},menu:[{id:r.MenuId.MenubarGoMenu,group:"4_symbol_nav",order:1}]})}run(h){h.get(p.IQuickInputService).quickAccess.show(a.PREFIX)}}o.ID="workbench.action.gotoSymbol",(0,r.registerAction2)(o),A.Registry.as(k.Extensions.Quickaccess).registerQuickAccessProvider({ctor:a,prefix:E.AbstractGotoSymbolQuickAccessProvider.PREFIX,contextKey:"inFileSymbolsPicker",placeholder:(0,t.localize)(3,null),helpEntries:[{description:(0,t.localize)(4,null),prefix:E.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:o.ID},{description:(0,t.localize)(5,null),prefix:E.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(ae[2652],le([1,0,29,6,2,12,101,667,64,395,44,17,96,239,24,5,199,1760,124,33,18,11,8,55,357,238,162,215,1154]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookCellOutline=e.OutlineEntry=void 0;class D{get icon(){return this.isExecuting&&this.isPaused?w.executingStateIcon:this.isExecuting?A.ThemeIcon.modify(w.executingStateIcon,"spin"):this.cell.cellKind===I.CellKind.Markup?t.Codicon.markdown:t.Codicon.code}constructor(z,x,H,W,U,$){this.index=z,this.level=x,this.cell=H,this.label=W,this.isExecuting=U,this.isPaused=$,this._children=[]}addChild(z){this._children.push(z),z._parent=this}get parent(){return this._parent}get children(){return this._children}get markerInfo(){return this._markerInfo}updateMarkers(z){if(this.cell.cellKind===I.CellKind.Code){const x=z.read({resource:this.cell.uri,severities:s.MarkerSeverity.Error|s.MarkerSeverity.Warning});if(x.length===0)this._markerInfo=void 0;else{const H=x.find(W=>W.severity===s.MarkerSeverity.Error)?.severity??s.MarkerSeverity.Warning;this._markerInfo={topSev:H,count:x.length}}}else{let x;for(const H of this.children)H.updateMarkers(z),H.markerInfo&&(x=x?Math.max(H.markerInfo.topSev,x):H.markerInfo.topSev);this._markerInfo=x&&{topSev:x,count:0}}}clearMarkers(){this._markerInfo=void 0;for(const z of this.children)z.clearMarkers()}find(z,x){if(z.id===this.cell.id)return this;x.push(this);for(const H of this.children){const W=H.find(z,x);if(W)return W}x.pop()}asFlatList(z){z.push(this);for(const x of this.children)x.asFlatList(z)}}e.OutlineEntry=D;class y{constructor(z,x,H,W){this.container=z,this.iconClass=x,this.iconLabel=H,this.decoration=W}}y.templateId="NotebookOutlineRenderer";let T=class{constructor(z,x){this._themeService=z,this._configurationService=x,this.templateId=y.templateId}renderTemplate(z){z.classList.add("notebook-outline-element","show-file-icons");const x=document.createElement("div");z.append(x);const H=new u.IconLabel(z,{supportHighlights:!0}),W=document.createElement("div");return W.className="element-decoration",z.append(W),new y(z,x,H,W)}renderElement(z,x,H,W){const U=[],$={matches:(0,r.createMatches)(z.filterData),labelEscapeNewLines:!0,extraClasses:U};z.element.cell.cellKind===I.CellKind.Code&&this._themeService.getFileIconTheme().hasFileIcons&&!z.element.isExecuting?(H.iconClass.className="",U.push(...(0,c.getIconClassesForLanguageId)(z.element.cell.language??""))):H.iconClass.className="element-icon "+A.ThemeIcon.asClassNameArray(z.element.icon).join(" "),H.iconLabel.setLabel(z.element.label,void 0,$);const{markerInfo:q}=z.element;if(H.container.style.removeProperty("--outline-element-color"),H.decoration.innerText="",q){this._configurationService.getValue("outline.problems.badges")?q.count===0?(H.decoration.classList.add("bubble"),H.decoration.innerText="\uEA71"):(H.decoration.classList.remove("bubble"),H.decoration.innerText=q.count>9?"9+":String(q.count)):(H.decoration.classList.remove("bubble"),H.decoration.innerText="");const G=this._themeService.getColorTheme().getColor(q.topSev===s.MarkerSeverity.Error?d.listErrorForeground:d.listWarningForeground);this._configurationService.getValue("outline.problems.colors")?H.container.style.setProperty("--outline-element-color",G?.toString()??"inherit"):(H.container.style.removeProperty("--outline-element-color"),H.decoration.style.setProperty("--outline-element-color",G?.toString()??"inherit"))}}disposeTemplate(z){z.iconLabel.dispose()}};T=we([F(0,A.IThemeService),F(1,o.IConfigurationService)],T);class _{getAriaLabel(z){return z.label}getWidgetAriaLabel(){return""}}class L{getKeyboardNavigationLabel(z){return z.label}}class M{getHeight(z){return 22}getTemplateId(z){return y.templateId}}let O=class{constructor(z,x){this._getEntries=z,this._themeService=x}getQuickPickElements(){const z=[];for(const W of this._getEntries())W.asFlatList(z);const x=[],{hasFileIcons:H}=this._themeService.getFileIconTheme();for(const W of z)x.push({element:W,label:H?W.label:`$(${W.icon.id}) ${W.label}`,ariaLabel:W.label,iconClasses:H?(0,c.getIconClassesForLanguageId)(W.cell.language??""):void 0});return x}};O=we([F(1,A.IThemeService)],O);class N{constructor(){this._collator=new a.IdleValue(()=>new Intl.Collator(void 0,{numeric:!0}))}compareByPosition(z,x){return z.index-x.index}compareByType(z,x){return z.cell.cellKind-x.cell.cellKind||this._collator.value.compare(z.label,x.label)}compareByName(z,x){return this._collator.value.compare(z.label,x.label)}}let P=class il{get activeElement(){return this._activeEntry}constructor(z,x,H,W,U,$,q,X){this._editor=z,this._target=x,this._editorService=U,this._markerService=$,this._configurationService=q,this._notebookExecutionStateService=X,this._dispoables=new R.DisposableStore,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this._entries=[],this._entriesDisposables=new R.DisposableStore,this.outlineKind="notebookCells";const G=new R.MutableDisposable;this._dispoables.add(G);const Q=()=>{const re=z.getControl();re?.hasModel()?G.value=(0,R.combinedDisposable)(p.Event.debounce(re.onDidChangeSelection,(oe,se)=>oe,200)(this._recomputeActive,this),p.Event.debounce(re.onDidChangeViewCells,(oe,se)=>oe??se,200)(this._recomputeState,this)):G.clear()};this._dispoables.add(z.onDidChangeModel(()=>{this._recomputeState(),Q()})),this._dispoables.add(q.onDidChangeConfiguration(re=>{re.affectsConfiguration("notebook.outline.showCodeCells")&&this._recomputeState()})),this._dispoables.add(W.onDidFileIconThemeChange(()=>{this._onDidChange.fire({})})),this._dispoables.add(X.onDidChangeCellExecution(re=>{!!this._editor.textModel&&re.affectsNotebook(this._editor.textModel?.uri)&&this._recomputeState()})),this._recomputeState(),Q();const j={collapseByDefault:x===2||x===1&&q.getValue("outline.collapseItems")==="alwaysCollapse",expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,accessibilityProvider:new _,identityProvider:{getId:re=>re.cell.id},keyboardNavigationLabelProvider:new L},K={getChildren:re=>re instanceof il?this._entries:re.children},Y=new M,ee=[H.createInstance(T)],ie=new N;this.config={breadcrumbsDataSource:{getBreadcrumbElements:()=>{const re=[];let oe=this._activeEntry;for(;oe;)re.unshift(oe),oe=oe.parent;return re}},quickPickDataSource:H.createInstance(O,()=>this._entries),treeDataSource:K,delegate:Y,renderers:ee,comparator:ie,options:j}}dispose(){this._onDidChange.dispose(),this._dispoables.dispose(),this._entriesDisposables.dispose()}_recomputeState(){this._entriesDisposables.clear(),this._activeEntry=void 0,this._entries.length=0,this._uri=void 0;const z=this._editor.getControl();if(!z||!z.hasModel())return;this._uri=z.textModel.uri;const x=z;if(x.getLength()===0)return;let H=!0;this._target===1?H=this._configurationService.getValue("notebook.outline.showCodeCells"):this._target===2&&(H=this._configurationService.getValue("notebook.breadcrumbs.showCodeCells"));const W=x.getFocus().start,U=x.cellAt(W)?.handle,$=[];for(let G=0;G<x.getLength();G++){const Q=x.cellAt(G),j=Q.cellKind===I.CellKind.Markup;if(!j&&!H)continue;let K=this._getCellFirstNonEmptyLine(Q),Y=!1;if(j){const ee=Q.getText().substring(0,1e4);for(const ie of h.marked.lexer(ee,{gfm:!0}))ie.type==="heading"&&(Y=!0,$.push(new D($.length,ie.depth,Q,(0,v.renderMarkdownAsPlaintext)({value:ie.text}).trim(),!1,!1)));if(!Y){const ie=ee.match(/<h([1-6]).*>(.*)<\/h\1>/i);if(ie){Y=!0;const re=parseInt(ie[1]),oe=ie[2].trim();$.push(new D($.length,re,Q,oe,!1,!1))}}Y||(K=(0,v.renderMarkdownAsPlaintext)({value:K}))}if(!Y){let ee=K.trim();ee.length===0&&(ee=(0,l.localize)(0,null));const ie=!j&&this._notebookExecutionStateService.getCellExecution(Q.uri);$.push(new D($.length,7,Q,ee,!!ie,ie?ie.isPaused:!1))}Q.handle===U&&(this._activeEntry=$[$.length-1]),this._entriesDisposables.add(Q.model.onDidChangeContent(()=>{this._recomputeState(),this._onDidChange.fire({})}))}if($.length>0){const G=[$[0]],Q=[$[0]];for(let j=1;j<$.length;j++){const K=$[j];for(;;){const Y=Q.length;if(Y===0){G.push(K),Q.push(K);break}else{const ee=Q[Y-1];if(ee.level<K.level){ee.addChild(K),Q.push(K);break}else Q.pop()}}}this._entries=G}const q=new R.MutableDisposable;this._entriesDisposables.add(q);const X=()=>{const G=Q=>{for(const j of this._entries)Q?j.clearMarkers():j.updateMarkers(this._markerService)};this._configurationService.getValue("outline.problems.enabled")?(q.value=this._markerService.onMarkerChanged(Q=>{Q.some(j=>x.getCellsInRange().some(K=>(0,n.isEqual)(K.uri,j)))&&(G(!1),this._onDidChange.fire({}))}),G(!1)):(q.clear(),G(!0))};X(),this._entriesDisposables.add(this._configurationService.onDidChangeConfiguration(G=>{G.affectsConfiguration("outline.problems.enabled")&&(X(),this._onDidChange.fire({}))})),this._onDidChange.fire({})}_recomputeActive(){let z;const x=this._editor.getControl();if(x&&x.hasModel()&&x.getLength()>0){const H=x.cellAt(x.getFocus().start);if(H){for(const W of this._entries)if(z=W.find(H,[]),z)break}}z!==this._activeEntry&&(this._activeEntry=z,this._onDidChange.fire({affectOnlyActiveElement:!0}))}_getCellFirstNonEmptyLine(z){const x=z.textBuffer;for(let H=0;H<x.getLineCount();H++){const W=x.getLineFirstNonWhitespaceColumn(H+1),U=x.getLineLength(H+1);if(W<U)return x.getLineContent(H+1)}return z.getText().substring(0,1e4)}get isEmpty(){return this._entries.length===0}get uri(){return this._uri}async reveal(z,x,H){await this._editorService.openEditor({resource:z.cell.uri,options:{...x,override:this._editor.input?.editorId,cellRevealType:k.CellRevealType.NearTopIfOutsideViewport}},H?i.SIDE_GROUP:void 0)}preview(z){const x=this._editor.getControl();if(!x)return R.Disposable.None;x.revealInCenterIfOutsideViewport(z.cell);const H=x.deltaCellDecorations([],[{handle:z.cell.handle,options:{className:"nb-symbolHighlight",outputClassName:"nb-symbolHighlight"}}]);return(0,R.toDisposable)(()=>{x.deltaCellDecorations(H,[])})}captureViewState(){const z=this._editor.getControl(),x=z?.getEditorViewState();return(0,R.toDisposable)(()=>{x&&z?.restoreListViewState(x)})}};P=we([F(2,f.IInstantiationService),F(3,A.IThemeService),F(4,i.IEditorService),F(5,s.IMarkerService),F(6,o.IConfigurationService),F(7,m.INotebookExecutionStateService)],P),e.NotebookCellOutline=P;let B=class{constructor(z,x){this._instantiationService=x;const H=z.registerOutlineCreator(this);this.dispose=()=>H.dispose()}matches(z){return z.getId()===E.NotebookEditor.ID}async createOutline(z,x){return this._instantiationService.createInstance(P,z,x)}};B=we([F(0,b.IOutlineService),F(1,f.IInstantiationService)],B),C.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(B,4),C.Registry.as(g.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.outline.showCodeCells":{type:"boolean",default:!1,markdownDescription:(0,l.localize)(1,null)},"notebook.breadcrumbs.showCodeCells":{type:"boolean",default:!0,markdownDescription:(0,l.localize)(2,null)}}})}),define(ae[2653],le([1,0,2,158,35,395,6]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class E{constructor(){this._factories=new p.LinkedList,this._onDidChange=new k.Emitter,this.onDidChange=this._onDidChange.event}canCreateOutline(b){for(const S of this._factories)if(S.matches(b))return!0;return!1}async createOutline(b,S,C){for(const r of this._factories)if(r.matches(b))return await r.createOutline(b,S,C)}registerOutlineCreator(b){const S=this._factories.push(b);return this._onDidChange.fire(),(0,t.toDisposable)(()=>{S(),this._onDidChange.fire()})}}(0,R.registerSingleton)(A.IOutlineService,E,1)}),define(ae[132],le([1,0,6,17,7,5,19,21,11]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ACTIVE_OUTPUT_CHANNEL_CONTEXT=e.registerLogChannel=e.Extensions=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 R.RawContextKey("inOutput",!1),e.CONTEXT_ACTIVE_LOG_OUTPUT=new R.RawContextKey("activeLogOutput",!1),e.CONTEXT_OUTPUT_SCROLL_LOCK=new R.RawContextKey("outputView.scrollLock",!1),e.IOutputService=(0,A.createDecorator)(e.OUTPUT_SERVICE_ID);var b;(function(u){u[u.Append=1]="Append",u[u.Replace=2]="Replace",u[u.Clear=3]="Clear"})(b=e.OutputChannelUpdateMode||(e.OutputChannelUpdateMode={})),e.Extensions={OutputChannels:"workbench.contributions.outputChannels"};class S{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(i){this.channels.has(i.id)||(this.channels.set(i.id,i),this._onDidRegisterChannel.fire(i.id))}getChannels(){const i=[];return this.channels.forEach(f=>i.push(f)),i}getChannel(i){return this.channels.get(i)}removeChannel(i){this.channels.delete(i),this._onDidRemoveChannel.fire(i)}}p.Registry.add(e.Extensions.OutputChannels,new S);function C(u,i,f,c,l){return(0,I.createCancelablePromise)(async s=>{await(0,k.whenProviderRegistered)(f,c);const d=p.Registry.as(e.Extensions.OutputChannels);try{await r(f,1,c,l,s),d.registerChannel({id:u,label:i,file:f,log:!0})}catch(n){(0,E.isCancellationError)(n)||l.error("Error while registering log channel",f.toString(),(0,E.getErrorMessage)(n))}})}e.registerLogChannel=C;async function r(u,i,f,c,l){if(!await f.exists(u)){if(l.isCancellationRequested)throw new E.CancellationError;if(i>10)throw new Error("Timed out while waiting for file to be created");c.debug("[Registering Log Channel] File does not exist. Waiting for 1s to retry.",u.toString()),await(0,I.timeout)(1e3,l),await r(u,i+1,f,c,l)}}e.ACTIVE_OUTPUT_CHANNEL_CONTEXT=new R.RawContextKey("activeOutputChannel","")}),define(ae[2654],le([1,0,17,132,67,77,9,2,6,45,13]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";var C;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadOutputService=void 0;let r=C=class extends E.Disposable{constructor(i,f,c){super(),this._outputService=f,this._viewsService=c,this._proxy=i.getProxy(R.ExtHostContext.ExtHostOutputService);const l=()=>{const s=this._viewsService.isViewVisible(p.OUTPUT_VIEW_ID)?this._outputService.getActiveChannel():void 0;this._proxy.$setVisibleChannel(s?s.id:null)};this._register(I.Event.any(this._outputService.onActiveOutputChannel,I.Event.filter(this._viewsService.onDidChangeViewVisibility,({id:s})=>s===p.OUTPUT_VIEW_ID))(()=>l())),l()}async $register(i,f,c,l,s){const d=(C._extensionIdPool.get(s)||0)+1;C._extensionIdPool.set(s,d);const n=`extension-output-${s}-#${d}-${i}`;return t.Registry.as(p.Extensions.OutputChannels).registerChannel({id:n,label:i,file:k.URI.revive(f),log:c,languageId:l,extensionId:s}),this._register((0,E.toDisposable)(()=>this.$dispose(n))),n}async $update(i,f,c){const l=this._getChannel(i);l&&(f===p.OutputChannelUpdateMode.Append?l.update(f):(0,S.isNumber)(c)&&l.update(f,c))}async $reveal(i,f){const c=this._getChannel(i);c&&this._outputService.showChannel(c.id,f)}async $close(i){if(this._viewsService.isViewVisible(p.OUTPUT_VIEW_ID)){const f=this._outputService.getActiveChannel();f&&i===f.id&&this._viewsService.closeView(p.OUTPUT_VIEW_ID)}}async $dispose(i){this._getChannel(i)?.dispose()}_getChannel(i){return this._outputService.getChannel(i)}};r._extensionIdPool=new Map,r=C=we([(0,A.extHostNamedCustomer)(R.MainContext.MainThreadOutputService),F(1,p.IOutputService),F(2,b.IViewsService)],r),e.MainThreadOutputService=r}),define(ae[2655],le([1,0,1712,15,38,70,256,132]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends p.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(S){S.get(R.IKeybindingService).toggleLogging()&&S.get(E.IOutputService).showChannel(k.rendererLogChannelId)}}(0,p.registerAction2)(I)}),define(ae[548],le([1,0,25,6,5,2,132]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelService=e.ILogLevelService=void 0,e.ILogLevelService=(0,R.createDecorator)("ILogLevelService");let E=class extends A.Disposable{constructor(b,S){super(),this.outputService=b,this.loggerService=S,this._onDidChangeLogLevel=this._register(new p.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event,this.logLevels=new Map}getLogLevel(b){return this.logLevels.get(b)}setLogLevel(b,S){if(this.getLogLevel(b)===S)return!1;this.logLevels.set(b,S);const C=this.outputService.getChannelDescriptor(b),r=C?.log?C.file:void 0;return r&&this.loggerService.setLevel(r,S),this._onDidChangeLogLevel.fire({id:b,logLevel:S}),!0}};E=we([F(0,k.IOutputService),F(1,t.ILoggerService)],E),e.LogLevelService=E}),define(ae[2656],le([1,0,77,25,2,67,9,31,81,548,132,39]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadLoggerService=void 0;let r=class{constructor(i,f,c,l,s){this.loggerService=c,this.disposables=new R.DisposableStore;const d=i.getProxy(A.ExtHostContext.ExtHostLogLevelServiceShape);this.disposables.add(f.onDidChangeLogLevel(n=>d.$setLevel(n))),this.disposables.add(l.onDidChangeLogLevel(({id:n,logLevel:a})=>{const o=s.getChannelDescriptor(n),g=o?.log?o.file:void 0;g&&(o?.extensionId||n===C.localExtHostLog||n===C.remoteExtHostLog||n===C.webWorkerExtHostLog)&&d.$setLevel(a,g)}))}$log(i,f){const c=this.loggerService.getLogger(k.URI.revive(i));if(!c)throw new Error("Create the logger before logging");for(const[l,s]of f)(0,p.log)(c,l,s)}async $createLogger(i,f){this.loggerService.createLogger(k.URI.revive(i),f)}dispose(){this.disposables.dispose()}};r=we([(0,t.extHostNamedCustomer)(A.MainContext.MainThreadLogger),F(1,p.ILogService),F(2,p.ILoggerService),F(3,b.ILogLevelService),F(4,S.IOutputService)],r),e.MainThreadLoggerService=r,E.CommandsRegistry.registerCommand("_extensionTests.setLogLevel",function(u,i){const f=u.get(p.ILogService),c=u.get(I.IEnvironmentService);c.isExtensionDevelopment&&!!c.extensionTestsLocationURI&&f.setLevel(i)}),E.CommandsRegistry.registerCommand("_extensionTests.getLogLevel",function(u){return u.get(p.ILogService).getLevel()})}),define(ae[2657],le([1,0,1724,36,25,48,9,19,51,18,24,132,13,548,256,81,100]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenWindowSessionLogFileAction=e.SetLogLevelAction=void 0;let l=class extends p.Action{constructor(n,a,o,g,h,v,m){super(n,a),this.quickInputService=o,this.logService=g,this.logLevelService=h,this.outputService=v,this.environmentService=m}async run(){const n=await this.selectLogChannel();(0,r.isUndefined)(n)||await this.selectLogLevel(n)}async selectLogChannel(){const n=[],a=[];for(const h of this.outputService.getChannelDescriptors())!h.log||h.id===i.telemetryLogChannelId||h.id===i.extensionTelemetryLogChannelId||(h.extensionId?n.push(h):a.push(h));const o=[];o.push({label:t.localize(1,null)}),o.push({type:"separator",label:t.localize(2,null)});for(const h of a.sort((v,m)=>v.label.localeCompare(m.label)))o.push({label:h.label,channel:h});n.length&&a.length&&o.push({type:"separator",label:t.localize(3,null)});for(const h of n.sort((v,m)=>v.label.localeCompare(m.label)))o.push({label:h.label,channel:h});const g=await this.quickInputService.pick(o,{placeHolder:t.localize(4,null)});return g?g.channel??null:void 0}async selectLogLevel(n){const a=this.getDefaultLogLevel(n),o=n?this.logLevelService.getLogLevel(n.id)??a:this.logService.getLevel(),g=[{label:this.getLabel(t.localize(5,null),R.LogLevel.Trace,o),level:R.LogLevel.Trace,description:this.getDescription(R.LogLevel.Trace,a)},{label:this.getLabel(t.localize(6,null),R.LogLevel.Debug,o),level:R.LogLevel.Debug,description:this.getDescription(R.LogLevel.Debug,a)},{label:this.getLabel(t.localize(7,null),R.LogLevel.Info,o),level:R.LogLevel.Info,description:this.getDescription(R.LogLevel.Info,a)},{label:this.getLabel(t.localize(8,null),R.LogLevel.Warning,o),level:R.LogLevel.Warning,description:this.getDescription(R.LogLevel.Warning,a)},{label:this.getLabel(t.localize(9,null),R.LogLevel.Error,o),level:R.LogLevel.Error,description:this.getDescription(R.LogLevel.Error,a)},{label:this.getLabel(t.localize(10,null),R.LogLevel.Critical,o),level:R.LogLevel.Critical,description:this.getDescription(R.LogLevel.Critical,a)},{label:this.getLabel(t.localize(11,null),R.LogLevel.Off,o),level:R.LogLevel.Off,description:this.getDescription(R.LogLevel.Off,a)}],h=await this.quickInputService.pick(g,{placeHolder:n?t.localize(12,null,n?.label):t.localize(13,null),activeItem:g[this.logService.getLevel()]});h&&(n?this.logLevelService.setLogLevel(n.id,h.level):this.logService.setLevel(h.level))}getLabel(n,a,o){return a===o?`$(check) ${n}`:n}getDescription(n,a){return a===n?t.localize(14,null):void 0}getDefaultLogLevel(n){let a;if(n?.extensionId){const o=this.environmentService.extensionLogLevel?.find(([g])=>(0,c.areSameExtensions)({id:g},{id:n.extensionId}))?.[1];o&&(a=(0,R.parseLogLevel)(o))}return a??(0,R.getLogLevel)(this.environmentService)}};l.ID="workbench.action.setLogLevel",l.TITLE={value:t.localize(0,null),original:"Set Log Level..."},l=we([F(2,A.IQuickInputService),F(3,R.ILogService),F(4,u.ILogLevelService),F(5,C.IOutputService),F(6,f.IEnvironmentService)],l),e.SetLogLevelAction=l;let s=class extends p.Action{constructor(n,a,o,g,h,v){super(n,a),this.environmentService=o,this.fileService=g,this.quickInputService=h,this.editorService=v}async run(){const n=await this.quickInputService.pick(this.getSessions().then(a=>a.map((o,g)=>({id:o.toString(),label:(0,b.basename)(o),description:g===0?t.localize(16,null):void 0}))),{canPickMany:!1,placeHolder:t.localize(17,null)});if(n){const a=await this.quickInputService.pick(this.getLogFiles(k.URI.parse(n.id)).then(o=>o.map(g=>({id:g.toString(),label:(0,b.basename)(g)}))),{canPickMany:!1,placeHolder:t.localize(18,null)});if(a)return this.editorService.openEditor({resource:k.URI.parse(a.id),options:{pinned:!0}}).then(()=>{})}}async getSessions(){const n=k.URI.file(this.environmentService.logsPath).with({scheme:this.environmentService.logFile.scheme}),a=[n],o=await this.fileService.resolve((0,b.dirname)(n));return o.children&&a.push(...o.children.filter(g=>!(0,b.isEqual)(g.resource,n)&&g.isDirectory&&/^\d{8}T\d{6}$/.test(g.name)).sort().reverse().map(g=>g.resource)),a}async getLogFiles(n){const a=await this.fileService.resolve(n);return a.children?a.children.filter(o=>!o.isDirectory).map(o=>o.resource):[]}};s.ID="workbench.action.openSessionLogFile",s.TITLE={value:t.localize(15,null),original:"Open Window Log File (Session)..."},s=we([F(2,I.IWorkbenchEnvironmentService),F(3,E.IFileService),F(4,A.IQuickInputService),F(5,S.IEditorService)],s),e.OpenWindowSessionLogFileAction=s}),define(ae[2658],le([1,0,1723,17,70,15,2657,256,44,51,19,132,2,25,5,213,46]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:k.SetLogLevelAction.ID,title:k.SetLogLevelAction.TITLE,category:R.Categories.Developer,f1:!0})}run(s){return s.get(i.IInstantiationService).createInstance(k.SetLogLevelAction,k.SetLogLevelAction.ID,k.SetLogLevelAction.TITLE.value).run()}});let l=class extends r.Disposable{constructor(d,n,a,o){super(),this.environmentService=d,this.productService=n,this.logService=a,this.fileService=o,this.registerCommonContributions()}registerCommonContributions(){this.registerLogChannel(E.userDataSyncLogChannelId,t.localize(0,null),this.environmentService.userDataSyncLogResource),this.registerLogChannel(E.editSessionsLogChannelId,t.localize(1,null),this.environmentService.editSessionsLogResource),this.registerLogChannel(E.remoteTunnelLogChannelId,t.localize(2,null),this.environmentService.remoteTunnelLogResource),this.registerLogChannel(E.rendererLogChannelId,t.localize(3,null),this.environmentService.logFile);const d=()=>(0,f.supportsTelemetry)(this.productService,this.environmentService)&&this.logService.getLevel()===u.LogLevel.Trace?(this.registerLogChannel(E.telemetryLogChannelId,t.localize(4,null),this.environmentService.telemetryLogResource),this.registerLogChannel(E.extensionTelemetryLogChannelId,t.localize(5,null),this.environmentService.extHostTelemetryLogFile),!0):!1;if(!d()){const n=this.logService.onDidChangeLogLevel(()=>{d()&&n.dispose()})}(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:E.showWindowLogActionId,title:{value:t.localize(6,null),original:"Show Window Log"},category:R.Categories.Developer,f1:!0})}async run(a){a.get(C.IOutputService).showChannel(E.rendererLogChannelId)}})}registerLogChannel(d,n,a){const o=(0,C.registerLogChannel)(d,n,a,this.fileService,this.logService);this._register((0,r.toDisposable)(()=>o.cancel()))}};l=we([F(0,b.IWorkbenchEnvironmentService),F(1,c.IProductService),F(2,u.ILogService),F(3,S.IFileService)],l),p.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(l,3)}),define(ae[2659],le([1,0,1751,2,17,44,24,152,101,508,93,530,64,142,14,15,178,7,141,40,70,132,256,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookClipboardContribution=e.runCutCells=e.runCopyCells=e.runPasteCells=void 0;let h=!1;function v(){h=!h}function m(z,x){h&&z.info(`[NotebookClipboard]: ${x}`)}function w(z){const x=z.get(g.ILogService),H=z.get(k.IEditorService),W=(0,I.getNotebookEditorFromEditorPane)(H.activeEditorPane);if(!W){m(x,"[Revive Webview] No notebook editor found for active editor pane, bypass");return}if(!W.hasEditorFocus()){m(x,"[Revive Webview] Notebook editor is not focused, bypass");return}if(!W.hasWebviewFocus()){m(x,"[Revive Webview] Notebook editor backlayer webview is not focused, bypass");return}const U=W.getInnerWebview();return m(x,"[Revive Webview] Notebook editor backlayer webview is focused"),U}function D(z,x){const H=w(z);return H?(x(H),!0):!1}const y=105;d.UndoCommand.addImplementation(y,"notebook-webview",z=>D(z,x=>x.undo())),d.RedoCommand.addImplementation(y,"notebook-webview",z=>D(z,x=>x.redo())),b.CopyAction?.addImplementation(y,"notebook-webview",z=>D(z,x=>x.copy())),b.PasteAction?.addImplementation(y,"notebook-webview",z=>D(z,x=>x.paste())),b.CutAction?.addImplementation(y,"notebook-webview",z=>D(z,x=>x.cut()));function T(z,x,H){if(!z.hasModel())return!1;const W=z.textModel;if(z.isReadOnly)return!1;const U={kind:r.SelectionStateType.Index,focus:z.getFocus(),selections:z.getSelections()};if(x){const $=z.getCellIndex(x),q=typeof $=="number"?$+1:0;W.applyEdits([{editType:1,index:q,count:0,cells:H.items.map(X=>(0,C.cloneNotebookCellTextModel)(X))}],!0,U,()=>({kind:r.SelectionStateType.Index,focus:{start:q,end:q+1},selections:[{start:q,end:q+H.items.length}]}),void 0,!0)}else{if(z.getLength()!==0)return!1;W.applyEdits([{editType:1,index:0,count:0,cells:H.items.map($=>(0,C.cloneNotebookCellTextModel)($))}],!0,U,()=>({kind:r.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:1,end:H.items.length+1}]}),void 0,!0)}return!0}e.runPasteCells=T;function _(z,x,H){if(!x.hasModel())return!1;if(x.hasOutputTextSelection())return document.execCommand("copy"),!0;const W=z.get(S.IClipboardService),U=z.get(u.INotebookService),$=x.getSelections();if(H){const G=x.getCellIndex(H);if(!$.find(j=>j.start<=G&&G<j.end))return W.writeText(H.getText()),U.setToCopy([H.model],!0),!0}const q=(0,I.expandCellRangesWithHiddenCells)(x,x.getSelections()),X=(0,I.cellRangeToViewCells)(x,q);return X.length?(W.writeText(X.map(G=>G.getText()).join(` `)),U.setToCopy(X.map(G=>G.model),!0),!0):!1}e.runCopyCells=_;function L(z,x,H){if(!x.hasModel()||x.isReadOnly)return!1;const W=x.textModel,U=z.get(S.IClipboardService),$=z.get(u.INotebookService),q=x.getSelections();if(H){const ie=x.getCellIndex(H);if(!q.find(oe=>oe.start<=ie&&ie<oe.end)){U.writeText(H.getText());const oe=x.getFocus(),se=oe.end<=ie?oe:{start:oe.start-1,end:oe.end-1},te=q.map(Z=>Z.end<=ie?Z:{start:Z.start-1,end:Z.end-1});return W.applyEdits([{editType:1,index:ie,count:1,cells:[]}],!0,{kind:r.SelectionStateType.Index,focus:x.getFocus(),selections:q},()=>({kind:r.SelectionStateType.Index,focus:se,selections:te}),void 0,!0),$.setToCopy([H.model],!1),!0}}const X=x.getFocus();if(!q.find(ie=>ie.start<=X.start&&X.end<=ie.end)){const ie=x.cellAt(X.start);U.writeText(ie.getText());const re=X.end===x.getLength()?{start:X.start-1,end:X.end-1}:X,oe=q.map(se=>se.end<=X.start?se:{start:se.start-1,end:se.end-1});return W.applyEdits([{editType:1,index:X.start,count:1,cells:[]}],!0,{kind:r.SelectionStateType.Index,focus:x.getFocus(),selections:q},()=>({kind:r.SelectionStateType.Index,focus:re,selections:oe}),void 0,!0),$.setToCopy([ie.model],!1),!0}const Q=(0,I.expandCellRangesWithHiddenCells)(x,x.getSelections()),j=(0,I.cellRangeToViewCells)(x,Q);if(!j.length)return!1;U.writeText(j.map(ie=>ie.getText()).join(` `));const K=Q.map(ie=>({editType:1,index:ie.start,count:ie.end-ie.start,cells:[]})),Y=Q[0].start,ee=Y<W.cells.length-1?Y:Math.max(W.cells.length-2,0);return W.applyEdits(K,!0,{kind:r.SelectionStateType.Index,focus:x.getFocus(),selections:Q},()=>({kind:r.SelectionStateType.Index,focus:{start:ee,end:ee+1},selections:[{start:ee,end:ee+1}]}),void 0,!0),$.setToCopy(j.map(ie=>ie.model),!1),!0}e.runCutCells=L;let M=class extends p.Disposable{constructor(x){super(),this._editorService=x;const H=105;b.CopyAction&&this._register(b.CopyAction.addImplementation(H,"notebook-clipboard",W=>this.runCopyAction(W))),b.PasteAction&&this._register(b.PasteAction.addImplementation(H,"notebook-clipboard",W=>this.runPasteAction(W))),b.CutAction&&this._register(b.CutAction.addImplementation(H,"notebook-clipboard",W=>this.runCutAction(W)))}_getContext(){const x=(0,I.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane),H=x?.getActiveCell();return{editor:x,activeCell:H}}_focusInsideEmebedMonaco(x){const H=window.getSelection();if(H?.rangeCount!==1)return!1;const W=H.getRangeAt(0);if(W.startContainer===W.endContainer&&W.endOffset-W.startOffset===0)return!1;let U=W.commonAncestorContainer;const $=x.getDomNode();if(!$.contains(U))return!1;for(;U&&U!==$;){if(U.classList&&U.classList.contains("monaco-editor"))return!0;U=U.parentNode}return!1}runCopyAction(x){const H=x.get(g.ILogService),W=document.activeElement;if(W&&["input","textarea"].indexOf(W.tagName.toLowerCase())>=0)return m(H,"[NotebookEditor] focus is on input or textarea element, bypass"),!1;const{editor:U}=this._getContext();return U?this._focusInsideEmebedMonaco(U)?(m(H,"[NotebookEditor] focus is on embed monaco editor, bypass"),!1):(m(H,"[NotebookEditor] run copy actions on notebook model"),_(x,U,void 0)):(m(H,"[NotebookEditor] no active notebook editor, bypass"),!1)}runPasteAction(x){const H=document.activeElement;if(H&&["input","textarea"].indexOf(H.tagName.toLowerCase())>=0)return!1;const U=x.get(u.INotebookService).getToCopy();if(!U)return!1;const{editor:$,activeCell:q}=this._getContext();return $?T($,q,U):!1}runCutAction(x){const H=document.activeElement;if(H&&["input","textarea"].indexOf(H.tagName.toLowerCase())>=0)return!1;const{editor:W}=this._getContext();return W?L(x,W,void 0):!1}};M=we([F(0,k.IEditorService)],M),e.NotebookClipboardContribution=M,R.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(M,2);const N="notebook.cell.copy",P="notebook.cell.cut",B="notebook.cell.paste",V="notebook.cell.pasteAbove";(0,f.registerAction2)(class extends c.NotebookCellAction{constructor(){super({id:N,title:(0,t.localize)(0,null),menu:{id:f.MenuId.NotebookCellTitle,when:E.NOTEBOOK_EDITOR_FOCUSED,group:"1_copy"},keybinding:i.isNative?void 0:{primary:2081,win:{primary:2081,secondary:[2067]},when:l.ContextKeyExpr.and(E.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(s.InputFocusedContextKey)),weight:200}})}async runWithContext(z,x){_(z,x.notebookEditor,x.cell)}}),(0,f.registerAction2)(class extends c.NotebookCellAction{constructor(){super({id:P,title:(0,t.localize)(1,null),menu:{id:f.MenuId.NotebookCellTitle,when:l.ContextKeyExpr.and(E.NOTEBOOK_EDITOR_FOCUSED,E.NOTEBOOK_EDITOR_EDITABLE,E.NOTEBOOK_CELL_EDITABLE),group:"1_copy"},keybinding:i.isNative?void 0:{when:l.ContextKeyExpr.and(E.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(s.InputFocusedContextKey)),primary:2102,win:{primary:2102,secondary:[1044]},weight:200}})}async runWithContext(z,x){L(z,x.notebookEditor,x.cell)}}),(0,f.registerAction2)(class extends c.NotebookAction{constructor(){super({id:B,title:(0,t.localize)(2,null),menu:{id:f.MenuId.NotebookCellTitle,when:l.ContextKeyExpr.and(E.NOTEBOOK_EDITOR_FOCUSED,E.NOTEBOOK_EDITOR_EDITABLE),group:"1_copy"},keybinding:i.isNative?void 0:{when:l.ContextKeyExpr.and(E.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(s.InputFocusedContextKey)),primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}})}async runWithContext(z,x){const W=z.get(u.INotebookService).getToCopy();!x.notebookEditor.hasModel()||x.notebookEditor.isReadOnly||!W||T(x.notebookEditor,x.cell,W)}}),(0,f.registerAction2)(class extends c.NotebookCellAction{constructor(){super({id:V,title:(0,t.localize)(3,null),keybinding:{when:l.ContextKeyExpr.and(E.NOTEBOOK_EDITOR_FOCUSED,l.ContextKeyExpr.not(s.InputFocusedContextKey)),primary:3124,weight:c.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT}})}async runWithContext(z,x){const W=z.get(u.INotebookService).getToCopy(),U=x.notebookEditor,$=U.textModel;if(U.isReadOnly||!W)return;const q={kind:r.SelectionStateType.Index,focus:U.getFocus(),selections:U.getSelections()},X=x.notebookEditor.getCellIndex(x.cell),G=X;$.applyEdits([{editType:1,index:X,count:0,cells:W.items.map(Q=>(0,C.cloneNotebookCellTextModel)(Q))}],!0,q,()=>({kind:r.SelectionStateType.Index,focus:{start:G,end:G+1},selections:[{start:G,end:G+W.items.length}]}),void 0,!0)}}),(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"workbench.action.toggleNotebookClipboardLog",title:{value:(0,t.localize)(4,null),original:"Toggle Notebook Clipboard Troubleshooting"},category:n.Categories.Developer,f1:!0})}run(z){v(),h&&z.get(a.IOutputService).showChannel(o.rendererLogChannelId)}})}),define(ae[2660],le([1,0,11,54,34,132,801,2,122,61]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputLinkProvider=void 0;let S=class nl{constructor(r,u,i,f){this.contextService=r,this.modelService=u,this.languageConfigurationService=i,this.languageFeaturesService=f,this.disposeWorkerScheduler=new t.RunOnceScheduler(()=>this.disposeWorker(),nl.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 u=>{const i=await this.provideLinks(u.uri);return i&&{links:i}}})):((0,E.dispose)(this.linkProviderRegistration),this.linkProviderRegistration=void 0),this.disposeWorker(),this.disposeWorkerScheduler.cancel()}getOrCreateWorker(){if(this.disposeWorkerScheduler.schedule(),!this.worker){const r={workspaceFolders:this.contextService.getWorkspace().folders.map(u=>u.uri.toString())};this.worker=(0,k.createWebWorker)(this.modelService,this.languageConfigurationService,{moduleId:"vs/workbench/contrib/output/common/outputLinkComputer",createData:r,label:"outputLinkComputer"})}return this.worker}async provideLinks(r){return(await this.getOrCreateWorker().withSyncedResources([r])).computeLinks(r.toString())}disposeWorker(){this.worker&&(this.worker.dispose(),this.worker=void 0)}};S.DISPOSE_WORKER_TIME=3*60*1e3,S=we([F(0,R.IWorkspaceContextService),F(1,p.IModelService),F(2,I.ILanguageConfigurationService),F(3,b.ILanguageFeaturesService)],S),e.OutputLinkProvider=S}),define(ae[2661],le([1,0,5,18,212,6,11,19,54,2,13,138,50,20,56,25,32,132]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DelegatedOutputChannelModel=e.FileOutputChannelModel=void 0;class s extends b.Disposable{constructor(g,h,v){super(),this.file=g,this.fileService=h,this.logService=v,this._onDidContentChange=new A.Emitter,this.onDidContentChange=this._onDidContentChange.event,this.watching=!1,this.syncDelayer=new k.ThrottledDelayer(500)}watch(g){this.watching||(this.etag=g,this.poll(),this.logService.trace("Started polling",this.file.toString()),this.watching=!0)}poll(){const g=()=>this.doWatch().then(()=>this.poll());this.syncDelayer.trigger(g)}async doWatch(){const g=await this.fileService.stat(this.file);g.etag!==this.etag&&(this.etag=g.etag,this._onDidContentChange.fire(g.size))}unwatch(){this.watching&&(this.syncDelayer.cancel(),this.watching=!1,this.logService.trace("Stopped polling",this.file.toString()))}dispose(){this.unwatch(),super.dispose()}}let d=class extends b.Disposable{constructor(g,h,v,m,w,D,y){super(),this.modelUri=g,this.language=h,this.file=v,this.fileService=m,this.modelService=w,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 b.MutableDisposable),this.appendThrottler=this._register(new k.ThrottledDelayer(300)),this.startOffset=0,this.endOffset=0,this.fileHandler=this._register(new s(this.file,this.fileService,D)),this._register(this.fileHandler.onDidContentChange(T=>this.onDidContentChange(T))),this._register((0,b.toDisposable)(()=>this.fileHandler.unwatch()))}append(g){throw new Error("Not supported")}replace(g){throw new Error("Not supported")}clear(){this.update(l.OutputChannelUpdateMode.Clear,this.endOffset,!0)}update(g,h,v){(this.loadModelPromise?this.loadModelPromise:Promise.resolve()).then(()=>this.doUpdate(g,h,v))}loadModel(){return this.loadModelPromise=k.Promises.withAsyncBody(async(g,h)=>{try{let v="";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,v=m.value.toString()}else this.startOffset=0,this.endOffset=0;g(this.createModel(v))}catch(v){h(v)}}),this.loadModelPromise}createModel(g){if(this.model)this.model.setValue(g);else{this.model=this.modelService.createModel(g,this.language,this.modelUri),this.fileHandler.watch(this.etag);const h=this.model.onWillDispose(()=>{this.cancelModelUpdate(),this.fileHandler.unwatch(),this.model=null,(0,b.dispose)(h)})}return this.model}doUpdate(g,h,v){if((g===l.OutputChannelUpdateMode.Clear||g===l.OutputChannelUpdateMode.Replace)&&(this.startOffset=this.endOffset=(0,S.isNumber)(h)?h:this.endOffset,this.cancelModelUpdate()),!this.model)return;this.modelUpdateInProgress=!0,this.modelUpdateCancellationSource.value||(this.modelUpdateCancellationSource.value=new c.CancellationTokenSource);const m=this.modelUpdateCancellationSource.value.token;g===l.OutputChannelUpdateMode.Clear?this.clearContent(this.model):g===l.OutputChannelUpdateMode.Replace?this.replacePromise=this.replaceContent(this.model,m).finally(()=>this.replacePromise=void 0):this.appendContent(this.model,v,m)}clearContent(g){this.doUpdateModel(g,[C.EditOperation.delete(g.getFullModelRange())],i.VSBuffer.fromString(""))}async appendContent(g,h,v){this.appendThrottler.trigger(async()=>{if(v.isCancellationRequested)return;if(this.replacePromise){try{await this.replacePromise}catch{}if(v.isCancellationRequested)return}const m=await this.getContentToUpdate();if(v.isCancellationRequested)return;const w=g.getLineCount(),D=g.getLineMaxColumn(w),y=[C.EditOperation.insert(new r.Position(w,D),m.toString())];this.doUpdateModel(g,y,m)},h?0:void 0)}async replaceContent(g,h){const v=await this.getContentToUpdate();if(h.isCancellationRequested)return;const m=await this.getReplaceEdits(g,v.toString());h.isCancellationRequested||this.doUpdateModel(g,m,v)}async getReplaceEdits(g,h){if(!h)return[C.EditOperation.delete(g.getFullModelRange())];if(h!==g.getValue()){const v=await this.editorWorkerService.computeMoreMinimalEdits(g.uri,[{text:h.toString(),range:g.getFullModelRange()}]);if(v?.length)return v.map(m=>C.EditOperation.replace(u.Range.lift(m.range),m.text))}return[]}doUpdateModel(g,h,v){h.length&&g.applyEdits(h),this.endOffset=this.endOffset+v.byteLength,this.modelUpdateInProgress=!1}cancelModelUpdate(){this.modelUpdateCancellationSource.value?.cancel(),this.modelUpdateCancellationSource.value=void 0,this.appendThrottler.cancel(),this.replacePromise=void 0,this.modelUpdateInProgress=!1}async getContentToUpdate(){const g=await this.fileService.readFile(this.file,{position:this.endOffset});return this.etag=g.etag,g.value}onDidContentChange(g){this.model&&(this.modelUpdateInProgress||(0,S.isNumber)(g)&&this.endOffset>g&&this.update(l.OutputChannelUpdateMode.Clear,0,!0),this.update(l.OutputChannelUpdateMode.Append,void 0,!1))}isVisible(){return!!this.model}dispose(){this._onDispose.fire(),super.dispose()}};d=we([F(3,E.IFileService),F(4,I.IModelService),F(5,f.ILogService),F(6,R.IEditorWorkerService)],d),e.FileOutputChannelModel=d;let n=class extends d{constructor(g,h,v,m,w,D,y,T,_){super(h,v,m,w,D,T,_),this.logger=y.createLogger(m,{always:!0,donotRotate:!0,donotUseFormatters:!0}),this._offset=0}append(g){this.write(g),this.update(l.OutputChannelUpdateMode.Append,void 0,this.isVisible())}replace(g){const h=this._offset;this.write(g),this.update(l.OutputChannelUpdateMode.Replace,h,!0)}write(g){this._offset+=i.VSBuffer.fromString(g).byteLength,this.logger.info(g),this.isVisible()&&this.logger.flush()}};n=we([F(4,E.IFileService),F(5,I.IModelService),F(6,f.ILoggerService),F(7,f.ILogService),F(8,R.IEditorWorkerService)],n);let a=class extends b.Disposable{constructor(g,h,v,m,w,D){super(),this.instantiationService=w,this.fileService=D,this._onDispose=this._register(new A.Emitter),this.onDispose=this._onDispose.event,this.outputChannelModel=this.createOutputChannelModel(g,h,v,m)}async createOutputChannelModel(g,h,v,m){const w=await m,D=p.joinPath(w,`${g.replace(/[\\/:\*\?"<>\|]/g,"")}.log`);await this.fileService.createFile(D);const y=this._register(this.instantiationService.createInstance(n,g,h,v,D));return this._register(y.onDispose(()=>this._onDispose.fire())),y}append(g){this.outputChannelModel.then(h=>h.append(g))}update(g,h,v){this.outputChannelModel.then(m=>m.update(g,h,v))}loadModel(){return this.outputChannelModel.then(g=>g.loadModel())}clear(){this.outputChannelModel.then(g=>g.clear())}replace(g){this.outputChannelModel.then(h=>h.replace(g))}};a=we([F(4,t.IInstantiationService),F(5,E.IFileService)],a),e.DelegatedOutputChannelModel=a}),define(ae[948],le([1,0,35,51,5,19,208,18,2661]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputChannelModelService=e.IOutputChannelModelService=void 0,e.IOutputChannelModelService=(0,R.createDecorator)("outputChannelModelService");let b=class{constructor(C,r,u){this.fileService=C,this.instantiationService=r,this._outputDir=null,this.outputLocation=(0,E.joinPath)(u.windowLogsPath,`output_${(0,k.toLocalISOString)(new Date).replace(/-|:|\.\d+Z$/g,"")}`)}createOutputChannelModel(C,r,u,i){return i?this.instantiationService.createInstance(I.FileOutputChannelModel,r,u,i):this.instantiationService.createInstance(I.DelegatedOutputChannelModel,C,r,u,this.outputDir)}get outputDir(){return this._outputDir||(this._outputDir=this.fileService.createFolder(this.outputLocation).then(()=>this.outputLocation)),this._outputDir}};b=we([F(0,A.IFileService),F(1,R.IInstantiationService),F(2,p.IWorkbenchEnvironmentService)],b),e.OutputChannelModelService=b,(0,t.registerSingleton)(e.IOutputChannelModelService,b,1)}),define(ae[2662],le([1,0,6,9,2,5,23,17,132,2660,62,25,69,45,948,42,7]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogContentProvider=e.OutputService=void 0;const l="output.activechannel";let s=class extends R.Disposable{constructor(o,g,h){super(),this.outputChannelDescriptor=o,this.scrollLock=!1,this.id=o.id,this.label=o.label,this.uri=p.URI.from({scheme:I.OUTPUT_SCHEME,path:this.id}),this.model=this._register(g.createOutputChannelModel(this.id,this.uri,o.languageId?h.createById(o.languageId):h.createByMimeType(o.log?I.LOG_MIME:I.OUTPUT_MIME),o.file))}append(o){this.model.append(o)}update(o,g){this.model.update(o,g,!0)}clear(){this.model.clear()}replace(o){this.model.replace(o)}};s=we([F(1,i.IOutputChannelModelService),F(2,f.ILanguageService)],s);let d=class extends R.Disposable{constructor(o,g,h,v,m,w,D){super(),this.storageService=o,this.instantiationService=g,this.logService=v,this.lifecycleService=m,this.viewsService=w,this.channels=new Map,this._onActiveOutputChannel=this._register(new t.Emitter),this.onActiveOutputChannel=this._onActiveOutputChannel.event,this.activeChannelIdInStorage=this.storageService.get(l,1,""),this.activeOutputChannelContext=I.ACTIVE_OUTPUT_CHANNEL_CONTEXT.bindTo(D),this.activeOutputChannelContext.set(this.activeChannelIdInStorage),this._register(this.onActiveOutputChannel(T=>this.activeOutputChannelContext.set(T))),this.activeLogOutputChannelContext=I.CONTEXT_ACTIVE_LOG_OUTPUT.bindTo(D),h.registerTextModelContentProvider(I.OUTPUT_SCHEME,this),g.createInstance(b.OutputLinkProvider);const y=E.Registry.as(I.Extensions.OutputChannels);for(const T of y.getChannels())this.onDidRegisterChannel(T.id);if(this._register(y.onDidRegisterChannel(this.onDidRegisterChannel,this)),!this.activeChannel){const T=this.getChannelDescriptors();this.setActiveChannel(T&&T.length>0?this.getChannel(T[0].id):void 0)}this._register(t.Event.filter(this.viewsService.onDidChangeViewVisibility,T=>T.id===I.OUTPUT_VIEW_ID&&T.visible)(()=>{this.activeChannel&&this.viewsService.getActiveViewWithId(I.OUTPUT_VIEW_ID)?.showChannel(this.activeChannel,!0)})),this._register(this.lifecycleService.onDidShutdown(()=>this.dispose()))}provideTextContent(o){const g=this.getChannel(o.path);return g?g.model.loadModel():null}async showChannel(o,g){const h=this.getChannel(o);this.activeChannel?.id!==h?.id&&(this.setActiveChannel(h),this._onActiveOutputChannel.fire(o));const v=await this.viewsService.openView(I.OUTPUT_VIEW_ID,!g);v&&h&&v.showChannel(h,!!g)}getChannel(o){return this.channels.get(o)}getChannelDescriptor(o){return E.Registry.as(I.Extensions.OutputChannels).getChannel(o)}getChannelDescriptors(){return E.Registry.as(I.Extensions.OutputChannels).getChannels()}getActiveChannel(){return this.activeChannel}async onDidRegisterChannel(o){const g=this.createChannel(o);this.channels.set(o,g),(!this.activeChannel||this.activeChannelIdInStorage===o)&&(this.setActiveChannel(g),this._onActiveOutputChannel.fire(o),this.viewsService.getActiveViewWithId(I.OUTPUT_VIEW_ID)?.showChannel(g,!0))}createChannel(o){const g=[],h=this.instantiateChannel(o);return h.model.onDispose(()=>{if(this.activeChannel===h){const v=this.getChannelDescriptors(),m=v.length?this.getChannel(v[0].id):void 0;m&&this.viewsService.isViewVisible(I.OUTPUT_VIEW_ID)?this.showChannel(m.id):this.setActiveChannel(void 0)}E.Registry.as(I.Extensions.OutputChannels).removeChannel(o),(0,R.dispose)(g)},g),h}instantiateChannel(o){const g=E.Registry.as(I.Extensions.OutputChannels).getChannel(o);if(!g)throw this.logService.error(`Channel '${o}' is not registered yet`),new Error(`Channel '${o}' is not registered yet`);return this.instantiationService.createInstance(s,g)}setActiveChannel(o){this.activeChannel=o,this.activeLogOutputChannelContext.set(!!o?.outputChannelDescriptor?.file&&o?.outputChannelDescriptor?.log),this.activeChannel?this.storageService.store(l,this.activeChannel.id,1,0):this.storageService.remove(l,1)}};d=we([F(0,k.IStorageService),F(1,A.IInstantiationService),F(2,S.ITextModelService),F(3,C.ILogService),F(4,r.ILifecycleService),F(5,u.IViewsService),F(6,c.IContextKeyService)],d),e.OutputService=d;let n=class{constructor(o,g,h){this.outputService=o,this.outputChannelModelService=g,this.languageService=h,this.channelModels=new Map}provideTextContent(o){if(o.scheme===I.LOG_SCHEME){const g=this.getChannelModel(o);if(g)return g.loadModel()}return null}getChannelModel(o){const g=o.path;let h=this.channelModels.get(g);if(!h){const v=[],m=this.outputService.getChannelDescriptors().filter(({id:w})=>w===g)[0];m&&m.file&&(h=this.outputChannelModelService.createOutputChannelModel(g,o,m.languageId?this.languageService.createById(m.languageId):this.languageService.createByMimeType(m.log?I.LOG_MIME:I.OUTPUT_MIME),m.file),h.onDispose(()=>(0,R.dispose)(v),v),this.channelModels.set(g,h))}return h}};n=we([F(0,I.IOutputService),F(1,i.IOutputChannelModelService),F(2,f.ILanguageService)],n),e.LogContentProvider=n}),define(ae[2663],le([1,0,9,2,22,1897,81,19,49,25,109,345,169,132,53]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalMainContribution=void 0;let f=class extends p.Disposable{constructor(l,s,d,n,a,o,g,h){super(),this._fileService=d,this._logService=a,l.registerEditor(`${R.Schemas.vscodeTerminal}:/**`,{id:S.terminalEditorId,label:C.terminalStrings.terminal,priority:r.RegisteredEditorPriority.exclusive},{canSupportResource:v=>v.scheme===R.Schemas.vscodeTerminal,singlePerResource:!0},{createEditorInput:({resource:v,options:m})=>{const w=o.getInstanceFromResource(v);w&&h.getGroupForInstance(w)?.removeInstance(w);const D=g.resolveResource(w||v);return{editor:g.getInputFromResource(D)||{editor:D},options:{...m,pinned:!0,forceReload:!0,override:S.terminalEditorId}}}}),n.registerFormatter({scheme:R.Schemas.vscodeTerminal,formatting:{label:"${path}",separator:""}}),this._registerLogChannel("ptyHostLog",(0,A.localize)(0,null),t.URI.file((0,i.join)(s.logsPath,"ptyhost.log")))}_registerLogChannel(l,s,d){const n=(0,u.registerLogChannel)(l,s,d,this._fileService,this._logService);this._register((0,p.toDisposable)(()=>n.cancel()))}};f=we([F(0,r.IEditorResolverService),F(1,k.IEnvironmentService),F(2,E.IFileService),F(3,I.ILabelService),F(4,b.ILogService),F(5,S.ITerminalService),F(6,S.ITerminalEditorService),F(7,S.ITerminalGroupService)],f),e.TerminalMainContribution=f}),define(ae[2664],le([1,0,6,2,56,541,27,34,49,25,14,10,9,39,46,248,18,17,132,2012,72,21,11,198,22,23,845,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebWorkerExtensionHost=void 0;let D=class extends p.Disposable{constructor(T,_,L,M,O,N,P,B,V,z,x,H){super(),this.runningLocation=T,this._initDataProvider=L,this._telemetryService=M,this._contextService=O,this._labelService=N,this._logService=P,this._environmentService=B,this._userDataProfilesService=V,this._productService=z,this._layoutService=x,this._storageService=H,this.remoteAuthority=null,this.extensions=new u.ExtensionHostExtensions,this._onDidExit=this._register(new t.Emitter),this.onExit=this._onDidExit.event,this.lazyStart=_,this._isTerminating=!1,this._protocolPromise=null,this._protocol=null,this._extensionHostLogsLocation=(0,c.joinPath)(this._environmentService.extHostLogsPath,"webWorker"),this._extensionHostLogFile=(0,c.joinPath)(this._extensionHostLogsLocation,`${u.ExtensionHostLogFileName}.log`)}async _getWebWorkerExtensionHostIframeSrc(){const T=new URLSearchParams;this._environmentService.debugExtensionHost&&this._environmentService.debugRenderer&&T.set("debugged","1"),h.COI.addSearchParam(T,!0,!0);const _=`?${T.toString()}`,L="vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html";if(S.isWeb){const O=this._productService.webEndpointUrlTemplate,N=this._productService.commit,P=this._productService.quality;if(O&&N&&P){const B="webWorkerExtensionHostIframeStableOriginUUID";let V=this._storageService.get(B,1);typeof V>"u"&&(V=(0,n.generateUuid)(),this._storageService.store(B,V,1,1));const z=await(0,m.parentOriginHash)(window.origin,V),x=O.replace("{{uuid}}",`v--${z}`).replace("{{commit}}",N).replace("{{quality}}",P),H=new URL(`${x}/out/${L}${_}`);return H.searchParams.set("parentOrigin",window.origin),H.searchParams.set("salt",V),H.toString()}console.warn("The web worker extension host is started in a same-origin iframe!")}return`${h.FileAccess.asBrowserUri(L,J).toString(!0)}${_}`}async start(){return this._protocolPromise||(this._protocolPromise=this._startInsideIframe(),this._protocolPromise.then(T=>this._protocol=T)),this._protocolPromise}async _startInsideIframe(){const T=await this._getWebWorkerExtensionHostIframeSrc(),_=this._register(new t.Emitter),L=document.createElement("iframe");L.setAttribute("class","web-worker-ext-host-iframe"),L.setAttribute("sandbox","allow-scripts allow-same-origin"),L.setAttribute("allow","usb; serial; hid; cross-origin-isolated;"),L.setAttribute("aria-hidden","true"),L.style.display="none";const M=(0,n.generateUuid)();L.setAttribute("src",`${T}&vscodeWebWorkerExtHostId=${M}`);const O=new o.Barrier;let N,P=null,B=!1,V=null;const z=(U,$)=>{P=$,B=!0,(0,a.onUnexpectedError)(P),clearTimeout(V),this._onDidExit.fire([81,P.message]),O.open()},x=U=>{N=U,clearTimeout(V),O.open()};if(V=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!==L.contentWindow||U.data.vscodeWebWorkerExtHostId!==M)return;if(U.data.error){const{name:q,message:X,stack:G}=U.data.error,Q=new Error;return Q.message=X,Q.name=q,Q.stack=G,z(81,Q)}const{data:$}=U.data;if(O.isOpen()||!($ instanceof MessagePort)){console.warn("UNEXPECTED message",U);const q=new Error("UNEXPECTED message");return z(81,q)}x($)})),this._layoutService.container.appendChild(L),this._register((0,p.toDisposable)(()=>L.remove())),await O.wait(),B)throw P;const H=this._environmentService.options?.messagePorts??new Map;L.contentWindow.postMessage({type:"vscode.init",data:H},"*",[...H.values()]),N.onmessage=U=>{const{data:$}=U;if(!($ instanceof ArrayBuffer)){console.warn("UNKNOWN data received",$),this._onDidExit.fire([77,"UNKNOWN data received"]);return}_.fire(R.VSBuffer.wrap(new Uint8Array($,0,$.byteLength)))};const W={onMessage:_.event,send:U=>{const $=U.buffer.buffer.slice(U.buffer.byteOffset,U.buffer.byteOffset+U.buffer.byteLength);N.postMessage($,[$])}};return this._performHandshake(W)}async _performHandshake(T){if(await t.Event.toPromise(t.Event.filter(T.onMessage,_=>(0,A.isMessageOfType)(_,1))),this._isTerminating||(T.send(R.VSBuffer.fromString(JSON.stringify(await this._createExtHostInitData()))),this._isTerminating)||(await t.Event.toPromise(t.Event.filter(T.onMessage,_=>(0,A.isMessageOfType)(_,0))),this._isTerminating))throw(0,a.canceled)();return l.Registry.as(s.Extensions.OutputChannels).registerChannel({id:u.webWorkerExtHostLog,label:(0,d.localize)(0,null),file:this._extensionHostLogFile,log:!0}),T}dispose(){this._isTerminating||(this._isTerminating=!0,this._protocol?.send((0,A.createMessageOfType)(2)),super.dispose())}getInspectPort(){}enableInspectPort(){return Promise.resolve(!1)}async _createExtHostInitData(){const[T,_]=await Promise.all([this._telemetryService.getTelemetryInfo(),this._initDataProvider.getInitData()]),L=this._contextService.getWorkspace(),M=this.extensions.set(_.allExtensions,_.myExtensions),O=this._productService.extensionsGallery?.nlsBaseUrl;let N;return O&&this._productService.commit&&!S.Language.isDefaultVariant()&&(N=r.URI.joinPath(r.URI.parse(O),this._productService.commit,this._productService.version,S.Language.value())),{commit:this._productService.commit,version:this._productService.version,parentPid:0,environment:{isExtensionDevelopmentDebug:this._environmentService.debugRenderer,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier??(S.isWeb?"web":"desktop"),appUriScheme:this._productService.urlProtocol,appLanguage:S.language,extensionTelemetryLogResource:this._environmentService.extHostTelemetryLogFile,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:this._userDataProfilesService.defaultProfile.globalStorageHome,workspaceStorageHome:this._environmentService.workspaceStorageHome,extensionLogLevel:this._environmentService.extensionLogLevel},workspace:this._contextService.getWorkbenchState()===1?void 0:{configuration:L.configuration||void 0,id:L.id,name:this._labelService.getWorkspaceLabel(L),transient:L.transient},consoleForward:{includeStack:!1,logNative:this._environmentService.debugRenderer},allExtensions:M.toAdd,myExtensions:M.myToAdd,nlsBaseUrl:N,telemetryInfo:T,logLevel:this._logService.getLevel(),logsLocation:this._extensionHostLogsLocation,logFile:this._extensionHostLogFile,autoStart:_.autoStart,remote:{authority:this._environmentService.remoteAuthority,connectionData:null,isRemote:!1},uiKind:S.isWeb?A.UIKind.Web:A.UIKind.Desktop}}};D=we([F(3,k.ITelemetryService),F(4,E.IWorkspaceContextService),F(5,I.ILabelService),F(6,b.ILogService),F(7,f.IBrowserWorkbenchEnvironmentService),F(8,w.IUserDataProfilesService),F(9,i.IProductService),F(10,g.ILayoutService),F(11,v.IStorageService)],D),e.WebWorkerExtensionHost=D}),define(ae[2665],le([1,0,56,6,2,22,14,18,2017,427,49,25,46,17,609,148,505,27,34,51,459,541,39,132]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionHost=void 0;let h=class extends R.Disposable{constructor(m,w,D,y,T,_,L,M,O,N,P,B){super(),this.runningLocation=m,this._initDataProvider=w,this._socketFactory=D,this._contextService=y,this._environmentService=T,this._telemetryService=_,this._logService=L,this._labelService=M,this.remoteAuthorityResolverService=O,this._extensionHostDebugService=N,this._productService=P,this._signService=B,this.lazyStart=!1,this.extensions=new o.ExtensionHostExtensions,this._onExit=this._register(new p.Emitter),this.onExit=this._onExit.event,this.remoteAuthority=this._initDataProvider.remoteAuthority,this._protocol=null,this._hasLostConnection=!1,this._terminating=!1;const V=(0,n.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevHost=V.isExtensionDevHost}start(){const m={commit:this._productService.commit,quality:this._productService.quality,socketFactory:this._socketFactory,addressProvider:{getAddress:async()=>{const{authority:w}=await this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority);return{host:w.host,port:w.port,connectionToken:w.connectionToken}}},signService:this._signService,logService:this._logService,ipcLogger:null};return this.remoteAuthorityResolverService.resolveAuthority(this._initDataProvider.remoteAuthority).then(w=>{const D={language:k.language,debugId:this._environmentService.debugExtensionHost.debugId,break:this._environmentService.debugExtensionHost.break,port:this._environmentService.debugExtensionHost.port,env:{...this._environmentService.debugExtensionHost.env,...w.options?.extensionHostEnv}},y=this._environmentService.extensionDevelopmentLocationURI;let T=!0;return y&&y.length>0&&y[0].scheme===A.Schemas.file&&(T=!1),T||(D.break=!1),(0,i.connectRemoteAgentExtensionHost)(m,D).then(_=>{this._register(_);const{protocol:L,debugPort:M,reconnectionToken:O}=_,N=typeof M=="number";return T&&this._environmentService.isExtensionDevelopment&&this._environmentService.debugExtensionHost.debugId&&M&&this._extensionHostDebugService.attachSession(this._environmentService.debugExtensionHost.debugId,M,this._initDataProvider.remoteAuthority),L.onDidDispose(()=>{this._onExtHostConnectionLost(O)}),L.onSocketClose(()=>{this._isExtensionDevHost&&this._onExtHostConnectionLost(O)}),new Promise((P,B)=>{const V=setTimeout(()=>{B("The remote extenion host took longer than 60s to send its ready message.")},6e4);let z;const x=L.onMessage(H=>{if((0,a.isMessageOfType)(H,1)){this._createExtHostInitData(N).then(W=>{z=W.logFile,L.send(t.VSBuffer.fromString(JSON.stringify(W)))});return}if((0,a.isMessageOfType)(H,0)){clearTimeout(V),x.dispose(),u.Registry.as(g.Extensions.OutputChannels).registerChannel({id:o.remoteExtHostLog,label:(0,I.localize)(0,null),file:z,log:!0}),this._protocol=L,P(L);return}console.error("received unexpected message during handshake phase from the extension host: ",H)})})})})}_onExtHostConnectionLost(m){this._hasLostConnection||(this._hasLostConnection=!0,this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId&&this._extensionHostDebugService.close(this._environmentService.debugExtensionHost.debugId),!this._terminating&&this._onExit.fire([0,m]))}async _createExtHostInitData(m){const[w,D]=await Promise.all([this._telemetryService.getTelemetryInfo(),this._initDataProvider.getInitData()]),y=this._contextService.getWorkspace(),T=this.extensions.set(D.allExtensions,D.myExtensions);return{commit:this._productService.commit,version:this._productService.version,parentPid:D.pid,environment:{isExtensionDevelopmentDebug:m,appRoot:D.appRoot,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier||"desktop",appUriScheme:this._productService.urlProtocol,extensionTelemetryLogResource:this._environmentService.extHostTelemetryLogFile,appLanguage:k.language,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:D.globalStorageHome,workspaceStorageHome:D.workspaceStorageHome,extensionLogLevel:this._environmentService.extensionLogLevel},workspace:this._contextService.getWorkbenchState()===1?null:{configuration:y.configuration,id:y.id,name:this._labelService.getWorkspaceLabel(y),transient:y.transient},remote:{isRemote:!0,authority:this._initDataProvider.remoteAuthority,connectionData:D.connectionData},consoleForward:{includeStack:!1,logNative:Boolean(this._environmentService.debugExtensionHost.debugId)},allExtensions:T.toAdd,myExtensions:T.myToAdd,telemetryInfo:w,logLevel:this._logService.getLevel(),logsLocation:D.extensionHostLogsPath,logFile:(0,E.joinPath)(D.extensionHostLogsPath,`${o.ExtensionHostLogFileName}.log`),autoStart:!0,uiKind:k.isWeb?a.UIKind.Web:a.UIKind.Desktop}}getInspectPort(){}enableInspectPort(){return Promise.resolve(!1)}dispose(){if(super.dispose(),this._terminating=!0,this._protocol){const m=this._protocol.getSocket();this._protocol.send((0,a.createMessageOfType)(2)),this._protocol.sendDisconnect(),this._protocol.dispose(),m.end(),this._protocol=null}}};h=we([F(3,s.IWorkspaceContextService),F(4,d.IWorkbenchEnvironmentService),F(5,l.ITelemetryService),F(6,C.ILogService),F(7,S.ILabelService),F(8,f.IRemoteAuthorityResolverService),F(9,b.IExtensionHostDebugService),F(10,r.IProductService),F(11,c.ISignService)],h),e.RemoteExtensionHost=h}),define(ae[949],le([1,0,2020,11,117,6,2,52,14,9,420,128,49,69,25,46,26,27,89,34,541,13,459,56,427,39,74,18,17,132,540,794,21,743,146,166,103,72,582,8,920]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtHostMessagePortCommunication=e.SandboxLocalProcessExtensionHost=e.ExtensionHostProcess=void 0;class H{get onStdout(){return this._extensionHostStarter.onDynamicStdout(this._id)}get onStderr(){return this._extensionHostStarter.onDynamicStderr(this._id)}get onMessage(){return this._extensionHostStarter.onDynamicMessage(this._id)}get onError(){return this._extensionHostStarter.onDynamicError(this._id)}get onExit(){return this._extensionHostStarter.onDynamicExit(this._id)}constructor(q,X){this._extensionHostStarter=X,this._id=q}start(q){return this._extensionHostStarter.start(this._id,q)}enableInspectPort(){return this._extensionHostStarter.enableInspectPort(this._id)}kill(){return this._extensionHostStarter.kill(this._id)}}e.ExtensionHostProcess=H;let W=class{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de){this.runningLocation=q,this._initDataProvider=X,this._contextService=G,this._notificationService=Q,this._nativeHostService=j,this._lifecycleService=K,this._environmentService=Y,this._userDataProfilesService=ee,this._telemetryService=ie,this._logService=re,this._labelService=oe,this._extensionHostDebugService=se,this._hostService=te,this._productService=Z,this._shellEnvironmentService=ne,this._extensionHostStarter=ce,this._configurationService=de,this.remoteAuthority=null,this.lazyStart=!1,this.extensions=new v.ExtensionHostExtensions,this._onExit=new A.Emitter,this.onExit=this._onExit.event,this._onDidSetInspectPort=new A.Emitter,this._toDispose=new k.DisposableStore;const he=(0,o.parseExtensionDevOptions)(this._environmentService);this._isExtensionDevHost=he.isExtensionDevHost,this._isExtensionDevDebug=he.isExtensionDevDebug,this._isExtensionDevDebugBrk=he.isExtensionDevDebugBrk,this._isExtensionDevTestFromCli=he.isExtensionDevTestFromCli,this._lastExtensionHostError=null,this._terminating=!1,this._inspectPort=null,this._extensionHostProcess=null,this._messageProtocol=null,this._extensionHostLogFile=(0,w.joinPath)(this._environmentService.extHostLogsPath,`${v.ExtensionHostLogFileName}.log`),this._toDispose.add(this._onExit),this._toDispose.add(this._lifecycleService.onWillShutdown(pe=>this._onWillShutdown(pe))),this._toDispose.add(this._extensionHostDebugService.onClose(pe=>{this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId===pe.sessionId&&this._nativeHostService.closeWindow()})),this._toDispose.add(this._extensionHostDebugService.onReload(pe=>{this._isExtensionDevHost&&this._environmentService.debugExtensionHost.debugId===pe.sessionId&&this._hostService.reload()}))}dispose(){this._terminating||(this._terminating=!0,this._toDispose.dispose())}start(){if(this._terminating)throw new L.CancellationError;return this._messageProtocol||(this._messageProtocol=this._start()),this._messageProtocol}async _start(){const q=this._toDispose.add(new U(this._logService));return this._startWithCommunication(q)}async _startWithCommunication(q){const[X,G,Q,j]=await Promise.all([this._extensionHostStarter.createExtensionHost(q.useUtilityProcess),q.prepare(),this._tryFindDebugPort(),this._shellEnvironmentService.getShellEnv()]);this._extensionHostProcess=new H(X.id,this._extensionHostStarter);const K=E.mixin(j,{VSCODE_AMD_ENTRYPOINT:"vs/workbench/api/node/extensionHostProcess",VSCODE_HANDLES_UNCAUGHT_ERRORS:!0});this._environmentService.debugExtensionHost.env&&E.mixin(K,this._environmentService.debugExtensionHost.env),(0,M.removeDangerousEnvVariables)(K),this._isExtensionDevHost&&delete K.VSCODE_CODE_CACHE_PATH;const Y={responseWindowId:this._environmentService.window.id,responseChannel:"vscode:startExtensionHostMessagePortResult",responseNonce:(0,B.generateUuid)(),env:K,detached:!!I.isWindows,execArgv:void 0,silent:!0};Q!==0?Y.execArgv=["--nolazy",(this._isExtensionDevDebugBrk?"--inspect-brk=":"--inspect=")+Q]:Y.execArgv=["--inspect-port=0"],this._environmentService.extensionTestsLocationURI&&Y.execArgv.unshift("--expose-gc"),this._environmentService.args["prof-v8-extensions"]&&Y.execArgv.unshift("--prof"),this._environmentService.args["max-memory"]&&Y.execArgv.unshift(`--max-old-space-size=${this._environmentService.args["max-memory"]}`);const ee=this._handleProcessOutputStream(this._extensionHostProcess.onStdout),ie=this._handleProcessOutputStream(this._extensionHostProcess.onStderr),re=A.Event.any(A.Event.map(ee.event,Z=>({data:`%c${Z}`,format:[""]})),A.Event.map(ie.event,Z=>({data:`%c${Z}`,format:["color: red"]})));A.Event.debounce(re,(Z,ne)=>Z?{data:Z.data+ne.data,format:[...Z.format,...ne.format]}:{data:ne.data,format:ne.format},100)(Z=>{const ne=Z.data&&Z.data.match(/ws:\/\/([^\s]+:(\d+)\/[^\s]+)/);ne?(!this._environmentService.isBuilt&&!this._isExtensionDevTestFromCli&&console.log(`%c[Extension Host] %cdebugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=${ne[1]}`,"color: blue","color:"),this._inspectPort||(this._inspectPort=Number(ne[2]),this._onDidSetInspectPort.fire())):this._isExtensionDevTestFromCli||(console.group("Extension Host"),console.log(Z.data,...Z.format),console.groupEnd())}),this._extensionHostProcess.onError(Z=>this._onExtHostProcessError(Z.error)),this._extensionHostProcess.onExit(({code:Z,signal:ne})=>this._onExtHostProcessExit(Z,ne)),Q&&(this._isExtensionDevHost&&Q&&this._isExtensionDevDebug&&this._environmentService.debugExtensionHost.debugId&&this._extensionHostDebugService.attachSession(this._environmentService.debugExtensionHost.debugId,Q),this._inspectPort=Q,this._onDidSetInspectPort.fire());let se;(!this._environmentService.isBuilt&&!this._environmentService.remoteAuthority||this._isExtensionDevHost)&&(se=setTimeout(()=>{this._logService.error(`[LocalProcessExtensionHost]: Extension host did not start in 10 seconds (debugBrk: ${this._isExtensionDevDebugBrk})`);const Z=this._isExtensionDevDebugBrk?t.localize(0,null):t.localize(1,null);this._notificationService.prompt(c.Severity.Warning,Z,[{label:t.localize(2,null),run:()=>this._hostService.reload()}],{sticky:!0})},1e4));const te=await q.establishProtocol(G,this._extensionHostProcess,Y);return await this._performHandshake(te),clearTimeout(se),te}async _tryFindDebugPort(){if(typeof this._environmentService.debugExtensionHost.port!="number")return 0;const q=this._environmentService.debugExtensionHost.port,X=await this._nativeHostService.findFreePort(q,10,5e3,2048);return this._isExtensionDevTestFromCli||(X?(X!==q&&console.warn(`%c[Extension Host] %cProvided debugging port ${q} is not free, using ${X} instead.`,"color: blue","color:"),this._isExtensionDevDebugBrk?console.warn(`%c[Extension Host] %cSTOPPED on first line for debugging on port ${X}`,"color: blue","color:"):console.info(`%c[Extension Host] %cdebugger listening on port ${X}`,"color: blue","color:")):console.warn("%c[Extension Host] %cCould not find a free port for debugging","color: blue","color:")),X||0}_performHandshake(q){return new Promise((X,G)=>{let Q;const j=()=>{Q=setTimeout(()=>{G("The local extenion host took longer than 60s to send its ready message.")},6e4)},K=()=>{clearTimeout(Q)};j();const Y=q.onMessage(ee=>{if((0,n.isMessageOfType)(ee,1)){K(),this._createExtHostInitData().then(ie=>{j(),q.send(g.VSBuffer.fromString(JSON.stringify(ie)))});return}if((0,n.isMessageOfType)(ee,0)){K(),Y.dispose(),D.Registry.as(y.Extensions.OutputChannels).registerChannel({id:v.localExtHostLog,label:t.localize(3,null),file:this._extensionHostLogFile,log:!0}),X();return}console.error("received unexpected message during handshake phase from the extension host: ",ee)})})}async _createExtHostInitData(){const[q,X]=await Promise.all([this._telemetryService.getTelemetryInfo(),this._initDataProvider.getInitData()]),G=this._contextService.getWorkspace(),Q=this.extensions.set(X.allExtensions,X.myExtensions);return{commit:this._productService.commit,version:this._productService.version,parentPid:N.process.sandboxed?0:N.process.pid,environment:{isExtensionDevelopmentDebug:this._isExtensionDevDebug,appRoot:this._environmentService.appRoot?b.URI.file(this._environmentService.appRoot):void 0,appName:this._productService.nameLong,appHost:this._productService.embedderIdentifier||"desktop",appUriScheme:this._productService.urlProtocol,extensionTelemetryLogResource:this._environmentService.extHostTelemetryLogFile,appLanguage:I.language,extensionDevelopmentLocationURI:this._environmentService.extensionDevelopmentLocationURI,extensionTestsLocationURI:this._environmentService.extensionTestsLocationURI,globalStorageHome:this._userDataProfilesService.defaultProfile.globalStorageHome,workspaceStorageHome:this._environmentService.workspaceStorageHome,extensionLogLevel:this._environmentService.extensionLogLevel},workspace:this._contextService.getWorkbenchState()===1?void 0:{configuration:(0,a.withNullAsUndefined)(G.configuration),id:G.id,name:this._labelService.getWorkspaceLabel(G),isUntitled:G.configuration?(0,d.isUntitledWorkspace)(G.configuration,this._environmentService):!1,transient:G.transient},remote:{authority:this._environmentService.remoteAuthority,connectionData:null,isRemote:!1},consoleForward:{includeStack:!this._isExtensionDevTestFromCli&&(this._isExtensionDevHost||!this._environmentService.isBuilt||this._productService.quality!=="stable"||this._environmentService.verbose),logNative:!this._isExtensionDevTestFromCli&&this._isExtensionDevHost},allExtensions:Q.toAdd,myExtensions:Q.myToAdd,telemetryInfo:q,logLevel:this._logService.getLevel(),logsLocation:this._environmentService.extHostLogsPath,logFile:this._extensionHostLogFile,autoStart:X.autoStart,uiKind:n.UIKind.Desktop}}_onExtHostProcessError(q){let X=q;q&&q.$isError&&(X=new Error,X.name=q.name,X.message=q.message,X.stack=q.stack);const G=(0,R.toErrorMessage)(X);G!==this._lastExtensionHostError&&(this._lastExtensionHostError=G,this._notificationService.error(t.localize(4,null,G)))}_onExtHostProcessExit(q,X){this._terminating||this._onExit.fire([q,X])}_handleProcessOutputStream(q){let X="",G=!1;const Q=new A.Emitter;return q(j=>{X+=j;const K=X.split(/\r?\n/g);X=K.pop(),X.length>1e4&&(K.push(X),X="");for(const Y of K)G?Y==="END_NATIVE_LOG"&&(G=!1):Y==="START_NATIVE_LOG"?G=!0:Y.length&&Q.fire(Y+` `)}),Q}async enableInspectPort(){return typeof this._inspectPort=="number"?!0:!this._extensionHostProcess||!await this._extensionHostProcess.enableInspectPort()?!1:(await Promise.race([A.Event.toPromise(this._onDidSetInspectPort.event),(0,p.timeout)(1e3)]),typeof this._inspectPort=="number")}getInspectPort(){return(0,a.withNullAsUndefined)(this._inspectPort)}_onWillShutdown(q){this._isExtensionDevHost&&!this._isExtensionDevTestFromCli&&!this._isExtensionDevDebug&&this._environmentService.debugExtensionHost.debugId&&(this._extensionHostDebugService.terminateSession(this._environmentService.debugExtensionHost.debugId),q.join((0,p.timeout)(100),{id:"join.extensionDevelopment",label:t.localize(5,null)}))}};W=we([F(2,d.IWorkspaceContextService),F(3,c.INotificationService),F(4,s.INativeHostService),F(5,u.ILifecycleService),F(6,C.INativeWorkbenchEnvironmentService),F(7,P.IUserDataProfilesService),F(8,l.ITelemetryService),F(9,i.ILogService),F(10,r.ILabelService),F(11,h.IExtensionHostDebugService),F(12,m.IHostService),F(13,f.IProductService),F(14,T.IShellEnvironmentService),F(15,_.IExtensionHostStarter),F(16,z.IConfigurationService)],W),e.SandboxLocalProcessExtensionHost=W;let U=class extends k.Disposable{constructor(q){super(),this._logService=q,this.useUtilityProcess=!0}async prepare(){}establishProtocol(q,X,G){(0,x.writeExtHostConnection)(new x.MessagePortExtHostConnection,G.env);const Q=(0,V.acquirePort)(void 0,G.responseChannel,G.responseNonce);return new Promise((j,K)=>{const Y=setTimeout(()=>{K("The local extension host took longer than 60s to connect.")},6e4);Q.then(ie=>{this._register((0,k.toDisposable)(()=>{ie.close()})),clearTimeout(Y);const re=new S.BufferedEmitter;ie.onmessage=oe=>re.fire(g.VSBuffer.wrap(oe.data)),ie.start(),j({onMessage:re.event,send:oe=>ie.postMessage(oe.buffer)})});const ee=O.StopWatch.create(!1);X.start(G).then(()=>{const ie=ee.elapsed();I.isCI&&this._logService.info(`IExtensionHostStarter.start() took ${ie} ms.`)},ie=>{K(ie)})})}};U=we([F(0,i.ILogService)],U),e.ExtHostMessagePortCommunication=U}),define(ae[2666],le([1,0,2,14,146,420,1270,25,920,541,949,166]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLocalProcessExtensionHost=void 0;class r extends S.SandboxLocalProcessExtensionHost{async _start(){if(await this._extensionHostStarter.canUseUtilityProcess()&&(this._configurationService.getValue("extensions.experimental.useUtilityProcess")||C.process.sandboxed)){const c=this._toDispose.add(new S.ExtHostMessagePortCommunication(this._logService));return this._startWithCommunication(c)}else{const c=this._toDispose.add(new u(this._logService));return this._startWithCommunication(c)}}}e.NativeLocalProcessExtensionHost=r;let u=class extends t.Disposable{constructor(f){super(),this._logService=f,this.useUtilityProcess=!1}async prepare(){const{createServer:f}=await new Promise((c,l)=>{J(["net"],c,l)});return new Promise((c,l)=>{const s=(0,k.createRandomIPCHandle)(),d=f();d.on("error",l),d.listen(s,()=>{d?.removeListener("error",l),c({pipeName:s,namedPipeServer:d})}),this._register((0,t.toDisposable)(()=>{d.listening&&d.close()}))})}establishProtocol(f,c,l){const{namedPipeServer:s,pipeName:d}=f;return(0,I.writeExtHostConnection)(new I.IPCExtHostConnection(d),l.env),new Promise((n,a)=>{const o=setTimeout(()=>{s.listening&&s.close(),a("The local extension host took longer than 60s to connect.")},6e4);s.on("connection",h=>{clearTimeout(o),s.listening&&s.close();const v=new k.NodeSocket(h,"renderer-exthost"),m=new A.PersistentProtocol(v);this._register((0,t.toDisposable)(()=>{m.send((0,b.createMessageOfType)(2)),m.flush(),h.end(),v.dispose(),m.dispose()})),n(m)});const g=R.StopWatch.create(!1);c.start(l).then(()=>{const h=g.elapsed();p.isCI&&this._logService.info(`IExtensionHostStarter.start() took ${h} ms.`)},h=>{a(h)})})}};u=we([F(0,E.ILogService)],u)}),define(ae[91],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPaneCompositePartService=void 0,e.IPaneCompositePartService=(0,t.createDecorator)("paneCompositePartService")}),define(ae[2667],le([1,0,1466,17,36,58,83,15,676,70,24,91]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusPreviousPart=e.FocusNextPart=void 0;let r=class extends R.Action{constructor(g,h,v,m,w,D){super(g,h),this.direction=v,this.editorGroupService=m,this.paneCompositeService=w,this.layoutService=D}async run(){const g=this.layoutService.hasFocus("workbench.parts.editor"),h=this.layoutService.hasFocus("workbench.parts.panel"),v=this.layoutService.hasFocus("workbench.parts.sidebar"),m=this.layoutService.hasFocus("workbench.parts.auxiliarybar");let w;if(g){if(this.navigateAcrossEditorGroup(this.toGroupDirection(this.direction)))return;w=this.layoutService.getVisibleNeighborPart("workbench.parts.editor",this.direction)}h&&(w=this.layoutService.getVisibleNeighborPart("workbench.parts.panel",this.direction)),v&&(w=this.layoutService.getVisibleNeighborPart("workbench.parts.sidebar",this.direction)),m&&(w=w=this.layoutService.getVisibleNeighborPart("workbench.parts.auxiliarybar",this.direction)),w==="workbench.parts.editor"?this.navigateBackToEditorGroup(this.toGroupDirection(this.direction))||this.navigateToEditorGroup(this.direction===3?0:1):w==="workbench.parts.sidebar"?this.navigateToSidebar():w==="workbench.parts.panel"?this.navigateToPanel():w==="workbench.parts.auxiliarybar"&&this.navigateToAuxiliaryBar()}async navigateToPanel(){if(!this.layoutService.isVisible("workbench.parts.panel"))return!1;const g=this.paneCompositeService.getActivePaneComposite(1);if(!g)return!1;const h=g.getId(),v=await this.paneCompositeService.openPaneComposite(h,1,!0);return v||!1}async navigateToSidebar(){if(!this.layoutService.isVisible("workbench.parts.sidebar"))return!1;const g=this.paneCompositeService.getActivePaneComposite(0);if(!g)return!1;const h=g.getId();return!!await this.paneCompositeService.openPaneComposite(h,0,!0)}async navigateToAuxiliaryBar(){if(!this.layoutService.isVisible("workbench.parts.auxiliarybar"))return!1;const g=this.paneCompositeService.getActivePaneComposite(2);if(!g)return!1;const h=g.getId(),v=await this.paneCompositeService.openPaneComposite(h,2,!0);return v||!1}navigateAcrossEditorGroup(g){return this.doNavigateToEditorGroup({direction:g})}navigateToEditorGroup(g){return this.doNavigateToEditorGroup({location:g})}navigateBackToEditorGroup(g){if(!this.editorGroupService.activeGroup)return!1;const h=this.toOppositeDirection(g);return this.editorGroupService.findGroup({direction:h},this.editorGroupService.activeGroup)?!1:(this.editorGroupService.activeGroup.focus(),!0)}toGroupDirection(g){switch(g){case 1:return 1;case 2:return 2;case 3:return 3;case 0:return 0}}toOppositeDirection(g){switch(g){case 0:return 1;case 3:return 2;case 2:return 3;case 1:return 0}}doNavigateToEditorGroup(g){const h=this.editorGroupService.findGroup(g,this.editorGroupService.activeGroup);return h?(h.focus(),!0):!1}};r=we([F(3,A.IEditorGroupsService),F(4,C.IPaneCompositePartService),F(5,k.IWorkbenchLayoutService)],r);let u=class extends r{constructor(g,h,v,m,w){super(g,h,2,v,m,w)}};u.ID="workbench.action.navigateLeft",u.LABEL=(0,t.localize)(0,null),u=we([F(2,A.IEditorGroupsService),F(3,C.IPaneCompositePartService),F(4,k.IWorkbenchLayoutService)],u);let i=class extends r{constructor(g,h,v,m,w){super(g,h,3,v,m,w)}};i.ID="workbench.action.navigateRight",i.LABEL=(0,t.localize)(1,null),i=we([F(2,A.IEditorGroupsService),F(3,C.IPaneCompositePartService),F(4,k.IWorkbenchLayoutService)],i);let f=class extends r{constructor(g,h,v,m,w){super(g,h,0,v,m,w)}};f.ID="workbench.action.navigateUp",f.LABEL=(0,t.localize)(2,null),f=we([F(2,A.IEditorGroupsService),F(3,C.IPaneCompositePartService),F(4,k.IWorkbenchLayoutService)],f);let c=class extends r{constructor(g,h,v,m,w){super(g,h,1,v,m,w)}};c.ID="workbench.action.navigateDown",c.LABEL=(0,t.localize)(3,null),c=we([F(2,A.IEditorGroupsService),F(3,C.IPaneCompositePartService),F(4,k.IWorkbenchLayoutService)],c);function l(o,g,h){const v=g==="workbench.parts.editor"?h?"workbench.parts.panel":"workbench.parts.sidebar":g==="workbench.parts.panel"?h?"workbench.parts.statusbar":"workbench.parts.editor":g==="workbench.parts.statusbar"?h?"workbench.parts.activitybar":"workbench.parts.panel":g==="workbench.parts.activitybar"?h?"workbench.parts.sidebar":"workbench.parts.statusbar":g==="workbench.parts.sidebar"?h?"workbench.parts.editor":"workbench.parts.activitybar":"workbench.parts.editor";return o.isVisible(v)||v==="workbench.parts.editor"?v:l(o,v,h)}function s(o,g,h){const m=g.activeEditorPane?.hasFocus()||o.hasFocus("workbench.parts.editor")?"workbench.parts.editor":o.hasFocus("workbench.parts.activitybar")?"workbench.parts.activitybar":o.hasFocus("workbench.parts.statusbar")?"workbench.parts.statusbar":o.hasFocus("workbench.parts.sidebar")?"workbench.parts.sidebar":o.hasFocus("workbench.parts.panel")?"workbench.parts.panel":void 0;let w="workbench.parts.editor";m&&(w=l(o,m,h)),o.focusPart(w)}let d=class extends R.Action{constructor(g,h,v,m){super(g,h),this.layoutService=v,this.editorService=m}async run(){s(this.layoutService,this.editorService,!0)}};d.ID="workbench.action.focusNextPart",d.LABEL=(0,t.localize)(4,null),d=we([F(2,k.IWorkbenchLayoutService),F(3,S.IEditorService)],d),e.FocusNextPart=d;let n=class extends R.Action{constructor(g,h,v,m){super(g,h),this.layoutService=v,this.editorService=m}async run(){s(this.layoutService,this.editorService,!1)}};n.ID="workbench.action.focusPreviousPart",n.LABEL=(0,t.localize)(5,null),n=we([F(2,k.IWorkbenchLayoutService),F(3,S.IEditorService)],n),e.FocusPreviousPart=n;const a=p.Registry.as(I.Extensions.WorkbenchActions);a.registerWorkbenchAction(E.SyncActionDescriptor.from(f,void 0),"View: Navigate to the View Above",b.Categories.View.value),a.registerWorkbenchAction(E.SyncActionDescriptor.from(c,void 0),"View: Navigate to the View Below",b.Categories.View.value),a.registerWorkbenchAction(E.SyncActionDescriptor.from(u,void 0),"View: Navigate to the View on the Left",b.Categories.View.value),a.registerWorkbenchAction(E.SyncActionDescriptor.from(i,void 0),"View: Navigate to the View on the Right",b.Categories.View.value),a.registerWorkbenchAction(E.SyncActionDescriptor.from(d,{primary:64}),"View: Focus Next Part",b.Categories.View.value),a.registerWorkbenchAction(E.SyncActionDescriptor.from(n,{primary:1088}),"View: Focus Previous Part",b.Categories.View.value)}),define(ae[950],le([1,0,29,1475,15,7,63,70,71,45,83,91]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAuxiliaryBarAction=void 0;const u=(0,k.registerIcon)("auxiliarybar-right-layout-icon",t.Codicon.layoutSidebarRight,(0,p.localize)(0,null)),i=(0,k.registerIcon)("auxiliarybar-right-off-layout-icon",t.Codicon.layoutSidebarRightOff,(0,p.localize)(1,null)),f=(0,k.registerIcon)("auxiliarybar-left-layout-icon",t.Codicon.layoutSidebarLeft,(0,p.localize)(2,null)),c=(0,k.registerIcon)("auxiliarybar-left-off-layout-icon",t.Codicon.layoutSidebarLeftOff,(0,p.localize)(3,null));class l extends R.Action2{constructor(){super({id:l.ID,title:{value:l.LABEL,original:"Toggle Secondary Side Bar Visibility"},category:E.Categories.View,f1:!0})}async run(d){const n=d.get(S.IWorkbenchLayoutService);n.setPartHidden(n.isVisible("workbench.parts.auxiliarybar"),"workbench.parts.auxiliarybar")}}e.ToggleAuxiliaryBarAction=l,l.ID="workbench.action.toggleAuxiliaryBar",l.LABEL=(0,p.localize)(4,null),(0,R.registerAction2)(l),(0,R.registerAction2)((r=class Vs extends R.Action2{constructor(){super({id:Vs.ID,title:{value:Vs.LABEL,original:"Focus into Secondary Side Bar"},category:E.Categories.View,f1:!0})}async run(d){const n=d.get(C.IPaneCompositePartService),a=d.get(S.IWorkbenchLayoutService);a.isVisible("workbench.parts.auxiliarybar")||a.setPartHidden(!1,"workbench.parts.auxiliarybar"),n.getActivePaneComposite(2)?.focus()}},r.ID="workbench.action.focusAuxiliaryBar",r.LABEL=(0,p.localize)(5,null),r)),R.MenuRegistry.appendMenuItems([{id:R.MenuId.LayoutControlMenuSubmenu,item:{group:"0_workbench_layout",command:{id:l.ID,title:(0,p.localize)(6,null),toggled:I.AuxiliaryBarVisibleContext},order:2}},{id:R.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:l.ID,title:(0,p.localize)(7,null),toggled:{condition:I.AuxiliaryBarVisibleContext,icon:f},icon:c},when:A.ContextKeyExpr.and(A.ContextKeyExpr.or(A.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),A.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),A.ContextKeyExpr.equals("config.workbench.sideBar.location","right")),order:0}},{id:R.MenuId.LayoutControlMenu,item:{group:"0_workbench_toggles",command:{id:l.ID,title:(0,p.localize)(8,null),toggled:{condition:I.AuxiliaryBarVisibleContext,icon:u},icon:i},when:A.ContextKeyExpr.and(A.ContextKeyExpr.or(A.ContextKeyExpr.equals("config.workbench.layoutControl.type","toggles"),A.ContextKeyExpr.equals("config.workbench.layoutControl.type","both")),A.ContextKeyExpr.equals("config.workbench.sideBar.location","left")),order:2}},{id:R.MenuId.MenubarAppearanceMenu,item:{group:"2_workbench_layout",command:{id:l.ID,title:(0,p.localize)(9,null),toggled:I.AuxiliaryBarVisibleContext},order:2}},{id:R.MenuId.ViewTitleContext,item:{group:"3_workbench_layout_move",command:{id:l.ID,title:{value:(0,p.localize)(10,null),original:"Hide Secondary Side Bar"}},when:A.ContextKeyExpr.and(I.AuxiliaryBarVisibleContext,A.ContextKeyExpr.equals("viewLocation",(0,b.ViewContainerLocationToString)(2))),order:2}}])}),define(ae[2668],le([1,0,1513,15,83,70,91,720]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusSideBarAction=void 0;class E extends p.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:2069}})}async run(b){const S=b.get(R.IWorkbenchLayoutService),C=b.get(k.IPaneCompositePartService);if(!S.isVisible("workbench.parts.sidebar")){S.setPartHidden(!1,"workbench.parts.sidebar");return}C.getActivePaneComposite(0)?.focus()}}e.FocusSideBarAction=E,(0,p.registerAction2)(E)}),define(ae[2669],le([1,0,252,1655,119,82,26,25,91]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ManageExtensionsQuickAccessProvider=e.InstallExtensionQuickAccessProvider=void 0;let b=class rl extends t.PickerQuickAccessProvider{constructor(u,i,f,c,l){super(rl.PREFIX),this.paneCompositeService=u,this.galleryService=i,this.extensionsService=f,this.notificationService=c,this.logService=l}_getPicks(u,i,f){if(!u)return[{label:(0,p.localize)(0,null)}];const c={label:(0,p.localize)(1,null,u),accept:()=>this.searchExtension(u)};return/\./.test(u)?this.getPicksForExtensionId(u,c,f):[c]}async getPicksForExtensionId(u,i,f){try{const[c]=await this.galleryService.getExtensions([{id:u}],f);return f.isCancellationRequested?[]:c?[{label:(0,p.localize)(2,null,u),accept:()=>this.installExtension(c,u)}]:[i]}catch(c){return f.isCancellationRequested?[]:(this.logService.error(c),[i])}}async installExtension(u,i){try{await C(this.paneCompositeService,`@id:${i}`),await this.extensionsService.installFromGallery(u)}catch(f){this.notificationService.error(f)}}async searchExtension(u){C(this.paneCompositeService,u)}};b.PREFIX="ext install ",b=we([F(0,I.IPaneCompositePartService),F(1,A.IExtensionGalleryService),F(2,A.IExtensionManagementService),F(3,k.INotificationService),F(4,E.ILogService)],b),e.InstallExtensionQuickAccessProvider=b;let S=class sl extends t.PickerQuickAccessProvider{constructor(u){super(sl.PREFIX),this.paneCompositeService=u}_getPicks(){return[{label:(0,p.localize)(3,null),accept:()=>C(this.paneCompositeService)}]}};S.PREFIX="ext ",S=we([F(0,I.IPaneCompositePartService)],S),e.ManageExtensionsQuickAccessProvider=S;async function C(r,u=""){const f=(await r.openPaneComposite(R.VIEWLET_ID,0,!0))?.getViewPaneContainer();f?.search(u),f?.focus()}}),define(ae[2670],le([1,0,27,285,26,120,274,119,32,1661,23,46,22,18,144,160,376,39,54,42,428,317,16,2,64,11,91,34,100]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileBasedRecommendations=void 0;const y="fileBasedRecommendations/promptedRecommendations",T="fileBasedRecommendations/promptedFileExtensions",_="extensionsAssistant/recommendations",L=(0,b.localize)(0,null),M=1e3*60*60*24;let O=class extends p.ExtensionRecommendations{get recommendations(){const P=[];return[...this.fileBasedRecommendations.keys()].sort((B,V)=>{if(this.fileBasedRecommendations.get(B).recommendedTime===this.fileBasedRecommendations.get(V).recommendedTime){if(this.importantExtensionTips.has(B))return-1;if(this.importantExtensionTips.has(V))return 1}return this.fileBasedRecommendations.get(B).recommendedTime>this.fileBasedRecommendations.get(V).recommendedTime?-1:1}).forEach(B=>{P.push({extensionId:B,reason:{reasonId:1,reasonText:(0,b.localize)(1,null)}})}),P}get importantRecommendations(){return this.recommendations.filter(P=>this.importantExtensionTips.has(P.extensionId))}get otherRecommendations(){return this.recommendations.filter(P=>!this.importantExtensionTips.has(P.extensionId))}constructor(P,B,V,z,x,H,W,U,$,q,X,G,Q,j){super(),this.extensionsWorkbenchService=P,this.extensionService=B,this.paneCompositeService=V,this.modelService=z,this.languageService=x,this.notificationService=W,this.telemetryService=U,this.storageService=$,this.extensionRecommendationNotificationService=q,this.extensionIgnoredRecommendationsService=X,this.tasExperimentService=G,this.workspaceContextService=Q,this.extensionManagementServerService=j,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=G,H.extensionTips&&Object.entries(H.extensionTips).forEach(([K,Y])=>this.extensionTips.set(K.toLowerCase(),Y)),H.extensionImportantTips&&Object.entries(H.extensionImportantTips).forEach(([K,Y])=>this.importantExtensionTips.set(K.toLowerCase(),Y))}async doActivate(){await this.extensionService.whenInstalledExtensionsRegistered();const P=[];for(const[z,x]of this.extensionTips){const H=this.fileBasedRecommendationsByPattern.get(x)||[];H.push(z),this.fileBasedRecommendationsByPattern.set(x,H),P.push(z)}for(const[z,x]of this.importantExtensionTips){if(x.pattern){const H=this.fileBasedRecommendationsByPattern.get(x.pattern)||[];H.push(z),this.fileBasedRecommendationsByPattern.set(x.pattern,H)}if(x.languages)for(const H of x.languages){const W=this.fileBasedRecommendationsByLanguage.get(H)||[];W.push(z),this.fileBasedRecommendationsByLanguage.set(H,W)}P.push(z)}const B=this.getCachedRecommendations(),V=Date.now();Object.entries(B).forEach(([z,x])=>{(V-x)/M<=7&&P.indexOf(z)>-1&&this.fileBasedRecommendations.set(z.toLowerCase(),{recommendedTime:x})}),this._register(this.modelService.onModelAdded(z=>this.onModelAdded(z))),this.modelService.getModels().forEach(z=>this.onModelAdded(z))}onModelAdded(P){const B=P.uri.scheme===r.Schemas.vscodeNotebookCell?h.CellUri.parse(P.uri)?.notebook:P.uri;if(!B)return;const V=(0,o.distinct)([r.Schemas.untitled,r.Schemas.file,r.Schemas.vscodeRemote,...this.workspaceContextService.getWorkspace().folders.map(x=>x.uri.scheme)]);if(!B||!V.includes(B.scheme))return;this.promptRecommendationsForModel(P);const z=new g.DisposableStore;z.add(P.onDidChangeLanguage(()=>this.promptRecommendationsForModel(P))),z.add(P.onWillDispose(()=>z.dispose()))}promptRecommendationsForModel(P){const B=P.uri,V=P.getLanguageId(),z=(0,u.extname)(B).toLowerCase();this.processedLanguages.includes(V)&&this.processedFileExtensions.includes(z)||(this.processedLanguages.push(V),this.processedFileExtensions.push(z),this._register((0,v.disposableTimeout)(()=>this.promptRecommendations(B,V,z),0)))}async promptRecommendations(P,B,V){const z=await this.extensionsWorkbenchService.queryLocal(),x=(this.fileBasedRecommendationsByLanguage.get(B)||[]).filter(U=>{const $=this.importantExtensionTips.get(U);return $?!$.whenNotInstalled||$.whenNotInstalled.every(q=>z.every(X=>!(0,D.areSameExtensions)(X.identifier,{id:q}))):!1}),H=x.length?this.languageService.getLanguageName(B):null,W=[...x];for(let[U,$]of this.fileBasedRecommendationsByPattern)if($=$.filter(q=>!x.includes(q)),!!$.length&&!!(0,i.match)(U,P.with({fragment:""}).toString()))for(const q of $){W.push(q);const X=this.importantExtensionTips.get(q);X&&X.pattern===U&&x.push(q)}for(const U of W){const $=this.fileBasedRecommendations.get(U)||{recommendedTime:Date.now(),sources:[]};$.recommendedTime=Date.now(),this.fileBasedRecommendations.set(U,$)}this.storeCachedRecommendations(),!this.extensionRecommendationNotificationService.hasToIgnoreRecommendationNotifications()&&(x.length&&await this.promptRecommendedExtensionForFileType(H||(0,u.basename)(P),B,x,z)||this.promptRecommendedExtensionForFileExtension(P,V,z))}async promptRecommendedExtensionForFileType(P,B,V,z){if(V=this.filterIgnoredOrNotAllowed(V),V.length===0||(V=this.filterInstalled(V,z),V.length===0))return!1;const x=V[0];if(!this.importantExtensionTips.get(x))return!1;const W=this.getPromptedRecommendations();if(W[B]&&W[B].includes(x))return!1;const U=await this.tasExperimentService.getTreatment("languageRecommendationMessage"),$=U?U.replace("{0}",P):(0,b.localize)(2,null,P);return this.extensionRecommendationNotificationService.promptImportantExtensionsInstallNotification([x],$,`@id:${x}`,1).then(q=>{q==="reacted"&&this.addToPromptedRecommendations(B,[x])}),!0}getPromptedRecommendations(){return JSON.parse(this.storageService.get(y,0,"{}"))}addToPromptedRecommendations(P,B){const V=this.getPromptedRecommendations();V[P]=B,this.storageService.store(y,JSON.stringify(V),0,0)}getPromptedFileExtensions(){return JSON.parse(this.storageService.get(T,0,"[]"))}addToPromptedFileExtensions(P){const B=this.getPromptedFileExtensions();B.push(P),this.storageService.store(T,JSON.stringify((0,o.distinct)(B)),0,0)}async promptRecommendedExtensionForFileExtension(P,B,V){if(!this.extensionManagementServerService.localExtensionManagementServer&&!this.extensionManagementServerService.remoteExtensionManagementServer||(B=B.substring(1),!B))return;const z=(0,c.getMimeTypes)(P);if(z.length!==1||z[0]!==f.Mimes.unknown)return;const x=JSON.parse(this.storageService.get("extensionsAssistant/fileExtensionsSuggestionIgnore",0,"[]"));if(x.indexOf(B)>-1||this.getPromptedFileExtensions().includes(B))return;const W=`ext:${B}`,U=await this.extensionsWorkbenchService.queryGallery({text:W,pageSize:100},I.CancellationToken.None);if(U.firstPage.length===0)return;const $=V.reduce((q,X)=>(q.add(X.identifier.id.toLowerCase()),q),new Set);U.firstPage.some(q=>$.has(q.identifier.id.toLowerCase()))||this.notificationService.prompt(R.Severity.Info,(0,b.localize)(3,null,B),[{label:L,run:()=>{this.addToPromptedFileExtensions(B),this.telemetryService.publicLog2("fileExtensionSuggestion:popup",{userReaction:"ok",fileExtension:B}),this.paneCompositeService.openPaneComposite(E.VIEWLET_ID,0,!0).then(q=>q?.getViewPaneContainer()).then(q=>{q.search(`ext:${B}`),q.focus()})}},{label:(0,b.localize)(4,null,B),run:()=>{x.push(B),this.storageService.store("extensionsAssistant/fileExtensionsSuggestionIgnore",JSON.stringify(x),0,0),this.telemetryService.publicLog2("fileExtensionSuggestion:popup",{userReaction:"neverShowAgain",fileExtension:B})}}],{sticky:!0,onCancel:()=>{this.telemetryService.publicLog2("fileExtensionSuggestion:popup",{userReaction:"cancelled",fileExtension:B})}})}filterIgnoredOrNotAllowed(P){const B=[...this.extensionIgnoredRecommendationsService.ignoredRecommendations,...this.extensionRecommendationNotificationService.ignoredRecommendations];return P.filter(V=>!B.includes(V))}filterInstalled(P,B){const V=B.reduce((z,x)=>(x.enablementState!==1&&z.add(x.identifier.id.toLowerCase()),z),new Set);return P.filter(z=>!V.has(z.toLowerCase()))}getCachedRecommendations(){let P=JSON.parse(this.storageService.get(_,0,"[]"));Array.isArray(P)&&(P=P.reduce((V,z)=>(V[z]=Date.now(),V),{}));const B={};return Object.entries(P).forEach(([V,z])=>{typeof z=="number"&&(B[V.toLowerCase()]=z)}),B}storeCachedRecommendations(){const P={};this.fileBasedRecommendations.forEach((B,V)=>P[V]=B.recommendedTime),this.storageService.store(_,JSON.stringify(P),0,1)}};O=we([F(0,E.IExtensionsWorkbenchService),F(1,l.IExtensionService),F(2,m.IPaneCompositePartService),F(3,s.IModelService),F(4,d.ILanguageService),F(5,C.IProductService),F(6,R.INotificationService),F(7,t.ITelemetryService),F(8,S.IStorageService),F(9,n.IExtensionRecommendationNotificationService),F(10,k.IExtensionIgnoredRecommendationsService),F(11,a.IWorkbenchAssignmentService),F(12,w.IWorkspaceContextService),F(13,A.IExtensionManagementServerService)],O),e.FileBasedRecommendations=O}),define(ae[2671],le([1,0,40,59,1705,7,31,26,119,47,91,61]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});async function r(u,i){const f=await u.openPaneComposite(I.VIEWLET_ID,0,!0);f&&(f?.getViewPaneContainer()).search(i)}(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.formatDocument.none",label:R.localize(0,null),alias:"Format Document",precondition:A.ContextKeyExpr.and(p.EditorContextKeys.writable,p.EditorContextKeys.hasDocumentFormattingProvider.toNegated()),kbOpts:{kbExpr:p.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100}})}async run(i,f){if(!f.hasModel())return;const c=i.get(k.ICommandService),l=i.get(S.IPaneCompositePartService),s=i.get(E.INotificationService),d=i.get(b.IDialogService),n=i.get(C.ILanguageFeaturesService),a=f.getModel(),o=n.documentFormattingEditProvider.all(a).length;if(o>1)return c.executeCommand("editor.action.formatDocument.multiple");if(o===1)return c.executeCommand("editor.action.formatDocument");if(a.isTooLargeForSyncing())s.warn(R.localize(1,null));else{const g=a.getLanguageId(),h=R.localize(2,null,g);(await d.show(E.Severity.Info,h,[R.localize(3,null),R.localize(4,null)],{cancelId:1})).choice!==1&&r(l,`category:formatters ${g}`)}}})}),define(ae[2672],le([1,0,10,238,36,2,1780,84,245,15,7,5,41,48,12,119,101,215,175,64,142,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellOutputContainer=e.CellOutputElement=void 0;let o=class extends A.Disposable{constructor(w,D,y,T,_,L,M,O,N,P,B){super(),this.notebookEditor=w,this.viewCell=D,this.cellOutputContainer=y,this.outputContainer=T,this.output=_,this.notebookService=L,this.quickInputService=M,this.menuService=N,this.paneCompositeService=P,this.instantiationService=B,this._renderDisposableStore=this._register(new A.DisposableStore),this._outputHeightTimer=null,this.contextKeyService=O,this._register(this.output.model.onDidChangeData(()=>{this.rerender()})),this._register(this.output.onDidResetRenderer(()=>{this.rerender()}))}detach(){this.renderedOutputContainer?.parentElement?.removeChild(this.renderedOutputContainer);let w=0;if(this.innerContainer){for(let D=0;D<this.innerContainer.childNodes.length&&(this.innerContainer.childNodes[D].className==="rendered-output"&&w++,!(w>1));D++);w===0&&this.innerContainer.parentElement?.removeChild(this.innerContainer)}this.notebookEditor.removeInset(this.output)}updateDOMTop(w){this.innerContainer&&(this.innerContainer.style.top=`${w}px`)}rerender(){if(this.notebookEditor.hasModel()&&this.innerContainer&&this.renderResult&&this.renderResult.type===1){const[w,D]=this.output.resolveMimeTypes(this.notebookEditor.textModel,this.notebookEditor.activeKernel?.preloadProvides),y=w[D];if(y.mimeType===this.renderResult.mimeType&&y.rendererId===this.renderResult.renderer.id){const T=this.viewCell.outputsViewModels.indexOf(this.output);this.notebookEditor.updateOutput(this.viewCell,this.renderResult,this.viewCell.getOutputOffset(T));return}}if(this.innerContainer){const w=this.innerContainer.nextElementSibling;this._renderDisposableStore.clear();const D=this.innerContainer;D&&(D.parentElement?.removeChild(D),this.notebookEditor.removeInset(this.output)),this.render(w)}else{const w=this.cellOutputContainer.renderedOutputEntries.findIndex(y=>y.element===this),D=w>0&&!!this.cellOutputContainer.renderedOutputEntries[w-1].element.innerContainer?.parentElement?this.cellOutputContainer.renderedOutputEntries[w-1].element.innerContainer:void 0;this.render(D)}this._relayoutCell()}_generateInnerOutputContainer(w,D){return this.innerContainer=t.$(".output-inner-container"),w&&w.nextElementSibling?this.outputContainer.domNode.insertBefore(this.innerContainer,w.nextElementSibling):this.outputContainer.domNode.appendChild(this.innerContainer),this.innerContainer.setAttribute("output-mime-type",D.mimeType),this.innerContainer}render(w){const D=this.viewCell.outputsViewModels.indexOf(this.output);if(this.viewCell.isOutputCollapsed||!this.notebookEditor.hasModel()||!d.CellUri.parse(this.viewCell.uri)?.notebook)return;const T=this.notebookEditor.textModel,[_,L]=this.output.resolveMimeTypes(T,this.notebookEditor.activeKernel?.preloadProvides);if(!_.find(P=>P.isTrusted)||_.length===0){this.viewCell.updateOutputHeight(D,0,"CellOutputElement#noMimeType");return}const M=_[L],O=this._generateInnerOutputContainer(w,M);this._attachToolbar(O,T,this.notebookEditor.activeKernel,D,_),this.renderedOutputContainer=t.append(O,t.$(".rendered-output"));const N=this.notebookService.getRendererInfo(M.rendererId);if(this.renderResult=N?{type:1,renderer:N,source:this.output,mimeType:M.mimeType}:this._renderMissingRenderer(this.output,M.mimeType),this.output.pickedMimeType=M,!this.renderResult){this.viewCell.updateOutputHeight(D,0,"CellOutputElement#renderResultUndefined");return}return this.notebookEditor.createOutput(this.viewCell,this.renderResult,this.viewCell.getOutputOffset(D)),O.classList.add("background"),{initRenderIsSynchronous:!1}}_renderMissingRenderer(w,D){if(!w.model.outputs.length)return this._renderMessage(w,k.localize(0,null));if(!D){const T=w.model.outputs.map(_=>_.mime).join(", ");return this._renderMessage(w,k.localize(1,null,T))}return this._renderSearchForMimetype(w,D)}_renderSearchForMimetype(w,D){const y=`@tag:notebookRenderer ${D}`;return{type:0,source:w,htmlContent:`<p>No renderer could be found for mimetype "${D}", but one might be available on the Marketplace.</p> <a href="command:workbench.extensions.search?%22${y}%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(w,D){return{type:0,source:w,htmlContent:`<p>${D}</p>`}}async _attachToolbar(w,D,y,T,_){const L=_.filter(B=>B.isTrusted).length<=1;if(T>0&&L||!this.notebookEditor.hasModel())return;const M=this.notebookEditor.notebookOptions.getLayoutConfiguration().consolidatedOutputButton;w.style.position="relative";const O=t.$(".cell-output-toolbar");w.appendChild(O);const N=this._renderDisposableStore.add(this.instantiationService.createInstance(I.WorkbenchToolBar,O,{renderDropdownAsChildElement:!1}));N.context={ui:!0,cell:this.output.cellViewModel,notebookEditor:this.notebookEditor,$mid:12};const P=new R.Action("notebook.output.pickMimetype",k.localize(2,null),i.ThemeIcon.asClassName(l.mimetypeIcon),void 0,async B=>this._pickActiveMimeTypeRenderer(w,D,y,this.output));if(T===0&&M){const B=this._renderDisposableStore.add(this.menuService.createMenu(b.MenuId.NotebookOutputToolbar,this.contextKeyService)),V=()=>{const z=[],x=[],H={primary:z,secondary:x};(0,E.createAndFillInActionBarActions)(B,{shouldForwardArgs:!0},H,()=>!1),N.setActions([],[P,...x])};V(),this._renderDisposableStore.add(B.onDidChange(V))}else N.setActions([P])}async _pickActiveMimeTypeRenderer(w,D,y,T){const[_,L]=T.resolveMimeTypes(D,y?.preloadProvides),M=[],O=[];_.forEach((H,W)=>{H.isTrusted&&(H.rendererId===d.RENDERER_NOT_AVAILABLE?O:M).push({label:H.mimeType,id:H.mimeType,index:W,picked:W===L,detail:this._generateRendererInfo(H.rendererId),description:W===L?k.localize(3,null):void 0})}),O.some(H=>v.includes(H.id))&&O.push({label:k.localize(4,null),id:"installRenderers",index:_.length});const N=this.quickInputService.createQuickPick();N.items=[...M,{type:"separator"},...O],N.activeItems=M.filter(H=>!!H.picked),N.placeholder=M.length!==_.length?k.localize(5,null):k.localize(6,null);const P=await new Promise(H=>{N.onDidAccept(()=>{H(N.selectedItems.length===1?N.selectedItems[0]:void 0),N.dispose()}),N.show()});if(P===void 0||P.index===L)return;if(P.id==="installRenderers"){this._showJupyterExtension();return}const B=w.nextElementSibling;this._renderDisposableStore.clear();const V=this.innerContainer;V&&(V.parentElement?.removeChild(V),this.notebookEditor.removeInset(T)),T.pickedMimeType=_[P.index],this.viewCell.updateOutputMinHeight(this.viewCell.layoutInfo.outputTotalHeight);const{mimeType:z,rendererId:x}=_[P.index];this.notebookService.updateMimePreferredRenderer(D.viewType,z,x,_.map(H=>H.mimeType)),this.render(B),this._validateFinalOutputHeight(!1),this._relayoutCell()}async _showJupyterExtension(){(await this.paneCompositeService.openPaneComposite(f.VIEWLET_ID,0,!0))?.getViewPaneContainer()?.search(`@id:${c.JUPYTER_EXTENSION_ID}`)}_generateRendererInfo(w){const D=this.notebookService.getRendererInfo(w);return D?`${D.displayName!==""?D.displayName:D.id} (${D.extensionId.value})`:k.localize(7,null)}_validateFinalOutputHeight(w){this._outputHeightTimer!==null&&clearTimeout(this._outputHeightTimer),w?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()}};o=we([F(5,n.INotebookService),F(6,u.IQuickInputService),F(7,S.IContextKeyService),F(8,b.IMenuService),F(9,a.IPaneCompositePartService),F(10,C.IInstantiationService)],o),e.CellOutputElement=o;class g{constructor(w,D){this.model=w,this.element=D}}let h=class extends s.CellPart{get renderedOutputEntries(){return this._outputEntries}constructor(w,D,y,T,_,L){super(),this.notebookEditor=w,this.viewCell=D,this.templateData=y,this.options=T,this.openerService=_,this.instantiationService=L,this._outputEntries=[],this._outputHeightTimer=null,this._register(D.onDidChangeOutputs(M=>{this._updateOutputs(M)})),this._register(D.onDidChangeLayout(()=>{this.updateInternalLayoutNow(D)}))}updateInternalLayoutNow(w){this.templateData.outputContainer.setTop(w.layoutInfo.outputContainerOffset),this.templateData.outputShowMoreContainer.setTop(w.layoutInfo.outputShowMoreContainerOffset),this._outputEntries.forEach(D=>{const y=this.viewCell.outputsViewModels.indexOf(D.model);if(y>=0){const T=this.viewCell.getOutputOffsetInContainer(y);D.element.updateDOMTop(T)}})}render(w){if(this.viewCell.outputsViewModels.length>0){this.viewCell.layoutInfo.totalHeight!==0&&this.viewCell.layoutInfo.editorHeight>w&&(this.viewCell.updateOutputMinHeight(this.viewCell.layoutInfo.outputTotalHeight),this._relayoutCell()),t.show(this.templateData.outputContainer.domNode);for(let D=0;D<Math.min(this.options.limit,this.viewCell.outputsViewModels.length);D++){const y=this.viewCell.outputsViewModels[D],T=this.instantiationService.createInstance(o,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,y);this._outputEntries.push(new g(y,T)),T.render(void 0)}this.viewCell.editorHeight=w,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=w,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(w){for(let D=0;D<this._outputEntries.length;D++){const T=this._outputEntries[D].element;T.renderResult?this.notebookEditor.createOutput(this.viewCell,T.renderResult,this.viewCell.getOutputOffset(D)):T.render(void 0)}this._relayoutCell()}viewUpdateHideOuputs(){for(let w=0;w<this._outputEntries.length;w++)this.notebookEditor.hideInset(this._outputEntries[w].model)}_validateFinalOutputHeight(w){this._outputHeightTimer!==null&&clearTimeout(this._outputHeightTimer),w?this.viewCell.unlockOutputHeight():this._outputHeightTimer=setTimeout(()=>{this.viewCell.unlockOutputHeight()},1e3)}_updateOutputs(w){const D=this.viewCell.layoutInfo.outputTotalHeight;this.viewCell.updateOutputMinHeight(D),this.viewCell.outputsViewModels.length?t.show(this.templateData.outputContainer.domNode):t.hide(this.templateData.outputContainer.domNode),this.viewCell.spliceOutputHeights(w.start,w.deleteCount,w.newOutputs.map(y=>0)),this._renderNow(w)}_renderNow(w){if(w.start>=this.options.limit)return;const D=this._outputEntries.slice(0,w.start),y=this._outputEntries.slice(w.start,w.start+w.deleteCount),T=this._outputEntries.slice(w.start+w.deleteCount);let _=this.viewCell.outputsViewModels.slice(w.start,w.start+w.newOutputs.length);if(D.length+_.length+T.length>this.options.limit)if(D.length+_.length>this.options.limit){[...y,...T].forEach(O=>{O.element.detach(),O.element.dispose()}),_=_.slice(0,this.options.limit-D.length);const M=_.map(O=>new g(O,this.instantiationService.createInstance(o,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,O)));this._outputEntries=[...D,...M];for(let O=D.length;O<this._outputEntries.length;O++)this._outputEntries[O].element.render(void 0)}else{const M=T.slice(this.options.limit-D.length-_.length);[...y,...M].forEach(P=>{P.element.detach(),P.element.dispose()});const O=D.length+_.length,N=_.map(P=>new g(P,this.instantiationService.createInstance(o,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,P)));this._outputEntries=[...D,...N,...T.slice(0,this.options.limit-D.length-_.length)];for(let P=D.length;P<O;P++){const B=P-1>=0&&this._outputEntries[P-1]&&!!this._outputEntries[P-1].element.innerContainer?.parentElement?this._outputEntries[P-1].element.innerContainer:void 0;this._outputEntries[P].element.render(B)}}else{y.forEach(P=>{P.element.detach(),P.element.dispose()});const M=D.length+_.length,O=_.map(P=>new g(P,this.instantiationService.createInstance(o,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,P)));let N=[];if(D.length+O.length+T.length<this.viewCell.outputsViewModels.length){const P=Math.min(this.options.limit,this.viewCell.outputsViewModels.length);N=this.viewCell.outputsViewModels.slice(D.length+O.length+T.length,P).map(B=>new g(B,this.instantiationService.createInstance(o,this.notebookEditor,this.viewCell,this,this.templateData.outputContainer,B)))}this._outputEntries=[...D,...O,...T,...N];for(let P=D.length;P<M;P++){const B=P-1>=0&&this._outputEntries[P-1]&&!!this._outputEntries[P-1].element.innerContainer?.parentElement?this._outputEntries[P-1].element.innerContainer:void 0;this._outputEntries[P].element.render(B)}for(let P=0;P<N.length;P++)this._outputEntries[D.length+_.length+T.length+P].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 L=this.templateData.editor.getContentHeight();this.viewCell.editorHeight=L,this._relayoutCell(),this._validateFinalOutputHeight(this.viewCell.outputsViewModels.length===0)}_generateShowMoreElement(w){const D={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},y=(0,p.renderMarkdown)(D,{actionHandler:{callback:T=>{T==="command:workbench.action.openLargeOutput"&&this.openerService.open(d.CellUri.generateCellOutputUri(this.notebookEditor.textModel.uri))},disposables:w}});return w.add(y),y.element.classList.add("output-show-more"),y.element}_relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight)}dispose(){this.viewCell.updateOutputMinHeight(0),this._outputHeightTimer&&clearTimeout(this._outputHeightTimer),this._outputEntries.forEach(w=>{w.element.dispose()}),super.dispose()}};h=we([F(4,r.IOpenerService),F(5,C.IInstantiationService)],h),e.CellOutputContainer=h;const v=["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(ae[2673],le([1,0,10,11,32,29,6,2,42,329,1781,8,5,38,41,101,668,2672,2363,385,162]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCell=void 0;let a=class extends E.Disposable{constructor(g,h,v,m,w,D,y,T,_,L){super(),this.notebookEditor=g,this.viewCell=h,this.templateData=v,this.instantiationService=m,this.notebookCellStatusBarService=w,this.keybindingService=D,this.openerService=y,this.languageService=T,this.configurationService=_,this._isDisposed=!1;const M=this._register(new c.CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(h.language),this.notebookEditor.notebookOptions,this.configurationService));this._outputContainerRenderer=this.instantiationService.createInstance(l.CellOutputContainer,g,h,v,{limit:500}),this.cellParts=v.cellParts.concat([M,this._outputContainerRenderer]);const O=this.calculateInitEditorHeight();this.initializeEditor(O),this.registerViewCellLayoutChange(),this.registerCellEditorEventListeners(),this.registerDecorations(),this.registerMouseListener(),this._register(L.onDidChangeCellExecution(P=>{P.affectsCell(this.viewCell.uri)&&this.cellParts.updateForExecutionState(this.viewCell,P)})),this._register(this.viewCell.onDidChangeState(P=>{if(this.cellParts.updateState(this.viewCell,P),P.outputIsHoveredChanged&&this.updateForOutputHover(),P.outputIsFocusedChanged&&this.updateForOutputFocus(),(P.metadataChanged||P.internalMetadataChanged)&&this.updateEditorOptions(),P.inputCollapsedChanged||P.outputCollapsedChanged){this.viewCell.pauseLayout();const B=this.updateForCollapseState();this.viewCell.resumeLayout(),B&&this.relayoutCell()}P.focusModeChanged&&this.updateEditorForFocusModeChange()})),this.cellParts.renderCell(this.viewCell),this._register((0,E.toDisposable)(()=>{this.cellParts.unrenderCell(this.viewCell)})),this.updateEditorOptions(),this.updateEditorForFocusModeChange(),this.updateForOutputHover(),this.updateForOutputFocus(),this._outputContainerRenderer.render(O),this.viewCell.isOutputCollapsed===void 0&&this.viewCell.isInputCollapsed===void 0&&(this.initialViewUpdateExpanded(),this.viewCell.layoutChange({})),this._register(this.viewCell.onLayoutInfoRead(()=>{this.cellParts.prepareLayout()}));const N=t.append(this.templateData.cellInputCollapsedContainer,t.$(".collapsed-execution-icon"));this._register((0,E.toDisposable)(()=>{N.parentElement?.removeChild(N)})),this._collapsedExecutionIcon=this._register(this.instantiationService.createInstance(s.CollapsedCodeCellExecutionIcon,this.notebookEditor,this.viewCell,N)),this.updateForCollapseState(),this._register(k.Event.runAndSubscribe(h.onDidChangeOutputs,this.updateForOutputs.bind(this))),this._register(k.Event.runAndSubscribe(h.onDidChangeLayout,this.updateForLayout.bind(this))),this._register(M.onDidChange(()=>v.editor.updateOptions(M.getUpdatedValue(this.viewCell.internalMetadata,this.viewCell.uri)))),v.editor.updateOptions(M.getUpdatedValue(this.viewCell.internalMetadata,this.viewCell.uri)),M.setLineNumbers(this.viewCell.lineNumbers)}updateForLayout(){this._pendingLayout?.dispose(),this._pendingLayout=t.modify(()=>{this.cellParts.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 g=this.viewCell.lineCount,h=this.viewCell.layoutInfo.fontInfo?.lineHeight||17,v=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri);return this.viewCell.layoutInfo.editorHeight===0?g*h+v.top+v.bottom:this.viewCell.layoutInfo.editorHeight}initializeEditor(g){const h=this.viewCell.layoutInfo.editorWidth;this.layoutEditor({width:h,height:g});const v=new R.CancellationTokenSource;this._register({dispose(){v.dispose(!0)}}),(0,p.raceCancellation)(this.viewCell.resolveTextModel(),v.token).then(m=>{if(!this._isDisposed&&m&&this.templateData.editor){this.templateData.editor.setModel(m),this.viewCell.attachTextEditor(this.templateData.editor,this.viewCell.layoutInfo.estimatedHasHorizontalScrolling);const w=()=>{this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===f.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)&&this.templateData.editor?.focus()};w();const D=this.templateData.editor?.getContentHeight();D!==void 0&&D!==g&&this.onCellEditorHeightChange(D),w()}})}updateForOutputs(){this.viewCell.outputsViewModels.length?t.show(this.templateData.focusSinkElement):t.hide(this.templateData.focusSinkElement)}updateEditorOptions(){const g=this.templateData.editor;if(!g)return;const h=this.notebookEditor.isReadOnly,v=this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri),m=g.getOptions();(m.get(82)!==h||m.get(76)!==v)&&g.updateOptions({readOnly:this.notebookEditor.isReadOnly,padding:this.notebookEditor.notebookOptions.computeEditorPadding(this.viewCell.internalMetadata,this.viewCell.uri)})}registerViewCellLayoutChange(){this._register(this.viewCell.onDidChangeLayout(g=>{g.outerWidth!==void 0&&this.templateData.editor.getLayoutInfo().width!==this.viewCell.layoutInfo.editorWidth&&this.onCellWidthChange(),g.totalHeight&&this.relayoutCell()}))}registerCellEditorEventListeners(){this._register(this.templateData.editor.onDidContentSizeChange(g=>{g.contentHeightChanged&&this.viewCell.layoutInfo.editorHeight!==g.contentHeight&&this.onCellEditorHeightChange(g.contentHeight)})),this._register(this.templateData.editor.onDidChangeCursorSelection(g=>{if(g.source==="restoreState"||g.oldModelVersionId===0)return;const h=this.templateData.editor.getSelections();if(h?.length){const v=h[h.length-1];this.notebookEditor.revealLineInViewAsync(this.viewCell,v.positionLineNumber)}}))}registerDecorations(){this._register(this.viewCell.onCellDecorationsChanged(g=>{g.added.forEach(h=>{h.className&&this.templateData.rootContainer.classList.add(h.className),h.outputClassName&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[h.outputClassName],[])}),g.removed.forEach(h=>{h.className&&this.templateData.rootContainer.classList.remove(h.className),h.outputClassName&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[],[h.outputClassName])})})),this.viewCell.getCellDecorations().forEach(g=>{g.className&&this.templateData.rootContainer.classList.add(g.className),g.outputClassName&&this.notebookEditor.deltaCellContainerClassNames(this.viewCell.id,[g.outputClassName],[])})}registerMouseListener(){this._register(this.templateData.editor.onMouseDown(g=>{g.event.rightButton&&g.event.preventDefault()}))}shouldUpdateDOMFocus(){return this.notebookEditor.getActiveCell()===this.viewCell&&this.viewCell.focusMode===f.CellFocusMode.Editor&&(this.notebookEditor.hasEditorFocus()||document.activeElement===document.body)}updateEditorForFocusModeChange(){this.shouldUpdateDOMFocus()&&this.templateData.editor?.focus(),this.templateData.container.classList.toggle("cell-editor-focus",this.viewCell.focusMode===f.CellFocusMode.Editor),this.templateData.container.classList.toggle("cell-output-focus",this.viewCell.focusMode===f.CellFocusMode.Output)}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 g=this._getRichText(this.viewCell.textBuffer,this.viewCell.language),h=t.$("div.cell-collapse-preview");t.safeInnerHtml(h,g),this.templateData.cellInputCollapsedContainer.appendChild(h);const v=t.$("span.expandInputIcon"),m=this.keybindingService.lookupKeybinding(f.EXPAND_CELL_INPUT_COMMAND_ID);m&&(h.title=(0,S.localize)(0,null,m.getLabel()),v.title=(0,S.localize)(1,null,m.getLabel())),v.classList.add(...A.CSSIcon.asClassNameArray(A.Codicon.more)),h.appendChild(v),t.show(this.templateData.cellInputCollapsedContainer)}_showInput(){this._collapsedExecutionIcon.setVisibility(!1),t.show(this.templateData.editorPart),t.hide(this.templateData.cellInputCollapsedContainer)}_getRichText(g,h){return(0,b.tokenizeToStringSync)(this.languageService,g.getLineContent(1),h)}_removeInputCollapsePreview(){const g=this.templateData.cellInputCollapsedContainer.children,h=[];for(let v=0;v<g.length;v++)g[v].classList.contains("cell-collapse-preview")&&h.push(g[v]);h.forEach(v=>{v.parentElement?.removeChild(v)})}_updateOutputInnerContainer(g){const h=this.templateData.outputContainer.domNode.children;for(let v=0;v<h.length;v++)h[v].classList.contains("output-inner-container")&&(g?t.hide(h[v]):t.show(h[v]))}_collapseOutput(){this.templateData.container.classList.toggle("output-collapsed",!0),t.show(this.templateData.cellOutputCollapsedContainer),this._updateOutputInnerContainer(!0),this._outputContainerRenderer.viewUpdateHideOuputs()}_showOutput(g){this.templateData.container.classList.toggle("output-collapsed",!1),t.hide(this.templateData.cellOutputCollapsedContainer),this._updateOutputInnerContainer(!1),this._outputContainerRenderer.viewUpdateShowOutputs(g)}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(g){this.templateData.editor?.layout(g)}onCellWidthChange(){if(!this.templateData.editor.hasModel())return;const g=this.templateData.editor.getContentHeight();this.viewCell.editorHeight=g,this.relayoutCell(),this.layoutEditor({width:this.viewCell.layoutInfo.editorWidth,height:g})}onCellEditorHeightChange(g){const h=this.templateData.editor.getLayoutInfo();this.viewCell.editorHeight=g,this.relayoutCell(),this.layoutEditor({width:h.width,height:g})}relayoutCell(){this.notebookEditor.layoutNotebookCell(this.viewCell,this.viewCell.layoutInfo.totalHeight)}dispose(){this._isDisposed=!0,this.shouldUpdateDOMFocus()&&this.notebookEditor.focusContainer(),this.viewCell.detachTextEditor(),this._removeInputCollapsePreview(),this._outputContainerRenderer.dispose(),this._pendingLayout?.dispose(),super.dispose()}};a=we([F(3,r.IInstantiationService),F(4,d.INotebookCellStatusBarService),F(5,u.IKeybindingService),F(6,i.IOpenerService),F(7,I.ILanguageService),F(8,C.IConfigurationService),F(9,n.INotebookExecutionStateService)],a),e.CodeCell=a}),define(ae[2674],le([1,0,1819,48,252,45,132,109,7,96,28,13,38,15,70,91,87]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessViewPickerAction=e.OpenViewPickerAction=e.ViewQuickAccessProvider=void 0;let l=class ol extends R.PickerQuickAccessProvider{constructor(a,o,g,h,v,m,w,D){super(ol.PREFIX,{noResultsPick:{label:(0,t.localize)(0,null),containerLabel:""}}),this.viewDescriptorService=a,this.viewsService=o,this.outputService=g,this.terminalService=h,this.terminalGroupService=v,this.debugService=m,this.paneCompositeService=w,this.contextKeyService=D}_getPicks(a){const o=this.doGetViewPickItems().filter(m=>a?(m.highlights={label:(0,C.withNullAsUndefined)((0,b.matchesFuzzy)(a,m.label,!0))},m.highlights.label||(0,S.fuzzyContains)(m.containerLabel,a)):!0),g=new Map;for(const m of o)g.has(m.label)||g.set(m.label,m.containerLabel);const h=[];let v;for(const m of o){if(v!==m.containerLabel){v=m.containerLabel;let w;g.has(v)?w=`${g.get(v)} / ${v}`:w=v,h.push({type:"separator",label:w})}h.push(m)}return h}doGetViewPickItems(){const a=[],o=(m,w)=>{const D=this.viewDescriptorService.getViewContainerModel(w),y=[];for(const T of D.allViewDescriptors)this.contextKeyService.contextMatchesRules(T.when)&&y.push({label:T.name,containerLabel:D.title,accept:()=>this.viewsService.openView(T.id,!0)});return y},g=(m,w)=>{const D=this.paneCompositeService.getPaneComposites(m),y=this.paneCompositeService.getVisiblePaneCompositeIds(m);D.sort((T,_)=>{let L=y.findIndex(O=>T.id===O),M=y.findIndex(O=>_.id===O);return L<0&&(L=D.indexOf(T)+y.length),M<0&&(M=D.indexOf(_)+y.length),L-M});for(const T of D)if(this.includeViewContainer(T)){const _=this.viewDescriptorService.getViewContainerById(T.id);_&&a.push({label:this.viewDescriptorService.getViewContainerModel(_).title,containerLabel:w,accept:()=>this.paneCompositeService.openPaneComposite(T.id,m,!0)})}};g(0,(0,t.localize)(1,null)),g(1,(0,t.localize)(2,null)),g(2,(0,t.localize)(3,null));const h=m=>{const w=this.paneCompositeService.getPaneComposites(m);for(const D of w){const y=this.viewDescriptorService.getViewContainerById(D.id);y&&a.push(...o(D,y))}};h(0),h(1),h(2),this.terminalGroupService.groups.forEach((m,w)=>{m.terminalInstances.forEach((D,y)=>{const T=(0,t.localize)(4,null,`${w+1}.${y+1}`,D.title);a.push({label:T,containerLabel:(0,t.localize)(5,null),accept:async()=>{await this.terminalGroupService.showPanel(!0),this.terminalService.setActiveInstance(D)}})})}),this.debugService.getModel().getSessions(!0).filter(m=>m.hasSeparateRepl()).forEach((m,w)=>{const D=m.name;a.push({label:D,containerLabel:(0,t.localize)(6,null),accept:async()=>{await this.debugService.focusStackFrame(void 0,void 0,m,{explicit:!0}),this.viewsService.isViewVisible(c.REPL_VIEW_ID)||await this.viewsService.openView(c.REPL_VIEW_ID,!0)}})});const v=this.outputService.getChannelDescriptors();for(const m of v){const w=m.log?(0,t.localize)(7,null,m.label):m.label;a.push({label:w,containerLabel:(0,t.localize)(8,null),accept:()=>this.outputService.showChannel(m.id)})}return a}includeViewContainer(a){const o=this.viewDescriptorService.getViewContainerById(a.id);return o?.hideIfEmpty?this.viewDescriptorService.getViewContainerModel(o).activeViewDescriptors.length>0:!0}};l.PREFIX="view ",l=we([F(0,A.IViewDescriptorService),F(1,A.IViewsService),F(2,k.IOutputService),F(3,E.ITerminalService),F(4,E.ITerminalGroupService),F(5,c.IDebugService),F(6,f.IPaneCompositePartService),F(7,I.IContextKeyService)],l),e.ViewQuickAccessProvider=l;class s extends u.Action2{constructor(){super({id:s.ID,title:{value:(0,t.localize)(9,null),original:"Open View"},category:i.Categories.View,f1:!0})}async run(a){a.get(p.IQuickInputService).quickAccess.show(l.PREFIX)}}e.OpenViewPickerAction=s,s.ID="workbench.action.openView";class d extends u.Action2{constructor(){super({id:d.ID,title:{value:(0,t.localize)(10,null),original:"Quick Open View"},category:i.Categories.View,f1:!1,keybinding:{weight:200,when:void 0,...d.KEYBINDING}})}async run(a){const o=a.get(r.IKeybindingService),g=a.get(p.IQuickInputService),h=o.lookupKeybindings(d.ID);g.quickAccess.show(l.PREFIX,{quickNavigateConfiguration:{keybindings:h},itemActivation:p.ItemActivation.FIRST})}}e.QuickAccessViewPickerAction=d,d.ID="workbench.action.quickOpenView",d.KEYBINDING={primary:2095,mac:{primary:303},linux:{primary:0}}}),define(ae[951],le([1,0,11,6,2,1929,8,5,66,346,347,247,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingProgressUiService=e.TestingProgressTrigger=e.ITestingProgressUiService=void 0,e.ITestingProgressUiService=(0,E.createDecorator)("testingProgressUiService");let u=class extends R.Disposable{constructor(s,d,n,a){super(),this.configurationService=n,this.paneCompositeService=a;const o=this._register(new t.RunOnceScheduler(()=>d.update(),200));this._register(s.onResultsChanged(g=>{"started"in g&&this.attachAutoOpenForNewResults(g.started),o.isScheduled()||o.schedule()})),this._register(s.onTestChanged(()=>{o.isScheduled()||o.schedule()}))}attachAutoOpenForNewResults(s){if(s.request.isUiTriggered===!1)return;const d=(0,b.getTestingConfiguration)(this.configurationService,"testing.openTesting");if(d==="neverOpen")return;if(d==="openOnTestStart")return this.openTestView();const n=new R.DisposableStore;n.add(s.onComplete(()=>n.dispose())),n.add(s.onChange(a=>{a.reason===1&&(0,S.isFailedState)(a.item.ownComputedState)&&(this.openTestView(),n.dispose())}))}openTestView(){this.paneCompositeService.openPaneComposite("workbench.view.extension.test",0)}};u=we([F(0,C.ITestResultService),F(1,e.ITestingProgressUiService),F(2,k.IConfigurationService),F(3,r.IPaneCompositePartService)],u),e.TestingProgressTrigger=u;let i=class extends R.Disposable{constructor(s,d){super(),this.resultService=s,this.instantiaionService=d,this.windowProg=this._register(new R.MutableDisposable),this.testViewProg=this._register(new R.MutableDisposable),this.updateCountsEmitter=new p.Emitter,this.updateTextEmitter=new p.Emitter,this.lastRunSoFar=0,this.onCountChange=this.updateCountsEmitter.event,this.onTextChange=this.updateTextEmitter.event}update(){const s=this.resultService.results,d=s.filter(o=>o.completedAt===void 0);if(!d.length){if(s.length){const o=f(!1,s[0].counts);this.updateCountsEmitter.fire(o),this.updateTextEmitter.fire(c(!1,o))}else this.updateTextEmitter.fire(""),this.updateCountsEmitter.fire(f(!1));this.windowProg.clear(),this.testViewProg.clear(),this.lastRunSoFar=0;return}this.windowProg.value||(this.windowProg.value=this.instantiaionService.createInstance(I.UnmanagedProgress,{location:10,type:"loading"}),this.testViewProg.value=this.instantiaionService.createInstance(I.UnmanagedProgress,{location:"workbench.view.extension.test",total:100}));const n=f(!0,...d.map(o=>o.counts));this.updateCountsEmitter.fire(n);const a=c(!0,n);this.updateTextEmitter.fire(a),this.windowProg.value.report({message:a}),this.testViewProg.value.report({increment:n.runSoFar-this.lastRunSoFar,total:n.totalWillBeRun}),this.lastRunSoFar=n.runSoFar}};i=we([F(0,C.ITestResultService),F(1,E.IInstantiationService)],i),e.TestingProgressUiService=i;const f=(l,...s)=>{let d=0,n=0,a=0,o=0,g=0;for(const h of s)n+=h[6]+h[4],d+=h[3],a+=h[5],o+=h[2],g+=h[1];return{isRunning:l,passed:d,failed:n,runSoFar:d+n,totalWillBeRun:d+n+g+o,skipped:a}},c=(l,{passed:s,runSoFar:d,totalWillBeRun:n,skipped:a,failed:o})=>{let g=s/d*100;return o>0?g=Math.min(g,99.9):d===0&&(g=0),l?d===0?(0,A.localize)(0,null):a===0?(0,A.localize)(1,null,s,n,g.toPrecision(3)):(0,A.localize)(2,null,s,n,g.toPrecision(3),a):a===0?(0,A.localize)(3,null,s,d,g.toPrecision(3)):(0,A.localize)(4,null,s,d,g.toPrecision(3),a)}}),define(ae[2675],le([1,0,190,2,35,45,846,6,5,91]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActivityService=void 0;let S=class extends p.Disposable{constructor(u,i,f){super(),this.viewId=u,this.viewDescriptorService=i,this.activityService=f,this.activity=void 0,this.activityDisposable=p.Disposable.None,this._register(E.Event.filter(this.viewDescriptorService.onDidChangeContainer,c=>c.views.some(l=>l.id===u))(()=>this.update())),this._register(E.Event.filter(this.viewDescriptorService.onDidChangeLocation,c=>c.views.some(l=>l.id===u))(()=>this.update()))}setActivity(u){this.activity=u,this.update()}clearActivity(){this.activity=void 0,this.update()}update(){this.activityDisposable.dispose();const u=this.viewDescriptorService.getViewContainerByViewId(this.viewId);u&&this.activity&&(this.activityDisposable=this.activityService.showViewContainerActivity(u.id,this.activity))}dispose(){this.activityDisposable.dispose()}};S=we([F(1,A.IViewDescriptorService),F(2,t.IActivityService)],S);let C=class{constructor(u,i,f){this.paneCompositeService=u,this.viewDescriptorService=i,this.instantiationService=f,this.viewActivities=new Map}showViewContainerActivity(u,{badge:i,clazz:f,priority:c}){const l=this.viewDescriptorService.getViewContainerById(u);if(l){const s=this.viewDescriptorService.getViewContainerLocation(l);if(s!==null)return this.paneCompositeService.showActivity(l.id,s,i,f,c)}return p.Disposable.None}showViewActivity(u,i){let f=this.viewActivities.get(u);f?f.id++:(f={id:1,activity:this.instantiationService.createInstance(S,u)},this.viewActivities.set(u,f));const c=f.id;f.activity.setActivity(i);const l=f;return(0,p.toDisposable)(()=>{l.id===c&&(l.activity.dispose(),this.viewActivities.delete(u))})}showAccountsActivity({badge:u,clazz:i,priority:f}){return this.paneCompositeService.showActivity(k.ACCOUNTS_ACTIVITY_ID,0,u,i,f)}showGlobalActivity({badge:u,clazz:i,priority:f}){return this.paneCompositeService.showActivity(k.GLOBAL_ACTIVITY_ID,0,u,i,f)}};C=we([F(0,b.IPaneCompositePartService),F(1,A.IViewDescriptorService),F(2,I.IInstantiationService)],C),e.ActivityService=C,(0,R.registerSingleton)(t.IActivityService,C,1)}),define(ae[952],le([1,0,2029,16,28,14,96,17,327,15,676,255,38,498,937]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,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 f=(0,t.localize)(0,null),c=(0,t.localize)(1,null),l=(0,t.localize)(2,null),s=(0,k.or)(k.matchesPrefix,k.matchesWords,k.matchesContiguousSubString);let d=class Ci extends C.EditorModel{constructor(o,g){super(),this.keybindingsService=g,this._keybindingItems=[],this._keybindingItemsSortedByPrecedence=[],this.modifierLabels={ui:I.UILabelProvider.modifierLabels[o],aria:I.AriaLabelProvider.modifierLabels[o],user:I.UserSettingsLabelProvider.modifierLabels[o]}}fetch(o,g=!1){let h=g?this._keybindingItemsSortedByPrecedence:this._keybindingItems;const v=/@command:\s*(.+)/i.exec(o);if(v&&v[1])return h.filter(m=>m.command===v[1]).map(m=>({id:Ci.getId(m),keybindingItem:m,templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID}));if(/@source:\s*(user|default|extension)/i.test(o))h=this.filterBySource(h,o),o=o.replace(/@source:\s*(user|default|extension)/i,"");else{const m=/@keybinding:\s*((\".+\")|(\S+))/i.exec(o);m&&(m[2]||m[3])&&(o=m[2]||`"${m[3]}"`)}return o=o.trim(),o?this.filterByText(h,o):h.map(m=>({id:Ci.getId(m),keybindingItem:m,templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID}))}filterBySource(o,g){return/@source:\s*default/i.test(g)?o.filter(h=>h.source===f):/@source:\s*user/i.test(g)?o.filter(h=>h.source===l):/@source:\s*extension/i.test(g)?o.filter(h=>h.source===c):o}filterByText(o,g){const h=g.charAt(0)==='"',v=g.charAt(g.length-1)==='"',m=h&&v;h&&(g=g.substring(1)),v&&(g=g.substring(0,g.length-1)),g=g.trim();const w=[],D=g.split(" "),y=this.splitKeybindingWords(D);for(const T of o){const _=new n(this.modifierLabels,T,g,D,y,m);(_.commandIdMatches||_.commandLabelMatches||_.commandDefaultLabelMatches||_.sourceMatches||_.whenMatches||_.keybindingMatches)&&w.push({id:Ci.getId(T),templateId:e.KEYBINDING_ENTRY_TEMPLATE_ID,commandLabelMatches:_.commandLabelMatches||void 0,commandDefaultLabelMatches:_.commandDefaultLabelMatches||void 0,keybindingItem:T,keybindingMatches:_.keybindingMatches||void 0,commandIdMatches:_.commandIdMatches||void 0,sourceMatches:_.sourceMatches||void 0,whenMatches:_.whenMatches||void 0})}return w}splitKeybindingWords(o){const g=[];for(const h of o)g.push(...(0,p.coalesce)(h.split("+")));return g}async resolve(o=new Map){const g=E.Registry.as(S.Extensions.WorkbenchActions);this._keybindingItemsSortedByPrecedence=[];const h=new Map;for(const m of this.keybindingsService.getKeybindings())m.command&&(this._keybindingItemsSortedByPrecedence.push(Ci.toKeybindingEntry(m.command,m,g,o)),h.set(m.command,!0));const v=this.keybindingsService.getDefaultKeybindings().map(m=>m.command);for(const m of(0,i.getAllUnboundCommands)(h)){const w=new u.ResolvedKeybindingItem(void 0,m,null,void 0,v.indexOf(m)===-1,null,!1);this._keybindingItemsSortedByPrecedence.push(Ci.toKeybindingEntry(m,w,g,o))}return this._keybindingItemsSortedByPrecedence=(0,p.distinct)(this._keybindingItemsSortedByPrecedence,m=>Ci.getId(m)),this._keybindingItems=this._keybindingItemsSortedByPrecedence.slice(0).sort((m,w)=>Ci.compareKeybindingData(m,w)),super.resolve()}static getId(o){return o.command+(o.keybinding?o.keybinding.getAriaLabel():"")+o.source+o.when}static compareKeybindingData(o,g){return o.keybinding&&!g.keybinding?-1:g.keybinding&&!o.keybinding?1:o.commandLabel&&!g.commandLabel?-1:g.commandLabel&&!o.commandLabel?1:o.commandLabel&&g.commandLabel&&o.commandLabel!==g.commandLabel?o.commandLabel.localeCompare(g.commandLabel):o.command===g.command?o.keybindingItem.isDefault?1:-1:o.command.localeCompare(g.command)}static toKeybindingEntry(o,g,h,v){const m=b.MenuRegistry.getCommand(o),w=v.get(o);return{keybinding:g.resolvedKeybinding,keybindingItem:g,command:o,commandLabel:Ci.getCommandLabel(m,w),commandDefaultLabel:Ci.getCommandDefaultLabel(m,h),when:g.when?g.when.serialize():"",source:g.extensionId?g.isBuiltinExtension?f:c:g.isDefault?f:l}}static getCommandDefaultLabel(o,g){if(!A.Language.isDefaultVariant()&&o&&o.title&&o.title.original){const h=o.category?o.category.original:void 0,v=o.title.original;return h?(0,t.localize)(3,null,h,v):v}return null}static getCommandLabel(o,g){if(o){const h=o.category?typeof o.category=="string"?o.category:o.category.value:void 0,v=typeof o.title=="string"?o.title:o.title.value;return h?(0,t.localize)(4,null,h,v):v}return g||""}};d=we([F(1,r.IKeybindingService)],d),e.KeybindingsEditorModel=d;class n{constructor(o,g,h,v,m,w){this.modifierLabels=o,this.commandIdMatches=null,this.commandLabelMatches=null,this.commandDefaultLabelMatches=null,this.sourceMatches=null,this.whenMatches=null,this.keybindingMatches=null,w||(this.commandIdMatches=this.matches(h,g.command,(0,k.or)(k.matchesWords,k.matchesCamelCase),v),this.commandLabelMatches=g.commandLabel?this.matches(h,g.commandLabel,(D,y)=>(0,k.matchesWords)(D,g.commandLabel,!0),v):null,this.commandDefaultLabelMatches=g.commandDefaultLabel?this.matches(h,g.commandDefaultLabel,(D,y)=>(0,k.matchesWords)(D,g.commandDefaultLabel,!0),v):null,this.sourceMatches=this.matches(h,g.source,(D,y)=>(0,k.matchesWords)(D,g.source,!0),v),this.whenMatches=g.when?this.matches(null,g.when,(0,k.or)(k.matchesWords,k.matchesCamelCase),v):null),this.keybindingMatches=g.keybinding?this.matchesKeybinding(g.keybinding,h,m,w):null}matches(o,g,h,v){let m=o?s(o,g):null;return m||(m=this.matchesWords(v,g,h)),m&&(m=this.filterAndSort(m)),m}matchesWords(o,g,h){let v=[];for(const m of o){const w=h(m,g);if(w)v=[...v||[],...w];else{v=null;break}}return v}filterAndSort(o){return(0,p.distinct)(o,g=>g.start+"."+g.end).filter(g=>!o.some(h=>!(h.start===g.start&&h.end===g.end)&&h.start<=g.start&&h.end>=g.end)).sort((g,h)=>g.start-h.start)}matchesKeybinding(o,g,h,v){const[m,w]=o.getParts(),D=o.getUserSettingsLabel(),y=o.getAriaLabel(),T=o.getLabel();if(D&&R.compareIgnoreCase(g,D)===0||y&&R.compareIgnoreCase(g,y)===0||T&&R.compareIgnoreCase(g,T)===0)return{firstPart:this.createCompleteMatch(m),chordPart:this.createCompleteMatch(w)};const _={};let L={};const M=[],O=[];let N=[],P=!0;for(let B=0;B<h.length;B++){const V=h[B];let z=!1,x=!1;P=P&&!_.keyCode;let H=!L.keyCode;if(P&&(z=this.matchPart(m,_,V,v),_.keyCode)){for(const W of N)O.indexOf(W)===-1&&M.splice(M.indexOf(W),1);L={},N=[],H=!1}H&&(x=this.matchPart(w,L,V,v)),z&&O.push(B),x&&N.push(B),(z||x)&&M.push(B),P=P&&this.isModifier(V)}return M.length!==h.length||v&&(!this.isCompleteMatch(m,_)||!this.isCompleteMatch(w,L))?null:this.hasAnyMatch(_)||this.hasAnyMatch(L)?{firstPart:_,chordPart:L}:null}matchPart(o,g,h,v){let m=!1;return this.matchesMetaModifier(o,h)&&(m=!0,g.metaKey=!0),this.matchesCtrlModifier(o,h)&&(m=!0,g.ctrlKey=!0),this.matchesShiftModifier(o,h)&&(m=!0,g.shiftKey=!0),this.matchesAltModifier(o,h)&&(m=!0,g.altKey=!0),this.matchesKeyCode(o,h,v)&&(g.keyCode=!0,m=!0),m}matchesKeyCode(o,g,h){if(!o)return!1;const v=o.keyAriaLabel||"";if(h||v.length===1||g.length===1){if(R.compareIgnoreCase(v,g)===0)return!0}else if((0,k.matchesContiguousSubString)(g,v))return!0;return!1}matchesMetaModifier(o,g){return!o||!o.metaKey?!1:this.wordMatchesMetaModifier(g)}matchesCtrlModifier(o,g){return!o||!o.ctrlKey?!1:this.wordMatchesCtrlModifier(g)}matchesShiftModifier(o,g){return!o||!o.shiftKey?!1:this.wordMatchesShiftModifier(g)}matchesAltModifier(o,g){return!o||!o.altKey?!1:this.wordMatchesAltModifier(g)}hasAnyMatch(o){return!!o.altKey||!!o.ctrlKey||!!o.metaKey||!!o.shiftKey||!!o.keyCode}isCompleteMatch(o,g){return o?!(!g.keyCode||o.metaKey&&!g.metaKey||o.altKey&&!g.altKey||o.ctrlKey&&!g.ctrlKey||o.shiftKey&&!g.shiftKey):!0}createCompleteMatch(o){const g={};return o&&(g.keyCode=!0,o.metaKey&&(g.metaKey=!0),o.altKey&&(g.altKey=!0),o.ctrlKey&&(g.ctrlKey=!0),o.shiftKey&&(g.shiftKey=!0)),g}isModifier(o){return!!(this.wordMatchesAltModifier(o)||this.wordMatchesCtrlModifier(o)||this.wordMatchesMetaModifier(o)||this.wordMatchesShiftModifier(o))}wordMatchesAltModifier(o){return!!(R.equalsIgnoreCase(this.modifierLabels.ui.altKey,o)||R.equalsIgnoreCase(this.modifierLabels.aria.altKey,o)||R.equalsIgnoreCase(this.modifierLabels.user.altKey,o)||R.equalsIgnoreCase((0,t.localize)(5,null),o))}wordMatchesCtrlModifier(o){return!!(R.equalsIgnoreCase(this.modifierLabels.ui.ctrlKey,o)||R.equalsIgnoreCase(this.modifierLabels.aria.ctrlKey,o)||R.equalsIgnoreCase(this.modifierLabels.user.ctrlKey,o))}wordMatchesMetaModifier(o){return!!(R.equalsIgnoreCase(this.modifierLabels.ui.metaKey,o)||R.equalsIgnoreCase(this.modifierLabels.aria.metaKey,o)||R.equalsIgnoreCase(this.modifierLabels.user.metaKey,o)||R.equalsIgnoreCase((0,t.localize)(6,null),o))}wordMatchesShiftModifier(o){return!!(R.equalsIgnoreCase(this.modifierLabels.ui.shiftKey,o)||R.equalsIgnoreCase(this.modifierLabels.aria.shiftKey,o)||R.equalsIgnoreCase(this.modifierLabels.user.shiftKey,o))}}}),define(ae[678],le([1,0,14,2028,5,186,952]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditorInput=void 0;let E=class Ws extends A.EditorInput{constructor(b){super(),this.searchOptions=null,this.resource=void 0,this.keybindingsModel=b.createInstance(k.KeybindingsEditorModel,t.OS)}get typeId(){return Ws.ID}getName(){return p.localize(0,null)}async resolve(){return this.keybindingsModel}matches(b){return b instanceof Ws}dispose(){this.keybindingsModel.dispose(),super.dispose()}};E.ID="workbench.input.keybindings",E=we([F(0,R.IInstantiationService)],E),e.KeybindingsEditorInput=E}),define(ae[106],le([1,0,5,43]),function(J,e,t,p){"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 R;(function(E){E.Null="null",E.Enum="enum",E.String="string",E.MultilineString="multiline-string",E.Integer="integer",E.Number="number",E.Boolean="boolean",E.Array="array",E.Exclude="exclude",E.Complex="complex",E.NullableInteger="nullable-integer",E.NullableNumber="nullable-number",E.Object="object",E.BooleanObject="boolean-object",E.LanguageTag="language-tag"})(R=e.SettingValueType||(e.SettingValueType={}));var A;(function(E){E[E.None=0]="None",E[E.WholeWordMatch=1]="WholeWordMatch",E[E.KeyMatch=2]="KeyMatch"})(A=e.SettingMatchType||(e.SettingMatchType={}));function k(E){return{...E,override:p.DEFAULT_EDITOR_ASSOCIATION.id,pinned:!0}}e.validateSettingsEditorOptions=k,e.IPreferencesService=(0,t.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(ae[679],le([1,0,1518,15,12,243,7,36,10,38,14,8,6,2,200,11,80,49,283,23,26,106,51,1267,579,73,130,111,83,86,74,237,141,31,27,319,597]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomMenubarControl=e.MenubarControl=void 0,p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarFileMenu,title:{value:"File",original:"File",mnemonicTitle:(0,t.localize)(0,null)},order:1}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarEditMenu,title:{value:"Edit",original:"Edit",mnemonicTitle:(0,t.localize)(1,null)},order:2}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarSelectionMenu,title:{value:"Selection",original:"Selection",mnemonicTitle:(0,t.localize)(2,null)},order:3}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarViewMenu,title:{value:"View",original:"View",mnemonicTitle:(0,t.localize)(3,null)},order:4}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarGoMenu,title:{value:"Go",original:"Go",mnemonicTitle:(0,t.localize)(4,null)},order:5}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarTerminalMenu,title:{value:"Terminal",original:"Terminal",mnemonicTitle:(0,t.localize)(5,null)},order:7,when:k.ContextKeyExpr.has("terminalProcessSupported")}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarHelpMenu,title:{value:"Help",original:"Help",mnemonicTitle:(0,t.localize)(6,null)},order:8}),p.MenuRegistry.appendMenuItem(p.MenuId.MenubarMainMenu,{submenu:p.MenuId.MenubarPreferencesMenu,title:{value:"Preferences",original:"Preferences",mnemonicTitle:(0,t.localize)(7,null)},when:L.IsMacNativeContext,order:9});class B extends u.Disposable{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie){super(),this.menuService=x,this.workspacesService=H,this.contextKeyService=W,this.keybindingService=U,this.configurationService=$,this.labelService=q,this.updateService=X,this.storageService=G,this.notificationService=Q,this.preferencesService=j,this.environmentService=K,this.accessibilityService=Y,this.hostService=ee,this.commandService=ie,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(p.MenuId.MenubarMainMenu,this.contextKeyService)),this.mainMenuDisposables=this._register(new u.DisposableStore),this.setupMainMenu(),this.menuUpdater=this._register(new f.RunOnceScheduler(()=>this.doUpdateMenubar(!1),200)),this.notifyUserOfCustomMenubarAccessibility()}registerListeners(){this._register(this.hostService.onDidChangeFocus(x=>this.onDidChangeWindowFocus(x))),this._register(this.configurationService.onDidChangeConfiguration(x=>this.onConfigurationUpdated(x))),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[,x]=this.mainMenu.getActions()[0];for(const H of x)H instanceof p.SubmenuItemAction&&typeof H.item.title!="string"&&(this.menus[H.item.title.original]=this.mainMenuDisposables.add(this.menuService.createMenu(H.item.submenu,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.topLevelTitles[H.item.title.original]=H.item.title.mnemonicTitle??H.item.title.value)}updateMenubar(){this.menuUpdater.schedule()}calculateActionLabel(x){const H=x.label;switch(x.id){default:break}return H}onUpdateStateChange(){this.updateMenubar()}onUpdateKeybindings(){this.updateMenubar()}getOpenRecentActions(){if(!this.recentlyOpened)return[];const{workspaces:x,files:H}=this.recentlyOpened,W=[];if(x.length>0){for(let U=0;U<B.MAX_MENU_RECENT_ENTRIES&&U<x.length;U++)W.push(this.createOpenRecentMenuAction(x[U]));W.push(new E.Separator)}if(H.length>0){for(let U=0;U<B.MAX_MENU_RECENT_ENTRIES&&U<H.length;U++)W.push(this.createOpenRecentMenuAction(H[U]));W.push(new E.Separator)}return W}onDidChangeWindowFocus(x){x&&this.onDidChangeRecentlyOpened()}onConfigurationUpdated(x){this.keys.some(H=>x.affectsConfiguration(H))&&this.updateMenubar(),x.affectsConfiguration("editor.accessibilitySupport")&&this.notifyUserOfCustomMenubarAccessibility(),x.affectsConfiguration("window.menuBarVisibility")&&this.onDidChangeRecentlyOpened()}get menubarHidden(){return S.isMacintosh&&S.isNative?!1:(0,A.getMenuBarVisibility)(this.configurationService)==="hidden"}onDidChangeRecentlyOpened(){this.menubarHidden||this.workspacesService.getRecentlyOpened().then(x=>{this.recentlyOpened=x,this.updateMenubar()})}createOpenRecentMenuAction(x){let H,W,U,$;const q=x.remoteAuthority;(0,i.isRecentFolder)(x)?(W=x.folderUri,H=x.label||this.labelService.getWorkspaceLabel(W,{verbose:!0}),U="openRecentFolder",$={folderUri:W}):(0,i.isRecentWorkspace)(x)?(W=x.workspace.configPath,H=x.label||this.labelService.getWorkspaceLabel(x.workspace,{verbose:!0}),U="openRecentWorkspace",$={workspaceUri:W}):(W=x.fileUri,H=x.label||this.labelService.getUriLabel(W),U="openRecentFile",$={fileUri:W});const X=new E.Action(U,(0,m.unmnemonicLabel)(H),void 0,void 0,G=>{const Q=G,j=G&&(!S.isMacintosh&&(Q.ctrlKey||Q.shiftKey)||S.isMacintosh&&(Q.metaKey||Q.altKey));return this.hostService.openWindow([$],{forceNewWindow:!!j,remoteAuthority:q||null})});return Object.assign(X,{uri:W,remoteAuthority:q})}notifyUserOfCustomMenubarAccessibility(){if(S.isWeb||S.isMacintosh)return;const x=this.storageService.getBoolean("menubar/accessibleMenubarNotified",-1,!1),H=(0,A.getTitleBarStyle)(this.configurationService)==="custom";if(x||H||!this.accessibilityService.isScreenReaderOptimized())return;const W=(0,t.localize)(8,null);this.notificationService.prompt(n.Severity.Info,W,[{label:(0,t.localize)(9,null),run:()=>this.preferencesService.openUserSettings({query:"window.titleBarStyle"})}]),this.storageService.store("menubar/accessibleMenubarNotified",!0,-1,0)}}e.MenubarControl=B,B.MAX_MENU_RECENT_ENTRIES=10;let V=class extends B{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se){super(x,H,W,U,$,q,X,G,Q,j,K,Y,oe,se),this.themeService=ee,this.layoutService=ie,this.telemetryService=re,this.alwaysOnMnemonics=!1,this.focusInsideMenubar=!1,this.pendingFirstTimeUpdate=!1,this.visible=!0,this.webNavigationMenu=this._register(this.menuService.createMenu(p.MenuId.MenubarHomeMenu,this.contextKeyService)),this.reinstallDisposables=this._register(new u.DisposableStore),this._onVisibilityChange=this._register(new r.Emitter),this._onFocusStateChange=this._register(new r.Emitter),this.actionRunner=this._register(new E.ActionRunner),this.actionRunner.onDidRun(te=>{this.telemetryService.publicLog2("workbenchActionExecuted",{id:te.action.id,from:"menu"})}),this.workspacesService.getRecentlyOpened().then(te=>{this.recentlyOpened=te}),this.registerListeners(),this.registerActions(),(0,R.registerThemingParticipant)((te,Z)=>{const ne=te.getColor(c.TITLE_BAR_ACTIVE_FOREGROUND);ne&&Z.addRule(` .monaco-workbench .menubar > .menubar-menu-button, .monaco-workbench .menubar .toolbar-toggle-more { color: ${ne}; } `);const ce=te.getColor(c.ACTIVITY_BAR_INACTIVE_FOREGROUND);ce&&Z.addRule(` .monaco-workbench .activitybar .menubar.compact > .menubar-menu-button, .monaco-workbench .activitybar .menubar.compact .toolbar-toggle-more { color: ${ce}; } `);const de=te.getColor(c.ACTIVITY_BAR_FOREGROUND);de&&Z.addRule(` .monaco-workbench .activitybar .menubar.compact > .menubar-menu-button.open, .monaco-workbench .activitybar .menubar.compact > .menubar-menu-button:focus, .monaco-workbench .activitybar .menubar.compact:not(:focus-within) > .menubar-menu-button:hover, .monaco-workbench .activitybar .menubar.compact > .menubar-menu-button.open .toolbar-toggle-more, .monaco-workbench .activitybar .menubar.compact > .menubar-menu-button:focus .toolbar-toggle-more, .monaco-workbench .activitybar .menubar.compact:not(:focus-within) > .menubar-menu-button:hover .toolbar-toggle-more { color: ${de}; } `);const he=te.getColor(c.TITLE_BAR_INACTIVE_FOREGROUND);he&&Z.addRule(` .monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button, .monaco-workbench .menubar.inactive:not(.compact) > .menubar-menu-button .toolbar-toggle-more { color: ${he}; } `);const pe=te.getColor(c.MENUBAR_SELECTION_FOREGROUND);pe&&Z.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: ${pe}; } `);const me=te.getColor(c.MENUBAR_SELECTION_BACKGROUND);me&&Z.addRule(` .monaco-workbench .menubar:not(.compact) > .menubar-menu-button.open .menubar-menu-title, .monaco-workbench .menubar:not(.compact) > .menubar-menu-button:focus .menubar-menu-title, .monaco-workbench .menubar:not(:focus-within):not(.compact) > .menubar-menu-button:hover .menubar-menu-title { background-color: ${me}; } `);const Se=te.getColor(c.MENUBAR_SELECTION_BORDER);Se&&Z.addRule(` .monaco-workbench .menubar > .menubar-menu-button:hover .menubar-menu-title { outline: dashed 1px; } .monaco-workbench .menubar > .menubar-menu-button.open .menubar-menu-title, .monaco-workbench .menubar > .menubar-menu-button:focus .menubar-menu-title { outline: solid 1px; } .monaco-workbench .menubar > .menubar-menu-button.open .menubar-menu-title, .monaco-workbench .menubar > .menubar-menu-button:focus .menubar-menu-title, .monaco-workbench .menubar > .menubar-menu-button:hover .menubar-menu-title { outline-color: ${Se}; outline-offset: -1px; } `)})}doUpdateMenubar(x){this.focusInsideMenubar||this.setupCustomMenubar(x),x&&(this.pendingFirstTimeUpdate=!0)}registerActions(){const x=this;S.isWeb&&this._register((0,p.registerAction2)(class extends p.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:L.IsWebContext},f1:!0})}async run(){x.menubar?.toggleFocus()}}))}getUpdateAction(){switch(this.updateService.state.type){case"uninitialized":return null;case"idle":return new E.Action("update.check",(0,t.localize)(11,null),void 0,!0,()=>this.updateService.checkForUpdates(!0));case"checking for updates":return new E.Action("update.checking",(0,t.localize)(12,null),void 0,!1);case"available for download":return new E.Action("update.downloadNow",(0,t.localize)(13,null),void 0,!0,()=>this.updateService.downloadUpdate());case"downloading":return new E.Action("update.downloading",(0,t.localize)(14,null),void 0,!1);case"downloaded":return new E.Action("update.install",(0,t.localize)(15,null),void 0,!0,()=>this.updateService.applyUpdate());case"updating":return new E.Action("update.updating",(0,t.localize)(16,null),void 0,!1);case"ready":return new E.Action("update.restart",(0,t.localize)(17,null),void 0,!0,()=>this.updateService.quitAndInstall())}}get currentMenubarVisibility(){return(0,A.getMenuBarVisibility)(this.configurationService)}get currentDisableMenuBarAltFocus(){const x=this.configurationService.getValue("window.customMenuBarAltFocus");let H=!1;return typeof x=="boolean"&&(H=!x),H}insertActionsBefore(x,H){switch(x.id){case N.OpenRecentAction.ID:H.push(...this.getOpenRecentActions());break;case"workbench.action.showAboutDialog":if(!S.isMacintosh&&!S.isWeb){const W=this.getUpdateAction();W&&(W.label=(0,m.mnemonicMenuLabel)(W.label),H.push(W),H.push(new E.Separator))}break;default:break}}get currentEnableMenuBarMnemonics(){let x=this.configurationService.getValue("window.enableMenuBarMnemonics");return typeof x!="boolean"&&(x=!0),x&&(!S.isWeb||(0,y.isFullscreen)())}get currentCompactMenuMode(){return this.currentMenubarVisibility!=="compact"?void 0:this.configurationService.getValue("workbench.sideBar.location")==="right"?h.Direction.Left:h.Direction.Right}onDidVisibilityChange(x){this.visible=x,this.onDidChangeRecentlyOpened(),this._onVisibilityChange.fire(x)}setupCustomMenubar(x){if(!this.container)return;x?(this.menubar&&this.reinstallDisposables.clear(),this.menubar=this.reinstallDisposables.add(new g.MenuBar(this.container,this.getMenuBarOptions())),this.accessibilityService.alwaysUnderlineAccessKeys().then(W=>{this.alwaysOnMnemonics=W,this.menubar?.update(this.getMenuBarOptions())}),this.reinstallDisposables.add(this.menubar.onFocusStateChange(W=>{this._onFocusStateChange.fire(W),W||(this.pendingFirstTimeUpdate?(this.setupCustomMenubar(!0),this.pendingFirstTimeUpdate=!1):this.updateMenubar(),this.focusInsideMenubar=!1)})),this.reinstallDisposables.add(this.menubar.onVisibilityChange(W=>this.onDidVisibilityChange(W))),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,v.attachMenuStyler)(this.menubar,this.themeService)),this.menubar.isVisible&&this.onDidVisibilityChange(!0)):this.menubar?.update(this.getMenuBarOptions());const H=(W,U,$)=>{U.splice(0);const q=W.getActions();for(const X of q){const[,G]=X;for(const Q of G){this.insertActionsBefore(Q,U);let j=typeof Q.item.title=="string"?Q.item.title:Q.item.title.mnemonicTitle??Q.item.title.value;if(Q instanceof p.SubmenuItemAction){let K=this.menus[Q.item.submenu.id];K||(K=this.mainMenuDisposables.add(this.menus[Q.item.submenu.id]=this.menuService.createMenu(Q.item.submenu,this.contextKeyService)),this.mainMenuDisposables.add(K.onDidChange(()=>{if(!this.focusInsideMenubar){const ee=[];H(W,ee,$),this.menubar&&this.topLevelTitles[$]&&this.menubar.updateMenu({actions:ee,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[$])})}},this)));const Y=[];H(K,Y,$),Y.length>0&&U.push(new E.SubmenuAction(Q.id,(0,m.mnemonicMenuLabel)(j),Y))}else{(0,P.isICommandActionToggleInfo)(Q.item.toggled)&&(j=Q.item.toggled.mnemonicTitle??Q.item.toggled.title??j);const K=new E.Action(Q.id,(0,m.mnemonicMenuLabel)(j),Q.class,Q.enabled,()=>this.commandService.executeCommand(Q.id));K.tooltip=Q.tooltip,K.checked=Q.checked,U.push(K)}}U.push(new E.Separator)}if(W===this.menus.File&&this.currentCompactMenuMode===void 0){const X=this.getWebNavigationActions();X.length&&(U.push(...X),U.push(new E.Separator))}U.pop()};for(const W of Object.keys(this.topLevelTitles)){const U=this.menus[W];x&&U&&(this.reinstallDisposables.add(U.onDidChange(()=>{if(!this.focusInsideMenubar){const q=[];H(U,q,W),this.menubar?.updateMenu({actions:q,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[W])})}})),U===this.menus.File&&this.reinstallDisposables.add(this.webNavigationMenu.onDidChange(()=>{if(!this.focusInsideMenubar){const q=[];H(U,q,W),this.menubar?.updateMenu({actions:q,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[W])})}})));const $=[];U&&H(U,$,W),this.menubar&&(x?this.menubar.push({actions:$,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[W])}):this.menubar.updateMenu({actions:$,label:(0,m.mnemonicMenuLabel)(this.topLevelTitles[W])}))}}getWebNavigationActions(){if(!S.isWeb)return[];const x=[];for(const H of this.webNavigationMenu.getActions()){const[,W]=H;for(const U of W)if(U instanceof p.MenuItemAction){const $=typeof U.item.title=="string"?U.item.title:U.item.title.mnemonicTitle??U.item.title.value;x.push(new E.Action(U.id,(0,m.mnemonicMenuLabel)($),U.class,U.enabled,async q=>{this.commandService.executeCommand(U.id,q)}))}x.push(new E.Separator)}return x.length&&x.pop(),x}getMenuBarOptions(){return{enableMnemonics:this.currentEnableMenuBarMnemonics,disableAltFocus:this.currentDisableMenuBarAltFocus,visibility:this.currentMenubarVisibility,actionRunner:this.actionRunner,getKeybinding:x=>this.keybindingService.lookupKeybinding(x.id),alwaysOnMnemonics:this.alwaysOnMnemonics,compactMode:this.currentCompactMenuMode,getCompactMenuActions:()=>S.isWeb?this.getWebNavigationActions():[]}}onDidChangeWindowFocus(x){!this.visible||(super.onDidChangeWindowFocus(x),this.container&&(x?this.container.classList.remove("inactive"):(this.container.classList.add("inactive"),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&&!(S.isIOS&&_.BrowserFeatures.pointerEvents)&&this.menubar.blur()})),S.isWeb&&(this._register(this.layoutService.onDidChangeFullscreen(x=>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(x){return this.container=x,this.container&&this.doUpdateMenubar(!0),this.container}layout(x){this.menubar?.update(this.getMenuBarOptions())}toggleFocus(){this.menubar?.toggleFocus()}};V=we([F(0,p.IMenuService),F(1,i.IWorkspacesService),F(2,k.IContextKeyService),F(3,b.IKeybindingService),F(4,C.IConfigurationService),F(5,l.ILabelService),F(6,s.IUpdateService),F(7,d.IStorageService),F(8,n.INotificationService),F(9,a.IPreferencesService),F(10,o.IWorkbenchEnvironmentService),F(11,w.IAccessibilityService),F(12,R.IThemeService),F(13,D.IWorkbenchLayoutService),F(14,O.ITelemetryService),F(15,T.IHostService),F(16,M.ICommandService)],V),e.CustomMenubarControl=V}),define(ae[2676],le([1,0,1519,380,86,243,37,139,8,2,248,12,80,14,65,10,679,5,6,23,83,84,15,7,74,29,63,2476,2278,179,70,245,1122]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitlebarPart=void 0;let L=class zs extends p.Part{get minimumHeight(){return(this.isCommandCenterVisible||u.isWeb&&(0,R.isWCOVisible)()?35:30)/(this.useCounterZoom?(0,R.getZoomFactor)():1)}get maximumHeight(){return this.minimumHeight}constructor(N,P,B,V,z,x,H,W,U,$){super("workbench.parts.titlebar",{hasTitle:!1},z,x,H),this.contextMenuService=N,this.configurationService=P,this.environmentService=B,this.instantiationService=V,this.contextKeyService=W,this.hostService=U,this.minimumWidth=0,this.maximumWidth=Number.POSITIVE_INFINITY,this._onMenubarVisibilityChange=this._register(new s.Emitter),this.onMenubarVisibilityChange=this._onMenubarVisibilityChange.event,this._onDidChangeCommandCenterVisibility=new s.Emitter,this.onDidChangeCommandCenterVisibility=this._onDidChangeCommandCenterVisibility.event,this.titleDisposables=this._register(new b.DisposableStore),this.isInactive=!1,this.windowTitle=this._register(V.createInstance(w.WindowTitle)),this.titleBarStyle=(0,A.getTitleBarStyle)(this.configurationService),this.hoverDelegate=new class{constructor(){this._lastHoverHideTime=0,this.showHover=$.showHover.bind($),this.placement="element"}get delay(){return Date.now()-this._lastHoverHideTime<200?0:P.getValue("workbench.hover.delay")}onDidHideHover(){this._lastHoverHideTime=Date.now()}},this.registerListeners()}updateProperties(N){this.windowTitle.updateProperties(N)}get isCommandCenterVisible(){return this.configurationService.getValue(zs.configCommandCenter)}registerListeners(){this._register(this.hostService.onDidChangeFocus(N=>N?this.onFocus():this.onBlur())),this._register(this.configurationService.onDidChangeConfiguration(N=>this.onConfigurationChanged(N)))}onBlur(){this.isInactive=!0,this.updateStyles()}onFocus(){this.isInactive=!1,this.updateStyles()}onConfigurationChanged(N){this.titleBarStyle!=="native"&&(!u.isMacintosh||u.isWeb)&&N.affectsConfiguration("window.menuBarVisibility")&&(this.currentMenubarVisibility==="compact"?this.uninstallMenubar():this.installMenubar()),this.titleBarStyle!=="native"&&this.layoutControls&&N.affectsConfiguration("workbench.layoutControl.enabled")&&(this.layoutControls.classList.toggle("show-layout-control",this.layoutControlEnabled),this._onDidChange.fire(void 0)),N.affectsConfiguration(zs.configCommandCenter)&&(this.updateTitle(),this.adjustTitleMarginToCenter(),this._onDidChangeCommandCenterVisibility.fire())}onMenubarVisibilityChanged(N){(u.isWeb||u.isWindows||u.isLinux)&&(this.lastLayoutDimensions&&this.layout(this.lastLayoutDimensions.width,this.lastLayoutDimensions.height),this._onMenubarVisibilityChange.fire(N))}uninstallMenubar(){this.customMenubar&&(this.customMenubar.dispose(),this.customMenubar=void 0),this.menubar&&(this.menubar.remove(),this.menubar=void 0),this.onMenubarVisibilityChanged(!1)}installMenubar(){this.menubar||(this.customMenubar=this._register(this.instantiationService.createInstance(c.CustomMenubarControl)),this.menubar=this.rootContainer.insertBefore((0,f.$)("div.menubar"),this.title),this.menubar.setAttribute("role","menubar"),this._register(this.customMenubar.onVisibilityChange(N=>this.onMenubarVisibilityChanged(N))),this.customMenubar.create(this.menubar))}updateTitle(){if(this.titleDisposables.clear(),!this.isCommandCenterVisible)this.title.innerText=this.windowTitle.value,this.titleDisposables.add(this.windowTitle.onDidChange(()=>{this.title.innerText=this.windowTitle.value,this.adjustTitleMarginToCenter()}));else{const N=this.instantiationService.createInstance(D.CommandCenterControl,this.windowTitle,this.hoverDelegate);(0,f.reset)(this.title,N.element),this.titleDisposables.add(N),this.titleDisposables.add(N.onDidChangeVisibility(this.adjustTitleMarginToCenter,this))}}createContentArea(N){if(this.element=N,this.rootContainer=(0,f.append)(N,(0,f.$)(".titlebar-container")),this.dragRegion=(0,f.prepend)(this.rootContainer,(0,f.$)("div.titlebar-drag-region")),(!u.isMacintosh||u.isWeb)&&(this.appIcon=(0,f.prepend)(this.rootContainer,(0,f.$)("a.window-appicon")),u.isWeb)){const B=this.environmentService.options?.homeIndicator;if(B){const V=(0,m.getIconRegistry)().getIcon(B.icon)?{id:B.icon}:v.Codicon.code;this.appIcon.setAttribute("href",B.href),this.appIcon.classList.add(...C.ThemeIcon.asClassNameArray(V)),this.appIconBadge=document.createElement("div"),this.appIconBadge.classList.add("home-bar-icon-badge"),this.appIcon.appendChild(this.appIconBadge)}}this.titleBarStyle!=="native"&&(!u.isMacintosh||u.isWeb)&&this.currentMenubarVisibility!=="compact"&&this.installMenubar(),this.title=(0,f.append)(this.rootContainer,(0,f.$)("div.window-title")),this.updateTitle(),this.titleBarStyle!=="native"&&(this.layoutControls=(0,f.append)(this.rootContainer,(0,f.$)("div.layout-controls-container")),this.layoutControls.classList.toggle("show-layout-control",this.layoutControlEnabled),this.layoutToolbar=this.instantiationService.createInstance(_.MenuWorkbenchToolBar,this.layoutControls,o.MenuId.LayoutControlMenu,{contextMenu:o.MenuId.TitleBarContext,toolbarOptions:{primaryGroup:()=>!0},actionViewItemProvider:B=>(0,a.createActionViewItem)(this.instantiationService,B,{hoverDelegate:this.hoverDelegate})})),this.windowControls=(0,f.append)(this.element,(0,f.$)("div.window-controls-container")),[f.EventType.CONTEXT_MENU,f.EventType.MOUSE_DOWN].forEach(B=>{this._register((0,f.addDisposableListener)(this.rootContainer,B,V=>{(V.type===f.EventType.CONTEXT_MENU||V.metaKey)&&(f.EventHelper.stop(V),this.onContextMenu(V,V.target===this.title?o.MenuId.TitleBarTitleContext:o.MenuId.TitleBarContext))}))}),this._register((0,f.addDisposableListener)(this.element,f.EventType.MOUSE_DOWN,B=>{if(B.target&&this.menubar&&(0,f.isAncestor)(B.target,this.menubar)||B.target&&this.layoutToolbar&&(0,f.isAncestor)(B.target,this.layoutToolbar.getElement())||B.target&&(0,f.isAncestor)(B.target,this.title))return;const V=document.activeElement;setTimeout(()=>{V instanceof HTMLElement&&V.focus()},0)},!0)),this.updateStyles();const P=this;return(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:"workbench.action.focusTitleBar",title:{value:(0,t.localize)(0,null),original:"Focus Title Bar"},category:T.Categories.View,f1:!0})}run(V,...z){P.customMenubar?P.customMenubar.toggleFocus():P.element.querySelector('[tabindex]:not([tabindex="-1"])').focus()}}),this.element}updateStyles(){if(super.updateStyles(),this.element){this.isInactive?this.element.classList.add("inactive"):this.element.classList.remove("inactive");const N=this.getColor(this.isInactive?r.TITLE_BAR_INACTIVE_BACKGROUND:r.TITLE_BAR_ACTIVE_BACKGROUND,(V,z)=>V.isOpaque()?V:V.makeOpaque((0,r.WORKBENCH_BACKGROUND)(z)))||"";this.element.style.backgroundColor=N,this.appIconBadge&&(this.appIconBadge.style.backgroundColor=N),N&&i.Color.fromHex(N).isLighter()?this.element.classList.add("light"):this.element.classList.remove("light");const P=this.getColor(this.isInactive?r.TITLE_BAR_INACTIVE_FOREGROUND:r.TITLE_BAR_ACTIVE_FOREGROUND);this.element.style.color=P||"";const B=this.getColor(r.TITLE_BAR_BORDER);this.element.style.borderBottom=B?`1px solid ${B}`:""}}onContextMenu(N,P){const B=new E.StandardMouseEvent(N),V={x:B.posx,y:B.posy};this.contextMenuService.showContextMenu({getAnchor:()=>V,menuId:P,contextKeyService:this.contextKeyService,domForShadowRoot:u.isMacintosh&&u.isNative?B.target:void 0})}adjustTitleMarginToCenter(){const N=u.isMacintosh?this.windowControls?.clientWidth??0:0,P=N+(this.appIcon?.clientWidth??0)+(this.menubar?.clientWidth??0)+10,B=N+this.rootContainer.clientWidth-(this.layoutControls?.clientWidth??0)-10;if(P>(this.rootContainer.clientWidth+(this.windowControls?.clientWidth??0)-this.title.clientWidth)/2||B<(this.rootContainer.clientWidth+(this.windowControls?.clientWidth??0)+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=`calc(50% - ${this.title.clientWidth/2}px)`}get currentMenubarVisibility(){return(0,A.getMenuBarVisibility)(this.configurationService)}get layoutControlEnabled(){return this.configurationService.getValue("workbench.layoutControl.enabled")}get useCounterZoom(){const N=(0,R.getZoomFactor)(),P=this.currentMenubarVisibility==="hidden"||!u.isWeb&&u.isMacintosh,B=!this.isCommandCenterVisible,V=!this.layoutControlEnabled;return N<1||P&&B&&V}updateLayout(N){if(this.lastLayoutDimensions=N,(0,A.getTitleBarStyle)(this.configurationService)==="custom"){const P=(0,R.getZoomFactor)();if(this.element.style.setProperty("--zoom-factor",P.toString()),this.rootContainer.classList.toggle("counter-zoom",this.useCounterZoom),this.customMenubar){const B=new f.Dimension(0,N.height);this.customMenubar.layout(B)}(0,f.runAtThisOrScheduleAtNextAnimationFrame)(()=>this.adjustTitleMarginToCenter())}}layout(N,P){this.updateLayout(new f.Dimension(N,P)),super.layoutContents(N,P)}toJSON(){return{type:"workbench.parts.titlebar"}}};L.configCommandCenter="window.commandCenter",L=we([F(0,k.IContextMenuService),F(1,I.IConfigurationService),F(2,S.IBrowserWorkbenchEnvironmentService),F(3,l.IInstantiationService),F(4,C.IThemeService),F(5,d.IStorageService),F(6,n.IWorkbenchLayoutService),F(7,g.IContextKeyService),F(8,h.IHostService),F(9,y.IHoverService)],L),e.TitlebarPart=L,(0,C.registerThemingParticipant)((O,N)=>{const P=O.getColor(r.TITLE_BAR_ACTIVE_FOREGROUND);P&&N.addRule(` .monaco-workbench .part.titlebar .window-controls-container .window-icon { color: ${P}; } `);const B=O.getColor(r.TITLE_BAR_INACTIVE_FOREGROUND);B&&N.addRule(` .monaco-workbench .part.titlebar.inactive .window-controls-container .window-icon { color: ${B}; } `)});class M extends o.Action2{constructor(N,P,B){super({id:`toggle.${N}`,title:P,toggled:g.ContextKeyExpr.equals(`config.${N}`,!0),menu:{id:o.MenuId.TitleBarContext,order:B}}),this.section=N}run(N,...P){const B=N.get(I.IConfigurationService),V=B.getValue(this.section);B.updateValue(this.section,!V)}}(0,o.registerAction2)(class extends M{constructor(){super("window.commandCenter",(0,t.localize)(1,null),1)}}),(0,o.registerAction2)(class extends M{constructor(){super("workbench.layoutControl.enabled",(0,t.localize)(2,null),2)}})}),define(ae[2677],le([1,0,29,1540,111,15,48,284,106]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowAudioCueHelp=void 0;class b extends A.Action2{constructor(){super({id:b.ID,title:{value:(0,p.localize)(0,null),original:"Help: List Audio Cues"},f1:!0})}async run(C){const r=C.get(E.IAudioCueService),u=C.get(k.IQuickInputService),i=C.get(I.IPreferencesService),f=C.get(R.IAccessibilityService),c=E.AudioCue.allAudioCues.map((s,d)=>({label:f.isScreenReaderOptimized()?`${s.name}${r.isEnabled(s).get()?"":" ("+(0,p.localize)(1,null)+")"}`:`${r.isEnabled(s).get()?"$(check)":" "} ${s.name}`,audioCue:s,buttons:[{iconClass:t.Codicon.settingsGear.classNames,tooltip:(0,p.localize)(2,null)}]}));await u.pick(c,{activeItem:c[0],onDidFocus:s=>{r.playSound(s.audioCue.sound)},onDidTriggerItemButton:s=>{i.openSettings({query:s.item.audioCue.settingsKey})},placeHolder:(0,p.localize)(3,null)})}}e.ShowAudioCueHelp=b,b.ID="audioCues.help"}),define(ae[2678],le([1,0,1539,15,55,35,17,44,2299,2448,284,2677]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,A.registerSingleton)(S.IAudioCueService,S.AudioCueService,1),k.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(b.AudioCueLineFeatureContribution,3),k.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(I.AudioCueLineDebuggerContribution,3);const r={type:"string",enum:["auto","on","off"],default:"auto",enumDescriptions:[(0,t.localize)(0,null),(0,t.localize)(1,null),(0,t.localize)(2,null)],tags:["accessibility"]};k.Registry.as(R.Extensions.Configuration).registerConfiguration({properties:{"audioCues.enabled":{markdownDeprecationMessage:"Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`).",tags:["accessibility"]},"audioCues.volume":{description:(0,t.localize)(3,null),type:"number",minimum:0,maximum:100,default:70,tags:["accessibility"]},"audioCues.lineHasBreakpoint":{description:(0,t.localize)(4,null),...r},"audioCues.lineHasInlineSuggestion":{description:(0,t.localize)(5,null),...r},"audioCues.lineHasError":{description:(0,t.localize)(6,null),...r},"audioCues.lineHasFoldedArea":{description:(0,t.localize)(7,null),...r},"audioCues.lineHasWarning":{description:(0,t.localize)(8,null),...r,default:"off"},"audioCues.onDebugBreak":{description:(0,t.localize)(9,null),...r},"audioCues.noInlayHints":{description:(0,t.localize)(10,null),...r},"audioCues.taskCompleted":{description:(0,t.localize)(11,null),...r},"audioCues.taskFailed":{description:(0,t.localize)(12,null),...r},"audioCues.terminalQuickFix":{description:(0,t.localize)(13,null),...r}}}),(0,p.registerAction2)(C.ShowAudioCueHelp)}),define(ae[549],le([1,0,16,88,2,158,14,9,92,1679,8,5,25,41,48,525,901,106]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalUriOpenerService=e.IExternalUriOpenerService=void 0,e.IExternalUriOpenerService=(0,C.createDecorator)("externalUriOpenerService");let s=class extends R.Disposable{constructor(n,a,o,g,h){super(),this.configurationService=a,this.logService=o,this.preferencesService=g,this.quickInputService=h,this._providers=new A.LinkedList,this._register(n.registerExternalOpener(this))}registerExternalOpenerProvider(n){return{dispose:this._providers.push(n)}}async getOpeners(n,a,o,g){const h=await this.getAllOpenersForUri(n);if(h.size===0)return[];if(o.preferredOpenerId){if(o.preferredOpenerId===f.defaultExternalUriOpenerId)return[];const D=h.get(o.preferredOpenerId);if(D)return[D]}const v=this.getConfiguredOpenerForUri(h,n);if(v)return v===f.defaultExternalUriOpenerId?[]:[v];const m=[];if(await Promise.all(Array.from(h.values()).map(async D=>{let y;try{y=await D.canOpen(o.sourceUri,g)}catch(T){this.logService.error(T);return}switch(y){case I.ExternalUriOpenerPriority.Option:case I.ExternalUriOpenerPriority.Default:case I.ExternalUriOpenerPriority.Preferred:m.push({opener:D,priority:y});break}})),m.length===0)return[];const w=(0,t.firstOrDefault)(m.filter(D=>D.priority===I.ExternalUriOpenerPriority.Preferred));return w?[w.opener]:!a&&m.every(D=>D.priority===I.ExternalUriOpenerPriority.Option)?[]:m.map(D=>D.opener)}async openExternal(n,a,o){const g=typeof n=="string"?E.URI.parse(n):n,h=await this.getOpeners(g,!1,a,o);return h.length===0?!1:h.length===1?h[0].openExternalUri(g,a,o):this.showOpenerPrompt(h,g,a,o)}async getOpener(n,a,o){const g=await this.getOpeners(n,!0,a,o);if(g.length>=1)return g[0]}async getAllOpenersForUri(n){const a=new Map;return await Promise.all(p.Iterable.map(this._providers,async o=>{for await(const g of o.getOpeners(n))a.set(g.id,g)})),a}getConfiguredOpenerForUri(n,a){const o=this.configurationService.getValue(f.externalUriOpenersSettingId)||{};for(const[g,h]of Object.entries(o))if((0,c.testUrlMatchesGlob)(a,g)){if(h===f.defaultExternalUriOpenerId)return"default";const v=n.get(h);if(v)return v}}async showOpenerPrompt(n,a,o,g){const h=n.map(m=>({label:m.label,opener:m}));h.push({label:k.isWeb?b.localize(0,null):b.localize(1,null),opener:void 0},{type:"separator"},{label:b.localize(2,null),opener:"configureDefault"});const v=await this.quickInputService.pick(h,{placeHolder:b.localize(3,null,a.toString())});return v?typeof v.opener>"u"?!1:v.opener==="configureDefault"?(await this.preferencesService.openUserSettings({jsonEditor:!0,revealSetting:{key:f.externalUriOpenersSettingId,edit:!0}}),!0):v.opener.openExternalUri(a,o,g):!0}};s=we([F(0,u.IOpenerService),F(1,S.IConfigurationService),F(2,r.ILogService),F(3,l.IPreferencesService),F(4,i.IQuickInputService)],s),e.ExternalUriOpenerService=s}),define(ae[2679],le([1,0,36,21,2,22,1457,26,41,23,67,525,2500,549,39,77]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadUriOpeners=void 0;let c=class extends R.Disposable{constructor(s,d,n,a,o,g){super(),this.extensionService=a,this.openerService=o,this.notificationService=g,this._registeredOpeners=new Map,this.proxy=s.getProxy(S.ExtHostContext.ExtHostUriOpeners),this._register(n.registerExternalOpenerProvider(this)),this._contributedExternalUriOpenersStore=this._register(new r.ContributedExternalUriOpenersStore(d,a))}async*getOpeners(s){if(!(s.scheme!==A.Schemas.http&&s.scheme!==A.Schemas.https)){await this.extensionService.activateByEvent(`onOpenExternalUri:${s.scheme}`);for(const[d,n]of this._registeredOpeners)n.schemes.has(s.scheme)&&(yield this.createOpener(d,n))}}createOpener(s,d){return{id:s,label:d.label,canOpen:(n,a)=>this.proxy.$canOpenUri(s,n,a),openExternalUri:async(n,a,o)=>{try{await this.proxy.$openUri(s,{resolvedUri:n,sourceUri:a.sourceUri},o)}catch(g){if(!(0,p.isCancellationError)(g)){const h=new t.Action("default",(0,k.localize)(0,null),void 0,void 0,async()=>{await this.openerService.open(n,{allowTunneling:!1,allowContributedOpeners:C.defaultExternalUriOpenerId})});h.tooltip=n.toString(),this.notificationService.notify({severity:E.Severity.Error,message:(0,k.localize)(1,null,s,g.toString()),actions:{primary:[h]}})}}return!0}}}async $registerUriOpener(s,d,n,a){if(this._registeredOpeners.has(s))throw new Error(`Opener with id '${s}' already registered`);this._registeredOpeners.set(s,{schemes:new Set(d),label:a,extensionId:n}),this._contributedExternalUriOpenersStore.didRegisterOpener(s,n.value)}async $unregisterUriOpener(s){this._registeredOpeners.delete(s),this._contributedExternalUriOpenersStore.delete(s)}dispose(){super.dispose(),this._registeredOpeners.clear()}};c=we([(0,f.extHostNamedCustomer)(S.MainContext.MainThreadUriOpeners),F(1,b.IStorageService),F(2,u.IExternalUriOpenerService),F(3,i.IExtensionService),F(4,I.IOpenerService),F(5,E.INotificationService)],c),e.MainThreadUriOpeners=c}),define(ae[2680],le([1,0,55,35,17,525,549]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSingleton)(k.IExternalUriOpenerService,k.ExternalUriOpenerService,1),R.Registry.as(t.Extensions.Configuration).registerConfiguration(A.externalUriOpenersConfigurationNode)}),define(ae[2681],le([1,0,29,9,1768,15,31,7,48,178,101,267,64,152,142,24,106]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.notebook.layout.select",title:{value:(0,R.localize)(0,null),original:"Select between Notebook Layouts"},f1:!0,precondition:E.ContextKeyExpr.equals(`config.${r.NotebookSetting.openGettingStarted}`,!0),category:b.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:A.MenuId.EditorTitle,group:"notebookLayout",when:E.ContextKeyExpr.and(u.NOTEBOOK_IS_ACTIVE_EDITOR,E.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0),E.ContextKeyExpr.equals(`config.${r.NotebookSetting.openGettingStarted}`,!0)),order:0},{id:A.MenuId.NotebookToolbar,group:"notebookLayout",when:E.ContextKeyExpr.and(E.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),E.ContextKeyExpr.equals(`config.${r.NotebookSetting.openGettingStarted}`,!0)),order:0}]})}run(s){s.get(k.ICommandService).executeCommand("workbench.action.openWalkthrough",{category:"notebooks",step:"notebookProfile"},!0)}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.notebook.layout.configure",title:{value:(0,R.localize)(1,null),original:"Customize Notebook Layout"},f1:!0,category:b.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:A.MenuId.NotebookToolbar,group:"notebookLayout",when:E.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),order:1}]})}run(s){s.get(c.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:notebookLayout"})}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.notebook.layout.configure.editorTitle",title:{value:(0,R.localize)(2,null),original:"Customize Notebook Layout"},f1:!1,category:b.NOTEBOOK_ACTIONS_CATEGORY,menu:[{id:A.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayout",when:u.NOTEBOOK_IS_ACTIVE_EDITOR,order:1}]})}run(s){s.get(c.IPreferencesService).openSettings({jsonEditor:!1,query:"@tag:notebookLayout"})}}),A.MenuRegistry.appendMenuItem(A.MenuId.EditorTitle,{submenu:A.MenuId.NotebookEditorLayoutConfigure,rememberDefaultAction:!1,title:{value:(0,R.localize)(3,null),original:"Customize Notebook..."},icon:t.Codicon.gear,group:"navigation",order:-1,when:u.NOTEBOOK_IS_ACTIVE_EDITOR}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"notebook.toggleLineNumbersFromEditorTitle",title:{value:(0,R.localize)(4,null),original:"Toggle Notebook Line Numbers"},precondition:u.NOTEBOOK_EDITOR_FOCUSED,menu:[{id:A.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:1,when:u.NOTEBOOK_IS_ACTIVE_EDITOR}],category:b.NOTEBOOK_ACTIONS_CATEGORY,f1:!0,toggled:{condition:E.ContextKeyExpr.notEquals("config.notebook.lineNumbers","off"),title:(0,R.localize)(5,null)}})}async run(s){return s.get(k.ICommandService).executeCommand("notebook.toggleLineNumbers")}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"notebook.toggleCellToolbarPositionFromEditorTitle",title:{value:(0,R.localize)(6,null),original:"Toggle Cell Toolbar Position"},menu:[{id:A.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:3}],category:b.NOTEBOOK_ACTIONS_CATEGORY,f1:!1})}async run(s,...d){return s.get(k.ICommandService).executeCommand("notebook.toggleCellToolbarPosition",...d)}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"breadcrumbs.toggleFromEditorTitle",title:{value:(0,R.localize)(7,null),original:"Toggle Breadcrumbs"},menu:[{id:A.MenuId.NotebookEditorLayoutConfigure,group:"notebookLayoutDetails",order:2}],f1:!1})}async run(s){return s.get(k.ICommandService).executeCommand("breadcrumbs.toggle")}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"notebook.saveMimeTypeOrder",title:{value:(0,R.localize)(8,null),original:"Save Mimetype Display Order"},f1:!0,category:b.NOTEBOOK_ACTIONS_CATEGORY,precondition:u.NOTEBOOK_IS_ACTIVE_EDITOR})}run(s){const d=s.get(i.INotebookService),n=s.get(I.IQuickInputService).createQuickPick();n.placeholder=(0,R.localize)(9,null),n.items=[{target:2,label:(0,R.localize)(10,null)},{target:5,label:(0,R.localize)(11,null)}],n.onDidAccept(()=>{const a=n.selectedItems[0]?.target;a!==void 0&&d.saveMimeDisplayOrder(a),n.dispose()}),n.onDidHide(()=>n.dispose()),n.show()}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.notebook.layout.webview.reset",title:{value:(0,R.localize)(12,null),original:"Reset Notebook Webview"},f1:!1,category:b.NOTEBOOK_ACTIONS_CATEGORY})}run(s,d){const n=s.get(f.IEditorService);if(d){const a=p.URI.revive(d),g=s.get(C.INotebookEditorService).listNotebookEditors().filter(h=>h.hasModel()&&h.textModel.uri.toString()===a.toString());for(const h of g)h.hasModel()&&h.getInnerWebview()?.reload()}else{const a=(0,S.getNotebookEditorFromEditorPane)(n.activeEditorPane);if(!a)return;a.getInnerWebview()?.reload()}}})}),define(ae[2682],le([1,0,36,9,199,54,42,1804,48,106]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigureLanguageBasedSettingsAction=void 0;let S=class extends t.Action{constructor(r,u,i,f,c,l){super(r,u),this.modelService=i,this.languageService=f,this.quickInputService=c,this.preferencesService=l}async run(){const u=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:i,languageId:f})=>{const c=E.localize(1,null,f);let l;const s=this.languageService.getExtensions(f);if(s.length)l=p.URI.file(s[0]);else{const d=this.languageService.getFilenames(f);d.length&&(l=p.URI.file(d[0]))}return{label:i,iconClasses:(0,R.getIconClasses)(this.modelService,this.languageService,l),description:c}});await this.quickInputService.pick(u,{placeHolder:E.localize(2,null)}).then(i=>{if(i){const f=this.languageService.getLanguageIdByLanguageName(i.label);if(typeof f=="string")return this.preferencesService.openLanguageSpecificSettings(f)}})}};S.ID="workbench.action.configureLanguageBasedSettings",S.LABEL={value:E.localize(0,null),original:"Configure Language Specific Settings..."},S=we([F(2,A.IModelService),F(3,k.ILanguageService),F(4,I.IQuickInputService),F(5,b.IPreferencesService)],S),e.ConfigureLanguageBasedSettingsAction=S}),define(ae[680],le([1,0,10,90,79,137,140,36,6,113,2,22,18,9,1807,265,372,7,37,5,38,49,33,73,12,34,80,340,51,106,42,269]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditPreferenceWidget=e.SearchWidget=e.SettingsTargetsWidget=e.FolderSettingsActionViewItem=void 0;let L=class extends A.BaseActionViewItem{constructor(B,V,z,x){super(null,B),this.contextService=V,this.contextMenuService=z,this.preferencesService=x,this._folderSettingCounts=new Map;const H=this.contextService.getWorkspace();this._folder=H.folders.length===1?H.folders[0]:null,this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.onWorkspaceFoldersChanged()))}get folder(){return this._folder}set folder(B){this._folder=B,this.update()}setCount(B,V){const z=this.contextService.getWorkspaceFolder(B);if(!z)throw new Error("unknown folder");const x=z.uri;this._folderSettingCounts.set(x.toString(),V),this.update()}render(B){this.element=B,this.container=B,this.labelElement=t.$(".action-title"),this.detailsElement=t.$(".action-details"),this.dropDownElement=t.$(".dropdown-icon.hide"+h.ThemeIcon.asCSSSelector(w.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,V=>t.EventHelper.stop(V))),this._register(t.addDisposableListener(this.anchorElement,t.EventType.CLICK,V=>this.onClick(V))),this._register(t.addDisposableListener(this.container,t.EventType.KEY_UP,V=>this.onKeyUp(V))),t.append(this.container,this.anchorElement),this.update()}onKeyUp(B){switch(new p.StandardKeyboardEvent(B).keyCode){case 3:case 10:this.onClick(B);return}}onClick(B){t.EventHelper.stop(B,!0),!this.folder||this._action.checked?this.showMenu():this._action.run(this._folder)}updateEnabled(){this.update()}updateChecked(){this.update()}onWorkspaceFoldersChanged(){const B=this._folder,V=this.contextService.getWorkspace();B&&(this._folder=V.folders.filter(z=>(0,r.isEqual)(z.uri,B.uri))[0]||V.folders[0]),this._folder=this._folder?this._folder:V.folders.length===1?V.folders[0]:null,this.update(),this._action.checked&&this._action.run(this._folder)}async update(){let B=0;this._folderSettingCounts.forEach(z=>B+=z);const V=this.contextService.getWorkspace();if(this._folder){this.labelElement.textContent=this._folder.name,this.anchorElement.title=(await this.preferencesService.getEditableSettingsURI(6,this._folder.uri))?.fsPath||"";const z=this.labelWithCount(this._action.label,B);this.detailsElement.textContent=z,this.dropDownElement.classList.toggle("hide",V.folders.length===1||!this._action.checked)}else{const z=this.labelWithCount(this._action.label,B);this.labelElement.textContent=z,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 B=[],V=this.contextService.getWorkspace().folders;return this.contextService.getWorkbenchState()===3&&V.length>0&&B.push(...V.map((z,x)=>{const H=this._folderSettingCounts.get(z.uri.toString());return{id:"folderSettingsTarget"+x,label:this.labelWithCount(z.name,H),checked:this.folder&&(0,r.isEqual)(this.folder.uri,z.uri),enabled:!0,run:()=>this._action.run(z)}})),B}labelWithCount(B,V){return V&&(B+=` (${V})`),B}};L=we([F(1,v.IWorkspaceContextService),F(2,s.IContextMenuService),F(3,y.IPreferencesService)],L),e.FolderSettingsActionViewItem=L;let M=class extends k.Widget{constructor(B,V,z,x,H,W,U,$,q){super(),this.contextService=z,this.instantiationService=x,this.environmentService=H,this.labelService=W,this.preferencesService=U,this.languageService=$,this._settingsTarget=null,this._onDidTargetChange=this._register(new I.Emitter),this.onDidTargetChange=this._onDidTargetChange.event,this.options=V??{},this.create(B),this._register(this.contextService.onDidChangeWorkbenchState(()=>this.onWorkbenchStateChanged())),this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.update())),this.inUserTab=_.CONTEXT_SETTINGS_EDITOR_IN_USER_TAB.bindTo(q)}resetLabels(){const B=this.environmentService.remoteAuthority,V=B&&this.labelService.getHostLabel(C.Schemas.vscodeRemote,B);this.userLocalSettings.label=(0,i.localize)(0,null),this.userRemoteSettings.label=(0,i.localize)(1,null)+(V?` [${V}]`:""),this.workspaceSettings.label=(0,i.localize)(2,null),this.folderSettingsAction.label=(0,i.localize)(3,null)}create(B){const V=t.append(B,t.$(".settings-tabs-widget"));this.settingsSwitcherBar=this._register(new R.ActionBar(V,{orientation:0,focusOnlyEnabledItems:!0,ariaLabel:(0,i.localize)(4,null),animated:!1,actionViewItemProvider:z=>z.id==="folderSettings"?this.folderSettings:void 0})),this.userLocalSettings=new E.Action("userSettings","",".settings-tab",!0,()=>this.updateTarget(3)),this.preferencesService.getEditableSettingsURI(3).then(z=>{this.userLocalSettings.tooltip=z?.fsPath??""}),this.userRemoteSettings=new E.Action("userSettingsRemote","",".settings-tab",!0,()=>this.updateTarget(4)),this.preferencesService.getEditableSettingsURI(4).then(z=>{this.userRemoteSettings.tooltip=z?.fsPath??""}),this.workspaceSettings=new E.Action("workspaceSettings","",".settings-tab",!1,()=>this.updateTarget(5)),this.folderSettingsAction=new E.Action("folderSettings","",".settings-tab",!1,async z=>{this.updateTarget((0,v.isWorkspaceFolder)(z)?z.uri:3)}),this.folderSettings=this.instantiationService.createInstance(L,this.folderSettingsAction),this.resetLabels(),this.update(),this.settingsSwitcherBar.push([this.userLocalSettings,this.userRemoteSettings,this.workspaceSettings,this.folderSettingsAction])}get settingsTarget(){return this._settingsTarget}set settingsTarget(B){this._settingsTarget=B,this.userLocalSettings.checked=this.settingsTarget===3,this.userRemoteSettings.checked=this.settingsTarget===4,this.workspaceSettings.checked=this.settingsTarget===5,this.settingsTarget instanceof u.URI?(this.folderSettings.action.checked=!0,this.folderSettings.folder=this.contextService.getWorkspaceFolder(this.settingsTarget)):this.folderSettings.action.checked=!1,this.inUserTab.set(this.userLocalSettings.checked)}setResultCount(B,V){if(B===5){let z=(0,i.localize)(5,null);V&&(z+=` (${V})`),this.workspaceSettings.label=z}else if(B===3){let z=(0,i.localize)(6,null);V&&(z+=` (${V})`),this.userLocalSettings.label=z}else B instanceof u.URI&&this.folderSettings.setCount(B,V)}updateLanguageFilterIndicators(B){if(this.resetLabels(),B){const V=this.languageService.getLanguageName(B);if(V){const z=` [${V}]`;this.userLocalSettings.label+=z,this.userRemoteSettings.label+=z,this.workspaceSettings.label+=z,this.folderSettingsAction.label+=z}}}onWorkbenchStateChanged(){this.folderSettings.folder=null,this.update(),this.settingsTarget===5&&this.contextService.getWorkbenchState()===3&&this.updateTarget(3)}updateTarget(B){return this.settingsTarget===B||B instanceof u.URI&&this.settingsTarget instanceof u.URI&&(0,r.isEqual)(this.settingsTarget,B)||(this.settingsTarget=B,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.action.enabled=this.contextService.getWorkbenchState()===3&&this.contextService.getWorkspace().folders.length>0,this.workspaceSettings.tooltip=(await this.preferencesService.getEditableSettingsURI(5))?.fsPath||""}};M=we([F(2,v.IWorkspaceContextService),F(3,d.IInstantiationService),F(4,D.IWorkbenchEnvironmentService),F(5,a.ILabelService),F(6,y.IPreferencesService),F(7,T.ILanguageService),F(8,l.IContextKeyService)],M),e.SettingsTargetsWidget=M;let O=class extends k.Widget{constructor(B,V,z,x,H,W,U){super(),this.options=V,this.contextViewService=z,this.instantiationService=x,this.themeService=H,this.contextKeyService=W,this.keybindingService=U,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(B)}create(B){this.domNode=t.append(B,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,g.attachStylerCallback)(this.themeService,{badgeBackground:o.badgeBackground,contrastBorder:o.contrastBorder},x=>{const H=x.badgeBackground?x.badgeBackground.toString():"",W=x.contrastBorder?x.contrastBorder.toString():"";this.countElement.style.backgroundColor=H,this.countElement.style.borderWidth=W?"1px":"",this.countElement.style.borderStyle=W?"solid":"",this.countElement.style.borderColor=W;const U=this.themeService.getColorTheme().getColor(o.badgeForeground);this.countElement.style.color=U?U.toString():""}))),this.inputBox.inputElement.setAttribute("aria-live",this.options.ariaLive||"off"),this.options.ariaLabelledBy&&this.inputBox.inputElement.setAttribute("aria-labelledBy",this.options.ariaLabelledBy);const V=this._register(t.trackFocus(this.inputBox.inputElement));this._register(V.onDidFocus(()=>this._onFocus.fire()));const z=this.options.focusKey;z&&(this._register(V.onDidFocus(()=>z.set(!0))),this._register(V.onDidBlur(()=>z.set(!1))))}createSearchContainer(B){this.searchContainer=B;const V=t.append(this.searchContainer,t.$("div.settings-search-input"));this.inputBox=this._register(this.createInputBox(V)),this._register(this.inputBox.onDidChange(z=>this._onDidChange.fire(z)))}createInputBox(B){const V=()=>(0,c.showHistoryKeybindingHint)(this.keybindingService),z=this._register(new f.ContextScopedHistoryInputBox(B,this.contextViewService,{...this.options,showHistoryHint:V},this.contextKeyService));return this._register((0,g.attachInputBoxStyler)(z,this.themeService)),z}showMessage(B){this.countElement&&B!==this.countElement.textContent&&(this.countElement.textContent=B,this.inputBox.inputElement.setAttribute("aria-label",B),this.inputBox.inputElement.style.paddingRight=this.getControlsWidth()+"px")}layout(B){B.width<400?(this.countElement?.classList.add("hide"),this.inputBox.inputElement.style.paddingRight="0px"):(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(B){return this.inputBox.value=B}dispose(){this.options.focusKey?.set(!1),super.dispose()}};O=we([F(2,s.IContextViewService),F(3,d.IInstantiationService),F(4,h.IThemeService),F(5,l.IContextKeyService),F(6,n.IKeybindingService)],O),e.SearchWidget=O;class N extends S.Disposable{constructor(B){super(),this.editor=B,this._line=-1,this._preferences=[],this._editPreferenceDecoration=this.editor.createDecorationsCollection(),this._onClick=this._register(new I.Emitter),this.onClick=this._onClick.event,this._register(this.editor.onMouseDown(V=>{V.target.type!==2||V.target.detail.isAfterLines||!this.isVisible()||this._onClick.fire(V)}))}get preferences(){return this._preferences}getLine(){return this._line}show(B,V,z){this._preferences=z;const x=[];this._line=B,x.push({options:{description:"edit-preference-widget-decoration",glyphMarginClassName:h.ThemeIcon.asClassName(w.settingsEditIcon),glyphMarginHoverMessage:new b.MarkdownString().appendText(V),stickiness:1},range:{startLineNumber:B,startColumn:1,endLineNumber:B,endColumn:1}}),this._editPreferenceDecoration.set(x)}hide(){this._editPreferenceDecoration.clear()}isVisible(){return this._editPreferenceDecoration.length>0}dispose(){this.hide(),super.dispose()}}e.EditPreferenceWidget=N,(0,h.registerThemingParticipant)((P,B)=>{B.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 V=P.getColor(m.PANEL_ACTIVE_TITLE_FOREGROUND),z=P.getColor(m.PANEL_ACTIVE_TITLE_BORDER);(V||z)&&B.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:hover, .settings-tabs-widget > .monaco-action-bar .action-item .action-label.checked { color: ${V}; border-bottom-color: ${z}; } `);const x=P.getColor(m.PANEL_INACTIVE_TITLE_FOREGROUND);x&&B.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label { color: ${x}; } `);const H=P.getColor(o.focusBorder);if(H&&(B.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus { border-bottom-color: ${H} !important; } `),B.addRule(` .settings-tabs-widget > .monaco-action-bar .action-item .action-label:focus { outline: none; } `)),P.getColor(o.activeContrastBorder)){const U=P.getColor(o.activeContrastBorder);B.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: ${U}; 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(ae[953],le([1,0,1800,14,2,6,368,140,10,110,90,121,38,37,5,73,12,33,680,13,11,7,1164]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefineKeybindingOverlayWidget=e.DefineKeybindingWidget=e.KeybindingsSearchWidget=void 0;let o=class extends s.SearchWidget{constructor(m,w,D,y,T,_,L){super(m,w,D,y,T,_,L),this.recordDisposables=this._register(new R.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,f.attachInputBoxStyler)(this.inputBox,T)),this._register((0,R.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,m=>this._onKeyDown(new S.StandardKeyboardEvent(m)))),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(m){this._inputValue=m,this.inputBox.value=this._inputValue}_reset(){this._firstPart=null,this._chordPart=null}_onKeyDown(m){if(m.preventDefault(),m.stopPropagation(),!this.options.recordEnter&&m.equals(3)){this._onEnter.fire();return}if(m.equals(9)){this._onEscape.fire();return}this.printKeybinding(m)}printKeybinding(m){const w=this.keybindingService.resolveKeyboardEvent(m),D=`code: ${m.browserEvent.code}, keyCode: ${m.browserEvent.keyCode}, key: ${m.browserEvent.key} => UI: ${w.getAriaLabel()}, user settings: ${w.getUserSettingsLabel()}, dispatch: ${w.getDispatchParts()[0]}`,y=this.options,T=this._firstPart&&this._firstPart.getDispatchParts()[0]!==null,_=this._chordPart&&this._chordPart.getDispatchParts()[0]!==null;T&&_?(this._firstPart=w,this._chordPart=null):T?this._chordPart=w:this._firstPart=w;let L="";this._firstPart&&(L=this._firstPart.getUserSettingsLabel()||""),this._chordPart&&(L=L+" "+this._chordPart.getUserSettingsLabel()),this.setInputValue(y.quoteRecordedKeys?`"${L}"`:L),this.inputBox.inputElement.title=D,this._onKeybinding.fire([this._firstPart,this._chordPart])}};o=we([F(2,u.IContextViewService),F(3,i.IInstantiationService),F(4,c.IThemeService),F(5,a.IContextKeyService),F(6,r.IKeybindingService)],o),e.KeybindingsSearchWidget=o;let g=class Kn extends E.Widget{constructor(m,w,D){super(),this.instantiationService=w,this.themeService=D,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 R.DisposableStore),this.keybindingLabelStylers=this.disposables.add(new R.DisposableStore),this._domNode=(0,C.createFastDomNode)(document.createElement("div")),this._domNode.setDisplay("none"),this._domNode.setClassName("defineKeybindingWidget"),this._domNode.setWidth(Kn.WIDTH),this._domNode.setHeight(Kn.HEIGHT);const y=t.localize(0,null);I.append(this._domNode.domNode,I.$(".message",void 0,y)),this._register((0,f.attachStylerCallback)(this.themeService,{editorWidgetBackground:l.editorWidgetBackground,editorWidgetForeground:l.editorWidgetForeground,widgetShadow:l.widgetShadow},T=>{T.editorWidgetBackground?this._domNode.domNode.style.backgroundColor=T.editorWidgetBackground.toString():this._domNode.domNode.style.backgroundColor="",T.editorWidgetForeground?this._domNode.domNode.style.color=T.editorWidgetForeground.toString():this._domNode.domNode.style.color="",T.widgetShadow?this._domNode.domNode.style.boxShadow=`0 2px 8px ${T.widgetShadow}`:this._domNode.domNode.style.boxShadow=""})),this._keybindingInputWidget=this._register(this.instantiationService.createInstance(o,this._domNode.domNode,{ariaLabel:y,history:[]})),this._keybindingInputWidget.startRecordingKeys(),this._register(this._keybindingInputWidget.onKeybinding(T=>this.onKeybinding(T))),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")),m&&I.append(m,this._domNode.domNode)}get domNode(){return this._domNode.domNode}define(){return this._keybindingInputWidget.clear(),n.Promises.withAsyncBody(async m=>{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,n.timeout)(0),this._keybindingInputWidget.focus());const w=this._onHide.event(()=>{m(this.getUserSettingsLabel()),w.dispose()})})}layout(m){const w=Math.round((m.height-Kn.HEIGHT)/2);this._domNode.setTop(w);const D=Math.round((m.width-Kn.WIDTH)/2);this._domNode.setLeft(D)}printExisting(m){if(m>0){const w=I.$("span.existingText"),D=m===1?t.localize(1,null,m):t.localize(2,null,m);I.append(w,document.createTextNode(D)),b.alert(D),this._showExistingKeybindingsNode.appendChild(w),w.onmousedown=y=>{y.preventDefault()},w.onmouseup=y=>{y.preventDefault()},w.onclick=()=>{this._onShowExistingKeybindings.fire(this.getUserSettingsLabel())}}}onKeybinding(m){const[w,D]=m;this._firstPart=w,this._chordPart=D,I.clearNode(this._outputNode),I.clearNode(this._showExistingKeybindingsNode),this.keybindingLabelStylers.clear();const y=new k.KeybindingLabel(this._outputNode,p.OS);if(y.set((0,d.withNullAsUndefined)(this._firstPart)),this.keybindingLabelStylers.add((0,f.attachKeybindingLabelStyler)(y,this.themeService)),this._chordPart){this._outputNode.appendChild(document.createTextNode(t.localize(3,null)));const _=new k.KeybindingLabel(this._outputNode,p.OS);_.set(this._chordPart),this.keybindingLabelStylers.add((0,f.attachKeybindingLabelStyler)(_,this.themeService))}const T=this.getUserSettingsLabel();T&&this._onDidChange.fire(T)}getUserSettingsLabel(){let m=null;return this._firstPart&&(m=this._firstPart.getUserSettingsLabel(),this._chordPart&&(m=m+" "+this._chordPart.getUserSettingsLabel())),m}onCancel(){this._firstPart=null,this._chordPart=null,this.hide()}hide(){this._domNode.setDisplay("none"),this._isVisible=!1,this._onHide.fire()}};g.WIDTH=400,g.HEIGHT=110,g=we([F(1,i.IInstantiationService),F(2,c.IThemeService)],g),e.DefineKeybindingWidget=g;let h=class al extends R.Disposable{constructor(m,w){super(),this._editor=m,this._widget=w.createInstance(g,null),this._editor.addOverlayWidget(this)}getId(){return al.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 m=this._editor.getLayoutInfo();return this._widget.layout(new I.Dimension(m.width,m.height)),this._widget.define()}};h.ID="editor.contrib.defineKeybindingWidget",h=we([F(1,i.IInstantiationService)],h),e.DefineKeybindingOverlayWidget=h}),define(ae[550],le([1,0,1817,839,24,15,39,11,2256,14,5,38,31,27,47,222,8,29,48,23,58,252,106,210,86]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClearCommandHistoryAction=e.ShowAllCommandsAction=e.CommandsQuickAccessProvider=void 0;let v=class extends I.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){return this.editorService.activeTextEditorControl}get defaultFilterValue(){if(this.configuration.preserveInput)return f.DefaultQuickAccessFilterValue.LAST}constructor(y,T,_,L,M,O,N,P,B,V,z){super({showAlias:!b.Language.isDefaultVariant(),noResultsPick:{label:(0,t.localize)(0,null),commandId:""}},L,M,O,N,P),this.editorService=y,this.menuService=T,this.extensionService=_,this.configurationService=B,this.editorGroupService=V,this.preferencesService=z,this.extensionRegistrationRace=Promise.race([(0,E.timeout)(800),this.extensionService.whenInstalledExtensionsRegistered()])}get configuration(){return{preserveInput:this.configurationService.getValue().workbench.commandPalette.preserveInput}}async getCommandPicks(y){return await this.extensionRegistrationRace,y.isCancellationRequested?[]:[...this.getCodeEditorCommandPicks(),...this.getGlobalCommandPicks()].map(T=>({...T,buttons:[{iconClass:l.Codicon.gear.classNames,tooltip:(0,t.localize)(1,null)}],trigger:()=>(this.preferencesService.openGlobalKeybindingSettings(!1,{query:`@command:${T.commandId}`}),a.TriggerAction.CLOSE_PICKER)}))}getGlobalCommandPicks(){const y=[],T=this.editorService.activeEditorPane?.scopedContextKeyService||this.editorGroupService.activeGroup.scopedContextKeyService,_=this.menuService.createMenu(A.MenuId.CommandPalette,T),L=_.getActions().reduce((M,[,O])=>[...M,...O],[]).filter(M=>M instanceof A.MenuItemAction&&M.enabled);for(const M of L){let O=(typeof M.item.title=="string"?M.item.title:M.item.title.value)||M.item.id;const N=typeof M.item.category=="string"?M.item.category:M.item.category?.value;N&&(O=(0,t.localize)(2,null,N,O));const P=typeof M.item.title!="string"?M.item.title.original:void 0,B=N&&M.item.category&&typeof M.item.category!="string"?M.item.category.original:void 0,V=P&&N?B?`${B}: ${P}`:`${N}: ${P}`:P;y.push({commandId:M.item.id,commandAlias:V,label:(0,g.stripIcons)(O)})}return _.dispose(),y}};v=we([F(0,R.IEditorService),F(1,A.IMenuService),F(2,k.IExtensionService),F(3,S.IInstantiationService),F(4,C.IKeybindingService),F(5,r.ICommandService),F(6,u.ITelemetryService),F(7,i.IDialogService),F(8,c.IConfigurationService),F(9,n.IEditorGroupsService),F(10,o.IPreferencesService)],v),e.CommandsQuickAccessProvider=v;class m extends A.Action2{constructor(){super({id:m.ID,title:{value:(0,t.localize)(3,null),original:"Show All Commands"},keybinding:{weight:200,when:void 0,primary:h.isFirefox?void 0:3118,secondary:[59]},f1:!0})}async run(y){y.get(s.IQuickInputService).quickAccess.show(v.PREFIX)}}e.ShowAllCommandsAction=m,m.ID="workbench.action.showCommands";class w extends A.Action2{constructor(){super({id:"workbench.action.clearCommandHistory",title:{value:(0,t.localize)(4,null),original:"Clear Command History"},f1:!0})}async run(y){const T=y.get(c.IConfigurationService),_=y.get(d.IStorageService),L=y.get(i.IDialogService);if(p.CommandsHistory.getConfiguredCommandHistoryLength(T)>0){const{confirmed:O}=await L.confirm({message:(0,t.localize)(5,null),detail:(0,t.localize)(6,null),primaryButton:(0,t.localize)(7,null),type:"warning"});if(!O)return;p.CommandsHistory.clearHistory(T,_)}}}e.ClearCommandHistoryAction=w}),define(ae[2683],le([1,0,1818,222,17,805,2674,550,15,7,336,98,59]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const u=R.Registry.as(p.Extensions.Quickaccess);u.registerQuickAccessProvider({ctor:A.HelpQuickAccessProvider,prefix:A.HelpQuickAccessProvider.PREFIX,placeholder:(0,t.localize)(0,null,A.HelpQuickAccessProvider.PREFIX),helpEntries:[{description:(0,t.localize)(1,null)}]}),u.registerQuickAccessProvider({ctor:k.ViewQuickAccessProvider,prefix:k.ViewQuickAccessProvider.PREFIX,contextKey:"inViewsPicker",placeholder:(0,t.localize)(2,null),helpEntries:[{description:(0,t.localize)(3,null),commandId:k.OpenViewPickerAction.ID}]}),u.registerQuickAccessProvider({ctor:E.CommandsQuickAccessProvider,prefix:E.CommandsQuickAccessProvider.PREFIX,contextKey:"inCommandsPicker",placeholder:(0,t.localize)(4,null),helpEntries:[{description:(0,t.localize)(5,null),commandId:E.ShowAllCommandsAction.ID}]}),I.MenuRegistry.appendMenuItem(I.MenuId.MenubarViewMenu,{group:"1_open",command:{id:E.ShowAllCommandsAction.ID,title:(0,t.localize)(6,null)},order:1}),I.MenuRegistry.appendMenuItem(I.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:E.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:E.ShowAllCommandsAction.ID,title:(0,t.localize)(10,null)},order:1}),I.MenuRegistry.appendMenuItem(I.MenuId.EditorContext,{group:"z_commands",when:r.EditorContextKeys.editorSimpleInput.toNegated(),command:{id:E.ShowAllCommandsAction.ID,title:(0,t.localize)(11,null)},order:1}),(0,I.registerAction2)(E.ClearCommandHistoryAction),(0,I.registerAction2)(E.ShowAllCommandsAction),(0,I.registerAction2)(k.OpenViewPickerAction),(0,I.registerAction2)(k.QuickAccessViewPickerAction);const i="inViewsPicker",f=b.ContextKeyExpr.and(S.inQuickPickContext,b.ContextKeyExpr.has(i)),c=k.QuickAccessViewPickerAction.KEYBINDING,l="workbench.action.quickOpenNavigateNextInViewPicker";C.KeybindingsRegistry.registerCommandAndKeybindingRule({id:l,weight:200+50,handler:(0,S.getQuickNavigateHandler)(l,!0),when:f,primary:c.primary,linux:c.linux,mac:c.mac});const s="workbench.action.quickOpenNavigatePreviousInViewPicker";C.KeybindingsRegistry.registerCommandAndKeybindingRule({id:s,weight:200+50,handler:(0,S.getQuickNavigateHandler)(s,!1),when:f,primary:c.primary|1024,linux:c.linux,mac:{primary:c.mac.primary|1024}})});var yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)},Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t};define(ae[2684],le([1,0,2,15,46,807,260,1830,44,17,7,47,23,25,81,39,48,132,19,55,66,26,31,106,41,36,93,256,34,22,9,18]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";var L;Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTunnelWorkbenchContribution=e.REMOTE_TUNNEL_CONNECTION_STATE=e.REMOTE_TUNNEL_CONNECTION_STATE_KEY=e.REMOTE_TUNNEL_CATEGORY=void 0,e.REMOTE_TUNNEL_CATEGORY={original:"Remote Tunnels",value:(0,E.localize)(0,null)},e.REMOTE_TUNNEL_CONNECTION_STATE_KEY="remoteTunnelConnection",e.REMOTE_TUNNEL_CONNECTION_STATE=new S.RawContextKey(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected");const M="remoteTunnelAccountPreference";var O;(function(V){V.turnOn="workbench.remoteTunnel.actions.turnOn",V.turnOff="workbench.remoteTunnel.actions.turnOff",V.connecting="workbench.remoteTunnel.actions.connecting",V.manage="workbench.remoteTunnel.actions.manage",V.showLog="workbench.remoteTunnel.actions.showLog",V.configure="workbench.remoteTunnel.actions.configure",V.copyToClipboard="workbench.remoteTunnel.actions.copyToClipboard",V.learnMore="workbench.remoteTunnel.actions.learnMore"})(O||(O={}));var N;(function(V){V.turnOn=(0,E.localize)(1,null),V.turnOff=(0,E.localize)(2,null),V.showLog=(0,E.localize)(3,null),V.configure=(0,E.localize)(4,null),V.copyToClipboard=(0,E.localize)(5,null),V.learnMore=(0,E.localize)(6,null)})(N||(N={}));let P=class extends t.Disposable{constructor(z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee){super(),this.authenticationService=z,this.dialogService=x,this.extensionService=H,this.contextKeyService=W,this.storageService=$,this.quickInputService=G,this.environmentService=Q,this.remoteTunnelService=K,this.commandService=Y,this.workspaceContextService=ee,this.initialized=!1,L.set(this,void 0),this.logger=this._register(q.createLogger(Q.remoteTunnelLogResource,{name:"remoteTunnel"})),this.connectionStateContext=e.REMOTE_TUNNEL_CONNECTION_STATE.bindTo(this.contextKeyService);const ie=U.tunnelApplicationConfig;if(!ie||!U.tunnelApplicationName){this.logger.error("Missing 'tunnelApplicationConfig' or 'tunnelApplicationName' in product.json. Remote tunneling is not available."),this.serverConfiguration={authenticationProviders:{}};return}this.serverConfiguration=ie,this._register(this.remoteTunnelService.onDidTokenFailed(()=>{this.logger.info("Clearing authentication preference because of successive token failures."),this.clearAuthenticationPreference()})),this._register(this.remoteTunnelService.onDidChangeTunnelStatus(re=>{re.type==="disconnected"?(this.logger.info("Clearing authentication preference because of tunnel disconnected."),this.clearAuthenticationPreference(),this.connectionInfo=void 0):re.type==="connecting"?this.connectionStateContext.set("connecting"):re.type==="connected"&&(this.connectionInfo=re.info,this.connectionStateContext.set("connected"))})),this.remoteTunnelService.getTunnelStatus().then(re=>{re.type==="connected"&&(this.connectionInfo=re.info,this.connectionStateContext.set("connected"))}),this._register(this.authenticationService.onDidChangeSessions(re=>this.onDidChangeSessions(re.event))),this._register(this.storageService.onDidChangeValue(re=>this.onDidChangeStorage(re))),this.registerCommands(),this.existingSessionId&&this.initialize(!0)}get existingSessionId(){return this.storageService.get(M,-1)}set existingSessionId(z){this.logger.trace(`Saving authentication preference for ID ${z}.`),z===void 0?this.storageService.remove(M,-1):this.storageService.store(M,z,-1,1)}async initialize(z=!1){return this.initialized?!0:(this.initialized=await this.doInitialize(z),this.initialized)}async doInitialize(z){if(await this.extensionService.whenInstalledExtensionsRegistered(),yt(this,L,"f")!==void 0)return!0;const x=await this.getAuthenticationSession(z);if(x!==void 0){Ut(this,L,x.session.id,"f");const H=x.session.idToken??x.session.accessToken;await this.remoteTunnelService.updateAccount({token:H,authenticationProviderId:x.providerId})}return x!==void 0}async trackServerStart(z){const x=new Promise((W,U)=>{const $=this.remoteTunnelService.onDidChangeTunnelStatus(q=>{switch(q.type){case"connecting":q.progress&&z.report({message:q.progress});break;case"connected":$.dispose(),W(q.info);break;case"disconnected":$.dispose(),W(void 0);break}})}),H=await this.remoteTunnelService.getTunnelStatus();return H.type==="connecting"?x:H.type==="connected"?H.info:void 0}async getAuthenticationSession(z){if(this.existingSessionId){this.logger.info(`Searching for existing authentication session with ID ${this.existingSessionId}`);const H=await this.getExistingSession();if(H)return this.logger.info(`Found existing authentication session with ID ${H.session.id}`),H}if(z)return;const x=await this.getAccountPreference();if(x!==void 0)return this.existingSessionId=x.session.id,x}async getAccountPreference(){const z=this.quickInputService.createQuickPick();return z.title=(0,E.localize)(7,null),z.ok=!1,z.placeholder=(0,E.localize)(8,null),z.ignoreFocusOut=!0,z.items=await this.createQuickpickItems(),new Promise((x,H)=>{z.onDidHide(W=>{x(void 0),z.dispose()}),z.onDidAccept(async W=>{const U=z.selectedItems[0];if("provider"in U){const $=await this.authenticationService.createSession(U.provider.id,U.provider.scopes);x(this.createExistingSessionItem($,U.provider.id))}else"session"in U?x(U):x(void 0);z.hide()}),z.show()})}createExistingSessionItem(z,x){return{label:z.account.label,description:this.authenticationService.getLabel(x),session:z,providerId:x}}async createQuickpickItems(){const z=[];z.push({type:"separator",label:(0,E.localize)(9,null)});const x=await this.getAllSessions();z.push(...x),z.push({type:"separator",label:(0,E.localize)(10,null)});for(const H of await this.getAuthenticationProviders())if(!x.some(U=>U.providerId===H.id)||this.authenticationService.supportsMultipleAccounts(H.id)){const U=this.authenticationService.getLabel(H.id);z.push({label:(0,E.localize)(11,null,U),provider:H})}return z}async getExistingSession(){return(await this.getAllSessions()).find(x=>x.session.id===this.existingSessionId)}async onDidChangeStorage(z){if(z.key===M&&z.scope===-1){const x=this.existingSessionId,H=yt(this,L,"f");H!==x&&(this.logger.trace(`Resetting authentication state because authentication session ID preference changed from ${H} to ${x}.`),Ut(this,L,void 0,"f"),this.initialized=!1)}}clearAuthenticationPreference(){Ut(this,L,void 0,"f"),this.initialized=!1,this.existingSessionId=void 0,this.connectionStateContext.set("disconnected")}onDidChangeSessions(z){yt(this,L,"f")&&z.removed.find(x=>x.id===yt(this,L,"f"))&&this.clearAuthenticationPreference()}async getAllSessions(){const z=await this.getAuthenticationProviders(),x=new Map;let H;for(const W of z){const U=await this.authenticationService.getSessions(W.id,W.scopes);for(const $ of U){const q=this.createExistingSessionItem($,W.id);x.set(q.session.account.id,q),this.existingSessionId===$.id&&(H=q)}}return H!==void 0&&x.set(H.session.account.id,H),[...x.values()]}async getAuthenticationProviders(){const z=this.serverConfiguration.authenticationProviders,x=Object.keys(z).reduce((W,U)=>(W.push({id:U,scopes:z[U].scopes}),W),[]),H=this.authenticationService.declaredProviders;return x.filter(({id:W})=>H.some(U=>U.id===W))}registerCommands(){const z=this;this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.turnOn,title:N.turnOn,category:e.REMOTE_TUNNEL_CATEGORY,precondition:S.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected"),menu:[{id:p.MenuId.CommandPalette},{id:p.MenuId.AccountsContext,group:"2_remoteTunnel",when:S.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected")}]})}async run(x){const H=x.get(n.IProgressService),W=x.get(a.INotificationService),U=x.get(m.IClipboardService),$=x.get(o.ICommandService);await z.initialize(!1);const q=await H.withProgress({location:15,title:(0,E.localize)(12,null,O.showLog)},async X=>z.trackServerStart(X));if(q){const X=z.getLinkToOpen(q);await W.notify({severity:a.Severity.Info,message:(0,E.localize)(13,null,q.hostName,q.domain,X,O.manage),actions:{primary:[new v.Action("copyToClipboard",(0,E.localize)(14,null),void 0,!0,()=>U.writeText(X)),new v.Action("showExtension",(0,E.localize)(15,null),void 0,!0,()=>$.executeCommand("workbench.extensions.action.showExtensionsWithIds",["ms-vscode.remote-server"]))]}})}else await W.notify({severity:a.Severity.Info,message:(0,E.localize)(16,null)}),await $.executeCommand(O.showLog)}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.manage,title:(0,E.localize)(17,null),category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:p.MenuId.AccountsContext,group:"2_remoteTunnel",when:S.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connected")}]})}async run(){z.showManageOptions()}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.connecting,title:(0,E.localize)(18,null),category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:p.MenuId.AccountsContext,group:"2_remoteTunnel",when:S.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connecting")}]})}async run(){z.showManageOptions()}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.turnOff,title:N.turnOff,category:e.REMOTE_TUNNEL_CATEGORY,precondition:S.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"disconnected"),menu:[{id:p.MenuId.CommandPalette,when:S.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"")}]})}async run(){(await z.dialogService.confirm({type:"info",message:(0,E.localize)(19,null),primaryButton:(0,E.localize)(20,null)})).confirmed&&(z.clearAuthenticationPreference(),z.remoteTunnelService.updateAccount(void 0))}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.showLog,title:N.showLog,category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:p.MenuId.CommandPalette,when:S.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"")}]})}async run(x){x.get(l.IOutputService).showChannel(w.remoteTunnelLogChannelId)}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.configure,title:N.configure,category:e.REMOTE_TUNNEL_CATEGORY,menu:[{id:p.MenuId.CommandPalette,when:S.ContextKeyExpr.notEquals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"")}]})}async run(x){x.get(g.IPreferencesService).openSettings({query:A.CONFIGURATION_KEY_PREFIX})}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.copyToClipboard,title:N.copyToClipboard,category:e.REMOTE_TUNNEL_CATEGORY,precondition:S.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connected"),menu:[{id:p.MenuId.CommandPalette,when:S.ContextKeyExpr.equals(e.REMOTE_TUNNEL_CONNECTION_STATE_KEY,"connected")}]})}async run(x){const H=x.get(m.IClipboardService);if(z.connectionInfo){const W=z.getLinkToOpen(z.connectionInfo);H.writeText(W)}}})),this._register((0,p.registerAction2)(class extends p.Action2{constructor(){super({id:O.learnMore,title:N.learnMore,category:e.REMOTE_TUNNEL_CATEGORY,menu:[]})}async run(x){await x.get(h.IOpenerService).open("https://aka.ms/vscode-server-doc")}}))}getLinkToOpen(z){const x=this.workspaceContextService.getWorkspace(),H=x.folders;let W;H.length===1?W=H[0].uri:x.configuration&&(W=x.configuration);const U=T.URI.parse(z.link);return W?.scheme===y.Schemas.file?(0,_.joinPath)(U,W.path).toString(!0):(0,_.joinPath)(U,this.environmentService.userHome.path).toString(!0)}async showManageOptions(){const z=await this.getExistingSession();return new Promise((x,H)=>{const W=new t.DisposableStore,U=this.quickInputService.createQuickPick();U.placeholder=(0,E.localize)(21,null),W.add(U);const $=[];$.push({id:O.learnMore,label:N.learnMore}),this.connectionInfo&&z?(U.title=(0,E.localize)(22,null,z.label,z.description,this.connectionInfo.hostName),$.push({id:O.copyToClipboard,label:N.copyToClipboard,description:this.connectionInfo.domain})):U.title=(0,E.localize)(23,null),$.push({id:O.showLog,label:N.showLog}),$.push({type:"separator"}),$.push({id:O.configure,label:(0,E.localize)(24,null),description:this.connectionInfo?.hostName}),$.push({id:O.turnOff,label:N.turnOff,description:z?`${z.label} (${z.description})`:void 0}),U.items=$,W.add(U.onDidAccept(()=>{U.selectedItems[0]&&U.selectedItems[0].id&&this.commandService.executeCommand(U.selectedItems[0].id),U.hide()})),W.add(U.onDidHide(()=>{W.dispose(),x()})),U.show()})}};L=new WeakMap,P=we([F(0,k.IAuthenticationService),F(1,C.IDialogService),F(2,f.IExtensionService),F(3,S.IContextKeyService),F(4,R.IProductService),F(5,r.IStorageService),F(6,u.ILoggerService),F(7,u.ILogService),F(8,c.IQuickInputService),F(9,i.INativeEnvironmentService),F(10,s.IFileService),F(11,A.IRemoteTunnelService),F(12,o.ICommandService),F(13,D.IWorkspaceContextService)],P),e.RemoteTunnelWorkbenchContribution=P,b.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(P,3),b.Registry.as(d.Extensions.Configuration).registerConfiguration({type:"object",properties:{[A.CONFIGURATION_KEY_HOST_NAME]:{description:(0,E.localize)(25,null),type:"string",scope:1,pattern:"^[\\w-]*$",patternErrorMessage:(0,E.localize)(26,null),maxLength:20,default:""}}})}),define(ae[2685],le([1,0,10,38,550,24,198,1973,70,15,31,2,7,5,12,33,65,29,1184]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideWelcomeOverlayAction=e.WelcomeOverlayAction=void 0;const s=t.$,d=[{id:"explorer",arrow:"\u2190",label:(0,E.localize)(0,null),command:"workbench.view.explorer"},{id:"search",arrow:"\u2190",label:(0,E.localize)(1,null),command:"workbench.view.search"},{id:"git",arrow:"\u2190",label:(0,E.localize)(2,null),command:"workbench.view.scm"},{id:"debug",arrow:"\u2190",label:(0,E.localize)(3,null),command:"workbench.view.debug"},{id:"extensions",arrow:"\u2190",label:(0,E.localize)(4,null),command:"workbench.view.extensions"},{id:"problems",arrow:"\u2939",label:(0,E.localize)(5,null),command:"workbench.actions.view.problems"},{id:"terminal",label:(0,E.localize)(6,null),command:"workbench.action.terminal.toggleTerminal"},{id:"commandPalette",arrow:"\u2196",label:(0,E.localize)(7,null),command:R.ShowAllCommandsAction.ID},{id:"notifications",arrow:"\u2935",arrowLast:!0,label:(0,E.localize)(8,null),command:"notifications.showList"}],n=new r.RawContextKey("interfaceOverviewVisible",!1);let a;class o extends b.Action2{constructor(){super({id:o.ID,title:o.LABEL,category:I.Categories.Help,f1:!0})}run(m){const w=m.get(u.IInstantiationService);return a||(a=w.createInstance(h)),a.show(),Promise.resolve()}}e.WelcomeOverlayAction=o,o.ID="workbench.action.showInterfaceOverview",o.LABEL={value:(0,E.localize)(9,null),original:"User Interface Overview"};class g extends b.Action2{constructor(){super({id:g.ID,title:g.LABEL,category:I.Categories.Help,f1:!0,keybinding:{primary:9,when:n,weight:200},precondition:n})}run(){return a?.hide(),Promise.resolve()}}e.HideWelcomeOverlayAction=g,g.ID="workbench.action.hideInterfaceOverview",g.LABEL={value:(0,E.localize)(10,null),original:"Hide Interface Overview"};let h=class extends C.Disposable{constructor(m,w,D,y,T){super(),this.layoutService=m,this.editorService=w,this.commandService=D,this._contextKeyService=y,this.keybindingService=T,this._overlayVisible=n.bindTo(this._contextKeyService),this.create()}create(){const m=this.layoutService.offset.top;this._overlay=t.append(this.layoutService.container,s(".welcomeOverlay")),this._overlay.style.top=`${m}px`,this._overlay.style.height=`calc(100% - ${m}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,s(".commandPalettePlaceholder"));const w=!!this.editorService.visibleEditors.length;d.filter(D=>!("withEditor"in D)||D.withEditor===w).forEach(({id:D,arrow:y,label:T,command:_,arrowLast:L})=>{const M=t.append(this._overlay,s(`.key.${D}`));if(y&&!L&&t.append(M,s("span.arrow",void 0,y)),t.append(M,s("span.label")).textContent=T,_){const O=this.keybindingService.lookupKeybinding(_);O&&(t.append(M,s("span.shortcut")).textContent=O.getLabel())}y&&L&&t.append(M,s("span.arrow",void 0,y))})}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 m=document.querySelector(`footer[id="workbench.parts.statusbar"] .statusbar-item.left ${l.Codicon.warning.cssSelector}`),w=this._overlay.querySelector(".key.problems");if(m instanceof HTMLElement){const D=m.getBoundingClientRect(),y=this._overlay.getBoundingClientRect(),T=y.bottom-D.top+3,_=(D.left+D.right)/2-y.left;w.style.bottom=T+"px",w.style.left=_+"px"}else w.style.bottom="",w.style.left=""}updateActivityBarKeys(){const m=["explorer","search","git","debug","extensions"],w=document.querySelector(".activitybar .composite-bar");if(w instanceof HTMLElement){const D=w.getBoundingClientRect(),y=this._overlay.getBoundingClientRect();for(let T=0;T<m.length;T++){const _=this._overlay.querySelector(`.key.${m[T]}`),L=D.top-y.top+50*T+13;_.style.top=L+"px"}}else for(let D=0;D<m.length;D++){const y=this._overlay.querySelector(`.key.${m[D]}`);y.style.top=""}}hide(){this._overlay.style.display!=="none"&&(this._overlay.style.display="none",document.querySelector(".monaco-workbench").classList.remove("blur-background"),this._overlayVisible.reset())}};h=we([F(0,k.ILayoutService),F(1,A.IEditorService),F(2,S.ICommandService),F(3,r.IContextKeyService),F(4,p.IKeybindingService)],h),(0,b.registerAction2)(o),(0,b.registerAction2)(g),(0,i.registerThemingParticipant)((v,m)=>{const w=v.getColor(f.foreground);w&&m.addRule(`.monaco-workbench > .welcomeOverlay > .key { color: ${w}; }`);const D=c.Color.fromHex(v.type==="light"?"#FFFFFF85":"#00000085");D&&m.addRule(`.monaco-workbench > .welcomeOverlay { background: ${D}; }`);const y=v.getColor(f.textPreformatForeground);y&&m.addRule(`.monaco-workbench > .welcomeOverlay > .key > .shortcut { color: ${y}; }`)})}),define(ae[2686],le([1,0,36,15,7,200,14,26,38,128,111,8,49,283,679,23,800,13,89,74,106,31,319,597]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeMenubarControl=void 0;let h=class extends i.MenubarControl{constructor(m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H){super(m,w,D,y,T,_,L,M,O,N,P,B,z,H),this.menubarService=V,this.nativeHostService=x,(async()=>(this.recentlyOpened=await this.workspacesService.getRecentlyOpened(),this.doUpdateMenubar()))(),this.registerListeners()}setupMainMenu(){super.setupMainMenu();for(const m of Object.keys(this.topLevelTitles)){const w=this.menus[m];w&&this.mainMenuDisposables.add(w.onDidChange(()=>this.updateMenubar()))}}doUpdateMenubar(){if(!this.hostService.hasFocus)return;const m={menus:{},keybindings:{}};this.getMenubarMenus(m)&&this.menubarService.updateMenubar(this.nativeHostService.windowId,m)}getMenubarMenus(m){if(!m)return!1;m.keybindings=this.getAdditionalKeybindings();for(const w of Object.keys(this.topLevelTitles)){const D=this.menus[w];if(D){const y={items:[]};if(this.populateMenuItems(D,y,m.keybindings),y.items.length===0)return!1;m.menus[w]=y}}return!0}populateMenuItems(m,w,D){const y=m.getActions();for(const T of y){const[,_]=T;_.forEach(L=>{const M=typeof L.item.title=="string"?L.item.title:L.item.title.mnemonicTitle??L.item.title.value;if(L instanceof p.SubmenuItemAction){const O={items:[]},N=this.menuService.createMenu(L.item.submenu,this.contextKeyService);if(this.populateMenuItems(N,O,D),O.items.length>0){const P={id:L.id,label:M,submenu:O};w.items.push(P)}N.dispose()}else{if(L.id===o.OpenRecentAction.ID){const N=this.getOpenRecentActions().map(this.transformOpenRecentAction);w.items.push(...N)}const O={id:L.id,label:M};(0,g.isICommandActionToggleInfo)(L.item.toggled)&&(O.label=L.item.toggled.mnemonicTitle??L.item.toggled.title??M),L.checked&&(O.checked=!0),L.enabled||(O.enabled=!1),D[L.id]=this.getMenubarKeybinding(L.id),w.items.push(O)}}),w.items.push({id:"vscode.menubar.separator"})}w.items.length>0&&w.items.pop()}transformOpenRecentAction(m){return m instanceof t.Separator?{id:"vscode.menubar.separator"}:{id:m.id,uri:m.uri,remoteAuthority:m.remoteAuthority,enabled:m.enabled,label:m.label}}getAdditionalKeybindings(){const m={};if(k.isMacintosh){const w=this.getMenubarKeybinding("workbench.action.quit");w&&(m["workbench.action.quit"]=w)}return m}getMenubarKeybinding(m){const w=this.keybindingService.lookupKeybinding(m);if(!w)return;const D=w.getElectronAccelerator();if(D)return{label:D,userSettingsLabel:(0,l.withNullAsUndefined)(w.getUserSettingsLabel())};const y=w.getLabel();if(y)return{label:y,isNative:!1,userSettingsLabel:(0,l.withNullAsUndefined)(w.getUserSettingsLabel())}}};h=we([F(0,p.IMenuService),F(1,A.IWorkspacesService),F(2,R.IContextKeyService),F(3,I.IKeybindingService),F(4,C.IConfigurationService),F(5,r.ILabelService),F(6,u.IUpdateService),F(7,f.IStorageService),F(8,E.INotificationService),F(9,n.IPreferencesService),F(10,b.INativeWorkbenchEnvironmentService),F(11,S.IAccessibilityService),F(12,c.IMenubarService),F(13,d.IHostService),F(14,s.INativeHostService),F(15,a.ICommandService)],h),e.NativeMenubarControl=h}),define(ae[2687],le([1,0,86,10,7,8,23,128,74,14,15,2676,37,12,83,89,243,5,29,2686,179]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitlebarPart=void 0;let a=class extends C.TitlebarPart{isBigSurOrNewer(){const g=this.environmentService.os.release;return parseFloat(g)>=20}getMacTitlebarSize(){return this.isBigSurOrNewer()?28:22}get minimumHeight(){return b.isMacintosh?(this.isCommandCenterVisible?35:this.getMacTitlebarSize())/(this.useCounterZoom?(0,t.getZoomFactor)():1):super.minimumHeight}get maximumHeight(){return this.minimumHeight}constructor(g,h,v,m,w,D,y,T,_,L,M){super(g,h,v,m,w,D,y,T,_,M),this.nativeHostService=L,this.environmentService=v}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(g){this.maxRestoreControl&&(g?(this.maxRestoreControl.classList.remove(...s.Codicon.chromeMaximize.classNamesArray),this.maxRestoreControl.classList.add(...s.Codicon.chromeRestore.classNamesArray)):(this.maxRestoreControl.classList.remove(...s.Codicon.chromeRestore.classNamesArray),this.maxRestoreControl.classList.add(...s.Codicon.chromeMaximize.classNamesArray))),this.resizer&&(g?(0,p.hide)(this.resizer):(0,p.show)(this.resizer)),this.adjustTitleMarginToCenter()}onMenubarFocusChanged(g){(b.isWindows||b.isLinux)&&this.currentMenubarVisibility!=="compact"&&this.dragRegion&&(g?(0,p.hide)(this.dragRegion):(0,p.show)(this.dragRegion))}onMenubarVisibilityChanged(g){(b.isWindows||b.isLinux)&&this.currentMenubarVisibility==="toggle"&&g&&this.dragRegion&&((0,p.hide)(this.dragRegion),setTimeout(()=>(0,p.show)(this.dragRegion),50)),super.onMenubarVisibilityChanged(g)}onConfigurationChanged(g){super.onConfigurationChanged(g),g.affectsConfiguration("window.doubleClickIconToClose")&&this.appIcon&&this.onUpdateAppIconDragBehavior()}installMenubar(){super.installMenubar(),!this.menubar&&this.customMenubar&&this._register(this.customMenubar.onFocusStateChange(g=>this.onMenubarFocusChanged(g)))}createContentArea(g){const h=super.createContentArea(g);(b.isMacintosh||(0,c.getTitleBarStyle)(this.configurationService)==="native")&&this._register(this.instantiationService.createInstance(d.NativeMenubarControl)),this.appIcon&&(this.onUpdateAppIconDragBehavior(),this._register((0,p.addDisposableListener)(this.appIcon,p.EventType.DBLCLICK,m=>{this.nativeHostService.closeWindow()})));const v=typeof navigator.windowControlsOverlay<"u";if(!b.isMacintosh&&(0,c.getTitleBarStyle)(this.configurationService)!=="native"&&!v&&this.windowControls){const m=(0,p.append)(this.windowControls,(0,p.$)("div.window-icon.window-minimize"+s.Codicon.chromeMinimize.cssSelector));this._register((0,p.addDisposableListener)(m,p.EventType.CLICK,D=>{this.nativeHostService.minimizeWindow()})),this.maxRestoreControl=(0,p.append)(this.windowControls,(0,p.$)("div.window-icon.window-max-restore")),this._register((0,p.addDisposableListener)(this.maxRestoreControl,p.EventType.CLICK,async D=>await this.nativeHostService.isMaximized()?this.nativeHostService.unmaximizeWindow():this.nativeHostService.maximizeWindow()));const w=(0,p.append)(this.windowControls,(0,p.$)("div.window-icon.window-close"+s.Codicon.chromeClose.cssSelector));this._register((0,p.addDisposableListener)(w,p.EventType.CLICK,D=>{this.nativeHostService.closeWindow()})),this.resizer=(0,p.append)(this.rootContainer,(0,p.$)("div.resizer")),this._register(this.layoutService.onDidChangeWindowMaximized(D=>this.onDidChangeWindowMaximized(D))),this.onDidChangeWindowMaximized(this.layoutService.isWindowMaximized())}return b.isWindows&&(0,c.getTitleBarStyle)(this.configurationService)==="custom"&&this._register(this.nativeHostService.onDidTriggerSystemContextMenu(({windowId:m,x:w,y:D})=>{if(this.nativeHostService.windowId!==m)return;const y=(0,t.getZoomFactor)();this.onContextMenu(new MouseEvent("mouseup",{clientX:w/y,clientY:D/y}),S.MenuId.TitleBarContext)})),h}updateStyles(){super.updateStyles(),(0,c.useWindowControlsOverlay)(this.configurationService)&&(!this.cachedWindowControlStyles||this.cachedWindowControlStyles.bgColor!==this.element.style.backgroundColor||this.cachedWindowControlStyles.fgColor!==this.element.style.color)&&this.nativeHostService.updateWindowControls({backgroundColor:this.element.style.backgroundColor,foregroundColor:this.element.style.color})}layout(g,h){if(super.layout(g,h),(0,c.useWindowControlsOverlay)(this.configurationService)||b.isMacintosh&&b.isNative&&(0,c.getTitleBarStyle)(this.configurationService)==="custom"){const v=h>0||this.isBigSurOrNewer()?Math.round(h*(0,t.getZoomFactor)()):this.getMacTitlebarSize();v!==this.cachedWindowControlHeight&&(this.cachedWindowControlHeight=v,this.nativeHostService.updateWindowControls({height:v}))}}};a=we([F(0,r.IContextMenuService),F(1,A.IConfigurationService),F(2,E.INativeWorkbenchEnvironmentService),F(3,l.IInstantiationService),F(4,u.IThemeService),F(5,k.IStorageService),F(6,i.IWorkbenchLayoutService),F(7,R.IContextKeyService),F(8,I.IHostService),F(9,f.INativeHostService),F(10,n.IHoverService)],a),e.TitlebarPart=a}),define(ae[681],le([1,0,22,9,2031,186,106]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditor2Input=void 0;let E=class Us extends A.EditorInput{constructor(b){super(),this.resource=p.URI.from({scheme:t.Schemas.vscodeSettings,path:"settingseditor"}),this._settingsModel=b.createSettings2EditorModel()}matches(b){return super.matches(b)||b instanceof Us}get typeId(){return Us.ID}getName(){return R.localize(0,null)}async resolve(){return this._settingsModel}dispose(){this._settingsModel.dispose(),super.dispose()}};E.ID="workbench.input.settings2",E=we([F(0,k.IPreferencesService)],E),e.SettingsEditor2Input=E}),define(ae[2688],le([1,0,6,2,14,18,103,95,45,119,24,74,678,681]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncTrigger=void 0;let i=class extends p.Disposable{constructor(c,l,s,d,n){super(),this.userDataProfilesService=l;const a=t.Event.filter(t.Event.any(t.Event.map(c.onDidActiveEditorChange,()=>this.getUserDataEditorInputSource(c.activeEditor)),t.Event.map(t.Event.filter(s.onDidChangeViewContainerVisibility,o=>o.id===b.VIEWLET_ID&&o.visible),o=>o.id)),o=>o!==void 0);R.isWeb?this._register(t.Event.debounce(t.Event.any(t.Event.map(n.onDidChangeFocus,()=>"windowFocus"),t.Event.map(a,o=>o)),(o,g)=>o?[...o,g]:[g],1e3)(o=>d.triggerSync(o,!0,!1))):this._register(a(o=>d.triggerSync([o],!0,!1)))}getUserDataEditorInputSource(c){if(!c)return;if(c instanceof u.SettingsEditor2Input)return"settingsEditor";if(c instanceof r.KeybindingsEditorInput)return"keybindingsEditor";const l=c.resource;if((0,A.isEqual)(l,this.userDataProfilesService.defaultProfile.settingsResource))return"settingsEditor";if((0,A.isEqual)(l,this.userDataProfilesService.defaultProfile.keybindingsResource))return"keybindingsEditor"}};i=we([F(0,S.IEditorService),F(1,k.IUserDataProfilesService),F(2,I.IViewsService),F(3,E.IUserDataAutoSyncService),F(4,C.IHostService)],i),e.UserDataSyncTrigger=i}),define(ae[954],le([1,0,2033,65,13]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getInvalidTypeError=e.createValidator=void 0;function A(f,...c){return c.some(l=>f.includes(l))}function k(f){return f===""||(0,R.isUndefinedOrNull)(f)}function E(f){const c=Array.isArray(f.type)?f.type:[f.type],l=A(c,"null"),s=(A(c,"number")||A(c,"integer"))&&(c.length===1||c.length===2&&l),d=C(f),n=S(f),a=r(f),o=u(f);return g=>{if(l&&k(g))return"";const h=[];if(a){const v=a(g);v&&h.push(v)}if(o){const v=o(g);v&&h.push(v)}return f.type==="boolean"&&g!==!0&&g!==!1&&h.push(t.localize(0,null)),s&&(k(g)||typeof g=="boolean"||Array.isArray(g)||isNaN(+g)?h.push(t.localize(1,null)):h.push(...d.filter(v=>!v.isValid(+g)).map(v=>v.message))),f.type==="string"&&(f.enum&&!(0,R.isStringArray)(f.enum)?h.push(t.localize(2,null)):(0,R.isString)(g)?h.push(...n.filter(v=>!v.isValid(g)).map(v=>v.message)):h.push(t.localize(3,null))),h.length?f.errorMessage?[f.errorMessage,...h].join(" "):h.join(" "):""}}e.createValidator=E;function I(f,c){if(typeof c>"u")return;if(!(Array.isArray(c)?c:[c]).some(s=>b(f,s)))return t.localize(4,null,JSON.stringify(c))}e.getInvalidTypeError=I;function b(f,c){const l=typeof f;return c==="boolean"?l==="boolean":c==="object"?f&&!Array.isArray(f)&&l==="object":c==="null"?f===null:c==="array"?Array.isArray(f):c==="string"?l==="string":c==="number"||c==="integer"?l==="number":!0}function S(f){const c=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let l;return typeof f.pattern=="string"&&(l=new RegExp(f.pattern)),[{enabled:f.maxLength!==void 0,isValid:s=>s.length<=f.maxLength,message:t.localize(5,null,f.maxLength)},{enabled:f.minLength!==void 0,isValid:s=>s.length>=f.minLength,message:t.localize(6,null,f.minLength)},{enabled:l!==void 0,isValid:s=>l.test(s),message:f.patternErrorMessage||t.localize(7,null,f.pattern)},{enabled:f.format==="color-hex",isValid:s=>p.Color.Format.CSS.parseHex(s),message:t.localize(8,null)},{enabled:f.format==="uri"||f.format==="uri-reference",isValid:s=>!!s.length,message:t.localize(9,null)},{enabled:f.format==="uri"||f.format==="uri-reference",isValid:s=>c.test(s),message:t.localize(10,null)},{enabled:f.format==="uri",isValid:s=>{const d=s.match(c);return!!(d&&d[2])},message:t.localize(11,null)},{enabled:f.enum!==void 0,isValid:s=>f.enum.includes(s),message:t.localize(12,null,f.enum?f.enum.map(s=>`"${s}"`).join(", "):"[]")}].filter(s=>s.enabled)}function C(f){const c=Array.isArray(f.type)?f.type:[f.type],l=A(c,"null"),s=A(c,"integer")&&(c.length===1||c.length===2&&l);if(!(A(c,"number","integer")&&(c.length===1||c.length===2&&l)))return[];let n,a;return typeof f.exclusiveMaximum=="boolean"?n=f.exclusiveMaximum?f.maximum:void 0:n=f.exclusiveMaximum,typeof f.exclusiveMinimum=="boolean"?a=f.exclusiveMinimum?f.minimum:void 0:a=f.exclusiveMinimum,[{enabled:n!==void 0&&(f.maximum===void 0||n<=f.maximum),isValid:o=>o<n,message:t.localize(13,null,n)},{enabled:a!==void 0&&(f.minimum===void 0||a>=f.minimum),isValid:o=>o>a,message:t.localize(14,null,a)},{enabled:f.maximum!==void 0&&(n===void 0||n>f.maximum),isValid:o=>o<=f.maximum,message:t.localize(15,null,f.maximum)},{enabled:f.minimum!==void 0&&(a===void 0||a<f.minimum),isValid:o=>o>=f.minimum,message:t.localize(16,null,f.minimum)},{enabled:f.multipleOf!==void 0,isValid:o=>o%f.multipleOf===0,message:t.localize(17,null,f.multipleOf)},{enabled:s,isValid:o=>o%1===0,message:t.localize(18,null)}].filter(o=>o.enabled)}function r(f){if(f.type==="array"&&f.items&&!Array.isArray(f.items)){const c=f.items;if(c&&!Array.isArray(c.type)){const l=s=>"'"+s+"'";return s=>{if(!s)return null;let d="";if(!Array.isArray(s))return d+=t.localize(19,null),d+=` `,d;const n=s;if(f.uniqueItems&&new Set(n).size<n.length&&(d+=t.localize(20,null),d+=` `),f.minItems&&n.length<f.minItems&&(d+=t.localize(21,null,f.minItems),d+=` `),f.maxItems&&n.length>f.maxItems&&(d+=t.localize(22,null,f.maxItems),d+=` `),c.type==="string"){if(!(0,R.isStringArray)(n))return d+=t.localize(23,null),d+=` `,d;if(typeof c.pattern=="string"){const o=new RegExp(c.pattern);n.forEach(g=>{o.test(g)||(d+=c.patternErrorMessage||t.localize(24,null,l(g),l(c.pattern)))})}const a=c.enum;a&&n.forEach(o=>{a.indexOf(o)===-1&&(d+=t.localize(25,null,l(o),"["+a.map(l).join(", ")+"]"),d+=` `)})}else(c.type==="integer"||c.type==="number")&&n.forEach(a=>{const o=i(c,a);o&&(d+=`${a}: ${o} `)});return d}}}return null}function u(f){if(f.type==="object"){const{properties:c,patternProperties:l,additionalProperties:s}=f;return d=>{if(!d)return null;const n=[];return(0,R.isObject)(d)?Object.keys(d).forEach(a=>{const o=d[a];if(c&&a in c){const g=i(c[a],o);g&&n.push(`${a}: ${g} `);return}if(l){for(const g in l)if(RegExp(g).test(a)){const h=i(l[g],o);h&&n.push(`${a}: ${h} `);return}}if(s===!1)n.push(t.localize(27,null,a));else if(typeof s=="object"){const g=i(s,o);g&&n.push(`${a}: ${g} `)}}):n.push(t.localize(26,null)),n.length?f.errorMessage?[f.errorMessage,...n].join(" "):n.join(" "):""}}return null}function i(f,c){return E(f)(c)}}),define(ae[463],le([1,0,16,6,123,2,20,85,2032,8,55,38,17,255,106,13,176,954]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,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 s(L){return L.startLineNumber===-1&&L.startColumn===-1&&L.endLineNumber===-1&&L.endColumn===-1}e.isNullRange=s;class d extends u.EditorModel{constructor(){super(...arguments),this._currentResultGroups=new Map}updateResultGroup(M,O){return O?this._currentResultGroups.set(M,O):this._currentResultGroups.delete(M),this.removeDuplicateResults(),this.update()}removeDuplicateResults(){const M=new Set;[...this._currentResultGroups.keys()].sort((O,N)=>this._currentResultGroups.get(O).order-this._currentResultGroups.get(N).order).forEach(O=>{const N=this._currentResultGroups.get(O);N.result.filterMatches=N.result.filterMatches.filter(P=>!M.has(P.setting.key)),N.result.filterMatches.forEach(P=>M.add(P.setting.key))})}compareTwoNullableNumbers(M,O){const N=M??Number.MAX_SAFE_INTEGER,P=O??Number.MAX_SAFE_INTEGER;return N<P?-1:N>P?1:0}filterSettings(M,O,N){const P=this.filterGroups,B=[];for(const V of P){const z=O(V);for(const x of V.sections)for(const H of x.settings){const W=N(H,V);(z||W)&&B.push({setting:H,matches:W&&W.matches,matchType:W?.matchType??i.SettingMatchType.None,score:W?.score??0})}}return B.sort((V,z)=>{if(V.matchType!==z.matchType)return z.matchType-V.matchType;if(V.setting.extensionInfo&&z.setting.extensionInfo&&V.setting.extensionInfo.id===z.setting.extensionInfo.id){if(V.setting.categoryLabel!==z.setting.categoryLabel&&(V.setting.categoryOrder!==void 0||z.setting.categoryOrder!==void 0)&&V.setting.categoryOrder!==z.setting.categoryOrder)return this.compareTwoNullableNumbers(V.setting.categoryOrder,z.setting.categoryOrder);if(V.setting.categoryLabel===z.setting.categoryLabel&&(V.setting.order!==void 0||z.setting.order!==void 0)&&V.setting.order!==z.setting.order)return this.compareTwoNullableNumbers(V.setting.order,z.setting.order)}return z.score-V.score}),B}getPreference(M){for(const O of this.settingsGroups)for(const N of O.sections)for(const P of N.settings)if(M===P.key)return P}collectMetadata(M){const O=Object.create(null);let N=!1;return M.forEach(P=>{P.result.metadata&&(O[P.id]=P.result.metadata,N=!0)}),N?O:null}get filterGroups(){return this.settingsGroups}}e.AbstractSettingsModel=d;class n extends d{constructor(M,O){super(),this._configurationTarget=O,this._onDidChangeGroups=this._register(new p.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this.settingsModel=M.object.textEditorModel,this._register(this.onWillDispose(()=>M.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(M,O){return this.settingsModel.findMatches(M,O.valueRange,!1,!1,null,!1).map(N=>N.range)}isSettingsProperty(M,O){return O.length===0}parse(){this._settingsGroups=o(this.settingsModel,(M,O)=>this.isSettingsProperty(M,O))}update(){const M=[...this._currentResultGroups.values()];if(!M.length)return;const O=[],N=[];M.forEach(z=>{z.result.filterMatches.forEach(x=>{O.push(x.setting),x.matches&&N.push(...x.matches)})});let P;const B=this.settingsGroups[0];B&&(P={id:B.id,range:B.range,sections:[{settings:O}],title:B.title,titleRange:B.titleRange,order:B.order,extensionInfo:B.extensionInfo});const V=this.collectMetadata(M);return{allGroups:this.settingsGroups,filteredGroups:P?[P]:[],matches:N,metadata:V}}}e.SettingsEditorModel=n;let a=class extends d{constructor(M,O){super(),this._defaultSettings=M,this._onDidChangeGroups=this._register(new p.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this.dirty=!1,this._register(O.onDidChangeConfiguration(N=>{N.source===7&&(this.dirty=!0,this._onDidChangeGroups.fire())})),this._register(r.Registry.as(S.Extensions.Configuration).onDidSchemaChange(N=>{this.dirty=!0,this._onDidChangeGroups.fire()}))}get filterGroups(){return this.settingsGroups.slice(1)}get settingsGroups(){const M=this._defaultSettings.getSettingsGroups(this.dirty);return this.dirty=!1,M}findValueMatches(M,O){return[]}update(){throw new Error("Not supported")}};a=we([F(1,b.IConfigurationService)],a),e.Settings2EditorModel=a;function o(L,M){const O=[];let N=null,P=null,B=[];const V=[];let z=-1;const x={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0};function H(U,$,q){if(Array.isArray(B)?B.push(U):P&&(B[P]=U),V.length===z+1||V.length===z+2&&N!==null){const X=V.length===z+1?O[O.length-1]:N.overrides[N.overrides.length-1];if(X){const G=L.getPositionAt($),Q=L.getPositionAt($+q);X.value=U,X.valueRange={startLineNumber:G.lineNumber,startColumn:G.column,endLineNumber:Q.lineNumber,endColumn:Q.column},X.range=Object.assign(X.range,{endLineNumber:Q.lineNumber,endColumn:Q.column})}}}const W={onObjectBegin:(U,$)=>{if(M(P,V)){z=V.length;const X=L.getPositionAt(U);x.startLineNumber=X.lineNumber,x.startColumn=X.column}const q={};H(q,U,$),B=q,P=null,V.push(B)},onObjectProperty:(U,$,q)=>{if(P=U,V.length===z+1||V.length===z+2&&N!==null){const X=L.getPositionAt($),G={description:[],descriptionIsMarkdown:!1,key:U,keyRange:{startLineNumber:X.lineNumber,startColumn:X.column+1,endLineNumber:X.lineNumber,endColumn:X.column+q},range:{startLineNumber:X.lineNumber,startColumn:X.column,endLineNumber:0,endColumn:0},value:null,valueRange:e.nullRange,descriptionRanges:[],overrides:[],overrideOf:(0,f.withNullAsUndefined)(N)};V.length===z+1?(O.push(G),S.OVERRIDE_PROPERTY_REGEX.test(U)&&(N=G)):N.overrides.push(G)}},onObjectEnd:(U,$)=>{if(B=V.pop(),z!==-1&&(V.length===z+1||V.length===z+2&&N!==null)){const q=V.length===z+1?O[O.length-1]:N.overrides[N.overrides.length-1];if(q){const X=L.getPositionAt(U+$);q.valueRange=Object.assign(q.valueRange,{endLineNumber:X.lineNumber,endColumn:X.column}),q.range=Object.assign(q.range,{endLineNumber:X.lineNumber,endColumn:X.column})}V.length===z+1&&(N=null)}if(V.length===z){const q=L.getPositionAt(U);x.endLineNumber=q.lineNumber,x.endColumn=q.column,z=-1}},onArrayBegin:(U,$)=>{const q=[];H(q,U,$),V.push(B),B=q,P=null},onArrayEnd:(U,$)=>{if(B=V.pop(),V.length===z+1||V.length===z+2&&N!==null){const q=V.length===z+1?O[O.length-1]:N.overrides[N.overrides.length-1];if(q){const X=L.getPositionAt(U+$);q.valueRange=Object.assign(q.valueRange,{endLineNumber:X.lineNumber,endColumn:X.column}),q.range=Object.assign(q.range,{endLineNumber:X.lineNumber,endColumn:X.column})}}},onLiteralValue:H,onError:U=>{const $=O[O.length-1];$&&(s($.range)||s($.keyRange)||s($.valueRange))&&O.pop()}};return L.isDisposed()||(0,R.visit)(L.getValue(),W),O.length>0?[{sections:[{settings:O}],title:"",titleRange:e.nullRange,range:x}]:[]}class g extends n{constructor(){super(...arguments),this._configurationGroups=[]}get configurationGroups(){return this._configurationGroups}parse(){super.parse(),this._configurationGroups=o(this.settingsModel,(M,O)=>O.length===0)}isSettingsProperty(M,O){return M==="settings"&&O.length===1}}e.WorkspaceConfigurationEditorModel=g;class h extends A.Disposable{constructor(M,O){super(),this._mostCommonlyUsedSettingsKeys=M,this.target=O,this._settingsByName=new Map,this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event}getContent(M=!1){return(!this._content||M)&&this.initialize(),this._content}getContentWithoutMostCommonlyUsed(M=!1){return(!this._contentWithoutMostCommonlyUsed||M)&&this.initialize(),this._contentWithoutMostCommonlyUsed}getSettingsGroups(M=!1){return(!this._allSettingsGroups||M)&&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 M=this.getRegisteredGroups();return this.initAllSettingsMap(M),[this.getMostCommonlyUsedSettings(M),...M]}getRegisteredGroups(){const M=r.Registry.as(S.Extensions.Configuration).getConfigurations().slice(),O=this.removeEmptySettingsGroups(M.sort(this.compareConfigurationNodes).reduce((N,P,B,V)=>this.parseConfig(P,N,V),[]));return this.sortGroups(O)}sortGroups(M){return M.forEach(O=>{O.sections.forEach(N=>{N.settings.sort((P,B)=>P.key.localeCompare(B.key))})}),M}initAllSettingsMap(M){this._settingsByName=new Map;for(const O of M)for(const N of O.sections)for(const P of N.settings)this._settingsByName.set(P.key,P)}getMostCommonlyUsedSettings(M){const O=(0,t.coalesce)(this._mostCommonlyUsedSettingsKeys.map(N=>{const P=this._settingsByName.get(N);return P?{description:P.description,key:P.key,value:P.value,keyRange:e.nullRange,range:e.nullRange,valueRange:e.nullRange,overrides:[],scope:4,type:P.type,enum:P.enum,enumDescriptions:P.enumDescriptions,descriptionRanges:[]}:null}));return{id:"mostCommonlyUsed",range:e.nullRange,title:I.localize(0,null),titleRange:e.nullRange,sections:[{settings:O}]}}parseConfig(M,O,N,P,B){B=B||{};let V=M.title;if(!V){const z=N.find(x=>x.id===M.id&&x.title);z&&(V=z.title)}if(V&&(P?P.sections[P.sections.length-1].title=V:(P=O.find(z=>z.title===V&&z.extensionInfo?.id===M.extensionInfo?.id),P||(P={sections:[{settings:[]}],id:M.id||"",title:V||"",titleRange:e.nullRange,order:M.order,range:e.nullRange,extensionInfo:M.extensionInfo},O.push(P)))),M.properties){P||(P={sections:[{settings:[]}],id:M.id||"",title:M.id||"",titleRange:e.nullRange,order:M.order,range:e.nullRange,extensionInfo:M.extensionInfo},O.push(P));const z=[];for(const x of[...P.sections[P.sections.length-1].settings,...this.parseSettings(M)])B[x.key]||(z.push(x),B[x.key]=!0);z.length&&(P.sections[P.sections.length-1].settings=z)}return M.allOf?.forEach(z=>this.parseConfig(z,O,N,P,B)),O}removeEmptySettingsGroups(M){const O=[];for(const N of M)N.sections=N.sections.filter(P=>P.settings.length>0),N.sections.length&&O.push(N);return O}parseSettings(M){const O=[],N=M.properties,P=M.extensionInfo,B=M.extensionInfo?.id===M.id?M.title:M.id,V=M.order;for(const z in N){const x=N[z];if(this.matchesScope(x)){const H=x.default;let W=x.markdownDescription||x.description||"";typeof W!="string"&&(W="");const U=W.split(` `),$=S.OVERRIDE_PROPERTY_REGEX.test(z)?this.parseOverrideSettings(x.default):[];let q;x.type==="array"&&x.items&&!Array.isArray(x.items)&&x.items.type&&(x.items.enum?q="enum":Array.isArray(x.items.type)||(q=x.items.type));const X=x.type==="object"?x.properties:void 0,G=x.type==="object"?x.patternProperties:void 0,Q=x.type==="object"?x.additionalProperties:void 0;let j=x.enum,K=x.markdownEnumDescriptions??x.enumDescriptions,Y=!!x.markdownEnumDescriptions;q==="enum"&&!Array.isArray(x.items)&&(j=x.items.enum,K=x.items.markdownEnumDescriptions??x.items.enumDescriptions,Y=!!x.items.markdownEnumDescriptions);let ee=!1;x.type==="object"&&!x.additionalProperties&&x.properties&&Object.keys(x.properties).length&&(ee=Object.keys(x.properties).every(oe=>x.properties[oe].type==="boolean"));let ie=!1;S.OVERRIDE_PROPERTY_REGEX.test(z)&&(ie=!0);let re;if(!ie){const oe=x;oe&&oe.defaultValueSource&&(re=oe.defaultValueSource)}O.push({key:z,value:H,description:U,descriptionIsMarkdown:!!x.markdownDescription,range:e.nullRange,keyRange:e.nullRange,valueRange:e.nullRange,descriptionRanges:[],overrides:$,scope:x.scope,type:x.type,arrayItemType:q,objectProperties:X,objectPatternProperties:G,objectAdditionalProperties:Q,enum:j,enumDescriptions:K,enumDescriptionsAreMarkdown:Y,uniqueItems:x.uniqueItems,tags:x.tags,disallowSyncIgnore:x.disallowSyncIgnore,restricted:x.restricted,extensionInfo:P,deprecationMessage:x.markdownDeprecationMessage||x.deprecationMessage,deprecationMessageIsMarkdown:!!x.markdownDeprecationMessage,validator:(0,l.createValidator)(x),enumItemLabels:x.enumItemLabels,allKeysAreBoolean:ee,editPresentation:x.editPresentation,order:x.order,nonLanguageSpecificDefaultValueSource:re,isLanguageTagSetting:ie,categoryLabel:B,categoryOrder:V})}}return O}parseOverrideSettings(M){return Object.keys(M).map(O=>({key:O,value:M[O],description:[],descriptionIsMarkdown:!1,range:e.nullRange,keyRange:e.nullRange,valueRange:e.nullRange,descriptionRanges:[],overrides:[]}))}matchesScope(M){return M.scope?this.target===6?c.FOLDER_SCOPES.indexOf(M.scope)!==-1:this.target===5?c.WORKSPACE_SCOPES.indexOf(M.scope)!==-1:!0:!0}compareConfigurationNodes(M,O){if(typeof M.order!="number")return 1;if(typeof O.order!="number")return-1;if(M.order===O.order){const N=M.title||"",P=O.title||"";return N.localeCompare(P)}return M.order-O.order}toContent(M,O){const N=new m;for(let P=O;P<M.length;P++)N.pushGroup(M[P],P===O,P===M.length-1);return N.getContent()}}e.DefaultSettings=h;class v extends d{constructor(M,O,N){super(),this._uri=M,this.defaultSettings=N,this._onDidChangeGroups=this._register(new p.Emitter),this.onDidChangeGroups=this._onDidChangeGroups.event,this._register(N.onDidChange(()=>this._onDidChangeGroups.fire())),this._model=O.object.textEditorModel,this._register(this.onWillDispose(()=>O.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 M=[...this._currentResultGroups.values()].sort((z,x)=>z.order-x.order),O=M.filter(z=>z.result.filterMatches.length),N=(0,t.tail)(this.settingsGroups).range.endLineNumber+2,{settingsGroups:P,matches:B}=this.writeResultGroups(O,N),V=this.collectMetadata(M);return M.length?{allGroups:this.settingsGroups,filteredGroups:P,matches:B,metadata:V}:void 0}writeResultGroups(M,O){const N=O-1,P=new m(N),B=[],V=[];M.length&&(P.pushLine(","),M.forEach($=>{const q=this.getGroup($);B.push(q),V.push(...this.writeSettingsGroupToBuilder(P,q,$.result.filterMatches))}));const z=P.getContent()+` `,x=this._model.getLineCount(),H=new E.Selection(O,1,O,1),W={text:z,forceMoveMarkers:!0,range:new k.Range(O,1,x,1)};this._model.pushEditOperations([H],[W],()=>[H]);const U=Math.min(O+60,this._model.getLineCount());return this._model.tokenization.forceTokenization(U),{matches:V,settingsGroups:B}}writeSettingsGroupToBuilder(M,O,N){return N=N.map(B=>({setting:B.setting,score:B.score,matches:B.matches&&B.matches.map(V=>new k.Range(V.startLineNumber-B.setting.range.startLineNumber,V.startColumn,V.endLineNumber-B.setting.range.startLineNumber,V.endColumn))})),M.pushGroup(O),(0,t.flatten)(N.map(B=>B.matches||[]).map((B,V)=>{const z=O.sections[0].settings[V];return B.map(x=>new k.Range(x.startLineNumber+z.range.startLineNumber,x.startColumn,x.endLineNumber+z.range.startLineNumber,x.endColumn))}))}copySetting(M){return{description:M.description,scope:M.scope,type:M.type,enum:M.enum,enumDescriptions:M.enumDescriptions,key:M.key,value:M.value,range:M.range,overrides:[],overrideOf:M.overrideOf,tags:M.tags,deprecationMessage:M.deprecationMessage,keyRange:e.nullRange,valueRange:e.nullRange,descriptionIsMarkdown:void 0,descriptionRanges:[]}}findValueMatches(M,O){return[]}getPreference(M){for(const O of this.settingsGroups)for(const N of O.sections)for(const P of N.settings)if(P.key===M)return P}getGroup(M){return{id:M.id,range:e.nullRange,title:M.label,titleRange:e.nullRange,sections:[{settings:M.result.filterMatches.map(O=>this.copySetting(O.setting))}]}}}e.DefaultSettingsEditorModel=v;class m{get lineCountWithOffset(){return this._contentByLines.length+this._rangeOffset}get lastLine(){return this._contentByLines[this._contentByLines.length-1]||""}constructor(M=0){this._rangeOffset=M,this._contentByLines=[]}pushLine(...M){this._contentByLines.push(...M)}pushGroup(M,O,N){this._contentByLines.push(O?"[{":"{");const P=this._pushGroup(M," ");if(P){const B=P.range.endLineNumber-this._rangeOffset,V=this._contentByLines[B-2];this._contentByLines[B-2]=V.substring(0,V.length-1)}this._contentByLines.push(N?"}]":"},")}_pushGroup(M,O){let N=null;const P=this.lineCountWithOffset+1;for(const B of M.sections){if(B.title){const V=this.lineCountWithOffset+1;this.addDescription([B.title],O,this._contentByLines),B.titleRange={startLineNumber:V,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}if(B.settings.length)for(const V of B.settings)this.pushSetting(V,O),N=V}return M.range={startLineNumber:P,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length},N}getContent(){return this._contentByLines.join(` `)}pushSetting(M,O){const N=this.lineCountWithOffset+1;this.pushSettingDescription(M,O);let P=O;P+=JSON.stringify(M.key),M.keyRange={startLineNumber:this.lineCountWithOffset+1,startColumn:P.indexOf(M.key)+1,endLineNumber:this.lineCountWithOffset+1,endColumn:M.key.length},P+=": ";const V=this.lineCountWithOffset+1;this.pushValue(M,P,O),M.valueRange={startLineNumber:V,startColumn:P.length+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length+1},this._contentByLines[this._contentByLines.length-1]+=",",this._contentByLines.push(""),M.range={startLineNumber:N,startColumn:1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length}}pushSettingDescription(M,O){const N=V=>V.replace(/`#(.*)#`/g,(z,x)=>`\`${x}\``);M.descriptionRanges=[];const P=O+"// ",B=M.deprecationMessage?.split(/\n/g)??[];for(let V of[...B,...M.description])V=N(V),this._contentByLines.push(P+V),M.descriptionRanges.push({startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(V)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length});M.enumDescriptions&&M.enumDescriptions.some(V=>!!V)&&M.enumDescriptions.forEach((V,z)=>{const x=y(String(M.enum[z])),H=V?`${x}: ${N(V)}`:x,W=H.split(/\n/g);W[0]=" - "+W[0],this._contentByLines.push(...W.map(U=>`${O}// ${U}`)),M.descriptionRanges.push({startLineNumber:this.lineCountWithOffset,startColumn:this.lastLine.indexOf(H)+1,endLineNumber:this.lineCountWithOffset,endColumn:this.lastLine.length})})}pushValue(M,O,N){const P=JSON.stringify(M.value,null,N);if(P&&typeof M.value=="object")if(M.overrides&&M.overrides.length){this._contentByLines.push(O+" {");for(const z of M.overrides)this.pushSetting(z,N+N),this._contentByLines.pop();const B=M.overrides[M.overrides.length-1],V=this._contentByLines[B.range.endLineNumber-2];this._contentByLines[B.range.endLineNumber-2]=V.substring(0,V.length-1),this._contentByLines.push(N+"}")}else{const B=P.split(` `);this._contentByLines.push(O+B[0]);for(let V=1;V<B.length;V++)this._contentByLines.push(N+B[V])}else this._contentByLines.push(O+P)}addDescription(M,O,N){for(const P of M)N.push(O+"// "+P)}}class w extends m{constructor(M=" "){super(0),this.indent=M}pushGroup(M){this._pushGroup(M,this.indent)}}class D extends A.Disposable{constructor(M){super(),this.defaultSettings=M,this._content=null,this._register(M.onDidChange(()=>this._content=null))}get content(){if(this._content===null){const M=new w;M.pushLine("{");for(const O of this.defaultSettings.getRegisteredGroups())M.pushGroup(O);M.pushLine("}"),this._content=M.getContent()}return this._content}}e.DefaultRawSettingsEditorModel=D;function y(L){return L&&L.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function T(L){return"// "+I.localize(1,null)+` `+L.getDefaultKeybindingsContent()}e.defaultKeybindingsContents=T;let _=class{constructor(M,O){this._uri=M,this.keybindingService=O}get uri(){return this._uri}get content(){return this._content||(this._content=T(this.keybindingService)),this._content}getPreference(){return null}dispose(){}};_=we([F(1,C.IKeybindingService)],_),e.DefaultKeybindingsEditorModel=_}),define(ae[2689],le([1,0,106,16,28,17,55,96,5,2,269,172,82,120,25,32,21,463,8,46,35]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingMatches=e.LocalSearchProvider=e.PreferencesSearchService=void 0;let a=class extends b.Disposable{constructor(_,L,M,O,N){super(),this.instantiationService=_,this.configurationService=L,this.productService=M,this.extensionManagementService=O,this.extensionEnablementService=N,this._installedExtensions=this.extensionManagementService.getInstalled(1).then(P=>P.filter(B=>this.extensionEnablementService.isEnabled(B)).filter(B=>B.manifest&&B.manifest.contributes&&B.manifest.contributes.configuration).filter(B=>!!B.identifier.uuid))}get remoteSearchAllowed(){return this.configurationService.getValue().workbench.settings.enableNaturalLanguageSearch?!!this._endpoint.urlBase:!1}get _endpoint(){const _=this.configurationService.getValue().workbench.settings;return _.naturalLanguageSearchEndpoint?{urlBase:_.naturalLanguageSearchEndpoint,key:_.naturalLanguageSearchKey}:{urlBase:this.productService.settingsSearchUrl}}getRemoteSearchProvider(_,L=!1){const M={filter:_,newExtensionsOnly:L,endpoint:this._endpoint};return this.remoteSearchAllowed?this.instantiationService.createInstance(g,M,this._installedExtensions):void 0}getLocalSearchProvider(_){return this.instantiationService.createInstance(o,_)}};a=we([F(0,I.IInstantiationService),F(1,s.IConfigurationService),F(2,d.IProductService),F(3,r.IExtensionManagementService),F(4,u.IWorkbenchExtensionEnablementService)],a),e.PreferencesSearchService=a;let o=class wr{constructor(_,L){this._filter=_,this.configurationService=L,this._filter=this._filter.replace(/[":]/g," ").replace(/ /g," ").trim()}searchModel(_,L){if(!this._filter)return Promise.resolve(null);let M=wr.START_SCORE;const O=P=>{const{matches:B,matchType:V}=new y(this._filter,P,!0,!0,(x,H)=>_.findValueMatches(x,H),this.configurationService),z=this._filter===P.key?wr.EXACT_MATCH_SCORE:M--;return B&&B.length?{matches:B,matchType:V,score:z}:null},N=_.filterSettings(this._filter,this.getGroupFilter(this._filter),O);return N[0]&&N[0].score===wr.EXACT_MATCH_SCORE?Promise.resolve({filterMatches:N.slice(0,1),exactMatch:!0}):Promise.resolve({filterMatches:N})}getGroupFilter(_){const L=R.createRegExp(_,!1,{global:!0});return M=>L.test(M.title)}};o.EXACT_MATCH_SCORE=1e4,o.START_SCORE=1e3,o=we([F(1,s.IConfigurationService)],o),e.LocalSearchProvider=o;let g=class gn{constructor(_,L,M,O,N,P){this.options=_,this.installedExtensions=L,this.productService=M,this.requestService=O,this.logService=N,this.configurationService=P,this._remoteSearchP=this.options.filter?Promise.resolve(this.getSettingsForFilter(this.options.filter)):Promise.resolve(null)}searchModel(_,L){return this._remoteSearchP.then(M=>{if(!M)return null;if(L&&L.isCancellationRequested)throw new c.CancellationError;const O=Object.keys(M.scoredResults),N=(0,p.top)(O,(V,z)=>M.scoredResults[z].score-M.scoredResults[V].score,1)[0],B=(N?M.scoredResults[N].score:0)/5;if(this.options.newExtensionsOnly)return this.installedExtensions.then(V=>{const z=Math.max(gn.NEW_EXTENSIONS_MIN_SCORE,B);return{filterMatches:O.filter(W=>{const U=M.scoredResults[W],$=(U.extensionPublisher+"."+U.extensionName).toLowerCase();return!V.some(q=>q.identifier.id.toLowerCase()===$)}).filter(W=>M.scoredResults[W].score>=z).map(W=>{const U=M.scoredResults[W];return{setting:D(U),score:U.score,matches:[],matchType:t.SettingMatchType.None}}),metadata:M}});{const V=this.getRemoteSettingMatcher(M.scoredResults,B,_);return{filterMatches:_.filterSettings(this.options.filter,x=>null,V),metadata:M}}})}async getSettingsForFilter(_){const L=[];for(let M=0;M<gn.MAX_REQUESTS;M++){const O=await this.prepareRequest(_,M);if(L.push(O),!O.hasMoreFilters)break}return Promise.all(L.map(M=>this.getSettingsFromBing(M))).then(M=>{const O=M[0];O.requestCount=1;for(const N of M.slice(1))O.requestCount++,O.scoredResults={...O.scoredResults,...N.scoredResults};return O})}getSettingsFromBing(_){this.logService.debug(`Searching settings via ${_.url}`),_.body&&this.logService.debug(`Body: ${_.body}`);const L=_.body?"post":"get",M={"User-Agent":"request","Content-Type":"application/json; charset=utf-8"};this.options.endpoint.key&&(M["api-key"]=this.options.endpoint.key);const O=Date.now();return this.requestService.request({type:L,url:_.url,data:_.body,headers:M,timeout:5e3},f.CancellationToken.None).then(N=>{if(typeof N.res.statusCode=="number"&&N.res.statusCode>=300)throw new Error(`${JSON.stringify(_)} returned status code: ${N.res.statusCode}`);return(0,C.asJson)(N)}).then(N=>{const P=Date.now(),B=P-O,V=(N.value||[]).map(x=>{const H=JSON.parse(x.setting||x.Setting),W=x.packageid,U=h(H,W),$=x.value,q=$&&JSON.parse($),X=x.packagename;let G,Q;return X&&X.indexOf("##")>=0&&([Q,G]=X.split("##")),{key:H,id:U,defaultValue:q,score:x["@search.score"],description:JSON.parse(x.details),packageId:W,extensionName:G,extensionPublisher:Q}}),z=Object.create(null);return V.forEach(x=>{z[x.id]=x}),{requestUrl:_.url,requestBody:_.body,duration:B,timestamp:P,scoredResults:z,context:N["@odata.context"]}})}getRemoteSettingMatcher(_,L,M){return(O,N)=>{const P=_[h(O.key,N.id)]||_[h(O.key,"core")]||_[h(O.key)];if(P&&P.score>=L){const{matches:B,matchType:V}=new y(this.options.filter,O,!1,!0,(z,x)=>M.findValueMatches(z,x),this.configurationService);return{matches:B,matchType:V,score:P.score}}return null}}async prepareRequest(_,L=0){const M=_;_=w(_);const N=`(${_})^${10}`;_=_.replace(/\ +/g,"~ ")+"~";const P=encodeURIComponent(N+" || "+_);let B=`${this.options.endpoint.urlBase}`;this.options.endpoint.key&&(B+=`${v}&${m}`);const V=await this.installedExtensions,z=this.options.newExtensionsOnly?["diminish eq 'latest'"]:this.getVersionFilters(V,this.productService.settingsSearchBuildId),x=z.slice(L*gn.MAX_REQUEST_FILTERS,(L+1)*gn.MAX_REQUEST_FILTERS).join(" or "),H=z.length>(L+1)*gn.MAX_REQUEST_FILTERS,W=JSON.stringify({search:P,filters:encodeURIComponent(x),rawQuery:encodeURIComponent(M)});return{url:B,body:W,hasMoreFilters:H}}getVersionFilters(_,L){const M=_.filter(O=>O.manifest.contributes&&O.manifest.contributes.configuration).map(O=>this.getExtensionFilter(O));return L&&M.push(`(packageid eq 'core' and startbuildno le '${L}' and endbuildno ge '${L}')`),M}getExtensionFilter(_){const L=_.identifier.uuid,M=_.manifest.version.split(".").map(O=>String(O).padStart(10),"0").join("");return`(packageid eq '${L}' and startbuildno le '${M}' and endbuildno ge '${M}')`}};g.MAX_REQUEST_FILTERS=42,g.MAX_REQUESTS=10,g.NEW_EXTENSIONS_MIN_SCORE=1,g=we([F(2,d.IProductService),F(3,C.IRequestService),F(4,i.ILogService),F(5,s.IConfigurationService)],g);function h(T,_){return _?_+"##"+T:T}const v="api-version=2016-09-01-Preview",m="querytype=full";function w(T){return T.replace(/\./g," ").replace(/[\\/+\-&|!"~*?:(){}\[\]\^]/g,"\\$&").replace(/ /g," ").trim()}function D(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 ll{constructor(_,L,M,O,N,P){this.requireFullQueryMatch=M,this.searchDescription=O,this.valuesMatcher=N,this.configurationService=P,this.descriptionMatchingWords=new Map,this.keyMatchingWords=new Map,this.valueMatchingWords=new Map,this.matchType=t.SettingMatchType.None,this.matches=(0,p.distinct)(this._findMatchesInSetting(_,L),B=>`${B.startLineNumber}_${B.startColumn}_${B.endLineNumber}_${B.endColumn}_`)}_findMatchesInSetting(_,L){const M=this._doFindMatchesInSetting(_,L);if(L.overrides&&L.overrides.length)for(const O of L.overrides){const N=new ll(_,O,this.requireFullQueryMatch,this.searchDescription,this.valuesMatcher,this.configurationService),P=_.split(" "),B=this.getRangesForWords(P,this.descriptionMatchingWords,[N.descriptionMatchingWords,N.keyMatchingWords,N.valueMatchingWords]),V=this.getRangesForWords(P,this.keyMatchingWords,[N.descriptionMatchingWords,N.keyMatchingWords,N.valueMatchingWords]),z=this.getRangesForWords(P,N.keyMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,N.valueMatchingWords]),x=this.getRangesForWords(P,N.valueMatchingWords,[this.descriptionMatchingWords,this.keyMatchingWords,N.keyMatchingWords]);M.push(...B,...V,...z,...x),M.push(...N.matches),this.refreshMatchType(V.length+z.length),this.matchType|=N.matchType}return M}_doFindMatchesInSetting(_,L){const O=A.Registry.as(k.Extensions.Configuration).getConfigurationProperties()[L.key],N=_.split(" "),P=L.key.split(".").join(" "),B=this.configurationService.getValue(L.key);for(const W of N){if(this.searchDescription)for(let q=0;q<L.description.length;q++){const X=(0,E.matchesWords)(W,L.description[q],!0);X&&this.descriptionMatchingWords.set(W,X.map(G=>this.toDescriptionRange(L,G,q))),this.checkForWholeWordMatchType(W,L.description[q])}const U=(0,E.or)(E.matchesWords,E.matchesCamelCase)(W,P);U&&this.keyMatchingWords.set(W,U.map(q=>this.toKeyRange(L,q))),this.checkForWholeWordMatchType(W,P);const $=typeof B=="string"?(0,E.matchesContiguousSubString)(W,B):null;$?this.valueMatchingWords.set(W,$.map(q=>this.toValueRange(L,q))):O&&O.enum&&O.enum.some(q=>typeof q=="string"&&!!(0,E.matchesContiguousSubString)(W,q))&&this.valueMatchingWords.set(W,[]),typeof B=="string"&&this.checkForWholeWordMatchType(W,B)}const V=[];if(this.searchDescription){for(let W=0;W<L.description.length;W++){const U=(0,E.or)(E.matchesContiguousSubString)(_,L.description[W]||"")||[];V.push(...U.map($=>this.toDescriptionRange(L,$,W)))}V.length===0&&V.push(...this.getRangesForWords(N,this.descriptionMatchingWords,[this.keyMatchingWords,this.valueMatchingWords]))}const z=(0,E.or)(E.matchesPrefix,E.matchesContiguousSubString)(_,L.key),x=z?z.map(W=>this.toKeyRange(L,W)):this.getRangesForWords(N,this.keyMatchingWords,[this.descriptionMatchingWords,this.valueMatchingWords]);let H=[];if(typeof B=="string"&&B){const W=(0,E.or)(E.matchesPrefix,E.matchesContiguousSubString)(_,B);H=W?W.map(U=>this.toValueRange(L,U)):this.getRangesForWords(N,this.valueMatchingWords,[this.keyMatchingWords,this.descriptionMatchingWords])}else H=this.valuesMatcher(_,L);return this.refreshMatchType(x.length),[...V,...x,...H]}checkForWholeWordMatchType(_,L){_=_.toLowerCase().replace(/[\s-\._]+$/,""),L=L.toLowerCase(),new RegExp(`\\b${R.escapeRegExpCharacters(_)}\\b`).test(L)&&(this.matchType|=t.SettingMatchType.WholeWordMatch)}refreshMatchType(_){_&&(this.matchType|=t.SettingMatchType.KeyMatch)}getRangesForWords(_,L,M){const O=[];for(const N of _){const P=L.get(N);if(P)O.push(...P);else if(this.requireFullQueryMatch&&M.every(B=>!B.has(N)))return[]}return O}toKeyRange(_,L){return{startLineNumber:_.keyRange.startLineNumber,startColumn:_.keyRange.startColumn+L.start,endLineNumber:_.keyRange.startLineNumber,endColumn:_.keyRange.startColumn+L.end}}toDescriptionRange(_,L,M){return{startLineNumber:_.descriptionRanges[M].startLineNumber,startColumn:_.descriptionRanges[M].startColumn+L.start,endLineNumber:_.descriptionRanges[M].endLineNumber,endColumn:_.descriptionRanges[M].startColumn+L.end}}toValueRange(_,L){return{startLineNumber:_.valueRange.startLineNumber,startColumn:_.valueRange.startColumn+L.start+1,endLineNumber:_.valueRange.startLineNumber,endColumn:_.valueRange.startColumn+L.end+1}}};y=we([F(5,s.IConfigurationService)],y),e.SettingMatches=y,(0,n.registerSingleton)(S.IPreferencesSearchService,a,1)}),define(ae[682],le([1,0,6,2,66]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractProgressScope=e.ScopedProgressIndicator=e.EditorProgressIndicator=void 0;class A extends p.Disposable{constructor(S,C){super(),this.progressBar=S,this.group=C,this.registerListeners()}registerListeners(){this._register(this.group.onDidModelChange(S=>{(S.kind===6||S.kind===4&&this.group.isEmpty)&&this.progressBar.stop().hide()}))}show(S,C){return this.group.isEmpty?R.emptyProgressRunner:S===!0?this.doShow(!0,C):this.doShow(S,C)}doShow(S,C){return typeof S=="boolean"?this.progressBar.infinite().show(C):this.progressBar.total(S).show(C),{total:r=>{this.progressBar.total(r)},worked:r=>{this.progressBar.hasTotal()?this.progressBar.worked(r):this.progressBar.infinite().show()},done:()=>{this.progressBar.stop().hide()}}}async showWhile(S,C){if(this.group.isEmpty)try{await S}catch{}return this.doShowWhile(S,C)}async doShowWhile(S,C){try{this.progressBar.infinite().show(C),await S}catch{}finally{this.progressBar.stop().hide()}}}e.EditorProgressIndicator=A;var k;(function(b){let S;(function(u){u[u.None=0]="None",u[u.Done=1]="Done",u[u.Infinite=2]="Infinite",u[u.While=3]="While",u[u.Work=4]="Work"})(S=b.Type||(b.Type={})),b.None={type:0},b.Done={type:1},b.Infinite={type:2};class C{constructor(i,f,c){this.whilePromise=i,this.whileStart=f,this.whileDelay=c,this.type=3}}b.While=C;class r{constructor(i,f){this.total=i,this.worked=f,this.type=4}}b.Work=r})(k||(k={}));class E extends p.Disposable{constructor(S,C){super(),this.progressBar=S,this.scope=C,this.progressState=k.None,this.registerListeners()}registerListeners(){this._register(this.scope.onDidChangeActive(()=>{this.scope.isActive?this.onDidScopeActivate():this.onDidScopeDeactivate()}))}onDidScopeActivate(){if(this.progressState.type!==k.Done.type)if(this.progressState.type===3){let S;if(this.progressState.whileDelay>0){const C=this.progressState.whileDelay-(Date.now()-this.progressState.whileStart);C>0&&(S=C)}this.doShowWhile(S)}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(S,C){return typeof S=="boolean"?this.progressState=k.Infinite:this.progressState=new k.Work(S,void 0),this.scope.isActive&&(this.progressState.type===2?this.progressBar.infinite().show(C):this.progressState.type===4&&typeof this.progressState.total=="number"&&this.progressBar.total(this.progressState.total).show(C)),{total:r=>{this.progressState=new k.Work(r,this.progressState.type===4?this.progressState.worked:void 0),this.scope.isActive&&this.progressBar.total(r)},worked:r=>{!this.scope.isActive||this.progressBar.hasTotal()?(this.progressState=new k.Work(this.progressState.type===4?this.progressState.total:void 0,this.progressState.type===4&&typeof this.progressState.worked=="number"?this.progressState.worked+r:r),this.scope.isActive&&this.progressBar.worked(r)):(this.progressState=k.Infinite,this.progressBar.infinite().show())},done:()=>{this.progressState=k.Done,this.scope.isActive&&this.progressBar.stop().hide()}}}async showWhile(S,C){this.progressState.type===3&&(S=Promise.all([S,this.progressState.whilePromise])),this.progressState=new k.While(S,C||0,Date.now());try{this.doShowWhile(C),await S}catch{}finally{(this.progressState.type!==3||this.progressState.whilePromise===S)&&(this.progressState=k.None,this.scope.isActive&&this.progressBar.stop().hide())}}doShowWhile(S){this.scope.isActive&&this.progressBar.infinite().show(S)}}e.ScopedProgressIndicator=E;class I extends p.Disposable{get isActive(){return this._isActive}constructor(S,C){super(),this.scopeId=S,this._isActive=C,this._onDidChangeActive=this._register(new t.Emitter),this.onDidChangeActive=this._onDidChangeActive.event}onScopeOpened(S){S===this.scopeId&&(this._isActive||(this._isActive=!0,this._onDidChangeActive.fire()))}onScopeClosed(S){S===this.scopeId&&this._isActive&&(this._isActive=!1,this._onDidChangeActive.fire())}}e.AbstractProgressScope=I}),define(ae[955],le([1,0,1480,356,2,6,21,79,303,380,151,66,73,10,13,84,682,245,1116]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePart=void 0;class s extends b.Part{constructor(n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N){super(O,N,w,a,h),this.notificationService=n,this.storageService=a,this.telemetryService=o,this.contextMenuService=g,this.keybindingService=v,this.instantiationService=m,this.registry=D,this.activeCompositeSettingsKey=y,this.defaultCompositeId=T,this.nameForTelemetry=_,this.compositeCSSClass=L,this.titleForegroundColor=M,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 R.MutableDisposable),this.lastActiveCompositeId=a.get(y,1,this.defaultCompositeId)}openComposite(n,a){if(this.activeComposite?.getId()===n)return a&&this.activeComposite.focus(),this.activeComposite;if(!!this.element)return this.doOpenComposite(n,a)}doOpenComposite(n,a=!1){const o=p.defaultGenerator.nextId();this.currentCompositeOpenToken=o,this.activeComposite&&this.hideActiveComposite(),this.updateTitle(n);const g=this.createComposite(n,!0);if(!(this.currentCompositeOpenToken!==o||this.activeComposite&&this.activeComposite.getId()!==g.getId()))return this.activeComposite?.getId()===g.getId()?(a&&g.focus(),this.onDidCompositeOpen.fire({composite:g,focus:a}),g):(this.showComposite(g),a&&g.focus(),g&&this.onDidCompositeOpen.fire({composite:g,focus:a}),g)}createComposite(n,a){const o=this.instantiatedCompositeItems.get(n);if(o)return o.composite;const g=this.registry.getComposite(n);if(g){const h=this,v=new c.ScopedProgressIndicator((0,i.assertIsDefined)(this.progressBar),new class extends c.AbstractProgressScope{constructor(){super(g.id,!!a),this._register(h.onDidCompositeOpen.event(y=>this.onScopeOpened(y.composite.getId()))),this._register(h.onDidCompositeClose.event(y=>this.onScopeClosed(y.getId())))}}),m=this.instantiationService.createChild(new S.ServiceCollection([C.IEditorProgressService,v])),w=g.instantiate(m),D=new R.DisposableStore;return this.instantiatedCompositeItems.set(n,{composite:w,disposable:D,progress:v}),D.add(w.onTitleAreaUpdate(()=>this.onTitleAreaUpdate(w.getId()),this)),w}throw new Error(`Unable to find composite with id ${n}`)}showComposite(n){this.activeComposite=n;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 o=this.mapCompositeToCompositeContainer.get(n.getId());if(o||(o=(0,u.$)(".composite"),o.classList.add(...this.compositeCSSClass.split(" ")),o.id=n.getId(),n.create(o),n.updateStyles(),this.mapCompositeToCompositeContainer.set(n.getId(),o)),!this.activeComposite||n.getId()!==this.activeComposite.getId())return;this.getContentArea()?.appendChild(o),(0,u.show)(o);const h=(0,i.assertIsDefined)(this.toolBar);h.actionRunner=n.getActionRunner();const v=this.registry.getComposite(n.getId());v&&v.name!==n.getTitle()&&this.updateTitle(n.getId(),n.getTitle());let m=this.mapActionsBindingToComposite.get(n.getId());m||(m=this.collectCompositeActions(n),this.mapActionsBindingToComposite.set(n.getId(),m)),m(),this.telemetryActionsListener.value=h.actionRunner.onDidRun(w=>{w.error&&!(0,k.isCancellationError)(w.error)&&this.notificationService.error(w.error),this.telemetryService.publicLog2("workbenchActionExecuted",{id:w.action.id,from:this.nameForTelemetry})}),n.setVisible(!0),!(!this.activeComposite||n.getId()!==this.activeComposite.getId())&&this.contentAreaSize&&n.layout(this.contentAreaSize)}onTitleAreaUpdate(n){const a=this.instantiatedCompositeItems.get(n);if(a&&this.updateTitle(n,a.composite.getTitle()),this.activeComposite?.getId()===n){const o=this.collectCompositeActions(this.activeComposite);this.mapActionsBindingToComposite.set(this.activeComposite.getId(),o),o()}else this.mapActionsBindingToComposite.delete(n)}updateTitle(n,a){const o=this.registry.getComposite(n);if(!o||!this.titleLabel)return;a||(a=o.name);const g=this.keybindingService.lookupKeybinding(n);this.titleLabel.updateTitle(n,a,(0,i.withNullAsUndefined)(g?.getLabel())),(0,i.assertIsDefined)(this.toolBar).setAriaLabel((0,t.localize)(0,null,a))}collectCompositeActions(n){const a=n?.getMenuIds(),o=n?.getActions().slice(0)||[],g=n?.getSecondaryActions().slice(0)||[],h=(0,i.assertIsDefined)(this.toolBar);return h.context=this.actionsContextProvider(),()=>h.setActions((0,E.prepareActions)(o),(0,E.prepareActions)(g),a)}getActiveComposite(){return this.activeComposite}getLastActiveCompositetId(){return this.lastActiveCompositeId}hideActiveComposite(){if(!this.activeComposite)return;const n=this.activeComposite;this.activeComposite=void 0;const a=this.mapCompositeToCompositeContainer.get(n.getId());return n.setVisible(!1),a&&(a.remove(),(0,u.hide)(a)),this.progressBar?.stop().hide(),this.toolBar&&this.collectCompositeActions()(),this.onDidCompositeClose.fire(n),n}createTitleArea(n){const a=(0,u.append)(n,(0,u.$)(".composite"));a.classList.add("title"),this.titleLabel=this.createTitleLabel(a);const o=(0,u.append)(a,(0,u.$)(".title-actions"));return this.toolBar=this._register(this.instantiationService.createInstance(l.WorkbenchToolBar,o,{actionViewItemProvider:g=>this.actionViewItemProvider(g),orientation:0,getKeyBinding:g=>this.keybindingService.lookupKeybinding(g.id),anchorAlignmentProvider:()=>this.getTitleAreaDropDownAnchorAlignment(),toggleMenuTitle:(0,t.localize)(1,null)})),this.collectCompositeActions()(),a}createTitleLabel(n){const a=(0,u.append)(n,(0,u.$)(".title-label")),o=(0,u.append)(a,(0,u.$)("h2"));this.titleLabelElement=o;const g=this;return{updateTitle:(h,v,m)=>{(!this.activeComposite||this.activeComposite.getId()===h)&&(o.innerText=v,o.title=m?(0,t.localize)(2,null,v,m):v)},updateStyles:()=>{o.style.color=g.titleForegroundColor&&g.getColor(g.titleForegroundColor)||""}}}updateStyles(){super.updateStyles(),(0,i.assertIsDefined)(this.titleLabel).updateStyles()}actionViewItemProvider(n){return this.activeComposite?this.activeComposite.getActionViewItem(n):(0,f.createActionViewItem)(this.instantiationService,n)}actionsContextProvider(){return this.activeComposite?this.activeComposite.getActionsContext():null}createContentArea(n){const a=(0,u.append)(n,(0,u.$)(".content"));return this.progressBar=this._register(new I.ProgressBar(a)),this._register((0,r.attachProgressBarStyler)(this.progressBar,this.themeService)),this.progressBar.hide(),a}getProgressIndicator(n){const a=this.instantiatedCompositeItems.get(n);return a?a.progress:void 0}getTitleAreaDropDownAnchorAlignment(){return 1}layout(n,a,o,g){super.layout(n,a,o,g),this.contentAreaSize=u.Dimension.lift(super.layoutContents(n,a).contentSize),this.activeComposite?.layout(this.contentAreaSize)}removeComposite(n){if(this.activeComposite?.getId()===n)return!1;this.mapCompositeToCompositeContainer.delete(n),this.mapActionsBindingToComposite.delete(n);const a=this.instantiatedCompositeItems.get(n);return a&&(a.composite.dispose(),(0,R.dispose)(a.disposable),this.instantiatedCompositeItems.delete(n)),!0}dispose(){this.mapCompositeToCompositeContainer.clear(),this.mapActionsBindingToComposite.clear(),this.instantiatedCompositeItems.forEach(n=>{n.composite.dispose(),(0,R.dispose)(n.disposable)}),this.instantiatedCompositeItems.clear(),super.dispose()}}e.CompositePart=s}),define(ae[129],le([1,0,1524,6,33,73,80,10,2,36,79,17,38,37,27,12,754,8,45,7,13,5,15,84,323,41,182,254,303,682,147,9,63,29,626,245,627,137,151,721]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewAction=e.FilterViewPane=e.ViewPane=e.VIEWPANE_FILTER_ACTION=void 0,e.VIEWPANE_FILTER_ACTION=new b.Action("viewpane.action.filter");const z=(0,L.registerIcon)("view-pane-container-expanded",M.Codicon.chevronDown,t.localize(0,null)),x=(0,L.registerIcon)("view-pane-container-collapsed",M.Codicon.chevronRight,t.localize(1,null)),H=C.Registry.as(s.Extensions.ViewsRegistry);let W=class{get contents(){const G=this.items.filter(Q=>Q.visible);return G.length===0&&this.defaultItem?[this.defaultItem.descriptor]:G.map(Q=>Q.descriptor)}constructor(G,Q){this.id=G,this.contextKeyService=Q,this._onDidChange=new p.Emitter,this.onDidChange=this._onDidChange.event,this.items=[],this.disposables=new I.DisposableStore,Q.onDidChangeContext(this.onDidChangeContext,this,this.disposables),p.Event.filter(H.onDidChangeViewWelcomeContent,j=>j===this.id)(this.onDidChangeViewWelcomeContent,this,this.disposables),this.onDidChangeViewWelcomeContent()}onDidChangeViewWelcomeContent(){const G=H.getViewWelcomeContent(this.id);this.items=[];for(const Q of G)if(Q.when==="default")this.defaultItem={descriptor:Q,visible:!0};else{const j=Q.when?this.contextKeyService.contextMatchesRules(Q.when):!0;this.items.push({descriptor:Q,visible:j})}this._onDidChange.fire()}onDidChangeContext(){let G=!1;for(const Q of this.items){if(!Q.descriptor.when||Q.descriptor.when==="default")continue;const j=this.contextKeyService.contextMatchesRules(Q.descriptor.when);Q.visible!==j&&(Q.visible=j,G=!0)}G&&this._onDidChange.fire()}dispose(){this.disposables.dispose()}};W=we([F(1,d.IContextKeyService)],W);let U=class cl extends c.Pane{get title(){return this._title}get titleDescription(){return this._titleDescription}constructor(G,Q,j,K,Y,ee,ie,re,oe,se){super({...G,orientation:ee.getViewLocationById(G.id)===1?1:0}),this.keybindingService=Q,this.contextMenuService=j,this.configurationService=K,this.contextKeyService=Y,this.viewDescriptorService=ee,this.instantiationService=ie,this.openerService=re,this.themeService=oe,this.telemetryService=se,this._onDidFocus=this._register(new p.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new p.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidChangeBodyVisibility=this._register(new p.Emitter),this.onDidChangeBodyVisibility=this._onDidChangeBodyVisibility.event,this._onDidChangeTitleArea=this._register(new p.Emitter),this.onDidChangeTitleArea=this._onDidChangeTitleArea.event,this._onDidChangeViewWelcomeState=this._register(new p.Emitter),this.onDidChangeViewWelcomeState=this._onDidChangeViewWelcomeState.event,this._isVisible=!1,this.showActionsAlways=!1,this.viewWelcomeDisposable=I.Disposable.None,this.id=G.id,this._title=G.title,this._titleDescription=G.titleDescription,this.showActionsAlways=!!G.showActionsAlways,this.scopedContextKeyService=this._register(Y.createScoped(this.element)),this.scopedContextKeyService.createKey("view",this.id);const te=this.scopedContextKeyService.createKey("viewLocation",(0,s.ViewContainerLocationToString)(ee.getViewLocationById(this.id)));this._register(p.Event.filter(ee.onDidChangeLocation,Z=>Z.views.some(ne=>ne.id===this.id))(()=>te.set((0,s.ViewContainerLocationToString)(ee.getViewLocationById(this.id))))),this.menuActions=this._register(this.instantiationService.createChild(new V.ServiceCollection([d.IContextKeyService,this.scopedContextKeyService])).createInstance(O.CompositeMenuActions,G.titleMenuId??o.MenuId.ViewTitle,o.MenuId.ViewTitleContext,{shouldForwardArgs:!G.donotForwardArgs})),this._register(this.menuActions.onDidChange(()=>this.updateActions())),this.viewWelcomeController=new W(this.id,Y)}get headerVisible(){return super.headerVisible}set headerVisible(G){super.headerVisible=G,this.element.classList.toggle("merged-header",!G)}setVisible(G){this._isVisible!==G&&(this._isVisible=G,this.isExpanded()&&this._onDidChangeBodyVisibility.fire(G))}isVisible(){return this._isVisible}isBodyVisible(){return this._isVisible&&this.isExpanded()}setExpanded(G){const Q=super.setExpanded(G);return Q&&this._onDidChangeBodyVisibility.fire(G),this.twistiesContainer&&(this.twistiesContainer.classList.remove(...f.ThemeIcon.asClassNameArray(this.getTwistyIcon(!G))),this.twistiesContainer.classList.add(...f.ThemeIcon.asClassNameArray(this.getTwistyIcon(G)))),Q}render(){super.render();const G=(0,E.trackFocus)(this.element);this._register(G),this._register(G.onDidFocus(()=>this._onDidFocus.fire())),this._register(G.onDidBlur(()=>this._onDidBlur.fire()))}renderHeader(G){this.headerContainer=G,this.twistiesContainer=(0,E.append)(G,(0,E.$)(f.ThemeIcon.asCSSSelector(this.getTwistyIcon(this.isExpanded())))),this.renderHeaderTitle(G,this.title);const Q=(0,E.append)(G,(0,E.$)(".actions"));Q.classList.toggle("show",this.showActionsAlways),this.toolbar=this.instantiationService.createInstance(N.WorkbenchToolBar,Q,{orientation:0,actionViewItemProvider:K=>this.getActionViewItem(K),ariaLabel:t.localize(2,null,this.title),getKeyBinding:K=>this.keybindingService.lookupKeybinding(K.id),renderDropdownAsChildElement:!0,actionRunner:this.getActionRunner(),resetMenu:this.menuActions.menuId}),this._register(this.toolbar),this.setActions(),this._register((0,E.addDisposableListener)(Q,E.EventType.CLICK,K=>K.preventDefault())),this._register(this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)).onDidChangeContainerInfo(({title:K})=>{this.updateTitle(this.title)}));const j=p.Event.filter(this.configurationService.onDidChangeConfiguration,K=>K.affectsConfiguration(cl.AlwaysShowActionsConfig));this._register(j(this.updateActionsVisibility,this)),this.updateActionsVisibility()}getTwistyIcon(G){return G?z:x}style(G){super.style(G);const Q=this.getIcon();if(this.iconContainer){const j=G.headerForeground||this.themeService.getColorTheme().getColor(R.foreground);_.URI.isUri(Q)?(this.iconContainer.style.backgroundColor=j?j.toString():"",this.iconContainer.style.color=""):(this.iconContainer.style.color=j?j.toString():"",this.iconContainer.style.backgroundColor="")}}getIcon(){return this.viewDescriptorService.getViewDescriptorById(this.id)?.containerIcon||s.defaultViewIcon}renderHeaderTitle(G,Q){this.iconContainer=(0,E.append)(G,(0,E.$)(".icon",void 0));const j=this.getIcon();let K;if(_.URI.isUri(j)){K=`view-${this.id.replace(/[\.\:]/g,"-")}`;const ee=`.pane-header .icon.${K}`;(0,E.createCSSRule)(ee,` mask: ${(0,E.asCSSUrl)(j)} no-repeat 50% 50%; mask-size: 24px; -webkit-mask: ${(0,E.asCSSUrl)(j)} no-repeat 50% 50%; -webkit-mask-size: 16px; `)}else f.ThemeIcon.isThemeIcon(j)&&(K=f.ThemeIcon.asClassName(j));K&&this.iconContainer.classList.add(...K.split(" "));const Y=this.calculateTitle(Q);this.titleContainer=(0,E.append)(G,(0,E.$)("h3.title",{title:Y},Y)),this._titleDescription&&this.setTitleDescription(this._titleDescription),this.iconContainer.title=Y,this.iconContainer.setAttribute("aria-label",Y)}updateTitle(G){const Q=this.calculateTitle(G);this.titleContainer&&(this.titleContainer.textContent=Q,this.titleContainer.setAttribute("title",Q)),this.iconContainer&&(this.iconContainer.title=Q,this.iconContainer.setAttribute("aria-label",Q)),this._title=G,this._onDidChangeTitleArea.fire()}setTitleDescription(G){this.titleDescriptionContainer?(this.titleDescriptionContainer.textContent=G??"",this.titleDescriptionContainer.setAttribute("title",G??"")):G&&this.titleContainer&&(this.titleDescriptionContainer=(0,E.after)(this.titleContainer,(0,E.$)("span.description",{title:G},G)))}updateTitleDescription(G){this.setTitleDescription(G),this._titleDescription=G,this._onDidChangeTitleArea.fire()}calculateTitle(G){const Q=this.viewDescriptorService.getViewContainerByViewId(this.id),j=this.viewDescriptorService.getViewContainerModel(Q),K=this.viewDescriptorService.getViewDescriptorById(this.id);return!(this.viewDescriptorService.getDefaultContainerById(this.id)===Q)&&K?.containerTitle&&j.title!==K.containerTitle?`${K.containerTitle}: ${G}`:G}renderBody(G){this.bodyContainer=G;const Q=(0,E.append)(G,(0,E.$)(".welcome-view"));this.viewWelcomeContainer=(0,E.$)(".welcome-view-content",{tabIndex:0}),this.scrollableElement=this._register(new T.DomScrollableElement(this.viewWelcomeContainer,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3})),(0,E.append)(Q,this.scrollableElement.getDomNode());const j=p.Event.any(this.viewWelcomeController.onDidChange,this.onDidChangeViewWelcomeState);this._register(j(this.updateViewWelcome,this)),this.updateViewWelcome()}layoutBody(G,Q){this.viewWelcomeContainer.style.height=`${G}px`,this.viewWelcomeContainer.style.width=`${Q}px`,this.viewWelcomeContainer.classList.toggle("wide",Q>640),this.scrollableElement.scanDomNode()}onDidScrollRoot(){}getProgressIndicator(){if(this.progressBar===void 0&&(this.progressBar=this._register(new D.ProgressBar(this.element)),this._register((0,A.attachProgressBarStyler)(this.progressBar,this.themeService)),this.progressBar.hide()),this.progressIndicator===void 0){const G=this;this.progressIndicator=new y.ScopedProgressIndicator((0,n.assertIsDefined)(this.progressBar),new class extends y.AbstractProgressScope{constructor(){super(G.id,G.isBodyVisible()),this._register(G.onDidChangeBodyVisibility(Q=>Q?this.onScopeOpened(G.id):this.onScopeClosed(G.id)))}})}return 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(){if(this.toolbar){const G=[...this.menuActions.getPrimaryActions()];this.shouldShowFilterInHeader()&&G.unshift(e.VIEWPANE_FILTER_ACTION),this.toolbar.setActions((0,S.prepareActions)(G),(0,S.prepareActions)(this.menuActions.getSecondaryActions())),this.toolbar.context=this.getActionsContext()}}updateActionsVisibility(){if(!this.headerContainer)return;const G=this.configurationService.getValue("workbench.view.alwaysShowHeaderActions");this.headerContainer.classList.toggle("actions-always-visible",G)}updateActions(){this.setActions(),this._onDidChangeTitleArea.fire()}getActionViewItem(G,Q){if(G.id===e.VIEWPANE_FILTER_ACTION.id){const j=this;return new class extends B.BaseActionViewItem{constructor(){super(null,G)}setFocusable(){}get trapsArrowNavigation(){return!0}render(K){K.classList.add("viewpane-filter-container"),(0,E.append)(K,j.getFilterWidget().element)}}}return(0,g.createActionViewItem)(this.instantiationService,G,{...Q,menuAsChild:G instanceof o.SubmenuItemAction})}getActionsContext(){}getActionRunner(){}getOptimalWidth(){return 0}saveState(){}updateViewWelcome(){if(this.viewWelcomeDisposable.dispose(),!this.shouldShowWelcome()){this.bodyContainer.classList.remove("welcome"),this.viewWelcomeContainer.innerText="",this.scrollableElement.scanDomNode();return}const G=this.viewWelcomeController.contents;if(G.length===0){this.bodyContainer.classList.remove("welcome"),this.viewWelcomeContainer.innerText="",this.scrollableElement.scanDomNode();return}const Q=new I.DisposableStore;this.bodyContainer.classList.add("welcome"),this.viewWelcomeContainer.innerText="";for(const{content:j,precondition:K}of G){const Y=j.split(` `);for(let ee of Y){if(ee=ee.trim(),!ee)continue;const ie=(0,h.parseLinkedText)(ee);if(ie.nodes.length===1&&typeof ie.nodes[0]!="string"){const re=ie.nodes[0],oe=(0,E.append)(this.viewWelcomeContainer,(0,E.$)(".button-container")),se=new m.Button(oe,{title:re.title,supportIcons:!0});if(se.label=re.label,se.onDidClick(te=>{this.telemetryService.publicLog2("views.welcomeAction",{viewId:this.id,uri:re.href}),this.openerService.open(re.href,{allowCommands:!0})},null,Q),Q.add(se),Q.add((0,A.attachButtonStyler)(se,this.themeService)),K){const te=()=>se.enabled=this.contextKeyService.contextMatchesRules(K);te();const Z=new Set;K.keys().forEach(ce=>Z.add(ce)),p.Event.filter(this.contextKeyService.onDidChangeContext,ce=>ce.affectsSome(Z))(te,null,Q)}}else{const re=(0,E.append)(this.viewWelcomeContainer,(0,E.$)("p"));for(const oe of ie.nodes)if(typeof oe=="string")(0,E.append)(re,document.createTextNode(oe));else{const se=Q.add(this.instantiationService.createInstance(w.Link,re,oe,{}));if(K&&oe.href.startsWith("command:")){const te=()=>se.enabled=this.contextKeyService.contextMatchesRules(K);te();const Z=new Set;K.keys().forEach(ce=>Z.add(ce)),p.Event.filter(this.contextKeyService.onDidChangeContext,ce=>ce.affectsSome(Z))(te,null,Q)}}}}}this.scrollableElement.scanDomNode(),this.viewWelcomeDisposable=Q}shouldShowWelcome(){return!1}getFilterWidget(){}shouldShowFilterInHeader(){return!1}};U.AlwaysShowActionsConfig="workbench.view.alwaysShowHeaderActions",U=we([F(1,r.IKeybindingService),F(2,u.IContextMenuService),F(3,l.IConfigurationService),F(4,d.IContextKeyService),F(5,s.IViewDescriptorService),F(6,a.IInstantiationService),F(7,v.IOpenerService),F(8,f.IThemeService),F(9,i.ITelemetryService)],U),e.ViewPane=U;let $=class extends U{constructor(G,Q,j,K,Y,ee,ie,re,oe,se){super(G,Q,j,K,Y,ee,ie,re,oe,se),this.filterWidget=this._register(ie.createChild(new V.ServiceCollection([d.IContextKeyService,this.scopedContextKeyService])).createInstance(P.FilterWidget,G.filterOptions))}getFilterWidget(){return this.filterWidget}renderBody(G){super.renderBody(G),this.filterContainer=(0,E.append)(G,(0,E.$)(".viewpane-filter-container"))}layoutBody(G,Q){super.layoutBody(G,Q),this.dimension=new E.Dimension(Q,G);const j=!this.filterContainer?.hasChildNodes(),K=this.shouldShowFilterInHeader();j!==K&&(K&&(0,E.reset)(this.filterContainer),this.updateActions(),K||((0,E.append)(this.filterContainer,this.filterWidget.element),G=G-44)),this.filterWidget.layout(Q),this.layoutBodyContent(G,Q)}shouldShowFilterInHeader(){return!(this.dimension&&this.dimension.width<600&&this.dimension.height>100)}};$=we([F(1,r.IKeybindingService),F(2,u.IContextMenuService),F(3,l.IConfigurationService),F(4,d.IContextKeyService),F(5,s.IViewDescriptorService),F(6,a.IInstantiationService),F(7,v.IOpenerService),F(8,f.IThemeService),F(9,i.ITelemetryService)],$),e.FilterViewPane=$;class q extends o.Action2{constructor(G){super(G),this.desc=G}run(G,...Q){const j=G.get(s.IViewsService).getActiveViewWithId(this.desc.viewId);if(j)return this.runInView(G,j,...Q)}}e.ViewAction=q}),define(ae[2690],le([1,0,2,1583,7,6,856,15,129,520,71,627]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsFilters=void 0;const r=new R.RawContextKey("commentsView.showResolvedFilter",!0),u=new R.RawContextKey("commentsView.showUnResolvedFilter",!0);class i extends t.Disposable{constructor(c,l){super(),this.contextKeyService=l,this._onDidChange=this._register(new A.Emitter),this.onDidChange=this._onDidChange.event,this._showUnresolved=u.bindTo(this.contextKeyService),this._showResolved=r.bindTo(this.contextKeyService),this._showResolved.set(c.showResolved),this._showUnresolved.set(c.showUnresolved)}get showUnresolved(){return!!this._showUnresolved.get()}set showUnresolved(c){this._showUnresolved.get()!==c&&(this._showUnresolved.set(c),this._onDidChange.fire({showUnresolved:!0}))}get showResolved(){return!!this._showResolved.get()}set showResolved(c){this._showResolved.get()!==c&&(this._showResolved.set(c),this._onDidChange.fire({showResolved:!0}))}}e.CommentsFilters=i,(0,E.registerAction2)(class extends I.ViewAction{constructor(){super({id:"commentsFocusViewFromFilter",title:(0,p.localize)(0,null),keybinding:{when:k.CommentsViewFilterFocusContextKey,weight:200,primary:2066},viewId:b.COMMENTS_VIEW_ID})}async runInView(f,c){c.focus()}}),(0,E.registerAction2)(class extends I.ViewAction{constructor(){super({id:"commentsClearFilterText",title:(0,p.localize)(1,null),keybinding:{when:k.CommentsViewFilterFocusContextKey,weight:200,primary:9},viewId:b.COMMENTS_VIEW_ID})}async runInView(f,c){c.clearFilterText()}}),(0,E.registerAction2)(class extends I.ViewAction{constructor(){super({id:"commentsFocusFilter",title:(0,p.localize)(2,null),keybinding:{when:S.FocusedViewContext.isEqualTo(b.COMMENTS_VIEW_ID),weight:200,primary:2084},viewId:b.COMMENTS_VIEW_ID})}async runInView(f,c){c.focusFilter()}}),(0,E.registerAction2)(class extends I.ViewAction{constructor(){super({id:`workbench.actions.${b.COMMENTS_VIEW_ID}.toggleUnResolvedComments`,title:(0,p.localize)(3,null),category:(0,p.localize)(4,null),toggled:{condition:u,title:(0,p.localize)(5,null)},menu:{id:C.viewFilterSubmenu,group:"1_filter",when:R.ContextKeyExpr.equals("view",b.COMMENTS_VIEW_ID),order:1},viewId:b.COMMENTS_VIEW_ID})}async runInView(f,c){c.filters.showUnresolved=!c.filters.showUnresolved}}),(0,E.registerAction2)(class extends I.ViewAction{constructor(){super({id:`workbench.actions.${b.COMMENTS_VIEW_ID}.toggleResolvedComments`,title:(0,p.localize)(6,null),category:(0,p.localize)(7,null),toggled:{condition:r,title:(0,p.localize)(8,null)},menu:{id:C.viewFilterSubmenu,group:"1_filter",when:R.ContextKeyExpr.equals("view",b.COMMENTS_VIEW_ID),order:1},viewId:b.COMMENTS_VIEW_ID})}async runInView(f,c){c.filters.showResolved=!c.filters.showResolved}})}),define(ae[2691],le([1,0,10,303,11,2,60,1792,8,7,37,5,38,76,23,73,12,129,24,18,45,41,27,29,15,2378,395,43,32,6,305,1163]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlinePane=void 0;const _=new b.RawContextKey("outlineFollowsCursor",!1),L=new b.RawContextKey("outlineFiltersOnType",!1),M=new b.RawContextKey("outlineSortMode",0),O=new b.RawContextKey("outlineAllCollapsed",!1);class N{constructor(V,z){this._comparator=V,this.order=z}compare(V,z){return this.order===2?this._comparator.compareByType(V,z):this.order===1?this._comparator.compareByName(V,z):this._comparator.compareByPosition(V,z)}}let P=class extends l.ViewPane{constructor(V,z,x,H,W,U,$,q,X,G,Q,j,K,Y){super(V,X,Q,q,G,H,x,j,K,Y),this._outlineService=z,this._instantiationService=x,this._themeService=W,this._storageService=U,this._editorService=$,this._disposables=new A.DisposableStore,this._editorControlDisposables=new A.DisposableStore,this._editorPaneDisposables=new A.DisposableStore,this._outlineViewState=new v.OutlineViewState,this._editorListener=new A.MutableDisposable,this._treeStates=new k.LRUCache(10),this._outlineViewState.restore(this._storageService),this._disposables.add(this._outlineViewState),G.bufferChangeEvents(()=>{this._ctxFollowsCursor=_.bindTo(G),this._ctxFilterOnType=L.bindTo(G),this._ctxSortMode=M.bindTo(G),this._ctxAllCollapsed=O.bindTo(G)});const ee=()=>{this._ctxFollowsCursor.set(this._outlineViewState.followCursor),this._ctxFilterOnType.set(this._outlineViewState.filterOnType),this._ctxSortMode.set(this._outlineViewState.sortBy)};ee(),this._disposables.add(this._outlineViewState.onDidChange(ee))}dispose(){this._disposables.dispose(),this._editorPaneDisposables.dispose(),this._editorControlDisposables.dispose(),this._editorListener.dispose(),super.dispose()}focus(){this._tree?.domFocus()}renderBody(V){super.renderBody(V),this._domNode=V,V.classList.add("outline-pane");const z=t.$(".outline-progress");this._message=t.$(".outline-message"),this._progressBar=new p.ProgressBar(z),this._disposables.add((0,f.attachProgressBarStyler)(this._progressBar,this._themeService)),this._treeContainer=t.$(".outline-tree"),t.append(V,z,this._message,this._treeContainer),this._disposables.add(this.onDidChangeBodyVisibility(x=>{if(!x)this._editorListener.clear(),this._editorPaneDisposables.clear(),this._editorControlDisposables.clear();else if(!this._editorListener.value){const H=y.Event.any(this._editorService.onDidActiveEditorChange,this._outlineService.onDidChange);this._editorListener.value=H(()=>this._handleEditorChanged(this._editorService.activeEditorPane)),this._handleEditorChanged(this._editorService.activeEditorPane)}}))}layoutBody(V,z){super.layoutBody(V,z),this._tree?.layout(V,z),this._treeDimensions=new t.Dimension(z,V)}collapseAll(){this._tree?.collapseAll()}expandAll(){this._tree?.expandAll()}get outlineViewState(){return this._outlineViewState}_showMessage(V){this._domNode.classList.add("message"),this._progressBar.stop().hide(),this._message.innerText=V}_captureViewState(V){if(this._tree){const z=this._tree.getInput();if(V||(V=z?.uri),z&&V)return this._treeStates.set(`${z.outlineKind}/${V}`,this._tree.getViewState()),!0}return!1}_handleEditorChanged(V){this._editorPaneDisposables.clear(),V&&this._editorPaneDisposables.add(V.onDidChangeControl(()=>{this._handleEditorControlChanged(V)})),this._handleEditorControlChanged(V)}async _handleEditorControlChanged(V){const z=w.EditorResourceAccessor.getOriginalUri(V?.input),x=this._captureViewState();if(this._editorControlDisposables.clear(),!V||!this._outlineService.canCreateOutline(V)||!z)return this._showMessage((0,E.localize)(0,null));let H;x||(H=new R.TimeoutTimer(()=>{this._showMessage((0,E.localize)(1,null,(0,d.basename)(z)))},100)),this._progressBar.infinite().show(500);const W=new D.CancellationTokenSource;this._editorControlDisposables.add((0,A.toDisposable)(()=>W.dispose(!0)));const U=await this._outlineService.createOutline(V,1,W.token);if(H?.dispose(),!U)return;if(W.token.isCancellationRequested){U?.dispose();return}this._editorControlDisposables.add(U),this._progressBar.stop().hide();const $=new N(U.config.comparator,this._outlineViewState.sortBy),q=this._instantiationService.createInstance(u.WorkbenchDataTree,"OutlinePane",this._treeContainer,U.config.delegate,U.config.renderers,U.config.treeDataSource,{...U.config.options,sorter:$,expandOnDoubleClick:!1,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,hideTwistiesOfChildlessElements:!0,defaultFindMode:this._outlineViewState.filterOnType?T.TreeFindMode.Filter:T.TreeFindMode.Highlight,overrideStyles:{listBackground:this.getBackgroundColor()}}),X=()=>{if(U.isEmpty)this._showMessage((0,E.localize)(2,null,(0,d.basename)(z))),this._captureViewState(z),q.setInput(void 0);else if(q.getInput())this._domNode.classList.remove("message"),q.updateChildren();else{this._domNode.classList.remove("message");const K=this._treeStates.get(`${U.outlineKind}/${U.uri}`);q.setInput(U,K&&T.AbstractTreeViewState.lift(K))}};X(),this._editorControlDisposables.add(U.onDidChange(X)),q.findMode=this._outlineViewState.filterOnType?T.TreeFindMode.Filter:T.TreeFindMode.Highlight,this._editorControlDisposables.add(this.viewDescriptorService.onDidChangeLocation(({views:K})=>{K.some(Y=>Y.id===this.id)&&q.updateOptions({overrideStyles:{listBackground:this.getBackgroundColor()}})})),this._editorControlDisposables.add(q.onDidChangeFindMode(K=>this._outlineViewState.filterOnType=K===T.TreeFindMode.Filter)),this._editorControlDisposables.add(q.onDidOpen(K=>U.reveal(K.element,K.editorOptions,K.sideBySide)));const G=()=>{if(!this._outlineViewState.followCursor||!U.activeElement)return;let K=U.activeElement;for(;K;){if(q.getRelativeTop(K)===null&&q.reveal(K,.5),q.getRelativeTop(K)!==null){q.setFocus([K]),q.setSelection([K]);break}K=q.getParentElement(K)}};G(),this._editorControlDisposables.add(U.onDidChange(G)),this._editorControlDisposables.add(this._outlineViewState.onDidChange(K=>{this._outlineViewState.persist(this._storageService),K.filterOnType&&(q.findMode=this._outlineViewState.filterOnType?T.TreeFindMode.Filter:T.TreeFindMode.Highlight),K.followCursor&&G(),K.sortBy&&($.order=this._outlineViewState.sortBy,q.resort())}));let Q;this._editorControlDisposables.add(q.onDidChangeFindPattern(K=>{q.findMode!==T.TreeFindMode.Highlight&&(!Q&&K?(Q=q.getViewState(),q.expandAll()):!K&&Q&&(q.setInput(q.getInput(),Q),Q=void 0))}));const j=()=>{this._ctxAllCollapsed.set(q.getNode(null).children.every(K=>!K.collapsible||K.collapsed))};this._editorControlDisposables.add(q.onDidChangeCollapseState(j)),this._editorControlDisposables.add(q.onDidChangeModel(j)),j(),q.layout(this._treeDimensions?.height,this._treeDimensions?.width),this._tree=q,this._editorControlDisposables.add((0,A.toDisposable)(()=>{q.dispose(),this._tree=void 0}))}};P.Id="outline",P=we([F(1,m.IOutlineService),F(2,C.IInstantiationService),F(3,n.IViewDescriptorService),F(4,c.IThemeService),F(5,i.IStorageService),F(6,s.IEditorService),F(7,I.IConfigurationService),F(8,r.IKeybindingService),F(9,b.IContextKeyService),F(10,S.IContextMenuService),F(11,a.IOpenerService),F(12,c.IThemeService),F(13,o.ITelemetryService)],P),e.OutlinePane=P,(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.collapse",title:(0,E.localize)(3,null),f1:!1,icon:g.Codicon.collapseAll,menu:{id:h.MenuId.ViewTitle,group:"navigation",when:b.ContextKeyExpr.and(b.ContextKeyExpr.equals("view",P.Id),O.isEqualTo(!1))}})}runInView(V,z){z.collapseAll()}}),(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.expand",title:(0,E.localize)(4,null),f1:!1,icon:g.Codicon.expandAll,menu:{id:h.MenuId.ViewTitle,group:"navigation",when:b.ContextKeyExpr.and(b.ContextKeyExpr.equals("view",P.Id),O.isEqualTo(!0))}})}runInView(V,z){z.expandAll()}}),(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.followCursor",title:(0,E.localize)(5,null),f1:!1,toggled:_,menu:{id:h.MenuId.ViewTitle,group:"config",order:1,when:b.ContextKeyExpr.equals("view",P.Id)}})}runInView(V,z){z.outlineViewState.followCursor=!z.outlineViewState.followCursor}}),(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.filterOnType",title:(0,E.localize)(6,null),f1:!1,toggled:L,menu:{id:h.MenuId.ViewTitle,group:"config",order:2,when:b.ContextKeyExpr.equals("view",P.Id)}})}runInView(V,z){z.outlineViewState.filterOnType=!z.outlineViewState.filterOnType}}),(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.sortByPosition",title:(0,E.localize)(7,null),f1:!1,toggled:M.isEqualTo(0),menu:{id:h.MenuId.ViewTitle,group:"sort",order:1,when:b.ContextKeyExpr.equals("view",P.Id)}})}runInView(V,z){z.outlineViewState.sortBy=0}}),(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.sortByName",title:(0,E.localize)(8,null),f1:!1,toggled:M.isEqualTo(1),menu:{id:h.MenuId.ViewTitle,group:"sort",order:2,when:b.ContextKeyExpr.equals("view",P.Id)}})}runInView(V,z){z.outlineViewState.sortBy=1}}),(0,h.registerAction2)(class extends l.ViewAction{constructor(){super({viewId:P.Id,id:"outline.sortByKind",title:(0,E.localize)(9,null),f1:!1,toggled:M.isEqualTo(2),menu:{id:h.MenuId.ViewTitle,group:"sort",order:3,when:b.ContextKeyExpr.equals("view",P.Id)}})}runInView(V,z){z.outlineViewState.sortBy=2}})}),define(ae[2692],le([1,0,1835,129,10,216,5,37,7,38,12,76,8,45,80,41,27,878,649,88,407]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMRepositoriesViewPane=void 0;class n{getHeight(){return 22}getTemplateId(){return l.RepositoryRenderer.TEMPLATE_ID}}let a=class extends p.ViewPane{constructor(g,h,v,m,w,D,y,T,_,L,M){super(g,v,m,T,y,D,w,_,L,M),this.scmViewService=h}renderBody(g){super.renderBody(g);const h=(0,R.append)(g,(0,R.$)(".scm-view.scm-repositories-view")),v=new n,m=this.instantiationService.createInstance(l.RepositoryRenderer,(0,s.getActionViewItemProvider)(this.instantiationService)),w={getId:D=>D.provider.id};this.list=this.instantiationService.createInstance(C.WorkbenchList,"SCM Main",h,v,[m],{identityProvider:w,horizontalScrolling:!1,overrideStyles:{listBackground:i.SIDE_BAR_BACKGROUND},accessibilityProvider:{getAriaLabel(D){return D.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(D=>{D.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(g,h){super.layoutBody(g,h),this.list.layout(g,h)}updateBodySize(){if(this.orientation===1)return;const g=this.configurationService.getValue("scm.repositories.visible"),h=this.list.length===0,v=Math.min(this.list.length,g)*22;this.minimumBodySize=g===0?22:v,this.maximumBodySize=g===0||h?Number.POSITIVE_INFINITY:v}onListContextMenu(g){if(!g.element)return;const h=g.element.provider,m=this.scmViewService.menus.getRepositoryMenus(h).repositoryMenu,w=(0,s.collectContextMenuActions)(m);this.contextMenuService.showContextMenu({getAnchor:()=>g.anchor,getActions:()=>w,getActionsContext:()=>h})}onListSelectionChange(g){if(g.browserEvent&&g.elements.length>0){const h=this.list.scrollTop;this.scmViewService.visibleRepositories=g.elements,this.list.scrollTop=h}}updateListSelection(){const g=this.list.getSelection(),h=new Set(d.Iterable.map(g,y=>this.list.element(y))),v=new Set(this.scmViewService.visibleRepositories),m=new Set(d.Iterable.filter(v,y=>!h.has(y))),w=new Set(d.Iterable.filter(h,y=>!v.has(y)));if(m.size===0&&w.size===0)return;const D=g.filter(y=>!w.has(this.list.element(y)));for(let y=0;y<this.list.length;y++)m.has(this.list.element(y))&&D.push(y);this.list.setSelection(D),D.length>0&&D.indexOf(this.list.getFocus()[0])===-1&&(this.list.setAnchor(D[0]),this.list.setFocus([D[0]]))}};a=we([F(1,A.ISCMViewService),F(2,b.IKeybindingService),F(3,E.IContextMenuService),F(4,k.IInstantiationService),F(5,u.IViewDescriptorService),F(6,I.IContextKeyService),F(7,r.IConfigurationService),F(8,f.IOpenerService),F(9,S.IThemeService),F(10,c.ITelemetryService)],a),e.SCMRepositoriesViewPane=a}),define(ae[2693],le([1,0,16,29,99,13,50,20,59,1921,15,31,7,26,66,57,129,70,71,119,455,313,656,315,537,347,271,247,291,24,91,346,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"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.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.UnhideAllTestsAction=e.UnhideTestAction=e.HideTestAction=void 0;const M=l.Categories.Test;var O;(function(Le){Le[Le.Refresh=10]="Refresh",Le[Le.Run=11]="Run",Le[Le.Debug=12]="Debug",Le[Le.Coverage=13]="Coverage",Le[Le.RunUsing=14]="RunUsing",Le[Le.AutoRun=15]="AutoRun",Le[Le.Collapse=16]="Collapse",Le[Le.ClearResults=17]="ClearResults",Le[Le.DisplayMode=18]="DisplayMode",Le[Le.Sort=19]="Sort",Le[Le.GoToTest=20]="GoToTest",Le[Le.HideTest=21]="HideTest"})(O||(O={}));const N=r.ContextKeyGreaterExpr.create(g.TestingContextKeys.providerCount.key,0);class P extends S.Action2{constructor(){super({id:"testing.hideTest",title:(0,b.localize)(0,null),menu:{id:S.MenuId.TestItem,group:"builtin@2",when:g.TestingContextKeys.testItemIsHidden.isEqualTo(!1)}})}run(Me,...Oe){const Ke=Me.get(D.ITestService);for(const We of Oe)We instanceof n.TestItemTreeElement&&Ke.excluded.toggle(We.test,!0);return Promise.resolve()}}e.HideTestAction=P;class B extends S.Action2{constructor(){super({id:"testing.unhideTest",title:(0,b.localize)(1,null),menu:{id:S.MenuId.TestItem,order:21,when:g.TestingContextKeys.testItemIsHidden.isEqualTo(!0)}})}run(Me,...Oe){const Ke=Me.get(D.ITestService);for(const We of Oe)We instanceof n.TestItemTreeElement&&Ke.excluded.toggle(We.test,!1);return Promise.resolve()}}e.UnhideTestAction=B;class V extends S.Action2{constructor(){super({id:"testing.unhideAllTests",title:(0,b.localize)(2,null)})}run(Me){return Me.get(D.ITestService).excluded.clear(),Promise.resolve()}}e.UnhideAllTestsAction=V;const z=(Le,Me)=>[{id:S.MenuId.TestItem,group:"inline",order:Le,when:Me},{id:S.MenuId.TestItem,group:"builtin@1",order:Le,when:Me}];class x extends S.Action2{constructor(){super({id:"testing.debug",title:(0,b.localize)(3,null),icon:a.testingDebugIcon,menu:z(12,g.TestingContextKeys.hasDebuggableTests.isEqualTo(!0))})}run(Me,...Oe){return Me.get(D.ITestService).runTests({tests:Oe.flatMap(Ke=>[...Ke.tests]),group:4})}}e.DebugAction=x;class H extends S.Action2{constructor(){super({id:"testing.runUsing",title:(0,b.localize)(4,null),icon:a.testingDebugIcon,menu:{id:S.MenuId.TestItem,order:14,group:"builtin@2",when:g.TestingContextKeys.hasNonDefaultProfile.isEqualTo(!0)}})}async run(Me,...Oe){const Ke=Oe.filter(rt=>rt instanceof n.TestItemTreeElement);if(Ke.length===0)return;const We=Me.get(C.ICommandService),Xe=Me.get(D.ITestService),Je=await We.executeCommand("vscode.pickTestProfile",{onlyForTest:Ke[0].test});!Je||Xe.runResolvedTests({targets:[{profileGroup:Je.group,profileId:Je.profileId,controllerId:Je.controllerId,testIds:Ke.filter(rt=>(0,m.canUseProfileWithTest)(Je,rt.test)).map(rt=>rt.test.item.extId)}]})}}e.RunUsingProfileAction=H;class W extends S.Action2{constructor(){super({id:"testing.run",title:(0,b.localize)(5,null),icon:a.testingRunIcon,menu:z(11,g.TestingContextKeys.hasRunnableTests.isEqualTo(!0))})}run(Me,...Oe){return Me.get(D.ITestService).runTests({tests:Oe.flatMap(Ke=>[...Ke.tests]),group:2})}}e.RunAction=W;class U extends S.Action2{constructor(){super({id:"testing.selectDefaultTestProfiles",title:(0,b.localize)(6,null),icon:a.testingUpdateProfiles,category:M})}async run(Me,Oe){const Ke=Me.get(C.ICommandService),We=Me.get(m.ITestProfileService),Xe=await Ke.executeCommand("vscode.pickMultipleTestProfiles",{showConfigureButtons:!1,selected:We.getGroupDefaultProfiles(Oe),onlyGroup:Oe});Xe?.length&&We.setGroupDefaultProfiles(Oe,Xe)}}e.SelectDefaultTestProfiles=U;class $ extends S.Action2{constructor(){super({id:"testing.configureProfile",title:{value:(0,b.localize)(7,null),original:"Configure Test Profiles"},icon:a.testingUpdateProfiles,f1:!0,category:M,menu:{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.hasConfigurableProfile.isEqualTo(!0)}})}async run(Me,Oe){const Ke=Me.get(C.ICommandService),We=Me.get(m.ITestProfileService),Xe=await Ke.executeCommand("vscode.pickTestProfile",{placeholder:(0,b.localize)(8,null),showConfigureButtons:!1,onlyConfigurable:!0,onlyGroup:Oe});Xe&&We.configure(Xe.controllerId,Xe.profileId)}}e.ConfigureTestProfilesAction=$;class q extends c.ViewAction{constructor(Me,Oe){super({...Me,menu:[{id:S.MenuId.ViewTitle,order:Oe===2?11:Oe===4?12:13,group:"navigation",when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("view","workbench.view.testing"),g.TestingContextKeys.isRunning.isEqualTo(!1),g.TestingContextKeys.capabilityToContextKey[Oe].isEqualTo(!0))}],category:M,viewId:"workbench.view.testing"}),this.group=Oe}runInView(Me,Oe){const{include:Ke,exclude:We}=Oe.getSelectedOrVisibleItems();return Me.get(D.ITestService).runTests({tests:Ke,exclude:We,group:this.group})}}class X extends q{constructor(){super({id:"testing.runSelected",title:(0,b.localize)(9,null),icon:a.testingRunAllIcon},2)}}e.RunSelectedAction=X;class G extends q{constructor(){super({id:"testing.debugSelected",title:(0,b.localize)(10,null),icon:a.testingDebugAllIcon},4)}}e.DebugSelectedAction=G;const Q=(Le,Me)=>Le.withProgress({location:10,title:(0,b.localize)(11,null)},()=>Me);class j extends S.Action2{constructor(Me,Oe,Ke){super({...Me,category:M,menu:[{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.capabilityToContextKey[Oe].isEqualTo(!0)}]}),this.group=Oe,this.noTestsFoundError=Ke}async run(Me){const Oe=Me.get(D.ITestService),Ke=Me.get(u.INotificationService),We=[...Oe.collection.rootItems];if(!We.length){Ke.info(this.noTestsFoundError);return}await Oe.runTests({tests:We,group:this.group})}}class K extends j{constructor(){super({id:"testing.runAll",title:(0,b.localize)(12,null),icon:a.testingRunAllIcon,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,31)}},2,(0,b.localize)(13,null))}}e.RunAllAction=K;class Y extends j{constructor(){super({id:"testing.debugAll",title:(0,b.localize)(14,null),icon:a.testingDebugIcon,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2079)}},4,(0,b.localize)(15,null))}}e.DebugAllAction=Y;class ee extends S.Action2{constructor(){super({id:"testing.cancelRun",title:{value:(0,b.localize)(16,null),original:"Cancel Test Run"},icon:a.testingCancelIcon,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2102)},menu:{id:S.MenuId.ViewTitle,order:11,group:"navigation",when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("view","workbench.view.testing"),r.ContextKeyExpr.equals(g.TestingContextKeys.isRunning.serialize(),!0))}})}async run(Me){const Oe=Me.get(w.ITestResultService),Ke=Me.get(D.ITestService);for(const We of Oe.results)We.completedAt||Ke.cancelTestRun(We.id)}}e.CancelTestRunAction=ee;class ie extends c.ViewAction{constructor(){super({id:"testing.viewAsList",viewId:"workbench.view.testing",title:{value:(0,b.localize)(17,null),original:"View as List"},toggled:g.TestingContextKeys.viewMode.isEqualTo("list"),menu:{id:S.MenuId.ViewTitle,order:18,group:"viewAs",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Me,Oe){Oe.viewModel.viewMode="list"}}e.TestingViewAsListAction=ie;class re extends c.ViewAction{constructor(){super({id:"testing.viewAsTree",viewId:"workbench.view.testing",title:{value:(0,b.localize)(18,null),original:"View as Tree"},toggled:g.TestingContextKeys.viewMode.isEqualTo("true"),menu:{id:S.MenuId.ViewTitle,order:18,group:"viewAs",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Me,Oe){Oe.viewModel.viewMode="true"}}e.TestingViewAsTreeAction=re;class oe extends c.ViewAction{constructor(){super({id:"testing.sortByStatus",viewId:"workbench.view.testing",title:{value:(0,b.localize)(19,null),original:"Sort by Status"},toggled:g.TestingContextKeys.viewSorting.isEqualTo("status"),menu:{id:S.MenuId.ViewTitle,order:19,group:"sortBy",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Me,Oe){Oe.viewModel.viewSorting="status"}}e.TestingSortByStatusAction=oe;class se extends c.ViewAction{constructor(){super({id:"testing.sortByLocation",viewId:"workbench.view.testing",title:{value:(0,b.localize)(20,null),original:"Sort by Location"},toggled:g.TestingContextKeys.viewSorting.isEqualTo("location"),menu:{id:S.MenuId.ViewTitle,order:19,group:"sortBy",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Me,Oe){Oe.viewModel.viewSorting="location"}}e.TestingSortByLocationAction=se;class te extends c.ViewAction{constructor(){super({id:"testing.sortByDuration",viewId:"workbench.view.testing",title:{value:(0,b.localize)(21,null),original:"Sort by Duration"},toggled:g.TestingContextKeys.viewSorting.isEqualTo("duration"),menu:{id:S.MenuId.ViewTitle,order:19,group:"sortBy",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Me,Oe){Oe.viewModel.viewSorting="duration"}}e.TestingSortByDurationAction=te;class Z extends S.Action2{constructor(){super({id:"testing.showMostRecentOutput",title:{value:(0,b.localize)(22,null),original:"Show Output"},category:M,icon:p.Codicon.terminal,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2093)},precondition:g.TestingContextKeys.hasAnyResults.isEqualTo(!0),menu:[{id:S.MenuId.ViewTitle,order:16,group:"navigation",when:r.ContextKeyExpr.equals("view","workbench.view.testing")},{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.hasAnyResults.isEqualTo(!0)}]})}run(Me){const Oe=Me.get(w.ITestResultService).results[0];Me.get(o.ITestingOutputTerminalService).open(Oe)}}e.ShowMostRecentOutputAction=Z;class ne extends c.ViewAction{constructor(){super({id:"testing.collapseAll",viewId:"workbench.view.testing",title:{value:(0,b.localize)(23,null),original:"Collapse All Tests"},icon:p.Codicon.collapseAll,menu:{id:S.MenuId.ViewTitle,order:16,group:"displayAction",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}})}runInView(Me,Oe){Oe.viewModel.collapseAll()}}e.CollapseAllAction=ne;class ce extends S.Action2{constructor(){super({id:"testing.clearTestResults",title:{value:(0,b.localize)(24,null),original:"Clear All Results"},category:M,icon:p.Codicon.trash,menu:[{id:S.MenuId.TestPeekTitle},{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.hasAnyResults.isEqualTo(!0)},{id:S.MenuId.ViewTitle,order:17,group:"displayAction",when:r.ContextKeyExpr.equals("view","workbench.view.testing")}]})}run(Me){Me.get(w.ITestResultService).clear()}}e.ClearTestResultsAction=ce;class de extends S.Action2{constructor(){super({id:"testing.editFocusedTest",title:{value:(0,b.localize)(25,null),original:"Go to Test"},icon:p.Codicon.goToFile,menu:z(20,g.TestingContextKeys.testItemHasUri.isEqualTo(!0)),keybinding:{weight:100-10,when:s.FocusedViewContext.isEqualTo("workbench.view.testing"),primary:515}})}async run(Me,Oe,Ke){Oe&&Oe instanceof n.TestItemTreeElement&&Me.get(C.ICommandService).executeCommand("vscode.revealTest",Oe.test.item.extId,Ke)}}e.GoToTest=de;class he extends S.Action2{constructor(Me,Oe){super({...Me,menu:{id:S.MenuId.CommandPalette,when:N}}),this.group=Oe}async run(Me){const Oe=Me.get(y.IEditorService),Ke=Oe.activeEditorPane,We=Oe.activeTextEditorControl;if(!Ke||!We)return;const Xe=We?.getPosition(),Je=We?.getModel();if(!Xe||!Je||!("uri"in Je))return;const rt=Me.get(D.ITestService),je=Me.get(m.ITestProfileService),Ue=Me.get(f.IUriIdentityService),Fe=Me.get(i.IProgressService),He=Me.get(L.IConfigurationService);let Be=[],ze,nt=[],ut;(0,_.getTestingConfiguration)(He,"testing.saveBeforeTest")&&(await Oe.save({editor:Ke.input,groupId:Ke.group.id}),await rt.syncTests()),await Q(Fe,(async()=>{for await(const wt of(0,D.testsInFile)(rt,Ue,Je.uri)){if(!wt.item.range||!(je.capabilitiesForTest(wt)&this.group))continue;const It=E.Range.lift(wt.item.range);It.containsPosition(Xe)?ze&&E.Range.equalsRange(wt.item.range,ze)?Be.push(wt):(ze=It,Be=[wt]):k.Position.isBefore(It.getStartPosition(),Xe)&&(!ut||ut.getStartPosition().isBefore(It.getStartPosition())?(ut=It,nt=[wt]):It.equalsRange(ut)&&nt.push(wt))}})()),(Be.length?Be:nt).length&&await rt.runTests({group:this.group,tests:Be.length?Be:nt})}}class pe extends he{constructor(){super({id:"testing.runAtCursor",title:{value:(0,b.localize)(26,null),original:"Run Test at Cursor"},category:M,keybinding:{weight:200,when:I.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2128,33)}},2)}}e.RunAtCursor=pe;class me extends he{constructor(){super({id:"testing.debugAtCursor",title:{value:(0,b.localize)(27,null),original:"Debug Test at Cursor"},category:M,keybinding:{weight:200,when:I.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2128,2081)}},4)}}e.DebugAtCursor=me;class Se extends S.Action2{constructor(Me,Oe){super({...Me,menu:{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.capabilityToContextKey[Oe].isEqualTo(!0)}}),this.group=Oe}run(Me){const Oe=Me.get(y.IEditorService).activeTextEditorControl,Ke=Oe?.getPosition(),We=Oe?.getModel();if(!Ke||!We||!("uri"in We))return;const Xe=Me.get(D.ITestService),Je=We.uri.toString(),rt=[Xe.collection.rootIds],je=[];for(;rt.length;)for(const Ue of rt.pop()){const Fe=Xe.collection.getNodeById(Ue);Fe.item.uri?.toString()===Je?je.push(Fe):rt.push(Fe.children)}if(je.length)return Xe.runTests({tests:je,group:this.group})}}class Ie extends Se{constructor(){super({id:"testing.runCurrentFile",title:{value:(0,b.localize)(28,null),original:"Run Tests in Current File"},category:M,keybinding:{weight:200,when:I.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2128,36)}},2)}}e.RunCurrentFile=Ie;class ve extends Se{constructor(){super({id:"testing.debugCurrentFile",title:{value:(0,b.localize)(29,null),original:"Debug Tests in Current File"},category:M,keybinding:{weight:200,when:I.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2128,2084)}},4)}}e.DebugCurrentFile=ve;const be=async(Le,Me,Oe,Ke)=>{const We=Promise.all(Oe.map(Je=>(0,D.expandAndGetTestById)(Le,Je))),Xe=(await Q(Me,We)).filter(A.isDefined);return Xe.length?await Ke(Xe):void 0};e.discoverAndRunTests=be;class ge extends S.Action2{async run(Me,...Oe){const Ke=Me.get(D.ITestService);await(0,e.discoverAndRunTests)(Me.get(D.ITestService).collection,Me.get(i.IProgressService),[...this.getTestExtIdsToRun(Me,...Oe)],We=>this.runTest(Ke,We))}}class ue extends ge{constructor(Me){super({...Me,menu:{id:S.MenuId.CommandPalette,when:N}})}getTestExtIdsToRun(Me){const{results:Oe}=Me.get(w.ITestResultService),Ke=new Set;for(let We=Oe.length-1;We>=0;We--){const Xe=Oe[We];for(const Je of Xe.tests)(0,v.isFailedState)(Je.ownComputedState)?Ke.add(Je.item.extId):Ke.delete(Je.item.extId)}return Ke}}class Ce extends ge{constructor(Me){super({...Me,menu:{id:S.MenuId.CommandPalette,when:r.ContextKeyExpr.and(N,g.TestingContextKeys.hasAnyResults.isEqualTo(!0))}})}*getTestExtIdsToRun(Me,Oe){const Ke=Me.get(w.ITestResultService),We=Oe?Ke.results.find(Xe=>Xe.id===Oe):Ke.results[0];if(!!We)for(const Xe of We.request.targets)for(const Je of Xe.testIds)yield Je}}class De extends ue{constructor(){super({id:"testing.reRunFailTests",title:{value:(0,b.localize)(30,null),original:"Rerun Failed Tests"},category:M,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,35)}})}runTest(Me,Oe){return Me.runTests({group:2,tests:Oe})}}e.ReRunFailedTests=De;class Ae extends ue{constructor(){super({id:"testing.debugFailTests",title:{value:(0,b.localize)(31,null),original:"Debug Failed Tests"},category:M,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2083)}})}runTest(Me,Oe){return Me.runTests({group:4,tests:Oe})}}e.DebugFailedTests=Ae;class Pe extends Ce{constructor(){super({id:"testing.reRunLastRun",title:{value:(0,b.localize)(32,null),original:"Rerun Last Run"},category:M,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,42)}})}runTest(Me,Oe){return Me.runTests({group:2,tests:Oe})}}e.ReRunLastRun=Pe;class fe extends Ce{constructor(){super({id:"testing.debugLastRun",title:{value:(0,b.localize)(33,null),original:"Debug Last Run"},category:M,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2090)}})}runTest(Me,Oe){return Me.runTests({group:4,tests:Oe})}}e.DebugLastRun=fe;class ye extends S.Action2{constructor(){super({id:"testing.searchForTestExtension",title:{value:(0,b.localize)(34,null),original:"Search for Test Extension"}})}async run(Me){const Ke=(await Me.get(T.IPaneCompositePartService).openPaneComposite(d.VIEWLET_ID,0,!0))?.getViewPaneContainer();Ke.search('@category:"testing"'),Ke.focus()}}e.SearchForTestExtension=ye;class ke extends S.Action2{constructor(){super({id:"testing.openOutputPeek",title:{value:(0,b.localize)(35,null),original:"Peek Output"},category:M,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2091)},menu:{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.hasAnyResults.isEqualTo(!0)}})}async run(Me){Me.get(h.ITestingPeekOpener).open()}}e.OpenOutputPeek=ke;class Ee extends S.Action2{constructor(){super({id:"testing.toggleInlineTestOutput",title:{value:(0,b.localize)(36,null),original:"Toggle Inline Test Output"},category:M,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2087)},menu:{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.hasAnyResults.isEqualTo(!0)}})}async run(Me){const Oe=Me.get(D.ITestService);Oe.showInlineOutput.value=!Oe.showInlineOutput.value}}e.ToggleInlineTestOutput=Ee;const Te=Le=>[{id:S.MenuId.TestItem,group:"inline",order:10,when:r.ContextKeyExpr.and(g.TestingContextKeys.canRefreshTests.isEqualTo(!0),g.TestingContextKeys.isRefreshingTests.isEqualTo(Le))},{id:S.MenuId.ViewTitle,group:"navigation",order:10,when:r.ContextKeyExpr.and(r.ContextKeyExpr.equals("view","workbench.view.testing"),g.TestingContextKeys.canRefreshTests.isEqualTo(!0),g.TestingContextKeys.isRefreshingTests.isEqualTo(Le))},{id:S.MenuId.CommandPalette,when:g.TestingContextKeys.canRefreshTests.isEqualTo(!0)}];class _e extends S.Action2{constructor(){super({id:"testing.refreshTests",title:{value:(0,b.localize)(37,null),original:"Refresh Tests"},category:M,icon:a.testingRefreshTests,keybinding:{weight:200,primary:(0,R.KeyChord)(2128,2096),when:g.TestingContextKeys.canRefreshTests.isEqualTo(!0)},menu:Te(!1)})}async run(Me,...Oe){const Ke=Me.get(D.ITestService),We=Me.get(i.IProgressService),Xe=(0,t.distinct)(Oe.filter(Je=>Je instanceof n.TestItemTreeElement).map(Je=>Je.test.controllerId));return We.withProgress({location:"workbench.view.extension.test"},async()=>{Xe.length?await Promise.all(Xe.map(Je=>Ke.refreshTests(Je))):await Ke.refreshTests()})}}e.RefreshTestsAction=_e;class Re extends S.Action2{constructor(){super({id:"testing.cancelTestRefresh",title:{value:(0,b.localize)(38,null),original:"Cancel Test Refresh"},category:M,icon:a.testingCancelRefreshTests,menu:Te(!0)})}async run(Me){Me.get(D.ITestService).cancelRefreshTests()}}e.CancelTestRefreshAction=Re,e.allTestActions=[Re,ee,ce,ne,$,x,Y,me,ve,Ae,fe,G,de,P,ke,_e,De,Pe,W,K,pe,Ie,X,H,ye,U,Z,te,se,oe,ie,re,Ee,B,V]}),define(ae[2694],le([1,0,10,32,6,2,13,72,15,8,7,37,5,38,41,66,23,27,12,129,187,45,202,659,660,190,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewViewPane=void 0;const w={webviewState:"webviewState"};let D=class dl extends d.ViewPane{static getOriginStore(T){return this._originStore??=new o.ExtensionKeyedWebviewOriginStore("webviewViews.origins",T),this._originStore}constructor(T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X){super({...T,titleMenuId:I.MenuId.ViewTitle},N,M,_,L,z,O,P,V,B),this.activityService=x,this.extensionService=H,this.progressService=W,this.storageService=U,this.viewService=$,this.webviewService=q,this.webviewViewService=X,this._webview=this._register(new A.MutableDisposable),this._webviewDisposables=this._register(new A.DisposableStore),this._activated=!1,this._onDidChangeVisibility=this._register(new R.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._onDispose=this._register(new R.Emitter),this.onDispose=this._onDispose.event,this.extensionId=T.fromExtensionId,this.defaultTitle=this.title,this.memento=new n.Memento(`webviewView.${this.id}`,U),this.viewState=this.memento.getMemento(1,1),this._register(this.onDidChangeBodyVisibility(()=>this.updateTreeVisibility())),this._register(this.webviewViewService.onNewResolverRegistered(G=>{G.viewType===this.id&&this.updateTreeVisibility()})),this.updateTreeVisibility()}dispose(){this._onDispose.fire(),clearTimeout(this._repositionTimeout),super.dispose()}focus(){super.focus(),this._webview.value?.focus()}renderBody(T){super.renderBody(T),this._container=T,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(T))}saveState(){this._webview.value&&(this.viewState[w.webviewState]=this._webview.value.state),this.memento.saveMemento(),super.saveState()}layoutBody(T,_){super.layoutBody(T,_),this.layoutWebview(new t.Dimension(_,T))}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 T=(0,E.generateUuid)(),_=this.extensionId?dl.getOriginStore(this.storageService).getOrigin(this.id,this.extensionId):void 0,L=this.webviewService.createWebviewOverlay({id:T,origin:_,providedViewType:this.id,options:{purpose:"webviewView"},contentOptions:{},extension:this.extensionId?{id:this.extensionId}:void 0});L.state=this.viewState[w.webviewState],this._webview.value=L,this._container&&this._webview.value?.layoutWebviewOverElement(this._container),this._webviewDisposables.add((0,A.toDisposable)(()=>{this._webview.value?.release(this)})),this._webviewDisposables.add(L.onDidUpdateState(()=>{this.viewState[w.webviewState]=L.state}));for(const O 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,O,N=>{N.preventDefault(),N.stopImmediatePropagation(),this.dropTargetElement.dispatchEvent(new DragEvent(N.type,N))}));this._webviewDisposables.add(new g.WebviewWindowDragMonitor(()=>this._webview.value));const M=this._webviewDisposables.add(new p.CancellationTokenSource);this.withProgress(async()=>{await this.extensionService.activateByEvent(`onView:${this.id}`);const O=this,N={webview:L,onDidChangeVisibility:this.onDidChangeBodyVisibility,onDispose:this.onDispose,get title(){return O.setTitle},set title(P){O.updateTitle(P)},get description(){return O.titleDescription},set description(P){O.updateTitleDescription(P)},get badge(){return O.badge},set badge(P){O.updateBadge(P)},dispose:()=>{this._activated=!1,this._webview.clear(),this._webviewDisposables.clear()},show:P=>{this.viewService.openView(this.id,!P)}};await this.webviewViewService.resolve(this.id,N,M.token)})}updateTitle(T){this.setTitle=T,super.updateTitle(typeof T=="string"?T:this.defaultTitle)}updateBadge(T){if(!(this.badge?.value===T?.value&&this.badge?.tooltip===T?.tooltip)&&(this.activity&&(this.activity.dispose(),this.activity=void 0),this.badge=T,T)){const _={badge:new v.NumberBadge(T.value,()=>T.tooltip),priority:150};this.activityService.showViewActivity(this.id,_)}}async withProgress(T){return this.progressService.withProgress({location:this.id,delay:500},T)}onDidScrollRoot(){this.layoutWebview()}layoutWebview(T){const _=this._webview.value;!this._container||!_||((!this._rootContainer||!this._rootContainer.isConnected)&&(this._rootContainer=this.findRootContainer(this._container)),_.layoutWebviewOverElement(this._container,T,this._rootContainer),clearTimeout(this._repositionTimeout),this._repositionTimeout=setTimeout(()=>this.layoutWebview(),200))}findRootContainer(T){return(0,k.withNullAsUndefined)((0,t.findParentWithClass)(T,"monaco-scrollable-element"))}};D=we([F(1,b.IConfigurationService),F(2,S.IContextKeyService),F(3,C.IContextMenuService),F(4,r.IInstantiationService),F(5,u.IKeybindingService),F(6,i.IOpenerService),F(7,l.ITelemetryService),F(8,s.IThemeService),F(9,a.IViewDescriptorService),F(10,v.IActivityService),F(11,m.IExtensionService),F(12,f.IProgressService),F(13,c.IStorageService),F(14,a.IViewsService),F(15,o.IWebviewService),F(16,h.IWebviewViewService)],D),e.WebviewViewPane=D}),define(ae[2695],le([1,0,198,5,12,8,7,38,111,2196,35,48,336]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let u=class extends b.QuickInputService{constructor(f,c,l,s,d,n,a){super(c,s,d,n,a),this.configurationService=f,this.keybindingService=l,this.inQuickInputContext=r.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})}};u=we([F(0,A.IConfigurationService),F(1,p.IInstantiationService),F(2,E.IKeybindingService),F(3,k.IContextKeyService),F(4,R.IThemeService),F(5,I.IAccessibilityService),F(6,t.ILayoutService)],u),e.QuickInputService=u,(0,S.registerSingleton)(C.IQuickInputService,u,1)}),define(ae[2696],le([1,0,14,9]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteExtensionEnvironmentChannelClient=void 0;class R{static async getEnvironmentData(k,E){const I={remoteAuthority:E},b=await k.call("getEnvironmentData",I);return{pid:b.pid,connectionToken:b.connectionToken,appRoot:p.URI.revive(b.appRoot),settingsPath:p.URI.revive(b.settingsPath),logsPath:p.URI.revive(b.logsPath),extensionsPath:p.URI.revive(b.extensionsPath),extensionHostLogsPath:p.URI.revive(b.extensionHostLogsPath),globalStorageHome:p.URI.revive(b.globalStorageHome),workspaceStorageHome:p.URI.revive(b.workspaceStorageHome),localHistoryHome:p.URI.revive(b.localHistoryHome),userHome:p.URI.revive(b.userHome),os:b.os,arch:b.arch,marks:b.marks,useHostProxy:b.useHostProxy}}static async getExtensionHostExitInfo(k,E,I){const b={remoteAuthority:E,reconnectionToken:I};return k.call("getExtensionHostExitInfo",b)}static async whenExtensionsReady(k){await k.call("whenExtensionsReady")}static async scanExtensions(k,E,I,b){const S={language:t.language,remoteAuthority:E,extensionDevelopmentPath:I,skipExtensions:b},C=await k.call("scanExtensions",S);return C.forEach(r=>{r.extensionLocation=p.URI.revive(r.extensionLocation)}),C}static async scanSingleExtension(k,E,I,b){const S={language:t.language,remoteAuthority:E,isBuiltin:I,extensionLocation:b},C=await k.call("scanSingleExtension",S);return C&&(C.extensionLocation=p.URI.revive(C.extensionLocation)),C}static getDiagnosticInfo(k,E){return k.call("getDiagnosticInfo",E)}static updateTelemetryLevel(k,E){return k.call("updateTelemetryLevel",{telemetryLevel:E})}static logTelemetry(k,E,I){return k.call("logTelemetry",{eventName:E,data:I})}static flushTelemetry(k){return k.call("flushTelemetry")}static async ping(k){await k.call("ping")}}e.RemoteExtensionEnvironmentChannelClient=R}),define(ae[2697],le([1,0,2,183,51,609,148,2696,6,505,25,46]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAgentConnection=e.AbstractRemoteAgentService=void 0;let r=class extends t.Disposable{constructor(f,c,l,s,d,n){super(),this._environmentService=c,this._remoteAuthorityResolverService=s,this.socketFactory=f,this._environmentService.remoteAuthority?this._connection=this._register(new u(this._environmentService.remoteAuthority,l.commit,l.quality,this.socketFactory,this._remoteAuthorityResolverService,d,n)):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(f,c)=>{const l=await E.RemoteExtensionEnvironmentChannelClient.getEnvironmentData(f,c.remoteAuthority);return this._remoteAuthorityResolverService._setAuthorityConnectionToken(c.remoteAuthority,l.connectionToken),l},null)),this._environment}getExtensionHostExitInfo(f){return this._withChannel((c,l)=>E.RemoteExtensionEnvironmentChannelClient.getExtensionHostExitInfo(c,l.remoteAuthority,f),null)}whenExtensionsReady(){return this._withChannel(f=>E.RemoteExtensionEnvironmentChannelClient.whenExtensionsReady(f),void 0)}scanExtensions(f=[]){return this._withChannel((c,l)=>E.RemoteExtensionEnvironmentChannelClient.scanExtensions(c,l.remoteAuthority,this._environmentService.extensionDevelopmentLocationURI,f),[]).then(void 0,()=>[])}scanSingleExtension(f,c){return this._withChannel((l,s)=>E.RemoteExtensionEnvironmentChannelClient.scanSingleExtension(l,s.remoteAuthority,c,f),null).then(void 0,()=>null)}getDiagnosticInfo(f){return this._withChannel(c=>E.RemoteExtensionEnvironmentChannelClient.getDiagnosticInfo(c,f),void 0)}updateTelemetryLevel(f){return this._withTelemetryChannel(c=>E.RemoteExtensionEnvironmentChannelClient.updateTelemetryLevel(c,f),void 0)}logTelemetry(f,c){return this._withTelemetryChannel(l=>E.RemoteExtensionEnvironmentChannelClient.logTelemetry(l,f,c),void 0)}flushTelemetry(){return this._withTelemetryChannel(f=>E.RemoteExtensionEnvironmentChannelClient.flushTelemetry(f),void 0)}getRoundTripTime(){return this._withTelemetryChannel(async f=>{const c=Date.now();return await E.RemoteExtensionEnvironmentChannelClient.ping(f),Date.now()-c},void 0)}_withChannel(f,c){const l=this.getConnection();return l?l.withChannel("remoteextensionsenvironment",s=>f(s,l)):Promise.resolve(c)}_withTelemetryChannel(f,c){const l=this.getConnection();return l?l.withChannel("telemetry",s=>f(s,l)):Promise.resolve(c)}};r=we([F(1,R.IWorkbenchEnvironmentService),F(2,C.IProductService),F(3,k.IRemoteAuthorityResolverService),F(4,b.ISignService),F(5,S.ILogService)],r),e.AbstractRemoteAgentService=r;class u extends t.Disposable{constructor(f,c,l,s,d,n,a){super(),this._commit=c,this._quality=l,this._socketFactory=s,this._remoteAuthorityResolverService=d,this._signService=n,this._logService=a,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=f,this._connection=null}getChannel(f){return(0,p.getDelayedChannel)(this._getOrCreateConnection().then(c=>c.getChannel(f)))}withChannel(f,c){const l=this.getChannel(f);return c(l)}registerChannel(f,c){this._getOrCreateConnection().then(l=>l.registerChannel(f,c))}async getInitialConnectionTimeMs(){try{await this._getOrCreateConnection()}catch{}return this._initialConnectionMs}_getOrCreateConnection(){return this._connection||(this._connection=this._createConnection()),this._connection}async _createConnection(){let f=!0;const c={commit:this._commit,quality:this._quality,socketFactory:this._socketFactory,addressProvider:{getAddress:async()=>{f?f=!1:this._onReconnecting.fire(void 0);const{authority:d}=await this._remoteAuthorityResolverService.resolveAuthority(this.remoteAuthority);return{host:d.host,port:d.port,connectionToken:d.connectionToken}}},signService:this._signService,logService:this._logService,ipcLogger:null};let l;const s=Date.now();try{l=this._register(await(0,A.connectRemoteAgentManagement)(c,this.remoteAuthority,"renderer"))}finally{this._initialConnectionMs=Date.now()-s}return l.protocol.onDidDispose(()=>{l.dispose()}),this._register(l.onDidStateChange(d=>this._onDidStateChange.fire(d))),l.client}}e.RemoteAgentConnection=u}),define(ae[104],le([1,0,5]),function(J,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(ae[2698],le([1,0,2,67,77,9,146,5,25,185,2143,109,889,344,454,127,104,13,14,11]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTerminalService=void 0;let n=class{constructor(h,v,m,w,D,y,T,_,L,M,O){this._extHostContext=h,this._terminalService=v,this.terminalInstanceService=m,this._instantiationService=w,this._environmentVariableService=D,this._logService=y,this._terminalProfileResolverService=T,this._terminalGroupService=L,this._terminalEditorService=M,this._terminalProfileService=O,this._extHostTerminals=new Map,this._toDispose=new t.DisposableStore,this._terminalProcessProxies=new Map,this._profileProviders=new Map,this._os=s.OS,this._proxy=h.getProxy(p.ExtHostContext.ExtHostTerminalService),this._toDispose.add(v.onDidCreateInstance(P=>{this._onTerminalOpened(P),this._onInstanceDimensionsChanged(P)})),this._toDispose.add(v.onDidDisposeInstance(P=>this._onTerminalDisposed(P))),this._toDispose.add(v.onDidReceiveProcessId(P=>this._onTerminalProcessIdReady(P))),this._toDispose.add(v.onDidChangeInstanceDimensions(P=>this._onInstanceDimensionsChanged(P))),this._toDispose.add(v.onDidMaximumDimensionsChange(P=>this._onInstanceMaximumDimensionsChanged(P))),this._toDispose.add(v.onDidRequestStartExtensionTerminal(P=>this._onRequestStartExtensionTerminal(P))),this._toDispose.add(v.onDidChangeActiveInstance(P=>this._onActiveTerminalChanged(P?P.instanceId:null))),this._toDispose.add(v.onDidChangeInstanceTitle(P=>P&&this._onTitleChanged(P.instanceId,P.title))),this._toDispose.add(v.onDidInputInstanceData(P=>this._proxy.$acceptTerminalInteraction(P.instanceId))),this._terminalService.instances.forEach(P=>{this._onTerminalOpened(P),P.processReady.then(()=>this._onTerminalProcessIdReady(P))});const N=this._terminalService.activeInstance;if(N&&this._proxy.$acceptActiveTerminalChanged(N.instanceId),this._environmentVariableService.collections.size>0){const B=[...this._environmentVariableService.collections.entries()].map(V=>[V[0],(0,i.serializeEnvironmentVariableCollection)(V[1].map)]);this._proxy.$initEnvironmentVariableCollections(B)}_.getEnvironment().then(async P=>{this._os=P?.os||s.OS,this._updateDefaultProfile()}),this._terminalProfileService.onDidChangeAvailableProfiles(()=>this._updateDefaultProfile())}dispose(){this._toDispose.dispose(),this._linkProvider?.dispose()}async _updateDefaultProfile(){const h=(0,l.withNullAsUndefined)(this._extHostContext.remoteAuthority),v=this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:h,os:this._os}),m=this._terminalProfileResolverService.getDefaultProfile({remoteAuthority:h,os:this._os,allowAutomationShell:!0});this._proxy.$acceptDefaultProfile(...await Promise.all([v,m]))}async _getTerminalInstance(h){return typeof h=="string"?this._extHostTerminals.get(h):this._terminalService.getInstanceFromId(h)}async $createTerminal(h,v){const m={name:v.name,executable:v.shellPath,args:v.shellArgs,cwd:typeof v.cwd=="string"?v.cwd:A.URI.revive(v.cwd),icon:v.icon,color:v.color,initialText:v.initialText,waitOnExit:v.waitOnExit,ignoreConfigurationCwd:!0,env:v.env,strictEnv:v.strictEnv,hideFromUser:v.hideFromUser,customPtyImplementation:v.isExtensionCustomPtyTerminal?(y,T,_)=>new r.TerminalProcessExtHostProxy(y,T,_,this._terminalService):void 0,extHostTerminalId:h,isFeatureTerminal:v.isFeatureTerminal,isExtensionOwnedTerminal:v.isExtensionOwnedTerminal,useShellEnvironment:v.useShellEnvironment,isTransient:v.isTransient},w=d.Promises.withAsyncBody(async y=>{const T=await this._terminalService.createTerminal({config:m,location:await this._deserializeParentTerminal(v.location)});y(T)});this._extHostTerminals.set(h,w);const D=await w;this._toDispose.add(D.onDisposed(()=>{this._extHostTerminals.delete(h)}))}async _deserializeParentTerminal(h){if(typeof h=="object"&&"parentTerminal"in h){const v=await this._extHostTerminals.get(h.parentTerminal.toString());return v?{parentTerminal:v}:void 0}return h}async $show(h,v){const m=await this._getTerminalInstance(h);m&&(this._terminalService.setActiveInstance(m),m.target===b.TerminalLocation.Editor?await this._terminalEditorService.revealActiveEditor(v):await this._terminalGroupService.showPanel(!v))}async $hide(h){const v=await this._getTerminalInstance(h),m=this._terminalService.activeInstance;m&&m.instanceId===v?.instanceId&&m.target!==b.TerminalLocation.Editor&&this._terminalGroupService.hidePanel()}async $dispose(h){(await this._getTerminalInstance(h))?.dispose(b.TerminalExitReason.Extension)}async $sendText(h,v,m){await(await this._getTerminalInstance(h))?.sendText(v,m)}$sendProcessExit(h,v){this._terminalProcessProxies.get(h)?.emitExit(v)}$startSendingDataEvents(){this._dataEventTracker||(this._dataEventTracker=this._instantiationService.createInstance(a,(h,v)=>{this._onTerminalData(h,v)}),this._terminalService.instances.forEach(h=>{h.initialDataEvents?.forEach(v=>this._onTerminalData(h.instanceId,v))}))}$stopSendingDataEvents(){this._dataEventTracker?.dispose(),this._dataEventTracker=void 0}$startLinkProvider(){this._linkProvider?.dispose(),this._linkProvider=this._terminalService.registerLinkProvider(new o(this._proxy))}$stopLinkProvider(){this._linkProvider?.dispose(),this._linkProvider=void 0}$registerProcessSupport(h){this._terminalService.registerProcessSupport(h)}$registerProfileProvider(h,v){this._profileProviders.set(h,this._terminalProfileService.registerTerminalProfileProvider(v,h,{createContributedTerminalProfile:async m=>this._proxy.$createContributedProfileTerminal(h,m)}))}$unregisterProfileProvider(h){this._profileProviders.get(h)?.dispose(),this._profileProviders.delete(h)}_onActiveTerminalChanged(h){this._proxy.$acceptActiveTerminalChanged(h)}_onTerminalData(h,v){this._proxy.$acceptTerminalProcessData(h,v)}_onTitleChanged(h,v){this._proxy.$acceptTerminalTitleChange(h,v)}_onTerminalDisposed(h){this._proxy.$acceptTerminalClosed(h.instanceId,h.exitCode,h.exitReason??b.TerminalExitReason.Unknown)}_onTerminalOpened(h){const v=h.shellLaunchConfig.extHostTerminalId,m={name:h.shellLaunchConfig.name,executable:h.shellLaunchConfig.executable,args:h.shellLaunchConfig.args,cwd:h.shellLaunchConfig.cwd,env:h.shellLaunchConfig.env,hideFromUser:h.shellLaunchConfig.hideFromUser};this._proxy.$acceptTerminalOpened(h.instanceId,v,h.title,m)}_onTerminalProcessIdReady(h){h.processId!==void 0&&this._proxy.$acceptTerminalProcessId(h.instanceId,h.processId)}_onInstanceDimensionsChanged(h){this._proxy.$acceptTerminalDimensions(h.instanceId,h.cols,h.rows)}_onInstanceMaximumDimensionsChanged(h){this._proxy.$acceptTerminalMaximumDimensions(h.instanceId,h.maxCols,h.maxRows)}_onRequestStartExtensionTerminal(h){const v=h.proxy;this._terminalProcessProxies.set(v.instanceId,v);const m=h.cols&&h.rows?{columns:h.cols,rows:h.rows}:void 0;this._proxy.$startExtensionTerminal(v.instanceId,m).then(h.callback),v.onInput(w=>this._proxy.$acceptProcessInput(v.instanceId,w)),v.onShutdown(w=>this._proxy.$acceptProcessShutdown(v.instanceId,w)),v.onRequestCwd(()=>this._proxy.$acceptProcessRequestCwd(v.instanceId)),v.onRequestInitialCwd(()=>this._proxy.$acceptProcessRequestInitialCwd(v.instanceId)),v.onRequestLatency(()=>this._onRequestLatency(v.instanceId))}$sendProcessData(h,v){this._terminalProcessProxies.get(h)?.emitData(v)}$sendProcessReady(h,v,m){this._terminalProcessProxies.get(h)?.emitReady(v,m)}$sendProcessProperty(h,v){v.type==="title"&&this._terminalService.getInstanceFromId(h)?.rename(v.value),this._terminalProcessProxies.get(h)?.emitProcessProperty(v)}async _onRequestLatency(h){let m=0;for(let w=0;w<2;w++){const D=k.StopWatch.create(!0);await this._proxy.$acceptProcessRequestLatency(h),D.stop(),m+=D.elapsed()}this._getTerminalProcess(h)?.emitLatency(m/2)}_getTerminalProcess(h){const v=this._terminalProcessProxies.get(h);if(!v){this._logService.error(`Unknown terminal: ${h}`);return}return v}$setEnvironmentVariableCollection(h,v,m){if(m){const w={persistent:v,map:(0,i.deserializeEnvironmentVariableCollection)(m)};this._environmentVariableService.set(h,w)}else this._environmentVariableService.delete(h)}};n=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadTerminalService),F(1,C.ITerminalService),F(2,C.ITerminalInstanceService),F(3,E.IInstantiationService),F(4,u.IEnvironmentVariableService),F(5,I.ILogService),F(6,f.ITerminalProfileResolverService),F(7,c.IRemoteAgentService),F(8,C.ITerminalGroupService),F(9,C.ITerminalEditorService),F(10,f.ITerminalProfileService)],n),e.MainThreadTerminalService=n;let a=class extends t.Disposable{constructor(h,v){super(),this._callback=h,this._terminalService=v,this._register(this._bufferer=new S.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(h){this._register(this._bufferer.startBuffering(h.instanceId,h.onData))}};a=we([F(1,C.ITerminalService)],a);class o{constructor(h){this._proxy=h}async provideLinks(h,v){const m=this._proxy;return(await m.$provideLinks(h.instanceId,v)).map(D=>({id:D.id,startIndex:D.startIndex,length:D.length,label:D.label,activate:()=>m.$activateLink(h.instanceId,D.id)}))}}}),define(ae[2699],le([1,0,25,132,102,548,256,499,104]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevelService=void 0;let b=class extends A.LogLevelService{constructor(C,r,u,i,f){super(C,r),this.sharedProcessService=u,this.mainProcessService=i,this.remoteAgentService=f}setLogLevel(C,r){if(!super.setLogLevel(C,r))return!1;const u=this.outputService.getChannelDescriptor(C),i=u?.log?u.file:void 0;if(E.LogLevelChannelClient.setLevel(this.mainProcessService.getChannel("logLevel"),r,i),C===k.sharedLogChannelId||C===k.userDataSyncLogChannelId)return E.LogLevelChannelClient.setLevel(this.sharedProcessService.getChannel("logLevel"),r,i),!0;const f=this.remoteAgentService.getConnection();return(C===k.remoteServerLog||C===k.remotePtyHostLog)&&f&&f.withChannel("logger",c=>E.LogLevelChannelClient.setLevel(c,r,i)),!0}};b=we([F(0,p.IOutputService),F(1,t.ILoggerService),F(2,R.ISharedProcessService),F(3,R.IMainProcessService),F(4,I.IRemoteAgentService)],b),e.LogLevelService=b}),define(ae[2700],le([1,0,1725,17,70,15,2485,44,256,2,19,25,9,53,51,132,5,35,548,2699]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,l.registerSingleton)(s.ILogLevelService,d.LogLevelService,1);let n=class extends b.Disposable{constructor(o,g,h){super(),this.environmentService=o,this.logService=g,this.fileService=h,this.registerNativeContributions()}registerNativeContributions(){this.registerLogChannel(I.mainLogChannelId,t.localize(0,null),r.URI.file((0,u.join)(this.environmentService.logsPath,"main.log"))),this.registerLogChannel(I.sharedLogChannelId,t.localize(1,null),r.URI.file((0,u.join)(this.environmentService.logsPath,"sharedprocess.log")))}registerLogChannel(o,g,h){const v=(0,f.registerLogChannel)(o,g,h,this.fileService,this.logService);this._register((0,b.toDisposable)(()=>v.cancel()))}};n=we([F(0,i.IWorkbenchEnvironmentService),F(1,C.ILogService),F(2,S.IFileService)],n),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:k.OpenLogsFolderAction.ID,title:k.OpenLogsFolderAction.TITLE,category:R.Categories.Developer,f1:!0})}run(a){return a.get(c.IInstantiationService).createInstance(k.OpenLogsFolderAction,k.OpenLogsFolderAction.ID,k.OpenLogsFolderAction.TITLE.value).run()}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:k.OpenExtensionLogsFolderAction.ID,title:k.OpenExtensionLogsFolderAction.TITLE,category:R.Categories.Developer,f1:!0})}run(a){return a.get(c.IInstantiationService).createInstance(k.OpenExtensionLogsFolderAction,k.OpenExtensionLogsFolderAction.ID,k.OpenExtensionLogsFolderAction.TITLE.value).run()}}),p.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(n,3)}),define(ae[2701],le([1,0,44,17,49,14,22,104,25,499,132,1828,18,2,55,19,47,51,34,16,15,70,609,27,223,373,2080,11,256]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LabelContribution=void 0;let y=class{constructor(x,H){this.labelService=x,this.remoteAgentService=H,this.registerFormatters()}registerFormatters(){this.remoteAgentService.getEnvironment().then(x=>{const H=x?.os||A.OS,W={label:"${path}",separator:H===1?"\\":"/",tildify:H!==1,normalizeDriveLetter:H===1,workspaceSuffix:A.isWeb?void 0:k.Schemas.vscodeRemote};this.labelService.registerFormatter({scheme:k.Schemas.vscodeRemote,formatting:W}),x&&this.labelService.registerFormatter({scheme:k.Schemas.vscodeUserData,formatting:W})})}};y=we([F(0,R.ILabelService),F(1,E.IRemoteAgentService)],y),e.LabelContribution=y;let T=class extends u.Disposable{constructor(x,H,W,U){super();const $=()=>{const X=H.getConnection();!X||X.withChannel("logger",G=>b.LogLevelChannelClient.setLevel(G,x.getLevel()))};$(),this._register(x.onDidChangeLogLevel($));const q=H.getConnection();q&&(q.registerChannel("download",new m.DownloadServiceChannel(W)),q.registerChannel("logger",new b.LogLevelChannel(x,U)))}};T=we([F(0,I.ILogService),F(1,E.IRemoteAgentService),F(2,v.IDownloadService),F(3,I.ILoggerService)],T);let _=class{constructor(x){x.getEnvironment().then(H=>{if(H){const W=p.Registry.as(S.Extensions.OutputChannels);W.registerChannel({id:D.remoteServerLog,label:(0,C.localize)(0,null),file:(0,r.joinPath)(H.logsPath,`${E.RemoteExtensionLogFileName}.log`),log:!0}),W.registerChannel({id:D.remotePtyHostLog,label:(0,C.localize)(1,null),file:(0,r.joinPath)(H.logsPath,"ptyhost.log"),log:!0})}})}};_=we([F(0,E.IRemoteAgentService)],_);let L=class extends u.Disposable{constructor(x,H,W,U,$,q){super(),this.fileService=x,this.dialogService=H,this.environmentService=W,this.contextService=U,this.fileDialogService=$,this.environmentService.remoteAuthority&&q.getEnvironment().then(X=>{X&&this.validateRemoteWorkspace()})}async validateRemoteWorkspace(){const x=this.contextService.getWorkspace(),H=x.configuration??(0,d.firstOrDefault)(x.folders)?.uri;if(!H||await this.fileService.exists(H))return;if((await this.dialogService.confirm({type:"warning",message:(0,C.localize)(2,null),detail:(0,C.localize)(3,null),primaryButton:(0,C.localize)(4,null),secondaryButton:(0,C.localize)(5,null)})).confirmed)return x.configuration?this.fileDialogService.pickWorkspaceAndOpen({}):this.fileDialogService.pickFolderAndOpen({})}};L=we([F(0,f.IFileService),F(1,c.IDialogService),F(2,l.IWorkbenchEnvironmentService),F(3,s.IWorkspaceContextService),F(4,c.IFileDialogService),F(5,E.IRemoteAgentService)],L);const M=5,O=2e3;let N=class{constructor(x,H,W){this._remoteAgentService=x,this._environmentService=H,this._telemetryService=W,this._environmentService.remoteAuthority&&this._checkInitialRemoteConnectionHealth()}async _checkInitialRemoteConnectionHealth(){try{await this._remoteAgentService.getRawEnvironment(),this._telemetryService.publicLog2("remoteConnectionSuccess",{web:A.isWeb,connectionTimeMs:await this._remoteAgentService.getConnection()?.getInitialConnectionTimeMs(),remoteName:(0,h.getRemoteName)(this._environmentService.remoteAuthority)}),await this._measureExtHostLatency()}catch(x){this._telemetryService.publicLog2("remoteConnectionFailure",{web:A.isWeb,connectionTimeMs:await this._remoteAgentService.getConnection()?.getInitialConnectionTimeMs(),remoteName:(0,h.getRemoteName)(this._environmentService.remoteAuthority),message:x?x.message:""})}}async _measureExtHostLatency(){let x=1/0;for(let H=0;H<M;H++){const W=await this._remoteAgentService.getRoundTripTime();if(W===void 0)return;x=Math.min(x,W/2),await(0,w.timeout)(O)}this._telemetryService.publicLog2("remoteConnectionLatency",{web:A.isWeb,remoteName:(0,h.getRemoteName)(this._environmentService.remoteAuthority),latencyMs:x})}};N=we([F(0,E.IRemoteAgentService),F(1,l.IWorkbenchEnvironmentService),F(2,g.ITelemetryService)],N);const P=p.Registry.as(t.Extensions.Workbench);if(P.registerWorkbenchContribution(y,1),P.registerWorkbenchContribution(T,1),P.registerWorkbenchContribution(L,1),P.registerWorkbenchContribution(_,3),P.registerWorkbenchContribution(N,2),!0){class z extends n.Action2{constructor(){super({id:"workbench.action.triggerReconnect",title:{value:(0,C.localize)(6,null),original:"Connection: Trigger Reconnect"},category:a.Categories.Developer,f1:!0})}async run(W){o.PersistentConnection.debugTriggerReconnection()}}class x extends n.Action2{constructor(){super({id:"workbench.action.pauseSocketWriting",title:{value:(0,C.localize)(7,null),original:"Connection: Pause socket writing"},category:a.Categories.Developer,f1:!0})}async run(W){o.PersistentConnection.debugPauseSocketWriting()}}(0,n.registerAction2)(z),(0,n.registerAction2)(x)}const V={type:"string",enum:["ui","workspace"],enumDescriptions:[(0,C.localize)(8,null),(0,C.localize)(9,null)]};p.Registry.as(i.Extensions.Configuration).registerConfiguration({id:"remote",title:(0,C.localize)(10,null),type:"object",properties:{"remote.extensionKind":{type:"object",markdownDescription:(0,C.localize)(11,null),patternProperties:{"([a-z0-9A-Z][a-z0-9-A-Z]*)\\.([a-z0-9A-Z][a-z0-9-A-Z]*)$":{oneOf:[{type:"array",items:V},V],default:["ui"]}},default:{"pub.name":["ui"]}},"remote.restoreForwardedPorts":{type:"boolean",markdownDescription:(0,C.localize)(12,null),default:!0},"remote.autoForwardPorts":{type:"boolean",markdownDescription:(0,C.localize)(13,null),default:!0},"remote.autoForwardPortsSource":{type:"string",markdownDescription:(0,C.localize)(14,null,"`#remote.autoForwardPorts#`"),enum:["process","output"],enumDescriptions:[(0,C.localize)(15,null),(0,C.localize)(16,null)],default:"process"},"remote.portsAttributes":{type:"object",patternProperties:{"(^\\d+(-\\d+)?$)|(.+)":{type:"object",description:(0,C.localize)(17,null),properties:{onAutoForward:{type:"string",enum:["notify","openBrowser","openBrowserOnce","openPreview","silent","ignore"],enumDescriptions:[(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),(0,C.localize)(23,null)],description:(0,C.localize)(24,null),default:"notify"},elevateIfNeeded:{type:"boolean",description:(0,C.localize)(25,null),default:!1},label:{type:"string",description:(0,C.localize)(26,null),default:(0,C.localize)(27,null)},requireLocalPort:{type:"boolean",markdownDescription:(0,C.localize)(28,null),default:!1},protocol:{type:"string",enum:["http","https"],description:(0,C.localize)(29,null)}},default:{label:(0,C.localize)(30,null),onAutoForward:"notify"}}},markdownDescription:(0,C.localize)(31,null),defaultSnippets:[{body:{"${1:3000}":{label:"${2:Application}",onAutoForward:"openPreview"}}}],errorMessage:(0,C.localize)(32,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)(33,null),(0,C.localize)(34,null),(0,C.localize)(35,null),(0,C.localize)(36,null),(0,C.localize)(37,null)],description:(0,C.localize)(38,null),default:"notify"},elevateIfNeeded:{type:"boolean",description:(0,C.localize)(39,null),default:!1},label:{type:"string",description:(0,C.localize)(40,null),default:(0,C.localize)(41,null)},requireLocalPort:{type:"boolean",markdownDescription:(0,C.localize)(42,null),default:!1},protocol:{type:"string",enum:["http","https"],description:(0,C.localize)(43,null)}},defaultSnippets:[{body:{onAutoForward:"ignore"}}],markdownDescription:(0,C.localize)(44,null,"`#remote.portsAttributes#`"),additionalProperties:!1},"remote.localPortHost":{type:"string",enum:["localhost","allInterfaces"],default:"localhost",description:(0,C.localize)(45,null)}}})}),define(ae[2702],le([1,0,6,165,31,8,5,25,26,17,148,23,34,886,2395,109,2468,127,217,191,104]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteTerminalBackendContribution=void 0;let a=class{constructor(h,v,m){const w=v.getConnection()?.remoteAuthority;if(w){const D=v.getConnection();if(D){const y=h.createInstance(c.RemoteTerminalChannelClient,D.remoteAuthority,D.getChannel(c.REMOTE_TERMINAL_CHANNEL_NAME)),T=h.createInstance(o,w,y);b.Registry.as(l.TerminalExtensions.Backend).registerTerminalBackend(T),m.handleNewRegisteredBackend(T)}}}};a=we([F(0,k.IInstantiationService),F(1,n.IRemoteAgentService),F(2,f.ITerminalService)],a),e.RemoteTerminalBackendContribution=a;let o=class extends u.BaseTerminalBackend{constructor(h,v,m,w,D,y,T,_,L,M,O,N){super(v,w,T,O,M,L),this.remoteAuthority=h,this._remoteTerminalChannel=v,this._remoteAgentService=m,this._commandService=D,this._storageService=y,this._remoteAuthorityResolverService=_,this._historyService=O,this._configurationService=N,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(V=>this._ptys.get(V.id)?.handleData(V.event)),this._remoteTerminalChannel.onProcessReplay(V=>{this._ptys.get(V.id)?.handleReplay(V.event),V.event.commands.commands.length>0&&this._onRestoreCommands.fire({id:V.id,commands:V.event.commands.commands})}),this._remoteTerminalChannel.onProcessOrphanQuestion(V=>this._ptys.get(V.id)?.handleOrphanQuestion()),this._remoteTerminalChannel.onDidRequestDetach(V=>this._onDidRequestDetach.fire(V)),this._remoteTerminalChannel.onProcessReady(V=>this._ptys.get(V.id)?.handleReady(V.event)),this._remoteTerminalChannel.onDidChangeProperty(V=>this._ptys.get(V.id)?.handleDidChangeProperty(V.property)),this._remoteTerminalChannel.onProcessExit(V=>{const z=this._ptys.get(V.id);z&&(z.handleExit(V.event),this._ptys.delete(V.id))});const P=["_remoteCLI.openExternal","_remoteCLI.windowOpen","_remoteCLI.getSystemStatus","_remoteCLI.manageExtensions"];this._remoteTerminalChannel.onExecuteCommand(async V=>{if(!this._ptys.get(V.persistentProcessId))return;const x=V.reqId,H=V.commandId;if(!P.includes(H)){this._remoteTerminalChannel.sendCommandResult(x,!0,"Invalid remote cli command: "+H);return}const W=V.commandArgs.map(U=>(0,p.revive)(U));try{const U=await this._commandService.executeCommand(V.commandId,...W);this._remoteTerminalChannel.sendCommandResult(x,!1,U)}catch(U){this._remoteTerminalChannel.sendCommandResult(x,!0,U)}});const B=this._configurationService.getValue(l.TERMINAL_CONFIG_SECTION);for(const V of Object.keys(B.autoReplies)){const z=B.autoReplies[V];z&&this._remoteTerminalChannel.installAutoReply(V,z)}this._register(this._configurationService.onDidChangeConfiguration(async V=>{if(V.affectsConfiguration("terminal.integrated.autoReplies")){this._remoteTerminalChannel.uninstallAllAutoReplies();const z=this._configurationService.getValue(l.TERMINAL_CONFIG_SECTION);for(const x of Object.keys(z.autoReplies)){const H=z.autoReplies[x];H&&await this._remoteTerminalChannel.installAutoReply(x,H)}}}))}async requestDetachInstance(h,v){if(!this._remoteTerminalChannel)throw new Error("Cannot request detach instance when there is no remote!");return this._remoteTerminalChannel.requestDetachInstance(h,v)}async acceptDetachInstanceReply(h,v){if(this._remoteTerminalChannel){if(!v){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(h,v)}async persistTerminalState(){if(!this._remoteTerminalChannel)throw new Error("Cannot persist terminal state when there is no remote!");const h=Array.from(this._ptys.keys()),v=await this._remoteTerminalChannel.serializeTerminalState(h);this._storageService.store("terminal.integrated.bufferState",v,1,1)}async createProcess(h,v,m,w,D,y,T,_){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 M=this._configurationService.getValue(l.TERMINAL_CONFIG_SECTION),O={"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":M.detectLocale},N={name:h.name,executable:h.executable,args:h.args,cwd:h.cwd,env:h.env,useShellEnvironment:h.useShellEnvironment,reconnectionProperties:h.reconnectionProperties,type:h.type,isFeatureTerminal:h.isFeatureTerminal},P=this._historyService.getLastActiveWorkspaceRoot(),B=await this._remoteTerminalChannel.createProcess(N,O,P,T,_,m,w,D),V=new i.RemotePty(B.persistentTerminalId,_,this._remoteTerminalChannel,this._remoteAgentService,this._logService);return this._ptys.set(B.persistentTerminalId,V),V}async attachToProcess(h){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");try{await this._remoteTerminalChannel.attachToProcess(h);const v=new i.RemotePty(h,!0,this._remoteTerminalChannel,this._remoteAgentService,this._logService);return this._ptys.set(h,v),v}catch(v){this._logService.trace(`Couldn't attach to process ${v.message}`)}}async attachToRevivedProcess(h){if(!this._remoteTerminalChannel)throw new Error("Cannot create remote terminal when there is no remote!");try{const v=await this._remoteTerminalChannel.getRevivedPtyNewId(h)??h;return await this.attachToProcess(v)}catch(v){this._logService.trace(`Couldn't attach to process ${v.message}`)}}async listProcesses(){return(this._remoteTerminalChannel?await this._remoteTerminalChannel.listProcesses():[]).map(v=>({id:v.id,pid:v.pid,title:v.title,titleSource:v.titleSource,cwd:v.cwd,workspaceId:v.workspaceId,workspaceName:v.workspaceName,icon:v.icon,color:v.color,isOrphan:v.isOrphan,fixedDimensions:v.fixedDimensions}))}async updateProperty(h,v,m){await this._remoteTerminalChannel?.updateProperty(h,v,m)}async updateTitle(h,v,m){await this._remoteTerminalChannel?.updateTitle(h,v,m)}async updateIcon(h,v,m,w){await this._remoteTerminalChannel?.updateIcon(h,v,m,w)}async getDefaultSystemShell(h){return this._remoteTerminalChannel?.getDefaultSystemShell(h)||""}async getProfiles(h,v,m){return this._remoteTerminalChannel?.getProfiles(h,v,m)||[]}async getEnvironment(){return this._remoteTerminalChannel?.getEnvironment()||{}}async getShellEnvironment(){const h=this._remoteAgentService.getConnection();return h?(await this._remoteAuthorityResolverService.resolveAuthority(h.remoteAuthority)).options?.extensionHostEnv:void 0}async getWslPath(h){return(await this._remoteAgentService.getEnvironment())?.os!==1?h:this._remoteTerminalChannel?.getWslPath(h)||h}async setTerminalLayoutInfo(h){if(!this._remoteTerminalChannel)throw new Error("Cannot call setActiveInstanceId when there is no remote");return this._remoteTerminalChannel.setTerminalLayoutInfo(h)}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 h=this._storageService.get("terminal.integrated.bufferState",1),v=this._deserializeTerminalState(h);if(v)try{await this._remoteTerminalChannel.reviveTerminalProcesses(v,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()}};o=we([F(2,n.IRemoteAgentService),F(3,E.ILogService),F(4,R.ICommandService),F(5,C.IStorageService),F(6,I.INotificationService),F(7,S.IRemoteAuthorityResolverService),F(8,r.IWorkspaceContextService),F(9,s.IConfigurationResolverService),F(10,d.IHistoryService),F(11,A.IConfigurationService)],o)}),define(ae[2703],le([1,0,22,209,13,8,25,34,217,191,14,127,53,29,63,104,112,12,9,16,23,68,26,1901,52,509,109]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserTerminalProfileResolverService=e.BaseTerminalProfileResolverService=void 0;const w="Generated",D="terminals.integrated.profile-migration";let y=!1;class T{get defaultProfileName(){return this._defaultProfileName}constructor(M,O,N,P,B,V,z,x,H,W){this._context=M,this._configurationService=O,this._configurationResolverService=N,this._historyService=P,this._logService=B,this._terminalProfileService=V,this._workspaceContextService=z,this._remoteAgentService=x,this._storageService=H,this._notificationService=W,this._iconRegistry=(0,i.getIconRegistry)(),this._remoteAgentService.getConnection()?this._remoteAgentService.getEnvironment().then(U=>this._primaryBackendOs=U?.os||S.OS):this._primaryBackendOs=S.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()}async _refreshDefaultProfileName(){this._primaryBackendOs&&(this._defaultProfileName=(await this.getDefaultProfile({remoteAuthority:this._remoteAgentService.getConnection()?.remoteAuthority,os:this._primaryBackendOs}))?.profileName)}resolveIcon(M,O){if(M.icon){M.icon=this._getCustomIcon(M.icon)||this.getDefaultIcon();return}if(M.customPtyImplementation){M.icon=this.getDefaultIcon();return}if(M.executable)return;const N=this._getUnresolvedRealDefaultProfile(O);N&&(M.icon=N.icon),M.icon||(M.icon=this.getDefaultIcon())}getDefaultIcon(M){return this._iconRegistry.getIcon(this._configurationService.getValue("terminal.integrated.tabs.defaultIcon",{resource:M}))||u.Codicon.terminal}async resolveShellLaunchConfig(M,O){let N;M.executable?N=await this._resolveProfile({path:M.executable,args:M.args,profileName:w,isDefault:!1},O):N=await this.getDefaultProfile(O),M.executable=N.path,M.args=N.args,N.env&&(M.env?M.env={...M.env,...N.env}:M.env=N.env);const P=M===void 0||typeof M.cwd=="string"?void 0:M.cwd;M.icon=this._getCustomIcon(M.icon)||this._getCustomIcon(N.icon)||this.getDefaultIcon(P),N.overrideName&&(M.name=N.profileName),M.color=M.color||N.color||this._configurationService.getValue("terminal.integrated.tabs.defaultColor",{resource:P}),M.useShellEnvironment===void 0&&(M.useShellEnvironment=this._configurationService.getValue("terminal.integrated.inheritEnv"))}async getDefaultShell(M){return(await this.getDefaultProfile(M)).path}async getDefaultShellArgs(M){return(await this.getDefaultProfile(M)).args||[]}async getDefaultProfile(M){return this._resolveProfile(await this._getUnresolvedDefaultProfile(M),M)}getEnvironment(M){return this._context.getEnvironment(M)}_getCustomIcon(M){if(!!M){if(typeof M=="string")return l.ThemeIcon.fromId(M);if(l.ThemeIcon.isThemeIcon(M))return M;if(s.URI.isUri(M)||(0,v.isUriComponents)(M))return s.URI.revive(M);if(typeof M=="object"&&"light"in M&&"dark"in M){const O=M;if((s.URI.isUri(O.light)||(0,v.isUriComponents)(O.light))&&(s.URI.isUri(O.dark)||(0,v.isUriComponents)(O.dark)))return{light:s.URI.revive(O.light),dark:s.URI.revive(O.dark)}}}}async _getUnresolvedDefaultProfile(M){if(M.allowAutomationShell){const P=this._getUnresolvedAutomationShellProfile(M);if(P)return P}const O=await this._getUnresolvedShellSettingDefaultProfile(M);if(O)return this._setIconForAutomation(M,O);await this._terminalProfileService.profilesReady;const N=this._getUnresolvedRealDefaultProfile(M.os);return N?this._setIconForAutomation(M,N):this._setIconForAutomation(M,await this._getUnresolvedFallbackDefaultProfile(M))}_setIconForAutomation(M,O){if(M.allowAutomationShell){const N=(0,h.deepClone)(O);return N.icon=u.Codicon.tools,N}return O}_getUnresolvedRealDefaultProfile(M){const O=this._configurationService.getValue(`terminal.integrated.defaultProfile.${this._getOsKey(M)}`);if(O&&typeof O=="string")return this._terminalProfileService.availableProfiles.find(N=>N.profileName===O)}async _getUnresolvedShellSettingDefaultProfile(M){let O=this._configurationService.getValue(`terminal.integrated.shell.${this._getOsKey(M.os)}`);if(!this._isValidShell(O)){const V=this._configurationService.inspect(`terminal.integrated.shellArgs.${this._getOsKey(M.os)}`);if(!V.userValue&&!V.workspaceValue)return}(!O||!this._isValidShell(O))&&(O=await this._context.getDefaultSystemShell(M.remoteAuthority,M.os));let N;const P=this._configurationService.getValue(`terminal.integrated.shellArgs.${this._getOsKey(M.os)}`);this._isValidShellArgs(P,M.os)&&(N=P),N===void 0&&(M.os===2&&N===void 0&&r.parse(O).name.match(/(zsh|bash|fish)/)?N=["--login"]:N=[]);const B=this._guessProfileIcon(O);return{profileName:w,path:O,args:N,icon:B,isDefault:!1}}async _getUnresolvedFallbackDefaultProfile(M){const O=await this._context.getDefaultSystemShell(M.remoteAuthority,M.os);let N=this._terminalProfileService.availableProfiles.find(V=>r.parse(V.path).name===r.parse(O).name);if(N)return M.allowAutomationShell&&(N=(0,h.deepClone)(N),N.icon=u.Codicon.tools),N;let P;M.os===2&&r.parse(O).name.match(/(zsh|bash)/)?P=["--login"]:P=[];const B=this._guessProfileIcon(O);return{profileName:w,path:O,args:P,icon:B,isDefault:!1}}_getUnresolvedAutomationShellProfile(M){const O=this._configurationService.getValue(`terminal.integrated.automationShell.${this._getOsKey(M.os)}`);if(O&&typeof O=="string")return{path:O,profileName:w,isDefault:!1,icon:u.Codicon.tools};const N=this._configurationService.getValue(`terminal.integrated.automationProfile.${this._getOsKey(M.os)}`);if(this._isValidAutomationProfile(N,M.os))return N.icon=this._getCustomIcon(N.icon)||u.Codicon.tools,N}async _resolveProfile(M,O){if(O.os===1){const V=await this._context.getEnvironment(O.remoteAuthority),z=!!V.hasOwnProperty("PROCESSOR_ARCHITEW6432"),x=V.windir;if(!z&&x){const H=r.join(x,"Sysnative").replace(/\//g,"\\").toLowerCase();M.path&&M.path.toLowerCase().indexOf(H)===0&&(M.path=r.join(x,"System32",M.path.substr(H.length+1)))}M.path&&(M.path=M.path.replace(/\//g,"\\"))}const N=await this._context.getEnvironment(O.remoteAuthority),P=this._historyService.getLastActiveWorkspaceRoot(O.remoteAuthority?t.Schemas.vscodeRemote:t.Schemas.file),B=P?(0,R.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(P)):void 0;return M.path=await this._resolveVariables(M.path,N,B),M.args&&(typeof M.args=="string"?M.args=await this._resolveVariables(M.args,N,B):M.args=await Promise.all(M.args.map(V=>this._resolveVariables(V,N,B)))),M}async _resolveVariables(M,O,N){try{M=await this._configurationResolverService.resolveWithEnvironment(O,N,M)}catch(P){this._logService.error("Could not resolve shell",P)}return M}_getOsKey(M){switch(M){case 3:return"linux";case 2:return"osx";case 1:return"windows"}}_guessProfileIcon(M){switch(r.parse(M).name){case"bash":return u.Codicon.terminalBash;case"pwsh":case"powershell":return u.Codicon.terminalPowershell;case"tmux":return u.Codicon.terminalTmux;case"cmd":return u.Codicon.terminalCmd;default:return}}_isValidShell(M){return M?typeof M=="string":!1}_isValidShellArgs(M,O){return!!(M===void 0||O===1&&typeof M=="string"||Array.isArray(M)&&M.every(N=>typeof N=="string"))}async createProfileFromShellAndShellArgs(M,O){const N=this._terminalProfileService.availableProfiles?.find(x=>x.path!==M?!1:x.args===void 0||typeof x.args=="string"?x.args===O:x.path===M&&(0,d.equals)(x.args,O||[])),P=await this.getDefaultProfile({remoteAuthority:this._remoteAgentService.getConnection()?.remoteAuthority,os:this._primaryBackendOs});P.profileName=`${P.path} (migrated)`;const B=N||P,V=this._isValidShellArgs(O,this._primaryBackendOs)?O:B.args,z={profileName:B.profileName,path:B.path,args:V,isDefault:!0};return N&&N.profileName===z.profileName&&N.path===z.path&&(0,v.terminalProfileArgsMatch)(N.args,z.args)?N.profileName:z}_isValidAutomationProfile(M,O){return M==null||typeof M!="object"?!1:"path"in M&&typeof M.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(D,1,!0)&&!y&&(this._notificationService.prompt(a.default.Info,(0,g.localize)(0,null),[{label:(0,g.localize)(1,null),run:async()=>{const O=this._configurationService.getValue("terminal.integrated.shell."+this._primaryBackendOs),N=this._configurationService.getValue("terminal.integrated.shellArgs."+this._primaryBackendOs),P=await this.createProfileFromShellAndShellArgs(O,N);if(typeof P=="string")await this._configurationService.updateValue("terminal.integrated.defaultProfile."+this._primaryBackendOs,P),this._logService.trace(`migrated from shell/shellArgs, using existing profile ${P}`);else{const B={...this._configurationService.inspect("terminal.integrated.profiles."+this._primaryBackendOs).userValue},V={path:P.path};P.args&&(V.args=P.args),B[P.profileName]=V,await this._configurationService.updateValue("terminal.integrated.profiles."+this._primaryBackendOs,B),await this._configurationService.updateValue("terminal.integrated.defaultProfile."+this._primaryBackendOs,P.profileName),this._logService.trace(`migrated from shell/shellArgs, ${O} ${N} to profile ${JSON.stringify(P)}`)}await this._configurationService.updateValue("terminal.integrated.shell."+this._primaryBackendOs,void 0),await this._configurationService.updateValue("terminal.integrated.shellArgs."+this._primaryBackendOs,void 0)}}],{neverShowAgain:{id:D,scope:o.NeverShowAgainScope.WORKSPACE}}),y=!0)}}we([(0,c.debounce)(200)],T.prototype,"_refreshDefaultProfileName",null),e.BaseTerminalProfileResolverService=T;let _=class extends T{constructor(M,O,N,P,B,V,z,x,H,W){super({getDefaultSystemShell:async(U,$)=>{const q=await B.getBackend(U);return!U||!q?$===1?"pwsh":"bash":q.getDefaultSystemShell($)},getEnvironment:async U=>{const $=await B.getBackend(U);return!U||!$?p.env:$.getEnvironment()}},O,M,N,P,V,z,x,H,W)}};_=we([F(0,I.IConfigurationResolverService),F(1,A.IConfigurationService),F(2,b.IHistoryService),F(3,k.ILogService),F(4,m.ITerminalInstanceService),F(5,C.ITerminalProfileService),F(6,E.IWorkspaceContextService),F(7,f.IRemoteAgentService),F(8,n.IStorageService),F(9,o.INotificationService)],_),e.BrowserTerminalProfileResolverService=_}),define(ae[683],le([1,0,209,2,60,8,19,5,23,9,104,22,14,53]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeFishHistoryCmd=e.fetchFishHistory=e.fetchPwshHistory=e.fetchZshHistory=e.fetchBashHistory=e.TerminalPersistedHistory=e.clearShellFileHistory=e.getShellFileHistory=e.getDirectoryHistory=e.getCommandHistory=void 0;var i;(function(_){_[_.DefaultHistoryLimit=100]="DefaultHistoryLimit"})(i||(i={}));var f;(function(_){_.Entries="terminal.history.entries",_.Timestamp="terminal.history.timestamp"})(f||(f={}));let c;function l(_){return c||(c=_.get(E.IInstantiationService).createInstance(g,"commands")),c}e.getCommandHistory=l;let s;function d(_){return s||(s=_.get(E.IInstantiationService).createInstance(g,"dirs")),s}e.getDirectoryHistory=d;const n=new Map;async function a(_,L){const M=n.get(L);if(M===null)return[];if(M!==void 0)return M;let O;switch(L){case"bash":O=await h(_);break;case"pwsh":O=await m(_);break;case"zsh":O=await v(_);break;case"fish":O=await w(_);break;default:return[]}if(O===void 0)return n.set(L,null),[];const N=Array.from(O);return n.set(L,N),N}e.getShellFileHistory=a;function o(){n.clear()}e.clearShellFileHistory=o;let g=class extends p.Disposable{get entries(){return this._ensureUpToDate(),this._entries.entries()}constructor(L,M,O){super(),this._storageDataKey=L,this._configurationService=M,this._storageService=O,this._timestamp=0,this._isReady=!1,this._isStale=!0,this._entries=new R.LRUCache(this._getHistoryLimit()),this._configurationService.onDidChangeConfiguration(N=>{N.affectsConfiguration("terminal.integrated.shellIntegration.history")&&(this._entries.limit=this._getHistoryLimit())}),this._storageService.onDidChangeValue(N=>{N.key===this._getTimestampStorageKey()&&!this._isStale&&(this._isStale=this._storageService.getNumber(this._getTimestampStorageKey(),-1,0)!==this._timestamp)})}add(L,M){this._ensureUpToDate(),this._entries.set(L,M),this._saveState()}remove(L){this._ensureUpToDate(),this._entries.delete(L),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(),-1,0);const L=this._loadPersistedState();if(L)for(const M of L.entries)this._entries.set(M.key,M.value)}_loadPersistedState(){const L=this._storageService.get(this._getEntriesStorageKey(),-1);if(L===void 0||L.length===0)return;let M;try{M=JSON.parse(L)}catch{return}return M}_saveState(){const L={entries:[]};this._entries.forEach((M,O)=>L.entries.push({key:O,value:M})),this._storageService.store(this._getEntriesStorageKey(),JSON.stringify(L),-1,1),this._timestamp=Date.now(),this._storageService.store(this._getTimestampStorageKey(),this._timestamp,-1,1)}_getHistoryLimit(){const L=this._configurationService.getValue("terminal.integrated.shellIntegration.history");return typeof L=="number"?L:100}_getTimestampStorageKey(){return`terminal.history.timestamp.${this._storageDataKey}`}_getEntriesStorageKey(){return`terminal.history.entries.${this._storageDataKey}`}};g=we([F(1,A.IConfigurationService),F(2,I.IStorageService)],g),e.TerminalPersistedHistory=g;async function h(_){const L=_.get(k.IFileService),M=_.get(S.IRemoteAgentService),O=await M.getEnvironment();if(O?.os===1||!O&&r.isWindows)return;const N=await T(t.env.HOME,".bash_history",!1,L,M);if(N===void 0)return;const P=N.split(` `),B=new Set;let V,z,x;for(let H=0;H<P.length;H++){V=P[H],z===void 0?z=V:z+=` ${V}`;for(let W=0;W<V.length;W++)x?V[W]===x&&(x=void 0):V[W].match(/['"]/)&&(x=V[W]);x===void 0&&(z.length>0&&B.add(z.trim()),z=void 0)}return B.values()}e.fetchBashHistory=h;async function v(_){const L=_.get(k.IFileService),M=_.get(S.IRemoteAgentService),O=await M.getEnvironment();if(O?.os===1||!O&&r.isWindows)return;const N=await T(t.env.HOME,".zsh_history",!1,L,M);if(N===void 0)return;const P=N.split(/\:\s\d+\:\d+;/),B=new Set;for(let V=0;V<P.length;V++){const z=P[V].replace(/\\\n/g,` `).trim();z.length>0&&B.add(z)}return B.values()}e.fetchZshHistory=v;async function m(_){const L=_.get(k.IFileService),M=_.get(S.IRemoteAgentService);let O,N;const P=await M.getEnvironment(),B=P?.os===1||!P&&r.isWindows;B?(O=t.env.APPDATA,N="\\Microsoft\\Windows\\PowerShell\\PSReadLine\\ConsoleHost_history.txt"):(O=t.env.HOME,N=".local/share/powershell/PSReadline/ConsoleHost_history.txt");const V=await T(O,N,B,L,M);if(V===void 0)return;const z=V.split(` `),x=new Set;let H,W,U;for(let $=0;$<z.length;$++){if(H=z[$],W===void 0?W=H:W+=` ${H}`,!H.endsWith("`")){const q=W.trim();q.length>0&&x.add(q),W=void 0;continue}for(let q=0;q<H.length;q++)U?H[q]===U&&(U=void 0):H[q].match(/`/)&&(U=H[q]);if(U)W=W.replace(/`$/,""),U=void 0;else{const q=W.trim();q.length>0&&x.add(q),W=void 0}}return x.values()}e.fetchPwshHistory=m;async function w(_){const L=_.get(k.IFileService),M=_.get(S.IRemoteAgentService),O=await M.getEnvironment();if(O?.os===1||!O&&r.isWindows)return;const P=await(t.env.XDG_DATA_HOME?T(t.env.XDG_DATA_HOME,"fish/fish_history",!1,L,M):T(t.env.HOME,".local/share/fish/fish_history",!1,L,M));if(P===void 0)return;const B=new Set,V=P.split(` `).filter(z=>z.startsWith("- cmd:")).map(z=>z.substring(6).trimStart());for(let z=0;z<V.length;z++){const x=D(V[z]).trim();x.length>0&&B.add(x)}return B.values()}e.fetchFishHistory=w;function D(_){return y(/(^|[^\\])((?:\\\\)*)(\\n)/g,_,`$1$2 `)}e.sanitizeFishHistoryCmd=D;function y(_,L,M){let O,N=L;for(;;)if(O=N,N=N.replace(_,M),N===O)return N}async function T(_,L,M,O,N){if(!_)return;const P=!!N.getConnection()?.remoteAuthority,B=b.URI.from({scheme:P?C.Schemas.vscodeRemote:C.Schemas.file,path:(M?u.win32.join:u.posix.join)(_,L)});let V;try{V=await O.readFile(B)}catch(z){if(z instanceof k.FileOperationError&&z.fileOperationResult===1)return;throw z}if(V!==void 0)return V.value.toString()}}),define(ae[2704],le([1,0,197,14,54,62,1904,5,48,506,33,12,452,683,345,9,208,24,824,23]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showRunRecentQuickPick=void 0;async function n(o,g,h,v,m,w){if(!g.xterm)return;const D=o.get(l.IEditorService),y=o.get(E.IInstantiationService),T=o.get(I.IQuickInputService),_=o.get(d.IStorageService),L=o.get(C.IThemeService),M=`terminal.pinnedRecentCommands.${g.shellType}`;let O,N=[];const P=new Set,B={iconClass:C.ThemeIcon.asClassName(r.commandHistoryRemoveIcon),tooltip:(0,k.localize)(0,null)},V={iconClass:C.ThemeIcon.asClassName(r.commandHistoryOutputIcon),tooltip:(0,k.localize)(1,null),alwaysVisible:!1};if(v==="command"){let X=function(Y){return Y.replace(/\r?\n/g,"\u23CE").replace(/\s\s\s+/g,"\u22EF")};O=p.isMacintosh?(0,k.localize)(2,null):(0,k.localize)(3,null);const U=g.capabilities.get(2),$=U?.commands,q=U?.executingCommand;if(q&&P.add(q),$&&$.length>0){for(const Y of $){const ee=Y.command.trim();if(ee.length===0||P.has(ee))continue;let ie=(0,b.collapseTildePath)(Y.cwd,g.userHome,g.os===1?"\\":"/");Y.exitCode&&(Y.exitCode===-1?ie+=" failed":ie+=` exitCode: ${Y.exitCode}`),ie=ie.trim();const re=[V],oe=N.length>0?N[N.length-1]:void 0;if(oe?.type!=="separator"&&oe?.label===ee){oe.id=Y.timestamp.toString(),oe.description=ie;continue}N.push({label:X(ee),rawLabel:ee,description:ie,id:Y.timestamp.toString(),command:Y,buttons:Y.hasOutput()?re:void 0}),P.add(ee)}N=N.reverse()}q&&N.unshift({label:X(q),rawLabel:q,description:U.cwd}),N.length>0&&N.unshift({type:"separator",label:i.terminalStrings.currentSessionCategory});const G=y.invokeFunction(u.getCommandHistory),Q=[];for(const[Y,ee]of G.entries)!P.has(Y)&&ee.shellType===g.shellType&&(Q.unshift({label:X(Y),rawLabel:Y,buttons:[B]}),P.add(Y));Q.length>0&&N.push({type:"separator",label:i.terminalStrings.previousSessionCategory},...Q);const j=await y.invokeFunction(u.getShellFileHistory,g.shellType),K=[];for(const Y of j)P.has(Y)||K.unshift({label:X(Y),rawLabel:Y});K.length>0&&N.push({type:"separator",label:(0,k.localize)(4,null,g.shellType)},...K)}else{O=p.isMacintosh?(0,k.localize)(5,null):(0,k.localize)(6,null);const U=g.capabilities.get(0)?.cwds||[];if(U&&U.length>0){for(const X of U)N.push({label:X,rawLabel:X});N=N.reverse(),N.unshift({type:"separator",label:i.terminalStrings.currentSessionCategory})}const $=y.invokeFunction(u.getDirectoryHistory),q=[];for(const[X,G]of $.entries)(G===null||G.remoteAuthority===g.remoteAuthority)&&!U.includes(X)&&q.unshift({label:X,rawLabel:X,buttons:[B]});q.length>0&&N.push({type:"separator",label:i.terminalStrings.previousSessionCategory},...q)}if(N.length===0)return;const z=new t.Toggle({title:"Fuzzy search",icon:r.commandHistoryFuzzySearchIcon,isChecked:m==="fuzzy",inputActiveOptionBorder:L.getColorTheme().getColor(S.inputActiveOptionBorder),inputActiveOptionForeground:L.getColorTheme().getColor(S.inputActiveOptionForeground),inputActiveOptionBackground:L.getColorTheme().getColor(S.inputActiveOptionBackground)});z.onChange(()=>{y.invokeFunction(n,g,h,v,z.checked?"fuzzy":"contiguous",H.value)});const x=y.createInstance(a),H=T.createQuickPick(),W=N;return H.items=[...W],H.sortByLabel=!1,H.placeholder=O,H.matchOnLabelMode=m||"contiguous",H.toggles=[z],H.onDidTriggerItemButton(async U=>{if(U.button===B)v==="command"?y.invokeFunction(u.getCommandHistory)?.remove(U.item.label):y.invokeFunction(u.getDirectoryHistory)?.remove(U.item.label);else if(U.button===V){const $=U.item.command,q=$?.getOutput();if(q&&$?.command){const X=await x.provideTextContent(f.URI.from({scheme:a.scheme,path:`${$.command}... ${(0,c.fromNow)($.timestamp,!0)}`,fragment:q,query:`terminal-output-${$.timestamp}-${g.instanceId}`}));X&&await D.openEditor({resource:X.uri})}}await y.invokeFunction(n,g,h,v,m,w)}),H.onDidChangeValue(async U=>{U||await y.invokeFunction(n,g,h,v,m,U)}),H.onDidAccept(async()=>{const U=H.activeItems[0];let $;v==="cwd"?$=`cd ${await g.preparePathForShell(U.rawLabel)}`:$=U.rawLabel,H.hide(),g.runCommand($,!H.keyMods.alt),H.keyMods.alt&&g.focus()}),w&&(H.value=w),new Promise(U=>{h.set(!0),(0,s.showWithPinnedItems)(_,M,H,!0),H.onDidHide(()=>{h.set(!1),U()})})}e.showRunRecentQuickPick=n;let a=class ul{constructor(g,h){this._modelService=h,g.registerTextModelContentProvider(ul.scheme,this)}async provideTextContent(g){const h=this._modelService.getModel(g);return h&&!h.isDisposed()?h:this._modelService.createModel(g.fragment,null,g,!1)}};a.scheme="TERMINAL_OUTPUT",a=we([F(0,A.ITextModelService),F(1,R.IModelService)],a)}),define(ae[2705],le([1,0,166,9,19,5,2565,104,89,2,109]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalNativeContribution=void 0;let C=class extends b.Disposable{constructor(u,i,f,c,l){super(),this._fileService=u,this._terminalService=i,this.instantiationService=f,this.remoteAgentService=c,this.nativeHostService=l,t.ipcRenderer.on("vscode:openFiles",(d,n)=>{this._onOpenFileRequest(n)}),this._register(l.onDidResumeOS(()=>this._onOsResume())),this._terminalService.setNativeDelegate({getWindowCount:()=>l.getWindowCount(),openDevTools:()=>l.openDevTools(),toggleDevTools:()=>l.toggleDevTools()});const s=c.getConnection();s&&s.remoteAuthority&&(0,k.registerRemoteContributions)()}_onOsResume(){for(const u of this._terminalService.instances)u.xterm?.forceRedraw()}async _onOpenFileRequest(u){if(u.termProgram==="vscode"&&u.filesToWait){const i=p.URI.revive(u.filesToWait.waitMarkerFileUri);await this._whenFileDeleted(i),this._terminalService.activeInstance?.focus()}}_whenFileDeleted(u){return new Promise(i=>{let f=!1;const c=setInterval(async()=>{if(!f){f=!0;const l=await this._fileService.exists(u);f=!1,l||(clearInterval(c),i(void 0))}},1e3)})}};C=we([F(0,R.IFileService),F(1,S.ITerminalService),F(2,A.IInstantiationService),F(3,E.IRemoteAgentService),F(4,I.INativeHostService)],C),e.TerminalNativeContribution=C}),define(ae[2706],le([1,0,8,25,26,23,34,109,2703,127,217,191,69,104]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronTerminalProfileResolverService=void 0;let i=class extends I.BaseTerminalProfileResolverService{constructor(c,l,s,d,n,a,o,g,h,v,m){super({getDefaultSystemShell:async(w,D)=>{const y=await m.getBackend(w);if(!y)throw new Error(`Cannot get default system shell when there is no backend for remote authority '${w}'`);return y.getDefaultSystemShell(D)},getEnvironment:async w=>{const D=await m.getBackend(w);if(!D)throw new Error(`Cannot get environment when there is no backend for remote authority '${w}'`);return D.getEnvironment()}},l,c,s,n,o,a,g,h,v)}};i=we([F(0,S.IConfigurationResolverService),F(1,t.IConfigurationService),F(2,C.IHistoryService),F(3,r.ILifecycleService),F(4,p.ILogService),F(5,k.IWorkspaceContextService),F(6,b.ITerminalProfileService),F(7,u.IRemoteAgentService),F(8,A.IStorageService),F(9,R.INotificationService),F(10,E.ITerminalInstanceService)],i),e.ElectronTerminalProfileResolverService=i}),define(ae[2707],le([1,0,35,102,17,185,611,44,127,2705,2706,2564]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSharedProcessRemoteService)(k.ILocalPtyService,A.TerminalIpcChannels.LocalPty),(0,t.registerSingleton)(I.ITerminalProfileResolverService,S.ElectronTerminalProfileResolverService,1);const r=R.Registry.as(E.Extensions.Workbench);r.registerWorkbenchContribution(C.LocalTerminalBackendContribution,3),r.registerWorkbenchContribution(b.TerminalNativeContribution,3)}),define(ae[396],le([1,0,16,6,2,14,28,13,1992,15,31,7,47,35,26,48,23,190,260,248,39,131,104]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"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 g(N){return`onAuthenticationRequest:${N}`}e.getAuthenticationProviderActivationEvent=g;const h=["vscode.git","vscode.github","github.vscode-pull-request-github","github.remotehub","github.codespaces","ms-vsliveshare.vsliveshare"];function v(N,P,B){const V=`${P}-${B}-usages`,z=N.get(V,-1);let x=[];if(z)try{x=JSON.parse(z)}catch{}return x}e.readAccountUsages=v;function m(N,P,B){const V=`${P}-${B}-usages`;N.remove(V,-1)}e.removeAccountUsage=m;function w(N,P,B,V,z){const x=`${P}-${B}-usages`,H=v(N,P,B),W=H.findIndex(U=>U.extensionId===V);W>-1?H.splice(W,1,{extensionId:V,extensionName:z,lastUsed:Date.now()}):H.push({extensionId:V,extensionName:z,lastUsed:Date.now()}),N.store(x,JSON.stringify(H),-1,1)}e.addAccountUsage=w;async function D(N,P){const B=await N.getPassword(`${P.urlProtocol}.login`,"account");if(B)try{const V=JSON.parse(B);if(V&&(0,E.isString)(V.id)&&(0,E.isString)(V.accessToken)&&(0,E.isString)(V.providerId))return V}catch{}}e.getCurrentAuthenticationSessionInfo=D;function y(N,P,B){let V=[];try{const z=N.get(`${P}-${B}`,-1);z&&(V=JSON.parse(z))}catch{}return V}e.readAllowedExtensions=y;const T=" ";S.CommandsRegistry.registerCommand("workbench.getCodeExchangeProxyEndpoints",function(N,P){return N.get(d.IBrowserWorkbenchEnvironmentService).options?.codeExchangeProxyEndpoints});const _={type:"object",additionalProperties:!1,properties:{id:{type:"string",description:I.localize(0,null)},label:{type:"string",description:I.localize(1,null)}}},L=a.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"authentication",jsonSchema:{description:I.localize(2,null),type:"array",items:_}});let M=b.MenuRegistry.appendMenuItem(b.MenuId.AccountsContext,{command:{id:"noAuthenticationProviders",title:I.localize(3,null),precondition:C.ContextKeyExpr.false()}}),O=class extends R.Disposable{constructor(P,B,V,z,x,H){super(),this.activityService=P,this.extensionService=B,this.storageService=V,this.remoteAgentService=z,this.dialogService=x,this.quickInputService=H,this._signInRequestItems=new Map,this._sessionAccessRequestItems=new Map,this._accountBadgeDisposable=this._register(new R.MutableDisposable),this._authenticationProviders=new Map,this.declaredProviders=[],this._onDidRegisterAuthenticationProvider=this._register(new p.Emitter),this.onDidRegisterAuthenticationProvider=this._onDidRegisterAuthenticationProvider.event,this._onDidUnregisterAuthenticationProvider=this._register(new p.Emitter),this.onDidUnregisterAuthenticationProvider=this._onDidUnregisterAuthenticationProvider.event,this._onDidChangeSessions=this._register(new p.Emitter),this.onDidChangeSessions=this._onDidChangeSessions.event,this._onDidChangeDeclaredProviders=this._register(new p.Emitter),this.onDidChangeDeclaredProviders=this._onDidChangeDeclaredProviders.event,L.setHandler((W,{added:U,removed:$})=>{U.forEach(X=>{for(const G of X.value){if((0,k.isFalsyOrWhitespace)(G.id)){X.collector.error(I.localize(4,null));continue}if((0,k.isFalsyOrWhitespace)(G.label)){X.collector.error(I.localize(5,null));continue}this.declaredProviders.some(Q=>Q.id===G.id)?X.collector.error(I.localize(6,null,G.id)):this.declaredProviders.push(G)}}),(0,t.flatten)($.map(X=>X.value)).forEach(X=>{const G=this.declaredProviders.findIndex(Q=>Q.id===X.id);G>-1&&this.declaredProviders.splice(G,1)}),this._onDidChangeDeclaredProviders.fire(this.declaredProviders)})}getProviderIds(){const P=[];return this._authenticationProviders.forEach(B=>{P.push(B.id)}),P}isAuthenticationProviderRegistered(P){return this._authenticationProviders.has(P)}registerAuthenticationProvider(P,B){this._authenticationProviders.set(P,B),this._onDidRegisterAuthenticationProvider.fire({id:P,label:B.label}),M&&(M.dispose(),M=void 0)}unregisterAuthenticationProvider(P){const B=this._authenticationProviders.get(P);if(B){B.dispose(),this._authenticationProviders.delete(P),this._onDidUnregisterAuthenticationProvider.fire({id:P,label:B.label});const V=this._sessionAccessRequestItems.get(P)||{};Object.keys(V).forEach(z=>{this.removeAccessRequest(P,z)})}this._authenticationProviders.size||(M=b.MenuRegistry.appendMenuItem(b.MenuId.AccountsContext,{command:{id:"noAuthenticationProviders",title:I.localize(7,null),precondition:C.ContextKeyExpr.false()}}))}async sessionsUpdate(P,B){const V=this._authenticationProviders.get(P);V&&(this._onDidChangeSessions.fire({providerId:P,label:V.label,event:B}),B.added&&await this.updateNewSessionRequests(V,B.added),B.removed&&await this.updateAccessRequests(P,B.removed),this.updateBadgeCount())}async updateNewSessionRequests(P,B){const V=this._signInRequestItems.get(P.id);!V||Object.keys(V).forEach(z=>{B.some(x=>x.scopes.slice().join(T)===z)&&(V[z]?.disposables.forEach(H=>H.dispose()),delete V[z],Object.keys(V).length===0?this._signInRequestItems.delete(P.id):this._signInRequestItems.set(P.id,V))})}async updateAccessRequests(P,B){const V=this._sessionAccessRequestItems.get(P);V&&Object.keys(V).forEach(z=>{B.forEach(x=>{const H=V[z].possibleSessions.findIndex(W=>W.id===x.id);H&&V[z].possibleSessions.splice(H,1)}),V[z].possibleSessions.length||this.removeAccessRequest(P,z)})}updateBadgeCount(){this._accountBadgeDisposable.clear();let P=0;if(this._signInRequestItems.forEach(B=>{Object.keys(B).forEach(V=>{P+=B[V].requestingExtensionIds.length})}),this._sessionAccessRequestItems.forEach(B=>{P+=Object.keys(B).length}),P>0){const B=new l.NumberBadge(P,()=>I.localize(8,null));this._accountBadgeDisposable.value=this.activityService.showAccountsActivity({badge:B})}}removeAccessRequest(P,B){const V=this._sessionAccessRequestItems.get(P)||{};V[B]&&((0,R.dispose)(V[B].disposables),delete V[B],this.updateBadgeCount())}isAccessAllowed(P,B,V){const x=y(this.storageService,P,B).find(U=>U.id===V);if(x)return x.allowed!==void 0?x.allowed:!0;const H=this.remoteAgentService.getConnection();if((H!==null?H.remoteAuthority.startsWith("codespaces"):A.isWeb)&&h.includes(V))return!0}async updatedAllowedExtension(P,B,V,z,x){const H=y(this.storageService,P,B),W=H.findIndex(U=>U.id===V);W===-1?H.push({id:V,name:z,allowed:x}):H[W].allowed=x,await this.storageService.store(`${P}-${B}`,JSON.stringify(H),-1,0)}async showGetSessionPrompt(P,B,V,z){const x=this.getLabel(P),{choice:H}=await this.dialogService.show(i.Severity.Info,I.localize(9,null,z,x,B),[I.localize(10,null),I.localize(11,null),I.localize(12,null)],{cancelId:2}),W=H===2,U=H===0;return W||(this.updatedAllowedExtension(P,B,V,z,U),this.removeAccessRequest(P,V)),U}async selectSession(P,B,V,z,x){return new Promise((H,W)=>{x.length||W("No available sessions");const U=this.quickInputService.createQuickPick();U.ignoreFocusOut=!0;const $=x.map(X=>({label:X.account.label,session:X}));$.push({label:I.localize(13,null)});const q=this.getLabel(P);U.items=$,U.title=I.localize(14,null,V,q),U.placeholder=I.localize(15,null,V),U.onDidAccept(async X=>{const G=U.selectedItems[0].session??await this.createSession(P,z),Q=G.account.label;this.updatedAllowedExtension(P,Q,B,V,!0),this.removeAccessRequest(P,B),this.storageService.store(`${V}-${P}`,G.id,-1,1),U.dispose(),H(G)}),U.onDidHide(X=>{U.selectedItems[0]||W("User did not consent to account access"),U.dispose()}),U.show()})}async completeSessionAccessRequest(P,B,V,z){const H=(this._sessionAccessRequestItems.get(P)||{})[B];if(!H)return;const W=H.possibleSessions,U=this.supportsMultipleAccounts(P);let $;if(U)try{$=await this.selectSession(P,B,V,z,W)}catch{}else await this.showGetSessionPrompt(P,W[0].account.label,B,V)&&($=W[0]);if($){w(this.storageService,P,$.account.label,B,V);const q=this.getLabel(P);this._onDidChangeSessions.fire({providerId:P,label:q,event:{added:[],removed:[],changed:[$]}})}}requestSessionAccess(P,B,V,z,x){const H=this._sessionAccessRequestItems.get(P)||{};if(H[B])return;const U=b.MenuRegistry.appendMenuItem(b.MenuId.AccountsContext,{group:"3_accessRequests",command:{id:`${P}${B}Access`,title:I.localize(16,null,this.getLabel(P),V)}}),$=S.CommandsRegistry.registerCommand({id:`${P}${B}Access`,handler:async q=>{q.get(s.IAuthenticationService).completeSessionAccessRequest(P,B,V,z)}});H[B]={possibleSessions:x,disposables:[U,$]},this._sessionAccessRequestItems.set(P,H),this.updateBadgeCount()}async requestNewSession(P,B,V,z){let x=this._authenticationProviders.get(P);if(x||await new Promise((G,Q)=>{this.onDidRegisterAuthenticationProvider(j=>{j.id===P&&(x=this._authenticationProviders.get(P),G())})}),!x)return;const H=this._signInRequestItems.get(P),W=B.join(T);if(H&&H[W]&&H[W].requestingExtensionIds.includes(V))return;const $=`${P}:${V}:signIn${Object.keys(H||[]).length}`,q=b.MenuRegistry.appendMenuItem(b.MenuId.AccountsContext,{group:"2_signInRequests",command:{id:$,title:I.localize(17,null,x.label,z)}}),X=S.CommandsRegistry.registerCommand({id:$,handler:async G=>{const Q=G.get(s.IAuthenticationService),j=G.get(c.IStorageService),K=await Q.createSession(P,B);this.updatedAllowedExtension(P,K.account.label,V,z,!0),j.store(`${z}-${P}`,K.id,-1,1)}});if(H){const G=H[W]||{disposables:[],requestingExtensionIds:[]};H[W]={disposables:[...G.disposables,q,X],requestingExtensionIds:[...G.requestingExtensionIds,V]},this._signInRequestItems.set(P,H)}else this._signInRequestItems.set(P,{[W]:{disposables:[q,X],requestingExtensionIds:[V]}});this.updateBadgeCount()}getLabel(P){const B=this._authenticationProviders.get(P);if(B)return B.label;throw new Error(`No authentication provider '${P}' is currently registered.`)}supportsMultipleAccounts(P){const B=this._authenticationProviders.get(P);if(B)return B.supportsMultipleAccounts;throw new Error(`No authentication provider '${P}' is currently registered.`)}async tryActivateProvider(P,B){await this.extensionService.activateByEvent(g(P),B?1:0);let V=this._authenticationProviders.get(P);if(V)return V;const z=new Promise((H,W)=>{this.onDidRegisterAuthenticationProvider(U=>{if(U.id===P)if(V=this._authenticationProviders.get(P),V)H(V);else throw new Error(`No authentication provider '${P}' is currently registered.`)})}),x=new Promise((H,W)=>{setTimeout(()=>{W("Timed out waiting for authentication provider to register")},5e3)});return Promise.race([z,x])}async getSessions(P,B,V=!1){const z=this._authenticationProviders.get(P)||await this.tryActivateProvider(P,V);if(z)return await z.getSessions(B);throw new Error(`No authentication provider '${P}' is currently registered.`)}async createSession(P,B,V=!1){const z=this._authenticationProviders.get(P)||await this.tryActivateProvider(P,V);if(z)return await z.createSession(B);throw new Error(`No authentication provider '${P}' is currently registered.`)}async removeSession(P,B){const V=this._authenticationProviders.get(P);if(V)return V.removeSession(B);throw new Error(`No authentication provider '${P}' is currently registered.`)}async manageTrustedExtensionsForAccount(P,B){const V=this._authenticationProviders.get(P);if(V)return V.manageTrustedExtensions(B);throw new Error(`No authentication provider '${P}' is currently registered.`)}async removeAccountSessions(P,B,V){const z=this._authenticationProviders.get(P);if(z)return z.removeAccountSessions(B,V);throw new Error(`No authentication provider '${P}' is currently registered.`)}};O=we([F(0,l.IActivityService),F(1,n.IExtensionService),F(2,c.IStorageService),F(3,o.IRemoteAgentService),F(4,r.IDialogService),F(5,f.IQuickInputService)],O),e.AuthenticationService=O,(0,u.registerSingleton)(s.IAuthenticationService,O,1)}),define(ae[2708],le([1,0,2,1446,77,396,260,67,47,23,68,48,26,208,39,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadAuthentication=e.MainThreadAuthenticationProvider=void 0;class c extends t.Disposable{constructor(d,n,a,o,g,h,v,m){super(),this._proxy=d,this.id=n,this.label=a,this.supportsMultipleAccounts=o,this.notificationService=g,this.storageService=h,this.quickInputService=v,this.dialogService=m}manageTrustedExtensions(d){const n=(0,A.readAllowedExtensions)(this.storageService,this.id,d);if(!n.length){this.dialogService.show(S.default.Info,p.localize(0,null));return}const a=this.quickInputService.createQuickPick();a.canSelectMany=!0,a.customButton=!0,a.customLabel=p.localize(1,null);const o=(0,A.readAccountUsages)(this.storageService,this.id,d),g=n.map(h=>{const v=o.find(m=>h.id===m.extensionId);return{label:h.name,description:v?p.localize(2,null,(0,u.fromNow)(v.lastUsed,!0)):p.localize(3,null),extension:h}});a.items=g,a.selectedItems=g.filter(h=>h.extension.allowed===void 0||h.extension.allowed),a.title=p.localize(4,null),a.placeholder=p.localize(5,null),a.onDidAccept(()=>{const h=a.items.map(v=>v.extension);this.storageService.store(`${this.id}-${d}`,JSON.stringify(h),-1,0),a.dispose()}),a.onDidChangeSelection(h=>{a.items.forEach(v=>{v.extension&&(v.extension.allowed=!1)}),h.forEach(v=>v.extension.allowed=!0)}),a.onDidHide(()=>{a.dispose()}),a.onDidCustom(()=>{a.hide()}),a.show()}async removeAccountSessions(d,n){const a=(0,A.readAccountUsages)(this.storageService,this.id,d);if((await this.dialogService.show(S.default.Info,a.length?p.localize(6,null,d,a.map(g=>g.extensionName).join(` `)):p.localize(7,null,d),[p.localize(8,null),p.localize(9,null)],{cancelId:1})).choice===0){const g=n.map(h=>this.removeSession(h.id));await Promise.all(g),(0,A.removeAccountUsage)(this.storageService,this.id,d),this.storageService.remove(`${this.id}-${d}`,-1)}}async getSessions(d){return this._proxy.$getSessions(this.id,d)}createSession(d){return this._proxy.$createSession(this.id,d)}async removeSession(d){await this._proxy.$removeSession(this.id,d),this.notificationService.info(p.localize(10,null))}}e.MainThreadAuthenticationProvider=c;let l=class extends t.Disposable{constructor(d,n,a,o,g,h,v,m){super(),this.authenticationService=n,this.dialogService=a,this.storageService=o,this.notificationService=g,this.quickInputService=h,this.extensionService=v,this.telemetryService=m,this._proxy=d.getProxy(E.ExtHostContext.ExtHostAuthentication),this._register(this.authenticationService.onDidChangeSessions(w=>{this._proxy.$onDidChangeAuthenticationSessions(w.providerId,w.label)})),this._proxy.$setProviders(this.authenticationService.declaredProviders),this._register(this.authenticationService.onDidChangeDeclaredProviders(w=>{this._proxy.$setProviders(w)}))}async $registerAuthenticationProvider(d,n,a){const o=new c(this._proxy,d,n,a,this.notificationService,this.storageService,this.quickInputService,this.dialogService);this.authenticationService.registerAuthenticationProvider(d,o)}$unregisterAuthenticationProvider(d){this.authenticationService.unregisterAuthenticationProvider(d)}$ensureProvider(d){return this.extensionService.activateByEvent((0,A.getAuthenticationProviderActivationEvent)(d),1)}$sendDidChangeSessions(d,n){this.authenticationService.sessionsUpdate(d,n)}$removeSession(d,n){return this.authenticationService.removeSession(d,n)}async loginPrompt(d,n,a,o){const g=a?p.localize(11,null,n,d):p.localize(12,null,n,d),{choice:h}=await this.dialogService.show(S.default.Info,g,[p.localize(13,null),p.localize(14,null)],{cancelId:1,detail:o});return h===0}async setTrustedExtensionAndAccountPreference(d,n,a,o,g){this.authenticationService.updatedAllowedExtension(d,n,a,o,!0),this.storageService.store(`${o}-${d}`,g,-1,1)}async doGetSession(d,n,a,o,g){const h=await this.authenticationService.getSessions(d,n,!0),v=this.authenticationService.supportsMultipleAccounts(d);if(g.forceNewSession&&g.createIfNone)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, createIfNone");if(g.forceNewSession&&g.silent)throw new Error("Invalid combination of options. Please remove one of the following: forceNewSession, silent");if(g.createIfNone&&g.silent)throw new Error("Invalid combination of options. Please remove one of the following: createIfNone, silent");if(!g.forceNewSession&&h.length){if(v)if(g.clearSessionPreference)this.storageService.remove(`${o}-${d}`,-1);else{const w=this.storageService.get(`${o}-${d}`,-1);if(w){const D=h.find(y=>y.id===w);if(D&&this.authenticationService.isAccessAllowed(d,D.account.label,a))return D}}else if(this.authenticationService.isAccessAllowed(d,h[0].account.label,a))return h[0]}if(g.createIfNone||g.forceNewSession){const w=this.authenticationService.getLabel(d),D=typeof g.forceNewSession=="object"?g.forceNewSession.detail:void 0,y=!!(g.forceNewSession&&h.length);if(!await this.loginPrompt(w,o,y,D))throw new Error("User did not consent to login.");const _=h?.length&&!g.forceNewSession&&v?await this.authenticationService.selectSession(d,a,o,n,h):await this.authenticationService.createSession(d,n,!0);return await this.setTrustedExtensionAndAccountPreference(d,_.account.label,a,o,_.id),_}const m=h.find(w=>this.authenticationService.isAccessAllowed(d,w.account.label,a));return!g.silent&&!m&&await this.authenticationService.requestNewSession(d,n,a,o),m}async $getSession(d,n,a,o,g){const h=await this.doGetSession(d,n,a,o,g);return h&&(this.telemetryService.publicLog2("authentication.providerUsage",{providerId:d,extensionId:a}),(0,A.addAccountUsage)(this.storageService,d,h.account.label,a,o)),h}};l=we([(0,R.extHostNamedCustomer)(E.MainContext.MainThreadAuthentication),F(1,k.IAuthenticationService),F(2,I.IDialogService),F(3,b.IStorageService),F(4,r.INotificationService),F(5,C.IQuickInputService),F(6,i.IExtensionService),F(7,f.ITelemetryService)],l),e.MainThreadAuthentication=l});var yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)},Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t};define(ae[2709],le([1,0,2,9,1638,15,7,81,19,46,48,172,23,95,441,260,39,522,47,72,330,396,14,31,29,625,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionsWorkbenchService=void 0;const D={iconClass:h.Codicon.settingsGear.classNames,tooltip:(0,R.localize)(0,null)};let y=class Gn extends t.Disposable{get isSignedIn(){return this.existingSessionId!==void 0}get onDidSignIn(){return this._didSignIn.event}get onDidSignOut(){return this._didSignOut.event}constructor(L,M,O,N,P,B,V,z,x,H,W,U,$){super(),this.fileService=L,this.storageService=M,this.quickInputService=O,this.authenticationService=N,this.extensionService=P,this.environmentService=B,this.logService=V,this.productService=z,this.contextKeyService=x,this.requestService=H,this.dialogService=W,this.credentialsService=U,this.commandService=$,this._serviceBrand=void 0,this.serverConfiguration=this.productService["editSessions.store"],w.set(this,void 0),this.initialized=!1,this._didSignIn=new m.Emitter,this._didSignOut=new m.Emitter,this._register(this.authenticationService.onDidChangeSessions(q=>this.onDidChangeSessions(q.event))),this._register(this.storageService.onDidChangeValue(q=>this.onDidChangeStorage(q))),this.registerSignInAction(),this.registerResetAuthenticationAction(),this.signedInContext=l.EDIT_SESSIONS_SIGNED_IN.bindTo(this.contextKeyService),this.signedInContext.set(this.existingSessionId!==void 0)}async write(L){if(await this.initialize(!1),!this.initialized)throw new Error("Please sign in to store your edit session.");return L.machine===void 0&&(L.machine=await this.getOrCreateCurrentMachineId()),this.storeClient.writeResource("editSessions",JSON.stringify(L),null,void 0,(0,u.createSyncHeaders)((0,d.generateUuid)()))}async read(L){if(await this.initialize(!1),!this.initialized)throw new Error("Please sign in to apply your latest edit session.");let M;const O=(0,u.createSyncHeaders)((0,d.generateUuid)());try{if(L!==void 0)M=await this.storeClient?.resolveResourceContent("editSessions",L,void 0,O);else{const N=await this.storeClient?.readResource("editSessions",null,void 0,O);M=N?.content,L=N?.ref}}catch(N){this.logService.error(N)}return M!=null&&L!==void 0?{ref:L,editSession:JSON.parse(M)}:void 0}async delete(L){if(await this.initialize(!1),!this.initialized)throw new Error(`Unable to delete edit session with ref ${L}.`);try{await this.storeClient?.deleteResource("editSessions",L)}catch(M){this.logService.error(M)}}async list(){if(await this.initialize(!1),!this.initialized)throw new Error("Unable to list edit sessions.");try{return this.storeClient?.getAllResourceRefs("editSessions")??[]}catch(L){this.logService.error(L)}return[]}async initialize(L,M=!1){return this.initialized?!0:(this.initialized=await this.doInitialize(L,M),this.signedInContext.set(this.initialized),this.initialized&&this._didSignIn.fire(),this.initialized)}async doInitialize(L,M){if(await this.extensionService.whenInstalledExtensionsRegistered(),!this.serverConfiguration?.url)throw new Error("Unable to initialize sessions sync as session sync preference is not configured in product.json.");if(this.storeClient||(this.storeClient=new T(p.URI.parse(this.serverConfiguration.url),this.productService,this.requestService,this.logService,this.environmentService,this.fileService,this.storageService),this._register(this.storeClient.onTokenFailed(()=>{this.logService.info("Clearing edit sessions authentication preference because of successive token failures."),this.clearAuthenticationPreference()}))),this.machineClient===void 0&&(this.machineClient=new v.UserDataSyncMachinesService(this.environmentService,this.fileService,this.storageService,this.storeClient,this.logService,this.productService)),yt(this,w,"f")!==void 0)return!0;const O=await this.getAuthenticationSession(L,M);return O!==void 0&&(Ut(this,w,O,"f"),this.storeClient.setAuthToken(O.token,O.providerId)),O!==void 0}async getMachineById(L){if(await this.initialize(!1),!this.cachedMachines){const M=await this.machineClient.getMachines();this.cachedMachines=M.reduce((O,N)=>O.set(N.id,N.name),new Map)}return this.cachedMachines.get(L)}async getOrCreateCurrentMachineId(){const L=await this.machineClient.getMachines().then(M=>M.find(O=>O.isCurrent)?.id);return L===void 0?(await this.machineClient.addCurrentMachine(),await this.machineClient.getMachines().then(M=>M.find(O=>O.isCurrent).id)):L}async getAuthenticationSession(L,M){if(this.existingSessionId){this.logService.info(`Searching for existing authentication session with ID ${this.existingSessionId}`);const N=await this.getExistingSession();if(N)return this.logService.info(`Found existing authentication session with ID ${N.session.id}`),{sessionId:N.session.id,token:N.session.idToken??N.session.accessToken,providerId:N.session.providerId};this._didSignOut.fire()}if(this.shouldAttemptEditSessionInit()){this.logService.info("Reusing user data sync enablement");const N=await(0,a.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService);if(N!==void 0)return this.logService.info(`Using current authentication session with ID ${N.id}`),this.existingSessionId=N.id,{sessionId:N.id,token:N.accessToken,providerId:N.providerId}}if(M)return;const O=await this.getAccountPreference(L);if(O!==void 0)return this.existingSessionId=O.id,{sessionId:O.id,token:O.idToken??O.accessToken,providerId:O.providerId}}shouldAttemptEditSessionInit(){return o.isWeb&&this.storageService.isNew(-1)&&this.storageService.isNew(1)}async getAccountPreference(L){const M=this.quickInputService.createQuickPick();return M.title=(0,R.localize)(1,null),M.ok=!1,M.placeholder=(0,R.localize)(2,null),M.ignoreFocusOut=!0,M.items=await this.createQuickpickItems(L),new Promise((O,N)=>{M.onDidHide(P=>{O(void 0),M.dispose()}),M.onDidAccept(async P=>{const B=M.selectedItems[0],V="provider"in B?{...await this.authenticationService.createSession(B.provider.id,B.provider.scopes),providerId:B.provider.id}:"session"in B?B.session:void 0;O(V),M.hide()}),M.onDidTriggerItemButton(async P=>{P.button.tooltip===D.tooltip&&await this.commandService.executeCommand("workbench.action.openSettings","workbench.editSessions.continueOn")}),M.show()})}async createQuickpickItems(L){const M=[];M.push({type:"separator",label:(0,R.localize)(3,null)});const O=await this.getAllSessions();M.push(...O),M.push({type:"separator",label:(0,R.localize)(4,null)});for(const N of await this.getAuthenticationProviders())if(!O.some(B=>B.session.providerId===N.id)||this.authenticationService.supportsMultipleAccounts(N.id)){const B=this.authenticationService.getLabel(N.id);M.push({label:(0,R.localize)(5,null,B),provider:N})}return L?M.concat([{type:"separator"},{label:(0,R.localize)(6,null),canceledAuthentication:!0,buttons:[D]}]):M}async getAllSessions(){const L=await this.getAuthenticationProviders(),M=new Map;let O;for(const N of L){const P=await this.authenticationService.getSessions(N.id,N.scopes);for(const B of P){const V={label:B.account.label,description:this.authenticationService.getLabel(N.id),session:{...B,providerId:N.id}};M.set(V.session.account.id,V),this.existingSessionId===B.id&&(O=V)}}return O!==void 0&&M.set(O.session.account.id,O),[...M.values()]}async getAuthenticationProviders(){if(!this.serverConfiguration)throw new Error("Unable to get configured authentication providers as session sync preference is not configured in product.json.");const L=this.serverConfiguration.authenticationProviders,M=Object.keys(L).reduce((N,P)=>(N.push({id:P,scopes:L[P].scopes}),N),[]),O=this.authenticationService.declaredProviders;return M.filter(({id:N})=>O.some(P=>P.id===N))}get existingSessionId(){return this.storageService.get(Gn.CACHED_SESSION_STORAGE_KEY,-1)}set existingSessionId(L){this.logService.trace(`Saving authentication session preference for ID ${L}.`),L===void 0?this.storageService.remove(Gn.CACHED_SESSION_STORAGE_KEY,-1):this.storageService.store(Gn.CACHED_SESSION_STORAGE_KEY,L,-1,1)}async getExistingSession(){return(await this.getAllSessions()).find(M=>M.session.id===this.existingSessionId)}async onDidChangeStorage(L){if(L.key===Gn.CACHED_SESSION_STORAGE_KEY&&L.scope===-1){const M=this.existingSessionId,O=yt(this,w,"f")?.sessionId;O!==M&&(this.logService.trace(`Resetting authentication state because authentication session ID preference changed from ${O} to ${M}.`),Ut(this,w,void 0,"f"),this.initialized=!1)}}clearAuthenticationPreference(){Ut(this,w,void 0,"f"),this.initialized=!1,this.existingSessionId=void 0,this.signedInContext.set(!1)}onDidChangeSessions(L){yt(this,w,"f")?.sessionId&&L.removed.find(M=>M.id===yt(this,w,"f")?.sessionId)&&this.clearAuthenticationPreference()}registerSignInAction(){const L=this;this._register((0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.editSessions.actions.signIn",title:(0,R.localize)(7,null),category:l.EDIT_SESSION_SYNC_CATEGORY,precondition:k.ContextKeyExpr.equals(l.EDIT_SESSIONS_SIGNED_IN_KEY,!1),menu:[{id:A.MenuId.CommandPalette},{id:A.MenuId.AccountsContext,group:"2_editSessions",when:k.ContextKeyExpr.equals(l.EDIT_SESSIONS_SIGNED_IN_KEY,!1)}]})}async run(){return await L.initialize(!1)}}))}registerResetAuthenticationAction(){const L=this;this._register((0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.editSessions.actions.resetAuth",title:(0,R.localize)(8,null),category:l.EDIT_SESSION_SYNC_CATEGORY,precondition:k.ContextKeyExpr.equals(l.EDIT_SESSIONS_SIGNED_IN_KEY,!0),menu:[{id:A.MenuId.CommandPalette},{id:A.MenuId.AccountsContext,group:"2_editSessions",when:k.ContextKeyExpr.equals(l.EDIT_SESSIONS_SIGNED_IN_KEY,!0)}]})}async run(){const O=await L.dialogService.confirm({type:"info",message:(0,R.localize)(9,null),checkbox:{label:(0,R.localize)(10,null)},primaryButton:(0,R.localize)(11,null)});O.confirmed&&(O.checkboxChecked&&L.storeClient?.deleteResource("editSessions",null),L.clearAuthenticationPreference())}}))}};w=new WeakMap,y.CACHED_SESSION_STORAGE_KEY="editSessionAccountPreference",y=we([F(0,I.IFileService),F(1,r.IStorageService),F(2,S.IQuickInputService),F(3,f.IAuthenticationService),F(4,c.IExtensionService),F(5,E.IEnvironmentService),F(6,l.IEditSessionsLogService),F(7,b.IProductService),F(8,k.IContextKeyService),F(9,C.IRequestService),F(10,s.IDialogService),F(11,n.ICredentialsService),F(12,g.ICommandService)],y),e.EditSessionsWorkbenchService=y;class T extends i.UserDataSyncStoreClient{}}),define(ae[107],le([1,0,164,22,53,14,18,9,5,227,34,51,104]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractPathService=e.IPathService=void 0,e.IPathService=(0,I.createDecorator)("pathService");let u=class hl{constructor(f,c,l,s){this.localUserHome=f,this.remoteAgentService=c,this.environmentService=l,this.contextService=s,this.resolveOS=(async()=>(await this.remoteAgentService.getEnvironment())?.os||A.OS)(),this.resolveUserHome=(async()=>{const d=await this.remoteAgentService.getEnvironment();return this.maybeUnresolvedUserHome=d?.userHome??f})()}hasValidBasename(f,c,l){return typeof c=="string"||typeof c>"u"?this.resolveOS.then(s=>this.doHasValidBasename(f,s,c)):this.doHasValidBasename(f,c,l)}doHasValidBasename(f,c,l){return f.scheme===p.Schemas.file||f.scheme===p.Schemas.vscodeRemote?(0,t.isValidBasename)(l??(0,k.basename)(f),c===1):!0}get defaultUriScheme(){return hl.findDefaultUriScheme(this.environmentService,this.contextService)}static findDefaultUriScheme(f,c){if(f.remoteAuthority)return p.Schemas.vscodeRemote;const l=(0,b.getVirtualWorkspaceScheme)(c.getWorkspace());if(l)return l;const s=c.getWorkspace().folders[0];if(s)return s.uri.scheme;const d=c.getWorkspace().configuration;return d?d.scheme:p.Schemas.file}userHome(f){return f?.preferLocal?this.localUserHome:this.resolveUserHome}get resolvedUserHome(){return this.maybeUnresolvedUserHome}get path(){return this.resolveOS.then(f=>f===1?R.win32:R.posix)}async fileURI(f){let c="";if(await this.resolveOS===1&&(f=f.replace(/\\/g,"/")),f[0]==="/"&&f[1]==="/"){const s=f.indexOf("/",2);s===-1?(c=f.substring(2),f="/"):(c=f.substring(2,s),f=f.substring(s)||"/")}return E.URI.from({scheme:p.Schemas.file,authority:c,path:f,query:"",fragment:""})}};u=we([F(1,r.IRemoteAgentService),F(2,C.IWorkbenchEnvironmentService),F(3,S.IWorkspaceContextService)],u),e.AbstractPathService=u}),define(ae[464],le([1,0,22,53,14,9,19,41,24,51,107,90,1616,225]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;const i="\\u0000-\\u0020\\u007f-\\u009f",f=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+i+'"]{2,}[^\\s'+i+`"')}\\],:;.!?]`,"ug"),c=/(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/,l=/(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/,s=new RegExp(`(${c.source}|${l.source})`),d=/((?:\~|\.)?(?:\/[\w\.-]*)+)/,n=/(?:\:([\d]+))?(?:\:([\d]+))?/,a=new RegExp(`${R.isWindows?s.source:d.source}${n.source}`,"g"),o=/:([\d]+)(?::([\d]+))?$/,g=2e3;let h=class{constructor(m,w,D,y,T,_){this.editorService=m,this.fileService=w,this.openerService=D,this.pathService=y,this.tunnelService=T,this.environmentService=_}linkify(m,w,D){if(w){const T=m.split(` `);for(let M=0;M<T.length-1;M++)T[M]=T[M]+` `;T[T.length-1]||T.pop();const _=T.map(M=>this.linkify(M,!1,D));if(_.length===1)return _[0];const L=document.createElement("span");return _.forEach(M=>L.appendChild(M)),L}const y=document.createElement("span");for(const T of this.detectLinks(m))try{switch(T.kind){case"text":y.appendChild(document.createTextNode(T.value));break;case"web":y.appendChild(this.createWebLink(T.value));break;case"path":{const _=T.captures[0],L=T.captures[1]?Number(T.captures[1]):0,M=T.captures[2]?Number(T.captures[2]):0;y.appendChild(this.createPathLink(T.value,_,L,M,D));break}}}catch{y.appendChild(document.createTextNode(T.value))}return y}createWebLink(m){const w=this.createLink(m);let D=A.URI.parse(m);const y=o.exec(D.path);return y&&(D=D.with({path:D.path.slice(0,y.index),fragment:`L${y[0].slice(1)}`})),this.decorateLink(w,D,async()=>{if(D.scheme===t.Schemas.file){const T=D.fsPath,_=await this.pathService.path,L=p.normalize(_.sep===p.posix.sep&&R.isWindows?T.replace(/\\/g,p.posix.sep):T),M=A.URI.parse(L);if(!await this.fileService.exists(M))return;await this.editorService.openEditor({resource:M,options:{pinned:!0,selection:y?{startLineNumber:+y[1],startColumn:+y[2]}:void 0}});return}this.openerService.open(m,{allowTunneling:!!this.environmentService.remoteAuthority})}),w}createPathLink(m,w,D,y,T){if(w[0]==="/"&&w[1]==="/")return document.createTextNode(m);const _={selection:{startLineNumber:D,startColumn:y}};if(w[0]==="."){if(!T)return document.createTextNode(m);const O=T.toResource(w),N=this.createLink(m);return this.decorateLink(N,O,P=>this.editorService.openEditor({resource:O,options:{..._,preserveFocus:P}})),N}if(w[0]==="~"){const O=this.pathService.resolvedUserHome;O&&(w=p.join(O.fsPath,w.substring(1)))}const L=this.createLink(m);L.tabIndex=0;const M=A.URI.file(p.normalize(w));return this.fileService.stat(M).then(O=>{O.isDirectory||this.decorateLink(L,M,N=>this.editorService.openEditor({resource:M,options:{..._,preserveFocus:N}}))}).catch(()=>{}),L}createLink(m){const w=document.createElement("a");return w.textContent=m,w}decorateLink(m,w,D){m.classList.add("link");const y=this.tunnelService.canTunnel(w)?(0,r.localize)(0,null):(0,r.localize)(1,null);m.title=R.isMacintosh?(0,r.localize)(2,null,y):(0,r.localize)(3,null,y),m.onmousemove=T=>{m.classList.toggle("pointer",R.isMacintosh?T.metaKey:T.ctrlKey)},m.onmouseleave=()=>m.classList.remove("pointer"),m.onclick=T=>{const _=window.getSelection();!_||_.type==="Range"||!(R.isMacintosh?T.metaKey:T.ctrlKey)||(T.preventDefault(),T.stopImmediatePropagation(),D(!1))},m.onkeydown=T=>{const _=new C.StandardKeyboardEvent(T);(_.keyCode===3||_.keyCode===10)&&(_.preventDefault(),_.stopPropagation(),D(_.keyCode===10))}}detectLinks(m){if(m.length>g)return[{kind:"text",value:m,captures:[]}];const w=[f,a],D=["web","path"],y=[],T=(_,L)=>{if(L>=w.length){y.push({value:_,kind:"text",captures:[]});return}const M=w[L];let O=0,N;for(M.lastIndex=0;(N=M.exec(_))!==null;){const B=_.substring(O,N.index);B&&T(B,L+1);const V=N[0];y.push({value:V,kind:D[L],captures:N.slice(1)}),O=N.index+V.length}const P=_.substring(O);P&&T(P,L+1)};return T(m,0),y}};h=we([F(0,I.IEditorService),F(1,k.IFileService),F(2,E.IOpenerService),F(3,S.IPathService),F(4,u.ITunnelService),F(5,b.IWorkbenchEnvironmentService)],h),e.LinkDetector=h}),define(ae[2710],le([1,0,1615,10,512,87,11,12,33,5,464,79,36,63,1137]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionWidget=e.debugExceptionWidgetBackground=e.debugExceptionWidgetBorder=void 0;const i=p.$;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 f=class extends R.ZoneWidget{constructor(l,s,d,n,a){super(l,{showFrame:!0,showArrow:!0,isAccessible:!0,frameWidth:1,className:"exception-widget-container"}),this.exceptionInfo=s,this.debugSession=d,this.instantiationService=a,this.applyTheme(n.getColorTheme()),this._disposables.add(n.onDidColorThemeChange(this.applyTheme.bind(this))),this.create();const o=new k.RunOnceScheduler(()=>this._doLayout(void 0,void 0),50);this._disposables.add(this.editor.onDidLayoutChange(()=>o.schedule())),this._disposables.add(o)}applyTheme(l){this.backgroundColor=l.getColor(e.debugExceptionWidgetBackground);const s=l.getColor(e.debugExceptionWidgetBorder);this.style({arrowColor:s,frameColor:s})}_applyStyles(){this.container&&(this.container.style.backgroundColor=this.backgroundColor?this.backgroundColor.toString():""),super._applyStyles()}_fillContainer(l){this.setCssClass("exception-widget");const s=this.editor.getOption(45);l.style.fontSize=`${s.fontSize}px`,l.style.lineHeight=`${s.lineHeight}px`,l.tabIndex=0;const d=i(".title"),n=i(".label");p.append(d,n);const a=i(".actions");p.append(d,a),n.textContent=this.exceptionInfo.id?t.localize(2,null,this.exceptionInfo.id):t.localize(3,null);let o=n.textContent;if(new C.ActionBar(a).push(new r.Action("editor.closeExceptionWidget",t.localize(4,null),E.ThemeIcon.asClassName(u.widgetClose),!0,async()=>{this.editor.getContribution(A.EDITOR_CONTRIBUTION_ID)?.closeExceptionWidget()}),{label:!1,icon:!0}),p.append(l,d),this.exceptionInfo.description){const h=i(".description");h.textContent=this.exceptionInfo.description,o+=", "+this.exceptionInfo.description,p.append(l,h)}if(this.exceptionInfo.details&&this.exceptionInfo.details.stackTrace){const h=i(".stack-trace"),m=this.instantiationService.createInstance(S.LinkDetector).linkify(this.exceptionInfo.details.stackTrace,!0,this.debugSession?this.debugSession.root:void 0);h.appendChild(m),p.append(l,h),o+=", "+this.exceptionInfo.details.stackTrace}l.setAttribute("aria-label",o)}_doLayout(l,s){this.container.style.height="initial";const d=this.editor.getOption(60),n=Math.round(d/3),a=Math.ceil((this.container.offsetHeight+n)/d);this._relayout(a)}focus(){this.container?.focus()}hasFocus(){return p.isAncestor(document.activeElement,this.container)}};f=we([F(3,E.IThemeService),F(4,b.IInstantiationService)],f),e.ExceptionWidget=f}),define(ae[2711],le([1,0,6,2,22,14,13,1899,507,8,5,25,46,223,27,2141,610,2144,34,2404,109,344,892,454,127,893,217,51,191,107,104,68,26]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalProcessManager=void 0;const M=500,O=1e3;var N;(function(x){x[x.Process=0]="Process",x[x.PsuedoTerminal=1]="PsuedoTerminal"})(N||(N={}));let P=class extends p.Disposable{get persistentProcessId(){return this._process?.id}get shouldPersist(){return!!this.reconnectionProperties||(this._process?this._process.shouldPersist:!1)}get hasWrittenData(){return this._hasWrittenData}get hasChildProcesses(){return this._hasChildProcesses}get reconnectionProperties(){return this._shellLaunchConfig?.attachPersistentProcess?.reconnectionProperties||this._shellLaunchConfig?.reconnectionProperties||void 0}constructor(H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne){super(),this._instanceId=H,this._configHelper=W,this._historyService=q,this._instantiationService=X,this._logService=G,this._workspaceContextService=Q,this._configurationResolverService=j,this._workbenchEnvironmentService=K,this._productService=Y,this._remoteAgentService=ee,this._pathService=ie,this._environmentVariableService=re,this._terminalProfileResolverService=oe,this._configurationService=se,this._terminalInstanceService=te,this._telemetryService=Z,this._notificationService=ne,this.processState=1,this.capabilities=new c.TerminalCapabilityStore,this._isDisposed=!1,this._process=null,this._processType=N.Process,this._preLaunchInputQueue=[],this._latency=-1,this._latencyLastMeasured=0,this._hasWrittenData=!1,this._hasChildProcesses=!1,this._ptyListenersAttached=!1,this._isDisconnected=!1,this._dimensions={cols:0,rows:0},this._isScreenReaderModeEnabled=!1,this._onPtyDisconnect=this._register(new t.Emitter),this.onPtyDisconnect=this._onPtyDisconnect.event,this._onPtyReconnect=this._register(new t.Emitter),this.onPtyReconnect=this._onPtyReconnect.event,this._onProcessReady=this._register(new t.Emitter),this.onProcessReady=this._onProcessReady.event,this._onProcessStateChange=this._register(new t.Emitter),this.onProcessStateChange=this._onProcessStateChange.event,this._onBeforeProcessData=this._register(new t.Emitter),this.onBeforeProcessData=this._onBeforeProcessData.event,this._onProcessData=this._register(new t.Emitter),this.onProcessData=this._onProcessData.event,this._onDidChangeProperty=this._register(new t.Emitter),this.onDidChangeProperty=this._onDidChangeProperty.event,this._onEnvironmentVariableInfoChange=this._register(new t.Emitter),this.onEnvironmentVariableInfoChanged=this._onEnvironmentVariableInfoChange.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,this.ptyProcessReady=this._createPtyProcessReadyPromise(),this.getLatency(),this._ackDataBufferer=new B(ce=>this._process?.acknowledgeDataEvent(ce)),this._dataFilter=this._instantiationService.createInstance(z),this._dataFilter.onProcessData(ce=>{const he={data:typeof ce=="string"?ce:ce.data};this._onBeforeProcessData.fire(he),he.data&&he.data.length>0&&(typeof ce!="string"&&(ce.data=he.data),this._onProcessData.fire(typeof ce!="string"?ce:{data:he.data,trackCommit:!1}))}),U&&typeof U=="object"?this.remoteAuthority=(0,u.getRemoteAuthority)(U):this.remoteAuthority=this._workbenchEnvironmentService.remoteAuthority,$&&(this._extEnvironmentVariableCollection=new o.MergedEnvironmentVariableCollection($),this._register(this._environmentVariableService.onDidChangeCollections(ce=>this._onEnvironmentVariableCollectionChange(ce))),this.environmentVariableInfo=new d.EnvironmentVariableInfoChangesActive(this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo))}async freePortKillProcess(H){try{this._process?.freePortKillProcess&&await this._process?.freePortKillProcess(H)}catch(W){this._notificationService.notify({message:(0,E.localize)(0,null,H,W),severity:_.default.Warning})}}dispose(H=!1){this._isDisposed=!0,this._process&&(this._setProcessState(5),this._process.shutdown(H),this._process=null),super.dispose()}_createPtyProcessReadyPromise(){return new Promise(H=>{const W=this.onProcessReady(()=>{this._logService.debug(`Terminal process ready (shellProcessId: ${this.shellProcessId})`),W.dispose(),H(void 0)})})}async detachFromProcess(H){await this._process?.detach?.(H),this._process=null}async createProcess(H,W,U,$,q=!0){this._shellLaunchConfig=H,this._dimensions.cols=W,this._dimensions.rows=U,this._isScreenReaderModeEnabled=$;let X;if(H.customPtyImplementation)this._processType=N.PsuedoTerminal,X=H.customPtyImplementation(this._instanceId,W,U);else{const Q=await this._terminalInstanceService.getBackend(this.remoteAuthority);if(!Q)throw new Error(`No terminal backend registered for remote authority '${this.remoteAuthority}'`);this.backend=Q;const j=this._historyService.getLastActiveWorkspaceRoot(),K=j?(0,k.withNullAsUndefined)(this._workspaceContextService.getWorkspaceFolder(j)):void 0,Y=v.createVariableResolver(K,await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority),this._configurationResolverService);if(this.userHome=this._pathService.resolvedUserHome?.fsPath,this.os=A.OS,this.remoteAuthority){const ee=await this._pathService.userHome();this.userHome=ee.path;const ie=await this._remoteAgentService.getEnvironment();if(!ie)throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);this.userHome=ie.userHome.path,this.os=ie.os;const re=await this._resolveEnvironment(Q,Y,H),oe=(this._configurationService.getValue("task.reconnection")&&H.reconnectionProperties||!H.isFeatureTerminal)&&this._configHelper.config.enablePersistentSessions&&!H.isTransient;if(H.attachPersistentProcess){const se=await Q.attachToProcess(H.attachPersistentProcess.id);se?X=se:(this._logService.warn("Attach to process failed for terminal",H.attachPersistentProcess),H.attachPersistentProcess=void 0)}if(!X){await this._terminalProfileResolverService.resolveShellLaunchConfig(H,{remoteAuthority:this.remoteAuthority,os:this.os});const se={shellIntegration:{enabled:this._configurationService.getValue("terminal.integrated.shellIntegration.enabled")},windowsEnableConpty:this._configHelper.config.windowsEnableConpty&&!$,environmentVariableCollections:this._extEnvironmentVariableCollection?.collections?(0,g.serializeEnvironmentVariableCollections)(this._extEnvironmentVariableCollection.collections):void 0};try{X=await Q.createProcess(H,"",W,U,this._configHelper.config.unicodeVersion,re,se,oe)}catch(te){if(te?.message==="Could not fetch remote environment"){this._logService.trace("Could not fetch remote environment, silently failing");return}throw te}}this._isDisposed||this._setupPtyHostListeners(Q)}else{if(H.attachPersistentProcess){const ee=H.attachPersistentProcess.findRevivedId?await Q.attachToRevivedProcess(H.attachPersistentProcess.id):await Q.attachToProcess(H.attachPersistentProcess.id);ee?X=ee:(this._logService.warn("Attach to process failed for terminal",H.attachPersistentProcess),H.attachPersistentProcess=void 0)}X||(X=await this._launchLocalProcess(Q,H,W,U,this.userHome,$,Y)),this._isDisposed||this._setupPtyHostListeners(Q)}}if(this._isDisposed){X.shutdown(!1);return}this._process=X,this._setProcessState(2),(this.os===3||this.os===2)&&this.capabilities.add(1,new f.NaiveCwdDetectionCapability(this._process)),this._dataFilter.newProcess(this._process,q),this._processListeners&&(0,p.dispose)(this._processListeners),this._processListeners=[X.onProcessReady(Q=>{this.shellProcessId=Q.pid,this._initialCwd=Q.cwd,this._onDidChangeProperty.fire({type:"initialCwd",value:this._initialCwd}),this._onProcessReady.fire(Q),this._preLaunchInputQueue.length>0&&this._process&&(X.input(this._preLaunchInputQueue.join("")),this._preLaunchInputQueue.length=0)}),X.onProcessExit(Q=>this._onExit(Q)),X.onDidChangeProperty(({type:Q,value:j})=>{switch(Q){case"hasChildProcesses":this._hasChildProcesses=j;break;case"failedShellIntegrationActivation":this._telemetryService?.publicLog2("terminal/shellIntegrationActivationFailureCustomArgs");break}this._onDidChangeProperty.fire({type:Q,value:j})})],X.onRestoreCommands&&this._processListeners.push(X.onRestoreCommands(Q=>{this._onRestoreCommands.fire(Q)})),setTimeout(()=>{this.processState===2&&this._setProcessState(3)},M);const G=await X.start();if(G)return G}async relaunch(H,W,U,$,q){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(H,W,U,$,q)}async _resolveEnvironment(H,W,U){const $=A.isWindows?"windows":A.isMacintosh?"osx":"linux",q=this._configurationService.getValue(`terminal.integrated.env.${$}`);this._configHelper.showRecommendations(U);let X;U.useShellEnvironment?X=await H.getShellEnvironment():X=await this._terminalProfileResolverService.getEnvironment(this.remoteAuthority);const G=await v.createTerminalEnvironment(U,q,W,this._productService.version,this._configHelper.config.detectLocale,X);return!this._isDisposed&&!U.strictEnv&&!U.hideFromUser&&(this._extEnvironmentVariableCollection=this._environmentVariableService.mergedCollection,this._register(this._environmentVariableService.onDidChangeCollections(Q=>this._onEnvironmentVariableCollectionChange(Q))),await this._extEnvironmentVariableCollection.applyToProcessEnvironment(G,W),this._extEnvironmentVariableCollection.map.size>0&&(this.environmentVariableInfo=new d.EnvironmentVariableInfoChangesActive(this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo))),G}async _launchLocalProcess(H,W,U,$,q,X,G){await this._terminalProfileResolverService.resolveShellLaunchConfig(W,{remoteAuthority:void 0,os:A.OS});const Q=this._historyService.getLastActiveWorkspaceRoot(R.Schemas.file),j=await v.getCwd(W,q,G,Q,this._configHelper.config.cwd,this._logService),K=await this._resolveEnvironment(H,G,W),Y={shellIntegration:{enabled:this._configurationService.getValue("terminal.integrated.shellIntegration.enabled")},windowsEnableConpty:this._configHelper.config.windowsEnableConpty&&!X,environmentVariableCollections:this._extEnvironmentVariableCollection?(0,g.serializeEnvironmentVariableCollections)(this._extEnvironmentVariableCollection.collections):void 0},ee=(this._configurationService.getValue("task.reconnection")&&W.reconnectionProperties||!W.isFeatureTerminal)&&this._configHelper.config.enablePersistentSessions&&!W.isTransient;return await H.createProcess(W,j,U,$,this._configHelper.config.unicodeVersion,K,Y,ee)}_setupPtyHostListeners(H){this._ptyListenersAttached||(this._ptyListenersAttached=!0,this._register(H.onPtyHostUnresponsive(()=>{this._isDisconnected=!0,this._onPtyDisconnect.fire()})),this._ptyResponsiveListener=H.onPtyHostResponsive(()=>{this._isDisconnected=!1,this._onPtyReconnect.fire()}),this._register((0,p.toDisposable)(()=>this._ptyResponsiveListener?.dispose())),this._register(H.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.reconnectionProperties)this._onExit(-1);else{const W=(0,E.localize)(1,null);this._onProcessData.fire({data:(0,I.formatMessageForTerminal)(W,{loudFormatting:!0}),trackCommit:!1}),await this.relaunch(this._shellLaunchConfig,this._dimensions.cols,this._dimensions.rows,this._isScreenReaderModeEnabled,!1)}})))}async getBackendOS(){let H=A.OS;if(this.remoteAuthority){const W=await this._remoteAgentService.getEnvironment();if(!W)throw new Error(`Failed to get remote environment for remote authority "${this.remoteAuthority}"`);H=W.os}return H}setDimensions(H,W,U){if(U){this._resize(H,W);return}return this.ptyProcessReady.then(()=>this._resize(H,W))}async setUnicodeVersion(H){return this._process?.setUnicodeVersion(H)}_resize(H,W){if(!!this._process){try{this._process.resize(H,W)}catch(U){if(U.code!=="EPIPE"&&U.code!=="ERR_IPC_CHANNEL_CLOSED")throw U}this._dimensions.cols=H,this._dimensions.rows=W}}async write(H){await this.ptyProcessReady,this._dataFilter.disableSeamlessRelaunch(),this._hasWrittenData=!0,this.shellProcessId||this._processType===N.PsuedoTerminal?this._process&&this._process.input(H):this._preLaunchInputQueue.push(H)}async processBinary(H){await this.ptyProcessReady,this._dataFilter.disableSeamlessRelaunch(),this._hasWrittenData=!0,this._process?.processBinary(H)}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+O<Date.now()){const H=this._process.getLatency();this._latency=await H,this._latencyLastMeasured=Date.now()}return Promise.resolve(this._latency)}async refreshProperty(H){if(!this._process)throw new Error("Cannot refresh property when process is not set");return this._process.refreshProperty(H)}async updateProperty(H,W){return this._process?.updateProperty(H,W)}acknowledgeDataEvent(H){this._ackDataBufferer.ack(H)}_onExit(H){this._process=null,this.processState===2&&this._setProcessState(4),this.processState===3&&this._setProcessState(6),this._onProcessExit.fire(H)}_setProcessState(H){this.processState=H,this._onProcessStateChange.fire()}_onEnvironmentVariableCollectionChange(H){const W=this._extEnvironmentVariableCollection.diff(H);if(W===void 0){this.environmentVariableInfo instanceof d.EnvironmentVariableInfoStale&&(this.environmentVariableInfo=new d.EnvironmentVariableInfoChangesActive(this._extEnvironmentVariableCollection),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo));return}this.environmentVariableInfo=this._instantiationService.createInstance(d.EnvironmentVariableInfoStale,W,this._instanceId),this._onEnvironmentVariableInfoChange.fire(this.environmentVariableInfo)}};P=we([F(4,D.IHistoryService),F(5,S.IInstantiationService),F(6,C.ILogService),F(7,s.IWorkspaceContextService),F(8,m.IConfigurationResolverService),F(9,w.IWorkbenchEnvironmentService),F(10,r.IProductService),F(11,T.IRemoteAgentService),F(12,y.IPathService),F(13,a.IEnvironmentVariableService),F(14,h.ITerminalProfileResolverService),F(15,b.IConfigurationService),F(16,n.ITerminalInstanceService),F(17,i.ITelemetryService),F(18,L.INotificationService)],P),e.TerminalProcessManager=P;class B{constructor(H){this._callback=H,this._unsentCharCount=0}ack(H){for(this._unsentCharCount+=H;this._unsentCharCount>5e3;)this._unsentCharCount-=5e3,this._callback(5e3)}}var V;(function(x){x[x.RecordTerminalDuration=1e4]="RecordTerminalDuration",x[x.SwapWaitMaximumDuration=3e3]="SwapWaitMaximumDuration"})(V||(V={}));let z=class extends p.Disposable{get onProcessData(){return this._onProcessData.event}constructor(H){super(),this._logService=H,this._disableSeamlessRelaunch=!1,this._onProcessData=this._register(new t.Emitter)}newProcess(H,W){if(this._dataListener?.dispose(),this._activeProcess?.shutdown(!1),this._activeProcess=H,!this._firstRecorder||!W||this._disableSeamlessRelaunch){this._firstDisposable?.dispose(),[this._firstRecorder,this._firstDisposable]=this._createRecorder(H),this._disableSeamlessRelaunch&&W&&this._onProcessData.fire("\x1Bc"),this._dataListener=H.onProcessData($=>this._onProcessData.fire($)),this._disableSeamlessRelaunch=!1;return}this._secondRecorder&&this.triggerSwap(),this._swapTimeout=window.setTimeout(()=>this.triggerSwap(),3e3),this._dataListener?.dispose(),this._firstDisposable?.dispose();const U=this._createRecorder(H);[this._secondRecorder,this._secondDisposable]=U}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 H=this._getDataFromRecorder(this._firstRecorder),W=this._getDataFromRecorder(this._secondRecorder);H===W?this._logService.trace("Seamless terminal relaunch - identical content"):(this._logService.trace("Seamless terminal relaunch - resetting content"),this._onProcessData.fire({data:`\x1Bc${W}`,trackCommit:!1})),this._dataListener?.dispose(),this._dataListener=this._activeProcess.onProcessData(U=>this._onProcessData.fire(U)),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(H){const W=new l.TerminalRecorder(0,0),U=H.onProcessData($=>W.handleData(typeof $=="string"?$:$.data));return[W,U]}_getDataFromRecorder(H){return H.generateReplayEventSync().events.filter(W=>!!W.data).map(W=>W.data).join("")}};z=we([F(0,C.ILogService)],z)}),define(ae[2712],le([1,0,128,8,31,34,24,48,217,35,2443,49,540,107,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationResolverService=void 0;let f=class extends S.BaseConfigurationResolverService{constructor(l,s,d,n,a,o,g,h,v,m){super({getAppRoot:()=>s.appRoot,getExecPath:()=>s.execPath},h.getShellEnv(),l,d,n,a,o,g,v,m)}};f=we([F(0,k.IEditorService),F(1,t.INativeWorkbenchEnvironmentService),F(2,p.IConfigurationService),F(3,R.ICommandService),F(4,A.IWorkspaceContextService),F(5,E.IQuickInputService),F(6,C.ILabelService),F(7,r.IShellEnvironmentService),F(8,u.IPathService),F(9,i.IExtensionService)],f),e.ConfigurationResolverService=f,(0,b.registerSingleton)(I.IConfigurationResolverService,f,1)}),define(ae[956],le([1,0,2002,18,52,19,48,9,14,47,49,34,26,54,42,199,22,51,104,7,28,38,164,6,2,11,24,130,107,111]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,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(P){P.ID="workbench.action.files.openLocalFile",P.LABEL=t.localize(0,null);function B(){return V=>V.get(b.IFileDialogService).pickFileAndOpen({forceNewWindow:!1,availableFileSystems:[c.Schemas.file]})}P.handler=B})(T=e.OpenLocalFileCommand||(e.OpenLocalFileCommand={}));var _;(function(P){P.ID="workbench.action.files.saveLocalFile",P.LABEL=t.localize(1,null);function B(){return V=>{const z=V.get(m.IEditorService),x=z.activeEditorPane;return x?z.save({groupId:x.group.id,editor:x.input},{saveAs:!0,availableFileSystems:[c.Schemas.file],reason:1}):Promise.resolve(void 0)}}P.handler=B})(_=e.SaveLocalFileCommand||(e.SaveLocalFileCommand={}));var L;(function(P){P.ID="workbench.action.files.openLocalFolder",P.LABEL=t.localize(2,null);function B(){return V=>V.get(b.IFileDialogService).pickFolderAndOpen({forceNewWindow:!1,availableFileSystems:[c.Schemas.file]})}P.handler=B})(L=e.OpenLocalFolderCommand||(e.OpenLocalFolderCommand={}));var M;(function(P){P.ID="workbench.action.files.openLocalFileFolder",P.LABEL=t.localize(3,null);function B(){return V=>V.get(b.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!1,availableFileSystems:[c.Schemas.file]})}P.handler=B})(M=e.OpenLocalFileFolderCommand||(e.OpenLocalFileFolderCommand={}));var O;(function(P){P[P.Updated=0]="Updated",P[P.UpdatedWithTrailing=1]="UpdatedWithTrailing",P[P.Updating=2]="Updating",P[P.NotUpdated=3]="NotUpdated",P[P.InvalidPath=4]="InvalidPath"})(O||(O={})),e.RemoteFileDialogContext=new d.RawContextKey("remoteFileDialogVisible",!1);let N=class{constructor(B,V,z,x,H,W,U,$,q,X,G,Q,j,K){this.fileService=B,this.quickInputService=V,this.labelService=z,this.workspaceContextService=x,this.notificationService=H,this.fileDialogService=W,this.modelService=U,this.languageService=$,this.environmentService=q,this.remoteAgentService=X,this.pathService=G,this.keybindingService=Q,this.accessibilityService=K,this.hidden=!1,this.allowFileSelection=!0,this.allowFolderSelection=!1,this.requiresTrailing=!1,this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.isWindows=!1,this.separator="/",this.onBusyChangeEmitter=new g.Emitter,this.disposables=[this.onBusyChangeEmitter],this.remoteAuthority=this.environmentService.remoteAuthority,this.contextKey=e.RemoteFileDialogContext.bindTo(j),this.scheme=this.pathService.defaultUriScheme}set busy(B){this.filePickBox.busy!==B&&(this.filePickBox.busy=B,this.onBusyChangeEmitter.fire(B))}get busy(){return this.filePickBox.busy}async showOpenDialog(B={}){this.scheme=this.getScheme(B.availableFileSystems,B.defaultUri),this.userHome=await this.getUserHome();const V=this.getOptions(B);return V?(this.options=V,this.pickResource()):Promise.resolve(void 0)}async showSaveDialog(B){this.scheme=this.getScheme(B.availableFileSystems,B.defaultUri),this.userHome=await this.getUserHome(),this.requiresTrailing=!0;const V=this.getOptions(B,!0);return V?(this.options=V,this.options.canSelectFolders=!0,this.options.canSelectFiles=!0,new Promise(z=>{this.pickResource(!0).then(x=>{z(x)})})):Promise.resolve(void 0)}getOptions(B,V=!1){let z,x;if(B.defaultUri&&(z=this.scheme===B.defaultUri.scheme?B.defaultUri:void 0,x=V?p.basename(B.defaultUri):void 0),z||(z=this.userHome,x&&(z=p.joinPath(z,x))),this.scheme!==c.Schemas.file&&!this.fileService.hasProvider(z)){this.notificationService.info(t.localize(4,null,z.toString()));return}const H=R.deepClone(B);return H.defaultUri=z,H}remoteUriFrom(B,V){B.startsWith("\\\\")||(B=B.replace(/\\/g,"/"));const z=this.scheme===c.Schemas.file?E.URI.file(B):E.URI.from({scheme:this.scheme,path:B,query:V?.query,fragment:V?.fragment}),x=z.scheme===c.Schemas.file?void 0:this.remoteAuthority??V?.authority;return p.toLocalResource(z,x,x?this.pathService.defaultUriScheme:z.scheme)}getScheme(B,V){return B&&B.length>0?V&&B.indexOf(V.scheme)>=0?V.scheme:B[0]:V?V.scheme:c.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===c.Schemas.file})}async pickResource(B=!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 V=this.options.defaultUri?this.options.defaultUri:this.workspaceContextService.getWorkspace().folders[0].uri,z;const x=p.extname(V);if(this.options.defaultUri){try{z=await this.fileService.stat(this.options.defaultUri)}catch{}(!z||!z.isDirectory)&&(V=p.dirname(this.options.defaultUri),this.trailing=p.basename(this.options.defaultUri))}return new Promise(H=>{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!==c.Schemas.file&&this.options&&this.options.availableFileSystems&&this.options.availableFileSystems.length>1&&this.options.availableFileSystems.indexOf(c.Schemas.file)>-1){this.filePickBox.customButton=!0,this.filePickBox.customLabel=t.localize(5,null);let X;B?X=_:X=this.allowFileSelection?this.allowFolderSelection?M:T:L;const G=this.keybindingService.lookupKeybinding(X.ID);if(G){const Q=G.getLabel();Q&&(this.filePickBox.customHover=(0,n.format)("{0} ({1})",X.LABEL,Q))}}let W=0,U=!1;this.currentFolder=p.dirname(V),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 $(X,G){G&&(G=p.addTrailingPathSeparator(G,X.separator),G=p.removeTrailingPathSeparator(G)),H(G),X.contextKey.set(!1),X.filePickBox.dispose(),(0,h.dispose)(X.disposables)}this.filePickBox.onDidCustom(()=>{if(!(U||this.busy))return U=!0,W++,this.options.availableFileSystems&&this.options.availableFileSystems.length>1&&(this.options.availableFileSystems=this.options.availableFileSystems.slice(1)),this.filePickBox.hide(),B?this.fileDialogService.showSaveDialog(this.options).then(X=>{$(this,X)}):this.fileDialogService.showOpenDialog(this.options).then(X=>{$(this,X?X[0]:void 0)})});function q(X){if(X.busy){X.onBusyChangeEmitter.event(G=>{G||q(X)});return}else if(U)return;U=!0,W++,X.onDidAccept().then(G=>{G?(X.filePickBox.hide(),$(X,G)):X.hidden?$(X,void 0):(W--,U=!1)})}this.filePickBox.onDidAccept(X=>{q(this)}),this.filePickBox.onDidChangeActive(X=>{if(U=!1,X.length===1&&this.isSelectionChangeFromUser()){this.filePickBox.validationMessage=void 0;const G=this.constructFullUserPath();(0,n.equalsIgnoreCase)(this.filePickBox.value.substring(0,G.length),G)||(this.filePickBox.valueSelection=[0,this.filePickBox.value.length],this.insertText(G,G)),this.setAutoComplete(G,this.userEnteredPathSegment,X[0],!0)}}),this.filePickBox.onDidChangeValue(async X=>this.handleValueChange(X)),this.filePickBox.onDidHide(()=>{this.hidden=!0,W===0&&$(this,void 0)}),this.filePickBox.show(),this.contextKey.set(!0),this.updateItems(V,!0,this.trailing).then(()=>{this.trailing?this.filePickBox.valueSelection=[this.filePickBox.value.length-this.trailing.length,this.filePickBox.value.length-x.length]:this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length],this.busy=!1})})}async handleValueChange(B){try{if(this.isValueChangeFromUser())if(!(0,n.equalsIgnoreCase)(B,this.constructFullUserPath())&&!this.isBadSubpath(B)){this.filePickBox.validationMessage=void 0;const V=this.filePickBoxValue();let z=O.NotUpdated;p.extUriIgnorePathCase.isEqual(this.currentFolder,V)||(z=await this.tryUpdateItems(B,V)),(z===O.NotUpdated||z===O.UpdatedWithTrailing)&&this.setActiveItems(B)}else this.filePickBox.activeItems=[],this.userEnteredPathSegment=""}catch{}}isBadSubpath(B){return this.badPath&&B.length>this.badPath.length&&(0,n.equalsIgnoreCase)(B.substring(0,this.badPath.length),this.badPath)}isValueChangeFromUser(){return!(0,n.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 B=this.pathFromUri(this.currentFolder);return(0,n.equalsIgnoreCase)(this.filePickBox.value.substr(0,this.userEnteredPathSegment.length),this.userEnteredPathSegment)?(0,n.equalsIgnoreCase)(this.filePickBox.value.substr(0,B.length),B)?B:this.userEnteredPathSegment:this.pathAppend(this.currentFolder,this.userEnteredPathSegment)}filePickBoxValue(){const B=this.remoteUriFrom(this.filePickBox.value.trimRight(),this.currentFolder),V=this.pathFromUri(this.currentFolder);if((0,n.equalsIgnoreCase)(this.filePickBox.value,V))return this.currentFolder;const z=this.remoteUriFrom(V,this.currentFolder),x=p.relativePath(z,B),H=this.filePickBox.value.length>1&&V.length>1?(0,n.equalsIgnoreCase)(this.filePickBox.value.substr(0,2),V.substr(0,2)):!1;if(x&&H){let W=p.joinPath(this.currentFolder,x);const U=p.basename(B);return(U==="."||U==="..")&&(W=this.remoteUriFrom(this.pathAppend(W,U),this.currentFolder)),p.hasTrailingPathSeparator(B)?p.addTrailingPathSeparator(W):W}else return B}async onDidAccept(){if(this.busy=!0,this.filePickBox.activeItems.length===1){const V=this.filePickBox.selectedItems[0];if(V.isFolder){if(this.trailing)await this.updateItems(V.uri,!0,this.trailing);else{const z=this.pathFromUri(V.uri);(0,n.startsWithIgnoreCase)(z,this.filePickBox.value)&&(0,n.equalsIgnoreCase)(V.label,p.basename(V.uri))?(this.filePickBox.valueSelection=[this.pathFromUri(this.currentFolder).length,this.filePickBox.value.length],this.insertText(z,this.basenameWithTrailingSlash(V.uri))):V.label===".."&&(0,n.startsWithIgnoreCase)(this.filePickBox.value,z)?(this.filePickBox.valueSelection=[z.length,this.filePickBox.value.length],this.insertText(z,"")):await this.updateItems(V.uri,!0)}this.filePickBox.busy=!1;return}}else if(await this.tryUpdateItems(this.filePickBox.value,this.filePickBoxValue())!==O.NotUpdated){this.filePickBox.busy=!1;return}let B;if(this.filePickBox.activeItems.length===0?B=this.filePickBoxValue():this.filePickBox.activeItems.length===1&&(B=this.filePickBox.selectedItems[0].uri),B&&(B=this.addPostfix(B)),await this.validate(B))return this.busy=!1,B;this.busy=!1}root(B){let V=B,z=p.dirname(B);for(;!p.isEqual(V,z);)V=z,z=p.dirname(z);return z}tildaReplace(B){const V=this.userHome;return B.length>0&&B[0]==="~"?p.joinPath(V,B.substring(1)):this.remoteUriFrom(B)}tryAddTrailingSeparatorToDirectory(B,V){return V.isDirectory&&!this.endsWithSlash(B.path)?p.addTrailingPathSeparator(B):B}async tryUpdateItems(B,V){if(B.length>0&&B[0]==="~"){const z=this.tildaReplace(B);return await this.updateItems(z,!0)?O.UpdatedWithTrailing:O.Updated}else{if(B==="\\")return V=this.root(this.currentFolder),B=this.pathFromUri(V),await this.updateItems(V,!0)?O.UpdatedWithTrailing:O.Updated;if(!p.extUriIgnorePathCase.isEqual(this.currentFolder,V)&&(this.endsWithSlash(B)||!p.extUriIgnorePathCase.isEqual(this.currentFolder,p.dirname(V))&&p.extUriIgnorePathCase.isEqualOrParent(this.currentFolder,p.dirname(V)))){let z;try{z=await this.fileService.stat(V)}catch{}if(z&&z.isDirectory&&p.basename(V)!=="."&&this.endsWithSlash(B))return V=this.tryAddTrailingSeparatorToDirectory(V,z),await this.updateItems(V)?O.UpdatedWithTrailing:O.Updated;if(this.endsWithSlash(B))return this.filePickBox.validationMessage=t.localize(6,null),this.badPath=B,O.InvalidPath;{let x=p.dirname(V);const H=p.removeTrailingPathSeparator(p.addTrailingPathSeparator(this.currentFolder)),W=p.removeTrailingPathSeparator(p.addTrailingPathSeparator(x));if(!p.extUriIgnorePathCase.isEqual(H,W)&&(!/^[a-zA-Z]:$/.test(this.filePickBox.value)||!(0,n.equalsIgnoreCase)(this.pathFromUri(this.currentFolder).substring(0,this.filePickBox.value.length),this.filePickBox.value))){let U;try{U=await this.fileService.stat(x)}catch{}if(U&&U.isDirectory)return this.badPath=void 0,x=this.tryAddTrailingSeparatorToDirectory(x,U),await this.updateItems(x,!1,p.basename(V))?O.UpdatedWithTrailing:O.Updated}}}}return this.badPath=void 0,O.NotUpdated}tryUpdateTrailing(B){const V=p.extname(B);this.trailing&&V&&(this.trailing=p.basename(B))}setActiveItems(B){B=this.pathFromUri(this.tildaReplace(B));const V=this.remoteUriFrom(B),z=p.basename(V),x=this.constructFullUserPath();if((0,n.equalsIgnoreCase)(x,B.substring(0,x.length))||(0,n.equalsIgnoreCase)(B,x.substring(0,B.length))){let W=!1;for(let U=0;U<this.filePickBox.items.length;U++){const $=this.filePickBox.items[U];if(this.setAutoComplete(B,z,$)){W=!0;break}}if(!W){const U=z.length>=2?x.substring(x.length-z.length+2):"";this.userEnteredPathSegment=U===z?z:"",this.autoCompletePathSegment="",this.filePickBox.activeItems=[],this.tryUpdateTrailing(V)}}else this.userEnteredPathSegment=z,this.autoCompletePathSegment="",this.filePickBox.activeItems=[],this.tryUpdateTrailing(V)}setAutoComplete(B,V,z,x=!1){if(this.busy)return this.userEnteredPathSegment=V,this.autoCompletePathSegment="",!1;const H=z.label;return H===".."?(this.userEnteredPathSegment="",this.autoCompletePathSegment="",this.activeItem=z,x&&document.execCommand("insertText",!1,""),!1):!x&&H.length>=V.length&&(0,n.equalsIgnoreCase)(H.substr(0,V.length),V)?(this.userEnteredPathSegment=V,this.activeItem=z,this.autoCompletePathSegment="",z.isFolder||!this.trailing?this.filePickBox.activeItems=[z]:this.filePickBox.activeItems=[],!0):x&&!(0,n.equalsIgnoreCase)(this.basenameWithTrailingSlash(z.uri),this.userEnteredPathSegment+this.autoCompletePathSegment)?(this.userEnteredPathSegment="",this.accessibilityService.isScreenReaderOptimized()||(this.autoCompletePathSegment=this.trimTrailingSlash(H)),this.activeItem=z,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=V,this.autoCompletePathSegment="",!1)}insertText(B,V){this.filePickBox.inputHasFocus()?(document.execCommand("insertText",!1,V),this.filePickBox.value!==B&&(this.filePickBox.value=B,this.handleValueChange(B))):(this.filePickBox.value=B,this.handleValueChange(B))}addPostfix(B){let V=B;if(this.requiresTrailing&&this.options.filters&&this.options.filters.length>0&&!p.hasTrailingPathSeparator(B)){let z=!1;const x=p.extname(B).substr(1);for(let H=0;H<this.options.filters.length;H++){for(let W=0;W<this.options.filters[H].extensions.length;W++)if(this.options.filters[H].extensions[W]==="*"||this.options.filters[H].extensions[W]===x){z=!0;break}if(z)break}z||(V=p.joinPath(p.dirname(B),p.basename(B)+"."+this.options.filters[0].extensions[0]))}return V}trimTrailingSlash(B){return B.length>1&&this.endsWithSlash(B)?B.substr(0,B.length-1):B}yesNoPrompt(B,V){const z=this.quickInputService.createQuickPick();z.title=V,z.ignoreFocusOut=!0,z.ok=!0,z.customButton=!0,z.customLabel=t.localize(7,null),z.value=this.pathFromUri(B);let x=!1;return new Promise(H=>{z.onDidAccept(()=>{x=!0,z.hide(),H(!0)}),z.onDidHide(()=>{x||H(!1),this.filePickBox.show(),this.hidden=!1,this.filePickBox.items=this.filePickBox.items,z.dispose()}),z.onDidChangeValue(()=>{z.hide()}),z.onDidCustom(()=>{z.hide()}),z.show()})}async validate(B){if(B===void 0)return this.filePickBox.validationMessage=t.localize(8,null),Promise.resolve(!1);let V,z;try{z=await this.fileService.stat(p.dirname(B)),V=await this.fileService.stat(B)}catch{}if(this.requiresTrailing){if(V&&V.isDirectory)return this.filePickBox.validationMessage=t.localize(9,null),Promise.resolve(!1);if(V){const x=t.localize(10,null,p.basename(B));return this.yesNoPrompt(B,x)}else if((0,o.isValidBasename)(p.basename(B),this.isWindows))if(z){if(!z.isDirectory)return this.filePickBox.validationMessage=t.localize(13,null),Promise.resolve(!1)}else{const x=t.localize(12,null,p.basename(p.dirname(B)));return this.yesNoPrompt(B,x)}else return this.filePickBox.validationMessage=t.localize(11,null),Promise.resolve(!1)}else if(V){if(B.path==="/"&&this.isWindows)return this.filePickBox.validationMessage=t.localize(15,null),Promise.resolve(!1);if(V.isDirectory&&!this.allowFolderSelection)return this.filePickBox.validationMessage=t.localize(16,null),Promise.resolve(!1);if(!V.isDirectory&&!this.allowFileSelection)return this.filePickBox.validationMessage=t.localize(17,null),Promise.resolve(!1)}else return this.filePickBox.validationMessage=t.localize(14,null),Promise.resolve(!1);return Promise.resolve(!0)}async updateItems(B,V=!1,z){this.busy=!0,this.autoCompletePathSegment="";const x=!!z;let H=!1;const W=(0,v.createCancelablePromise)(async U=>{let $;try{$=await this.fileService.resolve(B),$.isDirectory||(z=p.basename(B),B=p.dirname(B),$=void 0,H=!0)}catch{}const q=z?this.pathAppend(B,z):this.pathFromUri(B,!0);return this.currentFolder=this.endsWithSlash(B.path)?B:p.addTrailingPathSeparator(B,this.separator),this.userEnteredPathSegment=z||"",this.createItems($,this.currentFolder,U).then(X=>U.isCancellationRequested?(this.busy=!1,!1):(this.filePickBox.items=X,this.filePickBox.activeItems=[this.filePickBox.items[0]],this.filePickBox.activeItems=[],!(0,n.equalsIgnoreCase)(this.filePickBox.value,q)&&V&&(this.filePickBox.valueSelection=[0,this.filePickBox.value.length],this.insertText(q,q)),V&&z&&x?this.filePickBox.valueSelection=[this.filePickBox.value.length-z.length,this.filePickBox.value.length-z.length]:z||(this.filePickBox.valueSelection=[this.filePickBox.value.length,this.filePickBox.value.length]),this.busy=!1,this.updatingPromise=void 0,H))});return this.updatingPromise!==void 0&&this.updatingPromise.cancel(),this.updatingPromise=W,W}pathFromUri(B,V=!1){let z=(0,w.normalizeDriveLetter)(B.fsPath,this.isWindows).replace(/\n/g,"");return this.separator==="/"?z=z.replace(/\\/g,this.separator):z=z.replace(/\//g,this.separator),V&&!this.endsWithSlash(z)&&(z=z+this.separator),z}pathAppend(B,V){return V===".."||V==="."?this.pathFromUri(B,!0)+V:this.pathFromUri(p.joinPath(B,V))}async checkIsWindowsOS(){let B=I.isWindows;const V=await this.getRemoteAgentEnvironment();return V&&(B=V.os===1),B}endsWithSlash(B){return/[\/\\]$/.test(B)}basenameWithTrailingSlash(B){const V=this.pathFromUri(B,!0),z=this.pathFromUri(p.dirname(B),!0);return V.substring(z.length)}async createBackItem(B){const V=this.currentFolder.with({scheme:c.Schemas.file,authority:""}),z=p.dirname(V);if(!p.isEqual(V,z)){const x=p.dirname(B);if(await this.fileService.exists(x))return{label:"..",uri:p.addTrailingPathSeparator(x,this.separator),isFolder:!0}}}async createItems(B,V,z){const x=[],H=await this.createBackItem(V);try{B||(B=await this.fileService.resolve(V));const U=B.children?await Promise.all(B.children.map($=>this.createItem($,V,z))):[];for(const $ of U)$&&x.push($)}catch(U){console.log(U)}if(z.isCancellationRequested)return[];const W=x.sort((U,$)=>{if(U.isFolder!==$.isFolder)return U.isFolder?-1:1;const q=this.endsWithSlash(U.label)?U.label.substr(0,U.label.length-1):U.label,X=this.endsWithSlash($.label)?$.label.substr(0,$.label.length-1):$.label;return q.localeCompare(X)});return H&&W.unshift(H),W}filterFile(B){if(this.options.filters){const V=p.extname(B);for(let z=0;z<this.options.filters.length;z++)for(let x=0;x<this.options.filters[z].extensions.length;x++){const H=this.options.filters[z].extensions[x];if(H==="*"||V==="."+H)return!0}return!1}return!0}async createItem(B,V,z){if(z.isCancellationRequested)return;let x=p.joinPath(V,B.name);if(B.isDirectory){const H=p.basename(x);return x=p.addTrailingPathSeparator(x,this.separator),{label:H,uri:x,isFolder:!0,iconClasses:(0,f.getIconClasses)(this.modelService,this.languageService,x||void 0,A.FileKind.FOLDER)}}else if(!B.isDirectory&&this.allowFileSelection&&this.filterFile(x))return{label:B.name,uri:x,isFolder:!1,iconClasses:(0,f.getIconClasses)(this.modelService,this.languageService,x||void 0)}}};N=we([F(0,A.IFileService),F(1,k.IQuickInputService),F(2,S.ILabelService),F(3,C.IWorkspaceContextService),F(4,r.INotificationService),F(5,b.IFileDialogService),F(6,u.IModelService),F(7,i.ILanguageService),F(8,l.IWorkbenchEnvironmentService),F(9,s.IRemoteAgentService),F(10,D.IPathService),F(11,a.IKeybindingService),F(12,d.IContextKeyService),F(13,y.IAccessibilityService)],N),e.SimpleFileDialog=N}),define(ae[2713],le([1,0,1829,17,104,2,14,99,98,44,69,49,31,22,39,166,128,8,55,148,956,34,27,213,7,89,23]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let w=class{constructor(O,N){f.ipcRenderer.on("vscode:getDiagnosticInfo",(P,B)=>{const V=O.getConnection();if(V){const z=N.getHostLabel(u.Schemas.vscodeRemote,V.remoteAuthority);O.getDiagnosticInfo(B.args).then(x=>{x&&(x.hostName=z),f.ipcRenderer.send(B.replyChannel,x)}).catch(x=>{const H=x&&x.message?`Connection to '${z}' could not be established ${x.message}`:`Connection to '${z}' could not be established `;f.ipcRenderer.send(B.replyChannel,{hostName:z,errorMessage:H})})}else f.ipcRenderer.send(B.replyChannel)})}};w=we([F(0,R.IRemoteAgentService),F(1,C.ILabelService)],w);let D=class{constructor(O,N,P){const B=O.getConnection();B&&B.onDidStateChange(async V=>{if(V.type===4){const z=await N.resolveAuthority(B.remoteAuthority);z.options&&z.options.extensionHostEnv&&await P.setRemoteEnvironment(z.options.extensionHostEnv)}})}};D=we([F(0,R.IRemoteAgentService),F(1,d.IRemoteAuthorityResolverService),F(2,i.IExtensionService)],D);let y=class extends A.Disposable{constructor(O,N){super(),this.remoteAgentService=O,this.configurationService=N,this.updateRemoteTelemetryEnablement(),this._register(N.onDidChangeConfiguration(P=>{P.affectsConfiguration(o.TELEMETRY_SETTING_ID)&&this.updateRemoteTelemetryEnablement()}))}updateRemoteTelemetryEnablement(){return this.remoteAgentService.updateTelemetryLevel((0,g.getTelemetryLevel)(this.configurationService))}};y=we([F(0,R.IRemoteAgentService),F(1,l.IConfigurationService)],y);let T=class extends A.Disposable{constructor(O,N,P,B,V){super();function z(){const X=P.getValue("workbench.startupEditor");return X!=="welcomePage"&&X!=="welcomePageInEmptyWorkbench"}function x(){return z()}const{remoteAuthority:H,filesToDiff:W,filesToMerge:U,filesToOpenOrCreate:$,filesToWait:q}=O;H&&V.getWorkbenchState()===1&&!W?.length&&!U?.length&&!$?.length&&!q&&N.resolveAuthority(H).then(()=>{z()&&B.executeCommand("workbench.view.explorer"),x()&&B.executeCommand("workbench.action.terminal.toggleTerminal")})}};T=we([F(0,c.INativeWorkbenchEnvironmentService),F(1,d.IRemoteAuthorityResolverService),F(2,l.IConfigurationService),F(3,r.ICommandService),F(4,a.IWorkspaceContextService)],T);let _=class extends A.Disposable{constructor(O,N,P,B){super();const V="wslFeatureInstalled",z="remote.wslFeatureInstalled",x=P.getBoolean(z,-1,void 0),W=new h.RawContextKey(V,!!x,t.localize(0,null)).bindTo(O);x===void 0&&B.when(4).then(async()=>{N.hasWSLFeatureInstalled().then(U=>{U&&(W.set(!0),P.store(z,!0,-1,1))})})}};_=we([F(0,h.IContextKeyService),F(1,v.INativeHostService),F(2,m.IStorageService),F(3,S.ILifecycleService)],_);const L=p.Registry.as(b.Extensions.Workbench);L.registerWorkbenchContribution(w,4),L.registerWorkbenchContribution(D,4),L.registerWorkbenchContribution(y,2),L.registerWorkbenchContribution(T,2),k.isWindows&&L.registerWorkbenchContribution(_,2),p.Registry.as(s.Extensions.Configuration).registerConfiguration({id:"remote",title:t.localize(1,null),type:"object",properties:{"remote.downloadExtensionsLocally":{type:"boolean",markdownDescription:t.localize(2,null),default:!1}}}),k.isMacintosh?I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:n.OpenLocalFileFolderCommand.ID,weight:200,primary:2093,when:n.RemoteFileDialogContext,description:{description:n.OpenLocalFileFolderCommand.LABEL,args:[]},handler:n.OpenLocalFileFolderCommand.handler()}):(I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:n.OpenLocalFileCommand.ID,weight:200,primary:2093,when:n.RemoteFileDialogContext,description:{description:n.OpenLocalFileCommand.LABEL,args:[]},handler:n.OpenLocalFileCommand.handler()}),I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:n.OpenLocalFolderCommand.ID,weight:200,primary:(0,E.KeyChord)(2089,2093),when:n.RemoteFileDialogContext,description:{description:n.OpenLocalFolderCommand.LABEL,args:[]},handler:n.OpenLocalFolderCommand.handler()})),I.KeybindingsRegistry.registerCommandAndKeybindingRule({id:n.SaveLocalFileCommand.ID,weight:200,primary:3121,when:n.RemoteFileDialogContext,description:{description:n.SaveLocalFileCommand.LABEL,args:[]},handler:n.SaveLocalFileCommand.handler()})}),define(ae[2714],le([1,0,2001,243,47,34,191,51,18,5,956,200,8,19,41,74,68,16,28,42,49,107,22,125,31,75,24,161,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractFileDialogService=void 0;let y=class{constructor(_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G){this.hostService=_,this.contextService=L,this.historyService=M,this.environmentService=O,this.instantiationService=N,this.configurationService=P,this.fileService=B,this.openerService=V,this.dialogService=z,this.languageService=x,this.workspacesService=H,this.labelService=W,this.pathService=U,this.commandService=$,this.editorService=q,this.codeEditorService=X,this.logService=G}async defaultFilePath(_=this.getSchemeFilterForWindow()){let L=this.historyService.getLastActiveFile(_);return L?L=I.dirname(L):L=this.historyService.getLastActiveWorkspaceRoot(_),L||(L=await this.pathService.userHome({preferLocal:_===o.Schemas.file})),L}async defaultFolderPath(_=this.getSchemeFilterForWindow()){let L=this.historyService.getLastActiveWorkspaceRoot(_);return L||(L=this.historyService.getLastActiveFile(_)),L?I.dirname(L):this.pathService.userHome({preferLocal:_===o.Schemas.file})}async defaultWorkspacePath(_=this.getSchemeFilterForWindow()){let L;if(this.contextService.getWorkbenchState()===3){const M=this.contextService.getWorkspace().configuration;M?.scheme===_&&(0,A.isSavedWorkspace)(M,this.environmentService)&&!(0,A.isTemporaryWorkspace)(M)&&(L=I.dirname(M))}return L||(L=await this.defaultFilePath(_)),L}async showSaveConfirm(_){return this.skipDialogs()?(this.logService.trace("FileDialogService: refused to show save confirmation dialog in tests."),1):this.doShowSaveConfirm(_)}skipDialogs(){return this.environmentService.isExtensionDevelopment&&this.environmentService.extensionTestsLocationURI?!0:!!this.environmentService.enableSmokeTestDriver}async doShowSaveConfirm(_){if(_.length===0)return 1;let L,M=t.localize(0,null);_.length===1?L=t.localize(1,null,typeof _[0]=="string"?_[0]:I.basename(_[0])):(L=t.localize(2,null,_.length),M=(0,R.getFileNamesMessage)(_)+` `+M);const O=[_.length>1?t.localize(3,null):t.localize(4,null),t.localize(5,null),t.localize(6,null)],{choice:N}=await this.dialogService.show(c.default.Warning,L,O,{cancelId:2,detail:M});switch(N){case 0:return 0;case 1:return 1;default:return 2}}addFileSchemaIfNeeded(_,L){return _===o.Schemas.untitled?[o.Schemas.file]:_!==o.Schemas.file?[_,o.Schemas.file]:[_]}async pickFileFolderAndOpenSimplified(_,L,M){const O=t.localize(7,null),N=this.addFileSchemaIfNeeded(_),P=await this.pickResource({canSelectFiles:!0,canSelectFolders:!0,canSelectMany:!1,defaultUri:L.defaultUri,title:O,availableFileSystems:N});if(P){const B=await this.fileService.stat(P),V=B.isDirectory?{folderUri:P}:{fileUri:P};!(0,p.isWorkspaceToOpen)(V)&&(0,p.isFileToOpen)(V)&&this.addFileToRecentlyOpened(V.fileUri),B.isDirectory||L.forceNewWindow||M?await this.hostService.openWindow([V],{forceNewWindow:L.forceNewWindow,remoteAuthority:L.remoteAuthority}):await this.editorService.openEditors([{resource:P,options:{source:w.EditorOpenSource.USER,pinned:!0}}],void 0,{validateTrust:!0})}}async pickFileAndOpenSimplified(_,L,M){const O=t.localize(8,null),N=this.addFileSchemaIfNeeded(_),P=await this.pickResource({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:L.defaultUri,title:O,availableFileSystems:N});P&&(this.addFileToRecentlyOpened(P),L.forceNewWindow||M?await this.hostService.openWindow([{fileUri:P}],{forceNewWindow:L.forceNewWindow,remoteAuthority:L.remoteAuthority}):await this.editorService.openEditors([{resource:P,options:{source:w.EditorOpenSource.USER,pinned:!0}}],void 0,{validateTrust:!0}))}addFileToRecentlyOpened(_){this.workspacesService.addRecentlyOpened([{fileUri:_,label:this.labelService.getUriLabel(_)}])}async pickFolderAndOpenSimplified(_,L){const M=t.localize(9,null),O=this.addFileSchemaIfNeeded(_,!0),N=await this.pickResource({canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1,defaultUri:L.defaultUri,title:M,availableFileSystems:O});if(N)return this.hostService.openWindow([{folderUri:N}],{forceNewWindow:L.forceNewWindow,remoteAuthority:L.remoteAuthority})}async pickWorkspaceAndOpenSimplified(_,L){const M=t.localize(10,null),O=[{name:t.localize(11,null),extensions:[A.WORKSPACE_EXTENSION]}],N=this.addFileSchemaIfNeeded(_,!0),P=await this.pickResource({canSelectFiles:!0,canSelectFolders:!1,canSelectMany:!1,defaultUri:L.defaultUri,title:M,filters:O,availableFileSystems:N});if(P)return this.hostService.openWindow([{workspaceUri:P}],{forceNewWindow:L.forceNewWindow,remoteAuthority:L.remoteAuthority})}async pickFileToSaveSimplified(_,L){L.availableFileSystems||(L.availableFileSystems=this.addFileSchemaIfNeeded(_)),L.title=t.localize(12,null);const M=await this.saveRemoteResource(L);return M&&this.addFileToRecentlyOpened(M),M}async showSaveDialogSimplified(_,L){return L.availableFileSystems||(L.availableFileSystems=this.addFileSchemaIfNeeded(_)),this.saveRemoteResource(L)}async showOpenDialogSimplified(_,L){L.availableFileSystems||(L.availableFileSystems=this.addFileSchemaIfNeeded(_,L.canSelectFolders));const M=await this.pickResource(L);return M?[M]:void 0}getSimpleFileDialog(){return this.instantiationService.createInstance(S.SimpleFileDialog)}pickResource(_){return this.getSimpleFileDialog().showOpenDialog(_)}saveRemoteResource(_){return this.getSimpleFileDialog().showSaveDialog(_)}getSchemeFilterForWindow(_){return _??this.pathService.defaultUriScheme}getFileSystemSchema(_){return _.availableFileSystems&&_.availableFileSystems[0]||this.getSchemeFilterForWindow(_.defaultUri?.scheme)}getWorkspaceAvailableFileSystems(_){if(_.availableFileSystems&&_.availableFileSystems.length>0)return _.availableFileSystems;const L=[o.Schemas.file];return this.environmentService.remoteAuthority&&L.unshift(o.Schemas.vscodeRemote),L}getPickFileToSaveDialogOptions(_,L){const M={defaultUri:_,title:t.localize(13,null),availableFileSystems:L},O=_?I.extname(_):void 0;let N;const P=this.languageService.getSortedRegisteredLanguageNames(),B=(0,l.coalesce)(P.map(({languageName:V,languageId:z})=>{const x=this.languageService.getExtensions(z);if(!x.length)return null;const H={name:V,extensions:(0,l.distinct)(x).slice(0,10).map(U=>(0,s.trim)(U,"."))},W=O||g.PLAINTEXT_EXTENSION;if(!N&&x.includes(W)){N=H;const U=(0,s.trim)(W,".");return H.extensions.includes(U)||H.extensions.unshift(U),null}return H}));return!N&&O&&(N={name:(0,s.trim)(O,".").toUpperCase(),extensions:[(0,s.trim)(O,".")]}),M.filters=(0,l.coalesce)([{name:t.localize(14,null),extensions:["*"]},N,...B,{name:t.localize(15,null),extensions:[""]}]),M}};y=we([F(0,f.IHostService),F(1,A.IWorkspaceContextService),F(2,k.IHistoryService),F(3,E.IWorkbenchEnvironmentService),F(4,b.IInstantiationService),F(5,r.IConfigurationService),F(6,u.IFileService),F(7,i.IOpenerService),F(8,R.IDialogService),F(9,d.ILanguageService),F(10,C.IWorkspacesService),F(11,n.ILabelService),F(12,a.IPathService),F(13,h.ICommandService),F(14,m.IEditorService),F(15,v.ICodeEditorService),F(16,D.ILogService)],y),e.AbstractFileDialogService=y}),define(ae[2715],le([1,0,74,47,34,191,51,9,5,8,35,19,41,89,2714,22,42,200,49,107,31,75,24,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileDialogService=void 0;let h=class extends i.AbstractFileDialogService{constructor(m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U){super(m,w,D,y,T,_,L,M,N,P,B,V,z,x,H,W,U),this.nativeHostService=O}toNativeOpenDialogOptions(m){return{forceNewWindow:m.forceNewWindow,telemetryExtraData:m.telemetryExtraData,defaultPath:m.defaultUri?.fsPath}}shouldUseSimplified(m){const w=this.configurationService.getValue("files.simpleDialog.enable")===!0,D=this.configurationService.getValue("window.openFilesInNewWindow")==="on";return{useSimplified:m!==f.Schemas.file&&m!==f.Schemas.vscodeUserData||w,isSetting:D}}async pickFileFolderAndOpen(m){const w=this.getFileSystemSchema(m);m.defaultUri||(m.defaultUri=await this.defaultFilePath(w));const D=this.shouldUseSimplified(w);return D.useSimplified?this.pickFileFolderAndOpenSimplified(w,m,D.isSetting):this.nativeHostService.pickFileFolderAndOpen(this.toNativeOpenDialogOptions(m))}async pickFileAndOpen(m){const w=this.getFileSystemSchema(m);m.defaultUri||(m.defaultUri=await this.defaultFilePath(w));const D=this.shouldUseSimplified(w);return D.useSimplified?this.pickFileAndOpenSimplified(w,m,D.isSetting):this.nativeHostService.pickFileAndOpen(this.toNativeOpenDialogOptions(m))}async pickFolderAndOpen(m){const w=this.getFileSystemSchema(m);return m.defaultUri||(m.defaultUri=await this.defaultFolderPath(w)),this.shouldUseSimplified(w).useSimplified?this.pickFolderAndOpenSimplified(w,m):this.nativeHostService.pickFolderAndOpen(this.toNativeOpenDialogOptions(m))}async pickWorkspaceAndOpen(m){m.availableFileSystems=this.getWorkspaceAvailableFileSystems(m);const w=this.getFileSystemSchema(m);return m.defaultUri||(m.defaultUri=await this.defaultWorkspacePath(w)),this.shouldUseSimplified(w).useSimplified?this.pickWorkspaceAndOpenSimplified(w,m):this.nativeHostService.pickWorkspaceAndOpen(this.toNativeOpenDialogOptions(m))}async pickFileToSave(m,w){const D=this.getFileSystemSchema({defaultUri:m,availableFileSystems:w}),y=this.getPickFileToSaveDialogOptions(m,w);if(this.shouldUseSimplified(D).useSimplified)return this.pickFileToSaveSimplified(D,y);{const T=await this.nativeHostService.showSaveDialog(this.toNativeSaveDialogOptions(y));if(T&&!T.canceled&&T.filePath){const _=E.URI.file(T.filePath);return this.addFileToRecentlyOpened(_),_}}}toNativeSaveDialogOptions(m){return m.defaultUri=m.defaultUri?E.URI.file(m.defaultUri.path):void 0,{defaultPath:m.defaultUri?.fsPath,buttonLabel:m.saveLabel,filters:m.filters,title:m.title}}async showSaveDialog(m){const w=this.getFileSystemSchema(m);if(this.shouldUseSimplified(w).useSimplified)return this.showSaveDialogSimplified(w,m);const D=await this.nativeHostService.showSaveDialog(this.toNativeSaveDialogOptions(m));if(D&&!D.canceled&&D.filePath)return E.URI.file(D.filePath)}async showOpenDialog(m){const w=this.getFileSystemSchema(m);if(this.shouldUseSimplified(w).useSimplified)return this.showOpenDialogSimplified(w,m);const D={title:m.title,defaultPath:m.defaultUri?.fsPath,buttonLabel:m.openLabel,filters:m.filters,properties:[]};D.properties.push("createDirectory"),m.canSelectFiles&&D.properties.push("openFile"),m.canSelectFolders&&D.properties.push("openDirectory"),m.canSelectMany&&D.properties.push("multiSelections");const y=await this.nativeHostService.showOpenDialog(D);return y&&Array.isArray(y.filePaths)&&y.filePaths.length>0?y.filePaths.map(E.URI.file):void 0}};h=we([F(0,t.IHostService),F(1,R.IWorkspaceContextService),F(2,A.IHistoryService),F(3,k.IWorkbenchEnvironmentService),F(4,I.IInstantiationService),F(5,b.IConfigurationService),F(6,C.IFileService),F(7,r.IOpenerService),F(8,u.INativeHostService),F(9,p.IDialogService),F(10,c.ILanguageService),F(11,l.IWorkspacesService),F(12,s.ILabelService),F(13,d.IPathService),F(14,n.ICommandService),F(15,o.IEditorService),F(16,a.ICodeEditorService),F(17,g.ILogService)],h),e.FileDialogService=h,(0,S.registerSingleton)(p.IFileDialogService,h,1)}),define(ae[2716],le([1,0,2025,9,2,53,6,44,17,51,34,18,130,49,131,144,69,35,107,39,14,104,22,23,187,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LabelService=void 0;const m=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)}}}}}}}),w=/\//g,D=/\$\{(scheme|authoritySuffix|authority|path|(query)\.(.+?))\}/g;function y(M){return!!(M&&M[2]===":")}let T=class{constructor(O){this.formattersDisposables=new Map,m.setHandler((N,P)=>{P.added.forEach(B=>B.value.forEach(V=>{!(0,d.isProposedApiEnabled)(B.description,"contribLabelFormatterWorkspaceTooltip")&&V.formatting.workspaceTooltip&&(V.formatting.workspaceTooltip=void 0),this.formattersDisposables.set(V,O.registerFormatter(V))})),P.removed.forEach(B=>B.value.forEach(V=>{this.formattersDisposables.get(V).dispose()}))})}};T=we([F(0,u.ILabelService)],T),I.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(T,3);const _=50;let L=class extends R.Disposable{constructor(O,N,P,B,V,z){super(),this.environmentService=O,this.contextService=N,this.pathService=P,this.remoteAgentService=B,this._onDidChangeFormatters=this._register(new k.Emitter({leakWarningThreshold:400})),this.onDidChangeFormatters=this._onDidChangeFormatters.event,this.os=n.OS,this.userHome=P.defaultUriScheme===o.Schemas.file?this.pathService.userHome({preferLocal:!0}):void 0;const x=this.storedFormattersMemento=new h.Memento("cachedResourceLabelFormatters2",V);this.storedFormatters=x.getMemento(0,1),this.formatters=this.storedFormatters?.formatters?.slice()||[],this.resolveRemoteEnvironment()}async resolveRemoteEnvironment(){const O=await this.remoteAgentService.getEnvironment();this.os=O?.os??n.OS,this.userHome=await this.pathService.userHome()}findFormatting(O){let N;for(const P of this.formatters)if(P.scheme===O.scheme){if(!P.authority&&(!N||P.priority)){N=P;continue}if(!P.authority)continue;(0,f.match)(P.authority.toLowerCase(),O.authority.toLowerCase())&&(!N||!N.authority||P.authority.length>N.authority.length||P.authority.length===N.authority.length&&P.priority)&&(N=P)}return N?N.formatting:void 0}getUriLabel(O,N={}){let P=this.findFormatting(O);P&&N.separator&&(P={...P,separator:N.separator});const B=this.doGetUriLabel(O,P,N);return!P&&N.separator?B.replace(w,N.separator):B}doGetUriLabel(O,N,P={}){if(!N)return(0,r.getPathLabel)(O,{os:this.os,tildify:this.userHome?{userHome:this.userHome}:void 0,relative:P.relative?{noPrefix:P.noPrefix,getWorkspace:()=>this.contextService.getWorkspace(),getWorkspaceFolder:B=>this.contextService.getWorkspaceFolder(B)}:void 0});if(P.relative&&this.contextService){let B=this.contextService.getWorkspaceFolder(O);if(!B){const V=this.contextService.getWorkspace(),z=(0,v.firstOrDefault)(V.folders);z&&O.scheme!==z.uri.scheme&&O.path.startsWith(A.posix.sep)&&(B=this.contextService.getWorkspaceFolder(z.uri.with({path:O.path})))}if(B){const V=this.formatUri(B.uri,N,P.noPrefix);let z=this.formatUri(O,N,P.noPrefix),x=0;for(;z[x]&&z[x]===V[x];)x++;if(!z[x]||z[x]===N.separator?z=z.substring(1+x):x===V.length&&B.uri.path===A.posix.sep&&(z=z.substring(x)),this.contextService.getWorkspace().folders.length>1&&!P.noPrefix){const W=B?.name??(0,C.basenameOrAuthority)(B.uri);z=z?`${W} \u2022 ${z}`:W}return z}}return this.formatUri(O,N,P.noPrefix)}getUriBasenameLabel(O){const N=this.findFormatting(O),P=this.doGetUriLabel(O,N);let B;return N?.separator===A.win32.sep?B=A.win32:N?.separator===A.posix.sep?B=A.posix:B=this.os===1?A.win32:A.posix,B.basename(P)}getWorkspaceLabel(O,N){if((0,S.isWorkspace)(O)){const P=(0,S.toWorkspaceIdentifier)(O);return P?this.getWorkspaceLabel(P,N):""}return p.URI.isUri(O)?this.doGetSingleFolderWorkspaceLabel(O,N):(0,S.isSingleFolderWorkspaceIdentifier)(O)?this.doGetSingleFolderWorkspaceLabel(O.uri,N):(0,S.isWorkspaceIdentifier)(O)?this.doGetWorkspaceLabel(O.configPath,N):""}doGetWorkspaceLabel(O,N){if((0,S.isUntitledWorkspace)(O,this.environmentService))return(0,t.localize)(9,null);if((0,S.isTemporaryWorkspace)(O))return(0,t.localize)(10,null);let P=(0,C.basename)(O);P.endsWith(S.WORKSPACE_EXTENSION)&&(P=P.substr(0,P.length-S.WORKSPACE_EXTENSION.length-1));let B;return N?.verbose?B=(0,t.localize)(11,null,this.getUriLabel((0,C.joinPath)((0,C.dirname)(O),P))):B=(0,t.localize)(12,null,P),this.appendWorkspaceSuffix(B,O)}doGetSingleFolderWorkspaceLabel(O,N){const P=N?.verbose?this.getUriLabel(O):(0,C.basename)(O)||A.posix.sep;return this.appendWorkspaceSuffix(P,O)}getSeparator(O,N){return this.findFormatting(p.URI.from({scheme:O,authority:N}))?.separator||A.posix.sep}getHostLabel(O,N){return this.findFormatting(p.URI.from({scheme:O,authority:N}))?.workspaceSuffix||N||""}getHostTooltip(O,N){return this.findFormatting(p.URI.from({scheme:O,authority:N}))?.workspaceTooltip}registerCachedFormatter(O){const N=this.storedFormatters.formatters??=[];let P=N.findIndex(B=>B.scheme===O.scheme&&B.authority===O.authority);if(P===-1&&N.length>=_&&(P=_-1),P===-1)N.unshift(O);else{for(let B=P;B>0;B--)N[B]=N[B-1];N[0]=O}return this.storedFormattersMemento.saveMemento(),this.registerFormatter(O)}registerFormatter(O){return this.formatters.push(O),this._onDidChangeFormatters.fire({scheme:O.scheme}),{dispose:()=>{this.formatters=this.formatters.filter(N=>N!==O),this._onDidChangeFormatters.fire({scheme:O.scheme})}}}formatUri(O,N,P){let B=N.label.replace(D,(V,z,x,H)=>{switch(z){case"scheme":return O.scheme;case"authority":return O.authority;case"authoritySuffix":{const W=O.authority.indexOf("+");return W===-1?O.authority:O.authority.slice(W+1)}case"path":return N.stripPathStartingSeparator?O.path.slice(O.path[0]===N.separator?1:0):O.path;default:{if(x==="query"){const{query:W}=O;if(W&&W[0]==="{"&&W[W.length-1]==="}")try{return JSON.parse(W)[H]||""}catch{}}return""}}});return N.normalizeDriveLetter&&y(B)&&(B=B.charAt(1).toUpperCase()+B.substr(2)),N.tildify&&!P&&this.userHome&&(B=(0,r.tildify)(B,this.userHome.fsPath,this.os)),N.authorityPrefix&&O.authority&&(B=N.authorityPrefix+B),B.replace(w,N.separator)}appendWorkspaceSuffix(O,N){const P=this.findFormatting(N),B=P&&typeof P.workspaceSuffix=="string"?P.workspaceSuffix:void 0;return B?`${O} [${B}]`:O}};L=we([F(0,b.IWorkbenchEnvironmentService),F(1,S.IWorkspaceContextService),F(2,s.IPathService),F(3,a.IRemoteAgentService),F(4,g.IStorageService),F(5,c.ILifecycleService)],L),e.LabelService=L,(0,l.registerSingleton)(u.ILabelService,L,1)}),define(ae[2717],le([1,0,122,54,616,42,114,8,35,25,12,156,107,242,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchModelService=void 0;let f=class extends R.ModelService{constructor(l,s,d,n,a,o,g,h,v,m){super(l,s,d,n,a,g,o,h,v),this._pathService=m}_schemaShouldMaintainUndoRedoElements(l){return super._schemaShouldMaintainUndoRedoElements(l)||l.scheme===this._pathService.defaultUriScheme}};f=we([F(0,E.IConfigurationService),F(1,k.ITextResourcePropertiesService),F(2,S.IThemeService),F(3,b.ILogService),F(4,C.IUndoRedoService),F(5,t.ILanguageConfigurationService),F(6,A.ILanguageService),F(7,u.ILanguageFeatureDebounceService),F(8,i.ILanguageFeaturesService),F(9,r.IPathService)],f),e.WorkbenchModelService=f,(0,I.registerSingleton)(p.IModelService,f,1)}),define(ae[2718],le([1,0,35,104,128,107,34]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativePathService=void 0;let E=class extends A.AbstractPathService{constructor(b,S,C){super(S.userHome,b,S,C)}};E=we([F(0,p.IRemoteAgentService),F(1,R.INativeWorkbenchEnvironmentService),F(2,k.IWorkspaceContextService)],E),e.NativePathService=E,(0,t.registerSingleton)(A.IPathService,E,1)}),define(ae[295],le([1,0,2035,6,5,35,23,225,2,8,148,51,13,34,108,25,32,16,68,47,9,52]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,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,R.createDecorator)("remoteExplorerService"),e.REMOTE_EXPLORER_TYPE_KEY="remote.explorerType";const o="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 g;(function(N){N.Candidate="Candidate",N.Detected="Detected",N.Forwarded="Forwarded",N.Add="Add"})(g=e.TunnelType||(e.TunnelType={}));var h;(function(N){N[N.None=0]="None",N[N.New=1]="New",N[N.Label=2]="Label",N[N.LocalPort=3]="LocalPort"})(h=e.TunnelEditId||(e.TunnelEditId={}));var v;(function(N){N[N.User=0]="User",N[N.Auto=1]="Auto",N[N.Extension=2]="Extension"})(v=e.TunnelSource||(e.TunnelSource={})),e.UserTunnelSource={source:v.User,description:t.localize(0,null)},e.AutoTunnelSource={source:v.Auto,description:t.localize(1,null)};function m(N,P){return N+":"+P}e.makeAddress=m;function w(N){const P=N.match(/^([a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*:)?([0-9]+)$/);if(!!P)return{host:P[1]?.substring(0,P[1].length-1)||"localhost",port:Number(P[2])}}e.parseAddress=w;function D(N,P,B){const V=N.get(m(P,B));if(V)return V;if((0,E.isLocalhost)(P))for(const z of E.LOCALHOST_ADDRESSES){const x=m(z,B);if(N.has(x))return N.get(x)}else if((0,E.isAllInterfaces)(P))for(const z of E.ALL_INTERFACES_ADDRESSES){const x=m(z,B);if(N.has(x))return N.get(x)}}e.mapHasAddress=D;function y(N,P,B){const V=D(N,P,B);if(V)return V;const z=(0,E.isAllInterfaces)(P)?"localhost":(0,E.isLocalhost)(P)?"0.0.0.0":void 0;if(z)return D(N,z,B)}e.mapHasAddressLocalhostOrAllInterfaces=y;var T;(function(N){N.Notify="notify",N.OpenBrowser="openBrowser",N.OpenBrowserOnce="openBrowserOnce",N.OpenPreview="openPreview",N.Silent="silent",N.Ignore="ignore"})(T=e.OnPortForward||(e.OnPortForward={}));class _ extends I.Disposable{constructor(P){super(),this.configurationService=P,this.portsAttributes=[],this._onDidChangeAttributes=new p.Emitter,this.onDidChangeAttributes=this._onDidChangeAttributes.event,this._register(P.onDidChangeConfiguration(B=>{(B.affectsConfiguration(_.SETTING)||B.affectsConfiguration(_.DEFAULTS))&&this.updateAttributes()})),this.updateAttributes()}updateAttributes(){this.portsAttributes=this.readSetting(),this._onDidChangeAttributes.fire()}getAttributes(P,B,V){let z=this.findNextIndex(P,B,V,this.portsAttributes,0);const x={label:void 0,onAutoForward:void 0,elevateIfNeeded:void 0,requireLocalPort:void 0,protocol:void 0};for(;z>=0;){const H=this.portsAttributes[z];H.key===P?(x.onAutoForward=H.onAutoForward??x.onAutoForward,x.elevateIfNeeded=H.elevateIfNeeded!==void 0?H.elevateIfNeeded:x.elevateIfNeeded,x.label=H.label??x.label,x.requireLocalPort=H.requireLocalPort,x.protocol=H.protocol):(x.onAutoForward=x.onAutoForward??H.onAutoForward,x.elevateIfNeeded=x.elevateIfNeeded!==void 0?x.elevateIfNeeded:H.elevateIfNeeded,x.label=x.label??H.label,x.requireLocalPort=x.requireLocalPort!==void 0?x.requireLocalPort:void 0,x.protocol=x.protocol??H.protocol),z=this.findNextIndex(P,B,V,this.portsAttributes,z+1)}return x.onAutoForward!==void 0||x.elevateIfNeeded!==void 0||x.label!==void 0||x.requireLocalPort!==void 0||x.protocol!==void 0?x:this.getOtherAttributes()}hasStartEnd(P){return P.start!==void 0&&P.end!==void 0}hasHostAndPort(P){return P.host!==void 0&&P.port!==void 0&&(0,r.isString)(P.host)&&(0,r.isNumber)(P.port)}findNextIndex(P,B,V,z,x){if(x>=z.length)return-1;const H=!(0,E.isLocalhost)(B)&&!(0,E.isAllInterfaces)(B),U=z.slice(x).findIndex($=>(0,r.isNumber)($.key)?H?!1:$.key===P:this.hasStartEnd($.key)?H?!1:P>=$.key.start&&P<=$.key.end:this.hasHostAndPort($.key)?P===$.key.port&&B===$.key.host:V?$.key.test(V):!1);return U>=0?U+x:-1}readSetting(){const P=this.configurationService.getValue(_.SETTING);if(!P||!(0,r.isObject)(P))return[];const B=[];for(const z in P){if(z===void 0)continue;const x=P[z];let H;if(Number(z))H=Number(z);else if((0,r.isString)(z))if(_.RANGE.test(z)){const W=z.match(_.RANGE);H={start:Number(W[1]),end:Number(W[2])}}else if(_.HOST_AND_PORT.test(z)){const W=z.match(_.HOST_AND_PORT);H={host:W[1],port:Number(W[2])}}else{let W;try{W=RegExp(z)}catch{}W&&(H=W)}!H||B.push({key:H,elevateIfNeeded:x.elevateIfNeeded,onAutoForward:x.onAutoForward,label:x.label,requireLocalPort:x.requireLocalPort,protocol:x.protocol})}const V=this.configurationService.getValue(_.DEFAULTS);return V&&(this.defaultPortAttributes={elevateIfNeeded:V.elevateIfNeeded,label:V.label,onAutoForward:V.onAutoForward,requireLocalPort:V.requireLocalPort,protocol:V.protocol}),this.sortAttributes(B)}sortAttributes(P){function B(V,z){return(0,r.isNumber)(V.key)?V.key:z.hasStartEnd(V.key)?V.key.start:z.hasHostAndPort(V.key)?V.key.port:Number.MAX_VALUE}return P.sort((V,z)=>B(V,this)-B(z,this))}getOtherAttributes(){return this.defaultPortAttributes}static providedActionToAction(P){switch(P){case E.ProvidedOnAutoForward.Notify:return T.Notify;case E.ProvidedOnAutoForward.OpenBrowser:return T.OpenBrowser;case E.ProvidedOnAutoForward.OpenBrowserOnce:return T.OpenBrowserOnce;case E.ProvidedOnAutoForward.OpenPreview:return T.OpenPreview;case E.ProvidedOnAutoForward.Silent:return T.Silent;case E.ProvidedOnAutoForward.Ignore:return T.Ignore;default:return}}async addAttributes(P,B,V){const x=this.configurationService.inspect(_.SETTING).userRemoteValue;let H;!x||!(0,r.isObject)(x)?H={}:H=(0,a.deepClone)(x),H[`${P}`]||(H[`${P}`]={});for(const W in B)H[`${P}`][W]=B[W];return this.configurationService.updateValue(_.SETTING,H,V)}}e.PortsAttributes=_,_.SETTING="remote.portsAttributes",_.DEFAULTS="remote.otherPortsAttributes",_.RANGE=/^(\d+)\-(\d+)$/,_.HOST_AND_PORT=/^([a-z0-9\-]+):(\d{1,5})$/;const L=10*1e3;let M=class extends I.Disposable{constructor(P,B,V,z,x,H,W,U){super(),this.tunnelService=P,this.storageService=B,this.configurationService=V,this.environmentService=z,this.remoteAuthorityResolverService=x,this.workspaceContextService=H,this.logService=W,this.dialogService=U,this.inProgress=new Map,this._onForwardPort=new p.Emitter,this.onForwardPort=this._onForwardPort.event,this._onClosePort=new p.Emitter,this.onClosePort=this._onClosePort.event,this._onPortName=new p.Emitter,this.onPortName=this._onPortName.event,this._onCandidatesChanged=new p.Emitter,this.onCandidatesChanged=this._onCandidatesChanged.event,this._onEnvironmentTunnelsSet=new p.Emitter,this.onEnvironmentTunnelsSet=this._onEnvironmentTunnelsSet.event,this._environmentTunnelsSet=!1,this.portAttributesProviders=[],this.mismatchCooldown=new Date,this.configPortsAttributes=new _(V),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 $=>{const q=await this.getAttributes($.map(X=>({port:X.tunnelRemotePort,host:X.tunnelRemoteHost})));for(const X of $)if(X.localAddress){const G=m(X.tunnelRemoteHost,X.tunnelRemotePort),Q=y(this._candidates??new Map,X.tunnelRemoteHost,X.tunnelRemotePort);this.forwarded.set(G,{remotePort:X.tunnelRemotePort,remoteHost:X.tunnelRemoteHost,localAddress:X.localAddress,protocol:q?.get(X.tunnelRemotePort)?.protocol??E.TunnelProtocol.Http,localUri:await this.makeLocalUri(X.localAddress,q?.get(X.tunnelRemotePort)),localPort:X.tunnelLocalPort,runningProcess:Q?.detail,hasRunningProcess:!!Q,pid:Q?.pid,privacy:X.privacy,source:e.UserTunnelSource}),this.remoteTunnels.set(G,X)}}),this.detected=new Map,this._register(this.tunnelService.onTunnelOpened(async $=>{const q=m($.tunnelRemoteHost,$.tunnelRemotePort);if(!y(this.forwarded,$.tunnelRemoteHost,$.tunnelRemotePort)&&!y(this.detected,$.tunnelRemoteHost,$.tunnelRemotePort)&&!y(this.inProgress,$.tunnelRemoteHost,$.tunnelRemotePort)&&$.localAddress){const X=y(this._candidates??new Map,$.tunnelRemoteHost,$.tunnelRemotePort),G=(await this.getAttributes([{port:$.tunnelRemotePort,host:$.tunnelRemoteHost}]))?.get($.tunnelRemotePort);this.forwarded.set(q,{remoteHost:$.tunnelRemoteHost,remotePort:$.tunnelRemotePort,localAddress:$.localAddress,protocol:G?.protocol??E.TunnelProtocol.Http,localUri:await this.makeLocalUri($.localAddress,G),localPort:$.tunnelLocalPort,closeable:!0,runningProcess:X?.detail,hasRunningProcess:!!X,pid:X?.pid,privacy:$.privacy,source:e.UserTunnelSource})}await this.storeForwarded(),this.remoteTunnels.set(q,$),this._onForwardPort.fire(this.forwarded.get(q))})),this._register(this.tunnelService.onTunnelClosed($=>this.onTunnelClosed($)))}async onTunnelClosed(P){const B=m(P.host,P.port);this.forwarded.has(B)&&(this.forwarded.delete(B),await this.storeForwarded(),this._onClosePort.fire(P))}makeLocalUri(P,B){if(P.startsWith("http"))return n.URI.parse(P);const V=B?.protocol??"http";return n.URI.parse(`${V}://${P}`)}async getStorageKey(){const P=this.workspaceContextService.getWorkspace(),B=P.configuration?(0,i.hash)(P.configuration.path):P.folders.length>0?(0,i.hash)(P.folders[0].uri.path):void 0;return`${o}.${this.environmentService.remoteAuthority}.${B}`}async getTunnelRestoreValue(){const P=this.storageService.get(o,1);return P?(this.storageService.remove(o,1),await this.storeForwarded(),P):this.storageService.get(await this.getStorageKey(),0)}async restoreForwarded(){if(this.configurationService.getValue("remote.restoreForwardedPorts")){const P=await this.tunnelRestoreValue;if(P&&P!==this.knownPortsRestoreValue){const B=JSON.parse(P)??[];this.logService.trace(`ForwardedPorts: (TunnelModel) restoring ports ${B.map(V=>V.remotePort).join(", ")}`);for(const V of B)y(this.detected,V.remoteHost,V.remotePort)||await this.forward({remote:{host:V.remoteHost,port:V.remotePort},local:V.localPort,name:V.name,privacy:V.privacy,elevateIfNeeded:!0})}}if(!this.restoreListener){const P=await this.getStorageKey();this.restoreListener=this._register(this.storageService.onDidChangeValue(async B=>{B.key===P&&(this.tunnelRestoreValue=Promise.resolve(this.storageService.get(await this.getStorageKey(),0)),await this.restoreForwarded())}))}}async storeForwarded(){if(this.configurationService.getValue("remote.restoreForwardedPorts")){const P=JSON.stringify(Array.from(this.forwarded.values()).filter(B=>B.source.source===v.User));P!==this.knownPortsRestoreValue&&(this.knownPortsRestoreValue=P,this.storageService.store(await this.getStorageKey(),this.knownPortsRestoreValue,0,0))}}async showPortMismatchModalIfNeeded(P,B,V){if(!P.tunnelLocalPort||!V?.requireLocalPort||P.tunnelLocalPort===B)return;const z=new Date;if(this.mismatchCooldown.getTime()+L>z.getTime())return;this.mismatchCooldown=z;const x=t.localize(2,null,B,P.tunnelRemotePort,P.tunnelLocalPort);return this.dialogService.show(s.default.Info,x)}async forward(P,B){const V=y(this.forwarded,P.remote.host,P.remote.port);B=B??(B!==null?(await this.getAttributes([P.remote]))?.get(P.remote.port):void 0);const z=P.local!==void 0?P.local:P.remote.port;if(V){const x=B?.label??P.name;return x!==V.name&&(V.name=x,this._onForwardPort.fire()),(B?.protocol||V.protocol!==E.TunnelProtocol.Http)&&B?.protocol!==V.protocol&&(await this.close(V.remoteHost,V.remotePort),P.source=V.source,await this.forward(P,B)),y(this.remoteTunnels,P.remote.host,P.remote.port)}else{const x=this.environmentService.remoteAuthority,H=x?{getAddress:async()=>(await this.remoteAuthorityResolverService.resolveAuthority(x)).authority}:void 0,W=m(P.remote.host,P.remote.port);this.inProgress.set(W,!0);const U=await this.tunnelService.openTunnel(H,P.remote.host,P.remote.port,z,P.elevateIfNeeded?P.elevateIfNeeded:B?.elevateIfNeeded,P.privacy,B?.protocol);if(U&&U.localAddress){const $=y(this._candidates??new Map,P.remote.host,P.remote.port),q=U.protocol?U.protocol===E.TunnelProtocol.Https?E.TunnelProtocol.Https:E.TunnelProtocol.Http:B?.protocol??E.TunnelProtocol.Http,X={remoteHost:U.tunnelRemoteHost,remotePort:U.tunnelRemotePort,localPort:U.tunnelLocalPort,name:B?.label??P.name,closeable:!0,localAddress:U.localAddress,protocol:q,localUri:await this.makeLocalUri(U.localAddress,B),runningProcess:$?.detail,hasRunningProcess:!!$,pid:$?.pid,source:P.source??e.UserTunnelSource,privacy:U.privacy};return this.forwarded.set(W,X),this.remoteTunnels.set(W,U),this.inProgress.delete(W),await this.storeForwarded(),await this.showPortMismatchModalIfNeeded(U,z,B),this._onForwardPort.fire(X),U}}}async name(P,B,V){const z=y(this.forwarded,P,B),x=m(P,B);if(z){z.name=V,await this.storeForwarded(),this._onPortName.fire({host:P,port:B});return}else this.detected.has(x)&&(this.detected.get(x).name=V,this._onPortName.fire({host:P,port:B}))}async close(P,B){return await this.tunnelService.closeTunnel(P,B),this.onTunnelClosed({host:P,port:B})}address(P,B){const V=m(P,B);return(this.forwarded.get(V)||this.detected.get(V))?.localAddress}get environmentTunnelsSet(){return this._environmentTunnelsSet}addEnvironmentTunnels(P){if(P)for(const B of P){const V=y(this._candidates??new Map,B.remoteAddress.host,B.remoteAddress.port),z=typeof B.localAddress=="string"?B.localAddress:m(B.localAddress.host,B.localAddress.port);this.detected.set(m(B.remoteAddress.host,B.remoteAddress.port),{remoteHost:B.remoteAddress.host,remotePort:B.remoteAddress.port,localAddress:z,protocol:E.TunnelProtocol.Http,localUri:this.makeLocalUri(z),closeable:!1,runningProcess:V?.detail,hasRunningProcess:!!V,pid:V?.pid,privacy:E.TunnelPrivacyId.ConstantPrivate,source:{source:v.Extension,description:t.localize(3,null)}}),this.tunnelService.setEnvironmentTunnel(B.remoteAddress.host,B.remoteAddress.port,z,E.TunnelPrivacyId.ConstantPrivate,E.TunnelProtocol.Http)}this._environmentTunnelsSet=!0,this._onEnvironmentTunnelsSet.fire(),this._onForwardPort.fire()}setCandidateFilter(P){this._candidateFilter=P}async setCandidates(P){let B=P;this._candidateFilter&&(B=await this._candidateFilter(P));const V=this.updateInResponseToCandidates(B);this.logService.trace(`ForwardedPorts: (TunnelModel) removed candidates ${Array.from(V.values()).map(z=>z.port).join(", ")}`),this._onCandidatesChanged.fire(V)}updateInResponseToCandidates(P){const B=this._candidates??new Map,V=new Map;return this._candidates=V,P.forEach(z=>{const x=m(z.host,z.port);V.set(x,{host:z.host,port:z.port,detail:z.detail,pid:z.pid}),B.has(x)&&B.delete(x);const H=y(this.forwarded,z.host,z.port);H&&(H.runningProcess=z.detail,H.hasRunningProcess=!0,H.pid=z.pid)}),B.forEach((z,x)=>{const H=w(x);if(!H)return;const W=y(this.forwarded,H.host,H.port);W&&(W.runningProcess=void 0,W.hasRunningProcess=!1,W.pid=void 0);const U=y(this.detected,H.host,H.port);U&&(U.runningProcess=void 0,U.hasRunningProcess=!1,U.pid=void 0)}),B}get candidates(){return this._candidates?Array.from(this._candidates.values()):[]}get candidatesOrUndefined(){return this._candidates?this.candidates:void 0}async updateAttributes(){const P=Array.from(this.forwarded.values()),B=await this.getAttributes(P.map(V=>({port:V.remotePort,host:V.remoteHost})),!1);if(!!B)for(const V of P){const z=B.get(V.remotePort);(z?.protocol||V.protocol!==E.TunnelProtocol.Http)&&z?.protocol!==V.protocol&&await this.forward({remote:{host:V.remoteHost,port:V.remotePort},local:V.localPort,name:V.name,source:V.source},z),!!z&&z.label&&z.label!==V.name&&await this.name(V.remoteHost,V.remotePort,z.label)}}async getAttributes(P,B=!0){const V=new Map,z=new Map;P.forEach($=>{const q=y(this._candidates??new Map,E.LOCALHOST_ADDRESSES[0],$.port);q&&(V.set($.port,q),z.has(q.pid)||z.set(q.pid,[]),z.get(q.pid)?.push($.port))});const x=new Map;if(P.forEach($=>{const q=this.configPortsAttributes.getAttributes($.port,$.host,V.get($.port)?.detail);q&&x.set($.port,q)}),this.portAttributesProviders.length===0||!B)return x.size>0?x:void 0;const H=await Promise.all((0,l.flatten)(this.portAttributesProviders.map($=>Array.from(z.entries()).map(q=>{const X=q[1],G=V.get(X[0]);return $.providePortAttributes(X,G?.pid,G?.detail,new c.CancellationTokenSource().token)})))),W=new Map;if(H.forEach($=>$.forEach(q=>{q&&W.set(q.port,q)})),!x&&!W)return;const U=new Map;return P.forEach($=>{const q=x.get($.port),X=W.get($.port);U.set($.port,{elevateIfNeeded:q?.elevateIfNeeded,label:q?.label,onAutoForward:q?.onAutoForward??_.providedActionToAction(X?.autoForwardAction),requireLocalPort:q?.requireLocalPort,protocol:q?.protocol})}),U}addAttributesProvider(P){this.portAttributesProviders.push(P)}};M=we([F(0,E.ITunnelService),F(1,k.IStorageService),F(2,b.IConfigurationService),F(3,C.IWorkbenchEnvironmentService),F(4,S.IRemoteAuthorityResolverService),F(5,u.IWorkspaceContextService),F(6,f.ILogService),F(7,d.IDialogService)],M),e.TunnelModel=M;let O=class{constructor(P,B,V,z,x,H,W,U){this.storageService=P,this.tunnelService=B,this._targetType=[],this._onDidChangeTargetType=new p.Emitter,this.onDidChangeTargetType=this._onDidChangeTargetType.event,this._onDidChangeEditable=new p.Emitter,this.onDidChangeEditable=this._onDidChangeEditable.event,this._onEnabledPortsFeatures=new p.Emitter,this.onEnabledPortsFeatures=this._onEnabledPortsFeatures.event,this._portsFeaturesEnabled=!1,this.namedProcesses=new Map,this._tunnelModel=new M(B,P,V,z,x,H,W,U)}set targetType(P){const B=this._targetType.length>0?this._targetType[0]:"",V=P.length>0?P[0]:"";B!==V&&(this._targetType=P,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(P,B){return this.tunnelModel.forward(P,B)}close(P){return this.tunnelModel.close(P.host,P.port)}setTunnelInformation(P){P?.features&&this.tunnelService.setTunnelFeatures(P.features),this.tunnelModel.addEnvironmentTunnels(P?.environmentTunnels)}setEditable(P,B,V){V?this._editable={tunnelItem:P,data:V,editId:B}:this._editable=void 0,this._onDidChangeEditable.fire(P?{tunnel:P,editId:B}:void 0)}getEditableData(P,B){return this._editable&&(!P&&P===this._editable.tunnelItem||P&&this._editable.tunnelItem?.remotePort===P.remotePort&&this._editable.tunnelItem.remoteHost===P.remoteHost&&this._editable.editId===B)?this._editable.data:void 0}setCandidateFilter(P){return P?(this.tunnelModel.setCandidateFilter(P),{dispose:()=>{this.tunnelModel.setCandidateFilter(void 0)}}):{dispose:()=>{}}}onFoundNewCandidates(P){this.tunnelModel.setCandidates(P)}restore(){return this.tunnelModel.restoreForwarded()}enablePortsFeatures(){this._portsFeaturesEnabled=!0,this._onEnabledPortsFeatures.fire()}get portsFeaturesEnabled(){return this._portsFeaturesEnabled}};O=we([F(0,k.IStorageService),F(1,E.ITunnelService),F(2,b.IConfigurationService),F(3,C.IWorkbenchEnvironmentService),F(4,S.IRemoteAuthorityResolverService),F(5,u.IWorkspaceContextService),F(6,f.ILogService),F(7,d.IDialogService)],O),(0,A.registerSingleton)(e.IRemoteExplorerService,O,1)}),define(ae[2719],le([1,0,1456,67,2268,77,295,225,2,26,8,25,104,17,55]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTunnelService=void 0;let f=class extends I.Disposable{constructor(l,s,d,n,a,o,g){super(),this.remoteExplorerService=s,this.tunnelService=d,this.notificationService=n,this.configurationService=a,this.logService=o,this.remoteAgentService=g,this.elevateionRetry=!1,this.portsAttributesProviders=new Map,this._alreadyRegistered=!1,this._proxy=l.getProxy(p.ExtHostContext.ExtHostTunnelService),this._register(d.onTunnelOpened(()=>this._proxy.$onDidTunnelsChange())),this._register(d.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 s=>{if(s.affectsConfiguration(k.PORT_AUTO_FORWARD_SETTING)||s.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,s){this.portsAttributesProviders.set(s,l),this._alreadyRegistered||(this.remoteExplorerService.tunnelModel.addAttributesProvider(this),this._alreadyRegistered=!0)}async $unregisterPortsAttributesProvider(l){this.portsAttributesProviders.delete(l)}async providePortAttributes(l,s,d,n){if(this.portsAttributesProviders.size===0)return[];const a=Array.from(this.portsAttributesProviders.entries()).filter(o=>{const g=o[1],h=g.portRange,v=h?l.some(D=>h[0]<=D&&D<h[1]):!0,m=!g.pid||g.pid===s,w=!g.commandMatcher||d&&d.match(g.commandMatcher);return v&&m&&w}).map(o=>o[0]);return a.length===0?[]:this._proxy.$providePortAttributes(a,l,s,d,n)}async $openTunnel(l,s){const d=await this.remoteExplorerService.forward({remote:l.remoteAddress,local:l.localAddressPort,name:l.label,source:{source:k.TunnelSource.Extension,description:s},elevateIfNeeded:!1});if(d)return!this.elevateionRetry&&l.localAddressPort!==void 0&&d.tunnelLocalPort!==void 0&&this.tunnelService.isPortPrivileged(l.localAddressPort)&&d.tunnelLocalPort!==l.localAddressPort&&this.tunnelService.canElevate&&this.elevationPrompt(l,d,s),R.TunnelDtoConverter.fromServiceTunnel(d)}async elevationPrompt(l,s,d){return this.notificationService.prompt(b.Severity.Info,t.localize(0,null,d,l.remoteAddress.port,l.localAddressPort),[{label:t.localize(1,null,s.tunnelRemotePort),run:async()=>{this.elevateionRetry=!0,await this.remoteExplorerService.close({host:s.tunnelRemoteHost,port:s.tunnelRemotePort}),await this.remoteExplorerService.forward({remote:l.remoteAddress,local:l.localAddressPort,name:l.label,source:{source:k.TunnelSource.Extension,description:d},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 s={forwardPort:(d,n)=>this._proxy.$forwardPort(d,n).then(o=>{if(this.logService.trace(`ForwardedPorts: (MainThreadTunnelService) New tunnel established by tunnel provider: ${o?.remoteAddress.host}:${o?.remoteAddress.port}`),!!o)return{tunnelRemotePort:o.remoteAddress.port,tunnelRemoteHost:o.remoteAddress.host,localAddress:typeof o.localAddress=="string"?o.localAddress:(0,k.makeAddress)(o.localAddress.host,o.localAddress.port),tunnelLocalPort:typeof o.localAddress!="string"?o.localAddress.port:void 0,public:o.public,privacy:o.privacy,protocol:o.protocol??E.TunnelProtocol.Http,dispose:async g=>(this.logService.trace(`ForwardedPorts: (MainThreadTunnelService) Closing tunnel from tunnel provider: ${o?.remoteAddress.host}:${o?.remoteAddress.port}`),this._proxy.$closeTunnel({host:o.remoteAddress.host,port:o.remoteAddress.port},g))}})};this.tunnelService.setTunnelProvider(s),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 p.CandidatePortSource.None:{u.Registry.as(i.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPorts":!1}}]);break}case p.CandidatePortSource.Output:{u.Registry.as(i.Extensions.Configuration).registerDefaultConfigurations([{overrides:{"remote.autoForwardPortsSource":k.PORT_AUTO_SOURCE_SETTING_OUTPUT}}]);break}default:}}).catch(()=>{})}};f=we([(0,A.extHostNamedCustomer)(p.MainContext.MainThreadTunnelService),F(1,k.IRemoteExplorerService),F(2,E.ITunnelService),F(3,b.INotificationService),F(4,S.IConfigurationService),F(5,C.ILogService),F(6,r.IRemoteAgentService)],f),e.MainThreadTunnelService=f}),define(ae[2720],le([1,0,2,248,295]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowCandidateContribution=void 0;let A=class extends t.Disposable{constructor(E,I){super();const b=I.options?.tunnelProvider?.showPortCandidate;b&&this._register(E.setCandidateFilter(async S=>{const C=await Promise.all(S.map(u=>b(u.host,u.port,u.detail??""))),r=[];if(C.length!==S.length)return S;for(let u=0;u<S.length;u++)C[u]&&r.push(S[u]);return r}))}};A=we([F(0,R.IRemoteExplorerService),F(1,p.IBrowserWorkbenchEnvironmentService)],A),e.ShowCandidateContribution=A}),define(ae[2721],le([1,0,1826,225,2,248,41,9,295,25]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelFactoryContribution=void 0;let S=class extends R.Disposable{constructor(r,u,i,f,c){super(),this.openerService=i;const l=u.options?.tunnelProvider?.tunnelFactory;if(l){let s=u.options?.tunnelProvider?.features?.privacyOptions??[];u.options?.tunnelProvider?.features?.public&&s.length===0&&(s=[{id:"private",label:t.localize(0,null),themeIcon:"lock"},{id:"public",label:t.localize(1,null),themeIcon:"eye"}]),this._register(r.setTunnelProvider({forwardPort:async(n,a)=>{let o;try{o=l(n,a)}catch{c.trace("tunnelFactory: tunnel provider error")}if(!o)return;let g;try{g=await o}catch{c.trace("tunnelFactory: tunnel provider promise error");return}const h=g.localAddress.startsWith("http")?g.localAddress:`http://${g.localAddress}`;return{tunnelRemotePort:g.remoteAddress.port,tunnelRemoteHost:g.remoteAddress.host,localAddress:await this.resolveExternalUri(h),privacy:g.privacy??(g.public?p.TunnelPrivacyId.Public:p.TunnelPrivacyId.Private),protocol:g.protocol??p.TunnelProtocol.Http,dispose:async()=>{await g.dispose()}}}}));const d=u.options?.tunnelProvider?.features?{features:{elevation:!!u.options?.tunnelProvider?.features?.elevation,public:!!u.options?.tunnelProvider?.features?.public,privacyOptions:s}}:void 0;f.setTunnelInformation(d)}}async resolveExternalUri(r){try{return(await this.openerService.resolveExternalUri(E.URI.parse(r))).resolved.toString()}catch{return r}}};S=we([F(0,p.ITunnelService),F(1,A.IBrowserWorkbenchEnvironmentService),F(2,k.IOpenerService),F(3,I.IRemoteExplorerService),F(4,b.ILogService)],S),e.TunnelFactoryContribution=S}),define(ae[2722],le([1,0,1827,10,45,38,37,7,8,5,41,48,31,6,2,79,239,36,15,84,295,93,26,211,73,154,12,129,9,225,97,98,27,137,648,549,32,14,76,182,33,113,179,80,29,1170]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$){"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.openPreviewEnabledContext=e.forwardedPortsViewEnabled=void 0,e.forwardedPortsViewEnabled=new E.RawContextKey("forwardedPortsViewEnabled",!1,t.localize(0,null)),e.openPreviewEnabledContext=new E.RawContextKey("openPreviewEnabled",!1);class q{constructor(Ue){this.remoteExplorerService=Ue,this.headerRowHeight=22}getHeight(Ue){return Ue.tunnelType===n.TunnelType.Add&&!this.remoteExplorerService.getEditableData(void 0)?30:22}}let X=class{constructor(Ue,Fe){this.remoteExplorerService=Ue,this.tunnelService=Fe,this._candidates=new Map,this.input={label:t.localize(1,null),icon:void 0,tunnelType:n.TunnelType.Add,hasRunningProcess:!1,remoteHost:"",remotePort:0,processDescription:"",tooltipPostfix:"",iconTooltip:"",portTooltip:"",processTooltip:"",originTooltip:"",privacyTooltip:"",source:{source:n.TunnelSource.User,description:""},protocol:y.TunnelProtocol.Http,privacy:{id:y.TunnelPrivacyId.Private,themeIcon:O.privatePortIcon.id,label:t.localize(2,null)},strip:()=>{}},this.model=Ue.tunnelModel,this.onForwardedPortsChanged=u.Event.any(this.model.onForwardPort,this.model.onClosePort,this.model.onPortName,this.model.onCandidatesChanged)}get all(){const Ue=[];return this._candidates=new Map,this.model.candidates.forEach(Fe=>{this._candidates.set((0,n.makeAddress)(Fe.host,Fe.port),Fe)}),(this.model.forwarded.size>0||this.remoteExplorerService.getEditableData(void 0))&&Ue.push(...this.forwarded),this.model.detected.size>0&&Ue.push(...this.detected),Ue.push(this.input),Ue}addProcessInfoFromCandidate(Ue){const Fe=(0,n.makeAddress)(Ue.remoteHost,Ue.remotePort);this._candidates.has(Fe)&&(Ue.processDescription=this._candidates.get(Fe).detail)}get forwarded(){return Array.from(this.model.forwarded.values()).map(Fe=>{const He=oe.createFromTunnel(this.remoteExplorerService,this.tunnelService,Fe);return this.addProcessInfoFromCandidate(He),He}).sort((Fe,He)=>Fe.remotePort===He.remotePort?Fe.remoteHost<He.remoteHost?-1:1:Fe.remotePort<He.remotePort?-1:1)}get detected(){return Array.from(this.model.detected.values()).map(Ue=>{const Fe=oe.createFromTunnel(this.remoteExplorerService,this.tunnelService,Ue,n.TunnelType.Detected,!1);return this.addProcessInfoFromCandidate(Fe),Fe})}isEmpty(){return this.detected.length===0&&(this.forwarded.length===0||this.forwarded.length===1&&this.forwarded[0].tunnelType===n.TunnelType.Add&&!this.remoteExplorerService.getEditableData(void 0))}};X=we([F(0,n.IRemoteExplorerService),F(1,y.ITunnelService)],X),e.TunnelViewModel=X;function G(je){return{label:"",tunnel:je,editId:n.TunnelEditId.None,tooltip:""}}class Q{constructor(){this.label="",this.tooltip="",this.weight=1,this.minimumWidth=40,this.maximumWidth=40,this.templateId="actionbar"}project(Ue){if(Ue.tunnelType===n.TunnelType.Add)return G(Ue);const Fe=Ue.processDescription?O.forwardedPortWithProcessIcon:O.forwardedPortWithoutProcessIcon;let He="";return Ue instanceof oe&&(He=`${Ue.iconTooltip} ${Ue.tooltipPostfix}`),{label:"",icon:Fe,tunnel:Ue,editId:n.TunnelEditId.None,tooltip:He}}}class j{constructor(){this.label=t.localize(3,null),this.tooltip=t.localize(4,null),this.weight=1,this.templateId="actionbar"}project(Ue){const Fe=Ue.tunnelType===n.TunnelType.Add,He=Ue.label;let Be="";return Ue instanceof oe&&!Fe?Be=`${Ue.portTooltip} ${Ue.tooltipPostfix}`:Be=He,{label:He,tunnel:Ue,menuId:s.MenuId.TunnelPortInline,editId:Ue.tunnelType===n.TunnelType.Add?n.TunnelEditId.New:n.TunnelEditId.Label,tooltip:Be}}}class K{constructor(){this.label=t.localize(5,null),this.tooltip=t.localize(6,null),this.weight=1,this.templateId="actionbar"}project(Ue){if(Ue.tunnelType===n.TunnelType.Add)return G(Ue);const Fe=Ue.localAddress??"";let He=Fe;return Ue instanceof oe&&(He=Ue.tooltipPostfix),{label:Fe,menuId:s.MenuId.TunnelLocalAddressInline,tunnel:Ue,editId:n.TunnelEditId.LocalPort,tooltip:He,markdownTooltip:Fe?K.getHoverText(Fe):void 0}}static getHoverText(Ue){return function(Fe){const He=Fe.getValue("editor");let Be="";He.multiCursorModifier==="ctrlCmd"?B.isMacintosh?Be=t.localize(7,null):Be=t.localize(8,null):B.isMacintosh?Be=t.localize(9,null):Be=t.localize(10,null);const ze=new H.MarkdownString("",!0),nt=Ue.startsWith("http")?Ue:`http://${Ue}`;return ze.appendLink(nt,"Follow link").appendMarkdown(` (${Be})`)}}}class Y{constructor(){this.label=t.localize(11,null),this.tooltip=t.localize(12,null),this.weight=2,this.templateId="actionbar"}project(Ue){return Ue.tunnelType===n.TunnelType.Add?G(Ue):{label:Ue.processDescription??"",tunnel:Ue,editId:n.TunnelEditId.None,tooltip:Ue instanceof oe?Ue.processTooltip:""}}}class ee{constructor(){this.label=t.localize(13,null),this.tooltip=t.localize(14,null),this.weight=1,this.templateId="actionbar"}project(Ue){if(Ue.tunnelType===n.TunnelType.Add)return G(Ue);const Fe=Ue.source.description,He=`${Ue instanceof oe?Ue.originTooltip:""}. ${Ue instanceof oe?Ue.tooltipPostfix:""}`;return{label:Fe,menuId:s.MenuId.TunnelOriginInline,tunnel:Ue,editId:n.TunnelEditId.None,tooltip:He}}}class ie{constructor(){this.label=t.localize(15,null),this.tooltip=t.localize(16,null),this.weight=1,this.templateId="actionbar"}project(Ue){if(Ue.tunnelType===n.TunnelType.Add)return G(Ue);const Fe=Ue.privacy?.label;let He="";return Ue instanceof oe&&(He=`${Ue.privacy.label} ${Ue.tooltipPostfix}`),{label:Fe,tunnel:Ue,icon:{id:Ue.privacy.themeIcon},editId:n.TunnelEditId.None,tooltip:He}}}let re=class extends i.Disposable{constructor(Ue,Fe,He,Be,ze,nt,ut,ot,at){super(),this.instantiationService=Ue,this.contextKeyService=Fe,this.menuService=He,this.contextViewService=Be,this.themeService=ze,this.remoteExplorerService=nt,this.commandService=ut,this.configurationService=ot,this.hoverService=at,this.templateId="actionbar"}set actionRunner(Ue){this._actionRunner=Ue}renderTemplate(Ue){const Fe=p.append(Ue,p.$(".ports-view-actionbar-cell")),He=p.append(Fe,p.$(".ports-view-actionbar-cell-icon")),Be=new c.IconLabel(Fe,{supportHighlights:!0,hoverDelegate:{showHover:ut=>this.hoverService.showHover(ut),delay:this.configurationService.getValue("workbench.hover.delay")}}),ze=p.append(Fe,p.$(".actions")),nt=new f.ActionBar(ze,{actionViewItemProvider:d.createActionViewItem.bind(void 0,this.instantiationService)});return{label:Be,icon:He,actionBar:nt,container:Fe,elementDisposable:i.Disposable.None}}renderElement(Ue,Fe,He){He.actionBar.clear(),He.icon.className="ports-view-actionbar-cell-icon",He.icon.style.display="none",He.label.setLabel(""),He.label.element.style.display="none",He.container.style.height="22px",He.button&&(He.button.element.style.display="none",He.button.dispose()),He.container.style.paddingLeft="0px",He.elementDisposable.dispose();let Be;Ue.editId===n.TunnelEditId.New&&(Be=this.remoteExplorerService.getEditableData(void 0))?this.renderInputBox(He.container,Be):(Be=this.remoteExplorerService.getEditableData(Ue.tunnel,Ue.editId),Be?this.renderInputBox(He.container,Be):Ue.tunnel.tunnelType===n.TunnelType.Add&&Ue.menuId===s.MenuId.TunnelPortInline?this.renderButton(Ue,He):this.renderActionBarItem(Ue,He))}renderButton(Ue,Fe){Fe.container.style.paddingLeft="7px",Fe.container.style.height="28px",Fe.button=this._register(new z.Button(Fe.container)),Fe.button.label=Ue.label,Fe.button.element.title=Ue.tooltip,this._register((0,h.attachButtonStyler)(Fe.button,this.themeService)),this._register(Fe.button.onDidClick(()=>{this.commandService.executeCommand(fe.INLINE_ID)}))}tunnelContext(Ue){let Fe;return Ue instanceof oe&&(Fe=Ue.strip()),Fe||(Fe={tunnelType:Ue.tunnelType,remoteHost:Ue.remoteHost,remotePort:Ue.remotePort,localAddress:Ue.localAddress,protocol:Ue.protocol,localUri:Ue.localUri,localPort:Ue.localPort,name:Ue.name,closeable:Ue.closeable,source:Ue.source,privacy:Ue.privacy,processDescription:Ue.processDescription,label:Ue.label}),Fe}renderActionBarItem(Ue,Fe){Fe.label.element.style.display="flex",Fe.label.setLabel(Ue.label,void 0,{title:Ue.markdownTooltip?{markdown:Ue.markdownTooltip(this.configurationService),markdownNotSupportedFallback:Ue.tooltip}:Ue.tooltip,extraClasses:Ue.menuId===s.MenuId.TunnelLocalAddressInline?["ports-view-actionbar-cell-localaddress"]:void 0}),Fe.actionBar.context=this.tunnelContext(Ue.tunnel),Fe.container.style.paddingLeft="10px";const He=[["view",n.TUNNEL_VIEW_ID],[e.TunnelTypeContextKey.key,Ue.tunnel.tunnelType],[e.TunnelCloseableContextKey.key,Ue.tunnel.closeable],[se.key,Ue.tunnel.privacy.id],[Z.key,Ue.tunnel.protocol]],Be=this.contextKeyService.createOverlay(He),ze=new i.DisposableStore;if(Fe.elementDisposable=ze,Ue.menuId){const nt=ze.add(this.menuService.createMenu(Ue.menuId,Be));let ut=[];if((0,d.createAndFillInActionBarActions)(nt,{shouldForwardArgs:!0},ut),ut){const ot=ut.filter(at=>at.id.toLowerCase().indexOf("label")>=0);ot.length>1&&(ot.sort((at,wt)=>at.label.length-wt.label.length),ot.pop(),ut=ut.filter(at=>ot.indexOf(at)<0)),Fe.actionBar.push(ut,{icon:!0,label:!1}),this._actionRunner&&(Fe.actionBar.actionRunner=this._actionRunner)}}Ue.icon&&(Fe.icon.className=`ports-view-actionbar-cell-icon ${m.ThemeIcon.asClassName(Ue.icon)}`,Fe.icon.title=Ue.tooltip,Fe.icon.style.display="inline")}renderInputBox(Ue,Fe){this.inputDone&&(this.inputDone(!1,!1),this.inputDone=void 0),Ue.style.paddingLeft="5px";const He=Fe.startingValue||"",Be=new g.InputBox(Ue,this.contextViewService,{ariaLabel:t.localize(17,null),validationOptions:{validation:ot=>{const at=Fe.validationMessage(ot);return at?{content:at.content,formatContent:!0,type:at.severity===o.Severity.Error?3:1}:null}},placeholder:Fe.placeholder||""}),ze=(0,h.attachInputBoxStyler)(Be,this.themeService);Be.value=He,Be.focus(),Be.select({start:0,end:Fe.startingValue?Fe.startingValue.length:0});const nt=(0,v.once)(async(ot,at)=>{(0,i.dispose)(ut),this.inputDone&&(this.inputDone=void 0),Be.element.style.display="none";const wt=Be.value;if(at)return Fe.onFinish(wt,ot)});this.inputDone=nt;const ut=[Be,p.addStandardDisposableListener(Be.inputElement,p.EventType.KEY_DOWN,async ot=>{if(ot.equals(3))return ot.stopPropagation(),Be.validate()!==3?nt(!0,!0):nt(!1,!0);if(ot.equals(9))return ot.preventDefault(),ot.stopPropagation(),nt(!1,!0)}),p.addDisposableListener(Be.inputElement,p.EventType.BLUR,()=>nt(Be.validate()!==3,!0)),ze];return(0,i.toDisposable)(()=>{nt(!1,!1)})}disposeElement(Ue,Fe,He,Be){He.elementDisposable.dispose()}disposeTemplate(Ue){Ue.label.dispose(),Ue.actionBar.dispose(),Ue.elementDisposable.dispose(),Ue.button?.dispose()}};re=we([F(0,b.IInstantiationService),F(1,E.IContextKeyService),F(2,s.IMenuService),F(3,k.IContextViewService),F(4,m.IThemeService),F(5,n.IRemoteExplorerService),F(6,r.ICommandService),F(7,I.IConfigurationService),F(8,W.IHoverService)],re);class oe{static createFromTunnel(Ue,Fe,He,Be=n.TunnelType.Forwarded,ze){return new oe(Be,He.remoteHost,He.remotePort,He.source,!!He.hasRunningProcess,He.protocol,He.localUri,He.localAddress,He.localPort,ze===void 0?He.closeable:ze,He.name,He.runningProcess,He.pid,He.privacy,Ue,Fe)}strip(){return new oe(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)}constructor(Ue,Fe,He,Be,ze,nt,ut,ot,at,wt,It,_t,lt,pt,st,qe){this.tunnelType=Ue,this.remoteHost=Fe,this.remotePort=He,this.source=Be,this.hasRunningProcess=ze,this.protocol=nt,this.localUri=ut,this.localAddress=ot,this.localPort=at,this.closeable=wt,this.name=It,this.runningProcess=_t,this.pid=lt,this._privacy=pt,this.remoteExplorerService=st,this.tunnelService=qe}get label(){if(this.tunnelType===n.TunnelType.Add&&this.name)return this.name;const Ue=(0,y.isLocalhost)(this.remoteHost)||(0,y.isAllInterfaces)(this.remoteHost)?`${this.remotePort}`:`${this.remoteHost}:${this.remotePort}`;return this.name?`${this.name} (${Ue})`:Ue}set processDescription(Ue){this.runningProcess=Ue}get processDescription(){let Ue="";return this.runningProcess?(this.pid&&this.remoteExplorerService?.namedProcesses.has(this.pid)?Ue=this.remoteExplorerService.namedProcesses.get(this.pid):Ue=this.runningProcess.replace(/\0/g," ").trim(),this.pid&&(Ue+=` (${this.pid})`)):this.hasRunningProcess&&(Ue=t.localize(18,null)),Ue}get tooltipPostfix(){let Ue;return this.localAddress?Ue=t.localize(19,null,this.remoteHost,this.remotePort,this.localAddress):Ue=t.localize(20,null,this.remoteHost,this.remotePort),Ue}get iconTooltip(){return this.tunnelType===n.TunnelType.Add?this.label:`${this.processDescription?t.localize(21,null):t.localize(22,null)}`}get portTooltip(){return this.tunnelType===n.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(Ue=>Ue.id===this._privacy)??{id:"",themeIcon:$.Codicon.question.id,label:t.localize(24,null)}:{id:y.TunnelPrivacyId.Private,themeIcon:O.privatePortIcon.id,label:t.localize(25,null)}}}e.TunnelTypeContextKey=new E.RawContextKey("tunnelType",n.TunnelType.Add,!0),e.TunnelCloseableContextKey=new E.RawContextKey("tunnelCloseable",!1,!0);const se=new E.RawContextKey("tunnelPrivacy",void 0,!0),te=new E.RawContextKey("tunnelPrivacyEnabled",!1,!0),Z=new E.RawContextKey("tunnelProtocol",y.TunnelProtocol.Http,!0),ne=new E.RawContextKey("tunnelViewFocus",!1,t.localize(26,null)),ce="tunnelViewSelection",de=new E.RawContextKey(ce,void 0,!0),he="tunnelViewMultiSelection",pe=new E.RawContextKey(he,void 0,!0),me=new E.RawContextKey("portChangable",!1,!0),Se=new E.RawContextKey("isWeb",B.isWeb,!0);let Ie=class gl extends w.ViewPane{constructor(Ue,Fe,He,Be,ze,nt,ut,ot,at,wt,It,_t,lt,pt,st,qe,Et,Tt){super(Fe,He,Be,nt,ze,ot,ut,at,lt,st),this.viewModel=Ue,this.quickInputService=wt,this.commandService=It,this.menuService=_t,this.remoteExplorerService=pt,this.tunnelService=qe,this.contextViewService=Et,this.hoverService=Tt,this.isEditing=!1,this.titleActions=[],this.lastFocus=[],this.tunnelTypeContext=e.TunnelTypeContextKey.bindTo(ze),this.tunnelCloseableContext=e.TunnelCloseableContextKey.bindTo(ze),this.tunnelPrivacyContext=se.bindTo(ze),this.tunnelPrivacyEnabledContext=te.bindTo(ze),this.tunnelPrivacyEnabledContext.set(qe.privacyOptions.length!==0),this.tunnelProtocolContext=Z.bindTo(ze),this.tunnelViewFocusContext=ne.bindTo(ze),this.tunnelViewSelectionContext=de.bindTo(ze),this.tunnelViewMultiSelectionContext=pe.bindTo(ze),this.portChangableContextKey=me.bindTo(ze);const xt=this._register(this.contextKeyService.createOverlay([["view",gl.ID]])),At=this._register(this.menuService.createMenu(s.MenuId.TunnelTitle,xt)),Nt=()=>{this.titleActions=[],(0,d.createAndFillInActionBarActions)(At,void 0,this.titleActions),this.updateActions()};this._register(At.onDidChange(Nt)),Nt(),this._register((0,i.toDisposable)(()=>{this.titleActions=[]})),this.registerPrivacyActions()}registerPrivacyActions(){for(const Ue of this.tunnelService.privacyOptions){const Fe=`remote.tunnel.privacy${Ue.id}`;r.CommandsRegistry.registerCommand(Fe,Me.handler(Ue.id)),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelPrivacy,{order:0,command:{id:Fe,title:Ue.label,toggled:se.isEqualTo(Ue.id)}})}}get portCount(){return this.remoteExplorerService.tunnelModel.forwarded.size+this.remoteExplorerService.tunnelModel.detected.size}renderBody(Ue){super.renderBody(Ue);const Fe=p.append(Ue,p.$(".tree-explorer-viewlet-tree-view")),He=p.append(Fe,p.$(".customview-tree"));He.classList.add("ports-view"),He.classList.add("file-icon-themable-tree","show-file-icons");const Be=new re(this.instantiationService,this.contextKeyService,this.menuService,this.contextViewService,this.themeService,this.remoteExplorerService,this.commandService,this.configurationService,this.hoverService),ze=[new Q,new j,new K,new Y];this.tunnelService.canChangePrivacy&&ze.push(new ie),ze.push(new ee),this.table=this.instantiationService.createInstance(V.WorkbenchTable,"RemoteTunnels",He,new q(this.remoteExplorerService),ze,[Be],{keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:at=>at.label},multipleSelectionSupport:!0,accessibilityProvider:{getAriaLabel:at=>at instanceof oe?`${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 nt=new l.ActionRunner;Be.actionRunner=nt,this._register(this.table.onContextMenu(at=>this.onContextMenu(at,nt))),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 ut=()=>this.table.splice(0,Number.POSITIVE_INFINITY,this.viewModel.all);ut();let ot=this.portCount;this._register(u.Event.debounce(this.viewModel.onForwardedPortsChanged,(at,wt)=>wt,50)(()=>{const at=this.portCount;(ot===0||at===0)&&ot!==at&&this._onDidChangeViewWelcomeState.fire(),ot=at,ut()})),this._register(this.table.onMouseClick(at=>{if(this.hasOpenLinkModifier(at.browserEvent)){const wt=this.table.getSelectedElements();(wt.length===0||wt.length===1&&wt[0]===at.element)&&this.commandService.executeCommand(Ee.ID,at.element)}})),this._register(this.table.onDidOpen(at=>{!at.element||at.element.tunnelType!==n.TunnelType.Forwarded||at.browserEvent?.type==="dblclick"&&this.commandService.executeCommand(ge.ID)})),this._register(this.remoteExplorerService.onDidChangeEditable(at=>{this.isEditing=!!this.remoteExplorerService.getEditableData(at?.tunnel,at?.editId),this._onDidChangeViewWelcomeState.fire(),this.isEditing||He.classList.remove("highlight"),ut(),this.isEditing?(He.classList.add("highlight"),at||this.table.reveal(this.table.indexOf(this.viewModel.input))):(at&&at.tunnel.tunnelType!==n.TunnelType.Add&&this.table.setFocus(this.lastFocus),this.focus())}))}shouldShowWelcome(){return this.viewModel.isEmpty()&&!this.isEditing}focus(){super.focus(),this.table.domFocus()}onFocusChanged(Ue){Ue.indexes.length>0&&Ue.elements.length>0&&(this.lastFocus=Ue.indexes);const Fe=Ue.elements,He=Fe&&Fe.length?Fe[0]:void 0;He?(this.tunnelViewSelectionContext.set((0,n.makeAddress)(He.remoteHost,He.remotePort)),this.tunnelTypeContext.set(He.tunnelType),this.tunnelCloseableContext.set(!!He.closeable),this.tunnelPrivacyContext.set(He.privacy.id),this.tunnelProtocolContext.set((He.protocol===y.TunnelProtocol.Https,y.TunnelProtocol.Https)),this.portChangableContextKey.set(!!He.localPort)):(this.tunnelTypeContext.reset(),this.tunnelViewSelectionContext.reset(),this.tunnelCloseableContext.reset(),this.tunnelPrivacyContext.reset(),this.tunnelProtocolContext.reset(),this.portChangableContextKey.reset())}hasOpenLinkModifier(Ue){const Fe=this.configurationService.getValue("editor");let He=!1;return Fe.multiCursorModifier==="ctrlCmd"?He=Ue.altKey:B.isMacintosh?He=Ue.metaKey:He=Ue.ctrlKey,He}onSelectionChanged(Ue){const Fe=Ue.elements;Fe.length>1?this.tunnelViewMultiSelectionContext.set(Fe.map(He=>(0,n.makeAddress)(He.remoteHost,He.remotePort))):this.tunnelViewMultiSelectionContext.set(void 0)}onContextMenu(Ue,Fe){if(Ue.element!==void 0&&!(Ue.element instanceof oe))return;Ue.browserEvent.preventDefault(),Ue.browserEvent.stopPropagation();const He=Ue.element;He?(this.table.setFocus([this.table.indexOf(He)]),this.tunnelTypeContext.set(He.tunnelType),this.tunnelCloseableContext.set(!!He.closeable),this.tunnelPrivacyContext.set(He.privacy.id),this.tunnelProtocolContext.set(He.protocol),this.portChangableContextKey.set(!!He.localPort)):(this.tunnelTypeContext.set(n.TunnelType.Add),this.tunnelCloseableContext.set(!1),this.tunnelPrivacyContext.set(void 0),this.tunnelProtocolContext.set(void 0),this.portChangableContextKey.set(!1)),this.contextMenuService.showContextMenu({menuId:s.MenuId.TunnelContext,menuActionOptions:{shouldForwardArgs:!0},contextKeyService:this.table.contextKeyService,getAnchor:()=>Ue.anchor,getActionViewItem:Be=>{const ze=this.keybindingService.lookupKeybinding(Be.id);if(ze)return new M.ActionViewItem(Be,Be,{label:!0,keybinding:ze.getLabel()})},onHide:Be=>{Be&&this.table.domFocus()},getActionsContext:()=>He?.strip(),actionRunner:Fe})}onMouseDblClick(Ue){Ue.element||this.commandService.executeCommand(fe.INLINE_ID)}layoutBody(Ue,Fe){super.layoutBody(Ue,Fe),this.table.layout(Ue,Fe)}};Ie.ID=n.TUNNEL_VIEW_ID,Ie.TITLE=t.localize(27,null),Ie=we([F(2,A.IKeybindingService),F(3,k.IContextMenuService),F(4,E.IContextKeyService),F(5,I.IConfigurationService),F(6,b.IInstantiationService),F(7,R.IViewDescriptorService),F(8,S.IOpenerService),F(9,C.IQuickInputService),F(10,r.ICommandService),F(11,s.IMenuService),F(12,m.IThemeService),F(13,n.IRemoteExplorerService),F(14,L.ITelemetryService),F(15,y.ITunnelService),F(16,k.IContextViewService),F(17,W.IHoverService)],Ie),e.TunnelPanel=Ie;class ve{constructor(Ue,Fe){this.id=Ie.ID,this.name=Ie.TITLE,this.canToggleVisibility=!0,this.hideByDefault=!1,this.group="details@0",this.order=-500,this.canMoveView=!0,this.containerIcon=O.portsViewIcon,this.ctorDescriptor=new T.SyncDescriptor(Ie,[Ue]),this.remoteAuthority=Fe.remoteAuthority?Fe.remoteAuthority.split("+")[0]:void 0}}e.TunnelPanelDescriptor=ve;function be(je){return je&&je.tunnelType&&je.remoteHost&&je.source}var ge;(function(je){je.ID="remote.tunnel.label",je.LABEL=t.localize(29,null),je.COMMAND_ID_KEYWORD="label";function Ue(){return async(Fe,He)=>{const Be=Fe.get(n.IRemoteExplorerService);let ze;if(be(He))ze=He;else{const nt=Fe.get(E.IContextKeyService).getContextKeyValue(ce),ut=nt?Be.tunnelModel.forwarded.get(nt):void 0;if(ut){const ot=Fe.get(y.ITunnelService);ze=oe.createFromTunnel(Be,ot,ut)}}if(ze){const nt=ze;return new Promise(ut=>{const ot=nt.name?nt.name:`${nt.remotePort}`;Be.setEditable(nt,n.TunnelEditId.Label,{onFinish:async(at,wt)=>{at=at.trim(),Be.setEditable(nt,n.TunnelEditId.Label,null);const It=wt&&at!==ot;It&&await Be.tunnelModel.name(nt.remoteHost,nt.remotePort,at),ut(It?{port:nt.remotePort,label:at}:void 0)},validationMessage:()=>null,placeholder:t.localize(30,null),startingValue:ot})})}}}je.handler=Ue})(ge||(ge={}));const ue=t.localize(31,null),Ce=65536,De=t.localize(32,null,Ce),Ae=t.localize(33,null),Pe=t.localize(34,null);var fe;(function(je){je.INLINE_ID="remote.tunnel.forwardInline",je.COMMANDPALETTE_ID="remote.tunnel.forwardCommandPalette",je.LABEL={value:t.localize(35,null),original:"Forward a Port"},je.TREEITEM_LABEL=t.localize(36,null);const Ue=t.localize(37,null);function Fe(nt,ut,ot,at){const wt=(0,n.parseAddress)(ot);if(wt){if(wt.port>=Ce)return{content:De,severity:o.Severity.Error};if(at&&ut.isPortPrivileged(wt.port))return{content:Ae,severity:o.Severity.Info};if((0,n.mapHasAddressLocalhostOrAllInterfaces)(nt.tunnelModel.forwarded,wt.host,wt.port))return{content:Pe,severity:o.Severity.Error}}else return{content:ue,severity:o.Severity.Error};return null}function He(nt,ut,ot,at){ut||nt.warn(t.localize(38,null,ot,at))}function Be(){return async(nt,ut)=>{const ot=nt.get(n.IRemoteExplorerService),at=nt.get(o.INotificationService),wt=nt.get(y.ITunnelService);ot.setEditable(void 0,n.TunnelEditId.New,{onFinish:async(It,_t)=>{ot.setEditable(void 0,n.TunnelEditId.New,null);let lt;_t&&(lt=(0,n.parseAddress)(It))&&ot.forward({remote:{host:lt.host,port:lt.port},elevateIfNeeded:!0}).then(pt=>He(at,pt,lt.host,lt.port))},validationMessage:It=>Fe(ot,wt,It,wt.canElevate),placeholder:Ue})}}je.inlineHandler=Be;function ze(){return async(nt,ut)=>{const ot=nt.get(n.IRemoteExplorerService),at=nt.get(o.INotificationService),wt=nt.get(R.IViewsService),It=nt.get(C.IQuickInputService),_t=nt.get(y.ITunnelService);await wt.openView(Ie.ID,!0);const lt=await It.input({prompt:Ue,validateInput:st=>Promise.resolve(Fe(ot,_t,st,_t.canElevate))});let pt;lt&&(pt=(0,n.parseAddress)(lt))&&ot.forward({remote:{host:pt.host,port:pt.port},elevateIfNeeded:!0}).then(st=>He(at,st,pt.host,pt.port))}}je.commandPaletteHandler=ze})(fe=e.ForwardPortAction||(e.ForwardPortAction={}));function ye(je,Ue,Fe){const He=je.map(Be=>{const ze=oe.createFromTunnel(Ue,Fe,Be);return{label:ze.label,description:ze.processDescription,tunnel:ze}});return He.length===0&&He.push({label:t.localize(39,null,fe.LABEL.value)}),He}var ke;(function(je){je.INLINE_ID="remote.tunnel.closeInline",je.COMMANDPALETTE_ID="remote.tunnel.closeCommandPalette",je.LABEL={value:t.localize(40,null),original:"Stop Forwarding Port"};function Ue(){return async(He,Be)=>{const ze=He.get(E.IContextKeyService),nt=He.get(n.IRemoteExplorerService);let ut=[];const ot=ze.getContextKeyValue(he);if(ot)ot.forEach(at=>{const wt=nt.tunnelModel.forwarded.get(at);wt&&ut?.push(wt)});else if(be(Be))ut=[Be];else{const at=ze.getContextKeyValue(ce),wt=at?nt.tunnelModel.forwarded.get(at):void 0;wt&&(ut=[wt])}if(!(!ut||ut.length===0))return Promise.all(ut.map(at=>nt.close({host:at.remoteHost,port:at.remotePort})))}}je.inlineHandler=Ue;function Fe(){return async He=>{const Be=He.get(C.IQuickInputService),ze=He.get(n.IRemoteExplorerService),nt=He.get(y.ITunnelService),ut=He.get(r.ICommandService),ot=ye(Array.from(ze.tunnelModel.forwarded.values()).filter(wt=>wt.closeable),ze,nt),at=await Be.pick(ot,{placeHolder:t.localize(41,null)});at&&at.tunnel?await ze.close({host:at.tunnel.remoteHost,port:at.tunnel.remotePort}):at&&await ut.executeCommand(fe.COMMANDPALETTE_ID)}}je.commandPaletteHandler=Fe})(ke||(ke={}));var Ee;(function(je){je.ID="remote.tunnel.open",je.LABEL=t.localize(42,null);function Ue(){return async(He,Be)=>{let ze;if(be(Be)?ze=(0,n.makeAddress)(Be.remoteHost,Be.remotePort):Be.tunnelRemoteHost&&Be.tunnelRemotePort&&(ze=(0,n.makeAddress)(Be.tunnelRemoteHost,Be.tunnelRemotePort)),ze){const nt=He.get(n.IRemoteExplorerService).tunnelModel,ut=He.get(S.IOpenerService);return Fe(nt,ut,ze)}}}je.handler=Ue;function Fe(He,Be,ze){const nt=He.forwarded.get(ze)||He.detected.get(ze);return nt?Be.open(nt.localUri,{allowContributedOpeners:!1}):Promise.resolve()}je.run=Fe})(Ee=e.OpenPortInBrowserAction||(e.OpenPortInBrowserAction={}));var Te;(function(je){je.ID="remote.tunnel.openPreview",je.LABEL=t.localize(43,null);function Ue(){return async(He,Be)=>{let ze;if(be(Be)?ze=(0,n.makeAddress)(Be.remoteHost,Be.remotePort):Be.tunnelRemoteHost&&Be.tunnelRemotePort&&(ze=(0,n.makeAddress)(Be.tunnelRemoteHost,Be.tunnelRemotePort)),ze){const nt=He.get(n.IRemoteExplorerService).tunnelModel,ut=He.get(S.IOpenerService),ot=He.get(N.IExternalUriOpenerService);return Fe(nt,ut,ot,ze)}}}je.handler=Ue;async function Fe(He,Be,ze,nt){const ut=He.forwarded.get(nt)||He.detected.get(nt);if(ut){const ot=ut.remoteHost.includes(":")?`[${ut.remoteHost}]`:ut.remoteHost,at=D.URI.parse(`http://${ot}:${ut.remotePort}`),wt=await ze.getOpener(ut.localUri,{sourceUri:at},new P.CancellationTokenSource().token);return wt?wt.openExternalUri(ut.localUri,{sourceUri:at},new P.CancellationTokenSource().token):Be.open(ut.localUri)}return Promise.resolve()}je.run=Fe})(Te=e.OpenPortInPreviewAction||(e.OpenPortInPreviewAction={}));var _e;(function(je){je.ID="remote.tunnel.openCommandPalette",je.LABEL=t.localize(44,null);function Ue(){return async(Fe,He)=>{const Be=Fe.get(n.IRemoteExplorerService),ze=Fe.get(y.ITunnelService),nt=Be.tunnelModel,ut=Fe.get(C.IQuickInputService),ot=Fe.get(S.IOpenerService),at=Fe.get(r.ICommandService),wt=[...nt.forwarded,...nt.detected].map(_t=>{const lt=oe.createFromTunnel(Be,ze,_t[1]);return{label:lt.label,description:lt.processDescription,tunnel:lt}});wt.length===0?wt.push({label:t.localize(45,null)}):wt.push({label:t.localize(46,null)});const It=await ut.pick(wt,{placeHolder:t.localize(47,null)});if(It&&It.tunnel)return Ee.run(nt,ot,(0,n.makeAddress)(It.tunnel.remoteHost,It.tunnel.remotePort));if(It)return at.executeCommand(`${n.TUNNEL_VIEW_ID}.focus`)}}je.handler=Ue})(_e||(_e={}));var Re;(function(je){je.INLINE_ID="remote.tunnel.copyAddressInline",je.COMMANDPALETTE_ID="remote.tunnel.copyAddressCommandPalette",je.INLINE_LABEL=t.localize(48,null),je.COMMANDPALETTE_LABEL=t.localize(49,null);async function Ue(Be,ze,nt){const ut=Be.tunnelModel.address(nt.remoteHost,nt.remotePort);ut&&await ze.writeText(ut.toString())}function Fe(){return async(Be,ze)=>{const nt=Be.get(n.IRemoteExplorerService);let ut;if(be(ze))ut=ze;else{const ot=Be.get(E.IContextKeyService).getContextKeyValue(ce);ut=ot?nt.tunnelModel.forwarded.get(ot):void 0}if(ut)return Ue(nt,Be.get(a.IClipboardService),ut)}}je.inlineHandler=Fe;function He(){return async(Be,ze)=>{const nt=Be.get(C.IQuickInputService),ut=Be.get(n.IRemoteExplorerService),ot=Be.get(y.ITunnelService),at=Be.get(r.ICommandService),wt=Be.get(a.IClipboardService),It=Array.from(ut.tunnelModel.forwarded.values()).concat(Array.from(ut.tunnelModel.detected.values())),_t=await nt.pick(ye(It,ut,ot),{placeHolder:t.localize(50,null)});_t&&_t.tunnel?await Ue(ut,wt,_t.tunnel):_t&&await at.executeCommand(fe.COMMANDPALETTE_ID)}}je.commandPaletteHandler=He})(Re||(Re={}));var Le;(function(je){je.ID="remote.tunnel.changeLocalPort",je.LABEL=t.localize(51,null);function Ue(He,Be,ze){if(Be.match(/^[0-9]+$/)){if(Number(Be)>=Ce)return{content:De,severity:o.Severity.Error};if(ze&&He.isPortPrivileged(Number(Be)))return{content:Ae,severity:o.Severity.Info}}else return{content:ue,severity:o.Severity.Error};return null}function Fe(){return async(He,Be)=>{const ze=He.get(n.IRemoteExplorerService),nt=He.get(o.INotificationService),ut=He.get(y.ITunnelService);let ot;if(be(Be))ot=Be;else{const at=He.get(E.IContextKeyService).getContextKeyValue(ce),wt=at?ze.tunnelModel.forwarded.get(at):void 0;if(wt){const It=He.get(y.ITunnelService);ot=oe.createFromTunnel(ze,It,wt)}}if(ot){const at=ot;ze.setEditable(at,n.TunnelEditId.LocalPort,{onFinish:async(wt,It)=>{if(ze.setEditable(at,n.TunnelEditId.LocalPort,null),It){await ze.close({host:at.remoteHost,port:at.remotePort});const _t=Number(wt),lt=await ze.forward({remote:{host:at.remoteHost,port:at.remotePort},local:_t,name:at.name,elevateIfNeeded:!0,source:at.source});lt&<.tunnelLocalPort!==_t&&nt.warn(t.localize(52,null,wt,lt.tunnelLocalPort??lt.localAddress))}},validationMessage:wt=>Ue(ut,wt,ut.canElevate),placeholder:t.localize(53,null)})}}}je.handler=Fe})(Le||(Le={}));var Me;(function(je){function Ue(Fe){return async(He,Be)=>{if(be(Be)){const ze=He.get(n.IRemoteExplorerService);return await ze.close({host:Be.remoteHost,port:Be.remotePort}),ze.forward({remote:{host:Be.remoteHost,port:Be.remotePort},local:Be.localPort,name:Be.name,elevateIfNeeded:!0,privacy:Fe,source:Be.source})}}}je.handler=Ue})(Me||(Me={}));var Oe;(function(je){je.ID_HTTP="remote.tunnel.setProtocolHttp",je.ID_HTTPS="remote.tunnel.setProtocolHttps",je.LABEL_HTTP=t.localize(54,null),je.LABEL_HTTPS=t.localize(55,null);async function Ue(Be,ze,nt){if(be(Be)){const ut={protocol:ze};return nt.tunnelModel.configPortsAttributes.addAttributes(Be.remotePort,ut,4)}}function Fe(){return async(Be,ze)=>Ue(ze,y.TunnelProtocol.Http,Be.get(n.IRemoteExplorerService))}je.handlerHttp=Fe;function He(){return async(Be,ze)=>Ue(ze,y.TunnelProtocol.Https,Be.get(n.IRemoteExplorerService))}je.handlerHttps=He})(Oe||(Oe={}));const Ke=10,We=e.TunnelTypeContextKey.isEqualTo(n.TunnelType.Forwarded),Xe=E.ContextKeyExpr.or(We,e.TunnelTypeContextKey.isEqualTo(n.TunnelType.Detected)),Je=pe.isEqualTo(void 0),rt=E.ContextKeyExpr.and(se.notEqualsTo(y.TunnelPrivacyId.Private),se.notEqualsTo(y.TunnelPrivacyId.ConstantPrivate));_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:ge.ID,weight:200+Ke,when:E.ContextKeyExpr.and(ne,We,Je),primary:60,mac:{primary:3},handler:ge.handler()}),r.CommandsRegistry.registerCommand(fe.INLINE_ID,fe.inlineHandler()),r.CommandsRegistry.registerCommand(fe.COMMANDPALETTE_ID,fe.commandPaletteHandler()),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:ke.INLINE_ID,weight:200+Ke,when:E.ContextKeyExpr.and(e.TunnelCloseableContextKey,ne),primary:20,mac:{primary:2049,secondary:[20]},handler:ke.inlineHandler()}),r.CommandsRegistry.registerCommand(ke.COMMANDPALETTE_ID,ke.commandPaletteHandler()),r.CommandsRegistry.registerCommand(Ee.ID,Ee.handler()),r.CommandsRegistry.registerCommand(Te.ID,Te.handler()),r.CommandsRegistry.registerCommand(_e.ID,_e.handler()),_.KeybindingsRegistry.registerCommandAndKeybindingRule({id:Re.INLINE_ID,weight:200+Ke,when:E.ContextKeyExpr.and(ne,Xe,Je),primary:2081,handler:Re.inlineHandler()}),r.CommandsRegistry.registerCommand(Re.COMMANDPALETTE_ID,Re.commandPaletteHandler()),r.CommandsRegistry.registerCommand(Le.ID,Le.handler()),r.CommandsRegistry.registerCommand(Oe.ID_HTTP,Oe.handlerHttp()),r.CommandsRegistry.registerCommand(Oe.ID_HTTPS,Oe.handlerHttps()),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:ke.COMMANDPALETTE_ID,title:ke.LABEL},when:e.forwardedPortsViewEnabled}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:fe.COMMANDPALETTE_ID,title:fe.LABEL},when:e.forwardedPortsViewEnabled}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:Re.COMMANDPALETTE_ID,title:Re.COMMANDPALETTE_LABEL},when:e.forwardedPortsViewEnabled}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:_e.ID,title:_e.LABEL},when:e.forwardedPortsViewEnabled}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"._open",order:0,command:{id:Ee.ID,title:Ee.LABEL},when:E.ContextKeyExpr.and(Xe,Je)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"._open",order:1,command:{id:Te.ID,title:Te.LABEL},when:E.ContextKeyExpr.and(E.ContextKeyExpr.or(Se.negate(),rt,e.openPreviewEnabledContext),Xe,Je)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"0_manage",order:1,command:{id:ge.ID,title:ge.LABEL,icon:O.labelPortIcon},when:E.ContextKeyExpr.and(We,Je)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"2_localaddress",order:0,command:{id:Re.INLINE_ID,title:Re.INLINE_LABEL},when:E.ContextKeyExpr.and(Xe,Je)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"2_localaddress",order:1,command:{id:Le.ID,title:Le.LABEL},when:E.ContextKeyExpr.and(We,me,Je)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"2_localaddress",order:2,submenu:s.MenuId.TunnelPrivacy,title:t.localize(56,null),when:E.ContextKeyExpr.and(We,te)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"2_localaddress",order:3,submenu:s.MenuId.TunnelProtocol,title:t.localize(57,null),when:E.ContextKeyExpr.and(We,Je)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"3_forward",order:0,command:{id:ke.INLINE_ID,title:ke.LABEL},when:e.TunnelCloseableContextKey}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelContext,{group:"3_forward",order:1,command:{id:fe.INLINE_ID,title:fe.LABEL}}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelProtocol,{order:0,command:{id:Oe.ID_HTTP,title:Oe.LABEL_HTTP,toggled:Z.isEqualTo(y.TunnelProtocol.Http)}}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelProtocol,{order:1,command:{id:Oe.ID_HTTPS,title:Oe.LABEL_HTTPS,toggled:Z.isEqualTo(y.TunnelProtocol.Https)}}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelPortInline,{group:"0_manage",order:0,command:{id:fe.INLINE_ID,title:fe.TREEITEM_LABEL,icon:O.forwardPortIcon},when:e.TunnelTypeContextKey.isEqualTo(n.TunnelType.Candidate)}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelPortInline,{group:"0_manage",order:4,command:{id:ge.ID,title:ge.LABEL,icon:O.labelPortIcon},when:We}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelPortInline,{group:"0_manage",order:5,command:{id:ke.INLINE_ID,title:ke.LABEL,icon:O.stopForwardIcon},when:e.TunnelCloseableContextKey}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelLocalAddressInline,{order:-1,command:{id:Re.INLINE_ID,title:Re.INLINE_LABEL,icon:O.copyAddressIcon},when:Xe}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelLocalAddressInline,{order:0,command:{id:Ee.ID,title:Ee.LABEL,icon:O.openBrowserIcon},when:Xe}),s.MenuRegistry.appendMenuItem(s.MenuId.TunnelLocalAddressInline,{order:1,command:{id:Te.ID,title:Te.LABEL,icon:O.openPreviewIcon},when:E.ContextKeyExpr.and(E.ContextKeyExpr.or(Se.negate(),rt,e.openPreviewEnabledContext),Xe)}),e.portWithRunningProcessForeground=(0,x.registerColor)("ports.iconRunningProcessForeground",{light:U.STATUS_BAR_HOST_NAME_BACKGROUND,dark:U.STATUS_BAR_HOST_NAME_BACKGROUND,hcDark:U.STATUS_BAR_HOST_NAME_BACKGROUND,hcLight:U.STATUS_BAR_HOST_NAME_BACKGROUND},t.localize(58,null)),(0,m.registerThemingParticipant)((je,Ue)=>{const Fe=je.getColor(e.portWithRunningProcessForeground);Fe&&Ue.addRule(`.monaco-workbench ${m.ThemeIcon.asCSSSelector(O.forwardedPortWithProcessIcon)} { color: ${Fe} ; }`)})}),define(ae[2723],le([1,0,21,2,22,796]),function(J,e,t,p,R,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,b,S){const C=I.getConnection();if(!C)return p.Disposable.None;const r=new p.DisposableStore,u=(async()=>{try{const i=await I.getRawEnvironment();i?b.registerProvider(R.Schemas.vscodeRemote,r.add(new k(i,C))):S.error("Cannot register remote filesystem provider. Remote environment doesnot exist.")}catch(i){S.error("Cannot register remote filesystem provider. Error while fetching remote environment.",(0,t.getErrorMessage)(i))}})();return r.add(b.onWillActivateFileSystemProvider(i=>{i.scheme===R.Schemas.vscodeRemote&&i.join(u)})),r}constructor(I,b){super(b.getChannel(e.REMOTE_FILE_SYSTEM_CHANNEL_NAME),{pathCaseSensitive:I.os===3})}}e.RemoteFileSystemProviderClient=k}),define(ae[2724],le([1,0,2036,104,148,46,2119,2697,505,25,51,26,17,44,27,89,9,41]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteAgentService=void 0;let s=class extends E.AbstractRemoteAgentService{constructor(o,g,h,v,m){super(new k.BrowserSocketFactory(null),o,g,h,v,m)}};s=we([F(0,S.IWorkbenchEnvironmentService),F(1,A.IProductService),F(2,R.IRemoteAuthorityResolverService),F(3,I.ISignService),F(4,b.ILogService)],s),e.RemoteAgentService=s;let d=class{constructor(o,g,h,v,m,w,D){this._remoteAgentService=o,this._remoteAuthorityResolverService=w,this._remoteAgentService.getRawEnvironment().then(void 0,y=>{if(!R.RemoteAuthorityResolverError.isHandled(y)){const T=[{label:t.localize(0,null),run:()=>m.openDevTools()}],_=this._getTroubleshootingURL();_&&T.push({label:t.localize(1,null),run:()=>D.open(_,{openExternal:!0})}),g.prompt(C.Severity.Error,t.localize(2,null,y?y.message:""),T)}})}_getTroubleshootingURL(){const o=this._remoteAgentService.getConnection();if(!o)return null;const g=this._remoteAuthorityResolverService.getConnectionData(o.remoteAuthority);return g?c.URI.from({scheme:"http",authority:`${g.host}:${g.port}`,path:"/version"}):null}};d=we([F(0,p.IRemoteAgentService),F(1,C.INotificationService),F(2,S.IWorkbenchEnvironmentService),F(3,i.ITelemetryService),F(4,f.INativeHostService),F(5,R.IRemoteAuthorityResolverService),F(6,l.IOpenerService)],d),r.Registry.as(u.Extensions.Workbench).registerWorkbenchContribution(d,2)}),define(ae[2725],le([1,0,8,25,2125,35,172,89]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeRequestService=void 0;let I=class extends R.RequestService{constructor(S,C,r){super(S,C),this.nativeHostService=r}async resolveProxy(S){return this.nativeHostService.resolveProxy(S)}};I=we([F(0,t.IConfigurationService),F(1,p.ILogService),F(2,E.INativeHostService)],I),e.NativeRequestService=I,(0,A.registerSingleton)(k.IRequestService,I,1)}),define(ae[2726],le([1,0,144]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IgnoreFile=void 0;class p{constructor(A,k,E){if(this.location=k,this.parent=E,k[k.length-1]==="\\")throw Error("Unexpected path format, do not use trailing backslashes");k[k.length-1]!=="/"&&(k+="/"),this.isPathIgnored=this.parseIgnoreFile(A,this.location,this.parent)}updateContents(A){this.isPathIgnored=this.parseIgnoreFile(A,this.location,this.parent)}isPathIncludedInTraversal(A,k){if(A[0]!=="/"||A[A.length-1]==="/")throw Error("Unexpected path format, expectred to begin with slash and end without. got:"+A);return!this.isPathIgnored(A,k)}isArbitraryPathIgnored(A,k){if(A[0]!=="/"||A[A.length-1]==="/")throw Error("Unexpected path format, expectred to begin with slash and end without. got:"+A);const E=A.split("/").filter(S=>S);let I=!1,b="";for(let S=0;S<E.length;S++){const C=S===E.length-1,r=E[S];if(b=b+"/"+r,!this.isPathIncludedInTraversal(b,C?k:!0)){I=!0;break}}return I}gitignoreLinesToExpression(A,k,E){const I=A.map(S=>this.gitignoreLineToGlob(S,k)),b=Object.create(null);for(const S of I)b[S]=!0;return t.parse(b,{trimForExclusions:E})}parseIgnoreFile(A,k,E){const I=A.split(` `).map(d=>d.trim()).filter(d=>d&&d[0]!=="#"),b=I.filter(d=>!d.endsWith("/")),S=b.filter(d=>!d.includes("!")),C=this.gitignoreLinesToExpression(S,k,!0),r=b.filter(d=>d.includes("!")).map(d=>d.replace(/!/g,"")),u=this.gitignoreLinesToExpression(r,k,!1),i=I.filter(d=>!d.includes("!")),f=this.gitignoreLinesToExpression(i,k,!0),c=I.filter(d=>d.includes("!")).map(d=>d.replace(/!/g,"")),l=this.gitignoreLinesToExpression(c,k,!1);return(d,n)=>d.startsWith(k)?n&&f(d)&&!l(d)||C(d)&&!u(d)?!0:E?E.isPathIgnored(d,n):!1:!1}gitignoreLineToGlob(A,k){const E=A.indexOf("/");return E===-1||E===A.length-1?A="**/"+A:(E===0?k.slice(-1)==="/"&&(A=A.slice(1)):k.slice(-1)!=="/"&&(A="/"+A),A=k+A),A}}e.IgnoreFile=p}),define(ae[2727],le([1,0,28,746]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplacePattern=void 0;class R{constructor(k,E,I){this._hasParameters=!1,this._replacePattern=k;let b,S;typeof E=="boolean"?(S=E,this._regExp=I):(b=E,S=!!b.isRegExp,this._regExp=t.createRegExp(b.pattern,!!b.isRegExp,{matchCase:b.isCaseSensitive,wholeWord:b.isWordMatch,multiline:b.isMultiline,global:!1,unicode:!0})),S&&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,E){this._regExp.lastIndex=0;const I=this._regExp.exec(k);if(I){if(this.hasParameters){const b=this.replaceWithCaseOperations(k,this._regExp,this.buildReplaceString(I,E));return I[0]===k?b:b.substr(I.index,I[0].length-(k.length-b.length))}return this.buildReplaceString(I,E)}return null}replaceWithCaseOperations(k,E,I){if(!/\\[uUlL]/.test(I))return k.replace(E,I);const b=E.exec(k);if(b===null)return k.replace(E,I);let S,C="",r=0,u="";for(;(S=this._caseOpsRegExp.exec(I))!==null;){r=S.index;const i=S[0];u=i;let f=S[2];const c=S[3];if(!f){C+=i;continue}const l=b[parseInt(c.slice(1))];if(!l){C+=i;continue}const s=l.length;C+=S[1],f=f.replace(/\\/g,"");let d=0;for(;d<f.length;d++)switch(f[d]){case"U":C+=l.slice(d).toUpperCase(),d=s;break;case"u":C+=l[d].toUpperCase();break;case"L":C+=l.slice(d).toLowerCase(),d=s;break;case"l":C+=l[d].toLowerCase();break}d<s&&(C+=l.slice(d)),C+=S[4]}return C+=I.slice(r+u.length),k.replace(E,C)}buildReplaceString(k,E){return E?(0,p.buildReplaceStringWithCasePreserved)(k,this._replacePattern):this._replacePattern}parseReplaceString(k){if(!k||k.length===0)return;let E=0,I="";for(let b=0,S=k.length;b<S;b++){const C=k.charCodeAt(b);if(C===92){if(b++,b>=S)break;const r=k.charCodeAt(b);let u=null;switch(r){case 92:u="\\";break;case 110:u=` `;break;case 116:u=" ";break}u&&(I+=k.substring(E,b-1)+u,E=b+1)}if(C===36){if(b++,b>=S)break;const r=k.charCodeAt(b);let u=null;switch(r){case 48:u="$&",this._hasParameters=!0;break;case 96:case 39:this._hasParameters=!0;break;default:{if(!this.between(r,49,57))break;if(b===k.length-1){this._hasParameters=!0;break}let i=k.charCodeAt(++b);if(!this.between(i,48,57)){this._hasParameters=!0,--b;break}if(b===k.length-1){this._hasParameters=!0;break}if(i=k.charCodeAt(++b),!this.between(i,48,57)){this._hasParameters=!0,--b;break}break}}u&&(I+=k.substring(E,b-1)+u,E=b+1)}}E!==0&&(this._replacePattern=I+k.substring(E))}between(k,E,I){return E<=k&&k<=I}}e.ReplacePattern=R}),define(ae[957],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextSearchCompleteMessageType=e.Range=e.Position=void 0;class t{constructor(k,E){this.line=k,this.character=E}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,E){return new t(0,0)}with(k){return new t(0,0)}}e.Position=t;class p{constructor(k,E,I,b){this.isEmpty=!1,this.isSingleLine=!1,this.start=new t(k,E),this.end=new t(I,b)}contains(k){return!1}isEqual(k){return!1}intersection(k){}union(k){return new p(0,0,0,0)}with(k){return new p(0,0,0,0)}}e.Range=p;var R;(function(A){A[A.Information=1]="Information",A[A.Warning=2]="Warning"})(R=e.TextSearchCompleteMessageType||(e.TextSearchCompleteMessageType={}))}),define(ae[958],le([1,0,1844,10,323,68,432,957,22,254,9]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderSearchMessage=void 0;const C=(r,u,i,f,c,l,s)=>{const d=p.$("div.providerMessage"),n=(0,R.parseLinkedText)(r.text);p.append(d,p.$("."+k.SeverityIcon.className(r.type===E.TextSearchCompleteMessageType.Information?A.default.Info:A.default.Warning).split(" ").join(".")));for(const a of n.nodes)if(typeof a=="string")p.append(d,document.createTextNode(a));else{const o=u.createInstance(b.Link,d,a,{opener:async g=>{if(!r.trusted)return;const h=S.URI.parse(g,!0);h.scheme===I.Schemas.command&&r.trusted?(await c.executeCommand(h.path))?.triggerSearch&&s():h.scheme===I.Schemas.https?f.open(h):h.scheme===I.Schemas.command&&!r.trusted?i.error(t.localize(0,null,g)):i.error(t.localize(1,null,g))}});l.add(o)}return d};e.renderSearchMessage=C}),define(ae[203],le([1,0,16,144,52,164,28,5,53,21,957,11]),function(J,e,t,p,R,A,k,E,I,b,S,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.ViewMode=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 S.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 r="\u27EA ",u=" characters skipped \u27EB",i=(r.length+u.length+5)*2;e.ISearchService=(0,E.createDecorator)("searchService");var f;(function(q){q[q.file=0]="file",q[q.text=1]="text"})(f=e.SearchProviderType||(e.SearchProviderType={}));var c;(function(q){q[q.File=1]="File",q[q.Text=2]="Text"})(c=e.QueryType||(e.QueryType={}));function l(q){return!!q.preview}e.resultIsMatch=l;function s(q){return!!q.resource}e.isFileMatch=s;function d(q){return!!q.message}e.isProgressMessage=d;var n;(function(q){q[q.Normal=0]="Normal",q[q.NewSearchStarted=1]="NewSearchStarted"})(n=e.SearchCompletionExitCode||(e.SearchCompletionExitCode={}));class a{constructor(X){this.resource=X,this.results=[]}}e.FileMatch=a;class o{constructor(X,G,Q){this.ranges=G;const j=Array.isArray(G)?G:[G];if(Q&&Q.matchLines===1&&g(j)){X=(0,k.getNLines)(X,Q.matchLines);let K="",Y=0,ee=0;const ie=Math.floor(Q.charsPerLine/5),re=[];for(const oe of j){const se=Math.max(oe.startColumn-ie,0),te=oe.startColumn+Q.charsPerLine;if(se>ee+ie+i){const Z=r+(se-ee)+u;K+=Z+X.slice(se,te),Y+=se-(ee+Z.length)}else K+=X.slice(ee,te);re.push(new v(0,oe.startColumn-Y,oe.endColumn-Y)),ee=te}this.preview={text:K,matches:Array.isArray(this.ranges)?re:re[0]}}else{const K=Array.isArray(G)?G[0].startLineNumber:G.startLineNumber;this.preview={text:X,matches:(0,t.mapArrayOrNot)(G,Y=>new h(Y.startLineNumber-K,Y.startColumn,Y.endLineNumber-K,Y.endColumn))}}}}e.TextSearchMatch=o;function g(q){const X=q[0].startLineNumber;for(const G of q)if(G.startLineNumber!==X||G.endLineNumber!==X)return!1;return!0}class h{constructor(X,G,Q,j){this.startLineNumber=X,this.startColumn=G,this.endLineNumber=Q,this.endColumn=j}}e.SearchRange=h;class v extends h{constructor(X,G,Q){super(X,G,X,Q)}}e.OneLineRange=v;var m;(function(q){q.List="list",q.Tree="tree"})(m=e.ViewMode||(e.ViewMode={}));var w;(function(q){q.Default="default",q.FileNames="fileNames",q.Type="type",q.Modified="modified",q.CountDescending="countDescending",q.CountAscending="countAscending"})(w=e.SearchSortOrder||(e.SearchSortOrder={}));function D(q,X=!0){const G=q&&q.files&&q.files.exclude,Q=X&&q&&q.search&&q.search.exclude;if(!G&&!Q)return;if(!G||!Q)return G||Q;let j=Object.create(null);return j=R.mixin(j,R.deepClone(G)),j=R.mixin(j,R.deepClone(Q),!0),j}e.getExcludes=D;function y(q,X){return q.excludePattern&&p.match(q.excludePattern,X)?!1:q.includePattern||q.usingSearchPaths?q.includePattern&&p.match(q.includePattern,X)?!0:q.usingSearchPaths?!!q.folderQueries&&q.folderQueries.some(G=>{const Q=G.folder.fsPath;if(A.isEqualOrParent(X,Q)){const j=I.relative(Q,X);return!G.includePattern||!!p.match(G.includePattern,j)}else return!1}):!1:!0}e.pathIncludedInQuery=y;var T;(function(q){q[q.unknownEncoding=1]="unknownEncoding",q[q.regexParseError=2]="regexParseError",q[q.globParseError=3]="globParseError",q[q.invalidLiteral=4]="invalidLiteral",q[q.rgProcessError=5]="rgProcessError",q[q.other=6]="other",q[q.canceled=7]="canceled"})(T=e.SearchErrorCode||(e.SearchErrorCode={}));class _ extends Error{constructor(X,G){super(X),this.code=G}}e.SearchError=_;function L(q){const X=q.message;if((0,b.isCancellationError)(q))return new _(X,T.canceled);try{const G=JSON.parse(X);return new _(G.message,G.code)}catch{return new _(X,T.other)}}e.deserializeSearchError=L;function M(q){const X={message:q.message,code:q.code};return new Error(JSON.stringify(X))}e.serializeSearchError=M;function O(q){return q.type==="error"?!0:q.type==="success"}e.isSerializedSearchComplete=O;function N(q){return q.type==="success"}e.isSerializedSearchSuccess=N;function P(q){return!!q.path}e.isSerializedFileMatch=P;function B(q,X){const G=q.searchPath?q.searchPath:q.relativePath;return(0,k.fuzzyContains)(G,X)}e.isFilePatternMatch=B;class V{constructor(X){this.path=X,this.results=[]}addMatch(X){this.results.push(X)}serialize(){return{path:this.path,results:this.results,numMatches:this.results.length}}}e.SerializableFileMatch=V;function z(q,X){const G={...q||{},...X||{}};return Object.keys(G).filter(Q=>{const j=G[Q];return typeof j=="boolean"&&j})}e.resolvePatternsForProvider=z;class x{constructor(X,G){this._parsedIncludeExpression=null,this._excludeExpression={...X.excludePattern||{},...G.excludePattern||{}},this._parsedExcludeExpression=p.parse(this._excludeExpression);let Q=X.includePattern;G.includePattern&&(Q?Q={...Q,...G.includePattern}:Q=G.includePattern),Q&&(this._parsedIncludeExpression=p.parse(Q))}matchesExcludesSync(X,G,Q){return!!(this._parsedExcludeExpression&&this._parsedExcludeExpression(X,G,Q))}includedInQuerySync(X,G,Q){return!(this._parsedExcludeExpression&&this._parsedExcludeExpression(X,G,Q)||this._parsedIncludeExpression&&!this._parsedIncludeExpression(X,G,Q))}includedInQuery(X,G,Q){const j=this._parsedExcludeExpression(X,G,Q),K=()=>this._parsedIncludeExpression?!!this._parsedIncludeExpression(X,G,Q):!0;return(0,C.isThenable)(j)?j.then(Y=>Y?!1:K()):K()}hasSiblingExcludeClauses(){return H(this._excludeExpression)}}e.QueryGlobTester=x;function H(q){for(const X in q)if(typeof q[X]!="boolean")return!0;return!1}function W(q){if(!q)return;let X;return G=>(X||(X=(q()||Promise.resolve([])).then(Q=>Q?$(Q):{})),X.then(Q=>!!Q[G]))}e.hasSiblingPromiseFn=W;function U(q){if(!q)return;let X;return G=>{if(!X){const Q=q();X=Q?$(Q):{}}return!!X[G]}}e.hasSiblingFn=U;function $(q){const X={};for(const G of q)X[G]=!0;return X}}),define(ae[2728],le([1,0,32,2,9,8,27,77,203,67]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadSearch=void 0;let S=class{constructor(i,f,c,l){this._searchService=f,this._telemetryService=c,this._searchProvider=new Map,this._proxy=i.getProxy(b.ExtHostContext.ExtHostSearch),this._proxy.$enableExtensionHostSearch()}dispose(){this._searchProvider.forEach(i=>i.dispose()),this._searchProvider.clear()}$registerTextSearchProvider(i,f){this._searchProvider.set(i,new r(this._searchService,1,f,i,this._proxy))}$registerFileSearchProvider(i,f){this._searchProvider.set(i,new r(this._searchService,0,f,i,this._proxy))}$unregisterProvider(i){(0,p.dispose)(this._searchProvider.get(i)),this._searchProvider.delete(i)}$handleFileMatch(i,f,c){const l=this._searchProvider.get(i);if(!l)throw new Error("Got result for unknown provider");l.handleFindMatch(f,c)}$handleTextMatch(i,f,c){const l=this._searchProvider.get(i);if(!l)throw new Error("Got result for unknown provider");l.handleFindMatch(f,c)}$handleTelemetry(i,f){this._telemetryService.publicLog(i,f)}};S=we([(0,E.extHostNamedCustomer)(b.MainContext.MainThreadSearch),F(1,I.ISearchService),F(2,k.ITelemetryService),F(3,A.IConfigurationService)],S),e.MainThreadSearch=S;class C{constructor(i,f=++C._idPool,c=new Map){this.progress=i,this.id=f,this.matches=c}addMatch(i){const f=this.matches.get(i.resource.toString());f?f.results&&i.results&&f.results.push(...i.results):this.matches.set(i.resource.toString(),i),this.progress?.(i)}}C._idPool=0;class r{constructor(i,f,c,l,s){this._scheme=c,this._handle=l,this._proxy=s,this._registrations=new p.DisposableStore,this._searches=new Map,this._registrations.add(i.registerSearchResultProvider(this._scheme,f,this))}dispose(){this._registrations.dispose()}fileSearch(i,f=t.CancellationToken.None){return this.doSearch(i,void 0,f)}textSearch(i,f,c=t.CancellationToken.None){return this.doSearch(i,f,c)}doSearch(i,f,c=t.CancellationToken.None){if(!i.folderQueries.length)throw new Error("Empty folderQueries");const l=new C(f);this._searches.set(l.id,l);const s=i.type===1?this._proxy.$provideFileSearchResults(this._handle,l.id,i,c):this._proxy.$provideTextSearchResults(this._handle,l.id,i,c);return Promise.resolve(s).then(d=>(this._searches.delete(l.id),{results:Array.from(l.matches.values()),stats:d.stats,limitHit:d.limitHit,messages:d.messages}),d=>(this._searches.delete(l.id),Promise.reject(d)))}clearCache(i){return Promise.resolve(this._proxy.$clearCache(i))}handleFindMatch(i,f){const c=this._searches.get(i);!c||f.forEach(l=>{l.results?c.addMatch({resource:R.URI.revive(l.resource),results:l.results}):c.addMatch({resource:R.URI.revive(l)})})}}}),define(ae[2729],le([1,0,2021,9,43,24,191,19,34,2,23,6,8,58,203,5,83,7,16,35,10,200,22,21,11,851,107,57,69,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorNavigationStack=e.HistoryService=void 0;let T=class _i extends b.Disposable{constructor(B,V,z,x,H,W,U,$,q,X){super(),this.editorService=B,this.editorGroupService=V,this.contextService=z,this.storageService=x,this.configurationService=H,this.fileService=W,this.workspacesService=U,this.instantiationService=$,this.layoutService=q,this.contextKeyService=X,this.activeEditorListeners=this._register(new b.DisposableStore),this.lastActiveEditor=void 0,this.editorHelper=this.instantiationService.createInstance(N),this.canNavigateBackContextKey=new l.RawContextKey("canNavigateBack",!1,(0,t.localize)(0,null)).bindTo(this.contextKeyService),this.canNavigateForwardContextKey=new l.RawContextKey("canNavigateForward",!1,(0,t.localize)(1,null)).bindTo(this.contextKeyService),this.canNavigateBackInNavigationsContextKey=new l.RawContextKey("canNavigateBackInNavigationLocations",!1,(0,t.localize)(2,null)).bindTo(this.contextKeyService),this.canNavigateForwardInNavigationsContextKey=new l.RawContextKey("canNavigateForwardInNavigationLocations",!1,(0,t.localize)(3,null)).bindTo(this.contextKeyService),this.canNavigateToLastNavigationLocationContextKey=new l.RawContextKey("canNavigateToLastNavigationLocation",!1,(0,t.localize)(4,null)).bindTo(this.contextKeyService),this.canNavigateBackInEditsContextKey=new l.RawContextKey("canNavigateBackInEditLocations",!1,(0,t.localize)(5,null)).bindTo(this.contextKeyService),this.canNavigateForwardInEditsContextKey=new l.RawContextKey("canNavigateForwardInEditLocations",!1,(0,t.localize)(6,null)).bindTo(this.contextKeyService),this.canNavigateToLastEditLocationContextKey=new l.RawContextKey("canNavigateToLastEditLocation",!1,(0,t.localize)(7,null)).bindTo(this.contextKeyService),this.canReopenClosedEditorContextKey=new l.RawContextKey("canReopenClosedEditor",!1,(0,t.localize)(8,null)).bindTo(this.contextKeyService),this._onDidChangeEditorNavigationStack=this._register(new C.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 h.IdleValue(()=>{const G=this._register(this.instantiationService.createInstance(v.ResourceGlobMatcher,Q=>(0,i.getExcludes)(Q?this.configurationService.getValue({resource:Q}):this.configurationService.getValue())||Object.create(null),Q=>Q.affectsConfiguration(E.FILES_EXCLUDE_CONFIG)||Q.affectsConfiguration(i.SEARCH_EXCLUDE_CONFIG)));return this._register(G.onExpressionChange(()=>this.removeExcludedFromHistory())),G})),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 b.DisposableStore),V=()=>{B.clear(),this.configurationService.getValue(_i.MOUSE_NAVIGATION_SETTING)&&B.add((0,n.addDisposableListener)(this.layoutService.container,n.EventType.MOUSE_DOWN,z=>this.onMouseDown(z)))};this._register(this.configurationService.onDidChangeConfiguration(z=>{z.affectsConfiguration(_i.MOUSE_NAVIGATION_SETTING)&&V()})),V()}onMouseDown(B){switch(B.button){case 3:n.EventHelper.stop(B),this.goBack();break;case 4:n.EventHelper.stop(B),this.goForward();break}}onDidRemoveGroup(B){this.handleEditorGroupRemoveInNavigationStacks(B)}onDidActiveEditorChange(){const B=this.editorGroupService.activeGroup,V=B.activeEditorPane;this.lastActiveEditor&&this.editorHelper.matchesEditorIdentifier(this.lastActiveEditor,V)||(this.lastActiveEditor=V?.input&&V.group?{editor:V.input,groupId:V.group.id}:void 0,this.activeEditorListeners.clear(),this.handleActiveEditorChange(B,V),(0,R.isEditorPaneWithSelection)(V)&&this.activeEditorListeners.add(V.onDidChangeSelection(z=>this.handleActiveEditorSelectionChangeEvent(B,V,z))),this.updateContextKeys())}onDidFilesChange(B){B instanceof E.FileChangesEvent?B.gotDeleted()&&this.remove(B):B.isOperation(1)?this.remove(B):B.isOperation(2)&&B.target.isFile&&this.move(B)}handleActiveEditorChange(B,V){this.handleActiveEditorChangeInHistory(V),this.handleActiveEditorChangeInNavigationStacks(B,V)}handleActiveEditorSelectionChangeEvent(B,V,z){this.handleActiveEditorSelectionChangeInNavigationStacks(B,V,z)}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 V;(0,R.isEditorInput)(B)?V=R.EditorResourceAccessor.getOriginalUri(B):B instanceof E.FileChangesEvent||(V=B.resource),V&&this.workspacesService.removeRecentlyOpened([V])}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 V=this.configurationService.getValue(_i.NAVIGATION_SCOPE_SETTING);V==="editorGroup"?this.editorNavigationScope=1:V==="editor"?this.editorNavigationScope=2:this.editorNavigationScope=0};this._register(this.configurationService.onDidChangeConfiguration(V=>{V.affectsConfiguration(_i.NAVIGATION_SCOPE_SETTING)&&B()})),B()}getStack(B=this.editorGroupService.activeGroup,V=B.activeEditor){switch(this.editorNavigationScope){case 2:{if(!V)return new M;let z=this.editorScopedNavigationStacks.get(B.id);z||(z=new Map,this.editorScopedNavigationStacks.set(B.id,z));let x=z.get(V)?.stack;if(!x){const H=new b.DisposableStore;x=H.add(this.instantiationService.createInstance(L,2)),H.add(x.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire())),z.set(V,{stack:x,disposable:H})}return x}case 1:{let z=this.editorGroupScopedNavigationStacks.get(B.id)?.stack;if(!z){const x=new b.DisposableStore;z=x.add(this.instantiationService.createInstance(L,1)),x.add(z.onDidChange(()=>this._onDidChangeEditorNavigationStack.fire())),this.editorGroupScopedNavigationStacks.set(B.id,{stack:z,disposable:x})}return z}case 0:return this.defaultScopedEditorNavigationStack||(this.defaultScopedEditorNavigationStack=this._register(this.instantiationService.createInstance(L,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,V){this.getStack(B,V?.input).handleActiveEditorChange(V)}handleActiveEditorSelectionChangeInNavigationStacks(B,V,z){this.getStack(B,V.input).handleActiveEditorSelectionChange(V,z)}handleEditorCloseEventInHistory(B){const V=this.editorScopedNavigationStacks.get(B.groupId);if(V){const z=V.get(B.editor);z&&(z.disposable.dispose(),V.delete(B.editor)),V.size===0&&this.editorScopedNavigationStacks.delete(B.groupId)}}handleEditorGroupRemoveInNavigationStacks(B){this.defaultScopedEditorNavigationStack?.remove(B.id);const V=this.editorGroupScopedNavigationStacks.get(B.id);V&&(V.disposable.dispose(),this.editorGroupScopedNavigationStacks.delete(B.id))}clearEditorNavigationStacks(){this.withEachEditorNavigationStack(B=>B.clear())}removeFromEditorNavigationStacks(B){this.withEachEditorNavigationStack(V=>V.remove(B))}moveInEditorNavigationStacks(B){this.withEachEditorNavigationStack(V=>V.move(B))}withEachEditorNavigationStack(B){this.defaultScopedEditorNavigationStack&&B(this.defaultScopedEditorNavigationStack);for(const[,V]of this.editorGroupScopedNavigationStacks)B(V.stack);for(const[,V]of this.editorScopedNavigationStacks)for(const[,z]of V)B(z.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[,V]of B)V.disposable.dispose();this.editorScopedNavigationStacks.clear()}openNextRecentlyUsedEditor(B){const[V,z]=this.ensureRecentlyUsedStack(x=>x-1,B);return this.doNavigateInRecentlyUsedEditorsStack(V[z],B)}openPreviouslyUsedEditor(B){const[V,z]=this.ensureRecentlyUsedStack(x=>x+1,B);return this.doNavigateInRecentlyUsedEditorsStack(V[z],B)}async doNavigateInRecentlyUsedEditorsStack(B,V){if(B){const z=typeof V!="number"||!this.editorGroupService.getGroup(V);z?this.navigatingInRecentlyUsedEditorsStack=!0:this.navigatingInRecentlyUsedEditorsInGroupStack=!0;const x=this.editorGroupService.getGroup(B.groupId)??this.editorGroupService.activeGroup;try{await x.openEditor(B.editor)}finally{z?this.navigatingInRecentlyUsedEditorsStack=!1:this.navigatingInRecentlyUsedEditorsInGroupStack=!1}}}ensureRecentlyUsedStack(B,V){let z,x;const H=typeof V=="number"?this.editorGroupService.getGroup(V):void 0;H?(z=this.recentlyUsedEditorsInGroupStack||H.getEditors(0).map(U=>({groupId:H.id,editor:U})),x=this.recentlyUsedEditorsInGroupStackIndex):(z=this.recentlyUsedEditorsStack||this.editorService.getEditors(0),x=this.recentlyUsedEditorsStackIndex);let W=B(x);return W<0?W=0:W>z.length-1&&(W=z.length-1),H?(this.recentlyUsedEditorsInGroupStack=z,this.recentlyUsedEditorsInGroupStackIndex=W):(this.recentlyUsedEditorsStack=z,this.recentlyUsedEditorsStackIndex=W),[z,W]}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:V,context:z}=B;if(z===R.EditorCloseContext.REPLACE||z===R.EditorCloseContext.MOVE)return;const x=V.toUntyped();if(!x)return;const H=[],W=R.EditorResourceAccessor.getOriginalUri(V,{supportSideBySide:R.SideBySideEditor.BOTH});p.URI.isUri(W)?H.push(W):W&&H.push(...(0,s.coalesce)([W.primary,W.secondary])),this.removeFromRecentlyClosedEditors(V),this.recentlyClosedEditors.push({editorId:V.editorId,editor:x,resource:R.EditorResourceAccessor.getOriginalUri(V),associatedResources:H,index:B.index,sticky:B.sticky}),this.recentlyClosedEditors.length>_i.MAX_RECENTLY_CLOSED_EDITORS&&this.recentlyClosedEditors.shift(),this.canReopenClosedEditorContextKey.set(!0)}async reopenLastClosedEditor(){const B=this.recentlyClosedEditors.pop();let V;return B&&(V=this.doReopenLastClosedEditor(B)),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0),V}async doReopenLastClosedEditor(B){const V={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))&&(V.index=void 0);let z;if(!this.editorGroupService.activeGroup.contains(B.editor)){this.ignoreEditorCloseEvent=!0;try{z=await this.editorService.openEditor({...B.editor,options:{...B.editor.options,...V}})}finally{this.ignoreEditorCloseEvent=!1}}z||((0,s.remove)(this.recentlyClosedEditors,B),this.reopenLastClosedEditor())}removeFromRecentlyClosedEditors(B){this.recentlyClosedEditors=this.recentlyClosedEditors.filter(V=>(0,R.isEditorInput)(B)&&V.editorId!==B.editorId?!0:!(V.resource&&this.editorHelper.matchesFile(V.resource,B)||V.associatedResources.some(z=>this.editorHelper.matchesFile(z,B)))),this.canReopenClosedEditorContextKey.set(this.recentlyClosedEditors.length>0)}handleActiveEditorChangeInHistory(B){const V=B?.input;!V||V.isDisposed()||!this.includeInHistory(V)||(this.removeFromHistory(V),this.addToHistory(V))}addToHistory(B,V=!0){this.ensureHistoryLoaded(this.history);const z=this.editorHelper.preferResourceEditorInput(B);!z||(V?this.history.unshift(z):this.history.push(z),this.history.length>_i.MAX_HISTORY_ITEMS&&this.editorHelper.clearOnEditorDispose(this.history.pop(),this.editorHistoryListeners),(0,R.isEditorInput)(z)&&this.editorHelper.onEditorDispose(z,()=>this.updateHistoryOnEditorDispose(z),this.editorHistoryListeners))}updateHistoryOnEditorDispose(B){if(!(0,R.isSideBySideEditorInput)(B))this.removeFromHistory(B);else{const V=[],z=B.primary.matches(B.secondary)?[B.primary]:[B.primary,B.secondary];for(const x of z){const H=this.editorHelper.preferResourceEditorInput(x);(0,R.isResourceEditorInput)(H)&&V.push(H)}this.replaceInHistory(B,...V)}}includeInHistory(B){return(0,R.isEditorInput)(B)?!0:!this.resourceExcludeMatcher.value.matches(B.resource)}removeExcludedFromHistory(){this.ensureHistoryLoaded(this.history),this.history=this.history.filter(B=>{const V=this.includeInHistory(B);return V||this.editorHelper.clearOnEditorDispose(B,this.editorHistoryListeners),V})}moveInHistory(B){B.isOperation(2)&&this.removeFromHistory(B)&&this.addToHistory({resource:B.target.resource})}removeFromHistory(B){let V=!1;return this.ensureHistoryLoaded(this.history),this.history=this.history.filter(z=>{const x=this.editorHelper.matchesEditor(B,z);return x&&(this.editorHelper.clearOnEditorDispose(B,this.editorHistoryListeners),V=!0),!x}),V}replaceInHistory(B,...V){this.ensureHistoryLoaded(this.history);let z=!1;const x=[];for(const H of this.history)this.editorHelper.matchesEditor(B,H)?(this.editorHelper.clearOnEditorDispose(B,this.editorHistoryListeners),z||(x.push(...V),z=!0)):V.some(W=>this.editorHelper.matchesEditor(W,H))||x.push(H);z||x.push(...V),this.history=x}clearRecentlyOpened(){this.history=[];for(const[,B]of this.editorHistoryListeners)(0,b.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(),V=[...this.editorService.getEditors(0)].reverse(),z=new Set;for(const{editor:x}of V)!this.includeInHistory(x)||(this.addToHistory(x),x.resource&&z.add(`${x.resource.toString()}/${x.editorId}`));for(const x of B)z.has(`${x.resource.toString()}/${x.options?.override}`)||this.addToHistory(x,!1)}loadHistoryFromStorage(){const B=[],V=this.storageService.get(_i.HISTORY_STORAGE_KEY,1);if(V)try{const z=JSON.parse(V);for(const x of z)if(!(!x.editor||!x.editor.resource))try{B.push({...x.editor,resource:typeof x.editor.resource=="string"?p.URI.parse(x.editor.resource):p.URI.from(x.editor.resource)})}catch(H){(0,g.onUnexpectedError)(H)}}catch(z){(0,g.onUnexpectedError)(z)}return B}saveState(){if(!this.history)return;const B=[];for(const V of this.history)(0,R.isEditorInput)(V)||!(0,R.isResourceEditorInput)(V)||B.push({editor:{...V,resource:V.resource.toString()}});this.storageService.store(_i.HISTORY_STORAGE_KEY,JSON.stringify(B),1,1)}getLastActiveWorkspaceRoot(B){const V=this.contextService.getWorkspace().folders;if(V.length!==0){if(V.length===1){const z=V[0].uri;return!B||z.scheme===B?z:void 0}for(const z of this.getHistory()){if((0,R.isEditorInput)(z)||B&&z.resource.scheme!==B)continue;const x=this.contextService.getWorkspaceFolder(z.resource);if(x)return x.uri}for(const z of V){const x=z.uri;if(!B||x.scheme===B)return x}}}getLastActiveFile(B){for(const V of this.getHistory()){let z;if((0,R.isEditorInput)(V)?z=R.EditorResourceAccessor.getOriginalUri(V,{filterByScheme:B}):z=V.resource,z?.scheme===B)return z}}};T.MOUSE_NAVIGATION_SETTING="workbench.editor.mouseBackForwardToNavigate",T.NAVIGATION_SCOPE_SETTING="workbench.editor.navigationScope",T.MAX_RECENTLY_CLOSED_EDITORS=20,T.MAX_HISTORY_ITEMS=200,T.HISTORY_STORAGE_KEY="history.entries",T=we([F(0,A.IEditorService),F(1,u.IEditorGroupsService),F(2,I.IWorkspaceContextService),F(3,S.IStorageService),F(4,r.IConfigurationService),F(5,E.IFileService),F(6,a.IWorkspacesService),F(7,f.IInstantiationService),F(8,c.IWorkbenchLayoutService),F(9,l.IContextKeyService)],T),e.HistoryService=T,(0,d.registerSingleton)(k.IHistoryService,T,0);class _{constructor(B,V,z){this.editorIdentifier=B,this.selection=V,this.reason=z}justifiesNewNavigationEntry(B){if(this.editorIdentifier.groupId!==B.editorIdentifier.groupId||!this.editorIdentifier.editor.matches(B.editorIdentifier.editor)||!this.selection||!B.selection)return!0;const V=this.selection.compare(B.selection);return V===2&&(B.reason===4||B.reason===5)?!0:V===3}}let L=class extends b.Disposable{constructor(B,V){super(),this.scope=B,this.instantiationService=V,this.selectionsStack=this._register(this.instantiationService.createInstance(O,0,this.scope)),this.editsStack=this._register(this.instantiationService.createInstance(O,1,this.scope)),this.navigationsStack=this._register(this.instantiationService.createInstance(O,2,this.scope)),this.stacks=[this.selectionsStack,this.editsStack,this.navigationsStack],this.onDidChange=C.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,V){const z=this.selectionsStack.current;this.selectionsStack.notifyNavigation(B,V),V.reason===3?this.editsStack.notifyNavigation(B,V):(V.reason===4||V.reason===5)&&!this.selectionsStack.isNavigating()&&(V.reason===5&&!this.navigationsStack.isNavigating()&&z&&this.navigationsStack.addOrReplace(z.groupId,z.editor,z.selection),this.navigationsStack.notifyNavigation(B,V))}clear(){for(const B of this.stacks)B.clear()}remove(B){for(const V of this.stacks)V.remove(B)}move(B){for(const V of this.stacks)V.move(B)}};L=we([F(1,f.IInstantiationService)],L);class M{constructor(){this.onDidChange=C.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 O=class fl extends b.Disposable{get current(){return this.stack[this.index]}set current(B){B&&(this.stack[this.index]=B)}constructor(B,V,z,x,H,W){super(),this.filter=B,this.scope=V,this.instantiationService=z,this.editorService=x,this.editorGroupService=H,this.logService=W,this._onDidChange=this._register(new C.Emitter),this.onDidChange=this._onDidChange.event,this.mapEditorToDisposable=new Map,this.mapGroupToDisposable=new Map,this.editorHelper=this.instantiationService.createInstance(N),this.stack=[],this.index=-1,this.previousIndex=-1,this.navigating=!1,this.currentSelectionState=void 0,this.registerListeners()}registerListeners(){this._register(this.onDidChange(()=>this.traceStack())),this._register(this.logService.onDidChangeLogLevel(()=>this.traceStack()))}traceStack(){if(this.logService.getLevel()!==y.LogLevel.Trace)return;const B=[];for(const V of this.stack)typeof V.selection?.log=="function"?B.push(`- group: ${V.groupId}, editor: ${V.editor.resource?.toString()}, selection: ${V.selection.log()}`):B.push(`- group: ${V.groupId}, editor: ${V.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,V=null,z){if(this.logService.getLevel()!==y.LogLevel.Trace)return;let x;switch(this.filter){case 0:x="global";break;case 1:x="edits";break;case 2:x="navigation";break}let H;switch(this.scope){case 0:H="default";break;case 1:H="editorGroup";break;case 2:H="editor";break}V!==null?this.logService.trace(`[History stack ${x}-${H}]: ${B} (editor: ${V?.resource?.toString()}, event: ${this.traceEvent(z)})`):this.logService.trace(`[History stack ${x}-${H}]: ${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 V=this.editorGroupService.getGroup(B);V&&this.mapGroupToDisposable.set(B,V.onWillMoveEditor(z=>this.onWillMoveEditor(z)))}}onWillMoveEditor(B){if(this.trace("onWillMoveEditor()",B.editor),this.scope!==1)for(const V of this.stack)V.groupId===B.groupId&&(!this.editorHelper.matchesEditor(B.editor,V.editor)||(V.groupId=B.target))}notifyNavigation(B,V){this.trace("notifyNavigation()",B?.input,V);const z=(0,R.isEditorPaneWithSelection)(B),x=B?.group&&B.input&&!B.input.isDisposed();this.navigating?(this.trace("notifyNavigation() ignoring (navigating)",B?.input,V),z&&x?(this.trace("notifyNavigation() updating current selection state",B?.input,V),this.currentSelectionState=new _({groupId:B.group.id,editor:B.input},B.getSelection(),V?.reason)):(this.trace("notifyNavigation() dropping current selection state",B?.input,V),this.currentSelectionState=void 0)):(this.trace("notifyNavigation() not ignoring",B?.input,V),z&&x?this.onSelectionAwareEditorNavigation(B.group.id,B.input,B.getSelection(),V):(this.currentSelectionState=void 0,x&&this.onNonSelectionAwareEditorNavigation(B.group.id,B.input)))}onSelectionAwareEditorNavigation(B,V,z,x){if(this.current?.groupId===B&&!z&&this.editorHelper.matchesEditor(this.current.editor,V))return;this.trace("onSelectionAwareEditorNavigation()",V,x);const H=new _({groupId:B,editor:V},z,x?.reason);!this.currentSelectionState||this.currentSelectionState.justifiesNewNavigationEntry(H)?this.doAdd(B,V,H.selection):this.doReplace(B,V,H.selection),this.currentSelectionState=H}onNonSelectionAwareEditorNavigation(B,V){this.current?.groupId===B&&this.editorHelper.matchesEditor(this.current.editor,V)||(this.trace("onNonSelectionAwareEditorNavigation()",V),this.doAdd(B,V))}doAdd(B,V,z){this.navigating||this.addOrReplace(B,V,z)}doReplace(B,V,z){this.navigating||this.addOrReplace(B,V,z,!0)}addOrReplace(B,V,z,x){this.registerGroupListeners(B);let H=!1;this.current&&(x||this.shouldReplaceStackEntry(this.current,{groupId:B,editor:V,selection:z}))&&(H=!0);const W=this.editorHelper.preferResourceEditorInput(V);if(!W)return;H?this.trace("replace()",W):this.trace("add()",W);const U={groupId:B,editor:W,selection:z},$=[];if(H)this.current&&$.push(this.current),this.current=U;else{if(this.stack.length>this.index+1){for(let q=this.index+1;q<this.stack.length;q++)$.push(this.stack[q]);this.stack=this.stack.slice(0,this.index+1)}this.stack.splice(this.index+1,0,U),this.stack.length>fl.MAX_STACK_SIZE?($.push(this.stack.shift()),this.previousIndex>=0&&this.previousIndex--):this.setIndex(this.index+1,!0)}for(const q of $)this.editorHelper.clearOnEditorDispose(q.editor,this.mapEditorToDisposable);(0,R.isEditorInput)(W)&&this.editorHelper.onEditorDispose(W,()=>this.remove(W),this.mapEditorToDisposable),this._onDidChange.fire()}shouldReplaceStackEntry(B,V){return B.groupId!==V.groupId||!this.editorHelper.matchesEditor(B.editor,V.editor)?!1:B.selection?V.selection?B.selection.compare(V.selection)===1:!1:!0}move(B){if(B.isOperation(2))for(const V of this.stack)this.editorHelper.matchesEditor(B,V.editor)&&(V.editor={resource:B.target.resource})}remove(B){this.stack=this.stack.filter(V=>{const z=typeof B=="number"?V.groupId===B:this.editorHelper.matchesEditor(B,V.editor);return z&&this.editorHelper.clearOnEditorDispose(V.editor,this.mapEditorToDisposable),!z}),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 V;for(const z of this.stack)V&&this.shouldReplaceStackEntry(z,V)||(V=z,B.push(z));this.stack=B}clear(){this.index=-1,this.previousIndex=-1,this.stack.splice(0);for(const[,B]of this.mapEditorToDisposable)(0,b.dispose)(B);this.mapEditorToDisposable.clear();for(const[,B]of this.mapGroupToDisposable)(0,b.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,R.isEditorPaneWithSelection)(B)||B.group?.id!==this.current.groupId||!B.input||!this.editorHelper.matchesEditor(B.input,this.current.editor))return!1;const V=B.getSelection();return V?V.compare(this.current.selection)===1:!1}setIndex(B,V){this.previousIndex=this.index,this.index=B,V||this._onDidChange.fire()}async navigate(){this.navigating=!0;try{this.current&&await this.doNavigate(this.current)}finally{this.navigating=!1}}doNavigate(B){let V=Object.create(null);return B.selection&&(V=B.selection.restore(V)),(0,R.isEditorInput)(B.editor)?this.editorService.openEditor(B.editor,V,B.groupId):this.editorService.openEditor({...B.editor,options:{...B.editor.options,...V}},B.groupId)}isNavigating(){return this.navigating}};O.MAX_STACK_SIZE=50,O=we([F(2,f.IInstantiationService),F(3,A.IEditorService),F(4,u.IEditorGroupsService),F(5,y.ILogService)],O),e.EditorNavigationStack=O;let N=class{constructor(B,V,z,x){this.uriIdentityService=B,this.lifecycleService=V,this.fileService=z,this.pathService=x}preferResourceEditorInput(B){const V=R.EditorResourceAccessor.getOriginalUri(B);if(V?.scheme===o.Schemas.file||V?.scheme===o.Schemas.vscodeRemote||V?.scheme===o.Schemas.vscodeUserData||V?.scheme===this.pathService.defaultUriScheme){if((0,R.isEditorInput)(B)){const x=B.toUntyped();if((0,R.isResourceEditorInput)(x))return x}return B}else return(0,R.isEditorInput)(B)?B:void 0}matchesEditor(B,V){return B instanceof E.FileChangesEvent||B instanceof E.FileOperationEvent?(0,R.isEditorInput)(V)?!1:B instanceof E.FileChangesEvent?B.contains(V.resource,2):this.matchesFile(V.resource,B):(0,R.isEditorInput)(B)?(0,R.isEditorInput)(V)?B.matches(V):this.matchesFile(V.resource,B):(0,R.isEditorInput)(V)?this.matchesFile(B.resource,V):B&&V&&this.uriIdentityService.extUri.isEqual(B.resource,V.resource)}matchesFile(B,V){if(V instanceof E.FileChangesEvent)return V.contains(B,2);if(V instanceof E.FileOperationEvent)return this.uriIdentityService.extUri.isEqualOrParent(B,V.resource);if((0,R.isEditorInput)(V)){const z=V.resource;return!z||this.lifecycleService.phase>=3&&!this.fileService.hasProvider(z)?!1:this.uriIdentityService.extUri.isEqual(z,B)}return this.uriIdentityService.extUri.isEqual(V?.resource,B)}matchesEditorIdentifier(B,V){return!V?.group||B.groupId!==V.group.id?!1:V.input?B.editor.matches(V.input):!1}onEditorDispose(B,V,z){const x=C.Event.once(B.onWillDispose)(()=>V());let H=z.get(B);H||(H=new b.DisposableStore,z.set(B,H)),H.add(x)}clearOnEditorDispose(B,V){if(!(0,R.isEditorInput)(B))return;const z=V.get(B);z&&((0,b.dispose)(z),V.delete(B))}};N=we([F(0,w.IUriIdentityService),F(1,D.ILifecycleService),F(2,E.IFileService),F(3,m.IPathService)],N)}),define(ae[351],le([1,0,16,298,144,130,60,22,53,18,28,13,9,370,2037,8,25,34,58,107,203]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveResourcesForSearchIncludes=e.QueryBuilder=void 0;let a=class{constructor(T,_,L,M,O){this.configurationService=T,this.workspaceContextService=_,this.editorGroupsService=L,this.logService=M,this.pathService=O}text(T,_,L={}){T=this.getContentPattern(T,L);const M=this.configurationService.getValue(),O=_&&_.some(P=>!this.configurationService.getValue({resource:P}).search.useRipgrep);return{...this.commonQuery(_?.map(l.toWorkspaceFolder),L),type:2,contentPattern:T,previewOptions:L.previewOptions,maxFileSize:L.maxFileSize,usePCRE2:M.search.usePCRE2||O||!1,beforeContext:L.beforeContext,afterContext:L.afterContext,userDisabledExcludesAndIgnoreFiles:L.disregardExcludeSettings&&L.disregardIgnoreFiles}}getContentPattern(T,_){const L=this.configurationService.getValue();T.isRegExp&&(T.pattern=T.pattern.replace(/\r?\n/g,"\\n"));const M={...T,wordSeparators:L.editor.wordSeparators};return this.isCaseSensitive(T,_)&&(M.isCaseSensitive=!0),this.isMultiline(T)&&(M.isMultiline=!0),M}file(T,_={}){return{...this.commonQuery(T,_),type:1,filePattern:_.filePattern?_.filePattern.trim():_.filePattern,exists:_.exists,sortByScore:_.sortByScore,cacheKey:_.cacheKey}}handleIncludeExclude(T,_){return T?(T=Array.isArray(T)?T.map(m):m(T),_?this.parseSearchPaths(T):{pattern:g(...Array.isArray(T)?T:[T])}):{}}commonQuery(T=[],_={}){const L=this.handleIncludeExclude(_.includePattern,_.expandPatterns),M=this.handleIncludeExclude(_.excludePattern,_.expandPatterns),O=T.length>1,N=(L.searchPaths&&L.searchPaths.length?L.searchPaths.map(V=>this.getFolderQueryForSearchPath(V,_,M)):T.map(V=>this.getFolderQueryForRoot(V,_,M,O))).filter(V=>!!V),P={_reason:_._reason,folderQueries:N,usingSearchPaths:!!(L.searchPaths&&L.searchPaths.length),extraFileResources:_.extraFileResources,excludePattern:M.pattern,includePattern:L.pattern,onlyOpenEditors:_.onlyOpenEditors,maxResults:_.maxResults};if(_.onlyOpenEditors){const V=t.coalesce(t.flatten(this.editorGroupsService.groups.map(H=>H.editors.map(W=>W.resource))));this.logService.trace("QueryBuilder#commonQuery - openEditor URIs",JSON.stringify(V));const z=V.filter(H=>(0,n.pathIncludedInQuery)(P,H.fsPath)),x=this.commonQueryFromFileList(z);return this.logService.trace("QueryBuilder#commonQuery - openEditor Query",JSON.stringify(x)),{...P,...x}}const B=_.extraFileResources&&_.extraFileResources.filter(V=>(0,n.pathIncludedInQuery)(P,V.fsPath));return P.extraFileResources=B&&B.length?B:void 0,P}commonQueryFromFileList(T){const _=[],L=new k.ResourceMap,M={};let O=!1;return T.forEach(N=>{if(N.scheme===E.Schemas.walkThrough)return;if((0,b.isAbsolutePath)(N)){const B=this.workspaceContextService.getWorkspaceFolder(N)?.uri??N.with({path:I.dirname(N.fsPath)});let V=L.get(B);V||(O=!0,V={folder:B,includePattern:{}},_.push(V),L.set(B,V));const z=I.relative(B.fsPath,N.fsPath);(0,C.assertIsDefined)(V.includePattern)[z.replace(/\\/g,"/")]=!0}else N.fsPath&&(O=!0,M[N.fsPath]=!0)}),{folderQueries:_,includePattern:M,usingSearchPaths:!0,excludePattern:O?void 0:{"**/*":!0}}}isCaseSensitive(T,_){if(_.isSmartCase){if(T.isRegExp){if(S.containsUppercaseCharacter(T.pattern,!0))return!0}else if(S.containsUppercaseCharacter(T.pattern))return!0}return!!T.isCaseSensitive}isMultiline(T){return T.isMultiline||T.isRegExp&&(0,u.isMultilineRegexSource)(T.pattern)||T.pattern.indexOf(` `)>=0?!0:!!T.isMultiline}parseSearchPaths(T){const _=x=>I.isAbsolute(x)||/^\.\.?([\/\\]|$)/.test(x),M=(Array.isArray(T)?T:h(T)).map(x=>{const H=this.pathService.resolvedUserHome;return H?(0,A.untildify)(x,H.scheme===E.Schemas.file?H.fsPath:H.path):x}),O=p.groupBy(M,x=>_(x)?"searchPaths":"exprSegments"),N=(O.exprSegments||[]).map(x=>S.rtrim(x,"/")).map(x=>S.rtrim(x,"\\")).map(x=>(x[0]==="."&&(x="*"+x),v(x))),P={},B=this.expandSearchPathPatterns(O.searchPaths||[]);B&&B.length&&(P.searchPaths=B);const V=t.flatten(N),z=g(...V);return z&&(P.pattern=z),P}getExcludesForFolder(T,_){return _.disregardExcludeSettings?void 0:(0,n.getExcludes)(T,!_.disregardSearchExcludeSettings)}expandSearchPathPatterns(T){if(!T||!T.length)return[];const _=t.flatten(T.map(M=>{let{pathPortion:O,globPortion:N}=o(M);N&&(N=w(N));const P=this.expandOneSearchPath(O);return t.flatten(P.map(B=>this.resolveOneSearchPathPattern(B,N)))})),L=new Map;return _.forEach(M=>{const O=M.searchPath.toString(),N=L.get(O);N?M.pattern&&(N.pattern=N.pattern||{},N.pattern[M.pattern]=!0):L.set(O,{searchPath:M.searchPath,pattern:M.pattern?g(M.pattern):void 0})}),Array.from(L.values())}expandOneSearchPath(T){if(I.isAbsolute(T)){const _=this.workspaceContextService.getWorkspace().folders;return _[0]&&_[0].uri.scheme!==E.Schemas.file?[{searchPath:_[0].uri.with({path:T})}]:[{searchPath:r.URI.file(I.normalize(T))}]}if(this.workspaceContextService.getWorkbenchState()===2){const _=this.workspaceContextService.getWorkspace().folders[0].uri;if(T=m(T),T.startsWith("../")||T===".."){const M=I.posix.resolve(_.path,T);return[{searchPath:_.with({path:M})}]}const L=w(T);return[{searchPath:_,pattern:L}]}else{if(T==="./"||T===".\\")return[];{const _=T.replace(/^\.[\/\\]/,""),M=this.workspaceContextService.getWorkspace().folders.map(O=>{const N=_.match(new RegExp(`^${S.escapeRegExpCharacters(O.name)}(?:/(.*)|$)`));return N?{match:N,folder:O}:null}).filter(C.isDefined);if(M.length)return M.map(O=>{const N=O.match[1];return{searchPath:O.folder.uri,pattern:N&&w(N)}});{const O=T.match(/\.[\/\\](.+)[\/\\]?/),N=O?O[1]:T,P=i.localize(0,null,N);throw new Error(P)}}}}resolveOneSearchPathPattern(T,_){const L=T.pattern&&_?`${T.pattern}/${_}`:T.pattern||_,M=[{searchPath:T.searchPath,pattern:L}];return L&&!L.endsWith("**")&&M.push({searchPath:T.searchPath,pattern:L+"/**"}),M}getFolderQueryForSearchPath(T,_,L){const M=this.getFolderQueryForRoot((0,l.toWorkspaceFolder)(T.searchPath),_,L,!1);return M?{...M,includePattern:T.pattern}:null}getFolderQueryForRoot(T,_,L,M){let O;const N=r.URI.isUri(T)?T:T.uri;if(L.searchPaths){const x=L.searchPaths.filter(H=>(0,b.isEqual)(H.searchPath,N))[0];if(x&&!x.pattern)return null;x&&(O=x.pattern)}const P=this.configurationService.getValue({resource:N}),V={...this.getExcludesForFolder(P,_)||{},...O||{}},z=r.URI.isUri(T)?(0,b.basename)(T):T.name;return{folder:N,folderName:M?z:void 0,excludePattern:Object.keys(V).length>0?V:void 0,fileEncoding:P.files&&P.files.encoding,disregardIgnoreFiles:typeof _.disregardIgnoreFiles=="boolean"?_.disregardIgnoreFiles:!P.search.useIgnoreFiles,disregardGlobalIgnoreFiles:typeof _.disregardGlobalIgnoreFiles=="boolean"?_.disregardGlobalIgnoreFiles:!P.search.useGlobalIgnoreFiles,disregardParentIgnoreFiles:typeof _.disregardParentIgnoreFiles=="boolean"?_.disregardParentIgnoreFiles:!P.search.useParentIgnoreFiles,ignoreSymlinks:typeof _.ignoreSymlinks=="boolean"?_.ignoreSymlinks:!P.search.followSymlinks}}};a=we([F(0,f.IConfigurationService),F(1,l.IWorkspaceContextService),F(2,s.IEditorGroupsService),F(3,c.ILogService),F(4,d.IPathService)],a),e.QueryBuilder=a;function o(y){const T=y.match(/[\*\{\}\(\)\[\]\?]/);if(T){const _=T.index,L=y.substr(0,_).match(/[/|\\][^/\\]*$/);if(L){let M=y.substr(0,L.index);return M.match(/[/\\]/)||(M+="/"),{pathPortion:M,globPortion:y.substr((L.index||0)+1)}}}return{pathPortion:y}}function g(...y){return y.length?y.reduce((T,_)=>(T[_]=!0,T),Object.create(null)):void 0}function h(y){return R.splitGlobAware(y,",").map(T=>T.trim()).filter(T=>!!T.length)}function v(y){return[`**/${y}/**`,`**/${y}`].map(_=>_.replace(/\*\*\/\*\*/g,"**"))}function m(y){return y.replace(/\\/g,"/")}function w(y){return m(y).replace(/^\.\//,"").replace(/\/+$/g,"")}function D(y,T){y=t.distinct(y,M=>M.toString());const _=[],L=T.getWorkspace();return y&&y.forEach(M=>{let O;if(T.getWorkbenchState()===2)O=(0,b.relativePath)(L.folders[0].uri,M),O&&O!=="."&&(O="./"+O);else{const N=T.getWorkspaceFolder(M);if(N){const P=N.name;if(L.folders.filter(V=>V.name===P).length===1){const V=(0,b.relativePath)(N.uri,M);V===""?O=`./${N.name}`:O=`./${N.name}/${V}`}else O=M.fsPath}}O&&_.push(O)}),_}e.resolveResourcesForSearchIncludes=D}),define(ae[2730],le([1,0,22,9,31,19,5,41,48,34,343,887,24,51,74,351,203,53]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalUrlLinkOpener=e.TerminalSearchLinkOpener=e.TerminalLocalFolderOutsideWorkspaceLinkOpener=e.TerminalLocalFolderInWorkspaceLinkOpener=e.TerminalLocalFileLinkOpener=void 0;let s=class{constructor(h,v){this._os=h,this._editorService=v}async open(h){if(!h.uri)throw new Error("Tried to open file link without a resolved URI");const v=this.extractLineColumnInfo(h.text,h.uri),m={startLineNumber:v.lineNumber,startColumn:v.columnNumber};await this._editorService.openEditor({resource:h.uri,options:{pinned:!0,selection:m,revealIfOpened:!0}})}extractLineColumnInfo(h,v){const m={lineNumber:1,columnNumber:1},w=(0,l.basename)(v.path),D=h.indexOf(w),y=D!==-1?D+w.length:h.length;let T=h.slice(0,y).replace(/\s/g,"_")+h.slice(y);if(this._os===1&&T.match(/^\/[a-z]:\//i)&&(T=T.slice(1)),T.startsWith("file://")){const M=T.match(/:(\d+)(:(\d+))?$/);return M&&(M[1]!==void 0&&(m.lineNumber=parseInt(M[1])),M[3]!==void 0&&(m.columnNumber=parseInt(M[3]))),m}const _=(0,C.getLocalLinkRegex)(this._os).exec(T);if(!_)return m;const L=this._os===1?C.winLineAndColumnMatchIndex:C.unixLineAndColumnMatchIndex;for(let M=0;M<C.lineAndColumnClause.length;M++){const O=L+C.lineAndColumnClauseGroupCount*M,N=_[O];if(N){m.lineNumber=parseInt(N,10);const P=_[O+2];P&&(m.columnNumber=parseInt(P,10));break}}return m}};s=we([F(1,r.IEditorService)],s),e.TerminalLocalFileLinkOpener=s;let d=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)}};d=we([F(0,R.ICommandService)],d),e.TerminalLocalFolderInWorkspaceLinkOpener=d;let n=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})}};n=we([F(0,i.IHostService)],n),e.TerminalLocalFolderOutsideWorkspaceLinkOpener=n;let a=class{constructor(h,v,m,w,D,y,T,_,L,M,O){this._capabilities=h,this._initialCwd=v,this._localFileOpener=m,this._localFolderInWorkspaceOpener=w,this._os=D,this._fileService=y,this._instantiationService=T,this._quickInputService=_,this._searchService=L,this._workspaceContextService=M,this._workbenchEnvironmentService=O,this._fileQueryBuilder=this._instantiationService.createInstance(f.QueryBuilder)}async open(h){const v=(0,S.osPathModule)(this._os).sep;let m=h.text.replace(/^file:\/\/\/?/,"");m=(0,S.osPathModule)(this._os).normalize(m).replace(/^(\.+[\\/])+/,""),m=m.replace(/:in$/,""),this._workspaceContextService.getWorkspace().folders.forEach(D=>{if(m.substring(0,D.name.length+1)===D.name+v){m=m.substring(D.name.length+1);return}});let w=m;if(this._capabilities.has(2)&&(w=(0,S.updateLinkWithRelativeCwd)(this._capabilities,h.bufferRange.start.y,m,v)||m),!await this._tryOpenExactLink(w,h)&&!(m!==w&&await this._tryOpenExactLink(m,h)))return this._quickInputService.quickAccess.show(m)}async _getExactMatch(h){const v=(0,S.osPathModule)(this._os),m=v.isAbsolute(h);let w=m?h:void 0;const D=await this._initialCwd;!m&&D.length>0&&(w=v.join(D,h));let y;if(w){let T=w;this._os===1&&(T=w.replace(/\\/g,"/"),T.match(/[a-z]:/i)&&(T=`/${T}`));let _;this._workbenchEnvironmentService.remoteAuthority?_=p.URI.from({scheme:t.Schemas.vscodeRemote,authority:this._workbenchEnvironmentService.remoteAuthority,path:T}):_=p.URI.file(T);try{const L=await this._fileService.stat(_);y={uri:_,isDirectory:L.isDirectory}}catch{}}if(!y){const T=await this._searchService.fileSearch(this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders,{filePattern:h,maxResults:2}));if(T.results.length>0){if(T.results.length===1)y={uri:T.results[0].resource};else if(!m){const L=(await this._searchService.fileSearch(this._fileQueryBuilder.file(this._workspaceContextService.getWorkspace().folders,{filePattern:`**/${h}`}))).results.filter(M=>M.resource.toString().endsWith(h));L.length===1&&(y={uri:L[0].resource})}}}return y}async _tryOpenExactLink(h,v){const m=h.replace(/:\d+(:\d+)?$/,"");try{const w=await this._getExactMatch(m);if(w){const{uri:D,isDirectory:y}=w,T={text:w.uri.path+(h.match(/:\d+(:\d+)?$/)?.[0]||""),uri:D,bufferRange:v.bufferRange,type:v.type};if(D)return await(y?this._localFolderInWorkspaceOpener.open(T):this._localFileOpener.open(T)),!0}}catch{return!1}return!1}};a=we([F(5,A.IFileService),F(6,k.IInstantiationService),F(7,I.IQuickInputService),F(8,c.ISearchService),F(9,b.IWorkspaceContextService),F(10,u.IWorkbenchEnvironmentService)],a),e.TerminalSearchLinkOpener=a;let o=class{constructor(h,v){this._isRemote=h,this._openerService=v}async open(h){if(!h.uri)throw new Error("Tried to open a url without a resolved URI");this._openerService.open(h.text,{allowTunneling:this._isRemote,allowContributedOpeners:!0})}};o=we([F(1,E.IOpenerService)],o),e.TerminalUrlLinkOpener=o}),define(ae[2731],le([1,0,10,113,2,22,53,14,9,1888,8,19,5,25,225,2391,2393,2730,887,2394,2405,109,2574,127,343,11]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalLinkManager=void 0;let m=class extends R.DisposableStore{constructor(T,_,L,M,O,N,P,B){super(),this._xterm=T,this._processManager=_,this._configurationService=M,this._fileService=O,this._instantiationService=N,this._logService=P,this._tunnelService=B,this._standardLinkProviders=new Map,this._linkProvidersDisposables=[],this._externalLinkProviders=[],this._openers=new Map,this._resolvedLinkCache=new D,this._setupLinkDetector(d.TerminalUriLinkDetector.id,this._instantiationService.createInstance(d.TerminalUriLinkDetector,this._xterm,this._resolvePath.bind(this))),this._configurationService.getValue(g.TERMINAL_CONFIG_SECTION).enableFileLinks&&this._setupLinkDetector(s.TerminalLocalLinkDetector.id,this._instantiationService.createInstance(s.TerminalLocalLinkDetector,this._xterm,L,this._processManager.os||E.OS,this._resolvePath.bind(this))),this._setupLinkDetector(n.TerminalWordLinkDetector.id,this._instantiationService.createInstance(n.TerminalWordLinkDetector,this._xterm)),L.get(0)?.onDidChangeCwd(W=>{this.processCwd=W});const V=this._instantiationService.createInstance(l.TerminalLocalFileLinkOpener,this._processManager.os||E.OS),z=this._instantiationService.createInstance(l.TerminalLocalFolderInWorkspaceLinkOpener);this._openers.set("LocalFile",V),this._openers.set("LocalFolderInWorkspace",z),this._openers.set("LocalFolderOutsideWorkspace",this._instantiationService.createInstance(l.TerminalLocalFolderOutsideWorkspaceLinkOpener)),this._openers.set("Search",this._instantiationService.createInstance(l.TerminalSearchLinkOpener,L,this._processManager.getInitialCwd(),V,z,this._processManager.os||E.OS)),this._openers.set("Url",this._instantiationService.createInstance(l.TerminalUrlLinkOpener,!!this._processManager.remoteAuthority)),this._registerStandardLinkProviders();let x,H;this.add((0,R.toDisposable)(()=>{x?.dispose(),H?.dispose()})),this._xterm.options.linkHandler={activate:(W,U)=>{this._openers.get("Url")?.open({type:"Url",text:U,bufferRange:null,uri:I.URI.parse(U)})},hover:(W,U,$)=>{x?.dispose(),x=void 0,H?.dispose(),H=new v.RunOnceScheduler(()=>{const q=this._xterm._core,X={width:q._renderService.dimensions.css.cell.width,height:q._renderService.dimensions.css.cell.height},G={width:this._xterm.cols,height:this._xterm.rows};x=this._showHover({viewportRange:(0,h.convertBufferRangeToViewport)($,this._xterm.buffer.active.viewportY),cellDimensions:X,terminalDimensions:G},this._getLinkHoverString(U,U),void 0,Q=>this._xterm.options.linkHandler?.activate(W,Q,$)),H?.dispose(),H=void 0},this._configurationService.getValue("workbench.hover.delay")),H.schedule()}}}_setupLinkDetector(T,_,L=!1){const M=this._instantiationService.createInstance(c.TerminalLinkDetectorAdapter,_);return M.onDidActivateLink(O=>{O.event?.preventDefault(),!(O.event&&!(O.event instanceof a.TerminalLinkQuickPickEvent)&&!this._isLinkActivationModifierDown(O.event))&&(O.link.activate?O.link.activate(O.link.text):this._openLink(O.link))}),M.onDidShowHover(O=>this._tooltipCallback(O.link,O.viewportRange,O.modifierDownCallback,O.modifierUpCallback)),L||this._standardLinkProviders.set(T,M),M}async _openLink(T){this._logService.debug("Opening link",T);const _=this._openers.get(T.type);if(!_)throw new Error(`No matching opener for link type "${T.type}"`);await _.open(T)}async openRecentLink(T){let _,L=this._xterm.buffer.active.length;for(;(!_||_.length===0)&&L>=this._xterm.buffer.active.viewportY;)_=await this._getLinksForType(L,T),L--;if(!_||_.length<1)return;const M=new a.TerminalLinkQuickPickEvent(t.EventType.CLICK);return _[0].activate(M,_[0].text),_[0]}async getLinks(T){const _=[],L=[],M=[];let O=!1,N=T?this._lastTopLine-1e3:this._xterm.buffer.active.viewportY-Math.min(this._xterm.rows,50);(N<0||N-Math.min(this._xterm.rows,50)<0)&&(O=!0),N<0&&(N=0),this._lastTopLine=N;for(let P=this._xterm.buffer.active.length-1;P>=N;P--){const B=await this._getLinksForLine(P);if(B){const{wordLinks:V,webLinks:z,fileLinks:x}=B;V&&V.length&&_.push(...V.reverse()),z&&z.length&&L.push(...z.reverse()),x&&x.length&&M.push(...x.reverse())}}return{webLinks:L,fileLinks:M,wordLinks:_,noMoreResults:O}}async _getLinksForLine(T){const _=await this._getLinksForType(T,"word"),L=await this._getLinksForType(T,"url"),M=await this._getLinksForType(T,"localFile"),O=new Set;let N;if(_){N=[];for(const P of _)!O.has(P.text)&&P.text.length>1&&(N.push(P),O.add(P.text))}return{wordLinks:N,webLinks:L,fileLinks:M}}async _getLinksForType(T,_){switch(_){case"word":return await new Promise(L=>this._standardLinkProviders.get(n.TerminalWordLinkDetector.id)?.provideLinks(T,L));case"url":return await new Promise(L=>this._standardLinkProviders.get(d.TerminalUriLinkDetector.id)?.provideLinks(T,L));case"localFile":return(await new Promise(M=>this._standardLinkProviders.get(s.TerminalLocalLinkDetector.id)?.provideLinks(T,M)))?.filter(M=>M.type==="LocalFile")}}_tooltipCallback(T,_,L,M){if(!this._widgetManager)return;const O=this._xterm._core,N={width:O._renderService.dimensions.css.cell.width,height:O._renderService.dimensions.css.cell.height},P={width:this._xterm.cols,height:this._xterm.rows};this._showHover({viewportRange:_,cellDimensions:N,terminalDimensions:P,modifierDownCallback:L,modifierUpCallback:M},this._getLinkHoverString(T.text,T.label),T.actions,B=>T.activate(void 0,B),T)}_showHover(T,_,L,M,O){if(this._widgetManager){const N=this._instantiationService.createInstance(o.TerminalHover,T,_,L,M),P=this._widgetManager.attachWidget(N);return P&&O?.onInvalidated(()=>P.dispose()),P}}setWidgetManager(T){this._widgetManager=T}set processCwd(T){this._processCwd=T}_clearLinkProviders(){(0,R.dispose)(this._linkProvidersDisposables),this._linkProvidersDisposables.length=0}_registerStandardLinkProviders(){for(const T of this._standardLinkProviders.values())this._linkProvidersDisposables.push(this._xterm.registerLinkProvider(T))}registerExternalLinkProvider(T){this._clearLinkProviders();const _=`extension-${this._externalLinkProviders.length}`,L=this._setupLinkDetector(_,new f.TerminalExternalLinkDetector(_,this._xterm,T),!0),M=this._xterm.registerLinkProvider(L);return this._externalLinkProviders.push(M),this._registerStandardLinkProviders(),M}get _localLinkRegex(){if(!this._processManager)throw new Error("Process manager is required");const T=this._processManager.os===1?s.winLocalLinkClause:s.unixLocalLinkClause;return new RegExp(`${T}(${s.lineAndColumnClause})`)}_isLinkActivationModifierDown(T){return this._configurationService.getValue("editor").multiCursorModifier==="ctrlCmd"?!!T.altKey:E.isMacintosh?T.metaKey:T.ctrlKey}_getLinkHoverString(T,_){const L=this._configurationService.getValue("editor");let M="";L.multiCursorModifier==="ctrlCmd"?E.isMacintosh?M=b.localize(0,null):M=b.localize(1,null):E.isMacintosh?M=b.localize(2,null):M=b.localize(3,null);let O=b.localize(4,null);try{this._tunnelService.canTunnel(I.URI.parse(T))&&(O=b.localize(5,null))}catch{}const N=new p.MarkdownString("",!0);return _&&(_=N.appendText(_).value,N.value=""),T&&(T=N.appendText(T).value,N.value=""),_=_||O,T=T||_,/(\s| )/.test(T)&&(T=b.localize(6,null)),N.appendLink(T,_).appendMarkdown(` (${M})`)}get _osPath(){if(!this._processManager)throw new Error("Process manager is required");return this._processManager.os===1?k.win32:k.posix}_preprocessPath(T){if(!this._processManager)throw new Error("Process manager is required");if(T.charAt(0)==="~"){if(!this._processManager.userHome)return null;T=this._osPath.join(this._processManager.userHome,T.substring(1))}else if(T.charAt(0)!=="/"&&T.charAt(0)!=="~")if(this._processManager.os===1)if(!T.match("^"+s.winDrivePrefix)&&!T.startsWith("\\\\?\\")){if(!this._processCwd)return null;T=this._osPath.join(this._processCwd,T)}else T=T.replace(/^\\\\\?\\/,"");else{if(!this._processCwd)return null;T=this._osPath.join(this._processCwd,T)}return T=this._osPath.normalize(T),T}async _resolvePath(T,_){if(!this._processManager)throw new Error("Process manager is required");const L=this._resolvedLinkCache.get(_||T);if(L!==void 0)return L;if(_)try{const N=await this._fileService.stat(_),P={uri:_,link:T,isDirectory:N.isDirectory};return this._resolvedLinkCache.set(_,P),P}catch{return this._resolvedLinkCache.set(_,null),null}const M=this._preprocessPath(T);if(!M)return this._resolvedLinkCache.set(T,null),null;const O=this.extractLinkUrl(M);if(!O)return this._resolvedLinkCache.set(T,null),null;try{let N;this._processManager.remoteAuthority?N=I.URI.from({scheme:A.Schemas.vscodeRemote,authority:this._processManager.remoteAuthority,path:O}):N=I.URI.file(O);try{const P=await this._fileService.stat(N),B={uri:N,link:T,isDirectory:P.isDirectory};return this._resolvedLinkCache.set(T,B),B}catch{return this._resolvedLinkCache.set(T,null),null}}catch{return this._resolvedLinkCache.set(T,null),null}}extractLinkUrl(T){const _=this._localLinkRegex.exec(T);return _?_[1]:null}};m=we([F(3,S.IConfigurationService),F(4,C.IFileService),F(5,r.IInstantiationService),F(6,u.ILogService),F(7,i.ITunnelService)],m),e.TerminalLinkManager=m;var w;(function(y){y[y.TTL=1e4]="TTL"})(w||(w={}));class D{constructor(){this._cache=new Map,this._cacheTilTimeout=0}set(T,_){this._cacheTilTimeout&&window.clearTimeout(this._cacheTilTimeout),this._cacheTilTimeout=window.setTimeout(()=>this._cache.clear(),1e4),this._cache.set(this._getKey(T),_)}get(T){return this._cache.get(this._getKey(T))}_getKey(T){return I.URI.isUri(T)?T.toString():T}}}),define(ae[684],le([1,0,18,9,32,21,5,351,203,34]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkGlobFileExists=e.checkActivateWorkspaceContainsExtension=void 0;const S=7e3;function C(f,c){const l=c.activationEvents;if(!l)return Promise.resolve(void 0);const s=[],d=[];for(const v of l)if(/^workspaceContains:/.test(v)){const m=v.substr(18);m.indexOf("*")>=0||m.indexOf("?")>=0||f.forceUsingSearch?d.push(m):s.push(m)}if(s.length===0&&d.length===0)return Promise.resolve(void 0);let n;const a=new Promise((v,m)=>{n=v}),o=v=>n({activationEvent:v}),g=Promise.all(s.map(v=>r(f,v,o))).then(()=>{}),h=u(f,c.identifier,d,o);return Promise.all([g,h]).then(()=>{n(void 0)}),a}e.checkActivateWorkspaceContainsExtension=C;async function r(f,c,l){for(const s of f.folders)if(await f.exists(t.joinPath(p.URI.revive(s),c))){l(`workspaceContains:${c}`);return}}async function u(f,c,l,s){if(l.length===0)return Promise.resolve(void 0);const d=new R.CancellationTokenSource,n=f.checkExists(f.folders,l,d.token),a=setTimeout(async()=>{d.cancel(),f.logService.info(`Not activating extension '${c.value}': Timed out while searching for 'workspaceContains' pattern ${l.join(",")}`)},S);let o=!1;try{o=await n}catch(g){A.isCancellationError(g)||A.onUnexpectedError(g)}d.dispose(),clearTimeout(a),o&&s(`workspaceContains:${l.join(",")}`)}function i(f,c,l,s){const d=f.get(k.IInstantiationService),n=f.get(I.ISearchService),o=d.createInstance(E.QueryBuilder).file(c.map(g=>(0,b.toWorkspaceFolder)(p.URI.revive(g))),{_reason:"checkExists",includePattern:l,exists:!0});return n.fileSearch(o,s).then(g=>!!g.limitHit,g=>A.isCancellationError(g)?!1:Promise.reject(g))}e.checkGlobFileExists=i}),define(ae[959],le([1,0,5,6,23,187,15,31,7,2,95,9,18,22,82,903,317,74,8,323,2518,35,53,16,45,1969,27,684,34,32,120]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,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 _=(0,v.localize)(0,null),L=24*60*60*1e3,M=7*L;let O=class extends b.Disposable{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y){super(),this.storageService=x,this.commandService=H,this.instantiationService=W,this.workspaceContextService=U,this.contextService=$,this.userDataSyncEnablementService=q,this.configurationService=X,this.extensionManagementService=G,this.hostService=Q,this.viewsService=j,this.telemetryService=K,this._onDidAddWalkthrough=new p.Emitter,this.onDidAddWalkthrough=this._onDidAddWalkthrough.event,this._onDidRemoveWalkthrough=new p.Emitter,this.onDidRemoveWalkthrough=this._onDidRemoveWalkthrough.event,this._onDidChangeWalkthrough=new p.Emitter,this.onDidChangeWalkthrough=this._onDidChangeWalkthrough.event,this._onDidProgressStep=new p.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=Y,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),n.walkthroughsExtensionPoint.setHandler(async(ee,{added:ie,removed:re})=>{await Promise.all([...ie.map(oe=>this.registerExtensionWalkthroughContributions(oe.description)),...re.map(oe=>this.unregisterExtensionWalkthroughContributions(oe.description))]),this.triggerInstalledExtensionsRegistered()}),this.initCompletionEventListeners(),e.HasMultipleNewFileEntries.bindTo(this.contextService).set(!1),this.installedExtensionsRegistered=new Promise(ee=>this.triggerInstalledExtensionsRegistered=ee),f.walkthroughs.forEach(async(ee,ie)=>{this._registerWalkthrough({...ee,icon:{type:"icon",icon:ee.icon},order:f.walkthroughs.length-ie,source:_,when:I.ContextKeyExpr.deserialize(ee.when)??I.ContextKeyExpr.true(),steps:ee.content.steps.map((re,oe)=>({...re,completionEvents:re.completionEvents??[],description:N(re.description),category:ee.id,order:oe,when:I.ContextKeyExpr.deserialize(re.when)??I.ContextKeyExpr.true(),media:re.media.type==="image"?{type:"image",altText:re.media.altText,path:V(re.media.path)}:re.media.type==="svg"?{type:"svg",altText:re.media.altText,path:(0,e.convertInternalMediaPathToFileURI)(re.media.path).with({query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeGettingStarted/common/media/"+re.media.path})})}:{type:"markdown",path:(0,e.convertInternalMediaPathToFileURI)(re.media.path).with({query:JSON.stringify({moduleId:"vs/workbench/contrib/welcomeGettingStarted/common/media/"+re.media.path})}),base:u.FileAccess.asFileUri("vs/workbench/contrib/welcomeGettingStarted/common/media/",J),root:u.FileAccess.asFileUri("vs/workbench/contrib/welcomeGettingStarted/common/media/",J)}}))})})}initCompletionEventListeners(){this._register(this.commandService.onDidExecuteCommand(x=>this.progressByEvent(`onCommand:${x.commandId}`))),this.extensionManagementService.getInstalled().then(x=>{x.forEach(H=>this.progressByEvent(`extensionInstalled:${H.identifier.id.toLowerCase()}`))}),this._register(this.extensionManagementService.onDidInstallExtensions(async x=>{const H=await this.hostService.hadLastFocus();for(const W of x)H&&!W?.context?.skipWalkthrough&&this.sessionInstalledExtensions.add(W.identifier.id.toLowerCase()),this.progressByEvent(`extensionInstalled:${W.identifier.id.toLowerCase()}`)})),this._register(this.contextService.onDidChangeContext(x=>{x.affectsSome(this.stepCompletionContextKeys)&&this.stepCompletionContextKeyExpressions.forEach(H=>{x.affectsSome(new Set(H.keys()))&&this.contextService.contextMatchesRules(H)&&this.progressByEvent("onContext:"+H.serialize())})})),this._register(this.viewsService.onDidChangeViewVisibility(x=>{x.visible&&this.progressByEvent("onView:"+x.id)})),this._register(this.configurationService.onDidChangeConfiguration(x=>{x.affectedKeys.forEach(H=>{this.progressByEvent("onSettingChanged:"+H)})})),this.userDataSyncEnablementService.isEnabled()&&this.progressByEvent("onEvent:sync-enabled"),this._register(this.userDataSyncEnablementService.onDidChangeEnablement(()=>{this.userDataSyncEnablementService.isEnabled()&&this.progressByEvent("onEvent:sync-enabled")}))}markWalkthroughOpened(x){const H=this.gettingStartedContributions.get(x),W=this.metadata.get(x);W&&H&&this.metadata.set(x,{...W,manaullyOpened:!0,stepIDs:H.steps.map(U=>U.id)}),this.storageService.store(e.walkthroughMetadataConfigurationKey,JSON.stringify([...this.metadata.entries()]),0,0)}async registerExtensionWalkthroughContributions(x){const H=q=>q.startsWith("https://")?C.URI.parse(q,!0):u.FileAccess.asFileUri((0,r.joinPath)(x.extensionLocation,q)),W=q=>{const X=G=>G.startsWith("https://")?C.URI.parse(G,!0):u.FileAccess.asBrowserUri((0,r.joinPath)(x.extensionLocation,G));if(typeof q=="string"){const G=X(q);return{hcDark:G,hcLight:G,dark:G,light:G}}else return{hcDark:X(q.hc),hcLight:X(q.hcLight??q.light),light:X(q.light),dark:X(q.dark)}};if(!x.contributes?.walkthroughs?.length)return;let U,$=Math.min();await Promise.all(x.contributes?.walkthroughs?.map(async(q,X)=>{const G=x.identifier.value+"#"+q.id,Q=!this.metadata.get(G);Q&&this.metadata.set(G,{firstSeen:+new Date,stepIDs:q.steps?.map(re=>re.id)??[],manaullyOpened:!1});const j=await Promise.race([this.tasExperimentService?.getTreatment(`gettingStarted.overrideCategory.${x.identifier.value+"."+q.id}.when`),new Promise(re=>setTimeout(()=>re(q.when),5e3))]);this.sessionInstalledExtensions.has(x.identifier.value.toLowerCase())&&this.contextService.contextMatchesRules(I.ContextKeyExpr.deserialize(j??q.when)??I.ContextKeyExpr.true())&&(this.sessionInstalledExtensions.delete(x.identifier.value.toLowerCase()),X<$&&Q&&(U=G,$=X));const K=(q.steps??[]).map((re,oe)=>{const se=N(re.description||""),te=x.identifier.value+"#"+q.id+"#"+re.id;let Z;if(!re.media)throw Error("missing media in walkthrough step: "+q.id+"@"+re.id);if(re.media.image){const ne=re.media.altText;ne===void 0&&console.error("Walkthrough item:",te,"is missing altText for its media element."),Z={type:"image",altText:ne,path:W(re.media.image)}}else if(re.media.markdown)Z={type:"markdown",path:H(re.media.markdown),base:H((0,o.dirname)(re.media.markdown)),root:u.FileAccess.asFileUri(x.extensionLocation)};else if(re.media.svg)Z={type:"svg",path:H(re.media.svg),altText:re.media.svg};else throw new Error("Unknown walkthrough format detected for "+te);return{description:se,media:Z,completionEvents:re.completionEvents?.filter(ne=>typeof ne=="string")??[],id:te,title:re.title,when:I.ContextKeyExpr.deserialize(re.when)??I.ContextKeyExpr.true(),category:G,order:oe}});let Y=!1;if(q.featuredFor){const re=this.workspaceContextService.getWorkspace().folders.map(se=>se.uri),oe=new y.CancellationTokenSource;setTimeout(()=>oe.cancel(),2e3),Y=await this.instantiationService.invokeFunction(se=>(0,w.checkGlobFileExists)(se,re,q.featuredFor,oe.token))}const ee=q.icon??x.icon,ie={description:q.description,title:q.title,id:G,isFeatured:Y,source:x.displayName??x.name,order:0,steps:K,icon:{type:"image",path:ee?u.FileAccess.asBrowserUri((0,r.joinPath)(x.extensionLocation,ee)).toString(!0):T.DefaultIconPath},when:I.ContextKeyExpr.deserialize(j??q.when)??I.ContextKeyExpr.true()};this._registerWalkthrough(ie),this._onDidAddWalkthrough.fire(this.resolveWalkthrough(ie))})),this.storageService.store(e.walkthroughMetadataConfigurationKey,JSON.stringify([...this.metadata.entries()]),0,0),U&&this.configurationService.getValue("workbench.welcomePage.walkthroughs.openOnInstall")&&(this.telemetryService.publicLog2("gettingStarted.didAutoOpenWalkthrough",{id:U}),this.commandService.executeCommand("workbench.action.openWalkthrough",U,!0))}unregisterExtensionWalkthroughContributions(x){!x.contributes?.walkthroughs?.length||x.contributes?.walkthroughs?.forEach(H=>{const W=x.identifier.value+"#"+H.id;H.steps.forEach(U=>{const $=x.identifier.value+"#"+H.id+"#"+U.id;this.steps.delete($)}),this.gettingStartedContributions.delete(W),this._onDidRemoveWalkthrough.fire(W)})}getWalkthrough(x){const H=this.gettingStartedContributions.get(x);if(!H)throw Error("Trying to get unknown walkthrough: "+x);return this.resolveWalkthrough(H)}getWalkthroughs(){return[...this.gettingStartedContributions.values()].map(W=>({...W,content:{type:"steps",steps:W.steps}})).filter(W=>W.content.type!=="steps"||W.content.steps.length).map(W=>this.resolveWalkthrough(W))}resolveWalkthrough(x){const H=x.steps.map(K=>this.getStepProgress(K)),W=this.metadata.get(x.id)?.manaullyOpened,U=this.metadata.get(x.id)?.firstSeen,$=U&&U>+new Date-M,q=this.metadata.get(x.id)?.stepIDs,X=this.gettingStartedContributions.get(x.id);if(!X)throw Error("Could not find walkthrough with id "+x.id);const G=X.steps.map(K=>K.id),Q=q&&(G.length!==q.length||G.some((K,Y)=>K!==q[Y]));let j=0;if(U){const Y=+new Date-U;j=Math.max(0,(M-Y)/M)}return{...x,recencyBonus:j,steps:H,newItems:!!Q,newEntry:!!($&&!W)}}getStepProgress(x){return{...x,done:!1,...this.stepProgress[x.id]}}progressStep(x){const H=this.stepProgress[x];if(!H||H.done!==!0){this.stepProgress[x]={done:!0},this.memento.saveMemento();const W=this.getStep(x);if(!W)throw Error("Tried to progress unknown step");this._onDidProgressStep.fire(this.getStepProgress(W))}}deprogressStep(x){delete this.stepProgress[x],this.memento.saveMemento();const H=this.getStep(x);this._onDidProgressStep.fire(this.getStepProgress(H))}progressByEvent(x){this.sessionEvents.has(x)||(this.sessionEvents.add(x),this.completionListeners.get(x)?.forEach(H=>this.progressStep(H)))}registerWalkthrough(x){this._registerWalkthrough({...x,steps:x.steps.map(H=>({...H,description:N(H.description)}))})}_registerWalkthrough(x){if(this.gettingStartedContributions.get(x.id)){console.error(`Skipping attempt to overwrite walkthrough. (${x.id})`);return}this.gettingStartedContributions.set(x.id,x),x.steps.forEach(W=>{if(this.steps.has(W.id))throw Error("Attempting to register step with id "+W.id+" twice. Second is dropped.");this.steps.set(W.id,W),W.when.keys().forEach(U=>this.categoryVisibilityContextKeys.add(U)),this.registerDoneListeners(W)}),x.when.keys().forEach(W=>this.categoryVisibilityContextKeys.add(W))}registerDoneListeners(x){if(x.doneOn){console.error("wakthrough step",x,"uses deprecated 'doneOn' property. Adopt 'completionEvents' to silence this warning");return}x.completionEvents.length||(x.completionEvents=(0,g.coalesce)((0,g.flatten)(x.description.filter(H=>H.nodes.length===1).map(H=>H.nodes.filter(W=>typeof W!="string").map(({href:W})=>{if(W.startsWith("command:"))return"onCommand:"+W.slice(8,W.includes("?")?W.indexOf("?"):void 0);if(W.startsWith("https://")||W.startsWith("http://"))return"onLink:"+W}))))),x.completionEvents.length||x.completionEvents.push("stepSelected");for(let H of x.completionEvents){const[W,U,$]=/^([^:]*):?(.*)$/.exec(H)??[];if(!U){console.error(`Unknown completionEvent ${H} when registering step ${x.id}`);continue}switch(U){case"onLink":case"onEvent":case"onView":case"onSettingChanged":break;case"onContext":{const q=I.ContextKeyExpr.deserialize($);q?(this.stepCompletionContextKeyExpressions.add(q),q.keys().forEach(X=>this.stepCompletionContextKeys.add(X)),H=U+":"+q.serialize(),this.contextService.contextMatchesRules(q)&&this.sessionEvents.add(H)):console.error("Unable to parse context key expression:",q,"in walkthrough step",x.id);break}case"onStepSelected":case"stepSelected":H="stepSelected:"+x.id;break;case"onCommand":H=U+":"+$.replace(/^toSide:/,"");break;case"onExtensionInstalled":case"extensionInstalled":H="extensionInstalled:"+$.toLowerCase();break;default:console.error(`Unknown completionEvent ${H} when registering step ${x.id}`);continue}this.registerCompletionListener(H,x),this.sessionEvents.has(H)&&this.progressStep(x.id)}}registerCompletionListener(x,H){this.completionListeners.has(x)||this.completionListeners.set(x,new Set),this.completionListeners.get(x)?.add(H.id)}getStep(x){const H=this.steps.get(x);if(!H)throw Error("Attempting to access step which does not exist in registry "+x);return H}};O=we([F(0,R.IStorageService),F(1,E.ICommandService),F(2,t.IInstantiationService),F(3,D.IWorkspaceContextService),F(4,I.IContextKeyService),F(5,S.IUserDataSyncEnablementService),F(6,s.IConfigurationService),F(7,i.IExtensionManagementService),F(8,l.IHostService),F(9,h.IViewsService),F(10,m.ITelemetryService),F(11,c.IWorkbenchAssignmentService)],O),e.WalkthroughsService=O;const N=z=>z.split(` `).filter(x=>x).map(x=>(0,d.parseLinkedText)(x)),P=z=>z.startsWith("https://")?C.URI.parse(z,!0):u.FileAccess.asFileUri("vs/workbench/contrib/welcomeGettingStarted/common/media/"+z,J);e.convertInternalMediaPathToFileURI=P;const B=z=>z.startsWith("https://")?C.URI.parse(z,!0):u.FileAccess.asBrowserUri("vs/workbench/contrib/welcomeGettingStarted/common/media/"+z,J),V=z=>{if(typeof z=="string"){const x=B(z);return{hcDark:x,hcLight:x,dark:x,light:x}}else return{hcDark:B(z.hc),hcLight:B(z.hcLight??z.light),light:B(z.light),dark:B(z.dark)}};(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"resetGettingStartedProgress",category:{original:"Developer",value:(0,v.localize)(1,null)},title:{original:"Reset Welcome Page Walkthrough Progress",value:(0,v.localize)(2,null)},f1:!0})}run(z){const x=z.get(e.IWalkthroughsService),H=z.get(R.IStorageService);H.store(e.hiddenEntriesConfigurationKey,JSON.stringify([]),0,0),H.store(e.walkthroughMetadataConfigurationKey,JSON.stringify([]),0,0);const W=new A.Memento("gettingStartedService",z.get(R.IStorageService)),U=W.getMemento(0,0);for(const $ in U)if(Object.prototype.hasOwnProperty.call(U,$))try{x.deprogressStep($)}catch(q){console.error(q)}W.saveMemento()}}),(0,a.registerSingleton)(e.IWalkthroughsService,O,1)}),define(ae[960],le([1,0,20,203]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.addContextToEditorMatches=e.editorMatchesToTextSearchResults=void 0;function R(I,b,S){const C=I[0].range.startLineNumber,r=I[I.length-1].range.endLineNumber,u=[];for(let i=C;i<=r;i++)u.push(b.getLineContent(i));return new p.TextSearchMatch(u.join(` `)+` `,I.map(i=>new t.Range(i.range.startLineNumber-1,i.range.startColumn-1,i.range.endLineNumber-1,i.range.endColumn-1)),S)}function A(I,b,S){let C=-1;const r=[];let u=[];return I.forEach(i=>{i.range.startLineNumber!==C&&(u=[],r.push(u)),u.push(i),C=i.range.endLineNumber}),r.map(i=>R(i,b,S))}e.editorMatchesToTextSearchResults=A;function k(I,b,S){const C=[];let r=-1;for(let u=0;u<I.length;u++){const{start:i,end:f}=E(I[u]);if(typeof S.beforeContext=="number"&&S.beforeContext>0){const s=Math.max(r+1,i-S.beforeContext);for(let d=s;d<i;d++)C.push({text:b.getLineContent(d+1),lineNumber:d})}C.push(I[u]);const c=I[u+1],l=c?E(c).start:Number.MAX_VALUE;if(typeof S.afterContext=="number"&&S.afterContext>0){const s=Math.min(l-1,f+S.afterContext,b.getLineCount()-1);for(let d=f+1;d<=s;d++)C.push({text:b.getLineContent(d+1),lineNumber:d})}r=f}return C}e.addContextToEditorMatches=k;function E(I){const b=I.ranges,S=Array.isArray(b)?b[0].startLineNumber:b.startLineNumber,C=Array.isArray(b)?b[b.length-1].endLineNumber:b.endLineNumber;return{start:S,end:C}}}),define(ae[352],le([1,0,11,32,304,112,21,6,206,2,60,22,28,220,9,20,116,94,54,8,5,49,27,33,12,57,451,2727,203,960]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arrayContainsElementOrParent=e.RangeHighlightDecorations=e.ISearchWorkbenchService=e.SearchWorkbenchService=e.SearchModel=e.SearchResult=e.searchComparer=e.searchMatchComparer=e.FolderMatchNoRoot=e.FolderMatchWorkspaceRoot=e.FolderMatchWithResource=e.FolderMatch=e.FileMatch=e.Match=void 0;class T{constructor(j,K,Y,ee){this._parent=j,this._fullPreviewLines=K,this._oneLinePreviewText=K[Y.startLineNumber];const ie=Y.startLineNumber===Y.endLineNumber?Y.endColumn:this._oneLinePreviewText.length;this._rangeInPreviewText=new D.OneLineRange(1,Y.startColumn+1,ie+1),this._range=new f.Range(ee.startLineNumber+1,ee.startColumn+1,ee.endLineNumber+1,ee.endColumn+1),this._fullPreviewRange=Y,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 j=this._oneLinePreviewText.substring(0,this._rangeInPreviewText.startColumn-1),K=this.getMatchString(),Y=this._oneLinePreviewText.substring(this._rangeInPreviewText.endColumn-1);j=(0,r.lcut)(j,26),j=j.trimLeft();let ee=T.MAX_PREVIEW_CHARS-j.length;return K=K.substr(0,ee),ee-=K.length,Y=Y.substr(0,ee),{before:j,inside:K,after:Y}}get replaceString(){const j=this.parent().parent().searchModel;if(!j.replacePattern)throw new Error("searchModel.replacePattern must be set before accessing replaceString");const K=this.fullMatchText();let Y=j.replacePattern.getReplaceString(K,j.preserveCase);if(Y===null){const ee=this.fullMatchText(!0);if(Y=j.replacePattern.getReplaceString(ee,j.preserveCase),Y===null){const ie=ee.replace(/\r\n/g,` `);Y=j.replacePattern.getReplaceString(ie,j.preserveCase)}}return Y===null&&(Y=j.replacePattern.pattern),Y}fullMatchText(j=!1){let K;return j?K=this._fullPreviewLines:(K=this._fullPreviewLines.slice(this._fullPreviewRange.startLineNumber,this._fullPreviewRange.endLineNumber+1),K[K.length-1]=K[K.length-1].slice(0,this._fullPreviewRange.endColumn),K[0]=K[0].slice(this._fullPreviewRange.startColumn)),K.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)}}T.MAX_PREVIEW_CHARS=250,we([A.memoize],T.prototype,"preview",null),e.Match=T;let _=class Er extends b.Disposable{static getDecorationOption(j){return j?Er._CURRENT_FIND_MATCH:Er._FIND_MATCH}get context(){return new Map(this._context)}constructor(j,K,Y,ee,ie,re,oe,se,te){super(),this._query=j,this._previewOptions=K,this._maxResults=Y,this._parent=ee,this.rawMatch=ie,this._closestRoot=re,this.modelService=oe,this.replaceService=se,this.labelService=te,this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._onDispose=this._register(new E.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._name=new I.Lazy(()=>te.getUriBasenameLabel(this.resource)),this.createMatches()}get closestRoot(){return this._closestRoot}createMatches(){const j=this.modelService.getModel(this._resource);j?(this.bindModel(j),this.updateMatchesForModel()):(this.rawMatch.results.filter(D.resultIsMatch).forEach(K=>{q(K,this).forEach(Y=>this.add(Y))}),this.addContext(this.rawMatch.results))}bindModel(j){this._model=j,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.changeDecorations(j=>{this._modelDecorations=j.deltaDecorations(this._modelDecorations,[])}),this._model=null,this._modelListener.dispose())}updateMatchesForModel(){if(!this._model)return;this._matches=new Map;const j=this._query.isWordMatch&&this._query.wordSeparators?this._query.wordSeparators:null,K=this._model.findMatches(this._query.pattern,this._model.getFullModelRange(),!!this._query.isRegExp,!!this._query.isCaseSensitive,j,!1,this._maxResults??Number.MAX_SAFE_INTEGER);this.updateMatches(K,!0)}updatesMatchesForLineAfterReplace(j,K){if(!this._model)return;const Y={startLineNumber:j,startColumn:this._model.getLineMinColumn(j),endLineNumber:j,endColumn:this._model.getLineMaxColumn(j)};Array.from(this._matches.values()).filter(oe=>oe.range().startLineNumber===j).forEach(oe=>this._matches.delete(oe.id()));const ie=this._query.isWordMatch&&this._query.wordSeparators?this._query.wordSeparators:null,re=this._model.findMatches(this._query.pattern,Y,!!this._query.isRegExp,!!this._query.isCaseSensitive,ie,!1,this._maxResults??Number.MAX_SAFE_INTEGER);this.updateMatches(re,K)}updateMatches(j,K){if(!this._model)return;const Y=(0,y.editorMatchesToTextSearchResults)(j,this._model,this._previewOptions);Y.forEach(ee=>{q(ee,this).forEach(ie=>{this._removedMatches.has(ie.id())||(this.add(ie),this.isMatchSelected(ie)&&(this._selectedMatch=ie))})}),this.addContext((0,y.addContextToEditorMatches)(Y,this._model,this.parent().parent().query).filter(ee=>!(0,D.resultIsMatch)(ee)).map(ee=>({...ee,lineNumber:ee.lineNumber+1}))),this._onChange.fire({forceUpdateModel:K}),this.updateHighlights()}updateHighlights(){!this._model||this._model.changeDecorations(j=>{const K=this.parent().showHighlights?this.matches().map(Y=>({range:Y.range(),options:Er.getDecorationOption(this.isMatchSelected(Y))})):[];this._modelDecorations=j.deltaDecorations(this._modelDecorations,K)})}id(){return this.resource.toString()}parent(){return this._parent}matches(){return Array.from(this._matches.values())}remove(j){Array.isArray(j)||(j=[j]);for(const K of j)this.removeMatch(K),this._removedMatches.add(K.id());this._onChange.fire({didRemove:!0})}async replace(j){return this.replaceQ=this.replaceQ.finally(async()=>{await this.replaceService.replace(j),this.updatesMatchesForLineAfterReplace(j.range().startLineNumber,!1)})}setSelectedMatch(j){j&&(!this._matches.has(j.id())||this.isMatchSelected(j))||(this._selectedMatch=j,this.updateHighlights())}getSelectedMatch(){return this._selectedMatch}isMatchSelected(j){return!!this._selectedMatch&&this._selectedMatch.id()===j.id()}count(){return this.matches().length}get resource(){return this._resource}name(){return this._name.getValue()}addContext(j){!j||j.filter(K=>!(0,D.resultIsMatch)(K)).forEach(K=>this._context.set(K.lineNumber,K.text))}add(j,K){this._matches.set(j.id(),j),K&&this._onChange.fire({forceUpdateModel:!0})}removeMatch(j){this._matches.delete(j.id()),this.isMatchSelected(j)?this.setSelectedMatch(null):this.updateHighlights()}async resolveFileStat(j){this._fileStat=await j.stat(this.resource).catch(()=>{})}get fileStat(){return this._fileStat}set fileStat(j){this._fileStat=j}dispose(){this.setSelectedMatch(null),this.unbindModel(),this._onDispose.fire(),super.dispose()}};_._CURRENT_FIND_MATCH=l.ModelDecorationOptions.register({description:"search-current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",overviewRuler:{color:(0,h.themeColorFromId)(g.overviewRulerFindMatchForeground),position:c.OverviewRulerLane.Center},minimap:{color:(0,h.themeColorFromId)(g.minimapFindMatch),position:c.MinimapPosition.Inline}}),_._FIND_MATCH=l.ModelDecorationOptions.register({description:"search-find-match",stickiness:1,className:"findMatch",overviewRuler:{color:(0,h.themeColorFromId)(g.overviewRulerFindMatchForeground),position:c.OverviewRulerLane.Center},minimap:{color:(0,h.themeColorFromId)(g.minimapFindMatch),position:c.MinimapPosition.Inline}}),_=we([F(6,s.IModelService),F(7,m.IReplaceService),F(8,a.ILabelService)],_),e.FileMatch=_;let L=class pl extends b.Disposable{constructor(j,K,Y,ee,ie,re,oe,se,te,Z,ne){super(),this._resource=j,this._id=K,this._index=Y,this._query=ee,this._parent=ie,this._searchModel=re,this._closestRoot=oe,this.replaceService=se,this.instantiationService=te,this.labelService=Z,this.uriIdentityService=ne,this._onChange=this._register(new E.Emitter),this.onChange=this._onChange.event,this._onDispose=this._register(new E.Emitter),this.onDispose=this._onDispose.event,this._replacingAll=!1,this._fileMatches=new S.ResourceMap,this._folderMatches=new S.ResourceMap,this._folderMatchesMap=u.TernarySearchTree.forUris(ce=>this.uriIdentityService.extUri.ignorePathCasing(ce)),this._unDisposedFileMatches=new S.ResourceMap,this._unDisposedFolderMatches=new S.ResourceMap,this._name=new I.Lazy(()=>this.resource?Z.getUriBasenameLabel(this.resource):"")}get searchModel(){return this._searchModel}get showHighlights(){return this._parent.showHighlights}get closestRoot(){return this._closestRoot}set replacingAll(j){this._replacingAll=j}id(){return this._id}get resource(){return this._resource}index(){return this._index}name(){return this._name.getValue()}parent(){return this._parent}bindModel(j){const K=this._fileMatches.get(j.uri);K?K.bindModel(j):this.getFolderMatch(j.uri)?.getDownstreamFileMatch(j.uri)?.bindModel(j)}createIntermediateFolderMatch(j,K,Y,ee,ie){const re=this.instantiationService.createInstance(M,j,K,Y,ee,this,this._searchModel,ie);return this.configureIntermediateMatch(re),this.doAddFolder(re),re}configureIntermediateMatch(j){const K=j.onChange(Y=>this.onFolderChange(j,Y));j.onDispose(()=>K.dispose())}clear(j=!1){const K=this.allDownstreamFileMatches();this.disposeMatches(),this._onChange.fire({elements:K,removed:!0,added:!1,clearingAll:j})}remove(j){Array.isArray(j)||(j=[j]);const K=G(j);this.doRemoveFile(K)}replace(j){return this.replaceService.replace([j]).then(()=>{this.doRemoveFile([j])})}replaceAll(){const j=this.matches();return this.batchReplace(j)}matches(){return[...this.fileMatchesIterator(),...this.folderMatchesIterator()]}fileMatchesIterator(){return this._fileMatches.values()}folderMatchesIterator(){return this._folderMatches.values()}isEmpty(){return this.fileCount()+this.folderCount()===0}getDownstreamFileMatch(j){const K=this._fileMatches.get(j);if(K)return K;const ee=this.getFolderMatch(j)?.getDownstreamFileMatch(j);return ee||null}allDownstreamFileMatches(){let j=[];const K=this.folderMatchesIterator();for(const Y of K)j=j.concat(Y.allDownstreamFileMatches());return[...this.fileMatchesIterator(),...j]}fileCount(){return this._fileMatches.size}folderCount(){return this._folderMatches.size}count(){return this.fileCount()+this.folderCount()}recursiveFileCount(){return this.allDownstreamFileMatches().length}recursiveMatchCount(){return this.allDownstreamFileMatches().reduce((j,K)=>j+K.count(),0)}get query(){return this._query}addFileMatch(j,K){const Y=[],ee=[];j.forEach(re=>{const oe=this.getDownstreamFileMatch(re.resource);if(oe)re.results.filter(D.resultIsMatch).forEach(se=>{q(se,oe).forEach(te=>oe.add(te))}),ee.push(oe),oe.addContext(re.results);else if(this instanceof O||this instanceof N){const se=this.createAndConfigureFileMatch(re);Y.push(se)}});const ie=[...Y,...ee];!K&&ie.length&&this._onChange.fire({elements:ie,added:!!Y.length})}doAddFile(j){this._fileMatches.set(j.resource,j),this._unDisposedFileMatches.has(j.resource)&&this._unDisposedFileMatches.delete(j.resource)}uriHasParent(j,K){return this.uriIdentityService.extUri.isEqualOrParent(K,j)&&!this.uriIdentityService.extUri.isEqual(K,j)}isInParentChain(j){let K=this;for(;K instanceof pl;){if(K.id()===j.id())return!0;K=K.parent()}return!1}getFolderMatch(j){return this._folderMatchesMap.findSubstr(j)}doAddFolder(j){if(this instanceof M&&!this.uriHasParent(this.resource,j.resource))throw Error(`${j.resource} does not belong as a child of ${this.resource}`);if(this.isInParentChain(j))throw Error(`${j.resource} is a parent of ${this.resource}`);this._folderMatches.set(j.resource,j),this._folderMatchesMap.set(j.resource,j),this._unDisposedFolderMatches.has(j.resource)&&this._unDisposedFolderMatches.delete(j.resource)}async batchReplace(j){const K=G(j);await this.replaceService.replace(K),this.doRemoveFile(K,!0,!0)}onFileChange(j,K=!1){let Y=!1;this._fileMatches.has(j.resource)||(this.doAddFile(j),Y=!0),j.count()===0&&(this.doRemoveFile([j],!1,!1),Y=!1,K=!0),this._replacingAll||this._onChange.fire({elements:[j],added:Y,removed:K})}onFolderChange(j,K){this._folderMatches.has(j.resource)||this.doAddFolder(j),j.isEmpty()&&(this._folderMatches.delete(j.resource),j.dispose()),this._onChange.fire(K)}doRemoveFile(j,K=!0,Y=!0){const ee=[];for(const ie of j)if(this._fileMatches.get(ie.resource))this._fileMatches.delete(ie.resource),K?ie.dispose():this._unDisposedFileMatches.set(ie.resource,ie),ee.push(ie);else{const re=this.getFolderMatch(ie.resource);if(re)re.doRemoveFile([ie],K,Y);else throw Error(`FileMatch ${ie.resource} is not located within FolderMatch ${this.resource}`)}Y&&this._onChange.fire({elements:ee,removed:!0})}disposeMatches(){[...this._fileMatches.values()].forEach(j=>j.dispose()),[...this._folderMatches.values()].forEach(j=>j.disposeMatches()),[...this._unDisposedFileMatches.values()].forEach(j=>j.dispose()),[...this._unDisposedFolderMatches.values()].forEach(j=>j.disposeMatches()),this._fileMatches.clear(),this._folderMatches.clear(),this._unDisposedFileMatches.clear(),this._unDisposedFolderMatches.clear()}dispose(){this.disposeMatches(),this._onDispose.fire(),super.dispose()}};L=we([F(7,m.IReplaceService),F(8,n.IInstantiationService),F(9,a.ILabelService),F(10,v.IUriIdentityService)],L),e.FolderMatch=L;let M=class extends L{constructor(j,K,Y,ee,ie,re,oe,se,te,Z,ne){super(j,K,Y,ee,ie,re,oe,se,te,Z,ne)}get resource(){return this._resource}};M=we([F(7,m.IReplaceService),F(8,n.IInstantiationService),F(9,a.ILabelService),F(10,v.IUriIdentityService)],M),e.FolderMatchWithResource=M;let O=class extends M{constructor(j,K,Y,ee,ie,re,oe,se,te,Z){super(j,K,Y,ee,ie,re,null,oe,se,te,Z)}uriParent(j){return this.uriIdentityService.extUri.dirname(j)}uriEquals(j,K){return this.uriIdentityService.extUri.isEqual(j,K)}createFileMatch(j,K,Y,ee,ie,re){const oe=this.instantiationService.createInstance(_,j,K,Y,ee,ie,re);ee.doAddFile(oe);const se=oe.onChange(({didRemove:te})=>ee.onFileChange(oe,te));return oe.onDispose(()=>se.dispose()),oe}createAndConfigureFileMatch(j){if(!this.uriHasParent(this.resource,j.resource))throw Error(`${j.resource} is not a descendant of ${this.resource}`);const K=[];let Y=this.uriParent(j.resource);for(;!this.uriEquals(this.resource,Y);){K.unshift(Y);const re=Y;if(Y=this.uriParent(Y),this.uriEquals(re,Y))throw Error(`${j.resource} is not correctly configured as a child of its ${this.resource}`)}const ee=this.closestRoot??this;let ie=this;for(let re=0;re<K.length;re++){let oe=ie.getFolderMatch(K[re]);oe||(oe=ie.createIntermediateFolderMatch(K[re],K[re].toString(),-1,this._query,ee)),ie=oe}return this.createFileMatch(this._query.contentPattern,this._query.previewOptions,this._query.maxResults,ie,j,ee)}};O=we([F(6,m.IReplaceService),F(7,n.IInstantiationService),F(8,a.ILabelService),F(9,v.IUriIdentityService)],O),e.FolderMatchWorkspaceRoot=O;let N=class extends L{constructor(j,K,Y,ee,ie,re,oe,se,te){super(null,j,K,Y,ee,ie,null,re,oe,se,te)}createAndConfigureFileMatch(j){const K=this.instantiationService.createInstance(_,this._query.contentPattern,this._query.previewOptions,this._query.maxResults,this,j,null);this.doAddFile(K);const Y=K.onChange(({didRemove:ee})=>this.onFileChange(K,ee));return K.onDispose(()=>Y.dispose()),K}};N=we([F(5,m.IReplaceService),F(6,n.IInstantiationService),F(7,a.ILabelService),F(8,v.IUriIdentityService)],N),e.FolderMatchNoRoot=N;let P=-1,B=-1;function V(Q,j,K="default"){if(Q instanceof _&&j instanceof L)return 1;if(j instanceof _&&Q instanceof L)return-1;if(Q instanceof L&&j instanceof L){if(P=Q.index(),B=j.index(),P!==-1&&B!==-1)return P-B;switch(K){case"countDescending":return j.count()-Q.count();case"countAscending":return Q.count()-j.count();case"type":return(0,R.compareFileExtensions)(Q.name(),j.name());case"fileNames":return(0,R.compareFileNames)(Q.name(),j.name());default:return!Q.resource||!j.resource?0:(0,R.comparePaths)(Q.resource.fsPath,j.resource.fsPath)||(0,R.compareFileNames)(Q.name(),j.name())}}if(Q instanceof _&&j instanceof _)switch(K){case"countDescending":return j.count()-Q.count();case"countAscending":return Q.count()-j.count();case"type":return(0,R.compareFileExtensions)(Q.name(),j.name());case"fileNames":return(0,R.compareFileNames)(Q.name(),j.name());case"modified":{const Y=Q.fileStat,ee=j.fileStat;if(Y&&ee)return ee.mtime-Y.mtime}default:return(0,R.comparePaths)(Q.resource.fsPath,j.resource.fsPath)||(0,R.compareFileNames)(Q.name(),j.name())}return Q instanceof T&&j instanceof T?f.Range.compareRangesUsingStarts(Q.range(),j.range()):0}e.searchMatchComparer=V;function z(Q,j,K="default"){const Y=x(Q),ee=x(j);let ie=Y.length-1,re=ee.length-1;for(;ie>=0&&re>=0;){if(Y[ie].id()!==ee[re].id())return V(Y[ie],ee[re],K);ie--,re--}const oe=ie===0,se=re===0;return oe&&!se?1:!oe&&se?-1:0}e.searchComparer=z;function x(Q){const j=[];let K=Q;for(;!(K instanceof H);)j.push(K),K=K.parent();return j}let H=class extends b.Disposable{constructor(j,K,Y,ee,ie){super(),this._searchModel=j,this.replaceService=K,this.instantiationService=Y,this.modelService=ee,this.uriIdentityService=ie,this._onChange=this._register(new E.PauseableEmitter({merge:this.mergeEvents})),this.onChange=this._onChange.event,this._folderMatches=[],this._otherFilesMatch=null,this._folderMatchesMap=u.TernarySearchTree.forUris(re=>this.uriIdentityService.extUri.ignorePathCasing(re)),this._showHighlights=!1,this._query=null,this.disposePastResults=()=>{},this._isDirty=!1,this._rangeHighlightDecorations=this.instantiationService.createInstance($),this._register(this.modelService.onModelAdded(re=>this.onModelAdded(re))),this._register(this.onChange(re=>{re.removed&&(this._isDirty=!this.isEmpty())}))}async batchReplace(j){try{this._onChange.pause(),await Promise.all(j.map(async K=>{const Y=K.parent();(Y instanceof L||Y instanceof _)&&X(Y,j)||(K instanceof _?await K.parent().replace(K):K instanceof T?await K.parent().replace(K):K instanceof L&&await K.replaceAll())}))}finally{this._onChange.resume()}}batchRemove(j){try{this._onChange.pause(),j.forEach(K=>K.parent().remove(K))}finally{this._onChange.resume()}}get isDirty(){return this._isDirty}get query(){return this._query}set query(j){const K=this.folderMatches();new Promise(Y=>this.disposePastResults=Y).then(()=>K.forEach(Y=>Y.clear())).then(()=>K.forEach(Y=>Y.dispose())).then(()=>this._isDirty=!1),this._rangeHighlightDecorations.removeHighlightRange(),this._folderMatchesMap=u.TernarySearchTree.forUris(Y=>this.uriIdentityService.extUri.ignorePathCasing(Y)),j&&(this._folderMatches=(j&&j.folderQueries||[]).map(Y=>Y.folder).map((Y,ee)=>this._createBaseFolderMatch(Y,Y.toString(),ee,j)),this._folderMatches.forEach(Y=>this._folderMatchesMap.set(Y.resource,Y)),this._otherFilesMatch=this._createBaseFolderMatch(null,"otherFiles",this._folderMatches.length+1,j),this._query=j)}mergeEvents(j){const K={elements:[],added:!1,removed:!1};return j.forEach(Y=>{Y.added&&(K.added=!0),Y.removed&&(K.removed=!0),K.elements=K.elements.concat(Y.elements)}),K}onModelAdded(j){this._folderMatchesMap.findSubstr(j.uri)?.bindModel(j)}_createBaseFolderMatch(j,K,Y,ee){let ie;j?ie=this.instantiationService.createInstance(O,j,K,Y,ee,this,this._searchModel):ie=this.instantiationService.createInstance(N,K,Y,ee,this,this._searchModel);const re=ie.onChange(oe=>this._onChange.fire(oe));return ie.onDispose(()=>re.dispose()),ie}get searchModel(){return this._searchModel}add(j,K=!1){const{byFolder:Y,other:ee}=this.groupFilesByFolder(j);Y.forEach(ie=>{if(!ie.length)return;this.getFolderMatch(ie[0].resource)?.addFileMatch(ie,K)}),this._otherFilesMatch?.addFileMatch(ee,K),this.disposePastResults()}clear(){this.folderMatches().forEach(j=>j.clear(!0)),this.disposeMatches(),this._folderMatches=[],this._otherFilesMatch=null}remove(j){Array.isArray(j)||(j=[j]),j.forEach(ie=>{ie instanceof L&&ie.clear()});const K=j.filter(ie=>ie instanceof _),{byFolder:Y,other:ee}=this.groupFilesByFolder(K);Y.forEach(ie=>{!ie.length||this.getFolderMatch(ie[0].resource).remove(ie)}),ee.length&&this.getFolderMatch(ee[0].resource).remove(ee)}replace(j){return this.getFolderMatch(j.resource).replace(j)}replaceAll(j){return this.replacingAll=!0,this.replaceService.replace(this.matches(),j).then(()=>{this.replacingAll=!1,this.clear()},()=>{this.replacingAll=!1})}folderMatches(){return this._otherFilesMatch?[...this._folderMatches,this._otherFilesMatch]:[...this._folderMatches]}matches(){const j=[];return this.folderMatches().forEach(K=>{j.push(K.allDownstreamFileMatches())}),[].concat(...j)}isEmpty(){return this.folderMatches().every(j=>j.isEmpty())}fileCount(){return this.folderMatches().reduce((j,K)=>j+K.recursiveFileCount(),0)}count(){return this.matches().reduce((j,K)=>j+K.count(),0)}get showHighlights(){return this._showHighlights}toggleHighlights(j){if(this._showHighlights===j)return;this._showHighlights=j;let K=null;this.matches().forEach(Y=>{Y.updateHighlights(),K||(K=Y.getSelectedMatch())}),this._showHighlights&&K?this._rangeHighlightDecorations.highlightRange(K.parent().resource,K.range()):this._rangeHighlightDecorations.removeHighlightRange()}get rangeHighlightDecorations(){return this._rangeHighlightDecorations}getFolderMatch(j){const K=this._folderMatchesMap.findSubstr(j);return K||this._otherFilesMatch}set replacingAll(j){this.folderMatches().forEach(K=>{K.replacingAll=j})}groupFilesByFolder(j){const K=new S.ResourceMap,Y=[];return this._folderMatches.forEach(ee=>K.set(ee.resource,[])),j.forEach(ee=>{const ie=this.getFolderMatch(ee.resource);if(!ie)return;const re=ie.resource;re?K.get(re).push(ee):Y.push(ee)}),{byFolder:K,other:Y}}disposeMatches(){this.folderMatches().forEach(j=>j.dispose()),this._folderMatches=[],this._folderMatchesMap=u.TernarySearchTree.forUris(j=>this.uriIdentityService.extUri.ignorePathCasing(j)),this._rangeHighlightDecorations.removeHighlightRange()}dispose(){this.disposePastResults(),this.disposeMatches(),this._rangeHighlightDecorations.dispose(),super.dispose()}};H=we([F(1,m.IReplaceService),F(2,n.IInstantiationService),F(3,s.IModelService),F(4,v.IUriIdentityService)],H),e.SearchResult=H;let W=class extends b.Disposable{constructor(j,K,Y,ee){super(),this.searchService=j,this.telemetryService=K,this.configurationService=Y,this.instantiationService=ee,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 E.Emitter),this.onReplaceTermChanged=this._onReplaceTermChanged.event,this.currentCancelTokenSource=null,this.searchCancelledForNewSearch=!1,this._searchResult=this.instantiationService.createInstance(H,this)}isReplaceActive(){return this._replaceActive}set replaceActive(j){this._replaceActive=j}get replacePattern(){return this._replacePattern}get replaceString(){return this._replaceString||""}set preserveCase(j){this._preserveCase=j}get preserveCase(){return this._preserveCase}set replaceString(j){this._replaceString=j,this._searchQuery&&(this._replacePattern=new w.ReplacePattern(j,this._searchQuery.contentPattern)),this._onReplaceTermChanged.fire()}get searchResult(){return this._searchResult}async search(j,K){this.cancelSearch(!0),this._searchQuery=j,this.searchConfig.searchOnType||this.searchResult.clear(),this._searchResult.query=this._searchQuery;const Y=new E.Emitter;this._replacePattern=new w.ReplacePattern(this.replaceString,this._searchQuery.contentPattern),this._startStreamDelay=new Promise(se=>setTimeout(se,this.searchConfig.searchOnType?150:0));const ee=this.currentCancelTokenSource=new p.CancellationTokenSource,ie=this.searchService.textSearch(this._searchQuery,this.currentCancelTokenSource.token,se=>{Y.fire(),this.onSearchProgress(se),K?.(se)}),re=()=>ee.dispose();ie.then(re,re);const oe=Date.now();Promise.race([ie,E.Event.toPromise(Y.event)]).finally(()=>{this.telemetryService.publicLog("searchResultsFirstRender",{duration:Date.now()-oe})}),ie.then(se=>this.onSearchCompleted(se,Date.now()-oe),se=>this.onSearchError(se,Date.now()-oe));try{return await ie}finally{this.telemetryService.publicLog("searchResultsFinished",{duration:Date.now()-oe})}}onSearchCompleted(j,K){if(!this._searchQuery)throw new Error("onSearchCompleted must be called after a search is started");this._searchResult.add(this._resultQueue),this._resultQueue.length=0;const Y=Object.assign({},this._searchQuery.contentPattern);delete Y.pattern;const ee=j&&j.stats,ie=this._searchQuery.folderQueries.every(se=>se.folder.scheme===C.Schemas.file),re=this._searchQuery.folderQueries.every(se=>se.folder.scheme!==C.Schemas.file),oe=ie?C.Schemas.file:re?"other":"mixed";return this.telemetryService.publicLog("searchResultsShown",{count:this._searchResult.count(),fileCount:this._searchResult.fileCount(),options:Y,duration:K,type:ee&&ee.type,scheme:oe,searchOnTypeEnabled:this.searchConfig.searchOnType}),j}onSearchError(j,K){k.isCancellationError(j)&&(this.onSearchCompleted(this.searchCancelledForNewSearch?{exit:1,results:[],messages:[]}:null,K),this.searchCancelledForNewSearch=!1)}async onSearchProgress(j){j.resource&&(this._resultQueue.push(j),await this._startStreamDelay,this._resultQueue.length&&(this._searchResult.add(this._resultQueue,!0),this._resultQueue.length=0))}get searchConfig(){return this.configurationService.getValue("search")}cancelSearch(j=!1){return this.currentCancelTokenSource?(this.searchCancelledForNewSearch=j,this.currentCancelTokenSource.cancel(),!0):!1}dispose(){this.cancelSearch(),this.searchResult.dispose(),super.dispose()}};W=we([F(0,D.ISearchService),F(1,o.ITelemetryService),F(2,d.IConfigurationService),F(3,n.IInstantiationService)],W),e.SearchModel=W;let U=class{constructor(j){this.instantiationService=j,this._searchModel=null}get searchModel(){return this._searchModel||(this._searchModel=this.instantiationService.createInstance(W)),this._searchModel}};U=we([F(0,n.IInstantiationService)],U),e.SearchWorkbenchService=U,e.ISearchWorkbenchService=(0,n.createDecorator)("searchWorkbenchService");let $=class ml{constructor(j){this._modelService=j,this._decorationId=null,this._model=null,this._modelDisposables=new b.DisposableStore}removeHighlightRange(){if(this._model&&this._decorationId){const j=this._decorationId;this._model.changeDecorations(K=>{K.removeDecoration(j)})}this._decorationId=null}highlightRange(j,K,Y=0){let ee;i.URI.isUri(j)?ee=this._modelService.getModel(j):ee=j,ee&&this.doHighlightRange(ee,K)}doHighlightRange(j,K){this.removeHighlightRange(),j.changeDecorations(Y=>{this._decorationId=Y.addDecoration(K,ml._RANGE_HIGHLIGHT_DECORATION)}),this.setModel(j)}setModel(j){this._model!==j&&(this.clearModelListeners(),this._model=j,this._modelDisposables.add(this._model.onDidChangeDecorations(K=>{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)}};$._RANGE_HIGHLIGHT_DECORATION=l.ModelDecorationOptions.register({description:"search-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0}),$=we([F(0,s.IModelService)],$),e.RangeHighlightDecorations=$;function q(Q,j){const K=Q.preview.text.split(` `);if(Array.isArray(Q.ranges))return Q.ranges.map((Y,ee)=>{const ie=Q.preview.matches[ee];return new T(j,K,ie,Y)});{const Y=Q.preview.matches;return[new T(j,K,Y,Q.ranges)]}}function X(Q,j){do if(j.includes(Q))return!0;while(!(Q.parent()instanceof H)&&(Q=Q.parent()));return!1}e.arrayContainsElementOrParent=X;function G(Q){const j=[],K=[];return Q.forEach(Y=>{Y instanceof _?K.push(Y):j.push(Y)}),K.concat(j.map(Y=>Y.allDownstreamFileMatches()).flat())}}),define(ae[2732],le([1,0,16,11,21,2,60,22,146,13,54,19,25,27,57,43,24,39,203,960]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchService=void 0;let n=class extends A.Disposable{constructor(o,g,h,v,m,w,D){super(),this.modelService=o,this.editorService=g,this.telemetryService=h,this.logService=v,this.extensionService=m,this.fileService=w,this.uriIdentityService=D,this.fileSearchProviders=new Map,this.textSearchProviders=new Map,this.deferredFileSearchesByScheme=new Map,this.deferredTextSearchesByScheme=new Map,this.loggedSchemesMissingProviders=new Set}registerSearchResultProvider(o,g,h){let v,m;if(g===0)v=this.fileSearchProviders,m=this.deferredFileSearchesByScheme;else if(g===1)v=this.textSearchProviders,m=this.deferredTextSearchesByScheme;else throw new Error("Unknown SearchProviderType");return v.set(o,h),m.has(o)&&(m.get(o).complete(h),m.delete(o)),(0,A.toDisposable)(()=>{v.delete(o)})}async textSearch(o,g,h){const v=this.getLocalResults(o);h&&t.coalesce([...v.results.values()]).forEach(h);const m=D=>{(0,s.isFileMatch)(D)?!v.results.has(D.resource)&&h&&h(D):h&&h(D),(0,s.isProgressMessage)(D)&&this.logService.debug("SearchService#search",D.message)},w=await this.doSearch(o,g,m);return{...w,limitHit:w.limitHit||v.limitHit,results:[...w.results,...t.coalesce([...v.results.values()])]}}fileSearch(o,g){return this.doSearch(o,g)}doSearch(o,g,h){this.logService.trace("SearchService#search",JSON.stringify(o));const v=this.getSchemesInQuery(o),m=[Promise.resolve(null)];v.forEach(D=>m.push(this.extensionService.activateByEvent(`onSearch:${D}`))),m.push(this.extensionService.activateByEvent("onSearch:file"));const w=(async()=>{if(await Promise.all(m),await this.extensionService.whenInstalledExtensionsRegistered(),g&&g.isCancellationRequested)return Promise.reject(new R.CancellationError);const D=_=>{g&&g.isCancellationRequested||h?.(_)},y=await Promise.all(o.folderQueries.map(_=>this.fileService.exists(_.folder)));o.folderQueries=o.folderQueries.filter((_,L)=>y[L]);let T=await this.searchWithProviders(o,D,g);return T=t.coalesce(T),T.length?{limitHit:T[0]&&T[0].limitHit,stats:T[0].stats,messages:t.coalesce(t.flatten(T.map(_=>_.messages))).filter(t.uniqueFilter(_=>_.type+_.text+_.trusted)),results:t.flatten(T.map(_=>_.results))}:{limitHit:!1,results:[],messages:[]}})();return new Promise((D,y)=>{g&&g.onCancellationRequested(()=>{y(new R.CancellationError)}),w.then(D,y)})}getSchemesInQuery(o){const g=new Set;return o.folderQueries?.forEach(h=>g.add(h.folder.scheme)),o.extraFileResources?.forEach(h=>g.add(h.scheme)),g}async waitForProvider(o,g){const h=o===1?this.deferredFileSearchesByScheme:this.deferredTextSearchesByScheme;if(h.has(g))return h.get(g).p;{const v=new p.DeferredPromise;return h.set(g,v),v.p}}async searchWithProviders(o,g,h){const v=I.StopWatch.create(!1),m=[],w=this.groupFolderQueriesByScheme(o),D=[...w.keys()].some(y=>o.type===1?this.fileSearchProviders.has(y):this.textSearchProviders.has(y));return await Promise.all([...w.keys()].map(async y=>{const T=w.get(y);let _=o.type===1?this.fileSearchProviders.get(y):this.textSearchProviders.get(y);if(!_)if(D){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)),_=await this.waitForProvider(o.type,y);const L={...o,folderQueries:T};m.push(o.type===1?_.fileSearch(L,h):_.textSearch(L,g,h))})),Promise.all(m).then(y=>{const T=v.elapsed();return this.logService.trace(`SearchService#search: ${T}ms`),y.forEach(_=>{this.sendTelemetry(o,T,_)}),y},y=>{const T=v.elapsed();this.logService.trace(`SearchService#search: ${T}ms`);const _=(0,s.deserializeSearchError)(y);throw this.logService.trace(`SearchService#searchError: ${_.message}`),this.sendTelemetry(o,T,void 0,_),_})}groupFolderQueriesByScheme(o){const g=new Map;return o.folderQueries.forEach(h=>{const v=g.get(h.folder.scheme)||[];v.push(h),g.set(h.folder.scheme,v)}),g}sendTelemetry(o,g,h,v){const m=o.folderQueries.every(y=>y.folder.scheme===E.Schemas.file),w=o.folderQueries.every(y=>y.folder.scheme!==E.Schemas.file),D=m?E.Schemas.file:w?"other":"mixed";if(o.type===1&&h&&h.stats){const y=h.stats;if(y.fromCache){const T=y.detailStats;this.telemetryService.publicLog2("cachedSearchComplete",{reason:o._reason,resultCount:y.resultCount,workspaceFolderCount:o.folderQueries.length,endToEndTime:g,sortingTime:y.sortingTime,cacheWasResolved:T.cacheWasResolved,cacheLookupTime:T.cacheLookupTime,cacheFilterTime:T.cacheFilterTime,cacheEntryCount:T.cacheEntryCount,scheme:D})}else{const T=y.detailStats;this.telemetryService.publicLog2("searchComplete",{reason:o._reason,resultCount:y.resultCount,workspaceFolderCount:o.folderQueries.length,endToEndTime:g,sortingTime:y.sortingTime,fileWalkTime:T.fileWalkTime,directoriesWalked:T.directoriesWalked,filesWalked:T.filesWalked,cmdTime:T.cmdTime,cmdResultCount:T.cmdResultCount,scheme:D})}}else if(o.type===2){let y;v&&(y=v.code===s.SearchErrorCode.regexParseError?"regex":v.code===s.SearchErrorCode.unknownEncoding?"encoding":v.code===s.SearchErrorCode.globParseError?"glob":v.code===s.SearchErrorCode.invalidLiteral?"literal":v.code===s.SearchErrorCode.other?"other":v.code===s.SearchErrorCode.canceled?"canceled":"unknown"),this.telemetryService.publicLog2("textSearchComplete",{reason:o._reason,workspaceFolderCount:o.folderQueries.length,endToEndTime:g,scheme:D,error:y})}}getLocalResults(o){const g=new k.ResourceMap(v=>this.uriIdentityService.extUri.getComparisonKey(v));let h=!1;if(o.type===2){const v=new k.ResourceMap;for(const w of this.editorService.editors){const D=f.EditorResourceAccessor.getCanonicalUri(w,{supportSideBySide:f.SideBySideEditor.PRIMARY}),y=f.EditorResourceAccessor.getOriginalUri(w,{supportSideBySide:f.SideBySideEditor.PRIMARY});D&&v.set(D,y??D)}this.modelService.getModels().forEach(w=>{const D=w.uri;if(!D||h)return;const y=v.get(D);if(!y||w.getLanguageId()==="search-result"&&!(o.includePattern&&o.includePattern["**/*.code-search"])||y.scheme!==E.Schemas.untitled&&!this.fileService.hasProvider(y)||y.scheme==="git"||!this.matches(y,o))return;const T=(0,b.isNumber)(o.maxResults)?o.maxResults+1:Number.MAX_SAFE_INTEGER;let _=w.findMatches(o.contentPattern.pattern,!1,!!o.contentPattern.isRegExp,!!o.contentPattern.isCaseSensitive,o.contentPattern.isWordMatch?o.contentPattern.wordSeparators:null,!1,T);if(_.length){T&&_.length>=T&&(h=!0,_=_.slice(0,T-1));const L=new s.FileMatch(y);g.set(y,L);const M=(0,d.editorMatchesToTextSearchResults)(_,w,o.previewOptions);L.results=(0,d.addContextToEditorMatches)(M,w,o)}else g.set(y,null)})}return{results:g,limitHit:h}}matches(o,g){return(0,s.pathIncludedInQuery)(g,o.fsPath)}async clearCache(o){const g=Array.from(this.fileSearchProviders.values()).map(h=>h&&h.clearCache(o));await Promise.all(g)}};n=we([F(0,S.IModelService),F(1,c.IEditorService),F(2,u.ITelemetryService),F(3,r.ILogService),F(4,l.IExtensionService),F(5,C.IFileService),F(6,i.IUriIdentityService)],n),e.SearchService=n}),define(ae[2733],le([1,0,35,203,2732]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(p.ISearchService,R.SearchService,1)}),define(ae[2734],le([1,0,760,183,25,2,241,11,582]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessService=void 0;let b=class extends A.Disposable{constructor(C,r){super(),this.windowId=C,this.logService=r,this.restoredBarrier=new E.Barrier,this.withSharedProcessConnection=this.connect()}async connect(){this.logService.trace("Renderer->SharedProcess#connect"),await Promise.race([this.restoredBarrier.wait(),(0,E.timeout)(2e3)]),(0,k.mark)("code/willConnectSharedProcess"),this.logService.trace("Renderer->SharedProcess#connect: before acquirePort");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,p.getDelayedChannel)(this.withSharedProcessConnection.then(r=>r.getChannel(C)))}registerChannel(C,r){this.withSharedProcessConnection.then(u=>u.registerChannel(C,r))}};b=we([F(1,R.ILogService)],b),e.SharedProcessService=b}),define(ae[2735],le([1,0,25,2,102,760,5,2128,183,72,582]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedProcessWorkerWorkbenchService=e.ISharedProcessWorkerWorkbenchService=void 0,e.ISharedProcessWorkerWorkbenchService=(0,k.createDecorator)("sharedProcessWorkerWorkbenchService");let C=class extends p.Disposable{get sharedProcessWorkerService(){return this._sharedProcessWorkerService||(this._sharedProcessWorkerService=I.ProxyChannel.toService(this.sharedProcessService.getChannel(E.ipcSharedProcessWorkerChannelName))),this._sharedProcessWorkerService}constructor(u,i,f){super(),this.windowId=u,this.logService=i,this.sharedProcessService=f,this._sharedProcessWorkerService=void 0}async createWorker(u){this.logService.trace("Renderer->SharedProcess#createWorker");const i=(0,b.generateUuid)(),f="vscode:createSharedProcessWorkerMessageChannelResult",c=(0,S.acquirePort)(void 0,f,i),l=this.sharedProcessWorkerService.createWorker({process:u,reply:{windowId:this.windowId,channel:f,nonce:i}}),s=new p.DisposableStore;s.add((0,p.toDisposable)(()=>{this.logService.trace("Renderer->SharedProcess#disposeWorker",u),this.sharedProcessWorkerService.disposeWorker({process:u,reply:{windowId:this.windowId}})}));const d=await c,n=s.add(new A.Client(d,`window:${this.windowId},module:${u.moduleId}`));return this.logService.trace("Renderer->SharedProcess#createWorkerChannel: connection established"),{client:n,onDidTerminate:l,dispose:()=>s.dispose()}}};C=we([F(1,t.ILogService),F(2,R.ISharedProcessService)],C),e.SharedProcessWorkerWorkbenchService=C}),define(ae[149],le([1,0,5]),function(J,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 p;(function(A){A[A.LEFT=0]="LEFT",A[A.RIGHT=1]="RIGHT"})(p=e.StatusbarAlignment||(e.StatusbarAlignment={}));function R(A){const k=A;return typeof k?.id=="string"&&typeof k.alignment=="number"}e.isStatusbarEntryLocation=R,e.ShowTooltipCommand={id:"statusBar.entry.showTooltip",title:""}}),define(ae[2736],le([1,0,149,67,77,2,29]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadStatusBar=void 0;let E=class{constructor(b,S){this.statusbarService=S,this.entries=new Map}dispose(){this.entries.forEach(b=>b.accessor.dispose()),this.entries.clear()}$setEntry(b,S,C,r,u,i,f,c,l,s,d){let n,a;d?(n=d.label,a=d.role):(n=(0,k.getCodiconAriaLabel)(r),u&&(n+=`, ${typeof u=="string"?u:u.value}`));const o={name:C,text:r,tooltip:u,command:i,color:f,backgroundColor:c,ariaLabel:n,role:a};typeof s>"u"&&(s=0);const g=l?0:1;let h=this.entries.get(b);h&&(h.alignment!==g||h.priority!==s)&&((0,A.dispose)(h.accessor),this.entries.delete(b),h=void 0),h?h.accessor.update(o):this.entries.set(b,{accessor:this.statusbarService.addEntry(o,S,g,s),alignment:g,priority:s})}$dispose(b){const S=this.entries.get(b);S&&((0,A.dispose)(S.accessor),this.entries.delete(b))}};E=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadStatusBar),F(1,t.IStatusbarService)],E),e.MainThreadStatusBar=E}),define(ae[2737],le([1,0,149,2,517,1508,26]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationsStatus=void 0;let E=class extends p.Disposable{constructor(b,S,C){super(),this.model=b,this.statusbarService=S,this.notificationService=C,this.newNotificationsCount=0,this.isNotificationsCenterVisible=!1,this.isNotificationsToastsVisible=!1,this.updateNotificationsCenterStatusItem(),b.statusMessage&&this.doSetStatusMessage(b.statusMessage),this.registerListeners()}registerListeners(){this._register(this.model.onDidChangeNotification(b=>this.onDidChangeNotification(b))),this._register(this.model.onDidChangeStatusMessage(b=>this.onDidChangeStatusMessage(b))),this._register(this.notificationService.onDidChangeDoNotDisturbMode(()=>this.updateNotificationsCenterStatusItem()))}onDidChangeNotification(b){this.isNotificationsCenterVisible||(b.kind===0?this.newNotificationsCount++:b.kind===3&&this.newNotificationsCount>0&&this.newNotificationsCount--),this.updateNotificationsCenterStatusItem()}updateNotificationsCenterStatusItem(){let b=0;if(!this.isNotificationsCenterVisible&&!this.isNotificationsToastsVisible)for(const C of this.model.notifications)C.hasProgress&&b++;let S={name:(0,A.localize)(0,null),text:`${b>0||this.newNotificationsCount>0?"$(bell-dot)":"$(bell)"}`,ariaLabel:(0,A.localize)(1,null),command:this.isNotificationsCenterVisible?R.HIDE_NOTIFICATIONS_CENTER:R.SHOW_NOTIFICATIONS_CENTER,tooltip:this.getTooltip(b),showBeak:this.isNotificationsCenterVisible};this.notificationService.doNotDisturbMode&&(S={...S,text:`${b>0||this.newNotificationsCount>0?"$(bell-slash-dot)":"$(bell-slash)"}`,ariaLabel:(0,A.localize)(2,null),tooltip:(0,A.localize)(3,null)}),this.notificationsCenterStatusItem?this.notificationsCenterStatusItem.update(S):this.notificationsCenterStatusItem=this.statusbarService.addEntry(S,"status.notifications",1,-Number.MAX_VALUE)}getTooltip(b){return this.isNotificationsCenterVisible?(0,A.localize)(4,null):this.model.notifications.length===0?(0,A.localize)(5,null):b===0?this.newNotificationsCount===0?(0,A.localize)(6,null):this.newNotificationsCount===1?(0,A.localize)(7,null):(0,A.localize)(8,null,this.newNotificationsCount):this.newNotificationsCount===0?(0,A.localize)(9,null,b):this.newNotificationsCount===1?(0,A.localize)(10,null,b):(0,A.localize)(11,null,this.newNotificationsCount,b)}update(b,S){let C=!1;this.isNotificationsCenterVisible!==b&&(this.isNotificationsCenterVisible=b,this.newNotificationsCount=0,C=!0),this.isNotificationsToastsVisible!==S&&(this.isNotificationsToastsVisible=S,C=!0),C&&this.updateNotificationsCenterStatusItem()}onDidChangeStatusMessage(b){const S=b.item;switch(b.kind){case 0:this.doSetStatusMessage(S);break;case 1:this.currentStatusMessage&&this.currentStatusMessage[0]===S&&((0,p.dispose)(this.currentStatusMessage[1]),this.currentStatusMessage=void 0);break}}doSetStatusMessage(b){const S=b.message,C=b.options&&typeof b.options.showAfter=="number"?b.options.showAfter:0,r=b.options&&typeof b.options.hideAfter=="number"?b.options.hideAfter:-1;this.currentStatusMessage&&(0,p.dispose)(this.currentStatusMessage[1]);let u,i=setTimeout(()=>{u=this.statusbarService.addEntry({name:(0,A.localize)(12,null),text:S,ariaLabel:S},"status.message",0,-Number.MAX_VALUE),i=null},C),f;const c={dispose:()=>{i&&clearTimeout(i),f&&clearTimeout(f),u?.dispose()}};r>0&&(f=setTimeout(()=>c.dispose(),r)),this.currentStatusMessage=[b,c]}};E=we([F(1,t.IStatusbarService),F(2,k.INotificationService)],E),e.NotificationsStatus=E}),define(ae[2738],le([1,0,1514,149,36,83,98,15,70,24,71]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideStatusbarEntryAction=e.ToggleStatusbarEntryVisibilityAction=void 0;class C extends R.Action{constructor(f,c,l){super(f,c,void 0,!0),this.model=l,this.checked=!l.isHidden(f)}async run(){this.model.isHidden(this.id)?this.model.show(this.id):this.model.hide(this.id)}}e.ToggleStatusbarEntryVisibilityAction=C;class r extends R.Action{constructor(f,c,l){super(f,(0,t.localize)(0,null,c),void 0,!0),this.model=l}async run(){this.model.hide(this.id)}}e.HideStatusbarEntryAction=r,k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusPrevious",weight:200,primary:15,secondary:[16],when:S.StatusBarFocused,handler:i=>{i.get(p.IStatusbarService).focusPreviousEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusNext",weight:200,primary:17,secondary:[18],when:S.StatusBarFocused,handler:i=>{i.get(p.IStatusbarService).focusNextEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusFirst",weight:200,primary:14,when:S.StatusBarFocused,handler:i=>{const f=i.get(p.IStatusbarService);f.focus(!1),f.focusNextEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.focusLast",weight:200,primary:13,when:S.StatusBarFocused,handler:i=>{const f=i.get(p.IStatusbarService);f.focus(!1),f.focusPreviousEntry()}}),k.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.statusBar.clearFocus",weight:200,primary:9,when:S.StatusBarFocused,handler:i=>{const f=i.get(p.IStatusbarService),c=i.get(b.IEditorService);f.isEntryFocused()?f.focus(!1):c.activeEditorPane&&c.activeEditorPane.focus()}});class u extends E.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(f){f.get(A.IWorkbenchLayoutService).focusPart("workbench.parts.statusbar")}}(0,E.registerAction2)(u)}),define(ae[2739],le([1,0,117,2,416,31,27,149,12,362,10,26,13,90,143,63,369,113,133]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarEntryItem=void 0;let d=class extends p.Disposable{get name(){return(0,r.assertIsDefined)(this.entry).name}get hasCommand(){return typeof this.entry?.command<"u"}constructor(o,g,h,v,m,w,D){super(),this.container=o,this.hoverDelegate=h,this.commandService=v,this.notificationService=m,this.telemetryService=w,this.themeService=D,this.entry=void 0,this.foregroundListener=this._register(new p.MutableDisposable),this.backgroundListener=this._register(new p.MutableDisposable),this.commandMouseListener=this._register(new p.MutableDisposable),this.commandTouchListener=this._register(new p.MutableDisposable),this.commandKeyboardListener=this._register(new p.MutableDisposable),this.hover=void 0,this.labelContainer=document.createElement("a"),this.labelContainer.tabIndex=-1,this.labelContainer.setAttribute("role","button"),this._register(s.Gesture.addTarget(this.labelContainer)),this.label=new n(this.labelContainer),this.container.appendChild(this.labelContainer),this.beakContainer=document.createElement("div"),this.beakContainer.className="status-bar-item-beak-container",this.container.appendChild(this.beakContainer),this.update(g)}update(o){if(this.label.showProgress=o.showProgress??!1,(!this.entry||o.text!==this.entry.text)&&(this.label.text=o.text,o.text?(0,S.show)(this.labelContainer):(0,S.hide)(this.labelContainer)),(!this.entry||o.ariaLabel!==this.entry.ariaLabel)&&(this.container.setAttribute("aria-label",o.ariaLabel),this.labelContainer.setAttribute("aria-label",o.ariaLabel)),(!this.entry||o.role!==this.entry.role)&&this.labelContainer.setAttribute("role",o.role||"button"),!this.entry||!this.isEqualTooltip(this.entry,o)){const g=(0,l.isMarkdownString)(o.tooltip)?{markdown:o.tooltip,markdownNotSupportedFallback:void 0}:o.tooltip;this.hover?this.hover.update(g):this.hover=this._register((0,c.setupCustomHover)(this.hoverDelegate,this.container,g))}if(!this.entry||o.command!==this.entry.command){this.commandMouseListener.clear(),this.commandTouchListener.clear(),this.commandKeyboardListener.clear();const g=o.command;g&&(g!==E.ShowTooltipCommand||this.hover)?(this.commandMouseListener.value=(0,S.addDisposableListener)(this.labelContainer,S.EventType.CLICK,()=>this.executeCommand(g)),this.commandTouchListener.value=(0,S.addDisposableListener)(this.labelContainer,s.EventType.Tap,()=>this.executeCommand(g)),this.commandKeyboardListener.value=(0,S.addDisposableListener)(this.labelContainer,S.EventType.KEY_DOWN,h=>{const v=new u.StandardKeyboardEvent(h);(v.equals(10)||v.equals(3))&&(S.EventHelper.stop(h),this.executeCommand(g))}),this.labelContainer.classList.remove("disabled")):this.labelContainer.classList.add("disabled")}(!this.entry||o.showBeak!==this.entry.showBeak)&&(o.showBeak?this.container.classList.add("has-beak"):this.container.classList.remove("has-beak")),(!this.entry||o.color!==this.entry.color)&&this.applyColor(this.labelContainer,o.color),(!this.entry||o.backgroundColor!==this.entry.backgroundColor)&&(this.container.classList.toggle("has-background-color",!!o.backgroundColor),this.applyColor(this.container,o.backgroundColor,!0)),this.entry=o}isEqualTooltip({tooltip:o},{tooltip:g}){return o===void 0?g===void 0:(0,l.isMarkdownString)(o)?(0,l.isMarkdownString)(g)&&(0,l.markdownStringEqual)(o,g):o===g}async executeCommand(o){if(o===E.ShowTooltipCommand)this.hover?.show(!0);else{const g=typeof o=="string"?o:o.id,h=typeof o=="string"?[]:o.arguments??[];this.telemetryService.publicLog2("workbenchActionExecuted",{id:g,from:"status bar"});try{await this.commandService.executeCommand(g,...h)}catch(v){this.notificationService.error((0,t.toErrorMessage)(v))}}}applyColor(o,g,h){let v;if(h?this.backgroundListener.clear():this.foregroundListener.clear(),g)if((0,b.isThemeColor)(g)){v=this.themeService.getColorTheme().getColor(g.id)?.toString();const m=this.themeService.onDidColorThemeChange(w=>{const D=w.getColor(g.id)?.toString();h?o.style.backgroundColor=D??"":o.style.color=D??""});h?this.backgroundListener.value=m:this.foregroundListener.value=m}else v=g;h?o.style.backgroundColor=v??"":o.style.color=v??""}};d=we([F(3,A.ICommandService),F(4,C.INotificationService),F(5,k.ITelemetryService),F(6,I.IThemeService)],d),e.StatusbarEntryItem=d;class n extends R.SimpleIconLabel{constructor(o){super(o),this.container=o,this.progressCodicon=(0,i.renderIcon)(f.syncing),this.currentText="",this.currentShowProgress=!1}set showProgress(o){this.currentShowProgress!==o&&(this.currentShowProgress=o,this.progressCodicon=(0,i.renderIcon)(o==="loading"?f.spinningLoading:f.syncing),this.text=this.currentText)}set text(o){if(this.currentShowProgress){this.container.firstChild!==this.progressCodicon&&this.container.appendChild(this.progressCodicon);for(const h of Array.from(this.container.childNodes))h!==this.progressCodicon&&h.remove();let g=o??"";g&&(g=` ${g}`),(0,S.append)(this.container,...(0,i.renderLabelWithIcons)(g))}else super.text=o}}}),define(ae[2740],le([1,0,1610,2,87,8,149]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStatusContribution=void 0;let E=class{constructor(b,S,C){this.statusBarService=b,this.debugService=S,this.configurationService=C,this.toDispose=[];const r=()=>{this.entryAccessor=this.statusBarService.addEntry(this.entry,"status.debug",0,30)},u=()=>{this.showInStatusBar=C.getValue("debug").showInStatusBar,this.showInStatusBar==="always"&&!this.entryAccessor&&r()};u(),this.toDispose.push(this.debugService.onDidChangeState(i=>{i!==0&&this.showInStatusBar==="onFirstSessionStart"&&!this.entryAccessor&&r()})),this.toDispose.push(C.onDidChangeConfiguration(i=>{i.affectsConfiguration("debug.showInStatusBar")&&(u(),this.entryAccessor&&this.showInStatusBar==="never"&&(this.entryAccessor.dispose(),this.entryAccessor=void 0))})),this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(i=>{this.entryAccessor?.update(this.entry)}))}get entry(){let b="";const S=this.debugService.getConfigurationManager(),C=S.selectedConfiguration.name||"";return C&&S.selectedConfiguration.launch&&(b=S.getLaunches().length>1?`${C} (${S.selectedConfiguration.launch.name})`:C),{name:t.localize(0,null),text:"$(debug-alt-small) "+b,ariaLabel:t.localize(1,null,b),tooltip:t.localize(2,null),command:"workbench.action.debug.selectandstart"}}dispose(){this.entryAccessor?.dispose(),(0,p.dispose)(this.toDispose)}};E=we([F(0,k.IStatusbarService),F(1,R.IDebugService),F(2,A.IConfigurationService)],E),e.DebugStatusContribution=E}),define(ae[2741],le([1,0,1621,33,87,34,80,2,149]),function(J,e,t,p,R,A,k,E,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,p.registerColor)("statusBar.debuggingBackground",{dark:"#CC6633",light:"#CC6633",hcDark:"#BA592C",hcLight:"#B5200D"},(0,t.localize)(0,null)),e.STATUS_BAR_DEBUGGING_FOREGROUND=(0,p.registerColor)("statusBar.debuggingForeground",{dark:k.STATUS_BAR_FOREGROUND,light:k.STATUS_BAR_FOREGROUND,hcDark:k.STATUS_BAR_FOREGROUND,hcLight:"#FFFFFF"},(0,t.localize)(1,null)),e.STATUS_BAR_DEBUGGING_BORDER=(0,p.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 b=class{set enabled(r){r!==!!this.disposable&&(r?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))}constructor(r,u,i){this.debugService=r,this.contextService=u,this.statusbarService=i,this.disposables=new E.DisposableStore,this.debugService.onDidChangeState(this.update,this,this.disposables),this.contextService.onDidChangeWorkbenchState(this.update,this,this.disposables),this.update()}update(){this.enabled=S(this.debugService.state,this.debugService.getModel().getSessions())}dispose(){this.disposable?.dispose(),this.disposables.dispose()}};b=we([F(0,R.IDebugService),F(1,A.IWorkspaceContextService),F(2,I.IStatusbarService)],b),e.StatusBarColorProvider=b;function S(C,r){return!(C===0||C===1||r.every(u=>u.suppressDebugStatusbar||u.configuration?.noDebug))}e.isStatusbarInDebugMode=S}),define(ae[2742],le([1,0,1670,6,5,39,2,21,149,675,24,89,47,710,46,524,115,934,31]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionHostProfileService=void 0;let d=class extends k.Disposable{get state(){return this._state}get lastProfile(){return this._profile}constructor(a,o,g,h,v,m,w){super(),this._extensionService=a,this._editorService=o,this._instantiationService=g,this._nativeHostService=h,this._dialogService=v,this._statusbarService=m,this._productService=w,this._onDidChangeState=this._register(new p.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._onDidChangeLastProfile=this._register(new p.Emitter),this.onDidChangeLastProfile=this._onDidChangeLastProfile.event,this._unresponsiveProfiles=new Map,this._state=b.ProfileSessionState.None,this.profilingStatusBarIndicatorLabelUpdater=this._register(new k.MutableDisposable),this._profile=null,this._profileSession=null,this._setState(b.ProfileSessionState.None),s.CommandsRegistry.registerCommand("workbench.action.extensionHostProfiler.stop",()=>{this.stopProfiling(),this._editorService.openEditor(f.RuntimeExtensionsInput.instance,{pinned:!0})})}_setState(a){this._state!==a&&(this._state=a,this._state===b.ProfileSessionState.Running?this.updateProfilingStatusBarIndicator(!0):this._state===b.ProfileSessionState.Stopping&&this.updateProfilingStatusBarIndicator(!1),this._onDidChangeState.fire(void 0))}updateProfilingStatusBarIndicator(a){if(this.profilingStatusBarIndicatorLabelUpdater.clear(),a){const o={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"},g=Date.now(),h=setInterval(()=>{this.profilingStatusBarIndicator?.update({...o,text:t.localize(4,null,Math.round((new Date().getTime()-g)/1e3))})},1e3);this.profilingStatusBarIndicatorLabelUpdater.value=(0,k.toDisposable)(()=>clearInterval(h)),this.profilingStatusBarIndicator?this.profilingStatusBarIndicator.update(o):this.profilingStatusBarIndicator=this._statusbarService.addEntry(o,"status.profiler",1)}else this.profilingStatusBarIndicator&&(this.profilingStatusBarIndicator.dispose(),this.profilingStatusBarIndicator=void 0)}async startProfiling(){if(this._state!==b.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(o=>{o.confirmed&&this._nativeHostService.relaunch({addArgs:[`--inspect-extensions=${(0,u.randomPort)()}`]})}):(a.length>1&&console.warn("There are multiple extension hosts available for profiling. Picking the first one..."),this._setState(b.ProfileSessionState.Starting),this._instantiationService.createInstance(l.ExtensionHostProfiler,a[0]).start().then(o=>{this._profileSession=o,this._setState(b.ProfileSessionState.Running)},o=>{(0,E.onUnexpectedError)(o),this._setState(b.ProfileSessionState.None)}))}stopProfiling(){this._state!==b.ProfileSessionState.Running||!this._profileSession||(this._setState(b.ProfileSessionState.Stopping),this._profileSession.stop().then(a=>{this._setLastProfile(a),this._setState(b.ProfileSessionState.None)},a=>{(0,E.onUnexpectedError)(a),this._setState(b.ProfileSessionState.None)}),this._profileSession=null)}_setLastProfile(a){this._profile=a,this._onDidChangeLastProfile.fire(void 0)}getUnresponsiveProfile(a){return this._unresponsiveProfiles.get(c.ExtensionIdentifier.toKey(a))}setUnresponsiveProfile(a,o){this._unresponsiveProfiles.set(c.ExtensionIdentifier.toKey(a),o),this._setLastProfile(o)}};d=we([F(0,A.IExtensionService),F(1,S.IEditorService),F(2,R.IInstantiationService),F(3,C.INativeHostService),F(4,r.IDialogService),F(5,I.IStatusbarService),F(6,i.IProductService)],d),e.ExtensionHostProfileService=d}),define(ae[2743],le([1,0,1680,2,37,31,542,12,73,33,10,182,27,149,46,41,90,29,6,83,1145]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeedbackWidget=void 0;let n=class extends p.Disposable{constructor(o,g,h,v,m,w,D,y,T,_){super(),this.contextViewService=g,this.layoutService=h,this.commandService=v,this.telemetryService=m,this.integrityService=w,this.themeService=D,this.statusbarService=y,this.openerService=_,this._onDidChangeVisibility=new s.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=o.feedbackService,this.maxFeedbackCharacters=this.feedbackDelegate.getCharacterLimit(this.sentiment),T.sendASmile&&(this.requestFeatureLink=T.sendASmile.requestFeatureUrl),this.integrityService.isPure().then(L=>{L.isPure||(this.isPure=!1)}),this._register(this.layoutService.onDidChangeNotificationsVisibility(L=>{L&&this.hide()}))}getAnchor(){const o=this.layoutService.dimension;return{x:o.width-8,y:o.height-31}}renderContents(o){const g=new p.DisposableStore;o.classList.add("monaco-menu-container"),this.feedbackForm=(0,S.append)(o,(0,S.$)("form.feedback-form")),this.feedbackForm.setAttribute("action","javascript:void(0);"),(0,S.append)(this.feedbackForm,(0,S.$)("h2.title")).textContent=(0,t.localize)(0,null);const h=(0,S.append)(this.feedbackForm,(0,S.$)(`div.cancel${l.Codicon.close.cssSelector}`));h.tabIndex=0,h.setAttribute("role","button"),h.title=(0,t.localize)(1,null),g.add((0,S.addDisposableListener)(o,S.EventType.KEY_DOWN,P=>{new c.StandardKeyboardEvent(P).keyCode===9&&this.hide()})),g.add((0,S.addDisposableListener)(h,S.EventType.MOUSE_OVER,()=>{const P=this.themeService.getColorTheme();let B;switch(P.type){case"light":B=.1;break;case"dark":B=.2;break}if(B){const V=P.getColor(b.editorWidgetBackground);if(V){const z=V.darken(B);z&&(h.style.backgroundColor=z.toString())}}})),g.add((0,S.addDisposableListener)(h,S.EventType.MOUSE_OUT,()=>{h.style.backgroundColor=""})),this.invoke(h,g,()=>this.hide());const v=(0,S.append)(this.feedbackForm,(0,S.$)("div.content")),m=(0,S.append)(v,(0,S.$)("div"));this.isPure||((0,S.append)(m,(0,S.$)("span")).textContent=(0,t.localize)(2,null),m.appendChild(document.createElement("br")),(0,S.append)(m,(0,S.$)("span")).textContent=(0,t.localize)(3,null),m.appendChild(document.createElement("br"))),(0,S.append)(m,(0,S.$)("span")).textContent=(0,t.localize)(4,null);const w=(0,S.append)(m,(0,S.$)("div.feedback-sentiment"));this.smileyInput=(0,S.append)(w,(0,S.$)("div.sentiment")),this.smileyInput.classList.add("smile"),this.smileyInput.setAttribute("aria-checked","false"),this.smileyInput.setAttribute("aria-label",(0,t.localize)(5,null)),this.smileyInput.setAttribute("role","checkbox"),this.smileyInput.title=(0,t.localize)(6,null),this.smileyInput.tabIndex=0,this.invoke(this.smileyInput,g,()=>this.setSentiment(!0)),this.frownyInput=(0,S.append)(w,(0,S.$)("div.sentiment")),this.frownyInput.classList.add("frown"),this.frownyInput.setAttribute("aria-checked","false"),this.frownyInput.setAttribute("aria-label",(0,t.localize)(7,null)),this.frownyInput.setAttribute("role","checkbox"),this.frownyInput.title=(0,t.localize)(8,null),this.frownyInput.tabIndex=0,this.invoke(this.frownyInput,g,()=>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 D=(0,S.append)(v,(0,S.$)("div.contactus"));(0,S.append)(D,(0,S.$)("span")).textContent=(0,t.localize)(9,null);const y=(0,S.append)(D,(0,S.$)("div.channels")),T=(0,S.append)(y,(0,S.$)("div")),_=(0,S.append)(T,(0,S.$)("a"));if(_.setAttribute("target","_blank"),_.setAttribute("href","#"),_.textContent=(0,t.localize)(10,null),_.tabIndex=0,g.add((0,S.addDisposableListener)(_,"click",P=>{S.EventHelper.stop(P);const B="workbench.action.openIssueReporter";this.commandService.executeCommand(B),this.hide(),this.telemetryService.publicLog2("workbenchActionExecuted",{id:B,from:"feedback"})})),this.requestFeatureLink){const P=(0,S.append)(y,(0,S.$)("div")),B=(0,S.append)(P,(0,S.$)("a"));B.setAttribute("target","_blank"),B.setAttribute("href",this.requestFeatureLink),B.textContent=(0,t.localize)(11,null),B.tabIndex=0,g.add((0,S.addDisposableListener)(B,"click",V=>this.hide()))}const L=(0,S.append)(this.feedbackForm,(0,S.$)("h3"));L.textContent=(0,t.localize)(12,null),this.remainingCharacterCount=(0,S.append)(L,(0,S.$)("span.char-counter")),this.remainingCharacterCount.textContent=this.getCharCountText(0),this.feedbackDescriptionInput=(0,S.append)(this.feedbackForm,(0,S.$)("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",(0,t.localize)(13,null)),this.feedbackDescriptionInput.focus(),g.add((0,S.addDisposableListener)(this.feedbackDescriptionInput,"keyup",()=>this.updateCharCountText()));const M=(0,S.append)(this.feedbackForm,(0,S.$)("div.form-buttons")),O=(0,S.append)(M,(0,S.$)("div.hide-button-container"));this.hideButton=(0,S.append)(O,(0,S.$)("input.hide-button")),this.hideButton.type="checkbox",this.hideButton.checked=!0,this.hideButton.id="hide-button";const N=(0,S.append)(O,(0,S.$)("label"));return N.setAttribute("for","hide-button"),N.textContent=(0,t.localize)(14,null),this.sendButton=new C.Button(M),this.sendButton.enabled=!1,this.sendButton.label=(0,t.localize)(15,null),(0,S.prepend)(this.sendButton.element,(0,S.$)(`span${l.Codicon.twitter.cssSelector}`)),this.sendButton.element.classList.add("send"),this.sendButton.element.title=(0,t.localize)(16,null),g.add((0,I.attachButtonStyler)(this.sendButton,this.themeService)),this.sendButton.onDidClick(()=>this.onSubmit()),g.add((0,I.attachStylerCallback)(this.themeService,{widgetShadow:b.widgetShadow,editorWidgetBackground:b.editorWidgetBackground,editorWidgetForeground:b.editorWidgetForeground,inputBackground:b.inputBackground,inputForeground:b.inputForeground,inputBorder:b.inputBorder,editorBackground:b.editorBackground,contrastBorder:b.contrastBorder},P=>{this.feedbackForm&&(this.feedbackForm.style.backgroundColor=P.editorWidgetBackground?P.editorWidgetBackground.toString():"",this.feedbackForm.style.color=P.editorWidgetForeground?P.editorWidgetForeground.toString():"",this.feedbackForm.style.boxShadow=P.widgetShadow?`0 0 8px 2px ${P.widgetShadow}`:""),this.feedbackDescriptionInput&&(this.feedbackDescriptionInput.style.backgroundColor=P.inputBackground?P.inputBackground.toString():"",this.feedbackDescriptionInput.style.color=P.inputForeground?P.inputForeground.toString():"",this.feedbackDescriptionInput.style.border=`1px solid ${P.inputBorder||"transparent"}`),D.style.backgroundColor=P.editorBackground?P.editorBackground.toString():"",D.style.border=`1px solid ${P.contrastBorder||"transparent"}`})),{dispose:()=>{this.feedbackForm=void 0,this.feedbackDescriptionInput=void 0,this.smileyInput=void 0,this.frownyInput=void 0,g.dispose()}}}updateFeedbackDescription(){this.feedbackDescriptionInput&&this.feedbackDescriptionInput.textLength>this.maxFeedbackCharacters&&(this.feedbackDescriptionInput.value=this.feedbackDescriptionInput.value.substring(0,this.maxFeedbackCharacters))}getCharCountText(o){const g=this.maxFeedbackCharacters-o,h=g===1?(0,t.localize)(17,null):(0,t.localize)(18,null);return`(${g} ${h})`}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(o){o?(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=o?1:0,this.maxFeedbackCharacters=this.feedbackDelegate.getCharacterLimit(this.sentiment),this.updateFeedbackDescription(),this.updateCharCountText(),this.feedbackDescriptionInput&&(this.feedbackDescriptionInput.maxLength=this.maxFeedbackCharacters)}invoke(o,g,h){return g.add((0,S.addDisposableListener)(o,"click",h)),g.add((0,S.addDisposableListener)(o,"keypress",v=>{if(v instanceof KeyboardEvent){const m=v;(m.keyCode===13||m.keyCode===32)&&h()}})),o}show(){this.visible||(this.visible=!0,this.contextViewService.showContextView({getAnchor:()=>this.getAnchor(),render:o=>this.renderContents(o),onDOMEvent:(o,g)=>{this.onEvent(o,g)},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(o,g){o instanceof KeyboardEvent&&o.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())}};n=we([F(1,R.IContextViewService),F(2,d.IWorkbenchLayoutService),F(3,A.ICommandService),F(4,r.ITelemetryService),F(5,k.IIntegrityService),F(6,E.IThemeService),F(7,u.IStatusbarService),F(8,i.IProductService),F(9,f.IOpenerService)],n),e.FeedbackWidget=n,(0,E.registerThemingParticipant)((a,o)=>{const g=a.getColor(b.inputActiveOptionBorder);g&&o.addRule(`.monaco-workbench .feedback-form .sentiment.checked { border: 1px solid ${g}; }`);const h=a.getColor(b.textLinkForeground)||a.getColor(b.contrastBorder);h&&o.addRule(`.monaco-workbench .feedback-form .content .channels a { color: ${h}; }`)})}),define(ae[2744],le([1,0,2,2743,5,46,149,1681,31,9,15,70,517,14]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FeedbackStatusbarConribution=void 0;class i{combineHashTagsAsString(){return i.HASHTAGS.join(",")}submitFeedback(l,s){const d=`?${l.sentiment===1?`hashtags=${this.combineHashTagsAsString()}&`:""}ref_src=twsrc%5Etfw&related=twitterapi%2Ctwitter&text=${encodeURIComponent(l.feedback)}&tw_p=tweetbutton&via=${i.VIA_NAME}`,n=i.TWITTER_URL+d;s.open(b.URI.parse(n))}getCharacterLimit(l){let s=0;return l===1&&i.HASHTAGS.forEach(d=>{s+=d.length+2}),i.VIA_NAME&&(s+=` via @${i.VIA_NAME}`.length),280-s}}i.TWITTER_URL="https://twitter.com/intent/tweet",i.VIA_NAME="code",i.HASHTAGS=["HappyCoding"];let f=class yr extends t.Disposable{constructor(l,s,d,n){super(),this.statusbarService=l,this.instantiationService=d,this.commandService=n,s.sendASmile&&!u.isIOS&&this.createFeedbackStatusEntry()}createFeedbackStatusEntry(){this.entry=this._register(this.statusbarService.addEntry(this.getStatusEntry(),"status.feedback",1,-100)),I.CommandsRegistry.registerCommand(yr.TOGGLE_FEEDBACK_COMMAND,()=>this.toggleFeedback()),S.MenuRegistry.appendMenuItem(S.MenuId.CommandPalette,{command:{id:yr.TOGGLE_FEEDBACK_COMMAND,category:C.Categories.Help,title:(0,E.localize)(0,null)}})}toggleFeedback(){this.widget||(this.widget=this._register(this.instantiationService.createInstance(p.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(r.HIDE_NOTIFICATION_TOAST),this.commandService.executeCommand(r.HIDE_NOTIFICATIONS_CENTER),this.widget.show()))}getStatusEntry(l){return{name:(0,E.localize)(1,null),text:"$(feedback)",ariaLabel:(0,E.localize)(2,null),tooltip:(0,E.localize)(3,null),command:yr.TOGGLE_FEEDBACK_COMMAND,showBeak:l}}};f.TOGGLE_FEEDBACK_COMMAND="help.tweetFeedback",f=we([F(0,k.IStatusbarService),F(1,A.IProductService),F(2,R.IInstantiationService),F(3,I.ICommandService)],f),e.FeedbackStatusbarConribution=f}),define(ae[2745],le([1,0,17,2744,44]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(p.FeedbackStatusbarConribution,1)}),define(ae[2746],le([1,0,2,105,1713,17,44,24,149,294,11,42,38,15,26,7,152,59,22,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n="editor.detectLanguage";let a=class vl{constructor(g,h,v,m,w,D){this._languageDetectionService=g,this._statusBarService=h,this._configurationService=v,this._editorService=m,this._languageService=w,this._keybindingService=D,this._disposables=new t.DisposableStore,this._delayer=new S.ThrottledDelayer(1e3),this._renderDisposables=new t.DisposableStore,m.onDidActiveEditorChange(()=>this._update(!0),this,this._disposables),this._update(!1)}dispose(){this._disposables.dispose(),this._delayer.dispose(),this._combinedEntry?.dispose(),this._renderDisposables.dispose()}_update(g){g&&(this._combinedEntry?.dispose(),this._combinedEntry=void 0),this._delayer.trigger(()=>this._doUpdate())}async _doUpdate(){const g=(0,p.getCodeEditor)(this._editorService.activeTextEditorControl);this._renderDisposables.clear(),g?.onDidChangeModelLanguage(()=>this._update(!0),this,this._renderDisposables),g?.onDidChangeModelContent(()=>this._update(!1),this,this._renderDisposables);const h=g?.getModel(),v=h?.uri,m=h?.getLanguageId(),w=this._configurationService.getValue("workbench.editor.languageDetectionHints");if(!(typeof w=="object"&&w?.untitledEditors)||v?.scheme!==s.Schemas.untitled||!m||!v)this._combinedEntry?.dispose(),this._combinedEntry=void 0;else{const T=await this._languageDetectionService.detectLanguage(v),_={jsonc:"json"},L=h.getLanguageId();if(T&&T!==L&&_[L]!==T){const M=this._languageService.getLanguageName(T)||T;let O=(0,R.localize)(0,null,M);const P=this._keybindingService.lookupKeybinding(n)?.getLabel();P&&(O+=` (${P})`);const B={name:(0,R.localize)(1,null),ariaLabel:(0,R.localize)(2,null,T),tooltip:O,command:n,text:"$(lightbulb-autofix)"};this._combinedEntry?this._combinedEntry.update(B):this._combinedEntry=this._statusBarService.addEntry(B,vl._id,1,{id:"status.editor.mode",alignment:1,compact:!0})}else this._combinedEntry?.dispose(),this._combinedEntry=void 0}}};a._id="status.languageDetectionStatus",a=we([F(0,b.ILanguageDetectionService),F(1,I.IStatusbarService),F(2,d.IConfigurationService),F(3,E.IEditorService),F(4,C.ILanguageService),F(5,r.IKeybindingService)],a),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(a,3),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:n,title:{value:(0,R.localize)(3,null),original:"Detect Language from Content"},f1:!0,precondition:f.ContextKeyExpr.and(c.NOTEBOOK_EDITOR_EDITABLE.toNegated(),l.EditorContextKeys.editorTextFocus),keybinding:{primary:1570,weight:200}})}async run(o){const g=o.get(E.IEditorService),h=o.get(b.ILanguageDetectionService),v=(0,p.getCodeEditor)(g.activeTextEditorControl),m=o.get(i.INotificationService),w=v?.getModel()?.uri;if(w){const D=await h.detectLanguage(w);D?v.getModel()?.setMode(D,b.LanguageDetectionLanguageEventSource):m.warn((0,R.localize)(4,null))}}})}),define(ae[2747],le([1,0,10,143,2,68,105,1714,17,12,44,80,24,544,149,323,254,41,113,79,36,29,23,16,9,15,70,1149]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class w{constructor(_,L){this.combined=_,this.dedicated=L}isEqual(_){return(0,g.equals)(this.combined,_.combined)&&(0,g.equals)(this.dedicated,_.dedicated)}}let D=class{constructor(_,L){this._storageService=_,this._key=L}get value(){return this._storageService.getNumber(this._key,0,0)}increment(){const _=this.value+1;return this._storageService.store(this._key,_,0,1),_}};D=we([F(0,o.IStorageService)],D);let y=class Ai{constructor(_,L,M,O,N){this._languageStatusService=_,this._statusBarService=L,this._editorService=M,this._openerService=O,this._storageService=N,this._disposables=new R.DisposableStore,this._dedicated=new Set,this._dedicatedEntries=new Map,this._renderDisposables=new R.DisposableStore,N.onDidChangeValue(this._handleStorageChange,this,this._disposables),this._restoreState(),this._interactionCounter=new D(N,"languageStatus.interactCount"),_.onDidChange(this._update,this,this._disposables),M.onDidActiveEditorChange(this._update,this,this._disposables),this._update(),L.onDidChangeEntryVisibility(P=>{!P.visible&&this._dedicated.has(P.id)&&(this._dedicated.delete(P.id),this._update(),this._storeState())},this._disposables)}dispose(){this._disposables.dispose(),this._combinedEntry?.dispose(),(0,R.dispose)(this._dedicatedEntries.values()),this._renderDisposables.dispose()}_handleStorageChange(_){_.key===Ai._keyDedicatedItems&&(this._restoreState(),this._update())}_restoreState(){const _=this._storageService.get(Ai._keyDedicatedItems,0,"[]");try{const L=JSON.parse(_);this._dedicated=new Set(L)}catch{this._dedicated.clear()}}_storeState(){if(this._dedicated.size===0)this._storageService.remove(Ai._keyDedicatedItems,0);else{const _=JSON.stringify(Array.from(this._dedicated.keys()));this._storageService.store(Ai._keyDedicatedItems,_,0,0)}}_createViewModel(_){if(!_?.hasModel())return new w([],[]);const L=this._languageStatusService.getLanguageStatus(_.getModel()),M=[],O=[];for(const N of L)this._dedicated.has(N.id)&&O.push(N),M.push(N);return new w(M,O)}_update(){const _=(0,k.getCodeEditor)(this._editorService.activeTextEditorControl),L=this._createViewModel(_);if(this._model?.isEqual(L))return;if(this._renderDisposables.clear(),this._model=L,_?.onDidChangeModelLanguage(this._update,this,this._renderDisposables),L.combined.length===0)this._combinedEntry?.dispose(),this._combinedEntry=void 0;else{const[O]=L.combined,N=O.severity>=A.default.Warning,P=Ai._severityToComboCodicon(O.severity);let B=!1;const V=[],z=document.createElement("div");for(const $ of L.combined){const q=L.dedicated.includes($);z.appendChild(this._renderStatus($,N,q,this._renderDisposables)),V.push(this._asAriaLabel($)),B=B||!q&&$.busy}const x={name:(0,E.localize)(0,null),ariaLabel:(0,E.localize)(1,null,V.join(", next: ")),tooltip:z,command:i.ShowTooltipCommand,text:B?`${P}\xA0\xA0$(sync~spin)`:P};this._combinedEntry?this._combinedEntry.update(x):this._combinedEntry=this._statusBarService.addEntry(x,Ai._id,1,{id:"status.editor.mode",alignment:0,compact:!0});const H=this._interactionCounter.value>=3,W=document.querySelector(".monaco-workbench .statusbar DIV#status\\.languageStatus A>SPAN.codicon"),U=document.querySelector(".monaco-workbench .statusbar DIV#status\\.languageStatus");if(W instanceof HTMLElement&&U){const $="wiggle",q="flash";B?(W.classList.remove($),U.classList.remove(q)):(W.classList.toggle($,N||!H),this._renderDisposables.add(t.addDisposableListener(W,"animationend",X=>W.classList.remove($))),U.classList.toggle(q,N),this._renderDisposables.add(t.addDisposableListener(U,"animationend",X=>U.classList.remove(q))))}if(!H){const $=document.querySelector(".monaco-workbench .context-view");if($ instanceof HTMLElement){const q=new MutationObserver(()=>{document.contains(z)&&(this._interactionCounter.increment(),q.disconnect())});q.observe($,{childList:!0,subtree:!0}),this._renderDisposables.add((0,R.toDisposable)(()=>q.disconnect()))}}}const M=new Map;for(const O of L.dedicated){const N=Ai._asStatusbarEntry(O);let P=this._dedicatedEntries.get(O.id);P?(P.update(N),this._dedicatedEntries.delete(O.id)):P=this._statusBarService.addEntry(N,O.id,1,{id:"status.editor.mode",alignment:1}),M.set(O.id,P)}(0,R.dispose)(this._dedicatedEntries.values()),this._dedicatedEntries=M}_renderStatus(_,L,M,O){const N=document.createElement("div");N.classList.add("hover-language-status");const P=document.createElement("div");P.classList.add("severity",`sev${_.severity}`),P.classList.toggle("show",L);const B=Ai._severityToSingleCodicon(_.severity);t.append(P,...(0,p.renderLabelWithIcons)(B)),N.appendChild(P);const V=document.createElement("div");V.classList.add("element"),N.appendChild(V);const z=document.createElement("div");z.classList.add("left"),V.appendChild(z);const x=document.createElement("span");x.classList.add("label"),t.append(x,...(0,p.renderLabelWithIcons)(_.busy?`$(sync~spin)\xA0\xA0${_.label}`:_.label)),z.appendChild(x);const H=document.createElement("span");H.classList.add("detail"),this._renderTextPlus(H,_.detail,O),z.appendChild(H);const W=document.createElement("div");W.classList.add("right"),V.appendChild(W);const{command:U}=_;U&&O.add(new c.Link(W,{label:U.title,title:U.tooltip,href:h.URI.from({scheme:"command",path:U.id,query:U.arguments&&JSON.stringify(U.arguments)}).toString()},void 0,this._openerService));const $=new d.ActionBar(W,{});O.add($);let q;return M?q=new n.Action("unpin",(0,E.localize)(3,null),a.Codicon.pinned.classNames,!0,()=>{this._dedicated.delete(_.id),this._statusBarService.updateEntryVisibility(_.id,!1),this._update(),this._storeState()}):q=new n.Action("pin",(0,E.localize)(2,null),a.Codicon.pin.classNames,!0,()=>{this._dedicated.add(_.id),this._statusBarService.updateEntryVisibility(_.id,!0),this._update(),this._storeState()}),$.push(q,{icon:!0,label:!1}),O.add(q),N}static _severityToComboCodicon(_){switch(_){case A.default.Error:return"$(bracket-error)";case A.default.Warning:return"$(bracket-dot)";default:return"$(bracket)"}}static _severityToSingleCodicon(_){switch(_){case A.default.Error:return"$(error)";case A.default.Warning:return"$(info)";default:return"$(check)"}}_renderTextPlus(_,L,M){for(const O of(0,f.parseLinkedText)(L).nodes)if(typeof O=="string"){const N=(0,p.renderLabelWithIcons)(O);t.append(_,...N)}else M.add(new c.Link(_,O,void 0,this._openerService))}_asAriaLabel(_){return _.accessibilityInfo?_.accessibilityInfo.label:_.detail?(0,E.localize)(4,null,_.label,_.detail):(0,E.localize)(5,null,_.label)}static _asStatusbarEntry(_){let L,M;return _.severity===A.default.Warning?(L=(0,b.themeColorFromId)(C.STATUS_BAR_WARNING_ITEM_FOREGROUND),M=(0,b.themeColorFromId)(C.STATUS_BAR_WARNING_ITEM_BACKGROUND)):_.severity===A.default.Error&&(L=(0,b.themeColorFromId)(C.STATUS_BAR_ERROR_ITEM_FOREGROUND),M=(0,b.themeColorFromId)(C.STATUS_BAR_ERROR_ITEM_BACKGROUND)),{name:(0,E.localize)(6,null,_.name),text:_.busy?`${_.label}\xA0\xA0$(sync~spin)`:_.label,ariaLabel:_.accessibilityInfo?.label??_.label,role:_.accessibilityInfo?.role,tooltip:_.command?.tooltip||new s.MarkdownString(_.detail,{isTrusted:!0,supportThemeIcons:!0}),color:L,backgroundColor:M,command:_.command}}};y._id="status.languageStatus",y._keyDedicatedItems="languageStatus.dedicated",y=we([F(0,u.ILanguageStatusService),F(1,i.IStatusbarService),F(2,r.IEditorService),F(3,l.IOpenerService),F(4,o.IStorageService)],y),I.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(y,3),(0,v.registerAction2)(class extends v.Action2{constructor(){super({id:"editor.inlayHints.Reset",title:{value:(0,E.localize)(7,null),original:"Reset Language Status Interaction Counter"},category:m.Categories.View,f1:!0})}run(T){T.get(o.IStorageService).remove("languageStatus.interactCount",0)}})}),define(ae[2748],le([1,0,16,32,29,2,22,28,61,1752,15,7,115,5,49,25,46,48,17,44,119,913,178,101,215,64,152,228,24,39,91,149]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActiveCellStatus=e.KernelStatus=void 0,(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:o.SELECT_KERNEL_ID,category:o.NOTEBOOK_ACTIONS_CATEGORY,title:{value:b.localize(0,null),original:"Select Notebook Kernel"},icon:h.selectKernelIcon,f1:!0,menu:[{id:S.MenuId.EditorTitle,when:C.ContextKeyExpr.and(m.NOTEBOOK_IS_ACTIVE_EDITOR,C.ContextKeyExpr.notEquals("config.notebook.globalToolbar",!0)),group:"navigation",order:-10},{id:S.MenuId.NotebookToolbar,when:C.ContextKeyExpr.equals("config.notebook.globalToolbar",!0),group:"status",order:-10},{id:S.MenuId.InteractiveToolbar,when:m.NOTEBOOK_KERNEL_COUNT.notEqualsTo(0),group:"status",order:-10}],description:{description:b.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(N,P){const B=N.get(w.INotebookKernelService),V=N.get(D.IEditorService),z=N.get(c.IProductService),x=N.get(l.IQuickInputService),H=N.get(i.ILabelService),W=N.get(f.ILogService),U=N.get(T.IPaneCompositePartService),$=N.get(n.IExtensionsWorkbenchService),q=N.get(y.IExtensionService);let X;if(P!==void 0&&"notebookEditorId"in P){const ce=P.notebookEditorId,de=V.visibleEditorPanes.find(he=>(0,g.getNotebookEditorFromEditorPane)(he)?.getId()===ce);X=(0,g.getNotebookEditorFromEditorPane)(de)}else P!==void 0&&"notebookEditor"in P?X=P?.notebookEditor:X=(0,g.getNotebookEditorFromEditorPane)(V.activeEditorPane);if(!X||!X.hasModel())return!1;let G=P&&"id"in P?P.id:void 0,Q=P&&"extension"in P?P.extension:void 0;G&&(typeof G!="string"||typeof Q!="string")&&(G=void 0,Q=void 0);const j=X.textModel,{selected:K,all:Y,suggestions:ee,hidden:ie}=B.getMatchingKernel(j);if(K&&G&&K.id===G&&r.ExtensionIdentifier.equals(K.extension,Q))return!0;let re;if(G){const ce=`${Q}/${G}`;for(const de of Y)if(de.id===ce){re=de;break}if(!re)return W.warn(`wanted kernel DOES NOT EXIST, wanted: ${ce}, all: ${Y.map(de=>de.id)}`),!1}if(re)return B.selectKernelForNotebook(re,j),!0;function oe(ce){const de={kernel:ce,picked:ce.id===K?.id,label:ce.label,description:ce.description,detail:ce.detail};return ce.id===K?.id&&(de.description?de.description=b.localize(3,null,de.description):de.description=b.localize(2,null)),de}const se=[];if(Y.length){ee.length&&(se.push({type:"separator",label:b.localize(4,null)}),se.push(...ee.map(oe)));const ce=Y.filter(he=>!ee.includes(he)&&!ie.includes(he)).map(oe);(0,t.groupBy)(ce,(he,pe)=>(0,E.compareIgnoreCase)(he.kernel.kind||"z",pe.kernel.kind||"z")).forEach(he=>{se.push({type:"separator",label:he[0].kernel.kind||b.localize(5,null)}),se.push(...he)})}const te=B.getSourceActions(j,X.scopedContextKeyService);te.length&&(se.push({type:"separator"}),te.forEach(ce=>{const de={action:ce,picked:!1,label:ce.action.label};se.push(de)}));let Z;if(!Y.length&&!te.length){const ce=(0,g.getNotebookEditorFromEditorPane)(V.activeEditorPane)?.textModel;if(ce){const de=this.getSuggestedLanguage(ce);Z=de?this.getSuggestedKernelFromLanguage(ce.viewType,de):void 0}Z&&se.push({id:"installSuggested",description:Z.displayName??Z.extensionId,label:`$(${R.Codicon.lightbulb.id}) `+b.localize(6,null)}),se.push({id:"install",label:b.localize(7,null)})}const ne=await x.pick(se,{placeHolder:K?b.localize(8,null,H.getUriLabel(j.uri,{relative:!0})):b.localize(9,null,H.getUriLabel(j.uri,{relative:!0}))});if(ne){if("kernel"in ne)return re=ne.kernel,B.selectKernelForNotebook(re,j),!0;ne.id==="install"?await this._showKernelExtension(U,$,q,j.viewType):ne.id==="installSuggested"&&Z?await this._showKernelExtension(U,$,q,j.viewType,Z.extensionId,z.quality!=="stable"):"action"in ne&&ne.action.runAction()}return!1}getSuggestedLanguage(N){let B=N.metadata.custom?.metadata?.language_info?.name;if(!B){const V=N.cells.map(z=>z.language).filter(z=>z!=="markdown");if(V.length>1){const z=V[0];V.every(x=>x===z)&&(B=z)}}return B}getSuggestedKernelFromLanguage(N,P){return g.KERNEL_RECOMMENDATIONS.get(N)?.get(P)}async _showKernelExtension(N,P,B,V,z,x){if(z){const $=(await P.getExtensions([{id:z}],p.CancellationToken.None))[0];if(await P.canInstall($)){await P.install($,{installPreReleaseVersion:x??!1,context:{skipWalkthrough:!0}},15),await B.activateByEvent(`onNotebook:${V}`);return}}const W=(await N.openPaneComposite(n.VIEWLET_ID,0,!0))?.getViewPaneContainer(),U=V.split(/[^a-z0-9]/ig).map(E.uppercaseFirstLetter).join("");W?.search(`@tag:notebookKernel${U}`)}});let L=class{constructor(P,B,V,z,x){const H=new A.DisposableStore;this.dispose=H.dispose.bind(H);const W=()=>{H.clear(),V.selectKernelForNotebook(B,P)};H.add(P.onDidChangeContent(U=>{for(const $ of U.rawEvents)switch($.kind){case v.NotebookCellsChangeType.ChangeCellContent:case v.NotebookCellsChangeType.ModelChange:case v.NotebookCellsChangeType.Move:case v.NotebookCellsChangeType.ChangeCellLanguage:x.trace("IMPLICIT kernel selection because of change event",$.kind),W();break}})),H.add(z.hoverProvider.register({scheme:k.Schemas.vscodeNotebookCell,pattern:P.uri.path},{provideHover(){x.trace("IMPLICIT kernel selection because of hover"),W()}}))}};L=we([F(2,w.INotebookKernelService),F(3,I.ILanguageFeaturesService),F(4,f.ILogService)],L);let M=class extends A.Disposable{constructor(P,B,V,z){super(),this._editorService=P,this._statusbarService=B,this._notebookKernelService=V,this._instantiationService=z,this._editorDisposables=this._register(new A.DisposableStore),this._kernelInfoElement=this._register(new A.DisposableStore),this._register(this._editorService.onDidActiveEditorChange(()=>this._updateStatusbar()))}_updateStatusbar(){this._editorDisposables.clear();const P=(0,g.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);if(!P){this._kernelInfoElement.clear();return}const B=()=>{if(P.notebookOptions.getLayoutConfiguration().globalToolbar){this._kernelInfoElement.clear();return}const V=P.textModel;V?this._showKernelStatus(V):this._kernelInfoElement.clear()};this._editorDisposables.add(this._notebookKernelService.onDidAddKernel(B)),this._editorDisposables.add(this._notebookKernelService.onDidChangeSelectedNotebooks(B)),this._editorDisposables.add(this._notebookKernelService.onDidChangeNotebookAffinity(B)),this._editorDisposables.add(P.onDidChangeModel(B)),this._editorDisposables.add(P.notebookOptions.onDidChangeOptions(B)),B()}_showKernelStatus(P){this._kernelInfoElement.clear();const{selected:B,suggestions:V,all:z}=this._notebookKernelService.getMatchingKernel(P),x=(V.length===1?V[0]:void 0)??z.length===1?z[0]:void 0;let H=!1;if(z.length!==0)if(B||x){let W=B;W||(W=x,H=!0,this._kernelInfoElement.add(this._instantiationService.createInstance(L,P,W)));const U=W.description??W.detail??W.label;this._kernelInfoElement.add(this._statusbarService.addEntry({name:b.localize(10,null),text:`$(notebook-kernel-select) ${W.label}`,ariaLabel:W.label,tooltip:H?b.localize(11,null,U):U,command:o.SELECT_KERNEL_ID},o.SELECT_KERNEL_ID,1,10)),this._kernelInfoElement.add(W.onDidChange(()=>this._showKernelStatus(P)))}else this._kernelInfoElement.add(this._statusbarService.addEntry({name:b.localize(12,null),text:b.localize(13,null),ariaLabel:b.localize(14,null),command:o.SELECT_KERNEL_ID,backgroundColor:{id:"statusBarItem.prominentBackground"}},o.SELECT_KERNEL_ID,1,10))}};M=we([F(0,D.IEditorService),F(1,_.IStatusbarService),F(2,w.INotebookKernelService),F(3,u.IInstantiationService)],M),e.KernelStatus=M,s.Registry.as(d.Extensions.Workbench).registerWorkbenchContribution(M,3);let O=class extends A.Disposable{constructor(P,B){super(),this._editorService=P,this._statusbarService=B,this._itemDisposables=this._register(new A.DisposableStore),this._accessor=this._register(new A.MutableDisposable),this._register(this._editorService.onDidActiveEditorChange(()=>this._update()))}_update(){this._itemDisposables.clear();const P=(0,g.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);P?(this._itemDisposables.add(P.onDidChangeSelection(()=>this._show(P))),this._itemDisposables.add(P.onDidChangeActiveCell(()=>this._show(P))),this._show(P)):this._accessor.clear()}_show(P){if(!P.hasModel()){this._accessor.clear();return}const B=this._getSelectionsText(P);if(!B){this._accessor.clear();return}const V={name:b.localize(15,null),text:B,ariaLabel:B,command:a.CENTER_ACTIVE_CELL};this._accessor.value?this._accessor.value.update(V):this._accessor.value=this._statusbarService.addEntry(V,"notebook.activeCellStatus",1,100)}_getSelectionsText(P){if(!P.hasModel())return;const B=P.getActiveCell();if(!B)return;const V=P.getCellIndex(B)+1,z=P.getSelections().reduce((H,W)=>H+(W.end-W.start),0),x=P.getLength();return z>1?b.localize(16,null,V,z):b.localize(17,null,V,x)}};O=we([F(0,D.IEditorService),F(1,_.IStatusbarService)],O),e.ActiveCellStatus=O,s.Registry.as(d.Extensions.Workbench).registerWorkbenchContribution(O,3)}),define(ae[2749],le([1,0,1825,80,12,104,2,15,149,49,7,31,22,39,48,248,148,74,14,154,28,34,223,227,29,25,319,82,119,113,71,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoteStatusIndicator=void 0;let L=class ri extends k.Disposable{constructor(O,N,P,B,V,z,x,H,W,U,$,q,X,G){super(),this.statusbarService=O,this.environmentService=N,this.labelService=P,this.contextKeyService=B,this.menuService=V,this.quickInputService=z,this.commandService=x,this.extensionService=H,this.remoteAgentService=W,this.remoteAuthorityResolverService=U,this.hostService=$,this.workspaceContextService=q,this.logService=X,this.extensionGalleryService=G,this.legacyIndicatorMenu=this._register(this.menuService.createMenu(E.MenuId.StatusBarWindowIndicatorMenu,this.contextKeyService)),this.remoteIndicatorMenu=this._register(this.menuService.createMenu(E.MenuId.StatusBarRemoteIndicatorMenu,this.contextKeyService)),this.remoteAuthority=this.environmentService.remoteAuthority,this.virtualWorkspaceLocation=void 0,this.connectionState=void 0,this.connectionStateContextKey=new S.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 O={value:t.localize(0,null),original:"Remote"},N=this;(0,E.registerAction2)(class extends E.Action2{constructor(){super({id:ri.REMOTE_ACTIONS_COMMAND_ID,category:O,title:{value:t.localize(1,null),original:"Show Remote Menu"},f1:!0}),this.run=()=>N.showRemoteMenu()}}),ri.SHOW_CLOSE_REMOTE_COMMAND_ID&&((0,E.registerAction2)(class extends E.Action2{constructor(){super({id:ri.CLOSE_REMOTE_COMMAND_ID,category:O,title:{value:t.localize(2,null),original:"Close Remote Connection"},f1:!0,precondition:S.ContextKeyExpr.or(T.RemoteNameContext,T.VirtualWorkspaceContext)}),this.run=()=>N.hostService.openWindow({forceReuseWindow:!0,remoteAuthority:null})}}),this.remoteAuthority&&E.MenuRegistry.appendMenuItem(E.MenuId.MenubarFileMenu,{group:"6_close",command:{id:ri.CLOSE_REMOTE_COMMAND_ID,title:t.localize(3,null)},order:3.5})),this.extensionGalleryService.isEnabled()&&(0,E.registerAction2)(class extends E.Action2{constructor(){super({id:ri.INSTALL_REMOTE_EXTENSIONS_ID,category:O,title:{value:t.localize(4,null),original:"Install Remote Development Extensions"},f1:!0}),this.run=(P,B)=>P.get(_.IPaneCompositePartService).openPaneComposite(D.VIEWLET_ID,0,!0).then(z=>{z&&((z?.getViewPaneContainer()).search('tag:"remote-menu"'),z.focus())})}})}registerListeners(){const O=()=>{this.remoteMenuActionsGroups=void 0,this.updateRemoteStatusIndicator()};this._register(this.legacyIndicatorMenu.onDidChange(O)),this._register(this.remoteIndicatorMenu.onDidChange(O)),this._register(this.labelService.onDidChangeFormatters(()=>this.updateRemoteStatusIndicator()));const N=this.environmentService.options?.windowIndicator;if(N&&N.onDidChange&&this._register(N.onDidChange(()=>this.updateRemoteStatusIndicator())),this.remoteAuthority){const P=this.remoteAgentService.getConnection();P&&this._register(P.onDidStateChange(B=>{switch(B.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,g.getVirtualWorkspaceLocation)(this.workspaceContextService.getWorkspace())}async updateWhenInstalledExtensionsRegistered(){await this.extensionService.whenInstalledExtensionsRegistered();const O=this.remoteAuthority;O&&(async()=>{try{await this.remoteAuthorityResolverService.resolveAuthority(O),this.setState("connected")}catch{this.setState("disconnected")}})(),this.updateRemoteStatusIndicator()}setState(O){this.connectionState!==O&&(this.connectionState=O,this.connectionState==="reconnecting"?this.connectionStateContextKey.set("disconnected"):this.connectionStateContextKey.set(this.connectionState),this.updateRemoteStatusIndicator())}validatedGroup(O){return O.match(/^(remote|virtualfs)_(\d\d)_(([a-z][a-z0-9+.-]*)_(.*))$/)?!0:(this.loggedInvalidGroupNames[O]||(this.loggedInvalidGroupNames[O]=!0,this.logService.warn(`Invalid group name used in "statusBar/remoteIndicator" menu contribution: ${O}. Entries ignored. Expected format: 'remote_$ORDER_$REMOTENAME_$GROUPING or 'virtualfs_$ORDER_$FILESCHEME_$GROUPING.`)),!1)}getRemoteMenuActions(O){return(!this.remoteMenuActionsGroups||O)&&(this.remoteMenuActionsGroups=this.remoteIndicatorMenu.getActions().filter(N=>this.validatedGroup(N[0])).concat(this.legacyIndicatorMenu.getActions())),this.remoteMenuActionsGroups}updateRemoteStatusIndicator(){const O=this.environmentService.options?.windowIndicator;if(O){this.renderRemoteStatusIndicator((0,n.truncate)(O.label,ri.REMOTE_STATUS_LABEL_MAX_LENGTH),O.tooltip,O.command);return}if(this.remoteAuthority&&(!s.isWeb||this.environmentService.options?.webSocketFactory)){const N=this.labelService.getHostLabel(r.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,n.truncate)(N,ri.REMOTE_STATUS_LABEL_MAX_LENGTH))}`,void 0,void 0,!0);break;case"disconnected":this.renderRemoteStatusIndicator(`$(alert) ${t.localize(8,null,(0,n.truncate)(N,ri.REMOTE_STATUS_LABEL_MAX_LENGTH))}`);break;default:{const P=new y.MarkdownString("",{isTrusted:!0,supportThemeIcons:!0}),B=this.labelService.getHostTooltip(r.Schemas.vscodeRemote,this.remoteAuthority);B?P.appendMarkdown(B):P.appendText(t.localize(9,null,N)),this.renderRemoteStatusIndicator(`$(remote) ${(0,n.truncate)(N,ri.REMOTE_STATUS_LABEL_MAX_LENGTH)}`,P)}}return}if(this.virtualWorkspaceLocation){const N=this.labelService.getHostLabel(this.virtualWorkspaceLocation.scheme,this.virtualWorkspaceLocation.authority);if(N){const P=new y.MarkdownString("",{isTrusted:!0,supportThemeIcons:!0}),B=this.labelService.getHostTooltip(this.virtualWorkspaceLocation.scheme,this.virtualWorkspaceLocation.authority);B?P.appendMarkdown(B):P.appendText(t.localize(10,null,N)),(!s.isWeb||this.remoteAuthority)&&(P.appendMarkdown(` `),P.appendMarkdown(t.localize(11,null,`command:${D.LIST_WORKSPACE_UNSUPPORTED_EXTENSIONS_COMMAND_ID}`))),this.renderRemoteStatusIndicator(`$(remote) ${(0,n.truncate)(N,ri.REMOTE_STATUS_LABEL_MAX_LENGTH)}`,P);return}}if(this.hasRemoteMenuCommands(!0)){this.renderRemoteStatusIndicator("$(remote)",t.localize(12,null));return}(0,k.dispose)(this.remoteStatusEntry),this.remoteStatusEntry=void 0}renderRemoteStatusIndicator(O,N,P,B){const V=t.localize(13,null);typeof P!="string"&&this.hasRemoteMenuCommands(!1)&&(P=ri.REMOTE_ACTIONS_COMMAND_ID);const z=(0,h.getCodiconAriaLabel)(O),x={name:V,backgroundColor:(0,R.themeColorFromId)(p.STATUS_BAR_HOST_NAME_BACKGROUND),color:(0,R.themeColorFromId)(p.STATUS_BAR_HOST_NAME_FOREGROUND),ariaLabel:z,text:O,showProgress:B,tooltip:N,command:P};this.remoteStatusEntry?this.remoteStatusEntry.update(x):this.remoteStatusEntry=this.statusbarService.addEntry(x,"status.host",0,Number.MAX_VALUE)}showRemoteMenu(){const O=x=>{if(x.item.category)return typeof x.item.category=="string"?x.item.category:x.item.category.value},N=()=>{if(this.remoteAuthority)return new RegExp(`^remote_\\d\\d_${(0,o.getRemoteName)(this.remoteAuthority)}_`);if(this.virtualWorkspaceLocation)return new RegExp(`^virtualfs_\\d\\d_${this.virtualWorkspaceLocation.scheme}_`)},P=()=>{let x=this.getRemoteMenuActions(!0);const H=[],W=N();W&&(x=x.sort((q,X)=>{const G=W.test(q[0]),Q=W.test(X[0]);return G!==Q?G?-1:1:q[0].localeCompare(X[0])}));let U;for(const q of x){let X=!1;for(const G of q[1])if(G instanceof E.MenuItemAction){if(!X){const j=O(G);j!==U&&(H.push({type:"separator",label:j}),U=j),X=!0}const Q=typeof G.item.title=="string"?G.item.title:G.item.title.value;H.push({type:"item",id:G.item.id,label:Q})}}H.push({type:"separator"});const $=H.length;return ri.SHOW_CLOSE_REMOTE_COMMAND_ID&&(this.remoteAuthority?(H.push({type:"item",id:ri.CLOSE_REMOTE_COMMAND_ID,label:t.localize(14,null)}),this.connectionState==="disconnected"&&H.push({type:"item",id:m.ReloadWindowAction.ID,label:t.localize(15,null)})):this.virtualWorkspaceLocation&&H.push({type:"item",id:ri.CLOSE_REMOTE_COMMAND_ID,label:t.localize(16,null)})),!this.remoteAuthority&&!this.virtualWorkspaceLocation&&this.extensionGalleryService.isEnabled()&&H.push({id:ri.INSTALL_REMOTE_EXTENSIONS_ID,label:t.localize(17,null),alwaysShow:!0}),H.length===$&&H.pop(),H},B=this.quickInputService.createQuickPick();B.items=P(),B.sortByLabel=!1,B.canSelectMany=!1,(0,d.once)(B.onDidAccept)(x=>{const H=B.selectedItems;H.length===1&&this.commandService.executeCommand(H[0].id),B.hide()});const V=this.legacyIndicatorMenu.onDidChange(()=>B.items=P());B.onDidHide(V.dispose);const z=this.remoteIndicatorMenu.onDidChange(()=>B.items=P());B.onDidHide(z.dispose),B.show()}hasRemoteMenuCommands(O){if(this.remoteAuthority!==void 0||this.virtualWorkspaceLocation!==void 0){if(ri.SHOW_CLOSE_REMOTE_COMMAND_ID)return!0}else if(!O&&this.extensionGalleryService.isEnabled())return!0;return this.getRemoteMenuActions().length>0}};L.REMOTE_ACTIONS_COMMAND_ID="workbench.action.remote.showMenu",L.CLOSE_REMOTE_COMMAND_ID="workbench.action.remote.close",L.SHOW_CLOSE_REMOTE_COMMAND_ID=!s.isWeb,L.INSTALL_REMOTE_EXTENSIONS_ID="workbench.action.remote.extensions",L.REMOTE_STATUS_LABEL_MAX_LENGTH=40,L=we([F(0,I.IStatusbarService),F(1,f.IBrowserWorkbenchEnvironmentService),F(2,b.ILabelService),F(3,S.IContextKeyService),F(4,E.IMenuService),F(5,i.IQuickInputService),F(6,C.ICommandService),F(7,u.IExtensionService),F(8,A.IRemoteAgentService),F(9,c.IRemoteAuthorityResolverService),F(10,l.IHostService),F(11,a.IWorkspaceContextService),F(12,v.ILogService),F(13,w.IExtensionGalleryService)],L),e.RemoteStatusIndicator=L}),define(ae[2750],le([1,0,1832,18,2,6,216,190,7,149,24,8,43,57,22,88]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMActiveResourceContextKeyController=e.SCMStatusController=void 0;function c(d){return typeof d.provider.count=="number"?d.provider.count:d.provider.groups.elements.reduce((n,a)=>n+a.elements.length,0)}let l=class{constructor(n,a,o,g,h,v,m,w){this.scmService=n,this.scmViewService=a,this.statusbarService=o,this.contextKeyService=g,this.activityService=h,this.editorService=v,this.configurationService=m,this.uriIdentityService=w,this.statusBarDisposable=R.Disposable.None,this.focusDisposable=R.Disposable.None,this.focusedRepository=void 0,this.badgeDisposable=new R.MutableDisposable,this.disposables=new R.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),v.onDidActiveEditorChange(()=>this.tryFocusRepositoryBasedOnActiveEditor(),this,this.disposables),this.renderActivityCount()}tryFocusRepositoryBasedOnActiveEditor(n=this.scmService.repositories){const a=r.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);if(!a)return!1;let o=null,g=Number.POSITIVE_INFINITY;for(const h of n){const v=h.provider.rootUri;if(!v)continue;const m=this.uriIdentityService.extUri.relativePath(v,a);m&&!/^\.\./.test(m)&&m.length<g&&(o=h,g=m.length)}return o?(this.focusRepository(o),!0):!1}onDidAddRepository(n){const o=A.Event.any(n.provider.onDidChange,n.provider.onDidChangeResources)(()=>this.renderActivityCount()),h=A.Event.filter(this.scmService.onDidRemoveRepository,m=>m===n)(()=>{v.dispose(),this.repositoryDisposables.delete(v),this.renderActivityCount()}),v=(0,R.combinedDisposable)(o,h);this.repositoryDisposables.add(v),this.tryFocusRepositoryBasedOnActiveEditor(f.Iterable.single(n))}onDidRemoveRepository(n){this.focusedRepository===n&&this.focusRepository(f.Iterable.first(this.scmService.repositories))}focusRepository(n){this.focusedRepository!==n&&(this.focusDisposable.dispose(),this.focusedRepository=n,n&&n.provider.onDidChangeStatusBarCommands&&(this.focusDisposable=n.provider.onDidChangeStatusBarCommands(()=>this.renderStatusBar(n))),this.renderStatusBar(n),this.renderActivityCount())}renderStatusBar(n){if(this.statusBarDisposable.dispose(),!n)return;const a=n.provider.statusBarCommands||[],o=n.provider.rootUri?`${(0,p.basename)(n.provider.rootUri)} (${n.provider.label})`:n.provider.label,g=new R.DisposableStore;for(let h=0;h<a.length;h++){const v=a[h],m=`${o}${v.tooltip?` - ${v.tooltip}`:""}`;g.add(this.statusbarService.addEntry({name:(0,t.localize)(0,null),text:v.title,ariaLabel:m,tooltip:m,command:v.id?v:void 0},`status.scm.${h}`,0,1e4-h))}this.statusBarDisposable=g}renderActivityCount(){const n=this.configurationService.getValue("scm.countBadge");let a=0;if(n==="all"?a=f.Iterable.reduce(this.scmService.repositories,(o,g)=>o+c(g),0):n==="focused"&&this.focusedRepository&&(a=c(this.focusedRepository)),a>0){const o=new E.NumberBadge(a,g=>(0,t.localize)(1,null,g));this.badgeDisposable.value=this.activityService.showViewActivity(k.VIEW_PANE_ID,{badge:o,clazz:"scm-viewlet-label"})}else this.badgeDisposable.value=void 0}dispose(){this.focusDisposable.dispose(),this.statusBarDisposable.dispose(),this.badgeDisposable.dispose(),this.disposables=(0,R.dispose)(this.disposables),(0,R.dispose)(this.repositoryDisposables.values()),this.repositoryDisposables.clear()}};l=we([F(0,k.ISCMService),F(1,k.ISCMViewService),F(2,b.IStatusbarService),F(3,I.IContextKeyService),F(4,E.IActivityService),F(5,S.IEditorService),F(6,C.IConfigurationService),F(7,u.IUriIdentityService)],l),e.SCMStatusController=l;let s=class{constructor(n,a,o,g){this.contextKeyService=n,this.editorService=a,this.scmService=o,this.uriIdentityService=g,this.disposables=new R.DisposableStore,this.repositoryDisposables=new Set,this.activeResourceHasChangesContextKey=n.createKey("scmActiveResourceHasChanges",!1),this.activeResourceRepositoryContextKey=n.createKey("scmActiveResourceRepository",void 0),this.scmService.onDidAddRepository(this.onDidAddRepository,this,this.disposables);for(const h of this.scmService.repositories)this.onDidAddRepository(h);a.onDidActiveEditorChange(this.updateContextKey,this,this.disposables)}onDidAddRepository(n){const o=A.Event.any(n.provider.onDidChange,n.provider.onDidChangeResources)(()=>this.updateContextKey()),h=A.Event.filter(this.scmService.onDidRemoveRepository,m=>m===n)(()=>{v.dispose(),this.repositoryDisposables.delete(v),this.updateContextKey()}),v=(0,R.combinedDisposable)(o,h);this.repositoryDisposables.add(v)}updateContextKey(){const n=r.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor);if(n?.scheme===i.Schemas.file||n?.scheme===i.Schemas.vscodeRemote){const a=f.Iterable.find(this.scmService.repositories,o=>Boolean(o.provider.rootUri&&this.uriIdentityService.extUri.isEqualOrParent(n,o.provider.rootUri)));this.activeResourceRepositoryContextKey.set(a?.id);for(const o of a?.provider.groups.elements??[])if(o.elements.some(g=>this.uriIdentityService.extUri.isEqual(n,g.sourceUri))){this.activeResourceHasChangesContextKey.set(!0);return}this.activeResourceHasChangesContextKey.set(!1)}else this.activeResourceHasChangesContextKey.set(!1),this.activeResourceRepositoryContextKey.set(void 0)}dispose(){this.disposables=(0,R.dispose)(this.disposables),(0,R.dispose)(this.repositoryDisposables.values()),this.repositoryDisposables.clear()}};s=we([F(0,I.IContextKeyService),F(1,S.IEditorService),F(2,k.ISCMService),F(3,u.IUriIdentityService)],s),e.SCMActiveResourceContextKeyController=s}),define(ae[2751],le([1,0,2034,2,66,149,11,190,26,36,6,35,198,758,73,12,38,10,323,45,91,210,1189]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressService=void 0;let o=class extends p.Disposable{constructor(h,v,m,w,D,y,T,_,L){super(),this.activityService=h,this.paneCompositeService=v,this.viewDescriptorService=m,this.viewsService=w,this.notificationService=D,this.statusbarService=y,this.layoutService=T,this.themeService=_,this.keybindingService=L,this.windowProgressStack=[],this.windowProgressStatusEntry=void 0}async withProgress(h,v,m){const{location:w}=h,D=y=>{const T=this.viewDescriptorService.getViewContainerById(y);if(T){const _=this.viewDescriptorService.getViewContainerLocation(T);if(_!==null)return this.withPaneCompositeProgress(y,_,v,{...h,location:y})}if(this.viewDescriptorService.getViewDescriptorById(y)!==null)return this.withViewProgress(y,v,{...h,location:y});throw new Error(`Bad progress location: ${y}`)};if(typeof w=="string")return D(w);switch(w){case 15:return this.withNotificationProgress({...h,location:w,silent:this.notificationService.doNotDisturbMode},v,m);case 10:{const y=h.type;return h.command?this.withWindowProgress({...h,location:w,type:y},v):this.withNotificationProgress({delay:150,...h,silent:!0,location:15,type:y},v,m)}case 1:return this.withPaneCompositeProgress("workbench.view.explorer",0,v,{...h,location:w});case 3:return D("workbench.scm");case 5:return this.withPaneCompositeProgress("workbench.view.extensions",0,v,{...h,location:w});case 20:return this.withDialogProgress(h,v,m);default:throw new Error(`Bad progress location: ${w}`)}}withWindowProgress(h,v){const m=[h,new R.Progress(()=>this.updateWindowProgress())],w=v(m[1]);let D=setTimeout(()=>{D=void 0,this.windowProgressStack.unshift(m),this.updateWindowProgress(),Promise.all([(0,k.timeout)(150),w]).finally(()=>{const y=this.windowProgressStack.indexOf(m);this.windowProgressStack.splice(y,1),this.updateWindowProgress()})},150);return w.finally(()=>clearTimeout(D))}updateWindowProgress(h=0){if(h<this.windowProgressStack.length){const[v,m]=this.windowProgressStack[h],w=v.title,D=m.value&&m.value.message,y=v.command;let T,_;const L=v.source&&typeof v.source!="string"?v.source.label:v.source;if(w&&D)T=(0,t.localize)(0,null,w,D),_=L?(0,t.localize)(1,null,L,w,D):T;else if(w)T=w,_=L?(0,t.localize)(2,null,L,w):T;else if(D)T=D,_=L?(0,t.localize)(3,null,L,D):T;else{this.updateWindowProgress(h+1);return}const M={name:(0,t.localize)(4,null),text:T,showProgress:v.type||!0,ariaLabel:T,tooltip:_,command:y};this.windowProgressStatusEntry?this.windowProgressStatusEntry.update(M):this.windowProgressStatusEntry=this.statusbarService.addEntry(M,"status.progress",0)}else this.windowProgressStatusEntry?.dispose(),this.windowProgressStatusEntry=void 0}withNotificationProgress(h,v,m){const w=new class extends p.Disposable{get step(){return this._step}get done(){return this._done}constructor(){super(),this._onDidReport=this._register(new S.Emitter),this.onDidReport=this._onDidReport.event,this._onWillDispose=this._register(new S.Emitter),this.onWillDispose=this._onWillDispose.event,this._step=void 0,this._done=!1,this.promise=v(this),this.promise.finally(()=>{this.dispose()})}report(P){this._step=P,this._onDidReport.fire(P)}cancel(P){m?.(P),this.dispose()}dispose(){this._done=!0,this._onWillDispose.fire(),super.dispose()}},D=()=>{const P=new k.DeferredPromise;return this.withWindowProgress({location:10,title:h.title?(0,s.parseLinkedText)(h.title).toString():void 0,command:"notifications.showList",type:h.type},B=>{function V(x){x.message&&B.report({message:(0,s.parseLinkedText)(x.message).toString()})}w.step&&V(w.step);const z=w.onDidReport(x=>V(x));return P.p.finally(()=>z.dispose()),S.Event.once(w.onWillDispose)(()=>P.complete()),P.p}),(0,p.toDisposable)(()=>P.complete())},y=(P,B,V)=>{const z=new p.DisposableStore,x=h.primaryActions?Array.from(h.primaryActions):[],H=h.secondaryActions?Array.from(h.secondaryActions):[];if(h.buttons&&h.buttons.forEach((q,X)=>{const G=new class extends b.Action{constructor(){super(`progress.button.${q}`,q,void 0,!0)}async run(){w.cancel(X)}};z.add(G),x.push(G)}),h.cancellable){const q=new class extends b.Action{constructor(){super("progress.cancel",(0,t.localize)(5,null),void 0,!0)}async run(){w.cancel()}};z.add(q),x.push(q)}const W=this.notificationService.notify({severity:I.Severity.Info,message:(0,a.stripIcons)(P),source:h.source,actions:{primary:x,secondary:H},progress:typeof V=="number"&&V>=0?{total:100,worked:V}:{infinite:!0},silent:B});let U;const $=q=>{(0,p.dispose)(U),!q&&!w.done&&(U=D())};return z.add(W.onDidChangeVisibility($)),B&&$(!1),S.Event.once(W.onDidClose)(()=>z.dispose()),W},T=(P,B)=>{typeof B=="number"&&B>=0?(P.progress.total(100),P.progress.worked(B)):P.progress.infinite()};let _,L,M;const O=P=>{P?.message&&h.title?M=`${h.title}: ${P.message}`:M=h.title||P?.message,!_&&M&&(typeof h.delay=="number"&&h.delay>0?typeof L!="number"&&(L=setTimeout(()=>_=y(M,!!h.silent,P?.increment),h.delay)):_=y(M,!!h.silent,P?.increment)),_&&(M&&_.updateMessage(M),typeof P?.increment=="number"&&T(_,P.increment))};O(w.step);const N=w.onDidReport(P=>O(P));return S.Event.once(w.onWillDispose)(()=>N.dispose()),(async()=>{try{typeof h.delay=="number"&&h.delay>0?await w.promise:await Promise.all([(0,k.timeout)(800),w.promise])}finally{clearTimeout(L),_?.close()}})(),w.promise}withPaneCompositeProgress(h,v,m,w){const D=this.paneCompositeService.getProgressIndicator(h,v),y=D?this.withCompositeProgress(D,m,w):m({report:()=>{}});return v===0&&this.showOnActivityBar(h,w,y),y}withViewProgress(h,v,m){const w=this.viewsService.getViewProgressIndicator(h),D=w?this.withCompositeProgress(w,v,m):v({report:()=>{}});if(this.viewDescriptorService.getViewLocationById(h)!==0)return D;const T=this.viewDescriptorService.getViewContainerByViewId(h)?.id;return T===void 0||this.showOnActivityBar(T,m,D),D}showOnActivityBar(h,v,m){let w,D=setTimeout(()=>{D=void 0;const y=this.activityService.showViewContainerActivity(h,{badge:new E.ProgressBadge(()=>""),clazz:"progress-badge",priority:100}),T=Date.now(),_=300;w={dispose(){const L=Date.now()-T;L<_?setTimeout(()=>y.dispose(),_-L):y.dispose()}}},v.delay||300);m.finally(()=>{clearTimeout(D),(0,p.dispose)(w)})}withCompositeProgress(h,v,m){let w;function D(T){let _,L;return typeof T<"u"&&(typeof T=="number"?_=T:typeof T.increment=="number"&&(_=T.total??100,L=T.increment)),typeof _=="number"?(w||(w=h.show(_,m.delay),y.catch(()=>{}).finally(()=>w?.done())),typeof L=="number"&&w.worked(L)):(w?.done(),h.showWhile(y,m.delay)),w}const y=v({report:T=>{D(T)}});return D(m.total),y}withDialogProgress(h,v,m){const w=new p.DisposableStore,D=["workbench.action.quit","workbench.action.reloadWindow","copy","cut","editor.action.clipboardCopyAction","editor.action.clipboardCutAction"];let y;const T=P=>{const B=h.buttons||[];return h.sticky||B.push(h.cancellable?(0,t.localize)(6,null):(0,t.localize)(7,null)),y=new u.Dialog(this.layoutService.container,P,B,{type:"pending",detail:h.detail,cancelId:B.length-1,disableCloseAction:h.sticky,disableDefaultAction:h.sticky,keyEventProcessor:V=>{const z=this.keybindingService.softDispatch(V,this.layoutService.container);z?.commandId&&(D.includes(z.commandId)||l.EventHelper.stop(V,!0))}}),w.add(y),w.add((0,i.attachDialogStyler)(y,this.themeService)),y.show().then(V=>{m?.(V.button),(0,p.dispose)(y)}),y};let _=h.delay??0,L;const M=w.add(new k.RunOnceScheduler(()=>{_=0,L&&!y?y=T(L):L&&y.updateMessage(L)},0)),O=function(P){L=P,M.isScheduled()||M.schedule(_)},N=v({report:P=>{O(P.message)}});return N.finally(()=>{(0,p.dispose)(w)}),h.title&&O(h.title),N}};o=we([F(0,E.IActivityService),F(1,n.IPaneCompositePartService),F(2,d.IViewDescriptorService),F(3,d.IViewsService),F(4,I.INotificationService),F(5,A.IStatusbarService),F(6,r.ILayoutService),F(7,f.IThemeService),F(8,c.IKeybindingService)],o),e.ProgressService=o,(0,C.registerSingleton)(R.IProgressService,o,1)}),define(ae[2752],le([1,0,2257]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkbenchStorageService=void 0;class p extends t.NativeStorageService{constructor(A,k,E,I,b){super(A,{currentProfile:k.currentProfile,defaultProfile:E.defaultProfile},I,b),this.userDataProfileService=k,this.registerListeners()}registerListeners(){this._register(this.userDataProfileService.onDidChangeCurrentProfile(A=>A.join(this.switchToProfile(A.profile,A.preserveData))))}}e.NativeWorkbenchStorageService=p}),define(ae[2753],le([1,0,808,27,213,166]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveWorkbenchCommonProperties=void 0;async function k(E,I,b,S,C,r,u,i,f,c){const l=await(0,t.resolveCommonProperties)(I,b,S,A.process.arch,C,r,u,i,f),s=E.get(p.firstSessionDateStorageKey,-1),d=E.get(p.lastSessionDateStorageKey,-1);return l["common.version.shell"]=A.process.versions.electron,l["common.version.renderer"]=A.process.versions.chrome,l["common.firstSessionDate"]=s,l["common.lastSessionDate"]=d||"",l["common.isNewSession"]=d?"0":"1",l["common.remoteAuthority"]=(0,R.cleanRemoteAuthority)(c),l["common.sandboxed"]=A.process.sandboxed?"1":"0",l["common.cli"]=!!A.process.env.VSCODE_CLI,l}e.resolveWorkbenchCommonProperties=k}),define(ae[2754],le([1,0,27,213,8,2,128,46,102,2133,23,2753,2136,35,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryService=void 0;let f=class extends A.Disposable{constructor(l,s,d,n,a,o){if(super(),(0,p.supportsTelemetry)(s,l)){const g=(0,p.isInternalTelemetry)(s,a),h=d.getChannel("telemetryAppender"),v={appenders:[new b.TelemetryAppenderClient(h)],commonProperties:(0,C.resolveWorkbenchCommonProperties)(n,o,l.os.release,l.os.hostname,s.commit,s.version,l.machineId,g,l.installSourcePath,l.remoteAuthority),piiPaths:(0,p.getPiiPathsFromEnvironment)(l),sendErrorTelemetry:!0};this.impl=this._register(new r.TelemetryService(v,a,s))}else this.impl=p.NullTelemetryService;this.sendErrorTelemetry=this.impl.sendErrorTelemetry}setExperimentProperty(l,s){return this.impl.setExperimentProperty(l,s)}get telemetryLevel(){return this.impl.telemetryLevel}publicLog(l,s,d){return this.impl.publicLog(l,s,d)}publicLog2(l,s,d){return this.publicLog(l,s,d)}publicLogError(l,s){return this.impl.publicLogError(l,s)}publicLogError2(l,s){return this.publicLogError(l,s)}getTelemetryInfo(){return this.impl.getTelemetryInfo()}};f=we([F(0,k.INativeWorkbenchEnvironmentService),F(1,E.IProductService),F(2,I.ISharedProcessService),F(3,S.IStorageService),F(4,R.IConfigurationService),F(5,i.IFileService)],f),e.TelemetryService=f,(0,u.registerSingleton)(t.ITelemetryService,f,1)}),define(ae[465],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextMateService=void 0,e.ITextMateService=(0,t.createDecorator)("textMateService")}),define(ae[2755],le([1,0,1557,123,13,300,122,42,155,17,39,465,413,308,108,2]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageConfigurationFileHandler=void 0;function c(o){if(!Array.isArray(o))return!1;for(let g=0,h=o.length;g<h;g++)if(typeof o[g]!="string")return!1;return!0}function l(o){return c(o)&&o.length===2}let s=class extends f.Disposable{constructor(g,h,v,m,w){super(),this._languageService=h,this._extensionResourceLoaderService=v,this._extensionService=m,this._languageConfigurationService=w,this._done=new Map,this._register(this._languageService.onDidEncounterLanguage(async D=>{this._extensionService.whenInstalledExtensionsRegistered().then(()=>{this._loadConfigurationsForMode(D)})})),this._register(this._languageService.onDidChange(()=>{for(const[D]of this._done)this._loadConfigurationsForMode(D)})),this._register(g.onDidEncounterLanguage(D=>{this._loadConfigurationsForMode(D)}))}async _loadConfigurationsForMode(g){const h=this._languageService.getConfigurationFiles(g),v=(0,i.hash)(h.map(w=>w.toString()));if(this._done.get(g)===v)return;this._done.set(g,v);const m=await Promise.all(h.map(w=>this._readConfigFile(w)));for(const w of m)this._handleConfig(g,w)}async _readConfigFile(g){try{const h=await this._extensionResourceLoaderService.readExtensionResource(g),v=[];let m=(0,p.parse)(h,v);return v.length&&console.error(t.localize(0,null,g.toString(),v.map(w=>`[${w.offset}, ${w.length}] ${(0,r.getParseErrorMessage)(w.error)}`).join(` `))),(0,p.getNodeType)(m)!=="object"&&(console.error(t.localize(1,null,g.toString())),m={}),m}catch(h){return console.error(h),{}}}_extractValidCommentRule(g,h){const v=h.comments;if(typeof v>"u")return;if(!R.isObject(v)){console.warn(`[${g}]: language configuration: expected \`comments\` to be an object.`);return}let m;return typeof v.lineComment<"u"&&(typeof v.lineComment!="string"?console.warn(`[${g}]: language configuration: expected \`comments.lineComment\` to be a string.`):(m=m||{},m.lineComment=v.lineComment)),typeof v.blockComment<"u"&&(l(v.blockComment)?(m=m||{},m.blockComment=v.blockComment):console.warn(`[${g}]: language configuration: expected \`comments.blockComment\` to be an array of two strings.`)),m}_extractValidBrackets(g,h){const v=h.brackets;if(typeof v>"u")return;if(!Array.isArray(v)){console.warn(`[${g}]: language configuration: expected \`brackets\` to be an array.`);return}let m;for(let w=0,D=v.length;w<D;w++){const y=v[w];if(!l(y)){console.warn(`[${g}]: language configuration: expected \`brackets[${w}]\` to be an array of two strings.`);continue}m=m||[],m.push(y)}return m}_extractValidAutoClosingPairs(g,h){const v=h.autoClosingPairs;if(typeof v>"u")return;if(!Array.isArray(v)){console.warn(`[${g}]: language configuration: expected \`autoClosingPairs\` to be an array.`);return}let m;for(let w=0,D=v.length;w<D;w++){const y=v[w];if(Array.isArray(y)){if(!l(y)){console.warn(`[${g}]: language configuration: expected \`autoClosingPairs[${w}]\` to be an array of two strings or an object.`);continue}m=m||[],m.push({open:y[0],close:y[1]})}else{if(!R.isObject(y)){console.warn(`[${g}]: language configuration: expected \`autoClosingPairs[${w}]\` to be an array of two strings or an object.`);continue}if(typeof y.open!="string"){console.warn(`[${g}]: language configuration: expected \`autoClosingPairs[${w}].open\` to be a string.`);continue}if(typeof y.close!="string"){console.warn(`[${g}]: language configuration: expected \`autoClosingPairs[${w}].close\` to be a string.`);continue}if(typeof y.notIn<"u"&&!c(y.notIn)){console.warn(`[${g}]: language configuration: expected \`autoClosingPairs[${w}].notIn\` to be a string array.`);continue}m=m||[],m.push({open:y.open,close:y.close,notIn:y.notIn})}}return m}_extractValidSurroundingPairs(g,h){const v=h.surroundingPairs;if(typeof v>"u")return;if(!Array.isArray(v)){console.warn(`[${g}]: language configuration: expected \`surroundingPairs\` to be an array.`);return}let m;for(let w=0,D=v.length;w<D;w++){const y=v[w];if(Array.isArray(y)){if(!l(y)){console.warn(`[${g}]: language configuration: expected \`surroundingPairs[${w}]\` to be an array of two strings or an object.`);continue}m=m||[],m.push({open:y[0],close:y[1]})}else{if(!R.isObject(y)){console.warn(`[${g}]: language configuration: expected \`surroundingPairs[${w}]\` to be an array of two strings or an object.`);continue}if(typeof y.open!="string"){console.warn(`[${g}]: language configuration: expected \`surroundingPairs[${w}].open\` to be a string.`);continue}if(typeof y.close!="string"){console.warn(`[${g}]: language configuration: expected \`surroundingPairs[${w}].close\` to be a string.`);continue}m=m||[],m.push({open:y.open,close:y.close})}}return m}_extractValidColorizedBracketPairs(g,h){const v=h.colorizedBracketPairs;if(typeof v>"u")return;if(!Array.isArray(v)){console.warn(`[${g}]: language configuration: expected \`colorizedBracketPairs\` to be an array.`);return}const m=[];for(let w=0,D=v.length;w<D;w++){const y=v[w];if(!l(y)){console.warn(`[${g}]: language configuration: expected \`colorizedBracketPairs[${w}]\` to be an array of two strings.`);continue}m.push([y[0],y[1]])}return m}_extractValidOnEnterRules(g,h){const v=h.onEnterRules;if(typeof v>"u")return;if(!Array.isArray(v)){console.warn(`[${g}]: language configuration: expected \`onEnterRules\` to be an array.`);return}let m;for(let w=0,D=v.length;w<D;w++){const y=v[w];if(!R.isObject(y)){console.warn(`[${g}]: language configuration: expected \`onEnterRules[${w}]\` to be an object.`);continue}if(!R.isObject(y.action)){console.warn(`[${g}]: language configuration: expected \`onEnterRules[${w}].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(`[${g}]: language configuration: expected \`onEnterRules[${w}].action.indent\` to be 'none', 'indent', 'indentOutdent' or 'outdent'.`);continue}const _={indentAction:T};y.action.appendText&&(typeof y.action.appendText=="string"?_.appendText=y.action.appendText:console.warn(`[${g}]: language configuration: expected \`onEnterRules[${w}].action.appendText\` to be undefined or a string.`)),y.action.removeText&&(typeof y.action.removeText=="number"?_.removeText=y.action.removeText:console.warn(`[${g}]: language configuration: expected \`onEnterRules[${w}].action.removeText\` to be undefined or a number.`));const L=this._parseRegex(g,`onEnterRules[${w}].beforeText`,y.beforeText);if(!L)continue;const M={beforeText:L,action:_};if(y.afterText){const O=this._parseRegex(g,`onEnterRules[${w}].afterText`,y.afterText);O&&(M.afterText=O)}if(y.previousLineText){const O=this._parseRegex(g,`onEnterRules[${w}].previousLineText`,y.previousLineText);O&&(M.previousLineText=O)}m=m||[],m.push(M)}return m}_handleConfig(g,h){const v=this._extractValidCommentRule(g,h),m=this._extractValidBrackets(g,h),w=this._extractValidAutoClosingPairs(g,h),D=this._extractValidSurroundingPairs(g,h),y=this._extractValidColorizedBracketPairs(g,h),T=typeof h.autoCloseBefore=="string"?h.autoCloseBefore:void 0,_=h.wordPattern?this._parseRegex(g,"wordPattern",h.wordPattern):void 0,L=h.indentationRules?this._mapIndentationRules(g,h.indentationRules):void 0;let M;if(h.folding){const P=h.folding.markers,B=P&&P.start?this._parseRegex(g,"folding.markers.start",P.start):void 0,V=P&&P.end?this._parseRegex(g,"folding.markers.end",P.end):void 0,z=B&&V?{start:B,end:V}:void 0;M={offSide:h.folding.offSide,markers:z}}const O=this._extractValidOnEnterRules(g,h),N={comments:v,brackets:m,wordPattern:_,indentationRules:L,onEnterRules:O,autoClosingPairs:w,surroundingPairs:D,colorizedBracketPairs:y,autoCloseBefore:T,folding:M,__electricCharacterSupport:void 0};this._languageConfigurationService.register(g,N,50)}_parseRegex(g,h,v){if(typeof v=="string")try{return new RegExp(v,"")}catch(m){console.warn(`[${g}]: Invalid regular expression in \`${h}\`: `,m);return}if(R.isObject(v)){if(typeof v.pattern!="string"){console.warn(`[${g}]: language configuration: expected \`${h}.pattern\` to be a string.`);return}if(typeof v.flags<"u"&&typeof v.flags!="string"){console.warn(`[${g}]: language configuration: expected \`${h}.flags\` to be a string.`);return}try{return new RegExp(v.pattern,v.flags)}catch(m){console.warn(`[${g}]: Invalid regular expression in \`${h}\`: `,m);return}}console.warn(`[${g}]: language configuration: expected \`${h}\` to be a string or an object.`)}_mapIndentationRules(g,h){const v=this._parseRegex(g,"indentationRules.increaseIndentPattern",h.increaseIndentPattern);if(!v)return;const m=this._parseRegex(g,"indentationRules.decreaseIndentPattern",h.decreaseIndentPattern);if(!m)return;const w={increaseIndentPattern:v,decreaseIndentPattern:m};return h.indentNextLinePattern&&(w.indentNextLinePattern=this._parseRegex(g,"indentationRules.indentNextLinePattern",h.indentNextLinePattern)),h.unIndentedLinePattern&&(w.unIndentedLinePattern=this._parseRegex(g,"indentationRules.unIndentedLinePattern",h.unIndentedLinePattern)),w}};s=we([F(0,C.ITextMateService),F(1,E.ILanguageService),F(2,u.IExtensionResourceLoaderService),F(3,S.IExtensionService),F(4,k.ILanguageConfigurationService)],s),e.LanguageConfigurationFileHandler=s;const d="vscode://schemas/language-configuration",n={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}}}}}}}};b.Registry.as(I.Extensions.JSONContribution).registerSchema(d,n)}),define(ae[2756],le([1,0,1572,20,15,70,465,54,24,9,72,75,74,128,25,18,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends R.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(d){const n=d.getModel(l.resource);return n||d.createModel("",null,l.resource)}_append(d,n){const a=d.getLineCount();d.applyEdits([{range:new p.Range(a,1073741824,a,1073741824),text:n}])}async run(d){const n=d.get(k.ITextMateService),a=d.get(E.IModelService),o=d.get(I.IEditorService),g=d.get(C.ICodeEditorService),h=d.get(r.IHostService),v=d.get(u.INativeWorkbenchEnvironmentService),m=d.get(i.ILoggerService),w=d.get(c.IFileService),D=(0,f.joinPath)(v.tmpDir,`vcode-tm-log-${(0,S.generateUuid)()}.txt`);await w.createFile(D);const y=m.createLogger(D,{name:"debug textmate"}),T=this._getOrCreateModel(a),_=O=>{this._append(T,O+` `),M(),y.info(O),y.flush()};if(await h.openWindow([{fileUri:D}],{forceNewWindow:!0}),!await o.openEditor({resource:T.uri,options:{pinned:!0}}))return;const M=()=>{const O=g.listCodeEditors();for(const N of O)N.hasModel()&&N.getModel().uri.toString()===l.resource.toString()&&N.revealLine(N.getModel().getLineCount())};_("// Open the file you want to test to the side and watch here"),_(`// Output mirrored at ${D}`),n.startDebugMode(O=>{this._append(T,O+` `),M(),y.info(O),y.flush()},()=>{})}}l.resource=b.URI.parse("inmemory:///tm-log.txt"),(0,R.registerAction2)(l)}),define(ae[2757],le([1,0,2603,2291,2604,2605,2756]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ae[961],le([1,0,2039,131,393]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.grammarsExtPoint=void 0,e.grammarsExtPoint=p.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"grammars",deps:[R.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"}},balancedBracketScopes:{description:t.localize(7,null),type:"array",items:{type:"string"},default:["*"]},unbalancedBracketScopes:{description:t.localize(8,null),type:"array",items:{type:"string"},default:[]}},required:["scopeName","path"]}}})}),define(ae[2758],le([1,0,40,961,39,31]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EmmetEditorAction=void 0;class k{constructor(b){Object.keys(k._grammars).length||this.fillModeScopeMap(b)}fillModeScopeMap(b){b.forEach(S=>{S.value.forEach(C=>{C.language&&C.scopeName&&(k._grammars[C.language]=C.scopeName)})})}getGrammar(b){return k._grammars[b]}}k._grammars={};class E extends t.EditorAction{constructor(b){super(b),this._lastGrammarContributions=null,this._lastExtensionService=null,this.emmetActionName=b.actionName}_withGrammarContributions(b){return this._lastExtensionService!==b&&(this._lastExtensionService=b,this._lastGrammarContributions=b.readExtensionPointContributions(p.grammarsExtPoint).then(S=>new k(S))),this._lastGrammarContributions||Promise.resolve(null)}run(b,S){const C=b.get(R.IExtensionService),r=b.get(A.ICommandService);return this._withGrammarContributions(C).then(u=>{if(this.id==="editor.emmet.action.expandAbbreviation"&&u)return r.executeCommand("emmet.expandAbbreviation",E.getLanguage(S,u))})}static getLanguage(b,S){const C=b.getModel(),r=b.getSelection();if(!C||!r)return null;const u=r.getStartPosition();C.tokenization.tokenizeIfCheap(u.lineNumber);const f=C.getLanguageIdAtPosition(u.lineNumber,u.column).split(".").pop();return f?{language:f,parentMode:(()=>{const l=S.getGrammar(f);if(!l)return f;const s=l.split(".");if(s.length<2)return f;for(let d=1;d<s.length;d++){const n=s[s.length-d];if(this.emmetSupportedModes.indexOf(n)!==-1)return n}return f})()}:null}}e.EmmetEditorAction=E,E.emmetSupportedModes=["html","css","xml","xsl","haml","jade","jsx","slim","scss","sass","less","stylus","styl","svg"]}),define(ae[2759],le([1,0,1641,2758,40,59,7,15]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class I extends p.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:E.MenuId.MenubarEditMenu,group:"5_insert",title:t.localize(1,null),order:3}})}}(0,R.registerEditorAction)(I)}),define(ae[2760],le([1,0,2759]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ae[962],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeRule=e.findMatchingThemeRule=void 0;function t(A,k,E=!0){for(let I=k.length-1;I>=0;I--){const b=k.slice(0,I),S=k[I],C=p(A,S,b,E);if(C)return C}return null}e.findMatchingThemeRule=t;function p(A,k,E,I){let b=null;for(let S=A.tokenColors.length-1;S>=0;S--){const C=A.tokenColors[S];if(I&&!C.settings.foreground)continue;let r;if(typeof C.scope=="string")r=C.scope.split(/,/).map(u=>u.trim());else if(Array.isArray(C.scope))r=C.scope;else continue;for(let u=0,i=r.length;u<i;u++){const f=r[u],c=new R(f,C.settings);c.matches(k,E)&&c.isMoreSpecific(b)&&(b=c)}}return b}class R{constructor(k,E){this.rawSelector=k,this.settings=E;const I=this.rawSelector.split(/ /);this.scope=I[I.length-1],this.parentScopes=I.slice(0,I.length-1)}matches(k,E){return R._matches(this.scope,this.parentScopes,k,E)}static _cmp(k,E){if(k===null&&E===null)return 0;if(k===null)return-1;if(E===null)return 1;if(k.scope.length!==E.scope.length)return k.scope.length-E.scope.length;const I=k.parentScopes.length,b=E.parentScopes.length;if(I!==b)return I-b;for(let S=0;S<I;S++){const C=k.parentScopes[S].length,r=E.parentScopes[S].length;if(C!==r)return C-r}return 0}isMoreSpecific(k){return R._cmp(this,k)>0}static _matchesOne(k,E){const I=k+".";return k===E||E.substring(0,I.length)===I}static _matches(k,E,I,b){if(!this._matchesOne(k,I))return!1;let S=E.length-1,C=b.length-1;for(;S>=0&&C>=0;)this._matchesOne(E[S],b[C])&&S--,C--;return S===-1}}e.ThemeRule=R}),define(ae[2761],le([1,0,18,2]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMScopeRegistry=void 0;class R extends p.Disposable{constructor(){super(),this._scopeNameToLanguageRegistration=Object.create(null)}reset(){this._scopeNameToLanguageRegistration=Object.create(null)}register(k){if(this._scopeNameToLanguageRegistration[k.scopeName]){const E=this._scopeNameToLanguageRegistration[k.scopeName];t.isEqual(E.location,k.location)||console.warn(`Overwriting grammar scope name to file mapping for scope ${k.scopeName}. Old grammar file: ${E.location.toString()}. New grammar file: ${k.location.toString()}`)}this._scopeNameToLanguageRegistration[k.scopeName]=k}getGrammarDefinition(k){return this._scopeNameToLanguageRegistration[k]||null}}e.TMScopeRegistry=R}),define(ae[2762],le([1,0,2,2761]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMGrammarFactory=e.missingTMGrammarErrorMessage=void 0,e.missingTMGrammarErrorMessage="No TM Grammar registered for this language.";class R extends t.Disposable{constructor(k,E,I,b){super(),this._host=k,this._initialState=I.INITIAL,this._scopeRegistry=this._register(new p.TMScopeRegistry),this._injections={},this._injectedEmbeddedLanguages={},this._languageToScope=new Map,this._grammarRegistry=this._register(new I.Registry({onigLib:b,loadGrammar:async S=>{const C=this._scopeRegistry.getGrammarDefinition(S);if(!C)return this._host.logTrace(`No grammar found for scope ${S}`),null;const r=C.location;try{const u=await this._host.readFile(r);return I.parseRawGrammar(u,r.path)}catch(u){return this._host.logError(`Unable to load and parse grammar for scope ${S} from ${r}`,u),null}},getInjections:S=>{const C=S.split(".");let r=[];for(let u=1;u<=C.length;u++){const i=C.slice(0,u).join(".");r=[...r,...this._injections[i]||[]]}return r}}));for(const S of E){if(this._scopeRegistry.register(S),S.injectTo){for(const C of S.injectTo){let r=this._injections[C];r||(this._injections[C]=r=[]),r.push(S.scopeName)}if(S.embeddedLanguages)for(const C of S.injectTo){let r=this._injectedEmbeddedLanguages[C];r||(this._injectedEmbeddedLanguages[C]=r=[]),r.push(S.embeddedLanguages)}}S.language&&this._languageToScope.set(S.language,S.scopeName)}}has(k){return this._languageToScope.has(k)}setTheme(k,E){this._grammarRegistry.setTheme(k,E)}getColorMap(){return this._grammarRegistry.getColorMap()}async createGrammar(k,E){const I=this._languageToScope.get(k);if(typeof I!="string")throw new Error(e.missingTMGrammarErrorMessage);const b=this._scopeRegistry.getGrammarDefinition(I);if(!b)throw new Error(e.missingTMGrammarErrorMessage);const S=b.embeddedLanguages;if(this._injectedEmbeddedLanguages[I]){const u=this._injectedEmbeddedLanguages[I];for(const i of u)for(const f of Object.keys(i))S[f]=i[f]}const C=Object.keys(S).length>0;let r;try{r=await this._grammarRegistry.loadGrammarWithConfiguration(I,E,{embeddedLanguages:S,tokenTypes:b.tokenTypes,balancedBracketSelectors:b.balancedBracketSelectors,unbalancedBracketSelectors:b.unbalancedBracketSelectors})}catch(u){throw u.message&&u.message.startsWith("No grammar provided for")?new Error(e.missingTMGrammarErrorMessage):u}return{languageId:k,grammar:r,initialState:this._initialState,containsEmbeddedLanguages:C}}}e.TMGrammarFactory=R}),define(ae[2763],le([1,0,6,92,325,2]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TMTokenization=void 0;class k extends A.Disposable{constructor(I,b,S){super(),this._onDidEncounterLanguage=this._register(new t.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._grammar=I,this._initialState=b,this._containsEmbeddedLanguages=S,this._seenLanguages=[]}getInitialState(){return this._initialState}tokenize(I,b,S){throw new Error("Not supported!")}tokenizeEncoded(I,b,S){const C=this._grammar.tokenizeLine2(I,S,500);if(C.stoppedEarly)return console.warn(`Time limit reached when tokenizing line: ${I.substring(0,100)}`),new p.EncodedTokenizationResult(C.tokens,S);if(this._containsEmbeddedLanguages){const u=this._seenLanguages,i=C.tokens;for(let f=0,c=i.length>>>1;f<c;f++){const l=i[(f<<1)+1],s=R.TokenMetadata.getLanguageId(l);u[s]||(u[s]=!0,this._onDidEncounterLanguage.fire(s))}}let r;return S.equals(C.ruleStack)?r=S:r=C.ruleStack,new p.EncodedTokenizationResult(C.tokens,r)}}e.TMTokenization=k}),define(ae[466],le([1,0,219,56]),function(J,e,t,p){"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 R(h){return[e.UTF8,e.UTF8_with_bom,e.UTF16be,e.UTF16le].some(v=>v===h)}e.isUTFEncoding=R,e.UTF16be_BOM=[254,255],e.UTF16le_BOM=[255,254],e.UTF8_BOM=[239,187,191];const A=512,k=512,E=512*8,I=512*128;var b;(function(h){h[h.STREAM_IS_BINARY=1]="STREAM_IS_BINARY"})(b=e.DecodeStreamErrorKind||(e.DecodeStreamErrorKind={}));class S extends Error{constructor(v,m){super(v),this.decodeStreamErrorKind=m}}e.DecodeStreamError=S;class C{static async create(v){let m;if(v!==e.UTF8)m=(await new Promise((D,y)=>{J(["@vscode/iconv-lite-umd"],D,y)})).getDecoder(f(v));else{const w=new TextDecoder;m={write(D){return w.decode(D,{stream:!0})},end(){return w.decode()}}}return new C(m)}constructor(v){this.iconvLiteDecoder=v}write(v){return this.iconvLiteDecoder.write(v)}end(){return this.iconvLiteDecoder.end()}}function r(h,v){const m=v.minBytesRequiredForDetection??v.guessEncoding?E:k;return new Promise((w,D)=>{const y=(0,t.newWriteableStream)(N=>N.join("")),T=[];let _=0,L,M;const O=async()=>{try{const N=await g({buffer:p.VSBuffer.concat(T),bytesRead:_},v.guessEncoding);if(N.seemsBinary&&v.acceptTextOnly)throw new S("Stream is binary but only text is accepted for decoding",1);N.encoding=await v.overwriteEncoding(N.encoding),L=await C.create(N.encoding);const P=L.write(p.VSBuffer.concat(T).buffer);y.write(P),T.length=0,_=0,w({stream:y,detected:N})}catch(N){M?.dispose(),y.destroy(),D(N)}};M=(0,t.listenStream)(h,{onData:async N=>{L?y.write(L.write(N.buffer)):(T.push(N),_+=N.byteLength,_>=m&&(h.pause(),await O(),setTimeout(()=>h.resume())))},onError:N=>y.error(N),onEnd:async()=>{L||await O(),y.end(L?.end())}})})}e.toDecodeStream=r;async function u(h,v,m){const D=(await new Promise((_,L)=>{J(["@vscode/iconv-lite-umd"],_,L)})).getEncoder(f(v),m);let y=!1,T=!1;return{read(){if(T)return null;const _=h.read();if(typeof _!="string"){if(T=!0,!y&&m?.addBOM)switch(v){case e.UTF8:case e.UTF8_with_bom:return p.VSBuffer.wrap(Uint8Array.from(e.UTF8_BOM));case e.UTF16be:return p.VSBuffer.wrap(Uint8Array.from(e.UTF16be_BOM));case e.UTF16le:return p.VSBuffer.wrap(Uint8Array.from(e.UTF16le_BOM))}const L=D.end();return L&&L.length>0?(y=!0,p.VSBuffer.wrap(L)):null}return y=!0,p.VSBuffer.wrap(D.write(_))}}}e.toEncodeReadable=u;async function i(h){return(await new Promise((m,w)=>{J(["@vscode/iconv-lite-umd"],m,w)})).encodingExists(f(h))}e.encodingExists=i;function f(h){return h===e.UTF8_with_bom||h===null?e.UTF8:h}e.toNodeEncoding=f;function c(h,v){if(!h||v<e.UTF16be_BOM.length)return null;const m=h.readUInt8(0),w=h.readUInt8(1);if(m===e.UTF16be_BOM[0]&&w===e.UTF16be_BOM[1])return e.UTF16be;if(m===e.UTF16le_BOM[0]&&w===e.UTF16le_BOM[1])return e.UTF16le;if(v<e.UTF8_BOM.length)return null;const D=h.readUInt8(2);return m===e.UTF8_BOM[0]&&w===e.UTF8_BOM[1]&&D===e.UTF8_BOM[2]?e.UTF8_with_bom:null}e.detectEncodingByBOMFromBuffer=c;const l=["ascii","utf-16","utf-32"];async function s(h){const v=await new Promise((T,_)=>{J(["jschardet"],T,_)}),m=h.slice(0,I),w=a(m.buffer),D=v.detect(w);if(!D||!D.encoding)return null;const y=D.encoding.toLowerCase();return 0<=l.indexOf(y)?null:n(D.encoding)}const d={ibm866:"cp866",big5:"cp950"};function n(h){const v=h.replace(/[^a-zA-Z0-9]/g,"").toLowerCase();return d[v]||v}function a(h){let v="";for(let m=0;m<h.length;m++)v+=String.fromCharCode(h[m]);return v}function o(h){switch(h){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 v=h.match(/windows(\d+)/);return v?"windows-"+v[1]:h}}}e.toCanonicalName=o;function g({buffer:h,bytesRead:v},m){let w=c(h,v),D=!1;if(w!==e.UTF16be&&w!==e.UTF16le&&h){let y=!0,T=!0,_=!1;for(let L=0;L<v&&L<A;L++){const M=L%2===1,O=h.readUInt8(L)===0;if(O&&(_=!0),y&&(M&&!O||!M&&O)&&(y=!1),T&&(M&&O||!M&&!O)&&(T=!1),O&&!y&&!T)break}_&&(y?w=e.UTF16le:T?w=e.UTF16be:D=!0)}return m&&!D&&!w&&h?s(h.slice(0,v)).then(y=>({seemsBinary:!1,encoding:y})):{seemsBinary:D,encoding:w}}e.detectEncodingFromBuffer=g,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(ae[2764],le([1,0,2043,11,32,25,66,2,16]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileSaveParticipant=void 0;let b=class extends E.Disposable{constructor(C,r){super(),this.progressService=C,this.logService=r,this.saveParticipants=[]}addSaveParticipant(C){const r=(0,I.insert)(this.saveParticipants,C);return(0,E.toDisposable)(()=>r())}participate(C,r,u){const i=new R.CancellationTokenSource(u);return this.progressService.withProgress({title:(0,t.localize)(0,null,C.name),location:15,cancellable:!0,delay:C.isDirty()?3e3:5e3},async f=>{C.textEditorModel?.pushStackElement();for(const c of this.saveParticipants){if(i.token.isCancellationRequested||!C.textEditorModel)break;try{const l=c.participate(C,r,f,i.token);await(0,p.raceCancellation)(l,i.token)}catch(l){this.logService.warn(l)}}C.textEditorModel?.pushStackElement()},()=>{i.dispose(!0)})}dispose(){this.saveParticipants.splice(0,this.saveParticipants.length)}};b=we([F(0,k.IProgressService),F(1,A.ILogService)],b),e.TextFileSaveParticipant=b}),define(ae[78],le([1,0,19,5,56,13]),function(J,e,t,p,R,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,p.createDecorator)("textFileService");var k;(function(f){f[f.FILE_IS_BINARY=0]="FILE_IS_BINARY"})(k=e.TextFileOperationResult||(e.TextFileOperationResult={}));class E extends t.FileOperationError{static isTextFileOperationError(c){return c instanceof Error&&!(0,A.isUndefinedOrNull)(c.textFileOperationResult)}constructor(c,l,s){super(c,11),this.textFileOperationResult=l,this.options=s}}e.TextFileOperationError=E;var I;(function(f){f[f.SAVED=0]="SAVED",f[f.DIRTY=1]="DIRTY",f[f.PENDING_SAVE=2]="PENDING_SAVE",f[f.CONFLICT=3]="CONFLICT",f[f.ORPHAN=4]="ORPHAN",f[f.ERROR=5]="ERROR"})(I=e.TextFileEditorModelState||(e.TextFileEditorModelState={}));var b;(function(f){f[f.EDITOR=1]="EDITOR",f[f.REFERENCE=2]="REFERENCE",f[f.OTHER=3]="OTHER"})(b=e.TextFileResolveReason||(e.TextFileResolveReason={}));var S;(function(f){f[f.Encode=0]="Encode",f[f.Decode=1]="Decode"})(S=e.EncodingMode||(e.EncodingMode={}));function C(f){const c=f;return(0,A.areFunctions)(c.setEncoding,c.getEncoding,c.save,c.revert,c.isDirty,c.getLanguageId)}e.isTextFileEditorModel=C;function r(f){const c=[];let l;for(;typeof(l=f.read())=="string";)c.push(l);return c.join("")}e.snapshotToString=r;function u(f){let c=!1;return{read(){return c?null:(c=!0,f)}}}e.stringToSnapshot=u;function i(f){if(!(typeof f>"u"))return typeof f=="string"?R.VSBuffer.fromString(f):{read:()=>{const c=f.read();return typeof c=="string"?R.VSBuffer.fromString(c):null}}}e.toBufferOrReadable=i}),define(ae[2765],le([1,0,116,1454,5,77,78,67,11]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipant=void 0;class b{constructor(r){this._proxy=r.getProxy(E.ExtHostContext.ExtHostDocumentSaveParticipant)}async participate(r,u,i,f){if(!r.textEditorModel||!(0,t.shouldSynchronizeModel)(r.textEditorModel))return;const c=new Promise((l,s)=>{setTimeout(()=>s(new Error((0,p.localize)(0,null))),1750),this._proxy.$participateInSave(r.resource,u.reason).then(d=>{if(!d.every(n=>n))return Promise.reject(new Error("listener failed"))}).then(l,s)});return(0,I.raceCancellationError)(c,f)}}let S=class{constructor(r,u,i){this._textFileService=i,this._saveParticipantDisposable=this._textFileService.files.addSaveParticipant(u.createInstance(b,r))}dispose(){this._saveParticipantDisposable.dispose()}};S=we([A.extHostCustomer,F(1,R.IInstantiationService),F(2,k.ITextFileService)],S),e.SaveParticipant=S}),define(ae[218],le([1,0,9,18,239,42,34,8,54,78,292,22,19,12,6,49,199,2,5,130]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceLabel=e.ResourceLabels=e.DEFAULT_LABELS_CONTAINER=void 0;function n(v){if(!(!v||!v.resource))return t.URI.isUri(v.resource)?v.resource:v.resource.primary}e.DEFAULT_LABELS_CONTAINER={onDidChangeVisibility:i.Event.None};let a=class extends l.Disposable{constructor(m,w,D,y,T,_,L,M,O,N){super(),this.instantiationService=w,this.configurationService=D,this.modelService=y,this.workspaceService=T,this.languageService=_,this.decorationsService=L,this.themeService=M,this.labelService=O,this.textFileService=N,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(w=>{this.widgets.forEach(D=>D.notifyVisibilityChanged(w))})),this._register(this.languageService.onDidChange(()=>this.widgets.forEach(w=>w.notifyExtensionsRegistered()))),this._register(this.modelService.onModelLanguageChanged(w=>{!w.model.uri||this.widgets.forEach(D=>D.notifyModelLanguageChanged(w.model))})),this._register(this.modelService.onModelAdded(w=>{!w.uri||this.widgets.forEach(D=>D.notifyModelAdded(w))})),this._register(this.workspaceService.onDidChangeWorkspaceFolders(()=>{this.widgets.forEach(w=>w.notifyWorkspaceFoldersChange())})),this._register(this.decorationsService.onDidChangeDecorations(w=>{let D=!1;this.widgets.forEach(y=>{y.notifyFileDecorationsChanges(w)&&(D=!0)}),D&&this._onDidChangeDecorations.fire()})),this._register(this.themeService.onDidColorThemeChange(()=>this.widgets.forEach(w=>w.notifyThemeChange()))),this._register(this.configurationService.onDidChangeConfiguration(w=>{w.affectsConfiguration(r.FILES_ASSOCIATIONS_CONFIG)&&this.widgets.forEach(D=>D.notifyFileAssociationsChange())})),this._register(this.labelService.onDidChangeFormatters(w=>{this.widgets.forEach(D=>D.notifyFormattersChange(w.scheme))})),this._register(this.textFileService.untitled.onDidChangeLabel(w=>{this.widgets.forEach(D=>D.notifyUntitledLabelChange(w.resource))}))}get(m){return this.labels[m]}create(m,w){const D=this.instantiationService.createInstance(h,m,w),y={element:D.element,onDidRender:D.onDidRender,setLabel:(T,_,L)=>D.setLabel(T,_,L),setResource:(T,_)=>D.setResource(T,_),setFile:(T,_)=>D.setFile(T,_),clear:()=>D.clear(),dispose:()=>this.disposeWidget(D)};return this.labels.push(y),this.widgets.push(D),y}disposeWidget(m){const w=this.widgets.indexOf(m);w>-1&&(this.widgets.splice(w,1),this.labels.splice(w,1)),(0,l.dispose)(m)}clear(){this.widgets=(0,l.dispose)(this.widgets),this.labels=[]}dispose(){super.dispose(),this.clear()}};a=we([F(1,s.IInstantiationService),F(2,E.IConfigurationService),F(3,I.IModelService),F(4,k.IWorkspaceContextService),F(5,A.ILanguageService),F(6,S.IDecorationsService),F(7,u.IThemeService),F(8,f.ILabelService),F(9,b.ITextFileService)],a),e.ResourceLabels=a;let o=class extends a{get element(){return this.label}constructor(m,w,D,y,T,_,L,M,O,N,P){super(e.DEFAULT_LABELS_CONTAINER,D,y,T,_,L,M,O,N,P),this.label=this._register(this.create(m,w))}};o=we([F(2,s.IInstantiationService),F(3,E.IConfigurationService),F(4,I.IModelService),F(5,k.IWorkspaceContextService),F(6,A.ILanguageService),F(7,S.IDecorationsService),F(8,u.IThemeService),F(9,f.ILabelService),F(10,b.ITextFileService)],o),e.ResourceLabel=o;var g;(function(v){v[v.Basic=1]="Basic",v[v.Full=2]="Full"})(g||(g={}));let h=class extends R.IconLabel{constructor(m,w,D,y,T,_,L,M){super(m,w),this.languageService=D,this.modelService=y,this.decorationsService=T,this.labelService=_,this.textFileService=L,this.contextService=M,this._onDidRender=this._register(new i.Emitter),this.onDidRender=this._onDidRender.event,this.label=void 0,this.decoration=this._register(new l.MutableDisposable),this.options=void 0,this.computedIconClasses=void 0,this.computedLanguageId=void 0,this.computedPathLabel=void 0,this.computedWorkspaceFolderLabel=void 0,this.needsRedraw=void 0,this.isHidden=!1}notifyVisibilityChanged(m){m===this.isHidden&&(this.isHidden=!m,m&&this.needsRedraw&&(this.render({updateIcon:this.needsRedraw===g.Full,updateDecoration:this.needsRedraw===g.Full}),this.needsRedraw=void 0))}notifyModelLanguageChanged(m){this.handleModelEvent(m)}notifyModelAdded(m){this.handleModelEvent(m)}handleModelEvent(m){const w=n(this.label);!w||(0,p.isEqual)(m.uri,w)&&this.computedLanguageId!==m.getLanguageId()&&(this.computedLanguageId=m.getLanguageId(),this.render({updateIcon:!0,updateDecoration:!1}))}notifyFileDecorationsChanges(m){if(!this.options)return!1;const w=n(this.label);return w&&this.options.fileDecorations&&m.affectsResource(w)?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){n(this.label)?.scheme===m&&this.render({updateIcon:!1,updateDecoration:!1})}notifyUntitledLabelChange(m){(0,p.isEqual)(m,n(this.label))&&this.render({updateIcon:!1,updateDecoration:!1})}notifyWorkspaceFoldersChange(){if(typeof this.computedWorkspaceFolderLabel=="string"){const m=n(this.label);t.URI.isUri(m)&&this.label?.name===this.computedWorkspaceFolderLabel&&this.setFile(m,this.options)}}setFile(m,w){const D=w?.hideLabel;let y;if(!D){if(w?.fileKind===r.FileKind.ROOT_FOLDER){const _=this.contextService.getWorkspaceFolder(m);_&&(y=_.name,this.computedWorkspaceFolderLabel=y)}y||(y=(0,d.normalizeDriveLetter)((0,p.basenameOrAuthority)(m)))}let T;w?.hidePath||(T=this.labelService.getUriLabel((0,p.dirname)(m),{relative:!0})),this.setResource({resource:m,name:y,description:T},w)}setResource(m,w=Object.create(null)){const D=n(m),y=m?.resource&&!t.URI.isUri(m.resource);if(!w.forceLabel&&!y&&D?.scheme===C.Schemas.untitled){const M=this.textFileService.untitled.get(D);if(M&&!M.hasAssociatedFilePath){if(typeof m.name=="string"&&(m.name=M.name),typeof m.description=="string"){const N=M.resource.path;m.name!==N?m.description=N:m.description=void 0}const O=M.resource.path;M.name!==O?w.title=`${M.name} \u2022 ${O}`:w.title=O}}const T=this.hasResourceChanged(m),_=T||this.hasPathLabelChanged(m),L=this.hasFileKindChanged(w);this.label=m,this.options=w,T&&(this.computedLanguageId=void 0),_&&(this.computedPathLabel=void 0),this.render({updateIcon:T||L,updateDecoration:T||L})}hasFileKindChanged(m){const w=m?.fileKind,D=this.options?.fileKind;return w!==D}hasResourceChanged(m){const w=n(m),D=n(this.label);return w&&D?w.toString()!==D.toString():!(!w&&!D)}hasPathLabelChanged(m){const w=n(m);return!!w&&this.computedPathLabel!==this.labelService.getUriLabel(w)}clear(){this.label=void 0,this.options=void 0,this.computedLanguageId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0,this.setLabel("")}render(m){if(this.isHidden)return this.needsRedraw!==g.Full&&(this.needsRedraw=m.updateIcon||m.updateDecoration?g.Full:g.Basic),!1;if(m.updateIcon&&(this.computedIconClasses=void 0),!this.label)return!1;const w={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,disabledCommand:this.options?.disabledCommand,labelEscapeNewLines:this.options?.labelEscapeNewLines},D=n(this.label),y=this.label.name;if(this.options?.title!==void 0&&(w.title=this.options.title),D&&D.scheme!==C.Schemas.data&&(!this.options?.title||typeof this.options.title!="string"&&!this.options.title.markdownNotSupportedFallback)&&(this.computedPathLabel||(this.computedPathLabel=this.labelService.getUriLabel(D)),!w.title||typeof w.title=="string"?w.title=this.computedPathLabel:w.title.markdownNotSupportedFallback||(w.title.markdownNotSupportedFallback=this.computedPathLabel)),this.options&&!this.options.hideIcon&&(this.computedIconClasses||(this.computedIconClasses=(0,c.getIconClasses)(this.modelService,this.languageService,D,this.options.fileKind)),w.extraClasses=this.computedIconClasses.slice(0)),this.options?.extraClasses&&w.extraClasses.push(...this.options.extraClasses),this.options?.fileDecorations&&D){m.updateDecoration&&(this.decoration.value=this.decorationsService.getDecoration(D,this.options.fileKind!==r.FileKind.FILE));const T=this.decoration.value;if(T){if(T.tooltip){if(typeof w.title=="string")w.title=`${w.title} \u2022 ${T.tooltip}`;else if(typeof w.title?.markdown=="string"){const _=`${w.title.markdown} \u2022 ${T.tooltip}`;w.title={markdown:_,markdownNotSupportedFallback:_}}}T.strikethrough&&(w.strikethrough=!0),this.options.fileDecorations.colors&&w.extraClasses.push(T.labelClassName),this.options.fileDecorations.badges&&(w.extraClasses.push(T.badgeClassName),w.extraClasses.push(T.iconClassName))}}return this.setLabel(y||"",this.label.description,w),this._onDidRender.fire(),!0}dispose(){super.dispose(),this.label=void 0,this.options=void 0,this.computedLanguageId=void 0,this.computedIconClasses=void 0,this.computedPathLabel=void 0,this.computedWorkspaceFolderLabel=void 0}};h=we([F(2,A.ILanguageService),F(3,I.IModelService),F(4,S.IDecorationsService),F(5,f.ILabelService),F(6,b.ITextFileService),F(7,k.IWorkspaceContextService)],h)}),define(ae[2766],le([1,0,304,21,6,96,144,2,53,18,9,8,19,5,76,33,34,218,516,12,1486,24,114,717]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsOutlinePicker=e.BreadcrumbsFilePicker=e.FileSorter=e.BreadcrumbsPicker=void 0;let g=class{constructor(P,B,V,z,x){this.resource=B,this._instantiationService=V,this._themeService=z,this._configurationService=x,this._disposables=new E.DisposableStore,this._fakeEvent=new UIEvent("fakeEvent"),this._onWillPickElement=new R.Emitter,this.onWillPickElement=this._onWillPickElement.event,this._previewDispoables=new E.MutableDisposable,this._domNode=document.createElement("div"),this._domNode.className="monaco-breadcrumbs-picker show-file-icons",P.appendChild(this._domNode)}dispose(){this._disposables.dispose(),this._previewDispoables.dispose(),this._onWillPickElement.dispose(),this._domNode.remove(),setTimeout(()=>this._tree.dispose(),0)}async show(P,B,V,z,x){const W=this._themeService.getColorTheme().getColor(f.breadcrumbsPickerBackground);this._arrow=document.createElement("div"),this._arrow.className="arrow",this._arrow.style.borderColor=`transparent transparent ${W?W.toString():""}`,this._domNode.appendChild(this._arrow),this._treeContainer=document.createElement("div"),this._treeContainer.style.background=W?W.toString():"",this._treeContainer.style.paddingTop="2px",this._treeContainer.style.boxShadow=`0 0 8px 2px ${this._themeService.getColorTheme().getColor(f.widgetShadow)}`,this._domNode.appendChild(this._treeContainer),this._layoutInfo={maxHeight:B,width:V,arrowSize:z,arrowOffset:x,inputHeight:0},this._tree=this._createTree(this._treeContainer,P),this._disposables.add(this._tree.onDidOpen(async U=>{const{element:$,editorOptions:q,sideBySide:X}=U;await this._revealElement($,{...q,preserveFocus:!1},X)})),this._disposables.add(this._tree.onDidChangeFocus(U=>{this._previewDispoables.value=this._previewElement(U.elements[0])})),this._disposables.add(this._tree.onDidChangeContentHeight(()=>{this._layout()})),this._domNode.focus();try{await this._setInput(P),this._layout()}catch(U){(0,p.onUnexpectedError)(U)}}_layout(){const P=2*this._layoutInfo.arrowSize,B=Math.min(this._layoutInfo.maxHeight-P,this._tree.contentHeight),V=B+P;this._domNode.style.height=`${V}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=`${B}px`,this._treeContainer.style.width=`${this._layoutInfo.width}px`,this._tree.layout(B,this._layoutInfo.width)}restoreViewState(){}};g=we([F(2,u.IInstantiationService),F(3,d.IThemeService),F(4,C.IConfigurationService)],g),e.BreadcrumbsPicker=g;class h{getHeight(P){return 22}getTemplateId(P){return"FileStat"}}class v{getId(P){return S.URI.isUri(P)?P.toString():(0,c.isWorkspace)(P)?P.id:(0,c.isWorkspaceFolder)(P)?P.uri.toString():P.resource.toString()}}let m=class{constructor(P){this._fileService=P}hasChildren(P){return S.URI.isUri(P)||(0,c.isWorkspace)(P)||(0,c.isWorkspaceFolder)(P)||P.isDirectory}async getChildren(P){if((0,c.isWorkspace)(P))return P.folders;let B;return(0,c.isWorkspaceFolder)(P)?B=P.uri:S.URI.isUri(P)?B=P:B=P.resource,(await this._fileService.resolve(B)).children??[]}};m=we([F(0,r.IFileService)],m);let w=class{constructor(P,B){this._labels=P,this._configService=B,this.templateId="FileStat"}renderTemplate(P){return this._labels.create(P,{supportHighlights:!0})}renderElement(P,B,V){const z=this._configService.getValue("explorer.decorations"),{element:x}=P;let H,W;(0,c.isWorkspaceFolder)(x)?(H=x.uri,W=r.FileKind.ROOT_FOLDER):(H=x.resource,W=x.isDirectory?r.FileKind.FOLDER:r.FileKind.FILE),V.setFile(H,{fileKind:W,hidePath:!0,fileDecorations:z,matches:(0,A.createMatches)(P.filterData),extraClasses:["picker-item"]})}disposeTemplate(P){P.dispose()}};w=we([F(1,C.IConfigurationService)],w);class D{getKeyboardNavigationLabel(P){return P.name}}class y{getWidgetAriaLabel(){return(0,n.localize)(0,null)}getAriaLabel(P){return P.name}}let T=class{constructor(P,B){this._workspaceService=P,this._cachedExpressions=new Map,this._disposables=new E.DisposableStore;const V=s.BreadcrumbsConfig.FileExcludes.bindTo(B),z=()=>{P.getWorkspace().folders.forEach(x=>{const H=V.getValue({resource:x.uri});if(!H)return;const W={};for(const U in H){if(typeof H[U]!="boolean")continue;const $=U.indexOf("**/")!==0?I.posix.join(x.uri.path,U):U;W[$]=H[U]}this._cachedExpressions.set(x.uri.toString(),k.parse(W))})};z(),this._disposables.add(V),this._disposables.add(V.onDidChange(z)),this._disposables.add(P.onDidChangeWorkspaceFolders(z))}dispose(){this._disposables.dispose()}filter(P,B){if((0,c.isWorkspaceFolder)(P))return!0;const V=this._workspaceService.getWorkspaceFolder(P.resource);return!V||!this._cachedExpressions.has(V.uri.toString())?!0:!this._cachedExpressions.get(V.uri.toString())((0,I.relative)(V.uri.path,P.resource.path),(0,b.basename)(P.resource))}};T=we([F(0,c.IWorkspaceContextService),F(1,C.IConfigurationService)],T);class _{compare(P,B){return(0,c.isWorkspaceFolder)(P)&&(0,c.isWorkspaceFolder)(B)?P.index-B.index:P.isDirectory===B.isDirectory?(0,t.compareFileNames)(P.name,B.name):P.isDirectory?-1:1}}e.FileSorter=_;let L=class extends g{constructor(P,B,V,z,x,H,W){super(P,B,V,z,x),this._workspaceService=H,this._editorService=W}_createTree(P){this._treeContainer.classList.add("file-icon-themable-tree"),this._treeContainer.classList.add("show-file-icons");const B=z=>{this._treeContainer.classList.toggle("align-icons-and-twisties",z.hasFileIcons&&!z.hasFolderIcons),this._treeContainer.classList.toggle("hide-arrows",z.hidesExplorerArrows===!0)};this._disposables.add(this._themeService.onDidFileIconThemeChange(B)),B(this._themeService.getFileIconTheme());const V=this._instantiationService.createInstance(l.ResourceLabels,l.DEFAULT_LABELS_CONTAINER);return this._disposables.add(V),this._instantiationService.createInstance(i.WorkbenchAsyncDataTree,"BreadcrumbsFilePicker",P,new h,[this._instantiationService.createInstance(w,V)],this._instantiationService.createInstance(m),{multipleSelectionSupport:!1,sorter:new _,filter:this._instantiationService.createInstance(T),identityProvider:new v,keyboardNavigationLabelProvider:new D,accessibilityProvider:this._instantiationService.createInstance(y),showNotFoundMessage:!1,overrideStyles:{listBackground:f.breadcrumbsPickerBackground}})}async _setInput(P){const{uri:B,kind:V}=P;let z;V===r.FileKind.ROOT_FOLDER?z=this._workspaceService.getWorkspace():z=(0,b.dirname)(B);const x=this._tree;await x.setInput(z);let H;for(const{element:W}of x.getNode().children)if((0,c.isWorkspaceFolder)(W)&&(0,b.isEqual)(W.uri,B)){H=W;break}else if((0,b.isEqual)(W.resource,B)){H=W;break}H&&(x.reveal(H,.5),x.setFocus([H],this._fakeEvent)),x.domFocus()}_previewElement(P){return E.Disposable.None}async _revealElement(P,B,V){return!(0,c.isWorkspaceFolder)(P)&&P.isFile?(this._onWillPickElement.fire(),await this._editorService.openEditor({resource:P.resource,options:B},V?a.SIDE_GROUP:void 0),!0):!1}};L=we([F(2,u.IInstantiationService),F(3,d.IThemeService),F(4,C.IConfigurationService),F(5,c.IWorkspaceContextService),F(6,a.IEditorService)],L),e.BreadcrumbsFilePicker=L;let M=class{constructor(P,B,V){this.comparator=P,this._order=V.getValue(B,"breadcrumbs.symbolSortOrder")}compare(P,B){return this._order==="name"?this.comparator.compareByName(P,B):this._order==="type"?this.comparator.compareByType(P,B):this.comparator.compareByPosition(P,B)}};M=we([F(2,o.ITextResourceConfigurationService)],M);class O extends g{_createTree(P,B){const{config:V}=B.outline;return this._instantiationService.createInstance(i.WorkbenchDataTree,"BreadcrumbsOutlinePicker",P,V.delegate,V.renderers,V.treeDataSource,{...V.options,sorter:this._instantiationService.createInstance(M,V.comparator,void 0),collapseByDefault:!0,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,showNotFoundMessage:!1})}_setInput(P){const B=P.outline.captureViewState();this.restoreViewState=()=>{B.dispose()};const V=this._tree;return V.setInput(P.outline),P.element!==P.outline&&(V.reveal(P.element,.5),V.setFocus([P.element],this._fakeEvent)),V.domFocus(),Promise.resolve()}_previewElement(P){return this._tree.getInput().preview(P)}async _revealElement(P,B,V){return this._onWillPickElement.fire(),await this._tree.getInput().reveal(P,B,V),!0}}e.BreadcrumbsOutlinePicker=O}),define(ae[963],le([1,0,10,139,1264,16,11,2,18,9,1485,15,8,7,37,19,5,98,76,48,73,12,218,516,2650,2766,43,24,58,86,49,70,63,29,717]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreadcrumbsControl=void 0;class O extends R.BreadcrumbsItem{constructor(x,H,W){super(),this.model=x,this.element=H,this.options=W,this._disposables=new E.DisposableStore}dispose(){this._disposables.dispose()}equals(x){return x instanceof O?this.element.element===x.element.element&&this.options.showFileIcons===x.options.showFileIcons&&this.options.showSymbolIcons===x.options.showSymbolIcons:!1}render(x){const{element:H,outline:W}=this.element;if(H===W){const X=t.$("span",void 0,"\u2026");x.appendChild(X);return}const U=W.config.delegate.getTemplateId(H),$=W.config.renderers.find(X=>X.templateId===U);if(!$){x.innerText="<<NO RENDERER>>";return}const q=$.renderTemplate(x);$.renderElement({element:H,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:0,collapsible:!1,collapsed:!1,visible:!0,filterData:void 0},0,q,void 0),this._disposables.add((0,E.toDisposable)(()=>{$.disposeTemplate(q)}))}}class N extends R.BreadcrumbsItem{constructor(x,H,W,U){super(),this.model=x,this.element=H,this.options=W,this._labels=U,this._disposables=new E.DisposableStore}dispose(){this._disposables.dispose()}equals(x){return x instanceof N?I.extUri.isEqual(this.element.uri,x.element.uri)&&this.options.showFileIcons===x.options.showFileIcons&&this.options.showSymbolIcons===x.options.showSymbolIcons:!1}render(x){const H=this._labels.create(x);H.setFile(this.element.uri,{hidePath:!0,hideIcon:this.element.kind===f.FileKind.FOLDER||!this.options.showFileIcons,fileKind:this.element.kind,fileDecorations:{colors:this.options.showDecorationColors,badges:!1}}),x.classList.add(f.FileKind[this.element.kind].toLowerCase()),this._disposables.add(H)}}const P=(0,L.registerIcon)("breadcrumb-separator",M.Codicon.chevronRight,(0,S.localize)(0,null));let B=class Li{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee){this._options=H,this._editorGroup=W,this._contextKeyService=U,this._contextViewService=$,this._instantiationService=q,this._themeService=X,this._quickInputService=G,this._fileService=Q,this._editorService=j,this._labelService=K,this._disposables=new E.DisposableStore,this._breadcrumbsDisposables=new E.DisposableStore,this._breadcrumbsPickerShowing=!1,this.domNode=document.createElement("div"),this.domNode.classList.add("breadcrumbs-control"),t.append(x,this.domNode),this._cfUseQuickPick=g.BreadcrumbsConfig.UseQuickPick.bindTo(Y),this._cfShowIcons=g.BreadcrumbsConfig.Icons.bindTo(Y),this._cfTitleScrollbarSizing=g.BreadcrumbsConfig.TitleScrollbarSizing.bindTo(Y),this._labels=this._instantiationService.createInstance(o.ResourceLabels,o.DEFAULT_LABELS_CONTAINER);const ie=this._cfTitleScrollbarSizing.getValue()??"default";this._widget=new R.BreadcrumbsWidget(this.domNode,Li.SCROLLBAR_SIZES[ie],P),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,n.attachBreadcrumbsStyler)(this._widget,this._themeService,{breadcrumbsBackground:H.breadcrumbsBackground})),this._ckBreadcrumbsPossible=Li.CK_BreadcrumbsPossible.bindTo(this._contextKeyService),this._ckBreadcrumbsVisible=Li.CK_BreadcrumbsVisible.bindTo(this._contextKeyService),this._ckBreadcrumbsActive=Li.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._labels.dispose(),this.domNode.remove()}layout(x){this._widget.layout(x)}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 x=m.EditorResourceAccessor.getCanonicalUri(this._editorGroup.activeEditor,{supportSideBySide:m.SideBySideEditor.PRIMARY}),H=this.isHidden();if(!x||!this._fileService.hasProvider(x))return this._ckBreadcrumbsPossible.set(!1),H?!1:(this.hide(),!0);const W=m.EditorResourceAccessor.getOriginalUri(this._editorGroup.activeEditor,{supportSideBySide:m.SideBySideEditor.PRIMARY});this.domNode.classList.toggle("hidden",!1),this._ckBreadcrumbsVisible.set(!0),this._ckBreadcrumbsPossible.set(!0);const U=this._instantiationService.createInstance(h.BreadcrumbsModel,W??x,this._editorGroup.activeEditorPane);this.domNode.classList.toggle("backslash-path",this._labelService.getSeparator(x.scheme,x.authority)==="\\");const $=()=>{this.domNode.classList.toggle("relative-path",U.isRelative());const j=this._cfShowIcons.getValue(),K={...this._options,showFileIcons:this._options.showFileIcons&&j,showSymbolIcons:this._options.showSymbolIcons&&j},Y=U.getElements().map(ee=>ee instanceof h.FileElement?new N(U,ee,K,this._labels):new O(U,ee,K));Y.length===0?(this._widget.setEnabled(!1),this._widget.setItems([new class extends R.BreadcrumbsItem{render(ee){ee.innerText=(0,S.localize)(4,null)}equals(ee){return ee===this}}])):(this._widget.setEnabled(!0),this._widget.setItems(Y),this._widget.reveal(Y[Y.length-1]))},q=U.onDidUpdate($),X=this._cfShowIcons.onDidChange($);$(),this._breadcrumbsDisposables.clear(),this._breadcrumbsDisposables.add(q),this._breadcrumbsDisposables.add(U),this._breadcrumbsDisposables.add(X),this._breadcrumbsDisposables.add((0,E.toDisposable)(()=>this._widget.setItems([])));const G=()=>{const j=this._cfTitleScrollbarSizing.getValue()??"default";this._widget.setHorizontalScrollbarSize(Li.SCROLLBAR_SIZES[j])};G();const Q=this._cfTitleScrollbarSizing.onDidChange(G);return this._breadcrumbsDisposables.add(Q),this._breadcrumbsDisposables.add({dispose:()=>{this._breadcrumbsPickerShowing&&this._contextViewService.hideContextView({source:this})}}),H!==this.isHidden()}_onFocusEvent(x){x.item&&this._breadcrumbsPickerShowing&&(this._breadcrumbsPickerIgnoreOnceItem=void 0,this._widget.setSelection(x.item))}_onSelectEvent(x){if(!x.item)return;if(x.item===this._breadcrumbsPickerIgnoreOnceItem){this._breadcrumbsPickerIgnoreOnceItem=void 0,this._widget.setFocused(void 0),this._widget.setSelection(void 0);return}const{element:H}=x.item;this._editorGroup.focus();const W=this._getEditorGroup(x.payload);if(W!==void 0){this._widget.setFocused(void 0),this._widget.setSelection(void 0),this._revealInEditor(x,H,W);return}if(this._cfUseQuickPick.getValue()){this._widget.setFocused(void 0),this._widget.setSelection(void 0),this._quickInputService.quickAccess.show(H instanceof h.OutlineElement2?"@":"");return}let U,$;this._contextViewService.showContextView({render:q=>{x.item instanceof N?U=this._instantiationService.createInstance(v.BreadcrumbsFilePicker,q,x.item.model.resource):x.item instanceof O&&(U=this._instantiationService.createInstance(v.BreadcrumbsOutlinePicker,q,x.item.model.resource));const X=U.onWillPickElement(()=>this._contextViewService.hideContextView({source:this,didPick:!0})),G=y.PixelRatio.onDidChange(()=>this._contextViewService.hideContextView({source:this})),Q=t.trackFocus(q),j=Q.onDidBlur(()=>{this._breadcrumbsPickerIgnoreOnceItem=this._widget.isDOMFocused()?x.item:void 0,this._contextViewService.hideContextView({source:this})});return this._breadcrumbsPickerShowing=!0,this._updateCkBreadcrumbsActive(),(0,E.combinedDisposable)(U,X,G,Q,j)},getAnchor:()=>{if(!$){const q=window.innerWidth-8;let X=Math.min(window.innerHeight*.7,300);const G=Math.min(q,Math.max(240,q/4.17)),Q=8;let j;const K=t.getDomNodePagePosition(x.node.firstChild),Y=K.top+K.height+Q;Y+X>=window.innerHeight&&(X=window.innerHeight-Y-30);let ee=K.left;if(ee+G>=q&&(ee=q-G),x.payload instanceof p.StandardMouseEvent){const ie=G-2*Q;j=x.payload.posx-ee,j>ie&&(ee=Math.min(q-G,ee+j-ie),j=ie)}else j=K.left+K.width*.3-ee;U.show(H,X,G,Q,Math.max(0,j)),$={x:ee,y:Y}}return $},onHide:q=>{q?.didPick||U.restoreViewState(),this._breadcrumbsPickerShowing=!1,this._updateCkBreadcrumbsActive(),q?.source===this&&(this._widget.setFocused(void 0),this._widget.setSelection(void 0)),U.dispose()}})}_updateCkBreadcrumbsActive(){const x=this._widget.isDOMFocused()||this._breadcrumbsPickerShowing;this._ckBreadcrumbsActive.set(x)}async _revealInEditor(x,H,W,U=!1){if(H instanceof h.FileElement)if(H.kind===f.FileKind.FILE)await this._editorService.openEditor({resource:H.uri,options:{pinned:U}},W);else{const $=this._widget.getItems(),q=$.indexOf(x.item);this._widget.setFocused($[q+1]),this._widget.setSelection($[q+1],Li.Payload_Pick)}else H.outline.reveal(H,{pinned:U},W===w.SIDE_GROUP)}_getEditorGroup(x){return x===Li.Payload_RevealAside?w.SIDE_GROUP:x===Li.Payload_Reveal?w.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 u.RawContextKey("breadcrumbsPossible",!1,(0,S.localize)(1,null)),B.CK_BreadcrumbsVisible=new u.RawContextKey("breadcrumbsVisible",!1,(0,S.localize)(2,null)),B.CK_BreadcrumbsActive=new u.RawContextKey("breadcrumbsActive",!1,(0,S.localize)(3,null)),B=we([F(3,u.IContextKeyService),F(4,i.IContextViewService),F(5,c.IInstantiationService),F(6,a.IThemeService),F(7,d.IQuickInputService),F(8,f.IFileService),F(9,w.IEditorService),F(10,T.ILabelService),F(11,r.IConfigurationService),F(12,g.IBreadcrumbsService)],B),e.BreadcrumbsControl=B,(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"breadcrumbs.toggle",title:{value:(0,S.localize)(5,null),mnemonicTitle:(0,S.localize)(6,null),original:"Toggle Breadcrumbs"},category:_.Categories.View,toggled:{condition:u.ContextKeyExpr.equals("config.breadcrumbs.enabled",!0),title:(0,S.localize)(7,null),mnemonicTitle:(0,S.localize)(8,null)},menu:[{id:C.MenuId.CommandPalette},{id:C.MenuId.MenubarAppearanceMenu,group:"4_editor",order:2},{id:C.MenuId.NotebookToolbar,group:"notebookLayout",order:2},{id:C.MenuId.StickyScrollContext}]})}run(x){const H=x.get(r.IConfigurationService),W=g.BreadcrumbsConfig.IsEnabled.bindTo(H).getValue();g.BreadcrumbsConfig.IsEnabled.bindTo(H).updateValue(!W)}});function V(z,x){const H=z.get(D.IEditorGroupsService),U=z.get(g.IBreadcrumbsService).getWidget(H.activeGroup.id);if(U){const $=(0,A.tail)(U.getItems());U.setFocused($),x&&U.setSelection($,B.Payload_Pick)}}(0,C.registerAction2)(class extends C.Action2{constructor(){super({id:"breadcrumbs.focusAndSelect",title:{value:(0,S.localize)(9,null),original:"Focus Breadcrumbs"},precondition:B.CK_BreadcrumbsVisible,keybinding:{weight:200,primary:3156,when:B.CK_BreadcrumbsPossible}})}run(x,...H){V(x,!0)}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focus",weight:200,primary:3152,when:B.CK_BreadcrumbsPossible,handler:z=>V(z,!1)}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.toggleToOn",weight:200,primary:3156,when:u.ContextKeyExpr.not("config.breadcrumbs.enabled"),handler:async z=>{const x=z.get(c.IInstantiationService),H=z.get(r.IConfigurationService),W=g.BreadcrumbsConfig.IsEnabled.bindTo(H);return W.getValue()||(await W.updateValue(!0),await(0,k.timeout)(50)),x.invokeFunction(V,!0)}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusNext",weight:200,primary:17,secondary:[2065],mac:{primary:17,secondary:[529]},when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||W.focusNext()}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusPrevious",weight:200,primary:15,secondary:[2063],mac:{primary:15,secondary:[527]},when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||W.focusPrev()}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusNextWithPicker",weight:200+1,primary:2065,mac:{primary:529},when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive,s.WorkbenchListFocusContextKey),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||W.focusNext()}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.focusPreviousWithPicker",weight:200+1,primary:2063,mac:{primary:527},when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive,s.WorkbenchListFocusContextKey),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||W.focusPrev()}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.selectFocused",weight:200,primary:3,secondary:[18],when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||W.setSelection(W.getFocused(),B.Payload_Pick)}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.revealFocused",weight:200,primary:10,secondary:[2051],when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||W.setSelection(W.getFocused(),B.Payload_Reveal)}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.selectEditor",weight:200+1,primary:9,when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive),handler(z){const x=z.get(D.IEditorGroupsService),W=z.get(g.IBreadcrumbsService).getWidget(x.activeGroup.id);!W||(W.setFocused(void 0),W.setSelection(void 0),x.activeGroup.activeEditorPane?.focus())}}),l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"breadcrumbs.revealFocusedFromTreeAside",weight:200,primary:2051,when:u.ContextKeyExpr.and(B.CK_BreadcrumbsVisible,B.CK_BreadcrumbsActive,s.WorkbenchListFocusContextKey),handler(z){const x=z.get(w.IEditorService),W=z.get(s.IListService).lastFocusedList;if(!(W instanceof s.WorkbenchDataTree))return;const U=W.getFocus()[0];if(b.URI.isUri(U?.resource))return x.openEditor({resource:U.resource,options:{pinned:!0}},w.SIDE_GROUP);const $=W.getInput();if($&&typeof $.outlineKind=="string")return $.reveal(U,{pinned:!0,preserveFocus:!1},!0)}})}),define(ae[261],le([1,0,43,848,78,24,19,49,22,18,62,939,94]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditorInput=e.AbstractTextResourceEditorInput=void 0;let u=class extends p.AbstractResourceEditorInput{constructor(c,l,s,d,n,a){super(c,l,n,a),this.editorService=s,this.textFileService=d}save(c,l){return this.resource.scheme!==I.Schemas.untitled&&!this.fileService.hasProvider(this.resource)?this.saveAs(c,l):this.doSave(l,!1,c)}saveAs(c,l){return this.doSave(l,!0,c)}async doSave(c,l,s){let d;if(l?d=await this.textFileService.saveAs(this.resource,void 0,{...c,suggestedTarget:this.preferredResource}):d=await this.textFileService.save(this.resource,c),!!d)return{resource:d}}async revert(c,l){await this.textFileService.revert(this.resource,l)}};u=we([F(2,A.IEditorService),F(3,R.ITextFileService),F(4,E.ILabelService),F(5,k.IFileService)],u),e.AbstractTextResourceEditorInput=u;let i=class Hs extends u{get typeId(){return Hs.ID}get editorId(){return t.DEFAULT_EDITOR_ASSOCIATION.id}constructor(c,l,s,d,n,a,o,g,h,v){super(c,void 0,g,o,v,h),this.name=l,this.description=s,this.preferredLanguageId=d,this.preferredContents=n,this.textModelResolverService=a,this.cachedModel=void 0,this.modelReference=void 0}getName(){return this.name||super.getName()}setName(c){this.name!==c&&(this.name=c,this._onDidChangeLabel.fire())}getDescription(){return this.description}setDescription(c){this.description!==c&&(this.description=c,this._onDidChangeLabel.fire())}setLanguageId(c,l){this.setPreferredLanguageId(c),this.cachedModel?.setLanguageId(c,l)}setPreferredLanguageId(c){this.preferredLanguageId=c}setPreferredContents(c){this.preferredContents=c}async resolve(){const c=this.preferredContents,l=this.preferredLanguageId;this.preferredContents=void 0,this.preferredLanguageId=void 0,this.modelReference||(this.modelReference=this.textModelResolverService.createModelReference(this.resource));const s=await this.modelReference,d=s.object;if(!(d instanceof C.TextResourceEditorModel))throw s.dispose(),this.modelReference=void 0,new Error(`Unexpected model for TextResourceEditorInput: ${this.resource}`);return this.cachedModel=d,(typeof c=="string"||typeof l=="string")&&d.updateTextEditorModel(typeof c=="string"?(0,r.createTextBufferFactory)(c):void 0,l),d}matches(c){return this===c?!0:c instanceof Hs?(0,b.isEqual)(c.resource,this.resource):(0,t.isResourceEditorInput)(c)?super.matches(c):!1}dispose(){this.modelReference&&(this.modelReference.then(c=>c.dispose()),this.modelReference=void 0),this.cachedModel=void 0,super.dispose()}};i.ID="workbench.editors.resourceEditorInput",i=we([F(5,S.ITextModelService),F(6,R.ITextFileService),F(7,A.IEditorService),F(8,k.IFileService),F(9,E.ILabelService)],i),e.TextResourceEditorInput=i}),define(ae[2767],le([1,0,76,2359,5,12,1543,2,24,644,49,62,129,38,37,8,7,218,47,68,18,15,23,45,41,27,182,1124]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditPane=void 0;var w;(function(y){y.Data="data",y.Message="message"})(w||(w={}));let D=class fn extends r.ViewPane{constructor(T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q){super({...T,titleMenuId:a.MenuId.BulkEditTitle},x,H,W,V,z,_,U,$,q),this._instaService=_,this._editorService=L,this._labelService=M,this._textModelService=O,this._dialogService=N,this._contextMenuService=P,this._storageService=B,this._treeViewStates=new Map,this._disposables=new E.DisposableStore,this._sessionDisposables=new E.DisposableStore,this.element.classList.add("bulk-edit-panel","show-file-icons"),this._ctxHasCategories=fn.ctxHasCategories.bindTo(V),this._ctxGroupByFile=fn.ctxGroupByFile.bindTo(V),this._ctxHasCheckedChanges=fn.ctxHasCheckedChanges.bindTo(V)}dispose(){this._tree.dispose(),this._disposables.dispose()}renderBody(T){super.renderBody(T);const _=this._instaService.createInstance(l.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility});this._disposables.add(_);const L=document.createElement("div");L.className="content",T.appendChild(L);const M=document.createElement("div");L.appendChild(M),this._treeDataSource=this._instaService.createInstance(p.BulkEditDataSource),this._treeDataSource.groupByFile=this._storageService.getBoolean(fn._memGroupByFile,0,!0),this._ctxGroupByFile.set(this._treeDataSource.groupByFile),this._tree=this._instaService.createInstance(t.WorkbenchAsyncDataTree,this.id,M,new p.BulkEditDelegate,[this._instaService.createInstance(p.TextEditElementRenderer),this._instaService.createInstance(p.FileElementRenderer,_),this._instaService.createInstance(p.CategoryElementRenderer)],this._treeDataSource,{accessibilityProvider:this._instaService.createInstance(p.BulkEditAccessibilityProvider),identityProvider:new p.BulkEditIdentityProvider,expandOnlyOnTwistieClick:!0,multipleSelectionSupport:!1,keyboardNavigationLabelProvider:new p.BulkEditNaviLabelProvider,sorter:new p.BulkEditSorter,selectionNavigation:!0}),this._disposables.add(this._tree.onContextMenu(this._onContextMenu,this)),this._disposables.add(this._tree.onDidOpen(V=>this._openElementAsEditor(V)));const O=document.createElement("div");O.className="buttons",L.appendChild(O);const N=new m.ButtonBar(O);this._disposables.add(N);const P=N.addButton({supportIcons:!0});P.label=(0,k.localize)(0,null),P.onDidClick(()=>this.accept(),this,this._disposables);const B=N.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),T.appendChild(this._message),this._setState("message")}layoutBody(T,_){super.layoutBody(T,_);const L=T-50;this._tree.getHTMLElement().parentElement.style.height=`${L}px`,this._tree.layout(L,_)}_setState(T){this.element.dataset.state=T}async setInput(T,_){this._setState("data"),this._sessionDisposables.clear(),this._treeViewStates.clear(),this._currentResolve&&(this._currentResolve(void 0),this._currentResolve=void 0);const L=await this._instaService.invokeFunction(b.BulkFileOperations.create,T);this._currentProvider=this._instaService.createInstance(b.BulkEditPreviewProvider,L),this._sessionDisposables.add(this._currentProvider),this._sessionDisposables.add(L);const M=L.categories.length>1;return this._ctxHasCategories.set(M),this._treeDataSource.groupByFile=!M||this._treeDataSource.groupByFile,this._ctxHasCheckedChanges.set(L.checked.checkedCount>0),this._currentInput=L,new Promise(O=>{_.onCancellationRequested(()=>O(void 0)),this._currentResolve=O,this._setTreeInput(L),this._sessionDisposables.add(L.checked.onDidChange(()=>{this._tree.updateChildren(),this._ctxHasCheckedChanges.set(L.checked.checkedCount>0)}))})}hasInput(){return Boolean(this._currentInput)}async _setTreeInput(T){const _=this._treeViewStates.get(this._treeDataSource.groupByFile);if(await this._tree.setInput(T,_),this._tree.domFocus(),_)return;const L=[...this._tree.getNode(T).children].slice(0,10);for(;L.length>0;){const{element:M}=L.shift();M instanceof p.FileElement&&await this._tree.expand(M,!0),M instanceof p.CategoryElement&&(await this._tree.expand(M,!0),L.push(...this._tree.getNode(M).children))}}accept(){const T=this._currentInput?.conflicts.list();if(!T||T.length===0){this._done(!0);return}let _;T.length===1?_=(0,k.localize)(3,null,this._labelService.getUriLabel(T[0],{relative:!0})):_=(0,k.localize)(4,null,T.length),this._dialogService.show(d.default.Warning,_).finally(()=>this._done(!1))}discard(){this._done(!1)}_done(T){this._currentResolve?.(T?this._currentInput?.getWorkspaceEdit():void 0),this._currentInput=void 0,this._setState("message"),this._sessionDisposables.clear()}toggleChecked(){const[T]=this._tree.getFocus();(T instanceof p.FileElement||T instanceof p.TextEditElement)&&!T.isDisabled()&&T.setChecked(!T.isChecked())}groupByFile(){this._treeDataSource.groupByFile||this.toggleGrouping()}groupByType(){this._treeDataSource.groupByFile&&this.toggleGrouping()}toggleGrouping(){const T=this._tree.getInput();if(T){const _=this._tree.getViewState();this._treeViewStates.set(this._treeDataSource.groupByFile,_),this._treeDataSource.groupByFile=!this._treeDataSource.groupByFile,this._setTreeInput(T),this._storageService.store(fn._memGroupByFile,this._treeDataSource.groupByFile,0,0),this._ctxGroupByFile.set(this._treeDataSource.groupByFile)}}async _openElementAsEditor(T){const _={...T.editorOptions};let L;if(T.element instanceof p.TextEditElement)L=T.element.parent,_.selection=T.element.edit.textEdit.textEdit.range;else if(T.element instanceof p.FileElement)L=T.element,_.selection=T.element.edit.textEdits[0]?.textEdit.textEdit.range;else return;const M=this._currentProvider.asPreviewUri(L.edit.uri);if(L.edit.type&4)this._editorService.openEditor({label:(0,k.localize)(5,null,(0,n.basename)(L.edit.uri)),resource:M,options:_});else{let O;try{(await this._textModelService.createModelReference(L.edit.uri)).dispose(),O=L.edit.uri}catch{O=b.BulkEditPreviewProvider.emptyPreview}let N;L.edit.type&8?N=(0,k.localize)(6,null):L.edit.type&2&&(N=(0,k.localize)(7,null));let P;N?P=(0,k.localize)(8,null,(0,n.basename)(L.edit.uri),N):P=(0,k.localize)(9,null,(0,n.basename)(L.edit.uri)),this._editorService.openEditor({original:{resource:O},modified:{resource:M},label:P,description:this._labelService.getUriLabel((0,n.dirname)(O),{relative:!0}),options:_},T.sideBySide?I.SIDE_GROUP:I.ACTIVE_GROUP)}}_onContextMenu(T){this._contextMenuService.showContextMenu({menuId:a.MenuId.BulkEditContext,contextKeyService:this.contextKeyService,getAnchor:()=>T.anchor})}};D.ID="refactorPreview",D.ctxHasCategories=new c.RawContextKey("refactorPreview.hasCategories",!1),D.ctxGroupByFile=new c.RawContextKey("refactorPreview.groupByFile",!0),D.ctxHasCheckedChanges=new c.RawContextKey("refactorPreview.hasCheckedChanges",!0),D._memGroupByFile=`${D.ID}.groupByFile`,D=we([F(1,R.IInstantiationService),F(2,I.IEditorService),F(3,S.ILabelService),F(4,C.ITextModelService),F(5,s.IDialogService),F(6,i.IContextMenuService),F(7,o.IStorageService),F(8,c.IContextKeyService),F(9,g.IViewDescriptorService),F(10,u.IKeybindingService),F(11,i.IContextMenuService),F(12,f.IConfigurationService),F(13,h.IOpenerService),F(14,A.IThemeService),F(15,v.ITelemetryService)],D),e.BulkEditPane=D}),define(ae[2768],le([1,0,6,2,18,62,78]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomTextEditorModel=void 0;let E=class Sl extends p.Disposable{static async create(b,S,C){return b.invokeFunction(async r=>{const i=await r.get(A.ITextModelService).createModelReference(C);return b.createInstance(Sl,S,C,i)})}constructor(b,S,C,r){super(),this.viewType=b,this._resource=S,this._model=C,this.textFileService=r,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(S),this._textFileModel&&(this._register(this._textFileModel.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire())),this._register(this._textFileModel.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire()))),this._register(this.textFileService.files.onDidChangeDirty(u=>{(0,R.isEqual)(this.resource,u.resource)&&(this._onDidChangeDirty.fire(),this._onDidChangeContent.fire())}))}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(b){return this.textFileService.revert(this.resource,b)}saveCustomEditor(b){return this.textFileService.save(this.resource,b)}async saveCustomEditorAs(b,S,C){return!!await this.textFileService.saveAs(b,S,C)}};E=we([F(3,k.ITextFileService)],E),e.CustomTextEditorModel=E}),define(ae[2769],le([1,0,16,11,32,6,123,2,52,18,13,9,1600,8,7,19,5,155,48,17,23,12,57,34,201,87,925,246,176,24,39,191,106,78]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationManager=void 0;const O=d.Registry.as(l.Extensions.JSONContribution);O.registerSchema(D.launchSchemaId,m.launchSchema);const N="debug.selectedconfigname",P="debug.selectedroot",B="debug.selectedtype",V="debug.recentdynamicconfigurations";let z=class{constructor(q,X,G,Q,j,K,Y,ee,ie,re){this.adapterManager=q,this.contextService=X,this.configurationService=G,this.quickInputService=Q,this.instantiationService=j,this.storageService=K,this.extensionService=Y,this.historyService=ee,this.uriIdentityService=ie,this.getSelectedConfig=()=>Promise.resolve(void 0),this.selectedDynamic=!1,this._onDidSelectConfigurationName=new A.Emitter,this.configProviders=[],this.toDispose=[],this.initLaunches(),this.registerListeners();const oe=this.storageService.get(P,1),se=this.storageService.get(B,1),te=this.launches.find(ce=>ce.uri.toString()===oe),Z=this.storageService.get(N,1);this.debugConfigurationTypeContext=v.CONTEXT_DEBUG_CONFIGURATION_TYPE.bindTo(re);const ne=se?{type:se}:void 0;te&&te.getConfigurationNames().length?this.selectConfiguration(te,Z,void 0,ne):this.launches.length>0&&this.selectConfiguration(void 0,Z,void 0,ne)}registerDebugConfigurationProvider(q){return this.configProviders.push(q),{dispose:()=>{this.unregisterDebugConfigurationProvider(q)}}}unregisterDebugConfigurationProvider(q){const X=this.configProviders.indexOf(q);X>=0&&this.configProviders.splice(X,1)}hasDebugConfigurationProvider(q,X){return X===void 0&&(X=v.DebugConfigurationProviderTriggerKind.Initial),!!this.configProviders.find(Q=>Q.provideDebugConfigurations&&Q.type===q&&Q.triggerKind===X)}async resolveConfigurationByProviders(q,X,G,Q){await this.adapterManager.activateDebuggers("onDebugResolve",X);const j=this.configProviders.filter(Y=>Y.type===X&&Y.resolveDebugConfiguration).concat(this.configProviders.filter(Y=>Y.type==="*"&&Y.resolveDebugConfiguration));let K=G;return await(0,p.sequence)(j.map(Y=>async()=>{K&&(K=await Y.resolveDebugConfiguration(q,K,Q))})),K?.type&&K.type!==G.type&&await this.adapterManager.activateDebuggers("onDebugResolve",K.type),K}async resolveDebugConfigurationWithSubstitutedVariables(q,X,G,Q){const j=this.configProviders.filter(Y=>Y.type===X&&Y.resolveDebugConfigurationWithSubstitutedVariables).concat(this.configProviders.filter(Y=>Y.type==="*"&&Y.resolveDebugConfigurationWithSubstitutedVariables));let K=G;return await(0,p.sequence)(j.map(Y=>async()=>{K&&(K=await Y.resolveDebugConfigurationWithSubstitutedVariables(q,K,Q))})),K}async provideDebugConfigurations(q,X,G){return await this.adapterManager.activateDebuggers("onDebugInitialConfigurations"),(await Promise.all(this.configProviders.filter(j=>j.type===X&&j.triggerKind===v.DebugConfigurationProviderTriggerKind.Initial&&j.provideDebugConfigurations).map(j=>j.provideDebugConfigurations(q,G)))).reduce((j,K)=>j.concat(K),[])}async getDynamicProviders(){await this.extensionService.whenInstalledExtensionsRegistered();const q="onDebugDynamicConfigurations";return this.extensionService.extensions.reduce((G,Q)=>{if(!Q.activationEvents)return G;const j=[];let K=!1;for(const Y of Q.activationEvents)Y===q?K=!0:Y.startsWith(`${q}:`)&&j.push(Y.slice(q.length+1));if(j.length)return G.concat(j);if(K){const Y=Q.contributes?.debuggers?.[0].type;return Y?G.concat(Y):G}return G},[]).map(G=>({label:this.adapterManager.getDebuggerLabel(G),getProvider:async()=>(await this.adapterManager.activateDebuggers(q,G),this.configProviders.find(Q=>Q.type===G&&Q.triggerKind===v.DebugConfigurationProviderTriggerKind.Dynamic&&Q.provideDebugConfigurations)),type:G,pick:async()=>{await this.adapterManager.activateDebuggers(q,G);const Q=new E.DisposableStore,j=Q.add(this.quickInputService.createQuickPick());j.busy=!0,j.placeholder=r.localize(0,null),j.show();const K=new Promise(te=>{Q.add(j.onDidAccept(()=>te(j.activeItems[0]))),Q.add(j.onDidTriggerItemButton(async Z=>{te(void 0);const{launch:ne,config:ce}=Z.item;await ne.openConfigFile({preserveFocus:!1,type:ce.type,suppressInitialConfigs:!0}),await ne.writeConfiguration(ce),await this.selectConfiguration(ne,ce.name),this.removeRecentDynamicConfigurations(ce.name,ce.type)}))}),Y=new R.CancellationTokenSource,ee=[],ie=this.configProviders.find(te=>te.type===G&&te.triggerKind===v.DebugConfigurationProviderTriggerKind.Dynamic&&te.provideDebugConfigurations);this.getLaunches().forEach(te=>{te.workspace&&ie&&ee.push(ie.provideDebugConfigurations(te.workspace.uri,Y.token).then(Z=>Z.map(ne=>({label:ne.name,description:te.name,config:ne,buttons:[{iconClass:a.ThemeIcon.asClassName(h.debugConfigure),tooltip:r.localize(1,null)}],launch:te}))))});const re=await Promise.all(ee),oe=(0,t.flatten)(re);j.items=oe,j.busy=!1;const se=await K;if(Q.dispose(),!se){Y.cancel();return}return se}}))}getAllConfigurations(){const q=[];for(const X of this.launches)for(const G of X.getConfigurationNames()){const Q=X.getConfiguration(G)||X.getCompound(G);Q&&q.push({launch:X,name:G,presentation:Q.presentation})}return(0,w.getVisibleAndSorted)(q)}removeRecentDynamicConfigurations(q,X){const G=this.getRecentDynamicConfigurations().filter(Q=>Q.name!==q||Q.type!==X);this.storageService.store(V,JSON.stringify(G),1,0),this.selectedConfiguration.name===q&&this.selectedType===X&&this.selectedDynamic?this.selectConfiguration(void 0,void 0):this._onDidSelectConfigurationName.fire()}getRecentDynamicConfigurations(){return JSON.parse(this.storageService.get(V,1,"[]"))}registerListeners(){this.toDispose.push(A.Event.any(this.contextService.onDidChangeWorkspaceFolders,this.contextService.onDidChangeWorkbenchState)(()=>{this.initLaunches(),this.selectConfiguration(void 0),this.setCompoundSchemaValues()})),this.toDispose.push(this.configurationService.onDidChangeConfiguration(async q=>{q.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(q=>this.instantiationService.createInstance(H,this,this.adapterManager,q)),this.contextService.getWorkbenchState()===3&&this.launches.push(this.instantiationService.createInstance(W,this,this.adapterManager)),this.launches.push(this.instantiationService.createInstance(U,this,this.adapterManager)),this.selectedLaunch&&this.launches.indexOf(this.selectedLaunch)===-1&&this.selectConfiguration(void 0)}setCompoundSchemaValues(){const q=m.launchSchema.properties.compounds.items.properties.configurations,X=this.launches.map(Q=>Q.getConfigurationNames(!0)).reduce((Q,j)=>Q.concat(j),[]);q.items.oneOf[0].enum=X,q.items.oneOf[1].properties.name.enum=X;const G=this.contextService.getWorkspace().folders.map(Q=>Q.name);q.items.oneOf[1].properties.folder.enum=G,O.registerSchema(D.launchSchemaId,m.launchSchema)}getLaunches(){return this.launches}getLaunch(q){if(!!C.URI.isUri(q))return this.launches.find(X=>X.workspace&&this.uriIdentityService.extUri.isEqual(X.workspace.uri,q))}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(q,X,G,Q){if(typeof q>"u"){const re=this.historyService.getLastActiveWorkspaceRoot();q=this.getLaunch(re),(!q||q.getConfigurationNames().length===0)&&(q=this.launches.find(oe=>!!(oe&&oe.getConfigurationNames().length))||q||this.launches[0])}const j=this.selectedLaunch,K=this.selectedName,Y=this.selectedDynamic;this.selectedLaunch=q,this.selectedLaunch?this.storageService.store(P,this.selectedLaunch.uri.toString(),1,1):this.storageService.remove(P,1);const ee=q?q.getConfigurationNames():[];this.getSelectedConfig=()=>{const re=this.selectedName?q?.getConfiguration(this.selectedName):void 0;return Promise.resolve(re||G)};let ie=G?.type;if(X&&ee.indexOf(X)>=0)this.setSelectedLaunchName(X);else if(Q&&Q.type){if(ie=Q.type,!G){const oe=(await this.getDynamicProviders()).filter(se=>se.type===ie);this.getSelectedConfig=async()=>{const se=await Promise.all(oe.map(Z=>Z.getProvider())),te=se.length>0?se[0]:void 0;if(te&&q&&q.workspace){const Z=new R.CancellationTokenSource,ce=(await te.provideDebugConfigurations(q.workspace.uri,Z.token)).find(de=>de.name===X);if(ce)return ce}}}this.setSelectedLaunchName(X);let re=this.getRecentDynamicConfigurations();X&&Q.type&&(re.unshift({name:X,type:Q.type}),re=(0,t.distinct)(re,oe=>`${oe.name} : ${oe.type}`),this.storageService.store(V,JSON.stringify(re),1,0))}else if(!this.selectedName||ee.indexOf(this.selectedName)===-1){const re=ee.length?ee[0]:void 0;this.setSelectedLaunchName(re)}!G&&q&&this.selectedName&&(G=q.getConfiguration(this.selectedName),ie=G?.type),this.selectedType=Q?.type||G?.type,this.selectedDynamic=!!Q,this.storageService.store(B,Q?this.selectedType:void 0,1,1),ie?this.debugConfigurationTypeContext.set(ie):this.debugConfigurationTypeContext.reset(),(this.selectedLaunch!==j||this.selectedName!==K||Y!==this.selectedDynamic)&&this._onDidSelectConfigurationName.fire()}setSelectedLaunchName(q){this.selectedName=q,this.selectedName?this.storageService.store(N,this.selectedName,1,1):this.storageService.remove(N,1)}dispose(){this.toDispose=(0,E.dispose)(this.toDispose)}};z=we([F(1,g.IWorkspaceContextService),F(2,u.IConfigurationService),F(3,s.IQuickInputService),F(4,c.IInstantiationService),F(5,n.IStorageService),F(6,T.IExtensionService),F(7,_.IHistoryService),F(8,o.IUriIdentityService),F(9,i.IContextKeyService)],z),e.ConfigurationManager=z;class x{constructor(q,X){this.configurationManager=q,this.adapterManager=X}getCompound(q){const X=this.getConfig();if(!(!X||!X.compounds))return X.compounds.find(G=>G.name===q)}getConfigurationNames(q=!1){const X=this.getConfig();if(!X||!Array.isArray(X.configurations)&&!Array.isArray(X.compounds))return[];{const G=[];return X.configurations&&G.push(...X.configurations.filter(Q=>Q&&typeof Q.name=="string")),q?G.map(Q=>Q.name):(X.compounds&&G.push(...X.compounds.filter(Q=>typeof Q.name=="string"&&Q.configurations&&Q.configurations.length)),(0,w.getVisibleAndSorted)(G).map(Q=>Q.name))}}getConfiguration(q){const X=I.deepClone(this.getConfig());if(!X||!X.configurations)return;const G=X.configurations.find(Q=>Q&&Q.name===q);return G&&(this instanceof U?G.__configurationTarget=2:this instanceof W?G.__configurationTarget=5:G.__configurationTarget=6),G}async getInitialConfigurationContent(q,X,G,Q){let j="";const K=X?this.adapterManager.getEnabledDebugger(X):await this.adapterManager.guessDebugger(!0);if(K){const Y=G?await this.configurationManager.provideDebugConfigurations(q,K.type,Q||R.CancellationToken.None):[];j=await K.getInitialConfigurationContent(Y)}return j}get hidden(){return!1}}let H=class extends x{constructor(q,X,G,Q,j,K,Y){super(q,X),this.workspace=G,this.fileService=Q,this.textFileService=j,this.editorService=K,this.configurationService=Y}get uri(){return b.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({preserveFocus:q,type:X,suppressInitialConfigs:G},Q){const j=this.uri;let K=!1,Y="";try{Y=(await this.fileService.readFile(j)).value.toString()}catch{if(Y=await this.getInitialConfigurationContent(this.workspace.uri,X,!G,Q),!Y)return{editor:null,created:!1};K=!0;try{await this.textFileService.write(j,Y)}catch(se){throw new Error(r.localize(2,null,se.message))}}const ee=Y.indexOf(`"${this.configurationManager.selectedConfiguration.name}"`);let ie=1;for(let se=0;se<ee;se++)Y.charAt(se)===` `&&ie++;const re=ie>1?{startLineNumber:ie,startColumn:4}:void 0,oe=await this.editorService.openEditor({resource:j,options:{selection:re,preserveFocus:q,pinned:K,revealIfVisible:!0}},y.ACTIVE_GROUP);return{editor:(0,S.withUndefinedAsNull)(oe),created:K}}async writeConfiguration(q){const X=I.deepClone(this.getConfig());X.configurations||(X.configurations=[]),X.configurations.push(q),await this.configurationService.updateValue("launch",X,{resource:this.workspace.uri},6)}};H=we([F(3,f.IFileService),F(4,M.ITextFileService),F(5,y.IEditorService),F(6,u.IConfigurationService)],H);let W=class extends x{constructor(q,X,G,Q,j){super(q,X),this.editorService=G,this.configurationService=Q,this.contextService=j}get workspace(){}get uri(){return this.contextService.getWorkspace().configuration}get name(){return r.localize(3,null)}getConfig(){return this.configurationService.inspect("launch").workspaceValue}async openConfigFile({preserveFocus:q,type:X,useInitialConfigs:G},Q){if(!!!this.getConfig()){const Y=await this.getInitialConfigurationContent(void 0,X,G,Q);if(Y)await this.configurationService.updateValue("launch",k.parse(Y),5);else return{editor:null,created:!1}}const K=await this.editorService.openEditor({resource:this.contextService.getWorkspace().configuration,options:{preserveFocus:q}},y.ACTIVE_GROUP);return{editor:(0,S.withUndefinedAsNull)(K),created:!1}}};W=we([F(2,y.IEditorService),F(3,u.IConfigurationService),F(4,g.IWorkspaceContextService)],W);let U=class extends x{constructor(q,X,G,Q){super(q,X),this.configurationService=G,this.preferencesService=Q}get workspace(){}get uri(){return this.preferencesService.userSettingsResource}get name(){return r.localize(4,null)}get hidden(){return!0}getConfig(){return this.configurationService.inspect("launch").userValue}async openConfigFile({preserveFocus:q,type:X,useInitialContent:G}){const Q=await this.preferencesService.openUserSettings({jsonEditor:!0,preserveFocus:q,revealSetting:{key:"launch"}});return{editor:(0,S.withUndefinedAsNull)(Q),created:!1}}};U=we([F(2,u.IConfigurationService),F(3,L.IPreferencesService)],U)}),define(ae[192],le([1,0,16,11,56,32,108,6,2,52,18,13,9,72,20,1629,57,87,539,443,78]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"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 a{constructor(U,$,q,X,G=0,Q=0,j=void 0,K=0,Y=void 0){this.session=U,this.threadId=$,this._reference=q,this.id=X,this.namedVariables=G,this.indexedVariables=Q,this.memoryReference=j,this.startOfVariables=K,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>"u")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 $=U.body.variables[0];this.reference=$.variablesReference,this._value=$.value,this.namedVariables=$.namedVariables,this.indexedVariables=$.indexedVariables,this.memoryReference=$.memoryReference,this.presentationHint=$.presentationHint,this.adoptLazyResponse($)}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 $=a.BASE_CHUNK_SIZE;for(;!!this.indexedVariables&&this.indexedVariables>$*a.BASE_CHUNK_SIZE;)$*=a.BASE_CHUNK_SIZE;if(!!this.indexedVariables&&this.indexedVariables>$){const X=Math.ceil(this.indexedVariables/$);for(let G=0;G<X;G++){const Q=(this.startOfVariables||0)+G*$,j=Math.min($,this.indexedVariables-G*$);U.push(new h(this.session,this.threadId,this,this.reference,`[${Q}..${Q+j-1}]`,"","",void 0,j,void 0,{kind:"virtual"},void 0,void 0,!0,Q))}return U}const q=await this.fetchVariables(this.startOfVariables,this.indexedVariables,"indexed");return U.concat(q)}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,$,q){try{const X=await this.session.variables(this.reference||0,this.threadId,q,U,$);if(!X||!X.body||!X.body.variables)return[];const G=new Map,Q=X.body.variables.filter(j=>!!j).map(j=>{if((0,C.isString)(j.value)&&(0,C.isString)(j.name)&&typeof j.variablesReference=="number"){const K=G.get(j.name)||0,Y=K>0?K.toString():"";return G.set(j.name,K+1),new h(this.session,this.threadId,this,j.variablesReference,j.name,j.evaluateName,j.value,j.namedVariables,j.indexedVariables,j.memoryReference,j.presentationHint,j.type,j.__vscodeVariableMenuContext,!0,0,Y)}return new h(this.session,this.threadId,this,0,"",void 0,f.localize(0,null),0,0,void 0,{kind:"virtual"},void 0,void 0,!1)});return this.session.autoExpandLazyVariables&&await Promise.all(Q.map(j=>j.presentationHint?.lazy&&j.evaluateLazy())),Q}catch(X){return[new h(this.session,this.threadId,this,0,"",void 0,X.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=!!a.allValues.get(this.getId())&&a.allValues.get(this.getId())!==g.DEFAULT_VALUE&&a.allValues.get(this.getId())!==U,a.allValues.set(this.getId(),U)}toString(){return this.value}async evaluateExpression(U,$,q,X,G=!1){if(!$||!q&&X!=="repl")return this.value=X==="repl"?f.localize(1,null):g.DEFAULT_VALUE,this.reference=0,!1;this.session=$;try{const Q=await $.evaluate(U,q?q.frameId:void 0,X);return Q&&Q.body?(this.value=Q.body.result||"",this.reference=Q.body.variablesReference,this.namedVariables=Q.body.namedVariables,this.indexedVariables=Q.body.indexedVariables,this.memoryReference=Q.body.memoryReference,this.type=Q.body.type||this.type,this.presentationHint=Q.body.presentationHint,!G&&Q.body.presentationHint?.lazy&&await this.evaluateLazy(),!0):!1}catch(Q){return this.value=Q.message||"",this.reference=0,!1}}}e.ExpressionContainer=a,a.allValues=new Map,a.BASE_CHUNK_SIZE=100;function o(W,U){U&&U.body&&(W.value=U.body.value||"",W.type=U.body.type||W.type,W.reference=U.body.variablesReference,W.namedVariables=U.body.namedVariables,W.indexedVariables=U.body.indexedVariables)}class g extends a{constructor(U,$=(0,u.generateUuid)()){super(void 0,void 0,0,$),this.name=U,this.available=!1,U&&(this.value=g.DEFAULT_VALUE)}async evaluate(U,$,q,X){this.available=await this.evaluateExpression(this.name,U,$,q,X)}toString(){return`${this.name} ${this.value}`}async setExpression(U,$){if(!this.session)return;const q=await this.session.setExpression($.frameId,this.name,U);o(this,q)}}e.Expression=g,g.DEFAULT_VALUE=f.localize(2,null);class h extends a{constructor(U,$,q,X,G,Q,j,K,Y,ee,ie,re=void 0,oe=void 0,se=!0,te=0,Z=""){super(U,$,X,`variable:${q.getId()}:${G}:${Z}`,K,Y,ee,te,ie),this.parent=q,this.name=G,this.evaluateName=Q,this.variableMenuContext=oe,this.available=se,this.value=j||"",this.type=re}async setVariable(U,$){if(!!this.session)try{if(this.session.capabilities.supportsSetExpression&&!this.session.capabilities.supportsSetVariable&&this.evaluateName)return this.setExpression(U,$);const q=await this.session.setVariable(this.parent.reference,this.name,U);o(this,q)}catch(q){this.errorMessage=q.message}}async setExpression(U,$){if(!this.session||!this.evaluateName)return;const q=await this.session.setExpression($.frameId,this.evaluateName,U);o(this,q)}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 v extends a{constructor(U,$,q,X,G,Q,j,K){super(U.thread.session,U.thread.threadId,X,`scope:${q}:${$}`,Q,j),this.name=q,this.expensive=G,this.range=K}toString(){return this.name}toDebugProtocolObject(){return{name:this.name,variablesReference:this.reference||0,expensive:this.expensive}}}e.Scope=v;class m extends v{constructor(U,$,q){super(U,$,q,0,!1)}toString(){return this.name}}e.ErrorScope=m;class w{constructor(U,$,q,X,G,Q,j,K,Y){this.thread=U,this.frameId=$,this.source=q,this.name=X,this.presentationHint=G,this.range=Q,this.index=j,this.canRestart=K,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 $=new Set;return U.body.scopes.map(q=>{let X=0;do X=(0,k.stringHash)(`${q.name}:${q.line}:${q.column}`,X);while($.has(X));return $.add(X),new v(this,X,q.name,q.variablesReference,q.expensive,q.namedVariables,q.indexedVariables,q.line&&q.column&&q.endLine&&q.endColumn?new i.Range(q.line,q.column,q.endLine,q.endColumn):void 0)})},U=>[new m(this,0,U.message)])),this.scopes}async getMostSpecificScopes(U){const q=(await this.getScopes()).filter(Q=>!Q.expensive);if(!q.some(Q=>!!Q.range))return q;const G=q.filter(Q=>Q.range&&i.Range.containsRange(Q.range,U)).sort((Q,j)=>Q.range.endLineNumber-Q.range.startLineNumber-(j.range.endLineNumber-j.range.startLineNumber));return G.length?G:q}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}`:"",$=`${this.source.inMemory?this.source.name:this.source.uri.fsPath}${U}`;return $===s.UNKNOWN_SOURCE_LABEL?this.name:`${this.name} (${$})`}async openInEditor(U,$,q,X){const G=this.thread.stoppedDetails?.reason;if(this.instructionPointerReference&&(G==="instruction breakpoint"||G==="step"&&this.thread.lastSteppingGranularity==="instruction"))return U.openEditor(d.DisassemblyViewInput.instance,{pinned:!0});if(this.source.available)return this.source.openInEditor(U,this.range,$,q,X)}equals(U){return this.name===U.name&&U.thread===this.thread&&this.frameId===U.frameId&&U.source===this.source&&i.Range.equalsRange(this.range,U.range)}}e.StackFrame=w;class D{constructor(U,$,q){this.session=U,this.name=$,this.threadId=q,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(q=>!!(q&&(this.stoppedDetails?.reason==="instruction breakpoint"||this.stoppedDetails?.reason==="step"&&this.lastSteppingGranularity==="instruction")&&q.instructionPointerReference||q.source&&q.source.available&&q.source.presentationHint!=="deemphasize"))||(U.length>0?U[0]:void 0)}get stateLabel(){return this.stoppedDetails?this.stoppedDetails.description||(this.stoppedDetails.reason?f.localize(3,null,this.stoppedDetails.reason):f.localize(4,null)):f.localize(5,null)}async fetchCallStack(U=20){if(this.stopped){const $=this.callStack.length,q=await this.getCallStackImpl($,U);this.reachedEndOfCallStack=q.length<U,$<this.callStack.length&&this.callStack.splice($,this.callStack.length-$),this.callStack=this.callStack.concat(q||[]),typeof this.stoppedDetails?.totalFrames=="number"&&this.stoppedDetails.totalFrames===this.callStack.length&&(this.reachedEndOfCallStack=!0)}}async getCallStackImpl(U,$){try{const q=new A.CancellationTokenSource;this.callStackCancellationTokens.push(q);const X=await this.session.stackTrace(this.threadId,U,$,q.token);return!X||!X.body||q.token.isCancellationRequested?[]:(this.stoppedDetails&&(this.stoppedDetails.totalFrames=X.body.totalFrames),X.body.stackFrames.map((G,Q)=>{const j=this.session.getSource(G.source);return new w(this,G.id,j,G.name,G.presentationHint,new i.Range(G.line,G.column,G.endLine||G.line,G.endColumn||G.column),U+Q,typeof G.canRestart=="boolean"?G.canRestart:!0,G.instructionPointerReference)}))}catch(q){return this.stoppedDetails&&(this.stoppedDetails.framesErrorMessage=q.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=D;const y=(W,U,$,q="memory")=>r.URI.from({scheme:l.DEBUG_MEMORY_SCHEME,authority:W,path:"/"+encodeURIComponent(U)+`/${encodeURIComponent(q)}.bin`,query:$?`?range=${$.fromOffset}:${$.toOffset}`:void 0});e.getUriForDebugMemory=y;class T extends I.Disposable{constructor(U,$){super(),this.memoryReference=U,this.session=$,this.invalidateEmitter=this._register(new E.Emitter),this.onDidInvalidate=this.invalidateEmitter.event,this.writable=!!this.session.capabilities.supportsWriteMemoryRequest,this._register($.onDidInvalidateMemory(q=>{q.body.memoryReference===U&&this.invalidate(q.body.offset,q.body.count-q.body.offset)}))}async read(U,$){const q=$-U,X=U,G=await this.session.readMemory(this.memoryReference,X,q);if(G===void 0||!G.body?.data)return[{type:1,offset:X,length:q}];let Q;try{Q=(0,R.decodeBase64)(G.body.data)}catch{return[{type:2,offset:X,length:q,error:"Invalid base64 data from debug adapter"}]}const j=G.body.unreadableBytes||0,K=q-j;if(Q.byteLength<K){const Y=R.VSBuffer.alloc(K-Q.byteLength);Y.buffer.fill(0),Q=R.VSBuffer.concat([Q,Y],K)}else Q.byteLength>K&&(Q=Q.slice(0,K));return j?[{type:0,offset:X,length:K,data:Q},{type:1,offset:X+K,length:j}]:[{type:0,offset:X,length:q,data:Q}]}async write(U,$){const X=(await this.session.writeMemory(this.memoryReference,U,(0,R.encodeBase64)($),!0))?.body?.bytesWritten??$.byteLength;return this.invalidate(U,U+X),X}dispose(){super.dispose()}invalidate(U,$){this.invalidateEmitter.fire({fromOffset:U,toOffset:$})}}e.MemoryRegion=T;class _{constructor(U,$){this.enabled=U,this.id=$}getId(){return this.id}}e.Enablement=_;function L(W,U){return(0,b.mixin)({supportsConditionalBreakpoints:!!U.supportsConditionalBreakpoints,supportsHitConditionalBreakpoints:!!U.supportsHitConditionalBreakpoints,supportsLogPoints:!!U.supportsLogPoints,supportsFunctionBreakpoints:!!U.supportsFunctionBreakpoints,supportsDataBreakpoints:!!U.supportsDataBreakpoints,supportsInstructionBreakpoints:!!U.supportsInstructionBreakpoints},W)}class M extends _{constructor(U,$,q,X,G){super(U,G),this.hitCondition=$,this.condition=q,this.logMessage=X,this.sessionData=new Map,U===void 0&&(this.enabled=!0)}setSessionData(U,$){$?($.sessionId=U,this.sessionData.set(U,$)):this.sessionData.delete(U);const q=Array.from(this.sessionData.values()),X=(0,t.distinct)(q.filter(G=>G.verified),G=>`${G.line}:${G.column}`);X.length?this.data=X.length===1?X[0]:void 0:this.data=q.length?q[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[$,q]of this.sessionData)q.verified&&U.push($);return U}getIdFromAdapter(U){const $=this.sessionData.get(U);return $?$.id:void 0}getDebugProtocolBreakpoint(U){const $=this.sessionData.get(U);if($)return{id:$.id,verified:$.verified,message:$.message,source:$.source,line:$.line,column:$.column,endLine:$.endLine,endColumn:$.endColumn,instructionReference:$.instructionReference,offset:$.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=M;class O extends M{constructor(U,$,q,X,G,Q,j,K,Y,ee,ie=(0,u.generateUuid)()){super(X,Q,G,j,ie),this._uri=U,this._lineNumber=$,this._column=q,this._adapterData=K,this.textFileService=Y,this.uriIdentityService=ee}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,s.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)?f.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,$){super.setSessionData(U,$),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`${S.basenameOrAuthority(this.uri)} ${this.lineNumber}`}update(U){(0,C.isUndefinedOrNull)(U.lineNumber)||(this._lineNumber=U.lineNumber),(0,C.isUndefinedOrNull)(U.column)||(this._column=U.column),(0,C.isUndefinedOrNull)(U.condition)||(this.condition=U.condition),(0,C.isUndefinedOrNull)(U.hitCondition)||(this.hitCondition=U.hitCondition),(0,C.isUndefinedOrNull)(U.logMessage)||(this.logMessage=U.logMessage)}}e.Breakpoint=O;class N extends M{constructor(U,$,q,X,G,Q=(0,u.generateUuid)()){super($,q,X,G,Q),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=N;class P extends M{constructor(U,$,q,X,G,Q,j,K,Y,ee=(0,u.generateUuid)()){super(X,G,Q,j,ee),this.description=U,this.dataId=$,this.canPersist=q,this.accessTypes=K,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=P;class B extends M{constructor(U,$,q,X,G,Q,j){super(q,void 0,G,void 0,(0,u.generateUuid)()),this.filter=U,this.label=$,this.supportsCondition=X,this.description=Q,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=B;class V extends M{constructor(U,$,q,X,G,Q,j,K=(0,u.generateUuid)()){super(X,G,Q,j,K),this.instructionReference=U,this.offset=$,this.canPersist=q}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=V;class z{constructor(U,$){this.sessionId=U,this.threadId=$}getId(){return`${this.sessionId}:${this.threadId}`}}e.ThreadAndSessionIds=z;class x{}e.Memory=x;let H=class{constructor(U,$,q){this.textFileService=$,this.uriIdentityService=q,this.schedulers=new Map,this.breakpointsActivated=!0,this._onDidChangeBreakpoints=new E.Emitter,this._onDidChangeCallStack=new E.Emitter,this._onDidChangeWatchExpressions=new E.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,$=!1){if(U)return this.getSessions($).find(q=>q.getId()===U)}getSessions(U=!1){return this.sessions.filter($=>U||$.state!==0)}addSession(U){this.sessions=this.sessions.filter(X=>!(X.getId()===U.getId()||X.state===0&&X.configuration.name===U.configuration.name));let $=1;for(;this.sessions.some(X=>X.getLabel()===U.getLabel());)U.setName(`${U.configuration.name} ${++$}`);let q=-1;U.parentSession&&(q=(0,t.lastIndex)(this.sessions,X=>X.parentSession===U.parentSession||X===U.parentSession)),q>=0?this.sessions.splice(q+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 $=this.sessions.find(q=>q.getId()===U.sessionId);$&&($.rawUpdate(U),this._onDidChangeCallStack.fire(void 0))}clearThreads(U,$,q=void 0){const X=this.sessions.find(G=>G.getId()===U);this.schedulers.forEach(G=>G.dispose()),this.schedulers.clear(),X&&(X.clearThreads($,q),this._onDidChangeCallStack.fire(void 0))}async fetchCallstack(U,$){if(U.reachedEndOfCallStack)return;const q=U.stoppedDetails?.totalFrames,X=typeof q=="number"?q-U.getCallStack().length:void 0;(!$||X&&$>X)&&($=X),$&&$>0&&(await U.fetchCallStack($),this._onDidChangeCallStack.fire())}refreshTopOfCallstack(U){if(U.session.capabilities.supportsDelayedStackTraceLoading){let q=Promise.resolve();const X=new Promise((G,Q)=>{q=U.fetchCallStack(1).then(()=>{this.schedulers.has(U.getId())||this.schedulers.set(U.getId(),new p.RunOnceScheduler(()=>{U.fetchCallStack(19).then(()=>{const j=U.getStaleCallStack(),K=U.getCallStack();let Y=j.length!==K.length;for(let ee=1;ee<j.length&&!Y;ee++)Y=!j[ee].equals(K[ee]);Y&&this._onDidChangeCallStack.fire(),G()})},420)),this.schedulers.get(U.getId()).schedule(),this._onDidChangeCallStack.fire()})});return{topCallStack:q,wholeCallStack:X}}const $=U.fetchCallStack();return{wholeCallStack:$,topCallStack:$}}getBreakpoints(U){if(U){const $=U.uri?U.uri.toString():void 0;return this.breakpoints.filter(q=>!($&&q.uri.toString()!==$||U.lineNumber&&q.lineNumber!==U.lineNumber||U.column&&q.column!==U.column||U.enabledOnly&&(!this.breakpointsActivated||!q.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(($,q)=>$.filter===U[q].filter&&$.label===U[q].label&&$.supportsCondition===U[q].supportsCondition&&$.conditionDescription===U[q].conditionDescription&&$.description===U[q].description))return;this.exceptionBreakpoints=U.map($=>{const q=this.exceptionBreakpoints.filter(X=>X.filter===$.filter).pop();return new B($.filter,$.label,q?q.enabled:!!$.default,!!$.supportsCondition,q?.condition,$.description,$.conditionDescription)}),this._onDidChangeBreakpoints.fire(void 0)}}setExceptionBreakpointCondition(U,$){U.condition=$,this._onDidChangeBreakpoints.fire(void 0)}areBreakpointsActivated(){return this.breakpointsActivated}setBreakpointsActivated(U){this.breakpointsActivated=U,this._onDidChangeBreakpoints.fire(void 0)}addBreakpoints(U,$,q=!0){const X=$.map(G=>new O(U,G.lineNumber,G.column,G.enabled!==!1,G.condition,G.hitCondition,G.logMessage,void 0,this.textFileService,this.uriIdentityService,G.id));return this.breakpoints=this.breakpoints.concat(X),this.breakpointsActivated=!0,this.sortAndDeDup(),q&&this._onDidChangeBreakpoints.fire({added:X,sessionOnly:!1}),X}removeBreakpoints(U){this.breakpoints=this.breakpoints.filter($=>!U.some(q=>q.getId()===$.getId())),this._onDidChangeBreakpoints.fire({removed:U,sessionOnly:!1})}updateBreakpoints(U){const $=[];this.breakpoints.forEach(q=>{const X=U.get(q.getId());X&&(q.update(X),$.push(q))}),this.sortAndDeDup(),this._onDidChangeBreakpoints.fire({changed:$,sessionOnly:!1})}setBreakpointSessionData(U,$,q){this.breakpoints.forEach(X=>{if(!q)X.setSessionData(U,void 0);else{const G=q.get(X.getId());G&&X.setSessionData(U,L(G,$))}}),this.functionBreakpoints.forEach(X=>{if(!q)X.setSessionData(U,void 0);else{const G=q.get(X.getId());G&&X.setSessionData(U,L(G,$))}}),this.dataBreakpoints.forEach(X=>{if(!q)X.setSessionData(U,void 0);else{const G=q.get(X.getId());G&&X.setSessionData(U,L(G,$))}}),this.exceptionBreakpoints.forEach(X=>{if(!q)X.setSessionData(U,void 0);else{const G=q.get(X.getId());G&&X.setSessionData(U,L(G,$))}}),this.instructionBreakpoints.forEach(X=>{if(!q)X.setSessionData(U,void 0);else{const G=q.get(X.getId());G&&X.setSessionData(U,L(G,$))}}),this._onDidChangeBreakpoints.fire({sessionOnly:!0})}getDebugProtocolBreakpoint(U,$){const q=this.breakpoints.find(X=>X.getId()===U);if(q)return q.getDebugProtocolBreakpoint($)}sortAndDeDup(){this.breakpoints=this.breakpoints.sort((U,$)=>U.uri.toString()!==$.uri.toString()?S.basenameOrAuthority(U.uri).localeCompare(S.basenameOrAuthority($.uri)):U.lineNumber===$.lineNumber?U.column&&$.column?U.column-$.column:1:U.lineNumber-$.lineNumber),this.breakpoints=(0,t.distinct)(this.breakpoints,U=>`${U.uri.toString()}:${U.lineNumber}:${U.column}`)}setEnablement(U,$){if(U instanceof O||U instanceof N||U instanceof B||U instanceof P||U instanceof V){const q=[];U.enabled!==$&&(U instanceof O||U instanceof N||U instanceof P||U instanceof V)&&q.push(U),U.enabled=$,$&&(this.breakpointsActivated=!0),this._onDidChangeBreakpoints.fire({changed:q,sessionOnly:!1})}}enableOrDisableAllBreakpoints(U){const $=[];this.breakpoints.forEach(q=>{q.enabled!==U&&$.push(q),q.enabled=U}),this.functionBreakpoints.forEach(q=>{q.enabled!==U&&$.push(q),q.enabled=U}),this.dataBreakpoints.forEach(q=>{q.enabled!==U&&$.push(q),q.enabled=U}),this.instructionBreakpoints.forEach(q=>{q.enabled!==U&&$.push(q),q.enabled=U}),U&&(this.breakpointsActivated=!0),this._onDidChangeBreakpoints.fire({changed:$,sessionOnly:!1})}addFunctionBreakpoint(U,$){const q=new N(U,!0,void 0,void 0,void 0,$);return this.functionBreakpoints.push(q),this._onDidChangeBreakpoints.fire({added:[q],sessionOnly:!1}),q}updateFunctionBreakpoint(U,$){const q=this.functionBreakpoints.find(X=>X.getId()===U);q&&(typeof $.name=="string"&&(q.name=$.name),typeof $.condition=="string"&&(q.condition=$.condition),typeof $.hitCondition=="string"&&(q.hitCondition=$.hitCondition),this._onDidChangeBreakpoints.fire({changed:[q],sessionOnly:!1}))}removeFunctionBreakpoints(U){let $;U?($=this.functionBreakpoints.filter(q=>q.getId()===U),this.functionBreakpoints=this.functionBreakpoints.filter(q=>q.getId()!==U)):($=this.functionBreakpoints,this.functionBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:$,sessionOnly:!1})}addDataBreakpoint(U,$,q,X,G){const Q=new P(U,$,q,!0,void 0,void 0,void 0,X,G);this.dataBreakpoints.push(Q),this._onDidChangeBreakpoints.fire({added:[Q],sessionOnly:!1})}removeDataBreakpoints(U){let $;U?($=this.dataBreakpoints.filter(q=>q.getId()===U),this.dataBreakpoints=this.dataBreakpoints.filter(q=>q.getId()!==U)):($=this.dataBreakpoints,this.dataBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:$,sessionOnly:!1})}addInstructionBreakpoint(U,$,q,X){const G=new V(U,$,!1,!0,X,q,void 0);this.instructionBreakpoints.push(G),this._onDidChangeBreakpoints.fire({added:[G],sessionOnly:!0})}removeInstructionBreakpoints(U){let $;U?($=this.instructionBreakpoints.filter(q=>q.instructionReference===U),this.instructionBreakpoints=this.instructionBreakpoints.filter(q=>q.instructionReference!==U)):($=this.instructionBreakpoints,this.instructionBreakpoints=[]),this._onDidChangeBreakpoints.fire({removed:$,sessionOnly:!1})}getWatchExpressions(){return this.watchExpressions}addWatchExpression(U){const $=new g(U||"");return this.watchExpressions.push($),this._onDidChangeWatchExpressions.fire($),$}renameWatchExpression(U,$){const q=this.watchExpressions.filter(X=>X.getId()===U);q.length===1&&(q[0].name=$,this._onDidChangeWatchExpressions.fire(q[0]))}removeWatchExpressions(U=null){this.watchExpressions=U?this.watchExpressions.filter($=>$.getId()!==U):[],this._onDidChangeWatchExpressions.fire(void 0)}moveWatchExpression(U,$){const q=this.watchExpressions.find(X=>X.getId()===U);q&&(this.watchExpressions=this.watchExpressions.filter(X=>X.getId()!==U),this.watchExpressions=this.watchExpressions.slice(0,$).concat(q,this.watchExpressions.slice($)),this._onDidChangeWatchExpressions.fire(void 0))}sourceIsNotAvailable(U){this.sessions.forEach($=>{const q=$.getSourceForUri(U);q&&(q.available=!1)}),this._onDidChangeCallStack.fire(void 0)}};H=we([F(1,n.ITextFileService),F(2,c.IUriIdentityService)],H),e.DebugModel=H}),define(ae[551],le([1,0,10,133,79,239,211,36,16,11,29,113,2,18,105,42,1592,84,15,8,7,37,5,38,49,76,41,27,73,12,129,45,201,87,192,443,24,179]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBreakpointMessageAndIcon=e.openBreakpointSource=e.BreakpointsView=e.getExpandedBodySize=void 0;const V=t.$;function z(oe){const se=V("input");return se.type="checkbox",se.tabIndex=-1,oe.push(p.Gesture.ignoreTarget(se)),se}const x=9;function H(oe,se){const te=oe.getBreakpoints().length+oe.getExceptionBreakpoints().length+oe.getFunctionBreakpoints().length+oe.getDataBreakpoints().length+oe.getInstructionBreakpoints().length;return Math.min(se,te)*22}e.getExpandedBodySize=H;let W=class extends T.ViewPane{constructor(se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De){super(se,ne,te,me,Ie,Se,ce,ve,de,be),this.debugService=Z,this.editorService=he,this.contextViewService=pe,this.labelService=ge,this.hoverService=Ce,this.languageService=De,this.needsRefresh=!1,this.needsStateChange=!1,this.ignoreLayout=!1,this.autoFocusedIndex=-1,this.menu=ue.createMenu(s.MenuId.DebugBreakpointsContext,Ie),this._register(this.menu),this.breakpointItemType=M.CONTEXT_BREAKPOINT_ITEM_TYPE.bindTo(Ie),this.breakpointSupportsCondition=M.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION.bindTo(Ie),this.breakpointInputFocused=M.CONTEXT_BREAKPOINT_INPUT_FOCUSED.bindTo(Ie),this._register(this.debugService.getModel().onDidChangeBreakpoints(()=>this.onBreakpointsChange())),this._register(this.debugService.getViewModel().onDidFocusSession(()=>this.updateBreakpointsHint())),this._register(this.debugService.onDidChangeState(()=>this.onStateChange())),this.hintDelayer=this._register(new b.RunOnceScheduler(()=>this.updateBreakpointsHint(!0),4e3))}renderBody(se){super.renderBody(se),this.element.classList.add("debug-pane"),se.classList.add("debug-breakpoints");const te=new U(this);this.list=this.instantiationService.createInstance(v.WorkbenchList,"Breakpoints",se,te,[this.instantiationService.createInstance(q,this.menu,this.breakpointSupportsCondition,this.breakpointItemType),new X(this.menu,this.breakpointSupportsCondition,this.breakpointItemType,this.debugService),new Y(this,this.debugService,this.contextViewService,this.themeService),this.instantiationService.createInstance(G,this.menu,this.breakpointSupportsCondition,this.breakpointItemType),this.instantiationService.createInstance(Q),new K(this,this.debugService,this.contextViewService,this.themeService,this.labelService),this.instantiationService.createInstance(j)],{identityProvider:{getId:ne=>ne.getId()},multipleSelectionSupport:!1,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:ne=>ne},accessibilityProvider:new ee(this.debugService,this.labelService),overrideStyles:{listBackground:this.getBackgroundColor()}}),M.CONTEXT_BREAKPOINTS_FOCUSED.bindTo(this.list.contextKeyService),this._register(this.list.onContextMenu(this.onListContextMenu,this)),this.list.onMouseMiddleClick(async({element:ne})=>{ne instanceof O.Breakpoint?await this.debugService.removeBreakpoints(ne.getId()):ne instanceof O.FunctionBreakpoint?await this.debugService.removeFunctionBreakpoints(ne.getId()):ne instanceof O.DataBreakpoint?await this.debugService.removeDataBreakpoints(ne.getId()):ne instanceof O.InstructionBreakpoint&&await this.debugService.removeInstructionBreakpoints(ne.instructionReference)}),this._register(this.list.onDidOpen(async ne=>{!ne.element||ne.browserEvent instanceof MouseEvent&&ne.browserEvent.button===1||(ne.element instanceof O.Breakpoint&&ie(ne.element,ne.sideBySide,ne.editorOptions.preserveFocus||!1,ne.editorOptions.pinned||!ne.editorOptions.preserveFocus,this.debugService,this.editorService),ne.element instanceof O.InstructionBreakpoint&&(await this.editorService.openEditor(N.DisassemblyViewInput.instance)).goToAddress(ne.element.instructionReference,ne.browserEvent instanceof MouseEvent&&ne.browserEvent.detail===2),ne.browserEvent instanceof MouseEvent&&ne.browserEvent.detail===2&&ne.element instanceof O.FunctionBreakpoint&&ne.element!==this.inputBoxData?.breakpoint&&this.renderInputBox({breakpoint:ne.element,type:"name"}))})),this.list.splice(0,this.list.length,this.elements),this._register(this.onDidChangeBodyVisibility(ne=>{ne&&(this.needsRefresh&&this.onBreakpointsChange(),this.needsStateChange&&this.onStateChange())}));const Z=this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));this._register(Z.onDidChangeAllViewDescriptors(()=>{this.updateSize()}))}renderHeaderTitle(se,te){super.renderHeaderTitle(se,te);const Z=t.append(se,V("span.breakpoint-warning"));this.hintContainer=this._register(new A.IconLabel(Z,{supportIcons:!0,hoverDelegate:{showHover:(ne,ce)=>this.hoverService.showHover({content:ne.content,target:this.hintContainer.element},ce),delay:this.configurationService.getValue("workbench.hover.delay")}})),t.hide(this.hintContainer.element)}focus(){super.focus(),this.list?.domFocus()}renderInputBox(se){this._inputBoxData=se,this.onBreakpointsChange(),this._inputBoxData=void 0}get inputBoxData(){return this._inputBoxData}layoutBody(se,te){if(!this.ignoreLayout){super.layoutBody(se,te),this.list?.layout(se,te);try{this.ignoreLayout=!0,this.updateSize()}finally{this.ignoreLayout=!1}}}onListContextMenu(se){const te=se.element,Z=te instanceof O.Breakpoint?"breakpoint":te instanceof O.ExceptionBreakpoint?"exceptionBreakpoint":te instanceof O.FunctionBreakpoint?"functionBreakpoint":te instanceof O.DataBreakpoint?"dataBreakpoint":te instanceof O.InstructionBreakpoint?"instructionBreakpoint":void 0;this.breakpointItemType.set(Z);const ne=this.debugService.getViewModel().focusedSession,ce=te instanceof O.ExceptionBreakpoint?te.supportsCondition:!ne||!!ne.capabilities.supportsConditionalBreakpoints;this.breakpointSupportsCondition.set(ce);const de=[];(0,l.createAndFillInContextMenuActions)(this.menu,{arg:se.element,shouldForwardArgs:!1},{primary:[],secondary:de},"inline"),this.contextMenuService.showContextMenu({getAnchor:()=>se.anchor,getActions:()=>de,getActionsContext:()=>te})}updateSize(){const se=this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id));this.minimumBodySize=this.orientation===0?H(this.debugService.getModel(),x):170,this.maximumBodySize=this.orientation===0&&se.visibleViewDescriptors.length>1?H(this.debugService.getModel(),Number.POSITIVE_INFINITY):Number.POSITIVE_INFINITY}updateBreakpointsHint(se=!1){if(!this.hintContainer)return;const te=this.debugService.getViewModel().focusedSession?.configuration.type,Z=te?this.debugService.getAdapterManager().getDebugger(te):void 0,ne=Z?.strings?.[M.DebuggerString.UnverifiedBreakpoints],ce=ne&&this.debugService.getModel().getBreakpoints().filter(de=>{if(de.verified||!de.enabled)return!1;const he=this.languageService.guessLanguageIdByFilepathOrFirstLine(de.uri);return he&&Z.interestedInLanguage(he)});if(ne&&ce?.length&&this.debugService.getModel().areBreakpointsActivated())if(se){const de=new C.MarkdownString(void 0,{isTrusted:!0}).appendMarkdown(ne);this.hintContainer.setLabel("$(warning)",void 0,{title:{markdown:de,markdownNotSupportedFallback:ne}}),t.show(this.hintContainer.element)}else this.hintDelayer.schedule();else t.hide(this.hintContainer.element)}onBreakpointsChange(){if(this.isBodyVisible()){if(this.updateSize(),this.list){const se=this.list.getFocus()[0],te=se&&!this.elements.includes(this.list.element(se));this.list.splice(0,this.list.length,this.elements),this.needsRefresh=!1,te&&this.list.focusNth(Math.min(se,this.list.length-1))}this.updateBreakpointsHint()}else this.needsRefresh=!0}onStateChange(){if(this.isBodyVisible()){this.needsStateChange=!1;const se=this.debugService.getViewModel().focusedThread;let te=!1;if(se&&se.stoppedDetails&&se.stoppedDetails.hitBreakpointIds&&se.stoppedDetails.hitBreakpointIds.length>0){const Z=se.stoppedDetails.hitBreakpointIds,ce=this.elements.findIndex(de=>{const he=de.getIdFromAdapter(se.session.getId());return typeof he=="number"&&Z.indexOf(he)!==-1});ce>=0&&(this.list.setFocus([ce]),this.list.setSelection([ce]),te=!0,this.autoFocusedIndex=ce)}if(!te){const Z=this.list.getFocus(),ne=this.list.getSelection();this.autoFocusedIndex>=0&&(0,I.equals)(Z,ne)&&Z.indexOf(this.autoFocusedIndex)>=0&&(this.list.setFocus([]),this.list.setSelection([])),this.autoFocusedIndex=-1}this.updateBreakpointsHint()}else this.needsStateChange=!0}get elements(){const se=this.debugService.getModel();return se.getExceptionBreakpoints().concat(se.getFunctionBreakpoints()).concat(se.getDataBreakpoints()).concat(se.getBreakpoints()).concat(se.getInstructionBreakpoints())}};W=we([F(1,a.IContextMenuService),F(2,M.IDebugService),F(3,g.IKeybindingService),F(4,o.IInstantiationService),F(5,y.IThemeService),F(6,P.IEditorService),F(7,a.IContextViewService),F(8,d.IConfigurationService),F(9,_.IViewDescriptorService),F(10,n.IContextKeyService),F(11,m.IOpenerService),F(12,w.ITelemetryService),F(13,h.ILabelService),F(14,s.IMenuService),F(15,B.IHoverService),F(16,f.ILanguageService)],W),e.BreakpointsView=W;class U{constructor(se){this.view=se}getHeight(se){return 22}getTemplateId(se){if(se instanceof O.Breakpoint)return q.ID;if(se instanceof O.FunctionBreakpoint){const te=this.view.inputBoxData?.breakpoint;return!se.name||te&&te.getId()===se.getId()?K.ID:G.ID}if(se instanceof O.ExceptionBreakpoint){const te=this.view.inputBoxData?.breakpoint;return te&&te.getId()===se.getId()?Y.ID:X.ID}return se instanceof O.DataBreakpoint?Q.ID:se instanceof O.InstructionBreakpoint?j.ID:""}}const $=new Map;let q=class bl{constructor(se,te,Z,ne,ce){this.menu=se,this.breakpointSupportsCondition=te,this.breakpointItemType=Z,this.debugService=ne,this.labelService=ce}get templateId(){return bl.ID}renderTemplate(se){const te=Object.create(null);te.toDispose=[],te.breakpoint=t.append(se,V(".breakpoint")),te.icon=V(".icon"),te.checkbox=z(te.toDispose),te.toDispose.push(t.addStandardDisposableListener(te.checkbox,"change",ne=>{this.debugService.enableOrDisableBreakpoints(!te.context.enabled,te.context)})),t.append(te.breakpoint,te.icon),t.append(te.breakpoint,te.checkbox),te.name=t.append(te.breakpoint,V("span.name")),te.filePath=t.append(te.breakpoint,V("span.file-path")),te.actionBar=new R.ActionBar(te.breakpoint),te.toDispose.push(te.actionBar);const Z=t.append(te.breakpoint,V(".line-number-container"));return te.lineNumber=t.append(Z,V("span.line-number.monaco-count-badge")),te}renderElement(se,te,Z){Z.context=se,Z.breakpoint.classList.toggle("disabled",!this.debugService.getModel().areBreakpointsActivated()),Z.name.textContent=u.basenameOrAuthority(se.uri),Z.lineNumber.textContent=se.lineNumber.toString(),se.column&&(Z.lineNumber.textContent+=`:${se.column}`),Z.filePath.textContent=this.labelService.getUriLabel(u.dirname(se.uri),{relative:!0}),Z.checkbox.checked=se.enabled;const{message:ne,icon:ce}=re(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se,this.labelService);Z.icon.className=y.ThemeIcon.asClassName(ce),Z.breakpoint.title=se.message||ne||"",(this.debugService.state===3||this.debugService.state===2)&&!se.verified&&Z.breakpoint.classList.add("disabled");const he=[],pe=this.debugService.getViewModel().focusedSession;this.breakpointSupportsCondition.set(!pe||!!pe.capabilities.supportsConditionalBreakpoints),this.breakpointItemType.set("breakpoint"),(0,l.createAndFillInActionBarActions)(this.menu,{arg:se,shouldForwardArgs:!0},{primary:he,secondary:[]},"inline"),Z.actionBar.clear(),Z.actionBar.push(he,{icon:!0,label:!1}),$.set(se.getId(),Z.actionBar.domNode)}disposeTemplate(se){(0,r.dispose)(se.toDispose)}};q.ID="breakpoints",q=we([F(3,M.IDebugService),F(4,h.ILabelService)],q);class X{constructor(se,te,Z,ne){this.menu=se,this.breakpointSupportsCondition=te,this.breakpointItemType=Z,this.debugService=ne}get templateId(){return X.ID}renderTemplate(se){const te=Object.create(null);return te.toDispose=[],te.breakpoint=t.append(se,V(".breakpoint")),te.checkbox=z(te.toDispose),te.toDispose.push(t.addStandardDisposableListener(te.checkbox,"change",Z=>{this.debugService.enableOrDisableBreakpoints(!te.context.enabled,te.context)})),t.append(te.breakpoint,te.checkbox),te.name=t.append(te.breakpoint,V("span.name")),te.condition=t.append(te.breakpoint,V("span.condition")),te.breakpoint.classList.add("exception"),te.actionBar=new R.ActionBar(te.breakpoint),te.toDispose.push(te.actionBar),te}renderElement(se,te,Z){Z.context=se,Z.name.textContent=se.label||`${se.filter} exceptions`,Z.breakpoint.title=se.verified?se.description||Z.name.textContent:se.message||(0,c.localize)(0,null),Z.breakpoint.classList.toggle("disabled",!se.verified),Z.checkbox.checked=se.enabled,Z.condition.textContent=se.condition||"",Z.condition.title=(0,c.localize)(1,null,se.condition);const ne=[];this.breakpointSupportsCondition.set(se.supportsCondition),this.breakpointItemType.set("exceptionBreakpoint"),(0,l.createAndFillInActionBarActions)(this.menu,{arg:se,shouldForwardArgs:!0},{primary:ne,secondary:[]},"inline"),Z.actionBar.clear(),Z.actionBar.push(ne,{icon:!0,label:!1}),$.set(se.getId(),Z.actionBar.domNode)}disposeTemplate(se){(0,r.dispose)(se.toDispose)}}X.ID="exceptionbreakpoints";let G=class Cl{constructor(se,te,Z,ne,ce){this.menu=se,this.breakpointSupportsCondition=te,this.breakpointItemType=Z,this.debugService=ne,this.labelService=ce}get templateId(){return Cl.ID}renderTemplate(se){const te=Object.create(null);return te.toDispose=[],te.breakpoint=t.append(se,V(".breakpoint")),te.icon=V(".icon"),te.checkbox=z(te.toDispose),te.toDispose.push(t.addStandardDisposableListener(te.checkbox,"change",Z=>{this.debugService.enableOrDisableBreakpoints(!te.context.enabled,te.context)})),t.append(te.breakpoint,te.icon),t.append(te.breakpoint,te.checkbox),te.name=t.append(te.breakpoint,V("span.name")),te.condition=t.append(te.breakpoint,V("span.condition")),te.actionBar=new R.ActionBar(te.breakpoint),te.toDispose.push(te.actionBar),te}renderElement(se,te,Z){Z.context=se,Z.name.textContent=se.name;const{icon:ne,message:ce}=re(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se,this.labelService);Z.icon.className=y.ThemeIcon.asClassName(ne),Z.icon.title=ce||"",Z.checkbox.checked=se.enabled,Z.breakpoint.title=ce||"",se.condition&&se.hitCondition?Z.condition.textContent=(0,c.localize)(2,null,se.condition,se.hitCondition):Z.condition.textContent=se.condition||se.hitCondition||"";const de=this.debugService.getViewModel().focusedSession;Z.breakpoint.classList.toggle("disabled",de&&!de.capabilities.supportsFunctionBreakpoints||!this.debugService.getModel().areBreakpointsActivated()),de&&!de.capabilities.supportsFunctionBreakpoints&&(Z.breakpoint.title=(0,c.localize)(3,null));const he=[];this.breakpointSupportsCondition.set(!de||!!de.capabilities.supportsConditionalBreakpoints),this.breakpointItemType.set("functionBreakpoint"),(0,l.createAndFillInActionBarActions)(this.menu,{arg:se,shouldForwardArgs:!0},{primary:he,secondary:[]},"inline"),Z.actionBar.clear(),Z.actionBar.push(he,{icon:!0,label:!1}),$.set(se.getId(),Z.actionBar.domNode)}disposeTemplate(se){(0,r.dispose)(se.toDispose)}};G.ID="functionbreakpoints",G=we([F(3,M.IDebugService),F(4,h.ILabelService)],G);let Q=class wl{constructor(se,te){this.debugService=se,this.labelService=te}get templateId(){return wl.ID}renderTemplate(se){const te=Object.create(null);return te.breakpoint=t.append(se,V(".breakpoint")),te.toDispose=[],te.icon=V(".icon"),te.checkbox=z(te.toDispose),te.toDispose.push(t.addStandardDisposableListener(te.checkbox,"change",Z=>{this.debugService.enableOrDisableBreakpoints(!te.context.enabled,te.context)})),t.append(te.breakpoint,te.icon),t.append(te.breakpoint,te.checkbox),te.name=t.append(te.breakpoint,V("span.name")),te.accessType=t.append(te.breakpoint,V("span.access-type")),te}renderElement(se,te,Z){Z.context=se,Z.name.textContent=se.description;const{icon:ne,message:ce}=re(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se,this.labelService);Z.icon.className=y.ThemeIcon.asClassName(ne),Z.icon.title=ce||"",Z.checkbox.checked=se.enabled,Z.breakpoint.title=ce||"";const de=this.debugService.getViewModel().focusedSession;if(Z.breakpoint.classList.toggle("disabled",de&&!de.capabilities.supportsDataBreakpoints||!this.debugService.getModel().areBreakpointsActivated()),de&&!de.capabilities.supportsDataBreakpoints&&(Z.breakpoint.title=(0,c.localize)(4,null)),se.accessType){const he=se.accessType==="read"?(0,c.localize)(5,null):se.accessType==="write"?(0,c.localize)(6,null):(0,c.localize)(7,null);Z.accessType.textContent=he}else Z.accessType.textContent=""}disposeTemplate(se){(0,r.dispose)(se.toDispose)}};Q.ID="databreakpoints",Q=we([F(0,M.IDebugService),F(1,h.ILabelService)],Q);let j=class El{constructor(se,te){this.debugService=se,this.labelService=te}get templateId(){return El.ID}renderTemplate(se){const te=Object.create(null);return te.toDispose=[],te.breakpoint=t.append(se,V(".breakpoint")),te.icon=V(".icon"),te.checkbox=z(te.toDispose),te.toDispose.push(t.addStandardDisposableListener(te.checkbox,"change",Z=>{this.debugService.enableOrDisableBreakpoints(!te.context.enabled,te.context)})),t.append(te.breakpoint,te.icon),t.append(te.breakpoint,te.checkbox),te.name=t.append(te.breakpoint,V("span.name")),te.address=t.append(te.breakpoint,V("span.file-path")),te.actionBar=new R.ActionBar(te.breakpoint),te.toDispose.push(te.actionBar),te}renderElement(se,te,Z){Z.context=se,Z.breakpoint.classList.toggle("disabled",!this.debugService.getModel().areBreakpointsActivated()),Z.name.textContent=se.instructionReference,Z.checkbox.checked=se.enabled;const{message:ne,icon:ce}=re(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se,this.labelService);Z.icon.className=y.ThemeIcon.asClassName(ce),Z.breakpoint.title=se.message||ne||"",(this.debugService.state===3||this.debugService.state===2)&&!se.verified&&Z.breakpoint.classList.add("disabled")}disposeTemplate(se){(0,r.dispose)(se.toDispose)}};j.ID="instructionBreakpoints",j=we([F(0,M.IDebugService),F(1,h.ILabelService)],j);class K{constructor(se,te,Z,ne,ce){this.view=se,this.debugService=te,this.contextViewService=Z,this.themeService=ne,this.labelService=ce}get templateId(){return K.ID}renderTemplate(se){const te=Object.create(null),Z=[],ne=t.append(se,V(".breakpoint"));te.icon=V(".icon"),te.checkbox=z(Z),t.append(ne,te.icon),t.append(ne,te.checkbox),this.view.breakpointInputFocused.set(!0);const ce=t.append(ne,V(".inputBoxContainer")),de=new k.InputBox(ce,this.contextViewService),he=(0,D.attachInputBoxStyler)(de,this.themeService);Z.push(de,he);const pe=me=>{te.updating=!0;try{this.view.breakpointInputFocused.set(!1);const Se=te.breakpoint.getId();me?(te.type==="name"&&this.debugService.updateFunctionBreakpoint(Se,{name:de.value}),te.type==="condition"&&this.debugService.updateFunctionBreakpoint(Se,{condition:de.value}),te.type==="hitCount"&&this.debugService.updateFunctionBreakpoint(Se,{hitCondition:de.value})):te.type==="name"&&!te.breakpoint.name?this.debugService.removeFunctionBreakpoints(Se):this.view.renderInputBox(void 0)}finally{te.updating=!1}};return Z.push(t.addStandardDisposableListener(de.inputElement,"keydown",me=>{const Se=me.equals(9),Ie=me.equals(3);(Se||Ie)&&(me.preventDefault(),me.stopPropagation(),pe(Ie))})),Z.push(t.addDisposableListener(de.inputElement,"blur",()=>{te.updating||pe(!!de.value)})),te.inputBox=de,te.toDispose=Z,te}renderElement(se,te,Z){Z.breakpoint=se,Z.type=this.view.inputBoxData?.type||"name";const{icon:ne,message:ce}=re(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se,this.labelService);Z.icon.className=y.ThemeIcon.asClassName(ne),Z.icon.title=ce||"",Z.checkbox.checked=se.enabled,Z.checkbox.disabled=!0,Z.inputBox.value=se.name||"";let de=(0,c.localize)(8,null),he=(0,c.localize)(9,null);Z.type==="condition"?(Z.inputBox.value=se.condition||"",de=(0,c.localize)(10,null),he=(0,c.localize)(11,null)):Z.type==="hitCount"&&(Z.inputBox.value=se.hitCondition||"",de=(0,c.localize)(12,null),he=(0,c.localize)(13,null)),Z.inputBox.setAriaLabel(he),Z.inputBox.setPlaceHolder(de),setTimeout(()=>{Z.inputBox.focus(),Z.inputBox.select()},0)}disposeTemplate(se){(0,r.dispose)(se.toDispose)}}K.ID="functionbreakpointinput";class Y{constructor(se,te,Z,ne){this.view=se,this.debugService=te,this.contextViewService=Z,this.themeService=ne}get templateId(){return Y.ID}renderTemplate(se){const te=Object.create(null),Z=[],ne=t.append(se,V(".breakpoint"));ne.classList.add("exception"),te.checkbox=z(Z),t.append(ne,te.checkbox),this.view.breakpointInputFocused.set(!0);const ce=t.append(ne,V(".inputBoxContainer")),de=new k.InputBox(ce,this.contextViewService,{ariaLabel:(0,c.localize)(14,null)}),he=(0,D.attachInputBoxStyler)(de,this.themeService);Z.push(de,he);const pe=me=>{this.view.breakpointInputFocused.set(!1);let Se=te.breakpoint.condition;me&&(Se=de.value!==""?de.value:void 0),this.debugService.setExceptionBreakpointCondition(te.breakpoint,Se)};return Z.push(t.addStandardDisposableListener(de.inputElement,"keydown",me=>{const Se=me.equals(9),Ie=me.equals(3);(Se||Ie)&&(me.preventDefault(),me.stopPropagation(),pe(Ie))})),Z.push(t.addDisposableListener(de.inputElement,"blur",()=>{setTimeout(()=>{pe(!0)})})),te.inputBox=de,te.toDispose=Z,te}renderElement(se,te,Z){const ne=se.conditionDescription||(0,c.localize)(15,null);Z.inputBox.setPlaceHolder(ne),Z.breakpoint=se,Z.checkbox.checked=se.enabled,Z.checkbox.disabled=!0,Z.inputBox.value=se.condition||"",setTimeout(()=>{Z.inputBox.focus(),Z.inputBox.select()},0)}disposeTemplate(se){(0,r.dispose)(se.toDispose)}}Y.ID="exceptionbreakpointinput";class ee{constructor(se,te){this.debugService=se,this.labelService=te}getWidgetAriaLabel(){return(0,c.localize)(16,null)}getRole(){return"checkbox"}isChecked(se){return se.enabled}getAriaLabel(se){if(se instanceof O.ExceptionBreakpoint)return se.toString();const{message:te}=re(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),se,this.labelService),Z=se.toString();return te?`${Z}, ${te}`:Z}}function ie(oe,se,te,Z,ne,ce){if(oe.uri.scheme===M.DEBUG_SCHEME&&ne.state===0)return Promise.resolve(void 0);const de=oe.endLineNumber?{startLineNumber:oe.lineNumber,endLineNumber:oe.endLineNumber,startColumn:oe.column||1,endColumn:oe.endColumn||1073741824}:{startLineNumber:oe.lineNumber,startColumn:oe.column||1,endLineNumber:oe.lineNumber,endColumn:oe.column||1073741824};return ce.openEditor({resource:oe.uri,options:{preserveFocus:te,selection:de,revealIfOpened:!0,selectionRevealType:1,pinned:Z}},se?P.SIDE_GROUP:P.ACTIVE_GROUP)}e.openBreakpointSource=ie;function re(oe,se,te,Z){const ne=oe===3||oe===2,ce=te instanceof O.DataBreakpoint?L.dataBreakpoint:te instanceof O.FunctionBreakpoint?L.functionBreakpoint:te.logMessage?L.logBreakpoint:L.breakpoint;if(!te.enabled||!se)return{icon:ce.disabled,message:te.logMessage?(0,c.localize)(17,null):(0,c.localize)(18,null)};const de=pe=>"message"in te&&te.message?pe.concat(", "+te.message):pe;if(ne&&!te.verified)return{icon:ce.unverified,message:"message"in te&&te.message?te.message:te.logMessage?(0,c.localize)(19,null):(0,c.localize)(20,null),showAdapterUnverifiedMessage:!0};if(te instanceof O.DataBreakpoint)return te.supported?{icon:ce.regular,message:te.message||(0,c.localize)(22,null)}:{icon:ce.unverified,message:(0,c.localize)(21,null)};if(te instanceof O.FunctionBreakpoint){if(!te.supported)return{icon:ce.unverified,message:(0,c.localize)(23,null)};const pe=[];return pe.push(te.message||(0,c.localize)(24,null)),te.condition&&pe.push((0,c.localize)(25,null,te.condition)),te.hitCondition&&pe.push((0,c.localize)(26,null,te.hitCondition)),{icon:ce.regular,message:de(pe.join(` `))}}if(te instanceof O.InstructionBreakpoint){if(!te.supported)return{icon:ce.unverified,message:(0,c.localize)(27,null)};const pe=[];return te.message?pe.push(te.message):te.instructionReference?pe.push((0,c.localize)(28,null,te.instructionReference)):pe.push((0,c.localize)(29,null)),te.hitCondition&&pe.push((0,c.localize)(30,null,te.hitCondition)),{icon:ce.regular,message:de(pe.join(` `))}}if(te.logMessage||te.condition||te.hitCondition){const pe=[];return te.supported?(te.logMessage&&pe.push((0,c.localize)(32,null,te.logMessage)),te.condition&&pe.push((0,c.localize)(33,null,te.condition)),te.hitCondition&&pe.push((0,c.localize)(34,null,te.hitCondition)),{icon:te.logMessage?L.logBreakpoint.regular:L.conditionalBreakpoint.regular,message:de(pe.join(` `))}):{icon:L.debugBreakpointUnsupported,message:(0,c.localize)(31,null)}}const he="message"in te&&te.message?te.message:te instanceof O.Breakpoint&&Z?Z.getUriLabel(te.uri):(0,c.localize)(35,null);return{icon:ce.regular,message:he}}e.getBreakpointMessageAndIcon=re,(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.addFunctionBreakpointAction",title:{value:(0,c.localize)(36,null),original:"Add Function Breakpoint",mnemonicTitle:(0,c.localize)(37,null)},f1:!0,icon:L.watchExpressionsAddFuncBreakpoint,menu:[{id:s.MenuId.ViewTitle,group:"navigation",order:10,when:n.ContextKeyExpr.equals("view",M.BREAKPOINTS_VIEW_ID)},{id:s.MenuId.MenubarNewBreakpointMenu,group:"1_breakpoints",order:3,when:M.CONTEXT_DEBUGGERS_AVAILABLE}]})}run(oe){oe.get(M.IDebugService).addFunctionBreakpoint()}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.toggleBreakpointsActivatedAction",title:{value:(0,c.localize)(38,null),original:"Toggle Activate Breakpoints"},f1:!0,icon:L.breakpointsActivate,menu:{id:s.MenuId.ViewTitle,group:"navigation",order:20,when:n.ContextKeyExpr.equals("view",M.BREAKPOINTS_VIEW_ID)}})}run(oe){const se=oe.get(M.IDebugService);se.setBreakpointsActivated(!se.getModel().areBreakpointsActivated())}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.removeBreakpoint",title:(0,c.localize)(39,null),icon:S.Codicon.removeClose,menu:[{id:s.MenuId.DebugBreakpointsContext,group:"3_modification",order:10,when:M.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint")},{id:s.MenuId.DebugBreakpointsContext,group:"inline",order:20,when:M.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint")}]})}async run(oe,se){const te=oe.get(M.IDebugService);se instanceof O.Breakpoint?await te.removeBreakpoints(se.getId()):se instanceof O.FunctionBreakpoint?await te.removeFunctionBreakpoints(se.getId()):se instanceof O.DataBreakpoint?await te.removeDataBreakpoints(se.getId()):se instanceof O.InstructionBreakpoint&&await te.removeInstructionBreakpoints(se.instructionReference)}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.removeAllBreakpoints",title:{original:"Remove All Breakpoints",value:(0,c.localize)(40,null),mnemonicTitle:(0,c.localize)(41,null)},f1:!0,icon:L.breakpointsRemoveAll,menu:[{id:s.MenuId.ViewTitle,group:"navigation",order:30,when:n.ContextKeyExpr.equals("view",M.BREAKPOINTS_VIEW_ID)},{id:s.MenuId.DebugBreakpointsContext,group:"3_modification",order:20,when:n.ContextKeyExpr.and(M.CONTEXT_BREAKPOINTS_EXIST,M.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))},{id:s.MenuId.MenubarDebugMenu,group:"5_breakpoints",order:3,when:M.CONTEXT_DEBUGGERS_AVAILABLE}]})}run(oe){const se=oe.get(M.IDebugService);se.removeBreakpoints(),se.removeFunctionBreakpoints(),se.removeDataBreakpoints(),se.removeInstructionBreakpoints()}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.enableAllBreakpoints",title:{original:"Enable All Breakpoints",value:(0,c.localize)(42,null),mnemonicTitle:(0,c.localize)(43,null)},f1:!0,precondition:M.CONTEXT_DEBUGGERS_AVAILABLE,menu:[{id:s.MenuId.DebugBreakpointsContext,group:"z_commands",order:10,when:n.ContextKeyExpr.and(M.CONTEXT_BREAKPOINTS_EXIST,M.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))},{id:s.MenuId.MenubarDebugMenu,group:"5_breakpoints",order:1,when:M.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(oe){await oe.get(M.IDebugService).enableOrDisableBreakpoints(!0)}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.disableAllBreakpoints",title:{original:"Disable All Breakpoints",value:(0,c.localize)(44,null),mnemonicTitle:(0,c.localize)(45,null)},f1:!0,precondition:M.CONTEXT_DEBUGGERS_AVAILABLE,menu:[{id:s.MenuId.DebugBreakpointsContext,group:"z_commands",order:20,when:n.ContextKeyExpr.and(M.CONTEXT_BREAKPOINTS_EXIST,M.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))},{id:s.MenuId.MenubarDebugMenu,group:"5_breakpoints",order:2,when:M.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(oe){await oe.get(M.IDebugService).enableOrDisableBreakpoints(!1)}}),(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"workbench.debug.viewlet.action.reapplyBreakpointsAction",title:{value:(0,c.localize)(46,null),original:"Reapply All Breakpoints"},f1:!0,precondition:M.CONTEXT_IN_DEBUG_MODE,menu:[{id:s.MenuId.DebugBreakpointsContext,group:"z_commands",order:30,when:n.ContextKeyExpr.and(M.CONTEXT_BREAKPOINTS_EXIST,M.CONTEXT_BREAKPOINT_ITEM_TYPE.notEqualsTo("exceptionBreakpoint"))}]})}async run(oe){await oe.get(M.IDebugService).setBreakpointsActivated(!0)}}),(0,s.registerAction2)(class extends T.ViewAction{constructor(){super({id:"debug.editBreakpoint",viewId:M.BREAKPOINTS_VIEW_ID,title:(0,c.localize)(47,null),icon:S.Codicon.edit,precondition:M.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,menu:[{id:s.MenuId.DebugBreakpointsContext,group:"navigation",order:10},{id:s.MenuId.DebugBreakpointsContext,group:"inline",order:10}]})}async runInView(oe,se,te){const Z=oe.get(M.IDebugService),ne=oe.get(P.IEditorService);if(te instanceof O.Breakpoint){const ce=await ie(te,!1,!1,!0,Z,ne);if(ce){const de=ce.getControl();(0,i.isCodeEditor)(de)&&de.getContribution(M.BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(te.lineNumber,te.column)}}else if(te instanceof O.FunctionBreakpoint){const ce=oe.get(a.IContextMenuService),de=[new E.Action("breakpoint.editCondition",(0,c.localize)(48,null),void 0,!0,async()=>se.renderInputBox({breakpoint:te,type:"condition"})),new E.Action("breakpoint.editCondition",(0,c.localize)(49,null),void 0,!0,async()=>se.renderInputBox({breakpoint:te,type:"hitCount"}))],he=$.get(te.getId());he&&ce.showContextMenu({getActions:()=>de,getAnchor:()=>he,onHide:()=>(0,r.dispose)(de)})}else se.renderInputBox({breakpoint:te,type:"condition"})}}),(0,s.registerAction2)(class extends T.ViewAction{constructor(){super({id:"debug.editFunctionBreakpoint",viewId:M.BREAKPOINTS_VIEW_ID,title:(0,c.localize)(50,null),menu:[{id:s.MenuId.DebugBreakpointsContext,group:"1_breakpoints",order:10,when:M.CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo("functionBreakpoint")}]})}runInView(oe,se,te){se.renderInputBox({breakpoint:te,type:"name"})}}),(0,s.registerAction2)(class extends T.ViewAction{constructor(){super({id:"debug.editFunctionBreakpointHitCount",viewId:M.BREAKPOINTS_VIEW_ID,title:(0,c.localize)(51,null),precondition:M.CONTEXT_BREAKPOINT_SUPPORTS_CONDITION,menu:[{id:s.MenuId.DebugBreakpointsContext,group:"navigation",order:20,when:M.CONTEXT_BREAKPOINT_ITEM_TYPE.isEqualTo("functionBreakpoint")}]})}runInView(oe,se,te){se.renderInputBox({breakpoint:te,type:"hitCount"})}})}),define(ae[2770],le([1,0,10,36,99,40,50,59,334,1602,15,8,7,37,57,71,45,551,87,443,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionToWatchExpressionsAction=e.SelectionToReplAction=e.RunToCursorAction=void 0;class a extends A.EditorAction{constructor(){super({id:"editor.debug.action.toggleBreakpoint",label:b.localize(0,null),alias:"Debug: Toggle Breakpoint",precondition:s.CONTEXT_DEBUGGERS_AVAILABLE,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:67,weight:100},menuOpts:{when:s.CONTEXT_DEBUGGERS_AVAILABLE,title:b.localize(1,null),menuId:S.MenuId.MenubarDebugMenu,group:"4_new_breakpoint",order:1}})}async run(B,V){if(V.hasModel()){const z=B.get(s.IDebugService),x=V.getModel().uri,H=z.canSetBreakpointsIn(V.getModel()),W=[...new Set(V.getSelections().map(U=>U.getPosition().lineNumber))];await Promise.all(W.map(async U=>{const $=z.getModel().getBreakpoints({lineNumber:U,uri:x});$.length?await Promise.all($.map(q=>z.removeBreakpoints(q.getId()))):H&&await z.addBreakpoints(x,[{lineNumber:U}])}))}}}class o extends A.EditorAction{constructor(){super({id:"editor.debug.action.conditionalBreakpoint",label:b.localize(2,null),alias:"Debug: Add Conditional Breakpoint...",precondition:s.CONTEXT_DEBUGGERS_AVAILABLE,menuOpts:{menuId:S.MenuId.MenubarNewBreakpointMenu,title:b.localize(3,null),group:"1_breakpoints",order:1,when:s.CONTEXT_DEBUGGERS_AVAILABLE}})}async run(B,V){const z=B.get(s.IDebugService),x=V.getPosition();x&&V.hasModel()&&z.canSetBreakpointsIn(V.getModel())&&V.getContribution(s.BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(x.lineNumber,void 0,0)}}class g extends A.EditorAction{constructor(){super({id:"editor.debug.action.addLogPoint",label:b.localize(4,null),precondition:s.CONTEXT_DEBUGGERS_AVAILABLE,alias:"Debug: Add Logpoint...",menuOpts:[{menuId:S.MenuId.MenubarNewBreakpointMenu,title:b.localize(5,null),group:"1_breakpoints",order:4,when:s.CONTEXT_DEBUGGERS_AVAILABLE}]})}async run(B,V){const z=B.get(s.IDebugService),x=V.getPosition();x&&V.hasModel()&&z.canSetBreakpointsIn(V.getModel())&&V.getContribution(s.BREAKPOINT_EDITOR_CONTRIBUTION_ID)?.showBreakpointWidget(x.lineNumber,x.column,2)}}class h extends A.EditorAction2{constructor(){super({id:h.ID,title:{value:b.localize(6,null),original:"Open Disassembly View",mnemonicTitle:b.localize(7,null)},precondition:s.CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE,menu:[{id:S.MenuId.EditorContext,group:"debug",order:5,when:r.ContextKeyExpr.and(s.CONTEXT_IN_DEBUG_MODE,f.PanelFocusContext.toNegated(),s.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),E.EditorContextKeys.editorTextFocus,s.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED,s.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST)},{id:S.MenuId.DebugCallStackContext,group:"z_commands",order:50,when:r.ContextKeyExpr.and(s.CONTEXT_IN_DEBUG_MODE,s.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),s.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("stackFrame"),s.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED)},{id:S.MenuId.CommandPalette,when:r.ContextKeyExpr.and(s.CONTEXT_IN_DEBUG_MODE,s.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),s.CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED)}]})}runEditorCommand(B,V,...z){V.hasModel()&&B.get(n.IEditorService).openEditor(d.DisassemblyViewInput.instance,{pinned:!0})}}h.ID="editor.debug.action.openDisassemblyView";class v extends S.Action2{constructor(){super({id:v.ID,title:{value:b.localize(8,null),original:"Toggle Source Code in Disassembly View",mnemonicTitle:b.localize(9,null)},f1:!0})}run(B,V,...z){const x=B.get(C.IConfigurationService);if(x){const H=x.getValue("debug").disassemblyView.showSourceCode;x.updateValue(v.configID,!H)}}}v.ID="debug.action.toggleDisassemblyViewSourceCode",v.configID="debug.disassemblyView.showSourceCode";class m extends A.EditorAction{constructor(){super({id:m.ID,label:m.LABEL,alias:"Debug: Run to Cursor",precondition:r.ContextKeyExpr.and(s.CONTEXT_IN_DEBUG_MODE,f.PanelFocusContext.toNegated(),s.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),E.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:2}})}async run(B,V){const z=V.getPosition();if(!(V.hasModel()&&z))return;const x=V.getModel().uri,H=B.get(s.IDebugService),W=H.getViewModel(),U=B.get(i.IUriIdentityService);let $;const q=W.focusedStackFrame;q&&U.extUri.isEqual(q.source.uri,x)&&q.range.startLineNumber===z.lineNumber&&($=z.column),await H.runTo(x,z.lineNumber,$)}}e.RunToCursorAction=m,m.ID="editor.debug.action.runToCursor",m.LABEL=b.localize(10,null);class w extends A.EditorAction{constructor(){super({id:w.ID,label:w.LABEL,alias:"Debug: Evaluate in Console",precondition:r.ContextKeyExpr.and(s.CONTEXT_IN_DEBUG_MODE,E.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:0}})}async run(B,V){const z=B.get(s.IDebugService),x=B.get(c.IViewsService),H=z.getViewModel(),W=H.focusedSession;if(!V.hasModel()||!W)return;const U=V.getSelection();let $;U.isEmpty()?$=V.getModel().getLineContent(U.selectionStartLineNumber).trim():$=V.getModel().getValueInRange(U),await W.addReplExpression(H.focusedStackFrame,$),await x.openView(s.REPL_VIEW_ID,!1)}}e.SelectionToReplAction=w,w.ID="editor.debug.action.selectionToRepl",w.LABEL=b.localize(11,null);class D extends A.EditorAction{constructor(){super({id:D.ID,label:D.LABEL,alias:"Debug: Add to Watch",precondition:r.ContextKeyExpr.and(E.EditorContextKeys.hasNonEmptySelection,s.CONTEXT_IN_DEBUG_MODE,E.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:1}})}async run(B,V){const z=B.get(s.IDebugService),x=B.get(c.IViewsService);if(!V.hasModel())return;const H=V.getModel().getValueInRange(V.getSelection());await x.openView(s.WATCH_VIEW_ID),z.addWatchExpression(H)}}e.SelectionToWatchExpressionsAction=D,D.ID="editor.debug.action.selectionToWatch",D.LABEL=b.localize(12,null);class y extends A.EditorAction{constructor(){super({id:"editor.debug.action.showDebugHover",label:b.localize(13,null),alias:"Debug: Show Hover",precondition:s.CONTEXT_IN_DEBUG_MODE,kbOpts:{kbExpr:E.EditorContextKeys.editorTextFocus,primary:(0,R.KeyChord)(2089,2087),weight:100}})}async run(B,V){const z=V.getPosition();if(!(!z||!V.hasModel()))return V.getContribution(s.EDITOR_CONTRIBUTION_ID)?.showHover(z,!0)}}const T=b.localize(14,null);class _ extends A.EditorAction{constructor(){super({id:_.ID,label:_.LABEL,alias:"Debug: Step Into Target",precondition:r.ContextKeyExpr.and(s.CONTEXT_STEP_INTO_TARGETS_SUPPORTED,s.CONTEXT_IN_DEBUG_MODE,s.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),E.EditorContextKeys.editorTextFocus),contextMenuOpts:{group:"debug",order:1.5}})}async run(B,V){const z=B.get(s.IDebugService),x=B.get(u.IContextMenuService),H=B.get(i.IUriIdentityService),W=z.getViewModel().focusedSession,U=z.getViewModel().focusedStackFrame,$=V.getSelection(),q=$?.getPosition()||U&&{lineNumber:U.range.startLineNumber,column:U.range.startColumn};if(!W||!U||!V.hasModel()||!H.extUri.isEqual(V.getModel().uri,U.source.uri)){q&&I.MessageController.get(V)?.showMessage(T,q);return}const X=await W.stepInTargets(U.frameId);if(!X?.length){I.MessageController.get(V)?.showMessage(T,q);return}if($){const Y=[];for(const re of X)re.line&&Y.push({start:new k.Position(re.line,re.column||1),end:re.endLine?new k.Position(re.endLine,re.endColumn||1):void 0,target:re});Y.sort((re,oe)=>oe.start.lineNumber-re.start.lineNumber||oe.start.column-re.start.column);const ee=$.getPosition(),ie=Y.find(re=>re.end&&ee.isBefore(re.end)&&re.start.isBeforeOrEqual(ee))||Y.find(re=>re.end===void 0&&re.start.isBeforeOrEqual(ee));if(ie){W.stepIn(U.thread.threadId,ie.target.id);return}}V.revealLineInCenterIfOutsideViewport(U.range.startLineNumber);const G=V.getScrolledVisiblePosition(q),Q=(0,t.getDomNodePagePosition)(V.getDomNode()),j=Q.left+G.left,K=Q.top+G.top+G.height;x.showContextMenu({getAnchor:()=>({x:j,y:K}),getActions:()=>X.map(Y=>new p.Action(`stepIntoTarget:${Y.id}`,Y.label,void 0,!0,()=>W.stepIn(U.thread.threadId,Y.id)))})}}_.ID="editor.debug.action.stepIntoTargets",_.LABEL=b.localize(15,null);class L extends A.EditorAction{constructor(B,V){super(V),this.isNext=B}async run(B,V){const z=B.get(s.IDebugService),x=B.get(n.IEditorService),H=B.get(i.IUriIdentityService);if(V.hasModel()){const W=V.getModel().uri,U=V.getPosition().lineNumber,$=z.getModel().getBreakpoints({enabledOnly:!0});let q=this.isNext?$.filter(X=>H.extUri.isEqual(X.uri,W)&&X.lineNumber>U).shift():$.filter(X=>H.extUri.isEqual(X.uri,W)&&X.lineNumber<U).pop();if(q||(q=this.isNext?$.filter(X=>X.uri.toString()>W.toString()).shift():$.filter(X=>X.uri.toString()<W.toString()).pop()),!q&&$.length&&(q=this.isNext?$[0]:$[$.length-1]),q)return(0,l.openBreakpointSource)(q,!1,!0,!1,z,x)}}}class M extends L{constructor(){super(!0,{id:"editor.debug.action.goToNextBreakpoint",label:b.localize(16,null),alias:"Debug: Go to Next Breakpoint",precondition:s.CONTEXT_DEBUGGERS_AVAILABLE})}}class O extends L{constructor(){super(!1,{id:"editor.debug.action.goToPreviousBreakpoint",label:b.localize(17,null),alias:"Debug: Go to Previous Breakpoint",precondition:s.CONTEXT_DEBUGGERS_AVAILABLE})}}class N extends A.EditorAction{constructor(){super({id:"editor.debug.action.closeExceptionWidget",label:b.localize(18,null),alias:"Close Exception Widget",precondition:s.CONTEXT_EXCEPTION_WIDGET_VISIBLE,kbOpts:{primary:9,weight:100}})}async run(B,V){V.getContribution(s.EDITOR_CONTRIBUTION_ID)?.closeExceptionWidget()}}(0,S.registerAction2)(h),(0,S.registerAction2)(v),(0,A.registerEditorAction)(a),(0,A.registerEditorAction)(o),(0,A.registerEditorAction)(g),(0,A.registerEditorAction)(m),(0,A.registerEditorAction)(_),(0,A.registerEditorAction)(w),(0,A.registerEditorAction)(D),(0,A.registerEditorAction)(y),(0,A.registerEditorAction)(M),(0,A.registerEditorAction)(O),(0,A.registerEditorAction)(N)}),define(ae[2771],le([1,0,86,10,282,1614,8,5,76,23,27,33,12,188,87,201,280,2,6,634,192,7,24,105,539,57,62,20,9,246,53,235,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisassemblyViewContribution=e.DisassemblyView=void 0;const M={allowBreakpoint:!1,isBreakpointSet:!1,isBreakpointEnabled:!1,instruction:{address:"-1",instruction:(0,A.localize)(0,null)},instructionAddress:BigInt(-1)};let O=class pn extends u.EditorPane{constructor(x,H,W,U,$,q){super(i.DISASSEMBLY_VIEW_ID,x,H,W),this._configurationService=U,this._instantiationService=$,this._debugService=q,this._instructionBpList=[],this._enableSourceCodeRender=!0,this._loadingLock=!1,this._disassembledInstructions=void 0,this._onDidChangeStackFrame=new s.Emitter,this._previousDebuggingState=q.state,this._fontInfo=R.BareFontInfo.createFromRawSettings(U.getValue("editor"),t.PixelRatio.value),this._register(U.onDidChangeConfiguration(X=>{if(X.affectsConfiguration("editor")&&(this._fontInfo=R.BareFontInfo.createFromRawSettings(U.getValue("editor"),t.PixelRatio.value)),X.affectsConfiguration("debug")){const G=this._configurationService.getValue("debug").disassemblyView.showSourceCode;this._enableSourceCodeRender!==G?(this._enableSourceCodeRender=G,this.reloadDisassembly(void 0)):this._disassembledInstructions?.rerender()}}))}get fontInfo(){return this._fontInfo}get currentInstructionAddresses(){return this._debugService.getModel().getSessions(!1).map(x=>x.getAllThreads()).reduce((x,H)=>x.concat(H),[]).map(x=>x.getTopStackFrame()).map(x=>x?.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(x){this._enableSourceCodeRender=this._configurationService.getValue("debug").disassemblyView.showSourceCode;const H=this.fontInfo.lineHeight,W=this,U=new class{constructor(){this.headerRowHeight=0}getHeight(q){return W.isSourceCodeRender&&q.instruction.location?.path&&q.instruction.line?q.instruction.endLine?H*(q.instruction.endLine-q.instruction.line+2):H*2:H}},$=this._register(this._instantiationService.createInstance(P,this));this._disassembledInstructions=this._register(this._instantiationService.createInstance(I.WorkbenchTable,"DisassemblyView",x,U,[{label:"",tooltip:"",weight:0,minimumWidth:this.fontInfo.lineHeight,maximumWidth:this.fontInfo.lineHeight,templateId:N.TEMPLATE_ID,project(q){return q}},{label:(0,A.localize)(1,null),tooltip:"",weight:.3,templateId:P.TEMPLATE_ID,project(q){return q}}],[this._instantiationService.createInstance(N,this),$],{identityProvider:{getId:q=>q.instruction.address},horizontalScrolling:!1,overrideStyles:{listBackground:C.editorBackground},multipleSelectionSupport:!1,setRowLineHeight:!1,openOnSingleClick:!1,accessibilityProvider:new B,mouseSupport:!1})),this.reloadDisassembly(),this._register(this._disassembledInstructions.onDidScroll(q=>{if(!this._loadingLock)if(q.oldScrollTop>q.scrollTop&&q.scrollTop<q.height){this._loadingLock=!0;const X=Math.floor(q.scrollTop/this.fontInfo.lineHeight)+pn.NUM_INSTRUCTIONS_TO_LOAD;this.scrollUp_LoadDisassembledInstructions(pn.NUM_INSTRUCTIONS_TO_LOAD).then(G=>{G&&this._disassembledInstructions.reveal(X,0),this._loadingLock=!1})}else q.oldScrollTop<q.scrollTop&&q.scrollTop+q.height>q.scrollHeight-q.height&&(this._loadingLock=!0,this.scrollDown_LoadDisassembledInstructions(pn.NUM_INSTRUCTIONS_TO_LOAD).then(()=>{this._loadingLock=!1}))})),this._register(this._debugService.getViewModel().onDidFocusStackFrame(q=>{this._disassembledInstructions&&(this.goToAddress(),this._onDidChangeStackFrame.fire())})),this._register(this._debugService.getModel().onDidChangeBreakpoints(q=>{if(q&&this._disassembledInstructions){let X=!1;q.added?.forEach(G=>{if(G instanceof n.InstructionBreakpoint){const Q=this.getIndexFromAddress(G.instructionReference);Q>=0&&(this._disassembledInstructions.row(Q).isBreakpointSet=!0,this._disassembledInstructions.row(Q).isBreakpointEnabled=G.enabled,X=!0)}}),q.removed?.forEach(G=>{if(G instanceof n.InstructionBreakpoint){const Q=this.getIndexFromAddress(G.instructionReference);Q>=0&&(this._disassembledInstructions.row(Q).isBreakpointSet=!1,X=!0)}}),q.changed?.forEach(G=>{if(G instanceof n.InstructionBreakpoint){const Q=this.getIndexFromAddress(G.instructionReference);Q>=0&&this._disassembledInstructions.row(Q).isBreakpointEnabled!==G.enabled&&(this._disassembledInstructions.row(Q).isBreakpointEnabled=G.enabled,X=!0)}}),this._instructionBpList=this._debugService.getModel().getInstructionBreakpoints(),X&&this._onDidChangeStackFrame.fire()}})),this._register(this._debugService.onDidChangeState(q=>{(q===3||q===2)&&this._previousDebuggingState!==3&&this._previousDebuggingState!==2&&(this._disassembledInstructions?.splice(0,this._disassembledInstructions.length,[M]),this._enableSourceCodeRender=this._configurationService.getValue("debug").disassemblyView.showSourceCode),this._previousDebuggingState=q}))}layout(x){this._disassembledInstructions?.layout(x.height)}goToAddress(x,H){if(!this._disassembledInstructions||(x||(x=this.focusedInstructionAddress),!x))return;const W=this.getIndexFromAddress(x);W>=0?(this._disassembledInstructions.reveal(W),H&&(this._disassembledInstructions.domFocus(),this._disassembledInstructions.setFocus([W]))):this._debugService.state===2&&this.reloadDisassembly(x)}async scrollUp_LoadDisassembledInstructions(x){if(this._disassembledInstructions&&this._disassembledInstructions.length>0){const H=this._disassembledInstructions?.row(0).instruction.address;return this.loadDisassembledInstructions(H,-x,x)}return!1}async scrollDown_LoadDisassembledInstructions(x){if(this._disassembledInstructions&&this._disassembledInstructions.length>0){const H=this._disassembledInstructions?.row(this._disassembledInstructions?.length-1).instruction.address;return this.loadDisassembledInstructions(H,1,x)}return!1}async loadDisassembledInstructions(x,H,W){if((!x||x==="-1")&&(x=this.focusedInstructionAddress),!x)return!1;const U=this.debugSession,$=await U?.disassemble(x,0,H,W);if(U&&$&&this._disassembledInstructions){const q=[];let X,G;for(let j=0;j<$.length;j++){const K=this._instructionBpList.find(ee=>ee.instructionReference===$[j].address),Y=$[j];if(Y.location&&(X=Y.location,G=void 0),Y.line){const ee={startLineNumber:Y.line,startColumn:Y.column??0,endLineNumber:Y.endLine??Y.line,endColumn:Y.endColumn??0};w.Range.equalsRange(ee,G??null)||(G=ee,Y.location=X)}q.push({allowBreakpoint:!0,isBreakpointSet:K!==void 0,isBreakpointEnabled:!!K?.enabled,instruction:Y})}const Q=this._disassembledInstructions.length===1?1:0;return H>=0?this._disassembledInstructions.splice(this._disassembledInstructions.length,Q,q):this._disassembledInstructions.splice(0,Q,q),!0}return!1}getIndexFromAddress(x){const H=this._disassembledInstructions;if(H&&H.length>0){const W=BigInt(x);if(W)return(0,L.binarySearch2)(H.length,U=>{const $=H.row(U);return this.ensureAddressParsed($),$.instructionAddress>W?1:$.instructionAddress<W?-1:0})}return-1}ensureAddressParsed(x){x.instructionAddress===void 0&&(x.instructionAddress=BigInt(x.instruction.address))}reloadDisassembly(x){this._disassembledInstructions&&(this._loadingLock=!0,this._disassembledInstructions.splice(0,this._disassembledInstructions.length,[M]),this._instructionBpList=this._debugService.getModel().getInstructionBreakpoints(),this.loadDisassembledInstructions(x,-pn.NUM_INSTRUCTIONS_TO_LOAD*4,pn.NUM_INSTRUCTIONS_TO_LOAD*8).then(()=>{if(this._disassembledInstructions.length>0){const H=Math.floor(this._disassembledInstructions.length/2);this._disassembledInstructions.reveal(H,.5),this._disassembledInstructions.domFocus(),this._disassembledInstructions.setFocus([H])}this._loadingLock=!1}))}};O.NUM_INSTRUCTIONS_TO_LOAD=50,O=we([F(0,S.ITelemetryService),F(1,r.IThemeService),F(2,b.IStorageService),F(3,k.IConfigurationService),F(4,E.IInstantiationService),F(5,i.IDebugService)],O),e.DisassemblyView=O;let N=class yl{constructor(x,H){this._disassemblyView=x,this._debugService=H,this.templateId=yl.TEMPLATE_ID,this._breakpointIcon="codicon-"+f.breakpoint.regular.id,this._breakpointDisabledIcon="codicon-"+f.breakpoint.disabled.id,this._breakpointHintIcon="codicon-"+f.debugBreakpointHint.id,this._debugStackframe="codicon-"+f.debugStackframe.id,this._debugStackframeFocused="codicon-"+f.debugStackframeFocused.id}renderTemplate(x){x.style.alignSelf="flex-end";const H=(0,p.append)(x,(0,p.$)(".disassembly-view"));H.classList.add("codicon"),H.style.display="flex",H.style.alignItems="center",H.style.justifyContent="center",H.style.height=this._disassemblyView.fontInfo.lineHeight+"px";const W={element:void 0},U=[this._disassemblyView.onDidChangeStackFrame(()=>this.rerenderDebugStackframe(H,W.element)),(0,p.addStandardDisposableListener)(x,"mouseover",()=>{W.element?.allowBreakpoint&&H.classList.add(this._breakpointHintIcon)}),(0,p.addStandardDisposableListener)(x,"mouseout",()=>{W.element?.allowBreakpoint&&H.classList.remove(this._breakpointHintIcon)}),(0,p.addStandardDisposableListener)(x,"click",()=>{W.element?.allowBreakpoint&&(H.classList.add(this._breakpointHintIcon),W.element.isBreakpointSet?this._debugService.removeInstructionBreakpoints(W.element.instruction.address):W.element.allowBreakpoint&&!W.element.isBreakpointSet&&this._debugService.addInstructionBreakpoint(W.element.instruction.address,0))})];return{currentElement:W,icon:H,disposables:U}}renderElement(x,H,W,U){W.currentElement.element=x,this.rerenderDebugStackframe(W.icon,x)}disposeTemplate(x){(0,l.dispose)(x.disposables),x.disposables=[]}rerenderDebugStackframe(x,H){H?.instruction.address===this._disassemblyView.focusedCurrentInstructionAddress?x.classList.add(this._debugStackframe):H?.instruction.address===this._disassemblyView.focusedInstructionAddress?x.classList.add(this._debugStackframeFocused):(x.classList.remove(this._debugStackframe),x.classList.remove(this._debugStackframeFocused)),x.classList.remove(this._breakpointHintIcon),H?.isBreakpointSet?H.isBreakpointEnabled?(x.classList.add(this._breakpointIcon),x.classList.remove(this._breakpointDisabledIcon)):(x.classList.remove(this._breakpointIcon),x.classList.add(this._breakpointDisabledIcon)):(x.classList.remove(this._breakpointIcon),x.classList.remove(this._breakpointDisabledIcon))}};N.TEMPLATE_ID="breakpoint",N=we([F(1,i.IDebugService)],N);let P=class mn extends l.Disposable{constructor(x,H,W,U,$){super(),this._disassemblyView=x,this.editorService=W,this.textModelService=U,this.uriService=$,this.templateId=mn.TEMPLATE_ID,this._topStackFrameColor=H.getColorTheme().getColor(d.topStackFrameColor),this._focusedStackFrameColor=H.getColorTheme().getColor(d.focusedStackFrameColor),this._register(H.onDidColorThemeChange(q=>{this._topStackFrameColor=q.getColor(d.topStackFrameColor),this._focusedStackFrameColor=q.getColor(d.focusedStackFrameColor)}))}renderTemplate(x){const H=(0,p.append)(x,(0,p.$)(".sourcecode")),W=(0,p.append)(x,(0,p.$)(".instruction"));this.applyFontInfo(H),this.applyFontInfo(W);const U={element:void 0},$=[],q=[this._disassemblyView.onDidChangeStackFrame(()=>this.rerenderBackground(W,H,U.element)),(0,p.addStandardDisposableListener)(H,"dblclick",()=>this.openSourceCode(U.element?.instruction))];return{currentElement:U,instruction:W,sourcecode:H,cellDisposable:$,disposables:q}}renderElement(x,H,W,U){this.renderElementInner(x,H,W,U)}async renderElementInner(x,H,W,U){W.currentElement.element=x;const $=x.instruction;W.sourcecode.innerText="";const q=new c.StringBuilder(1e3);if(this._disassemblyView.isSourceCodeRender&&$.location?.path&&$.line){const G=this.getUriFromSource($);if(G){let Q;const j=new c.StringBuilder(1e4),K=await this.textModelService.createModelReference(G);if(Q=K.object.textEditorModel,W.cellDisposable.push(K),Q&&W.currentElement.element===x){let Y=$.line;for(;Y&&Y>=1&&Y<=Q.getLineCount();){const ee=Q.getLineContent(Y);if(j.appendString(` ${Y}: `),j.appendString(ee+` `),$.endLine&&Y<$.endLine){Y++;continue}break}W.sourcecode.innerText=j.build()}}}let X=10;if($.address!=="-1"){q.appendString($.address),$.address.length<mn.INSTRUCTION_ADDR_MIN_LENGTH&&(X=mn.INSTRUCTION_ADDR_MIN_LENGTH-$.address.length);for(let G=0;G<X;G++)q.appendString(" ")}if($.instructionBytes){q.appendString($.instructionBytes),X=10,$.instructionBytes.length<mn.INSTRUCTION_BYTES_MIN_LENGTH&&(X=mn.INSTRUCTION_BYTES_MIN_LENGTH-$.instructionBytes.length);for(let G=0;G<X;G++)q.appendString(" ")}q.appendString($.instruction),W.instruction.innerText=q.build(),this.rerenderBackground(W.instruction,W.sourcecode,x)}disposeElement(x,H,W,U){(0,l.dispose)(W.cellDisposable),W.cellDisposable=[]}disposeTemplate(x){(0,l.dispose)(x.disposables),x.disposables=[]}rerenderBackground(x,H,W){W&&this._disassemblyView.currentInstructionAddresses.includes(W.instruction.address)?x.style.background=this._topStackFrameColor?.toString()||"transparent":W?.instruction.address===this._disassemblyView.focusedInstructionAddress?x.style.background=this._focusedStackFrameColor?.toString()||"transparent":x.style.background="transparent"}openSourceCode(x){if(x){const H=this.getUriFromSource(x),W=x.endLine?{startLineNumber:x.line,endLineNumber:x.endLine,startColumn:x.column||1,endColumn:x.endColumn||1073741824}:{startLineNumber:x.line,endLineNumber:x.line,startColumn:x.column||1,endColumn:x.endColumn||1073741824};this.editorService.openEditor({resource:H,description:(0,A.localize)(2,null),options:{preserveFocus:!1,selection:W,revealIfOpened:!0,selectionRevealType:1,pinned:!1}})}}getUriFromSource(x){const H=x.location.path;return H&&(0,y.isUri)(H)?this.uriService.asCanonicalUri(D.URI.parse(H)):H&&(0,T.isAbsolute)(H)?this.uriService.asCanonicalUri(D.URI.file(H)):(0,h.getUriFromSource)(x.location,x.location.path,this._disassemblyView.debugSession.getId(),this.uriService)}applyFontInfo(x){(0,_.applyFontInfo)(x,this._disassemblyView.fontInfo),x.style.whiteSpace="pre"}};P.TEMPLATE_ID="instruction",P.INSTRUCTION_ADDR_MIN_LENGTH=25,P.INSTRUCTION_BYTES_MIN_LENGTH=30,P=we([F(1,r.IThemeService),F(2,o.IEditorService),F(3,m.ITextModelService),F(4,v.IUriIdentityService)],P);class B{getWidgetAriaLabel(){return(0,A.localize)(3,null)}getAriaLabel(x){let H="";const W=x.instruction;return W.address!=="-1"&&(H+=`${(0,A.localize)(4,null)}: ${W.address}`),W.instructionBytes&&(H+=`, ${(0,A.localize)(5,null)}: ${W.instructionBytes}`),H+=`, ${(0,A.localize)(6,null)}: ${W.instruction}`,H}}let V=class{constructor(x,H,W){W.bufferChangeEvents(()=>{this._languageSupportsDisassemleRequest=i.CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST.bindTo(W)});const U=()=>{this._onDidChangeModelLanguage&&(this._onDidChangeModelLanguage.dispose(),this._onDidChangeModelLanguage=void 0);const $=x.activeTextEditorControl;if((0,g.isCodeEditor)($)){const q=$.getModel()?.getLanguageId();this._languageSupportsDisassemleRequest?.set(!!q&&H.getAdapterManager().someDebuggerInterestedInLanguage(q)),this._onDidChangeModelLanguage=$.onDidChangeModelLanguage(X=>{this._languageSupportsDisassemleRequest?.set(H.getAdapterManager().someDebuggerInterestedInLanguage(X.newLanguage))})}else this._languageSupportsDisassemleRequest?.set(!1)};U(),this._onDidActiveEditorChangeListener=x.onDidActiveEditorChange(U)}dispose(){this._onDidActiveEditorChangeListener.dispose(),this._onDidChangeModelLanguage?.dispose()}};V=we([F(0,o.IEditorService),F(1,i.IDebugService),F(2,a.IContextKeyService)],V),e.DisassemblyViewContribution=V}),define(ae[2772],le([1,0,9,23,192,78,57]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugStorage=void 0;const E="debug.breakpoint",I="debug.functionbreakpoint",b="debug.databreakpoint",S="debug.exceptionbreakpoint",C="debug.watchexpressions",r="debug.chosenenvironment",u="debug.uxstate";let i=class{constructor(c,l,s){this.storageService=c,this.textFileService=l,this.uriIdentityService=s}loadDebugUxState(){return this.storageService.get(u,1,"default")}storeDebugUxState(c){this.storageService.store(u,c,1,0)}loadBreakpoints(){let c;try{c=JSON.parse(this.storageService.get(E,1,"[]")).map(l=>new R.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 c||[]}loadFunctionBreakpoints(){let c;try{c=JSON.parse(this.storageService.get(I,1,"[]")).map(l=>new R.FunctionBreakpoint(l.name,l.enabled,l.hitCondition,l.condition,l.logMessage))}catch{}return c||[]}loadExceptionBreakpoints(){let c;try{c=JSON.parse(this.storageService.get(S,1,"[]")).map(l=>new R.ExceptionBreakpoint(l.filter,l.label,l.enabled,l.supportsCondition,l.condition,l.description,l.conditionDescription))}catch{}return c||[]}loadDataBreakpoints(){let c;try{c=JSON.parse(this.storageService.get(b,1,"[]")).map(l=>new R.DataBreakpoint(l.description,l.dataId,!0,l.enabled,l.hitCondition,l.condition,l.logMessage,l.accessTypes,l.accessType))}catch{}return c||[]}loadWatchExpressions(){let c;try{c=JSON.parse(this.storageService.get(C,1,"[]")).map(l=>new R.Expression(l.name,l.id))}catch{}return c||[]}loadChosenEnvironments(){return JSON.parse(this.storageService.get(r,1,"{}"))}storeChosenEnvironments(c){this.storageService.store(r,JSON.stringify(c),1,0)}storeWatchExpressions(c){c.length?this.storageService.store(C,JSON.stringify(c.map(l=>({name:l.name,id:l.getId()}))),1,0):this.storageService.remove(C,1)}storeBreakpoints(c){const l=c.getBreakpoints();l.length?this.storageService.store(E,JSON.stringify(l),1,0):this.storageService.remove(E,1);const s=c.getFunctionBreakpoints();s.length?this.storageService.store(I,JSON.stringify(s),1,0):this.storageService.remove(I,1);const d=c.getDataBreakpoints().filter(a=>a.canPersist);d.length?this.storageService.store(b,JSON.stringify(d),1,0):this.storageService.remove(b,1);const n=c.getExceptionBreakpoints();n.length?this.storageService.store(S,JSON.stringify(n),1,0):this.storageService.remove(S,1)}};i=we([F(0,p.IStorageService),F(1,A.ITextFileService),F(2,k.IUriIdentityService)],i),e.DebugStorage=i}),define(ae[467],le([1,0,6,68,13,72,1635,192]),function(J,e,t,p,R,A,k,E){"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 b=0;const S=()=>`topReplElement:${b++}`;class C{constructor(d,n,a,o,g){this.session=d,this.id=n,this.value=a,this.severity=o,this.sourceData=g,this._count=1,this._onDidChangeCount=new t.Emitter}toString(d=!1){let n=this.value;for(let o=1;o<this.count;o++)n+=(n.endsWith(` `)?"":` `)+this.value;const a=this.sourceData&&d?` ${this.sourceData.source.name}`:"";return n+a}getId(){return this.id}set count(d){this._count=d,this._onDidChangeCount.fire()}get count(){return this._count}get onDidChangeCount(){return this._onDidChangeCount.event}}e.SimpleReplElement=C;class r{constructor(d,n,a,o,g){this.id=d,this.name=n,this.valueObj=a,this.sourceData=o,this.annotation=g}getId(){return this.id}get value(){return this.valueObj===null?"null":Array.isArray(this.valueObj)?`Array[${this.valueObj.length}]`:(0,R.isObject)(this.valueObj)?"Object":(0,R.isString)(this.valueObj)?`"${this.valueObj}"`:String(this.valueObj)||""}get hasChildren(){return Array.isArray(this.valueObj)&&this.valueObj.length>0||(0,R.isObject)(this.valueObj)&&Object.getOwnPropertyNames(this.valueObj).length>0}evaluateLazy(){throw new Error("Method not implemented.")}getChildren(){let d=[];return Array.isArray(this.valueObj)?d=this.valueObj.slice(0,r.MAX_CHILDREN).map((n,a)=>new r(`${this.id}:${a}`,String(a),n)):(0,R.isObject)(this.valueObj)&&(d=Object.getOwnPropertyNames(this.valueObj).slice(0,r.MAX_CHILDREN).map((n,a)=>new r(`${this.id}:${a}`,n,this.valueObj[n]))),Promise.resolve(d)}toString(){return`${this.name} ${this.value}`}}e.RawObjectReplElement=r,r.MAX_CHILDREN=1e3;class u{constructor(d){this.value=d,this.id=(0,A.generateUuid)()}toString(){return this.value}getId(){return this.id}}e.ReplEvaluationInput=u;class i extends E.ExpressionContainer{get available(){return this._available}constructor(){super(void 0,void 0,0,(0,A.generateUuid)()),this._available=!0}async evaluateExpression(d,n,a,o){const g=await super.evaluateExpression(d,n,a,o);return this._available=g,g}toString(){return`${this.value}`}}e.ReplEvaluationResult=i;class f{constructor(d,n,a){this.name=d,this.autoExpand=n,this.sourceData=a,this.children=[],this.ended=!1,this.id=`replGroup:${f.COUNTER++}`}get hasChildren(){return!0}getId(){return this.id}toString(d=!1){const n=d&&this.sourceData?` ${this.sourceData.source.name}`:"";return this.name+n}addChild(d){const n=this.children.length?this.children[this.children.length-1]:void 0;n instanceof f&&!n.hasEnded?n.addChild(d):this.children.push(d)}getChildren(){return this.children}end(){const d=this.children.length?this.children[this.children.length-1]:void 0;d instanceof f&&!d.hasEnded?d.end():this.ended=!0}get hasEnded(){return this.ended}}e.ReplGroup=f,f.COUNTER=0;function c(s,d){return!s&&!d?!0:s&&d?s.column===d.column&&s.lineNumber===d.lineNumber&&s.source.uri.toString()===d.source.uri.toString():!1}class l{constructor(d){this.configurationService=d,this.replElements=[],this._onDidChangeElements=new t.Emitter,this.onDidChangeElements=this._onDidChangeElements.event}getReplElements(){return this.replElements}async addReplExpression(d,n,a){this.addReplElement(new u(a));const o=new i;await o.evaluateExpression(a,d,n,"repl"),this.addReplElement(o)}appendToRepl(d,n,a,o){const g="\x1B[2J";if(typeof n=="string"&&n.indexOf(g)>=0&&(this.removeReplExpressions(),this.appendToRepl(d,k.localize(0,null),p.default.Ignore),n=n.substring(n.lastIndexOf(g)+g.length)),typeof n=="string"){const h=this.replElements.length?this.replElements[this.replElements.length-1]:void 0;if(h instanceof C&&h.severity===a){const m=this.configurationService.getValue("debug");if(h.value===n&&c(h.sourceData,o)&&m.console.collapseIdenticalLines){h.count++;return}if(!h.value.endsWith(` `)&&!h.value.endsWith(`\r `)&&h.count===1){this.replElements[this.replElements.length-1]=new C(d,S(),h.value+n,a,o),this._onDidChangeElements.fire();return}}const v=new C(d,S(),n,a,o);this.addReplElement(v)}else n.severity=a,n.sourceData=o,this.addReplElement(n)}startGroup(d,n,a){const o=new f(d,n,a);this.addReplElement(o)}endGroup(){const d=this.replElements[this.replElements.length-1];d instanceof f&&d.end()}addReplElement(d){const n=this.replElements.length?this.replElements[this.replElements.length-1]:void 0;n instanceof f&&!n.hasEnded?n.addChild(d):(this.replElements.push(d),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(ae[397],le([1,0,10,79,250,211,29,96,154,2,1589,37,73,12,87,192,467]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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 l=/^(true|false)$/i,s=/^(['"]).*\1$/,d=t.$;function n(h){const v=d(".");return v.classList.add("debug-view-content"),h.appendChild(v),v}e.renderViewTree=n;function a(h,v,m){let w=typeof h=="string"?h:h.value;if(v.className="value",w===null||(h instanceof f.Expression||h instanceof f.Variable||h instanceof c.ReplEvaluationResult)&&!h.available?(v.classList.add("unavailable"),w!==f.Expression.DEFAULT_VALUE&&v.classList.add("error")):(h instanceof f.ExpressionContainer&&m.showChanged&&h.valueChanged&&w!==f.Expression.DEFAULT_VALUE&&(v.className="value changed",h.valueChanged=!1),m.colorize&&typeof h!="string"&&(h.type==="number"||h.type==="boolean"||h.type==="string"?v.classList.add(h.type):isNaN(+w)?l.test(w)?v.classList.add("boolean"):s.test(w)&&v.classList.add("string"):v.classList.add("number"))),m.maxValueLength&&w&&w.length>m.maxValueLength&&(w=w.substring(0,m.maxValueLength)+"..."),w||(w=""),m.linkDetector){v.textContent="";const D=h instanceof f.ExpressionContainer?h.getSession():void 0;v.appendChild(m.linkDetector.linkify(w,!1,D?D.root:void 0))}else v.textContent=w;m.showHover&&(v.title=w||"")}e.renderExpressionValue=a;function o(h,v,m,w,D){if(h.available){let y=h.name;h.value&&typeof h.name=="string"&&(y+=":"),v.label.set(y,w,h.type?h.type:h.name),v.name.classList.toggle("virtual",h.presentationHint?.kind==="virtual"),v.name.classList.toggle("internal",h.presentationHint?.visibility==="internal")}else h.value&&typeof h.name=="string"&&h.name&&v.label.set(":");v.expression.classList.toggle("lazy",!!h.presentationHint?.lazy),a(h,v.value,{showChanged:m,maxValueLength:e.MAX_VALUE_RENDER_LENGTH_IN_VIEWLET,showHover:!0,colorize:!0,linkDetector:D})}e.renderVariable=o;let g=class{constructor(v,m,w){this.debugService=v,this.contextViewService=m,this.themeService=w}renderTemplate(v){const m=t.append(v,d(".expression")),w=t.append(m,d("span.name")),D=t.append(m,d("span.lazy-button"));D.classList.add(...k.Codicon.eye.classNamesArray),D.title=(0,S.localize)(0,null);const y=t.append(m,d("span.value")),T=new R.HighlightedLabel(w),_=t.append(m,d(".inputBoxContainer")),L=new b.DisposableStore;let M;this.renderActionBar&&(t.append(m,d(".span.actionbar-spacer")),M=L.add(new p.ActionBar(m)));const O={expression:m,name:w,value:y,label:T,inputBoxContainer:_,actionBar:M,elementDisposable:[],templateDisposable:L,lazyButton:D,currentElement:void 0};return L.add(t.addDisposableListener(D,t.EventType.CLICK,()=>{O.currentElement&&this.debugService.getViewModel().evaluateLazyExpression(O.currentElement)})),O}renderElement(v,m,w){const{element:D}=v;w.currentElement=D,this.renderExpression(D,w,(0,E.createMatches)(v.filterData)),w.actionBar&&this.renderActionBar(w.actionBar,D,w);const y=this.debugService.getViewModel().getSelectedExpression();if(D===y?.expression||D instanceof f.Variable&&D.errorMessage){const T=this.getInputBoxOptions(D,!!y?.settingWatch);T&&w.elementDisposable.push(this.renderInputBox(w.name,w.value,w.inputBoxContainer,T))}}renderInputBox(v,m,w,D){v.style.display="none",m.style.display="none",w.style.display="initial";const y=new A.InputBox(w,this.contextViewService,D),T=(0,r.attachInputBoxStyler)(y,this.themeService);y.value=D.initialValue,y.focus(),y.select();const _=(0,I.once)((M,O)=>{v.style.display="",m.style.display="",w.style.display="none";const N=y.value;(0,b.dispose)(L),O&&(this.debugService.getViewModel().setSelectedExpression(void 0,!1),D.onFinish(N,M))}),L=[y,t.addStandardDisposableListener(y.inputElement,t.EventType.KEY_DOWN,M=>{const O=M.equals(9),N=M.equals(3);(O||N)&&(M.preventDefault(),M.stopPropagation(),_(N,!0))}),t.addDisposableListener(y.inputElement,t.EventType.BLUR,()=>{_(!0,!0)}),t.addDisposableListener(y.inputElement,t.EventType.CLICK,M=>{M.preventDefault(),M.stopPropagation()}),T];return(0,b.toDisposable)(()=>{_(!1,!1)})}disposeElement(v,m,w){(0,b.dispose)(w.elementDisposable),w.elementDisposable=[]}disposeTemplate(v){(0,b.dispose)(v.elementDisposable),v.templateDisposable.dispose()}};g=we([F(0,i.IDebugService),F(1,C.IContextViewService),F(2,u.IThemeService)],g),e.AbstractExpressionsRenderer=g}),define(ae[2773],le([1,0,110,16,11,32,21,6,130,2,52,14,18,68,72,1608,8,5,26,46,27,57,34,2305,87,192,539,246,467,51,74,69,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugSession=void 0;let M=class{constructor(N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee){this.id=N,this._configuration=P,this.root=B,this.model=V,this.debugService=x,this.telemetryService=H,this.hostService=W,this.configurationService=U,this.paneCompositeService=$,this.workspaceContextService=q,this.productService=X,this.notificationService=G,this.uriIdentityService=j,this.instantiationService=K,this.customEndpointTelemetryService=Y,this.workbenchEnvironmentService=ee,this.initialized=!1,this.sources=new Map,this.threads=new Map,this.threadIds=[],this.cancellationMap=new Map,this.rawListeners=[],this.stoppedDetails=[],this._onDidChangeState=new E.Emitter,this._onDidEndAdapter=new E.Emitter,this._onDidLoadedSource=new E.Emitter,this._onDidCustomEvent=new E.Emitter,this._onDidProgressStart=new E.Emitter,this._onDidProgressUpdate=new E.Emitter,this._onDidProgressEnd=new E.Emitter,this._onDidInvalidMemory=new E.Emitter,this._onDidChangeREPLElements=new E.Emitter,this._onDidChangeName=new E.Emitter,this._options=z||{},this.hasSeparateRepl()?this.repl=new D.ReplModel(this.configurationService):this.repl=this.parentSession.repl;const ie=[];ie.push(this.repl.onDidChangeElements(()=>this._onDidChangeREPLElements.fire())),Q&&ie.push(Q.onWillShutdown(()=>{this.shutdown(),(0,b.dispose)(ie)}));const re=this._options.compoundRoot;re&&ie.push(re.onDidSessionStop(()=>this.terminate())),this.passFocusScheduler=new R.RunOnceScheduler(()=>{if(this.debugService.getModel().getSessions().some(oe=>oe.state===2)||this.getAllThreads().some(oe=>oe.stopped))if(typeof this.lastContinuedThreadId=="number"){const oe=this.debugService.getViewModel().focusedThread;if(oe&&oe.threadId===this.lastContinuedThreadId&&!oe.stopped){const se=this.getStoppedDetails()?.threadId,te=typeof se=="number"?this.getThread(se):void 0;this.debugService.focusStackFrame(void 0,te)}}else{const oe=this.debugService.getViewModel().focusedSession;oe&&oe.getId()===this.getId()&&oe.state!==2&&this.debugService.focusStackFrame(void 0)}},800)}getId(){return this.id}setSubId(N){this._subId=N}getMemory(N){return new v.MemoryRegion(N,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 saveBeforeRestart(){return this._options.saveBeforeRestart??!this._options?.parentSession}get compoundRoot(){return this._options.compoundRoot}get suppressDebugStatusbar(){return this._options.suppressDebugStatusbar??!1}get suppressDebugToolbar(){return this._options.suppressDebugToolbar??!1}get suppressDebugView(){return this._options.suppressDebugView??!1}get autoExpandLazyVariables(){return this.configurationService.getValue("debug").autoExpandLazyVariables}setConfiguration(N){this._configuration=N}getLabel(){return this.workspaceContextService.getWorkspace().folders.length>1&&this.root?`${this.name} (${r.basenameOrAuthority(this.root.uri)})`:this.name}setName(N){this._name=N,this._onDidChangeName.fire(N)}get name(){return this._name||this.configuration.name}get state(){if(!this.initialized)return 1;if(!this.raw)return 0;const N=this.debugService.getViewModel().focusedThread;return N&&N.session===this?N.stopped?2:3:this.getAllThreads().some(P=>P.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(N){this.raw&&await this.shutdown();try{const P=await N.createDebugAdapter(this);this.raw=this.instantiationService.createInstance(g.RawDebugSession,P,N,this.id,this.configuration.name),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,supportsArgsCanBeInterpretedByShell:!0}),this.initialized=!0,this._onDidChangeState.fire(),this.debugService.setExceptionBreakpoints(this.raw&&this.raw.capabilities.exceptionBreakpointFilters||[])}catch(P){throw this.initialized=!0,this._onDidChangeState.fire(),await this.shutdown(),P}}async launchOrAttach(N){if(!this.raw)throw new Error((0,f.localize)(0,null,"launch or attach"));if(this.parentSession&&this.parentSession.state===0)throw(0,k.canceled)();N.__sessionId=this.getId();try{await this.raw.launchOrAttach(N)}catch(P){throw this.shutdown(),P}}async terminate(N=!1){this.raw||this.onDidExitAdapter(),this.cancelAllRequests(),this._options.lifecycleManagedByParent&&this.parentSession?await this.parentSession.terminate(N):this.raw&&(this.raw.capabilities.supportsTerminateRequest&&this._configuration.resolved.request==="launch"?await this.raw.terminate(N):await this.raw.disconnect({restart:N,terminateDebuggee:!0})),N||this._options.compoundRoot?.sessionStopped()}async disconnect(N=!1,P=!1){this.raw||this.onDidExitAdapter(),this.cancelAllRequests(),this._options.lifecycleManagedByParent&&this.parentSession?await this.parentSession.disconnect(N,P):this.raw&&await this.raw.disconnect({restart:N,terminateDebuggee:!1,suspendDebuggee:P}),N||this._options.compoundRoot?.sessionStopped()}async restart(){if(!this.raw)throw new Error((0,f.localize)(1,null,"restart"));this.cancelAllRequests(),this._options.lifecycleManagedByParent&&this.parentSession?await this.parentSession.restart():await this.raw.restart({arguments:this.configuration})}async sendBreakpoints(N,P,B){if(!this.raw)throw new Error((0,f.localize)(2,null,"breakpoints"));if(!this.raw.readyForBreakpoints)return Promise.resolve(void 0);const V=this.getRawSource(N);P.length&&!V.adapterData&&(V.adapterData=P[0].adapterData),V.path&&(V.path=(0,I.normalizeDriveLetter)(V.path));const z=await this.raw.setBreakpoints({source:V,lines:P.map(x=>x.sessionAgnosticData.lineNumber),breakpoints:P.map(x=>({line:x.sessionAgnosticData.lineNumber,column:x.sessionAgnosticData.column,condition:x.condition,hitCondition:x.hitCondition,logMessage:x.logMessage})),sourceModified:B});if(z&&z.body){const x=new Map;for(let H=0;H<P.length;H++)x.set(P[H].getId(),z.body.breakpoints[H]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,x)}}async sendFunctionBreakpoints(N){if(!this.raw)throw new Error((0,f.localize)(3,null,"function breakpoints"));if(this.raw.readyForBreakpoints){const P=await this.raw.setFunctionBreakpoints({breakpoints:N});if(P&&P.body){const B=new Map;for(let V=0;V<N.length;V++)B.set(N[V].getId(),P.body.breakpoints[V]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,B)}}}async sendExceptionBreakpoints(N){if(!this.raw)throw new Error((0,f.localize)(4,null,"exception breakpoints"));if(this.raw.readyForBreakpoints){const P=this.capabilities.supportsExceptionFilterOptions?{filters:[],filterOptions:N.map(V=>V.condition?{filterId:V.filter,condition:V.condition}:{filterId:V.filter})}:{filters:N.map(V=>V.filter)},B=await this.raw.setExceptionBreakpoints(P);if(B&&B.body&&B.body.breakpoints){const V=new Map;for(let z=0;z<N.length;z++)V.set(N[z].getId(),B.body.breakpoints[z]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,V)}}}async dataBreakpointInfo(N,P){if(!this.raw)throw new Error((0,f.localize)(5,null,"data breakpoints info"));if(!this.raw.readyForBreakpoints)throw new Error((0,f.localize)(6,null));return(await this.raw.dataBreakpointInfo({name:N,variablesReference:P}))?.body}async sendDataBreakpoints(N){if(!this.raw)throw new Error((0,f.localize)(7,null,"data breakpoints"));if(this.raw.readyForBreakpoints){const P=await this.raw.setDataBreakpoints({breakpoints:N});if(P&&P.body){const B=new Map;for(let V=0;V<N.length;V++)B.set(N[V].getId(),P.body.breakpoints[V]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,B)}}}async sendInstructionBreakpoints(N){if(!this.raw)throw new Error((0,f.localize)(8,null,"instruction breakpoints"));if(this.raw.readyForBreakpoints){const P=await this.raw.setInstructionBreakpoints({breakpoints:N});if(P&&P.body){const B=new Map;for(let V=0;V<N.length;V++)B.set(N[V].getId(),P.body.breakpoints[V]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,B)}}}async breakpointsLocations(N,P){if(!this.raw)throw new Error((0,f.localize)(9,null,"breakpoints locations"));const B=this.getRawSource(N),V=await this.raw.breakpointLocations({source:B,line:P});if(!V||!V.body||!V.body.breakpoints)return[];const z=V.body.breakpoints.map(x=>({lineNumber:x.line,column:x.column||1}));return(0,p.distinct)(z,x=>`${x.lineNumber}:${x.column}`)}getDebugProtocolBreakpoint(N){return this.model.getDebugProtocolBreakpoint(N,this.getId())}customRequest(N,P){if(!this.raw)throw new Error((0,f.localize)(10,null,N));return this.raw.custom(N,P)}stackTrace(N,P,B,V){if(!this.raw)throw new Error((0,f.localize)(11,null,"stackTrace"));const z=this.getNewCancellationToken(N,V);return this.raw.stackTrace({threadId:N,startFrame:P,levels:B},z)}async exceptionInfo(N){if(!this.raw)throw new Error((0,f.localize)(12,null,"exceptionInfo"));const P=await this.raw.exceptionInfo({threadId:N});if(P)return{id:P.body.exceptionId,description:P.body.description,breakMode:P.body.breakMode,details:P.body.details}}scopes(N,P){if(!this.raw)throw new Error((0,f.localize)(13,null,"scopes"));const B=this.getNewCancellationToken(P);return this.raw.scopes({frameId:N},B)}variables(N,P,B,V,z){if(!this.raw)throw new Error((0,f.localize)(14,null,"variables"));const x=P?this.getNewCancellationToken(P):void 0;return this.raw.variables({variablesReference:N,filter:B,start:V,count:z},x)}evaluate(N,P,B){if(!this.raw)throw new Error((0,f.localize)(15,null,"evaluate"));return this.raw.evaluate({expression:N,frameId:P,context:B})}async restartFrame(N,P){if(!this.raw)throw new Error((0,f.localize)(16,null,"restartFrame"));await this.raw.restartFrame({frameId:N},P)}setLastSteppingGranularity(N,P){const B=this.getThread(N);B&&(B.lastSteppingGranularity=P)}async next(N,P){if(!this.raw)throw new Error((0,f.localize)(17,null,"next"));this.setLastSteppingGranularity(N,P),await this.raw.next({threadId:N,granularity:P})}async stepIn(N,P,B){if(!this.raw)throw new Error((0,f.localize)(18,null,"stepIn"));this.setLastSteppingGranularity(N,B),await this.raw.stepIn({threadId:N,targetId:P,granularity:B})}async stepOut(N,P){if(!this.raw)throw new Error((0,f.localize)(19,null,"stepOut"));this.setLastSteppingGranularity(N,P),await this.raw.stepOut({threadId:N,granularity:P})}async stepBack(N,P){if(!this.raw)throw new Error((0,f.localize)(20,null,"stepBack"));this.setLastSteppingGranularity(N,P),await this.raw.stepBack({threadId:N,granularity:P})}async continue(N){if(!this.raw)throw new Error((0,f.localize)(21,null,"continue"));await this.raw.continue({threadId:N})}async reverseContinue(N){if(!this.raw)throw new Error((0,f.localize)(22,null,"reverse continue"));await this.raw.reverseContinue({threadId:N})}async pause(N){if(!this.raw)throw new Error((0,f.localize)(23,null,"pause"));await this.raw.pause({threadId:N})}async terminateThreads(N){if(!this.raw)throw new Error((0,f.localize)(24,null,"terminateThreads"));await this.raw.terminateThreads({threadIds:N})}setVariable(N,P,B){if(!this.raw)throw new Error((0,f.localize)(25,null,"setVariable"));return this.raw.setVariable({variablesReference:N,name:P,value:B})}setExpression(N,P,B){if(!this.raw)throw new Error((0,f.localize)(26,null,"setExpression"));return this.raw.setExpression({expression:P,value:B,frameId:N})}gotoTargets(N,P,B){if(!this.raw)throw new Error((0,f.localize)(27,null,"gotoTargets"));return this.raw.gotoTargets({source:N,line:P,column:B})}goto(N,P){if(!this.raw)throw new Error((0,f.localize)(28,null,"goto"));return this.raw.goto({threadId:N,targetId:P})}loadSource(N){if(!this.raw)return Promise.reject(new Error((0,f.localize)(29,null,"loadSource")));const P=this.getSourceForUri(N);let B;if(P)B=P.raw;else{const V=m.Source.getEncodedDebugData(N);B={path:V.path,sourceReference:V.sourceReference}}return this.raw.source({sourceReference:B.sourceReference||0,source:B})}async getLoadedSources(){if(!this.raw)return Promise.reject(new Error((0,f.localize)(30,null,"getLoadedSources")));const N=await this.raw.loadedSources({});return N&&N.body&&N.body.sources?N.body.sources.map(P=>this.getSource(P)):[]}async completions(N,P,B,V,z,x){if(!this.raw)return Promise.reject(new Error((0,f.localize)(31,null,"completions")));const H=this.getNewCancellationToken(P,x);return this.raw.completions({frameId:N,text:B,column:V.column,line:V.lineNumber},H)}async stepInTargets(N){return this.raw?(await this.raw.stepInTargets({frameId:N}))?.body.targets:Promise.reject(new Error((0,f.localize)(32,null,"stepInTargets")))}async cancel(N){return this.raw?this.raw.cancel({progressId:N}):Promise.reject(new Error((0,f.localize)(33,null,"cancel")))}async disassemble(N,P,B,V){return this.raw?(await this.raw.disassemble({memoryReference:N,offset:P,instructionOffset:B,instructionCount:V,resolveSymbols:!0}))?.body?.instructions:Promise.reject(new Error((0,f.localize)(34,null,"disassemble")))}readMemory(N,P,B){return this.raw?this.raw.readMemory({count:B,memoryReference:N,offset:P}):Promise.reject(new Error((0,f.localize)(35,null,"readMemory")))}writeMemory(N,P,B,V){return this.raw?this.raw.writeMemory({memoryReference:N,offset:P,allowPartial:V,data:B}):Promise.reject(new Error((0,f.localize)(36,null,"disassemble")))}getThread(N){return this.threads.get(N)}getAllThreads(){const N=[];return this.threadIds.forEach(P=>{const B=this.threads.get(P);B&&N.push(B)}),N}clearThreads(N,P=void 0){if(P!=null){const B=this.threads.get(P);B&&(B.clearCallStack(),B.stoppedDetails=void 0,B.stopped=!1,N&&this.threads.delete(P))}else this.threads.forEach(B=>{B.clearCallStack(),B.stoppedDetails=void 0,B.stopped=!1}),N&&(this.threads.clear(),this.threadIds=[],v.ExpressionContainer.allValues.clear())}getStoppedDetails(){return this.stoppedDetails.length>=1?this.stoppedDetails[0]:void 0}rawUpdate(N){this.threadIds=[],N.threads.forEach(B=>{if(this.threadIds.push(B.id),!this.threads.has(B.id))this.threads.set(B.id,new v.Thread(this,B.name,B.id));else if(B.name){const V=this.threads.get(B.id);V&&(V.name=B.name)}}),this.threads.forEach(B=>{this.threadIds.indexOf(B.threadId)===-1&&this.threads.delete(B.threadId)});const P=N.stoppedDetails;if(P)if(P.allThreadsStopped)this.threads.forEach(B=>{B.stoppedDetails=B.threadId===P.threadId?P:{reason:void 0},B.stopped=!0,B.clearCallStack()});else{const B=typeof P.threadId=="number"?this.threads.get(P.threadId):void 0;B&&(B.stoppedDetails=P,B.clearCallStack(),B.stopped=!0)}}async fetchThreads(N){if(this.raw){const P=await this.raw.threads();P&&P.body&&P.body.threads&&this.model.rawUpdate({sessionId:this.getId(),threads:P.body.threads,stoppedDetails:N})}}initializeForTest(N){this.raw=N,this.registerListeners()}registerListeners(){if(!this.raw)return;this.rawListeners.push(this.raw.onDidInitialize(async()=>{t.status((0,f.localize)(37,null));const P=async()=>{if(this.raw&&this.raw.capabilities.supportsConfigurationDoneRequest)try{await this.raw.configurationDone()}catch(B){this.notificationService.error(B),this.raw?.disconnect({})}};try{await this.debugService.sendAllBreakpoints(this)}finally{await P(),await this.fetchThreads()}})),this.rawListeners.push(this.raw.onDidStop(async P=>{this.passFocusScheduler.cancel(),this.stoppedDetails.push(P.body),await this.fetchThreads(P.body);const B=this.debugService.getViewModel().focusedThread,V=B!==void 0&&B.session===this&&!this.threads.has(B.threadId);V&&this.debugService.focusStackFrame(void 0,void 0);const z=typeof P.body.threadId=="number"?this.getThread(P.body.threadId):void 0;if(z){const x=this.model.refreshTopOfCallstack(z),H=async()=>{if(V||!P.body.preserveFocusHint&&z.getCallStack().length){const U=this.debugService.getViewModel().focusedStackFrame;if(!U||U.thread.session===this){const $=!this.configurationService.getValue("debug").focusEditorOnBreak;await this.debugService.focusStackFrame(void 0,z,void 0,{preserveFocus:$})}z.stoppedDetails&&(z.stoppedDetails.reason==="breakpoint"&&this.configurationService.getValue("debug").openDebug==="openOnDebugBreak"&&!this.suppressDebugView&&await this.paneCompositeService.openPaneComposite(h.VIEWLET_ID,0),this.configurationService.getValue("debug").focusWindowOnBreak&&!this.workbenchEnvironmentService.extensionTestsLocationURI&&await this.hostService.focus({force:!0}))}};await x.topCallStack,H(),await x.wholeCallStack;const W=this.debugService.getViewModel().focusedStackFrame;(!W||!W.source||W.source.presentationHint==="deemphasize"||W.presentationHint==="deemphasize")&&H()}this._onDidChangeState.fire()})),this.rawListeners.push(this.raw.onDidThread(P=>{if(P.body.reason==="started")this.fetchThreadsScheduler||(this.fetchThreadsScheduler=new R.RunOnceScheduler(()=>{this.fetchThreads()},100),this.rawListeners.push(this.fetchThreadsScheduler)),this.fetchThreadsScheduler.isScheduled()||this.fetchThreadsScheduler.schedule();else if(P.body.reason==="exited"){this.model.clearThreads(this.getId(),!0,P.body.threadId);const B=this.debugService.getViewModel(),V=B.focusedThread;this.passFocusScheduler.cancel(),V&&P.body.threadId===V.threadId&&this.debugService.focusStackFrame(void 0,void 0,B.focusedSession,{explicit:!1})}})),this.rawListeners.push(this.raw.onDidTerminateDebugee(async P=>{t.status((0,f.localize)(38,null)),P.body&&P.body.restart?await this.debugService.restartSession(this,P.body.restart):this.raw&&await this.raw.disconnect({terminateDebuggee:!1})})),this.rawListeners.push(this.raw.onDidContinued(P=>{const B=P.body.allThreadsContinued!==!1?void 0:P.body.threadId;if(typeof B=="number"){this.stoppedDetails=this.stoppedDetails.filter(z=>z.threadId!==B);const V=this.cancellationMap.get(B);this.cancellationMap.delete(B),V?.forEach(z=>z.cancel())}else this.stoppedDetails=[],this.cancelAllRequests();this.lastContinuedThreadId=B,this.passFocusScheduler.schedule(),this.model.clearThreads(this.getId(),!1,B),this._onDidChangeState.fire()}));const N=new R.Queue;this.rawListeners.push(this.raw.onDidOutput(async P=>{if(P.body.variablesReference){const B=P.body.source&&P.body.line?{lineNumber:P.body.line,column:P.body.column?P.body.column:1,source:this.getSource(P.body.source)}:void 0,z=new v.ExpressionContainer(this,void 0,P.body.variablesReference,(0,i.generateUuid)()).getChildren();N.queue(async()=>{(await z).forEach(H=>{H.name=null,this.appendToRepl(H,u.default.Info,P.body.category==="important",B)})});return}N.queue(async()=>{if(!P.body||!this.raw)return;const B=P.body.category==="stderr"?u.default.Error:P.body.category==="console"?u.default.Warning:u.default.Info;if(P.body.category==="telemetry"){const z=this.raw.dbgr.getCustomTelemetryEndpoint();if(z&&this.telemetryService.telemetryLevel.value!==0){let x=P.body.data;!z.sendErrorTelemetry&&P.body.data&&(x=(0,w.filterExceptionsFromTelemetry)(P.body.data)),this.customEndpointTelemetryService.publicLog(z,P.body.output,x)}return}const V=P.body.source&&P.body.line?{lineNumber:P.body.line,column:P.body.column?P.body.column:1,source:this.getSource(P.body.source)}:void 0;if(P.body.group==="start"||P.body.group==="startCollapsed"){const z=P.body.group==="start";this.repl.startGroup(P.body.output||"",z,V);return}P.body.group==="end"&&(this.repl.endGroup(),!P.body.output)||typeof P.body.output=="string"&&this.appendToRepl(P.body.output,B,P.body.category==="important",V)})})),this.rawListeners.push(this.raw.onDidBreakpoint(P=>{const B=P.body&&P.body.breakpoint?P.body.breakpoint.id:void 0,V=this.model.getBreakpoints().find(W=>W.getIdFromAdapter(this.getId())===B),z=this.model.getFunctionBreakpoints().find(W=>W.getIdFromAdapter(this.getId())===B),x=this.model.getDataBreakpoints().find(W=>W.getIdFromAdapter(this.getId())===B),H=this.model.getExceptionBreakpoints().find(W=>W.getIdFromAdapter(this.getId())===B);if(P.body.reason==="new"&&P.body.breakpoint.source&&P.body.breakpoint.line){const W=this.getSource(P.body.breakpoint.source),U=this.model.addBreakpoints(W.uri,[{column:P.body.breakpoint.column,enabled:!0,lineNumber:P.body.breakpoint.line}],!1);if(U.length===1){const $=new Map([[U[0].getId(),P.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,$)}}if(P.body.reason==="removed"&&(V&&this.model.removeBreakpoints([V]),z&&this.model.removeFunctionBreakpoints(z.getId()),x&&this.model.removeDataBreakpoints(x.getId())),P.body.reason==="changed"){if(V){V.column||(P.body.breakpoint.column=void 0);const W=new Map([[V.getId(),P.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,W)}if(z){const W=new Map([[z.getId(),P.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,W)}if(x){const W=new Map([[x.getId(),P.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,W)}if(H){const W=new Map([[H.getId(),P.body.breakpoint]]);this.model.setBreakpointSessionData(this.getId(),this.capabilities,W)}}})),this.rawListeners.push(this.raw.onDidLoadedSource(P=>{this._onDidLoadedSource.fire({reason:P.body.reason,source:this.getSource(P.body.source)})})),this.rawListeners.push(this.raw.onDidCustomEvent(P=>{this._onDidCustomEvent.fire(P)})),this.rawListeners.push(this.raw.onDidProgressStart(P=>{this._onDidProgressStart.fire(P)})),this.rawListeners.push(this.raw.onDidProgressUpdate(P=>{this._onDidProgressUpdate.fire(P)})),this.rawListeners.push(this.raw.onDidProgressEnd(P=>{this._onDidProgressEnd.fire(P)})),this.rawListeners.push(this.raw.onDidInvalidateMemory(P=>{this._onDidInvalidMemory.fire(P)})),this.rawListeners.push(this.raw.onDidInvalidated(async P=>{P.body.areas&&P.body.areas.length===1&&(P.body.areas[0]==="variables"||P.body.areas[0]==="watch")||(this.cancelAllRequests(),this.model.clearThreads(this.getId(),!0),await this.fetchThreads(this.getStoppedDetails()));const B=this.debugService.getViewModel();B.focusedSession===this&&B.updateViews()})),this.rawListeners.push(this.raw.onDidExitAdapter(P=>this.onDidExitAdapter(P)))}onDidExitAdapter(N){this.initialized=!0,this.model.setBreakpointSessionData(this.getId(),this.capabilities,void 0),this.shutdown(),this._onDidEndAdapter.fire(N)}shutdown(){(0,b.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(N){return this.sources.get(this.uriIdentityService.asCanonicalUri(N).toString())}getSource(N){let P=new m.Source(N,this.getId(),this.uriIdentityService);const B=P.uri.toString(),V=this.sources.get(B);return V?(P=V,P.raw=(0,S.mixin)(P.raw,N),P.raw&&N&&(P.raw.presentationHint=N.presentationHint)):this.sources.set(B,P),P}getRawSource(N){const P=this.getSourceForUri(N);if(P)return P.raw;{const B=m.Source.getEncodedDebugData(N);return{name:B.name,path:B.path,sourceReference:B.sourceReference}}}getNewCancellationToken(N,P){const B=new A.CancellationTokenSource(P),V=this.cancellationMap.get(N)||[];return V.push(B),this.cancellationMap.set(N,V),B.token}cancelAllRequests(){this.cancellationMap.forEach(N=>N.forEach(P=>P.cancel())),this.cancellationMap.clear()}getReplElements(){return this.repl.getReplElements()}hasSeparateRepl(){return!this.parentSession||this._options.repl!=="mergeWithParent"}removeReplExpressions(){this.repl.removeReplExpressions()}async addReplExpression(N,P){await this.repl.addReplExpression(this,N,P),this.debugService.getViewModel().updateViews()}appendToRepl(N,P,B,V){this.repl.appendToRepl(this,N,P,V),B&&this.notificationService.notify({message:N.toString(),severity:P,source:this.name})}};M=we([F(5,h.IDebugService),F(6,n.ITelemetryService),F(7,T.IHostService),F(8,c.IConfigurationService),F(9,L.IPaneCompositePartService),F(10,o.IWorkspaceContextService),F(11,d.IProductService),F(12,s.INotificationService),F(13,_.ILifecycleService),F(14,a.IUriIdentityService),F(15,l.IInstantiationService),F(16,n.ICustomEndpointTelemetryService),F(17,y.IWorkbenchEnvironmentService)],M),e.DebugSession=M}),define(ae[2774],le([1,0,1617,53,129,37,38,5,8,397,87,34,7,130,14,9,28,11,218,19,24,76,2,96,912,49,45,41,12,27,107,305]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LoadedScriptsView=void 0;const L=!0,M=/^[a-zA-Z][a-zA-Z0-9\+\-\.]+:/;class O{constructor(q,X,G=!1){this._parent=q,this._label=X,this.isIncompressible=G,this._children=new Map,this._showedMoreThanOne=!1}updateLabel(q){this._label=q}isLeaf(){return this._children.size===0}getSession(){if(this._parent)return this._parent.getSession()}setSource(q,X){if(this._source=X,this._children.clear(),X.raw&&X.raw.sources){for(const G of X.raw.sources)if(G.name&&G.path){const Q=new O(this,G.name);this._children.set(G.path,Q);const j=q.getSource(G);Q.setSource(q,j)}}}createIfNeeded(q,X){let G=this._children.get(q);return G||(G=X(this,q),this._children.set(q,G)),G}getChild(q){return this._children.get(q)}remove(q){this._children.delete(q)}removeFromParent(){this._parent&&(this._parent.remove(this._label),this._parent._children.size===0&&this._parent.removeFromParent())}getTemplateId(){return"id"}getId(){const q=this.getParent();return q?`${q.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 q=this.oneChild();return q?q.hasChildren():this._children.size>0}getChildren(){const q=this.oneChild();if(q)return q.getChildren();const X=[];for(const G of this._children.values())X.push(G);return X.sort((G,Q)=>this.compare(G,Q))}getLabel(q=!0){const X=this.oneChild();if(X){const G=this instanceof N&&q?" \u2022 ":p.posix.sep;return`${this._label}${G}${X.getLabel()}`}return this._label}getHoverLabel(){if(this._source&&this._parent&&this._parent._source)return this._source.raw.path||this._source.raw.name;const q=this.getLabel(!1),X=this.getParent();if(X){const G=X.getHoverLabel();if(G)return`${G}/${q}`}return q}getSource(){const q=this.oneChild();return q?q.getSource():this._source}compare(q,X){return q._label&&X._label?q._label.localeCompare(X._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 L?this instanceof P:!(this instanceof N)&&!(this instanceof B)}}class N extends O{constructor(q,X){super(q,X.name,!0),this.folder=X}}class P extends O{constructor(q,X,G){super(void 0,"Root"),this._pathService=q,this._contextService=X,this._labelService=G}add(q){return this.createIfNeeded(q.getId(),()=>new B(this._labelService,this,q,this._pathService,this._contextService))}find(q){return this.getChild(q.getId())}}class B extends O{constructor(q,X,G,Q,j){super(X,G.getLabel(),!0),this._pathService=Q,this.rootProvider=j,this._map=new Map,this._labelService=q,this._session=G}getInternalId(){return this._session.getId()}getSession(){return this._session}getHoverLabel(){}hasChildren(){return!0}compare(q,X){const G=this.category(q),Q=this.category(X);return G!==Q?G-Q:super.compare(q,X)}category(q){if(q instanceof N)return q.folder.index;const X=q.getLabel();return X&&/^<.+>$/.test(X)?1e3:999}async addPath(q){let X,G,Q=q.raw.path;if(!Q)return;this._labelService&&M.test(Q)&&(Q=this._labelService.getUriLabel(f.URI.parse(Q)));const j=B.URL_REGEXP.exec(Q);if(j&&j.length===3)G=j[1],Q=decodeURI(j[2]);else if((0,p.isAbsolute)(Q)){const Y=f.URI.file(Q);X=this.rootProvider?this.rootProvider.getWorkspaceFolder(Y):null,X?(Q=(0,p.normalize)((0,c.ltrim)(Y.path.substring(X.uri.path.length),p.posix.sep)),this.rootProvider.getWorkspace().folders.length>1?Q=p.posix.sep+Q:X=null):(Q=(0,p.normalize)(Q),i.isWindows?Q=(0,u.normalizeDriveLetter)(Q):Q=(0,u.tildify)(Q,(await this._pathService.userHome()).fsPath))}let K=this;Q.split(/[\/\\]/).forEach((Y,ee)=>{if(ee===0&&X){const ie=X;K=K.createIfNeeded(X.name,re=>new N(re,ie))}else ee===0&&G?K=K.createIfNeeded(G,ie=>new O(ie,G)):K=K.createIfNeeded(Y,ie=>new O(ie,Y))}),K.setSource(this._session,q),q.raw.path&&this._map.set(q.raw.path,K)}removePath(q){if(q.raw.path){const X=this._map.get(q.raw.path);if(X)return X.removeFromParent(),!0}return!1}}B.URL_REGEXP=/^(https?:\/\/[^/]+)(\/.*)$/;function V($,q){const X=$.getChildren(),G=q?!q.expanded.has($.getId()):!($ instanceof B);return{element:$,collapsed:G,collapsible:$.hasChildren(),children:X.map(Q=>V(Q,q))}}let z=class extends R.ViewPane{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne){super(q,G,X,K,ee,j,Q,te,Z,ne),this.editorService=Y,this.contextService=ie,this.debugService=re,this.labelService=oe,this.pathService=se,this.treeNeedsRefreshOnVisible=!1,this.loadedScriptsItemType=S.CONTEXT_LOADED_SCRIPTS_ITEM_TYPE.bindTo(ee)}renderBody(q){super.renderBody(q),this.element.classList.add("debug-pane"),q.classList.add("debug-loaded-scripts"),q.classList.add("show-file-icons"),this.treeContainer=(0,b.renderViewTree)(q),this.filter=new U;const X=new P(this.pathService,this.contextService,this.labelService);this.treeLabels=this.instantiationService.createInstance(s.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility}),this._register(this.treeLabels),this.tree=this.instantiationService.createInstance(a.WorkbenchCompressibleObjectTree,"LoadedScriptsView",this.treeContainer,new x,[new H(this.treeLabels)],{compressionEnabled:L,collapseByDefault:!0,hideTwistiesOfChildlessElements:!0,identityProvider:{getId:ee=>ee.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:ee=>ee.getLabel(),getCompressedNodeKeyboardNavigationLabel:ee=>ee.map(ie=>ie.getLabel()).join("/")},filter:this.filter,accessibilityProvider:new W,overrideStyles:{listBackground:this.getBackgroundColor()}});const G=ee=>this.tree.setChildren(null,V(X,ee).children);G(),this.changeScheduler=new l.RunOnceScheduler(()=>{this.treeNeedsRefreshOnVisible=!1,this.tree&&G()},300),this._register(this.changeScheduler),this._register(this.tree.onDidOpen(ee=>{if(ee.element instanceof O){const ie=ee.element.getSource();if(ie&&ie.available){const re={startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0};ie.openInEditor(this.editorService,re,ee.editorOptions.preserveFocus,ee.sideBySide,ee.editorOptions.pinned)}}})),this._register(this.tree.onDidChangeFocus(()=>{this.tree.getFocus()instanceof B?this.loadedScriptsItemType.set("session"):this.loadedScriptsItemType.reset()}));const Q=()=>{this.isBodyVisible()?this.changeScheduler.schedule():this.treeNeedsRefreshOnVisible=!0},j=async ee=>{if(ee.capabilities.supportsLoadedSourcesRequest){const ie=X.add(ee),re=await ee.getLoadedSources();for(const oe of re)await ie.addPath(oe);Q()}},K=ee=>{this._register(ee.onDidChangeName(async()=>{const ie=X.find(ee);ie&&(ie.updateLabel(ee.getLabel()),Q())})),this._register(ee.onDidLoadedSource(async ie=>{let re;switch(ie.reason){case"new":case"changed":re=X.add(ee),await re.addPath(ie.source),Q(),ie.reason==="changed"&&h.DebugContentProvider.refreshDebugContent(ie.source.uri);break;case"removed":re=X.find(ee),re&&re.removePath(ie.source)&&Q();break;default:this.filter.setFilter(ie.source.name),this.tree.refilter();break}}))};this._register(this.debugService.onDidNewSession(K)),this.debugService.getModel().getSessions().forEach(K),this._register(this.debugService.onDidEndSession(ee=>{X.remove(ee.getId()),this.changeScheduler.schedule()})),this.changeScheduler.schedule(0),this._register(this.onDidChangeBodyVisibility(ee=>{ee&&this.treeNeedsRefreshOnVisible&&this.changeScheduler.schedule()}));let Y;this._register(this.tree.onDidChangeFindPattern(ee=>{if(this.tree.findMode!==_.TreeFindMode.Highlight)if(!Y&&ee){const ie=new Set,re=oe=>{oe.element&&!oe.collapsed&&ie.add(oe.element.getId());for(const se of oe.children)re(se)};re(this.tree.getNode()),Y={expanded:ie},this.tree.expandAll()}else!ee&&Y&&(this.tree.setFocus([]),G(Y),Y=void 0)})),this.debugService.getModel().getSessions().forEach(ee=>j(ee))}layoutBody(q,X){super.layoutBody(q,X),this.tree.layout(q,X)}dispose(){(0,o.dispose)(this.tree),(0,o.dispose)(this.treeLabels),super.dispose()}};z=we([F(1,A.IContextMenuService),F(2,k.IKeybindingService),F(3,E.IInstantiationService),F(4,m.IViewDescriptorService),F(5,I.IConfigurationService),F(6,n.IEditorService),F(7,r.IContextKeyService),F(8,C.IWorkspaceContextService),F(9,S.IDebugService),F(10,v.ILabelService),F(11,T.IPathService),F(12,w.IOpenerService),F(13,D.IThemeService),F(14,y.ITelemetryService)],z),e.LoadedScriptsView=z;class x{getHeight(q){return 22}getTemplateId(q){return H.ID}}class H{constructor(q){this.labels=q}get templateId(){return H.ID}renderTemplate(q){return{label:this.labels.create(q,{supportHighlights:!0})}}renderElement(q,X,G){const Q=q.element,j=Q.getLabel();this.render(Q,j,G,q.filterData)}renderCompressedElements(q,X,G,Q){const j=q.element.elements[q.element.elements.length-1],K=q.element.elements.map(Y=>Y.getLabel());this.render(j,K,G,q.filterData)}render(q,X,G,Q){const j={name:X},K={title:q.getHoverLabel()};if(q instanceof N)K.fileKind=d.FileKind.ROOT_FOLDER;else if(q instanceof B)K.title=t.localize(0,null),K.hideIcon=!0;else if(q instanceof O){const Y=q.getSource();Y&&Y.uri?(j.resource=Y.uri,K.fileKind=d.FileKind.FILE):K.fileKind=d.FileKind.FOLDER}K.matches=(0,g.createMatches)(Q),G.label.setResource(j,K)}disposeTemplate(q){q.label.dispose()}}H.ID="lsrenderer";class W{getWidgetAriaLabel(){return t.localize(1,null)}getAriaLabel(q){return q instanceof N?t.localize(2,null,q.getLabel()):q instanceof B?t.localize(3,null,q.getLabel()):q.hasChildren()?t.localize(4,null,q.getLabel()):t.localize(5,null,q.getLabel())}}class U{setFilter(q){this.filterText=q}filter(q,X){return this.filterText?q.isLeaf()?q.getLabel().indexOf(this.filterText)>=0?1:0:2:1}}}),define(ae[2775],le([1,0,96,144,467,192]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplFilter=void 0;class k{constructor(){this._parsedQueries=[]}set filterQuery(I){if(this._parsedQueries=[],I=I.trim(),I&&I!==""){const b=(0,p.splitGlobAware)(I,",").map(S=>S.trim()).filter(S=>!!S.length);for(const S of b)S.startsWith("!")?this._parsedQueries.push({type:"exclude",query:S.slice(1)}):this._parsedQueries.push({type:"include",query:S})}}filter(I,b){if(I instanceof R.ReplEvaluationInput||I instanceof R.ReplEvaluationResult||I instanceof A.Variable)return 1;let S=!1,C=!1;const r=I.toString(!0);for(const{type:u,query:i}of this._parsedQueries){if(u==="exclude"&&k.matchQuery(i,r))return!1;u==="include"&&(S=!0,k.matchQuery(i,r)&&(C=!0))}return S?C:typeof b<"u"?b:1}}e.ReplFilter=k,k.matchQuery=t.matchesFuzzy}),define(ae[2776],le([1,0,10,277,250,476,96,2,68,1620,37,49,73,12,397,2407,201,87,192,467,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"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 o{get templateId(){return o.ID}renderTemplate(O){t.append(O,a("span.arrow"+u.ThemeIcon.asCSSSelector(c.debugConsoleEvaluationInput)));const N=t.append(O,a(".expression"));return{label:new R.HighlightedLabel(N)}}renderElement(O,N,P){const B=O.element;P.label.set(B.value,(0,k.createMatches)(O.filterData))}disposeTemplate(O){}}e.ReplEvaluationInputsRenderer=o,o.ID="replEvaluationInput";let g=class Il{constructor(O,N){this.linkDetector=O,this.themeService=N}get templateId(){return Il.ID}renderTemplate(O){return{label:t.append(O,a(".expression"))}}renderElement(O,N,P){const B=O.element;t.clearNode(P.label);const V=(0,f.handleANSIOutput)(B.name,this.linkDetector,this.themeService,void 0);P.label.appendChild(V)}disposeTemplate(O){}};g.ID="replGroup",g=we([F(1,u.IThemeService)],g),e.ReplGroupRenderer=g;class h{get templateId(){return h.ID}constructor(O){this.linkDetector=O}renderTemplate(O){const N=t.append(O,a(".evaluation-result.expression"));return{value:t.append(N,a("span.value"))}}renderElement(O,N,P){const B=O.element;(0,i.renderExpressionValue)(B,P.value,{showHover:!1,colorize:!0,linkDetector:this.linkDetector})}disposeTemplate(O){}}e.ReplEvaluationResultsRenderer=h,h.ID="replEvaluationResult";let v=class Dl{constructor(O,N,P,B){this.linkDetector=O,this.editorService=N,this.labelService=P,this.themeService=B}get templateId(){return Dl.ID}renderTemplate(O){const N=Object.create(null);O.classList.add("output");const P=t.append(O,a(".output.expression.value-and-source"));return N.container=O,N.countContainer=t.append(P,a(".count-badge-wrapper")),N.count=new p.CountBadge(N.countContainer),N.value=t.append(P,a("span.value")),N.source=t.append(P,a(".source")),N.toDispose=[],N.toDispose.push((0,r.attachBadgeStyler)(N.count,this.themeService)),N.toDispose.push(t.addDisposableListener(N.source,"click",B=>{B.preventDefault(),B.stopPropagation();const V=N.getReplElementSource();V&&V.source.openInEditor(this.editorService,{startLineNumber:V.lineNumber,startColumn:V.column,endLineNumber:V.lineNumber,endColumn:V.column})})),N}renderElement({element:O},N,P){this.setElementCount(O,P),P.elementListener=O.onDidChangeCount(()=>this.setElementCount(O,P)),t.clearNode(P.value),P.value.className="value";const B=(0,f.handleANSIOutput)(O.value,this.linkDetector,this.themeService,O.session.root);P.value.appendChild(B),P.value.classList.add(O.severity===I.default.Warning?"warn":O.severity===I.default.Error?"error":O.severity===I.default.Ignore?"ignore":"info"),P.source.textContent=O.sourceData?`${O.sourceData.source.name}:${O.sourceData.lineNumber}`:"",P.source.title=O.sourceData?`${this.labelService.getUriLabel(O.sourceData.source.uri)}:${O.sourceData.lineNumber}`:"",P.getReplElementSource=()=>O.sourceData}setElementCount(O,N){O.count>=2?(N.count.setCount(O.count),N.countContainer.hidden=!1):N.countContainer.hidden=!0}disposeTemplate(O){(0,E.dispose)(O.toDispose)}disposeElement(O,N,P){P.elementListener.dispose()}};v.ID="simpleReplElement",v=we([F(1,n.IEditorService),F(2,C.ILabelService),F(3,u.IThemeService)],v),e.ReplSimpleElementsRenderer=v;let m=class Tl extends i.AbstractExpressionsRenderer{get templateId(){return Tl.ID}constructor(O,N,P,B){super(N,P,B),this.linkDetector=O}renderExpression(O,N,P){(0,i.renderVariable)(O,N,!0,P,this.linkDetector),N.expression.classList.toggle("nested-variable",D(O))}getInputBoxOptions(O){}};m.ID="replVariable",m=we([F(1,l.IDebugService),F(2,S.IContextViewService),F(3,u.IThemeService)],m),e.ReplVariablesRenderer=m;class w{constructor(O){this.linkDetector=O}get templateId(){return w.ID}renderTemplate(O){O.classList.add("output");const N=t.append(O,a(".output.expression")),P=t.append(N,a("span.name")),B=new R.HighlightedLabel(P),V=t.append(N,a("span.value"));return{container:O,expression:N,name:P,label:B,value:V}}renderElement(O,N,P){const B=O.element;P.label.set(B.name?`${B.name}:`:"",(0,k.createMatches)(O.filterData)),B.name?P.name.textContent=`${B.name}:`:P.name.textContent="",(0,i.renderExpressionValue)(B.value,P.value,{showHover:!1,linkDetector:this.linkDetector})}disposeTemplate(O){}}e.ReplRawObjectsRenderer=w,w.ID="rawObject";function D(M){return M instanceof s.Variable&&(M.parent instanceof d.ReplEvaluationResult||M.parent instanceof s.Variable)}class y extends A.CachedListVirtualDelegate{constructor(O,N){super(),this.configurationService=O,this.replOptions=N}getHeight(O){return this.configurationService.getValue("debug").console.wordWrap?super.getHeight(O):this.estimateHeight(O,!0)}estimateHeight(O,N=!1){const P=this.replOptions.replConfiguration.lineHeight,B=z=>z.match(/\n/g)?.length??0;if((z=>typeof z.value=="string")(O)&&!D(O)){const z=O.value,x=B(z)+(N?0:Math.floor(z.length/70))+(O instanceof d.SimpleReplElement?0:1);return Math.max(x,1)*P}return P}getTemplateId(O){return O instanceof s.Variable&&O.name?m.ID:O instanceof d.ReplEvaluationResult||O instanceof s.Variable&&!O.name?h.ID:O instanceof d.ReplEvaluationInput?o.ID:O instanceof d.SimpleReplElement?v.ID:O instanceof d.ReplGroup?g.ID:w.ID}hasDynamicHeight(O){return D(O)?!1:O.toString().length>0}}e.ReplDelegate=y;function T(M){return typeof M.getReplElements=="function"}class _{hasChildren(O){return T(O)?!0:!!O.hasChildren}getChildren(O){return T(O)?Promise.resolve(O.getReplElements()):O instanceof d.RawObjectReplElement?O.getChildren():O instanceof d.ReplGroup?Promise.resolve(O.getChildren()):O.getChildren()}}e.ReplDataSource=_;class L{getWidgetAriaLabel(){return(0,b.localize)(0,null)}getAriaLabel(O){return O instanceof s.Variable?(0,b.localize)(1,null,O.name,O.value):O instanceof d.SimpleReplElement||O instanceof d.ReplEvaluationInput||O instanceof d.ReplEvaluationResult?O.value+(O instanceof d.SimpleReplElement&&O.count>1?(0,b.localize)(2,null,O.count):""):O instanceof d.RawObjectReplElement?(0,b.localize)(3,null,O.name,O.value):O instanceof d.ReplGroup?(0,b.localize)(4,null,O.name):""}}e.ReplAccessibilityProvider=L}),define(ae[685],le([1,0,10,250,16,11,29,96,2,13,1622,84,15,93,31,8,7,37,5,38,76,26,41,66,27,12,129,45,397,464,87,192,24,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"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 O=t.$;let N=!0,P,B,V=class extends m.ViewPane{constructor(ie,re,oe,se,te,Z,ne,ce,de,he,pe,me){super(ie,se,re,te,ce,ne,Z,de,he,pe),this.debugService=oe,this.menuService=me,this.needsRefresh=!1,this.savedViewState=new Map,this.autoExpandedScopes=new Set,this.updateTreeScheduler=new A.RunOnceScheduler(async()=>{const Se=this.debugService.getViewModel().focusedStackFrame;this.needsRefresh=!1;const Ie=this.tree.getInput();if(Ie&&this.savedViewState.set(Ie.getId(),this.tree.getViewState()),!Se){await this.tree.setInput(null);return}const ve=this.savedViewState.get(Se.getId());await this.tree.setInput(Se,ve);const ge=(await Se.getScopes()).find(ue=>!ue.expensive);ge&&this.tree.hasNode(ge)&&(this.autoExpandedScopes.add(ge.getId()),await this.tree.expand(ge))},400)}renderBody(ie){super.renderBody(ie),this.element.classList.add("debug-pane"),ie.classList.add("debug-variables");const re=(0,D.renderViewTree)(ie),oe=this.instantiationService.createInstance(y.LinkDetector);this.tree=this.instantiationService.createInstance(n.WorkbenchAsyncDataTree,"VariablesView",re,new $,[this.instantiationService.createInstance(G,oe),new q,new X],new U,{accessibilityProvider:new Q,identityProvider:{getId:te=>te.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:te=>te.name},overrideStyles:{listBackground:this.getBackgroundColor()}}),this.tree.setInput((0,b.withUndefinedAsNull)(this.debugService.getViewModel().focusedStackFrame)),T.CONTEXT_VARIABLES_FOCUSED.bindTo(this.tree.contextKeyService),this._register(this.debugService.getViewModel().onDidFocusStackFrame(te=>{if(!this.isBodyVisible()){this.needsRefresh=!0;return}const Z=te.explicit?0:void 0;this.updateTreeScheduler.schedule(Z)})),this._register(this.debugService.getViewModel().onWillUpdateViews(()=>{const te=this.debugService.getViewModel().focusedStackFrame;te&&N&&te.forgetScopes(),N=!0,this.tree.updateChildren()})),this._register(this.tree.onMouseDblClick(te=>this.onMouseDblClick(te))),this._register(this.tree.onContextMenu(async te=>await this.onContextMenu(te))),this._register(this.onDidChangeBodyVisibility(te=>{te&&this.needsRefresh&&this.updateTreeScheduler.schedule()}));let se;this._register(this.debugService.getViewModel().onDidSelectExpression(te=>{const Z=te?.expression;Z instanceof _.Variable&&!te?.settingWatch?(se=this.tree.options.horizontalScrolling,se&&this.tree.updateOptions({horizontalScrolling:!1}),this.tree.rerender(Z)):!te&&se!==void 0&&(this.tree.updateOptions({horizontalScrolling:se}),se=void 0)})),this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async te=>{te instanceof _.Variable&&this.tree.hasNode(te)&&(await this.tree.updateChildren(te,!1,!0),await this.tree.expand(te))})),this._register(this.debugService.onDidEndSession(()=>{this.savedViewState.clear(),this.autoExpandedScopes.clear()}))}layoutBody(ie,re){super.layoutBody(re,ie),this.tree.layout(ie,re)}focus(){this.tree.domFocus()}collapseAll(){this.tree.collapseAll()}onMouseDblClick(ie){const re=this.debugService.getViewModel().focusedSession;re&&ie.element instanceof _.Variable&&re.capabilities.supportsSetVariable&&!ie.element.presentationHint?.attributes?.includes("readOnly")&&!ie.element.presentationHint?.lazy&&this.debugService.getViewModel().setSelectedExpression(ie.element,!1)}async onContextMenu(ie){const re=ie.element;if(!(re instanceof _.Variable)||!re.value)return;const oe=new I.DisposableStore;try{const se=oe.add(await x(this.contextKeyService,re)),te=oe.add(this.menuService.createMenu(r.MenuId.DebugVariablesContext,se)),Z=z(re),ne=[];(0,C.createAndFillInContextMenuActions)(te,{arg:Z,shouldForwardArgs:!1},{primary:[],secondary:ne},"inline"),this.contextMenuService.showContextMenu({getAnchor:()=>ie.anchor,getActions:()=>ne})}finally{oe.dispose()}}};V=we([F(1,l.IContextMenuService),F(2,T.IDebugService),F(3,d.IKeybindingService),F(4,f.IConfigurationService),F(5,s.IInstantiationService),F(6,w.IViewDescriptorService),F(7,c.IContextKeyService),F(8,o.IOpenerService),F(9,v.IThemeService),F(10,h.ITelemetryService),F(11,r.IMenuService)],V),e.VariablesView=V;const z=ee=>({sessionId:ee.getSession()?.getId(),container:ee.parent instanceof _.Expression?{expression:ee.parent.name}:ee.parent.toDebugProtocolObject(),variable:ee.toDebugProtocolObject()});async function x(ee,ie){const re=ie.getSession();if(!re||!re.capabilities.supportsDataBreakpoints)return H(ee,ie);const oe=[];B=await re.dataBreakpointInfo(ie.name,ie.parent.reference);const se=B?.dataId,te=B?.accessTypes;if(!te)oe.push([T.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED.key,!!se]);else for(const Z of te)switch(Z){case"read":oe.push([T.CONTEXT_BREAK_WHEN_VALUE_IS_READ_SUPPORTED.key,!!se]);break;case"write":oe.push([T.CONTEXT_BREAK_WHEN_VALUE_CHANGES_SUPPORTED.key,!!se]);break;case"readWrite":oe.push([T.CONTEXT_BREAK_WHEN_VALUE_IS_ACCESSED_SUPPORTED.key,!!se]);break}return H(ee,ie,oe)}function H(ee,ie,re=[]){const oe=ie.getSession(),se=[[T.CONTEXT_DEBUG_PROTOCOL_VARIABLE_MENU_CONTEXT.key,ie.variableMenuContext||""],[T.CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.key,!!ie.evaluateName],[T.CONTEXT_CAN_VIEW_MEMORY.key,!!oe?.capabilities.supportsReadMemoryRequest&&ie.memoryReference!==void 0],[T.CONTEXT_VARIABLE_IS_READONLY.key,!!ie.presentationHint?.attributes?.includes("readOnly")||ie.presentationHint?.lazy],...re];return P=ie,ee.createOverlay(se)}function W(ee){return ee instanceof _.StackFrame}class U{hasChildren(ie){return ie?W(ie)?!0:ie.hasChildren:!1}getChildren(ie){return W(ie)?ie.getScopes():ie.getChildren()}}e.VariablesDataSource=U;class ${getHeight(ie){return 22}getTemplateId(ie){return ie instanceof _.ErrorScope?X.ID:ie instanceof _.Scope?q.ID:G.ID}}class q{get templateId(){return q.ID}renderTemplate(ie){const re=t.append(ie,O(".scope")),oe=new p.HighlightedLabel(re);return{name:re,label:oe}}renderElement(ie,re,oe){oe.label.set(ie.element.name,(0,E.createMatches)(ie.filterData))}disposeTemplate(ie){}}q.ID="scope";class X{get templateId(){return X.ID}renderTemplate(ie){const re=t.append(ie,O(".scope"));return{error:t.append(re,O(".error"))}}renderElement(ie,re,oe){oe.error.innerText=ie.element.name}disposeTemplate(){}}X.ID="scopeError";let G=class kl extends D.AbstractExpressionsRenderer{constructor(ie,re,oe,se,te,Z){super(se,te,Z),this.linkDetector=ie,this.menuService=re,this.contextKeyService=oe}get templateId(){return kl.ID}renderExpression(ie,re,oe){(0,D.renderVariable)(ie,re,!0,oe,this.linkDetector)}getInputBoxOptions(ie){const re=ie;return{initialValue:ie.value,ariaLabel:(0,S.localize)(0,null),validationOptions:{validation:()=>re.errorMessage?{content:re.errorMessage}:null},onFinish:(oe,se)=>{re.errorMessage=void 0;const te=this.debugService.getViewModel().focusedStackFrame;se&&re.value!==oe&&te&&re.setVariable(oe,te).then(()=>{N=!1,this.debugService.getViewModel().updateViews()})}}}renderActionBar(ie,re){const oe=re,se=H(this.contextKeyService,oe),te=this.menuService.createMenu(r.MenuId.DebugVariablesContext,se),Z=[],ne=z(oe);(0,C.createAndFillInContextMenuActions)(te,{arg:ne,shouldForwardArgs:!1},{primary:Z,secondary:[]},"inline"),ie.clear(),ie.context=ne,ie.push(Z,{icon:!0,label:!1})}};G.ID="variable",G=we([F(1,r.IMenuService),F(2,c.IContextKeyService),F(3,T.IDebugService),F(4,l.IContextViewService),F(5,v.IThemeService)],G),e.VariablesRenderer=G;class Q{getWidgetAriaLabel(){return(0,S.localize)(1,null)}getAriaLabel(ie){return ie instanceof _.Scope?(0,S.localize)(2,null,ie.name):ie instanceof _.Variable?(0,S.localize)(3,null,ie.name,ie.value):null}}e.SET_VARIABLE_ID="debug.setVariable",i.CommandsRegistry.registerCommand({id:e.SET_VARIABLE_ID,handler:ee=>{ee.get(T.IDebugService).getViewModel().setSelectedExpression(P,!1)}}),e.COPY_VALUE_ID="workbench.debug.viewlet.action.copyValue",i.CommandsRegistry.registerCommand({id:e.COPY_VALUE_ID,handler:async(ee,ie,re)=>{const oe=ee.get(T.IDebugService),se=ee.get(u.IClipboardService);let te="",Z;ie instanceof _.Variable||ie instanceof _.Expression?(te="watch",Z=re||[]):(te="variables",Z=P?[P]:[]);const ne=oe.getViewModel().focusedStackFrame,ce=oe.getViewModel().focusedSession;if(!ne||!ce||Z.length===0)return;const de=ce.capabilities.supportsClipboardContext?"clipboard":te,he=Z.map(pe=>pe instanceof _.Variable?pe.evaluateName||pe.value:pe.name);try{const pe=await Promise.all(he.map(Se=>ce.evaluate(Se,ne.frameId,de))),me=(0,R.coalesce)(pe).map(Se=>Se.body.result);me.length&&se.writeText(me.join(` `))}catch{const me=Z.map(Se=>Se.value);se.writeText(me.join(` `))}}}),e.VIEW_MEMORY_ID="workbench.debug.viewlet.action.viewMemory";const j="ms-vscode.hexeditor",K="hexEditor.hexedit";i.CommandsRegistry.registerCommand({id:e.VIEW_MEMORY_ID,handler:async(ee,ie,re)=>{if(!ie.sessionId||!ie.variable.memoryReference)return;const oe=ee.get(i.ICommandService),se=ee.get(L.IEditorService),te=ee.get(a.INotificationService),Z=ee.get(g.IProgressService),ne=ee.get(M.IExtensionService),ce=ee.get(h.ITelemetryService),de=ee.get(T.IDebugService);(await ne.getExtension(j)||await Y(te,Z,ne,oe))&&(ce.publicLog("debug/didViewMemory",{debugType:de.getModel().getSession(ie.sessionId)?.configuration.type}),await se.openEditor({resource:(0,_.getUriForDebugMemory)(ie.sessionId,ie.variable.memoryReference),options:{revealIfOpened:!0,override:K}},L.SIDE_GROUP))}});function Y(ee,ie,re,oe){return new Promise(se=>{let te=!1;ee.prompt(a.Severity.Info,(0,S.localize)(4,null),[{label:(0,S.localize)(5,null),run:()=>se(!1)},{label:(0,S.localize)(6,null),run:async()=>{te=!0;try{await ie.withProgress({location:15,title:(0,S.localize)(7,null)},async()=>{for(await oe.executeCommand("workbench.extensions.installExtension",j);!await re.getExtension(j);)await(0,A.timeout)(30)}),se(!0)}catch(ne){ee.error(ne),se(!1)}}}],{sticky:!0}).onDidClose(ne=>{te||se(!1)})})}e.BREAK_WHEN_VALUE_CHANGES_ID="debug.breakWhenValueChanges",i.CommandsRegistry.registerCommand({id:e.BREAK_WHEN_VALUE_CHANGES_ID,handler:async ee=>{const ie=ee.get(T.IDebugService);B&&await ie.addDataBreakpoint(B.description,B.dataId,!!B.canPersist,B.accessTypes,"write")}}),e.BREAK_WHEN_VALUE_IS_ACCESSED_ID="debug.breakWhenValueIsAccessed",i.CommandsRegistry.registerCommand({id:e.BREAK_WHEN_VALUE_IS_ACCESSED_ID,handler:async ee=>{const ie=ee.get(T.IDebugService);B&&await ie.addDataBreakpoint(B.description,B.dataId,!!B.canPersist,B.accessTypes,"readWrite")}}),e.BREAK_WHEN_VALUE_IS_READ_ID="debug.breakWhenValueIsRead",i.CommandsRegistry.registerCommand({id:e.BREAK_WHEN_VALUE_IS_READ_ID,handler:async ee=>{const ie=ee.get(T.IDebugService);B&&await ie.addDataBreakpoint(B.description,B.dataId,!!B.canPersist,B.accessTypes,"read")}}),e.COPY_EVALUATE_PATH_ID="debug.copyEvaluatePath",i.CommandsRegistry.registerCommand({id:e.COPY_EVALUATE_PATH_ID,handler:async(ee,ie)=>{await ee.get(u.IClipboardService).writeText(ie.variable.evaluateName)}}),e.ADD_TO_WATCH_ID="debug.addToWatchExpressions",i.CommandsRegistry.registerCommand({id:e.ADD_TO_WATCH_ID,handler:async(ee,ie)=>{ee.get(T.IDebugService).addWatchExpression(ie.variable.evaluateName)}}),(0,r.registerAction2)(class extends m.ViewAction{constructor(){super({id:"variables.collapse",viewId:T.VARIABLES_VIEW_ID,title:(0,S.localize)(8,null),f1:!1,icon:k.Codicon.collapseAll,menu:{id:r.MenuId.ViewTitle,group:"navigation",when:c.ContextKeyExpr.equals("view",T.VARIABLES_VIEW_ID)}})}runInView(ee,ie){ie.collapseAll()}})}),define(ae[2777],le([1,0,10,147,16,32,2,14,20,94,61,1604,5,76,33,73,12,397,464,685,87,192,246]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugHoverWidget=e.findExpressionInStackFrame=void 0;const g=t.$;async function h(_,L){if(!_)return null;const O=(await _.getChildren()).filter(N=>L[0]===N.name);return O.length!==1?null:L.length===1?O[0]:h(O[0],L.slice(1))}async function v(_,L){const O=(await _.getScopes()).filter(P=>!P.expensive),N=(0,R.coalesce)(await Promise.all(O.map(P=>h(P,L))));return N.length>0&&N.every(P=>P.value===N[0].value)?N[0]:void 0}e.findExpressionInStackFrame=v;let m=class Ks{constructor(L,M,O,N){this.editor=L,this.debugService=M,this.instantiationService=O,this.themeService=N,this.allowEditorOverflow=!0,this.highlightDecorations=this.editor.createDecorationsCollection(),this.toDispose=[],this._isVisible=!1,this.showAtPosition=null,this.positionPreference=[1,2],this.debugHoverComputer=this.instantiationService.createInstance(T,this.editor)}create(){this.domNode=g(".debug-hover-widget"),this.complexValueContainer=t.append(this.domNode,g(".complex-value")),this.complexValueTitle=t.append(this.complexValueContainer,g(".title")),this.treeContainer=t.append(this.complexValueContainer,g(".debug-hover-tree")),this.treeContainer.setAttribute("role","tree");const L=t.append(this.complexValueContainer,g(".tip"));L.textContent=C.localize(0,null,E.isMacintosh?"Option":"Alt");const M=new D,O=this.instantiationService.createInstance(s.LinkDetector);this.tree=this.instantiationService.createInstance(u.WorkbenchAsyncDataTree,"DebugHover",this.treeContainer,new y,[this.instantiationService.createInstance(d.VariablesRenderer,O)],M,{accessibilityProvider:new w,mouseSupport:!1,horizontalScrolling:!0,useShadows:!1,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:N=>N.name},overrideStyles:{listBackground:i.editorHoverBackground}}),this.valueContainer=g(".value"),this.valueContainer.tabIndex=0,this.valueContainer.setAttribute("role","tooltip"),this.scrollbar=new p.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,f.attachStylerCallback)(this.themeService,{editorHoverBackground:i.editorHoverBackground,editorHoverBorder:i.editorHoverBorder,editorHoverForeground:i.editorHoverForeground},N=>{N.editorHoverBackground?this.domNode.style.backgroundColor=N.editorHoverBackground.toString():this.domNode.style.backgroundColor="",N.editorHoverBorder?this.domNode.style.border=`1px solid ${N.editorHoverBorder}`:this.domNode.style.border="",N.editorHoverForeground?this.domNode.style.color=N.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(t.addStandardDisposableListener(this.domNode,"keydown",L=>{L.equals(9)&&this.hide()})),this.toDispose.push(this.editor.onDidChangeConfiguration(L=>{L.hasChanged(45)&&this.editor.applyFontInfo(this.domNode)})),this.toDispose.push(this.debugService.getViewModel().onDidEvaluateLazyExpression(async L=>{L instanceof a.Variable&&this.tree.hasNode(L)&&(await this.tree.updateChildren(L,!1,!0),await this.tree.expand(L))}))}isHovered(){return!!this.domNode?.matches(":hover")}isVisible(){return this._isVisible}willBeVisible(){return!!this.showCancellationSource}getId(){return Ks.ID}getDomNode(){return this.domNode}async showAt(L,M){this.showCancellationSource?.cancel();const O=this.showCancellationSource=new A.CancellationTokenSource,N=this.debugService.getViewModel().focusedSession;if(!N||!this.editor.hasModel()){this.hide();return}const P=await this.debugHoverComputer.compute(L,O.token);if(this.isVisible()&&!P.rangeChanged)return;if(!P.range||O.token.isCancellationRequested){this.hide();return}const B=await this.debugHoverComputer.evaluate(N);if(O.token.isCancellationRequested||!B||B instanceof a.Expression&&!B.available){this.hide();return}return this.highlightDecorations.set([{range:P.range,options:Ks._HOVER_HIGHLIGHT_DECORATION_OPTIONS}]),this.doShow(P.range.getStartPosition(),B,M)}async doShow(L,M,O,N=!1){if(this.domNode||this.create(),this.showAtPosition=L,this._isVisible=!0,!M.hasChildren||N){this.complexValueContainer.hidden=!0,this.valueContainer.hidden=!1,(0,l.renderExpressionValue)(M,this.valueContainer,{showChanged:!1,colorize:!0}),this.valueContainer.title="",this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode(),O&&(this.editor.render(),this.valueContainer.focus());return}this.valueContainer.hidden=!0,await this.tree.setInput(M),this.complexValueTitle.textContent=M.value,this.complexValueTitle.title=M.value,this.layoutTreeAndContainer(!0),this.tree.scrollTop=0,this.tree.scrollLeft=0,this.complexValueContainer.hidden=!1,O&&(this.editor.render(),this.tree.domFocus())}layoutTreeAndContainer(L){const O=Math.min(Math.max(266,this.editor.getLayoutInfo().height*.55),this.tree.contentHeight+10);this.treeContainer.style.height=`${O}px`,this.tree.layout(O,L?400:void 0),this.editor.layoutContentWidget(this),this.scrollbar.scanDomNode()}afterRender(L){L&&(this.positionPreference=[L])}hide(){this.showCancellationSource&&(this.showCancellationSource.cancel(),this.showCancellationSource=void 0),this._isVisible&&(t.isAncestor(document.activeElement,this.domNode)&&this.editor.focus(),this._isVisible=!1,this.highlightDecorations.clear(),this.editor.layoutContentWidget(this),this.positionPreference=[1,2])}getPosition(){return this._isVisible?{position:this.showAtPosition,preference:this.positionPreference}:null}dispose(){this.toDispose=k.dispose(this.toDispose)}};m.ID="debug.hoverWidget",m._HOVER_HIGHLIGHT_DECORATION_OPTIONS=b.ModelDecorationOptions.register({description:"bdebug-hover-highlight",className:"hoverHighlight"}),m=we([F(1,n.IDebugService),F(2,r.IInstantiationService),F(3,c.IThemeService)],m),e.DebugHoverWidget=m;class w{getWidgetAriaLabel(){return C.localize(1,null)}getAriaLabel(L){return C.localize(2,null,L.name,L.value)}}class D{hasChildren(L){return L.hasChildren}getChildren(L){return L.getChildren()}}class y{getHeight(L){return 18}getTemplateId(L){return d.VariablesRenderer.ID}}let T=class{constructor(L,M,O){this.editor=L,this.debugService=M,this.languageFeaturesService=O}async compute(L,M){if(!this.debugService.getViewModel().focusedSession||!this.editor.hasModel())return{rangeChanged:!1};const N=this.editor.getModel(),P=await this.doCompute(N,L,M);if(!P)return{rangeChanged:!1};const{range:B,matchingExpression:V}=P,z=this._currentRange?!this._currentRange.equalsRange(B):!0;return this._currentExpression=V,this._currentRange=I.Range.lift(B),{rangeChanged:z,range:this._currentRange}}async doCompute(L,M,O){if(this.languageFeaturesService.evaluatableExpressionProvider.has(L)){const N=this.languageFeaturesService.evaluatableExpressionProvider.ordered(L),P=(0,R.coalesce)(await Promise.all(N.map(async B=>{try{return await B.provideEvaluatableExpression(L,M,O)}catch{return}})));if(P.length>0){let B=P[0].expression;const V=P[0].range;return B||(B=L.getLineContent(M.lineNumber).substring(V.startColumn-1,V.endColumn-1)),{range:V,matchingExpression:B}}}else{const N=L.getLineContent(M.lineNumber),{start:P,end:B}=(0,o.getExactExpressionStartAndEnd)(N,M.column,M.column),V=N.substring(P-1,B);return{matchingExpression:V,range:new I.Range(M.lineNumber,P,M.lineNumber,P+V.length)}}return null}async evaluate(L){if(!this._currentExpression)throw new Error("No expression to evaluate");if(L.capabilities.supportsEvaluateForHovers){const M=new a.Expression(this._currentExpression);return await M.evaluate(L,this.debugService.getViewModel().focusedStackFrame,"hover"),M}else{const M=this.debugService.getViewModel().focusedStackFrame;if(M)return await v(M,(0,R.coalesce)(this._currentExpression.split(".").map(O=>O.trim())))}}};T=we([F(1,n.IDebugService),F(2,S.ILanguageFeaturesService)],T)}),define(ae[964],le([1,0,1603,28,11,14,123,322,90,32,16,21,299,20,5,8,31,87,2710,50,332,112,2777,116,2,138,53,439,74,6,57,7,192,33,10,195,61,242]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugEditorContribution=e.LazyDebugEditorContribution=e.debugInlineBackground=e.debugInlineForeground=void 0;const V=100,z=150,x=500,H=200;e.debugInlineForeground=(0,M.registerColor)("editor.inlineValuesForeground",{dark:"#ffffff80",light:"#00000080",hcDark:"#ffffff80",hcLight:"#00000080"},t.localize(0,null)),e.debugInlineBackground=(0,M.registerColor)("editor.inlineValuesBackground",{dark:"#ffc80033",light:"#ffc80033",hcDark:"#ffc80033",hcLight:"#ffc80033"},t.localize(1,null));class W{constructor(K,Y){this.column=K,this.text=Y}}function U(j,K,Y=1073741824){return K.length>z&&(K=K.substring(0,z)+"..."),[{range:{startLineNumber:j,endLineNumber:j,startColumn:Y,endColumn:Y},options:{description:"debug-inline-value-decoration-spacer",after:{content:p.noBreakWhitespace,cursorStops:g.InjectedTextCursorStops.None},showIfCollapsed:!0}},{range:{startLineNumber:j,endLineNumber:j,startColumn:Y,endColumn:Y},options:{description:"debug-inline-value-decoration",after:{content:$(K),inlineClassName:"debug-inline-value",inlineClassNameAffectsLetterSpacing:!0,cursorStops:g.InjectedTextCursorStops.None},showIfCollapsed:!0}}]}function $(j){return j.replace(/[ \t]/g,p.noBreakWhitespace)}function q(j,K,Y,ee){const ie=new Map;for(const se of j)if(ie.set(se.name,se.value),ie.size>=V)break;const re=new Map;ie.forEach((se,te)=>{const Z=ee.get(te);if(Z)for(const ne of Z)K.containsPosition(new d.Position(ne,0))&&(re.has(ne)||re.set(ne,[]),re.get(ne).indexOf(te)===-1&&re.get(ne).push(te))});const oe=[];return re.forEach((se,te)=>{const Z=se.sort((ne,ce)=>{const de=Y.getLineContent(te);return de.indexOf(ne)-de.indexOf(ce)}).map(ne=>`${ne} = ${ie.get(ne)}`).join(", ");oe.push(...U(te,Z))}),oe}function X(j){const K=new Map;if(!j)return K;for(let Y=1,ee=j.getLineCount();Y<=ee;++Y){const ie=j.getLineContent(Y);if(ie.length>x)continue;j.tokenization.forceTokenization(Y);const re=j.tokenization.getLineTokens(Y);for(let oe=0,se=re.getCount();oe<se;oe++)if(re.getStandardTokenType(oe)===0){r.DEFAULT_WORD_REGEXP.lastIndex=0;const Z=re.getStartOffset(oe),ne=re.getEndOffset(oe),ce=ie.substring(Z,ne),de=r.DEFAULT_WORD_REGEXP.exec(ce);if(de){const he=de[0];K.has(he)||K.set(he,[]),K.get(he).push(Y)}}}return K}let G=class extends h.Disposable{constructor(K,Y){super();const ee=K.onDidChangeModel(()=>{K.hasModel()&&(ee.dispose(),this._contrib=this._register(Y.createInstance(Q,K)))})}showHover(K,Y){return this._contrib?this._contrib.showHover(K,Y):Promise.resolve()}addLaunchConfiguration(){return this._contrib?this._contrib.addLaunchConfiguration():Promise.resolve()}closeExceptionWidget(){this._contrib?.closeExceptionWidget()}};G=we([F(1,i.IInstantiationService)],G),e.LazyDebugEditorContribution=G;let Q=class{constructor(K,Y,ee,ie,re,oe,se,te,Z,ne){this.editor=K,this.debugService=Y,this.instantiationService=ee,this.commandService=ie,this.configurationService=re,this.hostService=oe,this.uriIdentityService=se,this.languageFeaturesService=Z,this.hoverPosition=null,this.mouseDown=!1,this.altPressed=!1,this.oldDecorations=this.editor.createDecorationsCollection(),this._wordToLineNumbersMap=void 0,this.debounceInfo=ne.for(Z.inlineValuesProvider,"InlineValues",{min:H}),this.hoverWidget=this.instantiationService.createInstance(o.DebugHoverWidget,this.editor),this.toDispose=[],this.registerListeners(),this.exceptionWidgetVisible=l.CONTEXT_EXCEPTION_WIDGET_VISIBLE.bindTo(te),this.toggleExceptionWidget()}registerListeners(){this.toDispose.push(this.debugService.getViewModel().onDidFocusStackFrame(K=>this.onFocusStackFrame(K.stackFrame))),this.toDispose.push(this.editor.onMouseDown(K=>this.onEditorMouseDown(K))),this.toDispose.push(this.editor.onMouseUp(()=>this.mouseDown=!1)),this.toDispose.push(this.editor.onMouseMove(K=>this.onEditorMouseMove(K))),this.toDispose.push(this.editor.onMouseLeave(K=>{const Y=this.hoverWidget.getDomNode();if(!Y)return;const ee=Y.getBoundingClientRect();(K.event.posx<ee.left||K.event.posx>ee.right||K.event.posy<ee.top||K.event.posy>ee.bottom)&&this.hideHoverWidget()})),this.toDispose.push(this.editor.onKeyDown(K=>this.onKeyDown(K))),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 K=this.debugService.getViewModel().focusedStackFrame,Y=this.editor.getModel();Y&&this.applyHoverConfiguration(Y,K),this.toggleExceptionWidget(),this.hideHoverWidget(),this._wordToLineNumbersMap=void 0,await this.updateInlineValueDecorations(K)})),this.toDispose.push(this.editor.onDidScrollChange(()=>{this.hideHoverWidget();const K=this.editor.getModel();K&&this.languageFeaturesService.inlineValuesProvider.has(K)&&this.updateInlineValuesScheduler.schedule()})),this.toDispose.push(this.debugService.onDidChangeState(K=>{K!==2&&this.toggleExceptionWidget()}))}get wordToLineNumbersMap(){return this._wordToLineNumbersMap||(this._wordToLineNumbersMap=X(this.editor.getModel())),this._wordToLineNumbersMap}applyHoverConfiguration(K,Y){Y&&this.uriIdentityService.extUri.isEqual(K.uri,Y.source.uri)?(this.altListener&&this.altListener.dispose(),this.altListener=(0,O.addDisposableListener)(document,"keydown",ee=>{if(new I.StandardKeyboardEvent(ee).keyCode===6){this.altPressed=!0;const re=this.hoverWidget.isVisible();if(this.hoverWidget.hide(),this.enableEditorHover(),re&&this.hoverPosition){const te=this.editor.getContribution(w.ModesHoverController.ID),Z=new u.Range(this.hoverPosition.lineNumber,this.hoverPosition.column,this.hoverPosition.lineNumber,this.hoverPosition.column);te?.showContentHover(Z,1,0,!1)}const oe=new N.DomEmitter(document,"keyup"),se=y.Event.any(this.hostService.onDidChangeFocus,oe.event)(te=>{let Z;te instanceof KeyboardEvent&&(Z=new I.StandardKeyboardEvent(te)),(!Z||Z.keyCode===6)&&(this.altPressed=!1,this.editor.updateOptions({hover:{enabled:!1}}),se.dispose(),oe.dispose())})}}),this.editor.updateOptions({hover:{enabled:!1}})):(this.altListener?.dispose(),this.enableEditorHover())}enableEditorHover(){if(this.editor.hasModel()){const K=this.editor.getModel(),Y={resource:K.uri,overrideIdentifier:K.getLanguageId()},ee=this.configurationService.getValue("editor.hover",Y);this.editor.updateOptions({hover:{enabled:ee.enabled,delay:ee.delay,sticky:ee.sticky}})}}async showHover(K,Y){const ee=this.debugService.getViewModel().focusedStackFrame,ie=this.editor.getModel();if(ee&&ie&&this.uriIdentityService.extUri.isEqual(ee.source.uri,ie.uri)&&!this.altPressed)return this.hoverWidget.showAt(K,Y)}async onFocusStackFrame(K){const Y=this.editor.getModel();Y&&(this.applyHoverConfiguration(Y,K),K&&this.uriIdentityService.extUri.isEqual(K.source.uri,Y.uri)?await this.toggleExceptionWidget():this.hideHoverWidget()),await this.updateInlineValueDecorations(K)}get showHoverScheduler(){const K=this.editor.getOption(54),Y=new R.RunOnceScheduler(()=>{this.hoverPosition&&this.showHover(this.hoverPosition,!1)},K.delay*2);return this.toDispose.push(Y),Y}get hideHoverScheduler(){const K=new R.RunOnceScheduler(()=>{this.hoverWidget.isHovered()||this.hoverWidget.hide()},0);return this.toDispose.push(K),K}hideHoverWidget(){!this.hideHoverScheduler.isScheduled()&&this.hoverWidget.willBeVisible()&&this.hideHoverScheduler.schedule(),this.showHoverScheduler.cancel()}onEditorMouseDown(K){this.mouseDown=!0,!(K.target.type===9&&K.target.detail===o.DebugHoverWidget.ID)&&this.hideHoverWidget()}onEditorMouseMove(K){if(this.debugService.state!==2)return;const Y=K.target,ee=A.isMacintosh?"metaKey":"ctrlKey";Y.type===9&&Y.detail===o.DebugHoverWidget.ID&&!K.event[ee]||(Y.type===6?Y.position&&!d.Position.equals(Y.position,this.hoverPosition)&&(this.hoverPosition=Y.position,this.hideHoverScheduler.cancel(),this.showHoverScheduler.schedule()):this.mouseDown||this.hideHoverWidget())}onKeyDown(K){const Y=A.isMacintosh?57:5;K.keyCode!==Y&&this.hideHoverWidget()}async toggleExceptionWidget(){const K=this.editor.getModel(),Y=this.debugService.getViewModel().focusedStackFrame,ee=Y?Y.thread.getCallStack():null;if(!K||!Y||!ee||ee.length===0){this.closeExceptionWidget();return}const ie=ee.find(oe=>!!(oe&&oe.source&&oe.source.available&&oe.source.presentationHint!=="deemphasize"));if(!ie||ie!==Y){this.closeExceptionWidget();return}const re=this.uriIdentityService.extUri.isEqual(ie.source.uri,K.uri);if(this.exceptionWidget&&!re)this.closeExceptionWidget();else if(re){const oe=await Y.thread.exceptionInfo;oe&&this.showExceptionWidget(oe,this.debugService.getViewModel().focusedSession,ie.range.startLineNumber,ie.range.startColumn)}}showExceptionWidget(K,Y,ee,ie){this.exceptionWidget&&this.exceptionWidget.dispose(),this.exceptionWidget=this.instantiationService.createInstance(s.ExceptionWidget,this.editor,K,Y),this.exceptionWidget.show({lineNumber:ee,column:ie},0),this.exceptionWidget.focus(),this.editor.revealRangeInCenter({startLineNumber:ee,startColumn:ie,endLineNumber:ee,endColumn:ie}),this.exceptionWidgetVisible.set(!0)}closeExceptionWidget(){if(this.exceptionWidget){const K=this.exceptionWidget.hasFocus();this.exceptionWidget.dispose(),this.exceptionWidget=void 0,this.exceptionWidgetVisible.set(!1),K&&this.editor.focus()}}async addLaunchConfiguration(){const K=this.editor.getModel();if(!K)return;let Y,ee;const ie=()=>{let oe=0;(0,k.visit)(K.getValue(),{onObjectProperty:se=>{ee=se},onArrayBegin:se=>{ee==="configurations"&&oe===0&&(Y=K.getPositionAt(se+1)),oe++},onArrayEnd:()=>{oe--}})};if(ie(),!Y){const{tabSize:oe,insertSpaces:se}=K.getOptions(),te=K.getEOL(),Z=(0,m.basename)(K.uri.fsPath)==="launch.json"?(0,E.setProperty)(K.getValue(),["configurations"],[],{tabSize:oe,insertSpaces:se,eol:te})[0]:(0,E.setProperty)(K.getValue(),["launch"],{configurations:[]},{tabSize:oe,insertSpaces:se,eol:te})[0],ne=K.getPositionAt(Z.offset),ce=ne.lineNumber,de=new u.Range(ce,ne.column,ce,K.getLineMaxColumn(ce));K.pushEditOperations(null,[v.EditOperation.replace(de,Z.content)],()=>null),ie()}if(!Y)return;this.editor.focus(),await(oe=>(K.getLineLastNonWhitespaceColumn(oe.lineNumber)>oe.column&&(this.editor.setPosition(oe),n.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,this.editor,null)),this.editor.setPosition(oe),this.commandService.executeCommand("editor.action.insertLineAfter")))(Y),await this.commandService.executeCommand("editor.action.triggerSuggest")}get removeInlineValuesScheduler(){return new R.RunOnceScheduler(()=>{this.oldDecorations.clear()},100)}get updateInlineValuesScheduler(){const K=this.editor.getModel();return new R.RunOnceScheduler(async()=>await this.updateInlineValueDecorations(this.debugService.getViewModel().focusedStackFrame),K?this.debounceInfo.get(K):H)}async updateInlineValueDecorations(K){const Y="{0} = {1}",ee=", ",ie=this.editor.getModel(),re=this.configurationService.getValue("debug").inlineValues;if(!(re===!0||re==="on"||re==="auto"&&ie&&this.languageFeaturesService.inlineValuesProvider.has(ie))||!ie||!K||ie.uri.toString()!==K.source.uri.toString()){this.removeInlineValuesScheduler.isScheduled()||this.removeInlineValuesScheduler.schedule();return}this.removeInlineValuesScheduler.cancel();let se;if(this.languageFeaturesService.inlineValuesProvider.has(ie)){const te=async(Se,Ie)=>{const ve=await K.getMostSpecificScopes(K.range),be=Ie?Se:Se.toLowerCase();for(const ge of ve){const Ce=(await ge.getChildren()).find(De=>Ie?De.name===be:De.name.toLowerCase()===be);if(Ce)return Ce.value}},Z={frameId:K.frameId,stoppedLocation:new u.Range(K.range.startLineNumber,K.range.startColumn+1,K.range.endLineNumber,K.range.endColumn+1)},ne=new b.CancellationTokenSource().token,ce=this.editor.getVisibleRangesPlusViewportAboveBelow(),de=this.languageFeaturesService.inlineValuesProvider.ordered(ie).reverse();se=[];const he=new Map,pe=(0,S.flatten)(de.map(Se=>ce.map(Ie=>Promise.resolve(Se.provideInlineValues(ie,Ie,Z,ne)).then(async ve=>{if(ve)for(const be of ve){let ge;switch(be.type){case"text":ge=be.text;break;case"variable":{let ue=be.variableName;ue||(ue=ie.getLineContent(be.range.startLineNumber).substring(be.range.startColumn-1,be.range.endColumn-1));const Ce=await te(ue,be.caseSensitiveLookup);Ce&&(ge=p.format(Y,ue,Ce));break}case"expression":{let ue=be.expression;if(ue||(ue=ie.getLineContent(be.range.startLineNumber).substring(be.range.startColumn-1,be.range.endColumn-1)),ue){const Ce=new L.Expression(ue);await Ce.evaluate(K.thread.session,K,"watch",!0),Ce.available&&(ge=p.format(Y,ue,Ce.value))}break}}if(ge){const ue=be.range.startLineNumber;let Ce=he.get(ue);Ce||(Ce=[],he.set(ue,Ce)),Ce.some(De=>De.text===ge)||Ce.push(new W(be.range.startColumn,ge))}}},ve=>{(0,C.onUnexpectedExternalError)(ve)})))),me=Date.now();await Promise.all(pe),this.updateInlineValuesScheduler.delay=this.debounceInfo.update(ie,Date.now()-me),he.forEach((Se,Ie)=>{if(Se.length>0){Se=Se.sort((be,ge)=>be.column-ge.column);const ve=Se.map(be=>be.text).join(ee);se.push(...U(Ie,ve))}})}else{const te=await K.getMostSpecificScopes(K.range),Z=await Promise.all(te.map(async ne=>{const ce=await ne.getChildren();let de=new u.Range(0,0,K.range.startLineNumber,K.range.startColumn);return ne.range&&(de=de.setStartPosition(ne.range.startLineNumber,ne.range.startColumn)),q(ce,de,ie,this.wordToLineNumbersMap)}));se=(0,S.distinct)(Z.reduce((ne,ce)=>ne.concat(ce),[]),ne=>`${ne.range.startLineNumber}:${ne?.options.after?.content}`)}this.oldDecorations.set(se)}dispose(){this.hoverWidget&&this.hoverWidget.dispose(),this.configurationWidget&&this.configurationWidget.dispose(),this.toDispose=(0,h.dispose)(this.toDispose),this.oldDecorations.clear()}};we([a.memoize],Q.prototype,"showHoverScheduler",null),we([a.memoize],Q.prototype,"hideHoverScheduler",null),we([a.memoize],Q.prototype,"removeInlineValuesScheduler",null),we([a.memoize],Q.prototype,"updateInlineValuesScheduler",null),Q=we([F(1,l.IDebugService),F(2,i.IInstantiationService),F(3,c.ICommandService),F(4,f.IConfigurationService),F(5,D.IHostService),F(6,T.IUriIdentityService),F(7,_.IContextKeyService),F(8,P.ILanguageFeaturesService),F(9,B.ILanguageFeatureDebounceService)],Q),e.DebugEditorContribution=Q}),define(ae[2778],le([1,0,11,87,192,37,5,38,397,8,129,76,328,685,7,45,41,12,27,201,15,1623,29,84,464]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"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 v=1024;let m=!1,w=!1,D=class extends S.ViewPane{constructor(B,V,z,x,H,W,U,$,q,X,G,Q){super(B,x,V,U,$,W,H,q,X,G),this.debugService=z,this.needsRefresh=!1,this.menu=Q.createMenu(n.MenuId.DebugWatchContext,$),this._register(this.menu),this.watchExpressionsUpdatedScheduler=new t.RunOnceScheduler(()=>{this.needsRefresh=!1,this.tree.updateChildren()},50),this.watchExpressionsExist=p.CONTEXT_WATCH_EXPRESSIONS_EXIST.bindTo($),this.variableReadonly=p.CONTEXT_VARIABLE_IS_READONLY.bindTo($),this.watchExpressionsExist.set(this.debugService.getModel().getWatchExpressions().length>0),this.watchItemType=p.CONTEXT_WATCH_ITEM_TYPE.bindTo($)}renderBody(B){super.renderBody(B),this.element.classList.add("debug-pane"),B.classList.add("debug-watch");const V=(0,I.renderViewTree)(B),z=this.instantiationService.createInstance(L),x=this.instantiationService.createInstance(h.LinkDetector);this.tree=this.instantiationService.createInstance(C.WorkbenchAsyncDataTree,"WatchExpressions",V,new y,[z,this.instantiationService.createInstance(u.VariablesRenderer,x)],new _,{accessibilityProvider:new O,identityProvider:{getId:W=>W.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:W=>{if(W!==this.debugService.getViewModel().getSelectedExpression()?.expression)return W.name}},dnd:new N(this.debugService),overrideStyles:{listBackground:this.getBackgroundColor()}}),this.tree.setInput(this.debugService),p.CONTEXT_WATCH_EXPRESSIONS_FOCUSED.bindTo(this.tree.contextKeyService),this._register(this.tree.onContextMenu(W=>this.onContextMenu(W))),this._register(this.tree.onMouseDblClick(W=>this.onMouseDblClick(W))),this._register(this.debugService.getModel().onDidChangeWatchExpressions(async W=>{this.watchExpressionsExist.set(this.debugService.getModel().getWatchExpressions().length>0),this.isBodyVisible()?(W&&!W.name&&(w=!0),await this.tree.updateChildren(),w=!1,W instanceof R.Expression&&this.tree.reveal(W)):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(()=>{m||this.tree.updateChildren()})),this._register(this.onDidChangeBodyVisibility(W=>{W&&this.needsRefresh&&this.watchExpressionsUpdatedScheduler.schedule()}));let H;this._register(this.debugService.getViewModel().onDidSelectExpression(W=>{const U=W?.expression;U instanceof R.Expression||U instanceof R.Variable&&W?.settingWatch?(H=this.tree.options.horizontalScrolling,H&&this.tree.updateOptions({horizontalScrolling:!1}),U.name&&this.tree.rerender(U)):!U&&H!==void 0&&(this.tree.updateOptions({horizontalScrolling:H}),H=void 0)})),this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async W=>{W instanceof R.Variable&&this.tree.hasNode(W)&&(await this.tree.updateChildren(W,!1,!0),await this.tree.expand(W))}))}layoutBody(B,V){super.layoutBody(B,V),this.tree.layout(B,V)}focus(){this.tree.domFocus()}collapseAll(){this.tree.collapseAll()}onMouseDblClick(B){if(B.browserEvent.target.className.indexOf("twistie")>=0)return;const V=B.element,z=this.debugService.getViewModel().getSelectedExpression();V instanceof R.Expression&&V!==z?.expression?this.debugService.getViewModel().setSelectedExpression(V,!1):V||this.debugService.addWatchExpression()}onContextMenu(B){const V=B.element,z=this.tree.getSelection();this.watchItemType.set(V instanceof R.Expression?"expression":V instanceof R.Variable?"variable":void 0);const x=[],H=V instanceof R.Variable?V.presentationHint?.attributes:void 0;this.variableReadonly.set(!!H&&H.indexOf("readOnly")>=0||!!V?.presentationHint?.lazy),(0,g.createAndFillInContextMenuActions)(this.menu,{arg:V,shouldForwardArgs:!0},x),this.contextMenuService.showContextMenu({getAnchor:()=>B.anchor,getActions:()=>x,getActionsContext:()=>V&&z.includes(V)?z:V?[V]:[]})}};D=we([F(1,A.IContextMenuService),F(2,p.IDebugService),F(3,E.IKeybindingService),F(4,k.IInstantiationService),F(5,f.IViewDescriptorService),F(6,b.IConfigurationService),F(7,i.IContextKeyService),F(8,c.IOpenerService),F(9,l.IThemeService),F(10,s.ITelemetryService),F(11,n.IMenuService)],D),e.WatchExpressionsView=D;class y{getHeight(B){return 22}getTemplateId(B){return B instanceof R.Expression?L.ID:u.VariablesRenderer.ID}}function T(P){return typeof P.getConfigurationManager=="function"}class _{hasChildren(B){return T(B)||B.hasChildren}getChildren(B){if(T(B)){const V=B,z=V.getModel().getWatchExpressions(),x=V.getViewModel();return Promise.all(z.map(H=>!!H.name&&!w?H.evaluate(x.focusedSession,x.focusedStackFrame,"watch").then(()=>H):Promise.resolve(H)))}return B.getChildren()}}let L=class Rl extends I.AbstractExpressionsRenderer{constructor(B,V,z,x,H){super(z,x,H),this.menuService=B,this.contextKeyService=V}get templateId(){return Rl.ID}renderExpression(B,V,z){const x=typeof B.value=="string"?`${B.name}:`:B.name;let H;B.type?H=B.type===B.value?B.type:`${B.type}: ${B.value}`:H=B.value,V.label.set(x,z,H),(0,I.renderExpressionValue)(B,V.value,{showChanged:!0,maxValueLength:v,showHover:!0,colorize:!0})}getInputBoxOptions(B,V){return V?{initialValue:B.value,ariaLabel:(0,a.localize)(0,null),onFinish:async(z,x)=>{if(x&&z){const H=this.debugService.getViewModel().focusedStackFrame;H&&(B instanceof R.Variable||B instanceof R.Expression)&&(await B.setExpression(z,H),this.debugService.getViewModel().updateViews())}}}:{initialValue:B.name?B.name:"",ariaLabel:(0,a.localize)(1,null),placeholder:(0,a.localize)(2,null),onFinish:(z,x)=>{x&&z?(this.debugService.renameWatchExpression(B.getId(),z),m=!0,this.debugService.getViewModel().updateViews(),m=!1):B.name||this.debugService.removeWatchExpressions(B.getId())}}}renderActionBar(B,V){const z=M(this.contextKeyService),x=this.menuService.createMenu(n.MenuId.DebugWatchContext,z),H=[],W=V;(0,g.createAndFillInContextMenuActions)(x,{arg:W,shouldForwardArgs:!1},{primary:H,secondary:[]},"inline"),B.clear(),B.context=W,B.push(H,{icon:!0,label:!1})}};L.ID="watchexpression",L=we([F(0,n.IMenuService),F(1,i.IContextKeyService),F(2,p.IDebugService),F(3,A.IContextViewService),F(4,l.IThemeService)],L),e.WatchExpressionsRenderer=L;function M(P){return P.createOverlay([[p.CONTEXT_WATCH_ITEM_TYPE.key,"expression"]])}class O{getWidgetAriaLabel(){return(0,a.localize)(3,null)}getAriaLabel(B){return B instanceof R.Expression?(0,a.localize)(4,null,B.name,B.value):(0,a.localize)(5,null,B.name,B.value)}}class N{constructor(B){this.debugService=B}onDragOver(B){if(!(B instanceof r.ElementsDragAndDropData))return!1;const V=B.elements;return V.length>0&&V[0]instanceof R.Expression}getDragURI(B){return!(B instanceof R.Expression)||B===this.debugService.getViewModel().getSelectedExpression()?.expression?null:B.getId()}getDragLabel(B){if(B.length===1)return B[0].name}drop(B,V){if(!(B instanceof r.ElementsDragAndDropData))return;const z=B.elements[0],x=this.debugService.getModel().getWatchExpressions(),H=V instanceof R.Expression?x.indexOf(V):x.length-1;this.debugService.moveWatchExpression(z.getId(),H)}}(0,n.registerAction2)(class extends S.ViewAction{constructor(){super({id:"watch.collapse",viewId:p.WATCH_VIEW_ID,title:(0,a.localize)(6,null),f1:!1,icon:o.Codicon.collapseAll,precondition:p.CONTEXT_WATCH_EXPRESSIONS_EXIST,menu:{id:n.MenuId.ViewTitle,order:30,group:"navigation",when:i.ContextKeyExpr.equals("view",p.WATCH_VIEW_ID)}})}runInView(B,V){V.collapseAll()}}),e.ADD_WATCH_ID="workbench.debug.viewlet.action.addWatchExpression",e.ADD_WATCH_LABEL=(0,a.localize)(7,null),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.ADD_WATCH_ID,title:e.ADD_WATCH_LABEL,f1:!1,icon:d.watchExpressionsAdd,menu:{id:n.MenuId.ViewTitle,group:"navigation",when:i.ContextKeyExpr.equals("view",p.WATCH_VIEW_ID)}})}run(B){B.get(p.IDebugService).addWatchExpression()}}),e.REMOVE_WATCH_EXPRESSIONS_COMMAND_ID="workbench.debug.viewlet.action.removeAllWatchExpressions",e.REMOVE_WATCH_EXPRESSIONS_LABEL=(0,a.localize)(8,null),(0,n.registerAction2)(class extends n.Action2{constructor(){super({id:e.REMOVE_WATCH_EXPRESSIONS_COMMAND_ID,title:e.REMOVE_WATCH_EXPRESSIONS_LABEL,f1:!1,icon:d.watchExpressionsRemoveAll,precondition:p.CONTEXT_WATCH_EXPRESSIONS_EXIST,menu:{id:n.MenuId.ViewTitle,order:20,group:"navigation",when:i.ContextKeyExpr.equals("view",p.WATCH_VIEW_ID)}})}run(B){B.get(p.IDebugService).removeWatchExpressions()}})}),define(ae[552],le([1,0,16,11,32,6,144,2,52,14,13,8,82,5,46,172,23,27,535,51,39,69,78]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExperimentService=e.getCurrentActivationRecord=e.currentSchemaVersion=e.IExperimentService=e.ExperimentActionType=e.ExperimentState=void 0;var g;(function(y){y[y.Evaluating=0]="Evaluating",y[y.NoRun=1]="NoRun",y[y.Run=2]="Run",y[y.Complete=3]="Complete"})(g=e.ExperimentState||(e.ExperimentState={}));var h;(function(y){y.Custom="Custom",y.Prompt="Prompt",y.AddToRecommendations="AddToRecommendations",y.ExtensionSearchResults="ExtensionSearchResults"})(h=e.ExperimentActionType||(e.ExperimentActionType={})),e.IExperimentService=(0,u.createDecorator)("experimentService"),e.currentSchemaVersion=5;const v=y=>"experimentEventRecord-"+y.replace(/[^0-9a-z]/ig,"-"),m=(y,T=7)=>{const L=Date.now();if(!y)return{count:new Array(T).fill(0),mostRecentBucket:L};const M=Math.min(T,Math.floor((L-y.mostRecentBucket)/864e5));return M?{count:new Array(M).fill(0).concat(y.count.slice(0,-M)),mostRecentBucket:y.mostRecentBucket+M*864e5}:y};e.getCurrentActivationRecord=m;let w=class extends E.Disposable{constructor(T,_,L,M,O,N,P,B,V,z,x){super(),this.storageService=T,this.extensionManagementService=_,this.textFileService=L,this.telemetryService=M,this.lifecycleService=O,this.requestService=N,this.configurationService=P,this.productService=B,this.workspaceTagsService=V,this.extensionService=z,this.environmentService=x,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(T){return this._loadExperimentsPromise.then(()=>this._experiments.filter(_=>_.id===T)[0])}getExperimentsByType(T){return this._loadExperimentsPromise.then(()=>T===h.Custom?this._experiments.filter(_=>_.enabled&&(!_.action||_.action.type===T)):this._experiments.filter(_=>_.enabled&&_.action&&_.action.type===T))}getCuratedExtensionsList(T){return this._loadExperimentsPromise.then(()=>{for(const _ of this._experiments)if(_.enabled&&_.state===2&&this._curatedMapping[_.id]&&this._curatedMapping[_.id].curatedExtensionsKey===T)return this._curatedMapping[_.id].curatedExtensionsList;return[]})}markAsCompleted(T){const _="experiments."+T,L=D(this.storageService.get(_,-1),{});L.state=3,this.storageService.store(_,JSON.stringify(L),-1,1)}async getExperiments(){if(this.environmentService.enableSmokeTestDriver||this.environmentService.extensionTestsLocationURI)return[];const T=this.configurationService.getValue("_workbench.experimentsUrl")||this.productService.experimentsUrl;if(!T||this.configurationService.getValue("workbench.enableExperiments")===!1)return[];try{const _=await this.requestService.request({type:"GET",url:T},R.CancellationToken.None);if(_.res.statusCode!==200)return null;const L=await(0,f.asJson)(_);return L&&Array.isArray(L.experiments)?L.experiments:[]}catch{return null}}loadExperiments(){return this.getExperiments().then(T=>{if(!T){const N=D(this.storageService.get("allExperiments",-1),[]);return Array.isArray(N)&&N.forEach(P=>{const B="experiments."+P,V=D(this.storageService.get(B,-1),null);V&&this._experiments.push({id:P,raw:void 0,enabled:V.enabled,state:V.state})}),Promise.resolve(null)}T=T.filter(N=>(N.schemaVersion||0)<=e.currentSchemaVersion);const _=D(this.storageService.get("allExperiments",-1),[]),L=T.filter(N=>!!N.enabled).map(N=>N.id.toLowerCase());Array.isArray(_)&&_.forEach(N=>{L.indexOf(N)===-1&&this.storageService.remove(`experiments.${N}`,-1)}),L.length?this.storageService.store("allExperiments",JSON.stringify(L),-1,1):this.storageService.remove("allExperiments",-1);const M=new Set(T.map(N=>N.condition?.activationEvent?.event).filter(S.isDefined).flatMap(N=>typeof N=="string"?[N]:[]));M.size&&this._register(this.extensionService.onWillActivateByEvent(N=>{M.has(N.event)&&this.recordActivatedEvent(N.event)}));const O=T.map(N=>this.evaluateExperiment(N));return Promise.all(O).then(()=>{this.telemetryService.publicLog2("experiments",{experiments:this._experiments.map(N=>N.id)})})})}evaluateExperiment(T){const _={id:T.id,raw:T,enabled:!!T.enabled,state:T.enabled?0:1},L=T.action2||T.action;if(L&&(_.action={type:h[L.type]||h.Custom,properties:L.properties},_.action.type===h.Prompt&&(_.action.properties.commands||[]).forEach(N=>{N.curatedExtensionsKey&&Array.isArray(N.curatedExtensionsList)&&(this._curatedMapping[T.id]=N)}),_.action.properties||(_.action.properties={})),this._experiments=this._experiments.filter(N=>N.id!==_.id),this._experiments.push(_),!_.enabled)return Promise.resolve(null);const M="experiments."+T.id,O=D(this.storageService.get(M,-1),{});return O.hasOwnProperty("enabled")||(O.enabled=_.enabled),O.hasOwnProperty("state")?_.state=O.state:O.state=_.enabled?0:1,this.shouldRunExperiment(T,_).then(N=>(O.state=_.state=N,this.storageService.store(M,JSON.stringify(O),-1,1),N===2&&this.fireRunExperiment(_),Promise.resolve(null)))}fireRunExperiment(T){this._onExperimentEnabled.fire(T);const _=D(this.storageService.get("currentOrPreviouslyRunExperiments",-1),[]);_.indexOf(T.id)===-1&&_.push(T.id);const L=(0,t.distinct)(_);_.length!==L.length&&this.storageService.store("currentOrPreviouslyRunExperiments",JSON.stringify(L),-1,1)}checkExperimentDependencies(T){const _=T.condition?.experimentsPreviouslyRun;if(_){const L=D(this.storageService.get("currentOrPreviouslyRunExperiments",-1),[]);let M=!0,O=!0;const N=_.includes;Array.isArray(N)&&(M=L.some(B=>N.indexOf(B)>-1));const P=_.excludes;if(M&&Array.isArray(P)&&(O=!L.some(B=>P.indexOf(B)>-1)),!M||!O)return!1}return!0}recordActivatedEvent(T){const _=v(T),L=(0,e.getCurrentActivationRecord)(D(this.storageService.get(_,-1),void 0));L.count[0]++,this.storageService.store(_,JSON.stringify(L),-1,1),this._experiments.filter(M=>{const O=M.raw?.condition?.activationEvent?.event;return M.state!==0||!O?!1:typeof O=="string"?O===T:O?.includes(T)}).forEach(M=>this.evaluateExperiment(M.raw))}checkActivationEventFrequency(T){const _=T.condition?.activationEvent;if(!_)return!0;let L=0,M=0;const O=typeof _.event=="string"?[_.event]:_.event;for(const N of O){const{count:P}=(0,e.getCurrentActivationRecord)(D(this.storageService.get(v(N),-1),void 0));for(const B of P)B>0&&(M++,L+=B)}return L>=_.minEvents&&(!_.uniqueDays||M>=_.uniqueDays)}shouldRunExperiment(T,_){if(_.state!==0)return Promise.resolve(_.state);if(!T.enabled)return Promise.resolve(1);const L=T.condition;if(!L)return Promise.resolve(2);if(T.condition?.os&&!T.condition.os.includes(b.OS)||!this.checkExperimentDependencies(T))return Promise.resolve(1);for(const[V,z]of Object.entries(T.condition?.userSetting||{}))if(!(0,I.equals)(this.configurationService.getValue(V),z))return Promise.resolve(1);if(!this.checkActivationEventFrequency(T))return Promise.resolve(0);if(this.productService.quality==="stable"&&L.insidersOnly===!0)return Promise.resolve(1);const M=!this.storageService.get(l.lastSessionDateStorageKey,-1);if(L.newUser===!0&&!M||L.newUser===!1&&M)return Promise.resolve(1);if(typeof L.displayLanguage=="string"){let V=L.displayLanguage.toLowerCase(),z=b.language.toLowerCase();if(V!==z){const x=z.indexOf("-"),H=V.indexOf("-");if(x>-1&&(z=z.substr(0,x)),H>-1&&(V=V.substr(0,H)),z!==V)return Promise.resolve(1)}}L.userProbability||(L.userProbability=1);let O=Promise.resolve(!0);const N=L.installedExtensions;N&&(O=this.extensionManagementService.getInstalled(1).then(V=>{let z=!0,x=!0;const H=V.map(W=>`${W.manifest.publisher.toLowerCase()}.${W.manifest.name.toLowerCase()}`);if(Array.isArray(N.includes)&&N.includes.length){const W=N.includes.map(U=>U.toLowerCase());z=H.some(U=>W.indexOf(U)>-1)}if(Array.isArray(N.excludes)&&N.excludes.length){const W=N.excludes.map(U=>U.toLowerCase());x=!H.some(U=>W.indexOf(U)>-1)}return z&&x}));const P="experiments."+T.id,B=D(this.storageService.get(P,-1),{});return O.then(V=>{const z=L.fileEdits;if(!V||!z||typeof z.minEditCount!="number")return V&&typeof L.userProbability=="number"&&Math.random()<L.userProbability?2:1;if(B.editCount=B.editCount||0,B.editCount>=z.minEditCount)return 2;const x=this._register(new p.RunOnceWorker(W=>{const U=new Date().toDateString(),$=D(this.storageService.get(P,-1),{});if($.state!==0){H.dispose(),x.dispose();return}W.forEach(async q=>{if($.state!==0||U===$.lastEditedDate||typeof $.editCount=="number"&&$.editCount>=z.minEditCount)return;let X=!0,G=!0;if(typeof z.filePathPattern=="string"&&(X=(0,k.match)(z.filePathPattern,q.resource.fsPath)),Array.isArray(z.workspaceIncludes)&&z.workspaceIncludes.length){const Q=await this.workspaceTagsService.getTags();G=!!Q&&z.workspaceIncludes.some(j=>!!Q[j])}if(G&&Array.isArray(z.workspaceExcludes)&&z.workspaceExcludes.length){const Q=await this.workspaceTagsService.getTags();G=!!Q&&!z.workspaceExcludes.some(j=>!!Q[j])}X&&G&&($.editCount=($.editCount||0)+1,$.lastEditedDate=U,this.storageService.store(P,JSON.stringify($),-1,1))}),typeof $.editCount=="number"&&$.editCount>=z.minEditCount&&(_.state=$.state=typeof L.userProbability=="number"&&Math.random()<L.userProbability&&this.checkExperimentDependencies(T)?2:1,this.storageService.store(P,JSON.stringify($),-1,1),$.state===2&&_.action&&h[_.action.type]===h.Prompt&&this.fireRunExperiment(_))},250)),H=this._register(this.textFileService.files.onDidSave(W=>x.work(W.model)));return 0})}};w=we([F(0,c.IStorageService),F(1,r.IExtensionManagementService),F(2,o.ITextFileService),F(3,l.ITelemetryService),F(4,a.ILifecycleService),F(5,f.IRequestService),F(6,C.IConfigurationService),F(7,i.IProductService),F(8,s.IWorkspaceTagsService),F(9,n.IExtensionService),F(10,d.IWorkbenchEnvironmentService)],w),e.ExperimentService=w;function D(y,T){try{return y&&JSON.parse(y)||T}catch{return T}}}),define(ae[2779],le([1,0,26,552,119,2,14,41,9,31,91]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExperimentalPrompts=void 0;let C=class Gs extends A.Disposable{constructor(u,i,f,c,l){super(),this.experimentService=u,this.paneCompositeService=i,this.notificationService=f,this.openerService=c,this.commandService=l,this._register(this.experimentService.onExperimentEnabled(s=>{s.action&&s.action.type===p.ExperimentActionType.Prompt&&s.state===2&&this.showExperimentalPrompts(s)},this))}showExperimentalPrompts(u){if(!u||!u.enabled||!u.action||u.state!==2)return;const i=u.action.properties,f=Gs.getLocalizedText(i.promptText,k.language||"");if(!i||!f)return;i.commands||(i.commands=[]);const c=i.commands.map(l=>({label:Gs.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(R.VIEWLET_ID,0,!0).then(d=>d?.getViewPaneContainer()).then(d=>{d?.search("curated:"+l.curatedExtensionsKey)}):l.codeCommand&&this.commandService.executeCommand(l.codeCommand.id,...l.codeCommand.arguments),this.experimentService.markAsCompleted(u.id)}}));this.notificationService.prompt(t.Severity.Info,f,c,{onCancel:()=>{this.experimentService.markAsCompleted(u.id)}})}static getLocalizedText(u,i){if(typeof u=="string")return u;const f=u.en||u["en-us"];return i=i.toLowerCase(),!u[i]&&i.indexOf("-")===2&&(i=i.substr(0,2)),u[i]||f}};C=we([F(0,p.IExperimentService),F(1,S.IPaneCompositePartService),F(2,t.INotificationService),F(3,E.IOpenerService),F(4,b.ICommandService)],C),e.ExperimentalPrompts=C}),define(ae[2780],le([1,0,1642,35,552,17,44,2779,55,214]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSingleton)(R.IExperimentService,R.ExperimentService,1),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(E.ExperimentalPrompts,4),A.Registry.as(I.Extensions.Configuration).registerConfiguration({...b.workbenchConfigurationNodeBase,properties:{"workbench.enableExperiments":{type:"boolean",description:(0,t.localize)(0,null),default:!0,scope:1,restricted:!0,tags:["usesOnlineServices"]}}})}),define(ae[2781],le([1,0,16,285,552,13,82]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExperimentalRecommendations=void 0;let E=class extends p.ExtensionRecommendations{get recommendations(){return this._recommendations}constructor(b){super(),this.experimentService=b,this._recommendations=[]}async doActivate(){const b=await this.experimentService.getExperimentsByType(R.ExperimentActionType.AddToRecommendations);for(const{action:S,state:C}of b)if(C===2&&(0,t.isNonEmptyArray)(S?.properties?.recommendations)&&S?.properties?.recommendationReason)for(const r of S.properties.recommendations)try{(0,A.isString)(r)&&k.EXTENSION_IDENTIFIER_REGEX.test(r)&&this._recommendations.push({extensionId:r.toLowerCase(),reason:{reasonId:5,reasonText:S.properties.recommendationReason}})}catch{}}};E=we([F(0,R.IExperimentService)],E),e.ExperimentalRecommendations=E}),define(ae[2782],le([1,0,2,82,274,5,27,16,6,81,69,2389,2311,2781,2491,2670,2313,2314,2310,428,11,9,2488,119,100]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionRecommendationsService=void 0;let v=class extends t.Disposable{constructor(w,D,y,T,_,L,M,O,N){if(super(),this.lifecycleService=D,this.galleryService=y,this.telemetryService=T,this.environmentService=_,this.extensionManagementService=L,this.extensionRecommendationsManagementService=M,this.extensionRecommendationNotificationService=O,this.extensionsWorkbenchService=N,this._onDidChangeRecommendations=this._register(new I.Emitter),this.onDidChangeRecommendations=this._onDidChangeRecommendations.event,this.workspaceRecommendations=w.createInstance(i.WorkspaceRecommendations),this.fileBasedRecommendations=w.createInstance(f.FileBasedRecommendations),this.experimentalRecommendations=w.createInstance(u.ExperimentalRecommendations),this.configBasedRecommendations=w.createInstance(s.ConfigBasedRecommendations),this.exeBasedRecommendations=w.createInstance(r.ExeBasedRecommendations),this.dynamicWorkspaceRecommendations=w.createInstance(C.DynamicWorkspaceRecommendations),this.keymapRecommendations=w.createInstance(c.KeymapRecommendations),this.webRecommendations=w.createInstance(o.WebRecommendations),this.languageRecommendations=w.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(P=>this.onDidInstallExtensions(P)))}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:w,isRecommended:D})=>{if(!D){const y=this.getAllRecommendationsWithReason()[w];y&&y.reasonId&&this.telemetryService.publicLog2("extensionsRecommendations:ignoreRecommendation",{extensionId:w,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 w=Object.create(null),D=[...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 D)this.isExtensionAllowedToBeRecommended(y)&&(w[y.toLowerCase()]=T);return w}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 w=[...this.configBasedRecommendations.otherRecommendations,...this.exeBasedRecommendations.otherRecommendations,...this.dynamicWorkspaceRecommendations.recommendations,...this.experimentalRecommendations.recommendations,...this.webRecommendations.recommendations],D=(0,E.distinct)(w.map(y=>y.extensionId)).filter(y=>this.isExtensionAllowedToBeRecommended(y));return(0,E.shuffle)(D,this.sessionSeed),D}async getImportantRecommendations(){await this.activateProactiveRecommendations();const w=[...this.fileBasedRecommendations.importantRecommendations,...this.configBasedRecommendations.importantRecommendations,...this.exeBasedRecommendations.importantRecommendations],D=(0,E.distinct)(w.map(y=>y.extensionId)).filter(y=>this.isExtensionAllowedToBeRecommended(y));return(0,E.shuffle)(D,this.sessionSeed),D}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(w){await this.exeBasedRecommendations.activate();const{important:D,others:y}=w?this.exeBasedRecommendations.getRecommendations(w):{important:this.exeBasedRecommendations.importantRecommendations,others:this.exeBasedRecommendations.otherRecommendations};return{important:this.toExtensionRecommendations(D),others:this.toExtensionRecommendations(y)}}getFileBasedRecommendations(){return this.toExtensionRecommendations(this.fileBasedRecommendations.recommendations)}onDidInstallExtensions(w){for(const D of w)if(D.source&&!a.URI.isUri(D.source)&&D.operation===2){const T=(this.getAllRecommendationsWithReason()||{})[D.source.identifier.id.toLowerCase()];T&&this.telemetryService.publicLog("extensionGallery:install:recommendations",{...D.source.telemetryData,recommendationReason:T.reasonId})}}toExtensionRecommendations(w){return(0,E.distinct)(w.map(y=>y.extensionId)).filter(y=>this.isExtensionAllowedToBeRecommended(y))}isExtensionAllowedToBeRecommended(w){return!this.extensionRecommendationsManagementService.ignoredRecommendations.includes(w.toLowerCase())}get workbenchRecommendationDelay(){return 5e3}async promptWorkspaceRecommendations(){const w=await this.extensionsWorkbenchService.queryLocal(),D=[...this.workspaceRecommendations.recommendations,...this.configBasedRecommendations.importantRecommendations.filter(y=>!y.whenNotInstalled||y.whenNotInstalled.every(T=>w.every(_=>!(0,h.areSameExtensions)(_.identifier,{id:T}))))].map(({extensionId:y})=>y).filter(y=>this.isExtensionAllowedToBeRecommended(y));D.length&&(await(0,n.timeout)(this.workbenchRecommendationDelay),await this.extensionRecommendationNotificationService.promptWorkspaceRecommendations(D))}};v=we([F(0,A.IInstantiationService),F(1,S.ILifecycleService),F(2,p.IExtensionGalleryService),F(3,k.ITelemetryService),F(4,b.IEnvironmentService),F(5,p.IExtensionManagementService),F(6,R.IExtensionIgnoredRecommendationsService),F(7,d.IExtensionRecommendationNotificationService),F(8,g.IExtensionsWorkbenchService)],v),e.ExtensionRecommendationsService=v}),define(ae[150],le([1,0,43,19,7,2,54,42,78,141,154,1699]),function(J,e,t,p,R,A,k,E,I,b,S,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.ViewHasSomeCollapsibleRootItemContext=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 R.RawContextKey("explorerViewletVisible",!0,{type:"boolean",description:(0,C.localize)(0,null)}),e.ExplorerFolderContext=new R.RawContextKey("explorerResourceIsFolder",!1,{type:"boolean",description:(0,C.localize)(1,null)}),e.ExplorerResourceReadonlyContext=new R.RawContextKey("explorerResourceReadonly",!1,{type:"boolean",description:(0,C.localize)(2,null)}),e.ExplorerResourceNotReadonlyContext=e.ExplorerResourceReadonlyContext.toNegated(),e.ExplorerResourceAvailableEditorIdsContext=new R.RawContextKey("explorerResourceAvailableEditorIds",""),e.ExplorerRootContext=new R.RawContextKey("explorerResourceIsRoot",!1,{type:"boolean",description:(0,C.localize)(3,null)}),e.ExplorerResourceCut=new R.RawContextKey("explorerResourceCut",!1,{type:"boolean",description:(0,C.localize)(4,null)}),e.ExplorerResourceMoveableToTrash=new R.RawContextKey("explorerResourceMoveableToTrash",!1,{type:"boolean",description:(0,C.localize)(5,null)}),e.FilesExplorerFocusedContext=new R.RawContextKey("filesExplorerFocus",!0,{type:"boolean",description:(0,C.localize)(6,null)}),e.OpenEditorsVisibleContext=new R.RawContextKey("openEditorsVisible",!1,{type:"boolean",description:(0,C.localize)(7,null)}),e.OpenEditorsFocusedContext=new R.RawContextKey("openEditorsFocus",!0,{type:"boolean",description:(0,C.localize)(8,null)}),e.ExplorerFocusedContext=new R.RawContextKey("explorerViewletFocus",!0,{type:"boolean",description:(0,C.localize)(9,null)}),e.ExplorerCompressedFocusContext=new R.RawContextKey("explorerViewletCompressedFocus",!0,{type:"boolean",description:(0,C.localize)(10,null)}),e.ExplorerCompressedFirstFocusContext=new R.RawContextKey("explorerViewletCompressedFirstFocus",!0,{type:"boolean",description:(0,C.localize)(11,null)}),e.ExplorerCompressedLastFocusContext=new R.RawContextKey("explorerViewletCompressedLastFocus",!0,{type:"boolean",description:(0,C.localize)(12,null)}),e.ViewHasSomeCollapsibleRootItemContext=new R.RawContextKey("viewHasSomeCollapsibleItem",!1,{type:"boolean",description:(0,C.localize)(13,null)}),e.FilesExplorerFocusCondition=R.ContextKeyExpr.and(e.ExplorerViewletVisibleContext,e.FilesExplorerFocusedContext,R.ContextKeyExpr.not(b.InputFocusedContextKey)),e.ExplorerFocusCondition=R.ContextKeyExpr.and(e.ExplorerViewletVisibleContext,e.ExplorerFocusedContext,R.ContextKeyExpr.not(b.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 r;(function(l){l.Default="default",l.Mixed="mixed",l.FilesFirst="filesFirst",l.Type="type",l.Modified="modified",l.FoldersNestsFiles="foldersNestsFiles"})(r=e.SortOrder||(e.SortOrder={}));var u;(function(l){l.Verbose="verbose",l.Default="default",l.Light="light"})(u=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 f=class Ir extends A.Disposable{constructor(s,d,n,a){super(),this.textFileService=s,this.fileService=d,this.languageService=n,this.modelService=a,this.fileWatcherDisposable=this._register(new A.MutableDisposable)}static async open(s,d,n,a,o){await a.openEditor({original:{resource:Ir.resourceToTextFile(d,s)},modified:{resource:s},label:n,options:o})}static resourceToTextFile(s,d){return d.with({scheme:s,query:JSON.stringify({scheme:d.scheme,query:d.query})})}static textFileToResource(s){const{scheme:d,query:n}=JSON.parse(s.query);return s.with({scheme:d,query:n})}async provideTextContent(s){if(!s.query)return null;const d=Ir.textFileToResource(s),n=await this.resolveEditorModel(s);return this.fileWatcherDisposable.value||(this.fileWatcherDisposable.value=this.fileService.onDidFilesChange(a=>{a.contains(d,0)&&this.resolveEditorModel(s,!1)}),n&&(0,S.once)(n.onWillDispose)(()=>this.fileWatcherDisposable.clear())),n}async resolveEditorModel(s,d=!0){const n=Ir.textFileToResource(s),a=await this.textFileService.readStream(n);let o=this.modelService.getModel(s);if(o)this.modelService.updateModel(o,a.value);else if(d){const g=this.modelService.getModel(n);let h;g?h=this.languageService.createById(g.getLanguageId()):h=this.languageService.createByFilepathOrFirstLine(n),o=this.modelService.createModel(a.value,h,s)}return o}};f=we([F(0,I.ITextFileService),F(1,p.IFileService),F(2,E.ILanguageService),F(3,k.IModelService)],f),e.TextFileContentProvider=f;class c{constructor(s,d){this._editor=s,this._group=d,this.id=c.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=c,c.COUNTER=0}),define(ae[249],le([1,0,1599,196,98,76,87,192,119,105,15,24,59,7,551,26,141,71,31,114,93,8,48,45,52,14,246,91,2454,2302,150]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DEBUG_CONSOLE_QUICK_ACCESS_PREFIX=e.DEBUG_QUICK_ACCESS_PREFIX=e.SELECT_DEBUG_SESSION_LABEL=e.SELECT_DEBUG_CONSOLE_LABEL=e.CALLSTACK_DOWN_LABEL=e.CALLSTACK_UP_LABEL=e.CALLSTACK_BOTTOM_LABEL=e.CALLSTACK_TOP_LABEL=e.OPEN_LOADED_SCRIPTS_LABEL=e.PREV_DEBUG_CONSOLE_LABEL=e.NEXT_DEBUG_CONSOLE_LABEL=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_AND_SUSPEND_LABEL=e.DISCONNECT_LABEL=e.PAUSE_LABEL=e.STEP_OUT_LABEL=e.STEP_INTO_TARGET_LABEL=e.STEP_INTO_LABEL=e.STEP_OVER_LABEL=e.RESTART_LABEL=e.DEBUG_COMMAND_CATEGORY=e.CALLSTACK_DOWN_ID=e.CALLSTACK_UP_ID=e.CALLSTACK_BOTTOM_ID=e.CALLSTACK_TOP_ID=e.SHOW_LOADED_SCRIPTS_ID=e.PREV_DEBUG_CONSOLE_ID=e.NEXT_DEBUG_CONSOLE_ID=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_DEBUG_SESSION_ID=e.SELECT_DEBUG_CONSOLE_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_AND_SUSPEND_ID=e.DISCONNECT_ID=e.PAUSE_ID=e.STEP_OUT_ID=e.STEP_INTO_TARGET_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_INTO_TARGET_ID="workbench.action.debug.stepIntoTarget",e.STEP_OUT_ID="workbench.action.debug.stepOut",e.PAUSE_ID="workbench.action.debug.pause",e.DISCONNECT_ID="workbench.action.debug.disconnect",e.DISCONNECT_AND_SUSPEND_ID="workbench.action.debug.disconnectAndSuspend",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.SELECT_DEBUG_CONSOLE_ID="workbench.action.debug.selectDebugConsole",e.SELECT_DEBUG_SESSION_ID="workbench.action.debug.selectDebugSession",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.NEXT_DEBUG_CONSOLE_ID="workbench.action.debug.nextConsole",e.PREV_DEBUG_CONSOLE_ID="workbench.action.debug.prevConsole",e.SHOW_LOADED_SCRIPTS_ID="workbench.action.debug.showLoadedScripts",e.CALLSTACK_TOP_ID="workbench.action.debug.callStackTop",e.CALLSTACK_BOTTOM_ID="workbench.action.debug.callStackBottom",e.CALLSTACK_UP_ID="workbench.action.debug.callStackUp",e.CALLSTACK_DOWN_ID="workbench.action.debug.callStackDown",e.DEBUG_COMMAND_CATEGORY={original:"Debug",value:t.localize(0,null)},e.RESTART_LABEL={value:t.localize(1,null),original:"Restart"},e.STEP_OVER_LABEL={value:t.localize(2,null),original:"Step Over"},e.STEP_INTO_LABEL={value:t.localize(3,null),original:"Step Into"},e.STEP_INTO_TARGET_LABEL={value:t.localize(4,null),original:"Step Into Target"},e.STEP_OUT_LABEL={value:t.localize(5,null),original:"Step Out"},e.PAUSE_LABEL={value:t.localize(6,null),original:"Pause"},e.DISCONNECT_LABEL={value:t.localize(7,null),original:"Disconnect"},e.DISCONNECT_AND_SUSPEND_LABEL={value:t.localize(8,null),original:"Disconnect and Suspend"},e.STOP_LABEL={value:t.localize(9,null),original:"Stop"},e.CONTINUE_LABEL={value:t.localize(10,null),original:"Continue"},e.FOCUS_SESSION_LABEL={value:t.localize(11,null),original:"Focus Session"},e.SELECT_AND_START_LABEL={value:t.localize(12,null),original:"Select and Start Debugging"},e.DEBUG_CONFIGURE_LABEL=t.localize(13,null,"launch.json"),e.DEBUG_START_LABEL={value:t.localize(14,null),original:"Start Debugging"},e.DEBUG_RUN_LABEL={value:t.localize(15,null),original:"Start Without Debugging"},e.NEXT_DEBUG_CONSOLE_LABEL={value:t.localize(16,null),original:"Focus Next Debug Console"},e.PREV_DEBUG_CONSOLE_LABEL={value:t.localize(17,null),original:"Focus Previous Debug Console"},e.OPEN_LOADED_SCRIPTS_LABEL={value:t.localize(18,null),original:"Open Loaded Script..."},e.CALLSTACK_TOP_LABEL={value:t.localize(19,null),original:"Navigate to Top of Call Stack"},e.CALLSTACK_BOTTOM_LABEL={value:t.localize(20,null),original:"Navigate to Bottom of Call Stack"},e.CALLSTACK_UP_LABEL={value:t.localize(21,null),original:"Navigate Up Call Stack"},e.CALLSTACK_DOWN_LABEL={value:t.localize(22,null),original:"Navigate Down Call Stack"},e.SELECT_DEBUG_CONSOLE_LABEL={value:t.localize(23,null),original:"Select Debug Console"},e.SELECT_DEBUG_SESSION_LABEL={value:t.localize(24,null),original:"Select Debug Session"},e.DEBUG_QUICK_ACCESS_PREFIX="debug ",e.DEBUG_CONSOLE_QUICK_ACCESS_PREFIX="debug consoles ";function _($){return $&&typeof $.sessionId=="string"&&typeof $.threadId=="string"}async function L($,q,X){const G=$.get(k.IDebugService);let Q;if(_(q)){const j=G.getModel().getSession(q.sessionId);j&&(Q=j.getAllThreads().find(K=>K.getId()===q.threadId))}else if(N(q)){const j=G.getModel().getSession(q.sessionId);if(j){const K=j.getAllThreads();Q=K.length>0?K[0]:void 0}}if(!Q&&(Q=G.getViewModel().focusedThread,!Q)){const j=G.getViewModel().focusedSession,K=j?j.getAllThreads():void 0;Q=K&&K.length?K[0]:void 0}Q&&await X(Q)}function M($){return $&&typeof $.sessionId=="string"&&typeof $.threadId=="string"&&typeof $.frameId=="string"}function O($,q){if(M(q)){const X=$.getModel().getSession(q.sessionId);if(X){const G=X.getAllThreads().find(Q=>Q.getId()===q.threadId);if(G)return G.getCallStack().find(Q=>Q.getId()===q.frameId)}}}function N($){return $&&typeof $.sessionId=="string"}async function P($,q){const X=$.get(k.IDebugService),G=$.get(g.IViewsService),Q=X.getModel().getSessions(!0).filter(Y=>Y.hasSeparateRepl());let j=X.getViewModel().focusedSession,K=0;if(Q.length>0&&j){for(;j&&!j.hasSeparateRepl();)j=j.parentSession;if(j){const Y=Q.indexOf(j);q?K=Y===Q.length-1?0:Y+1:K=Y===0?Q.length-1:Y-1}}await X.focusStackFrame(void 0,void 0,Q[K],{explicit:!0}),G.isViewVisible(k.REPL_VIEW_ID)||await G.openView(k.REPL_VIEW_ID,!0)}async function B($,q){const X=$.getViewModel().focusedStackFrame;if(X){let G=X.thread.getCallStack(),Q=G.findIndex(K=>K.frameId===X.frameId),j;if(q){if(Q>=G.length-1)if(X.thread.reachedEndOfCallStack){z($);return}else await $.getModel().fetchCallstack(X.thread,20),G=X.thread.getCallStack(),Q=G.findIndex(K=>K.frameId===X.frameId);j=x(!0,G,Q)}else{if(Q<=0){V($);return}j=x(!1,G,Q)}j&&$.focusStackFrame(j)}}async function V($){const q=$.getViewModel().focusedThread;if(q){await $.getModel().fetchCallstack(q);const X=q.getCallStack();if(X.length>0){const G=x(!1,X,0);G&&$.focusStackFrame(G)}}}function z($){const q=$.getViewModel().focusedThread;q&&$.focusStackFrame(q.getTopStackFrame())}function x($,q,X){X>=q.length?X=q.length-1:X<0&&(X=0);let G=X,Q;do if($?G===q.length-1?G=0:G++:G===0?G=q.length-1:G--,Q=q[G],!(Q.source.presentationHint==="deemphasize"||Q.presentationHint==="deemphasize"))return Q;while(G!==X)}s.CommandsRegistry.registerCommand({id:e.COPY_STACK_TRACE_ID,handler:async($,q,X)=>{const G=$.get(d.ITextResourcePropertiesService),Q=$.get(n.IClipboardService),j=O($.get(k.IDebugService),X);if(j){const K=G.getEOL(j.source.uri);await Q.writeText(j.thread.getCallStack().map(Y=>Y.toString()).join(K))}}}),s.CommandsRegistry.registerCommand({id:e.REVERSE_CONTINUE_ID,handler:async($,q,X)=>{await L($,X,G=>G.reverseContinue())}}),s.CommandsRegistry.registerCommand({id:e.STEP_BACK_ID,handler:async($,q,X)=>{const G=$.get(u.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(G)?await L($,X,Q=>Q.stepBack("instruction")):await L($,X,Q=>Q.stepBack())}}),s.CommandsRegistry.registerCommand({id:e.TERMINATE_THREAD_ID,handler:async($,q,X)=>{await L($,X,G=>G.terminate())}}),s.CommandsRegistry.registerCommand({id:e.JUMP_TO_CURSOR_ID,handler:async $=>{const X=$.get(k.IDebugService).getViewModel().focusedStackFrame,Q=$.get(C.IEditorService).activeTextEditorControl,j=$.get(f.INotificationService),K=$.get(o.IQuickInputService);if(X&&(0,b.isCodeEditor)(Q)&&Q.hasModel()){const Y=Q.getPosition(),ee=Q.getModel().uri,ie=X.thread.session.getSourceForUri(ee);if(ie){const oe=(await X.thread.session.gotoTargets(ie.raw,Y.lineNumber,Y.column))?.body.targets;if(oe&&oe.length){let se=oe[0].id;if(oe.length>1){const te=oe.map(ne=>({label:ne.label,_id:ne.id})),Z=await K.pick(te,{placeHolder:t.localize(25,null)});if(!Z)return;se=Z._id}return await X.thread.session.goto(X.thread.threadId,se).catch(te=>j.warn(te))}}}return j.warn(t.localize(26,null))}}),s.CommandsRegistry.registerCommand({id:e.CALLSTACK_TOP_ID,handler:async($,q,X)=>{const G=$.get(k.IDebugService);z(G)}}),s.CommandsRegistry.registerCommand({id:e.CALLSTACK_BOTTOM_ID,handler:async($,q,X)=>{const G=$.get(k.IDebugService);await V(G)}}),s.CommandsRegistry.registerCommand({id:e.CALLSTACK_UP_ID,handler:async($,q,X)=>{const G=$.get(k.IDebugService);B(G,!1)}}),s.CommandsRegistry.registerCommand({id:e.CALLSTACK_DOWN_ID,handler:async($,q,X)=>{const G=$.get(k.IDebugService);B(G,!0)}}),S.MenuRegistry.appendMenuItem(S.MenuId.EditorContext,{command:{id:e.JUMP_TO_CURSOR_ID,title:t.localize(27,null),category:e.DEBUG_COMMAND_CATEGORY},when:u.ContextKeyExpr.and(k.CONTEXT_JUMP_TO_CURSOR_SUPPORTED,r.EditorContextKeys.editorTextFocus),group:"debug",order:3}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.NEXT_DEBUG_CONSOLE_ID,weight:200+1,when:k.CONTEXT_IN_DEBUG_REPL,primary:2060,mac:{primary:3161},handler:async($,q,X)=>{P($,!0)}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.PREV_DEBUG_CONSOLE_ID,weight:200+1,when:k.CONTEXT_IN_DEBUG_REPL,primary:2059,mac:{primary:3159},handler:async($,q,X)=>{P($,!1)}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.RESTART_SESSION_ID,weight:200,primary:3135,when:k.CONTEXT_IN_DEBUG_MODE,handler:async($,q,X)=>{const G=$.get(k.IDebugService),Q=$.get(a.IConfigurationService);let j;if(N(X)?j=G.getModel().getSession(X.sessionId):j=G.getViewModel().focusedSession,j){const K=Q.getValue("debug").showSubSessionsInToolBar;for(;!K&&j&&j.parentSession;)j=j.parentSession;j.removeReplExpressions(),await G.restartSession(j)}else{const{launch:K,name:Y}=G.getConfigurationManager().selectedConfiguration;await G.startDebugging(K,Y,{noDebug:!1,startedByUser:!0})}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_OVER_ID,weight:200,primary:v.isWeb?580:68,when:k.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),handler:async($,q,X)=>{const G=$.get(u.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(G)?await L($,X,Q=>Q.next("instruction")):await L($,X,Q=>Q.next())}});const H=v.isWeb&&v.isWindows?581:69;R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_INTO_ID,weight:200+10,primary:H,when:k.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),handler:async($,q,X)=>{const G=$.get(u.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(G)?await L($,X,Q=>Q.stepIn("instruction")):await L($,X,Q=>Q.stepIn())}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_OUT_ID,weight:200,primary:1093,when:k.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),handler:async($,q,X)=>{const G=$.get(u.IContextKeyService);k.CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(G)?await L($,X,Q=>Q.stepOut("instruction")):await L($,X,Q=>Q.stepOut())}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.PAUSE_ID,weight:200+2,primary:64,when:k.CONTEXT_DEBUG_STATE.isEqualTo("running"),handler:async($,q,X)=>{await L($,X,G=>G.pause())}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STEP_INTO_TARGET_ID,primary:H|2048,when:u.ContextKeyExpr.and(k.CONTEXT_STEP_INTO_TARGETS_SUPPORTED,k.CONTEXT_IN_DEBUG_MODE,k.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),weight:200,handler:async($,q,X)=>{const G=$.get(o.IQuickInputService),Q=$.get(k.IDebugService),j=Q.getViewModel().focusedSession,K=Q.getViewModel().focusedStackFrame;if(!K||!j)return;const Y=await $.get(C.IEditorService).openEditor({resource:K.source.uri,options:{revealIfOpened:!0}});let ee;if(Y){const re=Y?.getControl();(0,b.isCodeEditor)(re)&&(ee=re)}const ie=G.createQuickPick();ie.busy=!0,ie.show(),ie.onDidChangeActive(([re])=>{ee&&re&&re.target.line!==void 0&&(ee.revealLineInCenterIfOutsideViewport(re.target.line),ee.setSelection({startLineNumber:re.target.line,startColumn:re.target.column||1,endLineNumber:re.target.endLine||re.target.line,endColumn:re.target.endColumn||re.target.column||1}))}),ie.onDidAccept(()=>{ie.activeItems.length&&j.stepIn(K.thread.threadId,ie.activeItems[0].target.id)}),ie.onDidHide(()=>ie.dispose()),j.stepInTargets(K.frameId).then(re=>{ie.busy=!1,re?.length?ie.items=re?.map(oe=>({target:oe,label:oe.label})):ie.placeholder=t.localize(28,null)})}});async function W($,q,X,G,Q){const j=$.get(k.IDebugService);let K;N(X)?K=j.getModel().getSession(X.sessionId):K=j.getViewModel().focusedSession;const ee=$.get(a.IConfigurationService).getValue("debug").showSubSessionsInToolBar;for(;!ee&&K&&K.parentSession;)K=K.parentSession;await j.stopSession(K,G,Q)}R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DISCONNECT_ID,weight:200,primary:1087,when:u.ContextKeyExpr.and(k.CONTEXT_FOCUSED_SESSION_IS_ATTACH,k.CONTEXT_IN_DEBUG_MODE),handler:($,q,X)=>W($,q,X,!0)}),s.CommandsRegistry.registerCommand({id:e.DISCONNECT_AND_SUSPEND_ID,handler:($,q,X)=>W($,q,X,!0,!0)}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.STOP_ID,weight:200,primary:1087,when:u.ContextKeyExpr.and(k.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),k.CONTEXT_IN_DEBUG_MODE),handler:($,q,X)=>W($,q,X,!1)}),s.CommandsRegistry.registerCommand({id:e.RESTART_FRAME_ID,handler:async($,q,X)=>{const G=$.get(k.IDebugService),Q=$.get(f.INotificationService),j=O(G,X);if(j)try{await j.restart()}catch(K){Q.error(K)}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CONTINUE_ID,weight:200+10,primary:63,when:k.CONTEXT_DEBUG_STATE.isEqualTo("stopped"),handler:async($,q,X)=>{await L($,X,G=>G.continue())}}),s.CommandsRegistry.registerCommand({id:e.SHOW_LOADED_SCRIPTS_ID,handler:async $=>{await(0,D.showLoadedScriptMenu)($)}}),s.CommandsRegistry.registerCommand({id:e.FOCUS_REPL_ID,handler:async $=>{await $.get(g.IViewsService).openView(k.REPL_VIEW_ID,!0)}}),s.CommandsRegistry.registerCommand({id:"debug.startFromConfig",handler:async($,q)=>{await $.get(k.IDebugService).startDebugging(void 0,q)}}),s.CommandsRegistry.registerCommand({id:e.FOCUS_SESSION_ID,handler:async($,q)=>{const X=$.get(k.IDebugService),G=$.get(C.IEditorService),Q=X.getModel().getSessions().find(K=>K.parentSession===q&&K.state===2);Q&&q.state!==2&&(q=Q),await X.focusStackFrame(void 0,void 0,q,{explicit:!0});const j=X.getViewModel().focusedStackFrame;j&&await j.openInEditor(G,!0)}}),s.CommandsRegistry.registerCommand({id:e.SELECT_AND_START_ID,handler:async $=>{$.get(o.IQuickInputService).quickAccess.show(e.DEBUG_QUICK_ACCESS_PREFIX)}}),s.CommandsRegistry.registerCommand({id:e.SELECT_DEBUG_CONSOLE_ID,handler:async $=>{$.get(o.IQuickInputService).quickAccess.show(e.DEBUG_CONSOLE_QUICK_ACCESS_PREFIX)}}),s.CommandsRegistry.registerCommand({id:e.SELECT_DEBUG_SESSION_ID,handler:async $=>{(0,y.showDebugSessionMenu)($,e.SELECT_AND_START_ID)}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DEBUG_START_COMMAND_ID,weight:200,primary:63,when:u.ContextKeyExpr.and(k.CONTEXT_DEBUGGERS_AVAILABLE,k.CONTEXT_DEBUG_STATE.isEqualTo("inactive")),handler:async($,q)=>{const X=$.get(k.IDebugService);await(0,m.saveAllBeforeDebugStart)($.get(a.IConfigurationService),$.get(C.IEditorService));const{launch:G,name:Q,getConfig:j}=X.getConfigurationManager().selectedConfiguration,K=await j(),Y=K?Object.assign((0,h.deepClone)(K),q?.config):Q;await X.startDebugging(G,Y,{noDebug:q?.noDebug,startedByUser:!0},!1)}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DEBUG_RUN_COMMAND_ID,weight:200,primary:2111,mac:{primary:319},when:u.ContextKeyExpr.and(k.CONTEXT_DEBUGGERS_AVAILABLE,k.CONTEXT_DEBUG_STATE.notEqualsTo((0,k.getStateLabel)(1))),handler:async $=>{await $.get(s.ICommandService).executeCommand(e.DEBUG_START_COMMAND_ID,{noDebug:!0})}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.toggleBreakpoint",weight:200+5,when:u.ContextKeyExpr.and(k.CONTEXT_BREAKPOINTS_FOCUSED,c.InputFocusedContext.toNegated()),primary:10,handler:$=>{const q=$.get(A.IListService),X=$.get(k.IDebugService),G=q.lastFocusedList;if(G instanceof p.List){const Q=G.getFocusedElements();Q&&Q.length&&X.enableOrDisableBreakpoints(!Q[0].enabled,Q[0])}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.enableOrDisableBreakpoint",weight:200,primary:void 0,when:r.EditorContextKeys.editorTextFocus,handler:$=>{const q=$.get(k.IDebugService),G=$.get(C.IEditorService).activeTextEditorControl;if((0,b.isCodeEditor)(G)){const Q=G.getModel();if(Q){const j=G.getPosition();if(j){const K=q.getModel().getBreakpoints({uri:Q.uri,lineNumber:j.lineNumber});K.length&&q.enableOrDisableBreakpoints(!K[0].enabled,K[0])}}}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.EDIT_EXPRESSION_COMMAND_ID,weight:200+5,when:k.CONTEXT_WATCH_EXPRESSIONS_FOCUSED,primary:60,mac:{primary:3},handler:($,q)=>{const X=$.get(k.IDebugService);if(!(q instanceof E.Expression)){const Q=$.get(A.IListService).lastFocusedList;if(Q){const j=Q.getFocus();Array.isArray(j)&&j[0]instanceof E.Expression&&(q=j[0])}}q instanceof E.Expression&&X.getViewModel().setSelectedExpression(q,!1)}}),s.CommandsRegistry.registerCommand({id:e.SET_EXPRESSION_COMMAND_ID,handler:async($,q)=>{const X=$.get(k.IDebugService);(q instanceof E.Expression||q instanceof E.Variable)&&X.getViewModel().setSelectedExpression(q,!0)}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.setVariable",weight:200+5,when:k.CONTEXT_VARIABLES_FOCUSED,primary:60,mac:{primary:3},handler:$=>{const q=$.get(A.IListService),X=$.get(k.IDebugService),G=q.lastFocusedList;if(G){const Q=G.getFocus();Array.isArray(Q)&&Q[0]instanceof E.Variable&&X.getViewModel().setSelectedExpression(Q[0],!1)}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.REMOVE_EXPRESSION_COMMAND_ID,weight:200,when:u.ContextKeyExpr.and(k.CONTEXT_WATCH_EXPRESSIONS_FOCUSED,k.CONTEXT_EXPRESSION_SELECTED.toNegated()),primary:20,mac:{primary:2049},handler:($,q)=>{const X=$.get(k.IDebugService);if(q instanceof E.Expression){X.removeWatchExpressions(q.getId());return}const Q=$.get(A.IListService).lastFocusedList;if(Q){let j=Q.getFocus();if(Array.isArray(j)&&j[0]instanceof E.Expression){const K=Q.getSelection();K&&K.indexOf(j[0])>=0&&(j=K),j.forEach(Y=>X.removeWatchExpressions(Y.getId()))}}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.removeBreakpoint",weight:200,when:u.ContextKeyExpr.and(k.CONTEXT_BREAKPOINTS_FOCUSED,k.CONTEXT_BREAKPOINT_INPUT_FOCUSED.toNegated()),primary:20,mac:{primary:2049},handler:$=>{const q=$.get(A.IListService),X=$.get(k.IDebugService),G=q.lastFocusedList;if(G instanceof p.List){const Q=G.getFocusedElements(),j=Q.length?Q[0]:void 0;j instanceof E.Breakpoint?X.removeBreakpoints(j.getId()):j instanceof E.FunctionBreakpoint?X.removeFunctionBreakpoints(j.getId()):j instanceof E.DataBreakpoint&&X.removeDataBreakpoints(j.getId())}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.installAdditionalDebuggers",weight:200,when:void 0,primary:void 0,handler:async($,q)=>{const G=(await $.get(w.IPaneCompositePartService).openPaneComposite(I.VIEWLET_ID,0,!0))?.getViewPaneContainer();let Q="@category:debuggers";typeof q=="string"&&(Q+=` ${q}`),G.search(Q),G.focus()}}),(0,S.registerAction2)(class extends S.Action2{constructor(){super({id:e.ADD_CONFIGURATION_ID,title:{value:t.localize(29,null),original:"Add Configuration..."},category:e.DEBUG_COMMAND_CATEGORY,f1:!0,menu:{id:S.MenuId.EditorContent,when:u.ContextKeyExpr.and(u.ContextKeyExpr.regex(l.ResourceContextKey.Path.key,/\.vscode[/\\]launch\.json$/),l.ActiveEditorContext.isEqualTo(T.TEXT_FILE_EDITOR_ID))}})}async run(q,X){const G=q.get(k.IDebugService).getConfigurationManager(),Q=G.getLaunches().find(j=>j.uri.toString()===X)||G.selectedConfiguration.launch;if(Q){const{editor:j,created:K}=await Q.openConfigFile({preserveFocus:!1});if(j&&!K){const Y=j.getControl();Y&&await Y.getContribution(k.EDITOR_CONTRIBUTION_ID)?.addLaunchConfiguration()}}}});const U=$=>{const q=$.get(k.IDebugService),G=$.get(C.IEditorService).activeTextEditorControl;if((0,b.isCodeEditor)(G)){const Q=G.getPosition();if(Q&&G.hasModel()&&q.canSetBreakpointsIn(G.getModel())){const j=G.getModel().uri;q.getModel().getBreakpoints({lineNumber:Q.lineNumber,uri:j}).some(Y=>Y.sessionAgnosticData.column===Q.column||!Y.column&&Q.column<=1)||q.addBreakpoints(j,[{lineNumber:Q.lineNumber,column:Q.column>1?Q.column:void 0}])}}};R.KeybindingsRegistry.registerCommandAndKeybindingRule({weight:200,primary:1091,when:r.EditorContextKeys.editorTextFocus,id:e.TOGGLE_INLINE_BREAKPOINT_ID,handler:U}),S.MenuRegistry.appendMenuItem(S.MenuId.EditorContext,{command:{id:e.TOGGLE_INLINE_BREAKPOINT_ID,title:t.localize(30,null),category:e.DEBUG_COMMAND_CATEGORY},when:u.ContextKeyExpr.and(k.CONTEXT_IN_DEBUG_MODE,l.PanelFocusContext.toNegated(),r.EditorContextKeys.editorTextFocus),group:"debug",order:1}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.openBreakpointToSide",weight:200,when:k.CONTEXT_BREAKPOINTS_FOCUSED,primary:2051,secondary:[515],handler:$=>{const X=$.get(A.IListService).lastFocusedList;if(X instanceof p.List){const G=X.getFocusedElements();if(G.length&&G[0]instanceof E.Breakpoint)return(0,i.openBreakpointSource)(G[0],!0,!1,!0,$.get(k.IDebugService),$.get(C.IEditorService))}}}),R.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"debug.openView",weight:200,when:k.CONTEXT_DEBUGGERS_AVAILABLE.toNegated(),primary:63,secondary:[2111],handler:async $=>{await $.get(w.IPaneCompositePartService).openPaneComposite(k.VIEWLET_ID,0,!0)}})}),define(ae[686],le([1,0,1596,10,90,418,8,31,87,12,73,33,37,34,2,249,137,201,38]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FocusSessionActionViewItem=e.StartDebugActionViewItem=void 0;const d=p.$;let n=class $s extends c.BaseActionViewItem{constructor(g,h,v,m,w,D,y,T,_){super(g,h),this.context=g,this.debugService=v,this.themeService=m,this.configurationService=w,this.commandService=D,this.contextService=y,this.keybindingService=_,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,S.attachSelectBoxStyler)(this.selectBox,m)),this.registerListeners()}registerListeners(){this.toDispose.push(this.configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration("launch")&&this.updateOptions()})),this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(()=>{this.updateOptions()}))}render(g){this.container=g,g.classList.add("start-debug-action-item"),this.start=p.append(g,d(b.ThemeIcon.asCSSSelector(l.debugStart)));const h=this.keybindingService.lookupKeybinding(this.action.id)?.getLabel(),v=h?` (${h})`:"";this.start.title=this.action.label+v,this.start.setAttribute("role","button"),this.toDispose.push(p.addDisposableListener(this.start,p.EventType.CLICK,()=>{this.start.blur(),this.debugService.state!==1&&this.actionRunner.run(this.action,this.context)})),this.toDispose.push(p.addDisposableListener(this.start,p.EventType.MOUSE_DOWN,w=>{this.action.enabled&&w.button===0&&this.start.classList.add("active")})),this.toDispose.push(p.addDisposableListener(this.start,p.EventType.MOUSE_UP,()=>{this.start.classList.remove("active")})),this.toDispose.push(p.addDisposableListener(this.start,p.EventType.MOUSE_OUT,()=>{this.start.classList.remove("active")})),this.toDispose.push(p.addDisposableListener(this.start,p.EventType.KEY_DOWN,w=>{const D=new R.StandardKeyboardEvent(w);D.equals(17)&&(this.start.tabIndex=-1,this.selectBox.focus(),D.stopPropagation())})),this.toDispose.push(this.selectBox.onDidSelect(async w=>{const D=this.debugOptions[w.index];(D.handler?await D.handler():!1)?this.selected=w.index:this.selectBox.select(this.selected)}));const m=d(".configuration");this.selectBox.render(p.append(g,m)),this.toDispose.push(p.addDisposableListener(m,p.EventType.KEY_DOWN,w=>{const D=new R.StandardKeyboardEvent(w);D.equals(15)&&(this.selectBox.setFocusable(!1),this.start.tabIndex=0,this.start.focus(),D.stopPropagation())})),this.toDispose.push((0,S.attachStylerCallback)(this.themeService,{selectBorder:C.selectBorder,selectBackground:C.selectBackground},w=>{this.container.style.border=w.selectBorder?`1px solid ${w.selectBorder}`:"",m.style.borderLeft=w.selectBorder?`1px solid ${w.selectBorder}`:"";const D=w.selectBackground?`${w.selectBackground}`:"";this.container.style.backgroundColor=D})),this.debugService.getConfigurationManager().getDynamicProviders().then(w=>{this.providers=w,this.providers.length>0&&this.updateOptions()}),this.updateOptions()}setActionContext(g){this.context=g}isEnabled(){return!0}focus(g){g?this.selectBox.focus():(this.start.tabIndex=0,this.start.focus())}blur(){this.start.tabIndex=-1,this.selectBox.blur(),this.container.blur()}setFocusable(g){g?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 g=this.debugService.getConfigurationManager(),h=this.contextService.getWorkbenchState()===3;let v;const m=[];g.getAllConfigurations().forEach(({launch:w,name:D,presentation:y})=>{v!==y?.group&&(v=y?.group,this.debugOptions.length&&(this.debugOptions.push({label:$s.SEPARATOR,handler:()=>Promise.resolve(!1)}),m.push(this.debugOptions.length-1))),D===g.selectedConfiguration.name&&w===g.selectedConfiguration.launch&&(this.selected=this.debugOptions.length);const T=h?`${D} (${w.name})`:D;this.debugOptions.push({label:T,handler:async()=>(await g.selectConfiguration(w,D),!0)})}),g.getRecentDynamicConfigurations().slice(0,3).forEach(({name:w,type:D})=>{D===g.selectedConfiguration.type&&g.selectedConfiguration.name===w&&(this.selected=this.debugOptions.length),this.debugOptions.push({label:w,handler:async()=>(await g.selectConfiguration(void 0,w,void 0,{type:D}),!0)})}),this.debugOptions.length===0&&this.debugOptions.push({label:t.localize(1,null),handler:async()=>!1}),this.debugOptions.push({label:$s.SEPARATOR,handler:()=>Promise.resolve(!1)}),m.push(this.debugOptions.length-1),this.providers.forEach(w=>{this.debugOptions.push({label:`${w.label}...`,handler:async()=>{const D=await w.pick();return D?(await g.selectConfiguration(D.launch,D.config.name,D.config,{type:w.type}),!0):!1}})}),g.getLaunches().filter(w=>!w.hidden).forEach(w=>{const D=h?t.localize(2,null,w.name):t.localize(3,null);this.debugOptions.push({label:D,handler:async()=>(await this.commandService.executeCommand(f.ADD_CONFIGURATION_ID,w.uri.toString()),!1)})}),this.selectBox.setOptions(this.debugOptions.map((w,D)=>({text:w.label,isDisabled:m.indexOf(D)!==-1})),this.selected)}};n.SEPARATOR="\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500",n=we([F(2,I.IDebugService),F(3,b.IThemeService),F(4,k.IConfigurationService),F(5,E.ICommandService),F(6,u.IWorkspaceContextService),F(7,r.IContextViewService),F(8,s.IKeybindingService)],n),e.StartDebugActionViewItem=n;let a=class extends c.SelectActionViewItem{constructor(g,h,v,m,w,D){super(null,g,[],-1,w,{ariaLabel:t.localize(4,null)}),this.debugService=v,this.configurationService=D,this._register((0,S.attachSelectBoxStyler)(this.selectBox,m)),this._register(this.debugService.getViewModel().onDidFocusSession(()=>{const T=this.getSelectedSession();if(T){const _=this.getSessions().indexOf(T);this.select(_)}})),this._register(this.debugService.onDidNewSession(T=>{const _=[];_.push(T.onDidChangeName(()=>this.update())),_.push(T.onDidEndAdapter(()=>(0,i.dispose)(_))),this.update()})),this.getSessions().forEach(T=>{this._register(T.onDidChangeName(()=>this.update()))}),this._register(this.debugService.onDidEndSession(()=>this.update()));const y=h?this.mapFocusedSessionToSelected(h):void 0;this.update(y)}getActionContext(g,h){return this.getSessions()[h]}update(g){g||(g=this.getSelectedSession());const h=this.getSessions(),v=h.map(m=>{const w=m.getLabel();return m.parentSession?`\xA0\xA0${w}`:w});this.setOptions(v.map(m=>({text:m})),g?h.indexOf(g):void 0)}getSelectedSession(){const g=this.debugService.getViewModel().focusedSession;return g?this.mapFocusedSessionToSelected(g):void 0}getSessions(){const g=this.configurationService.getValue("debug").showSubSessionsInToolBar,h=this.debugService.getModel().getSessions();return g?h:h.filter(v=>!v.parentSession)}mapFocusedSessionToSelected(g){const h=this.configurationService.getValue("debug").showSubSessionsInToolBar;for(;g.parentSession&&!h;)g=g.parentSession;return g}};a=we([F(2,I.IDebugService),F(3,b.IThemeService),F(4,r.IContextViewService),F(5,k.IConfigurationService)],a),e.FocusSessionActionViewItem=a}),define(ae[2783],le([1,0,96,1601,31,252,45,249,87]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugConsoleQuickAccess=void 0;let b=class extends A.PickerQuickAccessProvider{constructor(C,r,u){super(E.DEBUG_CONSOLE_QUICK_ACCESS_PREFIX,{canAcceptInBackground:!0}),this._debugService=C,this._viewsService=r,this._commandService=u}_getPicks(C,r,u){const i=[];this._debugService.getModel().getSessions(!0).filter(c=>c.hasSeparateRepl()).forEach((c,l)=>{const s=this._createPick(c,l,C);s&&i.push(s)}),i.length>0&&i.push({type:"separator"});const f=(0,p.localize)(0,null);return i.push({label:`$(plus) ${f}`,ariaLabel:f,accept:()=>this._commandService.executeCommand(E.SELECT_AND_START_ID)}),i}_createPick(C,r,u){const i=C.name,f=(0,t.matchesFuzzy)(u,i,!0);if(f)return{label:i,highlights:{label:f},accept:(c,l)=>{this._debugService.focusStackFrame(void 0,void 0,C,{explicit:!0}),this._viewsService.isViewVisible(I.REPL_VIEW_ID)||this._viewsService.openView(I.REPL_VIEW_ID,!0)}}}};b=we([F(0,I.IDebugService),F(1,k.IViewsService),F(2,R.ICommandService)],b),e.DebugConsoleQuickAccess=b}),define(ae[2784],le([1,0,252,1606,26,87,34,31,96,13,249,201,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartDebugQuickAccessProvider=void 0;let u=class extends t.PickerQuickAccessProvider{constructor(f,c,l,s){super(S.DEBUG_QUICK_ACCESS_PREFIX,{noResultsPick:{label:(0,p.localize)(0,null)}}),this.debugService=f,this.contextService=c,this.commandService=l,this.notificationService=s}async _getPicks(f){const c=[];if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return[];c.push({type:"separator",label:"launch.json"});const l=this.debugService.getConfigurationManager();let s;for(const a of l.getAllConfigurations()){const o=(0,I.matchesFuzzy)(f,a.name,!0);o&&(s!==a.presentation?.group&&(c.push({type:"separator"}),s=a.presentation?.group),c.push({label:a.name,description:this.contextService.getWorkbenchState()===3?a.launch.name:"",highlights:{label:o},buttons:[{iconClass:r.ThemeIcon.asClassName(C.debugConfigure),tooltip:(0,p.localize)(1,null)}],trigger:()=>(a.launch.openConfigFile({preserveFocus:!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(g){this.notificationService.error(g)}}}))}const d=await l.getDynamicProviders();d.length>0&&c.push({type:"separator",label:(0,p.localize)(2,null)}),l.getRecentDynamicConfigurations().forEach(({name:a,type:o})=>{const g=(0,I.matchesFuzzy)(f,a,!0);g&&c.push({label:a,highlights:{label:g},buttons:[{iconClass:r.ThemeIcon.asClassName(C.debugRemoveConfig),tooltip:(0,p.localize)(3,null)}],trigger:()=>(l.removeRecentDynamicConfigurations(a,o),t.TriggerAction.CLOSE_PICKER),accept:async()=>{await l.selectConfiguration(void 0,a,void 0,{type:o});try{const{launch:h,getConfig:v}=l.selectedConfiguration,m=await v();await this.debugService.startDebugging(h,m,{startedByUser:!0})}catch(h){this.notificationService.error(h)}}})}),d.forEach(a=>{c.push({label:`$(folder) ${a.label}...`,ariaLabel:(0,p.localize)(4,null,a.label),accept:async()=>{const o=await a.pick();o&&(await l.selectConfiguration(o.launch,o.config.name,o.config,{type:a.type}),this.debugService.startDebugging(o.launch,o.config,{startedByUser:!0}))}})});const n=l.getLaunches().filter(a=>!a.hidden);n.length>0&&c.push({type:"separator",label:(0,p.localize)(5,null)});for(const a of n){const o=this.contextService.getWorkbenchState()===3?(0,p.localize)(6,null,a.name):(0,p.localize)(7,null);c.push({label:o,description:this.contextService.getWorkbenchState()===3?a.name:"",highlights:{label:(0,b.withNullAsUndefined)((0,I.matchesFuzzy)(f,o,!0))},accept:()=>this.commandService.executeCommand(S.ADD_CONFIGURATION_ID,a.uri.toString())})}return c}};u=we([F(0,A.IDebugService),F(1,k.IWorkspaceContextService),F(2,E.ICommandService),F(3,R.INotificationService)],u),e.StartDebugQuickAccessProvider=u}),define(ae[2785],le([1,0,1611,68,339,270,8,47,13,124,45,23,117,36,249,31]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugTaskRunner=e.TaskRunResult=void 0;function c(n,a){return(o,g=null,h)=>{const v=a(m=>{if(n(m))return v.dispose(),o.call(g,m)},null,h);return v}}var l;(function(n){n[n.Failure=0]="Failure",n[n.Success=1]="Success"})(l=e.TaskRunResult||(e.TaskRunResult={}));const s="debug.taskerrorchoice";let d=class{constructor(a,o,g,h,v,m,w){this.taskService=a,this.markerService=o,this.configurationService=g,this.viewsService=h,this.dialogService=v,this.storageService=m,this.commandService=w,this.canceled=!1}cancel(){this.canceled=!0}async runTaskAndCheckErrors(a,o){try{this.canceled=!1;const g=await this.runTask(a,o);if(this.canceled||g&&g.exitCode===void 0)return 0;const h=o?this.markerService.read({severities:b.MarkerSeverity.Error,take:2}).length:0,v=g&&g.exitCode===0,m=g&&g.exitCode!==0,w=this.configurationService.getValue("debug").onTaskErrors;if(v||w==="debugAnyway"||h===0&&!m)return 1;if(w==="showErrors")return await this.viewsService.openView(R.Markers.MARKERS_VIEW_ID,!0),Promise.resolve(0);if(w==="abort")return Promise.resolve(0);const D=typeof o=="string"?o:o?o.name:"",y=h>1?t.localize(0,null,D):h===1?t.localize(1,null,D):g&&typeof g.exitCode=="number"?t.localize(2,null,D,g.exitCode):t.localize(3,null,D),T=await this.dialogService.show(p.default.Warning,y,[t.localize(4,null),t.localize(5,null),t.localize(6,null)],{checkbox:{label:t.localize(7,null)},cancelId:2}),_=T.choice===0,L=T.choice===2;return T.checkboxChecked&&this.configurationService.updateValue("debug.onTaskErrors",T.choice===0?"debugAnyway":L?"abort":"showErrors"),L?Promise.resolve(0):_?1:(await this.viewsService.openView(R.Markers.MARKERS_VIEW_ID,!0),Promise.resolve(0))}catch(g){const h=this.taskService.configureAction(),v=JSON.parse(this.storageService.get(s,1,"{}"));let m=-1;if(v[g.message]!==void 0)m=v[g.message];else{const w=await this.dialogService.show(p.default.Error,g.message,[t.localize(8,null),h.label,t.localize(9,null)],{cancelId:2,checkbox:{label:t.localize(10,null)}});m=w.choice,w.checkboxChecked&&(v[g.message]=m,this.storageService.store(s,JSON.stringify(v),1,0))}return m===1&&await h.run(),m===0?1:0}}async runTask(a,o){if(!o)return Promise.resolve(null);if(!a)return Promise.reject(new Error(t.localize(11,null,typeof o=="string"?o:o.type)));const g=await this.taskService.getTask(a,o);if(!g){const w=typeof o=="string"?t.localize(12,null,o):t.localize(13,null);return Promise.reject((0,r.createErrorWithActions)(w,[new u.Action(i.DEBUG_CONFIGURE_COMMAND_ID,i.DEBUG_CONFIGURE_LABEL,void 0,!0,()=>this.commandService.executeCommand(i.DEBUG_CONFIGURE_COMMAND_ID))]))}let h=!1;const v=new Promise((w,D)=>c(y=>(y.kind==="inactive"||y.kind==="processEnded"&&y.exitCode===void 0)&&y.taskId===g._id,this.taskService.onDidStateChange)(y=>{h=!0,w(y.kind==="processEnded"?{exitCode:y.exitCode}:null)})),m=this.taskService.getActiveTasks().then(async w=>{if(w.find(y=>y._id===g._id))return(await this.taskService.getBusyTasks()).find(T=>T._id===g._id)?(h=!0,v):Promise.resolve(null);c(y=>(y.kind==="active"||y.kind==="dependsOnStarted")&&y.taskId===g._id,this.taskService.onDidStateChange)(()=>{h=!0});const D=this.taskService.run(g);return g.configurationProperties.isBackground?v:D.then(I.withUndefinedAsNull)});return new Promise((w,D)=>{const y=new Promise(T=>c(_=>_.kind==="acquiredInput"&&_.taskId===g._id,this.taskService.onDidStateChange)(()=>{T()}));m.then(T=>{h=!0,w(T)},T=>D(T)),y.then(()=>{const T=g.configurationProperties.isBackground?5e3:1e4;setTimeout(()=>{if(!h){const _=typeof o=="string"?t.localize(14,null,o):t.localize(15,null,JSON.stringify(o));D({severity:p.default.Error,message:_})}},T)})})}};d=we([F(0,A.ITaskService),F(1,b.IMarkerService),F(2,k.IConfigurationService),F(3,S.IViewsService),F(4,E.IDialogService),F(5,C.IStorageService),F(6,f.ICommandService)],d),e.DebugTaskRunner=d}),define(ae[2786],le([1,0,110,36,16,11,32,117,21,6,2,52,68,72,105,1607,31,8,7,427,47,19,5,26,48,57,34,118,45,2608,249,2769,2300,2773,2785,87,2303,192,2772,2304,246,2306,443,150,190,24,39,83,69,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getStackFrameThreadAndSessionToFocus=e.DebugService=void 0;let K=class{constructor(re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae){this.editorService=re,this.paneCompositeService=oe,this.viewsService=se,this.viewDescriptorService=te,this.notificationService=Z,this.dialogService=ne,this.layoutService=ce,this.contextService=de,this.contextKeyService=he,this.lifecycleService=pe,this.instantiationService=me,this.extensionService=Se,this.fileService=Ie,this.configurationService=ve,this.extensionHostDebugService=be,this.activityService=ge,this.commandService=ue,this.quickInputService=Ce,this.workspaceTrustRequestService=De,this.uriIdentityService=Ae,this.disposables=new S.DisposableStore,this.initializing=!1,this.sessionCancellationTokens=new Map,this.haveDoneLazySetup=!1,this.breakpointsToSendOnResourceSaved=new Set,this._onDidChangeState=new b.Emitter,this._onDidNewSession=new b.Emitter,this._onWillNewSession=new b.Emitter,this._onDidEndSession=new b.Emitter,this.adapterManager=this.instantiationService.createInstance(y.AdapterManager,{onDidNewSession:this.onDidNewSession}),this.disposables.add(this.adapterManager),this.configurationManager=this.instantiationService.createInstance(_.ConfigurationManager,this.adapterManager),this.disposables.add(this.configurationManager),this.debugStorage=this.instantiationService.createInstance(V.DebugStorage),this.chosenEnvironments=this.debugStorage.loadChosenEnvironments(),this.model=this.instantiationService.createInstance(B.DebugModel,this.debugStorage),this.telemetry=this.instantiationService.createInstance(z.DebugTelemetry,this.model),this.viewModel=new H.ViewModel(he),this.taskRunner=this.instantiationService.createInstance(O.DebugTaskRunner),this.disposables.add(this.fileService.onDidFilesChange(Pe=>this.onFileChanges(Pe))),this.disposables.add(this.lifecycleService.onWillShutdown(this.dispose,this)),this.disposables.add(this.extensionHostDebugService.onAttachSession(Pe=>{const fe=this.model.getSession(Pe.sessionId,!0);fe&&(fe.configuration.request="attach",fe.configuration.port=Pe.port,fe.setSubId(Pe.subId),this.launchOrAttachToSession(fe))})),this.disposables.add(this.extensionHostDebugService.onTerminateSession(Pe=>{const fe=this.model.getSession(Pe.sessionId);fe&&fe.subId===Pe.subId&&fe.disconnect()})),this.disposables.add(this.viewModel.onDidFocusStackFrame(()=>{this.onStateChange()})),this.disposables.add(this.viewModel.onDidFocusSession(()=>{this.onStateChange()})),this.disposables.add(b.Event.any(this.adapterManager.onDidRegisterDebugger,this.configurationManager.onDidSelectConfiguration)(()=>{const Pe=this.state!==0||this.configurationManager.getAllConfigurations().length>0&&this.adapterManager.hasEnabledDebuggers()?"default":"simple";this.debugUx.set(Pe),this.debugStorage.storeDebugUxState(Pe)})),this.disposables.add(this.model.onDidChangeCallStack(()=>{const Pe=this.model.getSessions().filter(fe=>!fe.parentSession).length;if(this.activity?.dispose(),Pe>0){const fe=this.viewDescriptorService.getViewContainerByViewId(N.CALLSTACK_VIEW_ID);fe&&(this.activity=this.activityService.showViewContainerActivity(fe.id,{badge:new $.NumberBadge(Pe,ye=>ye===1?f.localize(0,null):f.localize(1,null,ye))}))}})),this.disposables.add(re.onDidActiveEditorChange(()=>{this.contextKeyService.bufferChangeEvents(()=>{re.activeEditor===W.DisassemblyViewInput.instance?this.disassemblyViewFocus.set(!0):this.disassemblyViewFocus.reset()})})),this.disposables.add(this.lifecycleService.onBeforeShutdown(()=>{for(const Pe of re.editors)Pe.resource?.scheme===N.DEBUG_MEMORY_SCHEME&&Pe.dispose()})),this.initContextKeys(he)}initContextKeys(re){queueMicrotask(()=>{re.bufferChangeEvents(()=>{this.debugType=N.CONTEXT_DEBUG_TYPE.bindTo(re),this.debugState=N.CONTEXT_DEBUG_STATE.bindTo(re),this.inDebugMode=N.CONTEXT_IN_DEBUG_MODE.bindTo(re),this.debugUx=N.CONTEXT_DEBUG_UX.bindTo(re),this.debugUx.set(this.debugStorage.loadDebugUxState()),this.breakpointsExist=N.CONTEXT_BREAKPOINTS_EXIST.bindTo(re),this.disassemblyViewFocus=N.CONTEXT_DISASSEMBLY_VIEW_FOCUS.bindTo(re)});const oe=()=>this.breakpointsExist.set(!!(this.model.getBreakpoints().length||this.model.getDataBreakpoints().length||this.model.getFunctionBreakpoints().length));oe(),this.disposables.add(this.model.onDidChangeBreakpoints(()=>oe()))})}getModel(){return this.model}getViewModel(){return this.viewModel}getConfigurationManager(){return this.configurationManager}getAdapterManager(){return this.adapterManager}sourceIsNotAvailable(re){this.model.sourceIsNotAvailable(re)}dispose(){this.disposables.dispose()}get state(){const re=this.viewModel.focusedSession;return re?re.state:this.initializing?1:0}get initializingOptions(){return this._initializingOptions}startInitializingState(re){this.initializing||(this.initializing=!0,this._initializingOptions=re,this.onStateChange())}endInitializingState(){this.initializing&&(this.initializing=!1,this._initializingOptions=void 0,this.onStateChange())}cancelTokens(re){if(re){const oe=this.sessionCancellationTokens.get(re);oe&&(oe.cancel(),this.sessionCancellationTokens.delete(re))}else this.sessionCancellationTokens.forEach(oe=>oe.cancel()),this.sessionCancellationTokens.clear()}onStateChange(){const re=this.state;this.previousState!==re&&(this.contextKeyService.bufferChangeEvents(()=>{this.debugState.set((0,N.getStateLabel)(re)),this.inDebugMode.set(re!==0);const oe=re!==0&&re!==1||this.adapterManager.hasEnabledDebuggers()&&this.configurationManager.selectedConfiguration.name?"default":"simple";this.debugUx.set(oe),this.debugStorage.storeDebugUxState(oe)}),this.previousState=re,this._onDidChangeState.fire(re))}get onDidChangeState(){return this._onDidChangeState.event}get onDidNewSession(){return this._onDidNewSession.event}get onWillNewSession(){return this._onWillNewSession.event}get onDidEndSession(){return this._onDidEndSession.event}lazySetup(){this.haveDoneLazySetup||(this.disposables.add(this.fileService.registerProvider(N.DEBUG_MEMORY_SCHEME,new L.DebugMemoryFileSystemProvider(this))),this.haveDoneLazySetup=!0)}async startDebugging(re,oe,se,te=!se?.parentSession){const Z=se&&se.noDebug?f.localize(2,null):f.localize(3,null);if(!await this.workspaceTrustRequestService.requestWorkspaceTrust({message:Z}))return!1;this.lazySetup(),this.startInitializingState(se);try{await this.extensionService.activateByEvent("onDebug"),te&&await(0,x.saveAllBeforeDebugStart)(this.configurationService,this.editorService),await this.extensionService.whenInstalledExtensionsRegistered();let ce,de;if(oe||(oe=this.configurationManager.selectedConfiguration.name),typeof oe=="string"&&re?(ce=re.getConfiguration(oe),de=re.getCompound(oe)):typeof oe!="string"&&(ce=oe),de){if(!de.configurations)throw new Error(f.localize(4,null));if(de.preLaunchTask&&await this.taskRunner.runTaskAndCheckErrors(re?.workspace||this.contextService.getWorkspace(),de.preLaunchTask)===0)return this.endInitializingState(),!1;de.stopAll&&(se={...se,compoundRoot:new P.DebugCompoundRoot});const me=(await Promise.all(de.configurations.map(Se=>{const Ie=typeof Se=="string"?Se:Se.name;if(Ie===de.name)return Promise.resolve(!1);let ve;if(typeof Se=="string"){const be=this.configurationManager.getLaunches().filter(ge=>!!ge.getConfiguration(Ie));if(be.length===1)ve=be[0];else if(re&&be.length>1&&be.indexOf(re)>=0)ve=re;else throw new Error(be.length===0?f.localize(5,null,Ie):f.localize(6,null,Ie))}else if(Se.folder){const be=this.configurationManager.getLaunches().filter(ge=>ge.workspace&&ge.workspace.name===Se.folder&&!!ge.getConfiguration(Se.name));if(be.length===1)ve=be[0];else throw new Error(f.localize(7,null,Se.folder,Se.name,de.name))}return this.createSession(ve,ve.getConfiguration(Ie),se)}))).every(Se=>!!Se);return this.endInitializingState(),me}if(oe&&!ce){const pe=re?f.localize(8,null,typeof oe=="string"?oe:oe.name):f.localize(9,null);throw new Error(pe)}const he=await this.createSession(re,ce,se);return this.endInitializingState(),he}catch(ce){return this.notificationService.error(ce),this.endInitializingState(),Promise.reject(ce)}}async createSession(re,oe,se){let te;oe?te=oe.type:oe=Object.create(null),(se&&se.noDebug||se&&typeof se.noDebug>"u"&&se.parentSession&&se.parentSession.configuration.noDebug)&&(oe.noDebug=!0);const Z=(0,C.deepClone)(oe);let ne,ce;te||(ce=this.editorService.activeEditor,ce&&ce.resource&&(te=this.chosenEnvironments[ce.resource.toString()]),te||(ne=await this.adapterManager.guessDebugger(!1),ne&&(te=ne.type)));const de=new k.CancellationTokenSource,he=(0,u.generateUuid)();this.sessionCancellationTokens.set(he,de);const pe=await this.configurationManager.resolveConfigurationByProviders(re&&re.workspace?re.workspace.uri:void 0,te,oe,de.token);if(pe&&pe.type)try{let me=await this.substituteVariables(re,pe);if(!me||de.token.isCancellationRequested)return!1;const Se=re?.workspace||this.contextService.getWorkspace();if(await this.taskRunner.runTaskAndCheckErrors(Se,me.preLaunchTask)===0)return!1;const ve=await this.configurationManager.resolveDebugConfigurationWithSubstitutedVariables(re&&re.workspace?re.workspace.uri:void 0,te,me,de.token);if(!ve)return re&&te&&ve===null&&!de.token.isCancellationRequested&&await re.openConfigFile({preserveFocus:!0,type:te},de.token),!1;me=ve;const be=this.adapterManager.getDebugger(me.type);if(!be||pe.request!=="attach"&&pe.request!=="launch"){let ue;pe.request!=="attach"&&pe.request!=="launch"?ue=pe.request?f.localize(10,null,"request",pe.request):f.localize(11,null,"request"):ue=me.type?f.localize(12,null,me.type):f.localize(13,null);const Ce=[];return Ce.push(new p.Action("installAdditionalDebuggers",f.localize(14,null,me.type),void 0,!0,async()=>this.commandService.executeCommand("debug.installAdditionalDebuggers",me?.type))),await this.showError(ue,Ce),!1}if(!be.enabled)return await this.showError((0,N.debuggerDisabledMessage)(be.type),[]),!1;const ge=await this.doCreateSession(he,re?.workspace,{resolved:me,unresolved:Z},se);return ge&&ne&&ce&&ce.resource&&(this.chosenEnvironments[ce.resource.toString()]=ne.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(f.localize(15,null)),re&&!de.token.isCancellationRequested&&await re.openConfigFile({preserveFocus:!0},de.token),!1}return re&&te&&pe===null&&!de.token.isCancellationRequested&&await re.openConfigFile({preserveFocus:!0,type:te},de.token),!1}async doCreateSession(re,oe,se,te){const Z=this.instantiationService.createInstance(M.DebugSession,re,se,oe,this.model,te);if(te?.startedByUser&&this.model.getSessions().some(ce=>ce.getLabel()===Z.getLabel())&&se.resolved.suppressMultipleSessionWarning!==!0&&!(await this.dialogService.confirm({message:f.localize(16,null,Z.getLabel())})).confirmed)return!1;this.model.addSession(Z),this.registerSessionListeners(Z),this._onWillNewSession.fire(Z);const ne=this.configurationService.getValue("debug").openDebug;!se.resolved.noDebug&&(ne==="openOnSessionStart"||ne!=="neverOpen"&&this.viewModel.firstSessionStart)&&!Z.suppressDebugView&&await this.paneCompositeService.openPaneComposite(N.VIEWLET_ID,0);try{await this.launchOrAttachToSession(Z);const ce=Z.configuration.internalConsoleOptions||this.configurationService.getValue("debug").internalConsoleOptions;(ce==="openOnSessionStart"||this.viewModel.firstSessionStart&&ce==="openOnFirstSessionStart")&&this.viewsService.openView(N.REPL_VIEW_ID,!1),this.viewModel.firstSessionStart=!1;const de=this.configurationService.getValue("debug").showSubSessionsInToolBar,he=this.model.getSessions();return(de?he:he.filter(me=>!me.parentSession)).length>1&&this.viewModel.setMultiSessionView(!0),this._onDidNewSession.fire(Z),!0}catch(ce){if(I.isCancellationError(ce)||(Z&&Z.getReplElements().length>0&&this.viewsService.openView(N.REPL_VIEW_ID,!1),Z.configuration&&Z.configuration.request==="attach"&&Z.configuration.__autoAttach))return!1;const de=ce instanceof Error?ce.message:ce;return ce.showUser!==!1&&await this.showError(de,(0,E.isErrorWithActions)(ce)?ce.actions:[]),!1}}async launchOrAttachToSession(re,oe=!1){const se=this.adapterManager.getDebugger(re.configuration.type);try{await re.initialize(se),await re.launchOrAttach(re.configuration);const te=!!re.root&&!!this.configurationService.getValue("launch",{resource:re.root.uri});await this.telemetry.logDebugSessionStart(se,te),(oe||!this.viewModel.focusedSession||re.parentSession===this.viewModel.focusedSession&&re.compact)&&await this.focusStackFrame(void 0,void 0,re)}catch(te){return this.viewModel.focusedSession===re&&await this.focusStackFrame(void 0),Promise.reject(te)}}registerSessionListeners(re){const oe=new A.RunOnceScheduler(()=>{re.state===3&&this.viewModel.focusedSession===re&&this.viewModel.setFocus(void 0,this.viewModel.focusedThread,re,!1)},200);this.disposables.add(re.onDidChangeState(()=>{re.state===3&&this.viewModel.focusedSession===re&&oe.schedule(),re===this.viewModel.focusedSession&&this.onStateChange()})),this.disposables.add(re.onDidEndAdapter(async se=>{se&&(se.error&&this.notificationService.error(f.localize(17,null,se.error.message||se.error.toString())),this.telemetry.logDebugSessionStop(re,se));const te=(0,x.getExtensionHostDebugSession)(re);if(te&&te.state===3&&te.configuration.noDebug&&this.extensionHostDebugService.close(te.getId()),re.configuration.postDebugTask){const ne=re.root??this.contextService.getWorkspace();try{await this.taskRunner.runTask(ne,re.configuration.postDebugTask)}catch(ce){this.notificationService.error(ce)}}this.endInitializingState(),this.cancelTokens(re.getId()),this._onDidEndSession.fire(re);const Z=this.viewModel.focusedSession;if(Z&&Z.getId()===re.getId()){const{session:ne,thread:ce,stackFrame:de}=Y(this.model,void 0,void 0,void 0,Z);this.viewModel.setFocus(de,ce,ne,!1)}if(this.model.getSessions().length===0&&(this.viewModel.setMultiSessionView(!1),this.layoutService.isVisible("workbench.parts.sidebar")&&this.configurationService.getValue("debug").openExplorerOnEnd&&this.paneCompositeService.openPaneComposite(U.VIEWLET_ID,0),this.model.getDataBreakpoints().filter(ce=>!ce.canPersist).forEach(ce=>this.model.removeDataBreakpoints(ce.getId())),this.configurationService.getValue("debug").console.closeOnEnd)){const ce=this.viewDescriptorService.getViewContainerByViewId(N.REPL_VIEW_ID);ce&&this.viewsService.isViewContainerVisible(ce.id)&&this.viewsService.closeViewContainer(ce.id)}}))}async restartSession(re,oe){re.saveBeforeRestart&&await(0,x.saveAllBeforeDebugStart)(this.configurationService,this.editorService);const se=!!oe,te=async()=>{if(se)return Promise.resolve(1);const me=re.root||this.contextService.getWorkspace();await this.taskRunner.runTask(me,re.configuration.preRestartTask),await this.taskRunner.runTask(me,re.configuration.postDebugTask);const Se=await this.taskRunner.runTaskAndCheckErrors(me,re.configuration.preLaunchTask);return Se!==1?Se:this.taskRunner.runTaskAndCheckErrors(me,re.configuration.postRestartTask)},Z=(0,x.getExtensionHostDebugSession)(re);if(Z){await te()===1&&this.extensionHostDebugService.reload(Z.getId());return}let ne=!1,ce;const de=re.root?this.configurationManager.getLaunch(re.root.uri):void 0;de&&(ce=de.getConfiguration(re.configuration.name),ce&&!(0,C.equals)(ce,re.unresolvedConfiguration)&&(ce.type=re.configuration.type,ce.noDebug=re.configuration.noDebug,ne=!0));let he=re.configuration;if(de&&ne&&ce){const me=new k.CancellationTokenSource;this.sessionCancellationTokens.set(re.getId(),me);const Se=await this.configurationManager.resolveConfigurationByProviders(de.workspace?de.workspace.uri:void 0,ce.type,ce,me.token);Se?(he=await this.substituteVariables(de,Se),he&&!me.token.isCancellationRequested&&(he=await this.configurationManager.resolveDebugConfigurationWithSubstitutedVariables(de&&de.workspace?de.workspace.uri:void 0,ce.type,he,me.token))):he=Se}if(he&&re.setConfiguration({resolved:he,unresolved:ce}),re.configuration.__restart=oe,re.capabilities.supportsRestartRequest){await te()===1&&await re.restart();return}const pe=!!this.viewModel.focusedSession&&re.getId()===this.viewModel.focusedSession.getId();return se?await re.disconnect(!0):await re.terminate(!0),new Promise((me,Se)=>{setTimeout(async()=>{if(await te()===1){if(!he)return me(void 0);try{await this.launchOrAttachToSession(re,pe),this._onDidNewSession.fire(re),me(void 0)}catch(ve){Se(ve)}}},300)})}async stopSession(re,oe=!1,se=!1){if(re)return oe?re.disconnect(void 0,se):re.terminate();const te=this.model.getSessions();return te.length===0&&(this.taskRunner.cancel(),await this.quickInputService.cancel(),this.endInitializingState(),this.cancelTokens(void 0)),Promise.all(te.map(Z=>oe?Z.disconnect(void 0,se):Z.terminate()))}async substituteVariables(re,oe){const se=this.adapterManager.getDebugger(oe.type);if(se){let te;if(re&&re.workspace)te=re.workspace;else{const Z=this.contextService.getWorkspace().folders;Z.length===1&&(te=Z[0])}try{return await se.substituteVariables(te,oe)}catch(Z){this.showError(Z.message,void 0,!!re?.getConfiguration(oe.name));return}}return Promise.resolve(oe)}async showError(re,oe=[],se=!0){const te=new p.Action(T.DEBUG_CONFIGURE_COMMAND_ID,T.DEBUG_CONFIGURE_LABEL,void 0,!0,()=>this.commandService.executeCommand(T.DEBUG_CONFIGURE_COMMAND_ID)),Z=oe.filter(ce=>ce.id.endsWith(".command")).length>0?oe:[...oe,...se?[te]:[]],{choice:ne}=await this.dialogService.show(r.default.Error,re,Z.map(ce=>ce.label).concat(f.localize(18,null)),{cancelId:Z.length});ne<Z.length&&await Z[ne].run()}async focusStackFrame(re,oe,se,te){const{stackFrame:Z,thread:ne,session:ce}=Y(this.model,re,oe,se);if(Z){const de=await Z.openInEditor(this.editorService,te?.preserveFocus??!0,te?.sideBySide,te?.pinned);if(de&&de.input!==W.DisassemblyViewInput.instance){const he=de.getControl();if(Z&&(0,i.isCodeEditor)(he)&&he.hasModel()){const pe=he.getModel(),me=Z.range.startLineNumber;if(me>=1&&me<=pe.getLineCount()){const Se=he.getModel().getLineContent(me);t.alert(f.localize(19,null,Se,ne&&ne.stoppedDetails?`, reason ${ne.stoppedDetails.reason}`:"",Z.source?Z.source.name:"",Z.range.startLineNumber))}}}}ce?this.debugType.set(ce.configuration.type):this.debugType.reset(),this.viewModel.setFocus(Z,ne,ce,!!te?.explicit)}addWatchExpression(re){const oe=this.model.addWatchExpression(re);re||this.viewModel.setSelectedExpression(oe,!1),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}renameWatchExpression(re,oe){this.model.renameWatchExpression(re,oe),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}moveWatchExpression(re,oe){this.model.moveWatchExpression(re,oe),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}removeWatchExpressions(re){this.model.removeWatchExpressions(re),this.debugStorage.storeWatchExpressions(this.model.getWatchExpressions())}canSetBreakpointsIn(re){return this.adapterManager.canSetBreakpointsIn(re)}async enableOrDisableBreakpoints(re,oe){oe?(this.model.setEnablement(oe,re),this.debugStorage.storeBreakpoints(this.model),oe instanceof B.Breakpoint?await this.sendBreakpoints(oe.uri):oe instanceof B.FunctionBreakpoint?await this.sendFunctionBreakpoints():oe instanceof B.DataBreakpoint?await this.sendDataBreakpoints():oe instanceof B.InstructionBreakpoint?await this.sendInstructionBreakpoints():await this.sendExceptionBreakpoints()):(this.model.enableOrDisableAllBreakpoints(re),this.debugStorage.storeBreakpoints(this.model),await this.sendAllBreakpoints()),this.debugStorage.storeBreakpoints(this.model)}async addBreakpoints(re,oe,se=!0){const te=this.model.addBreakpoints(re,oe);return se&&te.forEach(Z=>t.status(f.localize(20,null,Z.lineNumber,re.fsPath))),this.debugStorage.storeBreakpoints(this.model),await this.sendBreakpoints(re),this.debugStorage.storeBreakpoints(this.model),te}async updateBreakpoints(re,oe,se){this.model.updateBreakpoints(oe),this.debugStorage.storeBreakpoints(this.model),se?this.breakpointsToSendOnResourceSaved.add(re):(await this.sendBreakpoints(re),this.debugStorage.storeBreakpoints(this.model))}async removeBreakpoints(re){const oe=this.model.getBreakpoints().filter(te=>!re||te.getId()===re);oe.forEach(te=>t.status(f.localize(21,null,te.lineNumber,te.uri.fsPath)));const se=(0,R.distinct)(oe,te=>te.uri.toString()).map(te=>te.uri);this.model.removeBreakpoints(oe),this.debugStorage.storeBreakpoints(this.model),await Promise.all(se.map(te=>this.sendBreakpoints(te)))}setBreakpointsActivated(re){return this.model.setBreakpointsActivated(re),this.sendAllBreakpoints()}addFunctionBreakpoint(re,oe){this.model.addFunctionBreakpoint(re||"",oe)}async updateFunctionBreakpoint(re,oe){this.model.updateFunctionBreakpoint(re,oe),this.debugStorage.storeBreakpoints(this.model),await this.sendFunctionBreakpoints()}async removeFunctionBreakpoints(re){this.model.removeFunctionBreakpoints(re),this.debugStorage.storeBreakpoints(this.model),await this.sendFunctionBreakpoints()}async addDataBreakpoint(re,oe,se,te,Z){this.model.addDataBreakpoint(re,oe,se,te,Z),this.debugStorage.storeBreakpoints(this.model),await this.sendDataBreakpoints(),this.debugStorage.storeBreakpoints(this.model)}async removeDataBreakpoints(re){this.model.removeDataBreakpoints(re),this.debugStorage.storeBreakpoints(this.model),await this.sendDataBreakpoints()}async addInstructionBreakpoint(re,oe,se,te){this.model.addInstructionBreakpoint(re,oe,se,te),this.debugStorage.storeBreakpoints(this.model),await this.sendInstructionBreakpoints(),this.debugStorage.storeBreakpoints(this.model)}async removeInstructionBreakpoints(re){this.model.removeInstructionBreakpoints(re),this.debugStorage.storeBreakpoints(this.model),await this.sendInstructionBreakpoints()}setExceptionBreakpoints(re){this.model.setExceptionBreakpoints(re),this.debugStorage.storeBreakpoints(this.model)}async setExceptionBreakpointCondition(re,oe){this.model.setExceptionBreakpointCondition(re,oe),this.debugStorage.storeBreakpoints(this.model),await this.sendExceptionBreakpoints()}async sendAllBreakpoints(re){const oe=(0,R.distinct)(this.model.getBreakpoints(),se=>se.uri.toString()).map(se=>this.sendBreakpoints(se.uri,!1,re));re?.capabilities.supportsConfigurationDoneRequest?await Promise.all([...oe,this.sendFunctionBreakpoints(re),this.sendDataBreakpoints(re),this.sendInstructionBreakpoints(re),this.sendExceptionBreakpoints(re)]):(await Promise.all(oe),await this.sendFunctionBreakpoints(re),await this.sendDataBreakpoints(re),await this.sendInstructionBreakpoints(re),await this.sendExceptionBreakpoints(re))}async sendBreakpoints(re,oe=!1,se){const te=this.model.getBreakpoints({uri:re,enabledOnly:!0});await ee(this.model,se,async Z=>{Z.configuration.noDebug||await Z.sendBreakpoints(re,te,oe)})}async sendFunctionBreakpoints(re){const oe=this.model.getFunctionBreakpoints().filter(se=>se.enabled&&this.model.areBreakpointsActivated());await ee(this.model,re,async se=>{se.capabilities.supportsFunctionBreakpoints&&!se.configuration.noDebug&&await se.sendFunctionBreakpoints(oe)})}async sendDataBreakpoints(re){const oe=this.model.getDataBreakpoints().filter(se=>se.enabled&&this.model.areBreakpointsActivated());await ee(this.model,re,async se=>{se.capabilities.supportsDataBreakpoints&&!se.configuration.noDebug&&await se.sendDataBreakpoints(oe)})}async sendInstructionBreakpoints(re){const oe=this.model.getInstructionBreakpoints().filter(se=>se.enabled&&this.model.areBreakpointsActivated());await ee(this.model,re,async se=>{se.capabilities.supportsInstructionBreakpoints&&!se.configuration.noDebug&&await se.sendInstructionBreakpoints(oe)})}sendExceptionBreakpoints(re){const oe=this.model.getExceptionBreakpoints().filter(se=>se.enabled);return ee(this.model,re,async se=>{se.capabilities.supportsConfigurationDoneRequest&&(!se.capabilities.exceptionBreakpointFilters||se.capabilities.exceptionBreakpointFilters.length===0)||se.configuration.noDebug||await se.sendExceptionBreakpoints(oe)})}onFileChanges(re){const oe=this.model.getBreakpoints().filter(te=>re.contains(te.uri,2));oe.length&&this.model.removeBreakpoints(oe);const se=[];for(const te of this.breakpointsToSendOnResourceSaved)re.contains(te,0)&&se.push(te);for(const te of se)this.breakpointsToSendOnResourceSaved.delete(te),this.sendBreakpoints(te,!0)}async runTo(re,oe,se){const te=this.getViewModel().focusedSession;if(this.state!==2||!te)return;const Z=!!this.getModel().getBreakpoints({column:se,lineNumber:oe,uri:re}).length;let ne,ce=this.getViewModel().focusedThread;if(!Z){const he=await this.addAndValidateBreakpoints(re,oe,se);he.thread&&(ce=he.thread),he.breakpoint&&(ne=he.breakpoint)}if(!ce)return;const de=ce.session.onDidChangeState(()=>{const he=te.state;(he===2||he===0)&&(ne&&this.removeBreakpoints(ne.getId()),de.dispose())});await ce.continue()}async addAndValidateBreakpoints(re,oe,se){const te=this.getModel(),Z=this.getViewModel(),ce=(await this.addBreakpoints(re,[{lineNumber:oe,column:se}],!1))?.[0];if(!ce)return{breakpoint:void 0,thread:Z.focusedThread};if(!ce.verified){let me;await(0,A.raceTimeout)(new Promise(Se=>{me=te.onDidChangeBreakpoints(()=>{ce.verified&&Se()})}),2e3),me.dispose()}let de;(function(me){me[me.Focused=0]="Focused",me[me.Verified=1]="Verified",me[me.VerifiedAndPausedInFile=2]="VerifiedAndPausedInFile",me[me.VerifiedAndFocused=3]="VerifiedAndFocused"})(de||(de={}));let he=Z.focusedThread,pe=0;for(const me of ce.sessionsThatVerified){const Se=te.getSession(me);if(!Se)continue;const Ie=Se.getAllThreads().filter(ve=>ve.stopped);if(pe<3&&Z.focusedThread&&Ie.includes(Z.focusedThread)&&(he=Z.focusedThread,pe=3),pe<2){const ve=Ie.find(be=>{const ge=be.getTopStackFrame();return ge&&this.uriIdentityService.extUri.isEqual(ge.source.uri,re)});ve&&(he=ve,pe=2)}pe<1&&(he=Ie[0],pe=2)}return{thread:he,breakpoint:ce}}};K=we([F(0,q.IEditorService),F(1,j.IPaneCompositePartService),F(2,D.IViewsService),F(3,D.IViewDescriptorService),F(4,g.INotificationService),F(5,n.IDialogService),F(6,G.IWorkbenchLayoutService),F(7,m.IWorkspaceContextService),F(8,s.IContextKeyService),F(9,Q.ILifecycleService),F(10,o.IInstantiationService),F(11,X.IExtensionService),F(12,a.IFileService),F(13,l.IConfigurationService),F(14,d.IExtensionHostDebugService),F(15,$.IActivityService),F(16,c.ICommandService),F(17,h.IQuickInputService),F(18,w.IWorkspaceTrustRequestService),F(19,v.IUriIdentityService)],K),e.DebugService=K;function Y(ie,re,oe,se,te){if(!se)if(re||oe)se=re?re.thread.session:oe.session;else{const Z=ie.getSessions();se=Z.find(ce=>ce.state===2)||Z.find(ce=>ce!==te&&ce!==te?.parentSession)||(Z.length?Z[0]:void 0)}if(!oe)if(re)oe=re.thread;else{const Z=se?se.getAllThreads():void 0;oe=Z&&Z.find(ce=>ce.stopped)||(Z&&Z.length?Z[0]:void 0)}return!re&&oe&&(re=oe.getTopStackFrame()),{session:se,thread:oe,stackFrame:re}}e.getStackFrameThreadAndSessionToFocus=Y;async function ee(ie,re,oe){re?await oe(re):await Promise.all(ie.getSessions().map(se=>oe(se)))}}),define(ae[687],le([1,0,86,10,139,79,36,16,11,21,2,1612,440,84,15,8,7,37,5,26,23,27,33,12,686,521,249,201,87,83,1135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDisconnectMenuItemAction=e.DebugToolBar=void 0;const T="debug.actionswidgetposition",_="debug.actionswidgety";let L=class extends g.Themable{constructor(B,V,z,x,H,W,U,$,q,X){super(U),this.notificationService=B,this.telemetryService=V,this.debugService=z,this.layoutService=x,this.storageService=H,this.configurationService=W,this.instantiationService=$,this.yCoordinate=0,this.isVisible=!1,this.isBuilt=!1,this.stopActionViewItemDisposables=this._register(new S.DisposableStore),this.$el=p.$("div.debug-toolbar"),this.$el.style.top=`${x.offset.top}px`,this.dragArea=p.append(this.$el,p.$("div.drag-area"+g.ThemeIcon.asCSSSelector(w.debugGripper)));const G=p.append(this.$el,p.$("div.action-bar-container"));this.debugToolBarMenu=q.createMenu(i.MenuId.DebugToolBar,X),this._register(this.debugToolBarMenu),this.activeActions=[],this.actionBar=this._register(new A.ActionBar(G,{orientation:0,actionViewItemProvider:Q=>{if(Q.id===m.FOCUS_SESSION_ID)return this.instantiationService.createInstance(h.FocusSessionActionViewItem,Q,void 0);if(Q.id===m.STOP_ID||Q.id===m.DISCONNECT_ID){this.stopActionViewItemDisposables.clear();const j=this.instantiationService.invokeFunction(K=>M(Q,this.stopActionViewItemDisposables,K));if(j)return j}return(0,u.createActionViewItem)(this.instantiationService,Q)}})),this.updateScheduler=this._register(new I.RunOnceScheduler(()=>{const Q=this.debugService.state,j=this.configurationService.getValue("debug").toolBarLocation;if(Q===0||j==="docked"||j==="hidden"||this.debugService.getModel().getSessions().every(Y=>Y.suppressDebugToolbar)||Q===1&&this.debugService.initializingOptions?.suppressDebugToolbar)return this.hide();const K=[];(0,u.createAndFillInActionBarActions)(this.debugToolBarMenu,{shouldForwardArgs:!0},K),E.equals(K,this.activeActions,(Y,ee)=>Y.id===ee.id&&Y.enabled===ee.enabled)||(this.actionBar.clear(),this.actionBar.push(K,{icon:!0,label:!1}),this.activeActions=K),this.show()},20)),this.updateStyles(),this.registerListeners(),this.hide()}registerListeners(){this._register(this.debugService.onDidChangeState(()=>this.updateScheduler.schedule())),this._register(this.configurationService.onDidChangeConfiguration(B=>{B.affectsConfiguration("debug.toolBarLocation")&&this.updateScheduler.schedule()})),this._register(this.debugToolBarMenu.onDidChange(()=>this.updateScheduler.schedule())),this._register(this.actionBar.actionRunner.onDidRun(B=>{B.error&&!b.isCancellationError(B.error)&&this.notificationService.error(B.error),this.telemetryService.publicLog2("workbenchActionExecuted",{id:B.action.id,from:"debugActionsWidget"})})),this._register(p.addDisposableListener(window,p.EventType.RESIZE,()=>this.setCoordinates())),this._register(p.addDisposableGenericMouseUpListener(this.dragArea,B=>{if(new R.StandardMouseEvent(B).detail===2){const z=this.$el.clientWidth;this.setCoordinates(.5*window.innerWidth-.5*z,0),this.storePosition()}})),this._register(p.addDisposableGenericMouseDownListener(this.dragArea,B=>{this.dragArea.classList.add("dragged");const V=p.addDisposableGenericMouseMoveListener(window,x=>{const H=new R.StandardMouseEvent(x);H.preventDefault(),this.setCoordinates(H.posx-14,H.posy-this.layoutService.offset.top)}),z=p.addDisposableGenericMouseUpListener(window,x=>{this.storePosition(),this.dragArea.classList.remove("dragged"),V.dispose(),z.dispose()})})),this._register(this.layoutService.onDidChangePartVisibility(()=>this.setYCoordinate())),this._register(t.PixelRatio.onDidChange(()=>this.setYCoordinate()))}storePosition(){const B=p.getComputedStyle(this.$el).left;if(B){const V=parseFloat(B)/window.innerWidth;this.storageService.store(T,V,0,1)}}updateStyles(){if(super.updateStyles(),this.$el){this.$el.style.backgroundColor=this.getColor(v.debugToolBarBackground)||"";const B=this.getColor(o.widgetShadow);this.$el.style.boxShadow=B?`0 0 8px 2px ${B}`:"";const V=this.getColor(o.contrastBorder),z=this.getColor(v.debugToolBarBorder);V?this.$el.style.border=`1px solid ${V}`:(this.$el.style.border=z?`solid ${z}`:"none",this.$el.style.border="1px 0")}}setYCoordinate(B=this.yCoordinate){const V=this.layoutService.offset.top;this.$el.style.top=`${V+B}px`,this.yCoordinate=B}setCoordinates(B,V){if(!this.isVisible)return;const z=this.$el.clientWidth;if(B===void 0){const H=this.storageService.get(T,0);B=H!==void 0?parseFloat(H)*window.innerWidth:.5*window.innerWidth-.5*z}B=Math.max(0,Math.min(B,window.innerWidth-z)),this.$el.style.left=`${B}px`,V===void 0&&(V=this.storageService.getNumber(_,0,0));const x=35;if(V<x/2||V>x+x/2){const H=V<x;this.setYCoordinate(H?0:x),this.storageService.store(_,H?0:2*x,0,1)}}show(){if(this.isVisible){this.setCoordinates();return}this.isBuilt||(this.isBuilt=!0,this.layoutService.container.appendChild(this.$el)),this.isVisible=!0,p.show(this.$el),this.setCoordinates()}hide(){this.isVisible=!1,p.hide(this.$el)}dispose(){super.dispose(),this.$el?.remove()}};L=we([F(0,d.INotificationService),F(1,a.ITelemetryService),F(2,D.IDebugService),F(3,y.IWorkbenchLayoutService),F(4,n.IStorageService),F(5,f.IConfigurationService),F(6,g.IThemeService),F(7,s.IInstantiationService),F(8,i.IMenuService),F(9,c.IContextKeyService)],L),e.DebugToolBar=L;function M(P,B,V){const z=V.get(i.IMenuService),x=V.get(c.IContextKeyService),H=V.get(s.IInstantiationService),W=V.get(l.IContextMenuService),U=z.createMenu(i.MenuId.DebugToolBarStop,x),$=[];if((0,u.createAndFillInActionBarActions)(U,{shouldForwardArgs:!0},$),!$.length)return;const q=B.add(new k.Action("notebook.moreRunActions",(0,C.localize)(0,null),"codicon-chevron-down",!0));return H.createInstance(r.DropdownWithPrimaryActionViewItem,P,q,$,"debug-stop-actions",W,{})}e.createDisconnectMenuItemAction=M;const O=[],N=(P,B,V,z,x,H,W)=>{i.MenuRegistry.appendMenuItem(i.MenuId.DebugToolBar,{group:"navigation",when:x,order:V,command:{id:P,title:B,icon:z,precondition:H},alt:W}),O.push(i.MenuRegistry.appendMenuItem(i.MenuId.ViewContainerTitle,{group:"navigation",when:c.ContextKeyExpr.and(x,c.ContextKeyExpr.equals("viewContainer",D.VIEWLET_ID),D.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),c.ContextKeyExpr.equals("config.debug.toolBarLocation","docked")),order:V,command:{id:P,title:B,icon:z,precondition:H}}))};i.MenuRegistry.onDidChangeMenu(P=>{if(P.has(i.MenuId.DebugToolBar)){(0,S.dispose)(O);const B=i.MenuRegistry.getMenuItems(i.MenuId.DebugToolBar);for(const V of B)O.push(i.MenuRegistry.appendMenuItem(i.MenuId.ViewContainerTitle,{...V,when:c.ContextKeyExpr.and(V.when,c.ContextKeyExpr.equals("viewContainer",D.VIEWLET_ID),D.CONTEXT_DEBUG_STATE.notEqualsTo("inactive"),c.ContextKeyExpr.equals("config.debug.toolBarLocation","docked"))}))}}),N(m.CONTINUE_ID,m.CONTINUE_LABEL,10,w.debugContinue,D.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),N(m.PAUSE_ID,m.PAUSE_LABEL,10,w.debugPause,D.CONTEXT_DEBUG_STATE.notEqualsTo("stopped"),D.CONTEXT_DEBUG_STATE.isEqualTo("running")),N(m.STOP_ID,m.STOP_LABEL,70,w.debugStop,D.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),void 0,{id:m.DISCONNECT_ID,title:m.DISCONNECT_LABEL,icon:w.debugDisconnect,precondition:c.ContextKeyExpr.and(D.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),D.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)}),N(m.DISCONNECT_ID,m.DISCONNECT_LABEL,70,w.debugDisconnect,D.CONTEXT_FOCUSED_SESSION_IS_ATTACH,void 0,{id:m.STOP_ID,title:m.STOP_LABEL,icon:w.debugStop,precondition:c.ContextKeyExpr.and(D.CONTEXT_FOCUSED_SESSION_IS_ATTACH,D.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED)}),N(m.STEP_OVER_ID,m.STEP_OVER_LABEL,20,w.debugStepOver,void 0,D.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),N(m.STEP_INTO_ID,m.STEP_INTO_LABEL,30,w.debugStepInto,void 0,D.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),N(m.STEP_OUT_ID,m.STEP_OUT_LABEL,40,w.debugStepOut,void 0,D.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),N(m.RESTART_SESSION_ID,m.RESTART_LABEL,60,w.debugRestart),N(m.STEP_BACK_ID,(0,C.localize)(1,null),50,w.debugStepBack,D.CONTEXT_STEP_BACK_SUPPORTED,D.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),N(m.REVERSE_CONTINUE_ID,(0,C.localize)(2,null),55,w.debugReverseContinue,D.CONTEXT_STEP_BACK_SUPPORTED,D.CONTEXT_DEBUG_STATE.isEqualTo("stopped")),N(m.FOCUS_SESSION_ID,m.FOCUS_SESSION_LABEL,100,void 0,D.CONTEXT_MULTI_SESSION_DEBUG),i.MenuRegistry.appendMenuItem(i.MenuId.DebugToolBarStop,{group:"navigation",when:c.ContextKeyExpr.and(D.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),D.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED),order:0,command:{id:m.DISCONNECT_ID,title:m.DISCONNECT_LABEL,icon:w.debugDisconnect}}),i.MenuRegistry.appendMenuItem(i.MenuId.DebugToolBarStop,{group:"navigation",when:c.ContextKeyExpr.and(D.CONTEXT_FOCUSED_SESSION_IS_ATTACH,D.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED),order:0,command:{id:m.STOP_ID,title:m.STOP_LABEL,icon:w.debugStop}}),i.MenuRegistry.appendMenuItem(i.MenuId.DebugToolBarStop,{group:"navigation",when:c.ContextKeyExpr.or(c.ContextKeyExpr.and(D.CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated(),D.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED,D.CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED),c.ContextKeyExpr.and(D.CONTEXT_FOCUSED_SESSION_IS_ATTACH,D.CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED)),order:0,command:{id:m.DISCONNECT_AND_SUSPEND_ID,title:m.DISCONNECT_AND_SUSPEND_LABEL,icon:w.debugDisconnect}})}),define(ae[2787],le([1,0,10,79,250,36,11,29,6,96,2,53,28,1594,84,15,8,7,37,5,38,49,76,26,41,27,33,73,12,129,45,397,249,201,687,87,192,246]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallStackView=e.getSpecificSourceName=e.getContextForContributedActions=e.getContext=void 0;const V=t.$;function z(ve,be){return be.sessionId=ve.getId(),be}function x(ve,be){return be.threadId=ve.getId(),z(ve.session,be),be}function H(ve,be){return be.frameId=ve.getId(),be.frameName=ve.name,be.frameLocation={range:ve.range,source:ve.source.raw},x(ve.thread,be),be}function W(ve){return ve instanceof P.StackFrame?H(ve,{}):ve instanceof P.Thread?x(ve,{}):ce(ve)?z(ve,{}):void 0}e.getContext=W;function U(ve){return ve instanceof P.StackFrame?ve.source.inMemory?ve.source.raw.path||ve.source.reference||ve.source.name:ve.source.uri.toString():ve instanceof P.Thread?ve.threadId:ce(ve)?ve.getId():""}e.getContextForContributedActions=U;function $(ve){let be=ve.thread.getStaleCallStack();be=be.length>0?be:ve.thread.getCallStack();const ge=be.map(De=>De.source).filter(De=>De!==ve.source);let ue=0;if(ge.forEach(De=>{De.name===ve.source.name&&(ue=Math.max(ue,(0,r.commonSuffixLength)(ve.source.uri.path,De.uri.path)))}),ue===0)return ve.source.name;const Ce=Math.max(0,ve.source.uri.path.lastIndexOf(C.posix.sep,ve.source.uri.path.length-ue-1));return(Ce>0?"...":"")+ve.source.uri.path.substring(Ce)}e.getSpecificSourceName=$;async function q(ve,be){ve.parentSession&&await q(ve.parentSession,be),await be.expand(ve)}let X=class extends y.ViewPane{constructor(be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te){super(be,Ce,ge,Pe,fe,Ae,De,ye,ke,Ee),this.options=be,this.debugService=ue,this.menuService=Te,this.needsRefresh=!1,this.ignoreSelectionChangedEvent=!1,this.ignoreFocusStackFrameEvent=!1,this.autoExpandedSessions=new Set,this.selectionNeedsUpdate=!1,this.onCallStackChangeScheduler=this._register(new k.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,Le=_e.length===1?_e[0].getStoppedDetails():void 0;Le&&(Re||typeof Le.threadId!="number")?(this.stateMessageLabel.textContent=Z(Le),this.stateMessageLabel.title=te(Le),this.stateMessageLabel.classList.toggle("exception",Le.reason==="exception"),this.stateMessage.hidden=!1):_e.length===1&&_e[0].state===3?(this.stateMessageLabel.textContent=(0,u.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 Me=new Set;_e.forEach(Oe=>{Oe.parentSession&&!this.autoExpandedSessions.has(Oe.parentSession)&&Me.add(Oe.parentSession)});for(const Oe of Me)await q(Oe,this.tree),this.autoExpandedSessions.add(Oe)}catch{}this.selectionNeedsUpdate&&(this.selectionNeedsUpdate=!1,await this.updateTreeSelection())},50))}renderHeaderTitle(be){super.renderHeaderTitle(be,this.options.title),this.stateMessage=t.append(be,V("span.call-stack-state-message")),this.stateMessage.hidden=!0,this.stateMessageLabel=t.append(this.stateMessage,V("span.label"))}renderBody(be){super.renderBody(be),this.element.classList.add("debug-pane"),be.classList.add("debug-call-stack");const ge=(0,_.renderViewTree)(be);this.dataSource=new he(this.debugService),this.tree=this.instantiationService.createInstance(o.WorkbenchCompressibleAsyncDataTree,"CallStackView",ge,new se,new me(this.debugService),[this.instantiationService.createInstance(Q),this.instantiationService.createInstance(K),this.instantiationService.createInstance(ee),new ie,new re(this.themeService),new oe(this.themeService)],this.dataSource,{accessibilityProvider:new pe,compressionEnabled:!0,autoExpandSingleChildren:!0,identityProvider:{getId:Ce=>typeof Ce=="string"?Ce:Ce instanceof Array?`showMore ${Ce[0].getId()}`:Ce.getId()},keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Ce=>ce(Ce)?Ce.getLabel():Ce instanceof P.Thread?`${Ce.name} ${Ce.stateLabel}`:Ce instanceof P.StackFrame||typeof Ce=="string"?Ce:Ce instanceof P.ThreadAndSessionIds?re.LABEL:(0,u.localize)(1,null),getCompressedNodeKeyboardNavigationLabel:Ce=>{const De=Ce[0];return ce(De)?De.getLabel():""}},expandOnlyOnTwistieClick:!0,overrideStyles:{listBackground:this.getBackgroundColor()}}),this.tree.setInput(this.debugService.getModel()),this._register(this.tree.onDidOpen(async Ce=>{if(this.ignoreSelectionChangedEvent)return;const De=(Pe,fe,ye,ke={})=>{this.ignoreFocusStackFrameEvent=!0;try{this.debugService.focusStackFrame(Pe,fe,ye,{...ke,explicit:!0})}finally{this.ignoreFocusStackFrameEvent=!1}},Ae=Ce.element;if(Ae instanceof P.StackFrame){const Pe={preserveFocus:Ce.editorOptions.preserveFocus,sideBySide:Ce.sideBySide,pinned:Ce.editorOptions.pinned};De(Ae,Ae.thread,Ae.thread.session,Pe)}if(Ae instanceof P.Thread&&De(void 0,Ae,Ae.session),ce(Ae)&&De(void 0,void 0,Ae),Ae instanceof P.ThreadAndSessionIds){const Pe=this.debugService.getModel().getSession(Ae.sessionId),fe=Pe&&Pe.getThread(Ae.threadId);if(fe){const ye=fe.stoppedDetails?.totalFrames,ke=typeof ye=="number"?ye-fe.getCallStack().length:void 0;await fe.fetchCallStack(ke),await this.tree.updateChildren()}}Ae instanceof Array&&(this.dataSource.deemphasizedStackFramesToShow.push(...Ae),this.tree.updateChildren())})),this._register(this.debugService.getModel().onDidChangeCallStack(()=>{if(!this.isBodyVisible()){this.needsRefresh=!0;return}this.onCallStackChangeScheduler.isScheduled()||this.onCallStackChangeScheduler.schedule()}));const ue=I.Event.any(this.debugService.getViewModel().onDidFocusStackFrame,this.debugService.getViewModel().onDidFocusSession);this._register(ue(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(Ce=>this.onContextMenu(Ce))),this.debugService.state===2&&this.onCallStackChangeScheduler.schedule(0),this._register(this.onDidChangeBodyVisibility(Ce=>{Ce&&this.needsRefresh&&this.onCallStackChangeScheduler.schedule()})),this._register(this.debugService.onDidNewSession(Ce=>{const De=[];De.push(Ce.onDidChangeName(()=>{this.tree.hasNode(Ce)&&this.tree.rerender(Ce)})),De.push(Ce.onDidEndAdapter(()=>(0,S.dispose)(De))),Ce.parentSession&&this.autoExpandedSessions.delete(Ce.parentSession)}))}layoutBody(be,ge){super.layoutBody(be,ge),this.tree.layout(be,ge)}focus(){this.tree.domFocus()}collapseAll(){this.tree.collapseAll()}async updateTreeSelection(){if(!this.tree||!this.tree.getInput())return;const be=De=>{this.ignoreSelectionChangedEvent=!0;try{this.tree.setSelection([De]),this.tree.getRelativeTop(De)===null?this.tree.reveal(De,.5):this.tree.reveal(De)}catch{}finally{this.ignoreSelectionChangedEvent=!1}},ge=this.debugService.getViewModel().focusedThread,ue=this.debugService.getViewModel().focusedSession,Ce=this.debugService.getViewModel().focusedStackFrame;if(!ge)ue?be(ue):this.tree.setSelection([]);else{try{await q(ge.session,this.tree)}catch{}try{await this.tree.expand(ge)}catch{}const De=Ce||ue;De&&be(De)}}onContextMenu(be){const ge=be.element;let ue=[];ce(ge)?ue=G(ge):ge instanceof P.Thread?ue=j(ge):ge instanceof P.StackFrame&&(ue=Y(ge));const Ae={primary:[],secondary:[]},Pe=this.contextKeyService.createOverlay(ue),fe=this.menuService.createMenu(f.MenuId.DebugCallStackContext,Pe);(0,i.createAndFillInContextMenuActions)(fe,{arg:U(ge),shouldForwardArgs:!0},Ae,"inline"),this.contextMenuService.showContextMenu({getAnchor:()=>be.anchor,getActions:()=>Ae.secondary,getActionsContext:()=>W(ge)})}};X=we([F(1,s.IContextMenuService),F(2,N.IDebugService),F(3,n.IKeybindingService),F(4,d.IInstantiationService),F(5,T.IViewDescriptorService),F(6,c.IConfigurationService),F(7,l.IContextKeyService),F(8,h.IOpenerService),F(9,D.IThemeService),F(10,v.ITelemetryService),F(11,f.IMenuService)],X),e.CallStackView=X;function G(ve){return[[N.CONTEXT_CALLSTACK_ITEM_TYPE.key,"session"],[N.CONTEXT_CALLSTACK_SESSION_IS_ATTACH.key,(0,B.isSessionAttach)(ve)],[N.CONTEXT_CALLSTACK_ITEM_STOPPED.key,ve.state===2],[N.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD.key,ve.getAllThreads().length===1]]}let Q=class _l{constructor(be,ge,ue){this.instantiationService=be,this.contextKeyService=ge,this.menuService=ue}get templateId(){return _l.ID}renderTemplate(be){const ge=t.append(be,V(".session"));t.append(ge,V(D.ThemeIcon.asCSSSelector(M.callstackViewSession)));const ue=t.append(ge,V(".name")),Ce=t.append(ge,V("span.state.label.monaco-count-badge.long")),De=new R.HighlightedLabel(ue),Ae=new S.DisposableStore,Pe=Ae.add(new S.DisposableStore),fe=Ae.add(new p.ActionBar(ge,{actionViewItemProvider:ke=>{if((ke.id===L.STOP_ID||ke.id===L.DISCONNECT_ID)&&ke instanceof f.MenuItemAction){Pe.clear();const Ee=this.instantiationService.invokeFunction(Te=>(0,O.createDisconnectMenuItemAction)(ke,Pe,Te));if(Ee)return Ee}if(ke instanceof f.MenuItemAction)return this.instantiationService.createInstance(i.MenuEntryActionViewItem,ke,void 0);if(ke instanceof f.SubmenuItemAction)return this.instantiationService.createInstance(i.SubmenuEntryActionViewItem,ke,void 0)}})),ye=Ae.add(new S.DisposableStore);return{session:ge,name:ue,stateLabel:Ce,label:De,actionBar:fe,elementDisposable:ye,templateDisposable:Ae}}renderElement(be,ge,ue){this.doRenderElement(be.element,(0,b.createMatches)(be.filterData),ue)}renderCompressedElements(be,ge,ue){const Ce=be.element.elements[be.element.elements.length-1],De=(0,b.createMatches)(be.filterData);this.doRenderElement(Ce,De,ue)}doRenderElement(be,ge,ue){ue.session.title=(0,u.localize)(2,null),ue.label.set(be.getLabel(),ge);const Ce=be.getStoppedDetails(),De=be.getAllThreads().find(ye=>ye.stopped),Ae=this.contextKeyService.createOverlay(G(be)),Pe=ue.elementDisposable.add(this.menuService.createMenu(f.MenuId.DebugCallStackContext,Ae)),fe=()=>{ue.actionBar.clear();const ye=[],Ee={primary:ye,secondary:[]};(0,i.createAndFillInActionBarActions)(Pe,{arg:U(be),shouldForwardArgs:!0},Ee,"inline"),ue.actionBar.push(ye,{icon:!0,label:!1}),ue.actionBar.context=W(be)};ue.elementDisposable.add(Pe.onDidChange(()=>fe())),fe(),ue.stateLabel.style.display="",Ce?(ue.stateLabel.textContent=Z(Ce),ue.session.title=`${be.getLabel()}: ${te(Ce)}`,ue.stateLabel.classList.toggle("exception",Ce.reason==="exception")):De&&De.stoppedDetails?(ue.stateLabel.textContent=Z(De.stoppedDetails),ue.session.title=`${be.getLabel()}: ${te(De.stoppedDetails)}`,ue.stateLabel.classList.toggle("exception",De.stoppedDetails.reason==="exception")):(ue.stateLabel.textContent=(0,u.localize)(3,null),ue.stateLabel.classList.remove("exception"))}disposeTemplate(be){be.templateDisposable.dispose()}disposeElement(be,ge,ue){ue.elementDisposable.clear()}disposeCompressedElements(be,ge,ue,Ce){ue.elementDisposable.clear()}};Q.ID="session",Q=we([F(0,d.IInstantiationService),F(1,l.IContextKeyService),F(2,f.IMenuService)],Q);function j(ve){return[[N.CONTEXT_CALLSTACK_ITEM_TYPE.key,"thread"],[N.CONTEXT_CALLSTACK_ITEM_STOPPED.key,ve.stopped]]}let K=class Al{constructor(be,ge){this.contextKeyService=be,this.menuService=ge}get templateId(){return Al.ID}renderTemplate(be){const ge=t.append(be,V(".thread")),ue=t.append(ge,V(".name")),Ce=t.append(ge,V("span.state.label.monaco-count-badge.long")),De=new R.HighlightedLabel(ue),Ae=new S.DisposableStore,Pe=Ae.add(new p.ActionBar(ge)),fe=Ae.add(new S.DisposableStore);return{thread:ge,name:ue,stateLabel:Ce,label:De,actionBar:Pe,elementDisposable:fe,templateDisposable:Ae}}renderElement(be,ge,ue){const Ce=be.element;ue.thread.title=Ce.name,ue.label.set(Ce.name,(0,b.createMatches)(be.filterData)),ue.stateLabel.textContent=Ce.stateLabel,ue.stateLabel.classList.toggle("exception",Ce.stoppedDetails?.reason==="exception");const De=this.contextKeyService.createOverlay(j(Ce)),Ae=ue.elementDisposable.add(this.menuService.createMenu(f.MenuId.DebugCallStackContext,De)),Pe=()=>{ue.actionBar.clear();const fe=[],ke={primary:fe,secondary:[]};(0,i.createAndFillInActionBarActions)(Ae,{arg:U(Ce),shouldForwardArgs:!0},ke,"inline"),ue.actionBar.push(fe,{icon:!0,label:!1}),ue.actionBar.context=W(Ce)};ue.elementDisposable.add(Ae.onDidChange(()=>Pe())),Pe()}renderCompressedElements(be,ge,ue,Ce){throw new Error("Method not implemented.")}disposeElement(be,ge,ue){ue.elementDisposable.clear()}disposeTemplate(be){be.templateDisposable.dispose()}};K.ID="thread",K=we([F(0,l.IContextKeyService),F(1,f.IMenuService)],K);function Y(ve){return[[N.CONTEXT_CALLSTACK_ITEM_TYPE.key,"stackFrame"],[N.CONTEXT_STACK_FRAME_SUPPORTS_RESTART.key,ve.canRestart]]}let ee=class Ll{constructor(be,ge){this.labelService=be,this.notificationService=ge}get templateId(){return Ll.ID}renderTemplate(be){const ge=t.append(be,V(".stack-frame")),ue=t.append(ge,V("span.label.expression")),Ce=t.append(ge,V(".file")),De=t.append(Ce,V("span.file-name")),Ae=t.append(Ce,V("span.line-number-wrapper")),Pe=t.append(Ae,V("span.line-number.monaco-count-badge")),fe=new R.HighlightedLabel(ue),ye=new S.DisposableStore,ke=ye.add(new p.ActionBar(ge));return{file:Ce,fileName:De,label:fe,lineNumber:Pe,stackFrame:ge,actionBar:ke,templateDisposable:ye}}renderElement(be,ge,ue){const Ce=be.element;ue.stackFrame.classList.toggle("disabled",!Ce.source||!Ce.source.available||de(Ce)),ue.stackFrame.classList.toggle("label",Ce.presentationHint==="label"),ue.stackFrame.classList.toggle("subtle",Ce.presentationHint==="subtle");const De=!!Ce.thread.session.capabilities.supportsRestartFrame&&Ce.presentationHint!=="label"&&Ce.presentationHint!=="subtle"&&Ce.canRestart;if(ue.stackFrame.classList.toggle("has-actions",De),ue.file.title=Ce.source.inMemory?Ce.source.uri.path:this.labelService.getUriLabel(Ce.source.uri),Ce.source.raw.origin&&(ue.file.title+=` ${Ce.source.raw.origin}`),ue.label.set(Ce.name,(0,b.createMatches)(be.filterData),Ce.name),ue.fileName.textContent=$(Ce),Ce.range.startLineNumber!==void 0?(ue.lineNumber.textContent=`${Ce.range.startLineNumber}`,Ce.range.startColumn&&(ue.lineNumber.textContent+=`:${Ce.range.startColumn}`),ue.lineNumber.classList.remove("unavailable")):ue.lineNumber.classList.add("unavailable"),ue.actionBar.clear(),De){const Ae=new A.Action("debug.callStack.restartFrame",(0,u.localize)(4,null),D.ThemeIcon.asClassName(M.debugRestartFrame),!0,async()=>{try{await Ce.restart()}catch(Pe){this.notificationService.error(Pe)}});ue.actionBar.push(Ae,{icon:!0,label:!1})}}renderCompressedElements(be,ge,ue,Ce){throw new Error("Method not implemented.")}disposeTemplate(be){be.actionBar.dispose()}};ee.ID="stackFrame",ee=we([F(0,a.ILabelService),F(1,g.INotificationService)],ee);class ie{get templateId(){return ie.ID}renderTemplate(be){return{label:t.append(be,V(".error"))}}renderElement(be,ge,ue){const Ce=be.element;ue.label.textContent=Ce,ue.label.title=Ce}renderCompressedElements(be,ge,ue,Ce){throw new Error("Method not implemented.")}disposeTemplate(be){}}ie.ID="error";class re{constructor(be){this.themeService=be}get templateId(){return re.ID}renderTemplate(be){const ge=t.append(be,V(".load-all")),ue=(0,w.attachStylerCallback)(this.themeService,{textLinkForeground:m.textLinkForeground},Ce=>{Ce.textLinkForeground&&(ge.style.color=Ce.textLinkForeground.toString())});return{label:ge,toDispose:ue}}renderElement(be,ge,ue){ue.label.textContent=re.LABEL}renderCompressedElements(be,ge,ue,Ce){throw new Error("Method not implemented.")}disposeTemplate(be){be.toDispose.dispose()}}re.ID="loadMore",re.LABEL=(0,u.localize)(5,null);class oe{constructor(be){this.themeService=be}get templateId(){return oe.ID}renderTemplate(be){const ge=t.append(be,V(".show-more")),ue=(0,w.attachStylerCallback)(this.themeService,{textLinkForeground:m.textLinkForeground},Ce=>{Ce.textLinkForeground&&(ge.style.color=Ce.textLinkForeground.toString())});return{label:ge,toDispose:ue}}renderElement(be,ge,ue){const Ce=be.element;Ce.every(De=>!!(De.source&&De.source.origin&&De.source.origin===Ce[0].source.origin))?ue.label.textContent=(0,u.localize)(6,null,Ce.length,Ce[0].source.origin):ue.label.textContent=(0,u.localize)(7,null,Ce.length)}renderCompressedElements(be,ge,ue,Ce){throw new Error("Method not implemented.")}disposeTemplate(be){be.toDispose.dispose()}}oe.ID="showMore";class se{getHeight(be){return be instanceof P.StackFrame&&be.presentationHint==="label"||be instanceof P.ThreadAndSessionIds||be instanceof Array?16:22}getTemplateId(be){return ce(be)?Q.ID:be instanceof P.Thread?K.ID:be instanceof P.StackFrame?ee.ID:typeof be=="string"?ie.ID:be instanceof P.ThreadAndSessionIds?re.ID:oe.ID}}function te(ve){return ve.text??Z(ve)}function Z(ve){return ve.description||(ve.reason?(0,u.localize)(8,null,ve.reason):(0,u.localize)(9,null))}function ne(ve){return typeof ve.getSessions=="function"}function ce(ve){return ve&&typeof ve.getAllThreads=="function"}function de(ve){return ve.source.presentationHint==="deemphasize"||ve.presentationHint==="deemphasize"}class he{constructor(be){this.debugService=be,this.deemphasizedStackFramesToShow=[]}hasChildren(be){if(ce(be)){const ge=be.getAllThreads();return ge.length>1||ge.length===1&&ge[0].stopped||!!this.debugService.getModel().getSessions().find(ue=>ue.parentSession===be)}return ne(be)||be instanceof P.Thread&&be.stopped}async getChildren(be){if(ne(be)){const ge=be.getSessions();if(ge.length===0)return Promise.resolve([]);if(ge.length>1||this.debugService.getViewModel().isMultiSessionView())return Promise.resolve(ge.filter(Ce=>!Ce.parentSession));const ue=ge[0].getAllThreads();return ue.length===1?this.getThreadChildren(ue[0]):Promise.resolve(ue)}else if(ce(be)){const ge=this.debugService.getModel().getSessions().filter(Ce=>Ce.parentSession===be),ue=be.getAllThreads();return ue.length===1?(await this.getThreadChildren(ue[0])).concat(ge):Promise.resolve(ue.concat(ge))}else return this.getThreadChildren(be)}getThreadChildren(be){return this.getThreadCallstack(be).then(ge=>{const ue=[];return ge.forEach((Ce,De)=>{if(Ce instanceof P.StackFrame&&Ce.source&&de(Ce)&&this.deemphasizedStackFramesToShow.indexOf(Ce)===-1){if(ue.length){const Pe=ue[ue.length-1];if(Pe instanceof Array){Pe.push(Ce);return}}const Ae=De<ge.length-1?ge[De+1]:void 0;if(Ae instanceof P.StackFrame&&Ae.source&&de(Ae)){ue.push([Ce]);return}}ue.push(Ce)}),ue})}async getThreadCallstack(be){let ge=be.getCallStack();return(!ge||!ge.length)&&(await be.fetchCallStack(),ge=be.getCallStack()),ge.length===1&&be.session.capabilities.supportsDelayedStackTraceLoading&&be.stoppedDetails&&be.stoppedDetails.totalFrames&&be.stoppedDetails.totalFrames>1&&(ge=ge.concat(be.getStaleCallStack().slice(1))),be.stoppedDetails&&be.stoppedDetails.framesErrorMessage&&(ge=ge.concat([be.stoppedDetails.framesErrorMessage])),!be.reachedEndOfCallStack&&be.stoppedDetails&&(ge=ge.concat([new P.ThreadAndSessionIds(be.session.getId(),be.threadId)])),ge}}class pe{getWidgetAriaLabel(){return(0,u.localize)(10,null)}getWidgetRole(){return"treegrid"}getRole(be){return"row"}getAriaLabel(be){if(be instanceof P.Thread)return(0,u.localize)(11,null,be.name,be.stateLabel);if(be instanceof P.StackFrame)return(0,u.localize)(12,null,be.name,be.range.startLineNumber,$(be));if(ce(be)){const ge=be.getAllThreads().find(Ce=>Ce.stopped),ue=ge?ge.stateLabel:(0,u.localize)(13,null);return(0,u.localize)(14,null,be.getLabel(),ue)}return typeof be=="string"?be:be instanceof Array?(0,u.localize)(15,null,be.length):re.LABEL}}class me{constructor(be){this.debugService=be}isIncompressible(be){return ce(be)?!(be.compact||this.debugService.getModel().getSessions().some(ue=>ue.parentSession===be&&ue.compact)):!0}}(0,f.registerAction2)(class extends y.ViewAction{constructor(){super({id:"callStack.collapse",viewId:N.CALLSTACK_VIEW_ID,title:(0,u.localize)(16,null),f1:!1,icon:E.Codicon.collapseAll,precondition:N.CONTEXT_DEBUG_STATE.isEqualTo((0,N.getStateLabel)(2)),menu:{id:f.MenuId.ViewTitle,order:10,group:"navigation",when:l.ContextKeyExpr.equals("view",N.CALLSTACK_VIEW_ID)}})}runInView(be,ge){ge.collapseAll()}});function Se(ve,be,ge,ue,Ce,De){f.MenuRegistry.appendMenuItem(f.MenuId.DebugCallStackContext,{group:"inline",order:Ce,when:ue,command:{id:ve,title:be,icon:ge,precondition:De}})}const Ie=l.ContextKeyExpr.or(N.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("thread"),l.ContextKeyExpr.and(N.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),N.CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD));Se(L.PAUSE_ID,L.PAUSE_LABEL,M.debugPause,l.ContextKeyExpr.and(Ie,N.CONTEXT_CALLSTACK_ITEM_STOPPED.toNegated()),10),Se(L.CONTINUE_ID,L.CONTINUE_LABEL,M.debugContinue,l.ContextKeyExpr.and(Ie,N.CONTEXT_CALLSTACK_ITEM_STOPPED),10),Se(L.STEP_OVER_ID,L.STEP_OVER_LABEL,M.debugStepOver,Ie,20,N.CONTEXT_CALLSTACK_ITEM_STOPPED),Se(L.STEP_INTO_ID,L.STEP_INTO_LABEL,M.debugStepInto,Ie,30,N.CONTEXT_CALLSTACK_ITEM_STOPPED),Se(L.STEP_OUT_ID,L.STEP_OUT_LABEL,M.debugStepOut,Ie,40,N.CONTEXT_CALLSTACK_ITEM_STOPPED),Se(L.RESTART_SESSION_ID,L.RESTART_LABEL,M.debugRestart,N.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session"),50),Se(L.STOP_ID,L.STOP_LABEL,M.debugStop,l.ContextKeyExpr.and(N.CONTEXT_CALLSTACK_SESSION_IS_ATTACH.toNegated(),N.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session")),60),Se(L.DISCONNECT_ID,L.DISCONNECT_LABEL,M.debugDisconnect,l.ContextKeyExpr.and(N.CONTEXT_CALLSTACK_SESSION_IS_ATTACH,N.CONTEXT_CALLSTACK_ITEM_TYPE.isEqualTo("session")),60)}),define(ae[468],le([1,0,43,261,628,19,78,5,2,62,150,49,157,24,18,6,22,94,107]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileEditorInput=void 0;var d;(function(a){a[a.None=0]="None",a[a.Text=1]="Text",a[a.Binary=2]="Binary"})(d||(d={}));let n=class Ml extends p.AbstractTextResourceEditorInput{get typeId(){return S.FILE_EDITOR_INPUT_ID}get editorId(){return t.DEFAULT_EDITOR_ASSOCIATION.id}get capabilities(){let o=32;return this.model?this.model.isReadonly()&&(o|=2):this.fileService.hasProvider(this.resource)?this.fileService.hasCapability(this.resource,2048)&&(o|=2):o|=4,o&2||(o|=128),o}constructor(o,g,h,v,m,w,D,y,T,_,L,M,O,N,P){super(o,g,N,T,L,M),this.instantiationService=y,this.textModelResolverService=_,this.filesConfigurationService=O,this.pathService=P,this.forceOpenAs=0,this.model=void 0,this.cachedTextFileModelReference=void 0,this.modelListeners=this._register(new I.DisposableStore),this.model=this.textFileService.files.get(o),h&&this.setPreferredName(h),v&&this.setPreferredDescription(v),m&&this.setPreferredEncoding(m),w&&this.setPreferredLanguageId(w),typeof D=="string"&&this.setPreferredContents(D),this._register(this.textFileService.files.onDidCreate(B=>this.onDidCreateTextFileModel(B))),this.model&&this.registerModelListeners(this.model)}onDidCreateTextFileModel(o){(0,i.isEqual)(o.resource,this.resource)&&(this.model=o,this.registerModelListeners(o))}registerModelListeners(o){this.modelListeners.clear(),this.modelListeners.add(o.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this.modelListeners.add(o.onDidChangeReadonly(()=>this._onDidChangeCapabilities.fire())),this.modelListeners.add(o.onDidSaveError(()=>this._onDidChangeDirty.fire())),this.modelListeners.add(f.Event.once(o.onWillDispose)(()=>{this.modelListeners.clear(),this.model=void 0}))}getName(){return this.preferredName||super.getName()}setPreferredName(o){!this.allowLabelOverride()||this.preferredName!==o&&(this.preferredName=o,this._onDidChangeLabel.fire())}allowLabelOverride(){return this.resource.scheme!==this.pathService.defaultUriScheme&&this.resource.scheme!==c.Schemas.vscodeUserData&&this.resource.scheme!==c.Schemas.file&&this.resource.scheme!==c.Schemas.vscodeRemote}getPreferredName(){return this.preferredName}getDescription(o){return this.preferredDescription||super.getDescription(o)}setPreferredDescription(o){!this.allowLabelOverride()||this.preferredDescription!==o&&(this.preferredDescription=o,this._onDidChangeLabel.fire())}getPreferredDescription(){return this.preferredDescription}getEncoding(){return this.model?this.model.getEncoding():this.preferredEncoding}getPreferredEncoding(){return this.preferredEncoding}async setEncoding(o,g){return this.setPreferredEncoding(o),this.model?.setEncoding(o,g)}setPreferredEncoding(o){this.preferredEncoding=o,this.setForceOpenAsText()}getLanguageId(){return this.model?this.model.getLanguageId():this.preferredLanguageId}getPreferredLanguageId(){return this.preferredLanguageId}setLanguageId(o,g){this.setPreferredLanguageId(o),this.model?.setLanguageId(o,g)}setPreferredLanguageId(o){this.preferredLanguageId=o,this.setForceOpenAsText()}setPreferredContents(o){this.preferredContents=o,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(o){return this.forceOpenAs===2?o.find(g=>g.typeId===S.BINARY_FILE_EDITOR_ID):o.find(g=>g.typeId===S.TEXT_FILE_EDITOR_ID)}resolve(){return this.forceOpenAs===2?this.doResolveAsBinary():this.doResolveAsText()}async doResolveAsText(){try{const o=this.preferredContents;this.preferredContents=void 0,await this.textFileService.files.resolve(this.resource,{languageId:this.preferredLanguageId,encoding:this.preferredEncoding,contents:typeof o=="string"?(0,l.createTextBufferFactory)(o):void 0,reload:{async:!0},allowBinary:this.forceOpenAs===1,reason:1}),this.cachedTextFileModelReference||(this.cachedTextFileModelReference=await this.textModelResolverService.createModelReference(this.resource));const g=this.cachedTextFileModelReference.object;return this.isDisposed()&&this.disposeModelReference(),g}catch(o){if(o.textFileOperationResult===0||o.fileOperationResult===7)return this.doResolveAsBinary();throw o}}async doResolveAsBinary(){const o=this.instantiationService.createInstance(R.BinaryEditorModel,this.preferredResource,this.getName());return await o.resolve(),o}isResolved(){return!!this.model}async rename(o,g){return{editor:{resource:g,encoding:this.getEncoding(),options:{viewState:(0,t.findViewStateForEditor)(this,o,this.editorService)}}}}toUntyped(o){const g={resource:this.preferredResource,forceFile:!0,options:{override:this.editorId}};return typeof o?.preserveViewState=="number"&&(g.encoding=this.getEncoding(),g.languageId=this.getLanguageId(),g.contents=(()=>{const h=this.textFileService.files.get(this.resource);if(h?.isDirty())return h.textEditorModel.getValue()})(),g.options={...g.options,viewState:(0,t.findViewStateForEditor)(this,o.preserveViewState,this.editorService)}),g}matches(o){return this===o?!0:o instanceof Ml?(0,i.isEqual)(o.resource,this.resource):(0,t.isResourceEditorInput)(o)?super.matches(o):!1}dispose(){this.model=void 0,this.disposeModelReference(),super.dispose()}disposeModelReference(){(0,I.dispose)(this.cachedTextFileModelReference),this.cachedTextFileModelReference=void 0}};n=we([F(7,E.IInstantiationService),F(8,k.ITextFileService),F(9,b.ITextModelService),F(10,C.ILabelService),F(11,A.IFileService),F(12,r.IFilesConfigurationService),F(13,u.IEditorService),F(14,s.IPathService)],n),e.FileEditorInput=n}),define(ae[965],le([1,0,1684,117,18,36,9,78,5,2,62,60,230,7,150,468,312,26,41,23,46,6,24,14,22,106,43,108]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"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 D="learnMoreDirtyWriteError",y=(0,t.localize)(0,null);let T=class extends b.Disposable{constructor(G,Q,j,K,Y,ee,ie){super(),this.notificationService=G,this.textFileService=Q,this.contextKeyService=j,this.editorService=K,this.instantiationService=ee,this.storageService=ie,this.messages=new C.ResourceMap,this.conflictResolutionContext=new u.RawContextKey(e.CONFLICT_RESOLUTION_CONTEXT,!1,!0).bindTo(this.contextKeyService),this.activeConflictResolutionResource=void 0;const re=this._register(ee.createInstance(i.TextFileContentProvider));this._register(Y.registerTextModelContentProvider(e.CONFLICT_RESOLUTION_SCHEME,re)),this.textFileService.files.saveErrorHandler=this,this.registerListeners()}registerListeners(){this._register(this.textFileService.files.onDidSave(G=>this.onFileSavedOrReverted(G.model.resource))),this._register(this.textFileService.files.onDidRevert(G=>this.onFileSavedOrReverted(G.resource))),this._register(this.editorService.onDidActiveEditorChange(()=>this.onActiveEditorChanged()))}onActiveEditorChanged(){let G=!1,Q;const j=this.editorService.activeEditor;j instanceof r.DiffEditorInput&&j.original.resource?.scheme===e.CONFLICT_RESOLUTION_SCHEME&&(G=!0,Q=j.modified.resource),this.conflictResolutionContext.set(G),this.activeConflictResolutionResource=Q}onFileSavedOrReverted(G){const Q=this.messages.get(G);Q&&(Q.close(),this.messages.delete(G))}onSaveError(G,Q){const j=G,K=Q.resource;let Y;const ee=[],ie=[];if(j.fileOperationResult===3)if(this.activeConflictResolutionResource&&(0,R.isEqual)(this.activeConflictResolutionResource,Q.resource)){if(this.storageService.getBoolean(D,-1))return;Y=y,ee.push(this.instantiationService.createInstance(M)),ie.push(this.instantiationService.createInstance(O))}else Y=(0,t.localize)(1,null,(0,R.basename)(K)),ee.push(this.instantiationService.createInstance(N,Q)),ee.push(this.instantiationService.createInstance(H,Q)),ie.push(this.instantiationService.createInstance(W));else{const se=j.fileOperationResult===5,te=se&&j.options?.unlock,Z=j.fileOperationResult===6,ne=K.scheme===h.Schemas.file;ne&&(Z||te)?ee.push(this.instantiationService.createInstance(P,Q,!!te)):se?ee.push(this.instantiationService.createInstance(x,Q)):ee.push(this.instantiationService.createInstance(B,Q)),ee.push(this.instantiationService.createInstance(z,Q)),ee.push(this.instantiationService.createInstance(V,Q)),se?te&&ne?Y=g.isWindows?(0,t.localize)(2,null,(0,R.basename)(K)):(0,t.localize)(3,null,(0,R.basename)(K)):Y=(0,t.localize)(4,null,(0,R.basename)(K)):ne&&Z?Y=g.isWindows?(0,t.localize)(5,null,(0,R.basename)(K)):(0,t.localize)(6,null,(0,R.basename)(K)):Y=(0,t.localize)(7,null,(0,R.basename)(K),(0,p.toErrorMessage)(G,!1))}const re={primary:ee,secondary:ie},oe=this.notificationService.notify({id:`${(0,w.hash)(Q.resource.toString())}`,severity:l.Severity.Error,message:Y,actions:re});a.Event.once(oe.onDidClose)(()=>{(0,b.dispose)(ee),(0,b.dispose)(ie)}),this.messages.set(Q.resource,oe)}dispose(){super.dispose(),this.messages.clear()}};T=we([F(0,l.INotificationService),F(1,E.ITextFileService),F(2,u.IContextKeyService),F(3,o.IEditorService),F(4,S.ITextModelService),F(5,I.IInstantiationService),F(6,d.IStorageService)],T),e.TextFileSaveErrorHandler=T;const _=[];function L(){for(;_.length>0;)_.pop()?.close()}let M=class extends A.Action{constructor(G){super("workbench.files.action.resolveConflictLearnMore",(0,t.localize)(8,null)),this.openerService=G}async run(){await this.openerService.open(k.URI.parse("https://go.microsoft.com/fwlink/?linkid=868264"))}};M=we([F(0,s.IOpenerService)],M);let O=class extends A.Action{constructor(G){super("workbench.files.action.resolveConflictLearnMoreDoNotShowAgain",(0,t.localize)(9,null)),this.storageService=G}async run(G){this.storageService.store(D,!0,-1,0),G.dispose()}};O=we([F(0,d.IStorageService)],O);let N=class extends A.Action{constructor(G,Q,j,K,Y){super("workbench.files.action.resolveConflict",(0,t.localize)(10,null)),this.model=G,this.editorService=Q,this.notificationService=j,this.instantiationService=K,this.productService=Y}async run(){if(!this.model.isDisposed()){const G=this.model.resource,Q=(0,R.basename)(G),j=(0,t.localize)(11,null,Q,Q,this.productService.nameLong);await i.TextFileContentProvider.open(G,e.CONFLICT_RESOLUTION_SCHEME,j,this.editorService,{pinned:!0});const K={primary:[this.instantiationService.createInstance(M)]},Y=this.notificationService.notify({id:`${(0,w.hash)(G.toString())}`,severity:l.Severity.Info,message:y,actions:K,neverShowAgain:{id:D,isSecondary:!0}});a.Event.once(Y.onDidClose)(()=>(0,b.dispose)(K.primary)),_.push(Y)}}};N=we([F(1,o.IEditorService),F(2,l.INotificationService),F(3,I.IInstantiationService),F(4,n.IProductService)],N);class P extends A.Action{constructor(G,Q){super("workbench.files.action.saveModelElevated",Q?g.isWindows?(0,t.localize)(12,null):(0,t.localize)(13,null):g.isWindows?(0,t.localize)(14,null):(0,t.localize)(15,null)),this.model=G,this.triedToUnlock=Q}async run(){this.model.isDisposed()||await this.model.save({writeElevated:!0,writeUnlock:this.triedToUnlock,reason:1})}}class B extends A.Action{constructor(G){super("workbench.files.action.saveModel",(0,t.localize)(16,null)),this.model=G}async run(){this.model.isDisposed()||await this.model.save({reason:1})}}class V extends A.Action{constructor(G){super("workbench.files.action.discardModel",(0,t.localize)(17,null)),this.model=G}async run(){this.model.isDisposed()||await this.model.revert()}}let z=class extends A.Action{constructor(G,Q){super("workbench.files.action.saveModelAs",c.SAVE_FILE_AS_LABEL),this.model=G,this.editorService=Q}async run(){if(!this.model.isDisposed()){const G=this.findEditor();G&&await this.editorService.save(G,{saveAs:!0,reason:1})}}findEditor(){let G;const Q=this.editorService.findEditors(this.model.resource,{supportSideBySide:m.SideBySideEditor.PRIMARY});for(const j of Q)if(j.editor instanceof f.FileEditorInput){G=j;break}else G||(G=j);return G}};z=we([F(1,o.IEditorService)],z);class x extends A.Action{constructor(G){super("workbench.files.action.unlock",(0,t.localize)(18,null)),this.model=G}async run(){this.model.isDisposed()||await this.model.save({writeUnlock:!0,reason:1})}}class H extends A.Action{constructor(G){super("workbench.files.action.saveIgnoreModifiedSince",(0,t.localize)(19,null)),this.model=G}async run(){this.model.isDisposed()||await this.model.save({ignoreModifiedSince:!0,reason:1})}}let W=class extends A.Action{constructor(G){super("workbench.files.action.configureSaveConflict",(0,t.localize)(20,null)),this.preferencesService=G}async run(){this.preferencesService.openSettings({query:"files.saveConflictResolution"})}};W=we([F(0,v.IPreferencesService)],W);const U=(X,G)=>q(X,G,!0);e.acceptLocalChangesCommand=U;const $=(X,G)=>q(X,G,!1);e.revertLocalChangesCommand=$;async function q(X,G,Q){const j=X.get(o.IEditorService),K=j.activeEditorPane;if(!K)return;const Y=K.input,ee=K.group;if(L(),Q){const ie={ignoreModifiedSince:!0,reason:1};await j.save({editor:Y,groupId:ee.id},ie)}else await j.revert({editor:Y,groupId:ee.id});return await j.openEditor({resource:G},ee),ee.closeEditor(Y)}}),define(ae[231],le([1,0,9,150,43,196,382,16,489,5]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOpenEditorsViewMultiSelection=e.getMultiSelectedResources=e.getResourceForCommand=e.IExplorerService=void 0,e.IExplorerService=(0,b.createDecorator)("explorerService");function S(i){const f=i.lastFocusedList;if(f?.getHTMLElement()===document.activeElement){let c;if(f instanceof A.List){const l=f.getFocusedElements();l.length&&(c=l[0])}else if(f instanceof I.AsyncDataTree){const l=f.getFocus();l.length&&(c=l[0])}return c}}function C(i,f,c){if(t.URI.isUri(i))return i;const l=S(f);return l instanceof k.ExplorerItem?l.resource:l instanceof p.OpenEditor?l.getResource():R.EditorResourceAccessor.getOriginalUri(c.activeEditor,{supportSideBySide:R.SideBySideEditor.PRIMARY})}e.getResourceForCommand=C;function r(i,f,c,l){const s=f.lastFocusedList;if(s?.getHTMLElement()===document.activeElement){if(s instanceof I.AsyncDataTree&&s.getFocus().every(n=>n instanceof k.ExplorerItem)){const n=l.getContext(!0,!0);if(n.length)return n.map(a=>a.resource)}if(s instanceof A.List){const n=(0,E.coalesce)(s.getSelectedElements().filter(h=>h instanceof p.OpenEditor).map(h=>h.getResource())),a=s.getFocusedElements(),o=a.length?a[0]:void 0;let g;if(t.URI.isUri(i))g=i.toString();else if(o instanceof p.OpenEditor){const h=o.getResource();g=h?h.toString():void 0}if(n.some(h=>h.toString()===g))return n}}const d=C(i,f,c);return d?[d]:[]}e.getMultiSelectedResources=r;function u(i,f){const c=i.lastFocusedList;if(c?.getHTMLElement()===document.activeElement&&c instanceof A.List){const l=(0,E.coalesce)(c.getSelectedElements().filter(a=>a instanceof p.OpenEditor)),s=c.getFocusedElements(),d=s.length?s[0]:void 0;let n;if(d instanceof p.OpenEditor&&(n=d),l.some(a=>a===n))return l}}e.getOpenEditorsViewMultiSelection=u}),define(ae[2788],le([1,0,1676,8,9,15,109,71,19,76,231,31,22,16,24,104,7,44,2,14,53,17,795,185]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExternalTerminalContribution=void 0;const h="openInTerminal";C.CommandsRegistry.registerCommand({id:h,handler:async(m,w)=>{const D=m.get(p.IConfigurationService),y=m.get(i.IEditorService),T=m.get(I.IFileService),_=m.get(k.ITerminalService),L=m.get(f.IRemoteAgentService),M=m.get(k.ITerminalGroupService);let O;try{O=m.get(o.IExternalTerminalService)}catch{}const N=(0,S.getMultiSelectedResources)(w,m.get(b.IListService),y,m.get(S.IExplorerService));return T.resolveAll(N.map(P=>({resource:P}))).then(async P=>{const B=(0,u.distinct)(P.filter(x=>x.success)),V=D.getValue();if(L.getConnection()||V.terminal.explorerKind==="integrated"){const x={},H=B.map(({stat:W})=>{const U=W.resource;return W.isDirectory?U:R.URI.from({scheme:U.scheme,authority:U.authority,fragment:U.fragment,query:U.query,path:(0,n.dirname)(U.path)})});for(const W of H){if(x[W.path])return;x[W.path]=!0;const U=await _.createTerminal({config:{cwd:W}});U&&U.target!==g.TerminalLocation.Editor&&(N.length===1||!w||W.path===w.path||W.path===(0,n.dirname)(w.path))&&(_.setActiveInstance(U),M.showPanel(!0))}}else O&&(0,u.distinct)(B.map(({stat:x})=>x.isDirectory?x.resource.fsPath:(0,n.dirname)(x.resource.fsPath))).forEach(x=>{O.openTerminal(V.terminal.external,x)})})}});let v=class extends s.Disposable{constructor(w){super(),this._configurationService=w,this._openInTerminalMenuItem={group:"navigation",order:30,command:{id:h,title:t.localize(0,null)},when:c.ContextKeyExpr.or(E.ResourceContextKey.Scheme.isEqualTo(r.Schemas.file),E.ResourceContextKey.Scheme.isEqualTo(r.Schemas.vscodeRemote))},A.MenuRegistry.appendMenuItem(A.MenuId.OpenEditorsContext,this._openInTerminalMenuItem),A.MenuRegistry.appendMenuItem(A.MenuId.ExplorerContext,this._openInTerminalMenuItem),this._configurationService.onDidChangeConfiguration(D=>{(D.affectsConfiguration("terminal.explorerKind")||D.affectsConfiguration("terminal.external"))&&this._refreshOpenInTerminalMenuItemTitle()}),this._refreshOpenInTerminalMenuItemTitle()}_refreshOpenInTerminalMenuItemTitle(){if(d.isWeb){this._openInTerminalMenuItem.command.title=t.localize(1,null);return}const w=this._configurationService.getValue().terminal;if(w.explorerKind==="integrated"){this._openInTerminalMenuItem.command.title=t.localize(2,null);return}if(d.isWindows&&w.external?.windowsExec){const D=(0,n.basename)(w.external.windowsExec);if(D==="wt"||D==="wt.exe"){this._openInTerminalMenuItem.command.title=t.localize(3,null);return}}this._openInTerminalMenuItem.command.title=t.localize(4,null)}};v=we([F(0,p.IConfigurationService)],v),e.ExternalTerminalContribution=v,a.Registry.as(l.Extensions.Workbench).registerWorkbenchContribution(v,3)}),define(ae[2789],le([1,0,14,81,26,272,374,91,119,82,66,1720,36,78,3042,24,74,47,46]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeLocaleService=void 0;let d=class{constructor(a,o,g,h,v,m,w,D,y,T,_,L){this.jsonEditingService=a,this.environmentService=o,this.notificationService=g,this.languagePackService=h,this.paneCompositePartService=v,this.extensionManagementService=m,this.progressService=w,this.textFileService=D,this.editorService=y,this.dialogService=T,this.hostService=_,this.productService=L}async validateLocaleFile(){try{const a=await this.textFileService.read(this.environmentService.argvResource,{encoding:"utf8"});JSON.parse((0,i.stripComments)(a.value))}catch{return this.notificationService.notify({severity:R.Severity.Error,message:(0,C.localize)(0,null),actions:{primary:[(0,r.toAction)({id:"openArgv",label:(0,C.localize)(1,null),run:()=>this.editorService.openEditor({resource:this.environmentService.argvResource})})]}}),!1}return!0}async writeLocaleValue(a){return await this.validateLocaleFile()?(await this.jsonEditingService.write(this.environmentService.argvResource,[{path:["locale"],value:a}],!0),!0):!1}async setLocale(a){const o=a.id;if(o===t.Language.value()||!o&&t.Language.isDefaultVariant())return;const g=await this.languagePackService.getInstalledLanguages();try{if(!g.some(h=>h.id===a.id)){if(a.galleryExtension?.publisher.toLowerCase()!=="ms-ceintl"){((await this.paneCompositePartService.openPaneComposite(I.VIEWLET_ID,0))?.getViewPaneContainer()).search(`@id:${a.extensionId}`);return}await this.progressService.withProgress({location:15,title:(0,C.localize)(2,null,a.label)},h=>this.extensionManagementService.installFromGallery(a.galleryExtension,{isMachineScoped:!1}))}await this.writeLocaleValue(o)&&await this.showRestartDialog(a.label)}catch(h){this.notificationService.error(h)}}async clearLocalePreference(){try{await this.writeLocaleValue(void 0),t.Language.isDefaultVariant()||await this.showRestartDialog("English")}catch(a){this.notificationService.error(a)}}async showRestartDialog(a){(await this.dialogService.confirm({type:"info",message:(0,C.localize)(3,null,this.productService.nameLong),detail:(0,C.localize)(4,null,this.productService.nameLong,a),primaryButton:(0,C.localize)(5,null)})).confirmed&&this.hostService.restart()}};d=we([F(0,A.IJSONEditingService),F(1,p.IEnvironmentService),F(2,R.INotificationService),F(3,k.ILanguagePackService),F(4,E.IPaneCompositePartService),F(5,b.IExtensionManagementService),F(6,S.IProgressService),F(7,u.ITextFileService),F(8,f.IEditorService),F(9,l.IDialogService),F(10,c.IHostService),F(11,s.IProductService)],d),e.NativeLocaleService=d}),define(ae[2790],le([1,0,1721,17,44,2,131,14,82,26,68,272,81,74,23,119,2320,27,32,91,15,2319,35,526,2789]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalizationWorkbenchContribution=void 0,(0,o.registerSingleton)(g.ILocaleService,h.NativeLocaleService,1),(0,n.registerAction2)(a.ConfigureDisplayLanguageAction),(0,n.registerAction2)(a.ClearDisplayLanguageAction);const v="extensionsAssistant/languagePackSuggestionIgnore";let m=class extends A.Disposable{constructor(y,T,_,L,M,O,N,P,B){super(),this.notificationService=y,this.jsonEditingService=T,this.environmentService=_,this.hostService=L,this.storageService=M,this.extensionManagementService=O,this.galleryService=N,this.paneCompositeService=P,this.telemetryService=B,this.checkAndInstall(),this._register(this.extensionManagementService.onDidInstallExtensions(V=>this.onDidInstallExtensions(V)))}onDidInstallExtensions(y){for(const T of y)if(T.local&&T.operation===2&&T.local.manifest.contributes&&T.local.manifest.contributes.localizations&&T.local.manifest.contributes.localizations.length){const _=T.local.manifest.contributes.localizations[0].languageId;if(E.language!==_){const L=E.locale!==_;this.notificationService.prompt(S.default.Info,L?(0,t.localize)(0,null,T.local.manifest.contributes.localizations[0].languageName||T.local.manifest.contributes.localizations[0].languageId):(0,t.localize)(1,null,T.local.manifest.contributes.localizations[0].languageName||T.local.manifest.contributes.localizations[0].languageId),[{label:L?(0,t.localize)(2,null):(0,t.localize)(3,null),run:()=>{(L?this.jsonEditingService.write(this.environmentService.argvResource,[{path:["locale"],value:_}],!0):Promise.resolve(void 0)).then(()=>this.hostService.restart(),O=>this.notificationService.error(O))}},{label:L?(0,t.localize)(4,null):(0,t.localize)(5,null),run:()=>{}}],{sticky:!0,neverShowAgain:{id:"langugage.update.donotask",isSecondary:!0,scope:b.NeverShowAgainScope.APPLICATION}})}}}checkAndInstall(){const y=E.language,T=E.locale,_=JSON.parse(this.storageService.get(v,-1,"[]"));!this.galleryService.isEnabled()||!y||!T||T==="en"||T.indexOf("en-")===0||y===T||_.indexOf(T)>-1||this.isLanguageInstalled(T).then(L=>{L||this.galleryService.query({text:`tag:lp-${T}`},s.CancellationToken.None).then(M=>{if(M.total===0)return;const O=M.total===1?M.firstPage[0]:M.firstPage.filter(P=>P.publisher==="MS-CEINTL"&&P.name.indexOf("vscode-language-pack")===0)[0],N=O||M.firstPage[0];!N.assets.manifest||Promise.all([this.galleryService.getManifest(N,s.CancellationToken.None),this.galleryService.getCoreTranslation(N,T)]).then(([P,B])=>{const V=P&&P.contributes&&P.contributes.localizations&&P.contributes.localizations.filter(j=>j.languageId.toLowerCase()===T)[0],z=V&&V.languageName||T,x=V&&(V.localizedLanguageName||V.languageName)||T,H=B?.contents?.["vs/workbench/contrib/localization/electron-sandbox/minimalTranslations"]??{},W=O?"installAndRestartMessage":"showLanguagePackExtensions",U=!H[W],$={};Object.keys(c.minimumTranslatedStrings).forEach(j=>{!H[j]||U?$[j]=c.minimumTranslatedStrings[j].replace("{0}",z):$[j]=`${H[j].replace("{0}",x)} (${c.minimumTranslatedStrings[j].replace("{0}",z)})`});const q=j=>{this.telemetryService.publicLog("languagePackSuggestion:popup",{userReaction:j,language:T})},X={label:$.searchMarketplace,run:()=>{q("search"),this.paneCompositeService.openPaneComposite(f.VIEWLET_ID,0,!0).then(j=>j?.getViewPaneContainer()).then(j=>{j.search(`tag:lp-${T}`),j.focus()})}},G={label:$.installAndRestart,run:()=>{q("installAndRestart"),this.installExtension(O).then(()=>this.hostService.restart())}},Q=$[W];this.notificationService.prompt(S.default.Info,Q,[O?G:X,{label:(0,t.localize)(6,null),isSecondary:!0,run:()=>{_.push(T),this.storageService.store(v,JSON.stringify(_),-1,0),q("neverShowAgain")}}],{onCancel:()=>{q("cancelled")}})})})})}async isLanguageInstalled(y){return(await this.extensionManagementService.getInstalled()).some(_=>!!(_.manifest&&_.manifest.contributes&&_.manifest.contributes.localizations&&_.manifest.contributes.localizations.length&&_.manifest.contributes.localizations.some(L=>L.languageId.toLowerCase()===y)))}installExtension(y){return this.paneCompositeService.openPaneComposite(f.VIEWLET_ID,0).then(T=>T?.getViewPaneContainer()).then(T=>T.search(`@id:${y.identifier.id}`)).then(()=>this.extensionManagementService.installFromGallery(y)).then(()=>{},T=>this.notificationService.error(T))}};m=we([F(0,b.INotificationService),F(1,C.IJSONEditingService),F(2,r.IEnvironmentService),F(3,u.IHostService),F(4,i.IStorageService),F(5,I.IExtensionManagementService),F(6,I.IExtensionGalleryService),F(7,d.IPaneCompositePartService),F(8,l.ITelemetryService)],m),e.LocalizationWorkbenchContribution=m,p.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(m,4),k.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(ae[2791],le([1,0,171,21,6,2,159,18,68,787,54,62,1737,47,5,43,255,2322,2324,2326,24,78]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceMergeEditorModeFactory=e.TempFileMergeEditorModeFactory=void 0;let o=class{constructor(D,y,T,_){this._mergeEditorTelemetry=D,this._instantiationService=y,this._textModelService=T,this._modelService=_}async createInputModel(D){const y=new A.DisposableStore,[T,_,L,M]=await Promise.all([this._textModelService.createModelReference(D.base),this._textModelService.createModelReference(D.result),m(D.input1,this._textModelService,y),m(D.input2,this._textModelService,y)]);y.add(T),y.add(_);const O=_.object.textEditorModel.uri.with({scheme:"merge-result"}),N=this._modelService.createModel("",{languageId:_.object.textEditorModel.getLanguageId(),onDidChange:R.Event.None},O);y.add(N);const P=this._instantiationService.createInstance(b.WorkerBasedDocumentDiffProvider),B=this._instantiationService.createInstance(d.MergeEditorModel,T.object.textEditorModel,L,M,N,this._instantiationService.createInstance(s.MergeDiffComputer,P),this._instantiationService.createInstance(s.MergeDiffComputer,P),{resetResult:!0},this._mergeEditorTelemetry);return y.add(B),await B.onInitialized,this._instantiationService.createInstance(g,B,y,_.object,D.result)}};o=we([F(1,i.IInstantiationService),F(2,C.ITextModelService),F(3,S.IModelService)],o),e.TempFileMergeEditorModeFactory=o;let g=class extends c.EditorModel{constructor(D,y,T,_,L,M,O){super(),this.model=D,this.disposable=y,this.result=T,this.resultUri=_,this.textFileService=L,this.dialogService=M,this.editorService=O,this.savedAltVersionId=(0,k.observableValue)("initialAltVersionId",this.model.resultTextModel.getAlternativeVersionId()),this.altVersionId=(0,k.observableFromEvent)(N=>this.model.resultTextModel.onDidChangeContent(N),()=>this.model.resultTextModel.getAlternativeVersionId()),this.isDirty=(0,k.derived)("isDirty",N=>this.altVersionId.read(N)!==this.savedAltVersionId.read(N)),this.finished=!1}dispose(){this.disposable.dispose(),super.dispose()}async accept(){const D=await this.model.resultTextModel.getValue();this.result.textEditorModel.setValue(D),this.savedAltVersionId.set(this.model.resultTextModel.getAlternativeVersionId(),void 0),await this.textFileService.save(this.result.textEditorModel.uri),this.finished=!0}async _discard(){await this.textFileService.revert(this.model.resultTextModel.uri),this.savedAltVersionId.set(this.model.resultTextModel.getAlternativeVersionId(),void 0),this.finished=!0}shouldConfirmClose(){return!0}async confirmClose(D){(0,t.assertFn)(()=>D.some(_=>_===this));const y=D.some(_=>_.isDirty.get());let T;if(y){const _=D.length>1,L=_?(0,r.localize)(0,null,D.length):(0,r.localize)(1,null,(0,E.basename)(D[0].model.resultTextModel.uri)),M=D.some(P=>P.model.hasUnhandledConflicts.get()),O={cancelId:2,detail:M?_?(0,r.localize)(2,null):(0,r.localize)(3,null):_?(0,r.localize)(4,null):(0,r.localize)(5,null)},N=[M?(0,r.localize)(6,null):(0,r.localize)(7,null),(0,r.localize)(8,null),(0,r.localize)(9,null)];T=(await this.dialogService.show(I.default.Info,L,N,O)).choice}else T=1;return T===2?2:T===0?(await Promise.all(D.map(_=>_.accept())),0):(await Promise.all(D.map(_=>_._discard())),1)}async save(D){this.finished||(async()=>{if((await this.dialogService.show(I.default.Info,(0,r.localize)(10,null),[(0,r.localize)(11,null),(0,r.localize)(12,null)],{cancelId:1})).choice===0){await this.accept();const T=this.editorService.findEditors(this.resultUri).filter(_=>_.editor.typeId==="mergeEditor.Input");await this.editorService.closeEditors(T)}})()}async revert(D){}};g=we([F(4,a.ITextFileService),F(5,u.IDialogService),F(6,n.IEditorService)],g);let h=class Pl{constructor(D,y,T,_){this._mergeEditorTelemetry=D,this._instantiationService=y,this._textModelService=T,this.textFileService=_}async createInputModel(D){const y=new A.DisposableStore;let T;const _=y.add(new A.DisposableStore),L=W=>{(0,E.isEqual)(D.result,W.resource)&&(_.clear(),T=W)};_.add(this.textFileService.files.onDidCreate(L)),this.textFileService.files.models.forEach(L);const[M,O,N,P]=await Promise.all([this._textModelService.createModelReference(D.base),this._textModelService.createModelReference(D.result),m(D.input1,this._textModelService,y),m(D.input2,this._textModelService,y)]);if(y.add(M),y.add(O),!T)throw new p.BugIndicatingError;await T.save({source:Pl.FILE_SAVED_SOURCE});const z=T.textEditorModel.getLinesContent().some(W=>W.startsWith(l.conflictMarkers.start)),x=this._instantiationService.createInstance(b.WorkerBasedDocumentDiffProvider),H=this._instantiationService.createInstance(d.MergeEditorModel,M.object.textEditorModel,N,P,O.object.textEditorModel,this._instantiationService.createInstance(s.MergeDiffComputer,x),this._instantiationService.createInstance(s.MergeDiffComputer,x),{resetResult:z},this._mergeEditorTelemetry);return y.add(H),await H.onInitialized,this._instantiationService.createInstance(v,H,y,T,this._mergeEditorTelemetry)}};h.FILE_SAVED_SOURCE=f.SaveSourceRegistry.registerSource("merge-editor.source",(0,r.localize)(13,null)),h=we([F(1,i.IInstantiationService),F(2,C.ITextModelService),F(3,a.ITextFileService)],h),e.WorkspaceMergeEditorModeFactory=h;let v=class extends c.EditorModel{constructor(D,y,T,_,L){super(),this.model=D,this.disposableStore=y,this.resultTextFileModel=T,this.telemetry=_,this._dialogService=L,this.isDirty=(0,k.observableFromEvent)(R.Event.any(this.resultTextFileModel.onDidChangeDirty,this.resultTextFileModel.onDidSaveError),()=>this.resultTextFileModel.isDirty()),this.reported=!1,this.dateTimeOpened=new Date}dispose(){this.disposableStore.dispose(),super.dispose(),this.reportClose(!1)}reportClose(D){if(!this.reported){const y=this.model.unhandledConflictsCount.get(),T=new Date().getTime()-this.dateTimeOpened.getTime();this.telemetry.reportMergeEditorClosed({durationOpenedSecs:T/1e3,remainingConflictCount:y,accepted:D,conflictCount:this.model.conflictCount,combinableConflictCount:this.model.combinableConflictCount,conflictsResolvedWithBase:this.model.conflictsResolvedWithBase,conflictsResolvedWithInput1:this.model.conflictsResolvedWithInput1,conflictsResolvedWithInput2:this.model.conflictsResolvedWithInput2,conflictsResolvedWithSmartCombination:this.model.conflictsResolvedWithSmartCombination,manuallySolvedConflictCountThatEqualNone:this.model.manuallySolvedConflictCountThatEqualNone,manuallySolvedConflictCountThatEqualSmartCombine:this.model.manuallySolvedConflictCountThatEqualSmartCombine,manuallySolvedConflictCountThatEqualInput1:this.model.manuallySolvedConflictCountThatEqualInput1,manuallySolvedConflictCountThatEqualInput2:this.model.manuallySolvedConflictCountThatEqualInput2,manuallySolvedConflictCountThatEqualNoneAndStartedWithBase:this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithBase,manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1:this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput1,manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2:this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithInput2,manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart:this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothNonSmart,manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart:this.model.manuallySolvedConflictCountThatEqualNoneAndStartedWithBothSmart}),this.reported=!0}}async accept(){this.reportClose(!0),await this.resultTextFileModel.save()}get resultUri(){return this.resultTextFileModel.resource}async save(D){await this.resultTextFileModel.save(D)}async revert(D){await this.resultTextFileModel.revert(D)}shouldConfirmClose(){return!0}async confirmClose(D){const y=D.length>1,T=D.some(L=>L.isDirty.get()),_=D.some(L=>L.model.hasUnhandledConflicts.get());if(T){const L=y?(0,r.localize)(14,null,D.length):(0,r.localize)(15,null,(0,E.basename)(D[0].resultUri)),M={detail:_?y?(0,r.localize)(16,null):(0,r.localize)(17,null):y?(0,r.localize)(18,null):(0,r.localize)(19,null)},O=[[_?(0,r.localize)(20,null):(0,r.localize)(21,null),0],[(0,r.localize)(22,null),1],[(0,r.localize)(23,null),2]],{choice:N}=await this._dialogService.show(I.default.Info,L,O.map(P=>P[0]),{...M,cancelId:O.length-1});return O[N][1]}else if(_){const L=y?(0,r.localize)(24,null,D.length):(0,r.localize)(25,null,(0,E.basename)(D[0].resultUri)),M={detail:_?y?(0,r.localize)(26,null):(0,r.localize)(27,null):void 0},O=[[_?(0,r.localize)(28,null):(0,r.localize)(29,null),0],[(0,r.localize)(30,null),2]],{choice:N}=await this._dialogService.show(I.default.Info,L,O.map(P=>P[0]),{...M,cancelId:O.length-1});return O[N][1]}else return 0}};v=we([F(4,u.IDialogService)],v);async function m(w,D,y){const T=await D.createModelReference(w.uri);return y.add(T),{textModel:T.object.textEditorModel,title:w.title,description:w.description,detail:w.detail}}}),define(ae[469],le([1,0,171,159,18,13,1736,8,19,5,49,43,261,2791,2323,24,78]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorInput=e.MergeEditorInputData=void 0;class l{constructor(n,a,o,g){this.uri=n,this.title=a,this.detail=o,this.description=g}}e.MergeEditorInputData=l;let s=class Dr extends r.AbstractTextResourceEditorInput{get useWorkingCopy(){return this.configurationService.getValue("mergeEditor.useWorkingCopy")??!1}constructor(n,a,o,g,h,v,m,w,D,y){super(g,void 0,v,m,w,D),this.base=n,this.input1=a,this.input2=o,this.result=g,this._instaService=h,this.configurationService=y,this.closeHandler={showConfirm:()=>this._inputModel?.shouldConfirmClose()??!1,confirm:async T=>{(0,t.assertFn)(()=>T.every(L=>L.editor instanceof Dr));const _=T.map(L=>L.editor._inputModel).filter(A.isDefined);return await this._inputModel.confirmClose(_)}},this.mergeEditorModeFactory=this._instaService.createInstance(this.useWorkingCopy?u.TempFileMergeEditorModeFactory:u.WorkspaceMergeEditorModeFactory,this._instaService.createInstance(i.MergeEditorTelemetry))}dispose(){super.dispose()}get typeId(){return Dr.ID}get editorId(){return C.DEFAULT_EDITOR_ASSOCIATION.id}get capabilities(){let n=super.capabilities|256;return this.useWorkingCopy&&(n|=4),n}getName(){return(0,k.localize)(0,null,super.getName())}async resolve(){if(!this._inputModel){const n=this._register(await this.mergeEditorModeFactory.createInputModel({base:this.base,input1:this.input1,input2:this.input2,result:this.result}));this._inputModel=n,this._register((0,p.autorun)("fire dirty event",a=>{n.isDirty.read(a),this._onDidChangeDirty.fire()})),await this._inputModel.model.onInitialized}return this._inputModel}async accept(){await this._inputModel?.accept()}async save(n,a){await this._inputModel?.save(a)}toUntyped(){return{input1:{resource:this.input1.uri,label:this.input1.title,description:this.input1.description,detail:this.input1.detail},input2:{resource:this.input2.uri,label:this.input2.title,description:this.input2.description,detail:this.input2.detail},base:{resource:this.base},result:{resource:this.result},options:{override:this.typeId}}}matches(n){return this===n?!0:n instanceof Dr?(0,R.isEqual)(this.base,n.base)&&(0,R.isEqual)(this.input1.uri,n.input1.uri)&&(0,R.isEqual)(this.input2.uri,n.input2.uri)&&(0,R.isEqual)(this.result,n.result):(0,C.isResourceMergeEditorInput)(n)?(this.editorId===n.options?.override||n.options?.override===void 0)&&(0,R.isEqual)(this.base,n.base.resource)&&(0,R.isEqual)(this.input1.uri,n.input1.resource)&&(0,R.isEqual)(this.input2.uri,n.input2.resource)&&(0,R.isEqual)(this.result,n.result.resource):!1}async revert(n,a){return this._inputModel?.revert(a)}isDirty(){return this._inputModel?.isDirty.get()??!1}setLanguageId(n,a){this._inputModel?.model.setLanguageId(n,a)}};s.ID="mergeEditor.Input",s=we([F(4,b.IInstantiationService),F(5,f.IEditorService),F(6,c.ITextFileService),F(7,S.ILabelService),F(8,I.IFileService),F(9,E.IConfigurationService)],s),e.MergeEditorInput=s}),define(ae[2792],le([1,0,21,165,469]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorSerializer=void 0;class A{canSerialize(){return!0}serialize(E){return JSON.stringify(this.toJSON(E))}toJSON(E){return{base:E.base,input1:E.input1,input2:E.input2,result:E.result}}deserialize(E,I){try{const b=(0,p.parse)(I);return E.createInstance(R.MergeEditorInput,b.base,new R.MergeEditorInputData(b.input1.uri,b.input1.title,b.input1.detail,b.input1.description),new R.MergeEditorInputData(b.input2.uri,b.input2.title,b.input2.detail,b.input2.description),b.result)}catch(b){(0,t.onUnexpectedError)(b);return}}}e.MergeEditorSerializer=A}),define(ae[688],le([1,0,1833,11,2,6,173,5,62,24,212,8,216,94,12,33,40,174,7,59,50,194,98,226,36,38,18,15,84,116,16,75,10,78,63,29,21,71,66,65,167,88,1171]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H){"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 W extends h.ActionRunner{runAction(Se,Ie){return Se instanceof w.MenuItemAction?Se.run(...Ie):super.runAction(Se,Ie)}}e.isDirtyDiffVisible=new s.RawContextKey("dirtyDiffVisible",!1);function U(me){const Se=me.modifiedEndLineNumber-me.modifiedStartLineNumber+1,Ie=me.originalEndLineNumber-me.originalStartLineNumber+1;return me.originalEndLineNumber===0?Se:me.modifiedEndLineNumber===0?Ie:Se+Ie}function $(me){return me.modifiedEndLineNumber===0?me.modifiedStartLineNumber===0?1:me.modifiedStartLineNumber:me.modifiedEndLineNumber}function q(me,Se){return me===1&&Se.modifiedStartLineNumber===0&&Se.modifiedEndLineNumber===0?!0:me>=Se.modifiedStartLineNumber&&me<=(Se.modifiedEndLineNumber||Se.modifiedStartLineNumber)}let X=class extends h.Action{constructor(Se,Ie,ve,be,ge){const ue=be.lookupKeybinding(Ie.id),Ce=Ie.label+(ue?` (${ue.getLabel()})`:"");super(Ie.id,Ce,ve),this.instantiationService=ge,this.action=Ie,this.editor=Se}run(){return Promise.resolve(this.instantiationService.invokeFunction(Se=>this.action.run(Se,this.editor,null)))}};X=we([F(3,v.IKeybindingService),F(4,E.IInstantiationService)],X);var G;(function(me){me[me.Modify=0]="Modify",me[me.Add=1]="Add",me[me.Delete=2]="Delete"})(G||(G={}));function Q(me){return me.originalEndLineNumber===0?G.Add:me.modifiedEndLineNumber===0?G.Delete:G.Modify}function j(me,Se){switch(Se){case G.Modify:return me.getColor(e.editorGutterModifiedBackground);case G.Add:return me.getColor(e.editorGutterAddedBackground);case G.Delete:return me.getColor(e.editorGutterDeletedBackground)}}function K(me){const Se=me.get(_.ICodeEditorService).listDiffEditors();for(const Ie of Se)if(Ie.hasTextFocus()&&Ie instanceof g.EmbeddedDiffEditorWidget)return Ie.getParentEditor();return(0,l.getOuterEditor)(me)}let Y=class extends l.PeekViewWidget{constructor(Se,Ie,ve,be,ge,ue){super(Se,{isResizeable:!0,frameWidth:1,keepEditorSelection:!0},be),this.model=Ie,this.themeService=ve,this.index=0,this.height=void 0,this._disposables.add(ve.onDidColorThemeChange(this._applyTheme,this)),this._applyTheme(ve.getColorTheme()),this.model.original&&(ue=ue.createOverlay([["originalResourceScheme",this.model.original.uri.scheme]])),this.menu=ge.createMenu(w.MenuId.SCMChangeContext,ue),this._disposables.add(this.menu),this.create(),Se.hasModel()?this.title=(0,m.basename)(Se.getModel().uri):this.title="",this.setTitle(this.title),this._disposables.add(Ie.onDidChange(this.renderTitle,this))}showChange(Se){const Ie=this.model.changes[Se];if(this.index=Se,this.change=Ie,!this.model.original)return;A.Event.once(this.diffEditor.onDidUpdateDiff)(()=>setTimeout(()=>this.revealChange(Ie),0)),this.diffEditor.setModel(this.model);const ge=new n.Position($(Ie),1),ue=this.editor.getOption(60),Ce=this.editor.getLayoutInfo().height,De=Math.floor(Ce/ue),Ae=Math.min(U(Ie)+8,Math.floor(De/3));this.renderTitle();const Pe=Q(Ie),fe=j(this.themeService.getColorTheme(),Pe);this.style({frameColor:fe,arrowColor:fe}),this._actionbarWidget.context=[this.model.modified.uri,this.model.changes,Se],this.show(ge,Ae),this.editor.focus()}renderTitle(){const Se=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,Se)}_fillHead(Se){super._fillHead(Se,!0);const Ie=this.instantiationService.createInstance(X,this.editor,new ee,i.ThemeIcon.asClassName(O.gotoPreviousLocation)),ve=this.instantiationService.createInstance(X,this.editor,new ie,i.ThemeIcon.asClassName(O.gotoNextLocation));this._disposables.add(Ie),this._disposables.add(ve);const be=[];(0,D.createAndFillInActionBarActions)(this.menu,{shouldForwardArgs:!0},be),this._actionbarWidget.push(be.reverse(),{label:!1,icon:!0}),this._actionbarWidget.push([ve,Ie],{label:!1,icon:!0}),this._actionbarWidget.push(new h.Action("peekview.close",t.localize(2,null),N.Codicon.close.classNames,!0,()=>this.dispose()),{label:!1,icon:!0})}_getActionBarOptions(){const Se=new W;return Se.onDidRun(Ie=>{!(Ie.action instanceof X)&&!Ie.error&&this.dispose()}),{...super._getActionBarOptions(),actionRunner:Se}}_fillBody(Se){const Ie={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,diffAlgorithm:"smart"};this.diffEditor=this.instantiationService.createInstance(g.EmbeddedDiffEditorWidget,Se,Ie,this.editor),this._disposables.add(this.diffEditor)}_onWidth(Se){typeof this.height>"u"||this.diffEditor.layout({height:this.height,width:Se})}_doLayoutBody(Se,Ie){super._doLayoutBody(Se,Ie),this.diffEditor.layout({height:Se,width:Ie}),typeof this.height>"u"&&this.change&&this.revealChange(this.change),this.height=Se}revealChange(Se){let Ie,ve;Se.modifiedEndLineNumber===0?(Ie=Se.modifiedStartLineNumber,ve=Se.modifiedStartLineNumber+1):Se.originalEndLineNumber>0?(Ie=Se.modifiedStartLineNumber-1,ve=Se.modifiedEndLineNumber+1):(Ie=Se.modifiedStartLineNumber,ve=Se.modifiedEndLineNumber),this.diffEditor.revealLinesInCenter(Ie,ve,1)}_applyTheme(Se){const Ie=Se.getColor(l.peekViewBorder)||z.Color.transparent;this.style({arrowColor:Ie,frameColor:Ie,headerBackgroundColor:Se.getColor(l.peekViewTitleBackground)||z.Color.transparent,primaryHeadingColor:Se.getColor(l.peekViewTitleForeground),secondaryHeadingColor:Se.getColor(l.peekViewTitleInfoForeground)})}revealLine(Se){this.editor.revealLineInCenterIfOutsideViewport(Se,0)}hasFocus(){return this.diffEditor.hasTextFocus()}};Y=we([F(2,i.IThemeService),F(3,E.IInstantiationService),F(4,w.IMenuService),F(5,s.IContextKeyService)],Y);class ee extends c.EditorAction{constructor(){super({id:"editor.action.dirtydiff.previous",label:t.localize(3,null),alias:"Show Previous Change",precondition:B.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1597,weight:100}})}run(Se,Ie){const ve=K(Se);if(!ve)return;const be=se.get(ve);!be||!be.canNavigate()||be.previous()}}e.ShowPreviousChangeAction=ee,(0,c.registerEditorAction)(ee);class ie extends c.EditorAction{constructor(){super({id:"editor.action.dirtydiff.next",label:t.localize(4,null),alias:"Show Next Change",precondition:B.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:573,weight:100}})}run(Se,Ie){const ve=K(Se);if(!ve)return;const be=se.get(ve);!be||!be.canNavigate()||be.next()}}e.ShowNextChangeAction=ie,(0,c.registerEditorAction)(ie),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarGoMenu,{group:"7_change_nav",command:{id:"editor.action.dirtydiff.next",title:t.localize(5,null)},order:1}),w.MenuRegistry.appendMenuItem(w.MenuId.MenubarGoMenu,{group:"7_change_nav",command:{id:"editor.action.dirtydiff.previous",title:t.localize(6,null)},order:2});class re extends c.EditorAction{constructor(){super({id:"workbench.action.editor.previousChange",label:t.localize(7,null),alias:"Go to Previous Change",precondition:B.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:1599,weight:100}})}run(Se,Ie){const ve=K(Se);if(!ve||!ve.hasModel())return;const be=se.get(ve);if(!be||!be.modelRegistry)return;const ge=ve.getPosition().lineNumber,ue=be.modelRegistry.getModel(ve.getModel());if(!ue||ue.changes.length===0)return;const Ce=ue.findPreviousClosestChange(ge,!1),De=ue.changes[Ce],Ae=new n.Position(De.modifiedStartLineNumber,1);ve.setPosition(Ae),ve.revealPositionInCenter(Ae)}}e.GotoPreviousChangeAction=re,(0,c.registerEditorAction)(re);class oe extends c.EditorAction{constructor(){super({id:"workbench.action.editor.nextChange",label:t.localize(8,null),alias:"Go to Next Change",precondition:B.TextCompareEditorActiveContext.toNegated(),kbOpts:{kbExpr:d.EditorContextKeys.editorTextFocus,primary:575,weight:100}})}run(Se,Ie){const ve=K(Se);if(!ve||!ve.hasModel())return;const be=se.get(ve);if(!be||!be.modelRegistry)return;const ge=ve.getPosition().lineNumber,ue=be.modelRegistry.getModel(ve.getModel());if(!ue||ue.changes.length===0)return;const Ce=ue.findNextClosestChange(ge,!1),De=ue.changes[Ce],Ae=new n.Position(De.modifiedStartLineNumber,1);ve.setPosition(Ae),ve.revealPositionInCenter(Ae)}}e.GotoNextChangeAction=oe,(0,c.registerEditorAction)(oe),o.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"closeDirtyDiff",weight:100+50,primary:9,secondary:[1033],when:s.ContextKeyExpr.and(e.isDirtyDiffVisible),handler:me=>{const Se=K(me);if(!Se)return;const Ie=se.get(Se);!Ie||Ie.close()}});let se=class Ol extends R.Disposable{static get(Se){return Se.getContribution(Ol.ID)}constructor(Se,Ie,ve,be){if(super(),this.editor=Se,this.configurationService=ve,this.instantiationService=be,this.modelRegistry=null,this.model=null,this.widget=null,this.currentIndex=-1,this.session=R.Disposable.None,this.mouseDownInfo=null,this.enabled=!1,this.gutterActionDisposables=new R.DisposableStore,this.enabled=!Ie.getContextKeyValue("isInDiffEditor"),this.stylesheet=(0,L.createStyleSheet)(),this._register((0,R.toDisposable)(()=>this.stylesheet.remove())),this.enabled){this.isDirtyDiffVisible=e.isDirtyDiffVisible.bindTo(Ie),this._register(Se.onDidChangeModel(()=>this.close()));const ge=A.Event.filter(ve.onDidChangeConfiguration,ue=>ue.affectsConfiguration("scm.diffDecorationsGutterAction"));this._register(ge(this.onDidChangeGutterAction,this)),this.onDidChangeGutterAction()}}onDidChangeGutterAction(){const Se=this.configurationService.getValue("scm.diffDecorationsGutterAction");this.gutterActionDisposables.dispose(),this.gutterActionDisposables=new R.DisposableStore,Se==="diff"?(this.gutterActionDisposables.add(this.editor.onMouseDown(Ie=>this.onEditorMouseDown(Ie))),this.gutterActionDisposables.add(this.editor.onMouseUp(Ie=>this.onEditorMouseUp(Ie))),this.stylesheet.textContent=` .monaco-editor .dirty-diff-glyph { cursor: pointer; } .monaco-editor .margin-view-overlays .dirty-diff-glyph:hover::before { height: 100%; width: 6px; 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(Se){!this.assertWidget()||!this.widget||!this.model||(this.editor.hasModel()&&(typeof Se=="number"||this.currentIndex===-1)?this.currentIndex=this.model.findNextClosestChange(typeof Se=="number"?Se:this.editor.getPosition().lineNumber):this.currentIndex=(0,a.rot)(this.currentIndex+1,this.model.changes.length),this.widget.showChange(this.currentIndex))}previous(Se){!this.assertWidget()||!this.widget||!this.model||(this.editor.hasModel()&&(typeof Se=="number"||this.currentIndex===-1)?this.currentIndex=this.model.findPreviousClosestChange(typeof Se=="number"?Se: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=R.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 Se=this.editor.getModel();if(!Se)return!1;const Ie=this.modelRegistry.getModel(Se);if(!Ie||Ie.changes.length===0)return!1;this.currentIndex=-1,this.model=Ie,this.widget=this.instantiationService.createInstance(Y,this.editor,Ie),this.isDirtyDiffVisible.set(!0);const ve=new R.DisposableStore;return ve.add(A.Event.once(this.widget.onDidClose)(this.close,this)),A.Event.chain(Ie.onDidChange).filter(be=>be.diff.length>0).map(be=>be.diff).event(this.onDidModelChange,this,ve),ve.add(this.widget),ve.add((0,R.toDisposable)(()=>{this.model=null,this.widget=null,this.currentIndex=-1,this.isDirtyDiffVisible.set(!1),this.editor.focus()})),this.session=ve,!0}onDidModelChange(Se){if(!(!this.model||!this.widget||this.widget.hasFocus()))for(const Ie of Se)Ie.start<=this.currentIndex&&(this.currentIndex<Ie.start+Ie.deleteCount?(this.currentIndex=-1,this.next()):(this.currentIndex=(0,a.rot)(this.currentIndex+Ie.toInsert.length-Ie.deleteCount-1,this.model.changes.length),this.next()))}onEditorMouseDown(Se){this.mouseDownInfo=null;const Ie=Se.target.range;if(!Ie||!Se.event.leftButton||Se.target.type!==4||!Se.target.element||Se.target.element.className.indexOf("dirty-diff-glyph")<0)return;const ve=Se.target.detail,be=Se.target.element.offsetLeft,ge=ve.offsetX-be;ge<-3||ge>6||(this.mouseDownInfo={lineNumber:Ie.startLineNumber})}onEditorMouseUp(Se){if(!this.mouseDownInfo)return;const{lineNumber:Ie}=this.mouseDownInfo;this.mouseDownInfo=null;const ve=Se.target.range;if(!ve||ve.startLineNumber!==Ie||Se.target.type!==4||!this.modelRegistry)return;const be=this.editor.getModel();if(!be)return;const ge=this.modelRegistry.getModel(be);if(!ge)return;const ue=ge.changes.findIndex(Ce=>q(Ie,Ce));ue<0||(ue===this.currentIndex?this.close():this.next(Ie))}getChanges(){if(!this.modelRegistry)return[];if(!this.editor.hasModel())return[];const Se=this.modelRegistry.getModel(this.editor.getModel());return Se?Se.changes:[]}dispose(){this.gutterActionDisposables.dispose(),super.dispose()}};se.ID="editor.contrib.dirtydiff",se=we([F(1,s.IContextKeyService),F(2,C.IConfigurationService),F(3,E.IInstantiationService)],se),e.DirtyDiffController=se,e.editorGutterModifiedBackground=(0,f.registerColor)("editorGutter.modifiedBackground",{dark:"#1B81A8",light:"#2090D3",hcDark:"#1B81A8",hcLight:"#2090D3"},t.localize(9,null)),e.editorGutterAddedBackground=(0,f.registerColor)("editorGutter.addedBackground",{dark:"#487E02",light:"#48985D",hcDark:"#487E02",hcLight:"#48985D"},t.localize(10,null)),e.editorGutterDeletedBackground=(0,f.registerColor)("editorGutter.deletedBackground",{dark:f.editorErrorForeground,light:f.editorErrorForeground,hcDark:f.editorErrorForeground,hcLight:f.editorErrorForeground},t.localize(11,null)),e.minimapGutterModifiedBackground=(0,f.registerColor)("minimapGutter.modifiedBackground",{dark:e.editorGutterModifiedBackground,light:e.editorGutterModifiedBackground,hcDark:e.editorGutterModifiedBackground,hcLight:e.editorGutterModifiedBackground},t.localize(12,null)),e.minimapGutterAddedBackground=(0,f.registerColor)("minimapGutter.addedBackground",{dark:e.editorGutterAddedBackground,light:e.editorGutterAddedBackground,hcDark:e.editorGutterAddedBackground,hcLight:e.editorGutterAddedBackground},t.localize(13,null)),e.minimapGutterDeletedBackground=(0,f.registerColor)("minimapGutter.deletedBackground",{dark:e.editorGutterDeletedBackground,light:e.editorGutterDeletedBackground,hcDark:e.editorGutterDeletedBackground,hcLight:e.editorGutterDeletedBackground},t.localize(14,null)),e.overviewRulerModifiedForeground=(0,f.registerColor)("editorOverviewRuler.modifiedForeground",{dark:(0,f.transparent)(e.editorGutterModifiedBackground,.6),light:(0,f.transparent)(e.editorGutterModifiedBackground,.6),hcDark:(0,f.transparent)(e.editorGutterModifiedBackground,.6),hcLight:(0,f.transparent)(e.editorGutterModifiedBackground,.6)},t.localize(15,null)),e.overviewRulerAddedForeground=(0,f.registerColor)("editorOverviewRuler.addedForeground",{dark:(0,f.transparent)(e.editorGutterAddedBackground,.6),light:(0,f.transparent)(e.editorGutterAddedBackground,.6),hcDark:(0,f.transparent)(e.editorGutterAddedBackground,.6),hcLight:(0,f.transparent)(e.editorGutterAddedBackground,.6)},t.localize(16,null)),e.overviewRulerDeletedForeground=(0,f.registerColor)("editorOverviewRuler.deletedForeground",{dark:(0,f.transparent)(e.editorGutterDeletedBackground,.6),light:(0,f.transparent)(e.editorGutterDeletedBackground,.6),hcDark:(0,f.transparent)(e.editorGutterDeletedBackground,.6),hcLight:(0,f.transparent)(e.editorGutterDeletedBackground,.6)},t.localize(17,null));let te=class vn extends R.Disposable{static createDecoration(Se,Ie){const ve={description:"dirty-diff-decoration",isWholeLine:Ie.isWholeLine};return Ie.gutter&&(ve.linesDecorationsClassName=`dirty-diff-glyph ${Se}`),Ie.overview.active&&(ve.overviewRuler={color:(0,i.themeColorFromId)(Ie.overview.color),position:y.OverviewRulerLane.Left}),Ie.minimap.active&&(ve.minimap={color:(0,i.themeColorFromId)(Ie.minimap.color),position:y.MinimapPosition.Gutter}),u.ModelDecorationOptions.createDynamic(ve)}constructor(Se,Ie,ve){super(),this.model=Ie,this.configurationService=ve,this.decorations=[],this.editorModel=Se;const be=ve.getValue("scm.diffDecorations"),ge=be==="all"||be==="gutter",ue=be==="all"||be==="overview",Ce=be==="all"||be==="minimap";this.addedOptions=vn.createDecoration("dirty-diff-added",{gutter:ge,overview:{active:ue,color:e.overviewRulerAddedForeground},minimap:{active:Ce,color:e.minimapGutterAddedBackground},isWholeLine:!0}),this.addedPatternOptions=vn.createDecoration("dirty-diff-added-pattern",{gutter:ge,overview:{active:ue,color:e.overviewRulerAddedForeground},minimap:{active:Ce,color:e.minimapGutterAddedBackground},isWholeLine:!0}),this.modifiedOptions=vn.createDecoration("dirty-diff-modified",{gutter:ge,overview:{active:ue,color:e.overviewRulerModifiedForeground},minimap:{active:Ce,color:e.minimapGutterModifiedBackground},isWholeLine:!0}),this.modifiedPatternOptions=vn.createDecoration("dirty-diff-modified-pattern",{gutter:ge,overview:{active:ue,color:e.overviewRulerModifiedForeground},minimap:{active:Ce,color:e.minimapGutterModifiedBackground},isWholeLine:!0}),this.deletedOptions=vn.createDecoration("dirty-diff-deleted",{gutter:ge,overview:{active:ue,color:e.overviewRulerDeletedForeground},minimap:{active:Ce,color:e.minimapGutterDeletedBackground},isWholeLine:!1}),this._register(ve.onDidChangeConfiguration(De=>{De.affectsConfiguration("scm.diffDecorationsGutterPattern")&&this.onDidChange()})),this._register(Ie.onDidChange(this.onDidChange,this))}onDidChange(){if(!this.editorModel)return;const Se=this.configurationService.getValue("scm.diffDecorationsGutterPattern"),Ie=this.model.changes.map(ve=>{const be=Q(ve),ge=ve.modifiedStartLineNumber,ue=ve.modifiedEndLineNumber||ge;switch(be){case G.Add:return{range:{startLineNumber:ge,startColumn:1,endLineNumber:ue,endColumn:1},options:Se.added?this.addedPatternOptions:this.addedOptions};case G.Delete:return{range:{startLineNumber:ge,startColumn:Number.MAX_VALUE,endLineNumber:ge,endColumn:Number.MAX_VALUE},options:this.deletedOptions};case G.Modify:return{range:{startLineNumber:ge,startColumn:1,endLineNumber:ue,endColumn:1},options:Se.modified?this.modifiedPatternOptions:this.modifiedOptions}}});this.decorations=this.editorModel.deltaDecorations(this.decorations,Ie)}dispose(){super.dispose(),this.editorModel&&!this.editorModel.isDisposed()&&this.editorModel.deltaDecorations(this.decorations,[]),this.editorModel=null,this.decorations=[]}};te=we([F(2,C.IConfigurationService)],te);function Z(me,Se){let Ie=me.modifiedStartLineNumber-Se.modifiedStartLineNumber;return Ie!==0||(Ie=me.modifiedEndLineNumber-Se.modifiedEndLineNumber,Ie!==0)||(Ie=me.originalStartLineNumber-Se.originalStartLineNumber,Ie!==0)?Ie:me.originalEndLineNumber-Se.originalEndLineNumber}function ne(me){return(Se,Ie)=>{const ve=(0,m.isEqualOrParent)(me,Se.rootUri),be=(0,m.isEqualOrParent)(me,Ie.rootUri);return ve&&be?Se.rootUri.fsPath.length-Ie.rootUri.fsPath.length:ve?-1:be?1:0}}e.createProviderComparer=ne;async function ce(me,Se){const Ie=H.Iterable.map(me.repositories,ue=>ue.provider),ve=Array.from(H.Iterable.filter(Ie,ue=>!!ue.rootUri));ve.sort(ne(Se));const be=await(0,p.first)(ve.map(ue=>()=>ue.getOriginalResource(Se)));if(be)return be;const ge=H.Iterable.filter(Ie,ue=>!ue.rootUri);return(0,p.first)(Array.from(ge,ue=>()=>ue.getOriginalResource(Se)))}e.getOriginalResource=ce;let de=class extends R.Disposable{get original(){return this._originalModel?.textEditorModel||null}get modified(){return this._model.textEditorModel||null}get changes(){return this._changes}constructor(Se,Ie,ve,be,ge,ue){super(),this.scmService=Ie,this.editorWorkerService=ve,this.configurationService=be,this.textModelResolverService=ge,this.progressService=ue,this._originalResource=null,this._originalModel=null,this.diffDelayer=new p.ThrottledDelayer(200),this.repositoryDisposables=new Set,this.originalModelDisposables=this._register(new R.DisposableStore),this._disposed=!1,this._onDidChange=new A.Emitter,this.onDidChange=this._onDidChange.event,this._changes=[],this._model=Se,this._register(Se.textEditorModel.onDidChangeContent(()=>this.triggerDiff())),this._register(A.Event.filter(be.onDidChangeConfiguration,Ce=>Ce.affectsConfiguration("scm.diffDecorationsIgnoreTrimWhitespace")||Ce.affectsConfiguration("diffEditor.ignoreTrimWhitespace"))(this.triggerDiff,this)),this._register(Ie.onDidAddRepository(this.onDidAddRepository,this));for(const Ce of Ie.repositories)this.onDidAddRepository(Ce);this._register(this._model.onDidChangeEncoding(()=>{this.diffDelayer.cancel(),this._originalResource=null,this._originalModel=null,this._originalURIPromise=void 0,this.setChanges([]),this.triggerDiff()})),this.triggerDiff()}onDidAddRepository(Se){const Ie=new R.DisposableStore;this.repositoryDisposables.add(Ie),Ie.add((0,R.toDisposable)(()=>this.repositoryDisposables.delete(Ie)));const ve=A.Event.any(Se.provider.onDidChange,Se.provider.onDidChangeResources);Ie.add(ve(this.triggerDiff,this));const be=A.Event.filter(this.scmService.onDidRemoveRepository,ge=>ge===Se);Ie.add(be(()=>(0,R.dispose)(Ie),null)),this.triggerDiff()}triggerDiff(){return this.diffDelayer?this.diffDelayer.trigger(()=>this.diff()).then(Se=>{this._disposed||this._model.isDisposed()||!this._originalModel||this._originalModel.isDisposed()||(this._originalModel.textEditorModel.getValueLength()===0&&(Se=[]),Se||(Se=[]),this.setChanges(Se))},Se=>(0,P.onUnexpectedError)(Se)):Promise.resolve(null)}setChanges(Se){const Ie=(0,T.sortedDiff)(this._changes,Se,Z);this._changes=Se,this._onDidChange.fire({changes:Se,diff:Ie})}diff(){return this.progressService.withProgress({location:3,delay:250},async()=>this.getOriginalURIPromise().then(Se=>{if(this._disposed||this._model.isDisposed()||!Se)return Promise.resolve([]);if(!this.editorWorkerService.canComputeDirtyDiff(Se,this._model.resource))return Promise.resolve([]);const Ie=this.configurationService.getValue("scm.diffDecorationsIgnoreTrimWhitespace"),ve=Ie==="inherit"?this.configurationService.getValue("diffEditor.ignoreTrimWhitespace"):Ie!=="false";return this.editorWorkerService.computeDirtyDiff(Se,this._model.resource,ve)}))}getOriginalURIPromise(){return this._originalURIPromise?this._originalURIPromise:(this._originalURIPromise=this.getOriginalResource().then(Se=>this._disposed?null:Se?this._originalResource?.toString()===Se.toString()?Se:this.textModelResolverService.createModelReference(Se).then(Ie=>{if(this._disposed)return Ie.dispose(),null;if(this._originalResource=Se,this._originalModel=Ie.object,(0,M.isTextFileEditorModel)(this._originalModel)){const ve=this._model.getEncoding();ve&&this._originalModel.setEncoding(ve,1)}return this.originalModelDisposables.clear(),this.originalModelDisposables.add(Ie),this.originalModelDisposables.add(Ie.object.textEditorModel.onDidChangeContent(()=>this.triggerDiff())),Se}).catch(Ie=>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 Se=this._model.resource;return ce(this.scmService,Se)}findNextClosestChange(Se,Ie=!0){for(let ve=0;ve<this.changes.length;ve++){const be=this.changes[ve];if(Ie){if($(be)>=Se)return ve}else if(be.modifiedStartLineNumber>Se)return ve}return 0}findPreviousClosestChange(Se,Ie=!0){for(let ve=this.changes.length-1;ve>=0;ve--){const be=this.changes[ve];if(Ie){if(be.modifiedStartLineNumber<=Se)return ve}else if($(be)<Se)return ve}return this.changes.length-1}dispose(){super.dispose(),this._disposed=!0,this._originalResource=null,this._originalModel=null,this.diffDelayer.cancel(),this.repositoryDisposables.forEach(Se=>(0,R.dispose)(Se)),this.repositoryDisposables.clear()}};de=we([F(1,r.ISCMService),F(2,S.IEditorWorkerService),F(3,C.IConfigurationService),F(4,I.ITextModelService),F(5,V.IProgressService)],de),e.DirtyDiffModel=de;class he{constructor(Se,Ie){this.model=Se,this.decorator=Ie}dispose(){this.decorator.dispose(),this.model.dispose()}}let pe=class extends R.Disposable{constructor(Se,Ie,ve,be){super(),this.editorService=Se,this.instantiationService=Ie,this.configurationService=ve,this.textFileService=be,this.enabled=!1,this.viewState={width:3,visibility:"always"},this.items=new Map,this.transientDisposables=this._register(new R.DisposableStore),this.stylesheet=(0,L.createStyleSheet)(),this._register((0,R.toDisposable)(()=>this.stylesheet.parentElement.removeChild(this.stylesheet)));const ge=A.Event.filter(ve.onDidChangeConfiguration,De=>De.affectsConfiguration("scm.diffDecorations"));this._register(ge(this.onDidChangeConfiguration,this)),this.onDidChangeConfiguration(),A.Event.filter(ve.onDidChangeConfiguration,De=>De.affectsConfiguration("scm.diffDecorationsGutterWidth"))(this.onDidChangeDiffWidthConfiguration,this),this.onDidChangeDiffWidthConfiguration(),A.Event.filter(ve.onDidChangeConfiguration,De=>De.affectsConfiguration("scm.diffDecorationsGutterVisibility"))(this.onDidChangeDiffVisibiltiyConfiguration,this),this.onDidChangeDiffVisibiltiyConfiguration()}onDidChangeConfiguration(){this.configurationService.getValue("scm.diffDecorations")!=="none"?this.enable():this.disable()}onDidChangeDiffWidthConfiguration(){let Se=this.configurationService.getValue("scm.diffDecorationsGutterWidth");(isNaN(Se)||Se<=0||Se>5)&&(Se=3),this.setViewState({...this.viewState,width:Se})}onDidChangeDiffVisibiltiyConfiguration(){const Se=this.configurationService.getValue("scm.diffDecorationsGutterVisibility");this.setViewState({...this.viewState,visibility:Se})}setViewState(Se){this.viewState=Se,this.stylesheet.textContent=` .monaco-editor .dirty-diff-added, .monaco-editor .dirty-diff-modified { border-left-width:${Se.width}px; } .monaco-editor .dirty-diff-added-pattern, .monaco-editor .dirty-diff-added-pattern:before, .monaco-editor .dirty-diff-modified-pattern, .monaco-editor .dirty-diff-modified-pattern:before { background-size: ${Se.width}px ${Se.width}px; } .monaco-editor .dirty-diff-added, .monaco-editor .dirty-diff-added-pattern, .monaco-editor .dirty-diff-modified, .monaco-editor .dirty-diff-modified-pattern, .monaco-editor .dirty-diff-deleted { opacity: ${Se.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[,Se]of this.items)Se.dispose();this.items.clear(),this.enabled=!1}}onEditorsChanged(){const Se=this.editorService.visibleTextEditorControls.filter(ge=>ge instanceof k.CodeEditorWidget).map(ge=>{const ue=ge,Ce=se.get(ue);return Ce&&(Ce.modelRegistry=this),ue.getModel()}).filter((ge,ue,Ce)=>!!ge&&!!ge.uri&&Ce.indexOf(ge,ue+1)===-1).map(ge=>this.textFileService.files.get(ge.uri)).filter(ge=>ge?.isResolved()),Ie=new Set(Se),ve=Se.filter(ge=>!this.items.has(ge));[...this.items.keys()].filter(ge=>!Ie.has(ge)).forEach(ge=>this.onModelInvisible(ge)),ve.forEach(ge=>this.onModelVisible(ge))}onModelVisible(Se){const Ie=this.instantiationService.createInstance(de,Se),ve=new te(Se.textEditorModel,Ie,this.configurationService);this.items.set(Se,new he(Ie,ve))}onModelInvisible(Se){this.items.get(Se).dispose(),this.items.delete(Se)}getModel(Se){for(const[Ie,ve]of this.items)if(Ie.textEditorModel.id===Se.id)return ve.model;return null}dispose(){this.disable(),super.dispose()}};pe=we([F(0,b.IEditorService),F(1,E.IInstantiationService),F(2,C.IConfigurationService),F(3,M.ITextFileService)],pe),e.DirtyDiffWorkbenchController=pe,(0,c.registerEditorContribution)(se.ID,se),(0,i.registerThemingParticipant)((me,Se)=>{const Ie=me.getColor(x.editorGutter),ve=me.getColor(e.editorGutterModifiedBackground),be=Ce=>`-45deg, ${Ce} 25%, ${Ie} 25%, ${Ie} 50%, ${Ce} 50%, ${Ce} 75%, ${Ie} 75%, ${Ie}`;Ie&&ve&&Se.addRule(` .monaco-editor .dirty-diff-modified { border-left-color: ${ve}; border-left-style: solid; transition: opacity 0.5s; } .monaco-editor .dirty-diff-modified:before { background: ${ve}; } .monaco-editor .dirty-diff-modified-pattern { background-image: linear-gradient(${be(ve)}); background-repeat: repeat-y; transition: opacity 0.5s; } .monaco-editor .dirty-diff-modified-pattern:before { background-image: linear-gradient(${be(ve)}); transform: translateX(3px); } .monaco-editor .margin:hover .dirty-diff-modified, .monaco-editor .margin:hover .dirty-diff-modified-pattern { opacity: 1; } `);const ge=me.getColor(e.editorGutterAddedBackground);Ie&&ge&&Se.addRule(` .monaco-editor .dirty-diff-added { border-left-color: ${ge}; border-left-style: solid; transition: opacity 0.5s; } .monaco-editor .dirty-diff-added:before { background: ${ge}; } .monaco-editor .dirty-diff-added-pattern { background-image: linear-gradient(${be(ge)}); background-repeat: repeat-y; transition: opacity 0.5s; } .monaco-editor .dirty-diff-added-pattern:before { background-image: linear-gradient(${be(ge)}); transform: translateX(3px); } .monaco-editor .margin:hover .dirty-diff-added, .monaco-editor .margin:hover .dirty-diff-added-pattern { opacity: 1; } `);const ue=me.getColor(e.editorGutterDeletedBackground);ue&&Se.addRule(` .monaco-editor .dirty-diff-deleted:after { border-left: 4px solid ${ue}; transition: opacity 0.5s; } .monaco-editor .dirty-diff-deleted:before { background: ${ue}; } .monaco-editor .margin:hover .dirty-diff-added { opacity: 1; } `)})}),define(ae[966],le([1,0,16,32,40,20,59,212,62,431,1706,7,5,66,688,216]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getModifiedRanges=void 0,(0,R.registerEditorAction)(class extends R.EditorAction{constructor(){super({id:"editor.action.formatChanges",label:S.localize(0,null),alias:"Format Modified Lines",precondition:C.ContextKeyExpr.and(k.EditorContextKeys.writable,k.EditorContextKeys.hasDocumentSelectionFormattingProvider)})}async run(s,d){const n=s.get(r.IInstantiationService);if(!d.hasModel())return;const a=await n.invokeFunction(c,d.getModel());if((0,t.isNonEmptyArray)(a))return n.invokeFunction(b.formatDocumentRangesWithSelectedProvider,d,a,1,u.Progress.None,p.CancellationToken.None)}});async function c(l,s){const d=l.get(f.ISCMService),n=l.get(E.IEditorWorkerService),a=l.get(I.ITextModelService),o=await(0,i.getOriginalResource)(d,s.uri);if(!o)return null;const g=[],h=await a.createModelReference(o);try{if(!n.canComputeDirtyDiff(o,s.uri))return;const v=await n.computeDirtyDiff(o,s.uri,!1);if(!(0,t.isNonEmptyArray)(v))return;for(const m of v)g.push(s.validateRange(new A.Range(m.modifiedStartLineNumber,1,m.modifiedEndLineNumber||m.modifiedStartLineNumber,Number.MAX_SAFE_INTEGER)))}finally{h.dispose()}return g}e.getModifiedRanges=c}),define(ae[2793],le([1,0,28,105,75,766,138,50,20,309,236,431,168,1563,8,5,66,78,2,44,17,966,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SaveParticipantsContribution=e.TrimFinalNewLinesParticipant=e.FinalNewLineParticipant=e.TrimWhitespaceParticipant=void 0;let g=class{constructor(L,M){this.configurationService=L,this.codeEditorService=M}async participate(L,M){!L.textEditorModel||this.configurationService.getValue("files.trimTrailingWhitespace",{overrideIdentifier:L.textEditorModel.getLanguageId(),resource:L.resource})&&this.doTrimTrailingWhitespace(L.textEditorModel,M.reason===2)}doTrimTrailingWhitespace(L,M){let O=[],N=[];const P=h(L,this.codeEditorService);if(P&&(O=P.getSelections(),M)){N=O.map(z=>z.getPosition());const V=r.SnippetController2.get(P)?.getSessionEnclosingRange();if(V)for(let z=V.startLineNumber;z<=V.endLineNumber;z++)N.push(new E.Position(z,L.getLineMaxColumn(z)))}const B=(0,A.trimTrailingWhitespace)(L,N);!B.length||L.pushEditOperations(O,B,V=>O)}};g=we([F(0,i.IConfigurationService),F(1,R.ICodeEditorService)],g),e.TrimWhitespaceParticipant=g;function h(_,L){let M=null;if(_.isAttachedToEditor()){for(const O of L.listCodeEditors())if(O.hasModel()&&O.getModel()===_){if(O.hasTextFocus())return O;M=O}}return M}let v=class{constructor(L,M){this.configurationService=L,this.codeEditorService=M}async participate(L,M){!L.textEditorModel||this.configurationService.getValue("files.insertFinalNewline",{overrideIdentifier:L.textEditorModel.getLanguageId(),resource:L.resource})&&this.doInsertFinalNewLine(L.textEditorModel)}doInsertFinalNewLine(L){const M=L.getLineCount(),O=L.getLineContent(M),N=t.lastNonWhitespaceIndex(O)===-1;if(!M||N)return;const P=[k.EditOperation.insert(new E.Position(M,L.getLineMaxColumn(M)),L.getEOL())],B=h(L,this.codeEditorService);B?B.executeEdits("insertFinalNewLine",P,B.getSelections()):L.pushEditOperations([],P,()=>null)}};v=we([F(0,i.IConfigurationService),F(1,R.ICodeEditorService)],v),e.FinalNewLineParticipant=v;let m=class{constructor(L,M){this.configurationService=L,this.codeEditorService=M}async participate(L,M){!L.textEditorModel||this.configurationService.getValue("files.trimFinalNewlines",{overrideIdentifier:L.textEditorModel.getLanguageId(),resource:L.resource})&&this.doTrimFinalNewLines(L.textEditorModel,M.reason===2)}findLastNonEmptyLine(L){for(let M=L.getLineCount();M>=1;M--)if(L.getLineContent(M).length>0)return M;return 0}doTrimFinalNewLines(L,M){const O=L.getLineCount();if(O===1)return;let N=[],P=0;const B=h(L,this.codeEditorService);if(B&&(N=B.getSelections(),M))for(let H=0,W=N.length;H<W;H++){const U=N[H].positionLineNumber;U>P&&(P=U)}const V=this.findLastNonEmptyLine(L),z=Math.max(V+1,P+1),x=L.validateRange(new I.Range(z,1,O,L.getLineMaxColumn(O)));x.isEmpty()||(L.pushEditOperations(N,[k.EditOperation.delete(x)],H=>N),B?.setSelections(N))}};m=we([F(0,i.IConfigurationService),F(1,R.ICodeEditorService)],m),e.TrimFinalNewLinesParticipant=m;let w=class{constructor(L,M,O){this.configurationService=L,this.codeEditorService=M,this.instantiationService=O}async participate(L,M,O,N){if(!L.textEditorModel||M.reason===2)return;const P=L.textEditorModel,B={overrideIdentifier:P.getLanguageId(),resource:P.uri},V=new c.Progress(W=>{O.report({message:(0,u.localize)(0,null,W.displayName||W.extensionId&&W.extensionId.value||"???","command:workbench.action.openSettings?%5B%22editor.formatOnSave%22%5D")})});if(!this.configurationService.getValue("editor.formatOnSave",B))return;const x=h(P,this.codeEditorService)||P,H=this.configurationService.getValue("editor.formatOnSaveMode",B);if(H==="file")await this.instantiationService.invokeFunction(C.formatDocumentWithSelectedProvider,x,2,V,N);else{const W=await this.instantiationService.invokeFunction(a.getModifiedRanges,(0,p.isCodeEditor)(x)?x.getModel():x);W===null&&H==="modificationsIfAvailable"?await this.instantiationService.invokeFunction(C.formatDocumentWithSelectedProvider,x,2,V,N):W&&await this.instantiationService.invokeFunction(C.formatDocumentRangesWithSelectedProvider,x,W,2,V,N)}}};w=we([F(0,i.IConfigurationService),F(1,R.ICodeEditorService),F(2,f.IInstantiationService)],w);let D=class{constructor(L,M,O){this.configurationService=L,this.instantiationService=M,this.languageFeaturesService=O}async participate(L,M,O,N){if(!L.textEditorModel||M.reason!==1)return;const P=L.textEditorModel,B={overrideIdentifier:P.getLanguageId(),resource:L.resource},V=this.configurationService.getValue("editor.codeActionsOnSave",B);if(!V)return;const z=Array.isArray(V)?V:Object.keys(V).filter(W=>V[W]),x=this.createCodeActionsOnSave(z);if(Array.isArray(V)||x.sort((W,U)=>S.CodeActionKind.SourceFixAll.contains(W)?S.CodeActionKind.SourceFixAll.contains(U)?0:-1:S.CodeActionKind.SourceFixAll.contains(U)?1:0),!x.length)return;const H=Array.isArray(V)?[]:Object.keys(V).filter(W=>V[W]===!1).map(W=>new S.CodeActionKind(W));O.report({message:(0,u.localize)(1,null)}),await this.applyOnSaveActions(P,x,H,O,N)}createCodeActionsOnSave(L){const M=L.map(O=>new S.CodeActionKind(O));return M.filter(O=>M.every(N=>N.equals(O)||!N.contains(O)))}async applyOnSaveActions(L,M,O,N,P){const B=new class{constructor(){this._names=new Set}_report(){N.report({message:(0,u.localize)(2,null,[...this._names].map(V=>`'${V}'`).join(", "),"command:workbench.action.openSettings?%5B%22editor.codeActionsOnSave%22%5D")})}report(V){V.displayName&&!this._names.has(V.displayName)&&(this._names.add(V.displayName),this._report())}};for(const V of M){const z=await this.getActionsToRun(L,V,O,B,P);try{for(const x of z.validActions)N.report({message:(0,u.localize)(3,null,x.action.title)}),await this.instantiationService.invokeFunction(b.applyCodeAction,x,b.ApplyCodeActionReason.OnSave)}catch{}finally{z.dispose()}}}getActionsToRun(L,M,O,N,P){return(0,b.getCodeActions)(this.languageFeaturesService.codeActionProvider,L,L.getFullModelRange(),{type:2,triggerAction:S.CodeActionTriggerSource.OnSave,filter:{include:M,excludes:O,includeSourceActions:!0}},N,P)}};D=we([F(0,i.IConfigurationService),F(1,f.IInstantiationService),F(2,o.ILanguageFeaturesService)],D);let y=class extends s.Disposable{constructor(L,M){super(),this.instantiationService=L,this.textFileService=M,this.registerSaveParticipants()}registerSaveParticipants(){this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(g))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(D))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(w))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(v))),this._register(this.textFileService.files.addSaveParticipant(this.instantiationService.createInstance(m)))}};y=we([F(0,f.IInstantiationService),F(1,l.ITextFileService)],y),e.SaveParticipantsContribution=y,n.Registry.as(d.Extensions.Workbench).registerWorkbenchContribution(y,3)}),define(ae[2794],le([1,0,2613,2671,966]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ae[2795],le([1,0,1840,22,2,451,24,54,42,352,62,5,94,78,145,20,138,49,18,11,43]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceService=e.ReplacePreviewContentProvider=void 0;const a="replacePreview",o=w=>w.with({scheme:p.Schemas.internal,fragment:a,query:JSON.stringify({scheme:w.scheme})}),g=w=>w.with({scheme:JSON.parse(w.query).scheme,fragment:"",query:""});let h=class{constructor(D,y){this.instantiationService=D,this.textModelResolverService=y,this.textModelResolverService.registerTextModelContentProvider(p.Schemas.internal,this)}provideTextContent(D){return D.fragment===a?this.instantiationService.createInstance(v).resolve(D):null}};h=we([F(0,C.IInstantiationService),F(1,S.ITextModelService)],h),e.ReplacePreviewContentProvider=h;let v=class extends R.Disposable{constructor(D,y,T,_,L){super(),this.modelService=D,this.languageService=y,this.textModelResolverService=T,this.replaceService=_,this.searchWorkbenchService=L}async resolve(D){const y=g(D),T=this.searchWorkbenchService.searchModel.searchResult.matches().filter(N=>N.resource.toString()===y.toString())[0],L=this._register(await this.textModelResolverService.createModelReference(y)).object.textEditorModel,M=L.getLanguageId(),O=this.modelService.createModel((0,r.createTextBufferFactoryFromSnapshot)(L.createSnapshot()),this.languageService.createById(M),D);return this._register(T.onChange(({forceUpdateModel:N})=>this.update(L,O,T,N))),this._register(this.searchWorkbenchService.searchModel.onReplaceTermChanged(()=>this.update(L,O,T))),this._register(T.onDispose(()=>O.dispose())),this._register(O.onWillDispose(()=>this.dispose())),this._register(L.onWillDispose(()=>this.dispose())),O}update(D,y,T,_=!1){!D.isDisposed()&&!y.isDisposed()&&this.replaceService.updateReplacePreview(T,_)}};v=we([F(0,E.IModelService),F(1,I.ILanguageService),F(2,S.ITextModelService),F(3,A.IReplaceService),F(4,b.ISearchWorkbenchService)],v);let m=class Nl{constructor(D,y,T,_,L){this.textFileService=D,this.editorService=y,this.textModelResolverService=T,this.bulkEditorService=_,this.labelService=L}async replace(D,y=void 0,T=null){const _=this.createEdits(D,T);return await this.bulkEditorService.apply(_,{progress:y}),d.Promises.settled(_.map(async L=>this.textFileService.files.get(L.resource)?.save({source:Nl.REPLACE_SAVE_SOURCE})))}async openReplacePreview(D,y,T,_){const L=D instanceof b.Match?D.parent():D,M=await this.editorService.openEditor({original:{resource:L.resource},modified:{resource:o(L.resource)},label:t.localize(1,null,L.name(),L.name()),description:this.labelService.getUriLabel((0,s.dirname)(L.resource),{relative:!0}),options:{preserveFocus:y,pinned:_,revealIfVisible:!0}}),O=M?.input,N=L.onDispose(()=>{O?.dispose(),N.dispose()});if(await this.updateReplacePreview(L),M){const P=M.getControl();D instanceof b.Match&&P&&P.revealLineInCenter(D.range().startLineNumber,1)}}async updateReplacePreview(D,y=!1){const T=o(D.resource),[_,L]=await Promise.all([this.textModelResolverService.createModelReference(D.resource),this.textModelResolverService.createModelReference(T)]),M=_.object.textEditorModel,O=L.object.textEditorModel;try{M&&O&&(y?O.setValue(M.getValue()):O.undo(),this.applyEditsToPreview(D,O))}finally{_.dispose(),L.dispose()}}applyEditsToPreview(D,y){const T=this.createEdits(D,y.uri),_=[];for(const L of T)_.push(c.EditOperation.replaceMove(f.Range.lift(L.textEdit.range),L.textEdit.text));y.pushEditOperations([],_.sort((L,M)=>f.Range.compareRangesUsingStarts(L.range,M.range)),()=>[])}createEdits(D,y=null){const T=[];if(D instanceof b.Match){const _=D;T.push(this.createEdit(_,_.replaceString,y))}return D instanceof b.FileMatch&&(D=[D]),D instanceof Array&&D.forEach(_=>{const L=_;L.count()>0&&T.push(...L.matches().map(M=>this.createEdit(M,M.replaceString,y)))}),T}createEdit(D,y,T=null){const _=D.parent();return new i.ResourceTextEdit(T??_.resource,{range:D.range(),text:y},void 0,void 0)}};m.REPLACE_SAVE_SOURCE=n.SaveSourceRegistry.registerSource("searchReplace.source",t.localize(0,null)),m=we([F(0,u.ITextFileService),F(1,k.IEditorService),F(2,S.ITextModelService),F(3,i.IBulkEditService),F(4,l.ILabelService)],m),e.ReplaceService=m}),define(ae[2796],le([1,0,35,451,2795,17,44]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContributions=void 0;function E(){(0,t.registerSingleton)(p.IReplaceService,R.ReplaceService,1),A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(R.ReplacePreviewContentProvider,1)}e.registerContributions=E}),define(ae[553],le([1,0,16,20,1852,352,78,482]),function(J,e,t,p,R,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 E=` `,I=n=>a=>new p.Range(a.startLineNumber+n,a.startColumn,a.endLineNumber+n,a.endColumn),b=(n,a)=>{const o=v=>`${n.range().startLineNumber+v}`,g=n.fullPreviewLines(),h=[];return g.forEach((v,m)=>{const w=o(m),y=` ${" ".repeat(a-w.length)}${w}: `,T=y.length,_=y+(v.split(/\r?\n?$/,1)[0]||""),L=({start:P,end:B})=>new p.Range(1,(P??1)+T,1,(B??v.length+1)+T),M=n.rangeInPreview(),O=M.startLineNumber===M.endLineNumber;let N;O?N=L({start:M.startColumn,end:M.endColumn}):m===0?N=L({start:M.startColumn}):m===g.length-1?N=L({end:M.endColumn}):N=L({}),h.push({lineNumber:w,line:_,ranges:[N]})}),h};function S(n,a){const o=n.matches().sort(A.searchMatchComparer),g=o[o.length-1].range().endLineNumber.toString().length,v=[`${a(n.resource)}:`],m=[],w={},D=[];n.context.forEach((_,L)=>D.push({line:_,lineNumber:L})),D.sort((_,L)=>_.lineNumber-L.lineNumber);let y;const T=new Set;for(o.forEach(_=>{b(_,g).forEach(L=>{if(!T.has(L.lineNumber)){for(;D.length&&D[0].lineNumber<+L.lineNumber;){const{line:M,lineNumber:O}=D.shift();y!==void 0&&O!==y+1&&v.push(""),v.push(` ${" ".repeat(g-`${O}`.length)}${O} ${M}`),y=O}w[L.lineNumber]=v.length,T.add(L.lineNumber),v.push(L.line),y=+L.lineNumber}m.push(...L.ranges.map(I(w[L.lineNumber])))})});D.length;){const{line:_,lineNumber:L}=D.shift();v.push(` ${L} ${_}`)}return{text:v,matchRanges:m}}const C=(n,a,o,g)=>({query:n.contentPattern.pattern,isRegexp:!!n.contentPattern.isRegExp,isCaseSensitive:!!n.contentPattern.isCaseSensitive,matchWholeWord:!!n.contentPattern.isWordMatch,filesToExclude:o,filesToInclude:a,showIncludesExcludes:!!(a||o||n?.userDisabledExcludesAndIgnoreFiles),useExcludeSettingsAndIgnoreFiles:n?.userDisabledExcludesAndIgnoreFiles===void 0?!0:!n.userDisabledExcludesAndIgnoreFiles,contextLines:g,onlyOpenEditors:!!n.onlyOpenEditors}),r=n=>(g=>g.filter(h=>h!==!1&&h!==null&&h!==void 0))([`# Query: ${(g=>g.replace(/\\/g,"\\\\").replace(/\n/g,"\\n"))(n.query??"")}`,(n.isCaseSensitive||n.matchWholeWord||n.isRegexp||n.useExcludeSettingsAndIgnoreFiles===!1)&&`# Flags: ${(0,t.coalesce)([n.isCaseSensitive&&"CaseSensitive",n.matchWholeWord&&"WordMatch",n.isRegexp&&"RegExp",n.onlyOpenEditors&&"OpenEditors",n.useExcludeSettingsAndIgnoreFiles===!1&&"IgnoreExcludeSettings"]).join(" ")}`,n.filesToInclude?`# Including: ${n.filesToInclude}`:void 0,n.filesToExclude?`# Excluding: ${n.filesToExclude}`:void 0,n.contextLines?`# ContextLines: ${n.contextLines}`:void 0,""]).join(E);e.serializeSearchConfiguration=r;const u=n=>(0,e.extractSearchQueryFromLines)(n.getValueInRange(new p.Range(1,1,6,1)).split(E));e.extractSearchQueryFromModel=u;const i=()=>({query:"",filesToInclude:"",filesToExclude:"",isRegexp:!1,isCaseSensitive:!1,useExcludeSettingsAndIgnoreFiles:!0,matchWholeWord:!1,contextLines:0,showIncludesExcludes:!1,onlyOpenEditors:!1});e.defaultSearchConfig=i;const f=n=>{const a=(0,e.defaultSearchConfig)(),o=h=>{let v="";for(let m=0;m<h.length;m++)if(h[m]==="\\"){m++;const w=h[m];if(w==="n")v+=` `;else if(w==="\\")v+="\\";else throw Error((0,R.localize)(0,null))}else v+=h[m];return v},g=/^# ([^:]*): (.*)$/;for(const h of n){const v=g.exec(h);if(!v)continue;const[,m,w]=v;switch(m){case"Query":a.query=o(w);break;case"Including":a.filesToInclude=w;break;case"Excluding":a.filesToExclude=w;break;case"ContextLines":a.contextLines=+w;break;case"Flags":a.isRegexp=w.indexOf("RegExp")!==-1,a.isCaseSensitive=w.indexOf("CaseSensitive")!==-1,a.useExcludeSettingsAndIgnoreFiles=w.indexOf("IgnoreExcludeSettings")===-1,a.matchWholeWord=w.indexOf("WordMatch")!==-1,a.onlyOpenEditors=w.indexOf("OpenEditors")!==-1}}return a.showIncludesExcludes=!!(a.filesToInclude||a.filesToExclude||!a.useExcludeSettingsAndIgnoreFiles),a};e.extractSearchQueryFromLines=f;const c=(n,a,o,g,h,v,m)=>{if(!n.query)throw Error("Internal Error: Expected query, got null");const w=C(n.query,a,o,g),D=n.fileCount()>1?(0,R.localize)(1,null,n.fileCount()):(0,R.localize)(2,null),y=n.count()>1?(0,R.localize)(3,null,n.count()):(0,R.localize)(4,null),T=[n.count()?`${y} - ${D}`:(0,R.localize)(5,null)];m&&T.push((0,R.localize)(6,null)),T.push("");const _=(M,O)=>(0,A.searchMatchComparer)(M,O,v),L=l((0,t.flatten)(n.folderMatches().sort(_).map(M=>M.allDownstreamFileMatches().sort(_).map(O=>S(O,h)))));return{matchRanges:L.matchRanges.map(I(T.length)),text:T.concat(L.text).join(E),config:w}};e.serializeSearchResultForEditor=c;const l=n=>{const a=[],o=[];return n.forEach(g=>{g.matchRanges.map(I(a.length)).forEach(h=>o.push(h)),g.text.forEach(h=>a.push(h)),a.push("")}),{text:a,matchRanges:o}},s=async(n,a)=>{const g=(await n.get(k.ITextFileService).read(a)).value;return(0,e.parseSerializedSearchEditor)(g)};e.parseSavedSearchEditor=s;const d=n=>{const a=[],o=[];let g=!0;for(const h of n.split(/\r?\n/g))g?(a.push(h),h===""&&(g=!1)):o.push(h);return{config:(0,e.extractSearchQueryFromLines)(a),text:o.join(` `)}};e.parseSerializedSearchEditor=d}),define(ae[2797],le([1,0,1865,14,42,44,17,27,23,46,26,78,41,9,209,11,2,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends c.Disposable{constructor(a,o,g,h,v,m,w,D){super();const y=`${a.surveyId}.sessionCount`,T=`${a.surveyId}.lastSessionDate`,_=`${a.surveyId}.skipVersion`,L=`${a.surveyId}.isCandidate`,M=`${a.surveyId}.editedCount`,O=`${a.surveyId}.editedDate`;if(o.get(_,-1,""))return;const P=new Date().toDateString();if(o.getNumber(M,-1,0)<a.editCount){const x=this._register(new f.RunOnceWorker(H=>{H.forEach(W=>{if(W.getLanguageId()===a.languageId&&P!==o.get(O,-1)){const U=o.getNumber(M,-1,0)+1;o.store(M,U,-1,0),o.store(O,P,-1,0)}})},250));this._register(m.files.onDidSave(H=>x.work(H.model)))}const B=o.get(T,-1,new Date(0).toDateString());if(P===B)return;const V=o.getNumber(y,-1,0)+1;if(o.store(T,P,-1,0),o.store(y,V,-1,0),V<9||o.getNumber(M,-1,0)<a.editCount)return;const z=o.getBoolean(L,-1,!1)||Math.random()<a.userProbability;if(o.store(L,z,-1,0),!z){o.store(_,D.version,-1,0);return}g.prompt(S.Severity.Info,(0,t.localize)(0,null,v.getLanguageName(a.languageId)??a.languageId),[{label:(0,t.localize)(1,null),run:()=>{h.publicLog(`${a.surveyId}.survey/takeShortSurvey`),h.getTelemetryInfo().then(x=>{w.open(u.URI.parse(`${a.surveyUrl}?o=${encodeURIComponent(i.platform)}&v=${encodeURIComponent(D.version)}&m=${encodeURIComponent(x.machineId)}`)),o.store(L,!1,-1,0),o.store(_,D.version,-1,0)})}},{label:(0,t.localize)(2,null),run:()=>{h.publicLog(`${a.surveyId}.survey/remindMeLater`),o.store(y,V-3,-1,0)}},{label:(0,t.localize)(3,null),isSecondary:!0,run:()=>{h.publicLog(`${a.surveyId}.survey/dontShowAgain`),o.store(L,!1,-1,0),o.store(_,D.version,-1,0)}}],{sticky:!0})}}let d=class{constructor(a,o,g,h,v,m,w,D){this.storageService=a,this.notificationService=o,this.telemetryService=g,this.textFileService=h,this.openerService=v,this.productService=m,this.languageService=w,this.extensionService=D,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 s(a,this.storageService,this.notificationService,this.telemetryService,this.languageService,this.textFileService,this.openerService,this.productService)))}};d=we([F(0,I.IStorageService),F(1,S.INotificationService),F(2,E.ITelemetryService),F(3,C.ITextFileService),F(4,r.IOpenerService),F(5,b.IProductService),F(6,R.ILanguageService),F(7,l.IExtensionService)],d),p.language==="en"&&k.Registry.as(A.Extensions.Workbench).registerWorkbenchContribution(d,3)}),define(ae[967],le([1,0,574,21,19,27,34,78,535,599,172,14,784,89,46]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceTags=e.getHashedRemotesFromConfig=void 0;async function f(l,s=!1){return Promise.all((0,r.getRemotes)(l,s).map(d=>(0,t.sha1Hex)(d)))}e.getHashedRemotesFromConfig=f;let c=class xl{constructor(s,d,n,a,o,g,h,v,m){this.fileService=s,this.contextService=d,this.telemetryService=n,this.requestService=a,this.textFileService=o,this.workspaceTagsService=g,this.diagnosticsService=h,this.productService=v,this.nativeHostService=m,this.telemetryService.telemetryLevel.value===3&&this.report()}async report(){this.reportWindowsEdition(),this.workspaceTagsService.getTags().then(s=>this.reportWorkspaceTags(s),s=>(0,p.onUnexpectedError)(s)),this.reportCloudStats(),this.reportProxyStats(),this.getWorkspaceInformation().then(s=>this.diagnosticsService.reportWorkspaceStats(s))}async reportWindowsEdition(){if(!C.isWindows)return;let s=await this.nativeHostService.windowsGetStringRegKey("HKEY_LOCAL_MACHINE","SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion","EditionID");s===void 0&&(s="Unknown"),this.telemetryService.publicLog2("windowsEdition",{edition:s})}async getWorkspaceInformation(){const s=this.contextService.getWorkspace(),d=this.contextService.getWorkbenchState(),n=await this.workspaceTagsService.getTelemetryWorkspaceId(s,d);return this.telemetryService.getTelemetryInfo().then(a=>({id:s.id,telemetryId:n,rendererSessionId:a.sessionId,folders:s.folders,transient:s.transient,configuration:s.configuration}))}reportWorkspaceTags(s){this.telemetryService.publicLog("workspce.tags",s)}reportRemoteDomains(s){Promise.all(s.map(d=>{const n=d.path,a=d.with({path:`${n!=="/"?n:""}/.git/config`});return this.fileService.exists(a).then(o=>o?this.textFileService.read(a,{acceptTextOnly:!0}).then(g=>(0,r.getDomainsOfRemotes)(g.value,r.AllowedSecondLevelDomains),g=>[]):[])})).then(d=>{const n=d.reduce((o,g)=>g.reduce((h,v)=>h.add(v),o),new Set),a=[];n.forEach(o=>a.push(o)),this.telemetryService.publicLog("workspace.remotes",{domains:a.sort()})},p.onUnexpectedError)}reportRemotes(s){Promise.all(s.map(d=>this.workspaceTagsService.getHashedRemotesFromUri(d,!0))).then(()=>{},p.onUnexpectedError)}reportAzureNode(s,d){const n=s.map(a=>{const o=a.path;return a.with({path:`${o!=="/"?o:""}/node_modules`})});return this.fileService.resolveAll(n.map(a=>({resource:a}))).then(a=>{const o=[].concat(...a.map(h=>h.success?h.stat.children||[]:[])).map(h=>h.name);return xl.searchArray(o,/azure/i)&&(d.node=!0),d},a=>d)}static searchArray(s,d){return s.some(n=>n.search(d)>-1)||void 0}reportAzureJava(s,d){return Promise.all(s.map(n=>{const a=n.path,o=n.with({path:`${a!=="/"?a:""}/pom.xml`});return this.fileService.exists(o).then(g=>g?this.textFileService.read(o,{acceptTextOnly:!0}).then(h=>!!h.value.match(/azure/i),h=>!1):!1)})).then(n=>(n.indexOf(!0)!==-1&&(d.java=!0),d))}reportAzure(s){const d=Object.create(null);this.reportAzureNode(s,d).then(n=>this.reportAzureJava(s,n)).then(n=>{Object.keys(n).length&&this.telemetryService.publicLog("workspace.azure",n)}).then(void 0,p.onUnexpectedError)}reportCloudStats(){const s=this.contextService.getWorkspace().folders.map(d=>d.uri);s.length&&this.fileService&&(this.reportRemoteDomains(s),this.reportRemotes(s),this.reportAzure(s))}reportProxyStats(){const s=this.productService.downloadUrl;!s||this.requestService.resolveProxy(s).then(d=>{let n=d?String(d).trim().split(/\s+/,1)[0]:"EMPTY";["DIRECT","PROXY","HTTPS","SOCKS","EMPTY"].indexOf(n)===-1&&(n="UNKNOWN")}).then(void 0,p.onUnexpectedError)}};c=we([F(0,R.IFileService),F(1,k.IWorkspaceContextService),F(2,A.ITelemetryService),F(3,S.IRequestService),F(4,E.ITextFileService),F(5,I.IWorkspaceTagsService),F(6,b.IDiagnosticsService),F(7,i.IProductService),F(8,u.INativeHostService)],c),e.WorkspaceTags=c}),define(ae[2798],le([1,0,17,44,967]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(R.WorkspaceTags,4)}),define(ae[2799],le([1,0,574,19,34,51,78,9,22,35,535,967,28,2388]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceTagsService=void 0;const i=["@azure","@azure/ai","@azure/core","@azure/cosmos","@azure/event","@azure/identity","@azure/keyvault","@azure/search","@azure/storage"],f=["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"],c=["azure-ai","azure-cognitiveservices","azure-core","azure-cosmos","azure-event","azure-identity","azure-keyvault","azure-mgmt","azure-ml","azure-search","azure-storage"],l=["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 s=class{constructor(n,a,o,g){this.fileService=n,this.contextService=a,this.environmentService=o,this.textFileService=g}async getTags(){return this._tags||(this._tags=await this.resolveWorkspaceTags()),this._tags}async getTelemetryWorkspaceId(n,a){function o(h){return(0,t.sha1Hex)(h.scheme===I.Schemas.file?h.fsPath:h.toString())}let g;switch(a){case 1:g=void 0;break;case 2:g=await o(n.folders[0].uri);break;case 3:n.configuration&&(g=await o(n.configuration))}return g}getHashedRemotesFromUri(n,a=!1){const o=n.path,g=n.with({path:`${o!=="/"?o:""}/.git/config`});return this.fileService.exists(g).then(h=>h?this.textFileService.read(g,{acceptTextOnly:!0}).then(v=>(0,C.getHashedRemotesFromConfig)(v.value,a),v=>[]):[])}async resolveWorkspaceTags(){const n=Object.create(null),a=this.contextService.getWorkbenchState(),o=this.contextService.getWorkspace();n["workspace.id"]=await this.getTelemetryWorkspaceId(o,a);const{filesToOpenOrCreate:g,filesToDiff:h,filesToMerge:v}=this.environmentService;n["workbench.filesToOpenOrCreate"]=g&&g.length||0,n["workbench.filesToDiff"]=h&&h.length||0,n["workbench.filesToMerge"]=v&&v.length||0;const m=a===1;n["workspace.roots"]=m?0:o.folders.length,n["workspace.empty"]=m;const w=m?void 0:o.folders.map(D=>D.uri);return!w||!w.length?Promise.resolve(n):this.fileService.resolveAll(w.map(D=>({resource:D}))).then(D=>{const y=[].concat(...D.map(Q=>Q.success?Q.stat.children||[]:[])).map(Q=>Q.name),T=y.reduce((Q,j)=>Q.add(j.toLowerCase()),new Set);n["workspace.grunt"]=T.has("gruntfile.js"),n["workspace.gulp"]=T.has("gulpfile.js"),n["workspace.jake"]=T.has("jakefile.js"),n["workspace.tsconfig"]=T.has("tsconfig.json"),n["workspace.jsconfig"]=T.has("jsconfig.json"),n["workspace.config.xml"]=T.has("config.xml"),n["workspace.vsc.extension"]=T.has("vsc-extension-quickstart.md"),n["workspace.ASP5"]=T.has("project.json")&&this.searchArray(y,/^.+\.cs$/i),n["workspace.sln"]=this.searchArray(y,/^.+\.sln$|^.+\.csproj$/i),n["workspace.unity"]=T.has("assets")&&T.has("library")&&T.has("projectsettings"),n["workspace.npm"]=T.has("package.json")||T.has("node_modules"),n["workspace.bower"]=T.has("bower.json")||T.has("bower_components"),n["workspace.java.pom"]=T.has("pom.xml"),n["workspace.java.gradle"]=T.has("build.gradle")||T.has("settings.gradle")||T.has("build.gradle.kts")||T.has("settings.gradle.kts")||T.has("gradlew")||T.has("gradlew.bat"),n["workspace.yeoman.code.ext"]=T.has("vsc-extension-quickstart.md"),n["workspace.py.requirements"]=T.has("requirements.txt"),n["workspace.py.requirements.star"]=this.searchArray(y,/^(.*)requirements(.*)\.txt$/i),n["workspace.py.Pipfile"]=T.has("pipfile"),n["workspace.py.conda"]=this.searchArray(y,/^environment(\.yml$|\.yaml$)/i);const _=T.has("mainactivity.cs")||T.has("mainactivity.fs"),L=T.has("appdelegate.cs")||T.has("appdelegate.fs"),M=T.has("androidmanifest.xml"),O=T.has("platforms"),N=T.has("plugins"),P=T.has("www"),B=T.has("properties"),V=T.has("resources"),z=T.has("jni");n["workspace.config.xml"]&&!n["workspace.language.cs"]&&!n["workspace.language.vb"]&&!n["workspace.language.aspx"]&&(O&&N&&P?n["workspace.cordova.high"]=!0:n["workspace.cordova.low"]=!0),n["workspace.config.xml"]&&!n["workspace.language.cs"]&&!n["workspace.language.vb"]&&!n["workspace.language.aspx"]&&T.has("ionic.config.json")&&(n["workspace.ionic"]=!0),_&&B&&V&&(n["workspace.xamarin.android"]=!0),L&&V&&(n["workspace.xamarin.ios"]=!0),M&&z&&(n["workspace.android.cpp"]=!0);function x(Q,j,K,Y){return T.has(Q)?w.map(ee=>{const ie=ee.with({path:`${ee.path!=="/"?ee.path:""}/${Q}`});return j.exists(ie).then(re=>{if(!!re)return K.read(ie,{acceptTextOnly:!0}).then(Y)},re=>{})}):[]}function H(Q){l.indexOf(Q)>-1&&(n["workspace.py."+Q]=!0);for(const j of c)Q.startsWith(j)&&(n["workspace.py."+j]=!0);n["workspace.py.any-azure"]||(n["workspace.py.any-azure"]=/azure/i.test(Q))}const W=x("requirements.txt",this.fileService,this.textFileService,Q=>{const j=(0,r.splitLines)(Q.value);for(const K of j){const Y=K.split("=="),ee=K.split(">="),ie=(Y.length===2?Y[0]:ee[0]).trim();H(ie)}}),U=x("pipfile",this.fileService,this.textFileService,Q=>{let j=(0,r.splitLines)(Q.value);j=j.slice(j.indexOf("[packages]")+1);for(const K of j){if(K.trim().indexOf("[")>-1)break;if(K.indexOf("=")===-1)continue;const Y=K.split("=")[0].trim();H(Y)}}),$=x("package.json",this.fileService,this.textFileService,Q=>{try{const j=JSON.parse(Q.value),K=Object.keys(j.dependencies||{}).concat(Object.keys(j.devDependencies||{}));for(const Y of K)if(Y.startsWith("react-native"))n["workspace.reactNative"]=!0;else if(Y==="tns-core-modules"||Y==="@nativescript/core")n["workspace.nativescript"]=!0;else if(f.indexOf(Y)>-1)n["workspace.npm."+Y]=!0;else for(const ee of i)Y.startsWith(ee)&&(n["workspace.npm."+ee]=!0)}catch{}}),q=x("pom.xml",this.fileService,this.textFileService,Q=>{try{let j;for(;j=u.MavenDependenciesRegex.exec(Q.value);){let K;for(;K=u.MavenDependencyRegex.exec(j[1]);){const Y=u.MavenGroupIdRegex.exec(K[1]),ee=u.MavenArtifactIdRegex.exec(K[1]);Y&&ee&&this.tagJavaDependency(Y[1],ee[1],"workspace.pom.",n)}}}catch{}}),X=x("build.gradle",this.fileService,this.textFileService,Q=>{try{this.processGradleDependencies(Q.value,u.GradleDependencyLooseRegex,n),this.processGradleDependencies(Q.value,u.GradleDependencyCompactRegex,n)}catch{}}),G=w.map(Q=>{const j=E.URI.joinPath(Q,"/app/src/main/AndroidManifest.xml");return this.fileService.exists(j).then(K=>{K&&(n["workspace.java.android"]=!0)},K=>{})});return Promise.all([...$,...W,...U,...q,...X,...G]).then(()=>n)})}processGradleDependencies(n,a,o){let g;for(;g=a.exec(n);){const h=g[1],v=g[2];h&&v&&this.tagJavaDependency(h,v,"workspace.gradle.",o)}}tagJavaDependency(n,a,o,g){for(const h of u.JavaLibrariesToLookFor)if((n===h.groupId||new RegExp(h.groupId).test(n))&&(a===h.artifactId||new RegExp(h.artifactId).test(a))){g[o+h.tag]=!0;return}}searchArray(n,a){return n.some(o=>o.search(a)>-1)||void 0}};s=we([F(0,p.IFileService),F(1,R.IWorkspaceContextService),F(2,A.IWorkbenchEnvironmentService),F(3,k.ITextFileService)],s),e.WorkspaceTagsService=s,(0,b.registerSingleton)(S.IWorkspaceTagsService,s,1)}),define(ae[968],le([1,0,36,6,144,123,2,60,52,709,14,18,68,13,9,72,1867,31,8,19,124,66,23,27,318,39,47,26,41,54,34,339,217,24,132,78,109,127,293,270,885,2390,930,931,48,7,391,32,154,321,22,62,25,12,118,71,43,45,928,51,69,91,107,106,185,104,5]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTaskService=e.ConfigureTaskAction=void 0;const ve="task.quickOpen.history",be="task.problemMatchers.neverPrompt",ge="task.quickOpen.showAll";var ue;(function(Pe){Pe.ID="workbench.action.tasks.configureTaskRunner",Pe.TEXT=c.localize(0,null)})(ue=e.ConfigureTaskAction||(e.ConfigureTaskAction={}));class Ce{constructor(fe){this._outputChannel=fe,this._validationStatus=new b.ValidationStatus}info(fe){this._validationStatus.state=1,this._outputChannel.append(fe+` `)}warn(fe){this._validationStatus.state=2,this._outputChannel.append(fe+` `)}error(fe){this._validationStatus.state=3,this._outputChannel.append(fe+` `)}fatal(fe){this._validationStatus.state=4,this._outputChannel.append(fe+` `)}get status(){return this._validationStatus}}class De{constructor(){this._store=new Map}forEach(fe){this._store.forEach(fe)}static getKey(fe){let ye;if(u.isString(fe))ye=fe;else{const ke=(0,Z.isWorkspaceFolder)(fe)?fe.uri:fe.configuration;ye=ke?ke.toString():""}return ye}get(fe){const ye=De.getKey(fe);let ke=this._store.get(ye);return ke||(ke=[],this._store.set(ye,ke)),ke}add(fe,...ye){const ke=De.getKey(fe);let Ee=this._store.get(ke);Ee||(Ee=[],this._store.set(ke,Ee)),Ee.push(...ye)}all(){const fe=[];return this._store.forEach(ye=>fe.push(...ye)),fe}}let Ae=class hi extends k.Disposable{constructor(fe,ye,ke,Ee,Te,_e,Re,Le,Me,Oe,Ke,We,Xe,Je,rt,je,Ue,Fe,He,Be,ze,nt,ut,ot,at,wt,It,_t,lt,pt,st,qe,Et,Tt,xt,At){super(),this._configurationService=fe,this._markerService=ye,this._outputService=ke,this._paneCompositeService=Ee,this._viewsService=Te,this._commandService=_e,this._editorService=Re,this._fileService=Le,this._contextService=Me,this._telemetryService=Oe,this._textFileService=Ke,this._modelService=We,this._extensionService=Xe,this._quickInputService=Je,this._configurationResolverService=rt,this._terminalService=je,this._terminalGroupService=Ue,this._storageService=Fe,this._progressService=He,this._openerService=Be,this._dialogService=ze,this._notificationService=nt,this._contextKeyService=ut,this._environmentService=ot,this._terminalProfileResolverService=at,this._pathService=wt,this._textModelResolverService=It,this._preferencesService=_t,this._viewDescriptorService=lt,this._workspaceTrustRequestService=pt,this._workspaceTrustManagementService=st,this._logService=qe,this._themeService=Et,this._lifecycleService=Tt,this._instantiationService=At,this._tasksReconnected=!1,this._taskSystemListeners=[],this._onDidReconnectToTerminals=new p.Emitter,this._onDidRegisterSupportedExecutions=new p.Emitter,this._onDidChangeTaskSystemInfo=new p.Emitter,this._willRestart=!1,this.onDidChangeTaskSystemInfo=this._onDidChangeTaskSystemInfo.event,this._workspaceTasksPromise=void 0,this._taskSystem=void 0,this._taskSystemListeners=void 0,this._outputChannel=this._outputService.getChannel(hi.OutputChannelId),this._providers=new Map,this._providerTypes=new Map,this._taskSystemInfos=new Map,this._register(this._contextService.onDidChangeWorkspaceFolders(()=>{const Nt=this._computeWorkspaceFolderSetup();return this.executionEngine!==Nt[2]&&(this._disposeTaskSystemListeners(),this._taskSystem=void 0),this._updateSetup(Nt),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=V.TASK_RUNNING_STATE.bindTo(ut),this._onDidStateChange=this._register(new p.Emitter),this._registerCommands().then(()=>z.TaskCommandsRegistered.bindTo(this._contextKeyService).set(!0)),z.ServerlessWebContext.bindTo(this._contextKeyService).set(S.isWeb&&!xt.getConnection()?.remoteAuthority),this._configurationResolverService.contributeVariable("defaultBuildTask",async()=>{let Nt=await this._getTasksForGroup(V.TaskGroup.Build);if(Nt.length>0){const{none:Ge,defaults:Ze}=this._splitPerGroupType(Nt);if(Ze.length===1)return Ze[0]._label;Ze.length+Ge.length>0&&(Nt=Ze.concat(Ge))}let kt;Nt&&Nt.length>0&&(kt=await this._showQuickPick(Nt,c.localize(2,null)));const Ne=kt?kt.task:void 0;if(!!Ne)return Ne._label}),this._lifecycleService.onBeforeShutdown(Nt=>{this._willRestart=Nt.reason!==3}),this._register(this.onDidStateChange(Nt=>{(this._willRestart||Nt.exitReason===me.TerminalExitReason.User)&&Nt.taskId?this.removePersistentTask(Nt.taskId):Nt.kind==="start"&&Nt.__task&&Nt.__task.getWorkspaceFolder()&&this._setPersistentTask(Nt.__task)})),this._waitForSupportedExecutions=new Promise(Nt=>{(0,Q.once)(this._onDidRegisterSupportedExecutions.event)(()=>Nt())}),this._terminalService.getReconnectedTerminals("Task")?.length?this._attemptTaskReconnection():this._register(this._terminalService.onDidChangeConnectionState(()=>{this._terminalService.getReconnectedTerminals("Task")?.length&&this._attemptTaskReconnection()})),this._upgrade()}registerSupportedExecutions(fe,ye,ke){fe!==void 0&&z.CustomExecutionSupportedContext.bindTo(this._contextKeyService).set(fe);const Ee=!!oe.VirtualWorkspaceContext.getValue(this._contextKeyService);ye!==void 0&&z.ShellExecutionSupportedContext.bindTo(this._contextKeyService).set(ye&&!Ee),ke!==void 0&&z.ProcessExecutionSupportedContext.bindTo(this._contextKeyService).set(ke&&!Ee),this._onDidRegisterSupportedExecutions.fire()}_attemptTaskReconnection(){if(this._lifecycleService.startupKind!==3&&(this._tasksReconnected=!0,this._storageService.remove(hi.PersistentTasks_Key,1)),!this._configurationService.getValue("task.reconnection")||this._tasksReconnected){this._tasksReconnected=!0;return}this._getTaskSystem(),this._waitForSupportedExecutions.then(()=>{this.getWorkspaceTasks().then(async()=>{this._tasksReconnected=await this._reconnectTasks()})})}async _reconnectTasks(){const fe=await this.getSavedTasks("persistent");if(!fe.length)return!0;for(const ye of fe)if(V.ConfiguringTask.is(ye)){const ke=await this.tryResolveTask(ye);ke&&this.run(ke,void 0,4)}else this.run(ye,void 0,4);return!0}get onDidStateChange(){return this._onDidStateChange.event}get onDidReconnectToTerminals(){return this._onDidReconnectToTerminals.event}get supportsMultipleTaskExecutions(){return this.inTerminal()}async _registerCommands(){l.CommandsRegistry.registerCommand({id:"workbench.action.tasks.runTask",handler:async(fe,ye)=>{await this._trust()&&this._runTaskCommand(ye)},description:{description:"Run Task",args:[{name:"args",isOptional:!0,description:c.localize(3,null),schema:{anyOf:[{type:"string",description:c.localize(4,null)},{type:"object",properties:{type:{type:"string",description:c.localize(5,null)},task:{type:"string",description:c.localize(6,null)}}}]}}]}}),l.CommandsRegistry.registerCommand("workbench.action.tasks.reRunTask",async(fe,ye)=>{await this._trust()&&this._reRunTaskCommand()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.restartTask",async(fe,ye)=>{await this._trust()&&this._runRestartTaskCommand(ye)}),l.CommandsRegistry.registerCommand("workbench.action.tasks.terminate",async(fe,ye)=>{await this._trust()&&this._runTerminateCommand(ye)}),l.CommandsRegistry.registerCommand("workbench.action.tasks.showLog",()=>{this._showOutput()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.build",async()=>{await this._trust()&&this._runBuildCommand()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.test",async()=>{await this._trust()&&this._runTestCommand()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.configureTaskRunner",async()=>{await this._trust()&&this._runConfigureTasks()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.configureDefaultBuildTask",async()=>{await this._trust()&&this._runConfigureDefaultBuildTask()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.configureDefaultTestTask",async()=>{await this._trust()&&this._runConfigureDefaultTestTask()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.showTasks",async()=>{if(await this._trust())return this.runShowTasks()}),l.CommandsRegistry.registerCommand("workbench.action.tasks.toggleProblems",()=>this._commandService.executeCommand(_.Markers.TOGGLE_MARKERS_VIEW_ACTION_ID)),l.CommandsRegistry.registerCommand("workbench.action.tasks.openUserTasks",async()=>{const fe=this._getResourceForKind(V.TaskSourceKind.User);fe&&this._openTaskFile(fe,V.TaskSourceKind.User)}),l.CommandsRegistry.registerCommand("workbench.action.tasks.openWorkspaceFileTasks",async()=>{const fe=this._getResourceForKind(V.TaskSourceKind.WorkspaceFile);fe&&this._openTaskFile(fe,V.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(hi.IgnoreTask010DonotShowAgain_key,1,!1)),this._showIgnoreMessage}_getActivationEvents(fe){const ye=[];if(ye.push("onCommand:workbench.action.tasks.runTask"),fe)ye.push(`onTaskType:${fe}`);else for(const ke of X.TaskDefinitionRegistry.all())ye.push(`onTaskType:${ke.taskType}`);return ye}async _activateTaskProviders(fe){await this._extensionService.whenInstalledExtensionsRegistered(),await Promise.all(this._getActivationEvents(fe).map(ye=>this._extensionService.activateByEvent(ye)))}_updateSetup(fe){if(fe||(fe=this._computeWorkspaceFolderSetup()),this._workspaceFolders=fe[0],this._ignoredWorkspaceFolders)if(this._ignoredWorkspaceFolders.length!==fe[1].length)this._showIgnoreMessage=void 0;else{const ye=new Set;this._ignoredWorkspaceFolders.forEach(ke=>ye.add(ke.uri.toString()));for(const ke of fe[1])if(!ye.has(ke.uri.toString())){this._showIgnoreMessage=void 0;break}}this._ignoredWorkspaceFolders=fe[1],this._executionEngine=fe[2],this._schemaVersion=fe[3],this._workspace=fe[4]}_showOutput(fe=1){!oe.VirtualWorkspaceContext.getValue(this._contextKeyService)&&(fe===1||fe===3)&&this._notificationService.prompt(r.default.Warning,c.localize(7,null),[{label:c.localize(8,null),run:()=>{this._outputService.showChannel(this._outputChannel.id,!0)}}])}_disposeTaskSystemListeners(){this._taskSystemListeners&&((0,k.dispose)(this._taskSystemListeners),this._taskSystemListeners=void 0)}registerTaskProvider(fe,ye){if(!fe)return{dispose:()=>{}};const ke=hi._nextHandle++;return this._providers.set(ke,fe),this._providerTypes.set(ke,ye),{dispose:()=>{this._providers.delete(ke),this._providerTypes.delete(ke)}}}get hasTaskSystemInfo(){const fe=Array.from(this._taskSystemInfos.values()).flat().length;return this._environmentService.remoteAuthority?fe>1:fe>0}registerTaskSystem(fe,ye){if(ye.platform===0&&(fe=this.workspaceFolders.length?this.workspaceFolders[0].uri.scheme:fe),!this._taskSystemInfos.has(fe))this._taskSystemInfos.set(fe,[ye]);else{const ke=this._taskSystemInfos.get(fe);ye.platform===0?ke.push(ye):ke.unshift(ye)}this.hasTaskSystemInfo&&this._onDidChangeTaskSystemInfo.fire()}_getTaskSystemInfo(fe){const ye=this._taskSystemInfos.get(fe);return ye&&ye.length?ye[0]:void 0}extensionCallbackTaskComplete(fe,ye){return this._taskSystem?this._taskSystem.customExecutionComplete(fe,ye):Promise.resolve()}async _findWorkspaceTasks(fe){const ye=[],ke=await this.getWorkspaceTasks();for(const[,Ee]of ke){if(Ee.configurations)for(const Te in Ee.configurations.byIdentifier){const _e=Ee.configurations.byIdentifier[Te];fe(_e,Ee.workspaceFolder)&&ye.push(_e)}if(Ee.set)for(const Te of Ee.set.tasks)fe(Te,Ee.workspaceFolder)&&ye.push(Te)}return ye}async _findWorkspaceTasksInGroup(fe,ye){return this._findWorkspaceTasks(ke=>{const Ee=ke.configurationProperties.group;return Ee&&typeof Ee!="string"?Ee._id===fe._id&&(!ye||!!Ee.isDefault):!1})}async getTask(fe,ye,ke=!1){if(!await this._trust())return;const Ee=u.isString(fe)?fe:(0,Z.isWorkspaceFolder)(fe)?fe.name:fe.configuration?C.basename(fe.configuration):void 0;if(this.ignoredWorkspaceFolders.some(Oe=>Oe.name===Ee))return Promise.reject(new Error(c.localize(9,null,Ee)));const Te=u.isString(ye)?ye:V.TaskDefinition.createTaskIdentifier(ye,console);if(Te===void 0)return Promise.resolve(void 0);const _e=De.getKey(fe),Re=await this._findWorkspaceTasks((Oe,Ke)=>{const We=De.getKey(Ke);return We!==_e&&We!==V.USER_TASKS_GROUP_KEY?!1:Oe.matches(Te,ke)});if(Re.sort(Oe=>Oe._source.kind===V.TaskSourceKind.Extension?1:-1),Re.length>0){const Oe=Re[0];return V.ConfiguringTask.is(Oe)?this.tryResolveTask(Oe):Oe}const Le=await this._getGroupedTasks();let Me=Le.get(fe);if(Me=Me.concat(Le.get(V.USER_TASKS_GROUP_KEY)),!!Me)return Me=Me.filter(Oe=>Oe.matches(Te,ke)).sort(Oe=>Oe._source.kind===V.TaskSourceKind.Extension?1:-1),Me.length>0?Me[0]:void 0}async tryResolveTask(fe){if(!await this._trust())return;await this._activateTaskProviders(fe.type);let ye,ke=!1;for(const[Te,_e]of this._providers){const Re=this._providerTypes.get(Te);if(fe.type===Re){if(Re&&!this._isTaskProviderEnabled(Re)){ke=!0;continue}ye=_e;break}}if(!ye){ke&&this._outputChannel.append(c.localize(10,null,fe.configures.type));return}try{const Te=await ye.resolveTask(fe);if(Te&&Te._id===fe._id)return W.createCustomTask(Te,fe)}catch{}const Ee=await this.tasks({type:fe.type});for(const Te of Ee)if(Te._id===fe._id)return W.createCustomTask(Te,fe)}async tasks(fe){return await this._trust()?this._versionAndEngineCompatible(fe)?this._getGroupedTasks(fe).then(ye=>{if(!fe||!fe.type)return ye.all();const ke=[];return ye.forEach(Ee=>{for(const Te of Ee)if(V.ContributedTask.is(Te)&&(Te.defines.type===fe.type||Te._source.label===fe.type))ke.push(Te);else if(V.CustomTask.is(Te))if(Te.type===fe.type)ke.push(Te);else{const _e=Te.customizes();_e&&_e.type===fe.type&&ke.push(Te)}}),ke}):Promise.resolve([]):[]}taskTypes(){const fe=[];if(this._isProvideTasksEnabled())for(const ye of X.TaskDefinitionRegistry.all())this._isTaskProviderEnabled(ye.taskType)&&fe.push(ye.taskType);return fe}createSorter(){return new V.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 fe=this._configurationService.getValue(ve);this._recentlyUsedTasksV1=new E.LRUCache(fe);const ye=this._storageService.get(hi.RecentlyUsedTasks_Key,1);if(ye)try{const ke=JSON.parse(ye);if(Array.isArray(ke))for(const Ee of ke)this._recentlyUsedTasksV1.set(Ee,Ee)}catch{}return this._recentlyUsedTasksV1}_getTasksFromStorage(fe){return fe==="persistent"?this._getPersistentTasks():this._getRecentTasks()}_getRecentTasks(){if(this._recentlyUsedTasks)return this._recentlyUsedTasks;const fe=this._configurationService.getValue(ve);this._recentlyUsedTasks=new E.LRUCache(fe);const ye=this._storageService.get(hi.RecentlyUsedTasks_KeyV2,1);if(ye)try{const ke=JSON.parse(ye);if(Array.isArray(ke))for(const Ee of ke)this._recentlyUsedTasks.set(Ee[0],Ee[1])}catch{}return this._recentlyUsedTasks}_getPersistentTasks(){if(this._persistentTasks)return this._persistentTasks;this._persistentTasks=new E.LRUCache(10);const fe=this._storageService.get(hi.PersistentTasks_Key,1);if(fe)try{const ye=JSON.parse(fe);if(Array.isArray(ye))for(const ke of ye)this._persistentTasks.set(ke[0],ke[1])}catch{}return this._persistentTasks}_getFolderFromTaskKey(fe){const ye=JSON.parse(fe);return{folder:ye.folder,isWorkspaceFile:ye.id?.endsWith(V.TaskSourceKind.WorkspaceFile)}}async getSavedTasks(fe){const ye=Object.create(null);this.workspaceFolders.forEach(Oe=>{ye[Oe.uri.toString()]=Oe});const ke=new Map,Ee=new Map,Te=this._getTasksFromStorage(fe),_e=[];function Re(Oe,Ke,We){Ke&&!Oe.has(Ke)&&Oe.set(Ke,[]),Ke&&(ye[Ke]||Ke===V.USER_TASKS_GROUP_KEY)&&We&&Oe.get(Ke).push(We)}for(const Oe of Te.entries()){const Ke=Oe[0],We=JSON.parse(Oe[1]),Xe=this._getFolderFromTaskKey(Ke);Re(Xe.isWorkspaceFile?Ee:ke,Xe.folder,We)}const Le=new Map;async function Me(Oe,Ke,We){for(const Xe of Ke.keys()){const Je=[],rt=Object.create(null),je=ye[Xe]?We?W.TaskConfigSource.WorkspaceFile:W.TaskConfigSource.TasksJson:W.TaskConfigSource.User;await Oe._computeTasksForSingleConfig(ye[Xe]??await Oe._getAFolder(),{version:"2.0.0",tasks:Ke.get(Xe)},0,Je,rt,je,!0),Je.forEach(Ue=>{const Fe=Ue.getRecentlyUsedKey();Fe&&Le.set(Fe,Ue)});for(const Ue in rt){const Fe=rt[Ue].getRecentlyUsedKey();Fe&&Le.set(Fe,rt[Ue])}}}await Me(this,ke,!1),await Me(this,Ee,!0);for(const Oe of Te.keys())Le.has(Oe)&&_e.push(Le.get(Oe));return _e}removeRecentlyUsedTask(fe){this._getTasksFromStorage("historical").has(fe)&&(this._getTasksFromStorage("historical").delete(fe),this._saveRecentlyUsedTasks())}removePersistentTask(fe){this._getTasksFromStorage("persistent").has(fe)&&(this._getTasksFromStorage("persistent").delete(fe),this._savePersistentTasks())}_setTaskLRUCacheLimit(){const fe=this._configurationService.getValue(ve);this._recentlyUsedTasks&&(this._recentlyUsedTasks.limit=fe)}async _setRecentlyUsedTask(fe){let ye=fe.getRecentlyUsedKey();if(!V.InMemoryTask.is(fe)&&ye){const ke=this._createCustomizableTask(fe);if(V.ContributedTask.is(fe)&&ke){const Ee=[],Te=Object.create(null);await this._computeTasksForSingleConfig(fe._source.workspaceFolder??this.workspaceFolders[0],{version:"2.0.0",tasks:[ke]},0,Ee,Te,W.TaskConfigSource.TasksJson,!0);for(const _e in Te)ye=Te[_e].getRecentlyUsedKey()}this._getTasksFromStorage("historical").set(ye,JSON.stringify(ke)),this._saveRecentlyUsedTasks()}}_saveRecentlyUsedTasks(){if(!this._recentlyUsedTasks)return;const fe=this._configurationService.getValue(ve);if(fe===0)return;let ye=[...this._recentlyUsedTasks.keys()];ye.length>fe&&(ye=ye.slice(0,fe));const ke=[];for(const Ee of ye)ke.push([Ee,this._recentlyUsedTasks.get(Ee,0)]);this._storageService.store(hi.RecentlyUsedTasks_KeyV2,JSON.stringify(ke),1,0)}async _setPersistentTask(fe){if(!this._configurationService.getValue("task.reconnection"))return;let ye=fe.getRecentlyUsedKey();if(!V.InMemoryTask.is(fe)&&ye){const ke=this._createCustomizableTask(fe);if(V.ContributedTask.is(fe)&&ke){const Ee=[],Te=Object.create(null);await this._computeTasksForSingleConfig(fe._source.workspaceFolder??this.workspaceFolders[0],{version:"2.0.0",tasks:[ke]},0,Ee,Te,W.TaskConfigSource.TasksJson,!0);for(const _e in Te)ye=Te[_e].getRecentlyUsedKey()}if(!fe.configurationProperties.isBackground)return;this._getTasksFromStorage("persistent").set(ye,JSON.stringify(ke)),this._savePersistentTasks()}}_savePersistentTasks(){if(!this._persistentTasks)return;const fe=[...this._persistentTasks.keys()],ye=[];for(const ke of fe)ye.push([ke,this._persistentTasks.get(ke,0)]);this._storageService.store(hi.PersistentTasks_Key,JSON.stringify(ye),1,0)}_openDocumentation(){this._openerService.open(i.URI.parse("https://code.visualstudio.com/docs/editor/tasks#_defining-a-problem-matcher"))}async _findSingleWorkspaceTaskOfGroup(fe){const ye=await this._findWorkspaceTasksInGroup(fe,!0);if(ye.length===1&&typeof ye[0].configurationProperties.group!="string"&&ye[0].configurationProperties.group?.isDefault){let ke;if(V.ConfiguringTask.is(ye[0])?ke=await this.tryResolveTask(ye[0]):ke=ye[0],ke)return this.run(ke,void 0,1)}}async _build(){const fe=await this._findSingleWorkspaceTaskOfGroup(V.TaskGroup.Build);return fe||this._getGroupedTasksAndExecute()}async _runTest(){const fe=await this._findSingleWorkspaceTaskOfGroup(V.TaskGroup.Test);return fe||this._getGroupedTasksAndExecute(!0)}async _getGroupedTasksAndExecute(fe){const ye=await this._getGroupedTasks(),ke=this._createRunnableTask(ye,fe?V.TaskGroup.Test:V.TaskGroup.Build);if(!ke||!ke.task)throw fe?this.schemaVersion===1?new x.TaskError(r.default.Info,c.localize(11,null),3):new x.TaskError(r.default.Info,c.localize(12,null),3):this.schemaVersion===1?new x.TaskError(r.default.Info,c.localize(13,null),2):new x.TaskError(r.default.Info,c.localize(14,null),2);let Ee;try{Ee=await this._executeTask(ke.task,ke.resolver,1)}catch(Te){return this._handleError(Te),Promise.reject(Te)}return Ee}async run(fe,ye,ke=0){if(!await this._trust())return;if(!fe)throw new x.TaskError(r.default.Info,c.localize(15,null),5);const Ee=this._createResolver();let Te;try{if(ye&&ye.attachProblemMatcher&&this._shouldAttachProblemMatcher(fe)&&!V.InMemoryTask.is(fe)){const _e=await this._attachProblemMatcher(fe);_e&&(Te=await this._executeTask(_e,Ee,ke))}else Te=await this._executeTask(fe,Ee,ke);return Te}catch(_e){return this._handleError(_e),Promise.reject(_e)}}_isProvideTasksEnabled(){return this._configurationService.getValue("task.autoDetect")==="on"}_isProblemMatcherPromptEnabled(fe){const ye=this._configurationService.getValue(be);return u.isBoolean(ye)?!ye:fe===void 0?!0:!ye[fe]}_getTypeForTask(fe){let ye;return V.CustomTask.is(fe)?ye=fe._source.config.element.type:ye=fe.getDefinition().type,ye}_shouldAttachProblemMatcher(fe){return this._isProblemMatcherPromptEnabled(this._getTypeForTask(fe))===!1||!this._canCustomize(fe)||fe.configurationProperties.group!==void 0&&fe.configurationProperties.group!==V.TaskGroup.Build||fe.configurationProperties.problemMatchers!==void 0&&fe.configurationProperties.problemMatchers.length>0?!1:V.ContributedTask.is(fe)?!fe.hasDefinedMatchers&&!!fe.configurationProperties.problemMatchers&&fe.configurationProperties.problemMatchers.length===0:V.CustomTask.is(fe)?fe._source.config.element.problemMatcher===void 0&&!fe.hasDefinedMatchers:!1}async _updateNeverProblemMatcherSetting(fe){const ye=this._configurationService.getValue(be);if(ye===!0)return;let ke;return ye!==!1?ke=ye:ke=Object.create(null),ke[fe]=!0,this._configurationService.updateValue(be,ke)}async _attachProblemMatcher(fe){let ye=[];for(const Te of h.ProblemMatcherRegistry.keys()){const _e=h.ProblemMatcherRegistry.get(Te);_e.deprecated||(_e.name===_e.label?ye.push({label:_e.name,matcher:_e}):ye.push({label:_e.label,description:`$${_e.name}`,matcher:_e}))}if(ye.length===0)return;ye=ye.sort((Te,_e)=>Te.label&&_e.label?Te.label.localeCompare(_e.label):0),ye.unshift({type:"separator",label:c.localize(16,null)});let ke;V.CustomTask.is(fe)?ke=fe._source.config.element.type:ke=fe.getDefinition().type,ye.unshift({label:c.localize(17,null),matcher:void 0},{label:c.localize(18,null),matcher:void 0,never:!0},{label:c.localize(19,null,ke),matcher:void 0,setting:ke},{label:c.localize(20,null),matcher:void 0,learnMore:!0});const Ee=await this._quickInputService.pick(ye,{placeHolder:c.localize(21,null)});if(!Ee)return fe;if(Ee.learnMore){this._openDocumentation();return}if(Ee.never)return this.customize(fe,{problemMatcher:[]},!0),fe;if(Ee.matcher){const Te=fe.clone(),_e=`$${Ee.matcher.name}`,Re={problemMatcher:[_e]};Te.configurationProperties.problemMatchers=[_e];const Le=h.ProblemMatcherRegistry.get(Ee.matcher.name);return Le&&Le.watching!==void 0&&(Re.isBackground=!0,Te.configurationProperties.isBackground=!0),this.customize(fe,Re,!0),Te}return Ee.setting&&await this._updateNeverProblemMatcherSetting(Ee.setting),fe}async _getTasksForGroup(fe){const ye=await this._getGroupedTasks(),ke=[];return ye.forEach(Ee=>{for(const Te of Ee)V.TaskGroup.from(Te.configurationProperties.group)?._id===fe._id&&ke.push(Te)}),ke}needsFolderQualification(){return this._contextService.getWorkbenchState()===3}_canCustomize(fe){return this.schemaVersion!==2?!1:V.CustomTask.is(fe)?!0:V.ContributedTask.is(fe)?!!fe.getWorkspaceFolder():!1}async _formatTaskForJson(fe,ye){let ke,Ee="";try{ke=await this._textModelResolverService.createModelReference(fe);const Te=ke.object.textEditorModel,{tabSize:_e,insertSpaces:Re}=Te.getOptions(),Le=Te.getEOL();let Me=(0,j.toFormattedString)(ye,{eol:Le,tabSize:_e,insertSpaces:Re});const Oe=new RegExp(Le+(Re?" ".repeat(_e):"\\t"),"g");Me=Me.replace(Oe,Le+(Re?" ".repeat(_e*3):" "));const Ke=Re?" ".repeat(_e*2):" ";Ee=Ke+Me.slice(0,Me.length-1)+Ke+Me.slice(Me.length-1)}finally{ke?.dispose()}return Ee}async _openEditorAtTask(fe,ye,ke=-1){if(fe===void 0)return Promise.resolve(!1);const Te=(await this._fileService.readFile(fe)).value;if(!Te||!ye)return!1;const _e=Te.toString();let Re;if(ke!==-1){const We=this._configurationService.getValue("tasks",{resource:fe});We.tasks&&We.tasks.length>ke&&(Re=await this._formatTaskForJson(fe,We.tasks[ke]))}Re||(typeof ye=="string"?Re=ye:Re=await this._formatTaskForJson(fe,ye));const Le=_e.indexOf(Re);let Me=1;for(let We=0;We<Le;We++)_e.charAt(We)===` `&&Me++;let Oe=Me;for(let We=0;We<Re.length;We++)Re.charAt(We)===` `&&Oe++;const Ke=Me>1?{startLineNumber:Me,startColumn:Me===Oe?4:3,endLineNumber:Oe,endColumn:Me===Oe?void 0:4}:void 0;return await this._editorService.openEditor({resource:fe,options:{pinned:!1,forceReload:!0,selection:Ke,selectionRevealType:1}}),!!Ke}_createCustomizableTask(fe){let ye;const ke=V.CustomTask.is(fe)||V.ConfiguringTask.is(fe)?fe._source.config:void 0;if(ke&&ke.element)ye={...ke.element};else if(V.ContributedTask.is(fe)){ye={};const Ee=Object.assign(Object.create(null),fe.defines);delete Ee._key,Object.keys(Ee).forEach(Te=>ye[Te]=Ee[Te]),fe.configurationProperties.problemMatchers&&fe.configurationProperties.problemMatchers.length>0&&u.isStringArray(fe.configurationProperties.problemMatchers)&&(ye.problemMatcher=fe.configurationProperties.problemMatchers),fe.configurationProperties.group&&(ye.group=W.GroupKind.to(fe.configurationProperties.group))}if(!!ye)return(ye.problemMatcher===void 0&&fe.configurationProperties.problemMatchers===void 0||fe.configurationProperties.problemMatchers&&fe.configurationProperties.problemMatchers.length===0)&&(ye.problemMatcher=[]),fe._source.label!=="Workspace"?ye.label=fe.configurationProperties.identifier:ye.label=fe._label,ye.detail=fe.configurationProperties.detail,ye}async customize(fe,ye,ke){if(!await this._trust())return;const Ee=fe.getWorkspaceFolder();if(!Ee)return Promise.resolve(void 0);const Te=this._getConfiguration(Ee,fe._source.kind);if(Te.hasParseErrors)return this._notificationService.warn(c.localize(22,null)),Promise.resolve(void 0);const _e=Te.config,Re=this._createCustomizableTask(fe);if(!Re)return Promise.resolve(void 0);const Le=V.CustomTask.is(fe)?fe._source.config.index:void 0;if(ye)for(const Me of Object.getOwnPropertyNames(ye)){const Oe=ye[Me];Oe!=null&&(Re[Me]=Oe)}if(_e)Le===-1&&ye?ye.problemMatcher!==void 0?(_e.problemMatcher=ye.problemMatcher,await this._writeConfiguration(Ee,"tasks.problemMatchers",_e.problemMatcher,fe._source.kind)):ye.group!==void 0&&(_e.group=ye.group,await this._writeConfiguration(Ee,"tasks.group",_e.group,fe._source.kind)):(Array.isArray(_e.tasks)||(_e.tasks=[]),Le===void 0?_e.tasks.push(Re):_e.tasks[Le]=Re,await this._writeConfiguration(Ee,"tasks.tasks",_e.tasks,fe._source.kind));else{const Me={version:"2.0.0",tasks:[Re]};let Oe=["{",c.localize(23,null)].join(` `)+JSON.stringify(Me,null," ").substr(1);const Ke=this._configurationService.getValue();Ke.editor.insertSpaces&&(Oe=Oe.replace(/(\n)(\t+)/g,(We,Xe,Je)=>Xe+" ".repeat(Je.length*Ke.editor.tabSize))),await this._textFileService.create([{resource:Ee.toResource(".vscode/tasks.json"),value:Oe}])}ke&&this._openEditorAtTask(this._getResourceForTask(fe),Re)}_writeConfiguration(fe,ye,ke,Ee){let Te;switch(Ee){case V.TaskSourceKind.User:Te=2;break;case V.TaskSourceKind.WorkspaceFile:Te=5;break;default:this._contextService.getWorkbenchState()===2?Te=5:this._contextService.getWorkbenchState()===3&&(Te=6)}if(Te)return this._configurationService.updateValue(ye,ke,{resource:fe.uri},Te)}_getResourceForKind(fe){switch(this._updateSetup(),fe){case V.TaskSourceKind.User:return C.joinPath(C.dirname(this._preferencesService.userSettingsResource),"tasks.json");case V.TaskSourceKind.WorkspaceFile:if(this._workspace&&this._workspace.configuration)return this._workspace.configuration;default:return}}_getResourceForTask(fe){if(V.CustomTask.is(fe)){let ye=this._getResourceForKind(fe._source.kind);if(!ye){const ke=fe.getWorkspaceFolder();ke?ye=ke.toResource(fe._source.config.file):ye=this.workspaceFolders[0].uri}return ye}else return fe.getWorkspaceFolder().toResource(".vscode/tasks.json")}async openConfig(fe){let ye;return fe?ye=this._getResourceForTask(fe):ye=this._workspaceFolders&&this._workspaceFolders.length>0?this._workspaceFolders[0].toResource(".vscode/tasks.json"):void 0,this._openEditorAtTask(ye,fe?fe._label:void 0,fe?fe._source.config.index:-1)}_createRunnableTask(fe,ye){const ke=new Map,Ee=[],Te=[];fe.forEach((Re,Le)=>{let Me=ke.get(Le);Me||(Me={id:new Map,label:new Map,identifier:new Map},ke.set(Le,Me));for(const Oe of Re)Me.id.set(Oe._id,Oe),Me.label.set(Oe._label,Oe),Oe.configurationProperties.identifier&&Me.identifier.set(Oe.configurationProperties.identifier,Oe),ye&&Oe.configurationProperties.group===ye&&(Oe._source.kind===V.TaskSourceKind.Workspace?Ee.push(Oe):Te.push(Oe))});const _e={resolve:async(Re,Le)=>{const Me=ke.get(typeof Re=="string"?Re:Re.toString());if(!!Me)return Me.id.get(Le)||Me.label.get(Le)||Me.identifier.get(Le)}};if(Ee.length>0)return Ee.length>1&&this._outputChannel.append(c.localize(24,null)),{task:Ee[0],resolver:_e};if(Te.length!==0){if(Te.length===1)return{task:Te[0],resolver:_e};{const Re=f.generateUuid();return{task:new V.InMemoryTask(Re,{kind:V.TaskSourceKind.InMemory,label:"inMemory"},Re,"inMemory",{reevaluateOnRerun:!0},{identifier:Re,dependsOn:Te.map(Me=>({uri:Me.getWorkspaceFolder().uri,task:Me._id})),name:Re}),resolver:_e}}}}_createResolver(fe){let ye;async function ke(_e,Re,Le){const Me=await _e._findWorkspaceTasks(Ke=>{const We=V.ConfiguringTask.is(Ke)||V.CustomTask.is(Ke)?Ke._source.config.workspaceFolder?.uri:void 0,Xe=typeof Re=="string"?Re:Re.toString();if(We?.toString()!==Xe)return!1;if(u.isString(Le))return Ke._label===Le||Ke.configurationProperties.identifier===Le;{const Je=Ke.getDefinition(!0),rt=V.TaskDefinition.createTaskIdentifier(Le,console);return rt&&Je?rt._key===Je._key:!1}});if(Me.length===0)return;const Oe=Me[0];return V.ConfiguringTask.is(Oe)?_e.tryResolveTask(Oe):Oe}async function Ee(_e){return ye===void 0&&(ye=new Map,(fe||await _e._getGroupedTasks()).forEach((Re,Le)=>{let Me=ye.get(Le);Me||(Me={label:new Map,identifier:new Map,taskIdentifier:new Map},ye.set(Le,Me));for(const Oe of Re){Me.label.set(Oe._label,Oe),Oe.configurationProperties.identifier&&Me.identifier.set(Oe.configurationProperties.identifier,Oe);const Ke=Oe.getDefinition(!0);Ke!==void 0&&Me.taskIdentifier.set(Ke._key,Oe)}})),ye}async function Te(_e,Re,Le){const Oe=(await Ee(_e)).get(typeof Re=="string"?Re:Re.toString());if(!!Oe){if(u.isString(Le))return Oe.label.get(Le)||Oe.identifier.get(Le);{const Ke=V.TaskDefinition.createTaskIdentifier(Le,console);return Ke!==void 0?Oe.taskIdentifier.get(Ke._key):void 0}}}return{resolve:async(_e,Re)=>{if(!!Re)return ye===void 0&&fe===void 0?await ke(this,_e,Re)??Te(this,_e,Re):Te(this,_e,Re)}}}async _saveBeforeRun(){let fe;(function(ke){ke.Always="always",ke.Never="never",ke.Prompt="prompt"})(fe||(fe={}));const ye=this._configurationService.getValue("task.saveBeforeRun");return ye===fe.Never||ye===fe.Prompt&&this._editorService.editors.some(ke=>ke.isDirty())&&(await this._dialogService.show(r.default.Info,c.localize(25,null),[c.localize(26,null),c.localize(27,null)],{detail:c.localize(28,null),cancelId:1})).choice!==0?!1:(await this._editorService.saveAll({reason:2}),!0)}async _executeTask(fe,ye,ke){let Ee=fe;if(await this._saveBeforeRun()){await this._configurationService.reloadConfiguration(),await this._updateWorkspaceTasks();const _e=fe.getWorkspaceFolder(),Re=fe.configurationProperties.identifier;Ee=(_e&&Re&&ke===1?await this.getTask(_e,Re):fe)??fe}await h.ProblemMatcherRegistry.onReady();const Te=ke===4?this._getTaskSystem().reconnect(Ee,ye):this._getTaskSystem().run(Ee,ye);return Te?this._handleExecuteResult(Te,ke):{exitCode:0}}async _handleExecuteResult(fe,ye){if(ye===1&&await this._setRecentlyUsedTask(fe.task),fe.kind===2){const ke=fe.active;if(ke&&ke.same)if(this._taskSystem?.isTaskVisible(fe.task)){const Ee=c.localize(29,null,fe.task.getQualifiedLabel()),Te=this._getTaskSystem().getLastInstance(fe.task)??fe.task;this._notificationService.prompt(r.default.Warning,Ee,[{label:c.localize(30,null),run:()=>this.terminate(Te)},{label:c.localize(31,null),run:()=>this._restart(Te)}],{sticky:!0})}else this._taskSystem?.revealTask(fe.task);else throw new x.TaskError(r.default.Warning,c.localize(32,null),1)}return this._setRecentlyUsedTask(fe.task),fe.promise}async _restart(fe){if(!this._taskSystem)return;if((await this._taskSystem.terminate(fe)).success)try{await this.run(fe)}catch{}else this._notificationService.warn(c.localize(33,null,u.isString(fe)?fe:fe.configurationProperties.name))}async terminate(fe){return await this._trust()?this._taskSystem?this._taskSystem.terminate(fe):{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._contextService,this._environmentService,hi.OutputChannelId,this._fileService,this._terminalProfileResolverService,this._pathService,this._viewDescriptorService,this._logService,this._configurationService,this._notificationService,this,this._instantiationService,fe=>{if(fe)return this._getTaskSystemInfo(fe.uri.scheme);if(this._taskSystemInfos.size>0){const ye=Array.from(this._taskSystemInfos.entries()),ke=ye.filter(Ee=>Ee[0]!==K.Schemas.file);return ke.length>0?ke[0][1][0]:ye[0][1][0]}else return})}_isTaskProviderEnabled(fe){const ye=X.TaskDefinitionRegistry.get(fe);return!ye||!ye.when||this._contextKeyService.contextMatchesRules(ye.when)}async _getGroupedTasks(fe){const ye=fe?.type,ke=this._needsRecentTasksMigration();await this._activateTaskProviders(fe?.type);const Ee=Object.create(null);X.TaskDefinitionRegistry.all().forEach(Le=>Ee[Le.taskType]=!0),Ee.shell=!0,Ee.process=!0;const Te=await new Promise(Le=>{const Me=[];let Oe=0;const Ke=Xe=>{Xe&&Me.push(Xe),--Oe===0&&Le(Me)},We=Xe=>{try{Xe&&u.isString(Xe.message)?(this._outputChannel.append("Error: "),this._outputChannel.append(Xe.message),this._outputChannel.append(` `),this._showOutput()):(this._outputChannel.append(`Unknown error received while collecting tasks from providers. `),this._showOutput())}finally{--Oe===0&&Le(Me)}};if(this._isProvideTasksEnabled()&&this.schemaVersion===2&&this._providers.size>0){let Xe=!1;for(const[Je,rt]of this._providers){const je=this._providerTypes.get(Je);if(ye===void 0||ye===je){if(je&&!this._isTaskProviderEnabled(je))continue;Xe=!0,Oe++,rt.provideTasks(Ee).then(Ue=>{for(const Fe of Ue.tasks)if(Fe.type!==this._providerTypes.get(Je)){this._outputChannel.append(c.localize(34,null,this._providerTypes.get(Je),Fe.type)),Fe.type!=="shell"&&Fe.type!=="process"&&this._showOutput();break}return Ke(Ue)},We)}}Xe||Le(Me)}else Le(Me)}),_e=new De,Re=new De;for(const Le of Te)for(const Me of Le.tasks){const Oe=Me.getWorkspaceFolder();Oe&&Re.add(Oe,Me)}try{const Le=await this.getWorkspaceTasks(),Oe=Array.from(Le).map(async([Ke,We])=>{const Xe=Re.get(Ke);if(!We.set){Xe&&_e.add(Ke,...Xe);return}if(this._contextService.getWorkbenchState()===1)_e.add(Ke,...We.set.tasks);else{const Je=We.configurations,rt=We.set?this._getLegacyTaskConfigurations(We.set):void 0,je=[];if(Je||rt){const Ue=new Set;Je&&Object.keys(Je.byIdentifier).forEach(Be=>Ue.add(Be));for(const Be of Xe)if(!!V.ContributedTask.is(Be))if(Je){const ze=Je.byIdentifier[Be.defines._key];ze?(Ue.delete(Be.defines._key),_e.add(Ke,W.createCustomTask(Be,ze))):_e.add(Ke,Be)}else if(rt){const ze=rt[Be.defines._key];ze?(_e.add(Ke,W.createCustomTask(Be,ze)),je.push(ze)):_e.add(Ke,Be)}else _e.add(Ke,Be);if(je.length>0){const Be=je.reduce((ze,nt)=>(ze[nt._id]=!0,ze),Object.create(null));for(const ze of We.set.tasks)Be[ze._id]||_e.add(Ke,ze)}else _e.add(Ke,...We.set.tasks);const He=Array.from(Ue).map(async Be=>{const ze=Je.byIdentifier[Be];if(ye&&ye!==ze.configures.type)return;let nt=!1;for(const[ut,ot]of this._providers){const at=this._providerTypes.get(ut);if(ze.type===at){if(at&&!this._isTaskProviderEnabled(at)){nt=!0;continue}try{const wt=await ot.resolveTask(ze);if(wt&&wt._id===ze._id){_e.add(Ke,W.createCustomTask(wt,ze));return}}catch{}}}nt?this._outputChannel.append(c.localize(35,null,ze.configures.type)):(this._outputChannel.append(c.localize(36,null,ze.configures.type,JSON.stringify(ze._source.config.element,void 0,4))),this._showOutput())});await Promise.all(He)}else _e.add(Ke,...We.set.tasks),_e.add(Ke,...Xe)}});return await Promise.all(Oe),ke&&await this._migrateRecentTasks(_e.all()),_e}catch{const Le=new De;for(const Me of Te)for(const Oe of Me.tasks){const Ke=Oe.getWorkspaceFolder();Ke&&Le.add(Ke,Oe)}return Le}}_getLegacyTaskConfigurations(fe){let ye;function ke(){return ye||(ye=Object.create(null),ye)}for(const Ee of fe.tasks)if(V.CustomTask.is(Ee)){const Te=Ee.command&&Ee.command.name;if(Te==="gulp"||Te==="grunt"||Te==="jake"){const _e=V.KeyedTaskIdentifier.create({type:Te,task:Ee.configurationProperties.name});ke()[_e._key]=Ee}}return ye}async getWorkspaceTasks(fe=1){return await this._trust()?(await this._waitForSupportedExecutions,this._workspaceTasksPromise?this._workspaceTasksPromise:this._updateWorkspaceTasks(fe)):new Map}_updateWorkspaceTasks(fe=1){return this._workspaceTasksPromise=this._computeWorkspaceTasks(fe),this._workspaceTasksPromise}async _getAFolder(){let fe=this.workspaceFolders.length>0?this.workspaceFolders[0]:void 0;if(!fe){const ye=await this._pathService.userHome();fe=new T.WorkspaceFolder({uri:ye,name:C.basename(ye),index:0})}return fe}async _computeWorkspaceTasks(fe=1){const ye=[];for(const Re of this.workspaceFolders)ye.push(this._computeWorkspaceFolderTasks(Re,fe).then(Le=>Le,()=>{}));const ke=await Promise.all(ye),Ee=new Map;for(const Re of ke)Re&&Ee.set(Re.workspaceFolder.uri.toString(),Re);const Te=await this._getAFolder();if(this._contextService.getWorkbenchState()!==1){const Re=await this._computeWorkspaceFileTasks(Te,fe).then(Le=>Le,()=>{});Re&&this._workspace&&this._workspace.configuration&&Ee.set(this._workspace.configuration.toString(),Re)}const _e=await this._computeUserTasks(Te,fe).then(Re=>Re,()=>{});return _e&&Ee.set(V.USER_TASKS_GROUP_KEY,_e),Ee}get _jsonTasksSupported(){return z.ShellExecutionSupportedContext.getValue(this._contextKeyService)===!0&&z.ProcessExecutionSupportedContext.getValue(this._contextKeyService)===!0}async _computeWorkspaceFolderTasks(fe,ye=1){const ke=this._executionEngine===V.ExecutionEngine.Process?await this._computeLegacyConfiguration(fe):await this._computeConfiguration(fe);if(!ke||!ke.config||ke.hasErrors)return Promise.resolve({workspaceFolder:fe,set:void 0,configurations:void 0,hasErrors:ke?ke.hasErrors:!1});await h.ProblemMatcherRegistry.onReady();const Ee=this._getTaskSystemInfo(fe.uri.scheme),Te=new Ce(this._outputChannel),_e=W.parse(fe,void 0,Ee?Ee.platform:S.platform,ke.config,Te,W.TaskConfigSource.TasksJson,this._contextKeyService);let Re=!1;if(!_e.validationStatus.isOK()&&_e.validationStatus.state!==1&&(Re=!0,this._showOutput(ye)),Te.status.isFatal())return Te.fatal(c.localize(37,null)),{workspaceFolder:fe,set:void 0,configurations:void 0,hasErrors:Re};let Le;if(_e.configured&&_e.configured.length>0){Le={byIdentifier:Object.create(null)};for(const Me of _e.configured)Le.byIdentifier[Me.configures._key]=Me}return!this._jsonTasksSupported&&_e.custom.length>0&&console.warn("Custom workspace tasks are not supported."),{workspaceFolder:fe,set:{tasks:this._jsonTasksSupported?_e.custom:[]},configurations:Le,hasErrors:Re}}_testParseExternalConfig(fe,ye){if(!fe)return{config:void 0,hasParseErrors:!1};const ke=fe.$parseErrors;if(ke){let Ee=!1;for(const Te of ke)if(/tasks\.json$/.test(Te)){Ee=!0;break}if(Ee)return this._outputChannel.append(c.localize(38,null,ye)),this._showOutput(),{config:fe,hasParseErrors:!0}}return{config:fe,hasParseErrors:!1}}async _computeWorkspaceFileTasks(fe,ye=1){if(this._executionEngine===V.ExecutionEngine.Process)return this._emptyWorkspaceTaskResults(fe);const ke=this._getConfiguration(fe,V.TaskSourceKind.WorkspaceFile),Ee=this._testParseExternalConfig(ke.config,c.localize(39,null)),Te={byIdentifier:Object.create(null)},_e=[];return await this._computeTasksForSingleConfig(fe,Ee.config,ye,_e,Te.byIdentifier,W.TaskConfigSource.WorkspaceFile),(Ee.config?W.ExecutionEngine.from(Ee.config):V.ExecutionEngine.Terminal)===V.ExecutionEngine.Process?(this._notificationService.warn(c.localize(40,null)),this._emptyWorkspaceTaskResults(fe)):{workspaceFolder:fe,set:{tasks:_e},configurations:Te,hasErrors:Ee.hasParseErrors}}async _computeUserTasks(fe,ye=1){if(this._executionEngine===V.ExecutionEngine.Process)return this._emptyWorkspaceTaskResults(fe);const ke=this._getConfiguration(fe,V.TaskSourceKind.User),Ee=this._testParseExternalConfig(ke.config,c.localize(41,null)),Te={byIdentifier:Object.create(null)},_e=[];return await this._computeTasksForSingleConfig(fe,Ee.config,ye,_e,Te.byIdentifier,W.TaskConfigSource.User),(Ee.config?W.ExecutionEngine.from(Ee.config):V.ExecutionEngine.Terminal)===V.ExecutionEngine.Process?(this._notificationService.warn(c.localize(42,null)),this._emptyWorkspaceTaskResults(fe)):{workspaceFolder:fe,set:{tasks:_e},configurations:Te,hasErrors:Ee.hasParseErrors}}_emptyWorkspaceTaskResults(fe){return{workspaceFolder:fe,set:void 0,configurations:void 0,hasErrors:!1}}async _computeTasksForSingleConfig(fe,ye,ke,Ee,Te,_e,Re=!1){if(!ye||!fe)return!1;const Le=fe?this._getTaskSystemInfo(fe.uri.scheme):void 0,Me=new Ce(this._outputChannel),Oe=W.parse(fe,this._workspace,Le?Le.platform:S.platform,ye,Me,_e,this._contextKeyService,Re);let Ke=!1;if(!Oe.validationStatus.isOK()&&Oe.validationStatus.state!==1&&(this._showOutput(ke),Ke=!0),Me.status.isFatal())return Me.fatal(c.localize(43,null)),Ke;if(Oe.configured&&Oe.configured.length>0)for(const We of Oe.configured)Te[We.configures._key]=We;if(!this._jsonTasksSupported&&Oe.custom.length>0)console.warn("Custom workspace tasks are not supported.");else for(const We of Oe.custom)Ee.push(We);return Ke}_computeConfiguration(fe){const{config:ye,hasParseErrors:ke}=this._getConfiguration(fe);return Promise.resolve({workspaceFolder:fe,config:ye,hasErrors:ke})}_computeWorkspaceFolderSetup(){const fe=[],ye=[];let ke=V.ExecutionEngine.Terminal,Ee=2,Te;if(this._contextService.getWorkbenchState()===2){const _e=this._contextService.getWorkspace().folders[0];fe.push(_e),ke=this._computeExecutionEngine(_e);const Re={executionEngineVersion:ke};this._telemetryService.publicLog("taskService.engineVersion",Re),Ee=this._computeJsonSchemaVersion(_e)}else if(this._contextService.getWorkbenchState()===3){Te=this._contextService.getWorkspace();for(const _e of this._contextService.getWorkspace().folders)Ee===this._computeJsonSchemaVersion(_e)?fe.push(_e):(ye.push(_e),this._outputChannel.append(c.localize(44,null,_e.uri.fsPath)))}return[fe,ye,ke,Ee,Te]}_computeExecutionEngine(fe){const{config:ye}=this._getConfiguration(fe);return ye?W.ExecutionEngine.from(ye):V.ExecutionEngine._default}_computeJsonSchemaVersion(fe){const{config:ye}=this._getConfiguration(fe);return ye?W.JsonSchemaVersion.from(ye):2}_getConfiguration(fe,ye){let ke;if(ye!==V.TaskSourceKind.User&&this._contextService.getWorkbenchState()===1)ke=void 0;else{const Te=this._configurationService.inspect("tasks",{resource:fe.uri});switch(ye){case V.TaskSourceKind.User:{Te.userValue!==Te.workspaceFolderValue&&(ke=I.deepClone(Te.userValue));break}case V.TaskSourceKind.Workspace:ke=I.deepClone(Te.workspaceFolderValue);break;case V.TaskSourceKind.WorkspaceFile:{this._contextService.getWorkbenchState()===3&&Te.workspaceFolderValue!==Te.workspaceValue&&(ke=I.deepClone(Te.workspaceValue));break}default:ke=I.deepClone(Te.workspaceFolderValue)}}if(!ke)return{config:void 0,hasParseErrors:!1};const Ee=ke.$parseErrors;if(Ee){let Te=!1;for(const _e of Ee)if(/tasks\.json$/.test(_e)){Te=!0;break}if(Te)return this._outputChannel.append(c.localize(45,null)),this._showOutput(),{config:void 0,hasParseErrors:!0}}return{config:ke,hasParseErrors:!1}}inTerminal(){return this._taskSystem?this._taskSystem instanceof U.TerminalTaskSystem:this._executionEngine===V.ExecutionEngine.Terminal}configureAction(){const fe=this;return new class extends t.Action{constructor(){super(ue.ID,ue.TEXT,void 0,!0,()=>(fe._runConfigureTasks(),Promise.resolve(void 0)))}}}_handleError(fe){let ye=!0;if(fe instanceof x.TaskError){const ke=fe,Ee=ke.code===0||ke.code===2||ke.code===3,Te=ke.code===1;Ee||Te?this._notificationService.prompt(ke.severity,ke.message,[{label:Ee?ue.TEXT:c.localize(46,null),run:()=>{Ee?this._runConfigureTasks():this._runTerminateCommand()}}]):this._notificationService.notify({severity:ke.severity,message:ke.message})}else if(fe instanceof Error){const ke=fe;this._notificationService.error(ke.message),ye=!1}else u.isString(fe)?this._notificationService.error(fe):this._notificationService.error(c.localize(47,null));ye&&this._showOutput()}_showDetail(){return this._configurationService.getValue(Z.QUICKOPEN_DETAIL_CONFIG)}async _createTaskQuickPickEntries(fe,ye=!1,ke=!1,Ee,Te=!0){let _e={};if(fe==null||fe.length===0)return[];const Re=Oe=>{const Ke={label:Oe._label,description:this.getTaskDescription(Oe),task:Oe,detail:this._showDetail()?Oe.configurationProperties.detail:void 0};return _e[Oe._id]?(_e[Oe._id].length===1&&(_e[Oe._id][0].label+=" (1)"),Ke.label=Ke.label+" ("+(_e[Oe._id].length+1).toString()+")"):_e[Oe._id]=[],_e[Oe._id].push(Ke),Ke};function Le(Oe,Ke,We){Ke.length&&Oe.push({type:"separator",label:We});for(const Xe of Ke){const Je=Re(Xe);Je.buttons=[{iconClass:ie.ThemeIcon.asClassName(Z.configureTaskIcon),tooltip:c.localize(48,null)}],Ee&&Xe===Ee.task?Oe.unshift(Ee):Oe.push(Je)}}let Me;if(ye)if(Me=[],fe.length===1)Me.push(Re(fe[0]));else{const Oe=await this.getSavedTasks("historical"),Ke=[],We=new Set;let Xe=[],Je=[];const rt=Object.create(null);fe.forEach(Ue=>{const Fe=Ue.getCommonTaskId();Fe&&(rt[Fe]=Ue)}),Oe.reverse().forEach(Ue=>{const Fe=Ue.getCommonTaskId();if(Fe){We.add(Fe);const He=rt[Fe];He&&Ke.push(He)}});for(const Ue of fe){const Fe=Ue.getCommonTaskId();(!Fe||!We.has(Fe))&&(Ue._source.kind===V.TaskSourceKind.Workspace||Ue._source.kind===V.TaskSourceKind.User?Xe.push(Ue):Je.push(Ue))}const je=this.createSorter();Te&&Le(Me,Ke,c.localize(49,null)),Xe=Xe.sort((Ue,Fe)=>je.compare(Ue,Fe)),Le(Me,Xe,c.localize(50,null)),Je=Je.sort((Ue,Fe)=>je.compare(Ue,Fe)),Le(Me,Je,c.localize(51,null))}else{if(ke){const Oe=this.createSorter();fe=fe.sort((Ke,We)=>Oe.compare(Ke,We))}Me=fe.map(Oe=>Re(Oe))}return _e={},Me}async _showTwoLevelQuickPick(fe,ye,ke,Ee){return this._instantiationService.createInstance(Z.TaskQuickPick).show(fe,ye,ke,Ee)}async _showQuickPick(fe,ye,ke,Ee=!1,Te=!1,_e,Re,Le,Me){const Oe=new G.CancellationTokenSource,Ke=Oe.token,We=new Promise(je=>{Array.isArray(fe)?je(this._createTaskQuickPickEntries(fe,Ee,Te,_e)):je(fe.then(Ue=>this._createTaskQuickPickEntries(Ue,Ee,Te,_e)))});if(!await Promise.race([new Promise(je=>{We.then(()=>je(!1))}),new Promise(je=>{const Ue=setTimeout(()=>{clearTimeout(Ue),je(!0)},200)})])&&(await We).length===1&&this._configurationService.getValue(Z.QUICKOPEN_SKIP_CONFIG))return(await We)[0];const Je=We.then(je=>(je.length===1&&this._configurationService.getValue(Z.QUICKOPEN_SKIP_CONFIG)?Oe.cancel():je.length===0&&ke?je.push(ke):je.length>1&&Re&&Re.length>0&&(je.push({type:"separator",label:""}),je.push(Re[0])),je)),rt=this._quickInputService.createQuickPick();return rt.placeholder=ye,rt.matchOnDescription=!0,Me&&(rt.value=Me),rt.onDidTriggerItemButton(je=>{const Ue=je.item.task;this._quickInputService.cancel(),V.ContributedTask.is(Ue)?this.customize(Ue,void 0,!0):V.CustomTask.is(Ue)&&this.openConfig(Ue)}),rt.busy=!0,Je.then(je=>{rt.busy=!1,rt.items=je,rt.show()}),new Promise(je=>{this._register(rt.onDidAccept(async()=>{let Ue=rt.selectedItems?rt.selectedItems[0]:void 0;if(Ke.isCancellationRequested){const Fe=(await Je)[0];Fe.task&&(Ue=Fe)}rt.dispose(),Ue||je(void 0),je(Ue)}))})}_needsRecentTasksMigration(){return this.getRecentlyUsedTasksV1().size>0&&this._getTasksFromStorage("historical").size===0}async _migrateRecentTasks(fe){if(!this._needsRecentTasksMigration())return;const ye=this.getRecentlyUsedTasksV1(),ke=Object.create(null);fe.forEach(Te=>{const _e=Te.getRecentlyUsedKey();_e&&(ke[_e]=Te)});const Ee=[...ye.keys()].reverse();for(const Te in Ee){const _e=ke[Te];_e&&await this._setRecentlyUsedTask(_e)}this._storageService.remove(hi.RecentlyUsedTasks_Key,1)}_showIgnoredFoldersMessage(){return this.ignoredWorkspaceFolders.length===0||!this.showIgnoreMessage||this._notificationService.prompt(r.default.Info,c.localize(52,null,this.ignoredWorkspaceFolders.map(fe=>fe.name).join(", ")),[{label:c.localize(53,null),isSecondary:!0,run:()=>{this._storageService.store(hi.IgnoreTask010DonotShowAgain_key,!0,1,0),this._showIgnoreMessage=!1}}]),Promise.resolve(void 0)}async _trust(){return z.ServerlessWebContext&&!z.TaskExecutionSupportedContext?!1:(await this._workspaceTrustManagementService.workspaceTrustInitialized,this._workspaceTrustManagementService.isWorkspaceTrusted()?!0:await this._workspaceTrustRequestService.requestWorkspaceTrust({message:c.localize(54,null)})===!0)}_runTaskCommand(fe){const ye=this._getTaskIdentifier(fe),ke=fe&&typeof fe!="string"&&"type"in fe?fe.type:void 0,Ee=fe&&typeof fe!="string"&&"task"in fe?fe.task:fe==="string"?fe:void 0;if(!ye&&!Ee&&!ke)return this._doRunTaskCommand();this._getGroupedTasks().then(async Te=>{const _e=Te.all(),Re=this._createResolver(Te),Le=this._contextService.getWorkspace().folders.map(Ke=>Ke.uri);if(this._contextService.getWorkbenchState()===3&&Le.push(this._contextService.getWorkspace().configuration),Le.push(V.USER_TASKS_GROUP_KEY),ye)for(const Ke of Le){const We=await Re.resolve(Ke,ye);if(We){this.run(We).then(void 0,()=>{});return}}const Me=_e.find(Ke=>Ee&&(Ke.getDefinition(!0)?.configurationProperties?.identifier===Ee||Ke.configurationProperties?.identifier===Ee||Ke._label===Ee));if(Me){const Ke=Me.configurationProperties?.identifier||Me.getDefinition(!0)?.configurationProperties?.identifier;if(Ke)for(const We of Le){const Xe=await Re.resolve(We,Ke);if(Xe){this.run(Xe,{attachProblemMatcher:!0},1).then(void 0,()=>{});return}}}return _e.some(Ke=>{if(Ee){if(Ke._label.includes(Ee)&&(!ke||Ke.type===ke))return!0}else if(ke&&Ke.type===ke)return!0;return!1})?this._doRunTaskCommand(_e,ke,Ee):this._doRunTaskCommand()})}_tasksAndGroupedTasks(fe){if(!this._versionAndEngineCompatible(fe))return{tasks:Promise.resolve([]),grouped:Promise.resolve(new De)};const ye=this._getGroupedTasks(fe);return{tasks:ye.then(Ee=>{if(!fe||!fe.type)return Ee.all();const Te=[];return Ee.forEach(_e=>{for(const Re of _e)if(V.ContributedTask.is(Re)&&Re.defines.type===fe.type)Te.push(Re);else if(V.CustomTask.is(Re))if(Re.type===fe.type)Te.push(Re);else{const Le=Re.customizes();Le&&Le.type===fe.type&&Te.push(Re)}}),Te}),grouped:ye}}_doRunTaskCommand(fe,ye,ke){const Ee=_e=>{_e!==void 0&&(_e===null?this._runConfigureTasks():this.run(_e,{attachProblemMatcher:!0},1).then(void 0,Re=>{}))},Te=c.localize(55,null);this._showIgnoredFoldersMessage().then(()=>{if(this._configurationService.getValue(ge)){let _e;fe||(_e=this._tasksAndGroupedTasks()),this._showQuickPick(fe||_e.tasks,Te,{label:"$(plus) "+c.localize(56,null),task:null},!0,void 0,void 0,void 0,ye,ke).then(Re=>Ee(Re?Re.task:void 0))}else this._showTwoLevelQuickPick(Te,{label:"$(plus) "+c.localize(57,null),task:null},ye,ke).then(Ee)})}_reRunTaskCommand(){h.ProblemMatcherRegistry.onReady().then(()=>this._editorService.saveAll({reason:2}).then(()=>{const fe=this._getTaskSystem().rerun();return fe?this._handleExecuteResult(fe):(this._doRunTaskCommand(),Promise.resolve(void 0))}))}_splitPerGroupType(fe,ye=!1){const ke=[],Ee=[];for(const Te of fe)ye&&typeof Te.configurationProperties.group.isDefault=="string"||!ye&&Te.configurationProperties.group.isDefault===!0?Ee.push(Te):ke.push(Te);return{none:ke,defaults:Ee}}_runTaskGroupCommand(fe,ye,ke,Ee){if(this.schemaVersion===1){Ee();return}const Te={location:10,title:ye.fetching},_e=(async()=>{let Re=[];async function Le(Xe,Je,rt){rt.run(Xe,Je,1).then(void 0,je=>{})}const Me=Xe=>{this._showIgnoredFoldersMessage().then(()=>{this._showQuickPick(Xe,ye.select,{label:ye.notFoundConfigure,task:null},!0).then(Je=>{const rt=Je?Je.task:void 0;if(rt!==void 0){if(rt===null){ke.apply(this);return}Le(rt,{attachProblemMatcher:!0},this)}})})},Oe=se.EditorResourceAccessor.getOriginalUri(this._editorService.activeEditor);if(Oe){const Xe=this._contextService.getWorkspaceFolder(Oe),Je=Xe?.uri?C.relativePath(Xe.uri,Oe)??Oe.path:Oe.path;Re=await this._findWorkspaceTasks(rt=>{const je=rt.configurationProperties.group;return je&&typeof je!="string"&&typeof je.isDefault=="string"?je._id===je._id&&R.match(je.isDefault,Je):!1})}const Ke=Xe=>this._getTasksForGroup(fe).then(Je=>{if(Je.length>0){const{none:rt,defaults:je}=this._splitPerGroupType(Je,Xe);if(je.length===1){Le(je[0],void 0,this);return}else je.length+rt.length>0&&(Je=je.concat(rt))}Me(Je)}),We=Xe=>{V.ConfiguringTask.is(Xe)?this.tryResolveTask(Xe).then(Je=>{Le(Je,void 0,this)}):Le(Xe,void 0,this)};return Re.length===1?We(Re[0]):Re.length>1?Ke(!0):(Re.length||(Re=await this._findWorkspaceTasksInGroup(fe,!1)),Re.length===1?We(Re[0]):Ke(!1))})();this._progressService.withProgress(Te,()=>_e)}_runBuildCommand(){return this._runTaskGroupCommand(V.TaskGroup.Build,{fetching:c.localize(58,null),select:c.localize(59,null),notFoundConfigure:c.localize(60,null)},this._runConfigureDefaultBuildTask,this._build)}_runTestCommand(){return this._runTaskGroupCommand(V.TaskGroup.Test,{fetching:c.localize(61,null),select:c.localize(62,null),notFoundConfigure:c.localize(63,null)},this._runConfigureDefaultTestTask,this._runTest)}_runTerminateCommand(fe){if(fe==="terminateAll"){this._terminateAll();return}const ye=ke=>{this._showQuickPick(ke||this.getActiveTasks(),c.localize(64,null),{label:c.localize(65,null),task:void 0},!1,!0,void 0,[{label:c.localize(66,null),id:"terminateAll",task:void 0}]).then(Ee=>{Ee&&Ee.id==="terminateAll"&&this._terminateAll();const Te=Ee?Ee.task:void 0;Te!=null&&this.terminate(Te)})};if(this.inTerminal()){const ke=this._getTaskIdentifier(fe);let Ee;ke!==void 0?(Ee=this.getActiveTasks(),Ee.then(Te=>{for(const _e of Te)if(_e.matches(ke)){this.terminate(_e);return}ye(Ee)})):ye()}else this._isActive().then(ke=>{ke&&this._terminateAll().then(Ee=>{const Te=Ee[0];Te.success||(Te.code&&Te.code===3?this._notificationService.error(c.localize(67,null)):this._notificationService.error(c.localize(68,null)))})})}_runRestartTaskCommand(fe){const ye=ke=>{this._showQuickPick(ke||this.getActiveTasks(),c.localize(69,null),{label:c.localize(70,null),task:null},!1,!0).then(Ee=>{const Te=Ee?Ee.task:void 0;Te!=null&&this._restart(Te)})};if(this.inTerminal()){const ke=this._getTaskIdentifier(fe);let Ee;ke!==void 0?(Ee=this.getActiveTasks(),Ee.then(Te=>{for(const _e of Te)if(_e.matches(ke)){this._restart(_e);return}ye(Ee)})):ye()}else this.getActiveTasks().then(ke=>{if(ke.length===0)return;const Ee=ke[0];this._restart(Ee)})}_getTaskIdentifier(fe){let ye;return u.isString(fe)?ye=fe:fe&&u.isString(fe.type)&&(ye=V.TaskDefinition.createTaskIdentifier(fe,console)),ye}_configHasTasks(fe){return!!fe&&!!fe.tasks&&fe.tasks.length>0}_openTaskFile(fe,ye){let ke=!1;this._fileService.stat(fe).then(Ee=>Ee,()=>{}).then(async Ee=>{const Te=!!Ee,_e=this._configurationService.inspect("tasks");let Re,Le;switch(ye){case V.TaskSourceKind.User:Re=this._configHasTasks(_e.userValue),Le=2;break;case V.TaskSourceKind.WorkspaceFile:Re=this._configHasTasks(_e.workspaceValue),Le=5;break;default:Re=this._configHasTasks(_e.workspaceFolderValue),Le=6}let Me;if(!Re){const Oe=await this._quickInputService.pick((0,H.getTemplates)(),{placeHolder:c.localize(71,null)});if(!Oe)return Promise.resolve(void 0);Me=Oe.content;const Ke=this._configurationService.getValue();Ke.editor.insertSpaces&&(Me=Me.replace(/(\n)(\t+)/g,(We,Xe,Je)=>Xe+" ".repeat(Je.length*Ke.editor.tabSize))),ke=!0}if(!Te&&Me)return this._textFileService.create([{resource:fe,value:Me}]).then(Oe=>Oe[0].resource);if(Te&&(Re||Me))return Me&&this._configurationService.updateValue("tasks",A.parse(Me),Le),Ee?.resource}).then(Ee=>{!Ee||this._editorService.openEditor({resource:Ee,options:{pinned:ke}})})}_isTaskEntry(fe){const ye=fe;return ye&&!!ye.task}_isSettingEntry(fe){const ye=fe;return ye&&!!ye.settingType}_configureTask(fe){V.ContributedTask.is(fe)?this.customize(fe,void 0,!0):V.CustomTask.is(fe)?this.openConfig(fe):V.ConfiguringTask.is(fe)}_handleSelection(fe){if(!!fe)if(this._isTaskEntry(fe))this._configureTask(fe.task);else if(this._isSettingEntry(fe))this._instantiationService.createInstance(Z.TaskQuickPick).handleSettingOption(fe.settingType);else if(fe.folder&&this._contextService.getWorkbenchState()!==1)this._openTaskFile(fe.folder.toResource(".vscode/tasks.json"),V.TaskSourceKind.Workspace);else{const ye=this._getResourceForKind(V.TaskSourceKind.User);ye&&this._openTaskFile(ye,V.TaskSourceKind.User)}}getTaskDescription(fe){let ye;if(fe._source.kind===V.TaskSourceKind.User)ye=c.localize(72,null);else if(fe._source.kind===V.TaskSourceKind.WorkspaceFile)ye=fe.getWorkspaceFileName();else if(this.needsFolderQualification()){const ke=fe.getWorkspaceFolder();ke&&(ye=ke.name)}return ye}async _runConfigureTasks(){if(!await this._trust())return;let fe;this.schemaVersion===2?fe=this._getGroupedTasks():fe=Promise.resolve(new De);const ye=this._contextService.getWorkspace().folders.map(Oe=>this._fileService.stat(Oe.toResource(".vscode/tasks.json")).then(Ke=>Ke,()=>{})),ke=c.localize(73,null),Ee=c.localize(74,null),Te=new G.CancellationTokenSource,_e=Te.token,Re=Promise.all(ye).then(Oe=>fe.then(Ke=>{const We=[];let Xe=0,Je=Ke.all();if(Je.length>0){Je=Je.sort((je,Ue)=>je._label.localeCompare(Ue._label));for(const je of Je){const Ue={label:Z.TaskQuickPick.getTaskLabelWithIcon(je),task:je,description:this.getTaskDescription(je),detail:this._showDetail()?je.configurationProperties.detail:void 0};Z.TaskQuickPick.applyColorStyles(je,Ue,this._themeService),We.push(Ue),V.ContributedTask.is(je)||Xe++}}const rt=Xe===0;if(rt||Ke.get(V.USER_TASKS_GROUP_KEY).length===Xe){const je=Oe[0]!==void 0?Ee:ke;We.length&&We.push({type:"separator"}),We.push({label:je,folder:this._contextService.getWorkspace().folders[0]})}return We.length===1&&!rt&&Te.cancel(),We}));if(!await Promise.race([new Promise(Oe=>{Re.then(()=>Oe(!1))}),new Promise(Oe=>{const Ke=setTimeout(()=>{clearTimeout(Ke),Oe(!0)},200)})])&&(await Re).length===1&&this._configurationService.getValue(Z.QUICKOPEN_SKIP_CONFIG)){const Oe=(await Re)[0];if(Oe.task){this._handleSelection(Oe);return}}const Me=Re.then(Oe=>(Oe.push(...Z.TaskQuickPick.allSettingEntries(this._configurationService)),Oe));this._quickInputService.pick(Me,{placeHolder:c.localize(75,null)},_e).then(async Oe=>{if(_e.isCancellationRequested){const Ke=(await Re)[0];Ke.task&&(Oe=Ke)}this._handleSelection(Oe)})}_runConfigureDefaultBuildTask(){this.schemaVersion===2?this.tasks().then(fe=>{if(fe.length===0){this._runConfigureTasks();return}const ye=[];let ke,Ee;this._showIgnoredFoldersMessage().then(()=>{for(const Re of fe){const Le=V.TaskGroup.from(Re.configurationProperties.group);if(Le&&Le.isDefault&&Le._id===V.TaskGroup.Build._id){const Me=c.localize(76,null,Z.TaskQuickPick.getTaskLabelWithIcon(Re,Re.getQualifiedLabel()));ke=Re,Ee={label:Me,task:Re,description:this.getTaskDescription(Re),detail:this._showDetail()?Re.configurationProperties.detail:void 0},Z.TaskQuickPick.applyColorStyles(Re,Ee,this._themeService)}else{const Me={label:Z.TaskQuickPick.getTaskLabelWithIcon(Re),task:Re,description:this.getTaskDescription(Re),detail:this._showDetail()?Re.configurationProperties.detail:void 0};Z.TaskQuickPick.applyColorStyles(Re,Me,this._themeService),ye.push(Me)}}Ee&&ye.unshift(Ee);const _e=new G.CancellationTokenSource().token;this._quickInputService.pick(ye,{placeHolder:c.localize(77,null)},_e).then(async Re=>{if(_e.isCancellationRequested){const Me=(await ye)[0];Me.task&&(Re=Me)}const Le=Re&&"task"in Re?Re.task:void 0;Le!=null&&(Le===ke&&V.CustomTask.is(Le)&&this.openConfig(Le),V.InMemoryTask.is(Le)||this.customize(Le,{group:{kind:"build",isDefault:!0}},!0).then(()=>{ke&&Le!==ke&&!V.InMemoryTask.is(ke)&&this.customize(ke,{group:"build"},!1)}))}),this._quickInputService.pick(ye,{placeHolder:c.localize(78,null)}).then(Re=>{const Le=Re&&"task"in Re?Re.task:void 0;Le!=null&&(Le===ke&&V.CustomTask.is(Le)&&this.openConfig(Le),V.InMemoryTask.is(Le)||this.customize(Le,{group:{kind:"build",isDefault:!0}},!0).then(()=>{ke&&Le!==ke&&!V.InMemoryTask.is(ke)&&this.customize(ke,{group:"build"},!1)}))})})}):this._runConfigureTasks()}_runConfigureDefaultTestTask(){this.schemaVersion===2?this.tasks().then(fe=>{if(fe.length===0){this._runConfigureTasks();return}let ye,ke;for(const Ee of fe){const Te=V.TaskGroup.from(Ee.configurationProperties.group);if(Te&&Te.isDefault&&Te._id===V.TaskGroup.Test._id){ye=Ee;break}}ye&&(ke={label:c.localize(79,null,ye.getQualifiedLabel()),task:ye,detail:this._showDetail()?ye.configurationProperties.detail:void 0}),this._showIgnoredFoldersMessage().then(()=>{this._showQuickPick(fe,c.localize(80,null),void 0,!0,!1,ke).then(Ee=>{const Te=Ee?Ee.task:void 0;!Te||(Te===ye&&V.CustomTask.is(Te)&&this.openConfig(Te),V.InMemoryTask.is(Te)||this.customize(Te,{group:{kind:"test",isDefault:!0}},!0).then(()=>{ye&&Te!==ye&&!V.InMemoryTask.is(ye)&&this.customize(ye,{group:"test"},!1)}))})})}):this._runConfigureTasks()}async runShowTasks(){const fe=this.getActiveTasks(),ye=await fe;let ke;ye.length===1?this._taskSystem.revealTask(ye[0]):ye.length&&ye.every(Ee=>V.InMemoryTask.is(Ee)?!1:(ke||(ke=Ee.command.presentation?.group),Ee.command.presentation?.group&&Ee.command.presentation.group===ke))?this._taskSystem.revealTask(ye[0]):this._showQuickPick(fe,c.localize(81,null),{label:c.localize(82,null),task:null},!1,!0).then(Ee=>{const Te=Ee?Ee.task:void 0;Te!=null&&this._taskSystem.revealTask(Te)})}async _createTasksDotOld(fe){const ye=fe.toResource(".vscode/tasks.json");if(await this._fileService.exists(ye)){const ke=ye.with({path:`${ye.path}.old`});return await this._fileService.copy(ye,ke,!0),[ke,ye]}}_upgradeTask(fe,ye,ke){if(!V.CustomTask.is(fe))return;const Ee={label:fe._label},Te=new Set(["gulp","jake","grunt"]);u.isString(fe.command.name)&&Te.has(fe.command.name)?(Ee.type=fe.command.name,Ee.task=fe.command.args[0]):(fe.command.runtime===V.RuntimeType.Shell&&(Ee.type=V.RuntimeType.toString(V.RuntimeType.Shell)),fe.command.name&&!ye&&!ke.windows?.command&&!ke.osx?.command&&!ke.linux?.command?Ee.command=fe.command.name:ye&&(Ee.command=fe._source.config.element.command),fe.command.args&&(!Array.isArray(fe.command.args)||fe.command.args.length>0)&&(!ke.windows?.args&&!ke.osx?.args&&!ke.linux?.args?Ee.args=fe.command.args:Ee.args=fe._source.config.element.args)),fe.configurationProperties.presentation&&(Ee.presentation=fe.configurationProperties.presentation),fe.configurationProperties.isBackground&&(Ee.isBackground=fe.configurationProperties.isBackground),fe.configurationProperties.problemMatchers&&(Ee.problemMatcher=fe._source.config.element.problemMatcher),fe.configurationProperties.group&&(Ee.group=fe.configurationProperties.group),fe._source.config.element=Ee;const _e=new V.CustomTask(fe._id,fe._source,fe._label,fe.type,fe.command,fe.hasDefinedMatchers,fe.runOptions,fe.configurationProperties),Re=this._createCustomizableTask(_e);if(Re)return Re}async _upgrade(){if(this.schemaVersion===2)return;if(!this._workspaceTrustManagementService.isWorkspaceTrusted()){this._register(p.Event.once(this._workspaceTrustManagementService.onDidChangeTrust)(ke=>{ke&&this._upgrade()}));return}const fe=await this._getGroupedTasks(),ye=[];for(const ke of this.workspaceFolders){const Ee=await this._createTasksDotOld(ke);if(Ee&&ye.push(Ee),!Ee)continue;const Te=[],_e=!!this._configurationService.getValue("tasks.suppressTaskName",{resource:ke.uri}),Re={windows:this._configurationService.getValue("tasks.windows",{resource:ke.uri}),osx:this._configurationService.getValue("tasks.osx",{resource:ke.uri}),linux:this._configurationService.getValue("tasks.linux",{resource:ke.uri})};fe.get(ke).forEach(Le=>{const Me=this._upgradeTask(Le,_e,Re);Me&&Te.push(Me)}),this._taskSystem=void 0,this._workspaceTasksPromise=void 0,await this._writeConfiguration(ke,"tasks.tasks",Te),await this._writeConfiguration(ke,"tasks.version","2.0.0"),this._configurationService.getValue("tasks.showOutput",{resource:ke.uri})&&await this._configurationService.updateValue("tasks.showOutput",void 0,{resource:ke.uri}),this._configurationService.getValue("tasks.isShellCommand",{resource:ke.uri})&&await this._configurationService.updateValue("tasks.isShellCommand",void 0,{resource:ke.uri}),this._configurationService.getValue("tasks.suppressTaskName",{resource:ke.uri})&&await this._configurationService.updateValue("tasks.suppressTaskName",void 0,{resource:ke.uri})}this._updateSetup(),this._notificationService.prompt(r.default.Warning,ye.length===1?c.localize(83,null):c.localize(84,null),[{label:ye.length===1?c.localize(85,null):c.localize(86,null),run:async()=>{for(const ke of ye)await this._editorService.openEditor({original:{resource:ke[0]},modified:{resource:ke[1]}})}}])}};Ae.RecentlyUsedTasks_Key="workbench.tasks.recentlyUsedTasks",Ae.RecentlyUsedTasks_KeyV2="workbench.tasks.recentlyUsedTasks2",Ae.PersistentTasks_Key="workbench.tasks.persistentTasks",Ae.IgnoreTask010DonotShowAgain_key="workbench.tasks.ignoreTask010Shown",Ae.OutputChannelId="tasks",Ae.OutputChannelLabel=c.localize(1,null),Ae._nextHandle=0,Ae=we([F(0,s.IConfigurationService),F(1,n.IMarkerService),F(2,O.IOutputService),F(3,de.IPaneCompositePartService),F(4,te.IViewsService),F(5,l.ICommandService),F(6,M.IEditorService),F(7,d.IFileService),F(8,T.IWorkspaceContextService),F(9,g.ITelemetryService),F(10,N.ITextFileService),F(11,y.IModelService),F(12,v.IExtensionService),F(13,$.IQuickInputService),F(14,L.IConfigurationResolverService),F(15,P.ITerminalService),F(16,P.ITerminalGroupService),F(17,o.IStorageService),F(18,a.IProgressService),F(19,D.IOpenerService),F(20,m.IDialogService),F(21,w.INotificationService),F(22,q.IContextKeyService),F(23,ne.IWorkbenchEnvironmentService),F(24,B.ITerminalProfileResolverService),F(25,he.IPathService),F(26,Y.ITextModelService),F(27,pe.IPreferencesService),F(28,te.IViewDescriptorService),F(29,re.IWorkspaceTrustRequestService),F(30,re.IWorkspaceTrustManagementService),F(31,ee.ILogService),F(32,ie.IThemeService),F(33,ce.ILifecycleService),F(34,Se.IRemoteAgentService),F(35,Ie.IInstantiationService)],Ae),e.AbstractTaskService=Ae}),define(ae[2800],le([1,0,1869,2,17,15,318,66,155,149,132,293,270,44,2516,98,2513,2515,968,176,55,71,222,929,7,391,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskStatusBarContributions=void 0;const w=R.Registry.as(u.Extensions.Workbench);w.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:r.TaskExecutionSupportedContext});let D=class extends p.Disposable{constructor(P,B,V){super(),this._taskService=P,this._statusbarService=B,this._progressService=V,this._activeTasksCount=0,this._registerListeners()}_registerListeners(){let P,B;this._taskService.onDidStateChange(V=>{if(V.kind==="changed"&&this._updateRunningTasksStatus(),!this._ignoreEventForUpdateRunningTasksCount(V))switch(V.kind){case"active":this._activeTasksCount++,this._activeTasksCount===1&&(P||(P=new Promise(z=>{B=z})));break;case"inactive":this._activeTasksCount>0&&(this._activeTasksCount--,this._activeTasksCount===0&&P&&B&&B());break;case"terminated":this._activeTasksCount!==0&&(this._activeTasksCount=0,P&&B&&B());break}P&&V.kind==="active"&&this._activeTasksCount===1&&this._progressService.withProgress({location:10,command:"workbench.action.tasks.showTasks",type:"loading"},z=>(z.report({message:t.localize(0,null)}),P)).then(()=>{P=void 0})})}async _updateRunningTasksStatus(){const P=await this._taskService.getActiveTasks();if(P.length===0)this._runningTasksStatusItem&&(this._runningTasksStatusItem.dispose(),this._runningTasksStatusItem=void 0);else{const B={name:t.localize(1,null),text:`$(tools) ${P.length}`,ariaLabel:t.localize(2,null,P.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(P){return this._taskService.inTerminal()?((0,m.isString)(P.group)?P.group:P.group?._id)!==C.TaskGroup.Build._id?!0:P.__task?P.__task.configurationProperties.problemMatchers===void 0||P.__task.configurationProperties.problemMatchers.length===0:!1:!1}};D=we([F(0,r.ITaskService),F(1,b.IStatusbarService),F(2,E.IProgressService)],D),e.TaskStatusBarContributions=D,w.registerWorkbenchContribution(D,3),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"2_run",command:{id:"workbench.action.tasks.runTask",title:t.localize(4,null)},order:1,when:r.TaskExecutionSupportedContext}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"2_run",command:{id:"workbench.action.tasks.build",title:t.localize(5,null)},order:2,when:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"4_configure",command:{id:"workbench.action.tasks.configureTaskRunner",title:t.localize(9,null)},order:1,when:r.TaskExecutionSupportedContext}),A.MenuRegistry.appendMenuItem(A.MenuId.MenubarTerminalMenu,{group:"4_configure",command:{id:"workbench.action.tasks.configureDefaultBuildTask",title:t.localize(10,null)},order:2,when:r.TaskExecutionSupportedContext}),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:h.ContextKeyExpr.and(a.WorkbenchStateContext.isEqualTo("workspace"),r.TaskExecutionSupportedContext)}),A.MenuRegistry.appendMenuItem(A.MenuId.CommandPalette,{command:{id:s.ConfigureTaskAction.ID,title:{value:s.ConfigureTaskAction.TEXT,original:"Configure Task"},category:C.TASKS_CATEGORY},when:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),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:r.TaskExecutionSupportedContext}),f.KeybindingsRegistry.registerKeybindingRule({id:"workbench.action.tasks.build",weight:200,when:r.TaskCommandsRegistered,primary:3104}),R.Registry.as(S.Extensions.OutputChannels).registerChannel({id:s.AbstractTaskService.OutputChannelId,label:s.AbstractTaskService.OutputChannelLabel,log:!1});const T=R.Registry.as(o.Extensions.Quickaccess),_="inTasksPicker";T.registerQuickAccessProvider({ctor:g.TasksQuickAccessProvider,prefix:g.TasksQuickAccessProvider.PREFIX,contextKey:_,placeholder:t.localize(23,null),helpEntries:[{description:t.localize(24,null)}]});const L={id:d.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"}]}};L.definitions={...c.default.definitions,...l.default.definitions},L.oneOf=[...l.default.oneOf||[],...c.default.oneOf||[]];const M=R.Registry.as(I.Extensions.JSONContribution);M.registerSchema(d.tasksSchemaId,L),k.ProblemMatcherRegistry.onMatcherChanged(()=>{(0,l.updateProblemMatchers)(),M.notifySchemaChanged(d.tasksSchemaId)}),v.TaskDefinitionRegistry.onDefinitionsChanged(()=>{(0,l.updateTaskDefinitions)(),M.notifySchemaChanged(d.tasksSchemaId)}),R.Registry.as(n.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.allowAutomaticTasks"]:{type:"string",enum:["on","auto","off"],enumDescriptions:[t.localize(37,null),t.localize(38,null),t.localize(39,null)],description:t.localize(40,null),default:"auto",restricted:!0},["task.showDecorations"]:{type:"boolean",markdownDescription:t.localize(41,null,"`#terminal.integrated.shellIntegration.decorationsEnabled#`"),default:!0},["task.reconnection"]:{type:"boolean",description:t.localize(42,null),default:!0},["task.saveBeforeRun"]:{markdownDescription:t.localize(43,null),type:"string",enum:["always","never","prompt"],enumDescriptions:[t.localize(44,null),t.localize(45,null),t.localize(46,null)],default:"always"}}})}),define(ae[2801],le([1,0,1883,306,34,293,968,270,35,931,47,54,62,31,8,7,19,25,124,26,41,66,48,23,27,45,132,109,217,24,51,39,69,107,106,78,118,127,91,12,5,104,284]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskService=void 0;let U=class extends k.AbstractTaskService{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e,Re){super(q,X,G,Q,j,K,Y,ee,ie,re,oe,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,se,_e,Te),this._register(se.onBeforeShutdown(Le=>Le.veto(this.beforeShutdown(),"veto.tasks")))}_getTaskSystem(){if(this._taskSystem)return this._taskSystem;const q=this._createTerminalTaskSystem();return this._taskSystem=q,this._taskSystemListeners=[this._taskSystem.onDidStateChange(X=>{this._taskRunningState.set(this._taskSystem.isActiveSync()),this._onDidStateChange.fire(X)})],this._taskSystem}_computeLegacyConfiguration(q){const{config:X,hasParseErrors:G}=this._getConfiguration(q);return G?Promise.resolve({workspaceFolder:q,hasErrors:!0,config:void 0}):X?Promise.resolve({workspaceFolder:q,config:X,hasErrors:!1}):Promise.resolve({workspaceFolder:q,hasErrors:!0,config:void 0})}_versionAndEngineCompatible(q){const X=q&&q.version?q.version:void 0,G=this.executionEngine;return X===void 0||p.satisfies("0.1.0",X)&&G===A.ExecutionEngine.Process||p.satisfies("2.0.0",X)&&G===A.ExecutionEngine.Terminal}beforeShutdown(){if(!this._taskSystem||!this._taskSystem.isActiveSync()||this._taskSystem instanceof b.TerminalTaskSystem)return!1;let q;return this._taskSystem.canAutoTerminate()?q=Promise.resolve({confirmed:!0}):q=this._dialogService.confirm({message:t.localize(0,null),primaryButton:t.localize(1,null),type:"question"}),q.then(X=>X.confirmed?this._taskSystem.terminateAll().then(G=>{let Q=!0,j;for(const K of G)Q=Q&&K.success,j===void 0&&K.code!==void 0&&(j=K.code);return Q?(this._taskSystem=void 0,this._disposeTaskSystemListeners(),!1):j&&j===3?this._dialogService.confirm({message:t.localize(2,null),primaryButton:t.localize(3,null),type:"info"}).then(K=>!K.confirmed):!0},G=>!0):!0)}};U=we([F(0,i.IConfigurationService),F(1,s.IMarkerService),F(2,m.IOutputService),F(3,V.IPaneCompositePartService),F(4,v.IViewsService),F(5,u.ICommandService),F(6,y.IEditorService),F(7,c.IFileService),F(8,R.IWorkspaceContextService),F(9,h.ITelemetryService),F(10,N.ITextFileService),F(11,L.ILifecycleService),F(12,C.IModelService),F(13,_.IExtensionService),F(14,o.IQuickInputService),F(15,D.IConfigurationResolverService),F(16,w.ITerminalService),F(17,w.ITerminalGroupService),F(18,g.IStorageService),F(19,a.IProgressService),F(20,n.IOpenerService),F(21,S.IDialogService),F(22,d.INotificationService),F(23,f.IContextKeyService),F(24,T.IWorkbenchEnvironmentService),F(25,B.ITerminalProfileResolverService),F(26,M.IPathService),F(27,r.ITextModelService),F(28,O.IPreferencesService),F(29,v.IViewDescriptorService),F(30,P.IWorkspaceTrustRequestService),F(31,P.IWorkspaceTrustManagementService),F(32,l.ILogService),F(33,z.IThemeService),F(34,x.IInstantiationService),F(35,H.IRemoteAgentService),F(36,W.IAudioCueService)],U),e.TaskService=U,(0,I.registerSingleton)(E.ITaskService,U,1)}),define(ae[2802],le([1,0,76,8,7,38,12,109,1907,10,5,79,15,84,185,29,36,113,2400,218,292,179,68,2,181,11,328,9,290,37,211,154,73,253,345,69,189,453,891]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTabList=e.TerminalTabsListSizes=void 0;const z=b.$;var x;(function(q){q[q.TabHeight=22]="TabHeight",q[q.NarrowViewWidth=46]="NarrowViewWidth",q[q.WideViewMinimumWidth=80]="WideViewMinimumWidth",q[q.DefaultWidth=120]="DefaultWidth",q[q.MidpointViewWidth=63]="MidpointViewWidth",q[q.ActionbarMinimumWidth=105]="ActionbarMinimumWidth",q[q.MaximumWidth=500]="MaximumWidth"})(x=e.TerminalTabsListSizes||(e.TerminalTabsListSizes={}));let H=class extends t.WorkbenchList{constructor(X,G,Q,j,K,Y,ee,ie,re,oe,se){super("TerminalTabsList",X,{getHeight:()=>22,getTemplateId:()=>"terminal.tabs"},[ie.createInstance(W,X,ie.createInstance(d.ResourceLabels,d.DEFAULT_LABELS_CONTAINER),()=>this.getSelectedElements())],{horizontalScrolling:!1,supportDynamicHeights:!1,selectionNavigation:!0,identityProvider:{getId:Z=>Z?.instanceId},accessibilityProvider:ie.createInstance(U),smoothScrolling:K.getValue("workbench.list.smoothScrolling"),multipleSelectionSupport:!0,additionalScrollHeight:22,dnd:ie.createInstance($),openOnSingleClick:!0},G,Q,j,K,ie),this._configurationService=K,this._terminalService=Y,this._terminalGroupService=ee,this._themeService=oe;const te=[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(Z=>{if(Z){const ne=this._terminalGroupService.instances.indexOf(Z);this.setSelection([ne]),this.reveal(ne)}this.refresh()})];se.onWillShutdown(Z=>{(0,g.dispose)(te)}),this.onMouseDblClick(async Z=>{if(this.getFocus().length===0){const ce=await this._terminalService.createTerminal({location:i.TerminalLocation.Panel});this._terminalGroupService.setActiveInstance(ce),await ce.focusWhenReady()}this._getFocusMode()==="doubleClick"&&this.getFocus().length===1&&Z.element?.focus(!0)}),this.onMouseClick(async Z=>{Z.browserEvent.altKey&&Z.element?await this._terminalService.createTerminal({location:{parentTerminal:Z.element}}):this._getFocusMode()==="singleClick"&&this.getSelection().length<=1&&Z.element?.focus(!0)}),this.onContextMenu(Z=>{if(!Z.element){this.setSelection([]);return}const ne=this.getSelectedElements();(!ne||!ne.find(ce=>Z.element===ce))&&this.setFocus(Z.index!==void 0?[Z.index]:[])}),this._terminalTabsSingleSelectedContextKey=P.TerminalContextKeys.tabsSingularSelection.bindTo(G),this._isSplitContextKey=P.TerminalContextKeys.splitTerminal.bindTo(G),this.onDidChangeSelection(Z=>this._updateContextKey()),this.onDidChangeFocus(()=>this._updateContextKey()),this.onDidOpen(async Z=>{const ne=Z.element;!ne||(this._terminalGroupService.setActiveInstance(ne),Z.editorOptions.preserveFocus||await ne.focusWhenReady())}),this._decorationsProvider||(this._decorationsProvider=ie.createInstance(s.TerminalDecorationsProvider),re.registerDecorationsProvider(this._decorationsProvider)),this.refresh()}_getFocusMode(){return this._configurationService.getValue("terminal.integrated.tabs.focusMode")}refresh(X=!0){X&&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 X=this.getFocusedElements();this._isSplitContextKey.set(X.length>0&&this._terminalGroupService.instanceIsSplit(X[0]))}};H=we([F(1,R.IContextKeyService),F(2,t.IListService),F(3,k.IThemeService),F(4,p.IConfigurationService),F(5,E.ITerminalService),F(6,E.ITerminalGroupService),F(7,S.IInstantiationService),F(8,n.IDecorationsService),F(9,k.IThemeService),F(10,N.ILifecycleService)],H),e.TerminalTabList=H;let W=class{constructor(X,G,Q,j,K,Y,ee,ie,re,oe,se,te){this._container=X,this._labels=G,this._getSelection=Q,this._instantiationService=j,this._terminalService=K,this._terminalGroupService=Y,this._hoverService=ee,this._configurationService=ie,this._keybindingService=re,this._listService=oe,this._themeService=se,this._contextViewService=te,this.templateId="terminal.tabs"}renderTemplate(X){const G=b.append(X,z(".terminal-tabs-entry")),Q={},j=this._labels.create(G,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0,hoverDelegate:{delay:this._configurationService.getValue("workbench.hover.delay"),showHover:ee=>this._hoverService.showHover({...ee,actions:Q.hoverActions,hideOnHover:!0})}}),K=b.append(j.element,z(".actions")),Y=new C.ActionBar(K,{actionViewItemProvider:ee=>ee instanceof r.MenuItemAction?this._instantiationService.createInstance(u.MenuEntryActionViewItem,ee,void 0):void 0});return{element:G,label:j,actionBar:Y,context:Q,elementDisposables:new g.DisposableStore}}shouldHideText(){return this._container?this._container.clientWidth<63:!1}shouldHideActionBar(){return this._container?this._container.clientWidth<=105:!1}renderElement(X,G,Q){const j=!this.shouldHideText(),K=this._terminalGroupService.getGroupForInstance(X);if(!K)throw new Error(`Could not find group for instance "${X.instanceId}"`);Q.element.classList.toggle("has-text",j),Q.element.classList.toggle("is-active",this._terminalGroupService.activeInstance===X);let Y="";if(K.terminalInstances.length>1){const he=K.terminalInstances.indexOf(X);he===0?Y="\u250C ":he===K.terminalInstances.length-1?Y="\u2514 ":Y="\u251C "}let ee="";const ie=X.statusList.statuses;Q.context.hoverActions=[];for(const he of ie)ee+=` --- ${he.icon?`$(${he.icon?.id}) `:""}${he.tooltip||he.id}`,he.hoverActions&&Q.context.hoverActions.push(...he.hoverActions);const re=(0,V.getShellIntegrationTooltip)(X,!0),oe=this._instantiationService.invokeFunction(D.getIconId,X),se=!this.shouldHideActionBar();let te="";if(j)this.fillActionBar(X,Q),te=Y,X.icon&&(te+=`$(${oe}) ${X.title}`);else{const he=X.statusList.primary;he&&he.severity>o.default.Ignore?te=`${Y}$(${he.icon?.id||oe})`:te=`${Y}$(${oe})`}se||Q.actionBar.clear(),Q.elementDisposables.add(b.addDisposableListener(Q.element,b.EventType.AUXCLICK,he=>{he.stopImmediatePropagation(),he.button===1&&this._terminalService.safeDisposeTerminal(X)}));const Z=[],ne=(0,D.getColorClass)(X);ne&&Z.push(ne);const ce=(0,D.getUriClasses)(X,this._themeService.getColorTheme().type);ce&&Z.push(...ce),Q.label.setResource({resource:X.resource,name:te,description:j?X.description:void 0},{fileDecorations:{colors:!0,badges:j},title:{markdown:new l.MarkdownString(X.title+re+ee,{supportThemeIcons:!0}),markdownNotSupportedFallback:void 0},extraClasses:Z});const de=this._terminalService.getEditableData(X);Q.label.element.classList.toggle("editable-tab",!!de),de&&(Q.elementDisposables.add(this._renderInputBox(Q.label.element.querySelector(".monaco-icon-label-container"),X,de)),Q.actionBar.clear())}_renderInputBox(X,G,Q){const j=G.title||"",K=new T.InputBox(X,this._contextViewService,{validationOptions:{validation:oe=>{const se=Q.validationMessage(oe);return!se||se.severity!==o.default.Error?null:{content:se.content,formatContent:!0,type:3}}},ariaLabel:(0,I.localize)(0,null)}),Y=(0,L.attachInputBoxStyler)(K,this._themeService);K.element.style.height="22px",K.value=j,K.focus(),K.select({start:0,end:j.length});const ee=(0,_.once)((oe,se)=>{K.element.style.display="none";const te=K.value;(0,g.dispose)(re),K.element.remove(),se&&Q.onFinish(te,oe)}),ie=()=>{if(K.isInputValid()){const oe=Q.validationMessage(K.value);oe?K.showMessage({content:oe.content,formatContent:!0,type:oe.severity===o.default.Info?1:oe.severity===o.default.Warning?2:3}):K.hideMessage()}};ie();const re=[K,b.addStandardDisposableListener(K.inputElement,b.EventType.KEY_DOWN,oe=>{oe.stopPropagation(),oe.equals(3)?ee(K.isInputValid(),!0):oe.equals(9)&&ee(!1,!0)}),b.addStandardDisposableListener(K.inputElement,b.EventType.KEY_UP,oe=>{ie()}),b.addDisposableListener(K.inputElement,b.EventType.BLUR,()=>{ee(K.isInputValid(),!0)}),Y];return(0,g.toDisposable)(()=>{ee(!1,!1)})}disposeElement(X,G,Q){Q.elementDisposables.clear(),Q.actionBar.clear()}disposeTemplate(X){X.elementDisposables.dispose(),X.label.dispose(),X.actionBar.dispose()}fillActionBar(X,G){const Q=[new c.Action("workbench.action.terminal.splitInstance",O.terminalStrings.split.short,k.ThemeIcon.asClassName(f.Codicon.splitHorizontal),!0,async()=>{this._runForSelectionOrInstance(X,async j=>{this._terminalService.createTerminal({location:{parentTerminal:j}})})}),new c.Action("workbench.action.terminal.killInstance",O.terminalStrings.kill.short,k.ThemeIcon.asClassName(f.Codicon.trashcan),!0,async()=>{this._runForSelectionOrInstance(X,j=>this._terminalService.safeDisposeTerminal(j))})];G.actionBar.clear();for(const j of Q)G.actionBar.push(j,{icon:!0,label:!1,keybinding:this._keybindingService.lookupKeybinding(j.id)?.getLabel()})}_runForSelectionOrInstance(X,G){const Q=this._getSelection();if(Q.includes(X))for(const j of Q)j&&G(j);else G(X);this._terminalGroupService.focusTabs(),this._listService.lastFocusedList?.focusNext()}};W=we([F(3,S.IInstantiationService),F(4,E.ITerminalService),F(5,E.ITerminalGroupService),F(6,a.IHoverService),F(7,p.IConfigurationService),F(8,A.IKeybindingService),F(9,t.IListService),F(10,k.IThemeService),F(11,y.IContextViewService)],W);let U=class{constructor(X){this._terminalGroupService=X}getWidgetAriaLabel(){return(0,I.localize)(1,null)}getAriaLabel(X){let G="";const Q=this._terminalGroupService.getGroupForInstance(X);if(Q&&Q.terminalInstances?.length>1){const j=Q.terminalInstances.indexOf(X);G=(0,I.localize)(2,null,X.instanceId,X.title,j+1,Q.terminalInstances.length)}else G=(0,I.localize)(3,null,X.instanceId,X.title);return G}};U=we([F(0,E.ITerminalGroupService)],U);let $=class{constructor(X,G){this._terminalService=X,this._terminalGroupService=G,this._autoFocusDisposable=g.Disposable.None,this._primaryBackend=this._terminalService.getPrimaryBackend()}getDragURI(X){return X.resource.toString()}getDragLabel(X,G){return X.length===1?X[0].title:void 0}onDragLeave(){this._autoFocusInstance=void 0,this._autoFocusDisposable.dispose(),this._autoFocusDisposable=g.Disposable.None}onDragStart(X,G){if(!G.dataTransfer)return;const Q=X.getData();if(!Array.isArray(Q))return;const j=Q.filter(K=>"instanceId"in K);j.length>0&&G.dataTransfer.setData("Terminals",JSON.stringify(j.map(K=>K.resource.toString())))}onDragOver(X,G,Q,j){if(X instanceof m.NativeDragAndDropData&&!(0,M.containsDragType)(j,h.DataTransfers.FILES,h.DataTransfers.RESOURCES,"Terminals",M.CodeDataTransfers.FILES))return!1;const K=this._autoFocusInstance!==G;return K&&(this._autoFocusDisposable.dispose(),this._autoFocusInstance=G),!G&&!(0,M.containsDragType)(j,"Terminals")?X instanceof m.ElementsDragAndDropData:(K&&G&&(this._autoFocusDisposable=(0,v.disposableTimeout)(()=>{this._terminalService.setActiveInstance(G),this._autoFocusInstance=void 0},500)),{feedback:Q?[Q]:void 0,accept:!0,effect:1})}async drop(X,G,Q,j){this._autoFocusDisposable.dispose(),this._autoFocusInstance=void 0;let K;const Y=[],ee=(0,B.getTerminalResourcesFromDragEvent)(j);if(ee)for(const re of ee){const oe=this._terminalService.getInstanceFromResource(re);if(oe)K=[oe],this._terminalService.moveToTerminalView(oe);else if(this._primaryBackend){const se=(0,B.parseTerminalUri)(re);se.instanceId&&Y.push(this._primaryBackend.requestDetachInstance(se.workspaceId,se.instanceId))}}if(Y.length){let re=await Promise.all(Y);re=re.filter(se=>se!==void 0);let oe;for(const se of re)oe=await this._terminalService.createTerminal({config:{attachPersistentProcess:se}});oe&&this._terminalService.setActiveInstance(oe);return}if(K===void 0){if(!(X instanceof m.ElementsDragAndDropData)){this._handleExternalDrop(G,j);return}const re=X.getData();if(!re||!Array.isArray(re))return;K=[];for(const oe of re)"instanceId"in oe&&K.push(oe)}if(!G){this._terminalGroupService.moveGroupToEnd(K[0]),this._terminalService.setActiveInstance(K[0]);return}let ie=!1;for(const re of K)this._terminalGroupService.moveGroup(re,G),ie||(this._terminalService.setActiveInstance(re),ie=!0)}async _handleExternalDrop(X,G){if(!X||!G.dataTransfer)return;let Q;const j=G.dataTransfer.getData(h.DataTransfers.RESOURCES);j&&(Q=w.URI.parse(JSON.parse(j)[0]).fsPath);const K=G.dataTransfer.getData(M.CodeDataTransfers.FILES);!Q&&K&&(Q=w.URI.file(JSON.parse(K)[0]).fsPath),!Q&&G.dataTransfer.files.length>0&&G.dataTransfer.files[0].path&&(Q=w.URI.file(G.dataTransfer.files[0].path).fsPath),Q&&(this._terminalService.setActiveInstance(X),X.focus(),await X.sendPath(Q,!1))}};$=we([F(0,E.ITerminalService),F(1,E.ITerminalGroupService)],$)}),define(ae[2803],le([1,0,221,2,8,5,109,2802,14,10,237,26,36,15,7,37,23,1906,888,189]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TerminalTabbedView=void 0;const n=b.$;var a;(function(h){h.ViewIsVertical="terminal-side-view"})(a||(a={}));var o;(function(h){h[h.StatusIcon=30]="StatusIcon",h[h.SplitAnnotation=30]="SplitAnnotation"})(o||(o={}));let g=class extends p.Disposable{constructor(v,m,w,D,y,T,_,L,M,O){super(),this._terminalService=m,this._terminalGroupService=w,this._instantiationService=D,this._notificationService=y,this._contextMenuService=T,this._configurationService=_,this._storageService=M,this._cancelContextMenu=!1,this._parentElement=v,this._tabContainer=n(".tabs-container");const N=n(".tabs-list-container");this._tabListElement=n(".tabs-list"),N.appendChild(this._tabListElement),this._tabContainer.appendChild(N),this._instanceMenu=this._register(L.createMenu(u.MenuId.TerminalInstanceContext,O)),this._tabsListMenu=this._register(L.createMenu(u.MenuId.TerminalTabContext,O)),this._tabsListEmptyMenu=this._register(L.createMenu(u.MenuId.TerminalTabEmptyAreaContext,O)),this._tabList=this._register(this._instantiationService.createInstance(E.TerminalTabList,this._tabListElement));const P=n(".terminal-outer-container");this._terminalContainer=n(".terminal-groups-container"),P.appendChild(this._terminalContainer),this._terminalService.setContainers(v,this._terminalContainer),this._terminalIsTabsNarrowContextKey=d.TerminalContextKeys.tabsNarrow.bindTo(O),this._terminalTabsFocusContextKey=d.TerminalContextKeys.tabsFocus.bindTo(O),this._terminalTabsMouseContextKey=d.TerminalContextKeys.tabsMouse.bindTo(O),this._tabTreeIndex=this._terminalService.configHelper.config.tabs.location==="left"?0:1,this._terminalContainerIndex=this._terminalService.configHelper.config.tabs.location==="left"?1:0,_.onDidChangeConfiguration(B=>{B.affectsConfiguration("terminal.integrated.tabs.enabled")||B.affectsConfiguration("terminal.integrated.tabs.hideCondition")?this._refreshShowTabs():B.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._attachEventListeners(v,this._terminalContainer),this._terminalGroupService.onDidChangePanelOrientation(B=>{this._panelOrientation=B,this._panelOrientation===0?this._terminalContainer.classList.add("terminal-side-view"):this._terminalContainer.classList.remove("terminal-side-view")}),this._splitView=new t.SplitView(v,{orientation:1,proportionalLayout:!1}),this._setupSplitView(P)}_shouldShowTabs(){const v=this._terminalService.configHelper.config.tabs.enabled,m=this._terminalService.configHelper.config.tabs.hideCondition;return v?m==="never"||m==="singleTerminal"&&this._terminalGroupService.instances.length>1||m==="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 v=this._panelOrientation===0?"tabs-list-width-vertical":"tabs-list-width-horizontal",m=this._storageService.get(v,0);return!m||!parseInt(m)?this._panelOrientation===0?46:120:parseInt(m)}_handleOnDidSashReset(){let v=80;const m=document.createElement("canvas");m.width=1,m.height=1;const w=m.getContext("2d");if(w){const y=window.getComputedStyle(this._tabListElement);w.font=`${y.fontStyle} ${y.fontSize} ${y.fontFamily}`;const T=this._terminalGroupService.instances.reduce((_,L)=>Math.max(_,w.measureText(L.title+(L.description||"")).width+this._getAdditionalWidth(L)),0);v=Math.ceil(Math.max(T,80))}Math.ceil(this._splitView.getViewSize(this._tabTreeIndex))===v&&(v=46),this._splitView.resizeView(this._tabTreeIndex,v),this._updateListWidth(v)}_getAdditionalWidth(v){const w=v.statusList.statuses.length>0?30:0,D=(this._terminalGroupService.getGroupForInstance(v)?.terminalInstances.length||0)>1?30:0;return 40+D+w}_handleOnDidSashChange(){const v=this._splitView.getViewSize(this._tabTreeIndex);!this._width||v<=0||this._updateListWidth(v)}_updateListWidth(v){v<63&&v>=46?(v=46,this._splitView.resizeView(this._tabTreeIndex,v)):v>=63&&v<80&&(v=80,this._splitView.resizeView(this._tabTreeIndex,v)),this.rerenderTabs();const m=this._panelOrientation===0?"tabs-list-width-vertical":"tabs-list-width-horizontal";this._storageService.store(m,v,0,0)}_setupSplitView(v){this._register(this._splitView.onDidSashReset(()=>this._handleOnDidSashReset())),this._register(this._splitView.onDidSashChange(()=>this._handleOnDidSashChange())),this._shouldShowTabs()&&this._addTabTree(),this._splitView.addView({element:v,layout:m=>this._terminalGroupService.groups.forEach(w=>w.layout(m,this._height||0)),minimumSize:120,maximumSize:Number.POSITIVE_INFINITY,onDidChange:()=>p.Disposable.None,priority:2},t.Sizing.Distribute,this._terminalContainerIndex),this._shouldShowTabs()&&this._addSashListener()}_addTabTree(){this._splitView.addView({element:this._tabContainer,layout:v=>this._tabList.layout(this._height||0,v),minimumSize:46,maximumSize:500,onDidChange:()=>p.Disposable.None,priority:1},t.Sizing.Distribute,this._tabTreeIndex),this.rerenderTabs()}rerenderTabs(){this._updateHasText(),this._tabList.refresh()}_addSashListener(){let v;this._sashDisposables=[this._splitView.sashes[0].onDidStart(m=>{v=window.setInterval(()=>{this.rerenderTabs()},100)}),this._splitView.sashes[0].onDidEnd(m=>{window.clearInterval(v),v=0})]}_removeSashListener(){this._sashDisposables&&((0,p.dispose)(this._sashDisposables),this._sashDisposables=void 0)}_updateHasText(){const v=this._tabListElement.clientWidth>63;this._tabContainer.classList.toggle("has-text",v),this._terminalIsTabsNarrowContextKey.set(!v)}layout(v,m){this._height=m,this._width=v,this._splitView.layout(v),this._shouldShowTabs()&&this._splitView.resizeView(this._tabTreeIndex,this._getLastListWidth()),this._updateHasText()}_attachEventListeners(v,m){this._register(b.addDisposableListener(this._tabContainer,"mouseleave",async w=>{this._terminalTabsMouseContextKey.set(!1),this._refreshShowTabs(),w.stopPropagation()})),this._register(b.addDisposableListener(this._tabContainer,"mouseenter",async w=>{this._terminalTabsMouseContextKey.set(!0),w.stopPropagation()})),this._register(b.addDisposableListener(m,"mousedown",async w=>{const D=this._terminalGroupService.activeInstance;if(this._terminalGroupService.instances.length===0||!D){this._cancelContextMenu=!0;return}if(w.which===2&&I.isLinux)D.focus();else if(w.which===3){const y=this._terminalService.configHelper.config.rightClickBehavior;if(y==="nothing"){w.shiftKey||(this._cancelContextMenu=!0);return}else if(y==="copyPaste"||y==="paste"){if(y==="copyPaste"&&w.shiftKey){(0,s.openContextMenu)(w,this._parentElement,this._instanceMenu,this._contextMenuService);return}y==="copyPaste"&&D.hasSelection()?(await D.copySelection(),D.clearSelection()):S.BrowserFeatures.clipboard.readText?D.paste():this._notificationService.info(`This browser doesn't support the clipboard.readText API needed to trigger a paste, try ${I.isMacintosh?"\u2318":"Ctrl"}+V instead.`),I.isMacintosh&&setTimeout(()=>{D.clearSelection()},0),this._cancelContextMenu=!0}}})),this._register(b.addDisposableListener(m,"contextmenu",w=>{this._terminalService.configHelper.config.rightClickBehavior==="nothing"&&!w.shiftKey&&(this._cancelContextMenu=!0),this._cancelContextMenu||(0,s.openContextMenu)(w,this._parentElement,this._instanceMenu,this._contextMenuService),w.preventDefault(),w.stopImmediatePropagation(),this._cancelContextMenu=!1})),this._register(b.addDisposableListener(this._tabContainer,"contextmenu",w=>{if(this._terminalService.configHelper.config.rightClickBehavior==="nothing"&&!w.shiftKey&&(this._cancelContextMenu=!0),!this._cancelContextMenu){const y=this._tabList.getFocus().length===0;(0,s.openContextMenu)(w,this._parentElement,y?this._tabsListEmptyMenu:this._tabsListMenu,this._contextMenuService,y?this._getTabActions():void 0)}w.preventDefault(),w.stopImmediatePropagation(),this._cancelContextMenu=!1})),this._register(b.addDisposableListener(document,"keydown",w=>{m.classList.toggle("alt-active",!!w.altKey)})),this._register(b.addDisposableListener(document,"keyup",w=>{m.classList.toggle("alt-active",!!w.altKey)})),this._register(b.addDisposableListener(v,"keyup",w=>{w.keyCode===27&&w.stopPropagation()})),this._register(b.addDisposableListener(this._tabContainer,b.EventType.FOCUS_IN,()=>{this._terminalTabsFocusContextKey.set(!0)})),this._register(b.addDisposableListener(this._tabContainer,b.EventType.FOCUS_OUT,()=>{this._terminalTabsFocusContextKey.set(!1)}))}_getTabActions(){return[new r.Separator,this._configurationService.inspect("terminal.integrated.tabs.location").userValue==="left"?new r.Action("moveRight",(0,l.localize)(0,null),void 0,void 0,async()=>{this._configurationService.updateValue("terminal.integrated.tabs.location","right")}):new r.Action("moveLeft",(0,l.localize)(1,null),void 0,void 0,async()=>{this._configurationService.updateValue("terminal.integrated.tabs.location","left")}),new r.Action("hideTabs",(0,l.localize)(2,null),void 0,void 0,async()=>{this._configurationService.updateValue("terminal.integrated.tabs.enabled",!1)})]}setEditable(v){v||this._tabList.domFocus(),this._tabList.refresh(!1)}focusTabs(){if(!this._shouldShowTabs())return;this._terminalTabsFocusContextKey.set(!0);const v=this._tabList.getSelection();this._tabList.domFocus(),v&&this._tabList.setFocus(v)}focus(){if(this._terminalService.connectionState===0){const v=document.activeElement;this._register(this._terminalService.onDidChangeConnectionState(()=>{document.activeElement===v&&this._focus()}));return}this._focus()}_focus(){this._terminalGroupService.activeInstance?.focusWhenReady()}};g=we([F(1,k.ITerminalService),F(2,k.ITerminalGroupService),F(3,A.IInstantiationService),F(4,C.INotificationService),F(5,f.IContextMenuService),F(6,R.IConfigurationService),F(7,u.IMenuService),F(8,c.IStorageService),F(9,i.IContextKeyService)],g),e.TerminalTabbedView=g}),define(ae[689],le([1,0,9,1946,46,23,24,260,19,78,34,248]),function(J,e,t,p,R,A,k,E,I,b,S,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 r=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,p.localize)(0,null),args:[]},handler:async n=>{n.get(k.IEditorService).openEditor({resource:r,languageId:"jsonc",options:{pinned:!0}})}};async function u(n,a,o,g,h,v,m){const w=t.URI.parse(a),D=w.authority.split("."),y=D.slice(D.length-2).join("."),T="*."+y,_=[];if(_.push({type:"item",label:(0,p.localize)(1,null,a),id:"trust",toTrust:a,picked:!0}),D.length===4&&D.every(O=>Number.isInteger(+O)||Number.isInteger(+O.split(":")[0]))){if(w.authority.includes(":")){const O=w.authority.split(":")[0];_.push({type:"item",label:(0,p.localize)(2,null,O),toTrust:O+":*",id:"trust"})}}else _.push({type:"item",label:(0,p.localize)(3,null,y),toTrust:T,id:"trust"});_.push({type:"item",label:(0,p.localize)(4,null),toTrust:"*",id:"trust"}),_.push({type:"item",label:(0,p.localize)(5,null),id:"manage"});const M=await g.pick(_,{activeItem:_[0]});if(M&&M.id)switch(M.id){case"manage":return await v.openEditor({resource:r.with({fragment:o.toString()}),languageId:"jsonc",options:{pinned:!0}}),n;case"trust":{const O=M.toTrust;if(n.indexOf(O)===-1)return h.remove(e.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY,-1),h.store(e.TRUSTED_DOMAINS_STORAGE_KEY,JSON.stringify([...n,O]),-1,0),[...n,O]}}return[]}e.configureOpenerTrustedDomainsHandler=u;function i(n){const a=new Set;let o;const g=/^\s*url\s*=\s*(?:git@|https:\/\/)github\.com(?::|\/)(\S*)\s*$/mg;for(;o=g.exec(n);){const h=o[1].replace(/\.git$/,"");h&&a.add(`https://github.com/${h}/`)}return[...a]}e.extractGitHubRemotesFromGitConfig=i;async function f(n,a,o){const g=o.getWorkspace().folders.map(m=>m.uri);return[...(await Promise.race([new Promise(m=>setTimeout(()=>m([]),2e3)),Promise.all(g.map(async m=>{try{const w=m.path,D=m.with({path:`${w!=="/"?w:""}/.git/config`});if(!await n.exists(D))return[];const T=(await a.read(D,{acceptTextOnly:!0}).catch(()=>({value:""}))).value;return i(T)}catch{return[]}}))])).reduce((m,w)=>w.reduce((D,y)=>D.add(y),m),new Set)]}async function c(n){const{defaultTrustedDomains:a,trustedDomains:o}=d(n),[g,h]=await Promise.all([l(n),s(n)]);return{workspaceDomains:g,userDomains:h,defaultTrustedDomains:a,trustedDomains:o}}e.readTrustedDomains=c;async function l(n){const a=n.get(I.IFileService),o=n.get(b.ITextFileService),g=n.get(S.IWorkspaceContextService);return f(a,o,g)}e.readWorkspaceTrustedDomains=l;async function s(n){const a=n.get(E.IAuthenticationService);return a.isAuthenticationProviderRegistered("github")&&(await a.getSessions("github")??[]).length>0?["https://github.com"]:[]}e.readAuthenticationTrustedDomains=s;function d(n){const a=n.get(A.IStorageService),o=n.get(R.IProductService),g=n.get(C.IBrowserWorkbenchEnvironmentService),h=[...o.linkProtectionTrustedDomains??[],...g.options?.additionalTrustedDomains??[]];let v=[];try{const m=a.get(e.TRUSTED_DOMAINS_STORAGE_KEY,-1);m&&(v=JSON.parse(m))}catch{}return{defaultTrustedDomains:h,trustedDomains:v}}e.readStaticTrustedDomains=d}),define(ae[2804],le([1,0,6,123,19,23,56,689,13,5]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TrustedDomainsFileSystemProvider=void 0;const S="trustedDomains",C={type:R.FileType.File,ctime:Date.now(),mtime:Date.now(),size:0},r=`// 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 // `,u=`// // 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 f(l,s,d,n,a){let o=r;return l.length>0?(o+=`// By default, VS Code trusts "localhost" as well as the following domains: `,l.forEach(g=>{o+=`// - "${g}" `})):o+=`// By default, VS Code trusts "localhost". `,d.length&&(o+=`// // Additionally, the following domains are trusted based on your logged-in Accounts: `,d.forEach(g=>{o+=`// - "${g}" `})),n.length&&(o+=`// // Further, the following domains are trusted based on your workspace configuration: `,n.forEach(g=>{o+=`// - "${g}" `})),o+=u,o+=a?` // Currently configuring trust for ${a} `:"",s.length===0?o+=i:o+=JSON.stringify(s,null,2),o}let c=class{constructor(s,d,n){this.fileService=s,this.storageService=d,this.instantiationService=n,this.capabilities=2,this.onDidChangeCapabilities=t.Event.None,this.onDidChangeFile=t.Event.None,this.fileService.registerProvider(S,this)}stat(s){return Promise.resolve(C)}async readFile(s){let d=this.storageService.get(E.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY,-1);const n=s.fragment,{defaultTrustedDomains:a,trustedDomains:o,userDomains:g,workspaceDomains:h}=await this.instantiationService.invokeFunction(E.readTrustedDomains);return(!d||d.indexOf(r)===-1||d.indexOf(u)===-1||d.indexOf(n??"")===-1||[...a,...o,...g,...h].some(m=>!(0,I.assertIsDefined)(d).includes(m)))&&(d=f(a,o,g,h,n)),k.VSBuffer.fromString(d).buffer}writeFile(s,d,n){try{const a=k.VSBuffer.wrap(d).toString(),o=(0,p.parse)(a);this.storageService.store(E.TRUSTED_DOMAINS_CONTENT_STORAGE_KEY,a,-1,0),this.storageService.store(E.TRUSTED_DOMAINS_STORAGE_KEY,JSON.stringify(o)||"",-1,0)}catch{}return Promise.resolve()}watch(s,d){return{dispose(){}}}mkdir(s){return Promise.resolve(void 0)}readdir(s){return Promise.resolve(void 0)}delete(s,d){return Promise.resolve(void 0)}rename(s,d,n){return Promise.resolve(void 0)}};c=we([F(0,R.IFileService),F(1,A.IStorageService),F(2,b.IInstantiationService)],c),e.TrustedDomainsFileSystemProvider=c}),define(ae[2805],le([1,0,22,68,9,1947,47,41,46,48,23,689,24,93,27,5,11,260,34,901,118,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isURLDomainTrusted=e.OpenerValidatorContributions=void 0;let o=class{constructor(y,T,_,L,M,O,N,P,B,V,z,x,H){this._openerService=y,this._storageService=T,this._dialogService=_,this._productService=L,this._quickInputService=M,this._editorService=O,this._clipboardService=N,this._telemetryService=P,this._instantiationService=B,this._authenticationService=V,this._workspaceContextService=z,this._configurationService=x,this._workspaceTrustService=H,this._openerService.registerValidator({shouldOpen:(W,U)=>this.validateLink(W,U)}),this._readAuthenticationTrustedDomainsResult=new c.IdleValue(()=>this._instantiationService.invokeFunction(C.readAuthenticationTrustedDomains)),this._authenticationService.onDidRegisterAuthenticationProvider(()=>{this._readAuthenticationTrustedDomainsResult?.dispose(),this._readAuthenticationTrustedDomainsResult=new c.IdleValue(()=>this._instantiationService.invokeFunction(C.readAuthenticationTrustedDomains))}),this._readWorkspaceTrustedDomainsResult=new c.IdleValue(()=>this._instantiationService.invokeFunction(C.readWorkspaceTrustedDomains)),this._workspaceContextService.onDidChangeWorkspaceFolders(()=>{this._readWorkspaceTrustedDomainsResult?.dispose(),this._readWorkspaceTrustedDomainsResult=new c.IdleValue(()=>this._instantiationService.invokeFunction(C.readWorkspaceTrustedDomains))})}async validateLink(y,T){if(!(0,E.matchesScheme)(y,t.Schemas.http)&&!(0,E.matchesScheme)(y,t.Schemas.https)||T?.fromWorkspace&&this._workspaceTrustService.isWorkspaceTrusted()&&!this._configurationService.getValue("workbench.trustedDomains.promptInTrustedWorkspace"))return!0;const _=y;typeof y=="string"&&(y=R.URI.parse(y));const{scheme:L,authority:M,path:O,query:N,fragment:P}=y,B=`${L}://${M}`,[V,z]=await Promise.all([this._readWorkspaceTrustedDomainsResult.value,this._readAuthenticationTrustedDomainsResult.value]),{defaultTrustedDomains:x,trustedDomains:H}=this._instantiationService.invokeFunction(C.readStaticTrustedDomains),W=[...x,...H,...z,...V];if(w(y,W))return!0;{let U=`${L}://${M}${O}`;const $=`${N?"?"+N:""}${P?"#"+P:""}`,q=Math.max(0,60-U.length),X=Math.min(Math.max(5,q),$.length);X===$.length?U+=$:U+=$.charAt(0)+"..."+$.substring($.length-X+1);const{choice:G}=await this._dialogService.show(p.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 _=="string"?_:U,cancelId:2});if(G===0)return!0;if(G===1)this._clipboardService.writeText(typeof _=="string"?_:y.toString(!0));else if(G===3){const Q=await(0,C.configureOpenerTrustedDomainsHandler)(H,B,y,this._quickInputService,this._storageService,this._editorService,this._telemetryService);return!!(Q.indexOf("*")!==-1||w(y,Q))}return!1}}};o=we([F(0,E.IOpenerService),F(1,S.IStorageService),F(2,k.IDialogService),F(3,I.IProductService),F(4,b.IQuickInputService),F(5,r.IEditorService),F(6,u.IClipboardService),F(7,i.ITelemetryService),F(8,f.IInstantiationService),F(9,l.IAuthenticationService),F(10,s.IWorkspaceContextService),F(11,a.IConfigurationService),F(12,n.IWorkspaceTrustManagementService)],o),e.OpenerValidatorContributions=o;const g=/^localhost(:\d+)?$/i,h=/^127.0.0.1(:\d+)?$/;function v(D){return g.test(D)||h.test(D)}function m(D){const y=["github.com"];try{const T=typeof D=="string"?R.URI.parse(D,!0):D;return y.includes(T.authority)?T.with({path:T.path.toLowerCase()}).toString(!0):T.toString(!0)}catch{return D.toString()}}function w(D,y){if(D=R.URI.parse(m(D)),y=y.map(m),v(D.authority))return!0;for(let T=0;T<y.length;T++)if(y[T]==="*"||(0,d.testUrlMatchesGlob)(D,y[T]))return!0;return!1}e.isURLDomainTrusted=w}),define(ae[2806],le([1,0,9,1948,15,31,48,17,435,44,2477,689,2804,2805,70,55,214]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class l extends R.Action2{constructor(){super({id:"workbench.action.url.openUrl",title:{value:(0,p.localize)(0,null),original:"Open URL"},category:i.Categories.Developer,f1:!0})}async run(n){const a=n.get(k.IQuickInputService),o=n.get(I.IURLService);return a.input({prompt:(0,p.localize)(1,null)}).then(g=>{if(g){const h=t.URI.parse(g);o.open(h,{originalUrl:g})}})}}(0,R.registerAction2)(l),A.CommandsRegistry.registerCommand(C.manageTrustedDomainSettingsCommand),R.MenuRegistry.appendMenuItem(R.MenuId.CommandPalette,{command:{id:C.manageTrustedDomainSettingsCommand.id,title:{value:C.manageTrustedDomainSettingsCommand.description.description,original:"Manage Trusted Domains"}}}),E.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(u.OpenerValidatorContributions,3),E.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(r.TrustedDomainsFileSystemProvider,2),E.Registry.as(b.Extensions.Workbench).registerWorkbenchContribution(S.ExternalUriResolverContribution,2),E.Registry.as(f.Extensions.Configuration).registerConfiguration({...c.workbenchConfigurationNodeBase,properties:{"workbench.trustedDomains.promptInTrustedWorkspace":{scope:1,type:"boolean",default:!1,description:(0,p.localize)(2,null)}}})}),define(ae[2807],le([1,0,1983,17,44,34,2,19,26,18,74,48,23,227,15,71,7,150]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspacesFinderContribution=void 0;let s=class extends k.Disposable{constructor(n,a,o,g,h,v){super(),this.contextService=n,this.notificationService=a,this.fileService=o,this.quickInputService=g,this.hostService=h,this.storageService=v,this.findWorkspaces()}async findWorkspaces(){const n=this.contextService.getWorkspace().folders[0];if(!n||this.contextService.getWorkbenchState()!==2||(0,u.isVirtualWorkspace)(this.contextService.getWorkspace()))return;const a=(await this.fileService.resolve(n.uri)).children?.map(o=>o.name);if(Array.isArray(a)){const o=a.filter(A.hasWorkspaceFileExtension);o.length>0&&this.doHandleWorkspaceFiles(n.uri,o)}}doHandleWorkspaceFiles(n,a){const o={id:"workspaces.dontPromptToOpen",scope:I.NeverShowAgainScope.WORKSPACE,isSecondary:!0};if(a.length===1){const g=a[0];this.notificationService.prompt(I.Severity.Info,(0,t.localize)(0,null,g,"https://go.microsoft.com/fwlink/?linkid=2025315"),[{label:(0,t.localize)(1,null),run:()=>this.hostService.openWindow([{workspaceUri:(0,b.joinPath)(n,g)}])}],{neverShowAgain:o,silent:!this.storageService.isNew(1)})}else a.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(a.map(g=>({label:g})),{placeHolder:(0,t.localize)(4,null)}).then(g=>{g&&this.hostService.openWindow([{workspaceUri:(0,b.joinPath)(n,g.label)}])})}}],{neverShowAgain:o,silent:!this.storageService.isNew(1)})}};s=we([F(0,A.IWorkspaceContextService),F(1,I.INotificationService),F(2,E.IFileService),F(3,C.IQuickInputService),F(4,S.IHostService),F(5,r.IStorageService)],s),e.WorkspacesFinderContribution=s,p.Registry.as(R.Extensions.Workbench).registerWorkbenchContribution(s,4),(0,i.registerAction2)(class extends i.Action2{constructor(){super({id:"workbench.action.openWorkspaceFromEditor",title:{original:"Open Workspace",value:(0,t.localize)(5,null)},f1:!1,menu:{id:i.MenuId.EditorContent,when:c.ContextKeyExpr.and(f.ResourceContextKey.Extension.isEqualTo(A.WORKSPACE_SUFFIX),f.ActiveEditorContext.isEqualTo(l.TEXT_FILE_EDITOR_ID),f.TemporaryWorkspaceContext.toNegated())}})}async run(d,n){const a=d.get(S.IHostService),o=d.get(A.IWorkspaceContextService),g=d.get(I.INotificationService);if(o.getWorkbenchState()===3){const h=o.getWorkspace().configuration;if(h&&(0,b.isEqual)(h,n)){g.info((0,t.localize)(6,null));return}}return a.openWindow([{workspaceUri:n}])}})}),define(ae[2808],le([1,0,1995,123,322,11,138,20,85,78,19,62,272,35]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSONEditingService=void 0;let i=class{constructor(c,l,s){this.fileService=c,this.textModelResolverService=l,this.textFileService=s,this.queue=new A.Queue}write(c,l,s){return Promise.resolve(this.queue.queue(()=>this.doWriteConfiguration(c,l,s)))}async doWriteConfiguration(c,l,s){const d=await this.resolveAndValidate(c,s);try{await this.writeToBuffer(d.object.textEditorModel,l,s)}finally{d.dispose()}}async writeToBuffer(c,l,s){let d=!1;for(const n of l){const a=this.getEdits(c,n)[0];d=this.applyEditsToBuffer(a,c)}if(d&&s)return this.textFileService.save(c.uri)}applyEditsToBuffer(c,l){const s=l.getPositionAt(c.offset),d=l.getPositionAt(c.offset+c.length),n=new E.Range(s.lineNumber,s.column,d.lineNumber,d.column),a=l.getValueInRange(n);if(c.content!==a){const o=a?k.EditOperation.replace(n,c.content):k.EditOperation.insert(s,c.content);return l.pushEditOperations([new I.Selection(s.lineNumber,s.column,s.lineNumber,s.column)],[o],()=>[]),!0}return!1}getEdits(c,l){const{tabSize:s,insertSpaces:d}=c.getOptions(),n=c.getEOL(),{path:a,value:o}=l;if(!a.length){const g=JSON.stringify(o,null,d?" ".repeat(s):" ");return[{content:g,length:g.length,offset:0}]}return(0,R.setProperty)(c.getValue(),a,o,{tabSize:s,insertSpaces:d,eol:n})}async resolveModelReference(c){return await this.fileService.exists(c)||await this.textFileService.write(c,"{}",{encoding:"utf8"}),this.textModelResolverService.createModelReference(c)}hasParseErrors(c){const l=[];return p.parse(c.getValue(),l,{allowTrailingComma:!0,allowEmptyContent:!0}),l.length>0}async resolveAndValidate(c,l){const s=await this.resolveModelReference(c),d=s.object.textEditorModel;return this.hasParseErrors(d)?(s.dispose(),this.reject(1)):l&&this.textFileService.isDirty(c)?(s.dispose(),this.reject(0)):s}reject(c){const l=this.toErrorMessage(c);return Promise.reject(new r.JSONEditingError(l,c))}toErrorMessage(c){switch(c){case 1:return t.localize(0,null);case 0:return t.localize(1,null)}}};i=we([F(0,S.IFileService),F(1,C.ITextModelService),F(2,b.ITextFileService)],i),e.JSONEditingService=i,(0,u.registerSingleton)(r.IJSONEditingService,i,1)}),define(ae[2809],le([1,0,8,114,14,22,23,51,35,104]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourcePropertiesService=void 0;let S=class{constructor(r,u,i,f){this.configurationService=r,this.environmentService=i,this.storageService=f,this.remoteEnvironment=null,u.getEnvironment().then(c=>this.remoteEnvironment=c)}getEOL(r,u){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:u,resource:r});if(i&&typeof i=="string"&&i!=="auto")return i;const f=this.getOS(r);return f===3||f===2?` `:`\r `}getOS(r){let u=R.OS;const i=this.environmentService.remoteAuthority;if(i&&r&&r.scheme!==A.Schemas.file){const f=`resource.authority.os.${i}`;u=this.remoteEnvironment?this.remoteEnvironment.os:this.storageService.getNumber(f,1,R.OS),this.storageService.store(f,u,1,1)}return u}};S=we([F(0,t.IConfigurationService),F(1,b.IRemoteAgentService),F(2,E.IWorkbenchEnvironmentService),F(3,k.IStorageService)],S),e.TextResourcePropertiesService=S,(0,I.registerSingleton)(p.ITextResourcePropertiesService,S,1)}),define(ae[2810],le([1,0,2048,131,33,65,17]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorExtensionPoint=void 0;const E=k.Registry.as(R.Extensions.ColorContribution),I=E.getColorReferenceSchema(),b="^\\w+[.\\w+]*$",S=p.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:b,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(){S.setHandler((u,i)=>{for(const f of i.added){const c=f.value,l=f.collector;if(!c||!Array.isArray(c)){l.error(t.localize(8,null));return}const s=(d,n)=>d.length>0?d[0]==="#"?A.Color.Format.CSS.parseHex(d):d:(l.error(t.localize(9,null,n)),A.Color.red);for(const d of c){if(typeof d.id!="string"||d.id.length===0){l.error(t.localize(10,null));return}if(!d.id.match(b)){l.error(t.localize(11,null));return}if(typeof d.description!="string"||d.id.length===0){l.error(t.localize(12,null));return}const n=d.defaults;if(!n||typeof n!="object"||typeof n.light!="string"||typeof n.dark!="string"){l.error(t.localize(13,null));return}if(n.highContrast&&typeof n.highContrast!="string"){l.error(t.localize(14,null));return}if(n.highContrastLight&&typeof n.highContrastLight!="string"){l.error(t.localize(15,null));return}E.registerColor(d.id,{light:s(n.light,"configuration.colors.defaults.light"),dark:s(n.dark,"configuration.colors.defaults.dark"),hcDark:s(n.highContrast??n.dark,"configuration.colors.defaults.highContrast"),hcLight:s(n.highContrastLight??n.light,"configuration.colors.defaults.highContrastLight")},d.description)}}for(const f of i.removed){const c=f.value;for(const l of c)E.deregisterColor(l.id)}})}}e.ColorExtensionPoint=C}),define(ae[690],le([1,0,2050,17,155,33,433]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerColorThemeSchemas=e.colorThemeSchemaId=e.textmateColorGroupSchemaId=e.textmateColorSettingsSchemaId=e.textmateColorsSchemaId=void 0;const E=["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:E},{type:"string"},{type:"array",items:{enum:E}},{type:"array",items:{type:"string"}}]},settings:{$ref:"#/definitions/settings"}},required:["settings"],additionalProperties:!1}};e.colorThemeSchemaId="vscode://schemas/color-theme";const b={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 S(){const C=p.Registry.as(R.Extensions.JSONContribution);C.registerSchema(e.colorThemeSchemaId,b),C.registerSchema(e.textmateColorsSchemaId,I)}e.registerColorThemeSchemas=S}),define(ae[969],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IHostColorSchemeService=void 0,e.IHostColorSchemeService=(0,t.createDecorator)("hostColorSchemeService")}),define(ae[2811],le([1,0,2052,131,63,17,29,18,53]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconExtensionPoint=void 0;const b=A.Registry.as(R.Extensions.IconContribution),S=b.getIconReferenceSchema(),C=`^${k.CSSIcon.iconNameSegment}(-${k.CSSIcon.iconNameSegment})+$`,r=p.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:[S,{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 u{constructor(){r.setHandler((c,l)=>{for(const s of l.added){const d=s.value,n=s.collector;if(!d||typeof d!="object"){n.error(t.localize(7,null));return}for(const a in d){if(!a.match(C)){n.error(t.localize(8,null));return}const o=d[a];if(typeof o.description!="string"||o.description.length===0){n.error(t.localize(9,null));return}const g=o.default;if(typeof g=="string")b.registerIcon(a,{id:g},o.description);else if(typeof g=="object"&&typeof g.fontPath=="string"&&typeof g.fontCharacter=="string"){const h=(0,I.extname)(g.fontPath).substring(1);if(["woff","woff2","ttf"].indexOf(h)===-1){n.warn(t.localize(10,null,h));return}const v=s.description.extensionLocation,m=E.joinPath(v,g.fontPath);if(!E.isEqualOrParent(m,v)){n.warn(t.localize(11,null,m.path,v.path));return}const w=i(s.description,g.fontPath),D=b.registerIconFont(w,{src:[{location:m,format:h}]});b.registerIcon(a,{fontCharacter:g.fontCharacter,font:{id:w,definition:D}},o.description)}else n.error(t.localize(12,null))}}for(const s of l.removed){const d=s.value;for(const n in d)b.deregisterIcon(n)}})}}e.IconExtensionPoint=u;function i(f,c){return I.posix.join(f.identifier.value,c)}}),define(ae[2812],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parse=e.parseWithLocation=void 0;var t;(function(E){E[E.BOM=65279]="BOM",E[E.SPACE=32]="SPACE",E[E.TAB=9]="TAB",E[E.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",E[E.LINE_FEED=10]="LINE_FEED",E[E.SLASH=47]="SLASH",E[E.LESS_THAN=60]="LESS_THAN",E[E.QUESTION_MARK=63]="QUESTION_MARK",E[E.EXCLAMATION_MARK=33]="EXCLAMATION_MARK"})(t||(t={}));var p;(function(E){E[E.ROOT_STATE=0]="ROOT_STATE",E[E.DICT_STATE=1]="DICT_STATE",E[E.ARR_STATE=2]="ARR_STATE"})(p||(p={}));function R(E,I,b){return k(E,I,b)}e.parseWithLocation=R;function A(E){return k(E,null,null)}e.parse=A;function k(E,I,b){const S=E.length;let C=0,r=1,u=0;S>0&&E.charCodeAt(0)===65279&&(C=1);function i($){if(b===null)C=C+$;else for(;$>0;)E.charCodeAt(C)===10?(C++,r++,u=0):(C++,u++),$--}function f($){b===null?C=$:i($-C)}function c(){for(;C<S;){const $=E.charCodeAt(C);if($!==32&&$!==9&&$!==13&&$!==10)break;i(1)}}function l($){return E.substr(C,$.length)===$?(i($.length),!0):!1}function s($){const q=E.indexOf($,C);f(q!==-1?q+$.length:S)}function d($){const q=E.indexOf($,C);if(q!==-1){const X=E.substring(C,q);return f(q+$.length),X}else{const X=E.substr(C);return f(S),X}}let n=0,a=null;const o=[],g=[];let h=null;function v($,q){o.push(n),g.push(a),n=$,a=q}function m(){if(o.length===0)return w("illegal state stack");n=o.pop(),a=g.pop()}function w($){throw new Error("Near offset "+C+": "+$+" ~~~"+E.substr(C,50)+"~~~")}const D={enterDict:function(){if(h===null)return w("missing <key>");const $={};b!==null&&($[b]={filename:I,line:r,char:u}),a[h]=$,h=null,v(1,$)},enterArray:function(){if(h===null)return w("missing <key>");const $=[];a[h]=$,h=null,v(2,$)}},y={enterDict:function(){const $={};b!==null&&($[b]={filename:I,line:r,char:u}),a.push($),v(1,$)},enterArray:function(){const $=[];a.push($),v(2,$)}};function T(){n===1?D.enterDict():n===2?y.enterDict():(a={},b!==null&&(a[b]={filename:I,line:r,char:u}),v(1,a))}function _(){if(n===1)m();else return w("unexpected </dict>")}function L(){n===1?D.enterArray():n===2?y.enterArray():(a=[],v(2,a))}function M(){if(n===1)return w("unexpected </array>");if(n===2)m();else return w("unexpected </array>")}function O($){if(n===1){if(h!==null)return w("too many <key>");h=$}else return w("unexpected <key>")}function N($){if(n===1){if(h===null)return w("missing <key>");a[h]=$,h=null}else n===2?a.push($):a=$}function P($){if(isNaN($))return w("cannot parse float");if(n===1){if(h===null)return w("missing <key>");a[h]=$,h=null}else n===2?a.push($):a=$}function B($){if(isNaN($))return w("cannot parse integer");if(n===1){if(h===null)return w("missing <key>");a[h]=$,h=null}else n===2?a.push($):a=$}function V($){if(n===1){if(h===null)return w("missing <key>");a[h]=$,h=null}else n===2?a.push($):a=$}function z($){if(n===1){if(h===null)return w("missing <key>");a[h]=$,h=null}else n===2?a.push($):a=$}function x($){if(n===1){if(h===null)return w("missing <key>");a[h]=$,h=null}else n===2?a.push($):a=$}function H($){return $.replace(/&#([0-9]+);/g,function(q,X){return String.fromCodePoint(parseInt(X,10))}).replace(/&#x([0-9a-f]+);/g,function(q,X){return String.fromCodePoint(parseInt(X,16))}).replace(/&|<|>|"|'/g,function(q){switch(q){case"&":return"&";case"<":return"<";case">":return">";case""":return'"';case"'":return"'"}return q})}function W(){let $=d(">"),q=!1;return $.charCodeAt($.length-1)===47&&(q=!0,$=$.substring(0,$.length-1)),{name:$.trim(),isClosed:q}}function U($){if($.isClosed)return"";const q=d("</");return s(">"),H(q)}for(;C<S&&(c(),!(C>=S));){const $=E.charCodeAt(C);if(i(1),$!==60)return w("expected <");if(C>=S)return w("unexpected end of input");const q=E.charCodeAt(C);if(q===63){i(1),s("?>");continue}if(q===33){if(i(1),l("--")){s("-->");continue}s(">");continue}if(q===47){if(i(1),c(),l("plist")){s(">");continue}if(l("dict")){s(">"),_();continue}if(l("array")){s(">"),M();continue}return w("unexpected closed tag")}const X=W();switch(X.name){case"dict":T(),X.isClosed&&_();continue;case"array":L(),X.isClosed&&M();continue;case"key":O(U(X));continue;case"string":N(U(X));continue;case"real":P(parseFloat(U(X)));continue;case"integer":B(parseInt(U(X),10));continue;case"date":V(new Date(U(X)));continue;case"data":z(U(X));continue;case"true":U(X),x(!0);continue;case"false":U(X),x(!1);continue}if(!/^plist/.test(X.name))return w("unexpected opened tag "+X.name)}return a}}),define(ae[691],le([1,0,2053,17,155,63]),function(J,e,t,p,R,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",E={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}}};function I(){p.Registry.as(R.Extensions.JSONContribution).registerSchema(k,E)}e.registerProductIconThemeSchemas=I}),define(ae[2813],le([1,0,2051,17,155,691]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerFileIconThemeSchemas=void 0;const k="vscode://schemas/icon-theme",E={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(){p.Registry.as(R.Extensions.JSONContribution).registerSchema(k,E)}e.registerFileIconThemeSchemas=I}),define(ae[2814],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMatchers=void 0;function t(A,k,E){const I=R(A);let b=I.next();for(;b!==null;){let u=0;if(b.length===2&&b.charAt(1)===":"){switch(b.charAt(0)){case"R":u=1;break;case"L":u=-1;break;default:console.log(`Unknown priority ${b} in scope selector`)}b=I.next()}const i=C();if(i&&E.push({matcher:i,priority:u}),b!==",")break;b=I.next()}function S(){if(b==="-"){b=I.next();const u=S();return u?i=>u(i)<0?0:-1:null}if(b==="("){b=I.next();const u=r();return b===")"&&(b=I.next()),u}if(p(b)){const u=[];do u.push(b),b=I.next();while(p(b));return i=>k(u,i)}return null}function C(){let u=S();if(!u)return null;const i=[];for(;u;)i.push(u),u=S();return f=>{let c=i[0](f);for(let l=1;c>=0&&l<i.length;l++)c=Math.min(c,i[l](f));return c}}function r(){let u=C();if(!u)return null;const i=[];for(;u&&(i.push(u),b==="|"||b===",");){do b=I.next();while(b==="|"||b===",");u=C()}return f=>{let c=i[0](f);for(let l=1;l<i.length;l++)c=Math.max(c,i[l](f));return c}}}e.createMatchers=t;function p(A){return!!A&&!!A.match(/[\w\.:]+/)}function R(A){const k=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g;let E=k.exec(A);return{next:()=>{if(!E)return null;const I=E[0];return E=k.exec(A),I}}}}),define(ae[2815],le([1,0,65,33,167]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertSettings=void 0;const A={};function k(b,S){let C=A[b];C||(A[b]=C=[]),C.push(S)}function E(b,S){for(const C of b)if(S.textMateRules.push(C),!C.scope){const r=C.settings;if(!r)C.settings={};else for(const u in r){const i=u,f=A[i];if(f){const c=r[i];if(typeof c=="string"){const l=t.Color.fromHex(c);for(const s of f)S.colors[s]=l}}i!=="foreground"&&i!=="background"&&i!=="fontStyle"&&delete r[i]}}}e.convertSettings=E,k("background",p.editorBackground),k("foreground",p.editorForeground),k("selection",p.editorSelectionBackground),k("inactiveSelection",p.editorInactiveSelection),k("selectionHighlightColor",p.editorSelectionHighlight),k("findMatchHighlight",p.editorFindMatchHighlight),k("currentFindMatchHighlight",p.editorFindMatch),k("hoverHighlight",p.editorHoverHighlight),k("wordHighlight","editor.wordHighlightBackground"),k("wordHighlightStrong","editor.wordHighlightStrongBackground"),k("findRangeHighlight",p.editorFindRangeHighlight),k("findMatchHighlight","peekViewResult.matchHighlightBackground"),k("referenceHighlight","peekViewEditor.matchHighlightBackground"),k("lineHighlight",R.editorLineHighlight),k("rangeHighlight",R.editorRangeHighlight),k("caret",R.editorCursorForeground),k("invisibles",R.editorWhitespaces),k("guide",R.editorIndentGuides),k("activeGuide",R.editorActiveIndentGuides);const I=["ansiBlack","ansiRed","ansiGreen","ansiYellow","ansiBlue","ansiMagenta","ansiCyan","ansiWhite","ansiBrightBlack","ansiBrightRed","ansiBrightGreen","ansiBrightYellow","ansiBrightBlue","ansiBrightMagenta","ansiBrightCyan","ansiBrightWhite"];for(const b of I)k(b,"terminal."+b)}),define(ae[2816],le([1,0,2056,131,433]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenClassificationExtensionPoints=void 0;const A=(0,R.getTokenClassificationRegistry)(),k=p.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:R.typeAndModifierIdPattern,patternErrorMessage:t.localize(2,null)},superType:{type:"string",description:t.localize(3,null),pattern:R.typeAndModifierIdPattern,patternErrorMessage:t.localize(4,null)},description:{type:"string",description:t.localize(5,null)}}}}}),E=p.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:R.typeAndModifierIdPattern,patternErrorMessage:t.localize(8,null)},description:{description:t.localize(9,null)}}}}}),I=p.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 b{constructor(){function C(r,u,i){if(typeof r.id!="string"||r.id.length===0)return i.error(t.localize(13,null,u)),!1;if(!r.id.match(R.typeAndModifierIdPattern))return i.error(t.localize(14,null,u)),!1;const f=r.superType;return f&&!f.match(R.typeAndModifierIdPattern)?(i.error(t.localize(15,null,u)),!1):typeof r.description!="string"||r.id.length===0?(i.error(t.localize(16,null,u)),!1):!0}k.setHandler((r,u)=>{for(const i of u.added){const f=i.value,c=i.collector;if(!f||!Array.isArray(f)){c.error(t.localize(17,null));return}for(const l of f)C(l,"semanticTokenType",c)&&A.registerTokenType(l.id,l.description,l.superType)}for(const i of u.removed){const f=i.value;for(const c of f)A.deregisterTokenType(c.id)}}),E.setHandler((r,u)=>{for(const i of u.added){const f=i.value,c=i.collector;if(!f||!Array.isArray(f)){c.error(t.localize(18,null));return}for(const l of f)C(l,"semanticTokenModifier",c)&&A.registerTokenModifier(l.id,l.description)}for(const i of u.removed){const f=i.value;for(const c of f)A.deregisterTokenModifier(c.id)}}),I.setHandler((r,u)=>{for(const i of u.added){const f=i.value,c=i.collector;if(!f||!Array.isArray(f)){c.error(t.localize(19,null));return}for(const l of f){if(l.language&&typeof l.language!="string"){c.error(t.localize(20,null));continue}if(!l.scopes||typeof l.scopes!="object"){c.error(t.localize(21,null));continue}for(const s in l.scopes){const d=l.scopes[s];if(!Array.isArray(d)||d.some(n=>typeof n!="string")){c.error(t.localize(22,null));continue}try{const n=A.parseTokenSelector(s,l.language);A.registerTokenStyleDefault(n,{scopesToProbe:d.map(a=>a.split(" "))})}catch{c.error(t.localize(23,null,s))}}}}for(const i of u.removed){const f=i.value;for(const c of f)for(const l in c.scopes){const s=c.scopes[l];try{const d=A.parseTokenSelector(l,c.language);A.registerTokenStyleDefault(d,{scopesToProbe:s.map(n=>n.split(" "))})}catch{}}}})}}e.TokenClassificationExtensionPoints=b}),define(ae[193],le([1,0,5,12,13]),function(J,e,t,p,R){"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)(p.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(E){E.COLOR_THEME="workbench.colorTheme",E.FILE_ICON_THEME="workbench.iconTheme",E.PRODUCT_ICON_THEME="workbench.productIconTheme",E.COLOR_CUSTOMIZATIONS="workbench.colorCustomizations",E.TOKEN_COLOR_CUSTOMIZATIONS="editor.tokenColorCustomizations",E.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS="editor.semanticTokenColorCustomizations",E.PREFERRED_DARK_THEME="workbench.preferredDarkColorTheme",E.PREFERRED_LIGHT_THEME="workbench.preferredLightColorTheme",E.PREFERRED_HC_DARK_THEME="workbench.preferredHighContrastColorTheme",E.PREFERRED_HC_LIGHT_THEME="workbench.preferredHighContrastLightColorTheme",E.DETECT_COLOR_SCHEME="window.autoDetectColorScheme",E.DETECT_HC="window.autoDetectHighContrast"})(A=e.ThemeSettings||(e.ThemeSettings={}));var k;(function(E){function I(C){return C&&{_extensionId:C.extensionId,_extensionIsBuiltin:C.extensionIsBuiltin,_extensionName:C.extensionName,_extensionPublisher:C.extensionPublisher}}E.toJSONObject=I;function b(C){if(C&&(0,R.isString)(C._extensionId)&&(0,R.isBoolean)(C._extensionIsBuiltin)&&(0,R.isString)(C._extensionName)&&(0,R.isString)(C._extensionPublisher))return{extensionId:C._extensionId,extensionIsBuiltin:C._extensionIsBuiltin,extensionName:C._extensionName,extensionPublisher:C._extensionPublisher}}E.fromJSONObject=b;function S(C,r,u=!1){return{extensionPublisher:C,extensionId:`${C}.${r}`,extensionName:r,extensionIsBuiltin:u}}E.fromName=S})(k=e.ExtensionData||(e.ExtensionData={}))}),define(ae[2817],le([1,0,1555,10,65,2,40,20,325,42,26,33,12,962,465,193,32,433,8,616,126,22,61,1128]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const g=p.$;let h=class Fl extends A.Disposable{static get(y){return y.getContribution(Fl.ID)}constructor(y,T,_,L,M,O,N){super(),this._editor=y,this._textMateService=T,this._themeService=L,this._languageService=_,this._notificationService=M,this._configurationService=O,this._languageFeaturesService=N,this._widget=null,this._register(this._editor.onDidChangeModel(P=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(P=>this.stop())),this._register(this._editor.onKeyUp(P=>P.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||this._editor.getModel().uri.scheme!==a.Schemas.vscodeNotebookCell&&(this._widget=new w(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()}};h.ID="editor.contrib.inspectEditorTokens",h=we([F(1,i.ITextMateService),F(2,b.ILanguageService),F(3,f.IWorkbenchThemeService),F(4,S.INotificationService),F(5,s.IConfigurationService),F(6,o.ILanguageFeaturesService)],h);class v 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){h.get(T)?.toggle()}}function m(D){D.length>40&&(D=D.substr(0,20)+"\u2026"+D.substr(D.length-20));let y="";for(let T=0,_=D.length;T<_;T++){const L=D.charCodeAt(T);switch(L){case 9:y+="\u2192";break;case 32:y+="\xB7";break;default:y+=String.fromCharCode(L)}}return y}class w extends A.Disposable{constructor(y,T,_,L,M,O,N){super(),this.allowEditorOverflow=!0,this._isDisposed=!1,this._editor=y,this._languageService=_,this._themeService=L,this._textMateService=T,this._notificationService=M,this._configurationService=O,this._languageFeaturesService=N,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="token-inspect-widget",this._currentRequestCancellationTokenSource=new c.CancellationTokenSource,this._beginCompute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(P=>this._beginCompute(this._editor.getPosition()))),this._register(L.onDidColorThemeChange(P=>this._beginCompute(this._editor.getPosition()))),this._register(O.onDidChangeConfiguration(P=>P.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 w._ID}_beginCompute(y){const T=this._textMateService.createGrammar(this._model.getLanguageId()),_=this._computeSemanticTokens(y);p.clearNode(this._domNode),this._domNode.appendChild(document.createTextNode(t.localize(1,null))),Promise.all([T,_]).then(([L,M])=>{this._isDisposed||(this._compute(L,M,y),this._domNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`,this._editor.layoutContentWidget(this))},L=>{this._notificationService.warn(L),setTimeout(()=>{h.get(this._editor)?.stop()})})}_isSemanticColoringEnabled(){const y=this._configurationService.getValue(d.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,_){const L=y&&this._getTokensAtPosition(y,_),M=T&&this._getSemanticTokenAtPosition(T,_);if(!L&&!M){p.reset(this._domNode,"No grammar or semantic tokens available.");return}const O=L?.metadata,N=M?.metadata,P=M&&m(this._model.getValueInRange(M.range)),B=L&&m(this._model.getLineContent(_.lineNumber).substring(L.token.startIndex,L.token.endIndex)),V=P||B||"";if(p.reset(this._domNode,g("h2.tiw-token",void 0,V,g("span.tiw-token-length",void 0,`${V.length} ${V.length===1?"char":"chars"}`))),p.append(this._domNode,g("hr.tiw-metadata-separator",{style:"clear:both"})),p.append(this._domNode,g("table.tiw-metadata-table",void 0,g("tbody",void 0,g("tr",void 0,g("td.tiw-metadata-key",void 0,"language"),g("td.tiw-metadata-value",void 0,O?.languageId||"")),g("tr",void 0,g("td.tiw-metadata-key",void 0,"standard token type"),g("td.tiw-metadata-value",void 0,this._tokenTypeToString(O?.tokenType||0))),...this._formatMetadata(N,O)))),M){p.append(this._domNode,g("hr.tiw-metadata-separator"));const z=p.append(this._domNode,g("table.tiw-metadata-table",void 0)),x=p.append(z,g("tbody",void 0,g("tr",void 0,g("td.tiw-metadata-key",void 0,"semantic token type"),g("td.tiw-metadata-value",void 0,M.type))));if(M.modifiers.length&&p.append(x,g("tr",void 0,g("td.tiw-metadata-key",void 0,"modifiers"),g("td.tiw-metadata-value",void 0,M.modifiers.join(" ")))),M.metadata){const H=["foreground","bold","italic","underline","strikethrough"],W={},U=new Array;for(const $ of H)if(M.metadata[$]!==void 0){const q=M.definitions[$],X=this._renderTokenStyleDefinition(q,$),G=X.map(j=>j instanceof HTMLElement?j.outerHTML:j).join();let Q=W[G];Q||(W[G]=Q=[],U.push([X,G])),Q.push($)}for(const[$,q]of U)p.append(x,g("tr",void 0,g("td.tiw-metadata-key",void 0,W[q].join(", ")),g("td.tiw-metadata-value",void 0,...$)))}}if(L){const z=this._themeService.getColorTheme();p.append(this._domNode,g("hr.tiw-metadata-separator"));const x=p.append(this._domNode,g("table.tiw-metadata-table")),H=p.append(x,g("tbody"));B&&B!==V&&p.append(H,g("tr",void 0,g("td.tiw-metadata-key",void 0,"textmate token"),g("td.tiw-metadata-value",void 0,`${B} (${B.length})`)));const W=new Array;for(let q=L.token.scopes.length-1;q>=0;q--)W.push(L.token.scopes[q]),q>0&&W.push(g("br"));p.append(H,g("tr",void 0,g("td.tiw-metadata-key",void 0,"textmate scopes"),g("td.tiw-metadata-value.tiw-metadata-scopes",void 0,...W)));const U=(0,u.findMatchingThemeRule)(z,L.token.scopes,!1),$=M?.metadata?.foreground;if(U){if($!==L.metadata.foreground){let q=g("code.tiw-theme-selector",void 0,U.rawSelector,g("br"),JSON.stringify(U.settings,null," "));$&&(q=g("s",void 0,q)),p.append(H,g("tr",void 0,g("td.tiw-metadata-key",void 0,"foreground"),g("td.tiw-metadata-value",void 0,q)))}}else $||p.append(H,g("tr",void 0,g("td.tiw-metadata-key",void 0,"foreground"),g("td.tiw-metadata-value",void 0,"No theme selector")))}}_formatMetadata(y,T){const _=new Array;function L(B){const V=y?.[B]||T?.[B];if(V!==void 0){const z=y?.[B]?"tiw-metadata-semantic":"";_.push(g("tr",void 0,g("td.tiw-metadata-key",void 0,B),g(`td.tiw-metadata-value.${z}`,void 0,V)))}return V}const M=L("foreground"),O=L("background");if(M&&O){const B=R.Color.fromHex(O),V=R.Color.fromHex(M);B.isOpaque()?_.push(g("tr",void 0,g("td.tiw-metadata-key",void 0,"contrast ratio"),g("td.tiw-metadata-value",void 0,B.getContrastRatio(V.makeOpaque(B)).toFixed(2)))):_.push(g("tr",void 0,g("td.tiw-metadata-key",void 0,"Contrast ratio cannot be precise for background colors that use transparency"),g("td.tiw-metadata-value")))}const N=new Array;function P(B){let V;y&&y[B]?V=g("span.tiw-metadata-semantic",void 0,B):T&&T[B]&&(V=B),V&&(N.length&&N.push(" "),N.push(V))}return P("bold"),P("italic"),P("underline"),P("strikethrough"),N.length&&_.push(g("tr",void 0,g("td.tiw-metadata-key",void 0,"font style"),g("td.tiw-metadata-value",void 0,...N))),_}_decodeMetadata(y){const T=this._themeService.getColorTheme().tokenColorMap,_=I.TokenMetadata.getLanguageId(y),L=I.TokenMetadata.getTokenType(y),M=I.TokenMetadata.getFontStyle(y),O=I.TokenMetadata.getForeground(y),N=I.TokenMetadata.getBackground(y);return{languageId:this._languageService.languageIdCodec.decodeLanguageId(_),tokenType:L,bold:M&2?!0:void 0,italic:M&1?!0:void 0,underline:M&4?!0:void 0,strikethrough:M&8?!0:void 0,foreground:T[O],background:T[N]}}_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 _=T.lineNumber,L=this._getStateBeforeLine(y,_),M=y.tokenizeLine(this._model.getLineContent(_),L),O=y.tokenizeLine2(this._model.getLineContent(_),L);let N=0;for(let B=M.tokens.length-1;B>=0;B--){const V=M.tokens[B];if(T.column-1>=V.startIndex){N=B;break}}let P=0;for(let B=O.tokens.length>>>1;B>=0;B--)if(T.column-1>=O.tokens[B<<1]){P=B;break}return{token:M.tokens[N],metadata:this._decodeMetadata(O.tokens[(P<<1)+1])}}_getStateBeforeLine(y,T){let _=null;for(let L=1;L<T;L++)_=y.tokenizeLine(this._model.getLineContent(L),_).ruleStack;return _}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 L=T[0],M=await Promise.resolve(L.provideDocumentSemanticTokens(this._model,null,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(M))return{tokens:M,legend:L.getLegend()}}const _=this._languageFeaturesService.documentRangeSemanticTokensProvider.ordered(this._model);if(_.length){const L=_[0],M=y.lineNumber,O=new E.Range(M,1,M,this._model.getLineMaxColumn(M)),N=await Promise.resolve(L.provideDocumentRangeSemanticTokens(this._model,O,this._currentRequestCancellationTokenSource.token));if(this.isSemanticTokens(N))return{tokens:N,legend:L.getLegend()}}return null}_getSemanticTokenAtPosition(y,T){const _=y.tokens.data,L=this._model.getLanguageId();let M=0,O=0;const N=T.lineNumber-1,P=T.column-1;for(let B=0;B<_.length;B+=5){const V=_[B],z=_[B+1],x=_[B+2],H=_[B+3],W=_[B+4],U=M+V,$=V===0?O+z:z;if(N===U&&$<=P&&P<$+x){const q=y.legend.tokenTypes[H]||"not in legend (ignored)",X=[];let G=W;for(let re=0;G>0&&re<y.legend.tokenModifiers.length;re++)G&1&&X.push(y.legend.tokenModifiers[re]),G=G>>1;G>0&&X.push("not in legend (ignored)");const Q=new E.Range(U+1,$+1,U+1,$+1+x),j={},K=this._themeService.getColorTheme().tokenColorMap,ee=this._themeService.getColorTheme().getTokenStyleMetadata(q,X,L,!0,j);let ie;return ee&&(ie={languageId:void 0,tokenType:0,bold:ee?.bold,italic:ee?.italic,underline:ee?.underline,strikethrough:ee?.strikethrough,foreground:K[ee?.foreground||0],background:void 0}),{type:q,modifiers:X,range:Q,metadata:ie,definitions:j}}M=U,O=$}return null}_renderTokenStyleDefinition(y,T){const _=new Array;if(y===void 0)return _;const L=this._themeService.getColorTheme();if(Array.isArray(y)){const M={};L.resolveScopes(y,M);const O=M[T];if(O&&M.scope){const N=g("ul.tiw-metadata-values"),P=Array.isArray(O.scope)?O.scope:[String(O.scope)];for(const B of P)N.appendChild(g("li.tiw-metadata-value.tiw-metadata-scopes",void 0,B));return _.push(M.scope.join(" "),N,g("code.tiw-theme-selector",void 0,JSON.stringify(O.settings,null," "))),_}return _}else if(l.SemanticTokenRule.is(y)){const M=L.getTokenStylingRuleScope(y);return M==="setting"?(_.push(`User settings: ${y.selector.id} - ${this._renderStyleProperty(y.style,T)}`),_):(M==="theme"&&_.push(`Color theme: ${y.selector.id} - ${this._renderStyleProperty(y.style,T)}`),_)}else{const M=L.resolveTokenStyleValue(y);return _.push(`Default: ${M?this._renderStyleProperty(M,T):""}`),_}}_renderStyleProperty(y,T){switch(T){case"foreground":return y.foreground?R.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]}}}w._ID="editor.contrib.inspectEditorTokensWidget",(0,k.registerEditorContribution)(h.ID,h),(0,k.registerEditorAction)(v),(0,r.registerThemingParticipant)((D,y)=>{const T=D.getColor(C.editorHoverBorder);if(T){const L=(0,n.isHighContrast)(D.type)?2:1;y.addRule(`.monaco-editor .token-inspect-widget { border: ${L}px solid ${T}; }`),y.addRule(`.monaco-editor .token-inspect-widget .tiw-metadata-separator { background-color: ${T}; }`)}const _=D.getColor(C.editorHoverBackground);_&&y.addRule(`.monaco-editor .token-inspect-widget { background-color: ${_}; }`)})}),define(ae[2818],le([1,0,9,42,31,5,193,24,43,465,92,325,962,65,19,18,22,28]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s{constructor(a){this._theme=a,this._cache=Object.create(null),this._defaultColor="#000000";for(let o=0,g=this._theme.tokenColors.length;o<g;o++){const h=this._theme.tokenColors[o];h.scope||(this._defaultColor=h.settings.foreground)}}_generateExplanation(a,o){return`${a}: ${u.Color.Format.CSS.formatHexA(o,!0).toUpperCase()}`}explainTokenColor(a,o){const g=this._findMatchingThemeRule(a);if(!g){const v=u.Color.fromHex(this._defaultColor);if(!o.equals(v))throw new Error(`[${this._theme.label}]: Unexpected color ${u.Color.Format.CSS.formatHexA(o)} for ${a}. Expected default ${u.Color.Format.CSS.formatHexA(v)}`);return this._generateExplanation("default",o)}const h=u.Color.fromHex(g.settings.foreground);if(!o.equals(h))throw new Error(`[${this._theme.label}]: Unexpected color ${u.Color.Format.CSS.formatHexA(o)} for ${a}. Expected ${u.Color.Format.CSS.formatHexA(h)} coming in from ${g.rawSelector}`);return this._generateExplanation(g.rawSelector,o)}_findMatchingThemeRule(a){return this._cache[a]||(this._cache[a]=(0,r.findMatchingThemeRule)(this._theme,a.split(" "))),this._cache[a]}}let d=class{constructor(a,o,g){this.languageService=a,this.themeService=o,this.textMateService=g}_themedTokenize(a,o){const g=S.TokenizationRegistry.getColorMap();let h=null;const v=[];let m=0;for(let w=0,D=o.length;w<D;w++){const y=o[w],T=a.tokenizeLine2(y,h);for(let _=0,L=T.tokens.length>>>1;_<L;_++){const M=T.tokens[_<<1],O=T.tokens[(_<<1)+1],N=_+1<L?T.tokens[_+1<<1]:y.length,P=y.substring(M,N),B=C.TokenMetadata.getForeground(O);v[m++]={text:P,color:g[B]}}h=T.ruleStack}return v}_tokenize(a,o){let g=null;const h=[];let v=0;for(let m=0,w=o.length;m<w;m++){const D=o[m],y=a.tokenizeLine(D,g);let T=null;for(let _=0,L=y.tokens.length;_<L;_++){const M=y.tokens[_],O=D.substring(M.startIndex,M.endIndex),N=M.scopes.join(" ");T===N?h[v-1].c+=O:(T=N,h[v++]={c:O,t:N,r:{dark_plus:void 0,light_plus:void 0,dark_vs:void 0,light_vs:void 0,hc_black:void 0}})}g=y.ruleStack}return h}async _getThemesResult(a,o){const g=this.themeService.getColorTheme(),h=D=>{const y="vscode-theme-defaults-themes-",T=D.indexOf(y);if(T!==-1)return D.substring(T+y.length,D.length-5)},v={},w=(await this.themeService.getColorThemes()).filter(D=>!!h(D.id));for(const D of w){const y=D.id;if(await this.themeService.setColorTheme(y,void 0)){const _=h(y);v[_]={document:new s(this.themeService.getColorTheme()),tokens:this._themedTokenize(a,o)}}}return await this.themeService.setColorTheme(g.id,void 0),v}_enrichResult(a,o){const g={},h=Object.keys(o);for(const v of h)g[v]=0;for(let v=0,m=a.length;v<m;v++){const w=a[v];for(const D of h){const y=o[D].tokens[g[D]];y.text=y.text.substr(w.c.length),w.r[D]=o[D].document.explainTokenColor(w.t,y.color),y.text.length===0&&g[D]++}}}captureSyntaxTokens(a,o){const g=this.languageService.guessLanguageIdByFilepathOrFirstLine(t.URI.file(a));return this.textMateService.createGrammar(g).then(h=>{if(!h)return[];const v=(0,l.splitLines)(o),m=this._tokenize(h,v);return this._getThemesResult(h,v).then(w=>(this._enrichResult(m,w),m.filter(D=>D.c.length>0)))})}};d=we([F(0,p.ILanguageService),F(1,k.IWorkbenchThemeService),F(2,b.ITextMateService)],d),R.CommandsRegistry.registerCommand("_workbench.captureSyntaxTokens",function(n,a){const o=g=>{const h=n.get(i.IFileService),v=(0,f.basename)(g),m=n.get(A.IInstantiationService).createInstance(d);return h.readFile(g).then(w=>m.captureSyntaxTokens(v,w.value.toString()))};if(a)return o(a);{const g=n.get(E.IEditorService),h=g.activeEditor?I.EditorResourceAccessor.getCanonicalUri(g.activeEditor,{filterByScheme:c.Schemas.file}):null;h?o(h).then(v=>{console.log(v)}):console.log("No file editor active")}})}),define(ae[2819],le([1,0,6,2,134,8,33,126,193,518]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewThemeDataProvider=void 0;let S=class extends p.Disposable{constructor(u,i){super(),this._themeService=u,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 f=["editor.fontFamily","editor.fontWeight","editor.fontSize"];this._register(this._configurationService.onDidChangeConfiguration(c=>{f.some(l=>c.affectsConfiguration(l))&&this.reset()}))}getTheme(){return this._themeService.getColorTheme()}getWebviewThemeData(){if(!this._cachedWebViewThemeData){const u=this._configurationService.getValue("editor"),i=u.fontFamily||R.EDITOR_FONT_DEFAULTS.fontFamily,f=u.fontWeight||R.EDITOR_FONT_DEFAULTS.fontWeight,c=u.fontSize||R.EDITOR_FONT_DEFAULTS.fontSize,l=this._themeService.getColorTheme(),s=k.getColorRegistry().getColors().reduce((a,o)=>{const g=l.getColor(o.id);return g&&(a["vscode-"+o.id.replace(".","-")]=g.toString()),a},{}),d={"vscode-font-family":b.DEFAULT_FONT_FAMILY,"vscode-font-weight":"normal","vscode-font-size":"13px","vscode-editor-font-family":i,"vscode-editor-font-weight":f,"vscode-editor-font-size":c+"px",...s},n=C.fromTheme(l);this._cachedWebViewThemeData={styles:d,activeTheme:n,themeLabel:l.label,themeId:l.settingsId}}return this._cachedWebViewThemeData}reset(){this._cachedWebViewThemeData=void 0,this._onThemeDataChanged.fire()}};S=we([F(0,I.IWorkbenchThemeService),F(1,A.IConfigurationService)],S),e.WebviewThemeDataProvider=S;var C;(function(r){r.light="vscode-light",r.dark="vscode-dark",r.highContrast="vscode-high-contrast",r.highContrastLight="vscode-high-contrast-light"})(C||(C={})),function(r){function u(i){switch(i.type){case E.ColorScheme.LIGHT:return r.light;case E.ColorScheme.DARK:return r.dark;case E.ColorScheme.HIGH_CONTRAST_DARK:return r.highContrast;case E.ColorScheme.HIGH_CONTRAST_LIGHT:return r.highContrastLight}}r.fromTheme=u}(C||(C={}))}),define(ae[2820],le([1,0,6,2,5,2819,918,2426]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WebviewService=void 0;let I=class extends p.Disposable{constructor(S){super(),this._instantiationService=S,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(S){S!==this._activeWebview&&(this._activeWebview=S,this._onDidChangeActiveWebview.fire(S))}get webviews(){return this._webviews.values()}createWebviewElement(S){const C=this._instantiationService.createInstance(k.WebviewElement,S,this._webviewThemeDataProvider);return this.registerNewWebview(C),C}createWebviewOverlay(S){const C=this._instantiationService.createInstance(E.OverlayWebview,S);return this.registerNewWebview(C),C}registerNewWebview(S){this._webviews.add(S),S.onDidFocus(()=>{this.updateActiveWebview(S)});const C=()=>{this._activeWebview===S&&this.updateActiveWebview(void 0)};S.onDidBlur(C),S.onDidDispose(()=>{C(),this._webviews.delete(S)})}};I=we([F(0,R.IInstantiationService)],I),e.WebviewService=I}),define(ae[2821],le([1,0,2820,2479]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElectronWebviewService=void 0;class R extends t.WebviewService{createWebviewElement(k){const E=this._instantiationService.createInstance(p.ElectronWebviewElement,k,this._webviewThemeDataProvider);return this.registerNewWebview(E),E}}e.ElectronWebviewService=R}),define(ae[2822],le([1,0,15,35,202,2428,2821]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSingleton)(R.IWebviewService,k.ElectronWebviewService,1),(0,t.registerAction2)(A.OpenWebviewDeveloperToolsAction)}),define(ae[2823],le([1,0,2038,10,65,21,6,18,13,16,92,593,410,42,25,26,961,193,2,8,2762,308,66,2763]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTextMateService=void 0;let h=class qs extends s.Disposable{constructor(w,D,y,T,_,L,M){super(),this._languageService=w,this._themeService=D,this._extensionResourceLoaderService=y,this._notificationService=T,this._logService=_,this._configurationService=L,this._progressService=M,this._onDidEncounterLanguage=this._register(new k.Emitter),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._vscodeOniguruma=null,this._styleElement=p.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,c.grammarsExtPoint.setHandler(O=>{this._grammarDefinitions=null,this._grammarFactory&&(this._grammarFactory.dispose(),this._grammarFactory=null,this._onDidDisposeGrammarFactory()),this._tokenizersRegistrations=(0,s.dispose)(this._tokenizersRegistrations),this._grammarDefinitions=[];for(const N of O){const P=N.value;for(const B of P){let W=function(U,$){return!Array.isArray(U)||!U.every(q=>typeof q=="string")?$:U};if(!this._validateGrammarExtensionPoint(N.description.extensionLocation,B,N.collector))continue;const V=E.joinPath(N.description.extensionLocation,B.path),z=Object.create(null);if(B.embeddedLanguages){const U=Object.keys(B.embeddedLanguages);for(let $=0,q=U.length;$<q;$++){const X=U[$],G=B.embeddedLanguages[X];typeof G=="string"&&this._languageService.isRegisteredLanguageId(G)&&(z[X]=this._languageService.languageIdCodec.encodeLanguageId(G))}}const x=Object.create(null);if(B.tokenTypes){const U=Object.keys(B.tokenTypes);for(const $ of U)switch(B.tokenTypes[$]){case"string":x[$]=2;break;case"other":x[$]=0;break;case"comment":x[$]=1;break}}let H=null;B.language&&this._languageService.isRegisteredLanguageId(B.language)&&(H=B.language),this._grammarDefinitions.push({location:V,language:H||void 0,scopeName:B.scopeName,embeddedLanguages:z,tokenTypes:x,injectTo:B.injectTo,balancedBracketSelectors:W(B.balancedBracketScopes,["*"]),unbalancedBracketSelectors:W(B.unbalancedBracketScopes,[])}),H&&this._tokenizersRegistrations.push(S.TokenizationRegistry.registerFactory(H,this._createFactory(H)))}}for(const N of this._createdModes)S.TokenizationRegistry.getOrCreate(N)}),this._updateTheme(this._grammarFactory,this._themeService.getColorTheme(),!0),this._register(this._themeService.onDidColorThemeChange(()=>{this._updateTheme(this._grammarFactory,this._themeService.getColorTheme(),!1)})),this._languageService.onDidEncounterLanguage(O=>{this._createdModes.push(O)})}startDebugMode(w,D){if(this._debugMode){this._notificationService.error(t.localize(0,null));return}this._debugModePrintFunc=w,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((_,L)=>{})))),y=>{this._getVSCodeOniguruma().then(T=>{this._debugModePrintFunc=()=>{},this._debugMode=!1,T.setDefaultDebugCall(!1),D()})})}_canCreateGrammarFactory(){return!!this._grammarDefinitions}async _getOrCreateGrammarFactory(){if(this._grammarFactory)return this._grammarFactory;const[w,D]=await Promise.all([new Promise((T,_)=>{J(["vscode-textmate"],T,_)}),this._getVSCodeOniguruma()]),y=Promise.resolve({createOnigScanner:T=>D.createOnigScanner(T),createOnigString:T=>D.createOnigString(T)});return this._grammarFactory?this._grammarFactory:(this._grammarFactory=new n.TMGrammarFactory({logTrace:T=>this._logService.trace(T),logError:(T,_)=>this._logService.error(T,_),readFile:T=>this._extensionResourceLoaderService.readExtensionResource(T)},this._grammarDefinitions||[],w,y),this._onDidCreateGrammarFactory(this._grammarDefinitions||[]),this._updateTheme(this._grammarFactory,this._themeService.getColorTheme(),!0),this._grammarFactory)}_createFactory(w){return{createTokenizationSupport:async()=>{if(!this._languageService.isRegisteredLanguageId(w)||!this._canCreateGrammarFactory())return null;const D=this._languageService.languageIdCodec.encodeLanguageId(w);try{const y=await this._getOrCreateGrammarFactory();if(!y.has(w))return null;const T=await y.createGrammar(w,D);if(!T.grammar)return null;const _=new g.TMTokenization(T.grammar,T.initialState,T.containsEmbeddedLanguages);return _.onDidEncounterLanguage(L=>{if(!this._encounteredLanguages[L]){const M=this._languageService.languageIdCodec.decodeLanguageId(L);this._encounteredLanguages[L]=!0,this._onDidEncounterLanguage.fire(M)}}),new v(w,D,_,this._configurationService)}catch(y){return y.message&&y.message===n.missingTMGrammarErrorMessage||(0,A.onUnexpectedError)(y),null}}}}static _toColorMap(w){const D=[null];for(let y=1,T=w.length;y<T;y++)D[y]=R.Color.fromHex(w[y]);return D}_updateTheme(w,D,y){!y&&this._currentTheme&&this._currentTokenColorMap&&qs.equalsTokenRules(this._currentTheme.settings,D.tokenColors)&&(0,b.equals)(this._currentTokenColorMap,D.tokenColorMap)||(this._currentTheme={name:D.label,settings:D.tokenColors},this._currentTokenColorMap=D.tokenColorMap,this._doUpdateTheme(w,this._currentTheme,this._currentTokenColorMap))}_doUpdateTheme(w,D,y){w?.setTheme(D,y);const T=qs._toColorMap(y),_=(0,r.generateTokensCSSForColorMap)(T);this._styleElement.textContent=_,S.TokenizationRegistry.setColorMap(T)}static equalsTokenRules(w,D){if(!D||!w||D.length!==w.length)return!1;for(let y=D.length-1;y>=0;y--){const T=D[y],_=w[y];if(T.scope!==_.scope)return!1;const L=T.settings,M=_.settings;if(L&&M){if(L.fontStyle!==M.fontStyle||L.foreground!==M.foreground||L.background!==M.background)return!1}else if(!L||!M)return!1}return!0}_validateGrammarExtensionPoint(w,D,y){if(D.language&&(typeof D.language!="string"||!this._languageService.isRegisteredLanguageId(D.language)))return y.error(t.localize(4,null,c.grammarsExtPoint.name,String(D.language))),!1;if(!D.scopeName||typeof D.scopeName!="string")return y.error(t.localize(5,null,c.grammarsExtPoint.name,String(D.scopeName))),!1;if(!D.path||typeof D.path!="string")return y.error(t.localize(6,null,c.grammarsExtPoint.name,String(D.path))),!1;if(D.injectTo&&(!Array.isArray(D.injectTo)||D.injectTo.some(_=>typeof _!="string")))return y.error(t.localize(7,null,c.grammarsExtPoint.name,JSON.stringify(D.injectTo))),!1;if(D.embeddedLanguages&&!I.isObject(D.embeddedLanguages))return y.error(t.localize(8,null,c.grammarsExtPoint.name,JSON.stringify(D.embeddedLanguages))),!1;if(D.tokenTypes&&!I.isObject(D.tokenTypes))return y.error(t.localize(9,null,c.grammarsExtPoint.name,JSON.stringify(D.tokenTypes))),!1;const T=E.joinPath(w,D.path);return E.isEqualOrParent(T,w)||y.warn(t.localize(10,null,c.grammarsExtPoint.name,T.path,w.path)),!0}async createGrammar(w){if(!this._languageService.isRegisteredLanguageId(w))return null;const D=await this._getOrCreateGrammarFactory();if(!D.has(w))return null;const y=this._languageService.languageIdCodec.encodeLanguageId(w),{grammar:T}=await D.createGrammar(w,y);return T}_onDidCreateGrammarFactory(w){}_onDidDisposeGrammarFactory(){}_getVSCodeOniguruma(){return this._vscodeOniguruma||(this._vscodeOniguruma=this._doGetVSCodeOniguruma()),this._vscodeOniguruma}async _doGetVSCodeOniguruma(){const[w,D]=await Promise.all([new Promise((T,_)=>{J(["vscode-oniguruma"],T,_)}),this._loadVSCodeOnigurumWASM()]),y={data:D,print:T=>{this._debugModePrintFunc(T)}};return await w.loadWASM(y),w}};h=we([F(0,u.ILanguageService),F(1,l.IWorkbenchThemeService),F(2,a.IExtensionResourceLoaderService),F(3,f.INotificationService),F(4,i.ILogService),F(5,d.IConfigurationService),F(6,o.IProgressService)],h),e.AbstractTextMateService=h;let v=class{constructor(w,D,y,T){this._configurationService=T,this._languageId=w,this._encodedLanguageId=D,this._actual=y,this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._configurationService.onDidChangeConfiguration(_=>{_.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))})}getInitialState(){return this._actual.getInitialState()}tokenize(w,D,y){throw new Error("Not supported!")}tokenizeEncoded(w,D,y){return w.length>=this._maxTokenizationLineLength?(0,C.nullTokenizeEncoded)(this._encodedLanguageId,y):this._actual.tokenizeEncoded(w,D,y)}};v=we([F(3,d.IConfigurationService)],v)}),define(ae[2824],le([1,0,465,35,2823,42,193,26,25,8,801,54,2,9,734,308,51,66,22,122]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextMateService=e.TextMateWorkerHost=void 0;const n=!1;class a extends r.Disposable{constructor(v,m,w){super(),this._pendingChanges=[],this._worker=v,this._languageIdCodec=m,this._model=w,this._isSynced=!1,this._register(this._model.onDidChangeAttached(()=>this._onDidChangeAttached())),this._onDidChangeAttached(),this._register(this._model.onDidChangeContent(D=>{this._isSynced&&(this._worker.acceptModelChanged(this._model.uri.toString(),D),this._pendingChanges.push(D))})),this._register(this._model.onDidChangeLanguage(D=>{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 v=this._model.getLanguageId(),m=this._languageIdCodec.encodeLanguageId(v);this._worker.acceptNewModel({uri:this._model.uri,versionId:this._model.getVersionId(),lines:this._model.getLinesContent(),EOL:this._model.getEOL(),languageId:v,encodedLanguageId:m})}_endSync(){this._isSynced=!1,this._worker.acceptRemovedModel(this._model.uri.toString())}dispose(){super.dispose(),this._endSync()}_confirm(v){for(;this._pendingChanges.length>0&&this._pendingChanges[0].versionId<=v;)this._pendingChanges.shift()}setTokens(v,m){this._confirm(v);const w=i.ContiguousMultilineTokensBuilder.deserialize(new Uint8Array(m));for(let D=0;D<this._pendingChanges.length;D++){const y=this._pendingChanges[D];for(let T=0;T<w.length;T++)for(let _=0;_<y.changes.length;_++)w[T].applyEdit(y.changes[_].range,y.changes[_].text)}this._model.tokenization.setTokens(w)}}let o=class{constructor(v,m){this.textMateService=v,this._extensionResourceLoaderService=m}async readFile(v){const m=u.URI.revive(v);return this._extensionResourceLoaderService.readExtensionResource(m)}async setTokens(v,m,w){const D=u.URI.revive(v);this.textMateService.setTokens(D,m,w)}};o=we([F(1,f.IExtensionResourceLoaderService)],o),e.TextMateWorkerHost=o;let g=class extends R.AbstractTextMateService{constructor(v,m,w,D,y,T,_,L,M,O){super(v,m,w,D,y,T,_),this._modelService=L,this._environmentService=M,this._languageConfigurationService=O,this._worker=null,this._workerProxy=null,this._tokenizers=Object.create(null),this._register(this._modelService.onModelAdded(N=>this._onModelAdded(N))),this._register(this._modelService.onModelRemoved(N=>this._onModelRemoved(N))),this._modelService.getModels().forEach(N=>this._onModelAdded(N))}_onModelAdded(v){if(!this._workerProxy||v.isTooLargeForSyncing())return;const m=v.uri.toString(),w=new a(this._workerProxy,this._languageService.languageIdCodec,v);this._tokenizers[m]=w}_onModelRemoved(v){const m=v.uri.toString();this._tokenizers[m]&&(this._tokenizers[m].dispose(),delete this._tokenizers[m])}async _loadVSCodeOnigurumWASM(){return await fetch(this._environmentService.isBuilt?s.FileAccess.asBrowserUri("../../../../../../node_modules.asar.unpacked/vscode-oniguruma/release/onig.wasm",J).toString(!0):s.FileAccess.asBrowserUri("../../../../../../node_modules/vscode-oniguruma/release/onig.wasm",J).toString(!0))}_onDidCreateGrammarFactory(v){if(this._killWorker(),n){const m=new o(this,this._extensionResourceLoaderService),w=(0,S.createWebWorker)(this._modelService,this._languageConfigurationService,{createData:{grammarDefinitions:v},label:"textMateWorker",moduleId:"vs/workbench/services/textMate/browser/textMateWorker",host:m});this._worker=w,w.getProxy().then(D=>{this._worker===w&&(this._workerProxy=D,this._currentTheme&&this._currentTokenColorMap&&this._workerProxy.acceptTheme(this._currentTheme,this._currentTokenColorMap),this._modelService.getModels().forEach(y=>this._onModelAdded(y)))})}}_doUpdateTheme(v,m,w){super._doUpdateTheme(v,m,w),this._currentTheme&&this._currentTokenColorMap&&this._workerProxy&&this._workerProxy.acceptTheme(this._currentTheme,this._currentTokenColorMap)}_onDidDisposeGrammarFactory(){this._killWorker()}_killWorker(){for(const v of Object.keys(this._tokenizers))this._tokenizers[v].dispose();this._tokenizers=Object.create(null),this._worker&&(this._worker.dispose(),this._worker=null),this._workerProxy=null}setTokens(v,m,w){const D=v.toString();!this._tokenizers[D]||this._tokenizers[D].setTokens(m,w)}};g=we([F(0,A.ILanguageService),F(1,k.IWorkbenchThemeService),F(2,f.IExtensionResourceLoaderService),F(3,E.INotificationService),F(4,I.ILogService),F(5,b.IConfigurationService),F(6,l.IProgressService),F(7,C.IModelService),F(8,c.IWorkbenchEnvironmentService),F(9,d.ILanguageConfigurationService)],g),e.TextMateService=g,(0,p.registerSingleton)(t.ITextMateService,g,0)}),define(ae[970],le([1,0,2045,53,18,123,193,413,10]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileIconThemeLoader=e.FileIconThemeData=void 0;class b{constructor(i,f,c){this.id=i,this.label=f,this.settingsId=c,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,f,c){const l=c.extensionId+"-"+i.id,s=i.label||p.basename(i.path),d=i.id,n=new b(l,s,d);return n.description=i.description,n.location=f,n.extensionData=c,n.watch=i._watch,n.isLoaded=!1,n}static get noIconTheme(){let i=b._noIconTheme;return i||(i=b._noIconTheme=new b("","",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 f=new b(i,"","__"+i);return f.isLoaded=!1,f.hasFileIcons=!1,f.hasFolderIcons=!1,f.hidesExplorerArrows=!1,f.extensionData=void 0,f.watch=!1,f}static fromStorageData(i){const f=i.get(b.STORAGE_KEY,0);if(!!f)try{const c=JSON.parse(f),l=new b("","",null);for(const s in c)switch(s){case"id":case"label":case"description":case"settingsId":case"styleSheetContent":case"hasFileIcons":case"hidesExplorerArrows":case"hasFolderIcons":case"watch":l[s]=c[s];break;case"location":break;case"extensionData":l.extensionData=k.ExtensionData.fromJSONObject(c.extensionData);break}return l}catch{return}}toStorage(i){const f=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(b.STORAGE_KEY,f,0,1)}}e.FileIconThemeData=b,b.STORAGE_KEY="iconThemeData",b._noIconTheme=null;class S{constructor(i,f){this.fileService=i,this.languageService=f}load(i){return i.location?this.loadIconThemeDocument(i.location).then(f=>{const c=this.processIconThemeDocument(i.id,i.location,f);return i.styleSheetContent=c.content,i.hasFileIcons=c.hasFileIcons,i.hasFolderIcons=c.hasFolderIcons,i.hidesExplorerArrows=c.hidesExplorerArrows,i.isLoaded=!0,i.styleSheetContent}):Promise.resolve(i.styleSheetContent)}loadIconThemeDocument(i){return this.fileService.readExtensionResource(i).then(f=>{const c=[],l=A.parse(f,c);return c.length>0?Promise.reject(new Error(t.localize(0,null,c.map(s=>(0,E.getParseErrorMessage)(s.error)).join(", ")))):A.getNodeType(l)!=="object"?Promise.reject(new Error(t.localize(1,null))):Promise.resolve(l)})}processIconThemeDocument(i,f,c){const l={content:"",hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!!c.hidesExplorerArrows};let s=!1;if(!c.iconDefinitions)return l;const d={},n={},a=R.dirname(f);function o(D){return R.joinPath(a,D)}function g(D,y){function T(_,L){if(L){let M=d[L];M||(M=d[L]=[]),M.push(_)}}if(D){let _=".show-file-icons";y&&(_=y+" "+_);const L=".monaco-tl-twistie.collapsible:not(.collapsed) + .monaco-tl-contents";D.folder&&(T(`${_} .folder-icon::before`,D.folder),l.hasFolderIcons=!0),D.folderExpanded&&(T(`${_} ${L} .folder-icon::before`,D.folderExpanded),l.hasFolderIcons=!0);const M=D.rootFolder||D.folder,O=D.rootFolderExpanded||D.folderExpanded;M&&(T(`${_} .rootfolder-icon::before`,M),l.hasFolderIcons=!0),O&&(T(`${_} ${L} .rootfolder-icon::before`,O),l.hasFolderIcons=!0),D.file&&(T(`${_} .file-icon::before`,D.file),l.hasFileIcons=!0);const N=D.folderNames;if(N)for(const x in N){const H=[],W=C(x.toLowerCase(),H);H.push(`.${r(W)}-name-folder-icon`),T(`${_} ${H.join("")}.folder-icon::before`,N[x]),l.hasFolderIcons=!0}const P=D.folderNamesExpanded;if(P)for(const x in P){const H=[],W=C(x.toLowerCase(),H);H.push(`.${r(W)}-name-folder-icon`),T(`${_} ${L} ${H.join("")}.folder-icon::before`,P[x]),l.hasFolderIcons=!0}const B=D.languageIds;if(B){!B.jsonc&&B.json&&(B.jsonc=B.json);for(const x in B)T(`${_} .${r(x)}-lang-file-icon.file-icon::before`,B[x]),l.hasFileIcons=!0,s=!0,n[x]=!0}const V=D.fileExtensions;if(V)for(const x in V){const H=[],U=C(x.toLowerCase(),H).split(".");if(U.length){for(let $=0;$<U.length;$++)H.push(`.${r(U.slice($).join("."))}-ext-file-icon`);H.push(".ext-file-icon")}T(`${_} ${H.join("")}.file-icon::before`,V[x]),l.hasFileIcons=!0,s=!0}const z=D.fileNames;if(z)for(const x in z){const H=[],W=C(x.toLowerCase(),H);H.push(`.${r(W)}-name-file-icon`),H.push(".name-file-icon");const U=W.split(".");if(U.length){for(let $=1;$<U.length;$++)H.push(`.${r(U.slice($).join("."))}-ext-file-icon`);H.push(".ext-file-icon")}T(`${_} ${H.join("")}.file-icon::before`,z[x]),l.hasFileIcons=!0,s=!0}}}if(g(c),g(c.light,".vs"),g(c.highContrast,".hc-black"),g(c.highContrast,".hc-light"),!l.hasFileIcons&&!l.hasFolderIcons)return l;const h=c.showLanguageModeIcons===!0||s&&c.showLanguageModeIcons!==!1,v=[],m=c.fonts,w=new Map;if(Array.isArray(m)){const D=m[0].size||"150%";m.forEach(y=>{const T=y.src.map(_=>`${(0,I.asCSSUrl)(o(_.path))} format('${_.format}')`).join(", ");v.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!==D&&w.set(y.id,y.size)}),v.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: ${D}; }`)}for(const D in d){const y=d[D],T=c.iconDefinitions[D];if(T){if(T.iconPath)v.push(`${y.join(", ")} { content: ' '; background-image: ${(0,I.asCSSUrl)(o(T.iconPath))}; }`);else if(T.fontCharacter||T.fontColor){const _=[];T.fontColor&&_.push(`color: ${T.fontColor};`),T.fontCharacter&&_.push(`content: '${T.fontCharacter}';`);const L=T.fontSize??(T.fontId?w.get(T.fontId):void 0);L&&_.push(`font-size: ${L};`),T.fontId&&_.push(`font-family: ${T.fontId};`),h&&_.push("background-image: unset;"),v.push(`${y.join(", ")} { ${_.join(" ")} }`)}}}if(h){for(const D of this.languageService.getRegisteredLanguageIds())if(!n[D]){const y=this.languageService.getIcon(D);if(y){const T=`.show-file-icons .${r(D)}-lang-file-icon.file-icon::before`;v.push(`${T} { content: ' '; background-image: ${(0,I.asCSSUrl)(y.dark)}; }`),v.push(`.vs ${T} { content: ' '; background-image: ${(0,I.asCSSUrl)(y.light)}; }`)}}}return l.content=v.join(` `),l}}e.FileIconThemeLoader=S;function C(u,i){const f=u.lastIndexOf("/");if(f>=0){const c=u.substring(0,f);return i.push(`.${r(c)}-name-dir-icon`),u.substring(f+1)}return u}function r(u){return u=u.replace(/[\11\12\14\15\40]/g,"/"),window.CSS.escape(u)}}),define(ae[2825],le([1,0,53,123,65,193,2815,2049,13,18,33,12,17,413,2812,433,2814,126]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorThemeData=void 0;const s=r.Registry.as(S.Extensions.ColorContribution),d=(0,f.getTokenClassificationRegistry)(),n={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(P,B,V){this.themeTokenColors=[],this.customTokenColors=[],this.colorMap={},this.customColorMap={},this.semanticTokenRules=[],this.customSemanticTokenRules=[],this.textMateThemingRules=void 0,this.tokenColorIndex=void 0,this.id=P,this.label=B,this.settingsId=V,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 x=function(H){H.scope&&H.settings&&(H.scope==="token.info-token"&&(z=!0),P.push({scope:H.scope,settings:{foreground:M(H.settings.foreground),background:M(H.settings.background),fontStyle:H.settings.fontStyle}}))};const P=[],B=this.getColor(S.editorForeground)||this.getDefault(S.editorForeground),V=this.getColor(S.editorBackground)||this.getDefault(S.editorBackground);P.push({settings:{foreground:M(B),background:M(V)}});let z=!1;this.themeTokenColors.forEach(x),this.customTokenColors.forEach(x),z||v[this.type].forEach(x),this.textMateThemingRules=P}return this.textMateThemingRules}getColor(P,B){let V=this.customColorMap[P];return V||(V=this.colorMap[P],B!==!1&&I.isUndefined(V)&&(V=this.getDefault(P)),V)}getTokenStyle(P,B,V,z=!0,x={}){const H={foreground:void 0,bold:void 0,underline:void 0,strikethrough:void 0,italic:void 0},W={foreground:-1,bold:-1,underline:-1,strikethrough:-1,italic:-1};function U(X,G,Q){G.foreground&&W.foreground<=X&&(W.foreground=X,H.foreground=G.foreground,x.foreground=Q);for(const j of["bold","underline","strikethrough","italic"]){const K=j,Y=G[K];Y!==void 0&&W[K]<=X&&(W[K]=X,H[K]=Y,x[K]=Q)}}function $(X){const G=X.selector.match(P,B,V);G>=0&&U(G,X.style,X)}this.semanticTokenRules.forEach($),this.customSemanticTokenRules.forEach($);let q=!1;for(const X in W){const G=X;W[G]===-1?q=!0:W[G]=Number.MAX_VALUE}if(q)for(const X of d.getTokenStylingDefaultRules()){const G=X.selector.match(P,B,V);if(G>=0){let Q;if(X.defaults.scopesToProbe&&(Q=this.resolveScopes(X.defaults.scopesToProbe),Q&&U(G,Q,X.defaults.scopesToProbe)),!Q&&z!==!1){const j=X.defaults[this.type];Q=this.resolveTokenStyleValue(j),Q&&U(G,Q,j)}}}return f.TokenStyle.fromData(H)}resolveTokenStyleValue(P){if(P!==void 0){if(typeof P=="string"){const{type:B,modifiers:V,language:z}=(0,f.parseClassifierString)(P,"");return this.getTokenStyle(B,V,z)}else if(typeof P=="object")return P}}getTokenColorIndex(){if(!this.tokenColorIndex){const P=new L;this.tokenColors.forEach(B=>{P.add(B.settings.foreground),P.add(B.settings.background)}),this.semanticTokenRules.forEach(B=>P.add(B.style.foreground)),d.getTokenStylingDefaultRules().forEach(B=>{const V=B.defaults[this.type];V&&typeof V=="object"&&P.add(V.foreground)}),this.customSemanticTokenRules.forEach(B=>P.add(B.style.foreground)),this.tokenColorIndex=P}return this.tokenColorIndex}get tokenColorMap(){return this.getTokenColorIndex().asArray()}getTokenStyleMetadata(P,B,V,z=!0,x={}){const{type:H,language:W}=(0,f.parseClassifierString)(P,V),U=this.getTokenStyle(H,B,W,z,x);if(!!U)return{foreground:this.getTokenColorIndex().get(U.foreground),bold:U.bold,underline:U.underline,strikethrough:U.strikethrough,italic:U.italic}}getTokenStylingRuleScope(P){if(this.customSemanticTokenRules.indexOf(P)!==-1)return"setting";if(this.semanticTokenRules.indexOf(P)!==-1)return"theme"}getDefault(P){return s.resolveDefaultColor(P,this)}resolveScopes(P,B){this.themeTokenScopeMatchers||(this.themeTokenScopeMatchers=this.themeTokenColors.map(y)),this.customTokenScopeMatchers||(this.customTokenScopeMatchers=this.customTokenColors.map(y));for(const V of P){let q=function(X,G){for(let Q=0;Q<X.length;Q++){const j=X[Q](V);if(j>=0){const K=G[Q],Y=G[Q].settings;j>=H&&Y.foreground&&(z=Y.foreground,H=j,$=K),j>=W&&I.isString(Y.fontStyle)&&(x=Y.fontStyle,W=j,U=K)}}},z,x,H=-1,W=-1,U,$;if(q(this.themeTokenScopeMatchers,this.themeTokenColors),q(this.customTokenScopeMatchers,this.customTokenColors),z!==void 0||x!==void 0)return B&&(B.foreground=$,B.bold=B.italic=B.underline=B.strikethrough=U,B.scope=V),f.TokenStyle.fromSettings(z,x)}}defines(P){return this.customColorMap.hasOwnProperty(P)||this.colorMap.hasOwnProperty(P)}setCustomizations(P){this.setCustomColors(P.colorCustomizations),this.setCustomTokenColors(P.tokenColorCustomizations),this.setCustomSemanticTokenColors(P.semanticTokenColorCustomizations)}setCustomColors(P){this.customColorMap={},this.overwriteCustomColors(P);const B=this.getThemeSpecificColors(P);I.isObject(B)&&this.overwriteCustomColors(B),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}overwriteCustomColors(P){for(const B in P){const V=P[B];typeof V=="string"&&(this.customColorMap[B]=R.Color.fromHex(V))}}setCustomTokenColors(P){this.customTokenColors=[],this.customSemanticHighlightingDeprecated=void 0,this.addCustomTokenColors(P);const B=this.getThemeSpecificColors(P);I.isObject(B)&&this.addCustomTokenColors(B),this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.customTokenScopeMatchers=void 0}setCustomSemanticTokenColors(P){if(this.customSemanticTokenRules=[],this.customSemanticHighlighting=void 0,P){this.customSemanticHighlighting=P.enabled,P.rules&&this.readSemanticTokenRules(P.rules);const B=this.getThemeSpecificColors(P);I.isObject(B)&&(B.enabled!==void 0&&(this.customSemanticHighlighting=B.enabled),B.rules&&this.readSemanticTokenRules(B.rules))}this.tokenColorIndex=void 0,this.textMateThemingRules=void 0}isThemeScope(P){return P.charAt(0)===A.THEME_SCOPE_OPEN_PAREN&&P.charAt(P.length-1)===A.THEME_SCOPE_CLOSE_PAREN}isThemeScopeMatch(P){const B=P.charAt(0),V=P.charAt(P.length-1),z=P.slice(0,-1),x=P.slice(1,-1),H=P.slice(1);return P===this.settingsId||this.settingsId.includes(x)&&B===A.THEME_SCOPE_WILDCARD&&V===A.THEME_SCOPE_WILDCARD||this.settingsId.startsWith(z)&&V===A.THEME_SCOPE_WILDCARD||this.settingsId.endsWith(H)&&B===A.THEME_SCOPE_WILDCARD}getThemeSpecificColors(P){let B;for(const V in P){const z=P[V];if(this.isThemeScope(V)&&z instanceof Object&&!Array.isArray(z)){const x=V.match(A.themeScopeRegex)||[];for(const H of x){const W=H.substring(1,H.length-1);if(this.isThemeScopeMatch(W)){B||(B={});const U=z;for(const $ in U){const q=B[$],X=U[$];Array.isArray(q)&&Array.isArray(X)?B[$]=q.concat(X):X&&(B[$]=X)}}}}}return B}readSemanticTokenRules(P){for(const B in P)if(!this.isThemeScope(B))try{const V=T(B,P[B]);V&&this.customSemanticTokenRules.push(V)}catch{}}addCustomTokenColors(P){for(const B in n){const V=B,z=P[V];if(z){const x=typeof z=="string"?{foreground:z}:z,H=n[V];for(const W of H)this.customTokenColors.push({scope:W,settings:x})}}if(Array.isArray(P.textMateRules))for(const B of P.textMateRules)B.scope&&B.settings&&this.customTokenColors.push(B);P.semanticHighlighting!==void 0&&(this.customSemanticHighlightingDeprecated=P.semanticHighlighting)}ensureLoaded(P){return this.isLoaded?Promise.resolve(void 0):this.load(P)}reload(P){return this.load(P)}load(P){if(!this.location)return Promise.resolve(void 0);this.themeTokenColors=[],this.clearCaches();const B={colors:{},textMateRules:[],semanticTokenRules:[],semanticHighlighting:!1};return g(P,this.location,B).then(V=>{this.isLoaded=!0,this.semanticTokenRules=B.semanticTokenRules,this.colorMap=B.colors,this.themeTokenColors=B.textMateRules,this.themeSemanticHighlighting=B.semanticHighlighting})}clearCaches(){this.tokenColorIndex=void 0,this.textMateThemingRules=void 0,this.themeTokenScopeMatchers=void 0,this.customTokenScopeMatchers=void 0}toStorage(P){const B={};for(const z in this.colorMap)B[z]=R.Color.Format.CSS.formatHexA(this.colorMap[z],!0);const V=JSON.stringify({id:this.id,label:this.label,settingsId:this.settingsId,themeTokenColors:this.themeTokenColors.map(z=>({settings:z.settings,scope:z.scope})),semanticTokenRules:this.semanticTokenRules.map(f.SemanticTokenRule.toJSONObject),extensionData:A.ExtensionData.toJSONObject(this.extensionData),themeSemanticHighlighting:this.themeSemanticHighlighting,colorMap:B,watch:this.watch});P.store(a.STORAGE_KEY,V,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(P,B){return a.createUnloadedTheme((0,C.getThemeTypeSelector)(P),B)}static createUnloadedTheme(P,B){const V=new a(P,"","__"+P);if(V.isLoaded=!1,V.themeTokenColors=[],V.watch=!1,B)for(const z in B)V.colorMap[z]=R.Color.fromHex(B[z]);return V}static createLoadedEmptyTheme(P,B){const V=new a(P,"",B);return V.isLoaded=!0,V.themeTokenColors=[],V.watch=!1,V}static fromStorageData(P){const B=P.get(a.STORAGE_KEY,0);if(!!B)try{const V=JSON.parse(B),z=new a("","","");for(const x in V)switch(x){case"colorMap":{const H=V[x];for(const W in H)z.colorMap[W]=R.Color.fromHex(H[W]);break}case"themeTokenColors":case"id":case"label":case"settingsId":case"watch":case"themeSemanticHighlighting":z[x]=V[x];break;case"semanticTokenRules":{const H=V[x];if(Array.isArray(H))for(const W of H){const U=f.SemanticTokenRule.fromJSONObject(d,W);U&&z.semanticTokenRules.push(U)}break}case"location":break;case"extensionData":z.extensionData=A.ExtensionData.fromJSONObject(V.extensionData);break}return!z.id||!z.settingsId?void 0:z}catch{return}}static fromExtensionTheme(P,B,V){const z=P.uiTheme||"vs-dark",x=o(V.extensionId,P.path),H=`${z} ${x}`,W=P.label||(0,t.basename)(P.path),U=P.id||W,$=new a(H,W,U);return $.description=P.description,$.watch=P._watch===!0,$.location=B,$.extensionData=V,$.isLoaded=!1,$}}e.ColorThemeData=a,a.STORAGE_KEY="colorThemeData";function o(N,P){P.startsWith("./")&&(P=P.substr(2));let B=`${N}-${P}`;return B=B.replace(/[^_a-zA-Z0-9-]/g,"-"),B.charAt(0).match(/[0-9-]/)&&(B="_"+B),B}async function g(N,P,B){if(b.extname(P)===".json"){const V=await N.readExtensionResource(P),z=[],x=p.parse(V,z);if(z.length>0)return Promise.reject(new Error(E.localize(0,null,z.map($=>(0,u.getParseErrorMessage)($.error)).join(", "))));if(p.getNodeType(x)!=="object")return Promise.reject(new Error(E.localize(1,null)));if(x.include&&await g(N,b.joinPath(b.dirname(P),x.include),B),Array.isArray(x.settings))return(0,k.convertSettings)(x.settings,B),null;B.semanticHighlighting=B.semanticHighlighting||x.semanticHighlighting;const H=x.colors;if(H){if(typeof H!="object")return Promise.reject(new Error(E.localize(2,null,P.toString())));for(const $ in H)typeof H[$]=="string"&&(B.colors[$]=R.Color.fromHex(H[$]))}const W=x.tokenColors;if(W)if(Array.isArray(W))B.textMateRules.push(...W);else if(typeof W=="string")await h(N,b.joinPath(b.dirname(P),W),B);else return Promise.reject(new Error(E.localize(3,null,P.toString())));const U=x.semanticTokenColors;if(U&&typeof U=="object")for(const $ in U)try{const q=T($,U[$]);q&&B.semanticTokenRules.push(q)}catch{return Promise.reject(new Error(E.localize(4,null,P.toString())))}}else return h(N,P,B)}function h(N,P,B){return N.readExtensionResource(P).then(V=>{try{const x=(0,i.parse)(V).settings;return Array.isArray(x)?((0,k.convertSettings)(x,B),Promise.resolve(null)):Promise.reject(new Error(E.localize(5,null)))}catch(z){return Promise.reject(new Error(E.localize(6,null,z.message)))}},V=>Promise.reject(new Error(E.localize(7,null,P.toString(),V.message))))}const v={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"}}]},m=N=>-1;function w(N,P){function B(x,H){for(let W=H-1;W>=0;W--)if(D(x,N[W]))return W;return-1}if(P.length<N.length)return-1;let V=P.length-1,z=B(P[V--],N.length);if(z>=0){const x=(z+1)*65536+N[z].length;for(;V>=0;)if(z=B(P[V--],z),z===-1)return-1;return x}return-1}function D(N,P){if(!N)return!1;if(N===P)return!0;const B=P.length;return N.length>B&&N.substr(0,B)===P&&N[B]==="."}function y(N){const P=N.scope;if(!P||!N.settings)return m;const B=[];if(Array.isArray(P))for(const V of P)(0,c.createMatchers)(V,w,B);else(0,c.createMatchers)(P,w,B);return B.length===0?m:V=>{let z=B[0].matcher(V);for(let x=1;x<B.length;x++)z=Math.max(z,B[x].matcher(V));return z}}function T(N,P){const B=d.parseTokenSelector(N);let V;if(typeof P=="string"?V=f.TokenStyle.fromSettings(P,void 0):_(P)&&(V=f.TokenStyle.fromSettings(P.foreground,P.fontStyle,P.bold,P.underline,P.strikethrough,P.italic)),V)return{selector:B,style:V}}function _(N){return N&&(I.isString(N.foreground)||I.isString(N.fontStyle)||I.isBoolean(N.italic)||I.isBoolean(N.underline)||I.isBoolean(N.strikethrough)||I.isBoolean(N.bold))}class L{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null)}add(P){if(P=M(P),P===void 0)return 0;let B=this._color2id[P];return B||(B=++this._lastColorId,this._color2id[P]=B,this._id2color[B]=P,B)}get(P){if(P=M(P),P===void 0)return 0;const B=this._color2id[P];return B||(console.log(`Color ${P} not in index.`),0)}asArray(){return this._id2color.slice(0)}}function M(N){if(!N)return;typeof N!="string"&&(N=R.Color.Format.CSS.formatHexA(N,!0));const P=N.length;if(N.charCodeAt(0)!==35||P!==4&&P!==5&&P!==7&&P!==9)return;const B=[35];for(let V=1;V<P;V++){const z=O(N.charCodeAt(V));if(!z)return;B.push(z),(P===4||P===5)&&B.push(z)}return B.length===9&&B[7]===70&&B[8]===70&&(B.length=7),String.fromCharCode(...B)}function O(N){return N>=48&&N<=57||N>=65&&N<=70?N:N>=97&&N<=102?N-97+65:0}}),define(ae[971],le([1,0,2054,13,17,55,690,33,433,193,14]),function(J,e,t,p,R,A,k,E,I,b,S){"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+",r="Default Light+",u="Default High Contrast",i="Default High Contrast Light",f="vs-seti";e.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE="Default";const c=R.Registry.as(A.Extensions.Configuration),l=[],s=[],d=[],n={type:"string",description:t.localize(0,null),default:S.isWeb?r:C,enum:l,enumDescriptions:d,enumItemLabels:s,errorMessage:t.localize(1,null)},a={type:"string",markdownDescription:t.localize(2,null,b.ThemeSettings.DETECT_COLOR_SCHEME),default:C,enum:l,enumDescriptions:d,enumItemLabels:s,errorMessage:t.localize(3,null)},o={type:"string",markdownDescription:t.localize(4,null,b.ThemeSettings.DETECT_COLOR_SCHEME),default:r,enum:l,enumDescriptions:d,enumItemLabels:s,errorMessage:t.localize(5,null)},g={type:"string",markdownDescription:t.localize(6,null,b.ThemeSettings.DETECT_HC),default:u,enum:l,enumDescriptions:d,enumItemLabels:s,errorMessage:t.localize(7,null)},h={type:"string",markdownDescription:t.localize(8,null,b.ThemeSettings.DETECT_HC),default:i,enum:l,enumDescriptions:d,enumItemLabels:s,errorMessage:t.localize(9,null)},v={type:"boolean",markdownDescription:t.localize(10,null,b.ThemeSettings.PREFERRED_DARK_THEME,b.ThemeSettings.PREFERRED_LIGHT_THEME),default:!1},m={type:"object",description:t.localize(11,null),allOf:[{$ref:E.workbenchColorsSchemaId}],default:{},defaultSnippets:[{body:{}}]},w={type:["string","null"],default:f,description:t.localize(12,null),enum:[null],enumItemLabels:[t.localize(13,null)],enumDescriptions:[t.localize(14,null)],errorMessage:t.localize(15,null)},D={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,b.ThemeSettings.PREFERRED_HC_DARK_THEME,b.ThemeSettings.PREFERRED_HC_LIGHT_THEME),scope:1},T={id:"workbench",order:7.1,type:"object",properties:{[b.ThemeSettings.COLOR_THEME]:n,[b.ThemeSettings.PREFERRED_DARK_THEME]:a,[b.ThemeSettings.PREFERRED_LIGHT_THEME]:o,[b.ThemeSettings.PREFERRED_HC_DARK_THEME]:g,[b.ThemeSettings.PREFERRED_HC_LIGHT_THEME]:h,[b.ThemeSettings.FILE_ICON_THEME]:w,[b.ThemeSettings.COLOR_CUSTOMIZATIONS]:m,[b.ThemeSettings.PRODUCT_ICON_THEME]:D}};c.registerConfiguration(T);const _={id:"window",order:8.1,type:"object",properties:{[b.ThemeSettings.DETECT_HC]:y,[b.ThemeSettings.DETECT_COLOR_SCHEME]:v}};c.registerConfiguration(_);function L(U){return{description:U,$ref:k.textmateColorGroupSchemaId}}const M="^\\[[^\\]]*(\\]\\s*\\[[^\\]]*)*\\]$",O={type:"object",properties:{comments:L(t.localize(21,null)),strings:L(t.localize(22,null)),keywords:L(t.localize(23,null)),numbers:L(t.localize(24,null)),types:L(t.localize(25,null)),functions:L(t.localize(26,null)),variables:L(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},N={description:t.localize(32,null),default:{},allOf:[{...O,patternProperties:{"^\\[":{}}}]},P={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},B={description:t.localize(35,null),default:{},allOf:[{...P,patternProperties:{"^\\[":{}}}]},V={id:"editor",order:7.2,type:"object",properties:{[b.ThemeSettings.TOKEN_COLOR_CUSTOMIZATIONS]:N,[b.ThemeSettings.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS]:B}};c.registerConfiguration(V);function z(U){l.splice(0,l.length,...U.map(j=>j.settingsId)),d.splice(0,d.length,...U.map(j=>j.description||"")),s.splice(0,s.length,...U.map(j=>j.label||""));const $={properties:{}},q={properties:{}},X={properties:{}},G={$ref:E.workbenchColorsSchemaId,additionalProperties:!1},Q={properties:O.properties,additionalProperties:!1};for(const j of U){const K=`[${j.settingsId}]`;$.properties[K]=G,q.properties[K]=Q,X.properties[K]=P}$.patternProperties={[M]:G},q.patternProperties={[M]:Q},X.patternProperties={[M]:P},m.allOf[1]=$,N.allOf[1]=q,B.allOf[1]=X,c.notifyConfigurationSchemaUpdated(T,V)}e.updateColorThemeConfigurationSchemas=z;function x(U){w.enum.splice(1,Number.MAX_VALUE,...U.map($=>$.settingsId)),w.enumItemLabels.splice(1,Number.MAX_VALUE,...U.map($=>$.label)),w.enumDescriptions.splice(1,Number.MAX_VALUE,...U.map($=>$.description||"")),c.notifyConfigurationSchemaUpdated(T)}e.updateFileIconThemeConfigurationSchemas=x;function H(U){D.enum.splice(1,Number.MAX_VALUE,...U.map($=>$.settingsId)),D.enumItemLabels.splice(1,Number.MAX_VALUE,...U.map($=>$.label)),D.enumDescriptions.splice(1,Number.MAX_VALUE,...U.map($=>$.description||"")),c.notifyConfigurationSchemaUpdated(T)}e.updateProductIconThemeConfigurationSchemas=H;class W{constructor($){this.configurationService=$}get colorTheme(){return this.configurationService.getValue(b.ThemeSettings.COLOR_THEME)}get fileIconTheme(){return this.configurationService.getValue(b.ThemeSettings.FILE_ICON_THEME)}get productIconTheme(){return this.configurationService.getValue(b.ThemeSettings.PRODUCT_ICON_THEME)}get colorCustomizations(){return this.configurationService.getValue(b.ThemeSettings.COLOR_CUSTOMIZATIONS)||{}}get tokenColorCustomizations(){return this.configurationService.getValue(b.ThemeSettings.TOKEN_COLOR_CUSTOMIZATIONS)||{}}get semanticTokenColorCustomizations(){return this.configurationService.getValue(b.ThemeSettings.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS)}async setColorTheme($,q){return await this.writeConfiguration(b.ThemeSettings.COLOR_THEME,$.settingsId,q),$}async setFileIconTheme($,q){return await this.writeConfiguration(b.ThemeSettings.FILE_ICON_THEME,$.settingsId,q),$}async setProductIconTheme($,q){return await this.writeConfiguration(b.ThemeSettings.PRODUCT_ICON_THEME,$.settingsId,q),$}isDefaultColorTheme(){const $=this.configurationService.inspect(b.ThemeSettings.COLOR_THEME);return $&&$.default?.value===$.value}findAutoConfigurationTarget($){const q=this.configurationService.inspect($);if(p.isUndefined(q.workspaceFolderValue))if(p.isUndefined(q.workspaceValue)){if(!p.isUndefined(q.userRemote))return 4}else return 5;else return 6;return 2}async writeConfiguration($,q,X){if(X===void 0||X==="preview")return;const G=this.configurationService.inspect($);if(X==="auto")return this.configurationService.updateValue($,q);if(X===2){if(q===G.userValue)return Promise.resolve(void 0);if(q===G.defaultValue){if(p.isUndefined(G.userValue))return Promise.resolve(void 0);q=void 0}}else if((X===5||X===6||X===4)&&q===G.value)return Promise.resolve(void 0);return this.configurationService.updateValue($,q,X)}}e.ThemeConfiguration=W}),define(ae[972],le([1,0,2046,53,18,123,193,413,971,691,13,63,12]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"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 u{constructor(s,d,n){this.iconThemeDocument={iconDefinitions:new Map},this.id=s,this.label=d,this.settingsId=n,this.isLoaded=!1}getIcon(s){return c(s,this.iconThemeDocument)}ensureLoaded(s,d){return this.isLoaded?Promise.resolve(this.styleSheetContent):this.load(s,d)}reload(s,d){return this.load(s,d)}async load(s,d){const n=this.location;if(!n)return Promise.resolve(this.styleSheetContent);const a=[];return this.iconThemeDocument=await i(s,n,a),this.isLoaded=!0,a.length&&d.error(t.localize(0,null,n.toString(),a.join(` `))),this.styleSheetContent}static fromExtensionTheme(s,d,n){const a=n.extensionId+"-"+s.id,o=s.label||p.basename(s.path),g=s.id,h=new u(a,o,g);return h.description=s.description,h.location=d,h.extensionData=n,h.watch=s._watch,h.isLoaded=!1,h}static createUnloadedTheme(s){const d=new u(s,"","__"+s);return d.isLoaded=!1,d.extensionData=void 0,d.watch=!1,d}static get defaultTheme(){let s=u._defaultProductIconTheme;return s||(s=u._defaultProductIconTheme=new u(e.DEFAULT_PRODUCT_ICON_THEME_ID,t.localize(1,null),I.DEFAULT_PRODUCT_ICON_THEME_SETTING_VALUE),s.isLoaded=!0,s.extensionData=void 0,s.watch=!1),s}static fromStorageData(s){const d=s.get(u.STORAGE_KEY,0);if(!!d)try{const n=JSON.parse(d),a=new u("","","");for(const h in n)switch(h){case"id":case"label":case"description":case"settingsId":case"styleSheetContent":case"watch":a[h]=n[h];break;case"location":break;case"extensionData":a.extensionData=k.ExtensionData.fromJSONObject(n.extensionData);break}const{iconDefinitions:o,iconFontDefinitions:g}=n;if(Array.isArray(o)&&(0,S.isObject)(g)){const h=new Map;for(const v of o){const{id:m,fontCharacter:w,fontId:D}=v;if((0,S.isString)(m)&&(0,S.isString)(w))if((0,S.isString)(D)){const y=C.IconFontDefinition.fromJSONObject(g[D]);y&&h.set(m,{fontCharacter:w,font:{id:D,definition:y}})}else h.set(m,{fontCharacter:w})}a.iconThemeDocument={iconDefinitions:h}}return a}catch{return}}toStorage(s){const d=[],n={};for(const o of this.iconThemeDocument.iconDefinitions.entries()){const g=o[1].font;d.push({id:o[0],fontCharacter:o[1].fontCharacter,fontId:g?.id}),g&&n[g.id]===void 0&&(n[g.id]=C.IconFontDefinition.toJSONObject(g.definition))}const a=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),iconDefinitions:d,iconFontDefinitions:n});s.store(u.STORAGE_KEY,a,0,1)}}e.ProductIconThemeData=u,u.STORAGE_KEY="productIconThemeData",u._defaultProductIconTheme=null;function i(l,s,d){return l.readExtensionResource(s).then(n=>{const a=[],o=A.parse(n,a);if(a.length>0)return Promise.reject(new Error(t.localize(2,null,a.map(w=>(0,E.getParseErrorMessage)(w.error)).join(", "))));if(A.getNodeType(o)!=="object")return Promise.reject(new Error(t.localize(3,null)));if(!o.iconDefinitions||!Array.isArray(o.fonts)||!o.fonts.length)return Promise.reject(new Error(t.localize(4,null)));const g=R.dirname(s),h=new Map;for(const w of o.fonts)if((0,S.isString)(w.id)&&w.id.match(b.fontIdRegex)){const D=w.id;let y;(0,S.isString)(w.weight)&&w.weight.match(b.fontWeightRegex)?y=w.weight:d.push(t.localize(5,null,w.id));let T;(0,S.isString)(w.style)&&w.style.match(b.fontStyleRegex)?T=w.style:d.push(t.localize(6,null,w.id));const _=[];if(Array.isArray(w.src))for(const L of w.src)if((0,S.isString)(L.path)&&(0,S.isString)(L.format)&&L.format.match(b.fontFormatRegex)){const M=R.joinPath(g,L.path);_.push({location:M,format:L.format})}else d.push(t.localize(7,null,w.id));_.length?h.set(D,{weight:y,style:T,src:_}):d.push(t.localize(8,null,w.id))}else d.push(t.localize(9,null,w.id));const v=new Map,m=o.fonts[0].id;for(const w in o.iconDefinitions){const D=o.iconDefinitions[w];if((0,S.isString)(D.fontCharacter)){const y=D.fontId??m,T=h.get(y);if(T){const _={id:`pi-${y}`,definition:T};v.set(w,{fontCharacter:D.fontCharacter,font:_})}else d.push(t.localize(10,null,w))}else d.push(t.localize(11,null,w))}return{iconDefinitions:v}})}const f=(0,C.getIconRegistry)();function c(l,s){const d=s.iconDefinitions;let n=d.get(l.id),a=l.defaults;for(;!n&&r.ThemeIcon.isThemeIcon(a);){const o=f.getIcon(a.id);if(o)n=d.get(o.id),a=o.defaults;else return}if(n)return n;if(!r.ThemeIcon.isThemeIcon(a))return a}}),define(ae[2826],le([1,0,1937,99,15,28,17,70,193,119,82,33,24,65,126,690,21,48,972,91,11,32,25,66,29,63,12,6,308,5,31,970,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.manageExtensionIcon=void 0,e.manageExtensionIcon=(0,v.registerIcon)("theme-selection-manage-extension",h.Codicon.gear,(0,t.localize)(0,null));let M=class{constructor(G,Q,j,K,Y,ee,ie,re){this.getMarketplaceColorThemes=G,this.marketplaceQuery=Q,this.extensionGalleryService=j,this.extensionManagementService=K,this.quickInputService=Y,this.logService=ee,this.progressService=ie,this.paneCompositeService=re,this._marketplaceExtensions=new Set,this._marketplaceThemes=[],this._searchOngoing=!1,this._onDidChange=new w.Emitter,this._queryDelayer=new n.ThrottledDelayer(200),this._installedExtensions=K.getInstalled().then(oe=>{const se=new Set;for(const te of oe)se.add(te.identifier.id);return se})}get themes(){return this._marketplaceThemes}get isSearching(){return this._searchOngoing}get onDidChange(){return this._onDidChange.event}trigger(G){this._tokenSource&&(this._tokenSource.cancel(),this._tokenSource=void 0),this._queryDelayer.trigger(()=>(this._tokenSource=new a.CancellationTokenSource,this.doSearch(G,this._tokenSource.token)))}async doSearch(G,Q){this._searchOngoing=!0,this._onDidChange.fire();try{const j=await this._installedExtensions,K={text:`${this.marketplaceQuery} ${G}`,pageSize:20},Y=await this.extensionGalleryService.query(K,Q);for(let ee=0;ee<Y.total&&ee<1&&!Q.isCancellationRequested;ee++){const ie=this._marketplaceThemes.length,re=ee===0?Y.firstPage:await Y.getPage(ee,Q),oe=[],se=[];for(let Z=0;Z<re.length&&!Q.isCancellationRequested;Z++){const ne=re[Z];!j.has(ne.identifier.id)&&!this._marketplaceExtensions.has(ne.identifier.id)&&(this._marketplaceExtensions.add(ne.identifier.id),oe.push(this.getMarketplaceColorThemes(ne.publisher,ne.name,ne.version)),se.push(ne))}const te=await Promise.all(oe);for(let Z=0;Z<te.length;Z++){const ne=se[Z];for(const ce of te[Z])this._marketplaceThemes.push({id:ce.id,theme:ce,label:ce.label,description:`${ne.displayName} \xB7 ${ne.publisherDisplayName}`,galleryExtension:ne,buttons:[$]})}ie!==this._marketplaceThemes.length&&(this._marketplaceThemes.sort((Z,ne)=>Z.label.localeCompare(ne.label)),this._onDidChange.fire())}}catch(j){(0,c.isCancellationError)(j)||this.logService.error("Error while searching for themes:",j)}finally{this._searchOngoing=!1,this._onDidChange.fire()}}openQuickPick(G,Q,j){let K;return new Promise((Y,ee)=>{const ie=this.quickInputService.createQuickPick();ie.items=[],ie.sortByLabel=!1,ie.matchOnDescription=!0,ie.buttons=[this.quickInputService.backButton],ie.title="Marketplace Themes",ie.placeholder=(0,t.localize)(1,null),ie.canSelectMany=!1,ie.onDidChangeValue(()=>this.trigger(ie.value)),ie.onDidAccept(async re=>{const oe=ie.selectedItems[0];oe?.galleryExtension&&(K="selected",ie.hide(),await this.installExtension(oe.galleryExtension)&&j(oe.theme,!0))}),ie.onDidTriggerItemButton(re=>{if(H(re.item)){const oe=re.item.theme?.extensionData?.extensionId;oe?x(this.paneCompositeService,`@id:${oe}`):x(this.paneCompositeService,`${this.marketplaceQuery} ${ie.value}`)}}),ie.onDidChangeActive(re=>j(re[0]?.theme,!1)),ie.onDidHide(()=>{K===void 0&&(j(Q,!0),K="cancelled"),ie.dispose(),Y(K)}),ie.onDidTriggerButton(re=>{re===this.quickInputService.backButton&&(K="back",ie.hide())}),this.onDidChange(()=>{let re=this.themes;this.isSearching&&(re=re.concat({label:"$(sync~spin) Searching for themes...",id:void 0,alwaysShow:!0}));const oe=ie.activeItems[0]?.id,se=oe?re.find(te=>H(te)&&te.id===oe):void 0;ie.items=re,se&&(ie.activeItems=[se])}),this.trigger(G),ie.show()})}async installExtension(G){try{return x(this.paneCompositeService,`@id:${G.identifier.id}`),await this.progressService.withProgress({location:15,title:(0,t.localize)(2,null,G.displayName)},async()=>{await this.extensionManagementService.installFromGallery(G)}),!0}catch(Q){return this.logService.error(`Problem installing extension ${G.identifier.id}`,Q),!1}}dispose(){this._tokenSource&&(this._tokenSource.cancel(),this._tokenSource=void 0),this._queryDelayer.dispose(),this._marketplaceExtensions.clear(),this._marketplaceThemes.length=0}};M=we([F(2,S.IExtensionGalleryService),F(3,S.IExtensionManagementService),F(4,l.IQuickInputService),F(5,o.ILogService),F(6,g.IProgressService),F(7,d.IPaneCompositePartService)],M);let O=class{constructor(G,Q,j,K,Y,ee,ie,re,oe,se,te){this.installMessage=G,this.browseMessage=Q,this.placeholderMessage=j,this.marketplaceTag=K,this.setTheme=Y,this.getMarketplaceColorThemes=ee,this.quickInputService=ie,this.extensionGalleryService=re,this.paneCompositeService=oe,this.extensionResourceLoaderService=se,this.instantiationService=te}async openQuickPick(G,Q){let j;this.extensionGalleryService.isEnabled()&&(this.extensionResourceLoaderService.supportsExtensionGalleryResources&&this.browseMessage?(j=this.instantiationService.createInstance(M,this.getMarketplaceColorThemes.bind(this),this.marketplaceTag),G=[...z(this.browseMessage),...G]):G=[...G,...z(this.installMessage)]);let K;const Y=(ie,re)=>{K&&clearTimeout(K),K=window.setTimeout(()=>{K=void 0;const oe=ie??Q;this.setTheme(oe,re?"auto":"preview").then(void 0,se=>{(0,c.onUnexpectedError)(se),this.setTheme(Q,void 0)})},re?0:200)},ee=ie=>new Promise((re,oe)=>{let se=!1;const te=G.findIndex(ne=>H(ne)&&ne.id===ie),Z=this.quickInputService.createQuickPick();Z.items=G,Z.placeholder=this.placeholderMessage,Z.activeItems=[G[te]],Z.canSelectMany=!1,Z.onDidAccept(async ne=>{se=!0;const ce=Z.selectedItems[0];!ce||typeof ce.id>"u"?j?await j.openQuickPick(Z.value,Q,Y)==="back"&&await ee(void 0):x(this.paneCompositeService,`${this.marketplaceTag} ${Z.value}`):Y(ce.theme,!0),Z.hide(),re()}),Z.onDidChangeActive(ne=>Y(ne[0]?.theme,!1)),Z.onDidHide(()=>{se||(Y(Q,!0),re()),Z.dispose()}),Z.onDidTriggerItemButton(ne=>{if(H(ne.item)){const ce=ne.item.theme?.extensionData?.extensionId;ce?x(this.paneCompositeService,`@id:${ce}`):x(this.paneCompositeService,`${this.marketplaceTag} ${Z.value}`)}}),Z.show()});await ee(Q.id),j?.dispose()}};O=we([F(6,l.IQuickInputService),F(7,S.IExtensionGalleryService),F(8,d.IPaneCompositePartService),F(9,D.IExtensionResourceLoaderService),F(10,y.IInstantiationService)],O);const N="workbench.action.selectTheme";(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:N,title:{value:(0,t.localize)(3,null),original:"Color Theme"},category:E.Categories.Preferences,f1:!0,keybinding:{weight:200,primary:(0,p.KeyChord)(2089,2098)}})}async run(X){const G=X.get(I.IWorkbenchThemeService),Q=(0,t.localize)(4,null),j="$(plus) "+(0,t.localize)(5,null),K=(0,t.localize)(6,null),Y="category:themes",ee=(ne,ce)=>G.setColorTheme(ne,ce),ie=(ne,ce,de)=>G.getMarketplaceColorThemes(ne,ce,de),oe=X.get(y.IInstantiationService).createInstance(O,Q,j,K,Y,ee,ie),se=await G.getColorThemes(),te=G.getColorTheme(),Z=[...U(se.filter(ne=>ne.type===i.ColorScheme.LIGHT),(0,t.localize)(7,null)),...U(se.filter(ne=>ne.type===i.ColorScheme.DARK),(0,t.localize)(8,null)),...U(se.filter(ne=>(0,i.isHighContrast)(ne.type)),(0,t.localize)(9,null))];await oe.openQuickPick(Z,te)}});const P="workbench.action.selectIconTheme";(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:P,title:{value:(0,t.localize)(10,null),original:"File Icon Theme"},category:E.Categories.Preferences,f1:!0})}async run(X){const G=X.get(I.IWorkbenchThemeService),Q=(0,t.localize)(11,null),j=(0,t.localize)(12,null),K="tag:icon-theme",Y=(se,te)=>G.setFileIconTheme(se,te),ee=(se,te,Z)=>G.getMarketplaceFileIconThemes(se,te,Z),re=X.get(y.IInstantiationService).createInstance(O,Q,void 0,j,K,Y,ee),oe=[{type:"separator",label:(0,t.localize)(13,null)},{id:"",theme:_.FileIconThemeData.noIconTheme,label:(0,t.localize)(14,null),description:(0,t.localize)(15,null)},...U(await G.getFileIconThemes())];await re.openQuickPick(oe,G.getFileIconTheme())}});const B="workbench.action.selectProductIconTheme";(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:B,title:{value:(0,t.localize)(16,null),original:"Product Icon Theme"},category:E.Categories.Preferences,f1:!0})}async run(X){const G=X.get(I.IWorkbenchThemeService),Q=(0,t.localize)(17,null),j="$(plus) "+(0,t.localize)(18,null),K=(0,t.localize)(19,null),Y="tag:product-icon-theme",ee=(te,Z)=>G.setProductIconTheme(te,Z),ie=(te,Z,ne)=>G.getMarketplaceProductIconThemes(te,Z,ne),oe=X.get(y.IInstantiationService).createInstance(O,Q,j,K,Y,ee,ie),se=[{type:"separator",label:(0,t.localize)(20,null)},{id:s.DEFAULT_PRODUCT_ICON_THEME_ID,theme:s.ProductIconThemeData.defaultTheme,label:(0,t.localize)(21,null)},...U(await G.getProductIconThemes())];await oe.openQuickPick(se,G.getProductIconTheme())}}),T.CommandsRegistry.registerCommand("workbench.action.previewColorTheme",async function(X,G,Q){const j=X.get(I.IWorkbenchThemeService);let K=V(await j.getColorThemes(),G);K.length===0&&(K=await j.getMarketplaceColorThemes(G.publisher,G.name,G.version));for(const Y of K)if(!Q||Y.settingsId===Q)return await j.setColorTheme(Y,"preview"),Y.settingsId});function V(X,G){return X.filter(({extensionData:Q})=>Q&&Q.extensionIsBuiltin&&(0,A.equalsIgnoreCase)(Q.extensionPublisher,G.publisher)&&(0,A.equalsIgnoreCase)(Q.extensionName,G.name))}function z(X){return[{type:"separator"},{id:void 0,label:X,alwaysShow:!0,buttons:[$]}]}function x(X,G){return X.openPaneComposite(b.VIEWLET_ID,0,!0).then(Q=>{Q&&((Q?.getViewPaneContainer()).search(G),Q.focus())})}function H(X){return X.type!=="separator"}function W(X){const G={id:X.id,theme:X,label:X.label,description:X.description};return X.extensionData&&(G.buttons=[$]),G}function U(X,G){const Q=(K,Y)=>K.label.localeCompare(Y.label),j=X.map(W).sort(Q);return j.length>0&&G&&j.unshift({type:"separator",label:G}),j}const $={iconClass:m.ThemeIcon.asClassName(e.manageExtensionIcon),tooltip:(0,t.localize)(22,null)};(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"workbench.action.generateColorTheme",title:{value:(0,t.localize)(23,null),original:"Generate Color Theme From Current Settings"},category:E.Categories.Developer,f1:!0})}run(X){const Q=X.get(I.IWorkbenchThemeService).getColorTheme(),K=k.Registry.as(C.Extensions.ColorContribution).getColors().map(se=>se.id).sort(),Y={},ee=[];for(const se of K){const te=Q.getColor(se,!1);te?Y[se]=u.Color.Format.CSS.formatHexA(te,!0):ee.push(se)}const ie=[];for(const se of ee){const te=Q.getColor(se);te?Y["__"+se]=u.Color.Format.CSS.formatHexA(te,!0):ie.push(se)}for(const se of ie)Y["__"+se]=null;let re=JSON.stringify({$schema:f.colorThemeSchemaId,type:Q.type,colors:Y,tokenColors:Q.tokenColors.filter(se=>!!se.scope)},null," ");return re=re.replace(/\"__/g,'//"'),X.get(r.IEditorService).openEditor({resource:void 0,contents:re,languageId:"jsonc",options:{pinned:!0}})}});const q="workbench.action.toggleLightDarkThemes";(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:q,title:{value:(0,t.localize)(24,null),original:"Toggle between Light/Dark Themes"},category:E.Categories.Preferences,f1:!0})}async run(X){const G=X.get(I.IWorkbenchThemeService),Q=X.get(L.IConfigurationService),j=G.getColorTheme();let K=I.ThemeSettings.PREFERRED_DARK_THEME;switch(j.type){case i.ColorScheme.LIGHT:K=I.ThemeSettings.PREFERRED_DARK_THEME;break;case i.ColorScheme.DARK:K=I.ThemeSettings.PREFERRED_LIGHT_THEME;break;case i.ColorScheme.HIGH_CONTRAST_LIGHT:K=I.ThemeSettings.PREFERRED_HC_DARK_THEME;break;case i.ColorScheme.HIGH_CONTRAST_DARK:K=I.ThemeSettings.PREFERRED_HC_LIGHT_THEME;break}const Y=Q.getValue(K);if(Y&&typeof Y=="string"){const ee=(await G.getColorThemes()).find(ie=>ie.settingsId===Y);ee&&G.setColorTheme(ee.id,"auto")}}}),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:N,title:(0,t.localize)(25,null)},order:1}),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:P,title:(0,t.localize)(26,null)},order:2}),R.MenuRegistry.appendMenuItem(R.MenuId.MenubarPreferencesMenu,{group:"4_themes",command:{id:B,title:(0,t.localize)(27,null)},order:3}),R.MenuRegistry.appendMenuItem(R.MenuId.GlobalActivity,{group:"4_themes",command:{id:N,title:(0,t.localize)(28,null)},order:1}),R.MenuRegistry.appendMenuItem(R.MenuId.GlobalActivity,{group:"4_themes",command:{id:P,title:(0,t.localize)(29,null)},order:2}),R.MenuRegistry.appendMenuItem(R.MenuId.GlobalActivity,{group:"4_themes",command:{id:B,title:(0,t.localize)(30,null)},order:3})}),define(ae[2827],le([1,0,2055,13,18,131,193,6]),function(J,e,t,p,R,A,k,E){"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 b(){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=b;function S(){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=S;class C{constructor(u,i,f=!1,c=void 0){this.themesExtPoint=u,this.create=i,this.idRequired=f,this.builtInTheme=c,this.onDidChangeEmitter=new E.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.extensionThemes=[],this.initialize()}initialize(){this.themesExtPoint.setHandler((u,i)=>{const f={},c=[];for(const s of this.extensionThemes)f[s.id]=s;this.extensionThemes.length=0;for(const s of u){const d=k.ExtensionData.fromName(s.description.publisher,s.description.name,s.description.isBuiltin);this.onThemes(d,s.description.extensionLocation,s.value,this.extensionThemes,s.collector)}for(const s of this.extensionThemes)f[s.id]?delete f[s.id]:c.push(s);const l=Object.values(f);this.onDidChangeEmitter.fire({themes:this.extensionThemes,added:c,removed:l})})}onThemes(u,i,f,c=[],l){return Array.isArray(f)?(f.forEach(s=>{if(!s.path||!p.isString(s.path)){l?.error(t.localize(14,null,this.themesExtPoint.name,String(s.path)));return}if(this.idRequired&&(!s.id||!p.isString(s.id))){l?.error(t.localize(15,null,this.themesExtPoint.name,String(s.id)));return}const d=R.joinPath(i,s.path);R.isEqualOrParent(d,i)||l?.warn(t.localize(16,null,this.themesExtPoint.name,d.path,i.path));const n=this.create(s,d,u);c.push(n)}),c):(l?.error(t.localize(13,null,this.themesExtPoint.name)),c)}findThemeById(u,i){if(this.builtInTheme&&this.builtInTheme.id===u)return this.builtInTheme;const f=this.getThemes();let c;for(const l of f){if(l.id===u)return l;l.id===i&&(c=l)}return c}findThemeBySettingsId(u,i){if(this.builtInTheme&&this.builtInTheme.settingsId===u)return this.builtInTheme;const f=this.getThemes();let c;for(const l of f){if(l.settingsId===u)return l;l.id===i&&(c=l)}return c}findThemeByExtensionLocation(u){return u?this.getThemes().filter(i=>i.location&&R.isEqualOrParent(i.location,u)):[]}getThemes(){return this.extensionThemes}getMarketplaceThemes(u,i,f){const c=u?.contributes?.[this.themesExtPoint.name];return Array.isArray(c)?this.onThemes(f,i,c):[]}}e.ThemeRegistry=C}),define(ae[2828],le([1,0,6,89,35,2,969,128,23,13]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeHostColorSchemeService=void 0;let S=class js extends A.Disposable{constructor(r,u,i){super(),this.nativeHostService=r,this.storageService=i,this._onDidChangeColorScheme=this._register(new t.Emitter),this.onDidChangeColorScheme=this._onDidChangeColorScheme.event,this._register(this.nativeHostService.onDidChangeColorScheme(c=>this.update(c)));const f=this.getStoredValue()??u.window.colorScheme;this.dark=f.dark,this.highContrast=f.highContrast,this.nativeHostService.getOSColorScheme().then(c=>this.update(c))}getStoredValue(){const r=this.storageService.get(js.STORAGE_KEY,-1);if(r)try{const u=JSON.parse(r);if((0,b.isObject)(u)&&(0,b.isBoolean)(u.highContrast)&&(0,b.isBoolean)(u.dark))return u}catch{}}update({highContrast:r,dark:u}){(u!==this.dark||r!==this.highContrast)&&(this.dark=u,this.highContrast=r,this.storageService.store(js.STORAGE_KEY,JSON.stringify({highContrast:r,dark:u}),-1,1),this._onDidChangeColorScheme.fire())}};S.STORAGE_KEY="HostColorSchemeData",S=we([F(0,p.INativeHostService),F(1,E.INativeWorkbenchEnvironmentService),F(2,I.IStorageService)],S),e.NativeHostColorSchemeService=S,(0,R.registerSingleton)(k.IHostColorSchemeService,S,1)}),define(ae[353],le([1,0,241,5,34,39,283,69,24,111,27,11,83,91,146]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimerService=e.AbstractTimerService=e.ITimerService=void 0,e.ITimerService=(0,p.createDecorator)("timerService");class f{constructor(){this._entries=[]}setMarks(d,n){this._entries.push([d,n])}getDuration(d,n){const a=this._findEntry(d);if(!a)return 0;const o=this._findEntry(n);return o?o.startTime-a.startTime:0}_findEntry(d){for(const[,n]of this._entries)for(let a=n.length-1;a>=0;a--)if(n[a].name===d)return n[a]}getEntries(){return this._entries.slice(0)}}let c=class{constructor(d,n,a,o,g,h,v,m,w){this._lifecycleService=d,this._contextService=n,this._extensionService=a,this._updateService=o,this._paneCompositeService=g,this._editorService=h,this._accessibilityService=v,this._telemetryService=m,this._barrier=new C.Barrier,this._marks=new f,Promise.all([this._extensionService.whenInstalledExtensionsRegistered(),d.when(3),w.whenRestored]).then(()=>(this.setPerformanceMarks("renderer",t.getMarks()),this._computeStartupMetrics())).then(D=>{this._startupMetrics=D,this._reportStartupTimes(D),this._barrier.open()}),this.perfBaseline=this._barrier.wait().then(()=>this._lifecycleService.when(4)).then(()=>(0,C.timeout)(this._startupMetrics.timers.ellapsedRequire)).then(()=>{const D=new i.StopWatch(!0);let y=!1;function T(L){return y?0:(D.elapsed()>=1e3&&(y=!0),L<=2?L:T(L-1)+T(L-2))}D.reset(),T(24);const _=Math.round(D.elapsed());return y?-1:_})}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(d,n){this._marks.setMarks(d,n.filter(a=>a.name.startsWith("code/")))}getPerformanceMarks(){return this._marks.getEntries()}_reportStartupTimes(d){this._telemetryService.publicLog("startupTimeVaried",d);for(const[n,a]of this.getPerformanceMarks()){let o=a[0];for(const g of a){const h=g.startTime-o.startTime;this._telemetryService.publicLog2("startup.timer.mark",{source:n,name:g.name,relativeStartTime:h,startTime:g.startTime}),o=g}}}async _computeStartupMetrics(){const d=this._isInitialStartup(),n=d?"code/didStartMain":"code/willOpenNewWindow",a=this._paneCompositeService.getActivePaneComposite(0),o=this._paneCompositeService.getActivePaneComposite(1),g={version:2,ellapsed:this._marks.getDuration(n,"code/didStartWorkbench"),isLatestVersion:Boolean(await this._updateService.isLatestVersion()),didUseCachedData:this._didUseCachedData(),windowKind:this._lifecycleService.startupKind,windowCount:await this._getWindowCount(),viewletId:a?.getId(),editorIds:this._editorService.visibleEditors.map(h=>h.typeId),panelId:o?o.getId():void 0,timers:{ellapsedAppReady:d?this._marks.getDuration("code/didStartMain","code/mainAppReady"):void 0,ellapsedNlsGeneration:d?this._marks.getDuration("code/willGenerateNls","code/didGenerateNls"):void 0,ellapsedLoadMainBundle:d?this._marks.getDuration("code/willLoadMainBundle","code/didLoadMainBundle"):void 0,ellapsedCrashReporter:d?this._marks.getDuration("code/willStartCrashReporter","code/didStartCrashReporter"):void 0,ellapsedMainServer:d?this._marks.getDuration("code/willStartMainServer","code/didStartMainServer"):void 0,ellapsedWindowCreate:d?this._marks.getDuration("code/willCreateCodeWindow","code/didCreateCodeWindow"):void 0,ellapsedWindowRestoreState:d?this._marks.getDuration("code/willRestoreCodeWindowState","code/didRestoreCodeWindowState"):void 0,ellapsedBrowserWindowCreate:d?this._marks.getDuration("code/willCreateCodeBrowserWindow","code/didCreateCodeBrowserWindow"):void 0,ellapsedWindowMaximize:d?this._marks.getDuration("code/willMaximizeCodeWindow","code/didMaximizeCodeWindow"):void 0,ellapsedWindowLoad:d?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(n,"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:d,hasAccessibilitySupport:this._accessibilityService.isScreenReaderOptimized(),emptyWorkbench:this._contextService.getWorkbenchState()===1};return await this._extendStartupInfo(g),g}};c=we([F(0,E.ILifecycleService),F(1,R.IWorkspaceContextService),F(2,A.IExtensionService),F(3,k.IUpdateService),F(4,u.IPaneCompositePartService),F(5,I.IEditorService),F(6,b.IAccessibilityService),F(7,S.ITelemetryService),F(8,r.IWorkbenchLayoutService)],c),e.AbstractTimerService=c;class l extends c{_isInitialStartup(){return!1}_didUseCachedData(){return!1}async _getWindowCount(){return 1}async _extendStartupInfo(d){d.isVMLikelyhood=0,d.platform=navigator.userAgent,d.release=navigator.appVersion}}e.TimerService=l}),define(ae[2829],le([1,0,68,77,67,39,26,1450,36,120,100,74,119,32,353,51,31,9,22]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadExtensionService=void 0;let d=class{constructor(o,g,h,v,m,w,D,y,T){this._extensionService=g,this._notificationService=h,this._extensionsWorkbenchService=v,this._hostService=m,this._extensionEnablementService=w,this._timerService=D,this._commandService=y,this._environmentService=T,this._extensionHostKind=o.extensionHostKind;const _=o;this._internalExtensionService=_.internalExtensionService,_._setExtensionHostProxy(new n(o.getProxy(R.ExtHostContext.ExtHostExtensionService))),_._setAllMainProxyIdentifiers(Object.keys(R.MainContext).map(L=>R.MainContext[L]))}dispose(){}$getExtension(o){return this._extensionService.getExtension(o)}$activateExtension(o,g){return this._internalExtensionService._activateById(o,g)}async $onWillActivateExtension(o){this._internalExtensionService._onWillActivateExtension(o)}$onDidActivateExtension(o,g,h,v,m){this._internalExtensionService._onDidActivateExtension(o,g,h,v,m)}$onExtensionRuntimeError(o,g){const h=new Error;h.name=g.name,h.message=g.message,h.stack=g.stack,this._internalExtensionService._onExtensionRuntimeError(o,h),console.error(`[${o}]${h.message}`),console.error(h.stack)}async $onExtensionActivationError(o,g,h){const v=new Error;if(v.name=g.name,v.message=g.message,v.stack=g.stack,this._internalExtensionService._onDidActivateExtensionError(o,v),h){const w=await this._extensionService.getExtension(o.value);if(w){const y=(await this._extensionsWorkbenchService.queryLocal()).find(T=>(0,S.areSameExtensions)(T.identifier,{id:h.dependency}));if(y?.local){await this._handleMissingInstalledDependency(w,y.local);return}else{await this._handleMissingNotInstalledDependency(w,h.dependency);return}}}if(!this._environmentService.isBuilt||this._environmentService.isExtensionDevelopment){this._notificationService.error(v);return}console.error(v.message)}async _handleMissingInstalledDependency(o,g){const h=o.displayName||o.name;if(this._extensionEnablementService.isEnabled(g))this._notificationService.notify({severity:t.default.Error,message:(0,E.localize)(0,null,h,g.manifest.displayName||g.manifest.name),actions:{primary:[new I.Action("reload",(0,E.localize)(1,null),"",!0,()=>this._hostService.reload())]}});else{const v=this._extensionEnablementService.getEnablementState(g);v===4?this._notificationService.notify({severity:t.default.Error,message:(0,E.localize)(2,null,h,g.manifest.displayName||g.manifest.name)}):v===0?this._notificationService.notify({severity:t.default.Error,message:(0,E.localize)(3,null,h,g.manifest.displayName||g.manifest.name),actions:{primary:[new I.Action("manageWorkspaceTrust",(0,E.localize)(4,null),"",!0,()=>this._commandService.executeCommand("workbench.trust.manage"))]}}):this._extensionEnablementService.canChangeEnablement(g)?this._notificationService.notify({severity:t.default.Error,message:(0,E.localize)(5,null,h,g.manifest.displayName||g.manifest.name),actions:{primary:[new I.Action("enable",(0,E.localize)(6,null),"",!0,()=>this._extensionEnablementService.setEnablement([g],v===6?8:9).then(()=>this._hostService.reload(),m=>this._notificationService.error(m)))]}}):this._notificationService.notify({severity:t.default.Error,message:(0,E.localize)(7,null,h,g.manifest.displayName||g.manifest.name)})}}async _handleMissingNotInstalledDependency(o,g){const h=o.displayName||o.name;let v=null;try{v=(await this._extensionsWorkbenchService.getExtensions([{id:g}],u.CancellationToken.None))[0]}catch{}v?this._notificationService.notify({severity:t.default.Error,message:(0,E.localize)(8,null,h,v.displayName),actions:{primary:[new I.Action("install",(0,E.localize)(9,null),"",!0,()=>this._extensionsWorkbenchService.install(v).then(()=>this._hostService.reload(),m=>this._notificationService.error(m)))]}}):this._notificationService.error((0,E.localize)(10,null,h,g))}async $setPerformanceMarks(o){this._extensionHostKind===1?this._timerService.setPerformanceMarks("localExtHost",o):this._extensionHostKind===2?this._timerService.setPerformanceMarks("workerExtHost",o):this._timerService.setPerformanceMarks("remoteExtHost",o)}async $asBrowserUri(o){return s.FileAccess.asBrowserUri(l.URI.revive(o))}};d=we([(0,p.extHostNamedCustomer)(R.MainContext.MainThreadExtensionService),F(1,A.IExtensionService),F(2,k.INotificationService),F(3,r.IExtensionsWorkbenchService),F(4,C.IHostService),F(5,b.IWorkbenchExtensionEnablementService),F(6,i.ITimerService),F(7,c.ICommandService),F(8,f.IWorkbenchEnvironmentService)],d),e.MainThreadExtensionService=d;class n{constructor(o){this._actual=o}resolveAuthority(o,g){return this._actual.$resolveAuthority(o,g)}async getCanonicalURI(o,g){const h=await this._actual.$getCanonicalURI(o,g);return h&&l.URI.revive(h)}startExtensionHost(o){return this._actual.$startExtensionHost(o)}extensionTestsExecute(){return this._actual.$extensionTestsExecute()}activateByEvent(o,g){return this._actual.$activateByEvent(o,g)}activate(o,g){return this._actual.$activate(o,g)}setRemoteEnvironment(o){return this._actual.$setRemoteEnvironment(o)}updateRemoteConnectionData(o){return this._actual.$updateRemoteConnectionData(o)}deltaExtensions(o){return this._actual.$deltaExtensions(o)}test_latency(o){return this._actual.$test_latency(o)}test_up(o){return this._actual.$test_up(o)}test_down(o){return this._actual.$test_down(o)}}}),define(ae[2830],le([1,0,39,27,25,32,21,18,675,26,1673,24,524,115,5,919,934,128,19,56,11,220,22,9,72,353,8,809]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsAutoProfiler=void 0;let D=class{constructor(T,_,L,M,O,N,P,B,V,z,x,H){this._extensionService=T,this._extensionProfileService=_,this._telemetryService=L,this._logService=M,this._notificationService=O,this._editorService=N,this._instantiationService=P,this._environmentServie=B,this._profileAnalysisService=V,this._configService=z,this._fileService=x,this._blame=new Set,this._perfBaseline=-1,H.perfBaseline.then(W=>{W<0||(this._perfBaseline=W,this._unresponsiveListener=T.onDidChangeResponsiveChange(this._onDidChangeResponsiveChange,this))})}dispose(){this._unresponsiveListener?.dispose(),this._session?.dispose(!0)}async _onDidChangeResponsiveChange(T){if(T.extensionHostKind!==1)return;const _=await this._extensionService.getInspectPort(T.extensionHostId,!0);if(!!_){if(T.isResponsive&&this._session)this._session.cancel(),this._logService.info("UNRESPONSIVE extension host: received responsive event and cancelling profiling session");else if(!T.isResponsive&&!this._session){const L=new A.CancellationTokenSource;this._session=L;let M;try{M=await this._instantiationService.createInstance(c.ExtensionHostProfiler,_).start()}catch{this._session=void 0;return}this._logService.info("UNRESPONSIVE extension host: starting to profile NOW");try{await(0,n.timeout)(5e3,L.token)}catch{}try{this._processCpuProfile(await M.stop())}catch(O){(0,k.onUnexpectedError)(O)}finally{this._session=void 0}}}}async _processCpuProfile(T){if(await this._extensionService.whenInstalledExtensionsRegistered(),this._configService.getValue("application.experimental.rendererProfiling")){const H=a.TernarySearchTree.forUris();H.fill(this._extensionService.extensions.map(W=>[W.extensionLocation,W])),await this._profileAnalysisService.analyseBottomUp(T.data,W=>H.findSubstr(g.URI.parse(W))?.identifier.value??"<<not-found>>",this._perfBaseline)}const _=this._extensionService.extensions.filter(H=>H.extensionLocation.scheme===o.Schemas.file).map(H=>[H.extensionLocation,u.ExtensionIdentifier.toKey(H.identifier)]),L=await this._profileAnalysisService.analyseByLocation(T.data,_);let M=0,O="",N=-1;for(const[H,W]of L)M+=W,W>N&&(N=W,O=H);const P=N/(M/100),B=await this._extensionService.getExtension(O);if(!B)return;const V=(0,h.generateUuid)(),z=(0,E.joinPath)(this._environmentServie.tmpDir,`exthost-${Math.random().toString(16).slice(2,8)}.cpuprofile`);if(await this._fileService.writeFile(z,d.VSBuffer.fromString(JSON.stringify(T.data))),this._logService.warn(`UNRESPONSIVE extension host: '${O}' took ${P}% of ${N/1e3}ms, saved PROFILE here: '${z}'`),this._telemetryService.publicLog2("exthostunresponsive",{sessionId:V,duration:M,data:L.map(H=>H[0]).flat(),id:u.ExtensionIdentifier.toKey(B.identifier)}),this._extensionProfileService.setUnresponsiveProfile(B.identifier,T),!(P>=95&&N>=5e6))return;const x=await this._instantiationService.invokeFunction(f.createSlowExtensionAction,B,T);!x||this._blame.has(u.ExtensionIdentifier.toKey(B.identifier))||this._blame.size>=3||(this._blame.add(u.ExtensionIdentifier.toKey(B.identifier)),this._telemetryService.publicLog2("exthostunresponsiveprompt",{id:u.ExtensionIdentifier.toKey(B.identifier)}),this._notificationService.prompt(b.Severity.Warning,(0,S.localize)(0,null,B.displayName||B.name),[{label:(0,S.localize)(1,null),run:()=>this._editorService.openEditor(r.RuntimeExtensionsInput.instance,{pinned:!0})},x],{silent:!0}))}};D=we([F(0,t.IExtensionService),F(1,I.IExtensionHostProfileService),F(2,p.ITelemetryService),F(3,R.ILogService),F(4,b.INotificationService),F(5,C.IEditorService),F(6,i.IInstantiationService),F(7,l.INativeWorkbenchEnvironmentService),F(8,w.IProfileAnalysisWorkerService),F(9,m.IConfigurationService),F(10,s.IFileService),F(11,v.ITimerService)],D),e.ExtensionsAutoProfiler=D}),define(ae[973],le([1,0,1797,9,261,62,69,42,5,54,353,39,2,75,546,1022,46,78,24,19,49,14]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PerfviewInput=e.PerfviewContrib=void 0;let o=class{constructor(w,D){this._registration=D.registerTextModelContentProvider("perf",w.createInstance(h))}dispose(){this._registration.dispose()}};o=we([F(0,I.IInstantiationService),F(1,A.ITextModelService)],o),e.PerfviewContrib=o;let g=class Ys extends R.TextResourceEditorInput{get typeId(){return Ys.Id}constructor(w,D,y,T,_){super(Ys.Uri,(0,t.localize)(0,null),void 0,void 0,void 0,w,D,y,T,_)}};g.Id="PerfviewInput",g.Uri=p.URI.from({scheme:"perf",path:"Startup Performance"}),g=we([F(0,A.ITextModelService),F(1,l.ITextFileService),F(2,s.IEditorService),F(3,d.IFileService),F(4,n.ILabelService)],g),e.PerfviewInput=g;let h=class{constructor(w,D,y,T,_,L,M){this._modelService=w,this._languageService=D,this._editorService=y,this._lifecycleService=T,this._timerService=_,this._extensionService=L,this._productService=M,this._modelDisposables=[]}provideTextContent(w){if(!this._model||this._model.isDisposed()){(0,r.dispose)(this._modelDisposables);const D=this._languageService.createById("markdown");this._model=this._modelService.getModel(w)||this._modelService.createModel("Loading...",D,w),this._modelDisposables.push(D.onDidChange(y=>{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()){const w=f.LoaderStats.get(),D=new v;this._addSummary(D),D.blank(),this._addSummaryTable(D,w),D.blank(),this._addExtensionsTable(D),D.blank(),this._addRawPerfMarks(D),D.blank(),this._addCachedDataStats(D),this._model.setValue(D.value)}})}_addSummary(w){const D=this._timerService.startupMetrics;w.heading(2,"System Info"),w.li(`${this._productService.nameShort}: ${this._productService.version} (${this._productService.commit||"0000000"})`),w.li(`OS: ${D.platform}(${D.release})`),D.cpus&&w.li(`CPUs: ${D.cpus.model}(${D.cpus.count} x ${D.cpus.speed})`),typeof D.totalmem=="number"&&typeof D.freemem=="number"&&w.li(`Memory(System): ${(D.totalmem/d.ByteSize.GB).toFixed(2)} GB(${(D.freemem/d.ByteSize.GB).toFixed(2)}GB free)`),D.meminfo&&w.li(`Memory(Process): ${(D.meminfo.workingSetSize/d.ByteSize.KB).toFixed(2)} MB working set(${(D.meminfo.privateBytes/d.ByteSize.KB).toFixed(2)}MB private, ${(D.meminfo.sharedBytes/d.ByteSize.KB).toFixed(2)}MB shared)`),w.li(`VM(likelihood): ${D.isVMLikelyhood}%`),w.li(`Initial Startup: ${D.initialStartup}`),w.li(`Has ${D.windowCount-1} other windows`),w.li(`Screen Reader Active: ${D.hasAccessibilitySupport}`),w.li(`Empty Workspace: ${D.emptyWorkbench}`)}_addSummaryTable(w,D){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"}${D?`, node_modules took ${D.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]),w.heading(2,"Performance Marks"),w.table(["What","Duration","Process","Info"],T)}_addExtensionsTable(w){const D=[],y=[],T=this._extensionService.getExtensionsStatus();for(const L in T){const{activationTimes:M}=T[L];!M||(M.activationReason.startup?D.push([L,M.activationReason.startup,M.codeLoadingTime,M.activateCallTime,M.activateResolvedTime,M.activationReason.activationEvent,M.activationReason.extensionId.value]):y.push([L,M.activationReason.startup,M.codeLoadingTime,M.activateCallTime,M.activateResolvedTime,M.activationReason.activationEvent,M.activationReason.extensionId.value]))}const _=D.concat(y);_.length>0&&(w.heading(2,"Extension Activation Stats"),w.table(["Extension","Eager","Load Code","Call Activate","Finish Activate","Event","By"],_))}_addRawPerfMarks(w){for(const[D,y]of this._timerService.getPerformanceMarks()){w.heading(2,`Raw Perf Marks: ${D}`),w.value+="```\n",w.value+=`Name Timestamp Delta Total `;let T=-1,_=0;for(const{name:L,startTime:M}of y){const O=T!==-1?M-T:0;_+=O,w.value+=`${L} ${M} ${O} ${_} `,T=M}w.value+="```\n"}}_addCachedDataStats(w){const D=new Map;D.set(63,[]),D.set(60,[]),D.set(61,[]),D.set(62,[]);for(const T of J.getStats())D.has(T.type)&&D.get(T.type).push(T.detail);const y=T=>{if(T){T.sort();for(const _ of T)w.li(`${_}`);w.blank()}};w.heading(2,"Node Cached Data Stats"),w.blank(),w.heading(3,"cached data used"),y(D.get(60)),w.heading(3,"cached data missed"),y(D.get(61)),w.heading(3,"cached data rejected"),y(D.get(62)),w.heading(3,"cached data created (lazy, might need refreshes)"),y(D.get(63))}};h=we([F(0,b.IModelService),F(1,E.ILanguageService),F(2,u.ICodeEditorService),F(3,k.ILifecycleService),F(4,S.ITimerService),F(5,C.IExtensionService),F(6,c.IProductService)],h);class v{constructor(){this.value=""}heading(w,D){return this.value+=`${"#".repeat(w)} ${D} `,this}blank(){return this.value+=` `,this}li(w){return this.value+=`* ${w} `,this}table(w,D){this.value+=f.LoaderStats.toMarkdownTable(w,D)}}}),define(ae[2831],le([1,0,1796,15,5,17,70,44,43,973,24,797,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),A.Registry.as(E.Extensions.Workbench).registerWorkbenchContribution(b.PerfviewContrib,2),A.Registry.as(I.EditorExtensions.EditorFactory).registerEditorSerializer(b.PerfviewInput.Id,class{canSerialize(){return!0}serialize(){return""}deserialize(u){return u.createInstance(b.PerfviewInput)}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"perfview.show",title:{value:(0,t.localize)(0,null),original:"Startup Performance"},category:k.Categories.Developer,f1:!0})}run(u){const i=u.get(S.IEditorService),f=u.get(R.IInstantiationService);return i.openEditor(f.createInstance(b.PerfviewInput),{pinned:!0})}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"perf.insta.printAsyncCycles",title:{value:(0,t.localize)(1,null),original:"Print Service Cycles"},category:k.Categories.Developer,f1:!0})}run(i){const f=i.get(R.IInstantiationService);if(f instanceof C.InstantiationService){const c=f._globalGraph?.findCycleSlow();c?console.warn("CYCLE",c):console.warn("YEAH, no more cycles")}}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"perf.insta.printTraces",title:{value:(0,t.localize)(2,null),original:"Print Service Traces"},category:k.Categories.Developer,f1:!0})}run(){if(C.Trace.all.size===0){console.log("Enable via `instantiationService.ts#_enableAllTracing`");return}for(const i of C.Trace.all)console.log(i)}}),(0,p.registerAction2)(class extends p.Action2{constructor(){super({id:"perf.event.profiling",title:{value:(0,t.localize)(3,null),original:"Print Emitter Profiles"},category:k.Categories.Developer,f1:!0})}run(){if(r.EventProfiling.all.size===0){console.log("USE `EmitterOptions._profName` to enable profiling");return}for(const i of r.EventProfiling.all)console.log(`${i.name}: ${i.invocationCount}invocations COST ${i.elapsedOverall}ms, ${i.listenerCount} listeners, avg cost is ${i.durations.reduce((f,c)=>f+c,0)/i.durations.length}ms`)}})}),define(ae[2832],le([1,0,11,56,18,72,8,19,25,89,809,128,459,353]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RendererProfiling=void 0;let i=class{constructor(c,l,s,d,n,a,o){this._environmentService=c,this._fileService=l,this._logService=s,!(0,r.parseExtensionDevOptions)(c).isExtensionDevTestFromCli&&n.perfBaseline.then(h=>{if(s.info(`[perf] Render performance baseline is ${h}ms`),h<0)return;const v=h*10,m=new PerformanceObserver(async w=>{m.takeRecords();const D=w.getEntries().map(T=>T.duration).reduce((T,_)=>Math.max(T,_),0);if(D<v)return;if(!a.getValue("application.experimental.rendererProfiling")){s.debug(`[perf] SLOW task detected (${D}ms) but renderer profiling is disabled via 'application.experimental.rendererProfiling'`);return}const y=(0,A.generateUuid)();s.warn(`[perf] Renderer reported VERY LONG TASK (${D}ms), starting profiling session '${y}'`),m.disconnect();for(let T=0;T<3;T++)try{const _=await d.profileRenderer(y,5e3);if(await o.analyseBottomUp(_,M=>"<<renderer>>",h)===2){this._store(_,y);break}(0,t.timeout)(15e3)}catch(_){s.error(_);break}m.observe({entryTypes:["longtask"]})});m.observe({entryTypes:["longtask"]}),this._observer=m})}dispose(){this._observer?.disconnect()}async _store(c,l){const s=(0,R.joinPath)(this._environmentService.tmpDir,`renderer-${Math.random().toString(16).slice(2,8)}.cpuprofile`);await this._fileService.writeFile(s,p.VSBuffer.fromString(JSON.stringify(c))),this._logService.info(`[perf] stored profile to DISK '${s}'`,l)}};i=we([F(0,C.INativeWorkbenchEnvironmentService),F(1,E.IFileService),F(2,I.ILogService),F(3,b.INativeHostService),F(4,u.ITimerService),F(5,k.IConfigurationService),F(6,S.IProfileAnalysisWorkerService)],i),e.RendererProfiling=i}),define(ae[2833],le([1,0,1799,18,62,47,128,69,973,39,93,9,41,89,46,19,49]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartupProfiler=void 0;let l=class{constructor(d,n,a,o,g,h,v,m,w,D,y){this._dialogService=d,this._environmentService=n,this._textModelResolverService=a,this._clipboardService=o,this._openerService=v,this._nativeHostService=m,this._productService=w,this._fileService=D,this._labelService=y,Promise.all([g.when(4),h.whenInstalledExtensionsRegistered()]).then(()=>{this._stopProfiling()})}_stopProfiling(){if(!this._environmentService.args["prof-startup-prefix"])return;const d=C.URI.file(this._environmentService.args["prof-startup-prefix"]),n=(0,p.dirname)(d),a=(0,p.basename)(d),o=["--prof-startup"];this._fileService.readFile(d).then(h=>o.push(...h.toString().split("|"))).then(()=>this._fileService.del(d,{recursive:!0})).then(()=>new Promise(h=>{const v=()=>{this._fileService.exists(d).then(m=>{m?h():setTimeout(v,500)})};v()})).then(()=>this._fileService.del(d,{recursive:!0})).then(()=>this._fileService.resolve(n).then(h=>(h.children?h.children.filter(v=>v.resource.path.includes(a)):[]).map(v=>v.resource))).then(h=>{const v=h.reduce((m,w)=>`${m}${this._labelService.getUriLabel(w)} `,` `);return this._dialogService.confirm({type:"info",message:(0,t.localize)(0,null),detail:(0,t.localize)(1,null,v),primaryButton:(0,t.localize)(2,null),secondaryButton:(0,t.localize)(3,null)}).then(m=>{m.confirmed?Promise.all([this._nativeHostService.showItemInFolder(h[0].fsPath),this._createPerfIssue(h.map(w=>(0,p.basename)(w)))]).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:o})})):this._nativeHostService.relaunch({removeArgs:o})})})}async _createPerfIssue(d){const n=this._productService.reportIssueUrl;if(!n)return;const a=await this._textModelResolverService.createModelReference(I.PerfviewInput.Uri);try{await this._clipboardService.writeText(a.object.textEditorModel.getValue())}finally{a.dispose()}const o=` 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: ${d.map(v=>`-\`${v}\``).join(` `)} `,g=n,h=g.indexOf("?")===-1?"?":"&";this._openerService.open(C.URI.parse(`${g}${h}body=${encodeURIComponent(o)}`))}};l=we([F(0,A.IDialogService),F(1,k.INativeWorkbenchEnvironmentService),F(2,R.ITextModelService),F(3,S.IClipboardService),F(4,E.ILifecycleService),F(5,b.IExtensionService),F(6,r.IOpenerService),F(7,u.INativeHostService),F(8,i.IProductService),F(9,f.IFileService),F(10,c.ILabelService)],l),e.StartupProfiler=l}),define(ae[974],le([1,0,89,128,34,39,283,69,24,111,353,27,166,35,83,46,23,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.didUseCachedData=e.TimerService=void 0;let s=class extends S.AbstractTimerService{constructor(g,h,v,m,w,D,y,T,_,L,M,O,N){super(v,m,w,D,y,T,_,L,M),this._nativeHostService=g,this._environmentService=h,this._productService=O,this._storageService=N,this.setPerformanceMarks("main",h.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(g){try{const[h,v,m]=await Promise.all([this._nativeHostService.getOSProperties(),this._nativeHostService.getOSStatistics(),this._nativeHostService.getOSVirtualMachineHint()]);g.totalmem=v.totalmem,g.freemem=v.freemem,g.platform=h.platform,g.release=h.release,g.arch=h.arch,g.loadavg=v.loadavg;const w=await r.process.getProcessMemoryInfo();g.meminfo={workingSetSize:w.residentSet,privateBytes:w.private,sharedBytes:w.shared},g.isVMLikelyhood=Math.round(m*100);const D=h.cpus;D&&D.length>0&&(g.cpus={count:D.length,speed:D[0].speed,model:D[0].model})}catch{}}};s=we([F(0,t.INativeHostService),F(1,p.INativeWorkbenchEnvironmentService),F(2,E.ILifecycleService),F(3,R.IWorkspaceContextService),F(4,A.IExtensionService),F(5,k.IUpdateService),F(6,l.IPaneCompositePartService),F(7,I.IEditorService),F(8,b.IAccessibilityService),F(9,C.ITelemetryService),F(10,i.IWorkbenchLayoutService),F(11,f.IProductService),F(12,c.IStorageService)],s),e.TimerService=s,(0,u.registerSingleton)(S.ITimerService,s,1);const d="perf/lastRunningCommit";let n;function a(o,g,h){return typeof n!="boolean"&&(!h.window.isCodeCaching||!o.commit?n=!1:g.get(d,-1)===o.commit?n=!0:(g.store(d,o.commit,-1,1),n=!1)),n}e.didUseCachedData=a}),define(ae[2834],le([1,0,11,21,105,128,69,46,27,283,89,150,24,974,353,19,9,56,118,23,91]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartupTimings=void 0;let a=class{constructor(g,h,v,m,w,D,y,T,_,L,M,O){this._fileService=g,this._timerService=h,this._nativeHostService=v,this._editorService=m,this._paneCompositeService=w,this._telemetryService=D,this._lifecycleService=y,this._updateService=T,this._environmentService=_,this._productService=L,this._workspaceTrustService=M,this._storageService=O,this._report().catch(p.onUnexpectedError)}async _report(){const g=await this._isStandardStartup();this._appendStartupTimes(g).catch(p.onUnexpectedError)}async _appendStartupTimes(g){const h=this._environmentService.args["prof-append-timers"];if(!h)return;const{sessionId:v}=await this._telemetryService.getTelemetryInfo();Promise.all([this._timerService.whenReady(),(0,t.timeout)(15e3)]).then(async()=>{const m=c.URI.file(h),w=[];await this._fileService.exists(m)&&w.push((await this._fileService.readFile(m)).value),w.push(l.VSBuffer.fromString(`${this._timerService.startupMetrics.ellapsed} ${this._productService.nameShort} ${(this._productService.commit||"").slice(0,10)||"0000000000"} ${v} ${g===void 0?"standard_start":"NO_standard_start : "+g} `)),await this._fileService.writeFile(m,l.VSBuffer.concat(w))}).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 g=await this._nativeHostService.getWindowCount();if(g!==1)return"Expected window count : 1, Actual : "+g;const h=this._paneCompositeService.getActivePaneComposite(0);if(!h||h.getId()!==C.VIEWLET_ID)return"Explorer viewlet not visible";const v=this._editorService.visibleEditorPanes;if(v.length!==1)return"Expected text editor count : 1, Actual : "+v.length;if(!(0,R.isCodeEditor)(v[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,u.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=we([F(0,f.IFileService),F(1,i.ITimerService),F(2,S.INativeHostService),F(3,r.IEditorService),F(4,n.IPaneCompositePartService),F(5,I.ITelemetryService),F(6,k.ILifecycleService),F(7,b.IUpdateService),F(8,A.INativeWorkbenchEnvironmentService),F(9,E.IProductService),F(10,s.IWorkspaceTrustManagementService),F(11,d.IStorageService)],a),e.StartupTimings=a}),define(ae[2835],le([1,0,17,44,2833,2834,2832,55,1798]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(k.RendererProfiling,4),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(R.StartupProfiler,3),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(A.StartupTimings,4),t.Registry.as(E.Extensions.Configuration).registerConfiguration({id:"application",order:100,type:"object",properties:{"application.experimental.rendererProfiling":{type:"boolean",default:!1,markdownDescription:(0,I.localize)(0,null)}}})}),define(ae[554],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITitleService=void 0,e.ITitleService=(0,t.createDecorator)("titleService")}),define(ae[2836],le([1,0,87,2,74,554]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DebugTitleContribution=void 0;let k=class{constructor(I,b,S){this.debugService=I,this.hostService=b,this.titleService=S,this.toDispose=[];const C=()=>{I.state===2&&!b.hasFocus?S.updateProperties({prefix:"\u{1F534}"}):S.updateProperties({prefix:""})};this.toDispose.push(I.onDidChangeState(C)),this.toDispose.push(b.onDidChangeFocus(C))}dispose(){(0,p.dispose)(this.toDispose)}};k=we([F(0,t.IDebugService),F(1,R.IHostService),F(2,A.ITitleService)],k),e.DebugTitleContribution=k}),define(ae[2837],le([1,0,35,2687,554]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerSingleton)(R.ITitleService,p.TitlebarPart,0)}),define(ae[2838],le([1,0,25,51,35,225,2,806,69,148,5,128,14,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TunnelService=void 0;let i=class extends k.Disposable{constructor(l,s,d,n,a,o,g,h,v){super(),this._id=l,this._addressProvider=s,this.tunnelRemoteHost=d,this.tunnelRemotePort=n,this.tunnelLocalPort=a,this.localAddress=o,this._onBeforeDispose=g,this._sharedProcessTunnelService=h,this._remoteAuthorityResolverService=v,this.privacy=A.TunnelPrivacyId.Private,this.protocol=void 0,this._updateAddress(),this._register(this._remoteAuthorityResolverService.onDidChangeConnectionData(()=>this._updateAddress()))}_updateAddress(){this._addressProvider.getAddress().then(l=>{this._sharedProcessTunnelService.setAddress(this._id,l)})}async dispose(){this._onBeforeDispose(),super.dispose(),await this._sharedProcessTunnelService.destroyTunnel(this._id)}};i=we([F(7,E.ISharedProcessTunnelService),F(8,b.IRemoteAuthorityResolverService)],i);let f=class extends A.AbstractTunnelService{constructor(l,s,d,n,a,o,g){super(l,g),this._environmentService=s,this._sharedProcessTunnelService=d,this._instantiationService=n,this._nativeWorkbenchEnvironmentService=o,this._activeSharedProcessTunnels=new Set,a.onDidShutdown(()=>{this._activeSharedProcessTunnels.forEach(h=>{this._sharedProcessTunnelService.destroyTunnel(h)})})}isPortPrivileged(l){return(0,A.isPortPrivileged)(l,this.defaultTunnelHost,r.OS,this._nativeWorkbenchEnvironmentService.os.release)}retainOrCreateTunnel(l,s,d,n,a,o,g){const h=this.getTunnelFromMap(s,d);if(h)return++h.refcount,h.value;if(this._tunnelProvider)return this.createWithProvider(this._tunnelProvider,s,d,n,a,o,g);{this.logService.trace(`ForwardedPorts: (TunnelService) Creating tunnel without provider ${s}:${d} on local port ${n}.`);const v=this._createSharedProcessTunnel(l,s,d,n,a);return this.logService.trace("ForwardedPorts: (TunnelService) Tunnel created without provider."),this.addTunnelToMap(s,d,v),v}}async _createSharedProcessTunnel(l,s,d,n,a){const{id:o}=await this._sharedProcessTunnelService.createTunnel();this._activeSharedProcessTunnels.add(o);const g=this._environmentService.remoteAuthority,h=await this._sharedProcessTunnelService.startTunnel(g,o,s,d,n,a);return this._instantiationService.createInstance(i,o,l,s,d,h.tunnelLocalPort,h.localAddress,()=>{this._activeSharedProcessTunnels.delete(o)})}canTunnel(l){return super.canTunnel(l)&&!!this._environmentService.remoteAuthority}};f=we([F(0,t.ILogService),F(1,p.IWorkbenchEnvironmentService),F(2,E.ISharedProcessTunnelService),F(3,S.IInstantiationService),F(4,I.ILifecycleService),F(5,C.INativeWorkbenchEnvironmentService),F(6,u.IConfigurationService)],f),e.TunnelService=f,(0,R.registerSingleton)(A.ITunnelService,f,1)}),define(ae[398],le([1,0,43,261,78,49,24,19,18,51,107]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorInput=void 0;let C=class Xs extends p.AbstractTextResourceEditorInput{get typeId(){return Xs.ID}get editorId(){return t.DEFAULT_EDITOR_ASSOCIATION.id}constructor(u,i,f,c,l,s,d){super(u.resource,void 0,c,i,f,l),this.model=u,this.environmentService=s,this.pathService=d,this.modelResolve=void 0,this.registerModelListeners(u)}registerModelListeners(u){this._register(u.onDidChangeDirty(()=>this._onDidChangeDirty.fire())),this._register(u.onDidChangeName(()=>this._onDidChangeLabel.fire())),this._register(u.onDidRevert(()=>this.dispose()))}getName(){return this.model.name}getDescription(u=1){if(!this.model.hasAssociatedFilePath){const i=this.resource.path;return i!==this.getName()?i:void 0}return super.getDescription(u)}getTitle(u){if(!this.model.hasAssociatedFilePath){const i=this.getName(),f=this.getDescription();return f&&f!==i?`${i} \u2022 ${f}`:i}return super.getTitle(u)}isDirty(){return this.model.isDirty()}getEncoding(){return this.model.getEncoding()}setEncoding(u,i){return this.model.setEncoding(u)}setLanguageId(u,i){this.model.setLanguageId(u,i)}getLanguageId(){return this.model.getLanguageId()}async resolve(){return this.modelResolve||(this.modelResolve=this.model.resolve()),await this.modelResolve,this.model}toUntyped(u){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 u?.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,u.preserveViewState,this.editorService),typeof i.contents=="string"&&!this.model.hasAssociatedFilePath&&(i.resource=void 0)),i}matches(u){return this===u?!0:u instanceof Xs?(0,I.isEqual)(u.resource,this.resource):(0,t.isUntitledResourceEditorInput)(u)?super.matches(u):!1}dispose(){this.modelResolve=void 0,super.dispose()}};C.ID="workbench.editors.untitledEditorInput",C=we([F(1,R.ITextFileService),F(2,A.ILabelService),F(3,k.IEditorService),F(4,E.IFileService),F(5,b.IWorkbenchEnvironmentService),F(6,S.IPathService)],C),e.UntitledTextEditorInput=C}),define(ae[2839],le([1,0,283,102,2219]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerMainProcessRemoteService)(t.IUpdateService,"update",{channelClientCtor:R.UpdateChannelClient})}),define(ae[2840],le([1,0,435,9,102,2221,41,46,35,183,89,2222]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RelayURLService=void 0;let r=class extends C.NativeURLService{constructor(i,f,c,l){super(l),this.nativeHostService=c,this.urlService=b.ProxyChannel.toService(i.getChannel("url")),i.registerChannel("urlHandler",new A.URLHandlerChannel(this)),f.registerOpener(this)}create(i){const f=super.create(i);let c=f.query;return c?c+=`&windowId=${encodeURIComponent(this.nativeHostService.windowId)}`:c=`windowId=${encodeURIComponent(this.nativeHostService.windowId)}`,f.with({query:c})}async open(i,f){return(0,k.matchesScheme)(i,this.productService.urlProtocol)?(typeof i=="string"&&(i=p.URI.parse(i)),await this.urlService.open(i,f)):!1}async handleURL(i,f){const c=await super.open(i,f);return c&&await this.nativeHostService.focusWindow({force:!0}),c}};r=we([F(0,R.IMainProcessService),F(1,k.IOpenerService),F(2,S.INativeHostService),F(3,E.IProductService)],r),e.RelayURLService=r,(0,I.registerSingleton)(t.IURLService,r,0)}),define(ae[2841],le([1,0,32,82,100,25,120]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionsProfile=void 0;let E=class{constructor(b,S,C,r){this.extensionManagementService=b,this.extensionEnablementService=S,this.extensionGalleryService=C,this.logService=r}async getProfileContent(){const b=await this.getLocalExtensions();return JSON.stringify(b)}async applyProfile(b){const S=JSON.parse(b),C=await this.extensionManagementService.getInstalled(),r=[],u=[];for(const f of S){const c=C.find(l=>(0,R.areSameExtensions)(l.identifier,f.identifier));(!c||c.preRelease!==f.preRelease)&&u.push(f),c&&this.extensionEnablementService.isEnabled(c)!==!f.disabled&&r.push({extension:c,enablementState:f.disabled?6:8})}const i=C.filter(f=>f.type===1&&!S.some(({identifier:c})=>(0,R.areSameExtensions)(c,f.identifier)));for(const{extension:f,enablementState:c}of r)this.logService.trace("Profile: Updating extension enablement...",f.identifier.id),await this.extensionEnablementService.setEnablement([f],c),this.logService.info("Profile: Updated extension enablement",f.identifier.id);if(u.length){const f=await this.extensionGalleryService.getExtensions(u.map(c=>({...c.identifier,hasPreRelease:c.preRelease})),t.CancellationToken.None);await Promise.all(u.map(async c=>{const l=f.find(s=>(0,R.areSameExtensions)(s.identifier,c.identifier));!l||(await this.extensionManagementService.canInstall(l)?(this.logService.trace("Profile: Installing extension...",c.identifier.id,l.version),await this.extensionManagementService.installFromGallery(l,{isMachineScoped:!1,donotIncludePackAndDependencies:!0,installPreReleaseVersion:c.preRelease}),this.logService.info("Profile: Installed extension.",c.identifier.id,l.version)):this.logService.info("Profile: Skipped installing extension because it cannot be installed.",l.displayName||l.identifier.id))}))}i.length&&await Promise.all(i.map(f=>this.extensionManagementService.uninstall(f)))}async getLocalExtensions(){const b=[],S=await this.extensionManagementService.getInstalled(void 0);for(const C of S){const{identifier:r,preRelease:u}=C,i=this.extensionEnablementService.getEnablementState(C),f=!this.extensionEnablementService.isEnabledEnablementState(i);if(!f&&C.type===0||f&&i!==6&&i!==7)continue;const c={identifier:r};f&&(c.disabled=!0),u&&(c.preRelease=!0),b.push(c)}return b}};E=we([F(0,p.IExtensionManagementService),F(1,k.IWorkbenchExtensionEnablementService),F(2,p.IExtensionGalleryService),F(3,A.ILogService)],E),e.ExtensionsProfile=E}),define(ae[135],le([1,0,13,2058,15,5,7]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HAS_PROFILES_CONTEXT=e.IS_CURRENT_PROFILE_TRANSIENT_CONTEXT=e.CURRENT_PROFILE_CONTEXT=e.PROFILES_ENABLEMENT_CONTEXT=e.PROFILE_FILTER=e.PROFILE_EXTENSION=e.PROFILES_CATEGORY=e.PROFILES_TTILE=e.MANAGE_PROFILES_ACTION_ID=e.ManageProfilesSubMenu=e.IUserDataProfileImportExportService=e.isUserDataProfileTemplate=e.IUserDataProfileManagementService=e.IUserDataProfileService=void 0,e.IUserDataProfileService=(0,A.createDecorator)("IUserDataProfileService"),e.IUserDataProfileManagementService=(0,A.createDecorator)("IUserDataProfileManagementService");function E(I){const b=I;return!!(b&&typeof b=="object"&&((0,t.isUndefined)(b.settings)||typeof b.settings=="string")&&((0,t.isUndefined)(b.globalState)||typeof b.globalState=="string")&&((0,t.isUndefined)(b.extensions)||typeof b.extensions=="string"))}e.isUserDataProfileTemplate=E,e.IUserDataProfileImportExportService=(0,A.createDecorator)("IUserDataProfileImportExportService"),e.ManageProfilesSubMenu=new R.MenuId("SettingsProfiles"),e.MANAGE_PROFILES_ACTION_ID="workbench.profiles.actions.manage",e.PROFILES_TTILE={value:(0,p.localize)(0,null),original:"Settings Profiles"},e.PROFILES_CATEGORY={...e.PROFILES_TTILE},e.PROFILE_EXTENSION="code-profile",e.PROFILE_FILTER=[{name:(0,p.localize)(1,null),extensions:[e.PROFILE_EXTENSION]}],e.PROFILES_ENABLEMENT_CONTEXT=new k.RawContextKey("profiles.enabled",!0),e.CURRENT_PROFILE_CONTEXT=new k.RawContextKey("currentSettingsProfile",""),e.IS_CURRENT_PROFILE_TRANSIENT_CONTEXT=new k.RawContextKey("isCurrentSettingsProfileTransient",!1),e.HAS_PROFILES_CONTEXT=new k.RawContextKey("hasSettingsProfiles",!1)}),define(ae[2842],le([1,0,1802,11,113,99,234,2,38,5,7,20,40,168,2381,953,348,123,59,938,12,167,116,477,16,13,18,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingEditorDecorationsRenderer=e.KeybindingWidgetRenderer=e.DefineKeybindingController=void 0;const D=t.localize(0,null),y=t.localize(1,null);let T=class Bl extends E.Disposable{static get(P){return P.getContribution(Bl.ID)}constructor(P,B,V){super(),this._editor=P,this._instantiationService=B,this._userDataProfileService=V,this._register(this._editor.onDidChangeModel(z=>this._update())),this._update()}get keybindingWidgetRenderer(){return this._keybindingWidgetRenderer}dispose(){this._disposeKeybindingWidgetRenderer(),this._disposeKeybindingDecorationRenderer(),super.dispose()}_update(){if(!O(this._editor,this._userDataProfileService)){this._disposeKeybindingWidgetRenderer(),this._disposeKeybindingDecorationRenderer();return}this._createKeybindingDecorationRenderer(),this._editor.getOption(82)?this._disposeKeybindingWidgetRenderer():this._createKeybindingWidgetRenderer()}_createKeybindingWidgetRenderer(){this._keybindingWidgetRenderer||(this._keybindingWidgetRenderer=this._instantiationService.createInstance(_,this._editor))}_disposeKeybindingWidgetRenderer(){this._keybindingWidgetRenderer&&(this._keybindingWidgetRenderer.dispose(),this._keybindingWidgetRenderer=void 0)}_createKeybindingDecorationRenderer(){this._keybindingDecorationRenderer||(this._keybindingDecorationRenderer=this._instantiationService.createInstance(L,this._editor))}_disposeKeybindingDecorationRenderer(){this._keybindingDecorationRenderer&&(this._keybindingDecorationRenderer.dispose(),this._keybindingDecorationRenderer=void 0)}};T.ID="editor.contrib.defineKeybinding",T=we([F(1,b.IInstantiationService),F(2,w.IUserDataProfileService)],T),e.DefineKeybindingController=T;let _=class extends E.Disposable{constructor(P,B){super(),this._editor=P,this._instantiationService=B,this._launchWidget=this._register(this._instantiationService.createInstance(c.FloatingClickWidget,this._editor,D,M.ID)),this._register(this._launchWidget.onClick(()=>this.showDefineKeybindingWidget())),this._defineWidget=this._register(this._instantiationService.createInstance(f.DefineKeybindingOverlayWidget,this._editor)),this._launchWidget.render()}showDefineKeybindingWidget(){this._defineWidget.start().then(P=>this._onAccepted(P))}_onAccepted(P){if(this._editor.focus(),P&&this._editor.hasModel()){new RegExp(/\\/g).test(P)&&(P=P.slice(0,-1)+"\\\\");let z=["{",' "key": '+JSON.stringify(P)+",",' "command": "${1:commandId}",',' "when": "${2:editorTextFocus}"',"}$0"].join(` `);const x=i.SmartSnippetInserter.insertSnippet(this._editor.getModel(),this._editor.getPosition());z=x.prepend+z+x.append,this._editor.setPosition(x.position),u.SnippetController2.get(this._editor)?.insert(z,{overwriteBefore:0,overwriteAfter:0})}}};_=we([F(1,b.IInstantiationService)],_),e.KeybindingWidgetRenderer=_;let L=class Vl extends E.Disposable{constructor(P,B){super(),this._editor=P,this._keybindingService=B,this._dec=this._editor.createDecorationsCollection(),this._updateDecorations=this._register(new p.RunOnceScheduler(()=>this._updateDecorationsNow(),500));const V=(0,v.assertIsDefined)(this._editor.getModel());this._register(V.onDidChangeContent(()=>this._updateDecorations.schedule())),this._register(this._keybindingService.onDidUpdateKeybindings(()=>this._updateDecorations.schedule())),this._register({dispose:()=>{this._dec.clear(),this._updateDecorations.cancel()}}),this._updateDecorations.schedule()}_updateDecorationsNow(){const P=(0,v.assertIsDefined)(this._editor.getModel()),B=[],V=(0,l.parseTree)(P.getValue());if(V&&Array.isArray(V.children))for(let z=0,x=V.children.length;z<x;z++){const H=V.children[z],W=this._getDecorationForEntry(P,H);W!==null&&B.push(W)}this._dec.set(B)}_getDecorationForEntry(P,B){if(!Array.isArray(B.children))return null;for(let V=0,z=B.children.length;V<z;V++){const x=B.children[V];if(x.type!=="property"||!Array.isArray(x.children)||x.children.length!==2||x.children[0].value!=="key")continue;const W=x.children[1];if(W.type!=="string")continue;const U=this._keybindingService.resolveUserBinding(W.value);if(U.length===0)return this._createDecoration(!0,null,null,P,W);const $=U[0];let q=null;if($ instanceof d.WindowsNativeResolvedKeybinding&&(q=$.getUSLabel()),!$.isWYSIWYG()){const G=$.getLabel();return typeof G=="string"&&W.value.toLowerCase()===G.toLowerCase()?null:this._createDecoration(!1,$.getLabel(),q,P,W)}if(/abnt_|oem_/.test(W.value))return this._createDecoration(!1,$.getLabel(),q,P,W);const X=$.getUserSettingsLabel();return typeof X=="string"&&!Vl._userSettingsFuzzyEquals(W.value,X)?this._createDecoration(!1,$.getLabel(),q,P,W):null}return null}static _userSettingsFuzzyEquals(P,B){if(P=P.trim().toLowerCase(),B=B.trim().toLowerCase(),P===B)return!0;const V=g.KeybindingParser.parseUserBinding(P),z=g.KeybindingParser.parseUserBinding(B);return(0,h.equals)(V,z,(x,H)=>this._userBindingEquals(x,H))}static _userBindingEquals(P,B){return P===null&&B===null?!0:!P||!B?!1:P instanceof k.SimpleKeybinding&&B instanceof k.SimpleKeybinding||P instanceof k.ScanCodeBinding&&B instanceof k.ScanCodeBinding?P.equals(B):!1}_createDecoration(P,B,V,z,x){let H,W,U;P?(H=new R.MarkdownString().appendText(y),W="keybindingError",U=(0,n.themeColorFromId)(a.overviewRulerError)):(V&&B!==V?H=new R.MarkdownString(t.localize(2,null,B,V)):H=new R.MarkdownString(t.localize(3,null,B)),W="keybindingInfo",U=(0,n.themeColorFromId)(a.overviewRulerInfo));const $=z.getPositionAt(x.offset),q=z.getPositionAt(x.offset+x.length);return{range:new C.Range($.lineNumber,$.column,q.lineNumber,q.column),options:{description:"keybindings-widget",stickiness:1,className:W,hoverMessage:H,overviewRuler:{color:U,position:o.OverviewRulerLane.Right}}}}};L=we([F(1,I.IKeybindingService)],L),e.KeybindingEditorDecorationsRenderer=L;class M extends r.EditorCommand{constructor(){super({id:M.ID,precondition:S.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.languageId.isEqualTo("jsonc")),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,A.KeyChord)(2089,2089),weight:100}})}runEditorCommand(P,B){if(!O(B,P.get(w.IUserDataProfileService))||B.getOption(82))return;const V=T.get(B);V&&V.keybindingWidgetRenderer&&V.keybindingWidgetRenderer.showDefineKeybindingWidget()}}M.ID="editor.action.defineKeybinding";function O(N,P){const B=N.getModel();return B?(0,m.isEqual)(B.uri,P.currentProfile.keybindingsResource):!1}(0,r.registerEditorContribution)(T.ID,T),(0,r.registerEditorCommand)(new M)}),define(ae[2843],le([1,0,10,36,11,6,2,60,50,20,94,236,1806,8,55,37,5,124,17,12,34,118,348,340,680,51,106,463,57,61,135,18,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSettingsRenderer=e.UserSettingsRenderer=void 0;let M=class extends k.Disposable{constructor(x,H,W,U,$){super(),this.editor=x,this.preferencesModel=H,this.preferencesService=W,this.configurationService=U,this.instantiationService=$,this.modelChangeDelayer=new R.Delayer(200),this.settingHighlighter=this._register($.createInstance(P,x)),this.editSettingActionRenderer=this._register(this.instantiationService.createInstance(N,this.editor,this.preferencesModel,this.settingHighlighter)),this._register(this.editSettingActionRenderer.onUpdateSetting(({key:q,value:X,source:G})=>this.updatePreference(q,X,G))),this._register(this.editor.getModel().onDidChangeContent(()=>this.modelChangeDelayer.trigger(()=>this.onModelChanged()))),this.unsupportedSettingsRenderer=this._register($.createInstance(B,x,H))}render(){this.editSettingActionRenderer.render(this.preferencesModel.settingsGroups,this.associatedPreferencesModel),this.unsupportedSettingsRenderer.render()}updatePreference(x,H,W){const U=W.overrideOf?(0,i.overrideIdentifiersFromKey)(W.overrideOf.key):null,$=this.preferencesModel.uri;this.configurationService.updateValue(x,H,{overrideIdentifiers:U,resource:$},this.preferencesModel.configurationTarget).then(()=>this.onSettingUpdated(W))}onModelChanged(){!this.editor.hasModel()||this.render()}onSettingUpdated(x){this.editor.focus(),x=this.getSetting(x),x&&(this.editor.setSelection(x.valueRange),this.settingHighlighter.highlight(x,!0))}getSetting(x){const{key:H,overrideOf:W}=x;if(W){const U=this.getSetting(W);for(const $ of U.overrides)if($.key===H)return $;return}return this.preferencesModel.getPreference(H)}focusPreference(x){const H=this.getSetting(x);H?(this.settingHighlighter.highlight(H,!0),this.editor.setPosition({lineNumber:H.keyRange.startLineNumber,column:H.keyRange.startColumn})):this.settingHighlighter.clear(!0)}clearFocus(x){this.settingHighlighter.clear(!0)}editPreference(x){const H=this.getSetting(x);return!!(H&&this.editSettingActionRenderer.activateOnSetting(H))}};M=we([F(2,m.IPreferencesService),F(3,u.IConfigurationService),F(4,c.IInstantiationService)],M),e.UserSettingsRenderer=M;let O=class extends M{constructor(x,H,W,U,$){super(x,H,W,U,$),this.workspaceConfigurationRenderer=this._register($.createInstance(V,x,H))}render(){super.render(),this.workspaceConfigurationRenderer.render()}};O=we([F(2,m.IPreferencesService),F(3,u.IConfigurationService),F(4,c.IInstantiationService)],O),e.WorkspaceSettingsRenderer=O;let N=class extends k.Disposable{constructor(x,H,W,U,$,q){super(),this.editor=x,this.primarySettingsModel=H,this.settingHighlighter=W,this.configurationService=U,this.instantiationService=$,this.contextMenuService=q,this.settingsGroups=[],this._onUpdateSetting=new A.Emitter,this.onUpdateSetting=this._onUpdateSetting.event,this.editPreferenceWidgetForCursorPosition=this._register(this.instantiationService.createInstance(h.EditPreferenceWidget,x)),this.editPreferenceWidgetForMouseMove=this._register(this.instantiationService.createInstance(h.EditPreferenceWidget,x)),this.toggleEditPreferencesForMouseMoveDelayer=new R.Delayer(75),this._register(this.editPreferenceWidgetForCursorPosition.onClick(X=>this.onEditSettingClicked(this.editPreferenceWidgetForCursorPosition,X))),this._register(this.editPreferenceWidgetForMouseMove.onClick(X=>this.onEditSettingClicked(this.editPreferenceWidgetForMouseMove,X))),this._register(this.editor.onDidChangeCursorPosition(X=>this.onPositionChanged(X))),this._register(this.editor.onMouseMove(X=>this.onMouseMoved(X))),this._register(this.editor.onDidChangeConfiguration(()=>this.onConfigurationChanged()))}render(x,H){this.editPreferenceWidgetForCursorPosition.hide(),this.editPreferenceWidgetForMouseMove.hide(),this.settingsGroups=x,this.associatedPreferencesModel=H;const W=this.getSettings(this.editor.getPosition().lineNumber);W.length&&this.showEditPreferencesWidget(this.editPreferenceWidgetForCursorPosition,W)}isDefaultSettings(){return this.primarySettingsModel instanceof w.DefaultSettingsEditorModel}onConfigurationChanged(){this.editor.getOption(51)||(this.editPreferenceWidgetForCursorPosition.hide(),this.editPreferenceWidgetForMouseMove.hide())}onPositionChanged(x){this.editPreferenceWidgetForMouseMove.hide();const H=this.getSettings(x.position.lineNumber);H.length?this.showEditPreferencesWidget(this.editPreferenceWidgetForCursorPosition,H):this.editPreferenceWidgetForCursorPosition.hide()}onMouseMoved(x){const H=this.getEditPreferenceWidgetUnderMouse(x);if(H){this.onMouseOver(H);return}this.settingHighlighter.clear(),this.toggleEditPreferencesForMouseMoveDelayer.trigger(()=>this.toggleEditPreferenceWidgetForMouseMove(x))}getEditPreferenceWidgetUnderMouse(x){if(x.target.type===2){const H=x.target.position.lineNumber;if(this.editPreferenceWidgetForMouseMove.getLine()===H&&this.editPreferenceWidgetForMouseMove.isVisible())return this.editPreferenceWidgetForMouseMove;if(this.editPreferenceWidgetForCursorPosition.getLine()===H&&this.editPreferenceWidgetForCursorPosition.isVisible())return this.editPreferenceWidgetForCursorPosition}}toggleEditPreferenceWidgetForMouseMove(x){const H=x.target.position?this.getSettings(x.target.position.lineNumber):null;H&&H.length?this.showEditPreferencesWidget(this.editPreferenceWidgetForMouseMove,H):this.editPreferenceWidgetForMouseMove.hide()}showEditPreferencesWidget(x,H){const W=H[0].valueRange.startLineNumber;this.editor.getOption(51)&&this.marginFreeFromOtherDecorations(W)&&(x.show(W,r.localize(0,null),H),(x===this.editPreferenceWidgetForCursorPosition?this.editPreferenceWidgetForMouseMove:this.editPreferenceWidgetForCursorPosition).hide())}marginFreeFromOtherDecorations(x){const H=this.editor.getLineDecorations(x);if(H){for(const{options:W}of H)if(W.glyphMarginClassName&&W.glyphMarginClassName.indexOf(d.ThemeIcon.asClassName(g.settingsEditIcon))===-1)return!1}return!0}getSettings(x){const H=this.getConfigurationsMap();return this.getSettingsAtLineNumber(x).filter(W=>{const U=H[W.key];if(U){if(U.policy&&this.configurationService.inspect(W.key).policyValue!==void 0)return!1;if(this.isDefaultSettings())return W.key!=="launch";if((U.type==="boolean"||U.enum)&&(this.primarySettingsModel.configurationTarget!==6||U.scope===4||U.scope===5))return!0}return!1})}getSettingsAtLineNumber(x){let H=0;const W=[];for(const U of this.settingsGroups){if(U.range.startLineNumber>x)break;if(x>=U.range.startLineNumber&&x<=U.range.endLineNumber)for(const $ of U.sections)for(const q of $.settings){if(q.range.startLineNumber>x)break;if(x>=q.range.startLineNumber&&x<=q.range.endLineNumber)if(!this.isDefaultSettings()&&q.overrides.length)for(const X of q.overrides)x>=X.range.startLineNumber&&x<=X.range.endLineNumber&&W.push({...X,index:H,groupId:U.id});else W.push({...q,index:H,groupId:U.id});H++}}return W}onMouseOver(x){this.settingHighlighter.highlight(x.preferences[0])}onEditSettingClicked(x,H){t.EventHelper.stop(H.event,!0);const W={x:H.event.posx,y:H.event.posy},U=this.getSettings(x.getLine()).length===1?this.getActions(x.preferences[0],this.getConfigurationsMap()[x.preferences[0].key]):x.preferences.map($=>new p.SubmenuAction(`preferences.submenu.${$.key}`,$.key,this.getActions($,this.getConfigurationsMap()[$.key])));this.contextMenuService.showContextMenu({getAnchor:()=>W,getActions:()=>U})}activateOnSetting(x){const H=x.keyRange.startLineNumber,W=this.getSettings(H);if(!W.length)return!1;this.editPreferenceWidgetForMouseMove.show(H,"",W);const U=this.getActions(this.editPreferenceWidgetForMouseMove.preferences[0],this.getConfigurationsMap()[this.editPreferenceWidgetForMouseMove.preferences[0].key]);return this.contextMenuService.showContextMenu({getAnchor:()=>this.toAbsoluteCoords(new I.Position(H,1)),getActions:()=>U}),!0}toAbsoluteCoords(x){const H=this.editor.getScrolledVisiblePosition(x),W=(0,t.getDomNodePagePosition)(this.editor.getDomNode()),U=W.left+H.left,$=W.top+H.top+H.height;return{x:U,y:$+10}}getConfigurationsMap(){return s.Registry.as(i.Extensions.Configuration).getConfigurationProperties()}getActions(x,H){return H.type==="boolean"?[{id:"truthyValue",label:"true",enabled:!0,run:()=>this.updateSetting(x.key,!0,x)},{id:"falsyValue",label:"false",enabled:!0,run:()=>this.updateSetting(x.key,!1,x)}]:H.enum?H.enum.map(W=>({id:W,label:JSON.stringify(W),enabled:!0,run:()=>this.updateSetting(x.key,W,x)})):this.getDefaultActions(x)}getDefaultActions(x){if(this.isDefaultSettings()){const H=this.associatedPreferencesModel.getPreference(x.key);return[{id:"setDefaultValue",label:H?r.localize(1,null):r.localize(2,null),enabled:!0,run:()=>this.updateSetting(x.key,x.value,x)}]}return[]}updateSetting(x,H,W){this._onUpdateSetting.fire({key:x,value:H,source:W})}};N=we([F(3,u.IConfigurationService),F(4,c.IInstantiationService),F(5,f.IContextMenuService)],N);let P=class extends k.Disposable{constructor(x,H){super(),this.editor=x,this.fixedHighlighter=this._register(H.createInstance(o.RangeHighlightDecorations)),this.volatileHighlighter=this._register(H.createInstance(o.RangeHighlightDecorations))}highlight(x,H=!1){this.volatileHighlighter.removeHighlightRange(),this.fixedHighlighter.removeHighlightRange(),(H?this.fixedHighlighter:this.volatileHighlighter).highlightRange({range:x.valueRange,resource:this.editor.getModel().uri},this.editor),this.editor.revealLineInCenterIfOutsideViewport(x.valueRange.startLineNumber,0)}clear(x=!1){this.volatileHighlighter.removeHighlightRange(),x&&this.fixedHighlighter.removeHighlightRange()}};P=we([F(1,c.IInstantiationService)],P);let B=class extends k.Disposable{constructor(x,H,W,U,$,q,X,G,Q,j){super(),this.editor=x,this.settingsEditorModel=H,this.markerService=W,this.environmentService=U,this.configurationService=$,this.workspaceTrustManagementService=q,this.uriIdentityService=X,this.userDataProfileService=Q,this.userDataProfilesService=j,this.renderingDelayer=new R.Delayer(200),this.codeActions=new E.ResourceMap(K=>this.uriIdentityService.extUri.getComparisonKey(K)),this._register(this.editor.getModel().onDidChangeContent(()=>this.delayedRender())),this._register(A.Event.filter(this.configurationService.onDidChangeConfiguration,K=>K.source===7)(()=>this.delayedRender())),this._register(G.codeActionProvider.register({pattern:H.uri.path},this))}delayedRender(){this.renderingDelayer.trigger(()=>this.render())}render(){this.codeActions.clear();const x=this.generateMarkerData();x.length?this.markerService.changeOne("UnsupportedSettingsRenderer",this.settingsEditorModel.uri,x):this.markerService.remove("UnsupportedSettingsRenderer",[this.settingsEditorModel.uri])}async provideCodeActions(x,H,W,U){const $=[],q=this.codeActions.get(x.uri);if(q)for(const[X,G]of q)X.containsRange(H)&&$.push(...G);return{actions:$,dispose:()=>{}}}generateMarkerData(){const x=[],H=s.Registry.as(i.Extensions.Configuration).getConfigurationProperties();for(const W of this.settingsEditorModel.settingsGroups)for(const U of W.sections)for(const $ of U.settings){const q=H[$.key];if(q){if(this.handlePolicyConfiguration($,q,x))continue;switch(this.settingsEditorModel.configurationTarget){case 3:this.handleLocalUserConfiguration($,q,x);break;case 4:this.handleRemoteUserConfiguration($,q,x);break;case 5:this.handleWorkspaceConfiguration($,q,x);break;case 6:this.handleWorkspaceFolderConfiguration($,q,x);break}}else i.OVERRIDE_PROPERTY_REGEX.test($.key)||x.push({severity:l.MarkerSeverity.Hint,tags:[1],...$.range,message:r.localize(3,null)})}return x}handlePolicyConfiguration(x,H,W){return!H.policy||this.configurationService.inspect(x.key).policyValue===void 0||this.settingsEditorModel.configurationTarget===7?!1:(W.push({severity:l.MarkerSeverity.Hint,tags:[1],...x.range,message:r.localize(4,null)}),!0)}handleLocalUserConfiguration(x,H,W){this.userDataProfileService.currentProfile.isDefault||((0,_.isEqual)(this.userDataProfilesService.defaultProfile.settingsResource,this.settingsEditorModel.uri)&&H.scope!==1?W.push({severity:l.MarkerSeverity.Hint,tags:[1],...x.range,message:r.localize(5,null)}):(0,_.isEqual)(this.userDataProfileService.currentProfile.settingsResource,this.settingsEditorModel.uri)&&H.scope===1&&W.push(this.generateUnsupportedApplicationSettingMarker(x))),this.environmentService.remoteAuthority&&(H.scope===2||H.scope===6)&&W.push({severity:l.MarkerSeverity.Hint,tags:[1],...x.range,message:r.localize(6,null)})}handleRemoteUserConfiguration(x,H,W){H.scope===1&&W.push(this.generateUnsupportedApplicationSettingMarker(x))}handleWorkspaceConfiguration(x,H,W){if(H.scope===1&&W.push(this.generateUnsupportedApplicationSettingMarker(x)),H.scope===2&&W.push(this.generateUnsupportedMachineSettingMarker(x)),!this.workspaceTrustManagementService.isWorkspaceTrusted()&&H.restricted){const U=this.generateUntrustedSettingMarker(x);W.push(U);const $=this.generateUntrustedSettingCodeActions([U]);this.addCodeActions(U,$)}}handleWorkspaceFolderConfiguration(x,H,W){if(H.scope===1&&W.push(this.generateUnsupportedApplicationSettingMarker(x)),H.scope===2&&W.push(this.generateUnsupportedMachineSettingMarker(x)),H.scope===3&&W.push({severity:l.MarkerSeverity.Hint,tags:[1],...x.range,message:r.localize(7,null)}),!this.workspaceTrustManagementService.isWorkspaceTrusted()&&H.restricted){const U=this.generateUntrustedSettingMarker(x);W.push(U);const $=this.generateUntrustedSettingCodeActions([U]);this.addCodeActions(U,$)}}generateUnsupportedApplicationSettingMarker(x){return{severity:l.MarkerSeverity.Hint,tags:[1],...x.range,message:r.localize(8,null)}}generateUnsupportedMachineSettingMarker(x){return{severity:l.MarkerSeverity.Hint,tags:[1],...x.range,message:r.localize(9,null)}}generateUntrustedSettingMarker(x){return{severity:l.MarkerSeverity.Warning,...x.range,message:r.localize(10,null)}}generateUntrustedSettingCodeActions(x){return[{title:r.localize(11,null),command:{id:"workbench.trust.manage",title:r.localize(12,null)},diagnostics:x,kind:C.CodeActionKind.QuickFix.value}]}addCodeActions(x,H){let W=this.codeActions.get(this.settingsEditorModel.uri);W||(W=[],this.codeActions.set(this.settingsEditorModel.uri,W)),W.push([b.Range.lift(x),H])}dispose(){this.markerService.remove("UnsupportedSettingsRenderer",[this.settingsEditorModel.uri]),this.codeActions.clear(),super.dispose()}};B=we([F(2,l.IMarkerService),F(3,v.IWorkbenchEnvironmentService),F(4,u.IConfigurationService),F(5,a.IWorkspaceTrustManagementService),F(6,D.IUriIdentityService),F(7,y.ILanguageFeaturesService),F(8,T.IUserDataProfileService),F(9,L.IUserDataProfilesService)],B);let V=class Qs extends k.Disposable{constructor(x,H,W,U){super(),this.editor=x,this.workspaceSettingsEditorModel=H,this.workspaceContextService=W,this.markerService=U,this.decorations=this.editor.createDecorationsCollection(),this.renderingDelayer=new R.Delayer(200),this._register(this.editor.getModel().onDidChangeContent(()=>this.renderingDelayer.trigger(()=>this.render())))}render(){const x=[];if(this.workspaceContextService.getWorkbenchState()===3&&this.workspaceSettingsEditorModel instanceof w.WorkspaceConfigurationEditorModel){const H=[];for(const W of this.workspaceSettingsEditorModel.configurationGroups)for(const U of W.sections)for(const $ of U.settings)Qs.supportedKeys.includes($.key)||x.push({severity:l.MarkerSeverity.Hint,tags:[1],...$.range,message:r.localize(13,null)});this.decorations.set(H.map(W=>this.createDecoration(W)))}x.length?this.markerService.changeOne("WorkspaceConfigurationRenderer",this.workspaceSettingsEditorModel.uri,x):this.markerService.remove("WorkspaceConfigurationRenderer",[this.workspaceSettingsEditorModel.uri])}createDecoration(x){return{range:x,options:Qs._DIM_CONFIGURATION_}}dispose(){this.markerService.remove("WorkspaceConfigurationRenderer",[this.workspaceSettingsEditorModel.uri]),this.decorations.clear(),super.dispose()}};V.supportedKeys=["folders","tasks","launch","extensions","settings","remoteAuthority","transient"],V._DIM_CONFIGURATION_=S.ModelDecorationOptions.register({description:"dim-configuration",stickiness:1,inlineClassName:"dim-configuration"}),V=we([F(2,n.IWorkspaceContextService),F(3,l.IMarkerService)],V)}),define(ae[2844],le([1,0,2,5,34,2843,106,463]),function(J,e,t,p,R,A,k,E){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditorContribution=void 0;let I=class extends t.Disposable{constructor(S,C,r,u){super(),this.editor=S,this.instantiationService=C,this.preferencesService=r,this.workspaceContextService=u,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 S=this.editor.getModel();if(S){const C=await this.preferencesService.createPreferencesEditorModel(S.uri);if(C instanceof E.SettingsEditorModel&&this.editor.getModel())switch(this.disposables.add(C),C.configurationTarget){case 5: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=we([F(1,p.IInstantiationService),F(2,k.IPreferencesService),F(3,R.IWorkspaceContextService)],I),e.SettingsEditorContribution=I}),define(ae[692],le([1,0,16,28,13,9,877,269,106,51,176,2,6,55,42,17,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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 l extends C.Disposable{constructor(H){super(),this._tabbable=!1,this._onDidChangeTabbable=new r.Emitter,this.onDidChangeTabbable=this._onDidChangeTabbable.event,this.id=H}get tabbable(){return this._tabbable}set tabbable(H){this._tabbable=H,this._onDidChangeTabbable.fire()}}e.SettingsTreeElement=l;class s extends l{get children(){return this._children}set children(H){this._children=H,this._childSettingKeys=new Set,this._children.forEach(W=>{W instanceof n&&this._childSettingKeys.add(W.setting.key)})}constructor(H,W,U,$,q){super(H),this._childSettingKeys=new Set,this._children=[],this.count=W,this.label=U,this.level=$,this.isFirstGroup=q}containsSetting(H){return this._childSettingKeys.has(H)}}e.SettingsTreeGroupElement=s;class d extends l{constructor(H,W){super(H),this.extensionIds=W}}e.SettingsTreeNewExtensionsElement=d;class n extends l{constructor(H,W,U,$,q){super(h(W.id+"_"+H.key)),this.languageService=q,this._displayCategory=null,this._displayLabel=null,this.isConfigured=!1,this.isUntrusted=!1,this.hasPolicyValue=!1,this.overriddenScopeList=[],this.overriddenDefaultsLanguageList=[],this.languageOverrideValues=new Map,this.setting=H,this.parent=W,this.update(U,$)}get displayCategory(){return this._displayCategory||this.initLabels(),this._displayCategory}get displayLabel(){return this._displayLabel||this.initLabels(),this._displayLabel}initLabels(){const H=v(this.setting.key,this.parent.id,this.setting.isLanguageTagSetting);this._displayLabel=H.label,this._displayCategory=H.category}update(H,W){let{isConfigured:U,inspected:$,targetSelector:q,inspectedLanguageOverrides:X,languageSelector:G}=H;switch(q){case"workspaceFolderValue":case"workspaceValue":this.isUntrusted=!!this.setting.restricted&&!W;break}let Q=U?$[q]:$.defaultValue;const j=[],K=[];if((G||q!=="workspaceValue")&&typeof $.workspaceValue<"u"&&j.push("workspace:"),(G||q!=="userRemoteValue")&&typeof $.userRemoteValue<"u"&&j.push("remote:"),(G||q!=="userLocalValue")&&typeof $.userLocalValue<"u"&&j.push("user:"),$.overrideIdentifiers)for(const Y of $.overrideIdentifiers){const ee=X.get(Y);ee&&(this.languageService.isRegisteredLanguageId(Y)&&(G!==Y&&typeof ee.default?.override<"u"&&K.push(Y),(G!==Y||q!=="workspaceValue")&&typeof ee.workspace?.override<"u"&&j.push(`workspace:${Y}`),(G!==Y||q!=="userRemoteValue")&&typeof ee.userRemote?.override<"u"&&j.push(`remote:${Y}`),(G!==Y||q!=="userLocalValue")&&typeof ee.userLocal?.override<"u"&&j.push(`user:${Y}`)),this.languageOverrideValues.set(Y,ee))}if(this.overriddenScopeList=j,this.overriddenDefaultsLanguageList=K,this.defaultValueSource=this.setting.nonLanguageSpecificDefaultValueSource,$.policyValue)this.hasPolicyValue=!0,U=!1,Q=$.policyValue,this.scopeValue=$.policyValue,this.defaultValue=$.defaultValue;else if(G&&this.languageOverrideValues.has(G)){const Y=this.languageOverrideValues.get(G);Q=(U?Y[q]:Y.defaultValue)??Q,this.scopeValue=U&&Y[q],this.defaultValue=Y.defaultValue??$.defaultValue;const ie=f.Registry.as(u.Extensions.Configuration).getConfigurationDefaultsOverrides().get(`[${G}]`)?.valuesSources?.get(this.setting.key);ie&&(this.defaultValueSource=ie)}else this.scopeValue=U&&$[q],this.defaultValue=$.defaultValue;if(this.value=Q,this.isConfigured=U,(U||this.setting.tags||this.tags||this.setting.restricted||this.hasPolicyValue)&&(this.tags=new Set,U&&this.tags.add(E.MODIFIED_SETTING_TAG),this.setting.tags?.forEach(Y=>this.tags.add(Y)),this.setting.restricted&&this.tags.add(E.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG),this.hasPolicyValue&&this.tags.add(E.POLICY_SETTING_TAG)),this.setting.description.length>n.MAX_DESC_LINES){const Y=this.setting.description.slice(0,n.MAX_DESC_LINES);Y.push("[...]"),this.description=Y.join(` `)}else this.description=this.setting.description.join(` `);this.setting.enum&&(!this.setting.type||_(this.setting.type))?this.valueType=I.SettingValueType.Enum:this.setting.type==="string"?this.setting.editPresentation===u.EditPresentationTypes.Multiline?this.valueType=I.SettingValueType.MultilineString:this.valueType=I.SettingValueType.String:D(this.setting)?this.valueType=I.SettingValueType.Exclude:this.setting.type==="integer"?this.valueType=I.SettingValueType.Integer:this.setting.type==="number"?this.valueType=I.SettingValueType.Number:this.setting.type==="boolean"?this.valueType=I.SettingValueType.Boolean:this.setting.type==="array"&&this.setting.arrayItemType&&["string","enum","number","integer"].includes(this.setting.arrayItemType)?this.valueType=I.SettingValueType.Array:Array.isArray(this.setting.type)&&this.setting.type.includes(I.SettingValueType.Null)&&this.setting.type.length===2?this.setting.type.includes(I.SettingValueType.Integer)?this.valueType=I.SettingValueType.NullableInteger:this.setting.type.includes(I.SettingValueType.Number)?this.valueType=I.SettingValueType.NullableNumber:this.valueType=I.SettingValueType.Complex:T(this.setting)?this.setting.allKeysAreBoolean?this.valueType=I.SettingValueType.BooleanObject:this.valueType=I.SettingValueType.Object:this.setting.isLanguageTagSetting?this.valueType=I.SettingValueType.LanguageTag:this.valueType=I.SettingValueType.Complex}matchesAllTags(H){if(!H||!H.size)return!0;if(this.tags){let W=!0;return H.forEach(U=>{W=W&&this.tags.has(U)}),W}else return!1}matchesScope(H,W){const U=A.URI.isUri(H)?6:H;return this.setting.scope?U===1?S.APPLICATION_SCOPES.includes(this.setting.scope):U===6?S.FOLDER_SCOPES.includes(this.setting.scope):U===5?S.WORKSPACE_SCOPES.includes(this.setting.scope):U===4?S.REMOTE_MACHINE_SCOPES.includes(this.setting.scope):U===3&&W?S.LOCAL_MACHINE_SCOPES.includes(this.setting.scope):!0:!0}matchesAnyExtension(H){return!H||!H.size?!0:this.setting.extensionInfo?Array.from(H).some(W=>W.toLowerCase()===this.setting.extensionInfo.id.toLowerCase()):!1}matchesAnyFeature(H){if(!H||!H.size)return!0;const W=k.tocData.children.find(U=>U.id==="features");return Array.from(H).some(U=>{if(W&&W.children){const $=W.children.find(q=>"features/"+U===q.id);if($){const q=$.settings?.map(X=>a(X));return q&&!this.setting.extensionInfo&&q.some(X=>X.test(this.setting.key.toLowerCase()))}else return!1}else return!1})}matchesAnyId(H){return!H||!H.size?!0:H.has(this.setting.key)}matchesAllLanguages(H){return H?this.languageService.isRegisteredLanguageId(H)?this.setting.scope===5:!1:!0}}e.SettingsTreeSettingElement=n,n.MAX_DESC_LINES=20;function a(x){return x=(0,p.escapeRegExpCharacters)(x).replace(/\\\*/g,".*"),new RegExp(`^${x}$`,"i")}let o=class{constructor(H,W,U,$,q){this._viewState=H,this._isWorkspaceTrusted=W,this._configurationService=U,this._languageService=$,this._userDataProfileService=q,this._treeElementsBySettingName=new Map}get root(){return this._root}update(H=this._tocRoot){this._treeElementsBySettingName.clear();const W=this.createSettingsTreeGroupElement(H);W.children[0]instanceof s&&(W.children[0].isFirstGroup=!0),this._root?(this.disposeChildren(this._root.children),this._root.children=W.children):this._root=W}updateWorkspaceTrust(H){this._isWorkspaceTrusted=H,this.updateRequireTrustedTargetElements()}disposeChildren(H){for(const W of H)this.recursiveDispose(W)}recursiveDispose(H){H instanceof s&&this.disposeChildren(H.children),H.dispose()}getElementsByName(H){return(0,R.withUndefinedAsNull)(this._treeElementsBySettingName.get(H))}updateElementsByName(H){!this._treeElementsBySettingName.has(H)||this.updateSettings(this._treeElementsBySettingName.get(H))}updateRequireTrustedTargetElements(){this.updateSettings([...this._treeElementsBySettingName.values()].flat().filter(H=>H.isUntrusted))}getTargetToInspect(H){return!this._userDataProfileService.currentProfile.isDefault&&H===1?1:this._viewState.settingsTarget}updateSettings(H){for(const W of H){const U=this.getTargetToInspect(W.setting.scope),$=g(W.setting.key,U,this._viewState.languageFilter,this._configurationService);W.update($,this._isWorkspaceTrusted)}}createSettingsTreeGroupElement(H,W){const U=W?this.getDepth(W)+1:0,$=new s(H.id,void 0,H.label,U,!1);$.parent=W;const q=[];if(H.settings){const X=H.settings.map(G=>this.createSettingsTreeSettingElement(G,$)).filter(G=>G.setting.deprecationMessage?G.isConfigured:!0);q.push(...X)}if(H.children){const X=H.children.map(G=>this.createSettingsTreeGroupElement(G,$));q.push(...X)}return $.children=q,$}getDepth(H){return H.parent?1+this.getDepth(H.parent):0}createSettingsTreeSettingElement(H,W){const U=this.getTargetToInspect(H.scope),$=g(H.key,U,this._viewState.languageFilter,this._configurationService),q=new n(H,W,$,this._isWorkspaceTrusted,this._languageService),X=this._treeElementsBySettingName.get(H.key)||[];return X.push(q),this._treeElementsBySettingName.set(H.key,X),q}};o=we([F(2,S.IWorkbenchConfigurationService),F(3,i.ILanguageService),F(4,c.IUserDataProfileService)],o),e.SettingsTreeModel=o;function g(x,H,W,U){const $=A.URI.isUri(H)?{resource:H}:void 0,q=U.inspect(x,$),X=H===1?"applicationValue":H===3?"userLocalValue":H===4?"userRemoteValue":H===5?"workspaceValue":"workspaceFolderValue",G=H===1?"application":H===3?"userLocal":H===4?"userRemote":H===5?"workspace":"workspaceFolder";let Q=typeof q[X]<"u";const j=q.overrideIdentifiers,K=new Map;if(W&&(Q=!1),j){for(const Y of j)K.set(Y,U.inspect(x,{overrideIdentifier:Y}));W&&K.has(W)&&typeof K.get(W)[G]?.override<"u"&&(Q=!0)}return{isConfigured:Q,inspected:q,targetSelector:X,inspectedLanguageOverrides:K,languageSelector:W}}e.inspectSetting=g;function h(x){return x.replace(/[\.\/]/,"_")}function v(x,H="",W=!1){const U=x.lastIndexOf(".");let $="";U>=0&&($=x.substring(0,U),x=x.substring(U+1)),H=H.replace(/\//g,"."),$=w($,H),$=m($),W&&(x=x.replace(/[\[\]]/g,""),x="$(bracket) "+x);const q=m(x);return{category:$,label:q}}e.settingKeyToDisplayFormat=v;function m(x){x=x.replace(/\.([a-z0-9])/g,(H,W)=>` \u203A ${W.toUpperCase()}`).replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/^[a-z]/g,H=>H.toUpperCase()).replace(/\b\w+\b/g,H=>k.knownAcronyms.has(H.toLowerCase())?H.toUpperCase():H);for(const[H,W]of k.knownTermMappings)x=x.replace(new RegExp(`\\b${H}\\b`,"gi"),W);return x}function w(x,H){const W=$=>{/insiders$/i.test(x)||(H=H.replace(/-?insiders$/i,""));const q=H.split(".").map(X=>X.replace(/-/g,"").toLowerCase()===x.toLowerCase()?X.replace(/-/g,""):X);for(;q.length;){const X=new RegExp(`^${q.join("\\.")}(\\.|$)`,"i");if(X.test(x))return x.replace(X,"");$?q.pop():q.shift()}return null};let U=W(!0);return U===null&&(U=W(!1)),U===null&&(U=x),U}function D(x){return x.key==="files.exclude"||x.key==="search.exclude"||x.key==="workbench.localHistory.exclude"||x.key==="files.watcherExclude"}e.isExcludeSetting=D;function y({type:x}){return x==="string"||x==="boolean"||x==="integer"||x==="number"}function T({type:x,objectProperties:H,objectPatternProperties:W,objectAdditionalProperties:U}){if(x!=="object"||(0,R.isUndefinedOrNull)(H)&&(0,R.isUndefinedOrNull)(W)&&(0,R.isUndefinedOrNull)(U)||(U===!0||U===void 0)&&!Object.keys(W??{}).includes(".*"))return!1;const $=[...Object.values(H??{}),...Object.values(W??{})];return U&&typeof U=="object"&&$.push(U),t.flatten($.map(X=>Array.isArray(X.anyOf)?X.anyOf:[X])).every(y)}function _(x){const H=["string","boolean","null","integer","number"];return(Array.isArray(x)?x:[x]).every(U=>H.includes(U))}var L;(function(x){x[x.Local=0]="Local",x[x.Remote=1]="Remote",x[x.NewExtensions=2]="NewExtensions"})(L=e.SearchResultIdx||(e.SearchResultIdx={}));let M=class extends o{constructor(H,W,U,$,q,X){super(H,W,U,q,X),this.environmentService=$,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 H=new Set,W=this.rawSearchResults[0];W?.filterMatches.forEach($=>H.add($.setting.key));const U=this.rawSearchResults[1];return U&&(U.filterMatches=U.filterMatches.filter($=>!H.has($.setting.key))),U&&(this.newExtensionSearchResults=this.rawSearchResults[2]),this.cachedUniqueSearchResults=[W,U],this.cachedUniqueSearchResults}getRawResults(){return this.rawSearchResults||[]}setResult(H,W){if(this.cachedUniqueSearchResults=null,this.newExtensionSearchResults=null,this.rawSearchResults=this.rawSearchResults||[],!W){delete this.rawSearchResults[H];return}W.exactMatch&&(this.rawSearchResults=[]),this.rawSearchResults[H]=W,this.updateChildren()}updateChildren(){this.update({id:"searchResultModel",label:"searchResultModel",settings:this.getFlatSettings()});const H=!!this.environmentService.remoteAuthority;if(this.root.children=this.root.children.filter(W=>W instanceof n&&W.matchesAllTags(this._viewState.tagFilters)&&W.matchesScope(this._viewState.settingsTarget,H)&&W.matchesAnyExtension(this._viewState.extensionFilters)&&W.matchesAnyId(this._viewState.idFilters)&&W.matchesAnyFeature(this._viewState.featureFilters)&&W.matchesAllLanguages(this._viewState.languageFilter)),this.newExtensionSearchResults&&this.newExtensionSearchResults.filterMatches.length){const W=this.newExtensionSearchResults.filterMatches.map($=>$.setting).filter($=>$.extensionName&&$.extensionPublisher).map($=>`${$.extensionPublisher}.${$.extensionName}`),U=new d("newExtensions",t.distinct(W));U.parent=this._root,this._root.children.push(U)}}getFlatSettings(){const H=[];return t.coalesce(this.getUniqueResults()).forEach(W=>{H.push(...W.filterMatches.map(U=>U.setting))}),H}};M=we([F(2,S.IWorkbenchConfigurationService),F(3,b.IWorkbenchEnvironmentService),F(4,i.ILanguageService),F(5,c.IUserDataProfileService)],M),e.SearchResultModel=M;const O=/(^|\s)@tag:("([^"]*)"|[^"]\S*)/g,N=/(^|\s)@ext:("([^"]*)"|[^"]\S*)?/g,P=/(^|\s)@feature:("([^"]*)"|[^"]\S*)?/g,B=/(^|\s)@id:("([^"]*)"|[^"]\S*)?/g,V=/(^|\s)@lang:("([^"]*)"|[^"]\S*)?/g;function z(x){function H(G,Q,j){return G.replace(Q,(K,Y,ee,ie)=>{const re=ie||ee;return re&&j.push(...re.split(",").map(oe=>oe.trim()).filter(oe=>!(0,p.isFalsyOrWhitespace)(oe))),""})}const W=[];x=x.replace(O,(G,Q,j,K)=>(W.push(K||j),"")),x=x.replace(`@${E.MODIFIED_SETTING_TAG}`,()=>(W.push(E.MODIFIED_SETTING_TAG),"")),x=x.replace(`@${E.POLICY_SETTING_TAG}`,()=>(W.push(E.POLICY_SETTING_TAG),""));const U=[],$=[],q=[],X=[];return x=H(x,N,U),x=H(x,P,$),x=H(x,B,q),E.ENABLE_LANGUAGE_FILTER&&(x=H(x,V,X)),x=x.trim(),{tags:W,extensionFilters:U,featureFilters:$,idFilters:q,languageFilter:X.length?X[0]:void 0,query:x}}e.parseQuery=z}),define(ae[975],le([1,0,237,10,110,182,197,211,476,196,418,263,487,36,16,65,21,6,2,14,28,13,1812,93,31,8,37,5,38,41,33,73,12,437,692,2380,269,51,106,95,954,29,416,76,7,340,184,450,2572,42,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsTree=e.NonCollapsibleObjectTreeModel=e.SettingsTreeFilter=e.SettingTreeRenderers=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 Y=p.$;function ee(St){const Ye=St.isConfigured?{...St.defaultValue,...St.scopeValue}:St.defaultValue;return Object.keys(Ye).filter(it=>!!Ye[it]).map(it=>{const ct=Ye[it],gt=typeof ct=="boolean"?void 0:ct.when;return{value:{type:"string",data:it},sibling:gt,elementType:St.valueType}})}function ie(St,Ye){const it=new Set(St);return Ye.forEach(({key:ct})=>it.delete(ct.data)),it.size===0}function re(St){if(St.anyOf)return i.flatten(St.anyOf.map(re));const Ye=St.enumDescriptions??[];return(St.enum??[]).map((it,ct)=>{const gt=ct<Ye.length?Ye[ct]:void 0;return{value:it,description:gt}})}function oe(St){return St.anyOf?St.anyOf.map(oe).some(it=>it==="enum")?"enum":"string":St.type==="boolean"?"boolean":St.type==="string"&&(0,a.isDefined)(St.enum)&&St.enum.length>0?"enum":"string"}function se(St){const Ye=typeof St.defaultValue=="object"?St.defaultValue??{}:{},it=typeof St.scopeValue=="object"?St.scopeValue??{}:{},ct=St.isConfigured?{...Ye,...it}:Ye,{objectProperties:gt,objectPatternProperties:$e,objectAdditionalProperties:Qe}=St.setting,tt=Object.entries($e??{}).map(([bt,Rt])=>({pattern:new RegExp(bt),schema:Rt})),Ct=Object.entries(gt??{}).map(([bt,Rt])=>({value:bt,description:Rt.description}));return Object.keys(ct).map(bt=>{const Rt=Ye[bt];if((0,a.isDefined)(gt)&&bt in gt){if(St.setting.allKeysAreBoolean)return{key:{type:"string",data:bt},value:{type:"boolean",data:ct[bt]},keyDescription:gt[bt].description,removable:!1};const Bt=re(gt[bt]);return{key:{type:"enum",data:bt,options:Ct},value:{type:oe(gt[bt]),data:ct[bt],options:Bt},keyDescription:gt[bt].description,removable:(0,a.isUndefinedOrNull)(Rt)}}const Mt=!Rt,Ft=tt.find(({pattern:Bt})=>Bt.test(bt))?.schema;if(Ft){const Bt=re(Ft);return{key:{type:"string",data:bt},value:{type:oe(Ft),data:ct[bt],options:Bt},keyDescription:Ft.description,removable:Mt}}const zt=re(typeof Qe=="boolean"?{}:Qe??{});return{key:{type:"string",data:bt},value:{type:typeof Qe=="object"?oe(Qe):"string",data:ct[bt],options:zt},keyDescription:typeof Qe=="object"?Qe.description:void 0,removable:Mt}}).filter(bt=>!(0,a.isUndefinedOrNull)(bt.value.data))}function te(St){return(Ye,it)=>{const ct=[];return St.setting.enum&&St.setting.enum.forEach((gt,$e)=>{if(!St.setting.uniqueItems||it!==void 0&>===Ye[it]||!Ye.includes(gt)){const Qe=St.setting.enumDescriptions?.[$e];ct.push({value:gt,description:Qe})}}),ct.length>0?{type:"enum",data:ct[0].value,options:ct}:void 0}}function Z(St){const{objectProperties:Ye}=St.setting,it=Object.keys(Ye??{});return ct=>{const gt=new Set(ct),$e=[];return it.forEach(Qe=>{gt.has(Qe)||$e.push({value:Qe,description:Ye[Qe].description})}),$e.length>0?{type:"enum",data:$e[0].value,options:$e}:void 0}}function ne(St){const{objectProperties:Ye,objectPatternProperties:it,objectAdditionalProperties:ct}=St.setting,gt=Object.entries(it??{}).map(([$e,Qe])=>({pattern:new RegExp($e),schema:Qe}));return $e=>{let Qe;(0,a.isDefined)(Ye)&&$e in Ye&&(Qe=Ye[$e]);const tt=Qe??gt.find(({pattern:Ct})=>Ct.test($e))?.schema;if((0,a.isDefined)(tt)?Qe=tt:(0,a.isDefined)(ct)&&typeof ct=="object"&&(Qe=ct),(0,a.isDefined)(Qe)){const Ct=oe(Qe);if(Ct==="boolean")return{type:Ct,data:Qe.default??!0};if(Ct==="enum"){const bt=re(Qe);return{type:Ct,data:Qe.default??bt[0].value,options:bt}}else return{type:Ct,data:Qe.default??""}}}}function ce(St){return St==="number"||St==="integer"}function de(St,Ye){const it={};for(const ct in Ye){let gt;const $e=St.setting.objectPatternProperties,Qe=St.setting.objectProperties,tt=St.setting.objectAdditionalProperties;if(Qe){for(const Ct in Qe)if(Ct===ct){gt=ce(Qe[Ct].type);break}}if(gt===void 0&&$e){for(const Ct in $e)if(ct.match(Ct)){gt=ce($e[Ct].type);break}}gt===void 0&&tt&&typeof tt!="boolean"&&ce(tt.type)&&(gt=!0),it[ct]=gt?Number(Ye[ct]):Ye[ct]}return it}function he(St){if(!St.value||!Array.isArray(St.value))return[];if(St.setting.arrayItemType==="enum"){let Ye=[];return St.setting.enum&&(Ye=St.setting.enum.map((it,ct)=>({value:it,description:St.setting.enumDescriptions?.[ct]}))),St.value.map(it=>({value:{type:"enum",data:it,options:Ye}}))}else return St.value.map(Ye=>({value:{type:"string",data:Ye}}))}function pe(St,Ye){return St.setting.enum&&St.setting.uniqueItems?St.setting.enum.length-Ye.length>0:!0}function me(St,Ye,it){const ct=Pe(Ye);return{tree:be(St,ct,it),leftoverSettings:ct}}e.resolveSettingsTree=me;function Se(St,Ye,it,ct){return[...Pe(St)].filter($e=>$e.restricted&&(0,O.inspectSetting)($e.key,Ye,it,ct).isConfigured)}e.resolveConfiguredUntrustedSettings=Se;function Ie(St,Ye){const it=St??Number.MAX_SAFE_INTEGER,ct=Ye??Number.MAX_SAFE_INTEGER;return it-ct}async function ve(St,Ye){const it=new Map,ct=(Qe,tt,Ct)=>{if(!it.has(Qe)){const bt={id:Qe,label:tt,children:[]};it.set(Qe,bt)}it.get(Qe).children.push(Ct)},gt=async Qe=>{const tt=i.flatten(Qe.sections.map(Ft=>Ft.settings)),Ct=Qe.extensionInfo.id,bt=await St.getExtension(Ct),Rt=bt?.displayName??bt?.name??Ct,Mt={id:Qe.id||Qe.title,label:Qe.title,order:Qe.order,settings:tt};ct(Ct,Rt,Mt)},$e=Ye.map(Qe=>gt(Qe));return Promise.all($e).then(()=>{const Qe=[];for(const tt of it.values()){for(const Ct of tt.children)Ct.settings?.sort((bt,Rt)=>Ie(bt.order,Rt.order));if(tt.children.length===1)Qe.push({id:tt.id,label:tt.children[0].label,settings:tt.children[0].settings});else{tt.children.sort((bt,Rt)=>Ie(bt.order,Rt.order));const Ct=tt.children.find(bt=>bt.label===tt.label);if(Ct&&!Ct.children){const bt=tt.children.filter(Rt=>Rt!==Ct);Qe.push({id:tt.id,label:tt.label,settings:Ct.settings,children:bt})}else Qe.push(tt)}}return Qe.sort((tt,Ct)=>tt.label.localeCompare(Ct.label)),{id:"extensions",label:(0,o.localize)(0,null),children:Qe}})}e.createTocTreeForExtensionSettings=ve;function be(St,Ye,it){let ct;St.children&&(ct=St.children.map($e=>be($e,Ye,it)).filter($e=>$e.children&&$e.children.length||$e.settings&&$e.settings.length));let gt;if(St.settings&&(gt=i.flatten(St.settings.map($e=>ue(Ye,$e,it)))),!ct&&!gt)throw new Error(`TOC node has no child groups or settings: ${St.id}`);return{id:St.id,label:St.label,children:ct,settings:gt}}const ge=[/^settingsSync\..*/,/^sync\..*/,/^workbench.fontAliasing$/];function ue(St,Ye,it){const ct=[];return St.forEach(gt=>{Ae(gt,Ye)&&(ct.push(gt),St.delete(gt))}),!ct.length&&!ge.some(gt=>gt.test(Ye))&&it.warn(`Settings pattern "${Ye}" doesn't match any settings`),ct.sort((gt,$e)=>gt.key.localeCompare($e.key))}const Ce=new Map;function De(St){return St=(0,n.escapeRegExpCharacters)(St).replace(/\\\*/g,".*"),new RegExp(`^${St}$`,"i")}e.createSettingMatchRegExp=De;function Ae(St,Ye){let it=Ce.get(Ye);return it||(it=De(Ye),Ce.set(Ye,it)),it.test(St.key)}function Pe(St){const Ye=new Set;for(const it of St)for(const ct of it.sections)for(const gt of ct.settings)(!gt.overrides||!gt.overrides.length)&&Ye.add(gt);return Ye}const fe="settings.text.template",ye="settings.multilineText.template",ke="settings.number.template",Ee="settings.enum.template",Te="settings.bool.template",_e="settings.array.template",Re="settings.exclude.template",Le="settings.object.template",Me="settings.boolObject.template",Oe="settings.complex.template",Ke="settings.newExtensions.template",We="settings.group.template";function Xe(St){St.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(it=>{it.setAttribute(rt.ELEMENT_FOCUSABLE_ATTR,"true"),it.setAttribute("tabindex","-1")})}function Je(St){St.querySelectorAll(`[${rt.ELEMENT_FOCUSABLE_ATTR}="true"]`).forEach(it=>{it.removeAttribute(rt.ELEMENT_FOCUSABLE_ATTR),it.setAttribute("tabindex","0")})}let rt=class Tr extends s.Disposable{constructor(Ye,it,ct,gt,$e,Qe,tt,Ct,bt,Rt){super(),this.settingActions=Ye,this.disposableActionFactory=it,this._themeService=ct,this._contextViewService=gt,this._openerService=$e,this._instantiationService=Qe,this._commandService=tt,this._contextMenuService=Ct,this._keybindingService=bt,this._configService=Rt,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._onApplyFilter=this._register(new l.Emitter),this.onApplyFilter=this._onApplyFilter.event,this.markdownRenderer=this._register(Qe.createInstance(X.MarkdownRenderer,{})),this.ignoredSettings=(0,M.getIgnoredSettings)((0,z.getDefaultIgnoredSettings)(),this._configService),this._register(this._configService.onDidChangeConfiguration(Mt=>{this.ignoredSettings=(0,M.getIgnoredSettings)((0,z.getDefaultIgnoredSettings)(),this._configService),this._onDidChangeIgnoredSettings.fire()}))}renderCommonTemplate(Ye,it,ct){it.classList.add("setting-item"),it.classList.add("setting-item-"+ct);const gt=new s.DisposableStore,$e=p.append(it,Y(Tr.CONTENTS_SELECTOR));$e.classList.add("settings-row-inner-container");const Qe=p.append($e,Y(".setting-item-title")),tt=p.append(Qe,Y(".setting-item-cat-label-container")),Ct=p.append(tt,Y("span.setting-item-category")),bt=p.append(tt,Y("span.setting-item-label")),Rt=new W.SimpleIconLabel(bt),Mt=this._instantiationService.createInstance(Q.SettingsTreeIndicatorsLabel,Qe);gt.add(Mt);const Ft=p.append($e,Y(".setting-item-description")),zt=p.append($e,Y(".setting-item-modified-indicator"));zt.title=(0,o.localize)(1,null);const Bt=p.append($e,Y(".setting-item-value")),qt=p.append(Bt,Y("div.setting-item-control")),Xt=p.append($e,Y(".setting-item-deprecation-message")),Yt=p.append($e,Y(".setting-toolbar-container")),ei=this.renderSettingToolbar(Yt),Qt={toDispose:gt,elementDisposables:gt.add(new s.DisposableStore),containerElement:$e,categoryElement:Ct,labelElement:Rt,descriptionElement:Ft,controlElement:qt,deprecationWarningElement:Xt,indicatorsLabel:Mt,toolbar:ei};return gt.add(p.addDisposableListener(qt,p.EventType.MOUSE_DOWN,$t=>$t.stopPropagation())),gt.add(p.addDisposableListener(Qe,p.EventType.MOUSE_ENTER,$t=>$e.classList.add("mouseover"))),gt.add(p.addDisposableListener(Qe,p.EventType.MOUSE_LEAVE,$t=>$e.classList.remove("mouseover"))),Qt}addSettingElementFocusHandler(Ye){const it=p.trackFocus(Ye.containerElement);Ye.toDispose.add(it),it.onDidBlur(()=>{Ye.containerElement.classList.contains("focused")&&Ye.containerElement.classList.remove("focused")}),it.onDidFocus(()=>{Ye.containerElement.classList.add("focused"),Ye.context&&this._onDidFocusSetting.fire(Ye.context)})}renderSettingToolbar(Ye){const it=this._keybindingService.lookupKeybinding(P.SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU);let ct=(0,o.localize)(2,null);return it&&(ct+=` (${it&&it.getLabel()})`),new C.ToolBar(Ye,this._contextMenuService,{toggleMenuTitle:ct,renderDropdownAsChildElement:!d.isIOS,moreIcon:q.settingsMoreActionIcon})}renderSettingElement(Ye,it,ct){const gt=Ye.element;ct.context=gt,ct.toolbar.context=gt;const $e=this.disposableActionFactory(gt.setting);$e.forEach(Rt=>(0,s.isDisposable)(Rt)&&ct.elementDisposables.add(Rt)),ct.toolbar.setActions([],[...this.settingActions,...$e]);const Qe=gt.setting;ct.containerElement.classList.toggle("is-configured",gt.isConfigured),ct.containerElement.setAttribute(Tr.SETTING_KEY_ATTR,gt.setting.key),ct.containerElement.setAttribute(Tr.SETTING_ID_ATTR,gt.id);const tt=Qe.key+(gt.isConfigured?" - Modified":"");if(ct.categoryElement.textContent=gt.displayCategory&>.displayCategory+": ",ct.categoryElement.title=tt,ct.labelElement.text=gt.displayLabel,ct.labelElement.title=tt,ct.descriptionElement.innerText="",gt.setting.descriptionIsMarkdown){const Rt=this.renderSettingMarkdown(gt,ct.containerElement,gt.description,ct.elementDisposables);ct.descriptionElement.appendChild(Rt)}else ct.descriptionElement.innerText=gt.description;ct.indicatorsLabel.updateScopeOverrides(gt,ct.elementDisposables,this._onDidClickOverrideElement,this._onApplyFilter);const Ct=Rt=>this._onDidChangeSetting.fire({key:gt.setting.key,value:Rt,type:ct.context.valueType,manualReset:!1,scope:gt.setting.scope}),bt=gt.setting.deprecationMessage||"";bt&>.setting.deprecationMessageIsMarkdown?(ct.deprecationWarningElement.innerText="",ct.deprecationWarningElement.appendChild(this.renderSettingMarkdown(gt,ct.containerElement,gt.setting.deprecationMessage,ct.elementDisposables))):ct.deprecationWarningElement.innerText=bt,ct.deprecationWarningElement.prepend(Y(".codicon.codicon-error")),ct.containerElement.classList.toggle("is-deprecated",!!bt),this.renderValue(gt,ct,Ct),ct.indicatorsLabel.updateWorkspaceTrust(gt),ct.indicatorsLabel.updateSyncIgnored(gt,this.ignoredSettings),ct.indicatorsLabel.updateDefaultOverrideIndicator(gt),ct.elementDisposables.add(this.onDidChangeIgnoredSettings(()=>{ct.indicatorsLabel.updateSyncIgnored(gt,this.ignoredSettings)})),this.updateSettingTabbable(gt,ct),ct.elementDisposables.add(gt.onDidChangeTabbable(()=>{this.updateSettingTabbable(gt,ct)}))}updateSettingTabbable(Ye,it){Ye.tabbable?Je(it.containerElement):Xe(it.containerElement)}renderSettingMarkdown(Ye,it,ct,gt){ct=Tt(ct);const $e=this.markdownRenderer.render({value:ct,isTrusted:!0},{actionHandler:{callback:Qe=>{if(Qe.startsWith("#")){const tt={source:Ye,targetKey:Qe.substring(1)};this._onDidClickSettingLink.fire(tt)}else this._openerService.open(Qe,{allowCommands:!0}).catch(c.onUnexpectedError)},disposables:gt},asyncRenderCallback:()=>{const Qe=it.clientHeight;Qe&&this._onDidChangeSettingHeight.fire({element:Ye,height:Qe})}});return gt.add($e),$e.element.classList.add("setting-item-markdown"),Et($e.element),$e.element}disposeTemplate(Ye){Ye.toDispose.dispose()}disposeElement(Ye,it,ct,gt){ct.elementDisposables?.clear()}};rt.CONTROL_CLASS="setting-control-focus-target",rt.CONTROL_SELECTOR="."+rt.CONTROL_CLASS,rt.CONTENTS_CLASS="setting-item-contents",rt.CONTENTS_SELECTOR="."+rt.CONTENTS_CLASS,rt.ALL_ROWS_SELECTOR=".monaco-list-row",rt.SETTING_KEY_ATTR="data-key",rt.SETTING_ID_ATTR="data-id",rt.ELEMENT_FOCUSABLE_ATTR="data-focusable",rt=we([F(2,L.IThemeService),F(3,m.IContextViewService),F(4,y.IOpenerService),F(5,w.IInstantiationService),F(6,h.ICommandService),F(7,m.IContextMenuService),F(8,D.IKeybindingService),F(9,v.IConfigurationService)],rt),e.AbstractSettingRenderer=rt;class je{constructor(){this.templateId=We}renderTemplate(Ye){return Ye.classList.add("group-title"),{parent:Ye,toDispose:new s.DisposableStore}}renderElement(Ye,it,ct){ct.parent.innerText="";const gt=p.append(ct.parent,Y("div.settings-group-title-label.settings-row-inner-container"));gt.classList.add(`settings-group-level-${Ye.element.level}`),gt.textContent=Ye.element.label,Ye.element.isFirstGroup&>.classList.add("settings-group-first")}disposeTemplate(Ye){}}e.SettingGroupRenderer=je;let Ue=class{constructor(Ye,it){this._themeService=Ye,this._commandService=it,this.templateId=Ke}renderTemplate(Ye){const it=new s.DisposableStore;Ye.classList.add("setting-item-new-extensions");const ct=new A.Button(Ye,{title:!0,buttonBackground:void 0,buttonHoverBackground:void 0});it.add(ct),it.add(ct.onDidClick(()=>{gt.context&&this._commandService.executeCommand("workbench.extensions.action.showExtensionsWithIds",gt.context.extensionIds)})),ct.label=(0,o.localize)(3,null),ct.element.classList.add("settings-new-extensions-button"),it.add((0,_.attachButtonStyler)(ct,this._themeService));const gt={button:ct,toDispose:it};return gt}renderElement(Ye,it,ct){ct.context=Ye.element}disposeTemplate(Ye){(0,s.dispose)(Ye.toDispose)}};Ue=we([F(0,L.IThemeService),F(1,h.ICommandService)],Ue),e.SettingNewExtensionsRenderer=Ue;class Fe extends rt{constructor(){super(...arguments),this.templateId=Oe}renderTemplate(Ye){const it=this.renderCommonTemplate(null,Ye,"complex"),ct=new A.Button(it.controlElement,{title:!0,buttonBackground:void 0,buttonHoverBackground:void 0});it.toDispose.add(ct),ct.element.classList.add("edit-in-settings-button"),ct.element.classList.add(rt.CONTROL_CLASS),it.toDispose.add((0,_.attachButtonStyler)(ct,this._themeService,{buttonBackground:f.Color.transparent.toString(),buttonHoverBackground:f.Color.transparent.toString(),buttonForeground:"foreground"}));const gt=Y(".setting-item-validation-message");it.containerElement.appendChild(gt);const $e={...it,button:ct,validationErrorMessageElement:gt};return this.addSettingElementFocusHandler($e),$e}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){const gt=(0,v.getLanguageTagSettingPlainKey)(Ye.setting.key),$e=(0,o.localize)(5,null,gt),Qe=Ye.setting.isLanguageTagSetting;it.button.label=Qe?$e:Fe.EDIT_IN_JSON_LABEL,it.elementDisposables.add(it.button.onDidClick(()=>{Qe?this._onApplyFilter.fire(`@${P.LANGUAGE_SETTING_TAG}${gt}`):this._onDidOpenSettings.fire(Ye.setting.key)})),this.renderValidations(Ye,it),Qe?it.button.element.setAttribute("aria-label",$e):it.button.element.setAttribute("aria-label",`${Fe.EDIT_IN_JSON_LABEL}: ${Ye.setting.key}`)}renderValidations(Ye,it){const ct=Ye.isConfigured&&(0,x.getInvalidTypeError)(Ye.value,Ye.setting.type);if(ct){it.containerElement.classList.add("invalid-input"),it.validationErrorMessageElement.innerText=ct;return}it.containerElement.classList.remove("invalid-input")}}e.SettingComplexRenderer=Fe,Fe.EDIT_IN_JSON_LABEL=(0,o.localize)(4,null);class He extends rt{constructor(){super(...arguments),this.templateId=_e}renderTemplate(Ye){const it=this.renderCommonTemplate(null,Ye,"list"),ct=it.containerElement.querySelector(".setting-item-description"),gt=Y(".setting-item-validation-message");ct.after(gt);const $e=this._instantiationService.createInstance(N.ListSettingWidget,it.controlElement);$e.domNode.classList.add(rt.CONTROL_CLASS),it.toDispose.add($e);const Qe={...it,listWidget:$e,validationErrorMessageElement:gt};return this.addSettingElementFocusHandler(Qe),it.toDispose.add($e.onDidChangeList(tt=>{const Ct=this.computeNewList(Qe,tt);Qe.onChange?.(Ct)})),Qe}computeNewList(Ye,it){if(Ye.context){let ct=[];if(Array.isArray(Ye.context.scopeValue)?ct=[...Ye.context.scopeValue]:Array.isArray(Ye.context.value)&&(ct=[...Ye.context.value]),it.sourceIndex!==void 0){const gt=it.sourceIndex,$e=it.targetIndex,Qe=ct.splice(gt,1)[0];ct.splice($e,0,Qe)}else if(it.targetIndex!==void 0){const gt=it.item?.value.data.toString()??"";!it.item?.value.data&&it.originalItem.value.data&&it.targetIndex>-1?ct.splice(it.targetIndex,1):it.item?.value.data&&it.originalItem.value.data?it.targetIndex>-1?ct[it.targetIndex]=gt:ct.push(gt):it.item?.value.data&&!it.originalItem.value.data&&it.targetIndex>=ct.length&&ct.push(gt)}return Ye.context.defaultValue&&Array.isArray(Ye.context.defaultValue)&&Ye.context.defaultValue.length===ct.length&&Ye.context.defaultValue.join()===ct.join()?void 0:ct}}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){const gt=he(Ye),$e=Ye.setting.enum?te(Ye):void 0;it.listWidget.setValue(gt,{showAddButton:pe(Ye,gt),keySuggester:$e}),it.context=Ye,it.elementDisposables.add((0,s.toDisposable)(()=>{it.listWidget.cancelEdit()})),it.onChange=Qe=>{if(Qe&&!qe(Ye,it,Qe,!1)){const tt=Ye.setting.arrayItemType,Ct=ce(tt)?Qe.map(bt=>+bt):Qe;ct(Ct)}else ct(Qe)},qe(Ye,it,gt.map(Qe=>Qe.value.data.toString()),!0)}}e.SettingArrayRenderer=He;class Be extends rt{renderTemplateWithWidget(Ye,it){it.domNode.classList.add(rt.CONTROL_CLASS),Ye.toDispose.add(it);const ct=Ye.containerElement.querySelector(".setting-item-description"),gt=Y(".setting-item-validation-message");ct.after(gt);const $e={...Ye,validationErrorMessageElement:gt};return it instanceof N.ObjectSettingCheckboxWidget?$e.objectCheckboxWidget=it:$e.objectDropdownWidget=it,this.addSettingElementFocusHandler($e),Ye.toDispose.add(it.onDidChangeList(Qe=>{this.onDidChangeObject($e,Qe)})),$e}onDidChangeObject(Ye,it){const ct=Ye.objectCheckboxWidget??Ye.objectDropdownWidget;if(Ye.context){const gt=typeof Ye.context.defaultValue=="object"?Ye.context.defaultValue??{}:{},$e=typeof Ye.context.scopeValue=="object"?Ye.context.scopeValue??{}:{},Qe={},tt=[];if(ct.items.forEach((bt,Rt)=>{(0,a.isDefined)(it.item)&&it.targetIndex===Rt?(Qe[it.item.key.data]=it.item.value.data,tt.push(it.item)):((0,a.isUndefinedOrNull)(it.item)||it.item.key.data!==bt.key.data)&&(Qe[bt.key.data]=bt.value.data,tt.push(bt))}),(0,a.isUndefinedOrNull)(it.item)){delete Qe[it.originalItem.key.data];const bt=tt.findIndex(Mt=>Mt.key.data===it.originalItem.key.data),Rt=gt[it.originalItem.key.data];(0,a.isUndefinedOrNull)(gt[it.originalItem.key.data])&&bt>-1?tt.splice(bt,1):bt>-1&&(tt[bt].value.data=Rt)}else ct.isItemNew(it.originalItem)&&it.item.key.data!==""&&(Qe[it.item.key.data]=it.item.value.data,tt.push(it.item));Object.entries(Qe).forEach(([bt,Rt])=>{$e[bt]!==Rt&>[bt]===Rt&&delete Qe[bt]});const Ct=Object.keys(Qe).length===0?void 0:Qe;Ye.objectCheckboxWidget?Ye.objectCheckboxWidget.setValue(tt):Ye.objectDropdownWidget.setValue(tt),Ye.onChange?.(Ct)}}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}}class ze extends Be{constructor(){super(...arguments),this.templateId=Le}renderTemplate(Ye){const it=this.renderCommonTemplate(null,Ye,"list"),ct=this._instantiationService.createInstance(N.ObjectSettingDropdownWidget,it.controlElement);return this.renderTemplateWithWidget(it,ct)}renderValue(Ye,it,ct){const gt=se(Ye),{key:$e,objectProperties:Qe,objectPatternProperties:tt,objectAdditionalProperties:Ct}=Ye.setting;it.objectDropdownWidget.setValue(gt,{settingKey:$e,showAddButton:Ct===!1?!ie(Object.keys(Qe??{}),gt)||(0,a.isDefined)(tt):!0,keySuggester:Z(Ye),valueSuggester:ne(Ye)}),it.context=Ye,it.elementDisposables.add((0,s.toDisposable)(()=>{it.objectDropdownWidget.cancelEdit()})),it.onChange=bt=>{if(bt&&!qe(Ye,it,bt,!1)){const Rt=de(Ye,bt);ct(Rt)}else ct(bt)},qe(Ye,it,Ye.value,!0)}}e.SettingObjectRenderer=ze;class nt extends Be{constructor(){super(...arguments),this.templateId=Me}renderTemplate(Ye){const it=this.renderCommonTemplate(null,Ye,"list"),ct=this._instantiationService.createInstance(N.ObjectSettingCheckboxWidget,it.controlElement);return this.renderTemplateWithWidget(it,ct)}onDidChangeObject(Ye,it){Ye.context&&(super.onDidChangeObject(Ye,it),this._onDidFocusSetting.fire(Ye.context))}renderValue(Ye,it,ct){const gt=se(Ye),{key:$e}=Ye.setting;it.objectCheckboxWidget.setValue(gt,{settingKey:$e}),it.context=Ye,it.onChange=Qe=>{ct(Qe)}}}e.SettingBoolObjectRenderer=nt;class ut extends rt{constructor(){super(...arguments),this.templateId=Re}renderTemplate(Ye){const it=this.renderCommonTemplate(null,Ye,"list"),ct=this._instantiationService.createInstance(N.ExcludeSettingWidget,it.controlElement);ct.domNode.classList.add(rt.CONTROL_CLASS),it.toDispose.add(ct);const gt={...it,excludeWidget:ct};return this.addSettingElementFocusHandler(gt),it.toDispose.add(ct.onDidChangeList($e=>this.onDidChangeExclude(gt,$e))),gt}onDidChangeExclude(Ye,it){if(Ye.context){let gt=function($e){const Qe=Object.keys($e).sort((Ct,bt)=>Ct.localeCompare(bt)),tt={};for(const Ct of Qe)tt[Ct]=$e[Ct];return tt};const ct={...Ye.context.scopeValue};it.originalItem.value.data.toString()in Ye.context.defaultValue?ct[it.originalItem.value.data.toString()]=!1:delete ct[it.originalItem.value.data.toString()],it.item?.value&&(it.item.value.data.toString()in Ye.context.defaultValue&&!it.item.sibling?delete ct[it.item.value.data.toString()]:ct[it.item.value.data.toString()]=it.item.sibling?{when:it.item.sibling}:!0),this._onDidChangeSetting.fire({key:Ye.context.setting.key,value:Object.keys(ct).length===0?void 0:gt(ct),type:Ye.context.valueType,manualReset:!1,scope:Ye.context.setting.scope})}}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){const gt=ee(Ye);it.excludeWidget.setValue(gt),it.context=Ye,it.elementDisposables.add((0,s.toDisposable)(()=>{it.excludeWidget.cancelEdit()}))}}e.SettingExcludeRenderer=ut;class ot extends rt{constructor(){super(...arguments),this.MULTILINE_MAX_HEIGHT=150}renderTemplate(Ye,it){const ct=this.renderCommonTemplate(null,Ye,"text"),gt=p.append(ct.containerElement,Y(".setting-item-validation-message")),$e={flexibleHeight:it,flexibleWidth:!1,flexibleMaxHeight:this.MULTILINE_MAX_HEIGHT},Qe=new E.InputBox(ct.controlElement,this._contextViewService,$e);ct.toDispose.add(Qe),ct.toDispose.add((0,_.attachInputBoxStyler)(Qe,this._themeService,{inputBackground:G.settingsTextInputBackground,inputForeground:G.settingsTextInputForeground,inputBorder:G.settingsTextInputBorder})),ct.toDispose.add(Qe.onDidChange(Ct=>{tt.onChange?.(Ct)})),ct.toDispose.add(Qe),Qe.inputElement.classList.add(rt.CONTROL_CLASS),Qe.inputElement.tabIndex=0;const tt={...ct,inputBox:Qe,validationErrorMessageElement:gt};return this.addSettingElementFocusHandler(tt),tt}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){it.onChange=void 0,it.inputBox.value=Ye.value,it.inputBox.setAriaLabel(Ye.setting.key),it.onChange=gt=>{st(Ye,it,!1)||ct(gt)},st(Ye,it,!0)}}class at extends ot{constructor(){super(...arguments),this.templateId=fe}renderTemplate(Ye){const it=super.renderTemplate(Ye,!1);return it.toDispose.add(p.addStandardDisposableListener(it.inputBox.inputElement,p.EventType.KEY_DOWN,ct=>{(ct.equals(16)||ct.equals(18))&&ct.preventDefault()})),it}}e.SettingTextRenderer=at;class wt extends ot{constructor(){super(...arguments),this.templateId=ye}renderTemplate(Ye){return super.renderTemplate(Ye,!0)}renderValue(Ye,it,ct){const gt=$e=>{Ye.value=$e,ct($e)};super.renderValue(Ye,it,gt),it.elementDisposables.add(it.inputBox.onDidHeightChange($e=>{it.containerElement.clientHeight&&this._onDidChangeSettingHeight.fire({element:Ye,height:it.containerElement.clientHeight})})),it.inputBox.layout()}}e.SettingMultilineTextRenderer=wt;class It extends rt{constructor(){super(...arguments),this.templateId=Ee}renderTemplate(Ye){const it=this.renderCommonTemplate(null,Ye,"enum"),ct=new S.SelectBox([],0,this._contextViewService,void 0,{useCustomDrawn:!(d.isIOS&&t.BrowserFeatures.pointerEvents)});it.toDispose.add(ct),it.toDispose.add((0,_.attachSelectBoxStyler)(ct,this._themeService,{selectBackground:G.settingsSelectBackground,selectForeground:G.settingsSelectForeground,selectBorder:G.settingsSelectBorder,selectListBorder:G.settingsSelectListBorder})),ct.render(it.controlElement);const gt=it.controlElement.querySelector("select");gt&&(gt.classList.add(rt.CONTROL_CLASS),gt.tabIndex=0),it.toDispose.add(ct.onDidSelect(tt=>{Qe.onChange?.(tt.index)}));const $e=it.containerElement.insertBefore(Y(".setting-item-enumDescription"),it.descriptionElement.nextSibling),Qe={...it,selectBox:ct,selectElement:gt,enumDescriptionElement:$e};return this.addSettingElementFocusHandler(Qe),Qe}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){const gt=Ye.setting.enumItemLabels?[...Ye.setting.enumItemLabels]:[],$e=Ye.setting.enumDescriptions?[...Ye.setting.enumDescriptions]:[],Qe=[...Ye.setting.enum],tt=Ye.setting.enumDescriptionsAreMarkdown,Ct=new s.DisposableStore;it.toDispose.add(Ct);let bt=!1;Qe.includes(Ye.defaultValue)||(Qe.unshift(Ye.defaultValue),$e.unshift(""),gt.unshift(""),bt=!0);const Rt=xt(String(Ye.defaultValue)),Mt=Qe.map(String).map(xt).map((zt,Bt)=>{const qt=$e[Bt]&&(tt?Tt($e[Bt],!1):$e[Bt]);return{text:gt[Bt]?gt[Bt]:zt,detail:gt[Bt]?zt:"",description:qt,descriptionIsMarkdown:tt,descriptionMarkdownActionHandler:{callback:Xt=>{this._openerService.open(Xt).catch(c.onUnexpectedError)},disposables:Ct},decoratorRight:zt===Rt||bt&&Bt===0?(0,o.localize)(6,null):""}});it.selectBox.setOptions(Mt),it.selectBox.setAriaLabel(Ye.setting.key);let Ft=Qe.indexOf(Ye.value);Ft===-1&&(Ft=0),it.onChange=void 0,it.selectBox.select(Ft),it.onChange=zt=>{ct(bt&&zt===0?Ye.defaultValue:Qe[zt])},it.enumDescriptionElement.innerText=""}}e.SettingEnumRenderer=It;class _t extends rt{constructor(){super(...arguments),this.templateId=ke}renderTemplate(Ye){const it=super.renderCommonTemplate(null,Ye,"number"),ct=p.append(it.containerElement,Y(".setting-item-validation-message")),gt=new E.InputBox(it.controlElement,this._contextViewService,{type:"number"});it.toDispose.add(gt),it.toDispose.add((0,_.attachInputBoxStyler)(gt,this._themeService,{inputBackground:G.settingsNumberInputBackground,inputForeground:G.settingsNumberInputForeground,inputBorder:G.settingsNumberInputBorder})),it.toDispose.add(gt.onDidChange(Qe=>{$e.onChange?.(Qe)})),it.toDispose.add(gt),gt.inputElement.classList.add(rt.CONTROL_CLASS),gt.inputElement.tabIndex=0;const $e={...it,inputBox:gt,validationErrorMessageElement:ct};return this.addSettingElementFocusHandler($e),$e}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){const gt=Ye.valueType==="integer"||Ye.valueType==="nullable-integer"?parseInt:parseFloat,$e=Ye.valueType==="nullable-integer"||Ye.valueType==="nullable-number"?Qe=>Qe===""?null:gt(Qe):gt;it.onChange=void 0,it.inputBox.value=Ye.value,it.inputBox.setAriaLabel(Ye.setting.key),it.onChange=Qe=>{st(Ye,it,!1)||ct($e(Qe))},st(Ye,it,!0)}}e.SettingNumberRenderer=_t;class lt extends rt{constructor(){super(...arguments),this.templateId=Te}renderTemplate(Ye){Ye.classList.add("setting-item"),Ye.classList.add("setting-item-bool");const it=p.append(Ye,Y(rt.CONTENTS_SELECTOR));it.classList.add("settings-row-inner-container");const ct=p.append(it,Y(".setting-item-title")),gt=p.append(ct,Y("span.setting-item-category")),$e=p.append(ct,Y("span.setting-item-label")),Qe=new W.SimpleIconLabel($e),tt=this._instantiationService.createInstance(Q.SettingsTreeIndicatorsLabel,ct),Ct=p.append(it,Y(".setting-item-value-description")),bt=p.append(Ct,Y(".setting-item-bool-control")),Rt=p.append(Ct,Y(".setting-item-description")),Mt=p.append(it,Y(".setting-item-modified-indicator"));Mt.title=(0,o.localize)(7,null);const Ft=p.append(it,Y(".setting-item-deprecation-message")),zt=new s.DisposableStore,Bt=new k.Toggle({icon:H.Codicon.check,actionClassName:"setting-value-checkbox",isChecked:!0,title:"",inputActiveOptionBorder:void 0});bt.appendChild(Bt.domNode),zt.add(Bt),zt.add(Bt.onChange(()=>{Yt.onChange(Bt.checked)})),zt.add(p.addDisposableListener(Rt,p.EventType.MOUSE_DOWN,ei=>{ei.target.tagName.toLowerCase()!=="a"&&(Yt.checkbox.checked=!Yt.checkbox.checked,Yt.onChange(Bt.checked)),p.EventHelper.stop(ei)})),Bt.domNode.classList.add(rt.CONTROL_CLASS);const qt=p.append(it,Y(".setting-toolbar-container")),Xt=this.renderSettingToolbar(qt);zt.add(Xt);const Yt={toDispose:zt,elementDisposables:zt.add(new s.DisposableStore),containerElement:it,categoryElement:gt,labelElement:Qe,controlElement:bt,checkbox:Bt,descriptionElement:Rt,deprecationWarningElement:Ft,indicatorsLabel:tt,toolbar:Xt};return this.addSettingElementFocusHandler(Yt),zt.add(p.addDisposableListener(bt,"mousedown",ei=>ei.stopPropagation())),zt.add(p.addDisposableListener(ct,p.EventType.MOUSE_ENTER,ei=>it.classList.add("mouseover"))),zt.add(p.addDisposableListener(ct,p.EventType.MOUSE_LEAVE,ei=>it.classList.remove("mouseover"))),Yt}renderElement(Ye,it,ct){super.renderSettingElement(Ye,it,ct)}renderValue(Ye,it,ct){it.onChange=void 0,it.checkbox.checked=Ye.value,it.checkbox.setTitle(Ye.setting.key),it.onChange=ct}}e.SettingBoolRenderer=lt;let pt=class{constructor(Ye,it,ct,gt){this._instantiationService=Ye,this._contextMenuService=it,this._contextViewService=ct,this._userDataSyncEnablementService=gt,this._onDidChangeSetting=new l.Emitter,this.settingActions=[new u.Action("settings.resetSetting",(0,o.localize)(8,null),void 0,void 0,async tt=>{tt instanceof O.SettingsTreeSettingElement&&(tt.isUntrusted||this._onDidChangeSetting.fire({key:tt.setting.key,value:void 0,type:tt.setting.type,manualReset:!0,scope:tt.setting.scope}))}),new u.Separator,this._instantiationService.createInstance(Ze),this._instantiationService.createInstance(ft)];const $e=tt=>this.getActionsForSetting(tt),Qe=[this._instantiationService.createInstance(lt,this.settingActions,$e),this._instantiationService.createInstance(_t,this.settingActions,$e),this._instantiationService.createInstance(He,this.settingActions,$e),this._instantiationService.createInstance(Fe,this.settingActions,$e),this._instantiationService.createInstance(at,this.settingActions,$e),this._instantiationService.createInstance(wt,this.settingActions,$e),this._instantiationService.createInstance(ut,this.settingActions,$e),this._instantiationService.createInstance(It,this.settingActions,$e),this._instantiationService.createInstance(ze,this.settingActions,$e),this._instantiationService.createInstance(nt,this.settingActions,$e)];this.onDidClickOverrideElement=l.Event.any(...Qe.map(tt=>tt.onDidClickOverrideElement)),this.onDidChangeSetting=l.Event.any(...Qe.map(tt=>tt.onDidChangeSetting),this._onDidChangeSetting.event),this.onDidOpenSettings=l.Event.any(...Qe.map(tt=>tt.onDidOpenSettings)),this.onDidClickSettingLink=l.Event.any(...Qe.map(tt=>tt.onDidClickSettingLink)),this.onDidFocusSetting=l.Event.any(...Qe.map(tt=>tt.onDidFocusSetting)),this.onDidChangeSettingHeight=l.Event.any(...Qe.map(tt=>tt.onDidChangeSettingHeight)),this.onApplyFilter=l.Event.any(...Qe.map(tt=>tt.onApplyFilter)),this.allRenderers=[...Qe,this._instantiationService.createInstance(je),this._instantiationService.createInstance(Ue)]}getActionsForSetting(Ye){return this._userDataSyncEnablementService.isEnabled()&&!Ye.disallowSyncIgnore?[new u.Separator,this._instantiationService.createInstance(Dt,Ye)]:[]}cancelSuggesters(){this._contextViewService.hideContextView()}showContextMenu(Ye,it){const ct=it.querySelector(".monaco-toolbar");ct&&this._contextMenuService.showContextMenu({getActions:()=>this.settingActions,getAnchor:()=>ct,getActionsContext:()=>Ye})}getSettingDOMElementForDOMElement(Ye){const it=p.findParentWithClass(Ye,rt.CONTENTS_CLASS);return it||null}getDOMElementsForSettingKey(Ye,it){return Ye.querySelectorAll(`[${rt.SETTING_KEY_ATTR}="${it}"]`)}getKeyForDOMElementInSetting(Ye){const it=this.getSettingDOMElementForDOMElement(Ye);return it&&it.getAttribute(rt.SETTING_KEY_ATTR)}getIdForDOMElementInSetting(Ye){const it=this.getSettingDOMElementForDOMElement(Ye);return it&&it.getAttribute(rt.SETTING_ID_ATTR)}};pt=we([F(0,w.IInstantiationService),F(1,m.IContextMenuService),F(2,m.IContextViewService),F(3,z.IUserDataSyncEnablementService)],pt),e.SettingTreeRenderers=pt;function st(St,Ye,it){if(St.setting.validator){const ct=St.setting.validator(Ye.inputBox.value);if(ct){Ye.containerElement.classList.add("invalid-input"),Ye.validationErrorMessageElement.innerText=ct;const gt=(0,o.localize)(9,null);return Ye.inputBox.inputElement.parentElement.setAttribute("aria-label",[gt,ct].join(" ")),it||(0,R.alert)(gt+" "+ct),!0}else Ye.inputBox.inputElement.parentElement.removeAttribute("aria-label")}return Ye.containerElement.classList.remove("invalid-input"),!1}function qe(St,Ye,it,ct){if(Ye.containerElement.classList.add("invalid-input"),St.setting.validator){const gt=St.setting.validator(it);if(gt&>!==""){Ye.containerElement.classList.add("invalid-input"),Ye.validationErrorMessageElement.innerText=gt;const $e=(0,o.localize)(10,null);return Ye.containerElement.setAttribute("aria-label",[St.setting.key,$e,gt].join(" ")),ct||(0,R.alert)($e+" "+gt),!0}else Ye.containerElement.setAttribute("aria-label",St.setting.key),Ye.containerElement.classList.remove("invalid-input")}return!1}function Et(St){for(let Ye=0;Ye<St.childNodes.length;Ye++){const it=St.childNodes.item(Ye);(it.tagName&&it.tagName.toLowerCase())==="img"?St.removeChild(it):Et(it)}}function Tt(St,Ye=!0){return St.replace(/`#([^#]*)#`|'#([^#]*)#'/g,(it,ct,gt)=>{const $e=ct??gt,Qe=(0,O.settingKeyToDisplayFormat)($e),tt=`${Qe.category}: ${Qe.label}`;return Ye?`[${tt}](#${$e} "${$e}")`:`"${tt}"`})}function xt(St){return St&&St.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}let At=class{constructor(Ye,it){this.viewState=Ye,this.environmentService=it}filter(Ye,it){if(this.viewState.filterToCategory&&Ye instanceof O.SettingsTreeSettingElement&&!this.settingContainedInGroup(Ye.setting,this.viewState.filterToCategory))return!1;if(Ye instanceof O.SettingsTreeSettingElement&&this.viewState.settingsTarget!==3){const ct=!!this.environmentService.remoteAuthority;if(!Ye.matchesScope(this.viewState.settingsTarget,ct))return!1}return Ye instanceof O.SettingsTreeGroupElement?typeof Ye.count=="number"?Ye.count>0:2:!(Ye instanceof O.SettingsTreeNewExtensionsElement&&(this.viewState.tagFilters&&this.viewState.tagFilters.size||this.viewState.filterToCategory))}settingContainedInGroup(Ye,it){return it.children.some(ct=>ct instanceof O.SettingsTreeGroupElement?this.settingContainedInGroup(Ye,ct):ct instanceof O.SettingsTreeSettingElement?ct.setting.key===Ye.key:!1)}};At=we([F(1,B.IWorkbenchEnvironmentService)],At),e.SettingsTreeFilter=At;class Nt extends I.CachedListVirtualDelegate{getTemplateId(Ye){if(Ye instanceof O.SettingsTreeGroupElement)return We;if(Ye instanceof O.SettingsTreeSettingElement)return Ye.isConfigured&&(0,x.getInvalidTypeError)(Ye.value,Ye.setting.type)?Oe:Ye.valueType===V.SettingValueType.Boolean?Te:Ye.valueType===V.SettingValueType.Integer||Ye.valueType===V.SettingValueType.Number||Ye.valueType===V.SettingValueType.NullableInteger||Ye.valueType===V.SettingValueType.NullableNumber?ke:Ye.valueType===V.SettingValueType.MultilineString?ye:Ye.valueType===V.SettingValueType.String?fe:Ye.valueType===V.SettingValueType.Enum?Ee:Ye.valueType===V.SettingValueType.Array?_e:Ye.valueType===V.SettingValueType.Exclude?Re:Ye.valueType===V.SettingValueType.Object?Le:Ye.valueType===V.SettingValueType.BooleanObject?Me:(Ye.valueType===V.SettingValueType.LanguageTag,Oe);if(Ye instanceof O.SettingsTreeNewExtensionsElement)return Ke;throw new Error("unknown element type: "+Ye)}hasDynamicHeight(Ye){return!(Ye instanceof O.SettingsTreeGroupElement)}estimateHeight(Ye){return Ye instanceof O.SettingsTreeGroupElement?42:Ye instanceof O.SettingsTreeSettingElement&&Ye.valueType===V.SettingValueType.Boolean?78:104}}class kt extends r.ObjectTreeModel{isCollapsible(Ye){return!1}setCollapsed(Ye,it,ct){return!1}}e.NonCollapsibleObjectTreeModel=kt;class Ne{constructor(Ye,it,ct){this.configurationService=Ye,this.languageService=it,this.userDataProfilesService=ct}getAriaLabel(Ye){if(Ye instanceof O.SettingsTreeSettingElement){const it=[];if(it.push(`${Ye.displayCategory} ${Ye.displayLabel}.`),Ye.isConfigured){const $e=(0,o.localize)(11,null);it.push($e)}const ct=(0,Q.getIndicatorsLabelAriaLabel)(Ye,this.configurationService,this.userDataProfilesService,this.languageService);ct.length&&it.push(`${ct}.`);const gt=Tt(Ye.description,!1);return gt.length&&it.push(gt),it.join(" ")}else return Ye instanceof O.SettingsTreeGroupElement?Ye.label:Ye.id}getWidgetAriaLabel(){return(0,o.localize)(12,null)}}let Ge=class extends U.WorkbenchObjectTree{constructor(Ye,it,ct,gt,$e,Qe,tt,Ct,bt,Rt){super("SettingsTree",Ye,new Nt,ct,{horizontalScrolling:!1,supportDynamicHeights:!0,identityProvider:{getId(Mt){return Mt.id}},accessibilityProvider:new Ne(tt,bt,Rt),styleController:Mt=>new b.DefaultStyleController(p.createStyleSheet(Ye),Mt),filter:Ct.createInstance(At,it),smoothScrolling:tt.getValue("workbench.list.smoothScrolling"),multipleSelectionSupport:!1,findWidgetEnabled:!1},Ct,gt,$e,Qe,tt),this.disposables.add((0,L.registerThemingParticipant)((Mt,Ft)=>{const zt=Mt.getColor(T.foreground);if(zt){const dt=new f.Color(new f.RGBA(zt.rgba.r,zt.rgba.g,zt.rgba.b,.9));Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-description { color: ${dt}; }`),Ft.addRule(`.settings-editor > .settings-body .settings-toc-container .monaco-list-row:not(.selected) { color: ${dt}; }`);const ht=new f.Color(new f.RGBA(zt.rgba.r,zt.rgba.g,zt.rgba.b,.7));Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item.setting-item-untrusted > .setting-item-contents .setting-item-description { color: ${ht}; }`),Ft.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: ${dt}; }`)}const Bt=Mt.getColor(T.errorForeground);Bt&&Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-deprecation-message { color: ${Bt}; }`);const qt=Mt.getColor(T.inputValidationErrorBackground);qt&&Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-validation-message { background-color: ${qt}; }`);const Xt=Mt.getColor(T.inputValidationErrorForeground);Xt&&Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-validation-message { color: ${Xt}; }`);const Yt=Mt.getColor(T.inputValidationErrorBorder);Yt&&(Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-validation-message { border-style:solid; border-width: 1px; border-color: ${Yt}; }`),Ft.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: ${Yt}; }`));const ei=Mt.getColor(G.focusedRowBackground);ei&&Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list-row.focused .settings-row-inner-container { background-color: ${ei}; }`);const Qt=Mt.getColor(G.rowHoverBackground);Qt&&Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list-row:not(.focused) .settings-row-inner-container:hover { background-color: ${Qt}; }`);const $t=Mt.getColor(G.focusedRowBorder);$t&&(Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list:focus-within .monaco-list-row.focused .setting-item-contents { outline: 1px solid ${$t} }`),Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .monaco-list:focus-within .monaco-list-row.focused .settings-group-title-label { outline: 1px solid ${$t} }`));const ii=Mt.getColor(G.settingsHeaderForeground);ii&&(Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .settings-group-title-label { color: ${ii}; }`),Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-label { color: ${ii}; }`));const Lt=Mt.getColor(T.focusBorder);Lt&&(Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-trust-description a:focus { outline-color: ${Lt} }`),Ft.addRule(`.settings-editor > .settings-body .settings-tree-container .setting-item-contents .setting-item-markdown a:focus { outline-color: ${Lt} }`))})),this.getHTMLElement().classList.add("settings-editor-tree"),this.disposables.add((0,_.attachStyler)(Qe,{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},Mt=>{this.style(Mt)})),this.disposables.add(tt.onDidChangeConfiguration(Mt=>{Mt.affectsConfiguration("workbench.list.smoothScrolling")&&this.updateOptions({smoothScrolling:tt.getValue("workbench.list.smoothScrolling")})}))}createModel(Ye,it,ct){return new kt(Ye,it,ct)}};Ge=we([F(3,$.IContextKeyService),F(4,U.IListService),F(5,L.IThemeService),F(6,v.IConfigurationService),F(7,w.IInstantiationService),F(8,j.ILanguageService),F(9,K.IUserDataProfilesService)],Ge),e.SettingsTree=Ge;let Ze=class Js extends u.Action{constructor(Ye){super(Js.ID,Js.LABEL),this.clipboardService=Ye}async run(Ye){return Ye&&await this.clipboardService.writeText(Ye.setting.key),Promise.resolve(void 0)}};Ze.ID="settings.copySettingId",Ze.LABEL=(0,o.localize)(13,null),Ze=we([F(0,g.IClipboardService)],Ze);let ft=class Zs extends u.Action{constructor(Ye){super(Zs.ID,Zs.LABEL),this.clipboardService=Ye}async run(Ye){if(Ye){const it=`"${Ye.setting.key}": ${JSON.stringify(Ye.value,void 0," ")}`;await this.clipboardService.writeText(it)}return Promise.resolve(void 0)}};ft.ID="settings.copySettingAsJSON",ft.LABEL=(0,o.localize)(14,null),ft=we([F(0,g.IClipboardService)],ft);let Dt=class eo extends u.Action{constructor(Ye,it){super(eo.ID,eo.LABEL),this.setting=Ye,this.configService=it,this._register(l.Event.filter(it.onDidChangeConfiguration,ct=>ct.affectsConfiguration("settingsSync.ignoredSettings"))(()=>this.update())),this.update()}async update(){const Ye=(0,M.getIgnoredSettings)((0,z.getDefaultIgnoredSettings)(),this.configService);this.checked=!Ye.includes(this.setting.key)}async run(){let Ye=[...this.configService.getValue("settingsSync.ignoredSettings")];Ye=Ye.filter($e=>$e!==this.setting.key&&$e!==`-${this.setting.key}`);const ct=(0,z.getDefaultIgnoredSettings)().includes(this.setting.key),gt=!this.checked;return gt&&ct&&Ye.push(`-${this.setting.key}`),!gt&&!ct&&Ye.push(this.setting.key),this.configService.updateValue("settingsSync.ignoredSettings",Ye.length?Ye:void 0,2),Promise.resolve(void 0)}};Dt.ID="settings.stopSyncingSetting",Dt.LABEL=(0,o.localize)(15,null),Dt=we([F(1,v.IConfigurationService)],Dt)}),define(ae[2845],le([1,0,10,196,88,1814,8,7,5,76,33,73,12,975,692,450,51]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TOCTree=e.createTOCIterator=e.TOCRenderer=e.TOCTreeModel=void 0;const l=t.$;let s=class{constructor(m,w){this._viewState=m,this.environmentService=w,this._currentSearchModel=null}get settingsTreeRoot(){return this._settingsTreeRoot}set settingsTreeRoot(m){this._settingsTreeRoot=m,this.update()}get currentSearchModel(){return this._currentSearchModel}set currentSearchModel(m){this._currentSearchModel=m,this.update()}get children(){return this._settingsTreeRoot.children}update(){this._settingsTreeRoot&&this.updateGroupCount(this._settingsTreeRoot)}updateGroupCount(m){m.children.forEach(D=>{D instanceof i.SettingsTreeGroupElement&&this.updateGroupCount(D)});const w=m.children.filter(D=>D instanceof i.SettingsTreeGroupElement).reduce((D,y)=>D+y.count,0);m.count=w+this.getGroupCount(m)}getGroupCount(m){return m.children.filter(w=>{if(!(w instanceof i.SettingsTreeSettingElement)||this._currentSearchModel&&!this._currentSearchModel.root.containsSetting(w.setting.key))return!1;const D=!!this.environmentService.remoteAuthority;return w.matchesScope(this._viewState.settingsTarget,D)&&w.matchesAllTags(this._viewState.tagFilters)&&w.matchesAnyFeature(this._viewState.featureFilters)&&w.matchesAnyExtension(this._viewState.extensionFilters)&&w.matchesAnyId(this._viewState.idFilters)}).length}};s=we([F(1,c.IWorkbenchEnvironmentService)],s),e.TOCTreeModel=s;const d="settings.toc.entry";class n{constructor(){this.templateId=d}renderTemplate(m){return{labelElement:t.append(m,l(".settings-toc-entry")),countElement:t.append(m,l(".settings-toc-count"))}}renderElement(m,w,D){const y=m.element,T=y.count,_=y.label;D.labelElement.textContent=_,D.labelElement.title=_,T?D.countElement.textContent=` (${T})`:D.countElement.textContent=""}disposeTemplate(m){}}e.TOCRenderer=n;class a{getTemplateId(m){return d}getHeight(m){return 22}}function o(v,m){const w=v.children.filter(D=>D instanceof i.SettingsTreeGroupElement);return R.Iterable.map(w,D=>{const y=D.children.some(T=>T instanceof i.SettingsTreeGroupElement);return{element:D,collapsed:void 0,collapsible:y,children:D instanceof i.SettingsTreeGroupElement?o(D,m):void 0}})}e.createTOCIterator=o;class g{getWidgetAriaLabel(){return(0,A.localize)(0,null)}getAriaLabel(m){return m&&m instanceof i.SettingsTreeGroupElement?(0,A.localize)(1,null,m.label):""}getAriaLevel(m){let w=1;for(;m instanceof i.SettingsTreeGroupElement&&m.parent;)w++,m=m.parent;return w}}let h=class extends b.WorkbenchObjectTree{constructor(m,w,D,y,T,_,L){const O={filter:L.createInstance(u.SettingsTreeFilter,w),multipleSelectionSupport:!1,identityProvider:{getId(N){return N.id}},styleController:N=>new p.DefaultStyleController(t.createStyleSheet(m),N),accessibilityProvider:L.createInstance(g),collapseByDefault:!0,horizontalScrolling:!1,hideTwistiesOfChildlessElements:!0};super("SettingsTOC",m,new a,[new n],O,L,D,y,T,_),this.disposables.add((0,C.attachStyler)(T,{listBackground:S.editorBackground,listFocusOutline:S.focusBorder,listActiveSelectionBackground:S.editorBackground,listActiveSelectionForeground:f.settingsHeaderForeground,listFocusAndSelectionBackground:S.editorBackground,listFocusAndSelectionForeground:f.settingsHeaderForeground,listFocusBackground:S.editorBackground,listFocusForeground:(0,S.transparent)(S.foreground,.9),listHoverForeground:(0,S.transparent)(S.foreground,.9),listHoverBackground:S.editorBackground,listInactiveSelectionBackground:S.editorBackground,listInactiveSelectionForeground:f.settingsHeaderForeground,listInactiveFocusBackground:S.editorBackground,listInactiveFocusOutline:S.editorBackground},N=>{this.style(N)}))}};h=we([F(2,E.IContextKeyService),F(3,b.IListService),F(4,r.IThemeService),F(5,k.IConfigurationService),F(6,I.IInstantiationService)],h),e.TOCTree=h}),define(ae[2846],le([1,0,164,53,18,9,42,1854,15,19,41,48,34,534,288,78,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigureSnippets=void 0;var l;(function(o){function g(h){return!!h&&A.URI.isUri(h.filepath)}o.is=g})(l||(l={}));async function s(o,g,h){const v=[],m=[],w=new Set;for(const y of await o.getSnippetFiles())if(y.source!==3)if(y.isGlobalSnippets){await y.load();const T=new Set;e:for(const _ of y.data)for(const L of _.scopes){const M=h.getLanguageName(L);if(M)if(T.size>=4){T.add(`${M}...`);break e}else T.add(M)}v.push({label:(0,R.basename)(y.location),filepath:y.location,description:T.size===0?E.localize(0,null):E.localize(1,null,[...T].join(", "))})}else{const T=(0,R.basename)(y.location).replace(/\.json$/,"");v.push({label:(0,R.basename)(y.location),description:`(${h.getLanguageName(T)})`,filepath:y.location}),w.add(T)}const D=g.currentProfile.snippetsHome;for(const y of h.getRegisteredLanguageIds()){const T=h.getLanguageName(y);T&&!w.has(y)&&m.push({label:y,description:`(${T})`,filepath:(0,R.joinPath)(D,`${y}.json`),hint:!0})}return v.sort((y,T)=>{const _=(0,p.extname)(y.filepath.path),L=(0,p.extname)(T.filepath.path);return _===L?y.label.localeCompare(T.label):_===".code-snippets"?-1:1}),m.sort((y,T)=>y.label.localeCompare(T.label)),{existing:v,future:m}}async function d(o,g,h,v,m,w){function D(_){const L=(0,p.extname)(_)!==".code-snippets"?`${_}.code-snippets`:_;return(0,R.joinPath)(g,L)}await v.createFolder(g);const y=await h.input({placeHolder:E.localize(2,null),async validateInput(_){if(!_)return E.localize(3,null);if(!(0,t.isValidBasename)(_))return E.localize(4,null,_);if(await v.exists(D(_)))return E.localize(5,null,_)}});if(!y)return;const T=D(y);await m.write(T,["{"," // Place your "+o+" 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 w.open(T)}async function n(o,g,h){if(await g.exists(o.filepath))return;const v=["{"," // Place your snippets for "+o.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 h.write(o.filepath,v)}class a extends u.SnippetsAction{constructor(){super({id:"workbench.action.openSnippets",title:{value:E.localize(6,null),original:"Configure User Snippets"},shortTitle:{value:E.localize(7,null),mnemonicTitle:E.localize(8,null),original:"User Snippets"},f1:!0,menu:[{id:I.MenuId.MenubarPreferencesMenu,group:"3_snippets",order:1},{id:I.MenuId.GlobalActivity,group:"3_snippets",order:1}]})}async run(g){const h=g.get(i.ISnippetsService),v=g.get(C.IQuickInputService),m=g.get(S.IOpenerService),w=g.get(k.ILanguageService),D=g.get(c.IUserDataProfileService),y=g.get(r.IWorkspaceContextService),T=g.get(b.IFileService),_=g.get(f.ITextFileService),L=await s(h,D,w),M=L.existing,O=[{scope:E.localize(9,null),label:E.localize(10,null),uri:D.currentProfile.snippetsHome}],N=[];for(const B of y.getWorkspace().folders)N.push({scope:E.localize(11,null,B.name),label:E.localize(12,null,B.name),uri:B.toResource(".vscode")});M.length>0?(M.unshift({type:"separator",label:E.localize(13,null)}),M.push({type:"separator",label:E.localize(14,null)})):M.push({type:"separator",label:E.localize(15,null)});const P=await v.pick([].concat(M,O,N,L.future),{placeHolder:E.localize(16,null),matchOnDescription:!0});if(O.indexOf(P)>=0)return d(P.scope,P.uri,v,T,_,m);if(N.indexOf(P)>=0)return d(P.scope,P.uri,v,T,_,m);if(l.is(P))return P.hint&&await n(P,T,_),m.open(P.filepath)}}e.ConfigureSnippets=a}),define(ae[976],le([1,0,2,18,28,42,224,1863,81,19,69,25,34,651,131,393,883,308,60,23,13,5,78,122,135,16]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNonWhitespacePrefix=e.SnippetsService=void 0;var m;(function(L){function M(O,N,P){if((0,R.isFalsyOrWhitespace)(N.path))return O.collector.error((0,E.localize)(0,null,O.description.name,String(N.path))),null;if((0,R.isFalsyOrWhitespace)(N.language)&&!N.path.endsWith(".code-snippets"))return O.collector.error((0,E.localize)(1,null,O.description.name,String(N.path))),null;if(!(0,R.isFalsyOrWhitespace)(N.language)&&!P.isRegisteredLanguageId(N.language))return O.collector.error((0,E.localize)(2,null,O.description.name,String(N.language))),null;const B=O.description.extensionLocation,V=p.joinPath(B,N.path);return p.isEqualOrParent(V,B)?{language:N.language,location:V}:(O.collector.error((0,E.localize)(3,null,O.description.name,V.path,B.path)),null)}L.toValidSnippet=M,L.snippetsContribution={description:(0,E.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,E.localize)(5,null),type:"string"},path:{description:(0,E.localize)(6,null),type:"string"}}}},L.point=i.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"snippets",deps:[f.languagesExtPoint],jsonSchema:L.snippetsContribution})})(m||(m={}));function w(L,M,O){return(0,t.combinedDisposable)(L.watch(M),L.onDidFilesChange(N=>{N.affects(M)&&O()}))}let D=class to{constructor(M){this._storageService=M;const O=M.get(to._key,0,"");let N;try{N=JSON.parse(O)}catch{}this._ignored=(0,n.isStringArray)(N)?new Set(N):new Set}isIgnored(M){return this._ignored.has(M)}updateIgnored(M,O){let N=!1;this._ignored.has(M)&&!O?(this._ignored.delete(M),N=!0):!this._ignored.has(M)&&O&&(this._ignored.add(M),N=!0),N&&this._storageService.store(to._key,JSON.stringify(Array.from(this._ignored)),0,0)}};D._key="snippets.ignoredSnippets",D=we([F(0,d.IStorageService)],D);let y=class io{constructor(M){this._storageService=M;const O=M.get(io._key,0,"");let N;try{N=JSON.parse(O)}catch{N=[]}this._usages=Array.isArray(N)?new Map(N):new Map}getUsageTimestamp(M){return this._usages.get(M)}updateUsageTimestamp(M){this._usages.delete(M),this._usages.set(M,Date.now());const O=[...this._usages].slice(-100);this._storageService.store(io._key,JSON.stringify(O),0,0)}};y._key="snippets.usageTimestamps",y=we([F(0,d.IStorageService)],y);let T=class{constructor(M,O,N,P,B,V,z,x,H,W,U){this._environmentService=M,this._userDataProfileService=O,this._contextService=N,this._languageService=P,this._logService=B,this._fileService=V,this._textfileService=z,this._extensionResourceLoaderService=x,this._disposables=new t.DisposableStore,this._pendingWork=[],this._files=new s.ResourceMap,this._pendingWork.push(Promise.resolve(H.when(3).then(()=>{this._initExtensionSnippets(),this._initUserSnippets(),this._initWorkspaceSnippets()}))),(0,k.setSnippetSuggestSupport)(new c.SnippetCompletionProvider(this._languageService,this,U)),this._enablement=W.createInstance(D),this._usageTimestamps=W.createInstance(y)}dispose(){this._disposables.dispose()}isEnabled(M){return!this._enablement.isIgnored(M.snippetIdentifier)}updateEnablement(M,O){this._enablement.updateIgnored(M.snippetIdentifier,!O)}updateUsageTimestamp(M){this._usageTimestamps.updateUsageTimestamp(M.snippetIdentifier)}_joinSnippets(){const M=this._pendingWork.slice(0);return this._pendingWork.length=0,Promise.all(M)}async getSnippetFiles(){return await this._joinSnippets(),this._files.values()}async getSnippets(M,O){await this._joinSnippets();const N=[],P=[];if(M){if(this._languageService.isRegisteredLanguageId(M))for(const B of this._files.values())P.push(B.load().then(V=>V.select(M,N)).catch(V=>this._logService.error(V,B.location.toString())))}else for(const B of this._files.values())P.push(B.load().then(V=>(0,v.insertInto)(N,N.length,V.data)).catch(V=>this._logService.error(V,B.location.toString())));return await Promise.all(P),this._filterAndSortSnippets(N,O)}getSnippetsSync(M,O){const N=[];if(this._languageService.isRegisteredLanguageId(M))for(const P of this._files.values())P.load().catch(B=>{}),P.select(M,N);return this._filterAndSortSnippets(N,O)}_filterAndSortSnippets(M,O){const N=[];for(const P of M)!P.prefix&&!O?.includeNoPrefixSnippets||!this.isEnabled(P)&&!O?.includeDisabledSnippets||typeof O?.fileTemplateSnippets=="boolean"&&O.fileTemplateSnippets!==P.isFileTemplate||N.push(P);return N.sort((P,B)=>{let V=0;if(!O?.noRecencySort){const z=this._usageTimestamps.getUsageTimestamp(P.snippetIdentifier)??-1;V=(this._usageTimestamps.getUsageTimestamp(B.snippetIdentifier)??-1)-z}return V===0&&(V=this._compareSnippet(P,B)),V})}_compareSnippet(M,O){return M.snippetSource<O.snippetSource?-1:M.snippetSource>O.snippetSource?1:M.source<O.source?-1:M.source>O.source||M.name>O.name?1:M.name<O.name?-1:0}_initExtensionSnippets(){m.point.setHandler(M=>{for(const[O,N]of this._files)N.source===3&&this._files.delete(O);for(const O of M)for(const N of O.value){const P=m.toValidSnippet(O,N,this._languageService);if(!P)continue;const B=this._files.get(P.location);if(B)B.defaultScopes?B.defaultScopes.push(P.language):B.defaultScopes=[];else{const V=new u.SnippetFile(3,P.location,P.language?[P.language]:void 0,O.description,this._fileService,this._extensionResourceLoaderService);this._files.set(V.location,V),this._environmentService.isExtensionDevelopment&&V.load().then(z=>{z.data.some(x=>x.isBogous)&&O.collector.warn((0,E.localize)(7,null,O.description.name))},z=>{O.collector.warn((0,E.localize)(8,null,V.location.toString()))})}}})}_initWorkspaceSnippets(){const M=new t.DisposableStore,O=()=>{M.clear(),this._pendingWork.push(this._initWorkspaceFolderSnippets(this._contextService.getWorkspace(),M))};this._disposables.add(M),this._disposables.add(this._contextService.onDidChangeWorkspaceFolders(O)),this._disposables.add(this._contextService.onDidChangeWorkbenchState(O)),O()}async _initWorkspaceFolderSnippets(M,O){const N=M.folders.map(async P=>{const B=P.toResource(".vscode");await this._fileService.exists(B)?this._initFolderSnippets(2,B,O):O.add(this._fileService.onDidFilesChange(z=>{z.contains(B,1)&&this._initFolderSnippets(2,B,O)}))});await Promise.all(N)}async _initUserSnippets(){const M=new t.DisposableStore,O=async()=>{M.clear();const N=this._userDataProfileService.currentProfile.snippetsHome;await this._fileService.createFolder(N),await this._initFolderSnippets(1,N,M)};this._disposables.add(M),this._disposables.add(this._userDataProfileService.onDidChangeCurrentProfile(N=>N.join((async()=>{N.preserveData&&await this._fileService.copy(N.previous.snippetsHome,N.profile.snippetsHome),this._pendingWork.push(O())})()))),await O()}_initFolderSnippets(M,O,N){const P=new t.DisposableStore,B=async()=>{if(P.clear(),!!await this._fileService.exists(O))try{const V=await this._fileService.resolve(O);for(const z of V.children||[])P.add(this._addSnippetFile(z.resource,M))}catch(V){this._logService.error(`Failed snippets from folder '${O.toString()}'`,V)}};return N.add(this._textfileService.files.onDidSave(V=>{p.isEqualOrParent(V.model.resource,O)&&B()})),N.add(w(this._fileService,O,B)),N.add(P),B()}_addSnippetFile(M,O){const N=p.extname(M);if(O===1&&N===".json"){const P=p.basename(M).replace(/\.json/,"");this._files.set(M,new u.SnippetFile(O,M,[P],void 0,this._fileService,this._extensionResourceLoaderService))}else N===".code-snippets"&&this._files.set(M,new u.SnippetFile(O,M,void 0,void 0,this._fileService,this._extensionResourceLoaderService));return{dispose:()=>this._files.delete(M)}}};T=we([F(0,I.IEnvironmentService),F(1,h.IUserDataProfileService),F(2,r.IWorkspaceContextService),F(3,A.ILanguageService),F(4,C.ILogService),F(5,b.IFileService),F(6,o.ITextFileService),F(7,l.IExtensionResourceLoaderService),F(8,S.ILifecycleService),F(9,a.IInstantiationService),F(10,g.ILanguageConfigurationService)],T),e.SnippetsService=T;function _(L,M){const N=L.getLineContent(M.lineNumber).substr(0,M.column-1),P=Math.max(0,N.length-100);for(let B=N.length-1;B>=P;B--){const V=N.charAt(B);if(/\s/.test(V))return N.substr(B+1)}return P===0?N:""}e.getNonWhitespacePrefix=_}),define(ae[470],le([1,0,7,288,976,20,40,168,224,59,883,93,266,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabCompletionController=void 0;let i=class no{static get(l){return l.getContribution(no.ID)}constructor(l,s,d,n,a){this._editor=l,this._snippetService=s,this._clipboardService=d,this._languageFeaturesService=n,this._activeSnippets=[],this._hasSnippets=no.ContextKey.bindTo(a),this._configListener=this._editor.onDidChangeConfiguration(o=>{o.hasChanged(113)&&this._update()}),this._update()}dispose(){this._configListener.dispose(),this._selectionListener?.dispose()}_update(){const l=this._editor.getOption(113)==="onlySnippets";this._enabled!==l&&(this._enabled=l,this._enabled?(this._selectionListener=this._editor.onDidChangeCursorSelection(s=>this._updateSnippets()),this._editor.getModel()&&this._updateSnippets()):this._selectionListener?.dispose())}_updateSnippets(){if(this._activeSnippets=[],this._completionProvider?.dispose(),!this._editor.hasModel())return;const l=this._editor.getSelection(),s=this._editor.getModel();s.tokenization.tokenizeIfCheap(l.positionLineNumber);const d=s.getLanguageIdAtPosition(l.positionLineNumber,l.positionColumn),n=this._snippetService.getSnippetsSync(d);if(!n){this._hasSnippets.set(!1);return}if(A.Range.isEmpty(l)){const o=(0,R.getNonWhitespacePrefix)(s,l.getPosition());if(o)for(const g of n)o.endsWith(g.prefix)&&this._activeSnippets.push(g)}else if(!A.Range.spansMultipleLines(l)&&s.getValueLengthInRange(l)<=100){const o=s.getValueInRange(l);if(o)for(const g of n)o===g.prefix&&this._activeSnippets.push(g)}const a=this._activeSnippets.length;if(a===0)this._hasSnippets.set(!1);else if(a===1)this._hasSnippets.set(!0);else{this._hasSnippets.set(!0),this._completionProvider={dispose:()=>{o.dispose()},provideCompletionItems:(g,h)=>g!==s||!l.containsPosition(h)?void 0:{suggestions:this._activeSnippets.map(m=>{const w=A.Range.fromPositions(h.delta(0,-m.prefix.length),h);return new S.SnippetCompletion(m,w)})}};const o=this._languageFeaturesService.completionProvider.register({language:s.getLanguageId(),pattern:s.uri.fsPath,scheme:s.uri.scheme},this._completionProvider)}}async performSnippetCompletions(){if(!!this._editor.hasModel())if(this._activeSnippets.length===1){const[l]=this._activeSnippets;let s;if(l.needsClipboard){const d=new r.EditorState(this._editor,5);if(s=await this._clipboardService.readText(),!d.validate(this._editor))return}E.SnippetController2.get(this._editor)?.insert(l.codeSnippet,{overwriteBefore:l.prefix.length,overwriteAfter:0,clipboardText:s})}else this._activeSnippets.length>1&&this._completionProvider&&(0,I.showSimpleSuggestions)(this._editor,this._completionProvider)}};i.ID="editor.tabCompletionController",i.ContextKey=new t.RawContextKey("hasSnippetCompletions",void 0),i=we([F(1,p.ISnippetsService),F(2,C.IClipboardService),F(3,u.ILanguageFeaturesService),F(4,t.IContextKeyService)],i),e.TabCompletionController=i,(0,k.registerEditorContribution)(i.ID,i);const f=k.EditorCommand.bindToContribution(i.get);(0,k.registerEditorCommand)(new f({id:"insertSnippet",precondition:i.ContextKey,handler:c=>c.performSnippetCompletions(),kbOpts:{weight:100,kbExpr:t.ContextKeyExpr.and(b.EditorContextKeys.editorTextFocus,b.EditorContextKeys.tabDoesNotMoveFocus,E.SnippetController2.InSnippetMode.toNegated()),primary:2}}))}),define(ae[471],le([1,0,333,168,244,337,381,470,40]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSimpleCodeEditorWidgetOptions=e.getSimpleEditorOptions=void 0;function b(){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=b;function S(){return{isSimpleWidget:!0,contributions:I.EditorExtensionsRegistry.getSomeEditorContributions([A.MenuPreventer.ID,k.SelectionClipboardContributionID,t.ContextMenuController.ID,R.SuggestController.ID,p.SnippetController2.ID,E.TabCompletionController.ID])}}e.getSimpleCodeEditorWidgetOptions=S}),define(ae[693],le([1,0,10,140,6,52,14,9,173,138,50,20,54,333,168,244,7,5,33,73,12,337,471,381,40,518,405,265,151,61,1130]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedSuggestEnabledInputWithHistory=e.SuggestEnabledInputWithHistory=e.SuggestEnabledInput=e.attachSuggestEnabledInputBoxStyler=void 0;function T(N,P,B){return(0,d.attachStyler)(P,{inputBackground:B?.inputBackground||s.inputBackground,inputForeground:B?.inputForeground||s.inputForeground,inputBorder:B?.inputBorder||s.inputBorder,inputPlaceholderForeground:B?.inputPlaceholderForeground||s.inputPlaceholderForeground},N)}e.attachSuggestEnabledInputBoxStyler=T;let _=class extends p.Widget{constructor(P,B,V,z,x,H,W,U,$,q){super(),this._onShouldFocusResults=new R.Emitter,this.onShouldFocusResults=this._onShouldFocusResults.event,this._onEnter=new R.Emitter,this.onEnter=this._onEnter.event,this._onInputDidChange=new R.Emitter,this.onInputDidChange=this._onInputDidChange.event,this._onDidFocus=this._register(new R.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new R.Emitter),this.onDidBlur=this._onDidBlur.event,this.stylingContainer=(0,t.append)(B,(0,t.$)(".suggest-input-container")),this.element=B,this.placeholderText=(0,t.append)(this.stylingContainer,(0,t.$)(".suggest-input-placeholder",void 0,H.placeholderText||""));const X=(0,A.mixin)((0,o.getSimpleEditorOptions)(),O(z)),G=this.getScopedContextKeyService($),Q=G?W.createChild(new D.ServiceCollection([c.IContextKeyService,G])):W;this.inputWidget=this._register(Q.createInstance(I.CodeEditorWidget,this.stylingContainer,X,{contributions:h.EditorExtensionsRegistry.getSomeEditorContributions([f.SuggestController.ID,i.SnippetController2.ID,u.ContextMenuController.ID,a.MenuPreventer.ID,g.SelectionClipboardContributionID]),isSimpleWidget:!0})),this._register(this.inputWidget.onDidFocusEditorText(()=>this._onDidFocus.fire())),this._register(this.inputWidget.onDidBlurEditorText(()=>this._onDidBlur.fire()));const j=E.URI.parse(x);this.inputModel=U.createModel("",null,j,!0),this._register(this.inputModel),this.inputWidget.setModel(this.inputModel),this._register(this.inputWidget.onDidPaste(()=>this.setValue(this.getValue()))),this._register(this.inputWidget.onDidFocusEditorText(()=>{H.focusContextKey&&H.focusContextKey.set(!0),this.stylingContainer.classList.add("synthetic-focus")})),this._register(this.inputWidget.onDidBlurEditorText(()=>{H.focusContextKey&&H.focusContextKey.set(!1),this.stylingContainer.classList.remove("synthetic-focus")}));const K=R.Event.chain(this.inputWidget.onKeyDown);this._register(K.filter(re=>re.keyCode===3).on(re=>{re.preventDefault(),this._onEnter.fire()},this)),this._register(K.filter(re=>re.keyCode===18&&(k.isMacintosh?re.metaKey:re.ctrlKey)).on(()=>this._onShouldFocusResults.fire(),this));let Y=this.getValue();const ee=this.inputWidget.getModel();ee&&this._register(ee.onDidChangeContent(()=>{const re=this.getValue();this.placeholderText.style.visibility=re?"hidden":"visible",Y.trim()!==re.trim()&&(this._onInputDidChange.fire(void 0),Y=re)}));const ie={provideResults:V.provideResults,sortKey:V.sortKey||(re=>re),triggerCharacters:V.triggerCharacters||[]};this.setValue(H.value||""),this._register(q.completionProvider.register({scheme:j.scheme,pattern:"**/"+j.path,hasAccessToAllModels:!0},{triggerCharacters:ie.triggerCharacters,provideCompletionItems:(re,oe,se)=>{const te=re.getValue(),Z=oe.column-1,ne=te.lastIndexOf(" ",Z-1)+1,ce=Z-ne;return ce>0&&ie.triggerCharacters.indexOf(te[ne])===-1?{suggestions:[]}:{suggestions:V.provideResults(te).map(de=>{let he,pe;return typeof de=="string"?he=de:(he=de.label,pe=de),{label:he,insertText:he,range:C.Range.fromPositions(oe.delta(0,-ce),oe),sortText:ie.sortKey(he),kind:17,...pe}})}}}))}getScopedContextKeyService(P){}updateAriaLabel(P){this.inputWidget.updateOptions({ariaLabel:P})}setValue(P){P=P.replace(/\s/g," ");const B=this.inputModel.getFullModelRange();this.inputWidget.executeEdits("suggestEnabledInput.setValue",[b.EditOperation.replace(B,P)]),this.inputWidget.setScrollTop(0),this.inputWidget.setPosition(new S.Position(1,P.length+1))}getValue(){return this.inputWidget.getValue()}style(P){this.stylingContainer.style.backgroundColor=P.inputBackground?P.inputBackground.toString():"",this.stylingContainer.style.color=P.inputForeground?P.inputForeground.toString():"",this.placeholderText.style.color=P.inputPlaceholderForeground?P.inputPlaceholderForeground.toString():"",this.stylingContainer.style.borderWidth="1px",this.stylingContainer.style.borderStyle="solid",this.stylingContainer.style.borderColor=P.inputBorder?P.inputBorder.toString():"transparent";const B=this.stylingContainer.getElementsByClassName("cursor")[0];B&&(B.style.backgroundColor=P.inputForeground?P.inputForeground.toString():"")}focus(P){this.inputWidget.focus(),P&&this.inputWidget.getValue()&&this.selectAll()}onHide(){this.inputWidget.onHide()}layout(P){this.inputWidget.layout(P),this.placeholderText.style.width=`${P.width-2}px`}selectAll(){this.inputWidget.setSelection(new C.Range(1,1,1,this.getValue().length+1))}};_=we([F(6,l.IInstantiationService),F(7,r.IModelService),F(8,c.IContextKeyService),F(9,y.ILanguageFeaturesService)],_),e.SuggestEnabledInput=_;let L=class extends _{constructor({id:P,parent:B,ariaLabel:V,suggestionProvider:z,resourceHandle:x,suggestOptions:H,history:W},U,$,q,X){super(P,B,z,V,x,H,U,$,q,X),this.history=new m.HistoryNavigator(W,100)}addToHistory(){const P=this.getValue();P&&P!==this.getCurrentValue()&&this.history.add(P)}getHistory(){return this.history.getHistory()}showNextValue(){this.history.has(this.getValue())||this.addToHistory();let P=this.getNextValue();P&&(P=P===this.getValue()?this.getNextValue():P),P&&this.setValue(P)}showPreviousValue(){this.history.has(this.getValue())||this.addToHistory();let P=this.getPreviousValue();P&&(P=P===this.getValue()?this.getPreviousValue():P),P&&(this.setValue(P),this.inputWidget.setPosition({lineNumber:0,column:0}))}clearHistory(){this.history.clear()}getCurrentValue(){let P=this.history.current();return P||(P=this.history.last(),this.history.next()),P}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}};L=we([F(1,l.IInstantiationService),F(2,r.IModelService),F(3,c.IContextKeyService),F(4,y.ILanguageFeaturesService)],L),e.SuggestEnabledInputWithHistory=L;let M=class extends L{constructor(P,B,V,z,x){super(P,B,V,z,x);const{historyNavigationBackwardsEnablement:H,historyNavigationForwardsEnablement:W}=this.historyContext;this._register(this.inputWidget.onDidChangeCursorPosition(({position:U})=>{const $=this.inputWidget._getViewModel(),q=$.getLineCount(),X=$.getLineContent(q).length+1,G=$.coordinatesConverter.convertModelPositionToViewPosition(U);H.set(G.lineNumber===1&&G.column===1),W.set(G.lineNumber===q&&G.column===X)}))}getScopedContextKeyService(P){const B=this._register(P.createScoped(this.element));return this.historyContext=this._register((0,w.registerAndCreateHistoryNavigationContext)(B,this)),B}};M=we([F(1,l.IInstantiationService),F(2,r.IModelService),F(3,c.IContextKeyService),F(4,y.ILanguageFeaturesService)],M),e.ContextScopedSuggestEnabledInputWithHistory=M,(0,n.registerThemingParticipant)((N,P)=>{const B=N.getColor(s.selectionBackground);if(B){const V=N.getColor(s.inputBackground);V&&P.addRule(`.suggest-input-container .monaco-editor .selected-text { background-color: ${V.transparent(.4)}; }`);const z=N.getColor(s.inputForeground);z&&P.addRule(`.suggest-input-container .monaco-editor .view-line span.inline-selected-text { color: ${z}; }`);const x=N.getColor(s.inputBackground);x&&P.addRule(`.suggest-input-container .monaco-editor-background { background-color: ${x}; } `),P.addRule(`.suggest-input-container .monaco-editor .focused .selected-text { background-color: ${B}; }`)}else P.addRule(`.suggest-input-container .monaco-editor .focused .selected-text { background-color: ${N.getColor(s.editorSelectionBackground)}; }`)});function O(N){return{fontSize:13,lineHeight:20,wordWrap:"off",scrollbar:{vertical:"hidden"},roundedSelection:!1,guides:{indentation:!1},cursorWidth:1,fontFamily:v.DEFAULT_FONT_FAMILY,ariaLabel:N||"",snippetSuggestions:"none",suggest:{filterGraceful:!1,showIcons:!1},autoClosingBrackets:"never"}}}),define(ae[694],le([1,0,40,75,173,7,5,31,337,333,244,168,470,12,26,111,633,122,61]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleCommentEditor=e.ctxCommentEditorFocused=void 0,e.ctxCommentEditorFocused=new A.RawContextKey("commentEditorFocused",!1);let d=class extends R.CodeEditorWidget{constructor(a,o,g,h,v,m,w,D,y,T,_,L){const M={isSimpleWidget:!0,contributions:[{id:I.MenuPreventer.ID,ctor:I.MenuPreventer},{id:b.ContextMenuController.ID,ctor:b.ContextMenuController},{id:S.SuggestController.ID,ctor:S.SuggestController},{id:C.SnippetController2.ID,ctor:C.SnippetController2},{id:r.TabCompletionController.ID,ctor:r.TabCompletionController}]};super(a,o,M,h,v,m,w,D,y,T,_,L),this._commentEditorFocused=e.ctxCommentEditorFocused.bindTo(w),this._commentEditorEmpty=c.CommentContextKeys.commentIsEmpty.bindTo(w),this._commentEditorEmpty.set(!this.getValue()),this._parentThread=g,this._register(this.onDidFocusEditorWidget(O=>this._commentEditorFocused.set(!0))),this._register(this.onDidChangeModelContent(O=>this._commentEditorEmpty.set(!this.getValue()))),this._register(this.onDidBlurEditorWidget(O=>this._commentEditorFocused.reset()))}getParentThread(){return this._parentThread}_getActions(){return t.EditorExtensionsRegistry.getEditorActions()}static getEditorOptions(a){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},autoClosingBrackets:a.getValue("editor.autoClosingBrackets"),quickSuggestions:!1}}};d=we([F(3,k.IInstantiationService),F(4,p.ICodeEditorService),F(5,E.ICommandService),F(6,A.IContextKeyService),F(7,u.IThemeService),F(8,i.INotificationService),F(9,f.IAccessibilityService),F(10,l.ILanguageConfigurationService),F(11,s.ILanguageFeaturesService)],d),e.SimpleCommentEditor=d}),define(ae[2847],le([1,0,1575,10,92,79,36,2,9,54,42,5,12,275,694,85,6,26,263,37,2295,15,84,7,854,324,137,279,29,860,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentNode=void 0;let _=class extends E.Disposable{get domNode(){return this._domNode}constructor(O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q){super(),this.commentThread=O,this.comment=N,this.owner=P,this.resource=B,this.parentThread=V,this.markdownRenderer=z,this.themeService=x,this.instantiationService=H,this.commentService=W,this.modelService=U,this.languageService=$,this.notificationService=q,this.contextMenuService=X,this.configurationService=Q,this._editAction=null,this._commentEditContainer=null,this._commentEditor=null,this._commentEditorDisposables=[],this._commentEditorModel=null,this._commentFormActions=null,this._onDidClick=new c.Emitter,this.isEditing=!1,this._domNode=p.$("div.review-comment"),this._contextKeyService=G.createScoped(this._domNode),this._commentContextValue=this._contextKeyService.createKey("comment",N.contextValue),this._commentMenus=this.commentService.getCommentMenus(this.owner),this._domNode.tabIndex=-1;const j=p.append(this._domNode,p.$("div.avatar-container"));if(N.userIconPath){const K=p.append(j,p.$("img.avatar"));K.src=N.userIconPath.toString(),K.onerror=Y=>K.remove()}this._commentDetailsContainer=p.append(this._domNode,p.$(".review-comment-contents")),this.createHeader(this._commentDetailsContainer),this._body=p.append(this._commentDetailsContainer,p.$(`div.comment-body.${v.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),this.updateCommentBody(this.comment.body),this.comment.commentReactions&&this.comment.commentReactions.length&&this.comment.commentReactions.filter(K=>!!K.count).length&&this.createReactionsContainer(this._commentDetailsContainer),this._domNode.setAttribute("aria-label",`${N.userName}, ${this.commentBodyValue}`),this._domNode.setAttribute("role","treeitem"),this._clearTimeout=null,this._register(p.addDisposableListener(this._domNode,p.EventType.CLICK,()=>this.isEditing||this._onDidClick.fire(this))),this._register(p.addDisposableListener(this._domNode,p.EventType.CONTEXT_MENU,K=>this.onContextMenu(K)))}updateCommentBody(O){this._body.innerText="",this._md=void 0,this._plainText=void 0,typeof O=="string"?(this._plainText=p.append(this._body,p.$(".comment-body-plainstring")),this._plainText.innerText=O):(this._md=this.markdownRenderer.render(O).element,this._body.appendChild(this._md))}get onDidClick(){return this._onDidClick.event}createTimestamp(O){this._timestamp=p.append(O,p.$("span.timestamp-container")),this.updateTimestamp(this.comment.timestamp)}updateTimestamp(O){if(!this._timestamp)return;const N=O!==void 0?new Date(O):void 0;N?this._timestampWidget?this._timestampWidget.setTimestamp(N):(this._timestampWidget=new y.TimestampWidget(this.configurationService,this._timestamp,N),this._register(this._timestampWidget)):this._timestampWidget?.dispose()}createHeader(O){const N=p.append(O,p.$(`div.comment-title.${v.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),P=p.append(N,p.$("comment-header-info")),B=p.append(P,p.$("strong.author"));B.innerText=this.comment.userName,this.createTimestamp(P),this._isPendingLabel=p.append(P,p.$("span.isPending")),this.comment.label?this._isPendingLabel.innerText=this.comment.label:this._isPendingLabel.innerText="",this._actionsToolbarContainer=p.append(N,p.$(".comment-actions.hidden")),this.createActionsToolbar()}getToolbarActions(O){const N=O.getActions({shouldForwardArgs:!0}),V={primary:[],secondary:[]};return L(N,V,!1,z=>/^inline/.test(z)),V}get commentNodeContext(){return{thread:this.commentThread,commentUniqueId:this.comment.uniqueIdInThread,$mid:9}}createToolbar(){this.toolbar=new s.ToolBar(this._actionsToolbarContainer,this.contextMenuService,{actionViewItemProvider:O=>O.id===n.ToggleReactionsAction.ID?new w.DropdownMenuActionViewItem(O,O.menuActions,this.contextMenuService,{actionViewItemProvider:N=>this.actionViewItemProvider(N),actionRunner:this.actionRunner,classNames:["toolbar-toggle-pickReactions",...D.Codicon.reactions.classNamesArray],anchorAlignmentProvider:()=>1}):this.actionViewItemProvider(O),orientation:0}),this.toolbar.context=this.commentNodeContext,this.registerActionBarListeners(this._actionsToolbarContainer),this._register(this.toolbar)}createActionsToolbar(){const O=[];if(this.commentService.hasReactionHandler(this.owner)){const z=this.createReactionPicker(this.comment.commentReactions||[]);O.push(z)}const P=this._commentMenus.getCommentTitleActions(this.comment,this._contextKeyService);this._register(P),this._register(P.onDidChange(z=>{const{primary:x,secondary:H}=this.getToolbarActions(P);!this.toolbar&&(x.length||H.length)&&this.createToolbar(),this.toolbar.setActions(x,H)}));const{primary:B,secondary:V}=this.getToolbarActions(P);O.push(...B),(O.length||V.length)&&(this.createToolbar(),this.toolbar.setActions(O,V))}actionViewItemProvider(O){let N={};return O.id===n.ToggleReactionsAction.ID?N={label:!1,icon:!0}:N={label:!1,icon:!0},O.id===n.ReactionAction.ID?new n.ReactionActionViewItem(O):O instanceof a.MenuItemAction?this.instantiationService.createInstance(o.MenuEntryActionViewItem,O,void 0):O instanceof a.SubmenuItemAction?this.instantiationService.createInstance(o.SubmenuEntryActionViewItem,O,void 0):new m.ActionViewItem({},O,N)}async submitComment(){this._commentEditor&&this._commentFormActions&&this._commentFormActions.triggerDefaultAction()}createReactionPicker(O){const N=this._register(new n.ToggleReactionsAction(()=>{B?.show()},t.localize(0,null)));let P=[];O&&O.length&&(P=O.map(V=>new k.Action(`reaction.command.${V.label}`,`${V.label}`,"",!0,async()=>{try{await this.commentService.toggleReaction(this.owner,this.resource,this.commentThread,this.comment,V)}catch(z){const x=z.message?t.localize(1,null,z.message):t.localize(2,null);this.notificationService.error(x)}}))),N.menuActions=P;const B=new w.DropdownMenuActionViewItem(N,N.menuActions,this.contextMenuService,{actionViewItemProvider:V=>V.id===n.ToggleReactionsAction.ID?B:this.actionViewItemProvider(V),actionRunner:this.actionRunner,classNames:"toolbar-toggle-pickReactions",anchorAlignmentProvider:()=>1});return N}createReactionsContainer(O){this._reactionActionsContainer=p.append(O,p.$("div.comment-reactions")),this._reactionsActionBar=new A.ActionBar(this._reactionActionsContainer,{actionViewItemProvider:P=>P.id===n.ToggleReactionsAction.ID?new w.DropdownMenuActionViewItem(P,P.menuActions,this.contextMenuService,{actionViewItemProvider:B=>this.actionViewItemProvider(B),actionRunner:this.actionRunner,classNames:"toolbar-toggle-pickReactions",anchorAlignmentProvider:()=>1}):this.actionViewItemProvider(P)}),this._register(this._reactionsActionBar);const N=this.commentService.hasReactionHandler(this.owner);if(this.comment.commentReactions.filter(P=>!!P.count).map(P=>{const B=new n.ReactionAction(`reaction.${P.label}`,`${P.label}`,P.hasReacted&&(P.canEdit||N)?"active":"",P.canEdit||N,async()=>{try{await this.commentService.toggleReaction(this.owner,this.resource,this.commentThread,this.comment,P)}catch(V){let z;P.hasReacted?z=V.message?t.localize(3,null,V.message):t.localize(4,null):z=V.message?t.localize(5,null,V.message):t.localize(6,null),this.notificationService.error(z)}},P.iconPath,P.count);this._reactionsActionBar?.push(B,{label:!0,icon:!0})}),N){const P=this.createReactionPicker(this.comment.commentReactions||[]);this._reactionsActionBar.push(P,{label:!1,icon:!0})}}get commentBodyValue(){return typeof this.comment.body=="string"?this.comment.body:this.comment.body.value}createCommentEditor(O){const N=p.append(O,p.$(".edit-textarea"));this._commentEditor=this.instantiationService.createInstance(i.SimpleCommentEditor,N,i.SimpleCommentEditor.getEditorOptions(this.configurationService),this.parentThread);const P=I.URI.parse(`comment:commentinput-${this.comment.uniqueIdInThread}-${Date.now()}.md`);this._commentEditorModel=this.modelService.createModel("",this.languageService.createByFilepathOrFirstLine(P),P,!1),this._commentEditor.setModel(this._commentEditorModel),this._commentEditor.setValue(this.commentBodyValue),this._commentEditor.layout({width:N.clientWidth-14,height:90}),this._commentEditor.focus(),p.scheduleAtNextAnimationFrame(()=>{this._commentEditor.layout({width:N.clientWidth-14,height:90}),this._commentEditor.focus()});const B=this._commentEditorModel.getLineCount(),V=this._commentEditorModel.getLineContent(B).length+1;this._commentEditor.setSelection(new f.Selection(B,V,B,V));const z=this.commentThread;z.input={uri:this._commentEditor.getModel().uri,value:this.commentBodyValue},this.commentService.setActiveCommentThread(z),this._commentEditorDisposables.push(this._commentEditor.onDidFocusEditorWidget(()=>{z.input={uri:this._commentEditor.getModel().uri,value:this.commentBodyValue},this.commentService.setActiveCommentThread(z)})),this._commentEditorDisposables.push(this._commentEditor.onDidChangeModelContent(x=>{if(z.input&&this._commentEditor&&this._commentEditor.getModel().uri===z.input.uri){const H=this._commentEditor.getValue();if(H!==z.input.value){const W=z.input;W.value=H,z.input=W,this.commentService.setActiveCommentThread(z)}}})),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?.dispose(),this._commentEditorDisposables.forEach(O=>O.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=p.append(this._commentDetailsContainer,p.$(".edit-container")),this.createCommentEditor(this._commentEditContainer);const O=p.append(this._commentEditContainer,p.$(".form-actions")),P=this.commentService.getCommentMenus(this.owner).getCommentActions(this.comment,this._contextKeyService);this._register(P),this._register(P.onDidChange(()=>{this._commentFormActions?.setActions(P)})),this._commentFormActions=new h.CommentFormActions(O,B=>{const V=this._commentEditor.getValue();B.run({thread:this.commentThread,commentUniqueId:this.comment.uniqueIdInThread,text:V,$mid:10}),this.removeCommentEditor()},this.themeService),this._commentFormActions.setActions(P)}setFocus(O,N=!1){O?(this._domNode.focus(),this._actionsToolbarContainer.classList.remove("hidden"),this._actionsToolbarContainer.classList.add("tabfocused"),this._domNode.tabIndex=0,this.comment.mode===R.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(O){this._register(p.addDisposableListener(this._domNode,"mouseenter",()=>{O.classList.remove("hidden"),O.classList.add("mouseover")})),this._register(p.addDisposableListener(this._domNode,"mouseleave",()=>{O.classList.contains("mouseover")&&!O.classList.contains("tabfocused")&&O.classList.add("hidden"),O.classList.remove("mouseover")}))}update(O){O.body!==this.comment.body&&this.updateCommentBody(O.body);const N=O.mode!==void 0&&O.mode!==this.comment.mode;this.comment=O,N&&(O.mode===R.CommentMode.Editing?this.switchToEditMode():this.removeCommentEditor()),O.label?this._isPendingLabel.innerText=O.label:this._isPendingLabel.innerText="",this._reactionActionsContainer?.remove(),this._reactionsActionBar?.clear(),this.comment.commentReactions&&this.comment.commentReactions.some(P=>!!P.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)}onContextMenu(O){this.contextMenuService.showContextMenu({getAnchor:()=>O,menuId:a.MenuId.CommentThreadCommentContext,menuActionOptions:{shouldForwardArgs:!0},contextKeyService:this._contextKeyService,actionRunner:new k.ActionRunner,getActionsContext:()=>this.commentNodeContext})}focus(){this.domNode.focus(),this._clearTimeout||(this.domNode.classList.add("focus"),this._clearTimeout=setTimeout(()=>{this.domNode.classList.remove("focus")},3e3))}};_=we([F(6,r.IThemeService),F(7,C.IInstantiationService),F(8,u.ICommentService),F(9,b.IModelService),F(10,S.ILanguageService),F(11,l.INotificationService),F(12,d.IContextMenuService),F(13,g.IContextKeyService),F(14,T.IConfigurationService)],_),e.CommentNode=_;function L(M,O,N,P=B=>B==="navigation"){for(const B of M){let[V,z]=B;if(N&&(z=z.map(x=>x instanceof a.MenuItemAction&&!!x.alt?x.alt:x)),P(V))(Array.isArray(O)?O:O.primary).unshift(...z);else{const x=Array.isArray(O)?O:O.secondary;x.length>0&&x.push(new k.Separator),x.push(...z)}}}}),define(ae[695],le([1,0,10,324,2,9,72,42,54,1576,8,33,12,854,275,633,694]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentReply=e.COMMENTEDITOR_DECORATION_KEY=void 0;const l="comment";let s=0;e.COMMENTEDITOR_DECORATION_KEY="commenteditordecoration";let d=class extends R.Disposable{constructor(a,o,g,h,v,m,w,D,y,T,_,L,M,O,N){super(),this.owner=a,this._commentThread=g,this._scopedInstatiationService=h,this._contextKeyService=v,this._commentMenus=m,this._commentOptions=w,this._pendingComment=D,this._parentThread=y,this._actionRunDelegate=T,this.commentService=_,this.languageService=L,this.modelService=M,this.themeService=O,this._commentThreadDisposables=[],this.form=t.append(o,t.$(".comment-form")),this.commentEditor=this._register(this._scopedInstatiationService.createInstance(c.SimpleCommentEditor,this.form,c.SimpleCommentEditor.getEditorOptions(N),this._parentThread)),this.commentEditorIsEmpty=f.CommentContextKeys.commentIsEmpty.bindTo(this._contextKeyService),this.commentEditorIsEmpty.set(!this._pendingComment);const P=this._commentThread.comments&&this._commentThread.comments.length>0,B=(0,k.generateUuid)()+"-"+(P?this._commentThread.threadId:++s),V=JSON.stringify({extensionId:this._commentThread.extensionId,commentThreadId:this._commentThread.threadId});let z=A.URI.parse(`${l}://${this._commentThread.extensionId}/commentinput-${B}.md?${V}`);const x=this.commentService.getCommentController(a);x&&(z=z.with({authority:x.id}));const H=this.modelService.createModel(this._pendingComment||"",this.languageService.createByFilepathOrFirstLine(z),z,!1);this._register(H),this.commentEditor.setModel(H),this._register(this.commentEditor.getModel().onDidChangeContent(()=>{this.setCommentEditorDecorations(),this.commentEditorIsEmpty?.set(!this.commentEditor.getValue())})),this.createTextModelListener(this.commentEditor,this.form),this.setCommentEditorDecorations(),P?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,H)}updateCommentThread(a){const o=this.commentEditor.hasTextFocus();this._reviewThreadReplyButton||this.createReplyButton(this.commentEditor,this.form),this._commentThread.comments&&this._commentThread.comments.length===0&&this.expandReplyArea(),o&&this.commentEditor.focus()}getPendingComment(){const a=this.commentEditor.getModel();return a&&a.getValueLength()>0?a.getValue():null}layout(a){this.commentEditor.layout({height:5*18,width:a-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?.triggerDefaultAction()}setCommentEditorDecorations(){const a=this.commentEditor.getModel();if(a){const o=a.getValueLength(),g=this._commentThread.comments&&this._commentThread.comments.length>0,h=o>0?"":g?this._commentOptions?.placeHolder||b.localize(0,null):this._commentOptions?.placeHolder||b.localize(1,null),v=[{range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:h,color:`${(0,C.resolveColorValue)(C.editorForeground,this.themeService.getColorTheme())?.transparent(.4)}`}}}];this.commentEditor.setDecorationsByType("review-zone-widget",e.COMMENTEDITOR_DECORATION_KEY,v)}}createTextModelListener(a,o){this._commentThreadDisposables.push(a.onDidFocusEditorWidget(()=>{this._commentThread.input={uri:a.getModel().uri,value:a.getValue()},this.commentService.setActiveCommentThread(this._commentThread)})),this._commentThreadDisposables.push(a.getModel().onDidChangeContent(()=>{const g=a.getValue();if(this._commentThread.input&&this._commentThread.input.uri===a.getModel().uri&&this._commentThread.input.value!==g){const h=this._commentThread.input;h.value=g,this._commentThread.input=h}this.commentService.setActiveCommentThread(this._commentThread)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeInput(g=>{const h=this._commentThread,v=a.getModel();h.input&&v&&h.input.uri!==v.uri||!g||a.getValue()!==g.value&&(a.setValue(g.value),g.value===""&&(this._pendingComment="",o.classList.remove("expand"),a.getDomNode().style.outline="",this._error.textContent="",this._error.classList.add("hidden")))}))}createCommentWidgetActions(a,o){const g=this._commentMenus.getCommentThreadActions(this._contextKeyService);this._register(g),this._register(g.onDidChange(()=>{this._commentFormActions.setActions(g)})),this._commentFormActions=new u.CommentFormActions(a,async h=>{this._actionRunDelegate?.(),h.run({thread:this._commentThread,text:this.commentEditor.getValue(),$mid:8}),this.hideReplyArea()},this.themeService),this._commentFormActions.setActions(g)}get isReplyExpanded(){return this.form.classList.contains("expand")}expandReplyArea(){this.isReplyExpanded||(this.form.classList.add("expand"),this.commentEditor.focus(),this.commentEditor.layout())}clearAndExpandReplyArea(){this.isReplyExpanded||(this.commentEditor.setValue(""),this.expandReplyArea())}hideReplyArea(){this.commentEditor.getDomNode().style.outline="",this._pendingComment="",this.form.classList.remove("expand"),this._error.textContent="",this._error.classList.add("hidden")}createReplyButton(a,o){this._reviewThreadReplyButton=t.append(o,t.$(`button.review-thread-reply-button.${p.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),this._reviewThreadReplyButton.title=this._commentOptions?.prompt||b.localize(2,null),this._reviewThreadReplyButton.textContent=this._commentOptions?.prompt||b.localize(3,null),this._register(t.addDisposableListener(this._reviewThreadReplyButton,"click",g=>this.clearAndExpandReplyArea())),this._register(t.addDisposableListener(this._reviewThreadReplyButton,"focus",g=>this.clearAndExpandReplyArea())),a.onDidBlurEditorWidget(()=>{a.getModel().getValueLength()===0&&o.classList.contains("expand")&&o.classList.remove("expand")})}};d=we([F(10,i.ICommentService),F(11,E.ILanguageService),F(12,I.IModelService),F(13,r.IThemeService),F(14,S.IConfigurationService)],d),e.CommentReply=d}),define(ae[2848],le([1,0,10,1577,2,92,6,275,90,2847,184,41,42]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentThreadBody=void 0;let u=class extends R.Disposable{get length(){return this._commentThread.comments?this._commentThread.comments.length:0}get activeComment(){return this._commentElements.filter(f=>f.isEditing)[0]}constructor(f,c,l,s,d,n,a,o,g,h){super(),this.owner=f,this.parentResourceUri=c,this.container=l,this._options=s,this._commentThread=d,this._scopedInstatiationService=n,this._parentCommentThreadWidget=a,this.commentService=o,this.openerService=g,this.languageService=h,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,v=>{this.commentService.setActiveCommentThread(this._commentThread)})),this._markdownRenderer=this._register(new S.MarkdownRenderer(this._options,this.languageService,this.openerService))}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,f=>{const c=new I.StandardKeyboardEvent(f);if(c.equals(16)||c.equals(18)){const l=s=>{if(this._focusedComment===void 0&&s>=0)return 0;if(this._focusedComment===void 0&&s<0)return this._commentElements.length-1;const d=this._focusedComment+s;return Math.min(Math.max(0,d),this._commentElements.length-1)};this._setFocusedComment(c.equals(16)?l(-1):l(1))}})),this._commentElements=[],this._commentThread.comments)for(const f of this._commentThread.comments){const c=this.createNewCommentNode(f);this._commentElements.push(c),this._commentsElement.appendChild(c.domNode),f.mode===A.CommentMode.Editing&&c.switchToEditMode()}this._resizeObserver=new MutationObserver(this._refresh.bind(this)),this._resizeObserver.observe(this.container,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}_refresh(){const f=t.getClientArea(this.container);this._onDidResize.fire(f)}getDimensions(){return t.getClientArea(this.container)}layout(){this._commentElements.forEach(f=>{f.layout()})}getCommentCoords(f){const c=this._commentElements.filter(l=>l.comment.uniqueIdInThread===f);if(c&&c.length){const l=t.getDomNodePagePosition(this._commentElements[0].domNode),s=t.getDomNodePagePosition(c[0].domNode);return{thread:l,comment:s}}}updateCommentThread(f){const c=this._commentElements.length,l=f.comments?f.comments.length:0,s=[],d=[];for(let g=0;g<c;g++){const h=this._commentElements[g].comment,v=f.comments?f.comments.filter(m=>m.uniqueIdInThread===h.uniqueIdInThread):[];v.length?this._commentElements[g].update(v[0]):(d.push(g),s.push(this._commentElements[g]))}for(let g=s.length-1;g>=0;g--){const h=s[g];this._commentDisposable.get(h)?.dispose(),this._commentDisposable.delete(h),this._commentElements.splice(d[g],1),this._commentsElement.removeChild(h.domNode)}let n=null;const a=[],o=[];for(let g=l-1;g>=0;g--){const h=f.comments[g],v=this._commentElements.filter(m=>m.comment.uniqueIdInThread===h.uniqueIdInThread);if(v.length)n=v[0].domNode,a.unshift(v[0]);else{const m=this.createNewCommentNode(h);a.unshift(m),n?(this._commentsElement.insertBefore(m.domNode,n),n=m.domNode):(this._commentsElement.appendChild(m.domNode),n=m.domNode),h.mode===A.CommentMode.Editing&&(m.switchToEditMode(),o.push(m))}}if(this._commentThread=f,this._commentElements=a,o.length){const g=this._commentElements.indexOf(o[o.length-1]);this._focusedComment=g}this._updateAriaLabel(),this._setFocusedComment(this._focusedComment)}_updateAriaLabel(){this._commentThread.isDocumentCommentThread()?this._commentsElement.ariaLabel=p.localize(0,null,this._commentThread.comments?.length,this._commentThread.range.startLineNumber,this._commentThread.range.endLineNumber,this._commentThread.label):this._commentsElement.ariaLabel=p.localize(1,null,this._commentThread.comments?.length,this._commentThread.label)}_setFocusedComment(f){this._focusedComment!==void 0&&this._commentElements[this._focusedComment]?.setFocus(!1),this._commentElements.length===0||f===void 0?this._focusedComment=void 0:(this._focusedComment=Math.min(f,this._commentElements.length-1),this._commentElements[this._focusedComment].setFocus(!0))}createNewCommentNode(f){const c=this._scopedInstatiationService.createInstance(b.CommentNode,this._commentThread,f,this.owner,this.parentResourceUri,this._parentCommentThreadWidget,this._markdownRenderer);return this._register(c),this._commentDisposable.set(c,c.onDidClick(l=>this._setFocusedComment(this._commentElements.findIndex(s=>s.comment.uniqueIdInThread===l.comment.uniqueIdInThread)))),c}dispose(){super.dispose(),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this._commentDisposable.forEach(f=>f.dispose())}};u=we([F(7,E.ICommentService),F(8,C.IOpenerService),F(9,r.ILanguageService)],u),e.CommentThreadBody=u}),define(ae[977],le([1,0,10,6,2,695,275,2848,2293,633,33,80,519,37,722]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"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 R.Disposable{get commentThread(){return this._commentThread}constructor(c,l,s,d,n,a,o,g,h,v,m,w){super(),this.container=c,this._owner=l,this._parentResourceUri=s,this._contextKeyService=d,this._scopedInstatiationService=n,this._commentThread=a,this._pendingComment=o,this._markdownOptions=g,this._commentOptions=h,this._containerDelegate=v,this.commentService=m,this.contextMenuService=w,this._commentThreadDisposables=[],this._onDidResize=new p.Emitter,this.onDidResize=this._onDidResize.event,this._threadIsEmpty=b.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(c,{collapse:this.collapse.bind(this)},this._commentMenus,this._commentThread,this._contextKeyService,this._scopedInstatiationService,w),this._header.updateCommentThread(this._commentThread);const D=t.$(".body");c.appendChild(D),this._body=this._scopedInstatiationService.createInstance(E.CommentThreadBody,this._owner,this._parentResourceUri,D,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 y=this._contextKeyService.createKey("commentController",void 0),T=this.commentService.getCommentController(this._owner);T&&y.set(T.contextValue),this.currentThreadListeners()}updateCurrentThread(c,l){c||l?this.commentService.setCurrentCommentThread(this.commentThread):this.commentService.setCurrentCommentThread(void 0)}currentThreadListeners(){let c=!1,l=!1;this._register(t.addDisposableListener(this.container,t.EventType.MOUSE_ENTER,s=>{s.toElement===this.container&&(c=!0,this.updateCurrentThread(c,l))},!0)),this._register(t.addDisposableListener(this.container,t.EventType.MOUSE_LEAVE,s=>{s.fromElement===this.container&&(c=!1,this.updateCurrentThread(c,l))},!0)),this._register(t.addDisposableListener(this.container,t.EventType.FOCUS_IN,()=>{l=!0,this.updateCurrentThread(c,l)},!0)),this._register(t.addDisposableListener(this.container,t.EventType.FOCUS_OUT,()=>{l=!1,this.updateCurrentThread(c,l)},!0))}updateCommentThread(c){this._commentThread=c,(0,R.dispose)(this._commentThreadDisposables),this._commentThreadDisposables=[],this._bindCommentThreadListeners(),this._body.updateCommentThread(c),this._threadIsEmpty.set(!this._body.length),this._header.updateCommentThread(c),this._commentReply?.updateCommentThread(c),this._commentThread.contextValue?this._commentThreadContextValue.set(this._commentThread.contextValue):this._commentThreadContextValue.reset()}display(c){const l=Math.ceil(c*1.2);this._header.updateHeight(l),this._body.display(),this._commentThread.canReply&&this._createCommentForm(),this._register(this._body.onDidResize(s=>{this._refresh(s)})),this._commentThread.canReply&&this._commentReply&&this._commentReply.focusIfNeeded(),this._bindCommentThreadListeners()}_refresh(c){this._body.layout(),this._onDidResize.fire(c)}dispose(){super.dispose(),this.updateCurrentThread(!1,!1)}_bindCommentThreadListeners(){this._commentThreadDisposables.push(this._commentThread.onDidChangeCanReply(()=>{this._commentReply?this._commentReply.updateCanReply():this._commentThread.canReply&&this._createCommentForm()})),this._commentThreadDisposables.push(this._commentThread.onDidChangeComments(async c=>{await this.updateCommentThread(this._commentThread)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeLabel(c=>{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(c){return this._body.getCommentCoords(c)}getPendingComment(){return this._commentReply?this._commentReply.getPendingComment():null}getDimensions(){return this._body?.getDimensions()}layout(c){this._body.layout(),c!==void 0&&this._commentReply?.layout(c)}focusCommentEditor(){this._commentReply?.focusCommentEditor()}focus(){this._body.focus()}async submitComment(){const c=this._body.activeComment;c?c.submitComment():(this._commentReply?.getPendingComment()?.length??0)>0&&this._commentReply?.submitComment()}collapse(){this._containerDelegate.collapse()}applyTheme(c,l){const s=[];s.push(`.monaco-editor .review-widget > .body { border-top: 1px solid var(${r.commentThreadStateColorVar}) }`),s.push(`.monaco-editor .review-widget > .head { background-color: var(${r.commentThreadStateBackgroundColorVar}) }`);const d=c.getColor(S.textLinkForeground);d&&s.push(`.review-widget .body .comment-body a { color: ${d} }`);const n=c.getColor(S.textLinkActiveForeground);n&&s.push(`.review-widget .body .comment-body a:hover, a:active { color: ${n} }`);const a=c.getColor(S.focusBorder);a&&(s.push(`.review-widget .body .comment-body a:focus { outline: 1px solid ${a}; }`),s.push(`.review-widget .body .monaco-editor.focused { outline: 1px solid ${a}; }`));const o=c.getColor(S.textBlockQuoteBackground);o&&s.push(`.review-widget .body .review-comment blockquote { background: ${o}; }`);const g=c.getColor(S.textBlockQuoteBorder);g&&s.push(`.review-widget .body .review-comment blockquote { border-color: ${g}; }`);const h=c.getColor(C.PANEL_BORDER);h&&s.push(`.review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label { border-color: ${h}; }`);const v=c.getColor(S.contrastBorder);v&&(s.push(`.review-widget .body .comment-form .review-thread-reply-button { outline-color: ${v}; }`),s.push(`.review-widget .body .monaco-editor { outline: 1px solid ${v}; }`));const m=c.getColor(S.inputValidationErrorBorder);m&&s.push(`.review-widget .validation-error { border: 1px solid ${m}; }`);const w=c.getColor(S.inputValidationErrorBackground);w&&s.push(`.review-widget .validation-error { background: ${w}; }`);const D=c.getColor(S.inputValidationErrorForeground);D&&s.push(`.review-widget .body .comment-form .validation-error { color: ${D}; }`);const y="--comment-thread-editor-font-family",T="--comment-thread-editor-font-size",_="--comment-thread-editor-font-weight";this.container?.style.setProperty(y,l.fontFamily),this.container?.style.setProperty(T,`${l.fontSize}px`),this.container?.style.setProperty(_,l.fontWeight),s.push(`.review-widget .body code { font-family: var(${y}); font-weight: var(${_}); }`),this._styleElement.textContent=s.join(` `),this._commentReply?.setCommentEditorDecorations()}};i=we([F(10,k.ICommentService),F(11,u.IContextMenuService)],i),e.CommentThreadWidget=i}),define(ae[2849],le([1,0,65,6,2,13,20,92,512,7,5,12,855,275,151,977,519,174]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReviewZoneWidget=e.isMouseUpEventMatchMouseDown=e.isMouseUpEventDragFromMouseDown=e.parseMouseDownInfoFromEvent=e.getCommentThreadWidgetStateColor=void 0;function s(g,h){return(0,c.getCommentThreadStateColor)(g,h)??h.getColor(l.peekViewBorder)}e.getCommentThreadWidgetStateColor=s;function d(g){const h=g.target.range;if(!h||!g.event.leftButton||g.target.type!==4)return null;const v=g.target.detail;return v.offsetX-v.glyphMarginWidth-v.lineNumbersWidth-v.glyphMarginLeft>20?null:{lineNumber:h.startLineNumber}}e.parseMouseDownInfoFromEvent=d;function n(g,h){if(!g)return null;const{lineNumber:v}=g;return h.target.range?v:null}e.isMouseUpEventDragFromMouseDown=n;function a(g,h){if(!g)return null;const{lineNumber:v}=g,m=h.target.range;return!m||m.startLineNumber!==v||h.target.type!==4?null:v}e.isMouseUpEventMatchMouseDown=a;let o=class extends I.ZoneWidget{get owner(){return this._owner}get commentThread(){return this._commentThread}constructor(h,v,m,w,D,y,T,_){super(h,{keepEditorSelection:!0}),this._owner=v,this._commentThread=m,this._pendingComment=w,this.themeService=y,this.commentService=T,this._onDidClose=new p.Emitter,this._onDidCreateThread=new p.Emitter,this._globalToDispose=new R.DisposableStore,this._commentThreadDisposables=[],this._contextKeyService=_.createScoped(this.domNode),this._scopedInstantiationService=D.createChild(new i.ServiceCollection([b.IContextKeyService,this._contextKeyService]));const L=this.commentService.getCommentController(this._owner);L&&(this._commentOptions=L.options),this._initialCollapsibleState=m.initialCollapsibleState,this._isExpanded=m.initialCollapsibleState===E.CommentThreadCollapsibleState.Expanded,this._commentThreadDisposables=[],this.create(),this._globalToDispose.add(this.themeService.onDidColorThemeChange(this._applyTheme,this)),this._globalToDispose.add(this.editor.onDidChangeConfiguration(M=>{M.hasChanged(45)&&this._applyTheme(this.themeService.getColorTheme())})),this._applyTheme(this.themeService.getColorTheme())}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,v=!1){if(this._isExpanded||this.show({lineNumber:this._commentThread.range.endLineNumber,column:1},2),h!==void 0){const m=this.editor.getLayoutInfo().height,w=this._commentThreadWidget.getCommentCoords(h);if(w){const D=w.thread,y=w.comment;this.editor.setScrollTop(this.editor.getTopForLineNumber(this._commentThread.range.startLineNumber)-m/2+y.top-D.top);return}}this.editor.revealRangeInCenter(this._commentThread.range),v&&this._commentThreadWidget.focus()}getPendingComment(){return this._commentThreadWidget.getPendingComment()}_fillContainer(h){this.setCssClass("review-widget"),this._commentThreadWidget=this._scopedInstantiationService.createInstance(f.CommentThreadWidget,h,this._owner,this.editor.getModel().uri,this._contextKeyService,this._scopedInstantiationService,this._commentThread,this._pendingComment,{editor:this.editor,codeBlockFontSize:""},this._commentOptions,{actionRunner:()=>{if(!this._commentThread.comments||!this._commentThread.comments.length){const v=this.getPosition();if(v){let m;const w=this._commentThread.range;if(v.lineNumber!==w.endLineNumber){const D=v.lineNumber-this._commentThread.range.endLineNumber;m=new k.Range(w.startLineNumber+D,w.startColumn,w.endLineNumber+D,w.endColumn)}else m=new k.Range(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn);this.commentService.updateCommentThreadTemplate(this.owner,this._commentThread.commentThreadHandle,m)}}},collapse:()=>{this.collapse()}}),this._disposables.add(this._commentThreadWidget)}deleteCommentThread(){this.dispose(),this.commentService.disposeCommentThread(this.owner,this._commentThread.threadId)}collapse(){return this._commentThread.collapsibleState=E.CommentThreadCollapsibleState.Collapsed,this._commentThread.comments&&this._commentThread.comments.length===0?(this.deleteCommentThread(),Promise.resolve()):(this.hide(),Promise.resolve())}expand(){this._commentThread.collapsibleState=E.CommentThreadCollapsibleState.Expanded;const h=this._commentThread.range.endLineNumber;return this.show({lineNumber:h,column:1},2),Promise.resolve()}getGlyphPosition(){return this._commentGlyph?this._commentGlyph.getPosition().position.lineNumber:0}toggleExpand(h){this._isExpanded?(this._commentThread.collapsibleState=E.CommentThreadCollapsibleState.Collapsed,this.hide(),(!this._commentThread.comments||!this._commentThread.comments.length)&&this.deleteCommentThread()):(this._commentThread.collapsibleState=E.CommentThreadCollapsibleState.Expanded,this.show({lineNumber:h,column:1},2))}async update(h){this._commentThread!==h&&(this._commentThreadDisposables.forEach(w=>w.dispose()),this._commentThread=h,this._commentThreadDisposables=[],this.bindCommentThreadListeners()),this._commentThreadWidget.updateCommentThread(h);const v=this._commentThread.range.endLineNumber;let m=!1;this._commentGlyph&&this._commentGlyph.getPosition().position.lineNumber!==v&&(m=!0,this._commentGlyph.setLineNumber(v)),m&&this._isExpanded&&this.show({lineNumber:v,column:1},2),this._commentThread.collapsibleState===E.CommentThreadCollapsibleState.Expanded?this.show({lineNumber:v,column:1},2):this.hide()}_onWidth(h){this._commentThreadWidget.layout(h)}_doLayout(h,v){this._commentThreadWidget.layout(v)}display(h){this._commentGlyph=new r.CommentGlyphWidget(this.editor,h),this._commentThreadWidget.display(this.editor.getOption(60)),this._disposables.add(this._commentThreadWidget.onDidResize(v=>{this._refresh(v)})),this._commentThread.collapsibleState===E.CommentThreadCollapsibleState.Expanded&&this.show({lineNumber:h,column:1},2),this._commentThread.canReply&&this._commentThread.isTemplate&&(!this._commentThread.comments||this._commentThread.comments.length===0)&&this.reveal(),this.bindCommentThreadListeners()}bindCommentThreadListeners(){if(this._commentThreadDisposables.push(this._commentThread.onDidChangeComments(async h=>{await this.update(this._commentThread)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeRange(h=>{const v=this._commentThread.range.startLineNumber;let m=!1;this._commentGlyph&&this._commentGlyph.getPosition().position.lineNumber!==v&&(m=!0,this._commentGlyph.setLineNumber(v)),m&&this._isExpanded&&this.show({lineNumber:v,column:1},2)})),this._commentThreadDisposables.push(this._commentThread.onDidChangeCollapsibleState(h=>{if(h===E.CommentThreadCollapsibleState.Expanded&&!this._isExpanded){const v=this._commentThread.range.startLineNumber;this.show({lineNumber:v,column:1},2);return}if(h===E.CommentThreadCollapsibleState.Collapsed&&this._isExpanded){this.hide();return}})),this._initialCollapsibleState===void 0){const h=this._commentThread.onDidChangeInitialCollapsibleState(v=>{this._initialCollapsibleState=v,this._commentThread.collapsibleState=v,h.dispose()});this._commentThreadDisposables.push(h)}this._commentThreadDisposables.push(this._commentThread.onDidChangeState(()=>{const h=s(this._commentThread.state,this.themeService.getColorTheme())||t.Color.transparent;this.style({frameColor:h,arrowColor:h}),this.container?.style.setProperty(c.commentThreadStateColorVar,`${h}`),this.container?.style.setProperty(c.commentThreadStateBackgroundColorVar,`${h.transparent(.1)}`)}))}async submitComment(){this._commentThreadWidget.submitComment()}_refresh(h){if(this._isExpanded&&h){this._commentThreadWidget.layout();const v=Math.ceil(this.editor.getOption(60)*1.2),m=this.editor.getOption(60),w=Math.round(m/3),D=Math.round(m/9)*2,y=Math.ceil((v+h.height+w+D+8)/m);if(this._viewZone?.heightInLines===y)return;const T=this.getPosition();this._viewZone&&T&&T.lineNumber!==this._viewZone.afterLineNumber&&(this._viewZone.afterLineNumber=T.lineNumber),(!this._commentThread.comments||!this._commentThread.comments.length)&&this._commentThreadWidget.focusCommentEditor(),this._relayout(y)}}_applyTheme(h){const v=s(this._commentThread.state,this.themeService.getColorTheme())||t.Color.transparent;this.style({arrowColor:v,frameColor:v});const m=this.editor.getOption(45);this._commentThreadWidget.applyTheme(h,m)}show(h,v){this._isExpanded=!0,super.show(h,v),this._commentThread.collapsibleState=E.CommentThreadCollapsibleState.Expanded,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)}};o=we([F(4,S.IInstantiationService),F(5,C.IThemeService),F(6,u.ICommentService),F(7,b.IContextKeyService)],o),e.ReviewZoneWidget=o}),define(ae[978],le([1,0,10,36,16,11,21,2,105,40,75,20,94,92,174,1580,31,37,5,98,48,33,12,80,855,275,2849,694,24,226,45,520,8,859,695,6,15,7,59,2294,519,13,722]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H){"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 W{constructor(te,Z){this.afterLineNumber=te,this.callback=Z,this.domNode=(0,t.$)(".review-viewzone")}onDomNodeTop(te){this.callback(te)}}e.ReviewViewZone=W;class U{get id(){return this._decorationId}set id(te){this._decorationId=te}get range(){return{startLineNumber:this._startLineNumber,startColumn:1,endLineNumber:this._endLineNumber,endColumn:1}}constructor(te,Z,ne,ce,de,he,pe,me=!1){this._editor=te,this._ownerId=Z,this._extensionId=ne,this._label=ce,this._range=de,this.options=he,this.commentingRangesInfo=pe,this.isHover=me,this._startLineNumber=de.startLineNumber,this._endLineNumber=de.endLineNumber}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 ${constructor(){this.commentingRangeDecorations=[],this.decorationIds=[],this._lastHover=-1,this._onDidChangeDecorationsCount=new N.Emitter,this.onDidChangeDecorationsCount=this._onDidChangeDecorationsCount.event;const te={description:$.description,isWholeLine:!0,linesDecorationsClassName:"comment-range-glyph comment-diff-added"};this.decorationOptions=r.ModelDecorationOptions.createDynamic(te);const Z={description:$.description,isWholeLine:!0,linesDecorationsClassName:"comment-range-glyph line-hover"};this.hoverDecorationOptions=r.ModelDecorationOptions.createDynamic(Z);const ne={description:$.description,isWholeLine:!0,linesDecorationsClassName:"comment-range-glyph multiline-add"};this.multilineDecorationOptions=r.ModelDecorationOptions.createDynamic(ne)}updateHover(te){this._editor&&this._infos&&te!==this._lastHover&&this._doUpdate(this._editor,this._infos,te),this._lastHover=te??-1}updateSelection(te,Z=new C.Range(0,0,0,0)){this._lastSelection=Z.isEmpty()?void 0:Z,this._lastSelectionCursor=Z.isEmpty()?void 0:te,this._editor&&this._infos&&this._doUpdate(this._editor,this._infos,te,Z)}update(te,Z,ne,ce){te&&(this._editor=te,this._infos=Z,this._doUpdate(te,Z,ne,ce))}_lineHasThread(te,Z){return te.getDecorationsInRange(Z)?.find(ne=>ne.options.description===h.CommentGlyphWidget.description)}_doUpdate(te,Z,ne=-1,ce=this._lastSelection){if(!te.getModel())return;ne=this._lastSelectionCursor??ne;const he=[];for(const me of Z)me.commentingRanges.ranges.forEach(Se=>{const Ie=new C.Range(Se.startLineNumber,Se.startColumn,Se.endLineNumber,Se.endColumn);let ve=ce?Ie.intersectRanges(ce):void 0;if(ce&&ne>=0&&ve&&!(ve.startLineNumber===ve.endLineNumber&&ne===ve.startLineNumber)){let be;ne<=ve.startLineNumber?(be=ve.collapseToStart(),ve=new C.Range(ve.startLineNumber+1,1,ve.endLineNumber,1)):(be=new C.Range(ve.endLineNumber,1,ve.endLineNumber,1),ve=new C.Range(ve.startLineNumber,1,ve.endLineNumber-1,1)),he.push(new U(te,me.owner,me.extensionId,me.label,ve,this.multilineDecorationOptions,me.commentingRanges,!0)),this._lineHasThread(te,be)||he.push(new U(te,me.owner,me.extensionId,me.label,be,this.hoverDecorationOptions,me.commentingRanges,!0));const ge=Math.min(be.startLineNumber,ve.startLineNumber)-1,ue=Ie.startLineNumber<=ge,Ce=Math.max(be.endLineNumber,ve.endLineNumber)+1,De=Ie.endLineNumber>=Ce;if(ue){const Ae=new C.Range(Se.startLineNumber,1,ge,1);he.push(new U(te,me.owner,me.extensionId,me.label,Ae,this.decorationOptions,me.commentingRanges,!0))}if(De){const Ae=new C.Range(Ce,1,Se.endLineNumber,1);he.push(new U(te,me.owner,me.extensionId,me.label,Ae,this.decorationOptions,me.commentingRanges,!0))}}else if(Ie.startLineNumber<=ne&&ne<=Ie.endLineNumber){if(Ie.startLineNumber<ne){const ge=new C.Range(Se.startLineNumber,1,ne-1,1);he.push(new U(te,me.owner,me.extensionId,me.label,ge,this.decorationOptions,me.commentingRanges,!0))}const be=new C.Range(ne,1,ne,1);if(this._lineHasThread(te,be)||he.push(new U(te,me.owner,me.extensionId,me.label,be,this.hoverDecorationOptions,me.commentingRanges,!0)),ne<Ie.endLineNumber){const ge=new C.Range(ne+1,1,Se.endLineNumber,1);he.push(new U(te,me.owner,me.extensionId,me.label,ge,this.decorationOptions,me.commentingRanges,!0))}}else he.push(new U(te,me.owner,me.extensionId,me.label,Se,this.decorationOptions,me.commentingRanges))});te.changeDecorations(me=>{this.decorationIds=me.deltaDecorations(this.decorationIds,he),he.forEach((Se,Ie)=>Se.id=this.decorationIds[Ie])});const pe=this.commentingRangeDecorations.length-he.length;this.commentingRangeDecorations=he,pe&&this._onDidChangeDecorationsCount.fire(this.commentingRangeDecorations.length)}getMatchedCommentAction(te){const Z=new Map;for(const ne of this.commentingRangeDecorations){const ce=ne.getActiveRange();if(ce&&(ce.startLineNumber<=te.startLineNumber||te.endLineNumber<=ce.endLineNumber)){const de=ne.getCommentAction(),he=Z.get(de.ownerId);if(he?.action.commentingRangesInfo===de.commentingRangesInfo){const pe=new C.Range(ce.startLineNumber<he.range.startLineNumber?ce.startLineNumber:he.range.startLineNumber,ce.startColumn<he.range.startColumn?ce.startColumn:he.range.startColumn,ce.endLineNumber>he.range.endLineNumber?ce.endLineNumber:he.range.endLineNumber,ce.endColumn>he.range.endColumn?ce.endColumn:he.range.endColumn);Z.set(de.ownerId,{range:pe,action:de})}else Z.set(de.ownerId,{range:ce,action:de})}}return Array.from(Z.values()).filter(ne=>ne.range.startLineNumber<=te.startLineNumber&&te.endLineNumber<=ne.range.endLineNumber).map(ne=>ne.action)}dispose(){this.commentingRangeDecorations=[]}}$.description="commenting-range-decorator";const q=new B.RawContextKey("activeCursorHasCommentingRange",!1,{description:f.localize(0,null),type:"boolean"}),X=new B.RawContextKey("workspaceHasCommenting",!1,{description:f.localize(1,null),type:"boolean"});let G=class{constructor(te,Z,ne,ce,de,he,pe,me,Se){this.commentService=Z,this.instantiationService=ne,this.codeEditorService=ce,this.contextMenuService=de,this.quickInputService=he,this.viewsService=pe,this.configurationService=me,this.contextKeyService=Se,this.globalToDispose=new E.DisposableStore,this.localToDispose=new E.DisposableStore,this.mouseDownInfo=null,this._commentingRangeSpaceReserved=!1,this._emptyThreadsToAddQueue=[],this._editorDisposables=[],this._commentInfos=[],this._commentWidgets=[],this._pendingCommentCache={},this._computePromise=null,this._activeCursorHasCommentingRange=q.bindTo(Se),this._workspaceHasCommenting=X.bindTo(Se),!(te instanceof y.EmbeddedCodeEditorWidget)&&(this.editor=te,this._commentingRangeDecorator=new $,this.globalToDispose.add(this._commentingRangeDecorator.onDidChangeDecorationsCount(Ie=>{Ie===0?this.clearEditorListeners():this._editorDisposables.length===0&&this.registerEditorListeners()})),this.globalToDispose.add(this._commentThreadRangeDecorator=new z.CommentThreadRangeDecorator(this.commentService)),this.globalToDispose.add(this.commentService.onDidDeleteDataProvider(Ie=>{delete this._pendingCommentCache[Ie],this.beginCompute()})),this.globalToDispose.add(this.commentService.onDidSetDataProvider(Ie=>this.beginCompute())),this.globalToDispose.add(this.commentService.onDidUpdateCommentingRanges(Ie=>this.beginCompute())),this.globalToDispose.add(this.commentService.onDidSetResourceCommentInfos(Ie=>{const ve=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;ve&&ve.toString()===Ie.resource.toString()&&this.setComments(Ie.commentInfos.filter(be=>be!==null))})),this.globalToDispose.add(this.commentService.onDidSetAllCommentThreads(Ie=>{Ie.commentThreads.length>0&&this._workspaceHasCommenting.set(!0)})),this.globalToDispose.add(this.commentService.onDidChangeCommentingEnabled(Ie=>{Ie?(this.registerEditorListeners(),this.beginCompute()):(this.clearEditorListeners(),this._commentingRangeDecorator.update(this.editor,[]),this._commentThreadRangeDecorator.update(this.editor,[]),(0,E.dispose)(this._commentWidgets),this._commentWidgets=[])})),this.globalToDispose.add(this.editor.onDidChangeModel(Ie=>this.onModelChanged(Ie))),this.codeEditorService.registerDecorationType("comment-controller",O.COMMENTEDITOR_DECORATION_KEY,{}),this.beginCompute())}registerEditorListeners(){this._editorDisposables=[],this.editor&&(this._editorDisposables.push(this.editor.onMouseMove(te=>this.onEditorMouseMove(te))),this._editorDisposables.push(this.editor.onDidChangeCursorPosition(te=>this.onEditorChangeCursorPosition(te.position))),this._editorDisposables.push(this.editor.onDidFocusEditorWidget(()=>this.onEditorChangeCursorPosition((0,H.withUndefinedAsNull)(this.editor?.getPosition())))),this._editorDisposables.push(this.editor.onDidChangeCursorSelection(te=>this.onEditorChangeCursorSelection(te))),this._editorDisposables.push(this.editor.onDidBlurEditorWidget(()=>this.onEditorChangeCursorSelection())))}clearEditorListeners(){(0,E.dispose)(this._editorDisposables),this._editorDisposables=[]}onEditorMouseMove(te){const Z=te.target.position?.lineNumber;te.event.leftButton.valueOf()&&Z&&this.mouseDownInfo?this._commentingRangeDecorator.updateSelection(Z,new C.Range(this.mouseDownInfo.lineNumber,1,Z,1)):this._commentingRangeDecorator.updateHover(Z)}onEditorChangeCursorSelection(te){const Z=this.editor?.getPosition()?.lineNumber;Z&&this._commentingRangeDecorator.updateSelection(Z,te?.selection)}onEditorChangeCursorPosition(te){const Z=te?this.editor?.getDecorationsInRange(C.Range.fromPositions(te,{column:-1,lineNumber:te.lineNumber})):void 0;let ne=!1;if(Z)for(const ce of Z)if(ce.options.description===h.CommentGlyphWidget.description){ne=!1;break}else ce.options.description===$.description&&(ne=!0);this._activeCursorHasCommentingRange.set(ne)}beginCompute(){return this._computePromise=(0,A.createCancelablePromise)(te=>{const Z=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;return Z?this.commentService.getDocumentComments(Z):Promise.resolve([])}),this._computePromise.then(te=>{this.setComments((0,R.coalesce)(te)),this._computePromise=null},te=>console.log(te))}beginComputeCommentingRanges(){this._computeCommentingRangeScheduler&&(this._computeCommentingRangePromise&&(this._computeCommentingRangePromise.cancel(),this._computeCommentingRangePromise=null),this._computeCommentingRangeScheduler.trigger(()=>{const te=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;return te?this.commentService.getDocumentComments(te):Promise.resolve([])}).then(te=>{if(this.commentService.isCommentingEnabled){const Z=(0,R.coalesce)(te);this._commentingRangeDecorator.update(this.editor,Z,this.editor?.getPosition()?.lineNumber,(0,H.withNullAsUndefined)(this.editor?.getSelection()))}},te=>((0,k.onUnexpectedError)(te),null)))}static get(te){return te.getContribution(e.ID)}revealCommentThread(te,Z,ne){const ce=this._commentWidgets.filter(de=>de.commentThread.threadId===te);ce.length===1?ce[0].reveal(Z):ne&&(this._computePromise?this._computePromise.then(de=>{this.revealCommentThread(te,Z,!1)}):this.beginCompute().then(de=>{this.revealCommentThread(te,Z,!1)}))}collapseAll(){for(const te of this._commentWidgets)te.collapse()}expandAll(){for(const te of this._commentWidgets)te.expand()}nextCommentThread(){this._findNearestCommentThread()}_findNearestCommentThread(te){if(!this._commentWidgets.length||!this.editor?.hasModel())return;const Z=this.editor.getSelection().getEndPosition(),ne=this._commentWidgets.sort((he,pe)=>{if(te){const me=he;he=pe,pe=me}return he.commentThread.range.startLineNumber<pe.commentThread.range.startLineNumber?-1:he.commentThread.range.startLineNumber>pe.commentThread.range.startLineNumber?1:he.commentThread.range.startColumn<pe.commentThread.range.startColumn?-1:he.commentThread.range.startColumn>pe.commentThread.range.startColumn?1:0}),ce=(0,R.findFirstInSorted)(ne,he=>{const pe=te?Z.lineNumber:he.commentThread.range.startLineNumber,me=te?he.commentThread.range.startLineNumber:Z.lineNumber,Se=te?Z.column:he.commentThread.range.startColumn,Ie=te?he.commentThread.range.startColumn:Z.column;return pe>me?!0:pe<me?!1:Se>Ie});let de;ce===this._commentWidgets.length?de=this._commentWidgets[0]:de=ne[ce],this.editor.setSelection(de.commentThread.range),de.reveal(void 0,!0)}previousCommentThread(){this._findNearestCommentThread(!0)}dispose(){this.globalToDispose.dispose(),this.localToDispose.dispose(),(0,E.dispose)(this._editorDisposables),(0,E.dispose)(this._commentWidgets),this.editor=null}onModelChanged(te){this.localToDispose.clear(),this.removeCommentWidgetsAndStoreCache(),this.editor&&(this.localToDispose.add(this.editor.onMouseDown(Z=>this.onEditorMouseDown(Z))),this.localToDispose.add(this.editor.onMouseUp(Z=>this.onEditorMouseUp(Z))),this._editorDisposables.length&&(this.clearEditorListeners(),this.registerEditorListeners()),this._computeCommentingRangeScheduler=new A.Delayer(200),this.localToDispose.add({dispose:()=>{this._computeCommentingRangeScheduler?.cancel(),this._computeCommentingRangeScheduler=null}}),this.localToDispose.add(this.editor.onDidChangeModelContent(async()=>{this.beginComputeCommentingRanges()})),this.localToDispose.add(this.commentService.onDidUpdateCommentThreads(async Z=>{const ne=this.editor&&this.editor.hasModel()&&this.editor.getModel().uri;if(!ne||!this.commentService.isCommentingEnabled)return;this._computePromise&&await this._computePromise;const ce=this._commentInfos.filter(me=>me.owner===Z.owner);if(!ce||!ce.length)return;const de=Z.added.filter(me=>me.resource&&me.resource.toString()===ne.toString()),he=Z.removed.filter(me=>me.resource&&me.resource.toString()===ne.toString()),pe=Z.changed.filter(me=>me.resource&&me.resource.toString()===ne.toString());he.forEach(me=>{const Se=this._commentWidgets.filter(ve=>ve.owner===Z.owner&&ve.commentThread.threadId===me.threadId&&ve.commentThread.threadId!=="");if(Se.length){const ve=Se[0],be=this._commentWidgets.indexOf(ve);this._commentWidgets.splice(be,1),ve.dispose()}const Ie=this._commentInfos.filter(ve=>ve.owner===Z.owner)[0].threads;for(let ve=0;ve<Ie.length;ve++)Ie[ve]===me&&(Ie.splice(ve,1),ve--)}),pe.forEach(me=>{const Se=this._commentWidgets.filter(Ie=>Ie.owner===Z.owner&&Ie.commentThread.threadId===me.threadId);Se.length&&(Se[0].update(me),this.openCommentsView(me))}),de.forEach(me=>{if(this._commentWidgets.filter(be=>be.owner===Z.owner&&be.commentThread.threadId===me.threadId).length)return;const Ie=this._commentWidgets.filter(be=>be.owner===Z.owner&&be.commentThread.commentThreadHandle===-1&&C.Range.equalsRange(be.commentThread.range,me.range));if(Ie.length){Ie[0].update(me);return}const ve=this._pendingCommentCache[Z.owner]&&this._pendingCommentCache[Z.owner][me.threadId];this.displayCommentThread(Z.owner,me,ve),this._commentInfos.filter(be=>be.owner===Z.owner)[0].threads.push(me),this.tryUpdateReservedSpace()}),this._commentThreadRangeDecorator.update(this.editor,ce)})),this.beginCompute())}async openCommentsView(te){if(te.comments&&te.comments.length>0){if(this.configurationService.getValue(M.COMMENTS_SECTION).openView==="file")return this.viewsService.openView(_.COMMENTS_VIEW_ID);if(this.configurationService.getValue(M.COMMENTS_SECTION).openView==="firstFile"&&!this.viewsService.getViewWithId(_.COMMENTS_VIEW_ID)?.hasRendered)return this.viewsService.openView(_.COMMENTS_VIEW_ID)}}displayCommentThread(te,Z,ne){if(!this.editor)return;const ce=this.instantiationService.createInstance(m.ReviewZoneWidget,this.editor,te,Z,ne);ce.display(Z.range.endLineNumber),this._commentWidgets.push(ce),this.openCommentsView(Z)}onEditorMouseDown(te){this.mouseDownInfo=(0,m.parseMouseDownInfoFromEvent)(te)}onEditorMouseUp(te){const Z=(0,m.isMouseUpEventDragFromMouseDown)(this.mouseDownInfo,te);if(this.mouseDownInfo=null,!this.editor||Z===null||!te.target.element)return;const ne=te.target.element.className.indexOf("comment-range-glyph")>=0,ce=te.target.position.lineNumber;let de,he;Z!==ce?Z>ce?he=new C.Range(Z,this.editor.getModel().getLineLength(Z)+1,ce,1):he=new C.Range(Z,1,ce,this.editor.getModel().getLineLength(ce)+1):ne&&(he=this.editor.getSelection()),he&&he.startLineNumber<=ce&&ce<=he.endLineNumber?(de=he,this.editor.setSelection(new C.Range(he.endLineNumber,1,he.endLineNumber,1))):ne&&(de=new C.Range(ce,1,ce,1)),de&&this.addOrToggleCommentAtLine(de,te)}async addOrToggleCommentAtLine(te,Z){if(this._addInProgress)this._emptyThreadsToAddQueue.push([te,Z]);else{this._addInProgress=!0;const ne=this._commentWidgets.filter(ce=>ce.getGlyphPosition()===te.endLineNumber);if(ne.length){ne.forEach(ce=>ce.toggleExpand(te.endLineNumber)),this.processNextThreadToAdd();return}else this.addCommentAtLine(te,Z)}}processNextThreadToAdd(){this._addInProgress=!1;const te=this._emptyThreadsToAddQueue.shift();te&&this.addOrToggleCommentAtLine(te[0],te[1])}addCommentAtLine(te,Z){const ne=this._commentingRangeDecorator.getMatchedCommentAction(te);if(!ne.length||!this.editor?.hasModel())return Promise.resolve();if(ne.length>1)if(Z){const ce={x:Z.event.posx,y:Z.event.posy};return this.contextMenuService.showContextMenu({getAnchor:()=>ce,getActions:()=>this.getContextMenuActions(ne,te),getActionsContext:()=>ne.length?ne[0]:void 0,onHide:()=>{this._addInProgress=!1}}),Promise.resolve()}else{const ce=this.getCommentProvidersQuickPicks(ne);return this.quickInputService.pick(ce,{placeHolder:f.localize(2,null),matchOnDescription:!0}).then(de=>{if(!de)return;const he=ne.filter(pe=>pe.ownerId===de.id);if(he.length){const{ownerId:pe}=he[0];this.addCommentAtLine2(te,pe)}}).then(()=>{this._addInProgress=!1})}else{const{ownerId:ce}=ne[0];this.addCommentAtLine2(te,ce)}return Promise.resolve()}getCommentProvidersQuickPicks(te){return te.map(ne=>{const{ownerId:ce,extensionId:de,label:he}=ne;return{label:he||de,id:ce}})}getContextMenuActions(te,Z){const ne=[];return te.forEach(ce=>{const{ownerId:de,extensionId:he,label:pe}=ce;ne.push(new p.Action("addCommentThread",`${pe||he}`,void 0,!0,()=>(this.addCommentAtLine2(Z,de),Promise.resolve())))}),ne}addCommentAtLine2(te,Z){!this.editor||(this.commentService.createCommentThreadTemplate(Z,this.editor.getModel().uri,te),this.processNextThreadToAdd())}tryUpdateReservedSpace(){if(!this.editor)return;let te=this.editor.getLayoutInfo().decorationsWidth;if(this._commentInfos.some(ne=>Boolean(ne.commentingRanges&&(Array.isArray(ne.commentingRanges)?ne.commentingRanges:ne.commentingRanges.ranges).length)||ne.threads.length>0)&&(this._workspaceHasCommenting.set(!0),!this._commentingRangeSpaceReserved)){this._commentingRangeSpaceReserved=!0;let ne=[];const ce=this.editor.getRawOptions().extraEditorClassName;ce&&(ne=ce.split(" "));const de=this.editor.getOptions();de.get(38)&&de.get(100)!=="never"&&(te-=27),te+=24,ne.push("inline-comment"),this.editor.updateOptions({extraEditorClassName:ne.join(" "),lineDecorationsWidth:te});const he=this.editor.getLayoutInfo();this.editor.layout({width:he.width,height:he.height})}}setComments(te){!this.editor||!this.commentService.isCommentingEnabled||(this._commentInfos=te,this.tryUpdateReservedSpace(),this.removeCommentWidgetsAndStoreCache(),this._commentInfos.forEach(Z=>{Z.threads.length>0&&this._workspaceHasCommenting.set(!0);const ne=this._pendingCommentCache[Z.owner];Z.threads=Z.threads.filter(ce=>!ce.isDisposed),Z.threads.forEach(ce=>{let de=null;ne&&(de=ne[ce.threadId]),de&&(ce.collapsibleState=u.CommentThreadCollapsibleState.Expanded),this.displayCommentThread(Z.owner,ce,de)})}),this._commentingRangeDecorator.update(this.editor,this._commentInfos),this._commentThreadRangeDecorator.update(this.editor,this._commentInfos))}closeWidget(){this._commentWidgets?.forEach(te=>te.hide()),this.editor&&(this.editor.focus(),this.editor.revealRangeInCenter(this.editor.getSelection()))}removeCommentWidgetsAndStoreCache(){this._commentWidgets&&this._commentWidgets.forEach(te=>{const Z=te.getPendingComment(),ne=this._pendingCommentCache[te.owner];let ce;if(te.commentThread.comments&&te.commentThread.comments.length){const de=te.commentThread.comments[te.commentThread.comments.length-1];typeof de.body=="string"?ce=de.body:ce=de.body.value}Z&&Z!==ce?(ne||(this._pendingCommentCache[te.owner]={}),this._pendingCommentCache[te.owner][te.commentThread.threadId]=Z):ne&&delete ne[te.commentThread.threadId],te.dispose()}),this._commentWidgets=[]}};G=we([F(1,v.ICommentService),F(2,s.IInstantiationService),F(3,S.ICodeEditorService),F(4,l.IContextMenuService),F(5,n.IQuickInputService),F(6,T.IViewsService),F(7,L.IConfigurationService),F(8,B.IContextKeyService)],G),e.CommentController=G;class Q extends b.EditorAction{constructor(){super({id:"editor.action.nextCommentThreadAction",label:f.localize(3,null),alias:"Go to Next Comment Thread",precondition:void 0,kbOpts:{kbExpr:V.EditorContextKeys.focus,primary:579,weight:100}})}run(te,Z){G.get(Z)?.nextCommentThread()}}e.NextCommentThreadAction=Q;class j extends b.EditorAction{constructor(){super({id:"editor.action.previousCommentThreadAction",label:f.localize(4,null),alias:"Go to Previous Comment Thread",precondition:void 0,kbOpts:{kbExpr:V.EditorContextKeys.focus,primary:1603,weight:100}})}run(te,Z){G.get(Z)?.previousCommentThread()}}e.PreviousCommentThreadAction=j,(0,b.registerEditorContribution)(e.ID,G),(0,b.registerEditorAction)(Q),(0,b.registerEditorAction)(j);const K="workbench.action.toggleCommenting";c.CommandsRegistry.registerCommand({id:K,handler:se=>{const te=se.get(v.ICommentService),Z=te.isCommentingEnabled;te.enableCommenting(!Z)}}),P.MenuRegistry.appendMenuItem(P.MenuId.CommandPalette,{command:{id:K,title:f.localize(5,null),category:"Comments"},when:X});const Y="workbench.action.addComment";c.CommandsRegistry.registerCommand({id:Y,handler:se=>{const te=re(se);if(!te)return Promise.resolve();const Z=G.get(te);if(!Z)return Promise.resolve();const ne=te.getSelection();return Z.addOrToggleCommentAtLine(ne,void 0)}}),P.MenuRegistry.appendMenuItem(P.MenuId.CommandPalette,{command:{id:Y,title:f.localize(6,null),category:"Comments"},when:q});const ee="workbench.action.collapseAllComments";c.CommandsRegistry.registerCommand({id:ee,handler:se=>oe(se)?.collapseAll()}),P.MenuRegistry.appendMenuItem(P.MenuId.CommandPalette,{command:{id:ee,title:f.localize(7,null),category:"Comments"},when:X});const ie="workbench.action.expandAllComments";c.CommandsRegistry.registerCommand({id:ie,handler:se=>oe(se)?.expandAll()}),P.MenuRegistry.appendMenuItem(P.MenuId.CommandPalette,{command:{id:ie,title:f.localize(8,null),category:"Comments"},when:X}),d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.submitComment",weight:100,primary:2051,when:w.ctxCommentEditorFocused,handler:(se,te)=>{const Z=se.get(S.ICodeEditorService).getFocusedCodeEditor();Z instanceof w.SimpleCommentEditor&&Z.getParentThread().submitComment()}}),d.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"workbench.action.hideComment",weight:100,primary:9,secondary:[1033],when:w.ctxCommentEditorFocused,handler:(se,te)=>{const Z=se.get(S.ICodeEditorService).getFocusedCodeEditor();Z instanceof w.SimpleCommentEditor&&Z.getParentThread().collapse()}});function re(se){let te=se.get(D.IEditorService).activeTextEditorControl;return(0,I.isDiffEditor)(te)&&(te.getOriginalEditor().hasTextFocus()?te=te.getOriginalEditor():te=te.getModifiedEditor()),!(0,I.isCodeEditor)(te)||!te.hasModel()?null:te}e.getActiveEditor=re;function oe(se){const te=re(se);if(!te)return;const Z=G.get(te);if(!!Z)return Z}(0,o.registerThemingParticipant)((se,te)=>{const Z=se.getColor(i.peekViewResultsBackground);Z&&te.addRule(`.monaco-editor .review-widget,.monaco-editor .review-widget { background-color: ${Z};}`);const ne=se.getColor(i.peekViewTitleBackground);ne&&te.addRule(`.review-widget .body .comment-form .review-thread-reply-button { background-color: ${ne}}`);const ce=se.getColor(a.editorForeground);ce&&te.addRule(`.review-widget .body .monaco-editor { color: ${ce}}.review-widget .body .comment-form .review-thread-reply-button { color: ${ce}; font-size: inherit}`);const de=se.getColor(i.peekViewResultsSelectionBackground);de&&te.addRule(`@keyframes monaco-review-widget-focus { 0% { background: ${de}; } 100% { background: transparent; }}.review-widget .body .review-comment.focus { animation: monaco-review-widget-focus 3s ease 0s;}`);const he=se.getColor(h.overviewRulerCommentingRangeForeground);he&&te.addRule(` .monaco-editor .comment-diff-added, .monaco-editor .comment-range-glyph.multiline-add { border-left-color: ${he}; } .monaco-editor .comment-diff-added:before, .monaco-editor .comment-range-glyph.line-hover:before { background: ${he}; } .monaco-editor .comment-thread:before { background: ${he}; } `);const pe=se.getColor(g.STATUS_BAR_ITEM_HOVER_BACKGROUND);pe&&te.addRule(`.review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label.active:hover { background-color: ${pe};}`);const me=se.getColor(g.STATUS_BAR_ITEM_ACTIVE_BACKGROUND);me&&te.addRule(`.review-widget .body .review-comment .review-comment-contents .comment-reactions .action-item a.action-label:active { background-color: ${me}; border: 1px solid transparent;}`);const Se=se.getColor(x.commentThreadRangeBackground);Se&&te.addRule(`.monaco-editor .comment-thread-range { background-color: ${Se};}`);const Ie=se.getColor(x.commentThreadRangeBorder);Ie&&te.addRule(`.monaco-editor .comment-thread-range { border-color: ${Ie}; border-width: 1px; border-style: solid; box-sizing: border-box; }`);const ve=se.getColor(x.commentThreadRangeActiveBackground);ve&&te.addRule(`.monaco-editor .comment-thread-range-current { background-color: ${ve};}`);const be=se.getColor(x.commentThreadRangeActiveBorder);be&&te.addRule(`.monaco-editor .comment-thread-range-current { border-color: ${be}; border-width: 1px; border-style: solid; box-sizing: border-box; }`)})}),define(ae[2850],le([1,0,1579,35,17,275,55,978]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),R.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","firstFile"],enumDescriptions:[t.localize(3,null),t.localize(4,null),t.localize(5,null)],default:"firstFile",description:t.localize(6,null),restricted:!1},"comments.useRelativeTime":{type:"boolean",default:!0,description:t.localize(7,null)}}}),(0,p.registerSingleton)(A.ICommentService,A.CommentService,1)}),define(ae[2851],le([1,0,1582,10,18,105,5,12,858,978,275,24,31,33,218,520,129,45,8,7,37,38,41,27,57,15,29,94,856,2690,187,23,857,1131]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommentsPanel=void 0;const M=new d.RawContextKey("commentsView.hasComments",!1),O="commentsViewState";let N=class extends c.FilterViewPane{constructor(B,V,z,x,H,W,U,$,q,X,G,Q,j,K){const Y=new T.Memento(O,K),ee=Y.getMemento(1,0);super({...B,filterOptions:{placeholder:t.localize(0,null),ariaLabel:t.localize(1,null),history:ee.filterHistory||[],text:ee.filter||"",focusContextKey:D.CommentsViewFilterFocusContextKey.key}},$,U,H,W,z,V,q,X,Q),this.editorService=x,this.commentService=G,this.uriIdentityService=j,this.storageService=K,this.totalComments=0,this.currentHeight=0,this.currentWidth=0,this.cachedFilterStats=void 0,this.onDidChangeVisibility=this.onDidChangeBodyVisibility,this.hasCommentsContextKey=M.bindTo(W),this.stateMemento=Y,this.viewState=ee,this.filters=this._register(new y.CommentsFilters({showResolved:this.viewState.showResolved!==!1,showUnresolved:this.viewState.showUnresolved!==!1},this.contextKeyService)),this.filter=new f.Filter(new L.FilterOptions(this.filterWidget.getFilterText(),this.filters.showResolved,this.filters.showUnresolved)),this._register(this.commentService.onDidSetAllCommentThreads(ie=>{this.totalComments=ie.commentThreads.length})),this._register(this.commentService.onDidUpdateCommentThreads(ie=>{this.totalComments+=ie.added.length,this.totalComments-=ie.removed.length})),this._register(this.filters.onDidChange(ie=>{(ie.showResolved||ie.showUnresolved)&&this.updateFilter()})),this._register(this.filterWidget.onDidChangeFilterText(()=>this.updateFilter()))}saveState(){this.viewState.filter=this.filterWidget.getFilterText(),this.viewState.filterHistory=this.filterWidget.getHistory(),this.viewState.showResolved=this.filters.showResolved,this.viewState.showUnresolved=this.filters.showUnresolved,this.stateMemento.saveMemento(),super.saveState()}focusFilter(){this.filterWidget.focus()}clearFilterText(){this.filterWidget.setFilterText("")}getFilterStats(){return this.cachedFilterStats||(this.cachedFilterStats={total:this.totalComments,filtered:this.tree?.getVisibleItemCount()??0}),this.cachedFilterStats}updateFilter(){this.filter.options=new L.FilterOptions(this.filterWidget.getFilterText(),this.filters.showResolved,this.filters.showUnresolved),this.tree?.filterComments(),this.cachedFilterStats=void 0;const{total:B,filtered:V}=this.getFilterStats();this.filterWidget.updateBadge(B===V||B===0?void 0:t.localize(2,null,V,B)),this.filterWidget.checkMoreFilters(!this.filters.showResolved||!this.filters.showUnresolved)}renderBody(B){super.renderBody(B),B.classList.add("comments-panel");const V=p.append(B,p.$(".comments-panel-container"));this.treeContainer=p.append(V,p.$(".tree-container")),this.treeContainer.classList.add("file-icon-themable-tree","show-file-icons"),this.commentsModel=new I.CommentsModel,this.cachedFilterStats=void 0,this.createTree(),this.createMessageBox(V),this._register(this.commentService.onDidSetAllCommentThreads(this.onAllCommentsChanged,this)),this._register(this.commentService.onDidUpdateCommentThreads(this.onCommentsUpdated,this));const z=p.createStyleSheet(B);this.applyStyles(z),this._register(this.themeService.onDidColorThemeChange(x=>this.applyStyles(z))),this._register(this.onDidChangeBodyVisibility(x=>{x&&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(B){const V=[],z=this.themeService.getColorTheme(),x=z.getColor(u.textLinkForeground);x&&V.push(`.comments-panel .comments-panel-container a { color: ${x}; }`);const H=z.getColor(u.textLinkActiveForeground);H&&V.push(`.comments-panel .comments-panel-container a:hover, a:active { color: ${H}; }`);const W=z.getColor(u.focusBorder);W&&V.push(`.comments-panel .comments-panel-container a:focus { outline-color: ${W}; }`);const U=z.getColor(u.textPreformatForeground);U&&V.push(`.comments-panel .comments-panel-container .text code { color: ${U}; }`),B.textContent=V.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())}get hasRendered(){return!!this.tree}layoutBodyContent(B=this.currentHeight,V=this.currentWidth){this.messageBoxContainer&&(this.messageBoxContainer.style.height=`${B}px`),this.tree?.layout(B,V),this.currentHeight=B,this.currentWidth=V}createMessageBox(B){this.messageBoxContainer=p.append(B,p.$(".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(f.CommentsList,this.treeLabels,this.treeContainer,{overrideStyles:{listBackground:this.getBackgroundColor()},selectionNavigation:!0,filter:this.filter,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:B=>{}},accessibilityProvider:{getAriaLabel(B){return B instanceof I.CommentsModel?t.localize(3,null):B instanceof I.ResourceWithCommentThreads?t.localize(4,null,(0,R.basename)(B.resource),B.resource.fsPath):B instanceof I.CommentNode?t.localize(5,null,B.comment.userName,B.range.startLineNumber,B.range.startColumn,(0,R.basename)(B.resource),typeof B.comment.body=="string"?B.comment.body:B.comment.body.value):""},getWidgetAriaLabel(){return f.COMMENTS_VIEW_TITLE}}})),this._register(this.tree.onDidOpen(B=>{this.openFile(B.element,B.editorOptions.pinned,B.editorOptions.preserveFocus,B.sideBySide)})),this._register(this.tree?.onDidChangeModel(()=>{this.cachedFilterStats=void 0,this.updateFilter()}))}openFile(B,V,z,x){if(!B||!(B instanceof I.ResourceWithCommentThreads||B instanceof I.CommentNode))return!1;this.commentService.isCommentingEnabled||this.commentService.enableCommenting(!0);const H=B instanceof I.ResourceWithCommentThreads?B.commentThreads[0].range:B.range,W=this.editorService.activeTextEditorControl,U=(0,A.isDiffEditor)(W)?[W.getOriginalEditor(),W.getModifiedEditor()]:W?[W]:[];for(const X of U){const G=X.getModel();if(G instanceof w.TextModel&&this.uriIdentityService.extUri.isEqual(B.resource,G.uri)){const Q=B instanceof I.ResourceWithCommentThreads?B.commentThreads[0].threadId:B.threadId,j=B instanceof I.ResourceWithCommentThreads?B.commentThreads[0].comment.uniqueIdInThread:B.comment.uniqueIdInThread;return Q&&(0,A.isCodeEditor)(X)&&b.CommentController.get(X)?.revealCommentThread(Q,j,!0),!0}}const $=B instanceof I.ResourceWithCommentThreads?B.commentThreads[0].threadId:B.threadId,q=B instanceof I.ResourceWithCommentThreads?B.commentThreads[0].comment:B.comment;return this.editorService.openEditor({resource:B.resource,options:{pinned:V,preserveFocus:z,selection:H}},x?C.SIDE_GROUP:C.ACTIVE_GROUP).then(X=>{if(X){const G=X.getControl();$&&(0,A.isCodeEditor)(G)&&b.CommentController.get(G)?.revealCommentThread($,q.uniqueIdInThread,!0)}}),!0}async refresh(){if(!!this.tree&&this.isVisible()&&(this.hasCommentsContextKey.set(this.commentsModel.hasCommentThreads()),this.treeContainer.classList.toggle("hidden",!this.commentsModel.hasCommentThreads()),this.cachedFilterStats=void 0,this.renderMessage(),await this.tree.updateChildren(),this.tree.getSelection().length===0&&this.commentsModel.hasCommentThreads())){const B=this.commentsModel.resourceCommentThreads[0].commentThreads[0];B&&(this.tree.setFocus([B]),this.tree.setSelection([B]))}}onAllCommentsChanged(B){this.commentsModel.setCommentThreads(B.ownerId,B.commentThreads),this.refresh()}onCommentsUpdated(B){this.commentsModel.updateCommentThreads(B)&&this.refresh()}};N=we([F(1,k.IInstantiationService),F(2,l.IViewDescriptorService),F(3,C.IEditorService),F(4,s.IConfigurationService),F(5,d.IContextKeyService),F(6,n.IContextMenuService),F(7,a.IKeybindingService),F(8,o.IOpenerService),F(9,E.IThemeService),F(10,S.ICommentService),F(11,g.ITelemetryService),F(12,h.IUriIdentityService),F(13,_.IStorageService)],N),e.CommentsPanel=N,r.CommandsRegistry.registerCommand({id:"workbench.action.focusCommentsPanel",handler:async P=>{P.get(l.IViewsService).openView(f.COMMENTS_VIEW_ID,!0)}}),(0,v.registerAction2)(class extends c.ViewAction{constructor(){super({viewId:f.COMMENTS_VIEW_ID,id:"comments.collapse",title:t.localize(6,null),f1:!1,icon:m.Codicon.collapseAll,menu:{id:v.MenuId.ViewTitle,group:"navigation",when:d.ContextKeyExpr.and(d.ContextKeyExpr.equals("view",f.COMMENTS_VIEW_ID),M),order:100}})}runInView(B,V){V.collapseAll()}})}),define(ae[2852],le([1,0,1591,418,2,10,50,512,37,87,73,12,5,7,40,59,54,9,224,75,33,151,173,471,20,21,8,125,61,1132]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BreakpointWidget=void 0;const y=A.$,T=(0,r.createDecorator)("privateBreakpointWidgetService"),_="breakpointwidgetdecoration";function L(B){return B.getModel().bracketPairs.getBracketPairsInRange(h.Range.fromPositions(B.getPosition())).some(x=>x.openingBracketInfo.bracketText==="{")}function M(B,V){const z=B.getColor(n.editorForeground)?.transparent(.4);return[{range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:V,color:z?z.toString():void 0}}}]}let O=class extends E.ZoneWidget{constructor(V,z,x,H,W,U,$,q,X,G,Q,j,K){super(V,{showFrame:!0,showArrow:!1,frameWidth:1,isAccessible:!0}),this.lineNumber=z,this.column=x,this.contextViewService=W,this.debugService=U,this.themeService=$,this.contextKeyService=q,this.instantiationService=X,this.modelService=G,this.codeEditorService=Q,this._configurationService=j,this.languageFeaturesService=K,this.conditionInput="",this.hitCountInput="",this.logMessageInput="",this.toDispose=[];const Y=this.editor.getModel();if(Y){const ee=Y.uri,ie=this.debugService.getModel().getBreakpoints({lineNumber:this.lineNumber,column:this.column,uri:ee});this.breakpoint=ie.length?ie[0]:void 0}H===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=H,this.toDispose.push(this.debugService.getModel().onDidChangeBreakpoints(ee=>{this.breakpoint&&ee&&ee.removed&&ee.removed.indexOf(this.breakpoint)>=0&&this.dispose()})),this.codeEditorService.registerDecorationType("breakpoint-widget",_,{}),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(V){switch(this.context){case 2:return V&&V.logMessage?V.logMessage:this.logMessageInput;case 1:return V&&V.hitCondition?V.hitCondition:this.hitCountInput;default:return V&&V.condition?V.condition:this.conditionInput}}rememberInput(){const V=this.input.getModel().getValue();switch(this.context){case 2:this.logMessageInput=V;break;case 1:this.hitCountInput=V;break;default:this.conditionInput=V}}setInputMode(){if(this.editor.hasModel()){const V=this.context===2?w.PLAINTEXT_LANGUAGE_ID:this.editor.getModel().getLanguageId();this.input.getModel().setMode(V)}}show(V){const z=this.input.getModel().getLineCount();super.show(V,z+1)}fitHeightToContent(){const V=this.input.getModel().getLineCount();this._relayout(V+1)}_fillContainer(V){this.setCssClass("breakpoint-widget");const z=new p.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,S.attachSelectBoxStyler)(z,this.themeService)),this.selectContainer=y(".breakpoint-select-container"),z.render(A.append(V,this.selectContainer)),z.onDidSelect(x=>{this.rememberInput(),this.context=x.index,this.setInputMode();const H=this.getInputValue(this.breakpoint);this.input.getModel().setValue(H),this.input.focus()}),this.inputContainer=y(".inputContainer"),this.createBreakpointInput(A.append(V,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(V,z){this.heightInPx=V,this.input.layout({height:V,width:z-113}),this.centerInputVertically()}createBreakpointInput(V){const z=this.contextKeyService.createScoped(V);this.toDispose.push(z);const x=this.instantiationService.createChild(new a.ServiceCollection([u.IContextKeyService,z],[T,this])),H=this.createEditorOptions(),W=(0,g.getSimpleCodeEditorWidgetOptions)();this.input=x.createInstance(o.CodeEditorWidget,V,H,W),b.CONTEXT_IN_BREAKPOINT_WIDGET.bindTo(z).set(!0);const U=this.modelService.createModel("",null,l.URI.parse(`${b.DEBUG_SCHEME}:${this.editor.getId()}:breakpointinput`),!0);this.editor.hasModel()&&U.setMode(this.editor.getModel().getLanguageId()),this.input.setModel(U),this.setInputMode(),this.toDispose.push(U);const $=()=>{const X=this.input.getModel().getValue()?[]:M(this.themeService.getColorTheme(),this.placeholder);this.input.setDecorationsByType("breakpoint-widget",_,X)};this.input.getModel().onDidChangeContent(()=>$()),this.themeService.onDidColorThemeChange(()=>$()),this.toDispose.push(this.languageFeaturesService.completionProvider.register({scheme:b.DEBUG_SCHEME,hasAccessToAllModels:!0},{provideCompletionItems:(q,X,G,Q)=>{let j;const K=this.editor.getModel();return K&&(this.context===0||this.context===2&&L(this.input))?j=(0,s.provideSuggestionItems)(this.languageFeaturesService.completionProvider,K,new k.Position(this.lineNumber,1),new s.CompletionOptions(void 0,new Set().add(27)),G,Q).then(Y=>{let ee=0;if(this.context===0)ee=X.column-1;else{const ie=this.input.getModel().getValue();for(;X.column-2-ee>=0&&ie[X.column-2-ee]!=="{"&&ie[X.column-2-ee]!==" ";)ee++}return{suggestions:Y.items.map(ie=>(ie.completion.range=h.Range.fromPositions(X.delta(0,-ee),X),ie.completion))}}):j=Promise.resolve({suggestions:[]}),j}})),this.toDispose.push(this._configurationService.onDidChangeConfiguration(q=>{(q.affectsConfiguration("editor.fontSize")||q.affectsConfiguration("editor.lineHeight"))&&(this.input.updateOptions(this.createEditorOptions()),this.centerInputVertically())}))}createEditorOptions(){const V=this._configurationService.getValue("editor"),z=(0,g.getSimpleEditorOptions)();return z.fontSize=V.fontSize,z.fontFamily=V.fontFamily,z.lineHeight=V.lineHeight,z.fontLigatures=V.fontLigatures,z.ariaLabel=this.placeholder,z}centerInputVertically(){if(this.container&&typeof this.heightInPx=="number"){const V=this.input.getOption(60),z=this.input.getModel().getLineCount(),x=(this.heightInPx-z*V)/2;this.inputContainer.style.marginTop=x+"px"}}close(V){if(V){let z=this.breakpoint&&this.breakpoint.condition,x=this.breakpoint&&this.breakpoint.hitCondition,H=this.breakpoint&&this.breakpoint.logMessage;if(this.rememberInput(),(this.conditionInput||this.context===0)&&(z=this.conditionInput),(this.hitCountInput||this.context===1)&&(x=this.hitCountInput),(this.logMessageInput||this.context===2)&&(H=this.logMessageInput),this.breakpoint){const W=new Map;W.set(this.breakpoint.getId(),{condition:z,hitCondition:x,logMessage:H}),this.debugService.updateBreakpoints(this.breakpoint.uri,W,!1).then(void 0,v.onUnexpectedError)}else{const W=this.editor.getModel();W&&this.debugService.addBreakpoints(W.uri,[{lineNumber:this.lineNumber,column:this.column,enabled:!0,condition:z,hitCondition:x,logMessage:H}])}}this.dispose()}dispose(){super.dispose(),this.input.dispose(),R.dispose(this.toDispose),setTimeout(()=>this.editor.focus(),0)}};O=we([F(4,I.IContextViewService),F(5,b.IDebugService),F(6,C.IThemeService),F(7,u.IContextKeyService),F(8,r.IInstantiationService),F(9,c.IModelService),F(10,d.ICodeEditorService),F(11,m.IConfigurationService),F(12,D.ILanguageFeaturesService)],O),e.BreakpointWidget=O;class N extends i.EditorCommand{constructor(){super({id:"breakpointWidget.action.acceptInput",precondition:b.CONTEXT_BREAKPOINT_WIDGET_VISIBLE,kbOpts:{kbExpr:b.CONTEXT_IN_BREAKPOINT_WIDGET,primary:3,weight:100}})}runEditorCommand(V,z){V.get(T).close(!0)}}class P extends i.EditorCommand{constructor(){super({id:"closeBreakpointWidget",precondition:b.CONTEXT_BREAKPOINT_WIDGET_VISIBLE,kbOpts:{kbExpr:f.EditorContextKeys.textInputFocus,primary:9,secondary:[1033],weight:100}})}runEditorCommand(V,z,x){const H=z.getContribution(b.BREAKPOINT_EDITOR_CONTRIBUTION_ID);if(H)return H.closeBreakpointWidget();V.get(T).close(!1)}}(0,i.registerEditorCommand)(new N),(0,i.registerEditorCommand)(new P)}),define(ae[979],le([1,0,86,237,10,139,36,16,11,112,21,113,2,14,68,28,13,72,20,42,116,1590,8,7,37,47,5,49,33,12,551,2852,201,87]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LazyBreakpointEditorContribution=e.createBreakpointDecorations=void 0;const O=R.$,N={description:"breakpoint-helper-decoration",glyphMarginClassName:y.ThemeIcon.asClassName(L.debugBreakpointHint),stickiness:1};function P(G,Q,j,K,Y,ee){const ie=[];return j.forEach(re=>{if(re.lineNumber>Q.getLineCount())return;const oe=Q.getLineFirstNonWhitespaceColumn(re.lineNumber),se=Q.validateRange(re.column?new s.Range(re.lineNumber,re.column,re.lineNumber,re.column+1):new s.Range(re.lineNumber,oe,re.lineNumber,oe+1));ie.push({options:B(G,Q,re,K,Y,ee),range:se})}),ie}e.createBreakpointDecorations=P;function B(G,Q,j,K,Y,ee){const ie=G.get(M.IDebugService),re=G.get(d.ILanguageService),{icon:oe,message:se,showAdapterUnverifiedMessage:te}=(0,T.getBreakpointMessageAndIcon)(K,Y,j,void 0);let Z,ne;if(te){let he;ne=ie.getModel().getSessions().map(pe=>{const me=ie.getAdapterManager().getDebugger(pe.configuration.type),Se=me?.strings?.[M.DebuggerString.UnverifiedBreakpoints];if(Se)return he||(he=(0,c.withNullAsUndefined)(re.guessLanguageIdByFilepathOrFirstLine(j.uri))),he&&me.interestedInLanguage(he)?Se:void 0}).find(pe=>!!pe)}if(se)if(Z=new C.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}),j.condition||j.hitCondition){const he=Q.getLanguageId();Z.appendCodeblock(he,se),ne&&Z.appendMarkdown("$(warning) "+ne)}else Z.appendText(se),ne&&Z.appendMarkdown(` $(warning) `+ne);else ne&&(Z=new C.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown(ne));let ce=null;ee&&(ce={color:(0,y.themeColorFromId)(W),position:n.OverviewRulerLane.Left});const de=j.column&&j.column>Q.getLineFirstNonWhitespaceColumn(j.lineNumber);return{description:"breakpoint-decoration",glyphMarginClassName:y.ThemeIcon.asClassName(oe),glyphMarginHoverMessage:Z,stickiness:1,before:de?{content:f.noBreakWhitespace,inlineClassName:"debug-breakpoint-placeholder",inlineClassNameAffectsLetterSpacing:!0}:void 0,overviewRuler:ce}}async function V(G,Q,j){const K=(0,E.distinct)(Q.map(ee=>ee.range.startLineNumber)),Y=[];return j.capabilities.supportsBreakpointLocationsRequest&&await Promise.all(K.map(async ee=>{try{const ie=await j.breakpointsLocations(G.uri,ee);if(ie.length>1){const re=G.getLineFirstNonWhitespaceColumn(ee),oe=G.getLineLastNonWhitespaceColumn(ee);ie.forEach(se=>{const te=new s.Range(se.lineNumber,se.column,se.lineNumber,se.column+1);if(se.column<=re||se.column>oe)return;const Z=Q.find(ne=>ne.range.equalsRange(te));Z&&Z.inlineWidget||Y.push({range:te,options:{description:"breakpoint-placeholder-decoration",stickiness:1,before:Z?void 0:{content:f.noBreakWhitespace,inlineClassName:"debug-breakpoint-placeholder",inlineClassNameAffectsLetterSpacing:!0}},breakpoint:Z?Z.breakpoint:void 0})})}}catch{}})),Y}let z=class extends r.Disposable{constructor(Q,j){super();const K=Q.onDidChangeModel(()=>{Q.hasModel()&&(K.dispose(),this._contrib=this._register(j.createInstance(x,Q)))})}showBreakpointWidget(Q,j,K){this._contrib?.showBreakpointWidget(Q,j,K)}closeBreakpointWidget(){this._contrib?.closeBreakpointWidget()}getContextMenuActionsAtPosition(Q,j){return this._contrib?.getContextMenuActionsAtPosition(Q,j)??[]}};z=we([F(1,m.IInstantiationService)],z),e.LazyBreakpointEditorContribution=z;let x=class{constructor(Q,j,K,Y,ee,ie,re,oe){this.editor=Q,this.debugService=j,this.contextMenuService=K,this.instantiationService=Y,this.dialogService=ie,this.configurationService=re,this.labelService=oe,this.breakpointHintDecoration=null,this.toDispose=[],this.ignoreDecorationsChangedEvent=!1,this.ignoreBreakpointsChangeEvent=!1,this.breakpointDecorations=[],this.candidateDecorations=[],this.breakpointWidgetVisible=M.CONTEXT_BREAKPOINT_WIDGET_VISIBLE.bindTo(ee),this.setDecorationsScheduler=new I.RunOnceScheduler(()=>this.setDecorations(),30),this.setDecorationsScheduler.schedule(),this.registerListeners()}getContextMenuActionsAtPosition(Q,j){if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return[];if(!this.debugService.canSetBreakpointsIn(j))return[];const K=this.debugService.getModel().getBreakpoints({lineNumber:Q,uri:j.uri});return this.getContextMenuActions(K,j.uri,Q)}registerListeners(){this.toDispose.push(this.editor.onMouseDown(async Q=>{if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return;const j=this.editor.getModel();if(!Q.target.position||!j||Q.target.type!==2||Q.target.detail.isAfterLines||!this.marginFreeFromNonDebugDecorations(Q.target.position.lineNumber))return;const K=this.debugService.canSetBreakpointsIn(j),Y=Q.target.position.lineNumber,ee=j.uri;if(Q.event.rightButton||u.isMacintosh&&Q.event.leftButton&&Q.event.ctrlKey){if(!K)return;const ie={x:Q.event.posx,y:Q.event.posy},re=this.debugService.getModel().getBreakpoints({lineNumber:Y,uri:ee}),oe=this.getContextMenuActions(re,ee,Y);this.contextMenuService.showContextMenu({getAnchor:()=>ie,getActions:()=>oe,getActionsContext:()=>re.length?re[0]:void 0,onHide:()=>(0,r.disposeIfDisposable)(oe)})}else{const ie=this.debugService.getModel().getBreakpoints({uri:ee,lineNumber:Y});if(ie.length){const re=Q.event.shiftKey,oe=ie.some(se=>se.enabled);if(re)ie.forEach(se=>this.debugService.enableOrDisableBreakpoints(!oe,se));else if(!u.isLinux&&ie.some(se=>!!se.condition||!!se.logMessage||!!se.hitCondition)){const se=ie.every(de=>!!de.logMessage),te=se?a.localize(0,null):a.localize(1,null),Z=a.localize(2,null,te.toLowerCase(),se?a.localize(3,null):a.localize(4,null)),ne=a.localize(5,null,te.toLowerCase(),se?a.localize(6,null):a.localize(7,null)),{choice:ce}=await this.dialogService.show(i.default.Info,oe?ne:Z,[a.localize(8,null,te),a.localize(9,null,oe?a.localize(10,null):a.localize(11,null),te),a.localize(12,null)],{cancelId:2});ce===0&&ie.forEach(de=>this.debugService.removeBreakpoints(de.getId())),ce===1&&ie.forEach(de=>this.debugService.enableOrDisableBreakpoints(!oe,de))}else oe?ie.forEach(se=>this.debugService.removeBreakpoints(se.getId())):ie.forEach(se=>this.debugService.enableOrDisableBreakpoints(!oe,se))}else K&&this.debugService.addBreakpoints(ee,[{lineNumber:Y}])}})),p.BrowserFeatures.pointerEvents&&t.isSafari||(this.toDispose.push(this.editor.onMouseMove(Q=>{if(!this.debugService.getAdapterManager().hasEnabledDebuggers())return;let j=-1;const K=this.editor.getModel();K&&Q.target.position&&(Q.target.type===2||Q.target.type===3)&&this.debugService.canSetBreakpointsIn(K)&&this.marginFreeFromNonDebugDecorations(Q.target.position.lineNumber)&&(Q.target.detail.isAfterLines||(j=Q.target.position.lineNumber)),this.ensureBreakpointHintDecoration(j)})),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 Q=>{(Q.affectsConfiguration("debug.showBreakpointsInOverviewRuler")||Q.affectsConfiguration("debug.showInlineBreakpointCandidates"))&&await this.setDecorations()}))}getContextMenuActions(Q,j,K,Y){const ee=[];if(Q.length===1){const ie=Q[0].logMessage?a.localize(13,null):a.localize(14,null);ee.push(new k.Action("debug.removeBreakpoint",a.localize(15,null,ie),void 0,!0,async()=>{await this.debugService.removeBreakpoints(Q[0].getId())})),ee.push(new k.Action("workbench.debug.action.editBreakpointAction",a.localize(16,null,ie),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(Q[0].lineNumber,Q[0].column)))),ee.push(new k.Action("workbench.debug.viewlet.action.toggleBreakpoint",Q[0].enabled?a.localize(17,null,ie):a.localize(18,null,ie),void 0,!0,()=>this.debugService.enableOrDisableBreakpoints(!Q[0].enabled,Q[0])))}else if(Q.length>1){const ie=Q.slice().sort((re,oe)=>re.column&&oe.column?re.column-oe.column:1);ee.push(new k.SubmenuAction("debug.removeBreakpoints",a.localize(19,null),ie.map(re=>new k.Action("removeInlineBreakpoint",re.column?a.localize(20,null,re.column):a.localize(21,null),void 0,!0,()=>this.debugService.removeBreakpoints(re.getId()))))),ee.push(new k.SubmenuAction("debug.editBreakpoints",a.localize(22,null),ie.map(re=>new k.Action("editBreakpoint",re.column?a.localize(23,null,re.column):a.localize(24,null),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(re.lineNumber,re.column)))))),ee.push(new k.SubmenuAction("debug.enableDisableBreakpoints",a.localize(25,null),ie.map(re=>new k.Action(re.enabled?"disableColumnBreakpoint":"enableColumnBreakpoint",re.enabled?re.column?a.localize(26,null,re.column):a.localize(27,null):re.column?a.localize(28,null,re.column):a.localize(29,null),void 0,!0,()=>this.debugService.enableOrDisableBreakpoints(!re.enabled,re)))))}else ee.push(new k.Action("addBreakpoint",a.localize(30,null),void 0,!0,()=>this.debugService.addBreakpoints(j,[{lineNumber:K,column:Y}]))),ee.push(new k.Action("addConditionalBreakpoint",a.localize(31,null),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(K,Y,0)))),ee.push(new k.Action("addLogPoint",a.localize(32,null),void 0,!0,()=>Promise.resolve(this.showBreakpointWidget(K,Y,2))));return this.debugService.state===2&&(ee.push(new k.Separator),ee.push(new k.Action("runToLine",a.localize(33,null),void 0,!0,()=>this.debugService.runTo(j,K).catch(S.onUnexpectedError)))),ee}marginFreeFromNonDebugDecorations(Q){const j=this.editor.getLineDecorations(Q);if(j)for(const{options:K}of j){const Y=K.glyphMarginClassName;if(Y&&(!Y.includes("codicon-")||Y.includes("codicon-testing-")||Y.includes("codicon-merge-")||Y.includes("codicon-arrow-")))return!1}return!0}ensureBreakpointHintDecoration(Q){this.editor.changeDecorations(j=>{this.breakpointHintDecoration&&(j.removeDecoration(this.breakpointHintDecoration),this.breakpointHintDecoration=null),Q!==-1&&(this.breakpointHintDecoration=j.addDecoration({startLineNumber:Q,startColumn:1,endLineNumber:Q,endColumn:1},N))})}async setDecorations(){if(!this.editor.hasModel())return;const Q=this.editor,j=Q.getModel(),K=this.debugService.getModel().getBreakpoints({uri:j.uri}),Y=this.configurationService.getValue("debug"),ee=this.instantiationService.invokeFunction(oe=>P(oe,j,K,this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),Y.showBreakpointsInOverviewRuler));try{this.ignoreDecorationsChangedEvent=!0,Q.changeDecorations(oe=>{const se=oe.deltaDecorations(this.breakpointDecorations.map(te=>te.decorationId),ee);this.breakpointDecorations.forEach(te=>{te.inlineWidget?.dispose()}),this.breakpointDecorations=se.map((te,Z)=>{let ne;const ce=K[Z];if(ee[Z].options.before){const de=()=>this.getContextMenuActions([ce],Q.getModel().uri,ce.lineNumber,ce.column);ne=new H(Q,te,ee[Z].options.glyphMarginClassName,ce,this.debugService,this.contextMenuService,de)}return{decorationId:te,breakpoint:ce,range:ee[Z].range,inlineWidget:ne}})})}finally{this.ignoreDecorationsChangedEvent=!1}const ie=this.debugService.getViewModel().focusedSession,re=Y.showInlineBreakpointCandidates&&ie?await V(this.editor.getModel(),this.breakpointDecorations,ie):[];this.editor.changeDecorations(oe=>{const se=oe.deltaDecorations(this.candidateDecorations.map(te=>te.decorationId),re);this.candidateDecorations.forEach(te=>{te.inlineWidget.dispose()}),this.candidateDecorations=se.map((te,Z)=>{const ne=re[Z],ce=ne.breakpoint?(0,T.getBreakpointMessageAndIcon)(this.debugService.state,this.debugService.getModel().areBreakpointsActivated(),ne.breakpoint,this.labelService).icon:L.breakpoint.disabled,de=()=>this.getContextMenuActions(ne.breakpoint?[ne.breakpoint]:[],Q.getModel().uri,ne.range.startLineNumber,ne.range.startColumn),he=new H(Q,te,y.ThemeIcon.asClassName(ce),ne.breakpoint,this.debugService,this.contextMenuService,de);return{decorationId:te,inlineWidget:he}})});for(const oe of this.breakpointDecorations)oe.inlineWidget&&this.editor.layoutContentWidget(oe.inlineWidget)}async onModelDecorationsChanged(){if(this.breakpointDecorations.length===0||this.ignoreDecorationsChangedEvent||!this.editor.hasModel())return;let Q=!1;const j=this.editor.getModel();if(this.breakpointDecorations.forEach(Y=>{if(Q)return;const ee=j.getDecorationRange(Y.decorationId);ee&&!Y.range.equalsRange(ee)&&(Q=!0,Y.range=ee)}),!Q)return;const K=new Map;for(let Y=0,ee=this.breakpointDecorations.length;Y<ee;Y++){const ie=this.breakpointDecorations[Y],re=j.getDecorationRange(ie.decorationId);re&&ie.breakpoint&&K.set(ie.breakpoint.getId(),{lineNumber:re.startLineNumber,column:ie.breakpoint.column?re.startColumn:void 0})}try{this.ignoreBreakpointsChangeEvent=!0,await this.debugService.updateBreakpoints(j.uri,K,!0)}finally{this.ignoreBreakpointsChangeEvent=!1}}showBreakpointWidget(Q,j,K){this.breakpointWidget?.dispose(),this.breakpointWidget=this.instantiationService.createInstance(_.BreakpointWidget,this.editor,Q,j,K),this.breakpointWidget.show({lineNumber:Q,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?.dispose(),this.editor.removeDecorations(this.breakpointDecorations.map(Q=>Q.decorationId)),(0,r.dispose)(this.toDispose)}};x=we([F(1,M.IDebugService),F(2,h.IContextMenuService),F(3,m.IInstantiationService),F(4,g.IContextKeyService),F(5,v.IDialogService),F(6,o.IConfigurationService),F(7,w.ILabelService)],x);class H{constructor(Q,j,K,Y,ee,ie,re){this.editor=Q,this.decorationId=j,this.breakpoint=Y,this.debugService=ee,this.contextMenuService=ie,this.getContextMenuActions=re,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.toDispose=[],this.range=this.editor.getModel().getDecorationRange(j),this.toDispose.push(this.editor.onDidChangeModelDecorations(()=>{const se=this.editor.getModel().getDecorationRange(this.decorationId);this.range&&!this.range.equalsRange(se)&&(this.range=se,this.editor.layoutContentWidget(this))})),this.create(K),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(Q){this.domNode=O(".inline-breakpoint-widget"),Q&&this.domNode.classList.add(...Q.split(" ")),this.toDispose.push(R.addDisposableListener(this.domNode,R.EventType.CLICK,async K=>{switch(this.breakpoint?.enabled){case void 0:await this.debugService.addBreakpoints(this.editor.getModel().uri,[{lineNumber:this.range.startLineNumber,column:this.range.startColumn}]);break;case!0:await this.debugService.removeBreakpoints(this.breakpoint.getId());break;case!1:this.debugService.enableOrDisableBreakpoints(!0,this.breakpoint);break}})),this.toDispose.push(R.addDisposableListener(this.domNode,R.EventType.CONTEXT_MENU,K=>{const Y=new A.StandardMouseEvent(K),ee={x:Y.posx,y:Y.posy},ie=this.getContextMenuActions();this.contextMenuService.showContextMenu({getAnchor:()=>ee,getActions:()=>ie,getActionsContext:()=>this.breakpoint,onHide:()=>(0,r.disposeIfDisposable)(ie)})}));const j=()=>{const K=this.editor.getOption(60);this.domNode.style.height=`${K}px`,this.domNode.style.width=`${Math.ceil(.8*K)}px`,this.domNode.style.marginLeft="4px"};j(),this.toDispose.push(this.editor.onDidChangeConfiguration(K=>{(K.hasChanged(47)||K.hasChanged(60))&&j()}))}getId(){return(0,l.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,r.dispose)(this.toDispose)}}we([b.memoize],H.prototype,"getId",null),(0,y.registerThemingParticipant)((G,Q)=>{const j=G.getColor(W);j&&Q.addRule(` ${L.allBreakpoints.map(re=>`.monaco-workbench ${y.ThemeIcon.asCSSSelector(re.regular)}`).join(`, `)}, .monaco-workbench ${y.ThemeIcon.asCSSSelector(L.debugBreakpointUnsupported)}, .monaco-workbench ${y.ThemeIcon.asCSSSelector(L.debugBreakpointHint)}:not([class*='codicon-debug-breakpoint']):not([class*='codicon-debug-stackframe']), .monaco-workbench ${y.ThemeIcon.asCSSSelector(L.breakpoint.regular)}${y.ThemeIcon.asCSSSelector(L.debugStackframeFocused)}::after, .monaco-workbench ${y.ThemeIcon.asCSSSelector(L.breakpoint.regular)}${y.ThemeIcon.asCSSSelector(L.debugStackframe)}::after { color: ${j} !important; } `);const K=G.getColor(U);K&&Q.addRule(` ${L.allBreakpoints.map(re=>`.monaco-workbench ${y.ThemeIcon.asCSSSelector(re.disabled)}`).join(`, `)} { color: ${K}; } `);const Y=G.getColor($);Y&&Q.addRule(` ${L.allBreakpoints.map(re=>`.monaco-workbench ${y.ThemeIcon.asCSSSelector(re.unverified)}`).join(`, `)} { color: ${Y}; } `);const ee=G.getColor(q);ee&&Q.addRule(` .monaco-workbench ${y.ThemeIcon.asCSSSelector(L.debugStackframe)}, .monaco-editor .debug-top-stack-frame-column { color: ${ee} !important; } `);const ie=G.getColor(X);ie&&Q.addRule(` .monaco-workbench ${y.ThemeIcon.asCSSSelector(L.debugStackframeFocused)} { color: ${ie} !important; } `)});const W=(0,D.registerColor)("debugIcon.breakpointForeground",{dark:"#E51400",light:"#E51400",hcDark:"#E51400",hcLight:"#E51400"},a.localize(34,null)),U=(0,D.registerColor)("debugIcon.breakpointDisabledForeground",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},a.localize(35,null)),$=(0,D.registerColor)("debugIcon.breakpointUnverifiedForeground",{dark:"#848484",light:"#848484",hcDark:"#848484",hcLight:"#848484"},a.localize(36,null)),q=(0,D.registerColor)("debugIcon.breakpointCurrentStackframeForeground",{dark:"#FFCC00",light:"#BE8700",hcDark:"#FFCC00",hcLight:"#BE8700"},a.localize(37,null)),X=(0,D.registerColor)("debugIcon.breakpointStackframeForeground",{dark:"#89D185",light:"#89D185",hcDark:"#89D185",hcLight:"#89D185"},a.localize(38,null))}),define(ae[980],le([1,0,10,110,324,11,112,6,405,2,28,9,105,40,75,173,134,20,59,92,61,54,114,244,1619,84,15,93,8,7,37,265,5,151,38,76,41,23,27,33,12,129,45,471,686,201,464,2775,2776,87,192,467,24,1138]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Repl=void 0;const ie=t.$,re="debug.repl.history",oe="debug.repl.filterHistory",se="debug.repl.filterValue",te="replinputdecoration";function Z(ge){ge.scrollTop=ge.scrollHeight-ge.renderHeight}const ne=new Set,ce={getId:ge=>ge.getId()};let de=class kr extends H.FilterViewPane{constructor(ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e,Re,Le,Me,Oe,Ke,We,Xe){const Je=Ae.get(se,1,"");super({...ue,filterOptions:{placeholder:(0,h.localize)(0,null),text:Je,history:JSON.parse(Ae.get(oe,1,"[]"))}},Me,Te,_e,ye,Ee,De,Oe,Pe,Ke),this.debugService=Ce,this.storageService=Ae,this.modelService=fe,this.textResourcePropertiesService=Re,this.editorService=Le,this.languageFeaturesService=Xe,this.previousTreeScrollHeight=0,this.replInputLineCount=1,this.modelChangeListener=b.Disposable.None,this.menu=We.createMenu(m.MenuId.DebugConsoleContext,ye),this._register(this.menu),this.history=new I.HistoryNavigator(JSON.parse(this.storageService.get(re,1,"[]")),50),this.filter=new G.ReplFilter,this.filter.filterQuery=Je,this.multiSessionRepl=j.CONTEXT_MULTI_SESSION_REPL.bindTo(ye),this.replOptions=this._register(this.instantiationService.createInstance(he,this.id,()=>this.getBackgroundColor())),this._register(this.replOptions.onDidChange(()=>this.onDidStyleChange())),ke.registerDecorationType("repl-decoration",te,{}),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 ue=>this.onDidFocusSession(ue))),this._register(this.debugService.getViewModel().onDidEvaluateLazyExpression(async ue=>{ue instanceof K.Variable&&this.tree.hasNode(ue)&&(await this.tree.updateChildren(ue,!1,!0),await this.tree.expand(ue))})),this._register(this.debugService.onWillNewSession(async ue=>{const Ce=this.tree.getInput();(!Ce||Ce.state===0)&&await this.selectSession(ue),this.multiSessionRepl.set(this.isMultiSessionView)})),this._register(this.themeService.onDidColorThemeChange(()=>{this.refreshReplElements(!1),this.isVisible()&&this.updateInputDecoration()})),this._register(this.onDidChangeBodyVisibility(ue=>{ue&&(this.model||(this.model=this.modelService.getModel(kr.URI)||this.modelService.createModel("",null,kr.URI,!0)),this.setMode(),this.replInput.setModel(this.model),this.updateInputDecoration(),this.refreshReplElements(!0))})),this._register(this.configurationService.onDidChangeConfiguration(ue=>{if(ue.affectsConfiguration("debug.console.wordWrap")&&(this.tree.dispose(),this.treeContainer.innerText="",t.clearNode(this.treeContainer),this.createReplTree()),ue.affectsConfiguration("debug.console.acceptSuggestionOnEnter")){const Ce=this.configurationService.getValue("debug");this.replInput.updateOptions({acceptSuggestionOnEnter:Ce.console.acceptSuggestionOnEnter==="on"?"on":"off"})}})),this._register(this.editorService.onDidActiveEditorChange(()=>{this.setMode()})),this._register(this.filterWidget.onDidChangeFilterText(()=>{this.filter.filterQuery=this.filterWidget.getFilterText(),this.tree.refilter(),Z(this.tree)}))}async onDidFocusSession(ue){ue&&(ne.delete(ue),this.completionItemProvider?.dispose(),ue.capabilities.supportsCompletionsRequest&&(this.completionItemProvider=this.languageFeaturesService.completionProvider.register({scheme:j.DEBUG_SCHEME,pattern:"**/replinput",hasAccessToAllModels:!0},{triggerCharacters:ue.capabilities.completionTriggerCharacters||["."],provideCompletionItems:async(Ce,De,Ae,Pe)=>{this.setHistoryNavigationEnablement(!1);const fe=this.replInput.getModel();if(fe){const ye=fe.getWordAtPosition(De),ke=ye?ye.word.length:0,Ee=fe.getValue(),Te=this.debugService.getViewModel().focusedStackFrame,_e=Te?Te.frameId:void 0,Re=await ue.completions(_e,Te?.thread.threadId||0,Ee,De,ke,Pe),Le=[],Me=Oe=>l.Range.fromPositions(De.delta(0,-Oe),De);return Re&&Re.body&&Re.body.targets&&Re.body.targets.forEach(Oe=>{if(Oe&&Oe.label){let Ke,We=Oe.text||Oe.label;if(typeof Oe.selectionStart=="number"){Ke=4;const Xe=typeof Oe.selectionLength=="number"?Oe.selectionLength:0,Je=Xe>0?"${1:"+We.substring(Oe.selectionStart,Oe.selectionStart+Xe)+"}$0":"$0";We=We.substring(0,Oe.selectionStart)+Je+We.substring(Oe.selectionStart+Xe)}Le.push({label:Oe.label,insertText:We,detail:Oe.detail,kind:d.CompletionItemKinds.fromString(Oe.type||"property"),filterText:Oe.start&&Oe.length?Ee.substring(Oe.start,Oe.start+Oe.length).concat(Oe.label):void 0,range:Me(Oe.length||ke),sortText:Oe.sortText,insertTextRules:Ke})}}),this.configurationService.getValue("debug").console.historySuggestions&&this.history.getHistory().forEach(Ke=>Le.push({label:Ke,insertText:Ke,kind:18,range:Me(Ke.length),sortText:"ZZZ"})),{suggestions:Le}}return Promise.resolve({suggestions:[]})}}))),await this.selectSession()}getFilterStats(){return{total:this.tree?.getNode().children.length??0,filtered:this.tree?.getNode().children.filter(ue=>ue.visible).length??0}}get isReadonly(){const ue=this.tree.getInput();return!(ue&&ue.state!==0)}showPreviousValue(){this.isReadonly||this.navigateHistory(!0)}showNextValue(){this.isReadonly||this.navigateHistory(!1)}focusFilter(){this.filterWidget.focus()}setMode(){if(!this.isVisible())return;const ue=this.editorService.activeTextEditorControl;(0,r.isCodeEditor)(ue)&&(this.modelChangeListener.dispose(),this.modelChangeListener=ue.onDidChangeModelLanguage(()=>this.setMode()),this.model&&ue.hasModel()&&this.model.setMode(ue.getModel().getLanguageId()))}onDidStyleChange(){if(this.styleElement){this.replInput.updateOptions({fontSize:this.replOptions.replConfiguration.fontSize,lineHeight:this.replOptions.replConfiguration.lineHeight,fontFamily:this.replOptions.replConfiguration.fontFamily==="default"?c.EDITOR_FONT_DEFAULTS.fontFamily:this.replOptions.replConfiguration.fontFamily});const ue=this.replInput.getOption(60);this.styleElement.textContent=` .repl .repl-input-wrapper .repl-input-chevron { line-height: ${ue}px } .repl .repl-input-wrapper .monaco-editor .lines-content { background-color: ${this.replOptions.replConfiguration.backgroundColor}; } `;const Ce=this.replOptions.replConfiguration.fontFamily==="default"?"var(--monaco-monospace-font)":this.replOptions.replConfiguration.fontFamily;this.container.style.setProperty("--vscode-repl-font-family",Ce),this.container.style.setProperty("--vscode-repl-font-size",`${this.replOptions.replConfiguration.fontSize}px`),this.container.style.setProperty("--vscode-repl-font-size-for-twistie",`${this.replOptions.replConfiguration.fontSizeForTwistie}px`),this.container.style.setProperty("--vscode-repl-line-height",this.replOptions.replConfiguration.cssLineHeight),this.tree.rerender(),this.bodyContentDimension&&this.layoutBodyContent(this.bodyContentDimension.height,this.bodyContentDimension.width)}}navigateHistory(ue){const Ce=ue?this.history.previous():this.history.next();Ce&&(this.replInput.setValue(Ce),p.status(Ce),this.replInput.setPosition({lineNumber:1,column:Ce.length+1}),this.setHistoryNavigationEnablement(!0))}async selectSession(ue){const Ce=this.tree&&this.tree.getInput();if(!ue){const De=this.debugService.getViewModel().focusedSession;De?ue=De:(!Ce||ne.has(Ce))&&(ue=this.debugService.getModel().getSessions(!0).find(Ae=>!ne.has(Ae)))}ue&&(this.replElementsChangeListener?.dispose(),this.replElementsChangeListener=ue.onDidChangeReplElements(()=>{this.refreshReplElements(ue.getReplElements().length===0)}),this.tree&&Ce!==ue&&(await this.tree.setInput(ue),Z(this.tree))),this.replInput?.updateOptions({readOnly:this.isReadonly}),this.updateInputDecoration()}async clearRepl(){const ue=this.tree.getInput();ue&&(ue.removeReplExpressions(),ue.state===0&&(ne.add(ue),await this.selectSession(),this.multiSessionRepl.set(this.isMultiSessionView))),this.replInput.focus()}acceptReplInput(){const ue=this.tree.getInput();if(ue&&!this.isReadonly){ue.addReplExpression(this.debugService.getViewModel().focusedStackFrame,this.replInput.getValue()),Z(this.tree),this.history.add(this.replInput.getValue()),this.replInput.setValue("");const Ce=this.replInputLineCount>1;this.replInputLineCount=1,Ce&&this.bodyContentDimension&&this.layoutBodyContent(this.bodyContentDimension.height,this.bodyContentDimension.width)}}getVisibleContent(){let ue="";if(this.model){const Ce=this.textResourcePropertiesService.getEOL(this.model.uri),De=Ae=>{Ae.children.forEach(Pe=>{Pe.visible&&(ue+=Pe.element.toString().trimRight()+Ce,!Pe.collapsed&&Pe.children.length&&De(Pe))})};De(this.tree.getNode())}return(0,S.removeAnsiEscapeCodes)(ue)}layoutBodyContent(ue,Ce){this.bodyContentDimension=new t.Dimension(Ce,ue);const De=Math.min(this.replInput.getContentHeight(),ue);if(this.tree){const Ae=this.tree.scrollTop+this.tree.renderHeight>=this.tree.scrollHeight,Pe=ue-De;this.tree.getHTMLElement().style.height=`${Pe}px`,this.tree.layout(Pe,Ce),Ae&&Z(this.tree)}this.replInputContainer.style.height=`${De}px`,this.replInput.layout({width:Ce-30,height:De})}shouldShowFilterInHeader(){return!0}collapseAll(){this.tree.collapseAll()}getReplInput(){return this.replInput}focus(){setTimeout(()=>this.replInput.focus(),0)}getActionViewItem(ue){if(ue.id===be){const Ce=(this.tree?this.tree.getInput():void 0)??this.debugService.getViewModel().focusedSession;return this.instantiationService.createInstance(Ie,ue,Ce)}return super.getActionViewItem(ue)}get isMultiSessionView(){return this.debugService.getModel().getSessions(!0).filter(ue=>ue.hasSeparateRepl()&&!ne.has(ue)).length>1}get refreshScheduler(){const ue=new Set;return new A.RunOnceScheduler(async()=>{if(!this.tree.getInput())return;await this.tree.updateChildren(void 0,!0,!1,{diffIdentityProvider:ce});const Ce=this.tree.getInput();if(Ce){const Pe=async fe=>{for(const ye of fe)ye instanceof Y.ReplGroup&&(ye.autoExpand&&!ue.has(ye.getId())&&(ue.add(ye.getId()),await this.tree.expand(ye)),this.tree.isCollapsed(ye)||await Pe(ye.getChildren()))};await Pe(Ce.getReplElements())}const{total:De,filtered:Ae}=this.getFilterStats();this.filterWidget.updateBadge(De===Ae||De===0?void 0:(0,h.localize)(1,null,Ae,De))},kr.REFRESH_DELAY)}renderBody(ue){super.renderBody(ue),this.container=t.append(ue,ie(".repl")),this.treeContainer=t.append(this.container,ie(`.repl-tree.${R.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`)),this.createReplInput(this.container),this.createReplTree()}createReplTree(){this.replDelegate=new Q.ReplDelegate(this.configurationService,this.replOptions);const ue=this.configurationService.getValue("debug").console.wordWrap;this.treeContainer.classList.toggle("word-wrap",ue);const Ce=this.instantiationService.createInstance(X.LinkDetector);this.tree=this.instantiationService.createInstance(N.WorkbenchAsyncDataTree,"DebugRepl",this.treeContainer,this.replDelegate,[this.instantiationService.createInstance(Q.ReplVariablesRenderer,Ce),this.instantiationService.createInstance(Q.ReplSimpleElementsRenderer,Ce),new Q.ReplEvaluationInputsRenderer,this.instantiationService.createInstance(Q.ReplGroupRenderer,Ce),new Q.ReplEvaluationResultsRenderer(Ce),new Q.ReplRawObjectsRenderer(Ce)],new Q.ReplDataSource,{filter:this.filter,accessibilityProvider:new Q.ReplAccessibilityProvider,identityProvider:ce,mouseSupport:!1,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Ae=>Ae.toString(!0)},horizontalScrolling:!ue,setRowLineHeight:!1,supportDynamicHeights:ue,overrideStyles:{listBackground:this.getBackgroundColor()}}),this._register(this.tree.onDidChangeContentHeight(()=>{this.tree.scrollHeight!==this.previousTreeScrollHeight&&this.tree.scrollTop+this.tree.renderHeight>=this.previousTreeScrollHeight-2&&setTimeout(()=>{Z(this.tree)},0),this.previousTreeScrollHeight=this.tree.scrollHeight})),this._register(this.tree.onContextMenu(Ae=>this.onContextMenu(Ae)));let De;this._register(this.tree.onMouseClick(()=>{const Ae=window.getSelection();(!Ae||Ae.type!=="Range"||De===Ae.toString())&&this.replInput.focus(),De=Ae?Ae.toString():""})),this.selectSession(),this.styleElement=t.createStyleSheet(this.container),this.onDidStyleChange()}createReplInput(ue){this.replInputContainer=t.append(ue,ie(".repl-input-wrapper")),t.append(this.replInputContainer,ie(".repl-input-chevron"+x.ThemeIcon.asCSSSelector(q.debugConsoleEvaluationPrompt)));const{historyNavigationBackwardsEnablement:Ce,historyNavigationForwardsEnablement:De}=this._register((0,_.registerAndCreateHistoryNavigationContext)(this.scopedContextKeyService,this));this.setHistoryNavigationEnablement=fe=>{Ce.set(fe),De.set(fe)},j.CONTEXT_IN_DEBUG_REPL.bindTo(this.scopedContextKeyService).set(!0),this.scopedInstantiationService=this.instantiationService.createChild(new M.ServiceCollection([y.IContextKeyService,this.scopedContextKeyService]));const Ae=(0,U.getSimpleEditorOptions)();Ae.readOnly=!0,Ae.suggest={showStatusBar:!0};const Pe=this.configurationService.getValue("debug");Ae.acceptSuggestionOnEnter=Pe.console.acceptSuggestionOnEnter==="on"?"on":"off",Ae.ariaLabel=(0,h.localize)(2,null),this.replInput=this.scopedInstantiationService.createInstance(f.CodeEditorWidget,this.replInputContainer,Ae,(0,U.getSimpleCodeEditorWidgetOptions)()),this._register(this.replInput.onDidChangeModelContent(()=>{const fe=this.replInput.getModel();this.setHistoryNavigationEnablement(!!fe&&fe.getValue()==="");const ye=fe?Math.min(10,fe.getLineCount()):1;ye!==this.replInputLineCount&&(this.replInputLineCount=ye,this.bodyContentDimension&&this.layoutBodyContent(this.bodyContentDimension.height,this.bodyContentDimension.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(ue){const Ce=[];(0,v.createAndFillInContextMenuActions)(this.menu,{arg:ue.element,shouldForwardArgs:!1},Ce),this.contextMenuService.showContextMenu({getAnchor:()=>ue.anchor,getActions:()=>Ce,getActionsContext:()=>ue.element})}refreshReplElements(ue){if(this.tree&&this.isVisible()){if(this.refreshScheduler.isScheduled())return;this.refreshScheduler.schedule(ue?0:void 0)}}updateInputDecoration(){if(!this.replInput)return;const ue=[];if(this.isReadonly&&this.replInput.hasTextFocus()&&!this.replInput.getValue()){const Ce=(0,z.resolveColorValue)(z.editorForeground,this.themeService.getColorTheme())?.transparent(.4);ue.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:(0,h.localize)(3,null),color:Ce?Ce.toString():void 0}}})}this.replInput.setDecorationsByType("repl-decoration",te,ue)}saveState(){const ue=this.history.getHistory();ue.length?this.storageService.store(re,JSON.stringify(ue),1,0):this.storageService.remove(re,1);const Ce=this.filterWidget.getHistory();Ce.length?this.storageService.store(oe,JSON.stringify(Ce),1,0):this.storageService.remove(oe,1);const De=this.filterWidget.getFilterText();De?this.storageService.store(se,De,1,0):this.storageService.remove(se,1),super.saveState()}dispose(){this.replInput.dispose(),this.replElementsChangeListener?.dispose(),this.refreshScheduler.dispose(),this.modelChangeListener.dispose(),super.dispose()}};de.REFRESH_DELAY=50,de.URI=C.URI.parse(`${j.DEBUG_SCHEME}:replinput`),we([k.memoize],de.prototype,"refreshScheduler",null),de=we([F(1,j.IDebugService),F(2,L.IInstantiationService),F(3,B.IStorageService),F(4,x.IThemeService),F(5,a.IModelService),F(6,y.IContextKeyService),F(7,i.ICodeEditorService),F(8,W.IViewDescriptorService),F(9,T.IContextMenuService),F(10,D.IConfigurationService),F(11,o.ITextResourcePropertiesService),F(12,ee.IEditorService),F(13,O.IKeybindingService),F(14,P.IOpenerService),F(15,V.ITelemetryService),F(16,m.IMenuService),F(17,n.ILanguageFeaturesService)],de),e.Repl=de;let he=class Rr extends b.Disposable{get replConfiguration(){return this._replConfig}constructor(ue,Ce,De,Ae,Pe){super(),this.backgroundColorDelegate=Ce,this.configurationService=De,this.themeService=Ae,this.viewDescriptorService=Pe,this._onDidChange=this._register(new E.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.themeService.onDidColorThemeChange(fe=>this.update())),this._register(this.viewDescriptorService.onDidChangeLocation(fe=>{fe.views.some(ye=>ye.id===ue)&&this.update()})),this._register(this.configurationService.onDidChangeConfiguration(fe=>{(fe.affectsConfiguration("debug.console.lineHeight")||fe.affectsConfiguration("debug.console.fontSize")||fe.affectsConfiguration("debug.console.fontFamily"))&&this.update()})),this.update()}update(){const ue=this.configurationService.getValue("debug").console;this._replConfig={fontSize:ue.fontSize,fontFamily:ue.fontFamily,lineHeight:ue.lineHeight?ue.lineHeight:Rr.lineHeightEm*ue.fontSize,cssLineHeight:ue.lineHeight?`${ue.lineHeight}px`:`${Rr.lineHeightEm}em`,backgroundColor:this.themeService.getColorTheme().getColor(this.backgroundColorDelegate()),fontSizeForTwistie:ue.fontSize*Rr.lineHeightEm/2-8},this._onDidChange.fire()}};he.lineHeightEm=1.4,he=we([F(2,D.IConfigurationService),F(3,x.IThemeService),F(4,W.IViewDescriptorService)],he);class pe extends u.EditorAction{constructor(){super({id:"repl.action.acceptInput",label:(0,h.localize)(4,null),alias:"REPL Accept Input",precondition:j.CONTEXT_IN_DEBUG_REPL,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:3,weight:100}})}run(ue,Ce){g.SuggestController.get(Ce)?.cancelSuggestWidget(),ve(ue.get(W.IViewsService))?.acceptReplInput()}}class me extends u.EditorAction{constructor(){super({id:"repl.action.filter",label:(0,h.localize)(5,null),alias:"REPL Filter",precondition:j.CONTEXT_IN_DEBUG_REPL,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2084,weight:100}})}run(ue,Ce){ve(ue.get(W.IViewsService))?.focusFilter()}}class Se extends u.EditorAction{constructor(){super({id:"repl.action.copyAll",label:(0,h.localize)(6,null),alias:"Debug Console Copy All",precondition:j.CONTEXT_IN_DEBUG_REPL})}run(ue,Ce){const De=ue.get(w.IClipboardService),Ae=ve(ue.get(W.IViewsService));if(Ae)return De.writeText(Ae.getVisibleContent())}}(0,u.registerEditorAction)(pe),(0,u.registerEditorAction)(Se),(0,u.registerEditorAction)(me);class Ie extends $.FocusSessionActionViewItem{getSessions(){return this.debugService.getModel().getSessions(!0).filter(ue=>ue.hasSeparateRepl()&&!ne.has(ue))}mapFocusedSessionToSelected(ue){for(;ue.parentSession&&!ue.hasSeparateRepl();)ue=ue.parentSession;return ue}}function ve(ge){return ge.getActiveViewWithId(j.REPL_VIEW_ID)??void 0}const be="workbench.action.debug.selectRepl";(0,m.registerAction2)(class extends H.ViewAction{constructor(){super({id:be,viewId:j.REPL_VIEW_ID,title:(0,h.localize)(7,null),f1:!1,menu:{id:m.MenuId.ViewTitle,group:"navigation",when:y.ContextKeyExpr.and(y.ContextKeyExpr.equals("view",j.REPL_VIEW_ID),j.CONTEXT_MULTI_SESSION_REPL),order:20}})}async runInView(ge,ue,Ce){const De=ge.get(j.IDebugService);if(Ce&&Ce.state!==0&&Ce!==De.getViewModel().focusedSession){if(Ce.state!==2){const Ae=De.getModel().getSessions().find(Pe=>Pe.parentSession===Ce&&Pe.state===2);Ae&&(Ce=Ae)}await De.focusStackFrame(void 0,void 0,Ce,{explicit:!0})}await ue.selectSession(Ce)}}),(0,m.registerAction2)(class extends H.ViewAction{constructor(){super({id:"workbench.debug.panel.action.clearReplAction",viewId:j.REPL_VIEW_ID,title:{value:(0,h.localize)(8,null),original:"Clear Console"},f1:!0,icon:q.debugConsoleClearAll,menu:[{id:m.MenuId.ViewTitle,group:"navigation",when:y.ContextKeyExpr.equals("view",j.REPL_VIEW_ID),order:30},{id:m.MenuId.DebugConsoleContext,group:"z_commands",order:20}]})}runInView(ge,ue){ue.clearRepl(),p.status((0,h.localize)(9,null))}}),(0,m.registerAction2)(class extends H.ViewAction{constructor(){super({id:"debug.collapseRepl",title:(0,h.localize)(10,null),viewId:j.REPL_VIEW_ID,menu:{id:m.MenuId.DebugConsoleContext,group:"z_commands",order:10}})}runInView(ge,ue){ue.collapseAll(),ue.focus()}}),(0,m.registerAction2)(class extends H.ViewAction{constructor(){super({id:"debug.replPaste",title:(0,h.localize)(11,null),viewId:j.REPL_VIEW_ID,precondition:j.CONTEXT_DEBUG_STATE.notEqualsTo((0,j.getStateLabel)(0)),menu:{id:m.MenuId.DebugConsoleContext,group:"2_cutcopypaste",order:30}})}async runInView(ge,ue){const De=await ge.get(w.IClipboardService).readText();if(De){const Ae=ue.getReplInput();Ae.setValue(Ae.getValue().concat(De)),ue.focus();const Pe=Ae.getModel(),fe=Pe?Pe.getLineCount():0,ye=Pe?.getLineMaxColumn(fe);typeof fe=="number"&&typeof ye=="number"&&Ae.setPosition({lineNumber:fe,column:ye})}}}),(0,m.registerAction2)(class extends H.ViewAction{constructor(){super({id:"workbench.debug.action.copyAll",title:(0,h.localize)(12,null),viewId:j.REPL_VIEW_ID,menu:{id:m.MenuId.DebugConsoleContext,group:"2_cutcopypaste",order:20}})}async runInView(ge,ue){await ge.get(w.IClipboardService).writeText(ue.getVisibleContent())}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"debug.replCopy",title:(0,h.localize)(13,null),menu:{id:m.MenuId.DebugConsoleContext,group:"2_cutcopypaste",order:10}})}async run(ge,ue){const Ce=ge.get(w.IClipboardService),Ae=window.getSelection()?.toString();Ae&&Ae.length>0?await Ce.writeText(Ae):ue&&await Ce.writeText(ue.toString())}})}),define(ae[2853],le([1,0,10,2,22,5,533,384,173,377,54,42,64,37,15,38,26,84,7,446,215,2376,40,333,168,244,862,337,381,470,143,62,8,12,245,27]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModifiedElement=e.InsertElement=e.DeletedElement=e.fixedDiffEditorOptions=e.getOptimizedNestedCodeEditorWidgetOptions=e.fixedEditorOptions=void 0;const P={top:12,bottom:12};e.fixedEditorOptions={padding:P,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 B(){return{isSimpleWidget:!1,contributions:o.EditorExtensionsRegistry.getSomeEditorContributions([w.MenuPreventer.ID,D.SelectionClipboardContributionID,g.ContextMenuController.ID,v.SuggestController.ID,h.SnippetController2.ID,y.TabCompletionController.ID,m.AccessibilityHelpController.ID])}}e.getOptimizedNestedCodeEditorWidgetOptions=B,e.fixedDiffEditorOptions={...e.fixedEditorOptions,glyphMargin:!0,enableSplitViewResizing:!1,renderIndicators:!0,readOnly:!1,isInEmbeddedEditor:!0,renderOverviewRuler:!1,wordWrap:"off",diffWordWrap:"off",diffAlgorithm:"smart"};let V=class extends p.Disposable{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe){super(),this.cell=q,this.propertyHeaderContainer=X,this.notebookEditor=G,this.accessor=Q,this.contextMenuService=j,this.keybindingService=K,this.notificationService=Y,this.menuService=ee,this.contextKeyService=ie,this.themeService=re,this.telemetryService=oe}buildHeader(){const q=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 X=t.append(this.propertyHeaderContainer,t.$("div.property-status"));this._statusSpan=t.append(X,t.$("span")),this._description=t.append(X,t.$("span.property-description")),q?(this._statusSpan.textContent=this.accessor.changedLabel,this._statusSpan.style.fontWeight="bold",q.reason&&(this._description.textContent=q.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 O.WorkbenchToolBar(G,{actionViewItemProvider:Y=>{if(Y instanceof i.MenuItemAction)return new d.CodiconActionViewItem(Y,void 0,this.keybindingService,this.notificationService,this.contextKeyService,this.themeService,this.contextMenuService)}},this.menuService,this.contextKeyService,this.contextMenuService,this.keybindingService,this.telemetryService),this._register(this._toolbar),this._toolbar.context={cell:this.cell};const Q=this.contextKeyService.createScoped(G);this._register(Q),E.NOTEBOOK_DIFF_CELL_PROPERTY.bindTo(Q).set(!!q),this._propertyExpanded=E.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED.bindTo(Q),this._menu=this.menuService.createMenu(this.accessor.menuId,Q),this._register(this._menu);const K=[];(0,l.createAndFillInActionBarActions)(this._menu,{shouldForwardArgs:!0},K),this._toolbar.setActions(K),this._register(this._menu.onDidChange(()=>{const Y=[];(0,l.createAndFillInActionBarActions)(this._menu,{shouldForwardArgs:!0},Y),this._toolbar.setActions(Y)})),this._register(this.notebookEditor.onMouseUp(Y=>{if(!Y.event.target)return;const ee=Y.event.target;if(ee.classList.contains("codicon-notebook-collapsed")||ee.classList.contains("codicon-notebook-expanded")){const ie=ee.parentElement;if(!ie||!ie.classList.contains(this.accessor.prefix)||!ie.classList.contains("property-folding-indicator"))return;if(Y.target===this.cell){const oe=this.accessor.getFoldingState(this.cell);this.accessor.updateFoldingState(this.cell,oe===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 q=this.accessor.checkIfModified(this.cell);if(q){this._statusSpan.textContent=this.accessor.changedLabel,this._statusSpan.style.fontWeight="bold",q.reason&&(this._description.textContent=q.reason),this.propertyHeaderContainer.classList.add("modified");const X=[];(0,l.createAndFillInActionBarActions)(this._menu,void 0,X),this._toolbar.setActions(X)}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,T.renderIcon)(n.collapsedIcon)),this._propertyExpanded?.set(!1)):(t.reset(this._foldingIndicator,(0,T.renderIcon)(n.expandedIcon)),this._propertyExpanded?.set(!0))}};V=we([F(4,u.IContextMenuService),F(5,f.IKeybindingService),F(6,c.INotificationService),F(7,i.IMenuService),F(8,s.IContextKeyService),F(9,M.IThemeService),F(10,N.ITelemetryService)],V);class z extends p.Disposable{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z){super(),this.notebookEditor=q,this.cell=X,this.templateData=G,this.style=Q,this.instantiationService=j,this.languageService=K,this.modelService=Y,this.textModelService=ee,this.contextMenuService=ie,this.keybindingService=re,this.notificationService=oe,this.menuService=se,this.contextKeyService=te,this.configurationService=Z,this._metadataLocalDisposable=this._register(new p.DisposableStore),this._outputLocalDisposable=this._register(new p.DisposableStore),this._ignoreMetadata=!1,this._ignoreOutputs=!1,this._isDisposed=!1,this._metadataEditorDisposeStore=this._register(new p.DisposableStore),this._outputEditorDisposeStore=this._register(new p.DisposableStore),this._register(X.onDidLayoutChange(ne=>this.layout(ne))),this._register(X.onDidLayoutChange(ne=>this.updateBorders())),this.init(),this.buildBody(),this._register(X.onDidStateChange(()=>{this.updateOutputRendering(this.cell.renderOutput)}))}buildBody(){const q=this.templateData.body;switch(this._diffEditorContainer=this.templateData.diffEditorContainer,q.classList.remove("left","right","full"),this.style){case"left":q.classList.add("left");break;case"right":q.classList.add("right");break;default:q.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(X=>{let G=!1,Q=!1;if(X.affectsConfiguration("notebook.diff.ignoreMetadata")){const j=this.configurationService.getValue("notebook.diff.ignoreMetadata");j!==void 0&&this._ignoreMetadata!==j&&(this._ignoreMetadata=j,this._metadataLocalDisposable.clear(),this.configurationService.getValue("notebook.diff.ignoreMetadata")?this._disposeMetadata():(this.cell.metadataStatusHeight=25,this._buildMetadata(),this.updateMetadataRendering(),G=!0))}if(X.affectsConfiguration("notebook.diff.ignoreOutputs")){const j=this.configurationService.getValue("notebook.diff.ignoreOutputs");j!==void 0&&this._ignoreOutputs!==(j||this.notebookEditor.textModel?.transientOptions.transientOutputs)&&(this._ignoreOutputs=j||!!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(q){this.cell.outputFoldingState===k.PropertyFoldingState.Expanded?(this._outputInfoContainer.style.display="block",q?(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(q,X){const G={};try{const Q=JSON.parse(X),j=new Set([...Object.keys(Q)]);for(const Y of j)switch(Y){case"inputCollapsed":case"outputCollapsed":typeof Q[Y]=="boolean"?G[Y]=Q[Y]:G[Y]=q[Y];break;default:G[Y]=Q[Y];break}const K=this.notebookEditor.textModel.cells.indexOf(this.cell.modified.textModel);if(K<0)return;this.notebookEditor.textModel.applyEdits([{editType:3,index:K,metadata:G}],!0,void 0,()=>{},void 0,!0)}catch{}}async _buildMetadataEditor(){if(this._metadataEditorDisposeStore.clear(),this.cell instanceof k.SideBySideDiffElementViewModel){this._metadataEditor=this.instantiationService.createInstance(b.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:B(),modifiedEditor:B()}),this.layout({metadataHeight:!0}),this._metadataEditorDisposeStore.add(this._metadataEditor),this._metadataEditorContainer?.classList.add("diff");const q=await this.textModelService.createModelReference(r.CellUri.generateCellPropertyUri(this.cell.originalDocument.uri,this.cell.original.handle,R.Schemas.vscodeNotebookCellMetadata)),X=await this.textModelService.createModelReference(r.CellUri.generateCellPropertyUri(this.cell.modifiedDocument.uri,this.cell.modified.handle,R.Schemas.vscodeNotebookCellMetadata));this._metadataEditor.setModel({original:q.object.textEditorModel,modified:X.object.textEditorModel}),this._metadataEditorDisposeStore.add(q),this._metadataEditorDisposeStore.add(X),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(X.object.textEditorModel.onDidChangeContent(()=>{G=!0;const Q=X.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);X.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 q=this.languageService.createById("jsonc"),X=(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,j=r.CellUri.generateCellPropertyUri(G,Q,R.Schemas.vscodeNotebookCellMetadata),K=this.modelService.createModel(X,q,j,!1);this._metadataEditor.setModel(K),this._metadataEditorDisposeStore.add(K),this.cell.metadataHeight=this._metadataEditor.getContentHeight(),this._metadataEditorDisposeStore.add(this._metadataEditor.onDidContentSizeChange(Y=>{Y.contentHeightChanged&&this.cell.metadataFoldingState===k.PropertyFoldingState.Expanded&&(this.cell.metadataHeight=Y.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||[]),j=(0,k.getFormattedOutputJSON)(this.cell.modified?.outputs||[]);if(Q!==j){const K=this.languageService.createById("json"),Y=this.modelService.createModel(Q,K,void 0,!0),ee=this.modelService.createModel(j,K,void 0,!0);this._outputEditorDisposeStore.add(Y),this._outputEditorDisposeStore.add(ee);const ie=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,re=Math.max(Y.getLineCount(),ee.getLineCount());this._outputEditor=this.instantiationService.createInstance(b.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||ie*re),width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0)}},{originalEditor:B(),modifiedEditor:B()}),this._outputEditorDisposeStore.add(this._outputEditor),this._outputEditorContainer?.classList.add("diff"),this._outputEditor.setModel({original:Y,modified:ee}),this._outputEditor.restoreViewState(this.cell.getOutputEditorViewState()),this.cell.rawOutputHeight=this._outputEditor.getContentHeight(),this._outputEditorDisposeStore.add(this._outputEditor.onDidContentSizeChange(oe=>{oe.contentHeightChanged&&this.cell.outputFoldingState===k.PropertyFoldingState.Expanded&&(this.cell.rawOutputHeight=oe.contentHeight)})),this._outputEditorDisposeStore.add(this.cell.modified.textModel.onDidChangeOutputs(()=>{const oe=(0,k.getFormattedOutputJSON)(this.cell.modified?.outputs||[]);ee.setValue(oe),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 q=this.languageService.createById("json"),X=(0,k.getFormattedOutputJSON)(this.notebookEditor.textModel.transientOptions.transientOutputs?[]:this.cell.type==="insert"?this.cell.modified.outputs||[]:this.cell.original.outputs||[]),G=this.modelService.createModel(X,q,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 x extends z{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z){super(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z),this.cell=X,this.templateData=G}init(){this._diagonalFill=this.templateData.diagonalFill}buildBody(){const q=this.templateData.body;switch(this._diffEditorContainer=this.templateData.diffEditorContainer,q.classList.remove("left","right","full"),this.style){case"left":q.classList.add("left");break;case"right":q.classList.add("right");break;default:q.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(X=>{let G=!1,Q=!1;X.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)),X.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(V,this.cell,this._metadataHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateMetadataRendering.bind(this),checkIfModified:q=>q.checkMetadataIfModified(),getFoldingState:q=>q.metadataFoldingState,updateFoldingState:(q,X)=>{q.metadataFoldingState=X},unChangedLabel:"Metadata",changedLabel:"Metadata changed",prefix:"metadata",menuId:i.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(V,this.cell,this._outputHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateOutputRendering.bind(this),checkIfModified:q=>q.checkIfOutputsModified(),getFoldingState:q=>q.outputFoldingState,updateFoldingState:(q,X)=>{q.outputFoldingState=X},unChangedLabel:"Outputs",changedLabel:"Outputs changed",prefix:"output",menuId:i.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 H=class extends x{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te){super(q,X,G,"left",Y,Q,j,K,ee,ie,re,oe,se,te)}styleContainer(q){q.classList.remove("inserted"),q.classList.add("removed")}updateSourceEditor(){const q=this.cell.original,X=q.textModel.textBuffer.getLineCount(),G=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,Q=X*G+P.top+P.bottom;this._editor=this.templateData.sourceEditor,this._editor.layout({width:(this.notebookEditor.getLayoutInfo().width-2*E.DIFF_CELL_MARGIN)/2-18,height:Q}),this.cell.editorHeight=Q,this._register(this._editor.onDidContentSizeChange(j=>{j.contentHeightChanged&&this.cell.layoutInfo.editorHeight!==j.contentHeight&&(this.cell.editorHeight=j.contentHeight)})),this.textModelService.createModelReference(q.uri).then(j=>{if(this._isDisposed)return;this._register(j);const K=j.object.textEditorModel;this._editor.setModel(K),this.cell.editorHeight=this._editor.getContentHeight()})}layout(q){t.scheduleAtNextAnimationFrame(()=>{(q.editorHeight||q.outerWidth)&&this._editor.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.editorHeight}),(q.metadataHeight||q.outerWidth)&&this._metadataEditor?.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.metadataHeight}),(q.outputTotalHeight||q.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 q=t.append(this._outputEmptyElement,t.$("span"));q.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(a.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.original,E.DiffSide.Original,this._outputViewContainer),this._register(this._outputLeftView),this._outputLeftView.render();const X=this.notebookEditor.onDidDynamicOutputRendered(G=>{G.cell.uri.toString()===this.cell.original.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(E.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[]),X.dispose())});this._register(X)}this._outputViewContainer.style.display="block"}_decorate(){this.notebookEditor.deltaCellOutputContainerClassNames(E.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()}};H=we([F(3,C.ILanguageService),F(4,S.IModelService),F(5,_.ITextModelService),F(6,A.IInstantiationService),F(7,u.IContextMenuService),F(8,f.IKeybindingService),F(9,c.INotificationService),F(10,i.IMenuService),F(11,s.IContextKeyService),F(12,L.IConfigurationService)],H),e.DeletedElement=H;let W=class extends x{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te){super(q,X,G,"right",Q,j,K,Y,ee,ie,re,oe,se,te)}styleContainer(q){q.classList.remove("removed"),q.classList.add("inserted")}updateSourceEditor(){const q=this.cell.modified,X=q.textModel.textBuffer.getLineCount(),G=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,Q=X*G+P.top+P.bottom;this._editor=this.templateData.sourceEditor,this._editor.layout({width:(this.notebookEditor.getLayoutInfo().width-2*E.DIFF_CELL_MARGIN)/2-18,height:Q}),this._editor.updateOptions({readOnly:!1}),this.cell.editorHeight=Q,this._register(this._editor.onDidContentSizeChange(j=>{j.contentHeightChanged&&this.cell.layoutInfo.editorHeight!==j.contentHeight&&(this.cell.editorHeight=j.contentHeight)})),this.textModelService.createModelReference(q.uri).then(j=>{if(this._isDisposed)return;this._register(j);const K=j.object.textEditorModel;this._editor.setModel(K),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(a.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.modified,E.DiffSide.Modified,this._outputViewContainer),this._register(this._outputRightView),this._outputRightView.render();const q=this.notebookEditor.onDidDynamicOutputRendered(X=>{X.cell.uri.toString()===this.cell.modified.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(E.DiffSide.Modified,this.cell.modified.id,["nb-cellAdded"],[]),q.dispose())});this._register(q)}this._outputViewContainer.style.display="block"}_decorate(){this.notebookEditor.deltaCellOutputContainerClassNames(E.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(q){t.scheduleAtNextAnimationFrame(()=>{(q.editorHeight||q.outerWidth)&&this._editor.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!1),height:this.cell.layoutInfo.editorHeight}),(q.metadataHeight||q.outerWidth)&&this._metadataEditor?.layout({width:this.cell.getComputedCellContainerWidth(this.notebookEditor.getLayoutInfo(),!1,!0),height:this.cell.layoutInfo.metadataHeight}),(q.outputTotalHeight||q.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()}};W=we([F(3,A.IInstantiationService),F(4,C.ILanguageService),F(5,S.IModelService),F(6,_.ITextModelService),F(7,u.IContextMenuService),F(8,f.IKeybindingService),F(9,c.INotificationService),F(10,i.IMenuService),F(11,s.IContextKeyService),F(12,L.IConfigurationService)],W),e.InsertElement=W;let U=class extends z{constructor(q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te){super(q,X,G,"full",Q,j,K,Y,ee,ie,re,oe,se,te),this.cell=X,this.templateData=G,this._editorViewStateChanged=!1}init(){}styleContainer(q){q.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(V,this.cell,this._metadataHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateMetadataRendering.bind(this),checkIfModified:q=>q.checkMetadataIfModified(),getFoldingState:q=>q.metadataFoldingState,updateFoldingState:(q,X)=>{q.metadataFoldingState=X},unChangedLabel:"Metadata",changedLabel:"Metadata changed",prefix:"metadata",menuId:i.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(V,this.cell,this._outputHeaderContainer,this.notebookEditor,{updateInfoRendering:this.updateOutputRendering.bind(this),checkIfModified:q=>q.checkIfOutputsModified(),getFoldingState:q=>q.outputFoldingState,updateFoldingState:(q,X)=>{q.outputFoldingState=X},unChangedLabel:"Outputs",changedLabel:"Outputs changed",prefix:"output",menuId:i.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 q=this.cell.checkIfOutputsModified(),X=q&&q.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(q&&!X){const G=this.notebookEditor.onDidDynamicOutputRendered(j=>{j.cell.uri.toString()===this.cell.original.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(E.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[]),G.dispose())}),Q=this.notebookEditor.onDidDynamicOutputRendered(j=>{j.cell.uri.toString()===this.cell.modified.uri.toString()&&(this.notebookEditor.deltaCellOutputContainerClassNames(E.DiffSide.Modified,this.cell.modified.id,["nb-cellAdded"],[]),Q.dispose())});this._register(G),this._register(Q)}if(this._outputLeftView=this.instantiationService.createInstance(a.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.original,E.DiffSide.Original,this._outputLeftContainer),this._outputLeftView.render(),this._register(this._outputLeftView),this._outputRightView=this.instantiationService.createInstance(a.OutputContainer,this.notebookEditor,this.notebookEditor.textModel,this.cell,this.cell.modified,E.DiffSide.Modified,this._outputRightContainer),this._outputRightView.render(),this._register(this._outputRightView),q&&!X&&this._decorate(),X){this._outputMetadataContainer.style.top=`${this.cell.layoutInfo.rawOutputHeight}px`,this._outputMetadataEditor=this.instantiationService.createInstance(b.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:B(),modifiedEditor:B()}),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," "),j=this.languageService.createById("json"),K=this.modelService.createModel(G,j,void 0,!0),Y=this.modelService.createModel(Q,j,void 0,!0);this._outputMetadataEditor.setModel({original:K,modified:Y}),this.cell.outputMetadataHeight=this._outputMetadataEditor.getContentHeight(),this._register(this._outputMetadataEditor.onDidContentSizeChange(ee=>{this.cell.outputMetadataHeight=ee.contentHeight}))}}this._outputViewContainer.style.display="block"}_decorate(){this.cell.checkIfOutputsModified()&&(this.notebookEditor.deltaCellOutputContainerClassNames(E.DiffSide.Original,this.cell.original.id,["nb-cellDeleted"],[]),this.notebookEditor.deltaCellOutputContainerClassNames(E.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 X=this.cell.modified.textModel.textBuffer.getLineCount(),G=this.notebookEditor.getLayoutInfo().fontInfo.lineHeight||17,Q=this.cell.layoutInfo.editorHeight!==0?this.cell.layoutInfo.editorHeight:X*G+P.top+P.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*E.DIFF_CELL_MARGIN,height:Q}),this._editorContainer.style.height=`${Q}px`,this._register(this._editor.onDidContentSizeChange(ie=>{ie.contentHeightChanged&&this.cell.layoutInfo.editorHeight!==ie.contentHeight&&(this.cell.editorHeight=ie.contentHeight)})),this._initializeSourceDiffEditor();const j=this.contextKeyService.createScoped(this.templateData.inputToolbarContainer);this._register(j);const K=E.NOTEBOOK_DIFF_CELL_INPUT.bindTo(j);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",K.set(!0)):(this._inputToolbarContainer.style.display="none",K.set(!1)),this._register(this.cell.modified.textModel.onDidChangeContent(()=>{this.cell.modified.textModel.getValue()!==this.cell.original.textModel.getValue()?(this._inputToolbarContainer.style.display="block",K.set(!0)):(this._inputToolbarContainer.style.display="none",K.set(!1))}));const Y=this.menuService.createMenu(i.MenuId.NotebookDiffCellInputTitle,j),ee=[];(0,l.createAndFillInActionBarActions)(Y,{shouldForwardArgs:!0},ee),this._toolbar.setActions(ee),Y.dispose()}async _initializeSourceDiffEditor(){const q=this.cell.original,X=this.cell.modified,G=await this.textModelService.createModelReference(q.uri),Q=await this.textModelService.createModelReference(X.uri);if(this._isDisposed)return;const j=G.object.textEditorModel,K=Q.object.textEditorModel;this._register(G),this._register(Q),this._editor.setModel({original:j,modified:K});const Y=()=>{this._editorViewStateChanged=!0},ee=oe=>{(oe.scrollTopChanged||oe.scrollLeftChanged)&&(this._editorViewStateChanged=!0)};this._register(this._editor.getOriginalEditor().onDidChangeCursorSelection(Y)),this._register(this._editor.getOriginalEditor().onDidScrollChange(ee)),this._register(this._editor.getModifiedEditor().onDidChangeCursorSelection(Y)),this._register(this._editor.getModifiedEditor().onDidScrollChange(ee));const ie=this.cell.getSourceEditorViewState();ie&&(console.log("restore view state",this.cell.modified.handle,ie),this._editor.restoreViewState(ie));const re=this._editor.getContentHeight();this.cell.editorHeight=re}layout(q){t.scheduleAtNextAnimationFrame(()=>{q.editorHeight&&(this._editorContainer.style.height=`${this.cell.layoutInfo.editorHeight}px`,this._editor.layout({width:this._editor.getViewWidth(),height:this.cell.layoutInfo.editorHeight})),q.outerWidth&&(this._editorContainer.style.height=`${this.cell.layoutInfo.editorHeight}px`,this._editor.layout()),(q.metadataHeight||q.outerWidth)&&this._metadataEditorContainer&&(this._metadataEditorContainer.style.height=`${this.cell.layoutInfo.metadataHeight}px`,this._metadataEditor?.layout()),(q.outputTotalHeight||q.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._editorViewStateChanged&&this.cell.saveSpirceEditorViewState(this._editor.saveViewState()),super.dispose()}};U=we([F(3,A.IInstantiationService),F(4,C.ILanguageService),F(5,S.IModelService),F(6,_.ITextModelService),F(7,u.IContextMenuService),F(8,f.IKeybindingService),F(9,c.INotificationService),F(10,i.IMenuService),F(11,s.IContextKeyService),F(12,L.IConfigurationService)],U),e.ModifiedElement=U}),define(ae[2854],le([1,0,10,196,2,8,7,5,38,76,12,384,14,2853,173,377,15,37,26,446,282,86,245,1155]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextDiffList=e.NotebookMouseController=e.CellDiffSideBySideRenderer=e.CellDiffSingleSideRenderer=e.NotebookCellTextDiffListDelegate=void 0;let g=class{constructor(y){this.configurationService=y;const T=this.configurationService.getValue("editor");this.lineHeight=n.BareFontInfo.createFromRawSettings(T,a.PixelRatio.value).lineHeight}getHeight(y){return y.getHeight(this.lineHeight)}hasDynamicHeight(y){return!1}getTemplateId(y){switch(y.type){case"delete":case"insert":return h.TEMPLATE_ID;case"modified":case"unchanged":return v.TEMPLATE_ID}}};g=we([F(0,A.IConfigurationService)],g),e.NotebookCellTextDiffListDelegate=g;let h=class Wl{constructor(y,T){this.notebookEditor=y,this.instantiationService=T}get templateId(){return Wl.TEMPLATE_ID}renderTemplate(y){const T=t.$(".cell-body");t.append(y,T);const _=t.$(".cell-diff-editor-container");t.append(T,_);const L=t.append(T,t.$(".diagonal-fill")),M=t.append(_,t.$(".source-container")),O=this._buildSourceEditor(M),N=t.append(_,t.$(".metadata-header-container")),P=t.append(_,t.$(".metadata-info-container")),B=t.append(_,t.$(".output-header-container")),V=t.append(_,t.$(".output-info-container")),z=t.append(T,t.$(".border-container")),x=t.append(z,t.$(".left-border")),H=t.append(z,t.$(".right-border")),W=t.append(z,t.$(".top-border")),U=t.append(z,t.$(".bottom-border"));return{body:T,container:y,diffEditorContainer:_,diagonalFill:L,sourceEditor:O,metadataHeaderContainer:N,metadataInfoContainer:P,outputHeaderContainer:B,outputInfoContainer:V,leftBorder:x,rightBorder:H,topBorder:W,bottomBorder:U,elementDisposables:new R.DisposableStore}}_buildSourceEditor(y){const T=t.append(y,t.$(".editor-container"));return this.instantiationService.createInstance(i.CodeEditorWidget,T,{...u.fixedEditorOptions,dimension:{width:(this.notebookEditor.getLayoutInfo().width-2*C.DIFF_CELL_MARGIN)/2-18,height:0},automaticLayout:!1,overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode()},{})}renderElement(y,T,_,L){switch(_.body.classList.remove("left","right","full"),y.type){case"delete":_.elementDisposables.add(this.instantiationService.createInstance(u.DeletedElement,this.notebookEditor,y,_));return;case"insert":_.elementDisposables.add(this.instantiationService.createInstance(u.InsertElement,this.notebookEditor,y,_));return;default:break}}disposeTemplate(y){y.container.innerText="",y.sourceEditor.dispose(),y.elementDisposables.dispose()}disposeElement(y,T,_){_.elementDisposables.clear()}};h.TEMPLATE_ID="cell_diff_single",h=we([F(1,E.IInstantiationService)],h),e.CellDiffSingleSideRenderer=h;let v=class zl{constructor(y,T,_,L,M,O,N,P){this.notebookEditor=y,this.instantiationService=T,this.contextMenuService=_,this.keybindingService=L,this.menuService=M,this.contextKeyService=O,this.notificationService=N,this.themeService=P}get templateId(){return zl.TEMPLATE_ID}renderTemplate(y){const T=t.$(".cell-body");t.append(y,T);const _=t.$(".cell-diff-editor-container");t.append(T,_);const L=t.append(_,t.$(".source-container")),{editor:M,editorContainer:O}=this._buildSourceEditor(L),N=t.append(L,t.$(".editor-input-toolbar-container")),P=t.append(N,t.$("div.property-toolbar")),B=this.instantiationService.createInstance(o.WorkbenchToolBar,P,{actionViewItemProvider:G=>{if(G instanceof c.MenuItemAction)return new d.CodiconActionViewItem(G,void 0,this.keybindingService,this.notificationService,this.contextKeyService,this.themeService,this.contextMenuService)}}),V=t.append(_,t.$(".metadata-header-container")),z=t.append(_,t.$(".metadata-info-container")),x=t.append(_,t.$(".output-header-container")),H=t.append(_,t.$(".output-info-container")),W=t.append(T,t.$(".border-container")),U=t.append(W,t.$(".left-border")),$=t.append(W,t.$(".right-border")),q=t.append(W,t.$(".top-border")),X=t.append(W,t.$(".bottom-border"));return{body:T,container:y,diffEditorContainer:_,sourceEditor:M,editorContainer:O,inputToolbarContainer:N,toolbar:B,metadataHeaderContainer:V,metadataInfoContainer:z,outputHeaderContainer:x,outputInfoContainer:H,leftBorder:U,rightBorder:$,topBorder:q,bottomBorder:X,elementDisposables:new R.DisposableStore}}_buildSourceEditor(y){const T=t.append(y,t.$(".editor-container"));return{editor:this.instantiationService.createInstance(f.DiffEditorWidget,T,{...u.fixedDiffEditorOptions,padding:{top:24,bottom:12},overflowWidgetsDomNode:this.notebookEditor.getOverflowContainerDomNode(),originalEditable:!1,ignoreTrimWhitespace:!1,automaticLayout:!1,dimension:{height:0,width:0}},{originalEditor:(0,u.getOptimizedNestedCodeEditorWidgetOptions)(),modifiedEditor:(0,u.getOptimizedNestedCodeEditorWidgetOptions)()}),editorContainer:T}}renderElement(y,T,_,L){switch(_.body.classList.remove("left","right","full"),y.type){case"unchanged":_.elementDisposables.add(this.instantiationService.createInstance(u.ModifiedElement,this.notebookEditor,y,_));return;case"modified":_.elementDisposables.add(this.instantiationService.createInstance(u.ModifiedElement,this.notebookEditor,y,_));return;default:break}}disposeTemplate(y){y.container.innerText="",y.sourceEditor.dispose(),y.toolbar?.dispose(),y.elementDisposables.dispose()}disposeElement(y,T,_){_.toolbar&&(_.toolbar.context=void 0),_.elementDisposables.clear()}};v.TEMPLATE_ID="cell_diff_side_by_side",v=we([F(1,E.IInstantiationService),F(2,l.IContextMenuService),F(3,I.IKeybindingService),F(4,c.IMenuService),F(5,k.IContextKeyService),F(6,s.INotificationService),F(7,S.IThemeService)],v),e.CellDiffSideBySideRenderer=v;class m extends p.MouseController{onViewPointer(y){if((0,p.isMonacoEditor)(y.browserEvent.target)){const T=typeof y.index>"u"?[]:[y.index];this.list.setFocus(T,y.browserEvent)}else super.onViewPointer(y)}}e.NotebookMouseController=m;let w=class extends b.WorkbenchList{get rowsContainer(){return this.view.containerDomNode}constructor(y,T,_,L,M,O,N,P,B,V){super(y,T,_,L,O,M,N,P,B,V)}createMouseController(y){return new m(this)}getAbsoluteTopOfElement(y){const T=this.indexOf(y);return this.view.elementTop(T)}getScrollHeight(){return this.view.scrollHeight}triggerScrollFromMouseWheelEvent(y){this.view.delegateScrollFromMouseWheelEvent(y)}delegateVerticalScrollbarPointerDown(y){this.view.delegateVerticalScrollbarPointerDown(y)}clear(){super.splice(0,this.length)}updateElementHeight2(y,T){const _=this.indexOf(y),L=this.getFocus();this.view.updateElementHeight(_,T,L.length?L[0]:null)}style(y){const T=this.view.domId;this.styleElement||(this.styleElement=t.createStyleSheet(this.view.domNode));const _=T&&`.${T}`,L=[];y.listBackground&&(y.listBackground.isOpaque()?L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows { background: ${y.listBackground}; }`):r.isMacintosh||console.warn(`List with id '${T}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),y.listFocusBackground&&(L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${y.listFocusBackground}; }`),L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${y.listFocusBackground}; }`)),y.listFocusForeground&&L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { color: ${y.listFocusForeground}; }`),y.listActiveSelectionBackground&&(L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${y.listActiveSelectionBackground}; }`),L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${y.listActiveSelectionBackground}; }`)),y.listActiveSelectionForeground&&L.push(`.monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${y.listActiveSelectionForeground}; }`),y.listFocusAndSelectionBackground&&L.push(` .monaco-drag-image, .monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { background-color: ${y.listFocusAndSelectionBackground}; } `),y.listFocusAndSelectionForeground&&L.push(` .monaco-drag-image, .monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected.focused { color: ${y.listFocusAndSelectionForeground}; } `),y.listInactiveFocusBackground&&(L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { background-color: ${y.listInactiveFocusBackground}; }`),L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused:hover { background-color: ${y.listInactiveFocusBackground}; }`)),y.listInactiveSelectionBackground&&(L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { background-color: ${y.listInactiveSelectionBackground}; }`),L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected:hover { background-color: ${y.listInactiveSelectionBackground}; }`)),y.listInactiveSelectionForeground&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { color: ${y.listInactiveSelectionForeground}; }`),y.listHoverBackground&&L.push(`.monaco-list${_}:not(.drop-target) > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${y.listHoverBackground}; }`),y.listHoverForeground&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover:not(.selected):not(.focused) { color: ${y.listHoverForeground}; }`),y.listSelectionOutline&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.selected { outline: 1px dotted ${y.listSelectionOutline}; outline-offset: -1px; }`),y.listFocusOutline&&L.push(` .monaco-drag-image, .monaco-list${_}:focus > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px solid ${y.listFocusOutline}; outline-offset: -1px; } `),y.listInactiveFocusOutline&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row.focused { outline: 1px dotted ${y.listInactiveFocusOutline}; outline-offset: -1px; }`),y.listHoverOutline&&L.push(`.monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows > .monaco-list-row:hover { outline: 1px dashed ${y.listHoverOutline}; outline-offset: -1px; }`),y.listDropBackground&&L.push(` .monaco-list${_}.drop-target, .monaco-list${_} > div.monaco-scrollable-element > .monaco-list-rows.drop-target, .monaco-list${_} > div.monaco-scrollable-element > .monaco-list-row.drop-target { background-color: ${y.listDropBackground} !important; color: inherit !important; } `);const M=L.join(` `);M!==this.styleElement.textContent&&(this.styleElement.textContent=M)}};w=we([F(6,b.IListService),F(7,S.IThemeService),F(8,A.IConfigurationService),F(9,E.IInstantiationService)],w),e.NotebookTextDiffList=w}),define(ae[2855],le([1,0,7,5,175,64,977,2,12,275,16,174,8,134]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CellComments=void 0;let i=class extends R.CellPart{constructor(c,l,s,d,n,a,o){super(),this.notebookEditor=c,this.container=l,this.contextKeyService=s,this.themeService=d,this.commentService=n,this.configurationService=a,this.instantiationService=o,this._initialized=!1,this._commentThreadWidget=null,this.commentTheadDisposables=this._register(new E.DisposableStore),this.container.classList.add("review-widget"),this._register(this.themeService.onDidColorThemeChange(this._applyTheme,this)),this._applyTheme()}async initialize(c){if(this._initialized)return;this._initialized=!0;const l=await this._getCommentThreadForCell(c);l&&this._createCommentTheadWidget(l.owner,l.thread)}_createCommentTheadWidget(c,l){this._commentThreadWidget?.dispose(),this.commentTheadDisposables.clear(),this._commentThreadWidget=this.instantiationService.createInstance(k.CommentThreadWidget,this.container,c,this.notebookEditor.textModel.uri,this.contextKeyService,this.instantiationService,l,null,{codeBlockFontFamily:this.configurationService.getValue("editor").fontFamily||u.EDITOR_FONT_DEFAULTS.fontFamily},void 0,{actionRunner:()=>{},collapse:()=>{}});const s=this.notebookEditor.getLayoutInfo();this._commentThreadWidget.display(s.fontInfo.lineHeight),this._applyTheme(),this.commentTheadDisposables.add(this._commentThreadWidget.onDidResize(()=>{this.currentElement?.cellKind===A.CellKind.Code&&this._commentThreadWidget&&(this.currentElement.commentHeight=this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height))}))}_bindListeners(){this.cellDisposables.add(this.commentService.onDidUpdateCommentThreads(async()=>{if(this.currentElement){const c=await this._getCommentThreadForCell(this.currentElement);if(!this._commentThreadWidget&&c){this._createCommentTheadWidget(c.owner,c.thread);const l=this.currentElement.layoutInfo;this.container.style.top=`${l.outputContainerOffset+l.outputTotalHeight}px`,this.currentElement.commentHeight=this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);return}if(this._commentThreadWidget){if(!c){this._commentThreadWidget.dispose(),this.currentElement.commentHeight=0;return}if(this._commentThreadWidget.commentThread===c.thread){this.currentElement.commentHeight=this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height);return}this._commentThreadWidget.updateCommentThread(c.thread),this.currentElement.commentHeight=this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height)}}}))}_calculateCommentThreadHeight(c){const l=this.notebookEditor.getLayoutInfo(),s=Math.ceil(l.fontInfo.lineHeight*1.2),d=l.fontInfo.lineHeight,n=Math.round(d/3),a=Math.round(d/9)*2;return s+c+n+a+8}async _getCommentThreadForCell(c){if(this.notebookEditor.hasModel()){const l=(0,S.coalesce)(await this.commentService.getNotebookComments(c.uri));if(l.length&&l[0].threads.length)return{owner:l[0].owner,thread:l[0].threads[0]}}return null}_applyTheme(){const c=this.themeService.getColorTheme(),l=this.notebookEditor.getLayoutInfo().fontInfo;this._commentThreadWidget?.applyTheme(c,l)}didRenderCell(c){c.cellKind===A.CellKind.Code&&(this.currentElement=c,this.initialize(c),this._bindListeners())}prepareLayout(){this.currentElement?.cellKind===A.CellKind.Code&&this._commentThreadWidget&&(this.currentElement.commentHeight=this._calculateCommentThreadHeight(this._commentThreadWidget.getDimensions().height))}updateInternalLayoutNow(c){if(this.currentElement?.cellKind===A.CellKind.Code&&this._commentThreadWidget){const l=c.layoutInfo;this.container.style.top=`${l.outputContainerOffset+l.outputTotalHeight}px`}}};i=we([F(2,t.IContextKeyService),F(3,I.IThemeService),F(4,b.ICommentService),F(5,r.IConfigurationService),F(6,p.IInstantiationService)],i),e.CellComments=i,(0,I.registerThemingParticipant)((f,c)=>{const l=f.getColor(C.peekViewBorder);l&&(c.addRule(`.cell-comment-container.review-widget { border-left: 1px solid ${l}; border-right: 1px solid ${l}; }`),c.addRule(`.cell-comment-container.review-widget > .head { border-top: 1px solid ${l}; }`),c.addRule(`.cell-comment-container.review-widget > .body { border-bottom: 1px solid ${l}; }`));const s=f.getColor(C.peekViewResultsBackground);s&&c.addRule(`.cell-comment-container.review-widget { background-color: ${s};}`)})}),define(ae[2856],le([1,0,86,10,121,2,173,282,59,125,1788,15,8,7,37,5,151,38,26,175,2855,943,2341,875,2342,668,2361,2343,2355,2362,2623,2345,2673,2357,2344,2377,2464,2465,64]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeCellRenderer=e.MarkupCellRenderer=e.NotebookCellListDelegate=void 0;const z=p.$;let x=class extends A.Disposable{constructor(q){super(),this.configurationService=q;const X=this.configurationService.getValue("editor");this.lineHeight=E.BareFontInfo.createFromRawSettings(X,t.PixelRatio.value).lineHeight}getHeight(q){return q.getHeight(this.lineHeight)}hasDynamicHeight(q){return q.hasDynamicHeight()}getDynamicHeight(q){return q.getDynamicHeight()}getTemplateId(q){return q.cellKind===V.CellKind.Markup?W.TEMPLATE_ID:U.TEMPLATE_ID}};x=we([F(0,r.IConfigurationService)],x),e.NotebookCellListDelegate=x;class H{constructor(q,X,G,Q,j,K,Y,ee,ie,re){this.instantiationService=q,this.notebookEditor=X,this.contextMenuService=G,this.menuService=Q,this.keybindingService=K,this.notificationService=Y,this.contextKeyServiceProvider=ee,this.dndController=re,this.editorOptions=new v.CellEditorOptions(this.notebookEditor.getBaseCellEditorOptions(ie),this.notebookEditor.notebookOptions,j)}dispose(){this.editorOptions.dispose(),this.dndController=void 0}}let W=class Ul extends H{constructor(q,X,G,Q,j,K,Y,ee,ie,re){super(K,q,Y,ee,j,ie,re,Q,"markdown",X),this.renderedEditors=G}get templateId(){return Ul.TEMPLATE_ID}renderTemplate(q){q.classList.add("markdown-cell-row");const X=p.append(q,p.$(".cell-inner-container")),G=new A.DisposableStore,Q=G.add(this.contextKeyServiceProvider(X)),j=p.append(q,z(".cell-decoration")),K=p.append(X,z(".cell-title-toolbar")),Y=new R.FastDomNode(p.append(X,z(".cell-focus-indicator.cell-focus-indicator-top"))),ee=new R.FastDomNode(p.append(X,p.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-left"))),ie=p.append(ee.domNode,p.$(".notebook-folding-indicator")),re=new R.FastDomNode(p.append(X,p.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-right"))),oe=p.append(X,z(".cell.code")),se=p.append(oe,z(".cell-editor-part")),te=p.append(oe,z(".input-collapse-container")),Z=p.append(se,z(".cell-editor-container"));se.style.display="none";const ne=p.append(X,z(".cell-comment-container")),ce=p.append(X,z(".cell.markdown")),de=p.append(X,z(".cell-bottom-toolbar-container")),he=this.instantiationService.createChild(new c.ServiceCollection([u.IContextKeyService,Q])),pe={toggle:(be,ge)=>X.classList.toggle(be,ge)},me=G.add(he.createInstance(_.CellTitleToolbarPart,K,pe,this.notebookEditor.creationOptions.menuIds.cellTitleToolbar,this.notebookEditor.creationOptions.menuIds.cellDeleteToolbar,this.notebookEditor)),Se=new R.FastDomNode(p.append(X,z(".cell-focus-indicator.cell-focus-indicator-bottom"))),Ie=new d.CellPartsCollection([me,G.add(he.createInstance(_.BetweenCellToolbar,this.notebookEditor,K,de)),G.add(he.createInstance(T.CellEditorStatusBar,this.notebookEditor,X,se,void 0)),G.add(new D.CellFocusIndicator(this.notebookEditor,me,Y,ee,re,Se)),G.add(new P.FoldedCellHint(this.notebookEditor,p.append(X,z(".notebook-folded-hint")))),G.add(new o.CellDecorations(q,j)),G.add(he.createInstance(n.CellComments,this.notebookEditor,ne)),G.add(new O.CollapsedCellInput(this.notebookEditor,te)),G.add(new w.CellFocusPart(X,void 0,this.notebookEditor)),G.add(new g.CellDragAndDropPart(X)),G.add(he.createInstance(a.CellContextKeyPart,this.notebookEditor))]);return{rootContainer:q,cellInputCollapsedContainer:te,instantiationService:he,container:X,cellContainer:ce,editorPart:se,editorContainer:Z,foldingIndicator:ie,templateDisposables:G,elementDisposables:new A.DisposableStore,cellParts:Ie,toJSON:()=>({})}}renderElement(q,X,G,Q){if(!this.notebookEditor.hasModel())throw new Error("The notebook editor is not attached with view model yet.");G.currentRenderedCell=q,G.currentEditor=void 0,G.editorPart.style.display="none",G.cellContainer.innerText="",Q!==void 0&&G.elementDisposables.add(G.instantiationService.createInstance(B.MarkupCell,this.notebookEditor,q,G,this.renderedEditors))}disposeTemplate(q){q.elementDisposables.dispose(),q.templateDisposables.dispose()}disposeElement(q,X,G){G.elementDisposables.clear()}};W.TEMPLATE_ID="markdown_cell",W=we([F(4,r.IConfigurationService),F(5,f.IInstantiationService),F(6,i.IContextMenuService),F(7,C.IMenuService),F(8,l.IKeybindingService),F(9,s.INotificationService)],W),e.MarkupCellRenderer=W;let U=class Hl extends H{constructor(q,X,G,Q,j,K,Y,ee,ie,re){super(ee,q,K,Y,j,ie,re,Q,b.PLAINTEXT_LANGUAGE_ID,G),this.renderedEditors=X}get templateId(){return Hl.TEMPLATE_ID}renderTemplate(q){q.classList.add("code-cell-row");const X=p.append(q,p.$(".cell-inner-container")),G=new A.DisposableStore,Q=G.add(this.contextKeyServiceProvider(X)),j=p.append(q,z(".cell-decoration")),K=new R.FastDomNode(p.append(X,z(".cell-focus-indicator.cell-focus-indicator-top"))),Y=p.append(X,z(".cell-title-toolbar")),ee=new R.FastDomNode(p.append(X,p.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-left"))),ie=p.append(X,z(".cell.code")),re=p.append(ie,z(".run-button-container")),oe=p.append(ie,z(".input-collapse-container")),se=p.append(ee.domNode,z("div.execution-count-label"));se.title=(0,S.localize)(0,null);const te=p.append(ie,z(".cell-editor-part")),Z=p.append(te,z(".cell-editor-container")),ne=p.append(X,z(".cell-comment-container")),ce=G.add(this.contextKeyServiceProvider(te)),de=this.instantiationService.createChild(new c.ServiceCollection([u.IContextKeyService,ce]));I.EditorContextKeys.inCompositeEditor.bindTo(ce).set(!0);const he=de.createInstance(k.CodeEditorWidget,Z,{...this.editorOptions.getDefaultValue(),dimension:{width:0,height:0}},{contributions:this.notebookEditor.creationOptions.cellEditorContributions});G.add(he);const pe=new R.FastDomNode(p.append(X,z(".output"))),me=p.append(pe.domNode,z(".output-collapse-container")),Se=new R.FastDomNode(p.append(X,z(".output-show-more-container"))),Ie=new R.FastDomNode(p.append(X,p.$(".cell-focus-indicator.cell-focus-indicator-side.cell-focus-indicator-right"))),ve=p.append(X,z(".cell-editor-focus-sink"));ve.setAttribute("tabindex","0");const be=p.append(X,z(".cell-bottom-toolbar-container")),ge=new R.FastDomNode(p.append(X,z(".cell-focus-indicator.cell-focus-indicator-bottom"))),ue=this.instantiationService.createChild(new c.ServiceCollection([u.IContextKeyService,Q])),Ce={toggle:(ke,Ee)=>X.classList.toggle(ke,Ee)},De=G.add(ue.createInstance(_.CellTitleToolbarPart,Y,Ce,this.notebookEditor.creationOptions.menuIds.cellTitleToolbar,this.notebookEditor.creationOptions.menuIds.cellDeleteToolbar,this.notebookEditor)),Ae=G.add(new D.CellFocusIndicator(this.notebookEditor,De,K,ee,Ie,ge)),Pe=new d.CellPartsCollection([Ae,De,G.add(ue.createInstance(_.BetweenCellToolbar,this.notebookEditor,Y,be)),G.add(ue.createInstance(T.CellEditorStatusBar,this.notebookEditor,X,te,he)),G.add(ue.createInstance(y.CellProgressBar,te,oe)),G.add(ue.createInstance(M.RunToolbar,this.notebookEditor,Q,X,re)),G.add(new o.CellDecorations(q,j)),G.add(ue.createInstance(n.CellComments,this.notebookEditor,ne)),G.add(ue.createInstance(m.CellExecutionPart,this.notebookEditor,se)),G.add(ue.createInstance(N.CollapsedCellOutput,this.notebookEditor,me)),G.add(new O.CollapsedCellInput(this.notebookEditor,oe)),G.add(new w.CellFocusPart(X,ve,this.notebookEditor)),G.add(new g.CellDragAndDropPart(X)),G.add(ue.createInstance(a.CellContextKeyPart,this.notebookEditor))]),fe={rootContainer:q,editorPart:te,cellInputCollapsedContainer:oe,cellOutputCollapsedContainer:me,instantiationService:ue,container:X,cellContainer:ie,focusSinkElement:ve,outputContainer:pe,outputShowMoreContainer:Se,editor:he,templateDisposables:G,elementDisposables:new A.DisposableStore,cellParts:Pe,toJSON:()=>({})},ye=[ee.domNode,Ae.codeFocusIndicator.domNode,Ae.outputFocusIndicator.domNode];return this.dndController?.registerDragHandle(fe,q,ye,()=>new h.CodeCellDragImageRenderer().getDragImage(fe,fe.editor,"code")),fe}renderElement(q,X,G,Q){if(!this.notebookEditor.hasModel())throw new Error("The notebook editor is not attached with view model yet.");G.currentRenderedCell=q,Q!==void 0&&(G.outputContainer.domNode.innerText="",G.outputContainer.domNode.appendChild(G.cellOutputCollapsedContainer),G.elementDisposables.add(G.instantiationService.createInstance(L.CodeCell,this.notebookEditor,q,G)),this.renderedEditors.set(q,G.editor))}disposeTemplate(q){q.templateDisposables.clear()}disposeElement(q,X,G,Q){G.elementDisposables.clear(),this.renderedEditors.delete(q)}};U.TEMPLATE_ID="code_cell",U=we([F(4,r.IConfigurationService),F(5,i.IContextMenuService),F(6,C.IMenuService),F(7,f.IInstantiationService),F(8,l.IKeybindingService),F(9,s.INotificationService)],U),e.CodeCellRenderer=U}),define(ae[555],le([1,0,86,10,110,11,65,21,6,2,14,18,72,422,282,20,244,1774,15,8,7,37,5,151,198,798,66,27,33,12,80,521,101,287,267,2339,529,943,875,944,945,2856,547,2350,461,2624,2351,2466,2502,2352,2353,64,152,448,162,228,449,645,142,688,40,58,2348,25,348,1156,1157,1158,1159,1160,1161]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.notebookEditorBackground=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 Se=p.$;function Ie(){const be=["editor.contrib.review",me.FloatingClickMenu.ID],ge=ce.EditorExtensionsRegistry.getEditorContributions().filter(ue=>be.indexOf(ue.id)===-1);return{menuIds:{notebookToolbar:s.MenuId.NotebookToolbar,cellTitleToolbar:s.MenuId.NotebookCellTitle,cellDeleteToolbar:s.MenuId.NotebookCellDelete,cellInsertToolbar:s.MenuId.NotebookCellBetween,cellTopInsertToolbar:s.MenuId.NotebookCellListTop,cellExecuteToolbar:s.MenuId.NotebookCellExecute,cellExecutePrimary:s.MenuId.NotebookCellExecutePrimary},cellEditorContributions:ge}}e.getDefaultNotebookCreationOptions=Ie;let ve=class extends b.Disposable{get isDisposed(){return this._isDisposed}set viewModel(ge){this._notebookViewModel=ge,this._onDidChangeModel.fire(ge?.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[ge]=this._list.getFocusedElements();return this._renderedEditors.get(ge)}get visibleRanges(){return this._list.visibleRanges||[]}get notebookOptions(){return this._notebookOptions}constructor(ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e,Re,Le,Me,Oe,Ke){super(),this.creationOptions=ge,this.notebookRendererMessaging=Ae,this.notebookEditorService=Pe,this.notebookKernelService=fe,this._notebookService=ye,this.configurationService=ke,this.layoutService=Te,this.contextMenuService=_e,this.telemetryService=Re,this.notebookExecutionService=Le,this.editorProgressService=Oe,this.logService=Ke,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._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._onDidResizeOutputEmitter=this._register(new I.Emitter),this.onDidResizeOutput=this._onDidResizeOutputEmitter.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 b.DisposableStore),this._localCellStateListeners=[],this._shadowElementViewInfo=null,this._contributions=new Map,this._insetModifyQueueByOutputId=new A.SequencerByKey,this._cellContextKeyManager=null,this._isVisible=!1,this._uuid=(0,r.generateUuid)(),this._webviewFocused=!1,this._isDisposed=!1,this._baseCellEditorOptions=new Map,this._debugFlag=!1,this._backgroundMarkdownRenderRunning=!1,this._lastCellWithEditorFocus=null,this._pendingLayouts=new WeakMap,this._pendingOutputHeightAcks=new Map,this._dimension=ue,this.isEmbedded=ge.isEmbedded??!1,this._readOnly=ge.isReadOnly??!1,this._notebookOptions=ge.options??new se.NotebookOptions(this.configurationService,Me),this._register(this._notebookOptions),this._viewContext=new X.ViewContext(this._notebookOptions,new U.NotebookEventDispatcher,Je=>this.getBaseCellEditorOptions(Je)),this._register(this._viewContext.eventDispatcher.onDidChangeCellState(Je=>{this._onDidChangeCellState.fire(Je)})),this._overlayContainer=document.createElement("div"),this.scopedContextKeyService=Ee.createScoped(this._overlayContainer),this.instantiationService=Ce.createChild(new g.ServiceCollection([n.IContextKeyService,this.scopedContextKeyService])),this._register(ye.onDidChangeOutputRenderers(()=>{this._updateOutputRenderers()})),this._register(this.instantiationService.createInstance(Q.NotebookEditorContextKeys,this)),this._register(fe.onDidChangeSelectedNotebooks(Je=>{(0,C.isEqual)(Je.notebook,this.viewModel?.uri)&&(this._loadKernelPreloads(),this._onDidChangeActiveKernel.fire())})),this._scrollBeyondLastLine=this.configurationService.getValue("editor.scrollBeyondLastLine"),this._register(this.configurationService.onDidChangeConfiguration(Je=>{Je.affectsConfiguration("editor.scrollBeyondLastLine")&&(this._scrollBeyondLastLine=this.configurationService.getValue("editor.scrollBeyondLastLine"),this._dimension&&this._isVisible&&this.layout(this._dimension))})),this._register(this._notebookOptions.onDidChangeOptions(Je=>{(Je.cellStatusBarVisibility||Je.cellToolbarLocation||Je.cellToolbarInteraction)&&this._updateForNotebookConfiguration(),Je.fontFamily&&this._generateFontInfo(),(Je.compactView||Je.focusIndicator||Je.insertToolbarPosition||Je.cellToolbarLocation||Je.dragAndDropEnabled||Je.fontSize||Je.outputFontSize||Je.markupFontSize||Je.fontFamily||Je.outputFontFamily||Je.insertToolbarAlignment||Je.outputLineHeight)&&(this._styleElement?.remove(),this._createLayoutStyles(),this._webview?.updateOptions({...this.notebookOptions.computeWebviewOptions(),fontFamily:this._generateFontFamily()})),this._dimension&&this._isVisible&&this.layout(this._dimension)})),this._register(De.onDidScroll(()=>{!this._shadowElement||!this._isVisible||(this.updateShadowElement(this._shadowElement),this.layoutContainerOverShadowElement(this._dimension))})),this.notebookEditorService.addNotebookEditor(this);const We=(0,r.generateUuid)();this._overlayContainer.id=`notebook-${We}`,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=ee.NOTEBOOK_EDITOR_FOCUSED.bindTo(this.scopedContextKeyService),this._outputFocus=ee.NOTEBOOK_OUTPUT_FOCUSED.bindTo(this.scopedContextKeyService),this._editorEditable=ee.NOTEBOOK_EDITOR_EDITABLE.bindTo(this.scopedContextKeyService),this._cursorNavMode=ee.NOTEBOOK_CURSOR_NAVIGATION_MODE.bindTo(this.scopedContextKeyService),this._editorEditable.set(!ge.isReadOnly);let Xe;Array.isArray(this.creationOptions.contributions)?Xe=this.creationOptions.contributions:Xe=M.NotebookEditorExtensionsRegistry.getEditorContributions();for(const Je of Xe){let rt;try{rt=this.instantiationService.createInstance(Je.ctor,this)}catch(je){(0,E.onUnexpectedError)(je)}if(rt)if(!this._contributions.has(Je.id))this._contributions.set(Je.id,rt);else throw rt.dispose(),new Error(`DUPLICATE notebook editor contribution: '${Je.id}'`)}this._updateForNotebookConfiguration()}_debug(...ge){!this._debugFlag||(0,N.notebookDebug)(...ge)}getId(){return this._uuid}_getViewModel(){return this.viewModel}getLength(){return this.viewModel?.length??0}getSelections(){return this.viewModel?.getSelections()??[]}setSelections(ge){if(!this.viewModel)return;const ue=this.viewModel.getFocus();this.viewModel.updateSelectionsState({kind:Y.SelectionStateType.Index,focus:ue,selections:ge})}getFocus(){return this.viewModel?.getFocus()??{start:0,end:0}}setFocus(ge){if(!this.viewModel)return;const ue=this.viewModel.getSelections();this.viewModel.updateSelectionsState({kind:Y.SelectionStateType.Index,focus:ge,selections:ue})}getSelectionViewModels(){if(!this.viewModel)return[];const ge=new Set;return this.viewModel.getSelections().map(ue=>this.viewModel.viewCells.slice(ue.start,ue.end)).reduce((ue,Ce)=>(Ce.forEach(De=>{ge.has(De.handle)||(ge.add(De.handle),ue.push(De))}),ue),[])}hasModel(){return!!this._notebookViewModel}showProgress(){this._currentProgress=this.editorProgressService.show(!0)}hideProgress(){this._currentProgress&&(this._currentProgress.done(),this._currentProgress=void 0)}getBaseCellEditorOptions(ge){const ue=this._baseCellEditorOptions.get(ge);if(ue)return ue;{const Ce=new he.BaseCellEditorOptions(this,this.notebookOptions,this.configurationService,ge);return this._baseCellEditorOptions.set(ge,Ce),Ce}}_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 ge=this._notebookOptions.computeCellToolbarLocation(this.viewModel?.viewType);this._overlayContainer.classList.add(`cell-title-toolbar-${ge}`);const ue=this._notebookOptions.getLayoutConfiguration().cellToolbarInteraction;let Ce="hover";this._overlayContainer.classList.remove("cell-toolbar-hover"),this._overlayContainer.classList.remove("cell-toolbar-click"),(ue==="hover"||ue==="click")&&(Ce=ue),this._overlayContainer.classList.add(`cell-toolbar-${Ce}`)}_generateFontInfo(){const ge=this.configurationService.getValue("editor");this._fontInfo=u.FontMeasurements.readFontInfo(i.BareFontInfo.createFromRawSettings(ge,t.PixelRatio.value))}_createBody(ge){this._notebookTopToolbarContainer=document.createElement("div"),this._notebookTopToolbarContainer.classList.add("notebook-toolbar-container"),this._notebookTopToolbarContainer.tabIndex=0,this._notebookTopToolbarContainer.style.display="none",p.append(ge,this._notebookTopToolbarContainer),this._body=document.createElement("div"),p.append(ge,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"),p.append(ge,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=p.createStyleSheet(this._body);const{cellRightMargin:ge,cellTopMargin:ue,cellRunGutter:Ce,cellBottomMargin:De,codeCellLeftMargin:Ae,markdownCellGutter:Pe,markdownCellLeftMargin:fe,markdownCellBottomMargin:ye,markdownCellTopMargin:ke,collapsedIndicatorHeight:Ee,compactView:Te,focusIndicator:_e,insertToolbarPosition:Re,insertToolbarAlignment:Le,fontSize:Me,focusIndicatorLeftMargin:Oe,focusIndicatorGap:Ke}=this._notebookOptions.getLayoutConfiguration(),{bottomToolbarGap:We,bottomToolbarHeight:Xe}=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType),Je=[];this._fontInfo||this._generateFontInfo();const rt=this._generateFontFamily();Je.push(` :root { --notebook-cell-output-font-size: ${Me}px; --notebook-cell-output-font-family: ${rt}; --notebook-cell-input-preview-font-size: ${Me}px; --notebook-cell-input-preview-font-family: ${rt}; } `),Te?Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row div.cell.code { margin-left: ${Ae+Ce}px; }`):Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row div.cell.code { margin-left: ${Ae}px; }`),_e==="border"?(Je.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; } `),Je.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: -${ue}px; height: calc(100% + ${ue+De}px) }`)):(Je.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: ${Oe}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: ${Oe-1}px; } `),Je.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: ${Ke}px; } `)),Re==="betweenCells"||Re==="both"?(Je.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container { display: flex; }"),Je.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .cell-list-top-cell-toolbar-container { display: flex; }")):(Je.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-bottom-toolbar-container { display: none; }"),Je.push(".monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .cell-list-top-cell-toolbar-container { display: none; }")),Le==="left"&&(Je.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; }`),Je.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; }`),Je.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+Ae}px; }`),Je.push(` .monaco-workbench .notebookOverlay .cell-list-top-cell-toolbar-container, .notebookOverlay .cell-bottom-toolbar-container .action-item { border: 0px; }`));const je=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);Je.push(`.notebookOverlay .cell-list-top-cell-toolbar-container { top: -${je-3}px }`),Je.push(`.notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element, .notebookOverlay > .cell-list-container > .notebook-gutter > .monaco-list > .monaco-scrollable-element { padding-top: ${je}px !important; box-sizing: border-box; }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .code-cell-row div.cell.code { margin-left: ${Ae+Ce}px; }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row div.cell { margin-right: ${ge}px; }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row > .cell-inner-container { padding-top: ${ue}px; }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .markdown-cell-row > .cell-inner-container { padding-bottom: ${ye}px; padding-top: ${ke}px; }`),Je.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; }"),Je.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: ${ye}px; padding-top: ${ke}px; }`),Je.push(`.notebookOverlay .output { margin: 0px ${ge}px 0px ${Ae+Ce}px; }`),Je.push(`.notebookOverlay .output { width: calc(100% - ${Ae+Ce+ge}px); }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-comment-container { left: ${Ae+Ce}px; }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .cell-comment-container { width: calc(100% - ${Ae+Ce+ge}px); }`),Je.push(`.monaco-workbench .notebookOverlay .output .output-collapse-container .expandButton { left: -${Ce}px; }`),Je.push(`.monaco-workbench .notebookOverlay .output .output-collapse-container .expandButton { position: absolute; width: ${Ce}px; padding: 6px 0px; }`),Je.push(`.notebookOverlay .output-show-more-container { margin: 0px ${ge}px 0px ${Ae+Ce}px; }`),Je.push(`.notebookOverlay .output-show-more-container { width: calc(100% - ${Ae+Ce+ge}px); }`),Je.push(`.notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row div.cell.markdown { padding-left: ${Ce}px; }`),Je.push(`.monaco-workbench .notebookOverlay > .cell-list-container .notebook-folding-indicator { left: ${(Pe-20)/2+fe}px; }`),Je.push(`.notebookOverlay > .cell-list-container .notebook-folded-hint { left: ${Pe+fe+8}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row :not(.webview-backed-markdown-cell) .cell-focus-indicator-top { height: ${ue}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-side { bottom: ${We}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row.code-cell-row .cell-focus-indicator-left { width: ${Ae+Ce}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row .cell-focus-indicator-left { width: ${Ae}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator.cell-focus-indicator-right { width: ${ge}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-focus-indicator-bottom { height: ${De}px; }`),Je.push(`.notebookOverlay .monaco-list .monaco-list-row .cell-shadow-container-bottom { top: ${De}px; }`),Je.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: ${Ee}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: ${Ee}px; } `),Je.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: ${Xe}px }`),Je.push(`.monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .cell-list-top-cell-toolbar-container .monaco-toolbar { height: ${Xe}px }`),Je.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: ${ge+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: ${Ae+Ce+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; }`),Je.push(` .monaco-workbench .notebookOverlay .output > div.foreground.output-inner-container { padding: ${se.OutputInnerContainerTopPadding}px 8px; } .monaco-workbench .notebookOverlay > .cell-list-container > .monaco-list > .monaco-scrollable-element > .monaco-list-rows > .monaco-list-row .output-collapse-container { padding: ${se.OutputInnerContainerTopPadding}px 8px; } `),this._styleElement.textContent=Je.join(` `)}_createCellList(){this._body.classList.add("cell-list-container"),this._dndController=this._register(new V.CellDragAndDropController(this,this._body));const ge=Ce=>this._list.contextKeyService.createScoped(Ce),ue=[this.instantiationService.createInstance(H.CodeCellRenderer,this,this._renderedEditors,this._dndController,ge),this.instantiationService.createInstance(H.MarkupCellRenderer,this,this._dndController,this._renderedEditors,ge)];ue.forEach(Ce=>{this._register(Ce)}),this._listDelegate=this.instantiationService.createInstance(H.NotebookCellListDelegate),this._register(this._listDelegate),this._list=this.instantiationService.createInstance(z.NotebookCellList,"NotebookCellList",this._body,this._viewContext,this._listDelegate,ue,this.scopedContextKeyService,{setRowLineHeight:!1,setRowHeight:!1,supportDynamicHeights:!0,horizontalScrolling:!1,keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!0,selectionNavigation:!0,typeNavigationEnabled:!0,additionalScrollHeight:0,transformOptimization:!1,initialSize:this._dimension,styleController:Ce=>this._list,overrideStyles:{listBackground:e.notebookEditorBackground,listActiveSelectionBackground:e.notebookEditorBackground,listActiveSelectionForeground:D.foreground,listFocusAndSelectionBackground:e.notebookEditorBackground,listFocusAndSelectionForeground:D.foreground,listFocusBackground:e.notebookEditorBackground,listFocusForeground:D.foreground,listHoverForeground:D.foreground,listHoverBackground:e.notebookEditorBackground,listHoverOutline:D.focusBorder,listFocusOutline:D.focusBorder,listInactiveSelectionBackground:e.notebookEditorBackground,listInactiveSelectionForeground:D.foreground,listInactiveFocusBackground:e.notebookEditorBackground,listInactiveFocusOutline:e.notebookEditorBackground},accessibilityProvider:{getAriaLabel:Ce=>{if(!this.viewModel)return"";const De=this.viewModel.getCellIndex(Ce);return De>=0?`Cell ${De}, ${Ce.cellKind===Y.CellKind.Markup?"markdown":"code"} cell`:""},getWidgetAriaLabel(){return l.localize(0,null)}}}),this._dndController.setList(this._list),this._register(this._list),this._listViewInfoAccessor=new z.ListViewInfoAccessor(this._list),this._register(this._listViewInfoAccessor),this._register((0,b.combinedDisposable)(...ue)),this._listTopCellToolbar=this._register(this.instantiationService.createInstance(K.ListTopCellToolbar,this,this.scopedContextKeyService,this._list.rowsContainer)),this._webviewTransparentCover=p.append(this._list.rowsContainer,Se(".webview-cover")),this._webviewTransparentCover.style.display="none",this._register(p.addStandardDisposableGenericMouseDownListener(this._overlayContainer,Ce=>{Ce.target.classList.contains("slider")&&this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="block")})),this._register(p.addStandardDisposableGenericMouseUpListener(this._overlayContainer,()=>{this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="none")})),this._register(this._list.onMouseDown(Ce=>{Ce.element&&this._onMouseDown.fire({event:Ce.browserEvent,target:Ce.element})})),this._register(this._list.onMouseUp(Ce=>{Ce.element&&this._onMouseUp.fire({event:Ce.browserEvent,target:Ce.element})})),this._register(this._list.onDidChangeFocus(Ce=>{this._onDidChangeActiveEditor.fire(this),this._onDidChangeActiveCell.fire(),this._cursorNavMode.set(!1)})),this._register(this._list.onContextMenu(Ce=>{this.showListContextMenu(Ce)})),this._register(this._list.onDidChangeVisibleRanges(()=>{this._onDidChangeVisibleRanges.fire()})),this._register(this._list.onDidScroll(Ce=>{this._onDidScroll.fire(),Ce.scrollTop!==Ce.oldScrollTop&&this._renderedEditors.forEach((De,Ae)=>{this.getActiveCell()===Ae&&De&&c.SuggestController.get(De)?.cancelSuggestWidget()})})),this._focusTracker=this._register(p.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(ge){this.contextMenuService.showContextMenu({menuId:s.MenuId.NotebookCellTitle,contextKeyService:this.scopedContextKeyService,getAnchor:()=>ge.anchor})}_registerNotebookOverviewRuler(){this._notebookOverviewRuler=this._register(this.instantiationService.createInstance(j.NotebookOverviewRuler,this,this._notebookOverviewRulerContainer))}_registerNotebookActionsToolbar(){this._notebookTopToolbar=this._register(this.instantiationService.createInstance(G.NotebookEditorToolbar,this,this.scopedContextKeyService,this._notebookOptions,this._notebookTopToolbarContainer)),this._register(this._notebookTopToolbar.onDidChangeState(()=>{this._dimension&&this._isVisible&&this.layout(this._dimension)}))}_updateOutputRenderers(){!this.viewModel||!this._webview||(this._webview.updateOutputRenderers(),this.viewModel.viewCells.forEach(ge=>{ge.outputsViewModels.forEach(ue=>{ue.pickedMimeType?.rendererId===Y.RENDERER_NOT_AVAILABLE&&ue.resetRenderer()})}))}getDomNode(){return this._overlayContainer}getOverflowContainerDomNode(){return this._overflowContainer}getInnerWebview(){return this._webview?.webview}setParentContextKeyService(ge){this.scopedContextKeyService.updateParent(ge)}async setModel(ge,ue,Ce){if(this.viewModel===void 0||!this.viewModel.equal(ge)){const De=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType),Ae=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType);this._detachModel(),await this._attachModel(ge,ue,Ce);const Pe=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType),fe=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType);(De!==Pe||Ae.bottomToolbarGap!==fe.bottomToolbarGap||Ae.bottomToolbarHeight!==fe.bottomToolbarHeight)&&(this._styleElement?.remove(),this._createLayoutStyles(),this._webview?.updateOptions({...this.notebookOptions.computeWebviewOptions(),fontFamily:this._generateFontFamily()})),this.telemetryService.publicLog2("notebook/editorOpened",{scheme:ge.uri.scheme,ext:(0,C.extname)(ge.uri),viewType:ge.viewType})}else this.restoreListViewState(ue);this._restoreSelectedKernel(ue),this._loadKernelPreloads(),this._dndController?.clearGlobalDragState(),this._localStore.add(this._list.onDidChangeFocus(()=>{this.updateContextKeysOnFocusChange()})),this.updateContextKeysOnFocusChange(),this._backgroundMarkdownRendering()}_backgroundMarkdownRendering(){this._backgroundMarkdownRenderRunning||(this._backgroundMarkdownRenderRunning=!0,(0,A.runWhenIdle)(ge=>{this._backgroundMarkdownRenderingWithDeadline(ge)}))}_backgroundMarkdownRenderingWithDeadline(ge){const ue=Date.now()+ge.timeRemaining(),Ce=()=>{try{if(this._backgroundMarkdownRenderRunning=!0,this._isDisposed||!this.viewModel)return;const De=this.viewModel.viewCells.find(Ae=>Ae.cellKind===Y.CellKind.Markup&&!this._webview?.markupPreviewMapping.has(Ae.id)&&!this.cellIsHidden(Ae));if(!De)return;this.createMarkupPreview(De)}finally{this._backgroundMarkdownRenderRunning=!1}Date.now()<ue?(0,S.setTimeout0)(Ce):this._backgroundMarkdownRendering()};Ce()}updateContextKeysOnFocusChange(){if(!this.viewModel)return;const ge=this._list.getFocusedElements()[0];ge&&(this._cellContextKeyManager||(this._cellContextKeyManager=this._localStore.add(this.instantiationService.createInstance(B.CellContextKeyManager,this,ge))),this._cellContextKeyManager.updateForElement(ge))}async setOptions(ge){if(ge?.isReadOnly!==void 0&&(this._readOnly=ge?.isReadOnly),!this.viewModel)return;this.viewModel.updateOptions({isReadOnly:this._readOnly});const ue=ge?.cellOptions??this._parseIndexedCellOptions(ge);if(ue){const Ce=this.viewModel.viewCells.find(De=>De.uri.toString()===ue.resource.toString());if(Ce){this.focusElement(Ce);const De=ue.options?.selection;De?(Ce.updateEditState(L.CellEditState.Editing,"setOptions"),Ce.focusMode=L.CellFocusMode.Editor,await this.revealLineInCenterIfOutsideViewportAsync(Ce,De.startLineNumber)):ge?.cellRevealType===L.CellRevealType.NearTopIfOutsideViewport?await this.revealNearTopIfOutsideViewportAync(Ce):await this.revealInCenterIfOutsideViewportAsync(Ce);const Ae=this._renderedEditors.get(Ce);if(Ae){if(ue.options?.selection){const{selection:Pe}=ue.options;Ae.setSelection({...Pe,endLineNumber:Pe.endLineNumber||Pe.startLineNumber,endColumn:Pe.endColumn||Pe.startColumn}),Ae.revealPositionInCenterIfOutsideViewport({lineNumber:Pe.startLineNumber,column:Pe.startColumn}),await this.revealLineInCenterIfOutsideViewportAsync(Ce,Pe.startLineNumber)}ue.options?.preserveFocus||Ae.focus()}}}if(ge?.cellSelections){const Ce=ge.cellSelections[0].start,De=this.viewModel.cellAt(Ce);De&&(this.viewModel.updateSelectionsState({kind:Y.SelectionStateType.Index,focus:{start:Ce,end:Ce+1},selections:ge.cellSelections}),this.revealInCenterIfOutsideViewport(De))}this._updateForOptions(),this._onDidChangeOptions.fire()}_parseIndexedCellOptions(ge){if(ge?.indexedCellOptions){const ue=this.cellAt(ge.indexedCellOptions.index);if(ue)return{resource:ue.uri,options:{selection:ge.indexedCellOptions.selection,preserveFocus:!1}}}}_detachModel(){this._localStore.clear(),(0,b.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.viewType,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._webviewFocused=!1,this.updateEditorFocus(),this.updateCellFocusMode()})),this._localStore.add(this._webview.webview.onDidFocus(()=>{this._outputFocus.set(!0),this.updateEditorFocus(),this._webviewFocused=!0})),this._localStore.add(this._webview.onMessage(ge=>{this._onDidReceiveMessage.fire(ge)})),this._webview})(),this._webviewResolvePromise):null}async _createWebview(ge,ue,Ce){const De=this;this._webview=this.instantiationService.createInstance(x.BackLayerWebView,{get creationOptions(){return De.creationOptions},setScrollTop(Ae){De._listViewInfoAccessor.setScrollTop(Ae)},triggerScroll(Ae){De._listViewInfoAccessor.triggerScroll(Ae)},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),didResizeOutput:De._didResizeOutput.bind(De)},ge,ue,Ce,{...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(ge,ue,Ce){await this._createWebview(this.getId(),ge.viewType,ge.uri),this.viewModel=this.instantiationService.createInstance(q.NotebookViewModel,ge.viewType,ge,this._viewContext,this.getLayoutInfo(),{isReadOnly:this._readOnly}),this._viewContext.eventDispatcher.emit([new P.NotebookLayoutChangedEvent({width:!0,fontInfo:!0},this.getLayoutInfo())]),this._updateForOptions(),this._updateForNotebookConfiguration();{this.viewModel.restoreEditorViewState(ue);const Ae=ue?.contributionsState||{};for(const[Pe,fe]of this._contributions)typeof fe.restoreViewState=="function"&&fe.restoreViewState(Ae[Pe])}this._localStore.add(this.viewModel.onDidChangeViewCells(Ae=>{this._onDidChangeViewCells.fire(Ae)})),this._localStore.add(this.viewModel.onDidChangeSelection(()=>{this._onDidChangeSelection.fire(),this.updateSelectedMarkdownPreviews()})),this._localStore.add(this._list.onWillScroll(Ae=>{this._webview?.isResolved()&&(this._webviewTransparentCover.style.transform=`translateY(${Ae.scrollTop})`)}));let De=!1;if(this._localStore.add(this._list.onDidChangeContentHeight(()=>{De||(De=!0,this._localStore.add(p.scheduleAtNextAnimationFrame(()=>{De=!1,this._updateScrollHeight()},100)))})),this._localStore.add(this._list.onDidRemoveOutputs(Ae=>{Ae.forEach(Pe=>this.removeInset(Pe))})),this._localStore.add(this._list.onDidHideOutputs(Ae=>{Ae.forEach(Pe=>this.hideInset(Pe))})),this._localStore.add(this._list.onDidRemoveCellsFromView(Ae=>{const Pe=[],fe=[];for(const ye of Ae)if(ye.cellKind===Y.CellKind.Markup){const ke=ye;this.viewModel?.viewCells.find(Ee=>Ee.handle===ke.handle)?Pe.push(ke):fe.push(ke)}this.hideMarkupPreviews(Pe),this.deleteMarkupPreviews(fe)})),await this._warmupWithMarkdownRenderer(this.viewModel,ue),Ce?.mark("customMarkdownLoaded"),this._localCellStateListeners=this.viewModel.viewCells.map(Ae=>this._bindCellListener(Ae)),this._lastCellWithEditorFocus=this.viewModel.viewCells.find(Ae=>this.getActiveCell()===Ae&&Ae.focusMode===L.CellFocusMode.Editor)??null,this._localStore.add(this.viewModel.onDidChangeViewCells(Ae=>{this._isDisposed||([...Ae.splices].reverse().forEach(Pe=>{const[fe,ye,ke]=Pe,Ee=this._localCellStateListeners.splice(fe,ye,...ke.map(Te=>this._bindCellListener(Te)));(0,b.dispose)(Ee)}),Ae.splices.some(Pe=>Pe[2].some(fe=>fe.cellKind===Y.CellKind.Markup))&&this._backgroundMarkdownRendering())})),this._dimension){const Ae=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType);this._list.layout(this._dimension.height-Ae,this._dimension.width)}else this._list.layout();this._dndController?.clearGlobalDragState(),this.restoreListViewState(ue)}_bindCellListener(ge){const ue=new b.DisposableStore;return ue.add(ge.onDidChangeLayout(Ce=>{(Ce.totalHeight!==void 0||Ce.outerWidth)&&this.layoutNotebookCell(ge,ge.layoutInfo.totalHeight,Ce.context)})),ge.cellKind===Y.CellKind.Code&&ue.add(ge.onDidRemoveOutputs(Ce=>{Ce.forEach(De=>this.removeInset(De))})),ue.add(ge.onDidChangeState(Ce=>{Ce.inputCollapsedChanged&&ge.isInputCollapsed&&ge.cellKind===Y.CellKind.Markup&&this.hideMarkupPreviews([ge]),Ce.outputCollapsedChanged&&ge.isOutputCollapsed&&ge.cellKind===Y.CellKind.Code&&ge.outputsViewModels.forEach(De=>this.hideInset(De)),Ce.focusModeChanged&&this._validateCellFocusMode(ge)})),ue}_validateCellFocusMode(ge){ge.focusMode===L.CellFocusMode.Editor&&(this._lastCellWithEditorFocus&&this._lastCellWithEditorFocus!==ge&&(this._lastCellWithEditorFocus.focusMode=L.CellFocusMode.Container),this._lastCellWithEditorFocus=ge)}async _warmupWithMarkdownRenderer(ge,ue){this.logService.trace("NotebookEditorWidget.warmup",this.viewModel?.uri.toString()),await this._resolveWebview(),this.logService.trace("NotebookEditorWidget.warmup - webview resolved"),this._webview.element.style.visibility="hidden",await this._warmupViewport(ge,ue),this.logService.trace("NotebookEditorWidget.warmup - viewport warmed up"),this._list.layout(0,0),this._list.attachViewModel(ge),this._list.scrollTop=ue?.scrollPosition?.top??0,this._debug("finish initial viewport warmup and view state restore."),this._webview.element.style.visibility="visible",this.logService.trace("NotebookEditorWidget.warmup - list view model attached, set to visible")}async _warmupViewport(ge,ue){if(ue&&ue.cellTotalHeights){const Ce=ue.cellTotalHeights,De=ue.scrollPosition?.top??0,Ae=De+Math.max(this._dimension?.height??0,1080);let Pe=0;const fe=[];for(let ye=0;ye<ge.length;ye++){const ke=ge.cellAt(ye);if(Pe+(Ce[ye]??0)<De){Pe+=Ce?Ce[ye]:0;continue}else ke.cellKind===Y.CellKind.Markup&&fe.push([ke,Pe]);if(Pe+=Ce?Ce[ye]:0,Pe>Ae)break}await this._webview.initializeMarkup(fe.map(([ye,ke])=>this.createMarkupCellInitialization(ye,ke)))}else{const Ce=ge.viewCells.filter(fe=>fe.cellKind===Y.CellKind.Markup).slice(0,5).map(fe=>this.createMarkupCellInitialization(fe,-1e4));await this._webview.initializeMarkup(Ce);let De=0;const Ae=[],Pe=Math.max(this._dimension?.height??0,1080);for(const fe of ge.viewCells)if(fe.cellKind===Y.CellKind.Markup&&Ae.push({id:fe.id,top:De}),De+=fe.getHeight(this.getLayoutInfo().fontInfo.lineHeight),De>Pe)break;this._webview?.updateScrollTops([],Ae)}}createMarkupCellInitialization(ge,ue){return{mime:ge.mime,cellId:ge.id,cellHandle:ge.handle,content:ge.getText(),offset:ue,visible:!1,metadata:ge.metadata}}restoreListViewState(ge){if(!this.viewModel)return;ge?.scrollPosition!==void 0?(this._list.scrollTop=ge.scrollPosition.top,this._list.scrollLeft=ge.scrollPosition.left):(this._list.scrollTop=0,this._list.scrollLeft=0);const ue=typeof ge?.focus=="number"?ge.focus:0;if(ue<this.viewModel.length){const Ce=this.viewModel.cellAt(ue);Ce&&this.viewModel?.updateSelectionsState({kind:Y.SelectionStateType.Handle,primary:Ce.handle,selections:[Ce.handle]})}else this._list.length>0&&this.viewModel.updateSelectionsState({kind:Y.SelectionStateType.Index,focus:{start:0,end:1},selections:[{start:0,end:1}]});if(ge?.editorFocused){const Ce=this.viewModel.cellAt(ue);Ce&&(Ce.focusMode=L.CellFocusMode.Editor)}}_restoreSelectedKernel(ge){if(ge?.selectedKernelId&&this.textModel){const ue=this.notebookKernelService.getMatchingKernel(this.textModel),Ce=ue.all.find(De=>De.id===ge.selectedKernelId);Ce&&!ue.selected&&this.notebookKernelService.selectKernelForNotebook(Ce,this.textModel)}}getEditorViewState(){const ge=this.viewModel?.getEditorViewState();if(!ge)return{editingCells:{},editorViewStates:{},collapsedInputCells:{},collapsedOutputCells:{}};if(this._list){ge.scrollPosition={left:this._list.scrollLeft,top:this._list.scrollTop};const Ce={};for(let De=0;De<this.viewModel.length;De++){const Ae=this.viewModel.cellAt(De);Ae.cellKind,Y.CellKind.Code,Ce[De]=Ae.layoutInfo.totalHeight}if(ge.cellTotalHeights=Ce,this.viewModel){const De=this.viewModel.getFocus(),Ae=this.viewModel.cellAt(De.start);if(Ae){const Pe=this._list.domElementOfElement(Ae),fe=Ae.getEditState()===L.CellEditState.Editing&&!!(document.activeElement&&Pe&&Pe.contains(document.activeElement));ge.editorFocused=fe,ge.focus=De.start}}}const ue={};for(const[Ce,De]of this._contributions)typeof De.saveViewState=="function"&&(ue[Ce]=De.saveViewState());return ge.contributionsState=ue,ge.selectedKernelId=this.activeKernel?.id,ge}_allowScrollBeyondLastLine(){return this._scrollBeyondLastLine&&!this.isEmbedded}layout(ge,ue){if(!ue&&this._shadowElementViewInfo===null){this._dimension=ge;return}if(ge.width<=0||ge.height<=0){this.onWillHide();return}if(ue&&this.updateShadowElement(ue),this._shadowElementViewInfo&&this._shadowElementViewInfo.width<=0&&this._shadowElementViewInfo.height<=0){this.onWillHide();return}this._dimension=ge;const Ce=Math.max(ge.height-(this._notebookTopToolbar?.useGlobalToolbar?26:0),0);p.size(this._body,ge.width,Ce);const De=this._notebookOptions.computeTopInsertToolbarHeight(this.viewModel?.viewType),Ae=Math.max(ge.height-De,0);this._list.getRenderHeight()<Ae?(this._list.updateOptions({additionalScrollHeight:this._allowScrollBeyondLastLine()?Math.max(0,Ae-50):De}),this._list.layout(Ae,ge.width)):(this._list.layout(Ae,ge.width),this._list.updateOptions({additionalScrollHeight:this._allowScrollBeyondLastLine()?Math.max(0,Ae-50):De})),this._overlayContainer.style.visibility="visible",this._overlayContainer.style.display="block",this._overlayContainer.style.position="absolute",this._overlayContainer.style.overflow="hidden",this.layoutContainerOverShadowElement(ge),this._webviewTransparentCover&&(this._webviewTransparentCover.style.height=`${ge.height}px`,this._webviewTransparentCover.style.width=`${ge.width}px`),this._notebookTopToolbar.layout(this._dimension),this._notebookOverviewRuler.layout(),this._viewContext?.eventDispatcher.emit([new P.NotebookLayoutChangedEvent({width:!0,fontInfo:!0},this.getLayoutInfo())])}updateShadowElement(ge){const ue=ge.getBoundingClientRect();this._shadowElement=ge,this._shadowElementViewInfo={height:ue.height,width:ue.width,top:ue.top,left:ue.left}}layoutContainerOverShadowElement(ge){if(!this._shadowElementViewInfo)return;const ue=this._overlayContainer.parentElement?.getBoundingClientRect();this._overlayContainer.style.top=`${this._shadowElementViewInfo.top-(ue?.top||0)}px`,this._overlayContainer.style.left=`${this._shadowElementViewInfo.left-(ue?.left||0)}px`,this._overlayContainer.style.width=`${ge?ge.width:this._shadowElementViewInfo.width}px`,this._overlayContainer.style.height=`${ge?ge.height:this._shadowElementViewInfo.height}px`}focus(){if(this._isVisible=!0,this._editorFocus.set(!0),this._webviewFocused)this._webview?.focusWebview();else{if(this.viewModel){const ge=this.viewModel.getFocus(),ue=this.viewModel.cellAt(ge.start);if(this.hasEditorFocus()||(this.focusContainer(),this.updateEditorFocus()),ue&&ue.focusMode===L.CellFocusMode.Editor){ue.updateEditState(L.CellEditState.Editing,"editorWidget.focus"),ue.focusMode=L.CellFocusMode.Editor,this.focusEditor(ue);return}}this._list.domFocus()}this._currentProgress&&this.showProgress()}focusEditor(ge){for(const[ue,Ce]of this._renderedEditors.entries())if(ue===ge){Ce.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 p.isAncestor(document.activeElement,this.getDomNode())}updateEditorFocus(){this._focusTracker.refreshState();const ge=this.editorHasDomFocus();this._editorFocus.set(ge),this.viewModel?.setEditorFocus(ge)}updateCellFocusMode(){const ge=this.getActiveCell();ge?.focusMode===L.CellFocusMode.Output&&!this._webviewFocused&&(ge.focusMode=L.CellFocusMode.Container)}hasEditorFocus(){return this.updateEditorFocus(),this.editorHasDomFocus()}hasWebviewFocus(){return this._webviewFocused}hasOutputTextSelection(){if(!this.hasEditorFocus())return!1;const ge=window.getSelection();if(ge?.rangeCount!==1)return!1;const ue=ge.getRangeAt(0);if(ue.startContainer===ue.endContainer&&ue.endOffset-ue.startOffset===0)return!1;let Ce=ue.commonAncestorContainer;if(!this._body.contains(Ce))return!1;for(;Ce&&Ce!==this._body;){if(Ce.classList&&Ce.classList.contains("output"))return!0;Ce=Ce.parentNode}return!1}focusElement(ge){this.viewModel?.updateSelectionsState({kind:Y.SelectionStateType.Handle,primary:ge.handle,selections:[ge.handle]})}get scrollTop(){return this._list.scrollTop}getAbsoluteTopOfElement(ge){return this._list.getAbsoluteTopOfElement(ge)}scrollToBottom(){this._listViewInfoAccessor.scrollToBottom()}revealCellRangeInView(ge){return this._listViewInfoAccessor.revealCellRangeInView(ge)}revealInView(ge){this._listViewInfoAccessor.revealInView(ge)}revealInViewAtTop(ge){this._listViewInfoAccessor.revealInViewAtTop(ge)}revealInCenterIfOutsideViewport(ge){this._listViewInfoAccessor.revealInCenterIfOutsideViewport(ge)}async revealInCenterIfOutsideViewportAsync(ge){return this._listViewInfoAccessor.revealInCenterIfOutsideViewportAsync(ge)}revealInCenter(ge){this._listViewInfoAccessor.revealInCenter(ge)}revealNearTopIfOutsideViewportAync(ge){return this._listViewInfoAccessor.revealNearTopIfOutsideViewportAync(ge)}async revealLineInViewAsync(ge,ue){return this._listViewInfoAccessor.revealLineInViewAsync(ge,ue)}async revealLineInCenterAsync(ge,ue){return this._listViewInfoAccessor.revealLineInCenterAsync(ge,ue)}async revealLineInCenterIfOutsideViewportAsync(ge,ue){return this._listViewInfoAccessor.revealLineInCenterIfOutsideViewportAsync(ge,ue)}async revealRangeInViewAsync(ge,ue){return this._listViewInfoAccessor.revealRangeInViewAsync(ge,ue)}async revealRangeInCenterAsync(ge,ue){return this._listViewInfoAccessor.revealRangeInCenterAsync(ge,ue)}async revealRangeInCenterIfOutsideViewportAsync(ge,ue){return this._listViewInfoAccessor.revealRangeInCenterIfOutsideViewportAsync(ge,ue)}async revealCellOffsetInCenterAsync(ge,ue){return this._listViewInfoAccessor.revealCellOffsetInCenterAsync(ge,ue)}getViewIndexByModelIndex(ge){if(!this._listViewInfoAccessor)return-1;const ue=this.viewModel?.viewCells[ge];return ue?this._listViewInfoAccessor.getViewIndex(ue):-1}getViewHeight(ge){return this._listViewInfoAccessor?this._listViewInfoAccessor.getViewHeight(ge):-1}getCellRangeFromViewRange(ge,ue){return this._listViewInfoAccessor.getCellRangeFromViewRange(ge,ue)}getCellsInRange(ge){return this._listViewInfoAccessor.getCellsInRange(ge)}setCellEditorSelection(ge,ue){this._listViewInfoAccessor.setCellEditorSelection(ge,ue)}setHiddenAreas(ge){return this._listViewInfoAccessor.setHiddenAreas(ge)}getVisibleRangesPlusViewportAboveAndBelow(){return this._listViewInfoAccessor.getVisibleRangesPlusViewportAboveAndBelow()}deltaCellDecorations(ge,ue){const Ce=this.viewModel?.deltaCellDecorations(ge,ue)||[];return this._onDidChangeDecorations.fire(),Ce}deltaCellContainerClassNames(ge,ue,Ce){this._webview?.deltaCellContainerClassNames(ge,ue,Ce)}changeModelDecorations(ge){return this.viewModel?.changeModelDecorations(ge)||null}async _loadKernelPreloads(){if(!this.hasModel())return;const{selected:ge}=this.notebookKernelService.getMatchingKernel(this.textModel);this._webview?.isResolved()||await this._resolveWebview(),this._webview?.updateKernelPreloads(ge)}get activeKernel(){return this.textModel&&this.notebookKernelService.getSelectedOrSuggestedKernel(this.textModel)}async cancelNotebookCells(ge){if(!(!this.viewModel||!this.hasModel()))return ge||(ge=this.viewModel.viewCells),this.notebookExecutionService.cancelNotebookCellHandles(this.textModel,Array.from(ge).map(ue=>ue.handle))}async executeNotebookCells(ge){if(!(!this.viewModel||!this.hasModel()))return ge||(ge=this.viewModel.viewCells),this.notebookExecutionService.executeNotebookCells(this.textModel,Array.from(ge).map(ue=>ue.model),this.scopedContextKeyService)}async layoutNotebookCell(ge,ue,Ce){if(this._debug("layout cell",ge.handle,ue),this._list.getViewIndex(ge)===void 0)return;const Ae=(ye,ke)=>{this._isDisposed||this._list.updateElementHeight2(ye,ke)};this._pendingLayouts?.has(ge)&&this._pendingLayouts?.get(ge).dispose();const Pe=new A.DeferredPromise,fe=()=>{this._isDisposed||!this.viewModel?.hasCell(ge)||this._list.elementHeight(ge)!==ue&&(this._pendingLayouts?.delete(ge),Ae(ge,ue),Pe.complete(void 0))};if(Ce===L.CellLayoutContext.Fold)fe();else{const ye=p.scheduleAtNextAnimationFrame(fe);this._pendingLayouts?.set(ge,(0,b.toDisposable)(()=>{ye.dispose(),Pe.complete(void 0)}))}return Pe.p}getActiveCell(){const ge=this._list.getFocusedElements();if(ge&&ge.length)return ge[0]}_cellFocusAria(ge,ue){const Ce=this._notebookViewModel?.getCellIndex(ge);if(Ce!==void 0&&Ce>=0){let De="";switch(ue){case"editor":De=`the inner ${ge.cellKind===Y.CellKind.Markup?"markdown":"code"} editor is focused, press escape to focus the cell container`;break;case"output":De="the cell output is focused, press escape to focus the cell container";break;case"container":De=`the ${ge.cellKind===Y.CellKind.Markup?"markdown preview":"cell container"} is focused, press enter to focus the inner ${ge.cellKind===Y.CellKind.Markup?"markdown":"code"} editor`;break;default:break}R.alert(`Cell ${this._notebookViewModel?.getCellIndex(ge)}, ${De} `)}}_toggleNotebookCellSelection(ge,ue){const Ce=this._list.getSelectedElements(),De=Ce.includes(ge),Ae=ue?Ce[Ce.length-1]??ge:ge,Pe=this._list.getViewIndex(ge),fe=this._list.getViewIndex(Ae),ye=this.getCellsInViewRange(Pe,fe);De?this._list.selectElements(Ce.filter(ke=>!ye.includes(ke))):(this.focusElement(ge),this._list.selectElements([...Ce.filter(ke=>!ye.includes(ke)),...ye]))}getCellsInViewRange(ge,ue){const Ce=[];for(let De=0;De<this._list.length;++De){const Ae=this._list.element(De);Ae&&(De>=ge&&De<=ue||De>=ue&&De<=ge)&&Ce.push(Ae)}return Ce}async focusNotebookCell(ge,ue,Ce){if(!this._isDisposed)if(ue==="editor"){if(this.focusElement(ge),this._cellFocusAria(ge,ue),this._list.focusView(),ge.updateEditState(L.CellEditState.Editing,"focusNotebookCell"),ge.focusMode=L.CellFocusMode.Editor,!Ce?.skipReveal)if(typeof Ce?.focusEditorLine=="number"){this._cursorNavMode.set(!0),await this.revealLineInViewAsync(ge,Ce.focusEditorLine);const De=this._renderedEditors.get(ge),Ae=Ce.focusEditorLine;De?.setSelection({startLineNumber:Ae,startColumn:1,endLineNumber:Ae,endColumn:1})}else{const De=ge.getSelectionsStartPosition();if(De?.length){const Ae=De[0];await this.revealRangeInCenterIfOutsideViewportAsync(ge,f.Range.fromPositions(Ae,Ae))}else this.revealInCenterIfOutsideViewport(ge)}}else if(ue==="output"){if(this.focusElement(ge),this._cellFocusAria(ge,ue),this.hasEditorFocus()||this._list.focusView(),!this._webview)return;this._webview.focusOutput(ge.id,this._webviewFocused),ge.updateEditState(L.CellEditState.Preview,"focusNotebookCell"),ge.focusMode=L.CellFocusMode.Output,Ce?.skipReveal||this.revealInCenterIfOutsideViewport(ge)}else{const De=this._list.domElementOfElement(ge);document.activeElement&&De&&De.contains(document.activeElement)&&document.activeElement.blur(),ge.updateEditState(L.CellEditState.Preview,"focusNotebookCell"),ge.focusMode=L.CellFocusMode.Container,this.focusElement(ge),this._cellFocusAria(ge,ue),Ce?.skipReveal||(typeof Ce?.focusEditorLine=="number"?(this._cursorNavMode.set(!0),this.revealInView(ge)):this.revealInCenterIfOutsideViewport(ge)),this._list.focusView()}}async focusNextNotebookCell(ge,ue){const Ce=this.viewModel?.getCellIndex(ge);if(typeof Ce!="number")return;const De=this.viewModel?.cellAt(Ce+1);!De||await this.focusNotebookCell(De,ue)}async _renderCell(ge){if(ge.isOutputCollapsed)return;const ue=ge.outputsViewModels;for(const Ce of ue){const[De,Ae]=Ce.resolveMimeTypes(this.textModel,void 0);if(!De.find(ke=>ke.isTrusted)||De.length===0)continue;const Pe=De[Ae];if(!Pe)return;const fe=this._notebookService.getRendererInfo(Pe.rendererId);if(!fe)return;const ye={type:1,renderer:fe,source:Ce,mimeType:Pe.mimeType};if(!this._webview?.insetMapping.has(ye.source)){const ke=new Promise(Ee=>{this.onDidRenderOutput(Te=>{Te.model===ye.source.model&&Ee()})});this.createOutput(ge,ye,0),await ke}return}}async _warmupAll(ge){if(!this.hasModel()||!this.viewModel)return;const ue=this.viewModel.viewCells,Ce=[];for(let De=0;De<ue.length;De++)ue[De].cellKind===Y.CellKind.Markup&&!this._webview.markupPreviewMapping.has(ue[De].id)&&Ce.push(this.createMarkupPreview(ue[De]));if(ge)for(let De=0;De<this.getLength();De++){const Ae=this.cellAt(De);Ae?.cellKind===Y.CellKind.Code&&Ce.push(this._renderCell(Ae))}return Promise.all(Ce)}async find(ge,ue,Ce,De=!1){if(!this._notebookViewModel)return[];const Ae=this._notebookViewModel.find(ge,ue).filter(ye=>ye.matches.length>0);if(!ue.includeMarkupPreview&&!ue.includeOutput)return this._webview?.findStop(),Ae.filter(ye=>ye.cell.cellKind===Y.CellKind.Code&&ue.includeCodeInput||ye.cell.cellKind===Y.CellKind.Markup&&ue.includeMarkupInput);const Pe={};Ae.forEach(ye=>{ye.cell.cellKind===Y.CellKind.Code&&ue.includeCodeInput&&(Pe[ye.cell.id]=ye),ye.cell.cellKind===Y.CellKind.Markup&&ue.includeMarkupInput&&(Pe[ye.cell.id]=ye)}),this._webview&&(await this._warmupAll(!!ue.includeOutput),(await this._webview.find(ge,{caseSensitive:ue.caseSensitive,wholeWord:ue.wholeWord,includeMarkup:!!ue.includeMarkupPreview,includeOutput:!!ue.includeOutput})).forEach(ke=>{if(!ue.includeMarkupPreview&&ke.type==="preview"||!ue.includeOutput&&ke.type==="output")return;const Ee=Pe[ke.cellId];Ee?Ee.matches.push(ke):Pe[ke.cellId]={cell:this._notebookViewModel.viewCells.find(Te=>Te.id===ke.cellId),index:this._notebookViewModel.viewCells.findIndex(Te=>Te.id===ke.cellId),matches:[ke],modelMatchCount:0}}));const fe=[];return this._notebookViewModel.viewCells.forEach((ye,ke)=>{Pe[ye.id]&&fe.push({cell:ye,index:ke,matches:Pe[ye.id].matches,modelMatchCount:Pe[ye.id].modelMatchCount})}),fe}async highlightFind(ge,ue){return this._webview?this._webview?.findHighlight(ue):0}async unHighlightFind(ge){if(!!this._webview)return this._webview?.findUnHighlight(ge)}findStop(){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(ge){if(!this._webview||(this._webview.isResolved()||await this._resolveWebview(),!this._webview||!this._list.webviewElement)||!this.viewModel||this.viewModel.getCellIndex(ge)===-1||this.cellIsHidden(ge))return;const ue=parseInt(this._list.webviewElement.domNode.style.top,10),Ce=ue?0-ue:0,De=this._list.getAbsoluteTopOfElement(ge);await this._webview.showMarkupPreview({mime:ge.mime,cellHandle:ge.handle,cellId:ge.id,content:ge.getText(),offset:De+Ce,visible:!0,metadata:ge.metadata})}cellIsHidden(ge){const ue=this.viewModel.getCellIndex(ge);return this.viewModel.getHiddenRanges().some(De=>ue>=De.start&&ue<=De.end)}async unhideMarkupPreviews(ge){!this._webview||(this._webview.isResolved()||await this._resolveWebview(),await this._webview?.unhideMarkupPreviews(ge.map(ue=>ue.id)))}async hideMarkupPreviews(ge){!this._webview||!ge.length||(this._webview.isResolved()||await this._resolveWebview(),await this._webview?.hideMarkupPreviews(ge.map(ue=>ue.id)))}async deleteMarkupPreviews(ge){!this._webview||(this._webview.isResolved()||await this._resolveWebview(),await this._webview?.deleteMarkupPreviews(ge.map(ue=>ue.id)))}async updateSelectedMarkdownPreviews(){if(!this._webview)return;this._webview.isResolved()||await this._resolveWebview();const ge=this.getSelectionViewModels().map(ue=>ue.id);await this._webview?.updateMarkupPreviewSelections(ge.length>1?ge:[])}async createOutput(ge,ue,Ce){this._insetModifyQueueByOutputId.queue(ue.source.model.outputId,async()=>{if(!this._webview||(this._webview.isResolved()||await this._resolveWebview(),!this._webview)||!this._list.webviewElement)return;ue.type===1&&this.notebookRendererMessaging.prepare(ue.renderer.id);const De=parseInt(this._list.webviewElement.domNode.style.top,10),Ae=De?0-De:0,Pe=this._list.getAbsoluteTopOfElement(ge)+Ae,fe=this._webview.insetMapping.get(ue.source);if(!fe||!fe.renderer&&ue.type===1||fe.renderer&&ue.type===1&&fe.renderer.id!==ue.renderer.id)await this._webview.createOutput({cellId:ge.id,cellHandle:ge.handle,cellUri:ge.uri},ue,Pe,Ce);else{const ye=ge.outputsViewModels.indexOf(ue.source),ke=ge.getOutputOffset(ye);this._webview.updateScrollTops([{cell:ge,output:ue.source,cellTop:Pe,outputOffset:ke,forceDisplay:!ge.isOutputCollapsed}],[])}})}async updateOutput(ge,ue,Ce){this._insetModifyQueueByOutputId.queue(ue.source.model.outputId,async()=>{if(!this._webview||(this._webview.isResolved()||await this._resolveWebview(),!this._webview||!this._list.webviewElement))return;if(!this._webview.insetMapping.has(ue.source))return this.createOutput(ge,ue,Ce);ue.type===1&&this.notebookRendererMessaging.prepare(ue.renderer.id);const De=parseInt(this._list.webviewElement.domNode.style.top,10),Ae=De?0-De:0,Pe=this._list.getAbsoluteTopOfElement(ge)+Ae;await this._webview.updateOutput({cellId:ge.id,cellHandle:ge.handle,cellUri:ge.uri},ue,Pe,Ce)})}removeInset(ge){this._insetModifyQueueByOutputId.queue(ge.model.outputId,async()=>{this._webview?.isResolved()&&this._webview.removeInsets([ge])})}hideInset(ge){this._insetModifyQueueByOutputId.queue(ge.model.outputId,async()=>{this._webview?.isResolved()&&this._webview.hideInset(ge)})}postMessage(ge){this._webview?.isResolved()&&this._webview.postKernelMessage(ge)}addClassName(ge){this._overlayContainer.classList.add(ge)}removeClassName(ge){this._overlayContainer.classList.remove(ge)}cellAt(ge){return this.viewModel?.cellAt(ge)}getCellByInfo(ge){const{cellHandle:ue}=ge;return this.viewModel?.viewCells.find(Ce=>Ce.handle===ue)}getCellByHandle(ge){return this.viewModel?.getCellByHandle(ge)}getCellIndex(ge){return this.viewModel?.getCellIndexByHandle(ge.handle)}getNextVisibleCellIndex(ge){return this.viewModel?.getNextVisibleCellIndex(ge)}getPreviousVisibleCellIndex(ge){return this.viewModel?.getPreviousVisibleCellIndex(ge)}_updateScrollHeight(){if(this._isDisposed||!this._webview?.isResolved()||!this._list.webviewElement)return;const ge=this._list.scrollHeight;this._webview.element.style.height=`${ge+z.NOTEBOOK_WEBVIEW_BOUNDARY*2}px`;const ue=parseInt(this._list.webviewElement.domNode.style.top,10),Ce=ue?0-ue:0,De=[],Ae=[];this._webview?.insetMapping.forEach((fe,ye)=>{const ke=this.viewModel?.getCellByHandle(fe.cellInfo.cellHandle);if(!ke||!(ke instanceof W.CodeCellViewModel)||(this.viewModel?.viewCells.find(Le=>Le.handle===fe.cellInfo.cellHandle),this._list.getViewIndex(ke)===void 0))return;ke.outputsViewModels.indexOf(ye)<0&&Ae.push(ye);const Te=this._list.getAbsoluteTopOfElement(ke),_e=ke.outputsViewModels.indexOf(ye),Re=ke.getOutputOffset(_e);De.push({cell:ke,output:ye,cellTop:Te+Ce,outputOffset:Re,forceDisplay:!1})}),this._webview.removeInsets(Ae);const Pe=[];for(const fe of this._webview.markupPreviewMapping.keys()){const ye=this.viewModel?.viewCells.find(ke=>ke.id===fe);if(ye){const ke=this._list.getAbsoluteTopOfElement(ye);Pe.push({id:fe,top:ke+Ce})}}(Pe.length||De.length)&&(this._debug("_list.onDidChangeContentHeight/markdown",Pe),this._webview?.updateScrollTops(De,Pe))}_updateOutputHeight(ge,ue,Ce,De,Ae){const Pe=this.viewModel?.viewCells.find(fe=>fe.handle===ge.cellHandle);if(Pe&&Pe instanceof W.CodeCellViewModel){const fe=Pe.outputsViewModels.indexOf(ue);Ce!==0&&Pe.updateOutputMinHeight(0),this._debug("update cell output",Pe.handle,Ce),Pe.updateOutputHeight(fe,Ce,Ae),this.layoutNotebookCell(Pe,Pe.layoutInfo.totalHeight),De&&this._onDidRenderOutput.fire(ue)}}_scheduleOutputHeightAck(ge,ue,Ce){const De=this._pendingOutputHeightAcks.size===0;this._pendingOutputHeightAcks.set(ue,{cellId:ge.cellId,outputId:ue,height:Ce}),De&&p.scheduleAtNextAnimationFrame(()=>{this._debug("ack height"),this._updateScrollHeight(),this._webview?.ackHeight([...this._pendingOutputHeightAcks.values()]),this._pendingOutputHeightAcks.clear()},-1)}_getCellById(ge){return this.viewModel?.viewCells.find(ue=>ue.id===ge)}_updateMarkupCellHeight(ge,ue,Ce){const De=this._getCellById(ge);if(De&&De instanceof $.MarkupCellViewModel){const{bottomToolbarGap:Ae}=this._notebookOptions.computeBottomToolbarDimensions(this.viewModel?.viewType);this._debug("updateMarkdownCellHeight",De.handle,ue+Ae,Ce),De.renderedMarkdownHeight=ue}}_setMarkupCellEditState(ge,ue){const Ce=this._getCellById(ge);Ce instanceof $.MarkupCellViewModel&&(this.revealInView(Ce),Ce.updateEditState(ue,"setMarkdownCellEditState"))}_didStartDragMarkupCell(ge,ue){const Ce=this._getCellById(ge);if(Ce instanceof $.MarkupCellViewModel){const De=this._list.webviewElement?-parseInt(this._list.webviewElement.domNode.style.top,10):0;this._dndController?.startExplicitDrag(Ce,ue.dragOffsetY-De)}}_didDragMarkupCell(ge,ue){const Ce=this._getCellById(ge);if(Ce instanceof $.MarkupCellViewModel){const De=this._list.webviewElement?-parseInt(this._list.webviewElement.domNode.style.top,10):0;this._dndController?.explicitDrag(Ce,ue.dragOffsetY-De)}}_didDropMarkupCell(ge,ue){const Ce=this._getCellById(ge);if(Ce instanceof $.MarkupCellViewModel){const De=this._list.webviewElement?-parseInt(this._list.webviewElement.domNode.style.top,10):0;ue.dragOffsetY-=De,this._dndController?.explicitDrop(Ce,ue)}}_didEndDragMarkupCell(ge){const ue=this._getCellById(ge);ue instanceof $.MarkupCellViewModel&&this._dndController?.endExplicitDrag(ue)}_didResizeOutput(ge){const ue=this._getCellById(ge);ue&&this._onDidResizeOutputEmitter.fire(ue)}getContribution(ge){return this._contributions.get(ge)||null}dispose(){this._isDisposed=!0,this._webview?.dispose(),this._webview=null,this.notebookEditorService.removeNotebookEditor(this),(0,b.dispose)(this._contributions.values()),this._contributions.clear(),this._localStore.clear(),(0,b.dispose)(this._localCellStateListeners),this._list.dispose(),this._listTopCellToolbar?.dispose(),this._overlayContainer.remove(),this.viewModel?.dispose(),this._renderedEditors.clear(),this._baseCellEditorOptions.forEach(ge=>ge.dispose()),this._baseCellEditorOptions.clear(),super.dispose(),this._webview=null,this._webviewResolvePromise=null,this._webviewTransparentCover=null,this._dndController=null,this._listTopCellToolbar=null,this._notebookViewModel=void 0,this._cellContextKeyManager=null,this._notebookTopToolbar=null,this._list=null,this._listViewInfoAccessor=null,this._pendingLayouts=null,this._listDelegate=null}toJSON(){return{notebookUri:this.viewModel?.uri}}};ve=we([F(2,o.IInstantiationService),F(3,de.IEditorGroupsService),F(4,te.INotebookRendererMessagingService),F(5,O.INotebookEditorService),F(6,oe.INotebookKernelService),F(7,Z.INotebookService),F(8,d.IConfigurationService),F(9,n.IContextKeyService),F(10,h.ILayoutService),F(11,a.IContextMenuService),F(12,w.ITelemetryService),F(13,ie.INotebookExecutionService),F(14,re.INotebookExecutionStateService),F(15,m.IEditorProgressService),F(16,pe.ILogService)],ve),e.NotebookEditorWidget=ve,(0,v.registerZIndex)(v.ZIndex.Base,5,"notebook-progress-bar"),(0,v.registerZIndex)(v.ZIndex.Base,10,"notebook-list-insertion-indicator"),(0,v.registerZIndex)(v.ZIndex.Base,20,"notebook-cell-editor-outline"),(0,v.registerZIndex)(v.ZIndex.Base,25,"notebook-scrollbar"),(0,v.registerZIndex)(v.ZIndex.Base,26,"notebook-cell-status"),(0,v.registerZIndex)(v.ZIndex.Base,26,"notebook-folding-indicator"),(0,v.registerZIndex)(v.ZIndex.Base,27,"notebook-output"),(0,v.registerZIndex)(v.ZIndex.Base,28,"notebook-cell-bottom-toolbar-container"),(0,v.registerZIndex)(v.ZIndex.Base,29,"notebook-run-button-container"),(0,v.registerZIndex)(v.ZIndex.Base,29,"notebook-input-collapse-condicon"),(0,v.registerZIndex)(v.ZIndex.Base,30,"notebook-cell-output-toolbar"),(0,v.registerZIndex)(v.ZIndex.Sash,1,"notebook-cell-expand-part-button"),(0,v.registerZIndex)(v.ZIndex.Sash,2,"notebook-cell-toolbar"),(0,v.registerZIndex)(v.ZIndex.Sash,3,"notebook-cell-toolbar-dropdown-active"),e.notebookCellBorder=(0,D.registerColor)("notebook.cellBorderColor",{dark:(0,D.transparent)(D.listInactiveSelectionBackground,1),light:(0,D.transparent)(D.listInactiveSelectionBackground,1),hcDark:T.PANEL_BORDER,hcLight:T.PANEL_BORDER},l.localize(1,null)),e.focusedEditorBorderColor=(0,D.registerColor)("notebook.focusedEditorBorder",{light:D.focusBorder,dark:D.focusBorder,hcDark:D.focusBorder,hcLight:D.focusBorder},l.localize(2,null)),e.cellStatusIconSuccess=(0,D.registerColor)("notebookStatusSuccessIcon.foreground",{light:_.debugIconStartForeground,dark:_.debugIconStartForeground,hcDark:_.debugIconStartForeground,hcLight:_.debugIconStartForeground},l.localize(3,null)),e.cellStatusIconError=(0,D.registerColor)("notebookStatusErrorIcon.foreground",{light:D.errorForeground,dark:D.errorForeground,hcDark:D.errorForeground,hcLight:D.errorForeground},l.localize(4,null)),e.cellStatusIconRunning=(0,D.registerColor)("notebookStatusRunningIcon.foreground",{light:D.foreground,dark:D.foreground,hcDark:D.foreground,hcLight:D.foreground},l.localize(5,null)),e.notebookOutputContainerBorderColor=(0,D.registerColor)("notebook.outputContainerBorderColor",{dark:null,light:null,hcDark:null,hcLight:null},l.localize(6,null)),e.notebookOutputContainerColor=(0,D.registerColor)("notebook.outputContainerBackgroundColor",{dark:null,light:null,hcDark:null,hcLight:null},l.localize(7,null)),e.CELL_TOOLBAR_SEPERATOR=(0,D.registerColor)("notebook.cellToolbarSeparator",{dark:k.Color.fromHex("#808080").transparent(.35),light:k.Color.fromHex("#808080").transparent(.35),hcDark:D.contrastBorder,hcLight:D.contrastBorder},l.localize(8,null)),e.focusedCellBackground=(0,D.registerColor)("notebook.focusedCellBackground",{dark:null,light:null,hcDark:null,hcLight:null},l.localize(9,null)),e.selectedCellBackground=(0,D.registerColor)("notebook.selectedCellBackground",{dark:D.listInactiveSelectionBackground,light:D.listInactiveSelectionBackground,hcDark:null,hcLight:null},l.localize(10,null)),e.cellHoverBackground=(0,D.registerColor)("notebook.cellHoverBackground",{dark:(0,D.transparent)(e.focusedCellBackground,.5),light:(0,D.transparent)(e.focusedCellBackground,.7),hcDark:null,hcLight:null},l.localize(11,null)),e.selectedCellBorder=(0,D.registerColor)("notebook.selectedCellBorder",{dark:e.notebookCellBorder,light:e.notebookCellBorder,hcDark:D.contrastBorder,hcLight:D.contrastBorder},l.localize(12,null)),e.inactiveSelectedCellBorder=(0,D.registerColor)("notebook.inactiveSelectedCellBorder",{dark:null,light:null,hcDark:D.focusBorder,hcLight:D.focusBorder},l.localize(13,null)),e.focusedCellBorder=(0,D.registerColor)("notebook.focusedCellBorder",{dark:D.focusBorder,light:D.focusBorder,hcDark:D.focusBorder,hcLight:D.focusBorder},l.localize(14,null)),e.inactiveFocusedCellBorder=(0,D.registerColor)("notebook.inactiveFocusedCellBorder",{dark:e.notebookCellBorder,light:e.notebookCellBorder,hcDark:e.notebookCellBorder,hcLight:e.notebookCellBorder},l.localize(15,null)),e.cellStatusBarItemHover=(0,D.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,D.registerColor)("notebook.cellInsertionIndicator",{light:D.focusBorder,dark:D.focusBorder,hcDark:D.focusBorder,hcLight:D.focusBorder},l.localize(17,null)),e.listScrollbarSliderBackground=(0,D.registerColor)("notebookScrollbarSlider.background",{dark:D.scrollbarSliderBackground,light:D.scrollbarSliderBackground,hcDark:D.scrollbarSliderBackground,hcLight:D.scrollbarSliderBackground},l.localize(18,null)),e.listScrollbarSliderHoverBackground=(0,D.registerColor)("notebookScrollbarSlider.hoverBackground",{dark:D.scrollbarSliderHoverBackground,light:D.scrollbarSliderHoverBackground,hcDark:D.scrollbarSliderHoverBackground,hcLight:D.scrollbarSliderHoverBackground},l.localize(19,null)),e.listScrollbarSliderActiveBackground=(0,D.registerColor)("notebookScrollbarSlider.activeBackground",{dark:D.scrollbarSliderActiveBackground,light:D.scrollbarSliderActiveBackground,hcDark:D.scrollbarSliderActiveBackground,hcLight:D.scrollbarSliderActiveBackground},l.localize(20,null)),e.cellSymbolHighlight=(0,D.registerColor)("notebook.symbolHighlightBackground",{dark:k.Color.fromHex("#ffffff0b"),light:k.Color.fromHex("#fdff0033"),hcDark:null,hcLight:null},l.localize(21,null)),e.cellEditorBackground=(0,D.registerColor)("notebook.cellEditorBackground",{light:T.SIDE_BAR_BACKGROUND,dark:T.SIDE_BAR_BACKGROUND,hcDark:null,hcLight:null},l.localize(22,null)),e.notebookEditorBackground=(0,D.registerColor)("notebook.editorBackground",{light:T.EDITOR_PANE_BACKGROUND,dark:T.EDITOR_PANE_BACKGROUND,hcDark:null,hcLight:null},l.localize(23,null)),(0,y.registerThemingParticipant)((be,ge)=>{const ue=be.getColor(e.focusedCellBorder),Ce=be.getColor(e.inactiveFocusedCellBorder),De=be.getColor(e.selectedCellBorder);ge.addRule(` :root { --notebook-focused-cell-border-color: ${ue}; --notebook-inactive-focused-cell-border-color: ${Ce}; --notebook-selected-cell-border-color: ${De}; } `);const Ae=be.getColor(e.cellStatusIconSuccess),Pe=be.getColor(e.cellStatusIconError),fe=be.getColor(e.cellStatusIconRunning);ge.addRule(` :root { --notebook-cell-status-icon-success: ${Ae}; --notebook-cell-status-icon-error: ${Pe}; --notebook-cell-status-icon-running: ${fe}; } `);const ye=be.getColor(D.textLinkForeground);ye&&ge.addRule(`.notebookOverlay .cell.markdown a, .notebookOverlay .output-show-more-container a, .notebookOverlay div.output-show-more a { color: ${ye};} `);const ke=be.getColor(D.textLinkActiveForeground);ke&&ge.addRule(`.notebookOverlay .output-show-more-container a:active, .notebookOverlay .output-show-more a:active { color: ${ke}; }`);const Ee=be.getColor(D.textPreformatForeground);Ee&&ge.addRule(`.notebookOverlay code, .notebookOverlay .shortcut { color: ${Ee}; }`);const Te=be.getColor(D.contrastBorder);Te&&ge.addRule(`.notebookOverlay .monaco-editor { border-color: ${Te}; }`);const _e=be.getColor(D.textBlockQuoteBackground);_e&&ge.addRule(`.notebookOverlay blockquote { background: ${_e}; }`);const Re=be.getColor(D.textBlockQuoteBorder);Re&&ge.addRule(`.notebookOverlay blockquote { border-color: ${Re}; }`);const Le=be.getColor(e.notebookOutputContainerColor);Le&&(ge.addRule(`.notebookOverlay .output { background-color: ${Le}; }`),ge.addRule(`.notebookOverlay .output-element { background-color: ${Le}; }`),ge.addRule(`.notebookOverlay .output-show-more-container { background-color: ${Le}; }`));const Me=be.getColor(e.notebookOutputContainerBorderColor);Me&&ge.addRule(`.notebookOverlay .output-element { border-top: none !important; border: 1px solid transparent; border-color: ${Me} !important; }`);const Oe=be.getColor(D.editorBackground);Oe&&(ge.addRule(`.notebookOverlay .cell-drag-image .cell-editor-container > div { background: ${Oe} !important; }`),ge.addRule(`.notebookOverlay .monaco-list-row .cell-title-toolbar { background-color: ${Oe}; }`),ge.addRule(`.notebookOverlay .monaco-list-row.cell-drag-image { background-color: ${Oe}; }`),ge.addRule(`.notebookOverlay .cell-bottom-toolbar-container .action-item { background-color: ${Oe} }`),ge.addRule(`.notebookOverlay .cell-list-top-cell-toolbar-container .action-item { background-color: ${Oe} }`));const Ke=be.getColor(e.notebookEditorBackground);Ke&&ge.addRule(`.monaco-workbench .notebookOverlay.notebook-editor { background-color: ${Ke}; }`);const We=be.getColor(e.cellEditorBackground)??be.getColor(D.editorBackground);We&&ge.addRule(`.notebookOverlay .cell .monaco-editor-background, .notebookOverlay .cell .margin-view-overlays, .notebookOverlay .cell .cell-statusbar-container { background: ${We}; }`);const Xe=be.getColor(e.CELL_TOOLBAR_SEPERATOR);Xe&&(ge.addRule(`.notebookOverlay .monaco-list-row .cell-title-toolbar { border: solid 1px ${Xe}; }`),ge.addRule(`.notebookOverlay .cell-bottom-toolbar-container .action-item { border: solid 1px ${Xe} }`),ge.addRule(`.notebookOverlay .cell-list-top-cell-toolbar-container .action-item { border: solid 1px ${Xe} }`),ge.addRule(`.notebookOverlay .monaco-action-bar .action-item.verticalSeparator { background-color: ${Xe} }`),ge.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 ${Xe} }`));const Je=be.getColor(e.focusedCellBackground);Je&&(ge.addRule(`.notebookOverlay .code-cell-row.focused .cell-focus-indicator { background-color: ${Je} !important; }`),ge.addRule(`.notebookOverlay .markdown-cell-row.focused { background-color: ${Je} !important; }`),ge.addRule(`.notebookOverlay .code-cell-row.focused .input-collapse-container { background-color: ${Je} !important; }`));const rt=be.getColor(e.selectedCellBackground);e.selectedCellBackground&&(ge.addRule(`.notebookOverlay .monaco-list.selection-multiple .markdown-cell-row.selected { background-color: ${rt} !important; }`),ge.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-top { background-color: ${rt} !important; }`),ge.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-left { background-color: ${rt} !important; }`),ge.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-right { background-color: ${rt} !important; }`),ge.addRule(`.notebookOverlay .monaco-list.selection-multiple .code-cell-row.selected .cell-focus-indicator-bottom { background-color: ${rt} !important; }`));const je=be.getColor(e.inactiveSelectedCellBorder);ge.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: ${je} !important; } `);const Ue=be.getColor(e.cellHoverBackground);Ue&&(ge.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: ${Ue} !important; }`),ge.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: ${Ue}; }`));const Fe=be.getColor(e.cellSymbolHighlight);Fe&&ge.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 He=be.getColor(e.focusedEditorBorderColor);He&&ge.addRule(`.notebookOverlay .monaco-list:focus-within .monaco-list-row.focused .cell-editor-focus .cell-editor-part:before { outline: solid 1px ${He}; }`);const Be=be.getColor(e.notebookCellBorder);Be&&(ge.addRule(`.notebookOverlay .cell.markdown h1 { border-color: ${Be}; }`),ge.addRule(`.notebookOverlay .monaco-list-row .cell-editor-part:before { outline: solid 1px ${Be}; }`));const ze=be.getColor(e.cellStatusBarItemHover);ze&&ge.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: ${ze}; }`);const nt=be.getColor(e.cellInsertionIndicator);nt&&ge.addRule(`.notebookOverlay > .cell-list-container > .cell-list-insertion-indicator { background-color: ${nt}; }`);const ut=be.getColor(e.listScrollbarSliderBackground);ut&&ge.addRule(` .notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .scrollbar > .slider { background: ${ut}; } `);const ot=be.getColor(e.listScrollbarSliderHoverBackground);ot&&ge.addRule(` .notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .scrollbar > .slider:hover { background: ${ot}; } `);const at=be.getColor(e.listScrollbarSliderActiveBackground);at&&ge.addRule(` .notebookOverlay .cell-list-container > .monaco-list > .monaco-scrollable-element > .scrollbar > .slider.active { background: ${at}; } `);const wt=be.getColor(D.toolbarHoverBackground);wt&&ge.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: ${wt}; } `);const It=be.getColor(ne.editorGutterModifiedBackground);It&&ge.addRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-cell-modified .cell-focus-indicator { background-color: ${It} !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-cell-modified { background-color: ${It} !important; }`);const _t=be.getColor(D.diffInserted);_t&&ge.addRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-cell-added .cell-focus-indicator { background-color: ${_t} !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-cell-added { background-color: ${_t} !important; }`);const lt=be.getColor(D.diffRemoved);lt&&ge.addRule(` .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.code-cell-row.nb-cell-deleted .cell-focus-indicator { background-color: ${lt} !important; } .monaco-workbench .notebookOverlay .monaco-list .monaco-list-row.markdown-cell-row.nb-cell-deleted { background-color: ${lt} !important; }`);const pt=be.getColor(D.iconForeground);pt&&ge.addRule(`.monaco-workbench .notebookOverlay .codicon-debug-continue { color: ${pt} !important; }`)})}),define(ae[981],le([1,0,11,2,1749,5,12,874,287,555,215,64,162]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimerCellStatusBarContrib=e.ExecutionStateCellStatusBarContrib=e.NotebookStatusBarController=e.formatCellDuration=void 0;function u(n){const a=Math.floor(n/1e3/60),o=Math.floor(n/1e3)%60,g=String(n-a*60*1e3-o*1e3).charAt(0);return a>0?`${a}m ${o}.${g}s`:`${o}.${g}s`}e.formatCellDuration=u;class i extends p.Disposable{constructor(a,o){super(),this._notebookEditor=a,this._itemFactory=o,this._visibleCells=new Map,this._observer=this._register(new E.NotebookVisibleCellObserver(this._notebookEditor)),this._register(this._observer.onDidChangeVisibleCells(this._updateVisibleCells,this)),this._updateEverything()}_updateEverything(){this._visibleCells.forEach(p.dispose),this._visibleCells.clear(),this._updateVisibleCells({added:this._observer.visibleCells,removed:[]})}_updateVisibleCells(a){const o=this._notebookEditor._getViewModel();if(!!o){for(const g of a.removed)this._visibleCells.get(g.handle)?.dispose(),this._visibleCells.delete(g.handle);for(const g of a.added)this._visibleCells.set(g.handle,this._itemFactory(o,g))}}dispose(){super.dispose(),this._visibleCells.forEach(p.dispose),this._visibleCells.clear()}}e.NotebookStatusBarController=i;let f=class extends p.Disposable{constructor(a,o){super(),this._register(new i(a,(g,h)=>o.createInstance(c,g,h)))}};f.id="workbench.notebook.statusBar.execState",f=we([F(1,A.IInstantiationService)],f),e.ExecutionStateCellStatusBarContrib=f,(0,I.registerNotebookContribution)(f.id,f);let c=class Kl extends p.Disposable{constructor(a,o,g){super(),this._notebookViewModel=a,this._cell=o,this._executionStateService=g,this._currentItemIds=[],this._clearExecutingStateTimer=this._register(new p.MutableDisposable),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 a=this._getItemsForCell();Array.isArray(a)&&(this._currentItemIds=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:a}]))}_getItemsForCell(){const a=this._executionStateService.getCellExecution(this._cell.uri);if(a?.state===C.NotebookCellExecutionState.Executing&&typeof this._showedExecutingStateTime!="number")this._showedExecutingStateTime=Date.now();else if(a?.state!==C.NotebookCellExecutionState.Executing&&typeof this._showedExecutingStateTime=="number"){const g=Kl.MIN_SPINNER_TIME-(Date.now()-this._showedExecutingStateTime);if(g>0){this._clearExecutingStateTimer.value||(this._clearExecutingStateTimer.value=(0,t.disposableTimeout)(()=>{this._showedExecutingStateTime=void 0,this._clearExecutingStateTimer.clear(),this._update()},g));return}else this._showedExecutingStateTime=void 0}const o=this._getItemForState(a,this._cell.internalMetadata);return o?[o]:[]}_getItemForState(a,o){const g=a?.state,{lastRunSuccess:h}=o;if(!g&&h)return{text:`$(${S.successStateIcon.id})`,color:(0,k.themeColorFromId)(b.cellStatusIconSuccess),tooltip:(0,R.localize)(0,null),alignment:1,priority:Number.MAX_SAFE_INTEGER};if(!g&&h===!1)return{text:`$(${S.errorStateIcon.id})`,color:(0,k.themeColorFromId)(b.cellStatusIconError),tooltip:(0,R.localize)(1,null),alignment:1,priority:Number.MAX_SAFE_INTEGER};if(g===C.NotebookCellExecutionState.Pending||g===C.NotebookCellExecutionState.Unconfirmed)return{text:`$(${S.pendingStateIcon.id})`,tooltip:(0,R.localize)(2,null),alignment:1,priority:Number.MAX_SAFE_INTEGER};if(g===C.NotebookCellExecutionState.Executing)return{text:`$(${(a?.didPause?S.executingStateIcon:k.ThemeIcon.modify(S.executingStateIcon,"spin")).id})`,tooltip:(0,R.localize)(3,null),alignment:1,priority:Number.MAX_SAFE_INTEGER}}dispose(){super.dispose(),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}])}};c.MIN_SPINNER_TIME=500,c=we([F(2,r.INotebookExecutionStateService)],c);let l=class extends p.Disposable{constructor(a,o){super(),this._register(new i(a,(g,h)=>o.createInstance(d,g,h)))}};l.id="workbench.notebook.statusBar.execTimer",l=we([F(1,A.IInstantiationService)],l),e.TimerCellStatusBarContrib=l,(0,I.registerNotebookContribution)(l.id,l);const s=200;let d=class Gl extends p.Disposable{constructor(a,o,g){super(),this._notebookViewModel=a,this._cell=o,this._executionStateService=g,this._currentItemIds=[],this._scheduler=this._register(new t.RunOnceScheduler(()=>this._update(),Gl.UPDATE_INTERVAL)),this._update(),this._register(this._cell.model.onDidChangeInternalMetadata(()=>this._update()))}async _update(){let a;const o=this._executionStateService.getCellExecution(this._cell.uri),g=o?.state;if(o?.didPause)a=void 0;else if(g===C.NotebookCellExecutionState.Executing){const v=this._cell.internalMetadata.runStartTime,m=this._cell.internalMetadata.runStartTimeAdjustment;typeof v=="number"&&(a=this._getTimeItem(v,Date.now(),m),this._scheduler.schedule())}else if(!g){const v=this._cell.internalMetadata.runStartTime,m=this._cell.internalMetadata.runEndTime;typeof v=="number"&&typeof m=="number"&&(a=this._getTimeItem(v,m))}const h=a?[a]:[];!h.length&&!!o?this._deferredUpdate||(this._deferredUpdate=(0,t.disposableTimeout)(()=>{this._deferredUpdate=void 0,this._currentItemIds=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:h}])},s)):(this._deferredUpdate?.dispose(),this._deferredUpdate=void 0,this._currentItemIds=this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:h}]))}_getTimeItem(a,o,g=0){const h=o-a+g;return{text:u(h),alignment:1,priority:Number.MAX_SAFE_INTEGER-1}}dispose(){super.dispose(),this._deferredUpdate?.dispose(),this._notebookViewModel.deltaCellStatusBarItems(this._currentItemIds,[{handle:this._cell.handle,items:[]}])}};d.UPDATE_INTERVAL=100,d=we([F(2,r.INotebookExecutionStateService)],d)});var yt=this&&this.__classPrivateFieldGet||function(J,e,t,p){if(t==="a"&&!p)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?J!==e||!p:!e.has(J))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?p:t==="a"?p.call(J):p?p.value:e.get(J)},Ut=this&&this.__classPrivateFieldSet||function(J,e,t,p,R){if(p==="m")throw new TypeError("Private method is not writable");if(p==="a"&&!R)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?J!==e||!R:!e.has(J))throw new TypeError("Cannot write private member to an object whose class did not declare it");return p==="a"?R.call(J,t):R?R.value=t:e.set(J,t),t};define(ae[2857],le([1,0,1709,10,6,2,75,173,7,5,23,27,33,12,188,471,646,287,267,555,58,981,228,125,42,15,38,863,8,449,263,37,84,40,337,381,333,244,168,470,439,619,114,162,152,39,18,647,64,1148]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q){"use strict";var j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e,Re,Le,Me,Oe,Ke,We,Xe,Je,rt,je;Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditor=void 0;const Ue="interactiveInputDecoration",Fe="InteractiveEditorViewState",He=8,Be=10,ze=8;let nt=class extends i.EditorPane{get onDidFocus(){return yt(this,ye,"f").event}constructor(ot,at,wt,It,_t,lt,pt,st,qe,Et,Tt,xt,At,Nt,kt,Ne,Ge){super(Q.INTERACTIVE_WINDOW_EDITOR_ID,ot,at,wt),this.configurationService=Tt,j.add(this),K.set(this,void 0),Y.set(this,void 0),ee.set(this,void 0),ie.set(this,{value:void 0}),re.set(this,void 0),oe.set(this,void 0),se.set(this,void 0),te.set(this,void 0),Z.set(this,void 0),ne.set(this,void 0),ce.set(this,void 0),de.set(this,void 0),he.set(this,void 0),pe.set(this,void 0),me.set(this,void 0),Se.set(this,void 0),Ie.set(this,void 0),ve.set(this,void 0),be.set(this,void 0),ge.set(this,void 0),ue.set(this,this._register(new A.DisposableStore)),Ce.set(this,void 0),De.set(this,void 0),Ae.set(this,void 0),Pe.set(this,this._register(new A.DisposableStore)),fe.set(this,void 0),ye.set(this,this._register(new R.Emitter)),ke.set(this,this._register(new R.Emitter)),this.onDidChangeSelection=yt(this,ke,"f").event,Ut(this,ce,It,"f"),Ut(this,ne,_t,"f"),Ut(this,he,lt,"f"),Ut(this,pe,st,"f"),Ut(this,de,qe,"f"),Ut(this,me,Et,"f"),Ut(this,Se,xt,"f"),Ut(this,Ie,At,"f"),Ut(this,ve,Nt,"f"),Ut(this,be,Ne,"f"),Ut(this,ge,Ge,"f"),Ut(this,De,new y.NotebookOptions(Tt,Ne,{cellToolbarInteraction:"hover",globalToolbar:!0,defaultCellCollapseConfig:{codeCell:{inputCollapsed:!0}}}),"f"),Ut(this,Ae,this.getEditorMemento(Nt,kt,Fe),"f"),pt.registerDecorationType("interactive-decoration",Ue,{}),this._register(yt(this,me,"f").onDidUpdateKeybindings(yt(this,j,"m",je),this)),this._register(yt(this,be,"f").onDidChangeCellExecution(Ze=>{if((0,X.isEqual)(Ze.notebook,yt(this,ie,"f").value?.viewModel?.notebookDocument.uri)){const ft=yt(this,ie,"f").value?.getCellByHandle(Ze.cellHandle);ft&&Ze.changed?.state&&yt(this,j,"m",We).call(this,ft)}}))}createEditor(ot){Ut(this,K,p.append(ot,p.$(".interactive-editor")),"f"),yt(this,K,"f").style.position="relative",Ut(this,ee,p.append(yt(this,K,"f"),p.$(".notebook-editor-container")),"f"),Ut(this,re,p.append(yt(this,K,"f"),p.$(".input-cell-container")),"f"),yt(this,re,"f").style.position="absolute",yt(this,re,"f").style.height=`${yt(this,j,"a",Ee)}px`,Ut(this,oe,p.append(yt(this,re,"f"),p.$(".input-focus-indicator")),"f"),Ut(this,se,p.append(yt(this,re,"f"),p.$(".run-button-container")),"f"),yt(this,j,"m",_e).call(this,yt(this,se,"f")),Ut(this,te,p.append(yt(this,re,"f"),p.$(".input-editor-container")),"f"),yt(this,j,"m",Re).call(this)}saveState(){yt(this,j,"m",Le).call(this,this.input),super.saveState()}getViewState(){const ot=this.input;if(ot instanceof c.InteractiveEditorInput)return yt(this,j,"m",Le).call(this,ot),yt(this,j,"m",Me).call(this,ot)}async setInput(ot,at,wt,It){const _t=this.group,lt=ot.notebookEditorInput;if(yt(this,ie,"f").value?.onWillHide(),yt(this,Z,"f")?.dispose(),yt(this,ue,"f").clear(),Ut(this,ie,yt(this,ce,"f").invokeFunction(yt(this,ne,"f").retrieveWidget,_t,lt,{isEmbedded:!0,isReadOnly:!0,contributions:l.NotebookEditorExtensionsRegistry.getSomeEditorContributions([a.ExecutionStateCellStatusBarContrib.id,a.TimerCellStatusBarContrib.id,G.NotebookFindContrib.id]),menuIds:{notebookToolbar:v.MenuId.InteractiveToolbar,cellTitleToolbar:v.MenuId.InteractiveCellTitle,cellDeleteToolbar:v.MenuId.InteractiveCellDelete,cellInsertToolbar:v.MenuId.NotebookCellBetween,cellTopInsertToolbar:v.MenuId.NotebookCellListTop,cellExecuteToolbar:v.MenuId.InteractiveCellExecute,cellExecutePrimary:void 0},cellEditorContributions:M.EditorExtensionsRegistry.getSomeEditorContributions([N.SelectionClipboardContributionID,P.ContextMenuController.ID,x.ModesHoverController.ID,H.MarkerController.ID]),options:yt(this,De,"f")}),"f"),Ut(this,Z,yt(this,ce,"f").createInstance(E.CodeEditorWidget,yt(this,te,"f"),{...(0,f.getSimpleEditorOptions)(),glyphMargin:!0,padding:{top:ze,bottom:ze},hover:{enabled:!0}},{isSimpleWidget:!1,contributions:M.EditorExtensionsRegistry.getSomeEditorContributions([O.MenuPreventer.ID,N.SelectionClipboardContributionID,P.ContextMenuController.ID,B.SuggestController.ID,V.SnippetController2.ID,z.TabCompletionController.ID,x.ModesHoverController.ID,H.MarkerController.ID])}),"f"),yt(this,Ce,"f")){yt(this,ee,"f").style.height=`${yt(this,Ce,"f").height-yt(this,j,"a",Ee)}px`,yt(this,ie,"f").value.layout(yt(this,Ce,"f").with(yt(this,Ce,"f").width,yt(this,Ce,"f").height-yt(this,j,"a",Ee)),yt(this,ee,"f"));const{codeCellLeftMargin:Tt,cellRunGutter:xt}=yt(this,De,"f").getLayoutConfiguration(),At=Tt+xt,Nt=Math.min(yt(this,Ce,"f").height/2,yt(this,j,"a",Te));yt(this,Z,"f").layout(yt(this,j,"m",rt).call(this,yt(this,Ce,"f").width-At-Be,Nt)),yt(this,oe,"f").style.height=`${yt(this,j,"a",Te)}px`,yt(this,re,"f").style.top=`${yt(this,Ce,"f").height-yt(this,j,"a",Ee)}px`,yt(this,re,"f").style.width=`${yt(this,Ce,"f").width}px`}await super.setInput(ot,at,wt,It);const pt=await ot.resolve();if(yt(this,fe,"f")&&(yt(this,fe,"f").context=ot.resource),pt===null)throw new Error("?");yt(this,ie,"f").value?.setParentContextKeyService(yt(this,he,"f"));const st=at?.viewState??yt(this,j,"m",Me).call(this,ot);await yt(this,ge,"f").whenInstalledExtensionsRegistered(),await yt(this,ie,"f").value.setModel(pt.notebook,st?.notebook),pt.notebook.setCellCollapseDefault(yt(this,De,"f").getCellCollapseDefault()),yt(this,ie,"f").value.setOptions({isReadOnly:!0}),yt(this,ue,"f").add(yt(this,ie,"f").value.onDidResizeOutput(Tt=>{yt(this,j,"m",We).call(this,Tt)})),yt(this,ue,"f").add(yt(this,ie,"f").value.onDidFocusWidget(()=>yt(this,ye,"f").fire())),yt(this,ue,"f").add(pt.notebook.onDidChangeContent(()=>{pt.setDirty(!1)})),yt(this,ue,"f").add(yt(this,De,"f").onDidChangeOptions(Tt=>{(Tt.compactView||Tt.focusIndicator)&&(yt(this,Y,"f")?.remove(),yt(this,j,"m",Re).call(this)),yt(this,Ce,"f")&&this.isVisible()&&this.layout(yt(this,Ce,"f")),Tt.interactiveWindowCollapseCodeCells&&pt.notebook.setCellCollapseDefault(yt(this,De,"f").getCellCollapseDefault())}));const qe=await ot.resolveInput(yt(this,ie,"f").value?.activeKernel?.supportedLanguages[0]??g.PLAINTEXT_LANGUAGE_ID);yt(this,Z,"f").setModel(qe),st?.input&&yt(this,Z,"f").restoreViewState(st.input),yt(this,ue,"f").add(yt(this,Z,"f").onDidFocusEditorWidget(()=>yt(this,ye,"f").fire())),yt(this,ue,"f").add(yt(this,Z,"f").onDidContentSizeChange(Tt=>{!Tt.contentHeightChanged||yt(this,Ce,"f")&&yt(this,j,"m",Je).call(this,yt(this,Ce,"f"))})),yt(this,ue,"f").add(yt(this,Z,"f").onDidChangeCursorPosition(Tt=>yt(this,ke,"f").fire({reason:yt(this,j,"m",Oe).call(this,Tt)}))),yt(this,ue,"f").add(yt(this,Z,"f").onDidChangeModelContent(()=>yt(this,ke,"f").fire({reason:3}))),yt(this,ue,"f").add(yt(this,pe,"f").onDidChangeNotebookAffinity(yt(this,j,"m",Xe),this)),yt(this,ue,"f").add(yt(this,pe,"f").onDidChangeSelectedNotebooks(yt(this,j,"m",Xe),this)),yt(this,ue,"f").add(this.themeService.onDidColorThemeChange(()=>{this.isVisible()&&yt(this,j,"m",je).call(this)})),yt(this,ue,"f").add(yt(this,Z,"f").onDidChangeModelContent(()=>{this.isVisible()&&yt(this,j,"m",je).call(this)}));const Et=w.INTERACTIVE_INPUT_CURSOR_BOUNDARY.bindTo(yt(this,he,"f"));ot.resource&&ot.historyService.has(ot.resource)?Et.set("top"):Et.set("none"),yt(this,ue,"f").add(yt(this,Z,"f").onDidChangeCursorPosition(({position:Tt})=>{const xt=yt(this,Z,"f")._getViewModel(),At=xt.getLineCount(),Nt=xt.getLineContent(At).length+1,kt=xt.coordinatesConverter.convertModelPositionToViewPosition(Tt),Ne=kt.lineNumber===1&&kt.column===1,Ge=kt.lineNumber===At&&kt.column===Nt;Ne?Ge?Et.set("both"):Et.set("top"):Ge?Et.set("bottom"):Et.set("none")})),yt(this,ue,"f").add(qe.onDidChangeContent(()=>{const Tt=qe.getValue();this.input?.resource&&Tt!==""&&this.input.historyService.replaceLast(this.input.resource,Tt)})),yt(this,j,"m",Xe).call(this)}setOptions(ot){yt(this,ie,"f").value?.setOptions(ot),super.setOptions(ot)}layout(ot){yt(this,K,"f").classList.toggle("mid-width",ot.width<1e3&&ot.width>=600),yt(this,K,"f").classList.toggle("narrow-width",ot.width<600),Ut(this,Ce,ot,"f"),yt(this,ie,"f").value&&(yt(this,ee,"f").style.height=`${yt(this,Ce,"f").height-yt(this,j,"a",Ee)}px`,yt(this,j,"m",Je).call(this,ot))}focus(){yt(this,Z,"f").focus()}focusHistory(){yt(this,ie,"f").value.focus()}setEditorVisible(ot,at){super.setEditorVisible(ot,at),at&&(yt(this,Pe,"f").clear(),yt(this,Pe,"f").add(at.onWillCloseEditor(wt=>yt(this,j,"m",Le).call(this,wt.editor)))),ot||(yt(this,j,"m",Le).call(this,this.input),this.input&&yt(this,ie,"f").value&&yt(this,ie,"f").value.onWillHide())}clearInput(){yt(this,ie,"f").value&&(yt(this,j,"m",Le).call(this,this.input),yt(this,ie,"f").value.onWillHide()),yt(this,Z,"f")?.dispose(),Ut(this,ie,{value:void 0},"f"),yt(this,ue,"f").clear(),super.clearInput()}getControl(){return{notebookEditor:yt(this,ie,"f").value,codeEditor:yt(this,Z,"f")}}};K=new WeakMap,Y=new WeakMap,ee=new WeakMap,ie=new WeakMap,re=new WeakMap,oe=new WeakMap,se=new WeakMap,te=new WeakMap,Z=new WeakMap,ne=new WeakMap,ce=new WeakMap,de=new WeakMap,he=new WeakMap,pe=new WeakMap,me=new WeakMap,Se=new WeakMap,Ie=new WeakMap,ve=new WeakMap,be=new WeakMap,ge=new WeakMap,ue=new WeakMap,Ce=new WeakMap,De=new WeakMap,Ae=new WeakMap,Pe=new WeakMap,fe=new WeakMap,ye=new WeakMap,ke=new WeakMap,j=new WeakSet,Ee=function(){return 19+2+He*2+ze*2},Te=function(){return 19+ze*2},_e=function(ot){const at=this._register(yt(this,Se,"f").createMenu(v.MenuId.InteractiveInputExecute,yt(this,he,"f")));Ut(this,fe,this._register(new T.ToolBar(ot,yt(this,Ie,"f"),{getKeyBinding:lt=>yt(this,me,"f").lookupKeybinding(lt.id),actionViewItemProvider:lt=>(0,L.createActionViewItem)(yt(this,ce,"f"),lt),renderDropdownAsChildElement:!0})),"f");const wt=[],It=[],_t={primary:wt,secondary:It};(0,L.createAndFillInActionBarActions)(at,{shouldForwardArgs:!0},_t),yt(this,fe,"f").setActions([...wt,...It])},Re=function(){Ut(this,Y,p.createStyleSheet(yt(this,K,"f")),"f");const ot=[],{focusIndicator:at,codeCellLeftMargin:wt,cellRunGutter:It}=yt(this,De,"f").getLayoutConfiguration(),_t=wt+It;ot.push(` .interactive-editor .input-cell-container { padding: ${He}px ${Be}px ${He}px ${_t}px; } `),at==="gutter"?ot.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: ${He}px; } .interactive-editor .input-cell-container { border-top: 1px solid var(--notebook-inactive-focused-cell-border-color); } `):ot.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; } `),ot.push(` .interactive-editor .input-cell-container .run-button-container { width: ${It}px; left: ${wt}px; margin-top: ${ze-2}px; } `),yt(this,Y,"f").textContent=ot.join(` `)},Le=function(ot){if(this.group&&yt(this,ie,"f").value&&ot instanceof c.InteractiveEditorInput){if(yt(this,ie,"f").value.isDisposed)return;const at=yt(this,ie,"f").value.getEditorViewState(),wt=yt(this,Z,"f").saveViewState();yt(this,Ae,"f").saveEditorState(this.group,ot.notebookEditorInput.resource,{notebook:at,input:wt})}},Me=function(ot){let at;if(this.group&&(at=yt(this,Ae,"f").loadEditorState(this.group,ot.notebookEditorInput.resource)),at)return at;for(const wt of yt(this,ve,"f").getGroups(1))if(wt.activeEditorPane!==this&&wt.activeEditorPane===this&&wt.activeEditor?.matches(ot)){const It=yt(this,ie,"f").value?.getEditorViewState(),_t=yt(this,Z,"f").saveViewState();return{notebook:It,input:_t}}},Oe=function(ot){switch(ot.source){case"api":return 1;case"code.navigation":return 4;case"code.jump":return 5;default:return 2}},Ke=function(ot){const at=yt(this,ie,"f").value?.visibleRanges||[];return yt(this,ie,"f").value?.getCellIndex(ot)===Math.max(...at.map(It=>It.end-1))},We=function(ot){yt(this,ie,"f").value.getCellIndex(ot)===yt(this,ie,"f").value.getLength()-1&&(this.configurationService.getValue(w.InteractiveWindowSetting.interactiveWindowAlwaysScrollOnNewCell)||yt(this,j,"m",Ke).call(this,ot))&&yt(this,ie,"f").value.scrollToBottom()},Xe=function(){const ot=yt(this,ie,"f").value?.textModel,at=yt(this,Z,"f").getModel();if(ot&&at){const wt=yt(this,pe,"f").getMatchingKernel(ot),It=wt.selected??(wt.suggestions.length===1?wt.suggestions[0]:void 0)??(wt.all.length===1?wt.all[0]:void 0);if(It){const _t=It.supportedLanguages[0],lt=_t?yt(this,de,"f").createById(_t).languageId:g.PLAINTEXT_LANGUAGE_ID;at.setMode(lt),$.NOTEBOOK_KERNEL.bindTo(yt(this,he,"f")).set(It.id)}}yt(this,j,"m",je).call(this)},Je=function(ot){const at=yt(this,Z,"f").hasModel()?yt(this,Z,"f").getContentHeight():yt(this,j,"a",Te),wt=Math.min(ot.height/2,at),{codeCellLeftMargin:It,cellRunGutter:_t}=yt(this,De,"f").getLayoutConfiguration(),lt=It+_t,pt=wt+He*2;yt(this,ee,"f").style.height=`${ot.height-pt}px`,yt(this,ie,"f").value.layout(ot.with(ot.width,ot.height-pt),yt(this,ee,"f")),yt(this,Z,"f").layout(yt(this,j,"m",rt).call(this,ot.width-lt-Be,wt)),yt(this,oe,"f").style.height=`${at}px`,yt(this,re,"f").style.top=`${ot.height-pt}px`,yt(this,re,"f").style.width=`${ot.width}px`},rt=function(ot,at){return new p.Dimension(Math.max(0,ot),Math.max(0,at))},je=function(){if(!yt(this,Z,"f")||!yt(this,Z,"f").hasModel())return;const ot=yt(this,Z,"f").getModel(),at=[];if(ot?.getValueLength()===0){const wt=(0,r.resolveColorValue)(r.editorForeground,this.themeService.getColorTheme())?.transparent(.4),It=ot.getLanguageId(),_t=yt(this,me,"f").lookupKeybinding("interactive.execute",yt(this,he,"f"))?.getLabel(),lt=t.localize(0,null,It,_t??"ctrl+enter");at.push({range:{startLineNumber:0,endLineNumber:0,startColumn:0,endColumn:1},renderOptions:{after:{contentText:lt,color:wt?wt.toString():void 0}}})}yt(this,Z,"f").setDecorationsByType("interactive-decoration",Ue,at)},nt=we([F(0,C.ITelemetryService),F(1,u.IThemeService),F(2,S.IStorageService),F(3,b.IInstantiationService),F(4,s.INotebookEditorService),F(5,I.IContextKeyService),F(6,k.ICodeEditorService),F(7,o.INotebookKernelService),F(8,h.ILanguageService),F(9,m.IKeybindingService),F(10,D.IConfigurationService),F(11,v.IMenuService),F(12,_.IContextMenuService),F(13,n.IEditorGroupsService),F(14,W.ITextResourceConfigurationService),F(15,U.INotebookExecutionStateService),F(16,q.IExtensionService)],nt),e.InteractiveEditor=nt,(0,u.registerThemingParticipant)((ut,ot)=>{ot.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: ${He}px; } `);const at=ut.getColor(d.cellEditorBackground)??ut.getColor(r.editorBackground);at&&ot.addRule(`.interactive-editor .input-cell-container .monaco-editor-background, .interactive-editor .input-cell-container .margin-view-overlays { background: ${at}; }`)})}),define(ae[982],le([1,0,1771,10,23,27,12,555,32,533,5,2854,7,33,876,8,282,86,384,6,2,188,64,11,72,2370,945,868,422,449,162,268,2338,798]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookTextDiffEditor=void 0;const O=p.$;class N{constructor(V){this.selections=V}compare(V){if(!(V instanceof N)||this.selections.length!==V.selections.length)return 3;for(let z=0;z<this.selections.length;z++)if(this.selections[z]!==V.selections[z])return 3;return 1}restore(V){const z={cellSelections:(0,_.cellIndexesToRanges)(this.selections)};return Object.assign(z,V),z}}let P=class Qi extends a.EditorPane{get textModel(){return this._model?.modified.notebook}get notebookOptions(){return this._notebookOptions}get isDisposed(){return this._isDisposed}constructor(V,z,x,H,W,U,$,q){super(Qi.ID,U,z,$),this.instantiationService=V,this.contextKeyService=x,this.notebookEditorWorkerService=H,this.configurationService=W,this.creationOptions=(0,E.getDefaultNotebookCreationOptions)(),this._dimension=null,this._diffElementViewModels=[],this._modifiedWebview=null,this._originalWebview=null,this._webviewTransparentCover=null,this._onMouseUp=this._register(new d.Emitter),this.onMouseUp=this._onMouseUp.event,this._onDidScroll=this._register(new d.Emitter),this.onDidScroll=this._onDidScroll.event,this._model=null,this._modifiedResourceDisposableStore=this._register(new n.DisposableStore),this._insetModifyQueueByOutputId=new g.SequencerByKey,this._onDidDynamicOutputRendered=this._register(new d.Emitter),this.onDidDynamicOutputRendered=this._onDidDynamicOutputRendered.event,this._localStore=this._register(new n.DisposableStore),this._onDidChangeSelection=this._register(new d.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this._isDisposed=!1,this.pendingLayouts=new WeakMap,this._notebookOptions=new y.NotebookOptions(this.configurationService,q),this._register(this._notebookOptions);const X=this.configurationService.getValue("editor");this._fontInfo=D.FontMeasurements.readFontInfo(c.BareFontInfo.createFromRawSettings(X,l.PixelRatio.value)),this._revealFirst=!0}isOverviewRulerEnabled(){return this.configurationService.getValue("notebook.experimental.diffOverviewRuler.enabled")??!1}getSelection(){const V=this._list.getFocus();return new N(V)}toggleNotebookCellSelection(V){}async focusNotebookCell(V,z){}async focusNextNotebookCell(V,z){}getScrollTop(){return this._list?.scrollTop??0}getScrollHeight(){return this._list?.scrollHeight??0}delegateVerticalScrollbarPointerDown(V){this._list?.delegateVerticalScrollbarPointerDown(V)}updateOutputHeight(V,z,x,H){const W=V.diffElement,U=this.getCellByInfo(V),$=U.outputsViewModels.indexOf(z);if(W instanceof b.SideBySideDiffElementViewModel){const q=o.CellUri.parse(V.cellUri);if(!q)return;W.updateOutputHeight(q.notebook.toString()===this._model?.original.resource.toString()?s.DiffSide.Original:s.DiffSide.Modified,$,x)}else W.updateOutputHeight(W.type==="insert"?s.DiffSide.Modified:s.DiffSide.Original,$,x);H&&this._onDidDynamicOutputRendered.fire({cell:U,output:z})}setMarkupCellEditState(V,z){}didStartDragMarkupCell(V,z){}didDragMarkupCell(V,z){}didEndDragMarkupCell(V){}didDropMarkupCell(V){}didResizeOutput(V){}createEditor(V){this._rootElement=p.append(V,p.$(".notebook-text-diff-editor")),this._overflowContainer=document.createElement("div"),this._overflowContainer.classList.add("notebook-overflow-widget-container","monaco-editor"),p.append(V,this._overflowContainer);const z=[this.instantiationService.createInstance(C.CellDiffSingleSideRenderer,this),this.instantiationService.createInstance(C.CellDiffSideBySideRenderer,this)];this._listViewContainer=p.append(this._rootElement,p.$(".notebook-diff-list-view")),this._list=this.instantiationService.createInstance(C.NotebookTextDiffList,"NotebookTextDiff",this._listViewContainer,this.instantiationService.createInstance(C.NotebookCellTextDiffListDelegate),z,this.contextKeyService,{setRowLineHeight:!1,setRowHeight:!1,supportDynamicHeights:!0,horizontalScrolling:!1,keyboardSupport:!1,mouseSupport:!0,multipleSelectionSupport:!1,typeNavigationEnabled:!0,additionalScrollHeight:0,styleController:x=>this._list,overrideStyles:{listBackground:u.editorBackground,listActiveSelectionBackground:u.editorBackground,listActiveSelectionForeground:u.foreground,listFocusAndSelectionBackground:u.editorBackground,listFocusAndSelectionForeground:u.foreground,listFocusBackground:u.editorBackground,listFocusForeground:u.foreground,listHoverForeground:u.foreground,listHoverBackground:u.editorBackground,listHoverOutline:u.focusBorder,listFocusOutline:u.focusBorder,listInactiveSelectionBackground:u.editorBackground,listInactiveSelectionForeground:u.foreground,listInactiveFocusBackground:u.editorBackground,listInactiveFocusOutline:u.editorBackground},accessibilityProvider:{getAriaLabel(){return null},getWidgetAriaLabel(){return t.localize(0,null)}}}),this._register(this._list),this._register(this._list.onMouseUp(x=>{x.element&&this._onMouseUp.fire({event:x.browserEvent,target:x.element})})),this._register(this._list.onDidScroll(()=>{this._onDidScroll.fire()})),this._register(this._list.onDidChangeFocus(()=>this._onDidChangeSelection.fire({reason:2}))),this._overviewRulerContainer=document.createElement("div"),this._overviewRulerContainer.classList.add("notebook-overview-ruler-container"),this._rootElement.appendChild(this._overviewRulerContainer),this._registerOverviewRuler(),this._webviewTransparentCover=p.append(this._list.rowsContainer,O(".webview-cover")),this._webviewTransparentCover.style.display="none",this._register(p.addStandardDisposableGenericMouseDownListener(this._overflowContainer,x=>{x.target.classList.contains("slider")&&this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="block")})),this._register(p.addStandardDisposableGenericMouseUpListener(this._overflowContainer,()=>{this._webviewTransparentCover&&(this._webviewTransparentCover.style.display="none")})),this._register(this._list.onDidScroll(x=>{this._webviewTransparentCover.style.top=`${x.scrollTop}px`}))}_registerOverviewRuler(){this._overviewRuler=this._register(this.instantiationService.createInstance(L.NotebookDiffOverviewRuler,this,Qi.ENTIRE_DIFF_OVERVIEW_WIDTH,this._overviewRulerContainer))}_updateOutputsOffsetsInWebview(V,z,x,H,W){if(x.element.style.height=`${z}px`,x.insetMapping){const U=[],$=[];x.insetMapping.forEach((q,X)=>{const G=H(q.cellInfo.diffElement);if(!(!G||this._list.indexOf(q.cellInfo.diffElement)===void 0))if(G.outputsViewModels.indexOf(X)<0)$.push(X);else{const j=this._list.getAbsoluteTopOfElement(q.cellInfo.diffElement),K=G.outputsViewModels.indexOf(X),Y=q.cellInfo.diffElement.getOutputOffsetInCell(W,K);U.push({cell:G,output:X,cellTop:j,outputOffset:Y,forceDisplay:!1})}}),x.removeInsets($),U.length&&x.updateScrollTops(U,[])}}async setInput(V,z,x,H){await super.setInput(V,z,x,H);const W=await V.resolve();this._model!==W&&(this._detachModel(),this._model=W,this._attachModel()),this._model=W,this._model!==null&&(this._revealFirst=!0,this._modifiedResourceDisposableStore.clear(),this._layoutCancellationTokenSource=new I.CancellationTokenSource,this._modifiedResourceDisposableStore.add(d.Event.any(this._model.original.notebook.onDidChangeContent,this._model.modified.notebook.onDidChangeContent)(U=>{this._model!==null&&(this._layoutCancellationTokenSource?.dispose(),this._layoutCancellationTokenSource=new I.CancellationTokenSource,this.updateLayout(this._layoutCancellationTokenSource.token))})),await this._createOriginalWebview((0,h.generateUuid)(),this._model.original.viewType,this._model.original.resource),this._originalWebview&&this._modifiedResourceDisposableStore.add(this._originalWebview),await this._createModifiedWebview((0,h.generateUuid)(),this._model.modified.viewType,this._model.modified.resource),this._modifiedWebview&&this._modifiedResourceDisposableStore.add(this._modifiedWebview),await this.updateLayout(this._layoutCancellationTokenSource.token,z?.cellSelections?(0,_.cellRangesToIndexes)(z.cellSelections):void 0))}_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 w.NotebookDiffEditorEventDispatcher;const V=()=>{p.scheduleAtNextAnimationFrame(()=>{this._isDisposed||(this._modifiedWebview&&this._updateOutputsOffsetsInWebview(this._list.scrollTop,this._list.scrollHeight,this._modifiedWebview,z=>z.modified,s.DiffSide.Modified),this._originalWebview&&this._updateOutputsOffsetsInWebview(this._list.scrollTop,this._list.scrollHeight,this._originalWebview,z=>z.original,s.DiffSide.Original))})};this._localStore.add(this._list.onDidChangeContentHeight(()=>{V()})),this._localStore.add(this._eventDispatcher.onDidChangeCellLayout(()=>{V()}))}async _createModifiedWebview(V,z,x){this._modifiedWebview?.dispose(),this._modifiedWebview=this.instantiationService.createInstance(m.BackLayerWebView,this,V,z,x,{...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(V,z,x){this._originalWebview?.dispose(),this._originalWebview=this.instantiationService.createInstance(m.BackLayerWebView,this,V,z,x,{...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"}setOptions(V){const z=V?.cellSelections?(0,_.cellRangesToIndexes)(V.cellSelections):void 0;z&&this._list.setFocus(z)}async updateLayout(V,z){if(!this._model)return;const x=await this.notebookEditorWorkerService.computeDiff(this._model.original.resource,this._model.modified.resource);if(V.isCancellationRequested)return;Qi.prettyChanges(this._model,x.cellsDiff);const{viewModels:H,firstChangeIndex:W}=Qi.computeDiff(this.instantiationService,this.configurationService,this._model,this._eventDispatcher,x);this._isViewModelTheSame(H)||(this._originalWebview?.removeInsets([...this._originalWebview?.insetMapping.keys()]),this._modifiedWebview?.removeInsets([...this._modifiedWebview?.insetMapping.keys()]),this._setViewModel(H)),this._revealFirst&&W!==-1&&W<this._list.length&&(this._revealFirst=!1,this._list.setFocus([W]),this._list.reveal(W,.3)),z&&this._list.setFocus(z)}_isViewModelTheSame(V){let z=!0;if(this._diffElementViewModels.length===V.length)for(let x=0;x<V.length;x++){const H=this._diffElementViewModels[x],W=V[x];if(H.original?.textModel.getHashValue()!==W.original?.textModel.getHashValue()||H.modified?.textModel.getHashValue()!==W.modified?.textModel.getHashValue()){z=!1;break}}else z=!1;return z}_setViewModel(V){this._diffElementViewModels=V,this._list.splice(0,this._list.length,this._diffElementViewModels),this.isOverviewRulerEnabled()&&this._overviewRuler.updateViewModels(this._diffElementViewModels,this._eventDispatcher)}static prettyChanges(V,z){const x=z.changes;for(let H=0;H<z.changes.length-1;H++){const W=x[H],U=x[H+1],$=W.originalStart,q=W.modifiedStart;W.originalLength===1&&W.modifiedLength===0&&U.originalStart===$+2&&U.originalLength===0&&U.modifiedStart===q+1&&U.modifiedLength===1&&V.original.notebook.cells[$].getHashValue()===V.modified.notebook.cells[q+1].getHashValue()&&V.original.notebook.cells[$+1].getHashValue()===V.modified.notebook.cells[q].getHashValue()&&(W.originalStart=$,W.originalLength=0,W.modifiedStart=q,W.modifiedLength=1,U.originalStart=$+1,U.originalLength=1,U.modifiedStart=q+2,U.modifiedLength=0,H++)}}static computeDiff(V,z,x,H,W){const U=W.cellsDiff.changes,$=[],q=x.original.notebook,X=x.modified.notebook;let G=0,Q=0,j=-1;const K={metadataStatusHeight:z.getValue("notebook.diff.ignoreMetadata")?0:25,outputStatusHeight:z.getValue("notebook.diff.ignoreOutputs")||!!X.transientOptions.transientOutputs?0:25};for(let Y=0;Y<U.length;Y++){const ee=U[Y];for(let re=0;re<ee.originalStart-G;re++){const oe=q.cells[G+re],se=X.cells[Q+re];oe.getHashValue()===se.getHashValue()?$.push(new b.SideBySideDiffElementViewModel(x.modified.notebook,x.original.notebook,V.createInstance(v.DiffNestedCellViewModel,oe),V.createInstance(v.DiffNestedCellViewModel,se),"unchanged",H,K)):(j===-1&&(j=$.length),$.push(new b.SideBySideDiffElementViewModel(x.modified.notebook,x.original.notebook,V.createInstance(v.DiffNestedCellViewModel,oe),V.createInstance(v.DiffNestedCellViewModel,se),"modified",H,K)))}const ie=Qi.computeModifiedLCS(V,ee,q,X,H,K);ie.length&&j===-1&&(j=$.length),$.push(...ie),G=ee.originalStart+ee.originalLength,Q=ee.modifiedStart+ee.modifiedLength}for(let Y=G;Y<q.cells.length;Y++)$.push(new b.SideBySideDiffElementViewModel(x.modified.notebook,x.original.notebook,V.createInstance(v.DiffNestedCellViewModel,q.cells[Y]),V.createInstance(v.DiffNestedCellViewModel,X.cells[Y-G+Q]),"unchanged",H,K));return{viewModels:$,firstChangeIndex:j}}static computeModifiedLCS(V,z,x,H,W,U){const $=[],q=Math.min(z.originalLength,z.modifiedLength);for(let X=0;X<q;X++){const G=x.cells[z.originalStart+X].equal(H.cells[z.modifiedStart+X]);$.push(new b.SideBySideDiffElementViewModel(H,x,V.createInstance(v.DiffNestedCellViewModel,x.cells[z.originalStart+X]),V.createInstance(v.DiffNestedCellViewModel,H.cells[z.modifiedStart+X]),G?"unchanged":"modified",W,U))}for(let X=q;X<z.originalLength;X++)$.push(new b.SingleSideDiffElementViewModel(x,H,V.createInstance(v.DiffNestedCellViewModel,x.cells[z.originalStart+X]),void 0,"delete",W,U));for(let X=q;X<z.modifiedLength;X++)$.push(new b.SingleSideDiffElementViewModel(H,x,void 0,V.createInstance(v.DiffNestedCellViewModel,H.cells[z.modifiedStart+X]),"insert",W,U));return $}scheduleOutputHeightAck(V,z,x){const H=V.diffElement;let W=s.DiffSide.Original;if(H instanceof b.SideBySideDiffElementViewModel){const $=o.CellUri.parse(V.cellUri);if(!$)return;W=$.notebook.toString()===this._model?.original.resource.toString()?s.DiffSide.Original:s.DiffSide.Modified}else W=H.type==="insert"?s.DiffSide.Modified:s.DiffSide.Original;const U=W===s.DiffSide.Modified?this._modifiedWebview:this._originalWebview;p.scheduleAtNextAnimationFrame(()=>{U?.ackHeight([{cellId:V.cellId,outputId:z,height:x}])},10)}layoutNotebookCell(V,z){const x=(U,$)=>{this._list.updateElementHeight2(U,$)};this.pendingLayouts.has(V)&&this.pendingLayouts.get(V).dispose();let H;const W=p.scheduleAtNextAnimationFrame(()=>{this.pendingLayouts.delete(V),x(V,z),H()});return this.pendingLayouts.set(V,(0,n.toDisposable)(()=>{W.dispose(),H()})),new Promise(U=>{H=U})}setScrollTop(V){this._list.scrollTop=V}triggerScroll(V){this._list.triggerScrollFromMouseWheelEvent(V)}createOutput(V,z,x,H,W){this._insetModifyQueueByOutputId.queue(x.source.model.outputId+(W===s.DiffSide.Modified?"-right":"left"),async()=>{const U=W===s.DiffSide.Modified?this._modifiedWebview:this._originalWebview;if(!!U)if(U.insetMapping.has(x.source)){const $=this._list.getAbsoluteTopOfElement(V),q=z.outputsViewModels.indexOf(x.source),X=V.getOutputOffsetInCell(W,q);U.updateScrollTops([{cell:z,output:x.source,cellTop:$,outputOffset:X,forceDisplay:!0}],[])}else{const $=this._list.getAbsoluteTopOfElement(V);await U.createOutput({diffElement:V,cellHandle:z.handle,cellId:z.id,cellUri:z.uri},x,$,H())}})}updateMarkupCellHeight(){}getCellByInfo(V){return V.diffElement.getCellByUri(V.cellUri)}getCellById(V){throw new Error("Not implemented")}removeInset(V,z,x,H){this._insetModifyQueueByOutputId.queue(x.model.outputId+(H===s.DiffSide.Modified?"-right":"left"),async()=>{const W=H===s.DiffSide.Modified?this._modifiedWebview:this._originalWebview;!W||!W.insetMapping.has(x)||W.removeInsets([x])})}showInset(V,z,x,H){this._insetModifyQueueByOutputId.queue(x.model.outputId+(H===s.DiffSide.Modified?"-right":"left"),async()=>{const W=H===s.DiffSide.Modified?this._modifiedWebview:this._originalWebview;if(!W||!W.insetMapping.has(x))return;const U=this._list.getAbsoluteTopOfElement(V),$=z.outputsViewModels.indexOf(x),q=V.getOutputOffsetInCell(H,$);W.updateScrollTops([{cell:z,output:x,cellTop:U,outputOffset:q,forceDisplay:!0}],[])})}hideInset(V,z,x){this._modifiedWebview?.hideInset(x),this._originalWebview?.hideInset(x)}getDomNode(){return this._rootElement}getOverflowContainerDomNode(){return this._overflowContainer}getControl(){}setEditorVisible(V,z){super.setEditorVisible(V,z)}focus(){super.focus()}clearInput(){super.clearInput(),this._modifiedResourceDisposableStore.clear(),this._list?.splice(0,this._list?.length||0),this._model=null,this._diffElementViewModels.forEach(V=>V.dispose()),this._diffElementViewModels=[]}deltaCellOutputContainerClassNames(V,z,x,H){V===s.DiffSide.Original?this._originalWebview?.deltaCellContainerClassNames(z,x,H):this._modifiedWebview?.deltaCellContainerClassNames(z,x,H)}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(V){if(!this._model)throw new Error("Editor is not attached to model yet");const z=o.CellUri.parse(V.uri);if(!z)throw new Error("Nested cell in the diff editor has wrong Uri");const x=this._model.original.notebook.uri.toString()===z.notebook.toString(),H=this._diffElementViewModels.find(W=>{const U=x?W.original:W.modified;return U?U.uri.toString()===V.uri.toString():!1});if(!H)throw new Error("Nested cell in the diff editor does not match any diff element");return H.type==="unchanged"?this.getLayoutInfo():H.type==="insert"||H.type==="delete"?{width:this._dimension.width/2,height:this._dimension.height/2,fontInfo:this._fontInfo}:H.checkIfOutputsModified()?{width:this._dimension.width/2,height:this._dimension.height/2,fontInfo:this._fontInfo}:this.getLayoutInfo()}layout(V){this._rootElement.classList.toggle("mid-width",V.width<1e3&&V.width>=600),this._rootElement.classList.toggle("narrow-width",V.width<600);const z=this.isOverviewRulerEnabled();this._dimension=V.with(V.width-(z?Qi.ENTIRE_DIFF_OVERVIEW_WIDTH:0)),this._listViewContainer.style.height=`${V.height}px`,this._listViewContainer.style.width=`${this._dimension.width}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=`${this._dimension.height}px`,this._webviewTransparentCover.style.width=`${this._dimension.width}px`),z&&this._overviewRuler.layout(),this._eventDispatcher?.emit([new w.NotebookDiffLayoutChangedEvent({width:!0,fontInfo:!0},this.getLayoutInfo())])}dispose(){this._isDisposed=!0,this._layoutCancellationTokenSource?.dispose(),this._detachModel(),super.dispose()}};P.ENTIRE_DIFF_OVERVIEW_WIDTH=30,P.ID=o.NOTEBOOK_DIFF_EDITOR_ID,P=we([F(0,S.IInstantiationService),F(1,k.IThemeService),F(2,r.IContextKeyService),F(3,i.INotebookEditorWorkerService),F(4,f.IConfigurationService),F(5,A.ITelemetryService),F(6,R.IStorageService),F(7,T.INotebookExecutionStateService)],P),e.NotebookTextDiffEditor=P,(0,M.registerZIndex)(M.ZIndex.Base,10,"notebook-diff-view-viewport-slider"),(0,k.registerThemingParticipant)((B,V)=>{const z=B.getColor(E.notebookCellBorder);z&&(V.addRule(`.notebook-text-diff-editor .cell-body .border-container .top-border { border-top: 1px solid ${z};}`),V.addRule(`.notebook-text-diff-editor .cell-body .border-container .bottom-border { border-top: 1px solid ${z};}`),V.addRule(`.notebook-text-diff-editor .cell-body .border-container .left-border { border-left: 1px solid ${z};}`),V.addRule(`.notebook-text-diff-editor .cell-body .border-container .right-border { border-right: 1px solid ${z};}`),V.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 ${z}; }`));const x=B.getColor(E.focusedEditorBorderColor);x&&(V.addRule(`.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .top-border { border-top: 1px solid ${x};}`),V.addRule(`.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .bottom-border { border-top: 1px solid ${x};}`),V.addRule(`.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .left-border { border-left: 1px solid ${x};}`),V.addRule(`.notebook-text-diff-editor .monaco-list-row.focused .cell-body .border-container .right-border { border-right: 1px solid ${x};}`));const H=B.getColor(u.diffDiagonalFill);V.addRule(` .notebook-text-diff-editor .diagonal-fill { background-image: linear-gradient( -45deg, ${H} 12.5%, #0000 12.5%, #0000 50%, ${H} 50%, ${H} 62.5%, #0000 62.5%, #0000 100% ); background-size: 8px 8px; } `);const W=B.getColor(E.cellEditorBackground)??B.getColor(u.editorBackground);W&&V.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: ${W}; }`);const U=B.getColor(u.diffInserted);U&&(V.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: ${U}; } .monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.foreground { background-color: ${U}; } .monaco-workbench .notebook-text-diff-editor .cell-body.right .output-info-container .output-view-container div.output-empty-view { background-color: ${U}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .source-container { background-color: ${U}; } .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: ${U}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-editor-container { background-color: ${U}; } .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: ${U}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-editor-container { background-color: ${U}; } .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: ${U}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .metadata-header-container { background-color: ${U}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.inserted .output-header-container { background-color: ${U}; } `));const $=B.getColor(u.diffRemoved);$&&(V.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: ${$}; } .monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.foreground { background-color: ${$}; } .monaco-workbench .notebook-text-diff-editor .cell-body.left .output-info-container .output-view-container div.output-empty-view { background-color: ${$}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .source-container { background-color: ${$}; } .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: ${$}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-editor-container { background-color: ${$}; } .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: ${$}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-editor-container { background-color: ${$}; } .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: ${$}; } `),V.addRule(` .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .metadata-header-container { background-color: ${$}; } .notebook-text-diff-editor .cell-body .cell-diff-editor-container.removed .output-header-container { background-color: ${$}; } `)),V.addRule(`.notebook-text-diff-editor .cell-body { margin: ${s.DIFF_CELL_MARGIN}px; }`)})}),define(ae[2858],le([1,0,145,1770,15,8,7,71,384,982,215,24,17,55,43]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.diff.switchToText",icon:S.openAsTextIcon,title:{value:(0,p.localize)(0,null),original:"Open Text Diff Editor"},precondition:E.ActiveEditorContext.isEqualTo(b.NotebookTextDiffEditor.ID),menu:[{id:R.MenuId.EditorTitle,group:"navigation",when:E.ActiveEditorContext.isEqualTo(b.NotebookTextDiffEditor.ID)}]})}async run(c){const l=c.get(C.IEditorService),s=l.activeEditorPane;if(s&&s instanceof b.NotebookTextDiffEditor){const d=s.input;await l.openEditor({original:{resource:d.original.resource},modified:{resource:d.resource},label:d.getName(),options:{preserveFocus:!1,override:i.DEFAULT_EDITOR_ASSOCIATION.id}})}}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.diff.cell.revertMetadata",title:(0,p.localize)(1,null),icon:S.revertIcon,f1:!1,menu:{id:R.MenuId.NotebookDiffCellMetadataTitle,when:I.NOTEBOOK_DIFF_CELL_PROPERTY},precondition:I.NOTEBOOK_DIFF_CELL_PROPERTY})}run(c,l){if(!l)return;const s=l.cell.original,d=l.cell.modified;!s||!d||(d.textModel.metadata=s.metadata)}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.diff.cell.switchOutputRenderingStyleToText",title:(0,p.localize)(2,null),icon:S.renderOutputIcon,f1:!1,menu:{id:R.MenuId.NotebookDiffCellOutputsTitle,when:I.NOTEBOOK_DIFF_CELL_PROPERTY_EXPANDED}})}run(c,l){!l||(l.cell.renderOutput=!l.cell.renderOutput)}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.diff.cell.revertOutputs",title:(0,p.localize)(3,null),icon:S.revertIcon,f1:!1,menu:{id:R.MenuId.NotebookDiffCellOutputsTitle,when:I.NOTEBOOK_DIFF_CELL_PROPERTY},precondition:I.NOTEBOOK_DIFF_CELL_PROPERTY})}run(c,l){if(!l)return;const s=l.cell.original,d=l.cell.modified;!s||!d||d.textModel.spliceNotebookCellOutputs({start:0,deleteCount:d.outputs.length,newOutputs:s.outputs})}}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"notebook.diff.cell.revertInput",title:(0,p.localize)(4,null),icon:S.revertIcon,f1:!1,menu:{id:R.MenuId.NotebookDiffCellInputTitle,when:I.NOTEBOOK_DIFF_CELL_INPUT},precondition:I.NOTEBOOK_DIFF_CELL_INPUT})}run(c,l){if(!l)return;const s=l.cell.original,d=l.cell.modified;return!s||!d?void 0:c.get(t.IBulkEditService).apply([new t.ResourceTextEdit(d.uri,{range:d.textModel.getFullModelRange(),text:s.textModel.getValue()})],{quotableLabel:"Revert Notebook Cell Content Change"})}});class f extends R.Action2{constructor(l,s,d,n,a,o,g){super({id:l,title:s,precondition:d,menu:[{id:R.MenuId.EditorTitle,group:"notebook",when:d,order:a}],toggled:n}),this.toggleOutputs=o,this.toggleMetadata=g}async run(l){const s=l.get(A.IConfigurationService);if(this.toggleOutputs!==void 0){const d=s.getValue("notebook.diff.ignoreOutputs");s.updateValue("notebook.diff.ignoreOutputs",!d)}if(this.toggleMetadata!==void 0){const d=s.getValue("notebook.diff.ignoreMetadata");s.updateValue("notebook.diff.ignoreMetadata",!d)}}}(0,R.registerAction2)(class extends f{constructor(){super("notebook.diff.showOutputs",{value:(0,p.localize)(5,null),original:"Show Outputs Differences"},E.ActiveEditorContext.isEqualTo(b.NotebookTextDiffEditor.ID),k.ContextKeyExpr.notEquals("config.notebook.diff.ignoreOutputs",!0),2,!0,void 0)}}),(0,R.registerAction2)(class extends f{constructor(){super("notebook.diff.showMetadata",{value:(0,p.localize)(6,null),original:"Show Metadata Differences"},E.ActiveEditorContext.isEqualTo(b.NotebookTextDiffEditor.ID),k.ContextKeyExpr.notEquals("config.notebook.diff.ignoreMetadata",!0),1,void 0,!0)}}),r.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,type:"object",properties:{"notebook.diff.ignoreMetadata":{type:"boolean",default:!1,markdownDescription:(0,p.localize)(7,null)},"notebook.diff.ignoreOutputs":{type:"boolean",default:!1,markdownDescription:(0,p.localize)(8,null)}}})}),define(ae[2859],le([1,0,60,555,2,58,5,258,6]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookEditorWidgetService=void 0;let b=class{constructor(C){this._tokenPool=1,this._disposables=new R.DisposableStore,this._notebookEditors=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 r=new Map,u=i=>{const{id:f}=i,c=[];c.push(i.onDidCloseEditor(l=>{const s=this._borrowableEditors.get(i.id);if(!s)return;(l.editor instanceof E.NotebookEditorInput?[l.editor]:(0,E.isCompositeNotebookEditorInput)(l.editor)?l.editor.editorInputs:[]).forEach(n=>{const a=s.get(n.resource);!a||(a.token=void 0,this._disposeWidget(a.widget),s.delete(n.resource),a.widget=void 0)})})),c.push(i.onWillMoveEditor(l=>{l.editor instanceof E.NotebookEditorInput&&this._allowWidgetMove(l.editor,l.groupId,l.target),(0,E.isCompositeNotebookEditorInput)(l.editor)&&l.editor.editorInputs.forEach(s=>{this._allowWidgetMove(s,l.groupId,l.target)})})),r.set(f,c)};this._disposables.add(C.onDidAddGroup(u)),C.whenReady.then(()=>C.groups.forEach(u)),this._disposables.add(C.onDidRemoveGroup(i=>{const f=r.get(i.id);f&&(f.forEach(l=>l.dispose()),r.delete(i.id));const c=this._borrowableEditors.get(i.id);if(this._borrowableEditors.delete(i.id),c)for(const l of c.values())l.token=void 0,this._disposeWidget(l.widget)}))}dispose(){this._disposables.dispose(),this._onNotebookEditorAdd.dispose(),this._onNotebookEditorsRemove.dispose()}_disposeWidget(C){C.onWillHide();const r=C.getDomNode();C.dispose(),r.remove()}_allowWidgetMove(C,r,u){if(this._borrowableEditors.get(u)?.get(C.resource))return;const f=this._borrowableEditors.get(r)?.get(C.resource);if(!f)throw new Error("no widget at source group");this._borrowableEditors.get(r)?.delete(C.resource);let c=this._borrowableEditors.get(u);c||(c=new t.ResourceMap,this._borrowableEditors.set(u,c)),c.set(C.resource,f)}retrieveWidget(C,r,u,i,f){let c=this._borrowableEditors.get(r.id)?.get(u.resource);if(c)c.token=this._tokenPool++;else{const s=C.get(k.IInstantiationService).createInstance(p.NotebookEditorWidget,i??(0,p.getDefaultNotebookCreationOptions)(),f),d=this._tokenPool++;c={widget:s,token:d};let n=this._borrowableEditors.get(r.id);n||(n=new t.ResourceMap,this._borrowableEditors.set(r.id,n)),n.set(u.resource,c)}return this._createBorrowValue(c.token,c)}_createBorrowValue(C,r){return{get value(){return r.token===C?r.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])}};b=we([F(0,A.IEditorGroupsService)],b),e.NotebookEditorWidgetService=b}),define(ae[2860],le([1,0,1861,15,31,35,155,17,44,2846,669,2387,882,2467,288,976,55,331,470]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,A.registerSingleton)(i.ISnippetsService,f.SnippetsService,1),(0,p.registerAction2)(C.InsertSnippetAction),R.CommandsRegistry.registerCommandAlias("editor.action.showSnippets","editor.action.insertSnippet"),(0,p.registerAction2)(r.SurroundWithSnippetEditorAction),(0,p.registerAction2)(b.ConfigureSnippets),(0,p.registerAction2)(S.ApplyFileSnippetAction),E.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(u.SnippetCodeActions,3),E.Registry.as(c.Extensions.Configuration).registerConfiguration({...l.editorConfigurationBaseNode,properties:{"editor.snippets.codeActions.enabled":{description:t.localize(0,null),type:"boolean",default:!0}}});const s="vscode://schemas/snippets",d={prefix:{description:t.localize(1,null),type:["string","array"]},isFileTemplate:{description:t.localize(2,null),type:"boolean"},body:{markdownDescription:t.localize(3,null),type:["string","array"],items:{type:"string"}},description:{description:t.localize(4,null),type:["string","array"]}},n={id:s,allowComments:!0,allowTrailingCommas:!0,defaultSnippets:[{label:t.localize(5,null),body:{"${1:snippetName}":{prefix:"${2:prefix}",body:"${3:snippet}",description:"${4:description}"}}}],type:"object",description:t.localize(6,null),additionalProperties:{type:"object",required:["body"],properties:d,additionalProperties:!1}},a="vscode://schemas/global-snippets",o={id:a,allowComments:!0,allowTrailingCommas:!0,defaultSnippets:[{label:t.localize(7,null),body:{"${1:snippetName}":{scope:"${2:scope}",prefix:"${3:prefix}",body:"${4:snippet}",description:"${5:description}"}}}],type:"object",description:t.localize(8,null),additionalProperties:{type:"object",required:["body"],properties:{...d,scope:{description:t.localize(9,null),type:"string"}},additionalProperties:!1}},g=E.Registry.as(k.Extensions.JSONContribution);g.registerSchema(s,n),g.registerSchema(a,o)}),define(ae[2861],le([1,0,17,44,69,27,34,24,38,193,51,14,2,2131,213,8,78,18,22,376,108,91,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryContribution=void 0;let g=class ro extends r.Disposable{constructor(v,m,w,D,y,T,_,L,M,O,N){super(),this.telemetryService=v,this.contextService=m,this.userDataProfileService=L;const{filesToOpenOrCreate:P,filesToDiff:B,filesToMerge:V}=_,z=O.getActivePaneComposite(0);v.publicLog2("workspaceLoad",{userAgent:navigator.userAgent,windowSize:{innerHeight:window.innerHeight,innerWidth:window.innerWidth,outerHeight:window.outerHeight,outerWidth:window.outerWidth},emptyWorkbench:m.getWorkbenchState()===1,"workbench.filesToOpenOrCreate":P&&P.length||0,"workbench.filesToDiff":B&&B.length||0,"workbench.filesToMerge":V&&V.length||0,customKeybindingsCount:y.customKeybindingsCount(),theme:T.getColorTheme().id,language:C.language,pinnedViewlets:O.getPinnedPaneCompositeIds(0),restoredViewlet:z?z.getId():void 0,restoredEditors:D.visibleEditors.length,startupKind:w.startupKind}),this._register(new u.default(v)),this._register((0,i.configurationTelemetry)(v,M)),this._register(N.files.onDidResolve(x=>this.onTextFileModelResolved(x))),this._register(N.files.onDidSave(x=>this.onTextFileModelSaved(x))),this._register(w.onDidShutdown(()=>this.dispose()))}onTextFileModelResolved(v){const m=this.getTypeIfSettings(v.model.resource);m?this.telemetryService.publicLog2("settingsRead",{settingsType:m}):this.telemetryService.publicLog2("fileGet",this.getTelemetryData(v.model.resource,v.reason))}onTextFileModelSaved(v){const m=this.getTypeIfSettings(v.model.resource);m?this.telemetryService.publicLog2("settingsWritten",{settingsType:m}):this.telemetryService.publicLog2("filePUT",this.getTelemetryData(v.model.resource,v.reason))}getTypeIfSettings(v){if((0,l.extname)(v)!==".json")return"";if((0,l.isEqual)(v,this.userDataProfileService.currentProfile.settingsResource))return"global-settings";if((0,l.isEqual)(v,this.userDataProfileService.currentProfile.keybindingsResource))return"keybindings";if((0,l.isEqualOrParent)(v,this.userDataProfileService.currentProfile.snippetsHome))return"snippets";const m=this.contextService.getWorkspace().folders;for(const w of m)if((0,l.isEqualOrParent)(v,w.toResource(".vscode"))){const D=(0,l.basename)(v);if(ro.ALLOWLIST_WORKSPACE_JSON.indexOf(D)>-1)return`.vscode/${D}`}return""}getTelemetryData(v,m){let w=(0,l.extname)(v);const D=w.indexOf("?");w=D!==-1?w.substr(0,D):w;const y=(0,l.basename)(v),T=v.scheme===s.Schemas.file?v.fsPath:v.path,_={mimeType:(0,d.getMimeTypes)(v).join(", "),ext:w,path:(0,n.hash)(T),reason:m,allowlistedjson:void 0};return w===".json"&&ro.ALLOWLIST_JSON.indexOf(y)>-1&&(_.allowlistedjson=y),_}};g.ALLOWLIST_JSON=["package.json","package-lock.json","tsconfig.json","jsconfig.json","bower.json",".eslintrc.json","tslint.json","composer.json"],g.ALLOWLIST_WORKSPACE_JSON=["settings.json","extensions.json","tasks.json","launch.json"],g=we([F(0,A.ITelemetryService),F(1,k.IWorkspaceContextService),F(2,R.ILifecycleService),F(3,E.IEditorService),F(4,I.IKeybindingService),F(5,b.IWorkbenchThemeService),F(6,S.IWorkbenchEnvironmentService),F(7,o.IUserDataProfileService),F(8,f.IConfigurationService),F(9,a.IPaneCompositePartService),F(10,c.ITextFileService)],g),e.TelemetryContribution=g,t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(g,3)}),define(ae[2862],le([1,0,10,79,137,279,36,11,6,88,1925,37,5,12,693,313,314,536,291,259]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingExplorerFilter=void 0;const n={["@failed"]:(0,S.localize)(0,null),["@executed"]:(0,S.localize)(1,null),["@doc"]:(0,S.localize)(2,null),["@hidden"]:(0,S.localize)(3,null)};let a=class extends R.BaseActionViewItem{constructor(h,v,m,w,D){super(null,h),this.state=v,this.themeService=m,this.instantiationService=w,this.testService=D,this.focusEmitter=this._register(new I.Emitter),this.onDidFocus=this.focusEmitter.event,this.history=this.instantiationService.createInstance(c.StoredValue,{key:"testing.filterHistory2",scope:1,target:0}),this.filtersAction=new k.Action("markersFiltersAction",(0,S.localize)(4,null),"testing-filter-button "+u.ThemeIcon.asClassName(f.testingFilterIcon)),this.updateFilterActiveState(),this._register(D.excluded.onTestExclusionsChanged(this.updateFilterActiveState,this))}render(h){h.classList.add("testing-filter-action-item");const v=this._register(new E.Delayer(400)),m=this.wrapper=t.$(".testing-filter-wrapper");h.appendChild(m);let w=this.history.get({lastValue:"",values:[]});w instanceof Array&&(w={lastValue:"",values:w}),w.lastValue&&this.state.setText(w.lastValue);const D=this.input=this._register(this.instantiationService.createInstance(i.ContextScopedSuggestEnabledInputWithHistory,{id:"testing.explorer.filter",ariaLabel:(0,S.localize)(5,null),parent:m,suggestionProvider:{triggerCharacters:["@"],provideResults:()=>[...Object.entries(n).map(([T,_])=>({label:T,detail:_})),...b.Iterable.map(this.testService.collection.tags.values(),T=>{const{ctrlId:_,tagId:L}=(0,d.denamespaceTestTag)(T.id),M=`@${_}:${L}`;return{label:`@${_}:${L}`,detail:this.testService.collection.getNodeById(_)?.item.label,insertText:L.includes(" ")?`@${_}:"${L.replace(/(["\\])/g,"\\$1")}"`:M}})].filter(T=>!this.state.text.value.includes(T.label))},resourceHandle:"testing:filter",suggestOptions:{value:this.state.text.value,placeholderText:(0,S.localize)(6,null)},history:w.values}));this._register((0,i.attachSuggestEnabledInputBoxStyler)(D,this.themeService)),this._register(this.state.text.onDidChange(T=>{D.getValue()!==T&&D.setValue(T)})),this._register(this.state.onDidRequestInputFocus(()=>{D.focus()})),this._register(D.onDidFocus(()=>{this.focusEmitter.fire()})),this._register(D.onInputDidChange(()=>v.trigger(()=>{D.addToHistory(),this.state.setText(D.getValue())}))),this._register(new p.ActionBar(h,{actionViewItemProvider:T=>{if(T.id===this.filtersAction.id)return this.instantiationService.createInstance(o,T,this.state,this.actionRunner)}})).push(this.filtersAction,{icon:!0,label:!1}),this.layout(this.wrapper.clientWidth)}layout(h){this.input.layout(new t.Dimension(h-24-8-22,27-4))}focus(){this.input.focus()}saveState(){this.history.store({lastValue:this.input.getValue(),values:this.input.getHistory()})}dispose(){this.saveState(),super.dispose()}updateFilterActiveState(){this.filtersAction.checked=this.testService.excluded.hasAny}};a=we([F(1,l.ITestExplorerFilterState),F(2,u.IThemeService),F(3,r.IInstantiationService),F(4,s.ITestService)],a),e.TestingExplorerFilter=a;let o=class extends A.DropdownMenuActionViewItem{constructor(h,v,m,w,D){super(h,{getActions:()=>this.getActions()},w,{actionRunner:m,classNames:h.class,anchorAlignmentProvider:()=>1,menuAsChild:!0}),this.filters=v,this.testService=D}render(h){super.render(h),this.updateChecked()}getActions(){return[...["@failed","@executed","@doc"].map(h=>({checked:this.filters.isFilteringFor(h),class:void 0,enabled:!0,id:h,label:n[h],run:()=>this.filters.toggleFilteringFor(h),tooltip:"",dispose:()=>null})),new k.Separator,{checked:this.filters.fuzzy.value,class:void 0,enabled:!0,id:"fuzzy",label:(0,S.localize)(7,null),run:()=>this.filters.fuzzy.value=!this.filters.fuzzy.value,tooltip:""},new k.Separator,{checked:this.filters.isFilteringFor("@hidden"),class:void 0,enabled:this.testService.excluded.hasAny,id:"showExcluded",label:(0,S.localize)(8,null),run:()=>this.filters.toggleFilteringFor("@hidden"),tooltip:""},{checked:!1,class:void 0,enabled:this.testService.excluded.hasAny,id:"removeExcluded",label:(0,S.localize)(9,null),run:async()=>this.testService.excluded.clear(),tooltip:""}]}updateChecked(){this.element.classList.toggle("checked",this._action.checked)}};o=we([F(3,C.IContextMenuService),F(4,s.ITestService)],o)}),define(ae[2863],le([1,0,10,79,182,143,196,305,36,11,65,6,2,28,13,184,1926,440,84,15,31,8,7,37,5,38,76,41,66,23,27,33,73,12,57,129,230,45,899,2420,455,655,313,2862,951,346,654,314,536,229,315,537,347,271,247,291,24,1178]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TestingExplorerViewModel=e.TestingExplorerView=void 0;var te;(function(ke){ke[ke.Input=0]="Input",ke[ke.Tree=1]="Tree"})(te||(te={}));let Z=class extends N.ViewPane{constructor(Ee,Te,_e,Re,Le,Me,Oe,Ke,We,Xe,Je,rt,je,Ue){super(Ee,_e,Te,Re,Oe,Me,Le,Ke,We,Je),this.testService=Xe,this.testProgressService=rt,this.testProfileService=je,this.commandService=Ue,this.filterActionBar=this._register(new r.MutableDisposable),this.discoveryProgress=this._register(new r.MutableDisposable),this.filter=this._register(new r.MutableDisposable),this.filterFocusListener=this._register(new r.MutableDisposable),this.dimensions={width:0,height:0},this.lastFocusState=0;const Fe=this._register(new b.RunOnceScheduler(()=>this.layoutBody(),1));this._register(this.onDidChangeViewWelcomeState(()=>{this.shouldShowWelcome()||Fe.schedule()})),this._register(Xe.collection.onBusyProvidersChange(He=>{this.updateDiscoveryProgress(He)})),this._register(je.onDidChange(()=>this.updateActions()))}shouldShowWelcome(){return this.viewModel?.welcomeExperience===1}focus(){super.focus(),this.lastFocusState===1?this.viewModel.tree.domFocus():this.filter.value?.focus()}getSelectedOrVisibleItems(Ee){const Te=this.viewModel.projection.value;if(!Te)return{include:[],exclude:[]};if(Te instanceof z.ByNameTestItemElement)return{include:[...this.testService.collection.rootItems],exclude:[]};const _e=[],Re=[],Le=(Me,Oe)=>{if(!(Me instanceof x.TestItemTreeElement)||!this.viewModel.tree.hasElement(Me))return;const Ke=this.viewModel.tree.getNode(Me);if(!Ke.visible){Oe&&Re.push(Me.test);return}!Oe&&(!Ee||(0,ie.canUseProfileWithTest)(Ee,Me.test))&&(Ke.children.length===0||Ke.visibleChildrenCount*2>=Ke.children.length)&&Ke.visibleChildrenCount!==1&&(_e.push(Me.test),Oe=!0);for(const We of Me.children)Le(We,Oe)};for(const Me of this.testService.collection.rootItems){const Oe=Te.getElementByTestId(Me.item.extId);if(!!Oe&&!(Ee&&!(0,ie.canUseProfileWithTest)(Ee,Me)))if(this.viewModel.tree.hasElement(Oe))Le(Oe,!1);else{const Ke=[...Oe.children].reduce((We,Xe)=>this.viewModel.tree.hasElement(Xe)&&this.viewModel.tree.getNode(Xe).visible?We+1:We,0);Oe.children.size>0&&Ke*2>=Oe.children.size?(_e.push(Oe.test),Oe.children.forEach(We=>Le(We,!0))):Oe.children.forEach(We=>Le(We,!1))}}return{include:_e,exclude:Re}}renderBody(Ee){super.renderBody(Ee),this.container=t.append(Ee,t.$(".test-explorer")),this.treeHeader=t.append(this.container,t.$(".test-explorer-header")),this.filterActionBar.value=this.createFilterActionBar();const Te=t.append(this.treeHeader,t.$(".test-explorer-messages"));this._register(this.testProgressService.onTextChange(Re=>{const Le=!!Te.innerText,Me=!!Re;Te.innerText=Re,Le!==Me&&this.layoutBody()}));const _e=t.append(this.container,t.$(".test-explorer-tree"));this.viewModel=this.instantiationService.createInstance(ce,_e,this.onDidChangeBodyVisibility),this._register(this.viewModel.tree.onDidFocus(()=>this.lastFocusState=1)),this._register(this.viewModel.onChangeWelcomeVisibility(()=>this._onDidChangeViewWelcomeState.fire())),this._register(this.viewModel),this._onDidChangeViewWelcomeState.fire()}getActionViewItem(Ee){switch(Ee.id){case"workbench.actions.treeView.testExplorer.filter":return this.filter.value=this.instantiationService.createInstance(U.TestingExplorerFilter,Ee),this.filterFocusListener.value=this.filter.value.onDidFocus(()=>this.lastFocusState=0),this.filter.value;case"testing.runSelected":return this.getRunGroupDropdown(2,Ee);case"testing.debugSelected":return this.getRunGroupDropdown(4,Ee);default:return super.getActionViewItem(Ee)}}getTestConfigGroupActions(Ee){const Te=[];let _e=0,Re=!1;const Le=this.testProfileService.getGroupDefaultProfiles(Ee);for(const{profiles:Oe,controller:Ke}of this.testProfileService.all()){let We=!1;for(const Xe of Oe)Xe.group===Ee&&(We||(We=!0,_e++,Te.push(new I.Action(`${Ke.id}.$root`,Ke.label.value,void 0,!1))),Re=Re||Xe.hasConfigurationHandler,Te.push(new I.Action(`${Ke.id}.${Xe.profileId}`,Le.includes(Xe)?(0,c.localize)(0,null,Xe.label):Xe.label,void 0,void 0,()=>{const{include:Je,exclude:rt}=this.getSelectedOrVisibleItems(Xe);this.testService.runResolvedTests({exclude:rt.map(je=>je.item.extId),targets:[{profileGroup:Xe.group,profileId:Xe.profileId,controllerId:Xe.controllerId,testIds:Je.map(je=>je.item.extId)}]})})))}_e===1&&Te.shift();const Me=[];return Te.length>1&&Me.push(new I.Action("selectDefaultTestConfigurations",(0,c.localize)(1,null),void 0,void 0,()=>this.commandService.executeCommand("testing.selectDefaultTestProfiles",Ee))),Re&&Me.push(new I.Action("configureTestProfiles",(0,c.localize)(2,null),void 0,void 0,()=>this.commandService.executeCommand("testing.configureProfile",Ee))),I.Separator.join(Te,Me)}saveState(){this.filter.value?.saveState(),super.saveState()}getRunGroupDropdown(Ee,Te){const _e=this.getTestConfigGroupActions(Ee);if(_e.length<2)return super.getActionViewItem(Te);const Re=this.instantiationService.createInstance(d.MenuItemAction,{id:Te.id,title:Te.label,icon:Ee===2?W.testingRunAllIcon:W.testingDebugAllIcon},void 0,void 0,void 0),Le=new I.Action("selectRunConfig","Select Configuration...","codicon-chevron-down",!0);return this.instantiationService.createInstance(l.DropdownWithPrimaryActionViewItem,Re,Le,_e,"",this.contextMenuService,{})}createFilterActionBar(){const Ee=new p.ActionBar(this.treeHeader,{actionViewItemProvider:Te=>this.getActionViewItem(Te),triggerKeys:{keyDown:!1,keys:[]}});return Ee.push(new I.Action("workbench.actions.treeView.testExplorer.filter")),Ee.getContainer().classList.add("testing-filter-action-bar"),Ee}updateDiscoveryProgress(Ee){!Ee&&this.discoveryProgress?this.discoveryProgress.clear():Ee&&!this.discoveryProgress.value&&(this.discoveryProgress.value=this.instantiationService.createInstance(D.UnmanagedProgress,{location:this.getProgressLocation()}))}layoutBody(Ee=this.dimensions.height,Te=this.dimensions.width){super.layoutBody(Ee,Te),this.dimensions.height=Ee,this.dimensions.width=Te,this.container.style.height=`${Ee}px`,this.viewModel.layout(Ee-this.treeHeader.clientHeight,Te),this.filter.value?.layout(Te)}};Z=we([F(1,g.IContextMenuService),F(2,v.IKeybindingService),F(3,a.IConfigurationService),F(4,h.IInstantiationService),F(5,B.IViewDescriptorService),F(6,o.IContextKeyService),F(7,w.IOpenerService),F(8,M.IThemeService),F(9,oe.ITestService),F(10,T.ITelemetryService),F(11,$.ITestingProgressUiService),F(12,ie.ITestProfileService),F(13,n.ICommandService)],Z),e.TestingExplorerView=Z;var ne;(function(ke){ke[ke.None=0]="None",ke[ke.ForWorkspace=1]="ForWorkspace",ke[ke.ForDocument=2]="ForDocument"})(ne||(ne={}));let ce=class extends r.Disposable{get viewMode(){return this._viewMode.get()??"true"}set viewMode(Ee){Ee!==this._viewMode.get()&&(this._viewMode.set(Ee),this.updatePreferredProjection(),this.storageService.store("testing.viewMode",Ee,1,0))}get viewSorting(){return this._viewSorting.get()??"status"}set viewSorting(Ee){Ee!==this._viewSorting.get()&&(this._viewSorting.set(Ee),this.tree.resort(null),this.storageService.store("testing.viewSorting",Ee,1,0))}constructor(Ee,Te,_e,Re,Le,Me,Oe,Ke,We,Xe,Je,rt,je,Ue){super(),this.menuService=Le,this.contextMenuService=Me,this.testService=Oe,this.filterState=Ke,this.instantiationService=We,this.storageService=Xe,this.contextKeyService=Je,this.testResults=rt,this.peekOpener=je,this.testProfileService=Ue,this.projection=this._register(new r.MutableDisposable),this.revealTimeout=new r.MutableDisposable,this._viewMode=K.TestingContextKeys.viewMode.bindTo(this.contextKeyService),this._viewSorting=K.TestingContextKeys.viewSorting.bindTo(this.contextKeyService),this.welcomeVisibilityEmitter=new C.Emitter,this.actionRunner=new Ie(()=>this.tree.getSelection().filter(i.isDefined)),this.lastViewState=new G.StoredValue({key:"testing.treeState",scope:1,target:1},this.storageService),this.hasPendingReveal=!1,this.onChangeWelcomeVisibility=this.welcomeVisibilityEmitter.event,this.welcomeExperience=0,this.hasPendingReveal=!!Ke.reveal.value,this.noTestForDocumentWidget=this._register(We.createInstance(Se,Ee)),this._viewMode.set(this.storageService.get("testing.viewMode",1,"true")),this._viewSorting.set(this.storageService.get("testing.viewSorting",1,"location")),this.reevaluateWelcomeState(),this.filter=this.instantiationService.createInstance(pe,Oe.collection),this.tree=We.createInstance(m.WorkbenchObjectTree,"Test Explorer List",Ee,new ue,[We.createInstance(Pe,this.actionRunner),We.createInstance(De)],{identityProvider:We.createInstance(Ce),hideTwistiesOfChildlessElements:!1,sorter:We.createInstance(me,this),keyboardNavigationLabelProvider:We.createInstance(ge),accessibilityProvider:We.createInstance(be),filter:this.filter,findWidgetEnabled:!1}),this._register(this.tree.onDidChangeCollapseState(ze=>{ze.node.element instanceof x.TestItemTreeElement&&this.projection.value?.expandElement(ze.node.element,ze.deep?1/0:0)})),this._register(Te(ze=>{ze&&this.ensureProjection()})),this._register(this.tree.onContextMenu(ze=>this.onContextMenu(ze))),this._register(C.Event.any(Ke.text.onDidChange,Ke.fuzzy.onDidChange,Oe.excluded.onTestExclusionsChanged)(this.tree.refilter,this.tree)),this._register(this.tree),this._register(this.onChangeWelcomeVisibility(ze=>{this.noTestForDocumentWidget.setVisible(ze===2)})),this._register(t.addStandardDisposableListener(this.tree.getHTMLElement(),"keydown",ze=>{ze.equals(3)?this.handleExecuteKeypress(ze):k.DefaultKeyboardNavigationDelegate.mightProducePrintableCharacter(ze)&&(Ke.text.value=ze.browserEvent.key,Ke.focusInput())})),this._register(Ke.reveal.onDidChange(ze=>this.revealById(ze,void 0,!1))),this._register(Te(ze=>{ze&&Ke.focusInput()})),this._register(this.tree.onDidChangeSelection(ze=>{if(ze.browserEvent instanceof MouseEvent&&(ze.browserEvent.altKey||ze.browserEvent.shiftKey))return;const nt=ze.elements[0];nt&&ze.browserEvent&&nt instanceof x.TestItemTreeElement&&nt.children.size===0&&nt.test.expand===0&&this.tryPeekError(nt)}));let Fe=(0,q.getTestingConfiguration)(_e,"testing.followRunningTest");this._register(_e.onDidChangeConfiguration(()=>{Fe=(0,q.getTestingConfiguration)(_e,"testing.followRunningTest")}));let He=(0,q.getTestingConfiguration)(_e,"testing.alwaysRevealTestOnStateChange");this._register(_e.onDidChangeConfiguration(()=>{He=(0,q.getTestingConfiguration)(_e,"testing.alwaysRevealTestOnStateChange")})),this._register(rt.onTestChanged(ze=>{!Fe||ze.reason===1&&(ze.item.ownComputedState!==2&&!(ze.previousState===1&&(0,ee.isStateWithResult)(ze.item.ownComputedState))||this.revealById(ze.item.item.extId,He,!1))})),this._register(rt.onResultsChanged(()=>{this.tree.resort(null)})),this._register(this.testProfileService.onDidChange(()=>{this.tree.rerender()}));const Be=()=>{Re.activeEditor instanceof P.DiffEditorInput?this.filter.filterToDocumentUri(Re.activeEditor.primary.resource):this.filter.filterToDocumentUri(Re.activeEditor?.resource),this.filterState.isFilteringFor("@doc")&&this.tree.refilter()};this._register(Re.onDidActiveEditorChange(Be)),this._register(this.storageService.onWillSaveState(({reason:ze})=>{ze===y.WillSaveStateReason.SHUTDOWN&&this.lastViewState.store(this.tree.getViewState({getId:nt=>nt instanceof x.TestItemTreeElement?nt.test.item.extId:""}))})),Be()}layout(Ee,Te){this.tree.layout(Ee,Te)}revealById(Ee,Te=!0,_e=!0){if(!Ee){this.hasPendingReveal=!1;return}const Re=this.ensureProjection();let Le=0;const Me=[...j.TestId.fromString(Ee).idsFromRoot()];for(let Oe=Me.length-1;Oe>=Le;Oe--){const Ke=Re.getElementByTestId(Me[Oe].toString());if(!Ke||!this.tree.hasElement(Ke))continue;if(Oe<Me.length-1&&Te){this.tree.expand(Ke),Le=Oe+1,Oe=Me.length-1;continue}let We=Ke;for(let Xe=Ke;Xe instanceof x.TestItemTreeElement;Xe=Xe.parent){if(Xe.test&&this.testService.excluded.contains(Xe.test)){this.filterState.toggleFilteringFor("@hidden",!0);break}!Te&&this.tree.hasElement(Xe)&&this.tree.isCollapsed(Xe)&&(We=Xe)}this.filterState.reveal.value=void 0,this.hasPendingReveal=!1,_e&&this.tree.domFocus(),this.tree.getRelativeTop(We)===null&&this.tree.reveal(We,.5),this.revealTimeout.value=(0,b.disposableTimeout)(()=>{this.tree.setFocus([We]),this.tree.setSelection([We])},1);return}this.hasPendingReveal=!0}async collapseAll(){this.tree.collapseAll()}tryPeekError(Ee){const Te=Ee.test&&this.testResults.getStateById(Ee.test.item.extId);return Te&&Te[1].tasks.some(_e=>(0,ee.isFailedState)(_e.state))?this.peekOpener.tryPeekFirstError(Te[0],Te[1],{preserveFocus:!0}):!1}onContextMenu(Ee){const Te=Ee.element;if(!(Te instanceof x.TestItemTreeElement))return;const _e=ye(this.contextKeyService,this.menuService,this.testService,this.testProfileService,Te);this.contextMenuService.showContextMenu({getAnchor:()=>Ee.anchor,getActions:()=>_e.secondary,getActionsContext:()=>Te,actionRunner:this.actionRunner})}handleExecuteKeypress(Ee){const Te=this.tree.getFocus(),_e=this.tree.getSelection();let Re;Te.length===1&&_e.includes(Te[0])?(Ee.browserEvent?.preventDefault(),Re=_e):Re=Te;const Le=Re.filter(Me=>Me instanceof x.TestItemTreeElement);Le.length&&this.testService.runTests({group:2,tests:Le.map(Me=>Me.test)})}reevaluateWelcomeState(){const Te=this.testService.collection.busyProviders===0&&(0,oe.testCollectionIsEmpty)(this.testService.collection)?this.filterState.isFilteringFor("@doc")?2:1:0;Te!==this.welcomeExperience&&(this.welcomeExperience=Te,this.welcomeVisibilityEmitter.fire(Te))}ensureProjection(){return this.projection.value??this.updatePreferredProjection()}updatePreferredProjection(){this.projection.clear();const Ee=E.AbstractTreeViewState.lift(this.lastViewState.get()??E.AbstractTreeViewState.empty());this._viewMode.get()==="list"?this.projection.value=this.instantiationService.createInstance(z.HierarchicalByNameProjection,Ee):this.projection.value=this.instantiationService.createInstance(V.HierarchicalByLocationProjection,Ee);const Te=new b.RunOnceScheduler(()=>this.applyProjectionChanges(),200);return this.projection.value.onUpdate(()=>{Te.isScheduled()||Te.schedule()}),this.applyProjectionChanges(),this.projection.value}applyProjectionChanges(){this.reevaluateWelcomeState(),this.projection.value?.applyTo(this.tree),this.tree.refilter(),this.hasPendingReveal&&this.revealById(this.filterState.reveal.value)}getSelectedTests(){return this.tree.getSelection()}};ce=we([F(2,a.IConfigurationService),F(3,se.IEditorService),F(4,d.IMenuService),F(5,g.IContextMenuService),F(6,oe.ITestService),F(7,Q.ITestExplorerFilterState),F(8,h.IInstantiationService),F(9,y.IStorageService),F(10,o.IContextKeyService),F(11,re.ITestResultService),F(12,Y.ITestingPeekOpener),F(13,ie.ITestProfileService)],ce),e.TestingExplorerViewModel=ce;var de;(function(ke){ke[ke.Exclude=0]="Exclude",ke[ke.Inherit=1]="Inherit",ke[ke.Include=2]="Include"})(de||(de={}));const he=(ke,Ee,Te,_e)=>{const Re=[_e?[_e]:ke.rootIds];for(;Re.length;)for(const Le of Re.pop()){const Me=ke.getNodeById(Le);if(!!Me&&!(!Me.item.uri||!Ee.extUri.isEqualOrParent(Te,Me.item.uri))){if(Me.item.range||Me.expand===1)return!0;Re.push(Me.children)}}return!1};let pe=class{constructor(Ee,Te,_e,Re){this.collection=Ee,this.state=Te,this.testService=_e,this.uriIdentityService=Re}filter(Ee){if(Ee instanceof x.TestTreeErrorMessage)return 1;if(Ee.test&&!this.state.isFilteringFor("@hidden")&&this.testService.excluded.contains(Ee.test))return 0;switch(Math.min(this.testFilterText(Ee),this.testLocation(Ee),this.testState(Ee),this.testTags(Ee))){case 0:return 0;case 2:return 1;default:return 2}}filterToDocumentUri(Ee){this.documentUri=Ee}testTags(Ee){return!this.state.includeTags.size&&!this.state.excludeTags.size||(this.state.includeTags.size?Ee.test.item.tags.some(Te=>this.state.includeTags.has(Te)):!0)&&Ee.test.item.tags.every(Te=>!this.state.excludeTags.has(Te))?2:1}testState(Ee){return this.state.isFilteringFor("@failed")?(0,ee.isFailedState)(Ee.state)?2:1:this.state.isFilteringFor("@executed")?Ee.state!==0?2:1:2}testLocation(Ee){return!this.documentUri||!this.state.isFilteringFor("@doc")||!(Ee instanceof x.TestItemTreeElement)||he(this.collection,this.uriIdentityService,this.documentUri,Ee.test.item.extId)?2:1}testFilterText(Ee){if(this.state.globList.length===0)return 2;const Te=this.state.fuzzy.value;for(let _e=Ee;_e;_e=_e.parent){let Re=this.state.globList[0].include===!1?2:1;const Le=_e.label.toLowerCase();for(const{include:Me,text:Oe}of this.state.globList)(Te?(0,u.fuzzyContains)(Le,Oe):Le.includes(Oe))&&(Re=Me?2:0);if(Re!==1)return Re}return 1}};pe=we([F(1,Q.ITestExplorerFilterState),F(2,oe.ITestService),F(3,O.IUriIdentityService)],pe);class me{constructor(Ee){this.viewModel=Ee}compare(Ee,Te){if(Ee instanceof x.TestTreeErrorMessage||Te instanceof x.TestTreeErrorMessage)return(Ee instanceof x.TestTreeErrorMessage?-1:0)+(Te instanceof x.TestTreeErrorMessage?1:0);const _e=(Te.duration||0)-(Ee.duration||0);if(this.viewModel.viewSorting==="duration"&&_e!==0)return _e;const Re=(0,ee.cmpPriority)(Ee.state,Te.state);if(this.viewModel.viewSorting==="status"&&Re!==0)return Re;if(Ee instanceof x.TestItemTreeElement&&Te instanceof x.TestItemTreeElement&&Ee.test.item.uri&&Te.test.item.uri&&Ee.test.item.uri.toString()===Te.test.item.uri.toString()&&Ee.test.item.range&&Te.test.item.range){const Le=Ee.test.item.range.startLineNumber-Te.test.item.range.startLineNumber;if(Le!==0)return Le}return(Ee.sortText||Ee.label).localeCompare(Te.sortText||Te.label)}}let Se=class extends r.Disposable{constructor(Ee,Te,_e){super();const Re=this.el=t.append(Ee,t.$(".testing-no-test-placeholder")),Le=t.append(Re,t.$("p"));Le.innerText=(0,c.localize)(3,null);const Me=(0,c.localize)(4,null),Oe=this._register(new R.Button(Re,{title:Me}));Oe.label=Me,this._register((0,L.attachButtonStyler)(Oe,_e)),this._register(Oe.onDidClick(()=>Te.toggleFilteringFor("@doc",!1)))}setVisible(Ee){this.el.classList.toggle("visible",Ee)}};Se=we([F(1,Q.ITestExplorerFilterState),F(2,M.IThemeService)],Se);class Ie extends I.ActionRunner{constructor(Ee){super(),this.getSelectedTests=Ee}async runAction(Ee,Te){if(!(Ee instanceof d.MenuItemAction))return super.runAction(Ee,Te);const _e=this.getSelectedTests(),Me=(_e.some(Oe=>Oe===Te)?_e:[Te]).filter(Oe=>Oe instanceof x.TestItemTreeElement);await Ee.run(...Me)}}const ve=ke=>{let Ee=(0,X.labelForTestInState)(ke.label,ke.state);return ke instanceof x.TestItemTreeElement&&(ke.duration!==void 0&&(Ee=(0,c.localize)(5,null,Ee,fe(ke.duration))),ke.retired&&(Ee=(0,c.localize)(6,null,Ee))),Ee};class be{getWidgetAriaLabel(){return(0,c.localize)(7,null)}getAriaLabel(Ee){return Ee instanceof x.TestTreeErrorMessage?Ee.description:ve(Ee)}}class ge{getKeyboardNavigationLabel(Ee){return Ee instanceof x.TestTreeErrorMessage?Ee.message:Ee.label}}class ue{getHeight(Ee){return 22}getTemplateId(Ee){return Ee instanceof x.TestTreeErrorMessage?De.ID:Pe.ID}}class Ce{getId(Ee){return Ee.treeId}}let De=class $l{constructor(Ee){this.renderer=Ee.createInstance(f.MarkdownRenderer,{})}get templateId(){return $l.ID}renderTemplate(Ee){return{label:t.append(Ee,t.$(".error"))}}renderElement({element:Ee},Te,_e){if(typeof Ee.message=="string")_e.label.innerText=Ee.message;else{const Re=this.renderer.render(Ee.message,{inline:!0});_e.label.appendChild(Re.element)}_e.label.title=Ee.description}disposeTemplate(){}};De.ID="error",De=we([F(0,h.IInstantiationService)],De);let Ae=class extends r.Disposable{constructor(Ee,Te,_e,Re,Le,Me){super(),this.actionRunner=Ee,this.menuService=Te,this.testService=_e,this.profiles=Re,this.contextKeyService=Le,this.instantiationService=Me}renderTemplate(Ee){const Te=t.append(Ee,t.$(".test-item")),_e=t.append(Te,t.$(".computed-state")),Re=t.append(Te,t.$(".label"));t.append(Te,t.$(M.ThemeIcon.asCSSSelector(W.testingHiddenIcon)));const Le=new p.ActionBar(Te,{actionRunner:this.actionRunner,actionViewItemProvider:Me=>Me instanceof d.MenuItemAction?this.instantiationService.createInstance(s.MenuEntryActionViewItem,Me,void 0):void 0});return{wrapper:Te,label:Re,actionBar:Le,icon:_e,elementDisposable:[],templateDisposable:[Le]}}renderElement({element:Ee},Te,_e){this.fillActionBar(Ee,_e)}disposeTemplate(Ee){(0,r.dispose)(Ee.templateDisposable),Ee.templateDisposable=[]}disposeElement(Ee,Te,_e){(0,r.dispose)(_e.elementDisposable),_e.elementDisposable=[]}fillActionBar(Ee,Te){const _e=ye(this.contextKeyService,this.menuService,this.testService,this.profiles,Ee);Te.actionBar.clear(),Te.actionBar.context=Ee,Te.actionBar.push(_e.primary,{icon:!0,label:!1})}};Ae=we([F(1,d.IMenuService),F(2,oe.ITestService),F(3,ie.ITestProfileService),F(4,o.IContextKeyService),F(5,h.IInstantiationService)],Ae);class Pe extends Ae{get templateId(){return Pe.ID}renderElement(Ee,Te,_e){super.renderElement(Ee,Te,_e);const Re=this.testService.excluded.contains(Ee.element.test);_e.wrapper.classList.toggle("test-is-hidden",Re);const Le=W.testingStatesToIcons.get(Ee.element.test.expand===2||Ee.element.test.item.busy?2:Ee.element.state);_e.icon.className="computed-state "+(Le?M.ThemeIcon.asClassName(Le):""),Ee.element.retired&&(_e.icon.className+=" retired"),_e.label.title=ve(Ee.element),t.reset(_e.label,...(0,A.renderLabelWithIcons)(Ee.element.label));let Me=Ee.element.description;Ee.element.duration!==void 0&&(Me=Me?`${Me}: ${fe(Ee.element.duration)}`:fe(Ee.element.duration)),Me&&t.append(_e.label,t.$("span.test-label-description",{},Me))}}Pe.ID="testItem";const fe=ke=>ke<10?`${ke.toFixed(1)}ms`:ke<1e3?`${ke.toFixed(0)}ms`:`${(ke/1e3).toFixed(1)}s`,ye=(ke,Ee,Te,_e,Re)=>{const Le=Re instanceof x.TestItemTreeElement?Re.test:void 0,Me=(0,H.getTestItemContextOverlay)(Le,Le?_e.capabilitiesForTest(Le):0);Me.push(["view","workbench.view.testing"]),Le&&(Me.push([K.TestingContextKeys.canRefreshTests.key,j.TestId.isRoot(Le.item.extId)&&Te.getTestController(Le.item.extId)?.canRefresh.value]),Me.push([K.TestingContextKeys.testItemIsHidden.key,Te.excluded.contains(Le)]));const Oe=ke.createOverlay(Me),Ke=Ee.createMenu(d.MenuId.TestItem,Oe);try{const Je={primary:[],secondary:[]};return(0,s.createAndFillInActionBarActions)(Ke,{shouldForwardArgs:!0},Je,"inline"),Je}finally{Ke.dispose()}};(0,M.registerThemingParticipant)((ke,Ee)=>{if(ke.type==="dark"){const Te=ke.getColor(_.foreground);if(Te){const _e=new S.Color(new S.RGBA(Te.rgba.r,Te.rgba.g,Te.rgba.b,.65));Ee.addRule(`.test-explorer .test-explorer-messages { color: ${_e}; }`)}}})}),define(ae[983],le([1,0,32,2,1950,15,47,19,26,48,172,135,103,70,7,31,28,29,84,36]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameProfileAction=void 0;class n extends A.Action2{constructor(){super({id:n.ID,title:n.TITLE,category:C.PROFILES_CATEGORY,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT})}async run(w){const D=w.get(b.IQuickInputService),y=w.get(I.INotificationService),T=w.get(C.IUserDataProfileManagementService),_=w.get(r.IUserDataProfilesService),L=await D.input({placeHolder:(0,R.localize)(1,null),title:(0,R.localize)(2,null),validateInput:async M=>{if(_.profiles.some(O=>O.name===M))return(0,R.localize)(3,null,M)}});if(L)try{await T.createAndEnterProfile(L,void 0,!0)}catch(M){y.error(M)}}}n.ID="workbench.profiles.actions.createFromCurrentProfile",n.TITLE={value:(0,R.localize)(0,null),original:"Create from Current Profile..."},(0,A.registerAction2)(n);class a extends A.Action2{constructor(){super({id:a.ID,title:a.TITLE,category:C.PROFILES_CATEGORY,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT})}async run(w){const D=w.get(b.IQuickInputService),y=w.get(C.IUserDataProfileManagementService),T=w.get(I.INotificationService),_=w.get(r.IUserDataProfilesService),L=await D.input({placeHolder:(0,R.localize)(5,null),title:(0,R.localize)(6,null),validateInput:async M=>{if(_.profiles.some(O=>O.name===M))return(0,R.localize)(7,null,M)}});if(L)try{await y.createAndEnterProfile(L,void 0,void 0)}catch(M){T.error(M)}}}a.ID="workbench.profiles.actions.createEmptyProfile",a.TITLE={value:(0,R.localize)(4,null),original:"Create an Empty Settings Profile..."},(0,A.registerAction2)(a),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.profiles.actions.createProfile",title:{value:(0,R.localize)(8,null),original:"Create..."},category:C.PROFILES_CATEGORY,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT,menu:[{id:C.ManageProfilesSubMenu,group:"3_manage_profiles",when:C.PROFILES_ENABLEMENT_CONTEXT,order:1}]})}async run(w){const D=w.get(b.IQuickInputService),y=w.get(f.ICommandService),T=await D.pick([{id:a.ID,label:a.TITLE.value},{type:"separator"},{id:n.ID,label:n.TITLE.value},{id:v.ID,label:v.TITLE.value},{type:"separator"},{id:o.ID,label:o.TITLE.value}],{hideInput:!0,canPickMany:!1,title:(0,R.localize)(9,null,C.PROFILES_CATEGORY.value)});if(T?.id)return y.executeCommand(T.id)}});class o extends A.Action2{constructor(){super({id:o.ID,title:o.TITLE,category:C.PROFILES_CATEGORY,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT})}async run(w){return w.get(C.IUserDataProfileManagementService).createAndEnterTransientProfile()}}o.ID="workbench.profiles.actions.createTemporaryProfile",o.TITLE={value:(0,R.localize)(10,null),original:"Create a Temporary Settings Profile"},(0,A.registerAction2)(o);class g extends A.Action2{constructor(){super({id:g.ID,title:{value:(0,R.localize)(11,null),original:"Rename..."},category:C.PROFILES_CATEGORY,f1:!0,precondition:i.ContextKeyExpr.and(C.PROFILES_ENABLEMENT_CONTEXT,C.HAS_PROFILES_CONTEXT),menu:[{id:C.ManageProfilesSubMenu,group:"3_manage_profiles",when:C.PROFILES_ENABLEMENT_CONTEXT,order:1}]})}async run(w,D){const y=w.get(b.IQuickInputService),T=w.get(C.IUserDataProfileService),_=w.get(r.IUserDataProfilesService),L=w.get(C.IUserDataProfileManagementService),M=w.get(I.INotificationService);if(D||(D=await this.pickProfile(y,T,_)),!D||D.isDefault)return;const O=await y.input({value:D.name,title:(0,R.localize)(12,null),validateInput:async N=>{if(D.name!==N&&_.profiles.some(P=>P.name===N))return(0,R.localize)(13,null,N)}});if(O&&O!==D.name)try{await L.updateProfile(D,{name:O})}catch(N){M.error(N)}}async pickProfile(w,D,y){const T=y.profiles.filter(L=>!L.isDefault&&!L.isTransient);return T.length?(await w.pick(T.map(L=>({label:L.name,description:L.id===D.currentProfile.id?(0,R.localize)(14,null):void 0,profile:L})),{placeHolder:(0,R.localize)(15,null)}))?.profile:void 0}}e.RenameProfileAction=g,g.ID="workbench.profiles.actions.renameProfile",(0,A.registerAction2)(g),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.profiles.actions.deleteProfile",title:{value:(0,R.localize)(16,null),original:"Delete..."},category:C.PROFILES_CATEGORY,f1:!0,precondition:i.ContextKeyExpr.and(C.PROFILES_ENABLEMENT_CONTEXT,C.HAS_PROFILES_CONTEXT),menu:[{id:C.ManageProfilesSubMenu,group:"3_manage_profiles",when:C.PROFILES_ENABLEMENT_CONTEXT,order:2}]})}async run(w){const D=w.get(b.IQuickInputService),y=w.get(C.IUserDataProfileService),T=w.get(r.IUserDataProfilesService),_=w.get(C.IUserDataProfileManagementService),L=w.get(I.INotificationService),M=T.profiles.filter(O=>!O.isDefault&&!O.isTransient);if(M.length){const O=await D.pick(M.map(N=>({label:N.name,description:N.id===y.currentProfile.id?(0,R.localize)(17,null):void 0,profile:N})),{placeHolder:(0,R.localize)(18,null),canPickMany:!0});if(O)try{await Promise.all(O.map(N=>_.removeProfile(N.profile)))}catch(N){L.error(N)}}}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:C.MANAGE_PROFILES_ACTION_ID,title:{value:(0,R.localize)(19,null),original:"Manage..."},category:C.PROFILES_CATEGORY,precondition:i.ContextKeyExpr.and(C.PROFILES_ENABLEMENT_CONTEXT,C.HAS_PROFILES_CONTEXT)})}async run(w){const D=w.get(b.IQuickInputService),y=w.get(A.IMenuService),T=w.get(i.IContextKeyService),_=w.get(f.ICommandService),L=y.createMenu(C.ManageProfilesSubMenu,T),M=[];if((0,s.createAndFillInActionBarActions)(L,void 0,M),L.dispose(),M.length){const O=M.map(P=>P instanceof d.Separator?{type:"separator"}:{id:P.id,label:`${P.label}${P.checked?` $(${l.Codicon.check.id})`:""}`}),N=await D.pick(O,{canPickMany:!1,title:C.PROFILES_CATEGORY.value});N?.id&&await _.executeCommand(N.id)}}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.profiles.actions.switchProfile",title:{value:(0,R.localize)(20,null),original:"Switch..."},category:C.PROFILES_CATEGORY,f1:!0,precondition:i.ContextKeyExpr.and(C.PROFILES_ENABLEMENT_CONTEXT,C.HAS_PROFILES_CONTEXT)})}async run(w){const D=w.get(b.IQuickInputService),y=w.get(C.IUserDataProfileService),T=w.get(r.IUserDataProfilesService),_=w.get(C.IUserDataProfileManagementService),L=T.profiles.slice(0).sort((M,O)=>(0,c.compare)(M.name,O.name));if(L.length){const M=L.map(N=>({label:`${N.name}${N.id===y.currentProfile.id?` $(${l.Codicon.check.id})`:""}`,profile:N})),O=await D.pick(M,{placeHolder:(0,R.localize)(21,null)});O&&await _.switchProfile(O.profile)}}});class h extends A.Action2{constructor(){super({id:h.ID,title:h.TITLE,category:C.PROFILES_CATEGORY,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT?.negate()})}async run(w){const D=w.get(k.IFileDialogService),y=w.get(b.IQuickInputService),T=w.get(E.IFileService),_=w.get(S.IRequestService),L=w.get(C.IUserDataProfileImportExportService),M=w.get(k.IDialogService),O=w.get(i.IContextKeyService),N=w.get(I.INotificationService),P=O.contextMatchesRules(C.PROFILES_ENABLEMENT_CONTEXT);if(!P&&!(await M.confirm({title:(0,R.localize)(23,null),message:(0,R.localize)(24,null)})).confirmed)return;const B=new p.DisposableStore,V=B.add(y.createQuickPick()),z=x=>{const H={label:P?(0,R.localize)(25,null):(0,R.localize)(26,null)};V.items=x?[{label:P?(0,R.localize)(27,null):(0,R.localize)(28,null),description:V.value},H]:[H]};V.title=P?(0,R.localize)(29,null):(0,R.localize)(30,null),V.placeholder=P?(0,R.localize)(31,null):(0,R.localize)(32,null),V.ignoreFocusOut=!0,B.add(V.onDidChangeValue(z)),z(),V.matchOnLabel=!1,V.matchOnDescription=!1,B.add(V.onDidAccept(async()=>{try{V.hide();const x=V.selectedItems[0].description?await this.getProfileFromURL(V.value,_):await this.getProfileFromFileSystem(D,T);x&&(P?await L.importProfile(x):await L.setProfile(x))}catch(x){N.error(x)}})),B.add(V.onDidHide(()=>B.dispose())),V.show()}async getProfileFromFileSystem(w,D){const y=await w.showOpenDialog({canSelectFolders:!1,canSelectFiles:!0,canSelectMany:!1,filters:C.PROFILE_FILTER,title:(0,R.localize)(33,null)});if(!y)return null;const T=(await D.readFile(y[0])).value.toString(),_=JSON.parse(T);return(0,C.isUserDataProfileTemplate)(_)?_:null}async getProfileFromURL(w,D){const y={type:"GET",url:w},T=await D.request(y,t.CancellationToken.None);if(T.res.statusCode===200){const _=await(0,S.asJson)(T);return(0,C.isUserDataProfileTemplate)(_)?_:null}else{const _=await(0,S.asText)(T);throw new Error(`Expected 200, got back ${T.res.statusCode} instead. ${_}`)}}}h.ID="workbench.profiles.actions.importProfile",h.TITLE={value:(0,R.localize)(22,null),original:"Import..."},(0,A.registerAction2)(h);class v extends A.Action2{constructor(){super({id:v.ID,title:v.TITLE,category:C.PROFILES_CATEGORY,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT})}async run(w){return w.get(f.ICommandService).executeCommand(h.ID)}}v.ID="workbench.profiles.actions.createFromTemplate",v.TITLE={value:(0,R.localize)(34,null),original:"Create from a Settings Profile Template..."},(0,A.registerAction2)(v),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.profiles.actions.cleanupProfiles",title:{value:(0,R.localize)(35,null),original:"Cleanup Profiles"},category:u.Categories.Developer,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT})}async run(w){return w.get(r.IUserDataProfilesService).cleanUp()}}),(0,A.registerAction2)(class extends A.Action2{constructor(){super({id:"workbench.profiles.actions.resetWorkspaces",title:{value:(0,R.localize)(36,null),original:"Reset Workspace Settings Profiles Associations"},category:u.Categories.Developer,f1:!0,precondition:C.PROFILES_ENABLEMENT_CONTEXT})}async run(w){return w.get(r.IUserDataProfilesService).resetWorkspaces()}})}),define(ae[2864],le([1,0,2,14,6,1949,15,31,55,7,46,17,103,214,983,69,135,48,26,28,12,78,47,18,29]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfilesWorkbenchContribution=void 0;let v=class extends t.Disposable{constructor(w,D,y,T,_,L){super(),this.userDataProfileService=w,this.userDataProfilesService=D,this.userDataProfileManagementService=y,this.productService=T,this.profilesDisposable=this._register(new t.MutableDisposable),this.currentprofileActionsDisposable=this._register(new t.MutableDisposable),this.registerConfiguration(),this.currentProfileContext=c.CURRENT_PROFILE_CONTEXT.bindTo(_),c.PROFILES_ENABLEMENT_CONTEXT.bindTo(_).set(this.userDataProfilesService.isEnabled()),this.isCurrentProfileTransientContext=c.IS_CURRENT_PROFILE_TRANSIENT_CONTEXT.bindTo(_),this.currentProfileContext.set(this.userDataProfileService.currentProfile.id),this.isCurrentProfileTransientContext.set(!!this.userDataProfileService.currentProfile.isTransient),this._register(this.userDataProfileService.onDidChangeCurrentProfile(M=>{this.currentProfileContext.set(this.userDataProfileService.currentProfile.id),this.isCurrentProfileTransientContext.set(!!this.userDataProfileService.currentProfile.isTransient)})),this.hasProfilesContext=c.HAS_PROFILES_CONTEXT.bindTo(_),this.hasProfilesContext.set(this.userDataProfilesService.profiles.length>1),this._register(this.userDataProfilesService.onDidChangeProfiles(M=>this.hasProfilesContext.set(this.userDataProfilesService.profiles.length>1))),this.registerActions(),p.isWeb&&L.when(4).then(()=>D.cleanUp())}registerConfiguration(){this.productService.quality==="stable"&&C.Registry.as(I.Extensions.Configuration).registerConfiguration({...u.workbenchConfigurationNodeBase,properties:{[r.PROFILES_ENABLEMENT_CONFIG]:{type:"boolean",default:!1,description:(0,A.localize)(0,null),scope:1,ignoreSync:!0}}})}registerActions(){this.registerManageProfilesSubMenu(),this.registerProfilesActions(),this._register(this.userDataProfilesService.onDidChangeProfiles(()=>this.registerProfilesActions())),this.registerCurrentProfilesActions(),this._register(R.Event.any(this.userDataProfileService.onDidChangeCurrentProfile,this.userDataProfileService.onDidUpdateCurrentProfile)(()=>this.registerCurrentProfilesActions()))}registerManageProfilesSubMenu(){const w=this;k.MenuRegistry.appendMenuItem(k.MenuId.GlobalActivity,{get title(){return(0,A.localize)(1,null,c.PROFILES_TTILE.value,w.userDataProfileService.currentProfile.name)},submenu:c.ManageProfilesSubMenu,group:"5_settings",when:c.PROFILES_ENABLEMENT_CONTEXT,order:1}),k.MenuRegistry.appendMenuItem(k.MenuId.MenubarPreferencesMenu,{title:c.PROFILES_TTILE,submenu:c.ManageProfilesSubMenu,group:"5_settings",when:c.PROFILES_ENABLEMENT_CONTEXT,order:1}),k.MenuRegistry.appendMenuItem(k.MenuId.AccountsContext,{get title(){return(0,A.localize)(2,null,c.PROFILES_TTILE.value,w.userDataProfileService.currentProfile.name)},submenu:c.ManageProfilesSubMenu,group:"1_settings",when:c.PROFILES_ENABLEMENT_CONTEXT})}registerProfilesActions(){this.profilesDisposable.value=new t.DisposableStore;for(const w of this.userDataProfilesService.profiles)this.profilesDisposable.value.add(this.registerProfileEntryAction(w))}registerProfileEntryAction(w){const D=this;return(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:`workbench.profiles.actions.profileEntry.${w.id}`,title:w.name,toggled:b.ContextKeyExpr.equals(c.CURRENT_PROFILE_CONTEXT.key,w.id),menu:[{id:c.ManageProfilesSubMenu,group:"0_profiles",when:c.PROFILES_ENABLEMENT_CONTEXT}]})}async run(T){if(D.userDataProfileService.currentProfile.id!==w.id)return D.userDataProfileManagementService.switchProfile(w)}})}registerCurrentProfilesActions(){this.currentprofileActionsDisposable.value=new t.DisposableStore,this.currentprofileActionsDisposable.value.add(this.registerUpdateCurrentProfileShortNameAction()),this.currentprofileActionsDisposable.value.add(this.registerRenameCurrentProfileAction()),this.currentprofileActionsDisposable.value.add(this.registerExportCurrentProfileAction())}registerUpdateCurrentProfileShortNameAction(){const w=this;return(0,k.registerAction2)(class extends k.Action2{constructor(){const y=w.userDataProfileService.getShortName(w.userDataProfileService.currentProfile),T=n.ThemeIcon.fromString(y);super({id:"workbench.profiles.actions.updateCurrentProfileShortName",title:{value:(0,A.localize)(3,null,T?.id??y),original:`Change Short Name (${T?.id??y})...`},menu:[{id:c.ManageProfilesSubMenu,group:"2_manage_current",when:b.ContextKeyExpr.and(b.ContextKeyExpr.notEquals(c.CURRENT_PROFILE_CONTEXT.key,w.userDataProfilesService.defaultProfile.id),c.IS_CURRENT_PROFILE_TRANSIENT_CONTEXT.toNegated()),order:1}]})}async run(y){const T=y.get(l.IQuickInputService),_=y.get(s.INotificationService),L=w.userDataProfileService.currentProfile,M=await T.input({value:w.userDataProfileService.getShortName(L),title:(0,A.localize)(4,null),validateInput:async O=>{if(L.shortName===O)return;const N=n.ThemeIcon.fromString(O);if(N)return h.Codicon.getAll().some(P=>P.id===N.id)?void 0:(0,A.localize)(5,null);if((0,d.charCount)(O)>2)return(0,A.localize)(6,null)}});if(M&&M!==L.shortName)try{await w.userDataProfileManagementService.updateProfile(L,{shortName:M})}catch(O){_.error(O)}}})}registerRenameCurrentProfileAction(){const w=this;return(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"workbench.profiles.actions.renameCurrentProfile",title:{value:(0,A.localize)(7,null,w.userDataProfileService.currentProfile.name),original:`Rename (${w.userDataProfileService.currentProfile.name})...`},menu:[{id:c.ManageProfilesSubMenu,group:"2_manage_current",when:b.ContextKeyExpr.and(b.ContextKeyExpr.notEquals(c.CURRENT_PROFILE_CONTEXT.key,w.userDataProfilesService.defaultProfile.id),c.IS_CURRENT_PROFILE_TRANSIENT_CONTEXT.toNegated()),order:2}]})}async run(y){y.get(E.ICommandService).executeCommand(i.RenameProfileAction.ID,w.userDataProfileService.currentProfile)}})}registerExportCurrentProfileAction(){const w=this,D=new t.DisposableStore,y="workbench.profiles.actions.exportProfile";return D.add((0,k.registerAction2)(class extends k.Action2{constructor(){super({id:y,title:{value:(0,A.localize)(8,null,w.userDataProfileService.currentProfile.name),original:`Export (${w.userDataProfileService.currentProfile.name})...`},category:c.PROFILES_CATEGORY,menu:[{id:c.ManageProfilesSubMenu,group:"4_import_export_profiles",when:c.PROFILES_ENABLEMENT_CONTEXT,order:1},{id:k.MenuId.CommandPalette}]})}async run(_){const L=_.get(a.ITextFileService),M=_.get(o.IFileDialogService),O=_.get(c.IUserDataProfileImportExportService),N=_.get(s.INotificationService),P=await M.showSaveDialog({title:(0,A.localize)(9,null),filters:c.PROFILE_FILTER,defaultUri:(0,g.joinPath)(await M.defaultFilePath(),`profile.${c.PROFILE_EXTENSION}`)});if(!P)return;const B=await O.exportProfile({skipComments:!0});await L.create([{resource:P,value:JSON.stringify(B),options:{overwrite:!0}}]),N.info((0,A.localize)(10,null,c.PROFILES_CATEGORY.value))}})),D.add(k.MenuRegistry.appendMenuItem(k.MenuId.MenubarShare,{command:{id:y,title:{value:(0,A.localize)(11,null,w.userDataProfileService.currentProfile.name),original:`Export Settings Profile (${w.userDataProfileService.currentProfile.name})...`}}})),D}};v=we([F(0,c.IUserDataProfileService),F(1,r.IUserDataProfilesService),F(2,c.IUserDataProfileManagementService),F(3,S.IProductService),F(4,b.IContextKeyService),F(5,f.ILifecycleService)],v),e.UserDataProfilesWorkbenchContribution=v}),define(ae[2865],le([1,0,17,44,2864,983]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(R.UserDataProfilesWorkbenchContribution,2)}),define(ae[2866],le([1,0,1994,123,322,11,17,34,78,8,176,19,62,55,24,26,106,13,57,20,138,85,135,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationEditing=e.EditableConfigurationTarget=e.ConfigurationEditingError=e.ConfigurationEditingErrorCode=void 0;var h;(function(D){D[D.ERROR_UNKNOWN_KEY=0]="ERROR_UNKNOWN_KEY",D[D.ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION=1]="ERROR_INVALID_WORKSPACE_CONFIGURATION_APPLICATION",D[D.ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE=2]="ERROR_INVALID_WORKSPACE_CONFIGURATION_MACHINE",D[D.ERROR_INVALID_FOLDER_CONFIGURATION=3]="ERROR_INVALID_FOLDER_CONFIGURATION",D[D.ERROR_INVALID_USER_TARGET=4]="ERROR_INVALID_USER_TARGET",D[D.ERROR_INVALID_WORKSPACE_TARGET=5]="ERROR_INVALID_WORKSPACE_TARGET",D[D.ERROR_INVALID_FOLDER_TARGET=6]="ERROR_INVALID_FOLDER_TARGET",D[D.ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION=7]="ERROR_INVALID_RESOURCE_LANGUAGE_CONFIGURATION",D[D.ERROR_NO_WORKSPACE_OPENED=8]="ERROR_NO_WORKSPACE_OPENED",D[D.ERROR_CONFIGURATION_FILE_DIRTY=9]="ERROR_CONFIGURATION_FILE_DIRTY",D[D.ERROR_CONFIGURATION_FILE_MODIFIED_SINCE=10]="ERROR_CONFIGURATION_FILE_MODIFIED_SINCE",D[D.ERROR_INVALID_CONFIGURATION=11]="ERROR_INVALID_CONFIGURATION",D[D.ERROR_POLICY_CONFIGURATION=12]="ERROR_POLICY_CONFIGURATION",D[D.ERROR_INTERNAL=13]="ERROR_INTERNAL"})(h=e.ConfigurationEditingErrorCode||(e.ConfigurationEditingErrorCode={}));class v extends Error{constructor(y,T){super(y),this.code=T}}e.ConfigurationEditingError=v;var m;(function(D){D[D.USER_LOCAL=1]="USER_LOCAL",D[D.USER_REMOTE=2]="USER_REMOTE",D[D.WORKSPACE=3]="WORKSPACE",D[D.WORKSPACE_FOLDER=4]="WORKSPACE_FOLDER"})(m=e.EditableConfigurationTarget||(e.EditableConfigurationTarget={}));let w=class{constructor(y,T,_,L,M,O,N,P,B,V,z,x){this.remoteSettingsResource=y,this.configurationService=T,this.contextService=_,this.userDataProfileService=L,this.userDataProfilesService=M,this.fileService=O,this.textModelResolverService=N,this.textFileService=P,this.notificationService=B,this.preferencesService=V,this.editorService=z,this.uriIdentityService=x,this.queue=new A.Queue}async writeConfiguration(y,T,_={}){const L=this.getConfigurationEditOperation(y,T,_.scopes||{});return this.queue.queue(async()=>{try{await this.doWriteConfiguration(L,_)}catch(M){if(_.donotNotifyError)throw M;await this.onError(M,L,_.scopes)}})}async doWriteConfiguration(y,T){await this.validate(y.target,y,!T.handleDirtyFile,T.scopes||{});const _=y.resource,L=await this.resolveModelReference(_);try{const M=this.getFormattingOptions(L.object.textEditorModel);await this.updateConfiguration(y,L.object.textEditorModel,M,T)}finally{L.dispose()}}async updateConfiguration(y,T,_,L){if(this.hasParseErrors(T.getValue(),y))throw this.toConfigurationEditingError(11,y.target,y);if(this.textFileService.isDirty(T.uri)&&L.handleDirtyFile)switch(L.handleDirtyFile){case"save":await this.save(T,y);break;case"revert":await this.textFileService.revert(T.uri);break}const M=this.getEdits(y,T.getValue(),_)[0];M&&this.applyEditsToBuffer(M,T)&&await this.save(T,y)}async save(y,T){try{await this.textFileService.save(y.uri,{ignoreErrorHandler:!0})}catch(_){throw _.fileOperationResult===3?this.toConfigurationEditingError(10,T.target,T):this.toConfigurationEditingError(13,T.target,T)}}applyEditsToBuffer(y,T){const _=T.getPositionAt(y.offset),L=T.getPositionAt(y.offset+y.length),M=new d.Range(_.lineNumber,_.column,L.lineNumber,L.column),O=T.getValueInRange(M);if(y.content!==O){const N=O?n.EditOperation.replace(M,y.content):n.EditOperation.insert(_,y.content);return T.pushEditOperations([new a.Selection(_.lineNumber,_.column,_.lineNumber,_.column)],[N],()=>[]),!0}return!1}getEdits({value:y,jsonPath:T},_,L){return T.length?(0,R.setProperty)(_,T,y,L):[{content:JSON.stringify(y,null,L.insertSpaces&&L.tabSize?" ".repeat(L.tabSize):" "),length:_.length,offset:0}]}getFormattingOptions(y){const{insertSpaces:T,tabSize:_}=y.getOptions(),L=y.getEOL();return{insertSpaces:T,tabSize:_,eol:L}}async onError(y,T,_){switch(y.code){case 11:this.onInvalidConfigurationError(y,T);break;case 9:this.onConfigurationFileDirtyError(y,T,_);break;case 10:return this.doWriteConfiguration(T,{scopes:_,handleDirtyFile:"revert"});default:this.notificationService.error(y.message)}}onInvalidConfigurationError(y,T){const _=T.workspaceStandAloneConfigurationKey===S.TASKS_CONFIGURATION_KEY?t.localize(0,null):T.workspaceStandAloneConfigurationKey===S.LAUNCH_CONFIGURATION_KEY?t.localize(1,null):null;_?this.notificationService.prompt(f.Severity.Error,y.message,[{label:_,run:()=>this.openFile(T.resource)}]):this.notificationService.prompt(f.Severity.Error,y.message,[{label:t.localize(2,null),run:()=>this.openSettings(T)}])}onConfigurationFileDirtyError(y,T,_){const L=T.workspaceStandAloneConfigurationKey===S.TASKS_CONFIGURATION_KEY?t.localize(3,null):T.workspaceStandAloneConfigurationKey===S.LAUNCH_CONFIGURATION_KEY?t.localize(4,null):null;L?this.notificationService.prompt(f.Severity.Error,y.message,[{label:t.localize(5,null),run:()=>{const M=T.key?`${T.workspaceStandAloneConfigurationKey}.${T.key}`:T.workspaceStandAloneConfigurationKey;this.writeConfiguration(T.target,{key:M,value:T.value},{handleDirtyFile:"save",scopes:_})}},{label:L,run:()=>this.openFile(T.resource)}]):this.notificationService.prompt(f.Severity.Error,y.message,[{label:t.localize(6,null),run:()=>this.writeConfiguration(T.target,{key:T.key,value:T.value},{handleDirtyFile:"save",scopes:_})},{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 _=this.contextService.getWorkspaceFolder(y.resource);_&&this.preferencesService.openFolderSettings({folderUri:_.uri,jsonEditor:!0})}break}}openFile(y){this.editorService.openEditor({resource:y,options:{pinned:!0}})}toConfigurationEditingError(y,T,_){const L=this.toErrorMessage(y,T,_);return new v(L,y)}toErrorMessage(y,T,_){switch(y){case 12:return t.localize(8,null,_.key);case 0:return t.localize(9,null,this.stringifyTarget(T),_.key);case 1:return t.localize(10,null,_.key);case 2:return t.localize(11,null,_.key);case 3:return t.localize(12,null,_.key);case 4:return t.localize(13,null,_.key);case 5:return t.localize(14,null,_.key);case 6:return t.localize(15,null);case 7:return t.localize(16,null,_.key);case 8:return t.localize(17,null,this.stringifyTarget(T));case 11:{if(_.workspaceStandAloneConfigurationKey===S.TASKS_CONFIGURATION_KEY)return t.localize(18,null);if(_.workspaceStandAloneConfigurationKey===S.LAUNCH_CONFIGURATION_KEY)return t.localize(19,null);switch(T){case 1:return t.localize(20,null);case 2:return t.localize(21,null);case 3:return t.localize(22,null);case 4:{let L="<<unknown>>";if(_.resource){const M=this.contextService.getWorkspaceFolder(_.resource);M&&(L=M.name)}return t.localize(23,null,L)}default:return""}}case 9:{if(_.workspaceStandAloneConfigurationKey===S.TASKS_CONFIGURATION_KEY)return t.localize(24,null);if(_.workspaceStandAloneConfigurationKey===S.LAUNCH_CONFIGURATION_KEY)return t.localize(25,null);switch(T){case 1:return t.localize(26,null);case 2:return t.localize(27,null);case 3:return t.localize(28,null);case 4:{let L="<<unknown>>";if(_.resource){const M=this.contextService.getWorkspaceFolder(_.resource);M&&(L=M.name)}return t.localize(29,null,L)}default:return""}}case 10:if(_.workspaceStandAloneConfigurationKey===S.TASKS_CONFIGURATION_KEY)return t.localize(30,null);if(_.workspaceStandAloneConfigurationKey===S.LAUNCH_CONFIGURATION_KEY)return t.localize(31,null);switch(T){case 1:return t.localize(32,null);case 2:return t.localize(33,null);case 3:return t.localize(34,null);case 4:return t.localize(35,null)}case 13:return t.localize(36,null,this.stringifyTarget(T))}}stringifyTarget(y){switch(y){case 1:return t.localize(37,null);case 2:return t.localize(38,null);case 3:return t.localize(39,null);case 4:return t.localize(40,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 S.TASKS_CONFIGURATION_KEY:return S.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 _=[];return p.parse(y,_,{allowTrailingComma:!0,allowEmptyContent:!0}),_.length>0}async validate(y,T,_,L){if(this.configurationService.inspect(T.key).policyValue!==void 0)throw this.toConfigurationEditingError(12,y,T);const O=k.Registry.as(u.Extensions.Configuration).getConfigurationProperties()[T.key]?.scope;if(!T.workspaceStandAloneConfigurationKey&&this.configurationService.keys().default.indexOf(T.key)<0&&!u.OVERRIDE_PROPERTY_REGEX.test(T.key)&&T.value!==void 0)throw this.toConfigurationEditingError(0,y,T);if(T.workspaceStandAloneConfigurationKey&&T.workspaceStandAloneConfigurationKey!==S.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&&!u.OVERRIDE_PROPERTY_REGEX.test(T.key)){if(O===1)throw this.toConfigurationEditingError(1,y,T);if(O===2)throw this.toConfigurationEditingError(2,y,T)}if(y===4){if(!T.resource)throw this.toConfigurationEditingError(6,y,T);if(!T.workspaceStandAloneConfigurationKey&&!u.OVERRIDE_PROPERTY_REGEX.test(T.key)&&O!==void 0&&!S.FOLDER_SCOPES.includes(O))throw this.toConfigurationEditingError(3,y,T)}if(L.overrideIdentifiers?.length&&O!==5)throw this.toConfigurationEditingError(7,y,T);if(!T.resource)throw this.toConfigurationEditingError(6,y,T);if(_&&this.textFileService.isDirty(T.resource))throw this.toConfigurationEditingError(9,y,T)}getConfigurationEditOperation(y,T,_){if(T.key){const B=y===1?S.USER_STANDALONE_CONFIGURATIONS:S.WORKSPACE_STANDALONE_CONFIGURATIONS,V=Object.keys(B);for(const z of V){const x=this.getConfigurationFileResource(y,z,B[z],_.resource,void 0);if(T.key===z){const W=this.isWorkspaceConfigurationResource(x)?[z]:[];return{key:W[W.length-1],jsonPath:W,value:T.value,resource:(0,l.withNullAsUndefined)(x),workspaceStandAloneConfigurationKey:z,target:y}}const H=`${z}.`;if(T.key.indexOf(H)===0){const W=this.isWorkspaceConfigurationResource(x)?[z,T.key.substr(H.length)]:[T.key.substr(H.length)];return{key:W[W.length-1],jsonPath:W,value:T.value,resource:(0,l.withNullAsUndefined)(x),workspaceStandAloneConfigurationKey:z,target:y}}}}const L=T.key,O=k.Registry.as(u.Extensions.Configuration).getConfigurationProperties()[L]?.scope;let N=_.overrideIdentifiers?.length?[(0,u.keyFromOverrideIdentifiers)(_.overrideIdentifiers),L]:[L];if(y===1||y===2)return{key:L,jsonPath:N,value:T.value,resource:(0,l.withNullAsUndefined)(this.getConfigurationFileResource(y,void 0,"",null,O)),target:y};const P=this.getConfigurationFileResource(y,void 0,S.FOLDER_SETTINGS_PATH,_.resource,O);return this.isWorkspaceConfigurationResource(P)&&(N=["settings",...N]),{key:L,jsonPath:N,value:T.value,resource:(0,l.withNullAsUndefined)(P),target:y}}isWorkspaceConfigurationResource(y){const T=this.contextService.getWorkspace();return!!(T.configuration&&y&&T.configuration.fsPath===y.fsPath)}getConfigurationFileResource(y,T,_,L,M){if(y===1)return T===S.TASKS_CONFIGURATION_KEY?this.userDataProfileService.currentProfile.tasksResource:M===1&&!this.userDataProfileService.currentProfile.isDefault?this.userDataProfilesService.defaultProfile.settingsResource:this.userDataProfileService.currentProfile.settingsResource;if(y===2)return this.remoteSettingsResource;const O=this.contextService.getWorkbenchState();if(O!==1){const N=this.contextService.getWorkspace();if(y===3){if(O===3)return(0,l.withUndefinedAsNull)(N.configuration);if(O===2)return N.folders[0].toResource(_)}if(y===4&&L){const P=this.contextService.getWorkspaceFolder(L);if(P)return P.toResource(_)}}return null}};w=we([F(1,b.IConfigurationService),F(2,E.IWorkspaceContextService),F(3,o.IUserDataProfileService),F(4,g.IUserDataProfilesService),F(5,C.IFileService),F(6,r.ITextModelService),F(7,I.ITextFileService),F(8,f.INotificationService),F(9,c.IPreferencesService),F(10,i.IEditorService),F(11,s.IUriIdentityService)],w),e.ConfigurationEditing=w}),define(ae[2867],le([1,0,9,6,60,52,2,11,155,34,429,8,804,907,176,17,55,200,2866,2442,241,51,44,117,118,16,39,317,13,1993,501,437,56,272]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceService=void 0;function O(H,W){return H.isDefault?W?i.LOCAL_MACHINE_SCOPES:void 0:W?i.LOCAL_MACHINE_PROFILE_SCOPES:i.PROFILE_SCOPES}class N extends b.Workspace{constructor(){super(...arguments),this.initialized=!1}}class P extends k.Disposable{get restrictedSettings(){return this._restrictedSettings}constructor({remoteAuthority:W,configurationCache:U},$,q,X,G,Q,j,K,Y){if(super(),this.userDataProfileService=q,this.userDataProfilesService=X,this.fileService=G,this.remoteAgentService=Q,this.uriIdentityService=j,this.logService=K,this.initialized=!1,this.applicationConfiguration=null,this.remoteUserConfiguration=null,this._onDidChangeConfiguration=this._register(new p.Emitter),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onWillChangeWorkspaceFolders=this._register(new p.Emitter),this.onWillChangeWorkspaceFolders=this._onWillChangeWorkspaceFolders.event,this._onDidChangeWorkspaceFolders=this._register(new p.Emitter),this.onDidChangeWorkspaceFolders=this._onDidChangeWorkspaceFolders.event,this._onDidChangeWorkspaceName=this._register(new p.Emitter),this.onDidChangeWorkspaceName=this._onDidChangeWorkspaceName.event,this._onDidChangeWorkbenchState=this._register(new p.Emitter),this.onDidChangeWorkbenchState=this._onDidChangeWorkbenchState.event,this.isWorkspaceTrusted=!0,this._restrictedSettings={default:[]},this._onDidChangeRestrictedSettings=this._register(new p.Emitter),this.onDidChangeRestrictedSettings=this._onDidChangeRestrictedSettings.event,this.configurationRegistry=f.Registry.as(c.Extensions.Configuration),this.initRemoteUserConfigurationBarrier=new E.Barrier,this.completeWorkspaceBarrier=new E.Barrier,this.defaultConfiguration=this._register(new d.DefaultConfiguration(U,$)),this.policyConfiguration=Y instanceof T.NullPolicyService?new r.NullPolicyConfiguration:this._register(new r.PolicyConfiguration(this.defaultConfiguration,Y,K)),this.configurationCache=U,this._configuration=new u.Configuration(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,new S.ConfigurationModel,new S.ConfigurationModel,new S.ConfigurationModel,new S.ConfigurationModel,new R.ResourceMap,new S.ConfigurationModel,new R.ResourceMap,this.workspace),this.applicationConfigurationDisposables=this._register(new k.DisposableStore),this.createApplicationConfiguration(),this.localUserConfiguration=this._register(new d.UserConfiguration(q.currentProfile.settingsResource,q.currentProfile.tasksResource,O(q.currentProfile,!!W),G,j,K)),this.cachedFolderConfigs=new R.ResourceMap,this._register(this.localUserConfiguration.onDidChangeConfiguration(ee=>this.onLocalUserConfigurationChanged(ee))),W){const ee=this.remoteUserConfiguration=this._register(new d.RemoteUserConfiguration(W,U,G,j,Q));this._register(ee.onDidInitialize(ie=>{this._register(ee.onDidChangeConfiguration(re=>this.onRemoteUserConfigurationChanged(re))),this.onRemoteUserConfigurationChanged(ie),this.initRemoteUserConfigurationBarrier.open()}))}else this.initRemoteUserConfigurationBarrier.open();this.workspaceConfiguration=this._register(new d.WorkspaceConfiguration(U,G,j,K)),this._register(this.workspaceConfiguration.onDidUpdateConfiguration(ee=>{this.onWorkspaceConfigurationChanged(ee).then(()=>{this.workspace.initialized=this.workspaceConfiguration.initialized,this.checkAndMarkWorkspaceComplete(ee)})})),this._register(this.defaultConfiguration.onDidChangeConfiguration(({properties:ee,defaults:ie})=>this.onDefaultConfigurationChanged(ie,ee))),this._register(this.policyConfiguration.onDidChangeConfiguration(ee=>this.onPolicyConfigurationChanged(ee))),this._register(q.onDidChangeCurrentProfile(ee=>this.onUserDataProfileChanged(ee))),this.workspaceEditingQueue=new E.Queue}createApplicationConfiguration(){this.applicationConfigurationDisposables.clear(),this.userDataProfileService.currentProfile.isDefault?this.applicationConfiguration=null:(this.applicationConfiguration=this.applicationConfigurationDisposables.add(this._register(new d.UserConfiguration(this.userDataProfilesService.defaultProfile.settingsResource,void 0,[1],this.fileService,this.uriIdentityService,this.logService))),this.applicationConfigurationDisposables.add(this.applicationConfiguration.onDidChangeConfiguration(W=>this.onApplicationConfigurationChanged(W))))}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(W){return this.workspace.getFolder(W)}addFolders(W,U){return this.updateFolders(W,[],U)}removeFolders(W){return this.updateFolders([],W)}async updateFolders(W,U,$){return this.workspaceEditingQueue.queue(()=>this.doUpdateFolders(W,U,$))}isInsideWorkspace(W){return!!this.getWorkspaceFolder(W)}isCurrentWorkspace(W){switch(this.getWorkbenchState()){case 2:{let U;return t.URI.isUri(W)?U=W:(0,b.isSingleFolderWorkspaceIdentifier)(W)&&(U=W.uri),t.URI.isUri(U)&&this.uriIdentityService.extUri.isEqual(U,this.workspace.folders[0].uri)}case 3:return(0,b.isWorkspaceIdentifier)(W)&&this.workspace.id===W.id}return!1}async doUpdateFolders(W,U,$){if(this.getWorkbenchState()!==3||W.length+U.length===0)return Promise.resolve(void 0);let q=!1,X=this.getWorkspace().folders,G=X.map(Q=>Q.raw).filter((Q,j)=>(0,l.isStoredWorkspaceFolder)(Q)?!this.contains(U,X[j].uri):!0);if(q=X.length!==G.length,W.length){const Q=this.getWorkspace().configuration,j=this.uriIdentityService.extUri.dirname(Q);X=(0,l.toWorkspaceFolders)(G,Q,this.uriIdentityService.extUri);const K=X.map(ee=>ee.uri),Y=[];for(const ee of W){const ie=ee.uri;if(!this.contains(K,ie)){try{if(!(await this.fileService.stat(ie)).isDirectory)continue}catch{}Y.push((0,l.getStoredWorkspaceFolder)(ie,!1,ee.name,j,this.uriIdentityService.extUri))}}Y.length>0&&(q=!0,typeof $=="number"&&$>=0&&$<G.length?(G=G.slice(0),G.splice($,0,...Y)):G=[...G,...Y])}return q?this.setFolders(G):Promise.resolve(void 0)}async setFolders(W){if(!this.instantiationService)throw new Error("Cannot update workspace folders because workspace service is not yet ready to accept writes.");return await this.instantiationService.invokeFunction(U=>this.workspaceConfiguration.setFolders(W,U.get(M.IJSONEditingService))),this.onWorkspaceConfigurationChanged(!1)}contains(W,U){return W.some($=>this.uriIdentityService.extUri.isEqual($,U))}getConfigurationData(){return this._configuration.toData()}getValue(W,U){const $=typeof W=="string"?W:void 0,q=(0,C.isConfigurationOverrides)(W)?W:(0,C.isConfigurationOverrides)(U)?U:void 0;return this._configuration.getValue($,q)}async updateValue(W,U,$,q,X){const G=(0,C.isConfigurationUpdateOverrides)($)?$:(0,C.isConfigurationOverrides)($)?{resource:$.resource,overrideIdentifiers:$.overrideIdentifier?[$.overrideIdentifier]:void 0}:void 0,Q=G?q:$,j=Q?[Q]:[];if(G?.overrideIdentifiers&&(G.overrideIdentifiers=(0,v.distinct)(G.overrideIdentifiers),G.overrideIdentifiers=G.overrideIdentifiers.length?G.overrideIdentifiers:void 0),!j.length){if(G?.overrideIdentifiers&&G.overrideIdentifiers.length>1)throw new Error("Configuration Target is required while updating the value for multiple override identifiers");const K=this.inspect(W,{resource:G?.resource,overrideIdentifier:G?.overrideIdentifiers?G.overrideIdentifiers[0]:void 0});j.push(...this.deriveConfigurationTargets(W,U,K)),(0,A.equals)(U,K.defaultValue)&&j.length===1&&(j[0]===2||j[0]===3)&&(U=void 0)}await E.Promises.settled(j.map(K=>this.writeConfigurationValue(W,U,K,G,X)))}async reloadConfiguration(W){if(W===void 0){this.reloadDefaultConfiguration();const U=await this.reloadApplicationConfiguration(!0),{local:$,remote:q}=await this.reloadUserConfiguration();await this.reloadWorkspaceConfiguration(),await this.loadConfiguration(U,$,q);return}if((0,b.isWorkspaceFolder)(W)){await this.reloadWorkspaceFolderConfiguration(W);return}switch(W){case 7:this.reloadDefaultConfiguration();return;case 2:{const{local:U,remote:$}=await this.reloadUserConfiguration();await this.loadConfiguration(this._configuration.applicationConfiguration,U,$);return}case 3:await this.reloadLocalUserConfiguration();return;case 4:await this.reloadRemoteUserConfiguration();return;case 5:case 6:await this.reloadWorkspaceConfiguration();return}}inspect(W,U){return this._configuration.inspect(W,U)}keys(){return this._configuration.keys()}async whenRemoteConfigurationLoaded(){await this.initRemoteUserConfigurationBarrier.wait()}async initialize(W){(0,n.mark)("code/willInitWorkspaceService");const U=await this.createWorkspace(W);await this.updateWorkspaceAndInitializeConfiguration(U),this.checkAndMarkWorkspaceComplete(!1),(0,n.mark)("code/didInitWorkspaceService")}updateWorkspaceTrust(W){if(this.isWorkspaceTrusted!==W){this.isWorkspaceTrusted=W;const U=this._configuration.toData(),$=[];for(const X of this.workspace.folders){const G=this.cachedFolderConfigs.get(X.uri);let Q;G&&(Q=G.updateWorkspaceTrust(this.isWorkspaceTrusted),this._configuration.updateFolderConfiguration(X.uri,Q)),$.push(Q)}this.getWorkbenchState()===2?$[0]&&this._configuration.updateWorkspaceConfiguration($[0]):this._configuration.updateWorkspaceConfiguration(this.workspaceConfiguration.updateWorkspaceTrust(this.isWorkspaceTrusted)),this.updateRestrictedSettings();let q=[];this.restrictedSettings.userLocal&&q.push(...this.restrictedSettings.userLocal),this.restrictedSettings.userRemote&&q.push(...this.restrictedSettings.userRemote),this.restrictedSettings.workspace&&q.push(...this.restrictedSettings.workspace),this.restrictedSettings.workspaceFolder?.forEach(X=>q.push(...X)),q=(0,v.distinct)(q),q.length&&this.triggerConfigurationChange({keys:q,overrides:[]},{data:U,workspace:this.workspace},5)}}acquireInstantiationService(W){this.instantiationService=W}async createWorkspace(W){return(0,b.isWorkspaceIdentifier)(W)?this.createMultiFolderWorkspace(W):(0,b.isSingleFolderWorkspaceIdentifier)(W)?this.createSingleFolderWorkspace(W):this.createEmptyWorkspace(W)}async createMultiFolderWorkspace(W){await this.workspaceConfiguration.initialize({id:W.id,configPath:W.configPath},this.isWorkspaceTrusted);const U=W.configPath,$=(0,l.toWorkspaceFolders)(this.workspaceConfiguration.getFolders(),U,this.uriIdentityService.extUri),q=W.id,X=new N(q,$,this.workspaceConfiguration.isTransient(),U,G=>this.uriIdentityService.extUri.ignorePathCasing(G));return X.initialized=this.workspaceConfiguration.initialized,X}createSingleFolderWorkspace(W){const U=new N(W.id,[(0,b.toWorkspaceFolder)(W.uri)],!1,null,$=>this.uriIdentityService.extUri.ignorePathCasing($));return U.initialized=!0,U}createEmptyWorkspace(W){const U=new N(W.id,[],!1,null,$=>this.uriIdentityService.extUri.ignorePathCasing($));return U.initialized=!0,Promise.resolve(U)}checkAndMarkWorkspaceComplete(W){!this.completeWorkspaceBarrier.isOpen()&&this.workspace.initialized&&(this.completeWorkspaceBarrier.open(),this.validateWorkspaceFoldersAndReload(W))}async updateWorkspaceAndInitializeConfiguration(W){const U=!!this.workspace;let $,q,X=[];if(U?($=this.getWorkbenchState(),q=this.workspace.configuration?this.workspace.configuration.fsPath:void 0,X=this.workspace.folders,this.workspace.update(W)):this.workspace=W,await this.initializeConfiguration(),U){const G=this.getWorkbenchState();$&&G!==$&&this._onDidChangeWorkbenchState.fire(G);const Q=this.workspace.configuration?this.workspace.configuration.fsPath:void 0;(q&&Q!==q||G!==$)&&this._onDidChangeWorkspaceName.fire();const j=this.compareFolders(X,this.workspace.folders);j&&(j.added.length||j.removed.length||j.changed.length)&&(await this.handleWillChangeWorkspaceFolders(j,!1),this._onDidChangeWorkspaceFolders.fire(j))}this.localUserConfiguration.hasTasksLoaded||this._register((0,E.runWhenIdle)(()=>this.reloadLocalUserConfiguration()))}compareFolders(W,U){const $={added:[],removed:[],changed:[]};$.added=U.filter(q=>!W.some(X=>q.uri.toString()===X.uri.toString()));for(let q=0;q<W.length;q++){const X=W[q];let G=0;for(G=0;G<U.length&&X.uri.toString()!==U[G].uri.toString();G++);G<U.length?(q!==G||X.name!==U[G].name)&&$.changed.push(X):$.removed.push(X)}return $}async initializeConfiguration(){await this.defaultConfiguration.initialize();const[,W,U]=await Promise.all([this.policyConfiguration.initialize(),this.initializeApplicationConfiguration(),(async()=>{(0,n.mark)("code/willInitUserConfiguration");const $=await this.initializeUserConfiguration();return(0,n.mark)("code/didInitUserConfiguration"),$})()]);(0,n.mark)("code/willInitWorkspaceConfiguration"),await this.loadConfiguration(W,U.local,U.remote),(0,n.mark)("code/didInitWorkspaceConfiguration")}async initializeApplicationConfiguration(){return this.applicationConfiguration?this.applicationConfiguration.initialize():Promise.resolve(new S.ConfigurationModel)}async initializeUserConfiguration(){const[W,U]=await Promise.all([this.localUserConfiguration.initialize(),this.remoteUserConfiguration?this.remoteUserConfiguration.initialize():Promise.resolve(new S.ConfigurationModel)]);return{local:W,remote:U}}reloadDefaultConfiguration(){this.onDefaultConfigurationChanged(this.defaultConfiguration.reload())}async reloadApplicationConfiguration(W){if(!this.applicationConfiguration)return new S.ConfigurationModel;const U=await this.applicationConfiguration.reload();return W||this.onApplicationConfigurationChanged(U),U}async reloadUserConfiguration(){const[W,U]=await Promise.all([this.reloadLocalUserConfiguration(!0),this.reloadRemoteUserConfiguration(!0)]);return{local:W,remote:U}}async reloadLocalUserConfiguration(W){const U=await this.localUserConfiguration.reload();return W||this.onLocalUserConfigurationChanged(U),U}async reloadRemoteUserConfiguration(W){if(this.remoteUserConfiguration){const U=await this.remoteUserConfiguration.reload();return W||this.onRemoteUserConfigurationChanged(U),U}return new S.ConfigurationModel}async reloadWorkspaceConfiguration(){const W=this.getWorkbenchState();if(W===2)return this.onWorkspaceFolderConfigurationChanged(this.workspace.folders[0]);if(W===3)return this.workspaceConfiguration.reload().then(()=>this.onWorkspaceConfigurationChanged(!1))}reloadWorkspaceFolderConfiguration(W){return this.onWorkspaceFolderConfigurationChanged(W)}async loadConfiguration(W,U,$){this.cachedFolderConfigs=new R.ResourceMap;const q=this.workspace.folders,X=await this.loadFolderConfigurations(q),G=this.getWorkspaceConfigurationModel(X),Q=new R.ResourceMap;X.forEach((K,Y)=>Q.set(q[Y].uri,K));const j=this._configuration;if(this._configuration=new u.Configuration(this.defaultConfiguration.configurationModel,this.policyConfiguration.configurationModel,W,U,$,G,Q,new S.ConfigurationModel,new R.ResourceMap,this.workspace),this.initialized){const K=this._configuration.compare(j);this.triggerConfigurationChange(K,{data:j.toData(),workspace:this.workspace},5)}else this.initialized=!0;this.updateRestrictedSettings()}getWorkspaceConfigurationModel(W){switch(this.getWorkbenchState()){case 2:return W[0];case 3:return this.workspaceConfiguration.getConfiguration();default:return new S.ConfigurationModel}}onUserDataProfileChanged(W){W.join((async()=>{W.preserveData&&await Promise.all([this.copyProfileSettings(W.previous.settingsResource,W.profile.settingsResource),this.copyProfileTasks(W.previous.tasksResource,W.profile.tasksResource)]);const U=[];U.push(this.localUserConfiguration.reset(W.profile.settingsResource,W.profile.tasksResource,O(W.profile,!!this.remoteUserConfiguration))),W.previous.isDefault!==W.profile.isDefault&&(this.createApplicationConfiguration(),this.applicationConfiguration&&U.push(this.reloadApplicationConfiguration(!0)));const[$,q]=await Promise.all(U);await this.loadConfiguration(q??this._configuration.applicationConfiguration,$,this._configuration.remoteUserConfiguration)})())}async copyProfileSettings(W,U){let $;try{$=(await this.fileService.readFile(W)).value.toString()}catch(Q){if(Q.fileOperationResult!==1)throw Q}if(!$)return;const q=f.Registry.as(c.Extensions.Configuration).getConfigurationProperties(),X=Object.keys(q).filter(Q=>q[Q]?.scope===1),G=(0,_.updateIgnoredSettings)($,"{}",X,{});await this.fileService.writeFile(U,L.VSBuffer.fromString(G))}async copyProfileTasks(W,U){await this.fileService.exists(W)&&await this.fileService.copy(W,U)}onDefaultConfigurationChanged(W,U){if(this.workspace){const $=this._configuration.toData(),q=this._configuration.compareAndUpdateDefaultConfiguration(W,U);if(this.remoteUserConfiguration&&(this._configuration.updateLocalUserConfiguration(this.localUserConfiguration.reparse()),this._configuration.updateRemoteUserConfiguration(this.remoteUserConfiguration.reparse())),this.getWorkbenchState()===2){const X=this.cachedFolderConfigs.get(this.workspace.folders[0].uri);X&&(this._configuration.updateWorkspaceConfiguration(X.reparse()),this._configuration.updateFolderConfiguration(this.workspace.folders[0].uri,X.reparse()))}else{this._configuration.updateWorkspaceConfiguration(this.workspaceConfiguration.reparseWorkspaceSettings());for(const X of this.workspace.folders){const G=this.cachedFolderConfigs.get(X.uri);G&&this._configuration.updateFolderConfiguration(X.uri,G.reparse())}}this.triggerConfigurationChange(q,{data:$,workspace:this.workspace},7),this.updateRestrictedSettings()}}onPolicyConfigurationChanged(W){const U={data:this._configuration.toData(),workspace:this.workspace},$=this._configuration.compareAndUpdatePolicyConfiguration(W);this.triggerConfigurationChange($,U,7)}onApplicationConfigurationChanged(W){const U={data:this._configuration.toData(),workspace:this.workspace},$=this._configuration.compareAndUpdateApplicationConfiguration(W);this.triggerConfigurationChange($,U,2)}onLocalUserConfigurationChanged(W){const U={data:this._configuration.toData(),workspace:this.workspace},$=this._configuration.compareAndUpdateLocalUserConfiguration(W);this.triggerConfigurationChange($,U,2)}onRemoteUserConfigurationChanged(W){const U={data:this._configuration.toData(),workspace:this.workspace},$=this._configuration.compareAndUpdateRemoteUserConfiguration(W);this.triggerConfigurationChange($,U,2)}async onWorkspaceConfigurationChanged(W){if(this.workspace&&this.workspace.configuration){let U=(0,l.toWorkspaceFolders)(this.workspaceConfiguration.getFolders(),this.workspace.configuration,this.uriIdentityService.extUri);if(this.workspace.initialized){const{added:$,removed:q,changed:X}=this.compareFolders(this.workspace.folders,U);$.length||q.length||X.length?U=await this.toValidWorkspaceFolders(U):U=this.workspace.folders}await this.updateWorkspaceConfiguration(U,this.workspaceConfiguration.getConfiguration(),W)}}updateRestrictedSettings(){const W=[],U=this.configurationRegistry.getConfigurationProperties(),$=Object.keys(U).filter(oe=>U[oe].restricted).sort((oe,se)=>oe.localeCompare(se)),q=(0,v.delta)($,this._restrictedSettings.default,(oe,se)=>oe.localeCompare(se));W.push(...q.added,...q.removed);const X=(this.applicationConfiguration?.getRestrictedSettings()||[]).sort((oe,se)=>oe.localeCompare(se)),G=(0,v.delta)(X,this._restrictedSettings.application||[],(oe,se)=>oe.localeCompare(se));W.push(...G.added,...G.removed);const Q=this.localUserConfiguration.getRestrictedSettings().sort((oe,se)=>oe.localeCompare(se)),j=(0,v.delta)(Q,this._restrictedSettings.userLocal||[],(oe,se)=>oe.localeCompare(se));W.push(...j.added,...j.removed);const K=(this.remoteUserConfiguration?.getRestrictedSettings()||[]).sort((oe,se)=>oe.localeCompare(se)),Y=(0,v.delta)(K,this._restrictedSettings.userRemote||[],(oe,se)=>oe.localeCompare(se));W.push(...Y.added,...Y.removed);const ee=new R.ResourceMap;for(const oe of this.workspace.folders){const te=(this.cachedFolderConfigs.get(oe.uri)?.getRestrictedSettings()||[]).sort((ce,de)=>ce.localeCompare(de));te.length&&ee.set(oe.uri,te);const Z=this._restrictedSettings.workspaceFolder?.get(oe.uri)||[],ne=(0,v.delta)(te,Z,(ce,de)=>ce.localeCompare(de));W.push(...ne.added,...ne.removed)}const ie=this.getWorkbenchState()===3?this.workspaceConfiguration.getRestrictedSettings().sort((oe,se)=>oe.localeCompare(se)):this.workspace.folders[0]?ee.get(this.workspace.folders[0].uri)||[]:[],re=(0,v.delta)(ie,this._restrictedSettings.workspace||[],(oe,se)=>oe.localeCompare(se));W.push(...re.added,...re.removed),W.length&&(this._restrictedSettings={default:$,application:X.length?X:void 0,userLocal:Q.length?Q:void 0,userRemote:K.length?K:void 0,workspace:ie.length?ie:void 0,workspaceFolder:ee.size?ee:void 0},this._onDidChangeRestrictedSettings.fire(this.restrictedSettings))}async updateWorkspaceConfiguration(W,U,$){const q={data:this._configuration.toData(),workspace:this.workspace},X=this._configuration.compareAndUpdateWorkspaceConfiguration(U),G=this.compareFolders(this.workspace.folders,W);if(G.added.length||G.removed.length||G.changed.length){this.workspace.folders=W;const Q=await this.onFoldersChanged();await this.handleWillChangeWorkspaceFolders(G,$),this.triggerConfigurationChange(Q,q,6),this._onDidChangeWorkspaceFolders.fire(G)}else this.triggerConfigurationChange(X,q,5);this.updateRestrictedSettings()}async handleWillChangeWorkspaceFolders(W,U){const $=[];this._onWillChangeWorkspaceFolders.fire({join(q){$.push(q)},changes:W,fromCache:U});try{await E.Promises.settled($)}catch{}}async onWorkspaceFolderConfigurationChanged(W){const[U]=await this.loadFolderConfigurations([W]),$={data:this._configuration.toData(),workspace:this.workspace},q=this._configuration.compareAndUpdateFolderConfiguration(W.uri,U);if(this.getWorkbenchState()===2){const X=this._configuration.compareAndUpdateWorkspaceConfiguration(U);this.triggerConfigurationChange((0,S.mergeChanges)(q,X),$,5)}else this.triggerConfigurationChange(q,$,6);this.updateRestrictedSettings()}async onFoldersChanged(){const W=[];for(const $ of this.cachedFolderConfigs.keys())this.workspace.folders.filter(q=>q.uri.toString()===$.toString())[0]||(this.cachedFolderConfigs.get($).dispose(),this.cachedFolderConfigs.delete($),W.push(this._configuration.compareAndDeleteFolderConfiguration($)));const U=this.workspace.folders.filter($=>!this.cachedFolderConfigs.has($.uri));return U.length&&(await this.loadFolderConfigurations(U)).forEach((q,X)=>{W.push(this._configuration.compareAndUpdateFolderConfiguration(U[X].uri,q))}),(0,S.mergeChanges)(...W)}loadFolderConfigurations(W){return Promise.all([...W.map(U=>{let $=this.cachedFolderConfigs.get(U.uri);return $||($=new d.FolderConfiguration(!this.initialized,U,i.FOLDER_CONFIG_FOLDER_NAME,this.getWorkbenchState(),this.isWorkspaceTrusted,this.fileService,this.uriIdentityService,this.logService,this.configurationCache),this._register($.onDidChange(()=>this.onWorkspaceFolderConfigurationChanged(U))),this.cachedFolderConfigs.set(U.uri,this._register($))),$.loadConfiguration()})])}async validateWorkspaceFoldersAndReload(W){const U=await this.toValidWorkspaceFolders(this.workspace.folders),{removed:$}=this.compareFolders(this.workspace.folders,U);$.length&&await this.updateWorkspaceConfiguration(U,this.workspaceConfiguration.getConfiguration(),W)}async toValidWorkspaceFolders(W){const U=[];for(const $ of W){try{if(!(await this.fileService.stat($.uri)).isDirectory)continue}catch(q){this.logService.warn(`Ignoring the error while validating workspace folder ${$.uri.toString()} - ${(0,g.toErrorMessage)(q)}`)}U.push($)}return U}async writeConfigurationValue(W,U,$,q,X){if(!this.instantiationService)throw new Error("Cannot write configuration because the configuration service is not yet ready to accept writes.");if($===7)throw new Error("Invalid configuration target");if($===8){const Q={data:this._configuration.toData(),workspace:this.workspace};this._configuration.updateValue(W,U,q),this.triggerConfigurationChange({keys:q?.overrideIdentifiers?.length?[(0,c.keyFromOverrideIdentifiers)(q.overrideIdentifiers),W]:[W],overrides:q?.overrideIdentifiers?.length?q.overrideIdentifiers.map(j=>[j,[W]]):[]},Q,$);return}const G=this.toEditableConfigurationTarget($,W);if(!G)throw new Error("Invalid configuration target");if(G===2&&!this.remoteUserConfiguration)throw new Error("Invalid configuration target");switch(this.configurationEditing=this.configurationEditing??this.instantiationService.createInstance(s.ConfigurationEditing,(await this.remoteAgentService.getEnvironment())?.settingsPath??null),await this.configurationEditing.writeConfiguration(G,{key:W,value:U},{scopes:q,donotNotifyError:X}),G){case 1:this.applicationConfiguration&&this.configurationRegistry.getConfigurationProperties()[W].scope===1?await this.reloadApplicationConfiguration():await this.reloadLocalUserConfiguration();return;case 2:return this.reloadRemoteUserConfiguration().then(()=>{});case 3:return this.reloadWorkspaceConfiguration();case 4:{const Q=q&&q.resource?this.workspace.getFolder(q.resource):null;if(Q)return this.reloadWorkspaceFolderConfiguration(Q)}}}deriveConfigurationTargets(W,U,$){if((0,A.equals)(U,$.value))return[];const q=[];return $.workspaceFolderValue!==void 0&&q.push(6),$.workspaceValue!==void 0&&q.push(5),$.userRemoteValue!==void 0&&q.push(4),$.userLocalValue!==void 0&&q.push(3),U===void 0?q:[q[0]||2]}triggerConfigurationChange(W,U,$){if(W.keys.length){$!==7&&this.logService.debug(`Configuration keys changed in ${(0,C.ConfigurationTargetToString)($)} target`,...W.keys);const q=new S.ConfigurationChangeEvent(W,U,this._configuration,this.workspace);q.source=$,q.sourceConfig=this.getTargetConfiguration($),this._onDidChangeConfiguration.fire(q)}}getTargetConfiguration(W){switch(W){case 7:return this._configuration.defaults.contents;case 2:return this._configuration.userConfiguration.contents;case 5:return this._configuration.workspaceConfiguration.contents}return{}}toEditableConfigurationTarget(W,U){if(W===2){if(this.remoteUserConfiguration){const $=this.configurationRegistry.getConfigurationProperties()[U]?.scope;if($===2||$===6||this.inspect(U).userRemoteValue!==void 0)return 2}return 1}return W===3?1:W===4?2:W===5?3:W===6?4:null}}e.WorkspaceService=P;let B=class extends k.Disposable{constructor(W,U,$){super(),this.workspaceContextService=W,this.environmentService=U,this.workspaceTrustManagementService=$,this.registerConfigurationSchemas();const q=f.Registry.as(c.Extensions.Configuration);this._register(q.onDidUpdateConfiguration(X=>this.registerConfigurationSchemas())),this._register(q.onDidSchemaChange(X=>this.registerConfigurationSchemas())),this._register($.onDidChangeTrust(()=>this.registerConfigurationSchemas()))}registerConfigurationSchemas(){const W=f.Registry.as(I.Extensions.JSONContribution),U={properties:c.allSettings.properties,patternProperties:c.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},$=this.environmentService.remoteAuthority?{properties:{...c.applicationSettings.properties,...c.windowSettings.properties,...c.resourceSettings.properties},patternProperties:c.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0}:U,q={properties:{...c.machineSettings.properties,...c.machineOverridableSettings.properties,...c.windowSettings.properties,...c.resourceSettings.properties},patternProperties:c.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},X={properties:{...c.machineSettings.properties,...c.machineOverridableSettings.properties,...c.windowSettings.properties,...c.resourceSettings.properties},patternProperties:c.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},G={properties:{...this.checkAndFilterPropertiesRequiringTrust(c.machineOverridableSettings.properties),...this.checkAndFilterPropertiesRequiringTrust(c.windowSettings.properties),...this.checkAndFilterPropertiesRequiringTrust(c.resourceSettings.properties)},patternProperties:c.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0};if(W.registerSchema(i.defaultSettingsSchemaId,{properties:Object.keys(c.allSettings.properties).reduce((Q,j)=>(Q[j]={...c.allSettings.properties[j],deprecationMessage:void 0},Q),{}),patternProperties:Object.keys(c.allSettings.patternProperties).reduce((Q,j)=>(Q[j]={...c.allSettings.patternProperties[j],deprecationMessage:void 0},Q),{}),additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0}),W.registerSchema(i.userSettingsSchemaId,$),W.registerSchema(i.profileSettingsSchemaId,q),W.registerSchema(i.machineSettingsSchemaId,X),this.workspaceContextService.getWorkbenchState()===3){const Q={properties:{...this.checkAndFilterPropertiesRequiringTrust(c.machineOverridableSettings.properties),...this.checkAndFilterPropertiesRequiringTrust(c.resourceSettings.properties)},patternProperties:c.allSettings.patternProperties,additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0};W.registerSchema(i.workspaceSettingsSchemaId,G),W.registerSchema(i.folderSettingsSchemaId,Q)}else W.registerSchema(i.workspaceSettingsSchemaId,G),W.registerSchema(i.folderSettingsSchemaId,G);W.registerSchema(c.configurationDefaultsSchemaId,{type:"object",description:(0,y.localize)(0,null),properties:{...c.machineOverridableSettings.properties,...c.windowSettings.properties,...c.resourceSettings.properties},patternProperties:{[c.OVERRIDE_PROPERTY_PATTERN]:{type:"object",default:{},$ref:c.resourceLanguageSettingsSchemaId}},additionalProperties:!1})}checkAndFilterPropertiesRequiringTrust(W){if(this.workspaceTrustManagementService.isWorkspaceTrusted())return W;const U={};return Object.entries(W).forEach(([$,q])=>{q.restricted||(U[$]=q)}),U}};B=we([F(0,b.IWorkspaceContextService),F(1,a.IWorkbenchEnvironmentService),F(2,h.IWorkspaceTrustManagementService)],B);let V=class extends k.Disposable{constructor(W,U){super(),U.whenInstalledExtensionsRegistered().then(()=>W.reloadConfiguration(7))}};V=we([F(0,C.IConfigurationService),F(1,m.IExtensionService)],V);let z=class extends k.Disposable{constructor(W){super(),this.workbenchAssignmentService=W,this.processedExperimentalSettings=new Set,this.configurationRegistry=f.Registry.as(c.Extensions.Configuration),this.processExperimentalSettings(Object.keys(this.configurationRegistry.getConfigurationProperties())),this._register(this.configurationRegistry.onDidUpdateConfiguration(({properties:U})=>this.processExperimentalSettings(U)))}async processExperimentalSettings(W){const U={},$=this.configurationRegistry.getConfigurationProperties();for(const q of W){const X=$[q];if(!!X?.tags?.includes("experimental")&&!this.processedExperimentalSettings.has(q)){this.processedExperimentalSettings.add(q);try{const G=await this.workbenchAssignmentService.getTreatment(`config.${q}`);!(0,D.isUndefined)(G)&&!(0,A.equals)(G,X.default)&&(U[q]=G)}catch{}}}Object.keys(U).length&&this.configurationRegistry.registerDefaultConfigurations([{overrides:U,source:(0,y.localize)(1,null)}])}};z=we([F(0,w.IWorkbenchAssignmentService)],z);const x=f.Registry.as(o.Extensions.Workbench);x.registerWorkbenchContribution(B,3),x.registerWorkbenchContribution(V,4),x.registerWorkbenchContribution(z,3)}),define(ae[2868],le([1,0,792,115,6,57,16,28,2,135,103,18,504,22,25,373,19,72,81]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeExtensionManagementService=void 0;let d=class extends t.ExtensionManagementChannelClient{get onProfileAwareInstallExtension(){return super.onInstallExtension}get onInstallExtension(){return R.Event.filter(this.onProfileAwareInstallExtension,a=>this.filterEvent(a),this.disposables)}get onProfileAwareDidInstallExtensions(){return super.onDidInstallExtensions}get onDidInstallExtensions(){return R.Event.filter(R.Event.map(this.onProfileAwareDidInstallExtensions,a=>a.filter(o=>this.filterEvent(o)),this.disposables),a=>a.length>0,this.disposables)}get onProfileAwareUninstallExtension(){return super.onUninstallExtension}get onUninstallExtension(){return R.Event.filter(this.onProfileAwareUninstallExtension,a=>this.filterEvent(a),this.disposables)}get onProfileAwareDidUninstallExtension(){return super.onDidUninstallExtension}get onDidUninstallExtension(){return R.Event.filter(this.onProfileAwareDidUninstallExtension,a=>this.filterEvent(a),this.disposables)}constructor(a,o,g,h,v,m,w,D){super(a),this.userDataProfileService=o,this.extensionsProfileScannerService=g,this.uriIdentityService=h,this.fileService=v,this.downloadService=m,this.nativeEnvironmentService=w,this.logService=D,this.disposables=this._register(new I.DisposableStore),this._onDidChangeProfile=this._register(new R.Emitter),this.onDidChangeProfile=this._onDidChangeProfile.event,this._register(o.onDidChangeCurrentProfile(y=>y.join(this.whenProfileChanged(y))))}filterEvent({profileLocation:a,applicationScoped:o}){return o||this.uriIdentityService.extUri.isEqual(this.userDataProfileService.currentProfile.extensionsResource,a)}async install(a,o){const{location:g,cleanup:h}=await this.downloadVsix(a);try{return await super.install(g,{...o,profileLocation:this.userDataProfileService.currentProfile.extensionsResource})}finally{await h()}}installFromGallery(a,o){return super.installFromGallery(a,{...o,profileLocation:this.userDataProfileService.currentProfile.extensionsResource})}uninstall(a,o){return super.uninstall(a,{...o,profileLocation:this.userDataProfileService.currentProfile.extensionsResource})}getInstalled(a=null){return super.getInstalled(a,this.userDataProfileService.currentProfile.extensionsResource)}async downloadVsix(a){if(a.scheme===u.Schemas.file)return{location:a,async cleanup(){}};this.logService.trace("Downloading extension from",a.toString());const o=(0,C.joinPath)(this.nativeEnvironmentService.extensionsDownloadLocation,(0,l.generateUuid)());return await this.downloadService.download(a,o),this.logService.info("Downloaded extension to",o.toString()),{location:o,cleanup:async()=>{try{await this.fileService.del(o)}catch(h){this.logService.error(h)}}}}async whenProfileChanged(a){const o=a.previous.extensionsResource??(0,C.joinPath)(a.previous.location,S.EXTENSIONS_RESOURCE_NAME),g=await super.getInstalled(1,o);if(a.preserveData){const h=await Promise.all(g.filter(v=>!v.isApplicationScoped).map(async v=>[v,await this.getMetadata(v)]));await this.extensionsProfileScannerService.addExtensionsToProfile(h,a.profile.extensionsResource)}else{const h=await this.getInstalled(1),{added:v,removed:m}=(0,k.delta)(g,h,(w,D)=>(0,E.compare)(`${p.ExtensionIdentifier.toKey(w.identifier.id)}@${w.manifest.version}`,`${p.ExtensionIdentifier.toKey(D.identifier.id)}@${D.manifest.version}`));(v.length||m.length)&&this._onDidChangeProfile.fire({added:v,removed:m})}}};d=we([F(1,b.IUserDataProfileService),F(2,r.IExtensionsProfileScannerService),F(3,A.IUriIdentityService),F(4,c.IFileService),F(5,f.IDownloadService),F(6,s.INativeEnvironmentService),F(7,i.ILogService)],d),e.NativeExtensionManagementService=d}),define(ae[2869],le([1,0,53,14,9,2519,834,25,68,2018,26,74,11,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedExtensionScanner=void 0;let i=class{constructor(c,l,s,d,n){this._notificationService=c,this._hostService=l,this._extensionsScannerService=s,this._userDataProfileService=d,this._logService=n,this.scannedExtensions=new Promise((a,o)=>{this._scannedExtensionsResolve=a,this._scannedExtensionsReject=o})}async scanSingleExtension(c,l){const s=await this._extensionsScannerService.scanExistingExtension(R.URI.file(t.resolve(c)),l?0:1,{language:p.language});return s?(0,k.toExtensionDescription)(s,!1):null}async startScanningExtensions(){try{const c=await this._scanInstalledExtensions();this._scannedExtensionsResolve(c)}catch(c){this._scannedExtensionsReject(c)}}async _scanInstalledExtensions(){try{const c=p.language,[l,s]=await Promise.all([this._extensionsScannerService.scanSystemExtensions({language:c,useCache:!0,checkControlFile:!0}),this._extensionsScannerService.scanUserExtensions({language:c,profileLocation:this._userDataProfileService.currentProfile.extensionsResource,useCache:!0})]),d=await this._extensionsScannerService.scanExtensionsUnderDevelopment({language:c},[...l,...s]),n=l.map(v=>(0,k.toExtensionDescription)(v,!1)),a=s.map(v=>(0,k.toExtensionDescription)(v,!1)),o=d.map(v=>(0,k.toExtensionDescription)(v,!0)),g=(0,A.dedupExtensions)(n,a,o,this._logService),h=this._extensionsScannerService.onDidChangeCache(()=>{h.dispose(),this._notificationService.prompt(I.default.Error,(0,b.localize)(0,null),[{label:(0,b.localize)(1,null),run:()=>this._hostService.reload()}])});return(0,r.timeout)(5e3).then(()=>h.dispose()),g}catch(c){return this._logService.error("Error scanning installed extensions:"),this._logService.error(c),[]}}};i=we([F(0,S.INotificationService),F(1,C.IHostService),F(2,k.IExtensionsScannerService),F(3,u.IUserDataProfileService),F(4,E.ILogService)],i),e.CachedExtensionScanner=i}),define(ae[2870],le([1,0,2023,86,10,90,6,99,234,477,14,31,8,55,7,155,2095,38,2096,98,498,26,17,27,131,2581,74,39,15,35,932,2,11,19,123,52,603,2098,16,237,25,18,937,327,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchKeybindingService=void 0;function q(he){return Array.isArray(he)}function X(he,pe){return he?typeof he.command!="string"?(pe.push(t.localize(1,null,"command")),!1):he.key&&typeof he.key!="string"?(pe.push(t.localize(2,null,"key")),!1):he.when&&typeof he.when!="string"?(pe.push(t.localize(3,null,"when")),!1):he.mac&&typeof he.mac!="string"?(pe.push(t.localize(4,null,"mac")),!1):he.linux&&typeof he.linux!="string"?(pe.push(t.localize(5,null,"linux")),!1):he.win&&typeof he.win!="string"?(pe.push(t.localize(6,null,"win")),!1):!0:(pe.push(t.localize(0,null)),!1)}const G={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"}}},Q=h.ExtensionsRegistry.registerExtensionPoint({extensionPoint:"keybindings",deps:[T.commandsExtensionPoint],jsonSchema:{description:t.localize(14,null),oneOf:[G,{type:"array",items:G}]}}),j=[90,91,92,93,95,96,97,98,99,100,101,102,103,104,105],K=new Map;K.set(95,22),K.set(96,23),K.set(97,24),K.set(98,25),K.set(99,26),K.set(100,27),K.set(101,28),K.set(102,29),K.set(103,30),K.set(104,21);let Y=class _r extends c.AbstractKeybindingService{constructor(pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae){super(pe,me,Se,Ie,De),this.hostService=ge,this.keyboardLayoutService=Ae,this._contributions=[],this.isComposingGlobalContextKey=pe.createKey("isComposing",!1),this.updateSchema();let Pe=(0,B.getDispatchConfig)(be);be.onDidChangeConfiguration(fe=>{const ye=(0,B.getDispatchConfig)(be);Pe!==ye&&(Pe=ye,this._keyboardMapper=this.keyboardLayoutService.getKeyboardMapper(Pe),this.updateResolver())}),this._keyboardMapper=this.keyboardLayoutService.getKeyboardMapper(Pe),this.keyboardLayoutService.onDidChangeKeyboardLayout(()=>{this._keyboardMapper=this.keyboardLayoutService.getKeyboardMapper(Pe),this.updateResolver()}),this._cachedResolver=null,this.userKeybindings=this._register(new ee(ve,Ce,De)),this.userKeybindings.initialize().then(()=>{this.userKeybindings.keybindings.length&&this.updateResolver()}),this._register(this.userKeybindings.onDidChange(()=>{De.debug("User keybindings changed"),this.updateResolver()})),Q.setHandler(fe=>{const ye=[];for(const ke of fe)this._handleKeybindingsExtensionPointUser(ke.description.identifier,ke.description.isBuiltin,ke.value,ke.collector,ye);d.KeybindingsRegistry.setExtensionKeybindings(ye),this.updateResolver()}),this.updateSchema(),this._register(ue.onDidRegisterExtensions(()=>this.updateSchema())),this._register(R.addDisposableListener(window,R.EventType.KEY_DOWN,fe=>{this.isComposingGlobalContextKey.set(fe.isComposing);const ye=new A.StandardKeyboardEvent(fe);this._log(`/ Received keydown event - ${(0,A.printKeyboardEvent)(fe)}`),this._log(`| Converted keydown event - ${(0,A.printStandardKeyboardEvent)(ye)}`),this._dispatch(ye,ye.target)&&ye.preventDefault(),this.isComposingGlobalContextKey.set(!1)})),this._register(R.addDisposableListener(window,R.EventType.KEY_UP,fe=>{this.isComposingGlobalContextKey.set(fe.isComposing);const ye=new A.StandardKeyboardEvent(fe);this._singleModifierDispatch(ye,ye.target)&&ye.preventDefault(),this.isComposingGlobalContextKey.set(!1)})),this._register(p.onDidChangeFullscreen(()=>{const fe=navigator.keyboard;z.BrowserFeatures.keyboard!==2&&(p.isFullscreen()?fe?.lock(["Escape"]):fe?.unlock(),this._cachedResolver=null,this._onDidUpdateKeybindings.fire())}))}registerSchemaContribution(pe){this._contributions.push(pe),pe.onDidChange&&this._register(pe.onDidChange(()=>this.updateSchema())),this.updateSchema()}updateSchema(){ne((0,V.flatten)(this._contributions.map(pe=>pe.getSchemaAdditions())))}_printUserBinding(pe){return U.UserSettingsLabelProvider.toLabel(S.OS,pe,me=>me instanceof I.SimpleKeybinding?E.KeyCodeUtils.toString(me.keyCode):E.ScanCodeUtils.toString(me.scanCode))||"[null]"}_printResolvedKeybinding(pe){return pe.getDispatchParts().map(me=>me||"[null]").join(" ")}_printResolvedKeybindings(pe,me,Se){const ve=`${me.padStart(35," ")} => `;if(Se.length===0){pe.push(`${ve}${"[NO BINDING]".padStart(35," ")}`);return}const be=ve.length,ge=!0;for(const ue of Se)ge?pe.push(`${ve}${this._printResolvedKeybinding(ue).padStart(35," ")}`):pe.push(`${" ".repeat(be)}${this._printResolvedKeybinding(ue).padStart(35," ")}`)}_dumpResolveKeybindingDebugInfo(){const pe=new Set,me=[];me.push("Default Resolved Keybindings (unique only):");for(const Se of d.KeybindingsRegistry.getDefaultKeybindings()){if(!Se.keybinding||Se.keybinding.length===0)continue;const Ie=this._printUserBinding(Se.keybinding);if(pe.has(Ie))continue;pe.add(Ie);const ve=this._keyboardMapper.resolveUserBinding(Se.keybinding);this._printResolvedKeybindings(me,Ie,ve)}me.push("User Resolved Keybindings (unique only):");for(const Se of this.userKeybindings.keybindings){const Ie=v.KeybindingIO.readUserKeybindingItem(Se);if(!Ie.parts||Ie.parts.length===0)continue;const ve=Se.key;if(pe.has(ve))continue;pe.add(ve);const be=this._keyboardMapper.resolveUserBinding(Ie.parts);this._printResolvedKeybindings(me,ve,be)}return me.join(` `)}_dumpDebugInfo(){const pe=JSON.stringify(this.keyboardLayoutService.getCurrentKeyboardLayout(),null," "),me=this._keyboardMapper.dumpDebugInfo(),Se=this._dumpResolveKeybindingDebugInfo(),Ie=JSON.stringify(this.keyboardLayoutService.getRawKeyboardMapping(),null," ");return`Layout info: ${pe} ${Se} ${me} Raw mapping: ${Ie}`}_dumpDebugInfoJSON(){const pe={layout:this.keyboardLayoutService.getCurrentKeyboardLayout(),rawMapping:this.keyboardLayoutService.getRawKeyboardMapping()};return JSON.stringify(pe,null," ")}customKeybindingsCount(){return this.userKeybindings.keybindings.length}updateResolver(){this._cachedResolver=null,this._onDidUpdateKeybindings.fire()}_getResolver(){if(!this._cachedResolver){const pe=this._resolveKeybindingItems(d.KeybindingsRegistry.getDefaultKeybindings(),!0),me=this._resolveUserKeybindingItems(this.userKeybindings.keybindings.map(Se=>v.KeybindingIO.readUserKeybindingItem(Se)),!1);this._cachedResolver=new s.KeybindingResolver(pe,me,Se=>this._log(Se))}return this._cachedResolver}_documentHasFocus(){return this.hostService.hasFocus}_resolveKeybindingItems(pe,me){const Se=[];let Ie=0;for(const ve of pe){const be=ve.when||void 0,ge=ve.keybinding;if(!ge)Se[Ie++]=new n.ResolvedKeybindingItem(void 0,ve.command,ve.commandArgs,be,me,ve.extensionId,ve.isBuiltinExtension);else{if(this._assertBrowserConflicts(ge,ve.command))continue;const ue=this._keyboardMapper.resolveUserBinding(ge);for(let Ce=ue.length-1;Ce>=0;Ce--){const De=ue[Ce];Se[Ie++]=new n.ResolvedKeybindingItem(De,ve.command,ve.commandArgs,be,me,ve.extensionId,ve.isBuiltinExtension)}}}return Se}_resolveUserKeybindingItems(pe,me){const Se=[];let Ie=0;for(const ve of pe){const be=ve.when||void 0,ge=ve.parts;if(ge.length===0)Se[Ie++]=new n.ResolvedKeybindingItem(void 0,ve.command,ve.commandArgs,be,me,null,!1);else{const ue=this._keyboardMapper.resolveUserBinding(ge);for(const Ce of ue)Se[Ie++]=new n.ResolvedKeybindingItem(Ce,ve.command,ve.commandArgs,be,me,null,!1)}}return Se}_assertBrowserConflicts(pe,me){if(z.BrowserFeatures.keyboard===0||z.BrowserFeatures.keyboard===1&&p.isFullscreen())return!1;for(const Se of pe){if(!Se.metaKey&&!Se.altKey&&!Se.ctrlKey&&!Se.shiftKey)continue;const Ie=3584;let ve=0;if(Se.metaKey&&(ve|=2048),Se.shiftKey&&(ve|=1024),Se.altKey&&(ve|=512),Se.ctrlKey&&S.OS===2&&(ve|=256),(ve&Ie)===2560&&(Se instanceof I.ScanCodeBinding&&(Se.scanCode===86||Se.scanCode===85)||Se instanceof I.SimpleKeybinding&&(Se.keyCode===15||Se.keyCode===17))||(ve&Ie)===2048&&(Se instanceof I.ScanCodeBinding&&Se.scanCode>=36&&Se.scanCode<=45||Se instanceof I.SimpleKeybinding&&Se.keyCode>=21&&Se.keyCode<=30))return!0}return!1}resolveKeybinding(pe){return this._keyboardMapper.resolveKeybinding(pe)}resolveKeyboardEvent(pe){return this.keyboardLayoutService.validateCurrentKeyboardMapping(pe),this._keyboardMapper.resolveKeyboardEvent(pe)}resolveUserBinding(pe){const me=b.KeybindingParser.parseUserBinding(pe);return this._keyboardMapper.resolveUserBinding(me)}_handleKeybindingsExtensionPointUser(pe,me,Se,Ie,ve){if(q(Se))for(let be=0,ge=Se.length;be<ge;be++)this._handleKeybinding(pe,me,be+1,Se[be],Ie,ve);else this._handleKeybinding(pe,me,1,Se,Ie,ve)}_handleKeybinding(pe,me,Se,Ie,ve,be){const ge=[];if(X(Ie,ge)){const ue=this._asCommandRule(pe,me,Se++,Ie);ue&&be.push(ue)}ge.length>0&&ve.error(t.localize(15,null,Q.name,ge.join(` `)))}static bindToCurrentPlatform(pe,me,Se,Ie){if(S.OS===1&&Ie){if(Ie)return Ie}else if(S.OS===2){if(me)return me}else if(Se)return Se;return pe}_asCommandRule(pe,me,Se,Ie){const{command:ve,args:be,when:ge,key:ue,mac:Ce,linux:De,win:Ae}=Ie,Pe=_r.bindToCurrentPlatform(ue,Ce,De,Ae);if(!Pe)return;let fe;me?fe=300+Se:fe=400+Se;const ye=D.MenuRegistry.getCommand(ve),ke=ye&&ye.precondition;let Ee;return ge&&ke?Ee=i.ContextKeyExpr.and(ke,i.ContextKeyExpr.deserialize(ge)):ge?Ee=i.ContextKeyExpr.deserialize(ge):ke&&(Ee=ke),{id:ve,args:be,when:Ee,weight:fe,keybinding:b.KeybindingParser.parseUserBinding(Pe),extensionId:pe.value,isBuiltinExtension:me}}getDefaultKeybindingsContent(){const pe=this._getResolver(),me=pe.getDefaultKeybindings(),Se=pe.getDefaultBoundCommands();return _r._getDefaultKeybindings(me)+` `+_r._getAllCommandsAsComment(Se)}static _getDefaultKeybindings(pe){const me=new v.OutputBuilder;me.writeLine("[");const Se=pe.length-1;return pe.forEach((Ie,ve)=>{v.KeybindingIO.writeKeybindingItem(me,Ie),ve!==Se?me.writeLine(","):me.writeLine()}),me.writeLine("]"),me.toString()}static _getAllCommandsAsComment(pe){const Se=(0,W.getAllUnboundCommands)(pe).sort().join(` // - `);return"// "+t.localize(16,null)+` // - `+Se}mightProducePrintableCharacter(pe){if(pe.ctrlKey||pe.metaKey||pe.altKey)return!1;const me=E.ScanCodeUtils.toEnum(pe.code);if(j.indexOf(me)!==-1)return!!(pe.keyCode===E.IMMUTABLE_CODE_TO_KEY_CODE[me]||S.isMacintosh&&pe.keyCode===K.get(me));if(E.IMMUTABLE_CODE_TO_KEY_CODE[me]!==-1)return!1;const Ie=this.keyboardLayoutService.getRawKeyboardMapping();if(!Ie)return!1;const ve=Ie[pe.code];return!(!ve||!ve.value||/\s/.test(ve.value))}};Y=we([F(0,i.IContextKeyService),F(1,C.ICommandService),F(2,g.ITelemetryService),F(3,a.INotificationService),F(4,$.IUserDataProfileService),F(5,r.IConfigurationService),F(6,m.IHostService),F(7,w.IExtensionService),F(8,M.IFileService),F(9,x.ILogService),F(10,P.IKeyboardLayoutService)],Y),e.WorkbenchKeybindingService=Y;class ee extends _.Disposable{get keybindings(){return this._keybindings}constructor(pe,me,Se){super(),this.userDataProfileService=pe,this.fileService=me,this._keybindings=[],this.watchDisposables=this._register(new _.DisposableStore),this._onDidChange=this._register(new k.Emitter),this.onDidChange=this._onDidChange.event,this.watch(),this.reloadConfigurationScheduler=this._register(new L.RunOnceScheduler(()=>this.reload().then(Ie=>{Ie&&this._onDidChange.fire()}),50)),this._register(k.Event.filter(this.fileService.onDidFilesChange,Ie=>Ie.contains(this.userDataProfileService.currentProfile.keybindingsResource))(()=>{Se.debug("Keybindings file changed"),this.reloadConfigurationScheduler.schedule()})),this._register(this.fileService.onDidRunOperation(Ie=>{Ie.operation===4&&Ie.resource.toString()===this.userDataProfileService.currentProfile.keybindingsResource.toString()&&(Se.debug("Keybindings file written"),this.reloadConfigurationScheduler.schedule())})),this._register(pe.onDidChangeCurrentProfile(Ie=>Ie.join(this.whenCurrentProfieChanged(Ie))))}async whenCurrentProfieChanged(pe){pe.preserveData&&await this.fileService.exists(pe.previous.keybindingsResource)&&await this.fileService.copy(pe.previous.keybindingsResource,pe.profile.keybindingsResource),this.watch(),this.reloadConfigurationScheduler.schedule()}watch(){this.watchDisposables.clear(),this.watchDisposables.add(this.fileService.watch((0,H.dirname)(this.userDataProfileService.currentProfile.keybindingsResource))),this.watchDisposables.add(this.fileService.watch(this.userDataProfileService.currentProfile.keybindingsResource))}async initialize(){await this.reload()}async reload(){const pe=this._keybindings;try{const me=await this.fileService.readFile(this.userDataProfileService.currentProfile.keybindingsResource),Se=(0,O.parse)(me.value.toString());this._keybindings=Array.isArray(Se)?Se:[]}catch{this._keybindings=[]}return pe?!N.equals(pe,this._keybindings):!0}}const ie="vscode://schemas/keybindings",re=[],oe=[],se=[],te={id:ie,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:oe,enumDescriptions:se,description:t.localize(19,null)},{type:"string"}]},when:{type:"string",description:t.localize(20,null)},args:{description:t.localize(21,null)}},allOf:re}},Z=o.Registry.as(f.Extensions.JSONContribution);Z.registerSchema(ie,te);function ne(he){re.length=0,oe.length=0,se.length=0;const pe=new Set,me=(ve,be)=>{/^_/.test(ve)||pe.has(ve)||(pe.add(ve),oe.push(ve),se.push(be),oe.push(`-${ve}`),se.push(be))},Se=C.CommandsRegistry.getCommands();for(const[ve,be]of Se){const ge=be.description;if(me(ve,ge?ge.description:void 0),!ge||!ge.args||ge.args.length!==1||!ge.args[0].schema)continue;const ue=ge.args[0].schema,Ce=typeof ge.args[0].isOptional<"u"?!ge.args[0].isOptional:Array.isArray(ue.required)&&ue.required.length>0,De={if:{properties:{command:{const:ve}}},then:{required:[].concat(Ce?["args"]:[]),properties:{args:ue}}};re.push(De)}const Ie=D.MenuRegistry.getCommands();for(const ve of Ie.keys())me(ve);re.push(...he),Z.notifySchemaChanged(ie)}const ce=o.Registry.as(u.Extensions.Configuration),de={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:S.OS===2||S.OS===3}}};ce.registerConfiguration(de),(0,y.registerSingleton)(l.IKeybindingService,Y,0)}),define(ae[984],le([1,0,2024,11,123,52,322,2,138,20,85,62,8,7,19,5,78,35,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditingService=e.IKeybindingEditingService=void 0,e.IKeybindingEditingService=(0,f.createDecorator)("keybindingEditingService");let d=class extends E.Disposable{constructor(a,o,g,h,v){super(),this.textModelResolverService=a,this.textFileService=o,this.fileService=g,this.configurationService=h,this.userDataProfileService=v,this.queue=new p.Queue}addKeybinding(a,o,g){return this.queue.queue(()=>this.doEditKeybinding(a,o,g,!0))}editKeybinding(a,o,g){return this.queue.queue(()=>this.doEditKeybinding(a,o,g,!1))}resetKeybinding(a){return this.queue.queue(()=>this.doResetKeybinding(a))}removeKeybinding(a){return this.queue.queue(()=>this.doRemoveKeybinding(a))}async doEditKeybinding(a,o,g,h){const v=await this.resolveAndValidate(),m=v.object.textEditorModel;if(h)this.updateKeybinding(a,o,g,m,-1);else{const w=R.parse(m.getValue()),D=this.findUserKeybindingEntryIndex(a,w);this.updateKeybinding(a,o,g,m,D),a.isDefault&&a.resolvedKeybinding&&this.removeDefaultKeybinding(a,m)}try{await this.save()}finally{v.dispose()}}doRemoveKeybinding(a){return this.resolveAndValidate().then(o=>{const g=o.object.textEditorModel;return a.isDefault?this.removeDefaultKeybinding(a,g):this.removeUserKeybinding(a,g),this.save().finally(()=>o.dispose())})}doResetKeybinding(a){return this.resolveAndValidate().then(o=>{const g=o.object.textEditorModel;return a.isDefault||(this.removeUserKeybinding(a,g),this.removeUnassignedDefaultKeybinding(a,g)),this.save().finally(()=>o.dispose())})}save(){return this.textFileService.save(this.userDataProfileService.currentProfile.keybindingsResource)}updateKeybinding(a,o,g,h,v){const{tabSize:m,insertSpaces:w}=h.getOptions(),D=h.getEOL();if(v!==-1){this.applyEditsToBuffer((0,k.setProperty)(h.getValue(),[v,"key"],o,{tabSize:m,insertSpaces:w,eol:D})[0],h);const y=(0,k.setProperty)(h.getValue(),[v,"when"],g,{tabSize:m,insertSpaces:w,eol:D});y.length>0&&this.applyEditsToBuffer(y[0],h)}else this.applyEditsToBuffer((0,k.setProperty)(h.getValue(),[-1],this.asObject(o,a.command,g,!1),{tabSize:m,insertSpaces:w,eol:D})[0],h)}removeUserKeybinding(a,o){const{tabSize:g,insertSpaces:h}=o.getOptions(),v=o.getEOL(),m=R.parse(o.getValue()),w=this.findUserKeybindingEntryIndex(a,m);w!==-1&&this.applyEditsToBuffer((0,k.setProperty)(o.getValue(),[w],void 0,{tabSize:g,insertSpaces:h,eol:v})[0],o)}removeDefaultKeybinding(a,o){const{tabSize:g,insertSpaces:h}=o.getOptions(),v=o.getEOL(),m=a.resolvedKeybinding?a.resolvedKeybinding.getUserSettingsLabel():null;if(m){const w=this.asObject(m,a.command,a.when?a.when.serialize():void 0,!0);R.parse(o.getValue()).every(y=>!this.areSame(y,w))&&this.applyEditsToBuffer((0,k.setProperty)(o.getValue(),[-1],w,{tabSize:g,insertSpaces:h,eol:v})[0],o)}}removeUnassignedDefaultKeybinding(a,o){const{tabSize:g,insertSpaces:h}=o.getOptions(),v=o.getEOL(),m=R.parse(o.getValue()),w=this.findUnassignedDefaultKeybindingEntryIndex(a,m).reverse();for(const D of w)this.applyEditsToBuffer((0,k.setProperty)(o.getValue(),[D],void 0,{tabSize:g,insertSpaces:h,eol:v})[0],o)}findUserKeybindingEntryIndex(a,o){for(let g=0;g<o.length;g++){const h=o[g];if(h.command===a.command){if(!h.when&&!a.when)return g;if(h.when&&a.when){const v=u.ContextKeyExpr.deserialize(h.when);if(v&&v.serialize()===a.when.serialize())return g}}}return-1}findUnassignedDefaultKeybindingEntryIndex(a,o){const g=[];for(let h=0;h<o.length;h++)o[h].command===`-${a.command}`&&g.push(h);return g}asObject(a,o,g,h){const v={key:a};return o&&(v.command=h?`-${o}`:o),g&&(v.when=g),v}areSame(a,o){if(a.command!==o.command||a.key!==o.key)return!1;const g=u.ContextKeyExpr.deserialize(a.when),h=u.ContextKeyExpr.deserialize(o.when);return!(g&&!h||!g&&h||g&&h&&!g.equals(h)||!A.equals(a.args,o.args))}applyEditsToBuffer(a,o){const g=o.getPositionAt(a.offset),h=o.getPositionAt(a.offset+a.length),v=new b.Range(g.lineNumber,g.column,h.lineNumber,h.column),w=o.getValueInRange(v)?I.EditOperation.replace(v,a.content):I.EditOperation.insert(g,a.content);o.pushEditOperations([new S.Selection(g.lineNumber,g.column,g.lineNumber,g.column)],[w],()=>[])}resolveModelReference(){return this.fileService.exists(this.userDataProfileService.currentProfile.keybindingsResource).then(a=>{const o=this.configurationService.getValue("files",{overrideIdentifier:"json"}).eol;return(a?Promise.resolve(null):this.textFileService.write(this.userDataProfileService.currentProfile.keybindingsResource,this.getEmptyContent(o),{encoding:"utf8"})).then(()=>this.textModelResolverService.createModelReference(this.userDataProfileService.currentProfile.keybindingsResource))})}resolveAndValidate(){return this.textFileService.isDirty(this.userDataProfileService.currentProfile.keybindingsResource)?Promise.reject(new Error((0,t.localize)(0,null))):this.resolveModelReference().then(a=>{const o=a.object.textEditorModel,g=o.getEOL();if(o.getValue()){const h=this.parse(o);if(h.parseErrors.length)return a.dispose(),Promise.reject(new Error((0,t.localize)(1,null)));if(h.result){if(!Array.isArray(h.result))return a.dispose(),Promise.reject(new Error((0,t.localize)(2,null)))}else{const v=g+"[]";this.applyEditsToBuffer({content:v,length:v.length,offset:o.getValue().length},o)}}else{const h=this.getEmptyContent(g);this.applyEditsToBuffer({content:h,length:h.length,offset:0},o)}return a})}parse(a){const o=[];return{result:R.parse(a.getValue(),o,{allowTrailingComma:!0,allowEmptyContent:!0}),parseErrors:o}}getEmptyContent(a){return"// "+(0,t.localize)(3,null)+a+"[]"}};d=we([F(0,C.ITextModelService),F(1,c.ITextFileService),F(2,i.IFileService),F(3,r.IConfigurationService),F(4,s.IUserDataProfileService)],d),e.KeybindingsEditingService=d,(0,l.registerSingleton)(e.IKeybindingEditingService,d,1)}),define(ae[2871],le([1,0,1801,11,10,14,2,197,250,368,36,79,188,27,93,952,5,38,953,269,37,984,12,7,33,24,40,76,26,73,23,211,6,15,80,340,263,1165]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingsEditor=void 0;const B=R.$;class V extends E.ToggleActionViewItem{constructor(K,Y,ee,ie){super(K,Y,ee),this.themeService=ie}render(K){super.render(K),this._register((0,y.attachToggleStyler)(this.toggle,this.themeService))}}let z=class ql extends r.EditorPane{constructor(K,Y,ee,ie,re,oe,se,te,Z,ne,ce){super(ql.ID,K,Y,ce),this.keybindingsService=ee,this.contextMenuService=ie,this.keybindingEditingService=re,this.contextKeyService=oe,this.notificationService=se,this.clipboardService=te,this.instantiationService=Z,this.editorService=ne,this._onDefineWhenExpression=this._register(new L.Emitter),this.onDefineWhenExpression=this._onDefineWhenExpression.event,this._onLayout=this._register(new L.Emitter),this.onLayout=this._onLayout.event,this.keybindingsEditorModel=null,this.unAssignedKeybindingItemToRevealAndFocus=null,this.tableEntries=[],this.dimension=null,this.latestEmptyFilters=[],this.delayedFiltering=new p.Delayer(300),this._register(ee.onDidUpdateKeybindings(()=>this.render(!!this.keybindingFocusContextKey.get()))),this.keybindingsEditorContextKey=d.CONTEXT_KEYBINDINGS_EDITOR.bindTo(this.contextKeyService),this.searchFocusContextKey=d.CONTEXT_KEYBINDINGS_SEARCH_FOCUS.bindTo(this.contextKeyService),this.keybindingFocusContextKey=d.CONTEXT_KEYBINDING_FOCUS.bindTo(this.contextKeyService),this.searchHistoryDelayer=new p.Delayer(500),this.recordKeysAction=new S.Action(d.KEYBINDINGS_EDITOR_COMMAND_RECORD_SEARCH_KEYS,(0,t.localize)(0,null),o.ThemeIcon.asClassName(N.keybindingsRecordKeysIcon)),this.recordKeysAction.checked=!1,this.sortByPrecedenceAction=new S.Action(d.KEYBINDINGS_EDITOR_COMMAND_SORTBY_PRECEDENCE,(0,t.localize)(1,null),o.ThemeIcon.asClassName(N.keybindingsSortIcon)),this.sortByPrecedenceAction.checked=!1}createEditor(K){const Y=R.append(K,B("div",{class:"keybindings-editor"}));this.createAriaLabelElement(Y),this.createOverlayContainer(Y),this.createHeader(Y),this.createBody(Y)}setInput(K,Y,ee,ie){return this.keybindingsEditorContextKey.set(!0),super.setInput(K,Y,ee,ie).then(()=>this.render(!!(Y&&Y.preserveFocus)))}clearInput(){super.clearInput(),this.keybindingsEditorContextKey.reset(),this.keybindingFocusContextKey.reset()}layout(K){this.dimension=K,this.layoutSearchWidget(K),this.overlayContainer.style.width=K.width+"px",this.overlayContainer.style.height=K.height+"px",this.defineKeybindingWidget.layout(this.dimension),this.layoutKeybindingsTable(),this._onLayout.fire()}focus(){const K=this.activeKeybindingEntry;K?this.selectEntry(K):A.isIOS||this.searchWidget.focus()}get activeKeybindingEntry(){const K=this.keybindingsTable.getFocusedElements()[0];return K&&K.templateId===f.KEYBINDING_ENTRY_TEMPLATE_ID?K:null}async defineKeybinding(K,Y){this.selectEntry(K),this.showOverlayContainer();try{const ee=await this.defineKeybindingWidget.define();ee&&await this.updateKeybinding(K,ee,K.keybindingItem.when,Y)}catch(ee){this.onKeybindingEditingError(ee)}finally{this.hideOverlayContainer(),this.selectEntry(K)}}defineWhenExpression(K){K.keybindingItem.keybinding&&(this.selectEntry(K),this._onDefineWhenExpression.fire(K))}async updateKeybinding(K,Y,ee,ie){((K.keybindingItem.keybinding?K.keybindingItem.keybinding.getUserSettingsLabel():"")!==Y||K.keybindingItem.when!==ee)&&(ie?await this.keybindingEditingService.addKeybinding(K.keybindingItem.keybindingItem,Y,ee||void 0):await this.keybindingEditingService.editKeybinding(K.keybindingItem.keybindingItem,Y,ee||void 0),K.keybindingItem.keybinding||(this.unAssignedKeybindingItemToRevealAndFocus=K))}async removeKeybinding(K){if(this.selectEntry(K),K.keybindingItem.keybinding)try{await this.keybindingEditingService.removeKeybinding(K.keybindingItem.keybindingItem),this.focus()}catch(Y){this.onKeybindingEditingError(Y),this.selectEntry(K)}}async resetKeybinding(K){this.selectEntry(K);try{await this.keybindingEditingService.resetKeybinding(K.keybindingItem.keybindingItem),K.keybindingItem.keybinding||(this.unAssignedKeybindingItemToRevealAndFocus=K),this.selectEntry(K)}catch(Y){this.onKeybindingEditingError(Y),this.selectEntry(K)}}async copyKeybinding(K){this.selectEntry(K);const Y={key:K.keybindingItem.keybinding&&K.keybindingItem.keybinding.getUserSettingsLabel()||"",command:K.keybindingItem.command};K.keybindingItem.when&&(Y.when=K.keybindingItem.when),await this.clipboardService.writeText(JSON.stringify(Y,null," "))}async copyKeybindingCommand(K){this.selectEntry(K),await this.clipboardService.writeText(K.keybindingItem.command)}async copyKeybindingCommandTitle(K){this.selectEntry(K),await this.clipboardService.writeText(K.keybindingItem.commandLabel)}focusSearch(){this.searchWidget.focus()}search(K){this.focusSearch(),this.searchWidget.setValue(K),this.selectEntry(0)}clearSearchResults(){this.searchWidget.clear()}showSimilarKeybindings(K){const Y=`"${K.keybindingItem.keybinding.getAriaLabel()}"`;Y!==this.searchWidget.getValue()&&this.searchWidget.setValue(Y)}createAriaLabelElement(K){this.ariaLabelElement=R.append(K,R.$("")),this.ariaLabelElement.setAttribute("id","keybindings-editor-aria-label-element"),this.ariaLabelElement.setAttribute("aria-live","assertive")}createOverlayContainer(K){this.overlayContainer=R.append(K,B(".overlay-container")),this.overlayContainer.style.position="absolute",this.overlayContainer.style.zIndex="40",this.defineKeybindingWidget=this._register(this.instantiationService.createInstance(s.DefineKeybindingWidget,this.overlayContainer)),this._register(this.defineKeybindingWidget.onDidChange(Y=>this.defineKeybindingWidget.printExisting(this.keybindingsEditorModel.fetch(`"${Y}"`).length))),this._register(this.defineKeybindingWidget.onShowExistingKeybidings(Y=>this.searchWidget.setValue(`"${Y}"`))),this.hideOverlayContainer()}showOverlayContainer(){this.overlayContainer.style.display="block"}hideOverlayContainer(){this.overlayContainer.style.display="none"}createHeader(K){this.headerContainer=R.append(K,B(".keybindings-header"));const Y=(0,t.localize)(2,null),ee=(0,t.localize)(3,null),ie=new S.Action(d.KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,(0,t.localize)(4,null),o.ThemeIcon.asClassName(N.preferencesClearInputIcon),!1,async()=>this.clearSearchResults()),re=R.append(this.headerContainer,B(".search-container"));this.searchWidget=this._register(this.instantiationService.createInstance(s.KeybindingsSearchWidget,re,{ariaLabel:Y,placeholder:Y,focusKey:this.searchFocusContextKey,ariaLabelledBy:"keybindings-editor-aria-label-element",recordEnter:!0,quoteRecordedKeys:!0,history:this.getMemento(0,0).searchHistory||[]})),this._register(this.searchWidget.onDidChange(Z=>{ie.enabled=!!Z,this.delayedFiltering.trigger(()=>this.filterKeybindings()),this.updateSearchOptions()})),this._register(this.searchWidget.onEscape(()=>this.recordKeysAction.checked=!1)),this.actionsContainer=R.append(re,R.$(".keybindings-search-actions-container"));const oe=this.createRecordingBadge(this.actionsContainer);this._register(this.sortByPrecedenceAction.onDidChange(Z=>{Z.checked!==void 0&&this.renderKeybindingsEntries(!1),this.updateSearchOptions()})),this._register(this.recordKeysAction.onDidChange(Z=>{Z.checked!==void 0&&(oe.classList.toggle("disabled",!Z.checked),Z.checked?(this.searchWidget.inputBox.setPlaceHolder(ee),this.searchWidget.inputBox.setAriaLabel(ee),this.searchWidget.startRecordingKeys(),this.searchWidget.focus()):(this.searchWidget.inputBox.setPlaceHolder(Y),this.searchWidget.inputBox.setAriaLabel(Y),this.searchWidget.stopRecordingKeys(),this.searchWidget.focus()),this.updateSearchOptions())}));const se=[this.recordKeysAction,this.sortByPrecedenceAction,ie],te=this._register(new P.ToolBar(this.actionsContainer,this.contextMenuService,{actionViewItemProvider:Z=>{if(Z.id===this.sortByPrecedenceAction.id||Z.id===this.recordKeysAction.id)return new V(null,Z,{keybinding:this.keybindingsService.lookupKeybinding(Z.id)?.getLabel()},this.themeService)},getKeyBinding:Z=>this.keybindingsService.lookupKeybinding(Z.id)}));te.setActions(se),this._register(this.keybindingsService.onDidUpdateKeybindings(()=>te.setActions(se)))}updateSearchOptions(){const K=this.input;K&&(K.searchOptions={searchValue:this.searchWidget.getValue(),recordKeybindings:!!this.recordKeysAction.checked,sortByPrecedence:!!this.sortByPrecedenceAction.checked})}createRecordingBadge(K){const Y=R.append(K,R.$(".recording-badge.monaco-count-badge.long.disabled"));return Y.textContent=(0,t.localize)(5,null),this._register((0,y.attachStylerCallback)(this.themeService,{badgeBackground:h.badgeBackground,contrastBorder:h.contrastBorder,badgeForeground:h.badgeForeground},ee=>{const ie=ee.badgeBackground?ee.badgeBackground.toString():"",re=ee.contrastBorder?ee.contrastBorder.toString():"",oe=ee.badgeForeground?ee.badgeForeground.toString():"";Y.style.backgroundColor=ie,Y.style.borderWidth=re?"1px":"",Y.style.borderStyle=re?"solid":"",Y.style.borderColor=re,Y.style.color=oe?oe.toString():""})),Y}layoutSearchWidget(K){this.searchWidget.layout(K),this.headerContainer.classList.toggle("small",K.width<400),this.searchWidget.inputBox.inputElement.style.paddingRight=`${R.getTotalWidth(this.actionsContainer)+12}px`}createBody(K){const Y=R.append(K,B(".keybindings-body"));this.createTable(Y)}createTable(K){this.keybindingsTableContainer=R.append(K,B(".keybindings-table-container")),this.keybindingsTable=this._register(this.instantiationService.createInstance(w.WorkbenchTable,"KeybindingsEditor",this.keybindingsTableContainer,new x,[{label:"",tooltip:"",weight:0,minimumWidth:40,maximumWidth:40,templateId:H.TEMPLATE_ID,project(Y){return Y}},{label:(0,t.localize)(6,null),tooltip:"",weight:.3,templateId:W.TEMPLATE_ID,project(Y){return Y}},{label:(0,t.localize)(7,null),tooltip:"",weight:.2,templateId:U.TEMPLATE_ID,project(Y){return Y}},{label:(0,t.localize)(8,null),tooltip:"",weight:.4,templateId:q.TEMPLATE_ID,project(Y){return Y}},{label:(0,t.localize)(9,null),tooltip:"",weight:.1,templateId:$.TEMPLATE_ID,project(Y){return Y}}],[this.instantiationService.createInstance(H,this),this.instantiationService.createInstance(W),this.instantiationService.createInstance(U),this.instantiationService.createInstance(q,this),this.instantiationService.createInstance($)],{identityProvider:{getId:Y=>Y.id},horizontalScrolling:!1,accessibilityProvider:new X,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:Y=>Y.keybindingItem.commandLabel||Y.keybindingItem.command},overrideStyles:{listBackground:h.editorBackground},multipleSelectionSupport:!1,setRowLineHeight:!1,openOnSingleClick:!1})),this._register(this.keybindingsTable.onContextMenu(Y=>this.onContextMenu(Y))),this._register(this.keybindingsTable.onDidChangeFocus(Y=>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(Y=>{if(Y.browserEvent?.defaultPrevented)return;const ee=this.activeKeybindingEntry;ee&&this.defineKeybinding(ee,!1)}))}async render(K){if(this.input){const Y=this.input;this.keybindingsEditorModel=await Y.resolve(),await this.keybindingsEditorModel.resolve(this.getActionsLabels()),this.renderKeybindingsEntries(!1,K),Y.searchOptions?(this.recordKeysAction.checked=Y.searchOptions.recordKeybindings,this.sortByPrecedenceAction.checked=Y.searchOptions.sortByPrecedence,this.searchWidget.setValue(Y.searchOptions.searchValue)):this.updateSearchOptions()}}getActionsLabels(){const K=new Map;for(const Y of m.EditorExtensionsRegistry.getEditorActions())K.set(Y.id,Y.label);for(const Y of M.MenuRegistry.getMenuItems(M.MenuId.CommandPalette))if((0,M.isIMenuItem)(Y)){const ee=typeof Y.command.title=="string"?Y.command.title:Y.command.title.value,ie=Y.command.category?typeof Y.command.category=="string"?Y.command.category:Y.command.category.value:void 0;K.set(Y.command.id,ie?`${ie}: ${ee}`:ee)}return K}filterKeybindings(){this.renderKeybindingsEntries(this.searchWidget.hasFocus()),this.searchHistoryDelayer.trigger(()=>{this.searchWidget.inputBox.addToHistory(),this.getMemento(0,0).searchHistory=this.searchWidget.inputBox.getHistory(),this.saveState()})}clearKeyboardShortcutSearchHistory(){this.searchWidget.inputBox.clearHistory(),this.getMemento(0,0).searchHistory=this.searchWidget.inputBox.getHistory(),this.saveState()}renderKeybindingsEntries(K,Y){if(this.keybindingsEditorModel){const ee=this.searchWidget.getValue(),ie=this.keybindingsEditorModel.fetch(ee,this.sortByPrecedenceAction.checked);this.ariaLabelElement.setAttribute("aria-label",this.getAriaLabel(ie)),ie.length===0&&this.latestEmptyFilters.push(ee);const re=this.keybindingsTable.getSelection()[0];if(this.tableEntries=ie,this.keybindingsTable.splice(0,this.keybindingsTable.length,this.tableEntries),this.layoutKeybindingsTable(),K)this.keybindingsTable.setSelection([]),this.keybindingsTable.setFocus([]);else if(this.unAssignedKeybindingItemToRevealAndFocus){const oe=this.getNewIndexOfUnassignedKeybinding(this.unAssignedKeybindingItemToRevealAndFocus);oe!==-1&&(this.keybindingsTable.reveal(oe,.2),this.selectEntry(oe)),this.unAssignedKeybindingItemToRevealAndFocus=null}else re!==-1&&re<this.tableEntries.length?this.selectEntry(re,Y):this.editorService.activeEditorPane===this&&!Y&&this.focus()}}getAriaLabel(K){return this.sortByPrecedenceAction.checked?(0,t.localize)(10,null,K.length):(0,t.localize)(11,null,K.length)}layoutKeybindingsTable(){if(!this.dimension)return;const K=this.dimension.height-(R.getDomNodePagePosition(this.headerContainer).height+12);this.keybindingsTableContainer.style.height=`${K}px`,this.keybindingsTable.layout(K)}getIndexOf(K){const Y=this.tableEntries.indexOf(K);if(Y===-1){for(let ee=0;ee<this.tableEntries.length;ee++)if(this.tableEntries[ee].id===K.id)return ee}return Y}getNewIndexOfUnassignedKeybinding(K){for(let Y=0;Y<this.tableEntries.length;Y++){const ee=this.tableEntries[Y];if(ee.templateId===f.KEYBINDING_ENTRY_TEMPLATE_ID&&ee.keybindingItem.command===K.keybindingItem.command)return Y}return-1}selectEntry(K,Y=!0){const ee=typeof K=="number"?K:this.getIndexOf(K);ee!==-1&&ee<this.keybindingsTable.length&&(Y&&(this.keybindingsTable.domFocus(),this.keybindingsTable.setFocus([ee])),this.keybindingsTable.setSelection([ee]))}focusKeybindings(){this.keybindingsTable.domFocus();const K=this.keybindingsTable.getFocus();this.keybindingsTable.setFocus([K.length?K[0]:0])}selectKeybinding(K){this.selectEntry(K)}recordSearchKeys(){this.recordKeysAction.checked=!0}toggleSortByPrecedence(){this.sortByPrecedenceAction.checked=!this.sortByPrecedenceAction.checked}onContextMenu(K){if(!!K.element&&K.element.templateId===f.KEYBINDING_ENTRY_TEMPLATE_ID){const Y=K.element;this.selectEntry(Y),this.contextMenuService.showContextMenu({getAnchor:()=>K.anchor,getActions:()=>[this.createCopyAction(Y),this.createCopyCommandAction(Y),this.createCopyCommandTitleAction(Y),new S.Separator,...Y.keybindingItem.keybinding?[this.createDefineKeybindingAction(Y),this.createAddKeybindingAction(Y)]:[this.createDefineKeybindingAction(Y)],new S.Separator,this.createRemoveAction(Y),this.createResetAction(Y),new S.Separator,this.createDefineWhenExpressionAction(Y),new S.Separator,this.createShowConflictsAction(Y)]})}}onFocusChange(){this.keybindingFocusContextKey.reset();const K=this.keybindingsTable.getFocusedElements()[0];!K||K.templateId===f.KEYBINDING_ENTRY_TEMPLATE_ID&&this.keybindingFocusContextKey.set(!0)}createDefineKeybindingAction(K){return{label:K.keybindingItem.keybinding?(0,t.localize)(12,null):(0,t.localize)(13,null),enabled:!0,id:d.KEYBINDINGS_EDITOR_COMMAND_DEFINE,run:()=>this.defineKeybinding(K,!1)}}createAddKeybindingAction(K){return{label:(0,t.localize)(14,null),enabled:!0,id:d.KEYBINDINGS_EDITOR_COMMAND_ADD,run:()=>this.defineKeybinding(K,!0)}}createDefineWhenExpressionAction(K){return{label:(0,t.localize)(15,null),enabled:!!K.keybindingItem.keybinding,id:d.KEYBINDINGS_EDITOR_COMMAND_DEFINE_WHEN,run:()=>this.defineWhenExpression(K)}}createRemoveAction(K){return{label:(0,t.localize)(16,null),enabled:!!K.keybindingItem.keybinding,id:d.KEYBINDINGS_EDITOR_COMMAND_REMOVE,run:()=>this.removeKeybinding(K)}}createResetAction(K){return{label:(0,t.localize)(17,null),enabled:!K.keybindingItem.keybindingItem.isDefault,id:d.KEYBINDINGS_EDITOR_COMMAND_RESET,run:()=>this.resetKeybinding(K)}}createShowConflictsAction(K){return{label:(0,t.localize)(18,null),enabled:!!K.keybindingItem.keybinding,id:d.KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR,run:()=>this.showSimilarKeybindings(K)}}createCopyAction(K){return{label:(0,t.localize)(19,null),enabled:!0,id:d.KEYBINDINGS_EDITOR_COMMAND_COPY,run:()=>this.copyKeybinding(K)}}createCopyCommandAction(K){return{label:(0,t.localize)(20,null),enabled:!0,id:d.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND,run:()=>this.copyKeybindingCommand(K)}}createCopyCommandTitleAction(K){return{label:(0,t.localize)(21,null),enabled:!!K.keybindingItem.commandLabel,id:d.KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND_TITLE,run:()=>this.copyKeybindingCommandTitle(K)}}onKeybindingEditingError(K){this.notificationService.error(typeof K=="string"?K:(0,t.localize)(22,null,`${K}`))}};z.ID="workbench.editor.keybindings",z=we([F(0,u.ITelemetryService),F(1,o.IThemeService),F(2,l.IKeybindingService),F(3,n.IContextMenuService),F(4,a.IKeybindingEditingService),F(5,g.IContextKeyService),F(6,D.INotificationService),F(7,i.IClipboardService),F(8,c.IInstantiationService),F(9,v.IEditorService),F(10,T.IStorageService)],z),e.KeybindingsEditor=z;class x{constructor(){this.headerRowHeight=30}getHeight(K){if(K.templateId===f.KEYBINDING_ENTRY_TEMPLATE_ID){const Y=K.keybindingItem.commandLabel&&K.commandIdMatches,ee=!!K.commandDefaultLabelMatches;if(Y&&ee)return 60;if(Y||ee)return 40}return 24}}let H=class jl{constructor(K,Y){this.keybindingsEditor=K,this.keybindingsService=Y,this.templateId=jl.TEMPLATE_ID}renderTemplate(K){const Y=R.append(K,B(".actions"));return{actionBar:new C.ActionBar(Y,{animated:!1})}}renderElement(K,Y,ee,ie){ee.actionBar.clear();const re=[];K.keybindingItem.keybinding?re.push(this.createEditAction(K)):re.push(this.createAddAction(K)),ee.actionBar.push(re,{icon:!0})}createEditAction(K){const Y=this.keybindingsService.lookupKeybinding(d.KEYBINDINGS_EDITOR_COMMAND_DEFINE);return{class:o.ThemeIcon.asClassName(N.keybindingsEditIcon),enabled:!0,id:"editKeybinding",tooltip:Y?(0,t.localize)(23,null,`(${Y.getLabel()})`):(0,t.localize)(24,null),run:()=>this.keybindingsEditor.defineKeybinding(K,!1)}}createAddAction(K){const Y=this.keybindingsService.lookupKeybinding(d.KEYBINDINGS_EDITOR_COMMAND_DEFINE);return{class:o.ThemeIcon.asClassName(N.keybindingsAddIcon),enabled:!0,id:"addKeybinding",tooltip:Y?(0,t.localize)(25,null,`(${Y.getLabel()})`):(0,t.localize)(26,null),run:()=>this.keybindingsEditor.defineKeybinding(K,!1)}}disposeTemplate(K){K.actionBar.dispose()}};H.TEMPLATE_ID="actions",H=we([F(1,l.IKeybindingService)],H);class W{constructor(){this.templateId=W.TEMPLATE_ID}renderTemplate(K){const Y=R.append(K,B(".command")),ee=R.append(Y,B(".command-label")),ie=new I.HighlightedLabel(ee),re=R.append(Y,B(".command-default-label")),oe=new I.HighlightedLabel(re),se=R.append(Y,B(".command-id.code")),te=new I.HighlightedLabel(se);return{commandColumn:Y,commandLabelContainer:ee,commandLabel:ie,commandDefaultLabelContainer:re,commandDefaultLabel:oe,commandIdLabelContainer:se,commandIdLabel:te}}renderElement(K,Y,ee,ie){const re=K.keybindingItem,oe=!!(re.commandLabel&&K.commandIdMatches),se=!!K.commandDefaultLabelMatches;ee.commandColumn.classList.toggle("vertical-align-column",oe||se),ee.commandColumn.title=re.commandLabel?(0,t.localize)(27,null,re.commandLabel,re.command):re.command,re.commandLabel?(ee.commandLabelContainer.classList.remove("hide"),ee.commandLabel.set(re.commandLabel,K.commandLabelMatches)):(ee.commandLabelContainer.classList.add("hide"),ee.commandLabel.set(void 0)),K.commandDefaultLabelMatches?(ee.commandDefaultLabelContainer.classList.remove("hide"),ee.commandDefaultLabel.set(re.commandDefaultLabel,K.commandDefaultLabelMatches)):(ee.commandDefaultLabelContainer.classList.add("hide"),ee.commandDefaultLabel.set(void 0)),K.commandIdMatches||!re.commandLabel?(ee.commandIdLabelContainer.classList.remove("hide"),ee.commandIdLabel.set(re.command,K.commandIdMatches)):(ee.commandIdLabelContainer.classList.add("hide"),ee.commandIdLabel.set(void 0))}disposeTemplate(K){}}W.TEMPLATE_ID="commands";let U=class Yl{constructor(K){this.themeService=K,this.templateId=Yl.TEMPLATE_ID}renderTemplate(K){const Y=R.append(K,B(".keybinding")),ee=new b.KeybindingLabel(R.append(Y,B("div.keybinding-label")),A.OS),ie=(0,y.attachKeybindingLabelStyler)(ee,this.themeService);return{keybindingLabel:ee,keybindingLabelStyler:ie}}renderElement(K,Y,ee,ie){K.keybindingItem.keybinding?ee.keybindingLabel.set(K.keybindingItem.keybinding,K.keybindingMatches):ee.keybindingLabel.set(void 0,void 0)}disposeTemplate(K){K.keybindingLabelStyler.dispose()}};U.TEMPLATE_ID="keybindings",U=we([F(0,o.IThemeService)],U);class ${constructor(){this.templateId=$.TEMPLATE_ID}renderTemplate(K){const Y=R.append(K,B(".source"));return{highlightedLabel:new I.HighlightedLabel(Y)}}renderElement(K,Y,ee,ie){ee.highlightedLabel.set(K.keybindingItem.source,K.sourceMatches)}disposeTemplate(K){}}$.TEMPLATE_ID="source";let q=class Xl{constructor(K,Y,ee,ie){this.keybindingsEditor=K,this.contextViewService=Y,this.themeService=ee,this.templateId=Xl.TEMPLATE_ID,this.whenFocusContextKey=d.CONTEXT_WHEN_FOCUS.bindTo(ie)}renderTemplate(K){const Y=R.append(K,B(".when")),ee=R.append(Y,B("div.when-label")),ie=new I.HighlightedLabel(ee),re=new _.InputBox(Y,this.contextViewService,{validationOptions:{validation:he=>{try{g.ContextKeyExpr.deserialize(he,!0)}catch(pe){return{content:pe.message,formatContent:!0,type:3}}return null}},ariaLabel:(0,t.localize)(28,null)}),oe=new k.DisposableStore;oe.add((0,y.attachInputBoxStyler)(re,this.themeService));const se=oe.add(new L.Emitter),te=se.event,Z=oe.add(new L.Emitter),ne=Z.event,ce=()=>{Y.classList.remove("input-mode"),K.style.paddingLeft="10px"};oe.add(R.addStandardDisposableListener(re.inputElement,R.EventType.KEY_DOWN,he=>{let pe=!1;he.equals(3)?(ce(),se.fire(),pe=!0):he.equals(9)&&(ce(),Z.fire(),pe=!0),pe&&(he.preventDefault(),he.stopPropagation())})),oe.add(R.addDisposableListener(re.inputElement,R.EventType.FOCUS,()=>{this.whenFocusContextKey.set(!0)})),oe.add(R.addDisposableListener(re.inputElement,R.EventType.BLUR,()=>{this.whenFocusContextKey.set(!1),ce(),Z.fire()})),oe.add(R.addDisposableListener(re.inputElement,R.EventType.DBLCLICK,he=>R.EventHelper.stop(he)));const de=oe.add(new k.DisposableStore);return{element:Y,whenContainer:ee,whenLabel:ie,whenInput:re,onDidAccept:te,onDidReject:ne,renderDisposables:de,disposables:oe}}renderElement(K,Y,ee,ie){ee.renderDisposables.clear(),ee.renderDisposables.add(this.keybindingsEditor.onDefineWhenExpression(re=>{K===re&&(ee.element.classList.add("input-mode"),ee.whenInput.focus(),ee.whenInput.select(),ee.element.parentElement.style.paddingLeft="0px")})),ee.whenInput.value=K.keybindingItem.when||"",ee.whenContainer.classList.toggle("code",!!K.keybindingItem.when),ee.whenContainer.classList.toggle("empty",!K.keybindingItem.when),K.keybindingItem.when?(ee.whenLabel.set(K.keybindingItem.when,K.whenMatches),ee.whenLabel.element.title=K.keybindingItem.when,ee.element.title=K.keybindingItem.when):(ee.whenLabel.set("-"),ee.whenLabel.element.title="",ee.element.title=""),ee.renderDisposables.add(ee.onDidAccept(()=>{this.keybindingsEditor.updateKeybinding(K,K.keybindingItem.keybinding&&K.keybindingItem.keybinding.getUserSettingsLabel()||"",ee.whenInput.value),this.keybindingsEditor.selectKeybinding(K)})),ee.renderDisposables.add(ee.onDidReject(()=>{ee.whenInput.value=K.keybindingItem.when||"",this.keybindingsEditor.selectKeybinding(K)}))}disposeTemplate(K){K.disposables.dispose(),K.renderDisposables.dispose()}};q.TEMPLATE_ID="when",q=we([F(1,n.IContextViewService),F(2,o.IThemeService),F(3,g.IContextKeyService)],q);class X{getWidgetAriaLabel(){return(0,t.localize)(29,null)}getAriaLabel(K){let Y=K.keybindingItem.commandLabel?K.keybindingItem.commandLabel:K.keybindingItem.command;return Y+=", "+(K.keybindingItem.keybinding?.getAriaLabel()||(0,t.localize)(30,null)),Y+=", "+K.keybindingItem.source,Y+=", "+K.keybindingItem.when?K.keybindingItem.when:(0,t.localize)(31,null),Y}}const G=(0,h.registerColor)("keybindingTable.headerBackground",{dark:h.tableOddRowsBackgroundColor,light:h.tableOddRowsBackgroundColor,hcDark:h.tableOddRowsBackgroundColor,hcLight:h.tableOddRowsBackgroundColor},"Background color for the keyboard shortcuts table header."),Q=(0,h.registerColor)("keybindingTable.rowsBackground",{light:h.tableOddRowsBackgroundColor,dark:h.tableOddRowsBackgroundColor,hcDark:h.tableOddRowsBackgroundColor,hcLight:h.tableOddRowsBackgroundColor},"Background color for the keyboard shortcuts table alternating rows.");(0,o.registerThemingParticipant)((j,K)=>{const Y=j.getColor(G);Y&&K.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-th { background-color: ${Y}; }`);const ee=j.getColor(Q);ee&&(K.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: ${ee}; }`),K.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: ${ee}; }`),K.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: ${ee}; }`));const ie=j.getColor(h.foreground);if(ie){const me=ie.transparent(.8).makeOpaque((0,O.WORKBENCH_BACKGROUND)(j));K.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const re=j.getColor(h.listActiveSelectionForeground),oe=j.getColor(h.listActiveSelectionBackground);if(re&&oe){const me=re.transparent(.8).makeOpaque(oe);K.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 se=j.getColor(h.listInactiveSelectionForeground),te=j.getColor(h.listInactiveSelectionBackground);if(se&&te){const me=se.transparent(.8).makeOpaque(te);K.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.selected .monaco-table-tr .monaco-table-td .code { color: ${me}; }`)}const Z=j.getColor(h.listFocusForeground),ne=j.getColor(h.listFocusBackground);if(Z&&ne){const me=Z.transparent(.8).makeOpaque(ne);K.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 ce=j.getColor(h.listHoverForeground),de=j.getColor(h.listHoverBackground);if(ce&&de){const me=ce.transparent(.8).makeOpaque(de);K.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 he=j.getColor(h.listHighlightForeground);he&&K.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-table-tr .monaco-table-td .highlight { color: ${he}; }`),re&&(K.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: ${re}; }`),K.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: ${re}; }`));const pe=j.getColor(h.listInactiveSelectionForeground);pe&&K.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}; }`),ce&&K.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: ${ce}; }`),Z&&K.addRule(`.keybindings-editor > .keybindings-body > .keybindings-table-container .monaco-table .monaco-list-row.focused .monaco-table-tr .monaco-table-td .monaco-keybinding-key { color: ${Z}; }`)})}),define(ae[2872],le([1,0,2,2057,47,35,103,34,51,39,74,135]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfileManagementService=void 0;let r=class extends t.Disposable{constructor(i,f,c,l,s,d,n){super(),this.userDataProfilesService=i,this.userDataProfileService=f,this.hostService=c,this.dialogService=l,this.workspaceContextService=s,this.extensionService=d,this.environmentService=n,this._register(i.onDidChangeProfiles(a=>this.onDidChangeProfiles(a))),this._register(i.onDidResetWorkspaces(()=>this.onDidResetWorkspaces())),this._register(f.onDidChangeCurrentProfile(a=>this.onDidChangeCurrentProfile(a)))}onDidChangeProfiles(i){if(i.removed.some(f=>f.id===this.userDataProfileService.currentProfile.id)){this.enterProfile(this.userDataProfilesService.defaultProfile,!1,(0,p.localize)(0,null));return}}onDidResetWorkspaces(){if(!this.userDataProfileService.currentProfile.isDefault){this.enterProfile(this.userDataProfilesService.defaultProfile,!1,(0,p.localize)(1,null));return}}async onDidChangeCurrentProfile(i){i.previous.isTransient&&await this.userDataProfilesService.cleanUpTransientProfiles()}async createAndEnterProfile(i,f,c){const l=await this.userDataProfilesService.createNamedProfile(i,f,this.getWorkspaceIdentifier());return await this.enterProfile(l,!!c),l}async createAndEnterTransientProfile(){const i=await this.userDataProfilesService.createTransientProfile(this.getWorkspaceIdentifier());return await this.enterProfile(i,!1),i}async updateProfile(i,f){if(!this.userDataProfilesService.profiles.some(c=>c.id===i.id))throw new Error(`Settings profile ${i.name} does not exist`);if(i.isDefault)throw new Error((0,p.localize)(2,null));await this.userDataProfilesService.updateProfile(i,f)}async removeProfile(i){if(!this.userDataProfilesService.profiles.some(f=>f.id===i.id))throw new Error(`Settings profile ${i.name} does not exist`);if(i.isDefault)throw new Error((0,p.localize)(3,null));await this.userDataProfilesService.removeProfile(i)}async switchProfile(i){const f=this.getWorkspaceIdentifier();if(!this.userDataProfilesService.profiles.some(c=>c.id===i.id))throw new Error(`Profile ${i.name} does not exist`);this.userDataProfileService.currentProfile.id!==i.id&&(await this.userDataProfilesService.setProfileForWorkspace(f,i),await this.enterProfile(i,!1))}getWorkspaceIdentifier(){const i=this.workspaceContextService.getWorkspace();switch(this.workspaceContextService.getWorkbenchState()){case 2:return{uri:i.folders[0].uri,id:i.id};case 3:return{configPath:i.configuration,id:i.id}}return"empty-window"}async enterProfile(i,f,c){const l=!!this.environmentService.remoteAuthority;l||this.extensionService.stopExtensionHosts(),await this.userDataProfileService.updateCurrentProfile(i,f),l?(await this.dialogService.confirm({type:"info",message:c??(0,p.localize)(4,null),primaryButton:(0,p.localize)(5,null)})).confirmed&&await this.hostService.reload():await this.extensionService.startExtensionHosts()}};r=we([F(0,k.IUserDataProfilesService),F(1,C.IUserDataProfileService),F(2,S.IHostService),F(3,R.IDialogService),F(4,E.IWorkspaceContextService),F(5,b.IExtensionService),F(6,I.IWorkbenchEnvironmentService)],r),e.UserDataProfileManagementService=r,(0,A.registerSingleton)(C.IUserDataProfileManagementService,r,0)}),define(ae[2873],le([1,0,56,55,19,25,17,135,437,95]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsProfile=void 0;let S=class{constructor(r,u,i,f){this.fileService=r,this.userDataProfileService=u,this.userDataSyncUtilService=i,this.logService=f}async getProfileContent(r){const u=this.getIgnoredSettings(),i=await this.userDataSyncUtilService.resolveFormattingOptions(this.userDataProfileService.currentProfile.settingsResource),f=await this.getLocalFileContent();let c=(0,I.updateIgnoredSettings)(f||"{}","{}",u,i);r?.skipComments&&(c=(0,I.removeComments)(c,i));const l={settings:c};return JSON.stringify(l)}async applyProfile(r){const u=JSON.parse(r);this.logService.trace("Profile: Applying settings...");const i=await this.getLocalFileContent(),f=await this.userDataSyncUtilService.resolveFormattingOptions(this.userDataProfileService.currentProfile.settingsResource),c=(0,I.updateIgnoredSettings)(u.settings,i||"{}",this.getIgnoredSettings(),f);await this.fileService.writeFile(this.userDataProfileService.currentProfile.settingsResource,t.VSBuffer.fromString(c)),this.logService.info("Profile: Applied settings")}getIgnoredSettings(){const r=k.Registry.as(p.Extensions.Configuration).getConfigurationProperties();return Object.keys(r).filter(i=>r[i]?.scope===2||r[i]?.scope===6)}async getLocalFileContent(){try{return(await this.fileService.readFile(this.userDataProfileService.currentProfile.settingsResource)).value.toString()}catch{return null}}};S=we([F(0,R.IFileService),F(1,E.IUserDataProfileService),F(2,b.IUserDataSyncUtilService),F(3,A.ILogService)],S),e.SettingsProfile=S}),define(ae[2874],le([1,0,11,29,6,2,2060,63,103]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfileService=void 0;const b=(0,E.registerIcon)("defaultSettingsProfiles-icon",p.Codicon.settings,(0,k.localize)(0,null));let S=class extends A.Disposable{get currentProfile(){return this._currentProfile}constructor(r,u){super(),this._onDidChangeCurrentProfile=this._register(new R.Emitter),this.onDidChangeCurrentProfile=this._onDidChangeCurrentProfile.event,this._onDidUpdateCurrentProfile=this._register(new R.Emitter),this.onDidUpdateCurrentProfile=this._onDidUpdateCurrentProfile.event,this._currentProfile=r,this._register(u.onDidChangeProfiles(i=>{if(this._currentProfile.isDefault){this._currentProfile=u.defaultProfile;return}const f=i.updated.find(c=>this._currentProfile.id===c.id);f&&(this._currentProfile=f,this._onDidUpdateCurrentProfile.fire())}))}async updateCurrentProfile(r,u){if(this._currentProfile.id===r.id)return;const i=this._currentProfile;this._currentProfile=r;const f=[];this._onDidChangeCurrentProfile.fire({preserveData:u,previous:i,profile:r,join(c){f.push(c)}}),await t.Promises.settled(f)}getShortName(r){return r.isDefault?`$(${b.id})`:r.shortName?r.shortName:r.isTransient?`T${r.name.charAt(r.name.length-1)}`:r.name.substring(0,2).toUpperCase()}};S=we([F(1,I.IUserDataProfilesService)],S),e.UserDataProfileService=S}),define(ae[399],le([1,0,6,2,17]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0;var A;(function(E){E.ProfileStorageRegistry="workbench.registry.profile.storage"})(A=e.Extensions||(e.Extensions={}));class k extends p.Disposable{constructor(){super(...arguments),this._onDidRegister=this._register(new t.Emitter),this.onDidRegister=this._onDidRegister.event,this.storageKeys=new Map}get all(){return[...this.storageKeys.values()].flat()}registerKeys(I){for(const b of I)this.storageKeys.set(b.key,b);this._onDidRegister.fire(I)}}R.Registry.add(A.ProfileStorageRegistry,new k)}),define(ae[2875],le([1,0,2,149,10,6,17,399,1515]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StatusbarViewModel=void 0;class b extends t.Disposable{get entries(){return this._entries.slice(0)}get lastFocusedEntry(){return this._lastFocusedEntry&&!this.isHidden(this._lastFocusedEntry.id)?this._lastFocusedEntry:void 0}constructor(C){super(),this.storageService=C,this._onDidChangeEntryVisibility=this._register(new A.Emitter),this.onDidChangeEntryVisibility=this._onDidChangeEntryVisibility.event,this._entries=[],this.hidden=new Set,this.restoreState(),this.registerListeners(),k.Registry.as(E.Extensions.ProfileStorageRegistry).registerKeys([{key:b.HIDDEN_ENTRIES_KEY,description:(0,I.localize)(0,null)}])}restoreState(){const C=this.storageService.get(b.HIDDEN_ENTRIES_KEY,0);if(C)try{const r=JSON.parse(C);this.hidden=new Set(r)}catch{}}registerListeners(){this._register(this.storageService.onDidChangeValue(C=>this.onDidStorageValueChange(C)))}onDidStorageValueChange(C){if(C.key===b.HIDDEN_ENTRIES_KEY&&C.scope===0){const r=new Set(this.hidden);this.hidden.clear(),this.restoreState();const u=new Set;for(const i of r)this.hidden.has(i)||u.add(i);for(const i of this.hidden)r.has(i)||u.add(i);if(u.size>0)for(const i of this._entries)u.has(i.id)&&(this.updateVisibility(i.id,!0),u.delete(i.id))}}add(C){this._entries.push(C),this.updateVisibility(C,!1),this.sort(),this.markFirstLastVisibleEntry()}remove(C){const r=this._entries.indexOf(C);r>=0&&(this._entries.splice(r,1),this._entries.some(u=>(0,p.isStatusbarEntryLocation)(u.priority.primary)&&u.priority.primary.id===C.id)&&this.sort(),this.markFirstLastVisibleEntry())}isHidden(C){return this.hidden.has(C)}hide(C){this.hidden.has(C)||(this.hidden.add(C),this.updateVisibility(C,!0),this.saveState())}show(C){this.hidden.has(C)&&(this.hidden.delete(C),this.updateVisibility(C,!0),this.saveState())}findEntry(C){return this._entries.find(r=>r.container===C)}getEntries(C){return this._entries.filter(r=>r.alignment===C)}focusNextEntry(){this.focusEntry(1,0)}focusPreviousEntry(){this.focusEntry(-1,this.entries.length-1)}isEntryFocused(){return!!this.getFocusedEntry()}getFocusedEntry(){return this._entries.find(C=>(0,R.isAncestor)(document.activeElement,C.container))}focusEntry(C,r){const u=c=>{let l=c,s=l>=0&&l<this._entries.length?this._entries[l]:void 0;for(;s&&this.isHidden(s.id);)l+=C,s=l>=0&&l<this._entries.length?this._entries[l]:void 0;return s},i=this.getFocusedEntry();if(i){const c=u(this._entries.indexOf(i)+C);if(c){this._lastFocusedEntry=c,c.labelContainer.focus();return}}const f=u(r);f&&(this._lastFocusedEntry=f,f.labelContainer.focus())}updateVisibility(C,r){if(typeof C=="string"){const u=C;for(const i of this._entries)i.id===u&&this.updateVisibility(i,r)}else{const u=C,i=this.isHidden(u.id);i?(0,R.hide)(u.container):(0,R.show)(u.container),r&&this._onDidChangeEntryVisibility.fire({id:u.id,visible:!i}),this.markFirstLastVisibleEntry()}}saveState(){this.hidden.size>0?this.storageService.store(b.HIDDEN_ENTRIES_KEY,JSON.stringify(Array.from(this.hidden.values())),0,0):this.storageService.remove(b.HIDDEN_ENTRIES_KEY,0)}sort(){const C=new Map,r=new Map;for(let f=0;f<this._entries.length;f++){const c=this._entries[f];if(typeof c.priority.primary=="number")C.set(c,f);else{let l=r.get(c.priority.primary.id);l||(l=[],r.set(c.priority.primary.id,l)),l.push(c)}}const u=Array.from(C.keys());u.sort((f,c)=>f.alignment===c.alignment?f.priority.primary!==c.priority.primary?Number(c.priority.primary)-Number(f.priority.primary):f.priority.secondary!==c.priority.secondary?c.priority.secondary-f.priority.secondary:C.get(f)-C.get(c):f.alignment===0?-1:c.alignment===0?1:0);let i;if(r.size>0){i=[];for(const f of u){const c=r.get(f.id);c&&i.push(...c.filter(l=>(0,p.isStatusbarEntryLocation)(l.priority.primary)&&l.priority.primary.alignment===0)),i.push(f),c&&i.push(...c.filter(l=>(0,p.isStatusbarEntryLocation)(l.priority.primary)&&l.priority.primary.alignment===1)),r.delete(f.id)}for(const[,f]of r)i.push(...f)}else i=u;this._entries=i}markFirstLastVisibleEntry(){this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(0)),this.doMarkFirstLastVisibleStatusbarItem(this.getEntries(1))}doMarkFirstLastVisibleStatusbarItem(C){let r,u;for(const i of C)i.container.classList.remove("first-visible-item","last-visible-item"),!this.isHidden(i.id)&&(r||(r=i),u=i);r?.container.classList.add("first-visible-item"),u?.container.classList.add("last-visible-item")}}e.StatusbarViewModel=b,b.HIDDEN_ENTRIES_KEY="workbench.statusbar.hidden"}),define(ae[2876],le([1,0,25,17,23,399]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStateProfile=void 0;let k=class{constructor(I,b){this.storageService=I,this.logService=b}async getProfileContent(){const I=await this.getLocalGlobalState();return JSON.stringify(I)}async applyProfile(I){const b=JSON.parse(I);await this.writeLocalGlobalState(b)}async getLocalGlobalState(){const I={};for(const{key:b}of p.Registry.as(A.Extensions.ProfileStorageRegistry).all){const S=this.storageService.get(b,0);S&&(I[b]=S)}return{storage:I}}async writeLocalGlobalState(I){const b=Object.keys(I.storage),S=I.storage;for(const{key:r}of p.Registry.as(A.Extensions.ProfileStorageRegistry).all)b.includes(r)||(S[r]=void 0);const C=Object.keys(S);if(C.length){this.logService.trace("Profile: Updating global state...");for(const r of C)this.storageService.store(r,I.storage[r],0,0);this.logService.info("Profile: Updated global state",C)}}};k=we([F(0,R.IStorageService),F(1,t.ILogService)],k),e.GlobalStateProfile=k}),define(ae[2877],le([1,0,2059,35,5,26,66,2841,2876,135,2873,48]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataProfileImportExportService=void 0;let r=class{constructor(i,f,c,l,s){this.progressService=f,this.notificationService=c,this.userDataProfileManagementService=l,this.quickInputService=s,this.settingsProfile=i.createInstance(S.SettingsProfile),this.globalStateProfile=i.createInstance(I.GlobalStateProfile),this.extensionsProfile=i.createInstance(E.ExtensionsProfile)}async exportProfile(i){const f=await this.settingsProfile.getProfileContent(i),c=await this.globalStateProfile.getProfileContent(),l=await this.extensionsProfile.getProfileContent();return{settings:f,globalState:c,extensions:l}}async importProfile(i){const f=await this.quickInputService.input({placeHolder:(0,t.localize)(0,null),title:(0,t.localize)(1,null)});!f||(await this.progressService.withProgress({location:15,title:(0,t.localize)(2,null,b.PROFILES_CATEGORY.value)},async c=>{await this.userDataProfileManagementService.createAndEnterProfile(f),i.settings&&await this.settingsProfile.applyProfile(i.settings),i.globalState&&await this.globalStateProfile.applyProfile(i.globalState),i.extensions&&await this.extensionsProfile.applyProfile(i.extensions)}),this.notificationService.info((0,t.localize)(3,null,b.PROFILES_CATEGORY.value)))}async setProfile(i){await this.progressService.withProgress({location:15,title:(0,t.localize)(4,null,b.PROFILES_CATEGORY.value)},async f=>{i.settings&&await this.settingsProfile.applyProfile(i.settings),i.globalState&&await this.globalStateProfile.applyProfile(i.globalState),i.extensions&&await this.extensionsProfile.applyProfile(i.extensions)}),this.notificationService.info((0,t.localize)(5,null,b.PROFILES_CATEGORY.value))}};r=we([F(0,R.IInstantiationService),F(1,k.IProgressService),F(2,A.INotificationService),F(3,b.IUserDataProfileManagementService),F(4,C.IQuickInputService)],r),e.UserDataProfileImportExportService=r,(0,p.registerSingleton)(b.IUserDataProfileImportExportService,r,1)}),define(ae[2878],le([1,0,35,95,2263]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncEnablementService=void 0;class A extends R.UserDataSyncEnablementService{get workbenchEnvironmentService(){return this.environmentService}getResourceSyncStateVersion(E){return E==="extensions"?this.workbenchEnvironmentService.options?.settingsSyncOptions?.extensionsSyncStateVersion:void 0}}e.UserDataSyncEnablementService=A,(0,t.registerSingleton)(p.IUserDataSyncEnablementService,A,1)}),define(ae[276],le([1,0,5,7,2062,29,63]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYNC_CONFLICTS_VIEW_ID=e.SYNC_VIEW_CONTAINER_ID=e.SHOW_SYNC_LOG_COMMAND_ID=e.CONFIGURE_SYNC_COMMAND_ID=e.CONTEXT_HAS_CONFLICTS=e.CONTEXT_ENABLE_SYNC_CONFLICTS_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 E(b){switch(b){case"settings":return(0,R.localize)(0,null);case"keybindings":return(0,R.localize)(1,null);case"snippets":return(0,R.localize)(2,null);case"tasks":return(0,R.localize)(3,null);case"extensions":return(0,R.localize)(4,null);case"globalState":return(0,R.localize)(5,null);case"profiles":return(0,R.localize)(6,null)}}e.getSyncAreaLabel=E;var I;(function(b){b.Uninitialized="uninitialized",b.Unavailable="unavailable",b.Available="available"})(I=e.AccountStatus||(e.AccountStatus={})),e.SYNC_TITLE=(0,R.localize)(7,null),e.SYNC_VIEW_ICON=(0,k.registerIcon)("settings-sync-view-icon",A.Codicon.sync,(0,R.localize)(8,null)),e.CONTEXT_SYNC_STATE=new p.RawContextKey("syncStatus","uninitialized"),e.CONTEXT_SYNC_ENABLEMENT=new p.RawContextKey("syncEnabled",!1),e.CONTEXT_ACCOUNT_STATE=new p.RawContextKey("userDataSyncAccountStatus","uninitialized"),e.CONTEXT_ENABLE_ACTIVITY_VIEWS=new p.RawContextKey("enableSyncActivityViews",!1),e.CONTEXT_ENABLE_SYNC_CONFLICTS_VIEW=new p.RawContextKey("enableSyncConflictsView",!1),e.CONTEXT_HAS_CONFLICTS=new p.RawContextKey("hasConflicts",!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_CONFLICTS_VIEW_ID="workbench.views.sync.conflicts"}),define(ae[2879],le([1,0,10,110,90,79,182,36,11,32,298,208,21,6,88,2,14,13,9,1808,31,7,5,25,23,27,33,73,12,95,188,693,680,877,975,692,2845,269,450,58,106,463,276,340,118,176,114,39,221,65,42,2379,82,55,17,1167]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SettingsEditor2=e.createGroupIterator=e.SettingsFocusContext=void 0;var oe;(function(he){he[he.Search=0]="Search",he[he.TableOfContents=1]="TableOfContents",he[he.SettingTree=2]="SettingTree",he[he.SettingControl=3]="SettingControl"})(oe=e.SettingsFocusContext||(e.SettingsFocusContext={}));function se(he){return i.Iterable.map(he.children,pe=>({element:pe,children:pe instanceof N.SettingsTreeGroupElement?se(pe):void 0}))}e.createGroupIterator=se;const te=t.$,Z=(0,d.localize)(0,null),ne="settingsEditorState";let ce=class Zt extends T.EditorPane{static shouldSettingUpdateFast(pe){return Array.isArray(pe)?!1:pe===x.SettingValueType.Enum||pe===x.SettingValueType.Array||pe===x.SettingValueType.BooleanObject||pe===x.SettingValueType.Object||pe===x.SettingValueType.Complex||pe===x.SettingValueType.Boolean||pe===x.SettingValueType.Exclude}constructor(pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te){super(Zt.ID,pe,Ie,De),this.configurationService=me,this.preferencesService=ve,this.instantiationService=be,this.preferencesSearchService=ge,this.logService=ue,this.storageService=De,this.editorGroupService=Ae,this.userDataSyncWorkbenchService=Pe,this.userDataSyncEnablementService=fe,this.workspaceTrustManagementService=ye,this.extensionService=ke,this.languageService=Ee,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.installedExtensionIds=[],this.delayedFilterLogging=new I.Delayer(1e3),this.localSearchDelayer=new I.Delayer(300),this.remoteSearchThrottle=new I.ThrottledDelayer(200),this.viewState={settingsTarget:3},this.settingFastUpdateDelayer=new I.Delayer(Zt.SETTING_UPDATE_FAST_DEBOUNCE),this.settingSlowUpdateDelayer=new I.Delayer(Zt.SETTING_UPDATE_SLOW_DEBOUNCE),this.searchInputDelayer=new I.Delayer(Zt.SEARCH_DEBOUNCE),this.updatedConfigSchemaDelayer=new I.Delayer(Zt.CONFIG_SCHEMA_UPDATE_DELAYER),this.inSettingsEditorContextKey=B.CONTEXT_SETTINGS_EDITOR.bindTo(Ce),this.searchFocusContextKey=B.CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(Ce),this.tocRowFocused=B.CONTEXT_TOC_ROW_FOCUS.bindTo(Ce),this.settingRowFocused=B.CONTEXT_SETTINGS_ROW_FOCUS.bindTo(Ce),this.scheduledRefreshes=new Map,this.editorMemento=this.getEditorMemento(Ae,Se,ne),this._register(me.onDidChangeConfiguration(_e=>{_e.source!==7&&this.onConfigUpdate(_e.affectedKeys)})),this._register(ye.onDidChangeTrust(()=>{this.searchResultModel?.updateWorkspaceTrust(ye.isWorkspaceTrusted()),this.settingsTreeModel&&(this.settingsTreeModel.updateWorkspaceTrust(ye.isWorkspaceTrusted()),this.renderTree())})),this._register(me.onDidChangeRestrictedSettings(_e=>{_e.default.length&&this.currentSettingsModel&&this.updateElementsByKey([..._e.default])})),this.modelDisposables=this._register(new f.DisposableStore),B.ENABLE_LANGUAGE_FILTER&&!Zt.SUGGESTIONS.includes(`@${B.LANGUAGE_SETTING_TAG}`)&&Zt.SUGGESTIONS.push(`@${B.LANGUAGE_SETTING_TAG}`),Te.getInstalled().then(_e=>{this.installedExtensionIds=_e.filter(Re=>Re.manifest&&Re.manifest.contributes&&Re.manifest.contributes.configuration).map(Re=>Re.identifier.id)})}get minimumWidth(){return Zt.EDITOR_MIN_WIDTH}get maximumWidth(){return Number.POSITIVE_INFINITY}set minimumWidth(pe){}set maximumWidth(pe){}get currentSettingsModel(){return this.searchResultModel||this.settingsTreeModel}get searchResultModel(){return this._searchResultModel}set searchResultModel(pe){this._searchResultModel=pe,this.rootElement.classList.toggle("search-mode",!!this._searchResultModel)}get focusedSettingDOMElement(){const pe=this.settingsTree.getFocus()[0];if(pe instanceof N.SettingsTreeSettingElement)return this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(),pe.setting.key)[0]}get currentFocusContext(){return this._currentFocusContext}createEditor(pe){pe.setAttribute("tabindex","-1"),this.rootElement=t.append(pe,te(".settings-editor",{tabindex:"-1"})),this.createHeader(this.rootElement),this.createBody(this.rootElement),this.addCtrlAInterceptor(this.rootElement),this.updateStyles()}async setInput(pe,me,Se,Ie){if(this.inSettingsEditorContextKey.set(!0),await super.setInput(pe,me,Se,Ie),await(0,I.timeout)(0),!this.input)return;const ve=await this.input.resolve();if(!(Ie.isCancellationRequested||!(ve instanceof H.Settings2EditorModel))){if(this.modelDisposables.clear(),this.modelDisposables.add(ve.onDidChangeGroups(()=>{this.updatedConfigSchemaDelayer.trigger(()=>{this.onConfigUpdate(void 0,!1,!0)})})),this.defaultSettingsEditorModel=ve,me=me||(0,x.validateSettingsEditorOptions)({}),!this.viewState.settingsTarget||!this.settingsTargetsWidget.settingsTarget){const be=me.viewState&&me.viewState.settingsTarget;!me.target&&!be&&(me.target=3)}this._setOptions(me),this.onConfigUpdate(void 0,!0).then(()=>{this._register(pe.onWillDispose(()=>{this.searchWidget.setValue("")})),this.updateTreeScrollSync()})}}restoreCachedState(){const pe=this.group&&this.input&&this.editorMemento.loadEditorState(this.group,this.input);if(pe&&typeof pe.target=="object"&&(pe.target=s.URI.revive(pe.target)),pe){const me=pe.target;this.settingsTargetsWidget.settingsTarget=me,this.viewState.settingsTarget=me,this.searchWidget.setValue(pe.searchQuery)}return this.input&&this.editorMemento.clearEditorState(this.input,this.group),(0,l.withUndefinedAsNull)(pe)}getViewState(){return this.viewState}setOptions(pe){super.setOptions(pe),pe&&this._setOptions(pe)}_setOptions(pe){pe.focusSearch&&!c.isIOS&&this.focusSearch();const me=pe.viewState?pe.viewState:void 0,Se=me?.query??pe.query;Se!==void 0&&(this.searchWidget.setValue(Se),this.viewState.query=Se);const Ie=pe.folderUri??me?.settingsTarget??pe.target;Ie&&(this.settingsTargetsWidget.settingsTarget=Ie,this.viewState.settingsTarget=Ie)}clearInput(){this.inSettingsEditorContextKey.set(!1),super.clearInput()}layout(pe){if(this.dimension=pe,!this.isVisible())return;this.layoutSplitView(pe);const Se=Math.min(1e3,pe.width)-24*2-10-this.countElement.clientWidth-this.controlsElement.clientWidth-12;this.searchWidget.layout(new t.Dimension(Se,20)),this.rootElement.classList.toggle("mid-width",pe.width<Zt.MEDIUM_TOTAL_WIDTH&&pe.width>=Zt.NARROW_TOTAL_WIDTH),this.rootElement.classList.toggle("narrow-width",pe.width<Zt.NARROW_TOTAL_WIDTH)}focus(){if(this._currentFocusContext===0)c.isIOS||this.focusSearch();else if(this._currentFocusContext===3){const pe=this.focusedSettingDOMElement;if(pe){const me=pe.querySelector(O.AbstractSettingRenderer.CONTROL_SELECTOR);if(me){me.focus();return}}}else this._currentFocusContext===2?this.settingsTree.domFocus():this._currentFocusContext===1&&this.tocTree.domFocus()}setEditorVisible(pe,me){super.setEditorVisible(pe,me),pe||setTimeout(()=>{this.searchWidget.onHide()},0)}focusSettings(pe=!1){if(this.settingsTree.getFocus().length||this.settingsTree.focusFirst(),this.settingsTree.domFocus(),pe){const Se=this.settingsTree.getHTMLElement().querySelector(`.focused ${O.AbstractSettingRenderer.CONTROL_SELECTOR}`);Se&&Se.focus()}}focusTOC(){this.tocTree.domFocus()}showContextMenu(){const pe=this.settingsTree.getFocus()[0],me=this.focusedSettingDOMElement;me&&pe instanceof N.SettingsTreeSettingElement&&this.settingRenderers.showContextMenu(pe,me)}focusSearch(pe,me=!0){pe&&this.searchWidget&&this.searchWidget.setValue(pe),this.searchWidget.focus(me)}clearSearchResults(){this.searchWidget.setValue(""),this.focusSearch()}clearSearchFilters(){const me=this.searchWidget.getValue().split(" ").filter(Se=>Se.length&&!Zt.SUGGESTIONS.some(Ie=>Se.startsWith(Ie)));this.searchWidget.setValue(me.join(" "))}updateInputAriaLabel(){let pe=Z;this.searchResultLabel&&(pe+=`. ${this.searchResultLabel}`),this.lastSyncedLabel&&(pe+=`. ${this.lastSyncedLabel}`),this.searchWidget.updateAriaLabel(pe)}createHeader(pe){this.headerContainer=t.append(pe,te(".settings-header"));const me=t.append(this.headerContainer,te(".search-container")),Se=new E.Action(B.SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,(0,d.localize)(1,null),D.ThemeIcon.asClassName(U.preferencesClearInputIcon),!1,async()=>this.clearSearchResults()),Ie=new E.Action(B.SETTINGS_EDITOR_COMMAND_SUGGEST_FILTERS,(0,d.localize)(2,null),D.ThemeIcon.asClassName(U.preferencesFilterIcon));this.searchWidget=this._register(this.instantiationService.createInstance(_.SuggestEnabledInput,`${Zt.ID}.searchbox`,me,{triggerCharacters:["@",":"],provideResults:ue=>{const Ce=ue.split(/\s/g);return Ce[Ce.length-1].startsWith(`@${B.LANGUAGE_SETTING_TAG}`)?this.languageService.getRegisteredLanguageIds().map(Ae=>`@${B.LANGUAGE_SETTING_TAG}${Ae} `).sort().filter(Ae=>!ue.includes(Ae)):Ce[Ce.length-1].startsWith(`@${B.EXTENSION_SETTING_TAG}`)?this.installedExtensionIds.map(Ae=>`@${B.EXTENSION_SETTING_TAG}${Ae} `).sort().filter(Ae=>!ue.includes(Ae)):Ce[Ce.length-1].startsWith("@")?Zt.SUGGESTIONS.filter(De=>!ue.includes(De)).map(De=>De.endsWith(":")?De:De+" "):[]}},Z,"settingseditor:searchinput"+Zt.NUM_INSTANCES++,{placeholderText:Z,focusContextKey:this.searchFocusContextKey})),this._register(this.searchWidget.onDidFocus(()=>{this._currentFocusContext=0})),this._register((0,_.attachSuggestEnabledInputBoxStyler)(this.searchWidget,this.themeService,{inputBorder:V.settingsTextInputBorder})),this.countElement=t.append(me,t.$(".settings-count-widget.monaco-count-badge.long")),this._register((0,w.attachStylerCallback)(this.themeService,{badgeBackground:m.badgeBackground,contrastBorder:m.contrastBorder,badgeForeground:m.badgeForeground},ue=>{const Ce=ue.badgeBackground?ue.badgeBackground.toString():"",De=ue.contrastBorder?ue.contrastBorder.toString():"",Ae=ue.badgeForeground?ue.badgeForeground.toString():"";this.countElement.style.backgroundColor=Ce,this.countElement.style.color=Ae,this.countElement.style.borderWidth=De?"1px":"",this.countElement.style.borderStyle=De?"solid":"",this.countElement.style.borderColor=De})),this._register(this.searchWidget.onInputDidChange(()=>{const ue=this.searchWidget.getValue();Se.enabled=!!ue,this.searchInputDelayer.trigger(()=>this.onSearchInputChanged())}));const ve=t.append(this.headerContainer,te(".settings-header-controls"));this._register((0,w.attachStylerCallback)(this.themeService,{settingsHeaderBorder:V.settingsHeaderBorder},ue=>{const Ce=ue.settingsHeaderBorder?ue.settingsHeaderBorder.toString():"";ve.style.borderColor=Ce}));const be=t.append(ve,te(".settings-target-container"));if(this.settingsTargetsWidget=this._register(this.instantiationService.createInstance(L.SettingsTargetsWidget,be,{enableRemoteSettings:!0})),this.settingsTargetsWidget.settingsTarget=3,this.settingsTargetsWidget.onDidTargetChange(ue=>this.onDidSettingsTargetChange(ue)),this._register(t.addDisposableListener(be,t.EventType.KEY_DOWN,ue=>{new R.StandardKeyboardEvent(ue).keyCode===18&&this.focusSettings()})),this.userDataSyncWorkbenchService.enabled&&this.userDataSyncEnablementService.canToggleEnablement()){const ue=this._register(this.instantiationService.createInstance(de,ve));this._register(ue.onDidChangeLastSyncedLabel(Ce=>{this.lastSyncedLabel=Ce,this.updateInputAriaLabel()}))}this.controlsElement=t.append(me,t.$(".settings-clear-widget")),this._register(new A.ActionBar(this.controlsElement,{animated:!1,actionViewItemProvider:ue=>{if(ue.id===Ie.id)return this.instantiationService.createInstance(Y.SettingsSearchFilterDropdownMenuActionViewItem,ue,this.actionRunner,this.searchWidget)}})).push([Se,Ie],{label:!1,icon:!0})}onDidSettingsTargetChange(pe){this.viewState.settingsTarget=pe,this.onConfigUpdate(void 0,!0)}onDidClickSetting(pe,me){const Se=this.currentSettingsModel.getElementsByName(pe.targetKey)?.[0];let Ie=!1;if(Se){let ve=.5;try{const be=this.settingsTree.getRelativeTop(pe.source);be!==null&&(ve=be)}catch{}this.viewState.filterToCategory&&pe.source.displayCategory!==Se.displayCategory&&this.tocTree.setFocus([]);try{this.settingsTree.reveal(Se,ve)}catch{Ie=!0}if(!Ie){setTimeout(()=>{this.settingsTree.setFocus([Se])},50);const be=this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(),pe.targetKey);if(be&&be[0]){const ge=be[0].querySelector(O.AbstractSettingRenderer.CONTROL_SELECTOR);ge&&ge.focus()}}}!me&&(!Se||Ie)&&this.triggerSearch("").then(()=>{this.searchWidget.setValue(""),this.onDidClickSetting(pe,!0)})}switchToApplicationSettingsFile(){const pe=(0,N.parseQuery)(this.searchWidget.getValue()).query;return this.openSettingsFile({query:pe},!0)}switchToSettingsFile(){const pe=(0,N.parseQuery)(this.searchWidget.getValue()).query;return this.openSettingsFile({query:pe})}async openSettingsFile(pe,me){const Se=this.settingsTargetsWidget.settingsTarget,Ie={jsonEditor:!0,...pe};if(Se===3)return pe?.revealSetting&&re.Registry.as(ie.Extensions.Configuration).getConfigurationProperties()[pe?.revealSetting.key]?.scope===1?this.preferencesService.openApplicationSettings(Ie):me?this.preferencesService.openApplicationSettings(Ie):this.preferencesService.openUserSettings(Ie);if(Se===4)return this.preferencesService.openRemoteSettings(Ie);if(Se===5)return this.preferencesService.openWorkspaceSettings(Ie);if(s.URI.isUri(Se))return this.preferencesService.openFolderSettings({folderUri:Se,...Ie})}createBody(pe){this.bodyContainer=t.append(pe,te(".settings-body")),this.noResultsMessage=t.append(this.bodyContainer,te(".no-results-message")),this.noResultsMessage.innerText=(0,d.localize)(3,null),this.clearFilterLinkContainer=te("span.clear-search-filters"),this.clearFilterLinkContainer.textContent=" - ";const me=t.append(this.clearFilterLinkContainer,te("a.pointer.prominent",{tabindex:0},(0,d.localize)(4,null)));this._register(t.addDisposableListener(me,t.EventType.CLICK,ve=>{t.EventHelper.stop(ve,!1),this.clearSearchFilters()})),t.append(this.noResultsMessage,this.clearFilterLinkContainer),this._register((0,w.attachStylerCallback)(this.themeService,{editorForeground:m.editorForeground},ve=>{this.noResultsMessage.style.color=ve.editorForeground?ve.editorForeground.toString():""})),this.tocTreeContainer=te(".settings-toc-container"),this.settingsTreeContainer=te(".settings-tree-container"),this.createTOC(this.tocTreeContainer),this.createSettingsTree(this.settingsTreeContainer),this.splitView=new Q.SplitView(this.bodyContainer,{orientation:1,proportionalLayout:!0});const Se=this.storageService.getNumber("settingsEditor2.splitViewWidth",0,Zt.TOC_RESET_WIDTH);this.splitView.addView({onDidChange:u.Event.None,element:this.tocTreeContainer,minimumSize:Zt.TOC_MIN_WIDTH,maximumSize:Number.POSITIVE_INFINITY,layout:(ve,be,ge)=>{this.tocTreeContainer.style.width=`${ve}px`,this.tocTree.layout(ge,ve)}},Se,void 0,!0),this.splitView.addView({onDidChange:u.Event.None,element:this.settingsTreeContainer,minimumSize:Zt.EDITOR_MIN_WIDTH,maximumSize:Number.POSITIVE_INFINITY,layout:(ve,be,ge)=>{this.settingsTreeContainer.style.width=`${ve}px`,this.settingsTree.layout(ge,ve)}},Q.Sizing.Distribute,void 0,!0),this._register(this.splitView.onDidSashReset(()=>{const ve=this.splitView.getViewSize(0)+this.splitView.getViewSize(1);this.splitView.resizeView(0,Zt.TOC_RESET_WIDTH),this.splitView.resizeView(1,ve-Zt.TOC_RESET_WIDTH)})),this._register(this.splitView.onDidSashChange(()=>{const ve=this.splitView.getViewSize(0);this.storageService.store("settingsEditor2.splitViewWidth",ve,0,0)}));const Ie=this.theme.getColor(V.settingsSashBorder);this.splitView.style({separatorBorder:Ie})}addCtrlAInterceptor(pe){this._register(t.addStandardDisposableListener(pe,t.EventType.KEY_DOWN,me=>{me.keyCode===31&&(c.isMacintosh?me.metaKey:me.ctrlKey)&&me.target.tagName!=="TEXTAREA"&&me.target.tagName!=="INPUT"&&(me.browserEvent.stopPropagation(),me.browserEvent.preventDefault())}))}createTOC(pe){this.tocTreeModel=this.instantiationService.createInstance(P.TOCTreeModel,this.viewState),this.tocTree=this._register(this.instantiationService.createInstance(P.TOCTree,t.append(pe,te(".settings-toc-wrapper",{role:"navigation","aria-label":(0,d.localize)(5,null)})),this.viewState)),this._register(this.tocTree.onDidFocus(()=>{this._currentFocusContext=1})),this._register(this.tocTree.onDidChangeFocus(me=>{const Se=(0,l.withUndefinedAsNull)(me.elements?.[0]);this.tocFocusedElement!==Se&&(this.tocFocusedElement=Se,this.tocTree.setSelection(Se?[Se]:[]),this.searchResultModel?this.viewState.filterToCategory!==Se&&(this.viewState.filterToCategory=(0,l.withNullAsUndefined)(Se),this.renderTree(void 0,!0),this.settingsTree.scrollTop=0):Se&&(!me.browserEvent||!me.browserEvent.fromScroll)&&(this.settingsTree.reveal(Se,0),this.settingsTree.setFocus([Se])))})),this._register(this.tocTree.onDidFocus(()=>{this.tocRowFocused.set(!0)})),this._register(this.tocTree.onDidBlur(()=>{this.tocRowFocused.set(!1)}))}applyFilter(pe){if(this.searchWidget&&!this.searchWidget.getValue().includes(pe)){const me=`${pe} ${this.searchWidget.getValue().trimStart()}`;this.focusSearch(me,!1)}}removeLanguageFilters(){if(this.searchWidget&&this.searchWidget.getValue().includes(`@${B.LANGUAGE_SETTING_TAG}`)){const me=this.searchWidget.getValue().split(" ").filter(Se=>!Se.startsWith(`@${B.LANGUAGE_SETTING_TAG}`)).join(" ");this.focusSearch(me,!1)}}createSettingsTree(pe){this.settingRenderers=this.instantiationService.createInstance(O.SettingTreeRenderers),this._register(this.settingRenderers.onDidChangeSetting(me=>this.onDidChangeSetting(me.key,me.value,me.type,me.manualReset,me.scope))),this._register(this.settingRenderers.onDidOpenSettings(me=>{this.openSettingsFile({revealSetting:{key:me,edit:!0}})})),this._register(this.settingRenderers.onDidClickSettingLink(me=>this.onDidClickSetting(me))),this._register(this.settingRenderers.onDidFocusSetting(me=>{this.settingsTree.setFocus([me]),this._currentFocusContext=3,this.settingRowFocused.set(!1)})),this._register(this.settingRenderers.onDidChangeSettingHeight(me=>{const{element:Se,height:Ie}=me;try{this.settingsTree.updateElementHeight(Se,Ie)}catch{}})),this._register(this.settingRenderers.onApplyFilter(me=>this.applyFilter(me))),this._register(this.settingRenderers.onDidClickOverrideElement(me=>{this.removeLanguageFilters(),me.language&&this.applyFilter(`@${B.LANGUAGE_SETTING_TAG}${me.language}`),me.scope==="workspace"?this.settingsTargetsWidget.updateTarget(5):me.scope==="user"?this.settingsTargetsWidget.updateTarget(3):me.scope==="remote"&&this.settingsTargetsWidget.updateTarget(4),this.applyFilter(`@${B.ID_SETTING_TAG}${me.settingKey}`)})),this.settingsTree=this._register(this.instantiationService.createInstance(O.SettingsTree,pe,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(()=>{const me=document.activeElement?.classList;me&&me.contains("monaco-list")&&me.contains("settings-editor-tree")&&(this._currentFocusContext=2,this.settingRowFocused.set(!0))})),this._register(this.settingsTree.onDidBlur(()=>{this.settingRowFocused.set(!1)})),this._register(this.settingsTree.onDidChangeFocus(me=>{const Se=me.elements[0];this.treeFocusedElement!==Se&&(this.treeFocusedElement&&(this.treeFocusedElement.tabbable=!1),this.treeFocusedElement=Se,this.treeFocusedElement&&(this.treeFocusedElement.tabbable=!0),this.settingsTree.setSelection(Se?[Se]:[]))}))}onDidChangeSetting(pe,me,Se,Ie,ve){const ge=(0,N.parseQuery)(this.searchWidget.getValue()).languageFilter;this.pendingSettingUpdate&&this.pendingSettingUpdate.key!==pe&&this.updateChangedSetting(pe,me,Ie,ge,ve),this.pendingSettingUpdate={key:pe,value:me,languageFilter:ge},Zt.shouldSettingUpdateFast(Se)?this.settingFastUpdateDelayer.trigger(()=>this.updateChangedSetting(pe,me,Ie,ge,ve)):this.settingSlowUpdateDelayer.trigger(()=>this.updateChangedSetting(pe,me,Ie,ge,ve))}updateTreeScrollSync(){if(this.settingRenderers.cancelSuggesters(),this.searchResultModel||!this.tocTreeModel)return;const pe=this.settingsTree.firstVisibleElement,me=pe instanceof N.SettingsTreeSettingElement?pe.parent:pe instanceof N.SettingsTreeGroupElement?pe:null;let Se=!0;try{this.tocTree.getNode(me)}catch{Se=!1}if(!!Se&&me&&this.tocTree.getSelection()[0]!==me){const Ie=this.getAncestors(me);Ie.forEach(ge=>this.tocTree.expand(ge)),this.tocTree.reveal(me);const ve=this.tocTree.getRelativeTop(me);if(typeof ve!="number")return;this.tocTree.collapseAll(),Ie.forEach(ge=>this.tocTree.expand(ge)),ve<0||ve>1?this.tocTree.reveal(me):this.tocTree.reveal(me,ve),this.tocTree.expand(me),this.tocTree.setSelection([me]);const be=new KeyboardEvent("keydown");be.fromScroll=!0,this.tocTree.setFocus([me],be)}}getAncestors(pe){const me=[];for(;pe.parent;)pe.parent.id!=="root"&&me.push(pe.parent),pe=pe.parent;return me.reverse()}updateChangedSetting(pe,me,Se,Ie,ve){const be=this.settingsTargetsWidget.settingsTarget,ge=s.URI.isUri(be)?be:void 0,ue=(ge?6:be)??3,Ce={resource:ge,overrideIdentifiers:Ie?[Ie]:void 0},Ae=ue===5||ue===6||!!Ie,Pe=Ae?Se:me===void 0,fe=this.configurationService.inspect(pe,Ce);return!Ae&&fe.defaultValue===me&&(me=void 0),this.configurationService.updateValue(pe,me,Ce,ue).then(()=>{const ye=this.searchWidget.getValue();ye.includes(`@${B.MODIFIED_SETTING_TAG}`)&&this.refreshTOCTree(),this.renderTree(pe,Pe);const ke={key:pe,query:ye,searchResults:this.searchResultModel&&this.searchResultModel.getUniqueResults(),rawResults:this.searchResultModel&&this.searchResultModel.getRawResults(),showConfiguredOnly:!!this.viewState.tagFilters&&this.viewState.tagFilters.has(B.MODIFIED_SETTING_TAG),isReset:typeof me>"u",settingsTarget:this.settingsTargetsWidget.settingsTarget};return this.reportModifiedSetting(ke)})}reportModifiedSetting(pe){this.pendingSettingUpdate=null;let me,Se,Ie;if(pe.searchResults){const ge=pe.searchResults[1],ue=pe.searchResults[0],Ce=ue.filterMatches.findIndex(De=>De.setting.key===pe.key);if(me=Ce>=0?"local":"remote",Ie=Ce>=0?Ce:ge&&ge.filterMatches.findIndex(De=>De.setting.key===pe.key)+ue.filterMatches.length,this.searchResultModel){const De=this.searchResultModel.getRawResults();if(De[1]){const Ae=De[1].filterMatches.findIndex(Pe=>Pe.setting.key===pe.key);Se=Ae>=0?Ae:void 0}}}const ve=pe.settingsTarget===3?"user":pe.settingsTarget===4?"user_remote":pe.settingsTarget===5?"workspace":"folder",be={key:pe.key,groupId:me,nlpIndex:Se,displayIndex:Ie,showConfiguredOnly:pe.showConfiguredOnly,isReset:pe.isReset,target:ve};this.telemetryService.publicLog2("settingsEditor.settingModified",be)}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(pe,me=""){if(me&&this.scheduledRefreshes.has(me))return;me||((0,f.dispose)(this.scheduledRefreshes.values()),this.scheduledRefreshes.clear());const Se=t.trackFocus(pe);this.scheduledRefreshes.set(me,Se),Se.onDidBlur(()=>{Se.dispose(),this.scheduledRefreshes.delete(me),this.onConfigUpdate([me])})}async onConfigUpdate(pe,me=!1,Se=!1){if(pe&&this.settingsTreeModel)return this.updateElementsByKey(pe);const Ie=this.defaultSettingsEditorModel.settingsGroups.slice(1),ve=S.groupBy(Ie,Ce=>Ce.extensionInfo?"extension":"core"),be=(0,O.resolveSettingsTree)(M.tocData,ve.core,this.logService),ge=be.tree;if(be.leftoverSettings.size&&!this.hasWarnedMissingSettings){const Ce=[];be.leftoverSettings.forEach(De=>{Ce.push(De.key)}),this.logService.warn(`SettingsEditor2: Settings not included in settingsLayout.ts: ${Ce.join(", ")}`),this.hasWarnedMissingSettings=!0}const ue=(0,O.resolveSettingsTree)(M.commonlyUsedData,ve.core,this.logService);if(ge.children.unshift(ue.tree),ge.children.push(await(0,O.createTocTreeForExtensionSettings)(this.extensionService,ve.extension||[])),!this.workspaceTrustManagementService.isWorkspaceTrusted()&&(this.viewState.settingsTarget instanceof s.URI||this.viewState.settingsTarget===5)){const Ce=(0,O.resolveConfiguredUntrustedSettings)(Ie,this.viewState.settingsTarget,this.viewState.languageFilter,this.configurationService);Ce.length&&ge.children.unshift({id:"workspaceTrust",label:(0,d.localize)(6,null),settings:Ce})}if(this.searchResultModel?.updateChildren(),this.settingsTreeModel){if(this.settingsTreeModel.update(ge),Se&&!!this.searchResultModel)return await this.onSearchInputChanged();this.refreshTOCTree(),this.renderTree(void 0,me)}else this.settingsTreeModel=this.instantiationService.createInstance(N.SettingsTreeModel,this.viewState,this.workspaceTrustManagementService.isWorkspaceTrusted()),this.settingsTreeModel.update(ge),this.tocTreeModel.settingsTreeRoot=this.settingsTreeModel.root,(this.viewState.query?void 0:this.restoreCachedState())?.searchQuery||this.searchWidget.getValue()?await this.onSearchInputChanged():(this.refreshTOCTree(),this.refreshTree(),this.tocTree.collapseAll())}updateElementsByKey(pe){if(pe.length)this.searchResultModel&&pe.forEach(me=>this.searchResultModel.updateElementsByName(me)),this.settingsTreeModel&&pe.forEach(me=>this.settingsTreeModel.updateElementsByName(me)),pe.forEach(me=>this.renderTree(me));else return this.renderTree()}getActiveControlInSettingsTree(){return document.activeElement&&t.isAncestor(document.activeElement,this.settingsTree.getHTMLElement())?document.activeElement:null}renderTree(pe,me=!1){if(!me&&pe&&this.scheduledRefreshes.has(pe)){this.updateModifiedLabelForKey(pe);return}if(this.contextViewFocused()){const ve=document.querySelector(".context-view");ve&&this.scheduleRefresh(ve,pe);return}const Se=this.getActiveControlInSettingsTree(),Ie=Se&&this.settingRenderers.getSettingDOMElementForDOMElement(Se);if(Ie&&!me)if(pe){if(Ie.getAttribute(O.AbstractSettingRenderer.SETTING_KEY_ATTR)===pe&&Ie.parentElement&&!Ie.parentElement.classList.contains("setting-item-list")){this.updateModifiedLabelForKey(pe),this.scheduleRefresh(Ie,pe);return}}else{this.scheduleRefresh(Ie);return}if(this.renderResultCountMessages(),pe){const ve=this.currentSettingsModel.getElementsByName(pe);if(ve&&ve.length)this.refreshTree();else return}else this.refreshTree()}contextViewFocused(){return!!t.findParentWithClass(document.activeElement,"context-view")}refreshTree(){this.isVisible()&&this.settingsTree.setChildren(null,se(this.currentSettingsModel.root))}refreshTOCTree(){this.isVisible()&&(this.tocTreeModel.update(),this.tocTree.setChildren(null,(0,P.createTOCIterator)(this.tocTreeModel,this.tocTree)))}updateModifiedLabelForKey(pe){const me=this.currentSettingsModel.getElementsByName(pe),Se=me&&me[0]&&me[0].isConfigured,Ie=this.settingRenderers.getDOMElementsForSettingKey(this.settingsTree.getHTMLElement(),pe);Ie&&Ie[0]&&Ie[0].classList.toggle("is-configured",!!Se)}async onSearchInputChanged(){if(!this.currentSettingsModel)return;const pe=this.searchWidget.getValue().trim();this.viewState.query=pe,this.delayedFilterLogging.cancel(),await this.triggerSearch(pe.replace(/\u203A/g," ")),pe&&this.searchResultModel&&this.delayedFilterLogging.trigger(()=>this.reportFilteringUsed(this.searchResultModel.getUniqueResults()))}parseSettingFromJSON(pe){const me=pe.match(/"([a-zA-Z.]+)": /);return me&&me[1]}triggerSearch(pe){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,pe){const me=(0,N.parseQuery)(pe);pe=me.query,me.tags.forEach(Se=>this.viewState.tagFilters.add(Se)),me.extensionFilters.forEach(Se=>this.viewState.extensionFilters.add(Se)),me.featureFilters.forEach(Se=>this.viewState.featureFilters.add(Se)),me.idFilters.forEach(Se=>this.viewState.idFilters.add(Se)),this.viewState.languageFilter=me.languageFilter}return this.settingsTargetsWidget.updateLanguageFilterIndicators(this.viewState.languageFilter),pe&&pe!=="@"?(pe=this.parseSettingFromJSON(pe)||pe,this.triggerFilterPreferences(pe)):(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 pe=this.instantiationService.createInstance(N.SearchResultModel,this.viewState,this.workspaceTrustManagementService.isWorkspaceTrusted()),me={filterMatches:[]};for(const Se of this.defaultSettingsEditorModel.settingsGroups.slice(1))for(const Ie of Se.sections)for(const ve of Ie.settings)me.filterMatches.push({setting:ve,matches:[],matchType:x.SettingMatchType.None,score:0});return pe.setResult(0,me),pe}reportFilteringUsed(pe){const me=pe[1],Se=me?.metadata,Ie={nlpResult:Se?.duration},ve={},be=pe[0];be&&(ve.filterResult=be.filterMatches.length),me&&(ve.nlpResult=me.filterMatches.length);const ge=Se?.requestCount,ue={"durations.nlpResult":Ie.nlpResult,"counts.nlpResult":ve.nlpResult,"counts.filterResult":ve.filterResult,requestCount:ge};this.telemetryService.publicLog2("settingsEditor.filter",ue)}triggerFilterPreferences(pe){this.searchInProgress&&(this.searchInProgress.cancel(),this.searchInProgress=null);const me=this.searchInProgress=new b.CancellationTokenSource;return this.localSearchDelayer.trigger(()=>me&&!me.token.isCancellationRequested?this.localFilterPreferences(pe).then(Se=>{Se&&!Se.exactMatch&&this.remoteSearchThrottle.trigger(()=>me&&!me.token.isCancellationRequested?this.remoteSearchPreferences(pe,this.searchInProgress.token):Promise.resolve())}):Promise.resolve())}localFilterPreferences(pe,me){const Se=this.preferencesSearchService.getLocalSearchProvider(pe);return this.filterOrSearchPreferences(pe,0,Se,me)}remoteSearchPreferences(pe,me){const Se=this.preferencesSearchService.getRemoteSearchProvider(pe),Ie=this.preferencesSearchService.getRemoteSearchProvider(pe,!0);return Promise.all([this.filterOrSearchPreferences(pe,1,Se,me),this.filterOrSearchPreferences(pe,2,Ie,me)]).then(()=>{})}filterOrSearchPreferences(pe,me,Se,Ie){return this._filterOrSearchPreferencesModel(pe,this.defaultSettingsEditorModel,Se,Ie).then(ve=>Ie&&Ie.isCancellationRequested?null:(this.searchResultModel?(this.searchResultModel.setResult(me,ve),this.tocTreeModel.update()):(this.searchResultModel=this.instantiationService.createInstance(N.SearchResultModel,this.viewState,this.workspaceTrustManagementService.isWorkspaceTrusted()),this.searchResultModel.setResult(me,ve),this.tocTreeModel.currentSearchModel=this.searchResultModel,this.onSearchModeToggled()),me===0&&(this.tocTree.setFocus([]),this.viewState.filterToCategory=void 0,this.tocTree.expandAll()),this.settingsTree.scrollTop=0,this.refreshTOCTree(),this.renderTree(void 0,!0),ve))}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 pe=this.tocTreeModel.settingsTreeRoot.count;let me;switch(pe){case 0:me=(0,d.localize)(7,null);break;case 1:me=(0,d.localize)(8,null);break;default:me=(0,d.localize)(9,null,pe)}this.searchResultLabel=me,this.updateInputAriaLabel(),this.countElement.innerText=me,p.status(me),this.countElement.style.display!=="block"&&(this.countElement.style.display="block",this.layout(this.dimension)),this.rootElement.classList.toggle("no-results",pe===0),this.splitView.el.style.visibility=pe===0?"hidden":"visible"}}}_filterOrSearchPreferencesModel(pe,me,Se,Ie){return(Se?Se.searchModel(me,Ie):Promise.resolve(null)).then(void 0,be=>{if((0,r.isCancellationError)(be))return Promise.reject(be);{const ge=(0,r.getErrorMessage)(be).trim();return ge&&ge!=="Error"&&(this.telemetryService.publicLogError2("settingsEditor.searchError",{message:ge}),this.logService.info("Setting search error: "+ge)),null}})}layoutSplitView(pe){const me=pe.height-97;this.splitView.el.style.height=`${me}px`,this.splitView.layout(this.bodyContainer.clientWidth,me);const Se=this.splitView.isViewVisible(0),Ie=this.bodyContainer.clientWidth>=Zt.NARROW_TOTAL_WIDTH;this.splitView.setViewVisible(0,Ie),!Se&&Ie&&this.bodyContainer.clientWidth>=Zt.EDITOR_MIN_WIDTH+Zt.TOC_RESET_WIDTH&&this.splitView.resizeView(0,Zt.TOC_RESET_WIDTH),this.splitView.style({separatorBorder:Ie?this.theme.getColor(V.settingsSashBorder)??j.Color.transparent:j.Color.transparent})}saveState(){if(this.isVisible()){const pe=this.searchWidget.getValue().trim(),me=this.settingsTargetsWidget.settingsTarget;this.group&&this.input&&this.editorMemento.saveEditorState(this.group,this.input,{searchQuery:pe,target:me})}else this.group&&this.input&&this.editorMemento.clearEditorState(this.input,this.group);super.saveState()}};ce.ID="workbench.editor.settings2",ce.NUM_INSTANCES=0,ce.SEARCH_DEBOUNCE=200,ce.SETTING_UPDATE_FAST_DEBOUNCE=200,ce.SETTING_UPDATE_SLOW_DEBOUNCE=1e3,ce.CONFIG_SCHEMA_UPDATE_DELAYER=500,ce.TOC_MIN_WIDTH=100,ce.TOC_RESET_WIDTH=200,ce.EDITOR_MIN_WIDTH=500,ce.NARROW_TOTAL_WIDTH=ce.TOC_RESET_WIDTH+ce.EDITOR_MIN_WIDTH,ce.MEDIUM_TOTAL_WIDTH=1e3,ce.SUGGESTIONS=[`@${B.MODIFIED_SETTING_TAG}`,"@tag:notebookLayout",`@tag:${B.REQUIRE_TRUSTED_WORKSPACE_SETTING_TAG}`,`@tag:${B.WORKSPACE_TRUST_SETTING_TAG}`,"@tag:sync","@tag:usesOnlineServices","@tag:telemetry","@tag:accessibility",`@${B.ID_SETTING_TAG}`,`@${B.EXTENSION_SETTING_TAG}`,`@${B.FEATURE_SETTING_TAG}scm`,`@${B.FEATURE_SETTING_TAG}explorer`,`@${B.FEATURE_SETTING_TAG}search`,`@${B.FEATURE_SETTING_TAG}debug`,`@${B.FEATURE_SETTING_TAG}extensions`,`@${B.FEATURE_SETTING_TAG}terminal`,`@${B.FEATURE_SETTING_TAG}task`,`@${B.FEATURE_SETTING_TAG}problems`,`@${B.FEATURE_SETTING_TAG}output`,`@${B.FEATURE_SETTING_TAG}comments`,`@${B.FEATURE_SETTING_TAG}remote`,`@${B.FEATURE_SETTING_TAG}timeline`,`@${B.FEATURE_SETTING_TAG}notebook`,`@${B.POLICY_SETTING_TAG}`],ce=we([F(0,v.ITelemetryService),F(1,q.IWorkbenchConfigurationService),F(2,X.ITextResourceConfigurationService),F(3,D.IThemeService),F(4,x.IPreferencesService),F(5,o.IInstantiationService),F(6,B.IPreferencesSearchService),F(7,g.ILogService),F(8,a.IContextKeyService),F(9,h.IStorageService),F(10,z.IEditorGroupsService),F(11,W.IUserDataSyncWorkbenchService),F(12,y.IUserDataSyncEnablementService),F(13,$.IWorkspaceTrustManagementService),F(14,G.IExtensionService),F(15,K.ILanguageService),F(16,ee.IExtensionManagementService)],ce),e.SettingsEditor2=ce;let de=class extends f.Disposable{constructor(pe,me,Se,Ie,ve){super(),this.commandService=me,this.userDataSyncService=Se,this.userDataSyncEnablementService=Ie,this._onDidChangeLastSyncedLabel=this._register(new u.Emitter),this.onDidChangeLastSyncedLabel=this._onDidChangeLastSyncedLabel.event;const be=t.append(pe,te(".settings-right-controls")),ge=t.append(be,te(".turn-on-sync"));this.turnOnSyncButton=this._register(new k.Button(ge,{title:!0})),this._register((0,w.attachButtonStyler)(this.turnOnSyncButton,ve)),this.lastSyncedLabel=t.append(be,te(".last-synced-label")),t.hide(this.lastSyncedLabel),this.turnOnSyncButton.enabled=!0,this.turnOnSyncButton.label=(0,d.localize)(10,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 pe=this.userDataSyncService.lastSyncTime;let me;if(typeof pe=="number"){const Se=(0,C.fromNow)(pe,!0);me=(0,d.localize)(11,null,Se)}else me="";this.lastSyncedLabel.textContent=me,this._onDidChangeLastSyncedLabel.fire(me)}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)))}};de=we([F(1,n.ICommandService),F(2,y.IUserDataSyncService),F(3,y.IUserDataSyncEnablementService),F(4,D.IThemeService)],de)}),define(ae[2880],le([1,0,1944,68,36,2,9,190,5,41,23,283,26,47,248,2636,14,8,7,15,31,74,46,95,141,11,276,6]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SwitchProductQualityContribution=e.UpdateContribution=e.ProductContribution=e.ShowReleaseNotesAction=e.AbstractShowReleaseNotesAction=e.OpenLatestReleaseNotesInBrowserAction=e.showReleaseNotes=e.RELEASE_NOTES_URL=e.CONTEXT_UPDATE_STATE=void 0,e.CONTEXT_UPDATE_STATE=new s.RawContextKey("updateState","uninitialized"),e.RELEASE_NOTES_URL=new s.RawContextKey("releaseNotesUrl","");let D;function y(V,z){return D||(D=V.createInstance(f.ReleaseNotesManager)),D.show(z)}e.showReleaseNotes=y;let T=class extends R.Action{constructor(z,x){super("update.openLatestReleaseNotes",t.localize(0,null),void 0,!0),this.openerService=z,this.productService=x}async run(){if(this.productService.releaseNotesUrl){const z=k.URI.parse(this.productService.releaseNotesUrl);await this.openerService.open(z)}else throw new Error(t.localize(1,null,this.productService.nameLong))}};T=we([F(0,b.IOpenerService),F(1,o.IProductService)],T),e.OpenLatestReleaseNotesInBrowserAction=T;let _=class extends R.Action{constructor(z,x,H,W){super(z,x,void 0,!0),this.version=H,this.instantiationService=W}async run(){if(!!this.enabled){this.enabled=!1;try{await y(this.instantiationService,this.version)}catch(z){const x=this.instantiationService.createInstance(T);try{await x.run()}catch(H){throw new Error(`${z.message} and ${H.message}`)}}}}};_=we([F(3,I.IInstantiationService)],_),e.AbstractShowReleaseNotesAction=_;let L=class extends _{constructor(z,x){super("update.showReleaseNotes",t.localize(2,null),z,x)}};L=we([F(1,I.IInstantiationService)],L),e.ShowReleaseNotesAction=L;function M(V){const z=/([0-9]+)\.([0-9]+)\.([0-9]+)/.exec(V);if(!!z)return{major:parseInt(z[1]),minor:parseInt(z[2]),patch:parseInt(z[3])}}function O(V,z){return V.major<z.major||V.minor<z.minor}let N=class so{constructor(z,x,H,W,U,$,q,X,G){X.releaseNotesUrl&&e.RELEASE_NOTES_URL.bindTo(G).set(X.releaseNotesUrl),q.hadLastFocus().then(async Q=>{if(!Q)return;const j=M(z.get(so.KEY,-1,"")),K=M(X.version),Y=$.getValue("update.showReleaseNotes"),ee=X.releaseNotesUrl;Y&&!W.skipReleaseNotes&&ee&&j&&K&&O(j,K)&&y(x,X.version).then(void 0,()=>{H.prompt(p.default.Info,t.localize(3,null,X.nameLong,X.version),[{label:t.localize(4,null),run:()=>{const ie=k.URI.parse(ee);U.open(ie)}}])}),z.store(so.KEY,X.version,-1,1)})}};N.KEY="releaseNotes/lastVersion",N=we([F(0,S.IStorageService),F(1,I.IInstantiationService),F(2,r.INotificationService),F(3,i.IBrowserWorkbenchEnvironmentService),F(4,b.IOpenerService),F(5,l.IConfigurationService),F(6,a.IHostService),F(7,o.IProductService),F(8,s.IContextKeyService)],N),e.ProductContribution=N;let P=class extends A.Disposable{constructor(z,x,H,W,U,$,q,X,G){super(),this.storageService=z,this.instantiationService=x,this.notificationService=H,this.dialogService=W,this.updateService=U,this.activityService=$,this.contextKeyService=q,this.productService=X,this.hostService=G,this.badgeDisposable=this._register(new A.MutableDisposable),this.state=U.state,this.updateStateContextKey=e.CONTEXT_UPDATE_STATE.bindTo(this.contextKeyService),this._register(U.onStateChange(this.onUpdateStateChange,this)),this.onUpdateStateChange(this.updateService.state);const Q=this.productService.commit,j=this.storageService.get("update/lastKnownVersion",-1);Q!==j&&(this.storageService.remove("update/lastKnownVersion",-1),this.storageService.remove("update/updateNotificationTime",-1)),this.registerGlobalActivityActions()}async onUpdateStateChange(z){switch(this.updateStateContextKey.set(z.type),z.type){case"idle":z.error?this.onError(z.error):this.state.type==="checking for updates"&&this.state.explicit&&await this.hostService.hadLastFocus()&&this.onUpdateNotAvailable();break;case"available for download":this.onUpdateAvailable(z.update);break;case"downloaded":this.onUpdateDownloaded(z.update);break;case"ready":this.onUpdateReady(z.update);break}let x,H,W;z.type==="available for download"||z.type==="downloaded"||z.type==="ready"?x=new E.NumberBadge(1,()=>t.localize(5,null,this.productService.nameShort)):z.type==="checking for updates"?(x=new E.ProgressBadge(()=>t.localize(6,null)),H="progress-badge",W=1):z.type==="downloading"?(x=new E.ProgressBadge(()=>t.localize(7,null)),H="progress-badge",W=1):z.type==="updating"&&(x=new E.ProgressBadge(()=>t.localize(8,null)),H="progress-badge",W=1),this.badgeDisposable.clear(),x&&(this.badgeDisposable.value=this.activityService.showGlobalActivity({badge:x,clazz:H,priority:W})),this.state=z}onError(z){/The request timed out|The network connection was lost/i.test(z)||(z=z.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:r.Severity.Error,message:z,source:t.localize(9,null)}))}onUpdateNotAvailable(){this.dialogService.show(p.default.Info,t.localize(10,null))}onUpdateAvailable(z){!this.shouldShowNotification()||this.notificationService.prompt(p.default.Info,t.localize(11,null),[{label:t.localize(12,null),run:()=>this.updateService.downloadUpdate()},{label:t.localize(13,null),run:()=>{}},{label:t.localize(14,null),run:()=>{const x=this.instantiationService.createInstance(L,z.productVersion);x.run(),x.dispose()}}])}onUpdateDownloaded(z){!this.shouldShowNotification()||this.notificationService.prompt(p.default.Info,t.localize(15,null,this.productService.nameLong,z.productVersion),[{label:t.localize(16,null),run:()=>this.updateService.applyUpdate()},{label:t.localize(17,null),run:()=>{}},{label:t.localize(18,null),run:()=>{const x=this.instantiationService.createInstance(L,z.productVersion);x.run(),x.dispose()}}])}onUpdateReady(z){if(!(c.isWindows&&this.productService.target!=="user")&&!this.shouldShowNotification())return;const x=[{label:t.localize(19,null),run:()=>this.updateService.quitAndInstall()},{label:t.localize(20,null),run:()=>{}}];z.productVersion&&x.push({label:t.localize(21,null),run:()=>{const H=this.instantiationService.createInstance(L,z.productVersion);H.run(),H.dispose()}}),this.notificationService.prompt(p.default.Info,t.localize(22,null,this.productService.nameLong),x,{sticky:!0})}shouldShowNotification(){const z=this.productService.commit,x=new Date().getTime(),H=this.storageService.get("update/lastKnownVersion",-1);z!==H&&(this.storageService.store("update/lastKnownVersion",z,-1,1),this.storageService.store("update/updateNotificationTime",x,-1,1));const W=this.storageService.getNumber("update/updateNotificationTime",-1,x);return(x-W)/(1e3*60*60*24)>5}registerGlobalActivityActions(){n.CommandsRegistry.registerCommand("update.check",()=>this.updateService.checkForUpdates(!0)),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.check",title:t.localize(23,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("idle")}),n.CommandsRegistry.registerCommand("update.checking",()=>{}),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.checking",title:t.localize(24,null),precondition:s.ContextKeyExpr.false()},when:e.CONTEXT_UPDATE_STATE.isEqualTo("checking for updates")}),n.CommandsRegistry.registerCommand("update.downloadNow",()=>this.updateService.downloadUpdate()),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.downloadNow",title:t.localize(25,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("available for download")}),n.CommandsRegistry.registerCommand("update.downloading",()=>{}),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.downloading",title:t.localize(26,null),precondition:s.ContextKeyExpr.false()},when:e.CONTEXT_UPDATE_STATE.isEqualTo("downloading")}),n.CommandsRegistry.registerCommand("update.install",()=>this.updateService.applyUpdate()),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.install",title:t.localize(27,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("downloaded")}),n.CommandsRegistry.registerCommand("update.updating",()=>{}),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.updating",title:t.localize(28,null),precondition:s.ContextKeyExpr.false()},when:e.CONTEXT_UPDATE_STATE.isEqualTo("updating")}),n.CommandsRegistry.registerCommand("update.restart",()=>this.updateService.quitAndInstall()),d.MenuRegistry.appendMenuItem(d.MenuId.GlobalActivity,{group:"7_update",command:{id:"update.restart",title:t.localize(29,null)},when:e.CONTEXT_UPDATE_STATE.isEqualTo("ready")})}};P=we([F(0,S.IStorageService),F(1,I.IInstantiationService),F(2,r.INotificationService),F(3,u.IDialogService),F(4,C.IUpdateService),F(5,E.IActivityService),F(6,s.IContextKeyService),F(7,o.IProductService),F(8,a.IHostService)],P),e.UpdateContribution=P;let B=class extends A.Disposable{constructor(z,x){super(),this.productService=z,this.environmentService=x,this.registerGlobalActivityActions()}registerGlobalActivityActions(){const z=this.productService.quality,x=this.environmentService.options?.productQualityChangeHandler;if(x&&(z==="stable"||z==="insider")){const H=z==="stable"?"insider":"stable",W=`update.switchQuality.${H}`,U=H==="insider";(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:W,title:U?t.localize(30,null):t.localize(31,null),precondition:h.IsWebContext,menu:{id:d.MenuId.GlobalActivity,when:h.IsWebContext,group:"7_update"}})}async run(q){const X=q.get(u.IDialogService),G=q.get(g.IUserDataSyncEnablementService),Q=q.get(g.IUserDataSyncStoreManagementService),j=q.get(S.IStorageService),K=q.get(m.IUserDataSyncWorkbenchService),Y=q.get(g.IUserDataSyncService),ee=q.get(r.INotificationService);try{const ie="switchQuality.selectSettingsSyncServiceDialogShown",re=Q.userDataSyncStore;let oe;if(re&&U&&G.isEnabled()&&!j.getBoolean(ie,-1,!1)){if(oe=await this.selectSettingsSyncService(X),!oe)return;j.store(ie,!0,-1,0),oe==="stable"&&await Q.switch(oe)}if((await X.confirm({type:"info",message:t.localize(32,null),detail:H==="insider"?t.localize(33,null):t.localize(34,null),primaryButton:t.localize(35,null)})).confirmed){const te=[];Y.status==="syncing"&&te.push(w.Event.toPromise(w.Event.filter(Y.onDidChangeStatus,Z=>Z!=="syncing"))),U&&oe&&te.push(K.synchroniseUserDataSyncStoreType()),await v.Promises.settled(te),x(H)}else oe&&j.remove(ie,-1)}catch(ie){ee.error(ie)}}async selectSettingsSyncService(q){const X=await q.show(r.Severity.Info,t.localize(36,null),[t.localize(37,null),t.localize(38,null),t.localize(39,null)],{detail:t.localize(40,null),cancelId:2});return X.choice===0?"insiders":X.choice===1?"stable":void 0}})}}};B=we([F(0,o.IProductService),F(1,i.IBrowserWorkbenchEnvironmentService)],B),e.SwitchProductQualityContribution=B}),define(ae[2881],le([1,0,1945,17,44,70,15,2880,307,283,5,14,47,130,900,141,41,46,9,2218]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CheckForUpdateAction=e.ShowCurrentReleaseNotesAction=void 0;const d=p.Registry.as(R.Extensions.Workbench);d.registerWorkbenchContribution(E.ProductContribution,3),d.registerWorkbenchContribution(E.UpdateContribution,3),d.registerWorkbenchContribution(E.SwitchProductQualityContribution,3);class n extends k.Action2{constructor(){super({id:i.ShowCurrentReleaseNotesActionId,title:{value:(0,t.localize)(0,null),mnemonicTitle:(0,t.localize)(1,null),original:"Show Release Notes"},category:{value:I.default.nameShort,original:I.default.nameShort},f1:!0,precondition:E.RELEASE_NOTES_URL,menu:[{id:k.MenuId.MenubarHelpMenu,group:"1_welcome",order:5,when:E.RELEASE_NOTES_URL}]})}async run(w){const D=w.get(S.IInstantiationService),y=w.get(l.IProductService),T=w.get(c.IOpenerService);try{await(0,E.showReleaseNotes)(D,y.version)}catch{if(y.releaseNotesUrl)await T.open(s.URI.parse(y.releaseNotesUrl));else throw new Error((0,t.localize)(2,null,y.nameLong))}}}e.ShowCurrentReleaseNotesAction=n,(0,k.registerAction2)(n);class a extends k.Action2{constructor(){super({id:"update.checkForUpdate",title:{value:(0,t.localize)(3,null),original:"Check for Updates..."},category:{value:I.default.nameShort,original:I.default.nameShort},f1:!0,precondition:E.CONTEXT_UPDATE_STATE.isEqualTo("idle")})}async run(w){return w.get(b.IUpdateService).checkForUpdates(!0)}}e.CheckForUpdateAction=a;class o extends k.Action2{constructor(){super({id:"update.downloadUpdate",title:{value:(0,t.localize)(4,null),original:"Download Update"},category:{value:I.default.nameShort,original:I.default.nameShort},f1:!0,precondition:E.CONTEXT_UPDATE_STATE.isEqualTo("available for download")})}async run(w){await w.get(b.IUpdateService).downloadUpdate()}}class g extends k.Action2{constructor(){super({id:"update.installUpdate",title:{value:(0,t.localize)(5,null),original:"Install Update"},category:{value:I.default.nameShort,original:I.default.nameShort},f1:!0,precondition:E.CONTEXT_UPDATE_STATE.isEqualTo("downloaded")})}async run(w){await w.get(b.IUpdateService).applyUpdate()}}class h extends k.Action2{constructor(){super({id:"update.restartToUpdate",title:{value:(0,t.localize)(6,null),original:"Restart to Update"},category:{value:I.default.nameShort,original:I.default.nameShort},f1:!0,precondition:E.CONTEXT_UPDATE_STATE.isEqualTo("ready")})}async run(w){await w.get(b.IUpdateService).quitAndInstall()}}class v extends k.Action2{constructor(){super({id:v.ID,title:{value:(0,t.localize)(7,null,I.default.nameLong),original:`Download ${I.default.downloadUrl}`},precondition:f.IsWebContext,f1:!0,menu:[{id:k.MenuId.StatusBarWindowIndicatorMenu,when:f.IsWebContext}]})}run(w){const D=w.get(l.IProductService),y=w.get(c.IOpenerService);D.downloadUrl&&y.open(s.URI.parse(D.downloadUrl))}}if(v.ID="workbench.action.download",v.AVAILABLE=!!I.default.downloadUrl,(0,k.registerAction2)(v),(0,k.registerAction2)(a),(0,k.registerAction2)(o),(0,k.registerAction2)(g),(0,k.registerAction2)(h),C.isWindows){class m extends k.Action2{constructor(){super({id:"_update.applyupdate",title:{value:(0,t.localize)(8,null),original:"Apply Update..."},category:A.Categories.Developer,f1:!0,precondition:E.CONTEXT_UPDATE_STATE.isEqualTo("idle")})}async run(D){const y=D.get(b.IUpdateService),_=await D.get(r.IFileDialogService).showOpenDialog({title:(0,t.localize)(9,null),filters:[{name:"Setup",extensions:["exe"]}],canSelectFiles:!0,openLabel:(0,u.mnemonicButtonLabel)((0,t.localize)(10,null))});!_||!_[0]||await y._applySpecificUpdate(_[0].fsPath)}}(0,k.registerAction2)(m)}}),define(ae[2882],le([1,0,44,95,17,102,828,15,1955,81,19,89,26,276]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let i=class{constructor(l,s){s.registerChannel("userDataSyncUtil",new k.UserDataSycnUtilServiceChannel(l))}};i=we([F(0,p.IUserDataSyncUtilService),F(1,A.ISharedProcessService)],i),R.Registry.as(t.Extensions.Workbench).registerWorkbenchContribution(i,1),(0,E.registerAction2)(class extends E.Action2{constructor(){super({id:"workbench.userData.actions.openSyncBackupsFolder",title:{value:(0,I.localize)(0,null),original:"Open Local Backups Folder"},category:{value:u.SYNC_TITLE,original:"Settings Sync"},menu:{id:E.MenuId.CommandPalette,when:u.CONTEXT_SYNC_STATE.notEqualsTo("uninitialized")}})}async run(l){const s=l.get(b.IEnvironmentService).userDataSyncHome,d=l.get(C.INativeHostService),n=l.get(S.IFileService),a=l.get(r.INotificationService);if(await n.exists(s)){const o=await n.resolve(s),g=o.children&&o.children[0]?o.children[0].resource:s;return d.showItemInFolder(g.fsPath)}else a.info((0,I.localize)(1,null))}})}),define(ae[985],le([1,0,23,841,842,2259,2260,2261,51,19,5,25,441,46,172,95,396,276,44,17,14,11,82,81,39,100,241,436,2,18,32,57,335,330,2262,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataInitializationService=e.IUserDataInitializationService=void 0,e.IUserDataInitializationService=(0,S.createDecorator)("IUserDataInitializationService");let P=class{constructor(W,U,$,q,X,G,Q,j,K,Y){this.environmentService=W,this.credentialsService=U,this.userDataSyncStoreManagementService=$,this.fileService=q,this.userDataProfilesService=X,this.storageService=G,this.productService=Q,this.requestService=j,this.logService=K,this.uriIdentityService=Y,this.initialized=[],this.initializationFinished=new a.Barrier,this.globalStateUserData=null,this.createUserDataSyncStoreClient().then(ee=>{ee||this.initializationFinished.open()})}createUserDataSyncStoreClient(){return this._userDataSyncStoreClientPromise||(this._userDataSyncStoreClientPromise=(async()=>{try{if(!n.isWeb){this.logService.trace("Skipping initializing user data in desktop");return}if(!this.storageService.isNew(-1)){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 W;try{W=await(0,c.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService)}catch(X){this.logService.error(X)}if(!W){this.logService.trace("Skipping initializing user data as authentication session is not set");return}await this.initializeUserDataSyncStore(W);const U=this.userDataSyncStoreManagementService.userDataSyncStore;if(!U){this.logService.trace("Skipping initializing user data as sync service is not provided");return}const $=new r.UserDataSyncStoreClient(U.url,this.productService,this.requestService,this.logService,this.environmentService,this.fileService,this.storageService);if($.setAuthToken(W.accessToken,W.providerId),await $.manifest(null)===null){$.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`),$}catch(W){this.logService.error(W);return}})()),this._userDataSyncStoreClientPromise}async initializeUserDataSyncStore(W){const U=this.userDataSyncStoreManagementService.userDataSyncStore;if(!U?.canSwitch)return;const $=new D.DisposableStore;try{const q=$.add(new r.UserDataSyncStoreClient(U.url,this.productService,this.requestService,this.logService,this.environmentService,this.fileService,this.storageService));if(q.setAuthToken(W.accessToken,W.providerId),this.globalStateUserData=await q.readResource("globalState",null),this.globalStateUserData){const X=new R.UserDataSyncStoreTypeSynchronizer(q,this.storageService,this.environmentService,this.fileService,this.logService).getSyncStoreType(this.globalStateUserData);X&&(await this.userDataSyncStoreManagementService.switch(X),(0,y.isEqual)(U.url,this.userDataSyncStoreManagementService.userDataSyncStore?.url)||(this.logService.info("Switched settings sync store"),this.globalStateUserData=null))}}finally{$.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(W){try{this.logService.trace("UserDataInitializationService#initializeOtherResources"),await Promise.allSettled([this.initialize(["keybindings","snippets","tasks"]),this.initializeExtensions(W)])}finally{this.initializationFinished.open()}}async initializeExtensions(W){try{await Promise.all([this.initializeInstalledExtensions(W),this.initializeNewExtensions(W)])}finally{this.initialized.push("extensions")}}async initializeInstalledExtensions(W){return this.initializeInstalledExtensionsPromise||(this.initializeInstalledExtensionsPromise=(async()=>{this.logService.trace("UserDataInitializationService#initializeInstalledExtensions");const U=await this.getExtensionsPreviewInitializer(W);U&&await W.createInstance(V,U).initialize()})()),this.initializeInstalledExtensionsPromise}async initializeNewExtensions(W){return this.initializeNewExtensionsPromise||(this.initializeNewExtensionsPromise=(async()=>{this.logService.trace("UserDataInitializationService#initializeNewExtensions");const U=await this.getExtensionsPreviewInitializer(W);U&&await W.createInstance(z,U).initialize()})()),this.initializeNewExtensionsPromise}getExtensionsPreviewInitializer(W){return this.extensionsPreviewInitializerPromise||(this.extensionsPreviewInitializerPromise=(async()=>{const U=await this.createUserDataSyncStoreClient();if(!U)return null;const $=await U.readResource("extensions",null);return W.createInstance(B,$)})()),this.extensionsPreviewInitializerPromise}async initialize(W){const U=await this.createUserDataSyncStoreClient();!U||await a.Promises.settled(W.map(async $=>{try{if(this.initialized.includes($)){this.logService.info(`${(0,l.getSyncAreaLabel)($)} initialized already.`);return}this.initialized.push($),this.logService.trace(`Initializing ${(0,l.getSyncAreaLabel)($)}`);const q=this.createSyncResourceInitializer($),X=await U.readResource($,$==="globalState"?this.globalStateUserData:null);await q.initialize(X),this.logService.info(`Initialized ${(0,l.getSyncAreaLabel)($)}`)}catch(q){this.logService.info(`Error while initializing ${(0,l.getSyncAreaLabel)($)}`),this.logService.error(q)}}))}createSyncResourceInitializer(W){switch(W){case"settings":return new k.SettingsInitializer(this.fileService,this.userDataProfilesService,this.environmentService,this.logService,this.uriIdentityService);case"keybindings":return new A.KeybindingsInitializer(this.fileService,this.userDataProfilesService,this.environmentService,this.logService,this.uriIdentityService);case"tasks":return new O.TasksInitializer(this.fileService,this.userDataProfilesService,this.environmentService,this.logService,this.uriIdentityService);case"snippets":return new E.SnippetsInitializer(this.fileService,this.userDataProfilesService,this.environmentService,this.logService,this.uriIdentityService);case"globalState":return new R.GlobalStateInitializer(this.storageService,this.fileService,this.userDataProfilesService,this.environmentService,this.logService,this.uriIdentityService)}throw new Error(`Cannot create initializer for ${W}`)}};P=we([F(0,I.IWorkbenchEnvironmentService),F(1,M.ICredentialsService),F(2,f.IUserDataSyncStoreManagementService),F(3,b.IFileService),F(4,N.IUserDataProfilesService),F(5,t.IStorageService),F(6,u.IProductService),F(7,i.IRequestService),F(8,C.ILogService),F(9,_.IUriIdentityService)],P),e.UserDataInitializationService=P;let B=class extends p.AbstractExtensionsInitializer{constructor(W,U,$,q,X,G,Q,j){super(U,$,q,X,G,Q,j),this.extensionsData=W,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(W){const U=await this.parseExtensions(W);if(!U){this.logService.info("Skipping initializing extensions because remote extensions does not exist.");return}const $=await this.extensionManagementService.getInstalled();this.preview=this.generatePreview(U,$)}};B=we([F(1,o.IExtensionManagementService),F(2,w.IIgnoredExtensionsManagementService),F(3,b.IFileService),F(4,N.IUserDataProfilesService),F(5,g.IEnvironmentService),F(6,f.IUserDataSyncLogService),F(7,_.IUriIdentityService)],B);let V=class{constructor(W,U,$,q){this.extensionsPreviewInitializer=W,this.extensionEnablementService=U,this.extensionStorageService=$,this.logService=q}async initialize(){const W=await this.extensionsPreviewInitializer.getPreview();if(!!W){for(const U of W.installedExtensions){const $=W.remoteExtensions.find(({identifier:q})=>(0,v.areSameExtensions)(q,U.identifier));if($?.state){const q=this.extensionStorageService.getExtensionState(U,!0)||{};Object.keys($.state).forEach(X=>q[X]=$.state[X]),this.extensionStorageService.setExtensionState(U,q,!0)}}if(W.disabledExtensions.length)for(const U of W.disabledExtensions)this.logService.trace("Disabling extension...",U.id),await this.extensionEnablementService.disableExtension(U),this.logService.info("Disabling extension",U.id)}}};V=we([F(1,o.IGlobalExtensionEnablementService),F(2,L.IExtensionStorageService),F(3,f.IUserDataSyncLogService)],V);let z=class{constructor(W,U,$,q,X,G){this.extensionsPreviewInitializer=W,this.extensionService=U,this.extensionStorageService=$,this.galleryService=q,this.extensionManagementService=X,this.logService=G}async initialize(){const W=await this.extensionsPreviewInitializer.getPreview();if(!W)return;const U=[],$=await this.extensionManagementService.getTargetPlatform(),q=await this.galleryService.getExtensions(W.newExtensions,{targetPlatform:$,compatible:!0},T.CancellationToken.None);for(const G of q)try{const Q=W.remoteExtensions.find(({identifier:K})=>(0,v.areSameExtensions)(K,G.identifier));if(!Q)continue;Q.state&&this.extensionStorageService.setExtensionState(G,Q.state,!0),this.logService.trace("Installing extension...",G.identifier.id);const j=await this.extensionManagementService.installFromGallery(G,{isMachineScoped:!1,donotIncludePackAndDependencies:!0,installPreReleaseVersion:Q.preRelease});W.disabledExtensions.some(K=>(0,v.areSameExtensions)(K,G.identifier))||U.push(j),this.logService.info("Installed extension.",G.identifier.id)}catch(Q){this.logService.error(Q)}const X=U.filter(G=>this.extensionService.canAddExtension((0,h.toExtensionDescription)(G)));await this.areExtensionsRunning(X)||await new Promise((G,Q)=>{const j=this.extensionService.onDidChangeExtensions(async()=>{try{await this.areExtensionsRunning(X)&&(j.dispose(),G())}catch(K){Q(K)}})})}async areExtensionsRunning(W){await this.extensionService.whenInstalledExtensionsRegistered();const U=this.extensionService.extensions;return W.every($=>U.some(q=>(0,v.areSameExtensions)({id:q.identifier.value},$.identifier)))}};z=we([F(1,h.IExtensionService),F(2,L.IExtensionStorageService),F(3,o.IExtensionGalleryService),F(4,o.IExtensionManagementService),F(5,f.IUserDataSyncLogService)],z);let x=class{constructor(W,U,$){$.whenInstalledExtensionsRegistered().then(()=>this.initializeOtherResource(W,U))}async initializeOtherResource(W,U){await W.requiresInitialization()&&((0,m.mark)("code/willInitOtherUserData"),await W.initializeOtherResources(U),(0,m.mark)("code/didInitOtherUserData"))}};x=we([F(0,e.IUserDataInitializationService),F(1,S.IInstantiationService),F(2,h.IExtensionService)],x),n.isWeb&&d.Registry.as(s.Extensions.Workbench).registerWorkbenchContribution(x,3)}),define(ae[2883],le([1,0,2047,13,39,193,23,27,17,21,8,2825,12,6,2813,2,970,10,248,19,18,690,35,223,83,308,2827,971,972,691,25,14,126,969,11,985,2202,33,42]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchThemeService=void 0;const z="vs-dark vscode-theme-defaults-themes-dark_plus-json",x="vs vscode-theme-defaults-themes-light_plus-json",H="osColorScheme",W=-1,U="vscode-theme-defaults",$="vscode.vscode-theme-seti-vs-seti",q="file-icons-enabled",X="contributedColorTheme",G="contributedFileIconTheme",Q="contributedProductIconTheme",j=I.Registry.as(r.Extensions.ThemingContribution);function K(te){switch(te){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 te}const Y=(0,m.registerColorThemeExtensionPoint)(),ee=(0,m.registerFileIconThemeExtensionPoint)(),ie=(0,m.registerProductIconThemeExtensionPoint)();let re=class{constructor(Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge){this.storageService=ne,this.configurationService=ce,this.telemetryService=de,this.environmentService=he,this.extensionResourceLoaderService=me,this.layoutService=Se,this.logService=Ie,this.hostColorService=ve,this.userDataInitializationService=be,this.languageService=ge,this.themeExtensionsActivated=new Map,this.container=Se.container,this.settings=new w.ThemeConfiguration(ce),this.colorThemeRegistry=new m.ThemeRegistry(Y,C.ColorThemeData.fromExtensionTheme),this.colorThemeWatcher=new oe(pe,he,this.reloadCurrentColorTheme.bind(this)),this.onColorThemeChange=new u.Emitter({leakWarningThreshold:400}),this.currentColorTheme=C.ColorThemeData.createUnloadedTheme(""),this.colorThemeSequencer=new O.Sequencer,this.fileIconThemeWatcher=new oe(pe,he,this.reloadCurrentFileIconTheme.bind(this)),this.fileIconThemeRegistry=new m.ThemeRegistry(ee,c.FileIconThemeData.fromExtensionTheme,!0,c.FileIconThemeData.noIconTheme),this.fileIconThemeLoader=new c.FileIconThemeLoader(me,ge),this.onFileIconThemeChange=new u.Emitter({leakWarningThreshold:400}),this.currentFileIconTheme=c.FileIconThemeData.createUnloadedTheme(""),this.fileIconThemeSequencer=new O.Sequencer,this.productIconThemeWatcher=new oe(pe,he,this.reloadCurrentProductIconTheme.bind(this)),this.productIconThemeRegistry=new m.ThemeRegistry(ie,D.ProductIconThemeData.fromExtensionTheme,!0,D.ProductIconThemeData.defaultTheme),this.onProductIconThemeChange=new u.Emitter,this.currentProductIconTheme=D.ProductIconThemeData.createUnloadedTheme(""),this.productIconThemeSequencer=new O.Sequencer;let ue=C.ColorThemeData.fromStorageData(this.storageService);ue&&this.settings.colorTheme!==ue.settingsId&&this.settings.isDefaultColorTheme()&&(ue=void 0);const Ce=this.getPreferredColorScheme();if(Ce&&ue?.type!==Ce&&this.storageService.get(H,W)!==Ce&&(ue=C.ColorThemeData.createUnloadedThemeForThemeType(Ce)),!ue){const Ee=he.options?.initialColorTheme;Ee&&(ue=C.ColorThemeData.createUnloadedThemeForThemeType(Ee.themeType,Ee.colors))}ue||(ue=C.ColorThemeData.createUnloadedThemeForThemeType(_.isWeb?L.ColorScheme.LIGHT:L.ColorScheme.DARK)),ue.setCustomizations(this.settings),this.applyTheme(ue,void 0,!0);const De=c.FileIconThemeData.fromStorageData(this.storageService);De&&this.applyAndSetFileIconTheme(De,!0);const Ae=D.ProductIconThemeData.fromStorageData(this.storageService);Ae&&this.applyAndSetProductIconTheme(Ae,!0),Promise.all([Z.whenInstalledExtensionsRegistered(),be.whenInitializationFinished()]).then(Ee=>{this.installConfigurationListener(),this.installPreferredSchemeListener(),this.installRegistryListeners(),this.initialize().catch(b.onUnexpectedError)});const Pe=(0,l.createStyleSheet)();Pe.id="codiconStyles";const fe=(0,P.getIconsStyleSheet)(this);function ye(){Pe.textContent=fe.getCSS()}const ke=new O.RunOnceScheduler(ye,0);fe.onDidChange(()=>ke.schedule()),ke.schedule()}initialize(){const Z=this.environmentService.extensionDevelopmentLocationURI,ne=Z&&Z.length===1?Z[0]:void 0,ce=async()=>{const pe=this.colorThemeRegistry.findThemeByExtensionLocation(ne);if(pe.length)return this.setColorTheme(pe[0].id,8);const me=this.currentColorTheme.type===L.ColorScheme.LIGHT?x:z,Se=this.colorThemeRegistry.findThemeBySettingsId(this.settings.colorTheme,me),Ie=this.getPreferredColorScheme(),ve=this.storageService.get(H,W);return Ie!==ve&&(this.storageService.store(H,Ie,W,0),Ie&&Se?.type!==Ie)?this.applyPreferredColorTheme(Ie):this.setColorTheme(Se&&Se.id,void 0)},de=async()=>{const pe=this.fileIconThemeRegistry.findThemeByExtensionLocation(ne);if(pe.length)return this.setFileIconTheme(pe[0].id,8);const me=this.fileIconThemeRegistry.findThemeBySettingsId(this.settings.fileIconTheme);return this.setFileIconTheme(me?me.id:$,void 0)},he=async()=>{const pe=this.productIconThemeRegistry.findThemeByExtensionLocation(ne);if(pe.length)return this.setProductIconTheme(pe[0].id,8);const me=this.productIconThemeRegistry.findThemeBySettingsId(this.settings.productIconTheme);return this.setProductIconTheme(me?me.id:D.DEFAULT_PRODUCT_ICON_THEME_ID,void 0)};return Promise.all([ce(),de(),he()])}installConfigurationListener(){this.configurationService.onDidChangeConfiguration(Z=>{let ne=null;const ce=()=>(ne===null&&(ne=this.getPreferredColorScheme()),ne);if(Z.affectsConfiguration(A.ThemeSettings.COLOR_THEME)&&this.restoreColorTheme(),(Z.affectsConfiguration(A.ThemeSettings.DETECT_COLOR_SCHEME)||Z.affectsConfiguration(A.ThemeSettings.DETECT_HC))&&this.handlePreferredSchemeUpdated(),Z.affectsConfiguration(A.ThemeSettings.PREFERRED_DARK_THEME)&&ce()===L.ColorScheme.DARK&&this.applyPreferredColorTheme(L.ColorScheme.DARK),Z.affectsConfiguration(A.ThemeSettings.PREFERRED_LIGHT_THEME)&&ce()===L.ColorScheme.LIGHT&&this.applyPreferredColorTheme(L.ColorScheme.LIGHT),Z.affectsConfiguration(A.ThemeSettings.PREFERRED_HC_DARK_THEME)&&ce()===L.ColorScheme.HIGH_CONTRAST_DARK&&this.applyPreferredColorTheme(L.ColorScheme.HIGH_CONTRAST_DARK),Z.affectsConfiguration(A.ThemeSettings.PREFERRED_HC_LIGHT_THEME)&&ce()===L.ColorScheme.HIGH_CONTRAST_LIGHT&&this.applyPreferredColorTheme(L.ColorScheme.HIGH_CONTRAST_LIGHT),Z.affectsConfiguration(A.ThemeSettings.FILE_ICON_THEME)&&this.restoreFileIconTheme(),Z.affectsConfiguration(A.ThemeSettings.PRODUCT_ICON_THEME)&&this.restoreProductIconTheme(),this.currentColorTheme){let de=!1;Z.affectsConfiguration(A.ThemeSettings.COLOR_CUSTOMIZATIONS)&&(this.currentColorTheme.setCustomColors(this.settings.colorCustomizations),de=!0),Z.affectsConfiguration(A.ThemeSettings.TOKEN_COLOR_CUSTOMIZATIONS)&&(this.currentColorTheme.setCustomTokenColors(this.settings.tokenColorCustomizations),de=!0),Z.affectsConfiguration(A.ThemeSettings.SEMANTIC_TOKEN_COLOR_CUSTOMIZATIONS)&&(this.currentColorTheme.setCustomSemanticTokenColors(this.settings.semanticTokenColorCustomizations),de=!0),de&&(this.updateDynamicCSSRules(this.currentColorTheme),this.onColorThemeChange.fire(this.currentColorTheme))}})}installRegistryListeners(){let Z;this.colorThemeRegistry.onDidChange(async de=>{(0,w.updateColorThemeConfigurationSchemas)(de.themes),await this.restoreColorTheme()?this.currentColorTheme.id===z&&!p.isUndefined(Z)&&await this.colorThemeRegistry.findThemeById(Z)?(await this.setColorTheme(Z,"auto"),Z=void 0):de.added.some(he=>he.settingsId===this.currentColorTheme.settingsId)&&await this.reloadCurrentColorTheme():de.removed.some(he=>he.settingsId===this.currentColorTheme.settingsId)&&(Z=this.currentColorTheme.id,await this.setColorTheme(z,"auto"))});let ne;this.fileIconThemeRegistry.onDidChange(async de=>{(0,w.updateFileIconThemeConfigurationSchemas)(de.themes),await this.restoreFileIconTheme()?this.currentFileIconTheme.id===$&&!p.isUndefined(ne)&&this.fileIconThemeRegistry.findThemeById(ne)?(await this.setFileIconTheme(ne,"auto"),ne=void 0):de.added.some(he=>he.settingsId===this.currentFileIconTheme.settingsId)&&await this.reloadCurrentFileIconTheme():de.removed.some(he=>he.settingsId===this.currentFileIconTheme.settingsId)&&(ne=this.currentFileIconTheme.id,await this.setFileIconTheme($,"auto"))});let ce;return this.productIconThemeRegistry.onDidChange(async de=>{(0,w.updateProductIconThemeConfigurationSchemas)(de.themes),await this.restoreProductIconTheme()?this.currentProductIconTheme.id===D.DEFAULT_PRODUCT_ICON_THEME_ID&&!p.isUndefined(ce)&&this.productIconThemeRegistry.findThemeById(ce)?(await this.setProductIconTheme(ce,"auto"),ce=void 0):de.added.some(he=>he.settingsId===this.currentProductIconTheme.settingsId)&&await this.reloadCurrentProductIconTheme():de.removed.some(he=>he.settingsId===this.currentProductIconTheme.settingsId)&&(ce=this.currentProductIconTheme.id,await this.setProductIconTheme(D.DEFAULT_PRODUCT_ICON_THEME_ID,"auto"))}),Promise.all([this.getColorThemes(),this.getFileIconThemes(),this.getProductIconThemes()]).then(([de,he,pe])=>{(0,w.updateColorThemeConfigurationSchemas)(de),(0,w.updateFileIconThemeConfigurationSchemas)(he),(0,w.updateProductIconThemeConfigurationSchemas)(pe)})}installPreferredSchemeListener(){this.hostColorService.onDidChangeColorScheme(()=>this.handlePreferredSchemeUpdated())}async handlePreferredSchemeUpdated(){const Z=this.getPreferredColorScheme(),ne=this.storageService.get(H,W);if(Z!==ne){if(this.storageService.store(H,Z,W,1),Z)return ne||(this.themeSettingIdBeforeSchemeSwitch=this.settings.colorTheme),this.applyPreferredColorTheme(Z);if(ne&&this.themeSettingIdBeforeSchemeSwitch){const ce=this.colorThemeRegistry.findThemeBySettingsId(this.themeSettingIdBeforeSchemeSwitch,void 0);ce&&this.setColorTheme(ce.id,"auto")}}}getPreferredColorScheme(){if(this.configurationService.getValue(A.ThemeSettings.DETECT_HC)&&this.hostColorService.highContrast)return this.hostColorService.dark?L.ColorScheme.HIGH_CONTRAST_DARK:L.ColorScheme.HIGH_CONTRAST_LIGHT;if(this.configurationService.getValue(A.ThemeSettings.DETECT_COLOR_SCHEME))return this.hostColorService.dark?L.ColorScheme.DARK:L.ColorScheme.LIGHT}async applyPreferredColorTheme(Z){let ne;switch(Z){case L.ColorScheme.LIGHT:ne=A.ThemeSettings.PREFERRED_LIGHT_THEME;break;case L.ColorScheme.HIGH_CONTRAST_DARK:ne=A.ThemeSettings.PREFERRED_HC_DARK_THEME;break;case L.ColorScheme.HIGH_CONTRAST_LIGHT:ne=A.ThemeSettings.PREFERRED_HC_LIGHT_THEME;break;default:ne=A.ThemeSettings.PREFERRED_DARK_THEME}const ce=this.configurationService.getValue(ne);if(ce&&typeof ce=="string"){const de=this.colorThemeRegistry.findThemeBySettingsId(ce,void 0);if(de){const he=this.settings.findAutoConfigurationTarget(ne);return this.setColorTheme(de.id,he)}}return null}getColorTheme(){return this.currentColorTheme}async getColorThemes(){return this.colorThemeRegistry.getThemes()}async getMarketplaceColorThemes(Z,ne,ce){const de=this.extensionResourceLoaderService.getExtensionGalleryResourceURL({publisher:Z,name:ne,version:ce},"extension");if(de)try{const he=await this.extensionResourceLoaderService.readExtensionResource(n.joinPath(de,"package.json"));return this.colorThemeRegistry.getMarketplaceThemes(JSON.parse(he),de,A.ExtensionData.fromName(Z,ne))}catch(he){this.logService.error("Problem loading themes from marketplace",he)}return[]}get onDidColorThemeChange(){return this.onColorThemeChange.event}setColorTheme(Z,ne){return this.colorThemeSequencer.queue(async()=>this.internalSetColorTheme(Z,ne))}async internalSetColorTheme(Z,ne){if(!Z)return null;const ce=p.isString(Z)?K(Z):Z.id;if(this.currentColorTheme.isLoaded&&ce===this.currentColorTheme.id)return ne!=="preview"&&this.currentColorTheme.toStorage(this.storageService),this.settings.setColorTheme(this.currentColorTheme,ne);let de=this.colorThemeRegistry.findThemeById(ce);if(!de)if(Z instanceof C.ColorThemeData)de=Z;else return null;try{return await de.ensureLoaded(this.extensionResourceLoaderService),de.setCustomizations(this.settings),this.applyTheme(de,ne)}catch(he){throw new Error(t.localize(0,null,de.location?.toString(),he.message))}}reloadCurrentColorTheme(){return this.colorThemeSequencer.queue(async()=>{try{const Z=this.colorThemeRegistry.findThemeBySettingsId(this.currentColorTheme.settingsId)||this.currentColorTheme;await Z.reload(this.extensionResourceLoaderService),Z.setCustomizations(this.settings),await this.applyTheme(Z,void 0,!1)}catch{this.logService.info("Unable to reload {0}: {1}",this.currentColorTheme.location?.toString())}})}async restoreColorTheme(){return this.colorThemeSequencer.queue(async()=>{const Z=this.settings.colorTheme,ne=this.colorThemeRegistry.findThemeBySettingsId(Z);return ne?(Z!==this.currentColorTheme.settingsId?await this.internalSetColorTheme(ne.id,void 0):ne!==this.currentColorTheme&&(await ne.ensureLoaded(this.extensionResourceLoaderService),ne.setCustomizations(this.settings),await this.applyTheme(ne,void 0,!0)),!0):!1})}updateDynamicCSSRules(Z){const ne=new Set,ce={addRule:he=>{ne.has(he)||ne.add(he)}};ce.addRule(".monaco-workbench { forced-color-adjust: none; }"),j.getThemingParticipants().forEach(he=>he(Z,ce,this.environmentService));const de=[];for(const he of(0,B.getColorRegistry)().getColors()){const pe=Z.getColor(he.id,!0);pe&&de.push(`${(0,B.asCssVariableName)(he.id)}: ${pe.toString()};`)}ce.addRule(`.monaco-workbench { ${de.join(` `)} }`),se([...ne].join(` `),X)}applyTheme(Z,ne,ce=!1){return this.updateDynamicCSSRules(Z),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(...Z.classNames),this.currentColorTheme.clearCaches(),this.currentColorTheme=Z,this.colorThemingParticipantChangeListener||(this.colorThemingParticipantChangeListener=j.onThemingParticipantAdded(de=>this.updateDynamicCSSRules(this.currentColorTheme))),this.colorThemeWatcher.update(Z),this.sendTelemetry(Z.id,Z.extensionData,"color"),ce?Promise.resolve(null):(this.onColorThemeChange.fire(this.currentColorTheme),Z.isLoaded&&ne!=="preview"&&Z.toStorage(this.storageService),this.settings.setColorTheme(this.currentColorTheme,ne))}sendTelemetry(Z,ne,ce){if(ne){const de=ce+ne.extensionId;this.themeExtensionsActivated.get(de)||(this.telemetryService.publicLog2("activatePlugin",{id:ne.extensionId,name:ne.extensionName,isBuiltin:ne.extensionIsBuiltin,publisherDisplayName:ne.extensionPublisher,themeId:Z}),this.themeExtensionsActivated.set(de,!0))}}async getFileIconThemes(){return this.fileIconThemeRegistry.getThemes()}getFileIconTheme(){return this.currentFileIconTheme}get onDidFileIconThemeChange(){return this.onFileIconThemeChange.event}async setFileIconTheme(Z,ne){return this.fileIconThemeSequencer.queue(async()=>this.internalSetFileIconTheme(Z,ne))}async internalSetFileIconTheme(Z,ne){Z===void 0&&(Z="");const ce=p.isString(Z)?Z:Z.id;if(ce!==this.currentFileIconTheme.id||!this.currentFileIconTheme.isLoaded){let he=this.fileIconThemeRegistry.findThemeById(ce);!he&&Z instanceof c.FileIconThemeData&&(he=Z),he||(he=c.FileIconThemeData.noIconTheme),await he.ensureLoaded(this.fileIconThemeLoader),this.applyAndSetFileIconTheme(he)}const de=this.currentFileIconTheme;return de.isLoaded&&ne!=="preview"&&(!de.location||!(0,g.getRemoteAuthority)(de.location))&&de.toStorage(this.storageService),await this.settings.setFileIconTheme(this.currentFileIconTheme,ne),de}async getMarketplaceFileIconThemes(Z,ne,ce){const de=this.extensionResourceLoaderService.getExtensionGalleryResourceURL({publisher:Z,name:ne,version:ce},"extension");if(de)try{const he=await this.extensionResourceLoaderService.readExtensionResource(n.joinPath(de,"package.json"));return this.fileIconThemeRegistry.getMarketplaceThemes(JSON.parse(he),de,A.ExtensionData.fromName(Z,ne))}catch(he){this.logService.error("Problem loading themes from marketplace",he)}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 Z=this.settings.fileIconTheme,ne=this.fileIconThemeRegistry.findThemeBySettingsId(Z);return ne?(Z!==this.currentFileIconTheme.settingsId?await this.internalSetFileIconTheme(ne.id,void 0):ne!==this.currentFileIconTheme&&(await ne.ensureLoaded(this.fileIconThemeLoader),this.applyAndSetFileIconTheme(ne,!0)),!0):!1})}applyAndSetFileIconTheme(Z,ne=!1){this.currentFileIconTheme=Z,se(Z.styleSheetContent,G),Z.id?this.container.classList.add(q):this.container.classList.remove(q),this.fileIconThemeWatcher.update(Z),Z.id&&this.sendTelemetry(Z.id,Z.extensionData,"fileIcon"),ne||this.onFileIconThemeChange.fire(this.currentFileIconTheme)}async getProductIconThemes(){return this.productIconThemeRegistry.getThemes()}getProductIconTheme(){return this.currentProductIconTheme}get onDidProductIconThemeChange(){return this.onProductIconThemeChange.event}async setProductIconTheme(Z,ne){return this.productIconThemeSequencer.queue(async()=>this.internalSetProductIconTheme(Z,ne))}async internalSetProductIconTheme(Z,ne){Z===void 0&&(Z="");const ce=p.isString(Z)?Z:Z.id;if(ce!==this.currentProductIconTheme.id||!this.currentProductIconTheme.isLoaded){let he=this.productIconThemeRegistry.findThemeById(ce);!he&&Z instanceof D.ProductIconThemeData&&(he=Z),he||(he=D.ProductIconThemeData.defaultTheme),await he.ensureLoaded(this.extensionResourceLoaderService,this.logService),this.applyAndSetProductIconTheme(he)}const de=this.currentProductIconTheme;return de.isLoaded&&ne!=="preview"&&(!de.location||!(0,g.getRemoteAuthority)(de.location))&&de.toStorage(this.storageService),await this.settings.setProductIconTheme(this.currentProductIconTheme,ne),de}async getMarketplaceProductIconThemes(Z,ne,ce){const de=this.extensionResourceLoaderService.getExtensionGalleryResourceURL({publisher:Z,name:ne,version:ce},"extension");if(de)try{const he=await this.extensionResourceLoaderService.readExtensionResource(n.joinPath(de,"package.json"));return this.productIconThemeRegistry.getMarketplaceThemes(JSON.parse(he),de,A.ExtensionData.fromName(Z,ne))}catch(he){this.logService.error("Problem loading themes from marketplace",he)}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 Z=this.settings.productIconTheme,ne=this.productIconThemeRegistry.findThemeBySettingsId(Z);return ne?(Z!==this.currentProductIconTheme.settingsId?await this.internalSetProductIconTheme(ne.id,void 0):ne!==this.currentProductIconTheme&&(await ne.ensureLoaded(this.extensionResourceLoaderService,this.logService),this.applyAndSetProductIconTheme(ne,!0)),!0):!1})}applyAndSetProductIconTheme(Z,ne=!1){this.currentProductIconTheme=Z,se(Z.styleSheetContent,Q),this.productIconThemeWatcher.update(Z),Z.id&&this.sendTelemetry(Z.id,Z.extensionData,"productIcon"),ne||this.onProductIconThemeChange.fire(this.currentProductIconTheme)}};re=we([F(0,R.IExtensionService),F(1,k.IStorageService),F(2,S.IConfigurationService),F(3,E.ITelemetryService),F(4,s.IBrowserWorkbenchEnvironmentService),F(5,d.IFileService),F(6,v.IExtensionResourceLoaderService),F(7,h.IWorkbenchLayoutService),F(8,T.ILogService),F(9,M.IHostColorSchemeService),F(10,N.IUserDataInitializationService),F(11,V.ILanguageService)],re),e.WorkbenchThemeService=re;class oe{constructor(Z,ne,ce){this.fileService=Z,this.environmentService=ne,this.onUpdate=ce}update(Z){n.isEqual(Z.location,this.watchedLocation)||(this.dispose(),Z.location&&(Z.watch||this.environmentService.isExtensionDevelopment)&&(this.watchedLocation=Z.location,this.watcherDisposable=this.fileService.watch(Z.location),this.fileService.onDidFilesChange(ne=>{this.watchedLocation&&ne.contains(this.watchedLocation,0)&&this.onUpdate()})))}dispose(){this.watcherDisposable=(0,f.dispose)(this.watcherDisposable),this.fileChangeListener=(0,f.dispose)(this.fileChangeListener),this.watchedLocation=void 0}}function se(te,Z){const ne=document.head.getElementsByClassName(Z);if(ne.length===0){const ce=document.createElement("style");ce.type="text/css",ce.className=Z,ce.textContent=te,document.head.appendChild(ce)}else ne[0].textContent=te}(0,a.registerColorThemeSchemas)(),(0,i.registerFileIconThemeSchemas)(),(0,y.registerProductIconThemeSchemas)(),(0,o.registerSingleton)(A.IWorkbenchThemeService,re,0)}),define(ae[2884],le([1,0,95,27,35,276,2,6,16,396,260,514,48,23,25,46,39,51,2061,26,47,7,36,66,9,45,69,14,5,441,842,330,21,11,32,24,57,43]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncWorkbenchService=e.isMergeEditorInput=void 0;class V{constructor(W,U){this.authenticationProviderId=W,this.session=U}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}}function z(H){const W=H;return h.URI.isUri(W?.base)&&h.URI.isUri(W?.input1?.uri)&&h.URI.isUri(W?.input2?.uri)&&h.URI.isUri(W?.result)}e.isMergeEditorInput=z;let x=class Ji extends k.Disposable{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(W=>this.isCurrentAccount(W))[0]}constructor(W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me,Se){super(),this.userDataSyncService=W,this.uriIdentityService=U,this.authenticationService=$,this.userDataSyncAccountService=q,this.quickInputService=X,this.storageService=G,this.userDataSyncEnablementService=Q,this.userDataAutoSyncService=j,this.telemetryService=K,this.logService=Y,this.productService=ee,this.extensionService=ie,this.environmentService=re,this.credentialsService=oe,this.notificationService=se,this.progressService=te,this.dialogService=Z,this.viewsService=ce,this.viewDescriptorService=de,this.userDataSyncStoreManagementService=he,this.lifecycleService=pe,this.instantiationService=me,this.editorService=Se,this._authenticationProviders=[],this._accountStatus="uninitialized",this._onDidChangeAccountStatus=this._register(new E.Emitter),this.onDidChangeAccountStatus=this._onDidChangeAccountStatus.event,this._all=new Map,this.turnOnSyncCancellationToken=void 0,this._cachedCurrentSessionId=null,this.syncEnablementContext=A.CONTEXT_SYNC_ENABLEMENT.bindTo(ne),this.syncStatusContext=A.CONTEXT_SYNC_STATE.bindTo(ne),this.accountStatusContext=A.CONTEXT_ACCOUNT_STATE.bindTo(ne),this.activityViewsEnablementContext=A.CONTEXT_ENABLE_ACTIVITY_VIEWS.bindTo(ne),this.hasConflicts=A.CONTEXT_HAS_CONFLICTS.bindTo(ne),this.enableConflictsViewContext=A.CONTEXT_ENABLE_SYNC_CONFLICTS_VIEW.bindTo(ne),this.userDataSyncStoreManagementService.userDataSyncStore&&(this.syncStatusContext.set(this.userDataSyncService.status),this._register(W.onDidChangeStatus(Ie=>this.syncStatusContext.set(Ie))),this.syncEnablementContext.set(Q.isEnabled()),this._register(Q.onDidChangeEnablement(Ie=>this.syncEnablementContext.set(Ie))),this.waitAndInitialize())}updateAuthenticationProviders(){this._authenticationProviders=(this.userDataSyncStoreManagementService.userDataSyncStore?.authenticationProviders||[]).filter(({id:W})=>this.authenticationService.declaredProviders.some(U=>U.id===W))}isSupportedAuthenticationProviderId(W){return this.authenticationProviders.some(({id:U})=>U===W)}async waitAndInitialize(){await this.extensionService.whenInstalledExtensionsRegistered();try{this.logService.trace("Settings Sync: Initializing accounts"),await this.initialize()}catch(W){this.environmentService.extensionTestsLocationURI||this.logService.error(W)}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 W=await(0,b.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService);this.currentSessionId===void 0&&this.useWorkbenchSessionId&&W?.id&&(this.currentSessionId=W?.id,this.useWorkbenchSessionId=!1),await this.update(),this._register(this.authenticationService.onDidChangeDeclaredProviders(()=>this.updateAuthenticationProviders())),this._register(E.Event.any(E.Event.filter(E.Event.any(this.authenticationService.onDidRegisterAuthenticationProvider,this.authenticationService.onDidUnregisterAuthenticationProvider),U=>this.isSupportedAuthenticationProviderId(U.id)),E.Event.filter(this.userDataSyncAccountService.onTokenFailed,U=>!U))(()=>this.update())),this._register(E.Event.filter(this.authenticationService.onDidChangeSessions,U=>this.isSupportedAuthenticationProviderId(U.providerId))(({event:U})=>this.onDidChangeSessions(U))),this._register(this.storageService.onDidChangeValue(U=>this.onDidChangeStorage(U))),this._register(E.Event.filter(this.userDataSyncAccountService.onTokenFailed,U=>U)(()=>this.onDidSuccessiveAuthFailures())),this.hasConflicts.set(this.userDataSyncService.conflicts.length>0),this._register(this.userDataSyncService.onDidChangeConflicts(U=>{this.hasConflicts.set(U.length>0),U.length||this.enableConflictsViewContext.reset(),this.editorService.editors.filter($=>((0,B.isDiffEditorInput)($)?$.original.resource:z($)?$.input1.uri:void 0)?.scheme!==t.USER_DATA_SYNC_SCHEME?!1:!this.userDataSyncService.conflicts.some(({conflicts:X})=>X.some(({previewResource:G})=>this.uriIdentityService.extUri.isEqual(G,$.resource)))).forEach($=>$.dispose())}))}async update(){this.updateAuthenticationProviders();const W=new Map;for(const{id:$,scopes:q}of this.authenticationProviders){this.logService.trace("Settings Sync: Getting accounts for",$);const X=await this.getAccounts($,q);W.set($,X),this.logService.trace("Settings Sync: Updated accounts for",$)}this._all=W;const U=this.current;await this.updateToken(U),this.updateAccountStatus(U?"available":"unavailable")}async getAccounts(W,U){const $=new Map;let q=null;const X=await this.authenticationService.getSessions(W,U)||[];for(const G of X){const Q=new V(W,G);$.set(Q.accountId,Q),this.isCurrentAccount(Q)&&(q=Q)}return q&&$.set(q.accountId,q),[...$.values()]}async updateToken(W){let U;if(W)try{this.logService.trace("Settings Sync: Updating the token for the account",W.accountName);const $=W.token;this.logService.trace("Settings Sync: Token updated for the account",W.accountName),U={token:$,authenticationProviderId:W.authenticationProviderId}}catch($){this.logService.error($)}await this.userDataSyncAccountService.updateAccount(U)}updateAccountStatus(W){if(this._accountStatus!==W){const U=this._accountStatus;this.logService.trace(`Settings Sync: Account status changed from ${U} to ${W}`),this._accountStatus=W,this.accountStatusContext.set(W),this._onDidChangeAccountStatus.fire(W)}}async turnOn(){if(!this.authenticationProviders.length)throw new Error((0,s.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 new L.CancellationError;if(this.accountStatus!=="available")throw new Error((0,s.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,s.localize)(2,null));const W=this.turnOnSyncCancellationToken=new O.CancellationTokenSource,U=w.isWeb?k.Disposable.None:this.lifecycleService.onBeforeShutdown($=>$.veto((async()=>{const q=await this.dialogService.confirm({type:"warning",message:(0,s.localize)(3,null),title:(0,s.localize)(4,null),primaryButton:(0,s.localize)(5,null),secondaryButton:(0,s.localize)(6,null)});return q.confirmed&&W.cancel(),!q.confirmed})(),"veto.settingsSync"));try{await this.doTurnOnSync(W.token)}finally{U.dispose(),this.turnOnSyncCancellationToken=void 0}await this.userDataAutoSyncService.turnOn(),this.userDataSyncStoreManagementService.userDataSyncStore?.canSwitch&&await this.synchroniseUserDataSyncStoreType(),this.notificationService.info((0,s.localize)(7,null,`${A.SYNC_TITLE} [(${(0,s.localize)(8,null)})](command:${A.SHOW_SYNC_LOG_COMMAND_ID})`))}async turnoff(W){if(this.userDataSyncEnablementService.isEnabled())return this.userDataAutoSyncService.turnOff(W);if(this.turnOnSyncCancellationToken)return this.turnOnSyncCancellationToken.cancel()}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(!w.isWeb||!this.userDataSyncStoreManagementService.userDataSyncStore)return;const W=this.userDataSyncStoreManagementService.userDataSyncStore.type==="insiders"?this.userDataSyncStoreManagementService.userDataSyncStore.stableUrl:this.userDataSyncStoreManagementService.userDataSyncStore.insidersUrl,U=this.instantiationService.createInstance(y.UserDataSyncStoreClient,W);U.setAuthToken(this.userDataSyncAccountService.account.token,this.userDataSyncAccountService.account.authenticationProviderId),await this.instantiationService.createInstance(T.UserDataSyncStoreTypeSynchronizer,U).sync(this.userDataSyncStoreManagementService.userDataSyncStore.type)}syncNow(){return this.userDataAutoSyncService.triggerSync(["Sync Now"],!1,!0)}async doTurnOnSync(W){const U=new k.DisposableStore,$=U.add(await this.userDataSyncService.createManualSyncTask());try{await this.progressService.withProgress({location:10,title:A.SYNC_TITLE,command:A.SHOW_SYNC_LOG_COMMAND_ID,delay:500},async q=>{q.report({message:(0,s.localize)(9,null)}),U.add(this.userDataSyncService.onDidChangeStatus(X=>{X==="hasConflicts"?q.report({message:(0,s.localize)(10,null)}):q.report({message:(0,s.localize)(11,null)})})),await $.merge(),this.userDataSyncService.status==="hasConflicts"&&await this.handleConflictsWhileTurningOn(W),await $.apply()})}catch(q){throw await $.stop(),q}finally{U.dispose()}}async handleConflictsWhileTurningOn(W){const U=await this.dialogService.show(d.Severity.Warning,(0,s.localize)(12,null),[(0,s.localize)(13,null),(0,s.localize)(14,null),(0,s.localize)(15,null),(0,s.localize)(16,null)],{detail:(0,s.localize)(17,null),cancelId:3});if(U.choice===0){const $=(0,M.raceCancellationError)(E.Event.toPromise(E.Event.filter(this.userDataSyncService.onDidChangeConflicts,q=>q.length===0)),W);await this.showConflicts(this.userDataSyncService.conflicts[0]?.conflicts[0]),await $}else if(U.choice===1||U.choice===2)for(const $ of this.userDataSyncService.conflicts)for(const q of $.conflicts)await this.accept({syncResource:$.syncResource,profile:$.profile},U.choice===1?q.remoteResource:q.localResource,void 0,{force:!0});else throw new L.CancellationError}async accept(W,U,$,q){return this.userDataSyncService.accept(W,U,$,q)}async showConflicts(W){if(!this.userDataSyncService.conflicts.length)return;this.enableConflictsViewContext.set(!0);const U=await this.viewsService.openView(A.SYNC_CONFLICTS_VIEW_ID);U&&W&&await U.open(W)}async resetSyncedData(){(await this.dialogService.confirm({message:(0,s.localize)(18,null),title:(0,s.localize)(19,null),type:"info",primaryButton:(0,s.localize)(20,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 W=this.viewDescriptorService.getViewContainerById(A.SYNC_VIEW_CONTAINER_ID);if(W){const U=this.viewDescriptorService.getViewContainerModel(W);U.activeViewDescriptors.length||await E.Event.toPromise(E.Event.filter(U.onDidChangeActiveViewDescriptors,$=>U.activeViewDescriptors.length>0))}}isCurrentAccount(W){return W.sessionId===this.currentSessionId}async signIn(){await this.pick()}async pick(){const W=await this.doPick();if(!W)return!1;let U,$,q,X;if((0,t.isAuthenticationProvider)(W)){const G=await this.authenticationService.createSession(W.id,W.scopes);U=G.id,$=G.account.label,q=G.account.id,X=W.id}else U=W.sessionId,$=W.accountName,q=W.accountId,X=W.authenticationProviderId;return await this.switch(U,$,q,X),!0}async doPick(){if(this.authenticationProviders.length!==0)return await this.update(),this.authenticationProviders.length===1&&!this.all.length?this.authenticationProviders[0]:new Promise(W=>{let U;const $=new k.DisposableStore,q=this.quickInputService.createQuickPick();$.add(q),q.title=A.SYNC_TITLE,q.ok=!1,q.placeholder=(0,s.localize)(21,null),q.ignoreFocusOut=!0,q.items=this.createQuickpickItems(),$.add(q.onDidAccept(()=>{U=q.selectedItems[0]?.account?q.selectedItems[0]?.account:q.selectedItems[0]?.authenticationProvider,q.hide()})),$.add(q.onDidHide(()=>{$.dispose(),W(U)})),q.show()})}createQuickpickItems(){const W=[];if(this.all.length){const U=[...this.authenticationProviders].sort(({id:$})=>$===this.current?.authenticationProviderId?-1:1);W.push({type:"separator",label:(0,s.localize)(22,null)});for(const $ of U){const q=(this._all.get($.id)||[]).sort(({sessionId:G})=>G===this.current?.sessionId?-1:1),X=this.authenticationService.getLabel($.id);for(const G of q)W.push({label:`${G.accountName} (${X})`,description:G.sessionId===this.current?.sessionId?(0,s.localize)(23,null):void 0,account:G,authenticationProvider:$})}W.push({type:"separator",label:(0,s.localize)(24,null)})}for(const U of this.authenticationProviders)if(!this.all.some(q=>q.authenticationProviderId===U.id)||this.authenticationService.supportsMultipleAccounts(U.id)){const q=this.authenticationService.getLabel(U.id);W.push({label:(0,s.localize)(25,null,q),authenticationProvider:U})}return W}async switch(W,U,$,q){const X=this.current;this.userDataSyncEnablementService.isEnabled()&&X&&X.accountName,this.currentSessionId=W,await this.update()}async onDidSuccessiveAuthFailures(){this.telemetryService.publicLog2("sync/successiveAuthFailures"),this.currentSessionId=void 0,await this.update(),this.userDataSyncEnablementService.isEnabled()&&this.notificationService.notify({severity:d.Severity.Error,message:(0,s.localize)(26,null),actions:{primary:[new o.Action("sign in",(0,s.localize)(27,null),void 0,!0,()=>this.signIn())]}})}onDidChangeSessions(W){this.currentSessionId&&W.removed.find(U=>U.id===this.currentSessionId)&&(this.currentSessionId=void 0),this.update()}onDidChangeStorage(W){W.key===Ji.CACHED_SESSION_STORAGE_KEY&&W.scope===-1&&this.currentSessionId!==this.getStoredCachedSessionId()&&(this._cachedCurrentSessionId=null,this.update())}get currentSessionId(){return this._cachedCurrentSessionId===null&&(this._cachedCurrentSessionId=this.getStoredCachedSessionId()),this._cachedCurrentSessionId}set currentSessionId(W){this._cachedCurrentSessionId!==W&&(this._cachedCurrentSessionId=W,W===void 0?(this.logService.info("Settings Sync: Reset current session"),this.storageService.remove(Ji.CACHED_SESSION_STORAGE_KEY,-1)):(this.logService.info("Settings Sync: Updated current session",W),this.storageService.store(Ji.CACHED_SESSION_STORAGE_KEY,W,-1,1)))}getStoredCachedSessionId(){return this.storageService.get(Ji.CACHED_SESSION_STORAGE_KEY,-1)}get useWorkbenchSessionId(){return!this.storageService.getBoolean(Ji.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY,-1,!1)}set useWorkbenchSessionId(W){this.storageService.store(Ji.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY,!W,-1,1)}};x.DONOT_USE_WORKBENCH_SESSION_STORAGE_KEY="userDataSyncAccount.donotUseWorkbenchSession",x.CACHED_SESSION_STORAGE_KEY="userDataSyncAccountPreference",x=we([F(0,t.IUserDataSyncService),F(1,P.IUriIdentityService),F(2,S.IAuthenticationService),F(3,C.IUserDataSyncAccountService),F(4,r.IQuickInputService),F(5,u.IStorageService),F(6,t.IUserDataSyncEnablementService),F(7,t.IUserDataAutoSyncService),F(8,p.ITelemetryService),F(9,i.ILogService),F(10,f.IProductService),F(11,c.IExtensionService),F(12,l.IWorkbenchEnvironmentService),F(13,_.ICredentialsService),F(14,d.INotificationService),F(15,g.IProgressService),F(16,n.IDialogService),F(17,a.IContextKeyService),F(18,v.IViewsService),F(19,v.IViewDescriptorService),F(20,t.IUserDataSyncStoreManagementService),F(21,m.ILifecycleService),F(22,D.IInstantiationService),F(23,N.IEditorService)],x),e.UserDataSyncWorkbenchService=x,(0,R.registerSingleton)(A.IUserDataSyncWorkbenchService,x,0)}),define(ae[2885],le([1,0,38,95,35,62,114]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let E=class{constructor(b,S,C,r){this.keybindingsService=b,this.textModelService=S,this.textResourcePropertiesService=C,this.textResourceConfigurationService=r}async resolveDefaultIgnoredSettings(){return(0,p.getDefaultIgnoredSettings)()}async resolveUserBindings(b){const S={};for(const C of b)S[C]=this.keybindingsService.resolveUserBinding(C).map(r=>r.getUserSettingsLabel()).join(" ");return S}async resolveFormattingOptions(b){try{const S=await this.textModelService.createModelReference(b),{insertSpaces:C,tabSize:r}=S.object.textEditorModel.getOptions(),u=S.object.textEditorModel.getEOL();return S.dispose(),{eol:u,insertSpaces:C,tabSize:r}}catch{}return{eol:this.textResourcePropertiesService.getEOL(b),insertSpaces:!!this.textResourceConfigurationService.getValue(b,"editor.insertSpaces"),tabSize:this.textResourceConfigurationService.getValue(b,"editor.tabSize")}}};E=we([F(0,t.IKeybindingService),F(1,A.ITextModelService),F(2,k.ITextResourcePropertiesService),F(3,k.ITextResourceConfigurationService)],E),(0,R.registerSingleton)(p.IUserDataSyncUtilService,E,1)}),define(ae[2886],le([1,0,95,102,6,35]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k=class{get onError(){return R.Event.map(this.channel.listen("onError"),I=>t.UserDataSyncError.toUserDataSyncError(I))}constructor(I){this.channel=I.getChannel("userDataAutoSync")}triggerSync(I,b,S){return this.channel.call("triggerSync",[I,b,S])}turnOn(){return this.channel.call("turnOn")}turnOff(I){return this.channel.call("turnOff",[I])}};k=we([F(0,p.ISharedProcessService)],k),(0,A.registerSingleton)(t.IUserDataAutoSyncService,k,1)}),define(ae[2887],le([1,0,102,35,2,6,514]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserDataSyncAccountService=void 0;let E=class extends R.Disposable{get account(){return this._account}get onTokenFailed(){return this.channel.listen("onTokenFailed")}constructor(b){super(),this._onDidChangeAccount=this._register(new A.Emitter),this.onDidChangeAccount=this._onDidChangeAccount.event,this.channel=b.getChannel("userDataSyncAccount"),this.channel.call("_getInitialData").then(S=>{this._account=S,this._register(this.channel.listen("onDidChangeAccount")(C=>{this._account=C,this._onDidChangeAccount.fire(C)}))})}updateAccount(b){return this.channel.call("updateAccount",b)}};E=we([F(0,t.ISharedProcessService)],E),e.UserDataSyncAccountService=E,(0,p.registerSingleton)(k.IUserDataSyncAccountService,E,1)}),define(ae[2888],le([1,0,102,2,35,625]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let k=class extends p.Disposable{get onDidChange(){return this.channel.listen("onDidChange")}constructor(I){super(),this.channel=I.getChannel("userDataSyncMachines")}getMachines(){return this.channel.call("getMachines")}addCurrentMachine(){return this.channel.call("addCurrentMachine")}removeCurrentMachine(){return this.channel.call("removeCurrentMachine")}renameMachine(I,b){return this.channel.call("renameMachine",[I,b])}setEnablements(I){return this.channel.call("setEnablements",I)}};k=we([F(0,t.ISharedProcessService)],k),(0,R.registerSingleton)(A.IUserDataSyncMachinesService,k,1)}),define(ae[2889],le([1,0,95,102,2264]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSharedProcessRemoteService)(t.IUserDataSyncService,"userDataSync",{channelClientCtor:R.UserDataSyncChannelClient})}),define(ae[2890],le([1,0,95,102,23,441,46,8,35,828]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let S=class extends A.AbstractUserDataSyncStoreManagementService{constructor(r,u,i,f){super(r,u,i),this.channelClient=this._register(new b.UserDataSyncStoreManagementServiceChannelClient(f.getChannel("userDataSyncStoreManagement"))),this._register(this.channelClient.onDidChangeUserDataSyncStore(()=>this.updateUserDataSyncStore()))}async switch(r){return this.channelClient.switch(r)}async getPreviousUserDataSyncStore(){return this.channelClient.getPreviousUserDataSyncStore()}};S=we([F(0,k.IProductService),F(1,E.IConfigurationService),F(2,R.IStorageService),F(3,p.ISharedProcessService)],S),(0,I.registerSingleton)(t.IUserDataSyncStoreManagementService,S,1)}),define(ae[2891],le([1,0]),function(J,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(R){if(R&&this._dragOperations.has(R)){const A=this._dragOperations.get(R);return this._dragOperations.delete(R),A}}addDragOperationTransfer(R,A){this._dragOperations.set(R,A)}getRenderedTreeElement(R){if(this._renderedElements.has(R))return this._renderedElements.get(R)}addRenderedTreeItemElement(R,A){this._renderedElements.set(R,A)}removeRenderedTreeItemElement(R){this._renderedElements.has(R)&&this._renderedElements.delete(R)}}e.TreeviewsService=t}),define(ae[556],le([1,0,35,5,2891]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsService=void 0,e.ITreeViewsService=(0,p.createDecorator)("treeViewsService"),(0,t.registerSingleton)(e.ITreeViewsService,R.TreeviewsService,1)}),define(ae[2892],le([1,0,45,7,23,17,2,6,5,9,16,13,18,12,399,2064,25,51,15,70,132]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContainerModel=e.getViewsStateStorageId=void 0;function a(m){return(0,r.joinPath)(m.windowLogsPath,"views.log")}(0,s.registerAction2)(class extends s.Action2{constructor(){super({id:"_workbench.output.showViewsLog",title:{value:"Show Views Log",original:"Show Views Log"},category:d.Categories.Developer,f1:!0})}async run(m){const w=m.get(n.IOutputService),D=m.get(l.IWorkbenchEnvironmentService);A.Registry.as(n.Extensions.OutputChannels).registerChannel({id:"viewsLog",label:(0,f.localize)(0,null),file:a(D),log:!0}),w.showChannel("viewsLog")}});function o(m){return`${m}.hidden`}e.getViewsStateStorageId=o;class g{constructor(){this.map=new Map}add(w){return this.map.set(w,(this.map.get(w)||0)+1),this}delete(w){let D=this.map.get(w)||0;return D===0?!1:(D--,D===0?this.map.delete(w):this.map.set(w,D),!0)}has(w){return this.map.has(w)}}let h=class extends k.Disposable{constructor(w,D,y,T,_){super(),this.viewContainerName=D,this.storageService=y,this._onDidChangeStoredState=this._register(new E.Emitter),this.onDidChangeStoredState=this._onDidChangeStoredState.event,this.logger=T.createLogger(a(_)),this.globalViewsStateStorageId=o(w),this.workspaceViewsStateStorageId=w,this._register(this.storageService.onDidChangeValue(L=>this.onDidStorageChange(L))),this.state=this.initialize(),A.Registry.as(i.Extensions.ProfileStorageRegistry).registerKeys([{key:this.globalViewsStateStorageId,description:(0,f.localize)(1,null,D)}])}set(w,D){this.state.set(w,D)}get(w){return this.state.get(w)}updateState(w){this.updateWorkspaceState(w),this.updateGlobalState(w)}updateWorkspaceState(w){const D=this.getStoredWorkspaceState();for(const y of w){const T=this.get(y.id);T&&(D[y.id]={collapsed:!!T.collapsed,isHidden:!T.visibleWorkspace,size:T.size,order:y.workspace&&T?T.order:void 0})}Object.keys(D).length>0?this.storageService.store(this.workspaceViewsStateStorageId,JSON.stringify(D),1,1):this.storageService.remove(this.workspaceViewsStateStorageId,1)}updateGlobalState(w){const D=this.getStoredGlobalState();for(const y of w){const T=this.get(y.id);D.set(y.id,{id:y.id,isHidden:T&&y.canToggleVisibility?!T.visibleGlobal:!1,order:!y.workspace&&T?T.order:void 0})}this.setStoredGlobalState(D)}onDidStorageChange(w){if(w.key===this.globalViewsStateStorageId&&w.scope===0&&this.globalViewsStatesValue!==this.getStoredGlobalViewsStatesValue()){this._globalViewsStatesValue=void 0;const D=this.getStoredGlobalState(),y=this.getStoredWorkspaceState(),T=[];for(const[_,L]of D){const M=this.get(_);if(M)M.visibleGlobal!==!L.isHidden&&(L.isHidden||this.logger.info(`View visibility state changed: ${_} is now visible`,this.viewContainerName),T.push({id:_,visible:!L.isHidden}));else{const O=y[_];this.set(_,{active:!1,visibleGlobal:!L.isHidden,visibleWorkspace:(0,C.isUndefined)(O?.isHidden)?void 0:!O?.isHidden,collapsed:O?.collapsed,order:O?.order,size:O?.size})}}T.length&&this._onDidChangeStoredState.fire(T)}}initialize(){const w=new Map,D=this.getStoredWorkspaceState();for(const M of Object.keys(D)){const O=D[M];w.set(M,{active:!1,visibleGlobal:void 0,visibleWorkspace:(0,C.isUndefined)(O.isHidden)?void 0:!O.isHidden,collapsed:O.collapsed,order:O.order,size:O.size})}const y=this.storageService.get(this.globalViewsStateStorageId,1,"[]"),{state:T}=this.parseStoredGlobalState(y);if(T.size>0){for(const{id:M,isHidden:O}of T.values()){const N=w.get(M);N?(0,C.isUndefined)(N.visibleWorkspace)&&(N.visibleWorkspace=!O):w.set(M,{active:!1,collapsed:void 0,visibleGlobal:void 0,visibleWorkspace:!O})}this.storageService.remove(this.globalViewsStateStorageId,1)}const{state:_,hasDuplicates:L}=this.parseStoredGlobalState(this.globalViewsStatesValue);L&&this.setStoredGlobalState(_);for(const{id:M,isHidden:O,order:N}of _.values()){const P=w.get(M);P?(P.visibleGlobal=!O,(0,C.isUndefined)(N)||(P.order=N)):w.set(M,{active:!1,visibleGlobal:!O,order:N,collapsed:void 0,visibleWorkspace:void 0})}return w}getStoredWorkspaceState(){return JSON.parse(this.storageService.get(this.workspaceViewsStateStorageId,1,"{}"))}getStoredGlobalState(){return this.parseStoredGlobalState(this.globalViewsStatesValue).state}setStoredGlobalState(w){this.globalViewsStatesValue=JSON.stringify([...w.values()])}parseStoredGlobalState(w){const D=JSON.parse(w);let y=!1;return{state:D.reduce((_,L)=>(typeof L=="string"?(y=y||_.has(L),_.set(L,{id:L,isHidden:!0})):(y=y||_.has(L.id),_.set(L.id,L)),_),new Map),hasDuplicates:y}}get globalViewsStatesValue(){return this._globalViewsStatesValue||(this._globalViewsStatesValue=this.getStoredGlobalViewsStatesValue()),this._globalViewsStatesValue}set globalViewsStatesValue(w){this.globalViewsStatesValue!==w&&(this._globalViewsStatesValue=w,this.setStoredGlobalViewsStatesValue(w))}getStoredGlobalViewsStatesValue(){return this.storageService.get(this.globalViewsStateStorageId,0,"[]")}setStoredGlobalViewsStatesValue(w){this.storageService.store(this.globalViewsStateStorageId,w,0,0)}};h=we([F(2,R.IStorageService),F(3,c.ILoggerService),F(4,l.IWorkbenchEnvironmentService)],h);let v=class extends k.Disposable{get title(){return this._title}get icon(){return this._icon}get keybindingId(){return this._keybindingId}get allViewDescriptors(){return this.viewDescriptorItems.map(w=>w.viewDescriptor)}get activeViewDescriptors(){return this.viewDescriptorItems.filter(w=>w.state.active).map(w=>w.viewDescriptor)}get visibleViewDescriptors(){return this.viewDescriptorItems.filter(w=>this.isViewDescriptorVisible(w)).map(w=>w.viewDescriptor)}constructor(w,D,y,T,_){super(),this.viewContainer=w,this.contextKeyService=y,this.contextKeys=new g,this.viewDescriptorItems=[],this._onDidChangeContainerInfo=this._register(new E.Emitter),this.onDidChangeContainerInfo=this._onDidChangeContainerInfo.event,this._onDidChangeAllViewDescriptors=this._register(new E.Emitter),this.onDidChangeAllViewDescriptors=this._onDidChangeAllViewDescriptors.event,this._onDidChangeActiveViewDescriptors=this._register(new E.Emitter),this.onDidChangeActiveViewDescriptors=this._onDidChangeActiveViewDescriptors.event,this._onDidAddVisibleViewDescriptors=this._register(new E.Emitter),this.onDidAddVisibleViewDescriptors=this._onDidAddVisibleViewDescriptors.event,this._onDidRemoveVisibleViewDescriptors=this._register(new E.Emitter),this.onDidRemoveVisibleViewDescriptors=this._onDidRemoveVisibleViewDescriptors.event,this._onDidMoveVisibleViewDescriptors=this._register(new E.Emitter),this.onDidMoveVisibleViewDescriptors=this._onDidMoveVisibleViewDescriptors.event,this.logger=T.createLogger(a(_)),this._register(E.Event.filter(y.onDidChangeContext,L=>L.affectsSome(this.contextKeys))(()=>this.onDidChangeContext())),this.viewDescriptorsState=this._register(D.createInstance(h,w.storageId||`${w.id}.state`,typeof w.title=="string"?w.title:w.title.original)),this._register(this.viewDescriptorsState.onDidChangeStoredState(L=>this.updateVisibility(L))),this._register(E.Event.any(E.Event.map(this.onDidAddVisibleViewDescriptors,L=>`Added views:${L.map(M=>M.viewDescriptor.id).join(",")} in ${this.viewContainer.id}`),E.Event.map(this.onDidRemoveVisibleViewDescriptors,L=>`Removed views:${L.map(M=>M.viewDescriptor.id).join(",")} from ${this.viewContainer.id}`),E.Event.map(this.onDidMoveVisibleViewDescriptors,({from:L,to:M})=>`Moved view ${L.viewDescriptor.id} to ${M.viewDescriptor.id} in ${this.viewContainer.id}`))(L=>{this.logger.info(L),this.viewDescriptorsState.updateState(this.allViewDescriptors),this.updateContainerInfo()})),this.updateContainerInfo()}updateContainerInfo(){const w=this.viewContainer.alwaysUseContainerInfo||this.visibleViewDescriptors.length===0||this.visibleViewDescriptors.some(O=>A.Registry.as(t.Extensions.ViewsRegistry).getViewContainer(O.id)===this.viewContainer),D=w?typeof this.viewContainer.title=="string"?this.viewContainer.title:this.viewContainer.title.value:this.visibleViewDescriptors[0]?.containerTitle||this.visibleViewDescriptors[0]?.name||"";let y=!1;this._title!==D&&(this._title=D,y=!0);const T=w?this.viewContainer.icon:this.visibleViewDescriptors[0]?.containerIcon||t.defaultViewIcon;let _=!1;this.isEqualIcon(T)||(this._icon=T,_=!0);const L=this.viewContainer.openCommandActionDescriptor?.id??this.activeViewDescriptors.find(O=>O.openCommandActionDescriptor)?.openCommandActionDescriptor?.id;let M=!1;this._keybindingId!==L&&(this._keybindingId=L,M=!0),(y||_||M)&&this._onDidChangeContainerInfo.fire({title:y,icon:_,keybindingId:M})}isEqualIcon(w){return b.URI.isUri(w)?b.URI.isUri(this._icon)&&(0,r.isEqual)(w,this._icon):u.ThemeIcon.isThemeIcon(w)?u.ThemeIcon.isThemeIcon(this._icon)&&u.ThemeIcon.isEqual(w,this._icon):w===this._icon}isVisible(w){const D=this.viewDescriptorItems.find(y=>y.viewDescriptor.id===w);if(!D)throw new Error(`Unknown view ${w}`);return this.isViewDescriptorVisible(D)}setVisible(w,D){this.updateVisibility([{id:w,visible:D}])}updateVisibility(w){const D=(0,S.coalesce)(w.filter(({visible:_})=>!_).map(({id:_})=>this.findAndIgnoreIfNotFound(_))),y=[];for(const{viewDescriptorItem:_,visibleIndex:L}of D)this.updateViewDescriptorItemVisibility(_,!1)&&y.push({viewDescriptor:_.viewDescriptor,index:L});y.length&&this.broadCastRemovedVisibleViewDescriptors(y);const T=[];for(const{id:_,visible:L}of w){if(!L)continue;const M=this.findAndIgnoreIfNotFound(_);if(!M)continue;const{viewDescriptorItem:O,visibleIndex:N}=M;this.updateViewDescriptorItemVisibility(O,!0)&&T.push({index:N,viewDescriptor:O.viewDescriptor,size:O.state.size,collapsed:!!O.state.collapsed})}T.length&&this.broadCastAddedVisibleViewDescriptors(T)}updateViewDescriptorItemVisibility(w,D){return!w.viewDescriptor.canToggleVisibility||this.isViewDescriptorVisibleWhenActive(w)===D?!1:(w.viewDescriptor.workspace?w.state.visibleWorkspace=D:(w.state.visibleGlobal=D,D&&this.logger.info(`Showing view ${w.viewDescriptor.id} in the container ${this.viewContainer.id}`)),this.isViewDescriptorVisible(w)===D)}isCollapsed(w){return!!this.find(w).viewDescriptorItem.state.collapsed}setCollapsed(w,D){const{viewDescriptorItem:y}=this.find(w);y.state.collapsed!==D&&(y.state.collapsed=D),this.viewDescriptorsState.updateState(this.allViewDescriptors)}getSize(w){return this.find(w).viewDescriptorItem.state.size}setSizes(w){for(const{id:D,size:y}of w){const{viewDescriptorItem:T}=this.find(D);T.state.size!==y&&(T.state.size=y)}this.viewDescriptorsState.updateState(this.allViewDescriptors)}move(w,D){const y=this.viewDescriptorItems.findIndex(M=>M.viewDescriptor.id===w),T=this.viewDescriptorItems.findIndex(M=>M.viewDescriptor.id===D),_=this.viewDescriptorItems[y],L=this.viewDescriptorItems[T];(0,S.move)(this.viewDescriptorItems,y,T);for(let M=0;M<this.viewDescriptorItems.length;M++)this.viewDescriptorItems[M].state.order=M;this._onDidMoveVisibleViewDescriptors.fire({from:{index:y,viewDescriptor:_.viewDescriptor},to:{index:T,viewDescriptor:L.viewDescriptor}})}add(w){const D=[];for(const _ of w){const L=_.viewDescriptor;if(L.when)for(const O of L.when.keys())this.contextKeys.add(O);let M=this.viewDescriptorsState.get(L.id);if(M){if(L.workspace)M.visibleWorkspace=(0,C.isUndefinedOrNull)(_.visible)?(0,C.isUndefinedOrNull)(M.visibleWorkspace)?!L.hideByDefault:M.visibleWorkspace:_.visible;else{const O=M.visibleGlobal;M.visibleGlobal=(0,C.isUndefinedOrNull)(_.visible)?(0,C.isUndefinedOrNull)(M.visibleGlobal)?!L.hideByDefault:M.visibleGlobal:_.visible,M.visibleGlobal&&!O&&this.logger.info(`Added view ${L.id} in the container ${this.viewContainer.id} and showing it.`,`${O}`,`${L.hideByDefault}`,`${_.visible}`)}M.collapsed=(0,C.isUndefinedOrNull)(_.collapsed)?(0,C.isUndefinedOrNull)(M.collapsed)?!!L.collapsed:M.collapsed:_.collapsed}else M={active:!1,visibleGlobal:(0,C.isUndefinedOrNull)(_.visible)?!L.hideByDefault:_.visible,visibleWorkspace:(0,C.isUndefinedOrNull)(_.visible)?!L.hideByDefault:_.visible,collapsed:(0,C.isUndefinedOrNull)(_.collapsed)?!!L.collapsed:_.collapsed};this.viewDescriptorsState.set(L.id,M),M.active=this.contextKeyService.contextMatchesRules(L.when),D.push({viewDescriptor:L,state:M})}this.viewDescriptorItems.push(...D),this.viewDescriptorItems.sort(this.compareViewDescriptors.bind(this)),this._onDidChangeAllViewDescriptors.fire({added:D.map(({viewDescriptor:_})=>_),removed:[]});const y=[];for(const _ of D)_.state.active&&y.push({viewDescriptorItem:_,visible:this.isViewDescriptorVisible(_)});y.length&&this._onDidChangeActiveViewDescriptors.fire({added:y.map(({viewDescriptorItem:_})=>_.viewDescriptor),removed:[]});const T=[];for(const{viewDescriptorItem:_,visible:L}of y)if(L&&this.isViewDescriptorVisible(_)){const{visibleIndex:M}=this.find(_.viewDescriptor.id);T.push({index:M,viewDescriptor:_.viewDescriptor,size:_.state.size,collapsed:!!_.state.collapsed})}this.broadCastAddedVisibleViewDescriptors(T)}remove(w){const D=[],y=[],T=[],_=[];for(const L of w){if(L.when)for(const O of L.when.keys())this.contextKeys.delete(O);const M=this.viewDescriptorItems.findIndex(O=>O.viewDescriptor.id===L.id);if(M!==-1){D.push(L);const O=this.viewDescriptorItems[M];if(O.state.active&&T.push(O.viewDescriptor),this.isViewDescriptorVisible(O)){const{visibleIndex:N}=this.find(O.viewDescriptor.id);_.push({index:N,viewDescriptor:O.viewDescriptor})}y.push(O)}}y.forEach(L=>this.viewDescriptorItems.splice(this.viewDescriptorItems.indexOf(L),1)),this.broadCastRemovedVisibleViewDescriptors(_),T.length&&this._onDidChangeActiveViewDescriptors.fire({added:[],removed:T}),D.length&&this._onDidChangeAllViewDescriptors.fire({added:[],removed:D})}onDidChangeContext(){const w=[],D=[];for(const _ of this.viewDescriptorItems){const L=_.state.active,M=this.contextKeyService.contextMatchesRules(_.viewDescriptor.when);L!==M&&(M?w.push({item:_,visibleWhenActive:this.isViewDescriptorVisibleWhenActive(_)}):D.push(_))}const y=[];for(const _ of D)if(this.isViewDescriptorVisible(_)){const{visibleIndex:L}=this.find(_.viewDescriptor.id);y.push({index:L,viewDescriptor:_.viewDescriptor})}D.forEach(_=>_.state.active=!1),w.forEach(({item:_})=>_.state.active=!0),this.broadCastRemovedVisibleViewDescriptors(y),(w.length||D.length)&&this._onDidChangeActiveViewDescriptors.fire({added:w.map(({item:_})=>_.viewDescriptor),removed:D.map(_=>_.viewDescriptor)});const T=[];for(const{item:_,visibleWhenActive:L}of w)if(L&&this.isViewDescriptorVisible(_)){const{visibleIndex:M}=this.find(_.viewDescriptor.id);T.push({index:M,viewDescriptor:_.viewDescriptor,size:_.state.size,collapsed:!!_.state.collapsed})}this.broadCastAddedVisibleViewDescriptors(T)}broadCastAddedVisibleViewDescriptors(w){w.length&&this._onDidAddVisibleViewDescriptors.fire(w.sort((D,y)=>D.index-y.index))}broadCastRemovedVisibleViewDescriptors(w){w.length&&this._onDidRemoveVisibleViewDescriptors.fire(w.sort((D,y)=>y.index-D.index))}isViewDescriptorVisible(w){return w.state.active?this.isViewDescriptorVisibleWhenActive(w):!1}isViewDescriptorVisibleWhenActive(w){return w.viewDescriptor.workspace?!!w.state.visibleWorkspace:!!w.state.visibleGlobal}find(w){const D=this.findAndIgnoreIfNotFound(w);if(D)return D;throw new Error(`view descriptor ${w} not found`)}findAndIgnoreIfNotFound(w){for(let D=0,y=0;D<this.viewDescriptorItems.length;D++){const T=this.viewDescriptorItems[D];if(T.viewDescriptor.id===w)return{index:D,visibleIndex:y,viewDescriptorItem:T};this.isViewDescriptorVisible(T)&&y++}}compareViewDescriptors(w,D){return w.viewDescriptor.id===D.viewDescriptor.id?0:this.getViewOrder(w)-this.getViewOrder(D)||this.getGroupOrderResult(w.viewDescriptor,D.viewDescriptor)}getViewOrder(w){const D=typeof w.state.order=="number"?w.state.order:w.viewDescriptor.order;return typeof D=="number"?D:Number.MAX_VALUE}getGroupOrderResult(w,D){return!w.group||!D.group||w.group===D.group?0:w.group<D.group?-1:1}};v=we([F(1,I.IInstantiationService),F(2,p.IContextKeyService),F(3,c.ILoggerService),F(4,l.IWorkbenchEnvironmentService)],v),e.ViewContainerModel=v}),define(ae[986],le([1,0,11,6,2,19]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceWorkingCopy=void 0;let k=class extends R.Disposable{constructor(I,b){super(),this.resource=I,this.fileService=b,this._onDidChangeOrphaned=this._register(new p.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this.orphaned=!1,this._onWillDispose=this._register(new p.Emitter),this.onWillDispose=this._onWillDispose.event,this.disposed=!1,this._register(this.fileService.onDidFilesChange(S=>this.onDidFilesChange(S)))}isOrphaned(){return this.orphaned}async onDidFilesChange(I){let b=!1,S;if(this.orphaned?I.contains(this.resource,1)&&(S=!1,b=!0):I.contains(this.resource,2)&&(S=!0,b=!0),b&&this.orphaned!==S){let C=!1;S&&(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=we([F(1,A.IFileService)],k),e.ResourceWorkingCopy=k}),define(ae[2893],le([1,0,2068,11,32,25,66,2,16]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredFileWorkingCopySaveParticipant=void 0;let b=class extends E.Disposable{get length(){return this.saveParticipants.length}constructor(C,r){super(),this.progressService=C,this.logService=r,this.saveParticipants=[]}addSaveParticipant(C){const r=(0,I.insert)(this.saveParticipants,C);return(0,E.toDisposable)(()=>r())}participate(C,r,u){const i=new R.CancellationTokenSource(u);return this.progressService.withProgress({title:(0,t.localize)(0,null,C.name),location:15,cancellable:!0,delay:C.isDirty()?3e3:5e3},async f=>{C.model?.pushStackElement();for(const c of this.saveParticipants){if(i.token.isCancellationRequested||C.isDisposed())break;try{const l=c.participate(C,r,f,i.token);await(0,p.raceCancellation)(l,i.token)}catch(l){this.logService.warn(l)}}C.model?.pushStackElement()},()=>{i.dispose(!0)})}dispose(){this.saveParticipants.splice(0,this.saveParticipants.length)}};b=we([F(0,k.IProgressService),F(1,A.ILogService)],b),e.StoredFileWorkingCopySaveParticipant=b}),define(ae[354],le([1,0]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NO_TYPE_ID=e.WorkingCopyCapabilities=void 0;var t;(function(p){p[p.None=0]="None",p[p.Untitled=2]="Untitled"})(t=e.WorkingCopyCapabilities||(e.WorkingCopyCapabilities={})),e.NO_TYPE_ID=""}),define(ae[170],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkingCopyBackupService=void 0,e.IWorkingCopyBackupService=(0,t.createDecorator)("workingCopyBackupService")}),define(ae[2894],le([1,0,54,42,5,553,170,13,94,342,6,60]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchEditorModelFactory=e.SearchEditorModel=e.SearchConfigurationModel=void 0;class r{constructor(c){this.config=c,this._onConfigDidUpdate=new S.Emitter,this.onConfigDidUpdate=this._onConfigDidUpdate.event}updateConfig(c){this.config=c,this._onConfigDidUpdate.fire(c)}}e.SearchConfigurationModel=r;let u=class{constructor(c,l){this.resource=c,this.workingCopyBackupService=l}async resolve(){return(0,E.assertIsDefined)(e.searchEditorModelFactory.models.get(this.resource)).resolve()}};u=we([F(1,k.IWorkingCopyBackupService)],u),e.SearchEditorModel=u;class i{constructor(){this.models=new C.ResourceMap}initializeModelFromExistingModel(c,l,s){if(this.models.has(l))throw Error("Unable to contruct model for resource that already exists");const d=c.get(p.ILanguageService),n=c.get(t.IModelService),a=c.get(R.IInstantiationService),o=c.get(k.IWorkingCopyBackupService);let g;this.models.set(l,{resolve:()=>(g||(g=(async()=>{const h=await this.tryFetchModelFromBackupService(l,d,n,o,a);return h||Promise.resolve({resultsModel:n.getModel(l)??n.createModel("",d.createById("search-result"),l),configurationModel:new r(s)})})()),g)})}initializeModelFromRawData(c,l,s,d){if(this.models.has(l))throw Error("Unable to contruct model for resource that already exists");const n=c.get(p.ILanguageService),a=c.get(t.IModelService),o=c.get(R.IInstantiationService),g=c.get(k.IWorkingCopyBackupService);let h;this.models.set(l,{resolve:()=>(h||(h=(async()=>{const v=await this.tryFetchModelFromBackupService(l,n,a,g,o);return v||Promise.resolve({resultsModel:a.createModel(d??"",n.createById("search-result"),l),configurationModel:new r(s)})})()),h)})}initializeModelFromExistingFile(c,l,s){if(this.models.has(l))throw Error("Unable to contruct model for resource that already exists");const d=c.get(p.ILanguageService),n=c.get(t.IModelService),a=c.get(R.IInstantiationService),o=c.get(k.IWorkingCopyBackupService);let g;this.models.set(l,{resolve:async()=>(g||(g=(async()=>{const h=await this.tryFetchModelFromBackupService(l,d,n,o,a);if(h)return h;const{text:v,config:m}=await a.invokeFunction(A.parseSavedSearchEditor,s);return{resultsModel:n.createModel(v??"",d.createById("search-result"),l),configurationModel:new r(m)}})()),g)})}async tryFetchModelFromBackupService(c,l,s,d,n){const a=await d.resolve({resource:c,typeId:b.SearchEditorWorkingCopyTypeId});let o=s.getModel(c);if(!o&&a){const g=await(0,I.createTextBufferFactoryFromStream)(a.value);o=s.createModel(g,l.createById("search-result"),c)}if(o){const g=o.getValue(),{text:h,config:v}=(0,A.parseSerializedSearchEditor)(g);return s.destroyModel(c),{resultsModel:s.createModel(h??"",l.createById("search-result"),c),configurationModel:new r(v)}}else return}}e.searchEditorModelFactory=new i}),define(ae[987],le([1,0,31,16,5,24,21,34,8,170,69,19,18,83,661,51,23,213,46]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StartupPageContribution=e.restoreWalkthroughsConfigurationKey=void 0,e.restoreWalkthroughsConfigurationKey="workbench.welcomePage.restorableWalkthroughs";const d="workbench.startupEditor",n="workbench.welcome.enabled",a="workbench.telemetryOptOutShown";let o=class{constructor(v,m,w,D,y,T,_,L,M,O,N,P){this.instantiationService=v,this.configurationService=m,this.editorService=w,this.workingCopyBackupService=D,this.fileService=y,this.contextService=T,this.lifecycleService=_,this.layoutService=L,this.productService=M,this.commandService=O,this.environmentService=N,this.storageService=P,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(g(this.configurationService,this.contextService,this.environmentService)&&this.lifecycleService.startupKind!==3){if(await this.workingCopyBackupService.hasBackups())return;if(!this.editorService.activeEditor||this.layoutService.openedDefaultEditors){const w=this.configurationService.inspect(d);w.value==="readme"&&(w.userValue==="readme"||w.defaultValue==="readme")?await this.openReadme():await this.openGettingStarted()}}}tryOpenWalkthroughForFolder(){const v=this.storageService.get(e.restoreWalkthroughsConfigurationKey,0);if(v){const m=JSON.parse(v),w=this.contextService.getWorkspace();if(m.folder===w.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 v=p.coalesce(await Promise.all(this.contextService.getWorkspace().folders.map(async m=>{const w=m.uri,D=await this.fileService.resolve(w).catch(k.onUnexpectedError),y=D?.children?D.children.map(_=>_.name).sort():[],T=y.find(_=>_.toLowerCase()==="readme.md")||y.find(_=>_.toLowerCase().startsWith("readme"));if(T)return(0,r.joinPath)(w,T)})));if(!this.editorService.activeEditor)if(v.length){const m=w=>w.path.toLowerCase().endsWith(".md");await Promise.all([this.commandService.executeCommand("markdown.showPreview",null,v.filter(m),{locked:!0}),this.editorService.openEditors(v.filter(w=>!m(w)).map(w=>({resource:w})))])}else await this.openGettingStarted()}async openGettingStarted(v){const m=i.gettingStartedInputTypeId,w=this.editorService.activeEditor;if(w?.typeId===m||this.editorService.editors.some(y=>y.typeId===m))return;const D=w?{pinned:!1,index:0}:{pinned:!1};m===i.gettingStartedInputTypeId&&this.editorService.openEditor(this.instantiationService.createInstance(i.GettingStartedInput,{showTelemetryNotice:v}),D)}};o=we([F(0,R.IInstantiationService),F(1,I.IConfigurationService),F(2,A.IEditorService),F(3,b.IWorkingCopyBackupService),F(4,C.IFileService),F(5,E.IWorkspaceContextService),F(6,S.ILifecycleService),F(7,u.IWorkbenchLayoutService),F(8,s.IProductService),F(9,t.ICommandService),F(10,f.IWorkbenchEnvironmentService),F(11,c.IStorageService)],o),e.StartupPageContribution=o;function g(h,v,m){if(m.skipWelcome)return!1;const w=h.inspect(d);if(!w.userValue&&!w.workspaceValue){const D=h.inspect(n);if(D.value!==void 0&&D.value!==null)return D.value}return w.value==="readme"&&w.userValue!=="readme"&&w.defaultValue!=="readme"&&console.error(`Warning: 'workbench.startupEditor: readme' setting ignored due to being set somewhere other than user or default settings (user=${w.userValue}, default=${w.defaultValue})`),w.value==="welcomePage"||w.value==="readme"&&(w.userValue==="readme"||w.defaultValue==="readme")||v.getWorkbenchState()===1&&w.value==="welcomePageInEmptyWorkbench"}}),define(ae[988],le([1,0,6,2,60,11,19,25,170]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseFileWorkingCopyManager=void 0;let b=class extends p.Disposable{constructor(C,r,u){super(),this.fileService=C,this.logService=r,this.workingCopyBackupService=u,this._onDidCreate=this._register(new t.Emitter),this.onDidCreate=this._onDidCreate.event,this.mapResourceToWorkingCopy=new R.ResourceMap,this.mapResourceToDisposeListener=new R.ResourceMap}has(C){return this.mapResourceToWorkingCopy.has(C)}add(C,r){this.get(C)!==r&&(this.mapResourceToWorkingCopy.set(C,r),this.mapResourceToDisposeListener.get(C)?.dispose(),this.mapResourceToDisposeListener.set(C,r.onWillDispose(()=>this.remove(C))),this._onDidCreate.fire(r))}remove(C){const r=this.mapResourceToDisposeListener.get(C);return r&&((0,p.dispose)(r),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,p.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,p.dispose)(this.mapResourceToWorkingCopy.values()),this.dispose()}async saveWithFallback(C){let r=!1;try{r=await C.save()}catch{}if(!r||C.isDirty()){const u=await this.workingCopyBackupService.resolve(C);u&&await this.fileService.writeFile(C.resource,u.value,{unlock:!0})}}};b=we([F(0,k.IFileService),F(1,E.ILogService),F(2,I.IWorkingCopyBackupService)],b),e.BaseFileWorkingCopyManager=b}),define(ae[989],le([1,0,18,9,16,52,11,19,60,219,56,2,25,22,108,13,354]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hashIdentifier=e.InMemoryWorkingCopyBackupService=e.WorkingCopyBackupService=e.WorkingCopyBackupsModel=void 0;class l{static async create(v,m){const w=new l(v,m);return await w.resolve(),w}constructor(v,m){this.backupRoot=v,this.fileService=m,this.cache=new I.ResourceMap}async resolve(){try{const v=await this.fileService.resolve(this.backupRoot);v.children&&await k.Promises.settled(v.children.filter(m=>m.isDirectory).map(async m=>{const w=await this.fileService.resolve(m.resource);if(w.children)for(const D of w.children)D.isDirectory||this.add(D.resource)}))}catch{}}add(v,m=0,w){this.cache.set(v,{versionId:m,meta:(0,A.deepClone)(w)})}update(v,m){const w=this.cache.get(v);w&&(w.meta=(0,A.deepClone)(m))}count(){return this.cache.size}has(v,m,w){const D=this.cache.get(v);return!(!D||typeof m=="number"&&m!==D.versionId||w&&!(0,A.equals)(w,D.meta))}get(){return Array.from(this.cache.keys())}remove(v){this.cache.delete(v)}move(v,m){const w=this.cache.get(v);w&&(this.cache.delete(v),this.cache.set(m,w))}clear(){this.cache.clear()}}e.WorkingCopyBackupsModel=l;let s=class{constructor(v,m,w){this.fileService=m,this.logService=w,this.impl=this.initialize(v)}initialize(v){return v?new d(v,this.fileService,this.logService):new n}reinitialize(v){this.impl instanceof d&&(v?this.impl.initialize(v):this.impl=new n)}hasBackups(){return this.impl.hasBackups()}hasBackupSync(v,m,w){return this.impl.hasBackupSync(v,m,w)}backup(v,m,w,D,y){return this.impl.backup(v,m,w,D,y)}discardBackup(v,m){return this.impl.discardBackup(v,m)}discardBackups(v){return this.impl.discardBackups(v)}getBackups(){return this.impl.getBackups()}resolve(v){return this.impl.resolve(v)}toBackupResource(v){return this.impl.toBackupResource(v)}joinBackups(){return this.impl.joinBackups()}};s=we([F(1,E.IFileService),F(2,r.ILogService)],s),e.WorkingCopyBackupService=s;let d=class Mi extends C.Disposable{constructor(v,m,w){super(),this.backupWorkspaceHome=v,this.fileService=m,this.logService=w,this.ioOperationQueues=this._register(new k.ResourceQueue),this.model=void 0,this.initialize(v)}initialize(v){this.backupWorkspaceHome=v,this.ready=this.doInitialize()}async doInitialize(){this.model=await l.create(this.backupWorkspaceHome,this.fileService);for(const v of this.model.get())if((0,t.basename)(v).length===32)try{const m=await this.resolveIdentifier(v,this.model);if(!m){this.logService.warn(`Backup: Unable to read target URI of backup ${v} for migration to new hash.`);continue}const w=this.toBackupResource(m);(0,t.isEqual)(w,v)||(await this.fileService.move(v,w,!0),this.model.move(v,w))}catch{this.logService.error(`Backup: Unable to migrate backup ${v} to new hash.`)}return this.model}async hasBackups(){return(await this.ready).count()>0}hasBackupSync(v,m,w){if(!this.model)return!1;const D=this.toBackupResource(v);return this.model.has(D,m,w)}async backup(v,m,w,D,y){const T=await this.ready;if(y?.isCancellationRequested)return;const _=this.toBackupResource(v);if(!T.has(_,w,D))return this.ioOperationQueues.queueFor(_).queue(async()=>{if(y?.isCancellationRequested||T.has(_,w,D))return;let L=this.createPreamble(v,D);L.length>=Mi.PREAMBLE_MAX_LENGTH&&(L=this.createPreamble(v));const M=S.VSBuffer.fromString(L);let O;(0,b.isReadableStream)(m)?O=(0,S.prefixedBufferStream)(M,m):m?O=(0,S.prefixedBufferReadable)(M,m):O=S.VSBuffer.concat([M,S.VSBuffer.fromString("")]),await this.fileService.writeFile(_,O),T.add(_,w,D)})}createPreamble(v,m){return`${v.resource.toString()}${Mi.PREAMBLE_META_SEPARATOR}${JSON.stringify({...m,typeId:v.typeId})}${Mi.PREAMBLE_END_MARKER}`}async discardBackups(v){const m=await this.ready,w=v?.except;if(Array.isArray(w)&&w.length>0){const D=new I.ResourceMap;for(const y of w)D.set(this.toBackupResource(y),!0);await k.Promises.settled(m.get().map(async y=>{D.has(y)||await this.doDiscardBackup(y)}))}else await this.deleteIgnoreFileNotFound(this.backupWorkspaceHome),m.clear()}discardBackup(v,m){const w=this.toBackupResource(v);return this.doDiscardBackup(w,m)}async doDiscardBackup(v,m){const w=await this.ready;if(!m?.isCancellationRequested)return this.ioOperationQueues.queueFor(v).queue(async()=>{m?.isCancellationRequested||(await this.deleteIgnoreFileNotFound(v),w.remove(v))})}async deleteIgnoreFileNotFound(v){try{await this.fileService.del(v,{recursive:!0})}catch(m){if(m.fileOperationResult!==1)throw m}}async getBackups(){const v=await this.ready,m=await Promise.all(v.get().map(w=>this.resolveIdentifier(w,v)));return(0,R.coalesce)(m)}async resolveIdentifier(v,m){const w=await this.readToMatchingString(v,Mi.PREAMBLE_END_MARKER,Mi.PREAMBLE_MAX_LENGTH);if(!w)return;const D=w.indexOf(Mi.PREAMBLE_META_SEPARATOR);let y,T;D>0?(y=w.substring(0,D),T=w.substr(D+1)):(y=w,T=void 0);const{typeId:_,meta:L}=this.parsePreambleMeta(T);return m.update(v,L),{typeId:_??c.NO_TYPE_ID,resource:p.URI.parse(y)}}async readToMatchingString(v,m,w){const D=(await this.fileService.readFile(v,{length:w})).value.toString(),y=D.indexOf(m);if(y>=0)return D.substr(0,y)}async resolve(v){const m=this.toBackupResource(v),w=await this.ready;if(!w.has(m))return;const D=await this.fileService.readFileStream(m),y=await(0,b.peekStream)(D.value,1),T=S.VSBuffer.concat(y.buffer),_=T.buffer.indexOf(Mi.PREAMBLE_END_MARKER_CHARCODE);if(_===-1){this.logService.trace(`Backup: Could not find meta end marker in ${m}. The file is probably corrupt (filesize: ${D.size}).`);return}const L=T.slice(0,_).toString();let M;const O=L.indexOf(Mi.PREAMBLE_META_SEPARATOR);O!==-1&&(M=this.parsePreambleMeta(L.substr(O+1)).meta),w.update(m,M);const N=T.slice(_+1);let P;return y.ended?P=(0,S.bufferToStream)(N):P=(0,S.prefixedBufferStream)(N,y.stream),{value:P,meta:M}}parsePreambleMeta(v){let m,w;if(v)try{w=JSON.parse(v),m=w?.typeId,typeof w?.typeId=="string"&&(delete w.typeId,(0,f.isEmptyObject)(w)&&(w=void 0))}catch{}return{typeId:m,meta:w}}toBackupResource(v){return(0,t.joinPath)(this.backupWorkspaceHome,v.resource.scheme,a(v))}joinBackups(){return this.ioOperationQueues.whenDrained()}};d.PREAMBLE_END_MARKER=` `,d.PREAMBLE_END_MARKER_CHARCODE=` `.charCodeAt(0),d.PREAMBLE_META_SEPARATOR=" ",d.PREAMBLE_MAX_LENGTH=1e4,d=we([F(1,E.IFileService),F(2,r.ILogService)],d);class n{constructor(){this.backups=new I.ResourceMap}async hasBackups(){return this.backups.size>0}hasBackupSync(v,m){const w=this.toBackupResource(v);return this.backups.has(w)}async backup(v,m,w,D,y){const T=this.toBackupResource(v);this.backups.set(T,{typeId:v.typeId,content:m instanceof S.VSBuffer?m:m?(0,b.isReadableStream)(m)?await(0,S.streamToBuffer)(m):(0,S.readableToBuffer)(m):S.VSBuffer.fromString(""),meta:D})}async resolve(v){const m=this.toBackupResource(v),w=this.backups.get(m);if(w)return{value:(0,S.bufferToStream)(w.content),meta:w.meta}}async getBackups(){return Array.from(this.backups.entries()).map(([v,m])=>({typeId:m.typeId,resource:v}))}async discardBackup(v){this.backups.delete(this.toBackupResource(v))}async discardBackups(v){const m=v?.except;if(Array.isArray(m)&&m.length>0){const w=new I.ResourceMap;for(const D of m)w.set(this.toBackupResource(D),!0);for(const D of await this.getBackups())w.has(this.toBackupResource(D))||await this.discardBackup(D)}else this.backups.clear()}toBackupResource(v){return p.URI.from({scheme:u.Schemas.inMemory,path:a(v)})}async joinBackups(){}}e.InMemoryWorkingCopyBackupService=n;function a(h){let v;if(h.typeId.length>0){const m=g(h.typeId);h.resource.path?v=(0,t.joinPath)(h.resource,m):v=h.resource.with({path:m})}else v=h.resource;return o(v)}e.hashIdentifier=a;function o(h){const v=h.scheme===u.Schemas.file||h.scheme===u.Schemas.untitled?h.fsPath:h.toString();return g(v)}function g(h){return(0,i.hash)(h).toString(16)}}),define(ae[2895],le([1,0,2,32,11]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyBackupTracker=void 0;class A extends t.Disposable{constructor(E,I,b,S,C,r,u,i){super(),this.workingCopyBackupService=E,this.workingCopyService=I,this.logService=b,this.lifecycleService=S,this.filesConfigurationService=C,this.workingCopyEditorService=r,this.editorService=u,this.editorGroupService=i,this.mapWorkingCopyToContentVersion=new Map,this.pendingBackupOperations=new Map,this.suspended=!1,this.unrestoredBackups=new Set,this.whenReady=this.resolveBackupsToRestore(),this._isReady=!1;for(const f of this.workingCopyService.dirtyWorkingCopies)this.onDidRegister(f);this.registerListeners()}registerListeners(){this._register(this.workingCopyService.onDidRegister(E=>this.onDidRegister(E))),this._register(this.workingCopyService.onDidUnregister(E=>this.onDidUnregister(E))),this._register(this.workingCopyService.onDidChangeDirty(E=>this.onDidChangeDirty(E))),this._register(this.workingCopyService.onDidChangeContent(E=>this.onDidChangeContent(E))),this.lifecycleService.onBeforeShutdown(E=>E.finalVeto(()=>this.onFinalBeforeShutdown(E.reason),"veto.backups")),this.lifecycleService.onWillShutdown(()=>this.onWillShutdown()),this._register(this.workingCopyEditorService.onDidRegisterHandler(E=>this.restoreBackups(E)))}onWillShutdown(){this.cancelBackupOperations(),this.suspendBackupOperations()}onDidRegister(E){if(this.suspended){this.logService.warn("[backup tracker] suspended, ignoring register event",E.resource.toString(),E.typeId);return}E.isDirty()&&this.scheduleBackup(E)}onDidUnregister(E){if(this.mapWorkingCopyToContentVersion.delete(E),this.suspended){this.logService.warn("[backup tracker] suspended, ignoring unregister event",E.resource.toString(),E.typeId);return}this.discardBackup(E)}onDidChangeDirty(E){if(this.suspended){this.logService.warn("[backup tracker] suspended, ignoring dirty change event",E.resource.toString(),E.typeId);return}E.isDirty()?this.scheduleBackup(E):this.discardBackup(E)}onDidChangeContent(E){const I=this.getContentVersion(E);if(this.mapWorkingCopyToContentVersion.set(E,I+1),this.suspended){this.logService.warn("[backup tracker] suspended, ignoring content change event",E.resource.toString(),E.typeId);return}E.isDirty()&&this.scheduleBackup(E)}scheduleBackup(E){this.cancelBackupOperation(E),this.logService.trace("[backup tracker] scheduling backup",E.resource.toString(),E.typeId);const I={resource:E.resource,typeId:E.typeId},b=new p.CancellationTokenSource,S=setTimeout(async()=>{if(!b.token.isCancellationRequested){if(E.isDirty()){this.logService.trace("[backup tracker] creating backup",E.resource.toString(),E.typeId);try{const C=await E.backup(b.token);if(b.token.isCancellationRequested)return;E.isDirty()&&(this.logService.trace("[backup tracker] storing backup",E.resource.toString(),E.typeId),await this.workingCopyBackupService.backup(E,C.content,this.getContentVersion(E),C.meta,b.token))}catch(C){this.logService.error(C)}}b.token.isCancellationRequested||this.pendingBackupOperations.delete(I)}},this.getBackupScheduleDelay(E));this.pendingBackupOperations.set(I,(0,t.toDisposable)(()=>{this.logService.trace("[backup tracker] clearing pending backup creation",E.resource.toString(),E.typeId),b.dispose(!0),clearTimeout(S)}))}getBackupScheduleDelay(E){let I=this.filesConfigurationService.getAutoSaveMode();return E.capabilities&2&&(I=0),A.BACKUP_SCHEDULE_DELAYS[I]}getContentVersion(E){return this.mapWorkingCopyToContentVersion.get(E)||0}discardBackup(E){this.cancelBackupOperation(E);const I={resource:E.resource,typeId:E.typeId},b=new p.CancellationTokenSource;this.doDiscardBackup(I,b),this.pendingBackupOperations.set(I,(0,t.toDisposable)(()=>{this.logService.trace("[backup tracker] clearing pending backup discard",E.resource.toString(),E.typeId),b.dispose(!0)}))}async doDiscardBackup(E,I){this.logService.trace("[backup tracker] discarding backup",E.resource.toString(),E.typeId);try{await this.workingCopyBackupService.discardBackup(E,I.token)}catch(b){this.logService.error(b)}I.token.isCancellationRequested||this.pendingBackupOperations.delete(E)}cancelBackupOperation(E){let I;for(const[b]of this.pendingBackupOperations)if(b.resource.toString()===E.resource.toString()&&b.typeId===E.typeId){I=b;break}I&&((0,t.dispose)(this.pendingBackupOperations.get(I)),this.pendingBackupOperations.delete(I))}cancelBackupOperations(){for(const[,E]of this.pendingBackupOperations)(0,t.dispose)(E);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 E of await this.workingCopyBackupService.getBackups())this.unrestoredBackups.add(E);this._isReady=!0}async restoreBackups(E){await this.whenReady;const I=new Set,b=new Set,S=new Set;for(const C of this.unrestoredBackups){if(!E.handles(C))continue;let u=!1;for(const{editor:i}of this.editorService.getEditors(0))E.isOpen(C,i)&&(I.add(i),u=!0);u||b.add(await E.createEditor(C)),S.add(C)}if(b.size>0){await this.editorGroupService.activeGroup.openEditors([...b].map(C=>({editor:C,options:{pinned:!0,preserveFocus:!0,inactive:!0}})));for(const C of b)I.add(C)}await R.Promises.settled([...I].map(async C=>{if(!this.editorService.isVisible(C))return C.resolve()}));for(const C of S)this.unrestoredBackups.delete(C)}}e.WorkingCopyBackupTracker=A,A.BACKUP_SCHEDULE_DELAYS={[0]:1e3,[3]:1e3,[4]:1e3,[1]:2e3,[2]:1e3}}),define(ae[262],le([1,0,6,5,35,2,24]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyEditorService=e.IWorkingCopyEditorService=void 0,e.IWorkingCopyEditorService=(0,p.createDecorator)("workingCopyEditorService");let E=class extends A.Disposable{constructor(b){super(),this.editorService=b,this._onDidRegisterHandler=this._register(new t.Emitter),this.onDidRegisterHandler=this._onDidRegisterHandler.event,this.handlers=new Set}registerHandler(b){return this.handlers.add(b),this._onDidRegisterHandler.fire(b),(0,A.toDisposable)(()=>this.handlers.delete(b))}findEditor(b){for(const S of this.editorService.getEditors(0))if(this.isOpen(b,S.editor))return S}isOpen(b,S){for(const C of this.handlers)if(C.handles(b)&&C.isOpen(b,S))return!0;return!1}};E=we([F(0,k.IEditorService)],E),e.WorkingCopyEditorService=E,(0,R.registerSingleton)(e.IWorkingCopyEditorService,E,1)}),define(ae[2896],le([1,0,78,69,2,16,74,24,11,75,157,150,22,398,262,43]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditorTracker=void 0;let c=class extends R.Disposable{constructor(s,d,n,a,o,g,h){super(),this.editorService=s,this.textFileService=d,this.lifecycleService=n,this.hostService=a,this.codeEditorService=o,this.filesConfigurationService=g,this.workingCopyEditorService=h,this.ensureDirtyFilesAreOpenedWorker=this._register(new I.RunOnceWorker(v=>this.ensureDirtyTextFilesAreOpened(v),this.getDirtyTextFileTrackerDelay())),this.registerListeners()}registerListeners(){this._register(this.textFileService.files.onDidChangeDirty(s=>this.ensureDirtyFilesAreOpenedWorker.work(s.resource))),this._register(this.textFileService.files.onDidSaveError(s=>this.ensureDirtyFilesAreOpenedWorker.work(s.resource))),this._register(this.textFileService.untitled.onDidChangeDirty(s=>this.ensureDirtyFilesAreOpenedWorker.work(s.resource))),this._register(this.hostService.onDidChangeFocus(s=>s?this.reloadVisibleTextFileEditors():void 0)),this.lifecycleService.onDidShutdown(()=>this.dispose())}getDirtyTextFileTrackerDelay(){return 800}ensureDirtyTextFilesAreOpened(s){this.doEnsureDirtyTextFilesAreOpened((0,A.distinct)(s.filter(d=>{if(!this.textFileService.isDirty(d))return!1;const n=this.textFileService.files.get(d);if(n?.hasState(2)||this.filesConfigurationService.getAutoSaveMode()===1&&!n?.hasState(5)||this.editorService.isOpened({resource:d,typeId:d.scheme===r.Schemas.untitled?u.UntitledTextEditorInput.ID:C.FILE_EDITOR_INPUT_ID,editorId:f.DEFAULT_EDITOR_ASSOCIATION.id}))return!1;const a=n??this.textFileService.untitled.get(d);return!(a&&this.workingCopyEditorService.findEditor(a))}),d=>d.toString()))}doEnsureDirtyTextFilesAreOpened(s){!s.length||this.editorService.openEditors(s.map(d=>({resource:d,options:{inactive:!0,pinned:!0,preserveFocus:!0}})))}reloadVisibleTextFileEditors(){(0,A.distinct)((0,A.coalesce)(this.codeEditorService.listCodeEditors().map(s=>{const d=s.getModel()?.uri;if(!d)return;const n=this.textFileService.files.get(d);if(!(!n||n.isDirty()||!n.isResolved()))return n})),s=>s.resource.toString()).forEach(s=>this.textFileService.files.resolve(s.resource,{reload:{async:!0}}))}};c=we([F(0,E.IEditorService),F(1,t.ITextFileService),F(2,p.ILifecycleService),F(3,k.IHostService),F(4,b.ICodeEditorService),F(5,S.IFilesConfigurationService),F(6,i.IWorkingCopyEditorService)],c),e.TextFileEditorTracker=c}),define(ae[2897],le([1,0,25,2,8,158]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyFileOperationParticipant=void 0;let k=class extends p.Disposable{constructor(I,b){super(),this.logService=I,this.configurationService=b,this.participants=new A.LinkedList}addFileOperationParticipant(I){const b=this.participants.push(I);return(0,p.toDisposable)(()=>b())}async participate(I,b,S,C){const r=this.configurationService.getValue("files.participants.timeout");if(!(typeof r!="number"||r<=0))for(const u of this.participants)try{await u.participate(I,b,S,r,C)}catch(i){this.logService.warn(i)}}dispose(){this.participants.clear()}};k=we([F(0,t.ILogService),F(1,R.IConfigurationService)],k),e.WorkingCopyFileOperationParticipant=k}),define(ae[400],le([1,0,5]),function(J,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(ae[136],le([1,0,5,35,6,9,2,60]),function(J,e,t,p,R,A,k,E){"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 R.Emitter),this.onDidRegister=this._onDidRegister.event,this._onDidUnregister=this._register(new R.Emitter),this.onDidUnregister=this._onDidUnregister.event,this._onDidChangeDirty=this._register(new R.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeContent=this._register(new R.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidSave=this._register(new R.Emitter),this.onDidSave=this._onDidSave.event,this._workingCopies=new Set,this.mapResourceToWorkingCopies=new E.ResourceMap}get workingCopies(){return Array.from(this._workingCopies.values())}registerWorkingCopy(S){let C=this.mapResourceToWorkingCopies.get(S.resource);if(C?.has(S.typeId))throw new Error(`Cannot register more than one working copy with the same resource ${S.resource.toString()} and type ${S.typeId}.`);this._workingCopies.add(S),C||(C=new Map,this.mapResourceToWorkingCopies.set(S.resource,C)),C.set(S.typeId,S);const r=new k.DisposableStore;return r.add(S.onDidChangeContent(()=>this._onDidChangeContent.fire(S))),r.add(S.onDidChangeDirty(()=>this._onDidChangeDirty.fire(S))),r.add(S.onDidSave(u=>this._onDidSave.fire({workingCopy:S,...u}))),this._onDidRegister.fire(S),S.isDirty()&&this._onDidChangeDirty.fire(S),(0,k.toDisposable)(()=>{this.unregisterWorkingCopy(S),(0,k.dispose)(r),this._onDidUnregister.fire(S)})}unregisterWorkingCopy(S){this._workingCopies.delete(S);const C=this.mapResourceToWorkingCopies.get(S.resource);C?.delete(S.typeId)&&C.size===0&&this.mapResourceToWorkingCopies.delete(S.resource),S.isDirty()&&this._onDidChangeDirty.fire(S)}has(S){return A.URI.isUri(S)?this.mapResourceToWorkingCopies.has(S):this.mapResourceToWorkingCopies.get(S.resource)?.has(S.typeId)??!1}get(S){return this.mapResourceToWorkingCopies.get(S.resource)?.get(S.typeId)}getAll(S){const C=this.mapResourceToWorkingCopies.get(S);if(!!C)return Array.from(C.values())}get hasDirty(){for(const S of this._workingCopies)if(S.isDirty())return!0;return!1}get dirtyCount(){let S=0;for(const C of this._workingCopies)C.isDirty()&&S++;return S}get dirtyWorkingCopies(){return this.workingCopies.filter(S=>S.isDirty())}isDirty(S,C){const r=this.mapResourceToWorkingCopies.get(S);if(r){if(typeof C=="string")return r.get(C)?.isDirty()??!1;for(const[,u]of r)if(u.isDirty())return!0}return!1}}e.WorkingCopyService=I,(0,p.registerSingleton)(e.IWorkingCopyService,I,1)}),define(ae[990],le([1,0,21,2,52,9,75,31,161,67,273,24,58,81,136,105,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadTextEditors=void 0;let l=class Ql{constructor(d,n,a,o,g,h){this._editorLocator=d,this._codeEditorService=a,this._editorService=o,this._editorGroupService=g,this._configurationService=h,this._toDispose=new p.DisposableStore,this._instanceId=String(++Ql.INSTANCE_COUNT),this._proxy=n.getProxy(b.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())),this._registeredDecorationTypes=Object.create(null)}dispose(){Object.keys(this._textEditorsListenersMap).forEach(d=>{(0,p.dispose)(this._textEditorsListenersMap[d])}),this._textEditorsListenersMap=Object.create(null),this._toDispose.dispose();for(const d in this._registeredDecorationTypes)this._codeEditorService.removeDecorationType(d);this._registeredDecorationTypes=Object.create(null)}handleTextEditorAdded(d){const n=d.getId(),a=[];a.push(d.onPropertiesChanged(o=>{this._proxy.$acceptEditorPropertiesChanged(n,o)})),this._textEditorsListenersMap[n]=a}handleTextEditorRemoved(d){(0,p.dispose)(this._textEditorsListenersMap[d]),delete this._textEditorsListenersMap[d]}_updateActiveAndVisibleTextEditors(){const d=this._getTextEditorPositionData();(0,R.equals)(this._editorPositionData,d)||(this._editorPositionData=d,this._proxy.$acceptEditorPositionData(this._editorPositionData))}_getTextEditorPositionData(){const d=Object.create(null);for(const n of this._editorService.visibleEditorPanes){const a=this._editorLocator.findTextEditorIdFor(n);a&&(d[a]=(0,S.editorGroupToColumn)(this._editorGroupService,n.group))}return d}async $tryShowTextDocument(d,n){const a=A.URI.revive(d),o={preserveFocus:n.preserveFocus,pinned:n.pinned,selection:n.selection,activation:n.preserveFocus?I.EditorActivation.RESTORE:void 0,override:I.EditorResolution.EXCLUSIVE_ONLY},g={resource:a,options:o},h=await this._editorService.openEditor(g,(0,S.columnToEditorGroup)(this._editorGroupService,this._configurationService,n.position));if(!h)return;const v=h.getControl(),m=(0,f.getCodeEditor)(v);return m?this._editorLocator.getIdOfCodeEditor(m):void 0}async $tryShowEditor(d,n){const a=this._editorLocator.getEditor(d);if(a){const o=a.getModel();await this._editorService.openEditor({resource:o.uri,options:{preserveFocus:!1}},(0,S.columnToEditorGroup)(this._editorGroupService,this._configurationService,n));return}}async $tryHideEditor(d){const n=this._editorLocator.getEditor(d);if(n){const a=this._editorService.visibleEditorPanes;for(const o of a)if(n.matches(o)){await o.group.closeEditor(o.input);return}}}$trySetSelections(d,n){const a=this._editorLocator.getEditor(d);return a?(a.setSelections(n),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$trySetDecorations(d,n,a){n=`${this._instanceId}-${n}`;const o=this._editorLocator.getEditor(d);return o?(o.setDecorations(n,a),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$trySetDecorationsFast(d,n,a){n=`${this._instanceId}-${n}`;const o=this._editorLocator.getEditor(d);return o?(o.setDecorationsFast(n,a),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$tryRevealRange(d,n,a){const o=this._editorLocator.getEditor(d);return o?(o.revealRange(n,a),Promise.resolve()):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$trySetOptions(d,n){const a=this._editorLocator.getEditor(d);return a?(a.setConfiguration(n),Promise.resolve(void 0)):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$tryApplyEdits(d,n,a,o){const g=this._editorLocator.getEditor(d);return g?Promise.resolve(g.applyEdits(n,a,o)):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$tryInsertSnippet(d,n,a,o,g){const h=this._editorLocator.getEditor(d);return h?Promise.resolve(h.insertSnippet(n,a,o,g)):Promise.reject((0,t.disposed)(`TextEditor(${d})`))}$registerTextEditorDecorationType(d,n,a){n=`${this._instanceId}-${n}`,this._registeredDecorationTypes[n]=!0,this._codeEditorService.registerDecorationType(`exthost-api-${d}`,n,a)}$removeTextEditorDecorationType(d){d=`${this._instanceId}-${d}`,delete this._registeredDecorationTypes[d],this._codeEditorService.removeDecorationType(d)}$getDiffInformation(d){const n=this._editorLocator.getEditor(d);if(!n)return Promise.reject(new Error("No such TextEditor"));const a=n.getCodeEditor();if(!a)return Promise.reject(new Error("No such CodeEditor"));const o=a.getId(),g=this._codeEditorService.listDiffEditors(),[h]=g.filter(m=>m.getOriginalEditor().getId()===o||m.getModifiedEditor().getId()===o);if(h)return Promise.resolve(h.getLineChanges()||[]);const v=a.getContribution("editor.contrib.dirtydiff");return v?Promise.resolve(v.getChanges()):Promise.resolve([])}};l.INSTANCE_COUNT=0,l=we([F(2,k.ICodeEditorService),F(3,C.IEditorService),F(4,r.IEditorGroupsService),F(5,c.IConfigurationService)],l),e.MainThreadTextEditors=l,E.CommandsRegistry.registerCommand("_workbench.revertAllDirty",async function(s){if(!s.get(u.IEnvironmentService).extensionTestsLocationURI)throw new Error("Command is only available when running extension tests.");const n=s.get(i.IWorkingCopyService);for(const a of n.dirtyWorkingCopies)await a.revert({soft:!0})})}),define(ae[2898],le([1,0,1463,38,195,65,6,2,10,8,7,90,11,198,17,15,23,194,55,25,136,70,170,1100]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class g extends f.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(S.IContextKeyService),_=new E.DisposableStore,L=(0,I.createStyleSheet)();_.add((0,E.toDisposable)(()=>{L.parentNode?.removeChild(L)})),(0,I.createCSSRule)("*","cursor: crosshair !important;",L);const M=document.createElement("div");document.body.appendChild(M),_.add((0,E.toDisposable)(()=>document.body.removeChild(M))),M.style.position="absolute",M.style.pointerEvents="none",M.style.backgroundColor="rgba(255, 0, 0, 0.5)",M.style.zIndex="1000";const O=_.add(new R.DomEmitter(document.body,"mousemove",!0));_.add(O.event(B=>{const V=B.target,z=(0,I.getDomNodePagePosition)(V);M.style.top=`${z.top}px`,M.style.left=`${z.left}px`,M.style.width=`${z.width}px`,M.style.height=`${z.height}px`}));const N=_.add(new R.DomEmitter(document.body,"mousedown",!0));k.Event.once(N.event)(B=>{B.preventDefault(),B.stopPropagation()},null,_);const P=_.add(new R.DomEmitter(document.body,"mouseup",!0));k.Event.once(P.event)(B=>{B.preventDefault(),B.stopPropagation();const V=T.getContext(B.target);console.log(V.collectAllValues()),(0,E.dispose)(_)},null,_)}}class h extends f.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(h.disposable){h.disposable.dispose(),h.disposable=void 0;return}const T=y.get(u.ILayoutService),_=y.get(b.IConfigurationService),L=y.get(p.IKeybindingService),M=new E.DisposableStore,O=T.container,N=(0,I.append)(O,(0,I.$)(".screencast-mouse"));M.add((0,E.toDisposable)(()=>N.remove()));const P=M.add(new R.DomEmitter(O,"mousedown",!0)),B=M.add(new R.DomEmitter(O,"mouseup",!0)),V=M.add(new R.DomEmitter(O,"mousemove",!0)),z=()=>{N.style.borderColor=A.Color.fromHex(_.getValue("screencastMode.mouseIndicatorColor")).toString()};let x;const H=()=>{x=(0,l.clamp)(_.getValue("screencastMode.mouseIndicatorSize")||20,20,100),N.style.height=`${x}px`,N.style.width=`${x}px`};z(),H(),M.add(P.event(K=>{N.style.top=`${K.clientY-x/2}px`,N.style.left=`${K.clientX-x/2}px`,N.style.display="block";const Y=V.event(ee=>{N.style.top=`${ee.clientY-x/2}px`,N.style.left=`${ee.clientX-x/2}px`});k.Event.once(B.event)(()=>{N.style.display="none",Y.dispose()})}));const W=(0,I.append)(O,(0,I.$)(".screencast-keyboard"));M.add((0,E.toDisposable)(()=>W.remove()));const U=()=>{W.style.fontSize=`${(0,l.clamp)(_.getValue("screencastMode.fontSize")||56,20,100)}px`},$=()=>{W.style.bottom=`${(0,l.clamp)(_.getValue("screencastMode.verticalOffset")||0,0,90)}%`};let q;const X=()=>{q=(0,l.clamp)(_.getValue("screencastMode.keyboardOverlayTimeout")||800,500,5e3)};U(),$(),X(),M.add(_.onDidChangeConfiguration(K=>{K.affectsConfiguration("screencastMode.verticalOffset")&&$(),K.affectsConfiguration("screencastMode.fontSize")&&U(),K.affectsConfiguration("screencastMode.keyboardOverlayTimeout")&&X(),K.affectsConfiguration("screencastMode.mouseIndicatorColor")&&z(),K.affectsConfiguration("screencastMode.mouseIndicatorSize")&&H()}));const G=M.add(new R.DomEmitter(window,"keydown",!0));let Q=E.Disposable.None,j=0;M.add(G.event(K=>{Q.dispose();const Y=new C.StandardKeyboardEvent(K),ee=L.softDispatch(Y,Y.target);if(ee?.commandId||!_.getValue("screencastMode.onlyKeyboardShortcuts")){(Y.ctrlKey||Y.altKey||Y.metaKey||Y.shiftKey||j>20||Y.keyCode===1||Y.keyCode===9)&&(W.innerText="",j=0);const re=_.getValue("screencastMode.keyboardShortcutsFormat"),oe=L.resolveKeyboardEvent(Y),se=ee?.commandId?f.MenuRegistry.getCommand(ee.commandId):null;let te="",Z=oe.getLabel();if(se&&(te=typeof se.title=="string"?se.title:se.title.value,(re==="commandWithGroup"||re==="commandWithGroupAndKeys")&&se.category&&(te=`${typeof se.category=="string"?se.category:se.category.value}: ${te} `),ee?.commandId)){const ne=L.lookupKeybinding(ee.commandId);ne&&(Z=ne.getLabel())}re!=="keys"&&te&&(0,I.append)(W,(0,I.$)("span.title",{},`${te} `)),(!_.getValue("screencastMode.onlyKeyboardShortcuts")||!te||ee?.commandId&&(re==="keys"||re==="commandAndKeys"||re==="commandWithGroupAndKeys"))&&(0,I.append)(W,(0,I.$)("span.key",{},Z||"")),j++}const ie=(0,r.timeout)(q);Q=(0,E.toDisposable)(()=>ie.cancel()),ie.then(()=>{W.textContent="",j=0})})),h.disposable=M}}class v extends f.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(c.IStorageService).log()}}class m extends f.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(n.IWorkingCopyService),_=y.get(o.IWorkingCopyBackupService),L=y.get(d.ILogService),M=await _.getBackups(),O=["","[Working Copies]",...T.workingCopies.length>0?T.workingCopies.map(N=>`${N.isDirty()?"\u25CF ":""}${N.resource.toString(!0)} (typeId: ${N.typeId||"<no typeId>"})`):["<none>"],"","[Backups]",...M.length>0?M.map(N=>`${N.resource.toString(!0)} (typeId: ${N.typeId||"<no typeId>"})`):["<none>"]];L.info(O.join(` `))}}(0,f.registerAction2)(g),(0,f.registerAction2)(h),(0,f.registerAction2)(v),(0,f.registerAction2)(m),i.Registry.as(s.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(ae[2899],le([1,0,6,2,7,141,71,43,10,58,8,51,24,34,83,223,227,136,14,169,91,22,426,46]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchContextKeysHandler=void 0;let h=class extends p.Disposable{constructor(m,w,D,y,T,_,L,M,O,N,P){super(),this.contextKeyService=m,this.contextService=w,this.configurationService=D,this.environmentService=y,this.productService=T,this.editorService=_,this.editorResolverService=L,this.editorGroupService=M,this.layoutService=O,this.paneCompositeService=N,this.workingCopyService=P,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),A.IsMobileContext.bindTo(this.contextKeyService),k.RemoteNameContext.bindTo(this.contextKeyService).set((0,f.getRemoteName)(this.environmentService.remoteAuthority)||""),this.virtualWorkspaceContext=k.VirtualWorkspaceContext.bindTo(this.contextKeyService),this.temporaryWorkspaceContext=k.TemporaryWorkspaceContext.bindTo(this.contextKeyService),this.updateWorkspaceContextKeys(),k.HasWebFileSystemAccess.bindTo(this.contextKeyService).set(o.WebFileSystemAccess.supported(window)),A.IsDevelopmentContext.bindTo(this.contextKeyService).set(!this.environmentService.isBuilt||this.environmentService.isExtensionDevelopment),A.ProductQualityContext.bindTo(this.contextKeyService).set(this.productService.quality||""),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(s.isNative||typeof this.environmentService.remoteAuthority=="string"),this.emptyWorkspaceSupportContext=k.EmptyWorkspaceSupportContext.bindTo(this.contextKeyService),this.emptyWorkspaceSupportContext.set(s.isNative||typeof this.environmentService.remoteAuthority=="string"),this.enterMultiRootWorkspaceSupportContext=k.EnterMultiRootWorkspaceSupportContext.bindTo(this.contextKeyService),this.enterMultiRootWorkspaceSupportContext.set(s.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.updateWorkspaceContextKeys()})),this._register(this.configurationService.onDidChangeConfiguration(m=>{m.affectsConfiguration("workbench.editor.openSideBySideDirection")&&this.updateSplitEditorsVerticallyContext()})),this._register(this.layoutService.onDidChangeZenMode(m=>this.inZenModeContext.set(m))),this._register(this.layoutService.onDidChangeFullscreen(m=>this.isFullscreenContext.set(m))),this._register(this.layoutService.onDidChangeCenteredLayout(m=>this.isCenteredLayoutContext.set(m))),this._register(this.layoutService.onDidChangePanelPosition(m=>this.panelPositionContext.set(m))),this._register(this.layoutService.onDidChangePanelAlignment(m=>this.panelAlignmentContext.set(m))),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(m=>this.dirtyWorkingCopiesContext.set(m.isDirty()||this.workingCopyService.hasDirty)))}updateEditorAreaContextKeys(){this.editorTabsVisibleContext.set(!!this.editorGroupService.partOptions.showTabs)}updateEditorContextKeys(){const m=this.editorService.activeEditorPane,w=this.editorService.visibleEditorPanes;if(this.textCompareEditorActiveContext.set(m?.getId()===E.TEXT_DIFF_EDITOR_ID),this.textCompareEditorVisibleContext.set(w.some(D=>D.getId()===E.TEXT_DIFF_EDITOR_ID)),this.sideBySideEditorActiveContext.set(m?.getId()===E.SIDE_BY_SIDE_EDITOR_ID),w.length>0?this.editorsVisibleContext.set(!0):this.editorsVisibleContext.reset(),this.editorService.activeEditor?this.activeEditorGroupEmpty.reset():this.activeEditorGroupEmpty.set(!0),this.updateEditorGroupContextKeys(),m){this.activeEditorContext.set(m.getId()),this.activeEditorIsReadonly.set(m.input.hasCapability(2)),this.activeEditorCanRevert.set(!m.input.hasCapability(4)),this.activeEditorCanSplitInGroup.set(m.input.hasCapability(32));const D=m.input.resource,y=D?this.editorResolverService.getEditors(D).map(T=>T.id):[];D?.scheme===a.Schemas.untitled&&m.input.editorId!==E.DEFAULT_EDITOR_ASSOCIATION.id?this.activeEditorAvailableEditorIds.set(""):this.activeEditorAvailableEditorIds.set(y.join(","))}else this.activeEditorContext.reset(),this.activeEditorIsReadonly.reset(),this.activeEditorCanRevert.reset(),this.activeEditorCanSplitInGroup.reset(),this.activeEditorAvailableEditorIds.reset()}updateEditorGroupContextKeys(){const m=this.editorGroupService.count;m>1?this.multipleEditorGroupsContext.set(!0):this.multipleEditorGroupsContext.reset();const w=this.editorGroupService.activeGroup;this.activeEditorGroupIndex.set(w.index+1),this.activeEditorGroupLast.set(w.index===m-1),this.activeEditorGroupLocked.set(w.isLocked)}updateInputContextKeys(){function m(){return!!document.activeElement&&(document.activeElement.tagName==="INPUT"||document.activeElement.tagName==="TEXTAREA")}const w=m();if(this.inputFocusedContext.set(w),w){const D=(0,I.trackFocus)(document.activeElement);t.Event.once(D.onDidBlur)(()=>{this.inputFocusedContext.set(m()),D.dispose()})}}updateWorkbenchStateContextKey(){this.workbenchStateContext.set(this.getWorkbenchStateString())}updateWorkspaceFolderCountContextKey(){this.workspaceFolderCountContext.set(this.contextService.getWorkspace().folders.length)}updateSplitEditorsVerticallyContext(){const m=(0,b.preferredSideBySideGroupDirection)(this.configurationService);this.splitEditorsVerticallyContext.set(m===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"))}updateWorkspaceContextKeys(){this.virtualWorkspaceContext.set((0,c.getVirtualWorkspaceScheme)(this.contextService.getWorkspace())||""),this.temporaryWorkspaceContext.set((0,u.isTemporaryWorkspace)(this.contextService.getWorkspace()))}};h=we([F(0,R.IContextKeyService),F(1,u.IWorkspaceContextService),F(2,S.IConfigurationService),F(3,C.IWorkbenchEnvironmentService),F(4,g.IProductService),F(5,r.IEditorService),F(6,d.IEditorResolverService),F(7,b.IEditorGroupsService),F(8,i.IWorkbenchLayoutService),F(9,n.IPaneCompositePartService),F(10,l.IWorkingCopyService)],h),e.WorkbenchContextKeysHandler=h}),define(ae[153],le([1,0,1472,43,17,16,2,11,24,57,136,22]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeEditorAriaLabel=e.whenEditorClosed=e.EditorPaneRegistry=e.EditorPaneDescriptor=void 0;class r{static create(l,s,d){return new r(l,s,d)}constructor(l,s,d){this.ctor=l,this.typeId=s,this.name=d}instantiate(l){return l.createInstance(this.ctor)}describes(l){return l.getId()===this.typeId}}e.EditorPaneDescriptor=r;class u{constructor(){this.editorPanes=[],this.mapEditorPanesToEditors=new Map}registerEditorPane(l,s){this.mapEditorPanesToEditors.set(l,s);const d=(0,A.insert)(this.editorPanes,l);return(0,k.toDisposable)(()=>{this.mapEditorPanesToEditors.delete(l),d()})}getEditorPane(l){const s=this.findEditorPaneDescriptors(l);if(s.length!==0)return s.length===1?s[0]:l.prefersEditorPane(s)}findEditorPaneDescriptors(l,s){const d=[];for(const n of this.editorPanes){const a=this.mapEditorPanesToEditors.get(n)||[];for(const o of a){const g=o.ctor;if(!s&&l.constructor===g){d.push(n);break}else if(s&&l instanceof g){d.push(n);break}}}return!s&&d.length===0?this.findEditorPaneDescriptors(l,!0):d}getEditorPaneByType(l){return this.editorPanes.find(s=>s.typeId===l)}getEditorPanes(){return this.editorPanes.slice(0)}getEditors(){const l=[];for(const s of this.editorPanes){const d=this.mapEditorPanesToEditors.get(s);d&&l.push(...d.map(n=>n.ctor))}return l}}e.EditorPaneRegistry=u,R.Registry.add(p.EditorExtensions.EditorPane,new u);function i(c,l){const s=c.get(I.IEditorService),d=c.get(b.IUriIdentityService),n=c.get(S.IWorkingCopyService);return new Promise(a=>{let o=[...l];const g=s.onDidCloseEditor(async h=>{if(h.context===p.EditorCloseContext.MOVE)return;let v=p.EditorResourceAccessor.getOriginalUri(h.editor,{supportSideBySide:p.SideBySideEditor.PRIMARY}),m=p.EditorResourceAccessor.getOriginalUri(h.editor,{supportSideBySide:p.SideBySideEditor.SECONDARY});if(h.context===p.EditorCloseContext.REPLACE){const w=p.EditorResourceAccessor.getOriginalUri(s.activeEditor,{supportSideBySide:p.SideBySideEditor.PRIMARY}),D=p.EditorResourceAccessor.getOriginalUri(s.activeEditor,{supportSideBySide:p.SideBySideEditor.SECONDARY});d.extUri.isEqual(v,w)&&(v=void 0),d.extUri.isEqual(m,D)&&(m=void 0)}if(o=o.filter(w=>!(d.extUri.isEqual(w,v)||d.extUri.isEqual(w,m)||h.context!==p.EditorCloseContext.REPLACE&&(v?.scheme===C.Schemas.untitled&&d.extUri.isEqual(w,v.with({scheme:w.scheme}))||m?.scheme===C.Schemas.untitled&&d.extUri.isEqual(w,m.with({scheme:w.scheme}))))),o.length===0){const w=l.filter(D=>n.isDirty(D));return w.length>0&&await E.Promises.settled(w.map(async D=>await new Promise(y=>{if(!n.isDirty(D))return y();const T=n.onDidChangeDirty(_=>{if(!_.isDirty()&&d.extUri.isEqual(D,_.resource))return T.dispose(),y()})}))),g.dispose(),a()}})})}e.whenEditorClosed=i;function f(c,l,s,d){let n=c.getAriaLabel();return s&&!s.isPinned(c)&&(n=(0,t.localize)(0,null,n)),s?.isSticky(l??c)&&(n=(0,t.localize)(1,null,n)),s&&typeof d=="number"&&d>1&&(n=`${n}, ${s.ariaLabel}`),n}e.computeEditorAriaLabel=f}),define(ae[2900],le([1,0,2,157,74,24,58,13,136,25]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorAutoSave=void 0;let S=class extends t.Disposable{constructor(r,u,i,f,c,l){super(),this.filesConfigurationService=r,this.hostService=u,this.editorService=i,this.editorGroupService=f,this.workingCopyService=c,this.logService=l,this.pendingAutoSavesAfterDelay=new Map,this.lastActiveEditor=void 0,this.lastActiveGroupId=void 0,this.lastActiveEditorControlDisposable=this._register(new t.DisposableStore),this.onAutoSaveConfigurationChange(r.getAutoSaveConfiguration(),!1);for(const s of this.workingCopyService.dirtyWorkingCopies)this.onDidRegister(s);this.registerListeners()}registerListeners(){this._register(this.hostService.onDidChangeFocus(r=>this.onWindowFocusChange(r))),this._register(this.editorService.onDidActiveEditorChange(()=>this.onDidActiveEditorChange())),this._register(this.filesConfigurationService.onAutoSaveConfigurationChange(r=>this.onAutoSaveConfigurationChange(r,!0))),this._register(this.workingCopyService.onDidRegister(r=>this.onDidRegister(r))),this._register(this.workingCopyService.onDidUnregister(r=>this.onDidUnregister(r))),this._register(this.workingCopyService.onDidChangeDirty(r=>this.onDidChangeDirty(r))),this._register(this.workingCopyService.onDidChangeContent(r=>this.onDidChangeContent(r)))}onWindowFocusChange(r){r||this.maybeTriggerAutoSave(4)}onDidActiveEditorChange(){this.lastActiveEditor&&typeof this.lastActiveGroupId=="number"&&this.maybeTriggerAutoSave(3,{groupId:this.lastActiveGroupId,editor:this.lastActiveEditor});const r=this.editorGroupService.activeGroup,u=this.lastActiveEditor=(0,E.withNullAsUndefined)(r.activeEditor);this.lastActiveGroupId=r.id,this.lastActiveEditorControlDisposable.clear();const i=this.editorService.activeEditorPane;u&&i&&this.lastActiveEditorControlDisposable.add(i.onDidBlur(()=>{this.maybeTriggerAutoSave(3,{groupId:r.id,editor:u})}))}maybeTriggerAutoSave(r,u){if(u?.editor.hasCapability(2)||u?.editor.hasCapability(4))return;const i=this.filesConfigurationService.getAutoSaveMode();(r===4&&(i===3||i===4)||r===3&&i===3)&&(this.logService.trace(`[editor auto save] triggering auto save with reason ${r}`),u?this.editorService.save(u,{reason:r}):this.saveAllDirty({reason:r}))}onAutoSaveConfigurationChange(r,u){if(this.autoSaveAfterDelay=typeof r.autoSaveDelay=="number"&&r.autoSaveDelay>=0?r.autoSaveDelay:void 0,u){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(r){for(const u of this.workingCopyService.dirtyWorkingCopies)u.capabilities&2||u.save(r)}onDidRegister(r){r.isDirty()&&this.scheduleAutoSave(r)}onDidUnregister(r){this.discardAutoSave(r)}onDidChangeDirty(r){r.isDirty()?this.scheduleAutoSave(r):this.discardAutoSave(r)}onDidChangeContent(r){r.isDirty()&&this.scheduleAutoSave(r)}scheduleAutoSave(r){if(typeof this.autoSaveAfterDelay!="number"||r.capabilities&2)return;this.discardAutoSave(r),this.logService.trace(`[editor auto save] scheduling auto save after ${this.autoSaveAfterDelay}ms`,r.resource.toString(),r.typeId);const u=setTimeout(()=>{this.pendingAutoSavesAfterDelay.delete(r),r.isDirty()&&(this.logService.trace("[editor auto save] running auto save",r.resource.toString(),r.typeId),r.save({reason:2}))},this.autoSaveAfterDelay);this.pendingAutoSavesAfterDelay.set(r,(0,t.toDisposable)(()=>{this.logService.trace("[editor auto save] clearing pending auto save",r.resource.toString(),r.typeId),clearTimeout(u)}))}discardAutoSave(r){(0,t.dispose)(this.pendingAutoSavesAfterDelay.get(r)),this.pendingAutoSavesAfterDelay.delete(r)}};S=we([F(0,p.IFilesConfigurationService),F(1,R.IHostService),F(2,A.IEditorService),F(3,k.IEditorGroupsService),F(4,I.IWorkingCopyService),F(5,b.ILogService)],S),e.EditorAutoSave=S}),define(ae[991],le([1,0,1494,68,188,27,147,12,10,2,23,13,31,34,161,153,5,254,416,33,29,19,117,47,28,1109]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorPlaceholderEditor=e.WorkspaceTrustRequiredPlaceholderEditor=e.EditorPlaceholder=void 0;let v=class Jl extends R.EditorPane{constructor(y,T,_,L,M){super(y,T,_,L),this.instantiationService=M,this.inputDisposable=this._register(new b.MutableDisposable)}createEditor(y){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 k.DomScrollableElement(this.container,{horizontal:1,vertical:1})),y.appendChild(this.scrollbar.getDomNode())}async setInput(y,T,_,L){await super.setInput(y,T,_,L),!L.isCancellationRequested&&(this.inputDisposable.value=await this.renderInput(y,T))}async renderInput(y,T){const[_,L]=(0,C.assertAllDefined)(this.container,this.scrollbar);(0,I.clearNode)(_);const M=new b.DisposableStore,{icon:O,label:N,actions:P}=await this.getContents(y,T,M),B=(0,h.truncate)(N,Jl.PLACEHOLDER_LABEL_MAX_LENGTH),V=_.appendChild((0,I.$)(".editor-placeholder-icon-container")),z=new s.SimpleIconLabel(V);z.text=O;const x=_.appendChild((0,I.$)(".editor-placeholder-label-container")),H=document.createElement("span");H.textContent=B,x.appendChild(H),_.setAttribute("aria-label",`${(0,f.computeEditorAriaLabel)(y,void 0,this.group,void 0)}, ${B}`);const W=_.appendChild((0,I.$)(".editor-placeholder-actions-container"));for(const U of P)M.add(this.instantiationService.createInstance(l.Link,W,{label:U.label,href:""},{opener:()=>U.run()}));return L.scanDomNode(),M}clearInput(){this.container&&(0,I.clearNode)(this.container),this.inputDisposable.clear(),super.clearInput()}layout(y){const[T,_]=(0,C.assertAllDefined)(this.container,this.scrollbar);(0,I.size)(T,y.width,y.height),_.scanDomNode(),T.classList.toggle("max-height-200px",y.height<=200)}focus(){(0,C.assertIsDefined)(this.container).focus()}dispose(){this.container?.remove(),super.dispose()}};v.PLACEHOLDER_LABEL_MAX_LENGTH=1024,v=we([F(1,A.ITelemetryService),F(2,E.IThemeService),F(3,S.IStorageService),F(4,c.IInstantiationService)],v),e.EditorPlaceholder=v;let m=class oo extends v{constructor(y,T,_,L,M,O){super(oo.ID,y,T,M,O),this.commandService=_,this.workspaceService=L}getTitle(){return oo.LABEL}async getContents(){return{icon:"$(workspace-untrusted)",label:(0,u.isSingleFolderWorkspaceIdentifier)((0,u.toWorkspaceIdentifier)(this.workspaceService.getWorkspace()))?(0,t.localize)(1,null):(0,t.localize)(2,null),actions:[{label:(0,t.localize)(3,null),run:()=>this.commandService.executeCommand("workbench.trust.manage")}]}}};m.ID="workbench.editors.workspaceTrustRequiredEditor",m.LABEL=(0,t.localize)(0,null),m.DESCRIPTOR=f.EditorPaneDescriptor.create(m,m.ID,m.LABEL),m=we([F(0,A.ITelemetryService),F(1,E.IThemeService),F(2,r.ICommandService),F(3,u.IWorkspaceContextService),F(4,S.IStorageService),F(5,c.IInstantiationService)],m),e.WorkspaceTrustRequiredPlaceholderEditor=m;let w=class Zl extends v{constructor(y,T,_,L,M,O){super(Zl.ID,y,T,_,L),this.fileService=M,this.dialogService=O}async getContents(y,T,_){const L=y.resource,M=this.group,O=T.error,N=O?.fileOperationResult===1;let P;N?P=(0,t.localize)(5,null):O?P=(0,t.localize)(6,null,(0,o.toErrorMessage)(O)):P=(0,t.localize)(7,null);let B;return(0,o.isErrorWithActions)(O)&&O.actions.length>0?B=O.actions.map(V=>({label:V.label,run:()=>{const z=V.run();z instanceof Promise&&z.catch(x=>this.dialogService.show(p.default.Error,(0,o.toErrorMessage)(x)))}})):M&&(B=[{label:(0,t.localize)(8,null),run:()=>M.openEditor(y,{...T,source:i.EditorOpenSource.USER})}]),M&&N&&L&&this.fileService.hasProvider(L)&&_.add(this.fileService.onDidFilesChange(V=>{V.contains(L,1,0)&&M.openEditor(y,T)})),{icon:"$(error)",label:P,actions:B??[]}}};w.ID="workbench.editors.errorEditor",w.LABEL=(0,t.localize)(4,null),w.DESCRIPTOR=f.EditorPaneDescriptor.create(w,w.ID,w.LABEL),w=we([F(0,A.ITelemetryService),F(1,E.IThemeService),F(2,S.IStorageService),F(3,c.IInstantiationService),F(4,a.IFileService),F(5,g.IDialogService)],w),e.ErrorPlaceholderEditor=w,(0,E.registerThemingParticipant)((D,y)=>{const T=D.getColor(d.editorErrorForeground);T&&y.addRule(` .monaco-editor-pane-placeholder .editor-placeholder-icon-container ${n.Codicon.error.cssSelector} { color: ${T}; }`);const _=D.getColor(d.editorWarningForeground);_&&y.addRule(` .monaco-editor-pane-placeholder .editor-placeholder-icon-container ${n.Codicon.warning.cssSelector} { color: ${_}; }`);const L=D.getColor(d.editorInfoForeground);L&&y.addRule(` .monaco-editor-pane-placeholder .editor-placeholder-icon-container ${n.Codicon.info.cssSelector}, .monaco-editor-pane-placeholder .editor-placeholder-icon-container ${n.Codicon.workspaceUntrusted.cssSelector} { color: ${L}; }`)})}),define(ae[696],le([1,0,1483,6,628,23,19,5,991]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseBinaryResourceEditor=void 0;let b=class extends I.EditorPlaceholder{constructor(C,r,u,i,f,c){super(C,u,i,f,c),this.callbacks=r,this._onDidChangeMetadata=this._register(new p.Emitter),this.onDidChangeMetadata=this._onDidChangeMetadata.event,this._onDidOpenInPlace=this._register(new p.Emitter),this.onDidOpenInPlace=this._onDidOpenInPlace.event}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}async getContents(C,r){const u=await C.resolve();if(!(u instanceof R.BinaryEditorModel))throw new Error("Unable to open file as binary");const i=u.getSize();return this.handleMetadataChanged(typeof i=="number"?k.ByteSize.formatSize(i):""),{icon:"$(warning)",label:(0,t.localize)(1,null),actions:[{label:(0,t.localize)(2,null),run:async()=>{await this.callbacks.openInternal(C,r),this._onDidOpenInPlace.fire()}}]}}handleMetadataChanged(C){this.metadata=C,this._onDidChangeMetadata.fire()}getMetadata(){return this.metadata}};b=we([F(4,A.IStorageService),F(5,E.IInstantiationService)],b),e.BaseBinaryResourceEditor=b}),define(ae[992],le([1,0,1482,43,27,12,665,5,696,23,8,114,58,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryResourceDiffEditor=void 0;let i=class extends k.SideBySideEditor{constructor(c,l,s,d,n,a,o,g){super(c,l,s,d,n,a,o,g)}getMetadata(){const c=this.getPrimaryEditorPane(),l=this.getSecondaryEditorPane();if(c instanceof I.BaseBinaryResourceEditor&&l instanceof I.BaseBinaryResourceEditor)return(0,t.localize)(0,null,l.getMetadata(),c.getMetadata())}};i.ID=p.BINARY_DIFF_EDITOR_ID,i=we([F(0,R.ITelemetryService),F(1,E.IInstantiationService),F(2,A.IThemeService),F(3,b.IStorageService),F(4,S.IConfigurationService),F(5,C.ITextResourceConfigurationService),F(6,u.IEditorService),F(7,r.IEditorGroupsService)],i),e.BinaryResourceDiffEditor=i}),define(ae[2901],le([1,0,1493,6,68,2,43,10,17,83,5,66,311,13,118,991,161,21,117,25,47]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorPanes=void 0;let a=class extends A.Disposable{get minimumWidth(){return this._activeEditorPane?.minimumWidth??r.DEFAULT_EDITOR_MIN_DIMENSIONS.width}get minimumHeight(){return this._activeEditorPane?.minimumHeight??r.DEFAULT_EDITOR_MIN_DIMENSIONS.height}get maximumWidth(){return this._activeEditorPane?.maximumWidth??r.DEFAULT_EDITOR_MAX_DIMENSIONS.width}get maximumHeight(){return this._activeEditorPane?.maximumHeight??r.DEFAULT_EDITOR_MAX_DIMENSIONS.height}get activeEditorPane(){return this._activeEditorPane}constructor(g,h,v,m,w,D,y,T){super(),this.parent=g,this.groupView=h,this.layoutService=v,this.instantiationService=m,this.editorProgressService=w,this.workspaceTrustService=D,this.logService=y,this.dialogService=T,this._onDidFocus=this._register(new p.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidChangeSizeConstraints=this._register(new p.Emitter),this.onDidChangeSizeConstraints=this._onDidChangeSizeConstraints.event,this._activeEditorPane=null,this.editorPanes=[],this.activeEditorPaneDisposables=this._register(new A.DisposableStore),this.editorOperation=this._register(new C.LongRunningOperation(this.editorProgressService)),this.editorPanesRegistry=I.Registry.as(k.EditorExtensions.EditorPane),this.registerListeners()}registerListeners(){this._register(this.workspaceTrustService.onDidChangeTrust(()=>this.onDidChangeWorkspaceTrust()))}onDidChangeWorkspaceTrust(){const g=this._activeEditorPane?.input,h=this._activeEditorPane?.options;g?.hasCapability(16)&&this.groupView.openEditor(g,h)}async openEditor(g,h,v=Object.create(null)){try{return await this.doOpenEditor(this.getEditorPaneDescriptor(g),g,h,v)}catch(m){return h?.ignoreError?{error:m}:this.doShowError(m,g,h,v)}}async doShowError(g,h,v,m){this.logService.error(g);let w=!1;if(v?.source===c.EditorOpenSource.USER){let y;(0,s.isErrorWithActions)(g)&&(y=g.actions);const T=[];if(y&&y.length>0)for(const M of y)T.push(M.label);else T.push((0,t.localize)(0,null));let _;T.length===1&&(T.push((0,t.localize)(1,null)),_=1);const L=await this.dialogService.show(R.default.Error,(0,t.localize)(2,null,h.getName()),T,{detail:(0,s.toErrorMessage)(g),cancelId:_});if(L.choice!==_&&y){const M=y[L.choice];if(M){const O=M.run();O instanceof Promise&&O.catch(N=>this.dialogService.show(R.default.Error,(0,s.toErrorMessage)(N))),w=!0}}}if(w)return{error:g};const D={...v};return(0,l.isCancellationError)(g)||(D.error=g),{...await this.doOpenEditor(f.ErrorPlaceholderEditor.DESCRIPTOR,h,D,m),error:g}}async doOpenEditor(g,h,v,m=Object.create(null)){const w=this.doShowEditorPane(g),{changed:D,cancelled:y}=await this.doSetInput(w,h,v,m);return y||(!v||!v.preserveFocus)&&w.focus(),{pane:w,changed:D,cancelled:y}}getEditorPaneDescriptor(g){return g.hasCapability(16)&&!this.workspaceTrustService.isWorkspaceTrusted()?f.WorkspaceTrustRequiredPlaceholderEditor.DESCRIPTOR:(0,u.assertIsDefined)(this.editorPanesRegistry.getEditorPane(g))}doShowEditorPane(g){if(this._activeEditorPane&&g.describes(this._activeEditorPane))return this._activeEditorPane;this.doHideActiveEditorPane();const h=this.doCreateEditorPane(g);this.doSetActiveEditorPane(h);const v=(0,u.assertIsDefined)(h.getContainer());return this.parent.appendChild(v),(0,E.show)(v),h.setVisible(!0,this.groupView),this.dimension&&h.layout(this.dimension),h}doCreateEditorPane(g){const h=this.doInstantiateEditorPane(g);if(!h.getContainer()){const v=document.createElement("div");v.classList.add("editor-instance"),h.create(v)}return h}doInstantiateEditorPane(g){const h=this.editorPanes.find(m=>g.describes(m));if(h)return h;const v=this._register(g.instantiate(this.instantiationService));return this.editorPanes.push(v),v}doSetActiveEditorPane(g){this._activeEditorPane=g,this.activeEditorPaneDisposables.clear(),g&&(this.activeEditorPaneDisposables.add(g.onDidChangeSizeConstraints(h=>this._onDidChangeSizeConstraints.fire(h))),this.activeEditorPaneDisposables.add(g.onDidFocus(()=>this._onDidFocus.fire()))),this._onDidChangeSizeConstraints.fire(void 0)}async doSetInput(g,h,v,m){const w=g.input?.matches(h);if(w&&!v?.forceReload)return g.setOptions(v),{changed:!1,cancelled:!1};const D=this.editorOperation.start(this.layoutService.isRestored()?800:3200);let y=!1;try{g.clearInput(),await g.setInput(h,v,m,D.token),D.isCurrent()||(y=!0)}finally{D.stop()}return{changed:!w,cancelled:y}}doHideActiveEditorPane(){if(!this._activeEditorPane)return;this.editorOperation.stop(),this._activeEditorPane.clearInput(),this._activeEditorPane.setVisible(!1,this.groupView);const g=this._activeEditorPane.getContainer();g&&(this.parent.removeChild(g),(0,E.hide)(g)),this.doSetActiveEditorPane(null)}closeEditor(g){this._activeEditorPane?.input&&g.matches(this._activeEditorPane.input)&&this.doHideActiveEditorPane()}setVisible(g){this._activeEditorPane?.setVisible(g,this.groupView)}layout(g){this.dimension=g,this._activeEditorPane?.layout(g)}};a=we([F(2,b.IWorkbenchLayoutService),F(3,S.IInstantiationService),F(4,C.IEditorProgressService),F(5,i.IWorkspaceTrustManagementService),F(6,d.ILogService),F(7,n.IDialogService)],a),e.EditorPanes=a}),define(ae[993],le([1,0,1496,10,28,18,13,9,36,14,398,43,2,819,818,696,992,24,19,5,42,20,85,490,31,82,78,466,114,8,52,105,22,106,48,199,11,26,6,111,149,124,80,12,27,177,294,1111]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChangeEncodingAction=e.ChangeEOLAction=e.ChangeLanguageAction=e.ShowLanguageExtensionsAction=e.EditorStatus=void 0;class G{constructor(ve,be){this.primary=ve,this.secondary=be}getEncoding(){return this.primary.getEncoding()}async setEncoding(ve,be){await P.Promises.settled([this.primary,this.secondary].map(ge=>ge.setEncoding(ve,be)))}}class Q{constructor(ve,be){this.primary=ve,this.secondary=be}setLanguageId(ve,be){[this.primary,this.secondary].forEach(ge=>ge.setLanguageId(ve,be))}}function j(Ie){if(Ie instanceof S.UntitledTextEditorInput)return Ie;if(Ie instanceof q.SideBySideEditorInput){const be=j(Ie.primary),ge=j(Ie.secondary);return be&&ge?new G(be,ge):be}const ve=Ie;return(0,k.areFunctions)(ve.setEncoding,ve.getEncoding)?ve:null}function K(Ie){if(Ie instanceof S.UntitledTextEditorInput)return Ie;if(Ie instanceof q.SideBySideEditorInput){const be=K(Ie.primary),ge=K(Ie.secondary);return be&&ge?new Q(be,ge):be}const ve=Ie;return typeof ve.setLanguageId=="function"?ve:null}class Y{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 ee{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 be=new Y;return ve.type==="selectionStatus"&&this._selectionStatus!==ve.selectionStatus&&(this._selectionStatus=ve.selectionStatus,be.selectionStatus=!0),ve.type==="indentation"&&this._indentation!==ve.indentation&&(this._indentation=ve.indentation,be.indentation=!0),ve.type==="languageId"&&this._languageId!==ve.languageId&&(this._languageId=ve.languageId,be.languageId=!0),ve.type==="encoding"&&this._encoding!==ve.encoding&&(this._encoding=ve.encoding,be.encoding=!0),ve.type==="EOL"&&this._EOL!==ve.EOL&&(this._EOL=ve.EOL,be.EOL=!0),ve.type==="tabFocusMode"&&this._tabFocusMode!==ve.tabFocusMode&&(this._tabFocusMode=ve.tabFocusMode,be.tabFocusMode=!0),ve.type==="columnSelectionMode"&&this._columnSelectionMode!==ve.columnSelectionMode&&(this._columnSelectionMode=ve.columnSelectionMode,be.columnSelectionMode=!0),ve.type==="screenReaderMode"&&this._screenReaderMode!==ve.screenReaderMode&&(this._screenReaderMode=ve.screenReaderMode,be.screenReaderMode=!0),ve.type==="metadata"&&this._metadata!==ve.metadata&&(this._metadata=ve.metadata,be.metadata=!0),be}}const ie=(0,t.localize)(0,null),re=(0,t.localize)(1,null),oe=(0,t.localize)(2,null),se=(0,t.localize)(3,null),te=(0,t.localize)(4,null),Z=(0,t.localize)(5,null);let ne=class extends r.Disposable{constructor(ve,be,ge,ue,Ce,De,Ae,Pe,fe){super(),this.editorService=ve,this.quickInputService=be,this.languageService=ge,this.textFileService=ue,this.configurationService=Ce,this.notificationService=De,this.accessibilityService=Ae,this.statusbarService=Pe,this.instantiationService=fe,this.tabFocusModeElement=this._register(new r.MutableDisposable),this.columnSelectionModeElement=this._register(new r.MutableDisposable),this.screenRedearModeElement=this._register(new r.MutableDisposable),this.indentationElement=this._register(new r.MutableDisposable),this.selectionElement=this._register(new r.MutableDisposable),this.encodingElement=this._register(new r.MutableDisposable),this.eolElement=this._register(new r.MutableDisposable),this.languageElement=this._register(new r.MutableDisposable),this.metadataElement=this._register(new r.MutableDisposable),this.currentProblemStatus=this._register(this.instantiationService.createInstance(ce)),this.state=new ee,this.activeEditorListeners=this._register(new r.DisposableStore),this.delayedRender=this._register(new r.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(g.TabFocus.onDidChangeTabFocus(()=>this.onTabFocusModeChange()))}registerCommands(){h.CommandsRegistry.registerCommand({id:"showEditorScreenReaderNotification",handler:()=>this.showScreenReaderNotification()}),h.CommandsRegistry.registerCommand({id:"changeEditorIndentation",handler:()=>this.showIndentationPicker()})}showScreenReaderNotification(){this.screenReaderNotification||(this.screenReaderNotification=this.notificationService.prompt(B.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}),V.Event.once(this.screenReaderNotification.onDidClose)(()=>this.screenReaderNotification=null))}async showIndentationPicker(){const ve=(0,_.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 be=[(0,k.assertIsDefined)(ve.getAction(i.IndentUsingSpaces.ID)),(0,k.assertIsDefined)(ve.getAction(i.IndentUsingTabs.ID)),(0,k.assertIsDefined)(ve.getAction(i.DetectIndentation.ID)),(0,k.assertIsDefined)(ve.getAction(i.IndentationToSpacesAction.ID)),(0,k.assertIsDefined)(ve.getAction(i.IndentationToTabsAction.ID)),(0,k.assertIsDefined)(ve.getAction(u.TrimTrailingWhitespaceAction.ID))].map(ue=>({id:ue.id,label:ue.label,detail:b.Language.isDefaultVariant()||ue.label===ue.alias?void 0:ue.alias,run:()=>{ve.focus(),ue.run()}}));return be.splice(3,0,{type:"separator",label:(0,t.localize)(11,null)}),be.unshift({type:"separator",label:(0,t.localize)(12,null)}),(await this.quickInputService.pick(be,{placeHolder:(0,t.localize)(13,null),matchOnDetail:!0}))?.run()}updateTabFocusModeElement(ve){if(ve){if(!this.tabFocusModeElement.value){const be=(0,t.localize)(14,null);this.tabFocusModeElement.value=this.statusbarService.addEntry({name:(0,t.localize)(15,null),text:be,ariaLabel:be,tooltip:(0,t.localize)(16,null),command:"editor.action.toggleTabFocusMode",backgroundColor:(0,U.themeColorFromId)(W.STATUS_BAR_PROMINENT_ITEM_BACKGROUND),color:(0,U.themeColorFromId)(W.STATUS_BAR_PROMINENT_ITEM_FOREGROUND)},"status.editor.tabFocusMode",1,100.7)}}else this.tabFocusModeElement.clear()}updateColumnSelectionModeElement(ve){if(ve){if(!this.columnSelectionModeElement.value){const be=(0,t.localize)(17,null);this.columnSelectionModeElement.value=this.statusbarService.addEntry({name:(0,t.localize)(18,null),text:be,ariaLabel:be,tooltip:(0,t.localize)(19,null),command:"editor.action.toggleColumnSelection",backgroundColor:(0,U.themeColorFromId)(W.STATUS_BAR_PROMINENT_ITEM_BACKGROUND),color:(0,U.themeColorFromId)(W.STATUS_BAR_PROMINENT_ITEM_FOREGROUND)},"status.editor.columnSelectionMode",1,100.8)}}else this.columnSelectionModeElement.clear()}updateScreenReaderModeElement(ve){if(ve){if(!this.screenRedearModeElement.value){const be=(0,t.localize)(20,null);this.screenRedearModeElement.value=this.statusbarService.addEntry({name:(0,t.localize)(21,null),text:be,ariaLabel:be,command:"showEditorScreenReaderNotification",backgroundColor:(0,U.themeColorFromId)(W.STATUS_BAR_PROMINENT_ITEM_BACKGROUND),color:(0,U.themeColorFromId)(W.STATUS_BAR_PROMINENT_ITEM_FOREGROUND)},"status.editor.screenReaderMode",1,100.6)}}else this.screenRedearModeElement.clear()}updateSelectionElement(ve){if(!ve){this.selectionElement.clear();return}const be={name:(0,t.localize)(22,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(23,null),command:"workbench.action.gotoLine"};this.updateElement(this.selectionElement,be,"status.editor.selection",1,100.5)}updateIndentationElement(ve){if(!ve){this.indentationElement.clear();return}const be={name:(0,t.localize)(24,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(25,null),command:"changeEditorIndentation"};this.updateElement(this.indentationElement,be,"status.editor.indentation",1,100.4)}updateEncodingElement(ve){if(!ve){this.encodingElement.clear();return}const be={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,be,"status.editor.encoding",1,100.3)}updateEOLElement(ve){if(!ve){this.eolElement.clear();return}const be={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,be,"status.editor.eol",1,100.2)}updateLanguageIdElement(ve){if(!ve){this.languageElement.clear();return}const be={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,be,"status.editor.mode",1,100.1)}updateMetadataElement(ve){if(!ve){this.metadataElement.clear();return}const be={name:(0,t.localize)(32,null),text:ve,ariaLabel:ve,tooltip:(0,t.localize)(33,null)};this.updateElement(this.metadataElement,be,"status.editor.info",1,100)}updateElement(ve,be,ge,ue,Ce){ve.value?ve.value.update(be):ve.value=this.statusbarService.addEntry(be,ge,ue,Ce)}updateState(ve){const be=this.state.update(ve);!be.hasChanges()||(this.toRender?this.toRender.combine(be):(this.toRender=be,this.delayedRender.value=(0,p.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 `?Z:te: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,R.format)(ie,ve.selections[0].positionLineNumber,ve.selections[0].positionColumn,ve.charactersSelected):(0,R.format)(re,ve.selections[0].positionLineNumber,ve.selections[0].positionColumn);if(ve.charactersSelected)return(0,R.format)(oe,ve.selections.length,ve.charactersSelected);if(ve.selections.length>0)return(0,R.format)(se,ve.selections.length)}}updateStatusBar(){const ve=this.editorService.activeEditor,be=this.editorService.activeEditorPane,ge=be?(0,k.withNullAsUndefined)((0,_.getCodeEditor)(be.getControl())):void 0;if(this.onColumnSelectionModeChange(ge),this.onScreenReaderModeChange(ge),this.onSelectionChange(ge),this.onLanguageChange(ge,ve),this.onEOLChange(ge),this.onEncodingChange(be,ge),this.onIndentationChange(ge),this.onMetadataChange(be),this.currentProblemStatus.update(ge),this.activeEditorListeners.clear(),be&&this.activeEditorListeners.add(be.onDidChangeControl(()=>{this.updateStatusBar()})),ge)this.activeEditorListeners.add(ge.onDidChangeConfiguration(ue=>{ue.hasChanged(18)&&this.onColumnSelectionModeChange(ge),ue.hasChanged(2)&&this.onScreenReaderModeChange(ge)})),this.activeEditorListeners.add(V.Event.defer(ge.onDidChangeCursorPosition)(()=>{this.onSelectionChange(ge),this.currentProblemStatus.update(ge)})),this.activeEditorListeners.add(ge.onDidChangeModelLanguage(()=>{this.onLanguageChange(ge,ve)})),this.activeEditorListeners.add(V.Event.accumulate(ge.onDidChangeModelContent)(ue=>{this.onEOLChange(ge),this.currentProblemStatus.update(ge);const Ce=ge.getSelections();if(Ce){for(const De of ue)for(const Ae of De.changes)if(Ce.some(Pe=>a.Range.areIntersecting(Pe,Ae.range))){this.onSelectionChange(ge);break}}})),this.activeEditorListeners.add(ge.onDidChangeModelOptions(()=>{this.onIndentationChange(ge)}));else if(be instanceof f.BaseBinaryResourceEditor||be instanceof c.BinaryResourceDiffEditor){const ue=[];if(be instanceof c.BinaryResourceDiffEditor){const Ce=be.getPrimaryEditorPane();Ce instanceof f.BaseBinaryResourceEditor&&ue.push(Ce);const De=be.getSecondaryEditorPane();De instanceof f.BaseBinaryResourceEditor&&ue.push(De)}else ue.push(be);for(const Ce of ue)this.activeEditorListeners.add(Ce.onDidChangeMetadata(()=>{this.onMetadataChange(be)})),this.activeEditorListeners.add(Ce.onDidOpenInPlace(()=>{this.updateStatusBar()}))}}onLanguageChange(ve,be){const ge={type:"languageId",languageId:void 0};if(ve&&be&&K(be)){const ue=ve.getModel();if(ue){const Ce=ue.getLanguageId();ge.languageId=(0,k.withNullAsUndefined)(this.languageService.getLanguageName(Ce))}}this.updateState(ge)}onIndentationChange(ve){const be={type:"indentation",indentation:void 0};if(ve){const ge=ve.getModel();if(ge){const ue=ge.getOptions();be.indentation=ue.insertSpaces?(0,t.localize)(34,null,ue.indentSize):(0,t.localize)(35,null,ue.tabSize)}}this.updateState(be)}onMetadataChange(ve){const be={type:"metadata",metadata:void 0};(ve instanceof f.BaseBinaryResourceEditor||ve instanceof c.BinaryResourceDiffEditor)&&(be.metadata=ve.getMetadata()),this.updateState(be)}onColumnSelectionModeChange(ve){const be={type:"columnSelectionMode",columnSelectionMode:!1};ve?.getOption(18)&&(be.columnSelectionMode=!0),this.updateState(be)}onScreenReaderModeChange(ve){let be=!1;ve&&(this.accessibilityService.isScreenReaderOptimized()&&this.configurationService.getValue("editor")?.accessibilitySupport==="auto"&&(this.promptedScreenReader||(this.promptedScreenReader=!0,setTimeout(()=>this.showScreenReaderNotification(),100))),be=ve.getOption(2)===2),be===!1&&this.screenReaderNotification&&this.screenReaderNotification.close(),this.updateState({type:"screenReaderMode",screenReaderMode:be})}onSelectionChange(ve){const be=Object.create(null);if(ve){be.selections=ve.getSelections()||[],be.charactersSelected=0;const ge=ve.getModel();if(ge)for(const ue of be.selections)typeof be.charactersSelected!="number"&&(be.charactersSelected=0),be.charactersSelected+=ge.getCharacterCountInRange(ue);if(be.selections.length===1){const ue=ve.getPosition(),Ce=new o.Selection(be.selections[0].selectionStartLineNumber,be.selections[0].selectionStartColumn,be.selections[0].positionLineNumber,ue?ve.getStatusbarColumn(ue):be.selections[0].positionColumn);be.selections[0]=Ce}}this.updateState({type:"selectionStatus",selectionStatus:this.getSelectionLabel(be)})}onEOLChange(ve){const be={type:"EOL",EOL:void 0};if(ve&&!ve.getOption(82)){const ge=ve.getModel();ge&&(be.EOL=ge.getEOL())}this.updateState(be)}onEncodingChange(ve,be){if(ve&&!this.isActiveEditor(ve))return;const ge={type:"encoding",encoding:void 0};if(ve&&be?.hasModel()){const ue=ve.input?j(ve.input):null;if(ue){const Ce=ue.getEncoding(),De=typeof Ce=="string"?w.SUPPORTED_ENCODINGS[Ce]:void 0;De?ge.encoding=De.labelShort:ge.encoding=Ce}}this.updateState(ge)}onResourceEncodingChange(ve){const be=this.editorService.activeEditorPane;if(be){const ge=C.EditorResourceAccessor.getCanonicalUri(be.input,{supportSideBySide:C.SideBySideEditor.PRIMARY});if(ge&&(0,A.isEqual)(ge,ve)){const ue=(0,k.withNullAsUndefined)((0,_.getCodeEditor)(be.getControl()));return this.onEncodingChange(be,ue)}}}onTabFocusModeChange(){const ve={type:"tabFocusMode",tabFocusMode:g.TabFocus.getTabFocusMode()};this.updateState(ve)}isActiveEditor(ve){const be=this.editorService.activeEditorPane;return!!be&&be===ve}};ne=we([F(0,l.IEditorService),F(1,O.IQuickInputService),F(2,n.ILanguageService),F(3,m.ITextFileService),F(4,y.IConfigurationService),F(5,B.INotificationService),F(6,z.IAccessibilityService),F(7,x.IStatusbarService),F(8,d.IInstantiationService)],ne),e.EditorStatus=ne;let ce=class extends r.Disposable{constructor(ve,be,ge){super(),this.statusbarService=ve,this.markerService=be,this.configurationService=ge,this.editor=void 0,this.markers=[],this.currentMarker=null,this.statusBarEntryAccessor=this._register(new r.MutableDisposable),this._register(be.onMarkerChanged(ue=>this.onMarkerChanged(ue))),this._register(V.Event.filter(ge.onDidChangeConfiguration,ue=>ue.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 be=(0,R.splitLines)(this.currentMarker.message)[0],ge=`${this.getType(this.currentMarker)} ${be}`;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,be){return!be||!ve?!0:H.IMarkerData.makeKey(ve)!==H.IMarkerData.makeKey(be)}getType(ve){switch(ve.severity){case H.MarkerSeverity.Error:return"$(error)";case H.MarkerSeverity.Warning:return"$(warning)";case H.MarkerSeverity.Info:return"$(info)"}return""}getMarker(){if(!this.configurationService.getValue("problems.showCurrentInStatus")||!this.editor||!this.editor.getModel())return null;const be=this.editor.getPosition();return be&&this.markers.find(ge=>a.Range.containsPosition(ge,be))||null}onMarkerChanged(ve){if(!this.editor)return;const be=this.editor.getModel();!be||be&&!ve.some(ge=>(0,A.isEqual)(be.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:H.MarkerSeverity.Error|H.MarkerSeverity.Warning|H.MarkerSeverity.Info}),this.markers.sort(de)):this.markers=[],this.updateStatus())}};ce=we([F(0,x.IStatusbarService),F(1,H.IMarkerService),F(2,y.IConfigurationService)],ce);function de(Ie,ve){let be=(0,R.compare)(Ie.resource.toString(),ve.resource.toString());return be===0&&(be=H.MarkerSeverity.compare(Ie.severity,ve.severity)),be===0&&(be=a.Range.compareRangesUsingStarts(Ie,ve)),be}let he=class ec extends I.Action{constructor(ve,be,ge){super(ec.ID,(0,t.localize)(38,null,ve)),this.fileExtension=ve,this.commandService=be,this.enabled=ge.isEnabled()}async run(){await this.commandService.executeCommand("workbench.extensions.action.showExtensionsForLanguage",this.fileExtension)}};he.ID="workbench.action.showLanguageExtensions",he=we([F(1,h.ICommandService),F(2,v.IExtensionGalleryService)],he),e.ShowLanguageExtensionsAction=he;let pe=class tc extends I.Action{constructor(ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke){super(ve,be),this.languageService=ge,this.editorService=ue,this.configurationService=Ce,this.quickInputService=De,this.preferencesService=Ae,this.instantiationService=Pe,this.textFileService=fe,this.telemetryService=ye,this.languageDetectionService=ke}async run(ve,be){const ge=(0,_.getCodeEditor)(this.editorService.activeTextEditorControl);if(!ge){await this.quickInputService.pick([{label:(0,t.localize)(40,null)}]);return}const ue=ge.getModel(),Ce=C.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:C.SideBySideEditor.PRIMARY});let De,Ae;ue&&(Ae=ue.getLanguageId(),De=(0,k.withNullAsUndefined)(this.languageService.getLanguageName(Ae)));let Pe=!!Ce;Ce?.scheme===L.Schemas.untitled&&!this.textFileService.untitled.get(Ce)?.hasAssociatedFilePath&&(Pe=!1);const ye=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:Me,languageId:Oe})=>{const Ke=this.languageService.getExtensions(Oe).join(" ");let We;return De===Me?We=(0,t.localize)(41,null,Oe):We=(0,t.localize)(42,null,Oe),{label:Me,meta:Ke,iconClasses:(0,N.getIconClassesForLanguageId)(Oe),description:We}});ye.unshift({type:"separator",label:(0,t.localize)(43,null)});let ke,Ee,Te;if(Pe&&Ce){const Me=(0,A.extname)(Ce)||(0,A.basename)(Ce);Te=this.instantiationService.createInstance(he,Me),Te.enabled&&ye.unshift(Te),Ee={label:(0,t.localize)(44,null,De)},ye.unshift(Ee),ke={label:(0,t.localize)(45,null,Me)},ye.unshift(ke)}const _e={label:(0,t.localize)(46,null)};ye.unshift(_e);const Re=await this.quickInputService.pick(ye,{placeHolder:(0,t.localize)(47,null),matchOnDescription:!0});if(!Re)return;if(Re===Te){Te.run();return}if(Re===ke){Ce&&this.configureFileAssociation(Ce);return}if(Re===Ee){this.preferencesService.openUserSettings({jsonEditor:!0,revealSetting:{key:`[${(0,k.withUndefinedAsNull)(Ae)}]`,edit:!0}});return}const Le=this.editorService.activeEditor;if(Le){const Me=K(Le);if(Me){let Oe,Ke;if(Re===_e){if(ue){const We=C.EditorResourceAccessor.getOriginalUri(Le,{supportSideBySide:C.SideBySideEditor.PRIMARY});if(We){let Xe=(0,k.withNullAsUndefined)(this.languageService.guessLanguageIdByFilepathOrFirstLine(We,ue.getLineContent(1)));(!Xe||Xe==="unknown")&&(Ke=await this.languageDetectionService.detectLanguage(We),Xe=Ke),Xe&&(Oe=this.languageService.createById(Xe))}}}else{const We=this.languageService.getLanguageIdByLanguageName(Re.label);Oe=this.languageService.createById(We),Ce&&this.languageDetectionService.detectLanguage(Ce).then(Xe=>{const Je=this.languageService.getLanguageIdByLanguageName(Re.label)||"unknown";if(Xe===Ae&&Ae!==Je){const rt=this.configurationService.getValue("workbench.editor.preferHistoryBasedLanguageDetection")?"history":"classic";this.telemetryService.publicLog2(X.AutomaticLanguageDetectionLikelyWrongId,{currentLanguageId:De??"unknown",nextLanguageId:Re.label,lineCount:ue?.getLineCount()??-1,modelPreference:rt})}})}if(typeof Oe<"u"&&(Me.setLanguageId(Oe.languageId,tc.ID),Ce?.scheme===L.Schemas.untitled)){const We=this.configurationService.getValue("workbench.editor.preferHistoryBasedLanguageDetection")?"history":"classic";this.telemetryService.publicLog2("setUntitledDocumentLanguage",{to:Oe.languageId,from:Ae??"none",modelPreference:We})}}ge.focus()}}configureFileAssociation(ve){const be=(0,A.extname)(ve),ge=(0,A.basename)(ve),ue=this.languageService.guessLanguageIdByFilepathOrFirstLine(E.URI.file(ge)),De=this.languageService.getSortedRegisteredLanguageNames().map(({languageName:Ae,languageId:Pe})=>({id:Pe,label:Ae,iconClasses:(0,N.getIconClassesForLanguageId)(Pe),description:Pe===ue?(0,t.localize)(48,null):void 0}));setTimeout(async()=>{const Ae=await this.quickInputService.pick(De,{placeHolder:(0,t.localize)(49,null,be||ge)});if(Ae){const Pe=this.configurationService.inspect(s.FILES_ASSOCIATIONS_CONFIG);let fe;be&&ge[0]!=="."?fe=`*${be}`:fe=ge;let ye=2;Pe.workspaceValue&&!!Pe.workspaceValue[fe]&&(ye=5);const ke=(0,T.deepClone)(ye===5?Pe.workspaceValue:Pe.userValue)||Object.create(null);ke[fe]=Ae.id,this.configurationService.updateValue(s.FILES_ASSOCIATIONS_CONFIG,ke,ye)}},50)}};pe.ID="workbench.action.editor.changeLanguageMode",pe.LABEL=(0,t.localize)(39,null),pe=we([F(2,n.ILanguageService),F(3,l.IEditorService),F(4,y.IConfigurationService),F(5,O.IQuickInputService),F(6,M.IPreferencesService),F(7,d.IInstantiationService),F(8,m.ITextFileService),F(9,$.ITelemetryService),F(10,X.ILanguageDetectionService)],pe),e.ChangeLanguageAction=pe;let me=class extends I.Action{constructor(ve,be,ge,ue){super(ve,be),this.editorService=ge,this.quickInputService=ue}async run(){const ve=(0,_.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 be=ve.getModel();const ge=[{label:te,eol:0},{label:Z,eol:1}],ue=be?.getEOL()===` `?0:1,Ce=await this.quickInputService.pick(ge,{placeHolder:(0,t.localize)(53,null),activeItem:ge[ue]});if(Ce){const De=(0,_.getCodeEditor)(this.editorService.activeTextEditorControl);De?.hasModel()&&!this.editorService.activeEditor?.hasCapability(2)&&(be=De.getModel(),be.pushStackElement(),be.pushEOL(Ce.eol),be.pushStackElement())}ve.focus()}};me.ID="workbench.action.editor.changeEOL",me.LABEL=(0,t.localize)(50,null),me=we([F(2,l.IEditorService),F(3,O.IQuickInputService)],me),e.ChangeEOLAction=me;let Se=class extends I.Action{constructor(ve,be,ge,ue,Ce,De,Ae){super(ve,be),this.editorService=ge,this.quickInputService=ue,this.textResourceConfigurationService=Ce,this.fileService=De,this.textFileService=Ae}async run(){const ve=(0,_.getCodeEditor)(this.editorService.activeTextEditorControl);if(!ve){await this.quickInputService.pick([{label:(0,t.localize)(55,null)}]);return}const be=this.editorService.activeEditorPane;if(!be){await this.quickInputService.pick([{label:(0,t.localize)(56,null)}]);return}const ge=j(be.input);if(!ge){await this.quickInputService.pick([{label:(0,t.localize)(57,null)}]);return}const ue={label:(0,t.localize)(58,null)},Ce={label:(0,t.localize)(59,null)};if(!b.Language.isDefaultVariant()){const Me="Save with Encoding";Me!==ue.label&&(ue.detail=Me);const Oe="Reopen with Encoding";Oe!==Ce.label&&(Ce.detail=Oe)}let De;if(ge instanceof S.UntitledTextEditorInput?De=ue:be.input.hasCapability(2)?De=Ce:De=await this.quickInputService.pick([Ce,ue],{placeHolder:(0,t.localize)(60,null),matchOnDetail:!0}),!De)return;await(0,P.timeout)(50);const Ae=C.EditorResourceAccessor.getOriginalUri(be.input,{supportSideBySide:C.SideBySideEditor.PRIMARY});if(!Ae||!this.fileService.hasProvider(Ae)&&Ae.scheme!==L.Schemas.untitled)return;let Pe;this.fileService.hasProvider(Ae)&&(Pe=(await this.textFileService.readStream(Ae,{autoGuessEncoding:!0})).encoding);const fe=De===Ce,ye=this.textResourceConfigurationService.getValue((0,k.withNullAsUndefined)(Ae),"files.encoding");let ke,Ee;const Te=Object.keys(w.SUPPORTED_ENCODINGS).sort((Me,Oe)=>Me===ye?-1:Oe===ye?1:w.SUPPORTED_ENCODINGS[Me].order-w.SUPPORTED_ENCODINGS[Oe].order).filter(Me=>Me===Pe&&Pe!==ye?!1:!fe||!w.SUPPORTED_ENCODINGS[Me].encodeOnly).map((Me,Oe)=>(Me===ge.getEncoding()?ke=Oe:w.SUPPORTED_ENCODINGS[Me].alias===ge.getEncoding()&&(Ee=Oe),{id:Me,label:w.SUPPORTED_ENCODINGS[Me].labelLong,description:Me})),_e=Te.slice();Pe&&ye!==Pe&&w.SUPPORTED_ENCODINGS[Pe]&&(Te.unshift({type:"separator"}),Te.unshift({id:Pe,label:w.SUPPORTED_ENCODINGS[Pe].labelLong,description:(0,t.localize)(61,null)}));const Re=await this.quickInputService.pick(Te,{placeHolder:fe?(0,t.localize)(62,null):(0,t.localize)(63,null),activeItem:_e[typeof ke=="number"?ke:typeof Ee=="number"?Ee:-1]});if(!Re||!this.editorService.activeEditorPane)return;const Le=j(this.editorService.activeEditorPane.input);typeof Re.id<"u"&&Le&&await Le.setEncoding(Re.id,fe?1:0),ve.focus()}};Se.ID="workbench.action.editor.changeEncoding",Se.LABEL=(0,t.localize)(54,null),Se=we([F(2,l.IEditorService),F(3,O.IQuickInputService),F(4,D.ITextResourceConfigurationService),F(5,s.IFileService),F(6,m.ITextFileService)],Se),e.ChangeEncodingAction=Se}),define(ae[557],le([1,0,1501,52,6,13,2,153,911,23,5,27,12,114,58,24,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorPaneSelection=e.AbstractTextEditor=void 0;let l=class ic extends I.AbstractEditorWithViewState{constructor(n,a,o,g,h,v,m,w,D){super(n,ic.VIEW_STATE_PREFERENCE_KEY,a,o,g,h,v,m,w),this.fileService=D,this._onDidChangeSelection=this._register(new R.Emitter),this.onDidChangeSelection=this._onDidChangeSelection.event,this.inputListener=this._register(new k.MutableDisposable),this._register(this.textResourceConfigurationService.onDidChangeConfiguration(()=>{const y=this.getActiveResource(),T=y?this.textResourceConfigurationService.getValue(y):void 0;return this.handleConfigurationChangeEvent(T)})),this._register(R.Event.any(this.editorGroupService.onDidAddGroup,this.editorGroupService.onDidRemoveGroup)(()=>{const y=this.computeAriaLabel();this.editorContainer?.setAttribute("aria-label",y),this.updateEditorControlOptions({ariaLabel:y})})),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(y=>this.onDidChangeFileSystemProvider(y.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(y=>this.onDidChangeFileSystemProvider(y.scheme)))}handleConfigurationChangeEvent(n){this.isVisible()?this.updateEditorConfiguration(n):this.hasPendingConfigurationChange=!0}consumePendingConfigurationChangeEvent(){this.hasPendingConfigurationChange&&(this.updateEditorConfiguration(),this.hasPendingConfigurationChange=!1)}computeConfiguration(n){const a=(0,A.isObject)(n.editor)?(0,p.deepClone)(n.editor):Object.create(null);return Object.assign(a,this.getConfigurationOverrides()),a.ariaLabel=this.computeAriaLabel(),a}computeAriaLabel(){return this._input?(0,E.computeEditorAriaLabel)(this._input,void 0,this.group,this.editorGroupService.count):(0,t.localize)(0,null)}onDidChangeFileSystemProvider(n){!this.input||this.getActiveResource()?.scheme===n&&this.updateReadonly(this.input)}onDidChangeInputCapabilities(n){this.input===n&&this.updateReadonly(n)}updateReadonly(n){const a=n.hasCapability(2);this.updateEditorControlOptions({readOnly:a})}getConfigurationOverrides(){const n=this.input?.hasCapability(2);return{overviewRulerLanes:3,lineNumbersMinChars:3,fixedOverflowWidgets:!0,readOnly:n,renderValidationDecorations:"on"}}createEditor(n){this.editorContainer=n,this.createEditorControl(n,this.computeConfiguration(this.textResourceConfigurationService.getValue(this.getActiveResource()))),this.registerCodeEditorListeners()}registerCodeEditorListeners(){const n=this.getMainControl();n&&(this._register(n.onDidChangeModelLanguage(()=>this.updateEditorConfiguration())),this._register(n.onDidChangeModel(()=>this.updateEditorConfiguration())),this._register(n.onDidChangeCursorPosition(a=>this._onDidChangeSelection.fire({reason:this.toEditorPaneSelectionChangeReason(a)}))),this._register(n.onDidChangeModelContent(()=>this._onDidChangeSelection.fire({reason:3}))))}toEditorPaneSelectionChangeReason(n){switch(n.source){case"api":return 1;case"code.navigation":return 4;case"code.jump":return 5;default:return 2}}getSelection(){const n=this.getMainControl();if(n){const a=n.getSelection();if(a)return new s(a)}}async setInput(n,a,o,g){await super.setInput(n,a,o,g),this.inputListener.value=n.onDidChangeCapabilities(()=>this.onDidChangeInputCapabilities(n)),this.updateEditorConfiguration(),(0,A.assertIsDefined)(this.editorContainer).setAttribute("aria-label",this.computeAriaLabel())}clearInput(){this.inputListener.clear(),super.clearInput()}setEditorVisible(n,a){n&&this.consumePendingConfigurationChangeEvent(),super.setEditorVisible(n,a)}toEditorViewStateResource(n){return n.resource}updateEditorConfiguration(n){if(!n){const g=this.getActiveResource();g&&(n=this.textResourceConfigurationService.getValue(g))}if(!n)return;const a=this.computeConfiguration(n);let o=a;this.lastAppliedEditorOptions&&(o=(0,p.distinct)(this.lastAppliedEditorOptions,o)),Object.keys(o).length>0&&(this.lastAppliedEditorOptions=a,this.updateEditorControlOptions(o))}getActiveResource(){const n=this.getMainControl();if(n){const a=n.getModel();if(a)return a.uri}if(this.input)return this.input.resource}dispose(){this.lastAppliedEditorOptions=void 0,super.dispose()}};l.VIEW_STATE_PREFERENCE_KEY="textEditorViewState",l=we([F(1,C.ITelemetryService),F(2,S.IInstantiationService),F(3,b.IStorageService),F(4,u.ITextResourceConfigurationService),F(5,r.IThemeService),F(6,f.IEditorService),F(7,i.IEditorGroupsService),F(8,c.IFileService)],l),e.AbstractTextEditor=l;class s{constructor(n){this.textSelection=n}compare(n){if(!(n instanceof s))return 3;const a=Math.min(this.textSelection.selectionStartLineNumber,this.textSelection.positionLineNumber),o=Math.min(n.textSelection.selectionStartLineNumber,n.textSelection.positionLineNumber);return a===o?1:Math.abs(a-o)<s.TEXT_EDITOR_SELECTION_THRESHOLD?2:3}restore(n){return{...n,selection:this.textSelection,selectionRevealType:1}}log(){return`line: ${this.textSelection.startLineNumber}-${this.textSelection.endLineNumber}, col: ${this.textSelection.startColumn}-${this.textSelection.endColumn}`}}e.TextEditorPaneSelection=s,s.TEXT_EDITOR_SELECTION_THRESHOLD=10}),define(ae[697],le([1,0,1499,13,379,7,18,173,557]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTextCodeEditor=void 0;class b extends I.AbstractTextEditor{constructor(){super(...arguments),this.editorControl=void 0}get scopedContextKeyService(){return this.editorControl?.invokeWithinContext(C=>C.get(A.IContextKeyService))}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}createEditorControl(C,r){this.editorControl=this._register(this.instantiationService.createInstance(E.CodeEditorWidget,C,r,this.getCodeEditorWidgetOptions()))}getCodeEditorWidgetOptions(){return Object.create(null)}updateEditorControlOptions(C){this.editorControl?.updateOptions(C)}getMainControl(){return this.editorControl}getControl(){return this.editorControl}computeEditorViewState(C){if(!this.editorControl)return;const r=this.editorControl.getModel();if(!r)return;const u=r.uri;if(!!u&&!!(0,k.isEqual)(u,C))return(0,p.withNullAsUndefined)(this.editorControl.saveViewState())}setOptions(C){super.setOptions(C),C&&(0,R.applyTextEditorOptions)(C,(0,p.assertIsDefined)(this.editorControl),0)}focus(){this.editorControl?.focus()}hasFocus(){return this.editorControl?.hasTextFocus()||super.hasFocus()}setEditorVisible(C,r){super.setEditorVisible(C,r),C?this.editorControl?.onVisible():this.editorControl?.onHide()}layout(C){this.editorControl?.layout(C)}}e.AbstractTextCodeEditor=b}),define(ae[994],le([1,0,1500,52,13,557,43,379,230,765,377,849,27,23,114,5,12,2,17,9,58,24,161,7,18,10,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextDiffEditor=void 0;let w=class nc extends A.AbstractTextEditor{get scopedContextKeyService(){if(!this.diffEditorControl)return;const y=this.diffEditorControl.getOriginalEditor(),T=this.diffEditorControl.getModifiedEditor();return(y.hasTextFocus()?y:T).invokeWithinContext(_=>_.get(g.IContextKeyService))}constructor(y,T,_,L,M,O,N,P){super(nc.ID,y,T,_,L,O,M,N,P),this.diffEditorControl=void 0,this.diffNavigatorDisposables=this._register(new l.DisposableStore)}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}createEditorControl(y,T){this.diffEditorControl=this._register(this.instantiationService.createInstance(S.DiffEditorWidget,y,T,{}))}updateEditorControlOptions(y){this.diffEditorControl?.updateOptions(y)}getMainControl(){return this.diffEditorControl?.getModifiedEditor()}async setInput(y,T,_,L){this.diffNavigatorDisposables.clear(),await super.setInput(y,T,_,L);try{const M=await y.resolve();if(L.isCancellationRequested)return;if(!(M instanceof C.TextDiffEditorModel)){this.openAsBinary(y,T);return}const O=(0,R.assertIsDefined)(this.diffEditorControl),N=M;O.setModel((0,R.withUndefinedAsNull)(N.textDiffEditorModel));let P=!1;(0,k.isTextEditorViewState)(T?.viewState)||(P=this.restoreTextDiffEditorViewState(y,T,_,O));let B=!1;T&&(B=(0,E.applyTextEditorOptions)(T,O,1)),this.diffNavigator=new b.DiffNavigator(O,{alwaysRevealFirst:!B&&!P}),this.diffNavigatorDisposables.add(this.diffNavigator),O.updateOptions({readOnly:N.modifiedModel?.isReadonly(),originalEditable:!N.originalModel?.isReadonly()})}catch(M){if(this.isFileBinaryError(M)){this.openAsBinary(y,T);return}throw M}}restoreTextDiffEditorViewState(y,T,_,L){const M=this.loadEditorViewState(y,_);return M?(T?.selection&&M.modified&&(M.modified.cursorState=[]),L.restoreViewState(M),!0):!1}openAsBinary(y,T){const _=y.original,L=y.modified,M=this.instantiationService.createInstance(I.DiffEditorInput,y.getName(),y.getDescription(),_,L,!0),O=s.Registry.as(k.EditorExtensions.EditorFactory).getFileEditorFactory();O.isFileEditor(_)&&_.setForceOpenAsBinary(),O.isFileEditor(L)&&L.setForceOpenAsBinary(),(this.group??this.editorGroupService.activeGroup).replaceEditors([{editor:y,replacement:M,options:{...T,activation:o.EditorActivation.PRESERVE,pinned:this.group?.isPinned(y),sticky:this.group?.isSticky(y)}}])}setOptions(y){super.setOptions(y),y&&(0,E.applyTextEditorOptions)(y,(0,R.assertIsDefined)(this.diffEditorControl),0)}computeConfiguration(y){const T=super.computeConfiguration(y);if((0,R.isObject)(y.diffEditor)){const _=(0,p.deepClone)(y.diffEditor);_.diffCodeLens=_.codeLens,delete _.codeLens,_.diffWordWrap=_.wordWrap,delete _.wordWrap,Object.assign(T,_)}return T}getConfigurationOverrides(){const y=this.input instanceof I.DiffEditorInput&&this.input.modified.hasCapability(2);return{...super.getConfigurationOverrides(),readOnly:y,originalEditable:this.input instanceof I.DiffEditorInput&&!this.input.original.hasCapability(2),lineDecorationsWidth:"2ch"}}updateReadonly(y){y instanceof I.DiffEditorInput?this.diffEditorControl?.updateOptions({readOnly:y.hasCapability(2),originalEditable:!y.original.hasCapability(2)}):super.updateReadonly(y)}isFileBinaryError(y){return Array.isArray(y)?y.some(_=>this.isFileBinaryError(_)):y.textFileOperationResult===0}clearInput(){super.clearInput(),this.diffNavigatorDisposables.clear(),this.diffEditorControl?.setModel(null)}getDiffNavigator(){return this.diffNavigator}getControl(){return this.diffEditorControl}focus(){this.diffEditorControl?.focus()}hasFocus(){return this.diffEditorControl?.hasTextFocus()||super.hasFocus()}setEditorVisible(y,T){super.setEditorVisible(y,T),y?this.diffEditorControl?.onVisible():this.diffEditorControl?.onHide()}layout(y){this.diffEditorControl?.layout(y)}tracksEditorViewState(y){return y instanceof I.DiffEditorInput}computeEditorViewState(y){if(!this.diffEditorControl)return;const T=this.diffEditorControl.getModel();if(!T||!T.modified||!T.original)return;const _=this.toEditorViewStateResource(T);if(!!_&&!!(0,h.isEqual)(_,y))return(0,R.withNullAsUndefined)(this.diffEditorControl.saveViewState())}toEditorViewStateResource(y){let T,_;if(y instanceof I.DiffEditorInput?(T=y.original.resource,_=y.modified.resource):(0,k.isEditorInput)(y)||(T=y.original.uri,_=y.modified.uri),!(!T||!_))return d.URI.from({scheme:"diff",path:`${(0,v.multibyteAwareBtoa)(T.toString())}${(0,v.multibyteAwareBtoa)(_.toString())}`})}};w.ID=k.TEXT_DIFF_EDITOR_ID,w=we([F(0,r.ITelemetryService),F(1,f.IInstantiationService),F(2,u.IStorageService),F(3,i.ITextResourceConfigurationService),F(4,a.IEditorService),F(5,c.IThemeService),F(6,n.IEditorGroupsService),F(7,m.IFileService)],w),e.TextDiffEditor=w}),define(ae[204],le([1,0,1489,13,5,98,43,71,273,24,59,994,99,9,48,76,196,16,58,7,8,31,15,70,664,41,161,22,177,665,169,107,27,18]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M){"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 O=function(ie){return!(!(0,p.isObject)(ie)||!(0,p.isString)(ie.to)||!(0,p.isUndefined)(ie.by)&&!(0,p.isString)(ie.by)||!(0,p.isUndefined)(ie.value)&&!(0,p.isNumber)(ie.value))};function N(){const ie={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:S.EditorContextKeys.editorTextFocus,primary:0,handler:(te,Z)=>re(!0,Z,te),description:{description:(0,t.localize)(0,null),args:[{name:(0,t.localize)(1,null),description:(0,t.localize)(2,null),constraint:O,schema:ie}]}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.COPY_ACTIVE_EDITOR_COMMAND_ID,weight:200,when:S.EditorContextKeys.editorTextFocus,primary:0,handler:(te,Z)=>re(!1,Z,te),description:{description:(0,t.localize)(3,null),args:[{name:(0,t.localize)(4,null),description:(0,t.localize)(5,null),constraint:O,schema:ie}]}});function re(te,Z=Object.create(null),ne){Z.to=Z.to||"right",Z.by=Z.by||"tab",Z.value=typeof Z.value=="number"?Z.value:1;const ce=ne.get(b.IEditorService).activeEditorPane;if(ce)switch(Z.by){case"tab":if(te)return oe(Z,ce);break;case"group":return se(te,Z,ce,ne)}}function oe(te,Z){const ne=Z.group;let ce=ne.getIndexOfEditor(Z.input);switch(te.to){case"first":ce=0;break;case"last":ce=ne.count-1;break;case"left":ce=ce-te.value;break;case"right":ce=ce+te.value;break;case"center":ce=Math.round(ne.count/2)-1;break;case"position":ce=te.value-1;break}ce=ce<0?0:ce>=ne.count?ne.count-1:ce,ne.moveEditor(Z.input,ne,{index:ce})}function se(te,Z,ne,ce){const de=ce.get(s.IEditorGroupsService),he=ce.get(n.IConfigurationService),pe=ne.group;let me;switch(Z.to){case"left":me=de.findGroup({direction:2},pe),me||(me=de.addGroup(pe,2));break;case"right":me=de.findGroup({direction:3},pe),me||(me=de.addGroup(pe,3));break;case"up":me=de.findGroup({direction:0},pe),me||(me=de.addGroup(pe,0));break;case"down":me=de.findGroup({direction:1},pe),me||(me=de.addGroup(pe,1));break;case"first":me=de.findGroup({location:0},pe);break;case"last":me=de.findGroup({location:1},pe);break;case"previous":me=de.findGroup({location:3},pe);break;case"next":me=de.findGroup({location:2},pe),me||(me=de.addGroup(pe,(0,s.preferredSideBySideGroupDirection)(he)));break;case"center":me=de.getGroups(2)[de.count/2-1];break;case"position":me=de.getGroups(2)[Z.value-1];break}me&&(te?pe.moveEditor(ne.input,me):pe.id!==me.id&&pe.copyEditor(ne.input,me),me.focus())}}function P(){function ie(re,oe){if(!oe||typeof oe!="object")return;re.get(s.IEditorGroupsService).applyLayout(oe)}a.CommandsRegistry.registerCommand(e.LAYOUT_EDITOR_GROUPS_COMMAND_ID,(re,oe)=>{ie(re,oe)}),a.CommandsRegistry.registerCommand({id:"vscode.setEditorLayout",handler:(re,oe)=>ie(re,oe),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 B(){A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.GOTO_NEXT_CHANGE,weight:200,when:E.TextCompareEditorVisibleContext,primary:575,handler:ne=>re(ne,!0)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.GOTO_PREVIOUS_CHANGE,weight:200,when:E.TextCompareEditorVisibleContext,primary:1599,handler:ne=>re(ne,!1)});function ie(ne){const ce=ne.get(b.IEditorService);for(const de of[ce.activeEditorPane,...ce.visibleEditorPanes])if(de instanceof C.TextDiffEditor)return de}function re(ne,ce){const de=ie(ne);if(de){const he=de.getDiffNavigator();he&&(ce?he.next():he.previous())}}let oe;(function(ne){ne[ne.Original=0]="Original",ne[ne.Modified=1]="Modified",ne[ne.Toggle=2]="Toggle"})(oe||(oe={}));function se(ne,ce){const de=ie(ne);if(de)switch(ce){case oe.Original:de.getControl()?.getOriginalEditor().focus();break;case oe.Modified:de.getControl()?.getModifiedEditor().focus();break;case oe.Toggle:return de.getControl()?.getModifiedEditor().hasWidgetFocus()?se(ne,oe.Original):se(ne,oe.Modified)}}function te(ne){const ce=ne.get(n.IConfigurationService),de=!ce.getValue("diffEditor.renderSideBySide");ce.updateValue("diffEditor.renderSideBySide",de)}function Z(ne){const ce=ne.get(n.IConfigurationService),de=!ce.getValue("diffEditor.ignoreTrimWhitespace");ce.updateValue("diffEditor.ignoreTrimWhitespace",de)}A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.TOGGLE_DIFF_SIDE_BY_SIDE,weight:200,when:void 0,primary:void 0,handler:ne=>te(ne)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DIFF_FOCUS_PRIMARY_SIDE,weight:200,when:void 0,primary:void 0,handler:ne=>se(ne,oe.Modified)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DIFF_FOCUS_SECONDARY_SIDE,weight:200,when:void 0,primary:void 0,handler:ne=>se(ne,oe.Original)}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.DIFF_FOCUS_OTHER_SIDE,weight:200,when:void 0,primary:void 0,handler:ne=>se(ne,oe.Toggle)}),o.MenuRegistry.appendMenuItem(o.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:E.TextCompareEditorActiveContext}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,weight:200,when:void 0,primary:void 0,handler:ne=>Z(ne)})}function V(){function ie(re,oe,se){return re?[{...re.editorOptions,...oe??Object.create(null)},re.sideBySide?b.SIDE_GROUP:se]:[oe,se]}a.CommandsRegistry.registerCommand({id:"vscode.open",handler:(re,oe)=>{re.get(a.ICommandService).executeCommand(e.API_OPEN_EDITOR_COMMAND_ID,oe)},description:{description:"Opens the provided resource in the editor.",args:[{name:"Uri"}]}}),a.CommandsRegistry.registerCommand(e.API_OPEN_EDITOR_COMMAND_ID,async function(re,oe,se,te,Z){const ne=re.get(b.IEditorService),ce=re.get(s.IEditorGroupsService),de=re.get(v.IOpenerService),he=re.get(_.IPathService),pe=re.get(n.IConfigurationService),me=typeof oe=="string"?oe:u.URI.revive(oe),[Se,Ie]=se??[];if(Ie||typeof Se=="number"||(0,v.matchesScheme)(me,w.Schemas.untitled)){const[ve,be]=ie(Z,Ie,Se),ge=u.URI.isUri(me)?me:u.URI.parse(me);let ue;(0,k.isUntitledWithAssociatedResource)(ge)?ue={resource:ge.with({scheme:he.defaultUriScheme}),forceUntitled:!0,options:ve,label:te}:ue={resource:ge,options:ve,label:te},await ne.openEditor(ue,(0,I.columnToEditorGroup)(ce,pe,be))}else{if((0,v.matchesScheme)(me,w.Schemas.command))return;await de.open(me,{openToSide:Z?.sideBySide,editorOptions:Z?.editorOptions})}}),a.CommandsRegistry.registerCommand({id:"vscode.diff",handler:(re,oe,se,te)=>{re.get(a.ICommandService).executeCommand(e.API_OPEN_DIFF_EDITOR_COMMAND_ID,oe,se,te)},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(re,oe,se,te,Z,ne){const ce=re.get(b.IEditorService),de=re.get(s.IEditorGroupsService),he=re.get(n.IConfigurationService),[pe,me]=Z??[],[Se,Ie]=ie(ne,me,pe);let ve,be;typeof te=="string"?ve=te:te&&(ve=te.label,be=te.description),await ce.openEditor({original:{resource:u.URI.revive(oe)},modified:{resource:u.URI.revive(se)},label:ve,description:be,options:Se},(0,I.columnToEditorGroup)(de,he,Ie))}),a.CommandsRegistry.registerCommand(e.API_OPEN_WITH_EDITOR_COMMAND_ID,(re,oe,se,te)=>{const Z=re.get(b.IEditorService),ne=re.get(s.IEditorGroupsService),ce=re.get(n.IConfigurationService),[de,he]=te??[];return Z.openEditor({resource:u.URI.revive(oe),options:{...he,pinned:!0,override:se}},(0,I.columnToEditorGroup)(ne,ce,de))})}function z(){const ie=(oe,se)=>{const te=oe.get(b.IEditorService),Z=te.activeEditorPane;if(Z){const ne=Z.group.getEditorByIndex(se);ne&&te.openEditor(ne)}};a.CommandsRegistry.registerCommand({id:e.OPEN_EDITOR_AT_INDEX_COMMAND_ID,handler:ie});for(let oe=0;oe<9;oe++){const se=oe,te=oe+1;A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.OPEN_EDITOR_AT_INDEX_COMMAND_ID+te,weight:200,when:void 0,primary:512|re(te),mac:{primary:256|re(te)},handler:Z=>ie(Z,se)})}function re(oe){switch(oe){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 x(){for(let oe=1;oe<8;oe++)A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:ie(oe),weight:200,when:void 0,primary:2048|re(oe),handler:se=>{const te=se.get(s.IEditorGroupsService),Z=se.get(n.IConfigurationService);if(oe>te.count)return;const ne=te.getGroups(2);if(ne[oe])return ne[oe].focus();const ce=(0,s.preferredSideBySideGroupDirection)(Z),de=te.findGroup({location:1});if(!de)return;te.addGroup(de,ce).focus()}});function ie(oe){switch(oe){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 re(oe){switch(oe){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 H(ie,re,oe){let se;if(oe&&typeof oe.groupId=="number"?se=ie.getGroup(oe.groupId):se=ie.activeGroup,!se)return;const te=ie.addGroup(se,re);let Z;oe&&typeof oe.editorIndex=="number"?Z=se.getEditorByIndex(oe.editorIndex):Z=(0,p.withNullAsUndefined)(se.activeEditor),Z&&!Z.hasCapability(8)&&se.copyEditor(Z,te,{preserveFocus:oe?.preserveFocus}),te.focus()}e.splitEditor=H;function W(){[{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:ie,direction:re})=>{a.CommandsRegistry.registerCommand(ie,function(oe,se,te){H(oe.get(s.IEditorGroupsService),re,j(se,te))})})}function U(){function ie(re,oe,se,te){const Z=re.get(s.IEditorGroupsService),ne=re.get(b.IEditorService);let ce=!0;if((oe||se||te)&&(ce=!1),ce&&!se&&!te){const pe=Z.activeGroup,me=pe.activeEditor;if(me&&pe.isSticky(me)){const Se=pe.getEditors(0,{excludeSticky:!0})[0];if(Se)return pe.openEditor(Se);const Ie=ne.getEditors(0,{excludeSticky:!0})[0];if(Ie)return Promise.resolve(Z.getGroup(Ie.groupId)?.openEditor(Ie.editor))}}const{editors:de,groups:he}=Q(re,se,te);return Promise.all(he.map(async pe=>{if(pe){const me=(0,l.coalesce)(de.filter(Se=>Se.groupId===pe.id).map(Se=>typeof Se.editorIndex=="number"?pe.getEditorByIndex(Se.editorIndex):pe.activeEditor)).filter(Se=>!ce||!pe.isSticky(Se));await pe.closeEditors(me,{preserveFocus:te?.preserveFocus})}}))}A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITOR_COMMAND_ID,weight:200,when:void 0,primary:2101,win:{primary:2110,secondary:[2101]},handler:(re,oe,se)=>ie(re,!1,oe,se)}),a.CommandsRegistry.registerCommand(e.CLOSE_PINNED_EDITOR_COMMAND_ID,(re,oe,se)=>ie(re,!0,oe,se)),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,weight:200,when:void 0,primary:(0,r.KeyChord)(2089,53),handler:(re,oe,se)=>Promise.all(Q(re,oe,se).groups.map(async te=>{if(te){await te.closeAllEditors({excludeSticky:!0});return}}))}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITOR_GROUP_COMMAND_ID,weight:200,when:d.ContextKeyExpr.and(E.ActiveEditorGroupEmptyContext,E.MultipleEditorGroupsContext),primary:2101,win:{primary:2110,secondary:[2101]},handler:(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),Z=j(oe,se);let ne;Z&&typeof Z.groupId=="number"?ne=te.getGroup(Z.groupId):ne=te.activeGroup,ne&&te.removeGroup(ne)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_SAVED_EDITORS_COMMAND_ID,weight:200,when:void 0,primary:(0,r.KeyChord)(2089,51),handler:(re,oe,se)=>Promise.all(Q(re,oe,se).groups.map(async te=>{te&&await te.closeEditors({savedOnly:!0,excludeSticky:!0},{preserveFocus:se?.preserveFocus})}))}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,weight:200,when:void 0,primary:void 0,mac:{primary:2610},handler:(re,oe,se)=>{const{editors:te,groups:Z}=Q(re,oe,se);return Promise.all(Z.map(async ne=>{if(ne){const ce=te.filter(he=>he.groupId===ne.id).map(he=>typeof he.editorIndex=="number"?ne.getEditorByIndex(he.editorIndex):ne.activeEditor),de=ne.getEditors(1,{excludeSticky:!0}).filter(he=>!ce.includes(he));for(const he of ce)he&&ne.pinEditor(he);await ne.closeEditors(de,{preserveFocus:se?.preserveFocus})}}))}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,weight:200,when:void 0,primary:void 0,handler:async(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),{group:Z,editor:ne}=K(te,j(oe,se));Z&&ne&&(Z.activeEditor&&Z.pinEditor(Z.activeEditor),await Z.closeEditors({direction:1,except:ne,excludeSticky:!0},{preserveFocus:se?.preserveFocus}))}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.REOPEN_WITH_COMMAND_ID,weight:200,when:void 0,primary:void 0,handler:async(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),Z=re.get(b.IEditorService),ne=re.get(T.IEditorResolverService),ce=re.get(L.ITelemetryService),{group:de,editor:he}=K(te,j(oe,se));if(!he)return;const pe=he.toUntyped();if(!pe)return;pe.options={...Z.activeEditorPane?.options,override:m.EditorResolution.PICK};const me=await ne.resolveEditor(pe,de);!(0,k.isEditorInputWithOptionsAndGroup)(me)||(await me.group.replaceEditors([{editor:he,replacement:me.editor,forceReplaceDirty:he.resource?.scheme===w.Schemas.untitled,options:me.options}]),ce.publicLog2("workbenchEditorReopen",{scheme:he.resource?.scheme??"",ext:he.resource?(0,M.extname)(he.resource):"",from:he.editorId??"",to:me.editor.editorId??""}),await me.group.openEditor(me.editor))}}),a.CommandsRegistry.registerCommand(e.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,async(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),{group:Z}=K(te,j(oe,se));Z&&(await Z.closeAllEditors(),Z.count===0&&te.getGroup(Z.id)&&te.removeGroup(Z))})}function $(){const ie=[{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 re of ie)a.CommandsRegistry.registerCommand(re.id,async oe=>{const se=oe.get(s.IEditorGroupsService);se.findGroup({direction:re.direction},se.activeGroup,!1)?.focus()})}function q(){async function ie(oe,se,te){const Z=oe.get(s.IEditorGroupsService),ne=oe.get(R.IInstantiationService),{group:ce,editor:de}=K(Z,j(se,te));!de||await ce.replaceEditors([{editor:de,replacement:ne.createInstance(D.SideBySideEditorInput,void 0,void 0,de,de),forceReplaceDirty:!0}])}(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.SPLIT_EDITOR_IN_GROUP,title:{value:(0,t.localize)(8,null),original:"Split Editor in Group"},category:g.Categories.View,precondition:E.ActiveEditorCanSplitInGroupContext,f1:!0,keybinding:{weight:200,when:E.ActiveEditorCanSplitInGroupContext,primary:(0,r.KeyChord)(2089,3160)}})}run(oe,se,te){return ie(oe,se,te)}});async function re(oe,se,te){const Z=oe.get(s.IEditorGroupsService),{group:ne,editor:ce}=K(Z,j(se,te));if(!(ce instanceof D.SideBySideEditorInput))return;let de;const he=ne.activeEditorPane;if(he instanceof y.SideBySideEditor&&ne.activeEditor===ce){for(const pe of[he.getPrimaryEditorPane(),he.getSecondaryEditorPane()])if(pe?.hasFocus()){de={viewState:pe.getViewState()};break}}await ne.replaceEditors([{editor:ce,replacement:ce.primary,options:de}])}(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.JOIN_EDITOR_IN_GROUP,title:{value:(0,t.localize)(9,null),original:"Join Editor in Group"},category:g.Categories.View,precondition:E.SideBySideEditorActiveContext,f1:!0,keybinding:{weight:200,when:E.SideBySideEditorActiveContext,primary:(0,r.KeyChord)(2089,3160)}})}run(oe,se,te){return re(oe,se,te)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.TOGGLE_SPLIT_EDITOR_IN_GROUP,title:{value:(0,t.localize)(10,null),original:"Toggle Split Editor in Group"},category:g.Categories.View,precondition:d.ContextKeyExpr.or(E.ActiveEditorCanSplitInGroupContext,E.SideBySideEditorActiveContext),f1:!0})}async run(oe,se,te){const Z=oe.get(s.IEditorGroupsService),{editor:ne}=K(Z,j(se,te));ne instanceof D.SideBySideEditorInput?await re(oe,se,te):ne&&await ie(oe,se,te)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT,title:{value:(0,t.localize)(11,null),original:"Toggle Layout of Split Editor in Group"},category:g.Categories.View,precondition:E.SideBySideEditorActiveContext,f1:!0})}async run(oe){const se=oe.get(n.IConfigurationService),te=se.getValue(y.SideBySideEditor.SIDE_BY_SIDE_LAYOUT_SETTING);let Z;return te!=="horizontal"?Z="horizontal":Z="vertical",se.updateValue(y.SideBySideEditor.SIDE_BY_SIDE_LAYOUT_SETTING,Z)}})}function X(){(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.FOCUS_FIRST_SIDE_EDITOR,title:{value:(0,t.localize)(12,null),original:"Focus First Side in Active Editor"},category:g.Categories.View,precondition:d.ContextKeyExpr.or(E.SideBySideEditorActiveContext,E.TextCompareEditorActiveContext),f1:!0})}async run(ie){const re=ie.get(b.IEditorService),oe=ie.get(a.ICommandService),se=re.activeEditorPane;se instanceof y.SideBySideEditor?se.getSecondaryEditorPane()?.focus():se instanceof C.TextDiffEditor&&await oe.executeCommand(e.DIFF_FOCUS_SECONDARY_SIDE)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.FOCUS_SECOND_SIDE_EDITOR,title:{value:(0,t.localize)(13,null),original:"Focus Second Side in Active Editor"},category:g.Categories.View,precondition:d.ContextKeyExpr.or(E.SideBySideEditorActiveContext,E.TextCompareEditorActiveContext),f1:!0})}async run(ie){const re=ie.get(b.IEditorService),oe=ie.get(a.ICommandService),se=re.activeEditorPane;se instanceof y.SideBySideEditor?se.getPrimaryEditorPane()?.focus():se instanceof C.TextDiffEditor&&await oe.executeCommand(e.DIFF_FOCUS_PRIMARY_SIDE)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.FOCUS_OTHER_SIDE_EDITOR,title:{value:(0,t.localize)(14,null),original:"Focus Other Side in Active Editor"},category:g.Categories.View,precondition:d.ContextKeyExpr.or(E.SideBySideEditorActiveContext,E.TextCompareEditorActiveContext),f1:!0})}async run(ie){const re=ie.get(b.IEditorService),oe=ie.get(a.ICommandService),se=re.activeEditorPane;se instanceof y.SideBySideEditor?se.getPrimaryEditorPane()?.hasFocus()?se.getSecondaryEditorPane()?.focus():se.getPrimaryEditorPane()?.focus():se instanceof C.TextDiffEditor&&await oe.executeCommand(e.DIFF_FOCUS_OTHER_SIDE)}})}function G(){A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.KEEP_EDITOR_COMMAND_ID,weight:200,when:void 0,primary:(0,r.KeyChord)(2089,3),handler:async(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),{group:Z,editor:ne}=K(te,j(oe,se));if(Z&&ne)return Z.pinEditor(ne)}}),a.CommandsRegistry.registerCommand({id:e.TOGGLE_KEEP_EDITORS_COMMAND_ID,handler:re=>{const oe=re.get(n.IConfigurationService),te=oe.getValue("workbench.editor.enablePreview")!==!0;oe.updateValue("workbench.editor.enablePreview",te)}});function ie(re,oe,se,te){const Z=re.get(s.IEditorGroupsService),{group:ne}=K(Z,j(oe,se));ne?.lock(te??!ne.isLocked)}(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.TOGGLE_LOCK_GROUP_COMMAND_ID,title:{value:(0,t.localize)(15,null),original:"Toggle Editor Group Lock"},category:g.Categories.View,precondition:E.MultipleEditorGroupsContext,f1:!0})}async run(re,oe,se){ie(re,oe,se)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.LOCK_GROUP_COMMAND_ID,title:{value:(0,t.localize)(16,null),original:"Lock Editor Group"},category:g.Categories.View,precondition:d.ContextKeyExpr.and(E.MultipleEditorGroupsContext,E.ActiveEditorGroupLockedContext.toNegated()),f1:!0})}async run(re,oe,se){ie(re,oe,se,!0)}}),(0,o.registerAction2)(class extends o.Action2{constructor(){super({id:e.UNLOCK_GROUP_COMMAND_ID,title:{value:(0,t.localize)(17,null),original:"Unlock Editor Group"},precondition:d.ContextKeyExpr.and(E.MultipleEditorGroupsContext,E.ActiveEditorGroupLockedContext),category:g.Categories.View,f1:!0})}async run(re,oe,se){ie(re,oe,se,!1)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.PIN_EDITOR_COMMAND_ID,weight:200,when:E.ActiveEditorStickyContext.toNegated(),primary:(0,r.KeyChord)(2089,1027),handler:async(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),{group:Z,editor:ne}=K(te,j(oe,se));if(Z&&ne)return Z.stickEditor(ne)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.UNPIN_EDITOR_COMMAND_ID,weight:200,when:E.ActiveEditorStickyContext,primary:(0,r.KeyChord)(2089,1027),handler:async(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),{group:Z,editor:ne}=K(te,j(oe,se));if(Z&&ne)return Z.unstickEditor(ne)}}),A.KeybindingsRegistry.registerCommandAndKeybindingRule({id:e.SHOW_EDITORS_IN_GROUP,weight:200,when:void 0,primary:void 0,handler:(re,oe,se)=>{const te=re.get(s.IEditorGroupsService),Z=re.get(i.IQuickInputService),ne=j(oe,se);if(ne&&typeof ne.groupId=="number"){const ce=te.getGroup(ne.groupId);ce&&te.activateGroup(ce)}return Z.quickAccess.show(h.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX)}})}function Q(ie,re,oe){const se=ie.get(s.IEditorGroupsService),te=ie.get(f.IListService),Z=Y(j(re,oe),te,se),ne=se.activeGroup;return Z.length===0&&ne.activeEditor&&Z.push({groupId:ne.id,editorIndex:ne.getIndexOfEditor(ne.activeEditor)}),{editors:Z,groups:(0,l.distinct)(Z.map(ce=>ce.groupId)).map(ce=>se.getGroup(ce))}}function j(ie,re){if(u.URI.isUri(ie))return re;if(ie&&typeof ie.groupId=="number")return ie;if(re&&typeof re.groupId=="number")return re}function K(ie,re){let oe=re&&typeof re.groupId=="number"?ie.getGroup(re.groupId):void 0,se=oe&&re&&typeof re.editorIndex=="number"?(0,p.withNullAsUndefined)(oe.getEditorByIndex(re.editorIndex)):void 0;return oe||(oe=ie.activeGroup),se||(se=(0,p.withNullAsUndefined)(oe.activeEditor)),{group:oe,editor:se}}function Y(ie,re,oe){const se=re.lastFocusedList;if(se instanceof c.List&&se.getHTMLElement()===document.activeElement){const te=de=>{if((0,s.isEditorGroup)(de))return{groupId:de.id,editorIndex:void 0};const he=oe.getGroup(de.groupId);return{groupId:de.groupId,editorIndex:he?he.getIndexOfEditor(de.editor):-1}},Z=de=>(0,s.isEditorGroup)(de)||(0,k.isEditorIdentifier)(de),ne=se.getFocusedElements().filter(Z),ce=ie||(ne.length?ne.map(te)[0]:void 0);if(ce){const de=se.getSelectedElements().filter(Z);return de?.some(he=>{if((0,s.isEditorGroup)(he))return he.id===ce.groupId;const pe=oe.getGroup(he.groupId);return he.groupId===ce.groupId&&(pe?pe.getIndexOfEditor(he.editor):-1)===ce.editorIndex})?de.map(te):[ce]}}return ie?[ie]:[]}e.getMultiSelectedEditorContexts=Y;function ee(){N(),P(),B(),V(),z(),U(),G(),q(),X(),x(),W(),$()}e.setup=ee}),define(ae[698],le([1,0,1488,36,16,43,177,83,191,38,31,204,58,24,8,2,200,47,48,664,29,157,169,14,15,7,25]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"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 w extends p.Action{constructor(dt,ht,mt,Ot,Wt){super(dt,ht),this.commandId=mt,this.commandService=Ot,this.commandArgs=Wt}run(){return this.commandService.executeCommand(this.commandId,this.commandArgs)}}e.ExecuteCommandAction=w;class D extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.editorGroupService=mt,this.configurationService=Ot,this.toDispose=this._register(new f.DisposableStore),this.direction=this.getDirection(),this.registerListeners()}getDirection(){return(0,r.preferredSideBySideGroupDirection)(this.configurationService)}registerListeners(){this.toDispose.add(this.configurationService.onDidChangeConfiguration(dt=>{dt.affectsConfiguration("workbench.editor.openSideBySideDirection")&&(this.direction=(0,r.preferredSideBySideGroupDirection)(this.configurationService))}))}async run(dt){(0,C.splitEditor)(this.editorGroupService,this.direction,dt)}}let y=class extends D{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}};y.ID="workbench.action.splitEditor",y.LABEL=(0,t.localize)(0,null),y=we([F(2,r.IEditorGroupsService),F(3,i.IConfigurationService)],y),e.SplitEditorAction=y;let T=class extends D{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}getDirection(){return(0,r.preferredSideBySideGroupDirection)(this.configurationService)===3?1:3}};T.ID="workbench.action.splitEditorOrthogonal",T.LABEL=(0,t.localize)(1,null),T=we([F(2,r.IEditorGroupsService),F(3,i.IConfigurationService)],T),e.SplitEditorOrthogonalAction=T;let _=class extends w{constructor(dt,ht,mt){super(dt,ht,C.SPLIT_EDITOR_LEFT,mt)}};_.ID=C.SPLIT_EDITOR_LEFT,_.LABEL=(0,t.localize)(2,null),_=we([F(2,S.ICommandService)],_),e.SplitEditorLeftAction=_;let L=class extends w{constructor(dt,ht,mt){super(dt,ht,C.SPLIT_EDITOR_RIGHT,mt)}};L.ID=C.SPLIT_EDITOR_RIGHT,L.LABEL=(0,t.localize)(3,null),L=we([F(2,S.ICommandService)],L),e.SplitEditorRightAction=L;let M=class extends w{constructor(dt,ht,mt){super(dt,ht,C.SPLIT_EDITOR_UP,mt)}};M.ID=C.SPLIT_EDITOR_UP,M.LABEL=(0,t.localize)(4,null),M=we([F(2,S.ICommandService)],M),e.SplitEditorUpAction=M;let O=class extends w{constructor(dt,ht,mt){super(dt,ht,C.SPLIT_EDITOR_DOWN,mt)}};O.ID=C.SPLIT_EDITOR_DOWN,O.LABEL=(0,t.localize)(5,null),O=we([F(2,S.ICommandService)],O),e.SplitEditorDownAction=O;let N=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(dt){let ht;if(dt&&typeof dt.groupId=="number"?ht=this.editorGroupService.getGroup(dt.groupId):ht=this.editorGroupService.activeGroup,ht){const mt=[3,1,2,0];for(const Ot of mt){const Wt=this.editorGroupService.findGroup({direction:Ot},ht);if(Wt&&ht!==Wt){this.editorGroupService.mergeGroup(ht,Wt);break}}}}};N.ID="workbench.action.joinTwoGroups",N.LABEL=(0,t.localize)(6,null),N=we([F(2,r.IEditorGroupsService)],N),e.JoinTwoGroupsAction=N;let P=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(){this.editorGroupService.mergeAllGroups()}};P.ID="workbench.action.joinAllGroups",P.LABEL=(0,t.localize)(7,null),P=we([F(2,r.IEditorGroupsService)],P),e.JoinAllGroupsAction=P;let B=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(){this.editorGroupService.findGroup({location:2},this.editorGroupService.activeGroup,!0)?.focus()}};B.ID="workbench.action.navigateEditorGroups",B.LABEL=(0,t.localize)(8,null),B=we([F(2,r.IEditorGroupsService)],B),e.NavigateBetweenGroupsAction=B;let V=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(){this.editorGroupService.activeGroup.focus()}};V.ID="workbench.action.focusActiveEditorGroup",V.LABEL=(0,t.localize)(9,null),V=we([F(2,r.IEditorGroupsService)],V),e.FocusActiveGroupAction=V;let z=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.scope=mt,this.editorGroupService=Ot}async run(){this.editorGroupService.findGroup(this.scope,this.editorGroupService.activeGroup,!0)?.focus()}};z=we([F(3,r.IEditorGroupsService)],z);let x=class extends z{constructor(dt,ht,mt){super(dt,ht,{location:0},mt)}};x.ID="workbench.action.focusFirstEditorGroup",x.LABEL=(0,t.localize)(10,null),x=we([F(2,r.IEditorGroupsService)],x),e.FocusFirstGroupAction=x;let H=class extends z{constructor(dt,ht,mt){super(dt,ht,{location:1},mt)}};H.ID="workbench.action.focusLastEditorGroup",H.LABEL=(0,t.localize)(11,null),H=we([F(2,r.IEditorGroupsService)],H),e.FocusLastGroupAction=H;let W=class extends z{constructor(dt,ht,mt){super(dt,ht,{location:2},mt)}};W.ID="workbench.action.focusNextGroup",W.LABEL=(0,t.localize)(12,null),W=we([F(2,r.IEditorGroupsService)],W),e.FocusNextGroup=W;let U=class extends z{constructor(dt,ht,mt){super(dt,ht,{location:3},mt)}};U.ID="workbench.action.focusPreviousGroup",U.LABEL=(0,t.localize)(13,null),U=we([F(2,r.IEditorGroupsService)],U),e.FocusPreviousGroup=U;let $=class extends z{constructor(dt,ht,mt){super(dt,ht,{direction:2},mt)}};$.ID="workbench.action.focusLeftGroup",$.LABEL=(0,t.localize)(14,null),$=we([F(2,r.IEditorGroupsService)],$),e.FocusLeftGroup=$;let q=class extends z{constructor(dt,ht,mt){super(dt,ht,{direction:3},mt)}};q.ID="workbench.action.focusRightGroup",q.LABEL=(0,t.localize)(15,null),q=we([F(2,r.IEditorGroupsService)],q),e.FocusRightGroup=q;let X=class extends z{constructor(dt,ht,mt){super(dt,ht,{direction:0},mt)}};X.ID="workbench.action.focusAboveGroup",X.LABEL=(0,t.localize)(16,null),X=we([F(2,r.IEditorGroupsService)],X),e.FocusAboveGroup=X;let G=class extends z{constructor(dt,ht,mt){super(dt,ht,{direction:1},mt)}};G.ID="workbench.action.focusBelowGroup",G.LABEL=(0,t.localize)(17,null),G=we([F(2,r.IEditorGroupsService)],G),e.FocusBelowGroup=G;let Q=class extends p.Action{constructor(dt,ht,mt){super(dt,ht,n.Codicon.close.classNames),this.commandService=mt}run(dt){return this.commandService.executeCommand(C.CLOSE_EDITOR_COMMAND_ID,void 0,dt)}};Q.ID="workbench.action.closeActiveEditor",Q.LABEL=(0,t.localize)(18,null),Q=we([F(2,S.ICommandService)],Q),e.CloseEditorAction=Q;let j=class extends p.Action{constructor(dt,ht,mt){super(dt,ht,n.Codicon.pinned.classNames),this.commandService=mt}run(dt){return this.commandService.executeCommand(C.UNPIN_EDITOR_COMMAND_ID,void 0,dt)}};j.ID="workbench.action.unpinActiveEditor",j.LABEL=(0,t.localize)(19,null),j=we([F(2,S.ICommandService)],j),e.UnpinEditorAction=j;let K=class extends p.Action{constructor(dt,ht,mt){super(dt,ht,n.Codicon.close.classNames),this.editorGroupService=mt}async run(dt){let ht,mt;if(dt&&(ht=this.editorGroupService.getGroup(dt.groupId),ht&&(mt=dt.editorIndex)),ht||(ht=this.editorGroupService.activeGroup),typeof mt=="number"){const Ot=ht.getEditorByIndex(mt);if(Ot){await ht.closeEditor(Ot,{preserveFocus:dt?.preserveFocus});return}}if(ht.activeEditor){await ht.closeEditor(ht.activeEditor,{preserveFocus:dt?.preserveFocus});return}}};K.ID="workbench.action.closeActiveEditor",K.LABEL=(0,t.localize)(20,null),K=we([F(2,r.IEditorGroupsService)],K),e.CloseOneEditorAction=K;let Y=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.editorService=mt,this.logService=Ot}async run(){const dt=this.editorService.activeEditorPane;if(dt){const ht=dt.input,mt=dt.group;try{await this.editorService.revert({editor:ht,groupId:mt.id})}catch(Ot){this.logService.error(Ot),await this.editorService.revert({editor:ht,groupId:mt.id},{soft:!0})}await mt.closeEditor(ht)}}};Y.ID="workbench.action.revertAndCloseActiveEditor",Y.LABEL=(0,t.localize)(21,null),Y=we([F(2,u.IEditorService),F(3,m.ILogService)],Y),e.RevertAndCloseEditorAction=Y;let ee=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(dt){const{group:ht,editor:mt}=this.getTarget(dt);ht&&mt&&await ht.closeEditors({direction:0,except:mt,excludeSticky:!0})}getTarget(dt){return dt?{editor:dt.editor,group:this.editorGroupService.getGroup(dt.groupId)}:{group:this.editorGroupService.activeGroup,editor:this.editorGroupService.activeGroup.activeEditor}}};ee.ID="workbench.action.closeEditorsToTheLeft",ee.LABEL=(0,t.localize)(22,null),ee=we([F(2,r.IEditorGroupsService)],ee),e.CloseLeftEditorsInGroupAction=ee;class ie extends p.Action{constructor(dt,ht,mt,Ot,Wt,jt,ci){super(dt,ht,mt),this.fileDialogService=Ot,this.editorGroupService=Wt,this.editorService=jt,this.filesConfigurationService=ci}get groupsToClose(){const dt=[],ht=this.editorGroupService.getGroups(2);for(let mt=ht.length-1;mt>=0;mt--)dt.push(ht[mt]);return dt}async run(){const dt=new Set,ht=new Set,mt=new Set,Ot=new Map;for(const{editor:Wt,groupId:jt}of this.editorService.getEditors(1,{excludeSticky:this.excludeSticky})){let ci=!1;if(Wt.closeHandler?ci=Wt.closeHandler.showConfirm():ci=Wt.isDirty()&&!Wt.isSaving(),!!ci)if(typeof Wt.closeHandler?.confirm=="function"){let Oi=Ot.get(Wt.typeId);Oi||(Oi=new Set,Ot.set(Wt.typeId,Oi)),Oi.add({editor:Wt,groupId:jt})}else this.filesConfigurationService.getAutoSaveMode()===3&&!Wt.hasCapability(4)?ht.add({editor:Wt,groupId:jt}):g.isNative&&(g.isWindows||g.isLinux)&&this.filesConfigurationService.getAutoSaveMode()===4&&!Wt.hasCapability(4)?mt.add({editor:Wt,groupId:jt}):dt.add({editor:Wt,groupId:jt})}if(dt.size>0){const Wt=Array.from(dt.values());switch(await this.revealEditorsToConfirm(Wt),await this.fileDialogService.showSaveConfirm(Wt.map(({editor:ci})=>ci instanceof k.SideBySideEditorInput?ci.primary.getName():ci.getName()))){case 2:return;case 1:await this.editorService.revert(Wt,{soft:!0});break;case 0:await this.editorService.save(Wt,{reason:1});break}}for(const[,Wt]of Ot){const jt=Array.from(Wt.values());await this.revealEditorsToConfirm(jt);const ci=await(0,R.firstOrDefault)(jt)?.editor.closeHandler?.confirm?.(jt);if(typeof ci=="number")switch(ci){case 2:return;case 1:await this.editorService.revert(jt,{soft:!0});break;case 0:await this.editorService.save(jt,{reason:1});break}}if(ht.size>0){const Wt=Array.from(ht.values());await this.editorService.save(Wt,{reason:3})}if(mt.size>0){const Wt=Array.from(mt.values());await this.editorService.save(Wt,{reason:4})}return this.doCloseAll()}async revealEditorsToConfirm(dt){try{const ht=new Set;for(const{editor:mt,groupId:Ot}of dt){if(ht.has(Ot))continue;ht.add(Ot),await this.editorGroupService.getGroup(Ot)?.openEditor(mt)}}catch{}}async doCloseAll(){await Promise.all(this.groupsToClose.map(dt=>dt.closeAllEditors({excludeSticky:this.excludeSticky})))}}let re=class extends ie{constructor(dt,ht,mt,Ot,Wt,jt){super(dt,ht,n.Codicon.closeAll.classNames,mt,Ot,Wt,jt)}get excludeSticky(){return!0}};re.ID="workbench.action.closeAllEditors",re.LABEL=(0,t.localize)(23,null),re=we([F(2,l.IFileDialogService),F(3,r.IEditorGroupsService),F(4,u.IEditorService),F(5,a.IFilesConfigurationService)],re),e.CloseAllEditorsAction=re;let oe=class extends ie{constructor(dt,ht,mt,Ot,Wt,jt){super(dt,ht,void 0,mt,Ot,Wt,jt)}get excludeSticky(){return!1}async doCloseAll(){await super.doCloseAll();for(const dt of this.groupsToClose)this.editorGroupService.removeGroup(dt)}};oe.ID="workbench.action.closeAllGroups",oe.LABEL=(0,t.localize)(24,null),oe=we([F(2,l.IFileDialogService),F(3,r.IEditorGroupsService),F(4,u.IEditorService),F(5,a.IFilesConfigurationService)],oe),e.CloseAllEditorGroupsAction=oe;let se=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(dt){const ht=dt?this.editorGroupService.getGroup(dt.groupId):this.editorGroupService.activeGroup;await Promise.all(this.editorGroupService.getGroups(1).map(async mt=>{if(!(ht&&mt.id===ht.id))return mt.closeAllEditors({excludeSticky:!0})}))}};se.ID="workbench.action.closeEditorsInOtherGroups",se.LABEL=(0,t.localize)(25,null),se=we([F(2,r.IEditorGroupsService)],se),e.CloseEditorsInOtherGroupsAction=se;let te=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.editorGroupService=mt,this.editorService=Ot}async run(){const dt=this.editorService.activeEditor;dt&&await Promise.all(this.editorGroupService.getGroups(1).map(ht=>ht.closeEditor(dt)))}};te.ID="workbench.action.closeEditorInAllGroups",te.LABEL=(0,t.localize)(26,null),te=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],te),e.CloseEditorInAllGroupsAction=te;class Z extends p.Action{constructor(dt,ht,mt,Ot,Wt){super(dt,ht),this.direction=mt,this.isMove=Ot,this.editorGroupService=Wt}async run(dt){let ht;if(dt&&typeof dt.groupId=="number"?ht=this.editorGroupService.getGroup(dt.groupId):ht=this.editorGroupService.activeGroup,ht){let mt;if(this.isMove){const Ot=this.findTargetGroup(ht);Ot&&(mt=this.editorGroupService.moveGroup(ht,Ot,this.direction))}else mt=this.editorGroupService.copyGroup(ht,ht,this.direction);mt&&this.editorGroupService.activateGroup(mt)}}findTargetGroup(dt){const ht=[this.direction];switch(this.direction){case 2:case 3:ht.push(0,1);break;case 0:case 1:ht.push(2,3);break}for(const mt of ht){const Ot=this.editorGroupService.findGroup({direction:mt},dt);if(Ot)return Ot}}}class ne extends Z{constructor(dt,ht,mt,Ot){super(dt,ht,mt,!0,Ot)}}let ce=class extends ne{constructor(dt,ht,mt){super(dt,ht,2,mt)}};ce.ID="workbench.action.moveActiveEditorGroupLeft",ce.LABEL=(0,t.localize)(27,null),ce=we([F(2,r.IEditorGroupsService)],ce),e.MoveGroupLeftAction=ce;let de=class extends ne{constructor(dt,ht,mt){super(dt,ht,3,mt)}};de.ID="workbench.action.moveActiveEditorGroupRight",de.LABEL=(0,t.localize)(28,null),de=we([F(2,r.IEditorGroupsService)],de),e.MoveGroupRightAction=de;let he=class extends ne{constructor(dt,ht,mt){super(dt,ht,0,mt)}};he.ID="workbench.action.moveActiveEditorGroupUp",he.LABEL=(0,t.localize)(29,null),he=we([F(2,r.IEditorGroupsService)],he),e.MoveGroupUpAction=he;let pe=class extends ne{constructor(dt,ht,mt){super(dt,ht,1,mt)}};pe.ID="workbench.action.moveActiveEditorGroupDown",pe.LABEL=(0,t.localize)(30,null),pe=we([F(2,r.IEditorGroupsService)],pe),e.MoveGroupDownAction=pe;class me extends Z{constructor(dt,ht,mt,Ot){super(dt,ht,mt,!1,Ot)}}let Se=class extends me{constructor(dt,ht,mt){super(dt,ht,2,mt)}};Se.ID="workbench.action.duplicateActiveEditorGroupLeft",Se.LABEL=(0,t.localize)(31,null),Se=we([F(2,r.IEditorGroupsService)],Se),e.DuplicateGroupLeftAction=Se;let Ie=class extends me{constructor(dt,ht,mt){super(dt,ht,3,mt)}};Ie.ID="workbench.action.duplicateActiveEditorGroupRight",Ie.LABEL=(0,t.localize)(32,null),Ie=we([F(2,r.IEditorGroupsService)],Ie),e.DuplicateGroupRightAction=Ie;let ve=class extends me{constructor(dt,ht,mt){super(dt,ht,0,mt)}};ve.ID="workbench.action.duplicateActiveEditorGroupUp",ve.LABEL=(0,t.localize)(33,null),ve=we([F(2,r.IEditorGroupsService)],ve),e.DuplicateGroupUpAction=ve;let be=class extends me{constructor(dt,ht,mt){super(dt,ht,1,mt)}};be.ID="workbench.action.duplicateActiveEditorGroupDown",be.LABEL=(0,t.localize)(34,null),be=we([F(2,r.IEditorGroupsService)],be),e.DuplicateGroupDownAction=be;let ge=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(){this.editorGroupService.arrangeGroups(0)}};ge.ID="workbench.action.minimizeOtherEditors",ge.LABEL=(0,t.localize)(35,null),ge=we([F(2,r.IEditorGroupsService)],ge),e.MinimizeOtherGroupsAction=ge;let ue=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(){this.editorGroupService.arrangeGroups(1)}};ue.ID="workbench.action.evenEditorWidths",ue.LABEL=(0,t.localize)(36,null),ue=we([F(2,r.IEditorGroupsService)],ue),e.ResetGroupSizesAction=ue;let Ce=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorGroupService=mt}async run(){this.editorGroupService.arrangeGroups(2)}};Ce.ID="workbench.action.toggleEditorWidths",Ce.LABEL=(0,t.localize)(37,null),Ce=we([F(2,r.IEditorGroupsService)],Ce),e.ToggleGroupSizesAction=Ce;let De=class extends p.Action{constructor(dt,ht,mt,Ot,Wt){super(dt,ht),this.editorService=mt,this.editorGroupService=Ot,this.layoutService=Wt}async run(){this.editorService.activeEditor&&(this.layoutService.setPartHidden(!0,"workbench.parts.sidebar"),this.layoutService.setPartHidden(!0,"workbench.parts.auxiliarybar"),this.editorGroupService.arrangeGroups(0))}};De.ID="workbench.action.maximizeEditor",De.LABEL=(0,t.localize)(38,null),De=we([F(2,u.IEditorService),F(3,r.IEditorGroupsService),F(4,E.IWorkbenchLayoutService)],De),e.MaximizeGroupAction=De;class Ae extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.editorGroupService=mt,this.editorService=Ot}async run(){const dt=this.navigate();if(!dt)return;const{groupId:ht,editor:mt}=dt;if(!mt)return;const Ot=this.editorGroupService.getGroup(ht);Ot&&await Ot.openEditor(mt)}}let Pe=class extends Ae{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}navigate(){const dt=this.editorGroupService.activeGroup,ht=dt.getEditors(1),mt=dt.activeEditor?ht.indexOf(dt.activeEditor):-1;if(mt+1<ht.length)return{editor:ht[mt+1],groupId:dt.id};const Ot=new Set;let Wt=this.editorGroupService.activeGroup;for(;Wt&&!Ot.has(Wt.id);)if(Wt=this.editorGroupService.findGroup({location:2},Wt,!0),Wt){Ot.add(Wt.id);const jt=Wt.getEditors(1);if(jt.length>0)return{editor:jt[0],groupId:Wt.id}}}};Pe.ID="workbench.action.nextEditor",Pe.LABEL=(0,t.localize)(39,null),Pe=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],Pe),e.OpenNextEditor=Pe;let fe=class extends Ae{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}navigate(){const dt=this.editorGroupService.activeGroup,ht=dt.getEditors(1),mt=dt.activeEditor?ht.indexOf(dt.activeEditor):-1;if(mt>0)return{editor:ht[mt-1],groupId:dt.id};const Ot=new Set;let Wt=this.editorGroupService.activeGroup;for(;Wt&&!Ot.has(Wt.id);)if(Wt=this.editorGroupService.findGroup({location:3},Wt,!0),Wt){Ot.add(Wt.id);const jt=Wt.getEditors(1);if(jt.length>0)return{editor:jt[jt.length-1],groupId:Wt.id}}}};fe.ID="workbench.action.previousEditor",fe.LABEL=(0,t.localize)(40,null),fe=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],fe),e.OpenPreviousEditor=fe;let ye=class extends Ae{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}navigate(){const dt=this.editorGroupService.activeGroup,ht=dt.getEditors(1),mt=dt.activeEditor?ht.indexOf(dt.activeEditor):-1;return{editor:mt+1<ht.length?ht[mt+1]:ht[0],groupId:dt.id}}};ye.ID="workbench.action.nextEditorInGroup",ye.LABEL=(0,t.localize)(41,null),ye=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],ye),e.OpenNextEditorInGroup=ye;let ke=class extends Ae{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}navigate(){const dt=this.editorGroupService.activeGroup,ht=dt.getEditors(1),mt=dt.activeEditor?ht.indexOf(dt.activeEditor):-1;return{editor:mt>0?ht[mt-1]:ht[ht.length-1],groupId:dt.id}}};ke.ID="workbench.action.previousEditorInGroup",ke.LABEL=(0,t.localize)(42,null),ke=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],ke),e.OpenPreviousEditorInGroup=ke;let Ee=class extends Ae{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}navigate(){const dt=this.editorGroupService.activeGroup;return{editor:dt.getEditors(1)[0],groupId:dt.id}}};Ee.ID="workbench.action.firstEditorInGroup",Ee.LABEL=(0,t.localize)(43,null),Ee=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],Ee),e.OpenFirstEditorInGroup=Ee;let Te=class extends Ae{constructor(dt,ht,mt,Ot){super(dt,ht,mt,Ot)}navigate(){const dt=this.editorGroupService.activeGroup,ht=dt.getEditors(1);return{editor:ht[ht.length-1],groupId:dt.id}}};Te.ID="workbench.action.lastEditorInGroup",Te.LABEL=(0,t.localize)(44,null),Te=we([F(2,r.IEditorGroupsService),F(3,u.IEditorService)],Te),e.OpenLastEditorInGroup=Te;class _e extends h.Action2{constructor(){super({id:_e.ID,title:{value:(0,t.localize)(46,null),original:"Go Forward",mnemonicTitle:(0,t.localize)(47,null)},f1:!0,icon:n.Codicon.arrowRight,precondition:v.ContextKeyExpr.has("canNavigateForward"),keybinding:{weight:200,win:{primary:529},mac:{primary:1363},linux:{primary:3155}},menu:[{id:h.MenuId.MenubarGoMenu,group:"1_history_nav",order:2},{id:h.MenuId.CommandCenter,order:2}]})}async run(dt){await dt.get(I.IHistoryService).goForward(0)}}e.NavigateForwardAction=_e,_e.ID="workbench.action.navigateForward",_e.LABEL=(0,t.localize)(45,null);class Re extends h.Action2{constructor(){super({id:Re.ID,title:{value:(0,t.localize)(49,null),original:"Go Back",mnemonicTitle:(0,t.localize)(50,null)},f1:!0,precondition:v.ContextKeyExpr.has("canNavigateBack"),icon:n.Codicon.arrowLeft,keybinding:{weight:200,win:{primary:527},mac:{primary:339},linux:{primary:2643}},menu:[{id:h.MenuId.MenubarGoMenu,group:"1_history_nav",order:1},{id:h.MenuId.CommandCenter,order:1}]})}async run(dt){await dt.get(I.IHistoryService).goBack(0)}}e.NavigateBackwardsAction=Re,Re.ID="workbench.action.navigateBack",Re.LABEL=(0,t.localize)(48,null);let Le=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goPrevious(0)}};Le.ID="workbench.action.navigateLast",Le.LABEL=(0,t.localize)(51,null),Le=we([F(2,I.IHistoryService)],Le),e.NavigatePreviousAction=Le;let Me=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goForward(1)}};Me.ID="workbench.action.navigateForwardInEditLocations",Me.LABEL=(0,t.localize)(52,null),Me=we([F(2,I.IHistoryService)],Me),e.NavigateForwardInEditsAction=Me;let Oe=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goBack(1)}};Oe.ID="workbench.action.navigateBackInEditLocations",Oe.LABEL=(0,t.localize)(53,null),Oe=we([F(2,I.IHistoryService)],Oe),e.NavigateBackwardsInEditsAction=Oe;let Ke=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goPrevious(1)}};Ke.ID="workbench.action.navigatePreviousInEditLocations",Ke.LABEL=(0,t.localize)(54,null),Ke=we([F(2,I.IHistoryService)],Ke),e.NavigatePreviousInEditsAction=Ke;let We=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goLast(1)}};We.ID="workbench.action.navigateToLastEditLocation",We.LABEL=(0,t.localize)(55,null),We=we([F(2,I.IHistoryService)],We),e.NavigateToLastEditLocationAction=We;let Xe=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goForward(2)}};Xe.ID="workbench.action.navigateForwardInNavigationLocations",Xe.LABEL=(0,t.localize)(56,null),Xe=we([F(2,I.IHistoryService)],Xe),e.NavigateForwardInNavigationsAction=Xe;let Je=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goBack(2)}};Je.ID="workbench.action.navigateBackInNavigationLocations",Je.LABEL=(0,t.localize)(57,null),Je=we([F(2,I.IHistoryService)],Je),e.NavigateBackwardsInNavigationsAction=Je;let rt=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goPrevious(2)}};rt.ID="workbench.action.navigatePreviousInNavigationLocations",rt.LABEL=(0,t.localize)(58,null),rt=we([F(2,I.IHistoryService)],rt),e.NavigatePreviousInNavigationsAction=rt;let je=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.goLast(2)}};je.ID="workbench.action.navigateToLastNavigationLocation",je.LABEL=(0,t.localize)(59,null),je=we([F(2,I.IHistoryService)],je),e.NavigateToLastNavigationLocationAction=je;let Ue=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){await this.historyService.reopenLastClosedEditor()}};Ue.ID="workbench.action.reopenClosedEditor",Ue.LABEL=(0,t.localize)(60,null),Ue=we([F(2,I.IHistoryService)],Ue),e.ReopenClosedEditorAction=Ue;let Fe=class extends p.Action{constructor(dt,ht,mt,Ot,Wt){super(dt,ht),this.workspacesService=mt,this.historyService=Ot,this.dialogService=Wt}async run(){const{confirmed:dt}=await this.dialogService.confirm({message:(0,t.localize)(62,null),detail:(0,t.localize)(63,null),primaryButton:(0,t.localize)(64,null),type:"warning"});!dt||(this.workspacesService.clearRecentlyOpened(),this.historyService.clearRecentlyOpened())}};Fe.ID="workbench.action.clearRecentFiles",Fe.LABEL=(0,t.localize)(61,null),Fe=we([F(2,c.IWorkspacesService),F(3,I.IHistoryService),F(4,l.IDialogService)],Fe),e.ClearRecentFilesAction=Fe;let He=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.quickInputService=mt}async run(){this.quickInputService.quickAccess.show(d.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX)}};He.ID="workbench.action.showEditorsInActiveGroup",He.LABEL=(0,t.localize)(65,null),He=we([F(2,s.IQuickInputService)],He),e.ShowEditorsInActiveGroupByMostRecentlyUsedAction=He;let Be=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.quickInputService=mt}async run(){this.quickInputService.quickAccess.show(d.AllEditorsByAppearanceQuickAccess.PREFIX)}};Be.ID="workbench.action.showAllEditors",Be.LABEL=(0,t.localize)(66,null),Be=we([F(2,s.IQuickInputService)],Be),e.ShowAllEditorsByAppearanceAction=Be;let ze=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.quickInputService=mt}async run(){this.quickInputService.quickAccess.show(d.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX)}};ze.ID="workbench.action.showAllEditorsByMostRecentlyUsed",ze.LABEL=(0,t.localize)(67,null),ze=we([F(2,s.IQuickInputService)],ze),e.ShowAllEditorsByMostRecentlyUsedAction=ze;let nt=class extends p.Action{constructor(dt,ht,mt,Ot,Wt,jt){super(dt,ht),this.prefix=mt,this.itemActivation=Ot,this.quickInputService=Wt,this.keybindingService=jt}async run(){const dt=this.keybindingService.lookupKeybindings(this.id);this.quickInputService.quickAccess.show(this.prefix,{quickNavigateConfiguration:{keybindings:dt},itemActivation:this.itemActivation})}};nt=we([F(4,s.IQuickInputService),F(5,b.IKeybindingService)],nt);let ut=class extends nt{constructor(dt,ht,mt,Ot){super(dt,ht,d.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,void 0,mt,Ot)}};ut.ID="workbench.action.quickOpenPreviousRecentlyUsedEditor",ut.LABEL=(0,t.localize)(68,null),ut=we([F(2,s.IQuickInputService),F(3,b.IKeybindingService)],ut),e.QuickAccessPreviousRecentlyUsedEditorAction=ut;let ot=class extends nt{constructor(dt,ht,mt,Ot){super(dt,ht,d.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,void 0,mt,Ot)}};ot.ID="workbench.action.quickOpenLeastRecentlyUsedEditor",ot.LABEL=(0,t.localize)(69,null),ot=we([F(2,s.IQuickInputService),F(3,b.IKeybindingService)],ot),e.QuickAccessLeastRecentlyUsedEditorAction=ot;let at=class extends nt{constructor(dt,ht,mt,Ot){super(dt,ht,d.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,void 0,mt,Ot)}};at.ID="workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup",at.LABEL=(0,t.localize)(70,null),at=we([F(2,s.IQuickInputService),F(3,b.IKeybindingService)],at),e.QuickAccessPreviousRecentlyUsedEditorInGroupAction=at;let wt=class extends nt{constructor(dt,ht,mt,Ot){super(dt,ht,d.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,s.ItemActivation.LAST,mt,Ot)}};wt.ID="workbench.action.quickOpenLeastRecentlyUsedEditorInGroup",wt.LABEL=(0,t.localize)(71,null),wt=we([F(2,s.IQuickInputService),F(3,b.IKeybindingService)],wt),e.QuickAccessLeastRecentlyUsedEditorInGroupAction=wt;let It=class extends p.Action{constructor(dt,ht,mt,Ot,Wt){super(dt,ht),this.quickInputService=mt,this.keybindingService=Ot,this.editorGroupService=Wt}async run(){const dt=this.keybindingService.lookupKeybindings(this.id);let ht;this.editorGroupService.activeGroup.count===0&&(ht=s.ItemActivation.FIRST),this.quickInputService.quickAccess.show("",{quickNavigateConfiguration:{keybindings:dt},itemActivation:ht})}};It.ID="workbench.action.openPreviousEditorFromHistory",It.LABEL=(0,t.localize)(72,null),It=we([F(2,s.IQuickInputService),F(3,b.IKeybindingService),F(4,r.IEditorGroupsService)],It),e.QuickAccessPreviousEditorFromHistoryAction=It;let _t=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){this.historyService.openNextRecentlyUsedEditor()}};_t.ID="workbench.action.openNextRecentlyUsedEditor",_t.LABEL=(0,t.localize)(73,null),_t=we([F(2,I.IHistoryService)],_t),e.OpenNextRecentlyUsedEditorAction=_t;let lt=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.historyService=mt}async run(){this.historyService.openPreviouslyUsedEditor()}};lt.ID="workbench.action.openPreviousRecentlyUsedEditor",lt.LABEL=(0,t.localize)(74,null),lt=we([F(2,I.IHistoryService)],lt),e.OpenPreviousRecentlyUsedEditorAction=lt;let pt=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.historyService=mt,this.editorGroupsService=Ot}async run(){this.historyService.openNextRecentlyUsedEditor(this.editorGroupsService.activeGroup.id)}};pt.ID="workbench.action.openNextRecentlyUsedEditorInGroup",pt.LABEL=(0,t.localize)(75,null),pt=we([F(2,I.IHistoryService),F(3,r.IEditorGroupsService)],pt),e.OpenNextRecentlyUsedEditorInGroupAction=pt;let st=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.historyService=mt,this.editorGroupsService=Ot}async run(){this.historyService.openPreviouslyUsedEditor(this.editorGroupsService.activeGroup.id)}};st.ID="workbench.action.openPreviousRecentlyUsedEditorInGroup",st.LABEL=(0,t.localize)(76,null),st=we([F(2,I.IHistoryService),F(3,r.IEditorGroupsService)],st),e.OpenPreviousRecentlyUsedEditorInGroupAction=st;let qe=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.historyService=mt,this.dialogService=Ot}async run(){const{confirmed:dt}=await this.dialogService.confirm({message:(0,t.localize)(78,null),detail:(0,t.localize)(79,null),primaryButton:(0,t.localize)(80,null),type:"warning"});!dt||this.historyService.clear()}};qe.ID="workbench.action.clearEditorHistory",qe.LABEL=(0,t.localize)(77,null),qe=we([F(2,I.IHistoryService),F(3,l.IDialogService)],qe),e.ClearEditorHistoryAction=qe;let Et=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"left"})}};Et.ID="workbench.action.moveEditorLeftInGroup",Et.LABEL=(0,t.localize)(81,null),Et=we([F(2,S.ICommandService)],Et),e.MoveEditorLeftInGroupAction=Et;let Tt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"right"})}};Tt.ID="workbench.action.moveEditorRightInGroup",Tt.LABEL=(0,t.localize)(82,null),Tt=we([F(2,S.ICommandService)],Tt),e.MoveEditorRightInGroupAction=Tt;let xt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"previous",by:"group"})}};xt.ID="workbench.action.moveEditorToPreviousGroup",xt.LABEL=(0,t.localize)(83,null),xt=we([F(2,S.ICommandService)],xt),e.MoveEditorToPreviousGroupAction=xt;let At=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"next",by:"group"})}};At.ID="workbench.action.moveEditorToNextGroup",At.LABEL=(0,t.localize)(84,null),At=we([F(2,S.ICommandService)],At),e.MoveEditorToNextGroupAction=At;let Nt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"up",by:"group"})}};Nt.ID="workbench.action.moveEditorToAboveGroup",Nt.LABEL=(0,t.localize)(85,null),Nt=we([F(2,S.ICommandService)],Nt),e.MoveEditorToAboveGroupAction=Nt;let kt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"down",by:"group"})}};kt.ID="workbench.action.moveEditorToBelowGroup",kt.LABEL=(0,t.localize)(86,null),kt=we([F(2,S.ICommandService)],kt),e.MoveEditorToBelowGroupAction=kt;let Ne=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"left",by:"group"})}};Ne.ID="workbench.action.moveEditorToLeftGroup",Ne.LABEL=(0,t.localize)(87,null),Ne=we([F(2,S.ICommandService)],Ne),e.MoveEditorToLeftGroupAction=Ne;let Ge=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"right",by:"group"})}};Ge.ID="workbench.action.moveEditorToRightGroup",Ge.LABEL=(0,t.localize)(88,null),Ge=we([F(2,S.ICommandService)],Ge),e.MoveEditorToRightGroupAction=Ge;let Ze=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"first",by:"group"})}};Ze.ID="workbench.action.moveEditorToFirstGroup",Ze.LABEL=(0,t.localize)(89,null),Ze=we([F(2,S.ICommandService)],Ze),e.MoveEditorToFirstGroupAction=Ze;let ft=class extends w{constructor(dt,ht,mt){super(dt,ht,C.MOVE_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"last",by:"group"})}};ft.ID="workbench.action.moveEditorToLastGroup",ft.LABEL=(0,t.localize)(90,null),ft=we([F(2,S.ICommandService)],ft),e.MoveEditorToLastGroupAction=ft;let Dt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"previous",by:"group"})}};Dt.ID="workbench.action.splitEditorToPreviousGroup",Dt.LABEL=(0,t.localize)(91,null),Dt=we([F(2,S.ICommandService)],Dt),e.SplitEditorToPreviousGroupAction=Dt;let St=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"next",by:"group"})}};St.ID="workbench.action.splitEditorToNextGroup",St.LABEL=(0,t.localize)(92,null),St=we([F(2,S.ICommandService)],St),e.SplitEditorToNextGroupAction=St;let Ye=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"up",by:"group"})}};Ye.ID="workbench.action.splitEditorToAboveGroup",Ye.LABEL=(0,t.localize)(93,null),Ye=we([F(2,S.ICommandService)],Ye),e.SplitEditorToAboveGroupAction=Ye;let it=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"down",by:"group"})}};it.ID="workbench.action.splitEditorToBelowGroup",it.LABEL=(0,t.localize)(94,null),it=we([F(2,S.ICommandService)],it),e.SplitEditorToBelowGroupAction=it;let ct=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"left",by:"group"})}};ct.ID="workbench.action.splitEditorToLeftGroup",ct.LABEL=(0,t.localize)(95,null),ct=we([F(2,S.ICommandService)],ct),e.SplitEditorToLeftGroupAction=ct;let gt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"right",by:"group"})}};gt.ID="workbench.action.splitEditorToRightGroup",gt.LABEL=(0,t.localize)(96,null),gt=we([F(2,S.ICommandService)],gt),e.SplitEditorToRightGroupAction=gt;let $e=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"first",by:"group"})}};$e.ID="workbench.action.splitEditorToFirstGroup",$e.LABEL=(0,t.localize)(97,null),$e=we([F(2,S.ICommandService)],$e),e.SplitEditorToFirstGroupAction=$e;let Qe=class extends w{constructor(dt,ht,mt){super(dt,ht,C.COPY_ACTIVE_EDITOR_COMMAND_ID,mt,{to:"last",by:"group"})}};Qe.ID="workbench.action.splitEditorToLastGroup",Qe.LABEL=(0,t.localize)(98,null),Qe=we([F(2,S.ICommandService)],Qe),e.SplitEditorToLastGroupAction=Qe;let tt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{}]})}};tt.ID="workbench.action.editorLayoutSingle",tt.LABEL=(0,t.localize)(99,null),tt=we([F(2,S.ICommandService)],tt),e.EditorLayoutSingleAction=tt;let Ct=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{},{}],orientation:0})}};Ct.ID="workbench.action.editorLayoutTwoColumns",Ct.LABEL=(0,t.localize)(100,null),Ct=we([F(2,S.ICommandService)],Ct),e.EditorLayoutTwoColumnsAction=Ct;let bt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{},{},{}],orientation:0})}};bt.ID="workbench.action.editorLayoutThreeColumns",bt.LABEL=(0,t.localize)(101,null),bt=we([F(2,S.ICommandService)],bt),e.EditorLayoutThreeColumnsAction=bt;let Rt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{},{}],orientation:1})}};Rt.ID="workbench.action.editorLayoutTwoRows",Rt.LABEL=(0,t.localize)(102,null),Rt=we([F(2,S.ICommandService)],Rt),e.EditorLayoutTwoRowsAction=Rt;let Mt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{},{},{}],orientation:1})}};Mt.ID="workbench.action.editorLayoutThreeRows",Mt.LABEL=(0,t.localize)(103,null),Mt=we([F(2,S.ICommandService)],Mt),e.EditorLayoutThreeRowsAction=Mt;let Ft=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{groups:[{},{}]},{groups:[{},{}]}]})}};Ft.ID="workbench.action.editorLayoutTwoByTwoGrid",Ft.LABEL=(0,t.localize)(104,null),Ft=we([F(2,S.ICommandService)],Ft),e.EditorLayoutTwoByTwoGridAction=Ft;let zt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{},{groups:[{},{}]}],orientation:1})}};zt.ID="workbench.action.editorLayoutTwoColumnsBottom",zt.LABEL=(0,t.localize)(105,null),zt=we([F(2,S.ICommandService)],zt),e.EditorLayoutTwoColumnsBottomAction=zt;let Bt=class extends w{constructor(dt,ht,mt){super(dt,ht,C.LAYOUT_EDITOR_GROUPS_COMMAND_ID,mt,{groups:[{},{groups:[{},{}]}],orientation:0})}};Bt.ID="workbench.action.editorLayoutTwoRowsRight",Bt.LABEL=(0,t.localize)(106,null),Bt=we([F(2,S.ICommandService)],Bt),e.EditorLayoutTwoRowsRightAction=Bt;class qt extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.direction=mt,this.editorGroupService=Ot}async run(){this.editorGroupService.addGroup(this.editorGroupService.activeGroup,this.direction,{activate:!0})}}let Xt=class extends qt{constructor(dt,ht,mt){super(dt,ht,2,mt)}};Xt.ID="workbench.action.newGroupLeft",Xt.LABEL=(0,t.localize)(107,null),Xt=we([F(2,r.IEditorGroupsService)],Xt),e.NewEditorGroupLeftAction=Xt;let Yt=class extends qt{constructor(dt,ht,mt){super(dt,ht,3,mt)}};Yt.ID="workbench.action.newGroupRight",Yt.LABEL=(0,t.localize)(108,null),Yt=we([F(2,r.IEditorGroupsService)],Yt),e.NewEditorGroupRightAction=Yt;let ei=class extends qt{constructor(dt,ht,mt){super(dt,ht,0,mt)}};ei.ID="workbench.action.newGroupAbove",ei.LABEL=(0,t.localize)(109,null),ei=we([F(2,r.IEditorGroupsService)],ei),e.NewEditorGroupAboveAction=ei;let Qt=class extends qt{constructor(dt,ht,mt){super(dt,ht,1,mt)}};Qt.ID="workbench.action.newGroupBelow",Qt.LABEL=(0,t.localize)(110,null),Qt=we([F(2,r.IEditorGroupsService)],Qt),e.NewEditorGroupBelowAction=Qt;let $t=class extends p.Action{constructor(dt,ht,mt,Ot){super(dt,ht),this.editorService=mt,this.editorResolverService=Ot}async run(){const dt=this.editorService.activeEditorPane;if(!dt)return;const ht=A.EditorResourceAccessor.getCanonicalUri(dt.input);if(!ht)return;const mt=this.editorResolverService.getEditors(ht).map(Ot=>Ot.id).filter(Ot=>Ot!==dt.input.editorId);mt.length!==0&&await this.editorService.replaceEditors([{editor:dt.input,replacement:{resource:ht,options:{override:mt[0]}}}],dt.group)}};$t.ID="workbench.action.toggleEditorType",$t.LABEL=(0,t.localize)(111,null),$t=we([F(2,u.IEditorService),F(3,o.IEditorResolverService)],$t),e.ToggleEditorTypeAction=$t;let ii=class extends p.Action{constructor(dt,ht,mt){super(dt,ht),this.editorService=mt}async run(){const dt=this.editorService.activeEditorPane;if(!dt)return;const ht=A.EditorResourceAccessor.getCanonicalUri(dt.input);!ht||await this.editorService.replaceEditors([{editor:dt.input,replacement:{resource:ht,options:{override:A.DEFAULT_EDITOR_ASSOCIATION.id}}}],dt.group)}};ii.ID="workbench.action.reopenTextEditor",ii.LABEL=(0,t.localize)(112,null),ii=we([F(2,u.IEditorService)],ii),e.ReOpenInTextEditorAction=ii}),define(ae[699],le([1,0,13,43,379,261,394,398,697,27,23,114,5,12,58,24,54,42,125,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextResourceEditor=e.AbstractTextResourceEditor=void 0;let n=class extends I.AbstractTextCodeEditor{constructor(g,h,v,m,w,D,y,T,_){super(g,h,v,m,w,D,T,y,_)}async setInput(g,h,v,m){await super.setInput(g,h,v,m);const w=await g.resolve();if(m.isCancellationRequested)return;if(!(w instanceof k.BaseTextEditorModel))throw new Error("Unable to open file as text");const D=(0,t.assertIsDefined)(this.editorControl),y=w.textEditorModel;if(D.setModel(y),!(0,p.isTextEditorViewState)(h?.viewState)){const T=this.loadEditorViewState(g,v);T&&(h?.selection&&(T.cursorState=[]),D.restoreViewState(T))}h&&(0,R.applyTextEditorOptions)(h,D,1),D.updateOptions({readOnly:w.isReadonly()})}revealLastLine(){const g=this.editorControl;if(!g)return;const h=g.getModel();if(h){const v=h.getLineCount();g.revealPosition({lineNumber:v,column:h.getLineMaxColumn(v)},0)}}clearInput(){super.clearInput(),this.editorControl?.setModel(null)}tracksEditorViewState(g){return g instanceof E.UntitledTextEditorInput||g instanceof A.TextResourceEditorInput}};n=we([F(1,b.ITelemetryService),F(2,r.IInstantiationService),F(3,S.IStorageService),F(4,C.ITextResourceConfigurationService),F(5,u.IThemeService),F(6,i.IEditorGroupsService),F(7,f.IEditorService),F(8,d.IFileService)],n),e.AbstractTextResourceEditor=n;let a=class rc extends n{constructor(g,h,v,m,w,D,y,T,_,L){super(rc.ID,g,h,v,m,w,y,D,L),this.modelService=T,this.languageService=_}createEditorControl(g,h){super.createEditorControl(g,h);const v=this.editorControl;v&&this._register(v.onDidPaste(m=>this.onDidEditorPaste(m,v)))}onDidEditorPaste(g,h){if(this.input instanceof E.UntitledTextEditorInput&&this.input.model.hasLanguageSetExplicitly||g.range.startLineNumber!==1||g.range.startColumn!==1||h.getOption(82))return;const v=h.getModel();if(!v||!(v.getLineCount()===g.range.endLineNumber&&v.getLineMaxColumn(g.range.endLineNumber)===g.range.endColumn)||v.getLanguageId()!==s.PLAINTEXT_LANGUAGE_ID)return;let D;if(g.languageId)D={id:g.languageId,source:"event"};else{const y=(0,t.withNullAsUndefined)(this.languageService.guessLanguageIdByFilepathOrFirstLine(v.uri,v.getLineContent(1).substr(0,1e3)));y&&(D={id:y,source:"guess"})}if(D&&D.id!==s.PLAINTEXT_LANGUAGE_ID){this.input instanceof E.UntitledTextEditorInput&&D.source==="event"?this.input.model.setLanguageId(D.id):this.modelService.setMode(v,this.languageService.createById(D.id));const y=this.modelService.getCreationOptions(v.getLanguageId(),v.uri,v.isForSimpleWidget);v.detectIndentation(y.insertSpaces,y.tabSize)}}};a.ID="workbench.editors.textResourceEditor",a=we([F(0,b.ITelemetryService),F(1,r.IInstantiationService),F(2,S.IStorageService),F(3,C.ITextResourceConfigurationService),F(4,u.IThemeService),F(5,f.IEditorService),F(6,i.IEditorGroupsService),F(7,c.IModelService),F(8,l.ILanguageService),F(9,d.IFileService)],a),e.TextResourceEditor=a}),define(ae[2902],le([1,0,10,2,1570,12,33,993,31,125,22,8,40,38,58,367,669]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorHintContribution=void 0;const l=t.$,s="workbench.editor.untitled.hint";let d=class{constructor(o,g,h,v,m){this.editor=o,this.editorGroupsService=g,this.commandService=h,this.configurationService=v,this.keybindingService=m,this.toDispose=[],this.toDispose.push(this.editor.onDidChangeModel(()=>this.update())),this.toDispose.push(this.editor.onDidChangeModelLanguage(()=>this.update())),this.toDispose.push(this.configurationService.onDidChangeConfiguration(w=>{w.affectsConfiguration(s)&&this.update()}))}update(){this.untitledTextHintContentWidget?.dispose();const o=this.configurationService.getValue(s),g=this.editor.getModel();g&&g.uri.scheme===S.Schemas.untitled&&g.getLanguageId()===b.PLAINTEXT_LANGUAGE_ID&&o==="text"&&(this.untitledTextHintContentWidget=new n(this.editor,this.editorGroupsService,this.commandService,this.configurationService,this.keybindingService))}dispose(){(0,p.dispose)(this.toDispose),this.untitledTextHintContentWidget?.dispose()}};d.ID="editor.contrib.untitledTextEditorHint",d=we([F(1,i.IEditorGroupsService),F(2,I.ICommandService),F(3,C.IConfigurationService),F(4,u.IKeybindingService)],d),e.UntitledTextEditorHintContribution=d;class n{constructor(o,g,h,v,m){this.editor=o,this.editorGroupsService=g,this.commandService=h,this.configurationService=v,this.keybindingService=m,this.toDispose=new p.DisposableStore,this.toDispose.add(o.onDidChangeModelContent(()=>this.onDidChangeModelContent())),this.toDispose.add(this.editor.onDidChangeConfiguration(w=>{this.domNode&&w.hasChanged(45)&&this.editor.applyFontInfo(this.domNode)})),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return n.ID}getDomNode(){if(!this.domNode){this.domNode=l(".untitled-hint"),this.domNode.style.width="max-content";const o=(0,R.localize)(0,null),g={disposables:this.toDispose,callback:(y,T)=>{switch(y){case"0":m(T.browserEvent);break;case"1":w(T.browserEvent);break;case"2":D();break}}},h=(0,f.renderFormattedText)(o,{actionHandler:g,renderCodeSegments:!1});this.domNode.append(h);const v=[E.ChangeLanguageAction.ID,c.ApplyFileSnippetAction.Id,"welcome.showNewFileEntries"];for(const y of h.querySelectorAll("A")){y.style.cursor="pointer";const T=v.shift(),_=T&&this.keybindingService.lookupKeybinding(T)?.getLabel();y.title=_??""}const m=async y=>{y.stopPropagation(),this.editor.focus(),await this.commandService.executeCommand(E.ChangeLanguageAction.ID,{from:"hint"}),this.editor.focus()},w=async y=>{y.stopPropagation();const T=this.editorGroupsService.activeGroup.activeEditor;await this.commandService.executeCommand("welcome.showNewFileEntries",{from:"hint"})&&T!==null&&T.resource?.scheme===S.Schemas.untitled&&this.editorGroupsService.activeGroup.closeEditor(T,{preserveFocus:!0})},D=()=>{this.configurationService.updateValue(s,"hidden"),this.dispose(),this.editor.focus()};this.toDispose.add(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,p.dispose)(this.toDispose)}}n.ID="editor.widget.untitledHint",(0,A.registerThemingParticipant)((a,o)=>{const g=a.getColor(k.inputPlaceholderForeground);g&&o.addRule(`.monaco-editor .contentWidgets .untitled-hint { color: ${g}; }`);const h=a.getColor(k.textLinkForeground);h&&o.addRule(`.monaco-editor .contentWidgets .untitled-hint a { color: ${h}; }`)}),(0,r.registerEditorContribution)(d.ID,d)}),define(ae[2903],le([1,0,337,862,2451,2283,2452,2284,2817,2453,677,2793,2286,2287,2602,2288,2289,546,2902,2290]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ae[2904],le([1,0,1682,696,27,12,468,150,23,161,169,43,230,5,58]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BinaryFileEditor=void 0;let f=class sc extends p.BaseBinaryResourceEditor{constructor(l,s,d,n,a,o){super(sc.ID,{openInternal:(g,h)=>this.openInternal(g,h)},l,s,n,a),this.editorResolverService=d,this.editorGroupService=o}async openInternal(l,s){if(l instanceof k.FileEditorInput&&this.group?.activeEditor){const d=this.group.activeEditor,n=d?.toUntyped();if(!n)return;let a=await this.editorResolverService.resolveEditor({...n,options:{...s,override:b.EditorResolution.PICK}},this.group);if(a===2)a=void 0;else if(a===1)return;if((0,C.isEditorInputWithOptions)(a))for(const o of a.editor instanceof r.DiffEditorInput?[a.editor.original,a.editor.modified]:[a.editor])o instanceof k.FileEditorInput&&(o.setForceOpenAsText(),o.setPreferredLanguageId(E.BINARY_TEXT_FILE_MODE));await(this.group??this.editorGroupService.activeGroup).replaceEditors([{editor:d,replacement:a?.editor??l,options:{...a?.options??s}}])}}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}};f.ID=E.BINARY_FILE_EDITOR_ID,f=we([F(0,R.ITelemetryService),F(1,A.IThemeService),F(2,S.IEditorResolverService),F(3,I.IStorageService),F(4,u.IInstantiationService),F(5,i.IEditorGroupsService)],f),e.BinaryFileEditor=f}),define(ae[2905],le([1,0,1683,13,107,36,150,78,697,43,379,628,468,19,27,34,23,114,5,12,24,58,117,161,57,231,91,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditor=void 0;let D=class oc extends I.AbstractTextCodeEditor{constructor(T,_,L,M,O,N,P,B,V,z,x,H,W,U,$){super(oc.ID,T,M,N,P,V,B,z,_),this.paneCompositeService=L,this.contextService=O,this.textFileService=x,this.explorerService=H,this.uriIdentityService=W,this.pathService=U,this.configurationService=$,this._register(this.fileService.onDidFilesChange(q=>this.onDidFilesChange(q))),this._register(this.fileService.onDidRunOperation(q=>this.onDidRunOperation(q)))}onDidFilesChange(T){for(const _ of T.rawDeleted)this.clearEditorViewState(_)}onDidRunOperation(T){T.operation===2&&T.target&&this.moveEditorViewState(T.resource,T.target.resource,this.uriIdentityService.extUri)}getTitle(){return this.input?this.input.getName():(0,t.localize)(0,null)}get input(){return this._input}async setInput(T,_,L,M){await super.setInput(T,_,L,M);try{const O=await T.resolve();if(M.isCancellationRequested)return;if(O instanceof C.BinaryEditorModel)return this.openAsBinary(T,_);const N=O,P=(0,p.assertIsDefined)(this.editorControl);if(P.setModel(N.textEditorModel),!(0,b.isTextEditorViewState)(_?.viewState)){const B=this.loadEditorViewState(T,L);B&&(_?.selection&&(B.cursorState=[]),P.restoreViewState(B))}_&&(0,S.applyTextEditorOptions)(_,P,1),P.updateOptions({readOnly:N.isReadonly()})}catch(O){await this.handleSetInputError(O,T,_)}}async handleSetInputError(T,_,L){if(T.textFileOperationResult===0)return this.openAsBinary(_,L);if(T.fileOperationResult===0){let M;throw this.contextService.isInsideWorkspace(_.preferredResource)?M=(0,A.toAction)({id:"workbench.files.action.reveal",label:(0,t.localize)(1,null),run:async()=>(await this.paneCompositeService.openPaneComposite(k.VIEWLET_ID,0,!0),this.explorerService.select(_.preferredResource,!0))}):M=(0,A.toAction)({id:"workbench.files.action.ok",label:(0,t.localize)(2,null),run:async()=>{}}),(0,o.createErrorWithActions)(new u.FileOperationError((0,t.localize)(3,null),0),[M])}throw T.fileOperationResult===1&&await this.pathService.hasValidBasename(_.preferredResource)?(0,o.createErrorWithActions)(new u.FileOperationError((0,t.localize)(4,null),1),[(0,A.toAction)({id:"workbench.files.action.createMissingFile",label:(0,t.localize)(5,null),run:async()=>(await this.textFileService.create([{resource:_.preferredResource}]),this.editorService.openEditor({resource:_.preferredResource,options:{pinned:!0}}))})]):T}openAsBinary(T,_){const L=this.configurationService.getValue("workbench.editor.defaultBinaryEditor"),M=this.group??this.editorGroupService.activeGroup,O={..._,activation:g.EditorActivation.PRESERVE};L&&L!==""&&L!==b.DEFAULT_EDITOR_ASSOCIATION.id?this.doOpenAsBinaryInDifferentEditor(M,L,T,O):this.doOpenAsBinaryInSameEditor(M,L,T,O)}doOpenAsBinaryInDifferentEditor(T,_,L,M){this.editorService.replaceEditors([{editor:L,replacement:{resource:L.resource,options:{...M,override:_}}}],T)}doOpenAsBinaryInSameEditor(T,_,L,M){_===b.DEFAULT_EDITOR_ASSOCIATION.id?(L.setForceOpenAsText(),L.setPreferredLanguageId(k.BINARY_TEXT_FILE_MODE),M={...M,forceReload:!0}):L.setForceOpenAsBinary(),T.openEditor(L,M)}clearInput(){super.clearInput(),this.editorControl?.setModel(null)}tracksEditorViewState(T){return T instanceof r.FileEditorInput}tracksDisposedEditorViewState(){return!0}};D.ID=k.TEXT_FILE_EDITOR_ID,D=we([F(0,i.ITelemetryService),F(1,u.IFileService),F(2,m.IPaneCompositePartService),F(3,s.IInstantiationService),F(4,f.IWorkspaceContextService),F(5,c.IStorageService),F(6,l.ITextResourceConfigurationService),F(7,n.IEditorService),F(8,d.IThemeService),F(9,a.IEditorGroupsService),F(10,E.ITextFileService),F(11,v.IExplorerService),F(12,h.IUriIdentityService),F(13,R.IPathService),F(14,w.IConfigurationService)],D),e.TextFileEditor=D}),define(ae[2906],le([1,0,1698,150,69,2,190,136,157]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DirtyFilesIndicator=void 0;let b=class extends A.Disposable{constructor(C,r,u,i){super(),this.lifecycleService=C,this.activityService=r,this.workingCopyService=u,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 r=C.isDirty();r&&!(C.capabilities&2)&&this.filesConfigurationService.getAutoSaveMode()===1||(r||this.lastKnownDirtyCount>0)&&this.updateActivityBadge()}updateActivityBadge(){const C=this.lastKnownDirtyCount=this.workingCopyService.dirtyCount;C>0?this.badgeHandle.value=this.activityService.showViewContainerActivity(p.VIEWLET_ID,{badge:new k.NumberBadge(C,r=>r===1?t.localize(0,null):t.localize(1,null,C)),clazz:"explorer-viewlet-label"}):this.badgeHandle.clear()}};b=we([F(0,R.ILifecycleService),F(1,k.IActivityService),F(2,E.IWorkingCopyService),F(3,I.IFilesConfigurationService)],b),e.DirtyFilesIndicator=b}),define(ae[2907],le([1,0,1702,2905,19,117,36,27,5,34,23,114,24,12,58,78,106,89,57,231,46,91,107,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeTextFileEditor=void 0;let h=class extends p.TextFileEditor{constructor(m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U){super(m,w,D,y,T,_,L,M,O,N,P,z,x,W,U),this.nativeHostService=B,this.preferencesService=V,this.productService=H}handleSetInputError(m,w,D){if(m.fileOperationResult===9){const y=Math.max(R.MIN_MAX_MEMORY_SIZE_MB,+this.textResourceConfigurationService.getValue(void 0,"files.maxMemoryForLargeFilesMB")||R.FALLBACK_MAX_MEMORY_SIZE_MB);throw(0,A.createErrorWithActions)((0,t.localize)(0,null,this.productService.nameShort),[(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,w,D)}};h=we([F(0,E.ITelemetryService),F(1,R.IFileService),F(2,a.IPaneCompositePartService),F(3,I.IInstantiationService),F(4,b.IWorkspaceContextService),F(5,S.IStorageService),F(6,C.ITextResourceConfigurationService),F(7,r.IEditorService),F(8,u.IThemeService),F(9,i.IEditorGroupsService),F(10,f.ITextFileService),F(11,l.INativeHostService),F(12,c.IPreferencesService),F(13,d.IExplorerService),F(14,s.IUriIdentityService),F(15,n.IProductService),F(16,o.IPathService),F(17,g.IConfigurationService)],h),e.NativeTextFileEditor=h}),define(ae[2908],le([1,0,1701,17,43,468,97,153,2907]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),p.Registry.as(R.EditorExtensions.EditorPane).registerEditorPane(E.EditorPaneDescriptor.create(I.NativeTextFileEditor,I.NativeTextFileEditor.ID,t.localize(0,null)),[new k.SyncDescriptor(A.FileEditorInput)])}),define(ae[2909],le([1,0,56,88,2,165,22,18,28,13,9,145,138,125,54,62,174,224,1708,15,8,55,7,161,115,97,35,5,25,17,33,12,153,44,43,80,386,863,636,2857,646,864,178,215,267,64,228,142,273,58,169,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InteractiveEditorSerializer=e.InteractiveDocumentContribution=void 0;const ee={value:(0,s.localize)(0,null),original:"Interactive Window"};y.Registry.as(O.EditorExtensions.EditorPane).registerEditorPane(L.EditorPaneDescriptor.create(z.InteractiveEditor,q.INTERACTIVE_WINDOW_EDITOR_ID,"Interactive Window"),[new v.SyncDescriptor(x.InteractiveEditorInput)]);let ie=class extends R.Disposable{constructor(Z,ne,ce){super();const de={transientOutputs:!0,transientCellMetadata:{},transientDocumentMetadata:{},cellContentMetadata:{}},he={get options(){return de},set options(me){de.transientCellMetadata=me.transientCellMetadata,de.transientDocumentMetadata=me.transientDocumentMetadata,de.transientOutputs=me.transientOutputs},open:async(me,Se,Ie,ve)=>{if(Se instanceof t.VSBuffer){const be=Se.toString();try{const ge=JSON.parse(be);return{data:{metadata:{},cells:ge.cells.map(ue=>({source:ue.content,language:ue.language,cellKind:ue.kind,mime:ue.mime,outputs:ue.outputs?ue.outputs.map(Ce=>({outputId:Ce.outputId,outputs:Ce.outputs.map(De=>({mime:De.mime,data:De.data}))})):[],metadata:ue.metadata}))},transientOptions:de}}catch{}}return{data:{metadata:{},cells:[]},transientOptions:de}},backup:async(me,Se)=>{const Ie=Z.listNotebookDocuments().find(ve=>ve.uri.toString()===me.toString());if(Ie){const ve=Ie.cells.map(ge=>({kind:ge.cellKind,language:ge.language,metadata:ge.metadata,mine:ge.mime,outputs:ge.outputs.map(ue=>({outputId:ue.outputId,outputs:ue.outputs.map(Ce=>({mime:Ce.mime,data:Ce.data}))})),content:ge.getValue()}));return t.VSBuffer.fromString(JSON.stringify({cells:ve}))}else return""}};this._register(Z.registerNotebookController("interactive",{id:new h.ExtensionIdentifier("interactive.builtin"),location:void 0},he)),Z.getContributedNotebookType("interactive")||this._register(Z.registerContributedNotebookType("interactive",{providerDisplayName:"Interactive Notebook",displayName:"Interactive",filenamePattern:["*.interactive"],exclusive:!0})),ne.registerEditor(`${k.Schemas.vscodeInteractiveInput}:/**`,{id:"vscode-interactive-input",label:"Interactive Editor",priority:K.RegisteredEditorPriority.exclusive},{canSupportResource:me=>me.scheme===k.Schemas.vscodeInteractiveInput,singlePerResource:!0},{createEditorInput:({resource:me})=>ce.getEditors(1).find(Ie=>Ie.editor instanceof x.InteractiveEditorInput&&Ie.editor.inputResource.toString()===me.toString())}),ne.registerEditor("*.interactive",{id:"interactive",label:"Interactive Editor",priority:K.RegisteredEditorPriority.exclusive},{canSupportResource:me=>me.scheme===k.Schemas.vscodeInteractive||me.scheme===k.Schemas.vscodeNotebookCell&&(0,E.extname)(me)===".interactive",singlePerResource:!0},{createEditorInput:({resource:me,options:Se})=>{const Ie=q.CellUri.parse(me);let ve=me,be;Ie&&(ve=Ie.notebook,be={resource:me,options:Se});const ge={...Se,cellOptions:be};return{editor:ce.getEditors(1).find(Ce=>Ce.editor instanceof x.InteractiveEditorInput&&Ce.editor.resource?.toString()===ve.toString()).editor,options:ge}}})}};ie=we([F(0,G.INotebookService),F(1,K.IEditorResolverService),F(2,Y.IEditorService)],ie),e.InteractiveDocumentContribution=ie;let re=class{constructor(Z,ne){this._modelService=ne,this._registration=Z.registerTextModelContentProvider(k.Schemas.vscodeInteractiveInput,this)}dispose(){this._registration.dispose()}async provideTextContent(Z){const ne=this._modelService.getModel(Z);return ne||this._modelService.createModel("",null,Z,!1)}};re=we([F(0,f.ITextModelService),F(1,i.IModelService)],re);const oe=y.Registry.as(M.Extensions.Workbench);oe.registerWorkbenchContribution(ie,2),oe.registerWorkbenchContribution(re,2);let se=class{constructor(Z){this.configurationService=Z}canSerialize(){return this.configurationService.getValue(B.InteractiveWindowSetting.interactiveWindowRestore)}serialize(Z){return(0,b.assertType)(Z instanceof x.InteractiveEditorInput),JSON.stringify({resource:Z.primary.resource,inputResource:Z.inputResource,name:Z.getName(),data:Z.getSerialization()})}deserialize(Z,ne){if(!this.canSerialize())return;const ce=(0,A.parse)(ne);if(!ce)return;const{resource:de,inputResource:he}=ce;if(!ce||!S.URI.isUri(de)||!S.URI.isUri(he))return;const pe=x.InteractiveEditorInput.create(Z,de,he);return pe.restoreSerialization(ce.data),pe}};se.ID=x.InteractiveEditorInput.ID,se=we([F(0,n.IConfigurationService)],se),e.InteractiveEditorSerializer=se,y.Registry.as(O.EditorExtensions.EditorFactory).registerEditorSerializer(se.ID,se),(0,m.registerSingleton)(H.IInteractiveHistoryService,H.InteractiveHistoryService,1),(0,m.registerSingleton)(V.IInteractiveDocumentService,V.InteractiveDocumentService,1),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"_interactive.open",title:{value:(0,s.localize)(1,null),original:"Open Interactive Window"},f1:!1,category:ee,description:{description:(0,s.localize)(2,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(te,Z,ne,ce,de){const he=te.get(Y.IEditorService),pe=te.get(j.IEditorGroupsService),me=te.get(H.IInteractiveHistoryService),Se=te.get(X.INotebookKernelService),Ie=te.get(D.ILogService),ve=te.get(n.IConfigurationService),be=(0,Q.columnToEditorGroup)(pe,ve,typeof Z=="number"?Z:Z?.viewColumn),ge={activation:g.EditorActivation.PRESERVE,preserveFocus:typeof Z!="number"?Z?.preserveFocus??!1:!1};if(ne&&ne.scheme===k.Schemas.vscodeInteractive){Ie.debug("Open interactive window from resource:",ne.toString());const ke=S.URI.revive(ne),Ee=he.findEditors(ke).filter(Te=>Te.editor instanceof x.InteractiveEditorInput&&Te.editor.resource?.toString()===ke.toString());if(Ee.length){Ie.debug("Find existing interactive window:",ne.toString());const Te=Ee[0].editor,_e=Ee[0].groupId,Le=(await he.openEditor(Te,ge,_e))?.getControl();return{notebookUri:Te.resource,inputUri:Te.inputResource,notebookEditorId:Le?.notebookEditor?.getId()}}}const ue=new Set;he.getEditors(1).forEach(ke=>{ke.editor.resource&&ue.add(ke.editor.resource.toString())});let Ce,De,Ae=1;do Ce=S.URI.from({scheme:k.Schemas.vscodeInteractive,path:`Interactive-${Ae}.interactive`}),De=S.URI.from({scheme:k.Schemas.vscodeInteractiveInput,path:`/InteractiveInput-${Ae}`}),Ae++;while(ue.has(Ce.toString()));if(Ie.debug("Open new interactive window:",Ce.toString(),De.toString()),ce){const Ee=Se.getMatchingKernel({uri:Ce,viewType:"interactive"}).all.find(Te=>Te.id===ce);Ee&&Se.preselectKernelForNotebook(Ee,{uri:Ce,viewType:"interactive"})}const Pe=x.InteractiveEditorInput.create(te.get(w.IInstantiationService),Ce,De,de);me.clearHistory(Ce);const ye=(await he.openEditor(Pe,ge,be))?.getControl();return Ie.debug("New interactive window opened. Notebook editor id",ye?.notebookEditor?.getId()),{notebookUri:Ce,inputUri:De,notebookEditorId:ye?.notebookEditor?.getId()}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.execute",title:{value:(0,s.localize)(3,null),original:"Execute Code"},category:ee,keybinding:{when:o.ContextKeyExpr.equals("resourceScheme",k.Schemas.vscodeInteractive),primary:259,win:{primary:2051},weight:W.NOTEBOOK_EDITOR_WIDGET_ACTION_WEIGHT},menu:[{id:d.MenuId.InteractiveInputExecute}],icon:U.executeIcon,f1:!1,description:{description:"Execute the Contents of the Input Box",args:[{name:"resource",description:"Interactive resource Uri",isOptional:!0}]}})}async run(te,Z){const ne=te.get(Y.IEditorService),ce=te.get(C.IBulkEditService),de=te.get(H.IInteractiveHistoryService),he=te.get($.INotebookEditorService);let pe;if(Z){if(Z.scheme===k.Schemas.vscodeInteractive){const me=S.URI.revive(Z),Se=ne.findEditors(me).filter(Ie=>Ie.editor instanceof x.InteractiveEditorInput&&Ie.editor.resource?.toString()===me.toString());if(Se.length){const Ie=Se[0].editor,ve=Se[0].groupId;pe=(await ne.openEditor(Ie,ve))?.getControl()}}}else pe=ne.activeEditorPane?.getControl();if(pe&&pe.notebookEditor&&pe.codeEditor){const me=pe.notebookEditor.textModel,Se=pe.codeEditor.getModel(),ve=pe.notebookEditor.activeKernel?.supportedLanguages[0]??u.PLAINTEXT_LANGUAGE_ID;if(me&&Se){const be=me.length,ge=Se.getValue();if((0,I.isFalsyOrWhitespace)(ge))return;de.addToHistory(me.uri,""),Se.setValue("");const ue=pe.notebookEditor.notebookOptions.getLayoutConfiguration().interactiveWindowCollapseCodeCells==="fromEditor"?{inputCollapsed:!1,outputCollapsed:!1}:void 0;await ce.apply([new P.ResourceNotebookCellEdit(me.uri,{editType:1,index:be,count:0,cells:[{cellKind:q.CellKind.Code,mime:void 0,language:ve,source:ge,outputs:[],metadata:{},collapseState:ue}]})]);const Ce={start:be,end:be+1};pe.notebookEditor.revealCellRangeInView(Ce),await pe.notebookEditor.executeNotebookCells(pe.notebookEditor.getCellsInRange({start:be,end:be+1}));const De=he.getNotebookEditor(pe.notebookEditor.getId());De&&(De.setSelections([Ce]),De.setFocus(Ce))}}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.input.clear",title:{value:(0,s.localize)(4,null),original:"Clear the interactive window input editor contents"},category:ee,f1:!1})}async run(te){const ne=te.get(Y.IEditorService).activeEditorPane?.getControl();if(ne&&ne.notebookEditor&&ne.codeEditor){const ce=ne.notebookEditor.textModel,de=ne.codeEditor.getModel(),he=ne.codeEditor.getModel()?.getFullModelRange();ce&&de&&he&&ne.codeEditor.executeEdits("",[r.EditOperation.replace(he,null)])}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.history.previous",title:{value:(0,s.localize)(5,null),original:"Previous value in history"},category:ee,f1:!1,keybinding:{when:o.ContextKeyExpr.and(o.ContextKeyExpr.equals("resourceScheme",k.Schemas.vscodeInteractive),B.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("bottom"),B.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("none"),l.Context.Visible.toNegated()),primary:16,weight:200}})}async run(te){const Z=te.get(Y.IEditorService),ne=te.get(H.IInteractiveHistoryService),ce=Z.activeEditorPane?.getControl();if(ce&&ce.notebookEditor&&ce.codeEditor){const de=ce.notebookEditor.textModel,he=ce.codeEditor.getModel();if(de&&he){const pe=ne.getPreviousValue(de.uri);pe&&he.setValue(pe)}}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.history.next",title:{value:(0,s.localize)(6,null),original:"Next value in history"},category:ee,f1:!1,keybinding:{when:o.ContextKeyExpr.and(o.ContextKeyExpr.equals("resourceScheme",k.Schemas.vscodeInteractive),B.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("top"),B.INTERACTIVE_INPUT_CURSOR_BOUNDARY.notEqualsTo("none"),l.Context.Visible.toNegated()),primary:18,weight:200}})}async run(te){const Z=te.get(Y.IEditorService),ne=te.get(H.IInteractiveHistoryService),ce=Z.activeEditorPane?.getControl();if(ce&&ce.notebookEditor&&ce.codeEditor){const de=ce.notebookEditor.textModel,he=ce.codeEditor.getModel();if(de&&he){const pe=ne.getNextValue(de.uri);pe&&he.setValue(pe)}}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.scrollToTop",title:(0,s.localize)(7,null),keybinding:{when:o.ContextKeyExpr.equals("resourceScheme",k.Schemas.vscodeInteractive),primary:2062,mac:{primary:2064},weight:200},category:ee})}async run(te){const ne=te.get(Y.IEditorService).activeEditorPane?.getControl();if(ne&&ne.notebookEditor&&ne.codeEditor){if(ne.notebookEditor.getLength()===0)return;ne.notebookEditor.revealCellRangeInView({start:0,end:1})}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.scrollToBottom",title:(0,s.localize)(8,null),keybinding:{when:o.ContextKeyExpr.equals("resourceScheme",k.Schemas.vscodeInteractive),primary:2061,mac:{primary:2066},weight:200},category:ee})}async run(te){const ne=te.get(Y.IEditorService).activeEditorPane?.getControl();if(ne&&ne.notebookEditor&&ne.codeEditor){if(ne.notebookEditor.getLength()===0)return;const ce=ne.notebookEditor.getLength();ne.notebookEditor.revealCellRangeInView({start:ce-1,end:ce})}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.input.focus",title:{value:(0,s.localize)(9,null),original:"Focus input editor in the interactive window"},category:ee,f1:!0})}async run(te){const Z=te.get(Y.IEditorService),ne=Z.activeEditorPane?.getControl();if(ne&&ne.notebookEditor&&ne.codeEditor)Z.activeEditorPane?.focus();else{const ce=Z.getEditors(0),de=p.Iterable.find(ce,he=>he.editor.typeId===x.InteractiveEditorInput.ID);if(de){const he=de.editor,pe=de.groupId,Se=(await Z.openEditor(he,pe))?.getControl();Se&&Se.notebookEditor&&Se.codeEditor&&Z.activeEditorPane?.focus()}}}}),(0,d.registerAction2)(class extends d.Action2{constructor(){super({id:"interactive.history.focus",title:{value:(0,s.localize)(10,null),original:"Focus input editor in the interactive window"},category:ee,f1:!0,precondition:o.ContextKeyExpr.equals("resourceScheme",k.Schemas.vscodeInteractive)})}async run(te){const ne=te.get(Y.IEditorService).activeEditorPane?.getControl();ne&&ne.notebookEditor&&ne.codeEditor&&ne.notebookEditor.focus()}}),(0,_.registerThemingParticipant)(te=>{(0,T.registerColor)("interactive.activeCodeBorder",{dark:te.getColor(c.peekViewBorder)??"#007acc",light:te.getColor(c.peekViewBorder)??"#007acc",hcDark:T.contrastBorder,hcLight:T.contrastBorder},(0,s.localize)(11,null)),(0,T.registerColor)("interactive.inactiveCodeBorder",{dark:te.getColor(T.listInactiveSelectionBackground)??(0,T.transparent)(T.listInactiveSelectionBackground,1),light:te.getColor(T.listInactiveSelectionBackground)??(0,T.transparent)(T.listInactiveSelectionBackground,1),hcDark:N.PANEL_BORDER,hcLight:N.PANEL_BORDER},(0,s.localize)(12,null))}),y.Registry.as(a.Extensions.Configuration).registerConfiguration({id:"interactiveWindow",order:100,type:"object",properties:{[B.InteractiveWindowSetting.interactiveWindowAlwaysScrollOnNewCell]:{type:"boolean",default:!0,markdownDescription:(0,s.localize)(13,null)},[B.InteractiveWindowSetting.interactiveWindowRestore]:{type:"boolean",default:!1,markdownDescription:(0,s.localize)(14,null)}}})}),define(ae[700],le([1,0,1716,9,6,22,68,117,32,400,204,865,7,15,18,31,43,19,136,47,24,71,48,199,54,42,49,16,637,107]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findLocalHistoryEntry=e.toDiffEditorArguments=e.COMPARE_WITH_FILE_LABEL=void 0;const T={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,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.compareWithFile",title:e.COMPARE_WITH_FILE_LABEL,menu:{id:u.MenuId.TimelineItemContext,group:"1_compare",order:1,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){const $=W.get(f.ICommandService),q=W.get(b.IWorkingCopyHistoryService),{entry:X}=await z(q,U);if(X)return $.executeCommand(S.API_OPEN_DIFF_EDITOR_COMMAND_ID,...V(X,X.workingCopy.resource))}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.compareWithPrevious",title:{value:(0,t.localize)(2,null),original:"Compare with Previous"},menu:{id:u.MenuId.TimelineItemContext,group:"1_compare",order:2,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){const $=W.get(f.ICommandService),q=W.get(b.IWorkingCopyHistoryService),X=W.get(n.IEditorService),{entry:G,previous:Q}=await z(q,U);if(G)return Q?$.executeCommand(S.API_OPEN_DIFF_EDITOR_COMMAND_ID,...V(Q,G)):P(G,X)}});let _;const L=new r.RawContextKey("localHistoryItemSelectedForCompare",!1,!0);(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.selectForCompare",title:{value:(0,t.localize)(3,null),original:"Select for Compare"},menu:{id:u.MenuId.TimelineItemContext,group:"2_compare_with",order:2,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){const $=W.get(b.IWorkingCopyHistoryService),q=W.get(r.IContextKeyService),{entry:X}=await z($,U);X&&(_=U,L.bindTo(q).set(!0))}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.compareWithSelected",title:{value:(0,t.localize)(4,null),original:"Compare with Selected"},menu:{id:u.MenuId.TimelineItemContext,group:"2_compare_with",order:1,when:r.ContextKeyExpr.and(D.LOCAL_HISTORY_MENU_CONTEXT_KEY,L)}})}async run(W,U){const $=W.get(b.IWorkingCopyHistoryService),q=W.get(f.ICommandService);if(!_)return;const X=(await z($,_)).entry;if(!X)return;const{entry:G}=await z($,U);if(G)return q.executeCommand(S.API_OPEN_DIFF_EDITOR_COMMAND_ID,...V(X,G))}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.open",title:{value:(0,t.localize)(5,null),original:"Show Contents"},menu:{id:u.MenuId.TimelineItemContext,group:"3_contents",order:1,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){const $=W.get(b.IWorkingCopyHistoryService),q=W.get(n.IEditorService),{entry:X}=await z($,U);if(X)return P(X,q)}});const M={value:(0,t.localize)(6,null),original:"Restore Contents"};(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.restoreViaEditor",title:M,menu:{id:u.MenuId.EditorTitle,group:"navigation",order:-10,when:a.ResourceContextKey.Scheme.isEqualTo(C.LocalHistoryFileSystemProvider.SCHEMA)},icon:D.LOCAL_HISTORY_ICON_RESTORE})}async run(W,U){const{associatedResource:$,location:q}=C.LocalHistoryFileSystemProvider.fromLocalHistoryFileSystem(U);return N(W,{uri:$,handle:(0,i.basenameOrAuthority)(q)})}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.restore",title:M,menu:{id:u.MenuId.TimelineItemContext,group:"3_contents",order:2,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){return N(W,U)}});const O=c.SaveSourceRegistry.registerSource("localHistoryRestore.source",(0,t.localize)(7,null));async function N(W,U){const $=W.get(l.IFileService),q=W.get(d.IDialogService),X=W.get(s.IWorkingCopyService),G=W.get(b.IWorkingCopyHistoryService),Q=W.get(n.IEditorService),{entry:j}=await z(G,U);if(j){const{confirmed:K}=await q.confirm({message:(0,t.localize)(8,null,(0,i.basename)(j.workingCopy.resource)),detail:(0,t.localize)(9,null),primaryButton:(0,t.localize)(10,null),type:"warning"});if(!K)return;const Y=X.getAll(j.workingCopy.resource);if(Y)for(const ee of Y)ee.isDirty()&&await ee.revert({soft:!0});try{await $.cloneFile(j.location,j.workingCopy.resource)}catch(ee){await q.show(k.default.Error,(0,t.localize)(11,null,(0,i.basename)(j.workingCopy.resource)),void 0,{detail:(0,E.toErrorMessage)(ee)});return}if(Y)for(const ee of Y)await ee.revert({force:!0});await Q.openEditor({resource:j.workingCopy.resource}),await G.addEntry({resource:j.workingCopy.resource,source:O},I.CancellationToken.None),await B(j,Q)}}(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.restoreViaPicker",title:{value:(0,t.localize)(12,null),original:"Find Entry to Restore"},f1:!0,category:T})}async run(W){const U=W.get(b.IWorkingCopyHistoryService),$=W.get(o.IQuickInputService),q=W.get(h.IModelService),X=W.get(v.ILanguageService),G=W.get(m.ILabelService),Q=W.get(n.IEditorService),j=W.get(l.IFileService),K=W.get(f.ICommandService),Y=$.createQuickPick();let ee=new I.CancellationTokenSource;Y.onDidHide(()=>ee.dispose(!0)),Y.busy=!0,Y.show();const ie=await U.getAll(ee.token);Y.busy=!1,Y.placeholder=(0,t.localize)(13,null),Y.matchOnLabel=!0,Y.matchOnDescription=!0,Y.items=ie.map(ne=>({resource:ne,label:(0,i.basenameOrAuthority)(ne),description:G.getUriLabel((0,i.dirname)(ne),{relative:!0}),iconClasses:(0,g.getIconClasses)(q,X,ne)})).sort((ne,ce)=>ne.resource.fsPath<ce.resource.fsPath?-1:1),await R.Event.toPromise(Y.onDidAccept),Y.dispose();const re=(0,w.firstOrDefault)(Y.selectedItems)?.resource;if(!re)return;const oe=$.createQuickPick();ee=new I.CancellationTokenSource,oe.onDidHide(()=>ee.dispose(!0)),oe.busy=!0,oe.show();const se=await U.getEntries(re,ee.token);oe.busy=!1,oe.placeholder=(0,t.localize)(14,null),oe.matchOnLabel=!0,oe.matchOnDescription=!0,oe.items=Array.from(se).reverse().map(ne=>({entry:ne,label:`$(circle-outline) ${c.SaveSourceRegistry.getSourceLabel(ne.source)}`,description:H(ne.timestamp)})),await R.Event.toPromise(oe.onDidAccept),oe.dispose();const te=(0,w.firstOrDefault)(oe.selectedItems);return te?await j.exists(te.entry.workingCopy.resource)?K.executeCommand(S.API_OPEN_DIFF_EDITOR_COMMAND_ID,...V(te.entry,te.entry.workingCopy.resource)):P(te.entry,Q):void 0}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.rename",title:{value:(0,t.localize)(15,null),original:"Rename"},menu:{id:u.MenuId.TimelineItemContext,group:"5_edit",order:1,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){const $=W.get(b.IWorkingCopyHistoryService),q=W.get(o.IQuickInputService),{entry:X}=await z($,U);if(X){const G=q.createInputBox();G.title=(0,t.localize)(16,null),G.ignoreFocusOut=!0,G.placeholder=(0,t.localize)(17,null),G.value=c.SaveSourceRegistry.getSourceLabel(X.source),G.show(),G.onDidAccept(()=>{G.value&&$.updateEntry(X,{source:G.value},I.CancellationToken.None),G.dispose()})}}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.delete",title:{value:(0,t.localize)(18,null),original:"Delete"},menu:{id:u.MenuId.TimelineItemContext,group:"5_edit",order:2,when:D.LOCAL_HISTORY_MENU_CONTEXT_KEY}})}async run(W,U){const $=W.get(b.IWorkingCopyHistoryService),q=W.get(n.IEditorService),X=W.get(d.IDialogService),{entry:G}=await z($,U);if(G){const{confirmed:Q}=await X.confirm({message:(0,t.localize)(19,null,G.workingCopy.name,H(G.timestamp)),detail:(0,t.localize)(20,null),primaryButton:(0,t.localize)(21,null),type:"warning"});if(!Q)return;await $.removeEntry(G,I.CancellationToken.None),await B(G,q)}}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.deleteAll",title:{value:(0,t.localize)(22,null),original:"Delete All"},f1:!0,category:T})}async run(W){const U=W.get(d.IDialogService),$=W.get(b.IWorkingCopyHistoryService),{confirmed:q}=await U.confirm({message:(0,t.localize)(23,null),detail:(0,t.localize)(24,null),primaryButton:(0,t.localize)(25,null),type:"warning"});!q||await $.removeAll(I.CancellationToken.None)}}),(0,u.registerAction2)(class extends u.Action2{constructor(){super({id:"workbench.action.localHistory.create",title:{value:(0,t.localize)(26,null),original:"Create Entry"},f1:!0,category:T,precondition:a.ActiveEditorContext})}async run(W){const U=W.get(b.IWorkingCopyHistoryService),$=W.get(o.IQuickInputService),q=W.get(n.IEditorService),X=W.get(m.ILabelService),G=W.get(y.IPathService),Q=c.EditorResourceAccessor.getOriginalUri(q.activeEditor,{supportSideBySide:c.SideBySideEditor.PRIMARY});if(Q?.scheme!==G.defaultUriScheme&&Q?.scheme!==A.Schemas.vscodeUserData)return;const j=$.createInputBox();j.title=(0,t.localize)(27,null),j.ignoreFocusOut=!0,j.placeholder=(0,t.localize)(28,null,X.getUriBasenameLabel(Q)),j.show(),j.onDidAccept(async()=>{const K=j.value;j.dispose(),K&&await U.addEntry({resource:Q,source:j.value},I.CancellationToken.None)})}});async function P(W,U){const $=C.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:W.location,associatedResource:W.workingCopy.resource});await U.openEditor({resource:$,label:(0,t.localize)(29,null,W.workingCopy.name,c.SaveSourceRegistry.getSourceLabel(W.source),H(W.timestamp))})}async function B(W,U){const $=C.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:W.location,associatedResource:W.workingCopy.resource}),q=U.findEditors($,{supportSideBySide:c.SideBySideEditor.ANY});await U.closeEditors(q,{preserveFocus:!0})}function V(W,U){const $=C.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:W.location,associatedResource:W.workingCopy.resource});let q,X;if(p.URI.isUri(U))X=U,q=(0,t.localize)(30,null,W.workingCopy.name,c.SaveSourceRegistry.getSourceLabel(W.source),H(W.timestamp),W.workingCopy.name);else{const G=U;X=C.LocalHistoryFileSystemProvider.toLocalHistoryFileSystem({location:G.location,associatedResource:G.workingCopy.resource}),q=(0,t.localize)(31,null,W.workingCopy.name,c.SaveSourceRegistry.getSourceLabel(W.source),H(W.timestamp),G.workingCopy.name,c.SaveSourceRegistry.getSourceLabel(G.source),H(G.timestamp))}return[$,X,q,void 0]}e.toDiffEditorArguments=V;async function z(W,U){const $=await W.getEntries(U.uri,I.CancellationToken.None);let q,X;for(let G=0;G<$.length;G++){const Q=$[G];if(Q.id===U.handle){q=Q,X=$[G-1];break}}return{entry:q,previous:X}}e.findLocalHistoryEntry=z;const x=/\//g;function H(W){return`${(0,D.getLocalHistoryDateFormatter)().format(W).replace(x,"-")}`}}),define(ae[2910],le([1,0,1717,6,2,457,400,9,107,204,19,865,51,43,8,700,113,637,22,34,227]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalHistoryTimeline=void 0;let a=class Zi extends R.Disposable{constructor(g,h,v,m,w,D,y){super(),this.timelineService=g,this.workingCopyHistoryService=h,this.pathService=v,this.fileService=m,this.environmentService=w,this.configurationService=D,this.contextService=y,this.id=Zi.ID,this.label=(0,t.localize)(0,null),this.scheme="*",this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.timelineProviderDisposable=this._register(new R.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(Zi.LOCAL_HISTORY_ENABLED_SETTINGS_KEY)?this.timelineProviderDisposable.value=this.timelineService.registerTimelineProvider(this):this.timelineProviderDisposable.clear()}registerListeners(){this._register(this.workingCopyHistoryService.onDidAddEntry(g=>this.onDidChangeWorkingCopyHistoryEntry(g.entry))),this._register(this.workingCopyHistoryService.onDidChangeEntry(g=>this.onDidChangeWorkingCopyHistoryEntry(g.entry))),this._register(this.workingCopyHistoryService.onDidReplaceEntry(g=>this.onDidChangeWorkingCopyHistoryEntry(g.entry))),this._register(this.workingCopyHistoryService.onDidRemoveEntry(g=>this.onDidChangeWorkingCopyHistoryEntry(g.entry))),this._register(this.workingCopyHistoryService.onDidRemoveEntries(()=>this.onDidChangeWorkingCopyHistoryEntry(void 0))),this._register(this.workingCopyHistoryService.onDidMoveEntries(()=>this.onDidChangeWorkingCopyHistoryEntry(void 0))),this._register(this.configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(Zi.LOCAL_HISTORY_ENABLED_SETTINGS_KEY)&&this.updateTimelineRegistration()}))}onDidChangeWorkingCopyHistoryEntry(g){this._onDidChange.fire({id:Zi.ID,uri:g?.workingCopy.resource,reset:!0})}async provideTimeline(g,h,v){const m=[];let w;if(g.scheme===C.LocalHistoryFileSystemProvider.SCHEMA?w=C.LocalHistoryFileSystemProvider.fromLocalHistoryFileSystem(g).associatedResource:g.scheme===this.pathService.defaultUriScheme||g.scheme===s.Schemas.vscodeUserData?w=g:this.fileService.hasProvider(g)&&(w=E.URI.from({scheme:this.pathService.defaultUriScheme,authority:this.environmentService.remoteAuthority??(0,n.getVirtualWorkspaceAuthority)(this.contextService.getWorkspace()),path:g.path})),w){const D=await this.workingCopyHistoryService.getEntries(w,v);for(const y of D)m.push(this.toTimelineItem(y))}return{source:Zi.ID,items:m}}toTimelineItem(g){return{handle:g.id,label:u.SaveSourceRegistry.getSourceLabel(g.source),tooltip:new c.MarkdownString(`$(history) ${(0,l.getLocalHistoryDateFormatter)().format(g.timestamp)} ${u.SaveSourceRegistry.getSourceLabel(g.source)}`,{supportThemeIcons:!0}),source:Zi.ID,timestamp:g.timestamp,themeIcon:l.LOCAL_HISTORY_ICON_ENTRY,contextValue:l.LOCAL_HISTORY_MENU_CONTEXT_VALUE,command:{id:b.API_OPEN_DIFF_EDITOR_COMMAND_ID,title:f.COMPARE_WITH_FILE_LABEL.value,arguments:(0,f.toDiffEditorArguments)(g,g.workingCopy.resource)}}}};a.ID="timeline.localHistory",a.LOCAL_HISTORY_ENABLED_SETTINGS_KEY="workbench.localHistory.enabled",a=we([F(0,A.ITimelineService),F(1,k.IWorkingCopyHistoryService),F(2,I.IPathService),F(3,S.IFileService),F(4,r.IWorkbenchEnvironmentService),F(5,i.IConfigurationService),F(6,d.IWorkspaceContextService)],a),e.LocalHistoryTimeline=a}),define(ae[2911],le([1,0,17,44,2910,700]),function(J,e,t,p,R){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(p.Extensions.Workbench).registerWorkbenchContribution(R.LocalHistoryTimeline,2)}),define(ae[2912],le([1,0,1718,400,15,637,700,14,89,7,22,71]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,R.registerAction2)(class extends R.Action2{constructor(){super({id:"workbench.action.localHistory.revealInOS",title:{value:E.isWindows?(0,t.localize)(0,null):E.isMacintosh?(0,t.localize)(1,null):(0,t.localize)(2,null),original:E.isWindows?"Reveal in File Explorer":E.isMacintosh?"Reveal in Finder":"Open Containing Folder"},menu:{id:R.MenuId.TimelineItemContext,group:"4_reveal",order:1,when:b.ContextKeyExpr.and(A.LOCAL_HISTORY_MENU_CONTEXT_KEY,C.ResourceContextKey.Scheme.isEqualTo(S.Schemas.file))}})}async run(r,u){const i=r.get(p.IWorkingCopyHistoryService),f=r.get(I.INativeHostService),{entry:c}=await(0,k.findLocalHistoryEntry)(i,u);c&&await f.showItemInFolder(c.location.fsPath)}})}),define(ae[2913],le([1,0,2912]),function(J,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(ae[558],le([1,0,10,578,65,21,6,2,159,18,13,75,114,1744,8,7,19,5,23,27,12,557,43,379,546,469,257,2327,2332,2333,2334,445,450,58,169,24,2328,2335,1151,528]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorResolverContribution=e.MergeEditorOpenHandlerContribution=e.MergeEditor=void 0;let V=class ac extends a.AbstractTextEditor{get viewModel(){return this._viewModel}get inputModel(){return this._inputModel}get model(){return this.inputModel.get()?.model}get inputsWritable(){return!!this._configurationService.getValue("mergeEditor.writableInputs")}constructor(U,$,q,X,G,Q,j,K,Y,ee,ie,re){super(ac.ID,q,U,X,Q,G,K,Y,ee),this.contextKeyService=$,this._configurationService=j,this._codeEditorService=ie,this.configurationService=re,this._sessionDisposables=new E.DisposableStore,this._viewModel=(0,I.observableValue)("viewModel",void 0),this._grid=this._register(new E.MutableDisposable),this.input1View=this._register(this.instantiationService.createInstance(P.InputCodeEditorView,1,this._viewModel)),this.baseView=(0,I.observableValue)("baseView",void 0),this.baseViewOptions=(0,I.observableValue)("baseViewOptions",void 0),this.input2View=this._register(this.instantiationService.createInstance(P.InputCodeEditorView,2,this._viewModel)),this.inputResultView=this._register(this.instantiationService.createInstance(B.ResultCodeEditorView,this._viewModel)),this._layoutMode=this.instantiationService.createInstance(z),this._layoutModeObs=(0,I.observableValue)("layoutMode",this._layoutMode.value),this._ctxIsMergeEditor=_.ctxIsMergeEditor.bindTo(this.contextKeyService),this._ctxUsesColumnLayout=_.ctxMergeEditorLayout.bindTo(this.contextKeyService),this._ctxShowBase=_.ctxMergeEditorShowBase.bindTo(this.contextKeyService),this._ctxShowBaseAtTop=_.ctxMergeEditorShowBaseAtTop.bindTo(this.contextKeyService),this._ctxResultUri=_.ctxMergeResultUri.bindTo(this.contextKeyService),this._ctxBaseUri=_.ctxMergeBaseUri.bindTo(this.contextKeyService),this._ctxShowNonConflictingChanges=_.ctxMergeEditorShowNonConflictingChanges.bindTo(this.contextKeyService),this._inputModel=(0,I.observableValue)("inputModel",void 0),this.viewZoneComputer=new T.ViewZoneComputer(this.input1View.editor,this.input2View.editor,this.inputResultView.editor),this.codeLensesVisible=(0,I.observableFromEvent)(this.configurationService.onDidChangeConfiguration,()=>this.configurationService.getValue("mergeEditor.showCodeLenses")??!0),this.scrollSynchronizer=this._register(new D.ScrollSynchronizer(this._viewModel,this.input1View,this.input2View,this.baseView,this.inputResultView,this._layoutModeObs)),this._onDidChangeSizeConstraints=new k.Emitter,this.onDidChangeSizeConstraints=this._onDidChangeSizeConstraints.event,this.baseViewDisposables=this._register(new E.DisposableStore),this.showNonConflictingChangesStore=this.instantiationService.createInstance(m.PersistentStore,"mergeEditor/showNonConflictingChanges"),this.showNonConflictingChanges=(0,I.observableValue)("showNonConflictingChanges",this.showNonConflictingChangesStore.get()??!1)}dispose(){this._sessionDisposables.dispose(),this._ctxIsMergeEditor.reset(),this._ctxUsesColumnLayout.reset(),this._ctxShowNonConflictingChanges.reset(),super.dispose()}get minimumWidth(){return this._layoutMode.value.kind==="mixed"?this.input1View.view.minimumWidth+this.input2View.view.minimumWidth:this.input1View.view.minimumWidth+this.input2View.view.minimumWidth+this.inputResultView.view.minimumWidth}getTitle(){return this.input?this.input.getName():(0,u.localize)(0,null)}createEditorControl(U,$){this.rootHtmlElement=U,U.classList.add("merge-editor"),this.applyLayout(this._layoutMode.value),this.applyOptions($)}updateEditorControlOptions(U){this.applyOptions(U)}applyOptions(U){const $=(0,m.deepMerge)(U,{minimap:{enabled:!1},glyphMargin:!1,lineNumbersMinChars:2,readOnly:!this.inputsWritable});this.input1View.updateOptions($),this.input2View.updateOptions($),this.baseViewOptions.set(this.input2View.editor.getRawOptions(),void 0),this.inputResultView.updateOptions(U)}getMainControl(){return this.inputResultView.editor}layout(U){this._grid.value?.layout(U.width,U.height)}async setInput(U,$,q,X){if(!(U instanceof v.MergeEditorInput))throw new A.BugIndicatingError("ONLY MergeEditorInput is supported");await super.setInput(U,$,q,X),this._sessionDisposables.clear(),(0,I.transaction)(ie=>{this._viewModel.set(void 0,ie),this._inputModel.set(void 0,ie)});const G=await U.resolve(),Q=G.model,j=this.instantiationService.createInstance(y.MergeEditorViewModel,Q,this.input1View,this.input2View,this.inputResultView,this.baseView,this.showNonConflictingChanges);Q.telemetry.reportMergeEditorOpened({combinableConflictCount:Q.combinableConflictCount,conflictCount:Q.conflictCount,baseTop:this._layoutModeObs.get().showBaseAtTop,baseVisible:this._layoutModeObs.get().showBase,isColumnView:this._layoutModeObs.get().kind==="columns"}),(0,I.transaction)(ie=>{this._viewModel.set(j,ie),this._inputModel.set(G,ie)}),this._sessionDisposables.add(j),this._ctxResultUri.set(G.resultUri.toString()),this._ctxBaseUri.set(Q.base.uri.toString()),this._sessionDisposables.add((0,E.toDisposable)(()=>{this._ctxBaseUri.reset(),this._ctxResultUri.reset()})),this._sessionDisposables.add((0,I.autorunWithStore)((ie,re)=>{const oe=this.baseView.read(ie);this.inputResultView.editor.changeViewZones(se=>{const te=this._layoutModeObs.read(ie),Z=te.kind==="columns",ne=te.kind==="mixed"&&!te.showBaseAtTop;this.input1View.editor.changeViewZones(ce=>{this.input2View.editor.changeViewZones(de=>{oe?oe.editor.changeViewZones(he=>{re.add(this.setViewZones(ie,j,this.input1View.editor,ce,this.input2View.editor,de,oe.editor,he,ne,this.inputResultView.editor,se,Z))}):re.add(this.setViewZones(ie,j,this.input1View.editor,ce,this.input2View.editor,de,void 0,void 0,!1,this.inputResultView.editor,se,Z))})})}),this.scrollSynchronizer.updateScrolling()},"update alignment view zones"));const K=this.loadEditorViewState(U,q);K?this._applyViewState(K):this._sessionDisposables.add((0,m.thenIfNotDisposed)(Q.onInitialized,()=>{const ie=Q.modifiedBaseRanges.get().find(re=>re.isConflicting);!ie||(this.input1View.editor.revealLineInCenter(ie.input1Range.startLineNumber),(0,I.transaction)(re=>{j.setActiveModifiedBaseRange(ie,re)}))}));const Y=()=>{const ie=(0,h.readTransientState)(Q.resultTextModel,this._codeEditorService);(0,h.writeTransientState)(Q.input2.textModel,ie,this._codeEditorService),(0,h.writeTransientState)(Q.input1.textModel,ie,this._codeEditorService)};this._sessionDisposables.add(this._codeEditorService.onDidChangeTransientModelProperty(ie=>{ie===this.inputResultView.editor.getModel()&&Y()})),Y();const ee=this;this._sessionDisposables.add(new class{constructor(){this._disposable=new E.DisposableStore;for(const ie of this.baseInput1Input2())this._disposable.add(ie.onDidChangeContent(()=>this._checkBaseInput1Input2AllEmpty()))}dispose(){this._disposable.dispose()}*baseInput1Input2(){yield Q.base,yield Q.input1.textModel,yield Q.input2.textModel}_checkBaseInput1Input2AllEmpty(){for(const ie of this.baseInput1Input2())if(ie.getValueLength()>0)return;ee.editorService.replaceEditors([{editor:U,replacement:{resource:U.result,options:{preserveFocus:!0}},forceReplaceDirty:!0}],ee.group??ee.editorGroupService.activeGroup)}})}setViewZones(U,$,q,X,G,Q,j,K,Y,ee,ie,re){const oe=[],se=[],te=[],Z=[],ne=this.viewZoneComputer.computeViewZones(U,$,{codeLensesVisible:this.codeLensesVisible.read(U),showNonConflictingChanges:this.showNonConflictingChanges.read(U),shouldAlignBase:Y,shouldAlignResult:re}),ce=new E.DisposableStore;if(K)for(const de of ne.baseViewZones)de.create(K,te,ce);for(const de of ne.resultViewZones)de.create(ie,Z,ce);for(const de of ne.input1ViewZones)de.create(X,oe,ce);for(const de of ne.input2ViewZones)de.create(Q,se,ce);return ce.add({dispose:()=>{q.changeViewZones(de=>{for(const he of oe)de.removeZone(he)}),G.changeViewZones(de=>{for(const he of se)de.removeZone(he)}),j?.changeViewZones(de=>{for(const he of te)de.removeZone(he)}),ee.changeViewZones(de=>{for(const he of Z)de.removeZone(he)})}}),ce}setOptions(U){super.setOptions(U),U&&(0,g.applyTextEditorOptions)(U,this.inputResultView.editor,0)}clearInput(){super.clearInput(),this._sessionDisposables.clear();for(const{editor:U}of[this.input1View,this.input2View,this.inputResultView])U.setModel(null)}focus(){(this.getControl()??this.inputResultView.editor).focus()}hasFocus(){for(const{editor:U}of[this.input1View,this.input2View,this.inputResultView])if(U.hasTextFocus())return!0;return super.hasFocus()}setEditorVisible(U,$){super.setEditorVisible(U,$);for(const{editor:q}of[this.input1View,this.input2View,this.inputResultView])U?q.onVisible():q.onHide();this._ctxIsMergeEditor.set(U)}getControl(){return this.inputResultView.editor}get scopedContextKeyService(){return this.getControl()?.invokeWithinContext($=>$.get(f.IContextKeyService))}toggleBase(){this.setLayout({...this._layoutMode.value,showBase:!this._layoutMode.value.showBase})}toggleShowBaseTop(){const U=this._layoutMode.value.showBase&&this._layoutMode.value.showBaseAtTop;this.setLayout({...this._layoutMode.value,showBaseAtTop:!0,showBase:!U})}toggleShowBaseCenter(){const U=this._layoutMode.value.showBase&&!this._layoutMode.value.showBaseAtTop;this.setLayout({...this._layoutMode.value,showBaseAtTop:!1,showBase:!U})}setLayoutKind(U){this.setLayout({...this._layoutMode.value,kind:U})}setLayout(U){const $=this._layoutMode.value;JSON.stringify($)!==JSON.stringify(U)&&(this.model?.telemetry.reportLayoutChange({baseTop:U.showBaseAtTop,baseVisible:U.showBase,isColumnView:U.kind==="columns"}),this.applyLayout(U))}applyLayout(U){(0,I.transaction)($=>{if(U.showBase&&!this.baseView.get()){this.baseViewDisposables.clear();const q=this.baseViewDisposables.add(this.instantiationService.createInstance(w.BaseCodeEditorView,this.viewModel));this.baseViewDisposables.add((0,I.autorun)("Update base view options",X=>{const G=this.baseViewOptions.read(X);G&&q.updateOptions(G)})),this.baseView.set(q,$)}else!U.showBase&&this.baseView.get()&&(this.baseView.set(void 0,$),this.baseViewDisposables.clear());U.kind==="mixed"?this.setGrid([U.showBaseAtTop&&U.showBase?{size:38,data:this.baseView.get().view}:void 0,{size:38,groups:[{data:this.input1View.view},!U.showBaseAtTop&&U.showBase?{data:this.baseView.get().view}:void 0,{data:this.input2View.view}].filter(S.isDefined)},{size:62,data:this.inputResultView.view}].filter(S.isDefined)):U.kind==="columns"&&this.setGrid([U.showBase?{size:40,data:this.baseView.get().view}:void 0,{size:60,groups:[{data:this.input1View.view},{data:this.inputResultView.view},{data:this.input2View.view}]}].filter(S.isDefined)),this._layoutMode.value=U,this._ctxUsesColumnLayout.set(U.kind),this._ctxShowBase.set(U.showBase),this._ctxShowBaseAtTop.set(U.showBaseAtTop),this._onDidChangeSizeConstraints.fire(),this._layoutModeObs.set(U,$)})}setGrid(U){let $=-1,q=-1;this._grid.value&&($=this._grid.value.width,q=this._grid.value.height),this._grid.value=p.SerializableGrid.from({orientation:0,size:100,groups:U},{styles:{separatorBorder:this.theme.getColor(L.settingsSashBorder)??R.Color.transparent},proportionalLayout:!0}),(0,t.reset)(this.rootHtmlElement,this._grid.value.element),$!==-1&&this._grid.value.layout($,q)}_applyViewState(U){!U||(this.inputResultView.editor.restoreViewState(U),U.input1State&&this.input1View.editor.restoreViewState(U.input1State),U.input2State&&this.input2View.editor.restoreViewState(U.input2State),U.focusIndex>=0&&[this.input1View.editor,this.input2View.editor,this.inputResultView.editor][U.focusIndex].focus())}computeEditorViewState(U){if(!(0,b.isEqual)(this.inputModel.get()?.resultUri,U))return;const $=this.inputResultView.editor.saveViewState();if(!$)return;const q=this.input1View.editor.saveViewState()??void 0,X=this.input2View.editor.saveViewState()??void 0,G=[this.input1View.editor,this.input2View.editor,this.inputResultView.editor].findIndex(Q=>Q.hasWidgetFocus());return{...$,input1State:q,input2State:X,focusIndex:G}}tracksEditorViewState(U){return U instanceof v.MergeEditorInput}toggleShowNonConflictingChanges(){this.showNonConflictingChanges.set(!this.showNonConflictingChanges.get(),void 0),this.showNonConflictingChangesStore.set(this.showNonConflictingChanges.get()),this._ctxShowNonConflictingChanges.set(this.showNonConflictingChanges.get())}};V.ID="mergeEditor",V=we([F(0,l.IInstantiationService),F(1,f.IContextKeyService),F(2,d.ITelemetryService),F(3,s.IStorageService),F(4,n.IThemeService),F(5,r.ITextResourceConfigurationService),F(6,i.IConfigurationService),F(7,N.IEditorService),F(8,M.IEditorGroupsService),F(9,c.IFileService),F(10,C.ICodeEditorService),F(11,i.IConfigurationService)],V),e.MergeEditor=V;let z=class ao{constructor(U){this._storageService=U,this._value={kind:"mixed",showBase:!1,showBaseAtTop:!0};const $=U.get(ao._key,0,"mixed");if($==="mixed"||$==="columns")this._value={kind:$,showBase:!1,showBaseAtTop:!0};else if($)try{this._value=JSON.parse($)}catch(q){(0,A.onUnexpectedError)(q)}}get value(){return this._value}set value(U){this._value!==U&&(this._value=U,this._storageService.store(ao._key,JSON.stringify(this._value),0,0))}};z._key="mergeEditor/layout",z=we([F(0,s.IStorageService)],z);let x=class extends E.Disposable{constructor(U,$){super(),this._editorService=U,this._store.add($.registerCodeEditorOpenHandler(this.openCodeEditorFromMergeEditor.bind(this)))}async openCodeEditorFromMergeEditor(U,$,q){const X=this._editorService.activeEditorPane;if(!q&&U.options&&X instanceof V&&X.getControl()&&X.input instanceof v.MergeEditorInput&&(0,b.isEqual)(U.resource,X.input.result)){const G=X.getControl();return(0,g.applyTextEditorOptions)(U.options,G,0),G}return null}};x=we([F(0,N.IEditorService),F(1,C.ICodeEditorService)],x),e.MergeEditorOpenHandlerContribution=x;let H=class extends E.Disposable{constructor(U,$){super();const q=X=>({editor:$.createInstance(v.MergeEditorInput,X.base.resource,{uri:X.input1.resource,title:X.input1.label??(0,b.basename)(X.input1.resource),description:X.input1.description??"",detail:X.input1.detail},{uri:X.input2.resource,title:X.input2.label??(0,b.basename)(X.input2.resource),description:X.input2.description??"",detail:X.input2.detail},X.result.resource)});this._register(U.registerEditor("*",{id:o.DEFAULT_EDITOR_ASSOCIATION.id,label:o.DEFAULT_EDITOR_ASSOCIATION.displayName,detail:o.DEFAULT_EDITOR_ASSOCIATION.providerDisplayName,priority:O.RegisteredEditorPriority.builtin},{},{createMergeEditorInput:q}))}};H=we([F(0,O.IEditorResolverService),F(1,l.IInstantiationService)],H),e.MergeEditorResolverContribution=H}),define(ae[2914],le([1,0,29,18,9,1733,15,7,47,41,469,558,445,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AcceptMerge=e.ResetToBaseAndAutoMergeCommand=e.AcceptAllInput2=e.AcceptAllInput1=e.OpenBaseFile=e.CompareInput2WithBaseCommand=e.CompareInput1WithBaseCommand=e.ToggleActiveConflictInput2=e.ToggleActiveConflictInput1=e.GoToPreviousUnhandledConflict=e.GoToNextUnhandledConflict=e.OpenResultResource=e.ShowHideCenterBase=e.ShowHideTopBase=e.ShowHideBase=e.ShowNonConflictingChanges=e.SetColumnLayout=e.SetMixedLayout=e.OpenMergeEditor=void 0;class i extends k.Action2{constructor(z){super(z)}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);if(x instanceof C.MergeEditor){const H=x.viewModel.get();if(!H)return;this.runWithViewModel(H,z)}}}class f extends k.Action2{constructor(z){super(z)}run(z,...x){const{activeEditorPane:H}=z.get(u.IEditorService);if(H instanceof C.MergeEditor){const W=H.viewModel.get();return W?this.runWithMergeEditor({viewModel:W,inputModel:H.inputModel.get(),input:H.input,editorIdentifier:{editor:H.input,groupId:H.group.id}},z,...x):void 0}}}class c extends k.Action2{constructor(){super({id:"_open.mergeEditor",title:{value:(0,A.localize)(0,null),original:"Open Merge Editor"}})}run(z,...x){const H=l.validate(x[0]),W={base:{resource:H.base},input1:{resource:H.input1.uri,label:H.input1.title,description:H.input1.description,detail:H.input1.detail},input2:{resource:H.input2.uri,label:H.input2.title,description:H.input2.description,detail:H.input2.detail},result:{resource:H.output},options:{preserveFocus:!0}};z.get(u.IEditorService).openEditor(W)}}e.OpenMergeEditor=c;var l;(function(V){function z(U){if(!U||typeof U!="object")throw new TypeError("invalid argument");const $=U,q=H($.base),X=H($.output),G=x($.input1),Q=x($.input2);return{base:q,input1:G,input2:Q,output:X}}V.validate=z;function x(U){if(typeof U=="string")return new S.MergeEditorInputData(R.URI.parse(U,!0),void 0,void 0,void 0);if(!U||typeof U!="object")throw new TypeError("invalid argument");if(W(U))return new S.MergeEditorInputData(R.URI.revive(U),void 0,void 0,void 0);const $=U,q=$.title,X=H($.uri),G=$.detail,Q=$.description;return new S.MergeEditorInputData(X,q,G,Q)}function H(U){if(typeof U=="string")return R.URI.parse(U,!0);if(U&&typeof U=="object")return R.URI.revive(U);throw new TypeError("invalid argument")}function W(U){if(!U||typeof U!="object")return!1;const $=U;return typeof $.scheme=="string"&&typeof $.authority=="string"&&typeof $.path=="string"&&typeof $.query=="string"&&typeof $.fragment=="string"}})(l||(l={}));class s extends k.Action2{constructor(){super({id:"merge.mixedLayout",title:{value:(0,A.localize)(1,null),original:"Mixed Layout"},toggled:r.ctxMergeEditorLayout.isEqualTo("mixed"),menu:[{id:k.MenuId.EditorTitle,when:r.ctxIsMergeEditor,group:"1_merge",order:9}],precondition:r.ctxIsMergeEditor})}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);x instanceof C.MergeEditor&&x.setLayoutKind("mixed")}}e.SetMixedLayout=s;class d extends k.Action2{constructor(){super({id:"merge.columnLayout",title:{value:(0,A.localize)(2,null),original:"Column Layout"},toggled:r.ctxMergeEditorLayout.isEqualTo("columns"),menu:[{id:k.MenuId.EditorTitle,when:r.ctxIsMergeEditor,group:"1_merge",order:10}],precondition:r.ctxIsMergeEditor})}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);x instanceof C.MergeEditor&&x.setLayoutKind("columns")}}e.SetColumnLayout=d;class n extends k.Action2{constructor(){super({id:"merge.showNonConflictingChanges",title:{value:(0,A.localize)(3,null),original:"Show Non-Conflicting Changes"},toggled:r.ctxMergeEditorShowNonConflictingChanges.isEqualTo(!0),menu:[{id:k.MenuId.EditorTitle,when:r.ctxIsMergeEditor,group:"3_merge",order:9}],precondition:r.ctxIsMergeEditor})}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);x instanceof C.MergeEditor&&x.toggleShowNonConflictingChanges()}}e.ShowNonConflictingChanges=n;class a extends k.Action2{constructor(){super({id:"merge.showBase",title:{value:(0,A.localize)(4,null),original:"Show Base"},toggled:r.ctxMergeEditorShowBase.isEqualTo(!0),menu:[{id:k.MenuId.EditorTitle,when:E.ContextKeyExpr.and(r.ctxIsMergeEditor,r.ctxMergeEditorLayout.isEqualTo("columns")),group:"2_merge",order:9}]})}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);x instanceof C.MergeEditor&&x.toggleBase()}}e.ShowHideBase=a;class o extends k.Action2{constructor(){super({id:"merge.showBaseTop",title:{value:(0,A.localize)(5,null),original:"Show Base Top"},toggled:E.ContextKeyExpr.and(r.ctxMergeEditorShowBase,r.ctxMergeEditorShowBaseAtTop),menu:[{id:k.MenuId.EditorTitle,when:E.ContextKeyExpr.and(r.ctxIsMergeEditor,r.ctxMergeEditorLayout.isEqualTo("mixed")),group:"2_merge",order:10}]})}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);x instanceof C.MergeEditor&&x.toggleShowBaseTop()}}e.ShowHideTopBase=o;class g extends k.Action2{constructor(){super({id:"merge.showBaseCenter",title:{value:(0,A.localize)(6,null),original:"Show Base Center"},toggled:E.ContextKeyExpr.and(r.ctxMergeEditorShowBase,r.ctxMergeEditorShowBaseAtTop.negate()),menu:[{id:k.MenuId.EditorTitle,when:E.ContextKeyExpr.and(r.ctxIsMergeEditor,r.ctxMergeEditorLayout.isEqualTo("mixed")),group:"2_merge",order:11}]})}run(z){const{activeEditorPane:x}=z.get(u.IEditorService);x instanceof C.MergeEditor&&x.toggleShowBaseCenter()}}e.ShowHideCenterBase=g;const h={value:(0,A.localize)(7,null),original:"Merge Editor"};class v extends i{constructor(){super({id:"merge.openResult",icon:t.Codicon.goToFile,title:{value:(0,A.localize)(8,null),original:"Open File"},category:h,menu:[{id:k.MenuId.EditorTitle,when:r.ctxIsMergeEditor,group:"navigation",order:1}],precondition:r.ctxIsMergeEditor})}runWithViewModel(z,x){x.get(u.IEditorService).openEditor({resource:z.model.resultTextModel.uri})}}e.OpenResultResource=v;class m extends i{constructor(){super({id:"merge.goToNextUnhandledConflict",category:h,title:{value:(0,A.localize)(9,null),original:"Go to Next Unhandled Conflict"},icon:t.Codicon.arrowDown,menu:[{id:k.MenuId.EditorTitle,when:r.ctxIsMergeEditor,group:"navigation",order:3}],f1:!0,precondition:r.ctxIsMergeEditor})}runWithViewModel(z){z.model.telemetry.reportNavigationToNextConflict(),z.goToNextModifiedBaseRange(x=>!z.model.isHandled(x).get())}}e.GoToNextUnhandledConflict=m;class w extends i{constructor(){super({id:"merge.goToPreviousUnhandledConflict",category:h,title:{value:(0,A.localize)(10,null),original:"Go to Previous Unhandled Conflict"},icon:t.Codicon.arrowUp,menu:[{id:k.MenuId.EditorTitle,when:r.ctxIsMergeEditor,group:"navigation",order:2}],f1:!0,precondition:r.ctxIsMergeEditor})}runWithViewModel(z){z.model.telemetry.reportNavigationToPreviousConflict(),z.goToPreviousModifiedBaseRange(x=>!z.model.isHandled(x).get())}}e.GoToPreviousUnhandledConflict=w;class D extends i{constructor(){super({id:"merge.toggleActiveConflictInput1",category:h,title:{value:(0,A.localize)(11,null),original:"Toggle Current Conflict from Left"},f1:!0,precondition:r.ctxIsMergeEditor})}runWithViewModel(z){z.toggleActiveConflict(1)}}e.ToggleActiveConflictInput1=D;class y extends i{constructor(){super({id:"merge.toggleActiveConflictInput2",category:h,title:{value:(0,A.localize)(12,null),original:"Toggle Current Conflict from Right"},f1:!0,precondition:r.ctxIsMergeEditor})}runWithViewModel(z){z.toggleActiveConflict(2)}}e.ToggleActiveConflictInput2=y;class T extends i{constructor(){super({id:"mergeEditor.compareInput1WithBase",category:h,title:{value:(0,A.localize)(13,null),original:"Compare Input 1 With Base"},shortTitle:(0,A.localize)(14,null),f1:!0,precondition:r.ctxIsMergeEditor,menu:{id:k.MenuId.MergeInput1Toolbar}})}runWithViewModel(z,x){const H=x.get(u.IEditorService);L(z,H,1)}}e.CompareInput1WithBaseCommand=T;class _ extends i{constructor(){super({id:"mergeEditor.compareInput2WithBase",category:h,title:{value:(0,A.localize)(15,null),original:"Compare Input 2 With Base"},shortTitle:(0,A.localize)(16,null),f1:!0,precondition:r.ctxIsMergeEditor,menu:{id:k.MenuId.MergeInput2Toolbar}})}runWithViewModel(z,x){const H=x.get(u.IEditorService);L(z,H,2)}}e.CompareInput2WithBaseCommand=_;async function L(V,z,x){z.openEditor(z.activeEditor,{pinned:!0});const W=V.model.base,U=x===1?V.inputCodeEditorView1.editor:V.inputCodeEditorView2.editor,$=U.getPosition().lineNumber;await z.openEditor({original:{resource:W.uri},modified:{resource:U.getModel().uri},options:{selection:{startLineNumber:$,startColumn:1},revealIfOpened:!0,revealIfVisible:!0}})}class M extends i{constructor(){super({id:"merge.openBaseEditor",category:h,title:{value:(0,A.localize)(17,null),original:"Open Base File"},f1:!0,precondition:r.ctxIsMergeEditor})}runWithViewModel(z,x){x.get(b.IOpenerService).open(z.model.base.uri)}}e.OpenBaseFile=M;class O extends i{constructor(){super({id:"merge.acceptAllInput1",category:h,title:{value:(0,A.localize)(18,null),original:"Accept All Changes from Left"},f1:!0,precondition:r.ctxIsMergeEditor,menu:[{id:k.MenuId.MergeInput1Toolbar}]})}runWithViewModel(z){z.acceptAll(1)}}e.AcceptAllInput1=O;class N extends i{constructor(){super({id:"merge.acceptAllInput2",category:h,title:{value:(0,A.localize)(19,null),original:"Accept All Changes from Right"},f1:!0,precondition:r.ctxIsMergeEditor,menu:[{id:k.MenuId.MergeInput2Toolbar}]})}runWithViewModel(z){z.acceptAll(2)}}e.AcceptAllInput2=N;class P extends i{constructor(){super({id:"mergeEditor.resetResultToBaseAndAutoMerge",category:h,title:{value:(0,A.localize)(20,null),original:"Reset Result"},shortTitle:(0,A.localize)(21,null),f1:!0,precondition:r.ctxIsMergeEditor,menu:{id:k.MenuId.MergeInputResultToolbar}})}runWithViewModel(z,x){z.model.reset()}}e.ResetToBaseAndAutoMergeCommand=P;class B extends f{constructor(){super({id:"mergeEditor.acceptMerge",category:h,title:{value:(0,A.localize)(22,null),original:"Complete Merge"},f1:!1,precondition:r.ctxIsMergeEditor})}async runWithMergeEditor({inputModel:z,editorIdentifier:x,viewModel:H},W){const U=W.get(I.IDialogService),$=W.get(u.IEditorService);return H.model.unhandledConflictsCount.get()>0&&!(await U.confirm({type:"info",message:(0,A.localize)(23,null,(0,p.basename)(z.resultUri)),detail:(0,A.localize)(24,null),primaryButton:(0,A.localize)(25,null),secondaryButton:(0,A.localize)(26,null)})).confirmed?{successful:!1}:(await z.accept(),await $.closeEditor(x),{successful:!0})}}e.AcceptMerge=B}),define(ae[2915],le([1,0,56,29,9,42,1734,15,93,47,19,26,48,558,445,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MergeEditorLoadContentsFromFolder=e.MergeEditorSaveContentsToFolder=e.MergeEditorCopyContentsToJSON=void 0;const c={value:(0,k.localize)(0,null),original:"Merge Editor (Dev)"};class l extends E.Action2{constructor(){super({id:"merge.dev.copyContentsJson",category:c,title:{value:(0,k.localize)(1,null),original:"Copy Merge Editor State as JSON"},icon:p.Codicon.layoutCentered,f1:!0,precondition:i.ctxIsMergeEditor})}run(o){const{activeEditorPane:g}=o.get(f.IEditorService),h=o.get(I.IClipboardService),v=o.get(C.INotificationService);if(!(g instanceof u.MergeEditor)){v.info({name:(0,k.localize)(2,null),message:(0,k.localize)(3,null)});return}const m=g.model;if(!m)return;const w={languageId:m.resultTextModel.getLanguageId(),base:m.base.getValue(),input1:m.input1.textModel.getValue(),input2:m.input2.textModel.getValue(),result:m.resultTextModel.getValue(),initialResult:m.getInitialResultValue()},D=JSON.stringify(w,void 0,4);h.writeText(D),v.info({name:(0,k.localize)(4,null),message:(0,k.localize)(5,null)})}}e.MergeEditorCopyContentsToJSON=l;class s extends E.Action2{constructor(){super({id:"merge.dev.saveContentsToFolder",category:c,title:{value:(0,k.localize)(6,null),original:"Save Merge Editor State to Folder"},icon:p.Codicon.layoutCentered,f1:!0,precondition:i.ctxIsMergeEditor})}async run(o){const{activeEditorPane:g}=o.get(f.IEditorService),h=o.get(C.INotificationService),v=o.get(b.IFileDialogService),m=o.get(S.IFileService),w=o.get(A.ILanguageService);if(!(g instanceof u.MergeEditor)){h.info({name:(0,k.localize)(7,null),message:(0,k.localize)(8,null)});return}const D=g.model;if(!D)return;const y=await v.showOpenDialog({canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1,title:(0,k.localize)(9,null)});if(!y)return;const T=y[0],_=w.getExtensions(D.resultTextModel.getLanguageId())[0]||"";async function L(M,O){await m.writeFile(R.URI.joinPath(T,M+_),t.VSBuffer.fromString(O),{})}await Promise.all([L("base",D.base.getValue()),L("input1",D.input1.textModel.getValue()),L("input2",D.input2.textModel.getValue()),L("result",D.resultTextModel.getValue()),L("initialResult",D.getInitialResultValue())]),h.info({name:(0,k.localize)(10,null),message:(0,k.localize)(11,null)})}}e.MergeEditorSaveContentsToFolder=s;class d extends E.Action2{constructor(){super({id:"merge.dev.loadContentsFromFolder",category:c,title:{value:(0,k.localize)(12,null),original:"Load Merge Editor State from Folder"},icon:p.Codicon.layoutCentered,f1:!0})}async run(o,g){const h=o.get(b.IFileDialogService),v=o.get(f.IEditorService),m=o.get(S.IFileService),w=o.get(r.IQuickInputService);g||(g={});let D;if(g.folderUri)D=g.folderUri;else{const B=await h.showOpenDialog({canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1,title:(0,k.localize)(13,null)});if(!B)return;D=B[0]}const y=await m.resolve(D);function T(B){return y.children.find(V=>V.name.startsWith(B))?.resource}const _=await n(w,g.resultState),L=T("base"),M=T("input1"),O=T("input2"),N=T(_?"initialResult":"result"),P={base:{resource:L},input1:{resource:M,label:"Input 1",description:"Input 1",detail:"(from file)"},input2:{resource:O,label:"Input 2",description:"Input 2",detail:"(from file)"},result:{resource:N}};v.openEditor(P)}}e.MergeEditorLoadContentsFromFolder=d;async function n(a,o){return o?o==="initial":(await a.pick([{label:"result",result:!1},{label:"initial result",result:!0}],{canPickMany:!1}))?.result}}),define(ae[2916],le([1,0,1735,15,55,97,17,153,44,43,2914,2915,469,558,2792]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),k.Registry.as(b.EditorExtensions.EditorPane).registerEditorPane(E.EditorPaneDescriptor.create(u.MergeEditor,u.MergeEditor.ID,(0,t.localize)(0,null)),[new A.SyncDescriptor(r.MergeEditorInput)]),k.Registry.as(b.EditorExtensions.EditorFactory).registerEditorSerializer(r.MergeEditorInput.ID,i.MergeEditorSerializer),k.Registry.as(R.Extensions.Configuration).registerConfiguration({properties:{"mergeEditor.diffAlgorithm":{type:"string",enum:["smart","experimental"],default:"experimental",markdownEnumDescriptions:[(0,t.localize)(1,null),(0,t.localize)(2,null)]},"mergeEditor.showDeletionMarkers":{type:"boolean",default:!0,description:"Controls if deletions in base or one of the inputs should be indicated by a vertical bar."}}}),(0,p.registerAction2)(S.OpenResultResource),(0,p.registerAction2)(S.SetMixedLayout),(0,p.registerAction2)(S.SetColumnLayout),(0,p.registerAction2)(S.OpenMergeEditor),(0,p.registerAction2)(S.OpenBaseFile),(0,p.registerAction2)(S.ShowNonConflictingChanges),(0,p.registerAction2)(S.ShowHideBase),(0,p.registerAction2)(S.ShowHideTopBase),(0,p.registerAction2)(S.ShowHideCenterBase),(0,p.registerAction2)(S.GoToNextUnhandledConflict),(0,p.registerAction2)(S.GoToPreviousUnhandledConflict),(0,p.registerAction2)(S.ToggleActiveConflictInput1),(0,p.registerAction2)(S.ToggleActiveConflictInput2),(0,p.registerAction2)(S.CompareInput1WithBaseCommand),(0,p.registerAction2)(S.CompareInput2WithBaseCommand),(0,p.registerAction2)(S.AcceptAllInput1),(0,p.registerAction2)(S.AcceptAllInput2),(0,p.registerAction2)(S.ResetToBaseAndAutoMergeCommand),(0,p.registerAction2)(S.AcceptMerge),(0,p.registerAction2)(C.MergeEditorCopyContentsToJSON),(0,p.registerAction2)(C.MergeEditorSaveContentsToFolder),(0,p.registerAction2)(C.MergeEditorLoadContentsFromFolder),k.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(u.MergeEditorOpenHandlerContribution,3),k.Registry.as(I.Extensions.Workbench).registerWorkbenchContribution(u.MergeEditorResolverContribution,1)}),define(ae[2917],le([1,0,56,29,164,9,42,1747,15,93,81,19,48,558,24]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenSelectionInTemporaryMergeEditor=e.MergeEditorOpenContentsFromJSON=void 0;const f={value:(0,E.localize)(0,null),original:"Merge Editor (Dev)"};class c extends I.Action2{constructor(){super({id:"merge.dev.openContentsJson",category:f,title:{value:(0,E.localize)(1,null),original:"Open Merge Editor State from JSON"},icon:p.Codicon.layoutCentered,f1:!0})}async run(a,o){const g=a.get(r.IQuickInputService),h=a.get(b.IClipboardService),v=a.get(i.IEditorService),m=a.get(k.ILanguageService),w=a.get(S.INativeEnvironmentService),D=a.get(C.IFileService);o||(o={});let y;if(o.data)y=o.data;else{const x=await g.input({prompt:(0,E.localize)(2,null),value:await h.readText()});if(x===void 0)return;y=x!==""?JSON.parse(x):{base:"",input1:"",input2:"",result:"",languageId:"plaintext"}}const T=A.URI.joinPath(w.tmpDir,(0,R.randomPath)()),_=m.getExtensions(y.languageId)[0]||"",L=A.URI.joinPath(T,`/base${_}`),M=A.URI.joinPath(T,`/input1${_}`),O=A.URI.joinPath(T,`/input2${_}`),N=A.URI.joinPath(T,`/result${_}`),P=A.URI.joinPath(T,`/initialResult${_}`);async function B(x,H){await D.writeFile(x,t.VSBuffer.fromString(H))}const V=await l(g,o.resultState);await Promise.all([B(L,y.base),B(M,y.input1),B(O,y.input2),B(N,V?y.initialResult||"":y.result),B(P,y.initialResult||"")]);const z={base:{resource:L},input1:{resource:M,label:"Input 1",description:"Input 1",detail:"(from JSON)"},input2:{resource:O,label:"Input 2",description:"Input 2",detail:"(from JSON)"},result:{resource:N}};v.openEditor(z)}}e.MergeEditorOpenContentsFromJSON=c;async function l(n,a){return a?a==="initial":(await n.pick([{label:"result",result:!1},{label:"initial result",result:!0}],{canPickMany:!1}))?.result}class s extends I.Action2{constructor(a){super(a)}run(a){const{activeEditorPane:o}=a.get(i.IEditorService);if(o instanceof u.MergeEditor){const g=o.viewModel.get();if(!g)return;this.runWithViewModel(g,a)}}}class d extends s{constructor(){super({id:"merge.dev.openSelectionInTemporaryMergeEditor",category:f,title:{value:(0,E.localize)(3,null),original:"Open Selection In Temporary Merge Editor"},icon:p.Codicon.layoutCentered,f1:!0})}async runWithViewModel(a,o){const g=a.selectionInBase.get()?.rangesInBase;if(!g||g.length===0)return;const h=g.map(D=>a.model.base.getValueInRange(D)).join(` `),v=g.map(D=>a.inputCodeEditorView1.editor.getModel().getValueInRange(a.model.translateBaseRangeToInput(1,D))).join(` `),m=g.map(D=>a.inputCodeEditorView2.editor.getModel().getValueInRange(a.model.translateBaseRangeToInput(2,D))).join(` `),w=g.map(D=>a.resultCodeEditorView.editor.getModel().getValueInRange(a.model.translateBaseRangeToResult(D))).join(` `);new c().run(o,{data:{base:h,input1:v,input2:m,result:w,languageId:a.resultCodeEditorView.editor.getModel().getLanguageId()}})}}e.OpenSelectionInTemporaryMergeEditor=d}),define(ae[2918],le([1,0,15,2917]),function(J,e,t,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,t.registerAction2)(p.MergeEditorOpenContentsFromJSON),(0,t.registerAction2)(p.OpenSelectionInTemporaryMergeEditor)}),define(ae[2919],le([1,0,1793,53,27,23,114,5,699,12,261,9,62,132,58,24,78,19,49]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogViewer=e.LogViewerInput=void 0;let d=class lc extends S.TextResourceEditorInput{get typeId(){return lc.ID}constructor(o,g,h,v,m,w){super(C.URI.from({scheme:u.LOG_SCHEME,path:o.id}),(0,p.basename)(o.file.path),(0,p.dirname)(o.file.path),void 0,void 0,g,h,v,m,w)}};d.ID="workbench.editorinputs.output",d=we([F(1,r.ITextModelService),F(2,c.ITextFileService),F(3,f.IEditorService),F(4,l.IFileService),F(5,s.ILabelService)],d),e.LogViewerInput=d;let n=class cc extends I.AbstractTextResourceEditor{constructor(o,g,h,v,m,w,D,y){super(cc.LOG_VIEWER_EDITOR_ID,o,g,h,v,m,w,D,y)}getConfigurationOverrides(){const o=super.getConfigurationOverrides();return o.wordWrap="off",o.folding=!1,o.scrollBeyondLastLine=!1,o.renderValidationDecorations="editable",o}getAriaLabel(){return(0,t.localize)(0,null)}};n.LOG_VIEWER_EDITOR_ID="workbench.editors.logViewer",n=we([F(0,R.ITelemetryService),F(1,E.IInstantiationService),F(2,A.IStorageService),F(3,k.ITextResourceConfigurationService),F(4,b.IThemeService),F(5,i.IEditorGroupsService),F(6,f.IEditorService),F(7,l.IFileService)],n),e.LogViewer=n}),define(ae[995],le([1,0,1795,27,23,114,5,7,699,132,12,8,58,24,129,38,37,45,261,41,80,33,10,11,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutputViewPane=void 0;let v=class extends i.ViewPane{get scrollLock(){return!!this.scrollLockContextKey.get()}set scrollLock(D){this.scrollLockContextKey.set(D)}constructor(D,y,T,_,L,M,O,N,P,B){super(D,y,T,_,L,M,O,N,P,B),this.editorPromise=null,this.scrollLockContextKey=b.CONTEXT_OUTPUT_SCROLL_LOCK.bindTo(this.contextKeyService),this.editor=O.createInstance(m),this._register(this.editor.onTitleAreaUpdate(()=>{this.updateTitle(this.editor.getTitle()),this.updateActions()})),this._register(this.onDidChangeBodyVisibility(()=>this.onDidChangeVisibility(this.isBodyVisible())))}showChannel(D,y){this.channelId!==D.id&&this.setInput(D),y||this.focus()}focus(){super.focus(),this.editorPromise?.then(()=>this.editor.focus())}renderBody(D){super.renderBody(D),this.editor.create(D),D.classList.add("output-view");const y=this.editor.getControl();y.setAriaOptions({role:"document",activeDescendant:void 0}),this._register(y.onDidChangeModelContent(()=>{this.scrollLock||this.editor.revealLastLine()})),this._register(y.onDidChangeCursorPosition(T=>{if(T.reason!==3||!this.configurationService.getValue("output.smartScroll.enabled"))return;const _=y.getModel();if(_){const L=T.position.lineNumber,M=_.getLineCount();this.scrollLock=M!==L}}))}layoutBody(D,y){super.layoutBody(D,y),this.editor.layout(new o.Dimension(y,D))}onDidChangeVisibility(D){this.editor.setVisible(D),D||this.clearInput()}setInput(D){this.channelId=D.id;const y=this.createInput(D);(!this.editor.input||!y.matches(this.editor.input))&&(this.editorPromise?.cancel(),this.editorPromise=(0,g.createCancelablePromise)(T=>this.editor.setInput(this.createInput(D),{preserveFocus:!0},Object.create(null),T).then(()=>this.editor)))}clearInput(){this.channelId=void 0,this.editor.clearInput(),this.editorPromise=null}createInput(D){return this.instantiationService.createInstance(s.TextResourceEditorInput,D.uri,t.localize(0,null,D.label),t.localize(1,null,D.label),void 0,void 0)}};v=we([F(1,f.IKeybindingService),F(2,c.IContextMenuService),F(3,C.IConfigurationService),F(4,E.IContextKeyService),F(5,l.IViewDescriptorService),F(6,k.IInstantiationService),F(7,d.IOpenerService),F(8,S.IThemeService),F(9,p.ITelemetryService)],v),e.OutputViewPane=v;let m=class extends I.AbstractTextResourceEditor{constructor(D,y,T,_,L,M,O,N,P){super(b.OUTPUT_VIEW_ID,D,y,T,L,M,O,N,P),this.configurationService=_}getId(){return b.OUTPUT_VIEW_ID}getTitle(){return t.localize(2,null)}getConfigurationOverrides(){const D=super.getConfigurationOverrides();D.wordWrap="on",D.lineNumbers="off",D.glyphMargin=!1,D.lineDecorationsWidth=20,D.rulers=[],D.folding=!1,D.scrollBeyondLastLine=!1,D.renderLineHighlight="none",D.minimap={enabled:!1},D.renderValidationDecorations="editable",D.padding=void 0,D.readOnly=!0,D.domReadOnly=!0,D.unicodeHighlight={nonBasicASCII:!1,invisibleCharacters:!1,ambiguousCharacters:!1};const y=this.configurationService.getValue("[Log]");return y&&(y["editor.minimap.enabled"]&&(D.minimap={enabled:!0}),"editor.wordWrap"in y&&(D.wordWrap=y["editor.wordWrap"])),D}getAriaLabel(){return this.input?this.input.getAriaLabel():t.localize(3,null)}async setInput(D,y,T,_){const L=!(y&&y.preserveFocus);this.input&&D.matches(this.input)||(this.input&&this.input.dispose(),await super.setInput(D,y,T,_),L&&this.focus(),this.revealLastLine())}clearInput(){this.input&&this.input.dispose(),super.clearInput()}createEditor(D){D.setAttribute("role","document"),super.createEditor(D);const y=this.scopedContextKeyService;y&&b.CONTEXT_IN_OUTPUT.bindTo(y).set(!0)}};m=we([F(0,p.ITelemetryService),F(1,k.IInstantiationService),F(2,R.IStorageService),F(3,C.IConfigurationService),F(4,A.ITextResourceConfigurationService),F(5,S.IThemeService),F(6,r.IEditorGroupsService),F(7,u.IEditorService),F(8,h.IFileService)],m),(0,S.registerThemingParticipant)((w,D)=>{const y=w.getColor(n.SIDE_BAR_BACKGROUND);y&&y!==w.getColor(a.editorBackground)&&D.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: ${y}; } `)})}),define(ae[2920],le([1,0,6,18,2,129,10,216,218,277,24,5,37,7,31,38,15,36,79,12,649,73,76,8,11,1269,88,9,19,304,96,45,1836,16,112,23,43,80,173,471,54,40,337,381,333,14,28,33,244,168,22,151,439,617,827,41,27,42,49,518,29,878,126,57,204,84,34,184,182,26,879,825,830,334,407]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce,De,Ae){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SCMActionButton=e.scmProviderSeparatorBorderColor=e.SCMViewPane=e.SCMAccessibilityProvider=e.SCMTreeKeyboardNavigationLabelProvider=e.SCMTreeSorter=void 0;let Pe=class dc{get templateId(){return dc.TEMPLATE_ID}constructor(Ne,Ge,Ze,ft){this.commandService=Ne,this.contextMenuService=Ge,this.themeService=Ze,this.notificationService=ft,this.actionButtons=new Map}renderTemplate(Ne){Ne.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-no-twistie"),Ne.parentElement.parentElement.classList.add("cursor-default","force-no-hover");const Ge=(0,k.append)(Ne,(0,k.$)(".button-container")),Ze=new Nt(Ge,this.contextMenuService,this.commandService,this.themeService,this.notificationService);return{actionButton:Ze,disposable:R.Disposable.None,templateDisposable:Ze}}renderElement(Ne,Ge,Ze,ft){Ze.disposable.dispose();const Dt=new R.DisposableStore,St=Ne.element;Ze.actionButton.setButton(Ne.element.button),this.actionButtons.set(St,Ze.actionButton),Dt.add({dispose:()=>this.actionButtons.delete(St)}),Ze.disposable=Dt}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}focusActionButton(Ne){this.actionButtons.get(Ne)?.focus()}disposeElement(Ne,Ge,Ze){Ze.disposable.dispose()}disposeTemplate(Ne){Ne.disposable.dispose(),Ne.templateDisposable.dispose()}};Pe.DEFAULT_HEIGHT=30,Pe.TEMPLATE_ID="actionButton",Pe=we([F(0,i.ICommandService),F(1,r.IContextMenuService),F(2,d.IThemeService),F(3,ge.INotificationService)],Pe);let fe=class lo{get templateId(){return lo.TEMPLATE_ID}constructor(Ne,Ge,Ze,ft){this.outerLayout=Ne,this.overflowWidgetsDomNode=Ge,this.updateHeight=Ze,this.instantiationService=ft,this.inputWidgets=new Map,this.contentHeights=new WeakMap,this.editorSelections=new WeakMap}renderTemplate(Ne){Ne.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-no-twistie"),Ne.parentElement.parentElement.classList.add("force-no-hover");const Ge=new R.DisposableStore,Ze=(0,k.append)(Ne,(0,k.$)(".scm-input")),ft=this.instantiationService.createInstance(xt,Ze,this.overflowWidgetsDomNode);return Ge.add(ft),{inputWidget:ft,elementDisposables:Ge.add(new R.DisposableStore),templateDisposable:Ge}}renderElement(Ne,Ge,Ze){const ft=Ne.element;Ze.inputWidget.input=ft,this.inputWidgets.set(ft,Ze.inputWidget),Ze.elementDisposables.add({dispose:()=>this.inputWidgets.delete(ft)});const Dt=this.editorSelections.get(ft);Dt&&(Ze.inputWidget.selections=Dt),Ze.elementDisposables.add((0,R.toDisposable)(()=>{const gt=Ze.inputWidget.selections;gt&&this.editorSelections.set(ft,gt)}));const St=()=>{const gt=Ze.inputWidget.getContentHeight(),$e=this.contentHeights.get(ft);this.contentHeights.set(ft,gt),$e!==gt&&(this.updateHeight(ft,gt+10),Ze.inputWidget.layout())},Ye=()=>{Ze.elementDisposables.add(Ze.inputWidget.onDidChangeContentHeight(St)),St()},it=(0,h.disposableTimeout)(Ye,0);Ze.elementDisposables.add(it);const ct=()=>Ze.inputWidget.layout();Ze.elementDisposables.add(this.outerLayout.onDidChange(ct)),ct()}renderCompressedElements(){throw new Error("Should never happen since node is incompressible")}disposeElement(Ne,Ge,Ze){Ze.elementDisposables.clear()}disposeTemplate(Ne){Ne.templateDisposable.dispose()}getHeight(Ne){return(this.contentHeights.get(Ne)??lo.DEFAULT_HEIGHT)+10}getRenderedInputWidget(Ne){return this.inputWidgets.get(Ne)}getFocusedInput(){for(const[Ne,Ge]of this.inputWidgets)if(Ge.hasFocus())return Ne}clearValidation(){for(const[,Ne]of this.inputWidgets)Ne.clearValidation()}};fe.DEFAULT_HEIGHT=26,fe.TEMPLATE_ID="input",fe=we([F(3,C.IInstantiationService)],fe);let ye=class uc{get templateId(){return uc.TEMPLATE_ID}constructor(Ne,Ge,Ze){this.actionViewItemProvider=Ne,this.scmViewService=Ge,this.themeService=Ze}renderTemplate(Ne){Ne.parentElement.parentElement.querySelector(".monaco-tl-twistie").classList.add("force-twistie");const Ge=(0,k.append)(Ne,(0,k.$)(".resource-group")),Ze=(0,k.append)(Ge,(0,k.$)(".name")),ft=(0,k.append)(Ge,(0,k.$)(".actions")),Dt=new s.ActionBar(ft,{actionViewItemProvider:this.actionViewItemProvider}),St=(0,k.append)(Ge,(0,k.$)(".count")),Ye=new b.CountBadge(St),it=(0,a.attachBadgeStyler)(Ye,this.themeService),ct=(0,R.combinedDisposable)(Dt,it);return{name:Ze,count:Ye,actionBar:Dt,elementDisposables:new R.DisposableStore,disposables:ct}}renderElement(Ne,Ge,Ze){const ft=Ne.element;Ze.name.textContent=ft.label,Ze.actionBar.clear(),Ze.actionBar.context=ft,Ze.count.setCount(ft.elements.length);const Dt=this.scmViewService.menus.getRepositoryMenus(ft.provider);Ze.elementDisposables.add((0,n.connectPrimaryMenuToInlineActionBar)(Dt.getResourceGroupMenu(ft),Ze.actionBar))}renderCompressedElements(Ne,Ge,Ze,ft){throw new Error("Should never happen since node is incompressible")}disposeElement(Ne,Ge,Ze){Ze.elementDisposables.clear()}disposeTemplate(Ne){Ne.elementDisposables.dispose(),Ne.disposables.dispose()}};ye.TEMPLATE_ID="resource group",ye=we([F(1,E.ISCMViewService),F(2,d.IThemeService)],ye);class ke extends l.ActionRunner{constructor(Ne){super(),this.getSelectedResources=Ne}async runAction(Ne,Ge){if(!(Ne instanceof c.MenuItemAction))return super.runAction(Ne,Ge);const Ze=this.getSelectedResources(),Dt=Ze.some(Ye=>Ye===Ge)?Ze:[Ge],St=(0,M.flatten)(Dt.map(Ye=>v.ResourceTree.isResourceNode(Ye)?v.ResourceTree.collect(Ye):[Ye]));await Ne.run(...St)}}let Ee=class hc{get templateId(){return hc.TEMPLATE_ID}constructor(Ne,Ge,Ze,ft,Dt,St,Ye){this.viewModelProvider=Ne,this.labels=Ge,this.actionViewItemProvider=Ze,this.actionRunner=ft,this.labelService=Dt,this.scmViewService=St,this.themeService=Ye,this.disposables=new R.DisposableStore,this.renderedResources=new Map,Ye.onDidColorThemeChange(this.onDidColorThemeChange,this,this.disposables)}renderTemplate(Ne){const Ge=(0,k.append)(Ne,(0,k.$)(".resource")),Ze=(0,k.append)(Ge,(0,k.$)(".name")),ft=this.labels.create(Ze,{supportDescriptionHighlights:!0,supportHighlights:!0}),Dt=(0,k.append)(ft.element,(0,k.$)(".actions")),St=new s.ActionBar(Dt,{actionViewItemProvider:this.actionViewItemProvider,actionRunner:this.actionRunner}),Ye=(0,k.append)(Ge,(0,k.$)(".decoration-icon")),it=(0,R.combinedDisposable)(St,ft);return{element:Ge,name:Ze,fileLabel:ft,decorationIcon:Ye,actionBar:St,elementDisposables:new R.DisposableStore,disposables:it}}renderElement(Ne,Ge,Ze){const ft=Ne.element,Dt=v.ResourceTree.isResourceNode(ft)?ft.element:ft,St=v.ResourceTree.isResourceNode(ft)?ft.uri:ft.sourceUri,Ye=v.ResourceTree.isResourceNode(ft)?D.FileKind.FOLDER:D.FileKind.FILE,it=this.viewModelProvider(),ct=!v.ResourceTree.isResourceNode(ft)&&ft.decorations.tooltip||"";Ze.actionBar.clear(),Ze.actionBar.context=ft;let gt,$e,Qe;if(v.ResourceTree.isResourceNode(ft))if(ft.element){const Ct=this.scmViewService.menus.getRepositoryMenus(ft.element.resourceGroup.provider);Ze.elementDisposables.add((0,n.connectPrimaryMenuToInlineActionBar)(Ct.getResourceMenu(ft.element),Ze.actionBar)),Ze.element.classList.toggle("faded",ft.element.decorations.faded),Qe=ft.element.decorations.strikeThrough}else{gt=(0,T.createMatches)(Ne.filterData);const Ct=this.scmViewService.menus.getRepositoryMenus(ft.context.provider);Ze.elementDisposables.add((0,n.connectPrimaryMenuToInlineActionBar)(Ct.getResourceFolderMenu(ft.context),Ze.actionBar)),Ze.element.classList.remove("faded")}else{[gt,$e]=this._processFilterData(St,Ne.filterData);const Ct=this.scmViewService.menus.getRepositoryMenus(ft.resourceGroup.provider);Ze.elementDisposables.add((0,n.connectPrimaryMenuToInlineActionBar)(Ct.getResourceMenu(ft),Ze.actionBar)),Ze.element.classList.toggle("faded",ft.decorations.faded),Qe=ft.decorations.strikeThrough}const tt={tooltip:ct,uri:St,fileLabelOptions:{hidePath:it.mode==="tree",fileKind:Ye,matches:gt,descriptionMatches:$e,strikethrough:Qe},iconResource:Dt};this.renderIcon(Ze,tt),this.renderedResources.set(Ze,tt),Ze.elementDisposables.add((0,R.toDisposable)(()=>this.renderedResources.delete(Ze))),Ze.element.setAttribute("data-tooltip",ct)}disposeElement(Ne,Ge,Ze){Ze.elementDisposables.clear()}renderCompressedElements(Ne,Ge,Ze,ft){const Dt=Ne.element,St=Dt.elements[Dt.elements.length-1],Ye=Dt.elements.map($e=>$e.name),it=D.FileKind.FOLDER,ct=(0,T.createMatches)(Ne.filterData);Ze.fileLabel.setResource({resource:St.uri,name:Ye},{fileDecorations:{colors:!1,badges:!0},fileKind:it,matches:ct,separator:this.labelService.getSeparator(St.uri.scheme)}),Ze.actionBar.clear(),Ze.actionBar.context=St;const gt=this.scmViewService.menus.getRepositoryMenus(St.context.provider);Ze.elementDisposables.add((0,n.connectPrimaryMenuToInlineActionBar)(gt.getResourceFolderMenu(St.context),Ze.actionBar)),Ze.name.classList.remove("strike-through"),Ze.element.classList.remove("faded"),Ze.decorationIcon.style.display="none",Ze.decorationIcon.style.backgroundImage="",Ze.element.setAttribute("data-tooltip","")}disposeCompressedElements(Ne,Ge,Ze,ft){Ze.elementDisposables.clear()}disposeTemplate(Ne){Ne.elementDisposables.dispose(),Ne.disposables.dispose()}_processFilterData(Ne,Ge){if(!Ge)return[void 0,void 0];if(!Ge.label)return[(0,T.createMatches)(Ge),void 0];const Ze=(0,p.basename)(Ne),ft=Ge.label,Dt=ft.length-Ze.length,St=(0,T.createMatches)(Ge.score);if(ft===Ze)return[St,void 0];const Ye=[],it=[];for(const ct of St)ct.start>Dt?Ye.push({start:ct.start-Dt,end:ct.end-Dt}):ct.end<Dt?it.push(ct):(Ye.push({start:0,end:ct.end-Dt}),it.push({start:ct.start,end:Dt}));return[Ye,it]}onDidColorThemeChange(){for(const[Ne,Ge]of this.renderedResources)this.renderIcon(Ne,Ge)}renderIcon(Ne,Ge){const Ze=this.themeService.getColorTheme(),ft=Ze.type===he.ColorScheme.LIGHT?Ge.iconResource?.decorations.icon:Ge.iconResource?.decorations.iconDark;Ne.fileLabel.setFile(Ge.uri,{...Ge.fileLabelOptions,fileDecorations:{colors:!1,badges:!ft}}),ft?(d.ThemeIcon.isThemeIcon(ft)?(Ne.decorationIcon.className=`decoration-icon ${d.ThemeIcon.asClassName(ft)}`,ft.color&&(Ne.decorationIcon.style.color=Ze.getColor(ft.color.id)?.toString()??""),Ne.decorationIcon.style.display="",Ne.decorationIcon.style.backgroundImage=""):(Ne.decorationIcon.className="decoration-icon",Ne.decorationIcon.style.color="",Ne.decorationIcon.style.display="",Ne.decorationIcon.style.backgroundImage=(0,k.asCSSUrl)(ft)),Ne.decorationIcon.title=Ge.tooltip):(Ne.decorationIcon.className="decoration-icon",Ne.decorationIcon.style.color="",Ne.decorationIcon.style.display="none",Ne.decorationIcon.style.backgroundImage="",Ne.decorationIcon.title="")}dispose(){this.disposables.dispose()}};Ee.TEMPLATE_ID="resource",Ee=we([F(4,Z.ILabelService),F(5,E.ISCMViewService),F(6,d.IThemeService)],Ee);class Te{constructor(Ne){this.inputRenderer=Ne}getHeight(Ne){return(0,n.isSCMInput)(Ne)?this.inputRenderer.getHeight(Ne):(0,n.isSCMActionButton)(Ne)?Pe.DEFAULT_HEIGHT+10:22}getTemplateId(Ne){return(0,n.isSCMRepository)(Ne)?de.RepositoryRenderer.TEMPLATE_ID:(0,n.isSCMInput)(Ne)?fe.TEMPLATE_ID:(0,n.isSCMActionButton)(Ne)?Pe.TEMPLATE_ID:v.ResourceTree.isResourceNode(Ne)||(0,n.isSCMResource)(Ne)?Ee.TEMPLATE_ID:ye.TEMPLATE_ID}}class _e{filter(Ne){return v.ResourceTree.isResourceNode(Ne)?!0:(0,n.isSCMResourceGroup)(Ne)?Ne.elements.length>0||!Ne.hideWhenEmpty:!0}}class Re{get viewModel(){return this.viewModelProvider()}constructor(Ne){this.viewModelProvider=Ne}compare(Ne,Ge){if((0,n.isSCMRepository)(Ne)){if(!(0,n.isSCMRepository)(Ge))throw new Error("Invalid comparison");return 0}if((0,n.isSCMInput)(Ne))return-1;if((0,n.isSCMInput)(Ge))return 1;if((0,n.isSCMActionButton)(Ne))return-1;if((0,n.isSCMActionButton)(Ge))return 1;if((0,n.isSCMResourceGroup)(Ne)){if(!(0,n.isSCMResourceGroup)(Ge))throw new Error("Invalid comparison");return 0}if(this.viewModel.mode==="list"){if(this.viewModel.sortKey==="name"){const ct=(0,p.basename)(Ne.sourceUri),gt=(0,p.basename)(Ge.sourceUri);return(0,y.compareFileNames)(ct,gt)}if(this.viewModel.sortKey==="status"){const ct=Ne.decorations.tooltip??"",gt=Ge.decorations.tooltip??"";if(ct!==gt)return(0,X.compare)(ct,gt)}const Ye=Ne.sourceUri.fsPath,it=Ge.sourceUri.fsPath;return(0,y.comparePaths)(Ye,it)}const Ze=v.ResourceTree.isResourceNode(Ne),ft=v.ResourceTree.isResourceNode(Ge);if(Ze!==ft)return Ze?-1:1;const Dt=v.ResourceTree.isResourceNode(Ne)?Ne.name:(0,p.basename)(Ne.sourceUri),St=v.ResourceTree.isResourceNode(Ge)?Ge.name:(0,p.basename)(Ge.sourceUri);return(0,y.compareFileNames)(Dt,St)}}we([O.memoize],Re.prototype,"viewModel",null),e.SCMTreeSorter=Re;let Le=class{constructor(Ne,Ge){this.viewModelProvider=Ne,this.labelService=Ge}getKeyboardNavigationLabel(Ne){if(v.ResourceTree.isResourceNode(Ne))return Ne.name;if((0,n.isSCMRepository)(Ne)||(0,n.isSCMInput)(Ne)||(0,n.isSCMActionButton)(Ne))return;if((0,n.isSCMResourceGroup)(Ne))return Ne.label;if(this.viewModelProvider().mode==="list"){const Ze=(0,p.basename)(Ne.sourceUri),ft=this.labelService.getUriLabel(Ne.sourceUri,{relative:!0});return[Ze,ft]}else return(0,p.basename)(Ne.sourceUri)}getCompressedNodeKeyboardNavigationLabel(Ne){return Ne.map(Ze=>Ze.name).join("/")}};Le=we([F(1,Z.ILabelService)],Le),e.SCMTreeKeyboardNavigationLabelProvider=Le;function Me(kt){if(v.ResourceTree.isResourceNode(kt)){const Ne=kt.context;return`folder:${Ne.provider.id}/${Ne.id}/$FOLDER/${kt.uri.toString()}`}else{if((0,n.isSCMRepository)(kt))return`repo:${kt.provider.id}`;if((0,n.isSCMInput)(kt))return`input:${kt.repository.provider.id}`;if((0,n.isSCMActionButton)(kt))return`actionButton:${kt.repository.provider.id}`;if((0,n.isSCMResource)(kt)){const Ne=kt.resourceGroup;return`resource:${Ne.provider.id}/${Ne.id}/${kt.sourceUri.toString()}`}else return`group:${kt.provider.id}/${kt.id}`}}class Oe{getId(Ne){return Me(Ne)}}let Ke=class{constructor(Ne,Ge){this.labelService=Ne,this.workspaceContextService=Ge}getWidgetAriaLabel(){return(0,L.localize)(0,null)}getAriaLabel(Ne){if(v.ResourceTree.isResourceNode(Ne))return this.labelService.getUriLabel(Ne.uri,{relative:!0,noPrefix:!0})||Ne.name;if((0,n.isSCMRepository)(Ne)){let Ge="";if(Ne.provider.rootUri){const Ze=this.workspaceContextService.getWorkspaceFolder(Ne.provider.rootUri);Ze?.uri.toString()===Ne.provider.rootUri.toString()?Ge=Ze.name:Ge=(0,p.basename)(Ne.provider.rootUri)}return`${Ge} ${Ne.provider.label}`}else{if((0,n.isSCMInput)(Ne))return(0,L.localize)(1,null);if((0,n.isSCMActionButton)(Ne))return Ne.button?.command.title??"";if((0,n.isSCMResourceGroup)(Ne))return Ne.label;{const Ge=[];Ge.push((0,p.basename)(Ne.sourceUri)),Ne.decorations.tooltip&&Ge.push(Ne.decorations.tooltip);const Ze=this.labelService.getUriLabel((0,p.dirname)(Ne.sourceUri),{relative:!0,noPrefix:!0});return Ze&&Ge.push(Ze),Ge.join(", ")}}}};Ke=we([F(0,Z.ILabelService),F(1,Ie.IWorkspaceContextService)],Ke),e.SCMAccessibilityProvider=Ke;function We(kt){return Array.isArray(kt.groupItems)}function Xe(kt,Ne,Ge){const Ze=kt.childrenCount===0&&kt.element?kt.element:kt,ft=Ge?Ge.collapsed.indexOf(Me(Ze))>-1:!1;return{element:Ze,children:m.Iterable.map(kt.children,Dt=>Xe(Dt,!1,Ge)),incompressible:!!kt.element||Ne,collapsed:ft,collapsible:kt.childrenCount>0}}var Je;(function(kt){kt.List="list",kt.Tree="tree"})(Je||(Je={}));var rt;(function(kt){kt.Path="path",kt.Name="name",kt.Status="status"})(rt||(rt={}));const je={ViewSort:new c.MenuId("SCMViewSort"),Repositories:new c.MenuId("SCMRepositories")},Ue={ViewModelMode:new u.RawContextKey("scmViewModelMode","list"),ViewModelSortKey:new u.RawContextKey("scmViewModelSortKey","path"),ViewModelAreAllRepositoriesCollapsed:new u.RawContextKey("scmViewModelAreAllRepositoriesCollapsed",!1),ViewModelIsAnyRepositoryCollapsible:new u.RawContextKey("scmViewModelIsAnyRepositoryCollapsible",!1),SCMProvider:new u.RawContextKey("scmProvider",void 0),SCMProviderRootUri:new u.RawContextKey("scmProviderRootUri",void 0),SCMProviderHasRootUri:new u.RawContextKey("scmProviderHasRootUri",void 0),RepositoryCount:new u.RawContextKey("scmRepositoryCount",0),RepositoryVisibilityCount:new u.RawContextKey("scmRepositoryVisibleCount",0),RepositoryVisibility(kt){return new u.RawContextKey(`scmRepositoryVisible:${kt.provider.id}`,!1)}};c.MenuRegistry.appendMenuItem(c.MenuId.SCMTitle,{title:(0,L.localize)(2,null),submenu:je.ViewSort,when:u.ContextKeyExpr.and(u.ContextKeyExpr.equals("view",E.VIEW_PANE_ID),Ue.RepositoryCount.notEqualsTo(0)),group:"0_view&sort"}),c.MenuRegistry.appendMenuItem(je.ViewSort,{title:(0,L.localize)(3,null),submenu:je.Repositories,group:"0_repositories"});class Fe extends c.Action2{constructor(Ne){const Ge=Ne.provider.rootUri?(0,p.basename)(Ne.provider.rootUri):Ne.provider.label;super({id:`workbench.scm.action.toggleRepositoryVisibility.${Ne.provider.id}`,title:Ge,f1:!1,precondition:u.ContextKeyExpr.or(Ue.RepositoryVisibilityCount.notEqualsTo(1),Ue.RepositoryVisibility(Ne).isEqualTo(!1)),toggled:Ue.RepositoryVisibility(Ne).isEqualTo(!0),menu:{id:je.Repositories,group:"0_repositories"}}),this.repository=Ne}run(Ne){Ne.get(E.ISCMViewService).toggleVisibility(this.repository)}}let He=class{constructor(Ne,Ge,Ze){this.scmViewService=Ne,this.contextKeyService=Ze,this.items=new Map,this.disposables=new R.DisposableStore,this.repositoryCountContextKey=Ue.RepositoryCount.bindTo(Ze),this.repositoryVisibilityCountContextKey=Ue.RepositoryVisibilityCount.bindTo(Ze),Ne.onDidChangeVisibleRepositories(this.onDidChangeVisibleRepositories,this,this.disposables),Ge.onDidAddRepository(this.onDidAddRepository,this,this.disposables),Ge.onDidRemoveRepository(this.onDidRemoveRepository,this,this.disposables);for(const ft of Ge.repositories)this.onDidAddRepository(ft)}onDidAddRepository(Ne){const Ge=(0,c.registerAction2)(class extends Fe{constructor(){super(Ne)}}),Ze=Ue.RepositoryVisibility(Ne).bindTo(this.contextKeyService);Ze.set(this.scmViewService.isVisible(Ne)),this.items.set(Ne,{contextKey:Ze,dispose(){Ze.reset(),Ge.dispose()}}),this.updateRepositoriesCounts()}onDidRemoveRepository(Ne){this.items.get(Ne)?.dispose(),this.items.delete(Ne),this.updateRepositoriesCounts()}onDidChangeVisibleRepositories(){let Ne=0;for(const[Ge,Ze]of this.items){const ft=this.scmViewService.isVisible(Ge);Ze.contextKey.set(ft),ft&&Ne++}this.repositoryCountContextKey.set(this.items.size),this.repositoryVisibilityCountContextKey.set(Ne)}updateRepositoriesCounts(){this.repositoryCountContextKey.set(this.items.size),this.repositoryVisibilityCountContextKey.set(m.Iterable.reduce(this.items.keys(),(Ne,Ge)=>Ne+(this.scmViewService.isVisible(Ge)?1:0),0))}dispose(){this.disposables.dispose(),(0,R.dispose)(this.items.values()),this.items.clear()}};He=we([F(0,E.ISCMViewService),F(1,E.ISCMService),F(2,u.IContextKeyService)],He);let Be=class{get mode(){return this._mode}set mode(Ne){if(this._mode!==Ne){this._mode=Ne;for(const[,Ge]of this.items)for(const Ze of Ge.groupItems)if(Ze.tree.clear(),Ne==="tree")for(const ft of Ze.resources)Ze.tree.add(ft.sourceUri,ft);this.sortKey=this.getViewModelSortKey(),this.refresh(),this._onDidChangeMode.fire(Ne),this.modeContextKey.set(Ne),this.storageService.store("scm.viewMode",Ne,1,0)}}get sortKey(){return this._sortKey}set sortKey(Ne){this._sortKey!==Ne&&(this._sortKey=Ne,this.refresh(),this._onDidChangeSortKey.fire(Ne),this.sortKeyContextKey.set(Ne),this._mode==="list"&&this.storageService.store("scm.viewSortKey",Ne,1,0))}get treeViewState(){return this.visible&&this._treeViewStateIsStale&&(this.updateViewState(),this._treeViewStateIsStale=!1),this._treeViewState}constructor(Ne,Ge,Ze,ft,Dt,St,Ye,it,ct){this.tree=Ne,this.inputRenderer=Ge,this.instantiationService=Ze,this.editorService=ft,this.configurationService=Dt,this.scmViewService=St,this.storageService=Ye,this.uriIdentityService=it,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 R.DisposableStore,this.alwaysShowRepositories=!1,this.showActionButton=!1,this.firstVisible=!0,this.disposables=new R.DisposableStore,this._mode=this.getViewModelMode(),this._sortKey=this.getViewModelSortKey();const gt=this.storageService.get("scm.viewState",1);if(gt)try{this._treeViewState=JSON.parse(gt)}catch{}this.modeContextKey=Ue.ViewModelMode.bindTo(ct),this.modeContextKey.set(this._mode),this.sortKeyContextKey=Ue.ViewModelSortKey.bindTo(ct),this.sortKeyContextKey.set(this._sortKey),this.areAllRepositoriesCollapsedContextKey=Ue.ViewModelAreAllRepositoriesCollapsed.bindTo(ct),this.isAnyRepositoryCollapsibleContextKey=Ue.ViewModelIsAnyRepositoryCollapsible.bindTo(ct),this.scmProviderContextKey=Ue.SCMProvider.bindTo(ct),this.scmProviderRootUriContextKey=Ue.SCMProviderRootUri.bindTo(ct),this.scmProviderHasRootUriContextKey=Ue.SCMProviderHasRootUri.bindTo(ct),Dt.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this.disposables),this.onDidChangeConfiguration(),t.Event.filter(this.tree.onDidChangeCollapseState,$e=>(0,n.isSCMRepository)($e.node.element),this.disposables)(this.updateRepositoryCollapseAllContextKeys,this,this.disposables),this.disposables.add(this.tree.onDidChangeCollapseState(()=>this._treeViewStateIsStale=!0)),this.storageService.onWillSaveState($e=>{$e.reason===N.WillSaveStateReason.SHUTDOWN&&this.storageService.store("scm.viewState",JSON.stringify(this.treeViewState),1,1)})}onDidChangeConfiguration(Ne){(!Ne||Ne.affectsConfiguration("scm.alwaysShowRepositories")||Ne.affectsConfiguration("scm.showActionButton"))&&(this.alwaysShowRepositories=this.configurationService.getValue("scm.alwaysShowRepositories"),this.showActionButton=this.configurationService.getValue("scm.showActionButton"),this.refresh())}_onDidChangeVisibleRepositories({added:Ne,removed:Ge}){for(const Ze of Ne){const ft=(0,R.combinedDisposable)(Ze.provider.groups.onDidSplice(Ye=>this._onDidSpliceGroups(St,Ye)),Ze.input.onDidChangeVisibility(()=>this.refresh(St)),Ze.provider.onDidChange(()=>{this.showActionButton&&this.refresh(St)})),Dt=Ze.provider.groups.elements.map(Ye=>this.createGroupItem(Ye)),St={element:Ze,groupItems:Dt,dispose(){(0,R.dispose)(this.groupItems),ft.dispose()}};this.items.set(Ze,St)}for(const Ze of Ge)this.items.get(Ze).dispose(),this.items.delete(Ze);this.refresh()}_onDidSpliceGroups(Ne,{start:Ge,deleteCount:Ze,toInsert:ft}){const Dt=ft.map(Ye=>this.createGroupItem(Ye)),St=Ne.groupItems.splice(Ge,Ze,...Dt);for(const Ye of St)Ye.dispose();this.refresh()}createGroupItem(Ne){const Ge=new v.ResourceTree(Ne,Ne.provider.rootUri||w.URI.file("/"),this.uriIdentityService.extUri),Ze=[...Ne.elements],ft=(0,R.combinedDisposable)(Ne.onDidChange(()=>this.tree.refilter()),Ne.onDidSplice(St=>this._onDidSpliceGroup(Dt,St))),Dt={element:Ne,resources:Ze,tree:Ge,dispose(){ft.dispose()}};if(this._mode==="tree")for(const St of Ze)Dt.tree.add(St.sourceUri,St);return Dt}_onDidSpliceGroup(Ne,{start:Ge,deleteCount:Ze,toInsert:ft}){const Dt=Ne.resources.length,St=Ne.resources.splice(Ge,Ze,...ft),Ye=Ne.resources.length;if(this._mode==="tree"){for(const it of St)Ne.tree.delete(it.sourceUri);for(const it of ft)Ne.tree.add(it.sourceUri,it)}Dt!==Ye&&(Dt===0||Ye===0)?this.refresh():this.refresh(Ne)}setVisible(Ne){Ne?(this.visibilityDisposables=new R.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=Ne,this.updateRepositoryCollapseAllContextKeys()}refresh(Ne){if(!this.alwaysShowRepositories&&this.items.size===1){const Ze=m.Iterable.first(this.items.values()).element.provider;this.scmProviderContextKey.set(Ze.contextValue),this.scmProviderRootUriContextKey.set(Ze.rootUri?.toString()),this.scmProviderHasRootUriContextKey.set(!!Ze.rootUri)}else this.scmProviderContextKey.set(void 0),this.scmProviderRootUriContextKey.set(void 0),this.scmProviderHasRootUriContextKey.set(!1);const Ge=this.inputRenderer.getFocusedInput();if(!this.alwaysShowRepositories&&this.items.size===1&&(!Ne||We(Ne))){const Ze=m.Iterable.first(this.items.values());this.tree.setChildren(null,this.render(Ze,this.treeViewState).children)}else if(Ne)this.tree.setChildren(Ne.element,this.render(Ne,this.treeViewState).children);else{const Ze=(0,M.coalesce)(this.scmViewService.visibleRepositories.map(ft=>this.items.get(ft)));this.tree.setChildren(null,Ze.map(ft=>this.render(ft,this.treeViewState)))}Ge&&this.inputRenderer.getRenderedInputWidget(Ge)?.focus(),this.updateRepositoryCollapseAllContextKeys()}render(Ne,Ge){if(We(Ne)){const Ze=[],ft=Ne.groupItems.some(St=>St.element.elements.length>0);if(Ne.element.input.visible&&Ze.push({element:Ne.element.input,incompressible:!0,collapsible:!1}),(ft||this.items.size===1&&(!this.showActionButton||!Ne.element.provider.actionButton))&&Ze.push(...Ne.groupItems.map(St=>this.render(St,Ge))),this.showActionButton&&Ne.element.provider.actionButton){const St={element:{type:"actionButton",repository:Ne.element,button:Ne.element.provider.actionButton},incompressible:!0,collapsible:!1};Ze.push(St)}const Dt=Ge?Ge.collapsed.indexOf(Me(Ne.element))>-1:!1;return{element:Ne.element,children:Ze,incompressible:!0,collapsed:Dt,collapsible:!0}}else{const Ze=this.mode==="list"?m.Iterable.map(Ne.resources,Dt=>({element:Dt,incompressible:!0})):m.Iterable.map(Ne.tree.root.children,Dt=>Xe(Dt,!0,Ge)),ft=Ge?Ge.collapsed.indexOf(Me(Ne.element))>-1:!1;return{element:Ne.element,children:Ze,incompressible:!0,collapsed:ft,collapsible:!0}}}updateViewState(){const Ne=[],Ge=Ze=>{Ze.element&&Ze.collapsible&&Ze.collapsed&&Ne.push(Me(Ze.element));for(const ft of Ze.children)Ge(ft)};Ge(this.tree.getNode()),this._treeViewState={collapsed:Ne}}onDidActiveEditorChange(){if(!this.configurationService.getValue("scm.autoReveal"))return;if(this.firstVisible){this.firstVisible=!1,this.visibilityDisposables.add((0,h.disposableTimeout)(()=>this.onDidActiveEditorChange(),250));return}const Ne=P.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:P.SideBySideEditor.PRIMARY});if(!!Ne)for(const Ge of this.scmViewService.visibleRepositories){const Ze=this.items.get(Ge);if(!!Ze)for(let ft=Ze.groupItems.length-1;ft>=0;ft--){const Dt=Ze.groupItems[ft],St=this.mode==="tree"?Dt.tree.getNode(Ne)?.element:Dt.resources.find(Ye=>this.uriIdentityService.extUri.isEqual(Ye.sourceUri,Ne));if(St){this.tree.reveal(St),this.tree.setSelection([St]),this.tree.setFocus([St]);return}}}}focus(){if(this.tree.getFocus().length===0)for(const Ne of this.scmViewService.visibleRepositories){const Ge=this.inputRenderer.getRenderedInputWidget(Ne.input);if(Ge){Ge.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(Ne=>this.tree.hasElement(Ne)&&this.tree.isCollapsible(Ne))),this.areAllRepositoriesCollapsedContextKey.set(this.scmViewService.visibleRepositories.every(Ne=>this.tree.hasElement(Ne)&&(!this.tree.isCollapsible(Ne)||this.tree.isCollapsed(Ne))))}collapseAllRepositories(){for(const Ne of this.scmViewService.visibleRepositories)this.tree.isCollapsible(Ne)&&this.tree.collapse(Ne)}expandAllRepositories(){for(const Ne of this.scmViewService.visibleRepositories)this.tree.isCollapsible(Ne)&&this.tree.expand(Ne)}getViewModelMode(){let Ne=this.configurationService.getValue("scm.defaultViewMode")==="list"?"list":"tree";const Ge=this.storageService.get("scm.viewMode",1);return typeof Ge=="string"&&(Ne=Ge),Ne}getViewModelSortKey(){if(this._mode==="tree")return"path";let Ne;switch(this.configurationService.getValue("scm.defaultViewSortKey")){case"name":Ne="name";break;case"status":Ne="status";break;default:Ne="path";break}const Ze=this.storageService.get("scm.viewSortKey",1);return typeof Ze=="string"&&(Ne=Ze),Ne}dispose(){this.visibilityDisposables.dispose(),this.disposables.dispose(),(0,R.dispose)(this.items.values()),this.items.clear()}};Be=we([F(2,C.IInstantiationService),F(3,S.IEditorService),F(4,g.IConfigurationService),F(5,E.ISCMViewService),F(6,N.IStorageService),F(7,pe.IUriIdentityService),F(8,u.IContextKeyService)],Be);class ze extends A.ViewAction{constructor(Ne={}){super({id:"workbench.scm.action.setListViewMode",title:(0,L.localize)(4,null),viewId:E.VIEW_PANE_ID,f1:!1,icon:ce.Codicon.listFlat,toggled:Ue.ViewModelMode.isEqualTo("list"),menu:{id:je.ViewSort,group:"1_viewmode",...Ne}})}async runInView(Ne,Ge){Ge.viewModel.mode="list"}}class nt extends ze{constructor(){super({id:c.MenuId.SCMTitle,when:u.ContextKeyExpr.and(u.ContextKeyExpr.equals("view",E.VIEW_PANE_ID),Ue.RepositoryCount.notEqualsTo(0),Ue.ViewModelMode.isEqualTo("tree")),group:"navigation",order:-1e3})}}class ut extends A.ViewAction{constructor(Ne={}){super({id:"workbench.scm.action.setTreeViewMode",title:(0,L.localize)(5,null),viewId:E.VIEW_PANE_ID,f1:!1,icon:ce.Codicon.listTree,toggled:Ue.ViewModelMode.isEqualTo("tree"),menu:{id:je.ViewSort,group:"1_viewmode",...Ne}})}async runInView(Ne,Ge){Ge.viewModel.mode="tree"}}class ot extends ut{constructor(){super({id:c.MenuId.SCMTitle,when:u.ContextKeyExpr.and(u.ContextKeyExpr.equals("view",E.VIEW_PANE_ID),Ue.RepositoryCount.notEqualsTo(0),Ue.ViewModelMode.isEqualTo("list")),group:"navigation",order:-1e3})}}(0,c.registerAction2)(ze),(0,c.registerAction2)(ut),(0,c.registerAction2)(nt),(0,c.registerAction2)(ot);class at extends A.ViewAction{constructor(Ne,Ge){super({id:`workbench.scm.action.repositories.setSortKey.${Ne}`,title:Ge,viewId:E.VIEW_PANE_ID,f1:!1,toggled:ue.RepositoryContextKeys.RepositorySortKey.isEqualTo(Ne),menu:[{id:je.Repositories,group:"1_sort"},{id:c.MenuId.ViewTitle,when:u.ContextKeyExpr.equals("view",E.REPOSITORIES_VIEW_PANE_ID),group:"1_sort"}]}),this.sortKey=Ne}runInView(Ne){Ne.get(E.ISCMViewService).toggleSortKey(this.sortKey)}}class wt extends at{constructor(){super("discoveryTime",(0,L.localize)(6,null))}}class It extends at{constructor(){super("name",(0,L.localize)(7,null))}}class _t extends at{constructor(){super("path",(0,L.localize)(8,null))}}(0,c.registerAction2)(wt),(0,c.registerAction2)(It),(0,c.registerAction2)(_t);class lt extends A.ViewAction{constructor(Ne,Ge){super({id:`workbench.scm.action.setSortKey.${Ne}`,title:Ge,viewId:E.VIEW_PANE_ID,f1:!1,toggled:Ue.ViewModelSortKey.isEqualTo(Ne),precondition:Ue.ViewModelMode.isEqualTo("list"),menu:{id:je.ViewSort,group:"2_sort"}}),this.sortKey=Ne}async runInView(Ne,Ge){Ge.viewModel.sortKey=this.sortKey}}class pt extends lt{constructor(){super("name",(0,L.localize)(9,null))}}class st extends lt{constructor(){super("path",(0,L.localize)(10,null))}}class qe extends lt{constructor(){super("status",(0,L.localize)(11,null))}}(0,c.registerAction2)(pt),(0,c.registerAction2)(st),(0,c.registerAction2)(qe);class Et extends A.ViewAction{constructor(){super({id:"workbench.scm.action.collapseAllRepositories",title:(0,L.localize)(12,null),viewId:E.VIEW_PANE_ID,f1:!1,icon:ce.Codicon.collapseAll,menu:{id:c.MenuId.SCMTitle,group:"navigation",when:u.ContextKeyExpr.and(u.ContextKeyExpr.equals("view",E.VIEW_PANE_ID),Ue.ViewModelIsAnyRepositoryCollapsible.isEqualTo(!0),Ue.ViewModelAreAllRepositoriesCollapsed.isEqualTo(!1))}})}async runInView(Ne,Ge){Ge.viewModel.collapseAllRepositories()}}class Tt extends A.ViewAction{constructor(){super({id:"workbench.scm.action.expandAllRepositories",title:(0,L.localize)(13,null),viewId:E.VIEW_PANE_ID,f1:!1,icon:ce.Codicon.expandAll,menu:{id:c.MenuId.SCMTitle,group:"navigation",when:u.ContextKeyExpr.and(u.ContextKeyExpr.equals("view",E.VIEW_PANE_ID),Ue.ViewModelIsAnyRepositoryCollapsible.isEqualTo(!0),Ue.ViewModelAreAllRepositoriesCollapsed.isEqualTo(!0))}})}async runInView(Ne,Ge){Ge.viewModel.expandAllRepositories()}}(0,c.registerAction2)(Et),(0,c.registerAction2)(Tt);let xt=class gc{get input(){return this.model?.input}set input(Ne){if(Ne===this.input)return;if(this.clearValidation(),this.editorContainer.classList.remove("synthetic-focus"),this.repositoryDisposables.dispose(),this.repositoryDisposables=new R.DisposableStore,this.repositoryIdContextKey.set(Ne?.repository.id),!Ne){this.model?.textModel.dispose(),this.inputEditor.setModel(void 0),this.model=void 0;return}let Ge;Ne.repository.provider.rootUri&&(Ge=`rootUri=${encodeURIComponent(Ne.repository.provider.rootUri.toString())}`);const Ze=w.URI.from({scheme:K.Schemas.vscodeSourceControl,path:`${Ne.repository.provider.contextValue}/${Ne.repository.provider.id}/input`,query:Ge});this.configurationService.getValue("editor.wordBasedSuggestions",{resource:Ze})!==!1&&this.configurationService.updateValue("editor.wordBasedSuggestions",!1,{resource:Ze},8);const ft=this.modelService.getModel(Ze)??this.modelService.createModel("",this.languageService.createById("scminput"),Ze);this.inputEditor.setModel(ft);const Dt=new h.ThrottledDelayer(200),St=async()=>{const bt=this.inputEditor.getSelection()?.getStartPosition(),Rt=bt&&ft.getOffsetAt(bt),Mt=ft.getValue();this.setValidation(await Ne.validateInput(Mt,Rt||0))},Ye=()=>Dt.trigger(St);this.repositoryDisposables.add(Dt),this.repositoryDisposables.add(this.inputEditor.onDidChangeCursorPosition(Ye));const it=this.modelService.getCreationOptions(ft.getLanguageId(),ft.uri,ft.isForSimpleWidget),ct=t.Event.filter(this.inputEditor.onKeyDown,bt=>bt.keyCode===3,this.repositoryDisposables);this.repositoryDisposables.add(ct(()=>ft.detectIndentation(it.insertSpaces,it.tabSize))),ft.setValue(Ne.value),this.repositoryDisposables.add(Ne.onDidChange(({value:bt,reason:Rt})=>{if(bt===ft.getValue())return;ft.setValue(bt);const Mt=Rt===E.SCMInputChangeReason.HistoryPrevious?ft.getFullModelRange().getStartPosition():ft.getFullModelRange().getEndPosition();this.inputEditor.setPosition(Mt),this.inputEditor.revealPositionInCenterIfOutsideViewport(Mt)})),this.repositoryDisposables.add(Ne.onDidChangeFocus(()=>this.focus())),this.repositoryDisposables.add(Ne.onDidChangeValidationMessage(bt=>this.setValidation(bt,{focus:!0,timeout:!0}))),this.repositoryDisposables.add(Ne.onDidChangeValidateInput(bt=>Ye()));const gt=()=>this.placeholderTextContainer.classList.toggle("hidden",ft.getValueLength()>0);this.repositoryDisposables.add(ft.onDidChangeContent(()=>{Ne.setValue(ft.getValue(),!0),gt(),Ye()})),gt();const $e=()=>{const bt=this.keybindingService.lookupKeybinding("scm.acceptInput"),Rt=bt?bt.getLabel():q.isMacintosh?"Cmd+Enter":"Ctrl+Enter",Mt=(0,X.format)(Ne.placeholder,Rt);this.inputEditor.updateOptions({ariaLabel:Mt}),this.placeholderTextContainer.textContent=Mt};this.repositoryDisposables.add(Ne.onDidChangePlaceholder($e)),this.repositoryDisposables.add(this.keybindingService.onDidUpdateKeybindings($e)),$e();let Qe="";const tt=()=>{if(typeof Ne.repository.provider.commitTemplate>"u"||!Ne.visible)return;const bt=Qe;Qe=Ne.repository.provider.commitTemplate;const Rt=ft.getValue();Rt&&Rt!==bt||ft.setValue(Qe)};this.repositoryDisposables.add(Ne.repository.provider.onDidChangeCommitTemplate(tt,this)),tt();const Ct=bt=>{this.inputEditor.updateOptions({readOnly:!bt})};this.repositoryDisposables.add(Ne.onDidChangeEnablement(bt=>Ct(bt))),Ct(Ne.enabled),this.model={input:Ne,textModel:ft}}get selections(){return this.inputEditor.getSelections()}set selections(Ne){Ne&&this.inputEditor.setSelections(Ne)}setValidation(Ne,Ge){this._validationTimer&&(clearTimeout(this._validationTimer),this._validationTimer=0),this.validation=Ne,this.renderValidation(),Ge?.focus&&!this.hasFocus()&&this.focus(),Ne&&Ge?.timeout&&(this._validationTimer=setTimeout(()=>this.setValidation(void 0),gc.ValidationTimeouts[Ne.type]))}constructor(Ne,Ge,Ze,ft,Dt,St,Ye,it,ct,gt,$e){this.modelService=ft,this.languageService=Dt,this.keybindingService=St,this.configurationService=Ye,this.instantiationService=it,this.scmViewService=ct,this.contextViewService=gt,this.openerService=$e,this.defaultInputFontFamily=ne.DEFAULT_FONT_FAMILY,this.disposables=new R.DisposableStore,this.repositoryDisposables=new R.DisposableStore,this.validationDisposable=R.Disposable.None,this.validationHasFocus=!1,this.lastLayoutWasTrash=!1,this.shouldFocusAfterLayout=!1,this.element=(0,k.append)(Ne,(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 Qe=this.getInputEditorFontFamily(),tt=this.getInputEditorFontSize(),Ct=this.computeLineHeight(tt),bt=this.configurationService.getValue("editor.accessibilitySupport");this.setPlaceholderFontStyles(Qe,tt,Ct);const Rt=Ze.createScoped(this.element);this.repositoryIdContextKey=Rt.createKey("scmRepository",void 0);const Mt={...(0,z.getSimpleEditorOptions)(),lineDecorationsWidth:4,dragAndDrop:!0,cursorWidth:1,fontSize:tt,lineHeight:Ct,fontFamily:Qe,wrappingStrategy:"advanced",wrappingIndent:"none",padding:{top:3,bottom:3},quickSuggestions:!1,scrollbar:{alwaysConsumeMouseWheel:!1},overflowWidgetsDomNode:Ge,renderWhitespace:"none",dropIntoEditor:{enabled:!0},accessibilitySupport:bt},Ft={isSimpleWidget:!0,contributions:H.EditorExtensionsRegistry.getSomeEditorContributions([ie.ColorDetector.ID,$.ContextMenuController.ID,Ce.DragAndDropController.ID,De.DropIntoEditorController.ID,re.LinkDetector.ID,W.MenuPreventer.ID,Ae.MessageController.ID,ee.ModesHoverController.ID,U.SelectionClipboardContributionID,j.SnippetController2.ID,Q.SuggestController.ID])},zt=new Y.ServiceCollection([u.IContextKeyService,Rt]),Bt=it.createChild(zt);this.inputEditor=Bt.createInstance(V.CodeEditorWidget,this.editorContainer,Mt,Ft),this.disposables.add(this.inputEditor),this.disposables.add(this.inputEditor.onDidFocusEditorText(()=>{this.input?.repository&&this.scmViewService.focus(this.input.repository),this.editorContainer.classList.add("synthetic-focus"),this.renderValidation()})),this.disposables.add(this.inputEditor.onDidBlurEditorText(()=>{this.editorContainer.classList.remove("synthetic-focus"),setTimeout(()=>{(!this.validation||!this.validationHasFocus)&&this.clearValidation()},0)}));const qt=Rt.createKey("scmInputIsInFirstPosition",!1),Xt=Rt.createKey("scmInputIsInLastPosition",!1);this.disposables.add(this.inputEditor.onDidChangeCursorPosition(({position:Qt})=>{const $t=this.inputEditor._getViewModel(),ii=$t.getLineCount(),Lt=$t.getLineContent(ii).length+1,dt=$t.coordinatesConverter.convertModelPositionToViewPosition(Qt);qt.set(dt.lineNumber===1&&dt.column===1),Xt.set(dt.lineNumber===ii&&dt.column===Lt)}));const Yt=["scm.inputFontFamily","editor.fontFamily","scm.inputFontSize","editor.accessibilitySupport"],ei=t.Event.filter(this.configurationService.onDidChangeConfiguration,Qt=>{for(const $t of Yt)if(Qt.affectsConfiguration($t))return!0;return!1},this.disposables);this.disposables.add(ei(()=>{const Qt=this.getInputEditorFontFamily(),$t=this.getInputEditorFontSize(),ii=this.computeLineHeight($t),Lt=this.configurationService.getValue("editor.accessibilitySupport");this.inputEditor.updateOptions({fontFamily:Qt,fontSize:$t,lineHeight:ii,accessibilitySupport:Lt}),this.setPlaceholderFontStyles(Qt,$t,ii)})),this.onDidChangeContentHeight=t.Event.signal(t.Event.filter(this.inputEditor.onDidContentSizeChange,Qt=>Qt.contentHeightChanged,this.disposables))}getContentHeight(){const Ne=this.inputEditor.getContentHeight();return Math.min(Ne,134)}layout(){const Ne=this.getContentHeight(),Ge=new k.Dimension(this.element.clientWidth-2,Ne);if(Ge.width<0){this.lastLayoutWasTrash=!0;return}this.lastLayoutWasTrash=!1,this.inputEditor.layout(Ge),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 Ne=new R.DisposableStore;this.validationDisposable=this.contextViewService.showContextView({getAnchor:()=>this.editorContainer,render:Ge=>{const Ze=(0,k.append)(Ge,(0,k.$)(".scm-editor-validation-container"));Ze.classList.toggle("validation-info",this.validation.type===2),Ze.classList.toggle("validation-warning",this.validation.type===1),Ze.classList.toggle("validation-error",this.validation.type===0),Ze.style.width=`${this.editorContainer.clientWidth}px`;const ft=(0,k.append)(Ze,(0,k.$)(".scm-editor-validation")),Dt=this.validation.message;if(typeof Dt=="string")ft.textContent=Dt;else{const ct=(0,k.trackFocus)(ft);Ne.add(ct),Ne.add(ct.onDidFocus(()=>this.validationHasFocus=!0)),Ne.add(ct.onDidBlur(()=>{this.validationHasFocus=!1,this.contextViewService.hideContextView()}));const $e=Ne.add(this.instantiationService.createInstance(ve.MarkdownRenderer,{})).render(Dt,{actionHandler:{callback:Qe=>{(0,ve.openLinkFromMarkdown)(this.openerService,Qe,Dt.isTrusted),this.contextViewService.hideContextView()},disposables:Ne}});Ne.add($e),ft.appendChild($e.element)}const St=(0,k.append)(Ze,(0,k.$)(".scm-editor-validation-actions")),Ye=new s.ActionBar(St),it=new l.Action("scmInputWidget.validationMessage.close",(0,L.localize)(14,null),ce.Codicon.close.classNames,!0,()=>{this.contextViewService.hideContextView()});return Ne.add(Ye),Ye.push(it,{icon:!0,label:!1}),R.Disposable.None},onHide:()=>{this.validationHasFocus=!1,Ne.dispose()},anchorAlignment:0})}getInputEditorFontFamily(){const Ne=this.configurationService.getValue("scm.inputFontFamily").trim();return Ne.toLowerCase()==="editor"?this.configurationService.getValue("editor.fontFamily").trim():Ne.length!==0&&Ne.toLowerCase()!=="default"?Ne:this.defaultInputFontFamily}getInputEditorFontSize(){return this.configurationService.getValue("scm.inputFontSize")}computeLineHeight(Ne){return Math.round(Ne*1.5)}setPlaceholderFontStyles(Ne,Ge,Ze){this.placeholderTextContainer.style.fontFamily=Ne,this.placeholderTextContainer.style.fontSize=`${Ge}px`,this.placeholderTextContainer.style.lineHeight=`${Ze}px`}clearValidation(){this.validationDisposable.dispose(),this.validationHasFocus=!1}dispose(){this.input=void 0,this.repositoryDisposables.dispose(),this.clearValidation(),this.disposables.dispose()}};xt.ValidationTimeouts={[2]:5e3,[1]:8e3,[0]:1e4},xt=we([F(2,u.IContextKeyService),F(3,x.IModelService),F(4,te.ILanguageService),F(5,f.IKeybindingService),F(6,g.IConfigurationService),F(7,C.IInstantiationService),F(8,E.ISCMViewService),F(9,r.IContextViewService),F(10,oe.IOpenerService)],xt),(0,d.registerThemingParticipant)((kt,Ne)=>{const Ge=kt.getColor(G.textLinkForeground);Ge&&Ne.addRule(`.scm-editor-validation a { color: ${Ge}; }`);const Ze=kt.getColor(G.textLinkActiveForeground);Ze&&Ne.addRule(`.scm-editor-validation a:active, .scm-editor-validation a:hover { color: ${Ze}; }`)});let At=class extends A.ViewPane{get viewModel(){return this._viewModel}constructor(Ne,Ge,Ze,ft,Dt,St,Ye,it,ct,gt,$e,Qe,tt,Ct,bt){super({...Ne,titleMenuId:c.MenuId.SCMTitle},ft,St,$e,Qe,gt,ct,Ct,Dt,bt),this.scmService=Ge,this.scmViewService=Ze,this.commandService=Ye,this.editorService=it,this.menuService=tt,this.disposables=new R.DisposableStore,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()))}renderBody(Ne){super.renderBody(Ne),this.listContainer=(0,k.append)(Ne,(0,k.$)(".scm-view.show-file-icons"));const Ge=(0,k.$)(".scm-overflow-widgets-container.monaco-editor"),Ze=()=>this.listContainer.classList.toggle("show-actions",this.configurationService.getValue("scm.alwaysShowActions"));this._register(t.Event.filter(this.configurationService.onDidChangeConfiguration,Qe=>Qe.affectsConfiguration("scm.alwaysShowActions"),this.disposables)(Ze)),Ze();const ft=()=>{const Qe=this.configurationService.getValue("scm.providerCountBadge");this.listContainer.classList.toggle("hide-provider-counts",Qe==="hidden"),this.listContainer.classList.toggle("auto-provider-counts",Qe==="auto")};this._register(t.Event.filter(this.configurationService.onDidChangeConfiguration,Qe=>Qe.affectsConfiguration("scm.providerCountBadge"),this.disposables)(ft)),ft(),this.inputRenderer=this.instantiationService.createInstance(fe,this.layoutCache,Ge,(Qe,tt)=>this.tree.updateElementHeight(Qe,tt));const Dt=new Te(this.inputRenderer);this.actionButtonRenderer=this.instantiationService.createInstance(Pe),this.listLabels=this.instantiationService.createInstance(I.ResourceLabels,{onDidChangeVisibility:this.onDidChangeBodyVisibility}),this._register(this.listLabels);const St=new ke(()=>this.getSelectedResources());this._register(St),this._register(St.onWillRun(()=>this.tree.domFocus()));const Ye=[this.instantiationService.createInstance(de.RepositoryRenderer,(0,n.getActionViewItemProvider)(this.instantiationService)),this.inputRenderer,this.actionButtonRenderer,this.instantiationService.createInstance(ye,(0,n.getActionViewItemProvider)(this.instantiationService)),this._register(this.instantiationService.createInstance(Ee,()=>this._viewModel,this.listLabels,(0,n.getActionViewItemProvider)(this.instantiationService),St))],it=new _e,ct=new Re(()=>this._viewModel),gt=this.instantiationService.createInstance(Le,()=>this._viewModel),$e=new Oe;this.tree=this.instantiationService.createInstance(o.WorkbenchCompressibleObjectTree,"SCM Tree Repo",this.listContainer,Dt,Ye,{transformOptimization:!1,identityProvider:$e,horizontalScrolling:!1,setRowLineHeight:!1,filter:it,sorter:ct,keyboardNavigationLabelProvider:gt,overrideStyles:{listBackground:this.viewDescriptorService.getViewLocationById(this.id)===1?B.PANEL_BACKGROUND:B.SIDE_BAR_BACKGROUND},accessibilityProvider:this.instantiationService.createInstance(Ke)}),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,Ge),this._register(this.instantiationService.createInstance(He)),this._viewModel=this.instantiationService.createInstance(Be,this.tree,this.inputRenderer),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.onDidChangeBodyVisibility(this._viewModel.setVisible,this._viewModel)),this._register(t.Event.filter(this.configurationService.onDidChangeConfiguration,Qe=>Qe.affectsConfiguration("scm.alwaysShowRepositories"),this.disposables)(this.updateActions,this)),this.updateActions()}updateIndentStyles(Ne){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"&&Ne.hasFileIcons||Ne.hasFileIcons&&!Ne.hasFolderIcons),this.listContainer.classList.toggle("hide-arrows",this._viewModel.mode==="tree"&&Ne.hidesExplorerArrows===!0)}onDidChangeMode(){this.updateIndentStyles(this.themeService.getFileIconTheme())}layoutBody(Ne=this.layoutCache.height,Ge=this.layoutCache.width){Ne!==void 0&&(Ge!==void 0&&super.layoutBody(Ne,Ge),this.layoutCache.height=Ne,this.layoutCache.width=Ge,this._onDidLayout.fire(),this.listContainer.style.height=`${Ne}px`,this.tree.layout(Ne,Ge))}focus(){super.focus(),this.isExpanded()&&this._viewModel.focus()}async open(Ne){if(Ne.element){if((0,n.isSCMRepository)(Ne.element)){this.scmViewService.focus(Ne.element);return}else if((0,n.isSCMResourceGroup)(Ne.element)){const ft=Ne.element.provider,Dt=m.Iterable.find(this.scmService.repositories,St=>St.provider===ft);Dt&&this.scmViewService.focus(Dt);return}else if(v.ResourceTree.isResourceNode(Ne.element)){const ft=Ne.element.context.provider,Dt=m.Iterable.find(this.scmService.repositories,St=>St.provider===ft);Dt&&this.scmViewService.focus(Dt);return}else if((0,n.isSCMInput)(Ne.element)){this.scmViewService.focus(Ne.element.repository);const ft=this.inputRenderer.getRenderedInputWidget(Ne.element);if(ft){ft.focus(),this.tree.setFocus([],Ne.browserEvent);const Dt=this.tree.getSelection();Dt.length===1&&Dt[0]===Ne.element&&setTimeout(()=>this.tree.setSelection([]))}return}else if((0,n.isSCMActionButton)(Ne.element)){this.scmViewService.focus(Ne.element.repository);const ft=Ne.browserEvent?.target;(ft.classList.contains("monaco-tl-row")||ft.classList.contains("button-container"))&&(this.actionButtonRenderer.focusActionButton(Ne.element),this.tree.setFocus([],Ne.browserEvent));return}}else return;if(Ne.element.command?.id===me.API_OPEN_EDITOR_COMMAND_ID||Ne.element.command?.id===me.API_OPEN_DIFF_EDITOR_COMMAND_ID)await this.commandService.executeCommand(Ne.element.command.id,...Ne.element.command.arguments||[],Ne);else if(await Ne.element.open(!!Ne.editorOptions.preserveFocus),Ne.editorOptions.pinned){const ft=this.editorService.activeEditorPane;ft?.group.pinEditor(ft.input)}const Ge=Ne.element.resourceGroup.provider,Ze=m.Iterable.find(this.scmService.repositories,ft=>ft.provider===Ge);Ze&&this.scmViewService.focus(Ze)}onListContextMenu(Ne){if(!Ne.element){const St=this.menuService.createMenu(je.ViewSort,this.contextKeyService),Ye=[];return(0,Se.createAndFillInContextMenuActions)(St,void 0,Ye),this.contextMenuService.showContextMenu({getAnchor:()=>Ne.anchor,getActions:()=>Ye,onHide:()=>{St.dispose()}})}const Ge=Ne.element;let Ze=Ge,ft=[];if((0,n.isSCMRepository)(Ge)){const Ye=this.scmViewService.menus.getRepositoryMenus(Ge.provider).repositoryMenu;Ze=Ge.provider,ft=(0,n.collectContextMenuActions)(Ye)}else if(!((0,n.isSCMInput)(Ge)||(0,n.isSCMActionButton)(Ge)))if((0,n.isSCMResourceGroup)(Ge)){const Ye=this.scmViewService.menus.getRepositoryMenus(Ge.provider).getResourceGroupMenu(Ge);ft=(0,n.collectContextMenuActions)(Ye)}else if(v.ResourceTree.isResourceNode(Ge))if(Ge.element){const Ye=this.scmViewService.menus.getRepositoryMenus(Ge.element.resourceGroup.provider).getResourceMenu(Ge.element);ft=(0,n.collectContextMenuActions)(Ye)}else{const Ye=this.scmViewService.menus.getRepositoryMenus(Ge.context.provider).getResourceFolderMenu(Ge.context);ft=(0,n.collectContextMenuActions)(Ye)}else{const Ye=this.scmViewService.menus.getRepositoryMenus(Ge.resourceGroup.provider).getResourceMenu(Ge);ft=(0,n.collectContextMenuActions)(Ye)}const Dt=new ke(()=>this.getSelectedResources());Dt.onWillRun(()=>this.tree.domFocus()),this.contextMenuService.showContextMenu({getAnchor:()=>Ne.anchor,getActions:()=>ft,getActionsContext:()=>Ze,actionRunner:Dt})}getSelectedResources(){return this.tree.getSelection().filter(Ne=>!!Ne&&!(0,n.isSCMResourceGroup)(Ne))}shouldShowWelcome(){return this.scmService.repositoryCount===0}getActionsContext(){return this.scmViewService.visibleRepositories.length===1?this.scmViewService.visibleRepositories[0].provider:void 0}dispose(){this.disposables.dispose(),super.dispose()}};At=we([F(1,E.ISCMService),F(2,E.ISCMViewService),F(3,f.IKeybindingService),F(4,d.IThemeService),F(5,r.IContextMenuService),F(6,i.ICommandService),F(7,S.IEditorService),F(8,C.IInstantiationService),F(9,_.IViewDescriptorService),F(10,g.IConfigurationService),F(11,u.IContextKeyService),F(12,c.IMenuService),F(13,oe.IOpenerService),F(14,se.ITelemetryService)],At),e.SCMViewPane=At,e.scmProviderSeparatorBorderColor=(0,G.registerColor)("scm.providerBorder",{dark:"#454545",light:"#C8C8C8",hcDark:G.contrastBorder,hcLight:G.contrastBorder},(0,L.localize)(15,null)),(0,d.registerThemingParticipant)((kt,Ne)=>{const Ge=kt.getColor(G.inputBackground);Ge&&Ne.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: ${Ge} !important; }`);const Ze=kt.getColor(G.selectionBackground)??kt.getColor(G.editorSelectionBackground);Ze&&Ne.addRule(`.scm-view .scm-editor-container .monaco-editor .focused .selected-text { background-color: ${Ze}; }`);const ft=kt.getColor(G.inputForeground);ft&&Ne.addRule(`.scm-view .scm-editor-container .mtk1 { color: ${ft}; }`);const Dt=kt.getColor(G.inputBorder);Dt&&Ne.addRule(`.scm-view .scm-editor-container { outline: 1px solid ${Dt}; }`);const St=kt.getColor(B.PANEL_INPUT_BORDER);St&&Ne.addRule(`.monaco-workbench .part.panel .scm-view .scm-editor-container { outline: 1px solid ${St}; }`);const Ye=kt.getColor(G.buttonBorder);Ne.addRule(`.scm-view .button-container .monaco-description-button { height: ${Ye?"32px":"30px"}; }`);const it=kt.getColor(G.focusBorder);it&&Ne.addRule(`.scm-view .scm-editor-container.synthetic-focus { outline: 1px solid ${it}; }`);const ct=kt.getColor(G.inputPlaceholderForeground);ct&&Ne.addRule(`.scm-view .scm-editor-placeholder { color: ${ct}; }`);const gt=kt.getColor(G.inputValidationInfoBorder);gt&&(Ne.addRule(`.scm-view .scm-editor-container.validation-info { outline: 1px solid ${gt} !important; }`),Ne.addRule(`.scm-editor-validation-container.validation-info { border-color: ${gt}; }`));const $e=kt.getColor(G.inputValidationInfoBackground);$e&&Ne.addRule(`.scm-editor-validation-container.validation-info { background-color: ${$e}; }`);const Qe=kt.getColor(G.inputValidationInfoForeground);Qe&&Ne.addRule(`.scm-editor-validation-container.validation-info { color: ${Qe}; }`);const tt=kt.getColor(G.inputValidationWarningBorder);tt&&(Ne.addRule(`.scm-view .scm-editor-container.validation-warning { outline: 1px solid ${tt} !important; }`),Ne.addRule(`.scm-editor-validation-container.validation-warning { border-color: ${tt}; }`));const Ct=kt.getColor(G.inputValidationWarningBackground);Ct&&Ne.addRule(`.scm-editor-validation-container.validation-warning { background-color: ${Ct}; }`);const bt=kt.getColor(G.inputValidationWarningForeground);bt&&Ne.addRule(`.scm-editor-validation-container.validation-warning { color: ${bt}; }`);const Rt=kt.getColor(G.inputValidationErrorBorder);Rt&&(Ne.addRule(`.scm-view .scm-editor-container.validation-error { outline: 1px solid ${Rt} !important; }`),Ne.addRule(`.scm-editor-validation-container.validation-error { border-color: ${Rt}; }`));const Mt=kt.getColor(G.inputValidationErrorBackground);Mt&&Ne.addRule(`.scm-editor-validation-container.validation-error { background-color: ${Mt}; }`);const Ft=kt.getColor(G.inputValidationErrorForeground);Ft&&Ne.addRule(`.scm-editor-validation-container.validation-error { color: ${Ft}; }`);const zt=kt.getColor(B.SIDE_BAR_BORDER);zt&&Ne.addRule(`.scm-view .scm-provider > .status > .monaco-action-bar > .actions-container { border-color: ${zt}; }`)});class Nt{constructor(Ne,Ge,Ze,ft,Dt){this.container=Ne,this.contextMenuService=Ge,this.commandService=Ze,this.themeService=ft,this.notificationService=Dt,this.disposables=new R.MutableDisposable}dispose(){this.disposables?.dispose()}setButton(Ne){if(this.clear(),!!Ne){if(Ne.secondaryCommands?.length){const Ge=[];for(let Ze=0;Ze<Ne.secondaryCommands.length;Ze++){const ft=Ne.secondaryCommands[Ze];for(const Dt of ft)Ge.push(new l.Action(Dt.id,Dt.title,void 0,!0,async()=>await this.executeCommand(Dt.id,...Dt.arguments||[])));ft.length&&Ge.push(new l.Separator)}Ge.pop(),this.button=new be.ButtonWithDropdown(this.container,{actions:Ge,addPrimaryActionToDropdown:!1,contextMenuProvider:this.contextMenuService,title:Ne.command.tooltip,supportIcons:!0})}else Ne.description?(this.button=new be.ButtonWithDescription(this.container,{supportIcons:!0,title:Ne.command.tooltip}),this.button.description=Ne.description):this.button=new be.Button(this.container,{supportIcons:!0,title:Ne.command.tooltip});this.button.enabled=Ne.enabled,this.button.label=Ne.command.title,this.button.onDidClick(async()=>await this.executeCommand(Ne.command.id,...Ne.command.arguments||[]),null,this.disposables.value),this.disposables.value.add(this.button),this.disposables.value.add((0,a.attachButtonStyler)(this.button,this.themeService))}}focus(){this.button?.focus()}clear(){this.disposables.value=new R.DisposableStore,this.button=void 0,(0,k.clearNode)(this.container)}async executeCommand(Ne,...Ge){try{await this.commandService.executeCommand(Ne,...Ge)}catch(Ze){this.notificationService.error(Ze)}}}e.SCMActionButton=Nt}),define(ae[2921],le([1,0,48,252,417,351,5,390,203,34,130,107,9,18,51,19,2,49,199,54,42,1838,136,8,43,24,20,11,16,2386,191,22,157,60,915,222,677,62,154,105,13,29,57,210,805,550,249,929,206,1172]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AnythingQuickAccessProvider=void 0;function j(Y){const ee=Y;return!!ee?.range&&!!ee.resource}let K=class wi extends p.PickerQuickAccessProvider{get defaultFilterValue(){if(this.configuration.preserveInput)return N.DefaultQuickAccessFilterValue.LAST}constructor(ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be){super(wi.PREFIX,{canAcceptInBackground:!0,noResultsPick:wi.NO_RESULTS_PICK}),this.instantiationService=ee,this.searchService=ie,this.contextService=re,this.pathService=oe,this.environmentService=se,this.fileService=te,this.labelService=Z,this.modelService=ne,this.languageService=ce,this.workingCopyService=de,this.configurationService=he,this.editorService=pe,this.historyService=me,this.filesConfigurationService=Se,this.textModelService=Ie,this.uriIdentityService=ve,this.quickInputService=be,this.pickState=new class{constructor(ge,ue){this.provider=ge,this.editorService=ue,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(ge){this.picker=ge,(0,V.once)(ge.onDispose)(()=>{ge===this.picker&&(this.picker=void 0)});const ue=!!ge.quickNavigate;ue||(this.fileQueryCache=this.provider.createFileQueryCache(),this.scorerCache=Object.create(null)),this.isQuickNavigating=ue,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 ge=this.editorService.activeEditorPane;ge&&(this.editorViewState={group:ge.group,editor:ge.input,state:(0,x.withNullAsUndefined)((0,z.getIEditor)(ge.getControl())?.saveViewState())})}async restoreEditorViewState(){if(this.editorViewState){const ge={viewState:this.editorViewState.state,preserveFocus:!0};await this.editorViewState.group.openEditor(this.editorViewState.editor,ge)}}}(this,this.editorService),this.labelOnlyEditorHistoryPickAccessor=new t.QuickPickItemScorerAccessor({skipDescription:!0}),this.fileQueryDelayer=this._register(new w.ThrottledDelayer(wi.TYPING_SEARCH_DELAY)),this.fileQueryBuilder=this.instantiationService.createInstance(A.QueryBuilder),this.helpQuickAccess=this.instantiationService.createInstance($.HelpQuickAccessProvider),this.workspaceSymbolsQuickAccess=this._register(this.instantiationService.createInstance(O.SymbolsQuickAccessProvider)),this.editorSymbolsQuickAccess=this.instantiationService.createInstance(P.GotoSymbolQuickAccessProvider)}get configuration(){const ee=this.configurationService.getValue().workbench?.editor,ie=this.configurationService.getValue().search,re=this.configurationService.getValue().workbench.quickOpen;return{openEditorPinned:!ee?.enablePreviewFromQuickOpen||!ee?.enablePreview,openSideBySideDirection:ee?.openSideBySideDirection,includeSymbols:ie?.quickOpen.includeSymbols,includeHistory:ie?.quickOpen.includeHistory,historyFilterSortOrder:ie?.quickOpen.history.filterSortOrder,shortAutoSaveDelay:this.filesConfigurationService.getAutoSaveMode()===1,preserveInput:re.preserveInput}}provide(ee,ie,re){const oe=new c.DisposableStore;this.pickState.set(ee);const se=oe.add(new c.MutableDisposable);return oe.add(ee.onDidChangeActive(()=>{se.value=void 0;const[te]=ee.activeItems;j(te)&&(se.value=this.decorateAndRevealSymbolRange(te))})),oe.add((0,V.once)(ee.onDidHide)(({reason:te})=>{te===t.QuickInputHideReason.Gesture&&this.pickState.restoreEditorViewState()})),oe.add(super.provide(ee,ie,re)),oe}decorateAndRevealSymbolRange(ee){const ie=this.editorService.activeEditor;if(!this.uriIdentityService.extUri.isEqual(ee.resource,ie?.resource))return c.Disposable.None;const re=this.editorService.activeTextEditorControl;return re?(this.pickState.rememberEditorViewState(),re.revealRangeInCenter(ee.range.selection,0),this.addDecorations(re,ee.range.decoration),(0,c.toDisposable)(()=>this.clearDecorations(re))):c.Disposable.None}_getPicks(ee,ie,re,oe){const se=(0,E.extractRangeFromFilter)(ee,[P.GotoSymbolQuickAccessProvider.PREFIX]);let te;if(se?te=se.filter:te=ee,this.pickState.lastRange=se?.range,ee!==this.pickState.lastOriginalFilter&&te===this.pickState.lastFilter)return null;const Z=!!this.pickState.lastOriginalFilter;this.pickState.lastOriginalFilter=ee,this.pickState.lastFilter=te;const ne=this.pickState.picker?.items,ce=this.pickState.picker?.activeItems[0];if(ne&&ce){const de=j(ce),he=ce===wi.NO_RESULTS_PICK&&te.indexOf(P.GotoSymbolQuickAccessProvider.PREFIX)>=0;!de&&!he&&(this.pickState.lastGlobalPicks={items:ne,active:ce})}return this.doGetPicks(te,{enableEditorSymbolSearch:Z,includeHelp:oe?.includeHelp},ie,re)}doGetPicks(ee,ie,re,oe){const se=(0,R.prepareQuery)(ee);if(ie.enableEditorSymbolSearch){const ce=this.getEditorSymbolPicks(se,re,oe);if(ce)return ce}const te=this.pickState.picker?.activeItems[0];if(j(te)&&this.pickState.lastGlobalPicks)return this.pickState.lastGlobalPicks;const Z=this.getEditorHistoryPicks(se);let ne;return this.pickState.isQuickNavigating?ne=Z:(ne=[],ie.includeHelp&&ne.push(...this.getHelpPicks(se,oe)),Z.length!==0&&(ne.push({type:"separator",label:(0,a.localize)(1,null)}),ne.push(...Z))),{picks:ne,additionalPicks:(async()=>{const ce=new M.ResourceMap;for(const he of Z)he.resource&&ce.set(he.resource,!0);const de=await this.getAdditionalPicks(se,ce,oe);return oe.isCancellationRequested?[]:de.length>0?[{type:"separator",label:this.configuration.includeSymbols?(0,a.localize)(2,null):(0,a.localize)(3,null)},...de]:[]})()}}async getAdditionalPicks(ee,ie,re){const[oe,se]=await Promise.all([this.getFilePicks(ee,ie,re),this.getWorkspaceSymbolPicks(ee,re)]);if(re.isCancellationRequested)return[];const te=(0,D.top)([...oe,...se],(ne,ce)=>(0,R.compareItemsByFuzzyScore)(ne,ce,ee,!0,t.quickPickItemScorerAccessor,this.pickState.scorerCache),wi.MAX_RESULTS),Z=[];for(const ne of te)if(ne.highlights)Z.push(ne);else{const{score:ce,labelMatch:de,descriptionMatch:he}=(0,R.scoreItemFuzzy)(ne,ee,!0,t.quickPickItemScorerAccessor,this.pickState.scorerCache);if(!ce)continue;ne.highlights={label:de,description:he},Z.push(ne)}return Z}getEditorHistoryPicks(ee){const ie=this.configuration;if(!ee.normalized)return this.historyService.getHistory().map(se=>this.createAnythingPick(se,ie));if(!this.configuration.includeHistory)return[];const re=ee.containsPathSeparator?t.quickPickItemScorerAccessor:this.labelOnlyEditorHistoryPickAccessor,oe=[];for(const se of this.historyService.getHistory()){const te=se.resource;if(!te||!this.fileService.hasProvider(te)&&te.scheme!==_.Schemas.untitled&&te.scheme!==_.Schemas.vscodeTerminal)continue;const Z=this.createAnythingPick(se,ie),{score:ne,labelMatch:ce,descriptionMatch:de}=(0,R.scoreItemFuzzy)(Z,ee,!1,re,this.pickState.scorerCache);!ne||(Z.highlights={label:ce,description:de},oe.push(Z))}return this.configuration.historyFilterSortOrder==="recency"?oe:oe.sort((se,te)=>(0,R.compareItemsByFuzzyScore)(se,te,ee,!1,re,this.pickState.scorerCache))}createFileQueryCache(){return new y.FileQueryCacheState(ee=>this.fileQueryBuilder.file(this.contextService.getWorkspace().folders,this.getFileQueryOptions({cacheKey:ee})),ee=>this.searchService.fileSearch(ee),ee=>this.searchService.clearCache(ee),this.pickState.fileQueryCache).load()}async getFilePicks(ee,ie,re){if(!ee.normalized)return[];const oe=await this.getAbsolutePathFileResult(ee,re);if(re.isCancellationRequested)return[];let se;if(oe){if(ie.has(oe))return[];const Z=this.createAnythingPick(oe,this.configuration);return Z.highlights={label:[{start:0,end:Z.label.length}],description:Z.description?[{start:0,end:Z.description.length}]:void 0},[Z]}if(this.pickState.fileQueryCache?.isLoaded?se=await this.doFileSearch(ee,re):se=await this.fileQueryDelayer.trigger(async()=>re.isCancellationRequested?[]:this.doFileSearch(ee,re)),re.isCancellationRequested)return[];const te=this.configuration;return se.filter(Z=>!ie.has(Z)).map(Z=>this.createAnythingPick(Z,te))}async doFileSearch(ee,ie){const[re,oe]=await Promise.all([this.getFileSearchResults(ee,ie),this.getRelativePathFileResults(ee,ie)]);if(ie.isCancellationRequested)return[];if(!oe)return re;const se=new M.ResourceMap;for(const te of oe)se.set(te,!0);return[...re.filter(te=>!se.has(te)),...oe]}async getFileSearchResults(ee,ie){let re="";ee.values&&ee.values.length>1?re=ee.values[0].original:re=ee.original;const oe=await this.doGetFileSearchResults(re,ie);if(ie.isCancellationRequested)return[];if(oe.limitHit&&ee.values&&ee.values.length>1){const se=await this.doGetFileSearchResults(ee.original,ie);if(ie.isCancellationRequested)return[];const te=new M.ResourceMap;for(const Z of oe.results)te.set(Z.resource,!0);for(const Z of se.results)te.has(Z.resource)||oe.results.push(Z)}return oe.results.map(se=>se.resource)}doGetFileSearchResults(ee,ie){return this.searchService.fileSearch(this.fileQueryBuilder.file(this.contextService.getWorkspace().folders,this.getFileQueryOptions({filePattern:ee,cacheKey:this.pickState.fileQueryCache?.cacheKey,maxResults:wi.MAX_RESULTS})),ie)}getFileQueryOptions(ee){return{_reason:"openFileHandler",extraFileResources:this.instantiationService.invokeFunction(E.getOutOfWorkspaceEditorResources),filePattern:ee.filePattern||"",cacheKey:ee.cacheKey,maxResults:ee.maxResults||0,sortByScore:!0}}async getAbsolutePathFileResult(ee,ie){if(!ee.containsPathSeparator)return;const re=await this.pathService.userHome(),oe=(0,S.untildify)(ee.original,re.scheme===_.Schemas.file?re.fsPath:re.path);if(ie.isCancellationRequested)return;const se=(await this.pathService.path).isAbsolute(oe);if(!ie.isCancellationRequested&&se){const te=(0,u.toLocalResource)(await this.pathService.fileURI(oe),this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);if(ie.isCancellationRequested)return;try{if((await this.fileService.stat(te)).isFile)return te}catch{}}}async getRelativePathFileResults(ee,ie){if(!ee.containsPathSeparator)return;if(!(await this.pathService.path).isAbsolute(ee.original)){const oe=[];for(const se of this.contextService.getWorkspace().folders){if(ie.isCancellationRequested)break;const te=(0,u.toLocalResource)(se.toResource(ee.original),this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);try{(await this.fileService.stat(te)).isFile&&oe.push(te)}catch{}}return oe}}getHelpPicks(ee,ie){if(ee.normalized)return[];const re=this.helpQuickAccess.getQuickAccessProviders(),oe=new Map;for(const Z of re)oe.set(Z.prefix,Z);const se=[],te=(Z,ne={})=>{if(oe.has(Z)){const ce=oe.get(Z);ce.label=ce.description,ce.description=ce.prefix;const de=ce.prefix===wi.PREFIX?void 0:{includeHelp:!0};se.push({...oe.get(Z),...ne,accept:()=>{this.quickInputService.quickAccess.show(ce.prefix,{preserveValue:!0,providerOptions:de})}})}};return te(wi.PREFIX),te(q.CommandsQuickAccessProvider.PREFIX),te(P.GotoSymbolQuickAccessProvider.PREFIX),te(X.DEBUG_QUICK_ACCESS_PREFIX),te(G.TasksQuickAccessProvider.PREFIX),te($.HelpQuickAccessProvider.PREFIX,{label:(0,a.localize)(4,null)}),se}async getWorkspaceSymbolPicks(ee,ie){const re=this.configuration;return!ee.normalized||!re.includeSymbols||this.pickState.lastRange?[]:this.workspaceSymbolsQuickAccess.getSymbolPicks(ee.original,{skipLocal:!0,skipSorting:!0,delay:wi.TYPING_SEARCH_DELAY},ie)}getEditorSymbolPicks(ee,ie,re){const oe=ee.original.split(P.GotoSymbolQuickAccessProvider.PREFIX),se=oe.length>1?oe[oe.length-1].trim():void 0;if(typeof se!="string")return null;const te=this.pickState.lastGlobalPicks?.active;if(!te)return null;const Z=te.resource;return!Z||!this.fileService.hasProvider(Z)&&Z.scheme!==_.Schemas.untitled||(te.label.includes(P.GotoSymbolQuickAccessProvider.PREFIX)||te.description?.includes(P.GotoSymbolQuickAccessProvider.PREFIX))&&oe.length<3?null:this.doGetEditorSymbolPicks(te,Z,se,ie,re)}async doGetEditorSymbolPicks(ee,ie,re,oe,se){try{this.pickState.rememberEditorViewState(),await this.editorService.openEditor({resource:ie,options:{preserveFocus:!0,revealIfOpened:!0,ignoreError:!0}})}catch{return[]}if(se.isCancellationRequested)return[];let te=this.modelService.getModel(ie);if(!te)try{const ne=oe.add(await this.textModelService.createModelReference(ie));if(se.isCancellationRequested)return[];te=ne.object.textEditorModel}catch{return[]}const Z=await this.editorSymbolsQuickAccess.getSymbolPicks(te,re,{extraContainerLabel:(0,U.stripIcons)(ee.label)},oe,se);return se.isCancellationRequested?[]:Z.map(ne=>ne.type==="separator"?ne:{...ne,resource:ie,description:ne.description,trigger:(ce,de)=>(this.openAnything(ie,{keyMods:de,range:ne.range?.selection,forceOpenSideBySide:!0}),p.TriggerAction.CLOSE_PICKER),accept:(ce,de)=>this.openAnything(ie,{keyMods:ce,range:ne.range?.selection,preserveFocus:de.inBackground,forcePinned:de.inBackground})})}addDecorations(ee,ie){this.editorSymbolsQuickAccess.addDecorations(ee,ie)}clearDecorations(ee){this.editorSymbolsQuickAccess.clearDecorations(ee)}createAnythingPick(ee,ie){const re=!r.URI.isUri(ee);let oe,se,te,Z,ne;(0,h.isEditorInput)(ee)?(oe=h.EditorResourceAccessor.getOriginalUri(ee),se=ee.getName(),te=ee.getDescription(),Z=ee.isDirty()&&!ee.isSaving(),ne=ee.getLabelExtraClasses()):(oe=r.URI.isUri(ee)?ee:ee.resource,se=(0,u.basenameOrAuthority)(oe),te=this.labelService.getUriLabel((0,u.dirname)(oe),{relative:!0}),Z=this.workingCopyService.isDirty(oe)&&!ie.shortAutoSaveDelay,ne=[]);const ce=te?`${se} ${te}`:se,de=new Q.Lazy(()=>(0,s.getIconClasses)(this.modelService,this.languageService,oe).concat(ne)),he=new Q.Lazy(()=>{const pe=ie.openSideBySideDirection,me=[];return me.push({iconClass:pe==="right"?H.Codicon.splitHorizontal.classNames:H.Codicon.splitVertical.classNames,tooltip:pe==="right"?(0,a.localize)(5,null):(0,a.localize)(6,null)}),re&&me.push({iconClass:Z?"dirty-anything "+H.Codicon.circleFilled.classNames:H.Codicon.close.classNames,tooltip:(0,a.localize)(7,null),alwaysVisible:Z}),me});return{resource:oe,label:se,ariaLabel:Z?(0,a.localize)(8,null,ce):ce,description:te,get iconClasses(){return de.getValue()},get buttons(){return he.getValue()},trigger:(pe,me)=>{switch(pe){case 0:return this.openAnything(ee,{keyMods:me,range:this.pickState.lastRange,forceOpenSideBySide:!0}),p.TriggerAction.CLOSE_PICKER;case 1:if(!r.URI.isUri(ee))return this.historyService.removeFromHistory(ee),p.TriggerAction.REMOVE_ITEM}return p.TriggerAction.NO_ACTION},accept:(pe,me)=>this.openAnything(ee,{keyMods:pe,range:this.pickState.lastRange,preserveFocus:me.inBackground,forcePinned:me.inBackground})}}async openAnything(ee,ie){const re={preserveFocus:ie.preserveFocus,pinned:ie.keyMods?.ctrlCmd||ie.forcePinned||this.configuration.openEditorPinned,selection:ie.range?m.Range.collapseToStart(ie.range):void 0},oe=ie.keyMods?.alt||this.configuration.openEditorPinned&&ie.keyMods?.ctrlCmd||ie.forceOpenSideBySide?v.SIDE_GROUP:v.ACTIVE_GROUP;if(oe===v.SIDE_GROUP&&await this.pickState.restoreEditorViewState(),(0,h.isEditorInput)(ee))await this.editorService.openEditor(ee,re,oe);else{let se;r.URI.isUri(ee)?se={resource:ee,options:re}:se={...ee,options:{...ee.options,...re}},await this.editorService.openEditor(se,oe)}}};K.PREFIX="",K.NO_RESULTS_PICK={label:(0,a.localize)(0,null)},K.MAX_RESULTS=512,K.TYPING_SEARCH_DELAY=200,K=we([F(0,k.IInstantiationService),F(1,I.ISearchService),F(2,b.IWorkspaceContextService),F(3,C.IPathService),F(4,i.IWorkbenchEnvironmentService),F(5,f.IFileService),F(6,l.ILabelService),F(7,d.IModelService),F(8,n.ILanguageService),F(9,o.IWorkingCopyService),F(10,g.IConfigurationService),F(11,v.IEditorService),F(12,T.IHistoryService),F(13,L.IFilesConfigurationService),F(14,B.ITextModelService),F(15,W.IUriIdentityService),F(16,t.IQuickInputService)],K),e.AnythingQuickAccessProvider=K}),define(ae[701],le([1,0,6,53,18,9,54,1851,47,5,23,27,43,187,342,2894,553,107,78,136,8,56,186,482]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"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 g=class $n extends o.EditorInput{get typeId(){return $n.ID}get editorId(){return this.typeId}get capabilities(){let m=8;return this.backingUri||(m|=4),m}get resource(){return this.backingUri||this.modelUri}constructor(m,w,D,y,T,_,L,M,O,N){if(super(),this.modelUri=m,this.backingUri=w,this.modelService=D,this.textFileService=y,this.fileDialogService=T,this.instantiationService=_,this.workingCopyService=L,this.telemetryService=M,this.pathService=O,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=_.createInstance(f.SearchEditorModel,m),this.modelUri.scheme!==i.SearchEditorScheme)throw Error("SearchEditorInput must be invoked with a SearchEditorScheme uri");this.memento=new u.Memento($n.ID,N),N.onWillSaveState(()=>this.memento.saveMemento());const P=this,B=new class{constructor(){this.typeId=i.SearchEditorWorkingCopyTypeId,this.resource=P.modelUri,this.capabilities=P.hasCapability(4)?2:0,this.onDidChangeDirty=P.onDidChangeDirty,this.onDidChangeContent=P.onDidChangeContent,this.onDidSave=P.onDidSave}get name(){return P.getName()}isDirty(){return P.isDirty()}backup(V){return P.backup(V)}save(V){return P.save(0,V).then(z=>!!z)}revert(V){return P.revert(0,V)}};this._register(this.workingCopyService.registerWorkingCopy(B))}async save(m,w){if(!(await this.resolveModels()).resultsModel.isDisposed())return this.backingUri?(await this.textFileService.write(this.backingUri,await this.serializeForDisk(),w),this.setDirty(!1),this._onDidSave.fire({reason:w?.reason,source:w?.source}),this):this.saveAs(m,w)}tryReadConfigSync(){return this._cachedConfigurationModel?.config}async serializeForDisk(){const{configurationModel:m,resultsModel:w}=await this.resolveModels();return(0,c.serializeSearchConfiguration)(m.config)+` `+w.getValue()}registerConfigChangeListeners(m){this.configChangeListenerDisposable?.dispose(),this.isDisposed()||(this.configChangeListenerDisposable=m.onConfigDidUpdate(()=>{this.lastLabel!==this.getName()&&(this._onDidChangeLabel.fire(),this.lastLabel=this.getName()),this.memento.getMemento(1,1).searchConfig=m.config}),this._register(this.configChangeListenerDisposable))}async resolveModels(){return this.model.resolve().then(m=>(this._cachedResultsModel=m.resultsModel,this._cachedConfigurationModel=m.configurationModel,this.lastLabel!==this.getName()&&(this._onDidChangeLabel.fire(),this.lastLabel=this.getName()),this.registerConfigChangeListeners(m.configurationModel),m))}async saveAs(m,w){const D=await this.fileDialogService.pickFileToSave(await this.suggestFileName(),w?.availableFileSystems);if(D){this.telemetryService.publicLog2("searchEditor/saveSearchResults");const y=await this.serializeForDisk();if(await this.textFileService.create([{resource:D,value:y,options:{overwrite:!0}}])){if(this.setDirty(!1),!(0,R.isEqual)(D,this.modelUri)){const T=this.instantiationService.invokeFunction(e.getOrMakeSearchEditorInput,{fileUri:D,from:"existingFile"});return T.setMatchRanges(this.getMatchRanges()),T}return this}}}getName(m=12){const w=y=>y.length<m?y:`${y.slice(0,m-3)}...`;if(this.backingUri){const y=r.EditorResourceAccessor.getOriginalUri(this);return(0,E.localize)(0,null,(0,p.basename)((y??this.backingUri).path,e.SEARCH_EDITOR_EXT))}const D=this._cachedConfigurationModel?.config?.query?.trim();return D?(0,E.localize)(1,null,w(D)):(0,E.localize)(2,null)}setDirty(m){const w=this.dirty;this.dirty=m,w!==m&&this._onDidChangeDirty.fire()}isDirty(){return this.dirty}async rename(m,w){if((0,R.extname)(w)===e.SEARCH_EDITOR_EXT)return{editor:this.instantiationService.invokeFunction(e.getOrMakeSearchEditorInput,{from:"existingFile",fileUri:w})}}dispose(){this.modelService.destroyModel(this.modelUri),super.dispose()}matches(m){return super.matches(m)?!0:m instanceof $n?!!(m.modelUri.fragment&&m.modelUri.fragment===this.modelUri.fragment)||!!(m.backingUri&&(0,R.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(w=>({range:w,options:{description:"search-editor-find-match",className:i.SearchEditorFindMatchClass,stickiness:1}})))}async revert(m,w){if(w?.soft){this.setDirty(!1);return}if(this.backingUri){const{config:D,text:y}=await this.instantiationService.invokeFunction(c.parseSavedSearchEditor,this.backingUri),{resultsModel:T,configurationModel:_}=await this.resolveModels();T.setValue(y),_.updateConfig(D)}else(await this.resolveModels()).resultsModel.setValue("");super.revert(m,w),this.setDirty(!1)}async backup(m){const w=await this.serializeForDisk();return m.isCancellationRequested?{}:{content:(0,a.bufferToReadable)(a.VSBuffer.fromString(w))}}async suggestFileName(){const w=((await this.resolveModels()).configurationModel.config.query.replace(/[^\w \-_]+/g,"_")||"Search")+e.SEARCH_EDITOR_EXT;return(0,R.joinPath)(await this.fileDialogService.defaultFilePath(this.pathService.defaultUriScheme),w)}toUntyped(){if(!this.hasCapability(4))return{resource:this.resource,options:{override:$n.ID}}}};g.ID=i.SearchEditorInputTypeId,g=we([F(2,k.IModelService),F(3,s.ITextFileService),F(4,I.IFileDialogService),F(5,b.IInstantiationService),F(6,d.IWorkingCopyService),F(7,C.ITelemetryService),F(8,l.IPathService),F(9,S.IStorageService)],g),e.SearchEditorInput=g;const h=(v,m)=>{const w=v.get(S.IStorageService),D=v.get(n.IConfigurationService),y=v.get(b.IInstantiationService),T=m.from==="model"?m.modelUri:A.URI.from({scheme:i.SearchEditorScheme,fragment:`${Math.random()}`});if(!f.searchEditorModelFactory.models.has(T))if(m.from==="existingFile")y.invokeFunction(_=>f.searchEditorModelFactory.initializeModelFromExistingFile(_,T,m.fileUri));else{const _=D.getValue("search").searchEditor,L=_.reusePriorSearchConfiguration,M=_.defaultNumberOfContextLines,O=L?new u.Memento(g.ID,w).getMemento(1,1).searchConfig:{},P={...(0,c.defaultSearchConfig)(),...O,...m.config};M!=null&&(P.contextLines=m?.config?.contextLines??M),m.from==="rawData"?(m.resultsContents&&(P.contextLines=0),y.invokeFunction(B=>f.searchEditorModelFactory.initializeModelFromRawData(B,T,P,m.resultsContents))):y.invokeFunction(B=>f.searchEditorModelFactory.initializeModelFromExistingModel(B,T,P))}return y.createInstance(g,T,m.from==="existingFile"?m.fileUri:m.from==="model"?m.backupOf:void 0)};e.getOrMakeSearchEditorInput=h}),define(ae[355],le([1,0,10,36,234,14,1842,93,31,8,5,38,49,76,12,45,387,341,451,650,352,342,701,24,203,57]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLastNodeFromSameType=e.getElementToFocusAfterRemoved=e.getMultiSelectedSearchResources=e.focusSearchListCommand=e.clearHistoryCommand=e.copyAllCommand=e.copyMatchCommand=e.copyPathCommand=e.ReplaceAllInFolderAction=e.ReplaceAllAction=e.ReplaceAction=e.RemoveAction=e.findOrReplaceInFiles=e.focusPreviousSearchResult=e.focusNextSearchResult=e.collapseDeepestExpandedLevel=e.refreshSearch=e.cancelSearch=e.clearSearchResults=e.expandAll=e.CloseReplaceAction=e.FindInFilesCommand=e.FocusPreviousInputAction=e.FocusNextInputAction=e.togglePreserveCaseCommand=e.toggleRegexCommand=e.toggleWholeWordCommand=e.toggleCaseSensitiveCommand=e.getSearchView=e.openSearchView=e.appendKeyBindingLabel=e.isSearchViewFocused=void 0;function m(ge){const ue=y(ge),Ce=document.activeElement;return!!(ue&&Ce&&t.isAncestor(Ce,ue.getContainer()))}e.isSearchViewFocused=m;function w(ge,ue,Ce){if(typeof ue=="number"){const De=(0,R.createKeybinding)(ue,A.OS);if(De){const Ae=Ce.resolveKeybinding(De);return T(ge,Ae.length>0?Ae[0]:void 0)}return T(ge,void 0)}else return T(ge,ue)}e.appendKeyBindingLabel=w;function D(ge,ue){return ge.openView(h.VIEW_ID,ue).then(Ce=>Ce??void 0)}e.openSearchView=D;function y(ge){return ge.getActiveViewWithId(h.VIEW_ID)??void 0}e.getSearchView=y;function T(ge,ue){return ue?ge+" ("+ue.getLabel()+")":ge}const _=ge=>{y(ge.get(f.IViewsService))?.toggleCaseSensitive()};e.toggleCaseSensitiveCommand=_;const L=ge=>{y(ge.get(f.IViewsService))?.toggleWholeWords()};e.toggleWholeWordCommand=L;const M=ge=>{y(ge.get(f.IViewsService))?.toggleRegex()};e.toggleRegexCommand=M;const O=ge=>{y(ge.get(f.IViewsService))?.togglePreserveCase()};e.togglePreserveCaseCommand=O;let N=class extends p.Action{constructor(ue,Ce,De,Ae){super(ue,Ce),this.viewsService=De,this.editorService=Ae}async run(){this.editorService.activeEditor instanceof o.SearchEditorInput&&this.editorService.activeEditorPane.focusNextInput(),y(this.viewsService)?.focusNextInputBox()}};N.ID="search.focus.nextInputBox",N=we([F(2,f.IViewsService),F(3,g.IEditorService)],N),e.FocusNextInputAction=N;let P=class extends p.Action{constructor(ue,Ce,De,Ae){super(ue,Ce),this.viewsService=De,this.editorService=Ae}async run(){this.editorService.activeEditor instanceof o.SearchEditorInput&&this.editorService.activeEditorPane.focusPrevInput(),y(this.viewsService)?.focusPreviousInputBox()}};P.ID="search.focus.previousInputBox",P=we([F(2,f.IViewsService),F(3,g.IEditorService)],P),e.FocusPreviousInputAction=P;const B=(ge,ue={})=>{const De=ge.get(b.IConfigurationService).getValue().search.mode;if(De==="view"){const Ae=ge.get(f.IViewsService);D(Ae,!1).then(Pe=>{if(Pe){Pe.searchAndReplaceWidget.toggleReplace(typeof ue.replace=="string");let ye=!1;typeof ue.query=="string"?Pe.setSearchParameters(ue):ye=Pe.updateTextFromFindWidgetOrSelection({allowUnselectedWord:typeof ue.replace!="string"}),Pe.searchAndReplaceWidget.focus(void 0,ye,ye)}})}else{const Ae=Pe=>({location:De==="newEditor"?"new":"reuse",query:Pe.query,filesToInclude:Pe.filesToInclude,filesToExclude:Pe.filesToExclude,matchWholeWord:Pe.matchWholeWord,isCaseSensitive:Pe.isCaseSensitive,isRegexp:Pe.isRegex,useExcludeSettingsAndIgnoreFiles:Pe.useExcludeSettingsAndIgnoreFiles,onlyOpenEditors:Pe.onlyOpenEditors,showIncludesExcludes:!!(Pe.filesToExclude||Pe.filesToExclude||!Pe.useExcludeSettingsAndIgnoreFiles)});ge.get(I.ICommandService).executeCommand(a.OpenEditorCommandId,Ae(ue))}};e.FindInFilesCommand=B;let V=class extends p.Action{constructor(ue,Ce,De){super(ue,Ce),this.viewsService=De}run(){const ue=y(this.viewsService);return ue&&(ue.searchAndReplaceWidget.toggleReplace(!1),ue.searchAndReplaceWidget.focus()),Promise.resolve(null)}};V=we([F(2,f.IViewsService)],V),e.CloseReplaceAction=V;function z(ge){const ue=ge.get(f.IViewsService),Ce=y(ue);Ce&&Ce.getControl().expandAll()}e.expandAll=z;function x(ge){const ue=ge.get(f.IViewsService);y(ue)?.clearSearchResults()}e.clearSearchResults=x;function H(ge){const ue=ge.get(f.IViewsService);y(ue)?.cancelSearch()}e.cancelSearch=H;function W(ge){const ue=ge.get(f.IViewsService);y(ue)?.triggerQueryChange({preserveFocus:!1})}e.refreshSearch=W;function U(ge){const ue=ge.get(f.IViewsService),Ce=y(ue);if(Ce){const De=Ce.getControl(),Ae=De.navigate();let Pe=Ae.first(),fe=!1,ye=!1;if(Pe instanceof n.FolderMatchWorkspaceRoot)for(;Pe=Ae.next();){if(Pe instanceof n.Match){fe=!0;break}if(Ce.isTreeLayoutViewVisible&&!ye){let Ee=Pe;Pe instanceof n.FolderMatch&&(Ee=Pe.compressionStartParent??Pe);const Te=Ee.parent();Te instanceof n.FolderMatchWorkspaceRoot||Te instanceof n.FolderMatchNoRoot||Te instanceof n.SearchResult||(ye=!0)}}if(fe){Pe=Ae.first();do Pe instanceof n.FileMatch&&De.collapse(Pe);while(Pe=Ae.next())}else if(ye){if(Pe=Ae.first(),Pe)do{let Ee=Pe;Pe instanceof n.FolderMatch&&(Ee=Pe.compressionStartParent??Pe);const Te=Ee.parent();(Te instanceof n.FolderMatchWorkspaceRoot||Te instanceof n.FolderMatchNoRoot)&&(De.hasElement(Pe)?De.collapse(Pe,!0):De.collapseAll())}while(Pe=Ae.next())}else De.collapseAll();const ke=De.getFocus()[0]?.parent();ke&&(ke instanceof n.FolderMatch||ke instanceof n.FileMatch)&&De.hasElement(ke)&&De.isCollapsed(ke)&&(De.domFocus(),De.focusFirst(),De.setSelection(De.getFocus()))}}e.collapseDeepestExpandedLevel=U;async function $(ge){const ue=ge.get(g.IEditorService);return ue.activeEditor instanceof o.SearchEditorInput?ue.activeEditorPane.focusNextResult():D(ge.get(f.IViewsService)).then(De=>{De?.selectNextMatch()})}e.focusNextSearchResult=$;async function q(ge){const ue=ge.get(g.IEditorService);return ue.activeEditor instanceof o.SearchEditorInput?ue.activeEditorPane.focusPreviousResult():D(ge.get(f.IViewsService)).then(De=>{De?.selectPreviousMatch()})}e.focusPreviousSearchResult=q;async function X(ge,ue){return D(ge.get(f.IViewsService),!1).then(Ce=>{if(Ce){Ce.searchAndReplaceWidget.toggleReplace(ue);const Ae=Ce.updateTextFromFindWidgetOrSelection({allowUnselectedWord:!ue});Ce.searchAndReplaceWidget.focus(void 0,Ae,Ae)}})}e.findOrReplaceInFiles=X;let G=class{constructor(ue,Ce,De,Ae,Pe,fe,ye){this.viewer=ue,this.viewlet=Ce,this.replaceService=De,this.editorService=Ae,this.configurationService=Pe,this.uriIdentityService=fe,this.viewsService=ye}async performReplace(ue){const De=Se(this.viewer,ue,this.configurationService.getValue("search")).elements;let Ae=this.viewer.getFocus()[0];if((!Ae||Ae&&!(0,n.arrayContainsElementOrParent)(Ae,De)||Ae instanceof n.SearchResult)&&(Ae=ue),De.length===0)return;let Pe;Ae&&(Pe=ve(this.viewer,Ae,De));const fe=y(this.viewsService)?.searchResult;fe&&fe.batchReplace(De),Ae&&(Pe||(Pe=be(this.viewer,Ae)),Pe&&(this.viewer.reveal(Pe),this.viewer.setFocus([Pe],(0,u.getSelectionKeyboardEvent)()),this.viewer.setSelection([Pe],(0,u.getSelectionKeyboardEvent)()),Pe instanceof n.Match?!this.configurationService.getValue().search.useReplacePreview||this.hasToOpenFile(Pe)?this.viewlet?.open(Pe,!0):this.replaceService.openReplacePreview(Pe,!0):Pe instanceof n.FileMatch&&this.viewlet?.open(Pe,!0))),this.viewer.domFocus()}hasToOpenFile(ue){if(!(ue instanceof n.Match))return!1;const De=this.editorService.activeEditor?.resource;return De?this.uriIdentityService.extUri.isEqual(De,ue.parent().resource):!1}};G=we([F(2,s.IReplaceService),F(3,g.IEditorService),F(4,b.IConfigurationService),F(5,v.IUriIdentityService),F(6,f.IViewsService)],G);let Q=class fc extends p.Action{constructor(ue,Ce,De,Ae,Pe){super(l.RemoveActionId,w(fc.LABEL,De.lookupKeybinding(l.RemoveActionId),De),i.ThemeIcon.asClassName(c.searchRemoveIcon)),this.viewer=ue,this.element=Ce,this.configurationService=Ae,this.viewsService=Pe}async run(){const ue=Se(this.viewer,this.element,this.configurationService.getValue("search")),Ce=ue.elements;let De=this.viewer.getFocus()[0];if(Ce.length===0)return;(!De||De instanceof n.SearchResult)&&(De=this.element);let Ae;ue.mustReselect&&De&&(Ae=ve(this.viewer,De,Ce));const Pe=y(this.viewsService)?.searchResult;Pe&&Pe.batchRemove(Ce),ue.mustReselect&&De&&(Ae||(Ae=be(this.viewer,De)),Ae&&!(0,n.arrayContainsElementOrParent)(Ae,Ce)&&(this.viewer.reveal(Ae),this.viewer.setFocus([Ae],(0,u.getSelectionKeyboardEvent)()),this.viewer.setSelection([Ae],(0,u.getSelectionKeyboardEvent)()))),this.viewer.domFocus()}};Q.LABEL=k.localize(0,null),Q=we([F(2,C.IKeybindingService),F(3,b.IConfigurationService),F(4,f.IViewsService)],Q),e.RemoveAction=Q;let j=class pc extends p.Action{constructor(ue,Ce,De,Ae,Pe){super(l.ReplaceActionId,w(pc.LABEL,Pe.lookupKeybinding(l.ReplaceActionId),Pe),i.ThemeIcon.asClassName(c.searchReplaceIcon)),this.element=Ce,this.instantiationService=Ae,this.replaceRunner=this.instantiationService.createInstance(G,ue,De)}async run(){return this.replaceRunner.performReplace(this.element)}};j.LABEL=k.localize(1,null),j.runQ=Promise.resolve(),j=we([F(3,S.IInstantiationService),F(4,C.IKeybindingService)],j),e.ReplaceAction=j;let K=class mc extends p.Action{constructor(ue,Ce,De,Ae){super(l.ReplaceAllInFileActionId,w(mc.LABEL,Ae.lookupKeybinding(l.ReplaceAllInFileActionId),Ae),i.ThemeIcon.asClassName(c.searchReplaceAllIcon)),this.fileMatch=Ce,this.instantiationService=De,this.replaceRunner=this.instantiationService.createInstance(G,ue.getControl(),ue)}async run(){return this.replaceRunner.performReplace(this.fileMatch)}};K.LABEL=k.localize(2,null),K=we([F(2,S.IInstantiationService),F(3,C.IKeybindingService)],K),e.ReplaceAllAction=K;let Y=class vc extends p.Action{constructor(ue,Ce,De,Ae){super(l.ReplaceAllInFolderActionId,w(vc.LABEL,Ae.lookupKeybinding(l.ReplaceAllInFolderActionId),Ae),i.ThemeIcon.asClassName(c.searchReplaceAllIcon)),this.folderMatch=Ce,this.instantiationService=De,this.replaceRunner=this.instantiationService.createInstance(G,ue,void 0)}run(){return this.replaceRunner.performReplace(this.folderMatch)}};Y.LABEL=k.localize(3,null),Y=we([F(2,S.IInstantiationService),F(3,C.IKeybindingService)],Y),e.ReplaceAllInFolderAction=Y;const ee=async(ge,ue)=>{if(!ue){const Pe=ce(ge);if(!(Pe instanceof n.FileMatch||Pe instanceof n.FolderMatchWithResource))return;ue=Pe}const Ce=ge.get(E.IClipboardService),Ae=ge.get(r.ILabelService).getUriLabel(ue.resource,{noPrefix:!0});await Ce.writeText(Ae)};e.copyPathCommand=ee;function ie(ge,ue=0){const Ce=()=>`${ge.range().startLineNumber},${ge.range().startColumn}`,De=ye=>ge.range().startLineNumber+ye+"",Ae=ge.fullPreviewLines(),Pe=Ae.reduce((ye,ke,Ee)=>{const Te=Ee===0?Ce().length:De(Ee).length;return Math.max(Te,ye)},0);return Ae.map((ye,ke)=>{const Ee=ke===0?Ce():De(ke),Te=" ".repeat(Pe-Ee.length);return`${" ".repeat(ue)}${Ee}: ${Te}${ye}`}).join(` `)}function re(ge,ue){return ge instanceof n.FileMatch?se(ge,ue):te(ge,ue)}const oe=A.isWindows?`\r `:` `;function se(ge,ue){const Ce=ge.matches().sort(n.searchMatchComparer).map(Ae=>ie(Ae,2));return{text:`${ue.getUriLabel(ge.resource,{noPrefix:!0})}${oe}${Ce.join(oe)}`,count:Ce.length}}function te(ge,ue){const Ce=[];let De=0;return ge.matches().sort(n.searchMatchComparer).forEach(Pe=>{const fe=re(Pe,ue);De+=fe.count,Ce.push(fe.text)}),{text:Ce.join(oe+oe),count:De}}const Z=async(ge,ue)=>{if(!ue){const Pe=ce(ge);if(!Pe)return;ue=Pe}const Ce=ge.get(E.IClipboardService),De=ge.get(r.ILabelService);let Ae;ue instanceof n.Match?Ae=ie(ue):ue instanceof n.FileMatch?Ae=se(ue,De).text:ue instanceof n.FolderMatch&&(Ae=te(ue,De).text),Ae&&await Ce.writeText(Ae)};e.copyMatchCommand=Z;function ne(ge,ue){const Ce=[];ge=ge.sort(n.searchMatchComparer);for(let De=0;De<ge.length;De++){const Ae=te(ge[De],ue);Ae.count&&Ce.push(Ae.text)}return Ce.join(oe+oe)}function ce(ge){const ue=ge.get(f.IViewsService);return y(ue)?.getControl().getSelection()[0]}const de=async ge=>{const ue=ge.get(f.IViewsService),Ce=ge.get(E.IClipboardService),De=ge.get(r.ILabelService),Ae=y(ue);if(Ae){const Pe=Ae.searchResult,fe=ne(Pe.folderMatches(),De);await Ce.writeText(fe)}};e.copyAllCommand=de;const he=ge=>{ge.get(d.ISearchHistoryService).clearHistory()};e.clearHistoryCommand=he;const pe=ge=>{const ue=ge.get(f.IViewsService);D(ue).then(Ce=>{Ce?.moveFocusToResults()})};e.focusSearchListCommand=pe;function me(ge,ue,Ce){return Se(ge,ue,Ce).elements.map(De=>De instanceof n.Match?null:De.resource).filter(De=>De!==null)}e.getMultiSelectedSearchResources=me;function Se(ge,ue,Ce){let De=ge.getSelection().filter(Pe=>Pe!==null).sort((Pe,fe)=>(0,n.searchComparer)(Pe,fe,Ce.sortOrder));const Ae=!ue||De.includes(ue);return ue&&!(De.length>1&&De.includes(ue))&&(De=[ue]),{elements:De,mustReselect:Ae}}function Ie(ge,ue){return ge instanceof n.Match?ue instanceof n.Match?0:-1:ge instanceof n.FileMatch?ue instanceof n.Match?1:ue instanceof n.FileMatch?0:-1:ue instanceof n.FolderMatch?0:1}function ve(ge,ue,Ce){const De=ge.navigate(ue);if(ue instanceof n.FolderMatch)for(;!!De.next()&&(!(De.current()instanceof n.FolderMatch)||(0,n.arrayContainsElementOrParent)(De.current(),Ce)););else if(ue instanceof n.FileMatch)for(;!!De.next()&&(!(De.current()instanceof n.FileMatch)||(0,n.arrayContainsElementOrParent)(De.current(),Ce));)ge.expand(De.current());else for(;De.next()&&(!(De.current()instanceof n.Match)||(0,n.arrayContainsElementOrParent)(De.current(),Ce));)ge.expand(De.current());return De.current()}e.getElementToFocusAfterRemoved=ve;function be(ge,ue){let Ce=ge.lastVisibleElement??null;for(;Ce;){const De=Ie(ue,Ce);if(De===-1)ge.expand(Ce),Ce=ge.lastVisibleElement;else if(De===1)Ce=ge.getParentElement(Ce);else return Ce}}e.getLastNodeFromSameType=be}),define(ae[2922],le([1,0,10,79,277,2,53,1845,8,19,5,49,73,12,34,355,352,18]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SearchAccessibilityProvider=e.MatchRenderer=e.FileMatchRenderer=e.FolderMatchRenderer=e.SearchDelegate=void 0;class s{getHeight(h){return s.ITEM_HEIGHT}getTemplateId(h){if(h instanceof c.FolderMatch)return d.TEMPLATE_ID;if(h instanceof c.FileMatch)return n.TEMPLATE_ID;if(h instanceof c.Match)return a.TEMPLATE_ID;throw console.error("Invalid search tree element",h),new Error("Invalid search tree element")}}e.SearchDelegate=s,s.ITEM_HEIGHT=22;let d=class Sc extends A.Disposable{constructor(h,v,m,w,D,y,T){super(),this.searchModel=h,this.searchView=v,this.labels=m,this.instantiationService=w,this.themeService=D,this.contextService=y,this.labelService=T,this.templateId=Sc.TEMPLATE_ID}renderCompressedElements(h,v,m,w){const D=h.element,y=D.elements[D.elements.length-1];y.compressionStartParent=D.elements[0];const T=D.elements.map(_=>_.name());if(y.resource){const _=y instanceof c.FolderMatchWorkspaceRoot?b.FileKind.ROOT_FOLDER:b.FileKind.FOLDER;m.label.setResource({resource:y.resource,name:T},{fileKind:_,separator:this.labelService.getSeparator(y.resource.scheme)})}else m.label.setLabel(E.localize(0,null));m.actions.clear(),m.actions.context=y,this.renderFolderDetails(y,m)}renderTemplate(h){const v=new A.DisposableStore,m=t.append(h,t.$(".foldermatch")),w=this.labels.create(m,{supportDescriptionHighlights:!0,supportHighlights:!0});v.add(w);const D=new R.CountBadge(t.append(m,t.$(".badge")));v.add((0,r.attachBadgeStyler)(D,this.themeService));const y=t.append(m,t.$(".actionBarContainer")),T=new p.ActionBar(y,{animated:!1});v.add(T);const _=new A.DisposableStore;return v.add(_),{label:w,badge:D,actions:T,disposables:v,disposableActions:_}}renderElement(h,v,m){const w=h.element;if(w.compressionStartParent=void 0,w.resource){const D=this.contextService.getWorkspaceFolder(w.resource);D&&(0,l.isEqual)(D.uri,w.resource)?m.label.setFile(w.resource,{fileKind:b.FileKind.ROOT_FOLDER,hidePath:!0}):m.label.setFile(w.resource,{fileKind:b.FileKind.FOLDER,hidePath:this.searchView.isTreeLayoutViewVisible})}else m.label.setLabel(E.localize(1,null));m.actions.clear(),this.renderFolderDetails(w,m)}disposeElement(h,v,m){m.disposableActions.clear()}disposeCompressedElements(h,v,m,w){m.disposableActions.clear()}disposeTemplate(h){h.disposables.dispose()}renderFolderDetails(h,v){const m=h.recursiveMatchCount();v.badge.setCount(m),v.badge.setTitleFormat(m>1?E.localize(2,null,m):E.localize(3,null,m));const w=[];if(this.searchModel.isReplaceActive()&&m>0){const y=this.instantiationService.createInstance(f.ReplaceAllInFolderAction,this.searchView.getControl(),h);w.push(y),v.disposableActions.add(y)}const D=this.instantiationService.createInstance(f.RemoveAction,this.searchView.getControl(),h);w.push(D),v.disposableActions.add(D),v.actions.push(w,{icon:!0,label:!1})}};d.TEMPLATE_ID="folderMatch",d=we([F(3,S.IInstantiationService),F(4,u.IThemeService),F(5,i.IWorkspaceContextService),F(6,C.ILabelService)],d),e.FolderMatchRenderer=d;let n=class bc extends A.Disposable{constructor(h,v,m,w,D,y,T){super(),this.searchModel=h,this.searchView=v,this.labels=m,this.instantiationService=w,this.themeService=D,this.contextService=y,this.configurationService=T,this.templateId=bc.TEMPLATE_ID}renderCompressedElements(h,v,m,w){throw new Error("Should never happen since node is incompressible.")}renderTemplate(h){const v=new A.DisposableStore,m=t.append(h,t.$(".filematch")),w=this.labels.create(m);v.add(w);const D=new R.CountBadge(t.append(m,t.$(".badge")));v.add((0,r.attachBadgeStyler)(D,this.themeService));const y=t.append(m,t.$(".actionBarContainer")),T=new p.ActionBar(y,{animated:!1});return v.add(T),{el:m,label:w,badge:D,actions:T,disposables:v}}renderElement(h,v,m){const w=h.element;m.el.setAttribute("data-resource",w.resource.toString());const D=this.configurationService.getValue("search").decorations;m.label.setFile(w.resource,{hidePath:this.searchView.isTreeLayoutViewVisible&&!(w.parent()instanceof c.FolderMatchNoRoot),hideIcon:!1,fileDecorations:{colors:D.colors,badges:D.badges}});const y=w.count();m.badge.setCount(y),m.badge.setTitleFormat(y>1?E.localize(4,null,y):E.localize(5,null,y)),m.actions.clear();const T=[];this.searchModel.isReplaceActive()&&y>0&&T.push(this.instantiationService.createInstance(f.ReplaceAllAction,this.searchView,w)),T.push(this.instantiationService.createInstance(f.RemoveAction,this.searchView.getControl(),w)),m.actions.push(T,{icon:!0,label:!1})}disposeElement(h,v,m){}disposeTemplate(h){h.disposables.dispose()}};n.TEMPLATE_ID="fileMatch",n=we([F(3,S.IInstantiationService),F(4,u.IThemeService),F(5,i.IWorkspaceContextService),F(6,I.IConfigurationService)],n),e.FileMatchRenderer=n;let a=class Cc extends A.Disposable{constructor(h,v,m,w,D){super(),this.searchModel=h,this.searchView=v,this.instantiationService=m,this.contextService=w,this.configurationService=D,this.templateId=Cc.TEMPLATE_ID}renderCompressedElements(h,v,m,w){throw new Error("Should never happen since node is incompressible.")}renderTemplate(h){h.classList.add("linematch");const v=t.append(h,t.$("a.plain.match")),m=t.append(v,t.$("span")),w=t.append(v,t.$("span.findInFileMatch")),D=t.append(v,t.$("span.replaceMatch")),y=t.append(v,t.$("span")),T=t.append(h,t.$("span.matchLineNum")),_=t.append(h,t.$("span.actionBarContainer")),L=new p.ActionBar(_,{animated:!1});return{parent:v,before:m,match:w,replace:D,after:y,lineNumber:T,actions:L}}renderElement(h,v,m){const w=h.element,D=w.preview(),y=this.searchModel.isReplaceActive()&&!!this.searchModel.replaceString;m.before.textContent=D.before,m.match.textContent=D.inside,m.match.classList.toggle("replace",y),m.replace.textContent=y?w.replaceString:"",m.after.textContent=D.after,m.parent.title=(D.before+(y?w.replaceString:D.inside)+D.after).trim().substr(0,999);const T=w.range().endLineNumber-w.range().startLineNumber,_=T>0?`+${T}`:"",L=this.configurationService.getValue("search").showLineNumbers,M=L?`:${w.range().startLineNumber}`:"";m.lineNumber.classList.toggle("show",T>0||L),m.lineNumber.textContent=M+_,m.lineNumber.setAttribute("title",this.getMatchTitle(w,L)),m.actions.clear(),this.searchModel.isReplaceActive()?m.actions.push([this.instantiationService.createInstance(f.ReplaceAction,this.searchView.getControl(),w,this.searchView),this.instantiationService.createInstance(f.RemoveAction,this.searchView.getControl(),w)],{icon:!0,label:!1}):m.actions.push([this.instantiationService.createInstance(f.RemoveAction,this.searchView.getControl(),w)],{icon:!0,label:!1})}disposeElement(h,v,m){}disposeTemplate(h){h.actions.dispose()}getMatchTitle(h,v){const m=h.range().startLineNumber,w=h.range().endLineNumber-h.range().startLineNumber,D=v?E.localize(6,null,m,w)+" ":"",y=w>0?"+ "+E.localize(7,null,w):"";return D+y}};a.TEMPLATE_ID="match",a=we([F(2,S.IInstantiationService),F(3,i.IWorkspaceContextService),F(4,I.IConfigurationService)],a),e.MatchRenderer=a;let o=class{constructor(h,v){this.searchModel=h,this.labelService=v}getWidgetAriaLabel(){return E.localize(8,null)}getAriaLabel(h){if(h instanceof c.FolderMatch){const v=h.allDownstreamFileMatches().reduce((m,w)=>m+w.count(),0);return h.resource?E.localize(9,null,v,h.name()):E.localize(10,null,v)}if(h instanceof c.FileMatch){const v=this.labelService.getUriLabel(h.resource,{relative:!0})||h.resource.fsPath;return E.localize(11,null,h.count(),h.name(),k.dirname(v))}if(h instanceof c.Match){const v=h,m=this.searchModel,w=m.isReplaceActive()&&!!m.replaceString,D=v.getMatchString(),y=v.range(),T=v.text().substr(0,y.endColumn+150);return w?E.localize(12,null,D,v.replaceString,y.startColumn+1,T):E.localize(13,null,D,y.startColumn+1,T)}return null}};o=we([F(1,C.ILabelService)],o),e.SearchAccessibilityProvider=o}),define(ae[702],le([1,0,10,79,182,211,140,36,11,6,310,1847,93,8,7,37,38,98,73,12,265,355,341,111,14,197,45,387,342,372]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContributions=e.SearchWidget=e.SingleLineInputHeight=void 0,e.SingleLineInputHeight=24;class T extends E.Action{constructor(B){super(T.ID,"",d.ThemeIcon.asClassName(w.searchReplaceAllIcon),!1),this._searchWidget=B}set searchWidget(B){this._searchWidget=B}run(){return this._searchWidget?this._searchWidget.triggerReplaceAll():Promise.resolve(null)}}T.ID="search.action.replaceAll";const _=h.isMacintosh?256:2048;function L(P,B,V){const z=!!B.match(/\n/);if(V&&(z||V.clientHeight>e.SingleLineInputHeight)&&V.selectionStart>0){P.stopPropagation();return}}function M(P,B,V){const z=!!B.match(/\n/);if(V&&(z||V.clientHeight>e.SingleLineInputHeight)&&V.selectionEnd<V.value.length){P.stopPropagation();return}}let O=class Sn extends k.Widget{constructor(B,V,z,x,H,W,U,$,q){super(),this.contextViewService=z,this.themeService=x,this.contextKeyService=H,this.keybindingService=W,this.clipboardServce=U,this.configurationService=$,this.accessibilityService=q,this.ignoreGlobalFindBufferOnNextFocus=!1,this.previousGlobalFindBufferValue=null,this._onSearchSubmit=this._register(new b.Emitter),this.onSearchSubmit=this._onSearchSubmit.event,this._onSearchCancel=this._register(new b.Emitter),this.onSearchCancel=this._onSearchCancel.event,this._onReplaceToggled=this._register(new b.Emitter),this.onReplaceToggled=this._onReplaceToggled.event,this._onReplaceStateChange=this._register(new b.Emitter),this.onReplaceStateChange=this._onReplaceStateChange.event,this._onPreserveCaseChange=this._register(new b.Emitter),this.onPreserveCaseChange=this._onPreserveCaseChange.event,this._onReplaceValueChanged=this._register(new b.Emitter),this.onReplaceValueChanged=this._onReplaceValueChanged.event,this._onReplaceAll=this._register(new b.Emitter),this.onReplaceAll=this._onReplaceAll.event,this._onBlur=this._register(new b.Emitter),this.onBlur=this._onBlur.event,this._onDidHeightChange=this._register(new b.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this._onDidToggleContext=new b.Emitter,this.onDidToggleContext=this._onDidToggleContext.event,this.replaceActive=o.ReplaceActiveKey.bindTo(this.contextKeyService),this.searchInputBoxFocused=o.SearchInputBoxFocusedKey.bindTo(this.contextKeyService),this.replaceInputBoxFocused=o.ReplaceInputBoxFocusedKey.bindTo(this.contextKeyService),this._replaceHistoryDelayer=new I.Delayer(500),this.render(B,V),this.configurationService.onDidChangeConfiguration(X=>{X.affectsConfiguration("editor.accessibilitySupport")&&this.updateAccessibilitySupport()}),this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this.updateAccessibilitySupport()),this.updateAccessibilitySupport()}focus(B=!0,V=!1,z=!1){this.ignoreGlobalFindBufferOnNextFocus=z,V&&this.isReplaceShown()?(this.replaceInput.focus(),B&&this.replaceInput.select()):(this.searchInput.focus(),B&&this.searchInput.select())}setWidth(B){this.searchInput.inputBox.layout(),this.replaceInput.width=B-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(B){(B===void 0||B!==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(B,V){this.domNode=t.append(B,t.$(".search-widget")),this.domNode.style.position="relative",V._hideReplaceToggle||this.renderToggleReplaceButton(this.domNode),this.renderSearchInput(this.domNode,V),this.renderReplaceInput(this.domNode,V)}updateAccessibilitySupport(){this.searchInput.setFocusInputOnOptionClick(!this.accessibilityService.isScreenReaderOptimized())}renderToggleReplaceButton(B){const V={buttonBackground:void 0,buttonBorder:void 0,buttonForeground:void 0,buttonHoverBackground:void 0};this.toggleReplaceButton=this._register(new R.Button(B,V)),this.toggleReplaceButton.element.setAttribute("aria-expanded","false"),this.toggleReplaceButton.element.classList.add("toggle-replace-button"),this.toggleReplaceButton.icon=w.searchHideReplaceIcon,this.toggleReplaceButton.onDidClick(()=>this.onToggleReplaceButton()),this.toggleReplaceButton.element.title=C.localize(2,null)}renderSearchInput(B,V){const z={label:C.localize(3,null),validation:H=>this.validateSearchInput(H),placeholder:C.localize(4,null),appendCaseSensitiveLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(o.ToggleCaseSensitiveCommandId),this.keybindingService),appendWholeWordsLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(o.ToggleWholeWordCommandId),this.keybindingService),appendRegexLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(o.ToggleRegexCommandId),this.keybindingService),history:V.searchHistory,showHistoryHint:()=>(0,y.showHistoryKeybindingHint)(this.keybindingService),flexibleHeight:!0,flexibleMaxHeight:Sn.INPUT_MAX_HEIGHT,showCommonFindToggles:!0},x=t.append(B,t.$(".search-container.input-box"));this.searchInput=this._register(new n.ContextScopedFindInput(x,this.contextViewService,z,this.contextKeyService)),this._register((0,s.attachFindReplaceInputBoxStyler)(this.searchInput,this.themeService)),this.searchInput.onKeyDown(H=>this.onSearchInputKeyDown(H)),this.searchInput.setValue(V.value||""),this.searchInput.setRegex(!!V.isRegex),this.searchInput.setCaseSensitive(!!V.isCaseSensitive),this.searchInput.setWholeWords(!!V.isWholeWords),this._register(this.searchInput.onCaseSensitiveKeyDown(H=>this.onCaseSensitiveKeyDown(H))),this._register(this.searchInput.onRegexKeyDown(H=>this.onRegexKeyDown(H))),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 H=this.searchConfiguration.globalFindClipboard;if(!this.ignoreGlobalFindBufferOnNextFocus&&H){const W=await this.clipboardServce.readFindText();W&&this.previousGlobalFindBufferValue!==W&&(this.searchInput.inputBox.addToHistory(),this.searchInput.setValue(W),this.searchInput.select()),this.previousGlobalFindBufferValue=W}this.ignoreGlobalFindBufferOnNextFocus=!1})),this._register(this.searchInputFocusTracker.onDidBlur(()=>this.searchInputBoxFocused.set(!1))),this.showContextToggle=new v.Toggle({isChecked:!1,title:(0,a.appendKeyBindingLabel)(C.localize(5,null),this.keybindingService.lookupKeybinding(D.ToggleSearchEditorContextLinesCommandId),this.keybindingService),icon:w.searchShowContextIcon}),this._register(this.showContextToggle.onChange(()=>this.onContextLinesChanged())),V.showContextToggle&&(this.contextLinesInput=new A.InputBox(x,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(H=>{H!=="0"&&(this.showContextToggle.checked=!0),this.onContextLinesChanged()})),this._register((0,s.attachInputBoxStyler)(this.contextLinesInput,this.themeService)),t.append(x,this.showContextToggle.domNode))}onContextLinesChanged(){this._onDidToggleContext.fire(),this.contextLinesInput.value.includes("-")&&(this.contextLinesInput.value="0"),this._onDidToggleContext.fire()}setContextLines(B){!this.contextLinesInput||(B===0?this.showContextToggle.checked=!1:(this.showContextToggle.checked=!0,this.contextLinesInput.value=""+B))}renderReplaceInput(B,V){this.replaceContainer=t.append(B,t.$(".replace-container.disabled"));const z=t.append(this.replaceContainer,t.$(".replace-input"));this.replaceInput=this._register(new n.ContextScopedReplaceInput(z,this.contextViewService,{label:C.localize(6,null),placeholder:C.localize(7,null),appendPreserveCaseLabel:(0,a.appendKeyBindingLabel)("",this.keybindingService.lookupKeybinding(o.TogglePreserveCaseId),this.keybindingService),history:V.replaceHistory,showHistoryHint:()=>(0,y.showHistoryKeybindingHint)(this.keybindingService),flexibleHeight:!0,flexibleMaxHeight:Sn.INPUT_MAX_HEIGHT},this.contextKeyService,!0)),this._register(this.replaceInput.onDidOptionChange(x=>{x||this._onPreserveCaseChange.fire(this.replaceInput.getPreserveCase())})),this._register((0,s.attachFindReplaceInputBoxStyler)(this.replaceInput,this.themeService)),this.replaceInput.onKeyDown(x=>this.onReplaceInputKeyDown(x)),this.replaceInput.setValue(V.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=Sn.REPLACE_ALL_DISABLED_LABEL,this.replaceActionBar=this._register(new p.ActionBar(this.replaceContainer)),this.replaceActionBar.push([this.replaceAllAction],{icon:!0,label:!1}),this.onkeydown(this.replaceActionBar.domNode,x=>this.onReplaceActionbarKeyDown(x)),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(x=>this.onPreserveCaseKeyDown(x)))}triggerReplaceAll(){return this._onReplaceAll.fire(),Promise.resolve(null)}onToggleReplaceButton(){this.replaceContainer.classList.toggle("disabled"),this.isReplaceShown()?(this.toggleReplaceButton.element.classList.remove(...d.ThemeIcon.asClassNameArray(w.searchHideReplaceIcon)),this.toggleReplaceButton.element.classList.add(...d.ThemeIcon.asClassNameArray(w.searchShowReplaceIcon))):(this.toggleReplaceButton.element.classList.remove(...d.ThemeIcon.asClassNameArray(w.searchShowReplaceIcon)),this.toggleReplaceButton.element.classList.add(...d.ThemeIcon.asClassNameArray(w.searchHideReplaceIcon))),this.toggleReplaceButton.element.setAttribute("aria-expanded",this.isReplaceShown()?"true":"false"),this.updateReplaceActiveState(),this._onReplaceToggled.fire()}setValue(B){this.searchInput.setValue(B)}setReplaceAllActionState(B){this.replaceAllAction.enabled!==B&&(this.replaceAllAction.enabled=B,this.replaceAllAction.label=B?Sn.REPLACE_ALL_ENABLED_LABEL(this.keybindingService):Sn.REPLACE_ALL_DISABLED_LABEL,this.updateReplaceActiveState())}updateReplaceActiveState(){const B=this.isReplaceActive(),V=this.isReplaceShown()&&this.replaceAllAction.enabled;B!==V&&(this.replaceActive.set(V),this._onReplaceStateChange.fire(V),this.replaceInput.inputBox.layout())}validateSearchInput(B){if(B.length===0||!this.searchInput.getRegex())return null;try{new RegExp(B,"u")}catch(V){return{content:V.message}}return null}onSearchInputChanged(){if(this.searchInput.clearMessage(),this.setReplaceAllActionState(!1),this.searchConfiguration.searchOnType)if(this.searchInput.getRegex())try{const B=new RegExp(this.searchInput.getValue(),"ug"),V=` ~!@#$%^&*()_+ \`1234567890-= qwertyuiop[]\\ QWERTYUIOP{}| asdfghjkl;' ASDFGHJKL:" zxcvbnm,./ ZXCVBNM<>? `.match(B)?.length??0,z=V<50?1:V<100?5:10;this.submitSearch(!0,this.searchConfiguration.searchOnTypeDebouncePeriod*z)}catch{}else this.submitSearch(!0,this.searchConfiguration.searchOnTypeDebouncePeriod)}onSearchInputKeyDown(B){B.equals(_|3)&&(this.searchInput.inputBox.insertAtCursor(` `),B.preventDefault()),B.equals(3)?(this.searchInput.onSearchSubmit(),this.submitSearch(),B.preventDefault()):B.equals(9)?(this._onSearchCancel.fire({focus:!0}),B.preventDefault()):B.equals(2)?(this.isReplaceShown()?this.replaceInput.focus():this.searchInput.focusOnCaseSensitive(),B.preventDefault()):B.equals(16)?L(B,this.searchInput.getValue(),this.searchInput.domNode.querySelector("textarea")):B.equals(18)&&M(B,this.searchInput.getValue(),this.searchInput.domNode.querySelector("textarea"))}onCaseSensitiveKeyDown(B){B.equals(1026)&&this.isReplaceShown()&&(this.replaceInput.focus(),B.preventDefault())}onRegexKeyDown(B){B.equals(2)&&this.isReplaceShown()&&(this.replaceInput.focusOnPreserve(),B.preventDefault())}onPreserveCaseKeyDown(B){B.equals(2)?(this.isReplaceActive()?this.focusReplaceAllAction():this._onBlur.fire(),B.preventDefault()):B.equals(1026)&&(this.focusRegexAction(),B.preventDefault())}onReplaceInputKeyDown(B){B.equals(_|3)&&(this.replaceInput.inputBox.insertAtCursor(` `),B.preventDefault()),B.equals(3)?(this.submitSearch(),B.preventDefault()):B.equals(2)?(this.searchInput.focusOnCaseSensitive(),B.preventDefault()):B.equals(1026)?(this.searchInput.focus(),B.preventDefault()):B.equals(16)?L(B,this.replaceInput.getValue(),this.replaceInput.domNode.querySelector("textarea")):B.equals(18)&&M(B,this.replaceInput.getValue(),this.replaceInput.domNode.querySelector("textarea"))}onReplaceActionbarKeyDown(B){B.equals(1026)&&(this.focusRegexAction(),B.preventDefault())}async submitSearch(B=!1,V=0){if(this.searchInput.validate(),!this.searchInput.inputBox.isInputValid())return;const z=this.searchInput.getValue(),x=this.searchConfiguration.globalFindClipboard;z&&x&&await this.clipboardServce.writeFindText(z),this._onSearchSubmit.fire({triggeredOnType:B,delay:V})}getContextLines(){return this.showContextToggle.checked?+this.contextLinesInput.value:0}modifyContextLines(B){const z=+this.contextLinesInput.value+(B?1:-1);this.showContextToggle.checked=z!==0,this.contextLinesInput.value=""+z}toggleContextLines(){this.showContextToggle.checked=!this.showContextToggle.checked,this.onContextLinesChanged()}dispose(){this.setReplaceAllActionState(!1),super.dispose()}get searchConfiguration(){return this.configurationService.getValue("search")}};O.INPUT_MAX_HEIGHT=134,O.REPLACE_ALL_DISABLED_LABEL=C.localize(0,null),O.REPLACE_ALL_ENABLED_LABEL=P=>{const B=P.lookupKeybinding(T.ID);return(0,a.appendKeyBindingLabel)(C.localize(1,null),B,P)},O=we([F(2,f.IContextViewService),F(3,d.IThemeService),F(4,i.IContextKeyService),F(5,c.IKeybindingService),F(6,r.IClipboardService),F(7,u.IConfigurationService),F(8,g.IAccessibilityService)],O),e.SearchWidget=O;function N(){l.KeybindingsRegistry.registerCommandAndKeybindingRule({id:T.ID,weight:200,when:i.ContextKeyExpr.and(o.SearchViewVisibleKey,o.ReplaceActiveKey,S.CONTEXT_FIND_WIDGET_NOT_VISIBLE),primary:2563,handler:P=>{const B=P.get(m.IViewsService);if((0,a.isSearchViewFocused)(B)){const V=(0,a.getSearchView)(B);V&&new T(V.searchAndReplaceWidget).run()}}})}e.registerContributions=N}),define(ae[2923],le([1,0,10,90,110,11,2,13,50,20,85,54,114,620,1849,31,8,7,37,5,151,49,66,23,27,33,73,12,34,697,880,702,341,351,390,352,342,553,58,24,387,19,41,26,958,40,822,126,482]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.searchEditorTextInputBorder=e.SearchEditor=void 0;const Q=/^(\s+)(\d+)(: | )(\s*)(.*)$/,j=/^(\S.*):$/;let K=class wc extends y.AbstractTextCodeEditor{get searchResultEditor(){return this.editorControl}constructor(re,oe,se,te,Z,ne,ce,de,he,pe,me,Se,Ie,ve,be,ge,ue,Ce){super(wc.ID,re,ce,se,ve,oe,ge,be,Ce),this.modelService=te,this.contextService=Z,this.labelService=ne,this.contextViewService=de,this.commandService=he,this.contextKeyService=pe,this.openerService=me,this.notificationService=Se,this.progressService=Ie,this.configurationService=ue,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 o.LongRunningOperation(Ie)),this._register(this.messageDisposables=new k.DisposableStore),this.searchHistoryDelayer=new A.Delayer(2e3),this.searchModel=this._register(this.instantiationService.createInstance(N.SearchModel))}createEditor(re){t.append(re,this.container),this.queryEditorContainer=t.append(this.container,t.$(".query-container"));const oe=t.append(this.container,t.$(".search-results"));super.createEditor(oe),this.registerEditorListeners();const se=(0,E.assertIsDefined)(this.scopedContextKeyService);P.InSearchEditor.bindTo(se).set(!0),this.createQueryEditor(this.queryEditorContainer,this.instantiationService.createChild(new n.ServiceCollection([l.IContextKeyService,se])),L.InputBoxFocusedKey.bindTo(se))}createQueryEditor(re,oe,se){this.queryEditorWidget=this._register(oe.createInstance(_.SearchWidget,re,{_hideReplaceToggle:!0,showContextToggle:!0})),this._register(this.queryEditorWidget.onReplaceToggled(()=>this.reLayout())),this._register(this.queryEditorWidget.onDidHeightChange(()=>this.reLayout())),this._register(this.queryEditorWidget.onSearchSubmit(({delay:de})=>this.triggerSearch({delay:de}))),this._register(this.queryEditorWidget.searchInput.onDidOptionChange(()=>this.triggerSearch({resetCursor:!1}))),this._register(this.queryEditorWidget.onDidToggleContext(()=>this.triggerSearch({resetCursor:!1}))),this.includesExcludesContainer=t.append(re,t.$(".includes-excludes")),this.toggleQueryDetailsButton=t.append(this.includesExcludesContainer,t.$(".expand"+w.ThemeIcon.asCSSSelector(x.searchDetailsIcon),{tabindex:0,role:"button",title:(0,i.localize)(0,null)})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.CLICK,de=>{t.EventHelper.stop(de),this.toggleIncludesExcludes()})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.KEY_UP,de=>{const he=new p.StandardKeyboardEvent(de);(he.equals(3)||he.equals(10))&&(t.EventHelper.stop(de),this.toggleIncludesExcludes())})),this._register(t.addDisposableListener(this.toggleQueryDetailsButton,t.EventType.KEY_DOWN,de=>{new p.StandardKeyboardEvent(de).equals(1026)&&(this.queryEditorWidget.isReplaceActive()?this.queryEditorWidget.focusReplaceAllAction():this.queryEditorWidget.isReplaceShown()?this.queryEditorWidget.replaceInput.focusOnPreserve():this.queryEditorWidget.focusRegexAction(),t.EventHelper.stop(de))}));const te=t.append(this.includesExcludesContainer,t.$(".file-types.includes")),Z=(0,i.localize)(1,null);t.append(te,t.$("h4",void 0,Z)),this.inputPatternIncludes=this._register(oe.createInstance(T.IncludePatternInputWidget,te,this.contextViewService,{ariaLabel:(0,i.localize)(2,null)})),this.inputPatternIncludes.onSubmit(de=>this.triggerSearch({resetCursor:!1,delay:de?this.searchConfig.searchOnTypeDebouncePeriod:0})),this._register(this.inputPatternIncludes.onChangeSearchInEditorsBox(()=>this.triggerSearch()));const ne=t.append(this.includesExcludesContainer,t.$(".file-types.excludes")),ce=(0,i.localize)(3,null);t.append(ne,t.$("h4",void 0,ce)),this.inputPatternExcludes=this._register(oe.createInstance(T.ExcludePatternInputWidget,ne,this.contextViewService,{ariaLabel:(0,i.localize)(4,null)})),this.inputPatternExcludes.onSubmit(de=>this.triggerSearch({resetCursor:!1,delay:de?this.searchConfig.searchOnTypeDebouncePeriod:0})),this._register(this.inputPatternExcludes.onChangeIgnoreBox(()=>this.triggerSearch())),[this.queryEditorWidget.searchInput,this.inputPatternIncludes,this.inputPatternExcludes,this.queryEditorWidget.contextLinesInput].map(de=>this._register((0,m.attachInputBoxStyler)(de,this.themeService,{inputBorder:e.searchEditorTextInputBorder}))),this.messageBox=t.append(re,t.$(".messages.text-search-provider-messages")),[this.queryEditorWidget.searchInputFocusTracker,this.queryEditorWidget.replaceInputFocusTracker,this.inputPatternExcludes.inputFocusTracker,this.inputPatternIncludes.inputFocusTracker].forEach(de=>{this._register(de.onDidFocus(()=>setTimeout(()=>se.set(!0),0))),this._register(de.onDidBlur(()=>se.set(!1)))})}toggleRunAgainMessage(re){if(t.clearNode(this.messageBox),this.messageDisposables.clear(),re){const oe=t.append(this.messageBox,t.$("a.pointer.prominent.message",{},(0,i.localize)(5,null)));this.messageDisposables.add(t.addDisposableListener(oe,t.EventType.CLICK,async()=>{await this.triggerSearch(),this.searchResultEditor.focus()}))}}_getContributions(){const re=[X.UnusualLineTerminatorsDetector.ID];return q.EditorExtensionsRegistry.getEditorContributions().filter(oe=>re.indexOf(oe.id)===-1)}getCodeEditorWidgetOptions(){return{contributions:this._getContributions()}}registerEditorListeners(){this.searchResultEditor.onMouseUp(re=>{if(re.event.detail===2){const oe=this.searchConfig.searchEditor.doubleClickBehaviour,se=re.target.position;if(se&&oe!=="selectWord"){const te=this.searchResultEditor.getModel()?.getLineContent(se.lineNumber)??"";te.match(Q)?(this.searchResultEditor.setSelection(b.Range.fromPositions(se)),this.commandService.executeCommand(oe==="goToLocation"?"editor.action.goToDeclaration":"editor.action.openDeclarationToTheSide")):te.match(j)&&(this.searchResultEditor.setSelection(b.Range.fromPositions(se)),this.commandService.executeCommand("editor.action.peekDefinition"))}}}),this._register(this.searchResultEditor.onDidChangeModelContent(()=>{this.updatingModelForSearch||this.getInput()?.setDirty(!0)}))}getControl(){return this.searchResultEditor}focus(){const re=this.loadEditorViewState(this.getInput());re&&re.focused==="editor"?this.searchResultEditor.focus():this.queryEditorWidget.focus()}focusSearchInput(){this.queryEditorWidget.searchInput.focus()}focusFilesToIncludeInput(){this.showingIncludesExcludes||this.toggleIncludesExcludes(!0),this.inputPatternIncludes.focus()}focusFilesToExcludeInput(){this.showingIncludesExcludes||this.toggleIncludesExcludes(!0),this.inputPatternExcludes.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(re){this.queryEditorWidget.searchInput.setValue(re)}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(re){this.queryEditorWidget.modifyContextLines(re)}toggleQueryDetails(){this.toggleIncludesExcludes()}deleteResultBlock(){const re=new Set,oe=this.searchResultEditor.getSelections(),se=this.searchResultEditor.getModel();if(!(oe&&se))return;const te=se.getLineCount(),Z=1,ne=pe=>{for(let me=pe;me>=Z;me--){const Se=se.getLineContent(me);if(re.add(me),Se[0]!==void 0&&Se[0]!==" ")break}},ce=pe=>{re.add(pe);for(let me=pe+1;me<=te;me++){const Se=se.getLineContent(me);if(Se[0]!==void 0&&Se[0]!==" ")return me;re.add(me)}},de=[];for(const pe of oe){const me=pe.startLineNumber;de.push(ce(me)),ne(me);for(let Se=pe.startLineNumber;Se<=pe.endLineNumber;Se++)re.add(Se)}de.length===0&&de.push(1);const he=pe=>pe!==void 0;se.pushEditOperations(this.searchResultEditor.getSelections(),[...re].map(pe=>({range:new b.Range(pe,1,pe+1,1),text:""})),()=>de.filter(he).map(pe=>new S.Selection(pe,1,pe,1)))}cleanState(){this.getInput()?.setDirty(!1)}get searchConfig(){return this.configurationService.getValue("search")}iterateThroughMatches(re){const oe=this.searchResultEditor.getModel();if(!oe)return;const se=oe.getLineCount()??1,te=oe.getLineLength(se),Z=re?new I.Position(se,te):new I.Position(1,1),ne=this.searchResultEditor.getSelection()?.getStartPosition()??Z,ce=this.getInput()?.getMatchRanges();if(!ce)return;const de=(re?ee:Y)(ce,ne);this.searchResultEditor.setSelection(de),this.searchResultEditor.revealLineInCenterIfOutsideViewport(de.startLineNumber),this.searchResultEditor.focus();const he=oe.getLineContent(de.startLineNumber),pe=oe.getValueInRange(de);let me="";for(let Se=de.startLineNumber;Se>=1;Se--)if(oe.getValueInRange(new b.Range(Se,1,Se,2))!==" "){me=oe.getLineContent(Se);break}(0,R.alert)((0,i.localize)(6,null,pe,he,me.slice(0,me.length-1)))}focusNextResult(){this.iterateThroughMatches(!1)}focusPreviousResult(){this.iterateThroughMatches(!0)}focusAllResults(){this.searchResultEditor.setSelections((this.getInput()?.getMatchRanges()??[]).map(re=>new S.Selection(re.startLineNumber,re.startColumn,re.endLineNumber,re.endColumn))),this.searchResultEditor.focus()}async triggerSearch(re){const oe={resetCursor:!0,delay:0,...re};this.pauseSearching||await this.runSearchDelayer.trigger(async()=>{this.toggleRunAgainMessage(!1),await this.doRunSearch(),oe.resetCursor&&(this.searchResultEditor.setPosition(new I.Position(1,1)),this.searchResultEditor.setScrollPosition({scrollTop:0,scrollLeft:0})),oe.focusResults&&this.searchResultEditor.focus()},oe.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 re=this.getInput();if(!re)return;this.searchHistoryDelayer.trigger(()=>{this.queryEditorWidget.searchInput.onSearchSubmit(),this.inputPatternExcludes.onSearchSubmit(),this.inputPatternIncludes.onSearchSubmit()});const oe=this.readConfigFromWidget();if(!oe.query)return;const se={pattern:oe.query,isRegExp:oe.isRegexp,isCaseSensitive:oe.isCaseSensitive,isWordMatch:oe.matchWholeWord},te={_reason:"searchEditor",extraFileResources:this.instantiationService.invokeFunction(O.getOutOfWorkspaceEditorResources),maxResults:(0,E.withNullAsUndefined)(this.searchConfig.maxResults),disregardIgnoreFiles:!oe.useExcludeSettingsAndIgnoreFiles||void 0,disregardExcludeSettings:!oe.useExcludeSettingsAndIgnoreFiles||void 0,excludePattern:oe.filesToExclude,includePattern:oe.filesToInclude,onlyOpenEditors:oe.onlyOpenEditors,previewOptions:{matchLines:1,charsPerLine:1e3},afterContext:oe.contextLines,beforeContext:oe.contextLines,isSmartCase:this.searchConfig.smartCase,expandPatterns:!0},Z=this.contextService.getWorkspace().folders;let ne;try{ne=this.instantiationService.createInstance(M.QueryBuilder).text(se,Z.map(pe=>pe.uri),te)}catch{return}this.searchOperation.start(500),this.ongoingOperations++;const{configurationModel:ce}=await re.resolveModels();ce.updateConfig(oe),re.ongoingSearchOperation=this.searchModel.search(ne).finally(()=>{this.ongoingOperations--,this.ongoingOperations===0&&this.searchOperation.stop()});const de=await re.ongoingSearchOperation;await this.onSearchComplete(de,oe,re)}async onSearchComplete(re,oe,se){const te=this.getInput();if(!te||te!==se||JSON.stringify(oe)!==JSON.stringify(this.readConfigFromWidget()))return;te.ongoingSearchOperation=void 0;const Z=this.searchConfig.sortOrder;Z==="modified"&&await this.retrieveFileStats(this.searchModel.searchResult),u.ReferencesController.get(this.searchResultEditor)?.closeWidget(!1);const ce=pe=>this.labelService.getUriLabel(pe,{relative:!0}),de=(0,B.serializeSearchResultForEditor)(this.searchModel.searchResult,oe.filesToInclude,oe.filesToExclude,oe.contextLines,ce,Z,re?.limitHit),{resultsModel:he}=await te.resolveModels();if(this.updatingModelForSearch=!0,this.modelService.updateModel(he,de.text),this.updatingModelForSearch=!1,re&&re.messages)for(const pe of re.messages)this.addMessage(pe);this.reLayout(),te.setDirty(!te.hasCapability(4)),te.setMatchRanges(de.matchRanges)}addMessage(re){let oe;this.messageBox.firstChild?oe=this.messageBox.firstChild:oe=t.append(this.messageBox,t.$(".message")),t.append(oe,(0,$.renderSearchMessage)(re,this.instantiationService,this.notificationService,this.openerService,this.commandService,this.messageDisposables,()=>this.triggerSearch()))}async retrieveFileStats(re){const oe=re.matches().filter(se=>!se.fileStat).map(se=>se.resolveFileStat(this.fileService));await Promise.all(oe)}layout(re){this.dimension=re,this.reLayout()}getSelected(){const re=this.searchResultEditor.getSelection();return re?this.searchResultEditor.getModel()?.getValueInRange(re)??"":""}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(re){this.priorConfig=re,re.query!==void 0&&this.queryEditorWidget.setValue(re.query),re.isCaseSensitive!==void 0&&this.queryEditorWidget.searchInput.setCaseSensitive(re.isCaseSensitive),re.isRegexp!==void 0&&this.queryEditorWidget.searchInput.setRegex(re.isRegexp),re.matchWholeWord!==void 0&&this.queryEditorWidget.searchInput.setWholeWords(re.matchWholeWord),re.contextLines!==void 0&&this.queryEditorWidget.setContextLines(re.contextLines),re.filesToExclude!==void 0&&this.inputPatternExcludes.setValue(re.filesToExclude),re.filesToInclude!==void 0&&this.inputPatternIncludes.setValue(re.filesToInclude),re.onlyOpenEditors!==void 0&&this.inputPatternIncludes.setOnlySearchInOpenEditors(re.onlyOpenEditors),re.useExcludeSettingsAndIgnoreFiles!==void 0&&this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(re.useExcludeSettingsAndIgnoreFiles),re.showIncludesExcludes!==void 0&&this.toggleIncludesExcludes(re.showIncludesExcludes)}async setInput(re,oe,se,te){if(await super.setInput(re,oe,se,te),te.isCancellationRequested)return;const{configurationModel:Z,resultsModel:ne}=await re.resolveModels();if(!te.isCancellationRequested&&(this.searchResultEditor.setModel(ne),this.pauseSearching=!0,this.toggleRunAgainMessage(!re.ongoingSearchOperation&&ne.getLineCount()===1&&ne.getValue()===""&&Z.config.query!==""),this.setSearchConfig(Z.config),this._register(Z.onConfigDidUpdate(ce=>{ce!==this.priorConfig&&(this.pauseSearching=!0,this.setSearchConfig(ce),this.pauseSearching=!1)})),this.restoreViewState(se),oe?.preserveFocus||this.focus(),this.pauseSearching=!1,re.ongoingSearchOperation)){const ce=this.readConfigFromWidget();re.ongoingSearchOperation.then(de=>{this.onSearchComplete(de,ce,re)})}}toggleIncludesExcludes(re){const oe="expanded";re??!this.includesExcludesContainer.classList.contains(oe)?(this.toggleQueryDetailsButton.setAttribute("aria-expanded","true"),this.includesExcludesContainer.classList.add(oe)):(this.toggleQueryDetailsButton.setAttribute("aria-expanded","false"),this.includesExcludesContainer.classList.remove(oe)),this.showingIncludesExcludes=this.includesExcludesContainer.classList.contains(oe),this.reLayout()}toEditorViewStateResource(re){if(re.typeId===P.SearchEditorInputTypeId)return re.modelUri}computeEditorViewState(re){const se=this.getControl().saveViewState();if(!!se&&re.toString()===this.getInput()?.modelUri.toString())return{...se,focused:this.searchResultEditor.hasWidgetFocus()?"editor":"input"}}tracksEditorViewState(re){return re.typeId===P.SearchEditorInputTypeId}restoreViewState(re){const oe=this.loadEditorViewState(this.getInput(),re);oe&&this.searchResultEditor.restoreViewState(oe)}getAriaLabel(){return this.getInput()?.getName()??(0,i.localize)(7,null)}};K.ID=P.SearchEditorID,K.SEARCH_EDITOR_VIEW_STATE_PREFERENCE_KEY="searchEditorViewState",K=we([F(0,h.ITelemetryService),F(1,w.IThemeService),F(2,g.IStorageService),F(3,C.IModelService),F(4,D.IWorkspaceContextService),F(5,a.ILabelService),F(6,d.IInstantiationService),F(7,s.IContextViewService),F(8,f.ICommandService),F(9,l.IContextKeyService),F(10,W.IOpenerService),F(11,U.INotificationService),F(12,o.IEditorProgressService),F(13,r.ITextResourceConfigurationService),F(14,V.IEditorGroupsService),F(15,z.IEditorService),F(16,c.IConfigurationService),F(17,H.IFileService)],K),e.SearchEditor=K,(0,w.registerThemingParticipant)((ie,re)=>{re.addRule(`.monaco-editor .${P.SearchEditorFindMatchClass} { background-color: ${ie.getColor(v.searchEditorFindMatch)}; }`);const oe=ie.getColor(v.searchEditorFindMatchBorder);oe&&re.addRule(`.monaco-editor .${P.SearchEditorFindMatchClass} { border: 1px ${(0,G.isHighContrast)(ie.type)?"dotted":"solid"} ${oe}; box-sizing: border-box; }`)}),e.searchEditorTextInputBorder=(0,v.registerColor)("searchEditor.textInputBorder",{dark:v.inputBorder,light:v.inputBorder,hcDark:v.inputBorder,hcLight:v.inputBorder},(0,i.localize)(8,null));function Y(ie,re){for(const oe of ie)if(I.Position.isBefore(re,oe.getStartPosition()))return oe;return ie[0]}function ee(ie,re){for(let oe=ie.length-1;oe>=0;oe--){const se=ie[oe];if(I.Position.isBefore(se.getStartPosition(),re))return se}return ie[ie.length-1]}}),define(ae[996],le([1,0,22,13,105,8,5,49,27,34,45,355,701,553,217,58,24,191,482]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,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 s=w=>{const D=w.get(c.IEditorService);D.activeEditor instanceof r.SearchEditorInput&&D.activeEditorPane.toggleCaseSensitive()};e.toggleSearchEditorCaseSensitiveCommand=s;const d=w=>{const D=w.get(c.IEditorService);D.activeEditor instanceof r.SearchEditorInput&&D.activeEditorPane.toggleWholeWords()};e.toggleSearchEditorWholeWordCommand=d;const n=w=>{const D=w.get(c.IEditorService);D.activeEditor instanceof r.SearchEditorInput&&D.activeEditorPane.toggleRegex()};e.toggleSearchEditorRegexCommand=n;const a=w=>{const D=w.get(c.IEditorService);D.activeEditor instanceof r.SearchEditorInput&&D.activeEditorPane.toggleContextLines()};e.toggleSearchEditorContextLinesCommand=a;const o=(w,D)=>{const y=w.get(c.IEditorService);y.activeEditor instanceof r.SearchEditorInput&&y.activeEditorPane.modifyContextLines(D)};e.modifySearchEditorContextLinesCommand=o;const g=w=>{const D=w.get(c.IEditorService);D.activeEditor instanceof r.SearchEditorInput&&D.activeEditorPane.focusAllResults()};e.selectAllSearchEditorMatchesCommand=g;async function h(w){const D=w.get(S.IViewsService),y=w.get(k.IInstantiationService),T=(0,C.getSearchView)(D);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=h;const v=async(w,D={},y=!1)=>{const T=w.get(c.IEditorService),_=w.get(f.IEditorGroupsService),L=w.get(I.ITelemetryService),M=w.get(k.IInstantiationService),O=w.get(A.IConfigurationService),N=w.get(i.IConfigurationResolverService),P=w.get(b.IWorkspaceContextService),V=w.get(l.IHistoryService).getLastActiveWorkspaceRoot(t.Schemas.file),z=V?(0,p.withNullAsUndefined)(P.getWorkspaceFolder(V)):void 0,x=T.activeTextEditorControl;let H,W="";if(x){(0,R.isDiffEditor)(x)?x.getOriginalEditor().hasTextFocus()?H=x.getOriginalEditor():H=x.getModifiedEditor():H=x;const Q=H?.getSelection();if(W=(Q&&H?.getModel()?.getValueInRange(Q))??"",Q?.isEmpty()&&O.getValue("search").seedWithNearestWord){const j=H.getModel()?.getWordAtPosition(Q.getStartPosition());j&&(W=j.word)}}else T.activeEditor instanceof r.SearchEditorInput&&(W=T.activeEditorPane.getSelected());L.publicLog2("searchEditor/openNewSearchEditor");const $={query:D.location==="new"||O.getValue("editor").find.seedSearchStringFromSelection?W:void 0};for(const Q of Object.entries(D)){const j=Q[0],K=Q[1];K!==void 0&&($[j]=typeof K=="string"?await N.resolveAsync(z,K):K)}const q=T.getEditors(0).find(Q=>Q.editor.typeId===r.SearchEditorInput.ID);let X;if(q&&$.location==="reuse"){const Q=_.getGroup(q.groupId);if(!Q)throw new Error("Invalid group id for search editor");const j=q.editor;X=await Q.openEditor(j),W?X.setQuery(W):X.selectQuery(),X.setSearchConfig($)}else{const Q=M.invokeFunction(r.getOrMakeSearchEditorInput,{config:$,resultsContents:"",from:"rawData"});X=await T.openEditor(Q,{pinned:!0},y?c.SIDE_GROUP:c.ACTIVE_GROUP)}const G=O.getValue("search").searchOnType;($.triggerSearch===!0||$.triggerSearch!==!1&&G&&$.query)&&X.triggerSearch({focusResults:$.focusResults}),$.focusResults||X.focusSearchInput()};e.openNewSearchEditor=v;const m=async(w,D,y,T,_)=>{if(!D.query){console.error("Expected searchResult.query to be defined. Got",D);return}const L=w.get(c.IEditorService),M=w.get(I.ITelemetryService),O=w.get(k.IInstantiationService),N=w.get(E.ILabelService),P=w.get(A.IConfigurationService),B=P.getValue("search").sortOrder;M.publicLog2("searchEditor/createEditorFromSearchResult");const V=U=>N.getUriLabel(U,{relative:!0}),{text:z,matchRanges:x,config:H}=(0,u.serializeSearchResultForEditor)(D,y,T,0,V,B);H.onlyOpenEditors=_;const W=P.getValue("search").searchEditor.defaultNumberOfContextLines;if(D.isDirty||W===0||W===null){const U=O.invokeFunction(r.getOrMakeSearchEditorInput,{resultsContents:z,config:H,from:"rawData"});await L.openEditor(U,{pinned:!0}),U.setMatchRanges(x)}else{const U=O.invokeFunction(r.getOrMakeSearchEditorInput,{from:"rawData",resultsContents:"",config:{...H,contextLines:W}});(await L.openEditor(U,{pinned:!0})).triggerSearch({focusResults:!0})}};e.createEditorFromSearchResult=m}),define(ae[2924],le([1,0,18,9,310,1850,15,31,7,97,5,17,153,44,43,71,45,355,387,341,342,2923,996,701,24,203,169,262,2]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const y="search.action.openInEditor",T="search.action.openNewEditorToSide",_="search.action.focusQueryEditorWidget",L="search.action.focusFilesToInclude",M="search.action.focusFilesToExclude",O="toggleSearchEditorCaseSensitive",N="toggleSearchEditorWholeWord",P="toggleSearchEditorRegex",B="increaseSearchEditorContextLines",V="decreaseSearchEditorContextLines",z="rerunSearchEditorSearch",x="cleanSearchEditorState",H="selectAllSearchEditorMatches";C.Registry.as(i.EditorExtensions.EditorPane).registerEditorPane(r.EditorPaneDescriptor.create(a.SearchEditor,a.SearchEditor.ID,(0,A.localize)(0,null)),[new b.SyncDescriptor(g.SearchEditorInput)]);let W=class{constructor(K,Y){K.registerEditor("*"+g.SEARCH_EDITOR_EXT,{id:g.SearchEditorInput.ID,label:(0,A.localize)(1,null),detail:i.DEFAULT_EDITOR_ASSOCIATION.providerDisplayName,priority:m.RegisteredEditorPriority.default},{singlePerResource:!0,canSupportResource:ee=>(0,t.extname)(ee)===g.SEARCH_EDITOR_EXT},{createEditorInput:({resource:ee})=>({editor:Y.invokeFunction(g.getOrMakeSearchEditorInput,{from:"existingFile",fileUri:ee})})})}};W=we([F(0,m.IEditorResolverService),F(1,S.IInstantiationService)],W);const U=C.Registry.as(u.Extensions.Workbench);U.registerWorkbenchContribution(W,1);class ${canSerialize(K){return!!K.tryReadConfigSync()}serialize(K){if(K.isDisposed())return JSON.stringify({modelUri:void 0,dirty:!1,config:K.tryReadConfigSync(),name:K.getName(),matchRanges:[],backingUri:K.backingUri?.toString()});let Y;(K.modelUri.path||K.modelUri.fragment&&K.isDirty())&&(Y=K.modelUri.toString());const ee=K.tryReadConfigSync(),ie=K.isDirty(),re=ie?K.getMatchRanges():[],oe=K.backingUri;return JSON.stringify({modelUri:Y,dirty:ie,config:ee,name:K.getName(),matchRanges:re,backingUri:oe?.toString()})}deserialize(K,Y){const{modelUri:ee,dirty:ie,config:re,matchRanges:oe,backingUri:se}=JSON.parse(Y);if(re&&re.query!==void 0)if(ee){const te=K.invokeFunction(g.getOrMakeSearchEditorInput,{from:"model",modelUri:p.URI.parse(ee),config:re,backupOf:se?p.URI.parse(se):void 0});return te.setDirty(ie),te.setMatchRanges(oe),te}else return se?K.invokeFunction(g.getOrMakeSearchEditorInput,{from:"existingFile",fileUri:p.URI.parse(se)}):K.invokeFunction(g.getOrMakeSearchEditorInput,{from:"rawData",resultsContents:"",config:re})}}C.Registry.as(i.EditorExtensions.EditorFactory).registerEditorSerializer(g.SearchEditorInput.ID,$),E.CommandsRegistry.registerCommand(x,j=>{const K=j.get(h.IEditorService).activeEditorPane;K instanceof a.SearchEditor&&K.cleanState()});const q={value:(0,A.localize)(2,null),original:"Search Editor"},X=(j={})=>{const K={},Y={includes:"filesToInclude",excludes:"filesToExclude",wholeWord:"matchWholeWord",caseSensitive:"isCaseSensitive",regexp:"isRegexp",useIgnores:"useExcludeSettingsAndIgnoreFiles"};return Object.entries(j).forEach(([ee,ie])=>{K[Y[ee]??ee]=ie}),K},G={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:3073},precondition:n.InSearchEditor,category:q,f1:!0})}async run(j){j.get(I.IContextKeyService).getContext(document.activeElement).getValue(n.InSearchEditor.serialize())&&j.get(h.IEditorService).activeEditorPane.deleteResultBlock()}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:n.OpenNewEditorCommandId,title:{value:(0,A.localize)(4,null),original:"New Search Editor"},category:q,f1:!0,description:G})}async run(j,K){await j.get(S.IInstantiationService).invokeFunction(o.openNewSearchEditor,X({location:"new",...K}))}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:n.OpenEditorCommandId,title:{value:(0,A.localize)(5,null),original:"Open Search Editor"},category:q,f1:!0,description:G})}async run(j,K){await j.get(S.IInstantiationService).invokeFunction(o.openNewSearchEditor,X({location:"reuse",...K}))}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:T,title:{value:(0,A.localize)(6,null),original:"Open new Search Editor to the Side"},category:q,f1:!0,description:G})}async run(j,K){await j.get(S.IInstantiationService).invokeFunction(o.openNewSearchEditor,X(K),!0)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:y,title:{value:(0,A.localize)(7,null),original:"Open Results in Editor"},category:q,f1:!0,keybinding:{primary:515,when:I.ContextKeyExpr.and(d.HasSearchResults,d.SearchViewFocusedKey),weight:200,mac:{primary:2051}}})}async run(j){const K=j.get(c.IViewsService),Y=j.get(S.IInstantiationService),ee=(0,l.getSearchView)(K);ee&&await Y.invokeFunction(o.createEditorFromSearchResult,ee.searchResult,ee.searchIncludePattern.getValue(),ee.searchExcludePattern.getValue(),ee.searchIncludePattern.onlySearchInOpenEditors())}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:z,title:{value:(0,A.localize)(8,null),original:"Search Again"},category:q,keybinding:{primary:3120,when:n.InSearchEditor,weight:100},icon:s.searchRefreshIcon,menu:[{id:k.MenuId.EditorTitle,group:"navigation",when:f.ActiveEditorContext.isEqualTo(n.SearchEditorID)},{id:k.MenuId.CommandPalette,when:f.ActiveEditorContext.isEqualTo(n.SearchEditorID)}]})}async run(j){const K=j.get(h.IEditorService);K.activeEditor instanceof g.SearchEditorInput&&K.activeEditorPane.triggerSearch({resetCursor:!1})}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:_,title:{value:(0,A.localize)(9,null),original:"Focus Search Editor Input"},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:{primary:9,weight:100}})}async run(j){const K=j.get(h.IEditorService);K.activeEditor instanceof g.SearchEditorInput&&K.activeEditorPane.focusSearchInput()}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:L,title:{value:(0,A.localize)(10,null),original:"Focus Search Editor Files to Include"},category:q,f1:!0,precondition:n.InSearchEditor})}async run(j){const K=j.get(h.IEditorService);K.activeEditor instanceof g.SearchEditorInput&&K.activeEditorPane.focusFilesToIncludeInput()}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:M,title:{value:(0,A.localize)(11,null),original:"Focus Search Editor Files to Exclude"},category:q,f1:!0,precondition:n.InSearchEditor})}async run(j){const K=j.get(h.IEditorService);K.activeEditor instanceof g.SearchEditorInput&&K.activeEditorPane.focusFilesToExcludeInput()}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:O,title:{value:(0,A.localize)(12,null),original:"Toggle Match Case"},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:Object.assign({weight:200,when:d.SearchInputBoxFocusedKey},R.ToggleCaseSensitiveKeybinding)})}run(j){(0,o.toggleSearchEditorCaseSensitiveCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:N,title:{value:(0,A.localize)(13,null),original:"Toggle Match Whole Word"},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:Object.assign({weight:200,when:d.SearchInputBoxFocusedKey},R.ToggleWholeWordKeybinding)})}run(j){(0,o.toggleSearchEditorWholeWordCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:P,title:{value:(0,A.localize)(14,null),original:'Toggle Use Regular Expression"'},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:Object.assign({weight:200,when:d.SearchInputBoxFocusedKey},R.ToggleRegexKeybinding)})}run(j){(0,o.toggleSearchEditorRegexCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:n.ToggleSearchEditorContextLinesCommandId,title:{value:(0,A.localize)(15,null),original:'Toggle Context Lines"'},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:{weight:200,primary:554,mac:{primary:2602}}})}run(j){(0,o.toggleSearchEditorContextLinesCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:B,title:{original:"Increase Context Lines",value:(0,A.localize)(16,null)},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:{weight:200,primary:593}})}run(j){(0,o.modifySearchEditorContextLinesCommand)(j,!0)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:V,title:{original:"Decrease Context Lines",value:(0,A.localize)(17,null)},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:{weight:200,primary:595}})}run(j){(0,o.modifySearchEditorContextLinesCommand)(j,!1)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:H,title:{original:"Select All Matches",value:(0,A.localize)(18,null)},category:q,f1:!0,precondition:n.InSearchEditor,keybinding:{weight:200,primary:3114}})}run(j){(0,o.selectAllSearchEditorMatchesCommand)(j)}}),(0,k.registerAction2)(class extends k.Action2{constructor(){super({id:"search.action.openNewEditorFromView",title:(0,A.localize)(19,null),category:q,icon:s.searchNewEditorIcon,menu:[{id:k.MenuId.ViewTitle,group:"navigation",order:2,when:I.ContextKeyExpr.equals("view",v.VIEW_ID)}]})}run(K,...Y){return(0,o.openSearchEditor)(K)}});let Q=class extends D.Disposable{constructor(K,Y){super(),this.instantiationService=K,this.workingCopyEditorService=Y,this.installHandler()}installHandler(){this._register(this.workingCopyEditorService.registerHandler({handles:K=>K.resource.scheme===n.SearchEditorScheme,isOpen:(K,Y)=>Y instanceof g.SearchEditorInput&&(0,t.isEqual)(K.resource,Y.modelUri),createEditor:K=>{const Y=this.instantiationService.invokeFunction(g.getOrMakeSearchEditorInput,{from:"model",modelUri:K.resource});return Y.setDirty(!0),Y}}))}};Q=we([F(0,S.IInstantiationService),F(1,w.IWorkingCopyEditorService)],Q),U.registerWorkbenchContribution(Q,2)}),define(ae[2925],le([1,0,1939,10,36,32,208,112,6,96,88,2,22,49,28,9,239,129,76,38,37,7,8,5,457,24,43,31,12,45,66,41,79,84,15,27,137,126,29,63,204,13,238,179,57,39,23,1179]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TimelineListVirtualDelegate=e.TimelineKeyboardNavigationLabelProvider=e.TimelineIdentityProvider=e.TimelineElementTemplate=e.TimelinePane=e.TimelineExcludeSources=e.TimelineFollowActiveEditorContext=void 0;const G=22;function Q(me){return me instanceof ee}function j(me){return!me?.handle.startsWith("vscode-command:")}function K(me,Se){return me.relativeTime=j(me)?(0,k.fromNow)(me.timestamp):void 0,me.relativeTimeFullWord=j(me)?(0,k.fromNow)(me.timestamp,!1,!0):void 0,Se===void 0||me.relativeTime!==Se?(Se=me.relativeTime,me.hideRelativeTime=!1):me.hideRelativeTime=!0,Se}class Y{constructor(Se){this._stale=!1,this._requiresReset=!1,this.source=Se.source,this.items=Se.items,this._cursor=Se.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(Se,Ie){let ve=!1;if(Se.items.length!==0&&this.items.length!==0){ve=!0;const be=new Set,ge=new Set;for(const De of Se.items)De.id===void 0?ge.add(De.timestamp):be.add(De.id);let ue=this.items.length,Ce;for(;ue--;)Ce=this.items[ue],(Ce.id!==void 0&&be.has(Ce.id)||ge.has(Ce.timestamp))&&this.items.splice(ue,1);(Se.items[Se.items.length-1]?.timestamp??0)>=(this.newest?.timestamp??0)?this.items.splice(0,0,...Se.items):this.items.push(...Se.items)}else Se.items.length!==0&&(ve=!0,this.items.push(...Se.items));return(Ie.cursor!==void 0||typeof Ie.limit!="object")&&(this._cursor=Se.paging?.cursor),ve&&this.items.sort((be,ge)=>ge.timestamp-be.timestamp||(be.source===void 0?ge.source===void 0?0:1:ge.source===void 0?-1:ge.source.localeCompare(be.source,void 0,{numeric:!0,sensitivity:"base"}))),ve}get stale(){return this._stale}get requiresReset(){return this._requiresReset}invalidate(Se){this._stale=!0,this._requiresReset=Se}}class ee{constructor(Se){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.relativeTimeFullWord=void 0,this.hideRelativeTime=void 0,this._loading=!1,this._loading=Se}get loading(){return this._loading}set loading(Se){this._loading=Se}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),e.TimelineExcludeSources=new a.RawContextKey("timelineExcludeSources","[]",!0);let ie=class extends l.ViewPane{constructor(Se,Ie,ve,be,ge,ue,Ce,De,Ae,Pe,fe,ye,ke,Ee,Te,_e,Re,Le){super({...Se,titleMenuId:O.MenuId.TimelineTitle},Ie,ve,ge,be,Ce,De,ke,Ee,Te),this.storageService=ue,this.editorService=Ae,this.commandService=Pe,this.progressService=fe,this.timelineService=ye,this.labelService=_e,this.uriIdentityService=Re,this.extensionService=Le,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(pe,this)),this.followActiveEditorContext=e.TimelineFollowActiveEditorContext.bindTo(this.contextKeyService),this.timelineExcludeSourcesContext=e.TimelineExcludeSources.bindTo(this.contextKeyService);const Me=ge.getValue("timeline.excludeSources");if(Me){ge.updateValue("timeline.excludeSources",void 0);const Ke=JSON.stringify(Me);this.timelineExcludeSourcesContext.set(Ke),ue.store("timeline.excludeSources",Ke,0,0)}const Oe=ue.get("timeline.excludeSources",0,"[]");this.timelineExcludeSourcesContext.set(Oe),this.excludedSources=new Set(JSON.parse(Oe)),this._register(ue.onDidChangeValue(this.onStorageServiceChanged,this)),this._register(ge.onDidChangeConfiguration(this.onConfigurationChanged,this)),this._register(ye.onDidChangeProviders(this.onProvidersChanged,this)),this._register(ye.onDidChangeTimeline(this.onTimelineChanged,this)),this._register(ye.onDidChangeUri(Ke=>this.setUri(Ke),this))}get followActiveEditor(){return this._followActiveEditor}set followActiveEditor(Se){this._followActiveEditor!==Se&&(this._followActiveEditor=Se,this.followActiveEditorContext.set(Se),this.updateFilename(this._filename),Se&&this.onActiveEditorChanged())}get pageOnScroll(){return this._pageOnScroll===void 0&&(this._pageOnScroll=this.configurationService.getValue("timeline.pageOnScroll")??!1),this._pageOnScroll}get pageSize(){let Se=this.configurationService.getValue("timeline.pageSize");return Se==null&&(Se=Math.max(20,Math.floor(this.tree.renderHeight/G+(this.pageOnScroll?1:-1)))),Se}reset(){this.loadTimeline(!0)}setUri(Se){this.setUriCore(Se,!0)}setUriCore(Se,Ie){Ie&&(this.followActiveEditor=!1),this.uri=Se,this.updateFilename(Se?this.labelService.getUriBasenameLabel(Se):void 0),this.treeRenderer?.setUri(Se),this.loadTimeline(!0)}onStorageServiceChanged(Se){if(Se.key==="timeline.excludeSources"){const Ie=this.storageService.get("timeline.excludeSources",0,"[]");this.timelineExcludeSourcesContext.set(Ie),this.excludedSources=new Set(JSON.parse(Ie));const ve=this.timelineService.getSources().filter(({id:be})=>!this.excludedSources.has(be)&&!this.timelinesBySource.has(be));ve.length!==0?this.loadTimeline(!0,ve.map(({id:be})=>be)):this.refresh()}}onConfigurationChanged(Se){Se.affectsConfiguration("timeline.pageOnScroll")&&(this._pageOnScroll=void 0)}onActiveEditorChanged(){if(!this.followActiveEditor||!this.isExpanded())return;const Se=m.EditorResourceAccessor.getOriginalUri(this.editorService.activeEditor,{supportSideBySide:m.SideBySideEditor.PRIMARY});if(this.uriIdentityService.extUri.isEqual(Se,this.uri)&&Se!==void 0||Se?.fsPath===this.uri?.fsPath&&(Se?.scheme===r.Schemas.file||Se?.scheme==="git")&&(this.uri?.scheme===r.Schemas.file||this.uri?.scheme==="git")){for(const Ie of this.timelineService.getSources()){if(this.excludedSources.has(Ie.id))continue;const ve=this.timelinesBySource.get(Ie.id);ve!==void 0&&!ve.stale||(ve!==void 0?this.updateTimeline(ve,ve.requiresReset):this.loadTimelineForSource(Ie.id,Se,!0))}return}this.setUriCore(Se,!1)}onProvidersChanged(Se){if(Se.removed){for(const Ie of Se.removed)this.timelinesBySource.delete(Ie);this.refresh()}Se.added&&this.loadTimeline(!0,Se.added)}onTimelineChanged(Se){if(Se?.uri===void 0||this.uriIdentityService.extUri.isEqual(Se.uri,this.uri)){const Ie=this.timelinesBySource.get(Se.id);if(Ie===void 0)return;this.isBodyVisible()?this.updateTimeline(Ie,Se.reset):Ie.invalidate(Se.reset)}}updateFilename(Se){this._filename=Se,this.followActiveEditor||!Se?this.updateTitleDescription(Se):this.updateTitleDescription(`${Se} (pinned)`)}get message(){return this._message}set message(Se){this._message=Se,this.updateMessage()}updateMessage(){this._message!==void 0?this.showMessage(this._message):this.hideMessage()}showMessage(Se){this.$message.classList.remove("hide"),this.resetMessageElement(),this.$message.textContent=Se}hideMessage(){this.resetMessageElement(),this.$message.classList.add("hide")}resetMessageElement(){p.clearNode(this.$message)}get hasVisibleItems(){return this._visibleItemCount>0}clear(Se){if(this._visibleItemCount=0,this._maxItemCount=this.pageSize,this.timelinesBySource.clear(),Se){for(const{tokenSource:Ie}of this.pendingRequests.values())Ie.dispose(!0);this.pendingRequests.clear(),this.isBodyVisible()||(this.tree.setChildren(null,void 0),this._isEmpty=!0)}}async loadTimeline(Se,Ie){if(Ie===void 0){if(Se&&this.clear(!0),this.uri?.scheme===r.Schemas.vscodeSettings||this.uri?.scheme===r.Schemas.webviewPanel||this.uri?.scheme===r.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 ve=!1;for(const be of Ie??this.timelineService.getSources().map(ge=>ge.id))this.loadTimelineForSource(be,this.uri,Se)&&(ve=!0);ve?this._isEmpty&&this.setLoadingUriMessage():this.refresh()}loadTimelineForSource(Se,Ie,ve,be){if(this.excludedSources.has(Se))return!1;const ge=this.timelinesBySource.get(Se);if(!ve&&be?.cursor!==void 0&&ge!==void 0&&(!ge?.more||ge.items.length>ge.lastRenderedIndex+this.pageSize))return!1;be===void 0&&(be={cursor:ve?void 0:ge?.cursor,limit:this.pageSize});let ue=this.pendingRequests.get(Se);return ue!==void 0&&(be.cursor=ue.options.cursor,typeof be.limit=="number"&&(typeof ue.options.limit=="number"?be.limit+=ue.options.limit:be.limit=ue.options.limit)),ue?.tokenSource.dispose(!0),be.cacheResults=!0,be.resetCache=ve,ue=this.timelineService.getTimeline(Se,Ie,be,new A.CancellationTokenSource),ue===void 0?!1:(this.pendingRequests.set(Se,ue),ue.tokenSource.token.onCancellationRequested(()=>this.pendingRequests.delete(Se)),this.handleRequest(ue),!0)}updateTimeline(Se,Ie){if(Ie){this.timelinesBySource.delete(Se.source);const{oldest:ve}=Se;this.loadTimelineForSource(Se.source,this.uri,!0,ve!==void 0?{limit:{timestamp:ve.timestamp,id:ve.id}}:void 0)}else{const{newest:ve}=Se;this.loadTimelineForSource(Se.source,this.uri,!1,ve!==void 0?{limit:{timestamp:ve.timestamp,id:ve.id}}:{limit:this.pageSize})}}async handleRequest(Se){let Ie;try{Ie=await this.progressService.withProgress({location:this.id},()=>Se.result)}finally{this.pendingRequests.delete(Se.source)}if(Ie===void 0||Se.tokenSource.token.isCancellationRequested||Se.uri!==this.uri){this.pendingRequests.size===0&&this._pendingRefresh&&this.refresh();return}const ve=Se.source;let be=!1;const ge=this.timelinesBySource.get(ve);ge===void 0?(this.timelinesBySource.set(ve,new Y(Ie)),be=!0):be=ge.add(Ie,Se.options),be?(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 Se=!1;if(this.uri===void 0||this.timelinesBySource.size===0){this._visibleItemCount=0;return}const Ie=this._maxItemCount;let ve=0;if(this.timelinesBySource.size===1){const[be,ge]=S.Iterable.first(this.timelinesBySource);if(ge.lastRenderedIndex=-1,this.excludedSources.has(be)){this._visibleItemCount=0;return}ge.items.length!==0&&(this._visibleItemCount=1),Se=ge.more;let ue;for(const Ce of ge.items){if(Ce.relativeTime=void 0,Ce.hideRelativeTime=void 0,ve++,ve>Ie){Se=!0;break}ue=K(Ce,ue),yield{element:Ce}}ge.lastRenderedIndex=ve-1}else{let Ce=function(){return be.filter(Pe=>!Pe.nextItem.done).reduce((Pe,fe)=>Pe===void 0||fe.nextItem.value.timestamp>=Pe.nextItem.value.timestamp?fe:Pe,void 0)};const be=[];let ge=!1,ue=0;for(const[Pe,fe]of this.timelinesBySource){if(fe.lastRenderedIndex=-1,this.excludedSources.has(Pe)||fe.stale)continue;if(fe.items.length!==0&&(ge=!0),fe.more){Se=!0;const ke=fe.items[Math.min(Ie,fe.items.length-1)];ke.timestamp>ue&&(ue=ke.timestamp)}const ye=fe.items[Symbol.iterator]();be.push({timeline:fe,iterator:ye,nextItem:ye.next()})}this._visibleItemCount=ge?1:0;let De,Ae;for(;Ae=Ce();){Ae.timeline.lastRenderedIndex++;const Pe=Ae.nextItem.value;if(Pe.relativeTime=void 0,Pe.hideRelativeTime=void 0,Pe.timestamp>=ue){if(ve++,ve>Ie){Se=!0;break}De=K(Pe,De),yield{element:Pe}}Ae.nextItem=Ae.iterator.next()}}this._visibleItemCount=ve,ve>0&&(Se?yield{element:new ee(this.pendingRequests.size!==0)}:this.pendingRequests.size!==0&&(yield{element:new ee(!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(Se){const Ie=super.setExpanded(Se);return Ie&&this.isBodyVisible()&&(this.followActiveEditor?this.onActiveEditorChanged():this.setUriCore(this.uri,!0)),Ie}setVisible(Se){Se?(this.extensionService.activateByEvent("onView:timeline"),this.visibilityDisposables=new C.DisposableStore,this.editorService.onDidActiveEditorChange(this.onActiveEditorChanged,this,this.visibilityDisposables),this.onDidFocus(()=>this.refreshDebounced(),this,this.visibilityDisposables),super.setVisible(Se),this.onActiveEditorChanged()):(this.visibilityDisposables?.dispose(),super.setVisible(Se))}layoutBody(Se,Ie){super.layoutBody(Se,Ie),this.tree.layout(Se,Ie)}renderHeaderTitle(Se){super.renderHeaderTitle(Se,this.title),Se.classList.add("timeline-view")}renderBody(Se){super.renderBody(Se),this.$container=Se,Se.classList.add("tree-explorer-viewlet-tree-view","timeline-tree-view"),this.$message=p.append(this.$container,p.$(".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"),Se.appendChild(this.$tree),this.treeRenderer=this.instantiationService.createInstance(ne,this.commands),this.treeRenderer.onDidScrollToEnd(Ie=>{this.pageOnScroll&&this.loadMore(Ie)}),this.tree=this.instantiationService.createInstance(s.WorkbenchObjectTree,"TimelinePane",this.$tree,new Z,[this.treeRenderer],{identityProvider:new oe,accessibilityProvider:{getAriaLabel(Ie){return Q(Ie)?Ie.ariaLabel:Ie.accessibilityInformation?Ie.accessibilityInformation.label:(0,t.localize)(6,null,Ie.relativeTimeFullWord??"",Ie.label)},getRole(Ie){return Q(Ie)?"treeitem":Ie.accessibilityInformation&&Ie.accessibilityInformation.role?Ie.accessibilityInformation.role:"treeitem"},getWidgetAriaLabel(){return(0,t.localize)(7,null)}},keyboardNavigationLabelProvider:new te,multipleSelectionSupport:!1,overrideStyles:{listBackground:this.getBackgroundColor()}}),this._register(this.tree.onContextMenu(Ie=>this.onContextMenu(this.commands,Ie))),this._register(this.tree.onDidChangeSelection(Ie=>this.ensureValidItems())),this._register(this.tree.onDidOpen(Ie=>{if(!Ie.browserEvent||!this.ensureValidItems())return;const ve=this.tree.getSelection();let be;if(ve.length===1&&(be=ve[0]),be!==null)if(j(be)){if(be.command){let ge=be.command.arguments??[];(be.command.id===x.API_OPEN_EDITOR_COMMAND_ID||be.command.id===x.API_OPEN_DIFF_EDITOR_COMMAND_ID)&&(ge=[...ge,Ie]),this.commandService.executeCommand(be.command.id,...ge)}}else Q(be)&&this.loadMore(be)}))}loadMore(Se){Se.loading||(Se.loading=!0,this.tree.rerender(Se),this.pendingRequests.size===0&&(this._maxItemCount=this._visibleItemCount+this.pageSize,this.loadTimeline(!1)))}ensureValidItems(){return!this.hasVisibleItems||!this.timelineService.getSources().some(({id:Se})=>!this.excludedSources.has(Se)&&this.timelinesBySource.has(Se))?(this.tree.setChildren(null,void 0),this._isEmpty=!0,this.setLoadingUriMessage(),!1):!0}setLoadingUriMessage(){const Se=this.uri&&this.labelService.getUriBasenameLabel(this.uri);this.updateFilename(Se),this.message=Se?(0,t.localize)(8,null,Se):""}onContextMenu(Se,Ie){const ve=Ie.element;if(ve===null)return;const be=Ie.browserEvent;if(be.preventDefault(),be.stopPropagation(),!this.ensureValidItems())return;this.tree.setFocus([ve]);const ge=Se.getItemContextActions(ve);!ge.length||this.contextMenuService.showContextMenu({getAnchor:()=>Ie.anchor,getActions:()=>ge,getActionViewItem:ue=>{const Ce=this.keybindingService.lookupKeybinding(ue.id);if(Ce)return new P.ActionViewItem(ue,ue,{label:!0,keybinding:Ce.getLabel()})},onHide:ue=>{ue&&this.tree.domFocus()},getActionsContext:()=>({uri:this.uri,item:ve}),actionRunner:new se})}};ie.TITLE=(0,t.localize)(2,null),we([(0,E.debounce)(500)],ie.prototype,"refreshDebounced",null),ie=we([F(1,d.IKeybindingService),F(2,n.IContextMenuService),F(3,a.IContextKeyService),F(4,o.IConfigurationService),F(5,X.IStorageService),F(6,y.IViewDescriptorService),F(7,g.IInstantiationService),F(8,v.IEditorService),F(9,w.ICommandService),F(10,T.IProgressService),F(11,h.ITimelineService),F(12,_.IOpenerService),F(13,D.IThemeService),F(14,N.ITelemetryService),F(15,u.ILabelService),F(16,$.IUriIdentityService),F(17,q.IExtensionService)],ie),e.TimelinePane=ie;class re{constructor(Se,Ie,ve){this.container=Se,this.hoverDelegate=ve,Se.classList.add("custom-view-tree-node-item"),this.icon=p.append(Se,p.$(".custom-view-tree-node-item-icon")),this.iconLabel=new c.IconLabel(Se,{supportHighlights:!0,supportIcons:!0,hoverDelegate:this.hoverDelegate});const be=p.append(this.iconLabel.element,p.$(".timeline-timestamp-container"));this.timestamp=p.append(be,p.$("span.timeline-timestamp"));const ge=p.append(this.iconLabel.element,p.$(".actions"));this.actionBar=new L.ActionBar(ge,{actionViewItemProvider:Ie})}dispose(){this.iconLabel.dispose(),this.actionBar.dispose()}reset(){this.icon.className="",this.icon.style.backgroundImage="",this.actionBar.clear()}}e.TimelineElementTemplate=re,re.id="TimelineElementTemplate";class oe{getId(Se){return Se.handle}}e.TimelineIdentityProvider=oe;class se extends R.ActionRunner{async runAction(Se,{uri:Ie,item:ve}){if(!j(ve)){await Se.run();return}await Se.run({$mid:11,handle:ve.handle,source:ve.source,uri:Ie},Ie,ve.source)}}class te{getKeyboardNavigationLabel(Se){return Se.label}}e.TimelineKeyboardNavigationLabelProvider=te;class Z{getHeight(Se){return G}getTemplateId(Se){return re.id}}e.TimelineListVirtualDelegate=Z;let ne=class{constructor(Se,Ie,ve,be,ge){this.commands=Se,this.instantiationService=Ie,this.themeService=ve,this.hoverService=be,this.configurationService=ge,this._onDidScrollToEnd=new I.Emitter,this.onDidScrollToEnd=this._onDidScrollToEnd.event,this.templateId=re.id,this.actionViewItemProvider=M.createActionViewItem.bind(void 0,this.instantiationService),this._hoverDelegate={showHover:ue=>this.hoverService.showHover(ue),delay:this.configurationService.getValue("workbench.hover.delay")}}setUri(Se){this.uri=Se}renderTemplate(Se){return new re(Se,this.actionViewItemProvider,this._hoverDelegate)}renderElement(Se,Ie,ve,be){ve.reset();const{element:ge}=Se,ue=this.themeService.getColorTheme(),Ce=ue.type===B.ColorScheme.LIGHT?ge.icon:ge.iconDark,De=Ce?f.URI.revive(Ce):null;De?(ve.icon.className="custom-view-tree-node-item-icon",ve.icon.style.backgroundImage=p.asCSSUrl(De),ve.icon.style.color=""):ge.themeIcon?(ve.icon.className=`custom-view-tree-node-item-icon ${D.ThemeIcon.asClassName(ge.themeIcon)}`,ge.themeIcon.color&&(ve.icon.style.color=ue.getColor(ge.themeIcon.color.id)?.toString()??""),ve.icon.style.backgroundImage=""):(ve.icon.className="custom-view-tree-node-item-icon",ve.icon.style.backgroundImage="",ve.icon.style.color="");const Ae=ge.tooltip?(0,H.isString)(ge.tooltip)?ge.tooltip:{markdown:ge.tooltip,markdownNotSupportedFallback:(0,W.renderMarkdownAsPlaintext)(ge.tooltip)}:void 0;ve.iconLabel.setLabel(ge.label,ge.description,{title:Ae,matches:(0,b.createMatches)(Se.filterData)}),ve.timestamp.textContent=ge.relativeTime??"",ve.timestamp.ariaLabel=ge.relativeTimeFullWord??"",ve.timestamp.parentElement.classList.toggle("timeline-timestamp--duplicate",j(ge)&&ge.hideRelativeTime),ve.actionBar.context={uri:this.uri,item:ge},ve.actionBar.actionRunner=new se,ve.actionBar.push(this.commands.getItemActions(ge),{icon:!0,label:!1}),Q(ge)&&setTimeout(()=>this._onDidScrollToEnd.fire(ge),0)}disposeTemplate(Se){Se.iconLabel.dispose()}};ne=we([F(1,g.IInstantiationService),F(2,D.IThemeService),F(3,U.IHoverService),F(4,o.IConfigurationService)],ne);const ce=(0,z.registerIcon)("timeline-refresh",V.Codicon.refresh,(0,t.localize)(9,null)),de=(0,z.registerIcon)("timeline-pin",V.Codicon.pin,(0,t.localize)(10,null)),he=(0,z.registerIcon)("timeline-unpin",V.Codicon.pinned,(0,t.localize)(11,null));let pe=class extends C.Disposable{constructor(Se,Ie,ve,be,ge){super(),this.pane=Se,this.timelineService=Ie,this.storageService=ve,this.contextKeyService=be,this.menuService=ge,this._register(this.sourceDisposables=new C.DisposableStore),this._register((0,O.registerAction2)(class extends O.Action2{constructor(){super({id:"timeline.refresh",title:{value:(0,t.localize)(12,null),original:"Refresh"},icon:ce,category:{value:(0,t.localize)(13,null),original:"Timeline"},menu:{id:O.MenuId.TimelineTitle,group:"navigation",order:99}})}run(ue,...Ce){Se.reset()}})),this._register(w.CommandsRegistry.registerCommand("timeline.toggleFollowActiveEditor",(ue,...Ce)=>Se.followActiveEditor=!Se.followActiveEditor)),this._register(O.MenuRegistry.appendMenuItem(O.MenuId.TimelineTitle,{command:{id:"timeline.toggleFollowActiveEditor",title:{value:(0,t.localize)(14,null),original:"Pin the Current Timeline"},icon:de,category:{value:(0,t.localize)(15,null),original:"Timeline"}},group:"navigation",order:98,when:e.TimelineFollowActiveEditorContext})),this._register(O.MenuRegistry.appendMenuItem(O.MenuId.TimelineTitle,{command:{id:"timeline.toggleFollowActiveEditor",title:{value:(0,t.localize)(16,null),original:"Unpin the Current Timeline"},icon:he,category:{value:(0,t.localize)(17,null),original:"Timeline"}},group:"navigation",order:98,when:e.TimelineFollowActiveEditorContext.toNegated()})),this._register(Ie.onDidChangeProviders(()=>this.updateTimelineSourceFilters())),this.updateTimelineSourceFilters()}getItemActions(Se){return this.getActions(O.MenuId.TimelineItemContext,{key:"timelineItem",value:Se.contextValue}).primary}getItemContextActions(Se){return this.getActions(O.MenuId.TimelineItemContext,{key:"timelineItem",value:Se.contextValue}).secondary}getActions(Se,Ie){const ve=this.contextKeyService.createOverlay([["view",this.pane.id],[Ie.key,Ie.value]]),be=this.menuService.createMenu(Se,ve),Ce={primary:[],secondary:[]};return(0,M.createAndFillInContextMenuActions)(be,{shouldForwardArgs:!0},Ce,"inline"),be.dispose(),Ce}updateTimelineSourceFilters(){this.sourceDisposables.clear();const Se=new Set(JSON.parse(this.storageService.get("timeline.excludeSources",0,"[]")));for(const Ie of this.timelineService.getSources())this.sourceDisposables.add((0,O.registerAction2)(class extends O.Action2{constructor(){super({id:`timeline.toggleExcludeSource:${Ie.id}`,title:Ie.label,menu:{id:O.MenuId.TimelineFilterSubMenu,group:"navigation"},toggled:a.ContextKeyExpr.regex("timelineExcludeSources",new RegExp(`\\b${(0,i.escapeRegExpCharacters)(Ie.id)}\\b`)).negate()})}run(ve,...be){Se.has(Ie.id)?Se.delete(Ie.id):Se.add(Ie.id),ve.get(X.IStorageService).store("timeline.excludeSources",JSON.stringify([...Se.keys()]),0,0)}}))}};pe=we([F(1,h.ITimelineService),F(2,X.IStorageService),F(3,a.IContextKeyService),F(4,O.IMenuService)],pe)}),define(ae[2926],le([1,0,6,2,1962,15,97,35,17,153,44,43,58,2596,545,316,946,350]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),I.Registry.as(C.EditorExtensions.EditorPane).registerEditorPane(b.EditorPaneDescriptor.create(i.WebviewEditor,i.WebviewEditor.ID,(0,R.localize)(0,null)),[new k.SyncDescriptor(f.WebviewInput)]);let s=class extends p.Disposable{constructor(a){super(),this.editorGroupService=a,this.editorGroupService.whenReady.then(()=>this.editorGroupService.groups.forEach(o=>{this.registerGroupListener(o)})),this._register(this.editorGroupService.onDidAddGroup(o=>this.registerGroupListener(o)))}registerGroupListener(a){const o=a.onWillOpenEditor(g=>this.onEditorOpening(g.editor,a));t.Event.once(a.onWillDispose)(()=>{o.dispose()})}onEditorOpening(a,o){if(!(a instanceof f.WebviewInput)||a.typeId!==f.WebviewInput.typeId||o.contains(a))return;let g;const h=this.editorGroupService.groups;for(const v of h)if(v.contains(a)){g=v;break}!g||g.closeEditor(a)}};s=we([F(0,r.IEditorGroupsService)],s),I.Registry.as(S.Extensions.Workbench).registerWorkbenchContribution(s,1),I.Registry.as(C.EditorExtensions.EditorFactory).registerEditorSerializer(c.WebviewEditorInputSerializer.ID,c.WebviewEditorInputSerializer),(0,E.registerSingleton)(l.IWebviewWorkbenchService,l.WebviewEditorService,1),(0,A.registerAction2)(u.ShowWebViewEditorFindWidgetAction),(0,A.registerAction2)(u.HideWebViewEditorFindCommand),(0,A.registerAction2)(u.WebViewEditorFindNextCommand),(0,A.registerAction2)(u.WebViewEditorFindPreviousCommand),(0,A.registerAction2)(u.ReloadWebviewAction)}),define(ae[2927],le([1,0,1978,662,923,2507,905,2481,17,43,97,15,44,153,98]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),I.Registry.as(b.EditorExtensions.EditorPane).registerEditorPane(u.EditorPaneDescriptor.create(R.WalkThroughPart,R.WalkThroughPart.ID,(0,t.localize)(0,null)),[new S.SyncDescriptor(p.WalkThroughInput)]),(0,C.registerAction2)(E.EditorWalkThroughAction),I.Registry.as(b.EditorExtensions.EditorFactory).registerEditorSerializer(E.EditorWalkThroughInputSerializer.ID,E.EditorWalkThroughInputSerializer),I.Registry.as(r.Extensions.Workbench).registerWorkbenchContribution(k.WalkThroughSnippetContentProvider,1),i.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughArrowUp),i.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughArrowDown),i.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughPageUp),i.KeybindingsRegistry.registerCommandAndKeybindingRule(A.WalkThroughPageDown),C.MenuRegistry.appendMenuItem(C.MenuId.MenubarHelpMenu,{group:"1_welcome",command:{id:"workbench.action.showInteractivePlayground",title:(0,t.localize)(1,null)},order:3})}),define(ae[997],le([1,0,2041,6,13,78,43,394,170,19,42,54,11,25,53,136,354,157,49,32,466,94,294,107,18,111,125,39]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditorModel=void 0;let D=class Ar extends E.BaseTextEditorModel{constructor(T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q){super(O,M,W,U),this.resource=T,this.preferredEncoding=_,this.preferredLanguageId=L,this.fileService=N,this.textFileService=P,this.workingCopyBackupService=B,this.logService=V,this.workingCopyService=z,this.filesConfigurationService=x,this.labelService=H,this.pathService=$,this.extensionService=q,this._onDidChangeContent=this._register(new p.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidResolve=this._register(new p.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new p.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidSaveError=this._register(new p.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new p.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new p.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeEncoding=this._register(new p.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this._onDidChangeOrphaned=this._register(new p.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidChangeReadonly=this._register(new p.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this.typeId=c.NO_TYPE_ID,this.capabilities=0,this.name=(0,i.basename)(this.labelService.getUriLabel(this.resource)),this.resourceHasExtension=!!h.extUri.extname(this.resource),this.versionId=0,this.ignoreDirtyOnModelContentChange=!1,this.lastModelContentChangeFromUndoRedo=void 0,this.saveSequentializer=new r.TaskSequentializer,this.dirty=!1,this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,this.hasEncodingSetExplicitly=!1,this._register(this.workingCopyService.registerWorkingCopy(this)),this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(T=>this.onDidFilesChange(T))),this._register(this.filesConfigurationService.onFilesAssociationChange(()=>this.onFilesAssociationChange()))}async onDidFilesChange(T){let _=!1,L;if(this.inOrphanMode?T.contains(this.resource,1)&&(L=!1,_=!0):T.contains(this.resource,2)&&(L=!0,_=!0),_&&this.inOrphanMode!==L){let M=!1;L&&(await(0,r.timeout)(100),this.isDisposed()?M=!0:M=!await this.fileService.exists(this.resource)),this.inOrphanMode!==M&&!this.isDisposed()&&this.setOrphaned(M)}}setOrphaned(T){this.inOrphanMode!==T&&(this.inOrphanMode=T,this._onDidChangeOrphaned.fire())}onFilesAssociationChange(){if(!this.isResolved())return;const T=this.getFirstLineText(this.textEditorModel),_=this.getOrCreateLanguage(this.resource,this.languageService,this.preferredLanguageId,T);this.modelService.setMode(this.textEditorModel,_)}setLanguageId(T,_){super.setLanguageId(T,_),this.preferredLanguageId=T}async backup(T){let _;this.lastResolvedFileStat&&(_={mtime:this.lastResolvedFileStat.mtime,ctime:this.lastResolvedFileStat.ctime,size:this.lastResolvedFileStat.size,etag:this.lastResolvedFileStat.etag,orphaned:this.inOrphanMode});const L=await this.textFileService.getEncodedReadable(this.resource,(0,R.withNullAsUndefined)(this.createSnapshot()),{encoding:n.UTF8});return{meta:_,content:L}}async revert(T){if(!this.isResolved())return;const _=this.dirty,L=this.doSetDirty(!1);if(!T?.soft)try{await this.forceResolveFromFile()}catch(O){if(O.fileOperationResult!==1)throw L(),O}this._onDidRevert.fire(),_&&this._onDidChangeDirty.fire()}async resolve(T){if(this.trace("resolve() - enter"),this.isDisposed()){this.trace("resolve() - exit - without resolving because model is disposed");return}if(!T?.contents&&(this.dirty||this.saveSequentializer.hasPending())){this.trace("resolve() - exit - without resolving because model is dirty or being saved");return}return this.doResolve(T)}async doResolve(T){if(T?.contents)return this.resolveFromBuffer(T.contents,T);if(!(!this.isResolved()&&await this.resolveFromBackup(T)))return this.resolveFromFile(T)}async resolveFromBuffer(T,_){this.trace("resolveFromBuffer()");let L,M,O,N;try{const B=await this.fileService.stat(this.resource);L=B.mtime,M=B.ctime,O=B.size,N=B.etag,this.setOrphaned(!1)}catch(B){L=Date.now(),M=Date.now(),O=0,N=b.ETAG_DISABLED,this.setOrphaned(B.fileOperationResult===1)}const P=await this.textFileService.encoding.getPreferredWriteEncoding(this.resource,this.preferredEncoding);this.resolveFromContent({resource:this.resource,name:this.name,mtime:L,ctime:M,size:O,etag:N,value:T,encoding:P.encoding,readonly:!1},!0,_)}async resolveFromBackup(T){const _=await this.workingCopyBackupService.resolve(this);let L=n.UTF8;return _&&(L=(await this.textFileService.encoding.getPreferredWriteEncoding(this.resource,this.preferredEncoding)).encoding),!this.isResolved()?_?(await this.doResolveFromBackup(_,L,T),!0):!1:(this.trace("resolveFromBackup() - exit - without resolving because previously new model got created meanwhile"),!0)}async doResolveFromBackup(T,_,L){this.trace("doResolveFromBackup()"),this.resolveFromContent({resource:this.resource,name:this.name,mtime:T.meta?T.meta.mtime:Date.now(),ctime:T.meta?T.meta.ctime:Date.now(),size:T.meta?T.meta.size:0,etag:T.meta?T.meta.etag:b.ETAG_DISABLED,value:await(0,a.createTextBufferFactoryFromStream)(await this.textFileService.getDecodedStream(this.resource,T.value,{encoding:n.UTF8})),encoding:_,readonly:!1},!0,L),T.meta?.orphaned&&this.setOrphaned(!0)}async resolveFromFile(T){this.trace("resolveFromFile()");const _=T?.forceReadFromFile,L=this.isResolved()||T?.allowBinary;let M;_?M=b.ETAG_DISABLED:this.lastResolvedFileStat&&(M=this.lastResolvedFileStat.etag);const O=this.versionId;try{const N=await this.textFileService.readStream(this.resource,{acceptTextOnly:!L,etag:M,encoding:this.preferredEncoding});if(this.setOrphaned(!1),O!==this.versionId){this.trace("resolveFromFile() - exit - without resolving because model content changed");return}return this.resolveFromContent(N,!1,T)}catch(N){const P=N.fileOperationResult;if(this.setOrphaned(P===1),this.isResolved()&&P===2){N instanceof b.NotModifiedSinceFileOperationError&&this.updateLastResolvedFileStat(N.stat);return}if(this.isResolved()&&P===1&&!_)return;throw N}}resolveFromContent(T,_,L){if(this.trace("resolveFromContent() - enter"),this.isDisposed()){this.trace("resolveFromContent() - exit - because model is disposed");return}this.updateLastResolvedFileStat({resource:this.resource,name:T.name,mtime:T.mtime,ctime:T.ctime,size:T.size,etag:T.etag,readonly:T.readonly,isFile:!0,isDirectory:!1,isSymbolicLink:!1,children:void 0});const M=this.contentEncoding;this.contentEncoding=T.encoding,this.preferredEncoding?this.updatePreferredEncoding(this.contentEncoding):M!==this.contentEncoding&&this._onDidChangeEncoding.fire(),this.textEditorModel?this.doUpdateTextModel(T.value):this.doCreateTextModel(T.resource,T.value),this.setDirty(!!_),this._onDidResolve.fire(L?.reason??3)}doCreateTextModel(T,_){this.trace("doCreateTextModel()");const L=this.createTextEditorModel(_,T,this.preferredLanguageId);this.installModelListeners(L),this.autoDetectLanguage()}doUpdateTextModel(T){this.trace("doUpdateTextModel()"),this.ignoreDirtyOnModelContentChange=!0;try{this.updateTextEditorModel(T,this.preferredLanguageId)}finally{this.ignoreDirtyOnModelContentChange=!1}}installModelListeners(T){this._register(T.onDidChangeContent(_=>this.onModelContentChanged(T,_.isUndoing||_.isRedoing))),this._register(T.onDidChangeLanguage(()=>this.onMaybeShouldChangeEncoding())),super.installModelListeners(T)}onModelContentChanged(T,_){if(this.trace("onModelContentChanged() - enter"),this.versionId++,this.trace(`onModelContentChanged() - new versionId ${this.versionId}`),_&&(this.lastModelContentChangeFromUndoRedo=Date.now()),!this.ignoreDirtyOnModelContentChange&&!this.isReadonly())if(T.getAlternativeVersionId()===this.bufferSavedVersionId){this.trace("onModelContentChanged() - model content changed back to last saved version");const L=this.dirty;this.setDirty(!1),L&&this._onDidRevert.fire()}else this.trace("onModelContentChanged() - model content changed and marked as dirty"),this.setDirty(!0);this._onDidChangeContent.fire(),this.autoDetectLanguage()}async autoDetectLanguage(){await this.extensionService?.whenInstalledExtensionsRegistered();const T=this.getLanguageId();if(this.resource.scheme===this.pathService.defaultUriScheme&&(!T||T===m.PLAINTEXT_LANGUAGE_ID)&&!this.resourceHasExtension)return super.autoDetectLanguage()}async forceResolveFromFile(){this.isDisposed()||await this.textFileService.files.resolve(this.resource,{reload:{async:!1},forceReadFromFile:!0})}isDirty(){return this.dirty}setDirty(T){if(!this.isResolved())return;const _=this.dirty;this.doSetDirty(T),T!==_&&this._onDidChangeDirty.fire()}doSetDirty(T){const _=this.dirty,L=this.inConflictMode,M=this.inErrorMode,O=this.bufferSavedVersionId;return T?this.dirty=!0:(this.dirty=!1,this.inConflictMode=!1,this.inErrorMode=!1,this.updateSavedVersionId()),()=>{this.dirty=_,this.inConflictMode=L,this.inErrorMode=M,this.bufferSavedVersionId=O}}async save(T=Object.create(null)){return this.isResolved()?this.isReadonly()?(this.trace("save() - ignoring request for readonly resource"),!1):(this.hasState(3)||this.hasState(5))&&(T.reason===2||T.reason===3||T.reason===4)?(this.trace("save() - ignoring auto save request for model that is in conflict or error"),!1):(this.trace("save() - enter"),await this.doSave(T),this.trace("save() - exit"),this.hasState(0)):!1}async doSave(T){typeof T.reason!="number"&&(T.reason=1);let _=this.versionId;if(this.trace(`doSave(${_}) - enter with versionId ${_}`),this.saveSequentializer.hasPending(_))return this.trace(`doSave(${_}) - exit - found a pending save for versionId ${_}`),this.saveSequentializer.pending;if(!T.force&&!this.dirty){this.trace(`doSave(${_}) - 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(`doSave(${_}) - exit - because busy saving`),this.saveSequentializer.cancelPending(),this.saveSequentializer.setNext(()=>this.doSave(T));this.isResolved()&&this.textEditorModel.pushStackElement();const L=new d.CancellationTokenSource;return this.saveSequentializer.setPending(_,(async()=>{if(this.isResolved()&&!T.skipSaveParticipants)try{if(T.reason===2&&typeof this.lastModelContentChangeFromUndoRedo=="number"){const N=Date.now()-this.lastModelContentChangeFromUndoRedo;N<Ar.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD&&await(0,r.timeout)(Ar.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD-N)}L.token.isCancellationRequested||await this.textFileService.files.runSaveParticipants(this,{reason:T.reason??1},L.token)}catch(N){this.logService.error(`[text file model] runSaveParticipants(${_}) - resulted in an error: ${N.toString()}`,this.resource.toString())}if(L.token.isCancellationRequested||(L.dispose(),this.isDisposed())||!this.isResolved())return;_=this.versionId,this.inErrorMode=!1,this.trace(`doSave(${_}) - before write()`);const M=(0,R.assertIsDefined)(this.lastResolvedFileStat),O=this;return this.saveSequentializer.setPending(_,(async()=>{try{const N=await this.textFileService.write(M.resource,O.createSnapshot(),{mtime:M.mtime,encoding:this.getEncoding(),etag:T.ignoreModifiedSince||!this.filesConfigurationService.preventSaveConflicts(M.resource,O.getLanguageId())?b.ETAG_DISABLED:M.etag,unlock:T.writeUnlock,writeElevated:T.writeElevated});this.handleSaveSuccess(N,_,T)}catch(N){this.handleSaveError(N,_,T)}})())})(),()=>L.cancel())}handleSaveSuccess(T,_,L){this.updateLastResolvedFileStat(T),_===this.versionId?(this.trace(`handleSaveSuccess(${_}) - setting dirty to false because versionId did not change`),this.setDirty(!1)):this.trace(`handleSaveSuccess(${_}) - not setting dirty to false because versionId did change meanwhile`),this.setOrphaned(!1),this._onDidSave.fire({reason:L.reason,stat:T,source:L.source})}handleSaveError(T,_,L){if((L.ignoreErrorHandler?this.logService.trace:this.logService.error).apply(this.logService,[`[text file model] handleSaveError(${_}) - exit - resulted in a save error: ${T.toString()}`,this.resource.toString()]),L.ignoreErrorHandler)throw T;this.setDirty(!0),this.inErrorMode=!0,T.fileOperationResult===3&&(this.inConflictMode=!0),this.textFileService.files.saveErrorHandler.onSaveError(T,this),this._onDidSaveError.fire()}updateSavedVersionId(){this.isResolved()&&(this.bufferSavedVersionId=this.textEditorModel.getAlternativeVersionId())}updateLastResolvedFileStat(T){const _=this.isReadonly();this.lastResolvedFileStat?this.lastResolvedFileStat.mtime<=T.mtime&&(this.lastResolvedFileStat=T):this.lastResolvedFileStat=T,this.isReadonly()!==_&&this._onDidChangeReadonly.fire()}hasState(T){switch(T){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(T){return this.saveSequentializer.pending}getLanguageId(){return this.textEditorModel?this.textEditorModel.getLanguageId():this.preferredLanguageId}async onMaybeShouldChangeEncoding(){if(this.hasEncodingSetExplicitly){this.trace("onMaybeShouldChangeEncoding() - ignoring because encoding was set explicitly");return}if(this.contentEncoding===n.UTF8_with_bom||this.contentEncoding===n.UTF16be||this.contentEncoding===n.UTF16le){this.trace("onMaybeShouldChangeEncoding() - ignoring because content encoding has a BOM");return}const{encoding:T}=await this.textFileService.encoding.getPreferredReadEncoding(this.resource);if(typeof T!="string"||!this.isNewEncoding(T)){this.trace(`onMaybeShouldChangeEncoding() - ignoring because preferred encoding ${T} is not new`);return}if(this.isDirty()){this.trace("onMaybeShouldChangeEncoding() - ignoring because model is dirty");return}return this.logService.info(`Adjusting encoding based on configured language override to '${T}' for ${this.resource.toString(!0)}.`),this.setEncodingInternal(T,1)}setEncoding(T,_){return this.hasEncodingSetExplicitly=!0,this.setEncodingInternal(T,_)}async setEncodingInternal(T,_){if(_===0)this.updatePreferredEncoding(T),this.isDirty()||(this.versionId++,this.setDirty(!0)),this.inConflictMode||await this.save({source:Ar.TEXTFILE_SAVE_ENCODING_SOURCE});else{if(!this.isNewEncoding(T))return;this.isDirty()&&!this.inConflictMode&&await this.save(),this.updatePreferredEncoding(T),await this.forceResolveFromFile()}}updatePreferredEncoding(T){!this.isNewEncoding(T)||(this.preferredEncoding=T,this._onDidChangeEncoding.fire())}isNewEncoding(T){return!(this.preferredEncoding===T||!this.preferredEncoding&&this.contentEncoding===T)}getEncoding(){return this.preferredEncoding||this.contentEncoding}trace(T){this.logService.trace(`[text file model] ${T}`,this.resource.toString())}isResolved(){return!!this.textEditorModel}isReadonly(){return this.lastResolvedFileStat?.readonly||this.fileService.hasCapability(this.resource,2048)}dispose(){this.trace("dispose()"),this.inConflictMode=!1,this.inOrphanMode=!1,this.inErrorMode=!1,super.dispose()}};D.TEXTFILE_SAVE_ENCODING_SOURCE=k.SaveSourceRegistry.registerSource("textFileEncoding.source",(0,t.localize)(0,null)),D.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD=500,D=we([F(3,S.ILanguageService),F(4,C.IModelService),F(5,b.IFileService),F(6,A.ITextFileService),F(7,I.IWorkingCopyBackupService),F(8,u.ILogService),F(9,f.IWorkingCopyService),F(10,l.IFilesConfigurationService),F(11,s.ILabelService),F(12,o.ILanguageDetectionService),F(13,v.IAccessibilityService),F(14,g.IPathService),F(15,w.IExtensionService)],D),e.TextFileEditorModel=D}),define(ae[2928],le([1,0,9,5,2,54,939,78,22,62,997,19,35,156,2203,57]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelResolverService=void 0;let c=class extends R.ReferenceCollection{constructor(d,n,a,o){super(),this.instantiationService=d,this.textFileService=n,this.fileService=a,this.modelService=o,this.providers=new Map,this.modelsToDispose=new Set}createReferencedObject(d){return this.doCreateReferencedObject(d)}async doCreateReferencedObject(d,n){this.modelsToDispose.delete(d);const a=t.URI.parse(d);if(a.scheme===I.Schemas.inMemory){if(!this.modelService.getModel(a))throw new Error(`Unable to resolve inMemory resource ${d}`);const g=this.instantiationService.createInstance(k.TextResourceEditorModel,a);if(this.ensureResolvedModel(g,d))return g}if(a.scheme===I.Schemas.untitled){const o=await this.textFileService.untitled.resolve({untitledResource:a});if(this.ensureResolvedModel(o,d))return o}if(this.fileService.hasProvider(a)){const o=await this.textFileService.files.resolve(a,{reason:2});if(this.ensureResolvedModel(o,d))return o}if(this.providers.has(a.scheme)){await this.resolveTextModelContent(d);const o=this.instantiationService.createInstance(k.TextResourceEditorModel,a);if(this.ensureResolvedModel(o,d))return o}if(!n)return await this.fileService.activateProvider(a.scheme),this.doCreateReferencedObject(d,!0);throw new Error(`Unable to resolve resource ${d}`)}ensureResolvedModel(d,n){if((0,b.isResolvedTextEditorModel)(d))return!0;throw new Error(`Unable to resolve resource ${n}`)}destroyReferencedObject(d,n){const a=t.URI.parse(d);a.scheme===I.Schemas.untitled||a.scheme===I.Schemas.inMemory||(this.modelsToDispose.add(d),(async()=>{try{const o=await n;if(!this.modelsToDispose.has(d)||(o instanceof S.TextFileEditorModel&&await this.textFileService.files.canDispose(o),!this.modelsToDispose.has(d)))return;o.dispose()}catch{}finally{this.modelsToDispose.delete(d)}})())}registerTextModelContentProvider(d,n){let a=this.providers.get(d);return a||(a=[],this.providers.set(d,a)),a.unshift(n),(0,R.toDisposable)(()=>{const o=this.providers.get(d);if(!o)return;const g=o.indexOf(n);g!==-1&&(o.splice(g,1),o.length===0&&this.providers.delete(d))})}hasTextModelContentProvider(d){return this.providers.get(d)!==void 0}async resolveTextModelContent(d){const n=t.URI.parse(d),a=this.providers.get(n.scheme)||[];for(const o of a){const g=await o.provideTextContent(n);if(g)return g}throw new Error(`Unable to resolve text model content for resource ${d}`)}};c=we([F(0,p.IInstantiationService),F(1,E.ITextFileService),F(2,C.IFileService),F(3,A.IModelService)],c);let l=class extends R.Disposable{get resourceModelCollection(){return this._resourceModelCollection||(this._resourceModelCollection=this.instantiationService.createInstance(c)),this._resourceModelCollection}get asyncModelCollection(){return this._asyncModelCollection||(this._asyncModelCollection=new R.AsyncReferenceCollection(this.resourceModelCollection)),this._asyncModelCollection}constructor(d,n,a,o,g){super(),this.instantiationService=d,this.fileService=n,this.undoRedoService=a,this.modelService=o,this.uriIdentityService=g,this._resourceModelCollection=void 0,this._asyncModelCollection=void 0,this._register(new i.ModelUndoRedoParticipant(this.modelService,this,this.undoRedoService))}async createModelReference(d){return d=this.uriIdentityService.asCanonicalUri(d),await this.asyncModelCollection.acquire(d.toString())}registerTextModelContentProvider(d,n){return this.resourceModelCollection.registerTextModelContentProvider(d,n)}canHandleResource(d){return this.fileService.hasProvider(d)||d.scheme===I.Schemas.untitled||d.scheme===I.Schemas.inMemory?!0:this.resourceModelCollection.hasTextModelContentProvider(d.scheme)}};l=we([F(0,p.IInstantiationService),F(1,C.IFileService),F(2,u.IUndoRedoService),F(3,A.IModelService),F(4,f.IUriIdentityService)],l),e.TextModelResolverService=l,(0,r.registerSingleton)(b.ITextModelService,l,1)}),define(ae[998],le([1,0,394,42,54,6,170,114,94,136,354,78,13,49,299,24,28,466,56,294,111]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorModel=void 0;let a=class qn extends t.BaseTextEditorModel{get name(){return this.configuredLabelFormat==="content"&&!this.hasAssociatedFilePath&&this.cachedModelFirstLineWords?this.cachedModelFirstLineWords:this.labelService.getUriBasenameLabel(this.resource)}constructor(g,h,v,m,w,D,y,T,_,L,M,O,N,P,B){super(y,D,P,B),this.resource=g,this.hasAssociatedFilePath=h,this.initialValue=v,this.preferredLanguageId=m,this.preferredEncoding=w,this.workingCopyBackupService=T,this.textResourceConfigurationService=_,this.workingCopyService=L,this.textFileService=M,this.labelService=O,this.editorService=N,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=S.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()}registerListeners(){this._register(this.textResourceConfigurationService.onDidChangeConfiguration(()=>this.onConfigurationChange(!0)))}onConfigurationChange(g){const h=this.textResourceConfigurationService.getValue(this.resource,"files.encoding");this.configuredEncoding!==h&&typeof h=="string"&&(this.configuredEncoding=h,g&&!this.preferredEncoding&&this._onDidChangeEncoding.fire());const v=this.textResourceConfigurationService.getValue(this.resource,"workbench.editor.untitled.labelFormat");this.configuredLabelFormat!==v&&(v==="content"||v==="name")&&(this.configuredLabelFormat=v,g&&this._onDidChangeName.fire())}setLanguageId(g,h){const v=g===qn.ACTIVE_EDITOR_LANGUAGE_ID?this.editorService.activeTextEditorLanguageId:g;this.preferredLanguageId=v,v&&super.setLanguageId(v,h)}getLanguageId(){return this.textEditorModel?this.textEditorModel.getLanguageId():this.preferredLanguageId}getEncoding(){return this.preferredEncoding||this.configuredEncoding}async setEncoding(g){const h=this.getEncoding();this.preferredEncoding=g,h!==this.preferredEncoding&&this._onDidChangeEncoding.fire()}isDirty(){return this.dirty}setDirty(g){this.dirty!==g&&(this.dirty=g,this._onDidChangeDirty.fire())}async save(g){const h=await this.textFileService.save(this.resource,g);return h&&this._onDidSave.fire({reason:g?.reason,source:g?.source}),!!h}async revert(){this.setDirty(!1),this._onDidRevert.fire(),this.dispose()}async backup(g){let h;return this.isResolved()?h=await this.textFileService.getEncodedReadable(this.resource,(0,r.withNullAsUndefined)(this.createSnapshot()),{encoding:l.UTF8}):typeof this.initialValue=="string"&&(h=(0,s.bufferToReadable)(s.VSBuffer.fromString(this.initialValue))),{content:h}}async resolve(){let g=!1,h=!1;if(this.textEditorModel)this.updateTextEditorModel(void 0,this.preferredLanguageId);else{let m;const w=await this.workingCopyBackupService.resolve(this);w?(m=w.value,h=!0):m=(0,s.bufferToStream)(s.VSBuffer.fromString(this.initialValue||""));const D=await(0,I.createTextBufferFactoryFromStream)(await this.textFileService.getDecodedStream(this.resource,m,{encoding:l.UTF8}));this.createTextEditorModel(D,this.resource,this.preferredLanguageId),g=!0}const v=(0,r.assertIsDefined)(this.textEditorModel);return this.installModelListeners(v),g&&((h||this.initialValue)&&this.updateNameFromFirstLine(v),this.setDirty(this.hasAssociatedFilePath||!!h||!!this.initialValue),(h||this.initialValue)&&this._onDidChangeContent.fire()),super.resolve()}installModelListeners(g){this._register(g.onDidChangeContent(h=>this.onModelContentChanged(g,h))),this._register(g.onDidChangeLanguage(()=>this.onConfigurationChange(!0))),super.installModelListeners(g)}onModelContentChanged(g,h){!this.hasAssociatedFilePath&&g.getLineCount()===1&&g.getLineContent(1)===""?this.setDirty(!1):this.setDirty(!0),h.changes.some(v=>(v.range.startLineNumber===1||v.range.endLineNumber===1)&&v.range.startColumn<=qn.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH)&&this.updateNameFromFirstLine(g),this._onDidChangeContent.fire(),this.autoDetectLanguage()}updateNameFromFirstLine(g){if(this.hasAssociatedFilePath)return;let h,v=g.getValueInRange({startLineNumber:1,endLineNumber:1,startColumn:1,endColumn:qn.FIRST_LINE_NAME_CANDIDATE_MAX_LENGTH+1}).trim().replace(/\s+/g," ");v=v.substr(0,(0,c.getCharContainingOffset)(v,qn.FIRST_LINE_NAME_MAX_LENGTH)[0]),v&&(0,i.ensureValidWordDefinition)().exec(v)&&(h=v),h!==this.cachedModelFirstLineWords&&(this.cachedModelFirstLineWords=h,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=we([F(5,p.ILanguageService),F(6,R.IModelService),F(7,k.IWorkingCopyBackupService),F(8,E.ITextResourceConfigurationService),F(9,b.IWorkingCopyService),F(10,C.ITextFileService),F(11,u.ILabelService),F(12,f.IEditorService),F(13,d.ILanguageDetectionService),F(14,n.IAccessibilityService)],a),e.UntitledTextEditorModel=a}),define(ae[401],le([1,0,9,5,998,8,6,60,22,2,35]),function(J,e,t,p,R,A,k,E,I,b,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorService=e.IUntitledTextEditorService=void 0,e.IUntitledTextEditorService=(0,p.createDecorator)("untitledTextEditorService");let C=class extends b.Disposable{constructor(u,i){super(),this.instantiationService=u,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 E.ResourceMap}get(u){return this.mapResourceToModel.get(u)}getValue(u){return this.get(u)?.textEditorModel?.getValue()}async resolve(u){const i=this.doCreateOrGet(u);return await i.resolve(),i}create(u){return this.doCreateOrGet(u)}doCreateOrGet(u=Object.create(null)){const i=this.massageOptions(u);return i.untitledResource&&this.mapResourceToModel.has(i.untitledResource)?this.mapResourceToModel.get(i.untitledResource):this.doCreate(i)}massageOptions(u){const i=Object.create(null);if(u.associatedResource?(i.untitledResource=t.URI.from({scheme:I.Schemas.untitled,authority:u.associatedResource.authority,fragment:u.associatedResource.fragment,path:u.associatedResource.path,query:u.associatedResource.query}),i.associatedResource=u.associatedResource):u.untitledResource?.scheme===I.Schemas.untitled&&(i.untitledResource=u.untitledResource),u.languageId)i.languageId=u.languageId;else if(!i.associatedResource){const f=this.configurationService.getValue();f.files?.defaultLanguage&&(i.languageId=f.files.defaultLanguage)}return i.encoding=u.encoding,i.initialValue=u.initialValue,i}doCreate(u){let i=u.untitledResource;if(!i){let c=1;do i=t.URI.from({scheme:I.Schemas.untitled,path:`Untitled-${c}`}),c++;while(this.mapResourceToModel.has(i))}const f=this._register(this.instantiationService.createInstance(R.UntitledTextEditorModel,i,!!u.associatedResource,u.initialValue,u.languageId,u.encoding));return this.registerModel(f),f}registerModel(u){const i=new b.DisposableStore;i.add(u.onDidChangeDirty(()=>this._onDidChangeDirty.fire(u))),i.add(u.onDidChangeName(()=>this._onDidChangeLabel.fire(u))),i.add(u.onDidChangeEncoding(()=>this._onDidChangeEncoding.fire(u))),i.add(u.onWillDispose(()=>this._onWillDispose.fire(u))),k.Event.once(u.onWillDispose)(()=>{this.mapResourceToModel.delete(u.resource),i.dispose()}),this.mapResourceToModel.set(u.resource,u),u.isDirty()&&this._onDidChangeDirty.fire(u)}};C=we([F(0,p.IInstantiationService),F(1,A.IConfigurationService)],C),e.UntitledTextEditorService=C,(0,S.registerSingleton)(e.IUntitledTextEditorService,C,1)}),define(ae[472],le([1,0,56,22,53,18,13,72,47,19,5,49,156,389,202,350,401]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorInput=void 0;let l=class jn extends f.LazilyResolvedWebviewEditorInput{static create(d,n,a,o,g){return d.invokeFunction(h=>{const v=h.get(c.IUntitledTextEditorService).getValue(n),m=v?t.VSBuffer.fromString(v):void 0,w=(0,E.generateUuid)(),D=h.get(i.IWebviewService).createWebviewOverlay({id:w,providedViewType:a,options:{customClasses:g?.customClasses},contentOptions:{},extension:void 0}),y=d.createInstance(jn,{resource:n,viewType:a,id:w},D,{untitledDocumentData:m,oldResource:g?.oldResource});return typeof o<"u"&&y.updateGroup(o),y})}get resource(){return this._editorResource}constructor(d,n,a,o,g,h,v,m,w,D){super({id:d.id,providedId:d.viewType,viewType:d.viewType,name:""},n,o),this.instantiationService=g,this.labelService=h,this.customEditorService=v,this.fileDialogService=m,this.undoRedoService=w,this.fileService=D,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=d.resource,this.oldResource=a.oldResource,this._defaultDirtyState=a.startsDirty,this._backupId=a.backupId,this._untitledDocumentData=a.untitledDocumentData,this.registerListeners()}registerListeners(){this._register(this.labelService.onDidChangeFormatters(d=>this.onLabelEvent(d.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(d=>this.onLabelEvent(d.scheme))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(d=>this.onLabelEvent(d.scheme)))}onLabelEvent(d){d===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 jn.typeId}get editorId(){return this.viewType}get capabilities(){let d=0;return d|=128,this.customEditorService.getCustomEditorCapabilities(this.viewType)?.supportsMultipleEditorsPerDocument||(d|=8),this._modelRef?this._modelRef.object.isReadonly()&&(d|=2):this.fileService.hasCapability(this.resource,2048)&&(d|=2),this.resource.scheme===p.Schemas.untitled&&(d|=4),d}getName(){return(0,R.basename)(this.labelService.getUriLabel(this.resource))}getDescription(d=1){switch(d){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(d){switch(d){case 0:return this.shortTitle;case 2:return this.longTitle;default:case 1:return this.mediumTitle}}matches(d){return super.matches(d)?!0:this===d||d instanceof jn&&this.viewType===d.viewType&&(0,A.isEqual)(this.resource,d.resource)}copy(){return jn.create(this.instantiationService,this.resource,this.viewType,this.group,this.webview.options)}isDirty(){return this._modelRef?this._modelRef.object.isDirty():!!this._defaultDirtyState}async save(d,n){if(!this._modelRef)return;const a=await this._modelRef.object.saveCustomEditor(n);if(!!a)return(0,A.isEqual)(a,this.resource)?this:{resource:a}}async saveAs(d,n){if(!this._modelRef)return;const a=this._editorResource,o=await this.fileDialogService.pickFileToSave(a,n?.availableFileSystems);if(!!o&&!!await this._modelRef.object.saveCustomEditorAs(this._editorResource,o,n))return(await this.rename(d,o))?.editor}async revert(d,n){if(this._modelRef)return this._modelRef.object.revert(n);this._defaultDirtyState=!1,this._onDidChangeDirty.fire()}async resolve(){if(await super.resolve(),this.isDisposed())return null;if(!this._modelRef){const d=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!==d&&this._onDidChangeCapabilities.fire()}return null}async rename(d,n){return{editor:{resource:n}}}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(d){this._moveHandler=d}transfer(d){if(!!super.transfer(d))return d._moveHandler=this._moveHandler,this._moveHandler=void 0,d}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=we([F(3,f.IWebviewWorkbenchService),F(4,S.IInstantiationService),F(5,C.ILabelService),F(6,u.ICustomEditorService),F(7,I.IFileDialogService),F(8,r.IUndoRedoService),F(9,b.IFileService)],l),e.CustomEditorInput=l}),define(ae[2929],le([1,0,2,67,77,43,230,273,58,24,261,258,472,9,316,462,8,177,18,666,646,469]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadEditorTabs=void 0;let o=class{constructor(h,v,m,w){this._editorGroupsService=v,this._configurationService=m,this._dispoables=new t.DisposableStore,this._tabGroupModel=[],this._groupLookup=new Map,this._tabInfoLookup=new Map,this._proxy=h.getProxy(p.ExtHostContext.ExtHostEditorTabs),this._dispoables.add(w.onDidEditorsChange(D=>this._updateTabsModel(D))),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(h,v,m){const w=v.editorId;return{id:this._generateTabId(v,h.id),label:v.getName(),editorId:w,input:this._editorInputToDto(v),isPinned:h.isSticky(m),isPreview:!h.isPinned(m),isActive:h.isActive(v),isDirty:v.isDirty()}}_editorInputToDto(h){if(h instanceof a.MergeEditorInput)return{kind:3,base:h.base,input1:h.input1.uri,input2:h.input2.uri,result:h.resource};if(h instanceof S.AbstractTextResourceEditorInput)return{kind:1,uri:h.resource};if(h instanceof l.SideBySideEditorInput&&!(h instanceof k.DiffEditorInput)){const v=h.primary.resource,m=h.secondary.resource;return h.primary instanceof S.AbstractTextResourceEditorInput&&h.secondary instanceof S.AbstractTextResourceEditorInput&&(0,s.isEqual)(v,m)&&v&&m?{kind:1,uri:v}:{kind:0}}if(h instanceof C.NotebookEditorInput)return{kind:4,notebookType:h.viewType,uri:h.resource};if(h instanceof r.CustomEditorInput)return{kind:6,viewType:h.viewType,uri:h.resource};if(h instanceof i.WebviewInput)return{kind:7,viewType:h.viewType};if(h instanceof f.TerminalEditorInput)return{kind:8};if(h instanceof k.DiffEditorInput){if(h.modified instanceof S.AbstractTextResourceEditorInput&&h.original instanceof S.AbstractTextResourceEditorInput)return{kind:2,modified:h.modified.resource,original:h.original.resource};if(h.modified instanceof C.NotebookEditorInput&&h.original instanceof C.NotebookEditorInput)return{kind:5,notebookType:h.original.viewType,modified:h.modified.resource,original:h.original.resource}}return h instanceof n.InteractiveEditorInput?{kind:9,uri:h.resource,inputBoxUri:h.inputResource}:{kind:0}}_generateTabId(h,v){let m;const w=A.EditorResourceAccessor.getCanonicalUri(h,{supportSideBySide:A.SideBySideEditor.BOTH});return w instanceof u.URI?m=w.toString():m=`${w?.primary?.toString()}-${w?.secondary?.toString()}`,`${v}~${h.editorId}-${h.typeId}-${m} `}_onDidGroupActivate(){const h=this._editorGroupsService.activeGroup.id,v=this._groupLookup.get(h);v&&(v.isActive=!0,this._proxy.$acceptTabGroupUpdate(v))}_onDidTabLabelChange(h,v,m){const w=this._generateTabId(v,h),D=this._tabInfoLookup.get(w);D?(D.tab.label=v.getName(),this._proxy.$acceptTabOperation({groupId:h,index:m,tabDto:D.tab,kind:2})):(console.error("Invalid model for label change, rebuilding"),this._createTabsModel())}_onDidTabOpen(h,v,m){const w=this._editorGroupsService.getGroup(h),D=this._groupLookup.get(h)!==void 0;if(!w||!D){this._createTabsModel();return}const y=this._groupLookup.get(h)?.tabs;if(!y)return;const T=this._buildTabObject(w,v,m);y.splice(m,0,T),this._tabInfoLookup.set(this._generateTabId(v,h),{group:w,editorInput:v,tab:T}),this._proxy.$acceptTabOperation({groupId:h,index:m,tabDto:T,kind:0})}_onDidTabClose(h,v){const m=this._editorGroupsService.getGroup(h),w=this._groupLookup.get(h)?.tabs;if(!m||!w){this._createTabsModel();return}const D=w.splice(v,1);D.length!==0&&(this._tabInfoLookup.delete(D[0]?.id??""),this._proxy.$acceptTabOperation({groupId:h,index:v,tabDto:D[0],kind:1}))}_onDidTabActiveChange(h,v){const m=this._groupLookup.get(h)?.tabs;if(!m)return;const w=m[v];w.isActive=!0,this._proxy.$acceptTabOperation({groupId:h,index:v,tabDto:w,kind:2})}_onDidTabDirty(h,v,m){const w=this._generateTabId(m,h),D=this._tabInfoLookup.get(w);if(!D){console.error("Invalid model for dirty change, rebuilding"),this._createTabsModel();return}D.tab.isDirty=m.isDirty(),this._proxy.$acceptTabOperation({groupId:h,index:v,tabDto:D.tab,kind:2})}_onDidTabPinChange(h,v,m){const w=this._generateTabId(m,h),D=this._tabInfoLookup.get(w),y=D?.group,T=D?.tab;if(!y||!T){console.error("Invalid model for sticky change, rebuilding"),this._createTabsModel();return}T.isPinned=y.isSticky(v),this._proxy.$acceptTabOperation({groupId:h,index:v,tabDto:T,kind:2})}_onDidTabPreviewChange(h,v,m){const w=this._generateTabId(m,h),D=this._tabInfoLookup.get(w),y=D?.group,T=D?.tab;if(!y||!T){console.error("Invalid model for sticky change, rebuilding"),this._createTabsModel();return}T.isPreview=!y.isPinned(v),this._proxy.$acceptTabOperation({kind:2,groupId:h,tabDto:T,index:v})}_onDidTabMove(h,v,m,w){const D=this._groupLookup.get(h)?.tabs;if(!D){console.error("Invalid model for move change, rebuilding"),this._createTabsModel();return}const y=D.splice(m,1);y.length!==0&&(D.splice(v,0,y[0]),this._proxy.$acceptTabOperation({kind:3,groupId:h,tabDto:y[0],index:v,oldIndex:m}))}_createTabsModel(){this._tabGroupModel=[],this._groupLookup.clear(),this._tabInfoLookup.clear();let h=[];for(const v of this._editorGroupsService.groups){const m={groupId:v.id,isActive:v.id===this._editorGroupsService.activeGroup.id,viewColumn:(0,E.editorGroupToColumn)(this._editorGroupsService,v),tabs:[]};v.editors.forEach((w,D)=>{const y=this._buildTabObject(v,w,D);h.push(y),this._tabInfoLookup.set(this._generateTabId(w,v.id),{group:v,tab:y,editorInput:w})}),m.tabs=h,this._tabGroupModel.push(m),this._groupLookup.set(v.id,m),h=[]}this._proxy.$acceptEditorTabModel(this._tabGroupModel)}_updateTabsModel(h){const v=h.event,m=h.groupId;switch(v.kind){case 0:if(m===this._editorGroupsService.activeGroup.id){this._onDidGroupActivate();break}else return;case 7:if(v.editor!==void 0&&v.editorIndex!==void 0){this._onDidTabLabelChange(m,v.editor,v.editorIndex);break}case 3:if(v.editor!==void 0&&v.editorIndex!==void 0){this._onDidTabOpen(m,v.editor,v.editorIndex);break}case 4:if(v.editorIndex!==void 0){this._onDidTabClose(m,v.editorIndex);break}case 6:if(v.editorIndex!==void 0){this._onDidTabActiveChange(m,v.editorIndex);break}case 11:if(v.editorIndex!==void 0&&v.editor!==void 0){this._onDidTabDirty(m,v.editorIndex,v.editor);break}case 10:if(v.editorIndex!==void 0&&v.editor!==void 0){this._onDidTabPinChange(m,v.editorIndex,v.editor);break}case 9:if(v.editorIndex!==void 0&&v.editor!==void 0){this._onDidTabPreviewChange(m,v.editorIndex,v.editor);break}case 5:if((0,d.isGroupEditorMoveEvent)(v)&&v.editor&&v.editorIndex!==void 0&&v.oldEditorIndex!==void 0){this._onDidTabMove(m,v.editorIndex,v.oldEditorIndex,v.editor);break}default:this._createTabsModel()}}$moveTab(h,v,m,w){const D=(0,E.columnToEditorGroup)(this._editorGroupsService,this._configurationService,m),y=this._tabInfoLookup.get(h);if(!y?.tab)throw new Error(`Attempted to close tab with id ${h} which does not exist`);let _;const L=this._editorGroupsService.getGroup(y.group.id);if(!L)return;if(this._groupLookup.get(D)===void 0){let O=3;m===b.SIDE_GROUP&&(O=(0,I.preferredSideBySideGroupDirection)(this._configurationService)),_=this._editorGroupsService.addGroup(this._editorGroupsService.groups[this._editorGroupsService.groups.length-1],O,void 0)}else _=this._editorGroupsService.getGroup(D);if(!_)return;(v<0||v>_.editors.length)&&(v=_.editors.length);const M=y?.editorInput;!M||L.moveEditor(M,_,{index:v,preserveFocus:w})}async $closeTab(h,v){const m=new Map;for(const D of h){const y=this._tabInfoLookup.get(D),T=y?.tab,_=y?.group,L=y?.editorInput;if(!_||!T||!y||!L)continue;const M=m.get(_);M?M.push(L):m.set(_,[L])}const w=[];for(const[D,y]of m)w.push(await D.closeEditors(y,{preserveFocus:v}));return w.every(D=>D)}async $closeGroup(h,v){const m=[];for(const w of h){const D=this._editorGroupsService.getGroup(w);D&&(m.push(await D.closeAllEditors()),D.count===0&&this._editorGroupsService.getGroup(D.id)&&this._editorGroupsService.removeGroup(D))}return m.every(w=>w)}};o=we([(0,R.extHostNamedCustomer)(p.MainContext.MainThreadEditorTabs),F(1,I.IEditorGroupsService),F(2,c.IConfigurationService),F(3,b.IEditorService)],o),e.MainThreadEditorTabs=o}),define(ae[2930],le([1,0,2,22,18,9,5,472,389,258,202,946,350,170,262]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComplexCustomWorkingCopyEditorHandler=e.CustomEditorInputSerializer=void 0;let f=class extends C.WebviewEditorInputSerializer{constructor(d,n,a){super(d),this._instantiationService=n,this._webviewService=a}serialize(d){const n=d.isDirty(),a={...this.toJson(d),editorResource:d.resource.toJSON(),dirty:n,backupId:n?d.backupId:void 0};try{return JSON.stringify(a)}catch{return}}fromJson(d){return{...super.fromJson(d),editorResource:A.URI.from(d.editorResource),dirty:d.dirty}}deserialize(d,n){const a=this.fromJson(JSON.parse(n)),o=c(this._webviewService,a),g=this._instantiationService.createInstance(E.CustomEditorInput,{resource:a.editorResource,viewType:a.viewType,id:a.id},o,{startsDirty:a.dirty,backupId:a.backupId});return typeof a.group=="number"&&g.updateGroup(a.group),g}};f.ID=E.CustomEditorInput.typeId,f=we([F(0,r.IWebviewWorkbenchService),F(1,k.IInstantiationService),F(2,S.IWebviewService)],f),e.CustomEditorInputSerializer=f;function c(s,d){const n=s.createWebviewOverlay({id:d.id,providedViewType:d.viewType,origin:d.origin,options:{purpose:"customEditor",enableFindWidget:d.webviewOptions.enableFindWidget,retainContextWhenHidden:d.webviewOptions.retainContextWhenHidden},contentOptions:d.contentOptions,extension:d.extension});return n.state=d.state,n}let l=class extends t.Disposable{constructor(d,n,a,o,g){super(),this._instantiationService=d,this._workingCopyEditorService=n,this._workingCopyBackupService=a,this._webviewService=o,this._installHandler()}_installHandler(){this._register(this._workingCopyEditorService.registerHandler({handles:d=>d.resource.scheme===p.Schemas.vscodeCustomEditor,isOpen:(d,n)=>{if(d.resource.authority==="jupyter-notebook-ipynb"&&n instanceof b.NotebookEditorInput)try{const a=JSON.parse(d.resource.query),o=A.URI.from(a);return(0,R.isEqual)(o,n.resource)}catch{return!1}if(!(n instanceof E.CustomEditorInput)||d.resource.authority!==n.viewType.replace(/[^a-z0-9\-_]/gi,"-").toLowerCase())return!1;try{const a=JSON.parse(d.resource.query),o=A.URI.from(a);return(0,R.isEqual)(o,n.resource)}catch{return!1}},createEditor:async d=>{const n=await this._workingCopyBackupService.resolve(d);if(!n?.meta)throw new Error(`No backup found for custom editor: ${d.resource}`);const a=n.meta,o=a.webview.id,g=(0,C.reviveWebviewExtensionDescription)(a.extension?.id,a.extension?.location),h=c(this._webviewService,{id:o,viewType:a.viewType,origin:a.webview.origin,webviewOptions:(0,C.restoreWebviewOptions)(a.webview.options),contentOptions:(0,C.restoreWebviewContentOptions)(a.webview.options),state:a.webview.state,extension:g}),v=this._instantiationService.createInstance(E.CustomEditorInput,{resource:A.URI.revive(a.editorResource),viewType:a.viewType,id:o},h,{backupId:a.backupId});return v.updateGroup(0),v}}))}};l=we([F(0,k.IInstantiationService),F(1,i.IWorkingCopyEditorService),F(2,u.IWorkingCopyBackupService),F(3,S.IWebviewService),F(4,I.ICustomEditorService)],l),e.ComplexCustomWorkingCopyEditorHandler=l}),define(ae[2931],le([1,0,16,6,2,22,18,13,9,40,7,19,5,17,23,33,12,57,43,230,389,2296,58,169,24,2588,472]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CustomEditorService=void 0;let w=class extends R.Disposable{constructor(y,T,_,L,M,O,N,P){super(),this.editorService=L,this.editorGroupService=M,this.instantiationService=O,this.uriIdentityService=N,this.editorResolverService=P,this._untitledCounter=0,this._editorResolverDisposables=this._register(new R.DisposableStore),this._editorCapabilities=new Map,this._models=new a.CustomEditorModelManager,this._onDidChangeEditorTypes=this._register(new p.Emitter),this.onDidChangeEditorTypes=this._onDidChangeEditorTypes.event,this._fileEditorFactory=u.Registry.as(s.EditorExtensions.EditorFactory).getFileEditorFactory(),this._activeCustomEditorId=n.CONTEXT_ACTIVE_CUSTOM_EDITOR_ID.bindTo(y),this._focusedCustomEditorIsEditable=n.CONTEXT_FOCUSED_CUSTOM_EDITOR_IS_EDITABLE.bindTo(y),this._contributedEditors=this._register(new v.ContributedCustomEditors(_)),this.editorResolverService.bufferChangeEvents(this.registerContributionPoints.bind(this)),this._register(this._contributedEditors.onChange(()=>{this.editorResolverService.bufferChangeEvents(this.registerContributionPoints.bind(this)),this.updateContexts(),this._onDidChangeEditorTypes.fire()})),this._register(this.editorService.onDidActiveEditorChange(()=>this.updateContexts())),this._register(T.onDidRunOperation(V=>{V.isOperation(2)&&this.handleMovedFileInOpenedFileEditors(V.resource,this.uriIdentityService.asCanonicalUri(V.target.resource))}));const B=105;this._register(b.UndoCommand.addImplementation(B,"custom-editor",()=>this.withActiveCustomEditor(V=>V.undo()))),this._register(b.RedoCommand.addImplementation(B,"custom-editor",()=>this.withActiveCustomEditor(V=>V.redo()))),this.updateContexts()}getEditorTypes(){return[...this._contributedEditors]}withActiveCustomEditor(y){const T=this.editorService.activeEditor;if(T instanceof m.CustomEditorInput){const _=y(T);return _||!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},{createEditorInput:({resource:_},L)=>({editor:m.CustomEditorInput.create(this.instantiationService,_,y.id,L.id)}),createUntitledEditorInput:({resource:_},L)=>({editor:m.CustomEditorInput.create(this.instantiationService,_??I.URI.from({scheme:A.Schemas.untitled,authority:`Untitled-${this._untitledCounter++}`}),y.id,L.id)}),createDiffEditorInput:(_,L)=>({editor:this.createDiffEditorInput(_,y.id,L)})}))}createDiffEditorInput(y,T,_){const L=m.CustomEditorInput.create(this.instantiationService,(0,E.assertIsDefined)(y.modified.resource),T,_.id,{customClasses:"modified"}),M=m.CustomEditorInput.create(this.instantiationService,(0,E.assertIsDefined)(y.original.resource),T,_.id,{customClasses:"original"});return this.instantiationService.createInstance(d.DiffEditorInput,y.label,y.description,M,L,!0)}get models(){return this._models}getCustomEditor(y){return this._contributedEditors.get(y)}getContributedCustomEditors(y){return new n.CustomEditorInfoCollection(this._contributedEditors.getContributedEditors(y))}getUserConfiguredCustomEditors(y){const T=this.editorResolverService.getAssociationsForResource(y);return new n.CustomEditorInfoCollection((0,t.coalesce)(T.map(_=>this._contributedEditors.get(_.viewType))))}getAllCustomEditors(y){return new n.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,R.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 _=this.getAllCustomEditors(T);if(!_.allEditors.some(M=>M.priority!==g.RegisteredEditorPriority.option))return;const L=new Map;for(const M of this.editorGroupService.groups)for(const O of M.editors)if(this._fileEditorFactory.isFileEditor(O)&&!(O instanceof m.CustomEditorInput)&&(0,k.isEqual)(O.resource,T)){let N=L.get(M.id);N||(N=[],L.set(M.id,N)),N.push(O)}if(!!L.size)for(const[M,O]of L)this.editorService.replaceEditors(O.map(N=>{let P;if(_.defaultEditor){const B=_.defaultEditor.id;P=m.CustomEditorInput.create(this.instantiationService,T,B,M)}else P={resource:T,options:{override:s.DEFAULT_EDITOR_ASSOCIATION.id}};return{editor:N,replacement:P,options:{preserveFocus:!0}}}),M)}};w=we([F(0,S.IContextKeyService),F(1,C.IFileService),F(2,i.IStorageService),F(3,h.IEditorService),F(4,o.IEditorGroupsService),F(5,r.IInstantiationService),F(6,l.IUriIdentityService),F(7,g.IEditorResolverService)],w),e.CustomEditorService=w,(0,c.registerThemingParticipant)((D,y)=>{const T=D.getColor(f.scrollbarShadow);T&&y.addRule(`.webview.modified { box-shadow: -6px 0 5px -5px ${T}; }`)})}),define(ae[2932],le([1,0,97,35,17,153,44,43,2930,389,545,472,2931]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,p.registerSingleton)(b.ICustomEditorService,r.CustomEditorService,1),R.Registry.as(E.EditorExtensions.EditorPane).registerEditorPane(A.EditorPaneDescriptor.create(S.WebviewEditor,S.WebviewEditor.ID,"Webview Editor"),[new t.SyncDescriptor(C.CustomEditorInput)]),R.Registry.as(E.EditorExtensions.EditorFactory).registerEditorSerializer(I.CustomEditorInputSerializer.ID,I.CustomEditorInputSerializer),R.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(I.ComplexCustomWorkingCopyEditorHandler,1)}),define(ae[2933],le([1,0,1790,255,6,64,142,9,136,354,32,170,22,19,26,49,25,11,56,13,401,2,21,52]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookFileWorkingCopyModelFactory=e.NotebookFileWorkingCopyModel=e.SimpleNotebookEditorModel=e.ComplexNotebookEditorModel=void 0;let h=class extends p.EditorModel{constructor(y,T,_,L,M,O,N,P,B,V,z){super(),this.resource=y,this.viewType=T,this._contentProvider=_,this._notebookService=L,this._workingCopyService=M,this._workingCopyBackupService=O,this._fileService=N,this._notificationService=P,this._logService=B,this.untitledTextEditorService=V,this._onDidSave=this._register(new R.Emitter),this._onDidChangeDirty=this._register(new R.Emitter),this._onDidChangeContent=this._register(new R.Emitter),this.onDidSave=this._onDidSave.event,this.onDidChangeDirty=this._onDidChangeDirty.event,this.onDidChangeOrphaned=R.Event.None,this.onDidChangeReadonly=R.Event.None,this._saveSequentializer=new l.TaskSequentializer,this._dirty=!1,this._name=z.getUriBasenameLabel(y);const x=this;this._workingCopyIdentifier={typeId:b.NO_TYPE_ID,resource:E.URI.from({scheme:r.Schemas.vscodeNotebook,path:y.toString()})};const H=new class{constructor(){this.typeId=x._workingCopyIdentifier.typeId,this.resource=x._workingCopyIdentifier.resource,this.capabilities=x._isUntitled()?2:0,this.onDidChangeDirty=x.onDidChangeDirty,this.onDidChangeContent=x._onDidChangeContent.event,this.onDidSave=x.onDidSave}get name(){return x._name}isDirty(){return x.isDirty()}backup(W){return x.backup(W)}save(){return x.save()}revert(W){return x.revert(W)}};this._register(this._workingCopyService.registerWorkingCopy(H)),this._register(this._fileService.onDidFilesChange(async W=>{if(this.isDirty()||!this.isResolved()||this._saveSequentializer.hasPending()||!W.affects(this.resource,0))return;const U=await this._resolveStats(this.resource);U&&this._lastResolvedFileStat&&U.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===r.Schemas.untitled}get notebook(){const y=this._notebookService.getNotebookTextModel(this.resource);return y&&y.viewType===this.viewType?y:void 0}setDirty(y){this._dirty!==y&&(this._dirty=y,this._onDidChangeDirty.fire())}async backup(y){if(!this.isResolved())return{};const T=await this._contentProvider.backup(this.resource,y);if(y.isCancellationRequested)return{};const _=await this._resolveStats(this.resource);return T instanceof s.VSBuffer?{content:(0,s.bufferToReadable)(T)}:{meta:{mtime:_?.mtime??Date.now(),viewType:this.notebook.viewType,backupId:T}}}async revert(y){if(y?.soft){this.setDirty(!1);return}await this.load({forceReadFromFile:!0});const T=await this._resolveStats(this.resource);this._lastResolvedFileStat=T,this.setDirty(!1),this._onDidChangeDirty.fire()}async load(y){if(y?.forceReadFromFile)return this._logService.debug("[notebook editor model] load from provider (forceRead)",this.resource.toString()),this._loadFromProvider(void 0),(0,d.assertType)(this.isResolved()),this;if(this.isResolved())return this;let T;try{T=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(T),(0,d.assertType)(this.isResolved()),this)}async getUntitledDocumentData(y){const T=this.untitledTextEditorService.getValue(y);return T?s.VSBuffer.fromString(T):void 0}async _loadFromProvider(y){const T=await this.getUntitledDocumentData(this.resource);T&&this._onDidChangeDirty.fire();const _=await this._contentProvider.open(this.resource,y?.meta?.backupId??(y?.value?await(0,s.streamToBuffer)(y?.value):void 0),T,S.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(_.data.cells,_.data.metadata,_.transientOptions);else{this._logService.debug("[notebook editor model] loading NEW notebook",this.resource.toString());const L=this._notebookService.getNotebookTextModel(this.resource);L&&(this._logService.warn("DISPOSING conflicting notebook with same URI but different view type",this.resource.toString(),this.viewType),L.dispose());const M=this._notebookService.createNotebookTextModel(this.viewType,this.resource,_.data,_.transientOptions);this._register(M),this._register(M.onDidChangeContent(O=>{let N=!1;for(let P=0;P<O.rawEvents.length;P++)O.rawEvents[P].kind!==A.NotebookCellsChangeType.Initialize&&(this._onDidChangeContent.fire(),N=N||!O.rawEvents[P].transient);N&&this.setDirty(!0)}))}y?this.setDirty(!0):this.setDirty(!1)}}async _assertStat(){this._logService.debug("[notebook editor model] start assert stat");const y=await this._resolveStats(this.resource);return this._lastResolvedFileStat&&y&&y.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(y)}`),this._lastResolvedFileStat=y,new Promise(T=>{const _=this._notificationService.prompt(i.Severity.Info,t.localize(0,null),[{label:t.localize(1,null),run:()=>{T("revert")}},{label:t.localize(2,null),run:()=>{T("overwrite")}}],{sticky:!0});R.Event.once(_.onDidClose)(()=>{T("none")})})):(!this._lastResolvedFileStat&&y&&(this._lastResolvedFileStat=y),"overwrite")}async save(){if(!this.isResolved())return!1;const y=this.notebook.versionId;return this._logService.debug(`[notebook editor model] save(${y}) - enter with versionId ${y}`,this.resource.toString(!0)),this._saveSequentializer.hasPending(y)?(this._logService.debug(`[notebook editor model] save(${y}) - exit - found a pending save for versionId ${y}`,this.resource.toString(!0)),this._saveSequentializer.pending.then(()=>!0)):this._saveSequentializer.hasPending()?this._saveSequentializer.setNext(async()=>{await this.save()}).then(()=>!0):this._saveSequentializer.setPending(y,(async()=>{const T=await this._assertStat();if(T==="none")return;if(T==="revert"){await this.revert();return}if(!this.isResolved())return;const _=!1;this._logService.debug(`[notebook editor model] save(${y}) - document saved saved, start updating file stats`,this.resource.toString(!0),_),this._lastResolvedFileStat=await this._resolveStats(this.resource),_&&(this.setDirty(!1),this._onDidSave.fire({}))})()).then(()=>!0)}async saveAs(y){if(!this.isResolved())return;this._logService.debug("[notebook editor model] saveAs - enter",this.resource.toString(!0));const T=await this._assertStat();if(T==="none")return;if(T==="revert"){await this.revert();return}const _=!1;if(this._logService.debug("[notebook editor model] saveAs - document saved, start updating file stats",this.resource.toString(!0),_),this._lastResolvedFileStat=await this._resolveStats(this.resource),!!_)return this.setDirty(!1),this._onDidSave.fire({}),{resource:y}}async _resolveStats(y){if(y.scheme!==r.Schemas.untitled)try{this._logService.debug("[notebook editor model] _resolveStats",this.resource.toString(!0));const T=await this._fileService.stat(this.resource);return this._logService.debug(`[notebook editor model] _resolveStats - latest file stats: ${JSON.stringify(T)}`,this.resource.toString(!0)),T}catch{return}}};h=we([F(3,k.INotebookService),F(4,I.IWorkingCopyService),F(5,C.IWorkingCopyBackupService),F(6,u.IFileService),F(7,i.INotificationService),F(8,c.ILogService),F(9,n.IUntitledTextEditorService),F(10,f.ILabelService)],h),e.ComplexNotebookEditorModel=h;let v=class Lr extends p.EditorModel{constructor(y,T,_,L,M){super(),this.resource=y,this._hasAssociatedFilePath=T,this.viewType=_,this._workingCopyManager=L,this._fileService=M,this._onDidChangeDirty=this._register(new R.Emitter),this._onDidSave=this._register(new R.Emitter),this._onDidChangeOrphaned=this._register(new R.Emitter),this._onDidChangeReadonly=this._register(new R.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?.model?.notebookModel)}isDirty(){return this._workingCopy?.isDirty()??!1}isOrphaned(){return Lr._isStoredFileWorkingCopy(this._workingCopy)&&this._workingCopy.hasState(4)}hasAssociatedFilePath(){return!Lr._isStoredFileWorkingCopy(this._workingCopy)&&!!this._workingCopy?.hasAssociatedFilePath}isReadonly(){return Lr._isStoredFileWorkingCopy(this._workingCopy)?this._workingCopy.isReadonly():!!this._fileService.hasCapability(this.resource,2048)}revert(y){return(0,d.assertType)(this.isResolved()),this._workingCopy.revert(y)}save(y){return(0,d.assertType)(this.isResolved()),this._workingCopy.save(y)}async load(y){return this._workingCopy?await this._workingCopyManager.resolve(this.resource,{reload:{async:!y?.forceReadFromFile,force:y?.forceReadFromFile}}):(this.resource.scheme===r.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,y?.forceReadFromFile?{reload:{async:!1,force:!0}}:void 0),this._workingCopyListeners.add(this._workingCopy.onDidSave(T=>this._onDidSave.fire(T))),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,d.assertType)(this.isResolved()),this}async saveAs(y){const T=await this._workingCopyManager.saveAs(this.resource,y);if(!!T)return{resource:T.resource}}static _isStoredFileWorkingCopy(y){return!(y&&y.capabilities&2)}};v=we([F(4,u.IFileService)],v),e.SimpleNotebookEditorModel=v;class m extends a.Disposable{constructor(y,T){super(),this._notebookModel=y,this._notebookSerializer=T,this._onDidChangeContent=this._register(new R.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this.onWillDispose=y.onWillDispose.bind(y),this._register(y.onDidChangeContent(_=>{for(const L of _.rawEvents)if(L.kind!==A.NotebookCellsChangeType.Initialize&&!L.transient){this._onDidChangeContent.fire({isRedoing:!1,isUndoing:!1,isInitial:!1});break}}))}dispose(){this._notebookModel.dispose(),super.dispose()}get notebookModel(){return this._notebookModel}async snapshot(y){const T={metadata:(0,g.filter)(this._notebookModel.metadata,L=>!this._notebookSerializer.options.transientDocumentMetadata[L]),cells:[]};for(const L of this._notebookModel.cells){const M={cellKind:L.cellKind,language:L.language,mime:L.mime,source:L.getValue(),outputs:[],internalMetadata:L.internalMetadata};M.outputs=this._notebookSerializer.options.transientOutputs?[]:L.outputs,M.metadata=(0,g.filter)(L.metadata,O=>!this._notebookSerializer.options.transientCellMetadata[O]),T.cells.push(M)}const _=await this._notebookSerializer.notebookToData(T);if(y.isCancellationRequested)throw new o.CancellationError;return(0,s.bufferToStream)(_)}async update(y,T){const _=await(0,s.streamToBuffer)(y),L=await this._notebookSerializer.dataToNotebook(_);if(T.isCancellationRequested)throw new o.CancellationError;this._notebookModel.reset(L.cells,L.metadata,this._notebookSerializer.options)}get versionId(){return this._notebookModel.alternativeVersionId}pushStackElement(){this._notebookModel.pushStackElement("save",void 0,void 0)}}e.NotebookFileWorkingCopyModel=m;let w=class{constructor(y,T){this._viewType=y,this._notebookService=T}async createModel(y,T,_){const L=await this._notebookService.withNotebookDataProvider(this._viewType);if(!(L instanceof k.SimpleNotebookProviderInfo))throw new Error("CANNOT open file notebook with this provider");const M=await(0,s.streamToBuffer)(T),O=await L.serializer.dataToNotebook(M);if(_.isCancellationRequested)throw new o.CancellationError;const N=this._notebookService.createNotebookTextModel(L.viewType,y,O,L.serializer.options);return new m(N,L.serializer)}};w=we([F(1,k.INotebookService)],w),e.NotebookFileWorkingCopyModelFactory=w}),define(ae[402],le([1,0,6,17,60,5,43,401,22,230,177,261,398,18,9,57,19,169,2,35]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextEditorService=e.ITextEditorService=void 0,e.ITextEditorService=(0,A.createDecorator)("textEditorService");let n=class extends s.Disposable{constructor(o,g,h,v,m){super(),this.untitledTextEditorService=o,this.instantiationService=g,this.uriIdentityService=h,this.fileService=v,this.editorResolverService=m,this.editorInputCache=new R.ResourceMap,this.fileEditorFactory=p.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},{},{createEditorInput:o=>({editor:this.createTextEditor(o)}),createUntitledEditorInput:o=>({editor:this.createTextEditor(o)}),createDiffEditorInput:o=>({editor:this.createTextEditor(o)})}))}async resolveTextEditor(o){return this.createTextEditor(o)}createTextEditor(o){if((0,k.isResourceMergeEditorInput)(o))return this.createTextEditor(o.result);if((0,k.isResourceDiffEditorInput)(o)){const v=this.createTextEditor(o.original),m=this.createTextEditor(o.modified);return this.instantiationService.createInstance(b.DiffEditorInput,o.label,o.description,v,m,void 0)}if((0,k.isResourceSideBySideEditorInput)(o)){const v=this.createTextEditor(o.primary),m=this.createTextEditor(o.secondary);return this.instantiationService.createInstance(S.SideBySideEditorInput,o.label,o.description,m,v)}const g=o;if(g.forceUntitled||!g.resource||g.resource.scheme===I.Schemas.untitled){const v={languageId:g.languageId,initialValue:g.contents,encoding:g.encoding};let m;return g.resource?.scheme===I.Schemas.untitled?m=this.untitledTextEditorService.create({untitledResource:g.resource,...v}):m=this.untitledTextEditorService.create({associatedResource:g.resource,...v}),this.createOrGetCached(m.resource,()=>{const w=this.instantiationService.createInstance(r.UntitledTextEditorInput,m);return t.Event.once(w.onWillDispose)(()=>m.dispose()),w})}const h=o;if(h.resource instanceof i.URI){const v=h.label||(0,u.basename)(h.resource),m=h.resource,w=this.uriIdentityService.asCanonicalUri(m);return this.createOrGetCached(w,()=>h.forceFile||this.fileService.hasProvider(w)?this.fileEditorFactory.createFileEditor(w,m,h.label,h.description,h.encoding,h.languageId,h.contents,this.instantiationService):this.instantiationService.createInstance(C.TextResourceEditorInput,w,h.label,h.description,h.languageId,h.contents),D=>{D instanceof r.UntitledTextEditorInput||(D instanceof C.TextResourceEditorInput?(v&&D.setName(v),h.description&&D.setDescription(h.description),h.languageId&&D.setPreferredLanguageId(h.languageId),typeof h.contents=="string"&&D.setPreferredContents(h.contents)):(D.setPreferredResource(m),h.label&&D.setPreferredName(h.label),h.description&&D.setPreferredDescription(h.description),h.encoding&&D.setPreferredEncoding(h.encoding),h.languageId&&D.setPreferredLanguageId(h.languageId),typeof h.contents=="string"&&D.setPreferredContents(h.contents)))})}throw new Error(`ITextEditorService: Unable to create texteditor from ${JSON.stringify(o)}`)}createOrGetCached(o,g,h){let v=this.editorInputCache.get(o);return v?(h?.(v),v):(v=g(),this.editorInputCache.set(o,v),t.Event.once(v.onWillDispose)(()=>this.editorInputCache.delete(o)),v)}};n=we([F(0,E.IUntitledTextEditorService),F(1,A.IInstantiationService),F(2,f.IUriIdentityService),F(3,c.IFileService),F(4,l.IEditorResolverService)],n),e.TextEditorService=n,(0,d.registerSingleton)(e.ITextEditorService,n,0)}),define(ae[2934],le([1,0,2,9,402,18,354,262,19]),function(J,e,t,p,R,A,k,E,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileEditorWorkingCopyEditorHandler=e.FileEditorInputSerializer=void 0;class b{canSerialize(r){return!0}serialize(r){const u=r,i=u.resource,f=u.preferredResource,c={resourceJSON:i.toJSON(),preferredResourceJSON:(0,A.isEqual)(i,f)?void 0:f,name:u.getPreferredName(),description:u.getPreferredDescription(),encoding:u.getEncoding(),modeId:u.getPreferredLanguageId()};return JSON.stringify(c)}deserialize(r,u){return r.invokeFunction(i=>{const f=JSON.parse(u),c=p.URI.revive(f.resourceJSON),l=p.URI.revive(f.preferredResourceJSON),s=f.name,d=f.description,n=f.encoding,a=f.modeId,o=i.get(R.ITextEditorService).createTextEditor({resource:c,label:s,description:d,encoding:n,languageId:a,forceFile:!0});return l&&o.setPreferredResource(l),o})}}e.FileEditorInputSerializer=b;let S=class extends t.Disposable{constructor(r,u,i){super(),this.workingCopyEditorService=r,this.textEditorService=u,this.fileService=i,this.installHandler()}installHandler(){this._register(this.workingCopyEditorService.registerHandler({handles:r=>r.typeId===k.NO_TYPE_ID&&this.fileService.hasProvider(r.resource),isOpen:(r,u)=>(0,A.isEqual)(r.resource,u.resource),createEditor:r=>this.textEditorService.createTextEditor({resource:r.resource,forceFile:!0})}))}};S=we([F(0,E.IWorkingCopyEditorService),F(1,R.ITextEditorService),F(2,I.IFileService)],S),e.FileEditorWorkingCopyEditorHandler=S}),define(ae[2935],le([1,0,2,18,54,42,62,1815,8,55,155,17,34,214,177,169,402,106,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesContribution=void 0;const d=C.Registry.as(S.Extensions.JSONContribution);let n=class{constructor(g,h,v,m,w,D,y,T,_){this.modelService=g,this.textModelResolverService=h,this.preferencesService=v,this.languageService=m,this.userDataProfileService=w,this.workspaceService=D,this.configurationService=y,this.editorResolverService=T,this.textEditorService=_,this.settingsListener=this.configurationService.onDidChangeConfiguration(L=>{(L.affectsConfiguration(l.USE_SPLIT_JSON_SETTING)||L.affectsConfiguration(l.DEFAULT_SETTINGS_EDITOR_SETTING))&&this.handleSettingsEditorRegistration()}),this.handleSettingsEditorRegistration(),this.start()}handleSettingsEditorRegistration(){(0,t.dispose)(this.editorOpeningListener),(!!this.configurationService.getValue(l.USE_SPLIT_JSON_SETTING)||!!this.configurationService.getValue(l.DEFAULT_SETTINGS_EDITOR_SETTING))&&(this.editorOpeningListener=this.editorResolverService.registerEditor("**/settings.json",{id:i.SideBySideEditorInput.ID,label:E.localize(0,null),priority:f.RegisteredEditorPriority.builtin},{},{createEditorInput:({resource:g,options:h})=>{if((0,p.isEqual)(g,this.userDataProfileService.currentProfile.settingsResource))return{editor:this.preferencesService.createSplitJsonEditorInput(3,g),options:h};const v=this.workspaceService.getWorkbenchState();if(v===2){const m=this.workspaceService.getWorkspace().folders;if((0,p.isEqual)(g,m[0].toResource(l.FOLDER_SETTINGS_PATH)))return{editor:this.preferencesService.createSplitJsonEditorInput(5,g),options:h}}else if(v===3){const m=this.workspaceService.getWorkspace().folders;for(const w of m)if((0,p.isEqual)(g,w.toResource(l.FOLDER_SETTINGS_PATH)))return{editor:this.preferencesService.createSplitJsonEditorInput(6,g),options:h}}return{editor:this.textEditorService.createTextEditor({resource:g}),options:h}}}))}start(){this.textModelResolverService.registerTextModelContentProvider("vscode",{provideTextContent:g=>{if(g.scheme!=="vscode")return null;if(g.authority==="schemas"){const h=this.getSchemaModel(g);if(h)return Promise.resolve(h)}return Promise.resolve(this.preferencesService.resolveModel(g))}})}getSchemaModel(g){let h=d.getSchemaContributions().schemas[g.toString()];if(h){const v=JSON.stringify(h),m=this.languageService.createById("jsonc"),w=this.modelService.createModel(v,m,g),D=new t.DisposableStore;return D.add(d.onDidChangeSchema(y=>{y===g.toString()&&(h=d.getSchemaContributions().schemas[g.toString()],w.setValue(JSON.stringify(h)))})),D.add(w.onWillDispose(()=>D.dispose())),w}return null}dispose(){(0,t.dispose)(this.editorOpeningListener),(0,t.dispose)(this.settingsListener)}};n=we([F(0,R.IModelService),F(1,k.ITextModelService),F(2,l.IPreferencesService),F(3,A.ILanguageService),F(4,s.IUserDataProfileService),F(5,r.IWorkspaceContextService),F(6,I.IConfigurationService),F(7,f.IEditorResolverService),F(8,c.ITextEditorService)],n),e.PreferencesContribution=n,C.Registry.as(b.Extensions.Configuration).registerConfiguration({...u.workbenchConfigurationNodeBase,properties:{"workbench.settings.enableNaturalLanguageSearch":{type:"boolean",description:E.localize(1,null),default:!0,scope:3,tags:["usesOnlineServices"]},"workbench.settings.settingsSearchTocBehavior":{type:"string",enum:["hide","filter"],enumDescriptions:[E.localize(2,null),E.localize(3,null)],description:E.localize(4,null),default:"filter",scope:3}}})}),define(ae[2936],le([1,0,5,43,186,177,60,19,6,9,18,230,58,24,8,2,16,105,35,13,2447,11,34,164,57,169,136,118,74,671,402]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorService=void 0;let _=class extends f.Disposable{constructor(M,O,N,P,B,V,z,x,H,W,U){super(),this.editorGroupService=M,this.instantiationService=O,this.fileService=N,this.configurationService=P,this.contextService=B,this.uriIdentityService=V,this.editorResolverService=z,this.workingCopyService=x,this.workspaceTrustRequestService=H,this.hostService=W,this.textEditorService=U,this._onDidActiveEditorChange=this._register(new I.Emitter),this.onDidActiveEditorChange=this._onDidActiveEditorChange.event,this._onDidVisibleEditorsChange=this._register(new I.Emitter),this.onDidVisibleEditorsChange=this._onDidVisibleEditorsChange.event,this._onDidEditorsChange=this._register(new I.Emitter),this.onDidEditorsChange=this._onDidEditorsChange.event,this._onDidCloseEditor=this._register(new I.Emitter),this.onDidCloseEditor=this._onDidCloseEditor.event,this._onDidOpenEditorFail=this._register(new I.Emitter),this.onDidOpenEditorFail=this._onDidOpenEditorFail.event,this._onDidMostRecentlyActiveEditorsChange=this._register(new I.Emitter),this.onDidMostRecentlyActiveEditorsChange=this._onDidMostRecentlyActiveEditorsChange.event,this.lastActiveEditor=void 0,this.activeOutOfWorkspaceWatchers=new k.ResourceMap,this.closeOnFileDelete=!1,this.editorsObserver=this._register(this.instantiationService.createInstance(n.EditorsObserver)),this.onConfigurationUpdated(P.getValue()),this.registerListeners()}registerListeners(){this.editorGroupService.whenReady.then(()=>this.onEditorGroupsReady()),this.editorGroupService.onDidChangeActiveGroup(M=>this.handleActiveEditorChange(M)),this.editorGroupService.onDidAddGroup(M=>this.registerGroupListeners(M)),this.editorsObserver.onDidMostRecentlyActiveEditorsChange(()=>this._onDidMostRecentlyActiveEditorsChange.fire()),this._register(this.onDidVisibleEditorsChange(()=>this.handleVisibleEditorsChange())),this._register(this.fileService.onDidRunOperation(M=>this.onDidRunFileOperation(M))),this._register(this.fileService.onDidFilesChange(M=>this.onDidFilesChange(M))),this._register(this.configurationService.onDidChangeConfiguration(M=>this.onConfigurationUpdated(this.configurationService.getValue())))}onEditorGroupsReady(){for(const M of this.editorGroupService.groups)this.registerGroupListeners(M);this.activeEditor&&(this.doHandleActiveEditorChangeEvent(),this._onDidVisibleEditorsChange.fire())}handleActiveEditorChange(M){M===this.editorGroupService.activeGroup&&(!this.lastActiveEditor&&!M.activeEditor||this.doHandleActiveEditorChangeEvent())}doHandleActiveEditorChangeEvent(){const M=this.editorGroupService.activeGroup;this.lastActiveEditor=(0,d.withNullAsUndefined)(M.activeEditor),this._onDidActiveEditorChange.fire()}registerGroupListeners(M){const O=new f.DisposableStore;O.add(M.onDidModelChange(N=>{this._onDidEditorsChange.fire({groupId:M.id,event:N})})),O.add(M.onDidActiveEditorChange(()=>{this.handleActiveEditorChange(M),this._onDidVisibleEditorsChange.fire()})),O.add(M.onDidCloseEditor(N=>{this._onDidCloseEditor.fire(N)})),O.add(M.onDidOpenEditorFail(N=>{this._onDidOpenEditorFail.fire({editor:N,groupId:M.id})})),I.Event.once(M.onWillDispose)(()=>{(0,f.dispose)(O)})}handleVisibleEditorsChange(){const M=new k.ResourceSet;for(const O of this.visibleEditors){const N=(0,c.distinct)((0,c.coalesce)([p.EditorResourceAccessor.getCanonicalUri(O,{supportSideBySide:p.SideBySideEditor.PRIMARY}),p.EditorResourceAccessor.getCanonicalUri(O,{supportSideBySide:p.SideBySideEditor.SECONDARY})]),P=>P.toString());for(const P of N)this.fileService.hasProvider(P)&&!this.contextService.isInsideWorkspace(P)&&M.add(P)}for(const O of this.activeOutOfWorkspaceWatchers.keys())M.has(O)||((0,f.dispose)(this.activeOutOfWorkspaceWatchers.get(O)),this.activeOutOfWorkspaceWatchers.delete(O));for(const O of M.keys())if(!this.activeOutOfWorkspaceWatchers.get(O)){const N=this.fileService.watch(O);this.activeOutOfWorkspaceWatchers.set(O,N)}}async onDidRunFileOperation(M){M.isOperation(2)&&this.handleMovedFile(M.resource,M.target.resource),(M.isOperation(1)||M.isOperation(2))&&this.handleDeletedFile(M.resource,!1,M.target?M.target.resource:void 0)}onDidFilesChange(M){M.gotDeleted()&&this.handleDeletedFile(M,!0)}async handleMovedFile(M,O){for(const N of this.editorGroupService.groups){const P=[];for(const B of N.editors){const V=B.resource;if(!V||!this.uriIdentityService.extUri.isEqualOrParent(V,M))continue;let z;if(this.uriIdentityService.extUri.isEqual(M,V))z=O;else{const W=(0,g.indexOfPath)(V.path,M.path,this.uriIdentityService.extUri.ignorePathCasing(V));z=(0,S.joinPath)(O,V.path.substr(W+M.path.length+1))}const x=await B.rename(N.id,z);if(!x)return;const H={preserveFocus:!0,pinned:N.isPinned(B),sticky:N.isSticky(B),index:N.getIndexOfEditor(B),inactive:!N.isActive(B)};(0,p.isEditorInput)(x.editor)?P.push({editor:B,replacement:x.editor,options:{...x.options,...H}}):P.push({editor:B,replacement:{...x.editor,options:{...x.editor.options,...H}}})}P.length&&this.replaceEditors(P,N)}}onConfigurationUpdated(M){typeof M.workbench?.editor?.closeOnFileDelete=="boolean"?this.closeOnFileDelete=M.workbench.editor.closeOnFileDelete:this.closeOnFileDelete=!1}handleDeletedFile(M,O,N){for(const P of this.getAllNonDirtyEditors({includeUntitled:!1,supportSideBySide:!0}))(async()=>{const B=P.resource;if(!!B&&(this.closeOnFileDelete||!O||!this.workingCopyService.has(B))){if(N&&this.uriIdentityService.extUri.isEqualOrParent(B,N))return;let V=!1;if(M instanceof E.FileChangesEvent?V=M.contains(B,2):V=this.uriIdentityService.extUri.isEqualOrParent(B,M),!V)return;let z=!1;O&&this.fileService.hasProvider(B)&&(await(0,a.timeout)(100),z=await this.fileService.exists(B)),!z&&!P.isDisposed()&&P.dispose()}})()}getAllNonDirtyEditors(M){const O=[];function N(P){P.hasCapability(4)&&!M.includeUntitled||P.isDirty()||O.push(P)}for(const P of this.editors)M.supportSideBySide&&P instanceof A.SideBySideEditorInput?(N(P.primary),N(P.secondary)):N(P);return O}get activeEditorPane(){return this.editorGroupService.activeGroup?.activeEditorPane}get activeTextEditorControl(){const M=this.activeEditorPane;if(M){const O=M.getControl();if((0,l.isCodeEditor)(O)||(0,l.isDiffEditor)(O))return O;if((0,l.isCompositeEditor)(O)&&(0,l.isCodeEditor)(O.activeCodeEditor))return O.activeCodeEditor}}get activeTextEditorLanguageId(){let M;const O=this.activeTextEditorControl;return(0,l.isDiffEditor)(O)?M=O.getModifiedEditor():M=O,M?.getModel()?.getLanguageId()}get count(){return this.editorsObserver.count}get editors(){return this.getEditors(1).map(({editor:M})=>M)}getEditors(M,O){switch(M){case 0:return O?.excludeSticky?this.editorsObserver.editors.filter(({groupId:N,editor:P})=>!this.editorGroupService.getGroup(N)?.isSticky(P)):this.editorsObserver.editors;case 1:{const N=[];for(const P of this.editorGroupService.getGroups(2))N.push(...P.getEditors(1,O).map(B=>({editor:B,groupId:P.id})));return N}}}get activeEditor(){const M=this.editorGroupService.activeGroup;return M?(0,d.withNullAsUndefined)(M.activeEditor):void 0}get visibleEditorPanes(){return(0,c.coalesce)(this.editorGroupService.groups.map(M=>M.activeEditorPane))}get visibleTextEditorControls(){const M=[];for(const O of this.visibleEditorPanes){const N=O.getControl();((0,l.isCodeEditor)(N)||(0,l.isDiffEditor)(N))&&M.push(N)}return M}get visibleEditors(){return(0,c.coalesce)(this.editorGroupService.groups.map(M=>M.activeEditor))}async openEditor(M,O,N){let P,B=(0,p.isEditorInput)(M)?O:M.options,V;if((0,u.isPreferredGroup)(O)&&(N=O),!(0,p.isEditorInput)(M)){const z=await this.editorResolverService.resolveEditor(M,N);if(z===1)return;(0,p.isEditorInputWithOptionsAndGroup)(z)&&(P=z.editor,B=z.options,V=z.group)}if(P||(P=(0,p.isEditorInput)(M)?M:await this.textEditorService.resolveTextEditor(M)),!V){let z;[V,z]=this.instantiationService.invokeFunction(y.findGroup,{editor:P,options:B},N),z&&(B={...B,activation:z})}return V.openEditor(P,B)}async openEditors(M,O,N){if(N?.validateTrust&&!await this.handleWorkspaceTrust(M))return[];const P=new Map;for(const V of M){let z,x;if(!(0,p.isEditorInputWithOptions)(V)){const W=await this.editorResolverService.resolveEditor(V,O);if(W===1)continue;(0,p.isEditorInputWithOptionsAndGroup)(W)&&(z=W,x=W.group)}z||(z=(0,p.isEditorInputWithOptions)(V)?V:{editor:await this.textEditorService.resolveTextEditor(V),options:V.options}),x||([x]=this.instantiationService.invokeFunction(y.findGroup,z,O));let H=P.get(x);H||(H=[],P.set(x,H)),H.push(z)}const B=[];for(const[V,z]of P)B.push(V.openEditors(z));return(0,c.coalesce)(await a.Promises.settled(B))}async handleWorkspaceTrust(M){const{resources:O,diffMode:N,mergeMode:P}=this.extractEditorResources(M);switch(await this.workspaceTrustRequestService.requestOpenFilesTrust(O)){case 1:return!0;case 2:return await this.hostService.openWindow(O.map(V=>({fileUri:V})),{forceNewWindow:!0,diffMode:N,mergeMode:P}),!1;case 3:return!1}}extractEditorResources(M){const O=new k.ResourceSet;let N=!1,P=!1;for(const B of M)if((0,p.isEditorInputWithOptions)(B)){const V=p.EditorResourceAccessor.getOriginalUri(B.editor,{supportSideBySide:p.SideBySideEditor.BOTH});b.URI.isUri(V)?O.add(V):V&&(V.primary&&O.add(V.primary),V.secondary&&O.add(V.secondary),N=B.editor instanceof C.DiffEditorInput)}else(0,p.isResourceMergeEditorInput)(B)&&(b.URI.isUri(B.input1)&&O.add(B.input1.resource),b.URI.isUri(B.input2)&&O.add(B.input2.resource),b.URI.isUri(B.base)&&O.add(B.base.resource),b.URI.isUri(B.result)&&O.add(B.result.resource),P=!0),(0,p.isResourceDiffEditorInput)(B)?(b.URI.isUri(B.original.resource)&&O.add(B.original.resource),b.URI.isUri(B.modified.resource)&&O.add(B.modified.resource),N=!0):(0,p.isResourceEditorInput)(B)&&O.add(B.resource);return{resources:Array.from(O.keys()),diffMode:N,mergeMode:P}}isOpened(M){return this.editorsObserver.hasEditor({resource:this.uriIdentityService.asCanonicalUri(M.resource),typeId:M.typeId,editorId:M.editorId})}isVisible(M){for(const O of this.editorGroupService.groups)if(O.activeEditor?.matches(M))return!0;return!1}async closeEditor({editor:M,groupId:O},N){await this.editorGroupService.getGroup(O)?.closeEditor(M,N)}async closeEditors(M,O){const N=new Map;for(const{editor:P,groupId:B}of M){const V=this.editorGroupService.getGroup(B);if(!V)continue;let z=N.get(V);z||(z=[],N.set(V,z)),z.push(P)}for(const[P,B]of N)await P.closeEditors(B,O)}findEditors(M,O,N){const P=b.URI.isUri(M)?M:M.resource,B=b.URI.isUri(M)?void 0:M.typeId;if(O?.supportSideBySide!==p.SideBySideEditor.ANY&&O?.supportSideBySide!==p.SideBySideEditor.SECONDARY&&!this.editorsObserver.hasEditors(P))return b.URI.isUri(M)||(0,d.isUndefined)(N)?[]:void 0;if((0,d.isUndefined)(N)){const V=[];for(const z of this.editorGroupService.getGroups(1)){const x=[];if(b.URI.isUri(M))x.push(...this.findEditors(M,O,z));else{const H=this.findEditors(M,O,z);H&&x.push(H)}V.push(...x.map(H=>({editor:H,groupId:z.id})))}return V}else{const V=typeof N=="number"?this.editorGroupService.getGroup(N):N;if(b.URI.isUri(M))return V?V.findEditors(P,O):[];{if(!V)return;const z=V.findEditors(P,O);for(const x of z)if(x.typeId===B)return x;return}}}async replaceEditors(M,O){const N=typeof O=="number"?this.editorGroupService.getGroup(O):O,P=[];for(const B of M){let V;if(!(0,p.isEditorInput)(B.replacement)){const z=await this.editorResolverService.resolveEditor(B.replacement,N);if(z===1)continue;(0,p.isEditorInputWithOptionsAndGroup)(z)&&(V={editor:B.editor,replacement:z.editor,options:z.options,forceReplaceDirty:B.forceReplaceDirty})}V||(V={editor:B.editor,replacement:(0,r.isEditorReplacement)(B)?B.replacement:await this.textEditorService.resolveTextEditor(B.replacement),options:(0,r.isEditorReplacement)(B)?B.options:B.replacement.options,forceReplaceDirty:B.forceReplaceDirty}),P.push(V)}return N?.replaceEditors(P)}async save(M,O){Array.isArray(M)||(M=[M]);const N=this.getUniqueEditors(M),P=[],B=[];if(O?.saveAs)B.push(...N);else for(const{groupId:z,editor:x}of N)x.hasCapability(4)?B.push({groupId:z,editor:x}):P.push({groupId:z,editor:x});const V=await a.Promises.settled(P.map(({groupId:z,editor:x})=>(O?.reason===1&&this.editorGroupService.getGroup(z)?.pinEditor(x),x.save(z,O))));for(const{groupId:z,editor:x}of B){if(x.isDisposed())continue;const H=await this.openEditor(x,z),W={pinned:!0,viewState:H?.getViewState()},U=O?.saveAs?await x.saveAs(z,O):await x.save(z,O);if(V.push(U),!U)break;if(!x.matches(U)){const $=x.hasCapability(4)?this.editorGroupService.groups.map(q=>q.id):[z];for(const q of $)U instanceof R.EditorInput?await this.replaceEditors([{editor:x,replacement:U,options:W}],q):await this.replaceEditors([{editor:x,replacement:{...U,options:W}}],q)}}return V.every(z=>!!z)}saveAll(M){return this.save(this.getAllDirtyEditors(M),M)}async revert(M,O){Array.isArray(M)||(M=[M]);const N=this.getUniqueEditors(M);return await a.Promises.settled(N.map(async({groupId:P,editor:B})=>(this.editorGroupService.getGroup(P)?.pinEditor(B),B.revert(P,O)))),!N.some(({editor:P})=>P.isDirty())}async revertAll(M){return this.revert(this.getAllDirtyEditors(M),M)}getAllDirtyEditors(M){const O=[];for(const N of this.editorGroupService.getGroups(1))for(const P of N.getEditors(0))!P.isDirty()||!M?.includeUntitled&&P.hasCapability(4)||M?.excludeSticky&&N.isSticky(P)||O.push({groupId:N.id,editor:P});return O}getUniqueEditors(M){const O=[];for(const{editor:N,groupId:P}of M)O.some(B=>B.editor.matches(N))||O.push({editor:N,groupId:P});return O}dispose(){super.dispose(),this.activeOutOfWorkspaceWatchers.forEach(M=>(0,f.dispose)(M)),this.activeOutOfWorkspaceWatchers.clear()}};_=we([F(0,r.IEditorGroupsService),F(1,t.IInstantiationService),F(2,E.IFileService),F(3,i.IConfigurationService),F(4,o.IWorkspaceContextService),F(5,h.IUriIdentityService),F(6,v.IEditorResolverService),F(7,m.IWorkingCopyService),F(8,w.IWorkspaceTrustRequestService),F(9,D.IHostService),F(10,T.ITextEditorService)],_),e.EditorService=_,(0,s.registerSingleton)(u.IEditorService,_,0)}),define(ae[2937],le([1,0,21,6,123,2,22,9,332,105,54,42,62,2030,8,55,35,5,38,49,26,17,34,43,177,261,272,58,24,678,106,681,463,104,402,78,13,244,135,103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreferencesService=void 0;const x=`{ }`;let H=class extends A.Disposable{constructor(U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne){super(),this.editorService=U,this.editorGroupService=$,this.textFileService=q,this.configurationService=X,this.notificationService=G,this.contextService=Q,this.instantiationService=j,this.userDataProfileService=K,this.userDataProfilesService=Y,this.textModelResolverService=ee,this.modelService=re,this.jsonEditingService=oe,this.languageService=se,this.labelService=te,this.remoteAgentService=Z,this.textEditorService=ne,this._onDispose=this._register(new p.Emitter),this.defaultKeybindingsResource=E.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/keybindings.json"}),this.defaultSettingsRawResource=E.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/defaultSettings.json"}),this._register(ie.onDidUpdateKeybindings(()=>{const ce=re.getModel(this.defaultKeybindingsResource);!ce||re.updateModel(ce,(0,L.defaultKeybindingsContents)(ie))}))}get userSettingsResource(){return this.userDataProfileService.currentProfile.settingsResource}get workspaceSettingsResource(){if(this.contextService.getWorkbenchState()===1)return null;const U=this.contextService.getWorkspace();return U.configuration||U.folders[0].toResource(T.FOLDER_SETTINGS_PATH)}get settingsEditor2Input(){return this.instantiationService.createInstance(_.SettingsEditor2Input)}getFolderSettingsResource(U){const $=this.contextService.getWorkspaceFolder(U);return $?$.toResource(T.FOLDER_SETTINGS_PATH):null}resolveModel(U){if(this.isDefaultSettingsResource(U)){const $=this.getConfigurationTargetFromDefaultSettingsResource(U),q=this.languageService.createById("jsonc"),X=this._register(this.modelService.createModel("",q,U));let G;return this.configurationService.onDidChangeConfiguration(Q=>{if(Q.source===7){const j=this.modelService.getModel(U);if(!j)return;G=this.getDefaultSettings($),this.modelService.updateModel(j,G.getContentWithoutMostCommonlyUsed(!0)),G._onDidChange.fire()}}),G||(G=this.getDefaultSettings($),this.modelService.updateModel(X,G.getContentWithoutMostCommonlyUsed(!0))),X}if(this.defaultSettingsRawResource.toString()===U.toString()){const $=this.instantiationService.createInstance(L.DefaultRawSettingsEditorModel,this.getDefaultSettings(3)),q=this.languageService.createById("jsonc");return this._register(this.modelService.createModel($.content,q,U))}if(this.defaultKeybindingsResource.toString()===U.toString()){const $=this.instantiationService.createInstance(L.DefaultKeybindingsEditorModel,U),q=this.languageService.createById("jsonc");return this._register(this.modelService.createModel($.content,q,U))}return null}async createPreferencesEditorModel(U){if(this.isDefaultSettingsResource(U))return this.createDefaultSettingsEditorModel(U);if(this.userSettingsResource.toString()===U.toString()||this.userDataProfilesService.defaultProfile.settingsResource.toString()===U.toString())return this.createEditableSettingsEditorModel(3,U);const $=await this.getEditableSettingsURI(5);if($&&$.toString()===U.toString())return this.createEditableSettingsEditorModel(5,$);if(this.contextService.getWorkbenchState()===3){const G=await this.getEditableSettingsURI(6,U);if(G&&G.toString()===U.toString())return this.createEditableSettingsEditorModel(6,U)}const q=await this.remoteAgentService.getEnvironment(),X=q?q.settingsPath:null;return X&&X.toString()===U.toString()?this.createEditableSettingsEditorModel(4,U):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(U={}){return U={...U,target:3},U.query&&(U.jsonEditor=!1),this.open(this.userSettingsResource,U)}openLanguageSpecificSettings(U,$={}){return this.shouldOpenJsonByDefault()?($.query=void 0,$.revealSetting={key:`[${U}]`,edit:!0}):$.query=`@lang:${U}${$.query?` ${$.query}`:""}`,$.target=$.target??3,this.open(this.userSettingsResource,$)}open(U,$){return $={...$,jsonEditor:$.jsonEditor??this.shouldOpenJsonByDefault()},$.jsonEditor?this.openSettingsJson(U,$):this.openSettings2($)}async openSettings2(U){const $=this.settingsEditor2Input;return U={...U,focusSearch:!0},await this.editorService.openEditor($,(0,T.validateSettingsEditorOptions)(U),U.openToSide?D.SIDE_GROUP:void 0),this.editorGroupService.activeGroup.activeEditorPane}openApplicationSettings(U={}){return U={...U,target:3},this.open(this.userDataProfilesService.defaultProfile.settingsResource,U)}openUserSettings(U={}){return U={...U,target:3},this.open(this.userSettingsResource,U)}async openRemoteSettings(U={}){const $=await this.remoteAgentService.getEnvironment();$&&(U={...U,target:4},this.open($.settingsPath,U))}openWorkspaceSettings(U={}){return this.workspaceSettingsResource?(U={...U,target:5},this.open(this.workspaceSettingsResource,U)):(this.notificationService.info(u.localize(0,null)),Promise.reject(null))}async openFolderSettings(U={}){if(U={...U,target:6},!U.folderUri)throw new Error("Missing folder URI");const $=await this.getEditableSettingsURI(6,U.folderUri);if(!$)throw new Error(`Invalid folder URI - ${U.folderUri.toString()}`);return this.open($,U)}async openGlobalKeybindingSettings(U,$){if($={pinned:!0,revealIfOpened:!0,...$},U){const q="// "+u.localize(1,null)+` [ ]`,X=this.userDataProfileService.currentProfile.keybindingsResource,G=!!this.configurationService.getValue("workbench.settings.openDefaultKeybindings");if(await this.createIfNotExists(X,q),G){const Q=this.editorGroupService.activeGroup,j=this.editorGroupService.addGroup(Q.id,3);await Promise.all([this.editorService.openEditor({resource:this.defaultKeybindingsResource,options:{pinned:!0,preserveFocus:!0,revealIfOpened:!0,override:g.DEFAULT_EDITOR_ASSOCIATION.id},label:u.localize(2,null),description:""}),this.editorService.openEditor({resource:X,options:$},j.id)])}else await this.editorService.openEditor({resource:X,options:$})}else{const q=await this.editorService.openEditor(this.instantiationService.createInstance(y.KeybindingsEditorInput),{...$});$.query&&q.search($.query)}}openDefaultKeybindingsFile(){return this.editorService.openEditor({resource:this.defaultKeybindingsResource,label:u.localize(3,null)})}async openSettingsJson(U,$){const q=$?.openToSide?D.SIDE_GROUP:void 0,X=await this.doOpenSettingsJson(U,$,q);return X&&$?.revealSetting&&await this.revealSetting($.revealSetting.key,!!$.revealSetting.edit,X,U),X}async doOpenSettingsJson(U,$,q){const X=!!this.configurationService.getValue(T.USE_SPLIT_JSON_SETTING),G=!!this.configurationService.getValue(T.DEFAULT_SETTINGS_EDITOR_SETTING);if(X||G)return this.doOpenSplitJSON(U,$,q);const Q=$?.target??2,j=await this.getOrCreateEditableSettingsEditorInput(Q,U);return $={...$,pinned:!0},await this.editorService.openEditor(j,(0,T.validateSettingsEditorOptions)($),q)}async doOpenSplitJSON(U,$={},q){const X=$.target??2;await this.createSettingsIfNotExists(X,U);const G=this.createSplitJsonEditorInput(X,U);return $={...$,pinned:!0},this.editorService.openEditor(G,(0,T.validateSettingsEditorOptions)($),q)}createSplitJsonEditorInput(U,$){const q=this.textEditorService.createTextEditor({resource:$}),X=this.instantiationService.createInstance(v.TextResourceEditorInput,this.getDefaultSettingsResource(U),void 0,void 0,void 0,void 0);return this.instantiationService.createInstance(h.SideBySideEditorInput,q.getName(),void 0,X,q)}createSettings2EditorModel(){return this.instantiationService.createInstance(L.Settings2EditorModel,this.getDefaultSettings(3))}getConfigurationTargetFromDefaultSettingsResource(U){return this.isDefaultWorkspaceSettingsResource(U)?5:this.isDefaultFolderSettingsResource(U)?6:3}isDefaultSettingsResource(U){return this.isDefaultUserSettingsResource(U)||this.isDefaultWorkspaceSettingsResource(U)||this.isDefaultFolderSettingsResource(U)}isDefaultUserSettingsResource(U){return U.authority==="defaultsettings"&&U.scheme===k.Schemas.vscode&&!!U.path.match(/\/(\d+\/)?settings\.json$/)}isDefaultWorkspaceSettingsResource(U){return U.authority==="defaultsettings"&&U.scheme===k.Schemas.vscode&&!!U.path.match(/\/(\d+\/)?workspaceSettings\.json$/)}isDefaultFolderSettingsResource(U){return U.authority==="defaultsettings"&&U.scheme===k.Schemas.vscode&&!!U.path.match(/\/(\d+\/)?resourceSettings\.json$/)}getDefaultSettingsResource(U){switch(U){case 5:return E.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/workspaceSettings.json"});case 6:return E.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/resourceSettings.json"})}return E.URI.from({scheme:k.Schemas.vscode,authority:"defaultsettings",path:"/settings.json"})}async getOrCreateEditableSettingsEditorInput(U,$){return await this.createSettingsIfNotExists(U,$),this.textEditorService.createTextEditor({resource:$})}async createEditableSettingsEditorModel(U,$){const q=this.contextService.getWorkspace();if(q.configuration&&q.configuration.toString()===$.toString()){const G=await this.textModelResolverService.createModelReference($);return this.instantiationService.createInstance(L.WorkspaceConfigurationEditorModel,G,U)}const X=await this.textModelResolverService.createModelReference($);return this.instantiationService.createInstance(L.SettingsEditorModel,X,U)}async createDefaultSettingsEditorModel(U){const $=await this.textModelResolverService.createModelReference(U),q=this.getConfigurationTargetFromDefaultSettingsResource(U);return this.instantiationService.createInstance(L.DefaultSettingsEditorModel,U,$,this.getDefaultSettings(q))}getDefaultSettings(U){return U===5?(this._defaultWorkspaceSettingsContentModel||(this._defaultWorkspaceSettingsContentModel=new L.DefaultSettings(this.getMostCommonlyUsedSettings(),U)),this._defaultWorkspaceSettingsContentModel):U===6?(this._defaultFolderSettingsContentModel||(this._defaultFolderSettingsContentModel=new L.DefaultSettings(this.getMostCommonlyUsedSettings(),U)),this._defaultFolderSettingsContentModel):(this._defaultUserSettingsContentModel||(this._defaultUserSettingsContentModel=new L.DefaultSettings(this.getMostCommonlyUsedSettings(),U)),this._defaultUserSettingsContentModel)}async getEditableSettingsURI(U,$){switch(U){case 1:return this.userDataProfilesService.defaultProfile.settingsResource;case 2:case 3:return this.userSettingsResource;case 4:{const q=await this.remoteAgentService.getEnvironment();return q?q.settingsPath:null}case 5:return this.workspaceSettingsResource;case 6:if($)return this.getFolderSettingsResource($)}return null}async createSettingsIfNotExists(U,$){if(this.contextService.getWorkbenchState()===3&&U===5){const q=this.contextService.getWorkspace().configuration;if(!q)return;const X=await this.textFileService.read(q);Object.keys((0,R.parse)(X.value)).indexOf("settings")===-1&&await this.jsonEditingService.write($,[{path:["settings"],value:{}}],!0);return}await this.createIfNotExists($,x)}async createIfNotExists(U,$){try{await this.textFileService.read(U,{acceptTextOnly:!0})}catch(q){if(q.fileOperationResult===1)try{await this.textFileService.write(U,$);return}catch(X){throw new Error(u.localize(4,null,this.labelService.getUriLabel(U,{relative:!0}),(0,t.getErrorMessage)(X)))}else throw q}}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(U,$,q,X){const G=q?(0,b.getCodeEditor)(q.getControl()):null;if(!G)return;const Q=await this.createPreferencesEditorModel(X);if(!Q)return;const j=await this.getPositionToReveal(U,$,Q,G);j&&(G.setPosition(j),G.revealPositionNearTop(j),G.focus(),$&&B.SuggestController.get(G)?.triggerSuggest())}async getPositionToReveal(U,$,q,X){const G=X.getModel();if(!G)return null;const Q=a.Registry.as(f.Extensions.Configuration).getConfigurationProperties()[U],j=f.OVERRIDE_PROPERTY_REGEX.test(U);if(!Q&&!j)return null;let K=null;const Y=Q?.type??"object";let ee=q.getPreference(U);if(!ee&&$){let ie=Y==="object"||Y==="array"?this.configurationService.inspect(U).defaultValue:(0,f.getDefaultValue)(Y);if(ie=ie===void 0&&j?{}:ie,ie!==void 0){const re=q instanceof L.WorkspaceConfigurationEditorModel?["settings",U]:[U];await this.jsonEditingService.write(q.uri,[{path:re,value:ie}],!1),ee=q.getPreference(U)}}if(ee)if($)if((0,P.isObject)(ee.value)||Array.isArray(ee.value)){K={lineNumber:ee.valueRange.startLineNumber,column:ee.valueRange.startColumn+1},X.setPosition(K),await I.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,X,null),K={lineNumber:K.lineNumber+1,column:G.getLineMaxColumn(K.lineNumber+1)};const ie=G.getLineFirstNonWhitespaceColumn(K.lineNumber);ie&&(X.setPosition({lineNumber:K.lineNumber,column:ie}),await I.CoreEditingCommands.LineBreakInsert.runEditorCommand(null,X,null),K={lineNumber:K.lineNumber,column:G.getLineMaxColumn(K.lineNumber)})}else K={lineNumber:ee.valueRange.startLineNumber,column:ee.valueRange.endColumn};else K={lineNumber:ee.keyRange.startLineNumber,column:ee.keyRange.startColumn};return K}dispose(){this._onDispose.fire(),super.dispose()}};H=we([F(0,D.IEditorService),F(1,w.IEditorGroupsService),F(2,N.ITextFileService),F(3,i.IConfigurationService),F(4,n.INotificationService),F(5,o.IWorkspaceContextService),F(6,l.IInstantiationService),F(7,V.IUserDataProfileService),F(8,z.IUserDataProfilesService),F(9,r.ITextModelService),F(10,s.IKeybindingService),F(11,S.IModelService),F(12,m.IJSONEditingService),F(13,C.ILanguageService),F(14,d.ILabelService),F(15,M.IRemoteAgentService),F(16,O.ITextEditorService)],H),e.PreferencesService=H,(0,c.registerSingleton)(T.IPreferencesService,H,1)}),define(ae[2938],le([1,0,22,2,9,43,402,18,125,51,157,107,398,354,262]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledTextEditorWorkingCopyEditorHandler=e.UntitledTextEditorInputSerializer=void 0;let f=class{constructor(s,d,n){this.filesConfigurationService=s,this.environmentService=d,this.pathService=n}canSerialize(s){return this.filesConfigurationService.isHotExitEnabled&&!s.isDisposed()}serialize(s){if(!this.filesConfigurationService.isHotExitEnabled||s.isDisposed())return;const d=s;let n=d.resource;d.model.hasAssociatedFilePath&&(n=(0,E.toLocalResource)(n,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme));let a;const o=d.getLanguageId();(o!==I.PLAINTEXT_LANGUAGE_ID||d.model.hasLanguageSetExplicitly)&&(a=o);const g={resourceJSON:n.toJSON(),modeId:a,encoding:d.getEncoding()};return JSON.stringify(g)}deserialize(s,d){return s.invokeFunction(n=>{const a=JSON.parse(d),o=R.URI.revive(a.resourceJSON),g=a.modeId,h=a.encoding;return n.get(k.ITextEditorService).createTextEditor({resource:o,languageId:g,encoding:h,forceUntitled:!0})})}};f=we([F(0,S.IFilesConfigurationService),F(1,b.IWorkbenchEnvironmentService),F(2,C.IPathService)],f),e.UntitledTextEditorInputSerializer=f;let c=class extends p.Disposable{constructor(s,d,n,a){super(),this.workingCopyEditorService=s,this.environmentService=d,this.pathService=n,this.textEditorService=a,this.installHandler()}installHandler(){this._register(this.workingCopyEditorService.registerHandler({handles:s=>s.resource.scheme===t.Schemas.untitled&&s.typeId===u.NO_TYPE_ID,isOpen:(s,d)=>d instanceof r.UntitledTextEditorInput&&(0,E.isEqual)(s.resource,d.resource),createEditor:s=>{let d;return(0,A.isUntitledWithAssociatedResource)(s.resource)?d=(0,E.toLocalResource)(s.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme):d=s.resource,this.textEditorService.createTextEditor({resource:d,forceUntitled:!0})}}))}};c=we([F(0,i.IWorkingCopyEditorService),F(1,b.IWorkbenchEnvironmentService),F(2,C.IPathService),F(3,k.ITextEditorService)],c),e.UntitledTextEditorWorkingCopyEditorHandler=c}),define(ae[2939],le([1,0,17,1487,153,43,71,177,699,665,230,398,261,994,992,993,676,70,15,97,99,698,204,336,98,7,14,40,348,44,2900,12,222,664,22,29,63,2938,2496]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(R.EditorPaneDescriptor.create(I.TextResourceEditor,I.TextResourceEditor.ID,(0,p.localize)(0,null)),[new d.SyncDescriptor(C.UntitledTextEditorInput),new d.SyncDescriptor(r.TextResourceEditorInput)]),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(R.EditorPaneDescriptor.create(u.TextDiffEditor,u.TextDiffEditor.ID,(0,p.localize)(1,null)),[new d.SyncDescriptor(S.DiffEditorInput)]),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(R.EditorPaneDescriptor.create(i.BinaryResourceDiffEditor,i.BinaryResourceDiffEditor.ID,(0,p.localize)(2,null)),[new d.SyncDescriptor(S.DiffEditorInput)]),t.Registry.as(A.EditorExtensions.EditorPane).registerEditorPane(R.EditorPaneDescriptor.create(b.SideBySideEditor,b.SideBySideEditor.ID,(0,p.localize)(3,null)),[new d.SyncDescriptor(E.SideBySideEditorInput)]),t.Registry.as(A.EditorExtensions.EditorFactory).registerEditorSerializer(C.UntitledTextEditorInput.ID,B.UntitledTextEditorInputSerializer),t.Registry.as(A.EditorExtensions.EditorFactory).registerEditorSerializer(E.SideBySideEditorInput.ID,E.SideBySideEditorInputSerializer),t.Registry.as(A.EditorExtensions.EditorFactory).registerEditorSerializer(S.DiffEditorInput.ID,S.DiffEditorInputSerializer),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(T.EditorAutoSave,2),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(f.EditorStatus,2),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(B.UntitledTextEditorWorkingCopyEditorHandler,2),t.Registry.as(y.Extensions.Workbench).registerWorkbenchContribution(V.DynamicEditorConfigurations,2),(0,w.registerEditorContribution)(D.FloatingClickMenu.ID,D.FloatingClickMenu);const z=t.Registry.as(L.Extensions.Quickaccess),x="inEditorsPicker",H=v.ContextKeyExpr.and(g.inQuickPickContext,v.ContextKeyExpr.has(x));z.registerQuickAccessProvider({ctor:M.ActiveGroupEditorsByMostRecentlyUsedQuickAccess,prefix:M.ActiveGroupEditorsByMostRecentlyUsedQuickAccess.PREFIX,contextKey:x,placeholder:(0,p.localize)(4,null),helpEntries:[{description:(0,p.localize)(5,null),commandId:a.ShowEditorsInActiveGroupByMostRecentlyUsedAction.ID}]}),z.registerQuickAccessProvider({ctor:M.AllEditorsByAppearanceQuickAccess,prefix:M.AllEditorsByAppearanceQuickAccess.PREFIX,contextKey:x,placeholder:(0,p.localize)(6,null),helpEntries:[{description:(0,p.localize)(7,null),commandId:a.ShowAllEditorsByAppearanceAction.ID}]}),z.registerQuickAccessProvider({ctor:M.AllEditorsByMostRecentlyUsedQuickAccess,prefix:M.AllEditorsByMostRecentlyUsedQuickAccess.PREFIX,contextKey:x,placeholder:(0,p.localize)(8,null),helpEntries:[{description:(0,p.localize)(9,null),commandId:a.ShowAllEditorsByMostRecentlyUsedAction.ID}]});const W=t.Registry.as(c.Extensions.WorkbenchActions);W.registerWorkbenchAction(s.SyncActionDescriptor.from(f.ChangeLanguageAction,{primary:(0,n.KeyChord)(2089,43)}),"Change Language Mode",void 0,v.ContextKeyExpr.not("notebookEditorFocused")),W.registerWorkbenchAction(s.SyncActionDescriptor.from(f.ChangeEOLAction),"Change End of Line Sequence"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(f.ChangeEncodingAction),"Change File Encoding"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenNextEditor,{primary:2060,mac:{primary:2577,secondary:[3161]}}),"View: Open Next Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenPreviousEditor,{primary:2059,mac:{primary:2575,secondary:[3159]}}),"View: Open Previous Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenNextEditorInGroup,{primary:(0,n.KeyChord)(2089,2060),mac:{primary:(0,n.KeyChord)(2089,2577)}}),"View: Open Next Editor in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenPreviousEditorInGroup,{primary:(0,n.KeyChord)(2089,2059),mac:{primary:(0,n.KeyChord)(2089,2575)}}),"View: Open Previous Editor in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenNextRecentlyUsedEditorAction),"View: Open Next Recently Used Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenPreviousRecentlyUsedEditorAction),"View: Open Previous Recently Used Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenNextRecentlyUsedEditorInGroupAction),"View: Open Next Recently Used Editor In Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenPreviousRecentlyUsedEditorInGroupAction),"View: Open Previous Recently Used Editor In Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenFirstEditorInGroup),"View: Open First Editor in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.OpenLastEditorInGroup,{primary:533,secondary:[2078],mac:{primary:277,secondary:[2078]}}),"View: Open Last Editor in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ReopenClosedEditorAction,{primary:3122}),"View: Reopen Closed Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ShowAllEditorsByAppearanceAction,{primary:(0,n.KeyChord)(2089,2094),mac:{primary:2562}}),"View: Show All Editors By Appearance",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ShowAllEditorsByMostRecentlyUsedAction),"View: Show All Editors By Most Recently Used",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ShowEditorsInActiveGroupByMostRecentlyUsedAction),"View: Show Editors in Active Group By Most Recently Used",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ClearRecentFilesAction),"File: Clear Recently Opened",(0,p.localize)(10,null)),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.CloseAllEditorsAction,{primary:(0,n.KeyChord)(2089,2101)}),"View: Close All Editors",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.CloseAllEditorGroupsAction,{primary:(0,n.KeyChord)(2089,3125)}),"View: Close All Editor Groups",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.CloseLeftEditorsInGroupAction),"View: Close Editors to the Left in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.CloseEditorsInOtherGroupsAction),"View: Close Editors in Other Groups",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.CloseEditorInAllGroupsAction),"View: Close Editor in All Groups",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorAction,{primary:2136}),"View: Split Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorOrthogonalAction,{primary:(0,n.KeyChord)(2089,2136)}),"View: Split Editor Orthogonal",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorLeftAction),"View: Split Editor Left",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorRightAction),"View: Split Editor Right",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorUpAction),"View: Split Editor Up",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorDownAction),"View: Split Editor Down",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.JoinTwoGroupsAction),"View: Join Editor Group with Next Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.JoinAllGroupsAction),"View: Join All Editor Groups",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateBetweenGroupsAction),"View: Navigate Between Editor Groups",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ResetGroupSizesAction),"View: Reset Editor Group Sizes",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ToggleGroupSizesAction),"View: Toggle Editor Group Sizes",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MaximizeGroupAction),"View: Maximize Editor Group and Hide Side Bars",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MinimizeOtherGroupsAction),"View: Maximize Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorLeftInGroupAction,{primary:3083,mac:{primary:(0,n.KeyChord)(2089,3087)}}),"View: Move Editor Left",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorRightInGroupAction,{primary:3084,mac:{primary:(0,n.KeyChord)(2089,3089)}}),"View: Move Editor Right",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveGroupLeftAction,{primary:(0,n.KeyChord)(2089,15)}),"View: Move Editor Group Left",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveGroupRightAction,{primary:(0,n.KeyChord)(2089,17)}),"View: Move Editor Group Right",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveGroupUpAction,{primary:(0,n.KeyChord)(2089,16)}),"View: Move Editor Group Up",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveGroupDownAction,{primary:(0,n.KeyChord)(2089,18)}),"View: Move Editor Group Down",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.DuplicateGroupLeftAction),"View: Duplicate Editor Group Left",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.DuplicateGroupRightAction),"View: Duplicate Editor Group Right",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.DuplicateGroupUpAction),"View: Duplicate Editor Group Up",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.DuplicateGroupDownAction),"View: Duplicate Editor Group Down",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToPreviousGroupAction,{primary:2575,mac:{primary:2319}}),"View: Move Editor into Previous Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToNextGroupAction,{primary:2577,mac:{primary:2321}}),"View: Move Editor into Next Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToFirstGroupAction,{primary:1558,mac:{primary:2326}}),"View: Move Editor into First Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToLastGroupAction,{primary:1566,mac:{primary:2334}}),"View: Move Editor into Last Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToLeftGroupAction),"View: Move Editor into Left Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToRightGroupAction),"View: Move Editor into Right Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToAboveGroupAction),"View: Move Editor into Group Above",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.MoveEditorToBelowGroupAction),"View: Move Editor into Group Below",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToPreviousGroupAction),"View: Split Editor into Previous Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToNextGroupAction),"View: Split Editor into Next Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToFirstGroupAction),"View: Split Editor into First Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToLastGroupAction),"View: Split Editor into Last Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToLeftGroupAction),"View: Split Editor into Left Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToRightGroupAction),"View: Split Editor into Right Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToAboveGroupAction),"View: Split Editor into Group Above",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.SplitEditorToBelowGroupAction),"View: Split Editor into Group Below",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusActiveGroupAction),"View: Focus Active Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusFirstGroupAction,{primary:2070}),"View: Focus First Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusLastGroupAction),"View: Focus Last Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusPreviousGroup),"View: Focus Previous Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusNextGroup),"View: Focus Next Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusLeftGroup,{primary:(0,n.KeyChord)(2089,2063)}),"View: Focus Left Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusRightGroup,{primary:(0,n.KeyChord)(2089,2065)}),"View: Focus Right Editor Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusAboveGroup,{primary:(0,n.KeyChord)(2089,2064)}),"View: Focus Editor Group Above",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.FocusBelowGroup,{primary:(0,n.KeyChord)(2089,2066)}),"View: Focus Editor Group Below",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NewEditorGroupLeftAction),"View: New Editor Group to the Left",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NewEditorGroupRightAction),"View: New Editor Group to the Right",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NewEditorGroupAboveAction),"View: New Editor Group Above",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NewEditorGroupBelowAction),"View: New Editor Group Below",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigatePreviousAction),"Go Previous"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateForwardInEditsAction),"Go Forward in Edit Locations"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateBackwardsInEditsAction),"Go Back in Edit Locations"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigatePreviousInEditsAction),"Go Previous in Edit Locations"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateToLastEditLocationAction,{primary:(0,n.KeyChord)(2089,2095)}),"Go to Last Edit Location"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateForwardInNavigationsAction),"Go Forward in Navigation Locations"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateBackwardsInNavigationsAction),"Go Back in Navigation Locations"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigatePreviousInNavigationsAction),"Go Previous in Navigation Locations"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.NavigateToLastNavigationLocationAction),"Go to Last Navigation Location"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ClearEditorHistoryAction),"Clear Editor History"),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.RevertAndCloseEditorAction),"View: Revert and Close Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutSingleAction),"View: Single Column Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutTwoColumnsAction),"View: Two Columns Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutThreeColumnsAction),"View: Three Columns Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutTwoRowsAction),"View: Two Rows Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutThreeRowsAction),"View: Three Rows Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutTwoByTwoGridAction),"View: Grid Editor Layout (2x2)",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutTwoRowsRightAction),"View: Two Rows Right Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.EditorLayoutTwoColumnsBottomAction),"View: Two Columns Bottom Editor Layout",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ToggleEditorTypeAction),"View: Toggle Editor Type",l.Categories.View.value,k.ActiveEditorAvailableEditorIdsContext),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.ReOpenInTextEditorAction),"View: Reopen Editor With Text Editor",l.Categories.View.value,k.ActiveEditorAvailableEditorIdsContext),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.QuickAccessPreviousRecentlyUsedEditorAction),"View: Quick Open Previous Recently Used Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.QuickAccessLeastRecentlyUsedEditorAction),"View: Quick Open Least Recently Used Editor",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.QuickAccessPreviousRecentlyUsedEditorInGroupAction,{primary:2050,mac:{primary:258}},k.ActiveEditorGroupEmptyContext.toNegated()),"View: Quick Open Previous Recently Used Editor in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.QuickAccessLeastRecentlyUsedEditorInGroupAction,{primary:3074,mac:{primary:1282}},k.ActiveEditorGroupEmptyContext.toNegated()),"View: Quick Open Least Recently Used Editor in Group",l.Categories.View.value),W.registerWorkbenchAction(s.SyncActionDescriptor.from(a.QuickAccessPreviousEditorFromHistoryAction),"Quick Open Previous Editor from History"),(0,s.registerAction2)(a.NavigateForwardAction),(0,s.registerAction2)(a.NavigateBackwardsAction);const U="workbench.action.quickOpenNavigateNextInEditorPicker";h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:U,weight:200+50,handler:(0,g.getQuickNavigateHandler)(U,!0),when:H,primary:2050,mac:{primary:258}});const $="workbench.action.quickOpenNavigatePreviousInEditorPicker";h.KeybindingsRegistry.registerCommandAndKeybindingRule({id:$,weight:200+50,handler:(0,g.getQuickNavigateHandler)($,!1),when:H,primary:3074,mac:{primary:1282}}),(0,o.setup)(),m.isMacintosh&&(s.MenuRegistry.appendMenuItem(s.MenuId.TouchBarContext,{command:{id:a.NavigateBackwardsAction.ID,title:a.NavigateBackwardsAction.LABEL,icon:{dark:O.FileAccess.asFileUri("vs/workbench/browser/parts/editor/media/back-tb.png",J)}},group:"navigation",order:0}),s.MenuRegistry.appendMenuItem(s.MenuId.TouchBarContext,{command:{id:a.NavigateForwardAction.ID,title:a.NavigateForwardAction.LABEL,icon:{dark:O.FileAccess.asFileUri("vs/workbench/browser/parts/editor/media/forward-tb.png",J)}},group:"navigation",order:1})),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroup,{command:{id:o.UNLOCK_GROUP_COMMAND_ID,title:(0,p.localize)(11,null),icon:N.Codicon.lock},group:"navigation",order:10,when:k.ActiveEditorGroupLockedContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroup,{command:{id:o.CLOSE_EDITOR_GROUP_COMMAND_ID,title:(0,p.localize)(12,null),icon:N.Codicon.close},group:"navigation",order:20}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:o.SPLIT_EDITOR_UP,title:(0,p.localize)(13,null)},group:"2_split",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:o.SPLIT_EDITOR_DOWN,title:(0,p.localize)(14,null)},group:"2_split",order:20}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:o.SPLIT_EDITOR_LEFT,title:(0,p.localize)(15,null)},group:"2_split",order:30}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:o.SPLIT_EDITOR_RIGHT,title:(0,p.localize)(16,null)},group:"2_split",order:40}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:o.TOGGLE_LOCK_GROUP_COMMAND_ID,title:(0,p.localize)(17,null),toggled:k.ActiveEditorGroupLockedContext},group:"3_lock",order:10,when:k.MultipleEditorGroupsContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EmptyEditorGroupContext,{command:{id:o.CLOSE_EDITOR_GROUP_COMMAND_ID,title:(0,p.localize)(18,null)},group:"4_close",order:10,when:k.MultipleEditorGroupsContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.CLOSE_EDITOR_COMMAND_ID,title:(0,p.localize)(19,null)},group:"1_close",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:(0,p.localize)(20,null),precondition:k.EditorGroupEditorsCountContext.notEqualsTo("1")},group:"1_close",order:20}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,title:(0,p.localize)(21,null),precondition:k.ActiveEditorLastInGroupContext.toNegated()},group:"1_close",order:30,when:k.EditorTabsVisibleContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.CLOSE_SAVED_EDITORS_COMMAND_ID,title:(0,p.localize)(22,null)},group:"1_close",order:40}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,p.localize)(23,null)},group:"1_close",order:50}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.REOPEN_WITH_COMMAND_ID,title:(0,p.localize)(24,null)},group:"1_open",order:10,when:k.ActiveEditorAvailableEditorIdsContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.KEEP_EDITOR_COMMAND_ID,title:(0,p.localize)(25,null),precondition:k.ActiveEditorPinnedContext.toNegated()},group:"3_preview",order:10,when:v.ContextKeyExpr.has("config.workbench.editor.enablePreview")}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.PIN_EDITOR_COMMAND_ID,title:(0,p.localize)(26,null)},group:"3_preview",order:20,when:k.ActiveEditorStickyContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.UNPIN_EDITOR_COMMAND_ID,title:(0,p.localize)(27,null)},group:"3_preview",order:20,when:k.ActiveEditorStickyContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.SPLIT_EDITOR_UP,title:(0,p.localize)(28,null)},group:"5_split",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.SPLIT_EDITOR_DOWN,title:(0,p.localize)(29,null)},group:"5_split",order:20}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.SPLIT_EDITOR_LEFT,title:(0,p.localize)(30,null)},group:"5_split",order:30}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.SPLIT_EDITOR_RIGHT,title:(0,p.localize)(31,null)},group:"5_split",order:40}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.SPLIT_EDITOR_IN_GROUP,title:(0,p.localize)(32,null)},group:"6_split_in_group",order:10,when:k.ActiveEditorCanSplitInGroupContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitleContext,{command:{id:o.JOIN_EDITOR_IN_GROUP,title:(0,p.localize)(33,null)},group:"6_split_in_group",order:10,when:k.SideBySideEditorActiveContext}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:o.TOGGLE_DIFF_SIDE_BY_SIDE,title:(0,p.localize)(34,null),toggled:v.ContextKeyExpr.equals("config.diffEditor.renderSideBySide",!1)},group:"1_diff",order:10,when:v.ContextKeyExpr.has("isInDiffEditor")}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:o.SHOW_EDITORS_IN_GROUP,title:(0,p.localize)(35,null)},group:"3_open",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:o.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,p.localize)(36,null)},group:"5_close",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:o.CLOSE_SAVED_EDITORS_COMMAND_ID,title:(0,p.localize)(37,null)},group:"5_close",order:20}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:o.TOGGLE_KEEP_EDITORS_COMMAND_ID,title:(0,p.localize)(38,null),toggled:v.ContextKeyExpr.has("config.workbench.editor.enablePreview")},group:"7_settings",order:10}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,{command:{id:o.TOGGLE_LOCK_GROUP_COMMAND_ID,title:(0,p.localize)(39,null),toggled:k.ActiveEditorGroupLockedContext},group:"8_lock",order:10,when:k.MultipleEditorGroupsContext});function q(Y,ee,ie,re,oe){const se={command:{id:Y.id,title:Y.title,icon:Y.icon,precondition:oe},group:"navigation",when:ee,order:ie};re&&(se.alt={id:re.id,title:re.title,icon:re.icon}),s.MenuRegistry.appendMenuItem(s.MenuId.EditorTitle,se)}const X=1e5,G=1e6;q({id:a.SplitEditorAction.ID,title:(0,p.localize)(40,null),icon:N.Codicon.splitHorizontal},v.ContextKeyExpr.not("splitEditorsVertically"),X,{id:o.SPLIT_EDITOR_DOWN,title:(0,p.localize)(41,null),icon:N.Codicon.splitVertical}),q({id:a.SplitEditorAction.ID,title:(0,p.localize)(42,null),icon:N.Codicon.splitVertical},v.ContextKeyExpr.has("splitEditorsVertically"),X,{id:o.SPLIT_EDITOR_RIGHT,title:(0,p.localize)(43,null),icon:N.Codicon.splitHorizontal}),q({id:o.TOGGLE_SPLIT_EDITOR_IN_GROUP_LAYOUT,title:(0,p.localize)(44,null),icon:N.Codicon.editorLayout},k.SideBySideEditorActiveContext,X-1),q({id:o.CLOSE_EDITOR_COMMAND_ID,title:(0,p.localize)(45,null),icon:N.Codicon.close},v.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext.toNegated(),k.ActiveEditorStickyContext.toNegated()),G,{id:o.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,p.localize)(46,null),icon:N.Codicon.closeAll}),q({id:o.CLOSE_EDITOR_COMMAND_ID,title:(0,p.localize)(47,null),icon:N.Codicon.closeDirty},v.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext,k.ActiveEditorStickyContext.toNegated()),G,{id:o.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:(0,p.localize)(48,null),icon:N.Codicon.closeAll}),q({id:o.UNPIN_EDITOR_COMMAND_ID,title:(0,p.localize)(49,null),icon:N.Codicon.pinned},v.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext.toNegated(),k.ActiveEditorStickyContext),G,{id:o.CLOSE_EDITOR_COMMAND_ID,title:(0,p.localize)(50,null),icon:N.Codicon.close}),q({id:o.UNPIN_EDITOR_COMMAND_ID,title:(0,p.localize)(51,null),icon:N.Codicon.pinnedDirty},v.ContextKeyExpr.and(k.EditorTabsVisibleContext.toNegated(),k.ActiveEditorDirtyContext,k.ActiveEditorStickyContext),G,{id:o.CLOSE_EDITOR_COMMAND_ID,title:(0,p.localize)(52,null),icon:N.Codicon.close}),q({id:o.UNLOCK_GROUP_COMMAND_ID,title:(0,p.localize)(53,null),icon:N.Codicon.lock},k.ActiveEditorGroupLockedContext,G-1);const Q=(0,P.registerIcon)("diff-editor-previous-change",N.Codicon.arrowUp,(0,p.localize)(54,null)),j=(0,P.registerIcon)("diff-editor-next-change",N.Codicon.arrowDown,(0,p.localize)(55,null)),K=(0,P.registerIcon)("diff-editor-toggle-whitespace",N.Codicon.whitespace,(0,p.localize)(56,null));q({id:o.GOTO_PREVIOUS_CHANGE,title:(0,p.localize)(57,null),icon:Q},k.TextCompareEditorActiveContext,10),q({id:o.GOTO_NEXT_CHANGE,title:(0,p.localize)(58,null),icon:j},k.TextCompareEditorActiveContext,11),q({id:o.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,title:(0,p.localize)(59,null),icon:K},v.ContextKeyExpr.and(k.TextCompareEditorActiveContext,v.ContextKeyExpr.notEquals("config.diffEditor.ignoreTrimWhitespace",!0)),20),q({id:o.TOGGLE_DIFF_IGNORE_TRIM_WHITESPACE,title:(0,p.localize)(60,null),icon:_.ThemeIcon.modify(K,"disabled")},v.ContextKeyExpr.and(k.TextCompareEditorActiveContext,v.ContextKeyExpr.notEquals("config.diffEditor.ignoreTrimWhitespace",!1)),20),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.KEEP_EDITOR_COMMAND_ID,title:{value:(0,p.localize)(61,null),original:"Keep Editor"},category:l.Categories.View},when:v.ContextKeyExpr.has("config.workbench.editor.enablePreview")}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.PIN_EDITOR_COMMAND_ID,title:{value:(0,p.localize)(62,null),original:"Pin Editor"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.UNPIN_EDITOR_COMMAND_ID,title:{value:(0,p.localize)(63,null),original:"Unpin Editor"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_EDITOR_COMMAND_ID,title:{value:(0,p.localize)(64,null),original:"Close Editor"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_PINNED_EDITOR_COMMAND_ID,title:{value:(0,p.localize)(65,null),original:"Close Pinned Editor"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_EDITORS_IN_GROUP_COMMAND_ID,title:{value:(0,p.localize)(66,null),original:"Close All Editors in Group"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_SAVED_EDITORS_COMMAND_ID,title:{value:(0,p.localize)(67,null),original:"Close Saved Editors in Group"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_OTHER_EDITORS_IN_GROUP_COMMAND_ID,title:{value:(0,p.localize)(68,null),original:"Close Other Editors in Group"},category:l.Categories.View}}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_EDITORS_TO_THE_RIGHT_COMMAND_ID,title:{value:(0,p.localize)(69,null),original:"Close Editors to the Right in Group"},category:l.Categories.View},when:k.ActiveEditorLastInGroupContext.toNegated()}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.CLOSE_EDITORS_AND_GROUP_COMMAND_ID,title:{value:(0,p.localize)(70,null),original:"Close Editor Group"},category:l.Categories.View},when:k.MultipleEditorGroupsContext}),s.MenuRegistry.appendMenuItem(s.MenuId.CommandPalette,{command:{id:o.REOPEN_WITH_COMMAND_ID,title:{value:(0,p.localize)(71,null),original:"Reopen Editor With..."},category:l.Categories.View},when:k.ActiveEditorAvailableEditorIdsContext}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarRecentMenu,{group:"1_editor",command:{id:a.ReopenClosedEditorAction.ID,title:(0,p.localize)(72,null),precondition:v.ContextKeyExpr.has("canReopenClosedEditor")},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarRecentMenu,{group:"z_clear",command:{id:a.ClearRecentFilesAction.ID,title:(0,p.localize)(73,null)},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarFileMenu,{title:(0,p.localize)(74,null),submenu:s.MenuId.MenubarShare,group:"45_share",order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarViewMenu,{group:"2_appearance",title:(0,p.localize)(75,null),submenu:s.MenuId.MenubarLayoutMenu,order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:o.SPLIT_EDITOR_UP,title:{original:"Split Up",value:(0,p.localize)(76,null),mnemonicTitle:(0,p.localize)(77,null)}},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:o.SPLIT_EDITOR_DOWN,title:{original:"Split Down",value:(0,p.localize)(78,null),mnemonicTitle:(0,p.localize)(79,null)}},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:o.SPLIT_EDITOR_LEFT,title:{original:"Split Left",value:(0,p.localize)(80,null),mnemonicTitle:(0,p.localize)(81,null)}},order:3}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"1_split",command:{id:o.SPLIT_EDITOR_RIGHT,title:{original:"Split Right",value:(0,p.localize)(82,null),mnemonicTitle:(0,p.localize)(83,null)}},order:4}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"2_split_in_group",command:{id:o.SPLIT_EDITOR_IN_GROUP,title:{original:"Split in Group",value:(0,p.localize)(84,null),mnemonicTitle:(0,p.localize)(85,null)}},when:k.ActiveEditorCanSplitInGroupContext,order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"2_split_in_group",command:{id:o.JOIN_EDITOR_IN_GROUP,title:{original:"Join in Group",value:(0,p.localize)(86,null),mnemonicTitle:(0,p.localize)(87,null)}},when:k.SideBySideEditorActiveContext,order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutSingleAction.ID,title:{original:"Single",value:(0,p.localize)(88,null),mnemonicTitle:(0,p.localize)(89,null)}},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutTwoColumnsAction.ID,title:{original:"Two Columns",value:(0,p.localize)(90,null),mnemonicTitle:(0,p.localize)(91,null)}},order:3}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutThreeColumnsAction.ID,title:{original:"Three Columns",value:(0,p.localize)(92,null),mnemonicTitle:(0,p.localize)(93,null)}},order:4}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutTwoRowsAction.ID,title:{original:"Two Rows",value:(0,p.localize)(94,null),mnemonicTitle:(0,p.localize)(95,null)}},order:5}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutThreeRowsAction.ID,title:{original:"Three Rows",value:(0,p.localize)(96,null),mnemonicTitle:(0,p.localize)(97,null)}},order:6}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutTwoByTwoGridAction.ID,title:{original:"Grid (2x2)",value:(0,p.localize)(98,null),mnemonicTitle:(0,p.localize)(99,null)}},order:7}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutTwoRowsRightAction.ID,title:{original:"Two Rows Right",value:(0,p.localize)(100,null),mnemonicTitle:(0,p.localize)(101,null)}},order:8}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarLayoutMenu,{group:"3_layouts",command:{id:a.EditorLayoutTwoColumnsBottomAction.ID,title:{original:"Two Columns Bottom",value:(0,p.localize)(102,null),mnemonicTitle:(0,p.localize)(103,null)}},order:9}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarGoMenu,{group:"1_history_nav",command:{id:"workbench.action.navigateToLastEditLocation",title:(0,p.localize)(104,null),precondition:v.ContextKeyExpr.has("canNavigateToLastEditLocation")},order:3}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"1_sideBySide",command:{id:o.FOCUS_FIRST_SIDE_EDITOR,title:(0,p.localize)(105,null)},when:v.ContextKeyExpr.or(k.SideBySideEditorActiveContext,k.TextCompareEditorActiveContext),order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"1_sideBySide",command:{id:o.FOCUS_SECOND_SIDE_EDITOR,title:(0,p.localize)(106,null)},when:v.ContextKeyExpr.or(k.SideBySideEditorActiveContext,k.TextCompareEditorActiveContext),order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"2_any",command:{id:"workbench.action.nextEditor",title:(0,p.localize)(107,null)},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"2_any",command:{id:"workbench.action.previousEditor",title:(0,p.localize)(108,null)},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"3_any_used",command:{id:"workbench.action.openNextRecentlyUsedEditor",title:(0,p.localize)(109,null)},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"3_any_used",command:{id:"workbench.action.openPreviousRecentlyUsedEditor",title:(0,p.localize)(110,null)},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"4_group",command:{id:"workbench.action.nextEditorInGroup",title:(0,p.localize)(111,null)},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"4_group",command:{id:"workbench.action.previousEditorInGroup",title:(0,p.localize)(112,null)},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"5_group_used",command:{id:"workbench.action.openNextRecentlyUsedEditorInGroup",title:(0,p.localize)(113,null)},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchEditorMenu,{group:"5_group_used",command:{id:"workbench.action.openPreviousRecentlyUsedEditorInGroup",title:(0,p.localize)(114,null)},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarGoMenu,{group:"2_editor_nav",title:(0,p.localize)(115,null),submenu:s.MenuId.MenubarSwitchEditorMenu,order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusFirstEditorGroup",title:(0,p.localize)(116,null)},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusSecondEditorGroup",title:(0,p.localize)(117,null)},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusThirdEditorGroup",title:(0,p.localize)(118,null),precondition:k.MultipleEditorGroupsContext},order:3}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusFourthEditorGroup",title:(0,p.localize)(119,null),precondition:k.MultipleEditorGroupsContext},order:4}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"1_focus_index",command:{id:"workbench.action.focusFifthEditorGroup",title:(0,p.localize)(120,null),precondition:k.MultipleEditorGroupsContext},order:5}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"2_next_prev",command:{id:"workbench.action.focusNextGroup",title:(0,p.localize)(121,null),precondition:k.MultipleEditorGroupsContext},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"2_next_prev",command:{id:"workbench.action.focusPreviousGroup",title:(0,p.localize)(122,null),precondition:k.MultipleEditorGroupsContext},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusLeftGroup",title:(0,p.localize)(123,null),precondition:k.MultipleEditorGroupsContext},order:1}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusRightGroup",title:(0,p.localize)(124,null),precondition:k.MultipleEditorGroupsContext},order:2}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusAboveGroup",title:(0,p.localize)(125,null),precondition:k.MultipleEditorGroupsContext},order:3}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarSwitchGroupMenu,{group:"3_directional",command:{id:"workbench.action.focusBelowGroup",title:(0,p.localize)(126,null),precondition:k.MultipleEditorGroupsContext},order:4}),s.MenuRegistry.appendMenuItem(s.MenuId.MenubarGoMenu,{group:"2_editor_nav",title:(0,p.localize)(127,null),submenu:s.MenuId.MenubarSwitchGroupMenu,order:2})}),define(ae[999],le([1,0,6,2,136,32,11,25,170,219]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledFileWorkingCopy=void 0;let S=class extends p.Disposable{get model(){return this._model}constructor(r,u,i,f,c,l,s,d,n,a){super(),this.typeId=r,this.resource=u,this.name=i,this.hasAssociatedFilePath=f,this.initialContents=c,this.modelFactory=l,this.saveDelegate=s,this.workingCopyBackupService=n,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(d.registerWorkingCopy(this))}isDirty(){return this.dirty}setDirty(r){this.dirty!==r&&(this.dirty=r,this._onDidChangeDirty.fire())}async resolve(){if(this.trace("resolve()"),this.isResolved()){this.trace("resolve() - exit (already resolved)");return}let r;const u=await this.workingCopyBackupService.resolve(this);u?(this.trace("resolve() - with backup"),r=u.value):this.initialContents?.value?(this.trace("resolve() - with initial contents"),r=this.initialContents.value):(this.trace("resolve() - empty"),r=(0,b.emptyStream)()),await this.doCreateModel(r),this.setDirty(this.hasAssociatedFilePath||!!u||Boolean(this.initialContents&&this.initialContents.markDirty!==!1)),(!!u||this.initialContents)&&this._onDidChangeContent.fire()}async doCreateModel(r){this.trace("doCreateModel()"),this._model=this._register(await this.modelFactory.createModel(this.resource,r,A.CancellationToken.None)),this.installModelListeners(this._model)}installModelListeners(r){this._register(r.onDidChangeContent(u=>this.onModelContentChanged(u))),this._register(r.onWillDispose(()=>this.dispose()))}onModelContentChanged(r){!this.hasAssociatedFilePath&&r.isInitial?this.setDirty(!1):this.setDirty(!0),this._onDidChangeContent.fire()}isResolved(){return!!this.model}async backup(r){let u;return this.isResolved()?u=await(0,k.raceCancellation)(this.model.snapshot(r),r):this.initialContents&&(u=this.initialContents.value),{content:u}}async save(r){this.trace("save()");const u=await this.saveDelegate(this,r);return u&&this._onDidSave.fire({reason:r?.reason,source:r?.source}),u}async revert(){this.trace("revert()"),this.setDirty(!1),this._onDidRevert.fire(),this.dispose()}dispose(){this.trace("dispose()"),this._onWillDispose.fire(),super.dispose()}trace(r){this.logService.trace(`[untitled file working copy] ${r}`,this.resource.toString(),this.typeId)}};S=we([F(7,R.IWorkingCopyService),F(8,I.IWorkingCopyBackupService),F(9,E.ILogService)],S),e.UntitledFileWorkingCopy=S}),define(ae[2940],le([1,0,2,9,999,6,22,136,49,25,170,19,988,60]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UntitledFileWorkingCopyManager=void 0;let i=class extends r.BaseFileWorkingCopyManager{constructor(c,l,s,d,n,a,o,g){super(d,a,o),this.workingCopyTypeId=c,this.modelFactory=l,this.saveDelegate=s,this.labelService=n,this.workingCopyService=g,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 u.ResourceMap}async resolve(c){const l=this.doCreateOrGet(c);return await l.resolve(),l}doCreateOrGet(c=Object.create(null)){const l=this.massageOptions(c);if(l.untitledResource){const s=this.get(l.untitledResource);if(s)return s}return this.doCreate(l)}massageOptions(c){const l=Object.create(null);return c.associatedResource?(l.untitledResource=p.URI.from({scheme:k.Schemas.untitled,authority:c.associatedResource.authority,fragment:c.associatedResource.fragment,path:c.associatedResource.path,query:c.associatedResource.query}),l.associatedResource=c.associatedResource):c.untitledResource?.scheme===k.Schemas.untitled&&(l.untitledResource=c.untitledResource),l.contents=c.contents,l}doCreate(c){let l=c.untitledResource;if(!l){let d=1;do l=p.URI.from({scheme:k.Schemas.untitled,path:`Untitled-${d}`,query:this.workingCopyTypeId?`typeId=${this.workingCopyTypeId}`:void 0}),d++;while(this.has(l))}const s=new R.UntitledFileWorkingCopy(this.workingCopyTypeId,l,this.labelService.getUriBasenameLabel(l),!!c.associatedResource,c.contents,this.modelFactory,this.saveDelegate,this.workingCopyService,this.workingCopyBackupService,this.logService);return this.registerWorkingCopy(s),s}registerWorkingCopy(c){const l=new t.DisposableStore;l.add(c.onDidChangeDirty(()=>this._onDidChangeDirty.fire(c))),l.add(c.onWillDispose(()=>this._onWillDispose.fire(c))),this.mapResourceToWorkingCopyListeners.set(c.resource,l),this.add(c.resource,c),c.isDirty()&&this._onDidChangeDirty.fire(c)}remove(c){const l=super.remove(c),s=this.mapResourceToWorkingCopyListeners.get(c);return s&&((0,t.dispose)(s),this.mapResourceToWorkingCopyListeners.delete(c)),l}dispose(){super.dispose(),(0,t.dispose)(this.mapResourceToWorkingCopyListeners.values()),this.mapResourceToWorkingCopyListeners.clear()}};i=we([F(3,C.IFileService),F(4,I.ILabelService),F(5,b.ILogService),F(6,S.IWorkingCopyBackupService),F(7,E.IWorkingCopyService)],i),e.UntitledFileWorkingCopyManager=i}),define(ae[232],le([1,0,5,35,6,11,16,2,19,32,136,57,2897,2893]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyFileService=e.IWorkingCopyFileService=void 0,e.IWorkingCopyFileService=(0,t.createDecorator)("workingCopyFileService");let i=class extends E.Disposable{constructor(c,l,s,d){super(),this.fileService=c,this.workingCopyService=l,this.instantiationService=s,this.uriIdentityService=d,this._onWillRunWorkingCopyFileOperation=this._register(new R.AsyncEmitter),this.onWillRunWorkingCopyFileOperation=this._onWillRunWorkingCopyFileOperation.event,this._onDidFailWorkingCopyFileOperation=this._register(new R.AsyncEmitter),this.onDidFailWorkingCopyFileOperation=this._onDidFailWorkingCopyFileOperation.event,this._onDidRunWorkingCopyFileOperation=this._register(new R.AsyncEmitter),this.onDidRunWorkingCopyFileOperation=this._onDidRunWorkingCopyFileOperation.event,this.correlationIds=0,this.fileOperationParticipants=this._register(this.instantiationService.createInstance(r.WorkingCopyFileOperationParticipant)),this.saveParticipants=this._register(this.instantiationService.createInstance(u.StoredFileWorkingCopySaveParticipant)),this.workingCopyProviders=[],this._register(this.registerWorkingCopyProvider(n=>this.workingCopyService.workingCopies.filter(a=>this.fileService.hasProvider(n)?this.uriIdentityService.extUri.isEqualOrParent(a.resource,n):this.uriIdentityService.extUri.isEqual(a.resource,n))))}create(c,l,s){return this.doCreateFileOrFolder(c,!0,l,s)}createFolder(c,l,s){return this.doCreateFileOrFolder(c,!1,l,s)}async doCreateFileOrFolder(c,l,s,d){if(c.length===0)return[];if(l){const h=(await A.Promises.settled(c.map(v=>this.fileService.canCreateFile(v.resource,{overwrite:v.overwrite})))).find(v=>v instanceof Error);if(h instanceof Error)throw h}const n=c.map(g=>({target:g.resource}));await this.runFileOperationParticipants(n,0,d,s);const a={correlationId:this.correlationIds++,operation:0,files:n};await this._onWillRunWorkingCopyFileOperation.fireAsync(a,b.CancellationToken.None);let o;try{l?o=await A.Promises.settled(c.map(g=>this.fileService.createFile(g.resource,g.contents,{overwrite:g.overwrite}))):o=await A.Promises.settled(c.map(g=>this.fileService.createFolder(g.resource)))}catch(g){throw await this._onDidFailWorkingCopyFileOperation.fireAsync(a,b.CancellationToken.None),g}return await this._onDidRunWorkingCopyFileOperation.fireAsync(a,b.CancellationToken.None),o}async move(c,l,s){return this.doMoveOrCopy(c,!0,l,s)}async copy(c,l,s){return this.doMoveOrCopy(c,!1,l,s)}async doMoveOrCopy(c,l,s,d){const n=[];for(const{file:{source:g,target:h},overwrite:v}of c){const m=await(l?this.fileService.canMove(g,h,v):this.fileService.canCopy(g,h,v));if(m instanceof Error)throw m}const a=c.map(g=>g.file);await this.runFileOperationParticipants(a,l?2:3,d,s);const o={correlationId:this.correlationIds++,operation:l?2:3,files:a};await this._onWillRunWorkingCopyFileOperation.fireAsync(o,b.CancellationToken.None);try{for(const{file:{source:g,target:h},overwrite:v}of c){if(!this.uriIdentityService.extUri.isEqual(g,h)){const m=l?[...this.getDirty(g),...this.getDirty(h)]:this.getDirty(h);await A.Promises.settled(m.map(w=>w.revert({soft:!0})))}l?n.push(await this.fileService.move(g,h,v)):n.push(await this.fileService.copy(g,h,v))}}catch(g){throw await this._onDidFailWorkingCopyFileOperation.fireAsync(o,b.CancellationToken.None),g}return await this._onDidRunWorkingCopyFileOperation.fireAsync(o,b.CancellationToken.None),n}async delete(c,l,s){for(const a of c){const o=await this.fileService.canDelete(a.resource,{recursive:a.recursive,useTrash:a.useTrash});if(o instanceof Error)throw o}const d=c.map(a=>({target:a.resource}));await this.runFileOperationParticipants(d,1,s,l);const n={correlationId:this.correlationIds++,operation:1,files:d};await this._onWillRunWorkingCopyFileOperation.fireAsync(n,b.CancellationToken.None);for(const a of c){const o=this.getDirty(a.resource);await A.Promises.settled(o.map(g=>g.revert({soft:!0})))}try{for(const a of c)await this.fileService.del(a.resource,{recursive:a.recursive,useTrash:a.useTrash})}catch(a){throw await this._onDidFailWorkingCopyFileOperation.fireAsync(n,b.CancellationToken.None),a}await this._onDidRunWorkingCopyFileOperation.fireAsync(n,b.CancellationToken.None)}addFileOperationParticipant(c){return this.fileOperationParticipants.addFileOperationParticipant(c)}runFileOperationParticipants(c,l,s,d){return this.fileOperationParticipants.participate(c,l,s,d)}get hasSaveParticipants(){return this.saveParticipants.length>0}addSaveParticipant(c){return this.saveParticipants.addSaveParticipant(c)}runSaveParticipants(c,l,s){return this.saveParticipants.participate(c,l,s)}registerWorkingCopyProvider(c){const l=(0,k.insert)(this.workingCopyProviders,c);return(0,E.toDisposable)(l)}getDirty(c){const l=new Set;for(const s of this.workingCopyProviders)for(const d of s(c))d.isDirty()&&l.add(d);return Array.from(l)}};i=we([F(0,I.IFileService),F(1,S.IWorkingCopyService),F(2,t.IInstantiationService),F(3,C.IUriIdentityService)],i),e.WorkingCopyFileService=i,(0,p.registerSingleton)(e.IWorkingCopyFileService,i,1)}),define(ae[2941],le([1,0,10,11,32,21,6,2,22,53,18,9,1449,47,19,5,49,156,460,67,472,389,2768,350,273,58,51,39,107,986,354,232,136]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadCustomEditors=void 0;var M;(function(B){B[B.Custom=0]="Custom",B[B.Text=1]="Text"})(M||(M={}));let O=class extends E.Disposable{constructor(V,z,x,H,W,U,$,q,X,G){super(),this.mainThreadWebview=z,this.mainThreadWebviewPanels=x,this._customEditorService=$,this._editorGroupService=q,this._webviewWorkbenchService=X,this._instantiationService=G,this._editorProviders=this._register(new E.DisposableMap),this._editorRenameBackups=new Map,this._proxyCustomEditors=V.getProxy(d.ExtHostContext.ExtHostCustomEditors),this._register(U.registerWorkingCopyProvider(Q=>{const j=[];for(const K of W.workingCopies)K instanceof P&&(0,S.isEqualOrParent)(Q,K.editorResource)&&j.push(K);return j})),this._register(X.registerResolver({canResolve:Q=>(Q instanceof n.CustomEditorInput&&H.activateByEvent(`onCustomEditor:${Q.viewType}`),!1),resolveWebview:()=>{throw new Error("not implemented")}})),this._register(U.onWillRunWorkingCopyFileOperation(async Q=>this.onWillRunWorkingCopyFileOperation(Q)))}$registerTextEditorProvider(V,z,x,H,W){this.registerEditorProvider(1,(0,s.reviveWebviewExtension)(V),z,x,H,!0,W)}$registerCustomEditorProvider(V,z,x,H,W){this.registerEditorProvider(0,(0,s.reviveWebviewExtension)(V),z,x,{},H,W)}registerEditorProvider(V,z,x,H,W,U,$){if(this._editorProviders.has(x))throw new Error(`Provider for ${x} already registered`);const q=new E.DisposableStore;q.add(this._customEditorService.registerCustomEditorCapabilities(x,{supportsMultipleEditorsPerDocument:U})),q.add(this._webviewWorkbenchService.registerResolver({canResolve:X=>X instanceof n.CustomEditorInput&&X.viewType===x,resolveWebview:async(X,G)=>{const Q=X.id,j=X.resource;this.mainThreadWebviewPanels.addWebviewInput(Q,X,{serializeBuffersForPostMessage:$}),X.webview.options=H,X.webview.extension=z;let K=X.backupId;X.oldResource&&!X.backupId&&(K=this._editorRenameBackups.get(X.oldResource.toString())?.backupId,this._editorRenameBackups.delete(X.oldResource.toString()));let Y;try{Y=await this.getOrCreateCustomEditorModel(V,j,x,{backupId:K},G)}catch(ee){(0,A.onUnexpectedError)(ee),X.webview.html=this.mainThreadWebview.getWebviewResolvedFailedContent(x);return}if(G.isCancellationRequested){Y.dispose();return}X.webview.onDidDispose(()=>{if(Y.object.isDirty()){const ee=Y.object.onDidChangeDirty(()=>{Y.object.isDirty()||(ee.dispose(),Y.dispose())});return}Y.dispose()}),W.supportsMove&&X.onMove(async ee=>{const ie=Y;Y=await this.getOrCreateCustomEditorModel(V,ee,x,{},R.CancellationToken.None),this._proxyCustomEditors.$onMoveCustomEditor(Q,ee,x),ie.dispose()});try{await this._proxyCustomEditors.$resolveWebviewEditor(j,Q,x,{title:X.getTitle(),contentOptions:X.webview.contentOptions,options:X.webview.options},(0,h.editorGroupToColumn)(this._editorGroupService,X.group||0),G)}catch(ee){(0,A.onUnexpectedError)(ee),X.webview.html=this.mainThreadWebview.getWebviewResolvedFailedContent(x),Y.dispose();return}}})),this._editorProviders.set(x,q)}$unregisterEditorProvider(V){if(!this._editorProviders.has(V))throw new Error(`No provider for ${V} registered`);this._editorProviders.deleteAndDispose(V),this._customEditorService.models.disposeAllModelsForView(V)}async getOrCreateCustomEditorModel(V,z,x,H,W){const U=this._customEditorService.models.tryRetain(z,x);if(U)return U;switch(V){case 1:{const $=o.CustomTextEditorModel.create(this._instantiationService,x,z);return this._customEditorService.models.add(z,x,$)}case 0:{const $=P.create(this._instantiationService,this._proxyCustomEditors,x,z,H,()=>Array.from(this.mainThreadWebviewPanels.webviewInputs).filter(q=>q instanceof n.CustomEditorInput&&(0,S.isEqual)(q.resource,z)),W);return this._customEditorService.models.add(z,x,$)}}}async $onDidEdit(V,z,x,H){(await this.getCustomEditorModel(V,z)).pushEdit(x,H)}async $onContentChange(V,z){(await this.getCustomEditorModel(V,z)).changeContent()}async getCustomEditorModel(V,z){const x=C.URI.revive(V),H=await this._customEditorService.models.get(x,z);if(!H||!(H instanceof P))throw new Error("Could not find model for webview editor");return H}async onWillRunWorkingCopyFileOperation(V){V.operation===2&&V.waitUntil((async()=>{const z=[];for(const x of V.files)x.source&&z.push(...await this._customEditorService.models.getAllModels(x.source));for(const x of z)if(x instanceof P&&x.isDirty()){const H=await x.backup(R.CancellationToken.None);H.meta&&this._editorRenameBackups.set(x.editorResource.toString(),H.meta)}})())}};O=we([F(3,w.IExtensionService),F(4,L.IWorkingCopyService),F(5,_.IWorkingCopyFileService),F(6,a.ICustomEditorService),F(7,v.IEditorGroupsService),F(8,g.IWebviewWorkbenchService),F(9,f.IInstantiationService)],O),e.MainThreadCustomEditors=O;var N;(function(B){let V;(function(x){x[x.Allowed=0]="Allowed",x[x.NotAllowed=1]="NotAllowed",x[x.Pending=2]="Pending"})(V=B.Type||(B.Type={})),B.Allowed=Object.freeze({type:0}),B.NotAllowed=Object.freeze({type:1});class z{constructor(H){this.operation=H,this.type=2}}B.Pending=z})(N||(N={}));let P=class co extends y.ResourceWorkingCopy{static async create(V,z,x,H,W,U,$){const q=U();let X;q.length!==0&&(X=q[0].untitledDocumentData);const{editable:G}=await z.$createCustomDocument(H,x,W.backupId,X,$);return V.createInstance(co,z,x,H,!!W.backupId,G,!!X,U)}constructor(V,z,x,H,W,U,$,q,X,G,Q,j,K,Y){super(co.toWorkingCopyResource(z,x),X),this._proxy=V,this._viewType=z,this._editorResource=x,this._editable=W,this._getEditors=$,this._fileDialogService=q,this._labelService=G,this._undoService=Q,this._environmentService=j,this._pathService=Y,this._fromBackup=!1,this._hotExitState=N.Allowed,this._currentEditIndex=-1,this._savePoint=-1,this._edits=[],this._isDirtyFromContentChange=!1,this.typeId=T.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=H,W&&this._register(K.registerWorkingCopy(this)),U&&(this._isDirtyFromContentChange=!0)}get editorResource(){return this._editorResource}dispose(){this._editable&&this._undoService.removeElements(this._editorResource),this._proxy.$disposeCustomDocument(this._editorResource,this._viewType),super.dispose()}static toWorkingCopyResource(V,z){const x=V.replace(/[^a-z0-9\-_]/gi,"-"),H=`/${(0,t.multibyteAwareBtoa)(z.with({query:null,fragment:null}).toString(!0))}`;return C.URI.from({scheme:I.Schemas.vscodeCustomEditor,authority:x,path:H,query:JSON.stringify(z.toJSON())})}get name(){return(0,b.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(V,z){if(!this._editable)throw new Error("Document is not editable");this.change(()=>{this.spliceEdits(V),this._currentEditIndex=this._edits.length-1}),this._undoService.pushElement({type:0,resource:this._editorResource,label:z??(0,r.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 V=this._edits[this._currentEditIndex];this.change(()=>{--this._currentEditIndex}),await this._proxy.$undo(this._editorResource,this.viewType,V,this.isDirty())}async redo(){if(!this._editable||this._currentEditIndex>=this._edits.length-1)return;const V=this._edits[this._currentEditIndex+1];this.change(()=>{++this._currentEditIndex}),await this._proxy.$redo(this._editorResource,this.viewType,V,this.isDirty())}spliceEdits(V){const z=this._currentEditIndex+1,x=this._edits.length-this._currentEditIndex,H=typeof V=="number"?this._edits.splice(z,x,V):this._edits.splice(z,x);H.length&&this._proxy.$disposeEdits(this._editorResource,this._viewType,H)}change(V){const z=this.isDirty();V(),this._onDidChangeContent.fire(),this.isDirty()!==z&&this._onDidChangeDirty.fire()}async revert(V){!this._editable||this._currentEditIndex===this._savePoint&&!this._isDirtyFromContentChange&&!this._fromBackup||(V?.soft||this._proxy.$revert(this._editorResource,this.viewType,R.CancellationToken.None),this.change(()=>{this._isDirtyFromContentChange=!1,this._fromBackup=!1,this._currentEditIndex=this._savePoint,this.spliceEdits()}))}async save(V){const z=!!await this.saveCustomEditor(V);return z&&this._onDidSave.fire({reason:V?.reason,source:V?.source}),z}async saveCustomEditor(V){if(!this._editable)return;if(this.isUntitled()){const x=await this.suggestUntitledSavePath(V);return x?(await this.saveCustomEditorAs(this._editorResource,x,V),x):void 0}const z=(0,p.createCancelablePromise)(x=>this._proxy.$onSave(this._editorResource,this.viewType,x));this._ongoingSave?.cancel(),this._ongoingSave=z;try{await z,this._ongoingSave===z&&this.change(()=>{this._isDirtyFromContentChange=!1,this._savePoint=this._currentEditIndex,this._fromBackup=!1})}finally{this._ongoingSave===z&&(this._ongoingSave=void 0)}return this._editorResource}suggestUntitledSavePath(V){if(!this.isUntitled())throw new Error("Resource is not untitled");const z=this._environmentService.remoteAuthority,x=(0,S.toLocalResource)(this._editorResource,z,this._pathService.defaultUriScheme);return this._fileDialogService.pickFileToSave(x,V?.availableFileSystems)}async saveCustomEditorAs(V,z,x){return this._editable?(await(0,p.createCancelablePromise)(H=>this._proxy.$onSaveAs(this._editorResource,this.viewType,z,H)),this.change(()=>{this._savePoint=this._currentEditIndex}),!0):(await this.fileService.copy(V,z,!1),!0)}async backup(V){const z=this._getEditors();if(!z.length)throw new Error("No editors found for resource, cannot back up");const x=z[0],W={meta:{viewType:this.viewType,editorResource:this._editorResource,backupId:"",extension:x.extension?{id:x.extension.id.value,location:x.extension.location}:void 0,webview:{id:x.id,origin:x.webview.origin,options:x.webview.options,state:x.webview.state}}};if(!this._editable)return W;this._hotExitState.type===2&&this._hotExitState.operation.cancel();const U=new N.Pending((0,p.createCancelablePromise)(q=>this._proxy.$backup(this._editorResource.toJSON(),this.viewType,q)));this._hotExitState=U,V.onCancellationRequested(()=>{U.operation.cancel()});let $="";try{const q=await U.operation;this._hotExitState===U&&(this._hotExitState=N.Allowed,W.meta.backupId=q,this._backupId=q)}catch(q){if((0,A.isCancellationError)(q))throw q;this._hotExitState===U&&(this._hotExitState=N.NotAllowed),q.message&&($=q.message)}if(this._hotExitState===N.Allowed)return W;throw new Error(`Cannot back up in this state: ${$}`)}};P=we([F(7,u.IFileDialogService),F(8,i.IFileService),F(9,c.ILabelService),F(10,l.IUndoRedoService),F(11,m.IWorkbenchEnvironmentService),F(12,L.IWorkingCopyService),F(13,D.IPathService)],P)}),define(ae[703],le([1,0,117,2,22,9,116,54,62,19,67,78,51,18,232,57,6,107,60]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocuments=e.BoundModelReferenceCollection=void 0;class d{constructor(g,h=1e3*60*3,v=1024*1024*80,m=50){this._extUri=g,this._maxAge=h,this._maxLength=v,this._maxSize=m,this._data=new Array,this._length=0}dispose(){this._data=(0,p.dispose)(this._data)}remove(g){for(const h of[...this._data])this._extUri.isEqualOrParent(h.uri,g)&&h.dispose()}add(g,h,v=0){const m=()=>{const y=this._data.indexOf(D);y>=0&&(this._length-=v,h.dispose(),clearTimeout(w),this._data.splice(y,1))},w=setTimeout(m,this._maxAge),D={uri:g,length:v,dispose:m};this._data.push(D),this._length+=v,this._cleanup()}_cleanup(){for(;this._length>this._maxLength;)this._data[0].dispose();const g=Math.ceil(this._maxSize*1.2);this._data.length>=g&&(0,p.dispose)(this._data.slice(0,g-this._maxSize))}}e.BoundModelReferenceCollection=d;class n extends p.Disposable{constructor(g,h,v,m){super(),this._model=g,this._onIsCaughtUpWithContentChanges=h,this._proxy=v,this._textFileService=m,this._knownVersionId=this._model.getVersionId(),this._store.add(this._model.onDidChangeContent(w=>{this._knownVersionId=w.versionId,this._proxy.$acceptModelChanged(this._model.uri,w,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 p.Disposable{constructor(g,h,v,m,w,D,y,T,_){super(),this._modelService=h,this._textFileService=v,this._fileService=m,this._textModelResolverService=w,this._environmentService=D,this._uriIdentityService=y,this._pathService=_,this._onIsCaughtUpWithContentChanges=this._store.add(new c.Emitter),this.onIsCaughtUpWithContentChanges=this._onIsCaughtUpWithContentChanges.event,this._modelTrackers=new s.ResourceMap,this._modelReferenceCollection=this._store.add(new d(y.extUri)),this._proxy=g.getProxy(S.ExtHostContext.ExtHostDocuments),this._store.add(h.onModelLanguageChanged(this._onModelModeChanged,this)),this._store.add(v.files.onDidSave(L=>{this._shouldHandleFileEvent(L.model.resource)&&this._proxy.$acceptModelSaved(L.model.resource)})),this._store.add(v.files.onDidChangeDirty(L=>{this._shouldHandleFileEvent(L.resource)&&this._proxy.$acceptDirtyStateChanged(L.resource,L.isDirty())})),this._store.add(T.onDidRunWorkingCopyFileOperation(L=>{const M=L.operation===2;if(M||L.operation===1)for(const O of L.files){const N=M?O.source:O.target;N&&this._modelReferenceCollection.remove(N)}}))}dispose(){(0,p.dispose)(this._modelTrackers.values()),this._modelTrackers.clear(),super.dispose()}isCaughtUpWithContentChanges(g){const h=this._modelTrackers.get(g);return h?h.isCaughtUpWithContentChanges():!0}_shouldHandleFileEvent(g){const h=this._modelService.getModel(g);return!!h&&(0,k.shouldSynchronizeModel)(h)}handleModelAdded(g){!(0,k.shouldSynchronizeModel)(g)||this._modelTrackers.set(g.uri,new n(g,this._onIsCaughtUpWithContentChanges,this._proxy,this._textFileService))}_onModelModeChanged(g){const{model:h}=g;!this._modelTrackers.has(h.uri)||this._proxy.$acceptModelLanguageChanged(h.uri,h.getLanguageId())}handleModelRemoved(g){!this._modelTrackers.has(g)||(this._modelTrackers.get(g).dispose(),this._modelTrackers.delete(g))}async $trySaveDocument(g){const h=await this._textFileService.save(A.URI.revive(g));return Boolean(h)}async $tryOpenDocument(g){const h=A.URI.revive(g);if(!h.scheme||!(h.fsPath||h.authority))throw new Error("Invalid uri. Scheme and authority or path must be set.");const v=this._uriIdentityService.asCanonicalUri(h);let m;switch(v.scheme){case R.Schemas.untitled:m=this._handleUntitledScheme(v);break;case R.Schemas.file:default:m=this._handleAsResourceInput(v);break}let w;try{w=await m}catch(D){throw new Error(`cannot open ${v.toString()}. Detail: ${(0,t.toErrorMessage)(D)}`)}if(w)if(u.extUri.isEqual(w,v)){if(this._modelTrackers.has(v))return v;throw new Error(`cannot open ${v.toString()}. Detail: Files above 50MB cannot be synchronized with extensions.`)}else throw new Error(`cannot open ${v.toString()}. Detail: Actual document opened as ${w.toString()}`);else throw new Error(`cannot open ${v.toString()}`)}$tryCreateDocument(g){return this._doCreateUntitled(void 0,g?g.language:void 0,g?g.content:void 0)}async _handleAsResourceInput(g){const h=await this._textModelResolverService.createModelReference(g);return this._modelReferenceCollection.add(g,h,h.object.textEditorModel.getValueLength()),h.object.textEditorModel.uri}async _handleUntitledScheme(g){const h=(0,u.toLocalResource)(g,this._environmentService.remoteAuthority,this._pathService.defaultUriScheme);return await this._fileService.exists(h)?Promise.reject(new Error("file already exists")):await this._doCreateUntitled(Boolean(g.path)?g:void 0)}async _doCreateUntitled(g,h,v){const w=(await this._textFileService.untitled.resolve({associatedResource:g,languageId:h,initialValue:v})).resource;if(!this._modelTrackers.has(w))throw new Error(`expected URI ${w.toString()} to have come to LIFE`);return this._proxy.$acceptDirtyStateChanged(w,!0),w}};a=we([F(1,E.IModelService),F(2,C.ITextFileService),F(3,b.IFileService),F(4,I.ITextModelService),F(5,r.IWorkbenchEnvironmentService),F(6,f.IUriIdentityService),F(7,i.IWorkingCopyFileService),F(8,l.IPathService)],a),e.MainThreadDocuments=a}),define(ae[2942],le([1,0,6,2,105,75,116,54,62,19,77,703,933,990,67,557,273,24,58,78,51,232,57,93,107,298,91,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadDocumentsAndEditors=void 0;class D{constructor(N){this.editor=N,this.id=`${N.getId()},${N.getModel().id}`}}class y{constructor(N,P,B,V,z,x){this.removedDocuments=N,this.addedDocuments=P,this.removedEditors=B,this.addedEditors=V,this.oldActiveEditor=z,this.newActiveEditor=x,this.isEmpty=this.removedDocuments.length===0&&this.addedDocuments.length===0&&this.removedEditors.length===0&&this.addedEditors.length===0&&z===x}toString(){let N=`DocumentAndEditorStateDelta `;return N+=` Removed Documents: [${this.removedDocuments.map(P=>P.uri.toString(!0)).join(", ")}] `,N+=` Added Documents: [${this.addedDocuments.map(P=>P.uri.toString(!0)).join(", ")}] `,N+=` Removed Editors: [${this.removedEditors.map(P=>P.id).join(", ")}] `,N+=` Added Editors: [${this.addedEditors.map(P=>P.id).join(", ")}] `,N+=` New Active Editor: ${this.newActiveEditor} `,N}}class T{static compute(N,P){if(!N)return new y([],[...P.documents.values()],[],[...P.textEditors.values()],void 0,P.activeEditor);const B=(0,v.diffSets)(N.documents,P.documents),V=(0,v.diffMaps)(N.textEditors,P.textEditors),z=N.activeEditor!==P.activeEditor?N.activeEditor:void 0,x=N.activeEditor!==P.activeEditor?P.activeEditor:void 0;return new y(B.removed,B.added,V.removed,V.added,z,x)}constructor(N,P,B){this.documents=N,this.textEditors=P,this.activeEditor=B}}var _;(function(O){O[O.Editor=0]="Editor",O[O.Panel=1]="Panel"})(_||(_={}));let L=class{constructor(N,P,B,V,z){this._onDidChangeState=N,this._modelService=P,this._codeEditorService=B,this._editorService=V,this._paneCompositeService=z,this._toDispose=new p.DisposableStore,this._toDisposeOnEditorRemove=new p.DisposableMap,this._activeEditorOrder=0,this._modelService.onModelAdded(this._updateStateOnModelAdd,this,this._toDispose),this._modelService.onModelRemoved(x=>this._updateState(),this,this._toDispose),this._editorService.onDidActiveEditorChange(x=>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,x=>x.viewContainerLocation===1)(x=>this._activeEditorOrder=1,void 0,this._toDispose),t.Event.filter(this._paneCompositeService.onDidPaneCompositeClose,x=>x.viewContainerLocation===1)(x=>this._activeEditorOrder=0,void 0,this._toDispose),this._editorService.onDidVisibleEditorsChange(x=>this._activeEditorOrder=0,void 0,this._toDispose),this._updateState()}dispose(){this._toDispose.dispose(),this._toDisposeOnEditorRemove.dispose()}_onDidAddEditor(N){this._toDisposeOnEditorRemove.set(N.getId(),(0,p.combinedDisposable)(N.onDidChangeModel(()=>this._updateState()),N.onDidFocusEditorText(()=>this._updateState()),N.onDidFocusEditorWidget(()=>this._updateState(N)))),this._updateState()}_onDidRemoveEditor(N){const P=N.getId();this._toDisposeOnEditorRemove.has(P)&&(this._toDisposeOnEditorRemove.deleteAndDispose(P),this._updateState())}_updateStateOnModelAdd(N){if(!!(0,k.shouldSynchronizeModel)(N)){if(!this._currentState){this._updateState();return}this._currentState=new T(this._currentState.documents.add(N),this._currentState.textEditors,this._currentState.activeEditor),this._onDidChangeState(new y([],[N],[],[],void 0,void 0))}}_updateState(N){const P=new Set;for(const H of this._modelService.getModels())(0,k.shouldSynchronizeModel)(H)&&P.add(H);const B=new Map;let V=null;for(const H of this._codeEditorService.listCodeEditors()){if(H.isSimpleWidget)continue;const W=H.getModel();if(H.hasModel()&&W&&(0,k.shouldSynchronizeModel)(W)&&!W.isDisposed()&&Boolean(this._modelService.getModel(W.uri))){const U=new D(H);B.set(U.id,U),(H.hasTextFocus()||N===H&&H.hasWidgetFocus())&&(V=U.id)}}if(!V){let H;if(this._activeEditorOrder===0?H=this._getActiveEditorFromEditorPart()||this._getActiveEditorFromPanel():H=this._getActiveEditorFromPanel()||this._getActiveEditorFromEditorPart(),H)for(const W of B.values())H===W.editor&&(V=W.id)}const z=new T(P,B,V),x=T.compute(this._currentState,z);x.isEmpty||(this._currentState=z,this._onDidChangeState(x))}_getActiveEditorFromPanel(){const N=this._paneCompositeService.getActivePaneComposite(1);if(N instanceof f.AbstractTextEditor){const P=N.getControl();if((0,R.isCodeEditor)(P))return P}}_getActiveEditorFromEditorPart(){let N=this._editorService.activeTextEditorControl;return(0,R.isDiffEditor)(N)&&(N=N.getModifiedEditor()),N}};L=we([F(1,E.IModelService),F(2,A.ICodeEditorService),F(3,l.IEditorService),F(4,m.IPaneCompositePartService)],L);let M=class{constructor(N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j){this._modelService=P,this._textFileService=B,this._editorService=V,this._editorGroupService=W,this._clipboardService=G,this._toDispose=new p.DisposableStore,this._textEditors=new Map,this._proxy=N.getProxy(i.ExtHostContext.ExtHostDocumentsAndEditors),this._mainThreadDocuments=this._toDispose.add(new C.MainThreadDocuments(N,this._modelService,this._textFileService,x,H,$,X,q,Q)),N.set(i.MainContext.MainThreadDocuments,this._mainThreadDocuments),this._mainThreadEditors=this._toDispose.add(new u.MainThreadTextEditors(this,N,z,this._editorService,this._editorGroupService,j)),N.set(i.MainContext.MainThreadTextEditors,this._mainThreadEditors),this._toDispose.add(new L(K=>this._onDelta(K),P,z,this._editorService,U))}dispose(){this._toDispose.dispose()}_onDelta(N){const P=[],B=[],V=N.removedDocuments.map(H=>H.uri);for(const H of N.addedEditors){const W=new r.MainThreadTextEditor(H.id,H.editor.getModel(),H.editor,{onGainedFocus(){},onLostFocus(){}},this._mainThreadDocuments,this._modelService,this._clipboardService);this._textEditors.set(H.id,W),B.push(W)}for(const{id:H}of N.removedEditors){const W=this._textEditors.get(H);W&&(W.dispose(),this._textEditors.delete(H),P.push(H))}const z=Object.create(null);let x=!0;N.newActiveEditor!==void 0&&(x=!1,z.newActiveEditor=N.newActiveEditor),V.length>0&&(x=!1,z.removedDocuments=V),P.length>0&&(x=!1,z.removedEditors=P),N.addedDocuments.length>0&&(x=!1,z.addedDocuments=N.addedDocuments.map(H=>this._toModelAddData(H))),N.addedEditors.length>0&&(x=!1,z.addedEditors=B.map(H=>this._toTextEditorAddData(H))),x||(this._proxy.$acceptDocumentsAndEditorsDelta(z),V.forEach(this._mainThreadDocuments.handleModelRemoved,this._mainThreadDocuments),N.addedDocuments.forEach(this._mainThreadDocuments.handleModelAdded,this._mainThreadDocuments),P.forEach(this._mainThreadEditors.handleTextEditorRemoved,this._mainThreadEditors),B.forEach(this._mainThreadEditors.handleTextEditorAdded,this._mainThreadEditors))}_toModelAddData(N){return{uri:N.uri,versionId:N.getVersionId(),lines:N.getLinesContent(),EOL:N.getEOL(),languageId:N.getLanguageId(),isDirty:this._textFileService.isDirty(N.uri)}}_toTextEditorAddData(N){const P=N.getProperties();return{id:N.getId(),documentUri:N.getModel().uri,options:P.options,selections:P.selections,visibleRanges:P.visibleRanges,editorPosition:this._findEditorPosition(N)}}_findEditorPosition(N){for(const P of this._editorService.visibleEditorPanes)if(N.matches(P))return(0,c.editorGroupToColumn)(this._editorGroupService,P.group)}findTextEditorIdFor(N){for(const[P,B]of this._textEditors)if(B.matches(N))return P}getIdOfCodeEditor(N){for(const[P,B]of this._textEditors)if(B.getCodeEditor()===N)return P}getEditor(N){return this._textEditors.get(N)}};M=we([S.extHostCustomer,F(1,E.IModelService),F(2,d.ITextFileService),F(3,l.IEditorService),F(4,A.ICodeEditorService),F(5,b.IFileService),F(6,I.ITextModelService),F(7,s.IEditorGroupsService),F(8,m.IPaneCompositePartService),F(9,n.IWorkbenchEnvironmentService),F(10,a.IWorkingCopyFileService),F(11,o.IUriIdentityService),F(12,g.IClipboardService),F(13,h.IPathService),F(14,w.IConfigurationService)],M),e.MainThreadDocumentsAndEditors=M}),define(ae[2943],le([1,0,2,19,77,67,1451,232,145,66,11,32,47,68,23,15,25,81,57,673]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadFileSystemEventService=void 0;let a=n=class{constructor(g,h,v,m,w,D,y,T,_,L){this._listener=new t.DisposableStore;const M=g.getProxy(A.ExtHostContext.ExtHostFileSystemEventService);this._listener.add(h.onDidFilesChange(N=>{M.$onFileEvent({created:N.rawAdded,changed:N.rawUpdated,deleted:N.rawDeleted})}));const O=new class{async participate(N,P,B,V,z){if(B?.isUndoing)return;const x=new C.CancellationTokenSource(z),H=setTimeout(()=>x.cancel(),V),W=await w.withProgress({location:15,title:this._progressLabel(P),cancellable:!0,delay:Math.min(V/2,3e3)},()=>{const q=M.$onWillRunFileOperation(P,N,V,x.token);return(0,S.raceCancellation)(q,x.token)},()=>{x.cancel()}).finally(()=>{x.dispose(),clearTimeout(H)});if(!W||W.edit.edits.length===0)return;const U=W.edit.edits.some(q=>q.metadata?.needsConfirmation);let $=y.getBoolean(n.MementoKeyAdditionalEdits,0);if(_.extensionTestsLocationURI&&($=!1),$===void 0){let q;if(W.extensionNames.length===1?P===0?q=(0,k.localize)(0,null,W.extensionNames[0]):P===3?q=(0,k.localize)(1,null,W.extensionNames[0]):P===2?q=(0,k.localize)(2,null,W.extensionNames[0]):q=(0,k.localize)(3,null,W.extensionNames[0]):P===0?q=(0,k.localize)(4,null,W.extensionNames.length):P===3?q=(0,k.localize)(5,null,W.extensionNames.length):P===2?q=(0,k.localize)(6,null,W.extensionNames.length):q=(0,k.localize)(7,null,W.extensionNames.length),U){const X=await D.show(u.default.Info,q,[(0,k.localize)(8,null),(0,k.localize)(9,null)],{cancelId:1});if($=!0,X.choice===1)return}else{const X=await D.show(u.default.Info,q,[(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(X.choice===2)return;$=X.choice===1,X.checkboxChecked&&y.store(n.MementoKeyAdditionalEdits,$,0,0)}}T.info("[onWill-handler] applying additional workspace edit from extensions",W.extensionNames),await m.apply((0,d.reviveWorkspaceEditDto)(W.edit,L),{undoRedoGroupId:B?.undoRedoGroupId,showPreview:$})}_progressLabel(N){switch(N){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(v.addFileOperationParticipant(O)),this._listener.add(v.onDidRunWorkingCopyFileOperation(N=>M.$onDidRunFileOperation(N.operation,N.files)))}dispose(){this._listener.dispose()}};a.MementoKeyAdditionalEdits="file.particpants.additionalEdits",a=n=we([R.extHostCustomer,F(1,p.IFileService),F(2,E.IWorkingCopyFileService),F(3,I.IBulkEditService),F(4,b.IProgressService),F(5,r.IDialogService),F(6,i.IStorageService),F(7,c.ILogService),F(8,l.IEnvironmentService),F(9,s.IUriIdentityService)],a),e.MainThreadFileSystemEventService=a,(0,f.registerAction2)(class extends f.Action2{constructor(){super({id:"files.participants.resetChoice",title:{value:(0,k.localize)(19,null),original:"Reset choice for 'File operation needs preview'"},f1:!0})}run(g){g.get(i.IStorageService).remove(a.MementoKeyAdditionalEdits,0)}})}),define(ae[2944],le([1,0,2,60,9,703,64,447,57,67,531,349]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebookDocuments=void 0;let r=class{constructor(i,f,c){this._notebookEditorModelResolverService=f,this._uriIdentityService=c,this._disposables=new t.DisposableStore,this._documentEventListenersMapping=new p.ResourceMap,this._proxy=i.getProxy(b.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))),this._disposables.add(f.onWillFailWithConflict(l=>{this._modelReferenceCollection.remove(l.resource)}))}dispose(){this._disposables.dispose(),this._modelReferenceCollection.dispose(),(0,t.dispose)(this._documentEventListenersMapping.values())}handleNotebooksAdded(i){for(const f of i){const c=new t.DisposableStore;c.add(f.onDidChangeContent(l=>{const s={versionId:l.versionId,rawEvents:[]};for(const n of l.rawEvents)switch(n.kind){case k.NotebookCellsChangeType.ModelChange:s.rawEvents.push({kind:n.kind,changes:n.changes.map(a=>[a[0],a[1],a[2].map(o=>S.NotebookDto.toNotebookCellDto(o))])});break;case k.NotebookCellsChangeType.Move:s.rawEvents.push({kind:n.kind,index:n.index,length:n.length,newIdx:n.newIdx});break;case k.NotebookCellsChangeType.Output:s.rawEvents.push({kind:n.kind,index:n.index,outputs:n.outputs.map(S.NotebookDto.toNotebookOutputDto)});break;case k.NotebookCellsChangeType.OutputItem:s.rawEvents.push({kind:n.kind,index:n.index,outputId:n.outputId,outputItems:n.outputItems.map(S.NotebookDto.toNotebookOutputItemDto),append:n.append});break;case k.NotebookCellsChangeType.ChangeCellLanguage:case k.NotebookCellsChangeType.ChangeCellContent:case k.NotebookCellsChangeType.ChangeCellMetadata:case k.NotebookCellsChangeType.ChangeCellInternalMetadata:s.rawEvents.push(n);break}const d=l.rawEvents.find(n=>n.kind===k.NotebookCellsChangeType.ChangeDocumentMetadata);this._proxy.$acceptModelChanged(f.uri,new C.SerializableObjectWithBuffers(s),this._notebookEditorModelResolverService.isDirty(f.uri),d?f.metadata:void 0)})),this._documentEventListenersMapping.set(f.uri,c)}}handleNotebooksRemoved(i){for(const f of i)this._documentEventListenersMapping.get(f)?.dispose(),this._documentEventListenersMapping.delete(f)}async $tryCreateNotebook(i){const f=await this._notebookEditorModelResolverService.resolve({untitledResource:void 0},i.viewType);if(f.object.notebook.onWillDispose(()=>{f.dispose()}),this._proxy.$acceptDirtyStateChanged(f.object.resource,!0),i.content){const c=S.NotebookDto.fromNotebookDataDto(i.content);f.object.notebook.reset(c.cells,c.metadata,f.object.notebook.transientOptions)}return f.object.resource}async $tryOpenNotebook(i){const f=R.URI.revive(i),c=await this._notebookEditorModelResolverService.resolve(f,void 0);return this._modelReferenceCollection.add(f,c),f}async $trySaveNotebook(i){const f=R.URI.revive(i),c=await this._notebookEditorModelResolverService.resolve(f),l=await c.object.save();return c.dispose(),l}};r=we([F(1,E.INotebookEditorModelResolverService),F(2,I.IUriIdentityService)],r),e.MainThreadNotebookDocuments=r}),define(ae[2945],le([1,0,298,2,5,2944,531,2538,77,273,101,267,142,58,24,67,349]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadNotebooksAndEditors=void 0;class s{static delta(a,o){if(!a)return{addedDocuments:[...o.documents],removedDocuments:[],addedEditors:[...o.textEditors.values()],removedEditors:[],visibleEditors:[...o.visibleEditors].map(w=>w[0])};const g=(0,t.diffSets)(a.documents,o.documents),h=(0,t.diffMaps)(a.textEditors,o.textEditors),v=a.activeEditor!==o.activeEditor?o.activeEditor:void 0,m=(0,t.diffMaps)(a.visibleEditors,o.visibleEditors);return{addedDocuments:g.added,removedDocuments:g.removed.map(w=>w.uri),addedEditors:h.added,removedEditors:h.removed.map(w=>w.getId()),newActiveEditor:v,visibleEditors:m.added.length===0&&m.removed.length===0?void 0:[...o.visibleEditors].map(w=>w[0])}}constructor(a,o,g,h){this.documents=a,this.textEditors=o,this.activeEditor=g,this.visibleEditors=h}}let d=l=class{constructor(a,o,g,h,v,m){this._notebookService=g,this._notebookEditorService=h,this._editorService=v,this._editorGroupService=m,this._disposables=new p.DisposableStore,this._editorListeners=new p.DisposableMap,this._proxy=a.getProxy(f.ExtHostContext.ExtHostNotebook),this._mainThreadNotebooks=o.createInstance(A.MainThreadNotebookDocuments,a),this._mainThreadEditors=o.createInstance(E.MainThreadNotebookEditors,a),a.set(f.MainContext.MainThreadNotebookDocuments,this._mainThreadNotebooks),a.set(f.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(),this._editorListeners.dispose()}_handleEditorAdd(a){this._editorListeners.set(a.getId(),(0,p.combinedDisposable)(a.onDidChangeModel(()=>this._updateState()),a.onDidFocusWidget(()=>this._updateState(a)))),this._updateState()}_handleEditorRemove(a){this._editorListeners.deleteAndDispose(a.getId()),this._updateState()}_updateState(a){const o=new Map,g=new Map;for(const w of this._notebookEditorService.listNotebookEditors())w.hasModel()&&o.set(w.getId(),w);const h=(0,S.getNotebookEditorFromEditorPane)(this._editorService.activeEditorPane);let v=null;h?v=h.getId():a?.textModel&&(v=a.getId()),v&&!o.has(v)&&(v=null);for(const w of this._editorService.visibleEditorPanes){const D=(0,S.getNotebookEditorFromEditorPane)(w);D?.hasModel()&&o.has(D.getId())&&g.set(D.getId(),D)}const m=new s(new Set(this._notebookService.listNotebookDocuments()),o,v,g);this._onDelta(s.delta(this._currentState,m)),this._currentState=m}_onDelta(a){if(l._isDeltaEmpty(a))return;const o={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 c.SerializableObjectWithBuffers(o)),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 o=this._editorService.visibleEditorPanes.find(g=>(0,S.getNotebookEditorFromEditorPane)(g)===a);return{id:a.getId(),documentUri:a.textModel.uri,selections:a.getSelections(),visibleRanges:a.visibleRanges,viewColumn:o&&(0,b.editorGroupToColumn)(this._editorGroupService,o.group)}}};d=l=we([I.extHostCustomer,F(1,R.IInstantiationService),F(2,r.INotebookService),F(3,C.INotebookEditorService),F(4,i.IEditorService),F(5,u.IEditorGroupsService)],d),e.MainThreadNotebooksAndEditors=d}),define(ae[2946],le([1,0,2,5,2941,2635,460,2554,67,77]),function(J,e,t,p,R,A,k,E,I,b){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWebviewManager=void 0;let S=class extends t.Disposable{constructor(r,u){super();const i=this._register(u.createInstance(k.MainThreadWebviews,r));r.set(I.MainContext.MainThreadWebviews,i);const f=this._register(u.createInstance(A.MainThreadWebviewPanels,r,i));r.set(I.MainContext.MainThreadWebviewPanels,f);const c=this._register(u.createInstance(R.MainThreadCustomEditors,r,i,f));r.set(I.MainContext.MainThreadCustomEditors,c);const l=this._register(u.createInstance(E.MainThreadWebviewsViews,r,i));r.set(I.MainContext.MainThreadWebviewViews,l)}};S=we([b.extHostCustomer,F(1,p.IInstantiationService)],S),e.MainThreadWebviewManager=S}),define(ae[2947],le([1,0,19,8,232,156,5,25,56,32,16,78]),function(J,e,t,p,R,A,k,E,I,b,S,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkFileEdits=void 0;class r{constructor(){this.uris=[]}async perform(){return this}toString(){return"(noop)"}}class u{constructor(h,v,m){this.newUri=h,this.oldUri=v,this.options=m,this.type="rename"}}let i=class Ec{constructor(h,v,m,w){this._edits=h,this._undoRedoInfo=v,this._workingCopyFileService=m,this._fileService=w}get uris(){return this._edits.map(h=>[h.newUri,h.oldUri]).flat()}async perform(h){const v=[],m=[];for(const w of this._edits)w.options.overwrite===void 0&&w.options.ignoreIfExists&&await this._fileService.exists(w.newUri)||(v.push({file:{source:w.oldUri,target:w.newUri},overwrite:w.options.overwrite}),m.push(new u(w.oldUri,w.newUri,w.options)));return v.length===0?new r:(await this._workingCopyFileService.move(v,h,this._undoRedoInfo),new Ec(m,{isUndoing:!0},this._workingCopyFileService,this._fileService))}toString(){return`(rename ${this._edits.map(h=>`${h.oldUri} to ${h.newUri}`).join(", ")})`}};i=we([F(2,R.IWorkingCopyFileService),F(3,t.IFileService)],i);class f{constructor(h,v,m){this.newUri=h,this.oldUri=v,this.options=m,this.type="copy"}}let c=class{constructor(h,v,m,w,D){this._edits=h,this._undoRedoInfo=v,this._workingCopyFileService=m,this._fileService=w,this._instaService=D}get uris(){return this._edits.map(h=>[h.newUri,h.oldUri]).flat()}async perform(h){const v=[];for(const D of this._edits)D.options.overwrite===void 0&&D.options.ignoreIfExists&&await this._fileService.exists(D.newUri)||v.push({file:{source:D.oldUri,target:D.newUri},overwrite:D.options.overwrite});if(v.length===0)return new r;const m=await this._workingCopyFileService.copy(v,h,this._undoRedoInfo),w=[];for(let D=0;D<m.length;D++){const y=m[D],T=this._edits[D];w.push(new d(y.resource,{recursive:!0,folder:this._edits[D].options.folder||y.isDirectory,...T.options},!1))}return this._instaService.createInstance(n,w,{isUndoing:!0})}toString(){return`(copy ${this._edits.map(h=>`${h.oldUri} to ${h.newUri}`).join(", ")})`}};c=we([F(2,R.IWorkingCopyFileService),F(3,t.IFileService),F(4,k.IInstantiationService)],c);class l{constructor(h,v,m){this.newUri=h,this.options=v,this.contents=m,this.type="create"}}let s=class{constructor(h,v,m,w,D,y){this._edits=h,this._undoRedoInfo=v,this._fileService=m,this._workingCopyFileService=w,this._instaService=D,this._textFileService=y}get uris(){return this._edits.map(h=>h.newUri)}async perform(h){const v=[],m=[],w=[];for(const D of this._edits)if(!(D.options.overwrite===void 0&&D.options.ignoreIfExists&&await this._fileService.exists(D.newUri))){if(D.options.folder)v.push({resource:D.newUri});else{const y=typeof D.contents<"u"?D.contents:await this._textFileService.getEncodedReadable(D.newUri);m.push({resource:D.newUri,contents:y,overwrite:D.options.overwrite})}w.push(new d(D.newUri,D.options,!D.options.folder&&!D.contents))}return v.length===0&&m.length===0?new r:(await this._workingCopyFileService.createFolder(v,h,this._undoRedoInfo),await this._workingCopyFileService.create(m,h,this._undoRedoInfo),this._instaService.createInstance(n,w,{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(", ")})`}};s=we([F(2,t.IFileService),F(3,R.IWorkingCopyFileService),F(4,k.IInstantiationService),F(5,C.ITextFileService)],s);class d{constructor(h,v,m){this.oldUri=h,this.options=v,this.undoesCreate=m,this.type="delete"}}let n=class{constructor(h,v,m,w,D,y,T){this._edits=h,this._undoRedoInfo=v,this._workingCopyFileService=m,this._fileService=w,this._configurationService=D,this._instaService=y,this._logService=T}get uris(){return this._edits.map(h=>h.oldUri)}async perform(h){const v=[],m=[];for(const w of this._edits){let D;try{D=await this._fileService.resolve(w.oldUri,{resolveMetadata:!0})}catch{if(!w.options.ignoreIfNotExists)throw new Error(`${w.oldUri} does not exist and can not be deleted`);continue}v.push({resource:w.oldUri,recursive:w.options.recursive,useTrash:!w.options.skipTrashBin&&this._fileService.hasCapability(w.oldUri,4096)&&this._configurationService.getValue("files.enableTrash")});let y;if(!w.undoesCreate&&!w.options.folder&&!(typeof w.options.maxSize=="number"&&D.size>w.options.maxSize))try{y=await this._fileService.readFile(w.oldUri)}catch(T){this._logService.critical(T)}y!==void 0&&m.push(new l(w.oldUri,w.options,y.value))}return v.length===0?new r:(await this._workingCopyFileService.delete(v,h,this._undoRedoInfo),m.length===0?new r:this._instaService.createInstance(s,m,{isUndoing:!0}))}toString(){return`(delete ${this._edits.map(h=>h.oldUri).join(", ")})`}};n=we([F(2,R.IWorkingCopyFileService),F(3,t.IFileService),F(4,p.IConfigurationService),F(5,k.IInstantiationService),F(6,E.ILogService)],n);class a{constructor(h,v,m,w){this.label=h,this.code=v,this.operations=m,this.confirmBeforeUndo=w,this.type=1,this.resources=m.map(D=>D.uris).flat()}async undo(){await this._reverse()}async redo(){await this._reverse()}async _reverse(){for(let h=0;h<this.operations.length;h++){const m=await this.operations[h].perform(b.CancellationToken.None);this.operations[h]=m}}toString(){return this.operations.map(h=>String(h)).join(", ")}}let o=class{constructor(h,v,m,w,D,y,T,_,L,M){this._label=h,this._code=v,this._undoRedoGroup=m,this._undoRedoSource=w,this._confirmBeforeUndo=D,this._progress=y,this._token=T,this._edits=_,this._instaService=L,this._undoRedoService=M}async apply(){const h=[],v={undoRedoGroupId:this._undoRedoGroup.id},m=[];for(const y of this._edits)y.newResource&&y.oldResource&&!y.options?.copy?m.push(new u(y.newResource,y.oldResource,y.options??{})):y.newResource&&y.oldResource&&y.options?.copy?m.push(new f(y.newResource,y.oldResource,y.options??{})):!y.newResource&&y.oldResource?m.push(new d(y.oldResource,y.options??{},!1)):y.newResource&&!y.oldResource&&m.push(new l(y.newResource,y.options??{},y.options.contentsBase64?(0,I.decodeBase64)(y.options.contentsBase64):void 0));if(m.length===0)return[];const w=[];w[0]=[m[0]];for(let y=1;y<m.length;y++){const T=m[y],_=(0,S.tail)(w);_[0].type===T.type?_.push(T):w.push([T])}for(const y of w){if(this._token.isCancellationRequested)break;let T;switch(y[0].type){case"rename":T=this._instaService.createInstance(i,y,v);break;case"copy":T=this._instaService.createInstance(c,y,v);break;case"delete":T=this._instaService.createInstance(n,y,v);break;case"create":T=this._instaService.createInstance(s,y,v);break}if(T){const _=await T.perform(this._token);h.push(_)}this._progress.report(void 0)}const D=new a(this._label,this._code,h,this._confirmBeforeUndo);return this._undoRedoService.pushElement(D,this._undoRedoGroup,this._undoRedoSource),D.resources}};o=we([F(8,k.IInstantiationService),F(9,A.IUndoRedoService)],o),e.BulkFileEdits=o}),define(ae[2948],le([1,0,32,2,158,60,105,145,1541,8,55,47,35,5,25,66,17,156,386,2947,2279,24,69,136]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkEditService=void 0;function h(D){return D.map(y=>{if(E.ResourceTextEdit.is(y))return E.ResourceTextEdit.lift(y);if(E.ResourceFileEdit.is(y))return E.ResourceFileEdit.lift(y);if(s.ResourceNotebookCellEdit.is(y))return s.ResourceNotebookCellEdit.lift(y);throw new Error("Unsupported edit")})}let v=class{constructor(y,T,_,L,M,O,N,P,B,V,z){this._label=y,this._code=T,this._editor=_,this._progress=L,this._token=M,this._edits=O,this._undoRedoGroup=N,this._undoRedoSource=P,this._confirmBeforeUndo=B,this._instaService=V,this._logService=z}ariaMessage(){const y=new A.ResourceMap,T=new A.ResourceMap;let _=0;for(const L of this._edits)L instanceof E.ResourceTextEdit?(_+=1,T.set(L.resource,!0)):L instanceof E.ResourceFileEdit&&y.set(L.oldResource??L.newResource,!0);return this._edits.length===0?(0,I.localize)(0,null):y.size===0?_>1&&T.size>1?(0,I.localize)(1,null,_,T.size):(0,I.localize)(2,null,_):(0,I.localize)(3,null,_,T.size,y.size)}async perform(){if(this._edits.length===0)return[];const y=[1];for(let O=1;O<this._edits.length;O++)Object.getPrototypeOf(this._edits[O-1])===Object.getPrototypeOf(this._edits[O])?y[y.length-1]++:y.push(1);const T=this._edits.length>1?0:void 0;this._progress.report({increment:T,total:100});const _={report:O=>this._progress.report({increment:100/this._edits.length})},L=[];let M=0;for(const O of y){if(this._token.isCancellationRequested)break;const N=this._edits.slice(M,M+O);N[0]instanceof E.ResourceFileEdit?L.push(await this._performFileEdits(N,this._undoRedoGroup,this._undoRedoSource,this._confirmBeforeUndo,_)):N[0]instanceof E.ResourceTextEdit?L.push(await this._performTextEdits(N,this._undoRedoGroup,this._undoRedoSource,_)):N[0]instanceof s.ResourceNotebookCellEdit?L.push(await this._performCellEdits(N,this._undoRedoGroup,this._undoRedoSource,_)):console.log("UNKNOWN EDIT"),M=M+O}return L.flat()}async _performFileEdits(y,T,_,L,M){return this._logService.debug("_performFileEdits",JSON.stringify(y)),await this._instaService.createInstance(d.BulkFileEdits,this._label||(0,I.localize)(4,null),this._code||"undoredo.workspaceEdit",T,_,L,M,this._token,y).apply()}async _performTextEdits(y,T,_,L){return this._logService.debug("_performTextEdits",JSON.stringify(y)),await this._instaService.createInstance(n.BulkTextEdits,this._label||(0,I.localize)(5,null),this._code||"undoredo.workspaceEdit",this._editor,T,_,L,this._token,y).apply()}async _performCellEdits(y,T,_,L){return this._logService.debug("_performCellEdits",JSON.stringify(y)),await this._instaService.createInstance(s.BulkCellEdits,T,_,L,this._token,y).apply()}};v=we([F(9,u.IInstantiationService),F(10,i.ILogService)],v);let m=class{constructor(y,T,_,L,M,O,N){this._instaService=y,this._logService=T,this._editorService=_,this._lifecycleService=L,this._dialogService=M,this._workingCopyService=O,this._configService=N,this._activeUndoRedoGroups=new R.LinkedList}setPreviewHandler(y){return this._previewHandler=y,(0,p.toDisposable)(()=>{this._previewHandler===y&&(this._previewHandler=void 0)})}hasPreviewHandler(){return Boolean(this._previewHandler)}async apply(y,T){let _=h(Array.isArray(y)?y:y.edits);if(_.length===0)return{ariaSummary:(0,I.localize)(6,null),isApplied:!1};this._previewHandler&&(T?.showPreview||_.some(V=>V.metadata?.needsConfirmation))&&(_=await this._previewHandler(_,T));let L=T?.editor;if(!L){const V=this._editorService.activeTextEditorControl;(0,k.isCodeEditor)(V)&&(L=V)}L&&L.getOption(82)&&(L=void 0);let M,O=()=>{};if(typeof T?.undoRedoGroupId=="number"){for(const V of this._activeUndoRedoGroups)if(V.id===T.undoRedoGroupId){M=V;break}}M||(M=new l.UndoRedoGroup,O=this._activeUndoRedoGroups.push(M));const N=T?.quotableLabel||T?.label,P=this._instaService.createInstance(v,N,T?.code,L,T?.progress??f.Progress.None,T?.token??t.CancellationToken.None,_,M,T?.undoRedoSource,!!T?.confirmBeforeUndo);let B;try{B=this._lifecycleService.onBeforeShutdown(z=>z.veto(this._shouldVeto(N,z.reason),"veto.blukEditService"));const V=await P.perform();return T?.respectAutoSaveConfig&&this._configService.getValue(w)===!0&&await this._saveAll(V),{ariaSummary:P.ariaMessage(),isApplied:_.length>0}}catch(V){throw this._logService.error(V),V}finally{B?.dispose(),O()}}async _saveAll(y){const T=new A.ResourceSet(y),_=this._workingCopyService.dirtyWorkingCopies.map(async M=>{T.has(M.resource)&&await M.save()}),L=await Promise.allSettled(_);for(const M of L)M.status==="rejected"&&this._logService.warn(M.reason)}async _shouldVeto(y,T){y=y||(0,I.localize)(7,null);const _=T===1?(0,I.localize)(8,null):T===4?(0,I.localize)(9,null):T===3?(0,I.localize)(10,null):(0,I.localize)(11,null);return!(await this._dialogService.confirm({message:(0,I.localize)(12,null,_.toLowerCase(),y),primaryButton:_})).confirmed}};m=we([F(0,u.IInstantiationService),F(1,i.ILogService),F(2,a.IEditorService),F(3,o.ILifecycleService),F(4,C.IDialogService),F(5,g.IWorkingCopyService),F(6,b.IConfigurationService)],m),e.BulkEditService=m,(0,r.registerSingleton)(E.IBulkEditService,m,1);const w="files.refactoring.autoSave";c.Registry.as(S.Extensions.Configuration).registerConfiguration({id:"files",properties:{[w]:{description:(0,I.localize)(13,null),default:!0,type:"boolean"}}})}),define(ae[2949],le([1,0,2042,117,6,9,997,2,5,60,19,11,21,2764,26,232,18,94,125,57]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextFileEditorModelManager=void 0;let n=class extends E.Disposable{get models(){return[...this.mapResourceToModel.values()]}constructor(o,g,h,v,m){super(),this.instantiationService=o,this.fileService=g,this.notificationService=h,this.workingCopyFileService=v,this.uriIdentityService=m,this._onDidCreate=this._register(new R.Emitter),this.onDidCreate=this._onDidCreate.event,this._onDidResolve=this._register(new R.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidRemove=this._register(new R.Emitter),this.onDidRemove=this._onDidRemove.event,this._onDidChangeDirty=this._register(new R.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeReadonly=this._register(new R.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._onDidChangeOrphaned=this._register(new R.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidSaveError=this._register(new R.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new R.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new R.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeEncoding=this._register(new R.Emitter),this.onDidChangeEncoding=this._onDidChangeEncoding.event,this.mapResourceToModel=new b.ResourceMap,this.mapResourceToModelListeners=new b.ResourceMap,this.mapResourceToDisposeListener=new b.ResourceMap,this.mapResourceToPendingModelResolvers=new b.ResourceMap,this.modelResolveQueue=this._register(new C.ResourceQueue),this.saveErrorHandler=(()=>{const w=this.notificationService;return{onSaveError(D,y){w.error((0,t.localize)(0,null,y.name,(0,p.toErrorMessage)(D,!1)))}}})(),this.mapCorrelationIdToModelsToRestore=new Map,this.saveParticipants=this._register(this.instantiationService.createInstance(u.TextFileSaveParticipant)),this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(o=>this.onDidFilesChange(o))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(o=>this.onDidChangeFileSystemProviderCapabilities(o))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(o=>this.onDidChangeFileSystemProviderRegistrations(o))),this._register(this.workingCopyFileService.onWillRunWorkingCopyFileOperation(o=>this.onWillRunWorkingCopyFileOperation(o))),this._register(this.workingCopyFileService.onDidFailWorkingCopyFileOperation(o=>this.onDidFailWorkingCopyFileOperation(o))),this._register(this.workingCopyFileService.onDidRunWorkingCopyFileOperation(o=>this.onDidRunWorkingCopyFileOperation(o)))}onDidFilesChange(o){for(const g of this.models)g.isDirty()||o.contains(g.resource,0,1)&&this.queueModelReload(g)}onDidChangeFileSystemProviderCapabilities(o){this.queueModelReloads(o.scheme)}onDidChangeFileSystemProviderRegistrations(o){!o.added||this.queueModelReloads(o.scheme)}queueModelReloads(o){for(const g of this.models)g.isDirty()||o===g.resource.scheme&&this.queueModelReload(g)}queueModelReload(o){const g=this.modelResolveQueue.queueFor(o.resource);g.size<=1&&g.queue(async()=>{try{await this.reload(o)}catch(h){(0,r.onUnexpectedError)(h)}})}onWillRunWorkingCopyFileOperation(o){if(o.operation===2||o.operation===3){const g=[];for(const{source:h,target:v}of o.files)if(h){if(this.uriIdentityService.extUri.isEqual(h,v))continue;const m=[];for(const w of this.models)this.uriIdentityService.extUri.isEqualOrParent(w.resource,h)&&m.push(w);for(const w of m){const D=w.resource;let y;this.uriIdentityService.extUri.isEqual(D,h)?y=v:y=(0,c.joinPath)(v,D.path.substr(h.path.length+1)),g.push({source:D,target:y,languageId:w.getLanguageId(),encoding:w.getEncoding(),snapshot:w.isDirty()?w.createSnapshot():void 0})}}this.mapCorrelationIdToModelsToRestore.set(o.correlationId,g)}}onDidFailWorkingCopyFileOperation(o){if(o.operation===2||o.operation===3){const g=this.mapCorrelationIdToModelsToRestore.get(o.correlationId);g&&(this.mapCorrelationIdToModelsToRestore.delete(o.correlationId),g.forEach(h=>{h.snapshot&&this.get(h.source)?.setDirty(!0)}))}}onDidRunWorkingCopyFileOperation(o){switch(o.operation){case 0:o.waitUntil((async()=>{for(const{target:g}of o.files){const h=this.get(g);h&&!h.isDisposed()&&await h.revert()}})());break;case 2:case 3:o.waitUntil((async()=>{const g=this.mapCorrelationIdToModelsToRestore.get(o.correlationId);g&&(this.mapCorrelationIdToModelsToRestore.delete(o.correlationId),await C.Promises.settled(g.map(async h=>{const v=await this.resolve(h.target,{reload:{async:!1},contents:h.snapshot?(0,l.createTextBufferFactoryFromSnapshot)(h.snapshot):void 0,encoding:h.encoding});h.languageId&&h.languageId!==s.PLAINTEXT_LANGUAGE_ID&&v.getLanguageId()===s.PLAINTEXT_LANGUAGE_ID&&(0,c.extname)(h.target)!==s.PLAINTEXT_EXTENSION&&v.updateTextEditorModel(void 0,h.languageId)})))})());break}}get(o){return this.mapResourceToModel.get(o)}has(o){return this.mapResourceToModel.has(o)}async reload(o){await this.joinPendingResolves(o.resource),!(o.isDirty()||o.isDisposed()||!this.has(o.resource))&&await this.doResolve(o,{reload:{async:!1}})}async resolve(o,g){const h=this.joinPendingResolves(o);return h&&await h,this.doResolve(o,g)}async doResolve(o,g){let h,v;A.URI.isUri(o)?(v=o,h=this.get(v)):(v=o.resource,h=o);let m,w=!1;if(h)g?.contents?m=h.resolve(g):g?.reload?g.reload.async?(m=Promise.resolve(),(async()=>{try{await h.resolve(g)}catch(D){(0,r.onUnexpectedError)(D)}})()):m=h.resolve(g):m=Promise.resolve();else{w=!0;const D=h=this.instantiationService.createInstance(k.TextFileEditorModel,v,g?g.encoding:void 0,g?g.languageId:void 0);m=h.resolve(g),this.registerModel(D)}this.mapResourceToPendingModelResolvers.set(v,m),this.add(v,h),w&&(this._onDidCreate.fire(h),h.isDirty()&&this._onDidChangeDirty.fire(h));try{await m}catch(D){throw w&&h.dispose(),D}finally{this.mapResourceToPendingModelResolvers.delete(v)}return g?.languageId&&h.setLanguageId(g.languageId),w&&h.isDirty()&&this._onDidChangeDirty.fire(h),h}joinPendingResolves(o){if(!!this.mapResourceToPendingModelResolvers.get(o))return this.doJoinPendingResolves(o)}async doJoinPendingResolves(o){let g;for(;this.mapResourceToPendingModelResolvers.has(o);){const h=this.mapResourceToPendingModelResolvers.get(o);if(h===g)return;g=h;try{await h}catch{}}}registerModel(o){const g=new E.DisposableStore;g.add(o.onDidResolve(h=>this._onDidResolve.fire({model:o,reason:h}))),g.add(o.onDidChangeDirty(()=>this._onDidChangeDirty.fire(o))),g.add(o.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire(o))),g.add(o.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire(o))),g.add(o.onDidSaveError(()=>this._onDidSaveError.fire(o))),g.add(o.onDidSave(h=>this._onDidSave.fire({model:o,...h}))),g.add(o.onDidRevert(()=>this._onDidRevert.fire(o))),g.add(o.onDidChangeEncoding(()=>this._onDidChangeEncoding.fire(o))),this.mapResourceToModelListeners.set(o.resource,g)}add(o,g){if(this.mapResourceToModel.get(o)===g)return;this.mapResourceToDisposeListener.get(o)?.dispose(),this.mapResourceToModel.set(o,g),this.mapResourceToDisposeListener.set(o,g.onWillDispose(()=>this.remove(o)))}remove(o){const g=this.mapResourceToModel.delete(o),h=this.mapResourceToDisposeListener.get(o);h&&((0,E.dispose)(h),this.mapResourceToDisposeListener.delete(o));const v=this.mapResourceToModelListeners.get(o);v&&((0,E.dispose)(v),this.mapResourceToModelListeners.delete(o)),g&&this._onDidRemove.fire(o)}addSaveParticipant(o){return this.saveParticipants.addSaveParticipant(o)}runSaveParticipants(o,g,h){return this.saveParticipants.participate(o,g,h)}canDispose(o){return o.isDisposed()||!this.mapResourceToPendingModelResolvers.has(o.resource)&&!o.isDirty()?!0:this.doCanDispose(o)}async doCanDispose(o){const g=this.joinPendingResolves(o.resource);return g?(await g,this.canDispose(o)):o.isDirty()?(await R.Event.toPromise(o.onDidChangeDirty),this.canDispose(o)):!0}dispose(){super.dispose(),this.mapResourceToModel.clear(),this.mapResourceToPendingModelResolvers.clear(),(0,E.dispose)(this.mapResourceToDisposeListener.values()),this.mapResourceToDisposeListener.clear(),(0,E.dispose)(this.mapResourceToModelListeners.values()),this.mapResourceToModelListeners.clear()}};n=we([F(0,I.IInstantiationService),F(1,S.IFileService),F(2,i.INotificationService),F(3,f.IWorkingCopyFileService),F(4,d.IUriIdentityService)],n),e.TextFileEditorModelManager=n}),define(ae[2950],le([1,0,2040,78,43,69,19,2,51,401,998,2949,5,22,94,54,18,47,56,114,125,157,394,75,107,232,57,34,466,219,42,25,32,392,292,6,29,33,13]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EncodingOracle=e.AbstractTextFileService=void 0;let z=class uo extends E.Disposable{constructor(W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne){super(),this.fileService=W,this.untitledTextEditorService=U,this.lifecycleService=$,this.instantiationService=q,this.modelService=X,this.environmentService=G,this.dialogService=Q,this.fileDialogService=j,this.textResourceConfigurationService=K,this.filesConfigurationService=Y,this.codeEditorService=ee,this.pathService=ie,this.workingCopyFileService=re,this.uriIdentityService=oe,this.languageService=se,this.logService=te,this.elevatedFileService=Z,this.decorationsService=ne,this.files=this._register(this.instantiationService.createInstance(C.TextFileEditorModelManager)),this.untitled=this.untitledTextEditorService,this.provideDecorations()}provideDecorations(){this.decorationsService.registerDecorationsProvider(new class extends E.Disposable{constructor(W){super(),this.files=W,this.label=(0,t.localize)(2,null),this._onDidChange=this._register(new N.Emitter),this.onDidChange=this._onDidChange.event,this.registerListeners()}registerListeners(){this._register(this.files.onDidResolve(({model:W})=>{(W.isReadonly()||W.hasState(4))&&this._onDidChange.fire([W.resource])})),this._register(this.files.onDidRemove(W=>this._onDidChange.fire([W]))),this._register(this.files.onDidChangeReadonly(W=>this._onDidChange.fire([W.resource]))),this._register(this.files.onDidChangeOrphaned(W=>this._onDidChange.fire([W.resource])))}provideDecorations(W){const U=this.files.get(W);if(!U||U.isDisposed())return;const $=U.isReadonly(),q=U.hasState(4);if($&&q)return{color:B.listErrorForeground,letter:P.Codicon.lockSmall,strikethrough:!0,tooltip:(0,t.localize)(3,null)};if($)return{letter:P.Codicon.lockSmall,tooltip:(0,t.localize)(4,null)};if(q)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(x))),this._encoding}async read(W,U){const[$,q]=await this.doRead(W,{...U,preferUnbuffered:!0});return{...$,encoding:q.detected.encoding||D.UTF8,value:await(0,y.consumeStream)(q.stream,X=>X.join(""))}}async readStream(W,U){const[$,q]=await this.doRead(W,U);return{...$,encoding:q.detected.encoding||D.UTF8,value:await(0,i.createTextBufferFactoryFromStream)(q.stream)}}async doRead(W,U){const $=new L.CancellationTokenSource;let q;if(U?.preferUnbuffered){const X=await this.fileService.readFile(W,U,$.token);q={...X,value:(0,s.bufferToStream)(X.value)}}else q=await this.fileService.readFileStream(W,U,$.token);try{const X=await this.doGetDecodedStream(W,q.value,U);return[q,X]}catch(X){throw $.dispose(!0),X.decodeStreamErrorKind===1?new p.TextFileOperationError((0,t.localize)(6,null),0,U):X}}async create(W,U){const $=await Promise.all(W.map(async q=>{const X=await this.getEncodedReadable(q.resource,q.value);return{resource:q.resource,contents:X,overwrite:q.options?.overwrite}}));return this.workingCopyFileService.create($,L.CancellationToken.None,U)}async write(W,U,$){const q=await this.getEncodedReadable(W,U,$);return $?.writeElevated&&this.elevatedFileService.isSupported(W)?this.elevatedFileService.writeFileElevated(W,q,$):this.fileService.writeFile(W,q,$)}async getEncodedReadable(W,U,$){const{encoding:q,addBOM:X}=await this.encoding.getWriteEncoding(W,$);if(q===D.UTF8&&!X)return typeof U>"u"?void 0:(0,p.toBufferOrReadable)(U);U=U||"";const G=typeof U=="string"?(0,p.stringToSnapshot)(U):U;return(0,D.toEncodeReadable)(G,q,{addBOM:X})}async getDecodedStream(W,U,$){return(await this.doGetDecodedStream(W,U,$)).stream}doGetDecodedStream(W,U,$){return(0,D.toDecodeStream)(U,{acceptTextOnly:$?.acceptTextOnly??!1,guessEncoding:$?.autoGuessEncoding||this.textResourceConfigurationService.getValue(W,"files.autoGuessEncoding"),overwriteEncoding:async q=>{const{encoding:X}=await this.encoding.getPreferredReadEncoding(W,$,(0,V.withNullAsUndefined)(q));return X}})}async save(W,U){if(W.scheme===u.Schemas.untitled){const $=this.untitled.get(W);if($){let q;if($.hasAssociatedFilePath?q=await this.suggestSavePath(W):q=await this.fileDialogService.pickFileToSave(await this.suggestSavePath(W),U?.availableFileSystems),q)return this.saveAs(W,q,U)}}else{const $=this.files.get(W);if($)return await $.save(U)?W:void 0}}async saveAs(W,U,$){if(U||(U=await this.fileDialogService.pickFileToSave(await this.suggestSavePath($?.suggestedTarget??W),$?.availableFileSystems)),!!U)return(0,c.isEqual)(W,U)?this.save(W,{...$,force:!0}):this.fileService.hasProvider(W)&&this.uriIdentityService.extUri.isEqual(W,U)&&await this.fileService.exists(W)?(await this.workingCopyFileService.move([{file:{source:W,target:U}}],L.CancellationToken.None),await this.save(W,$)||await this.save(U,$),U):this.doSaveAs(W,U,$)}async doSaveAs(W,U,$){let q=!1;const X=this.files.get(W);if(X?.isResolved())q=await this.doSaveAsTextFile(X,W,U,$);else if(this.fileService.hasProvider(W))await this.fileService.copy(W,U,!0),q=!0;else{const G=this.modelService.getModel(W);G&&(q=await this.doSaveAsTextFile(G,W,U,$))}if(!!q)return await this.revert(W),U}async doSaveAsTextFile(W,U,$,q){let X;const G=W;typeof G.getEncoding=="function"&&(X=G.getEncoding());let Q=!1,j=this.files.get($);if(j?.isResolved())Q=!0;else{Q=await this.fileService.exists($),Q||await this.create([{resource:$,value:""}]);try{j=await this.files.resolve($,{encoding:X})}catch(ie){if(Q&&(ie.textFileOperationResult===0||ie.fileOperationResult===7))return await this.fileService.del($),this.doSaveAsTextFile(W,U,$,q);throw ie}}let K;if(W instanceof S.UntitledTextEditorModel&&W.hasAssociatedFilePath&&Q&&this.uriIdentityService.extUri.isEqual($,(0,c.toLocalResource)(W.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme))?K=await this.confirmOverwrite($):K=!0,!K)return!1;let Y;W instanceof o.BaseTextEditorModel?W.isResolved()&&(Y=W.textEditorModel):Y=W;let ee;if(j.isResolved()&&(ee=j.textEditorModel),Y&&ee){j.updatePreferredEncoding(X),this.modelService.updateModel(ee,(0,i.createTextBufferFactoryFromSnapshot)(Y.createSnapshot()));const ie=Y.getLanguageId(),re=ee.getLanguageId();ie!==n.PLAINTEXT_LANGUAGE_ID&&re===n.PLAINTEXT_LANGUAGE_ID&&ee.setMode(ie);const oe=this.codeEditorService.getTransientModelProperties(Y);if(oe)for(const[se,te]of oe)this.codeEditorService.setTransientModelProperty(ee,se,te)}return q?.source||(q={...q,source:Q?uo.TEXTFILE_SAVE_REPLACE_SOURCE:uo.TEXTFILE_SAVE_CREATE_SOURCE}),j.save(q)}async confirmOverwrite(W){const U={message:(0,t.localize)(7,null,(0,c.basename)(W)),detail:(0,t.localize)(8,null,(0,c.basename)(W),(0,c.basename)((0,c.dirname)(W))),primaryButton:(0,t.localize)(9,null),type:"warning"};return(await this.dialogService.confirm(U)).confirmed}async suggestSavePath(W){if(this.fileService.hasProvider(W))return W;const U=this.environmentService.remoteAuthority,$=await this.fileDialogService.defaultFilePath();let q;if(W.scheme===u.Schemas.untitled){const X=this.untitled.get(W);if(X){if(X.hasAssociatedFilePath)return(0,c.toLocalResource)(W,U,this.pathService.defaultUriScheme);let G=X.name;await this.pathService.hasValidBasename((0,c.joinPath)($,G),G)||(G=(0,c.basename)(W));const Q=X.getLanguageId();Q&&Q!==n.PLAINTEXT_LANGUAGE_ID?q=this.suggestFilename(Q,G):q=G}}return q||(q=(0,c.basename)(W)),(0,c.joinPath)($,q)}suggestFilename(W,U){if(!this.languageService.getLanguageName(W))return U;const q=this.languageService.getExtensions(W)[0];return q&&!U.endsWith(q)?U+q:this.languageService.getFilenames(W)[0]||U}async revert(W,U){if(W.scheme===u.Schemas.untitled){const $=this.untitled.get(W);if($)return $.revert(U)}else{const $=this.files.get(W);if($&&($.isDirty()||U?.force))return $.revert(U)}}isDirty(W){const U=W.scheme===u.Schemas.untitled?this.untitled.get(W):this.files.get(W);return U?U.isDirty():!1}};z.TEXTFILE_SAVE_CREATE_SOURCE=R.SaveSourceRegistry.registerSource("textFileCreate.source",(0,t.localize)(0,null)),z.TEXTFILE_SAVE_REPLACE_SOURCE=R.SaveSourceRegistry.registerSource("textFileOverwrite.source",(0,t.localize)(1,null)),z=we([F(0,k.IFileService),F(1,b.IUntitledTextEditorService),F(2,A.ILifecycleService),F(3,r.IInstantiationService),F(4,f.IModelService),F(5,I.IWorkbenchEnvironmentService),F(6,l.IDialogService),F(7,l.IFileDialogService),F(8,d.ITextResourceConfigurationService),F(9,a.IFilesConfigurationService),F(10,g.ICodeEditorService),F(11,h.IPathService),F(12,v.IWorkingCopyFileService),F(13,m.IUriIdentityService),F(14,T.ILanguageService),F(15,_.ILogService),F(16,M.IElevatedFileService),F(17,O.IDecorationsService)],z),e.AbstractTextFileService=z;let x=class extends E.Disposable{get encodingOverrides(){return this._encodingOverrides}set encodingOverrides(W){this._encodingOverrides=W}constructor(W,U,$,q){super(),this.textResourceConfigurationService=W,this.environmentService=U,this.contextService=$,this.uriIdentityService=q,this._encodingOverrides=this.getDefaultEncodingOverrides(),this.registerListeners()}registerListeners(){this._register(this.contextService.onDidChangeWorkspaceFolders(()=>this.encodingOverrides=this.getDefaultEncodingOverrides()))}getDefaultEncodingOverrides(){const W=[];return W.push({parent:this.environmentService.userRoamingDataHome,encoding:D.UTF8}),W.push({extension:w.WORKSPACE_EXTENSION,encoding:D.UTF8}),W.push({parent:this.environmentService.untitledWorkspacesHome,encoding:D.UTF8}),this.contextService.getWorkspace().folders.forEach(U=>{W.push({parent:(0,c.joinPath)(U.uri,".vscode"),encoding:D.UTF8})}),W}async getWriteEncoding(W,U){const{encoding:$,hasBOM:q}=await this.getPreferredWriteEncoding(W,U?U.encoding:void 0);return{encoding:$,addBOM:q}}async getPreferredWriteEncoding(W,U){const $=await this.getEncodingForResource(W,U);return{encoding:$,hasBOM:$===D.UTF16be||$===D.UTF16le||$===D.UTF8_with_bom}}async getPreferredReadEncoding(W,U,$){let q;U?.encoding?$===D.UTF8_with_bom&&U.encoding===D.UTF8?q=D.UTF8_with_bom:q=U.encoding:typeof $=="string"?q=$:this.textResourceConfigurationService.getValue(W,"files.encoding")===D.UTF8_with_bom&&(q=D.UTF8);const X=await this.getEncodingForResource(W,q);return{encoding:X,hasBOM:X===D.UTF16be||X===D.UTF16le||X===D.UTF8_with_bom}}async getEncodingForResource(W,U){let $;const q=this.getEncodingOverride(W);return q?$=q:U?$=U:$=this.textResourceConfigurationService.getValue(W,"files.encoding"),$!==D.UTF8&&(!$||!await(0,D.encodingExists)($))&&($=D.UTF8),$}getEncodingOverride(W){if(this.encodingOverrides?.length){for(const U of this.encodingOverrides)if(U.parent&&this.uriIdentityService.extUri.isEqualOrParent(W,U.parent)||U.extension&&(0,c.extname)(W)===`.${U.extension}`)return U.encoding}}};x=we([F(0,d.ITextResourceConfigurationService),F(1,I.IWorkbenchEnvironmentService),F(2,w.IWorkspaceContextService),F(3,m.IUriIdentityService)],x),e.EncodingOracle=x}),define(ae[2951],le([1,0,2044,166,2950,78,35,19,114,401,69,5,54,128,47,157,75,107,232,57,42,392,25,11,292]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeTextFileService=void 0;let v=class extends R.AbstractTextFileService{constructor(w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$){super(w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,U,W,$),this.environmentService=L,this.registerListeners()}registerListeners(){this.lifecycleService.onWillShutdown(w=>w.join(this.onWillShutdown(),{id:"join.textFiles",label:(0,t.localize)(0,null)}))}async onWillShutdown(){let w;for(;(w=this.files.models.filter(D=>D.hasState(2))).length>0;)await g.Promises.settled(w.map(D=>D.joinState(2)))}async read(w,D){return D=this.ensureLimits(D),super.read(w,D)}async readStream(w,D){return D=this.ensureLimits(D),super.readStream(w,D)}ensureLimits(w){let D;w?D=w:D=Object.create(null);let y;if(D.limits?y=D.limits:(y=Object.create(null),D.limits=y),typeof y.size!="number"&&(y.size=(0,E.getPlatformLimits)(p.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)*E.ByteSize.MB||0,(0,E.getPlatformLimits)(p.process.arch==="ia32"?0:1).maxHeapSize)}return D}};v=we([F(0,E.IFileService),F(1,b.IUntitledTextEditorService),F(2,S.ILifecycleService),F(3,C.IInstantiationService),F(4,r.IModelService),F(5,u.INativeWorkbenchEnvironmentService),F(6,i.IDialogService),F(7,i.IFileDialogService),F(8,I.ITextResourceConfigurationService),F(9,f.IFilesConfigurationService),F(10,c.ICodeEditorService),F(11,l.IPathService),F(12,s.IWorkingCopyFileService),F(13,d.IUriIdentityService),F(14,n.ILanguageService),F(15,a.IElevatedFileService),F(16,o.ILogService),F(17,h.IDecorationsService)],v),e.NativeTextFileService=v,(0,k.registerSingleton)(A.ITextFileService,v,0)}),define(ae[1e3],le([1,0,2066,6,32,19,136,11,25,13,232,157,170,26,108,117,36,14,262,24,392,986]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredFileWorkingCopy=e.isStoredFileWorkingCopySaveEvent=e.StoredFileWorkingCopyState=void 0;var o;(function(v){v[v.SAVED=0]="SAVED",v[v.DIRTY=1]="DIRTY",v[v.PENDING_SAVE=2]="PENDING_SAVE",v[v.CONFLICT=3]="CONFLICT",v[v.ORPHAN=4]="ORPHAN",v[v.ERROR=5]="ERROR"})(o=e.StoredFileWorkingCopyState||(e.StoredFileWorkingCopyState={}));function g(v){return!!v.stat}e.isStoredFileWorkingCopySaveEvent=g;let h=class ho extends a.ResourceWorkingCopy{get model(){return this._model}constructor(m,w,D,y,T,_,L,M,O,N,P,B,V,z,x){super(w,_),this.typeId=m,this.name=D,this.modelFactory=y,this.externalResolver=T,this.logService=L,this.workingCopyFileService=M,this.filesConfigurationService=O,this.workingCopyBackupService=N,this.notificationService=B,this.workingCopyEditorService=V,this.editorService=z,this.elevatedFileService=x,this.capabilities=0,this._model=void 0,this._onDidChangeContent=this._register(new p.Emitter),this.onDidChangeContent=this._onDidChangeContent.event,this._onDidResolve=this._register(new p.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new p.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidSaveError=this._register(new p.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new p.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new p.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidChangeReadonly=this._register(new p.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this.dirty=!1,this.ignoreDirtyOnModelContentChange=!1,this.versionId=0,this.lastContentChangeFromUndoRedo=void 0,this.saveSequentializer=new E.TaskSequentializer,this.inConflictMode=!1,this.inErrorMode=!1,this._register(P.registerWorkingCopy(this))}isDirty(){return this.dirty}markDirty(){this.setDirty(!0)}setDirty(m){if(!this.isResolved())return;const w=this.dirty;this.doSetDirty(m),m!==w&&this._onDidChangeDirty.fire()}doSetDirty(m){const w=this.dirty,D=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=w,this.inConflictMode=D,this.inErrorMode=y,this.savedVersionId=T}}isResolved(){return!!this.model}async resolve(m){if(this.trace("resolve() - enter"),this.isDisposed()){this.trace("resolve() - exit - without resolving because file working copy is disposed");return}if(!m?.contents&&(this.dirty||this.saveSequentializer.hasPending())){this.trace("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("resolveFromBuffer()");let w,D,y,T;try{const _=await this.fileService.stat(this.resource);w=_.mtime,D=_.ctime,y=_.size,T=_.etag,this.setOrphaned(!1)}catch(_){w=Date.now(),D=Date.now(),y=0,T=A.ETAG_DISABLED,this.setOrphaned(_.fileOperationResult===1)}return this.resolveFromContent({resource:this.resource,name:this.name,mtime:w,ctime:D,size:y,etag:T,value:m,readonly:!1},!0)}async resolveFromBackup(){const m=await this.workingCopyBackupService.resolve(this);return this.isResolved()?(this.trace("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("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("resolveFromFile()");const w=m?.forceReadFromFile;let D;w?D=A.ETAG_DISABLED:this.lastResolvedFileStat&&(D=this.lastResolvedFileStat.etag);const y=this.versionId;try{const T=await this.fileService.readFileStream(this.resource,{etag:D});if(this.setOrphaned(!1),y!==this.versionId){this.trace("resolveFromFile() - exit - without resolving because file working copy content changed");return}await this.resolveFromContent(T,!1)}catch(T){const _=T.fileOperationResult;if(this.setOrphaned(_===1),this.isResolved()&&_===2){T instanceof A.NotModifiedSinceFileOperationError&&this.updateLastResolvedFileStat(T.stat);return}if(this.isResolved()&&_===1&&!w)return;throw T}}async resolveFromContent(m,w){if(this.trace("resolveFromContent() - enter"),this.isDisposed()){this.trace("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(!!w),this._onDidResolve.fire()}async doCreateModel(m){this.trace("doCreateModel()"),this._model=this._register(await this.modelFactory.createModel(this.resource,m,R.CancellationToken.None)),this.installModelListeners(this._model)}async doUpdateModel(m){this.trace("doUpdateModel()"),this.ignoreDirtyOnModelContentChange=!0;try{await this.model?.update(m,R.CancellationToken.None)}finally{this.ignoreDirtyOnModelContentChange=!1}}installModelListeners(m){this._register(m.onDidChangeContent(w=>this.onModelContentChanged(m,w.isUndoing||w.isRedoing))),this._register(m.onWillDispose(()=>this.dispose()))}onModelContentChanged(m,w){if(this.trace("onModelContentChanged() - enter"),this.versionId++,this.trace(`onModelContentChanged() - new versionId ${this.versionId}`),w&&(this.lastContentChangeFromUndoRedo=Date.now()),!this.ignoreDirtyOnModelContentChange&&!this.isReadonly())if(m.versionId===this.savedVersionId){this.trace("onModelContentChanged() - model content changed back to last saved version");const D=this.dirty;this.setDirty(!1),D&&this._onDidRevert.fire()}else this.trace("onModelContentChanged() - model content changed and marked as dirty"),this.setDirty(!0);this._onDidChangeContent.fire()}async forceResolveFromFile(){this.isDisposed()||await this.externalResolver({forceReadFromFile:!0})}async backup(m){let w;this.lastResolvedFileStat&&(w={mtime:this.lastResolvedFileStat.mtime,ctime:this.lastResolvedFileStat.ctime,size:this.lastResolvedFileStat.size,etag:this.lastResolvedFileStat.etag,orphaned:this.isOrphaned()});let D;return this.isResolved()&&(D=await(0,E.raceCancellation)(this.model.snapshot(m),m)),{meta:w,content:D}}async save(m=Object.create(null)){return this.isResolved()?this.isReadonly()?(this.trace("save() - ignoring request for readonly resource"),!1):(this.hasState(3)||this.hasState(5))&&(m.reason===2||m.reason===3||m.reason===4)?(this.trace("save() - ignoring auto save request for file working copy that is in conflict or error"),!1):(this.trace("save() - enter"),await this.doSave(m),this.trace("save() - exit"),this.hasState(0)):!1}async doSave(m){typeof m.reason!="number"&&(m.reason=1);let w=this.versionId;if(this.trace(`doSave(${w}) - enter with versionId ${w}`),this.saveSequentializer.hasPending(w))return this.trace(`doSave(${w}) - exit - found a pending save for versionId ${w}`),this.saveSequentializer.pending;if(!m.force&&!this.dirty){this.trace(`doSave(${w}) - 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(`doSave(${w}) - exit - because busy saving`),this.saveSequentializer.cancelPending(),this.saveSequentializer.setNext(()=>this.doSave(m));this.isResolved()&&this.model.pushStackElement();const D=new R.CancellationTokenSource;return this.saveSequentializer.setPending(w,(async()=>{if(this.isResolved()&&!m.skipSaveParticipants&&this.workingCopyFileService.hasSaveParticipants)try{if(m.reason===2&&typeof this.lastContentChangeFromUndoRedo=="number"){const _=Date.now()-this.lastContentChangeFromUndoRedo;_<ho.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD&&await(0,E.timeout)(ho.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD-_)}D.token.isCancellationRequested||await this.workingCopyFileService.runSaveParticipants(this,{reason:m.reason??1},D.token)}catch(_){this.logService.error(`[stored file working copy] runSaveParticipants(${w}) - resulted in an error: ${_.toString()}`,this.resource.toString(),this.typeId)}if(D.token.isCancellationRequested||this.isDisposed()||!this.isResolved())return;w=this.versionId,this.inErrorMode=!1,this.trace(`doSave(${w}) - before write()`);const y=(0,b.assertIsDefined)(this.lastResolvedFileStat),T=this;return this.saveSequentializer.setPending(w,(async()=>{try{const _=await(0,E.raceCancellation)(T.model.snapshot(D.token),D.token);if(D.token.isCancellationRequested)return;D.dispose();const L={mtime:y.mtime,etag:m.ignoreModifiedSince||!this.filesConfigurationService.preventSaveConflicts(y.resource)?A.ETAG_DISABLED:y.etag,unlock:m.writeUnlock};let M;m?.writeElevated&&this.elevatedFileService.isSupported(y.resource)?M=await this.elevatedFileService.writeFileElevated(y.resource,(0,b.assertIsDefined)(_),L):M=await this.fileService.writeFile(y.resource,(0,b.assertIsDefined)(_),L),this.handleSaveSuccess(M,w,m)}catch(_){this.handleSaveError(_,w,m)}})(),()=>D.cancel())})(),()=>D.cancel())}handleSaveSuccess(m,w,D){this.updateLastResolvedFileStat(m),w===this.versionId?(this.trace(`handleSaveSuccess(${w}) - setting dirty to false because versionId did not change`),this.setDirty(!1)):this.trace(`handleSaveSuccess(${w}) - not setting dirty to false because versionId did change meanwhile`),this.setOrphaned(!1),this._onDidSave.fire({reason:D.reason,stat:m,source:D.source})}handleSaveError(m,w,D){if((D.ignoreErrorHandler?this.logService.trace:this.logService.error).apply(this.logService,[`[stored file working copy] handleSaveError(${w}) - exit - resulted in a save error: ${m.toString()}`,this.resource.toString(),this.typeId]),D.ignoreErrorHandler)throw m;this.setDirty(!0),this.inErrorMode=!0,m.fileOperationResult===3&&(this.inConflictMode=!0),this.doHandleSaveError(m),this._onDidSaveError.fire()}doHandleSaveError(m){const w=m,D=[];let y;if(w.fileOperationResult===3)y=(0,t.localize)(0,null,this.name),D.push((0,c.toAction)({id:"fileWorkingCopy.overwrite",label:(0,t.localize)(1,null),run:()=>this.save({ignoreModifiedSince:!0})})),D.push((0,c.toAction)({id:"fileWorkingCopy.revert",label:(0,t.localize)(2,null),run:()=>this.revert()}));else{const L=w.fileOperationResult===5,M=L&&w.options?.unlock,O=w.fileOperationResult===6,N=this.elevatedFileService.isSupported(this.resource);N&&(O||M)?D.push((0,c.toAction)({id:"fileWorkingCopy.saveElevated",label:M?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:M,reason:1})}})):L?D.push((0,c.toAction)({id:"fileWorkingCopy.unlock",label:(0,t.localize)(7,null),run:()=>this.save({writeUnlock:!0,reason:1})})):D.push((0,c.toAction)({id:"fileWorkingCopy.retry",label:(0,t.localize)(8,null),run:()=>this.save({reason:1})})),D.push((0,c.toAction)({id:"fileWorkingCopy.saveAs",label:(0,t.localize)(9,null),run:()=>{const P=this.workingCopyEditorService.findEditor(this);P&&this.editorService.save(P,{saveAs:!0,reason:1})}})),D.push((0,c.toAction)({id:"fileWorkingCopy.revert",label:(0,t.localize)(10,null),run:()=>this.revert()})),L?M&&N?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):N&&O?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,f.toErrorMessage)(m,!1))}const T=this.notificationService.notify({id:`${(0,i.hash)(this.resource.toString())}`,severity:u.Severity.Error,message:y,actions:{primary:D}}),_=p.Event.once(p.Event.any(this.onDidSave,this.onDidRevert))(()=>T.close());p.Event.once(T.onDidClose)(()=>_.dispose())}updateLastResolvedFileStat(m){const w=this.isReadonly();this.lastResolvedFileStat?this.lastResolvedFileStat.mtime<=m.mtime&&(this.lastResolvedFileStat=m):this.lastResolvedFileStat=m,this.isReadonly()!==w&&this._onDidChangeReadonly.fire()}async revert(m){if(!this.isResolved()||!this.dirty&&!m?.force)return;this.trace("revert()");const w=this.dirty,D=this.doSetDirty(!1);if(!m?.soft)try{await this.forceResolveFromFile()}catch(T){if(T.fileOperationResult!==1)throw D(),T}this._onDidRevert.fire(),w&&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(`[stored file working copy] ${m}`,this.resource.toString(),this.typeId)}dispose(){this.trace("dispose()"),this.inConflictMode=!1,this.inErrorMode=!1,this._model=void 0,super.dispose()}};h.UNDO_REDO_SAVE_PARTICIPANTS_AUTO_SAVE_THROTTLE_THRESHOLD=500,h=we([F(5,A.IFileService),F(6,I.ILogService),F(7,S.IWorkingCopyFileService),F(8,C.IFilesConfigurationService),F(9,r.IWorkingCopyBackupService),F(10,k.IWorkingCopyService),F(11,u.INotificationService),F(12,s.IWorkingCopyEditorService),F(13,d.IEditorService),F(14,n.IElevatedFileService)],h),e.StoredFileWorkingCopy=h}),define(ae[2952],le([1,0,2067,2,6,1e3,60,11,19,69,9,49,25,18,232,57,32,170,988,26,24,392,157,262,136,14,21]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StoredFileWorkingCopyManager=void 0;let w=class extends s.BaseFileWorkingCopyManager{constructor(y,T,_,L,M,O,N,P,B,V,z,x,H,W,U){super(_,O,P),this.workingCopyTypeId=y,this.modelFactory=T,this.lifecycleService=L,this.labelService=M,this.workingCopyFileService=N,this.uriIdentityService=B,this.filesConfigurationService=V,this.workingCopyService=z,this.notificationService=x,this.workingCopyEditorService=H,this.editorService=W,this.elevatedFileService=U,this._onDidResolve=this._register(new R.Emitter),this.onDidResolve=this._onDidResolve.event,this._onDidChangeDirty=this._register(new R.Emitter),this.onDidChangeDirty=this._onDidChangeDirty.event,this._onDidChangeReadonly=this._register(new R.Emitter),this.onDidChangeReadonly=this._onDidChangeReadonly.event,this._onDidChangeOrphaned=this._register(new R.Emitter),this.onDidChangeOrphaned=this._onDidChangeOrphaned.event,this._onDidSaveError=this._register(new R.Emitter),this.onDidSaveError=this._onDidSaveError.event,this._onDidSave=this._register(new R.Emitter),this.onDidSave=this._onDidSave.event,this._onDidRevert=this._register(new R.Emitter),this.onDidRevert=this._onDidRevert.event,this._onDidRemove=this._register(new R.Emitter),this.onDidRemove=this._onDidRemove.event,this.mapResourceToWorkingCopyListeners=new k.ResourceMap,this.mapResourceToPendingWorkingCopyResolve=new k.ResourceMap,this.workingCopyResolveQueue=this._register(new E.ResourceQueue),this.mapCorrelationIdToWorkingCopiesToRestore=new Map,this.registerListeners()}registerListeners(){this._register(this.fileService.onDidFilesChange(y=>this.onDidFilesChange(y))),this._register(this.fileService.onDidChangeFileSystemProviderCapabilities(y=>this.onDidChangeFileSystemProviderCapabilities(y))),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(y=>this.onDidChangeFileSystemProviderRegistrations(y))),this._register(this.workingCopyFileService.onWillRunWorkingCopyFileOperation(y=>this.onWillRunWorkingCopyFileOperation(y))),this._register(this.workingCopyFileService.onDidFailWorkingCopyFileOperation(y=>this.onDidFailWorkingCopyFileOperation(y))),this._register(this.workingCopyFileService.onDidRunWorkingCopyFileOperation(y=>this.onDidRunWorkingCopyFileOperation(y))),v.isWeb?this.lifecycleService.onBeforeShutdown(y=>y.veto(this.onBeforeShutdownWeb(),"veto.fileWorkingCopyManager")):this.lifecycleService.onWillShutdown(y=>y.join(this.onWillShutdownDesktop(),{id:"join.fileWorkingCopyManager",label:(0,t.localize)(0,null)}))}onBeforeShutdownWeb(){return!!this.workingCopies.some(y=>y.hasState(2))}async onWillShutdownDesktop(){let y;for(;(y=this.workingCopies.filter(T=>T.hasState(2))).length>0;)await E.Promises.settled(y.map(T=>T.joinState(2)))}onDidChangeFileSystemProviderCapabilities(y){this.queueWorkingCopyReloads(y.scheme)}onDidChangeFileSystemProviderRegistrations(y){!y.added||this.queueWorkingCopyReloads(y.scheme)}onDidFilesChange(y){this.queueWorkingCopyReloads(y)}queueWorkingCopyReloads(y){for(const T of this.workingCopies){if(T.isDirty())continue;let _=!1;typeof y=="string"?_=y===T.resource.scheme:_=y.contains(T.resource,0,1),_&&this.queueWorkingCopyReload(T)}}queueWorkingCopyReload(y){const T=this.workingCopyResolveQueue.queueFor(y.resource);T.size<=1&&T.queue(async()=>{try{await this.reload(y)}catch(_){this.logService.error(_)}})}onWillRunWorkingCopyFileOperation(y){(y.operation===2||y.operation===3)&&y.waitUntil((async()=>{const T=[];for(const{source:_,target:L}of y.files)if(_){if(this.uriIdentityService.extUri.isEqual(_,L))continue;const M=[];for(const O of this.workingCopies)this.uriIdentityService.extUri.isEqualOrParent(O.resource,_)&&M.push(O);for(const O of M){const N=O.resource;let P;this.uriIdentityService.extUri.isEqual(N,_)?P=L:P=(0,u.joinPath)(L,N.path.substr(_.path.length+1)),T.push({source:N,target:P,snapshot:O.isDirty()?await O.model?.snapshot(c.CancellationToken.None):void 0})}}this.mapCorrelationIdToWorkingCopiesToRestore.set(y.correlationId,T)})())}onDidFailWorkingCopyFileOperation(y){if(y.operation===2||y.operation===3){const T=this.mapCorrelationIdToWorkingCopiesToRestore.get(y.correlationId);T&&(this.mapCorrelationIdToWorkingCopiesToRestore.delete(y.correlationId),T.forEach(_=>{_.snapshot&&this.get(_.source)?.markDirty()}))}}onDidRunWorkingCopyFileOperation(y){switch(y.operation){case 0:y.waitUntil((async()=>{for(const{target:T}of y.files){const _=this.get(T);_&&!_.isDisposed()&&await _.revert()}})());break;case 2:case 3:y.waitUntil((async()=>{const T=this.mapCorrelationIdToWorkingCopiesToRestore.get(y.correlationId);T&&(this.mapCorrelationIdToWorkingCopiesToRestore.delete(y.correlationId),await E.Promises.settled(T.map(async _=>{await this.resolve(_.target,{reload:{async:!1},contents:_.snapshot})})))})());break}}async reload(y){await this.joinPendingResolves(y.resource),!(y.isDirty()||y.isDisposed()||!this.has(y.resource))&&await this.doResolve(y,{reload:{async:!1}})}async resolve(y,T){const _=this.joinPendingResolves(y);return _&&await _,this.doResolve(y,T)}async doResolve(y,T){let _,L;S.URI.isUri(y)?(L=y,_=this.get(L)):(L=y.resource,_=y);let M,O=!1;const N={contents:T?.contents,forceReadFromFile:T?.reload?.force};_?T?.contents?M=_.resolve(N):T?.reload?T.reload.async?(M=Promise.resolve(),(async()=>{try{await _.resolve(N)}catch(P){(0,m.onUnexpectedError)(P)}})()):M=_.resolve(N):M=Promise.resolve():(O=!0,_=new A.StoredFileWorkingCopy(this.workingCopyTypeId,L,this.labelService.getUriBasenameLabel(L),this.modelFactory,async P=>{await this.resolve(L,{...P,reload:{async:!1}})},this.fileService,this.logService,this.workingCopyFileService,this.filesConfigurationService,this.workingCopyBackupService,this.workingCopyService,this.notificationService,this.workingCopyEditorService,this.editorService,this.elevatedFileService),M=_.resolve(N),this.registerWorkingCopy(_)),this.mapResourceToPendingWorkingCopyResolve.set(L,M),this.add(L,_),O&&_.isDirty()&&this._onDidChangeDirty.fire(_);try{await M}catch(P){throw O&&_.dispose(),P}finally{this.mapResourceToPendingWorkingCopyResolve.delete(L)}return O&&_.isDirty()&&this._onDidChangeDirty.fire(_),_}joinPendingResolves(y){if(!!this.mapResourceToPendingWorkingCopyResolve.get(y))return this.doJoinPendingResolves(y)}async doJoinPendingResolves(y){let T;for(;this.mapResourceToPendingWorkingCopyResolve.has(y);){const _=this.mapResourceToPendingWorkingCopyResolve.get(y);if(_===T)return;T=_;try{await _}catch{}}}registerWorkingCopy(y){const T=new p.DisposableStore;T.add(y.onDidResolve(()=>this._onDidResolve.fire(y))),T.add(y.onDidChangeDirty(()=>this._onDidChangeDirty.fire(y))),T.add(y.onDidChangeReadonly(()=>this._onDidChangeReadonly.fire(y))),T.add(y.onDidChangeOrphaned(()=>this._onDidChangeOrphaned.fire(y))),T.add(y.onDidSaveError(()=>this._onDidSaveError.fire(y))),T.add(y.onDidSave(_=>this._onDidSave.fire({workingCopy:y,..._}))),T.add(y.onDidRevert(()=>this._onDidRevert.fire(y))),this.mapResourceToWorkingCopyListeners.set(y.resource,T)}remove(y){const T=super.remove(y),_=this.mapResourceToWorkingCopyListeners.get(y);return _&&((0,p.dispose)(_),this.mapResourceToWorkingCopyListeners.delete(y)),T&&this._onDidRemove.fire(y),T}canDispose(y){return y.isDisposed()||!this.mapResourceToPendingWorkingCopyResolve.has(y.resource)&&!y.isDirty()?!0:this.doCanDispose(y)}async doCanDispose(y){const T=this.joinPendingResolves(y.resource);return T?(await T,this.canDispose(y)):y.isDirty()?(await R.Event.toPromise(y.onDidChangeDirty),this.canDispose(y)):!0}dispose(){super.dispose(),this.mapResourceToPendingWorkingCopyResolve.clear(),(0,p.dispose)(this.mapResourceToWorkingCopyListeners.values()),this.mapResourceToWorkingCopyListeners.clear()}};w=we([F(2,I.IFileService),F(3,b.ILifecycleService),F(4,C.ILabelService),F(5,r.ILogService),F(6,i.IWorkingCopyFileService),F(7,l.IWorkingCopyBackupService),F(8,f.IUriIdentityService),F(9,o.IFilesConfigurationService),F(10,h.IWorkingCopyService),F(11,d.INotificationService),F(12,g.IWorkingCopyEditorService),F(13,n.IEditorService),F(14,a.IElevatedFileService)],w),e.StoredFileWorkingCopyManager=w}),define(ae[2953],le([1,0,2065,6,11,32,2,18,9,47,19,43,51,107,57,2952,999,2940,232,49,25,26,24,392,157,69,170,262,136,22,292,29,33]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileWorkingCopyManager=void 0;let M=class go extends k.Disposable{constructor(N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe){super(),this.workingCopyTypeId=N,this.storedWorkingCopyModelFactory=P,this.untitledWorkingCopyModelFactory=B,this.fileService=V,this.workingCopyFileService=W,this.uriIdentityService=$,this.fileDialogService=q,this.pathService=ee,this.environmentService=ie,this.dialogService=re,this.decorationsService=oe,this.stored=this._register(new f.StoredFileWorkingCopyManager(this.workingCopyTypeId,this.storedWorkingCopyModelFactory,V,z,x,H,W,U,$,X,G,Q,j,K,Y)),this.untitled=this._register(new l.UntitledFileWorkingCopyManager(this.workingCopyTypeId,this.untitledWorkingCopyModelFactory,async(se,te)=>!!await this.saveAs(se.resource,void 0,te),V,x,H,U,G)),this.onDidCreate=p.Event.any(this.stored.onDidCreate,this.untitled.onDidCreate),this.provideDecorations()}provideDecorations(){this.decorationsService.registerDecorationsProvider(new class extends k.Disposable{constructor(N){super(),this.stored=N,this.label=(0,t.localize)(2,null),this._onDidChange=this._register(new p.Emitter),this.onDidChange=this._onDidChange.event,this.registerListeners()}registerListeners(){this._register(this.stored.onDidResolve(N=>{(N.isReadonly()||N.hasState(4))&&this._onDidChange.fire([N.resource])})),this._register(this.stored.onDidRemove(N=>this._onDidChange.fire([N]))),this._register(this.stored.onDidChangeReadonly(N=>this._onDidChange.fire([N.resource]))),this._register(this.stored.onDidChangeOrphaned(N=>this._onDidChange.fire([N.resource])))}provideDecorations(N){const P=this.stored.get(N);if(!P||P.isDisposed())return;const B=P.isReadonly(),V=P.hasState(4);if(B&&V)return{color:L.listErrorForeground,letter:_.Codicon.lockSmall,strikethrough:!0,tooltip:(0,t.localize)(3,null)};if(B)return{letter:_.Codicon.lockSmall,tooltip:(0,t.localize)(4,null)};if(V)return{color:L.listErrorForeground,strikethrough:!0,tooltip:(0,t.localize)(5,null)}}}(this.stored))}get workingCopies(){return[...this.stored.workingCopies,...this.untitled.workingCopies]}get(N){return this.stored.get(N)??this.untitled.get(N)}resolve(N,P){return I.URI.isUri(N)?N.scheme===y.Schemas.untitled?this.untitled.resolve({untitledResource:N}):this.stored.resolve(N,P):this.untitled.resolve(N)}async saveAs(N,P,B){if(!P){const V=this.get(N);V instanceof c.UntitledFileWorkingCopy&&V.hasAssociatedFilePath?P=await this.suggestSavePath(N):P=await this.fileDialogService.pickFileToSave(await this.suggestSavePath(B?.suggestedTarget??N),B?.availableFileSystems)}if(!!P)return this.fileService.hasProvider(N)&&(0,E.isEqual)(N,P)?this.doSave(N,{...B,force:!0}):this.fileService.hasProvider(N)&&this.uriIdentityService.extUri.isEqual(N,P)&&await this.fileService.exists(N)?(await this.workingCopyFileService.move([{file:{source:N,target:P}}],A.CancellationToken.None),await this.doSave(N,B)??await this.doSave(P,B)):this.doSaveAs(N,P,B)}async doSave(N,P){const B=this.stored.get(N);if(B&&await B.save(P))return B}async doSaveAs(N,P,B){let V;const z=this.get(N);z?.isResolved()?V=await z.model.snapshot(A.CancellationToken.None):V=(await this.fileService.readFileStream(N)).value;const{targetFileExists:x,targetStoredFileWorkingCopy:H}=await this.doResolveSaveTarget(N,P);if(!(z instanceof c.UntitledFileWorkingCopy&&z.hasAssociatedFilePath&&x&&this.uriIdentityService.extUri.isEqual(P,(0,E.toLocalResource)(z.resource,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme))&&!await this.confirmOverwrite(P)||(await H.model?.update(V,A.CancellationToken.None),B?.source||(B={...B,source:x?go.FILE_WORKING_COPY_SAVE_REPLACE_SOURCE:go.FILE_WORKING_COPY_SAVE_CREATE_SOURCE}),!await H.save({...B,force:!0}))))return await z?.revert(),H}async doResolveSaveTarget(N,P){let B=!1,V=this.stored.get(P);return V?.isResolved()?B=!0:(B=await this.fileService.exists(P),B||await this.workingCopyFileService.create([{resource:P}],A.CancellationToken.None),this.uriIdentityService.extUri.isEqual(N,P)&&this.get(N)?V=await this.stored.resolve(N):V=await this.stored.resolve(P)),{targetFileExists:B,targetStoredFileWorkingCopy:V}}async confirmOverwrite(N){const P={message:(0,t.localize)(6,null,(0,E.basename)(N)),detail:(0,t.localize)(7,null,(0,E.basename)(N),(0,E.basename)((0,E.dirname)(N))),primaryButton:(0,t.localize)(8,null),type:"warning"};return(await this.dialogService.confirm(P)).confirmed}async suggestSavePath(N){if(this.fileService.hasProvider(N))return N;const P=this.get(N);if(P instanceof c.UntitledFileWorkingCopy&&P.hasAssociatedFilePath)return(0,E.toLocalResource)(N,this.environmentService.remoteAuthority,this.pathService.defaultUriScheme);const B=await this.fileDialogService.defaultFilePath();if(P){const V=(0,E.joinPath)(B,P.name);if(await this.pathService.hasValidBasename(V,P.name))return V}return(0,E.joinPath)(B,(0,E.basename)(N))}async destroy(){await R.Promises.settled([this.stored.destroy(),this.untitled.destroy()])}};M.FILE_WORKING_COPY_SAVE_CREATE_SOURCE=C.SaveSourceRegistry.registerSource("fileWorkingCopyCreate.source",(0,t.localize)(0,null)),M.FILE_WORKING_COPY_SAVE_REPLACE_SOURCE=C.SaveSourceRegistry.registerSource("fileWorkingCopyReplace.source",(0,t.localize)(1,null)),M=we([F(3,S.IFileService),F(4,v.ILifecycleService),F(5,d.ILabelService),F(6,n.ILogService),F(7,s.IWorkingCopyFileService),F(8,m.IWorkingCopyBackupService),F(9,i.IUriIdentityService),F(10,b.IFileDialogService),F(11,h.IFilesConfigurationService),F(12,D.IWorkingCopyService),F(13,a.INotificationService),F(14,w.IWorkingCopyEditorService),F(15,o.IEditorService),F(16,g.IElevatedFileService),F(17,u.IPathService),F(18,r.IWorkbenchEnvironmentService),F(19,b.IDialogService),F(20,T.IDecorationsService)],M),e.FileWorkingCopyManager=M}),define(ae[2954],le([1,0,5,9,64,2933,2,142,25,6,39,57,60,2953,22,873,13,32]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookModelResolverServiceImpl=void 0;let s=class extends k.ReferenceCollection{constructor(a,o,g){super(),this._instantiationService=a,this._notebookService=o,this._logService=g,this._disposables=new k.DisposableStore,this._workingCopyManagers=new Map,this._modelListener=new Map,this._onDidSaveNotebook=new b.Emitter,this.onDidSaveNotebook=this._onDidSaveNotebook.event,this._onDidChangeDirty=new b.Emitter,this.onDidChangeDirty=this._onDidChangeDirty.event,this._dirtyStates=new r.ResourceMap,this._disposables.add(o.onWillRemoveViewType(h=>{this._workingCopyManagers.get(R.NotebookWorkingCopyTypeIdentifier.create(h))?.destroy().catch(m=>g.error(m))}))}dispose(){this._disposables.dispose(),this._onDidSaveNotebook.dispose(),this._onDidChangeDirty.dispose(),(0,k.dispose)(this._modelListener.values()),(0,k.dispose)(this._workingCopyManagers.values())}isDirty(a){return this._dirtyStates.get(a)??!1}async createReferencedObject(a,o,g){const h=p.URI.parse(a),v=await this._notebookService.withNotebookDataProvider(o);let m;if(v instanceof E.ComplexNotebookProviderInfo)m=await this._instantiationService.createInstance(A.ComplexNotebookEditorModel,h,o,v.controller).load();else if(v instanceof E.SimpleNotebookProviderInfo){const D=R.NotebookWorkingCopyTypeIdentifier.create(o);let y=this._workingCopyManagers.get(D);if(!y){const _=new A.NotebookFileWorkingCopyModelFactory(o,this._notebookService);y=this._instantiationService.createInstance(u.FileWorkingCopyManager,D,_,_),this._workingCopyManagers.set(D,y)}m=await this._instantiationService.createInstance(A.SimpleNotebookEditorModel,h,g,o,y).load()}else throw new Error(`CANNOT open ${a}, no provider found`);let w;return this._modelListener.set(m,(0,k.combinedDisposable)(m.onDidSave(()=>this._onDidSaveNotebook.fire(m.resource)),m.onDidChangeDirty(()=>{const D=m.isDirty();this._dirtyStates.set(m.resource,D),D&&!w?w=this.acquire(a,o):w&&(w.dispose(),w=void 0),this._onDidChangeDirty.fire(m)}),(0,k.toDisposable)(()=>w?.dispose()))),m}destroyReferencedObject(a,o){o.then(g=>{this._modelListener.get(g)?.dispose(),this._modelListener.delete(g),g.dispose()}).catch(g=>{this._logService.critical("FAILED to destory notebook",g)})}};s=we([F(0,t.IInstantiationService),F(1,E.INotebookService),F(2,I.ILogService)],s);let d=class{constructor(a,o,g,h){this._notebookService=o,this._extensionService=g,this._uriIdentService=h,this._onWillFailWithConflict=new b.AsyncEmitter,this.onWillFailWithConflict=this._onWillFailWithConflict.event,this._data=a.createInstance(s),this.onDidSaveNotebook=this._data.onDidSaveNotebook,this.onDidChangeDirty=this._data.onDidChangeDirty}dispose(){this._data.dispose()}isDirty(a){return this._data.isDirty(a)}async resolve(a,o){let g,h=!1;if(p.URI.isUri(a))g=a;else if(a.untitledResource)a.untitledResource.scheme===i.Schemas.untitled?g=a.untitledResource:(g=a.untitledResource.with({scheme:i.Schemas.untitled}),h=!0);else{const w=this._notebookService.getContributedNotebookType((0,c.assertIsDefined)(o));if(!w)throw new Error("UNKNOWN view type: "+o);const D=f.NotebookProviderInfo.possibleFileEnding(w.selectors)??"";for(let y=1;;y++){const T=p.URI.from({scheme:i.Schemas.untitled,path:`Untitled-${y}${D}`,query:o});if(!this._notebookService.getNotebookTextModel(T)){g=T;break}}}if(g.scheme===R.CellUri.scheme)throw new Error(`CANNOT open a cell-uri as notebook. Tried with ${g.toString()}`);g=this._uriIdentService.asCanonicalUri(g);const v=this._notebookService.getNotebookTextModel(g)?.viewType;if(!o)if(v)o=v;else{await this._extensionService.whenInstalledExtensionsRegistered();const w=this._notebookService.getContributedNotebookTypes(g);o=w.find(y=>y.exclusive)?.id||w[0]?.id}if(!o)throw new Error(`Missing viewType for '${g}'`);if(v&&v!==o){await this._onWillFailWithConflict.fireAsync({resource:g,viewType:o},l.CancellationToken.None);const w=this._notebookService.getNotebookTextModel(g)?.viewType;if(w&&w!==o)throw new Error(`A notebook with view type '${w}' already exists for '${g}', CANNOT create another notebook with view type ${o}`)}const m=this._data.acquire(g.toString(),o,h);try{return{object:await m.object,dispose(){m.dispose()}}}catch(w){throw m.dispose(),w}}};d=we([F(0,t.IInstantiationService),F(1,E.INotebookService),F(2,S.IExtensionService),F(3,C.IUriIdentityService)],d),e.NotebookModelResolverServiceImpl=d}),define(ae[2955],le([1,0,22,2,165,18,13,9,321,54,42,62,1772,55,97,35,5,17,153,44,43,667,258,142,2590,64,24,156,447,940,982,876,2373,385,2340,267,2859,155,6,533,2954,228,2372,39,262,8,49,170,58,2501,645,134,2371,2463,448,2364,2622,125,162,61,695,75,178,2462,2461,2681,2589,2369,914,2659,2456,2459,2618,2460,2619,913,2652,2620,2617,2367,981,2748,2621,2458,2375,2457,2616,2360,2858]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NotebookContribution=void 0,l.Registry.as(n.EditorExtensions.EditorPane).registerEditorPane(s.EditorPaneDescriptor.create(a.NotebookEditor,a.NotebookEditor.ID,"Notebook Editor"),[new i.SyncDescriptor(o.NotebookEditorInput)]),l.Registry.as(n.EditorExtensions.EditorPane).registerEditorPane(s.EditorPaneDescriptor.create(T.NotebookTextDiffEditor,T.NotebookTextDiffEditor.ID,"Notebook Diff Editor"),[new i.SyncDescriptor(y.NotebookDiffEditorInput)]);class he{canSerialize(){return!0}serialize(Ee){return(0,k.assertType)(Ee instanceof y.NotebookDiffEditorInput),JSON.stringify({resource:Ee.resource,originalResource:Ee.original.resource,name:Ee.getName(),originalName:Ee.original.getName(),textDiffName:Ee.getName(),viewType:Ee.viewType})}deserialize(Ee,Te){const _e=(0,R.parse)(Te);if(!_e)return;const{resource:Re,originalResource:Le,name:Me,viewType:Oe}=_e;return!_e||!E.URI.isUri(Re)||!E.URI.isUri(Le)||typeof Me!="string"||typeof Oe!="string"?void 0:y.NotebookDiffEditorInput.create(Ee,Re,Me,void 0,Le,Oe)}static canResolveBackup(Ee,Te){return!1}}class pe{canSerialize(){return!0}serialize(Ee){(0,k.assertType)(Ee instanceof o.NotebookEditorInput);const Te={resource:Ee.resource,viewType:Ee.viewType,options:Ee.options};return JSON.stringify(Te)}deserialize(Ee,Te){const _e=(0,R.parse)(Te);if(!_e)return;const{resource:Re,viewType:Le,options:Me}=_e;return!_e||!E.URI.isUri(Re)||typeof Le!="string"?void 0:o.NotebookEditorInput.create(Ee,Re,Le,Me)}}l.Registry.as(n.EditorExtensions.EditorFactory).registerEditorSerializer(o.NotebookEditorInput.ID,pe),l.Registry.as(n.EditorExtensions.EditorFactory).registerEditorSerializer(y.NotebookDiffEditorInput.ID,he);let me=class yc extends p.Disposable{constructor(Ee,Te,_e){super(),this.codeEditorService=_e,this.updateCellUndoRedoComparisonKey(Te,Ee),this._register(Te.onDidChangeConfiguration(Re=>{Re.affectsConfiguration(v.NotebookSetting.undoRedoPerCell)&&this.updateCellUndoRedoComparisonKey(Te,Ee)})),this.codeEditorService.registerDecorationType("comment-controller",ce.COMMENTEDITOR_DECORATION_KEY,{})}updateCellUndoRedoComparisonKey(Ee,Te){const _e=Ee.getValue(v.NotebookSetting.undoRedoPerCell);_e?(this._uriComparisonKeyComputer?.dispose(),this._uriComparisonKeyComputer=void 0):this._uriComparisonKeyComputer||(this._uriComparisonKeyComputer=Te.registerUriComparisonKeyComputer(v.CellUri.scheme,{getComparisonKey:Re=>_e?Re.toString():yc._getCellUndoRedoComparisonKey(Re)}))}static _getCellUndoRedoComparisonKey(Ee){const Te=v.CellUri.parse(Ee);return Te?Te.notebook.toString():Ee.toString()}dispose(){super.dispose(),this._uriComparisonKeyComputer?.dispose()}};me=we([F(0,w.IUndoRedoService),F(1,q.IConfigurationService),F(2,de.ICodeEditorService)],me),e.NotebookContribution=me;let Se=class{constructor(Ee,Te,_e,Re){this._modelService=Te,this._languageService=_e,this._notebookModelResolverService=Re,this._registration=Ee.registerTextModelContentProvider(v.CellUri.scheme,this)}dispose(){this._registration.dispose()}async provideTextContent(Ee){const Te=this._modelService.getModel(Ee);if(Te)return Te;const _e=v.CellUri.parse(Ee);if(!_e)return null;const Re=await this._notebookModelResolverService.resolve(_e.notebook);let Le=null;for(const Oe of Re.object.notebook.cells)if(Oe.uri.toString()===Ee.toString()){const Ke={create:Je=>{const rt=Je===2?`\r `:` `;return Oe.textBuffer.setEOL(rt),{textBuffer:Oe.textBuffer,disposable:p.Disposable.None}},getFirstLineText:Je=>Oe.textBuffer.getLineContent(1).substring(0,Je)},We=this._languageService.getLanguageIdByLanguageName(Oe.language),Xe=We?this._languageService.createById(We):Oe.cellKind===v.CellKind.Markup?this._languageService.createById("markdown"):this._languageService.createByFilepathOrFirstLine(Ee,Oe.textBuffer.getLineContent(1));Le=this._modelService.createModel(Ke,Xe,Ee);break}if(!Le)return Re.dispose(),null;const Me=V.Event.any(Le.onWillDispose,Re.object.notebook.onWillDispose)(()=>{Me.dispose(),Re.dispose()});return Le}};Se=we([F(0,C.ITextModelService),F(1,b.IModelService),F(2,S.ILanguageService),F(3,D.INotebookEditorModelResolverService)],Se);let Ie=class{constructor(Ee,Te,_e,Re,Le){this._modelService=Te,this._languageService=_e,this._labelService=Re,this._notebookModelResolverService=Le,this._disposables=[],this._disposables.push(Ee.registerTextModelContentProvider(t.Schemas.vscodeNotebookCellMetadata,{provideTextContent:this.provideMetadataTextContent.bind(this)})),this._disposables.push(Ee.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,p.dispose)(this._disposables)}async provideMetadataTextContent(Ee){const Te=this._modelService.getModel(Ee);if(Te)return Te;const _e=v.CellUri.parseCellPropertyUri(Ee,t.Schemas.vscodeNotebookCellMetadata);if(!_e)return null;const Re=await this._notebookModelResolverService.resolve(_e.notebook);let Le=null;const Me=this._languageService.createById("json");for(const Ke of Re.object.notebook.cells)if(Ke.handle===_e.handle){const We=(0,z.getFormattedMetadataJSON)(Re.object.notebook,Ke.metadata,Ke.language);Le=this._modelService.createModel(We,Me,Ee);break}if(!Le)return Re.dispose(),null;const Oe=Le.onWillDispose(()=>{Oe.dispose(),Re.dispose()});return Le}parseStreamOutput(Ee){if(!Ee)return;const Te=(0,z.getStreamOutputData)(Ee.outputs);if(Te)return{content:Te,mode:this._languageService.createById(te.PLAINTEXT_LANGUAGE_ID)}}_getResult(Ee,Te){let _e;const Re=this._languageService.createById("json"),Le=Te.outputs.find(We=>We.outputId===Ee.outputId),Me=this.parseStreamOutput(Le);if(Me)return _e=Me,_e;const Oe=Te.outputs.map(We=>({metadata:We.metadata,outputItems:We.outputs.map(Xe=>({mimeType:Xe.mime,data:Xe.data.toString()}))}));return _e={content:(0,I.toFormattedString)(Oe,{}),mode:Re},_e}async provideOutputTextContent(Ee){const Te=this._modelService.getModel(Ee);if(Te)return Te;const _e=v.CellUri.parseCellOutputUri(Ee);if(!_e)return null;const Re=await this._notebookModelResolverService.resolve(_e.notebook),Le=Re.object.notebook.cells.find(Xe=>!!Xe.outputs.find(Je=>Je.outputId===_e.outputId));if(!Le)return Re.dispose(),null;const Me=this._getResult(_e,Le);if(!Me)return Re.dispose(),null;const Oe=this._modelService.createModel(Me.content,Me.mode,Ee),Ke=V.Event.any(Le.onDidChangeOutputs??V.Event.None,Le.onDidChangeOutputItems??V.Event.None)(()=>{const Xe=this._getResult(_e,Le);!Xe||(Oe.setValue(Xe.content),Oe.setMode(Xe.mode.languageId))}),We=Oe.onWillDispose(()=>{We.dispose(),Ke.dispose(),Re.dispose()});return Oe}};Ie=we([F(0,C.ITextModelService),F(1,b.IModelService),F(2,S.ILanguageService),F(3,X.ILabelService),F(4,D.INotebookEditorModelResolverService)],Ie);class ve extends p.Disposable{constructor(){super(),this.registerMetadataSchemas()}registerMetadataSchemas(){const Ee=l.Registry.as(B.Extensions.JSONContribution),Te={properties:{language:{type:"string",description:"The language for the cell"}},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0};Ee.registerSchema("vscode://schemas/notebook/cellmetadata",Te)}}let be=class{constructor(Ee,Te,_e,Re){this._editorService=Ee,this._notebookEditorModelService=Te,this._disposables=new p.DisposableStore,this._disposables.add(V.Event.debounce(this._notebookEditorModelService.onDidChangeDirty,(Le,Me)=>Le?[...Le,Me]:[Me],100)(this._openMissingDirtyNotebookEditors,this)),this._disposables.add(_e.onWillRemoveViewType(Le=>{for(const Me of Re.groups){const Oe=Me.editors.filter(Ke=>Ke instanceof o.NotebookEditorInput&&Ke.viewType===Le);Me.closeEditors(Oe)}})),this._disposables.add(Te.onWillFailWithConflict(Le=>{for(const Me of Re.groups){const Oe=Me.editors.filter(We=>We instanceof o.NotebookEditorInput&&We.viewType!==Le.viewType&&(0,A.isEqual)(We.resource,Le.resource)),Ke=Me.closeEditors(Oe);Le.waitUntil(Ke)}}))}dispose(){this._disposables.dispose()}_openMissingDirtyNotebookEditors(Ee){const Te=[];for(const _e of Ee)_e.isDirty()&&!this._editorService.isOpened({resource:_e.resource,typeId:o.NotebookEditorInput.ID,editorId:_e.viewType})&&_e.resource.scheme!==t.Schemas.vscodeInteractive&&Te.push({resource:_e.resource,options:{inactive:!0,preserveFocus:!0,pinned:!0,override:_e.viewType}});Te.length>0&&this._editorService.openEditors(Te)}};be=we([F(0,m.IEditorService),F(1,D.INotebookEditorModelResolverService),F(2,g.INotebookService),F(3,Q.IEditorGroupsService)],be);let ge=class extends p.Disposable{constructor(Ee,Te,_e){super(),this._instantiationService=Ee,this._workingCopyEditorService=Te,this._extensionService=_e,this._installHandler()}async _installHandler(){await this._extensionService.whenInstalledExtensionsRegistered(),this._register(this._workingCopyEditorService.registerHandler({handles:Ee=>typeof this._getViewType(Ee)=="string",isOpen:(Ee,Te)=>Te instanceof o.NotebookEditorInput&&Te.viewType===this._getViewType(Ee)&&(0,A.isEqual)(Ee.resource,Te.resource),createEditor:Ee=>o.NotebookEditorInput.create(this._instantiationService,Ee.resource,this._getViewType(Ee))}))}_getViewType(Ee){return v.NotebookWorkingCopyTypeIdentifier.parse(Ee.typeId)}};ge=we([F(0,c.IInstantiationService),F(1,$.IWorkingCopyEditorService),F(2,U.IExtensionService)],ge);let ue=class extends p.Disposable{constructor(Ee,Te,_e,Re){super(),this._instantiationService=Ee,this._workingCopyEditorService=Te,this._extensionService=_e,this._workingCopyBackupService=Re,this._installHandler()}async _installHandler(){await this._extensionService.whenInstalledExtensionsRegistered(),this._register(this._workingCopyEditorService.registerHandler({handles:Ee=>Ee.resource.scheme===t.Schemas.vscodeNotebook,isOpen:(Ee,Te)=>(0,o.isCompositeNotebookEditorInput)(Te)?!!Te.editorInputs.find(_e=>(0,A.isEqual)(E.URI.from({scheme:t.Schemas.vscodeNotebook,path:_e.resource.toString()}),Ee.resource)):Te instanceof o.NotebookEditorInput&&(0,A.isEqual)(E.URI.from({scheme:t.Schemas.vscodeNotebook,path:Te.resource.toString()}),Ee.resource),createEditor:async Ee=>{const Te=await this._workingCopyBackupService.resolve(Ee);if(!Te?.meta)throw new Error(`No backup found for Notebook editor: ${Ee.resource}`);return o.NotebookEditorInput.create(this._instantiationService,Ee.resource,Te.meta.viewType,{startDirty:!0})}}))}};ue=we([F(0,c.IInstantiationService),F(1,$.IWorkingCopyEditorService),F(2,U.IExtensionService),F(3,G.IWorkingCopyBackupService)],ue);let Ce=class{constructor(Ee,Te){this._notebookService=Ee,Te.setNotebookTypeResolver(this._getNotebookInfo.bind(this))}_getNotebookInfo(Ee){const Te=v.CellUri.parse(Ee);if(!Te)return;const _e=this._notebookService.getNotebookTextModel(Te.notebook);if(!!_e)return{uri:_e.uri,type:_e.viewType}}};Ce=we([F(0,g.INotebookService),F(1,ne.ILanguageFeaturesService)],Ce);const De=l.Registry.as(d.Extensions.Workbench);De.registerWorkbenchContribution(me,1),De.registerWorkbenchContribution(Se,1),De.registerWorkbenchContribution(Ie,1),De.registerWorkbenchContribution(ve,1),De.registerWorkbenchContribution(be,2),De.registerWorkbenchContribution(Ce,2),De.registerWorkbenchContribution(ge,2),De.registerWorkbenchContribution(ue,2),(0,f.registerSingleton)(g.INotebookService,h.NotebookService,1),(0,f.registerSingleton)(_.INotebookEditorWorkerService,L.NotebookEditorWorkerServiceImpl,1),(0,f.registerSingleton)(D.INotebookEditorModelResolverService,x.NotebookModelResolverServiceImpl,1),(0,f.registerSingleton)(M.INotebookCellStatusBarService,O.NotebookCellStatusBarService,1),(0,f.registerSingleton)(N.INotebookEditorService,P.NotebookEditorWidgetService,1),(0,f.registerSingleton)(H.INotebookKernelService,W.NotebookKernelService,1),(0,f.registerSingleton)(re.INotebookExecutionService,ie.NotebookExecutionService,1),(0,f.registerSingleton)(Z.INotebookExecutionStateService,ee.NotebookExecutionStateService,1),(0,f.registerSingleton)(K.INotebookRendererMessagingService,j.NotebookRendererMessagingService,1),(0,f.registerSingleton)(oe.INotebookKeymapService,se.NotebookKeymapService,1);const Ae={};function Pe(ke){return typeof ke.type<"u"||typeof ke.anyOf<"u"}for(const ke of Y.editorOptionsRegistry){const Ee=ke.schema;if(Ee)if(Pe(Ee))Ae[`editor.${ke.name}`]=Ee;else for(const Te in Ee)Object.hasOwnProperty.call(Ee,Te)&&(Ae[Te]=Ee[Te])}const fe={description:r.localize(0,null),default:{},allOf:[{properties:Ae}],tags:["notebookLayout"]};l.Registry.as(u.Extensions.Configuration).registerConfiguration({id:"notebook",order:100,title:r.localize(1,null),type:"object",properties:{[v.NotebookSetting.displayOrder]:{description:r.localize(2,null),type:"array",items:{type:"string"},default:[]},[v.NotebookSetting.cellToolbarLocation]:{description:r.localize(3,null),type:"object",additionalProperties:{markdownDescription:r.localize(4,null),type:"string",enum:["left","right","hidden"]},default:{default:"right"},tags:["notebookLayout"]},[v.NotebookSetting.showCellStatusBar]:{description:r.localize(5,null),type:"string",enum:["hidden","visible","visibleAfterExecute"],enumDescriptions:[r.localize(6,null),r.localize(7,null),r.localize(8,null)],default:"visible",tags:["notebookLayout"]},[v.NotebookSetting.textDiffEditorPreview]:{description:r.localize(9,null),type:"boolean",default:!0,tags:["notebookLayout"]},[v.NotebookSetting.cellToolbarVisibility]:{markdownDescription:r.localize(10,null),type:"string",enum:["hover","click"],default:"click",tags:["notebookLayout"]},[v.NotebookSetting.undoRedoPerCell]:{description:r.localize(11,null),type:"boolean",default:!0,tags:["notebookLayout"]},[v.NotebookSetting.compactView]:{description:r.localize(12,null),type:"boolean",default:!0,tags:["notebookLayout"]},[v.NotebookSetting.focusIndicator]:{description:r.localize(13,null),type:"string",enum:["border","gutter"],default:"gutter",tags:["notebookLayout"]},[v.NotebookSetting.insertToolbarLocation]:{description:r.localize(14,null),type:"string",enum:["betweenCells","notebookToolbar","both","hidden"],enumDescriptions:[r.localize(15,null),r.localize(16,null),r.localize(17,null),r.localize(18,null)],default:"both",tags:["notebookLayout"]},[v.NotebookSetting.globalToolbar]:{description:r.localize(19,null),type:"boolean",default:!0,tags:["notebookLayout"]},[v.NotebookSetting.consolidatedOutputButton]:{description:r.localize(20,null),type:"boolean",default:!0,tags:["notebookLayout"]},[v.NotebookSetting.showFoldingControls]:{description:r.localize(21,null),type:"string",enum:["always","never","mouseover"],enumDescriptions:[r.localize(22,null),r.localize(23,null),r.localize(24,null)],default:"mouseover",tags:["notebookLayout"]},[v.NotebookSetting.dragAndDropEnabled]:{description:r.localize(25,null),type:"boolean",default:!0,tags:["notebookLayout"]},[v.NotebookSetting.consolidatedRunButton]:{description:r.localize(26,null),type:"boolean",default:!1,tags:["notebookLayout"]},[v.NotebookSetting.globalToolbarShowLabel]:{description:r.localize(27,null),type:"string",enum:["always","never","dynamic"],default:"always",tags:["notebookLayout"]},[v.NotebookSetting.textOutputLineLimit]:{description:r.localize(28,null),type:"number",default:30,tags:["notebookLayout"]},[v.NotebookSetting.markupFontSize]:{markdownDescription:r.localize(29,null,"`0`","`#editor.fontSize#`"),type:"number",default:0,tags:["notebookLayout"]},[v.NotebookSetting.cellEditorOptionsCustomizations]:fe,[v.NotebookSetting.interactiveWindowCollapseCodeCells]:{markdownDescription:r.localize(30,null),type:"string",enum:["always","never","fromEditor"],default:"fromEditor"},[v.NotebookSetting.outputLineHeight]:{markdownDescription:r.localize(31,null),type:"number",default:22,tags:["notebookLayout"]},[v.NotebookSetting.outputFontSize]:{markdownDescription:r.localize(32,null,"`0`","`#editor.fontSize#`"),type:"number",default:0,tags:["notebookLayout"]},[v.NotebookSetting.outputFontFamily]:{markdownDescription:r.localize(33,null,"`#editor.fontFamily#`"),type:"string",tags:["notebookLayout"]}}})}),define(ae[2956],le([1,0,2070,11,32,2,60,8,156,57,43,107,1e3,400,136,22,851,34,19]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyHistoryTracker=void 0;let d=class bn extends A.Disposable{constructor(a,o,g,h,v,m,w,D){super(),this.workingCopyService=a,this.workingCopyHistoryService=o,this.uriIdentityService=g,this.pathService=h,this.configurationService=v,this.undoRedoService=m,this.contextService=w,this.fileService=D,this.limiter=this._register(new p.Limiter(u.MAX_PARALLEL_HISTORY_IO_OPS)),this.resourceExcludeMatcher=this._register(new p.IdleValue(()=>this._register(new c.ResourceGlobMatcher(T=>this.configurationService.getValue(bn.SETTINGS.EXCLUDES,{resource:T}),T=>T.affectsConfiguration(bn.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 o=a.resource,g=a.target.resource,h=await this.workingCopyHistoryService.moveEntries(o,g);for(const v of h){const m=this.getContentVersion(v);this.historyEntryContentVersion.set(v,m)}}onDidChangeContent(a){const o=this.getContentVersion(a.resource);this.workingCopyContentVersion.set(a.resource,o+1)}getContentVersion(a){return this.workingCopyContentVersion.get(a)||0}onDidSave(a){if(!this.shouldTrackHistoryFromSaveEvent(a))return;const o=this.getContentVersion(a.workingCopy.resource);if(this.historyEntryContentVersion.get(a.workingCopy.resource)===o)return;this.pendingAddHistoryEntryOperations.get(a.workingCopy.resource)?.dispose(!0);const g=new R.CancellationTokenSource;this.pendingAddHistoryEntryOperations.set(a.workingCopy.resource,g),this.limiter.queue(async()=>{if(g.token.isCancellationRequested)return;const h=this.getContentVersion(a.workingCopy.resource);let v=a.source;a.source||(v=this.resolveSourceFromUndoRedo(a)),await this.workingCopyHistoryService.addEntry({resource:a.workingCopy.resource,source:v,timestamp:a.stat.mtime},g.token),this.historyEntryContentVersion.set(a.workingCopy.resource,h),!g.token.isCancellationRequested&&this.pendingAddHistoryEntryOperations.delete(a.workingCopy.resource)})}resolveSourceFromUndoRedo(a){const o=this.undoRedoService.getLastElement(a.workingCopy.resource);if(o)return o.code==="undoredo.textBufferEdit"?void 0:o.label;const g=this.undoRedoService.getElements(a.workingCopy.resource);if(g.future.length>0||g.past.length>0)return bn.UNDO_REDO_SAVE_SOURCE}shouldTrackHistoryFromSaveEvent(a){return(0,r.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,o){if(a.scheme!==this.pathService.defaultUriScheme&&a.scheme!==f.Schemas.vscodeUserData&&a.scheme!==f.Schemas.inMemory)return!1;const g=1024*this.configurationService.getValue(bn.SETTINGS.SIZE_LIMIT,{resource:a});return o.size>g||this.configurationService.getValue(bn.SETTINGS.ENABLED,{resource:a})===!1?!1:!this.resourceExcludeMatcher.value.matches(a)}};d.SETTINGS={ENABLED:"workbench.localHistory.enabled",SIZE_LIMIT:"workbench.localHistory.maxFileSize",EXCLUDES:"workbench.localHistory.exclude"},d.UNDO_REDO_SAVE_SOURCE=S.SaveSourceRegistry.registerSource("undoRedo.source",(0,t.localize)(0,null)),d=we([F(0,i.IWorkingCopyService),F(1,u.IWorkingCopyHistoryService),F(2,b.IUriIdentityService),F(3,C.IPathService),F(4,E.IConfigurationService),F(5,I.IUndoRedoService),F(6,l.IWorkspaceContextService),F(7,s.IFileService)],d),e.WorkingCopyHistoryTracker=d}),define(ae[2957],le([1,0,2069,6,13,17,44,2956,2,400,19,104,9,11,18,51,108,164,32,60,57,49,56,25,43,8,16,28]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkingCopyHistoryService=e.WorkingCopyHistoryModel=void 0;class D{constructor(_,L,M,O,N,P,B,V,z,x,H){this.historyHome=L,this.entryAddedEmitter=M,this.entryChangedEmitter=O,this.entryReplacedEmitter=N,this.entryRemovedEmitter=P,this.options=B,this.fileService=V,this.labelService=z,this.logService=x,this.configurationService=H,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.versionId=0,this.storedVersionId=this.versionId,this.storeLimiter=new u.Limiter(1),this.setWorkingCopy(_)}setWorkingCopy(_){this.workingCopyResource=_,this.workingCopyName=this.labelService.getUriBasenameLabel(_),this.historyEntriesNameMatcher=new RegExp(`[A-Za-z0-9]{4}${(0,w.escapeRegExpCharacters)((0,i.extname)(_))}`),this.historyEntriesFolder=this.toHistoryEntriesFolder(this.historyHome,_),this.historyEntriesListingFile=(0,i.joinPath)(this.historyEntriesFolder,D.ENTRIES_FILE),this.entries=[],this.whenResolved=void 0}toHistoryEntriesFolder(_,L){return(0,i.joinPath)(_,(0,c.hash)(L.toString()).toString(16))}async addEntry(_=D.FILE_SAVED_SOURCE,L=Date.now(),M){let O;const N=(0,m.lastOrDefault)(this.entries);if(N&&N.source===_){const B=this.configurationService.getValue(D.SETTINGS.MERGE_PERIOD,{resource:this.workingCopyResource});L-N.timestamp<=B*1e3&&(O=N)}let P;return O?P=await this.doReplaceEntry(O,L,M):P=await this.doAddEntry(_,L,M),this.options.flushOnChange&&!M.isCancellationRequested&&await this.store(M),P}async doAddEntry(_,L,M){const O=(0,R.assertIsDefined)(this.workingCopyResource),N=(0,R.assertIsDefined)(this.workingCopyName),P=(0,R.assertIsDefined)(this.historyEntriesFolder),B=`${(0,l.randomPath)(void 0,void 0,4)}${(0,i.extname)(O)}`,V=(0,i.joinPath)(P,B);await this.fileService.cloneFile(O,V);const z={id:B,workingCopy:{resource:O,name:N},location:V,timestamp:L,source:_};return this.entries.push(z),this.versionId++,this.entryAddedEmitter.fire({entry:z}),z}async doReplaceEntry(_,L,M){const O=(0,R.assertIsDefined)(this.workingCopyResource);return await this.fileService.cloneFile(O,_.location),_.timestamp=L,this.versionId++,this.entryReplacedEmitter.fire({entry:_}),_}async removeEntry(_,L){if(await this.resolveEntriesOnce(),L.isCancellationRequested)return!1;const M=this.entries.indexOf(_);return M===-1?!1:(await this.deleteEntry(_),this.entries.splice(M,1),this.versionId++,this.entryRemovedEmitter.fire({entry:_}),this.options.flushOnChange&&!L.isCancellationRequested&&await this.store(L),!0)}async updateEntry(_,L,M){await this.resolveEntriesOnce(),!(M.isCancellationRequested||this.entries.indexOf(_)===-1)&&(_.source=L.source,this.versionId++,this.entryChangedEmitter.fire({entry:_}),this.options.flushOnChange&&!M.isCancellationRequested&&await this.store(M))}async getEntries(){await this.resolveEntriesOnce();const _=this.configurationService.getValue(D.SETTINGS.MAX_ENTRIES,{resource:this.workingCopyResource});return this.entries.length>_?this.entries.slice(this.entries.length-_):this.entries}async hasEntries(_){return _||await this.resolveEntriesOnce(),this.entries.length>0}resolveEntriesOnce(){return this.whenResolved||(this.whenResolved=this.doResolveEntries()),this.whenResolved}async doResolveEntries(){const _=await this.resolveEntriesFromDisk();for(const L of this.entries)_.set(L.id,L);this.entries=Array.from(_.values()).sort((L,M)=>L.timestamp-M.timestamp)}async resolveEntriesFromDisk(){const _=(0,R.assertIsDefined)(this.workingCopyResource),L=(0,R.assertIsDefined)(this.workingCopyName),[M,O]=await Promise.all([this.readEntriesFile(),this.readEntriesFolder()]),N=new Map;if(O)for(const P of O)N.set(P.name,{id:P.name,workingCopy:{resource:_,name:L},location:P.resource,timestamp:P.mtime,source:D.FILE_SAVED_SOURCE});if(M)for(const P of M.entries){const B=N.get(P.id);B&&N.set(P.id,{...B,timestamp:P.timestamp,source:P.source??B.source})}return N}async moveEntries(_,L,M){if(await this.store(M),M.isCancellationRequested)return;const O=(0,R.assertIsDefined)(this.historyEntriesFolder),N=this.toHistoryEntriesFolder(this.historyHome,_);try{await this.fileService.move(O,N,!0)}catch(P){P instanceof S.FileOperationError&&P.fileOperationResult===1||this.traceError(P)}this.setWorkingCopy(_),await this.addEntry(L,void 0,M),await this.store(M)}async store(_){!this.shouldStore()||await this.storeLimiter.queue(async()=>{if(!(_.isCancellationRequested||!this.shouldStore()))return this.doStore(_)})}shouldStore(){return this.storedVersionId!==this.versionId}async doStore(_){const L=(0,R.assertIsDefined)(this.historyEntriesFolder);if(await this.resolveEntriesOnce(),_.isCancellationRequested)return;await this.cleanUpEntries();const M=this.versionId;if(this.entries.length===0)try{await this.fileService.del(L,{recursive:!0})}catch(O){this.traceError(O)}else await this.writeEntriesFile();this.storedVersionId=M}async cleanUpEntries(){const _=this.configurationService.getValue(D.SETTINGS.MAX_ENTRIES,{resource:this.workingCopyResource});if(this.entries.length<=_)return;const L=this.entries.slice(0,this.entries.length-_),M=this.entries.slice(this.entries.length-_);for(const O of L)await this.deleteEntry(O);this.entries=M;for(const O of L)this.entryRemovedEmitter.fire({entry:O})}async deleteEntry(_){try{await this.fileService.del(_.location)}catch(L){this.traceError(L)}}async writeEntriesFile(){const _=(0,R.assertIsDefined)(this.workingCopyResource),L=(0,R.assertIsDefined)(this.historyEntriesListingFile),M={version:1,resource:_.toString(),entries:this.entries.map(O=>({id:O.id,source:O.source!==D.FILE_SAVED_SOURCE?O.source:void 0,timestamp:O.timestamp}))};await this.fileService.writeFile(L,o.VSBuffer.fromString(JSON.stringify(M)))}async readEntriesFile(){const _=(0,R.assertIsDefined)(this.historyEntriesListingFile);let L;try{L=JSON.parse((await this.fileService.readFile(_)).value.toString())}catch(M){M instanceof S.FileOperationError&&M.fileOperationResult===1||this.traceError(M)}return L}async readEntriesFolder(){const _=(0,R.assertIsDefined)(this.historyEntriesFolder),L=(0,R.assertIsDefined)(this.historyEntriesNameMatcher);let M;try{M=(await this.fileService.resolve(_,{resolveMetadata:!0})).children}catch(O){O instanceof S.FileOperationError&&O.fileOperationResult===1||this.traceError(O)}if(!!M)return M.filter(O=>!(0,i.isEqual)(O.resource,this.historyEntriesListingFile)&&L.test(O.name))}traceError(_){this.logService.trace("[Working Copy History Service]",_)}}e.WorkingCopyHistoryModel=D,D.ENTRIES_FILE="entries.json",D.FILE_SAVED_SOURCE=h.SaveSourceRegistry.registerSource("default.source",(0,t.localize)(0,null)),D.SETTINGS={MAX_ENTRIES:"workbench.localHistory.maxFileEntries",MERGE_PERIOD:"workbench.localHistory.mergeWindow"};let y=class fo extends I.Disposable{constructor(_,L,M,O,N,P,B){super(),this.fileService=_,this.remoteAgentService=L,this.environmentService=M,this.uriIdentityService=O,this.labelService=N,this.logService=P,this.configurationService=B,this._onDidAddEntry=this._register(new p.Emitter),this.onDidAddEntry=this._onDidAddEntry.event,this._onDidChangeEntry=this._register(new p.Emitter),this.onDidChangeEntry=this._onDidChangeEntry.event,this._onDidReplaceEntry=this._register(new p.Emitter),this.onDidReplaceEntry=this._onDidReplaceEntry.event,this._onDidMoveEntries=this._register(new p.Emitter),this.onDidMoveEntries=this._onDidMoveEntries.event,this._onDidRemoveEntry=this._register(new p.Emitter),this.onDidRemoveEntry=this._onDidRemoveEntry.event,this._onDidRemoveEntries=this._register(new p.Emitter),this.onDidRemoveEntries=this._onDidRemoveEntries.event,this.localHistoryHome=new u.DeferredPromise,this.models=new d.ResourceMap(V=>this.uriIdentityService.extUri.getComparisonKey(V)),this.resolveLocalHistoryHome()}async resolveLocalHistoryHome(){let _;try{const L=await this.remoteAgentService.getEnvironment();L&&(_=L.localHistoryHome)}catch(L){this.logService.trace(L)}_||(_=this.environmentService.localHistoryHome),this.localHistoryHome.complete(_)}async moveEntries(_,L){const M=new u.Limiter(b.MAX_PARALLEL_HISTORY_IO_OPS),O=[];for(const[P,B]of this.models){if(!this.uriIdentityService.extUri.isEqualOrParent(P,_))continue;let V;if(this.uriIdentityService.extUri.isEqual(_,P))V=L;else{const x=(0,l.indexOfPath)(P.path,_.path);V=(0,i.joinPath)(L,P.path.substr(x+_.path.length+1))}let z;this.uriIdentityService.extUri.isEqual((0,i.dirname)(P),(0,i.dirname)(V))?z=fo.FILE_RENAMED_SOURCE:z=fo.FILE_MOVED_SOURCE,O.push(M.queue(()=>this.doMoveEntries(B,z,P,V)))}if(!O.length)return[];const N=await Promise.all(O);return this._onDidMoveEntries.fire(),N}async doMoveEntries(_,L,M,O){return await _.moveEntries(O,L,s.CancellationToken.None),this.models.delete(M),this.models.set(O,_),O}async addEntry({resource:_,source:L,timestamp:M},O){if(!this.fileService.hasProvider(_))return;const N=await this.getModel(_);if(!O.isCancellationRequested)return N.addEntry(L,M,O)}async updateEntry(_,L,M){const O=await this.getModel(_.workingCopy.resource);if(!M.isCancellationRequested)return O.updateEntry(_,L,M)}async removeEntry(_,L){const M=await this.getModel(_.workingCopy.resource);return L.isCancellationRequested?!1:M.removeEntry(_,L)}async removeAll(_){const L=await this.localHistoryHome.p;_.isCancellationRequested||(this.models.clear(),await this.fileService.del(L,{recursive:!0}),this._onDidRemoveEntries.fire())}async getEntries(_,L){const M=await this.getModel(_);return L.isCancellationRequested?[]:await M.getEntries()??[]}async getAll(_){const L=await this.localHistoryHome.p;if(_.isCancellationRequested)return[];const M=new d.ResourceMap;for(const[O,N]of this.models)await N.hasEntries(!0)&&M.set(O,!0);try{const O=await this.fileService.resolve(L);if(O.children){const N=new u.Limiter(b.MAX_PARALLEL_HISTORY_IO_OPS),P=[];for(const B of O.children)P.push(N.queue(async()=>{if(!_.isCancellationRequested)try{const V=JSON.parse((await this.fileService.readFile((0,i.joinPath)(B.resource,D.ENTRIES_FILE))).value.toString());V.entries.length>0&&M.set(r.URI.parse(V.resource),!0)}catch{}}));await Promise.all(P)}}catch{}return Array.from(M.keys())}async getModel(_){const L=await this.localHistoryHome.p;let M=this.models.get(_);return M||(M=new D(_,L,this._onDidAddEntry,this._onDidChangeEntry,this._onDidReplaceEntry,this._onDidRemoveEntry,this.getModelOptions(),this.fileService,this.labelService,this.logService,this.configurationService),this.models.set(_,M)),M}};y.FILE_MOVED_SOURCE=h.SaveSourceRegistry.registerSource("moved.source",(0,t.localize)(1,null)),y.FILE_RENAMED_SOURCE=h.SaveSourceRegistry.registerSource("renamed.source",(0,t.localize)(2,null)),y=we([F(0,S.IFileService),F(1,C.IRemoteAgentService),F(2,f.IWorkbenchEnvironmentService),F(3,n.IUriIdentityService),F(4,a.ILabelService),F(5,g.ILogService),F(6,v.IConfigurationService)],y),e.WorkingCopyHistoryService=y,A.Registry.as(k.Extensions.Workbench).registerWorkbenchContribution(E.WorkingCopyHistoryTracker,3)}),define(ae[2958],le([1,0,2072,170,157,136,69,47,68,34,14,19,89,2895,25,24,81,32,66,11,262,58]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkingCopyBackupTracker=void 0;let o=class extends u.WorkingCopyBackupTracker{constructor(h,v,m,w,D,y,T,_,L,M,O,N,P,B){super(h,m,L,w,v,N,P,B),this.fileDialogService=D,this.dialogService=y,this.contextService=T,this.nativeHostService=_,this.environmentService=M,this.progressService=O}async onFinalBeforeShutdown(h){this.cancelBackupOperations();const{resume:v}=this.suspendBackupOperations();try{const m=this.workingCopyService.dirtyWorkingCopies;return m.length?await this.onBeforeShutdownWithDirty(h,m):await this.onBeforeShutdownWithoutDirty()}finally{v()}}async onBeforeShutdownWithDirty(h,v){if(this.filesConfigurationService.getAutoSaveMode()!==0){try{await this.doSaveAllBeforeShutdown(!1,2)}catch(w){this.logService.error(`[backup tracker] error saving dirty working copies: ${w}`)}const m=this.workingCopyService.dirtyWorkingCopies;return m.length?this.handleDirtyBeforeShutdown(m,h):!1}return this.handleDirtyBeforeShutdown(v,h)}async handleDirtyBeforeShutdown(h,v){let m=[],w;if(await this.shouldBackupBeforeShutdown(v))try{const T=await this.backupBeforeShutdown(h);if(m=T.backups,w=T.error,m.length===h.length)return!1}catch(T){w=T}const y=h.filter(T=>!m.includes(T));if(w)return this.environmentService.isExtensionDevelopment?(this.logService.error(`[backup tracker] error creating backups: ${w}`),!1):(this.showErrorDialog((0,t.localize)(0,null),y,w),!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(h){let v;if(!this.filesConfigurationService.isHotExitEnabled)v=!1;else if(this.environmentService.isExtensionDevelopment)v=!0;else switch(h){case 1:this.contextService.getWorkbenchState()!==1&&this.filesConfigurationService.hotExitConfiguration===C.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?v=!0:await this.nativeHostService.getWindowCount()>1||S.isMacintosh?v=!1:v=!0;break;case 2:v=!0;break;case 3:v=!0;break;case 4:this.contextService.getWorkbenchState()!==1&&this.filesConfigurationService.hotExitConfiguration===C.HotExitConfiguration.ON_EXIT_AND_WINDOW_CLOSE?v=!0:v=!1;break}return v}showErrorDialog(h,v,m){const w=v.filter(T=>T.isDirty()),D=(0,t.localize)(2,null),y=w.length?(0,E.getFileNamesMessage)(w.map(T=>T.name))+` `+D:D;this.dialogService.show(I.default.Error,h,void 0,{detail:y}),this.logService.error(m?`[backup tracker] ${h}: ${m}`:`[backup tracker] ${h}`)}async backupBeforeShutdown(h){const v=[];let m;return await this.withProgressAndCancellation(async w=>{try{await d.Promises.settled(h.map(async D=>{const y=this.getContentVersion(D);if(this.workingCopyBackupService.hasBackupSync(D,y))v.push(D);else{const T=await D.backup(w);if(w.isCancellationRequested||(await this.workingCopyBackupService.backup(D,T.content,y,T.meta,w),w.isCancellationRequested))return;v.push(D)}}))}catch(D){m=D}},(0,t.localize)(3,null),(0,t.localize)(4,null)),{backups:v,error:m}}async confirmBeforeShutdown(h){const v=await this.fileDialogService.showSaveConfirm(h.map(m=>m.name));if(v===0){const m=this.workingCopyService.dirtyCount;try{await this.doSaveAllBeforeShutdown(h,1)}catch(D){this.logService.error(`[backup tracker] error saving dirty working copies: ${D}`)}return m-this.workingCopyService.dirtyCount<h.length?!0:this.noVeto(h)}else if(v===1){try{await this.doRevertAllBeforeShutdown(h)}catch(m){this.logService.error(`[backup tracker] error reverting dirty working copies: ${m}`)}return this.noVeto(h)}return!0}doSaveAllBeforeShutdown(h,v){const m=Array.isArray(h)?h:this.workingCopyService.dirtyWorkingCopies.filter(w=>!(h===!1&&w.capabilities&2));return this.withProgressAndCancellation(async()=>{const w={skipSaveParticipants:!0,reason:v};let D;(typeof h=="boolean"||m.length===this.workingCopyService.dirtyCount)&&(D=await this.editorService.saveAll({includeUntitled:typeof h=="boolean"?h:!0,...w})),D!==!1&&await d.Promises.settled(m.map(y=>y.isDirty()?y.save(w):Promise.resolve(!0)))},(0,t.localize)(5,null))}doRevertAllBeforeShutdown(h){return this.withProgressAndCancellation(async()=>{const v={soft:!0};h.length===this.workingCopyService.dirtyCount&&await this.editorService.revertAll(v),await d.Promises.settled(h.map(m=>m.isDirty()?m.revert(v):Promise.resolve()))},(0,t.localize)(6,null))}async noVeto(h){return await this.discardBackupsBeforeShutdown(h),!1}async onBeforeShutdownWithoutDirty(){return await this.discardBackupsBeforeShutdown({except:this.contextService.getWorkbenchState()===1?[]:Array.from(this.unrestoredBackups)}),!1}async discardBackupsBeforeShutdown(h){!this.isReady||await this.withProgressAndCancellation(async()=>{try{Array.isArray(h)?await d.Promises.settled(h.map(v=>this.workingCopyBackupService.discardBackup(v))):await this.workingCopyBackupService.discardBackups(h)}catch(v){this.logService.error(`[backup tracker] error discarding backups: ${v}`)}},(0,t.localize)(7,null))}withProgressAndCancellation(h,v,m){const w=new l.CancellationTokenSource;return this.progressService.withProgress({location:20,cancellable:!0,delay:800,title:v,detail:m},()=>(0,d.raceCancellation)(h(w.token),w.token),()=>w.dispose(!0))}};o=we([F(0,p.IWorkingCopyBackupService),F(1,R.IFilesConfigurationService),F(2,A.IWorkingCopyService),F(3,k.ILifecycleService),F(4,E.IFileDialogService),F(5,E.IDialogService),F(6,b.IWorkspaceContextService),F(7,r.INativeHostService),F(8,i.ILogService),F(9,c.IEnvironmentService),F(10,s.IProgressService),F(11,n.IWorkingCopyEditorService),F(12,f.IEditorService),F(13,a.IEditorGroupsService)],o),e.NativeWorkingCopyBackupTracker=o}),define(ae[2959],le([1,0,2071,989,9,35,170,19,25,128,17,44,69,2958]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkingCopyBackupService=void 0;let i=class extends p.WorkingCopyBackupService{constructor(c,l,s,d){super(c.backupPath?R.URI.file(c.backupPath).with({scheme:c.userRoamingDataHome.scheme}):void 0,l,s),this.lifecycleService=d,this.registerListeners()}registerListeners(){this.lifecycleService.onWillShutdown(c=>c.join(this.joinBackups(),{id:"join.workingCopyBackups",label:(0,t.localize)(0,null)}))}};i=we([F(0,b.INativeWorkbenchEnvironmentService),F(1,E.IFileService),F(2,I.ILogService),F(3,r.ILifecycleService)],i),e.NativeWorkingCopyBackupService=i,(0,A.registerSingleton)(k.IWorkingCopyBackupService,i,0),S.Registry.as(C.Extensions.Workbench).registerWorkbenchContribution(u.NativeWorkingCopyBackupTracker,1)}),define(ae[2960],le([1,0,2073,6,11,69,19,104,51,57,49,25,8,2957,35,400,32]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NativeWorkingCopyHistoryService=void 0;let l=class Ic extends u.WorkingCopyHistoryService{constructor(d,n,a,o,g,h,v,m){super(d,n,a,o,g,v,m),this.lifecycleService=h,this.isRemotelyStored=typeof this.environmentService.remoteAuthority=="string",this.storeAllCts=this._register(new c.CancellationTokenSource),this.storeAllScheduler=this._register(new R.RunOnceScheduler(()=>this.storeAll(this.storeAllCts.token),Ic.STORE_ALL_INTERVAL)),this.registerListeners()}registerListeners(){this.isRemotelyStored||(this.lifecycleService.onWillShutdown(d=>this.onWillShutdown(d)),this._register(p.Event.any(this.onDidAddEntry,this.onDidChangeEntry,this.onDidReplaceEntry,this.onDidRemoveEntry)(()=>this.onDidChangeModels())))}getModelOptions(){return{flushOnChange:this.isRemotelyStored}}onWillShutdown(d){this.storeAllScheduler.dispose(),this.storeAllCts.dispose(!0),d.join(this.storeAll(d.token),{id:"join.workingCopyHistory",label:(0,t.localize)(0,null)})}onDidChangeModels(){this.storeAllScheduler.isScheduled()||this.storeAllScheduler.schedule()}async storeAll(d){const n=new R.Limiter(f.MAX_PARALLEL_HISTORY_IO_OPS),a=[],o=Array.from(this.models.values());for(const g of o)a.push(n.queue(async()=>{if(!d.isCancellationRequested)try{await g.store(d)}catch(h){this.logService.trace(h)}}));await Promise.all(a)}};l.STORE_ALL_INTERVAL=5*60*1e3,l=we([F(0,k.IFileService),F(1,E.IRemoteAgentService),F(2,I.IWorkbenchEnvironmentService),F(3,b.IUriIdentityService),F(4,S.ILabelService),F(5,A.ILifecycleService),F(6,C.ILogService),F(7,r.IConfigurationService)],l),e.NativeWorkingCopyHistoryService=l,(0,i.registerSingleton)(f.IWorkingCopyHistoryService,l,1)}),define(ae[2961],le([1,0,2074,34,272,200,55,17,31,16,18,26,19,51,47,130,78,74,22,57,118,176,103,135]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractWorkspaceEditingService=void 0;let h=class{constructor(m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H){this.jsonEditingService=m,this.contextService=w,this.configurationService=D,this.notificationService=y,this.commandService=T,this.fileService=_,this.textFileService=L,this.workspacesService=M,this.environmentService=O,this.fileDialogService=N,this.dialogService=P,this.hostService=B,this.uriIdentityService=V,this.workspaceTrustManagementService=z,this.userDataProfilesService=x,this.userDataProfileService=H}async pickNewWorkspacePath(){const m=[s.Schemas.file];this.environmentService.remoteAuthority&&m.unshift(s.Schemas.vscodeRemote);let w=await this.fileDialogService.showSaveDialog({saveLabel:(0,f.mnemonicButtonLabel)((0,t.localize)(0,null)),title:(0,t.localize)(1,null),filters:p.WORKSPACE_FILTER,defaultUri:(0,S.joinPath)(await this.fileDialogService.defaultWorkspacePath(),this.getNewWorkspaceName()),availableFileSystems:m});if(!!w)return(0,p.hasWorkspaceFileExtension)(w)||(w=w.with({path:`${w.path}.${p.WORKSPACE_EXTENSION}`})),w}getNewWorkspaceName(){const m=this.getCurrentWorkspaceIdentifier()?.configPath;if(m&&(0,p.isSavedWorkspace)(m,this.environmentService))return(0,S.basename)(m);const w=(0,b.firstOrDefault)(this.contextService.getWorkspace().folders);return w?`${(0,S.basename)(w.uri)}.${p.WORKSPACE_EXTENSION}`:`workspace.${p.WORKSPACE_EXTENSION}`}async updateFolders(m,w,D,y){const T=this.contextService.getWorkspace().folders;let _=[];typeof w=="number"&&(_=T.slice(m,m+w).map(N=>N.uri));let L=[];Array.isArray(D)&&(L=D.map(N=>({uri:(0,S.removeTrailingPathSeparator)(N.uri),name:N.name})));const M=_.length>0,O=L.length>0;if(!(!O&&!M))return O&&!M?this.doAddFolders(L,m,y):M&&!O?this.removeFolders(_):this.includesSingleFolderWorkspace(_)?this.createAndEnterWorkspace(L):this.contextService.getWorkbenchState()!==3?this.doAddFolders(L,m,y):this.doUpdateFolders(L,_,m,y)}async doUpdateFolders(m,w,D,y=!1){try{await this.contextService.updateFolders(m,w,D)}catch(T){if(y)throw T;this.handleWorkspaceConfigurationEditingError(T)}}addFolders(m,w=!1){const D=m.map(y=>({uri:(0,S.removeTrailingPathSeparator)(y.uri),name:y.name}));return this.doAddFolders(D,void 0,w)}async doAddFolders(m,w,D=!1){const y=this.contextService.getWorkbenchState(),T=this.environmentService.remoteAuthority;if(T&&(m=m.filter(_=>_.uri.scheme!==s.Schemas.file&&(_.uri.scheme!==s.Schemas.vscodeRemote||(0,S.isEqualAuthority)(_.uri.authority,T)))),y!==3){let _=this.contextService.getWorkspace().folders.map(L=>({uri:L.uri}));return _.splice(typeof w=="number"?w:_.length,0,...m),_=(0,b.distinct)(_,L=>this.uriIdentityService.extUri.getComparisonKey(L.uri)),y===1&&_.length===0||y===2&&_.length===1?void 0:this.createAndEnterWorkspace(_)}try{await this.contextService.addFolders(m,w)}catch(_){if(D)throw _;this.handleWorkspaceConfigurationEditingError(_)}}async removeFolders(m,w=!1){if(this.includesSingleFolderWorkspace(m))return this.createAndEnterWorkspace([]);try{await this.contextService.removeFolders(m)}catch(D){if(w)throw D;this.handleWorkspaceConfigurationEditingError(D)}}includesSingleFolderWorkspace(m){if(this.contextService.getWorkbenchState()===2){const w=this.contextService.getWorkspace().folders[0];return m.some(D=>this.uriIdentityService.extUri.isEqual(D,w.uri))}return!1}async createAndEnterWorkspace(m,w){if(w&&!await this.isValidTargetWorkspacePath(w))return;const D=this.environmentService.remoteAuthority,y=await this.workspacesService.createUntitledWorkspace(m,D);if(w)try{await this.saveWorkspaceAs(y,w)}finally{await this.workspacesService.deleteUntitledWorkspace(y)}else w=y.configPath,this.userDataProfileService.currentProfile.isDefault||await this.userDataProfilesService.setProfileForWorkspace(y,this.userDataProfileService.currentProfile);return this.enterWorkspace(w)}async saveAndEnterWorkspace(m){const w=this.getCurrentWorkspaceIdentifier();if(!!w){if((0,S.isEqual)(w.configPath,m))return this.saveWorkspace(w);if(!!await this.isValidTargetWorkspacePath(m))return await this.saveWorkspaceAs(w,m),this.enterWorkspace(m)}}async isValidTargetWorkspacePath(m){return!0}async saveWorkspaceAs(m,w){const D=m.configPath;if(!(0,p.isUntitledWorkspace)(w,this.environmentService)&&!this.userDataProfileService.currentProfile.isDefault){const M=await this.workspacesService.getWorkspaceIdentifier(w);await this.userDataProfilesService.setProfileForWorkspace(M,this.userDataProfileService.currentProfile)}if(this.uriIdentityService.extUri.isEqual(D,w))return;const T=(0,p.isUntitledWorkspace)(D,this.environmentService),_=await this.fileService.readFile(D),L=(0,A.rewriteWorkspaceFileForNewLocation)(_.value.toString(),D,T,w,this.uriIdentityService.extUri);await this.textFileService.create([{resource:w,value:L,options:{overwrite:!0}}]),await this.trustWorkspaceConfiguration(w)}async saveWorkspace(m){const w=m.configPath,D=this.textFileService.files.get(w);if(D){await D.save({force:!0,reason:1});return}if(await this.fileService.exists(w))return;const T={folders:[]},_=(0,A.rewriteWorkspaceFileForNewLocation)(JSON.stringify(T,null," "),w,!1,w,this.uriIdentityService.extUri);await this.textFileService.create([{resource:w,value:_}])}handleWorkspaceConfigurationEditingError(m){switch(m.code){case 1:this.onInvalidWorkspaceConfigurationFileError();break;case 0:this.onWorkspaceConfigurationFileDirtyError();break;default:this.notificationService.error(m.message)}}onInvalidWorkspaceConfigurationFileError(){const m=(0,t.localize)(2,null);this.askToOpenWorkspaceConfigurationFile(m)}onWorkspaceConfigurationFileDirtyError(){const m=(0,t.localize)(3,null);this.askToOpenWorkspaceConfigurationFile(m)}askToOpenWorkspaceConfigurationFile(m){this.notificationService.prompt(C.Severity.Error,m,[{label:(0,t.localize)(4,null),run:()=>this.commandService.executeCommand("workbench.action.openWorkspaceConfigFile")}])}async doEnterWorkspace(m){if(this.environmentService.extensionTestsLocationURI)throw new Error("Entering a new workspace is not possible in tests.");const w=await this.workspacesService.getWorkspaceIdentifier(m);return this.contextService.getWorkbenchState()===2&&await this.migrateWorkspaceSettings(w),await this.configurationService.initialize(w),this.workspacesService.enterWorkspace(m)}migrateWorkspaceSettings(m){return this.doCopyWorkspaceSettings(m,w=>w.scope===3)}copyWorkspaceSettings(m){return this.doCopyWorkspaceSettings(m)}doCopyWorkspaceSettings(m,w){const D=E.Registry.as(k.Extensions.Configuration).getConfigurationProperties(),y={};for(const T of this.configurationService.keys().workspace)if(D[T]){if(w&&!w(D[T]))continue;y[T]=this.configurationService.inspect(T).workspaceValue}return this.jsonEditingService.write(m.configPath,[{path:["settings"],value:y}],!0)}async trustWorkspaceConfiguration(m){this.contextService.getWorkbenchState()!==1&&this.workspaceTrustManagementService.isWorkspaceTrusted()&&await this.workspaceTrustManagementService.setUrisTrust([m],!0)}getCurrentWorkspaceIdentifier(){const m=this.contextService.getWorkspace();if(m?.configuration)return{id:m.id,configPath:m.configuration}}};h=we([F(0,R.IJSONEditingService),F(1,p.IWorkspaceContextService),F(2,a.IWorkbenchConfigurationService),F(3,C.INotificationService),F(4,I.ICommandService),F(5,r.IFileService),F(6,c.ITextFileService),F(7,A.IWorkspacesService),F(8,u.IWorkbenchEnvironmentService),F(9,i.IFileDialogService),F(10,i.IDialogService),F(11,l.IHostService),F(12,d.IUriIdentityService),F(13,n.IWorkspaceTrustManagementService),F(14,o.IUserDataProfilesService),F(15,g.IUserDataProfileService)],h),e.AbstractWorkspaceEditingService=h}),define(ae[2962],le([1,0,22,9,2075,186]),function(J,e,t,p,R,A){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceTrustEditorInput=void 0;class k extends A.EditorInput{constructor(){super(...arguments),this.resource=p.URI.from({scheme:t.Schemas.vscodeWorkspaceTrust,path:"workspaceTrustEditor"})}get capabilities(){return 10}get typeId(){return k.ID}matches(I){return super.matches(I)||I instanceof k}getName(){return(0,R.localize)(0,null)}}e.WorkspaceTrustEditorInput=k,k.ID="workbench.input.workspaceTrust"}),define(ae[2963],le([1,0,2,35,25,618,39]),function(J,e,t,p,R,A,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditSessionIdentityService=void 0;let E=class{constructor(b,S){this._extensionService=b,this._logService=S,this._editSessionIdentifierProviders=new Map}registerEditSessionIdentityProvider(b){if(this._editSessionIdentifierProviders.get(b.scheme))throw new Error(`A provider has already been registered for scheme ${b.scheme}`);return this._editSessionIdentifierProviders.set(b.scheme,b),(0,t.toDisposable)(()=>{this._editSessionIdentifierProviders.delete(b.scheme)})}async getEditSessionIdentifier(b,S){const{scheme:C}=b.uri,r=await this.activateProvider(C);return this._logService.trace(`EditSessionIdentityProvider for scheme ${C} available: ${!!r}`),r?.getEditSessionIdentifier(b,S.token)}async provideEditSessionIdentityMatch(b,S,C,r){const{scheme:u}=b.uri,i=await this.activateProvider(u);return this._logService.trace(`EditSessionIdentityProvider for scheme ${u} available: ${!!i}`),i?.provideEditSessionIdentityMatch?.(b,S,C,r.token)}async activateProvider(b){const S=b==="vscode-remote"?"file":b,C=this._editSessionIdentifierProviders.get(b);return C||(await this._extensionService.activateByEvent(`onEditSession:${S}`),this._editSessionIdentifierProviders.get(b))}};E=we([F(0,k.IExtensionService),F(1,R.ILogService)],E),e.EditSessionIdentityService=E,(0,p.registerSingleton)(A.IEditSessionIdentityService,E,1)}),define(ae[296],le([1,0,5]),function(J,e,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceEditingService=void 0,e.IWorkspaceEditingService=(0,t.createDecorator)("workspaceEditingService")}),define(ae[2964],le([1,0,21,2,14,13,9,1459,81,19,5,49,26,172,118,34,77,684,351,24,203,296,67,618]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MainThreadWorkspace=void 0;let h=class{constructor(m,w,D,y,T,_,L,M,O,N,P,B,V,z){this._searchService=w,this._contextService=D,this._editSessionIdentityService=y,this._editorService=T,this._workspaceEditingService=_,this._notificationService=L,this._requestService=M,this._instantiationService=O,this._labelService=N,this._environmentService=P,this._workspaceTrustManagementService=V,this._workspaceTrustRequestService=z,this._toDispose=new p.DisposableStore,this._activeCancelTokens=Object.create(null),this._queryBuilder=this._instantiationService.createInstance(s.QueryBuilder),this.registeredEditSessionProviders=new Map,this._proxy=m.getProxy(o.ExtHostContext.ExtHostWorkspace);const x=this._contextService.getWorkspace();x.configuration&&!R.isNative&&!B.hasProvider(x.configuration)?this._proxy.$initializeWorkspace(this.getWorkspaceData(x),this.isWorkspaceTrusted()):this._contextService.getCompleteWorkspace().then(H=>this._proxy.$initializeWorkspace(this.getWorkspaceData(H),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(const m in this._activeCancelTokens)this._activeCancelTokens[m].cancel()}$updateWorkspaceFolders(m,w,D,y){const T=y.map(_=>({uri:k.URI.revive(_.uri),name:_.name}));return this._notificationService.status(this.getStatusMessage(m,T.length,D),{hideAfter:10*1e3}),this._workspaceEditingService.updateFolders(w,D,T,!0)}getStatusMessage(m,w,D){let y;const T=w>0,_=D>0;return T&&!_?w===1?y=(0,E.localize)(0,null,m):y=(0,E.localize)(1,null,m,w):_&&!T?D===1?y=(0,E.localize)(2,null,m):y=(0,E.localize)(3,null,m,D):y=(0,E.localize)(4,null,m),y}_onDidChangeWorkspace(){this._proxy.$acceptWorkspaceData(this.getWorkspaceData(this._contextService.getWorkspace()))}getWorkspaceData(m){return this._contextService.getWorkbenchState()===1?null:{configuration:m.configuration||void 0,isUntitled:m.configuration?(0,f.isUntitledWorkspace)(m.configuration,this._environmentService):!1,folders:m.folders,id:m.id,name:this._labelService.getWorkspaceLabel(m),transient:m.transient}}$startFileSearch(m,w,D,y,T){const _=k.URI.revive(w),L=this._contextService.getWorkspace();if(!L.folders.length)return Promise.resolve(null);const M=this._queryBuilder.file(_?[_]:L.folders,{maxResults:(0,A.withNullAsUndefined)(y),disregardExcludeSettings:D===!1||void 0,disregardSearchExcludeSettings:!0,disregardIgnoreFiles:!0,includePattern:(0,A.withNullAsUndefined)(m),excludePattern:typeof D=="string"?D:void 0,_reason:"startFileSearch"});return this._searchService.fileSearch(M,T).then(O=>O.results.map(N=>N.resource),O=>(0,t.isCancellationError)(O)?null:Promise.reject(O))}$startTextSearch(m,w,D,y,T){const _=k.URI.revive(w),L=this._contextService.getWorkspace(),M=_?[_]:L.folders.map(B=>B.uri),O=this._queryBuilder.text(m,M,D);O._reason="startTextSearch";const N=B=>{B.results&&this._proxy.$handleTextSearchResult(B,y)};return this._searchService.textSearch(O,T,N).then(B=>({limitHit:B.limitHit}),B=>(0,t.isCancellationError)(B)?null:Promise.reject(B))}$checkExists(m,w,D){return this._instantiationService.invokeFunction(y=>(0,l.checkGlobFileExists)(y,m,w,D))}$saveAll(m){return this._editorService.saveAll({includeUntitled:m})}$resolveProxy(m){return this._requestService.resolveProxy(m)}$requestWorkspaceTrust(m){return this._workspaceTrustRequestService.requestWorkspaceTrust(m)}isWorkspaceTrusted(){return this._workspaceTrustManagementService.isWorkspaceTrusted()}_onDidGrantWorkspaceTrust(){this._proxy.$onDidGrantWorkspaceTrust()}$registerEditSessionIdentityProvider(m,w){const D=this._editSessionIdentityService.registerEditSessionIdentityProvider({scheme:w,getEditSessionIdentifier:async(y,T)=>this._proxy.$getEditSessionIdentifier(y.uri,T),provideEditSessionIdentityMatch:async(y,T,_,L)=>this._proxy.$provideEditSessionIdentityMatch(y.uri,T,_,L)});this.registeredEditSessionProviders.set(m,D),this._toDispose.add(D)}$unregisterEditSessionIdentityProvider(m){this.registeredEditSessionProviders.get(m)?.dispose(),this.registeredEditSessionProviders.delete(m)}};h=we([(0,c.extHostNamedCustomer)(o.MainContext.MainThreadWorkspace),F(1,n.ISearchService),F(2,f.IWorkspaceContextService),F(3,g.IEditSessionIdentityService),F(4,d.IEditorService),F(5,a.IWorkspaceEditingService),F(6,r.INotificationService),F(7,u.IRequestService),F(8,S.IInstantiationService),F(9,C.ILabelService),F(10,I.IEnvironmentService),F(11,b.IFileService),F(12,i.IWorkspaceTrustManagementService),F(13,i.IWorkspaceTrustRequestService)],h),e.MainThreadWorkspace=h}),define(ae[403],le([1,0,1471,34,296,18,32,130,31,19,49,48,199,54,42,47,9,22,200,107]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d){"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(f.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:"_files.pickFolderAndOpen",handler:(a,o)=>a.get(f.IFileDialogService).pickFolderAndOpen(o)}),I.CommandsRegistry.registerCommand({id:"workbench.action.files.openFolderInNewWindow",handler:a=>a.get(f.IFileDialogService).pickFolderAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:"workbench.action.files.openFileInNewWindow",handler:a=>a.get(f.IFileDialogService).pickFileAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:"workbench.action.openWorkspaceInNewWindow",handler:a=>a.get(f.IFileDialogService).pickWorkspaceAndOpen({forceNewWindow:!0})}),I.CommandsRegistry.registerCommand({id:e.ADD_ROOT_FOLDER_COMMAND_ID,handler:async a=>{const o=a.get(R.IWorkspaceEditingService),g=await n(a);!g||!g.length||await o.addFolders(g.map(h=>({uri:h})))}}),I.CommandsRegistry.registerCommand({id:e.SET_ROOT_FOLDER_COMMAND_ID,handler:async a=>{const o=a.get(R.IWorkspaceEditingService),g=a.get(p.IWorkspaceContextService),h=await n(a);!h||!h.length||await o.updateFolders(0,g.getWorkspace().folders.length,h.map(v=>({uri:v})))}});async function n(a){const o=a.get(f.IFileDialogService),g=a.get(d.IPathService);return await o.showOpenDialog({openLabel:(0,E.mnemonicButtonLabel)((0,t.localize)(1,null)),title:(0,t.localize)(2,null),canSelectFolders:!0,canSelectMany:!0,defaultUri:await o.defaultFolderPath(),availableFileSystems:[g.defaultUriScheme]})}I.CommandsRegistry.registerCommand(e.PICK_WORKSPACE_FOLDER_COMMAND_ID,async function(a,o){const g=a.get(C.IQuickInputService),h=a.get(S.ILabelService),v=a.get(p.IWorkspaceContextService),m=a.get(u.IModelService),w=a.get(i.ILanguageService),D=v.getWorkspace().folders;if(!D.length)return;const y=D.map(M=>({label:M.name,description:h.getUriLabel((0,A.dirname)(M.uri),{relative:!0}),folder:M,iconClasses:(0,r.getIconClasses)(m,w,M.uri,b.FileKind.ROOT_FOLDER)})),T=(o?o[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 _=(o?o[1]:void 0)||k.CancellationToken.None,L=await g.pick(y,T,_);if(L)return D[y.indexOf(L)]}),I.CommandsRegistry.registerCommand({id:"vscode.openFolder",handler:(a,o,g)=>{const h=a.get(I.ICommandService);if(typeof g=="boolean"&&(g={forceNewWindow:g}),!o){const w={forceNewWindow:g?.forceNewWindow};return g?.forceLocalWindow&&(w.remoteAuthority=null,w.availableFileSystems=["file"]),h.executeCommand("_files.pickFolderAndOpen",w)}o=c.URI.revive(o);const v={forceNewWindow:g?.forceNewWindow,forceReuseWindow:g?.forceReuseWindow,noRecentEntry:g?.noRecentEntry,remoteAuthority:g?.forceLocalWindow?null:void 0},m=(0,p.hasWorkspaceFileExtension)(o)||o.scheme===l.Schemas.untitled?{workspaceUri:o}:{folderUri:o};return h.executeCommand("_files.windowOpen",[m],v)},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 c.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,o)=>{const g=a.get(I.ICommandService),h={forceReuseWindow:o&&o.reuseWindow,remoteAuthority:o&&o.remoteAuthority};return g.executeCommand("_files.newWindow",h)},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,o){return a.get(s.IWorkspacesService).removeRecentlyOpened([o])}),I.CommandsRegistry.registerCommand({id:"vscode.removeFromRecentlyOpened",handler:(a,o)=>{const g=a.get(s.IWorkspacesService);return typeof o=="string"?o=o.match(/^[^:/?#]+:\/\//)?c.URI.parse(o):c.URI.file(o):o=c.URI.revive(o),g.removeRecentlyOpened([o])},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 c.URI}]}}),I.CommandsRegistry.registerCommand("_workbench.addToRecentlyOpened",async function(a,o){const g=a.get(s.IWorkspacesService),h=o.uri,v=o.label,m=o.remoteAuthority;let w;return o.type==="workspace"?w={workspace:await g.getWorkspaceIdentifier(h),label:v,remoteAuthority:m}:o.type==="folder"?w={folderUri:h,label:v,remoteAuthority:m}:w={fileUri:h,label:v,remoteAuthority:m},g.addRecentlyOpened([w])}),I.CommandsRegistry.registerCommand("_workbench.getRecentlyOpened",async function(a){return a.get(s.IWorkspacesService).getRecentlyOpened()})}),define(ae[404],le([1,0,1470,34,296,24,31,403,47,15,71,74,99,7,51,200,141]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"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"},s={value:(0,t.localize)(1,null),original:"File"};class d extends b.Action2{constructor(){super({id:d.ID,title:{value:(0,t.localize)(2,null),original:"Open File..."},category:s,f1:!0,precondition:c.IsMacNativeContext.toNegated(),keybinding:{weight:200,primary:2093}})}async run(_,L){return _.get(I.IFileDialogService).pickFileAndOpen({forceNewWindow:!1,telemetryExtraData:L})}}e.OpenFileAction=d,d.ID="workbench.action.files.openFile";class n extends b.Action2{constructor(){super({id:n.ID,title:{value:(0,t.localize)(3,null),original:"Open Folder..."},category:s,f1:!0,precondition:S.OpenFolderWorkspaceSupportContext,keybinding:{weight:200,primary:void 0,linux:{primary:(0,r.KeyChord)(2089,2093)},win:{primary:(0,r.KeyChord)(2089,2093)}}})}async run(_,L){return _.get(I.IFileDialogService).pickFolderAndOpen({forceNewWindow:!1,telemetryExtraData:L})}}e.OpenFolderAction=n,n.ID="workbench.action.files.openFolder";class a extends b.Action2{constructor(){super({id:a.ID,title:{value:(0,t.localize)(4,null),original:"Open Folder..."},category:s,f1:!0,precondition:u.ContextKeyExpr.and(S.OpenFolderWorkspaceSupportContext.toNegated(),S.WorkbenchStateContext.isEqualTo("workspace")),keybinding:{weight:200,primary:2093}})}run(_){return _.get(k.ICommandService).executeCommand(E.SET_ROOT_FOLDER_COMMAND_ID)}}e.OpenFolderViaWorkspaceAction=a,a.ID="workbench.action.files.openFolderViaWorkspace";class o extends b.Action2{constructor(){super({id:o.ID,title:o.LABEL,category:s,f1:!0,precondition:u.ContextKeyExpr.and(c.IsMacNativeContext,S.OpenFolderWorkspaceSupportContext),keybinding:{weight:200,primary:2093}})}async run(_,L){return _.get(I.IFileDialogService).pickFileFolderAndOpen({forceNewWindow:!1,telemetryExtraData:L})}}e.OpenFileFolderAction=o,o.ID="workbench.action.files.openFileFolder",o.LABEL={value:(0,t.localize)(5,null),original:"Open..."};class g extends b.Action2{constructor(){super({id:g.ID,title:{value:(0,t.localize)(6,null),original:"Open Workspace from File..."},category:s,f1:!0,precondition:S.EnterMultiRootWorkspaceSupportContext})}async run(_,L){return _.get(I.IFileDialogService).pickWorkspaceAndOpen({telemetryExtraData:L})}}g.ID="workbench.action.openWorkspace";class h extends b.Action2{constructor(){super({id:h.ID,title:{value:(0,t.localize)(7,null),original:"Close Workspace"},category:l,f1:!0,precondition:u.ContextKeyExpr.and(S.WorkbenchStateContext.notEqualsTo("empty"),S.EmptyWorkspaceSupportContext),keybinding:{weight:200,primary:(0,r.KeyChord)(2089,36)}})}async run(_){const L=_.get(C.IHostService),M=_.get(i.IWorkbenchEnvironmentService);return L.openWindow({forceReuseWindow:!0,remoteAuthority:M.remoteAuthority})}}h.ID="workbench.action.closeFolder";class v extends b.Action2{constructor(){super({id:v.ID,title:{value:(0,t.localize)(8,null),original:"Open Workspace Configuration File"},category:l,f1:!0,precondition:S.WorkbenchStateContext.isEqualTo("workspace")})}async run(_){const L=_.get(p.IWorkspaceContextService),M=_.get(A.IEditorService),O=L.getWorkspace().configuration;O&&await M.openEditor({resource:O,options:{pinned:!0}})}}v.ID="workbench.action.openWorkspaceConfigFile";class m extends b.Action2{constructor(){super({id:m.ID,title:E.ADD_ROOT_FOLDER_LABEL,category:l,f1:!0,precondition:u.ContextKeyExpr.or(S.EnterMultiRootWorkspaceSupportContext,S.WorkbenchStateContext.isEqualTo("workspace"))})}run(_){return _.get(k.ICommandService).executeCommand(E.ADD_ROOT_FOLDER_COMMAND_ID)}}e.AddRootFolderAction=m,m.ID="workbench.action.addRootFolder";class w extends b.Action2{constructor(){super({id:w.ID,title:{value:(0,t.localize)(9,null),original:"Remove Folder from Workspace..."},category:l,f1:!0,precondition:u.ContextKeyExpr.and(S.WorkspaceFolderCountContext.notEqualsTo("0"),u.ContextKeyExpr.or(S.EnterMultiRootWorkspaceSupportContext,S.WorkbenchStateContext.isEqualTo("workspace")))})}async run(_){const L=_.get(k.ICommandService),M=_.get(R.IWorkspaceEditingService),O=await L.executeCommand(E.PICK_WORKSPACE_FOLDER_COMMAND_ID);O&&await M.removeFolders([O.uri])}}w.ID="workbench.action.removeRootFolder";class D extends b.Action2{constructor(){super({id:D.ID,title:{value:(0,t.localize)(10,null),original:"Save Workspace As..."},category:l,f1:!0,precondition:S.EnterMultiRootWorkspaceSupportContext})}async run(_){const L=_.get(R.IWorkspaceEditingService),M=_.get(p.IWorkspaceContextService),O=await L.pickNewWorkspacePath();if(O&&(0,p.hasWorkspaceFileExtension)(O))switch(M.getWorkbenchState()){case 1:case 2:{const N=M.getWorkspace().folders.map(P=>({uri:P.uri}));return L.createAndEnterWorkspace(N,O)}case 3:return L.saveAndEnterWorkspace(O)}}}D.ID="workbench.action.saveWorkspaceAs";class y extends b.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:S.EnterMultiRootWorkspaceSupportContext})}async run(_){const L=_.get(p.IWorkspaceContextService),M=_.get(R.IWorkspaceEditingService),O=_.get(C.IHostService),N=_.get(f.IWorkspacesService),P=_.get(i.IWorkbenchEnvironmentService),B=L.getWorkspace().folders,V=P.remoteAuthority,z=await N.createUntitledWorkspace(B,V);return await M.copyWorkspaceSettings(z),O.openWindow([{workspaceUri:z.configPath}],{forceNewWindow:!0,remoteAuthority:V})}}y.ID="workbench.action.duplicateWorkspaceInNewWindow",(0,b.registerAction2)(m),(0,b.registerAction2)(w),(0,b.registerAction2)(d),(0,b.registerAction2)(n),(0,b.registerAction2)(a),(0,b.registerAction2)(o),(0,b.registerAction2)(g),(0,b.registerAction2)(v),(0,b.registerAction2)(h),(0,b.registerAction2)(D),(0,b.registerAction2)(y),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"2_open",command:{id:d.ID,title:(0,t.localize)(12,null)},order:1,when:c.IsMacNativeContext.toNegated()}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"2_open",command:{id:n.ID,title:(0,t.localize)(13,null)},order:2,when:S.OpenFolderWorkspaceSupportContext}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"2_open",command:{id:a.ID,title:(0,t.localize)(14,null)},order:2,when:u.ContextKeyExpr.and(S.OpenFolderWorkspaceSupportContext.toNegated(),S.WorkbenchStateContext.isEqualTo("workspace"))}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"2_open",command:{id:o.ID,title:(0,t.localize)(15,null)},order:1,when:u.ContextKeyExpr.and(c.IsMacNativeContext,S.OpenFolderWorkspaceSupportContext)}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"2_open",command:{id:g.ID,title:(0,t.localize)(16,null)},order:3,when:S.EnterMultiRootWorkspaceSupportContext}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:E.ADD_ROOT_FOLDER_COMMAND_ID,title:(0,t.localize)(17,null)},when:u.ContextKeyExpr.or(S.EnterMultiRootWorkspaceSupportContext,S.WorkbenchStateContext.isEqualTo("workspace")),order:1}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:D.ID,title:(0,t.localize)(18,null)},order:2,when:S.EnterMultiRootWorkspaceSupportContext}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"3_workspace",command:{id:y.ID,title:(0,t.localize)(19,null)},order:3,when:S.EnterMultiRootWorkspaceSupportContext}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"6_close",command:{id:h.ID,title:(0,t.localize)(20,null)},order:3,when:u.ContextKeyExpr.and(S.WorkbenchStateContext.isEqualTo("folder"),S.EmptyWorkspaceSupportContext)}),b.MenuRegistry.appendMenuItem(b.MenuId.MenubarFileMenu,{group:"6_close",command:{id:h.ID,title:(0,t.localize)(21,null)},order:3,when:u.ContextKeyExpr.and(S.WorkbenchStateContext.isEqualTo("workspace"),S.EmptyWorkspaceSupportContext)})}),define(ae[205],le([1,0,181,10,16,6,2,165,160,22,14,18,9,503,253,19,5,49,41,17,34,200,43,24,74,78,296]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceListDnDHandler=e.toggleDropEffect=e.CompositeDragAndDropObserver=e.DraggedViewIdentifier=e.DraggedCompositeIdentifier=e.CompositeDragAndDropData=e.LocalSelectionTransfer=e.fillEditorsDragData=e.ResourcesDropHandler=e.extractTreeDropData=e.DraggedTreeItemsIdentifier=e.DraggedEditorGroupIdentifier=e.DraggedEditorIdentifier=void 0;class w{constructor(H){this.identifier=H}}e.DraggedEditorIdentifier=w;class D{constructor(H){this.identifier=H}}e.DraggedEditorGroupIdentifier=D;class y{constructor(H){this.identifier=H}}e.DraggedTreeItemsIdentifier=y;async function T(x){const H=[],W=I.Mimes.uriList.toLowerCase();if(x.has(W))try{const U=await x.get(W)?.asString(),$=JSON.stringify(u.UriList.parse(U??""));H.push(...(0,i.createDraggedEditorInputFromRawResourcesData)($))}catch{}return H}e.extractTreeDropData=T;let _=class{constructor(H,W,U,$,q,X,G,Q){this.options=H,this.fileService=W,this.workspacesService=U,this.editorService=$,this.workspaceEditingService=q,this.hostService=X,this.contextService=G,this.instantiationService=Q}async handleDrop(H,W,U,$){const q=await this.instantiationService.invokeFunction(Q=>(0,i.extractEditorsAndFilesDropData)(Q,H));if(!q.length)return;if(await this.hostService.focus(),this.options.allowWorkspaceOpen){const Q=(0,R.coalesce)(q.filter(j=>j.allowWorkspaceOpen&&j.resource?.scheme===b.Schemas.file).map(j=>j.resource));if(Q.length>0&&await this.handleWorkspaceDrop(Q))return}const X=(0,R.coalesce)(q.filter(Q=>Q.isExternal&&Q.resource?.scheme===b.Schemas.file).map(Q=>Q.resource));X.length&&this.workspacesService.addRecentlyOpened(X.map(Q=>({fileUri:Q})));const G=W();await this.editorService.openEditors(q.map(Q=>({...Q,resource:Q.resource,options:{...Q.options,pinned:!0,index:$}})),G,{validateTrust:!0}),U(G)}async handleWorkspaceDrop(H){const W=[],U=[];return await Promise.all(H.map(async $=>{if((0,n.hasWorkspaceFileExtension)($)){W.push({workspaceUri:$});return}try{const q=await this.fileService.stat($);q.isDirectory&&(W.push({folderUri:q.resource}),U.push({uri:q.resource}))}catch{}})),W.length===0?!1:(this.hostService.focus(),W.length>U.length||U.length===1?await this.hostService.openWindow(W):(0,n.isTemporaryWorkspace)(this.contextService.getWorkspace())?await this.workspaceEditingService.addFolders(U):await this.workspaceEditingService.createAndEnterWorkspace(U),!0)}};_=we([F(1,f.IFileService),F(2,a.IWorkspacesService),F(3,g.IEditorService),F(4,m.IWorkspaceEditingService),F(5,h.IHostService),F(6,n.IWorkspaceContextService),F(7,c.IInstantiationService)],_),e.ResourcesDropHandler=_;function L(x,H,W){if(H.length===0||!W.dataTransfer)return;const U=x.get(v.ITextFileService),$=x.get(g.IEditorService),q=x.get(f.IFileService),X=x.get(l.ILabelService),G=(0,R.coalesce)(H.map(re=>r.URI.isUri(re)?{resource:re}:(0,o.isEditorIdentifier)(re)?r.URI.isUri(re.editor.resource)?{resource:re.editor.resource}:void 0:re)),Q=G.filter(({resource:re})=>q.hasProvider(re)),j=S.isWindows?`\r `:` `;W.dataTransfer.setData(t.DataTransfers.TEXT,Q.map(({resource:re})=>X.getUriLabel(re,{noPrefix:!0})).join(j));const K=Q.find(({isDirectory:re})=>!re);if(K){const re=b.FileAccess.asFileUri(K.resource);re.scheme===b.Schemas.file&&W.dataTransfer.setData(t.DataTransfers.DOWNLOAD_URL,[I.Mimes.binary,(0,C.basename)(K.resource),re.toString()].join(":"))}const Y=Q.filter(({isDirectory:re})=>!re);Y.length&&W.dataTransfer.setData(t.DataTransfers.RESOURCES,JSON.stringify(Y.map(({resource:re})=>re.toString())));const ee=d.Registry.as(i.Extensions.DragAndDropContribution).getAll();for(const re of ee)re.setData(G,W);const ie=[];for(const re of H){let oe;if((0,o.isEditorIdentifier)(re)){const se=re.editor.toUntyped({preserveViewState:re.groupId});se&&(oe={...se,resource:o.EditorResourceAccessor.getCanonicalUri(se)})}else if(r.URI.isUri(re)){const{selection:se,uri:te}=(0,s.extractSelection)(re);oe={resource:te,options:se?{selection:se}:void 0}}else re.isDirectory||(oe={resource:re.resource});if(!!oe){{const se=oe.resource;if(se){const te=U.files.get(se);te&&(typeof oe.languageId!="string"&&(oe.languageId=te.getLanguageId()),typeof oe.encoding!="string"&&(oe.encoding=te.getEncoding()),typeof oe.contents!="string"&&te.isDirty()&&(oe.contents=te.textEditorModel.getValue())),oe.options?.viewState||(oe.options={...oe.options,viewState:(()=>{for(const Z of $.visibleEditorPanes)if((0,C.isEqual)(Z.input.resource,se)){const ne=Z.getViewState();if(ne)return ne}})()})}}ie.push(oe)}}ie.length&&W.dataTransfer.setData(i.CodeDataTransfers.EDITORS,(0,E.stringify)(ie))}e.fillEditorsDragData=L;class M{constructor(){}static getInstance(){return M.INSTANCE}hasData(H){return H&&H===this.proto}clearData(H){this.hasData(H)&&(this.proto=void 0,this.data=void 0)}getData(H){if(this.hasData(H))return this.data}setData(H,W){W&&(this.data=H,this.proto=W)}}e.LocalSelectionTransfer=M,M.INSTANCE=new M;class O{constructor(H,W){this.type=H,this.id=W}update(H){}getData(){return{type:this.type,id:this.id}}}e.CompositeDragAndDropData=O;class N{constructor(H){this.compositeId=H}get id(){return this.compositeId}}e.DraggedCompositeIdentifier=N;class P{constructor(H){this.viewId=H}get id(){return this.viewId}}e.DraggedViewIdentifier=P;class B extends k.Disposable{static get INSTANCE(){return B.instance||(B.instance=new B),B.instance}constructor(){super(),this.transferData=M.getInstance(),this.onDragStart=this._register(new A.Emitter),this.onDragEnd=this._register(new A.Emitter),this._register(this.onDragEnd.event(H=>{const W=H.dragAndDropData.getData().id,U=H.dragAndDropData.getData().type;this.readDragData(U)?.getData().id===W&&this.transferData.clearData(U==="view"?P.prototype:N.prototype)}))}readDragData(H){if(this.transferData.hasData(H==="view"?P.prototype:N.prototype)){const W=this.transferData.getData(H==="view"?P.prototype:N.prototype);if(W&&W[0])return new O(H,W[0].id)}}writeDragData(H,W){this.transferData.setData([W==="view"?new P(H):new N(H)],W==="view"?P.prototype:N.prototype)}registerTarget(H,W){const U=new k.DisposableStore;return U.add(new p.DragAndDropObserver(H,{onDragEnd:$=>{},onDragEnter:$=>{if($.preventDefault(),W.onDragEnter){const q=this.readDragData("composite")||this.readDragData("view");q&&W.onDragEnter({eventData:$,dragAndDropData:q})}},onDragLeave:$=>{const q=this.readDragData("composite")||this.readDragData("view");W.onDragLeave&&q&&W.onDragLeave({eventData:$,dragAndDropData:q})},onDrop:$=>{if(W.onDrop){const q=this.readDragData("composite")||this.readDragData("view");if(!q)return;W.onDrop({eventData:$,dragAndDropData:q}),this.onDragEnd.fire({eventData:$,dragAndDropData:q})}},onDragOver:$=>{if($.preventDefault(),W.onDragOver){const q=this.readDragData("composite")||this.readDragData("view");if(!q)return;W.onDragOver({eventData:$,dragAndDropData:q})}}})),W.onDragStart&&this.onDragStart.event($=>{W.onDragStart($)},this,U),W.onDragEnd&&this.onDragEnd.event($=>{W.onDragEnd($)}),this._register(U)}registerDraggable(H,W,U){H.draggable=!0;const $=new k.DisposableStore;return $.add((0,p.addDisposableListener)(H,p.EventType.DRAG_START,q=>{const{id:X,type:G}=W();this.writeDragData(X,G),q.dataTransfer?.setDragImage(H,0,0),this.onDragStart.fire({eventData:q,dragAndDropData:this.readDragData(G)})})),$.add(new p.DragAndDropObserver(H,{onDragEnd:q=>{const{type:X}=W(),G=this.readDragData(X);!G||this.onDragEnd.fire({eventData:q,dragAndDropData:G})},onDragEnter:q=>{if(U.onDragEnter){const X=this.readDragData("composite")||this.readDragData("view");if(!X)return;X&&U.onDragEnter({eventData:q,dragAndDropData:X})}},onDragLeave:q=>{const X=this.readDragData("composite")||this.readDragData("view");!X||U.onDragLeave?.({eventData:q,dragAndDropData:X})},onDrop:q=>{if(U.onDrop){const X=this.readDragData("composite")||this.readDragData("view");if(!X)return;U.onDrop({eventData:q,dragAndDropData:X}),this.onDragEnd.fire({eventData:q,dragAndDropData:X})}},onDragOver:q=>{if(U.onDragOver){const X=this.readDragData("composite")||this.readDragData("view");if(!X)return;U.onDragOver({eventData:q,dragAndDropData:X})}}})),U.onDragStart&&this.onDragStart.event(q=>{U.onDragStart(q)},this,$),U.onDragEnd&&this.onDragEnd.event(q=>{U.onDragEnd(q)},this,$),this._register($)}}e.CompositeDragAndDropObserver=B;function V(x,H,W){!x||(x.dropEffect=W?H:"none")}e.toggleDropEffect=V;let z=class{constructor(H,W){this.toResource=H,this.instantiationService=W}getDragURI(H){const W=this.toResource(H);return W?W.toString():null}getDragLabel(H){const W=(0,R.coalesce)(H.map(this.toResource));return W.length===1?(0,C.basename)(W[0]):W.length>1?String(W.length):void 0}onDragStart(H,W){const U=[];for(const $ of H.elements){const q=this.toResource($);q&&U.push(q)}U.length&&this.instantiationService.invokeFunction($=>L($,U,W))}onDragOver(H,W,U,$){return!1}drop(H,W,U,$){}};z=we([F(1,c.IInstantiationService)],z),e.ResourceListDnDHandler=z}),define(ae[473],le([1,0,1479,36,10,31,2,37,12,190,5,33,181,38,6,205,137,29,179,11,8]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n){"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 p.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 o=class po extends c.BaseActionViewItem{constructor(y,T,_,L,M,O){super(null,y,T),this.themeService=_,this.hoverService=L,this.configurationService=M,this.keybindingService=O,this.badgeDisposable=this._register(new k.MutableDisposable),this.hoverDisposables=this._register(new k.DisposableStore),this.showHoverScheduler=new d.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(O.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 _=this._action.checked?T.activeForegroundColor:T.inactiveForegroundColor;this.activity.iconUrl?(this.label.style.backgroundColor=_?_.toString():"",this.label.style.color=""):(this.label.style.color=_?_.toString():"",this.label.style.backgroundColor="")}else{const _=this._action.checked?T.activeForegroundColor:T.inactiveForegroundColor,L=this._action.checked?T.activeBorderBottomColor:null;this.label.style.color=_?_.toString():"",this.label.style.borderBottomColor=L?L.toString():""}this.container.style.setProperty("--insert-border-color",T.dragAndDropBorder?T.dragAndDropBorder.toString():"")}if(this.badgeContent){const _=T.badgeForeground,L=T.badgeBackground,M=y.getColor(C.contrastBorder);this.badgeContent.style.color=_?_.toString():"",this.badgeContent.style.backgroundColor=L?L.toString():"",this.badgeContent.style.borderStyle=M?"solid":"",this.badgeContent.style.borderWidth=M?"1px":"",this.badgeContent.style.borderColor=M?M.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,R.addDisposableListener)(this.container,R.EventType.MOUSE_DOWN,()=>{this.container.classList.add("clicked")})),this._register((0,R.addDisposableListener)(this.container,R.EventType.MOUSE_UP,()=>{this.mouseUpTimeout&&clearTimeout(this.mouseUpTimeout),this.mouseUpTimeout=setTimeout(()=>{this.container.classList.remove("clicked")},800)})),this.label=(0,R.append)(y,(0,R.$)("a")),this.badge=(0,R.append)(y,(0,R.$)(".badge")),this.badgeContent=(0,R.append)(this.badge,(0,R.$)(".badge-content")),(0,R.append)(y,(0,R.$)(".active-item-indicator")),(0,R.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.action;if(!this.badge||!this.badgeContent||!(y instanceof a))return;const T=y.getBadge(),_=y.getClass();if(this.badgeDisposable.clear(),(0,R.clearNode)(this.badgeContent),(0,R.hide)(this.badge),T){if(T instanceof b.NumberBadge){if(T.number){let L=T.number.toString();if(T.number>999){const M=T.number/1e3,O=Math.floor(M);M>O?L=`${O}K+`:L=`${M}K`}this.badgeContent.textContent=L,(0,R.show)(this.badge)}}else if(T instanceof b.TextBadge)this.badgeContent.textContent=T.text,(0,R.show)(this.badge);else if(T instanceof b.IconBadge){const L=I.ThemeIcon.asClassNameArray(T.icon);this.badgeContent.classList.add(...L),(0,R.show)(this.badge)}else T instanceof b.ProgressBadge&&(0,R.show)(this.badge);if(_){const L=_.split(" ");this.badge.classList.add(...L),this.badgeDisposable.value=(0,k.toDisposable)(()=>this.badge.classList.remove(...L))}}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.action.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.action.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,R.addDisposableListener)(this.container,R.EventType.MOUSE_OVER,()=>{this.showHoverScheduler.isScheduled()||(Date.now()-po.hoverLeaveTime<200?this.showHover(!0):this.showHoverScheduler.schedule(this.configurationService.getValue("workbench.hover.delay")))},!0)),this.hoverDisposables.add((0,R.addDisposableListener)(this.container,R.EventType.MOUSE_LEAVE,()=>{po.hoverLeaveTime=Date.now(),this.hoverService.hideHover(),this.showHoverScheduler.cancel()},!0)),this.hoverDisposables.add((0,k.toDisposable)(()=>{this.hoverService.hideHover(),this.showHoverScheduler.cancel()}))}showHover(y=!1){if(this.lastHover&&!this.lastHover.isDisposed)return;const T=this.options.hoverOptions.position();this.lastHover=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()}};o.hoverLeaveTime=0,o=we([F(2,I.IThemeService),F(3,s.IHoverService),F(4,n.IConfigurationService),F(5,u.IKeybindingService)],o),e.ActivityActionViewItem=o;class g 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=g;let h=class extends o{constructor(y,T,_,L,M,O,N,P,B,V,z,x){super(y,{icon:!0,colors:O,hasPopup:!0,hoverOptions:N},B,V,z,x),this.getOverflowingComposites=T,this.getActiveCompositeId=_,this.getBadge=L,this.getCompositeOpenAction=M,this.contextMenuService=P,this.actions=[]}showMenu(){this.actions&&(0,k.disposeIfDisposable)(this.actions),this.actions=this.getActions(),this.contextMenuService.showContextMenu({getAnchor:()=>this.container,getActions:()=>this.actions,getCheckedActionsRepresentation:()=>"radio",onHide:()=>(0,k.disposeIfDisposable)(this.actions)})}getActions(){return this.getOverflowingComposites().map(y=>{const T=this.getCompositeOpenAction(y.id);T.checked=this.getActiveCompositeId()===T.id;const _=this.getBadge(y.id);let L;return _ instanceof b.NumberBadge?L=_.number:_ instanceof b.TextBadge&&(L=_.text),L?T.label=(0,t.localize)(3,null,y.name,L):T.label=y.name||"",T})}dispose(){super.dispose(),this.actions&&(this.actions=(0,k.disposeIfDisposable)(this.actions))}};h=we([F(7,E.IContextMenuService),F(8,I.IThemeService),F(9,s.IHoverService),F(10,n.IConfigurationService),F(11,u.IKeybindingService)],h),e.CompositeOverflowActivityActionViewItem=h;let v=class extends p.Action{constructor(y){super("activitybar.manage.extension",(0,t.localize)(4,null)),this.commandService=y}run(y){return this.commandService.executeCommand("_extensions.manage",y)}};v=we([F(0,A.ICommandService)],v);let m=class Mr extends o{constructor(y,T,_,L,M,O,N,P,B,V,z,x,H){super(T,y,z,x,H,B),this.compositeActivityAction=T,this.toggleCompositePinnedAction=_,this.compositeContextMenuActionsProvider=L,this.contextMenuActionsProvider=M,this.dndHandler=O,this.compositeBar=N,this.contextMenuService=P,Mr.manageExtensionAction||(Mr.manageExtensionAction=V.createInstance(v))}render(y){super.render(y),this.updateChecked(),this.updateEnabled(),this._register((0,R.addDisposableListener)(this.container,R.EventType.CONTEXT_MENU,_=>{R.EventHelper.stop(_,!0),this.showContextMenu(y)}));let T;this._register(f.CompositeDragAndDropObserver.INSTANCE.registerDraggable(this.container,()=>({type:"composite",id:this.activity.id}),{onDragOver:_=>{const L=_.dragAndDropData.getData().id!==this.activity.id&&this.dndHandler.onDragOver(_.dragAndDropData,this.activity.id,_.eventData);(0,f.toggleDropEffect)(_.eventData.dataTransfer,"move",L),T=this.updateFromDragging(y,L,_.eventData)},onDragLeave:_=>{T=this.updateFromDragging(y,!1,_.eventData)},onDragEnd:_=>{T=this.updateFromDragging(y,!1,_.eventData)},onDrop:_=>{R.EventHelper.stop(_.eventData,!0),this.dndHandler.drop(_.dragAndDropData,this.activity.id,_.eventData,T),T=this.updateFromDragging(y,!1,_.eventData)},onDragStart:_=>{_.dragAndDropData.getData().id===this.activity.id&&(_.eventData.dataTransfer&&(_.eventData.dataTransfer.effectAllowed="move"),this.blur())}})),[this.badge,this.label].forEach(_=>this._register(new r.DelayedDragHandler(_,()=>{this.action.checked||this.action.run()}))),this.updateStyles()}updateFromDragging(y,T,_){const L=y.getBoundingClientRect(),M=_.clientX,O=_.clientY,N=L.bottom-L.top,P=L.right-L.left,B=O<=L.top+N*.4,V=O>L.bottom-N*.4,z=O<=L.top+N*.5,x=M<=L.left+P*.4,H=M>L.right-P*.4,W=M<=L.left+P*.5,U=y.classList,$={vertical:U.contains("top")?"top":U.contains("bottom")?"bottom":void 0,horizontal:U.contains("left")?"left":U.contains("right")?"right":void 0},q=B||z&&!$.vertical||!V&&$.vertical==="top",X=V||!z&&!$.vertical||!B&&$.vertical==="bottom",G=x||W&&!$.horizontal||!H&&$.horizontal==="left",Q=H||!W&&!$.horizontal||!x&&$.horizontal==="right";if(y.classList.toggle("top",T&&q),y.classList.toggle("bottom",T&&X),y.classList.toggle("left",T&&G),y.classList.toggle("right",T&&Q),!!T)return{verticallyBefore:q,horizontallyBefore:G}}showContextMenu(y){const T=[this.toggleCompositePinnedAction],_=this.compositeContextMenuActionsProvider(this.activity.id);_.length&&T.push(..._),this.compositeActivityAction.activity.extensionId&&(T.push(new p.Separator),T.push(Mr.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 M=this.contextMenuActionsProvider();M.length&&(T.push(new p.Separator),T.push(...M));const O=(0,R.getDomNodePagePosition)(y),N={x:Math.floor(O.left+O.width/2),y:O.top+O.height};this.contextMenuService.showContextMenu({getAnchor:()=>N,getActions:()=>T,getActionsContext:()=>this.activity.id})}updateChecked(){this.action.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.action.enabled?this.element.classList.remove("disabled"):this.element.classList.add("disabled"))}dispose(){super.dispose(),this.label.remove()}};m=we([F(7,E.IContextMenuService),F(8,u.IKeybindingService),F(9,S.IInstantiationService),F(10,I.IThemeService),F(11,s.IHoverService),F(12,n.IConfigurationService)],m),e.CompositeActionViewItem=m;class w extends p.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=w}),define(ae[2965],le([1,0,1473,10,90,133,36,2,15,37,27,33,12,473,70,80,83,7,84,396,260,51,8,46,23,179,38,91,330,135,1103]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PlaceHolderToggleCompositePinnedAction=e.PlaceHolderViewContainerActivityAction=e.GlobalActivityActionViewItem=e.ProfilesActivityActionViewItem=e.AccountsActivityActionViewItem=e.ViewContainerActivityAction=void 0;let T=class Dc extends u.ActivityAction{constructor(x,H,W,U,$){super(x),this.paneCompositePart=H,this.layoutService=W,this.telemetryService=U,this.configurationService=$,this.lastRun=0}updateActivity(x){this.activity=x}async run(x){if(x instanceof MouseEvent&&x.button===2)return;const H=Date.now();if(H>this.lastRun&&H-this.lastRun<Dc.preventDoubleClickDelay)return;this.lastRun=H;const W=this.layoutService.isVisible("workbench.parts.sidebar"),U=this.paneCompositePart.getActivePaneComposite(),$=this.configurationService.getValue("workbench.activityBar.iconClickBehavior"),q=x&&"preserveFocus"in x?!x.preserveFocus:!0;if(W&&U?.getId()===this.activity.id){switch($){case"focus":this.logAction("refocus"),this.paneCompositePart.openPaneComposite(this.activity.id,q);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,q),this.activate()}logAction(x){this.telemetryService.publicLog2("activityBarAction",{viewletId:this.activity.id,action:x})}};T.preventDoubleClickDelay=300,T=we([F(2,c.IWorkbenchLayoutService),F(3,S.ITelemetryService),F(4,o.IConfigurationService)],T),e.ViewContainerActivityAction=T;let _=class extends u.ActivityActionViewItem{constructor(x,H,W,U,$,q,X,G,Q,j,K){super(x,W,U,$,Q,K),this.contextMenuActionsProvider=H,this.menuService=q,this.contextMenuService=X,this.contextKeyService=G,this.environmentService=j}render(x){super.render(x),this._register((0,p.addDisposableListener)(this.container,p.EventType.MOUSE_DOWN,async H=>{if(p.EventHelper.stop(H,!0),H?.button!==2)this.run();else{const U=new E.DisposableStore,$=await this.resolveContextMenuActions(U),q=(0,p.getDomNodePagePosition)(this.container),X={x:Math.floor(q.left+q.width/2),y:q.top+q.height};this.contextMenuService.showContextMenu({getAnchor:()=>X,getActions:()=>$,onHide:()=>U.dispose()})}})),this._register((0,p.addDisposableListener)(this.container,p.EventType.KEY_UP,H=>{const W=new R.StandardKeyboardEvent(H);(W.equals(3)||W.equals(10))&&(p.EventHelper.stop(H,!0),this.run())})),this._register((0,p.addDisposableListener)(this.container,A.EventType.Tap,H=>{p.EventHelper.stop(H,!0),this.run()}))}async resolveContextMenuActions(x){return this.contextMenuActionsProvider()}};_=we([F(3,r.IThemeService),F(4,v.IHoverService),F(5,I.IMenuService),F(6,b.IContextMenuService),F(7,l.IContextKeyService),F(8,o.IConfigurationService),F(9,a.IWorkbenchEnvironmentService),F(10,m.IKeybindingService)],_);let L=class extends _{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie){super(H,W,{draggable:!1,colors:$,icon:U,hasPopup:!0,hoverOptions:q},X,G,Q,j,K,Y,ee,ie),this.menuId=x}async run(){const x=new E.DisposableStore,H=x.add(this.menuService.createMenu(this.menuId,this.contextKeyService)),W=await this.resolveMainMenuActions(H,x);this.contextMenuService.showContextMenu({getAnchor:()=>this.container,anchorAlignment:this.configurationService.getValue("workbench.sideBar.location")==="left"?1:0,anchorAxisAlignment:1,getActions:()=>W,onHide:()=>x.dispose()})}async resolveMainMenuActions(x,H){const W=[];return(0,s.createAndFillInActionBarActions)(x,void 0,{primary:[],secondary:W}),W}};L=we([F(6,r.IThemeService),F(7,v.IHoverService),F(8,I.IMenuService),F(9,b.IContextMenuService),F(10,l.IContextKeyService),F(11,o.IConfigurationService),F(12,a.IWorkbenchEnvironmentService),F(13,m.IKeybindingService)],L);let M=class Tc extends L{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie,re,oe){super(I.MenuId.AccountsContext,x,H,!0,W,U,$,q,G,X,Q,ee,K,re),this.authenticationService=j,this.productService=Y,this.storageService=ie,this.credentialsService=oe}async resolveMainMenuActions(x,H){await super.resolveMainMenuActions(x,H);const W=x.getActions(),U=this.authenticationService.getProviderIds(),$=U.map(async Q=>{try{const j=await this.authenticationService.getSessions(Q),K={};return j.forEach(Y=>{K[Y.account.label]?K[Y.account.label].push(Y):K[Y.account.label]=[Y]}),{providerId:Q,sessions:K}}catch{return{providerId:Q}}}),q=await Promise.all($);let X=[];const G=await(0,d.getCurrentAuthenticationSessionInfo)(this.credentialsService,this.productService);if(q.forEach(Q=>{const j=this.authenticationService.getLabel(Q.providerId);if(Q.sessions)Object.keys(Q.sessions).forEach(K=>{const Y=H.add(new k.Action(`configureSessions${K}`,(0,t.localize)(0,null),"",!0,()=>this.authenticationService.manageTrustedExtensionsForAccount(Q.providerId,K))),ee=H.add(new k.Action("signOut",(0,t.localize)(1,null),"",!0,()=>this.authenticationService.removeAccountSessions(Q.providerId,K,Q.sessions[K]))),ie=[Y];(!Q.sessions[K].some(se=>se.id===G?.id)||G?.canSignOut)&&ie.push(ee);const oe=new k.SubmenuAction("activitybar.submenu",`${K} (${j})`,ie);X.push(oe)});else{const K=H.add(new k.Action("providerUnavailable",(0,t.localize)(2,null,j)));X.push(K)}}),U.length&&!X.length){const Q=H.add(new k.Action("noAccountsAvailable",(0,t.localize)(3,null),void 0,!1));X.push(Q)}return X.length&&W.length&&X.push(new k.Separator),W.forEach((Q,j)=>{const K=Q[1];X=X.concat(K),j!==W.length-1&&X.push(new k.Separator)}),X}async resolveContextMenuActions(x){const H=await super.resolveContextMenuActions(x);return H.unshift((0,k.toAction)({id:"hideAccounts",label:(0,t.localize)(4,null),run:()=>this.storageService.store(Tc.ACCOUNTS_VISIBILITY_PREFERENCE_KEY,!1,0,0)}),new k.Separator),H}};M.ACCOUNTS_VISIBILITY_PREFERENCE_KEY="workbench.activity.showAccounts",M=we([F(4,r.IThemeService),F(5,v.IHoverService),F(6,b.IContextMenuService),F(7,I.IMenuService),F(8,l.IContextKeyService),F(9,n.IAuthenticationService),F(10,a.IWorkbenchEnvironmentService),F(11,g.IProductService),F(12,o.IConfigurationService),F(13,h.IStorageService),F(14,m.IKeybindingService),F(15,D.ICredentialsService)],M),e.AccountsActivityActionViewItem=M;let O=class kc extends L{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y,ee,ie){super(y.ManageProfilesSubMenu,x,H,x.activity.icon,W,U,X,G,Q,j,K,Y,ee,ie),this.userDataProfileService=$,this.storageService=q}render(x){super.render(x),this.container.classList.add("profile-activity-item")}async resolveContextMenuActions(x){const H=await super.resolveContextMenuActions(x);return H.unshift((0,k.toAction)({id:"hideprofiles",label:(0,t.localize)(5,null,y.PROFILES_CATEGORY.value),run:()=>this.storageService.store(kc.PROFILES_VISIBILITY_PREFERENCE_KEY,!1,0,0)}),new k.Separator),H}computeTitle(){return(0,t.localize)(6,null,this.userDataProfileService.currentProfile.name)}};O.PROFILES_VISIBILITY_PREFERENCE_KEY="workbench.activity.showProfiles",O=we([F(4,y.IUserDataProfileService),F(5,h.IStorageService),F(6,r.IThemeService),F(7,v.IHoverService),F(8,I.IMenuService),F(9,b.IContextMenuService),F(10,l.IContextKeyService),F(11,o.IConfigurationService),F(12,a.IWorkbenchEnvironmentService),F(13,m.IKeybindingService)],O),e.ProfilesActivityActionViewItem=O;let N=class extends L{constructor(x,H,W,U,$,q,X,G,Q,j,K,Y){super(I.MenuId.GlobalActivity,x,H,!0,W,U,$,q,X,G,Q,j,K,Y)}};N=we([F(4,r.IThemeService),F(5,v.IHoverService),F(6,I.IMenuService),F(7,b.IContextMenuService),F(8,l.IContextKeyService),F(9,o.IConfigurationService),F(10,a.IWorkbenchEnvironmentService),F(11,m.IKeybindingService)],N),e.GlobalActivityActionViewItem=N;class P extends T{}e.PlaceHolderViewContainerActivityAction=P;class B extends u.ToggleCompositePinnedAction{constructor(x,H){super({id:x,name:x,cssClass:void 0},H)}setActivity(x){this.label=x.name}}e.PlaceHolderToggleCompositePinnedAction=B;class V extends I.Action2{constructor(x,H){super(x),this.offset=H}async run(x){const H=x.get(w.IPaneCompositePartService),W=H.getVisiblePaneCompositeIds(0),U=H.getActivePaneComposite(0);if(!U)return;let $;for(let q=0;q<W.length;q++)if(W[q]===U.getId()){$=W[(q+W.length+this.offset)%W.length];break}await H.openPaneComposite($,0,!0)}}(0,I.registerAction2)(class extends V{constructor(){super({id:"workbench.action.previousSideBarView",title:{value:(0,t.localize)(7,null),original:"Previous Primary Side Bar View"},category:i.Categories.View,f1:!0},-1)}}),(0,I.registerAction2)(class extends V{constructor(){super({id:"workbench.action.nextSideBarView",title:{value:(0,t.localize)(8,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)(9,null),original:"Focus Activity Bar"},category:i.Categories.View,f1:!0})}async run(x){const H=x.get(c.IWorkbenchLayoutService);H.setPartHidden(!1,"workbench.parts.activitybar"),H.focusPart("workbench.parts.activitybar")}}),(0,r.registerThemingParticipant)((z,x)=>{const H=z.getColor(f.ACTIVITY_BAR_FOREGROUND);H&&x.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label:not(.codicon):not(.profile-activity-item), .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .action-label:not(.codicon):not(.profile-activity-item), .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label:not(.codicon):not(.profile-activity-item) { background-color: ${H} !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: ${H} !important; } `);const W=z.getColor(f.ACTIVITY_BAR_SETTINGS_PROFILE_BACKGROUND);W&&x.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item .action-label.profile-activity-item, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item .action-label.profile-activity-item, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item .action-label.profile-activity-item { background-color: ${W} !important; } `);const U=z.getColor(f.ACTIVITY_BAR_SETTINGS_PROFILE_HOVER_FOREGROUND);U&&x.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.active .action-label.profile-activity-item, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .action-label.profile-activity-item, .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:hover .action-label.profile-activity-item { color: ${U} !important; } `);const $=z.getColor(f.ACTIVITY_BAR_ACTIVE_BORDER);$&&x.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator:before { border-left-color: ${$}; } `);const q=z.getColor(f.ACTIVITY_BAR_ACTIVE_FOCUS_BORDER);q&&x.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: ${q}; } `);const X=z.getColor(f.ACTIVITY_BAR_ACTIVE_BACKGROUND);X&&x.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item.checked .active-item-indicator { z-index: 0; background-color: ${X}; } `);const G=z.getColor(C.activeContrastBorder);if(G)x.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.profile-activity-item:before { top: -6px; } .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: ${G}; } .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: ${G}; } `);else{const Q=z.getColor(C.focusBorder);Q&&x.addRule(` .monaco-workbench .activitybar > .content :not(.monaco-menu) > .monaco-action-bar .action-item:focus .active-item-indicator:before { border-left-color: ${Q}; } `)}})}),define(ae[1001],le([1,0,1478,36,21,2,5,79,473,10,139,37,140,13,6,205,133]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositeBar=e.CompositeDragAndDrop=void 0;class l{constructor(a,o,g,h,v){this.viewDescriptorService=a,this.targetContainerLocation=o,this.openComposite=g,this.moveComposite=h,this.getItems=v}drop(a,o,g,h){const v=a.getData();if(v.type==="composite"){const m=this.viewDescriptorService.getViewContainerById(v.id);if(this.viewDescriptorService.getViewContainerLocation(m)===this.targetContainerLocation)o&&this.moveComposite(v.id,o,h);else{if(this.viewDescriptorService.getViewContainerModel(m).allViewDescriptors.some(y=>!y.canMoveView))return;this.viewDescriptorService.moveViewContainerToLocation(m,this.targetContainerLocation,this.getTargetIndex(o,h))}}if(v.type==="view"){const m=this.viewDescriptorService.getViewDescriptorById(v.id);if(m&&m.canMoveView){this.viewDescriptorService.moveViewToLocation(m,this.targetContainerLocation);const w=this.viewDescriptorService.getViewContainerByViewId(m.id);o&&this.moveComposite(w.id,o,h),this.openComposite(w.id,!0).then(D=>{D?.openView(m.id,!0)})}}}onDragEnter(a,o,g){return this.canDrop(a,o)}onDragOver(a,o,g){return this.canDrop(a,o)}getTargetIndex(a,o){if(!a)return;const g=this.getItems(),h=this.targetContainerLocation===1?o?.horizontallyBefore:o?.verticallyBefore;return g.filter(v=>v.visible).findIndex(v=>v.id===a)+(h?0:1)}canDrop(a,o){const g=a.getData();if(g.type==="composite"){const h=this.viewDescriptorService.getViewContainerById(g.id);return this.viewDescriptorService.getViewContainerLocation(h)===this.targetContainerLocation?g.id!==o:!this.viewDescriptorService.getViewContainerModel(h).allViewDescriptors.some(w=>!w.canMoveView)}else{const h=this.viewDescriptorService.getViewDescriptorById(g.id);return!(!h||!h.canMoveView)}}}e.CompositeDragAndDrop=l;let s=class extends r.Widget{constructor(a,o,g,h){super(),this.options=o,this.instantiationService=g,this.contextMenuService=h,this._onDidChange=this._register(new i.Emitter),this.onDidChange=this._onDidChange.event,this.model=new d(a,o),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 o=a.appendChild((0,b.$)(".composite-bar"));this.compositeSwitcherBar=this._register(new E.ActionBar(o,{actionViewItemProvider:h=>{if(h instanceof I.CompositeOverflowActivityAction)return this.compositeOverflowActionViewItem;const v=this.model.findItem(h.id);return v&&this.instantiationService.createInstance(I.CompositeActionViewItem,{draggable:!0,colors:this.options.colors,icon:this.options.icon,hoverOptions:this.options.activityHoverOptions},h,v.pinnedAction,m=>this.options.getContextMenuActionsForComposite(m),()=>this.getContextMenuActions(),this.options.dndHandler,this)},orientation:this.options.orientation,ariaLabel:(0,t.localize)(0,null),ariaRole:"tablist",animated:!1,preventLoopNavigation:this.options.preventLoopNavigation,triggerKeys:{keyDown:!0}})),this._register((0,b.addDisposableListener)(a,b.EventType.CONTEXT_MENU,h=>this.showContextMenu(h))),this._register(c.Gesture.addTarget(a)),this._register((0,b.addDisposableListener)(a,c.EventType.Contextmenu,h=>this.showContextMenu(h)));let g;return this._register(f.CompositeDragAndDropObserver.INSTANCE.registerTarget(a,{onDragOver:h=>{const v=this.getVisibleComposites();if(!v.length||h.eventData.target&&(0,b.isAncestor)(h.eventData.target,o)){g=this.updateFromDragging(a,!1,!1,!0);return}const m=this.insertAtFront(o,h.eventData),w=m?v[0]:v[v.length-1],D=this.options.dndHandler.onDragOver(h.dragAndDropData,w.id,h.eventData);(0,f.toggleDropEffect)(h.eventData.dataTransfer,"move",D),g=this.updateFromDragging(a,D,m,!0)},onDragLeave:h=>{g=this.updateFromDragging(a,!1,!1,!1)},onDragEnd:h=>{g=this.updateFromDragging(a,!1,!1,!1)},onDrop:h=>{const v=this.getVisibleComposites();if(v.length){const m=this.insertAtFront(o,h.eventData)?v[0]:v[v.length-1];this.options.dndHandler.drop(h.dragAndDropData,m.id,h.eventData,g)}g=this.updateFromDragging(a,!1,!1,!1)}})),o}insertAtFront(a,o){const g=a.getBoundingClientRect(),h=o.clientX,v=o.clientY;switch(this.options.orientation){case 0:return h<g.left;case 1:return v<g.top}}updateFromDragging(a,o,g,h){if(a.classList.toggle("dragged-over",h),a.classList.toggle("dragged-over-head",o&&g),a.classList.toggle("dragged-over-tail",o&&!g),!!o)return{verticallyBefore:g,horizontallyBefore:g}}focus(a){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:o,order:g,requestedIndex:h}){this.model.add(a,o,g,h)&&(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 o=this.model.activeItem;this.model.activate(a)&&(this.visibleComposites.indexOf(a)===-1||!!this.model.activeItem&&!this.model.activeItem.pinned||o&&!o.pinned)&&this.updateCompositeSwitcher()}deactivateComposite(a){const o=this.model.activeItem;this.model.deactivate()&&o&&!o.pinned&&this.updateCompositeSwitcher()}showActivity(a,o,g,h){if(!o)throw(0,R.illegalArgument)("badge");typeof h!="number"&&(h=0);const v={badge:o,clazz:g,priority:h};return this.model.addActivity(a,v),(0,A.toDisposable)(()=>this.model.removeActivity(a,v))}async pin(a,o){this.model.setPinned(a,!0)&&(this.updateCompositeSwitcher(),o&&(await this.options.openComposite(a),this.activateComposite(a)))}unpin(a){this.model.setPinned(a,!1)&&(this.updateCompositeSwitcher(),this.resetActiveComposite(a))}resetActiveComposite(a){const o=this.options.getDefaultCompositeId();!this.model.activeItem||this.model.activeItem.id!==a||(this.deactivateComposite(a),o&&o!==a&&this.isPinned(o)?this.options.openComposite(o,!0):this.options.openComposite(this.visibleComposites.filter(g=>g!==a)[0]))}isPinned(a){return this.model.findItem(a)?.pinned}move(a,o,g){if(g!==void 0){const h=this.model.items.findIndex(m=>m.id===a);let v=this.model.items.findIndex(m=>m.id===o);h>=0&&v>=0&&(!g&&h>v&&v++,g&&h<v&&v--,v<this.model.items.length&&v>=0&&v!==h&&this.model.move(this.model.items[h].id,this.model.items[v].id)&&setTimeout(()=>this.updateCompositeSwitcher(),0))}else this.model.move(a,o)&&setTimeout(()=>this.updateCompositeSwitcher(),0)}getAction(a){return this.model.findItem(a)?.activityAction}computeSizes(a){const o=this.options.compositeSize;if(o)a.forEach(g=>this.compositeSizeInBar.set(g.id,o));else{const g=this.compositeSwitcherBar;if(g&&this.dimension&&this.dimension.height!==0&&this.dimension.width!==0){const h=g.viewItems.length;g.push(a.map(v=>v.activityAction)),a.map((v,m)=>this.compositeSizeInBar.set(v.id,this.options.orientation===1?g.getHeight(h+m):g.getWidth(h+m))),a.forEach(()=>g.pull(g.viewItems.length-1))}}}updateCompositeSwitcher(){const a=this.compositeSwitcherBar;if(!a||!this.dimension)return;let o=this.model.visibleItems.filter(D=>D.pinned||this.model.activeItem&&this.model.activeItem.id===D.id).map(D=>D.id),g=o.length;const h=o.length;let v=0;const m=this.options.orientation===1?this.dimension.height:this.dimension.width;for(let D=0;D<o.length;D++){const y=this.compositeSizeInBar.get(o[D]);if(v+y>m){g=D;break}v+=y}for(h>g&&(o=o.slice(0,g)),this.model.activeItem&&o.every(D=>!!this.model.activeItem&&D!==this.model.activeItem.id)&&(v+=this.compositeSizeInBar.get(this.model.activeItem.id),o.push(this.model.activeItem.id));v>m&&o.length;){const D=o.length>1?o.splice(o.length-2,1)[0]:o.pop();v-=this.compositeSizeInBar.get(D)}for(h>o.length&&(v+=this.options.overflowActionSize);v>m&&o.length;){const D=o.length>1&&o[o.length-1]===this.model.activeItem?.id?o.splice(o.length-2,1)[0]:o.pop();v-=this.compositeSizeInBar.get(D)}h===o.length&&this.compositeOverflowAction&&(a.pull(a.length()-1),this.compositeOverflowAction.dispose(),this.compositeOverflowAction=void 0,this.compositeOverflowActionViewItem?.dispose(),this.compositeOverflowActionViewItem=void 0);const w=[];this.visibleComposites.forEach((D,y)=>{o.includes(D)||w.push(y)}),w.reverse().forEach(D=>{const y=a.viewItems[D];a.pull(D),y.dispose(),this.visibleComposites.splice(D,1)}),o.forEach((D,y)=>{const T=this.visibleComposites.indexOf(D);if(y!==T){if(T!==-1){const _=a.viewItems[T];a.pull(T),_.dispose(),this.visibleComposites.splice(T,1)}a.push(this.model.findItem(D).activityAction,{label:!0,icon:this.options.icon,index:y}),this.visibleComposites.splice(y,0,D)}}),h>o.length&&!this.compositeOverflowAction&&(this.compositeOverflowAction=this.instantiationService.createInstance(I.CompositeOverflowActivityAction,()=>{this.compositeOverflowActionViewItem?.showMenu()}),this.compositeOverflowActionViewItem=this.instantiationService.createInstance(I.CompositeOverflowActivityActionViewItem,this.compositeOverflowAction,()=>this.getOverflowingComposites(),()=>this.model.activeItem?this.model.activeItem.id:void 0,D=>this.model.findItem(D)?.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(o=>o.pinned).map(o=>o.id);return this.model.activeItem&&!this.model.activeItem.pinned&&a.push(this.model.activeItem.id),a=a.filter(o=>!this.visibleComposites.includes(o)),this.model.visibleItems.filter(o=>a.includes(o.id)).map(o=>({id:o.id,name:this.getAction(o.id)?.label||o.name}))}showContextMenu(a){b.EventHelper.stop(a,!0);const o=new S.StandardMouseEvent(a);this.contextMenuService.showContextMenu({getAnchor:()=>({x:o.posx,y:o.posy}),getActions:()=>this.getContextMenuActions(a)})}getContextMenuActions(a){const o=this.model.visibleItems.map(({id:g,name:h,activityAction:v})=>(0,p.toAction)({id:g,label:this.getAction(g).label||h||g,checked:this.isPinned(g),enabled:v.enabled,run:()=>{this.isPinned(g)?this.unpin(g):this.pin(g,!0)}}));return this.options.fillExtraContextMenuActions(o,a),o}};s=we([F(2,k.IInstantiationService),F(3,C.IContextMenuService)],s),e.CompositeBar=s;class d{get items(){return this._items}constructor(a,o){this._items=[],this.options=o,this.setItems(a)}setItems(a){const o=[];let g=!1;if(!this.items||this.items.length===0)this._items=a.map(h=>this.createCompositeBarItem(h.id,h.name,h.order,h.pinned,h.visible)),g=!0;else{const h=this.items;for(let v=0;v<a.length;v++){const m=a[v],w=h.filter(({id:D})=>D===m.id)[0];w?w.pinned!==m.pinned||v!==h.indexOf(w)?(w.pinned=m.pinned,o.push(w),g=!0):o.push(w):(o.push(this.createCompositeBarItem(m.id,m.name,m.order,m.pinned,m.visible)),g=!0)}this._items=o}return g}get visibleItems(){return this.items.filter(a=>a.visible)}get pinnedItems(){return this.items.filter(a=>a.visible&&a.pinned)}createCompositeBarItem(a,o,g,h,v){const m=this.options;return{id:a,name:o,pinned:h,order:g,visible:v,activity:[],get activityAction(){return m.getActivityAction(a)},get pinnedAction(){return m.getCompositePinnedAction(a)}}}add(a,o,g,h){const v=this.findItem(a);if(v){let m=!1;return v.name=o,(0,u.isUndefinedOrNull)(g)||(m=v.order!==g,v.order=g),v.visible||(v.visible=!0,m=!0),m}else{const m=this.createCompositeBarItem(a,o,g,!0,!0);if((0,u.isUndefinedOrNull)(h))if((0,u.isUndefinedOrNull)(g))this.items.push(m);else{let w=0;for(;w<this.items.length&&typeof this.items[w].order=="number"&&this.items[w].order<g;)w++;this.items.splice(w,0,m)}else{let w=0,D=h;for(;D>0&&w<this.items.length;)this.items[w++].visible&&D--;this.items.splice(w,0,m)}return!0}}remove(a){for(let o=0;o<this.items.length;o++)if(this.items[o].id===a)return this.items.splice(o,1),!0;return!1}hide(a){for(const o of this.items)if(o.id===a)return o.visible?(o.visible=!1,!0):!1;return!1}move(a,o){const g=this.findIndex(a),h=this.findIndex(o);if(g===-1||h===-1)return!1;const v=this.items.splice(g,1)[0];return this.items.splice(h,0,v),v.pinned=!0,!0}setPinned(a,o){for(const g of this.items)if(g.id===a)return g.pinned!==o?(g.pinned=o,!0):!1;return!1}addActivity(a,o){const g=this.findItem(a);if(g){const h=g.activity;for(let v=0;v<=h.length;v++)if(v===h.length){h.push(o);break}else if(h[v].priority<=o.priority){h.splice(v,0,o);break}return this.updateActivity(a),!0}return!1}removeActivity(a,o){const g=this.findItem(a);if(g){const h=g.activity.indexOf(o);if(h!==-1)return g.activity.splice(h,1),this.updateActivity(a),!0}return!1}updateActivity(a){const o=this.findItem(a);if(o)if(o.activity.length){const[{badge:g,clazz:h}]=o.activity;o.activityAction.setBadge(g,h)}else o.activityAction.setBadge(void 0)}activate(a){if(!this.activeItem||this.activeItem.id!==a){this.activeItem&&this.deactivate();for(const o of this.items)if(o.id===a)return this.activeItem=o,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(o=>o.id===a)[0]}findIndex(a){for(let o=0;o<this.items.length;o++)if(this.items[o].id===a)return o;return-1}}}),define(ae[2966],le([1,0,181,10,367,11,2,14,13,1491,8,5,17,33,12,34,253,205,311,80,58,24,556,1107]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorDropTarget=void 0;function g(w){return w.getValue("editor.dropIntoEditor.enabled")}function h(w){return w.shiftKey}let v=class Rc extends i.Themable{get disposed(){return!!this._disposed}constructor(D,y,T,_,L,M,O,N,P){super(T),this.accessor=D,this.groupView=y,this.configurationService=_,this.instantiationService=L,this.editorService=M,this.editorGroupService=O,this.treeViewsDragAndDropService=N,this.contextService=P,this.editorTransfer=l.LocalSelectionTransfer.getInstance(),this.groupTransfer=l.LocalSelectionTransfer.getInstance(),this.treeItemsTransfer=l.LocalSelectionTransfer.getInstance(),this.cleanupOverlayScheduler=this._register(new A.RunOnceScheduler(()=>this.dispose(),300)),this.enableDropIntoEditor=g(this.configurationService)&&this.isDropIntoActiveEditorEnabled(),this.create()}create(){const D=this.getOverlayOffsetHeight(),y=this.container=document.createElement("div");y.id=Rc.OVERLAY_ID,y.style.top=`${D}px`,this.groupView.element.appendChild(y),this.groupView.element.classList.add("dragged-over"),this._register((0,k.toDisposable)(()=>{this.groupView.element.removeChild(y),this.groupView.element.classList.remove("dragged-over")})),this.overlay=document.createElement("div"),this.overlay.classList.add("editor-group-overlay-indicator"),y.appendChild(this.overlay),this.enableDropIntoEditor&&(this.dropIntoPromptElement=(0,R.renderFormattedText)((0,b.localize)(0,null,E.isMacintosh?"\u21E7":"Shift"),{}),this.dropIntoPromptElement.classList.add("editor-group-overlay-drop-into-prompt"),this.overlay.appendChild(this.dropIntoPromptElement)),this.registerListeners(y),this.updateStyles()}updateStyles(){const D=(0,I.assertIsDefined)(this.overlay);D.style.backgroundColor=this.getColor(d.EDITOR_DRAG_AND_DROP_BACKGROUND)||"";const y=this.getColor(u.activeContrastBorder);if(D.style.outlineColor=y||"",D.style.outlineOffset=y?"-2px":"",D.style.outlineStyle=y?"dashed":"",D.style.outlineWidth=y?"2px":"",this.dropIntoPromptElement){this.dropIntoPromptElement.style.backgroundColor=this.getColor(d.EDITOR_DROP_INTO_PROMPT_BACKGROUND)??"",this.dropIntoPromptElement.style.color=this.getColor(d.EDITOR_DROP_INTO_PROMPT_FOREGROUND)??"";const T=this.getColor(d.EDITOR_DROP_INTO_PROMPT_BORDER);T?(this.dropIntoPromptElement.style.borderWidth="1px",this.dropIntoPromptElement.style.borderStyle="solid",this.dropIntoPromptElement.style.borderColor=T):this.dropIntoPromptElement.style.borderWidth="0"}}registerListeners(D){this._register(new p.DragAndDropObserver(D,{onDragEnter:y=>{},onDragOver:y=>{if(this.enableDropIntoEditor&&h(y)){this.dispose();return}const T=this.groupTransfer.hasData(l.DraggedEditorGroupIdentifier.prototype),_=this.editorTransfer.hasData(l.DraggedEditorIdentifier.prototype);!_&&!T&&y.dataTransfer&&(y.dataTransfer.dropEffect="copy");let L=!0;if(T)L=this.isCopyOperation(y);else if(_){const O=this.editorTransfer.getData(l.DraggedEditorIdentifier.prototype);Array.isArray(O)&&(L=this.isCopyOperation(y,O[0].identifier))}if(!L){const O=this.findSourceGroupView();if(O===this.groupView&&(T||_&&O.count<2)){this.hideOverlay();return}}let M=!!this.editorGroupService.partOptions.splitOnDragAndDrop;this.isToggleSplitOperation(y)&&(M=!M),this.positionOverlay(y.offsetX,y.offsetY,T,M),this.cleanupOverlayScheduler.isScheduled()&&this.cleanupOverlayScheduler.cancel()},onDragLeave:y=>this.dispose(),onDragEnd:y=>this.dispose(),onDrop:y=>{p.EventHelper.stop(y,!0),this.dispose(),this.currentDropOperation&&this.handleDrop(y,this.currentDropOperation.splitDirection)}})),this._register((0,p.addDisposableListener)(D,p.EventType.MOUSE_OVER,()=>{this.cleanupOverlayScheduler.isScheduled()||this.cleanupOverlayScheduler.schedule()}))}isDropIntoActiveEditorEnabled(){return!!this.groupView.activeEditor?.hasCapability(128)}findSourceGroupView(){if(this.groupTransfer.hasData(l.DraggedEditorGroupIdentifier.prototype)){const D=this.groupTransfer.getData(l.DraggedEditorGroupIdentifier.prototype);if(Array.isArray(D))return this.accessor.getGroup(D[0].identifier)}else if(this.editorTransfer.hasData(l.DraggedEditorIdentifier.prototype)){const D=this.editorTransfer.getData(l.DraggedEditorIdentifier.prototype);if(Array.isArray(D))return this.accessor.getGroup(D[0].identifier.groupId)}}async handleDrop(D,y){const T=()=>{let _;return typeof y=="number"?_=this.accessor.addGroup(this.groupView,y):_=this.groupView,_};if(this.groupTransfer.hasData(l.DraggedEditorGroupIdentifier.prototype)){const _=this.groupTransfer.getData(l.DraggedEditorGroupIdentifier.prototype);if(Array.isArray(_)){const L=this.accessor.getGroup(_[0].identifier);if(L){if(typeof y!="number"&&L===this.groupView)return;let M;if(typeof y=="number")this.isCopyOperation(D)?M=this.accessor.copyGroup(L,this.groupView,y):M=this.accessor.moveGroup(L,this.groupView,y);else{let O;this.isCopyOperation(D)&&(O={mode:0}),this.accessor.mergeGroup(L,this.groupView,O)}M&&this.accessor.activateGroup(M)}this.groupTransfer.clearData(l.DraggedEditorGroupIdentifier.prototype)}}else if(this.editorTransfer.hasData(l.DraggedEditorIdentifier.prototype)){const _=this.editorTransfer.getData(l.DraggedEditorIdentifier.prototype);if(Array.isArray(_)){const L=_[0].identifier,M=T(),O=this.accessor.getGroup(L.groupId);if(O){if(O===M)return;const N=(0,s.fillActiveEditorViewState)(O,L.editor,{pinned:!0,sticky:O.isSticky(L.editor)});this.isCopyOperation(D,L)?O.copyEditor(L.editor,M,N):O.moveEditor(L.editor,M,N),M.focus()}this.editorTransfer.clearData(l.DraggedEditorIdentifier.prototype)}}else if(this.treeItemsTransfer.hasData(l.DraggedTreeItemsIdentifier.prototype)){const _=this.treeItemsTransfer.getData(l.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(_)){const L=[];for(const M of _){const O=await this.treeViewsDragAndDropService.removeDragOperationTransfer(M.identifier);if(O){const N=await(0,l.extractTreeDropData)(O);L.push(...N.map(P=>({...P,options:{...P.options,pinned:!0}})))}}L.length&&this.editorService.openEditors(L,T(),{validateTrust:!0})}this.treeItemsTransfer.clearData(l.DraggedTreeItemsIdentifier.prototype)}else this.instantiationService.createInstance(l.ResourcesDropHandler,{allowWorkspaceOpen:!E.isWeb||(0,f.isTemporaryWorkspace)(this.contextService.getWorkspace())}).handleDrop(D,()=>T(),L=>L?.focus())}isCopyOperation(D,y){return y?.editor.hasCapability(8)?!1:D.ctrlKey&&!E.isMacintosh||D.altKey&&E.isMacintosh}isToggleSplitOperation(D){return D.altKey&&!E.isMacintosh||D.shiftKey&&E.isMacintosh}positionOverlay(D,y,T,_){const L=this.accessor.partOptions.openSideBySideDirection==="right",M=this.groupView.element.clientWidth,O=this.groupView.element.clientHeight-this.getOverlayOffsetHeight();let N,P;_?(T?N=L?.3:.1:N=.1,T?P=L?.1:.3:P=.1):(N=0,P=0);const B=M*N,V=O*P,z=M/3,x=O/3;let H;switch(D>B&&D<M-B&&y>V&&y<O-V?H=void 0:L?D<z?H=2:D>z*2?H=3:y<O/2?H=0:H=1:y<x?H=0:y>x*2?H=1:D<M/2?H=2:H=3,H){case 0:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"50%"}),this.toggleDropIntoPrompt(!1);break;case 1:this.doPositionOverlay({top:"50%",left:"0",width:"100%",height:"50%"}),this.toggleDropIntoPrompt(!1);break;case 2:this.doPositionOverlay({top:"0",left:"0",width:"50%",height:"100%"}),this.toggleDropIntoPrompt(!1);break;case 3:this.doPositionOverlay({top:"0",left:"50%",width:"50%",height:"100%"}),this.toggleDropIntoPrompt(!1);break;default:this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"100%"}),this.toggleDropIntoPrompt(!0)}const W=(0,I.assertIsDefined)(this.overlay);W.style.opacity="1",setTimeout(()=>W.classList.add("overlay-move-transition"),0),this.currentDropOperation={splitDirection:H}}doPositionOverlay(D){const[y,T]=(0,I.assertAllDefined)(this.container,this.overlay),_=this.getOverlayOffsetHeight();_?y.style.height=`calc(100% - ${_}px)`:y.style.height="100%",T.style.top=D.top,T.style.left=D.left,T.style.width=D.width,T.style.height=D.height}getOverlayOffsetHeight(){return!this.groupView.isEmpty&&this.accessor.partOptions.showTabs?this.groupView.titleHeight.offset:0}hideOverlay(){const D=(0,I.assertIsDefined)(this.overlay);this.doPositionOverlay({top:"0",left:"0",width:"100%",height:"100%"}),D.style.opacity="0",D.classList.remove("overlay-move-transition"),this.currentDropOperation=void 0}toggleDropIntoPrompt(D){!this.dropIntoPromptElement||(this.dropIntoPromptElement.style.opacity=D?"1":"0")}contains(D){return D===this.container||D===this.overlay}dispose(){super.dispose(),this._disposed=!0}};v.OVERLAY_ID="monaco-workbench-editor-drop-overlay",v=we([F(2,i.IThemeService),F(3,S.IConfigurationService),F(4,C.IInstantiationService),F(5,a.IEditorService),F(6,n.IEditorGroupsService),F(7,o.ITreeViewsService),F(8,f.IWorkspaceContextService)],v);let m=class extends i.Themable{constructor(D,y,T,_,L,M){super(_),this.accessor=D,this.container=y,this.delegate=T,this.configurationService=L,this.instantiationService=M,this.counter=0,this.editorTransfer=l.LocalSelectionTransfer.getInstance(),this.groupTransfer=l.LocalSelectionTransfer.getInstance(),this.registerListeners()}get overlay(){if(this._overlay&&!this._overlay.disposed)return this._overlay}registerListeners(){this._register((0,p.addDisposableListener)(this.container,p.EventType.DRAG_ENTER,D=>this.onDragEnter(D))),this._register((0,p.addDisposableListener)(this.container,p.EventType.DRAG_LEAVE,()=>this.onDragLeave())),[this.container,window].forEach(D=>this._register((0,p.addDisposableListener)(D,p.EventType.DRAG_END,()=>this.onDragEnd())))}onDragEnter(D){if(g(this.configurationService)&&h(D))return;if(this.counter++,!this.editorTransfer.hasData(l.DraggedEditorIdentifier.prototype)&&!this.groupTransfer.hasData(l.DraggedEditorGroupIdentifier.prototype)&&D.dataTransfer){const T=r.Registry.as(c.Extensions.DragAndDropContribution).getAll(),_=Array.from(T).map(L=>L.dataFormatKey);if(!(0,c.containsDragType)(D,t.DataTransfers.FILES,c.CodeDataTransfers.FILES,t.DataTransfers.RESOURCES,c.CodeDataTransfers.EDITORS,..._)){D.dataTransfer.dropEffect="none";return}}this.updateContainer(!0);const y=D.target;if(y&&(this.overlay&&!this.overlay.contains(y)&&this.disposeOverlay(),!this.overlay)){const T=this.findTargetGroupView(y);T&&(this._overlay=this.instantiationService.createInstance(v,this.accessor,T))}}onDragLeave(){this.counter--,this.counter===0&&this.updateContainer(!1)}onDragEnd(){this.counter=0,this.updateContainer(!1),this.disposeOverlay()}findTargetGroupView(D){return this.accessor.groups.find(T=>(0,p.isAncestor)(D,T.element)||this.delegate.containsGroup?.(T))}updateContainer(D){this.container.classList.toggle("dragged-over",D)}dispose(){super.dispose(),this.disposeOverlay()}disposeOverlay(){this.overlay&&(this.overlay.dispose(),this._overlay=void 0)}};m=we([F(3,i.IThemeService),F(4,S.IConfigurationService),F(5,C.IInstantiationService)],m),e.EditorDropTarget=m}),define(ae[1002],le([1,0,1502,181,10,139,79,36,2,84,15,8,7,37,5,38,26,48,33,12,205,188,516,963,43,71,19,13,86,21,177,245,1115]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TitleControl=e.EditorCommandsContextActionRunner=void 0;class L extends E.ActionRunner{constructor(N){super(),this.context=N}run(N,P){let B=this.context;return P?.preserveFocus&&(B={...this.context,preserveFocus:!0}),super.run(N,B)}}e.EditorCommandsContextActionRunner=L;let M=class extends d.Themable{constructor(N,P,B,V,z,x,H,W,U,$,q,X,G){super(q),this.accessor=P,this.group=B,this.contextMenuService=V,this.instantiationService=z,this.contextKeyService=x,this.keybindingService=H,this.notificationService=W,this.menuService=U,this.quickInputService=$,this.configurationService=X,this.fileService=G,this.editorTransfer=n.LocalSelectionTransfer.getInstance(),this.groupTransfer=n.LocalSelectionTransfer.getInstance(),this.treeItemsTransfer=n.LocalSelectionTransfer.getInstance(),this.breadcrumbsControl=void 0,this.editorToolBarMenuDisposables=this._register(new I.DisposableStore),this.resourceContext=this._register(z.createInstance(v.ResourceContextKey)),this.editorPinnedContext=v.ActiveEditorPinnedContext.bindTo(x),this.editorIsFirstContext=v.ActiveEditorFirstInGroupContext.bindTo(x),this.editorIsLastContext=v.ActiveEditorLastInGroupContext.bindTo(x),this.editorStickyContext=v.ActiveEditorStickyContext.bindTo(x),this.editorCanSplitInGroupContext=v.ActiveEditorCanSplitInGroupContext.bindTo(x),this.sideBySideEditorContext=v.SideBySideEditorActiveContext.bindTo(x),this.groupLockedContext=v.ActiveEditorGroupLockedContext.bindTo(x),this.renderDropdownAsChildElement=!1,this.create(N)}createBreadcrumbsControl(N,P){const B=this._register(o.BreadcrumbsConfig.IsEnabled.bindTo(this.configurationService));this._register(B.onDidChange(()=>{const V=B.getValue();!V&&this.breadcrumbsControl?(this.breadcrumbsControl.dispose(),this.breadcrumbsControl=void 0,this.handleBreadcrumbsEnablementChange()):V&&!this.breadcrumbsControl&&(this.breadcrumbsControl=this.instantiationService.createInstance(g.BreadcrumbsControl,N,P,this.group),this.breadcrumbsControl.update(),this.handleBreadcrumbsEnablementChange())})),B.getValue()&&(this.breadcrumbsControl=this.instantiationService.createInstance(g.BreadcrumbsControl,N,P,this.group)),this._register(this.fileService.onDidChangeFileSystemProviderRegistrations(()=>{this.breadcrumbsControl?.update()&&this.handleBreadcrumbsEnablementChange()}))}createEditorActionsToolBar(N){const P={groupId:this.group.id};this.editorActionsToolbar=this._register(this.instantiationService.createInstance(_.WorkbenchToolBar,N,{actionViewItemProvider:B=>this.actionViewItemProvider(B),orientation:0,ariaLabel:(0,t.localize)(0,null),getKeyBinding:B=>this.getKeybinding(B),actionRunner:this._register(new L(P)),anchorAlignmentProvider:()=>1,renderDropdownAsChildElement:this.renderDropdownAsChildElement,telemetrySource:"editorPart",resetMenu:S.MenuId.EditorTitle})),this.editorActionsToolbar.context=P,this._register(this.editorActionsToolbar.actionRunner.onDidRun(B=>{B.error&&!(0,y.isCancellationError)(B.error)&&this.notificationService.error(B.error)}))}actionViewItemProvider(N){const P=this.group.activeEditorPane;if(P instanceof a.EditorPane){const B=P.getActionViewItem(N);if(B)return B}return(0,b.createActionViewItem)(this.instantiationService,N,{menuAsChild:this.renderDropdownAsChildElement})}updateEditorActionsToolbar(){const{primary:N,secondary:P}=this.prepareEditorActions(this.getEditorActions());(0,w.assertIsDefined)(this.editorActionsToolbar).setActions((0,k.prepareActions)(N),(0,k.prepareActions)(P))}getEditorActions(){const N=[],P=[];if(this.editorToolBarMenuDisposables.clear(),this.contextKeyService.bufferChangeEvents(()=>{const V=this.group.activeEditor;this.resourceContext.set((0,w.withUndefinedAsNull)(h.EditorResourceAccessor.getOriginalUri(V,{supportSideBySide:h.SideBySideEditor.PRIMARY}))),this.editorPinnedContext.set(V?this.group.isPinned(V):!1),this.editorIsFirstContext.set(V?this.group.isFirst(V):!1),this.editorIsLastContext.set(V?this.group.isLast(V):!1),this.editorStickyContext.set(V?this.group.isSticky(V):!1),this.editorCanSplitInGroupContext.set(V?V.hasCapability(32):!1),this.sideBySideEditorContext.set(V?.typeId===T.SideBySideEditorInput.ID),this.groupLockedContext.set(this.group.isLocked)}),this.group.activeEditorPane instanceof a.EditorPane){const V=this.getEditorPaneAwareContextKeyService(),z=this.menuService.createMenu(S.MenuId.EditorTitle,V,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:0});this.editorToolBarMenuDisposables.add(z),this.editorToolBarMenuDisposables.add(z.onDidChange(()=>{this.updateEditorActionsToolbar()}));const x=(H,W)=>W==="navigation"&&H.actions.length<=1;(0,b.createAndFillInActionBarActions)(z,{arg:this.resourceContext.get(),shouldForwardArgs:!0},{primary:N,secondary:P},"navigation",9,x)}return{primary:N,secondary:P}}getEditorPaneAwareContextKeyService(){return this.group.activeEditorPane?.scopedContextKeyService??this.contextKeyService}clearEditorActionsToolbar(){this.editorActionsToolbar?.setActions([],[])}enableGroupDragging(N){this._register((0,R.addDisposableListener)(N,R.EventType.DRAG_START,P=>{if(P.target!==N)return;this.groupTransfer.setData([new n.DraggedEditorGroupIdentifier(this.group.id)],n.DraggedEditorGroupIdentifier.prototype),P.dataTransfer&&(P.dataTransfer.effectAllowed="copyMove");let B=!1;if(this.accessor.partOptions.showTabs?B=this.doFillResourceDataTransfers(this.group.getEditors(1),P):this.group.activeEditor&&(B=this.doFillResourceDataTransfers([this.group.activeEditor],P)),!B&&D.isFirefox&&P.dataTransfer?.setData(p.DataTransfers.TEXT,String(this.group.label)),this.group.activeEditor){let V=this.group.activeEditor.getName();this.accessor.partOptions.showTabs&&this.group.count>1&&(V=(0,t.localize)(1,null,V,this.group.count-1)),(0,p.applyDragImage)(P,V,"monaco-editor-group-drag-image")}})),this._register((0,R.addDisposableListener)(N,R.EventType.DRAG_END,()=>{this.groupTransfer.clearData(n.DraggedEditorGroupIdentifier.prototype)}))}doFillResourceDataTransfers(N,P){return N.length?(this.instantiationService.invokeFunction(n.fillEditorsDragData,N.map(B=>({editor:B,groupId:this.group.id})),P),!0):!1}onContextMenu(N,P,B){const V=this.resourceContext.get();this.resourceContext.set((0,w.withUndefinedAsNull)(h.EditorResourceAccessor.getOriginalUri(N,{supportSideBySide:h.SideBySideEditor.PRIMARY})));const z=!!this.editorPinnedContext.get();this.editorPinnedContext.set(this.group.isPinned(N));const x=!!this.editorIsFirstContext.get();this.editorIsFirstContext.set(this.group.isFirst(N));const H=!!this.editorIsLastContext.get();this.editorIsLastContext.set(this.group.isLast(N));const W=!!this.editorStickyContext.get();this.editorStickyContext.set(this.group.isSticky(N));const U=!!this.groupLockedContext.get();this.groupLockedContext.set(this.group.isLocked);const $=!!this.editorCanSplitInGroupContext.get();this.editorCanSplitInGroupContext.set(N.hasCapability(32));const q=!!this.sideBySideEditorContext.get();this.sideBySideEditorContext.set(N.typeId===T.SideBySideEditorInput.ID);let X=B;if(P instanceof MouseEvent){const G=new A.StandardMouseEvent(P);X={x:G.posx,y:G.posy}}this.contextMenuService.showContextMenu({getAnchor:()=>X,menuId:S.MenuId.EditorTitleContext,menuActionOptions:{shouldForwardArgs:!0,arg:this.resourceContext.get()},contextKeyService:this.contextKeyService,getActionsContext:()=>({groupId:this.group.id,editorIndex:this.group.getIndexOfEditor(N)}),getKeyBinding:G=>this.getKeybinding(G),onHide:()=>{this.resourceContext.set(V||null),this.editorPinnedContext.set(z),this.editorIsFirstContext.set(x),this.editorIsLastContext.set(H),this.editorStickyContext.set(W),this.groupLockedContext.set(U),this.editorCanSplitInGroupContext.set($),this.sideBySideEditorContext.set(q),this.accessor.activeGroup.focus()}})}getKeybinding(N){return this.keybindingService.lookupKeybinding(N.id,this.getEditorPaneAwareContextKeyService())}getKeybindingLabel(N){const P=this.getKeybinding(N);return P?(0,w.withNullAsUndefined)(P.getLabel()):void 0}dispose(){(0,I.dispose)(this.breadcrumbsControl),this.breadcrumbsControl=void 0,super.dispose()}};M=we([F(3,u.IContextMenuService),F(4,i.IInstantiationService),F(5,r.IContextKeyService),F(6,f.IKeybindingService),F(7,c.INotificationService),F(8,S.IMenuService),F(9,l.IQuickInputService),F(10,d.IThemeService),F(11,C.IConfigurationService),F(12,m.IFileService)],M),e.TitleControl=M,(0,d.registerThemingParticipant)((O,N)=>{const P=O.getColor(s.listActiveSelectionBackground),B=O.getColor(s.listActiveSelectionForeground);N.addRule(` .monaco-editor-group-drag-image { background: ${P}; color: ${B}; } `)})}),define(ae[2967],le([1,0,43,1002,218,80,133,10,204,65,13,52,2,1112]),function(J,e,t,p,R,A,k,E,I,b,S,C,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoTabsTitleControl=void 0;class u extends p.TitleControl{constructor(){super(...arguments),this.activeLabel=Object.create(null)}create(f){const c=this.titleContainer=f;c.draggable=!0,this.registerContainerListeners(c),this._register(k.Gesture.addTarget(c));const l=document.createElement("div");l.classList.add("label-container"),c.appendChild(l),this.editorLabel=this._register(this.instantiationService.createInstance(R.ResourceLabel,l,void 0)).element,this._register((0,E.addDisposableListener)(this.editorLabel.element,E.EventType.CLICK,d=>this.onTitleLabelClick(d))),this.createBreadcrumbsControl(l,{showFileIcons:!1,showSymbolIcons:!0,showDecorationColors:!1,breadcrumbsBackground:b.Color.transparent.toString(),showPlaceholder:!1}),c.classList.toggle("breadcrumbs",Boolean(this.breadcrumbsControl)),this._register((0,r.toDisposable)(()=>c.classList.remove("breadcrumbs")));const s=document.createElement("div");s.classList.add("title-actions"),c.appendChild(s),this.createEditorActionsToolBar(s)}registerContainerListeners(f){this.enableGroupDragging(f),this._register((0,E.addDisposableListener)(f,E.EventType.DBLCLICK,c=>this.onTitleDoubleClick(c))),this._register((0,E.addDisposableListener)(f,E.EventType.AUXCLICK,c=>this.onTitleAuxClick(c))),this._register((0,E.addDisposableListener)(f,k.EventType.Tap,c=>this.onTitleTap(c)));for(const c of[E.EventType.CONTEXT_MENU,k.EventType.Contextmenu])this._register((0,E.addDisposableListener)(f,c,l=>{this.group.activeEditor&&this.onContextMenu(this.group.activeEditor,l,f)}))}onTitleLabelClick(f){E.EventHelper.stop(f,!1),setTimeout(()=>this.quickInputService.quickAccess.show())}onTitleDoubleClick(f){E.EventHelper.stop(f),this.group.pinEditor()}onTitleAuxClick(f){f.button===1&&this.group.activeEditor&&(E.EventHelper.stop(f,!0),this.group.closeEditor(this.group.activeEditor))}onTitleTap(f){const c=f.initialTarget;!(c instanceof HTMLElement)||!this.editorLabel||!(0,E.isAncestor)(c,this.editorLabel.element)||setTimeout(()=>this.quickInputService.quickAccess.show(),50)}openEditor(f){this.doHandleOpenEditor()}openEditors(f){this.doHandleOpenEditor()}doHandleOpenEditor(){this.ifActiveEditorChanged(()=>this.redraw())||this.ifActiveEditorPropertiesChanged(()=>this.redraw())}closeEditor(f,c){this.ifActiveEditorChanged(()=>this.redraw())}closeEditors(f){this.ifActiveEditorChanged(()=>this.redraw())}moveEditor(f,c,l){this.ifActiveEditorChanged(()=>this.redraw())}pinEditor(f){this.ifEditorIsActive(f,()=>this.redraw())}stickEditor(f){}unstickEditor(f){}setActive(f){this.redraw()}updateEditorLabel(f){this.ifEditorIsActive(f,()=>this.redraw())}updateEditorDirty(f){this.ifEditorIsActive(f,()=>{const c=(0,S.assertIsDefined)(this.titleContainer);f.isDirty()&&!f.isSaving()?c.classList.add("dirty"):c.classList.remove("dirty")})}updateOptions(f,c){(f.labelFormat!==c.labelFormat||!(0,C.equals)(f.decorations,c.decorations))&&this.redraw()}updateStyles(){this.redraw()}handleBreadcrumbsEnablementChange(){(0,S.assertIsDefined)(this.titleContainer).classList.toggle("breadcrumbs",Boolean(this.breadcrumbsControl)),this.redraw()}ifActiveEditorChanged(f){return!this.activeLabel.editor&&this.group.activeEditor||this.activeLabel.editor&&!this.group.activeEditor||!this.activeLabel.editor||!this.group.isActive(this.activeLabel.editor)?(f(),!0):!1}ifActiveEditorPropertiesChanged(f){!this.activeLabel.editor||!this.group.activeEditor||this.activeLabel.pinned!==this.group.isPinned(this.group.activeEditor)&&f()}ifEditorIsActive(f,c){this.group.isActive(f)&&c()}redraw(){const f=(0,S.withNullAsUndefined)(this.group.activeEditor),c=this.accessor.partOptions,l=f?this.group.isPinned(f):!1,s=this.accessor.activeGroup===this.group;this.activeLabel={editor:f,pinned:l},this.breadcrumbsControl&&(s?(this.breadcrumbsControl.update(),this.breadcrumbsControl.domNode.classList.toggle("preview",!l)):this.breadcrumbsControl.hide());const[d,n]=(0,S.assertAllDefined)(this.titleContainer,this.editorLabel);if(!f)d.classList.remove("dirty"),n.clear(),this.clearEditorActionsToolbar();else{this.updateEditorDirty(f);const{labelFormat:a}=this.accessor.partOptions;let o;this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden()||a==="default"&&!s?o="":o=f.getDescription(this.getVerbosity(a))||"";let g=f.getTitle(2);o===g&&(g=""),n.setResource({resource:t.EditorResourceAccessor.getOriginalUri(f,{supportSideBySide:t.SideBySideEditor.BOTH}),name:f.getName(),description:o},{title:g,italic:!l,extraClasses:["no-tabs","title-label"].concat(f.getLabelExtraClasses()),fileDecorations:{colors:Boolean(c.decorations?.colors),badges:Boolean(c.decorations?.badges)}}),s?d.style.color=this.getColor(A.TAB_ACTIVE_FOREGROUND)||"":d.style.color=this.getColor(A.TAB_UNFOCUSED_ACTIVE_FOREGROUND)||"",this.updateEditorActionsToolbar()}}getVerbosity(f){switch(f){case"short":return 0;case"long":return 2;default:return 1}}prepareEditorActions(f){return this.accessor.activeGroup===this.group?f:{primary:f.primary.filter(l=>l.id===I.CLOSE_EDITOR_COMMAND_ID||l.id===I.UNLOCK_GROUP_COMMAND_ID),secondary:f.secondary}}getHeight(){return{total:u.HEIGHT,offset:0}}layout(f){return this.breadcrumbsControl?.layout(void 0),new E.Dimension(f.container.width,this.getHeight().total)}}e.NoTabsTitleControl=u,u.HEIGHT=35}),define(ae[2968],le([1,0,14,130,43,153,90,133,218,79,37,5,38,7,15,1002,48,2,147,60,12,80,33,205,26,58,10,1498,698,8,963,19,13,24,18,11,107,53,16,126,86,52,161,204,556,1114]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabsTitleControl=void 0;let q=class ui extends f.TitleControl{constructor(G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he,pe){super(G,Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne),this.editorService=ce,this.pathService=de,this.editorGroupService=he,this.treeViewsDragAndDropService=pe,this.closeEditorAction=this._register(this.instantiationService.createInstance(D.CloseOneEditorAction,D.CloseOneEditorAction.ID,D.CloseOneEditorAction.LABEL)),this.unpinEditorAction=this._register(this.instantiationService.createInstance(D.UnpinEditorAction,D.UnpinEditorAction.ID,D.UnpinEditorAction.LABEL)),this.tabResourceLabels=this._register(this.instantiationService.createInstance(I.ResourceLabels,I.DEFAULT_LABELS_CONTAINER)),this.tabLabels=[],this.tabActionBars=[],this.tabDisposables=[],this.dimensions={container:m.Dimension.None,available:m.Dimension.None},this.layoutScheduler=this._register(new l.MutableDisposable),this.path=t.isWindows?B.win32:B.posix,this.lastMouseWheelEventTime=0,this.updateEditorLabelScheduler=this._register(new N.RunOnceScheduler(()=>this.doUpdateEditorLabels(),0)),(async()=>this.path=await this.pathService.path)(),this._register(this.tabResourceLabels.onDidChangeDecorations(()=>this.doHandleDecorationsChange()))}create(G){this.titleContainer=G,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(E.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 Q=document.createElement("div");Q.classList.add("tabs-breadcrumbs"),this.titleContainer.appendChild(Q),this.createBreadcrumbsControl(Q,{showFileIcons:!0,showSymbolIcons:!0,showDecorationColors:!1,showPlaceholder:!0,breadcrumbsBackground:o.breadcrumbsBackground})}createTabsScrollbar(G){const Q=new s.ScrollableElement(G,{horizontal:1,horizontalScrollbarSize:this.getTabsScrollbarSizing(),vertical:2,scrollYToX:!0,useShadows:!1});return Q.onScroll(j=>{j.scrollLeftChanged&&(G.scrollLeft=j.scrollLeft)}),Q}updateTabsScrollbarSizing(){this.tabsScrollbar?.updateOptions({horizontalScrollbarSize:this.getTabsScrollbarSizing()})}getTabsScrollbarSizing(){return this.accessor.partOptions.titleScrollbarSizing!=="large"?ui.SCROLLBAR_SIZES.default:ui.SCROLLBAR_SIZES.large}registerTabsContainerListeners(G,Q){this.enableGroupDragging(G),this._register((0,m.addDisposableListener)(G,m.EventType.SCROLL,()=>{G.classList.contains("scroll")&&Q.setScrollPosition({scrollLeft:G.scrollLeft})}));for(const j of[E.EventType.Tap,m.EventType.DBLCLICK])this._register((0,m.addDisposableListener)(G,j,K=>{if(j===m.EventType.DBLCLICK){if(K.target!==G)return}else if(K.tapCount!==2||K.initialTarget!==G)return;m.EventHelper.stop(K),this.editorService.openEditor({resource:void 0,options:{pinned:!0,index:this.group.count,override:R.DEFAULT_EDITOR_ASSOCIATION.id}},this.group.id)}));this._register((0,m.addDisposableListener)(G,m.EventType.MOUSE_DOWN,j=>{j.button===1&&j.preventDefault()})),this._register(new m.DragAndDropObserver(G,{onDragEnter:j=>{if(G.classList.add("scroll"),j.target!==G){this.updateDropFeedback(G,!1);return}if(!this.isSupportedDropTransfer(j)){j.dataTransfer&&(j.dataTransfer.dropEffect="none");return}let K=!1;if(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)){K=!0;const Y=this.editorTransfer.getData(g.DraggedEditorIdentifier.prototype);if(Array.isArray(Y)){const ee=Y[0].identifier;if(this.group.id===ee.groupId&&this.group.getIndexOfEditor(ee.editor)===this.group.count-1){j.dataTransfer&&(j.dataTransfer.dropEffect="none");return}}}K||j.dataTransfer&&(j.dataTransfer.dropEffect="copy"),this.updateDropFeedback(G,!0)},onDragLeave:j=>{this.updateDropFeedback(G,!1),G.classList.remove("scroll")},onDragEnd:j=>{this.updateDropFeedback(G,!1),G.classList.remove("scroll")},onDrop:j=>{this.updateDropFeedback(G,!1),G.classList.remove("scroll"),j.target===G&&this.onDrop(j,this.group.count,G)}})),this._register((0,m.addDisposableListener)(G,m.EventType.MOUSE_WHEEL,j=>{const K=this.group.activeEditor;if(!K||this.group.count<2)return;if(this.accessor.partOptions.scrollToSwitchTabs===!0){if(j.shiftKey)return}else if(!j.shiftKey)return;const Y=Date.now();if(Y-this.lastMouseWheelEventTime<ui.MOUSE_WHEEL_EVENT_THRESHOLD-2*(Math.abs(j.deltaX)+Math.abs(j.deltaY)))return;this.lastMouseWheelEventTime=Y;let ee;if(j.deltaX+j.deltaY<-ui.MOUSE_WHEEL_DISTANCE_THRESHOLD)ee=-1;else if(j.deltaX+j.deltaY>ui.MOUSE_WHEEL_DISTANCE_THRESHOLD)ee=1;else return;const ie=this.group.getEditorByIndex(this.group.getIndexOfEditor(K)+ee);!ie||(this.group.openEditor(ie),m.EventHelper.stop(j,!0))}))}doHandleDecorationsChange(){this.layout(this.dimensions)}updateEditorActionsToolbar(){super.updateEditorActionsToolbar(),this.layout(this.dimensions)}openEditor(G){this.handleOpenedEditors()}openEditors(G){this.handleOpenedEditors()}handleOpenedEditors(){const[G,Q]=(0,L.assertAllDefined)(this.tabsContainer,this.tabsScrollbar);for(let j=G.children.length;j<this.group.count;j++)G.appendChild(this.createTab(j,G,Q));this.computeTabLabels(),this.redraw({forceRevealActiveTab:!0}),this.breadcrumbsControl?.update()}closeEditor(G,Q){this.handleClosedEditors(Q)}closeEditors(G){this.handleClosedEditors()}handleClosedEditors(G){if(this.group.activeEditor){const Q=(0,L.assertIsDefined)(this.tabsContainer);for(;Q.children.length>this.group.count;)Q.lastChild?.remove(),(0,l.dispose)(this.tabDisposables.pop());this.computeTabLabels(),this.redraw({forceRevealActiveTab:!0})}else this.tabsContainer&&(0,m.clearNode)(this.tabsContainer),this.tabDisposables=(0,l.dispose)(this.tabDisposables),this.tabResourceLabels.clear(),this.tabLabels=[],this.tabActionBars=[],this.clearEditorActionsToolbar(),this.breadcrumbsControl?.update()}moveEditor(G,Q,j){const K=this.tabLabels[Q];this.tabLabels.splice(Q,1),this.tabLabels.splice(j,0,K),this.forEachTab((Y,ee,ie,re,oe,se)=>{this.redrawTab(Y,ee,ie,re,oe,se)},Math.min(Q,j),Math.max(Q,j)),this.layout(this.dimensions,{forceRevealActiveTab:!0})}pinEditor(G){this.withTab(G,(Q,j,K,Y,ee)=>this.redrawTabLabel(Q,j,K,Y,ee))}stickEditor(G){this.doHandleStickyEditorChange(G)}unstickEditor(G){this.doHandleStickyEditorChange(G)}doHandleStickyEditorChange(G){this.withTab(G,(Q,j,K,Y,ee,ie)=>this.redrawTab(Q,j,K,Y,ee,ie)),this.forEachTab((Q,j,K,Y,ee)=>{this.redrawTabBorders(j,K)}),this.layout(this.dimensions,{forceRevealActiveTab:!0})}setActive(G){this.forEachTab((Q,j,K,Y,ee,ie)=>{this.redrawTabActiveAndDirty(G,Q,K,ie)}),this.updateEditorActionsToolbar(),this.layout(this.dimensions,{forceRevealActiveTab:!0})}updateEditorLabel(G){this.updateEditorLabelScheduler.schedule()}doUpdateEditorLabels(){this.computeTabLabels(),this.forEachTab((G,Q,j,K,Y)=>{this.redrawTabLabel(G,Q,j,K,Y)}),this.layout(this.dimensions)}updateEditorDirty(G){this.withTab(G,(Q,j,K,Y,ee,ie)=>this.redrawTabActiveAndDirty(this.accessor.activeGroup===this.group,Q,K,ie))}updateOptions(G,Q){G.labelFormat!==Q.labelFormat&&this.computeTabLabels(),G.titleScrollbarSizing!==Q.titleScrollbarSizing&&this.updateTabsScrollbarSizing(),(G.labelFormat!==Q.labelFormat||G.tabCloseButton!==Q.tabCloseButton||G.tabSizing!==Q.tabSizing||G.pinnedTabSizing!==Q.pinnedTabSizing||G.showIcons!==Q.showIcons||G.hasIcons!==Q.hasIcons||G.highlightModifiedTabs!==Q.highlightModifiedTabs||G.wrapTabs!==Q.wrapTabs||!(0,H.equals)(G.decorations,Q.decorations))&&this.redraw()}updateStyles(){this.redraw()}forEachTab(G,Q,j){this.group.editors.forEach((K,Y)=>{typeof Q=="number"&&Q>Y||typeof j=="number"&&j<Y||this.doWithTab(Y,K,G)})}withTab(G,Q){this.doWithTab(this.group.getIndexOfEditor(G),G,Q)}doWithTab(G,Q,j){const Y=(0,L.assertIsDefined)(this.tabsContainer).children[G],ee=this.tabResourceLabels.get(G),ie=this.tabLabels[G],re=this.tabActionBars[G];Y&&ee&&ie&&j(Q,G,Y,ee,ie,re)}createTab(G,Q,j){const K=document.createElement("div");K.draggable=!0,K.setAttribute("role","tab"),K.classList.add("tab"),this._register(E.Gesture.addTarget(K));const Y=document.createElement("div");Y.classList.add("tab-border-top-container"),K.appendChild(Y);const ee=this.tabResourceLabels.create(K),ie=document.createElement("div");ie.classList.add("tab-actions"),K.appendChild(ie);const re=new f.EditorCommandsContextActionRunner({groupId:this.group.id,editorIndex:G}),oe=new b.ActionBar(ie,{ariaLabel:(0,w.localize)(0,null),actionRunner:re});oe.onWillRun(ne=>{ne.action.id===this.closeEditorAction.id&&this.blockRevealActiveTabOnce()});const se=(0,l.combinedDisposable)(oe,(0,l.toDisposable)((0,V.insert)(this.tabActionBars,oe))),te=document.createElement("div");te.classList.add("tab-border-bottom-container"),K.appendChild(te);const Z=this.registerTabListeners(K,G,Q,j);return this.tabDisposables.push((0,l.combinedDisposable)(Z,se,re,ee)),K}registerTabListeners(G,Q,j,K){const Y=new l.DisposableStore,ee=(re,oe)=>{if(G.blur(),re instanceof MouseEvent&&re.button!==0){re.button===1&&re.preventDefault();return}if(this.originatesFromTabActionBar(re))return;const se=this.group.getEditorByIndex(Q);se&&this.group.openEditor(se,{preserveFocus:oe,activation:W.EditorActivation.ACTIVATE})},ie=re=>{m.EventHelper.stop(re);const oe=this.group.getEditorByIndex(Q);oe&&this.onContextMenu(oe,re,G)};Y.add((0,m.addDisposableListener)(G,m.EventType.MOUSE_DOWN,re=>ee(re,!1))),Y.add((0,m.addDisposableListener)(G,E.EventType.Tap,re=>ee(re,!0))),Y.add((0,m.addDisposableListener)(G,E.EventType.Change,re=>{K.setScrollPosition({scrollLeft:K.getScrollPosition().scrollLeft-re.translationX})})),Y.add((0,m.addDisposableListener)(G,m.EventType.MOUSE_UP,re=>{m.EventHelper.stop(re),G.blur()})),Y.add((0,m.addDisposableListener)(G,m.EventType.AUXCLICK,re=>{re.button===1&&(m.EventHelper.stop(re,!0),this.blockRevealActiveTabOnce(),this.closeEditorAction.run({groupId:this.group.id,editorIndex:Q}))})),Y.add((0,m.addDisposableListener)(G,m.EventType.KEY_DOWN,re=>{const oe=new k.StandardKeyboardEvent(re);oe.shiftKey&&oe.keyCode===68&&ie(re)})),Y.add((0,m.addDisposableListener)(G,E.EventType.Contextmenu,re=>{ie(re)})),Y.add((0,m.addDisposableListener)(G,m.EventType.KEY_UP,re=>{const oe=new k.StandardKeyboardEvent(re);let se=!1;if(oe.equals(3)||oe.equals(10)){se=!0;const te=this.group.getEditorByIndex(Q);te&&this.group.openEditor(te)}else if([15,17,16,18,14,13].some(te=>oe.equals(te))){let te;oe.equals(15)||oe.equals(16)?te=Q-1:oe.equals(17)||oe.equals(18)?te=Q+1:oe.equals(14)?te=0:te=this.group.count-1;const Z=this.group.getEditorByIndex(te);Z&&(se=!0,this.group.openEditor(Z,{preserveFocus:!0}),j.childNodes[te].focus())}se&&m.EventHelper.stop(re,!0),K.setScrollPosition({scrollLeft:j.scrollLeft})}));for(const re of[E.EventType.Tap,m.EventType.DBLCLICK])Y.add((0,m.addDisposableListener)(G,re,oe=>{if(re===m.EventType.DBLCLICK)m.EventHelper.stop(oe);else if(oe.tapCount!==2)return;const se=this.group.getEditorByIndex(Q);se&&this.group.isPinned(se)?this.accessor.arrangeGroups(2,this.group):this.group.pinEditor(se)}));return Y.add((0,m.addDisposableListener)(G,m.EventType.CONTEXT_MENU,re=>{m.EventHelper.stop(re,!0);const oe=this.group.getEditorByIndex(Q);oe&&this.onContextMenu(oe,re,G)},!0)),Y.add((0,m.addDisposableListener)(G,m.EventType.DRAG_START,re=>{const oe=this.group.getEditorByIndex(Q);!oe||(this.editorTransfer.setData([new g.DraggedEditorIdentifier({editor:oe,groupId:this.group.id})],g.DraggedEditorIdentifier.prototype),re.dataTransfer&&(re.dataTransfer.effectAllowed="copyMove"),this.doFillResourceDataTransfers([oe],re),G.classList.add("dragged"),(0,m.scheduleAtNextAnimationFrame)(()=>G.classList.remove("dragged")))})),Y.add(new m.DragAndDropObserver(G,{onDragEnter:re=>{if(G.classList.add("dragged-over"),!this.isSupportedDropTransfer(re)){re.dataTransfer&&(re.dataTransfer.dropEffect="none");return}let oe=!1;if(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)){oe=!0;const se=this.editorTransfer.getData(g.DraggedEditorIdentifier.prototype);if(Array.isArray(se)){const te=se[0].identifier;if(te.editor===this.group.getEditorByIndex(Q)&&te.groupId===this.group.id){re.dataTransfer&&(re.dataTransfer.dropEffect="none");return}}}oe||re.dataTransfer&&(re.dataTransfer.dropEffect="copy"),this.updateDropFeedback(G,!0,Q)},onDragOver:(re,oe)=>{if(oe>=ui.DRAG_OVER_OPEN_TAB_THRESHOLD){const se=this.group.getEditorByIndex(Q);se&&this.group.activeEditor!==se&&this.group.openEditor(se,{preserveFocus:!0})}},onDragLeave:()=>{G.classList.remove("dragged-over"),this.updateDropFeedback(G,!1,Q)},onDragEnd:()=>{G.classList.remove("dragged-over"),this.updateDropFeedback(G,!1,Q),this.editorTransfer.clearData(g.DraggedEditorIdentifier.prototype)},onDrop:re=>{G.classList.remove("dragged-over"),this.updateDropFeedback(G,!1,Q),this.onDrop(re,Q,j)}})),Y}isSupportedDropTransfer(G){if(this.groupTransfer.hasData(g.DraggedEditorGroupIdentifier.prototype)){const Q=this.groupTransfer.getData(g.DraggedEditorGroupIdentifier.prototype);return!(Array.isArray(Q)&&Q[0].identifier===this.group.id)}return!!(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)||G.dataTransfer&&G.dataTransfer.types.length>0)}updateDropFeedback(G,Q,j){const K=typeof j=="number",Y=typeof j=="number"?this.group.getEditorByIndex(j):void 0,ee=K&&!!Y&&this.group.isActive(Y),ie=K?this.getColor(ee?a.TAB_ACTIVE_BACKGROUND:a.TAB_INACTIVE_BACKGROUND):"";G.style.backgroundColor=(Q?this.getColor(a.EDITOR_DRAG_AND_DROP_BACKGROUND):ie)||"";const re=this.getColor(o.activeContrastBorder);re&&Q?(G.style.outlineWidth="2px",G.style.outlineStyle="dashed",G.style.outlineColor=re,G.style.outlineOffset=K?"-5px":"-3px"):(G.style.outlineWidth="",G.style.outlineStyle="",G.style.outlineColor=re||"",G.style.outlineOffset="")}computeTabLabels(){const{labelFormat:G}=this.accessor.partOptions,{verbosity:Q,shortenDuplicates:j}=this.getLabelConfigFlags(G),K=this.group.editors.map((Y,ee)=>({editor:Y,name:Y.getName(),description:Y.getDescription(Q),forceDescription:Y.hasCapability(64),title:Y.getTitle(2),ariaLabel:(0,A.computeEditorAriaLabel)(Y,ee,this.group,this.editorGroupService.count)}));j&&this.shortenTabLabels(K),this.tabLabels=K}shortenTabLabels(G){const Q=new Map;for(const j of G)typeof j.description=="string"?(0,d.getOrSet)(Q,j.name,[]).push(j):j.description="";for(const[,j]of Q){if(j.length===1&&!j[0].forceDescription){j[0].description="";continue}const K=new Map;for(const re of j)(0,d.getOrSet)(K,re.description,[]).push(re);let Y=!1;for(const[,re]of K)if(!Y&&re.length>1){const[oe,...se]=re.map(({editor:te})=>te.getDescription(2));Y=se.some(te=>te!==oe)}if(Y){K.clear();for(const re of j)re.description=re.editor.getDescription(2),(0,d.getOrSet)(K,re.description,[]).push(re)}const ee=[];for(const[re]of K)ee.push(re);if(ee.length===1){for(const re of K.get(ee[0])||[])re.forceDescription||(re.description="");continue}const ie=(0,p.shorten)(ee,this.path.sep);ee.forEach((re,oe)=>{for(const se of K.get(re)||[])se.description=ie[oe]})}}getLabelConfigFlags(G){switch(G){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(G){if(this.tabsAndActionsContainer){let Q=this.getColor(a.EDITOR_GROUP_HEADER_TABS_BORDER);!Q&&(0,z.isHighContrast)(this.theme.type)&&(Q=this.getColor(a.TAB_BORDER)||this.getColor(o.contrastBorder)),Q?(this.tabsAndActionsContainer.classList.add("tabs-border-bottom"),this.tabsAndActionsContainer.style.setProperty("--tabs-border-bottom-color",Q.toString())):(this.tabsAndActionsContainer.classList.remove("tabs-border-bottom"),this.tabsAndActionsContainer.style.removeProperty("--tabs-border-bottom-color"))}this.forEachTab((Q,j,K,Y,ee,ie)=>{this.redrawTab(Q,j,K,Y,ee,ie)}),this.updateEditorActionsToolbar(),this.layout(this.dimensions,G)}redrawTab(G,Q,j,K,Y,ee){const ie=this.group.isSticky(Q),re=this.accessor.partOptions;this.redrawTabLabel(G,Q,j,K,Y);const oe=ie?this.unpinEditorAction:this.closeEditorAction;ee.hasAction(oe)||(ee.isEmpty()||ee.clear(),ee.push(oe,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(oe)}));const se=ie&&re.pinnedTabSizing==="compact"?"off":re.tabCloseButton;for(const Z of["off","left","right"])j.classList.toggle(`tab-actions-${Z}`,se===Z);const te=ie&&re.pinnedTabSizing==="shrink"?"shrink":re.tabSizing;for(const Z of["fit","shrink"])j.classList.toggle(`sizing-${Z}`,te===Z);j.classList.toggle("has-icon",re.showIcons&&re.hasIcons),j.classList.toggle("sticky",ie);for(const Z of["normal","compact","shrink"])j.classList.toggle(`sticky-${Z}`,ie&&re.pinnedTabSizing===Z);if(!re.wrapTabs&&ie&&re.pinnedTabSizing!=="normal"){let Z=0;switch(re.pinnedTabSizing){case"compact":Z=ui.TAB_WIDTH.compact;break;case"shrink":Z=ui.TAB_WIDTH.shrink;break}j.style.left=`${Q*Z}px`}else j.style.left="auto";this.redrawTabBorders(Q,j),this.redrawTabActiveAndDirty(this.accessor.activeGroup===this.group,G,j,ee)}redrawTabLabel(G,Q,j,K,Y){const ee=this.accessor.partOptions;let ie,re=!1,oe=Boolean(ee.decorations?.badges),se;ee.pinnedTabSizing==="compact"&&this.group.isSticky(Q)?(ie=ee.showIcons&&ee.hasIcons?"":Y.name?.charAt(0).toUpperCase(),se="",re=!0,oe=!1):(ie=Y.name,se=Y.description||""),Y.ariaLabel&&(j.setAttribute("aria-label",Y.ariaLabel),j.setAttribute("aria-description",""));const te=Y.title||"";j.title=te,K.setResource({name:ie,description:se,resource:R.EditorResourceAccessor.getOriginalUri(G,{supportSideBySide:R.SideBySideEditor.BOTH})},{title:te,extraClasses:(0,V.coalesce)(["tab-label",oe?"tab-label-has-badge":void 0].concat(G.getLabelExtraClasses())),italic:!this.group.isPinned(G),forceLabel:re,fileDecorations:{colors:Boolean(ee.decorations?.colors),badges:oe}});const Z=R.EditorResourceAccessor.getOriginalUri(G,{supportSideBySide:R.SideBySideEditor.PRIMARY});Z?j.setAttribute("data-resource-name",(0,O.basenameOrAuthority)(Z)):j.removeAttribute("data-resource-name")}redrawTabActiveAndDirty(G,Q,j,K){const Y=this.group.isActive(Q),ee=this.doRedrawTabDirty(G,Y,Q,j);this.doRedrawTabActive(G,!ee,Q,j,K)}doRedrawTabActive(G,Q,j,K,Y){if(this.group.isActive(j)){K.classList.add("active"),K.setAttribute("aria-selected","true"),K.tabIndex=0,K.style.backgroundColor=this.getColor(G?a.TAB_ACTIVE_BACKGROUND:a.TAB_UNFOCUSED_ACTIVE_BACKGROUND)||"";const ee=this.getColor(G?a.TAB_ACTIVE_BORDER:a.TAB_UNFOCUSED_ACTIVE_BORDER);ee?(K.classList.add("tab-border-bottom"),K.style.setProperty("--tab-border-bottom-color",ee.toString())):(K.classList.remove("tab-border-bottom"),K.style.removeProperty("--tab-border-bottom-color"));const ie=Q?this.getColor(G?a.TAB_ACTIVE_BORDER_TOP:a.TAB_UNFOCUSED_ACTIVE_BORDER_TOP):void 0;ie?(K.classList.add("tab-border-top"),K.style.setProperty("--tab-border-top-color",ie.toString())):(K.classList.remove("tab-border-top"),K.style.removeProperty("--tab-border-top-color")),K.style.color=this.getColor(G?a.TAB_ACTIVE_FOREGROUND:a.TAB_UNFOCUSED_ACTIVE_FOREGROUND)||"",Y.setFocusable(!0)}else K.classList.remove("active"),K.setAttribute("aria-selected","false"),K.tabIndex=-1,K.style.backgroundColor=this.getColor(G?a.TAB_INACTIVE_BACKGROUND:a.TAB_UNFOCUSED_INACTIVE_BACKGROUND)||"",K.style.boxShadow="",K.style.color=this.getColor(G?a.TAB_INACTIVE_FOREGROUND:a.TAB_UNFOCUSED_INACTIVE_FOREGROUND)||"",Y.setFocusable(!1)}doRedrawTabDirty(G,Q,j,K){let Y=!1;if(j.isDirty()&&!j.isSaving())if(K.classList.add("dirty"),this.accessor.partOptions.highlightModifiedTabs){let ee;G&&Q?ee=this.getColor(a.TAB_ACTIVE_MODIFIED_BORDER):G&&!Q?ee=this.getColor(a.TAB_INACTIVE_MODIFIED_BORDER):!G&&Q?ee=this.getColor(a.TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER):ee=this.getColor(a.TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER),ee&&(Y=!0,K.classList.add("dirty-border-top"),K.style.setProperty("--tab-dirty-border-top-color",ee))}else K.classList.remove("dirty-border-top"),K.style.removeProperty("--tab-dirty-border-top-color");else K.classList.remove("dirty","dirty-border-top"),K.style.removeProperty("--tab-dirty-border-top-color");return Y}redrawTabBorders(G,Q){const Y=(this.group.isSticky(G)&&this.group.stickyCount===G+1?this.getColor(a.TAB_LAST_PINNED_BORDER):void 0)||this.getColor(a.TAB_BORDER)||this.getColor(o.contrastBorder);Q.style.borderRight=Y?`1px solid ${Y}`:"",Q.style.outlineColor=this.getColor(o.activeContrastBorder)||""}prepareEditorActions(G){return this.accessor.activeGroup===this.group?G:{primary:G.primary.filter(j=>j.id===U.UNLOCK_GROUP_COMMAND_ID),secondary:G.secondary}}getHeight(){const G=this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden();return this.dimensions.used?{total:this.dimensions.used.height,offset:G?this.dimensions.used.height-T.BreadcrumbsControl.HEIGHT:this.dimensions.used.height}:this.computeHeight()}computeHeight(){let G;this.accessor.partOptions.wrapTabs&&this.tabsAndActionsContainer?.classList.contains("wrapping")?G=this.tabsAndActionsContainer.offsetHeight:G=ui.TAB_HEIGHT;const Q=G;return this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden()&&(G+=T.BreadcrumbsControl.HEIGHT),{total:G,offset:Q}}layout(G,Q){if(Object.assign(this.dimensions,G),!this.layoutScheduler.value){const j=(0,m.scheduleAtNextAnimationFrame)(()=>{this.doLayout(this.dimensions,this.layoutScheduler.value?.options),this.layoutScheduler.clear()});this.layoutScheduler.value={options:Q,dispose:()=>j.dispose()}}return Q?.forceRevealActiveTab&&(this.layoutScheduler.value.options={...this.layoutScheduler.value.options,forceRevealActiveTab:!0}),this.dimensions.used||(this.dimensions.used=new m.Dimension(G.container.width,this.computeHeight().total)),this.dimensions.used}doLayout(G,Q){const j=this.group.activeEditor?this.getTabAndIndex(this.group.activeEditor):void 0;if(j&&G.container!==m.Dimension.None&&G.available!==m.Dimension.None){this.doLayoutBreadcrumbs(G);const[ee,ie]=j;this.doLayoutTabs(ee,ie,G,Q)}const K=this.dimensions.used,Y=this.dimensions.used=new m.Dimension(G.container.width,this.computeHeight().total);K&&K.height!==Y.height&&this.group.relayout()}handleBreadcrumbsEnablementChange(){this.group.relayout()}doLayoutBreadcrumbs(G){this.breadcrumbsControl&&!this.breadcrumbsControl.isHidden()&&this.breadcrumbsControl.layout(new m.Dimension(G.container.width,T.BreadcrumbsControl.HEIGHT))}doLayoutTabs(G,Q,j,K){this.doLayoutTabsWrapping(j)||this.doLayoutTabsNonWrapping(G,Q,K)}doLayoutTabsWrapping(G){const[Q,j,K,Y]=(0,L.assertAllDefined)(this.tabsAndActionsContainer,this.tabsContainer,this.editorToolbarContainer,this.tabsScrollbar),ee=Q.classList.contains("wrapping");let ie=ee;function re(oe){ie=oe,Q.classList.toggle("wrapping",ie),j.style.setProperty("--last-tab-margin-right",ie?`${K.offsetWidth}px`:"0")}if(this.accessor.partOptions.wrapTabs){const oe=j.offsetWidth,se=j.scrollWidth,te=()=>{const Z=this.getLastTab();return Z?!(Z.offsetWidth+K.offsetWidth-G.available.width>1):!0};(ie||se>oe&&te())&&re(!0),ie&&(j.offsetHeight>G.available.height||se===oe&&j.offsetHeight===ui.TAB_HEIGHT||!te())&&re(!1)}else ee&&re(!1);if(ie&&!ee){const oe=j.offsetWidth;Y.setScrollDimensions({width:oe,scrollWidth:oe})}if(ie){const oe=new Map;let se,te;for(const Z of j.children){const ne=Z,ce=ne.offsetTop;ce!==se&&(se=ce,te&&oe.set(te,!0)),te=ne,oe.set(ne,!1)}te&&oe.set(te,!0);for(const[Z,ne]of oe)Z.classList.toggle("last-in-row",ne)}return ie}doLayoutTabsNonWrapping(G,Q,j){const[K,Y]=(0,L.assertAllDefined)(this.tabsContainer,this.tabsScrollbar),ee=K.offsetWidth,ie=K.scrollWidth;let re=0;if(this.group.stickyCount>0){let Se=0;switch(this.accessor.partOptions.pinnedTabSizing){case"compact":Se=ui.TAB_WIDTH.compact;break;case"shrink":Se=ui.TAB_WIDTH.shrink;break}re=this.group.stickyCount*Se}let oe=this.accessor.partOptions.pinnedTabSizing!=="normal"&&this.group.isSticky(Q),se=ee-re;this.group.stickyCount>0&&se<ui.TAB_WIDTH.fit?(K.classList.add("disable-sticky-tabs"),se=ee,re=0,oe=!1):K.classList.remove("disable-sticky-tabs");let te,Z;this.blockRevealActiveTab||(te=G.offsetLeft,Z=G.offsetWidth);const{width:ne,scrollWidth:ce}=Y.getScrollDimensions();Y.setScrollDimensions({width:ee,scrollWidth:ie});const de=ne!==ee||ce!==ie;if(this.blockRevealActiveTab||typeof te!="number"||typeof Z!="number"||oe||!de&&!j?.forceRevealActiveTab){this.blockRevealActiveTab=!1;return}const he=Y.getScrollPosition().scrollLeft,pe=Z<=se,me=te-re;pe&&he+se<me+Z?Y.setScrollPosition({scrollLeft:he+(me+Z-(he+se))}):(he>me||!pe)&&Y.setScrollPosition({scrollLeft:me})}getTabAndIndex(G){const Q=this.group.getIndexOfEditor(G),j=this.getTabAtIndex(Q);if(j)return[j,Q]}getTabAtIndex(G){if(G>=0)return(0,L.assertIsDefined)(this.tabsContainer).children[G]}getLastTab(){return this.getTabAtIndex(this.group.count-1)}blockRevealActiveTabOnce(){this.blockRevealActiveTab=!0}originatesFromTabActionBar(G){let Q;return G instanceof MouseEvent?Q=G.target||G.srcElement:Q=G.initialTarget,!!(0,m.findParentWithClass)(Q,"action-item","tab")}async onDrop(G,Q,j){if(m.EventHelper.stop(G,!0),this.updateDropFeedback(j,!1),j.classList.remove("scroll"),this.groupTransfer.hasData(g.DraggedEditorGroupIdentifier.prototype)){const K=this.groupTransfer.getData(g.DraggedEditorGroupIdentifier.prototype);if(Array.isArray(K)){const Y=this.accessor.getGroup(K[0].identifier);if(Y){const ee={index:Q};this.isMoveOperation(G,Y.id)||(ee.mode=0),this.accessor.mergeGroup(Y,this.group,ee)}this.group.focus(),this.groupTransfer.clearData(g.DraggedEditorGroupIdentifier.prototype)}}else if(this.editorTransfer.hasData(g.DraggedEditorIdentifier.prototype)){const K=this.editorTransfer.getData(g.DraggedEditorIdentifier.prototype);if(Array.isArray(K)){const Y=K[0].identifier,ee=this.accessor.getGroup(Y.groupId);ee&&(this.isMoveOperation(G,Y.groupId,Y.editor)?ee.moveEditor(Y.editor,this.group,{index:Q}):ee.copyEditor(Y.editor,this.group,{index:Q})),this.group.focus(),this.editorTransfer.clearData(g.DraggedEditorIdentifier.prototype)}}else if(this.treeItemsTransfer.hasData(g.DraggedTreeItemsIdentifier.prototype)){const K=this.treeItemsTransfer.getData(g.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(K)){const Y=[];for(const ee of K){const ie=await this.treeViewsDragAndDropService.removeDragOperationTransfer(ee.identifier);if(ie){const re=await(0,g.extractTreeDropData)(ie);Y.push(...re.map(oe=>({...oe,options:{...oe.options,pinned:!0,index:Q}})))}}this.editorService.openEditors(Y,this.group,{validateTrust:!0})}this.treeItemsTransfer.clearData(g.DraggedTreeItemsIdentifier.prototype)}else this.instantiationService.createInstance(g.ResourcesDropHandler,{allowWorkspaceOpen:!1}).handleDrop(G,()=>this.group,()=>this.group.focus(),Q)}isMoveOperation(G,Q,j){return j?.hasCapability(8)?!0:!(G.ctrlKey&&!t.isMacintosh||G.altKey&&t.isMacintosh)||Q===this.group.id}dispose(){super.dispose(),this.tabDisposables=(0,l.dispose)(this.tabDisposables)}};q.SCROLLBAR_SIZES={default:3,large:10},q.TAB_WIDTH={compact:38,shrink:80,fit:120},q.TAB_HEIGHT=35,q.DRAG_OVER_OPEN_TAB_THRESHOLD=1500,q.MOUSE_WHEEL_EVENT_THRESHOLD=150,q.MOUSE_WHEEL_DISTANCE_THRESHOLD=1.5,q=we([F(3,S.IContextMenuService),F(4,C.IInstantiationService),F(5,u.IContextKeyService),F(6,r.IKeybindingService),F(7,h.INotificationService),F(8,i.IMenuService),F(9,c.IQuickInputService),F(10,n.IThemeService),F(11,y.IConfigurationService),F(12,_.IFileService),F(13,M.IEditorService),F(14,P.IPathService),F(15,v.IEditorGroupsService),F(16,$.ITreeViewsService)],q),e.TabsTitleControl=q,(0,n.registerThemingParticipant)((X,G)=>{const Q=X.getColor(a.TAB_BORDER);Q&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title > .tabs-and-actions-container.wrapping .tabs-container > .tab { border-bottom: 1px solid ${Q}; } `);const j=X.getColor(o.activeContrastBorder);j&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active, .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active:hover { outline: 1px solid; outline-offset: -5px; } .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active { outline: 1px dotted; 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 K=X.getColor(o.contrastBorder);K&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .editor-actions { outline: 1px solid ${K} } `);const Y=X.getColor(a.TAB_HOVER_BACKGROUND);Y&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover { background-color: ${Y} !important; } `);const ee=X.getColor(a.TAB_UNFOCUSED_HOVER_BACKGROUND);ee&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover { background-color: ${ee} !important; } `);const ie=X.getColor(a.TAB_HOVER_FOREGROUND);ie&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab:hover { color: ${ie} !important; } `);const re=X.getColor(a.TAB_UNFOCUSED_HOVER_FOREGROUND);re&&G.addRule(` .monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:hover { color: ${re} !important; } `);const oe=X.getColor(a.TAB_HOVER_BORDER);oe&&G.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: ${oe}; } `);const se=X.getColor(a.TAB_UNFOCUSED_HOVER_BORDER);if(se&&G.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: ${se}; } `),(0,z.isHighContrast)(X.type)&&!x.isSafari&&!j){const te=(0,a.WORKBENCH_BACKGROUND)(X),Z=X.getColor(o.editorBackground),ne=X.getColor(a.EDITOR_GROUP_HEADER_TABS_BACKGROUND),ce=X.getColor(a.EDITOR_DRAG_AND_DROP_BACKGROUND);let de;ne&&Z&&(de=ne.flatten(Z,Z,te));let he;ne&&Z&&ce&&Z&&(he=ne.flatten(Z,ce,Z,te));const pe=(ge,ue,Ce=!1)=>` .monaco-workbench .part.editor > .content:not(.dragged-over) .editor-group-container${Ce?".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, ${ge}, transparent) !important; } .monaco-workbench .part.editor > .content.dragged-over .editor-group-container${Ce?".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, ${ue}, transparent) !important; } `;if(Y&&de&&he){const ge=Y.flatten(de),ue=Y.flatten(he);G.addRule(pe(ge,ue,!0))}if(ee&&de&&he){const ge=ee.flatten(de),ue=ee.flatten(he);G.addRule(pe(ge,ue))}if(ce&&he){const ge=ce.flatten(he);G.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, ${ge}, transparent) !important; } `)}const me=(ge,ue,Ce,De)=>` .monaco-workbench .part.editor > .content:not(.dragged-over) .editor-group-container${Ce?".active":":not(.active)"} > .title .tabs-container > .tab.sizing-shrink${De?".active":""}:not(.dragged):not(.sticky-compact) > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${ge}, transparent); } .monaco-workbench .part.editor > .content.dragged-over .editor-group-container${Ce?".active":":not(.active)"} > .title .tabs-container > .tab.sizing-shrink${De?".active":""}:not(.dragged):not(.sticky-compact) > .tab-label > .monaco-icon-label-container::after { background: linear-gradient(to left, ${ue}, transparent); } `,Se=X.getColor(a.TAB_ACTIVE_BACKGROUND);if(Se&&de&&he){const ge=Se.flatten(de),ue=Se.flatten(he);G.addRule(me(ge,ue,!0,!0))}const Ie=X.getColor(a.TAB_UNFOCUSED_ACTIVE_BACKGROUND);if(Ie&&de&&he){const ge=Ie.flatten(de),ue=Ie.flatten(he);G.addRule(me(ge,ue,!1,!0))}const ve=X.getColor(a.TAB_INACTIVE_BACKGROUND);if(ve&&de&&he){const ge=ve.flatten(de),ue=ve.flatten(he);G.addRule(me(ge,ue,!0,!1))}const be=X.getColor(a.TAB_UNFOCUSED_INACTIVE_BACKGROUND);if(be&&de&&he){const ge=be.flatten(de),ue=be.flatten(he);G.addRule(me(ge,ue,!1,!1))}}})}),define(ae[2969],le([1,0,666,43,71,177,6,5,10,151,7,303,73,12,33,80,2968,2901,66,682,1492,16,2,27,11,133,311,79,38,2967,15,139,84,37,24,108,376,18,22,161,47,157,13,57,14,25,1108]),function(J,e,t,p,R,A,k,E,I,b,S,C,r,u,i,f,c,l,s,d,n,a,o,g,h,v,m,w,D,y,T,_,L,M,O,N,P,B,V,z,x,H,W,U,$,q){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorGroupView=void 0;let X=class en extends u.Themable{static createNew(Q,j,K){return K.createInstance(en,Q,null,j)}static createFromSerialized(Q,j,K,Y){return Y.createInstance(en,j,Q,K)}static createCopy(Q,j,K,Y){return Y.createInstance(en,j,Q,K)}constructor(Q,j,K,Y,ee,ie,re,oe,se,te,Z,ne,ce,de,he){super(ie),this.accessor=Q,this._index=K,this.instantiationService=Y,this.contextKeyService=ee,this.telemetryService=re,this.keybindingService=oe,this.menuService=se,this.contextMenuService=te,this.fileDialogService=Z,this.editorService=ne,this.filesConfigurationService=ce,this.uriIdentityService=de,this.logService=he,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 h.RunOnceWorker(me=>this.handleDisposedEditors(me),0)),this.mapEditorToPendingConfirmation=new Map,this.containerToolBarMenuDisposable=this._register(new o.MutableDisposable),this.whenRestoredPromise=new h.DeferredPromise,this.whenRestored=this.whenRestoredPromise.p,this._disposed=!1,this.element=document.createElement("div"),this._onDidChange=this._register(new k.Relay),this.onDidChange=this._onDidChange.event,j instanceof en?this.model=this._register(j.model.clone()):(0,t.isSerializedEditorGroupModel)(j)?this.model=this._register(Y.createInstance(t.EditorGroupModel,j)):this.model=this._register(Y.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 me=document.createElement("div");me.classList.add("editor-group-letterpress"),this.element.appendChild(me),this.progressBar=this._register(new C.ProgressBar(this.element)),this._register((0,r.attachProgressBarStyler)(this.progressBar,this.themeService)),this.progressBar.hide(),this.scopedInstantiationService=this.instantiationService.createChild(new b.ServiceCollection([S.IContextKeyService,this.scopedContextKeyService],[s.IEditorProgressService,this._register(new d.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.whenRestoredPromise.complete()}),this.registerListeners()}handleGroupContextKeys(){const Q=R.ActiveEditorDirtyContext.bindTo(this.scopedContextKeyService),j=R.ActiveEditorPinnedContext.bindTo(this.scopedContextKeyService),K=R.ActiveEditorFirstInGroupContext.bindTo(this.scopedContextKeyService),Y=R.ActiveEditorLastInGroupContext.bindTo(this.scopedContextKeyService),ee=R.ActiveEditorStickyContext.bindTo(this.scopedContextKeyService),ie=R.EditorGroupEditorsCountContext.bindTo(this.scopedContextKeyService),re=R.ActiveEditorGroupLockedContext.bindTo(this.scopedContextKeyService),oe=new o.MutableDisposable,se=()=>{oe.clear();const te=this.model.activeEditor;te?(Q.set(te.isDirty()&&!te.isSaving()),oe.value=te.onDidChangeDirty(()=>{Q.set(te.isDirty()&&!te.isSaving())})):Q.set(!1)};this._register(this.onDidModelChange(te=>{switch(te.kind){case 2:re.set(this.isLocked);break;case 6:case 4:case 3:case 5:K.set(this.model.isFirst(this.model.activeEditor)),Y.set(this.model.isLast(this.model.activeEditor));break;case 9:te.editor&&te.editor===this.model.activeEditor&&j.set(this.model.isPinned(this.model.activeEditor));break;case 10:te.editor&&te.editor===this.model.activeEditor&&ee.set(this.model.isSticky(this.model.activeEditor));break}ie.set(this.count)})),this._register(this.onDidActiveEditorChange(()=>{se()})),se()}registerContainerListeners(){this._register((0,I.addDisposableListener)(this.element,I.EventType.DBLCLICK,Q=>{this.isEmpty&&(I.EventHelper.stop(Q),this.editorService.openEditor({resource:void 0,options:{pinned:!0,override:p.DEFAULT_EDITOR_ASSOCIATION.id}},this.id))})),this._register((0,I.addDisposableListener)(this.element,I.EventType.AUXCLICK,Q=>{this.isEmpty&&Q.button===1&&(I.EventHelper.stop(Q,!0),this.accessor.removeGroup(this))}))}createContainerToolbar(){const Q=document.createElement("div");Q.classList.add("editor-group-container-toolbar"),this.element.appendChild(Q);const j=this._register(new w.ActionBar(Q,{ariaLabel:(0,n.localize)(0,null)})),K=this._register(this.menuService.createMenu(T.MenuId.EmptyEditorGroup,this.scopedContextKeyService)),Y=()=>{const ee={primary:[],secondary:[]};this.containerToolBarMenuDisposable.value=(0,o.toDisposable)(()=>j.clear()),(0,L.createAndFillInActionBarActions)(K,{arg:{groupId:this.id},shouldForwardArgs:!0},ee,"navigation");for(const ie of[...ee.primary,...ee.secondary]){const re=this.keybindingService.lookupKeybinding(ie.id);j.push(ie,{icon:!0,label:!1,keybinding:re?.getLabel()})}};Y(),this._register(K.onDidChange(Y))}createContainerContextMenu(){this._register((0,I.addDisposableListener)(this.element,I.EventType.CONTEXT_MENU,Q=>this.onShowContainerContextMenu(Q))),this._register((0,I.addDisposableListener)(this.element,v.EventType.Contextmenu,()=>this.onShowContainerContextMenu()))}onShowContainerContextMenu(Q){if(!this.isEmpty)return;let j=this.element;if(Q instanceof MouseEvent){const K=new _.StandardMouseEvent(Q);j={x:K.posx,y:K.posy}}this.contextMenuService.showContextMenu({menuId:T.MenuId.EmptyEditorGroupContext,contextKeyService:this.contextKeyService,getAnchor:()=>j,onHide:()=>{this.focus()}})}doTrackFocus(){const Q=this._register((0,I.trackFocus)(this.element));this._register(Q.onDidFocus(()=>{this.isEmpty&&this._onDidFocus.fire()}));const j=K=>{let Y;if(K instanceof MouseEvent){if(K.button!==0)return;Y=K.target}else Y=K.initialTarget;(0,I.findParentWithClass)(Y,"monaco-action-bar",this.titleContainer)||(0,I.findParentWithClass)(Y,"monaco-breadcrumb-item",this.titleContainer)||setTimeout(()=>{this.focus()})};this._register((0,I.addDisposableListener)(this.titleContainer,I.EventType.MOUSE_DOWN,K=>j(K))),this._register((0,I.addDisposableListener)(this.titleContainer,v.EventType.Tap,K=>j(K))),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,n.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(c.TabsTitleControl,this.titleContainer,this.accessor,this):this.titleAreaControl=this.scopedInstantiationService.createInstance(y.NoTabsTitleControl,this.titleContainer,this.accessor,this),this.titleAreaControl}restoreEditors(Q){if(this.count===0)return;let j;Q instanceof en?j=(0,m.fillActiveEditorViewState)(Q):j=Object.create(null);const K=this.model.activeEditor;if(!K)return;j.pinned=this.model.isPinned(K),j.sticky=this.model.isSticky(K),j.preserveFocus=!0;const Y=document.activeElement;return this.doShowEditor(K,{active:!0,isNew:!1},j).then(()=>{this.accessor.activeGroup===this&&Y===document.activeElement&&this.focus()})}registerListeners(){this._register(this.model.onDidModelChange(Q=>this.onDidGroupModelChange(Q))),this._register(this.accessor.onDidChangeEditorPartOptions(Q=>this.onDidChangeEditorPartOptions(Q))),this._register(this.accessor.onDidVisibilityChange(Q=>this.onDidVisibilityChange(Q)))}onDidGroupModelChange(Q){if(this._onDidModelChange.fire(Q),!!Q.editor)switch(Q.kind){case 3:(0,t.isGroupEditorOpenEvent)(Q)&&this.onDidOpenEditor(Q.editor,Q.editorIndex);break;case 4:(0,t.isGroupEditorCloseEvent)(Q)&&this.handleOnDidCloseEditor(Q.editor,Q.editorIndex,Q.context,Q.sticky);break;case 12:this.onWillDisposeEditor(Q.editor);break;case 11:this.onDidChangeEditorDirty(Q.editor);break;case 7:this.onDidChangeEditorLabel(Q.editor);break}}onDidOpenEditor(Q,j){this.telemetryService.publicLog("editorOpened",this.toEditorTelemetryDescriptor(Q)),this.updateContainer()}handleOnDidCloseEditor(Q,j,K,Y){this._onWillCloseEditor.fire({groupId:this.id,editor:Q,context:K,index:j,sticky:Y});const ee=[Q];Q instanceof A.SideBySideEditorInput&&ee.push(Q.primary,Q.secondary);for(const ie of ee)this.canDispose(ie)&&ie.dispose();this.telemetryService.publicLog("editorClosed",this.toEditorTelemetryDescriptor(Q)),this.updateContainer(),this._onDidCloseEditor.fire({groupId:this.id,editor:Q,context:K,index:j,sticky:Y})}canDispose(Q){for(const j of this.accessor.groups)if(j instanceof en&&j.model.contains(Q,{strictEquals:!0,supportSideBySide:p.SideBySideEditor.ANY}))return!1;return!0}toEditorTelemetryDescriptor(Q){const j=Q.getTelemetryDescriptor(),K=p.EditorResourceAccessor.getOriginalUri(Q),Y=K?K.scheme===V.Schemas.file?K.fsPath:K.path:void 0;if(K&&Y){let ee=(0,B.extname)(K);const ie=ee.indexOf("?");return ee=ie!==-1?ee.substr(0,ie):ee,j.resource={mimeType:(0,P.getMimeTypes)(K).join(", "),scheme:K.scheme,ext:ee,path:(0,N.hash)(Y)},j}return j}onWillDisposeEditor(Q){this.disposedEditorsWorker.work(Q)}handleDisposedEditors(Q){let j;const K=[];for(const Y of Q)this.model.isActive(Y)?j=Y:this.model.contains(Y)&&K.push(Y);for(const Y of K)this.doCloseEditor(Y,!1);j&&this.doCloseEditor(j,!1)}onDidChangeEditorPartOptions(Q){this.updateTitleContainer(),Q.oldPartOptions.showTabs!==Q.newPartOptions.showTabs?(this.createTitleAreaControl(),this.relayout(),this.model.activeEditor&&this.titleAreaControl.openEditor(this.model.activeEditor)):this.titleAreaControl.updateOptions(Q.oldPartOptions,Q.newPartOptions),this.updateStyles(),Q.oldPartOptions.enablePreview&&!Q.newPartOptions.enablePreview&&this.model.previewEditor&&this.pinEditor(this.model.previewEditor)}onDidChangeEditorDirty(Q){this.pinEditor(Q),this.titleAreaControl.updateEditorDirty(Q)}onDidChangeEditorLabel(Q){this.titleAreaControl.updateEditorLabel(Q)}onDidVisibilityChange(Q){this.editorPane.setVisible(Q)}get index(){return this._index}get label(){return(0,n.localize)(2,null,this._index+1)}get ariaLabel(){return(0,n.localize)(3,null,this._index+1)}get disposed(){return this._disposed}get isEmpty(){return this.count===0}get titleHeight(){return this.titleAreaControl.getHeight()}notifyIndexChanged(Q){this._index!==Q&&(this._index=Q,this.model.setIndex(Q))}setActive(Q){this.active=Q,this.element.classList.toggle("active",Q),this.element.classList.toggle("inactive",!Q),this.titleAreaControl.setActive(Q),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,W.withNullAsUndefined)(this.editorPane.activeEditorPane):void 0}get activeEditor(){return this.model.activeEditor}get previewEditor(){return this.model.previewEditor}isPinned(Q){return this.model.isPinned(Q)}isSticky(Q){return this.model.isSticky(Q)}isActive(Q){return this.model.isActive(Q)}contains(Q,j){return this.model.contains(Q,j)}getEditors(Q,j){return this.model.getEditors(Q,j)}findEditors(Q,j){const K=this.uriIdentityService.asCanonicalUri(Q);return this.getEditors(1).filter(Y=>{if(Y.resource&&(0,B.isEqual)(Y.resource,K))return!0;if(j?.supportSideBySide===p.SideBySideEditor.PRIMARY||j?.supportSideBySide===p.SideBySideEditor.ANY){const ee=p.EditorResourceAccessor.getCanonicalUri(Y,{supportSideBySide:p.SideBySideEditor.PRIMARY});if(ee&&(0,B.isEqual)(ee,K))return!0}if(j?.supportSideBySide===p.SideBySideEditor.SECONDARY||j?.supportSideBySide===p.SideBySideEditor.ANY){const ee=p.EditorResourceAccessor.getCanonicalUri(Y,{supportSideBySide:p.SideBySideEditor.SECONDARY});if(ee&&(0,B.isEqual)(ee,K))return!0}return!1})}getEditorByIndex(Q){return this.model.getEditorByIndex(Q)}getIndexOfEditor(Q){return this.model.indexOf(Q)}isFirst(Q){return this.model.isFirst(Q)}isLast(Q){return this.model.isLast(Q)}focus(){this.activeEditorPane?this.activeEditorPane.focus():this.element.focus(),this._onDidFocus.fire()}pinEditor(Q=this.activeEditor||void 0){if(Q&&!this.model.isPinned(Q)){const j=this.model.pin(Q);j&&this.titleAreaControl.pinEditor(j)}}stickEditor(Q=this.activeEditor||void 0){this.doStickEditor(Q,!0)}unstickEditor(Q=this.activeEditor||void 0){this.doStickEditor(Q,!1)}doStickEditor(Q,j){if(Q&&this.model.isSticky(Q)!==j){const K=this.getIndexOfEditor(Q),Y=j?this.model.stick(Q):this.model.unstick(Q);if(!Y)return;const ee=this.getIndexOfEditor(Y);ee!==K&&this.titleAreaControl.moveEditor(Y,K,ee),j?this.titleAreaControl.stickEditor(Y):this.titleAreaControl.unstickEditor(Y)}}async openEditor(Q,j){return this.doOpenEditor(Q,j,{supportSideBySide:p.SideBySideEditor.BOTH})}async doOpenEditor(Q,j,K){if(!Q||Q.isDisposed())return;this._onWillOpenEditor.fire({editor:Q,groupId:this.id});const Y={index:j?j.index:void 0,pinned:j?.sticky||!this.accessor.partOptions.enablePreview||Q.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:K?.supportSideBySide};j?.sticky&&typeof j?.index=="number"&&!this.model.isSticky(j.index)&&(Y.sticky=!1),!Y.active&&!Y.pinned&&this.model.activeEditor&&!this.model.isPinned(this.model.activeEditor)&&(Y.active=!0);let ee=!1,ie=!1;if(j?.activation===z.EditorActivation.ACTIVATE?ee=!0:j?.activation===z.EditorActivation.RESTORE?ie=!0:j?.activation===z.EditorActivation.PRESERVE?(ee=!1,ie=!1):Y.active&&(ee=!j||!j.preserveFocus,ie=!ee),typeof Y.index=="number"){const te=this.model.indexOf(Q);te!==-1&&te!==Y.index&&this.doMoveEditorInsideGroup(Q,Y)}const{editor:re,isNew:oe}=this.model.openEditor(Q,Y);oe&&this.count===1&&this.accessor.groups.length>1&&re.editorId&&this.accessor.partOptions.autoLockGroups?.has(re.editorId)&&this.lock(!0);const se=this.doShowEditor(re,{active:!!Y.active,isNew:oe},j,K);return ee?this.accessor.activateGroup(this):ie&&this.accessor.restoreGroup(this),se}doShowEditor(Q,j,K,Y){let ee;return j.active?ee=(async()=>{const{pane:ie,changed:re,cancelled:oe,error:se}=await this.editorPane.openEditor(Q,K,{newInGroup:j.isNew});if(!oe){if(re&&this._onDidActiveEditorChange.fire({editor:Q}),se&&this._onDidOpenEditorFail.fire(Q),!ie&&this.activeEditor===Q){const te=!K||!K.preserveFocus;this.doCloseEditor(Q,te,{fromError:!0})}return ie}})():ee=Promise.resolve(void 0),Y?.skipTitleUpdate||this.titleAreaControl.openEditor(Q),ee}async openEditors(Q){const j=(0,a.coalesce)(Q).filter(({editor:re})=>!re.isDisposed()),K=(0,a.firstOrDefault)(j);if(!K)return;const Y={supportSideBySide:p.SideBySideEditor.BOTH};await this.doOpenEditor(K.editor,K.options,Y);const ee=j.slice(1),ie=this.getIndexOfEditor(K.editor)+1;return await h.Promises.settled(ee.map(({editor:re,options:oe},se)=>this.doOpenEditor(re,{...oe,inactive:!0,pinned:!0,index:ie+se},{...Y,skipTitleUpdate:!0}))),this.titleAreaControl.openEditors(ee.map(({editor:re})=>re)),(0,W.withNullAsUndefined)(this.editorPane.activeEditorPane)}moveEditors(Q,j){const K={skipTitleUpdate:this!==j};for(const{editor:Y,options:ee}of Q)this.moveEditor(Y,j,ee,K);if(K.skipTitleUpdate){const Y=Q.map(({editor:ee})=>ee);j.titleAreaControl.openEditors(Y),this.titleAreaControl.closeEditors(Y)}}moveEditor(Q,j,K,Y){this===j?this.doMoveEditorInsideGroup(Q,K):this.doMoveOrCopyEditorAcrossGroups(Q,j,K,{...Y,keepCopy:!1})}doMoveEditorInsideGroup(Q,j){const K=j?j.index:void 0;if(typeof K!="number")return;const Y=this.model.indexOf(Q);if(Y===-1||Y===K)return;const ee=this.model.getEditorByIndex(Y);!ee||(this.model.moveEditor(ee,K),this.model.pin(ee),this.titleAreaControl.moveEditor(ee,Y,K),this.titleAreaControl.pinEditor(ee))}doMoveOrCopyEditorAcrossGroups(Q,j,K,Y){const ee=Y?.keepCopy,ie=(0,m.fillActiveEditorViewState)(this,Q,{...K,pinned:!0,sticky:!ee&&this.model.isSticky(Q)});ee||this._onWillMoveEditor.fire({groupId:this.id,editor:Q,target:j.id}),j.doOpenEditor(ee?Q.copy():Q,ie,Y),ee||this.doCloseEditor(Q,!1,{...Y,context:p.EditorCloseContext.MOVE})}copyEditors(Q,j){const K={skipTitleUpdate:this!==j};for(const{editor:Y,options:ee}of Q)this.copyEditor(Y,j,ee,K);if(K.skipTitleUpdate){const Y=Q.map(({editor:ee})=>ee);j.titleAreaControl.openEditors(Y)}}copyEditor(Q,j,K,Y){this===j?this.doMoveEditorInsideGroup(Q,K):this.doMoveOrCopyEditorAcrossGroups(Q,j,K,{...Y,keepCopy:!0})}async closeEditor(Q=this.activeEditor||void 0,j){return this.doCloseEditorWithConfirmationHandling(Q,j)}async doCloseEditorWithConfirmationHandling(Q=this.activeEditor||void 0,j,K){return!Q||await this.handleCloseConfirmation([Q])?!1:(this.doCloseEditor(Q,j?.preserveFocus?!1:void 0,K),!0)}doCloseEditor(Q,j=this.accessor.activeGroup===this,K){let Y;this.model.isActive(Q)?Y=this.doCloseActiveEditor(j,K):Y=this.doCloseInactiveEditor(Q,K),K?.skipTitleUpdate||this.titleAreaControl.closeEditor(Q,Y)}doCloseActiveEditor(Q=this.accessor.activeGroup===this,j){const K=this.activeEditor,Y=this.shouldRestoreFocus(this.element),ee=this.accessor.partOptions.closeEmptyGroups;if(ee&&this.active&&this.count===1){const se=this.accessor.getGroups(1)[1];se&&(Y?se.focus():this.accessor.activateGroup(se))}let ie;K&&(ie=this.model.closeEditor(K,j?.context)?.editorIndex);const re=this.model.activeEditor;if(re){const oe=!Q;let se;oe&&this.accessor.activeGroup!==this&&(se=z.EditorActivation.PRESERVE);const te={preserveFocus:oe,activation:se,ignoreError:j?.fromError};this.doOpenEditor(re,te)}else K&&this.editorPane.closeEditor(K),Y&&!ee&&this.focus(),this._onDidActiveEditorChange.fire({editor:void 0}),ee&&this.accessor.removeGroup(this);return ie}shouldRestoreFocus(Q){const j=document.activeElement;return j===document.body?!0:(0,I.isAncestor)(j,Q)}doCloseInactiveEditor(Q,j){return this.model.closeEditor(Q,j?.context)?.editorIndex}async handleCloseConfirmation(Q){if(!Q.length)return!1;const j=Q.shift();let K=this.mapEditorToPendingConfirmation.get(j);K||(K=this.doHandleCloseConfirmation(j),this.mapEditorToPendingConfirmation.set(j,K));let Y;try{Y=await K}finally{this.mapEditorToPendingConfirmation.delete(j)}return Y||this.handleCloseConfirmation(Q)}async doHandleCloseConfirmation(Q,j){if(!this.shouldConfirmClose(Q)||Q instanceof A.SideBySideEditorInput&&this.model.contains(Q.primary)||this.accessor.groups.some(ie=>{if(ie===this)return!1;const re=ie;return!!(re.contains(Q,{supportSideBySide:p.SideBySideEditor.BOTH})||Q instanceof A.SideBySideEditorInput&&re.contains(Q.primary))}))return!1;let K=2,Y=1,ee=!1;if(!Q.hasCapability(4)&&!j?.skipAutoSave&&!Q.closeHandler&&(this.filesConfigurationService.getAutoSaveMode()===3?(ee=!0,K=0,Y=3):$.isNative&&($.isWindows||$.isLinux)&&this.filesConfigurationService.getAutoSaveMode()===4&&(ee=!0,K=0,Y=4)),!ee)if(await this.doOpenEditor(Q),typeof Q.closeHandler?.confirm=="function")K=await Q.closeHandler.confirm([{editor:Q,groupId:this.id}]);else{let ie;Q instanceof A.SideBySideEditorInput?ie=Q.primary.getName():ie=Q.getName(),K=await this.fileDialogService.showSaveConfirm([ie])}if(!Q.closeHandler&&!this.shouldConfirmClose(Q))return K===2;switch(K){case 0:return!await Q.save(this.id,{reason:Y})&&ee?this.doHandleCloseConfirmation(Q,{skipAutoSave:!0}):Q.isDirty();case 1:try{return await Q.revert(this.id),Q.isDirty()}catch(ie){return this.logService.error(ie),await Q.revert(this.id,{soft:!0}),Q.isDirty()}case 2:return!0}}shouldConfirmClose(Q){return Q.closeHandler?Q.closeHandler.showConfirm():Q.isDirty()&&!Q.isSaving()}async closeEditors(Q,j){if(this.isEmpty)return!0;const K=this.doGetEditorsToClose(Q);return await this.handleCloseConfirmation(K.slice(0))?!1:(this.doCloseEditors(K,j),!0)}doGetEditorsToClose(Q){if(Array.isArray(Q))return Q;const j=Q,K=typeof j.direction=="number";let Y=this.model.getEditors(K?1:0,j);return j.savedOnly?Y=Y.filter(ee=>!ee.isDirty()||ee.isSaving()):K&&j.except?Y=j.direction===0?Y.slice(0,this.model.indexOf(j.except,Y)):Y.slice(this.model.indexOf(j.except,Y)+1):j.except&&(Y=Y.filter(ee=>j.except&&!ee.matches(j.except))),Y}doCloseEditors(Q,j){let K=!1;for(const Y of Q)this.isActive(Y)?K=!0:this.doCloseInactiveEditor(Y);K&&this.doCloseActiveEditor(j?.preserveFocus?!1:void 0),Q.length&&this.titleAreaControl.closeEditors(Q)}async closeAllEditors(Q){return this.isEmpty?(this.accessor.partOptions.closeEmptyGroups&&this.accessor.removeGroup(this),!0):await this.handleCloseConfirmation(this.model.getEditors(0,Q))?!1:(this.doCloseAllEditors(Q),!0)}doCloseAllEditors(Q){const j=[];for(const K of this.model.getEditors(1,Q))this.isActive(K)||this.doCloseInactiveEditor(K),j.push(K);this.activeEditor&&j.includes(this.activeEditor)&&this.doCloseActiveEditor(),j.length&&this.titleAreaControl.closeEditors(j)}async replaceEditors(Q){let j;const K=[];for(let{editor:Y,replacement:ee,forceReplaceDirty:ie,options:re}of Q){const oe=this.getIndexOfEditor(Y);if(oe>=0){const se=this.isActive(Y);re?re.index=oe:re={index:oe},re.inactive=!se,re.pinned=re.pinned??!0;const te={editor:Y,replacement:ee,forceReplaceDirty:ie,options:re};se?j=te:K.push(te)}}for(const{editor:Y,replacement:ee,forceReplaceDirty:ie,options:re}of K)if(await this.doOpenEditor(ee,re),!Y.matches(ee)){let oe=!1;if(ie?(this.doCloseEditor(Y,!1,{context:p.EditorCloseContext.REPLACE}),oe=!0):oe=await this.doCloseEditorWithConfirmationHandling(Y,{preserveFocus:!0},{context:p.EditorCloseContext.REPLACE}),!oe)return}if(j){const Y=this.doOpenEditor(j.replacement,j.options);j.editor.matches(j.replacement)||(j.forceReplaceDirty?this.doCloseEditor(j.editor,!1,{context:p.EditorCloseContext.REPLACE}):await this.doCloseEditorWithConfirmationHandling(j.editor,{preserveFocus:!0},{context:p.EditorCloseContext.REPLACE})),await Y}}get isLocked(){return this.accessor.groups.length===1?!1:this.model.isLocked}lock(Q){this.accessor.groups.length===1&&(Q=!1),this.model.lock(Q)}updateStyles(){const Q=this.isEmpty;Q?this.element.style.backgroundColor=this.getColor(f.EDITOR_GROUP_EMPTY_BACKGROUND)||"":this.element.style.backgroundColor="";const j=this.getColor(f.EDITOR_GROUP_HEADER_BORDER)||this.getColor(i.contrastBorder);!Q&&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"